GDPR Cookie Compliance - Version 2.0.0

Version Description

  • Significant improvements to the plugin settings and content upload workflow
  • Added CodeMirror library for easier Javascript editing
  • Added Help section to the settings that lists useful shortcodes and hooks
Download this release

Release Info

Developer MooveAgency
Plugin Icon 128x128 GDPR Cookie Compliance
Version 2.0.0
Comparing to
See all releases

Code changes from version 1.4.0 to 2.0.0

README.md CHANGED
@@ -1,42 +1,7 @@
1
  # GDPR Cookie Compliance
2
 
3
- * GDPR is an EU wide legislation that specifies how user data should be handled. This plugin has settings that can assist you with GDPR cookie compliance requirements.
4
-
5
- ### What is GDPR?
6
-
7
- * General Data Protection Regulation (GDPR) is a European regulation to strengthen and unify the data protection of EU citizens. (<a href="https://www.eugdpr.org/" target="_blank">https://www.eugdpr.org/</a>)
8
-
9
- ### GDPR and Cookie Compliance
10
-
11
- * GDPR states that as a website owner, you cannot assume a user has opted into the cookies being used on your website - the user must give a positive opt in or "affirmative action" to signal their consent to the use of cookies and you also cannot force users to opt into the use of cookies.
12
-
13
- * Users who do not give consent should have the same experience of your website as those who give consent, which means you have to provide the same level of service and experience to those who do not accept the cookies.
14
-
15
- * Consent will need to be specific to the different cookie purposes with the ability to enable and disable cookies at a granular level for each cookie.
16
-
17
- * It also means that you should not be tracking users on your website with tools such as Google Analytics until they give you a specific permission to do so.
18
-
19
- ### How this plugin works
20
-
21
- * This plugin is designed to help you prepare your website for the GDPR regulations related to cookies but IT WILL NOT MAKE IT FULLY COMPLIANT - this plugin is just a template and needs to be setup by your developer in order to work properly.
22
-
23
- * Once installed, the plugin gives you a template that you can customise; you can modify all text and colours to suit your needs.
24
-
25
- * You can also allow users to enable and disable cookies on your site, however, this will require bespoke development work as every site is unique and uses different cookies.
26
-
27
- ### Demo Video
28
-
29
- * You can view a demo of the plugin here: <a href="https://vimeo.com/255655268/" target="_blank">GDPR Cookie Compliance Plugin by Moove Agency</a>
30
-
31
- ### Disclaimer
32
-
33
- * Please note, it is possible that you will see a drop of perceived traffic and visitor numbers in your various analytics such as Google Analytics. This is because GDPR legislations state that you cannot track users unless they explicitly give consent by enabling the 3rd party tracking and cookies.
34
-
35
- * This plugin will require technical support from your developer to ensure that it is implemented correctly on your website.
36
-
37
- * This is a general plugin with basic functionality. We advise that you to seek independent legal advice on this topic.
38
-
39
- * THIS PLUGIN DOES NOT MAKE YOUR WEBSITE COMPLIANT. YOU ARE RESPONSIBLE FOR ENSURING THAT ALL GDPR REQUIREMENTS ARE MET ON YOUR WEBSITE.
40
 
41
 
42
  ### Contributors
1
  # GDPR Cookie Compliance
2
 
3
+ WordPress Repo:
4
+ https://wordpress.org/plugins/gdpr-cookie-compliance/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
 
7
  ### Contributors
controllers/moove-controller.php CHANGED
@@ -127,7 +127,8 @@ class Moove_GDPR_Controller {
127
  ob_start();
128
  ?>
129
  #moove_gdpr_cookie_modal,
130
- #moove_gdpr_cookie_info_bar {
 
131
  font-family: <?php echo $font_family; ?>;
132
  }
133
  #moove_gdpr_save_popup_settings_button {
@@ -143,13 +144,15 @@ class Moove_GDPR_Controller {
143
  background-color: <?php echo $primary_colour; ?>;
144
  }
145
  #moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content .moove-gdpr-button-holder a.mgbutton,
146
- #moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton {
 
147
  background-color: <?php echo $primary_colour; ?>;
148
  border-color: <?php echo $primary_colour; ?>;
149
  }
150
 
151
  #moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content .moove-gdpr-button-holder a.mgbutton:hover,
152
- #moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton:hover {
 
153
  background-color: #fff;
154
  color: <?php echo $primary_colour; ?>;
155
  }
127
  ob_start();
128
  ?>
129
  #moove_gdpr_cookie_modal,
130
+ #moove_gdpr_cookie_info_bar,
131
+ .gdpr_cookie_settings_shortcode_content {
132
  font-family: <?php echo $font_family; ?>;
133
  }
134
  #moove_gdpr_save_popup_settings_button {
144
  background-color: <?php echo $primary_colour; ?>;
145
  }
146
  #moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content .moove-gdpr-button-holder a.mgbutton,
147
+ #moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton,
148
+ .gdpr_cookie_settings_shortcode_content .gdpr-shr-button.button-green {
149
  background-color: <?php echo $primary_colour; ?>;
150
  border-color: <?php echo $primary_colour; ?>;
151
  }
152
 
153
  #moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content .moove-gdpr-button-holder a.mgbutton:hover,
154
+ #moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton:hover,
155
+ .gdpr_cookie_settings_shortcode_content .gdpr-shr-button.button-green:hover {
156
  background-color: #fff;
157
  color: <?php echo $primary_colour; ?>;
158
  }
dist/fonts/gdpr-admin-icon ADDED
Binary file
dist/fonts/gdpr-admin-icon.eot ADDED
Binary file
dist/fonts/gdpr-admin-icon.svg ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Copyright (C) 2019 by original authors @ fontello.com</metadata>
5
+ <defs>
6
+ <font id="gdpr-admin-icon" horiz-adv-x="1000" >
7
+ <font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
+ <missing-glyph horiz-adv-x="1000" />
9
+ <glyph glyph-name="check-o-square" unicode="&#xe806;" d="M821 331v-177q0-67-47-114t-113-47h-465q-66 0-113 47t-47 114v464q0 66 47 113t113 48h465q35 0 65-14 8-4 10-13 2-10-5-16l-27-28q-6-5-13-5-2 0-5 1-13 3-25 3h-465q-36 0-63-26t-26-63v-464q0-37 26-63t63-27h465q37 0 63 27t26 63v141q0 8 5 13l36 35q5 6 13 6 3 0 6-2 11-4 11-16z m129 273l-454-454q-13-14-32-14t-31 14l-240 240q-14 13-14 31t14 32l61 62q13 13 32 13t32-13l146-147 361 361q14 13 32 13t32-13l61-61q14-14 14-32t-14-32z" horiz-adv-x="1000" />
10
+ </font>
11
+ </defs>
12
+ </svg>
dist/fonts/gdpr-admin-icon.ttf ADDED
Binary file
dist/fonts/gdpr-admin-icon.woff2 ADDED
Binary file
dist/images/gdpr-cookie-compliance-icon.png ADDED
Binary file
dist/images/gdpr-icon.png ADDED
Binary file
dist/scripts/admin.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.postscribe=e():t.postscribe=e()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var o=r[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var i=r(1),o=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=o.default},function(t,e,r){"use strict";function i(){}function o(){var t=d.shift();if(t){var e=h.last(t);e.afterDequeue(),t.stream=n.apply(void 0,t),e.afterStreamStart()}}function n(t,e,r){function n(t){t=r.beforeWrite(t),g.write(t),r.afterWrite(t)}g=new l.default(t,r),g.id=f++,g.name=r.name||g.id,s.streams[g.name]=g;var c=t.ownerDocument,u={close:c.close,open:c.open,write:c.write,writeln:c.writeln};a(c,{close:i,open:i,write:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return n(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return n(e.join("")+"\n")}});var h=g.win.onerror||i;return g.win.onerror=function(t,e,i){r.error({msg:t+" - "+e+": "+i}),h.apply(g.win,[t,e,i])},g.write(e,function(){a(c,u),g.win.onerror=h,r.done(),g=null,o()}),g}function s(t,e,r){if(h.isFunction(r))r={done:r};else if("clear"===r)return d=[],g=null,void(f=0);r=h.defaults(r,p),t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t;var n=[t,e,r];return t.postscribe={cancel:function(){n.stream?n.stream.abort():n[1]=i}},r.beforeEnqueue(n),d.push(n),g||o(),t.postscribe}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t};e.default=s;var c=r(2),l=function(t){return t&&t.__esModule?t:{default:t}}(c),u=r(4),h=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(u),p={afterAsync:i,afterDequeue:i,afterStreamStart:i,afterWrite:i,autoFix:!0,beforeEnqueue:i,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:i,error:function(t){throw new Error(t.msg)},releaseAsync:!1},f=0,d=[],g=null;a(s,{streams:{},queue:d,WriteStream:l.default})},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){var r=h+e,i=t.getAttribute(r);return u.existy(i)?String(i):i}function n(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=h+e;u.existy(r)&&""!==r?t.setAttribute(i,r):t.removeAttribute(i)}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},a=r(3),c=function(t){return t&&t.__esModule?t:{default:t}}(a),l=r(4),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(l),h="data-ps-",p="ps-style",f="ps-script",d=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.root=e,this.options=r,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new c.default("",{autoFix:r.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],n(this.proxyRoot,"proxyof",0)}return t.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();u.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},t.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},t.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,r=void 0,i=void 0,o=[];(e=this.parser.readToken())&&!(r=u.isScript(e))&&!(i=u.isStyle(e));)(e=this.options.beforeWriteToken(e))&&o.push(e);o.length>0&&this._writeStaticTokens(o),r&&this._handleScriptToken(e),i&&this._handleStyleToken(e)},t.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},t.prototype._buildChunk=function(t){for(var e=this.actuals.length,r=[],i=[],o=[],n=t.length,s=0;s<n;s++){var a=t[s],c=a.toString();if(r.push(c),a.attrs){if(!/^noscript$/i.test(a.tagName)){var l=e++;i.push(c.replace(/(\/?>)/," "+h+"id="+l+" $1")),a.attrs.id!==f&&a.attrs.id!==p&&o.push("atomicTag"===a.type?"":"<"+a.tagName+" "+h+"proxyof="+l+(a.unary?" />":">"))}}else i.push(c),o.push("endTag"===a.type?c:"")}return{tokens:t,raw:r.join(""),actual:i.join(""),proxy:o.join("")}},t.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];u.existy(t=e.shift());){var r=1===t.nodeType;if(!(r&&o(t,"proxyof"))){r&&(this.actuals[o(t,"id")]=t,n(t,"id"));var i=t.parentNode&&o(t.parentNode,"proxyof");i&&this.actuals[i].appendChild(t)}e.unshift.apply(e,u.toArray(t.childNodes))}},t.prototype._handleScriptToken=function(t){var e=this,r=this.parser.clear();r&&this.writeQueue.unshift(r),t.src=t.attrs.src||t.attrs.SRC,(t=this.options.beforeWriteToken(t))&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},t.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",t=this.options.beforeWriteToken(t),t&&this._writeStyleToken(t),e&&this.write()},t.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,p),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},t.prototype._buildStyle=function(t){var e=this.doc.createElement(t.tagName);return e.setAttribute("type",t.type),u.eachKey(t.attrs,function(t,r){e.setAttribute(t,r)}),e},t.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var r=this.doc.getElementById(e);r&&r.parentNode.replaceChild(t,r)},t.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},t.prototype._onScriptDone=function(t){return t!==this.scriptStack[0]?void this.options.error({msg:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},t.prototype._writeScriptToken=function(t,e){var r=this._buildScript(t),i=this._shouldRelease(r),o=this.options.afterAsync;t.src&&(r.src=t.src,this._scriptLoadHandler(r,i?o:function(){e(),o()}));try{this._insertCursor(r,f),r.src&&!i||e()}catch(t){this.options.error(t),e()}},t.prototype._buildScript=function(t){var e=this.doc.createElement(t.tagName);return u.eachKey(t.attrs,function(t,r){e.setAttribute(t,r)}),t.content&&(e.text=t.content),e},t.prototype._scriptLoadHandler=function(t,e){function r(){t=t.onload=t.onreadystatechange=t.onerror=null}function i(){r(),null!=e&&e(),e=null}function o(t){r(),a(t),null!=e&&e(),e=null}function n(t,e){var r=t["on"+e];null!=r&&(t["_on"+e]=r)}var a=this.options.error;n(t,"load"),n(t,"error"),s(t,{onload:function(){if(t._onload)try{t._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){o({msg:"onload handler failed "+e+" @ "+t.src})}i()},onerror:function(){if(t._onerror)try{t._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){return void o({msg:"onerror handler failed "+e+" @ "+t.src})}o({msg:"remote script failed "+t.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(t.readyState)&&i()}})},t.prototype._shouldRelease=function(t){return!/^script$/i.test(t.nodeName)||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},t}();e.default=d},function(t,e,r){!function(e,r){t.exports=function(){return function(t){function e(i){if(r[i])return r[i].exports;var o=r[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var i=r(1),o=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=o.default},function(t,e,r){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=r(2),s=i(n),a=r(3),c=i(a),l=r(6),u=function(t){return t&&t.__esModule?t:{default:t}}(l),h=r(5),p={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},f=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,t),this.stream=r;var n=!1,a={};for(var c in s)s.hasOwnProperty(c)&&(i.autoFix&&(a[c+"Fix"]=!0),n=n||a[c+"Fix"]);n?(this._readToken=(0,u.default)(this,a,function(){return e._readTokenImpl()}),this._peekToken=(0,u.default)(this,a,function(){return e._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return t.prototype.append=function(t){this.stream+=t},t.prototype.prepend=function(t){this.stream=t+this.stream},t.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},t.prototype._peekTokenImpl=function(){for(var t in p)if(p.hasOwnProperty(t)&&p[t].test(this.stream)){var e=c[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},t.prototype.peekToken=function(){return this._peekToken()},t.prototype.readToken=function(){return this._readToken()},t.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&!1===t[e.type](e))return},t.prototype.clear=function(){var t=this.stream;return this.stream="",t},t.prototype.rest=function(){return this.stream},t}();e.default=f,f.tokenToString=function(t){return t.toString()},f.escapeAttributes=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=(0,h.escapeQuotes)(t[r],null));return e},f.supports=s;for(var d in s)s.hasOwnProperty(d)&&(f.browserHasFlaw=f.browserHasFlaw||!s[d]&&d)},function(t,e){"use strict";e.__esModule=!0;var r=!1,i=!1,o=window.document.createElement("div");try{var n="<P><I></P></I>";o.innerHTML=n,e.tagSoup=r=o.innerHTML!==n}catch(t){e.tagSoup=r=!1}try{o.innerHTML="<P><i><P></P></i></P>",e.selfClose=i=2===o.childNodes.length}catch(t){e.selfClose=i=!1}o=null,e.tagSoup=r,e.selfClose=i},function(t,e,r){"use strict";function i(t){var e=t.indexOf("--\x3e");if(e>=0)return new l.CommentToken(t.substr(4,e-1),e+3)}function o(t){var e=t.indexOf("<");return new l.CharsToken(e>=0?e:t.length)}function n(t){if(-1!==t.indexOf(">")){var e=t.match(u.startTag);if(e){var r=function(){var t={},r={},i=e[2];return e[2].replace(u.attr,function(e,o){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(t[arguments[5]]="",r[arguments[5]]=!0):t[o]=arguments[2]||arguments[3]||arguments[4]||u.fillAttr.test(o)&&o||"":t[o]="",i=i.replace(e,"")}),{v:new l.StartTagToken(e[1],e[0].length,t,r,!!e[3],i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===(void 0===r?"undefined":c(r)))return r.v}}}function s(t){var e=n(t);if(e){var r=t.slice(e.length);if(r.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var i=r.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(i)return new l.AtomicTagToken(e.tagName,i[0].length+e.length,e.attrs,e.booleanAttrs,i[1])}}}function a(t){var e=t.match(u.endTag);if(e)return new l.EndTagToken(e[1],e[0].length)}e.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=i,e.chars=o,e.startTag=n,e.atomicTag=s,e.endTag=a;var l=r(4),u={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var o=r(5),n=(e.Token=function t(e,r){i(this,t),this.type=e,this.length=r,this.text=""},e.CommentToken=function(){function t(e,r){i(this,t),this.type="comment",this.length=r||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"\x3c!--"+this.content},t}(),e.CharsToken=function(){function t(e){i(this,t),this.type="chars",this.length=e,this.text=""}return t.prototype.toString=function(){return this.text},t}(),e.TagToken=function(){function t(e,r,o,n,s){i(this,t),this.type=e,this.length=o,this.text="",this.tagName=r,this.attrs=n,this.booleanAttrs=s,this.unary=!1,this.html5Unary=!1}return t.formatTag=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r="<"+t.tagName;for(var i in t.attrs)if(t.attrs.hasOwnProperty(i)){r+=" "+i;var n=t.attrs[i];void 0!==t.booleanAttrs&&void 0!==t.booleanAttrs[i]||(r+='="'+(0,o.escapeQuotes)(n)+'"')}return t.rest&&(r+=" "+t.rest),r+=t.unary&&!t.html5Unary?"/>":">",void 0!==e&&null!==e&&(r+=e+"</"+t.tagName+">"),r},t}());e.StartTagToken=function(){function t(e,r,o,n,s,a){i(this,t),this.type="startTag",this.length=r,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=n,this.html5Unary=!1,this.unary=s,this.rest=a}return t.prototype.toString=function(){return n.formatTag(this)},t}(),e.AtomicTagToken=function(){function t(e,r,o,n,s){i(this,t),this.type="atomicTag",this.length=r,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=n,this.unary=!1,this.html5Unary=!1,this.content=s}return t.prototype.toString=function(){return n.formatTag(this,this.content)},t}(),e.EndTagToken=function(){function t(e,r){i(this,t),this.type="endTag",this.length=r,this.text="",this.tagName=e}return t.prototype.toString=function(){return"</"+this.tagName+">"},t}()},function(t,e){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}e.__esModule=!0,e.escapeQuotes=r},function(t,e){"use strict";function r(t){return t&&"startTag"===t.type&&(t.unary=a.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function i(t,e){var i=t.stream,o=r(e());return t.stream=i,o}function o(t,e){var r=e.pop();t.prepend("</"+r.tagName+">")}function n(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,r=0;e=this[r];r++)if(e.tagName===t)return!0;return!1},t}function s(t,e,s){function a(){var e=i(t,s);e&&u[e.type]&&u[e.type](e)}var l=n(),u={startTag:function(r){var i=r.tagName;"TR"===i.toUpperCase()&&l.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),a()):e.selfCloseFix&&c.test(i)&&l.containsTagName(i)?l.lastTagNameEq(i)?o(t,l):(t.prepend("</"+r.tagName+">"),a()):r.unary||l.push(r)},endTag:function(r){l.last()?e.tagSoupFix&&!l.lastTagNameEq(r.tagName)?o(t,l):l.pop():e.tagSoupFix&&(s(),a())}};return function(){return a(),r(s())}}e.__esModule=!0,e.default=s;var a=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,c=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}])}()}()},function(t,e){"use strict";function r(t){return void 0!==t&&null!==t}function i(t){return"function"==typeof t}function o(t,e,r){var i=void 0,o=t&&t.length||0;for(i=0;i<o;i++)e.call(r,t[i],i)}function n(t,e,r){for(var i in t)t.hasOwnProperty(i)&&e.call(r,i,t[i])}function s(t,e){return t=t||{},n(e,function(e,i){r(t[e])||(t[e]=i)}),t}function a(t){try{return Array.prototype.slice.call(t)}catch(r){var e=function(){var e=[];return o(t,function(t){e.push(t)}),{v:e}}();if("object"===(void 0===e?"undefined":p(e)))return e.v}}function c(t){return t[t.length-1]}function l(t,e){return!(!t||"startTag"!==t.type&&"atomicTag"!==t.type||!("tagName"in t)||!~t.tagName.toLowerCase().indexOf(e))}function u(t){return l(t,"script")}function h(t){return l(t,"style")}e.__esModule=!0;var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.existy=r,e.isFunction=i,e.each=o,e.eachKey=n,e.defaults=s,e.toArray=a,e.last=c,e.isTag=l,e.isScript=u,e.isStyle=h}])}),function(t,e){function r(){var e,r;l?u="filter":(e=t('<div id="iris-gradtest" />'),r="linear-gradient(top,#fff,#000)",t.each(h,function(t,i){if(e.css("backgroundImage",i+r),e.css("backgroundImage").match("gradient"))return u=t,!1}),!1===u&&(e.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),e.css("backgroundImage").match("gradient")&&(u="webkit")),e.remove())}function i(e,r){return e="top"===e?"top":"left",r=t.isArray(r)?r:Array.prototype.slice.call(arguments,1),"webkit"===u?n(e,r):h[u]+"linear-gradient("+e+", "+r.join(", ")+")"}function o(e,r){var i,o,n,a,c,l,u,h,p;e="top"===e?"top":"left",r=t.isArray(r)?r:Array.prototype.slice.call(arguments,1),i="top"===e?0:1,o=t(this),n=r.length-1,a="filter",c=1===i?"left":"top",l=1===i?"right":"bottom",u=1===i?"height":"width",h='<div class="iris-ie-gradient-shim" style="position:absolute;'+u+":100%;"+c+":%start%;"+l+":%end%;"+a+':%filter%;" data-color:"%color%"></div>',p="","static"===o.css("position")&&o.css({position:"relative"}),r=s(r),t.each(r,function(t,e){var o,s,a;if(t===n)return!1;o=r[t+1],e.stop!==o.stop&&(s=100-parseFloat(o.stop)+"%",e.octoHex=new Color(e.color).toIEOctoHex(),o.octoHex=new Color(o.color).toIEOctoHex(),a="progid:DXImageTransform.Microsoft.Gradient(GradientType="+i+", StartColorStr='"+e.octoHex+"', EndColorStr='"+o.octoHex+"')",p+=h.replace("%start%",e.stop).replace("%end%",s).replace("%filter%",a))}),o.find(".iris-ie-gradient-shim").remove(),t(p).prependTo(o)}function n(e,r){var i=[];return e="top"===e?"0% 0%,0% 100%,":"0% 100%,100% 100%,",r=s(r),t.each(r,function(t,e){i.push("color-stop("+parseFloat(e.stop)/100+", "+e.color+")")}),"-webkit-gradient(linear,"+e+i.join(",")+")"}function s(e){var r=[],i=[],o=[],n=e.length-1;return t.each(e,function(t,e){var o=e,n=!1,s=e.match(/1?[0-9]{1,2}%$/);s&&(o=e.replace(/\s?1?[0-9]{1,2}%$/,""),n=s.shift()),r.push(o),i.push(n)}),!1===i[0]&&(i[0]="0%"),!1===i[n]&&(i[n]="100%"),i=a(i),t.each(i,function(t){o[t]={color:r[t],stop:i[t]}}),o}function a(e){var r,i,o,n,s=0,c=e.length-1,l=0,u=!1;if(e.length<=2||t.inArray(!1,e)<0)return e;for(;l<e.length-1;)u||!1!==e[l]?u&&!1!==e[l]&&(c=l,l=e.length):(s=l-1,u=!0),l++;for(i=c-s,n=parseInt(e[s].replace("%"),10),r=(parseFloat(e[c].replace("%"))-n)/i,l=s+1,o=1;l<c;)e[l]=n+o*r+"%",o++,l++;return a(e)}var c,l,u,h,p,f,d,g,m;if(c='<div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="#"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div>',p='.iris-picker{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input+.iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0;margin:0;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;border-radius:0}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}.iris-square-handle,.ui-slider-handle{border:0;outline:0}',d=navigator.userAgent.toLowerCase(),g="Microsoft Internet Explorer"===navigator.appName,m=g?parseFloat(d.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,l=g&&m<10,u=!1,h=["-moz-","-webkit-","-o-","-ms-"],l&&m<=7)return t.fn.iris=t.noop,void(t.support.iris=!1);t.support.iris=!0,t.fn.gradient=function(){var e=arguments;return this.each(function(){l?o.apply(this,e):t(this).css("backgroundImage",i.apply(this,e))})},t.fn.raninbowGradient=function(e,r){var i,o,n,s;for(e=e||"top",i=t.extend({},{s:100,l:50},r),o="hsl(%h%,"+i.s+"%,"+i.l+"%)",n=0,s=[];n<=360;)s.push(o.replace("%h%",n)),n+=30;return this.each(function(){t(this).gradient(e,s)})},f={options:{color:!1,mode:"hsl",controls:{horiz:"s",vert:"l",strip:"h"},hide:!0,border:!0,target:!1,width:200,palettes:!1},_color:"",_palettes:["#000","#fff","#d33","#d93","#ee2","#81d742","#1e73be","#8224e3"],_inited:!1,_defaultHSLControls:{horiz:"s",vert:"l",strip:"h"},_defaultHSVControls:{horiz:"h",vert:"v",strip:"s"},_scale:{h:360,s:100,l:100,v:100},_create:function(){var e=this,i=e.element,o=e.options.color||i.val();!1===u&&r(),i.is("input")?(e.options.target?e.picker=t(c).appendTo(e.options.target):e.picker=t(c).insertAfter(i),e._addInputListeners(i)):(i.append(c),e.picker=i.find(".iris-picker")),g?9===m?e.picker.addClass("iris-ie-9"):m<=8&&e.picker.addClass("iris-ie-lt9"):d.indexOf("compatible")<0&&d.indexOf("khtml")<0&&d.match(/mozilla/)&&e.picker.addClass("iris-mozilla"),e.options.palettes&&e._addPalettes(),e._color=new Color(o).setHSpace(e.options.mode),e.options.color=e._color.toString(),e.controls={square:e.picker.find(".iris-square"),squareDrag:e.picker.find(".iris-square-value"),horiz:e.picker.find(".iris-square-horiz"),vert:e.picker.find(".iris-square-vert"),strip:e.picker.find(".iris-strip"),stripSlider:e.picker.find(".iris-strip .iris-slider-offset")},"hsv"===e.options.mode&&e._has("l",e.options.controls)?e.options.controls=e._defaultHSVControls:"hsl"===e.options.mode&&e._has("v",e.options.controls)&&(e.options.controls=e._defaultHSLControls),e.hue=e._color.h(),e.options.hide&&e.picker.hide(),e.options.border&&e.picker.addClass("iris-border"),e._initControls(),e.active="external",e._dimensions(),e._change()},_has:function(e,r){var i=!1;return t.each(r,function(t,r){if(e===r)return i=!0,!1}),i},_addPalettes:function(){var e=t('<div class="iris-palette-container" />'),r=t('<a class="iris-palette" tabindex="0" />'),i=t.isArray(this.options.palettes)?this.options.palettes:this._palettes;this.picker.find(".iris-palette-container").length&&(e=this.picker.find(".iris-palette-container").detach().html("")),t.each(i,function(t,i){r.clone().data("color",i).css("backgroundColor",i).appendTo(e).height(10).width(10)}),this.picker.append(e)},_paint:function(){var t=this;t._paintDimension("top","strip"),t._paintDimension("top","vert"),t._paintDimension("left","horiz")},_paintDimension:function(t,e){var r,i=this,o=i._color,n=i.options.mode,s=i._getHSpaceColor(),a=i.controls[e],c=i.options.controls;if(e!==i.active&&("square"!==i.active||"strip"===e))switch(c[e]){case"h":if("hsv"===n){switch(s=o.clone(),e){case"horiz":s[c.vert](100);break;case"vert":s[c.horiz](100);break;case"strip":s.setHSpace("hsl")}r=s.toHsl()}else r="strip"===e?{s:s.s,l:s.l}:{s:100,l:s.l};a.raninbowGradient(t,r);break;case"s":"hsv"===n?"vert"===e?r=[o.clone().a(0).s(0).toCSS("rgba"),o.clone().a(1).s(0).toCSS("rgba")]:"strip"===e?r=[o.clone().s(100).toCSS("hsl"),o.clone().s(0).toCSS("hsl")]:"horiz"===e&&(r=["#fff","hsl("+s.h+",100%,50%)"]):r="vert"===e&&"h"===i.options.controls.horiz?["hsla(0, 0%, "+s.l+"%, 0)","hsla(0, 0%, "+s.l+"%, 1)"]:["hsl("+s.h+",0%,50%)","hsl("+s.h+",100%,50%)"],a.gradient(t,r);break;case"l":r="strip"===e?["hsl("+s.h+",100%,100%)","hsl("+s.h+", "+s.s+"%,50%)","hsl("+s.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],a.gradient(t,r);break;case"v":r="strip"===e?[o.clone().v(100).toCSS(),o.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],a.gradient(t,r)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_dimensions:function(e){var r,i,o,n,s=this,a=s.options,c=s.controls,l=c.square,u=s.picker.find(".iris-strip"),h="77.5%",p="12%",f=a.border?a.width-20:a.width,d=t.isArray(a.palettes)?a.palettes.length:s._palettes.length;if(e&&(l.css("width",""),u.css("width",""),s.picker.css({width:"",height:""})),h=f*(parseFloat(h)/100),p=f*(parseFloat(p)/100),r=a.border?h+20:h,l.width(h).height(h),u.height(h).width(p),s.picker.css({width:a.width,height:r}),!a.palettes)return s.picker.css("paddingBottom","");i=2*h/100,n=h-(d-1)*i,o=n/d,s.picker.find(".iris-palette").each(function(e){var r=0===e?0:i;t(this).css({width:o,height:o,marginLeft:r})}),s.picker.css("paddingBottom",o+i),u.height(o+i+h)},_addInputListeners:function(t){var e=this,r=function(r){var i=new Color(t.val()),o=t.val().replace(/^#/,"");t.removeClass("iris-error"),i.error?""!==o&&t.addClass("iris-error"):i.toString()!==e._color.toString()&&("keyup"===r.type&&o.match(/^[0-9a-fA-F]{3}$/)||e._setOption("color",i.toString()))};t.on("change",r).on("keyup",e._debounce(r,100)),e.options.hide&&t.one("focus",function(){e.show()})},_initControls:function(){var e=this,r=e.controls,i=r.square,o=e.options.controls,n=e._scale[o.strip];r.stripSlider.slider({orientation:"vertical",max:n,slide:function(t,r){e.active="strip","h"===o.strip&&(r.value=n-r.value),e._color[o.strip](r.value),e._change.apply(e,arguments)}}),r.squareDrag.draggable({containment:r.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(t,r){e._squareDrag(t,r)},start:function(){i.addClass("iris-dragging"),t(this).addClass("ui-state-focus")},stop:function(){i.removeClass("iris-dragging"),t(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(r){r.preventDefault(),"mousedown"===r.type?(e.picker.find(".ui-state-focus").removeClass("ui-state-focus").blur(),t(this).addClass("ui-state-focus").focus()):t(this).removeClass("ui-state-focus")}).on("keydown",function(t){var i=r.square,o=r.squareDrag,n=o.position(),s=e.options.width/100;switch(t.altKey&&(s*=10),t.keyCode){case 37:n.left-=s;break;case 38:n.top-=s;break;case 39:n.left+=s;break;case 40:n.top+=s;break;default:return!0}n.left=Math.max(0,Math.min(n.left,i.width())),n.top=Math.max(0,Math.min(n.top,i.height())),o.css(n),e._squareDrag(t,{position:n}),t.preventDefault()}),i.mousedown(function(r){var i,o;1===r.which&&t(r.target).is("div")&&(i=e.controls.square.offset(),o={top:r.pageY-i.top,left:r.pageX-i.left},r.preventDefault(),e._squareDrag(r,{position:o}),r.target=e.controls.squareDrag.get(0),e.controls.squareDrag.css(o).trigger(r))}),e.options.palettes&&e._paletteListeners()},_paletteListeners:function(){var e=this;e.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){e._color.fromCSS(t(this).data("color")),e.active="external",e._change()}).on("keydown.palette",".iris-palette",function(e){if(13!==e.keyCode&&32!==e.keyCode)return!0;e.stopPropagation(),t(this).click()})},_squareDrag:function(t,e){var r=this,i=r.options.controls,o=r._squareDimensions(),n=Math.round((o.h-e.position.top)/o.h*r._scale[i.vert]),s=r._scale[i.horiz]-Math.round((o.w-e.position.left)/o.w*r._scale[i.horiz]);r._color[i.horiz](s)[i.vert](n),r.active="square",r._change.apply(r,arguments)},_setOption:function(e,r){var i,o,n=this,s=n.options[e],a=!1;switch(n.options[e]=r,e){case"color":r=""+r,r.replace(/^#/,""),i=new Color(r).setHSpace(n.options.mode),i.error?n.options[e]=s:(n._color=i,n.options.color=n.options[e]=n._color.toString(),n.active="external",n._change());break;case"palettes":a=!0,r?n._addPalettes():n.picker.find(".iris-palette-container").remove(),s||n._paletteListeners();break;case"width":a=!0;break;case"border":a=!0,o=r?"addClass":"removeClass",n.picker[o]("iris-border");break;case"mode":case"controls":if(s===r)return;return o=n.element,s=n.options,s.hide=!n.picker.is(":visible"),n.destroy(),n.picker.remove(),t(n.element).iris(s)}a&&n._dimensions(!0)},_squareDimensions:function(t){var e,r=this.controls.square;return void 0!==t&&r.data("dimensions")?r.data("dimensions"):(this.controls.squareDrag,e={w:r.width(),h:r.height()},r.data("dimensions",e),e)},_isNonHueControl:function(t,e){return"square"===t&&"h"===this.options.controls.strip||"external"!==e&&("h"!==e||"strip"!==t)},_change:function(){var e=this,r=e.controls,i=e._getHSpaceColor(),o=["square","strip"],n=e.options.controls,s=n[e.active]||"external",a=e.hue;"strip"===e.active?o=[]:"external"!==e.active&&o.pop(),t.each(o,function(t,o){var s,a,c;if(o!==e.active)switch(o){case"strip":s="h"===n.strip?e._scale[n.strip]-i[n.strip]:i[n.strip],r.stripSlider.slider("value",s);break;case"square":a=e._squareDimensions(),c={
2
- left:i[n.horiz]/e._scale[n.horiz]*a.w,top:a.h-i[n.vert]/e._scale[n.vert]*a.h},e.controls.squareDrag.css(c)}}),i.h!==a&&e._isNonHueControl(e.active,s)&&e._color.h(a),e.hue=e._color.h(),e.options.color=e._color.toString(),e._inited&&e._trigger("change",{type:e.active},{color:e._color}),e.element.is(":input")&&!e._color.error&&(e.element.removeClass("iris-error"),e.element.val()!==e._color.toString()&&e.element.val(e._color.toString())),e._paint(),e._inited=!0,e.active=!1},_debounce:function(t,e,r){var i,o;return function(){var n,s,a=this,c=arguments;return n=function(){i=null,r||(o=t.apply(a,c))},s=r&&!i,clearTimeout(i),i=setTimeout(n,e),s&&(o=t.apply(a,c)),o}},show:function(){this.picker.show()},hide:function(){this.picker.hide()},toggle:function(){this.picker.toggle()},color:function(t){return!0===t?this._color.clone():void 0===t?this._color.toString():void this.option("color",t)}},t.widget("a8c.iris",f),t('<style id="iris-css">'+p+"</style>").appendTo("head")}(jQuery),function(t,e){var r=function(t,e){return this instanceof r?this._init(t,e):new r(t,e)};r.fn=r.prototype={_color:0,_alpha:1,error:!1,_hsl:{h:0,s:0,l:0},_hsv:{h:0,s:0,v:0},_hSpace:"hsl",_init:function(t){var r="noop";switch(typeof t){case"object":return t.a!==e&&this.a(t.a),r=t.r!==e?"fromRgb":t.l!==e?"fromHsl":t.v!==e?"fromHsv":r,this[r](t);case"string":return this.fromCSS(t);case"number":return this.fromInt(parseInt(t,10))}return this},_error:function(){return this.error=!0,this},clone:function(){for(var t=new r(this.toInt()),e=["_alpha","_hSpace","_hsl","_hsv","error"],i=e.length-1;i>=0;i--)t[e[i]]=this[e[i]];return t},setHSpace:function(t){return this._hSpace="hsv"===t?t:"hsl",this},noop:function(){return this},fromCSS:function(t){var e,r=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,t=t.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,""),t.match(r)&&t.match(/\)$/)){if(e=t.replace(/(\s|%)/g,"").replace(r,"").replace(/,?\);?$/,"").split(","),e.length<3)return this._error();if(4===e.length&&(this.a(parseFloat(e.pop())),this.error))return this;for(var i=e.length-1;i>=0;i--)if(e[i]=parseInt(e[i],10),isNaN(e[i]))return this._error();return t.match(/^rgb/)?this.fromRgb({r:e[0],g:e[1],b:e[2]}):t.match(/^hsv/)?this.fromHsv({h:e[0],s:e[1],v:e[2]}):this.fromHsl({h:e[0],s:e[1],l:e[2]})}return this.fromHex(t)},fromRgb:function(t,r){return"object"!=typeof t||t.r===e||t.g===e||t.b===e?this._error():(this.error=!1,this.fromInt(parseInt((t.r<<16)+(t.g<<8)+t.b,10),r))},fromHex:function(t){return t=t.replace(/^#/,"").replace(/^0x/,""),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),this.error=!/^[0-9A-F]{6}$/i.test(t),this.fromInt(parseInt(t,16))},fromHsl:function(t){var r,i,o,n,s,a,c,l;return"object"!=typeof t||t.h===e||t.s===e||t.l===e?this._error():(this._hsl=t,this._hSpace="hsl",a=t.h/360,c=t.s/100,l=t.l/100,0===c?r=i=o=l:(n=l<.5?l*(1+c):l+c-l*c,s=2*l-n,r=this.hue2rgb(s,n,a+1/3),i=this.hue2rgb(s,n,a),o=this.hue2rgb(s,n,a-1/3)),this.fromRgb({r:255*r,g:255*i,b:255*o},!0))},fromHsv:function(t){var r,i,o,n,s,a,c,l,u,h,p;if("object"!=typeof t||t.h===e||t.s===e||t.v===e)return this._error();switch(this._hsv=t,this._hSpace="hsv",r=t.h/360,i=t.s/100,o=t.v/100,c=Math.floor(6*r),l=6*r-c,u=o*(1-i),h=o*(1-l*i),p=o*(1-(1-l)*i),c%6){case 0:n=o,s=p,a=u;break;case 1:n=h,s=o,a=u;break;case 2:n=u,s=o,a=p;break;case 3:n=u,s=h,a=o;break;case 4:n=p,s=u,a=o;break;case 5:n=o,s=u,a=h}return this.fromRgb({r:255*n,g:255*s,b:255*a},!0)},fromInt:function(t,r){return this._color=parseInt(t,10),isNaN(this._color)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),r===e&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t},toString:function(){var t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var e=6-t.length-1;e>=0;e--)t="0"+t;return"#"+t},toCSS:function(t,e){switch(t=t||"hex",e=parseFloat(e||this._alpha),t){case"rgb":case"rgba":var r=this.toRgb();return e<1?"rgba( "+r.r+", "+r.g+", "+r.b+", "+e+" )":"rgb( "+r.r+", "+r.g+", "+r.b+" )";case"hsl":case"hsla":var i=this.toHsl();return e<1?"hsla( "+i.h+", "+i.s+"%, "+i.l+"%, "+e+" )":"hsl( "+i.h+", "+i.s+"%, "+i.l+"% )";default:return this.toString()}},toRgb:function(){return{r:255&this._color>>16,g:255&this._color>>8,b:255&this._color}},toHsl:function(){var t,e,r=this.toRgb(),i=r.r/255,o=r.g/255,n=r.b/255,s=Math.max(i,o,n),a=Math.min(i,o,n),c=(s+a)/2;if(s===a)t=e=0;else{var l=s-a;switch(e=c>.5?l/(2-s-a):l/(s+a),s){case i:t=(o-n)/l+(o<n?6:0);break;case o:t=(n-i)/l+2;break;case n:t=(i-o)/l+4}t/=6}return t=Math.round(360*t),0===t&&this._hsl.h!==t&&(t=this._hsl.h),e=Math.round(100*e),0===e&&this._hsl.s&&(e=this._hsl.s),{h:t,s:e,l:Math.round(100*c)}},toHsv:function(){var t,e,r=this.toRgb(),i=r.r/255,o=r.g/255,n=r.b/255,s=Math.max(i,o,n),a=Math.min(i,o,n),c=s,l=s-a;if(e=0===s?0:l/s,s===a)t=e=0;else{switch(s){case i:t=(o-n)/l+(o<n?6:0);break;case o:t=(n-i)/l+2;break;case n:t=(i-o)/l+4}t/=6}return t=Math.round(360*t),0===t&&this._hsv.h!==t&&(t=this._hsv.h),e=Math.round(100*e),0===e&&this._hsv.s&&(e=this._hsv.s),{h:t,s:e,v:Math.round(100*c)}},toInt:function(){return this._color},toIEOctoHex:function(){var t=this.toString(),e=parseInt(255*this._alpha,10).toString(16);return 1===e.length&&(e="0"+e),"#"+e+t.replace(/^#/,"")},toLuminosity:function(){var t=this.toRgb();return.2126*Math.pow(t.r/255,2.2)+.7152*Math.pow(t.g/255,2.2)+.0722*Math.pow(t.b/255,2.2)},getDistanceLuminosityFrom:function(t){if(!(t instanceof r))throw"getDistanceLuminosityFrom requires a Color object";var e=this.toLuminosity(),i=t.toLuminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},getMaxContrastColor:function(){var t=this.toLuminosity();return new r(t>=.5?"000000":"ffffff")},getReadableContrastingColor:function(t,i){if(!t instanceof r)return this;var o=i===e?5:i,n=t.getDistanceLuminosityFrom(this),s=t.getMaxContrastColor();if(s.getDistanceLuminosityFrom(t)<=o)return s;if(n>=o)return this;for(var a=0===s.toInt()?-1:1;n<o&&(this.l(a,!0),n=this.getDistanceLuminosityFrom(t),0!==this._color&&16777215!==this._color););return this},a:function(t){if(t===e)return this._alpha;var r=parseFloat(t);return isNaN(r)?this._error():(this._alpha=r,this)},darken:function(t){return t=t||5,this.l(-t,!0)},lighten:function(t){return t=t||5,this.l(t,!0)},saturate:function(t){return t=t||15,this.s(t,!0)},desaturate:function(t){return t=t||15,this.s(-t,!0)},toGrayscale:function(){return this.setHSpace("hsl").s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(t){t=t||1;var e=180+30*t;return this.h(e,!0)},getAnalog:function(t){t=t||1;var e=30*t;return this.h(e,!0)},getTetrad:function(t){t=t||1;var e=60*t;return this.h(e,!0)},getTriad:function(t){t=t||1;var e=120*t;return this.h(e,!0)},_partial:function(t){var r=i[t];return function(i,o){var n=this._spaceFunc("to",r.space);return i===e?n[t]:(!0===o&&(i=n[t]+i),r.mod&&(i%=r.mod),r.range&&(i=i<r.range[0]?r.range[0]:i>r.range[1]?r.range[1]:i),n[t]=i,this._spaceFunc("from",r.space,n))}},_spaceFunc:function(t,e,r){var i=e||this._hSpace;return this[t+i.charAt(0).toUpperCase()+i.substr(1)](r)}};var i={h:{mod:360},s:{range:[0,100]},l:{space:"hsl",range:[0,100]},v:{space:"hsv",range:[0,100]},r:{space:"rgb",range:[0,255]},g:{space:"rgb",range:[0,255]},b:{space:"rgb",range:[0,255]}};for(var o in i)i.hasOwnProperty(o)&&(r.fn[o]=r.fn._partial(o));"object"==typeof exports?module.exports=r:t.Color=r}(this),function(t){var e={common:{init:function(){t(document).on("keyup","input[name=moove_gdpr_company_logo]",function(){console.log("changed"),t(".moove_gdpr_company_logo_holder").css("background-image","url("+t(this).val()+")")}),t(document).on("change",'input[name="moove_gdpr_plugin_font_type"]',function(){"1"===t(this).val()||"2"===t(this).val()?t("#moove_gdpr_plugin_font_family").addClass("moove-not-visible"):t("#moove_gdpr_plugin_font_family").removeClass("moove-not-visible")}),t(".iris-colorpicker").each(function(){t(this).iris({width:300,hide:!0,change:function(e,r){t(this).css("background",r.color.toString())}}).on("click",function(){t(this).iris("toggle")}),t(this).iris("color",t(this).val())}),t(document).on("click",".iris-selectbtn",function(){t(this).parent().find(".iris-colorpicker").iris("toggle")}),t(document).on("click",".iris-picker:visible",function(){t(".iris-colorpicker").iris("hide")}),t(document).on("click",'#moove_gdpr_tab_advanced_cookies button[type="submit"]',function(e){var r=0,i=0;if("1"===t('input[name="moove_gdpr_advanced_cookies_enable"]:checked').val()&&(t(this).closest("form").find("textarea.large-text.code").each(function(){t.trim(t(this).val())||r++,i++}),i-r<1)){e.preventDefault();var o=t(this).closest("form").find(".form-table").addClass("moove-gdpr-form-error").find(".alert.script-error").show();t("html, body").animate({scrollTop:o.offset().top-100},200)}}),t(document).on("click",'#moove_gdpr_tab_third_party_cookies button[type="submit"]',function(e){var r=0,i=0;if("1"===t('input[name="moove_gdpr_third_party_cookies_enable"]:checked').val()&&(t(this).closest("form").find("textarea.large-text.code").each(function(){t.trim(t(this).val())||r++,i++}),i-r<1)){e.preventDefault();var o=t(this).closest("form").find(".form-table").addClass("moove-gdpr-form-error").find(".alert.script-error").show();t("html, body").animate({scrollTop:o.offset().top-100},200)}})},finalize:function(){}},home:{init:function(){},finalize:function(){}},about_us:{init:function(){}}},r={fire:function(t,r,i){var o,n=e;r=void 0===r?"init":r,o=""!==t,o=o&&n[t],(o=o&&"function"==typeof n[t][r])&&n[t][r](i)},loadEvents:function(){r.fire("common"),t.each(document.body.className.replace(/-/g,"_").split(/\s+/),function(t,e){r.fire(e),r.fire(e,"finalize")}),r.fire("common","finalize")}};t(document).ready(r.loadEvents)}(jQuery);
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.postscribe=e():t.postscribe=e()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var o=r[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var i=r(1),o=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=o.default},function(t,e,r){"use strict";function i(){}function o(){var t=d.shift();if(t){var e=p.last(t);e.afterDequeue(),t.stream=n.apply(void 0,t),e.afterStreamStart()}}function n(t,e,r){function n(t){t=r.beforeWrite(t),g.write(t),r.afterWrite(t)}g=new l.default(t,r),g.id=f++,g.name=r.name||g.id,s.streams[g.name]=g;var c=t.ownerDocument,u={close:c.close,open:c.open,write:c.write,writeln:c.writeln};a(c,{close:i,open:i,write:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return n(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return n(e.join("")+"\n")}});var p=g.win.onerror||i;return g.win.onerror=function(t,e,i){r.error({msg:t+" - "+e+": "+i}),p.apply(g.win,[t,e,i])},g.write(e,function(){a(c,u),g.win.onerror=p,r.done(),g=null,o()}),g}function s(t,e,r){if(p.isFunction(r))r={done:r};else if("clear"===r)return d=[],g=null,void(f=0);r=p.defaults(r,h),t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t;var n=[t,e,r];return t.postscribe={cancel:function(){n.stream?n.stream.abort():n[1]=i}},r.beforeEnqueue(n),d.push(n),g||o(),t.postscribe}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t};e.default=s;var c=r(2),l=function(t){return t&&t.__esModule?t:{default:t}}(c),u=r(4),p=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(u),h={afterAsync:i,afterDequeue:i,afterStreamStart:i,afterWrite:i,autoFix:!0,beforeEnqueue:i,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:i,error:function(t){throw new Error(t.msg)},releaseAsync:!1},f=0,d=[],g=null;a(s,{streams:{},queue:d,WriteStream:l.default})},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){var r=p+e,i=t.getAttribute(r);return u.existy(i)?String(i):i}function n(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=p+e;u.existy(r)&&""!==r?t.setAttribute(i,r):t.removeAttribute(i)}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},a=r(3),c=function(t){return t&&t.__esModule?t:{default:t}}(a),l=r(4),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(l),p="data-ps-",h="ps-style",f="ps-script",d=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.root=e,this.options=r,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new c.default("",{autoFix:r.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],n(this.proxyRoot,"proxyof",0)}return t.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();u.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},t.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},t.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,r=void 0,i=void 0,o=[];(e=this.parser.readToken())&&!(r=u.isScript(e))&&!(i=u.isStyle(e));)(e=this.options.beforeWriteToken(e))&&o.push(e);o.length>0&&this._writeStaticTokens(o),r&&this._handleScriptToken(e),i&&this._handleStyleToken(e)},t.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},t.prototype._buildChunk=function(t){for(var e=this.actuals.length,r=[],i=[],o=[],n=t.length,s=0;s<n;s++){var a=t[s],c=a.toString();if(r.push(c),a.attrs){if(!/^noscript$/i.test(a.tagName)){var l=e++;i.push(c.replace(/(\/?>)/," "+p+"id="+l+" $1")),a.attrs.id!==f&&a.attrs.id!==h&&o.push("atomicTag"===a.type?"":"<"+a.tagName+" "+p+"proxyof="+l+(a.unary?" />":">"))}}else i.push(c),o.push("endTag"===a.type?c:"")}return{tokens:t,raw:r.join(""),actual:i.join(""),proxy:o.join("")}},t.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];u.existy(t=e.shift());){var r=1===t.nodeType;if(!(r&&o(t,"proxyof"))){r&&(this.actuals[o(t,"id")]=t,n(t,"id"));var i=t.parentNode&&o(t.parentNode,"proxyof");i&&this.actuals[i].appendChild(t)}e.unshift.apply(e,u.toArray(t.childNodes))}},t.prototype._handleScriptToken=function(t){var e=this,r=this.parser.clear();r&&this.writeQueue.unshift(r),t.src=t.attrs.src||t.attrs.SRC,(t=this.options.beforeWriteToken(t))&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},t.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",t=this.options.beforeWriteToken(t),t&&this._writeStyleToken(t),e&&this.write()},t.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,h),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},t.prototype._buildStyle=function(t){var e=this.doc.createElement(t.tagName);return e.setAttribute("type",t.type),u.eachKey(t.attrs,function(t,r){e.setAttribute(t,r)}),e},t.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var r=this.doc.getElementById(e);r&&r.parentNode.replaceChild(t,r)},t.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},t.prototype._onScriptDone=function(t){return t!==this.scriptStack[0]?void this.options.error({msg:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},t.prototype._writeScriptToken=function(t,e){var r=this._buildScript(t),i=this._shouldRelease(r),o=this.options.afterAsync;t.src&&(r.src=t.src,this._scriptLoadHandler(r,i?o:function(){e(),o()}));try{this._insertCursor(r,f),r.src&&!i||e()}catch(t){this.options.error(t),e()}},t.prototype._buildScript=function(t){var e=this.doc.createElement(t.tagName);return u.eachKey(t.attrs,function(t,r){e.setAttribute(t,r)}),t.content&&(e.text=t.content),e},t.prototype._scriptLoadHandler=function(t,e){function r(){t=t.onload=t.onreadystatechange=t.onerror=null}function i(){r(),null!=e&&e(),e=null}function o(t){r(),a(t),null!=e&&e(),e=null}function n(t,e){var r=t["on"+e];null!=r&&(t["_on"+e]=r)}var a=this.options.error;n(t,"load"),n(t,"error"),s(t,{onload:function(){if(t._onload)try{t._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){o({msg:"onload handler failed "+e+" @ "+t.src})}i()},onerror:function(){if(t._onerror)try{t._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){return void o({msg:"onerror handler failed "+e+" @ "+t.src})}o({msg:"remote script failed "+t.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(t.readyState)&&i()}})},t.prototype._shouldRelease=function(t){return!/^script$/i.test(t.nodeName)||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},t}();e.default=d},function(t,e,r){!function(e,r){t.exports=function(){return function(t){function e(i){if(r[i])return r[i].exports;var o=r[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var i=r(1),o=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=o.default},function(t,e,r){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=r(2),s=i(n),a=r(3),c=i(a),l=r(6),u=function(t){return t&&t.__esModule?t:{default:t}}(l),p=r(5),h={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},f=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,t),this.stream=r;var n=!1,a={};for(var c in s)s.hasOwnProperty(c)&&(i.autoFix&&(a[c+"Fix"]=!0),n=n||a[c+"Fix"]);n?(this._readToken=(0,u.default)(this,a,function(){return e._readTokenImpl()}),this._peekToken=(0,u.default)(this,a,function(){return e._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return t.prototype.append=function(t){this.stream+=t},t.prototype.prepend=function(t){this.stream=t+this.stream},t.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},t.prototype._peekTokenImpl=function(){for(var t in h)if(h.hasOwnProperty(t)&&h[t].test(this.stream)){var e=c[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},t.prototype.peekToken=function(){return this._peekToken()},t.prototype.readToken=function(){return this._readToken()},t.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&!1===t[e.type](e))return},t.prototype.clear=function(){var t=this.stream;return this.stream="",t},t.prototype.rest=function(){return this.stream},t}();e.default=f,f.tokenToString=function(t){return t.toString()},f.escapeAttributes=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=(0,p.escapeQuotes)(t[r],null));return e},f.supports=s;for(var d in s)s.hasOwnProperty(d)&&(f.browserHasFlaw=f.browserHasFlaw||!s[d]&&d)},function(t,e){"use strict";e.__esModule=!0;var r=!1,i=!1,o=window.document.createElement("div");try{var n="<P><I></P></I>";o.innerHTML=n,e.tagSoup=r=o.innerHTML!==n}catch(t){e.tagSoup=r=!1}try{o.innerHTML="<P><i><P></P></i></P>",e.selfClose=i=2===o.childNodes.length}catch(t){e.selfClose=i=!1}o=null,e.tagSoup=r,e.selfClose=i},function(t,e,r){"use strict";function i(t){var e=t.indexOf("--\x3e");if(e>=0)return new l.CommentToken(t.substr(4,e-1),e+3)}function o(t){var e=t.indexOf("<");return new l.CharsToken(e>=0?e:t.length)}function n(t){if(-1!==t.indexOf(">")){var e=t.match(u.startTag);if(e){var r=function(){var t={},r={},i=e[2];return e[2].replace(u.attr,function(e,o){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(t[arguments[5]]="",r[arguments[5]]=!0):t[o]=arguments[2]||arguments[3]||arguments[4]||u.fillAttr.test(o)&&o||"":t[o]="",i=i.replace(e,"")}),{v:new l.StartTagToken(e[1],e[0].length,t,r,!!e[3],i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===(void 0===r?"undefined":c(r)))return r.v}}}function s(t){var e=n(t);if(e){var r=t.slice(e.length);if(r.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var i=r.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(i)return new l.AtomicTagToken(e.tagName,i[0].length+e.length,e.attrs,e.booleanAttrs,i[1])}}}function a(t){var e=t.match(u.endTag);if(e)return new l.EndTagToken(e[1],e[0].length)}e.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=i,e.chars=o,e.startTag=n,e.atomicTag=s,e.endTag=a;var l=r(4),u={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var o=r(5),n=(e.Token=function t(e,r){i(this,t),this.type=e,this.length=r,this.text=""},e.CommentToken=function(){function t(e,r){i(this,t),this.type="comment",this.length=r||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"\x3c!--"+this.content},t}(),e.CharsToken=function(){function t(e){i(this,t),this.type="chars",this.length=e,this.text=""}return t.prototype.toString=function(){return this.text},t}(),e.TagToken=function(){function t(e,r,o,n,s){i(this,t),this.type=e,this.length=o,this.text="",this.tagName=r,this.attrs=n,this.booleanAttrs=s,this.unary=!1,this.html5Unary=!1}return t.formatTag=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r="<"+t.tagName;for(var i in t.attrs)if(t.attrs.hasOwnProperty(i)){r+=" "+i;var n=t.attrs[i];void 0!==t.booleanAttrs&&void 0!==t.booleanAttrs[i]||(r+='="'+(0,o.escapeQuotes)(n)+'"')}return t.rest&&(r+=" "+t.rest),r+=t.unary&&!t.html5Unary?"/>":">",void 0!==e&&null!==e&&(r+=e+"</"+t.tagName+">"),r},t}());e.StartTagToken=function(){function t(e,r,o,n,s,a){i(this,t),this.type="startTag",this.length=r,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=n,this.html5Unary=!1,this.unary=s,this.rest=a}return t.prototype.toString=function(){return n.formatTag(this)},t}(),e.AtomicTagToken=function(){function t(e,r,o,n,s){i(this,t),this.type="atomicTag",this.length=r,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=n,this.unary=!1,this.html5Unary=!1,this.content=s}return t.prototype.toString=function(){return n.formatTag(this,this.content)},t}(),e.EndTagToken=function(){function t(e,r){i(this,t),this.type="endTag",this.length=r,this.text="",this.tagName=e}return t.prototype.toString=function(){return"</"+this.tagName+">"},t}()},function(t,e){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}e.__esModule=!0,e.escapeQuotes=r},function(t,e){"use strict";function r(t){return t&&"startTag"===t.type&&(t.unary=a.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function i(t,e){var i=t.stream,o=r(e());return t.stream=i,o}function o(t,e){var r=e.pop();t.prepend("</"+r.tagName+">")}function n(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,r=0;e=this[r];r++)if(e.tagName===t)return!0;return!1},t}function s(t,e,s){function a(){var e=i(t,s);e&&u[e.type]&&u[e.type](e)}var l=n(),u={startTag:function(r){var i=r.tagName;"TR"===i.toUpperCase()&&l.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),a()):e.selfCloseFix&&c.test(i)&&l.containsTagName(i)?l.lastTagNameEq(i)?o(t,l):(t.prepend("</"+r.tagName+">"),a()):r.unary||l.push(r)},endTag:function(r){l.last()?e.tagSoupFix&&!l.lastTagNameEq(r.tagName)?o(t,l):l.pop():e.tagSoupFix&&(s(),a())}};return function(){return a(),r(s())}}e.__esModule=!0,e.default=s;var a=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,c=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}])}()}()},function(t,e){"use strict";function r(t){return void 0!==t&&null!==t}function i(t){return"function"==typeof t}function o(t,e,r){var i=void 0,o=t&&t.length||0;for(i=0;i<o;i++)e.call(r,t[i],i)}function n(t,e,r){for(var i in t)t.hasOwnProperty(i)&&e.call(r,i,t[i])}function s(t,e){return t=t||{},n(e,function(e,i){r(t[e])||(t[e]=i)}),t}function a(t){try{return Array.prototype.slice.call(t)}catch(r){var e=function(){var e=[];return o(t,function(t){e.push(t)}),{v:e}}();if("object"===(void 0===e?"undefined":h(e)))return e.v}}function c(t){return t[t.length-1]}function l(t,e){return!(!t||"startTag"!==t.type&&"atomicTag"!==t.type||!("tagName"in t)||!~t.tagName.toLowerCase().indexOf(e))}function u(t){return l(t,"script")}function p(t){return l(t,"style")}e.__esModule=!0;var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.existy=r,e.isFunction=i,e.each=o,e.eachKey=n,e.defaults=s,e.toArray=a,e.last=c,e.isTag=l,e.isScript=u,e.isStyle=p}])}),function(t,e){function r(){var e,r;l?u="filter":(e=t('<div id="iris-gradtest" />'),r="linear-gradient(top,#fff,#000)",t.each(p,function(t,i){if(e.css("backgroundImage",i+r),e.css("backgroundImage").match("gradient"))return u=t,!1}),!1===u&&(e.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),e.css("backgroundImage").match("gradient")&&(u="webkit")),e.remove())}function i(e,r){return e="top"===e?"top":"left",r=t.isArray(r)?r:Array.prototype.slice.call(arguments,1),"webkit"===u?n(e,r):p[u]+"linear-gradient("+e+", "+r.join(", ")+")"}function o(e,r){var i,o,n,a,c,l,u,p,h;e="top"===e?"top":"left",r=t.isArray(r)?r:Array.prototype.slice.call(arguments,1),i="top"===e?0:1,o=t(this),n=r.length-1,a="filter",c=1===i?"left":"top",l=1===i?"right":"bottom",u=1===i?"height":"width",p='<div class="iris-ie-gradient-shim" style="position:absolute;'+u+":100%;"+c+":%start%;"+l+":%end%;"+a+':%filter%;" data-color:"%color%"></div>',h="","static"===o.css("position")&&o.css({position:"relative"}),r=s(r),t.each(r,function(t,e){var o,s,a;if(t===n)return!1;o=r[t+1],e.stop!==o.stop&&(s=100-parseFloat(o.stop)+"%",e.octoHex=new Color(e.color).toIEOctoHex(),o.octoHex=new Color(o.color).toIEOctoHex(),a="progid:DXImageTransform.Microsoft.Gradient(GradientType="+i+", StartColorStr='"+e.octoHex+"', EndColorStr='"+o.octoHex+"')",h+=p.replace("%start%",e.stop).replace("%end%",s).replace("%filter%",a))}),o.find(".iris-ie-gradient-shim").remove(),t(h).prependTo(o)}function n(e,r){var i=[];return e="top"===e?"0% 0%,0% 100%,":"0% 100%,100% 100%,",r=s(r),t.each(r,function(t,e){i.push("color-stop("+parseFloat(e.stop)/100+", "+e.color+")")}),"-webkit-gradient(linear,"+e+i.join(",")+")"}function s(e){var r=[],i=[],o=[],n=e.length-1;return t.each(e,function(t,e){var o=e,n=!1,s=e.match(/1?[0-9]{1,2}%$/);s&&(o=e.replace(/\s?1?[0-9]{1,2}%$/,""),n=s.shift()),r.push(o),i.push(n)}),!1===i[0]&&(i[0]="0%"),!1===i[n]&&(i[n]="100%"),i=a(i),t.each(i,function(t){o[t]={color:r[t],stop:i[t]}}),o}function a(e){var r,i,o,n,s=0,c=e.length-1,l=0,u=!1;if(e.length<=2||t.inArray(!1,e)<0)return e;for(;l<e.length-1;)u||!1!==e[l]?u&&!1!==e[l]&&(c=l,l=e.length):(s=l-1,u=!0),l++;for(i=c-s,n=parseInt(e[s].replace("%"),10),r=(parseFloat(e[c].replace("%"))-n)/i,l=s+1,o=1;l<c;)e[l]=n+o*r+"%",o++,l++;return a(e)}var c,l,u,p,h,f,d,g,v;if(c='<div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="#"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div>',h='.iris-picker{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input+.iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0;margin:0;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;border-radius:0}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}.iris-square-handle,.ui-slider-handle{border:0;outline:0}',d=navigator.userAgent.toLowerCase(),g="Microsoft Internet Explorer"===navigator.appName,v=g?parseFloat(d.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,l=g&&v<10,u=!1,p=["-moz-","-webkit-","-o-","-ms-"],l&&v<=7)return t.fn.iris=t.noop,void(t.support.iris=!1);t.support.iris=!0,t.fn.gradient=function(){var e=arguments;return this.each(function(){l?o.apply(this,e):t(this).css("backgroundImage",i.apply(this,e))})},t.fn.raninbowGradient=function(e,r){var i,o,n,s;for(e=e||"top",i=t.extend({},{s:100,l:50},r),o="hsl(%h%,"+i.s+"%,"+i.l+"%)",n=0,s=[];n<=360;)s.push(o.replace("%h%",n)),n+=30;return this.each(function(){t(this).gradient(e,s)})},f={options:{color:!1,mode:"hsl",controls:{horiz:"s",vert:"l",strip:"h"},hide:!0,border:!0,target:!1,width:200,palettes:!1},_color:"",_palettes:["#000","#fff","#d33","#d93","#ee2","#81d742","#1e73be","#8224e3"],_inited:!1,_defaultHSLControls:{horiz:"s",vert:"l",strip:"h"},_defaultHSVControls:{horiz:"h",vert:"v",strip:"s"},_scale:{h:360,s:100,l:100,v:100},_create:function(){var e=this,i=e.element,o=e.options.color||i.val();!1===u&&r(),i.is("input")?(e.options.target?e.picker=t(c).appendTo(e.options.target):e.picker=t(c).insertAfter(i),e._addInputListeners(i)):(i.append(c),e.picker=i.find(".iris-picker")),g?9===v?e.picker.addClass("iris-ie-9"):v<=8&&e.picker.addClass("iris-ie-lt9"):d.indexOf("compatible")<0&&d.indexOf("khtml")<0&&d.match(/mozilla/)&&e.picker.addClass("iris-mozilla"),e.options.palettes&&e._addPalettes(),e._color=new Color(o).setHSpace(e.options.mode),e.options.color=e._color.toString(),e.controls={square:e.picker.find(".iris-square"),squareDrag:e.picker.find(".iris-square-value"),horiz:e.picker.find(".iris-square-horiz"),vert:e.picker.find(".iris-square-vert"),strip:e.picker.find(".iris-strip"),stripSlider:e.picker.find(".iris-strip .iris-slider-offset")},"hsv"===e.options.mode&&e._has("l",e.options.controls)?e.options.controls=e._defaultHSVControls:"hsl"===e.options.mode&&e._has("v",e.options.controls)&&(e.options.controls=e._defaultHSLControls),e.hue=e._color.h(),e.options.hide&&e.picker.hide(),e.options.border&&e.picker.addClass("iris-border"),e._initControls(),e.active="external",e._dimensions(),e._change()},_has:function(e,r){var i=!1;return t.each(r,function(t,r){if(e===r)return i=!0,!1}),i},_addPalettes:function(){var e=t('<div class="iris-palette-container" />'),r=t('<a class="iris-palette" tabindex="0" />'),i=t.isArray(this.options.palettes)?this.options.palettes:this._palettes;this.picker.find(".iris-palette-container").length&&(e=this.picker.find(".iris-palette-container").detach().html("")),t.each(i,function(t,i){r.clone().data("color",i).css("backgroundColor",i).appendTo(e).height(10).width(10)}),this.picker.append(e)},_paint:function(){var t=this;t._paintDimension("top","strip"),t._paintDimension("top","vert"),t._paintDimension("left","horiz")},_paintDimension:function(t,e){var r,i=this,o=i._color,n=i.options.mode,s=i._getHSpaceColor(),a=i.controls[e],c=i.options.controls;if(e!==i.active&&("square"!==i.active||"strip"===e))switch(c[e]){case"h":if("hsv"===n){switch(s=o.clone(),e){case"horiz":s[c.vert](100);break;case"vert":s[c.horiz](100);break;case"strip":s.setHSpace("hsl")}r=s.toHsl()}else r="strip"===e?{s:s.s,l:s.l}:{s:100,l:s.l};a.raninbowGradient(t,r);break;case"s":"hsv"===n?"vert"===e?r=[o.clone().a(0).s(0).toCSS("rgba"),o.clone().a(1).s(0).toCSS("rgba")]:"strip"===e?r=[o.clone().s(100).toCSS("hsl"),o.clone().s(0).toCSS("hsl")]:"horiz"===e&&(r=["#fff","hsl("+s.h+",100%,50%)"]):r="vert"===e&&"h"===i.options.controls.horiz?["hsla(0, 0%, "+s.l+"%, 0)","hsla(0, 0%, "+s.l+"%, 1)"]:["hsl("+s.h+",0%,50%)","hsl("+s.h+",100%,50%)"],a.gradient(t,r);break;case"l":r="strip"===e?["hsl("+s.h+",100%,100%)","hsl("+s.h+", "+s.s+"%,50%)","hsl("+s.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],a.gradient(t,r);break;case"v":r="strip"===e?[o.clone().v(100).toCSS(),o.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],a.gradient(t,r)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_dimensions:function(e){var r,i,o,n,s=this,a=s.options,c=s.controls,l=c.square,u=s.picker.find(".iris-strip"),p="77.5%",h="12%",f=a.border?a.width-20:a.width,d=t.isArray(a.palettes)?a.palettes.length:s._palettes.length;if(e&&(l.css("width",""),u.css("width",""),s.picker.css({width:"",height:""})),p=f*(parseFloat(p)/100),h=f*(parseFloat(h)/100),r=a.border?p+20:p,l.width(p).height(p),u.height(p).width(h),s.picker.css({width:a.width,height:r}),!a.palettes)return s.picker.css("paddingBottom","");i=2*p/100,n=p-(d-1)*i,o=n/d,s.picker.find(".iris-palette").each(function(e){var r=0===e?0:i;t(this).css({width:o,height:o,marginLeft:r})}),s.picker.css("paddingBottom",o+i),u.height(o+i+p)},_addInputListeners:function(t){var e=this,r=function(r){var i=new Color(t.val()),o=t.val().replace(/^#/,"");t.removeClass("iris-error"),i.error?""!==o&&t.addClass("iris-error"):i.toString()!==e._color.toString()&&("keyup"===r.type&&o.match(/^[0-9a-fA-F]{3}$/)||e._setOption("color",i.toString()))};t.on("change",r).on("keyup",e._debounce(r,100)),e.options.hide&&t.one("focus",function(){e.show()})},_initControls:function(){var e=this,r=e.controls,i=r.square,o=e.options.controls,n=e._scale[o.strip];r.stripSlider.slider({orientation:"vertical",max:n,slide:function(t,r){e.active="strip","h"===o.strip&&(r.value=n-r.value),e._color[o.strip](r.value),e._change.apply(e,arguments)}}),r.squareDrag.draggable({containment:r.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(t,r){e._squareDrag(t,r)},start:function(){i.addClass("iris-dragging"),t(this).addClass("ui-state-focus")},stop:function(){i.removeClass("iris-dragging"),t(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(r){r.preventDefault(),"mousedown"===r.type?(e.picker.find(".ui-state-focus").removeClass("ui-state-focus").blur(),t(this).addClass("ui-state-focus").focus()):t(this).removeClass("ui-state-focus")}).on("keydown",function(t){var i=r.square,o=r.squareDrag,n=o.position(),s=e.options.width/100;switch(t.altKey&&(s*=10),t.keyCode){case 37:n.left-=s;break;case 38:n.top-=s;break;case 39:n.left+=s;break;case 40:n.top+=s;break;default:return!0}n.left=Math.max(0,Math.min(n.left,i.width())),n.top=Math.max(0,Math.min(n.top,i.height())),o.css(n),e._squareDrag(t,{position:n}),t.preventDefault()}),i.mousedown(function(r){var i,o;1===r.which&&t(r.target).is("div")&&(i=e.controls.square.offset(),o={top:r.pageY-i.top,left:r.pageX-i.left},r.preventDefault(),e._squareDrag(r,{position:o}),r.target=e.controls.squareDrag.get(0),e.controls.squareDrag.css(o).trigger(r))}),e.options.palettes&&e._paletteListeners()},_paletteListeners:function(){var e=this;e.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){e._color.fromCSS(t(this).data("color")),e.active="external",e._change()}).on("keydown.palette",".iris-palette",function(e){if(13!==e.keyCode&&32!==e.keyCode)return!0;e.stopPropagation(),t(this).click()})},_squareDrag:function(t,e){var r=this,i=r.options.controls,o=r._squareDimensions(),n=Math.round((o.h-e.position.top)/o.h*r._scale[i.vert]),s=r._scale[i.horiz]-Math.round((o.w-e.position.left)/o.w*r._scale[i.horiz]);r._color[i.horiz](s)[i.vert](n),r.active="square",r._change.apply(r,arguments)},_setOption:function(e,r){var i,o,n=this,s=n.options[e],a=!1;switch(n.options[e]=r,e){case"color":r=""+r,r.replace(/^#/,""),i=new Color(r).setHSpace(n.options.mode),i.error?n.options[e]=s:(n._color=i,n.options.color=n.options[e]=n._color.toString(),n.active="external",n._change());break;case"palettes":a=!0,r?n._addPalettes():n.picker.find(".iris-palette-container").remove(),s||n._paletteListeners();break;case"width":a=!0;break;case"border":a=!0,o=r?"addClass":"removeClass",n.picker[o]("iris-border");break;case"mode":case"controls":if(s===r)return;return o=n.element,s=n.options,s.hide=!n.picker.is(":visible"),n.destroy(),n.picker.remove(),t(n.element).iris(s)}a&&n._dimensions(!0)},_squareDimensions:function(t){var e,r=this.controls.square;return void 0!==t&&r.data("dimensions")?r.data("dimensions"):(this.controls.squareDrag,e={w:r.width(),h:r.height()},r.data("dimensions",e),e)},_isNonHueControl:function(t,e){return"square"===t&&"h"===this.options.controls.strip||"external"!==e&&("h"!==e||"strip"!==t)},_change:function(){var e=this,r=e.controls,i=e._getHSpaceColor(),o=["square","strip"],n=e.options.controls,s=n[e.active]||"external",a=e.hue;"strip"===e.active?o=[]:"external"!==e.active&&o.pop(),t.each(o,function(t,o){var s,a,c;if(o!==e.active)switch(o){case"strip":s="h"===n.strip?e._scale[n.strip]-i[n.strip]:i[n.strip],r.stripSlider.slider("value",s);break;case"square":a=e._squareDimensions(),c={
2
+ left:i[n.horiz]/e._scale[n.horiz]*a.w,top:a.h-i[n.vert]/e._scale[n.vert]*a.h},e.controls.squareDrag.css(c)}}),i.h!==a&&e._isNonHueControl(e.active,s)&&e._color.h(a),e.hue=e._color.h(),e.options.color=e._color.toString(),e._inited&&e._trigger("change",{type:e.active},{color:e._color}),e.element.is(":input")&&!e._color.error&&(e.element.removeClass("iris-error"),e.element.val()!==e._color.toString()&&e.element.val(e._color.toString())),e._paint(),e._inited=!0,e.active=!1},_debounce:function(t,e,r){var i,o;return function(){var n,s,a=this,c=arguments;return n=function(){i=null,r||(o=t.apply(a,c))},s=r&&!i,clearTimeout(i),i=setTimeout(n,e),s&&(o=t.apply(a,c)),o}},show:function(){this.picker.show()},hide:function(){this.picker.hide()},toggle:function(){this.picker.toggle()},color:function(t){return!0===t?this._color.clone():void 0===t?this._color.toString():void this.option("color",t)}},t.widget("a8c.iris",f),t('<style id="iris-css">'+h+"</style>").appendTo("head")}(jQuery),function(t,e){var r=function(t,e){return this instanceof r?this._init(t,e):new r(t,e)};r.fn=r.prototype={_color:0,_alpha:1,error:!1,_hsl:{h:0,s:0,l:0},_hsv:{h:0,s:0,v:0},_hSpace:"hsl",_init:function(t){var r="noop";switch(typeof t){case"object":return t.a!==e&&this.a(t.a),r=t.r!==e?"fromRgb":t.l!==e?"fromHsl":t.v!==e?"fromHsv":r,this[r](t);case"string":return this.fromCSS(t);case"number":return this.fromInt(parseInt(t,10))}return this},_error:function(){return this.error=!0,this},clone:function(){for(var t=new r(this.toInt()),e=["_alpha","_hSpace","_hsl","_hsv","error"],i=e.length-1;i>=0;i--)t[e[i]]=this[e[i]];return t},setHSpace:function(t){return this._hSpace="hsv"===t?t:"hsl",this},noop:function(){return this},fromCSS:function(t){var e,r=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,t=t.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,""),t.match(r)&&t.match(/\)$/)){if(e=t.replace(/(\s|%)/g,"").replace(r,"").replace(/,?\);?$/,"").split(","),e.length<3)return this._error();if(4===e.length&&(this.a(parseFloat(e.pop())),this.error))return this;for(var i=e.length-1;i>=0;i--)if(e[i]=parseInt(e[i],10),isNaN(e[i]))return this._error();return t.match(/^rgb/)?this.fromRgb({r:e[0],g:e[1],b:e[2]}):t.match(/^hsv/)?this.fromHsv({h:e[0],s:e[1],v:e[2]}):this.fromHsl({h:e[0],s:e[1],l:e[2]})}return this.fromHex(t)},fromRgb:function(t,r){return"object"!=typeof t||t.r===e||t.g===e||t.b===e?this._error():(this.error=!1,this.fromInt(parseInt((t.r<<16)+(t.g<<8)+t.b,10),r))},fromHex:function(t){return t=t.replace(/^#/,"").replace(/^0x/,""),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),this.error=!/^[0-9A-F]{6}$/i.test(t),this.fromInt(parseInt(t,16))},fromHsl:function(t){var r,i,o,n,s,a,c,l;return"object"!=typeof t||t.h===e||t.s===e||t.l===e?this._error():(this._hsl=t,this._hSpace="hsl",a=t.h/360,c=t.s/100,l=t.l/100,0===c?r=i=o=l:(n=l<.5?l*(1+c):l+c-l*c,s=2*l-n,r=this.hue2rgb(s,n,a+1/3),i=this.hue2rgb(s,n,a),o=this.hue2rgb(s,n,a-1/3)),this.fromRgb({r:255*r,g:255*i,b:255*o},!0))},fromHsv:function(t){var r,i,o,n,s,a,c,l,u,p,h;if("object"!=typeof t||t.h===e||t.s===e||t.v===e)return this._error();switch(this._hsv=t,this._hSpace="hsv",r=t.h/360,i=t.s/100,o=t.v/100,c=Math.floor(6*r),l=6*r-c,u=o*(1-i),p=o*(1-l*i),h=o*(1-(1-l)*i),c%6){case 0:n=o,s=h,a=u;break;case 1:n=p,s=o,a=u;break;case 2:n=u,s=o,a=h;break;case 3:n=u,s=p,a=o;break;case 4:n=h,s=u,a=o;break;case 5:n=o,s=u,a=p}return this.fromRgb({r:255*n,g:255*s,b:255*a},!0)},fromInt:function(t,r){return this._color=parseInt(t,10),isNaN(this._color)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),r===e&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t},toString:function(){var t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var e=6-t.length-1;e>=0;e--)t="0"+t;return"#"+t},toCSS:function(t,e){switch(t=t||"hex",e=parseFloat(e||this._alpha),t){case"rgb":case"rgba":var r=this.toRgb();return e<1?"rgba( "+r.r+", "+r.g+", "+r.b+", "+e+" )":"rgb( "+r.r+", "+r.g+", "+r.b+" )";case"hsl":case"hsla":var i=this.toHsl();return e<1?"hsla( "+i.h+", "+i.s+"%, "+i.l+"%, "+e+" )":"hsl( "+i.h+", "+i.s+"%, "+i.l+"% )";default:return this.toString()}},toRgb:function(){return{r:255&this._color>>16,g:255&this._color>>8,b:255&this._color}},toHsl:function(){var t,e,r=this.toRgb(),i=r.r/255,o=r.g/255,n=r.b/255,s=Math.max(i,o,n),a=Math.min(i,o,n),c=(s+a)/2;if(s===a)t=e=0;else{var l=s-a;switch(e=c>.5?l/(2-s-a):l/(s+a),s){case i:t=(o-n)/l+(o<n?6:0);break;case o:t=(n-i)/l+2;break;case n:t=(i-o)/l+4}t/=6}return t=Math.round(360*t),0===t&&this._hsl.h!==t&&(t=this._hsl.h),e=Math.round(100*e),0===e&&this._hsl.s&&(e=this._hsl.s),{h:t,s:e,l:Math.round(100*c)}},toHsv:function(){var t,e,r=this.toRgb(),i=r.r/255,o=r.g/255,n=r.b/255,s=Math.max(i,o,n),a=Math.min(i,o,n),c=s,l=s-a;if(e=0===s?0:l/s,s===a)t=e=0;else{switch(s){case i:t=(o-n)/l+(o<n?6:0);break;case o:t=(n-i)/l+2;break;case n:t=(i-o)/l+4}t/=6}return t=Math.round(360*t),0===t&&this._hsv.h!==t&&(t=this._hsv.h),e=Math.round(100*e),0===e&&this._hsv.s&&(e=this._hsv.s),{h:t,s:e,v:Math.round(100*c)}},toInt:function(){return this._color},toIEOctoHex:function(){var t=this.toString(),e=parseInt(255*this._alpha,10).toString(16);return 1===e.length&&(e="0"+e),"#"+e+t.replace(/^#/,"")},toLuminosity:function(){var t=this.toRgb();return.2126*Math.pow(t.r/255,2.2)+.7152*Math.pow(t.g/255,2.2)+.0722*Math.pow(t.b/255,2.2)},getDistanceLuminosityFrom:function(t){if(!(t instanceof r))throw"getDistanceLuminosityFrom requires a Color object";var e=this.toLuminosity(),i=t.toLuminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},getMaxContrastColor:function(){var t=this.toLuminosity();return new r(t>=.5?"000000":"ffffff")},getReadableContrastingColor:function(t,i){if(!t instanceof r)return this;var o=i===e?5:i,n=t.getDistanceLuminosityFrom(this),s=t.getMaxContrastColor();if(s.getDistanceLuminosityFrom(t)<=o)return s;if(n>=o)return this;for(var a=0===s.toInt()?-1:1;n<o&&(this.l(a,!0),n=this.getDistanceLuminosityFrom(t),0!==this._color&&16777215!==this._color););return this},a:function(t){if(t===e)return this._alpha;var r=parseFloat(t);return isNaN(r)?this._error():(this._alpha=r,this)},darken:function(t){return t=t||5,this.l(-t,!0)},lighten:function(t){return t=t||5,this.l(t,!0)},saturate:function(t){return t=t||15,this.s(t,!0)},desaturate:function(t){return t=t||15,this.s(-t,!0)},toGrayscale:function(){return this.setHSpace("hsl").s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(t){t=t||1;var e=180+30*t;return this.h(e,!0)},getAnalog:function(t){t=t||1;var e=30*t;return this.h(e,!0)},getTetrad:function(t){t=t||1;var e=60*t;return this.h(e,!0)},getTriad:function(t){t=t||1;var e=120*t;return this.h(e,!0)},_partial:function(t){var r=i[t];return function(i,o){var n=this._spaceFunc("to",r.space);return i===e?n[t]:(!0===o&&(i=n[t]+i),r.mod&&(i%=r.mod),r.range&&(i=i<r.range[0]?r.range[0]:i>r.range[1]?r.range[1]:i),n[t]=i,this._spaceFunc("from",r.space,n))}},_spaceFunc:function(t,e,r){var i=e||this._hSpace;return this[t+i.charAt(0).toUpperCase()+i.substr(1)](r)}};var i={h:{mod:360},s:{range:[0,100]},l:{space:"hsl",range:[0,100]},v:{space:"hsv",range:[0,100]},r:{space:"rgb",range:[0,255]},g:{space:"rgb",range:[0,255]},b:{space:"rgb",range:[0,255]}};for(var o in i)i.hasOwnProperty(o)&&(r.fn[o]=r.fn._partial(o));"object"==typeof exports?module.exports=r:t.Color=r}(this),function(t){var e={common:{init:function(){t(document).on("click",".gdpr-help-content-cnt .gdpr-faq-toggle h3",function(){var e=t(this).closest(".gdpr-faq-toggle");e.hasClass("gdpr-faq-open")?e.removeClass("gdpr-faq-open").find(".gdpr-faq-accordion-content").slideUp(200):(e.closest(".gdpr-help-content-block").find(".gdpr-faq-open").each(function(){t(this).find(".gdpr-faq-accordion-content").slideUp(200),t(this).removeClass("gdpr-faq-open")}),e.addClass("gdpr-faq-open").find(".gdpr-faq-accordion-content").slideDown(200))}),t(document).on("click","a.gdpr-help-tab-toggle",function(e){e.preventDefault();var r=t(this).attr("href");t(r).length>0&&(t(".gdpr-help-content-block").slideUp(),t(r).slideDown(),t(".gdpr-help-tab-toggle").removeClass("active"),t(this).addClass("active"))}),t(document).on("click",".gdpr-script-tab-content .gdpr-tab-code-section-nav li > a ",function(e){e.preventDefault();var r=t(this).attr("href");t(this).closest(".gdpr-script-tab-content").find(".gdpr-active").removeClass("gdpr-active"),t(this).addClass("gdpr-active"),t(r).addClass("gdpr-active")}),t(document).find(".gdpr-conditional-field").each(function(){var e=t(this).attr("data-dependency");t(e).is(":checked")?t(this).addClass("gdpr-conditional-on"):t(this).removeClass("gdpr-conditional-on")}),t(document).on("change",'.gdpr-checkbox-toggle input[type="checkbox"]',function(){t(this).is(":checked")?t(document).find('.gdpr-conditional-field[data-dependency="#'+t(this).attr("id")+'"]').addClass("gdpr-conditional-on"):t(document).find('.gdpr-conditional-field[data-dependency="#'+t(this).attr("id")+'"]').removeClass("gdpr-conditional-on")}),t(document).on("keyup","input[name=moove_gdpr_company_logo]",function(){t(".moove_gdpr_company_logo_holder").css("background-image","url("+t(this).val()+")")}),t(document).on("change",'input[name="moove_gdpr_plugin_font_type"]',function(){"1"===t(this).val()||"2"===t(this).val()?t("#moove_gdpr_plugin_font_family").addClass("moove-not-visible"):t("#moove_gdpr_plugin_font_family").removeClass("moove-not-visible")}),t(".iris-colorpicker").each(function(){t(this).iris({width:300,hide:!0,change:function(e,r){t(this).css("background",r.color.toString())}}).on("click",function(){t(this).iris("toggle")}),t(this).iris("color",t(this).val())}),t(document).on("click",".iris-selectbtn",function(){t(this).parent().find(".iris-colorpicker").iris("toggle")}),t(document).on("click",".iris-picker:visible",function(){t(".iris-colorpicker").iris("hide")}),t(document).on("click",'#moove_gdpr_tab_advanced_cookies button[type="submit"]',function(e){var r=0,i=0;if("on"===t('input[name="moove_gdpr_advanced_cookies_enable"]:checked').val()&&(t(".gdpr-script-tab-content").find("textarea.code").each(function(){t.trim(t(this).val())||r++,i++}),i-r<1)){e.preventDefault();var o=t(".gdpr-script-tab-content").addClass("moove-gdpr-form-error").find(".alert.script-error").show();t("html, body").animate({scrollTop:o.offset().top-100},200)}}),t(document).on("click",'#moove_gdpr_tab_third_party_cookies button[type="submit"]',function(e){var r=0,i=0;if("on"===t('input[name="moove_gdpr_third_party_cookies_enable"]:checked').val()&&(t(".gdpr-script-tab-content").find("textarea.code").each(function(){t.trim(t(this).val())||r++,i++}),i-r<1)){e.preventDefault();var o=t(".gdpr-script-tab-content").addClass("moove-gdpr-form-error").find(".alert.script-error").show();t("html, body").animate({scrollTop:o.offset().top-100},200)}})},finalize:function(){}},home:{init:function(){},finalize:function(){}},about_us:{init:function(){}}},r={fire:function(t,r,i){var o,n=e;r=void 0===r?"init":r,o=""!==t,o=o&&n[t],(o=o&&"function"==typeof n[t][r])&&n[t][r](i)},loadEvents:function(){r.fire("common"),t.each(document.body.className.replace(/-/g,"_").split(/\s+/),function(t,e){r.fire(e),r.fire(e,"finalize")}),r.fire("common","finalize")}};t(document).ready(r.loadEvents)}(jQuery);
dist/scripts/codemirror.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.postscribe=e():t.postscribe=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var n=r(1),i=function(t){return t&&t.__esModule?t:{default:t}}(n);t.exports=i.default},function(t,e,r){"use strict";function n(){}function i(){var t=p.shift();if(t){var e=f.last(t);e.afterDequeue(),t.stream=o.apply(void 0,t),e.afterStreamStart()}}function o(t,e,r){function o(t){t=r.beforeWrite(t),g.write(t),r.afterWrite(t)}g=new u.default(t,r),g.id=d++,g.name=r.name||g.id,a.streams[g.name]=g;var s=t.ownerDocument,c={close:s.close,open:s.open,write:s.write,writeln:s.writeln};l(s,{close:n,open:n,write:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return o(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return o(e.join("")+"\n")}});var f=g.win.onerror||n;return g.win.onerror=function(t,e,n){r.error({msg:t+" - "+e+": "+n}),f.apply(g.win,[t,e,n])},g.write(e,function(){l(s,c),g.win.onerror=f,r.done(),g=null,i()}),g}function a(t,e,r){if(f.isFunction(r))r={done:r};else if("clear"===r)return p=[],g=null,void(d=0);r=f.defaults(r,h),t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t;var o=[t,e,r];return t.postscribe={cancel:function(){o.stream?o.stream.abort():o[1]=n}},r.beforeEnqueue(o),p.push(o),g||i(),t.postscribe}e.__esModule=!0;var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=a;var s=r(2),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=r(4),f=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(c),h={afterAsync:n,afterDequeue:n,afterStreamStart:n,afterWrite:n,autoFix:!0,beforeEnqueue:n,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:n,error:function(t){throw new Error(t.msg)},releaseAsync:!1},d=0,p=[],g=null;l(a,{streams:{},queue:p,WriteStream:u.default})},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){var r=f+e,n=t.getAttribute(r);return c.existy(n)?String(n):n}function o(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=f+e;c.existy(r)&&""!==r?t.setAttribute(n,r):t.removeAttribute(n)}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},l=r(3),s=function(t){return t&&t.__esModule?t:{default:t}}(l),u=r(4),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(u),f="data-ps-",h="ps-style",d="ps-script",p=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,t),this.root=e,this.options=r,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new s.default("",{autoFix:r.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],o(this.proxyRoot,"proxyof",0)}return t.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();c.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},t.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},t.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,r=void 0,n=void 0,i=[];(e=this.parser.readToken())&&!(r=c.isScript(e))&&!(n=c.isStyle(e));)(e=this.options.beforeWriteToken(e))&&i.push(e);i.length>0&&this._writeStaticTokens(i),r&&this._handleScriptToken(e),n&&this._handleStyleToken(e)},t.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},t.prototype._buildChunk=function(t){for(var e=this.actuals.length,r=[],n=[],i=[],o=t.length,a=0;a<o;a++){var l=t[a],s=l.toString();if(r.push(s),l.attrs){if(!/^noscript$/i.test(l.tagName)){var u=e++;n.push(s.replace(/(\/?>)/," "+f+"id="+u+" $1")),l.attrs.id!==d&&l.attrs.id!==h&&i.push("atomicTag"===l.type?"":"<"+l.tagName+" "+f+"proxyof="+u+(l.unary?" />":">"))}}else n.push(s),i.push("endTag"===l.type?s:"")}return{tokens:t,raw:r.join(""),actual:n.join(""),proxy:i.join("")}},t.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];c.existy(t=e.shift());){var r=1===t.nodeType;if(!(r&&i(t,"proxyof"))){r&&(this.actuals[i(t,"id")]=t,o(t,"id"));var n=t.parentNode&&i(t.parentNode,"proxyof");n&&this.actuals[n].appendChild(t)}e.unshift.apply(e,c.toArray(t.childNodes))}},t.prototype._handleScriptToken=function(t){var e=this,r=this.parser.clear();r&&this.writeQueue.unshift(r),t.src=t.attrs.src||t.attrs.SRC,(t=this.options.beforeWriteToken(t))&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},t.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",t=this.options.beforeWriteToken(t),t&&this._writeStyleToken(t),e&&this.write()},t.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,h),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},t.prototype._buildStyle=function(t){var e=this.doc.createElement(t.tagName);return e.setAttribute("type",t.type),c.eachKey(t.attrs,function(t,r){e.setAttribute(t,r)}),e},t.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var r=this.doc.getElementById(e);r&&r.parentNode.replaceChild(t,r)},t.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},t.prototype._onScriptDone=function(t){return t!==this.scriptStack[0]?void this.options.error({msg:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},t.prototype._writeScriptToken=function(t,e){var r=this._buildScript(t),n=this._shouldRelease(r),i=this.options.afterAsync;t.src&&(r.src=t.src,this._scriptLoadHandler(r,n?i:function(){e(),i()}));try{this._insertCursor(r,d),r.src&&!n||e()}catch(t){this.options.error(t),e()}},t.prototype._buildScript=function(t){var e=this.doc.createElement(t.tagName);return c.eachKey(t.attrs,function(t,r){e.setAttribute(t,r)}),t.content&&(e.text=t.content),e},t.prototype._scriptLoadHandler=function(t,e){function r(){t=t.onload=t.onreadystatechange=t.onerror=null}function n(){r(),null!=e&&e(),e=null}function i(t){r(),l(t),null!=e&&e(),e=null}function o(t,e){var r=t["on"+e];null!=r&&(t["_on"+e]=r)}var l=this.options.error;o(t,"load"),o(t,"error"),a(t,{onload:function(){if(t._onload)try{t._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){i({msg:"onload handler failed "+e+" @ "+t.src})}n()},onerror:function(){if(t._onerror)try{t._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){return void i({msg:"onerror handler failed "+e+" @ "+t.src})}i({msg:"remote script failed "+t.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(t.readyState)&&n()}})},t.prototype._shouldRelease=function(t){return!/^script$/i.test(t.nodeName)||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},t}();e.default=p},function(t,e,r){!function(e,r){t.exports=function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var n=r(1),i=function(t){return t&&t.__esModule?t:{default:t}}(n);t.exports=i.default},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=r(2),a=n(o),l=r(3),s=n(l),u=r(6),c=function(t){return t&&t.__esModule?t:{default:t}}(u),f=r(5),h={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},d=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.stream=r;var o=!1,l={};for(var s in a)a.hasOwnProperty(s)&&(n.autoFix&&(l[s+"Fix"]=!0),o=o||l[s+"Fix"]);o?(this._readToken=(0,c.default)(this,l,function(){return e._readTokenImpl()}),this._peekToken=(0,c.default)(this,l,function(){return e._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return t.prototype.append=function(t){this.stream+=t},t.prototype.prepend=function(t){this.stream=t+this.stream},t.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},t.prototype._peekTokenImpl=function(){for(var t in h)if(h.hasOwnProperty(t)&&h[t].test(this.stream)){var e=s[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},t.prototype.peekToken=function(){return this._peekToken()},t.prototype.readToken=function(){return this._readToken()},t.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&!1===t[e.type](e))return},t.prototype.clear=function(){var t=this.stream;return this.stream="",t},t.prototype.rest=function(){return this.stream},t}();e.default=d,d.tokenToString=function(t){return t.toString()},d.escapeAttributes=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=(0,f.escapeQuotes)(t[r],null));return e},d.supports=a;for(var p in a)a.hasOwnProperty(p)&&(d.browserHasFlaw=d.browserHasFlaw||!a[p]&&p)},function(t,e){"use strict";e.__esModule=!0;var r=!1,n=!1,i=window.document.createElement("div");try{var o="<P><I></P></I>";i.innerHTML=o,e.tagSoup=r=i.innerHTML!==o}catch(t){e.tagSoup=r=!1}try{i.innerHTML="<P><i><P></P></i></P>",e.selfClose=n=2===i.childNodes.length}catch(t){e.selfClose=n=!1}i=null,e.tagSoup=r,e.selfClose=n},function(t,e,r){"use strict";function n(t){var e=t.indexOf("--\x3e");if(e>=0)return new u.CommentToken(t.substr(4,e-1),e+3)}function i(t){var e=t.indexOf("<");return new u.CharsToken(e>=0?e:t.length)}function o(t){if(-1!==t.indexOf(">")){var e=t.match(c.startTag);if(e){var r=function(){var t={},r={},n=e[2];return e[2].replace(c.attr,function(e,i){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(t[arguments[5]]="",r[arguments[5]]=!0):t[i]=arguments[2]||arguments[3]||arguments[4]||c.fillAttr.test(i)&&i||"":t[i]="",n=n.replace(e,"")}),{v:new u.StartTagToken(e[1],e[0].length,t,r,!!e[3],n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===(void 0===r?"undefined":s(r)))return r.v}}}function a(t){var e=o(t);if(e){var r=t.slice(e.length);if(r.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var n=r.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(n)return new u.AtomicTagToken(e.tagName,n[0].length+e.length,e.attrs,e.booleanAttrs,n[1])}}}function l(t){var e=t.match(c.endTag);if(e)return new u.EndTagToken(e[1],e[0].length)}e.__esModule=!0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=n,e.chars=i,e.startTag=o,e.atomicTag=a,e.endTag=l;var u=r(4),c={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var i=r(5),o=(e.Token=function t(e,r){n(this,t),this.type=e,this.length=r,this.text=""},e.CommentToken=function(){function t(e,r){n(this,t),this.type="comment",this.length=r||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"\x3c!--"+this.content},t}(),e.CharsToken=function(){function t(e){n(this,t),this.type="chars",this.length=e,this.text=""}return t.prototype.toString=function(){return this.text},t}(),e.TagToken=function(){function t(e,r,i,o,a){n(this,t),this.type=e,this.length=i,this.text="",this.tagName=r,this.attrs=o,this.booleanAttrs=a,this.unary=!1,this.html5Unary=!1}return t.formatTag=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r="<"+t.tagName;for(var n in t.attrs)if(t.attrs.hasOwnProperty(n)){r+=" "+n;var o=t.attrs[n];void 0!==t.booleanAttrs&&void 0!==t.booleanAttrs[n]||(r+='="'+(0,i.escapeQuotes)(o)+'"')}return t.rest&&(r+=" "+t.rest),r+=t.unary&&!t.html5Unary?"/>":">",void 0!==e&&null!==e&&(r+=e+"</"+t.tagName+">"),r},t}());e.StartTagToken=function(){function t(e,r,i,o,a,l){n(this,t),this.type="startTag",this.length=r,this.text="",this.tagName=e,this.attrs=i,this.booleanAttrs=o,this.html5Unary=!1,this.unary=a,this.rest=l}return t.prototype.toString=function(){return o.formatTag(this)},t}(),e.AtomicTagToken=function(){function t(e,r,i,o,a){n(this,t),this.type="atomicTag",this.length=r,this.text="",this.tagName=e,this.attrs=i,this.booleanAttrs=o,this.unary=!1,this.html5Unary=!1,this.content=a}return t.prototype.toString=function(){return o.formatTag(this,this.content)},t}(),e.EndTagToken=function(){function t(e,r){n(this,t),this.type="endTag",this.length=r,this.text="",this.tagName=e}return t.prototype.toString=function(){return"</"+this.tagName+">"},t}()},function(t,e){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}e.__esModule=!0,e.escapeQuotes=r},function(t,e){"use strict";function r(t){return t&&"startTag"===t.type&&(t.unary=l.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function n(t,e){var n=t.stream,i=r(e());return t.stream=n,i}function i(t,e){var r=e.pop();t.prepend("</"+r.tagName+">")}function o(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,r=0;e=this[r];r++)if(e.tagName===t)return!0;return!1},t}function a(t,e,a){function l(){var e=n(t,a);e&&c[e.type]&&c[e.type](e)}var u=o(),c={startTag:function(r){var n=r.tagName;"TR"===n.toUpperCase()&&u.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),l()):e.selfCloseFix&&s.test(n)&&u.containsTagName(n)?u.lastTagNameEq(n)?i(t,u):(t.prepend("</"+r.tagName+">"),l()):r.unary||u.push(r)},endTag:function(r){u.last()?e.tagSoupFix&&!u.lastTagNameEq(r.tagName)?i(t,u):u.pop():e.tagSoupFix&&(a(),l())}};return function(){return l(),r(a())}}e.__esModule=!0,e.default=a;var l=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,s=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}])}()}()},function(t,e){"use strict";function r(t){return void 0!==t&&null!==t}function n(t){return"function"==typeof t}function i(t,e,r){var n=void 0,i=t&&t.length||0;for(n=0;n<i;n++)e.call(r,t[n],n)}function o(t,e,r){for(var n in t)t.hasOwnProperty(n)&&e.call(r,n,t[n])}function a(t,e){return t=t||{},o(e,function(e,n){r(t[e])||(t[e]=n)}),t}function l(t){try{return Array.prototype.slice.call(t)}catch(r){var e=function(){var e=[];return i(t,function(t){e.push(t)}),{v:e}}();if("object"===(void 0===e?"undefined":h(e)))return e.v}}function s(t){return t[t.length-1]}function u(t,e){return!(!t||"startTag"!==t.type&&"atomicTag"!==t.type||!("tagName"in t)||!~t.tagName.toLowerCase().indexOf(e))}function c(t){return u(t,"script")}function f(t){return u(t,"style")}e.__esModule=!0;var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.existy=r,e.isFunction=n,e.each=i,e.eachKey=o,e.defaults=a,e.toArray=l,e.last=s,e.isTag=u,e.isScript=c,e.isStyle=f}])}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.CodeMirror=e()}(this,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function r(t,r){return e(t).appendChild(r)}function n(t,e,r,n){var i=document.createElement(t);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)i.appendChild(e[o]);return i}function i(t,e,r,i){var o=n(t,e,r,i);return o.setAttribute("role","presentation"),o}function o(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function a(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function l(e,r){var n=e.className;t(r).test(n)||(e.className+=(n?" ":"")+r)}function s(e,r){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]&&!t(n[i]).test(r)&&(r+=" "+n[i]);return r}function u(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function c(t,e,r){e||(e={});for(var n in t)!t.hasOwnProperty(n)||!1===r&&e.hasOwnProperty(n)||(e[n]=t[n]);return e}function f(t,e,r,n,i){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=n||0,a=i||0;;){var l=t.indexOf("\t",o);if(l<0||l>=e)return a+(e-o);a+=l-o,a+=r-a%r,o=l+1}}function h(t,e){for(var r=0;r<t.length;++r)if(t[r]==e)return r;return-1}function d(t,e,r){for(var n=0,i=0;;){var o=t.indexOf("\t",n);-1==o&&(o=t.length);var a=o-n;if(o==t.length||i+a>=e)return n+Math.min(a,e-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=e)return n}}function p(t){for(;qa.length<=t;)qa.push(g(qa)+" ");return qa[t]}function g(t){return t[t.length-1]}function m(t,e){for(var r=[],n=0;n<t.length;n++)r[n]=e(t[n],n);return r}function v(t,e,r){for(var n=0,i=r(e);n<t.length&&r(t[n])<=i;)n++;t.splice(n,0,e)}function y(){}function b(t,e){var r;return Object.create?r=Object.create(t):(y.prototype=t,r=new y),e&&c(e,r),r}function w(t){return/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||Xa.test(t))}function x(t,e){return e?!!(e.source.indexOf("\\w")>-1&&w(t))||e.test(t):w(t)}function k(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function C(t){return t.charCodeAt(0)>=768&&Ya.test(t)}function S(t,e,r){for(;(r<0?e>0:e<t.length)&&C(t.charAt(e));)e+=r;return e}function T(t,e,r){for(var n=e>r?-1:1;;){if(e==r)return e;var i=(e+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:r;t(o)?r=o:e=o+n}}function L(t,e,r){var o=this;this.input=r,o.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=n("div",null,"CodeMirror-cursors"),o.measure=n("div",null,"CodeMirror-measure"),o.lineMeasure=n("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=n("div",[a],null,"position: relative"),o.sizer=n("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=n("div",null,null,"position: absolute; height: "+Ua+"px; width: 1px;"),o.gutters=n("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=n("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=n("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),ba&&wa<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),xa||ga&&Oa||(o.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(o.wrapper):t(o.wrapper)),o.viewFrom=o.viewTo=e.first,o.reportedViewFrom=o.reportedViewTo=e.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,r.init(o)}function M(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var r=t;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(e<o){r=i;break}e-=o}return r.lines[e]}function N(t,e,r){var n=[],i=e.line;return t.iter(e.line,r.line+1,function(t){var o=t.text;i==r.line&&(o=o.slice(0,r.ch)),i==e.line&&(o=o.slice(e.ch)),n.push(o),++i}),n}function A(t,e,r){var n=[];return t.iter(e,r,function(t){n.push(t.text)}),n}function O(t,e){var r=e-t.height;if(r)for(var n=t;n;n=n.parent)n.height+=r}function D(t){if(null==t.parent)return null;for(var e=t.parent,r=h(e.lines,t),n=e.parent;n;e=n,n=n.parent)for(var i=0;n.children[i]!=e;++i)r+=n.children[i].chunkSize();return r+e.first}function W(t,e){var r=t.first;t:do{for(var n=0;n<t.children.length;++n){var i=t.children[n],o=i.height;if(e<o){t=i;continue t}e-=o,r+=i.chunkSize()}return r}while(!t.lines);for(var a=0;a<t.lines.length;++a){var l=t.lines[a],s=l.height;if(e<s)break;e-=s}return r+a}function E(t,e){return e>=t.first&&e<t.first+t.size}function P(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function I(t,e,r){if(void 0===r&&(r=null),!(this instanceof I))return new I(t,e,r);this.line=t,this.ch=e,this.sticky=r}function H(t,e){return t.line-e.line||t.ch-e.ch}function F(t,e){return t.sticky==e.sticky&&0==H(t,e)}function z(t){return I(t.line,t.ch)}function R(t,e){return H(t,e)<0?e:t}function B(t,e){return H(t,e)<0?t:e}function _(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function j(t,e){if(e.line<t.first)return I(t.first,0);var r=t.first+t.size-1;return e.line>r?I(r,M(t,r).text.length):U(e,M(t,e.line).text.length)}function U(t,e){var r=t.ch;return null==r||r>e?I(t.line,e):r<0?I(t.line,0):t}function G(t,e){for(var r=[],n=0;n<e.length;n++)r[n]=j(t,e[n]);return r}function V(){Za=!0}function $(){Qa=!0}function K(t,e,r){this.marker=t,this.from=e,this.to=r}function q(t,e){if(t)for(var r=0;r<t.length;++r){var n=t[r];if(n.marker==e)return n}}function X(t,e){for(var r,n=0;n<t.length;++n)t[n]!=e&&(r||(r=[])).push(t[n]);return r}function Y(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}function Z(t,e,r){var n;if(t)for(var i=0;i<t.length;++i){var o=t[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e);if(l||o.from==e&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=e:o.to>e);(n||(n=[])).push(new K(a,o.from,s?null:o.to))}}return n}function Q(t,e,r){var n;if(t)for(var i=0;i<t.length;++i){var o=t[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=e:o.to>e);if(l||o.from==e&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e);(n||(n=[])).push(new K(a,s?null:o.from-e,null==o.to?null:o.to-e))}}return n}function J(t,e){if(e.full)return null;var r=E(t,e.from.line)&&M(t,e.from.line).markedSpans,n=E(t,e.to.line)&&M(t,e.to.line).markedSpans;if(!r&&!n)return null;var i=e.from.ch,o=e.to.ch,a=0==H(e.from,e.to),l=Z(r,i,a),s=Q(n,o,a),u=1==e.text.length,c=g(e.text).length+(u?i:0);if(l)for(var f=0;f<l.length;++f){var h=l[f];if(null==h.to){var d=q(s,h.marker);d?u&&(h.to=null==d.to?null:d.to+c):h.to=i}}if(s)for(var p=0;p<s.length;++p){var m=s[p];if(null!=m.to&&(m.to+=c),null==m.from){var v=q(l,m.marker);v||(m.from=c,u&&(l||(l=[])).push(m))}else m.from+=c,u&&(l||(l=[])).push(m)}l&&(l=tt(l)),s&&s!=l&&(s=tt(s));var y=[l];if(!u){var b,w=e.text.length-2;if(w>0&&l)for(var x=0;x<l.length;++x)null==l[x].to&&(b||(b=[])).push(new K(l[x].marker,null,null));for(var k=0;k<w;++k)y.push(b);y.push(s)}return y}function tt(t){for(var e=0;e<t.length;++e){var r=t[e];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function et(t,e,r){var n=null;if(t.iter(e.line,r.line+1,function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var r=t.markedSpans[e].marker;!r.readOnly||n&&-1!=h(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:e,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var u=i[s];if(!(H(u.to,l.from)<0||H(u.from,l.to)>0)){var c=[s,1],f=H(u.from,l.from),d=H(u.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:l.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:l.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function rt(t){var e=t.markedSpans;if(e){for(var r=0;r<e.length;++r)e[r].marker.detachLine(t);t.markedSpans=null}}function nt(t,e){if(e){for(var r=0;r<e.length;++r)e[r].marker.attachLine(t);t.markedSpans=e}}function it(t){return t.inclusiveLeft?-1:0}function ot(t){return t.inclusiveRight?1:0}function at(t,e){var r=t.lines.length-e.lines.length;if(0!=r)return r;var n=t.find(),i=e.find(),o=H(n.from,i.from)||it(t)-it(e);if(o)return-o;var a=H(n.to,i.to)||ot(t)-ot(e);return a||e.id-t.id}function lt(t,e){var r,n=Qa&&t.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(e?i.from:i.to)&&(!r||at(r,i.marker)<0)&&(r=i.marker);return r}function st(t){return lt(t,!0)}function ut(t){return lt(t,!1)}function ct(t,e){var r,n=Qa&&t.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!r||at(r,o.marker)<0)&&(r=o.marker)}return r}function ft(t,e,r,n,i){var o=M(t,e),a=Qa&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),c=H(u.from,r)||it(s.marker)-it(i),f=H(u.to,n)||ot(s.marker)-ot(i);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?H(u.to,r)>=0:H(u.to,r)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?H(u.from,n)<=0:H(u.from,n)<0)))return!0}}}function ht(t){for(var e;e=st(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ut(t);)t=e.find(1,!0).line;return t}function pt(t){for(var e,r;e=ut(t);)t=e.find(1,!0).line,(r||(r=[])).push(t);return r}function gt(t,e){var r=M(t,e),n=ht(r);return r==n?e:D(n)}function mt(t,e){if(e>t.lastLine())return e;var r,n=M(t,e);if(!vt(t,n))return e;for(;r=ut(n);)n=r.find(1,!0).line;return D(n)+1}function vt(t,e){var r=Qa&&e.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&yt(t,e,n))return!0}}function yt(t,e,r){if(null==r.to){var n=r.marker.find(1,!0);return yt(t,n.line,q(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==e.text.length)return!0;for(var i=void 0,o=0;o<e.markedSpans.length;++o)if(i=e.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&yt(t,e,i))return!0}function bt(t){t=ht(t);for(var e=0,r=t.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==t)break;e+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;e+=l.height}return e}function wt(t){if(0==t.height)return 0;for(var e,r=t.text.length,n=t;e=st(n);){var i=e.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=t;e=ut(n);){var o=e.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function xt(t){var e=t.display,r=t.doc;e.maxLine=M(r,r.first),e.maxLineLength=wt(e.maxLine),e.maxLineChanged=!0,r.iter(function(t){var r=wt(t);r>e.maxLineLength&&(e.maxLineLength=r,e.maxLine=t)})}function kt(t,e,r,n){if(!t)return n(e,r,"ltr",0);for(var i=!1,o=0;o<t.length;++o){var a=t[o];(a.from<r&&a.to>e||e==r&&a.to==e)&&(n(Math.max(a.from,e),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(e,r,"ltr")}function Ct(t,e,r){var n;Ja=null;for(var i=0;i<t.length;++i){var o=t[i];if(o.from<e&&o.to>e)return i;o.to==e&&(o.from!=o.to&&"before"==r?n=i:Ja=i),o.from==e&&(o.from!=o.to&&"before"!=r?n=i:Ja=i)}return null!=n?n:Ja}function St(t,e){var r=t.order;return null==r&&(r=t.order=tl(t.text,e)),r}function Tt(t,e){return t._handlers&&t._handlers[e]||el}function Lt(t,e,r){if(t.removeEventListener)t.removeEventListener(e,r,!1);else if(t.detachEvent)t.detachEvent("on"+e,r);else{var n=t._handlers,i=n&&n[e];if(i){var o=h(i,r);o>-1&&(n[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function Mt(t,e){var r=Tt(t,e);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Nt(t,e,r){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),Mt(t,r||e.type,t,e),Pt(e)||e.codemirrorIgnore}function At(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var r=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),n=0;n<e.length;++n)-1==h(r,e[n])&&r.push(e[n])}function Ot(t,e){return Tt(t,e).length>0}function Dt(t){t.prototype.on=function(t,e){rl(this,t,e)},t.prototype.off=function(t,e){Lt(this,t,e)}}function Wt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Et(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Pt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function It(t){Wt(t),Et(t)}function Ht(t){return t.target||t.srcElement}function Ft(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),Da&&t.ctrlKey&&1==e&&(e=3),e}function zt(t){if(null==_a){var e=n("span","​");r(t,n("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(_a=e.offsetWidth<=1&&e.offsetHeight>2&&!(ba&&wa<8))}var i=_a?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Rt(t){if(null!=ja)return ja;var n=r(t,document.createTextNode("AخA")),i=Ia(n,0,1).getBoundingClientRect(),o=Ia(n,1,2).getBoundingClientRect();return e(t),!(!i||i.left==i.right)&&(ja=o.right-i.right<3)}function Bt(t){if(null!=ll)return ll;var e=r(t,n("span","x")),i=e.getBoundingClientRect(),o=Ia(e,0,1).getBoundingClientRect();return ll=Math.abs(i.left-o.left)>1}function _t(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),sl[t]=e}function jt(t,e){ul[t]=e}function Ut(t){
2
+ if("string"==typeof t&&ul.hasOwnProperty(t))t=ul[t];else if(t&&"string"==typeof t.name&&ul.hasOwnProperty(t.name)){var e=ul[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ut("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ut("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Gt(t,e){e=Ut(e);var r=sl[e.name];if(!r)return Gt(t,"text/plain");var n=r(t,e);if(cl.hasOwnProperty(e.name)){var i=cl[e.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=e.name,e.helperType&&(n.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)n[a]=e.modeProps[a];return n}function Vt(t,e){c(e,cl.hasOwnProperty(t)?cl[t]:cl[t]={})}function $t(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var r={};for(var n in e){var i=e[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Kt(t,e){for(var r;t.innerMode&&(r=t.innerMode(e))&&r.mode!=t;)e=r.state,t=r.mode;return r||{mode:t,state:e}}function qt(t,e,r){return!t.startState||t.startState(e,r)}function Xt(t,e,r,n){var i=[t.state.modeGen],o={};ne(t,e.text,t.doc.mode,r,function(t,e){return i.push(t,e)},o,n);for(var a=r.state,l=0;l<t.state.overlays.length;++l)!function(n){r.baseTokens=i;var l=t.state.overlays[n],s=1,u=0;r.state=!0,ne(t,e.text,l.mode,r,function(t,e){for(var r=s;u<t;){var n=i[s];n>t&&i.splice(s,1,t,i[s+1],n),s+=2,u=Math.min(t,n)}if(e)if(l.opaque)i.splice(r,s-r,t,"overlay "+e),s=r+2;else for(;r<s;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+e}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1}(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Yt(t,e,r){if(!e.styles||e.styles[0]!=t.state.modeGen){var n=Zt(t,D(e)),i=e.text.length>t.options.maxHighlightLength&&$t(t.doc.mode,n.state),o=Xt(t,e,n);i&&(n.state=i),e.stateAfter=n.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),r===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Zt(t,e,r){var n=t.doc,i=t.display;if(!n.mode.startState)return new dl(n,!0,e);var o=ie(t,e,r),a=o>n.first&&M(n,o-1).stateAfter,l=a?dl.fromSaved(n,a,o):new dl(n,qt(n.mode),o);return n.iter(o,e,function(r){Qt(t,r.text,l);var n=l.line;r.stateAfter=n==e-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function Qt(t,e,r,n){var i=t.doc.mode,o=new fl(e,t.options.tabSize,r);for(o.start=o.pos=n||0,""==e&&Jt(i,r.state);!o.eol();)te(i,o,r.state),o.start=o.pos}function Jt(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var r=Kt(t,e);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function te(t,e,r,n){for(var i=0;i<10;i++){n&&(n[0]=Kt(t,r).mode);var o=t.token(e,r);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}function ee(t,e,r,n){var i,o=t.doc,a=o.mode;e=j(o,e);var l,s=M(o,e.line),u=Zt(t,e.line,r),c=new fl(s.text,t.options.tabSize,u);for(n&&(l=[]);(n||c.pos<e.ch)&&!c.eol();)c.start=c.pos,i=te(a,c,u.state),n&&l.push(new pl(c,i,$t(o.mode,u.state)));return n?l:new pl(c,i,u.state)}function re(t,e){if(t)for(;;){var r=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;t=t.slice(0,r.index)+t.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==e[n]?e[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(e[n])||(e[n]+=" "+r[2])}return t}function ne(t,e,r,n,i,o,a){var l=r.flattenSpans;null==l&&(l=t.options.flattenSpans);var s,u=0,c=null,f=new fl(e,t.options.tabSize,n),h=t.options.addModeClass&&[null];for(""==e&&re(Jt(r,n.state),o);!f.eol();){if(f.pos>t.options.maxHighlightLength?(l=!1,a&&Qt(t,e,n,f.pos),f.pos=e.length,s=null):s=re(te(r,f,n.state,h),o),h){var d=h[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!l||c!=s){for(;u<f.start;)u=Math.min(f.start,u+5e3),i(u,c);c=s}f.start=f.pos}for(;u<f.pos;){var p=Math.min(f.pos,u+5e3);i(p,c),u=p}}function ie(t,e,r){for(var n,i,o=t.doc,a=r?-1:e-(t.doc.mode.innerMode?1e3:100),l=e;l>a;--l){if(l<=o.first)return o.first;var s=M(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof hl?u.lookAhead:0)<=o.modeFrontier))return l;var c=f(s.text,null,t.options.tabSize);(null==i||n>c)&&(i=l-1,n=c)}return i}function oe(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var r=t.first,n=e-1;n>r;n--){var i=M(t,n).stateAfter;if(i&&(!(i instanceof hl)||n+i.lookAhead<e)){r=n+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,r)}}function ae(t,e,r,n){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),rt(t),nt(t,r);var i=n?n(t):1;i!=t.height&&O(t,i)}function le(t){t.parent=null,rt(t)}function se(t,e){if(!t||/^\s*$/.test(t))return null;var r=e.addModeClass?yl:vl;return r[t]||(r[t]=t.replace(/\S+/g,"cm-$&"))}function ue(t,e){var r=i("span",null,null,xa?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var o=0;o<=(e.rest?e.rest.length:0);o++){var a=o?e.rest[o-1]:e.line,l=void 0;n.pos=0,n.addToken=fe,Rt(t.display.measure)&&(l=St(a,t.doc.direction))&&(n.addToken=de(n.addToken,l)),n.map=[];ge(a,n,Yt(t,a,e!=t.display.externalMeasured&&D(a))),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=s(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=s(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(zt(t.display.measure))),0==o?(e.measure.map=n.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(n.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(xa){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Mt(t,"renderLine",t,e.line,n.pre),n.pre.className&&(n.textClass=s(n.pre.className,n.textClass||"")),n}function ce(t){var e=n("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function fe(t,e,r,i,o,a,l){if(e){var s,u=t.splitSpaces?he(e,t.trailingSpace):e,c=t.cm.state.specialChars,f=!1;if(c.test(e)){s=document.createDocumentFragment();for(var h=0;;){c.lastIndex=h;var d=c.exec(e),g=d?d.index-h:e.length-h;if(g){var m=document.createTextNode(u.slice(h,h+g));ba&&wa<9?s.appendChild(n("span",[m])):s.appendChild(m),t.map.push(t.pos,t.pos+g,m),t.col+=g,t.pos+=g}if(!d)break;h+=g+1;var v=void 0;if("\t"==d[0]){var y=t.cm.options.tabSize,b=y-t.col%y;v=s.appendChild(n("span",p(b),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=b}else"\r"==d[0]||"\n"==d[0]?(v=s.appendChild(n("span","\r"==d[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",d[0]),t.col+=1):(v=t.cm.options.specialCharPlaceholder(d[0]),v.setAttribute("cm-text",d[0]),ba&&wa<9?s.appendChild(n("span",[v])):s.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=e.length,s=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,s),ba&&wa<9&&(f=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),r||i||o||f||a){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[s],w,a);if(l)for(var k in l)l.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&x.setAttribute(k,l[k]);return t.content.appendChild(x)}t.content.appendChild(s)}}function he(t,e){if(t.length>1&&!/ /.test(t))return t;for(var r=e,n="",i=0;i<t.length;i++){var o=t.charAt(i);" "!=o||!r||i!=t.length-1&&32!=t.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function de(t,e){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var f=void 0,h=0;h<e.length&&(f=e[h],!(f.to>u&&f.from<=u));h++);if(f.to>=c)return t(r,n,i,o,a,l,s);t(r,n.slice(0,f.to-u),i,o,null,l,s),o=null,n=n.slice(f.to-u),u=f.to}}}function pe(t,e,r,n){var i=!n&&r.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!n&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function ge(t,e,r){var n=t.markedSpans,i=t.text,o=0;if(n)for(var a,l,s,u,c,f,h,d=i.length,p=0,g=1,m="",v=0;;){if(v==p){s=u=c=l="",h=null,f=null,v=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],k=x.marker;if("bookmark"==k.type&&x.from==p&&k.widgetNode)y.push(k);else if(x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,u=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(c+=" "+k.startStyle),k.endStyle&&x.to==v&&(b||(b=[])).push(k.endStyle,x.to),k.title&&((h||(h={})).title=k.title),k.attributes)for(var C in k.attributes)(h||(h={}))[C]=k.attributes[C];k.collapsed&&(!f||at(f.marker,k)<0)&&(f=x)}else x.from>p&&v>x.from&&(v=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==v&&(u+=" "+b[S]);if(!f||f.from==p)for(var T=0;T<y.length;++T)pe(e,0,y[T]);if(f&&(f.from||0)==p){if(pe(e,(null==f.to?d+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=d)break;for(var L=Math.min(d,v);;){if(m){var M=p+m.length;if(!f){var N=M>L?m.slice(0,L-p):m;e.addToken(e,N,a?a+s:s,c,p+N.length==v?u:"",l,h)}if(M>=L){m=m.slice(L-p),p=L;break}p=M,c=""}m=i.slice(o,o=r[g++]),a=se(r[g++],e.cm.options)}}else for(var A=1;A<r.length;A+=2)e.addToken(e,i.slice(o,o=r[A]),se(r[A+1],e.cm.options))}function me(t,e,r){this.line=e,this.rest=pt(e),this.size=this.rest?D(g(this.rest))-r+1:1,this.node=this.text=null,this.hidden=vt(t,e)}function ve(t,e,r){for(var n,i=[],o=e;o<r;o=n){var a=new me(t.doc,M(t.doc,o),o);n=o+a.size,i.push(a)}return i}function ye(t){bl?bl.ops.push(t):t.ownsGroup=bl={ops:[t],delayedCallbacks:[]}}function be(t){var e=t.delayedCallbacks,r=0;do{for(;r<e.length;r++)e[r].call(null);for(var n=0;n<t.ops.length;n++){var i=t.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<e.length)}function we(t,e){var r=t.ownsGroup;if(r)try{be(r)}finally{bl=null,e(r)}}function xe(t,e){var r=Tt(t,e);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);bl?n=bl.delayedCallbacks:wl?n=wl:(n=wl=[],setTimeout(ke,0));for(var o=0;o<r.length;++o)!function(t){n.push(function(){return r[t].apply(null,i)})}(o)}}function ke(){var t=wl;wl=null;for(var e=0;e<t.length;++e)t[e]()}function Ce(t,e,r,n){for(var i=0;i<e.changes.length;i++){var o=e.changes[i];"text"==o?Me(t,e):"gutter"==o?Ae(t,e,r,n):"class"==o?Ne(t,e):"widget"==o&&Oe(t,e,n)}e.changes=null}function Se(t){return t.node==t.text&&(t.node=n("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),ba&&wa<8&&(t.node.style.zIndex=2)),t.node}function Te(t,e){var r=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),e.background)r?e.background.className=r:(e.background.parentNode.removeChild(e.background),e.background=null);else if(r){var i=Se(e);e.background=i.insertBefore(n("div",null,r),i.firstChild),t.display.input.setUneditable(e.background)}}function Le(t,e){var r=t.display.externalMeasured;return r&&r.line==e.line?(t.display.externalMeasured=null,e.measure=r.measure,r.built):ue(t,e)}function Me(t,e){var r=e.text.className,n=Le(t,e);e.text==e.node&&(e.node=n.pre),e.text.parentNode.replaceChild(n.pre,e.text),e.text=n.pre,n.bgClass!=e.bgClass||n.textClass!=e.textClass?(e.bgClass=n.bgClass,e.textClass=n.textClass,Ne(t,e)):r&&(e.text.className=r)}function Ne(t,e){Te(t,e),e.line.wrapClass?Se(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var r=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=r||""}function Ae(t,e,r,i){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var o=Se(e);e.gutterBackground=n("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),o.insertBefore(e.gutterBackground,e.text)}var a=e.line.gutterMarkers;if(t.options.lineNumbers||a){var l=Se(e),s=e.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(t.display.input.setUneditable(s),l.insertBefore(s,e.text),e.line.gutterClass&&(s.className+=" "+e.line.gutterClass),!t.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(e.lineNumber=s.appendChild(n("div",P(t.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<t.options.gutters.length;++u){var c=t.options.gutters[u],f=a.hasOwnProperty(c)&&a[c];f&&s.appendChild(n("div",[f],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function Oe(t,e,r){e.alignable&&(e.alignable=null);for(var n=e.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&e.node.removeChild(n);We(t,e,r)}function De(t,e,r,n){var i=Le(t,e);return e.text=e.node=i.pre,i.bgClass&&(e.bgClass=i.bgClass),i.textClass&&(e.textClass=i.textClass),Ne(t,e),Ae(t,e,r,n),We(t,e,n),e.node}function We(t,e,r){if(Ee(t,e.line,e,r,!0),e.rest)for(var n=0;n<e.rest.length;n++)Ee(t,e.rest[n],e,r,!1)}function Ee(t,e,r,i,o){if(e.widgets)for(var a=Se(r),l=0,s=e.widgets;l<s.length;++l){var u=s[l],c=n("div",[u.node],"CodeMirror-linewidget");u.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Pe(u,c,r,i),t.display.input.setUneditable(c),o&&u.above?a.insertBefore(c,r.gutter||r.text):a.appendChild(c),xe(u,"redraw")}}function Pe(t,e,r,n){if(t.noHScroll){(r.alignable||(r.alignable=[])).push(e);var i=n.wrapperWidth;e.style.left=n.fixedPos+"px",t.coverGutter||(i-=n.gutterTotalWidth,e.style.paddingLeft=n.gutterTotalWidth+"px"),e.style.width=i+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-n.gutterTotalWidth+"px"))}function Ie(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!o(document.body,t.node)){var i="position: relative;";t.coverGutter&&(i+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(i+="width: "+e.display.wrapper.clientWidth+"px;"),r(e.display.measure,n("div",[t.node],null,i))}return t.height=t.node.parentNode.offsetHeight}function He(t,e){for(var r=Ht(e);r!=t.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==t.sizer&&r!=t.mover)return!0}function Fe(t){return t.lineSpace.offsetTop}function ze(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Re(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=r(t.measure,n("pre","x")),i=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(t.cachedPaddingH=o),o}function Be(t){return Ua-t.display.nativeBarWidth}function _e(t){return t.display.scroller.clientWidth-Be(t)-t.display.barWidth}function je(t){return t.display.scroller.clientHeight-Be(t)-t.display.barHeight}function Ue(t,e,r){var n=t.options.lineWrapping,i=n&&_e(t);if(!e.measure.heights||n&&e.measure.width!=i){var o=e.measure.heights=[];if(n){e.measure.width=i;for(var a=e.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Ge(t,e,r){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var n=0;n<t.rest.length;n++)if(t.rest[n]==e)return{map:t.measure.maps[n],cache:t.measure.caches[n]};for(var i=0;i<t.rest.length;i++)if(D(t.rest[i])>r)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Ve(t,e){e=ht(e);var n=D(e),i=t.display.externalMeasured=new me(t.doc,e,n);i.lineN=n;var o=i.built=ue(t,i);return i.text=o.pre,r(t.display.lineMeasure,o.pre),i}function $e(t,e,r,n){return Xe(t,qe(t,e),r,n)}function Ke(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[Lr(t,e)];var r=t.display.externalMeasured;return r&&e>=r.lineN&&e<r.lineN+r.size?r:void 0}function qe(t,e){var r=D(e),n=Ke(t,r);n&&!n.text?n=null:n&&n.changes&&(Ce(t,n,r,xr(t)),t.curOp.forceUpdate=!0),n||(n=Ve(t,e));var i=Ge(n,e,r);return{line:e,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Xe(t,e,r,n,i){e.before&&(r=-1);var o,a=r+(n||"");return e.cache.hasOwnProperty(a)?o=e.cache[a]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(Ue(t,e.view,e.rect),e.hasHeights=!0),o=Qe(t,e,r,n),o.bogus||(e.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function Ye(t,e,r){for(var n,i,o,a,l,s,u=0;u<t.length;u+=3)if(l=t[u],s=t[u+1],e<l?(i=0,o=1,a="left"):e<s?(i=e-l,o=i+1):(u==t.length-3||e==s&&t[u+3]>e)&&(o=s-l,i=o-1,e>=s&&(a="right")),null!=i){if(n=t[u+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;u&&t[u-2]==t[u-3]&&t[u-1].insertLeft;)n=t[2+(u-=3)],a="left";if("right"==r&&i==s-l)for(;u<t.length-3&&t[u+3]==t[u+4]&&!t[u+5].insertLeft;)n=t[(u+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Ze(t,e){var r=xl;if("left"==e)for(var n=0;n<t.length&&(r=t[n]).left==r.right;n++);else for(var i=t.length-1;i>=0&&(r=t[i]).left==r.right;i--);return r}function Qe(t,e,r,n){var i,o=Ye(e.map,r,n),a=o.node,l=o.start,s=o.end,u=o.collapse;if(3==a.nodeType){for(var c=0;c<4;c++){for(;l&&C(e.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&C(e.line.text.charAt(o.coverStart+s));)++s;if(i=ba&&wa<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Ze(Ia(a,l,s).getClientRects(),n),i.left||i.right||0==l)break;s=l,l-=1,u="right"}ba&&wa<11&&(i=Je(t.display.measure,i))}else{l>0&&(u=n="right");var f;i=t.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==n?f.length-1:0]:a.getBoundingClientRect()}if(ba&&wa<9&&!l&&(!i||!i.left&&!i.right)){var h=a.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+wr(t.display),top:h.top,bottom:h.bottom}:xl}for(var d=i.top-e.rect.top,p=i.bottom-e.rect.top,g=(d+p)/2,m=e.view.measure.heights,v=0;v<m.length-1&&!(g<m[v]);v++);var y=v?m[v-1]:0,b=m[v],w={left:("right"==u?i.right:i.left)-e.rect.left,right:("left"==u?i.left:i.right)-e.rect.left,top:y,bottom:b};return i.left||i.right||(w.bogus=!0),t.options.singleCursorHeightPerLine||(w.rtop=d,w.rbottom=p),w}function Je(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Bt(t))return e;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*r,right:e.right*r,top:e.top*n,bottom:e.bottom*n}}function tr(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function er(t){t.display.externalMeasure=null,e(t.display.lineMeasure);for(var r=0;r<t.display.view.length;r++)tr(t.display.view[r])}function rr(t){er(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function nr(){return Ca&&Aa?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ir(){return Ca&&Aa?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function or(t){var e=0;if(t.widgets)for(var r=0;r<t.widgets.length;++r)t.widgets[r].above&&(e+=Ie(t.widgets[r]));return e}function ar(t,e,r,n,i){if(!i){var o=or(e);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=bt(e);if("local"==n?a+=Fe(t.display):a-=t.display.viewOffset,"page"==n||"window"==n){var l=t.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:ir());var s=l.left+("window"==n?0:nr());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function lr(t,e,r){if("div"==r)return e;var n=e.left,i=e.top;if("page"==r)n-=nr(),i-=ir();else if("local"==r||!r){var o=t.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=t.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function sr(t,e,r,n,i){return n||(n=M(t.doc,e.line)),ar(t,n,$e(t,n,e.ch,i),r)}function ur(t,e,r,n,i,o){function a(e,a){var l=Xe(t,i,e,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,ar(t,n,l,r)}function l(t,e,r){var n=s[e],i=1==n.level;return a(r?t-1:t,i!=r)}n=n||M(t.doc,e.line),i||(i=qe(t,n));var s=St(n,t.doc.direction),u=e.ch,c=e.sticky;if(u>=n.text.length?(u=n.text.length,c="before"):u<=0&&(u=0,c="after"),!s)return a("before"==c?u-1:u,"before"==c);var f=Ct(s,u,c),h=Ja,d=l(u,f,"before"==c);return null!=h&&(d.other=l(u,h,"before"!=c)),d}function cr(t,e){var r=0;e=j(t.doc,e),t.options.lineWrapping||(r=wr(t.display)*e.ch);var n=M(t.doc,e.line),i=bt(n)+Fe(t.display);return{left:r,right:r,top:i,bottom:i+n.height}}function fr(t,e,r,n,i){var o=I(t,e,r);return o.xRel=i,n&&(o.outside=!0),o}function hr(t,e,r){var n=t.doc;if((r+=t.display.viewOffset)<0)return fr(n.first,0,null,!0,-1);var i=W(n,r),o=n.first+n.size-1;if(i>o)return fr(n.first+n.size-1,M(n,o).text.length,null,!0,1);e<0&&(e=0);for(var a=M(n,i);;){var l=mr(t,a,i,e,r),s=ct(a,l.ch+(l.xRel>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=M(n,i=u.line)}}function dr(t,e,r,n){n-=or(e);var i=e.text.length,o=T(function(e){return Xe(t,r,e-1).bottom<=n},i,0);return i=T(function(e){return Xe(t,r,e).top>n},o,i),{begin:o,end:i}}function pr(t,e,r,n){return r||(r=qe(t,e)),dr(t,e,r,ar(t,e,Xe(t,r,n),"line").top)}function gr(t,e,r,n){return!(t.bottom<=r)&&(t.top>r||(n?t.left:t.right)>e)}function mr(t,e,r,n,i){i-=bt(e);var o=qe(t,e),a=or(e),l=0,s=e.text.length,u=!0,c=St(e,t.doc.direction);if(c){var f=(t.options.lineWrapping?yr:vr)(t,e,r,o,c,n,i);u=1!=f.level,l=u?f.from:f.to-1,s=u?f.to:f.from-1}var h,d,p=null,g=null,m=T(function(e){var r=Xe(t,o,e);return r.top+=a,r.bottom+=a,!!gr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=e,g=r),!0)},l,s),v=!1;if(g){var y=n-g.left<g.right-n,b=y==u;m=p+(b?0:1),d=b?"after":"before",h=y?g.left:g.right}else{u||m!=s&&m!=l||m++,d=0==m?"after":m==e.text.length?"before":Xe(t,o,m-(u?1:0)).bottom+a<=i==u?"after":"before";var w=ur(t,I(r,m,d),"line",e,o);h=w.left,v=i<w.top||i>=w.bottom}return m=S(e.text,m,1),fr(r,m,d,v,n-h)}function vr(t,e,r,n,i,o,a){var l=T(function(l){var s=i[l],u=1!=s.level;return gr(ur(t,I(r,u?s.to:s.from,u?"before":"after"),"line",e,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=1!=s.level,c=ur(t,I(r,u?s.from:s.to,u?"after":"before"),"line",e,n);gr(c,o,a,!0)&&c.top>a&&(s=i[l-1])}return s}function yr(t,e,r,n,i,o,a){var l=dr(t,e,n,a),s=l.begin,u=l.end;/\s/.test(e.text.charAt(u-1))&&u--;for(var c=null,f=null,h=0;h<i.length;h++){var d=i[h];if(!(d.from>=u||d.to<=s)){var p=1!=d.level,g=Xe(t,n,p?Math.min(u,d.to)-1:Math.max(s,d.from)).right,m=g<o?o-g+1e9:g-o;(!c||f>m)&&(c=d,f=m)}}return c||(c=i[i.length-1]),c.from<s&&(c={from:s,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function br(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ml){ml=n("pre");for(var i=0;i<49;++i)ml.appendChild(document.createTextNode("x")),ml.appendChild(n("br"));ml.appendChild(document.createTextNode("x"))}r(t.measure,ml);var o=ml.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function wr(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=n("span","xxxxxxxxxx"),i=n("pre",[e]);r(t.measure,i);var o=e.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(t.cachedCharWidth=a),a||10}function xr(t){for(var e=t.display,r={},n={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[t.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[t.options.gutters[a]]=o.clientWidth;return{fixedPos:kr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:e.wrapper.clientWidth}}function kr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Cr(t){var e=br(t.display),r=t.options.lineWrapping,n=r&&Math.max(5,t.display.scroller.clientWidth/wr(t.display)-3);return function(i){if(vt(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*e:o+e}}function Sr(t){var e=t.doc,r=Cr(t);e.iter(function(t){var e=r(t);e!=t.height&&O(t,e)})}function Tr(t,e,r,n){var i=t.display;if(!r&&"true"==Ht(e).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=e.clientX-l.left,a=e.clientY-l.top}catch(e){return null}var s,u=hr(t,o,a);if(n&&1==u.xRel&&(s=M(t.doc,u.line).text).length==u.ch){var c=f(s,s.length,t.options.tabSize)-s.length;u=I(u.line,Math.max(0,Math.round((o-Re(t.display).left)/wr(t.display))-c))}return u}function Lr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var r=t.display.view,n=0;n<r.length;n++)if((e-=r[n].size)<0)return n}function Mr(t){t.display.input.showSelection(t.display.input.prepareSelection())}function Nr(t,e){void 0===e&&(e=!0);for(var r=t.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(e||a!=r.sel.primIndex){var l=r.sel.ranges[a];if(!(l.from().line>=t.display.viewTo||l.to().line<t.display.viewFrom)){var s=l.empty();(s||t.options.showCursorWhenSelecting)&&Ar(t,l.head,i),s||Dr(t,l,o)}}return n}function Ar(t,e,r){var i=ur(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),o=r.appendChild(n("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*t.options.cursorHeight+"px",i.other){var a=r.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Or(t,e){return t.top-e.top||t.left-e.left}function Dr(t,e,r){function i(t,e,r,i){e<0&&(e=0),e=Math.round(e),i=Math.round(i),s.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==r?f-t:r)+"px;\n height: "+(i-e)+"px"))}function o(e,r,n){function o(r,n){return sr(t,I(e,r),"div",d,n)}function a(e,r,n){var i=pr(t,d,null,e),a="ltr"==r==("after"==n)?"left":"right";return o("after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),a)[a]}var s,u,d=M(l,e),p=d.text.length,g=St(d,l.direction);return kt(g,r||0,null==n?p:n,function(t,e,l,d){var m="ltr"==l,v=o(t,m?"left":"right"),y=o(e-1,m?"right":"left"),b=null==r&&0==t,w=null==n&&e==p,x=0==d,k=!g||d==g.length-1;if(y.top-v.top<=3){var C=(h?b:w)&&x,S=(h?w:b)&&k,T=C?c:(m?v:y).left,L=S?f:(m?y:v).right;i(T,v.top,L-T,v.bottom)}else{var M,N,A,O;m?(M=h&&b&&x?c:v.left,N=h?f:a(t,l,"before"),A=h?c:a(e,l,"after"),O=h&&w&&k?f:y.right):(M=h?a(t,l,"before"):c,N=!h&&b&&x?f:v.right,A=!h&&w&&k?c:y.left,O=h?a(e,l,"after"):f),i(M,v.top,N-M,v.bottom),v.bottom<y.top&&i(c,v.bottom,null,y.top),i(A,y.top,O-A,y.bottom)}(!s||Or(v,s)<0)&&(s=v),Or(y,s)<0&&(s=y),(!u||Or(v,u)<0)&&(u=v),Or(y,u)<0&&(u=y)}),{start:s,end:u}}var a=t.display,l=t.doc,s=document.createDocumentFragment(),u=Re(t.display),c=u.left,f=Math.max(a.sizerWidth,_e(t)-a.sizer.offsetLeft)-u.right,h="ltr"==l.direction,d=e.from(),p=e.to();if(d.line==p.line)o(d.line,d.ch,p.ch);else{var g=M(l,d.line),m=M(l,p.line),v=ht(g)==ht(m),y=o(d.line,d.ch,v?g.text.length+1:null).end,b=o(p.line,v?0:null,p.ch).start;v&&(y.top<b.top-2?(i(y.right,y.top,null,y.bottom),i(c,b.top,b.left,b.bottom)):i(y.right,y.top,b.left-y.right,y.bottom)),y.bottom<b.top&&i(c,y.bottom,null,b.top)}r.appendChild(s)}function Wr(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var r=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(r=!r)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Er(t){t.state.focused||(t.display.input.focus(),Ir(t))}function Pr(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Hr(t))},100)}function Ir(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Mt(t,"focus",t,e),t.state.focused=!0,l(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),xa&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Wr(t))}function Hr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Mt(t,"blur",t,e),t.state.focused=!1,za(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Fr(t){for(var e=t.display,r=e.lineDiv.offsetTop,n=0;n<e.view.length;n++){var i=e.view[n],o=t.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(ba&&wa<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-r,r=s}else{var u=i.node.getBoundingClientRect();a=u.bottom-u.top,!o&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-u.left-1)}var c=i.line.height-a;if(a<2&&(a=br(e)),(c>.005||c<-.005)&&(O(i.line,a),zr(i.line),i.rest))for(var f=0;f<i.rest.length;f++)zr(i.rest[f]);if(l>t.display.sizerWidth){var h=Math.ceil(l/wr(t.display));h>t.display.maxLineLength&&(t.display.maxLineLength=h,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function zr(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var r=t.widgets[e],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Rr(t,e,r){var n=r&&null!=r.top?Math.max(0,r.top):t.scroller.scrollTop;n=Math.floor(n-Fe(t));var i=r&&null!=r.bottom?r.bottom:n+t.wrapper.clientHeight,o=W(e,n),a=W(e,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=W(e,bt(M(e,l))+t.wrapper.clientHeight)):Math.min(s,e.lastLine())>=a&&(o=W(e,bt(M(e,s))-t.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Br(t){var e=t.display,r=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var n=kr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){t.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=n+i+"px")}}function _r(t){if(!t.options.lineNumbers)return!1;var e=t.doc,r=P(t.options,e.first+e.size-1),i=t.display;if(r.length!=i.lineNumChars){var o=i.measure.appendChild(n("div",[n("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,l=o.offsetWidth-a;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(a,i.lineGutter.offsetWidth-l)+1,i.lineNumWidth=i.lineNumInnerWidth+l,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",En(t),!0}return!1}function jr(t,e){if(!Nt(t,"scrollCursorIntoView")){var r=t.display,i=r.sizer.getBoundingClientRect(),o=null;if(e.top+i.top<0?o=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ma){
3
+ var a=n("div","​",null,"position: absolute;\n top: "+(e.top-r.viewOffset-Fe(t.display))+"px;\n height: "+(e.bottom-e.top+Be(t)+r.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(a),a.scrollIntoView(o),t.display.lineSpace.removeChild(a)}}}function Ur(t,e,r,n){null==n&&(n=0);var i;t.options.lineWrapping||e!=r||(e=e.ch?I(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,r="before"==e.sticky?I(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,l=ur(t,e),s=r&&r!=e?ur(t,r):l;i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n};var u=Vr(t,i),c=t.doc.scrollTop,f=t.doc.scrollLeft;if(null!=u.scrollTop&&(Qr(t,u.scrollTop),Math.abs(t.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(tn(t,u.scrollLeft),Math.abs(t.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}function Gr(t,e){var r=Vr(t,e);null!=r.scrollTop&&Qr(t,r.scrollTop),null!=r.scrollLeft&&tn(t,r.scrollLeft)}function Vr(t,e){var r=t.display,n=br(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:r.scroller.scrollTop,o=je(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var l=t.doc.height+ze(r),s=e.top<n,u=e.bottom>l-n;if(e.top<i)a.scrollTop=s?0:e.top;else if(e.bottom>i+o){var c=Math.min(e.top,(u?l:e.bottom)-o);c!=i&&(a.scrollTop=c)}var f=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:r.scroller.scrollLeft,h=_e(t)-(t.options.fixedGutter?r.gutters.offsetWidth:0),d=e.right-e.left>h;return d&&(e.right=e.left+h),e.left<10?a.scrollLeft=0:e.left<f?a.scrollLeft=Math.max(0,e.left-(d?0:10)):e.right>h+f-3&&(a.scrollLeft=e.right+(d?0:10)-h),a}function $r(t,e){null!=e&&(Yr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Kr(t){Yr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function qr(t,e,r){null==e&&null==r||Yr(t),null!=e&&(t.curOp.scrollLeft=e),null!=r&&(t.curOp.scrollTop=r)}function Xr(t,e){Yr(t),t.curOp.scrollToPos=e}function Yr(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Zr(t,cr(t,e.from),cr(t,e.to),e.margin)}}function Zr(t,e,r,n){var i=Vr(t,{left:Math.min(e.left,r.left),top:Math.min(e.top,r.top)-n,right:Math.max(e.right,r.right),bottom:Math.max(e.bottom,r.bottom)+n});qr(t,i.scrollLeft,i.scrollTop)}function Qr(t,e){Math.abs(t.doc.scrollTop-e)<2||(ga||Dn(t,{top:e}),Jr(t,e,!0),ga&&Dn(t),Sn(t,100))}function Jr(t,e,r){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||r)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function tn(t,e,r,n){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(r?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!n||(t.doc.scrollLeft=e,Br(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function en(t){var e=t.display,r=e.gutters.offsetWidth,n=Math.round(t.doc.height+ze(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Be(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:r}}function rn(t,e){e||(e=en(t));var r=t.display.barWidth,n=t.display.barHeight;nn(t,e);for(var i=0;i<4&&r!=t.display.barWidth||n!=t.display.barHeight;i++)r!=t.display.barWidth&&t.options.lineWrapping&&Fr(t),nn(t,en(t)),r=t.display.barWidth,n=t.display.barHeight}function nn(t,e){var r=t.display,n=r.scrollbars.update(e);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=e.gutterWidth+"px"):r.gutterFiller.style.display=""}function on(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&za(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Sl[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),rl(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,r){"horizontal"==r?tn(t,e):Qr(t,e)},t),t.display.scrollbars.addClass&&l(t.display.wrapper,t.display.scrollbars.addClass)}function an(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Tl},ye(t.curOp)}function ln(t){var e=t.curOp;e&&we(e,function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;sn(t)})}function sn(t){for(var e=t.ops,r=0;r<e.length;r++)un(e[r]);for(var n=0;n<e.length;n++)cn(e[n]);for(var i=0;i<e.length;i++)fn(e[i]);for(var o=0;o<e.length;o++)hn(e[o]);for(var a=0;a<e.length;a++)dn(e[a])}function un(t){var e=t.cm,r=e.display;Ln(e),t.updateMaxLine&&xt(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<r.viewFrom||t.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Ll(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function cn(t){t.updatedDisplay=t.mustUpdate&&An(t.cm,t.update)}function fn(t){var e=t.cm,r=e.display;t.updatedDisplay&&Fr(e),t.barMeasure=en(e),r.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=$e(e,r.maxLine,r.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+t.adjustWidthTo+Be(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+t.adjustWidthTo-_e(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=r.input.prepareSelection())}function hn(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&tn(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var r=t.focus&&t.focus==a();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,r),(t.updatedDisplay||t.startHeight!=e.doc.height)&&rn(e,t.barMeasure),t.updatedDisplay&&Pn(e,t.barMeasure),t.selectionChanged&&Wr(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),r&&Er(t.cm)}function dn(t){var e=t.cm,r=e.display,n=e.doc;if(t.updatedDisplay&&On(e,t.update),null==r.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=t.scrollTop&&Jr(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&tn(e,t.scrollLeft,!0,!0),t.scrollToPos){jr(e,Ur(e,j(n,t.scrollToPos.from),j(n,t.scrollToPos.to),t.scrollToPos.margin))}var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||Mt(i[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&Mt(o[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&Mt(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function pn(t,e){if(t.curOp)return e();an(t);try{return e()}finally{ln(t)}}function gn(t,e){return function(){if(t.curOp)return e.apply(t,arguments);an(t);try{return e.apply(t,arguments)}finally{ln(t)}}}function mn(t){return function(){if(this.curOp)return t.apply(this,arguments);an(this);try{return t.apply(this,arguments)}finally{ln(this)}}}function vn(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);an(e);try{return t.apply(this,arguments)}finally{ln(e)}}}function yn(t,e,r,n){null==e&&(e=t.doc.first),null==r&&(r=t.doc.first+t.doc.size),n||(n=0);var i=t.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>e)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Qa&&gt(t.doc,e)<i.viewTo&&wn(t);else if(r<=i.viewFrom)Qa&&mt(t.doc,r+n)>i.viewFrom?wn(t):(i.viewFrom+=n,i.viewTo+=n);else if(e<=i.viewFrom&&r>=i.viewTo)wn(t);else if(e<=i.viewFrom){var o=xn(t,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):wn(t)}else if(r>=i.viewTo){var a=xn(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):wn(t)}else{var l=xn(t,e,e,-1),s=xn(t,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(ve(t,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):wn(t)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:e<u.lineN+u.size&&(i.externalMeasured=null))}function bn(t,e,r){t.curOp.viewChanged=!0;var n=t.display,i=t.display.externalMeasured;if(i&&e>=i.lineN&&e<i.lineN+i.size&&(n.externalMeasured=null),!(e<n.viewFrom||e>=n.viewTo)){var o=n.view[Lr(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==h(a,r)&&a.push(r)}}}function wn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function xn(t,e,r,n){var i,o=Lr(t,e),a=t.display.view;if(!Qa||r==t.doc.first+t.doc.size)return{index:o,lineN:r};for(var l=t.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=e){if(n>0){if(o==a.length-1)return null;i=l+a[o].size-e,o++}else i=l-e;e+=i,r+=i}for(;gt(t.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function kn(t,e,r){var n=t.display;0==n.view.length||e>=n.viewTo||r<=n.viewFrom?(n.view=ve(t,e,r),n.viewFrom=e):(n.viewFrom>e?n.view=ve(t,e,n.viewFrom).concat(n.view):n.viewFrom<e&&(n.view=n.view.slice(Lr(t,e))),n.viewFrom=e,n.viewTo<r?n.view=n.view.concat(ve(t,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Lr(t,r)))),n.viewTo=r}function Cn(t){for(var e=t.display.view,r=0,n=0;n<e.length;n++){var i=e[n];i.hidden||i.node&&!i.changes||++r}return r}function Sn(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,u(Tn,t))}function Tn(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var r=+new Date+t.options.workTime,n=Zt(t,e.highlightFrontier),i=[];e.iter(n.line,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(n.line>=t.display.viewFrom){var a=o.styles,l=o.text.length>t.options.maxHighlightLength?$t(e.mode,n.state):null,s=Xt(t,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!f&&h<a.length;++h)f=a[h]!=o.styles[h];f&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=t.options.maxHighlightLength&&Qt(t,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Sn(t,t.options.workDelay),!0}),e.highlightFrontier=n.line,e.modeFrontier=Math.max(e.modeFrontier,n.line),i.length&&pn(t,function(){for(var e=0;e<i.length;e++)bn(t,i[e],"text")})}}function Ln(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Be(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Be(t)+"px",e.scrollbarsClipped=!0)}function Mn(t){if(t.hasFocus())return null;var e=a();if(!e||!o(t.display.lineDiv,e))return null;var r={activeElt:e};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&o(t.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Nn(t){if(t&&t.activeElt&&t.activeElt!=a()&&(t.activeElt.focus(),t.anchorNode&&o(document.body,t.anchorNode)&&o(document.body,t.focusNode))){var e=window.getSelection(),r=document.createRange();r.setEnd(t.anchorNode,t.anchorOffset),r.collapse(!1),e.removeAllRanges(),e.addRange(r),e.extend(t.focusNode,t.focusOffset)}}function An(t,r){var n=t.display,i=t.doc;if(r.editorIsHidden)return wn(t),!1;if(!r.force&&r.visible.from>=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Cn(t))return!1;_r(t)&&(wn(t),r.dims=xr(t));var o=i.first+i.size,a=Math.max(r.visible.from-t.options.viewportMargin,i.first),l=Math.min(o,r.visible.to+t.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(i.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(o,n.viewTo)),Qa&&(a=gt(t.doc,a),l=mt(t.doc,l));var s=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;kn(t,a,l),n.viewOffset=bt(M(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var u=Cn(t);if(!s&&0==u&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Mn(t);return u>4&&(n.lineDiv.style.display="none"),Wn(t,n.updateLineNumbers,r.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Nn(c),e(n.cursorDiv),e(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,Sn(t,400)),n.updateLineNumbers=null,!0}function On(t,e){for(var r=e.viewport,n=!0;(n&&t.options.lineWrapping&&e.oldDisplayWidth!=_e(t)||(r&&null!=r.top&&(r={top:Math.min(t.doc.height+ze(t.display)-je(t),r.top)}),e.visible=Rr(t.display,t.doc,r),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&An(t,e);n=!1){Fr(t);var i=en(t);Mr(t),rn(t,i),Pn(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Dn(t,e){var r=new Ll(t,e);if(An(t,r)){Fr(t),On(t,r);var n=en(t);Mr(t),rn(t,n),Pn(t,n),r.finish()}}function Wn(t,r,n){function i(e){var r=e.nextSibling;return xa&&Da&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),r}for(var o=t.display,a=t.options.lineNumbers,l=o.lineDiv,s=l.firstChild,u=o.view,c=o.viewFrom,f=0;f<u.length;f++){var d=u[f];if(d.hidden);else if(d.node&&d.node.parentNode==l){for(;s!=d.node;)s=i(s);var p=a&&null!=r&&r<=c&&d.lineNumber;d.changes&&(h(d.changes,"gutter")>-1&&(p=!1),Ce(t,d,c,n)),p&&(e(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(P(t.options,c)))),s=d.node.nextSibling}else{var g=De(t,d,c,n);l.insertBefore(g,s)}c+=d.size}for(;s;)s=i(s)}function En(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Pn(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Be(t)+"px"}function In(t){var r=t.display.gutters,i=t.options.gutters;e(r);for(var o=0;o<i.length;++o){var a=i[o],l=r.appendChild(n("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(t.display.lineGutter=l,l.style.width=(t.display.lineNumWidth||1)+"px")}r.style.display=o?"":"none",En(t)}function Hn(t){var e=h(t.gutters,"CodeMirror-linenumbers");-1==e&&t.lineNumbers?t.gutters=t.gutters.concat(["CodeMirror-linenumbers"]):e>-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function Fn(t){var e=t.wheelDeltaX,r=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==r&&t.detail&&t.axis==t.VERTICAL_AXIS?r=t.detail:null==r&&(r=t.wheelDelta),{x:e,y:r}}function zn(t){var e=Fn(t);return e.x*=Nl,e.y*=Nl,e}function Rn(t,e){var r=Fn(e),n=r.x,i=r.y,o=t.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&Da&&xa)t:for(var u=e.target,c=o.view;u!=a;u=u.parentNode)for(var f=0;f<c.length;f++)if(c[f].node==u){t.display.currentWheelTarget=u;break t}if(n&&!ga&&!Sa&&null!=Nl)return i&&s&&Qr(t,Math.max(0,a.scrollTop+i*Nl)),tn(t,Math.max(0,a.scrollLeft+n*Nl)),(!i||i&&s)&&Wt(e),void(o.wheelStartX=null);if(i&&null!=Nl){var h=i*Nl,d=t.doc.scrollTop,p=d+o.wrapper.clientHeight;h<0?d=Math.max(0,d+h-50):p=Math.min(t.doc.height,p+h+50),Dn(t,{top:d,bottom:p})}Ml<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var t=a.scrollLeft-o.wheelStartX,e=a.scrollTop-o.wheelStartY,r=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(Nl=(Nl*Ml+r)/(Ml+1),++Ml)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function Bn(t,e,r){var n=t&&t.options.selectionsMayTouch,i=e[r];e.sort(function(t,e){return H(t.from(),e.from())}),r=h(e,i);for(var o=1;o<e.length;o++){var a=e[o],l=e[o-1],s=H(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=B(l.from(),a.from()),c=R(l.to(),a.to()),f=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,e.splice(--o,2,new Ol(f?c:u,f?u:c))}}return new Al(e,r)}function _n(t,e){return new Al([new Ol(t,e||t)],0)}function jn(t){return t.text?I(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Un(t,e){if(H(t,e.from)<0)return t;if(H(t,e.to)<=0)return jn(e);var r=t.line+e.text.length-(e.to.line-e.from.line)-1,n=t.ch;return t.line==e.to.line&&(n+=jn(e).ch-e.to.ch),I(r,n)}function Gn(t,e){for(var r=[],n=0;n<t.sel.ranges.length;n++){var i=t.sel.ranges[n];r.push(new Ol(Un(i.anchor,e),Un(i.head,e)))}return Bn(t.cm,r,t.sel.primIndex)}function Vn(t,e,r){return t.line==e.line?I(r.line,t.ch-e.ch+r.ch):I(r.line+(t.line-e.line),t.ch)}function $n(t,e,r){for(var n=[],i=I(t.first,0),o=i,a=0;a<e.length;a++){var l=e[a],s=Vn(l.from,i,o),u=Vn(jn(l),i,o);if(i=l.to,o=u,"around"==r){var c=t.sel.ranges[a],f=H(c.head,c.anchor)<0;n[a]=new Ol(f?u:s,f?s:u)}else n[a]=new Ol(s,s)}return new Al(n,t.sel.primIndex)}function Kn(t){t.doc.mode=Gt(t.options,t.doc.modeOption),qn(t)}function qn(t){t.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,Sn(t,100),t.state.modeGen++,t.curOp&&yn(t)}function Xn(t,e){return 0==e.from.ch&&0==e.to.ch&&""==g(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Yn(t,e,r,n){function i(t){return r?r[t]:null}function o(t,r,i){ae(t,r,i,n),xe(t,"change",t,e)}function a(t,e){for(var r=[],o=t;o<e;++o)r.push(new gl(u[o],i(o),n));return r}var l=e.from,s=e.to,u=e.text,c=M(t,l.line),f=M(t,s.line),h=g(u),d=i(u.length-1),p=s.line-l.line;if(e.full)t.insert(0,a(0,u.length)),t.remove(u.length,t.size-u.length);else if(Xn(t,e)){var m=a(0,u.length-1);o(f,f.text,d),p&&t.remove(l.line,p),m.length&&t.insert(l.line,m)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,l.ch)+h+c.text.slice(s.ch),d);else{var v=a(1,u.length-1);v.push(new gl(h+c.text.slice(s.ch),d,n)),o(c,c.text.slice(0,l.ch)+u[0],i(0)),t.insert(l.line+1,v)}else if(1==u.length)o(c,c.text.slice(0,l.ch)+u[0]+f.text.slice(s.ch),i(0)),t.remove(l.line+1,p);else{o(c,c.text.slice(0,l.ch)+u[0],i(0)),o(f,h+f.text.slice(s.ch),d);var y=a(1,u.length-1);p>1&&t.remove(l.line+1,p-1),t.insert(l.line+1,y)}xe(t,"change",t,e)}function Zn(t,e,r){function n(t,i,o){if(t.linked)for(var a=0;a<t.linked.length;++a){var l=t.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;r&&!s||(e(l.doc,s),n(l.doc,t,s))}}}n(t,null,!0)}function Qn(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,Sr(t),Kn(t),Jn(t),t.options.lineWrapping||xt(t),t.options.mode=e.modeOption,yn(t)}function Jn(t){("rtl"==t.doc.direction?l:za)(t.display.lineDiv,"CodeMirror-rtl")}function ti(t){pn(t,function(){Jn(t),yn(t)})}function ei(t){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t||1}function ri(t,e){var r={from:z(e.from),to:jn(e),text:N(t,e.from,e.to)};return ui(t,r,e.from.line,e.to.line+1),Zn(t,function(t){return ui(t,r,e.from.line,e.to.line+1)},!0),r}function ni(t){for(;t.length;){if(!g(t).ranges)break;t.pop()}}function ii(t,e){return e?(ni(t.done),g(t.done)):t.done.length&&!g(t.done).ranges?g(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function oi(t,e,r,n){var i=t.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&i.lastModTime>l-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=ii(i,i.lastOp==n)))a=g(o.changes),0==H(e.from,e.to)&&0==H(e.from,a.to)?a.to=jn(e):o.changes.push(ri(t,e));else{var s=g(i.done);for(s&&s.ranges||si(t.sel,i.done),o={changes:[ri(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=e.origin,a||Mt(t,"historyAdded")}function ai(t,e,r,n){var i=e.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function li(t,e,r,n){var i=t.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ai(t,o,g(i.done),e))?i.done[i.done.length-1]=e:si(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&ni(i.undone)}function si(t,e){var r=g(e);r&&r.ranges&&r.equals(t)||e.push(t)}function ui(t,e,r,n){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,r),Math.min(t.first+t.size,n),function(r){r.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=r.markedSpans),++o})}function ci(t){if(!t)return null;for(var e,r=0;r<t.length;++r)t[r].marker.explicitlyCleared?e||(e=t.slice(0,r)):e&&e.push(t[r]);return e?e.length?e:null:t}function fi(t,e){var r=e["spans_"+t.id];if(!r)return null;for(var n=[],i=0;i<e.text.length;++i)n.push(ci(r[i]));return n}function hi(t,e){var r=fi(t,e),n=J(t,e);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)t:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue t;o.push(s)}else a&&(r[i]=a)}return r}function di(t,e,r){for(var n=[],i=0;i<t.length;++i){var o=t[i];if(o.ranges)n.push(r?Al.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],c=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),e)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&h(e,Number(c[1]))>-1&&(g(l)[f]=u[f],delete u[f])}}}return n}function pi(t,e,r,n){if(n){var i=t.anchor;if(r){var o=H(e,i)<0;o!=H(r,i)<0?(i=e,e=r):o!=H(e,r)<0&&(e=r)}return new Ol(i,e)}return new Ol(r||e,e)}function gi(t,e,r,n,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),xi(t,new Al([pi(t.sel.primary(),e,r,i)],0),n)}function mi(t,e,r){for(var n=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)n[o]=pi(t.sel.ranges[o],e[o],null,i);xi(t,Bn(t.cm,n,t.sel.primIndex),r)}function vi(t,e,r,n){var i=t.sel.ranges.slice(0);i[e]=r,xi(t,Bn(t.cm,i,t.sel.primIndex),n)}function yi(t,e,r,n){xi(t,_n(e,r),n)}function bi(t,e,r){var n={ranges:e.ranges,update:function(e){var r=this;this.ranges=[];for(var n=0;n<e.length;n++)r.ranges[n]=new Ol(j(t,e[n].anchor),j(t,e[n].head))},origin:r&&r.origin};return Mt(t,"beforeSelectionChange",t,n),t.cm&&Mt(t.cm,"beforeSelectionChange",t.cm,n),n.ranges!=e.ranges?Bn(t.cm,n.ranges,n.ranges.length-1):e}function wi(t,e,r){var n=t.history.done,i=g(n);i&&i.ranges?(n[n.length-1]=e,ki(t,e,r)):xi(t,e,r)}function xi(t,e,r){ki(t,e,r),li(t,t.sel,t.cm?t.cm.curOp.id:NaN,r)}function ki(t,e,r){(Ot(t,"beforeSelectionChange")||t.cm&&Ot(t.cm,"beforeSelectionChange"))&&(e=bi(t,e,r)),Ci(t,Ti(t,e,r&&r.bias||(H(e.primary().head,t.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!t.cm||Kr(t.cm)}function Ci(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,At(t.cm)),xe(t,"cursorActivity",t))}function Si(t){Ci(t,Ti(t,t.sel,null,!1))}function Ti(t,e,r,n){for(var i,o=0;o<e.ranges.length;o++){var a=e.ranges[o],l=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],s=Mi(t,a.anchor,l&&l.anchor,r,n),u=Mi(t,a.head,l&&l.head,r,n);(i||s!=a.anchor||u!=a.head)&&(i||(i=e.ranges.slice(0,o)),i[o]=new Ol(s,u))}return i?Bn(t.cm,i,e.primIndex):e}function Li(t,e,r,n,i){var o=M(t,e.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=e.ch:l.from<e.ch))&&(null==l.to||(s.inclusiveRight?l.to>=e.ch:l.to>e.ch))){if(i&&(Mt(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var u=s.find(n<0?1:-1),c=void 0;if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(u=Ni(t,u,-n,u&&u.line==e.line?o:null)),u&&u.line==e.line&&(c=H(u,r))&&(n<0?c<0:c>0))return Li(t,u,e,n,i)}var f=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(f=Ni(t,f,n,f.line==e.line?o:null)),f?Li(t,f,e,n,i):null}}return e}function Mi(t,e,r,n,i){var o=n||1,a=Li(t,e,r,o,i)||!i&&Li(t,e,r,o,!0)||Li(t,e,r,-o,i)||!i&&Li(t,e,r,-o,!0);return a||(t.cantEdit=!0,I(t.first,0))}function Ni(t,e,r,n){return r<0&&0==e.ch?e.line>t.first?j(t,I(e.line-1)):null:r>0&&e.ch==(n||M(t,e.line)).text.length?e.line<t.first+t.size-1?I(e.line+1,0):null:new I(e.line,e.ch+r)}function Ai(t){t.setSelection(I(t.firstLine(),0),I(t.lastLine()),Va)}function Oi(t,e,r){var n={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(e,r,i,o){e&&(n.from=j(t,e)),r&&(n.to=j(t,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),Mt(t,"beforeChange",t,n),t.cm&&Mt(t.cm,"beforeChange",t.cm,n),n.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Di(t,e,r){if(t.cm){if(!t.cm.curOp)return gn(t.cm,Di)(t,e,r);if(t.cm.state.suppressEdits)return}if(!(Ot(t,"beforeChange")||t.cm&&Ot(t.cm,"beforeChange"))||(e=Oi(t,e,!0))){var n=Za&&!r&&et(t,e.from,e.to);if(n)for(var i=n.length-1;i>=0;--i)Wi(t,{from:n[i].from,to:n[i].to,text:i?[""]:e.text,origin:e.origin});else Wi(t,e)}}function Wi(t,e){if(1!=e.text.length||""!=e.text[0]||0!=H(e.from,e.to)){var r=Gn(t,e);oi(t,e,r,t.cm?t.cm.curOp.id:NaN),Ii(t,e,r,J(t,e));var n=[];Zn(t,function(t,r){r||-1!=h(n,t.history)||(Bi(t.history,e),n.push(t.history)),Ii(t,e,null,J(t,e))})}}function Ei(t,e,r){var n=t.cm&&t.cm.state.suppressEdits;if(!n||r){for(var i,o=t.history,a=t.sel,l="undo"==e?o.done:o.undone,s="undo"==e?o.undone:o.done,u=0;u<l.length&&(i=l[u],r?!i.ranges||i.equals(t.sel):i.ranges);u++);if(u!=l.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(i=l.pop(),!i.ranges){if(n)return void l.push(i);break}if(si(i,s),r&&!i.equals(t.sel))return void xi(t,i,{clearRedo:!1});a=i}var c=[];si(a,s),s.push({changes:c,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var f=Ot(t,"beforeChange")||t.cm&&Ot(t.cm,"beforeChange"),d=i.changes.length-1;d>=0;--d){var p=function(r){var n=i.changes[r];if(n.origin=e,f&&!Oi(t,n,!1))return l.length=0,{};c.push(ri(t,n));var o=r?Gn(t,n):g(l);Ii(t,n,o,hi(t,n)),!r&&t.cm&&t.cm.scrollIntoView({from:n.from,to:jn(n)});var a=[];Zn(t,function(t,e){e||-1!=h(a,t.history)||(Bi(t.history,n),a.push(t.history)),Ii(t,n,null,hi(t,n))})}(d);if(p)return p.v}}}}function Pi(t,e){if(0!=e&&(t.first+=e,t.sel=new Al(m(t.sel.ranges,function(t){return new Ol(I(t.anchor.line+e,t.anchor.ch),I(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){yn(t.cm,t.first,t.first-e,e);for(var r=t.cm.display,n=r.viewFrom;n<r.viewTo;n++)bn(t.cm,n,"gutter")}}function Ii(t,e,r,n){if(t.cm&&!t.cm.curOp)return gn(t.cm,Ii)(t,e,r,n);if(e.to.line<t.first)return void Pi(t,e.text.length-1-(e.to.line-e.from.line));if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var i=e.text.length-1-(t.first-e.from.line);Pi(t,i),e={from:I(t.first,0),to:I(e.to.line+i,e.to.ch),text:[g(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:I(o,M(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=N(t,e.from,e.to),r||(r=Gn(t,e)),t.cm?Hi(t.cm,e,n):Yn(t,e,n),ki(t,r,Va)}}function Hi(t,e,r){var n=t.doc,i=t.display,o=e.from,a=e.to,l=!1,s=o.line;t.options.lineWrapping||(s=D(ht(M(n,o.line))),n.iter(s,a.line+1,function(t){if(t==i.maxLine)return l=!0,!0})),n.sel.contains(e.from,e.to)>-1&&At(t),Yn(n,e,r,Cr(t)),t.options.lineWrapping||(n.iter(s,o.line+e.text.length,function(t){var e=wt(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,l=!1)}),l&&(t.curOp.updateMaxLine=!0)),oe(n,o.line),Sn(t,400);var u=e.text.length-(a.line-o.line)-1;e.full?yn(t):o.line!=a.line||1!=e.text.length||Xn(t.doc,e)?yn(t,o.line,a.line+1,u):bn(t,o.line,"text");var c=Ot(t,"changes"),f=Ot(t,"change");if(f||c){var h={from:o,to:a,text:e.text,removed:e.removed,origin:e.origin};f&&xe(t,"change",t,h),c&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(h)}t.display.selForContextMenu=null}function Fi(t,e,r,n,i){var o;n||(n=r),H(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),"string"==typeof e&&(e=t.splitLines(e)),Di(t,{from:r,to:n,text:e,origin:i})}function zi(t,e,r,n){r<t.line?t.line+=n:e<t.line&&(t.line=e,t.ch=0)}function Ri(t,e,r,n){for(var i=0;i<t.length;++i){var o=t[i],a=!0;if(o.ranges){o.copied||(o=t[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)zi(o.ranges[l].anchor,e,r,n),zi(o.ranges[l].head,e,r,n)}else{for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(r<u.from.line)u.from=I(u.from.line+n,u.from.ch),u.to=I(u.to.line+n,u.to.ch);else if(e<=u.to.line){a=!1;break}}a||(t.splice(0,i+1),i=0)}}}function Bi(t,e){var r=e.from.line,n=e.to.line,i=e.text.length-(n-r)-1;Ri(t.done,r,n,i),Ri(t.undone,r,n,i)}function _i(t,e,r,n){var i=e,o=e;return"number"==typeof e?o=M(t,_(t,e)):i=D(e),null==i?null:(n(o,i)&&t.cm&&bn(t.cm,i,r),o)}function ji(t){var e=this;this.lines=t,this.parent=null;for(var r=0,n=0;n<t.length;++n)t[n].parent=e,r+=t[n].height;this.height=r}function Ui(t){var e=this;this.children=t;for(var r=0,n=0,i=0;i<t.length;++i){var o=t[i];r+=o.chunkSize(),n+=o.height,o.parent=e}this.size=r,this.height=n,this.parent=null}function Gi(t,e,r){bt(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&$r(t,r)}function Vi(t,e,r,n){var i=new Dl(t,r,n),o=t.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),_i(t,e,"widget",function(e){var r=e.widgets||(e.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=e,o&&!vt(t,e)){var n=bt(e)<t.scrollTop;O(e,e.height+Ie(i)),n&&$r(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&xe(o,"lineWidgetAdded",o,i,"number"==typeof e?e:D(e)),i}function $i(t,e,r,n,o){if(n&&n.shared)return Ki(t,e,r,n,o);if(t.cm&&!t.cm.curOp)return gn(t.cm,$i)(t,e,r,n,o);var a=new El(t,o),l=H(e,r);if(n&&c(n,a,!1),l>0||0==l&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=i("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ft(t,e.line,e,r,a)||e.line!=r.line&&ft(t,r.line,e,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");$()}a.addToHistory&&oi(t,{from:e,to:r,origin:"markText"},t.sel,NaN);var s,u=e.line,f=t.cm;if(t.iter(u,r.line+1,function(t){f&&a.collapsed&&!f.options.lineWrapping&&ht(t)==f.display.maxLine&&(s=!0),a.collapsed&&u!=e.line&&O(t,0),Y(t,new K(a,u==e.line?e.ch:null,u==r.line?r.ch:null)),++u}),a.collapsed&&t.iter(e.line,r.line+1,function(e){vt(t,e)&&O(e,0)}),a.clearOnEnter&&rl(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(V(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++Wl,a.atomic=!0),f){
4
+ if(s&&(f.curOp.updateMaxLine=!0),a.collapsed)yn(f,e.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var h=e.line;h<=r.line;h++)bn(f,h,"text");a.atomic&&Si(f.doc),xe(f,"markerAdded",f,a)}return a}function Ki(t,e,r,n,i){n=c(n),n.shared=!1;var o=[$i(t,e,r,n,i)],a=o[0],l=n.widgetNode;return Zn(t,function(t){l&&(n.widgetNode=l.cloneNode(!0)),o.push($i(t,j(t,e),j(t,r),n,i));for(var s=0;s<t.linked.length;++s)if(t.linked[s].isParent)return;a=g(o)}),new Pl(o,a)}function qi(t){return t.findMarks(I(t.first,0),t.clipPos(I(t.lastLine())),function(t){return t.parent})}function Xi(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=n.find(),o=t.clipPos(i.from),a=t.clipPos(i.to);if(H(o,a)){var l=$i(t,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Yi(t){for(var e=0;e<t.length;e++)!function(e){var r=t[e],n=[r.primary.doc];Zn(r.primary.doc,function(t){return n.push(t)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==h(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}}(e)}function Zi(t){var e=this;if(to(e),!Nt(e,t)&&!He(e.display,t)){Wt(t),ba&&(Fl=+new Date);var r=Tr(e,t,!0),n=t.dataTransfer.files;if(r&&!e.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=0;l<i;++l)!function(t,n){if(!e.options.allowDropFileTypes||-1!=h(e.options.allowDropFileTypes,t.type)){var l=new FileReader;l.onload=gn(e,function(){var t=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t)&&(t=""),o[n]=t,++a==i){r=j(e.doc,r);var s={from:r,to:r,text:e.doc.splitLines(o.join(e.doc.lineSeparator())),origin:"paste"};Di(e.doc,s),wi(e.doc,_n(r,jn(s)))}}),l.readAsText(t)}}(n[l],l);else{if(e.state.draggingText&&e.doc.sel.contains(r)>-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var s=t.dataTransfer.getData("Text");if(s){var u;if(e.state.draggingText&&!e.state.draggingText.copy&&(u=e.listSelections()),ki(e.doc,_n(r,r)),u)for(var c=0;c<u.length;++c)Fi(e.doc,"",u[c].anchor,u[c].head,"drag");e.replaceSelection(s,"around","paste"),e.display.input.focus()}}catch(t){}}}}function Qi(t,e){if(ba&&(!t.state.draggingText||+new Date-Fl<100))return void It(e);if(!Nt(t,e)&&!He(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!Ta)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Sa&&(r.width=r.height=1,t.display.wrapper.appendChild(r),r._top=r.offsetTop),e.dataTransfer.setDragImage(r,0,0),Sa&&r.parentNode.removeChild(r)}}function Ji(t,e){var i=Tr(t,e);if(i){var o=document.createDocumentFragment();Ar(t,i,o),t.display.dragCursor||(t.display.dragCursor=n("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),r(t.display.dragCursor,o)}}function to(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function eo(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<e.length;n++){var i=e[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var e=0;e<r.length;e++)t(r[e])})}}function ro(){zl||(no(),zl=!0)}function no(){var t;rl(window,"resize",function(){null==t&&(t=setTimeout(function(){t=null,eo(io)},100))}),rl(window,"blur",function(){return eo(Hr)})}function io(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}function oo(t){var e=t.split(/-(?!$)/);t=e[e.length-1];for(var r,n,i,o,a=0;a<e.length-1;a++){var l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i=!0}}return r&&(t="Alt-"+t),n&&(t="Ctrl-"+t),o&&(t="Cmd-"+t),i&&(t="Shift-"+t),t}function ao(t){var e={};for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete t[r];continue}for(var i=m(r.split(" "),oo),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=e[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else e[l]=a}delete t[r]}for(var u in e)t[u]=e[u];return t}function lo(t,e,r,n){e=fo(e);var i=e.call?e.call(t,n):e[t];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return lo(t,e.fallthrough,r,n);for(var o=0;o<e.fallthrough.length;o++){var a=lo(t,e.fallthrough[o],r,n);if(a)return a}}}function so(t){var e="string"==typeof t?t:Rl[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function uo(t,e,r){var n=t;return e.altKey&&"Alt"!=n&&(t="Alt-"+t),(Ha?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(t="Ctrl-"+t),(Ha?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(t="Cmd-"+t),!r&&e.shiftKey&&"Shift"!=n&&(t="Shift-"+t),t}function co(t,e){if(Sa&&34==t.keyCode&&t.char)return!1;var r=Rl[t.keyCode];return null!=r&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(r=t.code),uo(r,t,e))}function fo(t){return"string"==typeof t?Ul[t]:t}function ho(t,e){for(var r=t.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=e(r[i]);n.length&&H(o.from,g(n).to)<=0;){var a=n.pop();if(H(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}pn(t,function(){for(var e=n.length-1;e>=0;e--)Fi(t.doc,"",n[e].from,n[e].to,"+delete");Kr(t)})}function po(t,e,r){var n=S(t.text,e+r,r);return n<0||n>t.text.length?null:n}function go(t,e,r){var n=po(t,e.ch,r);return null==n?null:new I(e.line,n,r<0?"after":"before")}function mo(t,e,r,n,i){if(t){var o=St(r,e.doc.direction);if(o){var a,l=i<0?g(o):o[0],s=i<0==(1==l.level),u=s?"after":"before";if(l.level>0||"rtl"==e.doc.direction){var c=qe(e,r);a=i<0?r.text.length-1:0;var f=Xe(e,c,a).top;a=T(function(t){return Xe(e,c,t).top==f},i<0==(1==l.level)?l.from:l.to-1,a),"before"==u&&(a=po(r,a,1))}else a=i<0?l.to:l.from;return new I(n,a,u)}}return new I(n,i<0?r.text.length:0,i<0?"before":"after")}function vo(t,e,r,n){var i=St(e,t.doc.direction);if(!i)return go(e,r,n);r.ch>=e.text.length?(r.ch=e.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ct(i,r.ch,r.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return go(e,r,n);var l,s=function(t,r){return po(e,t instanceof I?t.ch:t,r)},u=function(r){return t.options.lineWrapping?(l=l||qe(t,e),pr(t,e,l,r)):{begin:0,end:e.text.length}},c=u("before"==r.sticky?s(r,-1):r.ch);if("rtl"==t.doc.direction||1==a.level){var f=1==a.level==n<0,h=s(r,f?1:-1);if(null!=h&&(f?h<=a.to&&h<=c.end:h>=a.from&&h>=c.begin)){var d=f?"before":"after";return new I(r.line,h,d)}}var p=function(t,e,n){for(var o=function(t,e){return e?new I(r.line,s(t,1),"before"):new I(r.line,t,"after")};t>=0&&t<i.length;t+=e){var a=i[t],l=e>0==(1!=a.level),u=l?n.begin:s(n.end,-1);if(a.from<=u&&u<a.to)return o(u,l);if(u=l?a.from:s(a.to,-1),n.begin<=u&&u<n.end)return o(u,l)}},g=p(o+n,n,c);if(g)return g;var m=n>0?c.end:s(c.begin,-1);return null==m||n>0&&m==e.text.length||!(g=p(n>0?0:i.length-1,n,u(m)))?null:g}function yo(t,e){var r=M(t.doc,e),n=ht(r);return n!=r&&(e=D(n)),mo(!0,t,n,e,1)}function bo(t,e){var r=M(t.doc,e),n=dt(r);return n!=r&&(e=D(n)),mo(!0,t,r,e,-1)}function wo(t,e){var r=yo(t,e.line),n=M(t.doc,r.line),i=St(n,t.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=e.line==r.line&&e.ch<=o&&e.ch;return I(r.line,a?0:o,r.sticky)}return r}function xo(t,e,r){if("string"==typeof e&&!(e=Gl[e]))return!1;t.display.input.ensurePolled();var n=t.display.shift,i=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),r&&(t.display.shift=!1),i=e(t)!=Ga}finally{t.display.shift=n,t.state.suppressEdits=!1}return i}function ko(t,e,r){for(var n=0;n<t.state.keyMaps.length;n++){var i=lo(e,t.state.keyMaps[n],r,t);if(i)return i}return t.options.extraKeys&&lo(e,t.options.extraKeys,r,t)||lo(e,t.options.keyMap,r,t)}function Co(t,e,r,n){var i=t.state.keySeq;if(i){if(so(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:Vl.set(50,function(){t.state.keySeq==i&&(t.state.keySeq=null,t.display.input.reset())}),So(t,i+" "+e,r,n))return!0}return So(t,e,r,n)}function So(t,e,r,n){var i=ko(t,e,n);return"multi"==i&&(t.state.keySeq=e),"handled"==i&&xe(t,"keyHandled",t,e,r),"handled"!=i&&"multi"!=i||(Wt(r),Wr(t)),!!i}function To(t,e){var r=co(e,!0);return!!r&&(e.shiftKey&&!t.state.keySeq?Co(t,"Shift-"+r,e,function(e){return xo(t,e,!0)})||Co(t,r,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return xo(t,e)}):Co(t,r,e,function(e){return xo(t,e)}))}function Lo(t,e,r){return Co(t,"'"+r+"'",e,function(e){return xo(t,e,!0)})}function Mo(t){var e=this;if(e.curOp.focus=a(),!Nt(e,t)){ba&&wa<11&&27==t.keyCode&&(t.returnValue=!1);var r=t.keyCode;e.display.shift=16==r||t.shiftKey;var n=To(e,t);Sa&&($l=n?r:null,!n&&88==r&&!al&&(Da?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||No(e)}}function No(t){function e(t){18!=t.keyCode&&t.altKey||(za(r,"CodeMirror-crosshair"),Lt(document,"keyup",e),Lt(document,"mouseover",e))}var r=t.display.lineDiv;l(r,"CodeMirror-crosshair"),rl(document,"keyup",e),rl(document,"mouseover",e)}function Ao(t){16==t.keyCode&&(this.doc.sel.shift=!1),Nt(this,t)}function Oo(t){var e=this;if(!(He(e.display,t)||Nt(e,t)||t.ctrlKey&&!t.altKey||Da&&t.metaKey)){var r=t.keyCode,n=t.charCode;if(Sa&&r==$l)return $l=null,void Wt(t);if(!Sa||t.which&&!(t.which<10)||!To(e,t)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(Lo(e,t,i)||e.display.input.onKeyPress(t))}}}function Do(t,e){var r=+new Date;return Xl&&Xl.compare(r,t,e)?(ql=Xl=null,"triple"):ql&&ql.compare(r,t,e)?(Xl=new Kl(r,t,e),ql=null,"double"):(ql=new Kl(r,t,e),Xl=null,"single")}function Wo(t){var e=this,r=e.display;if(!(Nt(e,t)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=t.shiftKey,He(r,t))return void(xa||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100)));if(!_o(e,t)){var n=Tr(e,t),i=Ft(t),o=n?Do(n,i):"single";window.focus(),1==i&&e.state.selectingText&&e.state.selectingText(t),n&&Eo(e,i,n,o,t)||(1==i?n?Io(e,n,o,t):Ht(t)==r.scroller&&Wt(t):2==i?(n&&gi(e.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(Fa?e.display.input.onContextMenu(t):Pr(e)))}}}function Eo(t,e,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),o=(1==e?"Left":2==e?"Middle":"Right")+o,Co(t,uo(o,i),i,function(e){if("string"==typeof e&&(e=Gl[e]),!e)return!1;var n=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n=e(t,r)!=Ga}finally{t.state.suppressEdits=!1}return n})}function Po(t,e,r){var n=t.getOption("configureMouse"),i=n?n(t,e,r):{};if(null==i.unit){var o=Wa?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==i.extend||t.doc.extend)&&(i.extend=t.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=Da?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(Da?r.altKey:r.ctrlKey)),i}function Io(t,e,r,n){ba?setTimeout(u(Er,t),0):t.curOp.focus=a();var i,o=Po(t,r,n),l=t.doc.sel;t.options.dragDrop&&nl&&!t.isReadOnly()&&"single"==r&&(i=l.contains(e))>-1&&(H((i=l.ranges[i]).from(),e)<0||e.xRel>0)&&(H(i.to(),e)>0||e.xRel<0)?Ho(t,n,e,o):zo(t,n,e,o)}function Ho(t,e,r,n){var i=t.display,o=!1,a=gn(t,function(e){xa&&(i.scroller.draggable=!1),t.state.draggingText=!1,Lt(i.wrapper.ownerDocument,"mouseup",a),Lt(i.wrapper.ownerDocument,"mousemove",l),Lt(i.scroller,"dragstart",s),Lt(i.scroller,"drop",a),o||(Wt(e),n.addNew||gi(t.doc,r,null,null,n.extend),xa||ba&&9==wa?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),l=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},s=function(){return o=!0};xa&&(i.scroller.draggable=!0),t.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),rl(i.wrapper.ownerDocument,"mouseup",a),rl(i.wrapper.ownerDocument,"mousemove",l),rl(i.scroller,"dragstart",s),rl(i.scroller,"drop",a),Pr(t),setTimeout(function(){return i.input.focus()},20)}function Fo(t,e,r){if("char"==r)return new Ol(e,e);if("word"==r)return t.findWordAt(e);if("line"==r)return new Ol(I(e.line,0),j(t.doc,I(e.line+1,0)));var n=r(t,e);return new Ol(n.from,n.to)}function zo(t,e,r,n){function i(e){if(0!=H(v,e))if(v=e,"rectangle"==n.unit){for(var i=[],o=t.options.tabSize,a=f(M(u,r.line).text,r.ch,o),l=f(M(u,e.line).text,e.ch,o),s=Math.min(a,l),g=Math.max(a,l),m=Math.min(r.line,e.line),y=Math.min(t.lastLine(),Math.max(r.line,e.line));m<=y;m++){var b=M(u,m).text,w=d(b,s,o);s==g?i.push(new Ol(I(m,w),I(m,w))):b.length>w&&i.push(new Ol(I(m,w),I(m,d(b,g,o))))}i.length||i.push(new Ol(r,r)),xi(u,Bn(t,p.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var x,k=c,C=Fo(t,e,n.unit),S=k.anchor;H(C.anchor,S)>0?(x=C.head,S=B(k.from(),C.anchor)):(x=C.anchor,S=R(k.to(),C.head));var T=p.ranges.slice(0);T[h]=Ro(t,new Ol(j(u,S),x)),xi(u,Bn(t,T,h),$a)}}function o(e){var r=++b,l=Tr(t,e,!0,"rectangle"==n.unit);if(l)if(0!=H(l,v)){t.curOp.focus=a(),i(l);var c=Rr(s,u);(l.line>=c.to||l.line<c.from)&&setTimeout(gn(t,function(){b==r&&o(e)}),150)}else{var f=e.clientY<y.top?-20:e.clientY>y.bottom?20:0;f&&setTimeout(gn(t,function(){b==r&&(s.scroller.scrollTop+=f,o(e))}),50)}}function l(e){t.state.selectingText=!1,b=1/0,Wt(e),s.input.focus(),Lt(s.wrapper.ownerDocument,"mousemove",w),Lt(s.wrapper.ownerDocument,"mouseup",x),u.history.lastSelOrigin=null}var s=t.display,u=t.doc;Wt(e);var c,h,p=u.sel,g=p.ranges;if(n.addNew&&!n.extend?(h=u.sel.contains(r),c=h>-1?g[h]:new Ol(r,r)):(c=u.sel.primary(),h=u.sel.primIndex),"rectangle"==n.unit)n.addNew||(c=new Ol(r,r)),r=Tr(t,e,!0,!0),h=-1;else{var m=Fo(t,r,n.unit);c=n.extend?pi(c,m.anchor,m.head,n.extend):m}n.addNew?-1==h?(h=g.length,xi(u,Bn(t,g.concat([c]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"char"==n.unit&&!n.extend?(xi(u,Bn(t,g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):vi(u,h,c,$a):(h=0,xi(u,new Al([c],0),$a),p=u.sel);var v=r,y=s.wrapper.getBoundingClientRect(),b=0,w=gn(t,function(t){0!==t.buttons&&Ft(t)?o(t):l(t)}),x=gn(t,l);t.state.selectingText=x,rl(s.wrapper.ownerDocument,"mousemove",w),rl(s.wrapper.ownerDocument,"mouseup",x)}function Ro(t,e){var r=e.anchor,n=e.head,i=M(t.doc,r.line);if(0==H(r,n)&&r.sticky==n.sticky)return e;var o=St(i);if(!o)return e;var a=Ct(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return e;var s=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==s||s==o.length)return e;var u;if(n.line!=r.line)u=(n.line-r.line)*("ltr"==t.doc.direction?1:-1)>0;else{var c=Ct(o,n.ch,n.sticky),f=c-a||(n.ch-r.ch)*(1==l.level?-1:1);u=c==s-1||c==s?f<0:f>0}var h=o[s+(u?-1:0)],d=u==(1==h.level),p=d?h.from:h.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?e:new Ol(new I(r.line,p,g),n)}function Bo(t,e,r,n){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(e){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;n&&Wt(e);var a=t.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Ot(t,r))return Pt(e);o-=l.top-a.viewOffset;for(var s=0;s<t.options.gutters.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){return Mt(t,r,t,W(t.doc,o),t.options.gutters[s],e),Pt(e)}}}function _o(t,e){return Bo(t,e,"gutterClick",!0)}function jo(t,e){He(t.display,e)||Uo(t,e)||Nt(t,e,"contextmenu")||Fa||t.display.input.onContextMenu(e)}function Uo(t,e){return!!Ot(t,"gutterContextMenu")&&Bo(t,e,"gutterContextMenu",!1)}function Go(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),rr(t)}function Vo(t){In(t),yn(t),Br(t)}function $o(t,e,r){if(!e!=!(r&&r!=Yl)){var n=t.display.dragFunctions,i=e?rl:Lt;i(t.display.scroller,"dragstart",n.start),i(t.display.scroller,"dragenter",n.enter),i(t.display.scroller,"dragover",n.over),i(t.display.scroller,"dragleave",n.leave),i(t.display.scroller,"drop",n.drop)}}function Ko(t){t.options.lineWrapping?(l(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(za(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sr(t),yn(t),rr(t),setTimeout(function(){return rn(t)},100)}function qo(t,e){var r=this;if(!(this instanceof qo))return new qo(t,e);this.options=e=e?c(e):{},c(Zl,e,!1),Hn(e);var n=e.value;"string"==typeof n?n=new Hl(n,e.mode,null,e.lineSeparator,e.direction):e.mode&&(n.modeOption=e.mode),this.doc=n;var i=new qo.inputStyles[e.inputStyle](this),o=this.display=new L(t,n,i);o.wrapper.CodeMirror=this,In(this),Go(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),on(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Ba,keySeq:null,specialChars:null},e.autofocus&&!Oa&&o.input.focus(),ba&&wa<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Xo(this),ro(),an(this),this.curOp.forceUpdate=!0,Qn(this,n),e.autofocus&&!Oa||this.hasFocus()?setTimeout(u(Ir,this),20):Hr(this);for(var a in Ql)Ql.hasOwnProperty(a)&&Ql[a](r,e[a],Yl);_r(this),e.finishInit&&e.finishInit(this);for(var l=0;l<Jl.length;++l)Jl[l](r);ln(this),xa&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Xo(t){function e(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function r(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}function n(t,e){if(null==e.left)return!0;var r=e.left-t.left,n=e.top-t.top;return r*r+n*n>400}var i=t.display;rl(i.scroller,"mousedown",gn(t,Wo)),ba&&wa<11?rl(i.scroller,"dblclick",gn(t,function(e){if(!Nt(t,e)){var r=Tr(t,e);if(r&&!_o(t,e)&&!He(t.display,e)){Wt(e);var n=t.findWordAt(r);gi(t.doc,n.anchor,n.head)}}})):rl(i.scroller,"dblclick",function(e){return Nt(t,e)||Wt(e)}),rl(i.scroller,"contextmenu",function(e){return jo(t,e)});var o,a={end:0};rl(i.scroller,"touchstart",function(e){if(!Nt(t,e)&&!r(e)&&!_o(t,e)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-a.end<=300?a:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),rl(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),rl(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!He(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=t.coordsChar(i.activeTouch,"page");a=!o.prev||n(o,o.prev)?new Ol(l,l):!o.prev.prev||n(o,o.prev.prev)?t.findWordAt(l):new Ol(I(l.line,0),j(t.doc,I(l.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),Wt(r)}e()}),rl(i.scroller,"touchcancel",e),rl(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Qr(t,i.scroller.scrollTop),tn(t,i.scroller.scrollLeft,!0),Mt(t,"scroll",t))}),rl(i.scroller,"mousewheel",function(e){return Rn(t,e)}),rl(i.scroller,"DOMMouseScroll",function(e){return Rn(t,e)}),rl(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(e){Nt(t,e)||It(e)},over:function(e){Nt(t,e)||(Ji(t,e),It(e))},start:function(e){return Qi(t,e)},drop:gn(t,Zi),leave:function(e){Nt(t,e)||to(t)}};var l=i.input.getField();rl(l,"keyup",function(e){return Ao.call(t,e)}),rl(l,"keydown",gn(t,Mo)),rl(l,"keypress",gn(t,Oo)),rl(l,"focus",function(e){return Ir(t,e)}),rl(l,"blur",function(e){return Hr(t,e)})}function Yo(t,e,r,n){var i,o=t.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Zt(t,e).state:r="prev");var a=t.options.tabSize,l=M(o,e),s=f(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u,c=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((u=o.mode.indent(i,l.text.slice(c.length),l.text))==Ga||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=e>o.first?f(M(o,e-1).text,null,a):0:"add"==r?u=s+t.options.indentUnit:"subtract"==r?u=s-t.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var h="",d=0;if(t.options.indentWithTabs)for(var g=Math.floor(u/a);g;--g)d+=a,h+="\t";if(d<u&&(h+=p(u-d)),h!=c)return Fi(o,h,I(e,0),I(e,c.length),"+input"),l.stateAfter=null,!0;for(var m=0;m<o.sel.ranges.length;m++){var v=o.sel.ranges[m];if(v.head.line==e&&v.head.ch<c.length){var y=I(e,c.length);vi(o,m,new Ol(y,y));break}}}function Zo(t){ts=t}function Qo(t,e,r,n,i){var o=t.doc;t.display.shift=!1,n||(n=o.sel);var a=t.state.pasteIncoming||"paste"==i,l=il(e),s=null;if(a&&n.ranges.length>1)if(ts&&ts.text.join("\n")==e){if(n.ranges.length%ts.text.length==0){s=[];for(var u=0;u<ts.text.length;u++)s.push(o.splitLines(ts.text[u]))}}else l.length==n.ranges.length&&t.options.pasteLinesPerSelection&&(s=m(l,function(t){return[t]}));for(var c=t.curOp.updateInput,f=n.ranges.length-1;f>=0;f--){var h=n.ranges[f],d=h.from(),p=h.to();h.empty()&&(r&&r>0?d=I(d.line,d.ch-r):t.state.overwrite&&!a?p=I(p.line,Math.min(M(o,p.line).text.length,p.ch+g(l).length)):a&&ts&&ts.lineWise&&ts.text.join("\n")==e&&(d=p=I(d.line,0)));var v={from:d,to:p,text:s?s[f%s.length]:l,origin:i||(a?"paste":t.state.cutIncoming?"cut":"+input")};Di(t.doc,v),xe(t,"inputRead",t,v)}e&&!a&&ta(t,e),Kr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=c),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Jo(t,e){var r=t.clipboardData&&t.clipboardData.getData("Text");if(r)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||pn(e,function(){return Qo(e,r,0,null,"paste")}),!0}function ta(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var r=t.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(e.indexOf(o.electricChars.charAt(l))>-1){a=Yo(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Yo(t,i.head.line,"smart"));a&&xe(t,"electricInput",t,i.head.line)}}}function ea(t){for(var e=[],r=[],n=0;n<t.doc.sel.ranges.length;n++){var i=t.doc.sel.ranges[n].head.line,o={anchor:I(i,0),head:I(i+1,0)};r.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:r}}function ra(t,e,r,n){t.setAttribute("autocorrect",!!r),t.setAttribute("autocapitalize",!!n),t.setAttribute("spellcheck",!!e)}function na(){var t=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=n("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return xa?t.style.width="1000px":t.setAttribute("wrap","off"),Na&&(t.style.border="1px solid black"),ra(t),e}function ia(t,e,r,n,i){function o(){var n=e.line+r;return!(n<t.first||n>=t.first+t.size)&&(e=new I(n,e.ch,e.sticky),u=M(t,n))}function a(n){var a;if(null==(a=i?vo(t.cm,u,e,r):go(u,e,r))){if(n||!o())return!1;e=mo(i,t.cm,u,e.line,r)}else e=a;return!0}var l=e,s=r,u=M(t,e.line);if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var c=null,f="group"==n,h=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(r<0)||a(!d);d=!1){var p=u.text.charAt(e.ch)||"\n",g=x(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||g||(g="s"),c&&c!=g){r<0&&(r=1,a(),e.sticky="after");break}if(g&&(c=g),r>0&&!a(!d))break}var m=Mi(t,e,l,s,!0);return F(l,m)&&(m.hitSide=!0),m}function oa(t,e,r,n){var i,o=t.doc,a=e.left;if("page"==n){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*br(t.display),3);i=(r>0?e.bottom:e.top)+r*s}else"line"==n&&(i=r>0?e.bottom+3:e.top-3);for(var u;u=hr(t,a,i),u.outside;){if(r<0?i<=0:i>=o.height){u.hitSide=!0;break}i+=5*r}return u}function aa(t,e){var r=Ke(t,e.line);if(!r||r.hidden)return null;var n=M(t.doc,e.line),i=Ge(r,n,e.line),o=St(n,t.doc.direction),a="left";if(o){a=Ct(o,e.ch)%2?"right":"left"}var l=Ye(i.map,e.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function la(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function sa(t,e){return e&&(t.bad=!0),t}function ua(t,e,r,n,i){function o(t){return function(e){return e.id==t}}function a(){c&&(u+=f,h&&(u+=f),c=h=!1)}function l(t){t&&(a(),u+=t)}function s(e){if(1==e.nodeType){var r=e.getAttribute("cm-text");if(r)return void l(r);var u,d=e.getAttribute("cm-marker");if(d){var p=t.findMarks(I(n,0),I(i+1,0),o(+d));return void(p.length&&(u=p[0].find(0))&&l(N(t.doc,u.from,u.to).join(f)))}if("false"==e.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;g&&a();for(var m=0;m<e.childNodes.length;m++)s(e.childNodes[m]);/^(pre|p)$/i.test(e.nodeName)&&(h=!0),g&&(c=!0)}else 3==e.nodeType&&l(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(var u="",c=!1,f=t.doc.lineSeparator(),h=!1;s(e),e!=r;)e=e.nextSibling,h=!1;return u}function ca(t,e,r){var n;if(e==t.display.lineDiv){if(!(n=t.display.lineDiv.childNodes[r]))return sa(t.clipPos(I(t.display.viewTo-1)),!0);e=null,r=0}else for(n=e;;n=n.parentNode){if(!n||n==t.display.lineDiv)return null;if(n.parentNode&&n.parentNode==t.display.lineDiv)break}for(var i=0;i<t.display.view.length;i++){var o=t.display.view[i];if(o.node==n)return fa(o,e,r)}}function fa(t,e,r){function n(e,r,n){for(var i=-1;i<(f?f.length:0);i++)for(var o=i<0?c.map:f[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==e||l==r){var s=D(i<0?t.line:t.rest[i]),u=o[a]+n;return(n<0||l!=e)&&(u=o[a+(n?1:0)]),I(s,u)}}}var i=t.text.firstChild,a=!1;if(!e||!o(i,e))return sa(I(D(t.line),0),!0);if(e==i&&(a=!0,e=i.childNodes[r],r=0,!e)){var l=t.rest?g(t.rest):t.line;return sa(I(D(l),l.text.length),a)}var s=3==e.nodeType?e:null,u=e;for(s||1!=e.childNodes.length||3!=e.firstChild.nodeType||(s=e.firstChild,r&&(r=s.nodeValue.length));u.parentNode!=i;)u=u.parentNode;var c=t.measure,f=c.maps,h=n(s,u,r);if(h)return sa(h,a);for(var d=u.nextSibling,p=s?s.nodeValue.length-r:0;d;d=d.nextSibling){if(h=n(d,d.firstChild,0))return sa(I(h.line,h.ch-p),a);p+=d.textContent.length}for(var m=u.previousSibling,v=r;m;m=m.previousSibling){if(h=n(m,m.firstChild,-1))return sa(I(h.line,h.ch+v),a);v+=m.textContent.length}}function ha(t,e){function r(){t.value=s.getValue()}if(e=e?c(e):{},e.value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=a();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}var i;if(t.form&&(rl(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch(t){}}e.finishInit=function(e){e.save=r,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,r(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(Lt(t.form,"submit",r),"function"==typeof t.form.submit&&(t.form.submit=i))}},t.style.display="none";var s=qo(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s}var da=navigator.userAgent,pa=navigator.platform,ga=/gecko\/\d/i.test(da),ma=/MSIE \d/.test(da),va=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(da),ya=/Edge\/(\d+)/.exec(da),ba=ma||va||ya,wa=ba&&(ma?document.documentMode||6:+(ya||va)[1]),xa=!ya&&/WebKit\//.test(da),ka=xa&&/Qt\/\d+\.\d+/.test(da),Ca=!ya&&/Chrome\//.test(da),Sa=/Opera\//.test(da),Ta=/Apple Computer/.test(navigator.vendor),La=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(da),Ma=/PhantomJS/.test(da),Na=!ya&&/AppleWebKit/.test(da)&&/Mobile\/\w+/.test(da),Aa=/Android/.test(da),Oa=Na||Aa||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(da),Da=Na||/Mac/.test(pa),Wa=/\bCrOS\b/.test(da),Ea=/win/i.test(pa),Pa=Sa&&da.match(/Version\/(\d*\.\d*)/);Pa&&(Pa=Number(Pa[1])),Pa&&Pa>=15&&(Sa=!1,xa=!0);var Ia,Ha=Da&&(ka||Sa&&(null==Pa||Pa<12.11)),Fa=ga||ba&&wa>=9,za=function(e,r){var n=e.className,i=t(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(o?i[1]+o:"")}};Ia=document.createRange?function(t,e,r,n){var i=document.createRange();return i.setEnd(n||t,r),i.setStart(t,e),i}:function(t,e,r){var n=document.body.createTextRange();try{n.moveToElementText(t.parentNode)}catch(t){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",e),n};var Ra=function(t){t.select()};Na?Ra=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:ba&&(Ra=function(t){try{t.select()}catch(t){}});var Ba=function(){this.id=null};Ba.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var _a,ja,Ua=30,Ga={toString:function(){return"CodeMirror.Pass"}},Va={scroll:!1},$a={origin:"*mouse"},Ka={origin:"+move"},qa=[""],Xa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ya=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Za=!1,Qa=!1,Ja=null,tl=function(){function t(t){return t<=247?r.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?n.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,r){this.level=t,this.from=e,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;return function(r,n){var u="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1
5
+ ;for(var c=r.length,f=[],h=0;h<c;++h)f.push(t(r.charCodeAt(h)));for(var d=0,p=u;d<c;++d){var m=f[d];"m"==m?f[d]=p:p=m}for(var v=0,y=u;v<c;++v){var b=f[v];"1"==b&&"r"==y?f[v]="n":a.test(b)&&(y=b,"r"==b&&(f[v]="R"))}for(var w=1,x=f[0];w<c-1;++w){var k=f[w];"+"==k&&"1"==x&&"1"==f[w+1]?f[w]="1":","!=k||x!=f[w+1]||"1"!=x&&"n"!=x||(f[w]=x),x=k}for(var C=0;C<c;++C){var S=f[C];if(","==S)f[C]="N";else if("%"==S){var T=void 0;for(T=C+1;T<c&&"%"==f[T];++T);for(var L=C&&"!"==f[C-1]||T<c&&"1"==f[T]?"1":"N",M=C;M<T;++M)f[M]=L;C=T-1}}for(var N=0,A=u;N<c;++N){var O=f[N];"L"==A&&"1"==O?f[N]="L":a.test(O)&&(A=O)}for(var D=0;D<c;++D)if(o.test(f[D])){var W=void 0;for(W=D+1;W<c&&o.test(f[W]);++W);for(var E="L"==(D?f[D-1]:u),P="L"==(W<c?f[W]:u),I=E==P?E?"L":"R":u,H=D;H<W;++H)f[H]=I;D=W-1}for(var F,z=[],R=0;R<c;)if(l.test(f[R])){var B=R;for(++R;R<c&&l.test(f[R]);++R);z.push(new e(0,B,R))}else{var _=R,j=z.length;for(++R;R<c&&"L"!=f[R];++R);for(var U=_;U<R;)if(s.test(f[U])){_<U&&z.splice(j,0,new e(1,_,U));var G=U;for(++U;U<R&&s.test(f[U]);++U);z.splice(j,0,new e(2,G,U)),_=U}else++U;_<R&&z.splice(j,0,new e(1,_,R))}return"ltr"==n&&(1==z[0].level&&(F=r.match(/^\s+/))&&(z[0].from=F[0].length,z.unshift(new e(0,0,F[0].length))),1==g(z).level&&(F=r.match(/\s+$/))&&(g(z).to-=F[0].length,z.push(new e(0,c-F[0].length,c)))),"rtl"==n?z.reverse():z}}(),el=[],rl=function(t,e,r){if(t.addEventListener)t.addEventListener(e,r,!1);else if(t.attachEvent)t.attachEvent("on"+e,r);else{var n=t._handlers||(t._handlers={});n[e]=(n[e]||el).concat(r)}},nl=function(){if(ba&&wa<9)return!1;var t=n("div");return"draggable"in t||"dragDrop"in t}(),il=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,r=[],n=t.length;e<=n;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),e+=a+1):(r.push(o),e=i+1)}return r}:function(t){return t.split(/\r\n?|\n/)},ol=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},al=function(){var t=n("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),ll=null,sl={},ul={},cl={},fl=function(t,e,r){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};fl.prototype.eol=function(){return this.pos>=this.string.length},fl.prototype.sol=function(){return this.pos==this.lineStart},fl.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},fl.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},fl.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},fl.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},fl.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},fl.prototype.skipToEnd=function(){this.pos=this.string.length},fl.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},fl.prototype.backUp=function(t){this.pos-=t},fl.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=f(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},fl.prototype.indentation=function(){return f(this.string,null,this.tabSize)-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},fl.prototype.match=function(t,e,r){if("string"!=typeof t){var n=this.string.slice(this.pos).match(t);return n&&n.index>0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var i=function(t){return r?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},fl.prototype.current=function(){return this.string.slice(this.start,this.pos)},fl.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},fl.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},fl.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var hl=function(t,e){this.state=t,this.lookAhead=e},dl=function(t,e,r,n){this.state=e,this.doc=t,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};dl.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},dl.prototype.baseToken=function(t){var e=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)e.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},dl.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dl.fromSaved=function(t,e,r){return e instanceof hl?new dl(t,$t(t.mode,e.state),r,e.lookAhead):new dl(t,$t(t.mode,e),r)},dl.prototype.save=function(t){var e=!1!==t?$t(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new hl(e,this.maxLookAhead):e};var pl=function(t,e,r){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=r},gl=function(t,e,r){this.text=t,nt(this,e),this.height=r?r(this):1};gl.prototype.lineNo=function(){return D(this)},Dt(gl);var ml,vl={},yl={},bl=null,wl=null,xl={left:0,right:0,top:0,bottom:0},kl=function(t,e,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=o.tabIndex=-1,t(i),t(o),rl(i,"scroll",function(){i.clientHeight&&e(i.scrollTop,"vertical")}),rl(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ba&&wa<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};kl.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,r=t.scrollHeight>t.clientHeight+1,n=t.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=e?n+"px":"0";var i=t.viewHeight-(e?n:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:e?n:0}},kl.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},kl.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},kl.prototype.zeroWidthHack=function(){var t=Da&&!La?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ba,this.disableVert=new Ba},kl.prototype.enableZeroWidthBar=function(t,e,r){function n(){var i=t.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,n)}t.style.pointerEvents="auto",e.set(1e3,n)},kl.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Cl=function(){};Cl.prototype.update=function(){return{bottom:0,right:0}},Cl.prototype.setScrollLeft=function(){},Cl.prototype.setScrollTop=function(){},Cl.prototype.clear=function(){};var Sl={native:kl,null:Cl},Tl=0,Ll=function(t,e,r){var n=t.display;this.viewport=e,this.visible=Rr(n,t.doc,e),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=_e(t),this.force=r,this.dims=xr(t),this.events=[]};Ll.prototype.signal=function(t,e){Ot(t,e)&&this.events.push(arguments)},Ll.prototype.finish=function(){for(var t=this,e=0;e<this.events.length;e++)Mt.apply(null,t.events[e])};var Ml=0,Nl=null;ba?Nl=-.53:ga?Nl=15:Ca?Nl=-.7:Ta&&(Nl=-1/3);var Al=function(t,e){this.ranges=t,this.primIndex=e};Al.prototype.primary=function(){return this.ranges[this.primIndex]},Al.prototype.equals=function(t){var e=this;if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var n=e.ranges[r],i=t.ranges[r];if(!F(n.anchor,i.anchor)||!F(n.head,i.head))return!1}return!0},Al.prototype.deepCopy=function(){for(var t=this,e=[],r=0;r<this.ranges.length;r++)e[r]=new Ol(z(t.ranges[r].anchor),z(t.ranges[r].head));return new Al(e,this.primIndex)},Al.prototype.somethingSelected=function(){for(var t=this,e=0;e<this.ranges.length;e++)if(!t.ranges[e].empty())return!0;return!1},Al.prototype.contains=function(t,e){var r=this;e||(e=t);for(var n=0;n<this.ranges.length;n++){var i=r.ranges[n];if(H(e,i.from())>=0&&H(t,i.to())<=0)return n}return-1};var Ol=function(t,e){this.anchor=t,this.head=e};Ol.prototype.from=function(){return B(this.anchor,this.head)},Ol.prototype.to=function(){return R(this.anchor,this.head)},Ol.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ji.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var r=this,n=t,i=t+e;n<i;++n){var o=r.lines[n];r.height-=o.height,le(o),xe(o,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,r){var n=this;this.height+=r,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var i=0;i<e.length;++i)e[i].parent=n},iterN:function(t,e,r){for(var n=this,i=t+e;t<i;++t)if(r(n.lines[t]))return!0}},Ui.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){var r=this;this.size-=e;for(var n=0;n<this.children.length;++n){var i=r.children[n],o=i.chunkSize();if(t<o){var a=Math.min(e,o-t),l=i.height;if(i.removeInner(t,a),r.height-=l-i.height,o==a&&(r.children.splice(n--,1),i.parent=null),0==(e-=a))break;t=0}else t-=o}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof ji))){var s=[];this.collapse(s),this.children=[new ji(s)],this.children[0].parent=this}},collapse:function(t){for(var e=this,r=0;r<this.children.length;++r)e.children[r].collapse(t)},insertInner:function(t,e,r){var n=this;this.size+=e.length,this.height+=r;for(var i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(t<=a){if(o.insertInner(t,e,r),o.lines&&o.lines.length>50){for(var l=o.lines.length%25+25,s=l;s<o.lines.length;){var u=new ji(o.lines.slice(s,s+=25));o.height-=u.height,n.children.splice(++i,0,u),u.parent=n}o.lines=o.lines.slice(0,l),n.maybeSpill()}break}t-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=t.children.splice(t.children.length-5,5),r=new Ui(e);if(t.parent){t.size-=r.size,t.height-=r.height;var n=h(t.parent.children,t);t.parent.children.splice(n+1,0,r)}else{var i=new Ui(t.children);i.parent=t,t.children=[i,r],t=i}r.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,r){for(var n=this,i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(t<a){var l=Math.min(e,a-t);if(o.iterN(t,l,r))return!0;if(0==(e-=l))break;t=0}else t-=a}}};var Dl=function(t,e,r){var n=this;if(r)for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);this.doc=t,this.node=e};Dl.prototype.clear=function(){var t=this,e=this.doc.cm,r=this.line.widgets,n=this.line,i=D(n);if(null!=i&&r){for(var o=0;o<r.length;++o)r[o]==t&&r.splice(o--,1);r.length||(n.widgets=null);var a=Ie(this);O(n,Math.max(0,n.height-a)),e&&(pn(e,function(){Gi(e,n,-a),bn(e,i,"widget")}),xe(e,"lineWidgetCleared",e,this,i))}},Dl.prototype.changed=function(){var t=this,e=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Ie(this)-e;i&&(vt(this.doc,n)||O(n,n.height+i),r&&pn(r,function(){r.curOp.forceUpdate=!0,Gi(r,n,i),xe(r,"lineWidgetChanged",r,t,D(n))}))},Dt(Dl);var Wl=0,El=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++Wl};El.prototype.clear=function(){var t=this;if(!this.explicitlyCleared){var e=this.doc.cm,r=e&&!e.curOp;if(r&&an(e),Ot(this,"clear")){var n=this.find();n&&xe(this,"clear",n.from,n.to)}for(var i=null,o=null,a=0;a<this.lines.length;++a){var l=t.lines[a],s=q(l.markedSpans,t);e&&!t.collapsed?bn(e,D(l),"text"):e&&(null!=s.to&&(o=D(l)),null!=s.from&&(i=D(l))),l.markedSpans=X(l.markedSpans,s),null==s.from&&t.collapsed&&!vt(t.doc,l)&&e&&O(l,br(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var c=ht(t.lines[u]),f=wt(c);f>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=f,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&yn(e,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Si(e.doc)),e&&xe(e,"markerCleared",e,this,i,o),r&&ln(e),this.parent&&this.parent.clear()}},El.prototype.find=function(t,e){var r=this;null==t&&"bookmark"==this.type&&(t=1);for(var n,i,o=0;o<this.lines.length;++o){var a=r.lines[o],l=q(a.markedSpans,r);if(null!=l.from&&(n=I(e?a:D(a),l.from),-1==t))return n;if(null!=l.to&&(i=I(e?a:D(a),l.to),1==t))return i}return n&&{from:n,to:i}},El.prototype.changed=function(){var t=this,e=this.find(-1,!0),r=this,n=this.doc.cm;e&&n&&pn(n,function(){var i=e.line,o=D(e.line),a=Ke(n,o);if(a&&(tr(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!vt(r.doc,i)&&null!=r.height){var l=r.height;r.height=null;var s=Ie(r)-l;s&&O(i,i.height+s)}xe(n,"markerChanged",n,t)})},El.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=h(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},El.prototype.detachLine=function(t){if(this.lines.splice(h(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},Dt(El);var Pl=function(t,e){var r=this;this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=r};Pl.prototype.clear=function(){var t=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)t.markers[e].clear();xe(this,"clear")}},Pl.prototype.find=function(t,e){return this.primary.find(t,e)},Dt(Pl);var Il=0,Hl=function(t,e,r,n,i){if(!(this instanceof Hl))return new Hl(t,e,r,n,i);null==r&&(r=0),Ui.call(this,[new ji([new gl("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=I(r,0);this.sel=_n(o),this.history=new ei(null),this.id=++Il,this.modeOption=e,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),Yn(this,{from:o,to:o,text:t}),xi(this,_n(o),Va)};Hl.prototype=b(Ui.prototype,{constructor:Hl,iter:function(t,e,r){r?this.iterN(t-this.first,e-t,r):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var r=0,n=0;n<e.length;++n)r+=e[n].height;this.insertInner(t-this.first,e,r)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=A(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:vn(function(t){var e=I(this.first,0),r=this.first+this.size-1;Di(this,{from:e,to:I(r,M(this,r).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&qr(this.cm,0,0),xi(this,_n(e),Va)}),replaceRange:function(t,e,r,n){e=j(this,e),r=r?j(this,r):e,Fi(this,t,e,r,n)},getRange:function(t,e,r){var n=N(this,j(this,t),j(this,e));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(E(this,t))return M(this,t)},getLineNumber:function(t){return D(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=M(this,t)),ht(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return j(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:vn(function(t,e,r){yi(this,j(this,"number"==typeof t?I(t,e||0):t),null,r)}),setSelection:vn(function(t,e,r){yi(this,j(this,t),j(this,e||t),r)}),extendSelection:vn(function(t,e,r){gi(this,j(this,t),e&&j(this,e),r)}),extendSelections:vn(function(t,e){mi(this,G(this,t),e)}),extendSelectionsBy:vn(function(t,e){mi(this,G(this,m(this.sel.ranges,t)),e)}),setSelections:vn(function(t,e,r){var n=this;if(t.length){for(var i=[],o=0;o<t.length;o++)i[o]=new Ol(j(n,t[o].anchor),j(n,t[o].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),xi(this,Bn(this.cm,i,e),r)}}),addSelection:vn(function(t,e,r){var n=this.sel.ranges.slice(0);n.push(new Ol(j(this,t),j(this,e||t))),xi(this,Bn(this.cm,n,n.length-1),r)}),getSelection:function(t){for(var e,r=this,n=this.sel.ranges,i=0;i<n.length;i++){var o=N(r,n[i].from(),n[i].to());e=e?e.concat(o):o}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=this,r=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=N(e,n[i].from(),n[i].to());!1!==t&&(o=o.join(t||e.lineSeparator())),r[i]=o}return r},replaceSelection:function(t,e,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=t;this.replaceSelections(n,e,r||"+input")},replaceSelections:vn(function(t,e,r){for(var n=this,i=[],o=this.sel,a=0;a<o.ranges.length;a++){var l=o.ranges[a];i[a]={from:l.from(),to:l.to(),text:n.splitLines(t[a]),origin:r}}for(var s=e&&"end"!=e&&$n(this,i,e),u=i.length-1;u>=0;u--)Di(n,i[u]);s?wi(this,s):this.cm&&Kr(this.cm)}),undo:vn(function(){Ei(this,"undo")}),redo:vn(function(){Ei(this,"redo")}),undoSelection:vn(function(){Ei(this,"undo",!0)}),redoSelection:vn(function(){Ei(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,r=0,n=0;n<t.done.length;n++)t.done[n].ranges||++e;for(var i=0;i<t.undone.length;i++)t.undone[i].ranges||++r;return{undo:e,redo:r}},clearHistory:function(){this.history=new ei(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:di(this.history.done),undone:di(this.history.undone)}},setHistory:function(t){var e=this.history=new ei(this.history.maxGeneration);e.done=di(t.done.slice(0),null,!0),e.undone=di(t.undone.slice(0),null,!0)},setGutterMarker:vn(function(t,e,r){return _i(this,t,"gutter",function(t){var n=t.gutterMarkers||(t.gutterMarkers={});return n[e]=r,!r&&k(n)&&(t.gutterMarkers=null),!0})}),clearGutter:vn(function(t){var e=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[t]&&_i(e,r,"gutter",function(){return r.gutterMarkers[t]=null,k(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(t){var e;if("number"==typeof t){if(!E(this,t))return null;if(e=t,!(t=M(this,t)))return null}else if(null==(e=D(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:vn(function(e,r,n){return _i(this,e,"gutter"==r?"gutter":"class",function(e){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(e[i]){if(t(n).test(e[i]))return!1;e[i]+=" "+n}else e[i]=n;return!0})}),removeLineClass:vn(function(e,r,n){return _i(this,e,"gutter"==r?"gutter":"class",function(e){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass",o=e[i];if(!o)return!1;if(null==n)e[i]=null;else{var a=o.match(t(n));if(!a)return!1;var l=a.index+a[0].length;e[i]=o.slice(0,a.index)+(a.index&&l!=o.length?" ":"")+o.slice(l)||null}return!0})}),addLineWidget:vn(function(t,e,r){return Vi(this,t,e,r)}),removeLineWidget:function(t){t.clear()},markText:function(t,e,r){return $i(this,j(this,t),j(this,e),r,r&&r.type||"range")},setBookmark:function(t,e){var r={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return t=j(this,t),$i(this,t,t,r,"bookmark")},findMarksAt:function(t){t=j(this,t);var e=[],r=M(this,t.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=t.ch)&&(null==i.to||i.to>=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,r){t=j(this,t),e=j(this,e);var n=[],i=t.line;return this.iter(t.line,e.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==t.line&&t.ch>=s.to||null==s.from&&i!=t.line||null!=s.from&&i==e.line&&s.from>=e.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var t=[];return this.iter(function(e){var r=e.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&t.push(r[n].marker)}),t},posFromIndex:function(t){var e,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>t)return e=t,!0;t-=o,++r}),j(this,I(r,e))},indexFromPos:function(t){t=j(this,t);var e=t.ch;if(t.line<this.first||t.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,t.line,function(t){e+=t.text.length+r}),e},copy:function(t){var e=new Hl(A(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,r=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<r&&(r=t.to);var n=new Hl(A(this,e,r),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:t.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],Xi(n,qi(this)),n},unlinkDoc:function(t){var e=this;if(t instanceof qo&&(t=t.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=e.linked[r];if(n.doc==t){e.linked.splice(r,1),t.unlinkDoc(e),Yi(qi(e));break}}if(t.history==this.history){var i=[t.id];Zn(t,function(t){return i.push(t.id)},!0),t.history=new ei(null),t.history.done=di(this.history.done,i),t.history.undone=di(this.history.undone,i)}},iterLinkedDocs:function(t){Zn(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):il(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:vn(function(t){"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter(function(t){return t.order=null}),this.cm&&ti(this.cm))})}),Hl.prototype.eachLine=Hl.prototype.iter;for(var Fl=0,zl=!1,Rl={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Bl=0;Bl<10;Bl++)Rl[Bl+48]=Rl[Bl+96]=String(Bl);for(var _l=65;_l<=90;_l++)Rl[_l]=String.fromCharCode(_l);for(var jl=1;jl<=12;jl++)Rl[jl+111]=Rl[jl+63235]="F"+jl;var Ul={};Ul.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ul.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ul.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ul.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ul.default=Da?Ul.macDefault:Ul.pcDefault;var Gl={selectAll:Ai,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),Va)},killLine:function(t){return ho(t,function(e){if(e.empty()){var r=M(t.doc,e.head.line).text.length;return e.head.ch==r&&e.head.line<t.lastLine()?{from:e.head,to:I(e.head.line+1,0)}:{from:e.head,to:I(e.head.line,r)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return ho(t,function(e){return{from:I(e.from().line,0),to:j(t.doc,I(e.to().line+1,0))}})},delLineLeft:function(t){return ho(t,function(t){return{from:I(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(t){return ho(t,function(e){var r=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:r},"div"),to:e.from()}})},delWrappedLineRight:function(t){return ho(t,function(e){var r=t.charCoords(e.head,"div").top+5,n=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:r},"div");return{from:e.from(),to:n}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(I(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(I(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return yo(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return wo(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return bo(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(e){var r=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:r},"div")},Ka)},goLineLeft:function(t){return t.extendSelectionsBy(function(e){var r=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:r},"div")},Ka)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(e){var r=t.cursorCoords(e.head,"div").top+5,n=t.coordsChar({left:0,top:r},"div");return n.ch<t.getLine(n.line).search(/\S/)?wo(t,e.head):n},Ka)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"char")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],r=t.listSelections(),n=t.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=f(t.getLine(o.line),o.ch,n);e.push(p(n-a%n))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return pn(t,function(){for(var e=t.listSelections(),r=[],n=0;n<e.length;n++)if(e[n].empty()){var i=e[n].head,o=M(t.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new I(i.line,i.ch-1)),i.ch>0)i=new I(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),I(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=M(t.doc,i.line-1).text;a&&(i=new I(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),I(i.line-1,a.length-1),i,"+transpose"))}r.push(new Ol(i,i))}t.setSelections(r)})},newlineAndIndent:function(t){return pn(t,function(){for(var e=t.listSelections(),r=e.length-1;r>=0;r--)t.replaceRange(t.doc.lineSeparator(),e[r].anchor,e[r].head,"+input");e=t.listSelections();for(var n=0;n<e.length;n++)t.indentLine(e[n].from().line,null,!0);Kr(t)})},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}},Vl=new Ba,$l=null,Kl=function(t,e,r){this.time=t,this.pos=e,this.button=r};Kl.prototype.compare=function(t,e,r){return this.time+400>t&&0==H(e,this.pos)&&r==this.button};var ql,Xl,Yl={toString:function(){return"CodeMirror.Init"}},Zl={},Ql={};qo.defaults=Zl,qo.optionHandlers=Ql;var Jl=[];qo.defineInitHook=function(t){return Jl.push(t)};var ts=null,es=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ba,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};es.prototype.init=function(t){function e(t){if(!Nt(i,t)){if(i.somethingSelected())Zo({lineWise:!1,text:i.getSelections()}),"cut"==t.type&&i.replaceSelection("",null,"cut");else{
6
+ if(!i.options.lineWiseCopyCut)return;var e=ea(i);Zo({lineWise:!0,text:e.text}),"cut"==t.type&&i.operation(function(){i.setSelections(e.ranges,0,Va),i.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var r=ts.text.join("\n");if(t.clipboardData.setData("Text",r),t.clipboardData.getData("Text")==r)return void t.preventDefault()}var a=na(),l=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),l.value=ts.text.join("\n");var s=document.activeElement;Ra(l),setTimeout(function(){i.display.lineSpace.removeChild(a),s.focus(),s==o&&n.showPrimarySelection()},50)}}var r=this,n=this,i=n.cm,o=n.div=t.lineDiv;ra(o,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),rl(o,"paste",function(t){Nt(i,t)||Jo(t,i)||wa<=11&&setTimeout(gn(i,function(){return r.updateFromDOM()}),20)}),rl(o,"compositionstart",function(t){r.composing={data:t.data,done:!1}}),rl(o,"compositionupdate",function(t){r.composing||(r.composing={data:t.data,done:!1})}),rl(o,"compositionend",function(t){r.composing&&(t.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),rl(o,"touchstart",function(){return n.forceCompositionEnd()}),rl(o,"input",function(){r.composing||r.readFromDOMSoon()}),rl(o,"copy",e),rl(o,"cut",e)},es.prototype.prepareSelection=function(){var t=Nr(this.cm,!1);return t.focus=this.cm.state.focused,t},es.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},es.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},es.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(e.display.viewTo==e.display.viewFrom||n.line>=e.display.viewTo||i.line<e.display.viewFrom)return void t.removeAllRanges();var o=ca(e,t.anchorNode,t.anchorOffset),a=ca(e,t.focusNode,t.focusOffset);if(!o||o.bad||!a||a.bad||0!=H(B(o,a),n)||0!=H(R(o,a),i)){var l=e.display.view,s=n.line>=e.display.viewFrom&&aa(e,n)||{node:l[0].measure.map[2],offset:0},u=i.line<e.display.viewTo&&aa(e,i);if(!u){var c=l[l.length-1].measure,f=c.maps?c.maps[c.maps.length-1]:c.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!s||!u)return void t.removeAllRanges();var h,d=t.rangeCount&&t.getRangeAt(0);try{h=Ia(s.node,s.offset,u.offset,u.node)}catch(t){}h&&(!ga&&e.state.focused?(t.collapse(s.node,s.offset),h.collapsed||(t.removeAllRanges(),t.addRange(h))):(t.removeAllRanges(),t.addRange(h)),d&&null==t.anchorNode?t.addRange(d):ga&&this.startGracePeriod()),this.rememberSelection()}},es.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},es.prototype.showMultipleSelections=function(t){r(this.cm.display.cursorDiv,t.cursors),r(this.cm.display.selectionDiv,t.selection)},es.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},es.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return o(this.div,e)},es.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},es.prototype.blur=function(){this.div.blur()},es.prototype.getField=function(){return this.div},es.prototype.supportsTouch=function(){return!0},es.prototype.receivedFocus=function(){function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}var e=this;this.selectionInEditor()?this.pollSelection():pn(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,t)},es.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},es.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(Aa&&Ca&&this.cm.options.gutters.length&&la(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=ca(e,t.anchorNode,t.anchorOffset),n=ca(e,t.focusNode,t.focusOffset);r&&n&&pn(e,function(){xi(e.doc,_n(r,n),Va),(r.bad||n.bad)&&(e.curOp.selectionChanged=!0)})}}},es.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t=this.cm,e=t.display,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(0==n.ch&&n.line>t.firstLine()&&(n=I(n.line-1,M(t.doc,n.line-1).length)),i.ch==M(t.doc,i.line).text.length&&i.line<t.lastLine()&&(i=I(i.line+1,0)),n.line<e.viewFrom||i.line>e.viewTo-1)return!1;var o,a,l;n.line==e.viewFrom||0==(o=Lr(t,n.line))?(a=D(e.view[0].line),l=e.view[0].node):(a=D(e.view[o].line),l=e.view[o-1].node.nextSibling);var s,u,c=Lr(t,i.line);if(c==e.view.length-1?(s=e.viewTo-1,u=e.lineDiv.lastChild):(s=D(e.view[c+1].line)-1,u=e.view[c+1].node.previousSibling),!l)return!1;for(var f=t.doc.splitLines(ua(t,l,u,a,s)),h=N(t.doc,I(a,0),I(s,M(t.doc,s).text.length));f.length>1&&h.length>1;)if(g(f)==g(h))f.pop(),h.pop(),s--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),a++}for(var d=0,p=0,m=f[0],v=h[0],y=Math.min(m.length,v.length);d<y&&m.charCodeAt(d)==v.charCodeAt(d);)++d;for(var b=g(f),w=g(h),x=Math.min(b.length-(1==f.length?d:0),w.length-(1==h.length?d:0));p<x&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)++p;if(1==f.length&&1==h.length&&a==n.line)for(;d&&d>n.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)d--,p++;f[f.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var k=I(a,d),C=I(s,h.length?g(h).length-p:0);return f.length>1||f[0]||H(k,C)?(Fi(t.doc,f,k,C,"+input"),!0):void 0},es.prototype.ensurePolled=function(){this.forceCompositionEnd()},es.prototype.reset=function(){this.forceCompositionEnd()},es.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},es.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},es.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||pn(this.cm,function(){return yn(t.cm)})},es.prototype.setUneditable=function(t){t.contentEditable="false"},es.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||gn(this.cm,Qo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},es.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},es.prototype.onContextMenu=function(){},es.prototype.resetPosition=function(){},es.prototype.needsContentAttribute=!0;var rs=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Ba,this.hasSelection=!1,this.composing=null};rs.prototype.init=function(t){function e(t){if(!Nt(i,t)){if(i.somethingSelected())Zo({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=ea(i);Zo({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,Va):(n.prevInput="",o.value=e.text.join("\n"),Ra(o))}"cut"==t.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm;this.createField(t);var o=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),Na&&(o.style.width="0px"),rl(o,"input",function(){ba&&wa>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),rl(o,"paste",function(t){Nt(i,t)||Jo(t,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),rl(o,"cut",e),rl(o,"copy",e),rl(t.scroller,"paste",function(e){He(t,e)||Nt(i,e)||(i.state.pasteIncoming=!0,n.focus())}),rl(t.lineSpace,"selectstart",function(e){He(t,e)||Wt(e)}),rl(o,"compositionstart",function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}}),rl(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},rs.prototype.createField=function(t){this.wrapper=na(),this.textarea=this.wrapper.firstChild},rs.prototype.prepareSelection=function(){var t=this.cm,e=t.display,r=t.doc,n=Nr(t);if(t.options.moveInputWithCursor){var i=ur(t,r.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},rs.prototype.showSelection=function(t){var e=this.cm,n=e.display;r(n.cursorDiv,t.cursors),r(n.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},rs.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var r=e.getSelection();this.textarea.value=r,e.state.focused&&Ra(this.textarea),ba&&wa>=9&&(this.hasSelection=r)}else t||(this.prevInput=this.textarea.value="",ba&&wa>=9&&(this.hasSelection=null))}},rs.prototype.getField=function(){return this.textarea},rs.prototype.supportsTouch=function(){return!1},rs.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Oa||a()!=this.textarea))try{this.textarea.focus()}catch(t){}},rs.prototype.blur=function(){this.textarea.blur()},rs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},rs.prototype.receivedFocus=function(){this.slowPoll()},rs.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},rs.prototype.fastPoll=function(){function t(){r.poll()||e?(r.pollingFast=!1,r.slowPoll()):(e=!0,r.polling.set(60,t))}var e=!1,r=this;r.pollingFast=!0,r.polling.set(20,t)},rs.prototype.poll=function(){var t=this,e=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||ol(r)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=r.value;if(i==n&&!e.somethingSelected())return!1;if(ba&&wa>=9&&this.hasSelection===i||Da&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return pn(e,function(){Qo(e,i.slice(a),n.length-a,null,t.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},rs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},rs.prototype.onKeyPress=function(){ba&&wa>=9&&(this.hasSelection=null),this.fastPoll()},rs.prototype.onContextMenu=function(t){function e(){if(null!=a.selectionStart){var t=i.somethingSelected(),e="​"+(t?a.value:"");a.value="⇚",a.value=e,n.prevInput=t?"":"​",a.selectionStart=1,a.selectionEnd=e.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending==r&&(n.contextMenuPending=!1,n.wrapper.style.cssText=c,a.style.cssText=u,ba&&wa<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart)){(!ba||ba&&wa<9)&&e();var t=0,l=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==n.prevInput?gn(i,Ai)(i):t++<10?o.detectingSelectAll=setTimeout(l,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(l,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea;n.contextMenuPending&&n.contextMenuPending();var l=Tr(i,t),s=o.scroller.scrollTop;if(l&&!Sa){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(l)&&gn(i,xi)(i.doc,_n(l),Va);var u=a.style.cssText,c=n.wrapper.style.cssText,f=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-f.top-5)+"px; left: "+(t.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(ba?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(xa&&(h=window.scrollY),o.input.focus(),xa&&window.scrollTo(null,h),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=r,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),ba&&wa>=9&&e(),Fa){It(t);var d=function(){Lt(window,"mouseup",d),setTimeout(r,20)};rl(window,"mouseup",d)}else setTimeout(r,50)}},rs.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},rs.prototype.setUneditable=function(){},rs.prototype.needsContentAttribute=!1,function(t){function e(e,n,i,o){t.defaults[e]=n,i&&(r[e]=o?function(t,e,r){r!=Yl&&i(t,e,r)}:i)}var r=t.optionHandlers;t.defineOption=e,t.Init=Yl,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Kn(t)},!0),e("indentUnit",2,Kn,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qn(t),rr(t),yn(t)},!0),e("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var r=[],n=t.doc.first;t.doc.iter(function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,r.push(I(n,o))}n++});for(var i=r.length-1;i>=0;i--)Fi(t.doc,e,r[i],I(r[i].line,r[i].ch+e.length))}}),e("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,r){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),r!=Yl&&t.refresh()}),e("specialCharPlaceholder",ce,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Oa?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),e("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),e("rtlMoveVisually",!Ea),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){Go(t),Vo(t)},!0),e("keyMap","default",function(t,e,r){var n=fo(e),i=r!=Yl&&fo(r);i&&i.detach&&i.detach(t,n),n.attach&&n.attach(t,i||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ko,!0),e("gutters",[],function(t){Hn(t.options),Vo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?kr(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return rn(t)},!0),e("scrollbarStyle","native",function(t){on(t),rn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Hn(t.options),Vo(t)},!0),e("firstLineNumber",1,Vo,!0),e("lineNumberFormatter",function(t){return t},Vo,!0),e("showCursorWhenSelecting",!1,Mr,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("selectionsMayTouch",!1),e("readOnly",!1,function(t,e){"nocursor"==e&&(Hr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,$o),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,Mr,!0),e("singleCursorHeightPerLine",!0,Mr,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qn,!0),e("addModeClass",!1,qn,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qn,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),e("phrases",null)}(qo),function(t){var e=t.optionHandlers,r=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,r){var n=this.options,i=n[t];n[t]==r&&"mode"!=t||(n[t]=r,e.hasOwnProperty(t)&&gn(this,e[t])(this,r,i),Mt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](fo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,r=0;r<e.length;++r)if(e[r]==t||e[r].name==t)return e.splice(r,1),!0},addOverlay:mn(function(e,r){var n=e.token?e:t.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:n,modeSpec:e,opaque:r&&r.opaque,priority:r&&r.priority||0},function(t){return t.priority}),this.state.modeGen++,yn(this)}),removeOverlay:mn(function(t){for(var e=this,r=this.state.overlays,n=0;n<r.length;++n){var i=r[n].modeSpec;if(i==t||"string"==typeof t&&i.name==t)return r.splice(n,1),e.state.modeGen++,void yn(e)}}),indentLine:mn(function(t,e,r){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),E(this.doc,t)&&Yo(this,t,e,r)}),indentSelection:mn(function(t){for(var e=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(Yo(e,o.head.line,t,!0),n=o.head.line,i==e.doc.sel.primIndex&&Kr(e));else{var a=o.from(),l=o.to(),s=Math.max(n,a.line);n=Math.min(e.lastLine(),l.line-(l.ch?0:1))+1;for(var u=s;u<n;++u)Yo(e,u,t);var c=e.doc.sel.ranges;0==a.ch&&r.length==c.length&&c[i].from().ch>0&&vi(e.doc,i,new Ol(a,c[i].to()),Va)}}}),getTokenAt:function(t,e){return ee(this,t,e)},getLineTokens:function(t,e){return ee(this,I(t),e,!0)},getTokenTypeAt:function(t){t=j(this.doc,t);var e,r=Yt(this,M(this.doc,t.line)),n=0,i=(r.length-1)/2,o=t.ch;if(0==o)e=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){e=r[2*a+2];break}n=a+1}}var l=e?e.indexOf("overlay "):-1;return l<0?e:0==l?null:e.slice(0,l-1)},getModeAt:function(e){var r=this.doc.mode;return r.innerMode?t.innerMode(r,this.getTokenAt(e).state).mode:r},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var n=this,i=[];if(!r.hasOwnProperty(e))return i;var o=r[e],a=this.getModeAt(t);if("string"==typeof a[e])o[a[e]]&&i.push(o[a[e]]);else if(a[e])for(var l=0;l<a[e].length;l++){var s=o[a[e][l]];s&&i.push(s)}else a.helperType&&o[a.helperType]?i.push(o[a.helperType]):o[a.name]&&i.push(o[a.name]);for(var u=0;u<o._global.length;u++){var c=o._global[u];c.pred(a,n)&&-1==h(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(t,e){var r=this.doc;return t=_(r,null==t?r.first+r.size-1:t),Zt(this,t+1,e).state},cursorCoords:function(t,e){var r,n=this.doc.sel.primary();return r=null==t?n.head:"object"==typeof t?j(this.doc,t):t?n.from():n.to(),ur(this,r,e||"page")},charCoords:function(t,e){return sr(this,j(this.doc,t),e||"page")},coordsChar:function(t,e){return t=lr(this,t,e||"page"),hr(this,t.left,t.top)},lineAtHeight:function(t,e){return t=lr(this,{top:t,left:0},e||"page").top,W(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,r){var n,i=!1;if("number"==typeof t){var o=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>o&&(t=o,i=!0),n=M(this.doc,t)}else n=t;return ar(this,n,{top:0,left:0},e||"page",r||i).top+(i?this.doc.height-bt(n):0)},defaultTextHeight:function(){return br(this.display)},defaultCharWidth:function(){return wr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,r,n,i){var o=this.display;t=ur(this,j(this.doc,t));var a=t.bottom,l=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==n)a=t.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||t.bottom+e.offsetHeight>s)&&t.top>e.offsetHeight?a=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=s&&(a=t.bottom),l+e.offsetWidth>u&&(l=u-e.offsetWidth)}e.style.top=a+"px",e.style.left=e.style.right="","right"==i?(l=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=l+"px"),r&&Gr(this,{left:l,top:a,right:l+e.offsetWidth,bottom:a+e.offsetHeight})},triggerOnKeyDown:mn(Mo),triggerOnKeyPress:mn(Oo),triggerOnKeyUp:Ao,triggerOnMouseDown:mn(Wo),execCommand:function(t){if(Gl.hasOwnProperty(t))return Gl[t].call(null,this)},triggerElectric:mn(function(t){ta(this,t)}),findPosH:function(t,e,r,n){var i=this,o=1;e<0&&(o=-1,e=-e);for(var a=j(this.doc,t),l=0;l<e&&(a=ia(i.doc,a,o,r,n),!a.hitSide);++l);return a},moveH:mn(function(t,e){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?ia(r.doc,n.head,t,e,r.options.rtlMoveVisually):t<0?n.from():n.to()},Ka)}),deleteH:mn(function(t,e){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):ho(this,function(r){var i=ia(n,r.head,t,e,!1);return t<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(t,e,r,n){var i=this,o=1,a=n;e<0&&(o=-1,e=-e);for(var l=j(this.doc,t),s=0;s<e;++s){var u=ur(i,l,"div");if(null==a?a=u.left:u.left=a,l=oa(i,u,o,r),l.hitSide)break}return l},moveV:mn(function(t,e){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return t<0?a.from():a.to();var l=ur(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=oa(r,l,t,e);return"page"==e&&a==n.sel.primary()&&$r(r,sr(r,s,"div").top-l.top),s},Ka),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(t){var e=this.doc,r=M(e,t.line).text,n=t.ch,i=t.ch;if(r){var o=this.getHelper(t,"wordChars");"before"!=t.sticky&&i!=r.length||!n?++i:--n;for(var a=r.charAt(n),l=x(a,o)?function(t){return x(t,o)}:/\s/.test(a)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!x(t)};n>0&&l(r.charAt(n-1));)--n;for(;i<r.length&&l(r.charAt(i));)++i}return new Ol(I(t.line,n),I(t.line,i))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?l(this.display.cursorDiv,"CodeMirror-overwrite"):za(this.display.cursorDiv,"CodeMirror-overwrite"),Mt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==a()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:mn(function(t,e){qr(this,t,e)}),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Be(this)-this.display.barHeight,width:t.scrollWidth-Be(this)-this.display.barWidth,clientHeight:je(this),clientWidth:_e(this)}},scrollIntoView:mn(function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:I(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?Xr(this,t):Zr(this,t.from,t.to,t.margin)}),setSize:mn(function(t,e){var r=this,n=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=n(t)),null!=e&&(this.display.wrapper.style.height=n(e)),this.options.lineWrapping&&er(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){bn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Mt(this,"refresh",this)}),operation:function(t){return pn(this,t)},startOperation:function(){return an(this)},endOperation:function(){return ln(this)},refresh:mn(function(){var t=this.display.cachedTextHeight;yn(this),this.curOp.forceUpdate=!0,rr(this),qr(this,this.doc.scrollLeft,this.doc.scrollTop),En(this),(null==t||Math.abs(t-br(this.display))>.5)&&Sr(this),Mt(this,"refresh",this)}),swapDoc:mn(function(t){var e=this.doc;return e.cm=null,Qn(this,t),rr(this),this.display.input.reset(),qr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,xe(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Dt(t),t.registerHelper=function(e,n,i){r.hasOwnProperty(e)||(r[e]=t[e]={_global:[]}),r[e][n]=i},t.registerGlobalHelper=function(e,n,i,o){t.registerHelper(e,n,o),r[e]._global.push({pred:i,val:o})}}(qo);var ns="iter insert remove copy getEditor constructor".split(" ");for(var is in Hl.prototype)Hl.prototype.hasOwnProperty(is)&&h(ns,is)<0&&(qo.prototype[is]=function(t){return function(){return t.apply(this.doc,arguments)}}(Hl.prototype[is]));return Dt(Hl),qo.inputStyles={textarea:rs,contenteditable:es},qo.defineMode=function(t){qo.defaults.mode||"null"==t||(qo.defaults.mode=t),_t.apply(this,arguments)},qo.defineMIME=jt,qo.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),qo.defineMIME("text/plain","null"),qo.defineExtension=function(t,e){qo.prototype[t]=e},qo.defineDocExtension=function(t,e){Hl.prototype[t]=e},qo.fromTextArea=ha,function(t){t.off=Lt,t.on=rl,t.wheelEventPixels=zn,t.Doc=Hl,t.splitLines=il,t.countColumn=f,t.findColumn=d,t.isWordChar=w,t.Pass=Ga,t.signal=Mt,t.Line=gl,t.changeEnd=jn,t.scrollbarModel=Sl,t.Pos=I,t.cmpPos=H,t.modes=sl,t.mimeModes=ul,t.resolveMode=Ut,t.getMode=Gt,t.modeExtensions=cl,t.extendMode=Vt,t.copyState=$t,t.startState=qt,t.innerMode=Kt,t.commands=Gl,t.keyMap=Ul,t.keyName=co,t.isModifierKey=so,t.lookupKey=lo,t.normalizeKeyMap=ao,t.StringStream=fl,t.SharedTextMarker=Pl,t.TextMarker=El,t.LineWidget=Dl,t.e_preventDefault=Wt,t.e_stopPropagation=Et,t.e_stop=It,t.addClass=l,t.contains=o,t.rmClass=za,t.keyNames=Rl}(qo),qo.version="5.43.0",qo}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(n,i){function o(t,e){function r(r){return e.tokenize=r,r(t,e)}var n=t.next();if("<"==n)return t.eat("!")?t.eat("[")?t.match("CDATA[")?r(s("atom","]]>")):null:t.match("--")?r(s("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),r(u(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=s("meta","?>"),"meta"):(L=t.eat("/")?"closeTag":"openTag",e.tokenize=a,"tag bracket");if("&"==n){var i;return i=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),i?"atom":"error"}return t.eatWhile(/[^&<]/),null}function a(t,e){var r=t.next();if(">"==r||"/"==r&&t.eat(">"))return e.tokenize=o,L=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return L="equals",null;if("<"==r){e.tokenize=o,e.state=d,e.tagName=e.tagStart=null;var n=e.tokenize(t,e);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(e.tokenize=l(r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(t){var e=function(e,r){for(;!e.eol();)if(e.next()==t){r.tokenize=a;break}return"string"};return e.isInAttribute=!0,e}function s(t,e){return function(r,n){for(;!r.eol();){if(r.match(e)){n.tokenize=o;break}r.next()}return t}}function u(t){return function(e,r){for(var n;null!=(n=e.next());){if("<"==n)return r.tokenize=u(t+1),r.tokenize(e,r);if(">"==n){if(1==t){r.tokenize=o;break}return r.tokenize=u(t-1),r.tokenize(e,r)}}return"meta"}}function c(t,e,r){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=r,(C.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function f(t){t.context&&(t.context=t.context.prev)}function h(t,e){for(var r;;){if(!t.context)return;if(r=t.context.tagName,!C.contextGrabbers.hasOwnProperty(r)||!C.contextGrabbers[r].hasOwnProperty(e))return;f(t)}}function d(t,e,r){return"openTag"==t?(r.tagStart=e.column(),p):"closeTag"==t?g:d}function p(t,e,r){return"word"==t?(r.tagName=e.current(),M="tag",y):C.allowMissingTagName&&"endTag"==t?(M="tag bracket",y(t,e,r)):(M="error",p)}function g(t,e,r){if("word"==t){var n=e.current();return r.context&&r.context.tagName!=n&&C.implicitlyClosed.hasOwnProperty(r.context.tagName)&&f(r),r.context&&r.context.tagName==n||!1===C.matchClosing?(M="tag",m):(M="tag error",v)}return C.allowMissingTagName&&"endTag"==t?(M="tag bracket",m(t,e,r)):(M="error",v)}function m(t,e,r){return"endTag"!=t?(M="error",m):(f(r),d)}function v(t,e,r){return M="error",m(t,e,r)}function y(t,e,r){if("word"==t)return M="attribute",b;if("endTag"==t||"selfcloseTag"==t){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==t||C.autoSelfClosers.hasOwnProperty(n)?h(r,n):(h(r,n),r.context=new c(r,n,i==r.indented)),d}return M="error",y}function b(t,e,r){return"equals"==t?w:(C.allowMissing||(M="error"),y(t,e,r))}function w(t,e,r){return"string"==t?x:"word"==t&&C.allowUnquoted?(M="string",y):(M="error",y(t,e,r))}function x(t,e,r){return"string"==t?x:y(t,e,r)}var k=n.indentUnit,C={},S=i.htmlMode?e:r;for(var T in S)C[T]=S[T];for(var T in i)C[T]=i[T];var L,M;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:d,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;L=null;var r=e.tokenize(t,e);return(r||L)&&"comment"!=r&&(M=null,e.state=e.state(L||r,t,e),M&&(r="error"==M?r+" error":M)),r},indent:function(e,r,n){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+k;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=a&&e.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==C.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+k*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}
7
+ if(!C.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=C.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+k:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(t){t.state==w&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)}(function(t){"use strict";function e(t,e,r){var n=t.current(),i=n.search(e);return i>-1?t.backUp(n.length-i):n.match(/<\/?$/)&&(t.backUp(n.length),t.match(e,!1)||t.match(n)),r}function r(t){var e=s[t];return e||(s[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(t,e){var n=t.match(r(e));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function i(t,e){return new RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function o(t,e){for(var r in t)for(var n=e[r]||(e[r]=[]),i=t[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}function a(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(!i[0]||i[1].test(n(e,i[0])))return i[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},s={};t.defineMode("htmlmixed",function(r,n){function s(n,o){var l,f=u.token(n,o.htmlState),h=/\btag\b/.test(f);if(h&&!/[<>\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&h&&/>$/.test(n.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==n.current()&&a(c[d[1]],d[2]),g=t.getMode(r,p),m=i(d[1],!0),v=i(d[1],!1);o.token=function(t,r){return t.match(m,!1)?(r.token=s,r.localState=r.localMode=null,null):e(t,v,r.localMode.token(t,r.localState))},o.localMode=g,o.localState=t.startState(g,u.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return f}var u=t.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),c={},f=n&&n.tags,h=n&&n.scriptTypes;if(o(l,c),f&&o(f,c),h)for(var d=h.length-1;d>=0;d--)c.script.unshift(["type",h[d].matches,h[d].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:t.startState(u)}},copyState:function(e){var r;return e.localState&&(r=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:r,htmlState:t.copyState(u,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,r,n){return!e.localMode||/^\s*<\//.test(r)?u.indent(e.htmlState,r,n):e.localMode.indent?e.localMode.indent(e.localState,r,n):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||u}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("javascript",function(e,r){function n(t){for(var e,r=!1,n=!1;null!=(e=t.next());){if(!r){if("/"==e&&!n)return;"["==e?n=!0:n&&"]"==e&&(n=!1)}r=!r&&"\\"==e}}function i(t,e,r){return _t=t,jt=r,e}function o(t,e){var r=t.next();if('"'==r||"'"==r)return e.tokenize=a(r),e.tokenize(t,e);if("."==r&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==r&&t.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return i(r);if("="==r&&t.eat(">"))return i("=>","operator");if("0"==r&&t.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return i("number","number");if(/\d/.test(r))return t.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),i("number","number");if("/"==r)return t.eat("*")?(e.tokenize=l,l(t,e)):t.eat("/")?(t.skipToEnd(),i("comment","comment")):Bt(t,e,1)?(n(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),i("regexp","string-2")):(t.eat("="),i("operator","operator",t.current()));if("`"==r)return e.tokenize=s,s(t,e);if("#"==r)return t.skipToEnd(),i("error","error");if(Yt.test(r))return">"==r&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=r&&"="!=r||t.eat("="):/[<>*+\-]/.test(r)&&(t.eat(r),">"==r&&t.eat(r))),i("operator","operator",t.current());if(qt.test(r)){t.eatWhile(qt);var o=t.current();if("."!=e.lastType){if(Xt.propertyIsEnumerable(o)){var u=Xt[o];return i(u.type,u.style,o)}if("async"==o&&t.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return i("async","keyword",o)}return i("variable","variable",o)}}function a(t){return function(e,r){var n,a=!1;if(Vt&&"@"==e.peek()&&e.match(Zt))return r.tokenize=o,i("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=t||a);)a=!a&&"\\"==n;return a||(r.tokenize=o),i("string","string")}}function l(t,e){for(var r,n=!1;r=t.next();){if("/"==r&&n){e.tokenize=o;break}n="*"==r}return i("comment","comment")}function s(t,e){for(var r,n=!1;null!=(r=t.next());){if(!n&&("`"==r||"$"==r&&t.eat("{"))){e.tokenize=o;break}n=!n&&"\\"==r}return i("quasi","string-2",t.current())}function u(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var r=t.string.indexOf("=>",t.start);if(!(r<0)){if(Kt){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=t.string.charAt(a),s=Qt.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(qt.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(e.fatArrowAt=a)}}function c(t,e,r,n,i,o){this.indented=t,this.column=e,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function f(t,e){for(var r=t.localVars;r;r=r.next)if(r.name==e)return!0;for(var n=t.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==e)return!0}function h(t,e,r,n,i){var o=t.cc;for(te.state=t,te.stream=i,te.marked=null,te.cc=o,te.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():$t?A:M)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return te.marked?te.marked:"variable"==r&&f(t,n)?"variable-2":e}}}function d(){for(var t=arguments.length-1;t>=0;t--)te.cc.push(arguments[t])}function p(){return d.apply(null,arguments),!0}function g(t,e){for(var r=e;r;r=r.next)if(r.name==t)return!0;return!1}function m(t){var e=te.state;if(te.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var n=v(t,e.context);if(null!=n)return void(e.context=n)}else if(!g(t,e.localVars))return void(e.localVars=new w(t,e.localVars));r.globalVars&&!g(t,e.globalVars)&&(e.globalVars=new w(t,e.globalVars))}function v(t,e){if(e){if(e.block){var r=v(t,e.prev);return r?r==e.prev?e:new b(r,e.vars,!0):null}return g(t,e.vars)?e:new b(e.prev,new w(t,e.vars),!1)}return null}function y(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function b(t,e,r){this.prev=t,this.vars=e,this.block=r}function w(t,e){this.name=t,this.next=e}function x(){te.state.context=new b(te.state.context,te.state.localVars,!1),te.state.localVars=ee}function k(){te.state.context=new b(te.state.context,te.state.localVars,!0),te.state.localVars=null}function C(){te.state.localVars=te.state.context.vars,te.state.context=te.state.context.prev}function S(t,e){var r=function(){var r=te.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new c(n,te.stream.column(),t,null,r.lexical,e)};return r.lex=!0,r}function T(){var t=te.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function L(t){function e(r){return r==t?p():";"==t||"}"==r||")"==r||"]"==r?d():p(e)}return e}function M(t,e){return"var"==t?p(S("vardef",e),st,L(";"),T):"keyword a"==t?p(S("form"),D,M,T):"keyword b"==t?p(S("form"),M,T):"keyword d"==t?te.stream.match(/^\s*$/,!1)?p():p(S("stat"),E,L(";"),T):"debugger"==t?p(L(";")):"{"==t?p(S("}"),k,Y,T,C):";"==t?p():"if"==t?("else"==te.state.lexical.info&&te.state.cc[te.state.cc.length-1]==T&&te.state.cc.pop()(),p(S("form"),D,M,T,pt)):"function"==t?p(wt):"for"==t?p(S("form"),gt,M,T):"class"==t||Kt&&"interface"==e?(te.marked="keyword",p(S("form","class"==t?t:e),Tt,T)):"variable"==t?Kt&&"declare"==e?(te.marked="keyword",p(M)):Kt&&("module"==e||"enum"==e||"type"==e)&&te.stream.match(/^\s*\w/,!1)?(te.marked="keyword","enum"==e?p(Ft):"type"==e?p(kt,L("operator"),tt,L(";")):p(S("form"),ut,L("{"),S("}"),Y,T,T)):Kt&&"namespace"==e?(te.marked="keyword",p(S("form"),A,M,T)):Kt&&"abstract"==e?(te.marked="keyword",p(M)):p(S("stat"),U):"switch"==t?p(S("form"),D,L("{"),S("}","switch"),k,Y,T,T,C):"case"==t?p(A,L(":")):"default"==t?p(L(":")):"catch"==t?p(S("form"),x,N,M,T,C):"export"==t?p(S("stat"),At,T):"import"==t?p(S("stat"),Dt,T):"async"==t?p(M):"@"==e?p(A,M):d(S("stat"),A,L(";"),T)}function N(t){if("("==t)return p(Ct,L(")"))}function A(t,e){return W(t,e,!1)}function O(t,e){return W(t,e,!0)}function D(t){return"("!=t?d():p(S(")"),A,L(")"),T)}function W(t,e,r){if(te.state.fatArrowAt==te.stream.start){var n=r?R:z;if("("==t)return p(x,S(")"),q(Ct,")"),T,L("=>"),n,C);if("variable"==t)return d(x,ut,L("=>"),n,C)}var i=r?I:P;return Jt.hasOwnProperty(t)?p(i):"function"==t?p(wt,i):"class"==t||Kt&&"interface"==e?(te.marked="keyword",p(S("form"),St,T)):"keyword c"==t||"async"==t?p(r?O:A):"("==t?p(S(")"),E,L(")"),T,i):"operator"==t||"spread"==t?p(r?O:A):"["==t?p(S("]"),Ht,T,i):"{"==t?X(V,"}",null,i):"quasi"==t?d(H,i):"new"==t?p(B(r)):"import"==t?p(A):p()}function E(t){return t.match(/[;\}\)\],]/)?d():d(A)}function P(t,e){return","==t?p(A):I(t,e,!1)}function I(t,e,r){var n=0==r?P:I,i=0==r?A:O;return"=>"==t?p(x,r?R:z,C):"operator"==t?/\+\+|--/.test(e)||Kt&&"!"==e?p(n):Kt&&"<"==e&&te.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?p(S(">"),q(tt,">"),T,n):"?"==e?p(A,L(":"),i):p(i):"quasi"==t?d(H,n):";"!=t?"("==t?X(O,")","call",n):"."==t?p(G,n):"["==t?p(S("]"),E,L("]"),T,n):Kt&&"as"==e?(te.marked="keyword",p(tt,n)):"regexp"==t?(te.state.lastType=te.marked="operator",te.stream.backUp(te.stream.pos-te.stream.start-1),p(i)):void 0:void 0}function H(t,e){return"quasi"!=t?d():"${"!=e.slice(e.length-2)?p(H):p(A,F)}function F(t){if("}"==t)return te.marked="string-2",te.state.tokenize=s,p(H)}function z(t){return u(te.stream,te.state),d("{"==t?M:A)}function R(t){return u(te.stream,te.state),d("{"==t?M:O)}function B(t){return function(e){return"."==e?p(t?j:_):"variable"==e&&Kt?p(ot,t?I:P):d(t?O:A)}}function _(t,e){if("target"==e)return te.marked="keyword",p(P)}function j(t,e){if("target"==e)return te.marked="keyword",p(I)}function U(t){return":"==t?p(T,M):d(P,L(";"),T)}function G(t){if("variable"==t)return te.marked="property",p()}function V(t,e){if("async"==t)return te.marked="property",p(V);if("variable"==t||"keyword"==te.style){if(te.marked="property","get"==e||"set"==e)return p($);var r;return Kt&&te.state.fatArrowAt==te.stream.start&&(r=te.stream.match(/^\s*:\s*/,!1))&&(te.state.fatArrowAt=te.stream.pos+r[0].length),p(K)}return"number"==t||"string"==t?(te.marked=Vt?"property":te.style+" property",p(K)):"jsonld-keyword"==t?p(K):Kt&&y(e)?(te.marked="keyword",p(V)):"["==t?p(A,Z,L("]"),K):"spread"==t?p(O,K):"*"==e?(te.marked="keyword",p(V)):":"==t?d(K):void 0}function $(t){return"variable"!=t?d(K):(te.marked="property",p(wt))}function K(t){return":"==t?p(O):"("==t?d(wt):void 0}function q(t,e,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=te.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),p(function(r,n){return r==e||n==e?d():d(t)},n)}return i==e||o==e?p():r&&r.indexOf(";")>-1?d(t):p(L(e))}return function(r,i){return r==e||i==e?p():d(t,n)}}function X(t,e,r){for(var n=3;n<arguments.length;n++)te.cc.push(arguments[n]);return p(S(e,r),q(t,e),T)}function Y(t){return"}"==t?p():d(M,Y)}function Z(t,e){if(Kt){if(":"==t||"in"==e)return p(tt);if("?"==e)return p(Z)}}function Q(t){if(Kt&&":"==t)return te.stream.match(/^\s*\w+\s+is\b/,!1)?p(A,J,tt):p(tt)}function J(t,e){if("is"==e)return te.marked="keyword",p()}function tt(t,e){return"keyof"==e||"typeof"==e||"infer"==e?(te.marked="keyword",p("typeof"==e?O:tt)):"variable"==t||"void"==e?(te.marked="type",p(it)):"string"==t||"number"==t||"atom"==t?p(it):"["==t?p(S("]"),q(tt,"]",","),T,it):"{"==t?p(S("}"),q(rt,"}",",;"),T,it):"("==t?p(q(nt,")"),et,it):"<"==t?p(q(tt,">"),tt):void 0}function et(t){if("=>"==t)return p(tt)}function rt(t,e){return"variable"==t||"keyword"==te.style?(te.marked="property",p(rt)):"?"==e||"number"==t||"string"==t?p(rt):":"==t?p(tt):"["==t?p(L("variable"),Z,L("]"),rt):"("==t?d(xt,rt):void 0}function nt(t,e){return"variable"==t&&te.stream.match(/^\s*[?:]/,!1)||"?"==e?p(nt):":"==t?p(tt):"spread"==t?p(nt):d(tt)}function it(t,e){return"<"==e?p(S(">"),q(tt,">"),T,it):"|"==e||"."==t||"&"==e?p(tt):"["==t?p(tt,L("]"),it):"extends"==e||"implements"==e?(te.marked="keyword",p(tt)):"?"==e?p(tt,L(":"),tt):void 0}function ot(t,e){if("<"==e)return p(S(">"),q(tt,">"),T,it)}function at(){return d(tt,lt)}function lt(t,e){if("="==e)return p(tt)}function st(t,e){return"enum"==e?(te.marked="keyword",p(Ft)):d(ut,Z,ht,dt)}function ut(t,e){return Kt&&y(e)?(te.marked="keyword",p(ut)):"variable"==t?(m(e),p()):"spread"==t?p(ut):"["==t?X(ft,"]"):"{"==t?X(ct,"}"):void 0}function ct(t,e){return"variable"!=t||te.stream.match(/^\s*:/,!1)?("variable"==t&&(te.marked="property"),"spread"==t?p(ut):"}"==t?d():"["==t?p(A,L("]"),L(":"),ct):p(L(":"),ut,ht)):(m(e),p(ht))}function ft(){return d(ut,ht)}function ht(t,e){if("="==e)return p(O)}function dt(t){if(","==t)return p(st)}function pt(t,e){if("keyword b"==t&&"else"==e)return p(S("form","else"),M,T)}function gt(t,e){return"await"==e?p(gt):"("==t?p(S(")"),mt,L(")"),T):void 0}function mt(t){return"var"==t?p(st,L(";"),yt):";"==t?p(yt):"variable"==t?p(vt):d(A,L(";"),yt)}function vt(t,e){return"in"==e||"of"==e?(te.marked="keyword",p(A)):p(P,yt)}function yt(t,e){return";"==t?p(bt):"in"==e||"of"==e?(te.marked="keyword",p(A)):d(A,L(";"),bt)}function bt(t){")"!=t&&p(A)}function wt(t,e){return"*"==e?(te.marked="keyword",p(wt)):"variable"==t?(m(e),p(wt)):"("==t?p(x,S(")"),q(Ct,")"),T,Q,M,C):Kt&&"<"==e?p(S(">"),q(at,">"),T,wt):void 0}function xt(t,e){return"*"==e?(te.marked="keyword",p(xt)):"variable"==t?(m(e),p(xt)):"("==t?p(x,S(")"),q(Ct,")"),T,Q,C):Kt&&"<"==e?p(S(">"),q(at,">"),T,xt):void 0}function kt(t,e){return"keyword"==t||"variable"==t?(te.marked="type",p(kt)):"<"==e?p(S(">"),q(at,">"),T):void 0}function Ct(t,e){return"@"==e&&p(A,Ct),"spread"==t?p(Ct):Kt&&y(e)?(te.marked="keyword",p(Ct)):d(ut,Z,ht)}function St(t,e){return"variable"==t?Tt(t,e):Lt(t,e)}function Tt(t,e){if("variable"==t)return m(e),p(Lt)}function Lt(t,e){return"<"==e?p(S(">"),q(at,">"),T,Lt):"extends"==e||"implements"==e||Kt&&","==t?("implements"==e&&(te.marked="keyword"),p(Kt?tt:A,Lt)):"{"==t?p(S("}"),Mt,T):void 0}function Mt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||Kt&&y(e))&&te.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(te.marked="keyword",p(Mt)):"variable"==t||"keyword"==te.style?(te.marked="property",p(Kt?Nt:wt,Mt)):"number"==t||"string"==t?p(Kt?Nt:wt,Mt):"["==t?p(A,Z,L("]"),Kt?Nt:wt,Mt):"*"==e?(te.marked="keyword",p(Mt)):Kt&&"("==t?d(xt,Mt):";"==t||","==t?p(Mt):"}"==t?p():"@"==e?p(A,Mt):void 0}function Nt(t,e){if("?"==e)return p(Nt);if(":"==t)return p(tt,ht);if("="==e)return p(O);var r=te.state.lexical.prev;return d(r&&"interface"==r.info?xt:wt)}function At(t,e){return"*"==e?(te.marked="keyword",p(It,L(";"))):"default"==e?(te.marked="keyword",p(A,L(";"))):"{"==t?p(q(Ot,"}"),It,L(";")):d(M)}function Ot(t,e){return"as"==e?(te.marked="keyword",p(L("variable"))):"variable"==t?d(O,Ot):void 0}function Dt(t){return"string"==t?p():"("==t?d(A):d(Wt,Et,It)}function Wt(t,e){return"{"==t?X(Wt,"}"):("variable"==t&&m(e),"*"==e&&(te.marked="keyword"),p(Pt))}function Et(t){if(","==t)return p(Wt,Et)}function Pt(t,e){if("as"==e)return te.marked="keyword",p(Wt)}function It(t,e){if("from"==e)return te.marked="keyword",p(A)}function Ht(t){return"]"==t?p():d(q(O,"]"))}function Ft(){return d(S("form"),ut,L("{"),S("}"),q(zt,"}"),T,T)}function zt(){return d(ut,ht)}function Rt(t,e){return"operator"==t.lastType||","==t.lastType||Yt.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Bt(t,e,r){return e.tokenize==o&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(r||0)))}var _t,jt,Ut=e.indentUnit,Gt=r.statementIndent,Vt=r.jsonld,$t=r.json||Vt,Kt=r.typescript,qt=r.wordCharacters||/[\w$\xa1-\uffff]/,Xt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),r=t("keyword b"),n=t("keyword c"),i=t("keyword d"),o=t("operator"),a={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:t("new"),delete:n,void:n,throw:n,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:t("this"),class:t("class"),super:t("atom"),yield:n,export:t("export"),import:t("import"),extends:n,await:n}}(),Yt=/[+\-*&%=<>!?|~^@]/,Zt=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Qt="([{}])",Jt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},te={state:null,column:null,marked:null,cc:null},ee=new w("this",new w("arguments",null));return C.lex=!0,T.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new c((t||0)-Ut,0,"block",!1),localVars:r.localVars,context:r.localVars&&new b(null,null,!1),indented:t||0};return r.globalVars&&"object"==typeof r.globalVars&&(e.globalVars=r.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),u(t,e)),e.tokenize!=l&&t.eatSpace())return null;var r=e.tokenize(t,e);return"comment"==_t?r:(e.lastType="operator"!=_t||"++"!=jt&&"--"!=jt?_t:"incdec",h(e,r,_t,jt,t))},indent:function(e,n){if(e.tokenize==l)return t.Pass;if(e.tokenize!=o)return 0;var i,a=n&&n.charAt(0),s=e.lexical;if(!/^\s*else\b/.test(n))for(var u=e.cc.length-1;u>=0;--u){var c=e.cc[u];if(c==T)s=s.prev;else if(c!=pt)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(i=e.cc[e.cc.length-1])&&(i==P||i==I)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Gt&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,h=a==f;return"vardef"==f?s.indented+("operator"==e.lastType||","==e.lastType?s.info.length+1:0):"form"==f&&"{"==a?s.indented:"form"==f?s.indented+Ut:"stat"==f?s.indented+(Rt(e,n)?Gt||Ut:0):"switch"!=s.info||h||0==r.doubleIndentSwitch?s.align?s.column+(h?0:1):s.indented+(h?0:Ut):s.indented+(/^(?:case|default)\b/.test(n)?Ut:2*Ut)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:$t?null:"/*",blockCommentEnd:$t?null:"*/",blockCommentContinue:$t?null:" * ",lineComment:$t?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:$t?"json":"javascript",jsonldMode:Vt,jsonMode:$t,expressionAllowed:Bt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=A&&e!=O||t.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})});
dist/scripts/main.js CHANGED
@@ -1 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.postscribe=e():t.postscribe=e()}(this,function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";var r=o(1),n=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=n.default},function(t,e,o){"use strict";function r(){}function n(){var t=m.shift();if(t){var e=l.last(t);e.afterDequeue(),t.stream=i.apply(void 0,t),e.afterStreamStart()}}function i(t,e,o){function i(t){t=o.beforeWrite(t),h.write(t),o.afterWrite(t)}h=new d.default(t,o),h.id=f++,h.name=o.name||h.id,s.streams[h.name]=h;var c=t.ownerDocument,p={close:c.close,open:c.open,write:c.write,writeln:c.writeln};a(c,{close:r,open:r,write:function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return i(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return i(e.join("")+"\n")}});var l=h.win.onerror||r;return h.win.onerror=function(t,e,r){o.error({msg:t+" - "+e+": "+r}),l.apply(h.win,[t,e,r])},h.write(e,function(){a(c,p),h.win.onerror=l,o.done(),h=null,n()}),h}function s(t,e,o){if(l.isFunction(o))o={done:o};else if("clear"===o)return m=[],h=null,void(f=0);o=l.defaults(o,u),t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t;var i=[t,e,o];return t.postscribe={cancel:function(){i.stream?i.stream.abort():i[1]=r}},o.beforeEnqueue(i),m.push(i),h||n(),t.postscribe}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t};e.default=s;var c=o(2),d=function(t){return t&&t.__esModule?t:{default:t}}(c),p=o(4),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e.default=t,e}(p),u={afterAsync:r,afterDequeue:r,afterStreamStart:r,afterWrite:r,autoFix:!0,beforeEnqueue:r,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:r,error:function(t){throw new Error(t.msg)},releaseAsync:!1},f=0,m=[],h=null;a(s,{streams:{},queue:m,WriteStream:d.default})},function(t,e,o){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){var o=l+e,r=t.getAttribute(o);return p.existy(r)?String(r):r}function i(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=l+e;p.existy(o)&&""!==o?t.setAttribute(r,o):t.removeAttribute(r)}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},a=o(3),c=function(t){return t&&t.__esModule?t:{default:t}}(a),d=o(4),p=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e.default=t,e}(d),l="data-ps-",u="ps-style",f="ps-script",m=function(){function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.root=e,this.options=o,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new c.default("",{autoFix:o.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],i(this.proxyRoot,"proxyof",0)}return t.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();p.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},t.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},t.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,o=void 0,r=void 0,n=[];(e=this.parser.readToken())&&!(o=p.isScript(e))&&!(r=p.isStyle(e));)(e=this.options.beforeWriteToken(e))&&n.push(e);n.length>0&&this._writeStaticTokens(n),o&&this._handleScriptToken(e),r&&this._handleStyleToken(e)},t.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},t.prototype._buildChunk=function(t){for(var e=this.actuals.length,o=[],r=[],n=[],i=t.length,s=0;s<i;s++){var a=t[s],c=a.toString();if(o.push(c),a.attrs){if(!/^noscript$/i.test(a.tagName)){var d=e++;r.push(c.replace(/(\/?>)/," "+l+"id="+d+" $1")),a.attrs.id!==f&&a.attrs.id!==u&&n.push("atomicTag"===a.type?"":"<"+a.tagName+" "+l+"proxyof="+d+(a.unary?" />":">"))}}else r.push(c),n.push("endTag"===a.type?c:"")}return{tokens:t,raw:o.join(""),actual:r.join(""),proxy:n.join("")}},t.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];p.existy(t=e.shift());){var o=1===t.nodeType;if(!(o&&n(t,"proxyof"))){o&&(this.actuals[n(t,"id")]=t,i(t,"id"));var r=t.parentNode&&n(t.parentNode,"proxyof");r&&this.actuals[r].appendChild(t)}e.unshift.apply(e,p.toArray(t.childNodes))}},t.prototype._handleScriptToken=function(t){var e=this,o=this.parser.clear();o&&this.writeQueue.unshift(o),t.src=t.attrs.src||t.attrs.SRC,(t=this.options.beforeWriteToken(t))&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},t.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",t=this.options.beforeWriteToken(t),t&&this._writeStyleToken(t),e&&this.write()},t.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,u),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},t.prototype._buildStyle=function(t){var e=this.doc.createElement(t.tagName);return e.setAttribute("type",t.type),p.eachKey(t.attrs,function(t,o){e.setAttribute(t,o)}),e},t.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var o=this.doc.getElementById(e);o&&o.parentNode.replaceChild(t,o)},t.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},t.prototype._onScriptDone=function(t){return t!==this.scriptStack[0]?void this.options.error({msg:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},t.prototype._writeScriptToken=function(t,e){var o=this._buildScript(t),r=this._shouldRelease(o),n=this.options.afterAsync;t.src&&(o.src=t.src,this._scriptLoadHandler(o,r?n:function(){e(),n()}));try{this._insertCursor(o,f),o.src&&!r||e()}catch(t){this.options.error(t),e()}},t.prototype._buildScript=function(t){var e=this.doc.createElement(t.tagName);return p.eachKey(t.attrs,function(t,o){e.setAttribute(t,o)}),t.content&&(e.text=t.content),e},t.prototype._scriptLoadHandler=function(t,e){function o(){t=t.onload=t.onreadystatechange=t.onerror=null}function r(){o(),null!=e&&e(),e=null}function n(t){o(),a(t),null!=e&&e(),e=null}function i(t,e){var o=t["on"+e];null!=o&&(t["_on"+e]=o)}var a=this.options.error;i(t,"load"),i(t,"error"),s(t,{onload:function(){if(t._onload)try{t._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){n({msg:"onload handler failed "+e+" @ "+t.src})}r()},onerror:function(){if(t._onerror)try{t._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){return void n({msg:"onerror handler failed "+e+" @ "+t.src})}n({msg:"remote script failed "+t.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(t.readyState)&&r()}})},t.prototype._shouldRelease=function(t){return!/^script$/i.test(t.nodeName)||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},t}();e.default=m},function(t,e,o){!function(e,o){t.exports=function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";var r=o(1),n=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=n.default},function(t,e,o){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=o(2),s=r(i),a=o(3),c=r(a),d=o(6),p=function(t){return t&&t.__esModule?t:{default:t}}(d),l=o(5),u={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},f=function(){function t(){var e=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,t),this.stream=o;var i=!1,a={};for(var c in s)s.hasOwnProperty(c)&&(r.autoFix&&(a[c+"Fix"]=!0),i=i||a[c+"Fix"]);i?(this._readToken=(0,p.default)(this,a,function(){return e._readTokenImpl()}),this._peekToken=(0,p.default)(this,a,function(){return e._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return t.prototype.append=function(t){this.stream+=t},t.prototype.prepend=function(t){this.stream=t+this.stream},t.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},t.prototype._peekTokenImpl=function(){for(var t in u)if(u.hasOwnProperty(t)&&u[t].test(this.stream)){var e=c[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},t.prototype.peekToken=function(){return this._peekToken()},t.prototype.readToken=function(){return this._readToken()},t.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&!1===t[e.type](e))return},t.prototype.clear=function(){var t=this.stream;return this.stream="",t},t.prototype.rest=function(){return this.stream},t}();e.default=f,f.tokenToString=function(t){return t.toString()},f.escapeAttributes=function(t){var e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=(0,l.escapeQuotes)(t[o],null));return e},f.supports=s;for(var m in s)s.hasOwnProperty(m)&&(f.browserHasFlaw=f.browserHasFlaw||!s[m]&&m)},function(t,e){"use strict";e.__esModule=!0;var o=!1,r=!1,n=window.document.createElement("div");try{var i="<P><I></P></I>";n.innerHTML=i,e.tagSoup=o=n.innerHTML!==i}catch(t){e.tagSoup=o=!1}try{n.innerHTML="<P><i><P></P></i></P>",e.selfClose=r=2===n.childNodes.length}catch(t){e.selfClose=r=!1}n=null,e.tagSoup=o,e.selfClose=r},function(t,e,o){"use strict";function r(t){var e=t.indexOf("--\x3e");if(e>=0)return new d.CommentToken(t.substr(4,e-1),e+3)}function n(t){var e=t.indexOf("<");return new d.CharsToken(e>=0?e:t.length)}function i(t){if(-1!==t.indexOf(">")){var e=t.match(p.startTag);if(e){var o=function(){var t={},o={},r=e[2];return e[2].replace(p.attr,function(e,n){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(t[arguments[5]]="",o[arguments[5]]=!0):t[n]=arguments[2]||arguments[3]||arguments[4]||p.fillAttr.test(n)&&n||"":t[n]="",r=r.replace(e,"")}),{v:new d.StartTagToken(e[1],e[0].length,t,o,!!e[3],r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===(void 0===o?"undefined":c(o)))return o.v}}}function s(t){var e=i(t);if(e){var o=t.slice(e.length);if(o.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var r=o.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(r)return new d.AtomicTagToken(e.tagName,r[0].length+e.length,e.attrs,e.booleanAttrs,r[1])}}}function a(t){var e=t.match(p.endTag);if(e)return new d.EndTagToken(e[1],e[0].length)}e.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=r,e.chars=n,e.startTag=i,e.atomicTag=s,e.endTag=a;var d=o(4),p={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,o){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var n=o(5),i=(e.Token=function t(e,o){r(this,t),this.type=e,this.length=o,this.text=""},e.CommentToken=function(){function t(e,o){r(this,t),this.type="comment",this.length=o||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"\x3c!--"+this.content},t}(),e.CharsToken=function(){function t(e){r(this,t),this.type="chars",this.length=e,this.text=""}return t.prototype.toString=function(){return this.text},t}(),e.TagToken=function(){function t(e,o,n,i,s){r(this,t),this.type=e,this.length=n,this.text="",this.tagName=o,this.attrs=i,this.booleanAttrs=s,this.unary=!1,this.html5Unary=!1}return t.formatTag=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o="<"+t.tagName;for(var r in t.attrs)if(t.attrs.hasOwnProperty(r)){o+=" "+r;var i=t.attrs[r];void 0!==t.booleanAttrs&&void 0!==t.booleanAttrs[r]||(o+='="'+(0,n.escapeQuotes)(i)+'"')}return t.rest&&(o+=" "+t.rest),o+=t.unary&&!t.html5Unary?"/>":">",void 0!==e&&null!==e&&(o+=e+"</"+t.tagName+">"),o},t}());e.StartTagToken=function(){function t(e,o,n,i,s,a){r(this,t),this.type="startTag",this.length=o,this.text="",this.tagName=e,this.attrs=n,this.booleanAttrs=i,this.html5Unary=!1,this.unary=s,this.rest=a}return t.prototype.toString=function(){return i.formatTag(this)},t}(),e.AtomicTagToken=function(){function t(e,o,n,i,s){r(this,t),this.type="atomicTag",this.length=o,this.text="",this.tagName=e,this.attrs=n,this.booleanAttrs=i,this.unary=!1,this.html5Unary=!1,this.content=s}return t.prototype.toString=function(){return i.formatTag(this,this.content)},t}(),e.EndTagToken=function(){function t(e,o){r(this,t),this.type="endTag",this.length=o,this.text="",this.tagName=e}return t.prototype.toString=function(){return"</"+this.tagName+">"},t}()},function(t,e){"use strict";function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}e.__esModule=!0,e.escapeQuotes=o},function(t,e){"use strict";function o(t){return t&&"startTag"===t.type&&(t.unary=a.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function r(t,e){var r=t.stream,n=o(e());return t.stream=r,n}function n(t,e){var o=e.pop();t.prepend("</"+o.tagName+">")}function i(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,o=0;e=this[o];o++)if(e.tagName===t)return!0;return!1},t}function s(t,e,s){function a(){var e=r(t,s);e&&p[e.type]&&p[e.type](e)}var d=i(),p={startTag:function(o){var r=o.tagName;"TR"===r.toUpperCase()&&d.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),a()):e.selfCloseFix&&c.test(r)&&d.containsTagName(r)?d.lastTagNameEq(r)?n(t,d):(t.prepend("</"+o.tagName+">"),a()):o.unary||d.push(o)},endTag:function(o){d.last()?e.tagSoupFix&&!d.lastTagNameEq(o.tagName)?n(t,d):d.pop():e.tagSoupFix&&(s(),a())}};return function(){return a(),o(s())}}e.__esModule=!0,e.default=s;var a=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,c=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}])}()}()},function(t,e){"use strict";function o(t){return void 0!==t&&null!==t}function r(t){return"function"==typeof t}function n(t,e,o){var r=void 0,n=t&&t.length||0;for(r=0;r<n;r++)e.call(o,t[r],r)}function i(t,e,o){for(var r in t)t.hasOwnProperty(r)&&e.call(o,r,t[r])}function s(t,e){return t=t||{},i(e,function(e,r){o(t[e])||(t[e]=r)}),t}function a(t){try{return Array.prototype.slice.call(t)}catch(o){var e=function(){var e=[];return n(t,function(t){e.push(t)}),{v:e}}();if("object"===(void 0===e?"undefined":u(e)))return e.v}}function c(t){return t[t.length-1]}function d(t,e){return!(!t||"startTag"!==t.type&&"atomicTag"!==t.type||!("tagName"in t)||!~t.tagName.toLowerCase().indexOf(e))}function p(t){return d(t,"script")}function l(t){return d(t,"style")}e.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.existy=o,e.isFunction=r,e.each=n,e.eachKey=i,e.defaults=s,e.toArray=a,e.last=c,e.isTag=d,e.isScript=p,e.isStyle=l}])}),function(t){var e={common:{init:function(){"use strict";function e(t,e){try{jQuery().gdpr_cookie_compliance_analytics(t,e)}catch(t){}}function o(){var t=d("moove_gdpr_popup"),e={};return e.strict="0",e.thirdparty="0",e.advanced="0",t&&(t=JSON.parse(t),e.strict=t.strict,e.thirdparty=t.thirdparty,e.advanced=t.advanced),e}function r(t){c("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"1",advanced:"1"}),365),n("enabled-all"),e("accept_all","")}function n(e){var r=!1;try{void 0!==moove_frontend_gdpr_scripts.force_reload&&"true"===moove_frontend_gdpr_scripts.force_reload&&(r=!0)}catch(t){}var n=o(),i=moove_frontend_gdpr_scripts.enabled_default.third_party,a=moove_frontend_gdpr_scripts.enabled_default.advanced;if(document.cookie.indexOf("moove_gdpr_popup")>=0||1==i||1==a){d("moove_gdpr_popup");1!=i&&1!=a||(m={},m.strict=1,m.thirdparty=i,m.advanced=a),m&&(parseInt(n.strict)-parseInt(m.strict)<0&&(r=!0),parseInt(n.thirdparty)-parseInt(m.thirdparty)<0&&(r=!0),parseInt(n.advanced)-parseInt(m.advanced)<0&&(r=!0))}if(r)location.reload(!0);else{p(d("moove_gdpr_popup")),s(),t("#moove_gdpr_save_popup_settings_button").show()}}function i(e){e&&(1===parseInt(e.strict)?t("#moove_gdpr_strict_cookies").is(":checked")||(t("#moove_gdpr_strict_cookies").click(),t("#third_party_cookies fieldset").removeClass("fl-disabled"),t("#moove_gdpr_performance_cookies").prop("disabled",!1),t("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),t("#advanced-cookies fieldset").removeClass("fl-disabled"),t("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),t("#moove_gdpr_advanced_cookies").prop("disabled",!1)):t("#moove_gdpr_strict_cookies").is(":checked")&&(t("#moove_gdpr_strict_cookies").click(),t("#third_party_cookies fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),t("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),t("#advanced-cookies fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),t("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1)),1===parseInt(e.thirdparty)?t("#moove_gdpr_performance_cookies").is(":checked")||t("#moove_gdpr_performance_cookies").click():t("#moove_gdpr_performance_cookies").is(":checked")&&t("#moove_gdpr_performance_cookies").click(),1===parseInt(e.advanced)?t("#moove_gdpr_advanced_cookies").is(":checked")||t("#moove_gdpr_advanced_cookies").click():t("#moove_gdpr_advanced_cookies").is(":checked")&&t("#moove_gdpr_advanced_cookies").click())}function s(){t("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),t("body").removeClass("gdpr-infobar-visible")}function a(){if(void 0!==moove_frontend_gdpr_scripts.display_cookie_banner)if("true"===moove_frontend_gdpr_scripts.display_cookie_banner)t("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),t("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),t("body").addClass("gdpr-infobar-visible"),e("show_infobar","");else{t("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),t("body").removeClass("gdpr-infobar-visible");var o={strict:1,thirdparty:1,advanced:1};p(JSON.stringify(o))}else t("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),t("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),t("body").addClass("gdpr-infobar-visible"),e("show_infobar","")}function c(t,e,o){var r;if(o){var n=new Date;n.setTime(n.getTime()+24*o*60*60*1e3),r="; expires="+n.toGMTString()}else r="";document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+r+"; path=/"}function d(t){for(var e=encodeURIComponent(t)+"=",o=document.cookie.split(";"),r=0;r<o.length;r++){for(var n=o[r];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(e))return decodeURIComponent(n.substring(e.length,n.length))}return null}function p(r){if(m=o(),r){var n=r;r=JSON.parse(r);o();if(!1!==h){var i=JSON.parse(h);1===parseInt(i.thirdparty)&&1===parseInt(r.thirdparty)&&(r.thirdparty="0"),1===parseInt(i.advanced)&&1===parseInt(r.advanced)&&(r.advanced="0")}e("script_inject",r),_=!0,t.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:r.strict,thirdparty:r.thirdparty,advanced:r.advanced},function(e){h=n;var o=JSON.parse(e);o.header&&postscribe(document.head,o.header),o.body&&t(o.body).prependTo(document.body),o.footer&&postscribe(document.body,o.footer)})}else a()}function l(){var e=!0;t("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){t(this).is(":checked")||(e=!1)}),e?t(".moove-gdpr-button-holder .moove-gdpr-modal-allow-all").hide().removeClass("button-visible"):t(".moove-gdpr-button-holder .moove-gdpr-modal-save-settings").is(":visible")?t(".moove-gdpr-button-holder .moove-gdpr-modal-allow-all").hide().removeClass("button-visible"):t(".moove-gdpr-button-holder .moove-gdpr-modal-allow-all").show().addClass("button-visible")}function u(){for(var t=document.cookie.split("; "),e=0;e<t.length;e++)for(var o=window.location.hostname.split(".");o.length>0;){var r=encodeURIComponent(t[e].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+o.join(".")+" ; path=",n=location.pathname.split("/");for(document.cookie=r+"/";n.length>0;)document.cookie=r+n.join("/"),n.pop();o.shift()}}function f(){var e=d("moove_gdpr_popup");u();var o="0",r="0",n="0",i=!1;e&&(e=JSON.parse(e),o=e.strict,r=e.advanced,n=e.thirdparty),t("#moove_gdpr_strict_cookies").length>0?t("#moove_gdpr_strict_cookies").is(":checked")?(o="1",i=!0):o="0":(i=!0,o="1"),t("#moove_gdpr_performance_cookies").is(":checked")?(n="1",i=!0):n="0",t("#moove_gdpr_advanced_cookies").is(":checked")?(r="1",i=!0):r="0",!e&&i?(c("moove_gdpr_popup",JSON.stringify({strict:o,thirdparty:n,advanced:r}),365),s(),t("#moove_gdpr_save_popup_settings_button").show()):e&&c("moove_gdpr_popup",JSON.stringify({strict:o,thirdparty:n,advanced:r}),365);var e=d("moove_gdpr_popup");e&&(e=JSON.parse(e),"0"==e.strict&&"0"==e.advanced&&"0"==e.thirdparty&&u())}t.fn.moove_gdpr_read_cookies=function(t){var e=d("moove_gdpr_popup"),o={};return o.strict="0",o.thirdparty="0",o.advanced="0",e&&(e=JSON.parse(e),o.strict=e.strict,o.thirdparty=e.thirdparty,o.advanced=e.advanced),o};var m=o(),h=!1,_=!1;if(t.fn.moove_gdpr_save_cookie=function(o){var r=d("moove_gdpr_popup"),n=t(window).scrollTop();if(!r){if(o.thirdParty)var s="1";else var s="0";if(o.advanced)var a="1";else var a="0";if(o.scrollEnable){var p=o.scrollEnable;t(window).scroll(function(){!_&&t(this).scrollTop()-n>p&&("undefined"===o.thirdparty&&"undefined"===o.advanced||(c("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:s,advanced:a}),365),r=JSON.parse(r),i(r)))})}else"undefined"===o.thirdparty&&"undefined"===o.advanced||(c("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:s,advanced:a}),365),r=JSON.parse(r),i(r));r=d("moove_gdpr_popup"),r&&(r=JSON.parse(r),e("script_inject",r),_=!0,jQuery.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:r.strict,thirdparty:r.thirdparty,advanced:r.advanced},function(e){var o=JSON.parse(e);o.header&&postscribe(document.head,o.header),o.body&&t(o.body).prependTo(document.body),o.footer&&postscribe(document.body,o.footer)}))}},"undefined"==typeof lity){var v=moove_frontend_gdpr_scripts.plugin_dir+"/dist/scripts/lity.js",g=moove_frontend_gdpr_scripts.plugin_dir+"/dist/styles/lity.css";postscribe(document.body,'<script src="'+v+'"><\/script>'),postscribe(document.head,'<link href="'+g+'" rel="stylesheet">')}var y="",b=!1;if(window.location.hash){var k=window.location.hash.substring(1);"moove_gdpr_cookie_modal"===k&&(b=!0,e("opened_modal_from_link",""),setTimeout(function(){y=lity("#moove_gdpr_cookie_modal"),t(".lity").addClass("moove_gdpr_cookie_modal_open"),t(document).moove_lity_open()},500))}if(window.location.hash){var k=window.location.hash.substring(1);"gdpr_cookie_modal"===k&&(b=!0,e("opened_modal_from_link",""),setTimeout(function(){y=lity("#moove_gdpr_cookie_modal"),t(".lity").addClass("moove_gdpr_cookie_modal_open"),t(document).moove_lity_open()},500))}!function(){var e=(location.pathname,t(window).scrollTop());t("#moove_gdpr_save_popup_settings_button").show();var r=moove_frontend_gdpr_scripts.enabled_default.third_party,n=moove_frontend_gdpr_scripts.enabled_default.advanced;if(document.cookie.indexOf("moove_gdpr_popup")>=0||1==r||1==n){var s=d("moove_gdpr_popup");if(s){var c=o();"0"==c.strict&&"0"==c.advanced&&"0"==c.thirdparty&&(u(),a())}else{var l=!1;if("undefined"!=typeof sessionStorage&&(l=sessionStorage.getItem("gdpr_session")),void 0!==moove_frontend_gdpr_scripts.enable_on_scroll&&"true"===moove_frontend_gdpr_scripts.enable_on_scroll)if(l)try{i(JSON.parse(l)),a(),_=!0,p(l)}catch(t){}else t(window).scroll(function(){if(!_&&t(this).scrollTop()-e>200){s={strict:1,thirdparty:r,advanced:n},d("moove_gdpr_popup")||"undefined"!=typeof sessionStorage&&((l=sessionStorage.getItem("gdpr_session"))||(sessionStorage.setItem("gdpr_session",JSON.stringify(s)),l=sessionStorage.getItem("gdpr_session")));try{i(s),s=JSON.stringify(s),a(),_=!0,p(s)}catch(t){}}});else s={strict:1,thirdparty:r,advanced:n},i(s),s=JSON.stringify(s),a()}p(s)}else a()}(),t(document).on("click",'[data-href*="#moove_gdpr_cookie_modal"],[href*="#moove_gdpr_cookie_modal"]',function(o){o.preventDefault(),b=!0,y=lity("#moove_gdpr_cookie_modal"),t(".lity").addClass("moove_gdpr_cookie_modal_open"),t(document).moove_lity_open(),e("opened_modal_from_link","")}),t(document).on("click",'[data-href*="#gdpr_cookie_modal"],[href*="#gdpr_cookie_modal"]',function(o){o.preventDefault(),b=!0,y=lity("#moove_gdpr_cookie_modal"),t(".lity").addClass("moove_gdpr_cookie_modal_open"),t(document).moove_lity_open(),e("opened_modal_from_link","")}),t(document).on("click","#moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button a, #moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button button",function(t){t.preventDefault()}),t(document).on("click",".moove-gdpr-modal-close",function(e){e.preventDefault(),t(".lity .lity-close").click(),t(document).moove_lity_close()}),t(document).on("click","#moove-gdpr-menu .moove-gdpr-tab-nav",function(o){o.preventDefault(),o.stopPropagation(),t("#moove-gdpr-menu li").removeClass("menu-item-selected"),t(this).parent().addClass("menu-item-selected"),t(".moove-gdpr-tab-content .moove-gdpr-tab-main").hide(),t(t(this).attr("href")).show(),t(t(this).attr("data-href")).show(),e("clicked_to_tab",t(this).attr("data-href"))}),t(document).on("lity:close",function(e,o){t(document).moove_lity_close()}),t.fn.moove_lity_close=function(e){b&&(t("body").removeClass("moove_gdpr_overflow"),b=!1)},t.fn.moove_lity_open=function(e){if(b){t("body").addClass("moove_gdpr_overflow");var o=d("moove_gdpr_popup");t(".moove-gdpr-status-bar input[type=checkbox]").each(function(){t(this).is(":checked")?t(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():t(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown()}),o&&(o=JSON.parse(o),i(o)),t(".moove-gdpr-modal-save-settings").hide().removeClass("button-visible"),l()}},t(document).on("lity:open",function(e,o){t(document).moove_lity_open()}),t(document).on("click",".fl-disabled",function(e){t("#moove_gdpr_cookie_modal .moove-gdpr-modal-content").is(".moove_gdpr_modal_theme_v2")?(t("#moove_gdpr_strict_cookies").click(),t(this).click()):t(this).closest(".moove-gdpr-tab-main-content").find(".moove-gdpr-strict-secondary-warning-message").slideDown()}),t(document).on("change",".moove-gdpr-status-bar input[type=checkbox]",function(e){t(".moove-gdpr-modal-save-settings").show().addClass("button-visible"),t(".moove-gdpr-modal-allow-all").hide().removeClass("button-visible");var o=t(this).closest(".moove-gdpr-tab-main").attr("id");t(this).closest(".moove-gdpr-status-bar").toggleClass("checkbox-selected"),t(this).closest(".moove-gdpr-tab-main").toggleClass("checkbox-selected"),t("#moove-gdpr-menu .menu-item-"+o).toggleClass("menu-item-off"),t(this).is(":checked")?t(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():t(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown(),t(this).is("#moove_gdpr_strict_cookies")&&(t(this).is(":checked")?(t("#third_party_cookies fieldset").removeClass("fl-disabled"),t("#moove_gdpr_performance_cookies").prop("disabled",!1),t("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),t("#advanced-cookies fieldset").removeClass("fl-disabled"),t("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),t("#moove_gdpr_advanced_cookies").prop("disabled",!1)):(t("#third_party_cookies fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),t("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),t("#advanced-cookies fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),t("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1))),l()}),t(document).on("click",".moove-gdpr-modal-allow-all",function(e){e.preventDefault(),t("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var e=t(this);e.is(":checked")||e.click()}),r("enable_all enable-all-button"),t(".lity .lity-close").click(),s(),f(),t(document).moove_lity_close()}),t(document).on("click",".moove-gdpr-infobar-allow-all",function(t){t.preventDefault(),r("enable_all allow-btn")}),t(document).on("click",".moove-gdpr-modal-save-settings",function(e){e.preventDefault(),f(),t(".lity .lity-close").click(),t(document).moove_lity_close(),n("modal-save-settings")})},finalize:function(){}}},o={fire:function(t,o,r){var n,i=e;o=void 0===o?"init":o,n=""!==t,n=n&&i[t],(n=n&&"function"==typeof i[t][o])&&i[t][o](r)},loadEvents:function(){o.fire("common"),t.each(document.body.className.replace(/-/g,"_").split(/\s+/),function(t,e){o.fire(e),o.fire(e,"finalize")}),o.fire("common","finalize")}};t(document).ready(o.loadEvents)}(jQuery);
 
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.postscribe=e():t.postscribe=e()}(this,function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";var r=o(1),n=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=n.default},function(t,e,o){"use strict";function r(){}function n(){var t=_.shift();if(t){var e=l.last(t);e.afterDequeue(),t.stream=i.apply(void 0,t),e.afterStreamStart()}}function i(t,e,o){function i(t){t=o.beforeWrite(t),m.write(t),o.afterWrite(t)}m=new d.default(t,o),m.id=f++,m.name=o.name||m.id,s.streams[m.name]=m;var c=t.ownerDocument,p={close:c.close,open:c.open,write:c.write,writeln:c.writeln};a(c,{close:r,open:r,write:function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return i(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return i(e.join("")+"\n")}});var l=m.win.onerror||r;return m.win.onerror=function(t,e,r){o.error({msg:t+" - "+e+": "+r}),l.apply(m.win,[t,e,r])},m.write(e,function(){a(c,p),m.win.onerror=l,o.done(),m=null,n()}),m}function s(t,e,o){if(l.isFunction(o))o={done:o};else if("clear"===o)return _=[],m=null,void(f=0);o=l.defaults(o,u),t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t;var i=[t,e,o];return t.postscribe={cancel:function(){i.stream?i.stream.abort():i[1]=r}},o.beforeEnqueue(i),_.push(i),m||n(),t.postscribe}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t};e.default=s;var c=o(2),d=function(t){return t&&t.__esModule?t:{default:t}}(c),p=o(4),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e.default=t,e}(p),u={afterAsync:r,afterDequeue:r,afterStreamStart:r,afterWrite:r,autoFix:!0,beforeEnqueue:r,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:r,error:function(t){throw new Error(t.msg)},releaseAsync:!1},f=0,_=[],m=null;a(s,{streams:{},queue:_,WriteStream:d.default})},function(t,e,o){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){var o=l+e,r=t.getAttribute(o);return p.existy(r)?String(r):r}function i(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=l+e;p.existy(o)&&""!==o?t.setAttribute(r,o):t.removeAttribute(r)}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},a=o(3),c=function(t){return t&&t.__esModule?t:{default:t}}(a),d=o(4),p=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e.default=t,e}(d),l="data-ps-",u="ps-style",f="ps-script",_=function(){function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.root=e,this.options=o,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new c.default("",{autoFix:o.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],i(this.proxyRoot,"proxyof",0)}return t.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();p.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},t.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},t.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,o=void 0,r=void 0,n=[];(e=this.parser.readToken())&&!(o=p.isScript(e))&&!(r=p.isStyle(e));)(e=this.options.beforeWriteToken(e))&&n.push(e);n.length>0&&this._writeStaticTokens(n),o&&this._handleScriptToken(e),r&&this._handleStyleToken(e)},t.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},t.prototype._buildChunk=function(t){for(var e=this.actuals.length,o=[],r=[],n=[],i=t.length,s=0;s<i;s++){var a=t[s],c=a.toString();if(o.push(c),a.attrs){if(!/^noscript$/i.test(a.tagName)){var d=e++;r.push(c.replace(/(\/?>)/," "+l+"id="+d+" $1")),a.attrs.id!==f&&a.attrs.id!==u&&n.push("atomicTag"===a.type?"":"<"+a.tagName+" "+l+"proxyof="+d+(a.unary?" />":">"))}}else r.push(c),n.push("endTag"===a.type?c:"")}return{tokens:t,raw:o.join(""),actual:r.join(""),proxy:n.join("")}},t.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];p.existy(t=e.shift());){var o=1===t.nodeType;if(!(o&&n(t,"proxyof"))){o&&(this.actuals[n(t,"id")]=t,i(t,"id"));var r=t.parentNode&&n(t.parentNode,"proxyof");r&&this.actuals[r].appendChild(t)}e.unshift.apply(e,p.toArray(t.childNodes))}},t.prototype._handleScriptToken=function(t){var e=this,o=this.parser.clear();o&&this.writeQueue.unshift(o),t.src=t.attrs.src||t.attrs.SRC,(t=this.options.beforeWriteToken(t))&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},t.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",t=this.options.beforeWriteToken(t),t&&this._writeStyleToken(t),e&&this.write()},t.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,u),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},t.prototype._buildStyle=function(t){var e=this.doc.createElement(t.tagName);return e.setAttribute("type",t.type),p.eachKey(t.attrs,function(t,o){e.setAttribute(t,o)}),e},t.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var o=this.doc.getElementById(e);o&&o.parentNode.replaceChild(t,o)},t.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},t.prototype._onScriptDone=function(t){return t!==this.scriptStack[0]?void this.options.error({msg:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},t.prototype._writeScriptToken=function(t,e){var o=this._buildScript(t),r=this._shouldRelease(o),n=this.options.afterAsync;t.src&&(o.src=t.src,this._scriptLoadHandler(o,r?n:function(){e(),n()}));try{this._insertCursor(o,f),o.src&&!r||e()}catch(t){this.options.error(t),e()}},t.prototype._buildScript=function(t){var e=this.doc.createElement(t.tagName);return p.eachKey(t.attrs,function(t,o){e.setAttribute(t,o)}),t.content&&(e.text=t.content),e},t.prototype._scriptLoadHandler=function(t,e){function o(){t=t.onload=t.onreadystatechange=t.onerror=null}function r(){o(),null!=e&&e(),e=null}function n(t){o(),a(t),null!=e&&e(),e=null}function i(t,e){var o=t["on"+e];null!=o&&(t["_on"+e]=o)}var a=this.options.error;i(t,"load"),i(t,"error"),s(t,{onload:function(){if(t._onload)try{t._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){n({msg:"onload handler failed "+e+" @ "+t.src})}r()},onerror:function(){if(t._onerror)try{t._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){return void n({msg:"onerror handler failed "+e+" @ "+t.src})}n({msg:"remote script failed "+t.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(t.readyState)&&r()}})},t.prototype._shouldRelease=function(t){return!/^script$/i.test(t.nodeName)||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},t}();e.default=_},function(t,e,o){!function(e,o){t.exports=function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";var r=o(1),n=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=n.default},function(t,e,o){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=o(2),s=r(i),a=o(3),c=r(a),d=o(6),p=function(t){return t&&t.__esModule?t:{default:t}}(d),l=o(5),u={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},f=function(){function t(){var e=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,t),this.stream=o;var i=!1,a={};for(var c in s)s.hasOwnProperty(c)&&(r.autoFix&&(a[c+"Fix"]=!0),i=i||a[c+"Fix"]);i?(this._readToken=(0,p.default)(this,a,function(){return e._readTokenImpl()}),this._peekToken=(0,p.default)(this,a,function(){return e._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return t.prototype.append=function(t){this.stream+=t},t.prototype.prepend=function(t){this.stream=t+this.stream},t.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();if(t)return this.stream=this.stream.slice(t.length),t},t.prototype._peekTokenImpl=function(){for(var t in u)if(u.hasOwnProperty(t)&&u[t].test(this.stream)){var e=c[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},t.prototype.peekToken=function(){return this._peekToken()},t.prototype.readToken=function(){return this._readToken()},t.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&!1===t[e.type](e))return},t.prototype.clear=function(){var t=this.stream;return this.stream="",t},t.prototype.rest=function(){return this.stream},t}();e.default=f,f.tokenToString=function(t){return t.toString()},f.escapeAttributes=function(t){var e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=(0,l.escapeQuotes)(t[o],null));return e},f.supports=s;for(var _ in s)s.hasOwnProperty(_)&&(f.browserHasFlaw=f.browserHasFlaw||!s[_]&&_)},function(t,e){"use strict";e.__esModule=!0;var o=!1,r=!1,n=window.document.createElement("div");try{var i="<P><I></P></I>";n.innerHTML=i,e.tagSoup=o=n.innerHTML!==i}catch(t){e.tagSoup=o=!1}try{n.innerHTML="<P><i><P></P></i></P>",e.selfClose=r=2===n.childNodes.length}catch(t){e.selfClose=r=!1}n=null,e.tagSoup=o,e.selfClose=r},function(t,e,o){"use strict";function r(t){var e=t.indexOf("--\x3e");if(e>=0)return new d.CommentToken(t.substr(4,e-1),e+3)}function n(t){var e=t.indexOf("<");return new d.CharsToken(e>=0?e:t.length)}function i(t){if(-1!==t.indexOf(">")){var e=t.match(p.startTag);if(e){var o=function(){var t={},o={},r=e[2];return e[2].replace(p.attr,function(e,n){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(t[arguments[5]]="",o[arguments[5]]=!0):t[n]=arguments[2]||arguments[3]||arguments[4]||p.fillAttr.test(n)&&n||"":t[n]="",r=r.replace(e,"")}),{v:new d.StartTagToken(e[1],e[0].length,t,o,!!e[3],r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===(void 0===o?"undefined":c(o)))return o.v}}}function s(t){var e=i(t);if(e){var o=t.slice(e.length);if(o.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var r=o.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(r)return new d.AtomicTagToken(e.tagName,r[0].length+e.length,e.attrs,e.booleanAttrs,r[1])}}}function a(t){var e=t.match(p.endTag);if(e)return new d.EndTagToken(e[1],e[0].length)}e.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=r,e.chars=n,e.startTag=i,e.atomicTag=s,e.endTag=a;var d=o(4),p={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,o){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var n=o(5),i=(e.Token=function t(e,o){r(this,t),this.type=e,this.length=o,this.text=""},e.CommentToken=function(){function t(e,o){r(this,t),this.type="comment",this.length=o||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"\x3c!--"+this.content},t}(),e.CharsToken=function(){function t(e){r(this,t),this.type="chars",this.length=e,this.text=""}return t.prototype.toString=function(){return this.text},t}(),e.TagToken=function(){function t(e,o,n,i,s){r(this,t),this.type=e,this.length=n,this.text="",this.tagName=o,this.attrs=i,this.booleanAttrs=s,this.unary=!1,this.html5Unary=!1}return t.formatTag=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o="<"+t.tagName;for(var r in t.attrs)if(t.attrs.hasOwnProperty(r)){o+=" "+r;var i=t.attrs[r];void 0!==t.booleanAttrs&&void 0!==t.booleanAttrs[r]||(o+='="'+(0,n.escapeQuotes)(i)+'"')}return t.rest&&(o+=" "+t.rest),o+=t.unary&&!t.html5Unary?"/>":">",void 0!==e&&null!==e&&(o+=e+"</"+t.tagName+">"),o},t}());e.StartTagToken=function(){function t(e,o,n,i,s,a){r(this,t),this.type="startTag",this.length=o,this.text="",this.tagName=e,this.attrs=n,this.booleanAttrs=i,this.html5Unary=!1,this.unary=s,this.rest=a}return t.prototype.toString=function(){return i.formatTag(this)},t}(),e.AtomicTagToken=function(){function t(e,o,n,i,s){r(this,t),this.type="atomicTag",this.length=o,this.text="",this.tagName=e,this.attrs=n,this.booleanAttrs=i,this.unary=!1,this.html5Unary=!1,this.content=s}return t.prototype.toString=function(){return i.formatTag(this,this.content)},t}(),e.EndTagToken=function(){function t(e,o){r(this,t),this.type="endTag",this.length=o,this.text="",this.tagName=e}return t.prototype.toString=function(){return"</"+this.tagName+">"},t}()},function(t,e){"use strict";function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}e.__esModule=!0,e.escapeQuotes=o},function(t,e){"use strict";function o(t){return t&&"startTag"===t.type&&(t.unary=a.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function r(t,e){var r=t.stream,n=o(e());return t.stream=r,n}function n(t,e){var o=e.pop();t.prepend("</"+o.tagName+">")}function i(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,o=0;e=this[o];o++)if(e.tagName===t)return!0;return!1},t}function s(t,e,s){function a(){var e=r(t,s);e&&p[e.type]&&p[e.type](e)}var d=i(),p={startTag:function(o){var r=o.tagName;"TR"===r.toUpperCase()&&d.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),a()):e.selfCloseFix&&c.test(r)&&d.containsTagName(r)?d.lastTagNameEq(r)?n(t,d):(t.prepend("</"+o.tagName+">"),a()):o.unary||d.push(o)},endTag:function(o){d.last()?e.tagSoupFix&&!d.lastTagNameEq(o.tagName)?n(t,d):d.pop():e.tagSoupFix&&(s(),a())}};return function(){return a(),o(s())}}e.__esModule=!0,e.default=s;var a=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,c=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}])}()}()},function(t,e){"use strict";function o(t){return void 0!==t&&null!==t}function r(t){return"function"==typeof t}function n(t,e,o){var r=void 0,n=t&&t.length||0;for(r=0;r<n;r++)e.call(o,t[r],r)}function i(t,e,o){for(var r in t)t.hasOwnProperty(r)&&e.call(o,r,t[r])}function s(t,e){return t=t||{},i(e,function(e,r){o(t[e])||(t[e]=r)}),t}function a(t){try{return Array.prototype.slice.call(t)}catch(o){var e=function(){var e=[];return n(t,function(t){e.push(t)}),{v:e}}();if("object"===(void 0===e?"undefined":u(e)))return e.v}}function c(t){return t[t.length-1]}function d(t,e){return!(!t||"startTag"!==t.type&&"atomicTag"!==t.type||!("tagName"in t)||!~t.tagName.toLowerCase().indexOf(e))}function p(t){return d(t,"script")}function l(t){return d(t,"style")}e.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.existy=o,e.isFunction=r,e.each=n,e.eachKey=i,e.defaults=s,e.toArray=a,e.last=c,e.isTag=d,e.isScript=p,e.isStyle=l}])}),function(t){var e={common:{init:function(){"use strict";function e(t,e){try{jQuery().gdpr_cookie_compliance_analytics(t,e)}catch(t){}}function o(){var o=d("moove_gdpr_popup"),r={};return r.strict="0",r.thirdparty="0",r.advanced="0",o&&(o=JSON.parse(o),r.strict=o.strict,r.thirdparty=o.thirdparty,r.advanced=o.advanced,i(r),e("script_inject",o)),"1"!==moove_frontend_gdpr_scripts.strict_init&&t(document).find("iframe[data-gdpr-iframesrc]").each(function(){t(this).attr("src",t(this).attr("data-gdpr-iframesrc"))}),r}function r(t){c("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"1",advanced:"1"}),365),n("enabled-all"),e("accept_all","")}function n(e){var r=!1;try{void 0!==moove_frontend_gdpr_scripts.force_reload&&"true"===moove_frontend_gdpr_scripts.force_reload&&(r=!0)}catch(t){}var n=o(),i=moove_frontend_gdpr_scripts.enabled_default.third_party,a=moove_frontend_gdpr_scripts.enabled_default.advanced;if(document.cookie.indexOf("moove_gdpr_popup")>=0||1==i||1==a){d("moove_gdpr_popup");1==i&&(_.strict=1,_.thirdparty=i),1==a&&(_.strict=1,_.advanced=a),_&&(parseInt(n.strict)-parseInt(_.strict)<0&&(r=!0),parseInt(n.thirdparty)-parseInt(_.thirdparty)<0&&(r=!0),parseInt(n.advanced)-parseInt(_.advanced)<0&&(r=!0))}if(r)location.reload(!0);else{p(d("moove_gdpr_popup")),s(),t("#moove_gdpr_save_popup_settings_button").show()}}function i(e){e&&(1===parseInt(e.strict)?t("#moove_gdpr_strict_cookies").is(":checked")||(t("#moove_gdpr_strict_cookies").click(),t("#third_party_cookies fieldset").removeClass("fl-disabled"),t("#moove_gdpr_performance_cookies").prop("disabled",!1),t("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),t("#advanced-cookies fieldset").removeClass("fl-disabled"),t("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),t("#moove_gdpr_advanced_cookies").prop("disabled",!1)):t("#moove_gdpr_strict_cookies").is(":checked")&&(t("#moove_gdpr_strict_cookies").click().prop("checked",!0),t("#third_party_cookies fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),t("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),t("#advanced-cookies fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),t("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1)),1===parseInt(e.thirdparty)?t("#moove_gdpr_performance_cookies").is(":checked")||t("#moove_gdpr_performance_cookies").click():t("#moove_gdpr_performance_cookies").is(":checked")&&t("#moove_gdpr_performance_cookies").click(),1===parseInt(e.advanced)?t("#moove_gdpr_advanced_cookies").is(":checked")||t("#moove_gdpr_advanced_cookies").click():t("#moove_gdpr_advanced_cookies").is(":checked")&&t("#moove_gdpr_advanced_cookies").click(),t('input[data-name="moove_gdpr_performance_cookies"]').prop("checked",t("#moove_gdpr_performance_cookies").is(":checked")),t('input[data-name="moove_gdpr_strict_cookies"]').prop("checked",t("#moove_gdpr_strict_cookies").is(":checked")),t('input[data-name="moove_gdpr_advanced_cookies"]').prop("checked",t("#moove_gdpr_advanced_cookies").is(":checked")))}function s(){t("#moove_gdpr_cookie_info_bar").length>0&&(t("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),t("body").removeClass("gdpr-infobar-visible"))}function a(){if(void 0!==moove_frontend_gdpr_scripts.display_cookie_banner){if("true"===moove_frontend_gdpr_scripts.display_cookie_banner)t("#moove_gdpr_cookie_info_bar").length>0&&(t("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),t("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),t("body").addClass("gdpr-infobar-visible"),e("show_infobar",""));else if(t("#moove_gdpr_cookie_info_bar").length>0){t("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),t("body").removeClass("gdpr-infobar-visible");var o={strict:1,thirdparty:1,advanced:1};p(JSON.stringify(o))}}else t("#moove_gdpr_cookie_info_bar").length>0&&(t("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),t("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),t("body").addClass("gdpr-infobar-visible"),e("show_infobar",""))}function c(t,e,o){var r;if(o){var n=new Date;n.setTime(n.getTime()+24*o*60*60*1e3),r="; expires="+n.toGMTString()}else r="";document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+r+"; path=/",JSON.parse(e)}function d(t){for(var e=encodeURIComponent(t)+"=",o=document.cookie.split(";"),r=0;r<o.length;r++){for(var n=o[r];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(e))return decodeURIComponent(n.substring(e.length,n.length))}return null}function p(r){if(_=o(),r){var n=r;r=JSON.parse(r);o();if(!1!==m){var i=JSON.parse(m);1===parseInt(i.thirdparty)&&1===parseInt(r.thirdparty)&&(r.thirdparty="0"),1===parseInt(i.advanced)&&1===parseInt(r.advanced)&&(r.advanced="0")}e("script_inject",r),h=!0,1===parseInt(r.strict)&&t(document).find("iframe[data-gdpr-iframesrc]").each(function(){t(this).attr("src",t(this).attr("data-gdpr-iframesrc"))}),t.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:r.strict,thirdparty:r.thirdparty,advanced:r.advanced},function(e){m=n;var o=JSON.parse(e);o.header&&postscribe(document.head,o.header),o.body&&t(o.body).prependTo(document.body),o.footer&&postscribe(document.body,o.footer)})}else a()}function l(){var e=!0;t("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){t(this).is(":checked")||(e=!1)}),e?t(".moove-gdpr-button-holder .moove-gdpr-modal-allow-all").hide().removeClass("button-visible"):t(".moove-gdpr-button-holder .moove-gdpr-modal-save-settings").is(":visible")?t(".moove-gdpr-button-holder .moove-gdpr-modal-allow-all").hide().removeClass("button-visible"):t(".moove-gdpr-button-holder .moove-gdpr-modal-allow-all").show().addClass("button-visible")}function u(){for(var t=document.cookie.split("; "),e=0;e<t.length;e++)for(var o=window.location.hostname.split(".");o.length>0;){var r=encodeURIComponent(t[e].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+o.join(".")+" ; path=",n=location.pathname.split("/");for(document.cookie=r+"/";n.length>0;)document.cookie=r+n.join("/"),n.pop();o.shift()}}function f(){var e=d("moove_gdpr_popup");u();var o="0",r="0",n="0",i=!1;e&&(e=JSON.parse(e),o=e.strict,r=e.advanced,n=e.thirdparty),t("#moove_gdpr_strict_cookies").length>0?t("#moove_gdpr_strict_cookies").is(":checked")?(o="1",i=!0):o="0":(i=!0,o="1"),t("#moove_gdpr_performance_cookies").is(":checked")?(n="1",i=!0):n="0",t("#moove_gdpr_advanced_cookies").is(":checked")?(r="1",i=!0):r="0",!e&&i?(c("moove_gdpr_popup",JSON.stringify({strict:o,thirdparty:n,advanced:r}),365),s(),t("#moove_gdpr_save_popup_settings_button").show()):e&&c("moove_gdpr_popup",JSON.stringify({strict:o,thirdparty:n,advanced:r}),365);var e=d("moove_gdpr_popup");e&&(e=JSON.parse(e),"0"==e.strict&&"0"==e.advanced&&"0"==e.thirdparty&&u())}t(document).on("click","#moove_gdpr_cookie_info_bar .moove-gdpr-infobar-reject-btn",function(e){e.preventDefault(),c("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0"}),365),t("#moove_gdpr_cookie_info_bar").length>0&&(t("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),t("body").removeClass("gdpr-infobar-visible"),location.reload(!0))}),t.fn.moove_gdpr_read_cookies=function(t){var e=d("moove_gdpr_popup"),o={};return o.strict="0",o.thirdparty="0",o.advanced="0",e&&(e=JSON.parse(e),o.strict=e.strict,o.thirdparty=e.thirdparty,o.advanced=e.advanced),o};var _=o(),m=!1,h=!1;if(t.fn.moove_gdpr_save_cookie=function(o){var r=d("moove_gdpr_popup"),n=t(window).scrollTop();if(!r){if(o.thirdParty)var s="1";else var s="0";if(o.advanced)var a="1";else var a="0";if(o.scrollEnable){var p=o.scrollEnable;t(window).scroll(function(){!h&&t(this).scrollTop()-n>p&&("undefined"===o.thirdparty&&"undefined"===o.advanced||(c("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:s,advanced:a}),365),r=JSON.parse(r),i(r)))})}else"undefined"===o.thirdparty&&"undefined"===o.advanced||(c("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:s,advanced:a}),365),r=JSON.parse(r),i(r));r=d("moove_gdpr_popup"),r&&(r=JSON.parse(r),e("script_inject",r),h=!0,1===parseInt(r.strict)&&t(document).find("iframe[data-gdpr-iframesrc]").each(function(){t(this).attr("src",t(this).attr("data-gdpr-iframesrc"))}),jQuery.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:r.strict,thirdparty:r.thirdparty,advanced:r.advanced},function(e){var o=JSON.parse(e);o.header&&postscribe(document.head,o.header),o.body&&t(o.body).prependTo(document.body),o.footer&&postscribe(document.body,o.footer)}))}},"undefined"==typeof lity){var v=moove_frontend_gdpr_scripts.plugin_dir+"/dist/scripts/lity.js",g=moove_frontend_gdpr_scripts.plugin_dir+"/dist/styles/lity.css";postscribe(document.body,'<script src="'+v+'"><\/script>'),postscribe(document.head,'<link href="'+g+'" rel="stylesheet">')}var y="",k=!1;if(window.location.hash){var b=window.location.hash.substring(1);"moove_gdpr_cookie_modal"===b&&(k=!0,e("opened_modal_from_link",""),setTimeout(function(){y=lity("#moove_gdpr_cookie_modal"),t(".lity").addClass("moove_gdpr_cookie_modal_open"),t(document).moove_lity_open()},500))}if(window.location.hash){var b=window.location.hash.substring(1);"gdpr_cookie_modal"===b&&(k=!0,e("opened_modal_from_link",""),setTimeout(function(){y=lity("#moove_gdpr_cookie_modal"),t(".lity").addClass("moove_gdpr_cookie_modal_open"),t(document).moove_lity_open()},500))}!function(){var e=(location.pathname,t(window).scrollTop());t("#moove_gdpr_save_popup_settings_button").show();var r=moove_frontend_gdpr_scripts.enabled_default.third_party,n=moove_frontend_gdpr_scripts.enabled_default.advanced;if(document.cookie.indexOf("moove_gdpr_popup")>=0||1==r||1==n){var s=d("moove_gdpr_popup");if(s){var c=o();"0"==c.strict&&"0"==c.advanced&&"0"==c.thirdparty&&(u(),a())}else{var l=!1;if("undefined"!=typeof sessionStorage&&(l=sessionStorage.getItem("gdpr_session")),void 0!==moove_frontend_gdpr_scripts.enable_on_scroll&&"true"===moove_frontend_gdpr_scripts.enable_on_scroll)if(l)try{i(JSON.parse(l)),a(),h=!0,p(l)}catch(t){}else t(window).scroll(function(){if(!h&&t(this).scrollTop()-e>200){s={strict:1,thirdparty:r,advanced:n},d("moove_gdpr_popup")||"undefined"!=typeof sessionStorage&&((l=sessionStorage.getItem("gdpr_session"))||(sessionStorage.setItem("gdpr_session",JSON.stringify(s)),l=sessionStorage.getItem("gdpr_session")));try{i(s),s=JSON.stringify(s),a(),h=!0,p(s)}catch(t){}}});else s={strict:1,thirdparty:r,advanced:n},i(s),s=JSON.stringify(s),a()}p(s)}else a()}(),t(document).on("click",'[data-href*="#moove_gdpr_cookie_modal"],[href*="#moove_gdpr_cookie_modal"]',function(o){o.preventDefault(),k=!0,y=lity("#moove_gdpr_cookie_modal"),t(".lity").addClass("moove_gdpr_cookie_modal_open"),t(document).moove_lity_open(),e("opened_modal_from_link","")}),t(document).on("click",'[data-href*="#gdpr_cookie_modal"],[href*="#gdpr_cookie_modal"]',function(o){o.preventDefault(),k=!0,y=lity("#moove_gdpr_cookie_modal"),t(".lity").addClass("moove_gdpr_cookie_modal_open"),t(document).moove_lity_open(),e("opened_modal_from_link","")}),t(document).on("click","#moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button a, #moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button button",function(t){t.preventDefault()}),t(document).on("click",".moove-gdpr-modal-close",function(e){e.preventDefault(),t(".lity .lity-close").click(),t(document).moove_lity_close()}),t(document).on("click","#moove-gdpr-menu .moove-gdpr-tab-nav",function(o){o.preventDefault(),o.stopPropagation(),t("#moove-gdpr-menu li").removeClass("menu-item-selected"),t(this).parent().addClass("menu-item-selected"),t(".moove-gdpr-tab-content .moove-gdpr-tab-main").hide(),t(t(this).attr("href")).show(),t(t(this).attr("data-href")).show(),e("clicked_to_tab",t(this).attr("data-href"))}),t(document).on("lity:close",function(e,o){t(document).moove_lity_close()}),t.fn.moove_lity_close=function(e){k&&(t("body").removeClass("moove_gdpr_overflow"),k=!1)},t.fn.moove_lity_open=function(e){if(k){t("body").addClass("moove_gdpr_overflow");var o=d("moove_gdpr_popup");t(".moove-gdpr-status-bar input[type=checkbox]").each(function(){t(this).is(":checked")?t(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():t(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown()}),o&&(o=JSON.parse(o),i(o)),t(".moove-gdpr-modal-save-settings").hide().removeClass("button-visible"),l()}},t(document).on("lity:open",function(e,o){t(document).moove_lity_open()}),t(document).on("click",".fl-disabled",function(e){t("#moove_gdpr_cookie_modal .moove-gdpr-modal-content").is(".moove_gdpr_modal_theme_v2")?(t("#moove_gdpr_strict_cookies").click(),t(this).click()):t(this).closest(".moove-gdpr-tab-main-content").find(".moove-gdpr-strict-secondary-warning-message").slideDown()}),t(document).on("change",".moove-gdpr-status-bar input[type=checkbox]",function(e){t(".moove-gdpr-modal-save-settings").show().addClass("button-visible"),t(".moove-gdpr-modal-allow-all").hide().removeClass("button-visible");var o=t(this).closest(".moove-gdpr-tab-main").attr("id");t(this).closest(".moove-gdpr-status-bar").toggleClass("checkbox-selected"),t(this).closest(".moove-gdpr-tab-main").toggleClass("checkbox-selected"),t("#moove-gdpr-menu .menu-item-"+o).toggleClass("menu-item-off"),t(this).is(":checked")?t(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():t(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown(),t(this).is("#moove_gdpr_strict_cookies")&&(t(this).is(":checked")?(t("#third_party_cookies fieldset").removeClass("fl-disabled"),t("#moove_gdpr_performance_cookies").prop("disabled",!1),t("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),t("#advanced-cookies fieldset").removeClass("fl-disabled"),t("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),t("#moove_gdpr_advanced_cookies").prop("disabled",!1)):(t(".gdpr_cookie_settings_shortcode_content").find("input").each(function(){t(this).prop("checked",!1)}),t("#third_party_cookies fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),t("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),t("#advanced-cookies fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),t("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1))),
2
+ t('input[data-name="'+t(this).attr("name")+'"]').prop("checked",t(this).is(":checked")),l()}),t(document).on("click",".gdpr_cookie_settings_shortcode_content a.gdpr-shr-save-settings",function(e){e.preventDefault(),f(),t(".lity .lity-close").click(),t(document).moove_lity_close(),n("modal-save-settings")}),t(document).on("change",".gdpr_cookie_settings_shortcode_content input[type=checkbox]",function(e){var o=t(this).attr("data-name"),r=t("#"+o);t(this).is(":checked")?(t('input[data-name="'+o+'"]').prop("checked",!0),"moove_gdpr_strict_cookies"!==t(this).attr("data-name")&&(t(this).closest(".gdpr_cookie_settings_shortcode_content").find('input[data-name="moove_gdpr_strict_cookies"]').is(":checked")||(t('input[data-name="'+o+'"]').prop("checked",!1),t('.gdpr_cookie_settings_shortcode_content input[data-name="moove_gdpr_strict_cookies"]').closest(".gdpr-shr-switch").css("transform","scale(1.2)"),setTimeout(function(){t('.gdpr_cookie_settings_shortcode_content input[data-name="moove_gdpr_strict_cookies"]').closest(".gdpr-shr-switch").css("transform","scale(1)")},300)))):(t('input[data-name="'+o+'"]').prop("checked",t(this).is(":checked")),"moove_gdpr_strict_cookies"===t(this).attr("data-name")&&t(".gdpr_cookie_settings_shortcode_content").find('input[type="checkbox"]').prop("checked",!1)),r.click()}),t(document).on("click",".moove-gdpr-modal-allow-all",function(e){e.preventDefault(),t("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var e=t(this);e.is(":checked")||e.click()}),r("enable_all enable-all-button"),t(".lity .lity-close").click(),s(),f(),t(document).moove_lity_close()}),t(document).on("click",".moove-gdpr-infobar-allow-all",function(t){t.preventDefault(),r("enable_all allow-btn")}),t(document).on("click",".moove-gdpr-modal-save-settings",function(e){e.preventDefault(),f(),t(".lity .lity-close").click(),t(document).moove_lity_close(),n("modal-save-settings")})},finalize:function(){}}},o={fire:function(t,o,r){var n,i=e;o=void 0===o?"init":o,n=""!==t,n=n&&i[t],(n=n&&"function"==typeof i[t][o])&&i[t][o](r)},loadEvents:function(){o.fire("common"),t.each(document.body.className.replace(/-/g,"_").split(/\s+/),function(t,e){o.fire(e),o.fire(e,"finalize")}),o.fire("common","finalize")}};t(document).ready(o.loadEvents)}(jQuery);
dist/styles/admin.css CHANGED
@@ -1 +1 @@
1
- .moove-gdpr-donation-box-wrapper{width:auto;margin:10px 20px 0 2px}.moove-gdpr-donation-box-wrapper .moove-gdpr-donate-form{float:left;margin-right:20px}.moove-gdpr-donation-box-wrapper .moove-donation-box{padding-bottom:20px}.gdpr-tab-section-cnt{max-width:calc(100% - 380px);display:inline-block;width:100%}.moove-plugins-info-boxes{display:inline-block;float:right;width:350px;background-color:#f1f1f1}.moove-plugins-info-boxes .m-plugin-box{border:1px solid #ccc;margin-bottom:30px;background-color:#fff;border-radius:5px}.moove-plugins-info-boxes .m-plugin-box.m-plugin-box-highlighted{border:2px solid #f79322}.moove-plugins-info-boxes .m-plugin-box .box-header{padding:10px;border-bottom:1px solid #ccc}.moove-plugins-info-boxes .m-plugin-box .box-header h4{font-size:14px;font-weight:600;margin:0}.moove-plugins-info-boxes .m-plugin-box .box-content{padding:10px}.moove-plugins-info-boxes .m-plugin-box .box-content p{margin-top:5px;margin-bottom:5px}.moove-plugins-info-boxes .m-plugin-box .box-content hr{margin:10px 0}.moove-plugins-info-boxes .m-plugin-box .plugin-stats .plugin-active-installs,.moove-plugins-info-boxes .m-plugin-box .plugin-stats .plugin-downloads{display:inline-block;width:calc(100% - 120px);line-height:20px}.moove-plugins-info-boxes .m-plugin-box .plugin-stats .plugin-rating{display:inline-block;float:right;max-width:100px}.moove-plugins-info-boxes .m-plugin-box .plugin-features{padding-left:20px;margin-top:5px}.moove-plugins-info-boxes .m-plugin-box .plugin-features li{list-style-type:square}.moove-plugins-info-boxes .m-plugin-box .plugin-buy-now-btn{display:block;text-decoration:none;outline:none;box-shadow:none;padding:7px 20px;background-color:#f79322;color:#fff;text-align:center;transition:all .3s ease;margin:15px 0;font-weight:600;font-size:12px}.moove-plugins-info-boxes .m-plugin-box .plugin-buy-now-btn:hover{background-color:#232323}@media (max-width:1280px){.gdpr-tab-section-cnt{max-width:100%;display:block;width:100%}.moove-plugins-info-boxes{display:inline-block;float:none;width:100%;padding:0;margin:15px 0;background-color:#f1f1f1}}.gdpr-locked-section{padding:0 40px;background-color:#fff;border:1px solid #ccc;display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;margin-top:90px;border-radius:5px}.gdpr-locked-section span{display:block;width:100%;transform:translateY(-50px);text-align:center}.gdpr-locked-section h4{font-size:28px;margin:60px 0 40px;text-align:center}.gdpr-locked-section *{box-sizing:border-box}.gdpr-locked-section i{font-size:30px;line-height:55px;color:#f79322;width:60px;height:50px;background-color:#fff;border:1px solid #ccc;border-bottom:1px solid #fff;border-top-left-radius:100px;border-top-right-radius:100px}.gdpr-locked-section .plugin-buy-now-btn{display:block;text-decoration:none;outline:none;box-shadow:none;padding:7px 20px;background-color:#f79322;color:#fff;text-align:center;transition:all .3s ease;margin:15px auto 0;font-weight:600;font-size:12px;max-width:200px}.gdpr-locked-section .plugin-buy-now-btn:hover{background-color:#232323}#moove_form_checker_wrap .nav-tab-wrapper a.nav-tab.gdpr-cc-addon.gdpr-cc-disabled{background-color:#fff;color:#f79322;line-height:20px}.moove-donation-box{position:relative;width:calc(100% - 20px);margin:16px 0;padding:0 15px 10px;box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;font-size:13px}.moove-donation-box .notice-dismiss:before{float:left;margin:0 4px -2px 0}.moove-redirect-box{width:100%}.moove-not-visible{opacity:0;visibility:hidden;position:absolute}.moove-gdpr-form-container{min-height:45vh}.moove-gdpr-form-container input[type=radio].on-off{margin:0}.moove-gdpr-form-container input.iris-colorpicker{text-shadow:1px 0 0 #fff,-1px 0 0 #fff,0 1px 0 #fff,0 -1px 0 #fff,1px 1px #fff,-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff;text-transform:uppercase;outline:none!important;box-shadow:none!important;font-weight:700;font-size:14px;border:none;width:120px;height:30px;margin:0;border-top-left-radius:5px;border-bottom-left-radius:5px}.moove-gdpr-form-container .iris-selectbtn{position:relative;background-color:#fff;display:inline-block;padding:0 5px;text-transform:uppercase;font-size:11px;line-height:30px;font-weight:700;float:right;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer}.moove-gdpr-form-container .iris-colorpicker-group-cnt{display:inline-block;border:1px solid #ddd;border-radius:5px}.moove-gdpr-form-container .iris-picker{position:absolute}.moove-gdpr-form-container .iris-picker:before{content:"";position:fixed;width:100%;height:100%;top:0;left:0}.moove-gdpr-form-container .iris-picker .iris-picker-inner{z-index:100}.moove-clearfix:after{content:"";clear:both;display:table}.moove_gdpr_company_logo_holder{display:inline-block;padding-bottom:50px;width:130px;height:0;background-position:0;background-repeat:no-repeat;background-size:contain}#wp-moove_gdpr_advanced_cookies_tab_content-wrap,#wp-moove_gdpr_cookies_policy_tab_content-wrap,#wp-moove_gdpr_info_bar_content-wrap,#wp-moove_gdpr_performance_cookies_tab_content-wrap,#wp-moove_gdpr_privacy_overview_tab_content-wrap,#wp-moove_gdpr_strict_necessary_cookies_tab_content-wrap,#wp-moove_gdpr_strictly_necessary_cookies_warning-wrap{max-width:570px}span.separator{display:inline-block;margin-left:10px}#moove_form_checker_wrap .gdpr-tab-section-cnt:after{content:"";clear:both;display:table}#moove_form_checker_wrap .nav-tab-wrapper{width:200px;display:inline-block;padding-right:17px;padding-top:0;position:relative}#moove_form_checker_wrap .nav-tab-wrapper a.nav-tab{font-size:12px;padding:10px 8px;width:100%;margin-left:0;outline:none;box-shadow:none;border-right:0;position:relative;white-space:normal;line-height:1.3}#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active,#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active:focus,#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active:focus:active,#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active:hover{border-bottom:1px solid #ccc;color:#00a0d2;outline:none;box-shadow:none}#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active:after{content:"";position:absolute;right:-1px;top:0;width:2px;bottom:0;background-color:#f1f1f1}#moove_form_checker_wrap .moove-gdpr-form-container{width:calc(100% - 279px);float:right;padding:5px 30px 30px;border:1px solid #ccc}#moove_gdpr_info_bar_content-html,#moove_gdpr_info_bar_content-tmce{display:none}#moove_form_checker_wrap .moove-gdpr-settings-branding{margin:25px 0;font-style:italic}#moove_form_checker_wrap .moove-gdpr-settings-branding hr{margin:0}#moove_form_checker_wrap .moove-gdpr-settings-branding p{margin:15px 0}#moove_form_checker_wrap .moove-gdpr-settings-branding p span{display:inline-block;background-image:url(../images/moove_logo_br.png);width:66px;height:15px;background-size:contain;background-repeat:no-repeat;background-position:0 100%}#moove_form_checker_wrap .moove-gdpr-settings-branding p a{text-decoration:none;color:inherit}#moove_form_checker_wrap .moove-gdpr-settings-branding p a:hover{text-decoration:underline}.moove-gdpr-form-error .alert.script-error{color:#fff;padding:10px;background-color:red;text-transform:uppercase}
1
+ @font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-200.eot);src:url(../fonts/nunito-v8-latin-200.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-200.woff2) format("woff2"),url(../fonts/nunito-v8-latin-200.woff) format("woff"),url(../fonts/nunito-v8-latin-200.ttf) format("truetype"),url(../fonts/nunito-v8-latin-200.svg#svgFontName) format("svg");font-style:normal;font-weight:200}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-200italic.eot);src:url(../fonts/nunito-v8-latin-200italic.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-200italic.woff2) format("woff2"),url(../fonts/nunito-v8-latin-200italic.woff) format("woff"),url(../fonts/nunito-v8-latin-200italic.ttf) format("truetype"),url(../fonts/nunito-v8-latin-200italic.svg#svgFontName) format("svg");font-style:italic;font-weight:200}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-300.eot);src:url(../fonts/nunito-v8-latin-300.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-300.woff2) format("woff2"),url(../fonts/nunito-v8-latin-300.woff) format("woff"),url(../fonts/nunito-v8-latin-300.ttf) format("truetype"),url(../fonts/nunito-v8-latin-300.svg#svgFontName) format("svg");font-style:normal;font-weight:300}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-300italic.eot);src:url(../fonts/nunito-v8-latin-300italic.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-300italic.woff2) format("woff2"),url(../fonts/nunito-v8-latin-300italic.woff) format("woff"),url(../fonts/nunito-v8-latin-300italic.ttf) format("truetype"),url(../fonts/nunito-v8-latin-300italic.svg#svgFontName) format("svg");font-style:italic;font-weight:300}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-regular.eot);src:url(../fonts/nunito-v8-latin-regular.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-regular.woff2) format("woff2"),url(../fonts/nunito-v8-latin-regular.woff) format("woff"),url(../fonts/nunito-v8-latin-regular.ttf) format("truetype"),url(../fonts/nunito-v8-latin-regular.svg#svgFontName) format("svg");font-style:normal;font-weight:400}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-italic.eot);src:url(../fonts/nunito-v8-latin-italic.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-italic.woff2) format("woff2"),url(../fonts/nunito-v8-latin-italic.woff) format("woff"),url(../fonts/nunito-v8-latin-italic.ttf) format("truetype"),url(../fonts/nunito-v8-latin-italic.svg#svgFontName) format("svg");font-style:italic;font-weight:400}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-600.eot);src:url(../fonts/nunito-v8-latin-600.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-600.woff2) format("woff2"),url(../fonts/nunito-v8-latin-600.woff) format("woff"),url(../fonts/nunito-v8-latin-600.ttf) format("truetype"),url(../fonts/nunito-v8-latin-600.svg#svgFontName) format("svg");font-style:normal;font-weight:600}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-600italic.eot);src:url(../fonts/nunito-v8-latin-600italic.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-600italic.woff2) format("woff2"),url(../fonts/nunito-v8-latin-600italic.woff) format("woff"),url(../fonts/nunito-v8-latin-600italic.ttf) format("truetype"),url(../fonts/nunito-v8-latin-600italic.svg#svgFontName) format("svg");font-style:italic;font-weight:600}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-700.eot);src:url(../fonts/nunito-v8-latin-700.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-700.woff2) format("woff2"),url(../fonts/nunito-v8-latin-700.woff) format("woff"),url(../fonts/nunito-v8-latin-700.ttf) format("truetype"),url(../fonts/nunito-v8-latin-700.svg#svgFontName) format("svg");font-style:normal;font-weight:700}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-700italic.eot);src:url(../fonts/nunito-v8-latin-700italic.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-700italic.woff2) format("woff2"),url(../fonts/nunito-v8-latin-700italic.woff) format("woff"),url(../fonts/nunito-v8-latin-700italic.ttf) format("truetype"),url(../fonts/nunito-v8-latin-700italic.svg#svgFontName) format("svg");font-style:italic;font-weight:700}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-800.eot);src:url(../fonts/nunito-v8-latin-800.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-800.woff2) format("woff2"),url(../fonts/nunito-v8-latin-800.woff) format("woff"),url(../fonts/nunito-v8-latin-800.ttf) format("truetype"),url(../fonts/nunito-v8-latin-800.svg#svgFontName) format("svg");font-style:normal;font-weight:800}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-800italic.eot);src:url(../fonts/nunito-v8-latin-800italic.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-800italic.woff2) format("woff2"),url(../fonts/nunito-v8-latin-800italic.woff) format("woff"),url(../fonts/nunito-v8-latin-800italic.ttf) format("truetype"),url(../fonts/nunito-v8-latin-800italic.svg#svgFontName) format("svg");font-style:italic;font-weight:800}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-900.eot);src:url(../fonts/nunito-v8-latin-900.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-900.woff2) format("woff2"),url(../fonts/nunito-v8-latin-900.woff) format("woff"),url(../fonts/nunito-v8-latin-900.ttf) format("truetype"),url(../fonts/nunito-v8-latin-900.svg#svgFontName) format("svg");font-style:normal;font-weight:900}@font-face{font-family:Nunito;src:url(../fonts/nunito-v8-latin-900italic.eot);src:url(../fonts/nunito-v8-latin-900italic.eot?#iefix) format("embedded-opentype"),url(../fonts/nunito-v8-latin-900italic.woff2) format("woff2"),url(../fonts/nunito-v8-latin-900italic.woff) format("woff"),url(../fonts/nunito-v8-latin-900italic.ttf) format("truetype"),url(../fonts/nunito-v8-latin-900italic.svg#svgFontName) format("svg");font-style:italic;font-weight:900}.moove-gdpr-donation-box-wrapper{width:auto;margin:10px 20px 0 2px}.moove-gdpr-donation-box-wrapper .moove-gdpr-donate-form{float:left;margin-right:20px}.moove-gdpr-donation-box-wrapper .moove-donation-box{padding-bottom:20px}.gdpr-script-tabs-main-cnt{position:relative;overflow:hidden}body.toplevel_page_moove-gdpr{background-color:#fff}#moove_form_checker_wrap .moove-gdpr-form-container{min-height:700px}@font-face{font-family:gdpr-admin-icon;src:url(../fonts/gdpr-admin-icon.eot);src:url(../fonts/gdpr-admin-icon.eot#iefix) format("embedded-opentype"),url(../fonts/gdpr-admin-icon.woff2) format("woff2"),url(../fonts/gdpr-admin-icon.woff) format("woff"),url(../fonts/gdpr-admin-icon.ttf) format("truetype"),url(../fonts/gdpr-admin-icon.svg#gdpr-admin-icon) format("svg");font-weight:400;font-style:normal}#toplevel_page_moove-gdpr .dashicons-before{font-family:gdpr-admin-icon;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#toplevel_page_moove-gdpr .dashicons-before:before{content:"\e806";font-family:inherit;position:relative;top:2px}.gdpr-help-content-cnt .gdpr-help-content-block{margin-top:20px}.gdpr-help-content-cnt .gdpr-faq-toggle{box-shadow:0 3px 51px 0 rgba(0,0,0,.05);border:1px solid #ccc;margin-bottom:20px}.gdpr-help-content-cnt .gdpr-faq-toggle.gdpr-faq-open .gdpr-faq-accordion-header h3{background-color:#f79322;color:#fff}.gdpr-help-content-cnt .gdpr-faq-toggle.gdpr-faq-open .gdpr-faq-accordion-header h3:after{content:"-"}.gdpr-help-content-cnt .gdpr-faq-toggle .gdpr-faq-accordion-header h3{margin:0;position:relative;padding:15px 20px;padding-right:60px;cursor:pointer;transition:all .3s ease;font-size:16px!important}.gdpr-help-content-cnt .gdpr-faq-toggle .gdpr-faq-accordion-header h3:hover{background-color:#f79322;color:#fff}.gdpr-help-content-cnt .gdpr-faq-toggle .gdpr-faq-accordion-header h3:after{content:"+";width:50px;position:absolute;top:0;right:0;border-left:1px solid #ccc;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:26px;text-align:center;bottom:0;-ms-flex-pack:center;justify-content:center}.gdpr-help-content-cnt .gdpr-faq-toggle .gdpr-faq-accordion-content{padding:15px 60px 15px 20px;border-top:1px solid #ccc}.gdpr-help-content-cnt .gdpr-faq-toggle .gdpr-faq-accordion-content code{line-height:1.8;overflow:auto;display:block}.gdpr-disable-posts-nav{list-style-type:none;padding:5px 10px;margin:20px 0;background-color:#fff;box-shadow:0 3px 51px 0 rgba(0,0,0,.05);border:1px solid #ccc}.gdpr-disable-posts-nav li:first-child a{padding-left:0}.gdpr-disable-posts-nav li:last-child a{padding-right:0}.gdpr-disable-posts-nav li:after{content:"|";display:inline-block;position:absolute;right:-2px;top:10px}.gdpr-disable-posts-nav li:first-child:after,.gdpr-disable-posts-nav li:last-child:after{display:none}.gdpr-disable-posts-nav li{list-style:none;display:inline-block;float:left;position:relative;margin:0}.gdpr-disable-posts-nav li a.active{color:#f79322}.gdpr-disable-posts-nav li a,.gdpr-disable-posts-nav li strong{display:block;padding:10px;outline:none;box-shadow:none}.gdpr-disable-posts-nav li strong{padding-left:0}body.toplevel_page_moove-gdpr #wpcontent{background-color:#fff}.gdpr-script-tab-content{position:relative;overflow:hidden}.gdpr-script-tab-content .gdpr-tab-code-section{transition:all .8s ease;top:0;right:0;left:0}.gdpr-script-tab-content .gdpr-tab-code-section:not(.gdpr-active){height:0;opacity:0;margin:0;position:absolute;top:100%;visibility:hidden}.gdpr-tab-code-section-nav ul{list-style-type:none;padding:0;margin:20px 1px 0;display:-ms-flexbox;display:flex}.gdpr-tab-code-section-nav ul li{list-style:none;padding:0;margin:0 -1px;position:relative;border:1px solid #f79322;border-bottom:0;overflow:hidden}.gdpr-tab-code-section-nav ul li:first-child{border-top-left-radius:10px}.gdpr-tab-code-section-nav ul li:last-child{border-top-right-radius:10px}.gdpr-tab-code-section-nav ul li a{background-color:#fff;display:block;padding:8px 20px;text-decoration:none;font-weight:700;font-size:14px;color:#555;transition:all .3s ease;outline:none;box-shadow:none}.gdpr-tab-code-section-nav ul li a:before{content:"\21B3";transform:rotate(90deg);display:inline-block;position:absolute;top:0;left:0;width:0;color:#fff;opacity:0;transition:all .3s ease}.gdpr-tab-code-section-nav ul li a.gdpr-active:before{opacity:1;top:4px;left:10px}.gdpr-tab-code-section-nav ul li a.gdpr-active,.gdpr-tab-code-section-nav ul li a:hover{background-color:#f79322;color:#fff}.gdpr-tab-code-section{background-color:#fff;padding:20px;border:1px solid #f79322;border-bottom-left-radius:10px;border-bottom-right-radius:10px;border-top-right-radius:10px;position:relative;overflow-wrap:hidden}.gdpr-tab-code-section .CodeMirror{font-size:15px;width:100%;height:300px;box-sizing:border-box;background-color:#fff;border:1px solid #ccc}.gdpr-tab-code-section .CodeMirror-gutters{padding-bottom:0;background-color:#f1f1f1}.gdpr-tab-code-section p.description{font-weight:600;font-size:13px}.gdpr-tab-code-section h4{margin:-20px -20px 0;padding:15px 20px;border-bottom:1px solid #ccc}.gdpr-tab-code-section table{width:100%}.gdpr-tab-code-section .gdpr-code{padding:10px;background-color:#f1f1f1}.gdpr-img-responsive{max-width:100%;height:auto}.gdpr-tab-section-cnt{max-width:calc(100% - 380px);display:inline-block;width:100%}.gdpr-tab-section-cnt .regular-text{width:100%}.gdpr-tab-section-cnt .powered-by-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:15px}.gdpr-tab-section-cnt .powered-by-label label{white-space:nowrap;margin-right:20px}.gdpr-conditional-field:not(.gdpr-conditional-on){display:none}.gdpr-checkbox-toggle{position:relative;display:inline-block;width:160px;height:24px;box-sizing:border-box}.gdpr-checkbox-toggle *{box-sizing:border-box}.gdpr-checkbox-toggle.gdpr-checkbox-inverted input:checked+.gdpr-checkbox-slider{background-color:red}.gdpr-checkbox-toggle.gdpr-checkbox-inverted input:checked+.gdpr-checkbox-slider:after{content:attr(data-disable)}.gdpr-checkbox-toggle.gdpr-checkbox-inverted .gdpr-checkbox-slider{background-color:#2e9935}.gdpr-checkbox-toggle.gdpr-checkbox-inverted .gdpr-checkbox-slider:after{content:attr(data-enable)}.gdpr-checkbox-toggle.gdpr-color-scheme-toggle input:checked+.gdpr-checkbox-slider{background-color:#202020}.gdpr-checkbox-toggle.gdpr-color-scheme-toggle input:checked+.gdpr-checkbox-slider:after{color:#fff}.gdpr-checkbox-toggle.gdpr-color-scheme-toggle .gdpr-checkbox-slider,.gdpr-checkbox-toggle.gdpr-color-scheme-toggle input:checked+.gdpr-checkbox-slider:before{background-color:#fff}.gdpr-checkbox-toggle.gdpr-color-scheme-toggle .gdpr-checkbox-slider:after{color:#202020}.gdpr-checkbox-toggle.gdpr-color-scheme-toggle .gdpr-checkbox-slider:before{background-color:#202020}.gdpr-checkbox-toggle input{opacity:0;width:0;height:0}.gdpr-checkbox-toggle input:checked+.gdpr-checkbox-slider{background-color:#2e9935}.gdpr-checkbox-toggle input:checked+.gdpr-checkbox-slider:after{content:attr(data-enable)}.gdpr-checkbox-toggle input:checked+.gdpr-checkbox-slider:before{transform:translateX(136px)}.gdpr-checkbox-toggle .gdpr-checkbox-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:red;transition:.4s;border-radius:34px;border:1px solid #ddd}.gdpr-checkbox-toggle .gdpr-checkbox-slider:before{position:absolute;content:"";height:20px;width:20px;left:1px;bottom:1px;background-color:#fff;transition:.4s;border-radius:50%}.gdpr-checkbox-toggle .gdpr-checkbox-slider:after{content:attr(data-disable);position:absolute;top:5px;left:0;right:0;color:#fff;font-size:12px;display:block;z-index:4;text-transform:uppercase;text-align:center;font-weight:600;font-family:Helvetica;letter-spacing:.5px}.moove-plugins-info-boxes{display:inline-block;float:right;width:350px;background-color:#fff}.moove-plugins-info-boxes .m-plugin-box{border:1px solid #ccc;margin-bottom:30px;background-color:#fff;border-radius:5px;box-shadow:0 3px 51px 0 rgba(0,0,0,.05)}.moove-plugins-info-boxes .m-plugin-box.m-plugin-box-highlighted{border:2px solid #f79322}.moove-plugins-info-boxes .m-plugin-box .box-header{padding:10px;border-bottom:1px solid #ccc}.moove-plugins-info-boxes .m-plugin-box .box-header h4{font-size:14px;font-weight:600;margin:0;font-family:Nunito}.moove-plugins-info-boxes .m-plugin-box .box-content{padding:10px}.moove-plugins-info-boxes .m-plugin-box .box-content p{margin-top:5px;margin-bottom:5px}.moove-plugins-info-boxes .m-plugin-box .box-content hr{margin:10px 0}.moove-plugins-info-boxes .m-plugin-box .plugin-rating{display:-ms-flexbox;display:flex;margin:10px 0 20px;-ms-flex-align:center;align-items:center;transform:scale(1.3);width:100%;padding-left:40px}.moove-plugins-info-boxes .m-plugin-box .plugin-rating .plugin-stars{display:inline-block;width:50%}.moove-plugins-info-boxes .m-plugin-box .gdpr-review-container{display:inline-block;width:50%;text-align:left;margin:20px 0}.moove-plugins-info-boxes .m-plugin-box .gdpr-review-container .gdpr-review-bnt{text-decoration:none;outline:none;padding:8px 10px;font-size:12px;font-weight:500;background-color:#f79322;color:#fff;transition:all .3s ease;line-height:18px;border:1px solid #d28b21}.moove-plugins-info-boxes .m-plugin-box .gdpr-review-container .gdpr-review-bnt:hover{background-color:#262c33;border:1px solid #737373}.moove-plugins-info-boxes .m-plugin-box .plugin-stats .plugin-active-installs,.moove-plugins-info-boxes .m-plugin-box .plugin-stats .plugin-downloads{display:inline-block;width:calc(100% - 120px);line-height:20px}.moove-plugins-info-boxes .m-plugin-box .plugin-features{padding-left:20px;margin-top:5px}.moove-plugins-info-boxes .m-plugin-box .plugin-features li{list-style-type:square}.moove-plugins-info-boxes .m-plugin-box .plugin-buy-now-btn{display:block;text-decoration:none;outline:none;box-shadow:none;padding:7px 20px;background-color:#f79322;color:#fff;text-align:center;transition:all .3s ease;margin:15px 0;font-weight:600;font-size:12px}.moove-plugins-info-boxes .m-plugin-box .plugin-buy-now-btn:hover{background-color:#232323}.gdpr-tab-section-cnt{position:relative;overflow:hidden}.gdpr-tab-section-cnt .form-table th{width:250px;max-width:250px}@media (max-width:1280px){.gdpr-tab-section-cnt{max-width:100%;display:block;width:100%}.gdpr-tab-section-cnt .form-table th{width:200px}.moove-plugins-info-boxes{display:inline-block;float:none;width:100%;padding:0;margin:15px 0;background-color:#f1f1f1}}.gdpr-locked-section{padding:0 40px;background-color:#fff;border:1px solid #ccc;display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;margin-top:90px;border-radius:5px}.gdpr-locked-section span{display:block;width:100%;transform:translateY(-50px);text-align:center}.gdpr-locked-section h4{font-size:28px;margin:60px 0 40px;text-align:center}.gdpr-locked-section *{box-sizing:border-box}.gdpr-locked-section i{font-size:30px;line-height:55px;color:#f79322;width:60px;height:50px;background-color:#fff;border:1px solid #ccc;border-bottom:1px solid #fff;border-top-left-radius:100px;border-top-right-radius:100px}.gdpr-locked-section .plugin-buy-now-btn{display:block;text-decoration:none;outline:none;box-shadow:none;padding:7px 20px;background-color:#f79322;color:#fff;text-align:center;transition:all .3s ease;margin:15px auto 0;font-weight:600;font-size:12px;max-width:200px}.gdpr-locked-section .plugin-buy-now-btn:hover{background-color:#232323}#moove_form_checker_wrap .nav-tab-wrapper a.nav-tab.gdpr-cc-addon.gdpr-cc-disabled{background-color:#fff;color:#f79322;line-height:20px}.moove-donation-box{position:relative;width:calc(100% - 20px);margin:16px 0;padding:0 15px 10px;box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;font-size:13px}.moove-donation-box .notice-dismiss:before{float:left;margin:0 4px -2px 0}.moove-redirect-box{width:100%}.moove-not-visible{opacity:0;visibility:hidden;position:absolute}.moove-gdpr-form-container{min-height:45vh}.moove-gdpr-form-container input[type=radio].on-off{margin:0}.moove-gdpr-form-container input.iris-colorpicker{text-shadow:1px 0 0 #fff,-1px 0 0 #fff,0 1px 0 #fff,0 -1px 0 #fff,1px 1px #fff,-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff;text-transform:uppercase;outline:none!important;box-shadow:none!important;font-weight:700;font-size:14px;border:none;width:120px;height:30px;margin:0;border-top-left-radius:5px;border-bottom-left-radius:5px}.moove-gdpr-form-container .iris-selectbtn{position:relative;background-color:#fff;display:inline-block;padding:0 5px;text-transform:uppercase;font-size:11px;line-height:30px;font-weight:700;float:right;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer}.moove-gdpr-form-container .iris-colorpicker-group-cnt{display:inline-block;border:1px solid #ddd;border-radius:5px}.moove-gdpr-form-container .iris-picker{position:absolute}.moove-gdpr-form-container .iris-picker:before{content:"";position:fixed;width:100%;height:100%;top:0;left:0}.moove-gdpr-form-container .iris-picker .iris-picker-inner{z-index:100}.moove-clearfix:after{content:"";clear:both;display:table}.moove_gdpr_company_logo_holder{display:inline-block;padding-bottom:50px;width:130px;height:0;background-position:0;background-repeat:no-repeat;background-size:contain}#wp-moove_gdpr_advanced_cookies_tab_content-wrap,#wp-moove_gdpr_cookies_policy_tab_content-wrap,#wp-moove_gdpr_ifb_content-wrap,#wp-moove_gdpr_info_bar_content-wrap,#wp-moove_gdpr_modal_strictly_secondary_notice-wrap,#wp-moove_gdpr_performance_cookies_tab_content-wrap,#wp-moove_gdpr_privacy_overview_tab_content-wrap,#wp-moove_gdpr_strict_necessary_cookies_tab_content-wrap,#wp-moove_gdpr_strictly_necessary_cookies_warning-wrap{max-width:100%}span.separator{display:inline-block;margin-left:10px}.gdpr-cookie-compliance-header-section{padding-left:100px;position:relative;margin:30px 0}.gdpr-cookie-compliance-header-section:before{content:"";position:absolute;left:0;top:0;width:100px;height:100px;background-image:url(../images/gdpr-cookie-compliance-icon.png);background-position:0;background-repeat:no-repeat;background-size:contain}.gdpr-cookie-compliance-header-section h2{font-family:Nunito,sans-serif;font-size:30px;font-weight:800;padding-top:25px;margin-bottom:10px}.gdpr-cookie-compliance-header-section h2 .gdpr-plugin-version{font-size:16px;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#565656;margin-left:5px}.gdpr-cookie-compliance-header-section h4{margin-top:10px}#moove_form_checker_wrap{position:relative;overflow:hidden}#moove_form_checker_wrap .button-primary{background-color:#f89e26;border:none;border-radius:0;text-shadow:none;box-shadow:none;outline:none;padding:8px 15px;font-size:12px;font-weight:500;color:#fff;transition:all .3s ease;height:auto;line-height:18px;border:1px solid #d28b21}#moove_form_checker_wrap .button-primary:hover{background-color:#262c33;border:1px solid #737373}#moove_form_checker_wrap h1{margin:0;padding:0}#moove_form_checker_wrap h2,#moove_form_checker_wrap h3{font-family:Nunito,sans-serif;font-weight:800;font-size:20px}#moove_form_checker_wrap .gdpr-tab-section-cnt:after{content:"";clear:both;display:table}#moove_form_checker_wrap .nav-tab-wrapper{width:200px;display:inline-block;padding-right:17px;padding-top:0;position:relative}#moove_form_checker_wrap .nav-tab-wrapper a.nav-tab{font-size:12px;padding:10px 8px;width:100%;margin-left:0;outline:none;box-shadow:none;border-right:0;position:relative;white-space:normal;line-height:1.3}#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active,#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active:focus,#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active:focus:active,#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active:hover{border-bottom:1px solid #ccc;color:#f79322;outline:none;box-shadow:none;background-color:#fff}#moove_form_checker_wrap .nav-tab-wrapper .nav-tab-active:after{content:"";position:absolute;right:-1px;top:0;width:2px;bottom:0;background-color:#fff}#moove_form_checker_wrap .moove-gdpr-form-container{width:calc(100% - 279px);float:right;padding:5px 30px 30px;border:1px solid #ccc}#moove_gdpr_info_bar_content-html,#moove_gdpr_info_bar_content-tmce{display:none}#moove_form_checker_wrap .moove-gdpr-settings-branding{margin:25px 0;font-style:italic}#moove_form_checker_wrap .moove-gdpr-settings-branding hr{margin:0}#moove_form_checker_wrap .moove-gdpr-settings-branding p{margin:15px 0}#moove_form_checker_wrap .moove-gdpr-settings-branding p span{display:inline-block;background-image:url(../images/moove_logo_br.png);width:66px;height:15px;background-size:contain;background-repeat:no-repeat;background-position:0 100%}#moove_form_checker_wrap .moove-gdpr-settings-branding p a{text-decoration:none;color:inherit}#moove_form_checker_wrap .moove-gdpr-settings-branding p a:hover{text-decoration:underline}.moove-gdpr-form-error .alert.script-error{color:#fff;padding:10px;background-color:red;text-transform:uppercase}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5);animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}
dist/styles/custom-editor-style.css CHANGED
@@ -1 +1 @@
1
- .mce-content-body.moove_gdpr_advanced_cookies_tab_content,.mce-content-body.moove_gdpr_cookies_policy_tab_content,.mce-content-body.moove_gdpr_performance_cookies_tab_content,.mce-content-body.moove_gdpr_privacy_overview_tab_content,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning{margin:10px;max-width:400px}.mce-content-body.moove_gdpr_advanced_cookies_tab_content a,.mce-content-body.moove_gdpr_advanced_cookies_tab_content li,.mce-content-body.moove_gdpr_advanced_cookies_tab_content p,.mce-content-body.moove_gdpr_cookies_policy_tab_content a,.mce-content-body.moove_gdpr_cookies_policy_tab_content li,.mce-content-body.moove_gdpr_cookies_policy_tab_content p,.mce-content-body.moove_gdpr_performance_cookies_tab_content a,.mce-content-body.moove_gdpr_performance_cookies_tab_content li,.mce-content-body.moove_gdpr_performance_cookies_tab_content p,.mce-content-body.moove_gdpr_privacy_overview_tab_content a,.mce-content-body.moove_gdpr_privacy_overview_tab_content li,.mce-content-body.moove_gdpr_privacy_overview_tab_content p,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content a,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content li,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content p,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning a,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning li,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning p{font:normal 11px/14px Tahoma,Geneva,sans-serif;margin-bottom:15px;margin-top:0}.mce-content-body.moove_gdpr_advanced_cookies_tab_content h1,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h2,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h3,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h4,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h5,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h6,.mce-content-body.moove_gdpr_cookies_policy_tab_content h1,.mce-content-body.moove_gdpr_cookies_policy_tab_content h2,.mce-content-body.moove_gdpr_cookies_policy_tab_content h3,.mce-content-body.moove_gdpr_cookies_policy_tab_content h4,.mce-content-body.moove_gdpr_cookies_policy_tab_content h5,.mce-content-body.moove_gdpr_cookies_policy_tab_content h6,.mce-content-body.moove_gdpr_performance_cookies_tab_content h1,.mce-content-body.moove_gdpr_performance_cookies_tab_content h2,.mce-content-body.moove_gdpr_performance_cookies_tab_content h3,.mce-content-body.moove_gdpr_performance_cookies_tab_content h4,.mce-content-body.moove_gdpr_performance_cookies_tab_content h5,.mce-content-body.moove_gdpr_performance_cookies_tab_content h6,.mce-content-body.moove_gdpr_privacy_overview_tab_content h1,.mce-content-body.moove_gdpr_privacy_overview_tab_content h2,.mce-content-body.moove_gdpr_privacy_overview_tab_content h3,.mce-content-body.moove_gdpr_privacy_overview_tab_content h4,.mce-content-body.moove_gdpr_privacy_overview_tab_content h5,.mce-content-body.moove_gdpr_privacy_overview_tab_content h6,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h1,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h2,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h3,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h4,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h5,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h6,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h1,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h2,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h3,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h4,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h5,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h6{font:normal 14px/18px Tahoma,Geneva,sans-serif;margin-bottom:15px;margin-top:0;font-weight:700;text-transform:none}.mce-content-body.moove_gdpr_info_bar_content{margin:10px}.mce-content-body.moove_gdpr_info_bar_content h1,.mce-content-body.moove_gdpr_info_bar_content h2,.mce-content-body.moove_gdpr_info_bar_content h3,.mce-content-body.moove_gdpr_info_bar_content h4,.mce-content-body.moove_gdpr_info_bar_content h5,.mce-content-body.moove_gdpr_info_bar_content h6,.mce-content-body.moove_gdpr_info_bar_content li,.mce-content-body.moove_gdpr_info_bar_content p,.mce-content-body.moove_gdpr_info_bar_content p a{font:normal 11pt/16pt Arial,sans-serif;margin:0}
1
+ .mce-content-body.moove_gdpr_advanced_cookies_tab_content,.mce-content-body.moove_gdpr_cookies_policy_tab_content,.mce-content-body.moove_gdpr_ifb_content,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice,.mce-content-body.moove_gdpr_performance_cookies_tab_content,.mce-content-body.moove_gdpr_privacy_overview_tab_content,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning{margin:10px;max-width:100%}.mce-content-body.moove_gdpr_advanced_cookies_tab_content a,.mce-content-body.moove_gdpr_advanced_cookies_tab_content li,.mce-content-body.moove_gdpr_advanced_cookies_tab_content p,.mce-content-body.moove_gdpr_cookies_policy_tab_content a,.mce-content-body.moove_gdpr_cookies_policy_tab_content li,.mce-content-body.moove_gdpr_cookies_policy_tab_content p,.mce-content-body.moove_gdpr_ifb_content a,.mce-content-body.moove_gdpr_ifb_content li,.mce-content-body.moove_gdpr_ifb_content p,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice a,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice li,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice p,.mce-content-body.moove_gdpr_performance_cookies_tab_content a,.mce-content-body.moove_gdpr_performance_cookies_tab_content li,.mce-content-body.moove_gdpr_performance_cookies_tab_content p,.mce-content-body.moove_gdpr_privacy_overview_tab_content a,.mce-content-body.moove_gdpr_privacy_overview_tab_content li,.mce-content-body.moove_gdpr_privacy_overview_tab_content p,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content a,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content li,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content p,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning a,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning li,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning p{font:normal 11px/14px Tahoma,Geneva,sans-serif;margin-bottom:15px;margin-top:0}.mce-content-body.moove_gdpr_advanced_cookies_tab_content h1,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h2,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h3,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h4,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h5,.mce-content-body.moove_gdpr_advanced_cookies_tab_content h6,.mce-content-body.moove_gdpr_cookies_policy_tab_content h1,.mce-content-body.moove_gdpr_cookies_policy_tab_content h2,.mce-content-body.moove_gdpr_cookies_policy_tab_content h3,.mce-content-body.moove_gdpr_cookies_policy_tab_content h4,.mce-content-body.moove_gdpr_cookies_policy_tab_content h5,.mce-content-body.moove_gdpr_cookies_policy_tab_content h6,.mce-content-body.moove_gdpr_ifb_content h1,.mce-content-body.moove_gdpr_ifb_content h2,.mce-content-body.moove_gdpr_ifb_content h3,.mce-content-body.moove_gdpr_ifb_content h4,.mce-content-body.moove_gdpr_ifb_content h5,.mce-content-body.moove_gdpr_ifb_content h6,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice h1,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice h2,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice h3,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice h4,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice h5,.mce-content-body.moove_gdpr_modal_strictly_secondary_notice h6,.mce-content-body.moove_gdpr_performance_cookies_tab_content h1,.mce-content-body.moove_gdpr_performance_cookies_tab_content h2,.mce-content-body.moove_gdpr_performance_cookies_tab_content h3,.mce-content-body.moove_gdpr_performance_cookies_tab_content h4,.mce-content-body.moove_gdpr_performance_cookies_tab_content h5,.mce-content-body.moove_gdpr_performance_cookies_tab_content h6,.mce-content-body.moove_gdpr_privacy_overview_tab_content h1,.mce-content-body.moove_gdpr_privacy_overview_tab_content h2,.mce-content-body.moove_gdpr_privacy_overview_tab_content h3,.mce-content-body.moove_gdpr_privacy_overview_tab_content h4,.mce-content-body.moove_gdpr_privacy_overview_tab_content h5,.mce-content-body.moove_gdpr_privacy_overview_tab_content h6,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h1,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h2,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h3,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h4,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h5,.mce-content-body.moove_gdpr_strict_necessary_cookies_tab_content h6,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h1,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h2,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h3,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h4,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h5,.mce-content-body.moove_gdpr_strictly_necessary_cookies_warning h6{font:normal 14px/18px Tahoma,Geneva,sans-serif;margin-bottom:15px;margin-top:0;font-weight:700;text-transform:none}.mce-content-body.moove_gdpr_info_bar_content{margin:10px}.mce-content-body.moove_gdpr_info_bar_content h1,.mce-content-body.moove_gdpr_info_bar_content h2,.mce-content-body.moove_gdpr_info_bar_content h3,.mce-content-body.moove_gdpr_info_bar_content h4,.mce-content-body.moove_gdpr_info_bar_content h5,.mce-content-body.moove_gdpr_info_bar_content h6,.mce-content-body.moove_gdpr_info_bar_content li,.mce-content-body.moove_gdpr_info_bar_content p,.mce-content-body.moove_gdpr_info_bar_content p a{font:normal 11pt/16pt Arial,sans-serif;margin:0}
languages/gdpr-cookie-compliance.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2018-12-10 14:32+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: \n"
9
  "Language-Team: \n"
@@ -18,63 +18,70 @@ msgstr ""
18
  msgid "Change cookie settings"
19
  msgstr ""
20
 
21
- #: moove-modules.php:66 moove-modules.php:173 moove-modules.php:347
22
- #: views/moove/admin/settings/settings_page.php:59
23
  #: views/moove/admin/settings/privacy_overview.php:37
24
  msgid "Privacy Overview"
25
  msgstr ""
26
 
27
  #: moove-modules.php:116
28
- msgid "We are using cookies to give you the best experience on our website."
 
29
  msgstr ""
30
 
31
  #: moove-modules.php:117
32
- msgid ""
33
- "You can find out more about which cookies we are using or switch them off in "
34
- "[setting]settings[/setting]."
35
  msgstr ""
36
 
37
- #: moove-modules.php:133 views/moove/admin/settings/banner_settings.php:80
38
  msgid "Accept"
39
  msgstr ""
40
 
41
- #: moove-modules.php:194 moove-modules.php:351
42
- #: views/moove/admin/settings/settings_page.php:66
43
- #: views/moove/admin/settings/strictly_necessary_cookies.php:50
44
  msgid "Strictly Necessary Cookies"
45
  msgstr ""
46
 
47
- #: moove-modules.php:207 moove-modules.php:236 moove-modules.php:263
48
- #: views/moove/admin/settings/general_settings.php:214
 
 
 
 
49
  msgid "Enabled"
50
  msgstr ""
51
 
52
- #: moove-modules.php:208 moove-modules.php:237 moove-modules.php:264
53
- #: views/moove/admin/settings/general_settings.php:215
 
 
 
 
54
  msgid "Disabled"
55
  msgstr ""
56
 
57
- #: moove-modules.php:251 moove-modules.php:307 moove-modules.php:355
58
- #: views/moove/admin/settings/settings_page.php:73
59
- #: views/moove/admin/settings/third_party_cookies.php:66
60
  msgid "3rd Party Cookies"
61
  msgstr ""
62
 
63
- #: moove-modules.php:328 views/moove/admin/settings/general_settings.php:205
64
  msgid "Enable All"
65
  msgstr ""
66
 
67
- #: moove-modules.php:329
68
  msgid "Save Settings"
69
  msgstr ""
70
 
71
- #: moove-modules.php:359 views/moove/admin/settings/advanced_cookies.php:67
72
- #: views/moove/admin/settings/settings_page.php:80
73
  msgid "Additional Cookies"
74
  msgstr ""
75
 
76
- #: moove-modules.php:363 views/moove/admin/settings/cookie_policy.php:46
77
- #: views/moove/admin/settings/settings_page.php:86
78
  msgid "Cookie Policy"
79
  msgstr ""
80
 
@@ -82,24 +89,31 @@ msgstr ""
82
  msgid "Settings"
83
  msgstr ""
84
 
85
- #: moove-actions.php:142
 
 
 
 
 
 
 
 
86
  msgid "plugin"
87
  msgstr ""
88
 
89
  #: moove-content.php:34
90
  msgid ""
91
- "<p>This website uses cookies so that we can provide you with the best user "
92
  "experience possible. Cookie information is stored in your browser and "
93
  "performs functions such as recognising you when you return to our website "
94
  "and helping our team to understand which sections of the website you find "
95
- "most interesting and useful.</p><p>You can adjust all of your cookie "
96
- "settings by navigating the tabs on the left hand side.</p>"
97
  msgstr ""
98
 
99
  #: moove-content.php:44
100
  msgid ""
101
- "<p>Strictly Necessary Cookie should be enabled at all times so that we can "
102
- "save your preferences for cookie settings.</p>"
103
  msgstr ""
104
 
105
  #: moove-content.php:60
@@ -111,24 +125,39 @@ msgstr ""
111
 
112
  #: moove-content.php:71
113
  msgid ""
114
- "<p>This website uses the following additional cookies:</p><p>(List the "
115
- "cookies that you are using on the website here.)</p>"
116
  msgstr ""
117
 
118
  #: moove-content.php:81
119
  msgid ""
120
- "<p>This website uses Google Analytics to collect anonymous information such "
121
- "as the number of visitors to the site, and the most popular pages.</p><p>"
122
- "Keeping this cookie enabled helps us to improve our website.</p>"
 
 
 
123
  msgstr ""
124
 
125
- #: moove-content.php:91
 
126
  msgid ""
127
- "<p>More information about our <a href='#' target='_blank'>Cookie Policy</a>"
128
- "</p>"
 
 
 
129
  msgstr ""
130
 
131
- #: moove-content.php:111
 
 
 
 
 
 
 
 
132
  msgid ""
133
  "Please enable Strictly Necessary Cookies first so that we can save your "
134
  "preferences!"
@@ -140,350 +169,386 @@ msgstr ""
140
  msgid "disable"
141
  msgstr ""
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  #: views/moove/admin/settings/cookie_policy.php:56
144
- #: views/moove/admin/settings/advanced_cookies.php:77
145
- #: views/moove/admin/settings/third_party_cookies.php:76
 
146
  msgid "Turn"
147
  msgstr ""
148
 
149
- #: views/moove/admin/settings/cookie_policy.php:59
150
- #: views/moove/admin/settings/advanced_cookies.php:80
151
- #: views/moove/admin/settings/third_party_cookies.php:79
 
152
  msgid "On"
153
  msgstr ""
154
 
155
- #: views/moove/admin/settings/cookie_policy.php:60
156
- #: views/moove/admin/settings/advanced_cookies.php:81
157
- #: views/moove/admin/settings/third_party_cookies.php:80
 
158
  msgid "Off"
159
  msgstr ""
160
 
161
- #: views/moove/admin/settings/cookie_policy.php:66
162
- #: views/moove/admin/settings/advanced_cookies.php:98
163
- #: views/moove/admin/settings/strictly_necessary_cookies.php:73
164
- #: views/moove/admin/settings/third_party_cookies.php:97
165
  #: views/moove/admin/settings/privacy_overview.php:48
166
  msgid "Tab Title"
167
  msgstr ""
168
 
169
- #: views/moove/admin/settings/cookie_policy.php:75
170
- #: views/moove/admin/settings/advanced_cookies.php:107
171
- #: views/moove/admin/settings/strictly_necessary_cookies.php:82
172
- #: views/moove/admin/settings/third_party_cookies.php:106
173
  #: views/moove/admin/settings/privacy_overview.php:57
174
  msgid "Tab Content"
175
  msgstr ""
176
 
177
- #: views/moove/admin/settings/cookie_policy.php:102
178
- #: views/moove/admin/settings/advanced_cookies.php:181
179
- #: views/moove/admin/settings/strictly_necessary_cookies.php:126
180
- #: views/moove/admin/settings/third_party_cookies.php:181
181
- #: views/moove/admin/settings/privacy_overview.php:82
182
- #: views/moove/admin/settings/general_settings.php:263
183
- #: views/moove/admin/settings/banner_settings.php:147
184
- #: views/moove/admin/settings/floating_button.php:127
185
- msgid "Save changes"
186
  msgstr ""
187
 
188
- #: views/moove/admin/settings/advanced_cookies.php:87
189
- #: views/moove/admin/settings/third_party_cookies.php:86
190
- msgid "Enable by default"
191
  msgstr ""
192
 
193
- #: views/moove/admin/settings/advanced_cookies.php:90
194
- #: views/moove/admin/settings/third_party_cookies.php:89
195
- #: views/moove/admin/settings/general_settings.php:226
196
- #: views/moove/admin/settings/general_settings.php:229
197
- msgid "Disable"
198
  msgstr ""
199
 
200
- #: views/moove/admin/settings/advanced_cookies.php:92
201
- #: views/moove/admin/settings/third_party_cookies.php:91
202
- #: views/moove/admin/settings/banner_settings.php:126
203
- #: views/moove/admin/settings/floating_button.php:53
204
- #: views/moove/admin/settings/floating_button.php:56
205
- msgid "Enable"
206
  msgstr ""
207
 
208
- #: views/moove/admin/settings/advanced_cookies.php:130
209
- #: views/moove/admin/settings/third_party_cookies.php:129
210
  msgid "Please fill out at least one of these fields:"
211
  msgstr ""
212
 
213
- #: views/moove/admin/settings/advanced_cookies.php:136
214
- #: views/moove/admin/settings/third_party_cookies.php:135
215
  msgid ""
216
- "The below script will be added to the page HEAD section if user enables this "
217
- "cookie."
218
  msgstr ""
219
 
220
- #: views/moove/admin/settings/advanced_cookies.php:144
221
- #: views/moove/admin/settings/advanced_cookies.php:159
222
- #: views/moove/admin/settings/third_party_cookies.php:143
223
- #: views/moove/admin/settings/third_party_cookies.php:158
224
  msgid ""
225
  "For example, you can use it for Google Tag Manager script or any other 3rd "
226
  "party code snippets."
227
  msgstr ""
228
 
229
- #: views/moove/admin/settings/advanced_cookies.php:151
230
- #: views/moove/admin/settings/third_party_cookies.php:150
231
  msgid ""
232
- "The below script will be added right after the BODY section if user enables "
233
- "this cookie."
234
  msgstr ""
235
 
236
- #: views/moove/admin/settings/advanced_cookies.php:165
237
- #: views/moove/admin/settings/third_party_cookies.php:165
238
  msgid ""
239
- "The below script will be added to the page FOOTER section if user enables "
240
- "this cookie."
241
  msgstr ""
242
 
243
- #: views/moove/admin/settings/advanced_cookies.php:173
244
- #: views/moove/admin/settings/third_party_cookies.php:173
245
  msgid ""
246
  "For example, you can use it for Google Analytics script or any other 3rd "
247
  "party code snippets."
248
  msgstr ""
249
 
250
- #: views/moove/admin/settings/settings_page.php:2
251
- msgid "GDPR Cookie Compliance Plugin Settings"
252
  msgstr ""
253
 
254
- #: views/moove/admin/settings/settings_page.php:4
255
- msgid "Settings saved."
256
  msgstr ""
257
 
258
- #: views/moove/admin/settings/settings_page.php:6
259
- #: views/moove/admin/settings/settings_page.php:15
260
- msgid "Dismiss this notice."
261
- msgstr ""
262
-
263
- #: views/moove/admin/settings/settings_page.php:12
264
- msgid "You need to insert the relevant script for the settings to be saved!"
265
  msgstr ""
266
 
267
- #: views/moove/admin/settings/settings_page.php:19
268
  msgid ""
269
  "General Data Protection Regulation (GDPR) is a <a href=\"http://www.eugdpr."
270
  "org/\" target=\"_blank\">European regulation</a> to strengthen and unify the "
271
  "data protection of EU citizens."
272
  msgstr ""
273
 
274
- #: views/moove/admin/settings/settings_page.php:45
275
- msgid "General Settings"
276
- msgstr ""
277
-
278
- #: views/moove/admin/settings/settings_page.php:49
279
- msgid "Banner Settings"
280
- msgstr ""
281
-
282
- #: views/moove/admin/settings/settings_page.php:53
283
- #: views/moove/admin/settings/floating_button.php:42
284
- msgid "Floating Button"
285
- msgstr ""
286
-
287
- #: views/moove/admin/settings/strictly_necessary_cookies.php:60
288
- msgid "Choose functionality"
289
  msgstr ""
290
 
291
- #: views/moove/admin/settings/strictly_necessary_cookies.php:64
292
- msgid "Optional (user selects their preferences)"
 
293
  msgstr ""
294
 
295
- #: views/moove/admin/settings/strictly_necessary_cookies.php:66
296
- msgid "Always enabled (user cannot disable it but can see the content)"
297
  msgstr ""
298
 
299
- #: views/moove/admin/settings/strictly_necessary_cookies.php:68
300
- msgid "Always enabled and content hidden from user"
301
  msgstr ""
302
 
303
- #: views/moove/admin/settings/strictly_necessary_cookies.php:105
304
- msgid "Tab Warning Message"
 
 
305
  msgstr ""
306
 
307
- #: views/moove/admin/settings/strictly_necessary_cookies.php:118
308
- msgid "Will be displayed below the Checkbox in the front-end!"
309
  msgstr ""
310
 
311
- #: views/moove/admin/settings/general_settings.php:50
312
- msgid "Modal General Settings"
313
  msgstr ""
314
 
315
- #: views/moove/admin/settings/general_settings.php:58
316
- msgid "Brand Primary Colour"
317
  msgstr ""
318
 
319
- #: views/moove/admin/settings/general_settings.php:64
320
- #: views/moove/admin/settings/general_settings.php:77
321
- #: views/moove/admin/settings/floating_button.php:88
322
- #: views/moove/admin/settings/floating_button.php:101
323
- #: views/moove/admin/settings/floating_button.php:114
324
- msgid "Select"
325
  msgstr ""
326
 
327
- #: views/moove/admin/settings/general_settings.php:71
328
- msgid "Brand Secondary Colour"
329
  msgstr ""
330
 
331
- #: views/moove/admin/settings/general_settings.php:84
332
- msgid "Modal Logo"
333
  msgstr ""
334
 
335
- #: views/moove/admin/settings/general_settings.php:85
336
- msgid "Recommended size:"
337
  msgstr ""
338
 
339
- #: views/moove/admin/settings/general_settings.php:85
340
- msgid "pixels"
 
 
341
  msgstr ""
342
 
343
- #: views/moove/admin/settings/general_settings.php:132
344
- msgid "Logo Position"
345
  msgstr ""
346
 
347
- #: views/moove/admin/settings/general_settings.php:135
348
- msgid "Left"
 
 
 
349
  msgstr ""
350
 
351
- #: views/moove/admin/settings/general_settings.php:138
352
- msgid "Center"
353
  msgstr ""
354
 
355
- #: views/moove/admin/settings/general_settings.php:141
356
- msgid "Right"
357
  msgstr ""
358
 
359
- #: views/moove/admin/settings/general_settings.php:149
360
  msgid "Choose your layout"
361
  msgstr ""
362
 
363
- #: views/moove/admin/settings/general_settings.php:152
364
  msgid "Tabs layout"
365
  msgstr ""
366
 
367
- #: views/moove/admin/settings/general_settings.php:155
368
  msgid "One page layout"
369
  msgstr ""
370
 
371
- #: views/moove/admin/settings/general_settings.php:164
372
- msgid "Choose font"
373
- msgstr ""
374
-
375
- #: views/moove/admin/settings/general_settings.php:167
376
- msgid "Default"
377
- msgstr ""
378
-
379
- #: views/moove/admin/settings/general_settings.php:171
380
- msgid "Inherit font-family from your WordPress theme"
381
- msgstr ""
382
-
383
- #: views/moove/admin/settings/general_settings.php:175
384
- msgid "Specify custom font"
385
- msgstr ""
386
-
387
- #: views/moove/admin/settings/general_settings.php:193
388
  msgid "Save Settings - Button Label"
389
  msgstr ""
390
 
391
- #: views/moove/admin/settings/general_settings.php:196
392
  msgid "Save Changes"
393
  msgstr ""
394
 
395
- #: views/moove/admin/settings/general_settings.php:202
396
  msgid "Enable All - Button Label"
397
  msgstr ""
398
 
399
- #: views/moove/admin/settings/general_settings.php:211
400
  msgid "Checkbox Labels"
401
  msgstr ""
402
 
403
- #: views/moove/admin/settings/general_settings.php:222
404
- msgid "Disable \"Powered by GDPR\""
405
- msgstr ""
406
-
407
- #: views/moove/admin/settings/general_settings.php:236
408
- msgid "Powered by Label"
409
- msgstr ""
410
-
411
- #: views/moove/admin/settings/general_settings.php:246
412
- msgid "Strictly necessary required message."
413
  msgstr ""
414
 
415
- #: views/moove/admin/settings/general_settings.php:250
416
- msgid ""
417
- "This warning message will be displayed if the Strictly necessary cookies are "
418
- "not enabled and the user try to enable the \"Third Party\" or \"Additional "
419
- "cookies\""
420
  msgstr ""
421
 
422
- #: views/moove/admin/settings/banner_settings.php:43
423
  msgid "Cookie Banner Settings"
424
  msgstr ""
425
 
426
- #: views/moove/admin/settings/banner_settings.php:50
427
  msgid "Cookie Banner Content"
428
  msgstr ""
429
 
430
- #: views/moove/admin/settings/banner_settings.php:59
431
  msgid ""
432
  "<p>We are using cookies to give you the best experience on our website.</p>"
433
  "<p>You can find out more about which cookies we are using or switch them off "
434
  "in [setting]settings[/setting].</p>"
435
  msgstr ""
436
 
437
- #: views/moove/admin/settings/banner_settings.php:71
438
  msgid ""
439
- "You can use the following shortcut to link the settings modal:<br><span>"
440
- "<strong>[setting]</strong>settings<strong>[/setting]</strong></span>"
441
  msgstr ""
442
 
443
- #: views/moove/admin/settings/banner_settings.php:77
444
  msgid "Accept - Button Label"
445
  msgstr ""
446
 
447
- #: views/moove/admin/settings/banner_settings.php:88
448
- msgid "Select your preference for Cookie Banner"
449
- msgstr ""
450
-
451
- #: views/moove/admin/settings/banner_settings.php:92
452
- msgid "Visible"
453
  msgstr ""
454
 
455
- #: views/moove/admin/settings/banner_settings.php:95
456
- msgid "Hidden"
457
  msgstr ""
458
 
459
- #: views/moove/admin/settings/banner_settings.php:105
460
  msgid "Cookie Banner position"
461
  msgstr ""
462
 
463
- #: views/moove/admin/settings/banner_settings.php:109
464
  msgid "Top"
465
  msgstr ""
466
 
467
- #: views/moove/admin/settings/banner_settings.php:112
468
  msgid "Bottom"
469
  msgstr ""
470
 
471
- #: views/moove/admin/settings/banner_settings.php:122
472
  msgid "Colour scheme"
473
  msgstr ""
474
 
475
- #: views/moove/admin/settings/banner_settings.php:128
476
  msgid "Dark"
477
  msgstr ""
478
 
479
- #: views/moove/admin/settings/banner_settings.php:131
480
  msgid "Light"
481
  msgstr ""
482
 
483
- #: views/moove/admin/settings/floating_button.php:49
484
- msgid "Enable Floating Button"
485
- msgstr ""
486
-
487
  #: views/moove/admin/settings/floating_button.php:63
488
  msgid "Button - Hover Label"
489
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2019-02-19 12:16+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: \n"
9
  "Language-Team: \n"
18
  msgid "Change cookie settings"
19
  msgstr ""
20
 
21
+ #: moove-modules.php:66 moove-modules.php:173 moove-modules.php:349
22
+ #: views/moove/admin/settings/settings_page.php:67
23
  #: views/moove/admin/settings/privacy_overview.php:37
24
  msgid "Privacy Overview"
25
  msgstr ""
26
 
27
  #: moove-modules.php:116
28
+ msgid ""
29
+ "This website uses cookies to provide you with the best browsing experience."
30
  msgstr ""
31
 
32
  #: moove-modules.php:117
33
+ msgid "Find out more or adjust your [setting]settings[/setting]."
 
 
34
  msgstr ""
35
 
36
+ #: moove-modules.php:133 views/moove/admin/settings/banner_settings.php:124
37
  msgid "Accept"
38
  msgstr ""
39
 
40
+ #: moove-modules.php:194 moove-modules.php:353
41
+ #: views/moove/admin/settings/settings_page.php:76
42
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:55
43
  msgid "Strictly Necessary Cookies"
44
  msgstr ""
45
 
46
+ #: moove-modules.php:207 moove-modules.php:236 moove-modules.php:264
47
+ #: views/moove/admin/settings/advanced_cookies.php:103
48
+ #: views/moove/admin/settings/third_party_cookies.php:105
49
+ #: views/moove/admin/settings/general_settings.php:104
50
+ #: views/moove/admin/settings/banner_settings.php:137
51
+ #: views/moove/admin/settings/floating_button.php:55
52
  msgid "Enabled"
53
  msgstr ""
54
 
55
+ #: moove-modules.php:208 moove-modules.php:237 moove-modules.php:265
56
+ #: views/moove/admin/settings/advanced_cookies.php:103
57
+ #: views/moove/admin/settings/third_party_cookies.php:105
58
+ #: views/moove/admin/settings/general_settings.php:105
59
+ #: views/moove/admin/settings/banner_settings.php:137
60
+ #: views/moove/admin/settings/floating_button.php:55
61
  msgid "Disabled"
62
  msgstr ""
63
 
64
+ #: moove-modules.php:252 moove-modules.php:309 moove-modules.php:357
65
+ #: views/moove/admin/settings/settings_page.php:83
66
+ #: views/moove/admin/settings/third_party_cookies.php:72
67
  msgid "3rd Party Cookies"
68
  msgstr ""
69
 
70
+ #: moove-modules.php:330 views/moove/admin/settings/general_settings.php:95
71
  msgid "Enable All"
72
  msgstr ""
73
 
74
+ #: moove-modules.php:331
75
  msgid "Save Settings"
76
  msgstr ""
77
 
78
+ #: moove-modules.php:361 views/moove/admin/settings/advanced_cookies.php:72
79
+ #: views/moove/admin/settings/settings_page.php:90
80
  msgid "Additional Cookies"
81
  msgstr ""
82
 
83
+ #: moove-modules.php:365 views/moove/admin/settings/cookie_policy.php:46
84
+ #: views/moove/admin/settings/settings_page.php:96
85
  msgid "Cookie Policy"
86
  msgstr ""
87
 
89
  msgid "Settings"
90
  msgstr ""
91
 
92
+ #: moove-functions.php:25
93
+ msgid "Support"
94
+ msgstr ""
95
+
96
+ #: moove-functions.php:28
97
+ msgid "Premium Upgrade"
98
+ msgstr ""
99
+
100
+ #: moove-actions.php:201
101
  msgid "plugin"
102
  msgstr ""
103
 
104
  #: moove-content.php:34
105
  msgid ""
106
+ "This website uses cookies so that we can provide you with the best user "
107
  "experience possible. Cookie information is stored in your browser and "
108
  "performs functions such as recognising you when you return to our website "
109
  "and helping our team to understand which sections of the website you find "
110
+ "most interesting and useful."
 
111
  msgstr ""
112
 
113
  #: moove-content.php:44
114
  msgid ""
115
+ "Strictly Necessary Cookie should be enabled at all times so that we can save "
116
+ "your preferences for cookie settings."
117
  msgstr ""
118
 
119
  #: moove-content.php:60
125
 
126
  #: moove-content.php:71
127
  msgid ""
128
+ "This website uses the following additional cookies:</p><p>(List the cookies "
129
+ "that you are using on the website here.)"
130
  msgstr ""
131
 
132
  #: moove-content.php:81
133
  msgid ""
134
+ "This website uses Google Analytics to collect anonymous information such as "
135
+ "the number of visitors to the site, and the most popular pages."
136
+ msgstr ""
137
+
138
+ #: moove-content.php:82
139
+ msgid "Keeping this cookie enabled helps us to improve our website."
140
  msgstr ""
141
 
142
+ #: moove-content.php:95
143
+ #, php-format
144
  msgid ""
145
+ "More information about our <a href=\"%s\" target=\"_blank\">Cookie Policy</a>"
146
+ msgstr ""
147
+
148
+ #: moove-content.php:105
149
+ msgid "Sorry,<br /> the content is blocked!"
150
  msgstr ""
151
 
152
+ #: moove-content.php:106
153
+ msgid "To unlock, please enable the cookies!"
154
+ msgstr ""
155
+
156
+ #: moove-content.php:108
157
+ msgid "[accept]Accept[/accept] [setting]Adjust your settings[/setting]"
158
+ msgstr ""
159
+
160
+ #: moove-content.php:130
161
  msgid ""
162
  "Please enable Strictly Necessary Cookies first so that we can save your "
163
  "preferences!"
169
  msgid "disable"
170
  msgstr ""
171
 
172
+ #: views/moove/admin/settings/branding.php:43
173
+ #: views/moove/admin/settings/settings_page.php:51
174
+ msgid "Branding"
175
+ msgstr ""
176
+
177
+ #: views/moove/admin/settings/branding.php:51
178
+ msgid "Brand Primary Colour"
179
+ msgstr ""
180
+
181
+ #: views/moove/admin/settings/branding.php:57
182
+ #: views/moove/admin/settings/branding.php:70
183
+ #: views/moove/admin/settings/floating_button.php:88
184
+ #: views/moove/admin/settings/floating_button.php:101
185
+ #: views/moove/admin/settings/floating_button.php:114
186
+ msgid "Select"
187
+ msgstr ""
188
+
189
+ #: views/moove/admin/settings/branding.php:64
190
+ msgid "Brand Secondary Colour"
191
+ msgstr ""
192
+
193
+ #: views/moove/admin/settings/branding.php:77
194
+ msgid "Cookie Settings Logo"
195
+ msgstr ""
196
+
197
+ #: views/moove/admin/settings/branding.php:78
198
+ msgid "Recommended size:"
199
+ msgstr ""
200
+
201
+ #: views/moove/admin/settings/branding.php:78
202
+ msgid "pixels"
203
+ msgstr ""
204
+
205
+ #: views/moove/admin/settings/branding.php:125
206
+ msgid "Logo Position"
207
+ msgstr ""
208
+
209
+ #: views/moove/admin/settings/branding.php:128
210
+ msgid "Left"
211
+ msgstr ""
212
+
213
+ #: views/moove/admin/settings/branding.php:131
214
+ msgid "Center"
215
+ msgstr ""
216
+
217
+ #: views/moove/admin/settings/branding.php:134
218
+ msgid "Right"
219
+ msgstr ""
220
+
221
+ #: views/moove/admin/settings/branding.php:142
222
+ msgid "Choose font"
223
+ msgstr ""
224
+
225
+ #: views/moove/admin/settings/branding.php:145
226
+ msgid "Default"
227
+ msgstr ""
228
+
229
+ #: views/moove/admin/settings/branding.php:149
230
+ msgid "Inherit font-family from your WordPress theme"
231
+ msgstr ""
232
+
233
+ #: views/moove/admin/settings/branding.php:153
234
+ msgid "Specify custom font"
235
+ msgstr ""
236
+
237
+ #: views/moove/admin/settings/branding.php:170
238
+ msgid "CDN Base URL"
239
+ msgstr ""
240
+
241
+ #: views/moove/admin/settings/branding.php:174
242
+ msgid ""
243
+ "Optional, leave it empty to use default domain</strong><br /> Enter your CDN "
244
+ "root URL to enable CDN for GDPR Lity library files. The URL can be http, "
245
+ "https or protocol-relative"
246
+ msgstr ""
247
+
248
+ #: views/moove/admin/settings/branding.php:187
249
+ #: views/moove/admin/settings/cookie_policy.php:106
250
+ #: views/moove/admin/settings/advanced_cookies.php:227
251
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:154
252
+ #: views/moove/admin/settings/third_party_cookies.php:228
253
+ #: views/moove/admin/settings/privacy_overview.php:82
254
+ #: views/moove/admin/settings/general_settings.php:134
255
+ #: views/moove/admin/settings/banner_settings.php:191
256
+ #: views/moove/admin/settings/floating_button.php:127
257
+ msgid "Save changes"
258
+ msgstr ""
259
+
260
+ #: views/moove/admin/settings/cookie-banner-manager.php:1
261
+ msgid "Hide Cookie Banner on Selected Posts / Pages"
262
+ msgstr ""
263
+
264
  #: views/moove/admin/settings/cookie_policy.php:56
265
+ #: views/moove/admin/settings/advanced_cookies.php:82
266
+ #: views/moove/admin/settings/third_party_cookies.php:82
267
+ #: views/moove/admin/settings/banner_settings.php:80
268
  msgid "Turn"
269
  msgstr ""
270
 
271
+ #: views/moove/admin/settings/cookie_policy.php:63
272
+ #: views/moove/admin/settings/advanced_cookies.php:88
273
+ #: views/moove/admin/settings/third_party_cookies.php:88
274
+ #: views/moove/admin/settings/banner_settings.php:86
275
  msgid "On"
276
  msgstr ""
277
 
278
+ #: views/moove/admin/settings/cookie_policy.php:63
279
+ #: views/moove/admin/settings/advanced_cookies.php:88
280
+ #: views/moove/admin/settings/third_party_cookies.php:88
281
+ #: views/moove/admin/settings/banner_settings.php:86
282
  msgid "Off"
283
  msgstr ""
284
 
285
+ #: views/moove/admin/settings/cookie_policy.php:70
286
+ #: views/moove/admin/settings/advanced_cookies.php:111
287
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:78
288
+ #: views/moove/admin/settings/third_party_cookies.php:112
289
  #: views/moove/admin/settings/privacy_overview.php:48
290
  msgid "Tab Title"
291
  msgstr ""
292
 
293
+ #: views/moove/admin/settings/cookie_policy.php:79
294
+ #: views/moove/admin/settings/advanced_cookies.php:120
295
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:87
296
+ #: views/moove/admin/settings/third_party_cookies.php:121
297
  #: views/moove/admin/settings/privacy_overview.php:57
298
  msgid "Tab Content"
299
  msgstr ""
300
 
301
+ #: views/moove/admin/settings/geo-location.php:1
302
+ msgid "Geo Location Setup"
 
 
 
 
 
 
 
303
  msgstr ""
304
 
305
+ #: views/moove/admin/settings/advanced_cookies.php:95
306
+ #: views/moove/admin/settings/third_party_cookies.php:95
307
+ msgid "Default status"
308
  msgstr ""
309
 
310
+ #: views/moove/admin/settings/advanced_cookies.php:96
311
+ #: views/moove/admin/settings/third_party_cookies.php:96
312
+ msgid "by default cookies should be"
 
 
313
  msgstr ""
314
 
315
+ #: views/moove/admin/settings/advanced_cookies.php:145
316
+ #: views/moove/admin/settings/third_party_cookies.php:146
317
+ msgid ""
318
+ "Paste your codes and snippets below. They will be added to all pages if user "
319
+ "enables these cookies."
 
320
  msgstr ""
321
 
322
+ #: views/moove/admin/settings/advanced_cookies.php:146
323
+ #: views/moove/admin/settings/third_party_cookies.php:147
324
  msgid "Please fill out at least one of these fields:"
325
  msgstr ""
326
 
327
+ #: views/moove/admin/settings/advanced_cookies.php:165
328
+ #: views/moove/admin/settings/third_party_cookies.php:166
329
  msgid ""
330
+ "Add scripts that you would like to be inserted to the HEAD section of your "
331
+ "pages when user accepts these cookies"
332
  msgstr ""
333
 
334
+ #: views/moove/admin/settings/advanced_cookies.php:175
335
+ #: views/moove/admin/settings/advanced_cookies.php:194
336
+ #: views/moove/admin/settings/third_party_cookies.php:176
337
+ #: views/moove/admin/settings/third_party_cookies.php:195
338
  msgid ""
339
  "For example, you can use it for Google Tag Manager script or any other 3rd "
340
  "party code snippets."
341
  msgstr ""
342
 
343
+ #: views/moove/admin/settings/advanced_cookies.php:184
344
+ #: views/moove/admin/settings/third_party_cookies.php:185
345
  msgid ""
346
+ "Add scripts that you would like to be inserted to the BODY section of your "
347
+ "pages when user accepts these cookies"
348
  msgstr ""
349
 
350
+ #: views/moove/admin/settings/advanced_cookies.php:203
351
+ #: views/moove/admin/settings/third_party_cookies.php:204
352
  msgid ""
353
+ "Add scripts that you would like to be inserted to the FOOTER section of your "
354
+ "pages when user accepts these cookies"
355
  msgstr ""
356
 
357
+ #: views/moove/admin/settings/advanced_cookies.php:213
358
+ #: views/moove/admin/settings/third_party_cookies.php:214
359
  msgid ""
360
  "For example, you can use it for Google Analytics script or any other 3rd "
361
  "party code snippets."
362
  msgstr ""
363
 
364
+ #: views/moove/admin/settings/full-screen-mode.php:1
365
+ msgid "Full-Screen Mode Setup"
366
  msgstr ""
367
 
368
+ #: views/moove/admin/settings/stats.php:1
369
+ msgid "GDPR Analytics"
370
  msgstr ""
371
 
372
+ #: views/moove/admin/settings/settings_page.php:2
373
+ msgid "GDPR Cookie Compliance Plugin"
 
 
 
 
 
374
  msgstr ""
375
 
376
+ #: views/moove/admin/settings/settings_page.php:3
377
  msgid ""
378
  "General Data Protection Regulation (GDPR) is a <a href=\"http://www.eugdpr."
379
  "org/\" target=\"_blank\">European regulation</a> to strengthen and unify the "
380
  "data protection of EU citizens."
381
  msgstr ""
382
 
383
+ #: views/moove/admin/settings/settings_page.php:10
384
+ msgid "Settings saved."
 
 
 
 
 
 
 
 
 
 
 
 
 
385
  msgstr ""
386
 
387
+ #: views/moove/admin/settings/settings_page.php:12
388
+ #: views/moove/admin/settings/settings_page.php:21
389
+ msgid "Dismiss this notice."
390
  msgstr ""
391
 
392
+ #: views/moove/admin/settings/settings_page.php:18
393
+ msgid "You need to insert the relevant script for the settings to be saved!"
394
  msgstr ""
395
 
396
+ #: views/moove/admin/settings/settings_page.php:55
397
+ msgid "Banner Settings"
398
  msgstr ""
399
 
400
+ #: views/moove/admin/settings/settings_page.php:59
401
+ #: views/moove/admin/settings/floating_button.php:42
402
+ #: views/moove/admin/settings/floating_button.php:49
403
+ msgid "Floating Button"
404
  msgstr ""
405
 
406
+ #: views/moove/admin/settings/settings_page.php:63
407
+ msgid "General Settings"
408
  msgstr ""
409
 
410
+ #: views/moove/admin/settings/settings_page.php:103
411
+ msgid "Help"
412
  msgstr ""
413
 
414
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:65
415
+ msgid "Choose functionality"
416
  msgstr ""
417
 
418
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:69
419
+ msgid "Optional (user selects their preferences)"
 
 
 
 
420
  msgstr ""
421
 
422
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:71
423
+ msgid "Always enabled (user cannot disable it but can see the content)"
424
  msgstr ""
425
 
426
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:73
427
+ msgid "Always enabled and content hidden from user"
428
  msgstr ""
429
 
430
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:110
431
+ msgid "Tab Warning Message"
432
  msgstr ""
433
 
434
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:123
435
+ msgid ""
436
+ "This warning message will be displayed when user disables the Strictly "
437
+ "Necessary Cookies."
438
  msgstr ""
439
 
440
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:129
441
+ msgid "Strictly necessary required message."
442
  msgstr ""
443
 
444
+ #: views/moove/admin/settings/strictly_necessary_cookies.php:144
445
+ msgid ""
446
+ "This warning message will be displayed if the Strictly necessary cookies are "
447
+ "not enabled and the user try to enable the \"Third Party\" or \"Additional "
448
+ "cookies\""
449
  msgstr ""
450
 
451
+ #: views/moove/admin/settings/iframe-blocker.php:1
452
+ msgid "Iframe Blocker"
453
  msgstr ""
454
 
455
+ #: views/moove/admin/settings/general_settings.php:61
456
+ msgid "Cookie Settings Screen - General Setup"
457
  msgstr ""
458
 
459
+ #: views/moove/admin/settings/general_settings.php:68
460
  msgid "Choose your layout"
461
  msgstr ""
462
 
463
+ #: views/moove/admin/settings/general_settings.php:71
464
  msgid "Tabs layout"
465
  msgstr ""
466
 
467
+ #: views/moove/admin/settings/general_settings.php:74
468
  msgid "One page layout"
469
  msgstr ""
470
 
471
+ #: views/moove/admin/settings/general_settings.php:83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
472
  msgid "Save Settings - Button Label"
473
  msgstr ""
474
 
475
+ #: views/moove/admin/settings/general_settings.php:86
476
  msgid "Save Changes"
477
  msgstr ""
478
 
479
+ #: views/moove/admin/settings/general_settings.php:92
480
  msgid "Enable All - Button Label"
481
  msgstr ""
482
 
483
+ #: views/moove/admin/settings/general_settings.php:101
484
  msgid "Checkbox Labels"
485
  msgstr ""
486
 
487
+ #: views/moove/admin/settings/general_settings.php:112
488
+ msgid "Powered by GDPR"
 
 
 
 
 
 
 
 
489
  msgstr ""
490
 
491
+ #: views/moove/admin/settings/accept-on-scroll.php:1
492
+ msgid "Accept Cookies on Scroll"
 
 
 
493
  msgstr ""
494
 
495
+ #: views/moove/admin/settings/banner_settings.php:73
496
  msgid "Cookie Banner Settings"
497
  msgstr ""
498
 
499
+ #: views/moove/admin/settings/banner_settings.php:94
500
  msgid "Cookie Banner Content"
501
  msgstr ""
502
 
503
+ #: views/moove/admin/settings/banner_settings.php:103
504
  msgid ""
505
  "<p>We are using cookies to give you the best experience on our website.</p>"
506
  "<p>You can find out more about which cookies we are using or switch them off "
507
  "in [setting]settings[/setting].</p>"
508
  msgstr ""
509
 
510
+ #: views/moove/admin/settings/banner_settings.php:115
511
  msgid ""
512
+ "You can use the following shortcut to link the Cookie Settings Screen:<br>"
513
+ "<span><strong>[setting]</strong>settings<strong>[/setting]</strong></span>"
514
  msgstr ""
515
 
516
+ #: views/moove/admin/settings/banner_settings.php:121
517
  msgid "Accept - Button Label"
518
  msgstr ""
519
 
520
+ #: views/moove/admin/settings/banner_settings.php:147
521
+ msgid "Reject - Button Label"
 
 
 
 
522
  msgstr ""
523
 
524
+ #: views/moove/admin/settings/banner_settings.php:150
525
+ msgid "Reject"
526
  msgstr ""
527
 
528
+ #: views/moove/admin/settings/banner_settings.php:156
529
  msgid "Cookie Banner position"
530
  msgstr ""
531
 
532
+ #: views/moove/admin/settings/banner_settings.php:160
533
  msgid "Top"
534
  msgstr ""
535
 
536
+ #: views/moove/admin/settings/banner_settings.php:163
537
  msgid "Bottom"
538
  msgstr ""
539
 
540
+ #: views/moove/admin/settings/banner_settings.php:173
541
  msgid "Colour scheme"
542
  msgstr ""
543
 
544
+ #: views/moove/admin/settings/banner_settings.php:178
545
  msgid "Dark"
546
  msgstr ""
547
 
548
+ #: views/moove/admin/settings/banner_settings.php:178
549
  msgid "Light"
550
  msgstr ""
551
 
 
 
 
 
552
  #: views/moove/admin/settings/floating_button.php:63
553
  msgid "Button - Hover Label"
554
  msgstr ""
moove-actions.php CHANGED
@@ -33,8 +33,27 @@ class Moove_GDPR_Actions {
33
  add_action( 'gdpr_settings_tab_nav_extensions', array( &$this,'gdpr_settings_tab_nav_extensions' ), 5, 1 );
34
  add_action( 'gdpr_check_extensions', array( &$this, 'gdpr_check_extensions' ), 10, 1 );
35
  add_action( 'gdpr_premium_section_ads', array( &$this, 'gdpr_premium_section_ads' ) );
 
 
 
 
36
  add_action( 'gdpr_cdn_url', array( &$this, 'gdpr_cdn_base_url' ), 10, 1 );
 
37
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  public function gdpr_cdn_base_url( $plugin_url ) {
39
  $gdpr_default_content = new Moove_GDPR_Content();
40
  $option_name = $gdpr_default_content->moove_gdpr_get_option_name();
@@ -50,18 +69,19 @@ class Moove_GDPR_Actions {
50
  }
51
 
52
  public function gdpr_premium_section_ads() {
53
- ?>
54
- <div class="gdpr-locked-section">
55
- <span>
56
- <i class="dashicons dashicons-lock"></i>
57
- <h4>This feature is part of our Premium Add-on</h4>
58
- <a href="https://www.mooveagency.com/wordpress-plugins/gdpr-cookie-compliance/?checkout=8431&amp;license=single" target="_blank" class="plugin-buy-now-btn">Buy Now for £29</a>
59
- </span>
60
-
61
- </div>
62
- <!-- .gdpr-locked-section -->
63
-
64
- <?php
 
65
  }
66
 
67
  public function gdpr_check_extensions( $content ) {
@@ -80,7 +100,7 @@ class Moove_GDPR_Actions {
80
  */
81
  public function moove_register_scripts() {
82
  if ( is_admin() ) :
83
- // add_action( 'admin_enqueue_scripts', array( &$this, 'moove_gdpr_admin_scripts' ) );
84
  else :
85
  add_action( 'wp_enqueue_scripts', array( &$this, 'moove_frontend_gdpr_scripts' ), 999 );
86
  endif;
@@ -103,6 +123,7 @@ class Moove_GDPR_Actions {
103
  'post_id' => get_the_ID(),
104
  'plugin_dir' => apply_filters( 'gdpr_cdn_url', plugins_url( basename( dirname( __FILE__ ) ) ) ),
105
  'is_page' => is_page(),
 
106
  'enabled_default' => array(
107
  'third_party' => isset( $modal_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) && intval( $modal_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? intval( $modal_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) : 0,
108
  'advanced' => isset( $modal_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) && intval( $modal_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) ? intval( $modal_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) : 0,
@@ -209,6 +230,14 @@ class Moove_GDPR_Actions {
209
  <?php _e('Geo Location','gdpr-cookie-compliance-addon'); ?>
210
  </a>
211
 
 
 
 
 
 
 
 
 
212
  <?php
213
  echo apply_filters('gdpr_check_extensions',ob_get_clean());
214
  }
33
  add_action( 'gdpr_settings_tab_nav_extensions', array( &$this,'gdpr_settings_tab_nav_extensions' ), 5, 1 );
34
  add_action( 'gdpr_check_extensions', array( &$this, 'gdpr_check_extensions' ), 10, 1 );
35
  add_action( 'gdpr_premium_section_ads', array( &$this, 'gdpr_premium_section_ads' ) );
36
+
37
+ add_action( 'gdpr_tab_cbm_ph', array( &$this, 'gdpr_premium_section_ads' ) );
38
+ add_action( 'gdpr_tab_cbm_ps', array( &$this, 'gdpr_premium_section_ads' ) );
39
+
40
  add_action( 'gdpr_cdn_url', array( &$this, 'gdpr_cdn_base_url' ), 10, 1 );
41
+ add_action( 'gdpr_info_bar_button_extensions', array( &$this, 'gdpr_info_add_reject_button_extensions' ) );
42
  }
43
+
44
+ public function gdpr_info_add_reject_button_extensions() {
45
+ $gdpr_default_content = new Moove_GDPR_Content();
46
+ $option_name = $gdpr_default_content->moove_gdpr_get_option_name();
47
+ $modal_options = get_option( $option_name );
48
+ $wpml_lang = $gdpr_default_content->moove_gdpr_get_wpml_lang();
49
+ if ( isset( $modal_options['moove_gdpr_reject_button_enable'] ) && intval( $modal_options['moove_gdpr_reject_button_enable'] ) === 1 ) :
50
+ $button_label = isset( $modal_options['moove_gdpr_infobar_reject_button_label'.$wpml_lang] ) && $modal_options['moove_gdpr_infobar_reject_button_label'.$wpml_lang] ? $modal_options['moove_gdpr_infobar_reject_button_label'.$wpml_lang] : __('Reject','gdpr-cookie-compliance-addon');
51
+ ?>
52
+ <button class="mgbutton moove-gdpr-infobar-reject-btn" rel="nofollow"><?php echo $button_label; ?></button>
53
+ <?php
54
+ endif;
55
+ }
56
+
57
  public function gdpr_cdn_base_url( $plugin_url ) {
58
  $gdpr_default_content = new Moove_GDPR_Content();
59
  $option_name = $gdpr_default_content->moove_gdpr_get_option_name();
69
  }
70
 
71
  public function gdpr_premium_section_ads() {
72
+ if ( ! class_exists('Moove_GDPR_Addon_Controller') ) :
73
+ ?>
74
+ <div class="gdpr-locked-section">
75
+ <span>
76
+ <i class="dashicons dashicons-lock"></i>
77
+ <h4>This feature is part of our Premium Add-on</h4>
78
+ <a href="https://www.mooveagency.com/wordpress-plugins/gdpr-cookie-compliance/?checkout=8431&amp;license=single" target="_blank" class="plugin-buy-now-btn">Buy Now for £29</a>
79
+ </span>
80
+
81
+ </div>
82
+ <!-- .gdpr-locked-section -->
83
+ <?php
84
+ endif;
85
  }
86
 
87
  public function gdpr_check_extensions( $content ) {
100
  */
101
  public function moove_register_scripts() {
102
  if ( is_admin() ) :
103
+ add_action( 'admin_enqueue_scripts', array( &$this, 'moove_gdpr_admin_scripts' ) );
104
  else :
105
  add_action( 'wp_enqueue_scripts', array( &$this, 'moove_frontend_gdpr_scripts' ), 999 );
106
  endif;
123
  'post_id' => get_the_ID(),
124
  'plugin_dir' => apply_filters( 'gdpr_cdn_url', plugins_url( basename( dirname( __FILE__ ) ) ) ),
125
  'is_page' => is_page(),
126
+ 'strict_init' => isset( $modal_options['moove_gdpr_strictly_necessary_cookies_functionality'] ) && intval( $modal_options['moove_gdpr_strictly_necessary_cookies_functionality'] ) ? intval( $modal_options['moove_gdpr_strictly_necessary_cookies_functionality'] ) : 1,
127
  'enabled_default' => array(
128
  'third_party' => isset( $modal_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) && intval( $modal_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? intval( $modal_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) : 0,
129
  'advanced' => isset( $modal_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) && intval( $modal_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) ? intval( $modal_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) : 0,
230
  <?php _e('Geo Location','gdpr-cookie-compliance-addon'); ?>
231
  </a>
232
 
233
+ <a href="?page=moove-gdpr&amp;tab=cookie-banner-manager" class="gdpr-cc-addon nav-tab gdpr-cc-disabled <?php echo $active_tab == 'cookie-banner-manager' ? 'nav-tab-active' : ''; ?>">
234
+ <?php _e('Hide Cookie Banner','gdpr-cookie-compliance-addon'); ?>
235
+ </a>
236
+
237
+ <a href="?page=moove-gdpr&amp;tab=iframe-blocker" class="gdpr-cc-addon nav-tab gdpr-cc-disabled <?php echo $active_tab == 'iframe-blocker' ? 'nav-tab-active' : ''; ?>">
238
+ <?php _e('Iframe Blocker','gdpr-cookie-compliance-addon'); ?>
239
+ </a>
240
+
241
  <?php
242
  echo apply_filters('gdpr_check_extensions',ob_get_clean());
243
  }
moove-content.php CHANGED
@@ -31,7 +31,7 @@ class Moove_GDPR_Content {
31
  * @return string Filtered Content
32
  */
33
  public function moove_gdpr_get_privacy_overview_content() {
34
- $_content = __( '<p>This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.</p><p>You can adjust all of your cookie settings by navigating the tabs on the left hand side.</p>','gdpr-cookie-compliance' );
35
  return $_content;
36
  }
37
 
@@ -41,7 +41,7 @@ class Moove_GDPR_Content {
41
  * @return string Filtered Content
42
  */
43
  public function moove_gdpr_get_strict_necessary_content() {
44
- $_content = __( '<p>Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.</p>','gdpr-cookie-compliance' );
45
  return $_content;
46
  }
47
 
@@ -68,7 +68,7 @@ class Moove_GDPR_Content {
68
  * @return string Filtered Content
69
  */
70
  public function moove_gdpr_get_advanced_cookies_content() {
71
- $_content = __( '<p>This website uses the following additional cookies:</p><p>(List the cookies that you are using on the website here.)</p>','gdpr-cookie-compliance' );
72
  return $_content;
73
  }
74
 
@@ -78,7 +78,8 @@ class Moove_GDPR_Content {
78
  * @return string Filtered Content
79
  */
80
  public function moove_gdpr_get_third_party_content() {
81
- $_content = __( '<p>This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.</p><p>Keeping this cookie enabled helps us to improve our website.</p>','gdpr-cookie-compliance' );
 
82
  return $_content;
83
  }
84
 
@@ -91,10 +92,25 @@ class Moove_GDPR_Content {
91
  $privacy_policy_page = get_option( 'wp_page_for_privacy_policy' );
92
  $privacy_policy_link = $privacy_policy_page ? esc_url( get_permalink( $privacy_policy_page ) ) : false;
93
  $privacy_policy_link = $privacy_policy_link ? $privacy_policy_link : '#';
94
- $_content = sprintf( __( '<p>More information about our <a href="%s" target="_blank">Cookie Policy</a></p>', 'gdpr-cookie-compliance' ), $privacy_policy_link );
95
  return $_content;
96
  }
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  /**
99
  * Get option name
100
  */
31
  * @return string Filtered Content
32
  */
33
  public function moove_gdpr_get_privacy_overview_content() {
34
+ $_content = '<p>' . __( 'This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.','gdpr-cookie-compliance' ) . '</p>';
35
  return $_content;
36
  }
37
 
41
  * @return string Filtered Content
42
  */
43
  public function moove_gdpr_get_strict_necessary_content() {
44
+ $_content = '<p>' . __( 'Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.','gdpr-cookie-compliance' ) . '</p>';
45
  return $_content;
46
  }
47
 
68
  * @return string Filtered Content
69
  */
70
  public function moove_gdpr_get_advanced_cookies_content() {
71
+ $_content = '<p>' . __( 'This website uses the following additional cookies:</p><p>(List the cookies that you are using on the website here.)','gdpr-cookie-compliance' ) . '</p>';
72
  return $_content;
73
  }
74
 
78
  * @return string Filtered Content
79
  */
80
  public function moove_gdpr_get_third_party_content() {
81
+ $_content = '<p>' . __( 'This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.','gdpr-cookie-compliance');
82
+ $_content .= '<p>' . __('Keeping this cookie enabled helps us to improve our website.','gdpr-cookie-compliance' ) . '</p>';
83
  return $_content;
84
  }
85
 
92
  $privacy_policy_page = get_option( 'wp_page_for_privacy_policy' );
93
  $privacy_policy_link = $privacy_policy_page ? esc_url( get_permalink( $privacy_policy_page ) ) : false;
94
  $privacy_policy_link = $privacy_policy_link ? $privacy_policy_link : '#';
95
+ $_content = '<p>' . sprintf( __( 'More information about our <a href="%s" target="_blank">Cookie Policy</a>', 'gdpr-cookie-compliance' ), $privacy_policy_link ) . '</p>';
96
  return $_content;
97
  }
98
 
99
+ /**
100
+ * Cookie Policy Tab Content
101
+ *
102
+ * @return string Filtered Content
103
+ */
104
+ public function moove_gdpr_ifb_content() {
105
+ $_content = '<h2>' . __( 'Sorry,<br /> the content is blocked!','gdpr-cookie-compliance');
106
+ $_content .= '<p>' . __('To unlock, please enable the cookies!','gdpr-cookie-compliance');
107
+ $_content .= '<br><br>';
108
+ $_content .= __('[accept]Accept[/accept] [setting]Adjust your settings[/setting]','gdpr-cookie-compliance' );
109
+ return $_content;
110
+ }
111
+
112
+
113
+
114
  /**
115
  * Get option name
116
  */
moove-functions.php CHANGED
@@ -19,9 +19,15 @@ function moove_gdpr_plugin_settings_link( $links, $file ) {
19
  /*
20
  * Insert the settings page link at the beginning
21
  */
22
- $in = '<a href="options-general.php?page=moove-gdpr">' . __( 'Settings','gdpr-cookie-compliance' ) . '</a>';
23
  array_unshift( $links, $in );
24
 
 
 
 
 
 
 
25
  }
26
  return $links;
27
  }
19
  /*
20
  * Insert the settings page link at the beginning
21
  */
22
+ $in = '<a href="?page=moove-gdpr">' . __( 'Settings','gdpr-cookie-compliance' ) . '</a>';
23
  array_unshift( $links, $in );
24
 
25
+ $in = '<a href="https://wordpress.org/support/plugin/gdpr-cookie-compliance/" target="_blank">' . __( 'Support','gdpr-cookie-compliance' ) . '</a>';
26
+ array_push( $links, $in );
27
+
28
+ $in = '<a href="https://www.mooveagency.com/wordpress-plugins/gdpr-cookie-compliance/" target="_blank">' . __( 'Premium Upgrade','gdpr-cookie-compliance' ) . '</a>';
29
+ array_push( $links, $in );
30
+
31
  }
32
  return $links;
33
  }
moove-gdpr.php CHANGED
@@ -6,7 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
6
  * Plugin Name: GDPR Cookie Compliance
7
  * Plugin URI: https://wordpress.org/plugins/gdpr-cookie-compliance/
8
  * Description: GDPR is an EU wide legislation that specifies how user data should be handled. This plugin has settings that can assist you with GDPR cookie compliance requirements.
9
- * Version: 1.4.0
10
  * Author: Moove Agency
11
  * Domain Path: /languages
12
  * Author URI: https://www.mooveagency.com
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
14
  * Text Domain: gdpr-cookie-compliance
15
  */
16
 
17
- define( 'MOOVE_GDPR_VERSION', '1.4.0' );
18
 
19
  register_activation_hook( __FILE__ , 'moove_gdpr_activate' );
20
  register_deactivation_hook( __FILE__ , 'moove_gdpr_deactivate' );
6
  * Plugin Name: GDPR Cookie Compliance
7
  * Plugin URI: https://wordpress.org/plugins/gdpr-cookie-compliance/
8
  * Description: GDPR is an EU wide legislation that specifies how user data should be handled. This plugin has settings that can assist you with GDPR cookie compliance requirements.
9
+ * Version: 2.0.0
10
  * Author: Moove Agency
11
  * Domain Path: /languages
12
  * Author URI: https://www.mooveagency.com
14
  * Text Domain: gdpr-cookie-compliance
15
  */
16
 
17
+ define( 'MOOVE_GDPR_VERSION', '2.0.0' );
18
 
19
  register_activation_hook( __FILE__ , 'moove_gdpr_activate' );
20
  register_deactivation_hook( __FILE__ , 'moove_gdpr_deactivate' );
moove-modules.php CHANGED
@@ -113,8 +113,8 @@ class GDPR_Modules {
113
  $modal_options = $this->gdpr_options;
114
  $wpml_lang = $this->wpml_lang;
115
 
116
- $_content = '<p>'.__('We are using cookies to give you the best experience on our website.','gdpr-cookie-compliance').'</p>'.
117
- '<p>'.__('You can find out more about which cookies we are using or switch them off in [setting]settings[/setting].','gdpr-cookie-compliance').'</p>';
118
  $content = isset( $modal_options['moove_gdpr_info_bar_content'.$wpml_lang] ) && $modal_options['moove_gdpr_info_bar_content'.$wpml_lang] ? $modal_options['moove_gdpr_info_bar_content'.$wpml_lang] : $_content;
119
  $content = str_replace('[setting]', '<span data-href="#moove_gdpr_cookie_modal" class="change-settings-button">', $content);
120
  $content = str_replace('[/setting]', '</span>', $content);
@@ -236,6 +236,7 @@ class GDPR_Modules {
236
  $data->text_enable = isset( $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ? $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] : __('Enabled','gdpr-cookie-compliance');
237
  $data->text_disable = isset( $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] ? $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] : __('Disabled','gdpr-cookie-compliance');
238
  $data->warning_message = isset( $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ? $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] : $gdpr_default_content->moove_gdpr_get_secondary_notice();
 
239
  $data->visibility = $layout === 'v1' ? 'style="display:none"' : '';
240
 
241
  return $view_controller->load( 'modal.content-sections.advanced', $data );
@@ -263,6 +264,7 @@ class GDPR_Modules {
263
  $data->text_enable = isset( $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ? $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] : __('Enabled','gdpr-cookie-compliance');
264
  $data->text_disable = isset( $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] ? $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] : __('Disabled','gdpr-cookie-compliance');
265
  $data->warning_message = isset( $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ? $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] : $gdpr_default_content->moove_gdpr_get_secondary_notice();
 
266
  $data->visibility = $layout === 'v1' ? 'style="display:none"' : '';
267
 
268
  return $view_controller->load( 'modal.content-sections.third_party', $data );
113
  $modal_options = $this->gdpr_options;
114
  $wpml_lang = $this->wpml_lang;
115
 
116
+ $_content = '<p>'.__('This website uses cookies to provide you with the best browsing experience.','gdpr-cookie-compliance').'</p>'.
117
+ '<p>'.__('Find out more or adjust your [setting]settings[/setting].','gdpr-cookie-compliance').'</p>';
118
  $content = isset( $modal_options['moove_gdpr_info_bar_content'.$wpml_lang] ) && $modal_options['moove_gdpr_info_bar_content'.$wpml_lang] ? $modal_options['moove_gdpr_info_bar_content'.$wpml_lang] : $_content;
119
  $content = str_replace('[setting]', '<span data-href="#moove_gdpr_cookie_modal" class="change-settings-button">', $content);
120
  $content = str_replace('[/setting]', '</span>', $content);
236
  $data->text_enable = isset( $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ? $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] : __('Enabled','gdpr-cookie-compliance');
237
  $data->text_disable = isset( $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] ? $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] : __('Disabled','gdpr-cookie-compliance');
238
  $data->warning_message = isset( $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ? $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] : $gdpr_default_content->moove_gdpr_get_secondary_notice();
239
+ $data->warning_message = wpautop( $data->warning_message );
240
  $data->visibility = $layout === 'v1' ? 'style="display:none"' : '';
241
 
242
  return $view_controller->load( 'modal.content-sections.advanced', $data );
264
  $data->text_enable = isset( $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ? $modal_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] : __('Enabled','gdpr-cookie-compliance');
265
  $data->text_disable = isset( $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] ? $modal_options['moove_gdpr_modal_disabled_checkbox_label'.$wpml_lang] : __('Disabled','gdpr-cookie-compliance');
266
  $data->warning_message = isset( $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ) && $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ? $modal_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] : $gdpr_default_content->moove_gdpr_get_secondary_notice();
267
+ $data->warning_message = wpautop( $data->warning_message );
268
  $data->visibility = $layout === 'v1' ? 'style="display:none"' : '';
269
 
270
  return $view_controller->load( 'modal.content-sections.third_party', $data );
moove-options.php CHANGED
@@ -36,12 +36,14 @@ class Moove_GDPR_Options {
36
  * @return void
37
  */
38
  public function moove_gdpr_admin_menu() {
39
- $gdpr_settings_page = add_options_page(
40
- 'GDPR Cookie',
41
- 'GDPR Cookie',
42
- 'manage_options',
43
- 'moove-gdpr',
44
- array( &$this, 'moove_gdpr_settings_page' )
 
 
45
  );
46
  add_action( 'load-' . $gdpr_settings_page, array( 'Moove_GDPR_Actions', 'moove_gdpr_admin_scripts' ) );
47
  }
36
  * @return void
37
  */
38
  public function moove_gdpr_admin_menu() {
39
+ $gdpr_settings_page = add_menu_page(
40
+ 'GDPR Cookie', // Page_title.
41
+ 'GDPR Cookie Compliance', // Menu_title.
42
+ 'manage_options', // Capability.
43
+ 'moove-gdpr', // Menu_slug.
44
+ array( &$this, 'moove_gdpr_settings_page' ), // Function.
45
+ 'dashicons-shield',
46
+ 105 // Position.
47
  );
48
  add_action( 'load-' . $gdpr_settings_page, array( 'Moove_GDPR_Actions', 'moove_gdpr_admin_scripts' ) );
49
  }
readme.txt CHANGED
@@ -2,50 +2,47 @@
2
  Contributors: MooveAgency
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LCYMMR4EQ2YVW
4
  Stable tag: trunk
5
- Tags: gdpr, compliance, cookies, eu, regulations, european union
6
  Requires at least: 4.5
7
- Tested up to: 5.0
8
- Requires PHP: 5.6
9
  License: GPLv2
10
 
11
- GDPR is an EU wide legislation that specifies how user data should be handled. This plugin has settings that can assist you with GDPR cookie compliance requirements.
12
-
13
  == Description ==
14
 
15
- ### What is GDPR?
16
-
17
- General Data Protection Regulation (GDPR) is a European regulation to strengthen and unify the data protection of EU citizens. ([https://www.eugdpr.org/](https://www.eugdpr.org/))
18
-
19
- ### How this plugin works
20
-
21
- * This plugin is designed to help you prepare your website for the GDPR regulations related to cookies but IT WILL NOT MAKE IT FULLY COMPLIANT - this plugin is just a template and needs to be setup by your developer in order to work properly.
22
- * Once installed, the plugin gives you a template that you can customise; you can modify all text and colours to suit your needs.
23
- * You can also allow users to enable and disable cookies on your site, however, this will require bespoke development work as every site is unique and uses different cookies.
24
 
25
  ### Key features
26
 
27
- * Full customisation - upload your brand colours, logo, fonts and modify all text
28
- * Customizable cookie message
29
- * Link to Privacy Policy page
30
- * CDN Base URL supported
31
- * Option to refuse functional cookies
32
- * Select the position of the cookie message box
33
- * Animate the message box after cookie is accepted
34
- * Set the text and bar background colors
35
- * WPML and Polylang compatible
36
  * Flexible - decide which scripts will be loaded by default or only when the user gives consent
37
  * SEO friendly
38
- * WordPress Privacy Policy page synchronization
39
- * Two layouts - choose from two unique layouts
40
- * Simple & Intuitive
41
- * **[Premium]** Full-screen layout - If it's enabled, the Cookie Banner will be display in full screen mode, and force the user to accept the cookies, or to change / overview the settings.
42
- * **[Premium]** Export & import settings
43
- * **[Premium]** WordPress Multisite extension - You can manage the settings globally, clone from one site to another
44
- * **[Premium]** Option to accept cookies on scroll
45
- * **[Premium]** Consent Analytics
46
- * **[Premium]** Geo Location option to display the cookie banner for EU visitors only
47
-
48
- > Note: some features are part of the **Premium Add-on**. You can [get GDPR Premium Add-on here](https://www.mooveagency.com/wordpress-plugins/)!
 
 
 
 
 
 
 
 
 
 
49
 
50
  ### Demo Video
51
 
@@ -53,29 +50,56 @@ You can view a demo of the plugin here:
53
 
54
  [vimeo https://vimeo.com/255655268]
55
 
56
- [GDPR Cookie Compliance Plugin by Moove Agency](https://vimeo.com/255655268)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  ### Custom Layout
59
 
60
- * You can also create your own custom front-end layout of the Pop-up Settings screen.
61
  * Simply copy the "gdpr-modules" folder from the plugin directory to your theme directory.
62
- * If you do this, your changes will be retained even if you update the plugin in the future.
63
  * Any customisation should be implemented by experienced developers only.
64
- * We won't be able to provide personalised advice or support for customisations.
 
 
 
 
65
 
66
  #### Disclaimer
67
 
68
- * This plugin will require technical support from your developer to ensure that it is implemented correctly on your website.
69
- * This is a general plugin with basic functionality. We advise that you to seek independent legal advice on this topic.
70
  * THIS PLUGIN DOES NOT MAKE YOUR WEBSITE COMPLIANT. YOU ARE RESPONSIBLE FOR ENSURING THAT ALL GDPR REQUIREMENTS ARE MET ON YOUR WEBSITE.
71
 
 
72
  == Frequently Asked Questions ==
73
 
 
 
 
74
  = How do I setup your plugin? =
75
- You can setup the plugin in the WordPress CMS -> Settings -> GDPR Cookie. In the general settings, you can setup the branding, and other elements. To add Google Analytics, you can enable the “3rd Party Cookies” tab but selecting the “Turn” radio value to “ON”. At the bottom of the “3rd Party Cookies” tab you’ll find 3 sections to add scripts - choose the section that is appropriate for your script. For Google Analytics, we recommend using the 'Footer' section.
76
 
77
- = How can I link to the pop-up settings screen? =
78
- You can use the following link to display the modal window:
79
 
80
  [Relative Path - RECOMMENDED]
81
  /#gdpr_cookie_modal
@@ -86,13 +110,16 @@ https://www.example.com/your-internal-page/#gdpr_cookie_modal
86
 
87
 
88
  = Pasted code is not visible when view-source page is viewed. =
89
- Our plugin loads the script with Javascript, and that’s why you can’t find it in the view-source page. You can use the developer console in Chrome browser (Inspect Element feature) and find the scripts.
 
90
 
91
  = Can I use custom code or hooks with your plugin? =
92
- Yes. We have implemented hooks that allow you to implement custom scripts, for some examples see the list of pre-defined hooks here: [https://wordpress.org/support/topic/gdpr-cookie-compliance-hooks-code-snippets/](https://wordpress.org/support/topic/gdpr-cookie-compliance-hooks-code-snippets/)
 
93
 
94
  = Does the plugin support subdomains? =
95
- Unfortunately not, subdomains are treated as separate domains by browsers and we’re unable to change the cookies stored by another domain. If your multisite setup use subdomain version, each subsite will be recognised as a separate domain by the browser and will create cookies for each subdomain.
 
96
 
97
  = Does this plugin block all cookies? =
98
  No. This plugin only restricts cookies for scripts that you have setup in the Settings. If you want to block all cookies, you have to add all scripts that use cookies into the Settings of this plugin.
@@ -101,20 +128,22 @@ No. This plugin only restricts cookies for scripts that you have setup in the Se
101
  Yes. Once you setup the plugin, you should delete the scripts you uploaded to the plugin from your website’s code to ensure that your scripts are not loaded twice.
102
 
103
  = Does this plugin stop all cookies from being stored? =
104
- This plugin is just a template and needs to be setup by your developer in order to work properly. Once setup fully, it will prevent scripts that store cookies from being loaded on users computers until consent is given.
105
 
106
  = Does this plugin guarantee that I will comply with GDPR law?=
107
- Unfortunately no. This plugin is just a template and needs to be setup by your developer in order to work properly.
 
108
 
109
  == Installation ==
110
 
111
  1. Upload the plugin files to the plugins directory, or install the plugin through the WordPress plugins screen directly.
112
- 2. Activate the plugin through the \'Plugins\' screen in WordPress.
113
- 3. Settings are available in the "GDPR Cookie" menu under Settings.
114
- 4. Use the Settings screen to configure the plugin.
115
- 5. You can link directly to the Cookie Settings on your website using the following: /#gdpr_cookie_modal
116
- 6. WPML is supported, switch the language in your CMS and translate the text
117
- 7. You can also find list of all pre-defined hooks here: https://wordpress.org/support/topic/conditional-php-script/
 
118
 
119
  == Screenshots ==
120
 
@@ -125,22 +154,40 @@ Unfortunately no. This plugin is just a template and needs to be setup by your d
125
  5. GDPR Cookie Compliance - Front-end - Cookie Policy
126
  6. GDPR Cookie Compliance - Front-end - One Page Layout
127
  7. GDPR Cookie Compliance - Front-end - Cookie Banner
128
- 8. GDPR Cookie Compliance - Premium Add-on - Front-end - Full-Screen Mode [Premium]
129
- 9. GDPR Cookie Compliance - Admin - General Settings
130
  10. GDPR Cookie Compliance - Admin - Banner Settings
131
  11. GDPR Cookie Compliance - Admin - Floating Button
132
- 12. GDPR Cookie Compliance - Admin - Privacy Overview
133
- 13. GDPR Cookie Compliance - Admin - Strictly Necessary Cookies
134
- 14. GDPR Cookie Compliance - Admin - 3rd Party Cookies
135
- 15. GDPR Cookie Compliance - Admin - Additional Cookies
136
- 16. GDPR Cookie Compliance - Admin - Cookie Policy
137
- 17. GDPR Cookie Compliance - Premium Add-on - Admin - Export/Import Settings [Premium]
138
- 18. GDPR Cookie Compliance - Premium Add-on - Admin - Multisite Settings [Premium]
139
- 19. GDPR Cookie Compliance - Premium Add-on - Admin - Full-Screen Mode Settings [Premium]
140
- 20. GDPR Cookie Compliance - Premium Add-on - Admin - Consent Analytics [Premium]
 
 
 
 
 
 
 
 
 
 
141
 
142
  == Changelog ==
143
 
 
 
 
 
 
 
 
 
144
  = 1.4.0 =
145
  * Added CDN Base URL support to load Lity from CDN
146
  * Support added to use the Privacy page from Options
@@ -226,7 +273,7 @@ Unfortunately no. This plugin is just a template and needs to be setup by your d
226
 
227
  = 1.1.3. =
228
  * Significant improvement to the plugin settings and content upload workflow
229
- * Info bar features were extended
230
  * Improved cookie removal function
231
  * Bugfixes
232
 
@@ -286,7 +333,7 @@ Unfortunately no. This plugin is just a template and needs to be setup by your d
286
  = 1.0.3. =
287
  * Extended scripts sections with fields to add "<head>" and to "<body>"
288
  * Editable label for "Powered by" text
289
- * Added radio buttons to change the logo position (left, center, right)
290
  * Colour pickers added to customise the floating button
291
  * Fixed Cookie Banner WYSIWYG editor, links are allowed
292
 
2
  Contributors: MooveAgency
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LCYMMR4EQ2YVW
4
  Stable tag: trunk
5
+ Tags: gdpr, compliance, cookie, cookies, eu, regulations, european union, consent, data, law, notice, notification, privacy
6
  Requires at least: 4.5
7
+ Tested up to: 5.1
8
+ Requires PHP: 5.6 or higher
9
  License: GPLv2
10
 
 
 
11
  == Description ==
12
 
13
+ This plugin has settings that can assist you with GDPR cookie consent compliance requirements.
 
 
 
 
 
 
 
 
14
 
15
  ### Key features
16
 
17
+ * Give your users full control over cookies stored on their computer, including the ability for users to revoke their consent
18
+ * Simple, beautiful & intuitive user interface
19
+ * Choose from two unique layouts
20
+ * Fully customisable - upload your own logo, colours, fonts
21
+ * Fully editable - you can change all text
22
+ * Set the position of the Cookie Banner: at the top or bottom of your pages
 
 
 
23
  * Flexible - decide which scripts will be loaded by default or only when the user gives consent
24
  * SEO friendly
25
+ * WPML and Polylang compatible, .pot file for translations included
26
+ * Includes link to Privacy Policy page
27
+ * CDN Base URL supported
28
+ * Sleek animations to enhance user experience
29
+ * Easy to use JavaScript interface
30
+
31
+
32
+ ### Premium features available
33
+
34
+ * **Full-screen layout** - If it's enabled, the Cookie Banner will be display in full screen mode, and force the user to either accept the cookies, or to change / overview the settings.
35
+ * **Export & import settings**
36
+ * **WordPress Multisite extension** - You can manage GDPR settings globally, and clone them from one site to another
37
+ * **Accept on Scroll** - Allow users to accept cookies by scrolling down the page
38
+ * **Analytics** - Stats and charts showing you how many users accepted your cookies (all anonymous)
39
+ * **Geo-location** - If enabled, Cookie Banner will be displayed for EU visitors only
40
+ * **Shortcodes** that can be added to your ‘Privacy & Cookie Policy’ and allow users to manage their consent with ease
41
+ * **Hide Cookie Banner** allows you to hide the Cookie Notice Banner on selected pages
42
+ * **iFrame Blocker** that allows you to block users from viewing 3rd party resources (such as video) until they accept cookies
43
+
44
+ [Buy GDPR Premium Add-on here](https://www.mooveagency.com/wordpress-plugins/gdpr-cookie-compliance/)
45
+
46
 
47
  ### Demo Video
48
 
50
 
51
  [vimeo https://vimeo.com/255655268]
52
 
53
+
54
+ ### Live Examples
55
+
56
+ * You can choose to setup our GDPR plugin in any way that you like.
57
+ * We have created the plugin with as much flexibility as possible as organisations interpret the Cookie Consent Policy differently.
58
+ * A few examples of how you can setup our plugin in various ways are below:
59
+
60
+ **OPTION A**
61
+ No cookies are stored on users' computers (not even the Cookie that is required to power our own plugin = we call it Strictly Necessary Cookies) until the user accepts Cookies.
62
+ [Example 1](https://www.mooveagency.com/wordpress-plugins/gdpr-cookie-compliance/)
63
+
64
+ **OPTION B**
65
+ You can setup our plugin so that Cookies are accepted by default but the user has the option to turn them off.
66
+ [Example 2](https://www.teneo.net/uk/)
67
+ [Example 3](https://www.nacro.org.uk/)
68
+
69
+ **OPTION C**
70
+ You can display the Cookie Consent Banner at the top of the page.
71
+ You can also setup the plugin so that cookies are accepted once user scrolls down the page.
72
+ [Example 4](https://www.mrisoftware.com/uk/)
73
+
74
+ There are many other variations organisations choose to set the plugin up, our plugin is very flexible.
75
 
76
  ### Custom Layout
77
 
78
+ * You can also create your own custom front-end layout of the Cookie Settings Screen.
79
  * Simply copy the "gdpr-modules" folder from the plugin directory to your theme directory.
80
+ * If you do this, your changes will be retained even if you update the plugin in future.
81
  * Any customisation should be implemented by experienced developers only.
82
+
83
+
84
+ ### Personalised installation & setup
85
+ * Contact us if you'd like a personalised advice, installation or support for bespoke customisations on plugins@mooveagency.com (please note that this is a paid service).
86
+ * For general support, please use the [Support Forum](https://wordpress.org/support/plugin/gdpr-cookie-compliance/).
87
 
88
  #### Disclaimer
89
 
 
 
90
  * THIS PLUGIN DOES NOT MAKE YOUR WEBSITE COMPLIANT. YOU ARE RESPONSIBLE FOR ENSURING THAT ALL GDPR REQUIREMENTS ARE MET ON YOUR WEBSITE.
91
 
92
+
93
  == Frequently Asked Questions ==
94
 
95
+ = What is GDPR? =
96
+ General Data Protection Regulation (GDPR) is a European regulation to strengthen and unify the data protection of EU citizens. ([https://www.eugdpr.org/](https://www.eugdpr.org/))
97
+
98
  = How do I setup your plugin? =
99
+ * You can setup the plugin in the WordPress CMS main menu (on the left-hand side) -> GDPR Cookie Compliance.
100
 
101
+ = How can I link to the Cookie Settings Screen? =
102
+ You can use the following link to display the Cookie Settings Screen window:
103
 
104
  [Relative Path - RECOMMENDED]
105
  /#gdpr_cookie_modal
110
 
111
 
112
  = Pasted code is not visible when view-source page is viewed. =
113
+ * Our plugin loads the script with Javascript, and that’s why you can’t find it in the view-source page.
114
+ * You can use the developer console in Chrome browser (Inspect Element feature) and find the scripts.
115
 
116
  = Can I use custom code or hooks with your plugin? =
117
+ * Yes. We have implemented hooks that allow you to implement custom scripts.
118
+ * You can also find list of all pre-defined hooks here: https://wordpress.org/support/topic/conditional-php-script/
119
 
120
  = Does the plugin support subdomains? =
121
+ * Unfortunately not, subdomains are treated as separate domains by browsers and the plugin is unable to alter cookies stored by another domain.
122
+ * If your multisite setup uses subdomain version, each subsite will be recognised as a separate domain by browsers and will create separate cookies for each subdomain.
123
 
124
  = Does this plugin block all cookies? =
125
  No. This plugin only restricts cookies for scripts that you have setup in the Settings. If you want to block all cookies, you have to add all scripts that use cookies into the Settings of this plugin.
128
  Yes. Once you setup the plugin, you should delete the scripts you uploaded to the plugin from your website’s code to ensure that your scripts are not loaded twice.
129
 
130
  = Does this plugin stop all cookies from being stored? =
131
+ This plugin is just a template and needs to be setup by a developer in order to work properly. Once setup fully, it will prevent scripts that store cookies from being loaded on users computers until consent is given.
132
 
133
  = Does this plugin guarantee that I will comply with GDPR law?=
134
+ This plugin is just a template and needs to be setup by a developer in order to work properly.
135
+ THIS PLUGIN DOES NOT MAKE YOUR WEBSITE COMPLIANT. YOU ARE RESPONSIBLE FOR ENSURING THAT ALL GDPR REQUIREMENTS ARE MET ON YOUR WEBSITE.
136
 
137
  == Installation ==
138
 
139
  1. Upload the plugin files to the plugins directory, or install the plugin through the WordPress plugins screen directly.
140
+ 2. Activate the plugin on the \'Plugins\' screen in WordPress.
141
+ 3. You can adjust all settings in the "GDPR Cookie Compliance" main menu link.
142
+ 4. You can link directly to the Cookie Settings Screen on your website using the following: /#gdpr_cookie_modal
143
+ 5. WPML is supported: once you switch the language in your CMS, you can translate all text
144
+ 6. You can find list of all pre-defined hooks here: https://wordpress.org/support/topic/conditional-php-script/
145
+ 7. You can buy the [Premium Add-on with additional features here](https://www.mooveagency.com/wordpress-plugins/gdpr-cookie-compliance/)
146
+
147
 
148
  == Screenshots ==
149
 
154
  5. GDPR Cookie Compliance - Front-end - Cookie Policy
155
  6. GDPR Cookie Compliance - Front-end - One Page Layout
156
  7. GDPR Cookie Compliance - Front-end - Cookie Banner
157
+ 8. GDPR Cookie Compliance - Front-end - Full-Screen Mode [Premium]
158
+ 9. GDPR Cookie Compliance - Admin - Branding
159
  10. GDPR Cookie Compliance - Admin - Banner Settings
160
  11. GDPR Cookie Compliance - Admin - Floating Button
161
+ 12. GDPR Cookie Compliance - Admin - General Settings
162
+ 13. GDPR Cookie Compliance - Admin - Privacy Overview
163
+ 14. GDPR Cookie Compliance - Admin - Strictly Necessary Cookies
164
+ 15. GDPR Cookie Compliance - Admin - 3rd Party Cookies
165
+ 16. GDPR Cookie Compliance - Admin - Additional Cookies
166
+ 17. GDPR Cookie Compliance - Admin - Cookie Policy
167
+ 18. GDPR Cookie Compliance - Admin - Help - FAQ
168
+ 19. GDPR Cookie Compliance - Admin - Help - Hooks & Filters
169
+ 20. GDPR Cookie Compliance - Admin - Help - Premium Hooks [Premium]
170
+ 21. GDPR Cookie Compliance - Admin - Help - Premium Shortcodes [Premium]
171
+ 22. GDPR Cookie Compliance - Admin - Export/Import Settings [Premium]
172
+ 23. GDPR Cookie Compliance - Admin - Multisite Settings [Premium]
173
+ 24. GDPR Cookie Compliance - Admin - Accept Cookies on Scroll [Premium]
174
+ 25. GDPR Cookie Compliance - Admin - Full-Screen Mode Settings [Premium]
175
+ 26. GDPR Cookie Compliance - Admin - Analytics [Premium]
176
+ 27. GDPR Cookie Compliance - Admin - Analytics with Stats [Premium]
177
+ 28. GDPR Cookie Compliance - Admin - Geo Location [Premium]
178
+ 29. GDPR Cookie Compliance - Admin - Hide Cookie Banner on Selected Posts / Pages [Premium]
179
+ 30. GDPR Cookie Compliance - Admin - Iframe Blocker / Pages [Premium]
180
 
181
  == Changelog ==
182
 
183
+ = 2.0.0 =
184
+ * Significant improvements to the plugin settings and content upload workflow
185
+ * Added CodeMirror library for easier Javascript editing
186
+ * Added Help section to the settings that lists useful shortcodes and hooks
187
+
188
+ = 1.4.1 =
189
+ * Fixed show cookie banner function
190
+
191
  = 1.4.0 =
192
  * Added CDN Base URL support to load Lity from CDN
193
  * Support added to use the Privacy page from Options
273
 
274
  = 1.1.3. =
275
  * Significant improvement to the plugin settings and content upload workflow
276
+ * Cookie bar features were extended
277
  * Improved cookie removal function
278
  * Bugfixes
279
 
333
  = 1.0.3. =
334
  * Extended scripts sections with fields to add "<head>" and to "<body>"
335
  * Editable label for "Powered by" text
336
+ * Added radio buttons to change the logo position (left, centre, right)
337
  * Colour pickers added to customise the floating button
338
  * Fixed Cookie Banner WYSIWYG editor, links are allowed
339
 
views/moove/admin/settings/advanced_cookies.php CHANGED
@@ -11,7 +11,7 @@
11
  die( 'Security check' );
12
  else :
13
  if ( is_array( $_POST ) ) :
14
- if ( isset( $_POST['moove_gdpr_advanced_cookies_enable'] ) && intval( $_POST['moove_gdpr_advanced_cookies_enable'] ) === 1 ) :
15
  $value = 1;
16
  else :
17
  $value = 0;
@@ -21,6 +21,11 @@
21
  $empty_scripts = true;
22
  endif;
23
  endif;
 
 
 
 
 
24
  if ( ! $empty_scripts ) :
25
  $gdpr_options['moove_gdpr_advanced_cookies_enable'] = $value;
26
  update_option( $option_name, $gdpr_options );
@@ -37,7 +42,7 @@
37
  update_option( $option_name, $gdpr_options );
38
  $gdpr_options = get_option( $option_name );
39
 
40
- elseif ( $form_key !== 'moove_gdpr_advanced_cookies_enable' ) :
41
  $value = sanitize_text_field( wp_unslash( $form_value ) );
42
  $gdpr_options[$form_key] = $value;
43
  update_option( $option_name, $gdpr_options );
@@ -77,19 +82,27 @@
77
  <label for="moove_gdpr_advanced_cookies_enable"><?php _e('Turn','gdpr-cookie-compliance'); ?></label>
78
  </th>
79
  <td>
80
- <input name="moove_gdpr_advanced_cookies_enable" type="radio" value="1" id="moove_gdpr_advanced_cookies_enable_on" <?php echo isset( $gdpr_options['moove_gdpr_advanced_cookies_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_advanced_cookies_enable'] ) === 1 ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_advanced_cookies_enable_on"><?php _e('On','gdpr-cookie-compliance'); ?></label> <span class="separator"></span>
81
- <input name="moove_gdpr_advanced_cookies_enable" type="radio" value="0" id="moove_gdpr_advanced_cookies_enable_off" <?php echo isset( $gdpr_options['moove_gdpr_advanced_cookies_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_advanced_cookies_enable'] ) === 0 ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_advanced_cookies_enable_off"><?php _e('Off','gdpr-cookie-compliance'); ?></label>
 
 
 
82
  </td>
83
  </tr>
84
 
85
  <tr>
86
  <th scope="row">
87
- <label for="moove_gdpr_advanced_cookies_enable_first_visit"><?php _e('Enable by default','gdpr-cookie-compliance'); ?></label>
 
 
88
  </th>
89
- <td>
90
- <input name="moove_gdpr_advanced_cookies_enable_first_visit" type="radio" value="0" id="moove_gdpr_advanced_cookies_enable_first_visit_off" <?php echo isset( $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) ? ( ( intval( $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) === 0 || intval( $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) > 1 ) ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_advanced_cookies_enable_first_visit_off"><?php _e('Disable','gdpr-cookie-compliance'); ?></label> <span class="separator"></span>
91
-
92
- <input name="moove_gdpr_advanced_cookies_enable_first_visit" type="radio" value="1" id="moove_gdpr_advanced_cookies_enable_first_visit_on" <?php echo isset( $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) ? ( intval( $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) === 1 ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_advanced_cookies_enable_first_visit_on"><?php _e('Enable','gdpr-cookie-compliance'); ?></label>
 
 
 
93
  </td>
94
  </tr>
95
 
@@ -124,59 +137,120 @@
124
  ?>
125
  </th>
126
  </tr>
 
 
127
 
128
- <tr>
129
- <th scope="row" colspan="2" style="padding-bottom: 0;">
130
- <div class="alert script-error" style="display: none;"><?php _e('Please fill out at least one of these fields:','gdpr-cookie-compliance'); ?></div>
131
- </th>
132
- </tr>
133
-
134
- <tr>
135
- <th scope="row" colspan="2" style="padding-bottom: 0;">
136
- <label for="moove_gdpr_advanced_cookies_header_scripts"><?php _e('The below script will be added to the page HEAD section if user enables this cookie.','gdpr-cookie-compliance'); ?></label>
137
- </th>
138
- </tr>
139
- <tr class="moove_gdpr_advanced_cookies_header_scripts">
140
- <th scope="row" colspan="2">
141
- <?php $content = isset( $gdpr_options['moove_gdpr_advanced_cookies_header_scripts'] ) && $gdpr_options['moove_gdpr_advanced_cookies_header_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_advanced_cookies_header_scripts'] ) : '';
142
- ?>
143
- <textarea name="moove_gdpr_advanced_cookies_header_scripts" id="moove_gdpr_advanced_cookies_header_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
144
- <p class="description" id="moove_gdpr_advanced_cookies_header_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
145
- </th>
146
- </tr>
 
147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
 
149
- <tr>
150
- <th scope="row" colspan="2" style="padding-bottom: 0;">
151
- <label for="moove_gdpr_advanced_cookies_body_scripts"><?php _e('The below script will be added right after the BODY section if user enables this cookie.','gdpr-cookie-compliance'); ?></label>
152
- </th>
153
- </tr>
154
- <tr class="moove_gdpr_advanced_cookies_body_scripts">
155
- <th scope="row" colspan="2">
156
- <?php $content = isset( $gdpr_options['moove_gdpr_advanced_cookies_body_scripts'] ) && $gdpr_options['moove_gdpr_advanced_cookies_body_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_advanced_cookies_body_scripts'] ) : '';
157
- ?>
158
- <textarea name="moove_gdpr_advanced_cookies_body_scripts" id="moove_gdpr_advanced_cookies_body_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
159
- <p class="description" id="moove_gdpr_advanced_cookies_body_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
160
- </th>
161
- </tr>
 
 
 
 
 
162
 
163
- <tr>
164
- <th scope="row" colspan="2" style="padding-bottom: 0;">
165
- <label for="moove_gdpr_advanced_cookies_footer_scripts"><?php _e('The below script will be added to the page FOOTER section if user enables this cookie.','gdpr-cookie-compliance'); ?></label>
166
- </th>
167
- </tr>
168
- <tr class="moove_gdpr_advanced_cookies_footer_scripts">
169
- <th scope="row" colspan="2">
170
- <?php $content = isset( $gdpr_options['moove_gdpr_advanced_cookies_footer_scripts'] ) && $gdpr_options['moove_gdpr_advanced_cookies_footer_scripts'] ? wp_unslash( $gdpr_options['moove_gdpr_advanced_cookies_footer_scripts'] ) : '';
171
- ?>
172
- <textarea name="moove_gdpr_advanced_cookies_footer_scripts" id="moove_gdpr_advanced_cookies_footer_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
173
- <p class="description" id="moove_gdpr_advanced_cookies_footer_scripts-description"><?php _e('For example, you can use it for Google Analytics script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
174
- </th>
175
- </tr>
176
- </tbody>
177
- </table>
 
 
 
 
 
 
 
178
 
179
  <hr />
180
  <br />
181
  <button type="submit" class="button button-primary"><?php _e('Save changes','gdpr-cookie-compliance'); ?></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  </form>
11
  die( 'Security check' );
12
  else :
13
  if ( is_array( $_POST ) ) :
14
+ if ( isset( $_POST['moove_gdpr_advanced_cookies_enable'] ) ) :
15
  $value = 1;
16
  else :
17
  $value = 0;
21
  $empty_scripts = true;
22
  endif;
23
  endif;
24
+
25
+ $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] = 0;
26
+ if ( isset( $_POST['moove_gdpr_advanced_cookies_enable_first_visit'] ) ) :
27
+ $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] = 1;
28
+ endif;
29
  if ( ! $empty_scripts ) :
30
  $gdpr_options['moove_gdpr_advanced_cookies_enable'] = $value;
31
  update_option( $option_name, $gdpr_options );
42
  update_option( $option_name, $gdpr_options );
43
  $gdpr_options = get_option( $option_name );
44
 
45
+ elseif ( $form_key !== 'moove_gdpr_advanced_cookies_enable' && $form_key !== 'moove_gdpr_advanced_cookies_enable_first_visit' ) :
46
  $value = sanitize_text_field( wp_unslash( $form_value ) );
47
  $gdpr_options[$form_key] = $value;
48
  update_option( $option_name, $gdpr_options );
82
  <label for="moove_gdpr_advanced_cookies_enable"><?php _e('Turn','gdpr-cookie-compliance'); ?></label>
83
  </th>
84
  <td>
85
+ <!-- GDPR Rounded switch -->
86
+ <label class="gdpr-checkbox-toggle">
87
+ <input type="checkbox" name="moove_gdpr_advanced_cookies_enable" id="moove_gdpr_advanced_cookies_enable" <?php echo isset( $gdpr_options['moove_gdpr_advanced_cookies_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_advanced_cookies_enable'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_advanced_cookies_enable'] ) ? 'checked' : '' ) ) : ''; ?> >
88
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('On','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Off','gdpr-cookie-compliance'); ?>"></span>
89
+ </label>
90
  </td>
91
  </tr>
92
 
93
  <tr>
94
  <th scope="row">
95
+ <label for="moove_gdpr_advanced_cookies_enable_first_visit"><?php _e('Default status','gdpr-cookie-compliance'); ?></label>
96
+ <p class="description"><?php _e('by default cookies should be','gdpr-cookie-compliance'); ?>:</p>
97
+ <!-- .description -->
98
  </th>
99
+ <td style="vertical-align: top; padding-top: 20px">
100
+ <!-- GDPR Rounded switch -->
101
+ <label class="gdpr-checkbox-toggle">
102
+ <input type="checkbox" name="moove_gdpr_advanced_cookies_enable_first_visit" id="moove_gdpr_advanced_cookies_enable_first_visit" <?php echo isset( $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) ? ( intval( $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_advanced_cookies_enable_first_visit'] ) ? 'checked' : '' ) ) : ''; ?> >
103
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('Enabled','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Disabled','gdpr-cookie-compliance'); ?>"></span>
104
+ </label>
105
+
106
  </td>
107
  </tr>
108
 
137
  ?>
138
  </th>
139
  </tr>
140
+ </tbody>
141
+ </table>
142
 
143
+ <div class="gdpr-script-tab-content">
144
+ <hr />
145
+ <h3><?php _e('Paste your codes and snippets below. They will be added to all pages if user enables these cookies.','gdpr-cookie-compliance'); ?></h3>
146
+ <div class="alert script-error" style="display: none;"><?php _e('Please fill out at least one of these fields:','gdpr-cookie-compliance'); ?></div>
147
+
148
+ <div class="gdpr-tab-code-section-nav">
149
+ <ul>
150
+ <li>
151
+ <a href="#advnaced_cookies_head" class="gdpr-active">Head Section</a>
152
+ </li>
153
+ <li>
154
+ <a href="#advnaced_cookies_body">Body Section</a>
155
+ </li>
156
+ <li>
157
+ <a href="#advnaced_cookies_footer">Footer Section</a>
158
+ </li>
159
+ </ul>
160
+ </div>
161
+ <!-- .gdpr-tab-code-section-nav -->
162
+ <div class="gdpr-script-tabs-main-cnt">
163
 
164
+ <div class="gdpr-tab-code-section gdpr-active" id="advnaced_cookies_head">
165
+ <h4 for="moove_gdpr_advnaced_cookies_header_scripts"><?php _e('Add scripts that you would like to be inserted to the HEAD section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
166
+ <table>
167
+ <tbody>
168
+ <tr class="moove_gdpr_advanced_cookies_header_scripts">
169
+ <td scope="row" colspan="2" style="padding: 20px 0;">
170
+ <?php $content = isset( $gdpr_options['moove_gdpr_advanced_cookies_header_scripts'] ) && $gdpr_options['moove_gdpr_advanced_cookies_header_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_advanced_cookies_header_scripts'] ) : '';
171
+ ?>
172
+ <textarea name="moove_gdpr_advanced_cookies_header_scripts" id="moove_gdpr_advanced_cookies_header_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
173
+ <div class="gdpr-code"></div>
174
+ <!-- .gdpr-code -->
175
+ <p class="description" id="moove_gdpr_advanced_cookies_header_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
176
+ </td>
177
+ </tr>
178
+ </tbody>
179
+ </table>
180
+ </div>
181
+ <!-- .gdpr-tab-code-section -->
182
 
183
+ <div class="gdpr-tab-code-section" id="advnaced_cookies_body">
184
+ <h4 for="moove_gdpr_advnaced_cookies_header_scripts"><?php _e('Add scripts that you would like to be inserted to the BODY section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
185
+ <table>
186
+ <tbody>
187
+ <tr class="moove_gdpr_advanced_cookies_body_scripts">
188
+ <td scope="row" colspan="2" style="padding: 20px 0;">
189
+ <?php $content = isset( $gdpr_options['moove_gdpr_advanced_cookies_body_scripts'] ) && $gdpr_options['moove_gdpr_advanced_cookies_body_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_advanced_cookies_body_scripts'] ) : '';
190
+ ?>
191
+ <textarea name="moove_gdpr_advanced_cookies_body_scripts" id="moove_gdpr_advanced_cookies_body_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
192
+ <div class="gdpr-code"></div>
193
+ <!-- .gdpr-code -->
194
+ <p class="description" id="moove_gdpr_advanced_cookies_body_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
195
+ </td>
196
+ </tr>
197
+ </tbody>
198
+ </table>
199
+ </div>
200
+ <!-- .gdpr-tab-code-section -->
201
 
202
+ <div class="gdpr-tab-code-section" id="advnaced_cookies_footer">
203
+ <h4 for="moove_gdpr_advnaced_cookies_header_scripts"><?php _e('Add scripts that you would like to be inserted to the FOOTER section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
204
+ <table>
205
+ <tbody>
206
+ <tr class="moove_gdpr_advanced_cookies_footer_scripts">
207
+ <td scope="row" colspan="2" style="padding: 20px 0;">
208
+ <?php $content = isset( $gdpr_options['moove_gdpr_advanced_cookies_footer_scripts'] ) && $gdpr_options['moove_gdpr_advanced_cookies_footer_scripts'] ? wp_unslash( $gdpr_options['moove_gdpr_advanced_cookies_footer_scripts'] ) : '';
209
+ ?>
210
+ <textarea name="moove_gdpr_advanced_cookies_footer_scripts" id="moove_gdpr_advanced_cookies_footer_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
211
+ <div class="gdpr-code"></div>
212
+ <!-- .gdpr-code -->
213
+ <p class="description" id="moove_gdpr_advanced_cookies_footer_scripts-description"><?php _e('For example, you can use it for Google Analytics script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
214
+ </td>
215
+ </tr>
216
+ </tbody>
217
+ </table>
218
+ </div>
219
+ <!-- .gdpr-tab-code-section -->
220
+ </div>
221
+ <!-- .gdpr-script-tabs-main-cnt -->
222
+ </div>
223
+ <!-- .gdpr-script-tab-content -->
224
 
225
  <hr />
226
  <br />
227
  <button type="submit" class="button button-primary"><?php _e('Save changes','gdpr-cookie-compliance'); ?></button>
228
+
229
+ <script type="text/javascript" src="<?php echo moove_gdpr_get_plugin_directory_url(); ?>/dist/scripts/codemirror.js"></script>
230
+ <script type="text/javascript">
231
+ window.onload = function() {
232
+ jQuery('.gdpr-tab-section-cnt textarea.code').each(function(){
233
+ var element = jQuery(this).closest('tr').find('.gdpr-code')[0];
234
+ var id = jQuery(this).attr('id');
235
+ console.log(element);
236
+ jQuery(this).css({
237
+ 'opacity' : '0',
238
+ 'height' : '0',
239
+ });
240
+ var editor = CodeMirror( element, {
241
+ mode: "text/html",
242
+ lineWrapping: true,
243
+ lineNumbers: true,
244
+ value: document.getElementById(id).value
245
+ });
246
+ editor.on('change',function(cMirror){
247
+ // get value right from instance
248
+ document.getElementById(id).innerHTML = cMirror.getValue();
249
+ });
250
+
251
+ });
252
+
253
+
254
+ };
255
+ </script>
256
  </form>
views/moove/admin/settings/banner_settings.php CHANGED
@@ -9,7 +9,37 @@
9
  if ( ! wp_verify_nonce( $nonce, 'moove_gdpr_nonce_field' ) ) :
10
  die( 'Security check' );
11
  else :
12
- if ( is_array( $_POST ) ) :
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  foreach ( $_POST as $form_key => $form_value ) :
14
  if ( $form_key === 'moove_gdpr_info_bar_content' ) :
15
  $value = wpautop( wp_unslash( $form_value ) );
@@ -21,7 +51,7 @@
21
  $gdpr_options[$form_key] = $value;
22
  update_option( $option_name, $gdpr_options );
23
  $gdpr_options = get_option( $option_name );
24
- elseif ( $form_key !== 'moove_gdpr_floating_button_enable' ) :
25
  $value = sanitize_text_field( wp_unslash( $form_value ) );
26
  $gdpr_options[$form_key] = $value;
27
  update_option( $option_name, $gdpr_options );
@@ -45,6 +75,20 @@
45
 
46
  <table class="form-table">
47
  <tbody>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  <tr>
49
  <th scope="row" colspan="2" style="padding-bottom: 0;">
50
  <label for="moove_gdpr_info_bar_content"><?php _e('Cookie Banner Content','gdpr-cookie-compliance'); ?></label>
@@ -68,7 +112,7 @@
68
  );
69
  wp_editor( $content, 'moove_gdpr_info_bar_content', $settings );
70
  ?>
71
- <p class="description"><?php _e('You can use the following shortcut to link the settings modal:<br><span><strong>[setting]</strong>settings<strong>[/setting]</strong></span>','gdpr-cookie-compliance'); ?></p>
72
  </th>
73
  </tr>
74
 
@@ -81,22 +125,29 @@
81
  </td>
82
  </tr>
83
 
84
-
85
-
86
  <tr>
87
  <th scope="row">
88
- <label for="moove_gdpr_infobar_visibility"><?php _e('Select your preference for Cookie Banner','gdpr-cookie-compliance'); ?></label>
89
  </th>
90
  <td>
91
-
92
- <input name="moove_gdpr_infobar_visibility" type="radio" value="visible" id="moove_gdpr_infobar_visibility_top" <?php echo isset( $gdpr_options['moove_gdpr_infobar_visibility'] ) ? ( $gdpr_options['moove_gdpr_infobar_visibility'] === 'visible' ? 'checked' : '' ) : 'checked'; ?> class="on-top"> <label for="moove_gdpr_infobar_visibility_top"><?php _e('Visible','gdpr-cookie-compliance'); ?></label>
93
- <span class="separator"></span>
94
 
95
- <input name="moove_gdpr_infobar_visibility" type="radio" value="hidden" id="moove_gdpr_infobar_visibility_bottom" <?php echo isset( $gdpr_options['moove_gdpr_infobar_visibility'] ) ? ( $gdpr_options['moove_gdpr_infobar_visibility'] === 'hidden' ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_infobar_visibility_bottom"><?php _e('Hidden','gdpr-cookie-compliance'); ?></label>
 
 
 
 
96
 
97
- <?php do_action('gdpr_cc_moove_gdpr_infobar_visibility_settings'); ?>
98
-
99
-
 
 
 
 
 
 
 
 
100
  </td>
101
  </tr>
102
 
@@ -122,17 +173,10 @@
122
  <label for="moove_gdpr_colour_scheme"><?php _e('Colour scheme','gdpr-cookie-compliance'); ?></label>
123
  </th>
124
  <td>
125
- <fieldset>
126
- <legend class="screen-reader-text"><span><?php _e('Enable','gdpr-cookie-compliance'); ?></span></legend>
127
- <input name="moove_gdpr_colour_scheme" type="radio" <?php echo isset( $gdpr_options['moove_gdpr_colour_scheme'] ) ? ( intval( $gdpr_options['moove_gdpr_colour_scheme'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_colour_scheme'] ) ? 'checked' : '' ) ) : 'checked'; ?> id="moove_gdpr_colour_scheme_dark" value="1">
128
- <label for="moove_gdpr_colour_scheme_dark"><?php _e('Dark','gdpr-cookie-compliance'); ?></label> <br>
129
-
130
- <input name="moove_gdpr_colour_scheme" type="radio" <?php echo isset( $gdpr_options['moove_gdpr_colour_scheme'] ) ? ( intval( $gdpr_options['moove_gdpr_colour_scheme'] ) === 2 ? 'checked' : '' ) : ''; ?> id="moove_gdpr_colour_scheme_light" value="2">
131
- <label for="moove_gdpr_colour_scheme_light"><?php _e('Light','gdpr-cookie-compliance'); ?></label>
132
-
133
- <?php do_action('gdpr_cc_moove_gdpr_colour_scheme_settings'); ?>
134
-
135
- </fieldset>
136
  </td>
137
  </tr>
138
 
9
  if ( ! wp_verify_nonce( $nonce, 'moove_gdpr_nonce_field' ) ) :
10
  die( 'Security check' );
11
  else :
12
+ if ( is_array( $_POST ) ) :
13
+ $restricted_keys = array(
14
+ 'moove_gdpr_floating_button_enable',
15
+ 'moove_gdpr_infobar_visibility',
16
+ 'moove_gdpr_reject_button_enable',
17
+ 'moove_gdpr_colour_scheme'
18
+ );
19
+
20
+ // Cookie Banner Visibility
21
+ $moove_gdpr_infobar_visibility = 'hidden';
22
+ if ( isset( $_POST['moove_gdpr_infobar_visibility'] ) ) :
23
+ $moove_gdpr_infobar_visibility = 'visible';
24
+ endif;
25
+ $gdpr_options['moove_gdpr_infobar_visibility'] = $moove_gdpr_infobar_visibility;
26
+
27
+ // Cookie Banner Reject Button
28
+ $moove_gdpr_reject_enable = '0';
29
+ if ( isset( $_POST['moove_gdpr_reject_button_enable'] ) ) :
30
+ $moove_gdpr_reject_enable = '1';
31
+ endif;
32
+ $gdpr_options['moove_gdpr_reject_button_enable'] = $moove_gdpr_reject_enable;
33
+
34
+ // Cookie Banner Colour Scheme
35
+ $moove_gdpr_colour_scheme = '2';
36
+ if ( isset( $_POST['moove_gdpr_colour_scheme'] ) ) :
37
+ $moove_gdpr_colour_scheme = '1';
38
+ endif;
39
+ $gdpr_options['moove_gdpr_colour_scheme'] = $moove_gdpr_colour_scheme;
40
+
41
+ update_option( $option_name, $gdpr_options );
42
+
43
  foreach ( $_POST as $form_key => $form_value ) :
44
  if ( $form_key === 'moove_gdpr_info_bar_content' ) :
45
  $value = wpautop( wp_unslash( $form_value ) );
51
  $gdpr_options[$form_key] = $value;
52
  update_option( $option_name, $gdpr_options );
53
  $gdpr_options = get_option( $option_name );
54
+ elseif ( ! in_array( $form_key, $restricted_keys ) ) :
55
  $value = sanitize_text_field( wp_unslash( $form_value ) );
56
  $gdpr_options[$form_key] = $value;
57
  update_option( $option_name, $gdpr_options );
75
 
76
  <table class="form-table">
77
  <tbody>
78
+ <tr>
79
+ <th scope="row">
80
+ <label for="moove_gdpr_infobar_visibility"><?php _e('Turn','gdpr-cookie-compliance'); ?></label>
81
+ </th>
82
+ <td>
83
+ <!-- GDPR Rounded switch -->
84
+ <label class="gdpr-checkbox-toggle">
85
+ <input type="checkbox" name="moove_gdpr_infobar_visibility" <?php echo isset( $gdpr_options['moove_gdpr_infobar_visibility'] ) ? ( $gdpr_options['moove_gdpr_infobar_visibility'] === 'visible' ? 'checked' : '' ) : 'checked'; ?> >
86
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('On','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Off','gdpr-cookie-compliance'); ?>"></span>
87
+ </label>
88
+ <?php do_action('gdpr_cc_moove_gdpr_infobar_visibility_settings'); ?>
89
+ </td>
90
+ </tr>
91
+
92
  <tr>
93
  <th scope="row" colspan="2" style="padding-bottom: 0;">
94
  <label for="moove_gdpr_info_bar_content"><?php _e('Cookie Banner Content','gdpr-cookie-compliance'); ?></label>
112
  );
113
  wp_editor( $content, 'moove_gdpr_info_bar_content', $settings );
114
  ?>
115
+ <p class="description"><?php _e('You can use the following shortcut to link the Cookie Settings Screen:<br><span><strong>[setting]</strong>settings<strong>[/setting]</strong></span>','gdpr-cookie-compliance'); ?></p>
116
  </th>
117
  </tr>
118
 
125
  </td>
126
  </tr>
127
 
 
 
128
  <tr>
129
  <th scope="row">
130
+ <label for="moove_gdpr_reject_button_enable"><?php _e('Reject button','gdpr-cookie-compliance-addon'); ?></label>
131
  </th>
132
  <td>
 
 
 
133
 
134
+ <!-- GDPR Rounded switch -->
135
+ <label class="gdpr-checkbox-toggle">
136
+ <input type="checkbox" name="moove_gdpr_reject_button_enable" id="moove_gdpr_reject_button_enable" <?php echo isset( $gdpr_options['moove_gdpr_reject_button_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_reject_button_enable'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_reject_button_enable'] ) ? 'checked' : '' ) ) : ''; ?> >
137
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('Enabled','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Disabled','gdpr-cookie-compliance'); ?>"></span>
138
+ </label>
139
 
140
+
141
+ <p class="description" id="moove_gdpr_reject_button_enable-description" ><?php _e("If it's enabled, the Cookie Banner will be extended with a button that allows users to reject all cookies.",'gdpr-cookie-compliance-addon'); ?></p>
142
+ <!-- .description -->
143
+ </td>
144
+ </tr>
145
+ <tr class="gdpr-conditional-field" data-dependency="#moove_gdpr_reject_button_enable">
146
+ <th scope="row">
147
+ <label for="moove_gdpr_infobar_reject_button_label"><?php _e('Reject - Button Label','gdpr-cookie-compliance'); ?></label>
148
+ </th>
149
+ <td>
150
+ <input name="moove_gdpr_infobar_reject_button_label<?php echo $wpml_lang; ?>" type="text" id="moove_gdpr_infobar_reject_button_label" value="<?php echo isset( $gdpr_options['moove_gdpr_infobar_reject_button_label'.$wpml_lang] ) && $gdpr_options['moove_gdpr_infobar_reject_button_label'.$wpml_lang] ? $gdpr_options['moove_gdpr_infobar_reject_button_label'.$wpml_lang] : __('Reject','gdpr-cookie-compliance'); ?>" class="regular-text">
151
  </td>
152
  </tr>
153
 
173
  <label for="moove_gdpr_colour_scheme"><?php _e('Colour scheme','gdpr-cookie-compliance'); ?></label>
174
  </th>
175
  <td>
176
+ <label class="gdpr-checkbox-toggle gdpr-color-scheme-toggle">
177
+ <input type="checkbox" name="moove_gdpr_colour_scheme" <?php echo isset( $gdpr_options['moove_gdpr_colour_scheme'] ) ? ( intval( $gdpr_options['moove_gdpr_colour_scheme'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_colour_scheme'] ) ? 'checked' : '' ) ) : 'checked'; ?> >
178
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('Dark','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Light','gdpr-cookie-compliance'); ?>"></span>
179
+ </label>
 
 
 
 
 
 
 
180
  </td>
181
  </tr>
182
 
views/moove/admin/settings/branding.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $gdpr_default_content = new Moove_GDPR_Content();
3
+ $option_name = $gdpr_default_content->moove_gdpr_get_option_name();
4
+ $gdpr_options = get_option( $option_name );
5
+ $wpml_lang = $gdpr_default_content->moove_gdpr_get_wpml_lang();
6
+ $gdpr_options = is_array( $gdpr_options ) ? $gdpr_options : array();
7
+ if ( isset( $_POST ) && isset( $_POST['moove_gdpr_nonce'] ) ) :
8
+ $nonce = sanitize_key( $_POST['moove_gdpr_nonce'] );
9
+ if ( ! wp_verify_nonce( $nonce, 'moove_gdpr_nonce_field' ) ) :
10
+ die( 'Security check' );
11
+ else :
12
+ if ( is_array( $_POST ) ) :
13
+ $gdpr_options = get_option( $option_name );
14
+ foreach ( $_POST as $form_key => $form_value ) :
15
+ if ( $form_key === 'moove_gdpr_info_bar_content' ) :
16
+ $value = wpautop( wp_unslash( $form_value ) );
17
+ $gdpr_options[$form_key.$wpml_lang] = $value;
18
+ update_option( $option_name, $gdpr_options );
19
+ $gdpr_options = get_option( $option_name );
20
+ elseif ( $form_key === 'moove_gdpr_modal_strictly_secondary_notice' . $wpml_lang ) :
21
+ $value = wpautop( wp_unslash( $form_value ) );
22
+ $gdpr_options[$form_key] = $value;
23
+ update_option( $option_name, $gdpr_options );
24
+ $gdpr_options = get_option( $option_name );
25
+ elseif ( $form_key !== 'moove_gdpr_floating_button_enable' && $form_key !== 'moove_gdpr_modal_powered_by_disable' ) :
26
+ $value = sanitize_text_field( wp_unslash( $form_value ) );
27
+ $gdpr_options[$form_key] = $value;
28
+ update_option( $option_name, $gdpr_options );
29
+ $gdpr_options = get_option( $option_name );
30
+ endif;
31
+ endforeach;
32
+ endif;
33
+ do_action('gdpr_cookie_filter_settings');
34
+ ?>
35
+ <script>
36
+ jQuery('#moove-gdpr-setting-error-settings_updated').show();
37
+ </script>
38
+ <?php
39
+ endif;
40
+ endif;
41
+ ?>
42
+ <form action="?page=moove-gdpr&amp;tab=branding" method="post" id="moove_gdpr_tab_branding_settings">
43
+ <h2><?php _e('Branding','gdpr-cookie-compliance'); ?></h2>
44
+ <hr />
45
+ <?php wp_nonce_field( 'moove_gdpr_nonce_field', 'moove_gdpr_nonce' ); ?>
46
+ <table class="form-table">
47
+ <tbody>
48
+
49
+ <tr>
50
+ <th scope="row">
51
+ <label for="moove_gdpr_brand_colour"><?php _e('Brand Primary Colour','gdpr-cookie-compliance'); ?></label>
52
+ </th>
53
+ <td>
54
+ <div class="iris-colorpicker-group-cnt">
55
+ <?php $color = isset( $gdpr_options['moove_gdpr_brand_colour'] ) && $gdpr_options['moove_gdpr_brand_colour'] ? $gdpr_options['moove_gdpr_brand_colour'] : '0C4DA2'; ?>
56
+ <input class="iris-colorpicker regular-text" name="moove_gdpr_brand_colour" value="<?php echo $color; ?>" style="background-color: <?php echo $color; ?>" type="text">
57
+ <span class="iris-selectbtn"><?php _e('Select','gdpr-cookie-compliance'); ?></span>
58
+ </div>
59
+ </td>
60
+ </tr>
61
+
62
+ <tr>
63
+ <th scope="row">
64
+ <label for="moove_gdpr_brand_secondary_colour"><?php _e('Brand Secondary Colour','gdpr-cookie-compliance'); ?></label>
65
+ </th>
66
+ <td>
67
+ <div class="iris-colorpicker-group-cnt">
68
+ <?php $color = isset( $gdpr_options['moove_gdpr_brand_secondary_colour'] ) && $gdpr_options['moove_gdpr_brand_secondary_colour'] ? $gdpr_options['moove_gdpr_brand_secondary_colour'] : '000000'; ?>
69
+ <input class="iris-colorpicker regular-text" name="moove_gdpr_brand_secondary_colour" value="<?php echo $color; ?>" style="background-color: <?php echo $color; ?>" >
70
+ <span class="iris-selectbtn"><?php _e('Select','gdpr-cookie-compliance'); ?></span>
71
+ </div>
72
+ </td>
73
+ </tr>
74
+
75
+ <tr>
76
+ <th scope="row">
77
+ <label for="moove_gdpr_company_logo"><?php _e('Cookie Settings Logo','gdpr-cookie-compliance'); ?></label>
78
+ <p class="description"><?php _e('Recommended size:','gdpr-cookie-compliance'); ?><br>130 x 50 <?php _e('pixels','gdpr-cookie-compliance'); ?></p>
79
+ <!-- .description -->
80
+ </th>
81
+ <td>
82
+ <?php
83
+ if ( function_exists( 'wp_enqueue_media' ) ) :
84
+ wp_enqueue_media();
85
+ else:
86
+ wp_enqueue_style('thickbox');
87
+ wp_enqueue_script('media-upload');
88
+ wp_enqueue_script('thickbox');
89
+ endif;
90
+ ?>
91
+ <?php
92
+ $plugin_dir = moove_gdpr_get_plugin_directory_url();
93
+ $image_url = isset( $gdpr_options['moove_gdpr_company_logo'] ) && $gdpr_options['moove_gdpr_company_logo'] ? $gdpr_options['moove_gdpr_company_logo'] : $plugin_dir.'dist/images/gdpr-logo.png';
94
+ ?>
95
+ <span class="moove_gdpr_company_logo_holder" style="background-image: url(<?php echo $image_url; ?>);"></span><br /><br />
96
+ <input class="regular-text code" type="text" name="moove_gdpr_company_logo" value="<?php echo $image_url; ?>" required> <br /><br />
97
+ <a href="#" class="button moove_gdpr_company_logo_upload">Upload Logo</a>
98
+ <script>
99
+ jQuery(document).ready(function($) {
100
+ $('.moove_gdpr_company_logo_upload').click(function(e) {
101
+ e.preventDefault();
102
+
103
+ var custom_uploader = wp.media({
104
+ title: 'GDPR Modal - Company Logo',
105
+ button: {
106
+ text: 'Upload Logo'
107
+ },
108
+ multiple: false // Set this to true to allow multiple files to be selected
109
+ })
110
+ .on('select', function() {
111
+ var attachment = custom_uploader.state().get('selection').first().toJSON();
112
+ $('.moove_gdpr_company_logo_holder').css('background-image', 'url('+attachment.url+')');
113
+ $('input[name=moove_gdpr_company_logo]').val(attachment.url);
114
+
115
+ })
116
+ .open();
117
+ });
118
+ });
119
+ </script>
120
+ </td>
121
+ </tr>
122
+
123
+ <tr>
124
+ <th scope="row">
125
+ <label for="moove_gdpr_logo_position"><?php _e('Logo Position','gdpr-cookie-compliance'); ?></label>
126
+ </th>
127
+ <td>
128
+ <input name="moove_gdpr_logo_position" type="radio" value="left" id="moove_gdpr_logo_position_left" <?php echo isset( $gdpr_options['moove_gdpr_logo_position'] ) ? ( $gdpr_options['moove_gdpr_logo_position'] === 'left' ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_logo_position_left"><?php _e('Left','gdpr-cookie-compliance'); ?></label>
129
+ <span class="separator"></span>
130
+
131
+ <input name="moove_gdpr_logo_position" type="radio" value="center" id="moove_gdpr_logo_position_center" <?php echo isset( $gdpr_options['moove_gdpr_logo_position'] ) ? ( $gdpr_options['moove_gdpr_logo_position'] === 'center' ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_logo_position_center"><?php _e('Center','gdpr-cookie-compliance'); ?></label>
132
+ <span class="separator"></span>
133
+
134
+ <input name="moove_gdpr_logo_position" type="radio" value="right" id="moove_gdpr_logo_position_right" <?php echo isset( $gdpr_options['moove_gdpr_logo_position'] ) ? ( $gdpr_options['moove_gdpr_logo_position'] === 'right' ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_logo_position_right"><?php _e('Right','gdpr-cookie-compliance'); ?></label>
135
+
136
+ <?php do_action('gdpr_cc_moove_gdpr_logo_position_settings'); ?>
137
+ </td>
138
+ </tr>
139
+
140
+ <tr>
141
+ <th scope="row">
142
+ <label for="moove_gdpr_plugin_font_family"><?php _e('Choose font','gdpr-cookie-compliance'); ?></label>
143
+ </th>
144
+ <td>
145
+ <input name="moove_gdpr_plugin_font_type" type="radio" value="1" data-val="'Nunito', sans-serif" id="moove_gdpr_plugin_font_type_1" <?php echo isset( $gdpr_options['moove_gdpr_plugin_font_type'] ) ? ( $gdpr_options['moove_gdpr_plugin_font_type'] === '1' ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_plugin_font_type_1"><?php _e('Default','gdpr-cookie-compliance'); ?></label>
146
+ <span class="separator"></span>
147
+ <br /><br />
148
+
149
+ <input name="moove_gdpr_plugin_font_type" type="radio" value="2" data-val="inherit" id="moove_gdpr_plugin_font_type_2" <?php echo isset( $gdpr_options['moove_gdpr_plugin_font_type'] ) ? ( $gdpr_options['moove_gdpr_plugin_font_type'] === '2' ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_plugin_font_type_2"><?php _e('Inherit font-family from your WordPress theme','gdpr-cookie-compliance'); ?></label>
150
+ <span class="separator"></span>
151
+ <br /><br />
152
+
153
+ <input name="moove_gdpr_plugin_font_type" type="radio" value="3" data-val="" id="moove_gdpr_plugin_font_type_3" <?php echo isset( $gdpr_options['moove_gdpr_plugin_font_type'] ) ? ( $gdpr_options['moove_gdpr_plugin_font_type'] === '3' ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_plugin_font_type_3"><?php _e('Specify custom font','gdpr-cookie-compliance'); ?></label>
154
+ <span class="separator"></span>
155
+ <br /><br />
156
+ <?php
157
+ $field_class = '';
158
+ if ( isset( $gdpr_options['moove_gdpr_plugin_font_type'] ) ) :
159
+ if ( $gdpr_options['moove_gdpr_plugin_font_type'] === '1' || $gdpr_options['moove_gdpr_plugin_font_type'] === '2' ) {
160
+ $field_class = 'moove-not-visible';
161
+ }
162
+ endif;
163
+
164
+ ?>
165
+ <input name="moove_gdpr_plugin_font_family" type="text" id="moove_gdpr_plugin_font_family" value="<?php echo isset( $gdpr_options['moove_gdpr_plugin_font_family'] ) && $gdpr_options['moove_gdpr_plugin_font_family'] ? $gdpr_options['moove_gdpr_plugin_font_family'] : "'Nunito', sans-serif"; ?>" class="regular-text <?php echo $field_class; ?>">
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <th scope="row">
170
+ <label for="moove_gdpr_cdn_url"><?php _e('CDN Base URL','gdpr-cookie-compliance'); ?></label>
171
+ </th>
172
+ <td>
173
+ <input name="moove_gdpr_cdn_url" type="text" id="moove_gdpr_cdn_url" value="<?php echo isset( $gdpr_options['moove_gdpr_cdn_url'] ) && $gdpr_options['moove_gdpr_cdn_url'] ? $gdpr_options['moove_gdpr_cdn_url'] : ''; ?>" class="regular-text">
174
+ <p class="description"><strong>* <?php _e('Optional, leave it empty to use default domain</strong><br /> Enter your CDN root URL to enable CDN for GDPR Lity library files. The URL can be http, https or protocol-relative', 'gdpr-cookie-compliance'); ?> (e.g. //cdn.example.com/).</p>
175
+ <!-- .description -->
176
+ </td>
177
+ </tr>
178
+ <?php do_action('gdpr_cc_general_modal_settings'); ?>
179
+
180
+
181
+ </tbody>
182
+ </table>
183
+
184
+ <br />
185
+ <hr />
186
+ <br />
187
+ <button type="submit" class="button button-primary"><?php _e('Save changes','gdpr-cookie-compliance'); ?></button>
188
+ <?php do_action('gdpr_cc_general_buttons_settings'); ?>
189
+ </form>
views/moove/admin/settings/cookie-banner-manager.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <h2><?php _e('Hide Cookie Banner on Selected Posts / Pages','gdpr-cookie-compliance'); ?></h2>
2
+ <hr />
3
+
4
+ <?php do_action('gdpr_premium_section_ads'); ?>
views/moove/admin/settings/cookie_policy.php CHANGED
@@ -11,7 +11,7 @@
11
  die( 'Security check' );
12
  else :
13
  if ( is_array( $_POST ) ) :
14
- if ( isset( $_POST['moove_gdpr_cookie_policy_enable'] ) && intval( $_POST['moove_gdpr_cookie_policy_enable'] ) === 1 ) :
15
  $value = 1;
16
  else :
17
  $value = 0;
@@ -56,8 +56,12 @@
56
  <label for="moove_gdpr_cookie_policy_enable"><?php _e('Turn','gdpr-cookie-compliance'); ?></label>
57
  </th>
58
  <td>
59
- <input name="moove_gdpr_cookie_policy_enable" type="radio" value="1" id="moove_gdpr_cookie_policy_enable_on" <?php echo isset( $gdpr_options['moove_gdpr_cookie_policy_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_cookie_policy_enable'] ) === 1 ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_cookie_policy_enable_on"><?php _e('On','gdpr-cookie-compliance'); ?></label> <span class="separator"></span>
60
- <input name="moove_gdpr_cookie_policy_enable" type="radio" value="0" id="moove_gdpr_cookie_policy_enable_off" <?php echo isset( $gdpr_options['moove_gdpr_cookie_policy_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_cookie_policy_enable'] ) === 0 ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_cookie_policy_enable_off"><?php _e('Off','gdpr-cookie-compliance'); ?></label>
 
 
 
 
61
 
62
  </td>
63
  </tr>
11
  die( 'Security check' );
12
  else :
13
  if ( is_array( $_POST ) ) :
14
+ if ( isset( $_POST['moove_gdpr_cookie_policy_enable'] ) ) :
15
  $value = 1;
16
  else :
17
  $value = 0;
56
  <label for="moove_gdpr_cookie_policy_enable"><?php _e('Turn','gdpr-cookie-compliance'); ?></label>
57
  </th>
58
  <td>
59
+
60
+ <!-- GDPR Rounded switch -->
61
+ <label class="gdpr-checkbox-toggle">
62
+ <input type="checkbox" name="moove_gdpr_cookie_policy_enable" id="moove_gdpr_cookie_policy_enable" <?php echo isset( $gdpr_options['moove_gdpr_cookie_policy_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_cookie_policy_enable'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_cookie_policy_enable'] ) ? 'checked' : '' ) ) : ''; ?> >
63
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('On','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Off','gdpr-cookie-compliance'); ?>"></span>
64
+ </label>
65
 
66
  </td>
67
  </tr>
views/moove/admin/settings/floating_button.php CHANGED
@@ -46,15 +46,15 @@
46
  <tbody>
47
  <tr>
48
  <th scope="row">
49
- <label for="moove_gdpr_floating_button_enable"><?php _e('Enable Floating Button','gdpr-cookie-compliance'); ?></label>
50
  </th>
51
  <td>
52
- <fieldset>
53
- <legend class="screen-reader-text"><span><?php _e('Enable','gdpr-cookie-compliance'); ?></span></legend>
54
- <label for="moove_gdpr_floating_button_enable">
55
- <input name="moove_gdpr_floating_button_enable" type="checkbox" <?php echo isset( $gdpr_options['moove_gdpr_floating_button_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_floating_button_enable'] ) === 1 ? 'checked' : '' ) : ''; ?> id="moove_gdpr_floating_button_enable" value="1">
56
- <?php _e('Enable','gdpr-cookie-compliance'); ?></label>
57
- </fieldset>
58
  </td>
59
  </tr>
60
 
46
  <tbody>
47
  <tr>
48
  <th scope="row">
49
+ <label for="moove_gdpr_floating_button_enable"><?php _e('Floating Button','gdpr-cookie-compliance'); ?></label>
50
  </th>
51
  <td>
52
+ <!-- GDPR Rounded switch -->
53
+ <label class="gdpr-checkbox-toggle">
54
+ <input type="checkbox" name="moove_gdpr_floating_button_enable" id="moove_gdpr_floating_button_enable" <?php echo isset( $gdpr_options['moove_gdpr_floating_button_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_floating_button_enable'] ) === 1 ? 'checked' : '' ) : ''; ?> >
55
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('Enabled','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Disabled','gdpr-cookie-compliance'); ?>"></span>
56
+ </label>
57
+
58
  </td>
59
  </tr>
60
 
views/moove/admin/settings/general_settings.php CHANGED
@@ -10,11 +10,22 @@
10
  die( 'Security check' );
11
  else :
12
  if ( is_array( $_POST ) ) :
 
13
  if ( isset( $_POST['moove_gdpr_modal_powered_by_disable'] ) ) :
14
- $value = 1;
15
  else :
16
  $value = 0;
17
  endif;
 
 
 
 
 
 
 
 
 
 
18
  $gdpr_options['moove_gdpr_modal_powered_by_disable'] = $value;
19
  update_option( $option_name, $gdpr_options );
20
  $gdpr_options = get_option( $option_name );
@@ -47,103 +58,11 @@
47
  endif;
48
  ?>
49
  <form action="?page=moove-gdpr&amp;tab=general_settings" method="post" id="moove_gdpr_tab_general_settings">
50
- <h2><?php _e('Modal General Settings','gdpr-cookie-compliance'); ?></h2>
51
  <hr />
52
  <?php wp_nonce_field( 'moove_gdpr_nonce_field', 'moove_gdpr_nonce' ); ?>
53
  <table class="form-table">
54
  <tbody>
55
-
56
- <tr>
57
- <th scope="row">
58
- <label for="moove_gdpr_brand_colour"><?php _e('Brand Primary Colour','gdpr-cookie-compliance'); ?></label>
59
- </th>
60
- <td>
61
- <div class="iris-colorpicker-group-cnt">
62
- <?php $color = isset( $gdpr_options['moove_gdpr_brand_colour'] ) && $gdpr_options['moove_gdpr_brand_colour'] ? $gdpr_options['moove_gdpr_brand_colour'] : '0C4DA2'; ?>
63
- <input class="iris-colorpicker regular-text" name="moove_gdpr_brand_colour" value="<?php echo $color; ?>" style="background-color: <?php echo $color; ?>" type="text">
64
- <span class="iris-selectbtn"><?php _e('Select','gdpr-cookie-compliance'); ?></span>
65
- </div>
66
- </td>
67
- </tr>
68
-
69
- <tr>
70
- <th scope="row">
71
- <label for="moove_gdpr_brand_secondary_colour"><?php _e('Brand Secondary Colour','gdpr-cookie-compliance'); ?></label>
72
- </th>
73
- <td>
74
- <div class="iris-colorpicker-group-cnt">
75
- <?php $color = isset( $gdpr_options['moove_gdpr_brand_secondary_colour'] ) && $gdpr_options['moove_gdpr_brand_secondary_colour'] ? $gdpr_options['moove_gdpr_brand_secondary_colour'] : '000000'; ?>
76
- <input class="iris-colorpicker regular-text" name="moove_gdpr_brand_secondary_colour" value="<?php echo $color; ?>" style="background-color: <?php echo $color; ?>" >
77
- <span class="iris-selectbtn"><?php _e('Select','gdpr-cookie-compliance'); ?></span>
78
- </div>
79
- </td>
80
- </tr>
81
-
82
- <tr>
83
- <th scope="row">
84
- <label for="moove_gdpr_company_logo"><?php _e('Modal Logo','gdpr-cookie-compliance'); ?></label>
85
- <p class="description"><?php _e('Recommended size:','gdpr-cookie-compliance'); ?><br>130 x 50 <?php _e('pixels','gdpr-cookie-compliance'); ?></p>
86
- <!-- .description -->
87
- </th>
88
- <td>
89
- <?php
90
- if ( function_exists( 'wp_enqueue_media' ) ) :
91
- wp_enqueue_media();
92
- else:
93
- wp_enqueue_style('thickbox');
94
- wp_enqueue_script('media-upload');
95
- wp_enqueue_script('thickbox');
96
- endif;
97
- ?>
98
- <?php
99
- $plugin_dir = moove_gdpr_get_plugin_directory_url();
100
- $image_url = isset( $gdpr_options['moove_gdpr_company_logo'] ) && $gdpr_options['moove_gdpr_company_logo'] ? $gdpr_options['moove_gdpr_company_logo'] : $plugin_dir.'dist/images/gdpr-logo.png';
101
- ?>
102
- <span class="moove_gdpr_company_logo_holder" style="background-image: url(<?php echo $image_url; ?>);"></span><br /><br />
103
- <input class="regular-text code" type="text" name="moove_gdpr_company_logo" value="<?php echo $image_url; ?>" required> <br /><br />
104
- <a href="#" class="button moove_gdpr_company_logo_upload">Upload Logo</a>
105
- <script>
106
- jQuery(document).ready(function($) {
107
- $('.moove_gdpr_company_logo_upload').click(function(e) {
108
- e.preventDefault();
109
-
110
- var custom_uploader = wp.media({
111
- title: 'GDPR Modal - Company Logo',
112
- button: {
113
- text: 'Upload Logo'
114
- },
115
- multiple: false // Set this to true to allow multiple files to be selected
116
- })
117
- .on('select', function() {
118
- var attachment = custom_uploader.state().get('selection').first().toJSON();
119
- $('.moove_gdpr_company_logo_holder').css('background-image', 'url('+attachment.url+')');
120
- $('input[name=moove_gdpr_company_logo]').val(attachment.url);
121
-
122
- })
123
- .open();
124
- });
125
- });
126
- </script>
127
- </td>
128
- </tr>
129
-
130
- <tr>
131
- <th scope="row">
132
- <label for="moove_gdpr_logo_position"><?php _e('Logo Position','gdpr-cookie-compliance'); ?></label>
133
- </th>
134
- <td>
135
- <input name="moove_gdpr_logo_position" type="radio" value="left" id="moove_gdpr_logo_position_left" <?php echo isset( $gdpr_options['moove_gdpr_logo_position'] ) ? ( $gdpr_options['moove_gdpr_logo_position'] === 'left' ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_logo_position_left"><?php _e('Left','gdpr-cookie-compliance'); ?></label>
136
- <span class="separator"></span>
137
-
138
- <input name="moove_gdpr_logo_position" type="radio" value="center" id="moove_gdpr_logo_position_center" <?php echo isset( $gdpr_options['moove_gdpr_logo_position'] ) ? ( $gdpr_options['moove_gdpr_logo_position'] === 'center' ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_logo_position_center"><?php _e('Center','gdpr-cookie-compliance'); ?></label>
139
- <span class="separator"></span>
140
-
141
- <input name="moove_gdpr_logo_position" type="radio" value="right" id="moove_gdpr_logo_position_right" <?php echo isset( $gdpr_options['moove_gdpr_logo_position'] ) ? ( $gdpr_options['moove_gdpr_logo_position'] === 'right' ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_logo_position_right"><?php _e('Right','gdpr-cookie-compliance'); ?></label>
142
-
143
- <?php do_action('gdpr_cc_moove_gdpr_logo_position_settings'); ?>
144
- </td>
145
- </tr>
146
-
147
  <tr>
148
  <th scope="row">
149
  <label for="moove_gdpr_plugin_layout"><?php _e('Choose your layout','gdpr-cookie-compliance'); ?></label>
@@ -159,35 +78,6 @@
159
  </td>
160
  </tr>
161
 
162
- <tr>
163
- <th scope="row">
164
- <label for="moove_gdpr_plugin_font_family"><?php _e('Choose font','gdpr-cookie-compliance'); ?></label>
165
- </th>
166
- <td>
167
- <input name="moove_gdpr_plugin_font_type" type="radio" value="1" data-val="'Nunito', sans-serif" id="moove_gdpr_plugin_font_type_1" <?php echo isset( $gdpr_options['moove_gdpr_plugin_font_type'] ) ? ( $gdpr_options['moove_gdpr_plugin_font_type'] === '1' ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_plugin_font_type_1"><?php _e('Default','gdpr-cookie-compliance'); ?></label>
168
- <span class="separator"></span>
169
- <br /><br />
170
-
171
- <input name="moove_gdpr_plugin_font_type" type="radio" value="2" data-val="inherit" id="moove_gdpr_plugin_font_type_2" <?php echo isset( $gdpr_options['moove_gdpr_plugin_font_type'] ) ? ( $gdpr_options['moove_gdpr_plugin_font_type'] === '2' ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_plugin_font_type_2"><?php _e('Inherit font-family from your WordPress theme','gdpr-cookie-compliance'); ?></label>
172
- <span class="separator"></span>
173
- <br /><br />
174
-
175
- <input name="moove_gdpr_plugin_font_type" type="radio" value="3" data-val="" id="moove_gdpr_plugin_font_type_3" <?php echo isset( $gdpr_options['moove_gdpr_plugin_font_type'] ) ? ( $gdpr_options['moove_gdpr_plugin_font_type'] === '3' ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_plugin_font_type_3"><?php _e('Specify custom font','gdpr-cookie-compliance'); ?></label>
176
- <span class="separator"></span>
177
- <br /><br />
178
- <?php
179
- $field_class = '';
180
- if ( isset( $gdpr_options['moove_gdpr_plugin_font_type'] ) ) :
181
- if ( $gdpr_options['moove_gdpr_plugin_font_type'] === '1' || $gdpr_options['moove_gdpr_plugin_font_type'] === '2' ) {
182
- $field_class = 'moove-not-visible';
183
- }
184
- endif;
185
-
186
- ?>
187
- <input name="moove_gdpr_plugin_font_family" type="text" id="moove_gdpr_plugin_font_family" value="<?php echo isset( $gdpr_options['moove_gdpr_plugin_font_family'] ) && $gdpr_options['moove_gdpr_plugin_font_family'] ? $gdpr_options['moove_gdpr_plugin_font_family'] : "'Nunito', sans-serif"; ?>" class="regular-text <?php echo $field_class; ?>">
188
- </td>
189
- </tr>
190
-
191
  <tr>
192
  <th scope="row">
193
  <label for="moove_gdpr_modal_save_button_label"><?php _e('Save Settings - Button Label','gdpr-cookie-compliance'); ?></label>
@@ -208,7 +98,7 @@
208
 
209
  <tr>
210
  <th scope="row">
211
- <label for="moove_gdpr_modal_allow_button_label"><?php _e('Checkbox Labels','gdpr-cookie-compliance'); ?></label>
212
  </th>
213
  <td>
214
  <input name="moove_gdpr_modal_enabled_checkbox_label<?php echo $wpml_lang; ?>" type="text" id="moove_gdpr_modal_enabled_checkbox_label" value="<?php echo isset( $gdpr_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ) && $gdpr_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ? $gdpr_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] : __('Enabled','gdpr-cookie-compliance'); ?>" class="regular-text"><br />
@@ -219,49 +109,19 @@
219
 
220
  <tr>
221
  <th scope="row">
222
- <label for="moove_gdpr_modal_powered_by_disable"><?php _e('Disable "Powered by GDPR"','gdpr-cookie-compliance'); ?></label>
223
  </th>
224
  <td>
225
- <fieldset>
226
- <legend class="screen-reader-text"><span><?php _e('Disable','gdpr-cookie-compliance'); ?></span></legend>
227
- <label for="moove_gdpr_modal_powered_by_disable">
228
- <input name="moove_gdpr_modal_powered_by_disable" type="checkbox" <?php echo isset( $gdpr_options['moove_gdpr_modal_powered_by_disable'] ) ? ( intval( $gdpr_options['moove_gdpr_modal_powered_by_disable'] ) === 1 ? 'checked' : '' ) : ''; ?> id="moove_gdpr_modal_powered_by_disable" value="1">
229
- <?php _e('Disable','gdpr-cookie-compliance'); ?></label>
 
 
230
  </fieldset>
231
  </td>
232
  </tr>
233
-
234
- <tr>
235
- <th scope="row">
236
- <label for="moove_gdpr_modal_powered_by_label"><?php _e('Powered by Label','gdpr-cookie-compliance'); ?></label>
237
- </th>
238
- <td>
239
- <input name="moove_gdpr_modal_powered_by_label<?php echo $wpml_lang; ?>" type="text" id="moove_gdpr_modal_powered_by_label" value="<?php echo isset( $gdpr_options['moove_gdpr_modal_powered_by_label'.$wpml_lang] ) && $gdpr_options['moove_gdpr_modal_powered_by_label'.$wpml_lang] ? $gdpr_options['moove_gdpr_modal_powered_by_label'.$wpml_lang] : 'Powered by'; ?>" class="regular-text">
240
- </td>
241
-
242
- </tr>
243
-
244
- <tr>
245
- <th scope="row">
246
- <label for="moove_gdpr_modal_allow_button_label"><?php _e('Strictly necessary required message.','gdpr-cookie-compliance'); ?></label>
247
- </th>
248
- <td>
249
- <textarea name="moove_gdpr_modal_strictly_secondary_notice<?php echo $wpml_lang; ?>" id="moove_gdpr_modal_strictly_secondary_notice" class="regular-text"><?php echo isset( $gdpr_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ) && $gdpr_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ? $gdpr_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] : $gdpr_default_content->moove_gdpr_get_secondary_notice() ; ?></textarea>
250
- <p class="description" id="moove_gdpr_modal_strictly_secondary_notice-description" style="max-width: 25em;"><?php _e('This warning message will be displayed if the Strictly necessary cookies are not enabled and the user try to enable the "Third Party" or "Additional cookies"','gdpr-cookie-compliance'); ?></p>
251
- </td>
252
-
253
- </tr>
254
-
255
- <tr>
256
- <th scope="row">
257
- <label for="moove_gdpr_cdn_url"><?php _e('CDN Base URL','gdpr-cookie-compliance'); ?></label>
258
- </th>
259
- <td>
260
- <input name="moove_gdpr_cdn_url" type="text" id="moove_gdpr_cdn_url" value="<?php echo isset( $gdpr_options['moove_gdpr_cdn_url'] ) && $gdpr_options['moove_gdpr_cdn_url'] ? $gdpr_options['moove_gdpr_cdn_url'] : ''; ?>" class="regular-text">
261
- <p class="description" style="max-width: 25em;"><strong>* Optional, leave it empty to use default domain</strong><br /> Enter your CDN root URL to enable CDN for GDPR Lity library files. The URL can be http, https or protocol-relative (e.g. //cdn.example.com/).</p>
262
- <!-- .description -->
263
- </td>
264
- </tr>
265
  <?php do_action('gdpr_cc_general_modal_settings'); ?>
266
 
267
 
10
  die( 'Security check' );
11
  else :
12
  if ( is_array( $_POST ) ) :
13
+
14
  if ( isset( $_POST['moove_gdpr_modal_powered_by_disable'] ) ) :
15
+ $value = intval( $_POST['moove_gdpr_modal_powered_by_disable'] );
16
  else :
17
  $value = 0;
18
  endif;
19
+
20
+ if ( isset( $_POST['moove_gdpr_modal_powered_by_label' . $wpml_lang] ) ) :
21
+ if ( strlen( trim( $_POST['moove_gdpr_modal_powered_by_label' . $wpml_lang] ) ) === 0 ) :
22
+ $value = 1;
23
+ else :
24
+ $value = 0;
25
+ endif;
26
+ endif;
27
+
28
+
29
  $gdpr_options['moove_gdpr_modal_powered_by_disable'] = $value;
30
  update_option( $option_name, $gdpr_options );
31
  $gdpr_options = get_option( $option_name );
58
  endif;
59
  ?>
60
  <form action="?page=moove-gdpr&amp;tab=general_settings" method="post" id="moove_gdpr_tab_general_settings">
61
+ <h2><?php _e('Cookie Settings Screen - General Setup','gdpr-cookie-compliance'); ?></h2>
62
  <hr />
63
  <?php wp_nonce_field( 'moove_gdpr_nonce_field', 'moove_gdpr_nonce' ); ?>
64
  <table class="form-table">
65
  <tbody>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  <tr>
67
  <th scope="row">
68
  <label for="moove_gdpr_plugin_layout"><?php _e('Choose your layout','gdpr-cookie-compliance'); ?></label>
78
  </td>
79
  </tr>
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  <tr>
82
  <th scope="row">
83
  <label for="moove_gdpr_modal_save_button_label"><?php _e('Save Settings - Button Label','gdpr-cookie-compliance'); ?></label>
98
 
99
  <tr>
100
  <th scope="row">
101
+ <label for="moove_gdpr_modal_enabled_checkbox_label"><?php _e('Checkbox Labels','gdpr-cookie-compliance'); ?></label>
102
  </th>
103
  <td>
104
  <input name="moove_gdpr_modal_enabled_checkbox_label<?php echo $wpml_lang; ?>" type="text" id="moove_gdpr_modal_enabled_checkbox_label" value="<?php echo isset( $gdpr_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ) && $gdpr_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] ? $gdpr_options['moove_gdpr_modal_enabled_checkbox_label'.$wpml_lang] : __('Enabled','gdpr-cookie-compliance'); ?>" class="regular-text"><br />
109
 
110
  <tr>
111
  <th scope="row">
112
+ <label><?php _e('Powered by GDPR','gdpr-cookie-compliance'); ?></label>
113
  </th>
114
  <td>
115
+ <span class="powered-by-label">
116
+ <label for="">Default label:</label>
117
+ <input name="moove_gdpr_modal_powered_by_label<?php echo $wpml_lang; ?>" type="text" id="moove_gdpr_modal_powered_by_label" value="<?php echo isset( $gdpr_options['moove_gdpr_modal_powered_by_label'.$wpml_lang] ) ? $gdpr_options['moove_gdpr_modal_powered_by_label'.$wpml_lang] : 'Powered by'; ?>" class="regular-text">
118
+ </span>
119
+
120
+ <input name="moove_gdpr_modal_powered_by_disable" type="hidden" <?php echo isset( $gdpr_options['moove_gdpr_modal_powered_by_disable'] ) ? ( intval( $gdpr_options['moove_gdpr_modal_powered_by_disable'] ) === 1 ? 'checked' : '' ) : ''; ?> id="moove_gdpr_modal_powered_by_disable" value="<?php echo isset( $gdpr_options['moove_gdpr_modal_powered_by_disable'] ) ? ( intval( $gdpr_options['moove_gdpr_modal_powered_by_disable'] ) === 1 ? '1' : '0' ) : '0'; ?>">
121
+
122
  </fieldset>
123
  </td>
124
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  <?php do_action('gdpr_cc_general_modal_settings'); ?>
126
 
127
 
views/moove/admin/settings/help.php ADDED
@@ -0,0 +1,584 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h2>Help, Hooks, Filters & Shortcodes</h2>
2
+ <hr />
3
+ <ul class="gdpr-disable-posts-nav moove-clearfix">
4
+ <li></li>
5
+ <li><a href="#gdpr_cbm_faq" class="gdpr-help-tab-toggle active">FAQ</a></li>
6
+ <li><a href="#gdpr_cbm_dh" class="gdpr-help-tab-toggle">Default Hooks</a></li>
7
+ <li><a href="#gdpr_cbm_ph" class="gdpr-help-tab-toggle">Premium Hooks</a></li>
8
+ <li><a href="#gdpr_cbm_ps" class="gdpr-help-tab-toggle">Premium Shortcodes</a></li>
9
+ </ul>
10
+
11
+ <div class="gdpr-help-content-cnt">
12
+ <div id="gdpr_cbm_faq" class="gdpr-help-content-block help-block-open">
13
+ <div class="gdpr-faq-toggle gdpr-faq-open">
14
+ <div class="gdpr-faq-accordion-header">
15
+ <h3>How do I setup your plugin?</h3>
16
+ </div>
17
+ <div class="gdpr-faq-accordion-content">
18
+ <p>You can setup the plugin in the WordPress CMS -> Settings -> GDPR Cookie. In the general settings, you can setup the branding, and other elements.</p>
19
+ <p>To add Google Analytics, you can enable the “3rd Party Cookies” tab but selecting the “Turn” radio value to “ON”. At the bottom of the “3rd Party Cookies” tab you’ll find 3 sections to add scripts – choose the section that is appropriate for your script.</p>
20
+ <p>For Google Analytics, we recommend using the ‘Footer’ section.</p>
21
+ </div>
22
+ <!-- .gdpr-faq-accordion-content -->
23
+ </div>
24
+ <!-- .gdpr-faq-toggle -->
25
+
26
+ <div class="gdpr-faq-toggle">
27
+ <div class="gdpr-faq-accordion-header">
28
+ <h3>How can I link to the pop-up settings screen?</h3>
29
+ </div>
30
+ <div class="gdpr-faq-accordion-content" >
31
+ <p>You can use the following link to display the modal window:</p>
32
+ <p>[Relative Path – RECOMMENDED]</p>
33
+ <code>/#gdpr_cookie_modal</code>
34
+
35
+ <p>[Absolute Path]</p>
36
+ <code><?php echo home_url(); ?>/#gdpr_cookie_modal</code><br /><br />
37
+ <code><?php echo home_url(); ?>/your-internal-page/#gdpr_cookie_modal</code>
38
+ </div>
39
+ <!-- .gdpr-faq-accordion-content -->
40
+ </div>
41
+ <!-- .gdpr-faq-toggle -->
42
+
43
+ <div class="gdpr-faq-toggle">
44
+ <div class="gdpr-faq-accordion-header">
45
+ <h3>Pasted code is not visible when view-source page is viewed.</h3>
46
+ </div>
47
+ <div class="gdpr-faq-accordion-content" >
48
+ <p>Our plugin loads the script with Javascript, and that’s why you can’t find it in the view-source page. You can use the developer console in Chrome browser (Inspect Element feature) and find the scripts.</p>
49
+ </div>
50
+ <!-- .gdpr-faq-accordion-content -->
51
+ </div>
52
+ <!-- .gdpr-faq-toggle -->
53
+
54
+ <div class="gdpr-faq-toggle">
55
+ <div class="gdpr-faq-accordion-header">
56
+ <h3>Can I use custom code or hooks with your plugin?</h3>
57
+ </div>
58
+ <div class="gdpr-faq-accordion-content" >
59
+ <p>Yes. We have implemented hooks that allow you to implement custom scripts, for some examples see the list of pre-defined hooks here: <a href="#gdpr_cbm_dh" class="gdpr-help-tab-toggle">Default Hooks</a></p>
60
+ </div>
61
+ <!-- .gdpr-faq-accordion-content -->
62
+ </div>
63
+ <!-- .gdpr-faq-toggle -->
64
+
65
+ <div class="gdpr-faq-toggle">
66
+ <div class="gdpr-faq-accordion-header">
67
+ <h3>Does the plugin support subdomains?</h3>
68
+ </div>
69
+ <div class="gdpr-faq-accordion-content" >
70
+ <p>Unfortunately not, subdomains are treated as separate domains by browsers and we’re unable to change the cookies stored by another domain. If your multisite setup use subdomain version, each subsite will be recognised as a separate domain by the browser and will create cookies for each subdomain.</p>
71
+ </div>
72
+ <!-- .gdpr-faq-accordion-content -->
73
+ </div>
74
+ <!-- .gdpr-faq-toggle -->
75
+
76
+ <div class="gdpr-faq-toggle">
77
+ <div class="gdpr-faq-accordion-header">
78
+ <h3>Does this plugin block all cookies?</h3>
79
+ </div>
80
+ <div class="gdpr-faq-accordion-content" >
81
+ <p>No. This plugin only restricts cookies for scripts that you have setup in the Settings. If you want to block all cookies, you have to add all scripts that use cookies into the Settings of this plugin.</p>
82
+ </div>
83
+ <!-- .gdpr-faq-accordion-content -->
84
+ </div>
85
+ <!-- .gdpr-faq-toggle -->
86
+
87
+ <div class="gdpr-faq-toggle">
88
+ <div class="gdpr-faq-accordion-header">
89
+ <h3>Once I add scripts to this plugin, should I delete them from the website’s code?</h3>
90
+ </div>
91
+ <div class="gdpr-faq-accordion-content" >
92
+ <p>Yes. Once you setup the plugin, you should delete the scripts you uploaded to the plugin from your website’s code to ensure that your scripts are not loaded twice.</p>
93
+ </div>
94
+ <!-- .gdpr-faq-accordion-content -->
95
+ </div>
96
+ <!-- .gdpr-faq-toggle -->
97
+
98
+ <div class="gdpr-faq-toggle">
99
+ <div class="gdpr-faq-accordion-header">
100
+ <h3>Does this plugin stop all cookies from being stored?</h3>
101
+ </div>
102
+ <div class="gdpr-faq-accordion-content" >
103
+ <p>This plugin is just a template and needs to be setup by your developer in order to work properly. Once setup fully, it will prevent scripts that store cookies from being loaded on users computers until consent is given.</p>
104
+ </div>
105
+ <!-- .gdpr-faq-accordion-content -->
106
+ </div>
107
+ <!-- .gdpr-faq-toggle -->
108
+
109
+ <div class="gdpr-faq-toggle">
110
+ <div class="gdpr-faq-accordion-header">
111
+ <h3>Does this plugin guarantee that I will comply with GDPR law?</h3>
112
+ </div>
113
+ <div class="gdpr-faq-accordion-content" >
114
+ <p>Unfortunately no. This plugin is just a template and needs to be setup by your developer in order to work properly.</p>
115
+ </div>
116
+ <!-- .gdpr-faq-accordion-content -->
117
+ </div>
118
+ <!-- .gdpr-faq-toggle -->
119
+ </div>
120
+ <!-- #gdpr_cbm_faq -->
121
+
122
+ <div id="gdpr_cbm_dh" class="gdpr-help-content-block">
123
+ <p>Below the hooks & custom scripts included in the GDPR Cookie Compliance plugin.</p>
124
+ <p><strong>Note: Some of them require some development work on your end to be extended or modified properly! These are just examples.</strong></p>
125
+
126
+ <div class="gdpr-faq-toggle gdpr-faq-open">
127
+ <div class="gdpr-faq-accordion-header">
128
+ <h3>HOOK to GDPR custom 3RD-PARTY script by php – HEAD</h3>
129
+ </div>
130
+ <div class="gdpr-faq-accordion-content">
131
+ <?php ob_start(); ?>
132
+ add_action('moove_gdpr_third_party_header_assets','moove_gdpr_third_party_header_assets');
133
+ function moove_gdpr_third_party_header_assets( $scripts ) {
134
+ $scripts .= '<script>console.log("third-party-head");</script>';
135
+ return $scripts;
136
+ }
137
+ <?php $code = trim( ob_get_clean() ); ?>
138
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
139
+ <div class="gdpr-code">
140
+
141
+ </div>
142
+ <!-- .gdpr-code -->
143
+ </div>
144
+ <!-- .gdpr-faq-accordion-content -->
145
+ </div>
146
+ <!-- .gdpr-faq-toggle -->
147
+
148
+ <div class="gdpr-faq-toggle">
149
+ <div class="gdpr-faq-accordion-header">
150
+ <h3>HOOK to GDPR custom 3RD-PARTY script by php – BODY</h3>
151
+ </div>
152
+ <div class="gdpr-faq-accordion-content" >
153
+ <?php ob_start(); ?>
154
+ add_action('moove_gdpr_third_party_body_assets','moove_gdpr_third_party_body_assets');
155
+ function moove_gdpr_third_party_body_assets( $scripts ) {
156
+ $scripts .= '<script>console.log("third-party-body");</script>';
157
+ return $scripts;
158
+ }
159
+ <?php $code = trim( ob_get_clean() ); ?>
160
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
161
+ <div class="gdpr-code">
162
+
163
+ </div>
164
+ <!-- .gdpr-code -->
165
+ </div>
166
+ <!-- .gdpr-faq-accordion-content -->
167
+ </div>
168
+ <!-- .gdpr-faq-toggle -->
169
+
170
+ <div class="gdpr-faq-toggle">
171
+ <div class="gdpr-faq-accordion-header">
172
+ <h3>HOOK to GDPR custom 3RD-PARTY script by php – FOOTER</h3>
173
+ </div>
174
+ <div class="gdpr-faq-accordion-content" >
175
+ <?php ob_start(); ?>
176
+ add_action('moove_gdpr_third_party_footer_assets','moove_gdpr_third_party_footer_assets');
177
+ function moove_gdpr_third_party_footer_assets( $scripts ) {
178
+ $scripts .= '<script>console.log("third-party-footer");</script>';
179
+ return $scripts;
180
+ }
181
+ <?php $code = trim( ob_get_clean() ); ?>
182
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
183
+ <div class="gdpr-code">
184
+
185
+ </div>
186
+ <!-- .gdpr-code -->
187
+ </div>
188
+ <!-- .gdpr-faq-accordion-content -->
189
+ </div>
190
+ <!-- .gdpr-faq-toggle -->
191
+
192
+ <div class="gdpr-faq-toggle">
193
+ <div class="gdpr-faq-accordion-header">
194
+ <h3>HOOK to GDPR custom ADVANCED-PARTY script by php – HEAD</h3>
195
+ </div>
196
+ <div class="gdpr-faq-accordion-content" >
197
+ <?php ob_start(); ?>
198
+ add_action('moove_gdpr_advanced_cookies_header_assets','moove_gdpr_advanced_cookies_header_assets');
199
+ function moove_gdpr_advanced_cookies_header_assets( $scripts ) {
200
+ $scripts .= '<script>console.log("advanced-head");</script>';
201
+ return $scripts;
202
+ }
203
+ <?php $code = trim( ob_get_clean() ); ?>
204
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
205
+ <div class="gdpr-code">
206
+
207
+ </div>
208
+ <!-- .gdpr-code -->
209
+ </div>
210
+ <!-- .gdpr-faq-accordion-content -->
211
+ </div>
212
+ <!-- .gdpr-faq-toggle -->
213
+
214
+ <div class="gdpr-faq-toggle">
215
+ <div class="gdpr-faq-accordion-header">
216
+ <h3>HOOK to GDPR custom ADVANCED-PARTY script by php – BODY</h3>
217
+ </div>
218
+ <div class="gdpr-faq-accordion-content" >
219
+ <?php ob_start(); ?>
220
+ add_action('moove_gdpr_advanced_cookies_body_assets','moove_gdpr_advanced_cookies_body_assets');
221
+ function moove_gdpr_advanced_cookies_body_assets( $scripts ) {
222
+ $scripts .= '<script>console.log("advanced-body");</script>';
223
+ return $scripts;
224
+ }
225
+ <?php $code = trim( ob_get_clean() ); ?>
226
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
227
+ <div class="gdpr-code">
228
+
229
+ </div>
230
+ <!-- .gdpr-code -->
231
+ </div>
232
+ <!-- .gdpr-faq-accordion-content -->
233
+ </div>
234
+ <!-- .gdpr-faq-toggle -->
235
+
236
+ <div class="gdpr-faq-toggle">
237
+ <div class="gdpr-faq-accordion-header">
238
+ <h3>HOOK to GDPR custom ADVANCED-PARTY script by php – FOOTER</h3>
239
+ </div>
240
+ <div class="gdpr-faq-accordion-content" >
241
+ <?php ob_start(); ?>
242
+ add_action('moove_gdpr_advanced_cookies_footer_assets','moove_gdpr_advanced_cookies_footer_assets');
243
+ function moove_gdpr_advanced_cookies_footer_assets( $scripts ) {
244
+ $scripts .= '<script>console.log("advanced-footer");</script>';
245
+ return $scripts;
246
+ }
247
+ <?php $code = trim( ob_get_clean() ); ?>
248
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
249
+ <div class="gdpr-code">
250
+
251
+ </div>
252
+ <!-- .gdpr-code -->
253
+ </div>
254
+ <!-- .gdpr-faq-accordion-content -->
255
+ </div>
256
+ <!-- .gdpr-faq-toggle -->
257
+
258
+ <div class="gdpr-faq-toggle">
259
+ <div class="gdpr-faq-accordion-header">
260
+ <h3>Disable Force Reload</h3>
261
+ </div>
262
+ <div class="gdpr-faq-accordion-content" >
263
+ <?php ob_start(); ?>
264
+ add_action( 'gdpr_force_reload', '__return_true' );
265
+ <?php $code = trim( ob_get_clean() ); ?>
266
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
267
+ <div class="gdpr-code">
268
+
269
+ </div>
270
+ <!-- .gdpr-code -->
271
+ </div>
272
+ <!-- .gdpr-faq-accordion-content -->
273
+ </div>
274
+ <!-- .gdpr-faq-toggle -->
275
+
276
+ <div class="gdpr-faq-toggle">
277
+ <div class="gdpr-faq-accordion-header">
278
+ <h3>PHP Cookie checker</h3>
279
+ </div>
280
+ <div class="gdpr-faq-accordion-content" >
281
+ <?php ob_start(); ?>
282
+ if ( function_exists( 'gdpr_cookie_is_accepted' ) ) {
283
+ if ( gdpr_cookie_is_accepted( 'thirdparty' ) ) {
284
+ echo "GDPR third party ENABLED content";
285
+ } else {
286
+ echo "GDPR third party RESTRICTED content";
287
+ }
288
+ }
289
+ <?php $code = trim( ob_get_clean() ); ?>
290
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
291
+ <div class="gdpr-code">
292
+
293
+ </div>
294
+ <!-- .gdpr-code -->
295
+ </div>
296
+ <!-- .gdpr-faq-accordion-content -->
297
+ </div>
298
+ <!-- .gdpr-faq-toggle -->
299
+
300
+ <div class="gdpr-faq-toggle">
301
+ <div class="gdpr-faq-accordion-header">
302
+ <h3>Extend Styles</h3>
303
+ </div>
304
+ <div class="gdpr-faq-accordion-content" >
305
+ <?php ob_start(); ?>
306
+ add_action('moove_gdpr_inline_styles','gdpr_cookie_css_extension',10,3);
307
+ function gdpr_cookie_css_extension( $styles, $primary, $secondary ) {
308
+ $styles .= '#main-header { z-index: 999; }';
309
+ $styles .= '#top-header { z-index: 1000 }';
310
+ $styles .= '.lity {z-index: 99999999;}';
311
+ return $styles;
312
+ }
313
+ <?php $code = trim( ob_get_clean() ); ?>
314
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
315
+ <div class="gdpr-code">
316
+
317
+ </div>
318
+ <!-- .gdpr-code -->
319
+ </div>
320
+ <!-- .gdpr-faq-accordion-content -->
321
+ </div>
322
+ <!-- .gdpr-faq-toggle -->
323
+
324
+ <div class="gdpr-faq-toggle">
325
+ <div class="gdpr-faq-accordion-header">
326
+ <h3>Disable Monster Insights based on cookie selected</h3>
327
+ </div>
328
+ <div class="gdpr-faq-accordion-content" >
329
+ <?php ob_start(); ?>
330
+ add_action( 'init', 'toggle_monster_insights_based_on_moove' );
331
+ function toggle_monster_insights_based_on_moove() {
332
+ if ( function_exists( gdpr_cookie_is_accepted ) && function_exists('monsterinsights_get_ua')) {
333
+ if ( gdpr_cookie_is_accepted('thirdparty') ) {
334
+ setCookie( 'ga-disable-'.monsterinsights_get_ua(), 'false' );
335
+ } else {
336
+ setCookie( 'ga-disable-'.monsterinsights_get_ua(), 'true' );
337
+ }
338
+ }
339
+ }
340
+ <?php $code = trim( ob_get_clean() ); ?>
341
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
342
+ <div class="gdpr-code">
343
+
344
+ </div>
345
+ <!-- .gdpr-code -->
346
+ </div>
347
+ <!-- .gdpr-faq-accordion-content -->
348
+ </div>
349
+ <!-- .gdpr-faq-toggle -->
350
+
351
+ <div class="gdpr-faq-toggle">
352
+ <div class="gdpr-faq-accordion-header">
353
+ <h3>Define CDN URL for Lity library</h3>
354
+ </div>
355
+ <div class="gdpr-faq-accordion-content" >
356
+ <?php ob_start(); ?>
357
+ add_action( 'gdpr_cdn_url', 'gdpr_cdn_url', 10, 1 );
358
+ function gdpr_cdn_url( $plugin_url ) {
359
+ $cdn_url = 'https://yourcdnurl.com';
360
+ return str_replace( trailingslashit( site_url() ) , trailingslashit( $cdn_url ), $plugin_url );
361
+ }
362
+ <?php $code = trim( ob_get_clean() ); ?>
363
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
364
+ <div class="gdpr-code">
365
+
366
+ </div>
367
+ <!-- .gdpr-code -->
368
+ </div>
369
+ <!-- .gdpr-faq-accordion-content -->
370
+ </div>
371
+ <!-- .gdpr-faq-toggle -->
372
+
373
+ <div class="gdpr-faq-toggle">
374
+ <div class="gdpr-faq-accordion-header">
375
+ <h3>Read cookie values with JavaScript</h3>
376
+ </div>
377
+ <div class="gdpr-faq-accordion-content" >
378
+ <?php ob_start(); ?>
379
+ add_action( 'wp_footer', 'gdpr_js_extension', 1000 );
380
+ function gdpr_js_extension() {
381
+ <script>
382
+ jQuery(document).ready(function(){
383
+ var cookies_object = jQuery(this).moove_gdpr_read_cookies();
384
+ if ( typeof cookies_object === 'object' ) {
385
+ console.log(cookies_object);
386
+
387
+ }
388
+ });
389
+ </script>
390
+ }
391
+ <?php $code = trim( ob_get_clean() ); ?>
392
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
393
+ <div class="gdpr-code">
394
+
395
+ </div>
396
+ <!-- .gdpr-code -->
397
+ </div>
398
+ <!-- .gdpr-faq-accordion-content -->
399
+ </div>
400
+ <!-- .gdpr-faq-toggle -->
401
+
402
+ <div class="gdpr-faq-toggle">
403
+ <div class="gdpr-faq-accordion-header">
404
+ <h3>Compatibility with Pixel Your Site plugin</h3>
405
+ </div>
406
+ <div class="gdpr-faq-accordion-content" >
407
+ <?php ob_start(); ?>
408
+ add_filter( 'pys_disable_by_gdpr', 'gdpr_cookie_compliance_pys' );
409
+ function gdpr_cookie_compliance_pys() {
410
+
411
+ if ( function_exists( 'gdpr_cookie_is_accepted' ) ) :
412
+
413
+ $disable_pys = gdpr_cookie_is_accepted( 'thirdparty' ) ? false : true;
414
+ return $disable_pys;
415
+ endif;
416
+
417
+ return true;
418
+ }
419
+
420
+ add_action( 'gdpr_force_reload', '__return_true' );
421
+ <?php $code = trim( ob_get_clean() ); ?>
422
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
423
+ <div class="gdpr-code">
424
+
425
+ </div>
426
+ <!-- .gdpr-code -->
427
+ </div>
428
+ <!-- .gdpr-faq-accordion-content -->
429
+ </div>
430
+ <!-- .gdpr-faq-toggle -->
431
+
432
+ <div class="gdpr-faq-toggle">
433
+ <div class="gdpr-faq-accordion-header">
434
+ <h3>Hook for WooCommerce Facebook Pixel plugin</h3>
435
+ </div>
436
+ <div class="gdpr-faq-accordion-content" >
437
+ <?php ob_start(); ?>
438
+ add_filter('facebook_for_woocommerce_integration_pixel_enabled', 'gdpr_cookie_facebook_wc', 20);
439
+ function gdpr_cookie_facebook_wc() {
440
+ $enable_fb_wc = true;
441
+ if ( function_exists( 'gdpr_cookie_is_accepted' ) ) :
442
+ $enable_fb_wc = gdpr_cookie_is_accepted( 'thirdparty' );
443
+ endif;
444
+ return $enable_fb_wc;
445
+ }
446
+ add_action( 'gdpr_force_reload', '__return_true' );
447
+ <?php $code = trim( ob_get_clean() ); ?>
448
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
449
+ <div class="gdpr-code">
450
+
451
+ </div>
452
+ <!-- .gdpr-code -->
453
+ </div>
454
+ <!-- .gdpr-faq-accordion-content -->
455
+ </div>
456
+ <!-- .gdpr-faq-toggle -->
457
+
458
+ <div class="gdpr-faq-toggle">
459
+ <div class="gdpr-faq-accordion-header">
460
+ <h3>Disable Script Caching</h3>
461
+ </div>
462
+ <div class="gdpr-faq-accordion-content" >
463
+ <?php ob_start(); ?>
464
+ add_action('gdpr_cookie_script_cache','gdpr_prevent_script_cache');
465
+ function gdpr_prevent_script_cache() {
466
+ return array();
467
+ }
468
+ <?php $code = trim( ob_get_clean() ); ?>
469
+ <textarea id="<?php echo uniqid( strtotime('now') ); ?>"><?php echo $code; ?></textarea>
470
+ <div class="gdpr-code">
471
+
472
+ </div>
473
+ <!-- .gdpr-code -->
474
+ </div>
475
+ <!-- .gdpr-faq-accordion-content -->
476
+ </div>
477
+ <!-- .gdpr-faq-toggle -->
478
+
479
+
480
+
481
+
482
+ </div>
483
+ <!-- #gdpr_cbm_faq -->
484
+
485
+ <div id="gdpr_cbm_ph" class="gdpr-help-content-block">
486
+ <?php do_action('gdpr_tab_cbm_ph'); ?>
487
+ </div>
488
+ <!-- #gdpr_cbm_ph -->
489
+
490
+ <div id="gdpr_cbm_ps" class="gdpr-help-content-block">
491
+ <?php do_action('gdpr_tab_cbm_ps'); ?>
492
+ </div>
493
+ <!-- #gdpr_cbm_ph -->
494
+
495
+ </div>
496
+ <!-- .gdpr-help-content-cnt -->
497
+
498
+
499
+
500
+ <script type="text/javascript" src="<?php echo moove_gdpr_get_plugin_directory_url(); ?>/dist/scripts/codemirror.js"></script>
501
+ <script type="text/javascript">
502
+
503
+ CodeMirror.defineExtension("autoFormatRange", function (from, to) {
504
+ var cm = this;
505
+ var outer = cm.getMode(), text = cm.getRange(from, to).split("\n");
506
+ var state = CodeMirror.copyState(outer, cm.getTokenAt(from).state);
507
+ var tabSize = cm.getOption("tabSize");
508
+
509
+ var out = "", lines = 0, atSol = from.ch == 0;
510
+ function newline() {
511
+ out += "\n";
512
+ atSol = true;
513
+ ++lines;
514
+ }
515
+
516
+ for (var i = 0; i < text.length; ++i) {
517
+ var stream = new CodeMirror.StringStream(text[i], tabSize);
518
+ while (!stream.eol()) {
519
+ var inner = CodeMirror.innerMode(outer, state);
520
+ var style = outer.token(stream, state), cur = stream.current();
521
+ stream.start = stream.pos;
522
+ if (!atSol || /\S/.test(cur)) {
523
+ out += cur;
524
+ atSol = false;
525
+ }
526
+ if (!atSol && inner.mode.newlineAfterToken &&
527
+ inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i+1] || "", inner.state))
528
+ newline();
529
+ }
530
+ if (!stream.pos && outer.blankLine) outer.blankLine(state);
531
+ if (!atSol) newline();
532
+ }
533
+
534
+ cm.operation(function () {
535
+ cm.replaceRange(out, from, to);
536
+ for (var cur = from.line + 1, end = from.line + lines; cur <= end; ++cur)
537
+ cm.indentLine(cur, "smart");
538
+ });
539
+ });
540
+
541
+ // Applies automatic mode-aware indentation to the specified range
542
+ CodeMirror.defineExtension("autoIndentRange", function (from, to) {
543
+ var cmInstance = this;
544
+ this.operation(function () {
545
+ for (var i = from.line; i <= to.line; i++) {
546
+ cmInstance.indentLine(i, "smart");
547
+ }
548
+ });
549
+ });
550
+ function GDPR_CodeMirror() {
551
+ jQuery('.gdpr-faq-accordion-content textarea').each(function(){
552
+ var element = jQuery(this).closest('.gdpr-faq-accordion-content').find('.gdpr-code')[0];
553
+ var id = jQuery(this).attr('id');
554
+ console.log(element);
555
+ jQuery(this).css({
556
+ 'opacity' : '0',
557
+ 'height' : '0',
558
+ });
559
+ var editor = CodeMirror( element, {
560
+ mode: "javascript",
561
+ lineWrapping: true,
562
+ lineNumbers: false,
563
+ readOnly: true,
564
+ value: document.getElementById(id).value
565
+ });
566
+ var totalLines = editor.lineCount();
567
+ editor.autoFormatRange({line:0, ch:0}, {line:totalLines});
568
+
569
+ });
570
+ }
571
+ jQuery(document).ready(function(){
572
+ GDPR_CodeMirror();
573
+ jQuery('.gdpr-faq-toggle:not(.gdpr-faq-open)').find('.gdpr-faq-accordion-content').hide();
574
+ jQuery('.gdpr-help-content-block:not(.help-block-open)').hide();
575
+ });
576
+
577
+
578
+ </script>
579
+ <style>
580
+ .CodeMirror {
581
+ height: auto;
582
+ border: none !important;
583
+ }
584
+ </style>
views/moove/admin/settings/iframe-blocker.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <h2><?php _e('Iframe Blocker','gdpr-cookie-compliance'); ?></h2>
2
+ <hr />
3
+
4
+ <?php do_action('gdpr_premium_section_ads'); ?>
views/moove/admin/settings/plugin_boxes.php CHANGED
@@ -35,37 +35,49 @@
35
  </div>
36
  <!-- .box-header -->
37
  <div class="box-content">
38
- <p>Enjoyed this plugin? <br />You can help by <a href="https://wordpress.org/support/plugin/gdpr-cookie-compliance/reviews/?rate=5#new-post" target="_blank">rating this plugin on wordpress.org.</a></p>
39
- <hr />
40
  <?php if ( $plugin_details ) : ?>
41
- <div class="plugin-stats">
42
- <div class="plugin-downloads">
43
- Downloads: <strong><?php echo number_format( $plugin_details->downloaded, 0, '', ','); ?></strong>
44
- </div>
45
- <!-- .plugin-downloads -->
46
- <div class="plugin-active-installs">
47
- Active installations: <strong><?php echo number_format( $plugin_details->active_installs, 0, '', ','); ?>+</strong>
48
- </div>
49
- <!-- .plugin-downloads -->
50
  <div class="plugin-rating">
51
- <?php
52
- $rating_val = $plugin_details->rating * 5 / 100;
53
- if ( $rating_val > 0 ) :
54
- $args = array(
55
- 'rating' => $rating_val,
56
- 'number' => $plugin_details->num_ratings,
57
- 'echo' => false
58
- );
59
- $rating = wp_star_rating( $args );
60
- endif;
61
- ?>
62
- <?php if ( $rating ) : ?>
63
- <?php echo $rating; ?>
64
- <?php endif; ?>
 
 
65
  </div>
66
  <!-- .plugin-rating -->
67
- </div>
68
- <!-- .plugin-stats -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  <?php endif; ?>
70
  </div>
71
  <!-- .box-content -->
35
  </div>
36
  <!-- .box-header -->
37
  <div class="box-content">
 
 
38
  <?php if ( $plugin_details ) : ?>
 
 
 
 
 
 
 
 
 
39
  <div class="plugin-rating">
40
+ <span class="plugin-stars">
41
+ <?php
42
+ $rating_val = $plugin_details->rating * 5 / 100;
43
+ if ( $rating_val > 0 ) :
44
+ $args = array(
45
+ 'rating' => $rating_val,
46
+ 'number' => $plugin_details->num_ratings,
47
+ 'echo' => false
48
+ );
49
+ $rating = wp_star_rating( $args );
50
+ endif;
51
+ ?>
52
+ <?php if ( $rating ) : ?>
53
+ <?php echo $rating; ?>
54
+ <?php endif; ?>
55
+ </span>
56
  </div>
57
  <!-- .plugin-rating -->
58
+ <?php endif; ?>
59
+ <p>Enjoyed this plugin? <br />You can help by <a href="https://wordpress.org/support/plugin/gdpr-cookie-compliance/reviews/?rate=5#new-post" target="_blank">rating this plugin on wordpress.org.</a></p>
60
+
61
+ <?php if ( $plugin_details ) : ?>
62
+
63
+
64
+ <span class="gdpr-review-container">
65
+ <a href="https://wordpress.org/support/plugin/gdpr-cookie-compliance/reviews/?rate=5#new-post" class="gdpr-review-bnt">Write a review</a>
66
+ </span>
67
+
68
+ <hr />
69
+ <div class="plugin-stats">
70
+ <div class="plugin-downloads">
71
+ Downloads: <strong><?php echo number_format( $plugin_details->downloaded, 0, '', ','); ?></strong>
72
+ </div>
73
+ <!-- .plugin-downloads -->
74
+ <div class="plugin-active-installs">
75
+ Active installations: <strong><?php echo number_format( $plugin_details->active_installs, 0, '', ','); ?>+</strong>
76
+ </div>
77
+ <!-- .plugin-downloads -->
78
+
79
+ </div>
80
+ <!-- .plugin-stats -->
81
  <?php endif; ?>
82
  </div>
83
  <!-- .box-content -->
views/moove/admin/settings/settings_page.php CHANGED
@@ -1,5 +1,11 @@
 
 
 
 
 
 
1
  <div class="wrap moove-clearfix" id="moove_form_checker_wrap">
2
- <h1><?php _e('GDPR Cookie Compliance Plugin Settings','gdpr-cookie-compliance'); ?></h1>
3
  <div id="moove-gdpr-setting-error-settings_updated" class="updated settings-error notice is-dismissible" style="display:none;">
4
  <p><strong><?php _e('Settings saved.','gdpr-cookie-compliance'); ?></strong></p>
5
  <button type="button" class="notice-dismiss">
@@ -16,7 +22,7 @@
16
  </button>
17
  </div>
18
 
19
- <h4><?php _e('General Data Protection Regulation (GDPR) is a <a href="http://www.eugdpr.org/" target="_blank">European regulation</a> to strengthen and unify the data protection of EU citizens.','gdpr-cookie-compliance'); ?><br> </h4>
20
 
21
  <?php
22
  $gdpr_default_content = new Moove_GDPR_Content();
@@ -24,7 +30,7 @@
24
  if( isset( $current_tab ) && $current_tab !== '' ) :
25
  $active_tab = $current_tab;
26
  else :
27
- $active_tab = "general_settings";
28
  endif; // end if
29
 
30
  ob_start();
@@ -41,10 +47,10 @@
41
  <div class="gdpr-tab-section-cnt">
42
 
43
  <h2 class="nav-tab-wrapper">
44
- <a href="?page=moove-gdpr&amp;tab=general_settings" class="nav-tab <?php echo $active_tab == 'general_settings' ? 'nav-tab-active' : ''; ?>">
45
- <?php _e('General Settings','gdpr-cookie-compliance'); ?>
46
  </a>
47
-
48
  <a href="?page=moove-gdpr&amp;tab=banner_settings" class="nav-tab <?php echo $active_tab == 'banner_settings' ? 'nav-tab-active' : ''; ?>">
49
  <?php _e('Banner Settings','gdpr-cookie-compliance'); ?>
50
  </a>
@@ -53,8 +59,10 @@
53
  <?php _e('Floating Button','gdpr-cookie-compliance'); ?>
54
  </a>
55
 
 
 
 
56
 
57
-
58
  <?php
59
  $nav_label = isset( $modal_options['moove_gdpr_privacy_overview_tab_title'.$wpml_lang] ) && $modal_options['moove_gdpr_privacy_overview_tab_title'.$wpml_lang] ? $modal_options['moove_gdpr_privacy_overview_tab_title'.$wpml_lang] : __('Privacy Overview','gdpr-cookie-compliance');
60
  ?>
@@ -62,6 +70,8 @@
62
  <?php echo $nav_label; ?>
63
  </a>
64
 
 
 
65
  <?php
66
  $nav_label = isset( $modal_options['moove_gdpr_strictly_necessary_cookies_tab_title'.$wpml_lang] ) && $modal_options['moove_gdpr_strictly_necessary_cookies_tab_title'.$wpml_lang] ? $modal_options['moove_gdpr_strictly_necessary_cookies_tab_title'.$wpml_lang] : __('Strictly Necessary Cookies','gdpr-cookie-compliance');
67
  ?>
@@ -89,6 +99,10 @@
89
  <?php echo $nav_label; ?>
90
  </a>
91
 
 
 
 
 
92
  <?php do_action('gdpr_settings_tab_nav_extensions', $active_tab); ?>
93
 
94
  </h2>
1
+ <div class="gdpr-cookie-compliance-header-section">
2
+ <h2><?php _e('GDPR Cookie Compliance Plugin','gdpr-cookie-compliance'); ?> <span class="gdpr-plugin-version"><?php echo 'v'.MOOVE_GDPR_VERSION ?></span></h2>
3
+ <h4><?php _e('General Data Protection Regulation (GDPR) is a <a href="http://www.eugdpr.org/" target="_blank">European regulation</a> to strengthen and unify the data protection of EU citizens.','gdpr-cookie-compliance'); ?><br> </h4>
4
+ </div>
5
+ <!-- .gdpr-header-section -->
6
+
7
  <div class="wrap moove-clearfix" id="moove_form_checker_wrap">
8
+ <h1></h1>
9
  <div id="moove-gdpr-setting-error-settings_updated" class="updated settings-error notice is-dismissible" style="display:none;">
10
  <p><strong><?php _e('Settings saved.','gdpr-cookie-compliance'); ?></strong></p>
11
  <button type="button" class="notice-dismiss">
22
  </button>
23
  </div>
24
 
25
+
26
 
27
  <?php
28
  $gdpr_default_content = new Moove_GDPR_Content();
30
  if( isset( $current_tab ) && $current_tab !== '' ) :
31
  $active_tab = $current_tab;
32
  else :
33
+ $active_tab = "branding";
34
  endif; // end if
35
 
36
  ob_start();
47
  <div class="gdpr-tab-section-cnt">
48
 
49
  <h2 class="nav-tab-wrapper">
50
+ <a href="?page=moove-gdpr&amp;tab=branding" class="nav-tab <?php echo $active_tab == 'branding' ? 'nav-tab-active' : ''; ?>">
51
+ <?php _e('Branding','gdpr-cookie-compliance'); ?>
52
  </a>
53
+
54
  <a href="?page=moove-gdpr&amp;tab=banner_settings" class="nav-tab <?php echo $active_tab == 'banner_settings' ? 'nav-tab-active' : ''; ?>">
55
  <?php _e('Banner Settings','gdpr-cookie-compliance'); ?>
56
  </a>
59
  <?php _e('Floating Button','gdpr-cookie-compliance'); ?>
60
  </a>
61
 
62
+ <a href="?page=moove-gdpr&amp;tab=general_settings" class="nav-tab <?php echo $active_tab == 'general_settings' ? 'nav-tab-active' : ''; ?>">
63
+ <?php _e('General Settings','gdpr-cookie-compliance'); ?>
64
+ </a>
65
 
 
66
  <?php
67
  $nav_label = isset( $modal_options['moove_gdpr_privacy_overview_tab_title'.$wpml_lang] ) && $modal_options['moove_gdpr_privacy_overview_tab_title'.$wpml_lang] ? $modal_options['moove_gdpr_privacy_overview_tab_title'.$wpml_lang] : __('Privacy Overview','gdpr-cookie-compliance');
68
  ?>
70
  <?php echo $nav_label; ?>
71
  </a>
72
 
73
+
74
+
75
  <?php
76
  $nav_label = isset( $modal_options['moove_gdpr_strictly_necessary_cookies_tab_title'.$wpml_lang] ) && $modal_options['moove_gdpr_strictly_necessary_cookies_tab_title'.$wpml_lang] ? $modal_options['moove_gdpr_strictly_necessary_cookies_tab_title'.$wpml_lang] : __('Strictly Necessary Cookies','gdpr-cookie-compliance');
77
  ?>
99
  <?php echo $nav_label; ?>
100
  </a>
101
 
102
+ <a href="?page=moove-gdpr&amp;tab=help" class="nav-tab <?php echo $active_tab == 'help' ? 'nav-tab-active' : ''; ?>">
103
+ <?php _e('Help','gdpr-cookie-compliance'); ?>
104
+ </a>
105
+
106
  <?php do_action('gdpr_settings_tab_nav_extensions', $active_tab); ?>
107
 
108
  </h2>
views/moove/admin/settings/strictly_necessary_cookies.php CHANGED
@@ -24,6 +24,11 @@
24
  $gdpr_options[$form_key.$wpml_lang] = $value;
25
  update_option( $option_name, $gdpr_options );
26
  $gdpr_options = get_option( $option_name );
 
 
 
 
 
27
  elseif ( $form_key === 'moove_gdpr_strictly_necessary_cookies_warning' ) :
28
  $value = wp_unslash( $form_value );
29
  $gdpr_options[$form_key.$wpml_lang] = $value;
@@ -83,7 +88,7 @@
83
  </th>
84
  </tr>
85
  <tr class="moove_gdpr_table_form_holder">
86
- <th colspan="2" scope="row">
87
  <?php
88
  $content = isset( $gdpr_options['moove_gdpr_strict_necessary_cookies_tab_content'.$wpml_lang] ) && $gdpr_options['moove_gdpr_strict_necessary_cookies_tab_content'.$wpml_lang] ? wp_unslash( $gdpr_options['moove_gdpr_strict_necessary_cookies_tab_content'.$wpml_lang] ) : false;
89
  if ( ! $content ) :
@@ -97,7 +102,7 @@
97
  );
98
  wp_editor( $content, 'moove_gdpr_strict_necessary_cookies_tab_content', $settings );
99
  ?>
100
- </th>
101
  </tr>
102
 
103
  <tr>
@@ -106,18 +111,41 @@
106
  </th>
107
  </tr>
108
  <tr>
109
- <th style="padding-top: 10px;" colspan="2">
110
  <?php $content = isset( $gdpr_options['moove_gdpr_strictly_necessary_cookies_warning'.$wpml_lang] ) && $gdpr_options['moove_gdpr_strictly_necessary_cookies_warning'.$wpml_lang] ? $gdpr_options['moove_gdpr_strictly_necessary_cookies_warning'.$wpml_lang] : $gdpr_default_content->moove_gdpr_get_strict_necessary_warning(); ?>
111
  <?php
112
  $settings = array (
113
  'media_buttons' => false,
114
- 'editor_height' => 50,
115
  );
116
  wp_editor( $content, 'moove_gdpr_strictly_necessary_cookies_warning', $settings );
117
  ?>
118
- <p class="description" id="moove_gdpr_strictly_necessary_cookies_warning-description"><?php _e('Will be displayed below the Checkbox in the front-end!','gdpr-cookie-compliance'); ?></p>
 
 
 
 
 
 
119
  </th>
120
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  </tbody>
122
  </table>
123
 
24
  $gdpr_options[$form_key.$wpml_lang] = $value;
25
  update_option( $option_name, $gdpr_options );
26
  $gdpr_options = get_option( $option_name );
27
+ elseif ( $form_key === 'moove_gdpr_modal_strictly_secondary_notice' ) :
28
+ $value = wpautop( wp_unslash( $form_value ) );
29
+ $gdpr_options[$form_key.$wpml_lang] = $value;
30
+ update_option( $option_name, $gdpr_options );
31
+ $gdpr_options = get_option( $option_name );
32
  elseif ( $form_key === 'moove_gdpr_strictly_necessary_cookies_warning' ) :
33
  $value = wp_unslash( $form_value );
34
  $gdpr_options[$form_key.$wpml_lang] = $value;
88
  </th>
89
  </tr>
90
  <tr class="moove_gdpr_table_form_holder">
91
+ <td colspan="2" scope="row" style="padding-left: 0;">
92
  <?php
93
  $content = isset( $gdpr_options['moove_gdpr_strict_necessary_cookies_tab_content'.$wpml_lang] ) && $gdpr_options['moove_gdpr_strict_necessary_cookies_tab_content'.$wpml_lang] ? wp_unslash( $gdpr_options['moove_gdpr_strict_necessary_cookies_tab_content'.$wpml_lang] ) : false;
94
  if ( ! $content ) :
102
  );
103
  wp_editor( $content, 'moove_gdpr_strict_necessary_cookies_tab_content', $settings );
104
  ?>
105
+ </td>
106
  </tr>
107
 
108
  <tr>
111
  </th>
112
  </tr>
113
  <tr>
114
+ <td style="padding-top: 10px; padding-left: 0;" colspan="2">
115
  <?php $content = isset( $gdpr_options['moove_gdpr_strictly_necessary_cookies_warning'.$wpml_lang] ) && $gdpr_options['moove_gdpr_strictly_necessary_cookies_warning'.$wpml_lang] ? $gdpr_options['moove_gdpr_strictly_necessary_cookies_warning'.$wpml_lang] : $gdpr_default_content->moove_gdpr_get_strict_necessary_warning(); ?>
116
  <?php
117
  $settings = array (
118
  'media_buttons' => false,
119
+ 'editor_height' => 100,
120
  );
121
  wp_editor( $content, 'moove_gdpr_strictly_necessary_cookies_warning', $settings );
122
  ?>
123
+ <p class="description"><?php _e('This warning message will be displayed when user disables the Strictly Necessary Cookies.','gdpr-cookie-compliance'); ?></p>
124
+ </td>
125
+ </tr>
126
+
127
+ <tr>
128
+ <th scope="row" style="padding-bottom: 0;" colspan="2">
129
+ <label for="moove_gdpr_modal_strictly_secondary_notice"><?php _e('Strictly necessary required message.','gdpr-cookie-compliance'); ?></label>
130
  </th>
131
  </tr>
132
+ <tr>
133
+ <td colspan="2" style="padding-left: 0;">
134
+ <?php $content = isset( $gdpr_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ) && $gdpr_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] ? $gdpr_options['moove_gdpr_modal_strictly_secondary_notice'.$wpml_lang] : $gdpr_default_content->moove_gdpr_get_secondary_notice() ; ?>
135
+ <?php
136
+ $settings = array (
137
+ 'media_buttons' => false,
138
+ 'editor_height' => 100,
139
+ );
140
+ wp_editor( $content, 'moove_gdpr_modal_strictly_secondary_notice', $settings );
141
+ ?>
142
+
143
+
144
+ <p class="description"><?php _e('This warning message will be displayed if the Strictly necessary cookies are not enabled and the user try to enable the "Third Party" or "Additional cookies"','gdpr-cookie-compliance'); ?></p>
145
+ </td>
146
+
147
+ </tr>
148
+
149
  </tbody>
150
  </table>
151
 
views/moove/admin/settings/third_party_cookies.php CHANGED
@@ -11,7 +11,7 @@
11
  die( 'Security check' );
12
  else :
13
  if ( is_array( $_POST ) ) :
14
- if ( isset( $_POST['moove_gdpr_third_party_cookies_enable'] ) && intval( $_POST['moove_gdpr_third_party_cookies_enable'] ) === 1 ) :
15
  $value = 1;
16
  else :
17
  $value = 0;
@@ -21,6 +21,12 @@
21
  $empty_scripts = true;
22
  endif;
23
  endif;
 
 
 
 
 
 
24
  if ( ! $empty_scripts ) :
25
  $gdpr_options['moove_gdpr_third_party_cookies_enable'] = $value;
26
  update_option( $option_name, $gdpr_options );
@@ -36,7 +42,7 @@
36
  $gdpr_options[$form_key] = maybe_serialize( $value );
37
  update_option( $option_name, $gdpr_options );
38
  $gdpr_options = get_option( $option_name );
39
- elseif ( $form_key !== 'moove_gdpr_third_party_cookies_enable' ) :
40
  $value = sanitize_text_field( wp_unslash( $form_value ) );
41
  $gdpr_options[$form_key] = $value;
42
  update_option( $option_name, $gdpr_options );
@@ -76,19 +82,28 @@
76
  <label for="moove_gdpr_third_party_cookies_enable"><?php _e('Turn','gdpr-cookie-compliance'); ?></label>
77
  </th>
78
  <td>
79
- <input name="moove_gdpr_third_party_cookies_enable" type="radio" value="1" id="moove_gdpr_third_party_cookies_enable_on" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) === 1 ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_third_party_cookies_enable_on"><?php _e('On','gdpr-cookie-compliance'); ?></label> <span class="separator"></span>
80
- <input name="moove_gdpr_third_party_cookies_enable" type="radio" value="0" id="moove_gdpr_third_party_cookies_enable_off" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) === 0 ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_third_party_cookies_enable_off"><?php _e('Off','gdpr-cookie-compliance'); ?></label>
 
 
 
81
  </td>
82
  </tr>
83
 
84
  <tr>
85
  <th scope="row">
86
- <label for="moove_gdpr_third_party_cookies_enable_first_visit"><?php _e('Enable by default','gdpr-cookie-compliance'); ?></label>
 
 
87
  </th>
88
- <td>
89
- <input name="moove_gdpr_third_party_cookies_enable_first_visit" type="radio" value="0" id="moove_gdpr_third_party_cookies_enable_first_visit_off" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? ( ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) === 0 || intval( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) > 1 ) ? 'checked' : '' ) : 'checked'; ?> class="on-off"> <label for="moove_gdpr_third_party_cookies_enable_first_visit_off"><?php _e('Disable','gdpr-cookie-compliance'); ?></label> <span class="separator"></span>
90
-
91
- <input name="moove_gdpr_third_party_cookies_enable_first_visit" type="radio" value="1" id="moove_gdpr_third_party_cookies_enable_first_visit_on" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) === 1 ? 'checked' : '' ) : ''; ?> class="on-off"> <label for="moove_gdpr_third_party_cookies_enable_first_visit_on"><?php _e('Enable','gdpr-cookie-compliance'); ?></label>
 
 
 
 
92
  </td>
93
  </tr>
94
 
@@ -123,60 +138,120 @@
123
  ?>
124
  </th>
125
  </tr>
 
 
126
 
127
- <tr>
128
- <th scope="row" colspan="2" style="padding-bottom: 0;">
129
- <div class="alert script-error" style="display: none;"><?php _e('Please fill out at least one of these fields:','gdpr-cookie-compliance'); ?></div>
130
- </th>
131
- </tr>
132
-
133
- <tr>
134
- <th scope="row" colspan="2" style="padding-bottom: 0;">
135
- <label for="moove_gdpr_third_party_header_scripts"><?php _e('The below script will be added to the page HEAD section if user enables this cookie.','gdpr-cookie-compliance'); ?></label>
136
- </th>
137
- </tr>
138
- <tr class="moove_gdpr_third_party_header_scripts">
139
- <th scope="row" colspan="2">
140
- <?php $content = isset( $gdpr_options['moove_gdpr_third_party_header_scripts'] ) && $gdpr_options['moove_gdpr_third_party_header_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_header_scripts'] ) : '';
141
- ?>
142
- <textarea name="moove_gdpr_third_party_header_scripts" id="moove_gdpr_third_party_header_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
143
- <p class="description" id="moove_gdpr_third_party_header_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
144
- </th>
145
- </tr>
146
-
147
-
148
- <tr>
149
- <th scope="row" colspan="2" style="padding-bottom: 0;">
150
- <label for="moove_gdpr_third_party_body_scripts"><?php _e('The below script will be added right after the BODY section if user enables this cookie.','gdpr-cookie-compliance'); ?></label>
151
- </th>
152
- </tr>
153
- <tr class="moove_gdpr_third_party_body_scripts">
154
- <th scope="row" colspan="2">
155
- <?php $content = isset( $gdpr_options['moove_gdpr_third_party_body_scripts'] ) && $gdpr_options['moove_gdpr_third_party_body_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_body_scripts'] ) : '';
156
- ?>
157
- <textarea name="moove_gdpr_third_party_body_scripts" id="moove_gdpr_third_party_body_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
158
- <p class="description" id="moove_gdpr_third_party_body_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
159
- </th>
160
- </tr>
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
 
163
- <tr>
164
- <th scope="row" colspan="2" style="padding-bottom: 0;">
165
- <label for="moove_gdpr_third_party_footer_scripts"><?php _e('The below script will be added to the page FOOTER section if user enables this cookie.','gdpr-cookie-compliance'); ?></label>
166
- </th>
167
- </tr>
168
- <tr class="moove_gdpr_third_party_footer_scripts">
169
- <th scope="row" colspan="2">
170
- <?php $content = isset( $gdpr_options['moove_gdpr_third_party_footer_scripts'] ) && $gdpr_options['moove_gdpr_third_party_footer_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_footer_scripts'] ) : '';
171
- ?>
172
- <textarea name="moove_gdpr_third_party_footer_scripts" id="moove_gdpr_third_party_footer_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
173
- <p class="description" id="moove_gdpr_third_party_footer_scripts-description"><?php _e('For example, you can use it for Google Analytics script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
174
- </th>
175
- </tr>
176
- </tbody>
177
- </table>
 
 
 
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  <hr />
180
  <br />
181
  <button type="submit" class="button button-primary"><?php _e('Save changes','gdpr-cookie-compliance'); ?></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  </form>
11
  die( 'Security check' );
12
  else :
13
  if ( is_array( $_POST ) ) :
14
+ if ( isset( $_POST['moove_gdpr_third_party_cookies_enable'] ) ) :
15
  $value = 1;
16
  else :
17
  $value = 0;
21
  $empty_scripts = true;
22
  endif;
23
  endif;
24
+
25
+ $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] = 0;
26
+ if ( isset( $_POST['moove_gdpr_third_party_cookies_enable_first_visit'] ) ) :
27
+ $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] = 1;
28
+ endif;
29
+
30
  if ( ! $empty_scripts ) :
31
  $gdpr_options['moove_gdpr_third_party_cookies_enable'] = $value;
32
  update_option( $option_name, $gdpr_options );
42
  $gdpr_options[$form_key] = maybe_serialize( $value );
43
  update_option( $option_name, $gdpr_options );
44
  $gdpr_options = get_option( $option_name );
45
+ elseif ( $form_key !== 'moove_gdpr_third_party_cookies_enable' && $form_key !== 'moove_gdpr_third_party_cookies_enable_first_visit' ) :
46
  $value = sanitize_text_field( wp_unslash( $form_value ) );
47
  $gdpr_options[$form_key] = $value;
48
  update_option( $option_name, $gdpr_options );
82
  <label for="moove_gdpr_third_party_cookies_enable"><?php _e('Turn','gdpr-cookie-compliance'); ?></label>
83
  </th>
84
  <td>
85
+ <!-- GDPR Rounded switch -->
86
+ <label class="gdpr-checkbox-toggle">
87
+ <input type="checkbox" name="moove_gdpr_third_party_cookies_enable" id="moove_gdpr_third_party_cookies_enable" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) ? 'checked' : '' ) ) : ''; ?> >
88
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('On','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Off','gdpr-cookie-compliance'); ?>"></span>
89
+ </label>
90
  </td>
91
  </tr>
92
 
93
  <tr>
94
  <th scope="row">
95
+ <label for="moove_gdpr_third_party_cookies_enable_first_visit"><?php _e('Default status','gdpr-cookie-compliance'); ?></label>
96
+ <p class="description"><?php _e('by default cookies should be','gdpr-cookie-compliance'); ?>:</p>
97
+ <!-- .description -->
98
  </th>
99
+
100
+
101
+ <td style="vertical-align: top; padding-top: 20px">
102
+ <!-- GDPR Rounded switch -->
103
+ <label class="gdpr-checkbox-toggle">
104
+ <input type="checkbox" name="moove_gdpr_third_party_cookies_enable_first_visit" id="moove_gdpr_third_party_cookies_enable_first_visit" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? 'checked' : '' ) ) : ''; ?> >
105
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('Enabled','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Disabled','gdpr-cookie-compliance'); ?>"></span>
106
+ </label>
107
  </td>
108
  </tr>
109
 
138
  ?>
139
  </th>
140
  </tr>
141
+ </tbody>
142
+ </table>
143
 
144
+ <div class="gdpr-script-tab-content">
145
+ <hr />
146
+ <h3><?php _e('Paste your codes and snippets below. They will be added to all pages if user enables these cookies.','gdpr-cookie-compliance'); ?></h3>
147
+ <div class="alert script-error" style="display: none;"><?php _e('Please fill out at least one of these fields:','gdpr-cookie-compliance'); ?></div>
148
+
149
+ <div class="gdpr-tab-code-section-nav">
150
+ <ul>
151
+ <li>
152
+ <a href="#third_party_head" class="gdpr-active">Head Section</a>
153
+ </li>
154
+ <li>
155
+ <a href="#third_party_body">Body Section</a>
156
+ </li>
157
+ <li>
158
+ <a href="#third_party_footer">Footer Section</a>
159
+ </li>
160
+ </ul>
161
+ </div>
162
+ <!-- .gdpr-tab-code-section-nav -->
163
+ <div class="gdpr-script-tabs-main-cnt">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
 
165
+ <div class="gdpr-tab-code-section gdpr-active" id="third_party_head">
166
+ <h4 for="moove_gdpr_third_party_header_scripts"><?php _e('Add scripts that you would like to be inserted to the HEAD section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
167
+ <table>
168
+ <tbody>
169
+ <tr class="moove_gdpr_third_party_header_scripts">
170
+ <td scope="row" colspan="2" style="padding: 20px 0;">
171
+ <?php $content = isset( $gdpr_options['moove_gdpr_third_party_header_scripts'] ) && $gdpr_options['moove_gdpr_third_party_header_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_header_scripts'] ) : '';
172
+ ?>
173
+ <textarea name="moove_gdpr_third_party_header_scripts" id="moove_gdpr_third_party_header_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
174
+ <div class="gdpr-code"></div>
175
+ <!-- .gdpr-code -->
176
+ <p class="description" id="moove_gdpr_third_party_header_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
177
+ </td>
178
+ </tr>
179
+ </tbody>
180
+ </table>
181
+ </div>
182
+ <!-- .gdpr-tab-code-section -->
183
 
184
+ <div class="gdpr-tab-code-section" id="third_party_body">
185
+ <h4 for="moove_gdpr_third_party_header_scripts"><?php _e('Add scripts that you would like to be inserted to the BODY section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
186
+ <table>
187
+ <tbody>
188
+ <tr class="moove_gdpr_third_party_body_scripts">
189
+ <td scope="row" colspan="2" style="padding: 20px 0;">
190
+ <?php $content = isset( $gdpr_options['moove_gdpr_third_party_body_scripts'] ) && $gdpr_options['moove_gdpr_third_party_body_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_body_scripts'] ) : '';
191
+ ?>
192
+ <textarea name="moove_gdpr_third_party_body_scripts" id="moove_gdpr_third_party_body_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
193
+ <div class="gdpr-code"></div>
194
+ <!-- .gdpr-code -->
195
+ <p class="description" id="moove_gdpr_third_party_body_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
196
+ </td>
197
+ </tr>
198
+ </tbody>
199
+ </table>
200
+ </div>
201
+ <!-- .gdpr-tab-code-section -->
202
 
203
+ <div class="gdpr-tab-code-section" id="third_party_footer">
204
+ <h4 for="moove_gdpr_third_party_header_scripts"><?php _e('Add scripts that you would like to be inserted to the FOOTER section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
205
+ <table>
206
+ <tbody>
207
+ <tr class="moove_gdpr_third_party_footer_scripts">
208
+ <td scope="row" colspan="2" style="padding: 20px 0;">
209
+ <?php $content = isset( $gdpr_options['moove_gdpr_third_party_footer_scripts'] ) && $gdpr_options['moove_gdpr_third_party_footer_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_footer_scripts'] ) : '';
210
+ ?>
211
+ <textarea name="moove_gdpr_third_party_footer_scripts" id="moove_gdpr_third_party_footer_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
212
+ <div class="gdpr-code"></div>
213
+ <!-- .gdpr-code -->
214
+ <p class="description" id="moove_gdpr_third_party_footer_scripts-description"><?php _e('For example, you can use it for Google Analytics script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
215
+ </td>
216
+ </tr>
217
+ </tbody>
218
+ </table>
219
+ </div>
220
+ <!-- .gdpr-tab-code-section -->
221
+ </div>
222
+ <!-- .gdpr-script-tabs-main-cnt -->
223
+ </div>
224
+ <!-- .gdpr-script-tab-content -->
225
+ <br />
226
  <hr />
227
  <br />
228
  <button type="submit" class="button button-primary"><?php _e('Save changes','gdpr-cookie-compliance'); ?></button>
229
+
230
+ <script type="text/javascript" src="<?php echo moove_gdpr_get_plugin_directory_url(); ?>/dist/scripts/codemirror.js"></script>
231
+ <script type="text/javascript">
232
+ window.onload = function() {
233
+ jQuery('.gdpr-tab-section-cnt textarea.code').each(function(){
234
+ var element = jQuery(this).closest('tr').find('.gdpr-code')[0];
235
+ var id = jQuery(this).attr('id');
236
+ console.log(element);
237
+ jQuery(this).css({
238
+ 'opacity' : '0',
239
+ 'height' : '0',
240
+ });
241
+ var editor = CodeMirror( element, {
242
+ mode: "text/html",
243
+ lineWrapping: true,
244
+ lineNumbers: true,
245
+ value: document.getElementById(id).value
246
+ });
247
+ editor.on('change',function(cMirror){
248
+ // get value right from instance
249
+ document.getElementById(id).innerHTML = cMirror.getValue();
250
+ });
251
+
252
+ });
253
+
254
+
255
+ };
256
+ </script>
257
  </form>