File manager - Edit - /home/linknsbh/sabel-eltaqwa.com/assets/lfm/files/shares/events/thumbs/pagebuilder.tar
Back
main.min.js 0000644 00003011402 15213377537 0006626 0 ustar 00 // Copyright (c) 2018-current, Artur Arseniev // All rights reserved. !function(t,e){'object'==typeof exports&&'object'==typeof module?module.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof exports?exports["grapesjs"]=e():t["grapesjs"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(t,'__esModule',{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&'object'==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:t}),2&e&&'string'!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t['default']}:function(){return t};return n.d(e,'a',e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=97)}([function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return Cn})),n.d(e,"VERSION",(function(){return i["e"]})),n.d(e,"restArguments",(function(){return o})),n.d(e,"isObject",(function(){return a})),n.d(e,"isNull",(function(){return s})),n.d(e,"isUndefined",(function(){return l})),n.d(e,"isBoolean",(function(){return c})),n.d(e,"isElement",(function(){return u})),n.d(e,"isString",(function(){return h})),n.d(e,"isNumber",(function(){return f})),n.d(e,"isDate",(function(){return p})),n.d(e,"isRegExp",(function(){return g})),n.d(e,"isError",(function(){return v})),n.d(e,"isSymbol",(function(){return m})),n.d(e,"isArrayBuffer",(function(){return b})),n.d(e,"isDataView",(function(){return j})),n.d(e,"isArray",(function(){return T})),n.d(e,"isFunction",(function(){return x})),n.d(e,"isArguments",(function(){return M})),n.d(e,"isFinite",(function(){return D})),n.d(e,"isNaN",(function(){return A})),n.d(e,"isTypedArray",(function(){return R})),n.d(e,"isEmpty",(function(){return U})),n.d(e,"isMatch",(function(){return B})),n.d(e,"isEqual",(function(){return Y})),n.d(e,"isMap",(function(){return ot})),n.d(e,"isWeakMap",(function(){return at})),n.d(e,"isSet",(function(){return st})),n.d(e,"isWeakSet",(function(){return lt})),n.d(e,"keys",(function(){return $})),n.d(e,"allKeys",(function(){return X})),n.d(e,"values",(function(){return ct})),n.d(e,"pairs",(function(){return ut})),n.d(e,"invert",(function(){return dt})),n.d(e,"functions",(function(){return ht})),n.d(e,"methods",(function(){return ht})),n.d(e,"extend",(function(){return pt})),n.d(e,"extendOwn",(function(){return gt})),n.d(e,"assign",(function(){return gt})),n.d(e,"defaults",(function(){return vt})),n.d(e,"create",(function(){return bt})),n.d(e,"clone",(function(){return yt})),n.d(e,"tap",(function(){return wt})),n.d(e,"get",(function(){return St})),n.d(e,"has",(function(){return kt})),n.d(e,"mapObject",(function(){return Lt})),n.d(e,"identity",(function(){return jt})),n.d(e,"constant",(function(){return L})),n.d(e,"noop",(function(){return _t})),n.d(e,"toPath",(function(){return xt})),n.d(e,"property",(function(){return Pt})),n.d(e,"propertyOf",(function(){return Nt})),n.d(e,"matcher",(function(){return Tt})),n.d(e,"matches",(function(){return Tt})),n.d(e,"times",(function(){return It})),n.d(e,"random",(function(){return Ft})),n.d(e,"now",(function(){return Vt})),n.d(e,"escape",(function(){return Ht})),n.d(e,"unescape",(function(){return $t})),n.d(e,"templateSettings",(function(){return Ut})),n.d(e,"template",(function(){return Kt})),n.d(e,"result",(function(){return Yt})),n.d(e,"uniqueId",(function(){return Jt})),n.d(e,"chain",(function(){return Zt})),n.d(e,"iteratee",(function(){return Dt})),n.d(e,"partial",(function(){return ee})),n.d(e,"bind",(function(){return ne})),n.d(e,"bindAll",(function(){return oe})),n.d(e,"memoize",(function(){return ae})),n.d(e,"delay",(function(){return se})),n.d(e,"defer",(function(){return le})),n.d(e,"throttle",(function(){return ce})),n.d(e,"debounce",(function(){return ue})),n.d(e,"wrap",(function(){return de})),n.d(e,"negate",(function(){return he})),n.d(e,"compose",(function(){return fe})),n.d(e,"after",(function(){return pe})),n.d(e,"before",(function(){return ge})),n.d(e,"once",(function(){return ve})),n.d(e,"findKey",(function(){return me})),n.d(e,"findIndex",(function(){return ye})),n.d(e,"findLastIndex",(function(){return we})),n.d(e,"sortedIndex",(function(){return xe})),n.d(e,"indexOf",(function(){return Ce})),n.d(e,"lastIndexOf",(function(){return Se})),n.d(e,"find",(function(){return ke})),n.d(e,"detect",(function(){return ke})),n.d(e,"findWhere",(function(){return je})),n.d(e,"each",(function(){return Te})),n.d(e,"forEach",(function(){return Te})),n.d(e,"map",(function(){return Pe})),n.d(e,"collect",(function(){return Pe})),n.d(e,"reduce",(function(){return Me})),n.d(e,"foldl",(function(){return Me})),n.d(e,"inject",(function(){return Me})),n.d(e,"reduceRight",(function(){return De})),n.d(e,"foldr",(function(){return De})),n.d(e,"filter",(function(){return Ae})),n.d(e,"select",(function(){return Ae})),n.d(e,"reject",(function(){return Le})),n.d(e,"every",(function(){return _e})),n.d(e,"all",(function(){return _e})),n.d(e,"some",(function(){return Ne})),n.d(e,"any",(function(){return Ne})),n.d(e,"contains",(function(){return Ie})),n.d(e,"includes",(function(){return Ie})),n.d(e,"include",(function(){return Ie})),n.d(e,"invoke",(function(){return Fe})),n.d(e,"pluck",(function(){return Ve})),n.d(e,"where",(function(){return Re})),n.d(e,"max",(function(){return ze})),n.d(e,"min",(function(){return He})),n.d(e,"shuffle",(function(){return Ue})),n.d(e,"sample",(function(){return $e})),n.d(e,"sortBy",(function(){return Be})),n.d(e,"groupBy",(function(){return qe})),n.d(e,"indexBy",(function(){return Ge})),n.d(e,"countBy",(function(){return Ke})),n.d(e,"partition",(function(){return Ye})),n.d(e,"toArray",(function(){return Je})),n.d(e,"size",(function(){return Ze})),n.d(e,"pick",(function(){return tn})),n.d(e,"omit",(function(){return en})),n.d(e,"first",(function(){return rn})),n.d(e,"head",(function(){return rn})),n.d(e,"take",(function(){return rn})),n.d(e,"initial",(function(){return nn})),n.d(e,"last",(function(){return an})),n.d(e,"rest",(function(){return on})),n.d(e,"tail",(function(){return on})),n.d(e,"drop",(function(){return on})),n.d(e,"compact",(function(){return sn})),n.d(e,"flatten",(function(){return ln})),n.d(e,"without",(function(){return un})),n.d(e,"uniq",(function(){return dn})),n.d(e,"unique",(function(){return dn})),n.d(e,"union",(function(){return hn})),n.d(e,"intersection",(function(){return fn})),n.d(e,"difference",(function(){return cn})),n.d(e,"unzip",(function(){return pn})),n.d(e,"transpose",(function(){return pn})),n.d(e,"zip",(function(){return gn})),n.d(e,"object",(function(){return vn})),n.d(e,"range",(function(){return mn})),n.d(e,"chunk",(function(){return bn})),n.d(e,"mixin",(function(){return wn}));var r={};n.r(r),n.d(r,"VERSION",(function(){return i["e"]})),n.d(r,"restArguments",(function(){return o})),n.d(r,"isObject",(function(){return a})),n.d(r,"isNull",(function(){return s})),n.d(r,"isUndefined",(function(){return l})),n.d(r,"isBoolean",(function(){return c})),n.d(r,"isElement",(function(){return u})),n.d(r,"isString",(function(){return h})),n.d(r,"isNumber",(function(){return f})),n.d(r,"isDate",(function(){return p})),n.d(r,"isRegExp",(function(){return g})),n.d(r,"isError",(function(){return v})),n.d(r,"isSymbol",(function(){return m})),n.d(r,"isArrayBuffer",(function(){return b})),n.d(r,"isDataView",(function(){return j})),n.d(r,"isArray",(function(){return T})),n.d(r,"isFunction",(function(){return x})),n.d(r,"isArguments",(function(){return M})),n.d(r,"isFinite",(function(){return D})),n.d(r,"isNaN",(function(){return A})),n.d(r,"isTypedArray",(function(){return R})),n.d(r,"isEmpty",(function(){return U})),n.d(r,"isMatch",(function(){return B})),n.d(r,"isEqual",(function(){return Y})),n.d(r,"isMap",(function(){return ot})),n.d(r,"isWeakMap",(function(){return at})),n.d(r,"isSet",(function(){return st})),n.d(r,"isWeakSet",(function(){return lt})),n.d(r,"keys",(function(){return $})),n.d(r,"allKeys",(function(){return X})),n.d(r,"values",(function(){return ct})),n.d(r,"pairs",(function(){return ut})),n.d(r,"invert",(function(){return dt})),n.d(r,"functions",(function(){return ht})),n.d(r,"methods",(function(){return ht})),n.d(r,"extend",(function(){return pt})),n.d(r,"extendOwn",(function(){return gt})),n.d(r,"assign",(function(){return gt})),n.d(r,"defaults",(function(){return vt})),n.d(r,"create",(function(){return bt})),n.d(r,"clone",(function(){return yt})),n.d(r,"tap",(function(){return wt})),n.d(r,"get",(function(){return St})),n.d(r,"has",(function(){return kt})),n.d(r,"mapObject",(function(){return Lt})),n.d(r,"identity",(function(){return jt})),n.d(r,"constant",(function(){return L})),n.d(r,"noop",(function(){return _t})),n.d(r,"toPath",(function(){return xt})),n.d(r,"property",(function(){return Pt})),n.d(r,"propertyOf",(function(){return Nt})),n.d(r,"matcher",(function(){return Tt})),n.d(r,"matches",(function(){return Tt})),n.d(r,"times",(function(){return It})),n.d(r,"random",(function(){return Ft})),n.d(r,"now",(function(){return Vt})),n.d(r,"escape",(function(){return Ht})),n.d(r,"unescape",(function(){return $t})),n.d(r,"templateSettings",(function(){return Ut})),n.d(r,"template",(function(){return Kt})),n.d(r,"result",(function(){return Yt})),n.d(r,"uniqueId",(function(){return Jt})),n.d(r,"chain",(function(){return Zt})),n.d(r,"iteratee",(function(){return Dt})),n.d(r,"partial",(function(){return ee})),n.d(r,"bind",(function(){return ne})),n.d(r,"bindAll",(function(){return oe})),n.d(r,"memoize",(function(){return ae})),n.d(r,"delay",(function(){return se})),n.d(r,"defer",(function(){return le})),n.d(r,"throttle",(function(){return ce})),n.d(r,"debounce",(function(){return ue})),n.d(r,"wrap",(function(){return de})),n.d(r,"negate",(function(){return he})),n.d(r,"compose",(function(){return fe})),n.d(r,"after",(function(){return pe})),n.d(r,"before",(function(){return ge})),n.d(r,"once",(function(){return ve})),n.d(r,"findKey",(function(){return me})),n.d(r,"findIndex",(function(){return ye})),n.d(r,"findLastIndex",(function(){return we})),n.d(r,"sortedIndex",(function(){return xe})),n.d(r,"indexOf",(function(){return Ce})),n.d(r,"lastIndexOf",(function(){return Se})),n.d(r,"find",(function(){return ke})),n.d(r,"detect",(function(){return ke})),n.d(r,"findWhere",(function(){return je})),n.d(r,"each",(function(){return Te})),n.d(r,"forEach",(function(){return Te})),n.d(r,"map",(function(){return Pe})),n.d(r,"collect",(function(){return Pe})),n.d(r,"reduce",(function(){return Me})),n.d(r,"foldl",(function(){return Me})),n.d(r,"inject",(function(){return Me})),n.d(r,"reduceRight",(function(){return De})),n.d(r,"foldr",(function(){return De})),n.d(r,"filter",(function(){return Ae})),n.d(r,"select",(function(){return Ae})),n.d(r,"reject",(function(){return Le})),n.d(r,"every",(function(){return _e})),n.d(r,"all",(function(){return _e})),n.d(r,"some",(function(){return Ne})),n.d(r,"any",(function(){return Ne})),n.d(r,"contains",(function(){return Ie})),n.d(r,"includes",(function(){return Ie})),n.d(r,"include",(function(){return Ie})),n.d(r,"invoke",(function(){return Fe})),n.d(r,"pluck",(function(){return Ve})),n.d(r,"where",(function(){return Re})),n.d(r,"max",(function(){return ze})),n.d(r,"min",(function(){return He})),n.d(r,"shuffle",(function(){return Ue})),n.d(r,"sample",(function(){return $e})),n.d(r,"sortBy",(function(){return Be})),n.d(r,"groupBy",(function(){return qe})),n.d(r,"indexBy",(function(){return Ge})),n.d(r,"countBy",(function(){return Ke})),n.d(r,"partition",(function(){return Ye})),n.d(r,"toArray",(function(){return Je})),n.d(r,"size",(function(){return Ze})),n.d(r,"pick",(function(){return tn})),n.d(r,"omit",(function(){return en})),n.d(r,"first",(function(){return rn})),n.d(r,"head",(function(){return rn})),n.d(r,"take",(function(){return rn})),n.d(r,"initial",(function(){return nn})),n.d(r,"last",(function(){return an})),n.d(r,"rest",(function(){return on})),n.d(r,"tail",(function(){return on})),n.d(r,"drop",(function(){return on})),n.d(r,"compact",(function(){return sn})),n.d(r,"flatten",(function(){return ln})),n.d(r,"without",(function(){return un})),n.d(r,"uniq",(function(){return dn})),n.d(r,"unique",(function(){return dn})),n.d(r,"union",(function(){return hn})),n.d(r,"intersection",(function(){return fn})),n.d(r,"difference",(function(){return cn})),n.d(r,"unzip",(function(){return pn})),n.d(r,"transpose",(function(){return pn})),n.d(r,"zip",(function(){return gn})),n.d(r,"object",(function(){return vn})),n.d(r,"range",(function(){return mn})),n.d(r,"chunk",(function(){return bn})),n.d(r,"mixin",(function(){return wn})),n.d(r,"default",(function(){return xn}));var i=n(4);function o(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=r,t.apply(this,o)}}function a(t){var e=typeof t;return'function'===e||'object'===e&&!!t}function s(t){return null===t}function l(t){return void 0===t}function c(t){return!0===t||!1===t||'[object Boolean]'===i["t"].call(t)}function u(t){return!(!t||1!==t.nodeType)}function d(t){var e='[object '+t+']';return function(t){return i["t"].call(t)===e}}var h=d('String'),f=d('Number'),p=d('Date'),g=d('RegExp'),v=d('Error'),m=d('Symbol'),b=d('ArrayBuffer'),y=d('Function'),w=i["p"].document&&i["p"].document.childNodes;1&&'object'!=typeof Int8Array&&'function'!=typeof w&&(y=function(t){return'function'==typeof t||!1});var x=y,O=d('Object'),C=i["s"]&&O(new DataView(new ArrayBuffer(8))),S='undefined'!=typeof Map&&O(new Map),k=d('DataView');var j=C?function(t){return null!=t&&x(t.getInt8)&&b(t.buffer)}:k,T=i["k"]||d('Array');function P(t,e){return null!=t&&i["i"].call(t,e)}var E=d('Arguments');!function(){E(arguments)||(E=function(t){return P(t,'callee')})}();var M=E;function D(t){return!m(t)&&Object(i["f"])(t)&&!isNaN(parseFloat(t))}function A(t){return f(t)&&Object(i["g"])(t)}function L(t){return function(){return t}}function _(t){return function(e){var n=t(e);return'number'==typeof n&&n>=0&&n<=i["b"]}}function N(t){return function(e){return null==e?void 0:e[t]}}var I=N('byteLength'),F=_(I),V=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var R=i["r"]?function(t){return i["l"]?Object(i["l"])(t)&&!j(t):F(t)&&V.test(i["t"].call(t))}:L(!1),z=N('length');function H(t,e){e=function(t){for(var e={},n=t.length,r=0;r<n;++r)e[t[r]]=!0;return{contains:function(t){return e[t]},push:function(n){return e[n]=!0,t.push(n)}}}(e);var n=i["n"].length,r=t.constructor,o=x(r)&&r.prototype||i["c"],a='constructor';for(P(t,a)&&!e.contains(a)&&e.push(a);n--;)(a=i["n"][n])in t&&t[a]!==o[a]&&!e.contains(a)&&e.push(a)}function $(t){if(!a(t))return[];if(i["m"])return Object(i["m"])(t);var e=[];for(var n in t)P(t,n)&&e.push(n);return i["h"]&&H(t,e),e}function U(t){if(null==t)return!0;var e=z(t);return'number'==typeof e&&(T(t)||h(t)||M(t))?0===e:0===z($(t))}function B(t,e){var n=$(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0}function W(t){return t instanceof W?t:this instanceof W?void(this._wrapped=t):new W(t)}function q(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,I(t))}W.VERSION=i["e"],W.prototype.value=function(){return this._wrapped},W.prototype.valueOf=W.prototype.toJSON=W.prototype.value,W.prototype.toString=function(){return String(this._wrapped)};var G='[object DataView]';function K(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var o=typeof t;return('function'===o||'object'===o||'object'==typeof e)&&function t(e,n,r,o){e instanceof W&&(e=e._wrapped);n instanceof W&&(n=n._wrapped);var a=i["t"].call(e);if(a!==i["t"].call(n))return!1;if(C&&'[object Object]'==a&&j(e)){if(!j(n))return!1;a=G}switch(a){case'[object RegExp]':case'[object String]':return''+e==''+n;case'[object Number]':return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case'[object Date]':case'[object Boolean]':return+e==+n;case'[object Symbol]':return i["d"].valueOf.call(e)===i["d"].valueOf.call(n);case'[object ArrayBuffer]':case G:return t(q(e),q(n),r,o)}var s='[object Array]'===a;if(!s&&R(e)){if(I(e)!==I(n))return!1;if(e.buffer===n.buffer&&e.byteOffset===n.byteOffset)return!0;s=!0}if(!s){if('object'!=typeof e||'object'!=typeof n)return!1;var l=e.constructor,c=n.constructor;if(l!==c&&!(x(l)&&l instanceof l&&x(c)&&c instanceof c)&&'constructor'in e&&'constructor'in n)return!1}o=o||[];var u=(r=r||[]).length;for(;u--;)if(r[u]===e)return o[u]===n;if(r.push(e),o.push(n),s){if((u=e.length)!==n.length)return!1;for(;u--;)if(!K(e[u],n[u],r,o))return!1}else{var d,h=$(e);if(u=h.length,$(n).length!==u)return!1;for(;u--;)if(d=h[u],!P(n,d)||!K(e[d],n[d],r,o))return!1}return r.pop(),o.pop(),!0}(t,e,n,r)}function Y(t,e){return K(t,e)}function X(t){if(!a(t))return[];var e=[];for(var n in t)e.push(n);return i["h"]&&H(t,e),e}function J(t){var e=z(t);return function(n){if(null==n)return!1;var r=X(n);if(z(r))return!1;for(var i=0;i<e;i++)if(!x(n[t[i]]))return!1;return t!==rt||!x(n[Z])}}var Z='forEach',Q='has',tt=['clear','delete'],et=['get',Q,'set'],nt=tt.concat(Z,et),rt=tt.concat(et),it=['add'].concat(tt,Z,Q),ot=S?J(nt):d('Map'),at=S?J(rt):d('WeakMap'),st=S?J(it):d('Set'),lt=d('WeakSet');function ct(t){for(var e=$(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r}function ut(t){for(var e=$(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r}function dt(t){for(var e={},n=$(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e}function ht(t){var e=[];for(var n in t)x(t[n])&&e.push(n);return e.sort()}function ft(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),s=a.length,l=0;l<s;l++){var c=a[l];e&&void 0!==n[c]||(n[c]=o[c])}return n}}var pt=ft(X),gt=ft($),vt=ft(X,!0);function mt(t){if(!a(t))return{};if(i["j"])return Object(i["j"])(t);var e=function(){};e.prototype=t;var n=new e;return e.prototype=null,n}function bt(t,e){var n=mt(t);return e&>(n,e),n}function yt(t){return a(t)?T(t)?t.slice():pt({},t):t}function wt(t,e){return e(t),t}function xt(t){return T(t)?t:[t]}function Ot(t){return W.toPath(t)}function Ct(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0}function St(t,e,n){var r=Ct(t,Ot(e));return l(r)?n:r}function kt(t,e){for(var n=(e=Ot(e)).length,r=0;r<n;r++){var i=e[r];if(!P(t,i))return!1;t=t[i]}return!!n}function jt(t){return t}function Tt(t){return t=gt({},t),function(e){return B(e,t)}}function Pt(t){return t=Ot(t),function(e){return Ct(e,t)}}function Et(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}}function Mt(t,e,n){return null==t?jt:x(t)?Et(t,e,n):a(t)&&!T(t)?Tt(t):Pt(t)}function Dt(t,e){return Mt(t,e,1/0)}function At(t,e,n){return W.iteratee!==Dt?W.iteratee(t,e):Mt(t,e,n)}function Lt(t,e,n){e=At(e,n);for(var r=$(t),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=e(t[s],s,t)}return o}function _t(){}function Nt(t){return null==t?_t:function(e){return St(t,e)}}function It(t,e,n){var r=Array(Math.max(0,t));e=Et(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r}function Ft(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}W.toPath=xt,W.iteratee=Dt;var Vt=Date.now||function(){return(new Date).getTime()};function Rt(t){var e=function(e){return t[e]},n='(?:'+$(t).join('|')+')',r=RegExp(n),i=RegExp(n,'g');return function(t){return t=null==t?'':''+t,r.test(t)?t.replace(i,e):t}}var zt={'&':'&','<':'<','>':'>','"':'"',"'":''','`':'`'},Ht=Rt(zt),$t=Rt(dt(zt)),Ut=W.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Bt=/(.)^/,Wt={"'":"'",'\\':'\\','\r':'r','\n':'n','\u2028':'u2028','\u2029':'u2029'},qt=/\\|'|\r|\n|\u2028|\u2029/g;function Gt(t){return'\\'+Wt[t]}function Kt(t,e,n){!e&&n&&(e=n),e=vt({},e,W.templateSettings);var r,i=RegExp([(e.escape||Bt).source,(e.interpolate||Bt).source,(e.evaluate||Bt).source].join('|')+'|$','g'),o=0,a="__p+='";t.replace(i,(function(e,n,r,i,s){return a+=t.slice(o,s).replace(qt,Gt),o=s+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e})),a+="';\n",e.variable||(a='with(obj||{}){\n'+a+'}\n'),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+'return __p;\n';try{r=new Function(e.variable||'obj','_',a)}catch(t){throw t.source=a,t}var s=function(t){return r.call(this,t,W)},l=e.variable||'obj';return s.source='function('+l+'){\n'+a+'}',s}function Yt(t,e,n){var r=(e=Ot(e)).length;if(!r)return x(n)?n.call(t):n;for(var i=0;i<r;i++){var o=null==t?void 0:t[e[i]];void 0===o&&(o=n,i=r),t=x(o)?o.call(t):o}return t}var Xt=0;function Jt(t){var e=++Xt+'';return t?t+e:e}function Zt(t){var e=W(t);return e._chain=!0,e}function Qt(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=mt(t.prototype),s=t.apply(o,i);return a(s)?s:o}var te=o((function(t,e){var n=te.placeholder,r=function(){for(var i=0,o=e.length,a=Array(o),s=0;s<o;s++)a[s]=e[s]===n?arguments[i++]:e[s];for(;i<arguments.length;)a.push(arguments[i++]);return Qt(t,r,this,this,a)};return r}));te.placeholder=W;var ee=te,ne=o((function(t,e,n){if(!x(t))throw new TypeError('Bind must be called on a function');var r=o((function(i){return Qt(t,r,e,this,n.concat(i))}));return r})),re=_(z);function ie(t,e,n,r){if(r=r||[],e||0===e){if(e<=0)return r.concat(t)}else e=1/0;for(var i=r.length,o=0,a=z(t);o<a;o++){var s=t[o];if(re(s)&&(T(s)||M(s)))if(e>1)ie(s,e-1,n,r),i=r.length;else for(var l=0,c=s.length;l<c;)r[i++]=s[l++];else n||(r[i++]=s)}return r}var oe=o((function(t,e){var n=(e=ie(e,!1,!1)).length;if(n<1)throw new Error('bindAll must be passed function names');for(;n--;){var r=e[n];t[r]=ne(t[r],t)}return t}));function ae(t,e){var n=function(r){var i=n.cache,o=''+(e?e.apply(this,arguments):r);return P(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n}var se=o((function(t,e,n){return setTimeout((function(){return t.apply(null,n)}),e)})),le=ee(se,W,1);function ce(t,e,n){var r,i,o,a,s=0;n||(n={});var l=function(){s=!1===n.leading?0:Vt(),r=null,a=t.apply(i,o),r||(i=o=null)},c=function(){var c=Vt();s||!1!==n.leading||(s=c);var u=e-(c-s);return i=this,o=arguments,u<=0||u>e?(r&&(clearTimeout(r),r=null),s=c,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c}function ue(t,e,n){var r,i,a=function(e,n){r=null,n&&(i=t.apply(e,n))},s=o((function(o){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(a,e),s&&(i=t.apply(this,o))}else r=se(a,e,this,o);return i}));return s.cancel=function(){clearTimeout(r),r=null},s}function de(t,e){return ee(e,t)}function he(t){return function(){return!t.apply(this,arguments)}}function fe(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function pe(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function ge(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}var ve=ee(ge,2);function me(t,e,n){e=At(e,n);for(var r,i=$(t),o=0,a=i.length;o<a;o++)if(e(t[r=i[o]],r,t))return r}function be(t){return function(e,n,r){n=At(n,r);for(var i=z(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}var ye=be(1),we=be(-1);function xe(t,e,n,r){for(var i=(n=At(n,r,1))(e),o=0,a=z(t);o<a;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o}function Oe(t,e,n){return function(r,o,a){var s=0,l=z(r);if('number'==typeof a)t>0?s=a>=0?a:Math.max(a+l,s):l=a>=0?Math.min(a+1,l):a+l+1;else if(n&&a&&l)return r[a=n(r,o)]===o?a:-1;if(o!=o)return(a=e(i["q"].call(r,s,l),A))>=0?a+s:-1;for(a=t>0?s:l-1;a>=0&&a<l;a+=t)if(r[a]===o)return a;return-1}}var Ce=Oe(1,ye,xe),Se=Oe(-1,we);function ke(t,e,n){var r=(re(t)?ye:me)(t,e,n);if(void 0!==r&&-1!==r)return t[r]}function je(t,e){return ke(t,Tt(e))}function Te(t,e,n){var r,i;if(e=Et(e,n),re(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=$(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t}function Pe(t,e,n){e=At(e,n);for(var r=!re(t)&&$(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o}function Ee(t){var e=function(e,n,r,i){var o=!re(e)&&$(e),a=(o||e).length,s=t>0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s<a;s+=t){var l=o?o[s]:s;r=n(r,e[l],l,e)}return r};return function(t,n,r,i){var o=arguments.length>=3;return e(t,Et(n,i,4),r,o)}}var Me=Ee(1),De=Ee(-1);function Ae(t,e,n){var r=[];return e=At(e,n),Te(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function Le(t,e,n){return Ae(t,he(At(e)),n)}function _e(t,e,n){e=At(e,n);for(var r=!re(t)&&$(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0}function Ne(t,e,n){e=At(e,n);for(var r=!re(t)&&$(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1}function Ie(t,e,n,r){return re(t)||(t=ct(t)),('number'!=typeof n||r)&&(n=0),Ce(t,e,n)>=0}var Fe=o((function(t,e,n){var r,i;return x(e)?i=e:(e=Ot(e),r=e.slice(0,-1),e=e[e.length-1]),Pe(t,(function(t){var o=i;if(!o){if(r&&r.length&&(t=Ct(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)}))}));function Ve(t,e){return Pe(t,Pt(e))}function Re(t,e){return Ae(t,Tt(e))}function ze(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var s=0,l=(t=re(t)?t:ct(t)).length;s<l;s++)null!=(r=t[s])&&r>o&&(o=r);else e=At(e,n),Te(t,(function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)}));return o}function He(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var s=0,l=(t=re(t)?t:ct(t)).length;s<l;s++)null!=(r=t[s])&&r<o&&(o=r);else e=At(e,n),Te(t,(function(t,n,r){((i=e(t,n,r))<a||i===1/0&&o===1/0)&&(o=t,a=i)}));return o}function $e(t,e,n){if(null==e||n)return re(t)||(t=ct(t)),t[Ft(t.length-1)];var r=re(t)?yt(t):ct(t),i=z(r);e=Math.max(Math.min(e,i),0);for(var o=i-1,a=0;a<e;a++){var s=Ft(a,o),l=r[a];r[a]=r[s],r[s]=l}return r.slice(0,e)}function Ue(t){return $e(t,1/0)}function Be(t,e,n){var r=0;return e=At(e,n),Ve(Pe(t,(function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}})).sort((function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index})),'value')}function We(t,e){return function(n,r,i){var o=e?[[],[]]:{};return r=At(r,i),Te(n,(function(e,i){var a=r(e,i,n);t(o,e,a)})),o}}var qe=We((function(t,e,n){P(t,n)?t[n].push(e):t[n]=[e]})),Ge=We((function(t,e,n){t[n]=e})),Ke=We((function(t,e,n){P(t,n)?t[n]++:t[n]=1})),Ye=We((function(t,e,n){t[n?0:1].push(e)}),!0),Xe=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Je(t){return t?T(t)?i["q"].call(t):h(t)?t.match(Xe):re(t)?Pe(t,jt):ct(t):[]}function Ze(t){return null==t?0:re(t)?t.length:$(t).length}function Qe(t,e,n){return e in n}var tn=o((function(t,e){var n={},r=e[0];if(null==t)return n;x(r)?(e.length>1&&(r=Et(r,e[1])),e=X(t)):(r=Qe,e=ie(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i<o;i++){var a=e[i],s=t[a];r(s,a,t)&&(n[a]=s)}return n})),en=o((function(t,e){var n,r=e[0];return x(r)?(r=he(r),e.length>1&&(n=e[1])):(e=Pe(ie(e,!1,!1),String),r=function(t,n){return!Ie(e,n)}),tn(t,r,n)}));function nn(t,e,n){return i["q"].call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function rn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:nn(t,t.length-e)}function on(t,e,n){return i["q"].call(t,null==e||n?1:e)}function an(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:on(t,Math.max(0,t.length-e))}function sn(t){return Ae(t,Boolean)}function ln(t,e){return ie(t,e,!1)}var cn=o((function(t,e){return e=ie(e,!0,!0),Ae(t,(function(t){return!Ie(e,t)}))})),un=o((function(t,e){return cn(t,e)}));function dn(t,e,n,r){c(e)||(r=n,n=e,e=!1),null!=n&&(n=At(n,r));for(var i=[],o=[],a=0,s=z(t);a<s;a++){var l=t[a],u=n?n(l,a,t):l;e&&!n?(a&&o===u||i.push(l),o=u):n?Ie(o,u)||(o.push(u),i.push(l)):Ie(i,l)||i.push(l)}return i}var hn=o((function(t){return dn(ie(t,!0,!0))}));function fn(t){for(var e=[],n=arguments.length,r=0,i=z(t);r<i;r++){var o=t[r];if(!Ie(e,o)){var a;for(a=1;a<n&&Ie(arguments[a],o);a++);a===n&&e.push(o)}}return e}function pn(t){for(var e=t&&ze(t,z).length||0,n=Array(e),r=0;r<e;r++)n[r]=Ve(t,r);return n}var gn=o(pn);function vn(t,e){for(var n={},r=0,i=z(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n}function mn(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i}function bn(t,e){if(null==e||e<1)return[];for(var n=[],r=0,o=t.length;r<o;)n.push(i["q"].call(t,r,r+=e));return n}function yn(t,e){return t._chain?W(e).chain():e}function wn(t){return Te(ht(t),(function(e){var n=W[e]=t[e];W.prototype[e]=function(){var t=[this._wrapped];return i["o"].apply(t,arguments),yn(this,n.apply(W,t))}})),W}Te(['pop','push','reverse','shift','sort','splice','unshift'],(function(t){var e=i["a"][t];W.prototype[t]=function(){var n=this._wrapped;return null!=n&&(e.apply(n,arguments),'shift'!==t&&'splice'!==t||0!==n.length||delete n[0]),yn(this,n)}})),Te(['concat','join','slice'],(function(t){var e=i["a"][t];W.prototype[t]=function(){var t=this._wrapped;return null!=t&&(t=e.apply(t,arguments)),yn(this,t)}}));var xn=W,On=wn(r);On._=On;var Cn=On},function(t,e,n){(function(r){var i,o;!function(a){var s='object'==typeof self&&self.self===self&&self||'object'==typeof r&&r.global===r&&r;if(1)i=[n(0),n(11),e],void 0===(o=function(t,e,n){s.Backbone=function(t,e,n,r){var i=t.Backbone,o=Array.prototype.slice;e.VERSION='1.3.3',e.$=r,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a=function(t,e,r){n.each(e,(function(e,i){n[i]&&(t.prototype[i]=function(t,e,r){switch(t){case 1:return function(){return n[e](this[r])};case 2:return function(t){return n[e](this[r],t)};case 3:return function(t,i){return n[e](this[r],s(t,this),i)};case 4:return function(t,i,o){return n[e](this[r],s(t,this),i,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[r]),n[e].apply(n,t)}}}(e,i,r))}))},s=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?l(t):n.isString(t)?function(e){return e.get(t)}:t},l=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},u=/\s+/,d=function(t,e,r,i,o){var a,s=0;if(r&&'object'==typeof r){void 0!==i&&'context'in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)e=d(t,e,a[s],r[a[s]],o)}else if(r&&u.test(r))for(a=r.split(u);s<a.length;s++)e=t(e,a[s],i,o);else e=t(e,r,i,o);return e};c.on=function(t,e,n){return h(this,t,e,n)};var h=function(t,e,n,r,i){(t._events=d(f,t._events||{},e,n,{context:r,ctx:t,listening:i}),i)&&((t._listeners||(t._listeners={}))[i.id]=i);return t};c.listenTo=function(t,e,r){if(!t)return this;var i=t._listenId||(t._listenId=n.uniqueId('l')),o=this._listeningTo||(this._listeningTo={}),a=o[i];if(!a){var s=this._listenId||(this._listenId=n.uniqueId('l'));a=o[i]={obj:t,objId:i,id:s,listeningTo:o,count:0}}return h(t,e,r,this,a),this};var f=function(t,e,n,r){if(n){var i=t[e]||(t[e]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return t};c.off=function(t,e,n){return this._events?(this._events=d(p,this._events,t,e,{context:n,listeners:this._listeners}),this):this},c.stopListening=function(t,e,r){var i=this._listeningTo;if(!i)return this;for(var o=t?[t._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(e,r,this)}return this};var p=function(t,e,r,i){if(t){var o,a=0,s=i.context,l=i.listeners;if(e||r||s){for(var c=e?[e]:n.keys(t);a<c.length;a++){var u=t[e=c[a]];if(!u)break;for(var d=[],h=0;h<u.length;h++){var f=u[h];r&&r!==f.callback&&r!==f.callback._callback||s&&s!==f.context?d.push(f):(o=f.listening)&&0==--o.count&&(delete l[o.id],delete o.listeningTo[o.objId])}d.length?t[e]=d:delete t[e]}return t}for(var p=n.keys(l);a<p.length;a++)delete l[(o=l[p[a]]).id],delete o.listeningTo[o.objId]}};c.once=function(t,e,r){var i=d(g,{},t,e,n.bind(this.off,this));return'string'==typeof t&&null==r&&(e=void 0),this.on(i,e,r)},c.listenToOnce=function(t,e,r){var i=d(g,{},e,r,n.bind(this.stopListening,this,t));return this.listenTo(t,i)};var g=function(t,e,r,i){if(r){var o=t[e]=n.once((function(){i(e,o),r.apply(this,arguments)}));o._callback=r}return t};c.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),r=0;r<e;r++)n[r]=arguments[r+1];return d(v,this._events,t,void 0,n),this};var v=function(t,e,n,r){if(t){var i=t[e],o=t.all;i&&o&&(o=o.slice()),i&&m(i,r),o&&m(o,[e].concat(r))}return t},m=function(t,e){var n,r=-1,i=t.length,o=e[0],a=e[1],s=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e);return}};c.bind=c.on,c.unbind=c.off,n.extend(e,c);var b=e.Model=function(t,e){var r=t||{};e||(e={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(r=this.parse(r,e)||{});var i=n.result(this,'defaults');r=n.defaults(n.extend({},i,r),i),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(b.prototype,c,{changed:null,validationError:null,idAttribute:'id',cidPrefix:'c',initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(null==t)return this;var i;if('object'==typeof t?(i=t,r=e):(i={})[t]=e,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var c=this.attributes,u=this.changed,d=this._previousAttributes;for(var h in i)e=i[h],n.isEqual(c[h],e)||s.push(h),n.isEqual(d[h],e)?delete u[h]:u[h]=e,o?delete c[h]:c[h]=e;if(this.idAttribute in i&&(this.id=this.get(this.idAttribute)),!a){s.length&&(this._pending=r);for(var f=0;f<s.length;f++)this.trigger('change:'+s[f],this,c[s[f]],r)}if(l)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger('change',this,r);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&n.clone(this.changed);var e=this._changing?this._previousAttributes:this.attributes,r={};for(var i in t){var o=t[i];n.isEqual(e[i],o)||(r[i]=o)}return!!n.size(r)&&r},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,r=t.success;return t.success=function(n){var i=t.parse?e.parse(n,t):n;if(!e.set(i,t))return!1;r&&r.call(t.context,e,n,t),e.trigger('sync',e,n,t)},F(this,t),this.sync('read',this,t)},save:function(t,e,r){var i;null==t||'object'==typeof t?(i=t,r=e):(i={})[t]=e;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var a=this,s=r.success,l=this.attributes;r.success=function(t){a.attributes=l;var e=r.parse?a.parse(t,r):t;if(o&&(e=n.extend({},i,e)),e&&!a.set(e,r))return!1;s&&s.call(r.context,a,t,r),a.trigger('sync',a,t,r)},F(this,r),i&&o&&(this.attributes=n.extend({},l,i));var c=this.isNew()?'create':r.patch?'patch':'update';'patch'!==c||r.attrs||(r.attrs=i);var u=this.sync(c,this,r);return this.attributes=l,u},destroy:function(t){t=t?n.clone(t):{};var e=this,r=t.success,i=t.wait,o=function(){e.stopListening(),e.trigger('destroy',e,e.collection,t)};t.success=function(n){i&&o(),r&&r.call(t.context,e,n,t),e.isNew()||e.trigger('sync',e,n,t)};var a=!1;return this.isNew()?n.defer(t.success):(F(this,t),a=this.sync('delete',this,t)),i||o(),a},url:function(){var t=n.result(this,'urlRoot')||n.result(this.collection,'url')||I();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,'$&/')+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;return!r||(this.trigger('invalid',this,r,n.extend(e,{validationError:r})),!1)}}),a(b,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},'attributes');var y=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},w={add:!0,remove:!0,merge:!0},x={add:!0,remove:!1},O=function(t,e,n){n=Math.min(Math.max(n,0),t.length);var r,i=Array(t.length-n),o=e.length;for(r=0;r<i.length;r++)i[r]=t[r+n];for(r=0;r<o;r++)t[r+n]=e[r];for(r=0;r<i.length;r++)t[r+o+n]=i[r]};n.extend(y.prototype,c,{model:b,initialize:function(){},toJSON:function(t){return this.map((function(e){return e.toJSON(t)}))},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,x))},remove:function(t,e){e=n.extend({},e);var r=!n.isArray(t);t=r?[t]:t.slice();var i=this._removeModels(t,e);return!e.silent&&i.length&&(e.changes={added:[],merged:[],removed:i},this.trigger('update',this,e)),r?i[0]:i},set:function(t,e){if(null!=t){(e=n.extend({},w,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var r=!n.isArray(t);t=r?[t]:t.slice();var i=e.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],l=[],c=[],u=[],d={},h=e.add,f=e.merge,p=e.remove,g=!1,v=this.comparator&&null==i&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){o=t[a];var b=this.get(o);if(b){if(f&&o!==b){var y=this._isModel(o)?o.attributes:o;e.parse&&(y=b.parse(y,e)),b.set(y,e),c.push(b),v&&!g&&(g=b.hasChanged(m))}d[b.cid]||(d[b.cid]=!0,s.push(b)),t[a]=b}else h&&(o=t[a]=this._prepareModel(o,e))&&(l.push(o),this._addReference(o,e),d[o.cid]=!0,s.push(o))}if(p){for(a=0;a<this.length;a++)d[(o=this.models[a]).cid]||u.push(o);u.length&&this._removeModels(u,e)}var x=!1,C=!v&&h&&p;if(s.length&&C?(x=this.length!==s.length||n.some(this.models,(function(t,e){return t!==s[e]})),this.models.length=0,O(this.models,s,0),this.length=this.models.length):l.length&&(v&&(g=!0),O(this.models,l,null==i?this.length:i),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(a=0;a<l.length;a++)null!=i&&(e.index=i+a),(o=l[a]).trigger('add',o,this,e);(g||x)&&this.trigger('sort',this,e),(l.length||u.length||c.length)&&(e.changes={added:l,removed:u,merged:c},this.trigger('update',this,e))}return r?t[0]:t}},reset:function(t,e){e=e?n.clone(e):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger('reset',this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(t.attributes||t)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?'find':'filter'](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error('Cannot sort a set without a comparator');t||(t={});var r=e.length;return n.isFunction(e)&&(e=n.bind(e,this)),1===r||n.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger('sort',this,t),this},pluck:function(t){return this.map(t+'')},fetch:function(t){var e=(t=n.extend({parse:!0},t)).success,r=this;return t.success=function(n){var i=t.reset?'reset':'set';r[i](n,t),e&&e.call(t.context,r,n,t),r.trigger('sync',r,n,t)},F(this,t),this.sync('read',this,t)},create:function(t,e){var r=(e=e?n.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;r||this.add(t,e);var i=this,o=e.success;return e.success=function(t,e,n){r&&i.add(t,n),o&&o.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||'id']},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;(e=e?n.clone(e):{}).collection=this;var r=new this.model(t,e);return r.validationError?(this.trigger('invalid',this,r.validationError,e),!1):r},_removeModels:function(t,e){for(var n=[],r=0;r<t.length;r++){var i=this.get(t[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes);null!=a&&delete this._byId[a],e.silent||(e.index=o,i.trigger('remove',i,this,e)),n.push(i),this._removeReference(i,e)}}return n},_isModel:function(t){return t instanceof b},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on('all',this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off('all',this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if(e){if(('add'===t||'remove'===t)&&n!==this)return;if('destroy'===t&&this.remove(e,r),'change'===t){var i=this.modelId(e.previousAttributes()),o=this.modelId(e.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=e))}}this.trigger.apply(this,arguments)}}),a(y,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},'models');var C=e.View=function(t){this.cid=n.uniqueId('view'),n.extend(this,n.pick(t,k)),this._ensureElement(),this.initialize.apply(this,arguments)},S=/^(\S+)\s*(.*)$/,k=['model','collection','el','id','attributes','className','tagName','events'];n.extend(C.prototype,c,{tagName:'div',$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,'events')),!t)return this;for(var e in this.undelegateEvents(),t){var r=t[e];if(n.isFunction(r)||(r=this[r]),r){var i=e.match(S);this.delegate(i[1],i[2],n.bind(r,this))}}return this},delegate:function(t,e,n){return this.$el.on(t+'.delegateEvents'+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off('.delegateEvents'+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+'.delegateEvents'+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,'el'));else{var t=n.extend({},n.result(this,'attributes'));this.id&&(t.id=n.result(this,'id')),this.className&&(t['class']=n.result(this,'className')),this.setElement(this._createElement(n.result(this,'tagName'))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,r,i){var o=j[t];n.defaults(i||(i={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:o,dataType:'json'};if(i.url||(a.url=n.result(r,'url')||I()),null!=i.data||!r||'create'!==t&&'update'!==t&&'patch'!==t||(a.contentType='application/json',a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType='application/x-www-form-urlencoded',a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&('PUT'===o||'DELETE'===o||'PATCH'===o)){a.type='POST',i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(t){if(t.setRequestHeader('X-HTTP-Method-Override',o),s)return s.apply(this,arguments)}}'GET'===a.type||i.emulateJSON||(a.processData=!1);var l=i.error;i.error=function(t,e,n){i.textStatus=e,i.errorThrown=n,l&&l.call(i.context,t,e,n)};var c=i.xhr=e.ajax(n.extend(a,i));return r.trigger('request',r,c,i),c};var j={create:'POST',update:'PUT',patch:'PATCH',delete:'DELETE',read:'GET'};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var T=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},P=/\((.*?)\)/g,E=/(\(\?)?:\w+/g,M=/\*\w+/g,D=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(T.prototype,c,{initialize:function(){},route:function(t,r,i){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(r)&&(i=r,r=''),i||(i=this[r]);var o=this;return e.history.route(t,(function(n){var a=o._extractParameters(t,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,['route:'+r].concat(a)),o.trigger('route',r,a),e.history.trigger('route',o,r,a))})),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,'routes');for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(D,'\\$&').replace(P,'(?:$1)?').replace(E,(function(t,e){return e?t:'([^/?]+)'})).replace(M,'([^?]*?)'),new RegExp('^'+t+'(?:\\?([\\s\\S]*))?$')},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return n.map(r,(function(t,e){return e===r.length-1?t||null:t?decodeURIComponent(t):null}))}});var A=e.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),'undefined'!=typeof window&&(this.location=window.location,this.history=window.history)},L=/^[#\/]|\s+$/g,_=/^\/+|\/+$/g,N=/#.*$/;A.started=!1,n.extend(A.prototype,c,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,'$&/')===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+'/'===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,'%2525'))},getSearch:function(){var t=this.location.href.replace(/#.*/,'').match(/\?.+/);return t?t[0]:''},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:''},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return'/'===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(L,'')},start:function(t){if(A.started)throw new Error('Backbone.history has already been started');if(A.started=!0,this.options=n.extend({root:'/'},this.options,t),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange='onhashchange'in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=('/'+this.root+'/').replace(_,'/'),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||'/';return this.location.replace(e+'#'+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement('iframe'),this.iframe.src='javascript:0',this.iframe.style.display='none',this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash='#'+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent('on'+t,e)};if(this._usePushState?o('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe?o('hashchange',this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent('on'+t,e)};this._usePushState?t('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe&&t('hashchange',this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),A.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!A.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||'');var n=this.root;''!==t&&'?'!==t.charAt(0)||(n=n.slice(0,-1)||'/');var r=n+t;if(t=this.decodeFragment(t.replace(N,'')),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?'replaceState':'pushState']({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,'');t.replace(r+'#'+e)}else t.hash='#'+e}}),e.history=new A;b.extend=y.extend=T.extend=C.extend=A.extend=function(t,e){var r,i=this;return r=t&&n.has(t,'constructor')?t.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,e),r.prototype=n.create(i.prototype,t),r.prototype.constructor=r,r.__super__=i.prototype,r};var I=function(){throw new Error('A "url" property or function must be specified')},F=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger('error',t,r,e)}};return e}(s,n,t,e)}.apply(e,i))||(t.exports=o);else;}()}).call(this,n(26))},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";n.d(e,"q",(function(){return x})),n.d(e,"v",(function(){return h})),n.d(e,"u",(function(){return f})),n.d(e,"k",(function(){return b})),n.d(e,"s",(function(){return c})),n.d(e,"g",(function(){return O})),n.d(e,"d",(function(){return C})),n.d(e,"b",(function(){return v})),n.d(e,"r",(function(){return w})),n.d(e,"f",(function(){return j})),n.d(e,"n",(function(){return T})),n.d(e,"e",(function(){return y})),n.d(e,"x",(function(){return d})),n.d(e,"t",(function(){return m})),n.d(e,"h",(function(){return S})),n.d(e,"i",(function(){return p})),n.d(e,"c",(function(){return M})),n.d(e,"j",(function(){return L})),n.d(e,"w",(function(){return _})),n.d(e,"a",(function(){return u})),n.d(e,"o",(function(){return P})),n.d(e,"m",(function(){return E})),n.d(e,"l",(function(){return D})),n.d(e,"p",(function(){return A}));var r=n(8),i=n.n(r),o=n(7),a=n.n(o),s=n(0),l=window.Element.prototype,c=l.matches||l.webkitMatchesSelector||l.mozMatchesSelector||l.msMatchesSelector,u=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(s["isArray"])(e)?a()(e):[e];if(r.length){var i=r.shift();if(i&&(!n.unique||!document.querySelector("link[href=\"".concat(i,"\"]")))){var o=document,l=o.head,c=document.createElement('link');c.href=i,c.rel='stylesheet',n.prepand?l.insertBefore(c,l.firstChild):l.appendChild(c)}t(r)}},d=function(t,e){var n={},r=Object(s["keys"])(e);for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a=e[i];r.indexOf(i)>=0?o!==a&&(n[i]=a):n[i]=null}for(var l in e)e.hasOwnProperty(l)&&Object(s["isUndefined"])(t[l])&&(n[l]=e[l]);return n},h=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var r=function(r){t.forEach((function(t){return t.addEventListener(e[r],n)}))},i=0;i<e.length;++i)r(i)},f=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var r=function(r){t.forEach((function(t){return t.removeEventListener(e[r],n)}))},i=0;i<e.length;++i)r(i)},p=function(t){return t.replace(parseFloat(t),'')},g=function(t){return t[0].toUpperCase()+t.toLowerCase().slice(1)},v=function(t){var e=t.split('-').filter(String);return e[0].toLowerCase()+e.slice(1).map(g)},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var i=e.toString().split('.')[1];r=i?i.length:0}return r?parseFloat(t.toFixed(r)):t},b=function(t){return'draggable'in document.createElement('i')&&(t?t.get('Config').nativeDnD:1)},y=function(t){return Object(s["isElement"])(t)||w(t)?t:t&&t.getEl?t.getEl():void 0},w=function(t){return t&&3===t.nodeType},x=function(t){return t&&!w(t)&&!function(t){return t&&8===t.nodeType}(t)},O=function(t,e){var n=t;return Object(s["isElement"])(t)&&(n=e(t).data('model')),n},C=function(t){var e,n={top:0,left:0,width:0,height:0};if(!t)return n;if(w(t)){var r=document.createRange();r.selectNode(t),e=r.getBoundingClientRect(),r.detach()}return e||(t.getBoundingClientRect?t.getBoundingClientRect():n)},S=function(t){return t.touches&&t.touches[0]?t.touches[0]:t},k=function(t){return t.which||t.keyCode},j=function(t){return String.fromCharCode(k(t))},T=function(t){return 27===k(t)},P=function(t){return null!==t&&!Array.isArray(t)&&'object'===i()(t)},E=function(t){return Object.keys(t).length<=0},M=function(t){return t&&t.charAt(0).toUpperCase()+t.substring(1)},D=function(t){return t&&t.toHTML},A=function(t){return t&&t.toCSS},L=function(t){return t.__gjsv},_=function(t,e){t.__gjsv=e}},function(t,e,n){"use strict";(function(t){n.d(e,"e",(function(){return r})),n.d(e,"p",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"o",(function(){return l})),n.d(e,"q",(function(){return c})),n.d(e,"t",(function(){return u})),n.d(e,"i",(function(){return d})),n.d(e,"r",(function(){return h})),n.d(e,"s",(function(){return f})),n.d(e,"k",(function(){return p})),n.d(e,"m",(function(){return g})),n.d(e,"j",(function(){return v})),n.d(e,"l",(function(){return m})),n.d(e,"g",(function(){return b})),n.d(e,"f",(function(){return y})),n.d(e,"h",(function(){return w})),n.d(e,"n",(function(){return x})),n.d(e,"b",(function(){return O}));var r='1.12.0',i='object'==typeof self&&self.self===self&&self||'object'==typeof t&&t.global===t&&t||Function('return this')()||{},o=Array.prototype,a=Object.prototype,s='undefined'!=typeof Symbol?Symbol.prototype:null,l=o.push,c=o.slice,u=a.toString,d=a.hasOwnProperty,h='undefined'!=typeof ArrayBuffer,f='undefined'!=typeof DataView,p=Array.isArray,g=Object.keys,v=Object.create,m=h&&ArrayBuffer.isView,b=isNaN,y=isFinite,w=!{toString:null}.propertyIsEnumerable('toString'),x=['valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'],O=Math.pow(2,53)-1}).call(this,n(26))},function(t,e,n){"use strict";n.r(e),n.d(e,"eventDrag",(function(){return S}));var r=n(8),i=n.n(r),o=n(7),a=n.n(o),s=n(2),l=n.n(s),c=n(0),u=n(3),d=n(23),h=n(1),f=n.n(h),p=n(21),g=n(10),v=n(12);function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){l()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var y=f.a.Model.extend({defaults:{type:'text',label:'',name:'',min:'',max:'',unit:'',step:1,value:'',target:'',default:'',placeholder:'',changeProp:0,options:[]},initialize:function(){var t=this.get('target'),e=this.get('name'),n=this.get('changeProp');if(!this.get('id')&&this.set('id',e),t){this.target=t,this.unset('target');var r=n?"change:".concat(e):"change:attributes:".concat(e);this.listenTo(t,r,this.targetUpdated)}},props:function(){return this.attributes},targetUpdated:function(){var t=this.getTargetValue();this.set({value:t},{fromTarget:1})},getTargetValue:function(){var t,e=this.get('name'),n=this.target;return t=this.get('changeProp')?n.get(e):n.getAttributes()[e],Object(c["isUndefined"])(t)?'':t},setTargetValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,r=this.get('name');if(!Object(c["isUndefined"])(t)){var i=t;if('false'===t?i=!1:'true'===t&&(i=!0),this.get('changeProp'))n.set(r,i,e);else{var o=b({},n.get('attributes'));o[r]=i,n.set('attributes',o,e)}}},setValueFromInput:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={value:t};this.set(r,b(b({},n),{},{avoidStore:1})),e&&(this.set('value','',n),this.set(r,n))},getInitValue:function(){var t,e=this.target,n=this.get('name');if(e){var r=e.get('attributes');t=this.get('changeProp')?e.get(n):r[n]}return t||this.get('value')||this.get('default')}}),w=f.a.Collection.extend({model:y,initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=e.em||'',this.listenTo(this,'add',this.handleAdd),this.listenTo(this,'reset',this.handleReset)},handleReset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.previousModels,r=void 0===n?[]:n;r.forEach((function(t){return t.trigger('remove')}))},handleAdd:function(t){var e=this.target;e&&(t.target=e)},setTarget:function(t){this.target=t},add:function(t,e){var n=this.em;if(Object(c["isString"])(t)||Object(c["isArray"])(t)){var r=n&&n.get&&n.get('TraitManager'),i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{build:function(e){var n=[];'string'==typeof e&&(e=[e]);for(var r=0;r<e.length;r++){var i={},o=e[r];switch(i.name=o,o){case'target':i.type='select',i.default=!1,i.options=t.optionsTarget}n.push(i)}return n}}}(r&&r.getConfig());Object(c["isString"])(t)&&(t=[t]);for(var o=0,a=t.length;o<a;o++){var s=t[o],l=Object(c["isString"])(s)?i.build(s)[0]:s;l.target=this.target,t[o]=l}}return f.a.Collection.prototype.add.apply(this,[t,e])}});function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){l()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var C=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,'\\$&')},S='component:drag',k=f.a.Model.extend(d["a"]).extend({defaults:{tagName:'div',type:'',name:'',removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,'stylable-require':'','style-signature':'',unstylable:'',highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,selectable:!0,hoverable:!0,void:!1,state:'',status:'',content:'',icon:'',style:'',classes:'',script:'','script-props':'','script-export':'',attributes:'',traits:['id','title'],propagate:'',dmode:'',toolbar:null},init:function(){},updated:function(t,e,n){},removed:function(){},initialize:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(c["bindAll"])(this,'__upSymbProps','__upSymbCls','__upSymbComps');var r=n.em,i=this.parent(),o=i&&i.attributes;if(o&&o.propagate){var a={},s=o.propagate;s.forEach((function(t){return a[t]=i.get(t)})),a.propagate=s,a=O(O({},a),e),this.set(a)}var l=this.get('propagate');l&&this.set('propagate',Object(c["isArray"])(l)?l:[l]),n&&n.config&&n.config.voidElements.indexOf(this.get('tagName'))>=0&&this.set('void',!0),n.em=r,this.opt=n,this.em=r,this.frame=n.frame,this.config=n.config||{},this.set('attributes',O(O({},this.defaults.attributes||{}),this.get('attributes')||{})),this.ccid=k.createId(this,n),this.initClasses(),this.initTraits(),this.initComponents(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,'change:script',this.scriptUpdated),this.listenTo(this,'change:tagName',this.tagUpdated),this.listenTo(this,'change:attributes',this.attrUpdated),this.listenTo(this,'change:attributes:id',this._idUpdated),this.on('change:toolbar',this.__emitUpdateTlb),this.set('status',''),this.views=[],this.__isSymbol()&&this.__initSymb(),['classes','traits','components'].forEach((function(e){var n="add remove ".concat('components'!==e?'change':'');t.listenTo(t.get(e),n.trim(),(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.emitUpdate.apply(t,[e].concat(r))}))})),n.temporary||(this.init(),r&&r.trigger('component:create',this))},__emitUpdateTlb:function(){this.emitUpdate('toolbar')},is:function(t){return!(this.get('type')!=t)},props:function(){return this.attributes},index:function(){var t=this.collection;return t&&t.indexOf(this)},setDragMode:function(t){return this.set('dmode',t)},find:function(t){var e=[],n=this.view.$el.find(t);return n.each((function(t){var r=n.eq(t).data('model');r&&e.push(r)})),e},findType:function(t){var e=[];return function n(r){return r.forEach((function(r){r.is(t)&&e.push(r),n(r.components())}))}(this.components()),e},closest:function(t){var e=this.view.$el.closest(t);return e.length&&e.data('model')},closestType:function(t){for(var e=this.parent();e&&!e.is(t);)e=e.parent();return e},contains:function(t){var e=!1;if(!t)return e;var n=function n(r){!e&&r.forEach((function(r){r===t&&(e=!0),!e&&n(r.components())}))};return n(this.components()),e},tagUpdated:function(){var t=this.collection,e=t.indexOf(this);t.remove(this),t.add(this,{at:e})},replaceWith:function(t){var e=this.collection,n=e.indexOf(this);return e.remove(this),e.add(t,{at:n})},attrUpdated:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.get('attributes'),o=i.class;o&&this.setClass(o),delete i.class;var a=i.style;a&&this.setStyle(a),delete i.style;var s=O({},this.previous('attributes')),l=Object(u["x"])(s,this.get('attributes'));Object(c["keys"])(l).forEach((function(t){return n.trigger("change:attributes:".concat(t),n,l[t],r)}))},setAttributes:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.set('attributes',O({},t),e),this},addAttributes:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=O(O({},this.getAttributes()),t);return this.setAttributes(n,e),this},getStyle:function(){var t=this.em;if(t&&t.getConfig('avoidInlineStyle')){var e=t.get('state'),n=t.get('CssComposer').getIdRule(this.getId(),{state:e});if(this.rule=n,n)return n.getStyle()}return d["a"].getStyle.call(this)},setStyle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=this.opt;if(r&&r.getConfig('avoidInlineStyle')&&!i.temporary){var o=this.get('style')||{};e=O(O({},e=Object(c["isString"])(e)?this.parseStyle(e):e),o);var a=r.get('state'),s=r.get('CssComposer'),l=this.getStyle();this.rule=s.setIdRule(this.getId(),e,O(O({},n),{},{state:a}));var h=Object(u["x"])(l,e);this.set('style',{},{silent:1}),Object(c["keys"])(h).forEach((function(e){return t.trigger("change:style:".concat(e))}))}else e=d["a"].setStyle.apply(this,arguments);return e},getAttributes:function(){var t,e=this.em,n=[],r=O({},this.get('attributes')),i=e&&e.get('SelectorManager'),o=this.getId();(this.get('classes').forEach((function(t){return n.push(Object(c["isString"])(t)?t:t.get('name'))})),n.length&&(r.class=n.join(' ')),Object(c["has"])(r,'id'))||(!function(t){return t&&t.getConfig('avoidInlineStyle')}(e)?Object(c["isEmpty"])(this.getStyle())||(t=1):t=i&&i.get(o,i.Selector.TYPE_ID),t&&(r.id=this.getId()));return r},addClass:function(t){var e=this.em.get('SelectorManager').addClass(t);return this.get('classes').add(e)},setClass:function(t){return this.get('classes').reset(),this.addClass(t)},removeClass:function(t){var e=[];t=Object(c["isArray"])(t)?t:[t];var n=this.get('classes'),r=g["a"].TYPE_CLASS;return t.forEach((function(t){t.split(' ').forEach((function(t){var i=n.where({name:t,type:r})[0];i&&e.push(n.remove(i))}))})),e},getClasses:function(){var t=this.getAttributes().class;return t?t.split(' '):[]},__initSymb:function(){this.__symbReady||(this.on('change',this.__upSymbProps),this.__symbReady=1)},__isSymbol:function(){return Object(c["isArray"])(this.get('__symbol'))},__isSymbolTop:function(){var t=this.parent();return this.__isSymbol()&&t&&!t.__isSymbol()},__getSymbolOf:function(){return this.get('__symbolOf')},__getSymbToUp:function(){var t=this.get('__symbol');return this.__isSymbol()?t.filter((function(t){return t.collection||t.prevColl})):[]},__getSymbTop:function(t){for(var e=this.__isSymbol(),n=this,r=this.parent(t);r&&(e?r.__isSymbol():r.__getSymbolOf());)n=r,r=r.parent(t);return n},__upSymbProps:function(){var t=this.changedAttributes(),e=t.attributes||{};delete t.status,delete t.open,delete t.__symbol,delete t.__symbolOf,delete t.attributes,delete e.id,Object(u["m"])(e)||(t.attributes=e),!Object(u["m"])(t)&&this.__getSymbToUp().forEach((function(e){return e.set(t)}))},__upSymbCls:function(){var t=this;this.__getSymbToUp().forEach((function(e){e.set({classes:t.get('classes')})}))},__upSymbComps:function(t,e,n){if(n)if(n.add){var r=t.__getSymbToUp();this.__getSymbToUp().forEach((function(e){var i=e.__getSymbTop(),o=r.filter((function(t){var e=t.__getSymbTop({prev:1});return i&&e&&e===i}))[0]||t.clone({symbol:1});e.append(o,n)}))}else t.__getSymbToUp().forEach((function(t){return t.remove(n)}));else this.__getSymbToUp().forEach((function(n){var r=t.models.map((function(t){return t.clone({symbol:1})}));n.components().reset(r,e)}))},initClasses:function(){var t=this.get('attributes').class||[],e=[this,'change:classes',this.initClasses],n=this.get('classes')||t,r=Object(c["isString"])(n)?n.split(' '):n;this.stopListening.apply(this,e);var i=this.normalizeClasses(r),o=new v["a"]([]);return this.set('classes',o),o.add(i),o.on('add remove reset',this.__upSymbCls),this.listenTo.apply(this,e),this},initComponents:function(){var t=[this,'change:components',this.initComponents];this.stopListening.apply(this,t);var e=new p["a"](null,this.opt);e.parent=this;var n=this.get('components'),r=!this.opt.avoidChildren;return this.set('components',e),r&&e.add(Object(c["isFunction"])(n)?n(this):n,this.opt),e.on('add remove reset',this.__upSymbComps),this.listenTo.apply(this,t),this},initTraits:function(t){var e=this.em,n=[this,'change:traits',this.initTraits];this.stopListening.apply(this,n),this.loadTraits();var r=O({},this.get('attributes')),i=this.get('traits');return i.each((function(t){if(!t.get('changeProp')){var e=t.get('name'),n=t.getInitValue();e&&n&&(r[e]=n)}})),i.length&&this.set('attributes',r),this.listenTo.apply(this,n),t&&e&&e.trigger('component:toggled'),this},initScriptProps:function(){if(!this.opt.temporary){var t='script-props',e=["change:".concat(t),this.initScriptProps];this.off.apply(this,e);var n=this.previous(t)||[],r=this.get(t)||[],i=n.map((function(t){return"change:".concat(t)})).join(' '),o=r.map((function(t){return"change:".concat(t)})).join(' ');i&&this.off(i,this.__scriptPropsChange),o&&this.on(o,this.__scriptPropsChange),this.on.apply(this,e)}},__scriptPropsChange:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.avoidStore||this.trigger('rerender')},append:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.components().add(t,e);return Object(c["isArray"])(n)?n:[n]},components:function(t){var e=this.get('components');return Object(c["isUndefined"])(t)?e:(e.reset(),t&&this.append(t))},empty:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.components().reset(null,t),this},parent:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.collection||t.prev&&this.prevColl;return e&&e.parent},scriptUpdated:function(){this.set('scriptUpdated',1)},initToolbar:function(){var t=this.em,e=t&&t.getConfig('stylePrefix')||'';if(!this.get('toolbar')){var n=[];this.collection&&n.push({attributes:{class:'fa fa-arrow-up'},command:function(t){return t.runCommand('core:component-exit',{force:1})}}),this.get('draggable')&&n.push({attributes:{class:"fa fa-arrows ".concat(e,"no-touch-actions"),draggable:!0},command:'tlb-move'}),this.get('copyable')&&n.push({attributes:{class:'fa fa-clone'},command:'tlb-clone'}),this.get('removable')&&n.push({attributes:{class:'fa fa-trash-o'},command:'tlb-delete'}),this.set('toolbar',n)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=t||this.get('traits'),!((t=Object(c["isFunction"])(t)?t(this):t)instanceof w)){var n=new w([],this.opt);n.setTarget(this),t.length&&(t.forEach((function(t){return t.attributes&&delete t.attributes.value})),n.add(t)),this.set('traits',n,e)}return this},getTrait:function(t){return this.get('traits').filter((function(e){return e.get('id')===t||e.get('name')===t}))[0]},updateTrait:function(t,e){var n=this.em,r=this.getTrait(t);return r&&r.set(e),n&&n.trigger('component:toggled'),this},getTraitIndex:function(t){var e=this.getTrait(t);return e?this.get('traits').indexOf(e):-1},removeTrait:function(t){var e=this,n=this.em,r=(Object(c["isArray"])(t)?t:[t]).map((function(t){return e.getTrait(t)})),i=this.get('traits').remove(r);return n&&n.trigger('component:toggled'),i},addTrait:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.get('traits').add(t,e);return n&&n.trigger('component:toggled'),r},normalizeClasses:function(t){var e=[],n=this.em,r=n&&n.get('SelectorManager');if(r)return t.models?a()(t.models):(t.forEach((function(t){return e.push(r.add(t))})),e)},clone:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=O({},this.attributes),r=O({},this.opt),i=this.getId(),o=e&&e.get('CssComposer');n.attributes=O({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.__isSymbolTop()&&(t.symbol=1),this.get('components').each((function(e,r){n.components[r]=e.clone(O(O({},t),{},{_inner:1}))})),this.get('traits').each((function(t,e){n.traits[e]=t.clone()})),this.get('classes').each((function(t,e){n.classes[e]=t.get('name')})),n.status='',n.view='',r.collection=null;var a=new this.constructor(n,r),s="#".concat(a.getId()),l=o?o.getRules("#".concat(i)):[];if(l.forEach((function(t){var e=t.clone();e.set('selectors',[s]),o.getAll().add(e)})),a.unset('__symbol'),t.symbol){var c=this.get('__symbol')||[];c.push(a),this.set('__symbol',c),this.__initSymb(),a.set('__symbolOf',this)}var u='component:clone';return e&&e.trigger(u,a),this.trigger(u,a),a},getName:function(){var t=this.em,e=this.attributes,n=e.type,r=e.tagName,i=this.get('name'),o='div'==r,a=n||(o?'box':r),s=!n&&r&&!o&&r,l='domComponents.names.',c=i&&t&&t.t("".concat(l).concat(i)),d=s&&t&&t.t("".concat(l).concat(s)),h=t&&(t.t("".concat(l).concat(n))||t.t("".concat(l).concat(r)));return this.get('custom-name')||c||i||d||Object(u["c"])(s)||h||Object(u["c"])(a)},getIcon:function(){var t=this.get('icon');return t?t+' ':''},toHTML:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,n=[],r=t.tag,i=r||e.get('tagName'),o=e.get('void'),a=t.attributes,s=this.getAttrToHTML();for(var l in delete t.tag,a&&(Object(c["isFunction"])(a)?s=a(e,s)||{}:Object(c["isObject"])(a)&&(s=a)),s){var u=s[l],d=Object(c["isString"])(u)?u.replace(/"/g,'"'):u;Object(c["isUndefined"])(d)||(Object(c["isBoolean"])(d)?d&&n.push(l):n.push("".concat(l,"=\"").concat(d,"\"")))}var h=n.length?" ".concat(n.join(' ')):'',f="<".concat(i).concat(h).concat(o?'/':'',">").concat(e.get('content'));return e.get('components').each((function(e){return f+=e.toHTML(t)})),!o&&(f+="</".concat(i,">")),f},getAttrToHTML:function(){var t=this.getAttributes();return delete t.style,t},toJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=f.a.Model.prototype.toJSON.call(this,t);return e.attributes=this.getAttributes(),delete e.attributes.class,delete e.toolbar,delete e.traits,delete e.status,delete e.open,t.keepSymbols||(e.__symbol&&(e.__symbol=this.__getSymbToUp().map((function(t){return t.getId()}))),e.__symbolOf&&(e.__symbolOf=e.__symbolOf.getId())),this.em.getConfig('avoidDefaults')&&this.getChangedProps(e),e},getChangedProps:function(t){var e=t||f.a.Model.prototype.toJSON.apply(this),n=Object(c["result"])(this,'defaults');return Object(c["forEach"])(n,(function(t,n){-1===['type'].indexOf(n)&&e[n]===t&&delete e[n]})),Object(c["isEmpty"])(e.type)&&delete e.type,Object(c["forEach"])(['attributes','style'],(function(t){Object(c["isEmpty"])(n[t])&&Object(c["isEmpty"])(e[t])&&delete e[t]})),Object(c["forEach"])(['classes','components'],(function(t){(!e[t]||Object(c["isEmpty"])(n[t])&&!e[t].length)&&delete e[t]})),e},getId:function(){return(this.get('attributes')||{}).id||this.ccid||this.cid},setId:function(t,e){var n=O({},this.get('attributes'));return n.id=t,this.set('attributes',n,e),this},getEl:function(t){var e=this.getView(t);return e&&e.el},getView:function(t){var e=this.view,n=this.views;return t&&(e=n.filter((function(e){return e._getFrame()===t.view}))[0]),e},getCurrentView:function(){var t=(this.em.get('currentFrame')||{}).model;return this.getView(t)},__getScriptProps:function(){var t=this.props();return(this.get('script-props')||[]).reduce((function(e,n){return e[n]=t[n],e}),{})},getScriptString:function(t){var e=this,n=t||this.get('script');if(!n)return n;if(this.get('script-props'))n=n.toString().trim();else{if('function'==typeof n){var r=n.toString().trim();n=(r=r.replace(/^function[\s\w]*\(\)\s?\{/,'').replace(/\}$/,'')).trim()}var o=this.em.getConfig(),a=C(o.tagVarStart||'{[ '),s=C(o.tagVarEnd||' ]}'),l=new RegExp("".concat(a,"([\\w\\d-]*)").concat(s),'g');n=n.replace(l,(function(t,n){e.scriptUpdated();var r=e.attributes[n]||'';return Object(c["isArray"])(r)||'object'==i()(r)?JSON.stringify(r):r}))}return n},emitUpdate:function(t){for(var e=this.em,n='component:update'+(t?":".concat(t):''),r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];t&&this.updated.apply(this,[t,t&&this.get(t),t&&this.previous(t)].concat(i)),this.trigger.apply(this,[n].concat(i)),e&&e.trigger.apply(e,[n,this].concat(i))},onAll:function(t){return Object(c["isFunction"])(t)&&(t(this),this.components().forEach((function(e){return e.onAll(t)}))),this},remove:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.collection;return e&&e.remove(this,t)},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.remove({temporary:1}),t&&t.append(this,e),this},resetId:function(){var t=this.em,e=this.getId();if(e){var n=k.createId(this);this.setId(n);var r=t&&t.get('CssComposer').getIdRule(e),i=r&&r.get('selectors').at(0);return i&&i.set('name',n),this}},_getStyleRule:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,n=this.em,r=e||this.getId();return n&&n.get('CssComposer').getIdRule(r)},_getStyleSelector:function(t){var e=this._getStyleRule(t);return e&&e.get('selectors').at(0)},_idUpdated:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.idUpdate){var r=this.ccid,i=this.get('attributes')||{},o=i.id,a=(this.previous('attributes')||{}).id||r,s=k.getList(this);if(s[o]||!o&&a)return this.setId(a,{idUpdate:1});delete s[a],s[o]=this,this.ccid=o;var l=this._getStyleSelector({id:a});l&&l.set({name:o,label:o})}}},{isComponent:function(t){return{tagName:t.tagName?t.tagName.toLowerCase():''}},ensureInList:function(t){var e=k.getList(t),n=t.getId(),r=e[n];if(r){if(r!==t){var i=k.getIncrementId(n,e);t.setId(i),e[i]=t}}else e[n]=t;t.components().forEach((function(t){return k.ensureInList(t)}))},createId:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=k.getList(t),i=t.get('attributes'),o=i.id;return o?(e=k.getIncrementId(o,r,n),t.setId(e)):e=k.getNewId(r),r[e]=t,e},getNewId:function(t){for(var e=Object.keys(t).length.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-e),r="i".concat(n);t[r];)r=k.getNewId(t);return r},getIncrementId:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.keepIds,i=void 0===r?[]:r,o=1,a=t;if(i.indexOf(t)<0)for(;e[a];)o++,a="".concat(t,"-").concat(o);return a},getList:function(t){var e=t.opt&&t.opt.domc;return e?e.componentsById:{}},checkId:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Object(c["isArray"])(t)?t:[t],o=r.keepIds,a=void 0===o?[]:o;i.forEach((function(t){var i=t.attributes,o=void 0===i?{}:i,s=t.components,l=o.id;if(l&&n[l]&&a.indexOf(l)<0){var u=k.getIncrementId(l,n);o.id=u,Object(c["isArray"])(e)&&e.forEach((function(t){var e=t.selectors;e.forEach((function(t,n){t==="#".concat(l)&&(e[n]="#".concat(u))}))}))}s&&k.checkId(s,e,n,r)}))}});e["default"]=k},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(21),c=n(35),u=n(12),d=n(9),h=n(3);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=a.a.View.extend({className:function(){return this.getClasses()},tagName:function(){return this.model.get('tagName')},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=t.config||{},r=n.em,i=e.opt||{},o=this.$el,a=this.el;n.draggableComponents;this.opts=t,this.modelOpt=i,this.config=n,this.em=r||'',this.pfx=n.stylePrefix||'',this.ppfx=n.pStylePrefix||'',this.attr=e.get('attributes'),this.classe=this.attr.class||[],this.listenTo(e,'change:style',this.updateStyle),this.listenTo(e,'change:attributes change:_innertext',this.renderAttributes),this.listenTo(e,'change:highlightable',this.updateHighlight),this.listenTo(e,'change:status',this.updateStatus),this.listenTo(e,'change:script rerender',this.reset),this.listenTo(e,'change:content',this.updateContent),this.listenTo(e,'change',this.handleChange),this.listenTo(e,'active',this.onActive),this.listenTo(e,'disable',this.onDisable),o.data('model',e),Object(h["w"])(a,this),e.view=this,this._getFrame()&&e.views.push(this),this.initClasses(),this.initComponents({avoidRender:1}),this.events=p(p({},this.events),this.__isDraggable()&&{dragstart:'handleDragStart'}),this.delegateEvents(),!i.temporary&&this.init(this._clbObj())},__isDraggable:function(){var t=this.model,e=this.config,n=t.attributes,r=n._innertext,i=n.draggable;return e.draggableComponents&&i&&!r},_clbObj:function(){var t=this.em,e=this.model,n=this.el;return{editor:t&&t.getEditor(),model:e,el:n}},init:function(){},removed:function(){},onActive:function(){},onDisable:function(){},remove:function(){var t=this;a.a.View.prototype.remove.apply(t,arguments);var e=t.model,n=t._getFrame()||{},r=n.model;e.components().forEach((function(t){var e=t.getView(r);e&&e.remove()}));var i=e.views;return i.splice(i.indexOf(t),1),t.removed(t._clbObj()),t.$el.data({model:'',collection:'',view:''}),delete t.model,delete t.$el,delete t.el.__gjsv,delete t.childrenView,delete t.scriptContainer,delete t.opts,t},handleDragStart:function(t){t.preventDefault(),t.stopPropagation(),this.em.get('Commands').run('tlb-move',{target:this.model,event:t})},initClasses:function(){var t=this.model,e='change:classes',n=t.get('classes');n instanceof u["a"]&&(this.stopListening(t,e,this.initClasses),this.listenTo(t,e,this.initClasses),this.listenTo(n,'add remove change',this.updateClasses),n.length&&this.importClasses())},initComponents:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.$el,r=this.childrenView,i='change:components',o=e.get('components'),a=[e,i,this.initComponents];o instanceof l["a"]&&(n.data('collection',o),r&&r.remove(),this.stopListening.apply(this,a),!t.avoidRender&&this.renderChildren(),this.listenTo.apply(this,a))},handleChange:function(){var t=this.model,e=Object(s["keys"])(t.changed);if(1!==e.length||'status'!==e[0])for(var n in t.emitUpdate(),t.changed)t.emitUpdate(n)},importClasses:function(){var t=this.config.em.get('SelectorManager');t&&this.model.get('classes').each((function(e){t.add(e.get('name'))}))},updateStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(this.em,this.el),n=this.model.get('status'),r=(this.pfx,this.ppfx),i="".concat(r,"selected"),o="".concat(i,"-parent"),a="".concat(r,"freezed"),s="".concat(r,"hovered"),l=[i,o,a,s];this.$el.removeClass(l.join(' '));var c=e.getAttribute('class')||'',u='';switch(n){case'selected':u="".concat(c," ").concat(i);break;case'selected-parent':u="".concat(c," ").concat(o);break;case'freezed':u="".concat(c," ").concat(a);break;case'freezed-selected':u="".concat(c," ").concat(a," ").concat(i);break;case'hovered':u=t.avoidHover?'':"".concat(c," ").concat(s)}(u=u.trim())&&e.setAttribute('class',u)},updateHighlight:function(){var t=this.model.get('highlightable');this.setAttribute('data-highlightable',t?1:'')},updateStyle:function(){var t=this.model,e=this.em,n=this.el;if(e&&e.getConfig('avoidInlineStyle')){var r=t.getStyle(),i=Object(s["isEmpty"])(r);!i&&t.setStyle(r),t.get('_innertext')&&i?n.removeAttribute('id'):n.id=t.getId()}else this.setAttribute('style',t.styleToString())},updateClasses:function(){var t=this.model.get('classes').pluck('name').join(' ');this.setAttribute('class',t),this.updateStatus()},setAttribute:function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},getClasses:function(){return this.model.getClasses().join(' ')},updateAttributes:function(){var t=[],e=this.model,n=this.$el,r=this.el,i=(this.config,e.attributes),o=i.highlightable,a=i.textable,l=p(p(p({'data-gjs-type':i.type||'default'},this.__isDraggable()?{draggable:!0}:{}),o?{'data-highlightable':1}:{}),a?{contenteditable:'false','data-gjs-textable':'true'}:{});Object(s["each"])(r.attributes,(function(e){return t.push(e.nodeName)})),t.forEach((function(t){return n.removeAttr(t)}));var c=p(p({},l),e.getAttributes());Object(s["keys"])(c).forEach((function(t){return!1===c[t]&&delete c[t]})),n.attr(c),this.updateStyle()},updateContent:function(){this.getChildrenContainer().innerHTML=this.model.get('content')},prevDef:function(t){t.preventDefault()},updateScript:function(){var t=this.model,e=this.em;t.get('script')&&e&&e.get('Canvas').getCanvasView().updateScript(this)},getChildrenContainer:function(){var t=this.el;return'function'==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},getOffsetRect:function(){var t={},e=this.el,n=0,r=0;return function i(o){var a=o.offsetParent;a?(n+=a.offsetTop,r+=a.offsetLeft,i(a)):(t.top=e.offsetTop+n,t.left=e.offsetLeft+r,t.bottom=t.top+e.offsetHeight,t.right=t.left+e.offsetWidth)}(e),t},isInViewport:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.rect,n=this.el,r=n.ownerDocument,i=r.body,o=r.defaultView.frameElement,a=e||this.getOffsetRect(),s=a.top,l=a.left,c=this._getFrame().getOffsetRect();return s>=c.scrollTop&&l>=c.scrollLeft&&s<=c.scrollBottom&&l<=o.offsetWidth+i.scrollLeft},scrollIntoView:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getOffsetRect(),n=this.isInViewport({rect:e});if(!n||t.force){var r=this.el;'smooth'!==t.behavior?r.ownerDocument.defaultView.scrollTo(0,e.top):r.scrollIntoView(p({behavior:'smooth',block:'nearest'},t))}},reset:function(){var t=this.el;this.el='',this._ensureElement(),this._setData(),Object(d["j"])(t,this.el),this.render()},_setData:function(){var t=this.model,e=t.components();this.$el.data({model:t,collection:e,view:this})},_getFrame:function(){return this.config.frameView},renderChildren:function(){this.updateContent();var t=this.getChildrenContainer(),e=this.childrenView||new c["a"]({collection:this.model.get('components'),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),r=0,i=n.length;r<i;r++)t.appendChild(n.shift())},renderAttributes:function(){this.updateAttributes(),this.updateClasses()},render:function(){return this.renderAttributes(),this.modelOpt.temporary||(this.renderChildren(),this.updateScript(),Object(h["w"])(this.el,this),this.postRender()),this},postRender:function(){var t=this.em,e=this.model;this.modelOpt.temporary||(this.onRender(this._clbObj()),t&&t.trigger('component:mount',e))},onRender:function(){}})},function(t,e,n){var r=n(74),i=n(75),o=n(43),a=n(76);t.exports=function(t){return r(t)||i(t)||o(t)||a()}},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e,n){"use strict";n.d(e,"i",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"h",(function(){return l})),n.d(e,"f",(function(){return c})),n.d(e,"j",(function(){return u})),n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"d",(function(){return p})),n.d(e,"c",(function(){return g}));var r=n(0),i='tag',o='attributes',a='transitionend oTransitionEnd transitionend webkitTransitionEnd',s=function(t){return t&&9===t.nodeType},l=function(t){return t&&!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},c=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},u=function(t,e){t.parentNode.replaceChild(e,t)},d=function(t,e,n){var i=t.childNodes,o=i.length,a=Object(r["isUndefined"])(n)?o:n;Object(r["isString"])(e)&&(t.insertAdjacentHTML('beforeEnd',e),e=t.lastChild,t.removeChild(e)),a>=o?t.appendChild(e):t.insertBefore(e,i[a])},h=function(t,e){return d(t,e)},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',n=arguments.length>2?arguments[2]:void 0,i=document.createElement(t);return e&&Object(r["each"])(e,(function(t,e){return i.setAttribute(e,t)})),n&&(Object(r["isString"])(n)?i.innerHTML=n:i.appendChild(n)),i},p=function(t,e){var n;try{n=new window[e](t.type,t)}catch(t){(n=document.createEvent(e)).initEvent(t.type,!0,!0)}return n.keyCodeVal=t.keyCode,n._parentEvent=t,['keyCode','which'].forEach((function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})})),n},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Array.isArray(e)?e:[e];n.forEach((function(e){var n=e[i]||'div',a=e[o]||{},s=document.createElement(n);Object(r["each"])(a,(function(t,e){s.setAttribute(e,t)})),t.appendChild(s)}))}},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0),a=1,s=2,l=i.a.Model,c=l.extend({idAttribute:'name',defaults:{name:'',label:'',type:a,active:!0,private:!1,protected:!1},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.config,r=void 0===n?{}:n,i=this.get('name'),o=this.get('label');i?o||this.set('label',i):this.set('name',o);var a=this.get('name'),s=r.escapeName,l=s?s(a):c.escapeName(a);this.set('name',l),this.em=r.em},getFullName:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.escape,n=this.get('name'),r='';switch(this.get('type')){case a:r='.';break;case s:r='#'}return r+(e?e(n):n)},toJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=l.prototype.toJSON.call(this,[t]),r=Object(o["result"])(this,'defaults');if(e&&e.getConfig('avoidDefaults')){Object(o["forEach"])(r,(function(t,e){n[e]===t&&delete n[e]})),n.label===n.name&&delete n.label;var i=Object(o["keys"])(n).length;1===i&&n.name&&(n=n.name),2===i&&n.name&&n.type&&(n=this.getFullName())}return n}},{TYPE_CLASS:a,TYPE_ID:s,escapeName:function(t){return"".concat(t).trim().replace(/([^a-z0-9\w-\:]+)/gi,'-')}});e["a"]=c},function(t,e,n){"use strict";n.r(e);var r=document,i=window,o=Array.prototype,a=o.filter,s=o.indexOf,l=o.map,c=o.push,u=o.reverse,d=o.slice,h=o.splice,f=/^#[\w-]*$/,p=/^\.[\w-]*$/,g=/<.+>/,v=/^\w+$/;function m(t,e){return void 0===e&&(e=r),p.test(t)?e.getElementsByClassName(t.slice(1)):v.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function b(t,e){if(void 0===e&&(e=r),t){if(t.__cash)return t;var n=t;if(P(t)){if(e.__cash&&(e=e[0]),!(n=f.test(t)?e.getElementById(t.slice(1)):g.test(t)?ht(t):m(t,e)))return}else if(T(t))return this.ready(t);(n.nodeType||n===i)&&(n=[n]),this.length=n.length;for(var o=0,a=this.length;o<a;o++)this[o]=n[o]}}function y(t,e){return new b(t,e)}var w=y.fn=y.prototype=b.prototype={constructor:y,__cash:!0,length:0,splice:h};w.get=function(t){return void 0===t?d.call(this):this[t<0?t+this.length:t]},w.eq=function(t){return y(this.get(t))},w.first=function(){return this.eq(0)},w.last=function(){return this.eq(-1)},w.map=function(t){return y(l.call(this,(function(e,n){return t.call(e,n,e)})))},w.slice=function(){return y(d.apply(this,arguments))};var x=/(?:^\w|[A-Z]|\b\w)/g,O=/[\s-_]+/g;function C(t){return t.replace(x,(function(t,e){return t[e?'toUpperCase':'toLowerCase']()})).replace(O,'')}function S(t,e){for(var n=0,r=t.length;n<r&&!1!==e.call(t[n],t[n],n,t);n++);}y.camelCase=C,y.each=S,w.each=function(t){return S(this,(function(e,n){return t.call(e,n,e)})),this},w.removeProp=function(t){return this.each((function(e,n){delete n[t]}))},y.extend=w.extend=function(t){void 0===t&&(t=this);for(var e=arguments,n=e.length,r=n<2?0:1;r<n;r++)for(var i in e[r])t[i]=e[r][i];return t};var k=1;function j(t,e){var n=t&&(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector);return!!n&&n.call(t,e)}function T(t){return'function'==typeof t}function P(t){return'string'==typeof t}function E(t){return!isNaN(parseFloat(t))&&isFinite(t)}y.guid=k,y.matches=j,y.isFunction=T,y.isString=P,y.isNumeric=E;var M=Array.isArray;function D(t){return P(t)?function(e,n){return j(n,t)}:t.__cash?function(e,n){return t.is(n)}:function(t,e,n){return e===n}}y.isArray=M,w.prop=function(t,e){if(t){if(P(t))return arguments.length<2?this[0]&&this[0][t]:this.each((function(n,r){r[t]=e}));for(var n in t)this.prop(n,t[n]);return this}},w.filter=function(t){if(!t)return y();var e=T(t)?t:D(t);return y(a.call(this,(function(n,r){return e.call(n,r,n,t)})))};var A=/\S+/g;function L(t){return P(t)&&t.match(A)||[]}function _(t){return t.filter((function(t,e,n){return n.indexOf(t)===e}))}function N(t,e,n){if(1===t.nodeType){var r=i.getComputedStyle(t,null);return e?n?r.getPropertyValue(e):r[e]:r}}function I(t,e){return parseInt(N(t,e),10)||0}w.hasClass=function(t){var e=L(t),n=!1;return e.length&&this.each((function(t,r){return!(n=r.classList.contains(e[0]))})),n},w.removeAttr=function(t){var e=L(t);return e.length?this.each((function(t,n){S(e,(function(t){n.removeAttribute(t)}))})):this},w.attr=function(t,e){if(t){if(P(t)){if(arguments.length<2){if(!this[0])return;var n=this[0].getAttribute(t);return null===n?void 0:n}return null===e?this.removeAttr(t):this.each((function(n,r){r.setAttribute(t,e)}))}for(var r in t)this.attr(r,t[r]);return this}},w.toggleClass=function(t,e){var n=L(t),r=void 0!==e;return n.length?this.each((function(t,i){S(n,(function(t){r?e?i.classList.add(t):i.classList.remove(t):i.classList.toggle(t)}))})):this},w.addClass=function(t){return this.toggleClass(t,!0)},w.removeClass=function(t){return arguments.length?this.toggleClass(t,!1):this.attr('class','')},y.unique=_,w.add=function(t,e){return y(_(this.get().concat(y(t,e).get())))};var F=/^--/;function V(t){return F.test(t)}var R={},z=r.createElement('div').style,H=['webkit','moz','ms','o'];function $(t,e){if(void 0===e&&(e=V(t)),e)return t;if(!R[t]){var n=C(t),r=""+n.charAt(0).toUpperCase()+n.slice(1);S((n+" "+H.join(r+" ")+r).split(' '),(function(e){if(e in z)return R[t]=e,!1}))}return R[t]}y.prefixedProp=$;var U={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function B(t,e,n){return void 0===n&&(n=V(t)),n||U[t]||!E(e)?e:e+"px"}w.css=function(t,e){if(P(t)){var n=V(t);return t=$(t,n),arguments.length<2?this[0]&&N(this[0],t,n):t?(e=B(t,e,n),this.each((function(r,i){1===i.nodeType&&(n?i.style.setProperty(t,e):i.style[t]=e)}))):this}for(var r in t)this.css(r,t[r]);return this};var W='__cashData',q=/^data-(.*)/;function G(t){return t[W]=t[W]||{}}function K(t,e){var n=G(t);if(e){if(!(e in n)){var r=t.dataset?t.dataset[e]||t.dataset[C(e)]:y(t).attr("data-"+e);if(void 0!==r){try{r=JSON.parse(r)}catch(t){}n[e]=r}}return n[e]}return n}function Y(t,e){return I(t,"border"+(e?'Left':'Top')+"Width")+I(t,"padding"+(e?'Left':'Top'))+I(t,"padding"+(e?'Right':'Bottom'))+I(t,"border"+(e?'Right':'Bottom')+"Width")}function X(t,e){for(var n=0,r=e.length;n<r;n++)if(t.indexOf(e[n])<0)return!1;return!0}function J(t,e,n){S(t[n],(function(t){t[0];var r=t[1];e.removeEventListener(n,r)})),delete t[n]}y.hasData=function(t){return W in t},w.data=function(t,e){var n=this;if(!t){if(!this[0])return;return S(this[0].attributes,(function(t){var e=t.name.match(q);e&&n.data(e[1])})),K(this[0])}if(P(t))return void 0===e?this[0]&&K(this[0],t):this.each((function(n,r){return function(t,e,n){G(t)[e]=n}(r,t,e)}));for(var r in t)this.data(r,t[r]);return this},w.removeData=function(t){return this.each((function(e,n){return function(t,e){void 0===e?delete t[W]:delete G(t)[e]}(n,t)}))},S(['Width','Height'],(function(t){w["inner"+t]=function(){if(this[0])return this[0]===i?i["inner"+t]:this[0]["client"+t]}})),S(['width','height'],(function(t,e){w[t]=function(n){return this[0]?arguments.length?(n=parseInt(n,10),this.each((function(r,i){if(1===i.nodeType){var o=N(i,'boxSizing');i.style[t]=B(t,n+('border-box'===o?Y(i,!e):0))}}))):this[0]===i?this[0][C("outer-"+t)]:this[0].getBoundingClientRect()[t]-Y(this[0],!e):void 0===n?void 0:this}})),S(['Width','Height'],(function(t,e){w["outer"+t]=function(n){if(this[0])return this[0]===i?i["outer"+t]:this[0]["offset"+t]+(n?I(this[0],"margin"+(e?'Top':'Left'))+I(this[0],"margin"+(e?'Bottom':'Right')):0)}}));var Z='__cashEvents',Q='.';function tt(t){return t[Z]=t[Z]||{}}function et(t){var e=t.split(Q);return[e[0],e.slice(1).sort()]}function nt(t,e,n,r){var i=tt(t);if(e){var o=i[e];if(!o)return;r&&(r.guid=r.guid||k++),i[e]=o.filter((function(i){var o=i[0],a=i[1];if(r&&a.guid!==r.guid||!X(o,n))return!0;t.removeEventListener(e,a)}))}else if(n&&n.length)for(e in i)nt(t,e,n,r);else for(e in i)J(i,t,e)}w.off=function(t,e){var n=this;return void 0===t?this.each((function(t,e){return nt(e)})):S(L(t),(function(t){var r=et(t),i=r[0],o=r[1];n.each((function(t,n){return nt(n,i,o,e)}))})),this},w.on=function(t,e,n,r){var i=this;if(!P(t)){for(var o in t)this.on(o,e,t[o]);return this}return T(e)&&(n=e,e=!1),S(L(t),(function(t){var o=et(t),a=o[0],s=o[1];i.each((function(t,i){var o=function t(o){if(!o.namespace||X(s,o.namespace.split(Q))){var l=i;if(e){for(var c=o.target;!j(c,e);){if(c===i)return;if(!(c=c.parentNode))return}l=c}o.namespace=o.namespace||'';var u=n.call(l,o,o.data);r&&nt(i,a,s,t),!1===u&&(o.preventDefault(),o.stopPropagation())}};o.guid=n.guid=n.guid||k++,function(t,e,n,r){r.guid=r.guid||k++;var i=tt(t);i[e]=i[e]||[],i[e].push([n,r]),t.addEventListener(e,r)}(i,a,s,o)}))})),this},w.one=function(t,e,n){return this.on(t,e,n,!0)},w.ready=function(t){var e=function(){return t(y)};return'loading'!==r.readyState?setTimeout(e):r.addEventListener('DOMContentLoaded',e),this},w.trigger=function(t,e){var n=t;if(P(t)){var i=et(t),o=i[0],a=i[1];(n=r.createEvent('HTMLEvents')).initEvent(o,!0,!0),n.namespace=a.join(Q)}return n.data=e,this.each((function(t,e){e.dispatchEvent(n)}))};var rt=/select-one/i,it=/select-multiple/i;function ot(t){var e=t.type;return rt.test(e)?function(t){return t.selectedIndex<0?null:t.options[t.selectedIndex].value}(t):it.test(e)?function(t){var e=[];return S(t.options,(function(t){!t.selected||t.disabled||t.parentNode.disabled||e.push(t.value)})),e}(t):t.value}var at=/%20/g;var st=/file|reset|submit|button|image/i,lt=/radio|checkbox/i;w.serialize=function(){var t='';return this.each((function(e,n){S(n.elements||[n],(function(e){if(!e.disabled&&e.name&&'FIELDSET'!==e.tagName&&!st.test(e.type)&&(!lt.test(e.type)||e.checked)){var n=ot(e);if(void 0!==n)S(M(n)?n:[n],(function(n){t+=function(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(at,'+')}(e.name,n)}))}}))})),t.substr(1)},w.val=function(t){return void 0===t?this[0]&&ot(this[0]):this.each((function(e,n){var r=it.test(n.type),i=null===t?r?[]:'':t;r&&M(i)?S(n.options,(function(t){t.selected=i.indexOf(t.value)>=0})):n.value=i}))},w.clone=function(){return this.map((function(t,e){return e.cloneNode(!0)}))},w.detach=function(){return this.each((function(t,e){e.parentNode&&e.parentNode.removeChild(e)}))};var ct,ut=/^\s*<(\w+)[^>]*>/,dt=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function ht(t){if(function(){if(!ct){var t=r.createElement('table'),e=r.createElement('tr');ct={'*':r.createElement('div'),tr:r.createElement('tbody'),td:e,th:e,thead:t,tbody:t,tfoot:t}}}(),!P(t))return[];if(dt.test(t))return[r.createElement(RegExp.$1)];var e=ut.test(t)&&RegExp.$1,n=ct[e]||ct['*'];return n.innerHTML=t,y(n.childNodes).detach().get()}function ft(t,e,n){if(void 0!==e){var r=P(e);!r&&e.length?S(e,(function(e){return ft(t,e,n)})):S(t,r?function(t){t.insertAdjacentHTML(n?'afterbegin':'beforeend',e)}:function(t,r){return function(t,e,n){n?t.insertBefore(e,t.childNodes[0]):t.appendChild(e)}(t,r?e.cloneNode(!0):e,n)})}}y.parseHTML=ht,w.empty=function(){var t=this[0];if(t)for(;t.firstChild;)t.removeChild(t.firstChild);return this},w.append=function(){var t=this;return S(arguments,(function(e){ft(t,e)})),this},w.appendTo=function(t){return ft(y(t),this),this},w.html=function(t){if(void 0===t)return this[0]&&this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each((function(t,n){n.innerHTML=e}))},w.insertAfter=function(t){var e=this;return y(t).each((function(t,n){var r=n.parentNode;e.each((function(e,i){r.insertBefore(t?i.cloneNode(!0):i,n.nextSibling)}))})),this},w.after=function(){var t=this;return S(u.apply(arguments),(function(e){u.apply(y(e).slice()).insertAfter(t)})),this},w.insertBefore=function(t){var e=this;return y(t).each((function(t,n){var r=n.parentNode;e.each((function(e,i){r.insertBefore(t?i.cloneNode(!0):i,n)}))})),this},w.before=function(){var t=this;return S(arguments,(function(e){y(e).insertBefore(t)})),this},w.prepend=function(){var t=this;return S(arguments,(function(e){ft(t,e,!0)})),this},w.prependTo=function(t){return ft(y(t),u.apply(this.slice()),!0),this},w.remove=function(){return this.detach().off()},w.replaceWith=function(t){var e=this;return this.each((function(n,r){var i=r.parentNode;if(i){var o=n?y(t).clone():y(t);if(!o[0])return e.remove(),!1;i.replaceChild(o[0],r),y(o[0]).after(o.slice(1))}}))},w.replaceAll=function(t){return y(t).replaceWith(this),this},w.text=function(t){return void 0===t?this[0]?this[0].textContent:'':this.each((function(e,n){n.textContent=t}))};var pt=r.documentElement;w.offset=function(){var t=this[0];if(t){var e=t.getBoundingClientRect();return{top:e.top+i.pageYOffset-pt.clientTop,left:e.left+i.pageXOffset-pt.clientLeft}}},w.offsetParent=function(){return y(this[0]&&this[0].offsetParent)},w.position=function(){var t=this[0];if(t)return{left:t.offsetLeft,top:t.offsetTop}},w.children=function(t){var e=[];return this.each((function(t,n){c.apply(e,n.children)})),e=y(_(e)),t?e.filter((function(e,n){return j(n,t)})):e},w.contents=function(){var t=[];return this.each((function(e,n){c.apply(t,'IFRAME'===n.tagName?[n.contentDocument]:n.childNodes)})),y(t.length&&_(t))},w.find=function(t){for(var e=[],n=0,r=this.length;n<r;n++){var i=m(t,this[n]);i.length&&c.apply(e,i)}return y(e.length&&_(e))},w.has=function(t){var e=P(t)?function(e,n){return!!m(t,n).length}:function(e,n){return n.contains(t)};return this.filter(e)},w.is=function(t){if(!t||!this[0])return!1;var e=D(t),n=!1;return this.each((function(r,i){return!(n=e(r,i,t))})),n},w.next=function(){return y(this[0]&&this[0].nextElementSibling)},w.not=function(t){if(!t||!this[0])return this;var e=D(t);return this.filter((function(n,r){return!e(n,r,t)}))},w.parent=function(){var t=[];return this.each((function(e,n){n&&n.parentNode&&t.push(n.parentNode)})),y(_(t))},w.index=function(t){var e=t?y(t)[0]:this[0],n=t?this:y(e).parent().children();return s.call(n,e)},w.closest=function(t){return t&&this[0]?this.is(t)?this.filter(t):this.parent().closest(t):y()},w.parents=function(t){var e,n=[];return this.each((function(i,o){for(e=o;e&&e.parentNode&&e!==r.body.parentNode;)e=e.parentNode,(!t||t&&j(e,t))&&n.push(e)})),y(_(n))},w.prev=function(){return y(this[0]&&this[0].previousElementSibling)},w.siblings=function(){var t=this[0];return this.parent().children().filter((function(e,n){return n!==t}))},e["default"]=y},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n.n(i),a=n(10);e["a"]=o.a.Collection.extend({model:a["a"],modelId:function(t){return"".concat(t.name,"_").concat(t.type||a["a"].TYPE_CLASS)},getStyleable:function(){return Object(r["filter"])(this.models,(function(t){return t.get('active')&&!t.get('private')}))},getValid:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.noDisabled;return Object(r["filter"])(this.models,(function(t){return!t.get('private')})).filter((function(t){return e?t.get('active'):1}))},getFullString:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t||this;return r.forEach((function(t){return n.push(t.getFullName(e))})),n.join('').trim()}})},function(t,e,n){1&&(t.exports=function(){'use strict';var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),d=/Opera\//.test(t),h=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=h&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),v=/Android/.test(t),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=g||/Mac/.test(e),y=/\bCrOS\b/.test(t),w=/win/i.test(e),x=d&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var O=b&&(c||d&&(null==x||x<12.11)),C=n||a&&s>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var k,j=function(t,e){var n=t.className,r=S(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function P(t,e){return T(t).appendChild(e)}function E(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"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 M(t,e,n,r){var i=E(t,e,n,r);return i.setAttribute("role","presentation"),i}function D(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(t,e){var n=t.className;S(e).test(n)||(t.className+=(n?" ":"")+e)}function _(t,e){for(var n=t.split(" "),r=0;r<n.length;r++)n[r]&&!S(n[r]).test(e)&&(e+=" "+n[r]);return e}k=document.createRange?function(t,e,n,r){var i=document.createRange();return i.setEnd(r||t,n),i.setStart(t,e),i}:function(t,e,n){var r=document.body.createTextRange();try{r.moveToElementText(t.parentNode)}catch(t){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",e),r};var N=function(t){t.select()};function I(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function F(t,e,n){for(var r in e||(e={}),t)!t.hasOwnProperty(r)||!1===n&&e.hasOwnProperty(r)||(e[r]=t[r]);return e}function V(t,e,n,r,i){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=r||0,a=i||0;;){var s=t.indexOf("\t",o);if(s<0||s>=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}g?N=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(N=function(t){try{t.select()}catch(t){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};function z(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}R.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},R.prototype.set=function(t,e){this.f=e;var n=+new Date+t;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=n)};var H=50,$={toString:function(){return"CodeMirror.Pass"}},U={scroll:!1},B={origin:"*mouse"},W={origin:"+move"};function q(t,e,n){for(var r=0,i=0;;){var o=t.indexOf("\t",r);-1==o&&(o=t.length);var a=o-r;if(o==t.length||i+a>=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var G=[""];function K(t){for(;G.length<=t;)G.push(Y(G)+" ");return G[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var n=[],r=0;r<t.length;r++)n[r]=e(t[r],r);return n}function J(){}function Z(t,e){var n;return Object.create?n=Object.create(t):(J.prototype=t,n=new J),e&&F(e,n),n}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function tt(t){return/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\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]/;function it(t){return t.charCodeAt(0)>=768&&rt.test(t)}function ot(t,e,n){for(;(n<0?e>0:e<t.length)&&it(t.charAt(e));)e+=n;return e}function at(t,e,n){for(var r=e>n?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}var st=null;function lt(t,e,n){var r;st=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"==n?r=i:st=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:st=i)}return null!=r?r:st}var ct=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(t,e,n){this.level=t,this.from=e,this.to=n}return function(l,c){var u="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!n.test(l))return!1;for(var d,h=l.length,f=[],p=0;p<h;++p)f.push((d=l.charCodeAt(p))<=247?t.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?e.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":8204==d?"b":"L");for(var g=0,v=u;g<h;++g){var m=f[g];"m"==m?f[g]=v:v=m}for(var b=0,y=u;b<h;++b){var w=f[b];"1"==w&&"r"==y?f[b]="n":i.test(w)&&(y=w,"r"==w&&(f[b]="R"))}for(var x=1,O=f[0];x<h-1;++x){var C=f[x];"+"==C&&"1"==O&&"1"==f[x+1]?f[x]="1":","!=C||O!=f[x+1]||"1"!=O&&"n"!=O||(f[x]=O),O=C}for(var S=0;S<h;++S){var k=f[S];if(","==k)f[S]="N";else if("%"==k){var j=void 0;for(j=S+1;j<h&&"%"==f[j];++j);for(var T=S&&"!"==f[S-1]||j<h&&"1"==f[j]?"1":"N",P=S;P<j;++P)f[P]=T;S=j-1}}for(var E=0,M=u;E<h;++E){var D=f[E];"L"==M&&"1"==D?f[E]="L":i.test(D)&&(M=D)}for(var A=0;A<h;++A)if(r.test(f[A])){var L=void 0;for(L=A+1;L<h&&r.test(f[L]);++L);for(var _="L"==(A?f[A-1]:u),N=_==("L"==(L<h?f[L]:u))?_?"L":"R":u,I=A;I<L;++I)f[I]=N;A=L-1}for(var F,V=[],R=0;R<h;)if(o.test(f[R])){var z=R;for(++R;R<h&&o.test(f[R]);++R);V.push(new s(0,z,R))}else{var H=R,$=V.length,U="rtl"==c?1:0;for(++R;R<h&&"L"!=f[R];++R);for(var B=H;B<R;)if(a.test(f[B])){H<B&&(V.splice($,0,new s(1,H,B)),$+=U);var W=B;for(++B;B<R&&a.test(f[B]);++B);V.splice($,0,new s(2,W,B)),$+=U,H=B}else++B;H<R&&V.splice($,0,new s(1,H,R))}return"ltr"==c&&(1==V[0].level&&(F=l.match(/^\s+/))&&(V[0].from=F[0].length,V.unshift(new s(0,0,F[0].length))),1==Y(V).level&&(F=l.match(/\s+$/))&&(Y(V).to-=F[0].length,V.push(new s(0,h-F[0].length,h)))),"rtl"==c?V.reverse():V}}();function ut(t,e){var n=t.order;return null==n&&(n=t.order=ct(t.text,e)),n}var dt=[],ht=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var r=t._handlers||(t._handlers={});r[e]=(r[e]||dt).concat(n)}};function ft(t,e){return t._handlers&&t._handlers[e]||dt}function pt(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var r=t._handlers,i=r&&r[e];if(i){var o=z(i,n);o>-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function gt(t,e){var n=ft(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function vt(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),gt(t,n||e.type,t,e),Ot(e)||e.codemirrorIgnore}function mt(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),r=0;r<e.length;++r)-1==z(n,e[r])&&n.push(e[r])}function bt(t,e){return ft(t,e).length>0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function wt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ot(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ct(t){wt(t),xt(t)}function St(t){return t.target||t.srcElement}function kt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var jt,Tt,Pt=function(){if(a&&s<9)return!1;var t=E('div');return"draggable"in t||"dragDrop"in t}();function Et(t){if(null==jt){var e=E("span","");P(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(jt=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=jt?E("span",""):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Mt(t){if(null!=Tt)return Tt;var e=P(t,document.createTextNode("AخA")),n=k(e,0,1).getBoundingClientRect(),r=k(e,1,2).getBoundingClientRect();return T(t),!(!n||n.left==n.right)&&(Tt=r.right-n.right<3)}var Dt,At=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){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?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Lt=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)},_t="oncopy"in(Dt=E("div"))||(Dt.setAttribute("oncopy","return;"),"function"==typeof Dt.oncopy),Nt=null,It={},Ft={};function Vt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),It[t]=e}function Rt(t){if("string"==typeof t&&Ft.hasOwnProperty(t))t=Ft[t];else if(t&&"string"==typeof t.name&&Ft.hasOwnProperty(t.name)){var e=Ft[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Rt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Rt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function zt(t,e){e=Rt(e);var n=It[e.name];if(!n)return zt(t,"text/plain");var r=n(t,e);if(Ht.hasOwnProperty(e.name)){var i=Ht[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var Ht={};function $t(t,e){F(e,Ht.hasOwnProperty(t)?Ht[t]:Ht[t]={})}function Ut(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Bt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Wt(t,e,n){return!t.startState||t.startState(e,n)}var qt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Gt(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 n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e<o){n=i;break}e-=o}return n.lines[e]}function Kt(t,e,n){var r=[],i=e.line;return t.iter(e.line,n.line+1,(function(t){var o=t.text;i==n.line&&(o=o.slice(0,n.ch)),i==e.line&&(o=o.slice(e.ch)),r.push(o),++i})),r}function Yt(t,e,n){var r=[];return t.iter(e,n,(function(t){r.push(t.text)})),r}function Xt(t,e){var n=e-t.height;if(n)for(var r=t;r;r=r.parent)r.height+=n}function Jt(t){if(null==t.parent)return null;for(var e=t.parent,n=z(e.lines,t),r=e.parent;r;e=r,r=r.parent)for(var i=0;r.children[i]!=e;++i)n+=r.children[i].chunkSize();return n+e.first}function Zt(t,e){var n=t.first;t:do{for(var r=0;r<t.children.length;++r){var i=t.children[r],o=i.height;if(e<o){t=i;continue t}e-=o,n+=i.chunkSize()}return n}while(!t.lines);for(var a=0;a<t.lines.length;++a){var s=t.lines[a].height;if(e<s)break;e-=s}return n+a}function Qt(t,e){return e>=t.first&&e<t.first+t.size}function te(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function ee(t,e,n){if(void 0===n&&(n=null),!(this instanceof ee))return new ee(t,e,n);this.line=t,this.ch=e,this.sticky=n}function ne(t,e){return t.line-e.line||t.ch-e.ch}function re(t,e){return t.sticky==e.sticky&&0==ne(t,e)}function ie(t){return ee(t.line,t.ch)}function oe(t,e){return ne(t,e)<0?e:t}function ae(t,e){return ne(t,e)<0?t:e}function se(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function le(t,e){if(e.line<t.first)return ee(t.first,0);var n=t.first+t.size-1;return e.line>n?ee(n,Gt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?ee(t.line,e):n<0?ee(t.line,0):t}(e,Gt(t,e.line).text.length)}function ce(t,e){for(var n=[],r=0;r<e.length;r++)n[r]=le(t,e[r]);return n}qt.prototype.eol=function(){return this.pos>=this.string.length},qt.prototype.sol=function(){return this.pos==this.lineStart},qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qt.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},qt.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},qt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},qt.prototype.backUp=function(t){this.pos-=t},qt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=V(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},qt.prototype.indentation=function(){return V(this.string,null,this.tabSize)-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},qt.prototype.match=function(t,e,n){if("string"!=typeof t){var r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},qt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},qt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ue=function(t,e){this.state=t,this.lookAhead=e},de=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,n,r){var i=[t.state.modeGen],o={};xe(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,xe(t,e.text,s.mode,n,(function(t,e){for(var n=l;c<t;){var r=i[l];r>t&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+e}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function fe(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var r=pe(t,Jt(e)),i=e.text.length>t.options.maxHighlightLength&&Ut(t.doc.mode,r.state),o=he(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function pe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new de(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=Gt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ue?c.lookAhead:0)<=o.modeFrontier))return s;var u=V(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&Gt(r,o-1).stateAfter,s=a?de.fromSaved(r,a,o):new de(r,Wt(r.mode),o);return r.iter(o,e,(function(n){ge(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function ge(t,e,n,r){var i=t.doc.mode,o=new qt(e,t.options.tabSize,n);for(o.start=o.pos=r||0,""==e&&ve(i,n.state);!o.eol();)me(i,o,n.state),o.start=o.pos}function ve(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=Bt(t,e);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function me(t,e,n,r){for(var i=0;i<10;i++){r&&(r[0]=Bt(t,n).mode);var o=t.token(e,n);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}de.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},de.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},de.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},de.fromSaved=function(t,e,n){return e instanceof ue?new de(t,Ut(t.mode,e.state),n,e.lookAhead):new de(t,Ut(t.mode,e),n)},de.prototype.save=function(t){var e=!1!==t?Ut(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ue(e,this.maxLookAhead):e};var be=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ye(t,e,n,r){var i,o,a=t.doc,s=a.mode,l=Gt(a,(e=le(a,e)).line),c=pe(t,e.line,n),u=new qt(l.text,t.options.tabSize,c);for(r&&(o=[]);(r||u.pos<e.ch)&&!u.eol();)u.start=u.pos,i=me(s,u,c.state),r&&o.push(new be(u,i,Ut(a.mode,c.state)));return r?o:new be(u,i,c.state)}function we(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==e[r]?e[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(e[r])||(e[r]+=" "+n[2])}return t}function xe(t,e,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=t.options.flattenSpans);var l,c=0,u=null,d=new qt(e,t.options.tabSize,r),h=t.options.addModeClass&&[null];for(""==e&&we(ve(n,r.state),o);!d.eol();){if(d.pos>t.options.maxHighlightLength?(s=!1,a&&ge(t,e,r,d.pos),d.pos=e.length,l=null):l=we(me(n,d,r.state,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}var Oe=!1,Ce=!1;function Se(t,e,n){this.marker=t,this.from=e,this.to=n}function ke(t,e){if(t)for(var n=0;n<t.length;++n){var r=t[n];if(r.marker==e)return r}}function je(t,e){for(var n,r=0;r<t.length;++r)t[r]!=e&&(n||(n=[])).push(t[r]);return n}function Te(t,e){if(e.full)return null;var n=Qt(t,e.from.line)&&Gt(t,e.from.line).markedSpans,r=Qt(t,e.to.line)&&Gt(t,e.to.line).markedSpans;if(!n&&!r)return null;var i=e.from.ch,o=e.to.ch,a=0==ne(e.from,e.to),s=function(t,e,n){var r;if(t)for(var i=0;i<t.length;++i){var o=t[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e)||o.from==e&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=e:o.to>e);(r||(r=[])).push(new Se(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(t,e,n){var r;if(t)for(var i=0;i<t.length;++i){var o=t[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e);(r||(r=[])).push(new Se(a,s?null:o.from-e,null==o.to?null:o.to-e))}}return r}(r,o,a),c=1==e.text.length,u=Y(e.text).length+(c?i:0);if(s)for(var d=0;d<s.length;++d){var h=s[d];if(null==h.to){var f=ke(l,h.marker);f?c&&(h.to=null==f.to?null:f.to+u):h.to=i}}if(l)for(var p=0;p<l.length;++p){var g=l[p];null!=g.to&&(g.to+=u),null==g.from?ke(s,g.marker)||(g.from=u,c&&(s||(s=[])).push(g)):(g.from+=u,c&&(s||(s=[])).push(g))}s&&(s=Pe(s)),l&&l!=s&&(l=Pe(l));var v=[s];if(!c){var m,b=e.text.length-2;if(b>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(m||(m=[])).push(new Se(s[y].marker,null,null));for(var w=0;w<b;++w)v.push(m);v.push(l)}return v}function Pe(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Ee(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function Me(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function De(t){return t.inclusiveLeft?-1:0}function Ae(t){return t.inclusiveRight?1:0}function Le(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var r=t.find(),i=e.find(),o=ne(r.from,i.from)||De(t)-De(e);if(o)return-o;var a=ne(r.to,i.to)||Ae(t)-Ae(e);return a||e.id-t.id}function _e(t,e){var n,r=Ce&&t.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(e?i.from:i.to)&&(!n||Le(n,i.marker)<0)&&(n=i.marker);return n}function Ne(t){return _e(t,!0)}function Ie(t){return _e(t,!1)}function Fe(t,e){var n,r=Ce&&t.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!n||Le(n,o.marker)<0)&&(n=o.marker)}return n}function Ve(t,e,n,r,i){var o=Gt(t,e),a=Ce&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=ne(c.from,n)||De(l.marker)-De(i),d=ne(c.to,r)||Ae(l.marker)-Ae(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ne(c.to,n)>=0:ne(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ne(c.from,r)<=0:ne(c.from,r)<0)))return!0}}}function Re(t){for(var e;e=Ne(t);)t=e.find(-1,!0).line;return t}function ze(t,e){var n=Gt(t,e),r=Re(n);return n==r?e:Jt(r)}function He(t,e){if(e>t.lastLine())return e;var n,r=Gt(t,e);if(!$e(t,r))return e;for(;n=Ie(r);)r=n.find(1,!0).line;return Jt(r)+1}function $e(t,e){var n=Ce&&e.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Ue(t,e,r))return!0}}function Ue(t,e,n){if(null==n.to){var r=n.marker.find(1,!0);return Ue(t,r.line,ke(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==e.text.length)return!0;for(var i=void 0,o=0;o<e.markedSpans.length;++o)if((i=e.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Ue(t,e,i))return!0}function Be(t){for(var e=0,n=(t=Re(t)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==t)break;e+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;e+=s.height}return e}function We(t){if(0==t.height)return 0;for(var e,n=t.text.length,r=t;e=Ne(r);){var i=e.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=t;e=Ie(r);){var o=e.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function qe(t){var e=t.display,n=t.doc;e.maxLine=Gt(n,n.first),e.maxLineLength=We(e.maxLine),e.maxLineChanged=!0,n.iter((function(t){var n=We(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ge=function(t,e,n){this.text=t,Me(this,e),this.height=n?n(this):1};function Ke(t){t.parent=null,Ee(t)}Ge.prototype.lineNo=function(){return Jt(this)},yt(Ge);var Ye={},Xe={};function Je(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xe:Ye;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var n=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=tn,Mt(t.display.measure)&&(a=ut(o,t.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],rn(o,r,fe(t,o,e!=t.display.externalMeasured&&Jt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=_(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=_(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Et(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return gt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=_(r.pre.className,r.textClass||"")),r}function Qe(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function tn(t,e,n,r,i,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;i<t.length;i++){var o=t.charAt(i);" "!=o||!n||i!=t.length-1&&32!=t.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(e,t.trailingSpace):e,d=t.cm.state.specialChars,h=!1;if(d.test(e)){c=document.createDocumentFragment();for(var f=0;1;){d.lastIndex=f;var p=d.exec(e),g=p?p.index-f:e.length-f;if(g){var v=document.createTextNode(u.slice(f,f+g));a&&s<9?c.appendChild(E("span",[v])):c.appendChild(v),t.map.push(t.pos,t.pos+g,v),t.col+=g,t.pos+=g}if(!p)break;f+=g+1;var m=void 0;if("\t"==p[0]){var b=t.cm.options.tabSize,y=b-t.col%b;(m=c.appendChild(E("span",K(y),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=y}else"\r"==p[0]||"\n"==p[0]?((m=c.appendChild(E("span","\r"==p[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",p[0]),t.col+=1):((m=t.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&s<9?c.appendChild(E("span",[m])):c.appendChild(m),t.col+=1);t.map.push(t.pos,t.pos+1,m),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),a&&s<9&&(h=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||r||i||h||o||l){var w=n||"";r&&(w+=r),i&&(w+=i);var x=E("span",[c],w,o);if(l)for(var O in l)l.hasOwnProperty(O)&&"style"!=O&&"class"!=O&&x.setAttribute(O,l[O]);return t.content.appendChild(x)}t.content.appendChild(c)}}function en(t,e){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,h=0;h<e.length&&!((d=e[h]).to>c&&d.from<=c);h++);if(d.to>=u)return t(n,r,i,o,a,s,l);t(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function nn(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function rn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,l,c,u,d,h,f=i.length,p=0,g=1,v="",m=0;;){if(m==p){l=c=u=s="",h=null,d=null,m=1/0;for(var b=[],y=void 0,w=0;w<r.length;++w){var x=r[w],O=x.marker;if("bookmark"==O.type&&x.from==p&&O.widgetNode)b.push(O);else if(x.from<=p&&(null==x.to||x.to>p||O.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,c=""),O.className&&(l+=" "+O.className),O.css&&(s=(s?s+";":"")+O.css),O.startStyle&&x.from==p&&(u+=" "+O.startStyle),O.endStyle&&x.to==m&&(y||(y=[])).push(O.endStyle,x.to),O.title&&((h||(h={})).title=O.title),O.attributes)for(var C in O.attributes)(h||(h={}))[C]=O.attributes[C];O.collapsed&&(!d||Le(d.marker,O)<0)&&(d=x)}else x.from>p&&m>x.from&&(m=x.from)}if(y)for(var S=0;S<y.length;S+=2)y[S+1]==m&&(c+=" "+y[S]);if(!d||d.from==p)for(var k=0;k<b.length;++k)nn(e,0,b[k]);if(d&&(d.from||0)==p){if(nn(e,(null==d.to?f+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=f)break;for(var j=Math.min(f,m);1;){if(v){var T=p+v.length;if(!d){var P=T>j?v.slice(0,j-p):v;e.addToken(e,P,a?a+l:l,u,p+P.length==m?c:"",s,h)}if(T>=j){v=v.slice(j-p),p=j;break}p=T,u=""}v=i.slice(o,o=n[g++]),a=Je(n[g++],e.cm.options)}}else for(var E=1;E<n.length;E+=2)e.addToken(e,i.slice(o,o=n[E]),Je(n[E+1],e.cm.options))}function on(t,e,n){this.line=e,this.rest=function(t){for(var e,n;e=Ie(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}(e),this.size=this.rest?Jt(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=$e(t,e)}function an(t,e,n){for(var r,i=[],o=e;o<n;o=r){var a=new on(t.doc,Gt(t.doc,o),o);r=o+a.size,i.push(a)}return i}var sn=null,ln=null;function cn(t,e){var n=ft(t,e);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);sn?r=sn.delayedCallbacks:ln?r=ln:(r=ln=[],setTimeout(un,0));for(var o=function(t){r.push((function(){return n[t].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function un(){var t=ln;ln=null;for(var e=0;e<t.length;++e)t[e]()}function dn(t,e,n,r){for(var i=0;i<e.changes.length;i++){var o=e.changes[i];"text"==o?pn(t,e):"gutter"==o?vn(t,e,n,r):"class"==o?gn(t,e):"widget"==o&&mn(t,e,r)}e.changes=null}function hn(t){return t.node==t.text&&(t.node=E("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),a&&s<8&&(t.node.style.zIndex=2)),t.node}function fn(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):Ze(t,e)}function pn(t,e){var n=e.text.className,r=fn(t,e);e.text==e.node&&(e.node=r.pre),e.text.parentNode.replaceChild(r.pre,e.text),e.text=r.pre,r.bgClass!=e.bgClass||r.textClass!=e.textClass?(e.bgClass=r.bgClass,e.textClass=r.textClass,gn(t,e)):n&&(e.text.className=n)}function gn(t,e){!function(t,e){var n=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),e.background)n?e.background.className=n:(e.background.parentNode.removeChild(e.background),e.background=null);else if(n){var r=hn(e);e.background=r.insertBefore(E("div",null,n),r.firstChild),t.display.input.setUneditable(e.background)}}(t,e),e.line.wrapClass?hn(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var n=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=n||""}function vn(t,e,n,r){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 i=hn(e);e.gutterBackground=E("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),i.insertBefore(e.gutterBackground,e.text)}var o=e.line.gutterMarkers;if(t.options.lineNumbers||o){var a=hn(e),s=e.gutter=E("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(t.display.input.setUneditable(s),a.insertBefore(s,e.text),e.line.gutterClass&&(s.className+=" "+e.line.gutterClass),!t.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(e.lineNumber=s.appendChild(E("div",te(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<t.display.gutterSpecs.length;++l){var c=t.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(E("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function mn(t,e,n){e.alignable&&(e.alignable=null);for(var r=S("CodeMirror-linewidget"),i=e.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&e.node.removeChild(i);yn(t,e,n)}function bn(t,e,n,r){var i=fn(t,e);return e.text=e.node=i.pre,i.bgClass&&(e.bgClass=i.bgClass),i.textClass&&(e.textClass=i.textClass),gn(t,e),vn(t,e,n,r),yn(t,e,r),e.node}function yn(t,e,n){if(wn(t,e.line,e,n,!0),e.rest)for(var r=0;r<e.rest.length;r++)wn(t,e.rest[r],e,n,!1)}function wn(t,e,n,r,i){if(e.widgets)for(var o=hn(n),a=0,s=e.widgets;a<s.length;++a){var l=s[a],c=E("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),xn(l,c,n,r),t.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),cn(l,"redraw")}}function xn(t,e,n,r){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);var i=r.wrapperWidth;e.style.left=r.fixedPos+"px",t.coverGutter||(i-=r.gutterTotalWidth,e.style.paddingLeft=r.gutterTotalWidth+"px"),e.style.width=i+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-r.gutterTotalWidth+"px"))}function On(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!D(document.body,t.node)){var n="position: relative;";t.coverGutter&&(n+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(n+="width: "+e.display.wrapper.clientWidth+"px;"),P(e.display.measure,E("div",[t.node],null,n))}return t.height=t.node.parentNode.offsetHeight}function Cn(t,e){for(var n=St(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function Sn(t){return t.lineSpace.offsetTop}function kn(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function jn(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=P(t.measure,E("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(t.cachedPaddingH=r),r}function Tn(t){return H-t.display.nativeBarWidth}function Pn(t){return t.display.scroller.clientWidth-Tn(t)-t.display.barWidth}function En(t){return t.display.scroller.clientHeight-Tn(t)-t.display.barHeight}function Mn(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var r=0;r<t.rest.length;r++)if(t.rest[r]==e)return{map:t.measure.maps[r],cache:t.measure.caches[r]};for(var i=0;i<t.rest.length;i++)if(Jt(t.rest[i])>n)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Dn(t,e,n,r){return _n(t,Ln(t,e),n,r)}function An(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[dr(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function Ln(t,e){var n=Jt(e),r=An(t,n);r&&!r.text?r=null:r&&r.changes&&(dn(t,r,n,ar(t)),t.curOp.forceUpdate=!0),r||(r=function(t,e){var n=Jt(e=Re(e)),r=t.display.externalMeasured=new on(t.doc,e,n);r.lineN=n;var i=r.built=Ze(t,r);return r.text=i.pre,P(t.display.lineMeasure,i.pre),r}(t,e));var i=Mn(r,e,n);return{line:e,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function _n(t,e,n,r,i){e.before&&(n=-1);var o,l=n+(r||"");return e.cache.hasOwnProperty(l)?o=e.cache[l]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(function(t,e,n){var r=t.options.lineWrapping,i=r&&Pn(t);if(!e.measure.heights||r&&e.measure.width!=i){var o=e.measure.heights=[];if(r){e.measure.width=i;for(var a=e.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=Fn(e.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&it(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&it(e.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Vn(k(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(i=function(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(t){if(null!=Nt)return Nt;var e=P(t,E("span","x")),n=e.getBoundingClientRect(),r=k(e,0,1).getBoundingClientRect();return Nt=Math.abs(n.left-r.left)>1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var f;c>0&&(d=r="right"),i=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+or(t.display),top:p.top,bottom:p.bottom}:In}for(var g=i.top-e.rect.top,v=i.bottom-e.rect.top,m=(g+v)/2,b=e.view.measure.heights,y=0;y<b.length-1&&!(m<b[y]);y++);var w=y?b[y-1]:0,x=b[y],O={left:("right"==d?i.right:i.left)-e.rect.left,right:("left"==d?i.left:i.right)-e.rect.left,top:w,bottom:x};return i.left||i.right||(O.bogus=!0),t.options.singleCursorHeightPerLine||(O.rtop=g,O.rbottom=v),O}(t,e,n,r)).bogus||(e.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Nn,In={left:0,right:0,top:0,bottom:0};function Fn(t,e,n){for(var r,i,o,a,s,l,c=0;c<t.length;c+=3)if(s=t[c],l=t[c+1],e<s?(i=0,o=1,a="left"):e<l?o=(i=e-s)+1:(c==t.length-3||e==l&&t[c+3]>e)&&(i=(o=l-s)-1,e>=l&&(a="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[(c-=3)+2],a="left";if("right"==n&&i==l-s)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)r=t[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function Vn(t,e){var n=In;if("left"==e)for(var r=0;r<t.length&&(n=t[r]).left==n.right;r++);else for(var i=t.length-1;i>=0&&(n=t[i]).left==n.right;i--);return n}function Rn(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 zn(t){t.display.externalMeasure=null,T(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)Rn(t.display.view[e])}function Hn(t){zn(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function $n(){return u&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Un(){return u&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Bn(t){var e=0;if(t.widgets)for(var n=0;n<t.widgets.length;++n)t.widgets[n].above&&(e+=On(t.widgets[n]));return e}function Wn(t,e,n,r,i){if(!i){var o=Bn(e);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=Be(e);if("local"==r?a+=Sn(t.display):a-=t.display.viewOffset,"page"==r||"window"==r){var s=t.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:Un());var l=s.left+("window"==r?0:$n());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function qn(t,e,n){if("div"==n)return e;var r=e.left,i=e.top;if("page"==n)r-=$n(),i-=Un();else if("local"==n||!n){var o=t.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=t.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Gn(t,e,n,r,i){return r||(r=Gt(t.doc,e.line)),Wn(t,r,Dn(t,r,e.ch,i),n)}function Kn(t,e,n,r,i,o){function a(e,a){var s=_n(t,i,e,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,Wn(t,r,s,n)}r=r||Gt(t.doc,e.line),i||(i=Ln(t,r));var s=ut(r,t.doc.direction),l=e.ch,c=e.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var d=lt(s,l,c),h=st,f=u(l,d,"before"==c);return null!=h&&(f.other=u(l,h,"before"!=c)),f}function Yn(t,e){var n=0;e=le(t.doc,e),t.options.lineWrapping||(n=or(t.display)*e.ch);var r=Gt(t.doc,e.line),i=Be(r)+Sn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(t,e,n,r,i){var o=ee(t,e,n);return o.xRel=i,r&&(o.outside=r),o}function Jn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Zt(r,n),o=r.first+r.size-1;if(i>o)return Xn(r.first+r.size-1,Gt(r,o).text.length,null,1,1);e<0&&(e=0);for(var a=Gt(r,i);;){var s=er(t,a,i,e,n),l=Fe(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Gt(r,i=c.line)}}function Zn(t,e,n,r){r-=Bn(e);var i=e.text.length,o=at((function(e){return _n(t,n,e-1).bottom<=r}),i,0);return{begin:o,end:i=at((function(e){return _n(t,n,e).top>r}),o,i)}}function Qn(t,e,n,r){return n||(n=Ln(t,e)),Zn(t,e,n,Wn(t,e,_n(t,n,r),"line").top)}function tr(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function er(t,e,n,r,i){i-=Be(e);var o=Ln(t,e),a=Bn(e),s=0,l=e.text.length,c=!0,u=ut(e,t.doc.direction);if(u){var d=(t.options.lineWrapping?rr:nr)(t,e,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,f,p=null,g=null,v=at((function(e){var n=_n(t,o,e);return n.top+=a,n.bottom+=a,!!tr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=e,g=n),!0)}),s,l),m=!1;if(g){var b=r-g.left<g.right-r,y=b==c;v=p+(y?0:1),f=y?"after":"before",h=b?g.left:g.right}else{c||v!=l&&v!=s||v++,f=0==v?"after":v==e.text.length?"before":_n(t,o,v-(c?1:0)).bottom+a<=i==c?"after":"before";var w=Kn(t,ee(n,v,f),"line",e,o);h=w.left,m=i<w.top?-1:i>=w.bottom?1:0}return Xn(n,v=ot(e.text,v,1),f,m,r-h)}function nr(t,e,n,r,i,o,a){var s=at((function(s){var l=i[s],c=1!=l.level;return tr(Kn(t,ee(n,c?l.to:l.from,c?"before":"after"),"line",e,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Kn(t,ee(n,c?l.from:l.to,c?"after":"before"),"line",e,r);tr(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function rr(t,e,n,r,i,o,a){var s=Zn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h<i.length;h++){var f=i[h];if(!(f.from>=c||f.to<=l)){var p=_n(t,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=p<o?o-p+1e9:p-o;(!u||d>g)&&(u=f,d=g)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function ir(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Nn){Nn=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(E("br"));Nn.appendChild(document.createTextNode("x"))}P(t.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),T(t.measure),n||1}function or(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),n=E("pre",[e],"CodeMirror-line-like");P(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function ar(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:sr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function sr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function lr(t){var e=ir(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/or(t.display)-3);return function(i){if($e(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 n?o+(Math.ceil(i.text.length/r)||1)*e:o+e}}function cr(t){var e=t.doc,n=lr(t);e.iter((function(t){var e=n(t);e!=t.height&&Xt(t,e)}))}function ur(t,e,n,r){var i=t.display;if(!n&&"true"==St(e).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=e.clientX-s.left,a=e.clientY-s.top}catch(t){return null}var l,c=Jn(t,o,a);if(r&&c.xRel>0&&(l=Gt(t.doc,c.line).text).length==c.ch){var u=V(l,l.length,t.options.tabSize)-l.length;c=ee(c.line,Math.max(0,Math.round((o-jn(t.display).left)/or(t.display))-u))}return c}function dr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;r<n.length;r++)if((e-=n[r].size)<0)return r}function hr(t,e,n,r){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),r||(r=0);var i=t.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>e)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Ce&&ze(t.doc,e)<i.viewTo&&pr(t);else if(n<=i.viewFrom)Ce&&He(t.doc,n+r)>i.viewFrom?pr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)pr(t);else if(e<=i.viewFrom){var o=gr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(t)}else if(n>=i.viewTo){var a=gr(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(t)}else{var s=gr(t,e,e,-1),l=gr(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(t)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:e<c.lineN+c.size&&(i.externalMeasured=null))}function fr(t,e,n){t.curOp.viewChanged=!0;var r=t.display,i=t.display.externalMeasured;if(i&&e>=i.lineN&&e<i.lineN+i.size&&(r.externalMeasured=null),!(e<r.viewFrom||e>=r.viewTo)){var o=r.view[dr(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==z(a,n)&&a.push(n)}}}function pr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function gr(t,e,n,r){var i,o=dr(t,e),a=t.display.view;if(!Ce||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=e){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;ze(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function vr(t){for(var e=t.display.view,n=0,r=0;r<e.length;r++){var i=e[r];i.hidden||i.node&&!i.changes||++n}return n}function mr(t){t.display.input.showSelection(t.display.input.prepareSelection())}function br(t,e){void 0===e&&(e=!0);for(var n=t.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(e||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=t.display.viewTo||s.to().line<t.display.viewFrom)){var l=s.empty();(l||t.options.showCursorWhenSelecting)&&yr(t,s.head,i),l||xr(t,s,o)}}return r}function yr(t,e,n){var r=Kn(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),i=n.appendChild(E("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*t.options.cursorHeight+"px",r.other){var o=n.appendChild(E("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function wr(t,e){return t.top-e.top||t.left-e.left}function xr(t,e,n){var r=t.display,i=t.doc,o=document.createDocumentFragment(),a=jn(t.display),s=a.left,l=Math.max(r.sizerWidth,Pn(t)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(t,e,n,r){e<0&&(e=0),e=Math.round(e),r=Math.round(r),o.appendChild(E("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n height: "+(r-e)+"px"))}function d(e,n,r){var o,a,d=Gt(i,e),h=d.text.length;function f(n,r){return Gn(t,ee(e,n),"div",d,r)}function p(e,n,r){var i=Qn(t,d,null,e),o="ltr"==n==("after"==r)?"left":"right";return f("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var g=ut(d,i.direction);return function(t,e,n,r){if(!t)return r(e,n,"ltr",0);for(var i=!1,o=0;o<t.length;++o){var a=t[o];(a.from<n&&a.to>e||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(g,n||0,null==r?h:r,(function(t,e,i,d){var v="ltr"==i,m=f(t,v?"left":"right"),b=f(e-1,v?"right":"left"),y=null==n&&0==t,w=null==r&&e==h,x=0==d,O=!g||d==g.length-1;if(b.top-m.top<=3){var C=(c?w:y)&&O,S=(c?y:w)&&x?s:(v?m:b).left,k=C?l:(v?b:m).right;u(S,m.top,k-S,m.bottom)}else{var j,T,P,E;v?(j=c&&y&&x?s:m.left,T=c?l:p(t,i,"before"),P=c?s:p(e,i,"after"),E=c&&w&&O?l:b.right):(j=c?p(t,i,"before"):s,T=!c&&y&&x?l:m.right,P=!c&&w&&O?s:b.left,E=c?p(e,i,"after"):l),u(j,m.top,T-j,m.bottom),m.bottom<b.top&&u(s,m.bottom,null,b.top),u(P,b.top,E-P,b.bottom)}(!o||wr(m,o)<0)&&(o=m),wr(b,o)<0&&(o=b),(!a||wr(m,a)<0)&&(a=m),wr(b,a)<0&&(a=b)})),{start:o,end:a}}var h=e.from(),f=e.to();if(h.line==f.line)d(h.line,h.ch,f.ch);else{var p=Gt(i,h.line),g=Gt(i,f.line),v=Re(p)==Re(g),m=d(h.line,h.ch,v?p.text.length+1:null).end,b=d(f.line,v?0:null,f.ch).start;v&&(m.top<b.top-2?(u(m.right,m.top,null,m.bottom),u(s,b.top,b.left,b.bottom)):u(m.right,m.top,b.left-m.right,m.bottom)),m.bottom<b.top&&u(s,m.bottom,null,b.top)}n.appendChild(o)}function Or(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval((function(){t.hasFocus()||jr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Cr(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||kr(t))}function Sr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&jr(t))}),100)}function kr(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(gt(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(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Or(t))}function jr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(gt(t,"blur",t,e),t.state.focused=!1,j(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Tr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r<e.view.length;r++){var i=e.view[r],o=t.options.lineWrapping,l=void 0,c=0;if(!i.hidden){if(a&&s<8){var u=i.node.offsetTop+i.node.offsetHeight;l=u-n,n=u}else{var d=i.node.getBoundingClientRect();l=d.bottom-d.top,!o&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var h=i.line.height-l;if((h>.005||h<-.005)&&(Xt(i.line,l),Pr(i.line),i.rest))for(var f=0;f<i.rest.length;f++)Pr(i.rest[f]);if(c>t.display.sizerWidth){var p=Math.ceil(c/or(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function Pr(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var n=t.widgets[e],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Er(t,e,n){var r=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;r=Math.floor(r-Sn(t));var i=n&&null!=n.bottom?n.bottom:r+t.wrapper.clientHeight,o=Zt(e,r),a=Zt(e,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=Zt(e,Be(Gt(e,s))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=a&&(o=Zt(e,Be(Gt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Mr(t,e){var n=t.display,r=ir(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=En(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+kn(n),l=e.top<r,c=e.bottom>s-r;if(e.top<i)a.scrollTop=l?0:e.top;else if(e.bottom>i+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var d=t.options.fixedGutter?0:n.gutters.offsetWidth,h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-d,f=Pn(t)-n.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?a.scrollLeft=0:e.left<h?a.scrollLeft=Math.max(0,e.left+d-(p?0:10)):e.right>f+h-3&&(a.scrollLeft=e.right+(p?0:10)-f),a}function Dr(t,e){null!=e&&(_r(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ar(t){_r(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Lr(t,e,n){null==e&&null==n||_r(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function _r(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Nr(t,Yn(t,e.from),Yn(t,e.to),e.margin))}function Nr(t,e,n,r){var i=Mr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Lr(t,i.scrollLeft,i.scrollTop)}function Ir(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ci(t,{top:e}),Fr(t,e,!0),n&&ci(t),ii(t,100))}function Fr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Vr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Rr(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+kn(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?n:0,docHeight:r,scrollHeight:r+Tn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var zr=function(t,e,n){this.cm=n;var r=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};zr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r: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=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r: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==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},zr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},zr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},zr.prototype.zeroWidthHack=function(){var t=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},zr.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function r(){var i=t.getBoundingClientRect();("vert"==n?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,r)}))},zr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Hr=function(){};function $r(t,e){e||(e=Rr(t));var n=t.display.barWidth,r=t.display.barHeight;Ur(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&Tr(t),Ur(t,Rr(t)),n=t.display.barWidth,r=t.display.barHeight}function Ur(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Hr.prototype.update=function(){return{bottom:0,right:0}},Hr.prototype.setScrollLeft=function(){},Hr.prototype.setScrollTop=function(){},Hr.prototype.clear=function(){};var Br={native:zr,null:Hr};function Wr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&j(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Br[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Vr(t,e):Ir(t,e)}),t),t.display.scrollbars.addClass&&L(t.display.wrapper,t.display.scrollbars.addClass)}var qr=0;function Gr(t){var e;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:++qr},e=t.curOp,sn?sn.ops.push(e):e.ownsGroup=sn={ops:[e],delayedCallbacks:[]}}function Kr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n<e.length;n++)e[n].call(null);for(var r=0;r<t.ops.length;r++){var i=t.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<e.length)}(n)}finally{sn=null,e(n)}}(e,(function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;!function(t){for(var e=t.ops,n=0;n<e.length;n++)Yr(e[n]);for(var r=0;r<e.length;r++)Xr(e[r]);for(var i=0;i<e.length;i++)Jr(e[i]);for(var o=0;o<e.length;o++)Zr(e[o]);for(var a=0;a<e.length;a++)Qr(e[a])}(t)}))}function Yr(t){var e=t.cm,n=e.display;!function(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Tn(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Tn(t)+"px",e.scrollbarsClipped=!0)}(e),t.updateMaxLine&&qe(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ai(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Xr(t){t.updatedDisplay=t.mustUpdate&&si(t.cm,t.update)}function Jr(t){var e=t.cm,n=e.display;t.updatedDisplay&&Tr(e),t.barMeasure=Rr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Dn(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Tn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Pn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Zr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&Vr(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==A();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&$r(e,t.barMeasure),t.updatedDisplay&&di(e,t.barMeasure),t.selectionChanged&&Or(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&Cr(t.cm)}function Qr(t){var e=t.cm,n=e.display,r=e.doc;t.updatedDisplay&&li(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=t.scrollTop&&Fr(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&Vr(e,t.scrollLeft,!0,!0),t.scrollToPos&&function(t,e){if(!vt(t,"scrollCursorIntoView")){var n=t.display,r=n.sizer.getBoundingClientRect(),i=null;if(e.top+r.top<0?i=!0:e.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=E("div","",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Sn(t.display))+"px;\n height: "+(e.bottom-e.top+Tn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?ee(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?ee(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=Kn(t,e),l=n&&n!=e?Kn(t,n):s,c=Mr(t,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=c.scrollTop&&(Ir(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Vr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(e,le(r,t.scrollToPos.from),le(r,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||gt(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&>(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=e.display.scroller.scrollTop),t.changeObjs&>(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function ti(t,e){if(t.curOp)return e();Gr(t);try{return e()}finally{Kr(t)}}function ei(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Gr(t);try{return e.apply(t,arguments)}finally{Kr(t)}}}function ni(t){return function(){if(this.curOp)return t.apply(this,arguments);Gr(this);try{return t.apply(this,arguments)}finally{Kr(this)}}}function ri(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Gr(e);try{return t.apply(this,arguments)}finally{Kr(e)}}}function ii(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,I(oi,t))}function oi(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,r=pe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?Ut(e.mode,r.state):null,l=he(t,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&h<a.length;++h)d=a[h]!=o.styles[h];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=t.options.maxHighlightLength&&ge(t,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ii(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&ti(t,(function(){for(var e=0;e<i.length;e++)fr(t,i[e],"text")}))}}var ai=function(t,e,n){var r=t.display;this.viewport=e,this.visible=Er(r,t.doc,e),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Pn(t),this.force=n,this.dims=ar(t),this.events=[]};function si(t,e){var n=t.display,r=t.doc;if(e.editorIsHidden)return pr(t),!1;if(!e.force&&e.visible.from>=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==vr(t))return!1;fi(t)&&(pr(t),e.dims=ar(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ce&&(o=ze(t.doc,o),a=He(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=an(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=an(t,e,r.viewFrom).concat(r.view):r.viewFrom<e&&(r.view=r.view.slice(dr(t,e))),r.viewFrom=e,r.viewTo<n?r.view=r.view.concat(an(t,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,dr(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=Be(Gt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=vr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=A();if(!e||!D(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;a!=h.node;)a=s(a);var f=i&&null!=e&&e<=u&&h.lineNumber;h.changes&&(z(h.changes,"gutter")>-1&&(f=!1),dn(t,h,u,n)),f&&(T(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(te(t.options,u)))),a=h.node.nextSibling}else{var p=bn(t,h,u,n);o.insertBefore(p,a)}u+=h.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=A()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&D(document.body,t.anchorNode)&&D(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ii(t,400)),n.updateLineNumbers=null,!0}function li(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Pn(t))r&&(e.visible=Er(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+kn(t.display)-En(t),n.top)}),e.visible=Er(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!si(t,e))break;Tr(t);var i=Rr(t);mr(t),$r(t,i),di(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 ci(t,e){var n=new ai(t,e);if(si(t,n)){Tr(t),li(t,n);var r=Rr(t);mr(t),$r(t,r),di(t,r),n.finish()}}function ui(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function di(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+Tn(t)+"px"}function hi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=sr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){t.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=r+i+"px")}}function fi(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=te(t.options,e.first+e.size-1),r=t.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(E("div",[E("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ui(t.display),!0}return!1}function pi(t,e){for(var n=[],r=!1,i=0;i<t.length;i++){var o=t[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!e)continue;r=!0}n.push({className:o,style:a})}return e&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function gi(t){var e=t.gutters,n=t.gutterSpecs;T(e),t.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,s=e.appendChild(E("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(t.lineGutter=s,s.style.width=(t.lineNumWidth||1)+"px")}e.style.display=n.length?"":"none",ui(t)}function vi(t){gi(t.display),hr(t),hi(t)}function mi(t,e,r,i){var o=this;this.input=r,o.scrollbarFiller=E("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=E("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=M("div",null,"CodeMirror-code"),o.selectionDiv=E("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=E("div",null,"CodeMirror-cursors"),o.measure=E("div",null,"CodeMirror-measure"),o.lineMeasure=E("div",null,"CodeMirror-measure"),o.lineSpace=M("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=M("div",[o.lineSpace],"CodeMirror-lines");o.mover=E("div",[c],null,"position: relative"),o.sizer=E("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=E("div",null,null,"position: absolute; height: "+H+"px; width: 1px;"),o.gutters=E("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=E("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=E("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&m||(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,o.gutterSpecs=pi(i.gutters,i.lineNumbers),gi(o),r.init(o)}ai.prototype.signal=function(t,e){bt(t,e)&&this.events.push(arguments)},ai.prototype.finish=function(){for(var t=0;t<this.events.length;t++)gt.apply(null,this.events[t])};var bi=0,yi=null;function wi(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function xi(t){var e=wi(t);return e.x*=yi,e.y*=yi,e}function Oi(t,e){var r=wi(e),i=r.x,o=r.y,a=t.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&b&&l)t:for(var h=e.target,f=a.view;h!=s;h=h.parentNode)for(var p=0;p<f.length;p++)if(f[p].node==h){t.display.currentWheelTarget=h;break t}if(i&&!n&&!d&&null!=yi)return o&&u&&Ir(t,Math.max(0,s.scrollTop+o*yi)),Vr(t,Math.max(0,s.scrollLeft+i*yi)),(!o||o&&u)&&wt(e),void(a.wheelStartX=null);if(o&&null!=yi){var g=o*yi,v=t.doc.scrollTop,m=v+a.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):m=Math.min(t.doc.height,m+g+50),ci(t,{top:v,bottom:m})}bi<20&&(null==a.wheelStartX?(a.wheelStartX=s.scrollLeft,a.wheelStartY=s.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var t=s.scrollLeft-a.wheelStartX,e=s.scrollTop-a.wheelStartY,n=e&&a.wheelDY&&e/a.wheelDY||t&&a.wheelDX&&t/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(yi=(yi*bi+n)/(bi+1),++bi)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}a?yi=-.53:n?yi=15:u?yi=-.7:h&&(yi=-1/3);var Ci=function(t,e){this.ranges=t,this.primIndex=e};Ci.prototype.primary=function(){return this.ranges[this.primIndex]},Ci.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var n=this.ranges[e],r=t.ranges[e];if(!re(n.anchor,r.anchor)||!re(n.head,r.head))return!1}return!0},Ci.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new Si(ie(this.ranges[e].anchor),ie(this.ranges[e].head));return new Ci(t,this.primIndex)},Ci.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},Ci.prototype.contains=function(t,e){e||(e=t);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ne(e,r.from())>=0&&ne(t,r.to())<=0)return n}return-1};var Si=function(t,e){this.anchor=t,this.head=e};function ki(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return ne(t.from(),e.from())})),n=z(e,i);for(var o=1;o<e.length;o++){var a=e[o],s=e[o-1],l=ne(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=ae(s.from(),a.from()),u=oe(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new Si(d?u:c,d?c:u))}}return new Ci(e,n)}function ji(t,e){return new Ci([new Si(t,e||t)],0)}function Ti(t){return t.text?ee(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Pi(t,e){if(ne(t,e.from)<0)return t;if(ne(t,e.to)<=0)return Ti(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=Ti(e).ch-e.to.ch),ee(n,r)}function Ei(t,e){for(var n=[],r=0;r<t.sel.ranges.length;r++){var i=t.sel.ranges[r];n.push(new Si(Pi(i.anchor,e),Pi(i.head,e)))}return ki(t.cm,n,t.sel.primIndex)}function Mi(t,e,n){return t.line==e.line?ee(n.line,t.ch-e.ch+n.ch):ee(n.line+(t.line-e.line),t.ch)}function Di(t){t.doc.mode=zt(t.options,t.doc.modeOption),Ai(t)}function Ai(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,ii(t,100),t.state.modeGen++,t.curOp&&hr(t)}function Li(t,e){return 0==e.from.ch&&0==e.to.ch&&""==Y(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function _i(t,e,n,r){function i(t){return n?n[t]:null}function o(t,n,i){!function(t,e,n,r){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Ee(t),Me(t,n);var i=r?r(t):1;i!=t.height&&Xt(t,i)}(t,n,i,r),cn(t,"change",t,e)}function a(t,e){for(var n=[],o=t;o<e;++o)n.push(new Ge(c[o],i(o),r));return n}var s=e.from,l=e.to,c=e.text,u=Gt(t,s.line),d=Gt(t,l.line),h=Y(c),f=i(c.length-1),p=l.line-s.line;if(e.full)t.insert(0,a(0,c.length)),t.remove(c.length,t.size-c.length);else if(Li(t,e)){var g=a(0,c.length-1);o(d,d.text,f),p&&t.remove(s.line,p),g.length&&t.insert(s.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,s.ch)+h+u.text.slice(l.ch),f);else{var v=a(1,c.length-1);v.push(new Ge(h+u.text.slice(l.ch),f,r)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),t.insert(s.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),i(0)),t.remove(s.line+1,p);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(d,h+d.text.slice(l.ch),f);var m=a(1,c.length-1);p>1&&t.remove(s.line+1,p-1),t.insert(s.line+1,m)}cn(t,"change",t,e)}function Ni(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(e(s.doc,l),t(s.doc,r,l))}}}(t,null,!0)}function Ii(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,cr(t),Di(t),Fi(t),t.options.lineWrapping||qe(t),t.options.mode=e.modeOption,hr(t)}function Fi(t){("rtl"==t.doc.direction?L:j)(t.display.lineDiv,"CodeMirror-rtl")}function Vi(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 n={from:ie(e.from),to:Ti(e),text:Kt(t,e.from,e.to)};return Bi(t,n,e.from.line,e.to.line+1),Ni(t,(function(t){return Bi(t,n,e.from.line,e.to.line+1)}),!0),n}function zi(t){for(;t.length&&Y(t).ranges;)t.pop()}function Hi(t,e,n,r){var i=t.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&i.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(zi(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(i,i.lastOp==r)))a=Y(o.changes),0==ne(e.from,e.to)&&0==ne(e.from,a.to)?a.to=Ti(e):o.changes.push(Ri(t,e));else{var l=Y(i.done);for(l&&l.ranges||Ui(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(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||gt(t,"historyAdded")}function $i(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,Y(i.done),e))?i.done[i.done.length-1]=e:Ui(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&zi(i.undone)}function Ui(t,e){var n=Y(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Bi(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function Wi(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}function qi(t,e){var n=function(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var r=[],i=0;i<e.text.length;++i)r.push(Wi(n[i]));return r}(t,e),r=Te(t,e);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)t:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue t;o.push(l)}else a&&(n[i]=a)}return n}function Gi(t,e,n){for(var r=[],i=0;i<t.length;++i){var o=t[i];if(o.ranges)r.push(n?Ci.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),e)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&z(e,Number(u[1]))>-1&&(Y(s)[d]=c[d],delete c[d])}}}return r}function Ki(t,e,n,r){if(r){var i=t.anchor;if(n){var o=ne(e,i)<0;o!=ne(n,i)<0?(i=e,e=n):o!=ne(e,n)<0&&(e=n)}return new Si(i,e)}return new Si(n||e,e)}function Yi(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),to(t,new Ci([Ki(t.sel.primary(),e,n,i)],0),r)}function Xi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)r[o]=Ki(t.sel.ranges[o],e[o],null,i);to(t,ki(t.cm,r,t.sel.primIndex),n)}function Ji(t,e,n,r){var i=t.sel.ranges.slice(0);i[e]=n,to(t,ki(t.cm,i,t.sel.primIndex),r)}function Zi(t,e,n,r){to(t,ji(e,n),r)}function Qi(t,e,n){var r=t.history.done,i=Y(r);i&&i.ranges?(r[r.length-1]=e,eo(t,e,n)):to(t,e,n)}function to(t,e,n){eo(t,e,n),$i(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function eo(t,e,n){(bt(t,"beforeSelectionChange")||t.cm&&bt(t.cm,"beforeSelectionChange"))&&(e=function(t,e,n){var r={ranges:e.ranges,update:function(e){this.ranges=[];for(var n=0;n<e.length;n++)this.ranges[n]=new Si(le(t,e[n].anchor),le(t,e[n].head))},origin:n&&n.origin};return gt(t,"beforeSelectionChange",t,r),t.cm&>(t.cm,"beforeSelectionChange",t.cm,r),r.ranges!=e.ranges?ki(t.cm,r.ranges,r.ranges.length-1):e}(t,e,n));var r=n&&n.bias||(ne(e.primary().head,t.sel.primary().head)<0?-1:1);no(t,io(t,e,r,!0)),n&&!1===n.scroll||!t.cm||Ar(t.cm)}function no(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,mt(t.cm)),cn(t,"cursorActivity",t))}function ro(t){no(t,io(t,t.sel,null,!1))}function io(t,e,n,r){for(var i,o=0;o<e.ranges.length;o++){var a=e.ranges[o],s=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=ao(t,a.anchor,s&&s.anchor,n,r),c=ao(t,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=e.ranges.slice(0,o)),i[o]=new Si(l,c))}return i?ki(t.cm,i,e.primIndex):e}function oo(t,e,n,r,i){var o=Gt(t,e.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=e.ch:s.from<e.ch))&&(null==s.to||(u?s.to>=e.ch:s.to>e.ch))){if(i&&(gt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),h=void 0;if((r<0?u:c)&&(d=so(t,d,-r,d&&d.line==e.line?o:null)),d&&d.line==e.line&&(h=ne(d,n))&&(r<0?h<0:h>0))return oo(t,d,e,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=so(t,f,r,f.line==e.line?o:null)),f?oo(t,f,e,r,i):null}}return e}function ao(t,e,n,r,i){var o=r||1,a=oo(t,e,n,o,i)||!i&&oo(t,e,n,o,!0)||oo(t,e,n,-o,i)||!i&&oo(t,e,n,-o,!0);return a||(t.cantEdit=!0,ee(t.first,0))}function so(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?le(t,ee(e.line-1)):null:n>0&&e.ch==(r||Gt(t,e.line)).text.length?e.line<t.first+t.size-1?ee(e.line+1,0):null:new ee(e.line,e.ch+n)}function lo(t){t.setSelection(ee(t.firstLine(),0),ee(t.lastLine()),U)}function co(t,e,n){var r={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(e,n,i,o){e&&(r.from=le(t,e)),n&&(r.to=le(t,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),gt(t,"beforeChange",t,r),t.cm&>(t.cm,"beforeChange",t.cm,r),r.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function uo(t,e,n){if(t.cm){if(!t.cm.curOp)return ei(t.cm,uo)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(bt(t,"beforeChange")||t.cm&&bt(t.cm,"beforeChange"))||(e=co(t,e,!0))){var r=Oe&&!n&&function(t,e,n){var r=null;if(t.iter(e.line,n.line+1,(function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;!n.readOnly||r&&-1!=z(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:e,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(ne(c.to,s.from)<0||ne(c.from,s.to)>0)){var u=[l,1],d=ne(c.from,s.from),h=ne(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)ho(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else ho(t,e)}}function ho(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ne(e.from,e.to)){var n=Ei(t,e);Hi(t,e,n,t.cm?t.cm.curOp.id:NaN),go(t,e,n,Te(t,e));var r=[];Ni(t,(function(t,n){n||-1!=z(r,t.history)||(yo(t.history,e),r.push(t.history)),go(t,e,null,Te(t,e))}))}}function fo(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(t.sel):i.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(Ui(i,l),n&&!i.equals(t.sel))return void to(t,i,{clearRedo:!1});a=i}var u=[];Ui(a,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=bt(t,"beforeChange")||t.cm&&bt(t.cm,"beforeChange"),h=function(n){var r=i.changes[n];if(r.origin=e,d&&!co(t,r,!1))return s.length=0,{};u.push(Ri(t,r));var o=n?Ei(t,r):Y(s);go(t,r,o,qi(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Ti(r)});var a=[];Ni(t,(function(t,e){e||-1!=z(a,t.history)||(yo(t.history,r),a.push(t.history)),go(t,r,null,qi(t,r))}))},f=i.changes.length-1;f>=0;--f){var p=h(f);if(p)return p.v}}}}function po(t,e){if(0!=e&&(t.first+=e,t.sel=new Ci(X(t.sel.ranges,(function(t){return new Si(ee(t.anchor.line+e,t.anchor.ch),ee(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){hr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;r<n.viewTo;r++)fr(t.cm,r,"gutter")}}function go(t,e,n,r){if(t.cm&&!t.cm.curOp)return ei(t.cm,go)(t,e,n,r);if(e.to.line<t.first)po(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var i=e.text.length-1-(t.first-e.from.line);po(t,i),e={from:ee(t.first,0),to:ee(e.to.line+i,e.to.ch),text:[Y(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:ee(o,Gt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Kt(t,e.from,e.to),n||(n=Ei(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=Jt(Re(Gt(r,o.line))),r.iter(l,a.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&mt(t),_i(r,e,n,lr(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,(function(t){var e=We(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var n=t.first,r=e-1;r>n;r--){var i=Gt(t,r).stateAfter;if(i&&(!(i instanceof ue)||r+i.lookAhead<e)){n=r+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,n)}}(r,o.line),ii(t,400);var c=e.text.length-(a.line-o.line)-1;e.full?hr(t):o.line!=a.line||1!=e.text.length||Li(t.doc,e)?hr(t,o.line,a.line+1,c):fr(t,o.line,"text");var u=bt(t,"changes"),d=bt(t,"change");if(d||u){var h={from:o,to:a,text:e.text,removed:e.removed,origin:e.origin};d&&cn(t,"change",t,h),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(h)}t.display.selForContextMenu=null}(t.cm,e,r):_i(t,e,r),eo(t,n,U),t.cantEdit&&ao(t,ee(t.firstLine(),0))&&(t.cantEdit=!1)}}function vo(t,e,n,r,i){var o;r||(r=n),ne(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof e&&(e=t.splitLines(e)),uo(t,{from:n,to:r,text:e,origin:i})}function mo(t,e,n,r){n<t.line?t.line+=r:e<t.line&&(t.line=e,t.ch=0)}function bo(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i],a=!0;if(o.ranges){o.copied||((o=t[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)mo(o.ranges[s].anchor,e,n,r),mo(o.ranges[s].head,e,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=ee(c.from.line+r,c.from.ch),c.to=ee(c.to.line+r,c.to.ch);else if(e<=c.to.line){a=!1;break}}a||(t.splice(0,i+1),i=0)}}}function yo(t,e){var n=e.from.line,r=e.to.line,i=e.text.length-(r-n)-1;bo(t.done,n,r,i),bo(t.undone,n,r,i)}function wo(t,e,n,r){var i=e,o=e;return"number"==typeof e?o=Gt(t,se(t,e)):i=Jt(e),null==i?null:(r(o,i)&&t.cm&&fr(t.cm,i,n),o)}function xo(t){this.lines=t,this.parent=null;for(var e=0,n=0;n<t.length;++n)t[n].parent=this,e+=t[n].height;this.height=e}function Oo(t){this.children=t;for(var e=0,n=0,r=0;r<t.length;++r){var i=t[r];e+=i.chunkSize(),n+=i.height,i.parent=this}this.size=e,this.height=n,this.parent=null}Si.prototype.from=function(){return ae(this.anchor,this.head)},Si.prototype.to=function(){return oe(this.anchor,this.head)},Si.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},xo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=t,r=t+e;n<r;++n){var i=this.lines[n];this.height-=i.height,Ke(i),cn(i,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var r=0;r<e.length;++r)e[r].parent=this},iterN:function(t,e,n){for(var r=t+e;t<r;++t)if(n(this.lines[t]))return!0}},Oo.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(t<i){var o=Math.min(e,i-t),a=r.height;if(r.removeInner(t,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(e-=o))break;t=0}else t-=i}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof xo))){var s=[];this.collapse(s),this.children=[new xo(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,n){this.size+=e.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(t<=o){if(i.insertInner(t,e,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new xo(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}t-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new Oo(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var n=z(t.parent.children,t);t.parent.children.splice(n+1,0,e)}else{var r=new Oo(t.children);r.parent=t,t.children=[r,e],t=r}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(t<o){var a=Math.min(e,o-t);if(i.iterN(t,a,n))return!0;if(0==(e-=a))break;t=0}else t-=o}}};var Co=function(t,e,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=t,this.node=e};function So(t,e,n){Be(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Dr(t,n)}Co.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,n=this.line,r=Jt(n);if(null!=r&&e){for(var i=0;i<e.length;++i)e[i]==this&&e.splice(i--,1);e.length||(n.widgets=null);var o=On(this);Xt(n,Math.max(0,n.height-o)),t&&(ti(t,(function(){So(t,n,-o),fr(t,r,"widget")})),cn(t,"lineWidgetCleared",t,this,r))}},Co.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=On(this)-e;i&&($e(this.doc,r)||Xt(r,r.height+i),n&&ti(n,(function(){n.curOp.forceUpdate=!0,So(n,r,i),cn(n,"lineWidgetChanged",n,t,Jt(r))})))},yt(Co);var ko=0,jo=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++ko};function To(t,e,n,r,i){if(r&&r.shared)return function(t,e,n,r,i){(r=F(r)).shared=!1;var o=[To(t,e,n,r,i)],a=o[0],s=r.widgetNode;return Ni(t,(function(t){s&&(r.widgetNode=s.cloneNode(!0)),o.push(To(t,le(t,e),le(t,n),r,i));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;a=Y(o)})),new Po(o,a)}(t,e,n,r,i);if(t.cm&&!t.cm.curOp)return ei(t.cm,To)(t,e,n,r,i);var o=new jo(t,i),a=ne(e,n);if(r&&F(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=M("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ve(t,e.line,e,n,o)||e.line!=n.line&&Ve(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ce=!0}o.addToHistory&&Hi(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Re(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Se(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){$e(t,e)&&Xt(e,0)})),o.clearOnEnter&&ht(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Oe=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++ko,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hr(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)fr(c,u,"text");o.atomic&&ro(c.doc),cn(c,"markerAdded",c,o)}return o}jo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Gr(t),bt(this,"clear")){var n=this.find();n&&cn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=ke(a.markedSpans,this);t&&!this.collapsed?fr(t,Jt(a),"text"):t&&(null!=s.to&&(i=Jt(a)),null!=s.from&&(r=Jt(a))),a.markedSpans=je(a.markedSpans,s),null==s.from&&this.collapsed&&!$e(this.doc,a)&&t&&Xt(a,ir(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Re(this.lines[l]),u=We(c);u>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&hr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&ro(t.doc)),t&&cn(t,"markerCleared",t,this,r,i),e&&Kr(t),this.parent&&this.parent.clear()}},jo.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=ke(o.markedSpans,this);if(null!=a.from&&(n=ee(e?o:Jt(o),a.from),-1==t))return n;if(null!=a.to&&(r=ee(e?o:Jt(o),a.to),1==t))return r}return n&&{from:n,to:r}},jo.prototype.changed=function(){var t=this,e=this.find(-1,!0),n=this,r=this.doc.cm;e&&r&&ti(r,(function(){var i=e.line,o=Jt(e.line),a=An(r,o);if(a&&(Rn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!$e(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=On(n)-s;l&&Xt(i,i.height+l)}cn(r,"markerChanged",r,t)}))},jo.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=z(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},jo.prototype.detachLine=function(t){if(this.lines.splice(z(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},yt(jo);var Po=function(t,e){this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=this};function Eo(t){return t.findMarks(ee(t.first,0),t.clipPos(ee(t.lastLine())),(function(t){return t.parent}))}function Mo(t){for(var e=function(e){var n=t[e],r=[n.primary.doc];Ni(n.primary.doc,(function(t){return r.push(t)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==z(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<t.length;n++)e(n)}Po.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();cn(this,"clear")}},Po.prototype.find=function(t,e){return this.primary.find(t,e)},yt(Po);var Do=0,Ao=function(t,e,n,r,i){if(!(this instanceof Ao))return new Ao(t,e,n,r,i);null==n&&(n=0),Oo.call(this,[new xo([new Ge("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=ee(n,0);this.sel=ji(o),this.history=new Vi(null),this.id=++Do,this.modeOption=e,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),_i(this,{from:o,to:o,text:t}),to(this,ji(o),U)};Ao.prototype=Z(Oo.prototype,{constructor:Ao,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,r=0;r<e.length;++r)n+=e[r].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=Yt(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:ri((function(t){var e=ee(this.first,0),n=this.first+this.size-1;uo(this,{from:e,to:ee(n,Gt(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&Lr(this.cm,0,0),to(this,ji(e),U)})),replaceRange:function(t,e,n,r){vo(this,t,e=le(this,e),n=n?le(this,n):e,r)},getRange:function(t,e,n){var r=Kt(this,le(this,t),le(this,e));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(Qt(this,t))return Gt(this,t)},getLineNumber:function(t){return Jt(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=Gt(this,t)),Re(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return le(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:ri((function(t,e,n){Zi(this,le(this,"number"==typeof t?ee(t,e||0):t),null,n)})),setSelection:ri((function(t,e,n){Zi(this,le(this,t),le(this,e||t),n)})),extendSelection:ri((function(t,e,n){Yi(this,le(this,t),e&&le(this,e),n)})),extendSelections:ri((function(t,e){Xi(this,ce(this,t),e)})),extendSelectionsBy:ri((function(t,e){Xi(this,ce(this,X(this.sel.ranges,t)),e)})),setSelections:ri((function(t,e,n){if(t.length){for(var r=[],i=0;i<t.length;i++)r[i]=new Si(le(this,t[i].anchor),le(this,t[i].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),to(this,ki(this.cm,r,e),n)}})),addSelection:ri((function(t,e,n){var r=this.sel.ranges.slice(0);r.push(new Si(le(this,t),le(this,e||t))),to(this,ki(this.cm,r,r.length-1),n)})),getSelection:function(t){for(var e,n=this.sel.ranges,r=0;r<n.length;r++){var i=Kt(this,n[r].from(),n[r].to());e=e?e.concat(i):i}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Kt(this,n[r].from(),n[r].to());!1!==t&&(i=i.join(t||this.lineSeparator())),e[r]=i}return e},replaceSelection:function(t,e,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=t;this.replaceSelections(r,e,n||"+input")},replaceSelections:ri((function(t,e,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(t[o]),origin:n}}for(var s=e&&"end"!=e&&function(t,e,n){for(var r=[],i=ee(t.first,0),o=i,a=0;a<e.length;a++){var s=e[a],l=Mi(s.from,i,o),c=Mi(Ti(s),i,o);if(i=s.to,o=c,"around"==n){var u=t.sel.ranges[a],d=ne(u.head,u.anchor)<0;r[a]=new Si(d?c:l,d?l:c)}else r[a]=new Si(l,l)}return new Ci(r,t.sel.primIndex)}(this,r,e),l=r.length-1;l>=0;l--)uo(this,r[l]);s?Qi(this,s):this.cm&&Ar(this.cm)})),undo:ri((function(){fo(this,"undo")})),redo:ri((function(){fo(this,"redo")})),undoSelection:ri((function(){fo(this,"undo",!0)})),redoSelection:ri((function(){fo(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r<t.done.length;r++)t.done[r].ranges||++e;for(var i=0;i<t.undone.length;i++)t.undone[i].ranges||++n;return{undo:e,redo:n}},clearHistory:function(){var t=this;this.history=new Vi(this.history.maxGeneration),Ni(this,(function(e){return e.history=t.history}),!0)},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:Gi(this.history.done),undone:Gi(this.history.undone)}},setHistory:function(t){var e=this.history=new Vi(this.history.maxGeneration);e.done=Gi(t.done.slice(0),null,!0),e.undone=Gi(t.undone.slice(0),null,!0)},setGutterMarker:ri((function(t,e,n){return wo(this,t,"gutter",(function(t){var r=t.gutterMarkers||(t.gutterMarkers={});return r[e]=n,!n&&nt(r)&&(t.gutterMarkers=null),!0}))})),clearGutter:ri((function(t){var e=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[t]&&wo(e,n,"gutter",(function(){return n.gutterMarkers[t]=null,nt(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(t){var e;if("number"==typeof t){if(!Qt(this,t))return null;if(e=t,!(t=Gt(this,t)))return null}else if(null==(e=Jt(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:ri((function(t,e,n){return wo(this,t,"gutter"==e?"gutter":"class",(function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[r]){if(S(n).test(t[r]))return!1;t[r]+=" "+n}else t[r]=n;return!0}))})),removeLineClass:ri((function(t,e,n){return wo(this,t,"gutter"==e?"gutter":"class",(function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",i=t[r];if(!i)return!1;if(null==n)t[r]=null;else{var o=i.match(S(n));if(!o)return!1;var a=o.index+o[0].length;t[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:ri((function(t,e,n){return function(t,e,n,r){var i=new Co(t,n,r),o=t.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),wo(t,e,"widget",(function(e){var n=e.widgets||(e.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=e,o&&!$e(t,e)){var r=Be(e)<t.scrollTop;Xt(e,e.height+On(i)),r&&Dr(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&cn(o,"lineWidgetAdded",o,i,"number"==typeof e?e:Jt(e)),i}(this,t,e,n)})),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return To(this,le(this,t),le(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return To(this,t=le(this,t),t,n,"bookmark")},findMarksAt:function(t){var e=[],n=Gt(this,(t=le(this,t)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(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,n){t=le(this,t),e=le(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==t.line&&t.ch>=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&t.push(n[r].marker)})),t},posFromIndex:function(t){var e,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>t)return e=t,!0;t-=o,++n})),le(this,ee(n,e))},indexFromPos:function(t){var e=(t=le(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,(function(t){e+=t.text.length+n})),e},copy:function(t){var e=new Ao(Yt(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,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var r=new Ao(Yt(this,e,n),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:t.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],function(t,e){for(var n=0;n<e.length;n++){var r=e[n],i=r.find(),o=t.clipPos(i.from),a=t.clipPos(i.to);if(ne(o,a)){var s=To(t,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Eo(this)),r},unlinkDoc:function(t){if(t instanceof Ea&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e)if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),Mo(Eo(this));break}if(t.history==this.history){var n=[t.id];Ni(t,(function(t){return n.push(t.id)}),!0),t.history=new Vi(null),t.history.done=Gi(this.history.done,n),t.history.undone=Gi(this.history.undone,n)}},iterLinkedDocs:function(t){Ni(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):At(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ri((function(t){var e;"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter((function(t){return t.order=null})),this.cm&&ti(e=this.cm,(function(){Fi(e),hr(e)})))}))}),Ao.prototype.eachLine=Ao.prototype.iter;var Lo=0;function _o(t){var e=this;if(No(e),!vt(e,t)&&!Cn(e.display,t)){wt(t),a&&(Lo=+new Date);var n=ur(e,t,!0),r=t.dataTransfer.files;if(n&&!e.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,l=function(){++s==i&&ei(e,(function(){var t={from:n=le(e.doc,n),to:n,text:e.doc.splitLines(o.filter((function(t){return null!=t})).join(e.doc.lineSeparator())),origin:"paste"};uo(e.doc,t),Qi(e.doc,ji(le(e.doc,n),le(e.doc,Ti(t))))}))()},c=function(t,n){if(e.options.allowDropFileTypes&&-1==z(e.options.allowDropFileTypes,t.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var t=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(t)||(o[n]=t),l()},r.readAsText(t)}},u=0;u<r.length;u++)c(r[u],u);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var d=t.dataTransfer.getData("Text");if(d){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),eo(e.doc,ji(n,n)),h)for(var f=0;f<h.length;++f)vo(e.doc,"",h[f].anchor,h[f].head,"drag");e.replaceSelection(d,"around","paste"),e.display.input.focus()}}catch(t){}}}}function No(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Io(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<e.length;r++){var i=e[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var e=0;e<n.length;e++)t(n[e])}))}}var Fo=!1;function Vo(){var t;Fo||(ht(window,"resize",(function(){null==t&&(t=setTimeout((function(){t=null,Io(Ro)}),100))})),ht(window,"blur",(function(){return Io(jr)})),Fo=!0)}function Ro(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var zo={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:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ho=0;Ho<10;Ho++)zo[Ho+48]=zo[Ho+96]=String(Ho);for(var $o=65;$o<=90;$o++)zo[$o]=String.fromCharCode($o);for(var Uo=1;Uo<=12;Uo++)zo[Uo+111]=zo[Uo+63235]="F"+Uo;var Bo={};function Wo(t){var e,n,r,i,o=t.split(/-(?!$)/);t=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return e&&(t="Alt-"+t),n&&(t="Ctrl-"+t),i&&(t="Cmd-"+t),r&&(t="Shift-"+t),t}function qo(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete t[n];continue}for(var i=X(n.split(" "),Wo),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=e[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else e[s]=a}delete t[n]}for(var c in e)t[c]=e[c];return t}function Go(t,e,n,r){var i=(e=Jo(e)).call?e.call(t,r):e[t];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Go(t,e.fallthrough,n,r);for(var o=0;o<e.fallthrough.length;o++){var a=Go(t,e.fallthrough[o],n,r);if(a)return a}}}function Ko(t){var e="string"==typeof t?t:zo[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function Yo(t,e,n){var r=t;return e.altKey&&"Alt"!=r&&(t="Alt-"+t),(O?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(t="Ctrl-"+t),(O?e.ctrlKey:e.metaKey)&&"Mod"!=r&&(t="Cmd-"+t),!n&&e.shiftKey&&"Shift"!=r&&(t="Shift-"+t),t}function Xo(t,e){if(d&&34==t.keyCode&&t["char"])return!1;var n=zo[t.keyCode];return null!=n&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(n=t.code),Yo(n,t,e))}function Jo(t){return"string"==typeof t?Bo[t]:t}function Zo(t,e){for(var n=t.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=e(n[i]);r.length&&ne(o.from,Y(r).to)<=0;){var a=r.pop();if(ne(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}ti(t,(function(){for(var e=r.length-1;e>=0;e--)vo(t.doc,"",r[e].from,r[e].to,"+delete");Ar(t)}))}function Qo(t,e,n){var r=ot(t.text,e+n,n);return r<0||r>t.text.length?null:r}function ta(t,e,n){var r=Qo(t,e.ch,n);return null==r?null:new ee(e.line,r,n<0?"after":"before")}function ea(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=ut(n,e.doc.direction);if(o){var a,s=i<0?Y(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=Ln(e,n);a=i<0?n.text.length-1:0;var u=_n(e,c,a).top;a=at((function(t){return _n(e,c,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Qo(n,a,1))}else a=i<0?s.to:s.from;return new ee(r,a,l)}}return new ee(r,i<0?n.text.length:0,i<0?"before":"after")}Bo.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"},Bo.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"},Bo.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"},Bo.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"]},Bo["default"]=b?Bo.macDefault:Bo.pcDefault;var na={selectAll:lo,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),U)},killLine:function(t){return Zo(t,(function(e){if(e.empty()){var n=Gt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:ee(e.head.line+1,0)}:{from:e.head,to:ee(e.head.line,n)}}return{from:e.from(),to:e.to()}}))},deleteLine:function(t){return Zo(t,(function(e){return{from:ee(e.from().line,0),to:le(t.doc,ee(e.to().line+1,0))}}))},delLineLeft:function(t){return Zo(t,(function(t){return{from:ee(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(t){return Zo(t,(function(e){var n=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:n},"div"),to:e.from()}}))},delWrappedLineRight:function(t){return Zo(t,(function(e){var n=t.charCoords(e.head,"div").top+5,r=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div");return{from:e.from(),to:r}}))},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(ee(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(ee(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy((function(e){return ra(t,e.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy((function(e){return ia(t,e.head)}),{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy((function(e){return function(t,e){var n=Gt(t.doc,e),r=function(t){for(var e;e=Ie(t);)t=e.find(1,!0).line;return t}(n);return r!=n&&(e=Jt(r)),ea(!0,t,n,e,-1)}(t,e.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")}),W)},goLineLeft:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")}),W)},goLineLeftSmart:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5,r=t.coordsChar({left:0,top:n},"div");return r.ch<t.getLine(r.line).search(/\S/)?ia(t,e.head):r}),W)},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,"codepoint")},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=[],n=t.listSelections(),r=t.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=V(t.getLine(o.line),o.ch,r);e.push(K(r-a%r))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return ti(t,(function(){for(var e=t.listSelections(),n=[],r=0;r<e.length;r++)if(e[r].empty()){var i=e[r].head,o=Gt(t.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ee(i.line,i.ch-1)),i.ch>0)i=new ee(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ee(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=Gt(t.doc,i.line-1).text;a&&(i=new ee(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),ee(i.line-1,a.length-1),i,"+transpose"))}n.push(new Si(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return ti(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r<e.length;r++)t.indentLine(e[r].from().line,null,!0);Ar(t)}))},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function ra(t,e){var n=Gt(t.doc,e),r=Re(n);return r!=n&&(e=Jt(r)),ea(!0,t,r,e,1)}function ia(t,e){var n=ra(t,e.line),r=Gt(t.doc,n.line),i=ut(r,t.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=e.line==n.line&&e.ch<=o&&e.ch;return ee(n.line,a?0:o,n.sticky)}return n}function oa(t,e,n){if("string"==typeof e&&!(e=na[e]))return!1;t.display.input.ensurePolled();var r=t.display.shift,i=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),i=e(t)!=$}finally{t.display.shift=r,t.state.suppressEdits=!1}return i}var aa=new R;function sa(t,e,n,r){var i=t.state.keySeq;if(i){if(Ko(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:aa.set(50,(function(){t.state.keySeq==i&&(t.state.keySeq=null,t.display.input.reset())})),la(t,i+" "+e,n,r))return!0}return la(t,e,n,r)}function la(t,e,n,r){var i=function(t,e,n){for(var r=0;r<t.state.keyMaps.length;r++){var i=Go(e,t.state.keyMaps[r],n,t);if(i)return i}return t.options.extraKeys&&Go(e,t.options.extraKeys,n,t)||Go(e,t.options.keyMap,n,t)}(t,e,r);return"multi"==i&&(t.state.keySeq=e),"handled"==i&&cn(t,"keyHandled",t,e,n),"handled"!=i&&"multi"!=i||(wt(n),Or(t)),!!i}function ca(t,e){var n=Xo(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?sa(t,"Shift-"+n,e,(function(e){return oa(t,e,!0)}))||sa(t,n,e,(function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return oa(t,e)})):sa(t,n,e,(function(e){return oa(t,e)})))}var ua=null;function da(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||(e.curOp.focus=A(),vt(e,t)))){a&&s<11&&27==t.keyCode&&(t.returnValue=!1);var r=t.keyCode;e.display.shift=16==r||t.shiftKey;var i=ca(e,t);d&&(ua=i?r:null,i||88!=r||_t||!(b?t.metaKey:t.ctrlKey)||e.replaceSelection("",null,"cut")),n&&!b&&!i&&46==r&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||function(t){var e=t.display.lineDiv;function n(t){18!=t.keyCode&&t.altKey||(j(e,"CodeMirror-crosshair"),pt(document,"keyup",n),pt(document,"mouseover",n))}L(e,"CodeMirror-crosshair"),ht(document,"keyup",n),ht(document,"mouseover",n)}(e)}}function ha(t){16==t.keyCode&&(this.doc.sel.shift=!1),vt(this,t)}function fa(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||Cn(e.display,t)||vt(e,t)||t.ctrlKey&&!t.altKey||b&&t.metaKey)){var n=t.keyCode,r=t.charCode;if(d&&n==ua)return ua=null,void wt(t);if(!d||t.which&&!(t.which<10)||!ca(e,t)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(t,e,n){return sa(t,"'"+n+"'",e,(function(e){return oa(t,e,!0)}))}(e,t,i)||e.display.input.onKeyPress(t))}}}var pa,ga,va=400,ma=function(t,e,n){this.time=t,this.pos=e,this.button=n};function ba(t){var e=this,n=e.display;if(!(vt(e,t)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=t.shiftKey,Cn(n,t))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!xa(e,t)){var r=ur(e,t),i=kt(t),o=r?function(t,e){var n=+new Date;return ga&&ga.compare(n,t,e)?(pa=ga=null,"triple"):pa&&pa.compare(n,t,e)?(ga=new ma(n,t,e),pa=null,"double"):(pa=new ma(n,t,e),ga=null,"single")}(r,i):"single";window.focus(),1==i&&e.state.selectingText&&e.state.selectingText(t),r&&function(t,e,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),sa(t,Yo(o=(1==e?"Left":2==e?"Middle":"Right")+o,i),i,(function(e){if("string"==typeof e&&(e=na[e]),!e)return!1;var r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),r=e(t,n)!=$}finally{t.state.suppressEdits=!1}return r}))}(e,i,r,o,t)||(1==i?r?function(t,e,n,r){a?setTimeout(I(Cr,t),0):t.curOp.focus=A();var i,o=function(t,e,n){var r=t.getOption("configureMouse"),i=r?r(t,e,n):{};if(null==i.unit){var o=y?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==i.extend||t.doc.extend)&&(i.extend=t.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=b?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?n.altKey:n.ctrlKey)),i}(t,n,r),c=t.doc.sel;t.options.dragDrop&&Pt&&!t.isReadOnly()&&"single"==n&&(i=c.contains(e))>-1&&(ne((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(ne(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,c=ei(t,(function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:Sr(t)),pt(i.wrapper.ownerDocument,"mouseup",c),pt(i.wrapper.ownerDocument,"mousemove",u),pt(i.scroller,"dragstart",d),pt(i.scroller,"drop",c),o||(wt(e),r.addNew||Yi(t.doc,n,null,null,r.extend),l&&!h||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,ht(i.wrapper.ownerDocument,"mouseup",c),ht(i.wrapper.ownerDocument,"mousemove",u),ht(i.scroller,"dragstart",d),ht(i.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(t,r,e,o):function(t,e,n,r){a&&Sr(t);var i=t.display,o=t.doc;wt(e);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new Si(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Si(n,n)),n=ur(t,e,!0,!0),l=-1;else{var d=ya(t,n,r.unit);s=r.extend?Ki(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,to(o,ki(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(to(o,ki(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Ji(o,l,s,B):(l=0,to(o,new Ci([s],0),B),c=o.sel);var h=n;function f(e){if(0!=ne(h,e))if(h=e,"rectangle"==r.unit){for(var i=[],a=t.options.tabSize,u=V(Gt(o,n.line).text,n.ch,a),d=V(Gt(o,e.line).text,e.ch,a),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var m=Gt(o,g).text,b=q(m,f,a);f==p?i.push(new Si(ee(g,b),ee(g,b))):m.length>b&&i.push(new Si(ee(g,b),ee(g,q(m,p,a))))}i.length||i.push(new Si(n,n)),to(o,ki(t,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y,w=s,x=ya(t,e,r.unit),O=w.anchor;ne(x.anchor,O)>0?(y=x.head,O=ae(w.from(),x.anchor)):(y=x.anchor,O=oe(w.to(),x.head));var C=c.ranges.slice(0);C[l]=function(t,e){var n=e.anchor,r=e.head,i=Gt(t.doc,n.line);if(0==ne(n,r)&&n.sticky==r.sticky)return e;var o=ut(i);if(!o)return e;var a=lt(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=lt(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=o[c+(l?-1:0)],f=l==(1==h.level),p=f?h.from:h.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new Si(new ee(n.line,p,g),r)}(t,new Si(le(o,O),y)),to(o,ki(t,C,l),B)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(e){t.state.selectingText=!1,g=1/0,e&&(wt(e),i.input.focus()),pt(i.wrapper.ownerDocument,"mousemove",m),pt(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var m=ei(t,(function(e){0!==e.buttons&&kt(e)?function e(n){var a=++g,s=ur(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ne(s,h)){t.curOp.focus=A(),f(s);var l=Er(i,o);(s.line>=l.to||s.line<l.from)&&setTimeout(ei(t,(function(){g==a&&e(n)})),150)}else{var c=n.clientY<p.top?-20:n.clientY>p.bottom?20:0;c&&setTimeout(ei(t,(function(){g==a&&(i.scroller.scrollTop+=c,e(n))})),50)}}(e):v(e)})),b=ei(t,v);t.state.selectingText=b,ht(i.wrapper.ownerDocument,"mousemove",m),ht(i.wrapper.ownerDocument,"mouseup",b)}(t,r,e,o)}(e,r,o,t):St(t)==n.scroller&&wt(t):2==i?(r&&Yi(e.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?e.display.input.onContextMenu(t):Sr(e)))}}function ya(t,e,n){if("char"==n)return new Si(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Si(ee(e.line,0),le(t.doc,ee(e.line+1,0)));var r=n(t,e);return new Si(r.from,r.to)}function wa(t,e,n,r){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(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&wt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!bt(t,n))return Ot(e);o-=s.top-a.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return gt(t,n,t,Zt(t.doc,o),t.display.gutterSpecs[l].className,e),Ot(e)}}function xa(t,e){return wa(t,e,"gutterClick",!0)}function Oa(t,e){Cn(t.display,e)||function(t,e){return!!bt(t,"gutterContextMenu")&&wa(t,e,"gutterContextMenu",!1)}(t,e)||vt(t,e,"contextmenu")||C||t.display.input.onContextMenu(e)}function Ca(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hn(t)}ma.prototype.compare=function(t,e,n){return this.time+va>t&&0==ne(e,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},ka={},ja={};function Ta(t,e,n){if(!e!=!(n&&n!=Sa)){var r=t.display.dragFunctions,i=e?ht:pt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function Pa(t){t.options.lineWrapping?(L(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(j(t.display.wrapper,"CodeMirror-wrap"),qe(t)),cr(t),hr(t),Hn(t),setTimeout((function(){return $r(t)}),100)}function Ea(t,e){var n=this;if(!(this instanceof Ea))return new Ea(t,e);this.options=e=e?F(e):{},F(ka,e,!1);var r=e.value;"string"==typeof r?r=new Ao(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Ea.inputStyles[e.inputStyle](this),o=this.display=new mi(t,r,i,e);for(var c in o.wrapper.CodeMirror=this,Ca(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wr(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 R,keySeq:null,specialChars:null},e.autofocus&&!m&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",ei(t,ba)),ht(e.scroller,"dblclick",a&&s<11?ei(t,(function(e){if(!vt(t,e)){var n=ur(t,e);if(n&&!xa(t,e)&&!Cn(t.display,e)){wt(e);var r=t.findWordAt(n);Yi(t.doc,r.anchor,r.head)}}})):function(e){return vt(t,e)||wt(e)}),ht(e.scroller,"contextmenu",(function(e){return Oa(t,e)})),ht(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||Oa(t,n)}));var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>20*20}ht(e.scroller,"touchstart",(function(i){if(!vt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!xa(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!Cn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Si(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new Si(ee(s.line,0),le(t.doc,ee(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),wt(n)}i()})),ht(e.scroller,"touchcancel",i),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Ir(t,e.scroller.scrollTop),Vr(t,e.scroller.scrollLeft,!0),gt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Oi(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Oi(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){vt(t,e)||Ct(e)},over:function(e){vt(t,e)||(function(t,e){var n=ur(t,e);if(n){var r=document.createDocumentFragment();yr(t,n,r),t.display.dragCursor||(t.display.dragCursor=E("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),P(t.display.dragCursor,r)}}(t,e),Ct(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Lo<100))Ct(e);else if(!vt(t,e)&&!Cn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!h)){var n=E("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(t,e)},drop:ei(t,_o),leave:function(e){vt(t,e)||No(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return ha.call(t,e)})),ht(l,"keydown",ei(t,da)),ht(l,"keypress",ei(t,fa)),ht(l,"focus",(function(e){return kr(t,e)})),ht(l,"blur",(function(e){return jr(t,e)}))}(this),Vo(),Gr(this),this.curOp.forceUpdate=!0,Ii(this,r),e.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&kr(n)}),20):jr(this),ja)ja.hasOwnProperty(c)&&ja[c](this,e[c],Sa);fi(this),e.finishInit&&e.finishInit(this);for(var u=0;u<Ma.length;++u)Ma[u](this);Kr(this),l&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Ea.defaults=ka,Ea.optionHandlers=ja;var Ma=[];function Da(t,e,n,r){var i,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=pe(t,e).state:n="prev");var a=t.options.tabSize,s=Gt(o,e),l=V(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==$||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?V(Gt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)h+=a,d+="\t";if(h<c&&(d+=K(c-h)),d!=u)return vo(o,d,ee(e,0),ee(e,u.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==e&&g.head.ch<u.length){var v=ee(e,u.length);Ji(o,p,new Si(v,v));break}}}Ea.defineInitHook=function(t){return Ma.push(t)};var Aa=null;function La(t){Aa=t}function _a(t,e,n,r,i){var o=t.doc;t.display.shift=!1,r||(r=o.sel);var a=+new Date-200,s="paste"==i||t.state.pasteIncoming>a,l=At(e),c=null;if(s&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==e){if(r.ranges.length%Aa.text.length==0){c=[];for(var u=0;u<Aa.text.length;u++)c.push(o.splitLines(Aa.text[u]))}}else l.length==r.ranges.length&&t.options.pasteLinesPerSelection&&(c=X(l,(function(t){return[t]})));for(var d=t.curOp.updateInput,h=r.ranges.length-1;h>=0;h--){var f=r.ranges[h],p=f.from(),g=f.to();f.empty()&&(n&&n>0?p=ee(p.line,p.ch-n):t.state.overwrite&&!s?g=ee(g.line,Math.min(Gt(o,g.line).text.length,g.ch+Y(l).length)):s&&Aa&&Aa.lineWise&&Aa.text.join("\n")==l.join("\n")&&(p=g=ee(p.line,0)));var v={from:p,to:g,text:c?c[h%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};uo(t.doc,v),cn(t,"inputRead",t,v)}e&&!s&&Ia(t,e),Ar(t),t.curOp.updateInput<2&&(t.curOp.updateInput=d),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Na(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||ti(e,(function(){return _a(e,n,0,null,"paste")})),!0}function Ia(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(e.indexOf(o.electricChars.charAt(s))>-1){a=Da(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Gt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Da(t,i.head.line,"smart"));a&&cn(t,"electricInput",t,i.head.line)}}}function Fa(t){for(var e=[],n=[],r=0;r<t.doc.sel.ranges.length;r++){var i=t.doc.sel.ranges[r].head.line,o={anchor:ee(i,0),head:ee(i+1,0)};n.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:n}}function Va(t,e,n,r){t.setAttribute("autocorrect",n?"":"off"),t.setAttribute("autocapitalize",r?"":"off"),t.setAttribute("spellcheck",!!e)}function Ra(){var t=E("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=E("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?t.style.width="1000px":t.setAttribute("wrap","off"),g&&(t.style.border="1px solid black"),Va(t),e}function za(t,e,n,r,i){var o=e,a=n,s=Gt(t,e.line),l=i&&"rtl"==t.direction?-n:n;function c(o){var a,c;if("codepoint"==r){var u=s.text.charCodeAt(e.ch+(r>0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new ee(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(d?2:1))),-n)}}else a=i?function(t,e,n,r){var i=ut(e,t.doc.direction);if(!i)return ta(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lt(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return ta(e,n,r);var s,l=function(t,n){return Qo(e,t instanceof ee?t.ch:t,n)},c=function(n){return t.options.lineWrapping?(s=s||Ln(t,e),Qn(t,e,s,n)):{begin:0,end:e.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==t.doc.direction||1==a.level){var d=1==a.level==r<0,h=l(n,d?1:-1);if(null!=h&&(d?h<=a.to&&h<=u.end:h>=a.from&&h>=u.begin)){var f=d?"before":"after";return new ee(n.line,h,f)}}var p=function(t,e,r){for(var o=function(t,e){return e?new ee(n.line,l(t,1),"before"):new ee(n.line,t,"after")};t>=0&&t<i.length;t+=e){var a=i[t],s=e>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return o(c,s)}},g=p(o+r,r,u);if(g)return g;var v=r>0?u.end:l(u.begin,-1);return null==v||r>0&&v==e.text.length||!(g=p(r>0?0:i.length-1,r,c(v)))?null:g}(t.cm,s,e,n):ta(s,e,n);if(null==a){if(o||(c=e.line+l)<t.first||c>=t.first+t.size||(e=new ee(c,e.ch,e.sticky),!(s=Gt(t,c))))return!1;e=ea(i,t.cm,s,e.line,l)}else e=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,h=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(e.ch)||"\n",g=et(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),e.sticky="after");break}if(g&&(u=g),n>0&&!c(!f))break}var v=ao(t,e,o,a,!0);return re(o,v)&&(v.hitSide=!0),v}function Ha(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ir(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=Jn(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var $a=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(t,e){var n=An(t,e.line);if(!n||n.hidden)return null;var r=Gt(t.doc,e.line),i=Mn(n,r,e.line),o=ut(r,t.doc.direction),a="left";o&&(a=lt(o,e.ch)%2?"right":"left");var s=Fn(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ba(t,e){return e&&(t.bad=!0),t}function Wa(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return Ba(t.clipPos(ee(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i<t.display.view.length;i++){var o=t.display.view[i];if(o.node==r)return qa(o,e,n)}}function qa(t,e,n){var r=t.text.firstChild,i=!1;if(!e||!D(r,e))return Ba(ee(Jt(t.line),0),!0);if(e==r&&(i=!0,e=r.childNodes[n],n=0,!e)){var o=t.rest?Y(t.rest):t.line;return Ba(ee(Jt(o),o.text.length),i)}var a=3==e.nodeType?e:null,s=e;for(a||1!=e.childNodes.length||3!=e.firstChild.nodeType||(a=e.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=t.measure,c=l.maps;function u(e,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==e||s==n){var u=Jt(i<0?t.line:t.rest[i]),d=o[a]+r;return(r<0||s!=e)&&(d=o[a+(r?1:0)]),ee(u,d)}}}var d=u(a,s,n);if(d)return Ba(d,i);for(var h=s.nextSibling,f=a?a.nodeValue.length-n:0;h;h=h.nextSibling){if(d=u(h,h.firstChild,0))return Ba(ee(d.line,d.ch-f),i);f+=h.textContent.length}for(var p=s.previousSibling,g=n;p;p=p.previousSibling){if(d=u(p,p.firstChild,-1))return Ba(ee(d.line,d.ch+g),i);g+=p.textContent.length}}$a.prototype.init=function(t){var e=this,n=this,r=n.cm,i=n.div=t.lineDiv;function o(t){for(var e=t.target;e;e=e.parentNode){if(e==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(e.className))break}return!1}function a(t){if(o(t)&&!vt(r,t)){if(r.somethingSelected())La({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Fa(r);La({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation((function(){r.setSelections(e.ranges,0,U),r.replaceSelection("",null,"cut")}))}if(t.clipboardData){t.clipboardData.clearData();var a=Aa.text.join("\n");if(t.clipboardData.setData("Text",a),t.clipboardData.getData("Text")==a)return void t.preventDefault()}var s=Ra(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Aa.text.join("\n");var c=document.activeElement;N(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}Va(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),ht(i,"paste",(function(t){!o(t)||vt(r,t)||Na(t,r)||s<=11&&setTimeout(ei(r,(function(){return e.updateFromDOM()})),20)})),ht(i,"compositionstart",(function(t){e.composing={data:t.data,done:!1}})),ht(i,"compositionupdate",(function(t){e.composing||(e.composing={data:t.data,done:!1})})),ht(i,"compositionend",(function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)})),ht(i,"touchstart",(function(){return n.forceCompositionEnd()})),ht(i,"input",(function(){e.composing||e.readFromDOMSoon()})),ht(i,"copy",a),ht(i,"cut",a)},$a.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute('aria-label',t):this.div.removeAttribute('aria-label')},$a.prototype.prepareSelection=function(){var t=br(this.cm,!1);return t.focus=document.activeElement==this.div,t},$a.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},$a.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},$a.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,r=e.doc.sel.primary(),i=r.from(),o=r.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||o.line<e.display.viewFrom)t.removeAllRanges();else{var a=Wa(e,t.anchorNode,t.anchorOffset),s=Wa(e,t.focusNode,t.focusOffset);if(!a||a.bad||!s||s.bad||0!=ne(ae(a,s),i)||0!=ne(oe(a,s),o)){var l=e.display.view,c=i.line>=e.display.viewFrom&&Ua(e,i)||{node:l[0].measure.map[2],offset:0},u=o.line<e.display.viewTo&&Ua(e,o);if(!u){var d=l[l.length-1].measure,h=d.maps?d.maps[d.maps.length-1]:d.map;u={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(c&&u){var f,p=t.rangeCount&&t.getRangeAt(0);try{f=k(c.node,c.offset,u.offset,u.node)}catch(t){}f&&(!n&&e.state.focused?(t.collapse(c.node,c.offset),f.collapsed||(t.removeAllRanges(),t.addRange(f))):(t.removeAllRanges(),t.addRange(f)),p&&null==t.anchorNode?t.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},$a.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)},$a.prototype.showMultipleSelections=function(t){P(this.cm.display.cursorDiv,t.cursors),P(this.cm.display.selectionDiv,t.selection)},$a.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},$a.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return D(this.div,e)},$a.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},$a.prototype.blur=function(){this.div.blur()},$a.prototype.getField=function(){return this.div},$a.prototype.supportsTouch=function(){return!0},$a.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():ti(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},$a.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},$a.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&function(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Wa(e,t.anchorNode,t.anchorOffset),r=Wa(e,t.focusNode,t.focusOffset);n&&r&&ti(e,(function(){to(e.doc,ji(n,r),U),(n.bad||r.bad)&&(e.curOp.selectionChanged=!0)}))}}},$a.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=ee(a.line-1,Gt(r.doc,a.line-1).length)),s.ch==Gt(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=ee(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(t=dr(r,a.line))?(e=Jt(i.view[0].line),n=i.view[0].node):(e=Jt(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=dr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Jt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function d(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,h=e.getAttribute("cm-marker");if(h){var f=t.findMarks(ee(r,0),ee(i+1,0),(v=+h,function(t){return t.id==v}));return void(f.length&&(o=f[0].find(0))&&u(Kt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g<e.childNodes.length;g++)d(e.childNodes[g]);/^(pre|p)$/i.test(e.nodeName)&&(l=!0),p&&(a=!0)}else 3==e.nodeType&&u(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var v}for(;d(e),e!=n;)e=e.nextSibling,l=!1;return o}(r,n,c,e,l)),h=Kt(r.doc,ee(e,0),ee(l,Gt(r.doc,l).text.length));d.length>1&&h.length>1;)if(Y(d)==Y(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),e++}for(var f=0,p=0,g=d[0],v=h[0],m=Math.min(g.length,v.length);f<m&&g.charCodeAt(f)==v.charCodeAt(f);)++f;for(var b=Y(d),y=Y(h),w=Math.min(b.length-(1==d.length?f:0),y.length-(1==h.length?f:0));p<w&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)++p;if(1==d.length&&1==h.length&&e==a.line)for(;f&&f>a.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)f--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var x=ee(e,f),O=ee(l,h.length?Y(h).length-p:0);return d.length>1||d[0]||ne(x,O)?(vo(r.doc,d,x,O,"+input"),!0):void 0},$a.prototype.ensurePolled=function(){this.forceCompositionEnd()},$a.prototype.reset=function(){this.forceCompositionEnd()},$a.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$a.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))},$a.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||ti(this.cm,(function(){return hr(t.cm)}))},$a.prototype.setUneditable=function(t){t.contentEditable="false"},$a.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||ei(this.cm,_a)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},$a.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},$a.prototype.onContextMenu=function(){},$a.prototype.resetPosition=function(){},$a.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!vt(r,t)){if(r.somethingSelected())La({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Fa(r);La({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,U):(n.prevInput="",i.value=e.text.join("\n"),N(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(i.style.width="0px"),ht(i,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ht(i,"paste",(function(t){vt(r,t)||Na(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ht(i,"cut",o),ht(i,"copy",o),ht(t.scroller,"paste",(function(e){if(!Cn(t,e)&&!vt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}})),ht(t.lineSpace,"selectstart",(function(e){Cn(t,e)||wt(e)})),ht(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ga.prototype.createField=function(t){this.wrapper=Ra(),this.textarea=this.wrapper.firstChild},Ga.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute('aria-label',t):this.textarea.removeAttribute('aria-label')},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=br(t);if(t.options.moveInputWithCursor){var i=Kn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ga.prototype.showSelection=function(t){var e=this.cm.display;P(e.cursorDiv,t.cursors),P(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&N(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||A()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Ga.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Lt(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\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||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return ti(e,(function(){_a(e,i.slice(l),r.length-l,null,t.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=ur(n,t),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,to)(n.doc,ji(o),U);var u,h=i.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=m,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&v(),C){Ct(t);var g=function(){pt(window,"mouseup",g),setTimeout(m,20)};ht(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var t=n.somethingSelected(),o=""+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function m(){if(e.contextMenuPending==m&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,i.style.cssText=h,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&v();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==e.prevInput?ei(n,lo)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=Sa&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Sa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Di(t)}),!0),n("indentUnit",2,Di,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Ai(t),Hn(t),hr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=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,n.push(ee(r,o))}r++}));for(var i=n.length-1;i>=0;i--)vo(t.doc,e,n[i],ee(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Sa&&t.refresh()})),n("specialCharPlaceholder",Qe,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Ca(t),vi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=Jo(e),i=n!=Sa&&Jo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Pa,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=pi(e,t.options.lineNumbers),vi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?sr(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return $r(t)}),!0),n("scrollbarStyle","native",(function(t){Wr(t),$r(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=pi(t.options.gutters,e),vi(t)}),!0),n("firstLineNumber",1,vi,!0),n("lineNumberFormatter",(function(t){return t}),vi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(jr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=''===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Ta),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ai,!0),n("addModeClass",!1,Ai,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Ai,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(Ea),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&ei(this,e[t])(this,n,i),gt(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"](Jo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:ni((function(e,n){var r=e.token?e:t.getMode(this.options,e);if(r.startState)throw new Error("Overlays may not be stateful.");!function(t,e,n){for(var r=0,i=n(e);r<t.length&&n(t[r])<=i;)r++;t.splice(r,0,e)}(this.state.overlays,{mode:r,modeSpec:e,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(t){return t.priority})),this.state.modeGen++,hr(this)})),removeOverlay:ni((function(t){for(var e=this.state.overlays,n=0;n<e.length;++n){var r=e[n].modeSpec;if(r==t||"string"==typeof t&&r.name==t)return e.splice(n,1),this.state.modeGen++,void hr(this)}})),indentLine:ni((function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),Qt(this.doc,t)&&Da(this,t,e,n)})),indentSelection:ni((function(t){for(var e=this.doc.sel.ranges,n=-1,r=0;r<e.length;r++){var i=e[r];if(i.empty())i.head.line>n&&(Da(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ar(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Da(this,l,t);var c=this.doc.sel.ranges;0==o.ch&&e.length==c.length&&c[r].from().ch>0&&Ji(this.doc,r,new Si(o,c[r].to()),U)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,ee(t),e,!0)},getTokenTypeAt:function(t){t=le(this.doc,t);var e,n=fe(this,Gt(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){e=n[2*a+2];break}r=a+1}}var s=e?e.indexOf("overlay "):-1;return s<0?e:0==s?null:e.slice(0,s-1)},getModeAt:function(e){var n=this.doc.mode;return n.innerMode?t.innerMode(n,this.getTokenAt(e).state).mode:n},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var r=[];if(!n.hasOwnProperty(e))return r;var i=n[e],o=this.getModeAt(t);if("string"==typeof o[e])i[o[e]]&&r.push(i[o[e]]);else if(o[e])for(var a=0;a<o[e].length;a++){var s=i[o[e][a]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==z(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(t,e){var n=this.doc;return pe(this,(t=se(n,null==t?n.first+n.size-1:t))+1,e).state},cursorCoords:function(t,e){var n=this.doc.sel.primary();return Kn(this,null==t?n.head:"object"==typeof t?le(this.doc,t):t?n.from():n.to(),e||"page")},charCoords:function(t,e){return Gn(this,le(this.doc,t),e||"page")},coordsChar:function(t,e){return Jn(this,(t=qn(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=qn(this,{top:t,left:0},e||"page").top,Zt(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var r,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),r=Gt(this.doc,t)}else r=t;return Wn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Be(r):0)},defaultTextHeight:function(){return ir(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,a,s,l=this.display,c=(t=Kn(this,le(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),h=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);('above'==r||t.bottom+e.offsetHeight>d)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=d&&(c=t.bottom),u+e.offsetWidth>h&&(u=h-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==i?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(s=Mr(o,a)).scrollTop&&Ir(o,s.scrollTop),null!=s.scrollLeft&&Vr(o,s.scrollLeft))},triggerOnKeyDown:ni(da),triggerOnKeyPress:ni(fa),triggerOnKeyUp:ha,triggerOnMouseDown:ni(ba),execCommand:function(t){if(na.hasOwnProperty(t))return na[t].call(null,this)},triggerElectric:ni((function(t){Ia(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=le(this.doc,t),a=0;a<e&&!(o=za(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:ni((function(t,e){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?za(n.doc,r.head,t,e,n.options.rtlMoveVisually):t<0?r.from():r.to()}),W)})),deleteH:ni((function(t,e){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Zo(this,(function(n){var i=za(r,n.head,t,e,!1);return t<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(t,e,n,r){var i=1,o=r;e<0&&(i=-1,e=-e);for(var a=le(this.doc,t),s=0;s<e;++s){var l=Kn(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Ha(this,l,i,n)).hitSide)break}return a},moveV:ni((function(t,e){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return t<0?a.from():a.to();var s=Kn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Ha(n,s,t,e);return"page"==e&&a==r.sel.primary()&&Dr(n,Gn(n,l,"div").top-s.top),l}),W),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(t){var e=Gt(this.doc,t.line).text,n=t.ch,r=t.ch;if(e){var i=this.getHelper(t,"wordChars");"before"!=t.sticky&&r!=e.length||!n?++r:--n;for(var o=e.charAt(n),a=et(o,i)?function(t){return et(t,i)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!et(t)};n>0&&a(e.charAt(n-1));)--n;for(;r<e.length&&a(e.charAt(r));)++r}return new Si(ee(t.line,n),ee(t.line,r))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?L(this.display.cursorDiv,"CodeMirror-overwrite"):j(this.display.cursorDiv,"CodeMirror-overwrite"),gt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==A()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ni((function(t,e){Lr(this,t,e)})),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Tn(this)-this.display.barHeight,width:t.scrollWidth-Tn(this)-this.display.barWidth,clientHeight:En(this),clientWidth:Pn(this)}},scrollIntoView:ni((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:ee(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?function(t,e){_r(t),t.curOp.scrollToPos=e}(this,t):Nr(this,t.from,t.to,t.margin)})),setSize:ni((function(t,e){var n=this,r=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=r(t)),null!=e&&(this.display.wrapper.style.height=r(e)),this.options.lineWrapping&&zn(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){fr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,gt(this,"refresh",this)})),operation:function(t){return ti(this,t)},startOperation:function(){return Gr(this)},endOperation:function(){return Kr(this)},refresh:ni((function(){var t=this.display.cachedTextHeight;hr(this),this.curOp.forceUpdate=!0,Hn(this),Lr(this,this.doc.scrollLeft,this.doc.scrollTop),ui(this.display),(null==t||Math.abs(t-ir(this.display))>.5||this.options.lineWrapping)&&cr(this),gt(this,"refresh",this)})),swapDoc:ni((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Ii(this,t),Hn(this),this.display.input.reset(),Lr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,cn(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}},yt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(Ea);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var Ya in Ao.prototype)Ao.prototype.hasOwnProperty(Ya)&&z(Ka,Ya)<0&&(Ea.prototype[Ya]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ao.prototype[Ya]));return yt(Ao),Ea.inputStyles={textarea:Ga,contenteditable:$a},Ea.defineMode=function(t){Ea.defaults.mode||"null"==t||(Ea.defaults.mode=t),Vt.apply(this,arguments)},Ea.defineMIME=function(t,e){Ft[t]=e},Ea.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Ea.defineMIME("text/plain","null"),Ea.defineExtension=function(t,e){Ea.prototype[t]=e},Ea.defineDocExtension=function(t,e){Ao.prototype[t]=e},Ea.fromTextArea=function(t,e){if((e=e?F(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}function r(){t.value=s.getValue()}var i;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Ea((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=pt,t.on=ht,t.wheelEventPixels=xi,t.Doc=Ao,t.splitLines=At,t.countColumn=V,t.findColumn=q,t.isWordChar=tt,t.Pass=$,t.signal=gt,t.Line=Ge,t.changeEnd=Ti,t.scrollbarModel=Br,t.Pos=ee,t.cmpPos=ne,t.modes=It,t.mimeModes=Ft,t.resolveMode=Rt,t.getMode=zt,t.modeExtensions=Ht,t.extendMode=$t,t.copyState=Ut,t.startState=Wt,t.innerMode=Bt,t.commands=na,t.keyMap=Bo,t.keyName=Xo,t.isModifierKey=Ko,t.lookupKey=Go,t.normalizeKeyMap=qo,t.StringStream=qt,t.SharedTextMarker=Po,t.TextMarker=jo,t.LineWidget=Co,t.e_preventDefault=wt,t.e_stopPropagation=xt,t.e_stop=Ct,t.addClass=L,t.contains=D,t.rmClass=j,t.keyNames=zo}(Ea),Ea.version="5.59.1",Ea}())},function(t,e,n){"use strict";n.r(e);var r=n(8),i=n.n(r),o=n(2),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u=n(3),d=n(9),h=n(20);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var g=l.a.View.extend({events:function(){return this.model.get('events')||{mousedown:'handleClick'}},attributes:function(){return this.model.get('attributes')},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.config,n=void 0===e?{}:e;this.em=n.em,this.editor=n.editor},handleClick:function(t){t.preventDefault(),t.stopPropagation();var e=this.editor,n=this.em,r=e.Canvas.getFrameEl().getBoundingClientRect(),i=r.left,o=r.top,a=p(p({},t),{},{clientX:t.clientX-i,clientY:t.clientY-o});n.trigger('toolbar:run:before'),this.execCommand(a)},execCommand:function(t){var e={event:t},n=this.model.get('command'),r=this.editor;'function'==typeof n&&n(r,null,e),'string'==typeof n&&r.runCommand(n,e)},render:function(){var t=this.editor,e=this.$el,n=this.model,r=n.get('id'),i=n.get('label'),o=t.getConfig('stylePrefix');return e.addClass("".concat(o,"toolbar-item")),r&&e.addClass("".concat(o,"toolbar-item__").concat(r)),i&&e.append(i),this}}),v=h["a"].extend({itemView:g,initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config={editor:t.editor||'',em:t.em},this.listenTo(this.collection,'reset',this.render)}}),m=l.a.Model.extend({defaults:{command:'',attributes:{}}}),b=l.a.Collection.extend({model:m});function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var x,O=l.a.$;e["default"]={init:function(t){Object(c["bindAll"])(this,'onHover','onOut','onClick','onFrameScroll','onFrameUpdated','onContainerChange')},enable:function(){this.frameOff=this.canvasOff=this.adjScroll=null,this.startSelectComponent(),x=1},startSelectComponent:function(){this.toggleSelectComponent(1),this.em.getSelected()&&this.onSelect()},stopSelectComponent:function(){this.toggleSelectComponent()},toggleSelectComponent:function(t){var e=this,n=this.em,r=n.getConfig('listenToEl'),i=n.getContainer().parentNode,o=t?'on':'off',a={on:u["v"],off:u["u"]};!r.length&&i&&r.push(i);a[o](window,'resize',this.onFrameUpdated),a[o](r,'scroll',this.onContainerChange),n[o]('component:toggled component:remove',this.onSelect,this),n[o]('change:componentHovered',this.onHovered,this),n[o]('component:resize component:styleUpdate component:input',this.updateGlobalPos,this),n[o]('component:update:toolbar',this._upToolbar,this),n[o]('change:canvasOffset',this.updateAttached,this),n[o]('frame:updated',this.onFrameUpdated,this),n[o]('canvas:updateTools',this.onFrameUpdated,this),n.get('Canvas').getFrames().forEach((function(t){var n,r,i=t.view;i&&(n=i.getWindow(),r=i.getBody(),a[o](r,'mouseover',e.onHover),a[o](r,'mouseleave',e.onOut),a[o](r,'click touchend',e.onClick),a[o](n,'scroll',e.onFrameScroll))}))},onHover:function(t){t.stopPropagation();var e=t.target,n=Object(u["j"])(e),r=n&&n._getFrame(),i=O(e),o=i.data('model');if(!o)for(var a=i.parent();!o&&a.length&&!Object(d["g"])(a[0]);)o=a.data('model'),a=a.parent();if(o&&!o.get('hoverable')){for(var s=o&&o.parent();s&&!s.get('hoverable');)s=s.parent();o=s}this.currentDoc=e.ownerDocument,this.em.setHovered(o),r&&this.em.set('currentFrame',r)},onFrameUpdated:function(){this.updateLocalPos(),this.updateGlobalPos()},onHovered:function(t,e){var n=this,r={};e?e.views.forEach((function(t){var i=t.el,o=n.getElementPos(i);r={el:i,pos:o,component:e,view:Object(u["j"])(i)},n.updateToolsLocal(r),i.ownerDocument===n.currentDoc&&(n.elHovered=r)})):(this.currentDoc=null,this.elHovered=0,this.updateToolsLocal(),this.canvas.getFrames().forEach((function(t){var e=t.view,r=e&&e.getToolsEl();r&&n.toggleToolsEl(0,0,{el:r})})))},onSelect:Object(c["debounce"])((function(){var t=this.em,e=t.getSelected(),n=t.get('currentFrame')||{},r=e&&e.getView(n.model),i=r&&r.el,o={};i&&Object(d["h"])(i)&&(o={el:i,pos:this.getElementPos(i),component:e,view:Object(u["j"])(i)});this.elSelected=o,this.updateToolsGlobal(),this.updateToolsLocal(o),this.initResize(e)})),updateGlobalPos:function(){var t=this.getElSelected();t.el&&(t.pos=this.getElementPos(t.el),this.updateToolsGlobal())},updateLocalPos:function(){var t=this.getElHovered();t.el&&(t.pos=this.getElementPos(t.el),this.updateToolsLocal())},getElHovered:function(){return this.elHovered||{}},getElSelected:function(){return this.elSelected||{}},onOut:function(){this.em.setHovered(0)},toggleToolsEl:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.el||this.canvas.getToolsEl(e);return r&&(r.style.opacity=t?1:0),r||{}},showElementOffset:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};x&&this.editor.runCommand('show-offset',{el:t,elPos:e,view:n.view,force:1,top:0,left:0})},hideElementOffset:function(t){this.editor.stopCommand('show-offset',{view:t})},showFixedElementOffset:function(t,e){this.editor.runCommand('show-offset',{el:t,elPos:e,state:'Fixed'})},hideFixedElementOffset:function(t,e){this.editor&&this.editor.stopCommand('show-offset',{state:'Fixed'})},hideHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=0},onClick:function(t){t.stopPropagation(),t.preventDefault();var e=this.em;if(e.get('_cmpDrag'))return e.set('_cmpDrag');var n=O(t.target),r=n.data('model');if(!r)for(var i=n.parent();!r&&i.length&&!Object(d["g"])(i[0]);)r=i.data('model'),i=i.parent();if(r)if(r.get('selectable'))this.select(r,t);else{for(var o=r.parent();o&&!o.get('selectable');)o=o.parent();this.select(o,t)}},select:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(this.editor.select(t,{scroll:{},event:e}),this.initResize(t))},updateBadge:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=O(t).data('model');if(r&&r.get('badgable')){var i=this.getBadge(n);if(!n.posOnly){var o=this.canvas.getConfig(),a=r.getIcon(),s=o.pStylePrefix||'',l="".concat(s,"badge"),c=o.customBadgeLabel,u="".concat(a?"<div class=\"".concat(l,"__icon\">").concat(a,"</div>"):'',"\n <div class=\"").concat(l,"__name\">").concat(r.getName(),"</div>");i.innerHTML=c?c(r):u}var d='px',h=i.style;h.display='block';var f=i?i.offsetHeight:0,p=0-f,g=n.topOff-f<0?-n.topOff:p,v=n.leftOff<0?-n.leftOff:0;h.top=g+d,h.left=v+d}},showHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=''},initResize:function(t){var e,n=this.em,r=this.canvas,o=n?n.get('Editor'):'',a=(n?n.get('Config'):'').stylePrefix||'',s="".concat(a,"resizing"),l=!Object(c["isElement"])(t)&&Object(u["q"])(t)?t:n.getSelected(),d=l&&l.get('resizable'),h={},f=function(t,e,n){var r=n.docs;r&&r.forEach((function(e){var n=e.body,r=n.className||'';n.className=('add'==t?"".concat(r," ").concat(s):r.replace(s,'')).trim()}))};if(o&&d){var p=Object(c["isElement"])(t)?t:l.getEl();h={onStart:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.el,a=i.config,s=i.resizer,c=a.keyHeight,d=a.keyWidth,h=a.currentUnit,p=a.keepAutoHeight,g=a.keepAutoWidth;f('add',0,i),e=n.get('StyleManager').getModelToStyle(l),r.toggleFramesEvents();var v=getComputedStyle(o),m=e.getStyle(),b=m[d];a.autoWidth=g&&'auto'===b,isNaN(parseFloat(b))&&(b=v[d]);var y=m[c];a.autoHeight=p&&'auto'===y,isNaN(parseFloat(y))&&(y=v[c]),s.startDim.w=parseFloat(b),s.startDim.h=parseFloat(y),x=0,h&&(a.unitHeight=Object(u["i"])(y),a.unitWidth=Object(u["i"])(b))},onMove:function(){o.trigger('component:resize')},onEnd:function(t,e){f('remove',0,e),o.trigger('component:resize'),r.toggleFramesEvents(1),x=1},updateTarget:function(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var a=o.store,s=o.selectedHandler,l=o.config,c=l.keyHeight,u=l.keyWidth,d=l.autoHeight,h=l.autoWidth,f=l.unitWidth,p=l.unitHeight,g=['tc','bc'].indexOf(s)>=0,v=['cl','cr'].indexOf(s)>=0,m={},b=a?'':1;if(!g){var y=r.getBody().offsetWidth,x=i.w<y?i.w:y;m[u]=h?'auto':"".concat(x).concat(f)}v||(m[c]=d?'auto':"".concat(i.h).concat(p)),e.addStyle(w(w({},m),{},{en:b}),{avoidStore:!a});var O="update:component:style",C="".concat(O,":").concat(c," ").concat(O,":").concat(u);n&&n.trigger(C,null,null,{noEmit:1})}}},'object'==i()(d)&&(h=w(w({},h),d)),this.resizer=o.runCommand('resize',{el:p,options:h,force:1})}else o.stopCommand('resize'),this.resizer=null},updateToolbar:function(t){var e=this.config.em,n=t==e?e.getSelected():t,r=this.canvas.getToolbarEl(),i=r.style;if(n){var o=n.get('toolbar');if(e.get('Config').showToolbar&&o&&o.length){if(i.opacity='',i.display='',!this.toolbar){r.innerHTML='',this.toolbar=new b(o);var a=new v({collection:this.toolbar,editor:this.editor,em:e});r.appendChild(a.render().el)}this.toolbar.reset(o),i.top='-100px',i.left=0}else i.display='none'}else i.opacity=0},updateToolbarPos:function(t){var e='px',n=this.canvas.getToolbarEl().style;n.top="".concat(t.top).concat(e),n.left="".concat(t.left).concat(e),n.opacity=''},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},getBadge:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.canvas.getBadgeEl(t.view)},onFrameScroll:function(){this.updateTools()},updateTools:function(){this.updateToolsLocal(),this.updateGlobalPos()},isCompSelected:function(t){return t&&'selected'===t.get('status')},updateToolsLocal:function(t){var e=t||this.getElHovered(),n=e.el,r=e.pos,i=e.view,o=e.component;if(n){var a=o.get('hoverable'),s=this.lastHovered!==n,l=s?{}:{posOnly:1};s&&a&&(this.lastHovered=n,this.showHighlighter(i),this.showElementOffset(n,r,{view:i})),this.isCompSelected(o)&&(this.hideHighlighter(i),this.hideElementOffset(i));var c='px',u=this.toggleToolsEl(1,i).style,d=this.canvas.canvasRectOffset(n,r),h=d.top,f=d.left;this.updateBadge(n,r,w(w({},l),{},{view:i,topOff:h,leftOff:f})),u.top=h+c,u.left=f+c,u.width=r.width+c,u.height=r.height+c}else this.lastHovered=0},_upToolbar:Object(c["debounce"])((function(){this.updateToolsGlobal({force:1})})),updateToolsGlobal:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getElSelected(),n=e.el,r=e.pos,i=e.component;if(!n)return this.toggleToolsEl(),void(this.lastSelected=0);var o=this.canvas,a=this.lastSelected!==n;(a||t.force)&&(this.lastSelected=n,this.updateToolbar(i));var s='px',l=this.toggleToolsEl(1),c=l.style,u=o.getTargetToElementFixed(n,o.getToolbarEl(),{pos:r}),d=u.canvasOffsetTop,h=u.canvasOffsetLeft;c.top=d+s,c.left=h+s,c.width=r.width+s,c.height=r.height+s,this.updateToolbarPos({top:u.top,left:u.left})},updateAttached:Object(c["debounce"])((function(){this.updateGlobalPos()})),onContainerChange:Object(c["debounce"])((function(){this.em.refreshCanvas()}),150),getElementPos:function(t){return this.canvas.getCanvasView().getElementPos(t)},hideBadge:function(){this.getBadge().style.display='none'},cleanPrevious:function(t){t&&t.set({status:'',state:''})},getContentWindow:function(){return this.canvas.getWindow()},run:function(t){this.editor=t&&t.get('Editor'),this.enable()},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.em,i=this.editor;this.onHovered(),this.stopSelectComponent(),!n.preserveSelected&&r.setSelected(null),this.toggleToolsEl(),i&&i.stopCommand('resize')}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(2),i=n.n(r),o=n(15),a=n.n(o),s=n(16),l=n.n(s),c=n(0),u=n(3);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a()(this,t),this.opts={container:null,onStart:null,onDrag:null,onEnd:null,setPosition:null,getPosition:null,guidesStatic:null,guidesTarget:null,snapOffset:5,doc:0,scale:1},Object(c["bindAll"])(this,'drag','stop','keyHandle','handleScroll'),this.setOptions(e),this.delta={x:0,y:0},this}return l()(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=h(h({},this.opts),t)}},{key:"toggleDrag",value:function(t){var e=this.getDocumentEl(),n=this.getContainerEl(),r=this.getWindowEl(),i=t?'on':'off',o={on:u["v"],off:u["u"]};o[i](n,'mousemove dragover',this.drag),o[i](e,'mouseup dragend touchend',this.stop),o[i](e,'keydown',this.keyHandle),o[i](r,'scroll',this.handleScroll)}},{key:"handleScroll",value:function(){var t=this.lastScroll,e=this.delta,n=this.getScrollInfo(),r={x:n.x-t.x,y:n.y-t.y};this.move(e.x+r.x,e.y+r.y),this.lastScrollDiff=r}},{key:"start",value:function(t){var e=this.opts,n=e.onStart;this.toggleDrag(1),this.startPointer=this.getPointerPos(t),this.guidesStatic=Object(c["result"])(e,'guidesStatic')||[],this.guidesTarget=Object(c["result"])(e,'guidesTarget')||[],Object(c["isFunction"])(n)&&n(t,this),this.startPosition=this.getStartPosition(),this.lastScrollDiff={x:0,y:0},this.globScrollDiff={x:0,y:0},this.drag(t)}},{key:"drag",value:function(t){var e=this,n=this.opts,r=this.lastScrollDiff,i=this.globScrollDiff,o=n.onDrag,a=this.startPointer,s=this.getPointerPos(t),l={x:i.x+r.x,y:i.y+r.y};this.globScrollDiff=l;var u={x:s.x-a.x+l.x,y:s.y-a.y+l.y};this.lastScrollDiff={x:0,y:0};var d=this.lockedAxis;'x'===(d=t.shiftKey?!d&&this.detectAxisLock(u.x,u.y):null)?u.x=a.x:'y'===d&&(u.y=a.y);var f=function(r){['x','y'].forEach((function(t){return r[t]=r[t]*Object(c["result"])(n,'scale')})),e.delta=r,e.move(r.x,r.y),Object(c["isFunction"])(o)&&o(t,e)},p=h({},u);if(this.currentPointer=s,this.lockedAxis=d,this.lastScroll=this.getScrollInfo(),f(u),this.guidesTarget.length){var g=this.snapGuides(p),v=g.newDelta,m=g.trgX,b=g.trgY;(m||b)&&f(v)}0===t.which&&this.stop(t)}},{key:"snapGuides",value:function(t){var e=this,n=t,r=this.trgX,i=this.trgY;return this.guidesTarget.forEach((function(n){n.x&&e.trgX||n.y&&e.trgY||(n.active=0,e.guidesStatic.forEach((function(o){if(!(n.y&&o.x||n.x&&o.y)){var a=n.y&&o.y,s=a?'y':'x',l=n[s],u=o[s],d=t[s],h=a?i:r;if(e.isPointIn(l,u)&&Object(c["isUndefined"])(h)){var f=d-(l-u);e.setGuideLock(n,f)}}})))})),r=this.trgX,i=this.trgY,['x','y'].forEach((function(r){var i=r.toUpperCase(),o=e["trg".concat(i)];o&&!e.isPointIn(t[r],o.lock)&&(e.setGuideLock(o,null),o=null),o&&!Object(c["isUndefined"])(o.lock)&&(n[r]=o.lock)})),{newDelta:n,trgX:this.trgX,trgY:this.trgY}}},{key:"isPointIn",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.offset,i=r||this.opts.snapOffset;return t>=e&&t<=e+i||t<=e&&t>=e-i}},{key:"setGuideLock",value:function(t,e){var n=Object(c["isUndefined"])(t.x)?'Y':'X',r="trg".concat(n);return null!==e?(t.active=1,t.lock=e,this[r]=t):(delete t.active,delete t.lock,delete this[r]),t}},{key:"stop",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.delta,r=e.cancel,i=r?0:n.x,o=r?0:n.y;this.toggleDrag(),this.lockedAxis=null,this.move(i,o,1);var a=this.opts.onEnd;Object(c["isFunction"])(a)&&a(t,this,{cancelled:r})}},{key:"keyHandle",value:function(t){Object(u["n"])(t)&&this.stop(t,{cancel:1})}},{key:"move",value:function(t,e,n){var r=this.el,i=this.opts,o=this.startPosition;if(o){var a=i.setPosition,s=o.x+t,l=o.y+e;this.position={x:s,y:l,end:n},Object(c["isFunction"])(a)&&a(this.position),r&&(r.style.left="".concat(s,"px"),r.style.top="".concat(l,"px"))}}},{key:"getContainerEl",value:function(){var t=this.opts.container;return t?[t]:this.getDocumentEl()}},{key:"getWindowEl",value:function(){return this.getContainerEl().map((function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow}))}},{key:"getDocumentEl",value:function(t){var e=this.opts.doc;if(t=t||this.el,!this.docs){var n=[document];t&&n.push(t.ownerDocument),e&&n.push(e),this.docs=n}return this.docs}},{key:"getPointerPos",value:function(t){var e=this.opts.getPointerPosition,n=Object(u["h"])(t);return e?e(t):{x:n.clientX,y:n.clientY}}},{key:"getStartPosition",value:function(){var t=this.el,e=this.opts.getPosition,n={x:0,y:0};return Object(c["isFunction"])(e)?n=e():t&&(n={x:parseFloat(t.style.left),y:parseFloat(t.style.top)}),n}},{key:"getScrollInfo",value:function(){var t=this.opts.doc,e=t&&t.body;return{y:e?e.scrollTop:0,x:e?e.scrollLeft:0}}},{key:"detectAxisLock",value:function(t,e){var n=t,r=e,i=Math.abs(n),o=Math.abs(r);return r>=i||r<=-i?'x':n>o||n<-o?'y':void 0}}]),t}()},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=i.a.$;e["a"]=i.a.View.extend({events:{change:'handleChange'},template:function(){return"<span class=\"".concat(this.holderClass(),"\"></span>")},inputClass:function(){return"".concat(this.ppfx,"field")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||'';this.opts=t,this.ppfx=e,this.em=t.target||{},this.listenTo(this.model,'change:value',this.handleModelChange)},elementUpdated:function(){this.model.trigger('el:change')},setValue:function(t){var e=this.model,n=t||e.get('defaults'),r=this.getInputEl();r&&(r.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},handleChange:function(t){t.stopPropagation();var e=this.getInputEl().value;this.model.set({value:e},{fromInput:1}),this.elementUpdated()},getInputEl:function(){if(!this.inputEl){var t=this.model,e=this.opts.type||'text',n=t.get('placeholder')||t.get('defaults')||t.get('default')||'';this.inputEl=o("<input type=\"".concat(e,"\" placeholder=\"").concat(n,"\">"))}return this.inputEl.get(0)},render:function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this}})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=n(9);e["default"]=i.a.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||'',this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{},this.properties=[];var e=this.collection;this.listenTo(e,'add',this.addTo),this.listenTo(e,'reset',this.render)},addTo:function(t,e,n){this.add(t,null,n)},add:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e||this.el,i=new t.typeView({model:t,name:t.get('name'),id:this.pfx+t.get('property'),target:this.target,propTarget:this.propTarget,onChange:this.onChange,onInputRender:this.onInputRender,config:this.config});'composite'!=t.get('type')&&(i.customValue=this.customValue),i.render();var a=i.el;this.properties.push(i),i.updateVisibility(),Object(o["b"])(r,a,n.at)},render:function(){var t=this,e=this.$el;this.clearItems();var n=document.createDocumentFragment();return this.collection.each((function(e){return t.add(e,n)})),e.empty(),e.append(n),e.attr('class',"".concat(this.pfx,"properties")),this},remove:function(){i.a.View.prototype.remove.apply(this,arguments),this.clearItems()},clearItems:function(){this.properties.forEach((function(t){return t.remove()})),this.properties=[]}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n.n(i);e["a"]=o.a.View.extend({itemView:'',itemsView:'',itemType:'type',autoAdd:0,initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;this.config=e||t.config||{},this.autoAdd&&this.listenTo(this.collection,'add',this.addTo),this.items=[],this.init()},init:function(){},addTo:function(t){this.add(t)},itemViewNotFound:function(t){var e=this.config,n=this.ns,r=e.em,i="".concat(n?"[".concat(n,"]: "):'',"'").concat(t,"' type not found");r&&r.logWarning(i)},add:function(t,e){var n,i=this.config,o=this.reuseView,a=this.items,s=this.itemsView,l=void 0===s?{}:s,c=e||null,u=this.itemView,d=t.get(this.itemType);l[d]?u=l[d]:!d||l[d]||Object(r["includes"])(['button','checkbox','color','date','datetime-local','email','file','hidden','image','month','number','password','radio','range','reset','search','submit','tel','text','time','url','week'],d)||this.itemViewNotFound(d),n=t.view&&o?t.view:new u({model:t,config:i},i),a&&a.push(n);var h=n.render().el;c?c.appendChild(h):this.$el.append(h)},render:function(){var t=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each((function(e){this.add(e,t)}),this),this.$el.append(t),this.onRender(),this},onRender:function(){},remove:function(){this.clearItems(),o.a.View.prototype.remove.apply(this,arguments)},clearItems:function(){this.items}})},function(t,e,n){"use strict";var r,i=n(8),o=n.n(i),a=n(2),s=n.n(a),l=n(1),c=n.n(l),u=n(0);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){s()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e||[];return r.forEach((function(e){n.push(e.getId()),t(e.components(),n)})),n},p=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.map((function(e){n.push(e.getId()),t(e.components(),n)})),n};e["a"]=c.a.Collection.extend({initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.opt=e,this.listenTo(this,'add',this.onAdd),this.listenTo(this,'remove',this.removeChildren),this.listenTo(this,'reset',this.resetChildren),this.config=e.config,this.em=e.em,this.domc=e.domc},resetChildren:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this,i=n.previousModels||[],o=i.filter((function(e){return!t.get(e.cid)})),a=p(t);n.keepIds=f(i).filter((function(t){return a.indexOf(t)>=0})),o.forEach((function(t){return e.removeChildren(t,r,n)})),t.each((function(t){return e.onAdd(t)}))},removeChildren:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var i=this.domc,o=this.em,a=i?i.allById():{},s=r.temporary;if(t.prevColl=this,!s){var l=t.getId(),c=o.get('SelectorManager').getAll(),u=o.get('CssComposer').getAll(),d=(r.keepIds||[]).indexOf(l)<0;delete a[l];var h=d?u.remove(u.filter((function(t){return t.getSelectors().getFullString()==="#".concat(l)})),r):[];if(c.remove(h.map((function(t){return t.getSelectors().at(0)}))),!t.opt.temporary){var f=o.get('Commands'),p=t.get('style-signature'),g={target:t};p&&f.run('core:component-style-clear',g),t.removed(),t.trigger('removed'),o.trigger('component:remove',t)}var v=t.components();v.forEach((function(t){return n.removeChildren(t,e,r)}))}var m=t.components(),b=o.get('UndoManager');o.stopListening(m),o.stopListening(t),o.stopListening(t.get('classes')),b.remove(t),b.remove(m)}},model:function(t,e){var n,r=e.collection.opt,i=r.em,o=i.get('DomComponents').componentTypes;e.em=i,e.config=r.config,e.componentTypes=o,e.domc=r.domc;for(var a=0;a<o.length;a++){if(o[a].id==t.type){n=o[a].model;break}}return n||(n=o[o.length-1].model,i&&t.type&&i.logWarning("Component type '".concat(t.type,"' not found"),{attrs:t,options:e})),new n(t,e)},parseString:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.em,o=this.opt.domc,a=i.get('CssComposer'),s=i.get('Parser').parseHtml(t);return r||(r=n(5).default),r.checkId(s.html,s.css,o.componentsById,e),s.css&&a&&!e.temporary&&a.addCollection(s.css,h(h({},e),{},{extend:1})),s.html},add:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.keepIds=f(n.previousModels),Object(u["isString"])(t)?t=this.parseString(t,n):Object(u["isArray"])(t)&&t.forEach((function(r,i){if(Object(u["isString"])(r)){var o=e.parseString(r,n);t[i]=Object(u["isArray"])(o)&&!o.length?null:o}}));var r=Object(u["isArray"])(t);t=(r?t:[t]).filter((function(t){return t})).map((function(t){return e.processDef(t)})),t=r?Object(u["flatten"])(t,1):t[0];var i=c.a.Collection.prototype.add.apply(this,[t,n]);return this.__firstAdd=i,i},processDef:function(t){if(t.cid&&t.ccid)return t;var e=this.em,n=this.config,r=(void 0===n?{}:n).processor,i=t;if(r){var a=r(i=h({},i));a&&(Object(u["each"])(i,(function(t,e){return delete i[e]})),Object(u["extend"])(i,a))}if(i.$$typeof&&'object'==o()(i.props)){(i=h({},i)).props=h({},i.props);var s=e.get('DomComponents'),l=e.get('Parser').parserHtml;Object(u["each"])(i,(function(t,e){Object(u["includes"])(['props','type'],e)||delete i[e]}));var c=i.props,d=c.children;delete c.children,delete i.props;var f=l.splitPropsFromAttr(c);i.attributes=f.attrs,d&&(i.components=d),i.type?s.getType(i.type)||(i.tagName=i.type,delete i.type):i.type='textnode',Object(u["extend"])(i,f.props)}return i},onAdd:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.domc,i=this.em,o=t.getStyle(),a=i&&i.getConfig('avoidInlineStyle');if(r&&r.Component.ensureInList(t),!Object(u["isEmpty"])(o)&&!a&&i&&i.get&&i.getConfig('forceClass')&&!n.temporary){var s=t.cid;i.get('CssComposer').setClassRule(s,o);t.setStyle({}),t.addClass(s)}this.__onAddEnd()},__onAddEnd:Object(u["debounce"])((function(){var t=this.domc,e=t&&t.allById()||{},n=this.__firstAdd,r=Object(u["isArray"])(n)?n:[n],i={silent:!0};!function t(n){n.forEach((function(n){var r=n.get('__symbol'),o=n.get('__symbolOf');r&&Object(u["isArray"])(r)&&Object(u["isString"])(r[0])&&n.set('__symbol',r.map((function(t){return e[t]})).filter((function(t){return t})),i),Object(u["isString"])(o)&&n.set('__symbolOf',e[o],i),t(n.components())}))}(r)}))})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r);i.a.$;e["default"]=i.a.View.extend({initialize:function(t){this.config=t||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+'hover',this.badgeClass=this.pfx+'badge',this.plhClass=this.pfx+'placeholder',this.freezClass=this.ppfx+'freezed',this.canvas=this.em.get&&this.em.get('Canvas'),this.em.get&&this.setElement(this.getCanvas()),this.canvas&&(this.$canvas=this.$el,this.canvasTool=this.getCanvasTools()),this.init(this.config)},onFrameScroll:function(t){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasWrapper:function(){return this.canvas.getWrapperEl()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},init:function(t){},callRun:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;if(t.trigger("run:".concat(n,":before"),e),!e||!e.abort){var r=e.sender||t,i=this.run(t,r,e);return t.trigger("run:".concat(n),i,e),t.trigger('run',n,i,e),i}t.trigger("abort:".concat(n),e)},callStop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id,r=e.sender||t;t.trigger("stop:".concat(n,":before"),e);var i=this.stop(t,r,e);return t.trigger("stop:".concat(n),i,e),t.trigger('stop',n,i,e),i},stopCommand:function(){this.em.get('Commands').stop(this.id)},run:function(t,e){},stop:function(t,e){}})},function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(0),a=n(3),s=n(29);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var u=Object(s["a"])().parseStyle;e["a"]={parseStyle:u,extendStyle:function(t){return c(c({},this.getStyle()),t)},getStyle:function(){return c({},this.get('style')||{})},setStyle:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(o["isString"])(e)&&(e=u(e));var r=this.getStyle(),i=c({},e);this.set('style',i,n);var s=Object(a["x"])(r,i);return Object(o["keys"])(s).forEach((function(e){var n=t.em;t.trigger("change:style:".concat(e)),n&&(n.trigger("styleable:change",t,e),n.trigger("styleable:change:".concat(e),t,e))})),i},addStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};'string'==typeof t?t={prop:e}:n=e||{},t=this.extendStyle(t),this.setStyle(t,n)},removeStyle:function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},styleToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.getStyle();for(var r in n){var i=t.important,a=Object(o["isArray"])(i)?i.indexOf(r)>=0:i,s="".concat(n[r]).concat(a?' !important':''),l='__'==r.substr(0,2);s&&!l&&e.push("".concat(r,":").concat(s,";"))}return e.join('')},getSelectors:function(){return this.get('selectors')||this.get('classes')},getSelectorsString:function(){return this.selectorsToString?this.selectorsToString():this.getSelectors().getFullString()}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(30),l=n(0),c=n(3);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var h=a.a.Model.extend({defaults:{name:'',property:'',type:'',defaults:'',info:'',value:'',icon:'',functionName:'',status:'',visible:!0,fixedValues:['initial','inherit'],full:0,important:0,toRequire:0,requires:null,requiresParent:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get('id')||'',r=this.get('name')||'';!this.get('property')&&this.set('property',(r||n).replace(/ /g,'-'));var i=this.get('property');!this.get('id')&&this.set('id',i),!r&&this.set('name',Object(c["c"])(i).replace(/-/g,' ')),h.callInit(this,t,e)},init:function(){},clearValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,status:''},t),this},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseValue(t),i=!e;!i&&this.set({value:void 0},{avoidStore:i,silent:!0}),this.set(r,d({avoidStore:i},n))},setValueFromInput:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setValue(t,e,d(d({},n),{},{fromInput:1}))},parseValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={value:t},r='!important';if(Object(l["isString"])(t)&&-1!==t.indexOf(r)&&(n.value=t.replace(r,'').trim(),n.important=1),!this.get('functionName')&&!e.complete)return n;var i=[],o="".concat(n.value),a=o.indexOf('(')+1,s=o.lastIndexOf(')'),c=o.substring(0,a-1);if(c&&(n.functionName=c),i.push(a),s>=0&&i.push(s),n.value=String.prototype.substring.apply(o,i),e.numeric){var u=parseFloat(n.value);n.unit=n.value.replace(u,''),n.value=u}return n},splitValues:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:',',n=[],r='(',i=')',o='',a=0;return(t||'').split('').forEach((function(t){t==r?(a++,o+=r):t==i&&a>0?(a--,o+=i):t===e&&0==a?(n.push(o),o=''):o+=t})),''!==o&&n.push(o),n.map((function(t){return t.trim()}))},getDefaultValue:function(){return this.get('defaults')},getFullValue:function(t){var e=this.get('functionName'),n=this.getDefaultValue(),r=Object(l["isUndefined"])(t)?this.get('value'):t,i=!Object(l["isUndefined"])(r)&&''!==r;if(r&&n&&r===n)return n;if(e&&i){var o='url'===e?"'".concat(r.replace(/'/g,''),"'"):r;r="".concat(e,"(").concat(o,")")}return i&&this.get('important')&&(r="".concat(r," !important")),r||''}},{callParentInit:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t.prototype.initialize.apply(e,[n,d(d({},r),{},{skipInit:1})])},callInit:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.skipInit&&t.init(e,n)}}),f=h;function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var v=f.extend({defaults:g(g({},f.prototype.defaults),{},{detached:0,properties:[],separator:' '}),initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.callParentInit(f,this,t,e);var r=this.get('properties')||[],i=n(24).default;this.set('properties',new i(r)),this.listenTo(this,'change:value',this.updateValues),f.callInit(this,t,e)},clearValue:function(){return this.get('properties').each((function(t){return t.clearValue()})),f.prototype.clearValue.apply(this,arguments)},updateValues:function(){var t=this.getFullValue().split(this.getSplitSeparator());this.get('properties').each((function(e,n){var r=t.length;t[n]||t[n%r+(1!=r&&r%2?1:0)]}))},getSplitSeparator:function(){return new RegExp("".concat(this.get('separator'),"(?![^\\(]*\\))"))},getDefaultValue:function(t){var e=this.get('defaults');return e&&!t?e:(e='',this.get('properties').each((function(t,n){return e+="".concat(t.getDefaultValue()," ")})),e.trim())},getFullValue:function(){return this.get('detached')?'':this.get('properties').getFullValue()},getPropertyAt:function(t){return this.get('properties').at(t)}}),m=a.a.Model.extend({defaults:{index:'',value:'',values:{},active:!1,preview:!1,properties:[]},initialize:function(){var t=this.get('properties'),e=this.get('value');this.set('properties',t instanceof bt?t:new bt(t));var n=this.get('properties');if(n.forEach(this.onPropAdd,this),this.listenTo(n,'add',this.onPropAdd),!e){var r='',i=this.get('values');for(var o in i)r+=' '+i[o];this.set('value',r.trim())}},onPropAdd:function(t){var e=this.collection;t.parent=e&&e.property},getPropertyAt:function(t){return this.get('properties').at(t)},getPropertyValue:function(t){var e='';return this.get('properties').each((function(n){n.get('property')==t&&(e=n.getFullValue())})),e},getFullValue:function(){var t=[];return this.get('properties').each((function(e){return t.push(e.getFullValue())})),t.join(' ').trim()}});function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var w=a.a.Collection.extend({model:m,initialize:function(){this.idx=1,this.on('add',this.onAdd),this.on('reset',this.onReset)},onAdd:function(t,e,n){n.noIncrement||t.set('index',this.idx++),n.active&&this.active(this.indexOf(t))},onReset:function(){this.idx=1},getSeparator:function(){var t=this.property;return t?t.get('layerSeparator'):', '},getLayersFromValue:function(t){var e=this,n=[];return t.replace(/\(([\w\s,.]*)\)/g,(function(e){var n=e.replace(/,\s*/g,',');t=t.replace(e,n)})),(t?t.split(this.getSeparator()):[]).forEach((function(t){n.push({properties:e.properties.parseValue(t)})})),n},getLayersFromStyle:function(t){var e=[],n=this.properties;return n.each((function(n){var r=t[n.get('property')];(r?r.split(', '):[]).forEach((function(t,r){t=n.parseValue(t.trim()).value;var i=e[r],o=y(y({},n.attributes),{value:t});i?i.properties.push(o):e[r]={properties:[o]}}))})),e.forEach((function(t){var e=t.properties.map((function(t){return t.property}));n.each((function(n){var r=n.get('property');e.indexOf(r)<0&&t.properties.push(y({},n.attributes))}))})),e},active:function(t){this.each((function(t){return t.set('active',0)}));var e=this.at(t);e&&e.set('active',1)},getFullValue:function(){var t=[];return this.each((function(e){return t.push(e.getFullValue())})),t.join(this.getSeparator())},getPropertyValues:function(t,e){var n=[];return this.each((function(r){var i=r.getPropertyValue(t);i?n.push(i):!Object(l["isUndefined"])(e)&&n.push(e)})),n.join(', ')}});function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var C=v.extend({defaults:O(O({},v.prototype.defaults),{},{layers:[],layerSeparator:', ',prepend:0,preview:0}),initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v.callParentInit(v,this,t,e);var n=this.get('layers'),r=new w(n);r.property=this,r.properties=this.get('properties'),this.set('layers',r),v.callInit(this,t,e)},getLayers:function(){return this.get('layers')},getCurrentLayer:function(){return this.getLayers().filter((function(t){return t.get('active')}))[0]},getFullValue:function(){return this.get('detached')?'':this.get('layers').getFullValue()},getValueFromStyle:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getLayers().getLayersFromStyle(t);return new w(e).getFullValue()},clearValue:function(){return this.getLayers().reset(),v.prototype.clearValue.apply(this,arguments)},getValueFromTarget:function(t){var e=this.attributes,n=e.detached,r=e.property,i=e.properties,o=t.getStyle(),a={};return i.forEach((function(t){var e=t.get('property'),n=o[e];n&&(a[e]=n)})),n?Object(l["keys"])(a).length?a:'':o[r]},getLayersFromTarget:function(t){}}),S=n(25),k=n.n(S);function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function T(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var P='data-clear-style',E=a.a.View.extend({template:function(){var t=this.pfx,e=this.ppfx;return"\n <div class=\"".concat(t,"label\" data-sm-label></div>\n <div class=\"").concat(e,"fields\" data-sm-fields></div>\n ")},templateLabel:function(t){var e=this.pfx,n=this.em,r=t.parent,i=t.attributes,o=i.icon,a=void 0===o?'':o,s=i.info,l=void 0===s?'':s,c=i.id,u=i.name,d=n&&n.t("styleManager.properties.".concat(c))||u;return"\n <span class=\"".concat(e,"icon ").concat(a,"\" title=\"").concat(l,"\">\n ").concat(d,"\n </span>\n ").concat(r?'':"<b class=\"".concat(e,"clear\" ").concat(P,">⨯</b>"),"\n ")},templateInput:function(t){return"\n <div class=\"".concat(this.ppfx,"field\">\n <input placeholder=\"").concat(t.getDefaultValue(),"\"/>\n </div>\n ")},events:i()({change:'inputValueChanged'},"click [".concat(P,"]"),'clear'),initialize:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(l["bindAll"])(this,'targetUpdated','__change','__updateStyle'),this.config=e.config||{};var n=this.config.em;this.em=n,this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.target=e.target||{},this.propTarget=e.propTarget||{},this.onChange=e.onChange,this.onInputRender=e.onInputRender||{},this.customValue=e.customValue||{};var r=this.model;this.property=r.get('property'),this.input=null;var i=this.pfx;if(this.inputHolderId='#'+i+'input-holder',this.sector=r.collection&&r.collection.sector,this.__destroyFn=this.destroy?this.destroy.bind(this):function(){},r.view=this,r.get('value')||r.set('value',r.getDefaultValue()),n){this.listenTo(n,"update:component:style:".concat(this.property),this.targetUpdated);var o=r.get('requires')||{};Object.keys(o).forEach((function(e){t.listenTo(n,"component:styleUpdate:".concat(e),t.targetUpdated)}))}this.listenTo(this.propTarget,'update',this.targetUpdated),this.listenTo(r,'destroy remove',this.remove),this.listenTo(r,'change:value',this.modelValueChanged),this.listenTo(r,'targetUpdated',this.targetUpdated),this.listenTo(r,'change:visible',this.updateVisibility),this.listenTo(r,'change:status',this.updateStatus),this.listenTo(r,'change:name change:className change:full',this.render);var a=this.init&&this.init.bind(this);a&&a()},remove:function(){var t=this;a.a.View.prototype.remove.apply(this,arguments),['em','target','input','$input','propTarget','sector'].forEach((function(e){return t[e]={}})),this.__destroyFn(this._getClbOpts())},updateStatus:function(){var t=this.model,e=t.get('status'),n=t.parent,r=this.pfx,i=this.ppfx,o=this.config,a="".concat(i,"four-color"),s="".concat(i,"color-warn"),l=this.$el.children(".".concat(r,"label")),c=this.getClearEl(),u=c?c.style:{};switch(l.removeClass("".concat(a," ").concat(s)),u.display='none',e){case'updated':!n&&l.addClass(a),o.clearProperties&&(u.display='inline');break;case'computed':l.addClass(s)}},clear:function(t){var e=this;t&&t.stopPropagation(),this.model.clearValue(),setTimeout((function(){return e.targetUpdated()}))},getClearEl:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(P,"]"))),this.clearEl},getTarget:function(){return this.getTargetModel()},getTargets:function(){return this.propTarget.targets||[this.getTarget()]},getFirstTarget:function(){return this.getTargets()[0]},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(t){t&&t.stopPropagation(),this.emit||(this.model.setValueFromInput(this.getInputValue()),this.elementUpdated())},elementUpdated:function(){this.setStatus('updated')},setStatus:function(t){this.model.set('status',t);var e=this.model.parent;e&&'updated'==t&&e.set('status',t)},emitUpdateTarget:Object(l["debounce"])((function(){var t=this.config.em;t&&t.trigger('styleManager:update:target',this.getFirstTarget())})),_getTargetData:function(){var t=this.model,e=this.config,n=this.getTargetValue({ignoreDefault:1}),r=t.getDefaultValue(),i=this.getComputedValue(),o='',a='';return n?(o=n,e.highlightChanged&&(a='updated')):i&&e.showComputed&&i!=r?(o=i,e.highlightComputed&&(a='computed')):(o=r,a=''),{value:o,status:a,targetValue:n,defaultValue:r,computedValue:i}},targetUpdated:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.config.fromLayer&&(this.emitUpdateTarget(),this.checkVisibility())){var r=this.config,i=r.em,o=this.model,a=o.get('property'),s=this._getTargetData(),l=s.status,c=s.value,u=k()(s,["status","value"]),d=T({status:l,value:c},u);return this.setStatus(l),o.setValue(c,0,T({fromTarget:1},n)),i&&(i.trigger('styleManager:change',this,a,c,d),i.trigger("styleManager:change:".concat(a),this,c,d),this._emitUpdate(d)),d}},_emitUpdate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=this.model;if(e){var r=n.get('property'),i=T(T({},this._getEventData()),t),o=i.id;e.trigger('style:update',i),e.trigger("style:update:".concat(r),i),r!==o&&e.trigger("style:update:".concat(o),i)}},_getEventData:function(){var t=this.model;return{propertyView:this,targets:this.getTargets(),value:t.getFullValue(),property:t,id:t.get('id'),name:t.get('property')}},checkVisibility:function(){var t=1;return this.config.hideNotStylable&&(this.isTargetStylable()&&this.isComponentStylable()?this.show():(this.hide(),t=0),this.sector&&this.sector.trigger('updateVisibility')),t},getTargetValue:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.model,r=this.getFirstTarget(),i=this.customValue;if(!r)return t;if((t=r.getStyle()[n.get('property')])||e.ignoreDefault||(t=n.getDefaultValue()),'function'==typeof i&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),a=i(this,o,t);a&&(t=a)}return t},getComputedValue:function(){var t=this.propTarget,e=t.computed||{},n=t.computedDefault||{},r=this.config.avoidComputed||[],i=this.model.get('property'),o=r.indexOf(i)<0,a=e[i],s=n[Object(c["b"])(i)];return e&&o&&s!==a&&a||''},getInputValue:function(){var t=this.getInputEl();return t?t.value:''},modelValueChanged:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.model,a=o.getFullValue();if(r.fromInput||this.setValue(a),!r.fromTarget){this.getTargets().forEach((function(t){return n.__updateTarget(t,r)}));var s=this.config.em;if(!s)return;var l=o.get('property'),c=i()({},l,a);s.getSelectedAll().forEach((function(t){!r.noEmit&&s.trigger('component:update',t,c,r),s.trigger('component:styleUpdate',t,l,r),s.trigger("component:styleUpdate:".concat(l),t,a,r),t.trigger("change:style",t,c,r),t.trigger("change:style:".concat(l),t,a,r)}))}},__updateTarget:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,r=n.getFullValue(),i=this.onChange;t&&this.isComponentStylable()&&(e.fromTarget||(i&&!e.fromParent?i(t,this,e):this.updateTargetStyle(r,null,T(T({},e),{},{target:t}))),this._emitUpdate())},updateTargetStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e||this.model.get('property'),i=n.target||this.getFirstTarget(),o=i.getStyle();t?o[r]=t:delete o[r],n.avoidStore?o.__=1:delete o.__,i.setStyle(o,n);var a=this.getHelperModel();a&&a.setStyle(o,n)},isTargetStylable:function(t){var e=t||this.getFirstTarget(),n=this.model,r=n.get('id'),i=n.get('property'),o=n.get('toRequire'),a=e.get('unstylable'),s=e.get('stylable-require'),c=n.get('requires'),u=n.get('requiresParent'),d=this.sector?this.sector.collection:null,h=this.em?this.em.getSelected():null,f=e.get('stylable');if(Object(l["isArray"])(f)&&(f=f.indexOf(i)>=0),Object(l["isArray"])(a)&&(f=a.indexOf(i)<0),o&&(f=!t||s&&(s.indexOf(r)>=0||s.indexOf(i)>=0)),d&&c){var p=Object.keys(c);d.each((function(t){t.get('properties').each((function(t){if(Object(l["includes"])(p,t.id)){var e=c[t.id];f=f&&Object(l["includes"])(e,t.get('value'))}}))}))}if(u){var g=h&&h.parent(),v=g&&g.getEl();if(v){var m=window.getComputedStyle(v);Object(l["each"])(u,(function(t,e){f=f&&m[e]&&Object(l["includes"])(t,m[e])}))}else f=!1}return f},isComponentStylable:function(){var t=this.em,e=t&&t.getSelected();return!e||this.isTargetStylable(e)},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=this.model,n=Object(l["isUndefined"])(t)?e.getDefaultValue():t;if(this.update)return this.__update(n);var r=this.getInputEl();r&&(r.value=n)},getInputEl:function(){return this.input||(this.input=this.el.querySelector('input')),this.input},updateVisibility:function(){this.el.style.display=this.model.get('visible')?'':'none'},show:function(){this.model.set('visible',1)},hide:function(){this.model.set('visible',0)},cleanValue:function(){this.setValue('')},clearCached:function(){this.clearEl=null,this.input=null,this.$input=null},__update:function(t){var e=this.update&&this.update.bind(this);e&&e(T(T({},this._getClbOpts()),{},{value:t}))},__change:function(){for(var t=this.emit&&this.emit.bind(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t&&t.apply(void 0,[this._getClbOpts()].concat(n))},__updateStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.complete,r=k()(e,["complete"]),i=!1!==n;Object(c["o"])(t)?this.getTargets().forEach((function(e){return e.addStyle(t,{avoidStore:!i})})):this.model.setValueFromInput(t,n,r),i&&this.elementUpdated()},_getClbOpts:function(){var t=this.model;return{el:this.el,props:t.attributes,setProps:function(){return t.set.apply(t,arguments)},change:this.__change,updateStyle:this.__updateStyle,targets:this.getTargets()}},render:function(){this.clearCached();var t=this.pfx,e=this.model,n=this.el,r=this.$el,i=e.get('property'),o=e.get('full'),a=e.get('className')||'',s="".concat(t,"property");this.createdEl&&this.__destroyFn(this._getClbOpts()),r.empty().append(this.template(e)),r.find('[data-sm-label]').append(this.templateLabel(e));var l=this.create&&this.create.bind(this);this.createdEl=l&&l(this._getClbOpts()),r.find('[data-sm-fields]').append(this.createdEl||this.templateInput(e)),n.className="".concat(s," ").concat(t).concat(e.get('type')," ").concat(s,"__").concat(i," ").concat(a).trim(),n.className+=o?" ".concat(s,"--full"):'',this.updateStatus();var c=this.onRender&&this.onRender.bind(this);c&&c(),this.setValue(e.get('value'),{fromTarget:1})}});function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function D(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var A=a.a.$,L=E.extend({templateInput:function(){var t=this.pfx;return"\n <div class=\"".concat(t,"field ").concat(t,"composite\">\n <span id=\"").concat(t,"input-holder\"></span>\n </div>\n ")},inputValueChanged:function(){if(!this.model.get('detached')){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];E.prototype.inputValueChanged.apply(this,e)}},clear:function(t){var e=this.properties;e&&e.forEach((function(t){return t.clear()})),E.prototype.clear.apply(this,arguments)},remove:function(){var t=this;this.model.get('properties').reset(),E.prototype.remove.apply(this,arguments),['properties','props','$props'].forEach((function(e){return t[e]={}}))},onRender:function(){var t=this.model,e=t.get('properties')||[];if(this.properties=[],e.length&&(this.$input||(this.$input=A('<input type="hidden" value="0">'),this.input=this.$input.get(0)),this.props||(this.props=t.get('properties')),!this.$props)){this.props.each((function(e,n){e&&'composite'==e.get('type')&&(this.props.remove(e),console.warn('Nested composite types not yet allowed.')),e.parent=t}),this);var r=new(0,n(19).default)(this.getPropsConfig());this.$props=r.render().$el,this.properties=r.properties,this.$el.find("#".concat(this.pfx,"input-holder")).append(this.$props)}},getPropsConfig:function(t){var e=this,n=this.model,r={config:D(D({},this.config),{},{highlightComputed:0}),collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(t,e,r){n.set('value',n.getFullValue(),r)},customValue:function(t,n){return e.valueOnIndex(n,t)}};return n.get('detached')&&delete r.onChange,r},valueOnIndex:function(t,e){var n,r=this.getTargetValue({ignoreDefault:1});r?n=r.split(this.model.getSplitSeparator())[t]:n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return n},clearCached:function(){E.prototype.clearCached.apply(this,arguments),this.$input=null,this.props=null,this.$props=null}}),_=n(19);function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function I(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var F=a.a.View.extend({events:{click:'active','click [data-close-layer]':'removeItem','mousedown [data-move-layer]':'initSorter','touchstart [data-move-layer]':'initSorter'},template:function(t){var e=this.pfx,n=this.ppfx,r=this.em,i="".concat(r&&r.t('styleManager.layer')," ").concat(t.get('index'));return"\n <div id=\"".concat(e,"move\" class=\"").concat(n,"no-touch-actions\" data-move-layer>\n <i class=\"fa fa-arrows\"></i>\n </div>\n <div id=\"").concat(e,"label\">").concat(i,"</div>\n <div id=\"").concat(e,"preview-box\">\n \t<div id=\"").concat(e,"preview\" data-preview></div>\n </div>\n <div id=\"").concat(e,"close-layer\" class=\"").concat(e,"btn-close\" data-close-layer>\n ⨯\n </div>\n <div id=\"").concat(e,"inputs\" data-properties></div>\n <div style=\"clear:both\"></div>\n ")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;this.stackModel=t.stackModel,this.config=t.config||{},this.em=this.config.em,this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.sorter=t.sorter||null,this.propsConfig=t.propsConfig||{},this.customPreview=t.onPreview,this.listenTo(e,'destroy remove',this.remove),this.listenTo(e,'change:active',this.updateVisibility),this.listenTo(e.get('properties'),'change',this.updatePreview),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data('model',e)},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},removeItem:function(t){t&&t.stopPropagation(),this.remove()},remove:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.props,r=e.collection,i=this.stackModel;a.a.View.prototype.remove.apply(this,arguments),r&&r.contains(e)&&r.remove(e),i&&i.set&&(i.set({stackIndex:null},{silent:!0}),!t.fromTarget&&i.trigger('updateValue')),n&&n.remove()},onPreview:function(t){var e=this.stackModel,n=e&&e.get('detached'),r=t.split(' '),i=3,o=[],a={};return this.model.get('properties').each((function(t,e){var s=t.get('property'),l=n?t.getFullValue():r[e]||'';if(l&&'integer'==t.get('type')){var c=parseInt(l,10),u=l.replace(c,'');l=(c=(c=(c=isNaN(c)?0:c)>i?i:c)<-i?-i:c)+u}o.push(l),a[s]=l})),n?a:o.join(' ')},updatePreview:function(){var t=this.stackModel,e=this.customPreview,n=this.getPreviewEl(),r=this.model.getFullValue(),i=e?e(r):this.onPreview(r);if(i&&t&&n){var o=n.style;if(Object(l["isString"])(i))o[t.get('property')]=i;else{var a=[];Object(l["each"])(i,(function(t,e){return a.push("".concat(e,":").concat(t))})),n.setAttribute('style',a.join(';'))}}},getPropertiesWrapper:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector('[data-properties]')),this.propsWrapEl},getPreviewEl:function(){return this.previewEl||(this.previewEl=this.el.querySelector('[data-preview]')),this.previewEl},active:function(){var t=this.model,e=t.collection;e.active(e.indexOf(t))},updateVisibility:function(){var t=this.pfx,e=this.getPropertiesWrapper(),n=this.model.get('active');e.style.display=n?'':'none',this.$el[n?'addClass':'removeClass']("".concat(t,"active"))},render:function(){var t=this.propsConfig,e=this.model,n=this.el,r=this.pfx,i=e.get('preview'),o=new _["default"]({collection:e.get('properties'),config:I(I({},this.config),{},{fromLayer:1}),target:t.target,customValue:t.customValue,propTarget:t.propTarget,onChange:t.onChange}),a=o.render().el;return n.innerHTML=this.template(e),n.className="".concat(r,"layer").concat(i?'':" ".concat(r,"no-preview")),this.props=o,this.getPropertiesWrapper().appendChild(a),this.updateVisibility(),this.updatePreview(),this}}),V=a.a.View.extend({initialize:function(t){this.config=t.config||{},this.stackModel=t.stackModel,this.preview=t.preview,this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.propsConfig=t.propsConfig;var e=this.pfx,n=this.ppfx,r=this.collection;this.className="".concat(e,"layers ").concat(n,"field"),this.listenTo(r,'add',this.addTo),this.listenTo(r,'deselectAll',this.deselectAll),this.listenTo(r,'reset',this.reset),this.items=[];var i=this.config.em||'',o=i?i.get('Utils'):'';this.sorter=o?new o.Sorter({container:this.el,ignoreViewChildren:1,containerSel:".".concat(e,"layers"),itemSel:".".concat(e,"layer"),pfx:this.config.pStylePrefix}):'',r.view=this,this.$el.data('model',r),this.$el.data('collection',r)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=e||null,i=this.stackModel,o=this.config,a=this.sorter,s=this.propsConfig;void 0!==this.preview&&t.set('preview',this.preview);var l=new F({model:t,config:o,sorter:a,stackModel:i,propsConfig:s}),c=l.render().el;if(this.items.push(l),r)r.appendChild(c);else if(void 0!==n){var u='before';this.$el.children().length==n&&(n--,u='after'),n<0?this.$el.append(c):this.$el.children().eq(n)[u](c)}else this.$el.append(c);return c},deselectAll:function(){this.$el.find('.'+this.pfx+'layer').removeClass(this.pfx+'active')},reset:function(t,e){this.clearItems(e),this.render()},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each((function(e){this.addToCollection(e,t)}),this),this.$el.append(t),this.$el.attr('class',this.className),this.sorter&&(this.sorter.plh=null),this},remove:function(){this.clearItems(),a.a.View.prototype.remove.apply(this,arguments)},clearItems:function(t){this.items.forEach((function(e){return e.remove(t)})),this.items=[]}});function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var z=new(n(31)["a"]),H=L.extend({templateInput:function(){var t=this.pfx;this.ppfx;return"\n <div class=\"".concat(t,"field ").concat(t,"stack\">\n <button type=\"button\" id=\"").concat(t,"add\" data-add-layer>+</button>\n <div data-layers-wrapper></div>\n </div>\n ")},init:function(){var t=this.model;this.pfx;t.set('stackIndex',null),this.events["click [data-add-layer]"]='addLayer',this.listenTo(t,'change:stackIndex',this.indexChanged),this.listenTo(t,'updateValue',this.inputValueChanged),this.delegateEvents();var e=this.getPropsConfig();this.layers=new V({collection:this.getLayers(),stackModel:t,preview:t.get('preview'),config:this.config,propsConfig:e});var r=n(19).default;this.propsView=new r({target:this.target,collection:t.get('properties'),stackModel:t,config:this.config,onChange:e.onChange,propTarget:e.propTarget})},targetUpdated:function(){var t,e=this;if(this.model.get('detached'))t=this._getTargetData(),this.setStatus(t.status),this.checkVisibility();else{for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t=L.prototype.targetUpdated.apply(this,r)}setTimeout((function(){return e.refreshLayers(t)}))},getLayers:function(){return this.model.get('layers')},indexChanged:function(t){var e=this.model;this.getLayers().active(e.get('stackIndex'))},addLayer:function(){var t=this.model,e=this.getLayers(),n=t.get('prepend'),r=t.get('properties').deepClone();r.each((function(t){return t.set('value','')}));var o=e.add({properties:r},function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({active:1},n&&{at:0}));this.inputValueChanged({up:1}),t.set('stackIndex',e.indexOf(o))},inputValueChanged:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model;t.up&&this.elementUpdated(),e.get('detached')?e.get('properties').each((function(t){return t.trigger('change:value')})):e.set('value',this.getLayerValues())},setValue:function(){},getLayerValues:function(){return this.getLayers().getFullValue()},_getClassRule:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.em,n=t.skipAdd,r=void 0===n?1:n,i=e.getSelected(),o=e.get('StyleManager').getModelToStyle(i,{skipAdd:r,useClasses:1});return o!==i&&o},_getParentTarget:function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=this.model,o=i.get('property'),a=n.isValid||function(t){return t.getStyle()[o]},s=r.get('CssComposer').getAll().filter((function(e){return e.selectorsToString()===t.getSelectorsString()})),l=s.reduce((function(t,e){return t[e.getAtRule()]=e,t}),{}),c=z.sortMediaObject(l),u=c.map((function(t){return t.value})),d=u.indexOf(t),h=u.splice(0,d),f=h.length-1;f>-1;f--){var p=h[f];if(a(p)){e=p;break}}return e},refreshLayers:function(){var t,e,n,r,i,o,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=[],c=this.model,u=this.em,d=this.getLayers(),h=c.get('detached'),f=c.get('property'),p=this.getFirstTarget(),g=this.getComputedValue(),v=u.getSelected(),m={fromTarget:1};if(h){e=a.targetValue||{};var b=function(t){var e=c.get('properties').at(0).get('property');return t&&!Object(l["isUndefined"])(t.getStyle()[e])};if(!Object(l["keys"])(e).length&&g&&v){var y={isValid:function(t){return b(t)}};(r=this._getParentTarget(p,y))?e=r.getStyle():(n=this._getClassRule(),r=!(i=b(n)&&n.getStyle())&&this._getParentTarget(this._getClassRule({skipAdd:0}),y),o=b(r)&&r.getStyle(),e=i||o||{})}t=e,s=d.getLayersFromStyle(e)}else{var w=this.getTargetValue({ignoreDefault:1}),x=w;!x&&g&&((r=this._getParentTarget(p))?x=r.getStyle()[f]:(o=(r=!(i=(n=this._getClassRule())&&n.getStyle()[f])&&this._getParentTarget(this._getClassRule({skipAdd:0})))&&r.getStyle()[f],x=i||o||g)),t=x=x==c.getDefaultValue()?'':x,s=d.getLayersFromValue(x)}var O=c.getLayersFromTarget(p,{resultValue:t,layersObj:s})||s;d.reset(null,m),d.add(O,m),c.set({stackIndex:null},{silent:!0})},getTargetValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=e.attributes.detached,r=this.getFirstTarget(),i=L.prototype.getTargetValue.call(this,t);return Object(l["isUndefined"])(i)&&!n?i=e.getValueFromStyle(r.getStyle()):n&&(i=e.getValueFromTarget(r)),i},getPropsConfig:function(){var t=this,e=t.model;return{target:t.target,propTarget:t.propTarget,onChange:function(n,r,o){var a=r.model,s=e.get('status');if(e.get('detached')){var l=a.get('property'),c=a.getDefaultValue(),u=t.getLayers(),d=u.getPropertyValues(l,c);r.updateTargetStyle(d,null,o),'background-image'!=l||o.avoidStore||'computed'!=s||e.get('properties').filter((function(t){return'__'==t.get('property').substr(0,2)})).forEach((function(e){var n=e.get('property'),r=u.getPropertyValues(n,e.getDefaultValue());t.getTargets().forEach((function(t){return t.addStyle(i()({},n,r),o)}))}))}else if('updated'==s){var h=e.getFullValue();e.set('value',h,o),!h&&r.updateTargetStyle(h,null,o)}}}},onRender:function(){var t=this.el,e=this.layers,n=this.propsView,r=t.querySelector('[data-layers-wrapper]');n.render(),r.appendChild(e.render().el)}}),$=a.a.$,U=E.extend({templateInput:function(){var t=this.pfx,e=this.em;return"\n <div class=\"".concat(t,"field ").concat(t,"file\">\n <div id='").concat(t,"input-holder'>\n <div class=\"").concat(t,"btn-c\">\n <button class=\"").concat(t,"btn\" id=\"").concat(t,"images\" type=\"button\">\n ").concat(e.t('styleManager.fileButton'),"\n </button>\n </div>\n <div style=\"clear:both;\"></div>\n </div>\n <div id=\"").concat(t,"preview-box\">\n <div id=\"").concat(t,"preview-file\"></div>\n <div id=\"").concat(t,"close\">⨯</div>\n </div>\n </div>\n ")},init:function(){var t=this.em;this.modal=t.get('Modal'),this.am=t.get('AssetManager'),this.events['click #'+this.pfx+'close']='removeFile',this.events['click #'+this.pfx+'images']='openAssetManager',this.delegateEvents()},onRender:function(){if(!this.$input){var t=this.model.getDefaultValue();this.$input=$("<input placeholder=\"".concat(t,"\">"))}this.$preview||(this.$preview=this.$el.find('#'+this.pfx+'preview-file')),this.$previewBox||(this.$previewBox=this.$el.find('#'+this.pfx+'preview-box')),this.setValue(this.componentValue,0)},clearCached:function(){E.prototype.clearCached.apply(this,arguments),this.$preview=null,this.$previewBox=null},setValue:function(t,e){E.prototype.setValue.apply(this,arguments),this.setPreviewView(t&&t!=this.model.getDefaultValue()),this.setPreview(t)},setPreviewView:function(t){var e=this.$previewBox;e&&e[t?'addClass':'removeClass']("".concat(this.pfx,"show")),e&&e.css({display:t?'block':'none'})},spreadUrl:function(t){this.model.set('value',t),this.setPreviewView(1)},setPreview:function(t){var e=this.$preview;t=t&&t.indexOf('url(')<0?"url(".concat(t,")"):t,e&&e.css('background-image',t)},cleanValue:function(){this.setPreviewView(0),this.model.set({value:''},{silent:!0})},removeFile:function(){this.model.set('value',this.model.getDefaultValue());for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];E.prototype.cleanValue.apply(this,e),this.setPreviewView(0)},openAssetManager:function(t){var e=this,n=this.em,r=this.modal,i=n?n.get('Editor'):'';i&&i.runCommand('open-assets',{types:['image'],accept:'image/*',target:this.getTargetModel(),onClick:function(){},onDblClick:function(){},onSelect:function(t){r.close();var n=Object(l["isString"])(t)?t:t.get('src');e.spreadUrl(n)}})}}),B=a.a.$,W=E.extend({templateInput:function(){return''},init:function(){var t=this.model;this.listenTo(t,'change:unit',this.modelValueChanged),this.listenTo(t,'el:change',this.elementUpdated),this.listenTo(t,'change:units',this.render)},setValue:function(t){var e=this.model.parseValue(t);t="".concat(e.value).concat(e.unit),this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=this.model.input;e.ppfx=t,e.render(),this.el.querySelector(".".concat(t,"fields")).appendChild(e.el),this.$input=e.inputEl,this.unit=e.unitEl,this.$unit=B(this.unit),this.input=this.$input.get(0),this.inputInst=e}},clearCached:function(){E.prototype.clearCached.apply(this,arguments),this.unit=null,this.$unit=null}}),q=n(38);function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function K(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Y=W.extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=K(K({},e),{},{silent:1}),this.inputInst.setValue(t,e)},remove:function(){var t=this;W.prototype.remove.apply(this,arguments);var e=this.inputInst;e&&e.remove(),['inputInst','$color'].forEach((function(e){return t[e]={}}))},onRender:function(){if(!this.input){var t=this.ppfx,e=new q["a"]({target:this.target,model:this.model,ppfx:t}).render();this.el.querySelector(".".concat(t,"fields")).appendChild(e.el),this.$input=e.inputEl,this.$color=e.colorEl,this.input=this.$input.get(0),this.inputInst=e}}}),X=n(7),J=n.n(X);function Z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Z(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var tt=f.extend({defaults:function(){return Q(Q({},f.prototype.defaults),{},{options:[],full:1})},initialize:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f.prototype.initialize.apply(this,e),this.listenTo(this,'change:options',this.onOptionChange)},onOptionChange:function(){this.set('list',this.get('options'))},getOptions:function(){var t=this.attributes,e=t.options,n=t.list;return e&&e.length?e:n},setOptions:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.set('options',t),this},addOption:function(t){if(t){var e=this.getOptions();this.setOptions([].concat(J()(e),[t]))}return this}});function et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function nt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?et(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var rt=tt.extend({defaults:function(){return nt(nt({},tt.prototype.defaults()),{},{full:0})}}),it=(a.a.$,E.extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return"\n <div class=\"".concat(e,"field ").concat(e,"select\">\n <span id=\"").concat(t,"input-holder\"></span>\n <div class=\"").concat(e,"sel-arrow\">\n <div class=\"").concat(e,"d-s-arrow\"></div>\n </div>\n </div>\n ")},initialize:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];E.prototype.initialize.apply(this,e),this.listenTo(this.model,'change:options',this.updateOptions)},updateOptions:function(){this.input=null,this.onRender()},onRender:function(){var t=this.pfx,e=this.model.getOptions();if(!this.input){var n='';e.forEach((function(t){var e=t.name||t.value,r=t.style?t.style.replace(/"/g,'"'):'',i=r?"style=\"".concat(r,"\""):'',o=t.value.replace(/"/g,'"');n+="<option value=\"".concat(o,"\" ").concat(i,">").concat(e,"</option>")}));var r=this.el.querySelector("#".concat(t,"input-holder"));r.innerHTML="<select>".concat(n,"</select>"),this.input=r.firstChild}}})),ot=E.extend({templateInput:function(){this.pfx;var t=this.ppfx;return"\n <div class=\"".concat(t,"field ").concat(t,"field-radio\">\n </div>\n ")},onRender:function(){var t=this.pfx,e=this.ppfx,n="".concat(e,"radio-item-label"),r=this.model,i=r.get('property'),o=r.get('list')||r.get('options')||[],a=r.cid,s="".concat(t,"radio ").concat(t,"radio-").concat(i);if(!this.input&&o&&o.length){var l='';o.forEach((function(r){var o=r.className?"".concat(r.className," ").concat(t,"icon ").concat(n):'',c="".concat(i,"-").concat(r.value,"-").concat(a),u=r.name||r.value,d=r.title?"title=\"".concat(r.title,"\""):'';l+="\n <div class=\"".concat(e,"radio-item\">\n <input type=\"radio\" class=\"").concat(s,"\" id=\"").concat(c,"\" name=\"").concat(i,"-").concat(a,"\" value=\"").concat(r.value,"\"/>\n <label class=\"").concat(o||n,"\" ").concat(d," for=\"").concat(c,"\">").concat(o?'':u,"</label>\n </div>\n ")}));var c=this.el.querySelector(".".concat(e,"field"));c.innerHTML="<div class=\"".concat(e,"radio-items\">").concat(l,"</div>"),this.input=c.firstChild}},getInputValue:function(){var t=this.getCheckedEl();return t?t.value:''},getCheckedEl:function(){var t=this.getInputEl();return t?t.querySelector('input:checked'):''},setValue:function(t){var e=this.model,n=t||e.get('value')||e.getDefaultValue(),r=this.getInputEl(),i=r?r.querySelector("[value=\"".concat(n,"\"]")):'';if(i)i.checked=!0;else{var o=this.getCheckedEl();o&&(o.checked=!1)}}}),at=n(32);function st(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function lt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?st(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ct=f.extend({defaults:lt(lt({},f.prototype.defaults),{},{units:[],unit:'',step:1,min:'',max:''}),initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.callParentInit(f,this,t,e);var n=this.get('unit'),r=this.get('units');this.input=new at["a"]({model:this}),r.length&&!n&&this.set('unit',r[0]),f.callInit(this,t,e)},clearValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.set({value:void 0,unit:void 0},t),this},parseValue:function(t){var e=f.prototype.parseValue.apply(this,arguments),n=this.input.validateInputValue(e.value,{deepCheck:1}),r=n.value,i=n.unit;return e.value=r,e.unit=i,e},getFullValue:function(){var t=this.get('value'),e=this.get('unit');return t=Object(l["isUndefined"])(t)?'':t,e=!Object(l["isUndefined"])(e)&&t?e:'',t="".concat(t).concat(e),f.prototype.getFullValue.apply(this,[t])}});function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ht=ct.extend({defaults:dt(dt({},ct.prototype.defaults),{},{showInput:1})});function ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function pt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ft(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var gt=W.extend({events:function(){return pt(pt({},W.prototype.events),{},{'change [type=range]':'inputValueChanged','input [type=range]':'inputValueChangedSoft',change:''})},templateInput:function(t){var e=this.ppfx;return"\n <div class=\"".concat(e,"field ").concat(e,"field-range\">\n <input type=\"range\"\n min=\"").concat(t.get('min'),"\"\n max=\"").concat(t.get('max'),"\"\n step=\"").concat(t.get('step'),"\"/>\n </div>\n ")},getSliderEl:function(){return this.slider||(this.slider=this.el.querySelector('input[type=range]')),this.slider},inputValueChanged:function(){var t=this.model,e=t.get('step');this.getInputEl().value=this.getSliderEl().value;var n=this.getInputValue()-e;t.set('value',n,{avoidStore:1}).set('value',n+e),this.elementUpdated()},inputValueChangedSoft:function(){this.getInputEl().value=this.getSliderEl().value,this.model.set('value',this.getInputValue(),{avoidStore:1}),this.elementUpdated()},setValue:function(t){var e=this.model.parseValue(t);this.getSliderEl().value=parseFloat(e.value),W.prototype.setValue.apply(this,arguments)},onRender:function(){W.prototype.onRender.apply(this,arguments),this.model.get('showInput')||(this.inputInst.el.style.display='none')},clearCached:function(){W.prototype.clearCached.apply(this,arguments),this.slider=null}});function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vt(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var bt=e["default"]=a.a.Collection.extend(s["a"]).extend({extendViewApi:1,types:[{id:'stack',model:C,view:H,isType:function(t){if(t&&'stack'==t.type)return t}},{id:'composite',model:v,view:L,isType:function(t){if(t&&'composite'==t.type)return t}},{id:'file',model:f,view:U,isType:function(t){if(t&&'file'==t.type)return t}},{id:'color',model:f,view:Y,isType:function(t){if(t&&'color'==t.type)return t}},{id:'select',model:rt,view:it,isType:function(t){if(t&&'select'==t.type)return t}},{id:'radio',model:tt,view:ot,isType:function(t){if(t&&'radio'==t.type)return t}},{id:'slider',model:ht,view:gt,isType:function(t){if(t&&'slider'==t.type)return t}},{id:'integer',model:ct,view:W,isType:function(t){if(t&&'integer'==t.type)return t}},{id:'base',model:f,view:E,isType:function(t){return t.type='base',t}}],deepClone:function(){var t=this.clone();return t.reset(t.map((function(t){var e=t.clone();return e.typeView=t.typeView,e}))),t},parseValue:function(t){var e=this,n=[];return t.split(' ').forEach((function(t,r){var i=e.at(r);i&&n.push(mt(mt({},i.attributes),{value:t}))})),n},getFullValue:function(){var t='';return this.each((function(e){return t+="".concat(e.getFullValue()," ")})),t.trim()}})},function(t,e,n){var r=n(82);t.exports=function(t,e){if(null==t)return{};var n,i,o=r(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e["default"]={startSelectPosition:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.isPointed=!1;var i=this.editorModel.get('Utils'),o=t.ownerDocument.body;i&&!this.sorter&&(this.sorter=new i.Sorter({container:o,placer:this.canvas.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:this.ppfx,direction:'a',document:e,wmargin:1,nested:1,em:this.editorModel,canvasRelative:1,scale:function(){return n.em.getZoomDecimal()}})),r.onStart&&(this.sorter.onStart=r.onStart),t&&this.sorter.startSort(t,{container:o})},getOffsetDim:function(){var t=this.offset(this.canvas.getFrameEl()),e=this.offset(this.canvas.getElement());return{top:t.top-e.top,left:t.left-e.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex='after'==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&'after'==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?i(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?i(this.cDim[this.posIndex][5]).parent():i(this.outsideElem),this.posTargetModel=this.posTargetEl.data('model'),this.posTargetCollection=this.posTargetEl.data('model-comp'))},enable:function(){this.startSelectPosition()},nearFloat:function(t,e,n){var r=t||0,i=e||'before',o=n.length,a=0!==o&&'after'==i&&r==o;return 0!==o&&(!a&&!n[r][4]||n[r-1]&&!n[r-1][4]||a&&!n[r-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css('cursor',''),this.$wrapper.unbind()}}},function(t,e,n){"use strict";var r=n(40);window.Promise=window.Promise||r["a"],e["a"]='function'==typeof fetch?fetch.bind():function(t,e){return new r["a"]((function(n,i){var o=new XMLHttpRequest;for(var a in o.open(e.method||'get',t),o.withCredentials='include'==e.credentials,e.headers||{})o.setRequestHeader(a,e.headers[a]);o.onload=function(t){return n({status:o.status,statusText:o.statusText,text:function(){return r["a"].resolve(o.responseText)}})},o.onerror=i,o.upload&&e.onProgress&&(o.upload.onprogress=e.onProgress),e.body?o.send(e.body):o.send()}))}},function(t,e,n){"use strict";var r=n(8),i=n.n(r),o=n(0);e["a"]=function(t){var e=t,n='data-gjs-';return{compTypes:'',modelAttrStart:n,splitPropsFromAttr:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={},i={};return Object(o["each"])(e,(function(e,a){if(0===a.indexOf(t.modelAttrStart)){var s=a.replace(n,''),l=e.length,c=e&&Object(o["isString"])(e),u=c&&e.substr(0,1),d=c&&e.substr(l-1);e='false'!==(e='true'===e||e)&&e;try{e='{'==u&&'}'==d||'['==u&&']'==d?JSON.parse(e):e}catch(t){}r[s]=e}else i[a]=e})),{props:r,attrs:i}},parseStyle:function(t){for(var e={},n=t.split(';'),r=0,i=n.length;r<i;r++){var o=n[r].trim();if(o){var a=o.split(':');e[a[0].trim()]=a.slice(1).join(':').trim()}}return e},parseClass:function(t){for(var e=[],n=t.split(' '),r=0,i=n.length;r<i;r++){var o=n[r].trim();o&&e.push(o)}return e},parseNode:function(r){for(var o=[],a=r.childNodes,s=0,l=a.length;s<l;s++){var c=a[s],u=c.attributes||[],d=u.length,h=o[o.length-1],f=c.childNodes.length,p=this.compTypes,g={};if(p){var v='',m=c.getAttribute&&c.getAttribute("".concat(n,"type"));if(m)g={type:m};else{for(var b=0;b<p.length;b++){var y=p[b];if(v=y.model.isComponent(c)){'object'!==i()(v)&&(v={type:y.id});break}}g=v}}g.tagName||(g.tagName=c.tagName?c.tagName.toLowerCase():''),d&&(g.attributes={});for(var w=0;w<d;w++){var x=u[w].nodeName,O=u[w].nodeValue;if('style'==x)g.style=this.parseStyle(O);else if('class'==x)g.classes=this.parseClass(O);else{if('contenteditable'==x)continue;if(0===x.indexOf(n)){var C=x.replace(n,''),S=O.length,k=O&&O.substr(0,1),j=O&&O.substr(S-1);O='false'!==(O='true'===O||O)&&O;try{O='{'==k&&'}'==j||'['==k&&']'==j?JSON.parse(O):O}catch(t){}g[C]=O}else''===O&&!0===c[x]&&(O=!0),g.attributes[x]=O}}if(f&&!g.components){var T=c.childNodes[0];1===f&&3===T.nodeType?(!g.type&&(g.type='text'),g.components={type:'textnode',content:T.nodeValue}):g.components=this.parseNode(c)}if('textnode'==g.type){if(h&&'textnode'==h.type){h.content+=g.content;continue}if(!t.keepEmptyTextNodes){var P=c.nodeValue;if(' '!=P&&!P.trim())continue}}var E=g.components;if(!g.type&&E){for(var M=1,D=0,A=0;A<E.length;A++){var L=E[A],_=L.type;if(['text','textnode'].indexOf(_)<0&&e.textTags.indexOf(L.tagName)<0){M=0;break}'textnode'==_&&(D=1)}M&&D&&(g.type='text')}(g.tagName||'textnode'==g.type)&&o.push(g)}return o},parse:function(t,n){var r=e.em,i=r&&r.get('Config')||{},o={html:'',css:''},a=document.createElement('div');a.innerHTML=t;var s=a.querySelectorAll('script'),l=s.length;if(!i.allowScripts)for(;l--;)s[l].parentNode.removeChild(s[l]);if(n){for(var c=a.querySelectorAll('style'),u=c.length,d='';u--;)d=c[u].innerHTML+d,c[u].parentNode.removeChild(c[u]);d&&(o.css=n.parse(d))}var h=this.parseNode(a),f=1!==h.length||e.returnArray?h:h[0];return o.html=f,r&&r.trigger('parse:html',{input:t,output:o}),o}}}},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n.n(i),a=o.a.Model,s=o.a.View;e["a"]={types:[],initialize:function(t,e){var n=this;this.model=function(){var t,e,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i&&i.type){var a=n.getBaseType();t=(r=n.getType(i.type))?r.model:a.model,e=r?r.view:a.view}else{var s=n.recognizeType(i);t=(r=s.type).model,e=r.view,i=s.attributes}var l=new t(i,o);return l.typeView=e,l};var r=this.init&&this.init.bind(this);r&&r()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n<e.length;n++){var r=e[n],i=r.isType(t);if(i='boolean'==typeof i&&i?{type:r.id}:i)return{type:r,attributes:i}}return{type:this.getBaseType(),attributes:t}},getBaseType:function(){var t=this.getTypes();return t[t.length-1]},getTypes:function(){return this.types},getType:function(t){for(var e=this.getTypes(),n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},addType:function(t,e){var n=this.getType(t),i=this.getBaseType(),o=n?n.model:i.model,l=n?n.view:i.view,c=e.model,u=e.view,d=e.isType;c=c instanceof a||Object(r["isFunction"])(c)?c:o.extend(c||{}),u=u instanceof s||Object(r["isFunction"])(u)?u:l.extend(u||{}),!this.extendViewApi||e.model||e.view||(u=u.extend(e)),n?(n.model=c,n.view=u,n.isType=d||n.isType):(e.id=t,e.model=c,e.view=u,e.isType=d||function(e){if(e&&e.type==t)return!0},this.getTypes().unshift(e))}}},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0),a=Number.MAX_VALUE;e["a"]=i.a.Model.extend({initialize:function(){this.compCls=[],this.ids=[]},buildFromModel:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r='',i=this.em,o=i&&i.getConfig('avoidInlineStyle'),a=t.styleToString(),s=t.get('classes'),l=n.wrapperIsBody,c=t.get('wrapper');if(this.ids.push("#".concat(t.getId())),s.each((function(t){return e.compCls.push(t.getFullName())})),!o&&a){var u="#".concat(t.getId());r="".concat(u=l&&c?'body':u,"{").concat(a,"}")}var d=t.components();return d.each((function(t){return r+=e.buildFromModel(t,n)})),r},build:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.cssc,i=n.em||'';this.em=i,this.compCls=[],this.ids=[];var a=this.buildFromModel(t,n),s=Object(o["isUndefined"])(n.clearStyles)&&i?i.getConfig('clearStyles'):n.clearStyles;if(r){var l=r.getAll(),c={},u=[];l.each((function(t){var r=t.getAtRule();if(r){var i=c[r];i?i.push(t):c[r]=[t]}else a+=e.buildFromRule(t,u,n)})),this.sortMediaObject(c).forEach((function(t){var r='',i=t.key;t.value.forEach((function(t){var o=e.buildFromRule(t,u,n);t.get('singleAtRule')?a+="".concat(i,"{").concat(o,"}"):r+=o})),r&&(a+="".concat(i,"{").concat(r,"}"))})),i&&s&&l.remove(u)}return a},buildFromRule:function(t,e){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o='',a=t.selectorsToString({skipAdd:1}),s=t.get('selectorsAdd'),l=t.get('singleAtRule');if(t.get('selectors').each((function(t){var e=t.getFullName();(r.compCls.indexOf(e)>=0||r.ids.indexOf(e)>=0||i.keepUnusedStyles)&&(n=1)})),a&&n||s||l){var c=t.getDeclaration();c&&(o+=c)}else e.push(t);return o},getQueryLength:function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):a},sortMediaObject:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return Object(o["each"])(e,(function(t,e){return n.push({key:e,value:t})})),n.sort((function(e,n){var r=[e.key,n.key].every((function(t){return-1!==t.indexOf('min-width')})),i=r?e.key:n.key,o=r?n.key:e.key;return t.getQueryLength(i)-t.getQueryLength(o)}))}})},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0),a=n(3),s=n(18);i.a.$;e["a"]=s["a"].extend({events:{'change input':'handleChange','change select':'handleUnitChange','click [data-arrow-up]':'upArrowClick','click [data-arrow-down]':'downArrowClick','mousedown [data-arrows]':'downIncrement',keydown:'handleKeyDown'},template:function(){var t=this.ppfx;return"\n <span class=\"".concat(t,"input-holder\"></span>\n <span class=\"").concat(t,"field-units\"></span>\n <div class=\"").concat(t,"field-arrows\" data-arrows>\n <div class=\"").concat(t,"field-arrow-u\" data-arrow-up></div>\n <div class=\"").concat(t,"field-arrow-d\" data-arrow-down></div>\n </div>\n ")},inputClass:function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},initialize:function(){s["a"].prototype.initialize.apply(this,arguments),Object(o["bindAll"])(this,'moveIncrement','upIncrement'),this.doc=document,this.listenTo(this.model,'change:unit',this.handleModelChange)},setValue:function(t,e){var n=e||{},r=this.validateInputValue(t,{deepCheck:1}),i={value:r.value};(r.unit||r.force)&&(i.unit=r.unit),this.model.set(i,n),n.silent&&this.handleModelChange()},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},handleUnitChange:function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set('unit',e),this.elementUpdated()},handleKeyDown:function(t){'ArrowUp'===t.key&&(t.preventDefault(),this.upArrowClick()),'ArrowDown'===t.key&&(t.preventDefault(),this.downArrowClick())},elementUpdated:function(){this.model.trigger('el:change')},handleModelChange:function(){var t=this.model;this.getInputEl().value=t.get('value');var e=this.getUnitEl();e&&(e.value=t.get('unit')||'')},getUnitEl:function(){if(!this.unitEl){var t=this.model,e=t.get('units')||[];if(e.length){var n=[];e.forEach((function(e){var r=e==t.get('unit')?'selected':'';n.push("<option ".concat(r,">").concat(e,"</option>"))}));var r=document.createElement('div');r.innerHTML="<select class=\"".concat(this.ppfx,"input-unit\">").concat(n.join(''),"</select>"),this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value'));n=this.normalizeValue(n+e);var r=this.validateInputValue(n);t.set('value',r.value),this.elementUpdated()},downArrowClick:function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value')),r=this.normalizeValue(n-e),i=this.validateInputValue(r);t.set('value',i.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get('value');e=this.normalizeValue(e),this.current={y:t.pageY,val:e},Object(a["v"])(this.doc,'mousemove',this.moveIncrement),Object(a["v"])(this.doc,'mouseup',this.upIncrement)},moveIncrement:function(t){this.moved=1;var e=this.model,n=e.get('step'),r=this.current,i=this.normalizeValue(r.val+(r.y-t.pageY)*n);return this.prValue=this.validateInputValue(i).value,e.set('value',this.prValue,{avoidStore:1}),!1},upIncrement:function(){var t=this.model,e=t.get('step');if(Object(a["u"])(this.doc,'mouseup',this.upIncrement),Object(a["u"])(this.doc,'mousemove',this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-e;t.set('value',n,{avoidStore:1}).set('value',n+e),this.elementUpdated()}},normalizeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model,r=n.get('step'),i=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var o=r.toString().split('.')[1];i=o?o.length:0}return i?parseFloat(t.toFixed(i)):t},validateInputValue:function(t,e){var n=0,r=e||{},i=this.model,a='',s=Object(o["isUndefined"])(t)?a:t,l=i.get('units')||[],c=i.get('unit')||l.length&&l[0]||'',u=i.get('max'),d=i.get('min'),h=!!i.get('limitlessMax');i.get('limitlessMin');if(r.deepCheck){var f=i.get('fixedValues')||[];if(s){var p=new RegExp('^'+f.join('|'),'g');if(f.length&&p.test(s))s=s.match(p)[0],c='',n=1;else{var g=s+'';s+='',s=parseFloat(s.replace(',','.')),s=isNaN(s)?a:s;var v=g.replace(s,'');Object(o["indexOf"])(l,v)>=0&&(c=v)}}}return h||Object(o["isUndefined"])(u)||''===u||(s=s>u?u:s),h||Object(o["isUndefined"])(d)||''===d||(s=s<d?d:s),{force:n,value:s,unit:c}},render:function(){s["a"].prototype.render.call(this),this.unitEl=null;var t=this.getUnitEl();return t&&this.$el.find(".".concat(this.ppfx,"field-units")).get(0).appendChild(t),this}})},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(34);e["a"]=i.a.Collection.extend({model:o["a"],initialize:function(t,e){var n=this;e&&e.em&&(this.editor=e.em),setTimeout((function(){n.on('remove',n.onRemove),n.on('add',n.onAdd)}))},onAdd:function(t){t.ensureSelectors()},onRemove:function(t){var e=this.editor;e.stopListening(t),e.get('UndoManager').remove(t)},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return'string'==typeof t&&(t=this.editor.get('Parser').parseCss(t)),e.em=this.editor,i.a.Collection.prototype.add.apply(this,[t,e])}})},function(t,e,n){"use strict";var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(0),l=n(1),c=n.n(l),u=n(23),d=n(12);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var p=window.CSS;e["a"]=c.a.Model.extend(u["a"]).extend({defaults:{selectors:[],selectorsAdd:'',style:{},mediaText:'',state:'',stylable:!0,atRuleType:'',singleAtRule:0,important:0},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t||{},this.opt=e,this.em=e.em,this.ensureSelectors()},clone:function(){var t=f({},this.opt),e=f({},this.attributes);return e.selectors=this.get('selectors').map((function(t){return t.clone()})),new this.constructor(e,t)},ensureSelectors:function(){var t=this.em,e=t&&t.get('SelectorManager'),n=[this,'change:selectors',this.ensureSelectors],r=this.getSelectors();if(this.stopListening.apply(this,n),r.models&&(r=i()(r.models)),Array.isArray(r)){var o=r.filter((function(t){return t})).map((function(t){return e?e.add(t):t}));r=new d["a"](o)}this.set('selectors',r),this.listenTo.apply(this,n)},getAtRule:function(){var t=this.get('atRuleType'),e=this.get('mediaText'),n=t?"@".concat(t):e?'@media':'';return n+(e&&n?" ".concat(e):'')},selectorsToString:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=this.em,r=this.get('state'),i=this.get('wrapper'),o=this.get('selectorsAdd'),a=i&&n&&n.getConfig('wrapperIsBody'),s={escape:function(t){return p&&p.escape?p.escape(t):t}},l=a?'body':this.get('selectors').getFullString(0,s),c=r&&!t.skipState?":".concat(r):'';return l&&e.push("".concat(l).concat(c)),o&&!t.skipAdd&&e.push(o),e.join(', ')},getDeclaration:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e='',n=this.selectorsToString(),r=this.styleToString(t),i=this.get('singleAtRule');return(n||i)&&r&&(e=i?r:"".concat(n,"{").concat(r,"}")),e},toCSS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e='',n=this.getAtRule(),r=this.getDeclaration(t);return r&&(e=r),n&&e&&(e="".concat(n,"{").concat(e,"}")),e},toJSON:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=c.a.Model.prototype.toJSON.apply(this,e);if(this.em.getConfig('avoidDefaults')){var i=this.defaults;Object(s["forEach"])(i,(function(t,e){r[e]===t&&delete r[e]})),Object(s["isEmpty"])(r.selectors)&&delete r.selectors,Object(s["isEmpty"])(r.style)&&delete r.style}return r},compare:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e||'',o=n||'',a=r.selectorsAdd||'',l=r.atRuleType||'';t instanceof Array||t.models||(t=[t]);var c=Object(s["map"])(t.models||t,(function(t){return t.get('name')})),u=Object(s["map"])(this.get('selectors').models,(function(t){return t.get('name')})),d=!1;if(c.length!==u.length)return d;for(var h=0;h<c.length;h++){for(var f=0,p=0;p<u.length;p++)c[h]===u[p]&&(f=1);if(0===f)return d}return this.get('state')===i&&this.get('mediaText')===o&&this.get('selectorsAdd')===a&&this.get('atRuleType')===l||d}})},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0);e["a"]=i.a.View.extend({initialize:function(t){this.opts=t||{},this.config=t.config||{},this.em=this.config.em;var e=this.collection;this.listenTo(e,'add',this.addTo),this.listenTo(e,'reset',this.resetChildren),this.listenTo(e,'remove',this.removeChildren)},removeChildren:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.views.forEach((function(t){if(t){var e=t.childrenView,n=t.scriptContainer;e&&e.stopListening(),n&&n.remove(),t.remove.apply(t)}}));var i=t.components();i.forEach((function(t){return n.removeChildren(t,e,r)}))},addTo:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.config.em,r=this.collection.indexOf(t);if(this.addToCollection(t,null,r),n&&!e.temporary){var i=function t(e){n.trigger('component:add',e),e.components().forEach((function(e){return t(e)}))};i(t)}},addToCollection:function(t,e,r){this.compView||(this.compView=n(6).default);for(var i=this.config,a=this.opts,s=this.em,l=e||null,c=i.frameView,u=void 0===c?{}:c,d=u.model&&t.getView(u.model),h=a.componentTypes||s&&s.get('DomComponents').getTypes(),f=t.get('type'),p=this.compView,g=0;g<h.length;g++)if(h[g].id==f){p=h[g].view;break}var v,m=d||new p({model:t,config:i,componentTypes:h});try{v=m.render().el}catch(t){v=document.createTextNode(''),s.logError(t)}if(l)l.appendChild(v);else{var b=this.parentEl,y=b.childNodes;if(Object(o["isUndefined"])(r))b.appendChild(v);else{var w=y.length==r;w&&r--,w||!y.length?b.appendChild(v):b.insertBefore(v,y[r])}}return v},resetChildren:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.previousModels,i=void 0===r?[]:r;this.parentEl.innerHTML='',i.forEach((function(t){return e.removeChildren(t,e.collection)})),t.each((function(t){return e.addToCollection(t)}))},render:function(t){var e=this,n=this.el,r=document.createDocumentFragment();return this.parentEl=t||this.el,this.collection.each((function(t){return e.addToCollection(t,r)})),n.innerHTML='',n.appendChild(r),this}})},function(t,e,n){"use strict";var r,i=n(0),o=n(3),a=n(1),s=n.n(a),l=n(6),c=n(5),u='contentEditable',d=s.a.$;e["a"]=s.a.View.extend({events:{'mousedown [data-toggle-move]':'startSort','touchstart [data-toggle-move]':'startSort','click [data-toggle-visible]':'toggleVisibility','click [data-toggle-select]':'handleSelect','mouseover [data-toggle-select]':'handleHover','mouseout [data-toggle-select]':'handleHoverOut','click [data-toggle-open]':'toggleOpening','dblclick [data-name]':'handleEdit','focusout [data-name]':'handleEditEnd'},template:function(t){var e=this.pfx,n=this.ppfx,r=this.config,i=this.clsNoEdit,o=r.hidable,a=this.countChildren(t),s=a?'':this.clsNoChild,l="".concat(this.clsTitle," ").concat(s),c="".concat(this.clsTitleC," ").concat(n,"one-bg"),u="".concat(this.clsCaret," fa fa-chevron-right"),d="".concat(this.inputNameCls," ").concat(i," ").concat(n,"no-app"),h=this.level+1,f="".concat(30+10*h,"px"),p=t.getName(),g=t.getIcon(),v="".concat(e,"layer");return"\n ".concat(o?"<i class=\"".concat(e,"layer-vis fa fa-eye ").concat(this.isVisible()?'':'fa-eye-slash',"\" data-toggle-visible></i>"):'',"\n <div class=\"").concat(c,"\">\n <div class=\"").concat(l,"\" style=\"padding-left: ").concat(f,"\" data-toggle-select>\n <div class=\"").concat(e,"layer-title-inn\">\n <i class=\"").concat(u,"\" data-toggle-open></i>\n ").concat(g?"<span class=\"".concat(v,"__icon\">").concat(g,"</span>"):'',"\n <span class=\"").concat(d,"\" data-name>").concat(p,"</span>\n </div>\n </div>\n </div>\n <div class=\"").concat(this.clsCount,"\" data-count>").concat(a||'',"</div>\n <div class=\"").concat(this.clsMove,"\" data-toggle-move>\n <i class=\"fa fa-arrows\"></i>\n </div>\n <div class=\"").concat(this.clsChildren,"\"></div>")},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t,this.level=t.level,this.config=t.config,this.em=t.config.em,this.ppfx=this.em.get('Config').stylePrefix,this.sorter=t.sorter||'',this.pfx=this.config.stylePrefix,this.parentView=t.parentView;var e=this.pfx,n=this.ppfx,r=this.model,i=r.get('components'),o=r.get('type')||'default';r.set('open',!1),this.listenTo(i,'remove add reset',this.checkChildren),this.listenTo(r,'change:status',this.updateStatus),this.listenTo(r,'change:open',this.updateOpening),this.listenTo(r,'change:layerable',this.updateLayerable),this.listenTo(r,'change:style:display',this.updateVisibility),this.className="".concat(e,"layer ").concat(e,"layer__t-").concat(o," no-select ").concat(n,"two-color"),this.inputNameCls="".concat(n,"layer-name"),this.clsTitleC="".concat(e,"layer-title-c"),this.clsTitle="".concat(e,"layer-title"),this.clsCaret="".concat(e,"layer-caret"),this.clsCount="".concat(e,"layer-count"),this.clsMove="".concat(e,"layer-move"),this.clsChildren="".concat(e,"layer-children"),this.clsNoChild="".concat(e,"layer-no-chld"),this.clsEdit="".concat(this.inputNameCls,"--edit"),this.clsNoEdit="".concat(this.inputNameCls,"--no-edit"),this.$el.data('model',r),this.$el.data('collection',i),r.viewLayer=this},getVisibilityEl:function(){return this.eyeEl||(this.eyeEl=this.$el.children(".".concat(this.pfx,"layer-vis"))),this.eyeEl},updateVisibility:function(){var t=this.pfx,e=this.model,n="".concat(t,"layer-hidden"),r='none'===e.getStyle().display?'addClass':'removeClass';this.$el[r](n),this.getVisibilityEl()[r]('fa-eye-slash')},toggleVisibility:function(t){t&&t.stopPropagation();var e=this.model,n=this.em,r='__prev-display',i=e.get(r),o=e.getStyle(),a=o.display;'none'==a?(delete o.display,i&&(o.display=i,e.unset(r))):(a&&e.set(r,a),o.display='none'),e.setStyle(o),n&&n.trigger('component:toggled')},handleEdit:function(t){t&&t.stopPropagation();var e=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName();o[u]=!0,o.focus(),e&&e.setEditing(1),n.find(".".concat(this.inputNameCls)).removeClass(r).addClass(i)},handleEditEnd:function(t){t&&t.stopPropagation();var e=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName(),a=o.textContent;o.scrollLeft=0,o[u]=!1,this.model.set({'custom-name':a}),e&&e.setEditing(0),n.find(".".concat(this.inputNameCls)).addClass(r).removeClass(i)},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},updateOpening:function(){var t=this.opt.opened||{},e=this.model,n='fa-chevron-down';e.get('open')?(this.$el.addClass('open'),this.getCaret().addClass(n),t[e.cid]=e):(this.$el.removeClass('open'),this.getCaret().removeClass(n),delete t[e.cid])},toggleOpening:function(t){t.stopPropagation(),this.model.get('components').length&&this.model.set('open',!this.model.get('open'))},handleSelect:function(t){t.stopPropagation();var e=this.em,n=this.config;if(e){var r=this.model;e.setSelected(r,{fromLayers:1,event:t});var i=n.scrollCanvas;i&&r.views.forEach((function(t){return t.scrollIntoView(i)}))}},handleHover:function(t){t.stopPropagation();var e=this.em,n=this.config,r=this.model;e&&n.showHover&&e.setHovered(r,{fromLayers:1})},handleHoverOut:function(t){t.stopPropagation();var e=this.em,n=this.config;e&&n.showHover&&e.setHovered(0,{fromLayers:1})},startSort:function(t){t.stopPropagation();var e=this.em,n=this.sorter;t.button&&0!==t.button||n&&(n.onStart=function(t){return e.trigger("".concat(c["eventDrag"],":start"),t)},n.onMoveClb=function(t){return e.trigger(c["eventDrag"],t)},n.startSort(t.target))},freeze:function(){this.$el.addClass(this.pfx+'opac50'),this.model.set('open',0)},unfreeze:function(){this.$el.removeClass(this.pfx+'opac50')},updateStatus:function(t){l["default"].prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover}])},isVisible:function(){var t=this.model.getStyle().display;return!(t&&'none'===t)},checkChildren:function(){var t=this.model,e=this.clsNoChild,n=this.countChildren(t),r=this.$el.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),i=this.cnt;i||(i=this.$el.children('[data-count]').get(0),this.cnt=i),r[n?'removeClass':'addClass'](e),i&&(i.innerHTML=n||''),!n&&t.set('open',0)},countChildren:function(t){var e=0;return t.get('components').each((function(t){var n=this.opt.isCountable,r=this.config.hideTextnode;n&&!n(t,r)||e++}),this),e},getCaret:function(){if(!this.caret||!this.caret.length){this.pfx;this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))}return this.caret},setRoot:function(t){t=Object(i["isString"])(t)?this.em.getWrapper().find(t)[0]:t;var e=Object(o["g"])(t,d);e&&(this.stopListening(),this.model=e,this.initialize(this.opt),this.render())},updateLayerable:function(){(this.parentView||this).render()},render:function(){var t=this.model,e=this.config,o=this.pfx,a=this.ppfx,s=this.opt.isCountable,l=s&&!s(t,e.hideTextnode),c=this.isVisible(),u=this.$el.empty(),d=this.level+1;Object(i["isUndefined"])(r)&&(r=n(90).default);var h=new r({collection:t.get('components'),config:this.config,sorter:this.sorter,opened:this.opt.opened,parentView:this,parent:t,level:d}).render().$el;return this.config.showWrapper||1!==d?(u.html(this.template(t)),u.find(".".concat(this.clsChildren)).append(h)):u.append(h),t.get('draggable')&&this.config.sortable||u.children(".".concat(this.clsMove)).remove(),!c&&(this.className+=" ".concat(o,"hide")),l&&(this.className+=" ".concat(a,"hidden")),u.attr('class',this.className),this.updateOpening(),this.updateStatus(),this.updateVisibility(),this}})},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=i.a.View.extend({tagName:'style',initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{};var e=this.model,n='change:style change:state change:mediaText';this.listenTo(e,n,this.render),this.listenTo(e,'destroy remove',this.remove),this.listenTo(e.get('selectors'),'change',this.render)},render:function(){var t=this.model.get('important');return this.el.innerHTML=this.model.toCSS({important:t}),this}}),a=o.extend({_createElement:function(t){return document.createTextNode('')},render:function(){var t=this.model,e=t.get('important');return this.el.textContent=t.getDeclaration({important:e}),this}}),s=i.a.$,l=function(t,e){return"".concat(t).concat(e?"-".concat(parseFloat(e)):'')};e["a"]=i.a.View.extend({initialize:function(t){var e=t.config||{};this.atRules={},this.config=e,this.em=e.em,this.pfx=e.stylePrefix||'',this.className=this.pfx+'rules';var n=this.collection;this.listenTo(n,'add',this.addTo),this.listenTo(n,'reset',this.render)},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){if(this.renderStarted){var n,r,i=e||null,s={model:t,config:this.config};if('keyframes'===t.get('atRuleType')){var c=t.getAtRule(),u=this.atRules[c];if(!u){var d=document.createElement('style');u=document.createTextNode(''),d.appendChild(document.createTextNode("".concat(c,"{"))),d.appendChild(u),d.appendChild(document.createTextNode("}")),this.atRules[c]=u,n=d}r=new a(s),u.appendData(r.render().el.textContent)}else n=(r=new o(s)).render().el;var h=this.className,f=t.get('mediaText'),p=l(h),g=p;if(f&&(g=l(h,this.getMediaWidth(f))),n){var v,m=i||this.el;try{v=m.querySelector("#".concat(g))}catch(t){}v||(v=m.querySelector("#".concat(p))),v.appendChild(n)}return n}},getMediaWidth:function(t){return t&&t.replace("(".concat(this.em.getConfig('mediaCondition'),": "),'').replace(')','')},render:function(){var t=this;this.renderStarted=1,this.atRules={};var e=this.em,n=this.$el,r=this.className,i=this.collection,o=document.createDocumentFragment();n.empty();var a=e.get('DeviceManager').getAll().pluck('priority');return a.every((function(t){return t}))&&a.unshift(0),a.forEach((function(t){return s("<div id=\"".concat(l(r,t),"\"></div>")).appendTo(o)})),i.each((function(e){return t.addToCollection(e,o)})),n.append(o),n.attr('class',r),this}})},function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(8),c=n.n(l),u=n(18);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f=a.a.$;!function(t,e){var n={beforeShow:d,move:d,change:d,show:d,hide:d,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:'body',maxSelectionSize:7,cancelText:'cancel',chooseText:'choose',togglePaletteMoreText:'more',togglePaletteLessText:'less',clearText:'Clear Color Selection',noColorSelectedText:'No Color Selected',preferredFormat:!1,className:'',containerClassName:'',replacerClassName:'',showAlpha:!1,theme:'sp-light',palette:[['#ffffff','#000000','#ff0000','#ff8000','#ffff00','#008000','#0000ff','#4b0082','#9400d3']],selectionPalette:[],disabled:!1,offset:null},r=[],i=!!/msie/i.exec(window.navigator.userAgent),o=function(){function t(t,e){return!!~(''+t).indexOf(e)}var e=document.createElement('div').style;return e.cssText='background-color:rgba(0,0,0,.5)',t(e.backgroundColor,'rgba')||t(e.backgroundColor,'hsla')}(),a=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>▼</div>",'</div>'].join(''),s=function(){var t='';if(i)for(var e=1;e<=6;e++)t+="<div class='sp-"+e+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>",'</div>','</div>',"<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>",'</div>','</div>','</div>',"<div class='sp-clear sp-clear-display'>",'</div>',"<div class='sp-hue'>","<div class='sp-slider'></div>",t,'</div>','</div>',"<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>",'</div>',"<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false' />",'</div>',"<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button type='button' class='sp-choose'></button>",'</div>','</div>','</div>'].join('')}();function l(e,n,r,i){for(var a=[],s=0;s<e.length;s++){var l=e[s];if(l){var c=k(l),u=c.toHsl().l<.5?'sp-thumb-el sp-thumb-dark':'sp-thumb-el sp-thumb-light';u+=k.equals(n,l)?' sp-thumb-active':'';var d=c.toString(i.preferredFormat||'rgb'),h=o?'background-color:'+c.toRgbString():'filter:'+c.toFilter();a.push('<span title="'+d+'" data-color="'+c.toRgbString()+'" class="'+u+'"><span class="sp-thumb-inner" style="'+h+';"></span></span>')}else{a.push(t('<div />').append(t('<span data-color="" style="background-color:transparent;" class="'+'sp-clear-display'+'"></span>').attr('title',i.noColorSelectedText)).html())}}return"<div class='sp-cf "+r+"'>"+a.join('')+'</div>'}function u(c,u){var d,v,m,b,y=function(e,r){var i=t.extend({},n,e);return i.callbacks={move:f(i.move,r),change:f(i.change,r),show:f(i.show,r),hide:f(i.hide,r),beforeShow:f(i.beforeShow,r)},i}(u,c),w=y.flat,x=y.showSelectionPalette,O=y.localStorageKey,C=y.theme,S=y.callbacks,j=(d=Bt,v=10,function(){var t=this,e=arguments,n=function(){b=null,d.apply(t,e)};m&&clearTimeout(b),!m&&b||(b=setTimeout(n,v))}),T=!1,P=!1,E=0,M=0,D=0,A=0,L=0,_=0,N=0,I=0,F=0,V=0,R=1,z=[],H=[],$={},U=y.selectionPalette.slice(0),B=y.maxSelectionSize,W='sp-dragging',q=null,G=c.ownerDocument,K=(G.body,t(c)),Y=!1,X=t(s,G).addClass(C),J=X.find('.sp-picker-container'),Z=X.find('.sp-color'),Q=X.find('.sp-dragger'),tt=X.find('.sp-hue'),et=X.find('.sp-slider'),nt=X.find('.sp-alpha-inner'),rt=X.find('.sp-alpha'),it=X.find('.sp-alpha-handle'),ot=X.find('.sp-input'),at=X.find('.sp-palette'),st=X.find('.sp-initial'),lt=X.find('.sp-cancel'),ct=X.find('.sp-clear'),ut=X.find('.sp-choose'),dt=X.find('.sp-palette-toggle'),ht=K.is('input'),ft=ht&&'color'===K.attr('type')&&g(),pt=ht&&!w,gt=pt?t(a).addClass(C).addClass(y.className).addClass(y.replacerClassName):t([]),vt=pt?gt:K,mt=gt.find('.sp-preview-inner'),bt=y.color||ht&&K.val(),yt=!1,wt=y.preferredFormat,xt=!y.showButtons||y.clickoutFiresChange,Ot=!bt,Ct=y.allowEmpty&&!ft;function St(){if(y.showPaletteOnly&&(y.showPalette=!0),dt.text(y.showPaletteOnly?y.togglePaletteMoreText:y.togglePaletteLessText),y.palette){z=y.palette.slice(0),H=t.isArray(z[0])?z:[z],$={};for(var e=0;e<H.length;e++)for(var n=0;n<H[e].length;n++){var r=k(H[e][n]).toRgbString();$[r]=!0}}X.toggleClass('sp-flat',w),X.toggleClass('sp-input-disabled',!y.showInput),X.toggleClass('sp-alpha-enabled',y.showAlpha),X.toggleClass('sp-clear-enabled',Ct),X.toggleClass('sp-buttons-disabled',!y.showButtons),X.toggleClass('sp-palette-buttons-disabled',!y.togglePaletteOnly),X.toggleClass('sp-palette-disabled',!y.showPalette),X.toggleClass('sp-palette-only',y.showPaletteOnly),X.toggleClass('sp-initial-disabled',!y.showInitial),X.addClass(y.className).addClass(y.containerClassName),Bt()}function kt(){if(O&&window.localStorage){try{var e=window.localStorage[O].split(',#');e.length>1&&(delete window.localStorage[O],t.each(e,(function(t,e){jt(e)})))}catch(t){}try{U=window.localStorage[O].split(';')}catch(t){}}}function jt(e){if(x){var n=k(e).toRgbString();if(!$[n]&&-1===t.inArray(n,U))for(U.push(n);U.length>B;)U.shift();if(O&&window.localStorage)try{window.localStorage[O]=U.join(';')}catch(t){}}}function Tt(){var e=Rt(),n=t.map(H,(function(t,n){return l(t,e,'sp-palette-row sp-palette-row-'+n,y)}));kt(),U&&n.push(l(function(){var t=[];if(y.showPalette)for(var e=0;e<U.length;e++){var n=k(U[e]).toRgbString();$[n]||t.push(U[e])}return t.reverse().slice(0,y.maxSelectionSize)}(),e,'sp-palette-row sp-palette-row-selection',y)),at.html(n.join(''))}function Pt(){if(y.showInitial){var t=yt,e=Rt();st.html(l([t,e],e,'sp-palette-row-initial',y))}}function Et(){(M<=0||E<=0||A<=0)&&Bt(),P=!0,X.addClass(W),q=null,K.trigger('dragstart.spectrum',[Rt()])}function Mt(){P=!1,X.removeClass(W),K.trigger('dragstop.spectrum',[Rt()])}function Dt(){var t=ot.val();if(null!==t&&''!==t||!Ct){var e=k(t);e.isValid()?(Vt(e),Ut(!0)):ot.addClass('sp-validation-error')}else Vt(null),Ut(!0)}function At(){T?It():Lt()}function Lt(){var e=t.Event('beforeShow.spectrum');if(T)Bt();else if(K.trigger('beforeShow.spectrum',[Rt()]),!1!==S.beforeShow(Rt())&&!e.isDefaultPrevented()){!function(){for(var t=0;t<r.length;t++)r[t]&&r[t].hide()}(),T=!0;var n=t(G);n.bind('keydown.spectrum',_t),n.bind('click.spectrum',Nt),t(window).bind('resize.spectrum',j),gt.addClass('sp-active'),X.removeClass('sp-hidden'),Bt(),Ht(),yt=Rt(),Pt(),S.show(yt),K.trigger('show.spectrum',[yt])}}function _t(t){27===t.keyCode&&It()}function Nt(t){2!=t.button&&(P||(xt?Ut(!0):Ft(),It()))}function It(){T&&!w&&(T=!1,t(G).unbind('keydown.spectrum',_t),t(G).unbind('click.spectrum',Nt),t(window).unbind('resize.spectrum',j),gt.removeClass('sp-active'),X.addClass('sp-hidden'),S.hide(Rt()),K.trigger('hide.spectrum',[Rt()]))}function Ft(){Vt(yt,!0)}function Vt(t,e){var n,r;k.equals(t,Rt())?Ht():(!t&&Ct?Ot=!0:(Ot=!1,r=(n=k(t)).toHsv(),I=r.h%360/360,F=r.s,V=r.v,R=r.a),Ht(),n&&n.isValid()&&!e&&(wt=y.preferredFormat||n.getFormat()))}function Rt(t){return t=t||{},Ct&&Ot?null:k.fromRatio({h:I,s:F,v:V,a:Math.round(100*R)/100},{format:t.format||wt})}function zt(){Ht(),S.move(Rt()),K.trigger('move.spectrum',[Rt()])}function Ht(){ot.removeClass('sp-validation-error'),$t();var t=k.fromRatio({h:I,s:1,v:1});Z.css('background-color',t.toHexString());var e=wt;R<1&&(0!==R||'name'!==e)&&('hex'!==e&&'hex3'!==e&&'hex6'!==e&&'name'!==e||(e='rgb'));var n=Rt({format:e}),r='';if(mt.removeClass('sp-clear-display'),mt.css('background-color','transparent'),!n&&Ct)mt.addClass('sp-clear-display');else{var a=n.toHexString(),s=n.toRgbString();if(o||1===n.alpha?mt.css('background-color',s):(mt.css('background-color','transparent'),mt.css('filter',n.toFilter())),y.showAlpha){var l=n.toRgb();l.a=0;var c=k(l).toRgbString(),u='linear-gradient(left, '+c+', '+a+')';i?nt.css('filter',k(c).toFilter({gradientType:1},a)):(nt.css('background','-webkit-'+u),nt.css('background','-moz-'+u),nt.css('background','-ms-'+u),nt.css('background','linear-gradient(to right, '+c+', '+a+')'))}r=n.toString(e)}y.showInput&&ot.val(r),y.showPalette&&Tt(),Pt()}function $t(){var t=F,e=V;if(Ct&&Ot)it.hide(),et.hide(),Q.hide();else{it.show(),et.show(),Q.show();var n=t*E,r=M-e*M;n=Math.max(-D,Math.min(E-D,n-D)),r=Math.max(-D,Math.min(M-D,r-D)),Q.css({top:r+'px',left:n+'px'});var i=R*L;it.css({left:i-_/2+'px'});var o=I*A;et.css({top:o-N+'px'})}}function Ut(t){var e=Rt(),n='',r=!k.equals(e,yt);e&&(n=e.toString(wt),jt(e)),ht&&K.val(n),t&&r&&(S.change(e),K.trigger('change',[e]))}function Bt(){T&&(E=Z.width(),M=Z.height(),D=Q.height(),tt.width(),A=tt.height(),N=et.height(),L=rt.width(),_=it.width(),w||(X.css('position','absolute'),y.offset?X.offset(y.offset):X.offset(function(e,n){var r=0,i=e.outerWidth(),o=e.outerHeight(),a=n.outerHeight(),s=e[0].ownerDocument,l=s.documentElement,c=l.clientWidth,u=l.clientHeight,d=t(s).scrollLeft(),h=t(s).scrollTop(),f=c+d,p=u+h,g=n.offset();return g.top+=a,g.left-=Math.min(g.left,g.left+i>f&&f>i?Math.abs(g.left+i-f):0),g.top-=Math.min(g.top,g.top+o>p&&p>o?Math.abs(o+a-r):r),g}(X,vt))),$t(),y.showPalette&&Tt(),K.trigger('reflow.spectrum'))}function Wt(){It(),Y=!0,K.attr('disabled',!0),vt.addClass('sp-disabled')}!function(){if(i&&X.find('*:not(input)').attr('unselectable','on'),St(),pt&&K.after(gt).hide(),Ct||ct.hide(),w)K.after(X).hide();else{var e='parent'===y.appendTo?K.parent():t(y.appendTo);1!==e.length&&(e=t('body')),e.append(X)}function n(e){return e.data&&e.data.ignore?(Vt(t(e.target).closest('.sp-thumb-el').data('color')),zt()):(Vt(t(e.target).closest('.sp-thumb-el').data('color')),zt(),Ut(!0),y.hideAfterPaletteSelect&&It()),!1}kt(),vt.bind('click.spectrum touchstart.spectrum',(function(e){Y||At(),e.stopPropagation(),t(e.target).is('input')||e.preventDefault()})),(K.is(':disabled')||!0===y.disabled)&&Wt(),X.click(h),ot.change(Dt),ot.bind('paste',(function(){setTimeout(Dt,1)})),ot.keydown((function(t){13==t.keyCode&&Dt()})),lt.text(y.cancelText),lt.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),Ft(),It()})),ct.attr('title',y.clearText),ct.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),Ot=!0,zt(),w&&Ut(!0)})),ut.text(y.chooseText),ut.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),i&&ot.is(':focus')&&ot.trigger('change'),ot.hasClass('sp-validation-error')||(Ut(!0),It())})),dt.text(y.showPaletteOnly?y.togglePaletteMoreText:y.togglePaletteLessText),dt.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),y.showPaletteOnly=!y.showPaletteOnly,y.showPaletteOnly||w||X.css('left','-='+(J.outerWidth(!0)+5)),St()})),p(rt,(function(t,e,n){R=t/L,Ot=!1,n.shiftKey&&(R=Math.round(10*R)/10),zt()}),Et,Mt),p(tt,(function(t,e){I=parseFloat(e/A),Ot=!1,y.showAlpha||(R=1),zt()}),Et,Mt),p(Z,(function(t,e,n){if(n.shiftKey){if(!q){var r=F*E,i=M-V*M,o=Math.abs(t-r)>Math.abs(e-i);q=o?'x':'y'}}else q=null;var a=!q||'y'===q;(!q||'x'===q)&&(F=parseFloat(t/E)),a&&(V=parseFloat((M-e)/M)),Ot=!1,y.showAlpha||(R=1),zt()}),Et,Mt),bt?(Vt(bt),Ht(),wt=y.preferredFormat||k(bt).format,jt(bt)):Ht(),w&&Lt();var r=i?'mousedown.spectrum':'click.spectrum touchstart.spectrum';at.delegate('.sp-thumb-el',r,n),st.delegate('.sp-thumb-el:nth-child(1)',r,{ignore:!0},n)}();var qt={show:Lt,hide:It,toggle:At,reflow:Bt,option:function(n,r){return n===e?t.extend({},y):r===e?y[n]:(y[n]=r,'preferredFormat'===n&&(wt=y.preferredFormat),void St())},enable:function(){Y=!1,K.attr('disabled',!1),vt.removeClass('sp-disabled')},disable:Wt,offset:function(t){y.offset=t,Bt()},set:function(t){Vt(t),Ut()},get:Rt,destroy:function(){K.show(),vt.unbind('click.spectrum touchstart.spectrum'),X.remove(),gt.remove(),r[qt.id]=null},container:X};return qt.id=r.push(qt)-1,qt}function d(){}function h(t){t.stopPropagation()}function f(t,e){var n=Array.prototype.slice,r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}function p(e,n,r,o){n=n||function(){},r=r||function(){},o=o||function(){};var a=document,s=!1,l={},c=0,u=0,d='ontouchstart'in window,h={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(s){if(i&&a.documentMode<9&&!t.button)return g();var r=t&&t.touches&&t.touches[0],o=r&&r.pageX||t.pageX,h=r&&r.pageY||t.pageY,p=Math.max(0,Math.min(o-l.left,u)),v=Math.max(0,Math.min(h-l.top,c));d&&f(t),n.apply(e,[p,v,t])}}function g(){s&&(t(a).unbind(h),t(a.body).removeClass('sp-dragging'),setTimeout((function(){o.apply(e,arguments)}),0)),s=!1}h['selectstart']=f,h['dragstart']=f,h['touchmove mousemove']=p,h['touchend mouseup']=g,t(e).bind('touchstart mousedown',(function(n){var i=n.which?3==n.which:2==n.button;i||s||!1!==r.apply(e,arguments)&&(s=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(a).bind(h),t(a.body).addClass('sp-dragging'),p(n),f(n))}))}function g(){return t.fn.spectrum.inputTypeColorSupport()}var v='spectrum.id';t.fn.spectrum=function(e,n){if('string'==typeof e){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=r[t(this).data(v)];if(n){var a=n[e];if(!a)throw new Error("Spectrum: no such method: '"+e+"'");'get'==e?i=n.get():'container'==e?i=n.container:'option'==e?i=n.option.apply(n,o):'destroy'==e?(n.destroy(),t(this).removeData(v)):a.apply(n,o)}})),i}return this.spectrum('destroy').each((function(){var n=u(this,t.extend({},e,t(this).data()));t(this).data(v,n.id)}))},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=p,t.fn.spectrum.defaults=n,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("<input type='color'/>")[0];e._cachedResult='color'===n.type&&''!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t('input[type=color]');e.length&&!g()&&e.spectrum({preferredFormat:'hex6'})};var m=/^[\s,#]+/,b=/\s+$/,y=0,w=Math,x=w.round,O=w.min,C=w.max,S=w.random,k=function t(e,n){if(n=n||{},(e=e||'')instanceof t)return e;if(!(this instanceof t))return new t(e,n);var r=function(t){var e={r:0,g:0,b:0},n=1,r=!1,i=!1;'string'==typeof t&&(t=function(t){t=t.replace(m,'').replace(b,'').toLowerCase();var e,n=!1;if(U[t])t=U[t],n=!0;else if('transparent'==t)return{r:0,g:0,b:0,a:0,format:'name'};if(e=tt.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=tt.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=tt.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=tt.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=tt.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=tt.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=tt.hex8.exec(t))return{a:(r=e[1],K(r)/255),r:K(e[2]),g:K(e[3]),b:K(e[4]),format:n?'name':'hex8'};var r;if(e=tt.hex6.exec(t))return{r:K(e[1]),g:K(e[2]),b:K(e[3]),format:n?'name':'hex'};if(e=tt.hex3.exec(t))return{r:K(e[1]+''+e[1]),g:K(e[2]+''+e[2]),b:K(e[3]+''+e[3]),format:n?'name':'hex'};return!1}(t));'object'==c()(t)&&(t.hasOwnProperty('r')&&t.hasOwnProperty('g')&&t.hasOwnProperty('b')?(o=t.r,a=t.g,s=t.b,e={r:255*q(o,255),g:255*q(a,255),b:255*q(s,255)},r=!0,i='%'===String(t.r).substr(-1)?'prgb':'rgb'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('v')?(t.s=X(t.s),t.v=X(t.v),e=function(t,e,n){t=6*q(t,360),e=q(e,100),n=q(n,100);var r=w.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(t.h,t.s,t.v),r=!0,i='hsv'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('l')&&(t.s=X(t.s),t.l=X(t.l),e=function(t,e,n){var r,i,o;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=q(t,360),e=q(e,100),n=q(n,100),0===e)r=i=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,t.s,t.l),r=!0,i='hsl'),t.hasOwnProperty('a')&&(n=t.a));var o,a,s;return n=W(n),{ok:r,format:t.format||i,r:O(255,C(e.r,0)),g:O(255,C(e.g,0)),b:O(255,C(e.b,0)),a:n}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=x(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=x(this._r)),this._g<1&&(this._g=x(this._g)),this._b<1&&(this._b=x(this._b)),this._ok=r.ok,this._tc_id=y++};function j(t,e,n){t=q(t,255),e=q(e,255),n=q(n,255);var r,i,o=C(t,e,n),a=O(t,e,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:i,l:s}}function T(t,e,n){t=q(t,255),e=q(e,255),n=q(n,255);var r,i,o=C(t,e,n),a=O(t,e,n),s=o,l=o-a;if(i=0===o?0:l/o,o==a)r=0;else{switch(o){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:i,v:s}}function P(t,e,n,r){var i=[Y(x(t).toString(16)),Y(x(e).toString(16)),Y(x(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join('')}function E(t,e,n,r){var i;return[Y((i=r,Math.round(255*parseFloat(i)).toString(16))),Y(x(t).toString(16)),Y(x(e).toString(16)),Y(x(n).toString(16))].join('')}function M(t,e){e=0===e?0:e||10;var n=k(t).toHsl();return n.s-=e/100,n.s=G(n.s),k(n)}function D(t,e){e=0===e?0:e||10;var n=k(t).toHsl();return n.s+=e/100,n.s=G(n.s),k(n)}function A(t){return k(t).desaturate(100)}function L(t,e){e=0===e?0:e||10;var n=k(t).toHsl();return n.l+=e/100,n.l=G(n.l),k(n)}function _(t,e){e=0===e?0:e||10;var n=k(t).toRgb();return n.r=C(0,O(255,n.r-x(255*(-e/100)))),n.g=C(0,O(255,n.g-x(255*(-e/100)))),n.b=C(0,O(255,n.b-x(255*(-e/100)))),k(n)}function N(t,e){e=0===e?0:e||10;var n=k(t).toHsl();return n.l-=e/100,n.l=G(n.l),k(n)}function I(t,e){var n=k(t).toHsl(),r=(x(n.h)+e)%360;return n.h=r<0?360+r:r,k(n)}function F(t){var e=k(t).toHsl();return e.h=(e.h+180)%360,k(e)}function V(t){var e=k(t).toHsl(),n=e.h;return[k(t),k({h:(n+120)%360,s:e.s,l:e.l}),k({h:(n+240)%360,s:e.s,l:e.l})]}function R(t){var e=k(t).toHsl(),n=e.h;return[k(t),k({h:(n+90)%360,s:e.s,l:e.l}),k({h:(n+180)%360,s:e.s,l:e.l}),k({h:(n+270)%360,s:e.s,l:e.l})]}function z(t){var e=k(t).toHsl(),n=e.h;return[k(t),k({h:(n+72)%360,s:e.s,l:e.l}),k({h:(n+216)%360,s:e.s,l:e.l})]}function H(t,e,n){e=e||6,n=n||30;var r=k(t).toHsl(),i=360/n,o=[k(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(k(r));return o}function $(t,e){e=e||6;for(var n=k(t).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push(k({h:r,s:i,v:o})),o=(o+s)%1;return a}k.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=W(t),this._roundA=x(100*this._a)/100,this},toHsv:function(){var t=T(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=T(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),r=x(100*t.v);return 1==this._a?'hsv('+e+', '+n+'%, '+r+'%)':'hsva('+e+', '+n+'%, '+r+'%, '+this._roundA+')'},toHsl:function(){var t=j(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=j(this._r,this._g,this._b),e=x(360*t.h),n=x(100*t.s),r=x(100*t.l);return 1==this._a?'hsl('+e+', '+n+'%, '+r+'%)':'hsla('+e+', '+n+'%, '+r+'%, '+this._roundA+')'},toHex:function(t){return P(this._r,this._g,this._b,t)},toHexString:function(t){return'#'+this.toHex(t)},toHex8:function(){return E(this._r,this._g,this._b,this._a)},toHex8String:function(){return'#'+this.toHex8()},toRgb:function(){return{r:x(this._r),g:x(this._g),b:x(this._b),a:this._a}},toRgbString:function(){return 1==this._a?'rgb('+x(this._r)+', '+x(this._g)+', '+x(this._b)+')':'rgba('+x(this._r)+', '+x(this._g)+', '+x(this._b)+', '+this._roundA+')'},toPercentageRgb:function(){return{r:x(100*q(this._r,255))+'%',g:x(100*q(this._g,255))+'%',b:x(100*q(this._b,255))+'%',a:this._a}},toPercentageRgbString:function(){return 1==this._a?'rgb('+x(100*q(this._r,255))+'%, '+x(100*q(this._g,255))+'%, '+x(100*q(this._b,255))+'%)':'rgba('+x(100*q(this._r,255))+'%, '+x(100*q(this._g,255))+'%, '+x(100*q(this._b,255))+'%, '+this._roundA+')'},toName:function(){return 0===this._a?'transparent':!(this._a<1)&&(B[P(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e='#'+E(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?'GradientType = 1, ':'';t&&(n=k(t).toHex8String());return'progid:DXImageTransform.Microsoft.gradient('+r+'startColorstr='+e+',endColorstr='+n+')'},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||'hex'!==t&&'hex6'!==t&&'hex3'!==t&&'name'!==t?('rgb'===t&&(n=this.toRgbString()),'prgb'===t&&(n=this.toPercentageRgbString()),'hex'!==t&&'hex6'!==t||(n=this.toHexString()),'hex3'===t&&(n=this.toHexString(!0)),'hex8'===t&&(n=this.toHex8String()),'name'===t&&(n=this.toName()),'hsl'===t&&(n=this.toHslString()),'hsv'===t&&(n=this.toHsvString()),n||this.toHexString()):'name'===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(N,arguments)},desaturate:function(){return this._applyModification(M,arguments)},saturate:function(){return this._applyModification(D,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(I,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(H,arguments)},complement:function(){return this._applyCombination(F,arguments)},monochromatic:function(){return this._applyCombination($,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(V,arguments)},tetrad:function(){return this._applyCombination(R,arguments)}},k.fromRatio=function(t,e){if('object'==c()(t)){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]='a'===r?t[r]:X(t[r]));t=n}return k(t,e)},k.equals=function(t,e){return!(!t||!e)&&k(t).toRgbString()==k(e).toRgbString()},k.random=function(){return k.fromRatio({r:S(),g:S(),b:S()})},k.mix=function(t,e,n){n=0===n?0:n||50;var r,i=k(t).toRgb(),o=k(e).toRgb(),a=n/100,s=2*a-1,l=o.a-i.a,c=1-(r=((r=s*l==-1?s:(s+l)/(1+s*l))+1)/2),u={r:o.r*r+i.r*c,g:o.g*r+i.g*c,b:o.b*r+i.b*c,a:o.a*a+i.a*(1-a)};return k(u)},k.readability=function(t,e){var n=k(t),r=k(e),i=n.toRgb(),o=r.toRgb(),a=n.getBrightness(),s=r.getBrightness(),l=Math.max(i.r,o.r)-Math.min(i.r,o.r)+Math.max(i.g,o.g)-Math.min(i.g,o.g)+Math.max(i.b,o.b)-Math.min(i.b,o.b);return{brightness:Math.abs(a-s),color:l}},k.isReadable=function(t,e){var n=k.readability(t,e);return n.brightness>125&&n.color>500},k.mostReadable=function(t,e){for(var n=null,r=0,i=!1,o=0;o<e.length;o++){var a=k.readability(t,e[o]),s=a.brightness>125&&a.color>500,l=3*(a.brightness/125)+a.color/500;(s&&!i||s&&i&&l>r||!s&&!i&&l>r)&&(i=s,r=l,n=k(e[o]))}return n};var U=k.names={aliceblue:'f0f8ff',antiquewhite:'faebd7',aqua:'0ff',aquamarine:'7fffd4',azure:'f0ffff',beige:'f5f5dc',bisque:'ffe4c4',black:'000',blanchedalmond:'ffebcd',blue:'00f',blueviolet:'8a2be2',brown:'a52a2a',burlywood:'deb887',burntsienna:'ea7e5d',cadetblue:'5f9ea0',chartreuse:'7fff00',chocolate:'d2691e',coral:'ff7f50',cornflowerblue:'6495ed',cornsilk:'fff8dc',crimson:'dc143c',cyan:'0ff',darkblue:'00008b',darkcyan:'008b8b',darkgoldenrod:'b8860b',darkgray:'a9a9a9',darkgreen:'006400',darkgrey:'a9a9a9',darkkhaki:'bdb76b',darkmagenta:'8b008b',darkolivegreen:'556b2f',darkorange:'ff8c00',darkorchid:'9932cc',darkred:'8b0000',darksalmon:'e9967a',darkseagreen:'8fbc8f',darkslateblue:'483d8b',darkslategray:'2f4f4f',darkslategrey:'2f4f4f',darkturquoise:'00ced1',darkviolet:'9400d3',deeppink:'ff1493',deepskyblue:'00bfff',dimgray:'696969',dimgrey:'696969',dodgerblue:'1e90ff',firebrick:'b22222',floralwhite:'fffaf0',forestgreen:'228b22',fuchsia:'f0f',gainsboro:'dcdcdc',ghostwhite:'f8f8ff',gold:'ffd700',goldenrod:'daa520',gray:'808080',green:'008000',greenyellow:'adff2f',grey:'808080',honeydew:'f0fff0',hotpink:'ff69b4',indianred:'cd5c5c',indigo:'4b0082',ivory:'fffff0',khaki:'f0e68c',lavender:'e6e6fa',lavenderblush:'fff0f5',lawngreen:'7cfc00',lemonchiffon:'fffacd',lightblue:'add8e6',lightcoral:'f08080',lightcyan:'e0ffff',lightgoldenrodyellow:'fafad2',lightgray:'d3d3d3',lightgreen:'90ee90',lightgrey:'d3d3d3',lightpink:'ffb6c1',lightsalmon:'ffa07a',lightseagreen:'20b2aa',lightskyblue:'87cefa',lightslategray:'789',lightslategrey:'789',lightsteelblue:'b0c4de',lightyellow:'ffffe0',lime:'0f0',limegreen:'32cd32',linen:'faf0e6',magenta:'f0f',maroon:'800000',mediumaquamarine:'66cdaa',mediumblue:'0000cd',mediumorchid:'ba55d3',mediumpurple:'9370db',mediumseagreen:'3cb371',mediumslateblue:'7b68ee',mediumspringgreen:'00fa9a',mediumturquoise:'48d1cc',mediumvioletred:'c71585',midnightblue:'191970',mintcream:'f5fffa',mistyrose:'ffe4e1',moccasin:'ffe4b5',navajowhite:'ffdead',navy:'000080',oldlace:'fdf5e6',olive:'808000',olivedrab:'6b8e23',orange:'ffa500',orangered:'ff4500',orchid:'da70d6',palegoldenrod:'eee8aa',palegreen:'98fb98',paleturquoise:'afeeee',palevioletred:'db7093',papayawhip:'ffefd5',peachpuff:'ffdab9',peru:'cd853f',pink:'ffc0cb',plum:'dda0dd',powderblue:'b0e0e6',purple:'800080',rebeccapurple:'663399',red:'f00',rosybrown:'bc8f8f',royalblue:'4169e1',saddlebrown:'8b4513',salmon:'fa8072',sandybrown:'f4a460',seagreen:'2e8b57',seashell:'fff5ee',sienna:'a0522d',silver:'c0c0c0',skyblue:'87ceeb',slateblue:'6a5acd',slategray:'708090',slategrey:'708090',snow:'fffafa',springgreen:'00ff7f',steelblue:'4682b4',tan:'d2b48c',teal:'008080',thistle:'d8bfd8',tomato:'ff6347',turquoise:'40e0d0',violet:'ee82ee',wheat:'f5deb3',white:'fff',whitesmoke:'f5f5f5',yellow:'ff0',yellowgreen:'9acd32'},B=k.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(U);function W(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function q(t,e){(function(t){return'string'==typeof t&&-1!=t.indexOf('.')&&1===parseFloat(t)})(t)&&(t='100%');var n=function(t){return'string'==typeof t&&-1!=t.indexOf('%')}(t);return t=O(e,C(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),w.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function G(t){return O(1,C(0,t))}function K(t){return parseInt(t,16)}function Y(t){return 1==t.length?'0'+t:''+t}function X(t){return t<=1&&(t=100*t+'%'),t}var J,Z,Q,tt=(Z='[\\s|\\(]+('+(J='(?:'+'[-\\+]?\\d*\\.\\d+%?'+')|(?:'+'[-\\+]?\\d+%?'+')')+')[,|\\s]+('+J+')[,|\\s]+('+J+')\\s*\\)?',Q='[\\s|\\(]+('+J+')[,|\\s]+('+J+')[,|\\s]+('+J+')[,|\\s]+('+J+')\\s*\\)?',{rgb:new RegExp('rgb'+Z),rgba:new RegExp('rgba'+Q),hsl:new RegExp('hsl'+Z),hsla:new RegExp('hsla'+Q),hsv:new RegExp('hsv'+Z),hsva:new RegExp('hsva'+Q),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=k,t((function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()}))}(f);e["a"]=u["a"].extend({template:function(){var t=this.ppfx;return"\n <div class=\"".concat(this.holderClass(),"\"></div>\n <div class=\"").concat(t,"field-colorp\">\n <div class=\"").concat(t,"field-colorp-c\" data-colorp-c>\n <div class=\"").concat(t,"checker-bg\"></div>\n </div>\n </div>\n ")},inputClass:function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},remove:function(){u["a"].prototype.remove.apply(this,arguments),this.colorEl.spectrum('destroy')},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,r=n.get('defaults'),i=Object(s["isUndefined"])(t)?Object(s["isUndefined"])(r)?'':r:t,o=this.getInputEl(),a=this.getColorEl(),l='none'!=i?i:'';o.value=i,a.get(0).style.backgroundColor=l,(e.fromTarget||e.fromInput&&!e.avoidStore)&&(a.spectrum('set',l),this.noneColor='none'==i)},getColorEl:function(){if(!this.colorEl){var t,e=this.em,n=this,r=this.ppfx,i=this.model,o=f("<div class=\"".concat(this.ppfx,"field-color-picker\"></div>")),a=o.get(0).style,s=e&&e.config?e.config.el:'',l=e&&e.getConfig&&e.getConfig('colorPicker')||{},c=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,'')},u=0;this.$el.find("[data-colorp-c]").append(o),o.spectrum(h(h(h({containerClassName:"".concat(r,"one-bg ").concat(r,"two-color"),appendTo:s||'body',maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:'Ok',cancelText:'⨯',palette:[]},l),i.get('colorPicker')||{}),{},{move:function(t){var e=c(t);a.backgroundColor=e,i.setValueFromInput(e,0)},change:function(t){u=1;var e=c(t);a.backgroundColor=e,i.setValueFromInput(0,0),i.setValueFromInput(e),n.noneColor=0},show:function(e){u=0,t=c(e)},hide:function(e){!u&&t&&(n.noneColor&&(t=''),a.backgroundColor=t,o.spectrum('set',t),i.setValueFromInput(t,0))}})),e&&e.on&&e.on('component:selected',(function(){u=1,o.spectrum('hide')})),this.colorEl=o}return this.colorEl},render:function(){return u["a"].prototype.render.call(this),this.getColorEl(),this}})},function(t,e,n){!function(e){var n,r={},i={16:!1,18:!1,17:!1,91:!1},o='all',a={'⇧':16,shift:16,'⌥':18,alt:18,option:18,'⌃':17,ctrl:17,control:17,'⌘':91,command:91},s={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,',':188,'.':190,'/':191,'`':192,'-':189,'=':187,';':186,'\'':222,'[':219,']':221,'\\':220},l=function(t){return s[t]||t.toUpperCase().charCodeAt(0)},c=[];for(n=1;n<20;n++)s['f'+n]=111+n;function u(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}function d(t,e){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var h={16:'shiftKey',18:'altKey',17:'ctrlKey',91:'metaKey'};function f(t){for(n in i)i[n]=t[h[n]]}function p(t,e,n){var i,o;i=v(t),void 0===n&&(n=e,e='all');for(var a=0;a<i.length;a++)o=[],(t=i[a].split('+')).length>1&&(o=m(t),t=[t[t.length-1]]),t=t[0],(t=l(t))in r||(r[t]=[]),r[t].push({shortcut:i[a],scope:e,method:n,key:i[a],mods:o})}for(n in a)p[n]=!1;function g(){return o||'all'}function v(t){var e;return''==(e=(t=t.replace(/\s/g,'')).split(','))[e.length-1]&&(e[e.length-2]+=','),e}function m(t){for(var e=t.slice(0,t.length-1),n=0;n<e.length;n++)e[n]=a[e[n]];return e}function b(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent('on'+e,(function(){n(window.event)}))}b(document,'keydown',(function(t){!function(t){var e,n,o,s,l,d;if(e=t.keyCode,-1==u(c,e)&&c.push(e),93!=e&&224!=e||(e=91),e in i)for(o in i[e]=!0,a)a[o]==e&&(p[o]=!0);else if(f(t),p.filter.call(this,t)&&e in r)for(d=g(),s=0;s<r[e].length;s++)if((n=r[e][s]).scope==d||'all'==n.scope){for(o in l=n.mods.length>0,i)(!i[o]&&u(n.mods,+o)>-1||i[o]&&-1==u(n.mods,+o))&&(l=!1);(0!=n.mods.length||i[16]||i[18]||i[17]||i[91])&&!l||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)})),b(document,'keyup',(function(t){var e,n=t.keyCode,r=u(c,n);if(r>=0&&c.splice(r,1),93!=n&&224!=n||(n=91),n in i)for(e in i[n]=!1,a)a[e]==n&&(p[e]=!1)})),b(window,'focus',(function(){for(n in i)i[n]=!1;for(n in a)p[n]=!1}));var y=e.key;e.key=p,e.key.setScope=function(t){o=t||'all'},e.key.getScope=g,e.key.deleteScope=function(t){var e,n,i;for(e in r)for(n=r[e],i=0;i<n.length;)n[i].scope===t?n.splice(i,1):i++},e.key.filter=function(t){var e=(t.target||t.srcElement).tagName;return!('INPUT'==e||'SELECT'==e||'TEXTAREA'==e)},e.key.isPressed=function(t){return'string'==typeof t&&(t=l(t)),-1!=u(c,t)},e.key.getPressedKeyCodes=function(){return c.slice(0)},e.key.noConflict=function(){var t=e.key;return e.key=y,t},e.key.unbind=function(t,e){var n,i,o,a,s,c=[];for(n=v(t),a=0;a<n.length;a++){if((i=n[a].split('+')).length>1&&(c=m(i),t=i[i.length-1]),t=l(t),void 0===e&&(e=g()),!r[t])return;for(o=0;o<r[t].length;o++)(s=r[t][o]).scope===e&&d(s.mods,c)&&(r[t][o]={})}},1&&(t.exports=p)}(this)},function(t,e,n){"use strict";(function(t){var r=n(8),i=n.n(r),o=n(71),a=n(72),s=setTimeout;function l(t){return Boolean(t&&void 0!==t.length)}function c(){}function u(t){if(!(this instanceof u))throw new TypeError('Promises must be constructed via new');if('function'!=typeof t)throw new TypeError('not a function');this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],v(t,this)}function d(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,u._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void f(e.promise,t)}h(e.promise,r)}else(1===t._state?h:f)(e.promise,t._value)}))):t._deferreds.push(e)}function h(t,e){try{if(e===t)throw new TypeError('A promise cannot be resolved with itself.');if(e&&('object'===i()(e)||'function'==typeof e)){var n=e.then;if(e instanceof u)return t._state=3,t._value=e,void p(t);if('function'==typeof n)return void v((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,p(t)}catch(e){f(t,e)}var r,o}function f(t,e){t._state=2,t._value=e,p(t)}function p(t){2===t._state&&0===t._deferreds.length&&u._immediateFn((function(){t._handled||u._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)d(t,t._deferreds[e]);t._deferreds=null}function g(t,e,n){this.onFulfilled='function'==typeof t?t:null,this.onRejected='function'==typeof e?e:null,this.promise=n}function v(t,e){var n=!1;try{t((function(t){n||(n=!0,h(e,t))}),(function(t){n||(n=!0,f(e,t))}))}catch(t){if(n)return;n=!0,f(e,t)}}u.prototype['catch']=function(t){return this.then(null,t)},u.prototype.then=function(t,e){var n=new this.constructor(c);return d(this,new g(t,e,n)),n},u.prototype['finally']=o["a"],u.all=function(t){return new u((function(e,n){if(!l(t))return n(new TypeError('Promise.all accepts an array'));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function a(t,s){try{if(s&&('object'===i()(s)||'function'==typeof s)){var l=s.then;if('function'==typeof l)return void l.call(s,(function(e){a(t,e)}),n)}r[t]=s,0==--o&&e(r)}catch(t){n(t)}}for(var s=0;s<r.length;s++)a(s,r[s])}))},u.allSettled=a["a"],u.resolve=function(t){return t&&'object'===i()(t)&&t.constructor===u?t:new u((function(e){e(t)}))},u.reject=function(t){return new u((function(e,n){n(t)}))},u.race=function(t){return new u((function(e,n){if(!l(t))return n(new TypeError('Promise.race accepts an array'));for(var r=0,i=t.length;r<i;r++)u.resolve(t[r]).then(e,n)}))},u._immediateFn='function'==typeof t&&function(e){t(e)}||function(t){s(t,0)},u._unhandledRejectionFn=function(t){'undefined'!=typeof console&&console&&console.warn('Possible Unhandled Promise Rejection:',t)},e["a"]=u}).call(this,n(79).setImmediate)},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=i.a.Model.extend({defaults:{id:'',label:'',tagName:'span',className:'',command:'',context:'',buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,togglable:!0,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1},initialize:function(t){if(this.get('buttons').length){var e=n(41).default;this.set('buttons',new e(this.get('buttons')))}}});e["default"]=i.a.Collection.extend({model:o,deactivateAllExceptOne:function(t,e){this.forEach((function(n,r){n!==t&&(n.set('active',!1),e&&n.get('buttons').length&&n.get('buttons').deactivateAllExceptOne(t,e))}))},deactivateAll:function(t,e){var n=t||'';this.forEach((function(t){t.get('context')==n&&t!==e&&(t.set('active',!1,{silent:1}),t.trigger('updateActive',{fromCollection:1}))}))},disableAllButtons:function(t){var e=t||'';this.forEach((function(t,n){t.get('context')==e&&t.set('disable',!0)}))},disableAllButtonsExceptOne:function(t,e){this.forEach((function(n,r){n!==t&&(n.set('disable',!0),e&&n.get('buttons').length&&n.get('buttons').disableAllButtonsExceptOne(t,e))}))}})},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e,n){var r=n(42);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e,n){1&&function(t){"use strict";function e(t){for(var e={},n=0;n<t.length;++n)e[t[n].toLowerCase()]=!0;return e}t.defineMode("css",(function(e,n){var r=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var i,o,a=e.indentUnit,s=n.tokenHooks,l=n.documentTypes||{},c=n.mediaTypes||{},u=n.mediaFeatures||{},d=n.mediaValueKeywords||{},h=n.propertyKeywords||{},f=n.nonStandardPropertyKeywords||{},p=n.fontProperties||{},g=n.counterDescriptors||{},v=n.colorKeywords||{},m=n.valueKeywords||{},b=n.allowNested,y=n.lineComment,w=!0===n.supportsAtComponent,x=!1!==e.highlightNonStandardPropertyKeywords;function O(t,e){return i=e,t}function C(t,e){var n=t.next();if(s[n]){var r=s[n](t,e);if(!1!==r)return r}return"@"==n?(t.eatWhile(/[\w\\\-]/),O("def",t.current())):"="==n||("~"==n||"|"==n)&&t.eat("=")?O(null,"compare"):"\""==n||"'"==n?(e.tokenize=S(n),e.tokenize(t,e)):"#"==n?(t.eatWhile(/[\w\\\-]/),O("atom","hash")):"!"==n?(t.match(/^\s*\w*/),O("keyword","important")):/\d/.test(n)||"."==n&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),O("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?O(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?O("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?O(null,n):t.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(t.current().toLowerCase())&&(e.tokenize=k),O("variable callee","variable")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),O("property","word")):O(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),O("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?O("variable-2","variable-definition"):O("variable-2","variable")):t.match(/^\w+-/)?O("meta","meta"):void 0}function S(t){return function(e,n){for(var r,i=!1;null!=(r=e.next());){if(r==t&&!i){")"==t&&e.backUp(1);break}i=!i&&"\\"==r}return(r==t||!i&&")"!=t)&&(n.tokenize=null),O("string","string")}}function k(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=S(")"),O(null,"(")}function j(t,e,n){this.type=t,this.indent=e,this.prev=n}function T(t,e,n,r){return t.context=new j(n,e.indentation()+(!1===r?0:a),t.context),n}function P(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function E(t,e,n){return A[n.context.type](t,e,n)}function M(t,e,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return E(t,e,n)}function D(t){var e=t.current().toLowerCase();o=m.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var A={top:function(t,e,n){if("{"==t)return T(n,e,"block");if("}"==t&&n.context.prev)return P(n);if(w&&/@component/i.test(t))return T(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return T(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return T(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return T(n,e,"at");if("hash"==t)o="builtin";else if("word"==t)o="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return T(n,e,"interpolation");if(":"==t)return"pseudo";if(b&&"("==t)return T(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var r=e.current().toLowerCase();return h.hasOwnProperty(r)?(o="property","maybeprop"):f.hasOwnProperty(r)?(o=x?"string-2":"property","maybeprop"):b?(o=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==t?"block":b||"hash"!=t&&"qualifier"!=t?A.top(t,e,n):(o="error","block")},maybeprop:function(t,e,n){return":"==t?T(n,e,"prop"):E(t,e,n)},prop:function(t,e,n){if(";"==t)return P(n);if("{"==t&&b)return T(n,e,"propBlock");if("}"==t||"{"==t)return M(t,e,n);if("("==t)return T(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)D(e);else if("interpolation"==t)return T(n,e,"interpolation")}else o+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?P(n):"word"==t?(o="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?M(t,e,n):")"==t?P(n):"("==t?T(n,e,"parens"):"interpolation"==t?T(n,e,"interpolation"):("word"==t&&D(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(o="variable-3",n.context.type):E(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(o="tag",n.context.type):A.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return T(n,e,"atBlock_parens");if("}"==t||";"==t)return M(t,e,n);if("{"==t)return P(n)&&T(n,e,b?"block":"top");if("interpolation"==t)return T(n,e,"interpolation");if("word"==t){var r=e.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":h.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?x?"string-2":"property":m.hasOwnProperty(r)?"atom":v.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?M(t,e,n):"{"==t?P(n)&&T(n,e,b?"block":"top",!1):("word"==t&&(o="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?P(n):"{"==t||"}"==t?M(t,e,n,2):A.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?T(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):E(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,P(n)):"word"==t?(o="@font-face"==n.stateArg&&!p.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(o="variable","keyframes"):"{"==t?T(n,e,"top"):E(t,e,n)},at:function(t,e,n){return";"==t?P(n):"{"==t||"}"==t?M(t,e,n):("word"==t?o="tag":"hash"==t&&(o="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?P(n):"{"==t||";"==t?M(t,e,n):("word"==t?o="variable":"variable"!=t&&"("!=t&&")"!=t&&(o="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new j(r?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||C)(t,e);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(e.state=A[e.state](i,t,e)),o},indent:function(t,e){var n=t.context,r=e&&e.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=e(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=e(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],s=e(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=e(u),h=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=e(h),p=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],m=e(v),b=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=e(b),w=n.concat(i).concat(a).concat(l).concat(u).concat(h).concat(v).concat(b);function x(t,e){for(var n,r=!1;null!=(n=t.next());){if(r&&"/"==n){e.tokenize=null;break}r="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",w),t.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:y,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:f,colorKeywords:m,valueKeywords:y,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x,x(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x,x(t,e))}},name:"css",helperType:"gss"})}(n(13))},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t){t.DomComponents.clear(),t.CssComposer.clear()}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(3),o=n(17);e["default"]={run:function(t){Object(r["bindAll"])(this,'onKeyUp','enableDragger','disableDragger'),this.editor=t,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(t){this.toggleMove(),this.disableDragger()},onKeyUp:function(t){' '===Object(i["f"])(t)&&this.editor.stopCommand(this.id)},enableDragger:function(t){this.toggleDragger(1,t)},disableDragger:function(t){this.toggleDragger(0,t)},toggleDragger:function(t,e){var n=this.canvasModel,r=this.em,i=this.dragger,a=t?'add':'remove';this.getCanvas().classList[a]("".concat(this.ppfx,"is__grabbing")),i||(i=new o["a"]({getPosition:function(){return{x:n.get('x'),y:n.get('y')}},setPosition:function(t){var e=t.x,r=t.y;n.set({x:e,y:r})},onStart:function(t,e){r.trigger('canvas:move:start',e)},onDrag:function(t,e){r.trigger('canvas:move',e)},onEnd:function(t,e){r.trigger('canvas:move:end',e)}}),this.dragger=i),t?i.start(e):i.stop()},toggleMove:function(t){var e=this.ppfx,n=t?'add':'remove',r=t?'on':'off',o={on:i["v"],off:i["u"]},a=this.getCanvas(),s=["".concat(e,"is__grab")];!t&&s.push("".concat(e,"is__grabbing")),s.forEach((function(t){return a.classList[n](t)})),o[r](document,'keyup',this.onKeyUp),o[r](a,'mousedown',this.enableDragger),o[r](document,'mouseup',this.disableDragger)}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(0);e["default"]={run:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.component||t.getSelectedAll();return a=Object(o["isArray"])(a)?i()(a):[a],t.select(null),a.forEach((function(t){if(!t||!t.get('removable'))return n.em.logWarning('The element is not removable',{component:t});t.remove()})),a}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a=n(17);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c='dmode';e["default"]={run:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(o["bindAll"])(this,'setPosition','onStart','onDrag','onEnd','getPosition','getGuidesStatic','renderGuide','getGuidesTarget');var i=r.target,s=r.event,u=r.mode,d=r.dragger,h=void 0===d?{}:d,f=i.getEl(),p=l({doc:f.ownerDocument,onStart:this.onStart,onEnd:this.onEnd,onDrag:this.onDrag,getPosition:this.getPosition,setPosition:this.setPosition,guidesStatic:function(){return n.guidesStatic},guidesTarget:function(){return n.guidesTarget}},h);this.setupGuides(),this.opts=r,this.editor=t,this.em=t.getModel(),this.target=i,this.isTran='translate'==u,this.guidesContainer=this.getGuidesContainer(),this.guidesTarget=this.getGuidesTarget(),this.guidesStatic=this.getGuidesStatic();var g=this.dragger;return g?g.setOptions(p):(g=new a["a"](p),this.dragger=g),s&&g.start(s),this.toggleDrag(1),this.em.trigger("".concat(c,":start"),this.getEventOpts()),g},getEventOpts:function(){return{mode:this.opts.mode,target:this.target,guidesTarget:this.guidesTarget,guidesStatic:this.guidesStatic}},stop:function(){this.toggleDrag()},setupGuides:function(){(this.guides||[]).forEach((function(t){var e=t.guide;e&&e.parentNode.removeChild(e)})),this.guides=[]},getGuidesContainer:function(){var t=this,e=this.guidesEl;if(!e){var n=this.editor,r=this.em,i=this.opts,a=n.getConfig('stylePrefix'),s=document.createElement('div'),l=document.createElement('div'),c="<div class=\"".concat(a,"guide-info__line ").concat(a,"danger-bg\">\n <div class=\"").concat(a,"guide-info__content ").concat(a,"danger-color\"></div>\n </div>");(e=document.createElement('div')).className="".concat(a,"guides"),s.className="".concat(a,"guide-info ").concat(a,"guide-info__x"),l.className="".concat(a,"guide-info ").concat(a,"guide-info__y"),s.innerHTML=c,l.innerHTML=c,e.appendChild(s),e.appendChild(l),n.Canvas.getGlobalToolsEl().appendChild(e),this.guidesEl=e,this.elGuideInfoX=s,this.elGuideInfoY=l,this.elGuideInfoContentX=s.querySelector(".".concat(a,"guide-info__content")),this.elGuideInfoContentY=l.querySelector(".".concat(a,"guide-info__content")),r.on('canvas:update frame:scroll',Object(o["debounce"])((function(){t.updateGuides(),i.debug&&t.guides.forEach((function(e){return t.renderGuide(e)}))}),200))}return e},getGuidesStatic:function(){var t=this,e=[],n=this.target.getEl(),r=n.parentNode,i=void 0===r?{}:r;return Object(o["each"])(i.children,(function(r){return e=e.concat(n!==r?t.getElementGuides(r):[])})),e.concat(this.getElementGuides(i))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(t){var e,n,r=this;(t||this.guides).forEach((function(t){var i=t.origin,a=e===i?n:r.getElementPos(i);e=i,n=a,Object(o["each"])(r.getGuidePosUpdate(t,a),(function(e,n){return t[n]=e})),t.originRect=a}))},getGuidePosUpdate:function(t,e){var n={},r=e.top,i=e.height,o=e.left,a=e.width;switch(t.type){case't':n.y=r;break;case'b':n.y=r+i;break;case'l':n.x=o;break;case'r':n.x=o+a;break;case'x':n.x=o+a/2;break;case'y':n.y=r+i/2}return n},renderGuide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.guide||document.createElement('div'),n='px',r=t.active?2:1,i=e.children[0];return e.style="position: absolute; background-color: ".concat(t.active?'green':'red',";"),e.children.length||((i=document.createElement('div')).style='position: absolute; color: red; padding: 5px; top: 0; left: 0;',e.appendChild(i)),t.y?(e.style.width='100%',e.style.height="".concat(r).concat(n),e.style.top="".concat(t.y).concat(n),e.style.left=0):(e.style.width="".concat(r).concat(n),e.style.height='100%',e.style.left="".concat(t.x).concat(n),e.style.top="0".concat(n)),!t.guide&&this.guidesContainer.appendChild(e),e},getElementPos:function(t){return this.editor.Canvas.getElementPos(t,{noScroll:1})},getElementGuides:function(t){var e=this,n=this.opts,r=this.getElementPos(t),i=r.top,o=r.height,a=r.left,s=r.width,c=[{type:'t',y:i},{type:'b',y:i+o},{type:'l',x:a},{type:'r',x:a+s},{type:'x',x:a+s/2},{type:'y',y:i+o/2}].map((function(i){return l(l({},i),{},{origin:t,originRect:r,guide:n.debug&&e.renderGuide(i)})}));return c.forEach((function(t){return e.guides.push(t)})),c},getTranslate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'x',n=0;return(t||'').split(' ').forEach((function(t){var r=t.trim(),i="translate".concat(e.toUpperCase(),"(");0===r.indexOf(i)&&(n=parseFloat(r.replace(i,'')))})),n},setTranslate:function(t,e,n){var r="translate".concat(e.toUpperCase(),"("),i="".concat(r).concat(n,")"),o=(t||'').split(' ').map((function(t){return 0===t.trim().indexOf(r)&&(t=i),t})).join(' ');return o.indexOf(r)<0&&(o+=" ".concat(i)),o},getPosition:function(){var t=this.target,e=this.isTran,n=t.getStyle(),r=n.left,i=n.top,o=n.transform,a=0,s=0;return e?(a=this.getTranslate(o),s=this.getTranslate(o,'y')):(a=parseFloat(r),s=parseFloat(i)),{x:a,y:s}},setPosition:function(t){var e=t.x,n=t.y,r=t.end,i=t.position,a=t.width,s=t.height,l=this.target,c=this.isTran,u='px',d=r?'':1,h="".concat(e).concat(u),f="".concat(n).concat(u);if(c){var p=l.getStyle()['transform']||'';return p=this.setTranslate(p,'x',h),p=this.setTranslate(p,'y',f),l.addStyle({transform:p,en:d},{avoidStore:!r})}var g={position:i,width:a,height:s},v={left:h,top:f,en:d};Object(o["keys"])(g).forEach((function(t){var e=g[t];e&&(v[t]=e)})),l.addStyle(v,{avoidStore:!r})},_getDragData:function(){var t=this.target;return{target:t,parent:t.parent(),index:t.index()}},onStart:function(){var t=this.target,e=this.editor,n=this.isTran,r=this.opts,i=r.center,o=r.onStart,a=e.Canvas,s=t.getStyle(),l='absolute';if(o&&o(this._getDragData()),!n&&s.position!==l){var c=a.offset(t.getEl()),u=c.left,d=c.top,h=c.width,f=c.height;if(i){var p=a.getMouseRelativeCanvas(event);u=p.x,d=p.y}this.setPosition({x:u,y:d,width:"".concat(h,"px"),height:"".concat(f,"px"),position:l})}},onDrag:function(){var t=this,e=this.guidesTarget,n=this.opts,r=n.onDrag;this.updateGuides(e),n.debug&&e.forEach((function(e){return t.renderGuide(e)})),n.guidesInfo&&this.renderGuideInfo(e.filter((function(t){return t.active}))),r&&r(this._getDragData())},onEnd:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.editor,i=this.opts,o=this.id,a=i.onEnd;a&&a(t,n,l(l({event:t},n),this._getDragData())),r.stopCommand(o),this.hideGuidesInfo(),this.em.trigger("".concat(c,":end"),this.getEventOpts())},hideGuidesInfo:function(){var t=this;['X','Y'].forEach((function(e){var n=t["elGuideInfo".concat(e)];n&&(n.style.display='none')}))},renderGuideInfo:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.guidesStatic;this.hideGuidesInfo(),e.forEach((function(e){var r=e.origin,i=e.x,a=t.getElementPos(r),s=Object(o["isUndefined"])(i)?'y':'x',u='y'===s,d=a[u?'left':'top'],h=a.rect[u?'left':'top'],f=u?d+a.width:d+a.height,p=u?h+a.rect.width:h+a.rect.height,g=t["elGuideInfo".concat(s.toUpperCase())],v=t["elGuideInfoContent".concat(s.toUpperCase())],m=g.style,b=n.filter((function(t){return t.type===e.type})).map((function(t){var e=t.originRect,n=e.left,r=e.width,i=e.top,o=e.height,a=u?n+r:i+o;return{gap:a<d?d-a:(u?n:i)-f,guide:t}})).filter((function(t){return t.gap>0})).sort((function(t,e){return t.gap-e.gap})).map((function(t){return t.guide}))[0];if(b){var y=b.originRect,w=y.left,x=y.width,O=y.top,C=y.height,S=y.rect,k=u?w<a.left:O<a.top,j=u?w:O,T=u?S.left:S.top,P=u?w+x:O+C,E=u?S.left+S.width:S.top+S.height,M=u?e.y:e.x,D=k?P:f,A="".concat(M,"px"),L=k?d-P:j-f,_=k?h-E:T-p;m.display='',m[u?'top':'left']=A,m[u?'left':'top']="".concat(D,"px"),m[u?'width':'height']="".concat(L,"px"),v.innerHTML="".concat(Math.round(_),"px"),t.em.trigger("".concat(c,":active"),l(l({},t.getEventOpts()),{},{guide:e,guidesStatic:n,matched:b,posFirst:M,posSecond:D,size:L,sizeRaw:_,elGuideInfo:g,elGuideInfoCnt:v}))}}))},toggleDrag:function(t){var e=this.ppfx,n=this.editor,r=t?'add':'remove',i=["".concat(e,"is__grabbing")],o=n.Canvas,a=o.getBody();i.forEach((function(t){return a.classList[r](t)})),o[t?'startAutoscroll':'stopAutoscroll']()}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.components(),r=n&&n.at(0);r&&e.push(r)})),e.length&&t.select(e)}}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t.Canvas.hasFocus()||n.force){var r=[];t.getSelectedAll().forEach((function(t){for(var e=t.parent();e&&!e.get('selectable');)e=e.parent();e&&r.push(e)})),r.length&&t.select(r)}}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.collection,r=n.indexOf(t),i=n.at(r+1);e.push(i||t)})),e.length&&t.select(e)}}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.collection,r=n.indexOf(t),i=n.at(r-1);e.push(i&&r-1>=0?i:t)})),e.length&&t.select(e)}}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e["default"]={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.target,o=t.DomComponents,a=i.get('type'),s=o.getWrapper().findType(a).length,l=[];if(!s){var c=t.CssComposer.getAll(),u=i.get('style-signature');u=Object(r["isArray"])(u)?u:[u],c.forEach((function(t){var e=t.selectorsToString();u.forEach((function(n){n&&e.indexOf(n)>=0&&l.push(t)}))})),c.remove(l)}return l}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r);e["default"]={run:function(t){var e=t.getModel(),n=i()(t.getSelectedAll());n.length&&e.set('clipboard',n)}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(1),o=n.n(i),a=n(14),s=o.a.$;e["default"]=Object(r["extend"])({},a["default"],{init:function(t){Object(r["bindAll"])(this,'startDelete','stopDelete','onDelete'),this.hoverClass=this.pfx+'hover-delete',this.badgeClass=this.pfx+'badge-red'},enable:function(){this.$el.find('*').mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=s(t.target);e.data('model').get('removable')&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),s(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=s(t.target);e.data('model').get('removable')&&(e.data('model').destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html('Remove '+t.getName())}})},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e["default"]={run:function(t,e){var n=this;e&&e.set&&e.set('active',0);var r=t.getConfig(),o=t.Modal,a=r.stylePrefix;if(this.cm=t.CodeManager||null,!this.$editors){var s=this.buildEditor('htmlmixed','hopscotch','HTML'),l=this.buildEditor('css','hopscotch','CSS');this.htmlEditor=s.el,this.cssEditor=l.el;var c=i("<div class=\"".concat(a,"export-dl\"></div>"));c.append(s.$el).append(l.$el),this.$editors=c}o.open({title:r.textViewCode,content:this.$editors}).getModel().once('change:open',(function(){return t.stopCommand(n.id)})),this.htmlEditor.setContent(t.getHtml()),this.cssEditor.setContent(t.getCss())},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var r=document.createElement('textarea');!this.codeMirror&&(this.codeMirror=this.cm.getViewer('CodeMirror'));var i=this.codeMirror.clone().set({label:n,codeName:t,theme:e,input:r}),o=new this.cm.EditorView({model:i,config:this.cm.getConfig()}).render().$el;return i.init(r),{el:i,$el:o}}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e["default"]={isEnabled:function(){var t=document;return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement?1:0},enable:function(t){var e='';return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e='webkit',t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e='moz',t.mozRequestFullScreen()):t.msRequestFullscreen?t.msRequestFullscreen():console.warn('Fullscreen not supported'),e},disable:function(){var t=document;this.isEnabled()&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},fsChanged:function(t,e){document;var n=(t||'')+'fullscreenchange';this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(n,this.fsChanged))},run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.sender=e;var i=n.target,o=Object(r["isElement"])(i)?i:document.querySelector(i),a=this.enable(o||t.getContainer());this.fsChanged=this.fsChanged.bind(this,a),document.addEventListener(a+'fullscreenchange',this.fsChanged),t.trigger('change:canvasOffset')},stop:function(t,e){e&&e.set&&e.set('active',!1),this.disable(),t&&t.trigger('change:canvasOffset')}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(1),o=n.n(i),a=n(3),s=n(14),l=n(27),c=o.a.$;e["default"]=Object(r["extend"])({},l["default"],s["default"],{init:function(t){s["default"].init.apply(this,arguments),Object(r["bindAll"])(this,'initSorter','rollback','onEndMove'),this.opt=t,this.hoverClass=this.ppfx+'highlighter-warning',this.badgeClass=this.ppfx+'badge-warning',this.noSelClass=this.ppfx+'no-select'},enable:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];s["default"].enable.apply(this,e),this.getBadgeEl().addClass(this.badgeClass),this.getHighlighterEl().addClass(this.hoverClass);var r=this.$wrapper;r.css('cursor','move'),r.on('mousedown',this.initSorter),r.addClass(this.noSelClass)},toggleClipboard:function(){},initSorter:function(t){var e=c(t.target).data('model').get('draggable');e&&(this.cacheEl=null,this.startSelectPosition(t.target,this.frameEl.contentDocument),this.sorter.draggable=e,this.sorter.onEndMove=this.onEndMove.bind(this),this.stopSelectComponent(),this.$wrapper.off('mousedown',this.initSorter),Object(a["v"])(this.getContentWindow(),'keydown',this.rollback))},initSorterFromModel:function(t){var e=t.get('draggable');if(e){this.cacheEl=null;var n=t.view.el;this.startSelectPosition(n,this.frameEl.contentDocument),this.sorter.draggable=e,this.sorter.onEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),Object(a["v"])(this.getContentWindow(),'keydown',this.rollback)}},initSorterFromModels:function(t){this.cacheEl=null;var e=t[t.length-1],n=(this.em.get('currentFrame')||{}).model,r=e.getEl(n),i=r.ownerDocument;this.startSelectPosition(r,i,{onStart:this.onStart}),this.sorter.draggable=e.get('draggable'),this.sorter.toMove=t,this.sorter.onMoveClb=this.onDrag,this.sorter.onEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),Object(a["v"])(this.getContentWindow(),'keydown',this.rollback)},onEndMoveFromModel:function(){Object(a["u"])(this.getContentWindow(),'keydown',this.rollback)},onEndMove:function(){this.enable(),Object(a["u"])(this.getContentWindow(),'keydown',this.rollback)},onSelect:function(t,e){},rollback:function(t,e){(27==(t.which||t.keyCode)||e)&&(this.sorter.moved=!1,this.sorter.endMove())},getBadgeEl:function(){return this.$badge||(this.$badge=c(this.getBadge())),this.$badge},getHighlighterEl:function(){return this.$hl||(this.$hl=c(this.canvas.getHighlighter())),this.$hl},stop:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];s["default"].stop.apply(this,e),this.getBadgeEl().removeClass(this.badgeClass),this.getHighlighterEl().removeClass(this.hoverClass);var r=this.$wrapper;r.css('cursor','').unbind().removeClass(this.noSelClass)}})},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.Modal,o=t.AssetManager,a=o.getConfig(),s=o.getContainer(),l=r.modalTitle||t.t('assetManager.modalTitle')||'',c=r.types,u=r.accept;if(o.setTarget(r.target),o.onClick(r.onClick),o.onDblClick(r.onDblClick),o.onSelect(r.onSelect),!this.rendered||c){var d=o.getAll().filter((function(t){return 1}));c&&c.length&&(d=d.filter((function(t){return-1!==c.indexOf(t.get('type'))}))),o.render(d),this.rendered=1}if(u){var h=s.querySelector("input#".concat(a.stylePrefix,"uploadFile"));h&&h.setAttribute('accept',u)}return i.open({title:l,content:s}).getModel().once('change:open',(function(){return t.stopCommand(n.id)})),this},stop:function(t){return t.Modal.close(),this}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t,e){var n=t.BlockManager,r=t.Panels;if(!this.blocks){n.render();var i='views-container',o=document.createElement('div'),a=r.getPanel(i)||r.addPanel({id:i});o.appendChild(n.getContainer()),a.set('appendContent',o).trigger('change:appendContent'),this.blocks=o}this.blocks.style.display='block'},stop:function(){var t=this.blocks;t&&(t.style.display='none')}}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.n(r).a.$;e["default"]={run:function(t){var e=t.LayerManager,n=t.Panels;if(!this.layers){var r='views-container',i=document.createElement('div'),o=n.getPanel(r)||n.addPanel({id:r});i.appendChild(e.render()),o.set('appendContent',i).trigger('change:appendContent'),this.layers=i}this.layers.style.display='block'},stop:function(){var t=this.layers;t&&(t.style.display='none')}}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e["default"]={run:function(t,e){if(this.sender=e,!this.$cn){var n=t.getConfig(),r=t.Panels;this.$cn=i('<div></div>'),this.$cn2=i('<div></div>'),this.$cn.append(this.$cn2);var o=t.DeviceManager;if(o&&n.showDevices)r.addPanel({id:'devices-c'}).set('appendContent',o.render()).trigger('change:appendContent');var a=t.SelectorManager;a&&this.$cn2.append(a.render([])),this.$cn2.append(t.StyleManager.render());var s=t.StyleManager.getConfig().stylePrefix;this.$header=i("<div class=\"".concat(s,"header\">").concat(t.t('styleManager.empty'),"</div>")),this.$cn.append(this.$header),r.getPanel('views-container')?this.panel=r.getPanel('views-container'):this.panel=r.addPanel({id:'views-container'}),this.panel.set('appendContent',this.$cn).trigger('change:appendContent'),this.target=t.editor,this.listenTo(this.target,'component:toggled',this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this.target,e=this.sender;if(!e||!e.get||e.get('active')){var n=t.get('SelectorManager').getConfig().componentFirst,r=t.getSelectedAll().length;1===r||r>1&&n?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show())}},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r).a.$;e["default"]={run:function(t,e){this.sender=e;var n=t.getModel(),r=t.Config.stylePrefix,o=t.TraitManager;if(!this.$cn){var a=o.getTraitsViewer(),s=o.getConfig();this.$cn=i('<div></div>'),this.$cn2=i('<div></div>'),this.$cn.append(this.$cn2),this.$header=i('<div>').append("<div class=\"".concat(s.stylePrefix,"header\">").concat(n.t('traitManager.empty'),"</div>")),this.$cn.append(this.$header),this.$cn2.append("<div class=\"".concat(r,"traits-label\">").concat(n.t('traitManager.label'),"</div>")),this.$cn2.append(a.render().el);var l=t.Panels;(l.getPanel('views-container')?l.getPanel('views-container'):l.addPanel({id:'views-container'})).set('appendContent',this.$cn.get(0)).trigger('change:appendContent'),this.target=t.getModel(),this.listenTo(this.target,'component:toggled',this.toggleTm)}this.toggleTm()},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get('active')||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(t,e,n){"use strict";n.r(e);var r=n(0);e["default"]={run:function(t){var e=t.getModel().get('clipboard'),n=t.getSelected();e&&n&&(t.getSelectedAll().forEach((function(n){if(n){var i,o=n.collection,a=o.indexOf(n)+1,s=e.filter((function(t){return t.get('copyable')}));i=Object(r["contains"])(e,n)&&n.get('copyable')?o.add(n.clone(),{at:a}):o.add(s.map((function(t){return t.clone()})),{at:a}),(i=Object(r["isArray"])(i)?i:[i]).forEach((function(e){return t.trigger('component:paste',e)}))}})),n.emitUpdate())}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(0),a='sw-visibility';e["default"]={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanels()),this.panels},preventDrag:function(t){t.abort=1},tglEffects:function(t){var e=this.em,n=t?'on':'off';if(e){var r=e.get('Canvas'),i=r.getBody(),a=r.getToolbarEl();a&&(a.style.display=t?'none':'');var s=i.querySelectorAll(".".concat(this.ppfx,"no-pointer"));Object(o["each"])(s,(function(e){return e.style.pointerEvents=t?'all':''})),e[n]('run:tlb-move:before',this.preventDrag)}},run:function(t,e){var n=this;this.sender=e,this.selected=i()(t.getSelectedAll()),t.select(),this.shouldRunSwVisibility||(this.shouldRunSwVisibility=t.Commands.isActive(a)),this.shouldRunSwVisibility&&t.stopCommand(a),t.getModel().stopDefault();var r=this.getPanels(t),o=t.Canvas.getElement(),s=t.getEl(),l=t.Config.stylePrefix;if(!this.helper){var c=document.createElement('span');c.className="".concat(l,"off-prv fa fa-eye-slash"),s.appendChild(c),c.onclick=function(){return n.stopCommand()},this.helper=c}this.helper.style.display='inline-block',r.forEach((function(t){return t.set('visible',!1)}));var u=o.style;u.width='100%',u.height='100%',u.top='0',u.left='0',u.padding='0',u.margin='0',t.refresh(),this.tglEffects(1)},stop:function(t){var e=this.sender,n=void 0===e?{}:e,r=this.selected;n.set&&n.set('active',0);var i=this.getPanels(t);this.shouldRunSwVisibility&&(t.runCommand(a),this.shouldRunSwVisibility=!1),t.getModel().runDefault(),i.forEach((function(t){return t.set('visible',!0)})),t.Canvas.getElement().setAttribute('style',''),r&&t.select(r),delete this.selected,this.helper&&(this.helper.style.display='none'),t.refresh(),this.tglEffects()}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t,e,n){var r=n||{},i=r.el||'',o=t.Canvas,a=this.canvasResizer,s=r.options||{},l=o.getCanvasView();return s.appendTo=o.getResizerEl(),s.prefix=t.getConfig().stylePrefix,s.posFetcher=l.getElementPos.bind(l),s.mousePosFetcher=o.getMouseRelativePos,a&&!r.forceNew||(this.canvasResizer=t.Utils.Resizer.init(s),a=this.canvasResizer),a.setOptions(s),a.blur(),a.focus(i),a},stop:function(){var t=this.canvasResizer;t&&t.blur()}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(1),a=n.n(o),s=n(0),l=n(3);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var u=a.a.$;e["default"]={getOffsetMethod:function(t){return'get'+(t||'')+'OffsetViewerEl'},run:function(t,e,n){var r=n||{},o=r.state||'',a=t.getConfig(),d=this.em.getZoomDecimal(),h=r.el||'';if(!a.showOffsets||Object(l["r"])(h)||!a.showOffsetsSelected&&'Fixed'==o)t.stopCommand(this.id,n);else{var f=t.Canvas,p=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},r.elPos||f.getElementPos(h));Object(s["isUndefined"])(r.top)||(p.top=r.top),Object(s["isUndefined"])(r.left)||(p.left=r.left);var g=window.getComputedStyle(h),v=this.ppfx,m=o+'State',b=f[this.getOffsetMethod(o)](n.view);b.style.opacity='';var y=this['marginT'+o],w=this['marginB'+o],x=this['marginL'+o],O=this['marginR'+o],C=this['padT'+o],S=this['padB'+o],k=this['padL'+o],j=this['padR'+o];if(b.childNodes.length&&(this[m]='1',y=b.querySelector('[data-offset-m-t]'),w=b.querySelector('[data-offset-m-b]'),x=b.querySelector('[data-offset-m-l]'),O=b.querySelector('[data-offset-m-r]'),C=b.querySelector('[data-offset-p-t]'),S=b.querySelector('[data-offset-p-b]'),k=b.querySelector('[data-offset-p-l]'),j=b.querySelector('[data-offset-p-r]')),!this[m]){var T=o.toLowerCase(),P=T+'margin-v',E=T+'padding-v',M=u("<div class=\"".concat(v,"marginName\">")).get(0),D=u("<div class=\"".concat(v,"paddingName\">")).get(0),A=v+E+'-el',L="".concat(v+P+'-el'," ").concat(v+P),_="".concat(A," ").concat(v+E);y=u("<div class=\"".concat(L,"-top\"></div>")).get(0),w=u("<div class=\"".concat(L,"-bottom\"></div>")).get(0),x=u("<div class=\"".concat(L,"-left\"></div>")).get(0),O=u("<div class=\"".concat(L,"-right\"></div>")).get(0),C=u("<div class=\"".concat(_,"-top\"></div>")).get(0),S=u("<div class=\"".concat(_,"-bottom\"></div>")).get(0),k=u("<div class=\"".concat(_,"-left\"></div>")).get(0),j=u("<div class=\"".concat(_,"-right\"></div>")).get(0),this['marginT'+o]=y,this['marginB'+o]=w,this['marginL'+o]=x,this['marginR'+o]=O,this['padT'+o]=C,this['padB'+o]=S,this['padL'+o]=k,this['padR'+o]=j,M.appendChild(y),M.appendChild(w),M.appendChild(x),M.appendChild(O),D.appendChild(C),D.appendChild(S),D.appendChild(k),D.appendChild(j),b.appendChild(M),b.appendChild(D),this[m]='1'}var N='px',I=parseFloat(g.marginLeft.replace(N,''))*d,F=parseFloat(g.marginRight.replace(N,''))*d,V=parseFloat(g.marginTop.replace(N,''))*d,R=parseFloat(g.marginBottom.replace(N,''))*d,z=y.style,H=w.style,$=x.style,U=O.style,B=C.style,W=S.style,q=k.style,G=j.style,K=parseFloat(p.left),Y=parseFloat(g.width)*d+N;z.height=V+N,z.width=Y,z.top=p.top-V+N,z.left=K+N,H.height=R+N,H.width=Y,H.top=p.top+p.height+N,H.left=K+N;var X=p.height+V+R+N,J=p.top-V+N;$.height=X,$.width=I+N,$.top=J,$.left=K-I+N,U.height=X,U.width=F+N,U.top=J,U.left=K+p.width+N;var Z=parseFloat(g.paddingTop)*d;B.height=Z+N;var Q=parseFloat(g.paddingBottom)*d;W.height=Q+N;var tt=p.height-Q-Z+N,et=p.top+Z+N;q.height=tt,q.width=parseFloat(g.paddingLeft)*d+N,q.top=et;var nt=parseFloat(g.paddingRight)*d;G.height=tt,G.width=nt+N,G.top=et}},stop:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n||{},i=r.state||'',o=this.getOffsetMethod(i),a=t.Canvas,s=a[o](n.view);s.style.opacity=0}}},function(t,e,n){"use strict";n.r(e),e["default"]={run:function(t){this.toggleVis(t)},stop:function(t){this.toggleVis(t,0)},toggleVis:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!t.Commands.isActive('preview')){var r=n?'add':'remove';t.Canvas.getFrames().forEach((function(t){t.view.getBody().classList[r]("".concat(e.ppfx,"dashed"))}))}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={stylePrefix:'',appendTo:'',sortable:1,hidable:1,hideTextnode:1,root:'',showWrapper:1,showHover:1,scrollCanvas:{behavior:'smooth',block:'nearest'},scrollLayers:{behavior:'auto',block:'nearest'},highlightHover:1},a=n(36),s=n(0);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n={};return{name:'LayerManager',init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(n=c(c({},o),e)).stylePrefix=e.pStylePrefix,t=n.em,this},getConfig:function(){return n},onLoad:function(){e=new a["a"]({level:0,config:n,opened:n.opened||{},model:t.get('DomComponents').getWrapper()}),t&&t.on('component:selected',this.componentChanged),this.componentChanged()},postRender:function(){var t=n.appendTo,e=n.root;(e&&this.setRoot(e),t)&&(Object(s["isElement"])(t)?t:document.querySelector(t)).appendChild(this.render())},setRoot:function(t){return e.setRoot(t),this},getRoot:function(){return e.model},getAll:function(){return e},componentChanged:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r.fromLayers){var i=t.get('opened'),o=t.getSelected(),a=n.scrollLayers,s=o&&o.collection?o.collection.parent:null;for(var l in i)i[l].set('open',0);for(;s;)s.set('open',1),i[s.cid]=s,s=s.collection?s.collection.parent:null;if(o&&a){var c=o.viewLayer&&o.viewLayer.el;c&&c.scrollIntoView(a)}}},render:function(){return e.render().el},destroy:function(){e&&e.remove(),[t,e,n].forEach((function(t){return{}}))}}}},function(t,e,n){var r,i,o;1&&(i=[n(0),n(1)],void 0===(o='function'==typeof(r=function(t,e){var n=Array.prototype.slice;function r(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function i(t,e){return n.call(t,e)}function o(e,n){return null!=e&&(t.isArray(n)||(n=i(arguments,1)),t.all(n,(function(t){return t in e})))}var a,s,l=(a=!1,s=-1,function(){return a||(s++,a=!0,t.defer((function(){a=!1}))),s});function c(){this.registeredObjects=[],this.cidIndexes=[]}function u(e,n,r,i){for(var o,a=0,s=n.length;a<s;a++)if(o=n[a]){if("on"===e){if(!i.objectRegistry.register(o))continue}else if(!i.objectRegistry.unregister(o))continue;t.isFunction(o[e])&&o[e]("all",r,i)}}function d(e,n){var r=n.type,i=n.undoTypes,o=!i[r]||i[r][e];t.isFunction(o)&&o(n.object,n.before,n.after,n.options)}function h(e,r,i,o,a){if(!(i.isCurrentlyUndoRedoing||"undo"===e&&-1===i.pointer||"redo"===e&&i.pointer===i.length-1)){i.isCurrentlyUndoRedoing=!0;var s,l,c="undo"===e;for(a?l=c&&i.pointer===i.length-1||!c&&-1===i.pointer?t.clone(i.models):n.apply(i.models,c?[0,i.pointer]:[i.pointer,i.length-1]):(s=i.at(c?i.pointer:i.pointer+1),l=o?i.where({magicFusionIndex:s.get("magicFusionIndex")}):[s]),i.pointer+=(c?-1:1)*l.length;s=c?l.pop():l.shift();)s[e]();i.isCurrentlyUndoRedoing=!1,r.trigger(e,r)}}function f(t,e,n,i){if(t.track&&!t.isCurrentlyUndoRedoing&&e in i&&function(t,e){var n=t.condition,i=typeof n;return"function"===i?!!r(n,t,e):"boolean"!==i||n}(i[e],n)){var a=r(i[e]["on"],i[e],n);if(o(a,"object","before","after")){if(a.type=e,a.magicFusionIndex=l(),a.undoTypes=i,t.pointer<t.length-1)for(var s=t.length-t.pointer-1;s--;)t.pop();t.pointer=t.length,t.add(a),t.length>t.maximumStackLength&&(t.shift(),t.pointer--)}}}c.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,(function(t){return this.registeredObjects[t]}),this).concat(this.registeredObjects)}};var p={add:{undo:function(t,e,n,r){t.remove(n,r)},redo:function(t,e,n,r){r.index&&(r.at=r.index),t.add(n,r)},on:function(e,n,r){return{object:n,before:void 0,after:e,options:t.clone(r)}}},remove:{undo:function(t,e,n,r){"index"in r&&(r.at=r.index),t.add(e,r)},redo:function(t,e,n,r){t.remove(e,r)},on:function(e,n,r){return{object:n,before:e,after:void 0,options:t.clone(r)}}},change:{undo:function(e,n,r,i){t.isEmpty(n)?t.each(t.keys(r),e.unset,e):(e.set(n),i&&i.unsetData&&i.unsetData.before&&i.unsetData.before.length&&t.each(i.unsetData.before,e.unset,e))},redo:function(e,n,r,i){t.isEmpty(r)?t.each(t.keys(n),e.unset,e):(e.set(r),i&&i.unsetData&&i.unsetData.after&&i.unsetData.after.length&&t.each(i.unsetData.after,e.unset,e))},on:function(e,n){var r=e.changedAttributes(),i=t.keys(r),o=t.pick(e.previousAttributes(),i),a=t.keys(o),s=(n||(n={})).unsetData={after:[],before:[]};return i.length!=a.length&&(i.length>a.length?t.each(i,(function(t){t in o||s.before.push(t)}),this):t.each(a,(function(t){t in r||s.after.push(t)}))),{object:e,before:o,after:r,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function g(){}function v(e,n,r,i){if("object"==typeof n)return t.each(n,(function(t,n){2===e?v(e,t,r,i):v(e,n,t,r)}));switch(e){case 0:o(r,"undo","redo","on")&&t.all(t.pick(r,"undo","redo","on"),t.isFunction)&&(i[n]=r);break;case 1:i[n]&&t.isObject(r)&&(i[n]=t.extend({},i[n],r));break;case 2:delete i[n]}return this}g.prototype=p;var m=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){d("undo",this.attributes)},redo:function(t){d("redo",this.attributes)}}),b=e.Collection.extend({model:m,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),y=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new b,this.objectRegistry=new c,this.undoTypes=new g,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",(function(t,e){this.stack.setMaxLength(e)}),this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?r(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){f(this.stack,t,i(arguments,1),this.undoTypes)},register:function(){u("on",arguments,this._addToStack,this)},unregister:function(){u("off",arguments,this._addToStack,this)},unregisterAll:function(){r(this.unregister,this,this.objectRegistry.get())},undo:function(t){h("undo",this,this.stack,t)},undoAll:function(){h("undo",this,this.stack,!1,!0)},redo:function(t){h("redo",this,this.stack,t)},redoAll:function(){h("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer<n-1;default:return!1}},merge:function(e){for(var n,r=t.isArray(e)?e:i(arguments);n=r.pop();)n instanceof y&&n.stack instanceof b&&(n.stack=this.stack)},addUndoType:function(t,e){v(0,t,e,this.undoTypes)},changeUndoType:function(t,e){v(1,t,e,this.undoTypes)},removeUndoType:function(t){v(2,t,void 0,this.undoTypes)},clear:function(){this.stack.reset(),this.stack.pointer=-1}});return t.extend(y,{defaults:function(e){t.extend(y.prototype.defaults,e)},addUndoType:function(t,e){v(0,t,e,p)},changeUndoType:function(t,e){v(1,t,e,p)},removeUndoType:function(t){v(2,t,void 0,p)}}),e.UndoManager=y})?r.apply(e,i):r)||(t.exports=o))},function(t,e,n){"use strict";e["a"]=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}},function(t,e,n){"use strict";var r=n(8),i=n.n(r);e["a"]=function(t){return new this((function(e,n){if(!t||void 0===t.length)return n(new TypeError(i()(t)+' '+t+' is not iterable(cannot read property Symbol(Symbol.iterator))'));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function a(t,n){if(n&&('object'===i()(n)||'function'==typeof n)){var s=n.then;if('function'==typeof s)return void s.call(n,(function(e){a(t,e)}),(function(n){r[t]={status:'rejected',reason:n},0==--o&&e(r)}))}r[t]={status:'fulfilled',value:n},0==--o&&e(r)}for(var s=0;s<r.length;s++)a(s,r[s])}))}},function(t,e,n){var r=n(87),i=n(88),o=n(43),a=n(89);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||a()}},function(t,e,n){var r=n(42);t.exports=function(t){if(Array.isArray(t))return r(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){"use strict";n.r(e);var r=n(8),i=n.n(r),o=n(2),a=n.n(o),s=n(0),l=n(39),c=n.n(l);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n={},r={defaults:{'core:undo':{keys:'⌘+z, ctrl+z',handler:'core:undo'},'core:redo':{keys:'⌘+shift+z, ctrl+shift+z',handler:'core:redo'},'core:copy':{keys:'⌘+c, ctrl+c',handler:'core:copy'},'core:paste':{keys:'⌘+v, ctrl+v',handler:'core:paste'},'core:component-next':{keys:'s',handler:'core:component-next'},'core:component-prev':{keys:'w',handler:'core:component-prev'},'core:component-enter':{keys:'d',handler:'core:component-enter'},'core:component-exit':{keys:'a',handler:'core:component-exit'},'core:component-delete':{keys:'backspace, delete',handler:'core:component-delete',opts:{prevent:1}}}};return{keymaster:c.a,name:'Keymaps',getConfig:function(){return e},init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=d(d({},r),n),t=e.em,this.em=t,this},onLoad:function(){var t=e.defaults;for(var n in t){var r=t[n];this.add(n,r.keys,r.handler,r.opts||{})}},add:function(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=this.em,l=a.get('Commands'),u=a.getEditor(),d=a.get('Canvas'),h={id:t,keys:e,handler:r},f=n[t];return f&&this.remove(t),n[t]=h,c()(e,(function(e,n){var c={event:e,h:n};if(r=Object(s["isString"])(r)?l.get(r):r,!a.isEditing()&&!u.Canvas.isInputFocused()||o.force){o.prevent&&d.getCanvasView().preventDefault(e),'object'==i()(r)?l.runCommand(r,c):r(u,0,c);var h=[t,n.shortcut,e];a.trigger.apply(a,['keymap:emit'].concat(h)),a.trigger.apply(a,["keymap:emit:".concat(t)].concat(h))}})),a.trigger('keymap:add',h),h},get:function(t){return n[t]},getAll:function(){return n},remove:function(t){var e=this.em,r=this.get(t);if(r)return delete n[t],r.keys.split(', ').forEach((function(t){return c.a.unbind(t.trim())})),e&&e.trigger('keymap:remove',r),r},removeAll:function(){var t=this;return Object.keys(n).forEach((function(e){return t.remove(e)})),this},destroy:function(){this.removeAll(),[t,e,n].forEach((function(t){return{}})),this.em={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(70),a=n.n(o);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n,r,i={maximumStackLength:500},o=function(t){return t.avoidStore||t.noUndo};return{name:'UndoManager',init:function(){var s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=l(l({},s),i),t=n.em,this.em=t,(e=new a.a(l({track:!0,register:[]},n))).changeUndoType('change',{condition:!1}),e.changeUndoType('add',{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!o(n))return{object:e,before:void 0,after:t,options:l({},n)}}}),e.changeUndoType('remove',{on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!o(n))return{object:e,before:t,after:void 0,options:l({},n)}}});var c={on:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!r&&(r=t.previousAttributes()),!o(n)){var i={object:t,before:r,after:t.toJSON({keepSymbols:1})};return r=null,i}},undo:function(t,e,n,r){t.set(e)},redo:function(t,e,n,r){t.set(n)}},u=['style','attributes','content','src'];return u.forEach((function(t){return e.addUndoType("change:".concat(t),c)})),e.on('undo redo',(function(){return t.trigger('component:toggled change:canvasOffset')})),['undo','redo'].forEach((function(n){return e.on(n,(function(){return t.trigger(n)}))})),this},getConfig:function(){return n},add:function(t){return e.register(t),this},remove:function(t){return e.unregister(t),this},removeAll:function(){return e.unregisterAll(),this},start:function(){return e.startTracking(),this},stop:function(){return e.stopTracking(),this},undo:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!t.isEditing()&&e.undo(n),this},undoAll:function(){return e.undoAll(),this},redo:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!t.isEditing()&&e.redo(n),this},redoAll:function(){return e.redoAll(),this},hasUndo:function(){return e.isAvailable('undo')},hasRedo:function(){return e.isAvailable('redo')},getStack:function(){return e.stack},getStackGroup:function(){var t=[],e=[];return this.getStack().forEach((function(n){var r=n.get('magicFusionIndex');e.indexOf(r)<0&&(e.push(r),t.push(n))})),t},getPointer:function(){return this.getStack().pointer},clear:function(){return e.clear(),this},getInstance:function(){return e},destroy:function(){this.clear().removeAll(),[t,e,n,r].forEach((function(t){return{}})),this.em={}}}}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(80),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(26))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,l=1,c={},u=!1,d=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(t){var e=d.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return c[l]=i,r(l),l++},h.clearImmediate=f}function f(t){delete c[t]}function p(t){if(u)setTimeout(p,0,t);else{var e=c[t];if(e){u=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{f(t),u=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(26),n(81))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error('setTimeout has not been defined')}function a(){throw new Error('clearTimeout has not been defined')}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n='function'==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r='function'==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&f())}function f(){if(!u){var t=s(h);u=!0;for(var e=c.length;e;){for(l=c,c=[];++d<e;)l&&l[d].run();d=-1,e=c.length}l=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title='browser',i.browser=!0,i.env={},i.argv=[],i.version='',i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error('process.binding is not supported')},i.cwd=function(){return'/'},i.chdir=function(t){throw new Error('process.chdir is not supported')},i.umask=function(){return 0}},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}},function(t,e,n){1&&function(t){"use strict";var e={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"]]},n={};function r(t,e){var r=t.match(function(t){var e=n[t];return e||(n[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function i(t,e){return new RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function o(t,e){for(var n in t)for(var r=e[n]||(e[n]=[]),i=t[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}t.defineMode("htmlmixed",(function(n,a){var s=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag,allowMissingTagName:a.allowMissingTagName}),l={},c=a&&a.tags,u=a&&a.scriptTypes;if(o(e,l),c&&o(c,l),u)for(var d=u.length-1;d>=0;d--)l.script.unshift(["type",u[d].matches,u[d].mode]);function h(e,o){var a,c=s.token(e,o.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(e.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&u&&/>$/.test(e.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==e.current()&&function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(!i[0]||i[1].test(r(e,i[0])))return i[2]}}(l[d[1]],d[2]),p=t.getMode(n,f),g=i(d[1],!0),v=i(d[1],!1);o.token=function(t,e){return t.match(g,!1)?(e.token=h,e.localState=e.localMode=null,null):function(t,e,n){var r=t.current(),i=r.search(e);return i>-1?t.backUp(r.length-i):r.match(/<\/?$/)&&(t.backUp(r.length),t.match(e,!1)||t.match(r)),n}(t,v,e.localMode.token(t,e.localState))},o.localMode=p,o.localState=t.startState(p,s.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=e.current(),e.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:t.startState(s)}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(s,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,r){return!e.localMode||/^\s*<\//.test(n)?s.indent(e.htmlState,n,r):e.localMode.indent?e.localMode.indent(e.localState,n,r):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||s}}}}),"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(13),n(84),n(85),n(44))},function(t,e,n){1&&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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=t(e+1),r.tokenize(n,r);if(">"==i){if(1==e){r.tokenize=d;break}return r.tokenize=t(e-1),r.tokenize(n,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=h,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function h(t,e){var n,r,i=t.next();if(">"==i||"/"==i&&t.eat(">"))return e.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){e.tokenize=d,e.state=m,e.tagName=e.tagStart=null;var a=e.tokenize(t,e);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(e.tokenize=(n=i,(r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=h;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=d;break}n.next()}return t}}function p(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function v(t,e){for(var n;1;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;g(t)}}function m(t,e,n){return"openTag"==t?(n.tagStart=e.column(),b):"closeTag"==t?y:m}function b(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",O):l.allowMissingTagName&&"endTag"==t?(a="tag bracket",O(t,0,n)):(a="error",b)}function y(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",w):(a="tag error",x)}return l.allowMissingTagName&&"endTag"==t?(a="tag bracket",w(t,0,n)):(a="error",x)}function w(t,e,n){return"endTag"!=t?(a="error",w):(g(n),m)}function x(t,e,n){return a="error",w(t,0,n)}function O(t,e,n){if("word"==t)return a="attribute",C;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?v(n,r):(v(n,r),n.context=new p(n,r,i==n.indented)),m}return a="error",O}function C(t,e,n){return"equals"==t?S:(l.allowMissing||(a="error"),O(t,0,n))}function S(t,e,n){return"string"==t?k:"word"==t&&l.allowUnquoted?(a="string",O):(a="error",O(t,0,n))}function k(t,e,n){return"string"==t?k:O(t,0,n)}return d.isInText=!0,{startState:function(t){var e={tokenize:d,state:m,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;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(a=null,e.state=e.state(o||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(e,n,r){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=h&&e.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(o)for(;i;){var a=l.contextGrabbers[i.tagName];if(!a||!a.hasOwnProperty(o[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==S&&(t.state=O)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(13))},function(t,e,n){1&&function(t){"use strict";t.defineMode("javascript",(function(e,n){var r,i,o=e.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=n.typescript,u=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),r=t("keyword c"),i=t("keyword d"),o=t("operator"),a={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:r,void:r,throw:r,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:r,export:t("export"),import:t("import"),extends:r,await:r}}(),h=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,n){return r=t,i=n,e}function g(t,e){var n,r=t.next();if('"'==r||"'"==r)return e.tokenize=(n=r,function(t,e){var r,i=!1;if(s&&"@"==t.peek()&&t.match(f))return e.tokenize=g,p("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(e.tokenize=g),p("string","string")}),e.tokenize(t,e);if("."==r&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return p("number","number");if("."==r&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return p(r);if("="==r&&t.eat(">"))return p("=>","operator");if("0"==r&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return p("number","number");if(/\d/.test(r))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),p("number","number");if("/"==r)return t.eat("*")?(e.tokenize=v,v(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):Yt(t,e,1)?(function(t){for(var e,n=!1,r=!1;null!=(e=t.next());){if(!n){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(t.eat("="),p("operator","operator",t.current()));if("`"==r)return e.tokenize=m,m(t,e);if("#"==r&&"!"==t.peek())return t.skipToEnd(),p("meta","meta");if("#"==r&&t.eatWhile(u))return p("variable","property");if("<"==r&&t.match("!--")||"-"==r&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),p("comment","comment");if(h.test(r))return">"==r&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=r&&"="!=r||t.eat("="):/[<>*+\-|&?]/.test(r)&&(t.eat(r),">"==r&&t.eat(r))),"?"==r&&t.eat(".")?p("."):p("operator","operator",t.current());if(u.test(r)){t.eatWhile(u);var i=t.current();if("."!=e.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return p(o.type,o.style,i)}if("async"==i&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",i)}return p("variable","variable",i)}}function v(t,e){for(var n,r=!1;n=t.next();){if("/"==n&&r){e.tokenize=g;break}r="*"==n}return p("comment","comment")}function m(t,e){for(var n,r=!1;null!=(n=t.next());){if(!r&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=g;break}r=!r&&"\\"==n}return p("quasi","string-2",t.current())}var b="([{}])";function y(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=t.string.charAt(a),l=b.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(t.string.charAt(a-1)==s&&"\\"!=t.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(e.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function x(t,e,n,r,i,o){this.indented=t,this.column=e,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function O(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var r=t.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==e)return!0}var C={state:null,column:null,marked:null,cc:null};function S(){for(var t=arguments.length-1;t>=0;t--)C.cc.push(arguments[t])}function k(){return S.apply(null,arguments),!0}function j(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function T(t){var e=C.state;if(C.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var r=function t(e,n){if(n){if(n.block){var r=t(e,n.prev);return r?r==n.prev?n:new E(r,n.vars,!0):null}return j(e,n.vars)?n:new E(n.prev,new M(e,n.vars),!1)}return null}(t,e.context);if(null!=r)return void(e.context=r)}else if(!j(t,e.localVars))return void(e.localVars=new M(t,e.localVars));n.globalVars&&!j(t,e.globalVars)&&(e.globalVars=new M(t,e.globalVars))}function P(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function E(t,e,n){this.prev=t,this.vars=e,this.block=n}function M(t,e){this.name=t,this.next=e}var D=new M("this",new M("arguments",null));function A(){C.state.context=new E(C.state.context,C.state.localVars,!1),C.state.localVars=D}function L(){C.state.context=new E(C.state.context,C.state.localVars,!0),C.state.localVars=null}function _(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function N(t,e){var n=function(){var n=C.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new x(r,C.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function I(){var t=C.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function F(t){return function e(n){return n==t?k():";"==t||"}"==n||")"==n||"]"==n?S():k(e)}}function V(t,e){return"var"==t?k(N("vardef",e),wt,F(";"),I):"keyword a"==t?k(N("form"),$,V,I):"keyword b"==t?k(N("form"),V,I):"keyword d"==t?C.stream.match(/^\s*$/,!1)?k():k(N("stat"),B,F(";"),I):"debugger"==t?k(F(";")):"{"==t?k(N("}"),L,at,I,_):";"==t?k():"if"==t?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==I&&C.state.cc.pop()(),k(N("form"),$,V,I,jt)):"function"==t?k(Mt):"for"==t?k(N("form"),Tt,V,I):"class"==t||c&&"interface"==e?(C.marked="keyword",k(N("form","class"==t?t:e),Nt,I)):"variable"==t?c&&"declare"==e?(C.marked="keyword",k(V)):c&&("module"==e||"enum"==e||"type"==e)&&C.stream.match(/^\s*\w/,!1)?(C.marked="keyword","enum"==e?k(Gt):"type"==e?k(At,F("operator"),dt,F(";")):k(N("form"),xt,F("{"),N("}"),at,I,I)):c&&"namespace"==e?(C.marked="keyword",k(N("form"),z,V,I)):c&&"abstract"==e?(C.marked="keyword",k(V)):k(N("stat"),Q):"switch"==t?k(N("form"),$,F("{"),N("}","switch"),L,at,I,I,_):"case"==t?k(z,F(":")):"default"==t?k(F(":")):"catch"==t?k(N("form"),A,R,V,I,_):"export"==t?k(N("stat"),Rt,I):"import"==t?k(N("stat"),Ht,I):"async"==t?k(V):"@"==e?k(z,V):S(N("stat"),z,F(";"),I)}function R(t){if("("==t)return k(Lt,F(")"))}function z(t,e){return U(t,e,!1)}function H(t,e){return U(t,e,!0)}function $(t){return"("!=t?S():k(N(")"),B,F(")"),I)}function U(t,e,n){if(C.state.fatArrowAt==C.stream.start){var r=n?X:Y;if("("==t)return k(A,N(")"),it(Lt,")"),I,F("=>"),r,_);if("variable"==t)return S(A,xt,F("=>"),r,_)}var i=n?q:W;return w.hasOwnProperty(t)?k(i):"function"==t?k(Mt,i):"class"==t||c&&"interface"==e?(C.marked="keyword",k(N("form"),_t,I)):"keyword c"==t||"async"==t?k(n?H:z):"("==t?k(N(")"),B,F(")"),I,i):"operator"==t||"spread"==t?k(n?H:z):"["==t?k(N("]"),qt,I,i):"{"==t?ot(et,"}",null,i):"quasi"==t?S(G,i):"new"==t?k(function(t){return function(e){return"."==e?k(t?Z:J):"variable"==e&&c?k(mt,t?q:W):S(t?H:z)}}(n)):"import"==t?k(z):k()}function B(t){return t.match(/[;\}\)\],]/)?S():S(z)}function W(t,e){return","==t?k(B):q(t,e,!1)}function q(t,e,n){var r=0==n?W:q,i=0==n?z:H;return"=>"==t?k(A,n?X:Y,_):"operator"==t?/\+\+|--/.test(e)||c&&"!"==e?k(r):c&&"<"==e&&C.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(N(">"),it(dt,">"),I,r):"?"==e?k(z,F(":"),i):k(i):"quasi"==t?S(G,r):";"!=t?"("==t?ot(H,")","call",r):"."==t?k(tt,r):"["==t?k(N("]"),B,F("]"),I,r):c&&"as"==e?(C.marked="keyword",k(dt,r)):"regexp"==t?(C.state.lastType=C.marked="operator",C.stream.backUp(C.stream.pos-C.stream.start-1),k(i)):void 0:void 0}function G(t,e){return"quasi"!=t?S():"${"!=e.slice(e.length-2)?k(G):k(z,K)}function K(t){if("}"==t)return C.marked="string-2",C.state.tokenize=m,k(G)}function Y(t){return y(C.stream,C.state),S("{"==t?V:z)}function X(t){return y(C.stream,C.state),S("{"==t?V:H)}function J(t,e){if("target"==e)return C.marked="keyword",k(W)}function Z(t,e){if("target"==e)return C.marked="keyword",k(q)}function Q(t){return":"==t?k(I,V):S(W,F(";"),I)}function tt(t){if("variable"==t)return C.marked="property",k()}function et(t,e){return"async"==t?(C.marked="property",k(et)):"variable"==t||"keyword"==C.style?(C.marked="property","get"==e||"set"==e?k(nt):(c&&C.state.fatArrowAt==C.stream.start&&(n=C.stream.match(/^\s*:\s*/,!1))&&(C.state.fatArrowAt=C.stream.pos+n[0].length),k(rt))):"number"==t||"string"==t?(C.marked=s?"property":C.style+" property",k(rt)):"jsonld-keyword"==t?k(rt):c&&P(e)?(C.marked="keyword",k(et)):"["==t?k(z,st,F("]"),rt):"spread"==t?k(H,rt):"*"==e?(C.marked="keyword",k(et)):":"==t?S(rt):void 0;var n}function nt(t){return"variable"!=t?S(rt):(C.marked="property",k(Mt))}function rt(t){return":"==t?k(H):"("==t?S(Mt):void 0}function it(t,e,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=C.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),k((function(n,r){return n==e||r==e?S():S(t)}),r)}return i==e||o==e?k():n&&n.indexOf(";")>-1?S(t):k(F(e))}return function(n,i){return n==e||i==e?k():S(t,r)}}function ot(t,e,n){for(var r=3;r<arguments.length;r++)C.cc.push(arguments[r]);return k(N(e,n),it(t,e),I)}function at(t){return"}"==t?k():S(V,at)}function st(t,e){if(c){if(":"==t)return k(dt);if("?"==e)return k(st)}}function lt(t,e){if(c&&(":"==t||"in"==e))return k(dt)}function ct(t){if(c&&":"==t)return C.stream.match(/^\s*\w+\s+is\b/,!1)?k(z,ut,dt):k(dt)}function ut(t,e){if("is"==e)return C.marked="keyword",k()}function dt(t,e){return"keyof"==e||"typeof"==e||"infer"==e?(C.marked="keyword",k("typeof"==e?H:dt)):"variable"==t||"void"==e?(C.marked="type",k(vt)):"|"==e||"&"==e?k(dt):"string"==t||"number"==t||"atom"==t?k(vt):"["==t?k(N("]"),it(dt,"]",","),I,vt):"{"==t?k(N("}"),ft,I,vt):"("==t?k(it(gt,")"),ht,vt):"<"==t?k(it(dt,">"),dt):void 0}function ht(t){if("=>"==t)return k(dt)}function ft(t){return"}"==t?k():","==t||";"==t?k(ft):S(pt,ft)}function pt(t,e){return"variable"==t||"keyword"==C.style?(C.marked="property",k(pt)):"?"==e||"number"==t||"string"==t?k(pt):":"==t?k(dt):"["==t?k(F("variable"),lt,F("]"),pt):"("==t?S(Dt,pt):t.match(/[;\}\)\],]/)?void 0:k()}function gt(t,e){return"variable"==t&&C.stream.match(/^\s*[?:]/,!1)||"?"==e?k(gt):":"==t?k(dt):"spread"==t?k(gt):S(dt)}function vt(t,e){return"<"==e?k(N(">"),it(dt,">"),I,vt):"|"==e||"."==t||"&"==e?k(dt):"["==t?k(dt,F("]"),vt):"extends"==e||"implements"==e?(C.marked="keyword",k(dt)):"?"==e?k(dt,F(":"),dt):void 0}function mt(t,e){if("<"==e)return k(N(">"),it(dt,">"),I,vt)}function bt(){return S(dt,yt)}function yt(t,e){if("="==e)return k(dt)}function wt(t,e){return"enum"==e?(C.marked="keyword",k(Gt)):S(xt,st,St,kt)}function xt(t,e){return c&&P(e)?(C.marked="keyword",k(xt)):"variable"==t?(T(e),k()):"spread"==t?k(xt):"["==t?ot(Ct,"]"):"{"==t?ot(Ot,"}"):void 0}function Ot(t,e){return"variable"!=t||C.stream.match(/^\s*:/,!1)?("variable"==t&&(C.marked="property"),"spread"==t?k(xt):"}"==t?S():"["==t?k(z,F(']'),F(':'),Ot):k(F(":"),xt,St)):(T(e),k(St))}function Ct(){return S(xt,St)}function St(t,e){if("="==e)return k(H)}function kt(t){if(","==t)return k(wt)}function jt(t,e){if("keyword b"==t&&"else"==e)return k(N("form","else"),V,I)}function Tt(t,e){return"await"==e?k(Tt):"("==t?k(N(")"),Pt,I):void 0}function Pt(t){return"var"==t?k(wt,Et):"variable"==t?k(Et):S(Et)}function Et(t,e){return")"==t?k():";"==t?k(Et):"in"==e||"of"==e?(C.marked="keyword",k(z,Et)):S(z,Et)}function Mt(t,e){return"*"==e?(C.marked="keyword",k(Mt)):"variable"==t?(T(e),k(Mt)):"("==t?k(A,N(")"),it(Lt,")"),I,ct,V,_):c&&"<"==e?k(N(">"),it(bt,">"),I,Mt):void 0}function Dt(t,e){return"*"==e?(C.marked="keyword",k(Dt)):"variable"==t?(T(e),k(Dt)):"("==t?k(A,N(")"),it(Lt,")"),I,ct,_):c&&"<"==e?k(N(">"),it(bt,">"),I,Dt):void 0}function At(t,e){return"keyword"==t||"variable"==t?(C.marked="type",k(At)):"<"==e?k(N(">"),it(bt,">"),I):void 0}function Lt(t,e){return"@"==e&&k(z,Lt),"spread"==t?k(Lt):c&&P(e)?(C.marked="keyword",k(Lt)):c&&"this"==t?k(st,St):S(xt,st,St)}function _t(t,e){return"variable"==t?Nt(t,e):It(t,e)}function Nt(t,e){if("variable"==t)return T(e),k(It)}function It(t,e){return"<"==e?k(N(">"),it(bt,">"),I,It):"extends"==e||"implements"==e||c&&","==t?("implements"==e&&(C.marked="keyword"),k(c?dt:z,It)):"{"==t?k(N("}"),Ft,I):void 0}function Ft(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||c&&P(e))&&C.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(C.marked="keyword",k(Ft)):"variable"==t||"keyword"==C.style?(C.marked="property",k(Vt,Ft)):"number"==t||"string"==t?k(Vt,Ft):"["==t?k(z,st,F("]"),Vt,Ft):"*"==e?(C.marked="keyword",k(Ft)):c&&"("==t?S(Dt,Ft):";"==t||","==t?k(Ft):"}"==t?k():"@"==e?k(z,Ft):void 0}function Vt(t,e){if("?"==e)return k(Vt);if(":"==t)return k(dt,St);if("="==e)return k(H);var n=C.state.lexical.prev;return S(n&&"interface"==n.info?Dt:Mt)}function Rt(t,e){return"*"==e?(C.marked="keyword",k(Wt,F(";"))):"default"==e?(C.marked="keyword",k(z,F(";"))):"{"==t?k(it(zt,"}"),Wt,F(";")):S(V)}function zt(t,e){return"as"==e?(C.marked="keyword",k(F("variable"))):"variable"==t?S(H,zt):void 0}function Ht(t){return"string"==t?k():"("==t?S(z):S($t,Ut,Wt)}function $t(t,e){return"{"==t?ot($t,"}"):("variable"==t&&T(e),"*"==e&&(C.marked="keyword"),k(Bt))}function Ut(t){if(","==t)return k($t,Ut)}function Bt(t,e){if("as"==e)return C.marked="keyword",k($t)}function Wt(t,e){if("from"==e)return C.marked="keyword",k(z)}function qt(t){return"]"==t?k():S(it(H,"]"))}function Gt(){return S(N("form"),xt,F("{"),N("}"),it(Kt,"}"),I,I)}function Kt(){return S(xt,St)}function Yt(t,e,n){return e.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return _.lex=!0,I.lex=!0,{startState:function(t){var e={tokenize:g,lastType:"sof",cc:[],lexical:new x((t||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new E(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),y(t,e)),e.tokenize!=v&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==r?n:(e.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(t,e,n,r,i){var o=t.cc;for(C.state=t,C.stream=i,C.marked=null,C.cc=o,C.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);1;)if((o.length?o.pop():l?z:V)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return C.marked?C.marked:"variable"==n&&O(t,r)?"variable-2":e}}(e,n,r,i,t))},indent:function(e,r){if(e.tokenize==v||e.tokenize==m)return t.Pass;if(e.tokenize!=g)return 0;var i,s=r&&r.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(r))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==I)l=l.prev;else if(u!=jt)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=e.cc[e.cc.length-1])&&(i==W||i==q)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=s==d;return"vardef"==d?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==d&&"{"==s?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||h.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,r)?a||o:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Yt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=z&&e!=H||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/manifest+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})}(n(13))},function(t,e,n){1&&function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,r){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!r.lexical||")"!=r.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,r,i){var o=!1;return"html"==this.configuration&&(o=!!i.context&&e.test(i.context.tagName)),!o&&("tag"==t&&/>$/.test(n)&&i.context||/^</.test(r))}}),t.defineExtension("commentRange",(function(e,n,r){var i=this,o=t.innerMode(i.getMode(),i.getTokenAt(n).state).mode;i.operation((function(){if(e)i.replaceRange(o.commentEnd,r),i.replaceRange(o.commentStart,n),n.line==r.line&&n.ch==r.ch&&i.setCursor(n.line,n.ch+o.commentStart.length);else{var t=i.getRange(n,r),a=t.indexOf(o.commentStart),s=t.lastIndexOf(o.commentEnd);a>-1&&s>-1&&s>a&&(t=t.substr(0,a)+t.substring(a+o.commentStart.length,s)+t.substr(s+o.commentEnd.length)),i.replaceRange(t,n,r)}}))})),t.defineExtension("autoIndentRange",(function(t,e){var n=this;this.operation((function(){for(var r=t.line;r<=e.line;r++)n.indentLine(r,"smart")}))})),t.defineExtension("autoFormatRange",(function(e,n){var r=this,i=r.getMode(),o=r.getRange(e,n).split("\n"),a=t.copyState(i,r.getTokenAt(e).state),s=r.getOption("tabSize"),l="",c=0,u=0===e.ch;function d(){l+="\n",u=!0,++c}for(var h=0;h<o.length;++h){for(var f=new t.StringStream(o[h],s);!f.eol();){var p=t.innerMode(i,a),g=i.token(f,a),v=f.current();f.start=f.pos,u&&!/\S/.test(v)||(l+=v,u=!1),!u&&p.mode.newlineAfterToken&&p.mode.newlineAfterToken(g,v,f.string.slice(f.pos)||o[h+1]||"",p.state)&&d()}!f.pos&&i.blankLine&&i.blankLine(a),!u&&h<o.length-1&&d()}r.operation((function(){r.replaceRange(l,e,n);for(var t=e.line+1,i=e.line+c;t<=i;++t)r.indentLine(t,"smart");r.setSelection(e,r.getCursor(!1))}))}))}(n(13))},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s["return"]||s["return"]()}finally{if(i)throw o}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=n(36),a=n(5);e["default"]=i.a.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||'',this.pfx=e.stylePrefix||'',this.parent=t.parent,this.parentView=t.parentView;var n=this.pfx,r=this.ppfx,i=this.parent,o=this.collection;this.listenTo(o,'add',this.addTo),this.listenTo(o,'reset resetNavigator',this.render),this.listenTo(o,'remove',this.removeChildren),this.className="".concat(n,"layers");var s=e.em;if(e.sortable&&!this.opt.sorter){var l=s.get('Utils');this.opt.sorter=new l.Sorter({container:e.sortContainer||this.el,containerSel:".".concat(this.className),itemSel:".".concat(n,"layer"),ignoreViewChildren:1,onEndMove:function(t,e,n){var r=e.getSourceModel();s.setSelected(r,{forceChange:1}),s.trigger("".concat(a["eventDrag"],":end"),n)},avoidSelectOnEnd:1,nested:1,ppfx:r,pfx:n})}this.sorter=this.opt.sorter||'',this.$el.data('collection',o),i&&this.$el.data('model',i)},removeChildren:function(t){var e=t.viewLayer;e&&(e.remove(),t.viewLayer=0)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var r=this.level,i=this.parentView,a=e||null,s=new(0,o["a"])({level:r,model:t,parentView:i,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}).render().el;if(a)a.appendChild(s);else if(void 0!==n){var l='before';this.$el.children().length==n&&(n--,l='after'),n<0?this.$el.append(s):this.$el.children().eq(n)[l](s)}else this.$el.append(s);return s},isCountable:function(t,e){var n=t.get('type'),r=t.get('tagName');return!(('textnode'==n||'br'==r)&&e||!t.get('layerable'))},render:function(){var t=this,e=document.createDocumentFragment(),n=this.el;return n.innerHTML='',this.collection.each((function(n){return t.addToCollection(n,e)})),n.appendChild(e),n.className=this.className,this}})},function(t,e,n){var r={"./CanvasClear":45,"./CanvasClear.js":45,"./CanvasMove":46,"./CanvasMove.js":46,"./CommandAbstract":22,"./CommandAbstract.js":22,"./ComponentDelete":47,"./ComponentDelete.js":47,"./ComponentDrag":48,"./ComponentDrag.js":48,"./ComponentEnter":49,"./ComponentEnter.js":49,"./ComponentExit":50,"./ComponentExit.js":50,"./ComponentNext":51,"./ComponentNext.js":51,"./ComponentPrev":52,"./ComponentPrev.js":52,"./ComponentStyleClear":53,"./ComponentStyleClear.js":53,"./CopyComponent":54,"./CopyComponent.js":54,"./DeleteComponent":55,"./DeleteComponent.js":55,"./ExportTemplate":56,"./ExportTemplate.js":56,"./Fullscreen":57,"./Fullscreen.js":57,"./MoveComponent":58,"./MoveComponent.js":58,"./OpenAssets":59,"./OpenAssets.js":59,"./OpenBlocks":60,"./OpenBlocks.js":60,"./OpenLayers":61,"./OpenLayers.js":61,"./OpenStyleManager":62,"./OpenStyleManager.js":62,"./OpenTraitManager":63,"./OpenTraitManager.js":63,"./PasteComponent":64,"./PasteComponent.js":64,"./Preview":65,"./Preview.js":65,"./Resize":66,"./Resize.js":66,"./SelectComponent":14,"./SelectComponent.js":14,"./SelectPosition":27,"./SelectPosition.js":27,"./ShowOffset":67,"./ShowOffset.js":67,"./SwitchVisibility":68,"./SwitchVisibility.js":68};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code='MODULE_NOT_FOUND',e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=91},function(t,e,n){"use strict";n.r(e);var r=n(8),i=n.n(r),o=n(2),a=n.n(o),s=n(1),l=n.n(s),c=n(0),u={stylePrefix:'comp-',wrapperId:'wrapper',wrapperName:'Body',wrapper:{removable:!1,copyable:!1,draggable:!1,components:[],traits:[],stylable:['background','background-color','background-image','background-repeat','background-attachment','background-position','background-size']},components:[],draggableComponents:1,storeWrapper:0,processor:0,voidElements:['area','base','br','col','embed','hr','img','input','keygen','link','menuitem','meta','param','source','track','wbr']},d=n(5),h=n(21),f=n(6),p=n(35);function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var m=d["default"].extend({defaults:v(v({},d["default"].prototype.defaults),{},{type:'cell',tagName:'td',draggable:['tr']})},{isComponent:function(t){var e='',n=t.tagName;return'TD'!=n&&'TH'!=n||(e={type:'cell',tagName:n.toLowerCase()}),e}}),b=f["default"].extend({});function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var x=d["default"].extend({defaults:w(w({},d["default"].prototype.defaults),{},{tagName:'tr',draggable:['thead','tbody','tfoot'],droppable:['th','td']})},{isComponent:function(t){return'TR'==t.tagName&&!0}}),O=f["default"].extend({});function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var k=d["default"].extend({defaults:S(S({},d["default"].prototype.defaults),{},{type:'table',tagName:'table',droppable:['tbody','thead','tfoot']}),initialize:function(t,e){d["default"].prototype.initialize.apply(this,arguments);var n=this.get('components');!n.length&&n.add({type:'tbody'})}},{isComponent:function(t){var e='';return'TABLE'==t.tagName&&(e={type:'table'}),e}}),j=f["default"].extend({events:{}});function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function P(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var E=d["default"].extend({defaults:P(P({},d["default"].prototype.defaults),{},{type:'tbody',tagName:'tbody',draggable:['table'],droppable:['tr'],columns:1,rows:1}),initialize:function(t,e){d["default"].prototype.initialize.apply(this,arguments);var n=this.get('components'),r=this.get('columns'),i=this.get('rows');if(!n.length){for(var o=[];i--;){for(var a=[],s=r;s--;)a.push({type:'cell',classes:['cell']});o.push({type:'row',classes:['row'],components:a})}n.add(o)}}},{isComponent:function(t){var e='';return'TBODY'==t.tagName&&(e={type:'tbody'}),e}});function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function D(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var A=E.extend({defaults:D(D({},E.prototype.defaults),{},{type:'thead',tagName:'thead'})},{isComponent:function(t){var e='';return'THEAD'==t.tagName&&(e={type:'thead'}),e}}),L=f["default"].extend({}),_=f["default"].extend({});function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function I(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var F=E.extend({defaults:I(I({},E.prototype.defaults),{},{type:'tfoot',tagName:'tfoot'})},{isComponent:function(t){var e='';return'TFOOT'==t.tagName&&(e={type:'tfoot'}),e}}),V=f["default"].extend({});function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var H='xmlns="http://www.w3.org/2000/svg" width="100" viewBox="0 0 24 24" style="fill: rgba(0,0,0,0.15); transform: scale(0.75)"',$=d["default"].extend({defaults:z(z({},d["default"].prototype.defaults),{},{type:'image',tagName:'img',void:!0,droppable:0,editable:1,highlightable:0,resizable:{ratioDefault:1},traits:['alt'],src:"<svg ".concat(H,">\n <path d=\"M8.5 13.5l2.5 3 3.5-4.5 4.5 6H5m16 1V5a2 2 0 0 0-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2z\"></path>\n </svg>"),fallback:"<svg ".concat(H,">\n <path d=\"M2.28 3L1 4.27l2 2V19c0 1.1.9 2 2 2h12.73l2 2L21 21.72 2.28 3m2.55 0L21 19.17V5a2 2 0 0 0-2-2H4.83M8.5 13.5l2.5 3 1-1.25L14.73 18H5l3.5-4.5z\"></path>\n </svg>"),file:''}),initialize:function(t,e){d["default"].prototype.initialize.apply(this,arguments);var n=this.get('attributes');n.src&&this.set('src',n.src)},initToolbar:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];d["default"].prototype.initToolbar.apply(this,e);var r=this.em;if(r){var i=r.get('Commands'),o='image-editor';if(i.has(o)){for(var a=!1,s=this.get('toolbar'),l=0;l<s.length;l++)if('image-editor'===s[l].command){a=!0;break}a||(s.push({attributes:{class:'fa fa-pencil'},command:o}),this.set('toolbar',s))}}},getAttrToHTML:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=d["default"].prototype.getAttrToHTML.apply(this,e),i=this.getSrcResult();return i&&(r.src=i),r},getSrcResult:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get(t.fallback?'fallback':'src')||'',n=e;return e&&'<svg'===e.substr(0,4)&&(n="data:image/svg+xml;base64,".concat(window.btoa(e))),n},isDefaultSrc:function(){return this.get('src')===Object(c["result"])(this,'defaults').src},toJSON:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=d["default"].prototype.toJSON.apply(this,e);return r.src===r.attributes.src&&delete r.src,r},parseUri:function(t){var e=document.createElement('a');e.href=t;for(var n={},r=e.search.substring(1).split('&'),i=0;i<r.length;i++){var o=r[i].split('='),a=decodeURIComponent(o[0]);a&&(n[a]=decodeURIComponent(o[1]))}return{hostname:e.hostname,pathname:e.pathname,protocol:e.protocol,search:e.search,hash:e.hash,port:e.port,query:n}}},{isComponent:function(t){var e='';return'IMG'==t.tagName&&(e={type:'image'}),e}});function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function B(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?U(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var W=$.extend({defaults:B(B({},$.prototype.defaults),{},{type:'map',src:'',void:0,mapUrl:'https://maps.google.com/maps',tagName:'iframe',mapType:'q',address:'',zoom:'1',attributes:{frameborder:0},toolbar:d["default"].prototype.defaults.toolbar,traits:[{label:'Address',name:'address',placeholder:'eg. London, UK',changeProp:1},{type:'select',label:'Map type',name:'mapType',changeProp:1,options:[{value:'q',name:'Roadmap'},{value:'w',name:'Satellite'}]},{label:'Zoom',name:'zoom',type:'range',min:'1',max:'20',changeProp:1}]}),initialize:function(t,e){this.get('src')?this.parseFromSrc():this.updateSrc(),$.prototype.initialize.apply(this,arguments),this.listenTo(this,'change:address change:zoom change:mapType',this.updateSrc)},updateSrc:function(){this.set('src',this.getMapUrl())},getMapUrl:function(){var t=this.get('address'),e=this.get('zoom'),n=this.get('mapType');t=t?'&q='+t:'',e=e?'&z='+e:'',n=n?'&t='+n:'';var r=this.get('mapUrl')+'?'+t+e+n;return r+='&output=embed'},parseFromSrc:function(){var t=this.parseUri(this.get('src')).query;t.q&&this.set('address',t.q),t.z&&this.set('zoom',t.z),t.t&&this.set('mapType',t.t)}},{isComponent:function(t){var e='';return'IFRAME'==t.tagName&&/maps\.google\.com/.test(t.src)&&(e={type:'map',src:t.src}),e}}),q=f["default"].extend({tagName:'img',events:{dblclick:'onActive',click:'initResize',error:'onError',load:'onLoad',dragstart:'noDrag'},initialize:function(t){var e=this.model;f["default"].prototype.initialize.apply(this,arguments),this.listenTo(e,'change:src',this.updateSrc),this.classEmpty="".concat(this.ppfx,"plh-image");var n=this.config;n.modal&&(this.modal=n.modal),n.am&&(this.am=n.am),this.fetchFile()},fetchFile:function(){if(!this.modelOpt.temporary){var t=this.model,e=t.get('file');if(e)this.em.get('AssetManager').FileUploader().uploadFile({dataTransfer:{files:[e]}},(function(e){var n=e&&e.data&&e.data[0],r=n&&(Object(c["isString"])(n)?n:n.src);r&&t.set({src:r})})),t.set('file','')}},updateSrc:function(){var t=this.model,e=this.classEmpty,n=this.$el,r=t.getSrcResult(),i=r&&!t.isDefaultSrc();t.addAttributes({src:r}),n[i?'removeClass':'addClass'](e)},onActive:function(t){t&&t.stopPropagation();var e=this.opts.config.em,n=e?e.get('Editor'):'';n&&this.model.get('editable')&&n.runCommand('open-assets',{target:this.model,types:['image'],accept:'image/*',onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},onError:function(){var t=this.model.getSrcResult({fallback:1});t&&(this.el.src=t)},onLoad:function(){this.em.trigger('change:canvasOffset')},noDrag:function(t){return t.preventDefault(),!1},render:function(){this.renderAttributes(),this.updateSrc();var t=this.$el,e=this.model,n=t.attr('class')||'';return!e.get('src')&&t.attr('class',"".concat(n," ").concat(this.classEmpty).trim()),this.postRender(),this}}),G=q.extend({tagName:'div',events:{},initialize:function(t){q.prototype.initialize.apply(this,arguments),this.classEmpty=this.ppfx+'plh-map'},updateSrc:function(){this.getIframe().src=this.model.get('src')},getIframe:function(){if(!this.iframe){var t=document.createElement('iframe');t.src=this.model.get('src'),t.frameBorder=0,t.style.height='100%',t.style.width='100%',t.className=this.ppfx+'no-pointer',this.iframe=t}return this.iframe},render:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return q.prototype.render.apply(this,e),this.updateClasses(),this.el.appendChild(this.getIframe()),this}});function K(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?K(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var X=d["default"].extend({defaults:Y(Y({},d["default"].prototype.defaults),{},{type:'text',droppable:!1,editable:!0}),toHTML:function(){return this.trigger('sync:content',{silent:1}),d["default"].prototype.toHTML.apply(this,arguments)}});function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Q=X.extend({defaults:Z(Z({},X.prototype.defaults),{},{type:'link',tagName:'a',traits:['title','href','target']}),getAttrToHTML:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=X.prototype.getAttrToHTML.apply(this,e);return delete r.onmousedown,r}},{isComponent:function(t){var e;if('A'==t.tagName){e={type:'link',editable:0};var n=t.childNodes,r=n.length;r||delete e.editable;for(var i=0;i<r;i++){var o=n[i];if(3==o.nodeType&&''!=o.textContent.trim()){delete e.editable;break}}}return e}}),tt=n(3);function et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function nt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?et(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var rt=f["default"].prototype,it=f["default"].extend({events:{dblclick:'onActive',input:'onInput'},initialize:function(t){rt.initialize.apply(this,arguments),this.disableEditing=this.disableEditing.bind(this);var e=this.model,n=this.em;this.listenTo(e,'focus',this.onActive),this.listenTo(e,'change:content',this.updateContentText),this.listenTo(e,'sync:content',this.syncContent),this.rte=n&&n.get('RichTextEditor')},updateContentText:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.fromDisable&&this.disableEditing()},onActive:function(t){var e=this.rte,n=this.em;if(!(this.rteEnabled||!this.model.get('editable')||n&&n.isEditing())){if(t&&t.stopPropagation&&t.stopPropagation(),e)try{this.activeRte=e.enable(this,this.activeRte)}catch(t){n.logError(t)}this.toggleEvents(1)}},onDisable:function(){this.disableEditing()},disableEditing:function(){var t=this.model,e=this.rte,n=this.activeRte,r=this.em,i=t.get('editable');if(e&&i){try{e.disable(this,n)}catch(t){r.logError(t)}this.syncContent()}this.toggleEvents()},getContent:function(){var t=this.activeRte;return t&&'function'==typeof t.getContent?t.getContent():this.getChildrenContainer().innerHTML},syncContent:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.rte,r=this.rteEnabled;if(r||t.force){var i=this.getContent(),o=e.components(),a=nt({fromDisable:1},t);if(e.set('content','',a),n.customRte)o.length&&o.reset(null,t),e.set('content',i,a);else{var s=function e(n){var r=!!n.get('textable'),i=!['text','default',''].some((function(t){return n.is(t)}))||r;n.set(nt({_innertext:!i,editable:i&&n.get('editable'),selectable:i,hoverable:i,removable:r,draggable:r,highlightable:0,copyable:r},!r&&{toolbar:''}),t),n.get('components').each((function(t){return e(t)}))};o.reset(i,t),o.each((function(t){return s(t)})),o.trigger('resetNavigator')}}},onInput:function(){var t=this.em,e='component',n=["".concat(e,":update"),"".concat(e,":input")].join(' ');t&&t.trigger(n,this.model)},disablePropagation:function(t){t.stopPropagation()},toggleEvents:function(t){var e=this.em,n=this.model,r={on:tt["v"],off:tt["u"]},i=t?'on':'off';e.setEditing(t),this.rteEnabled=!!t;var o=[this.el.ownerDocument,document];if(r.off(o,'mousedown',this.disableEditing),r[i](o,'mousedown',this.disableEditing),e[i]('toolbar:run:before',this.disableEditing),n[i]('removed',this.disableEditing),this.$el.off('mousedown',this.disablePropagation),this.$el[i]('mousedown',this.disablePropagation),this.config.draggableComponents)for(var a=this.el;a;)a.draggable=!t,(a=a.parentNode)&&'BODY'==a.tagName&&(a=0)}}),ot=it.extend({render:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return it.prototype.render.apply(this,e),this.el.addEventListener('click',this.prevDef,!0),this}});function at(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function st(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?at(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):at(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var lt=X.extend({defaults:st(st({},X.prototype.defaults),{},{tagName:'label',traits:['id','title','for']})},{isComponent:function(t){if('LABEL'==t.tagName)return{type:'label'}}}),ct=ot.extend({tagName:'span'});function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ht='yt',ft='vi',pt='ytnc',gt=$.extend({defaults:dt(dt({},$.prototype.defaults),{},{type:'video',tagName:'video',videoId:'',void:0,provider:'so',ytUrl:'https://www.youtube.com/embed/',ytncUrl:'https://www.youtube-nocookie.com/embed/',viUrl:'https://player.vimeo.com/video/',loop:0,poster:'',muted:0,autoplay:0,controls:1,color:'',list:'',rel:1,modestbranding:0,sources:[],attributes:{allowfullscreen:'allowfullscreen'}}),initialize:function(t,e){this.em=e.em,this.get('src')&&this.parseFromSrc(),this.updateTraits(),this.listenTo(this,'change:provider',this.updateTraits),this.listenTo(this,'change:videoId change:provider',this.updateSrc),$.prototype.initialize.apply(this,arguments)},updateTraits:function(){var t,e='iframe';switch(this.get('provider')){case ht:case pt:t=this.getYoutubeTraits();break;case ft:t=this.getVimeoTraits();break;default:e='video',t=this.getSourceTraits()}this.set({tagName:e},{silent:1}),this.set({traits:t}),this.em.trigger('component:toggled')},parseFromSrc:function(){var t=this.get('provider'),e=this.parseUri(this.get('src')),n=e.query;switch(t){case ht:case pt:case ft:var r=e.pathname.split('/').pop();this.set('videoId',r),n.list&&this.set('list',n.list),n.autoplay&&this.set('autoplay',1),n.loop&&this.set('loop',1),0===parseInt(n.controls)&&this.set('controls',0),n.color&&this.set('color',n.color),'0'===n.rel&&this.set('rel',0),'1'===n.modestbranding&&this.set('modestbranding',1)}},updateSrc:function(){var t='';switch(this.get('provider')){case ht:t=this.getYoutubeSrc();break;case pt:t=this.getYoutubeNoCookieSrc();break;case ft:t=this.getVimeoSrc()}this.set({src:t})},getAttrToHTML:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=$.prototype.getAttrToHTML.apply(this,e),i=this.get('provider');switch(i){case ht:case pt:case ft:break;default:this.get('loop')&&(r.loop='loop'),this.get('autoplay')&&(r.autoplay='autoplay'),this.get('controls')&&(r.controls='controls')}return r},getProviderTrait:function(){return{type:'select',label:'Provider',name:'provider',changeProp:1,options:[{value:'so',name:'HTML5 Source'},{value:ht,name:'Youtube'},{value:pt,name:'Youtube (no cookie)'},{value:ft,name:'Vimeo'}]}},getSourceTraits:function(){return[this.getProviderTrait(),{label:'Source',name:'src',placeholder:'eg. ./media/video.mp4',changeProp:1},{label:'Poster',name:'poster',placeholder:'eg. ./media/image.jpg'},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait()]},getYoutubeTraits:function(){return[this.getProviderTrait(),{label:'Video ID',name:'videoId',placeholder:'eg. jNQXAC9IVRw',changeProp:1},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait(),{type:'checkbox',label:'Related',name:'rel',changeProp:1},{type:'checkbox',label:'Modest',name:'modestbranding',changeProp:1}]},getVimeoTraits:function(){return[this.getProviderTrait(),{label:'Video ID',name:'videoId',placeholder:'eg. 123456789',changeProp:1},{label:'Color',name:'color',placeholder:'eg. FF0000',changeProp:1},this.getAutoplayTrait(),this.getLoopTrait()]},getAutoplayTrait:function(){return{type:'checkbox',label:'Autoplay',name:'autoplay',changeProp:1}},getLoopTrait:function(){return{type:'checkbox',label:'Loop',name:'loop',changeProp:1}},getControlsTrait:function(){return{type:'checkbox',label:'Controls',name:'controls',changeProp:1}},getYoutubeSrc:function(){var t=this.get('videoId'),e=this.get('ytUrl'),n=this.get('list');return e+=t+(t.indexOf('?')<0?'?':''),e+=n?"&list=".concat(n):'',e+=this.get('autoplay')?'&autoplay=1':'',e+=this.get('controls')?'':'&controls=0&showinfo=0',e+=this.get('loop')?"&loop=1&playlist=".concat(t):'',e+=this.get('rel')?'':'&rel=0',e+=this.get('modestbranding')?'&modestbranding=1':''},getYoutubeNoCookieSrc:function(){var t=this.getYoutubeSrc();return t=t.replace(this.get('ytUrl'),this.get('ytncUrl'))},getVimeoSrc:function(){var t=this.get('viUrl');return t+=this.get('videoId')+'?',t+=this.get('autoplay')?'&autoplay=1':'',t+=this.get('loop')?'&loop=1':'',t+=this.get('controls')?'':'&title=0&portrait=0&badge=0',t+=this.get('color')?'&color='+this.get('color'):''}},{isComponent:function(t){var e='',n=/youtube\.com\/embed/.test(t.src),r=/youtube-nocookie\.com\/embed/.test(t.src),i=/player\.vimeo\.com\/video/.test(t.src),o=n||r||i;return('VIDEO'==t.tagName||'IFRAME'==t.tagName&&o)&&(e={type:'video'},t.src&&(e.src=t.src),o&&(n?e.provider=ht:r?e.provider=pt:i&&(e.provider=ft))),e}}),vt=q.extend({tagName:'div',events:{},initialize:function(t){f["default"].prototype.initialize.apply(this,arguments);var e=this.model,n=['loop','autoplay','controls','color','rel','modestbranding','poster'],r=n.map((function(t){return"change:".concat(t)})).join(' ');this.listenTo(e,'change:provider',this.updateProvider),this.listenTo(e,'change:src',this.updateSrc),this.listenTo(e,r,this.updateVideo)},updateProvider:function(){var t=this.model.get('provider');this.el.innerHTML='',this.el.appendChild(this.renderByProvider(t))},updateSrc:function(){var t=this.model,e=this.videoEl;if(e){var n=t.get('provider'),r=t.get('src');switch(n){case'yt':r=t.getYoutubeSrc();break;case'ytnc':r=t.getYoutubeNoCookieSrc();break;case'vi':r=t.getVimeoSrc()}e.src=r}},updateVideo:function(){var t=this.model.get('provider'),e=this.videoEl,n=this.model;switch(t){case'yt':case'ytnc':case'vi':this.model.trigger('change:videoId');break;default:e.loop=n.get('loop'),e.autoplay=n.get('autoplay'),e.controls=n.get('controls'),e.poster=n.get('poster')}},renderByProvider:function(t){var e;switch(t){case'yt':e=this.renderYoutube();break;case'ytnc':e=this.renderYoutubeNoCookie();break;case'vi':e=this.renderVimeo();break;default:e=this.renderSource()}return this.videoEl=e,e},renderSource:function(){var t=document.createElement('video');return t.src=this.model.get('src'),this.initVideoEl(t),t},renderYoutube:function(){var t=document.createElement('iframe');return t.src=this.model.getYoutubeSrc(),t.frameBorder=0,t.setAttribute('allowfullscreen',!0),this.initVideoEl(t),t},renderYoutubeNoCookie:function(){var t=document.createElement('iframe');return t.src=this.model.getYoutubeNoCookieSrc(),t.frameBorder=0,t.setAttribute('allowfullscreen',!0),this.initVideoEl(t),t},renderVimeo:function(){var t=document.createElement('iframe');return t.src=this.model.getVimeoSrc(),t.frameBorder=0,t.setAttribute('allowfullscreen',!0),this.initVideoEl(t),t},initVideoEl:function(t){t.className=this.ppfx+'no-pointer',t.style.height='100%',t.style.width='100%'},render:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];q.prototype.render.apply(this,e),this.updateClasses();var r=this.model.get('provider');return this.el.appendChild(this.renderByProvider(r)),this.updateVideo(),this}});function mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var yt=d["default"].extend({defaults:bt(bt({},d["default"].prototype.defaults),{},{type:'script',droppable:!1,draggable:!1,layerable:!1})},{isComponent:function(t){if('SCRIPT'==t.tagName){var e={type:'script'};return t.src&&(e.src=t.src,e.onload=t.onload),e}}}),wt=q.extend({tagName:'script',events:{},render:function(){var t=this.model,e=t.get('src'),n=this.em,r=n&&n.get('scriptCount')?n.get('scriptCount'):0,i='';if(e){var o=t.get('onload'),a='script'+r,s='script'+(r+1);i='var '+a+" = document.createElement('script');\n"+a+'.onload = function(){\n'+(o?o+'();\n':'')+'typeof '+s+"Start == 'function' && "+s+'Start();\n'+'};\n'+a+".src = '"+e+"';\n"+'function '+a+'Start() { document.body.appendChild('+a+'); };\n'+(r?'':a+'Start();'),n&&n.set('scriptCount',r+1)}else i=t.get('content');return this.el.innerHTML=i,this.postRender(),this}});function xt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ot(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xt(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Ct=d["default"].extend({defaults:Ot(Ot({},d["default"].prototype.defaults),{},{resizable:{ratioDefault:1},highlightable:0}),getName:function(){var t=this.get('tagName'),e=this.get('custom-name');return t=t.charAt(0).toUpperCase()+t.slice(1),e||t}},{isComponent:function(t){if(SVGElement&&t instanceof SVGElement)return{tagName:t.tagName,type:'svg'}}});function St(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function kt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?St(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var jt=Ct.extend({defaults:kt(kt({},Ct.prototype.defaults),{},{selectable:!1,hoverable:!1,layerable:!1})},{isComponent:function(t){if(Ct.isComponent(t)&&'svg'!==t.tagName.toLowerCase())return{tagName:t.tagName,type:'svg-in'}}}),Tt=f["default"].extend({_createElement:function(t){return document.createElementNS('http://www.w3.org/2000/svg',t)}});function Pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Et(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Mt=d["default"].extend({defaults:Et(Et({},d["default"].prototype.defaults),{},{tagName:'',droppable:!1,layerable:!1,editable:!0}),toHTML:function(){return this.get('content').replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''')}},{isComponent:function(t){var e='';return 3===t.nodeType&&(e={type:'textnode',content:t.textContent}),e}});function Dt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var At=Mt.extend({defaults:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Dt(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Mt.prototype.defaults),toHTML:function(){return"\x3c!--".concat(this.get('content'),"--\x3e")}},{isComponent:function(t){if(8==t.nodeType)return{tagName:'NULL',type:'comment',content:t.textContent}}}),Lt=f["default"].extend({initialize:function(){f["default"].prototype.initialize.apply(this,arguments)},_setAttributes:function(){},renderAttributes:function(){},setAttribute:function(){},updateAttributes:function(){},initClasses:function(){},initComponents:function(){},delegateEvents:function(){},_createElement:function(){return document.createTextNode('')},render:function(){var t=this.model,e=this.el;return t.opt.temporary||(e.textContent=t.get('content')),this}}),_t=Lt.extend({_createElement:function(){return document.createComment(this.model.get('content'))}}),Nt=d["default"].extend({},{isComponent:function(){return!1}});function It(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ft(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?It(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n,r={},o={},a=[{id:'cell',model:m,view:b},{id:'row',model:x,view:O},{id:'table',model:k,view:j},{id:'thead',model:A,view:L},{id:'tbody',model:E,view:_},{id:'tfoot',model:F,view:V},{id:'map',model:W,view:G},{id:'link',model:Q,view:ot},{id:'label',model:lt,view:ct},{id:'video',model:gt,view:vt},{id:'image',model:$,view:q},{id:'script',model:yt,view:wt},{id:'svg-in',model:jt,view:Tt},{id:'svg',model:Ct,view:Tt},{id:'comment',model:At,view:_t},{id:'textnode',model:Mt,view:Lt},{id:'text',model:X,view:it},{id:'wrapper',model:Nt,view:f["default"]},{id:'default',model:d["default"],view:f["default"]}];return{Component:d["default"],Components:h["a"],ComponentsView:p["a"],componentTypes:a,componentsById:o,name:'DomComponents',getConfig:function(){return r},storageKey:function(){var t=[],e=r.stm&&r.stm.getConfig()||{};return e.storeHtml&&t.push('html'),e.storeComponents&&t.push('components'),t},init:function(i){var o=this;for(var s in t=(r=i||{}).em,this.em=t,t&&(r.components=t.config.components||r.components),u)s in r||(r[s]=u[s]);var l=r.pStylePrefix;if(l&&(r.stylePrefix=l+r.stylePrefix),t){r.modal=t.get('Modal')||'',r.am=t.get('AssetManager')||'',t.get('Parser').compTypes=a,t.on('change:componentHovered',this.componentHovered,this);var c=t.get('selected');t.listenTo(c,'add',(function(t,e,n){return o.selectAdd(t,n)})),t.listenTo(c,'remove',(function(t,e,n){return o.selectRemove(t,n)}))}var h=r.components,p=Ft({},r.wrapper);return p['custom-name']=r.wrapperName,p.wrapper=1,p.type='wrapper',h&&h.constructor===Object&&h.wrapper&&(p=Ft({},h),h=h.components||[],p.components=[],t&&(t.config.components=h,r.components=h)),(e=new d["default"](p,{em:t,config:r,componentTypes:a,domc:this})).set({attributes:{id:'wrapper'}}),n=new f["default"]({model:e,config:r,componentTypes:a}),this},onLoad:function(){this.setComponents(r.components)},postLoad:function(t){this.handleChanges(this.getWrapper(),null,{avoidStore:1})},handleChanges:function(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=e.components(),a=t.get('UndoManager'),s=t.handleUpdates.bind(t),l=this.handleChanges.bind(this),c=this.handleChangesColl.bind(this),u=this.handleRemoves.bind(this);a&&a.add(e),a&&o&&a.add(o);var d='change:style change:content change:attributes change:src';[[e,d,s],[e,'change:components',c],[o,'add',l],[o,'remove',u],[e.get('classes'),'add remove',s]].forEach((function(e){t.stopListening(e[0],e[1],e[2]),t.listenTo(e[0],e[1],e[2])})),!i.avoidStore&&s('','',i),o.each((function(t){return r.handleChanges(t,n,i)}))},handleChangesColl:function(e,n){var r=t.get('UndoManager');if(r&&n instanceof l.a.Collection){var i=this.handleChanges.bind(this),o=this.handleRemoves.bind(this);r.add(n),[[n,'add',i],[n,'remove',o]].forEach((function(e){t.stopListening(e[0],e[1],e[2]),t.listenTo(e[0],e[1],e[2])}))}},handleRemoves:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!r.avoidStore&&t.handleUpdates(e,n,r)},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',e=this.em,n='';!t&&r.stm&&(t=r.em.getCacheLoad());var i=t,o=i.components,a=i.html;if(o)if(Object(c["isObject"])(o)||Object(c["isArray"])(o))n=o;else try{n=JSON.parse(o)}catch(t){e&&e.logError(t)}else a&&(n=a);var s=n&&n.constructor===Object;return(n&&n.length||s)&&(this.clear(),s?this.getWrapper().set(n):this.getComponents().add(n)),n},store:function(t){if(r.stm){var e={},n=this.storageKey();if(n.indexOf('html')>=0&&(e.html=r.em.getHtml()),n.indexOf('components')>=0){this.em;var i=r.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(i)}return t||r.stm.store(e),e}},getComponent:function(){return e},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get('components')},addComponent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getComponents().add(t,e)},render:function(){return n.render().el},clear:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getComponents().map((function(t){return t})).forEach((function(e){return e.remove(t)})),this},setComponents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.clear(e).addComponent(t,e)},addType:function(t,e){var n=this.em,r=e.model,o=void 0===r?{}:r,s=e.view,l=void 0===s?{}:s,u=e.isComponent,d=e.extend,h=e.extendView,f=e.extendFn,p=void 0===f?[]:f,g=e.extendFnView,v=void 0===g?[]:g,m=this.getType(t),b=this.getType(d),y=this.getType(h),w=b||(m||this.getType('default')),x=w.model,O=y?y.view:w.view,C=function(t,e,n){return t.reduce((function(t,r){var i=e[r],o=n.prototype[r];return i&&o&&(t[r]=function(){o.bind(this).apply(void 0,arguments),i.bind(this).apply(void 0,arguments)}),t}),{})};'object'===i()(o)&&(e.model=x.extend(Ft(Ft(Ft({},o),C(p,o,x)),{},{defaults:Ft(Ft({},x.prototype.defaults),Object(c["result"])(o,'defaults')||{})}),{isComponent:!m||b||u?u||function(){return 0}:x.isComponent})),'object'===i()(l)&&(e.view=O.extend(Ft(Ft({},l),C(v,l,O)))),m?(m.model=e.model,m.view=e.view):(e.id=t,a.unshift(e));var S="component:type:".concat(m?'update':'add');return n&&n.trigger(S,m||e),this},getType:function(t){for(var e=a,n=0;n<e.length;n++){if(e[n].id==t)return e[n]}},removeType:function(t){var e=a,n=this.getType(t);if(n){var r=e.indexOf(n);return e.splice(r,1),n}},getTypes:function(){return a},selectAdd:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(t.set({status:'selected'}),['component:selected','component:toggled'].forEach((function(r){return e.em.trigger(r,t,n)})))},selectRemove:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){this.em;t.set({status:'',state:''}),['component:deselected','component:toggled'].forEach((function(r){return e.em.trigger(r,t,n)}))}},componentHovered:function(){var t=r.em,e=t.get('componentHovered'),n=t.previous('componentHovered'),i='hovered';n&&n.get('status')==i&&n.set({status:'',state:''}),e&&Object(c["isEmpty"])(e.get('status'))&&e.set('status',i)},allById:function(){return o},destroy:function(){this.clear(),n.remove(),[r,t,o,e,n].forEach((function(t){return{}})),this.em={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(3),l=n(15),c=n.n(l),u=n(16),d=n.n(u),h=n(0),f=function(){function t(e,n){var r=this;c()(this,t),this.em=e;var i=n||e.get('Canvas').getFrames().map((function(t){return t.get('root').getEl()})),o=Array.isArray(i)?i:[i];return this.el=i,this.counter=0,Object(h["bindAll"])(this,'handleDragEnter','handleDragOver','handleDrop','handleDragLeave'),o.forEach((function(t){return r.toggleEffects(t,1)})),this}return d()(t,[{key:"toggleEffects",value:function(t,e){var n={on:s["v"],off:s["u"]},r=e?'on':'off';n[r](t,'dragenter',this.handleDragEnter),n[r](t,'dragover',this.handleDragOver),n[r](t,'drop',this.handleDrop),n[r](t,'dragleave',this.handleDragLeave)}},{key:"endDrop",value:function(t,e){var n=this.em,r=this.dragStop;this.counter=0,this.over=0,r&&r(t),n.runDefault({preserveSelected:1}),n.trigger('canvas:dragend',e)}},{key:"handleDragLeave",value:function(t){this.updateCounter(-1,t)}},{key:"updateCounter",value:function(t,e){this.counter+=t,0===this.counter&&this.endDrop(1,e)}},{key:"handleDragEnter",value:function(t){var e=this,n=this.em,r=t.dataTransfer;if(this.updateCounter(1,t),!this.over){this.over=1;var i,o,a=n.get('Utils'),s=n.get('Canvas'),l=s.getBody(),c=n.get('dragContent')||'<br>';if(n.stopDefault(),n.inAbsoluteMode()){var u=n.get('DomComponents').getWrapper(),d=u.append({})[0],h=n.get('Commands').run('core:component-drag',{event:t,guidesInfo:1,center:1,target:d,onEnd:function(t,n,i){if(!i.cancelled){var o=u.append(c)[0],a=d.getStyle(),s=a.left,l=a.top,h=a.position;o.addStyle({left:s,top:l,position:h}),e.handleDragEnd(o,r)}d.remove()}});i=function(e){return h.stop(t,{cancel:e})},o=function(t){return c=t}}else{var f=new a.Sorter({em:n,wmargin:1,nested:1,canvasRelative:1,direction:'a',container:l,placer:s.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:'gjs-',onEndMove:function(t){return e.handleDragEnd(t,r)},document:s.getFrameEl().contentDocument});f.setDropContent(c),f.startSort(),this.sorter=f,i=function(t){t&&(f.moved=0),f.endMove()},o=function(t){return f.setDropContent(t)}}this.dragStop=i,this.dragContent=o,n.trigger('canvas:dragenter',r,c)}}},{key:"handleDragEnd",value:function(t,e){if(t){var n=this.em;n.set('dragResult',t),n.trigger('canvas:drop',e,t)}}},{key:"handleDragOver",value:function(t){t.preventDefault(),this.em.trigger('canvas:dragover',t)}},{key:"handleDrop",value:function(t){t.preventDefault();var e=this.dragContent,n=t.dataTransfer,r=this.getContentByData(n).content;t.target.style.border='',r&&e&&e(r),this.endDrop(!r,t)}},{key:"getContentByData",value:function(t){var e=this.em,n=t.types,r=t.files||[],i=e.get('dragContent'),o=t.getData('text');if(r.length){o=[];for(var a=0;a<r.length;a++){var s=r[a],l=s.type.split('/')[0];'image'==l&&o.push({type:l,file:s,attributes:{alt:s.name}})}}else if(i)o=i;else if(Object(h["indexOf"])(n,'text/html')>=0)o=t.getData('text/html').replace(/<\/?meta[^>]*>/g,'');else if(Object(h["indexOf"])(n,'text/uri-list')>=0)o={type:'link',attributes:{href:o},content:o};else if(Object(h["indexOf"])(n,'text/json')>=0){var c=t.getData('text/json');c&&(o=JSON.parse(c))}var u={content:o};return e.trigger('canvas:dragdata',t,u),u}}]),t}(),p={stylePrefix:'cv-',scripts:[],styles:[],customBadgeLabel:'',autoscrollLimit:50,notTextable:['button','a','input[type=checkbox]','input[type=radio]']},g=n(1),v=n.n(g),m=n(5),b=n(33);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var x=v.a.Model.extend({defaults:{wrapper:'',width:null,height:null,head:'',x:0,y:0,root:0,components:0,styles:0,attributes:{}},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.attributes,r=n.root,i=n.styles,o=n.components;this.set('head',[]),this.em=e.em;var a={em:e.em,config:e.em.get('DomComponents').getConfig(),frame:this};!r&&this.set('root',new m["default"]({type:'wrapper',components:o||[]},a)),(!i||Object(h["isString"])(i))&&this.set('styles',new b["a"](i,a))},remove:function(){this.view=0;var t=this.collection;return t&&t.remove(this)},getHead:function(){return i()(this.get('head'))},setHead:function(t){return this.set('head',i()(t))},addHeadItem:function(t){var e=this.getHead();e.push(t),this.setHead(e)},getHeadByAttr:function(t,e,n){return this.getHead().filter((function(r){return r.attributes&&r.attributes[t]==e&&(!n||n===r.tag)}))[0]},removeHeadByAttr:function(t,e,n){var r=this.getHead(),i=this.getHeadByAttr(t,e,n),o=r.indexOf(i);o>=0&&(r.splice(o,1),this.setHead(r))},addLink:function(t){var e='link';!this.getHeadByAttr('href',t,e)&&this.addHeadItem({tag:e,attributes:{href:t,rel:'stylesheet'}})},removeLink:function(t){this.removeHeadByAttr('href',t,'link')},addScript:function(t){var e='script';!this.getHeadByAttr('src',t,e)&&this.addHeadItem({tag:e,attributes:{src:t}})},removeScript:function(t){this.removeHeadByAttr('src',t,'script')},_emitUpdated:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.em.trigger('frame:updated',w({frame:this},t))}}),O=v.a.Collection.extend({model:x,initialize:function(){Object(h["bindAll"])(this,'itemLoaded')},itemLoaded:function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger('loaded:all'),this.listenToLoadItems(0))},listenToLoad:function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(1)},listenToLoadItems:function(t){var e=this;this.forEach((function(n){return n[t?'on':'off']('loaded',e.itemLoaded)}))}}),C=v.a.Model.extend({defaults:{frame:'',frames:'',wrapper:'',rulers:!1,zoom:100,x:0,y:0},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.em,n=t.styles,r=void 0===n?[]:n,i=t.scripts,o=void 0===i?[]:i,a=e&&e.getWrapper(),s=e&&e.getStyle(),l=new x({root:a,styles:s},t);r.forEach((function(t){return l.addLink(t)})),o.forEach((function(t){return l.addScript(t)})),this.em=e,this.set('frame',l),this.set('frames',new O([l],t)),this.listenTo(this,'change:zoom',this.onZoomChange),this.listenTo(e,'change:device',this.updateDevice)},updateDevice:function(){var t=this.em,e=t.getDeviceModel(),n=t.getCurrentFrameModel();if(n&&e){var r=e.attributes,i=r.width,o=r.height;n.set({width:i,height:o})}},onZoomChange:function(){this.get('zoom')<1&&this.set('zoom',1)}}),S=n(20),k=n(37),j=n(6),T=n(9);function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var M=v.a.View.extend({tagName:'iframe',attributes:{allowfullscreen:'allowfullscreen','data-frame-el':!0},initialize:function(t){Object(h["bindAll"])(this,'updateClientY','stopAutoscroll','autoscroll','_emitUpdate');var e=this.model,n=this.el;this.config=E(E({},t.config||{}),{},{frameView:this}),this.ppfx=this.config.pStylePrefix||'',this.em=this.config.em,this.listenTo(e,'change:head',this.updateHead),e.view=this,Object(s["w"])(n,this)},updateHead:function(){var t=this.getHead();Object(T["f"])(t),Object(T["c"])(t,this.model.getHead())},getEl:function(){return this.el},getWindow:function(){return this.getEl().contentWindow},getDoc:function(){return this.getEl().contentDocument},getHead:function(){return this.getDoc().querySelector('head')},getBody:function(){return this.getDoc().querySelector('body')},getWrapper:function(){return this.getBody().querySelector('[data-gjs-type=wrapper]')},getJsContainer:function(){return this.jsContainer||(this.jsContainer=Object(T["e"])('div',{class:"".concat(this.ppfx,"js-cont")})),this.jsContainer},getToolsEl:function(){var t=this.config.frameWrapView;return t&&t.elTools},getGlobalToolsEl:function(){return this.em.get('Canvas').getGlobalToolsEl()},getHighlighter:function(){return this._getTool('[data-hl]')},getBadgeEl:function(){return this._getTool('[data-badge]')},getOffsetViewerEl:function(){return this._getTool('[data-offset]')},getRect:function(){return this.rect||(this.rect=this.el.getBoundingClientRect()),this.rect},getOffsetRect:function(){var t=this.el,e=this.getBody(),n=e.scrollTop,r=e.scrollLeft,i=t.offsetHeight,o=t.offsetWidth;return{top:t.offsetTop,left:t.offsetLeft,height:i,width:o,scrollTop:n,scrollLeft:r,scrollBottom:n+i,scrollRight:r+o}},_getTool:function(t){var e=this.getToolsEl();return this[t]||(this[t]=e.querySelector(t)),this[t]},remove:function(){var t=this.root,e=this.model;this._toggleEffects(),v.a.View.prototype.remove.apply(this,arguments),t.remove(),e.remove()},startAutoscroll:function(){var t=this;this.lastMaxHeight=this.getWrapper().offsetHeight-this.el.offsetHeight,setTimeout((function(){t._toggleAutoscrollFx(1),requestAnimationFrame(t.autoscroll)}),0)},autoscroll:function(){if(this.dragging){var t=this.lastClientY,e=this.em.get('Canvas'),n=this.getWindow(),r=this.getBody().scrollTop,i=t||0,o=e.getConfig().autoscrollLimit,a=this.getRect().height-o,s=r;if(i<o&&(s-=o-i),i>a&&(s+=i-a),!Object(h["isUndefined"])(t)&&s!==r&&s>0&&s<this.lastMaxHeight)this.getGlobalToolsEl().style.opacity=0,this.showGlobalTools(),n.scrollTo(0,s);requestAnimationFrame(this.autoscroll)}},updateClientY:function(t){t.preventDefault(),this.lastClientY=Object(s["h"])(t).clientY*this.em.getZoomDecimal()},showGlobalTools:Object(h["debounce"])((function(){this.getGlobalToolsEl().style.opacity=''}),50),stopAutoscroll:function(){this.dragging&&this._toggleAutoscrollFx()},_toggleAutoscrollFx:function(t){this.dragging=t;var e=this.getWindow(),n=t?'on':'off',r={on:s["v"],off:s["u"]};r[n](e,'mousemove dragover',this.updateClientY),r[n](e,'mouseup',this.stopAutoscroll)},render:function(){var t=this.el,e=this.$el,n=this.ppfx,r=this.config;return e.attr({class:n+'frame'}),r.scripts.length?this.renderScripts():r.renderContent&&(t.onload=this.renderBody.bind(this)),this},renderScripts:function(){var t=this,e=this.el,n=this.config;e.onload=function(){return function n(r){if(r.length>0){var i=r.shift(),o=Object(T["e"])('script',E({type:'text/javascript'},Object(h["isString"])(i)?{src:i}:i));o.onerror=o.onload=n.bind(null,r),e.contentDocument.head.appendChild(o)}else t.renderBody()}(i()(n.scripts))}},renderBody:function(){var t=this,e=this.config,n=this.model,r=this.ppfx,i=n.get('root'),o=n.get('styles'),a=e.em,l=this.getDoc(),c=this.getHead(),u=this.getBody(),d=this.getWindow(),f=a.get('Config'),p=[];d._isEditor=!0,e.styles.forEach((function(t){return p.push(Object(h["isString"])(t)?{tag:'link',attributes:{href:t,rel:'stylesheet'}}:{tag:'link',attributes:E({rel:'stylesheet'},t)})})),p.length&&Object(T["c"])(c,p);Object(T["a"])(u,"<style>\n ".concat(f.baseCss||'',"\n\n .").concat(r,"dashed *[data-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n .").concat(r,"selected {\n outline: 3px solid #3b97e3 !important;\n outline-offset: -3px;\n }\n\n .").concat(r,"selected-parent {\n outline: 2px solid ").concat('#ffca6f'," !important\n }\n\n .").concat(r,"no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n .").concat(r,"freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .").concat(r,"no-pointer {\n pointer-events: none;\n }\n\n .").concat(r,"plh-image {\n background: #f5f5f5;\n border: none;\n height: 100px;\n width: 100px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n .").concat(r,"grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n .").concat(r,"is__grabbing {\n overflow-x: hidden;\n }\n\n .").concat(r,"is__grabbing,\n .").concat(r,"is__grabbing * {\n cursor: grabbing !important;\n }\n\n ").concat(f.canvasCss||'',"\n ").concat(f.protectedCss||'',"\n </style>")),this.root=new j["default"]({model:i,config:E(E({},i.config),{},{frameView:this})}).render(),Object(T["a"])(u,this.root.el),Object(T["a"])(u,new k["a"]({collection:o,config:E(E({},a.get('CssComposer').getConfig()),{},{frameView:this})}).render().el),Object(T["a"])(u,this.getJsContainer()),Object(s["v"])(u,'click',(function(t){return t&&'A'==t.target.tagName&&t.preventDefault()})),Object(s["v"])(u,'submit',(function(t){return t&&t.preventDefault()})),[{event:'keydown keyup keypress',class:'KeyboardEvent'},{event:'mousemove',class:'MouseEvent'},{event:'wheel',class:'WheelEvent'}].forEach((function(e){return e.event.split(' ').forEach((function(n){l.addEventListener(n,(function(n){return t.el.dispatchEvent(Object(T["d"])(n,e.class))}))}))})),this._toggleEffects(1),n.trigger('loaded')},_toggleEffects:function(t){(t?s["v"]:s["u"])(this.getWindow(),"".concat(T["i"]," resize"),this._emitUpdate)},_emitUpdate:function(){this.model._emitUpdated()}}),D=n(17);function A(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var _=v.a.View.extend({events:{'click [data-action-remove]':'remove','mousedown [data-action-move]':'startDrag'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(h["bindAll"])(this,'onScroll','frameLoaded','updateOffset','remove','startDrag');var n=this.model,r=L(L({},t.config||e),{},{frameWrapView:this}),i=r.canvasView,o=r.em;this.cv=i,this.config=r,this.em=o,this.canvas=o&&o.get('Canvas'),this.ppfx=r.pStylePrefix||'',this.frame=new M({model:n,config:r}),this.classAnim="".concat(this.ppfx,"frame-wrapper--anim"),this.listenTo(n,'loaded',this.frameLoaded),this.listenTo(n,'change:x change:y',this.updatePos),this.listenTo(n,'change:width change:height',this.updateSize),this.listenTo(n,'destroy remove',this.remove),this.updatePos(),this.setupDragger()},setupDragger:function(){var t,e,n,r=this,i=this.canvas,o=this.model,a=function(t){i.toggleFramesEvents(t)};this.dragger=new D["a"]({onStart:function(){var i=o.attributes,s=i.x,l=i.y;n=r.em.getZoomMultiplier(),t=s,e=l,a()},onEnd:function(){return a(1)},setPosition:function(r){o.set({x:t+r.x*n,y:e+r.y*n})}})},startDrag:function(t){t&&this.dragger.start(t)},remove:function(){return this.frame.remove(),this.frame={},v.a.View.prototype.remove.apply(this,arguments),this},updateOffset:Object(h["debounce"])((function(){var t=this.em,e=this.$el,n=this.frame;t.runDefault({preserveSelected:1}),e.removeClass(this.classAnim),n.model._emitUpdated()})),updatePos:function(t){var e=this.model,n=this.el,r=e.attributes,i=r.x,o=r.y,a=n.style;this.frame.rect=0,a.left=isNaN(i)?i:"".concat(i,"px"),a.top=isNaN(o)?o:"".concat(o,"px"),t&&this.updateOffset()},updateSize:Object(h["debounce"])((function(){this.updateDim()})),updateDim:function(){var t=this.em,e=this.el,n=this.$el,r=this.model,i=this.classAnim,o=r.attributes,a=o.width,s=o.height,l=e.style,c=l.width||'',u=l.height||'',d=a||'',f=s||'',p=c==d&&u==f,g='px';if(this.frame.rect=0,n.addClass(i),l.width=Object(h["isNumber"])(d)?"".concat(d).concat(g):d,l.height=Object(h["isNumber"])(f)?"".concat(f).concat(g):f,Object(h["isNull"])(a)||Object(h["isNull"])(s)){var v=L(L({},a?{}:{width:e.offsetWidth}),s?{}:{height:e.offsetHeight});r.set(v,{silent:1})}t.stopDefault({preserveSelected:1}),p?this.updateOffset():n.one(T["i"],this.updateOffset)},onScroll:function(){var t=this.frame;this.em.trigger('frame:scroll',{frame:t,body:t.getBody(),target:t.getWindow()})},frameLoaded:function(){this.frame.getWindow().onscroll=this.onScroll,this.updateDim()},render:function(){var t=this.frame,e=this.$el,n=this.ppfx,r=this.cv,i=this.model,o=this.el,a=i.attributes.onRender;t.render(),e.empty().attr({class:"".concat(n,"frame-wrapper")}).append("\n <div class=\"".concat(n,"frame-wrapper__top gjs-two-color\" data-frame-top>\n <div class=\"").concat(n,"frame-wrapper__name\" data-action-move>\n ").concat(i.get('name')||'',"\n </div>\n <div class=\"").concat(n,"frame-wrapper__top-r\">\n <div class=\"").concat(n,"frame-wrapper__icon\" data-action-remove style=\"display: none\">\n <svg viewBox=\"0 0 24 24\"><path d=\"M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12z\"></path></svg>\n </div>\n </div>\n </div>\n <div class=\"").concat(n,"frame-wrapper__right\" data-frame-right></div>\n <div class=\"").concat(n,"frame-wrapper__left\" data-frame-left></div>\n <div class=\"").concat(n,"frame-wrapper__bottom\" data-frame-bottom></div>\n ")).append(t.el);var s=Object(T["e"])('div',{class:"".concat(n,"tools"),style:'pointer-events:none; opacity: 0'},"\n <div class=\"".concat(n,"highlighter\" data-hl></div>\n <div class=\"").concat(n,"badge\" data-badge></div>\n <div class=\"").concat(n,"placeholder\">\n <div class=\"").concat(n,"placeholder-int\"></div>\n </div>\n <div class=\"").concat(n,"ghost\"></div>\n <div class=\"").concat(n,"toolbar\" style=\"pointer-events:all\"></div>\n <div class=\"").concat(n,"resizer\"></div>\n <div class=\"").concat(n,"offset-v\" data-offset>\n <div class=\"gjs-marginName\" data-offset-m>\n <div class=\"gjs-margin-v-el gjs-margin-v-top\" data-offset-m-t></div>\n <div class=\"gjs-margin-v-el gjs-margin-v-bottom\" data-offset-m-b></div>\n <div class=\"gjs-margin-v-el gjs-margin-v-left\" data-offset-m-l></div>\n <div class=\"gjs-margin-v-el gjs-margin-v-right\" data-offset-m-r></div>\n </div>\n <div class=\"gjs-paddingName\" data-offset-m>\n <div class=\"gjs-padding-v-el gjs-padding-v-top\" data-offset-p-t></div>\n <div class=\"gjs-padding-v-el gjs-padding-v-bottom\" data-offset-p-b></div>\n <div class=\"gjs-padding-v-el gjs-padding-v-left\" data-offset-p-l></div>\n <div class=\"gjs-padding-v-el gjs-padding-v-right\" data-offset-p-r></div>\n </div>\n </div>\n <div class=\"").concat(n,"offset-fixed-v\"></div>\n "));return this.elTools=s,r.toolsWrapper.appendChild(s),a&&a({el:o,elTop:o.querySelector('[data-frame-top]'),elRight:o.querySelector('[data-frame-right]'),elBottom:o.querySelector('[data-frame-bottom]'),elLeft:o.querySelector('[data-frame-left]'),frame:i,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this}}),N=S["a"].extend({itemView:_,autoAdd:1,init:function(){this.listenTo(this.collection,'reset',this.render)},onRender:function(){var t=this.config,e=this.$el,n=t.em;n&&e.attr({class:"".concat(n.getConfig('stylePrefix'),"frames")})}});function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function F(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var V,R=v.a.$,z=v.a.View.extend({events:{wheel:'onWheel'},template:function(){var t=this.pfx;return"\n <div class=\"".concat(t,"canvas__frames\" data-frames></div>\n <div id=\"").concat(t,"tools\" class=\"").concat(t,"canvas__tools\" data-tools></div>\n ")},initialize:function(t){Object(h["bindAll"])(this,'clearOff','onKeyPress','onCanvasMove'),Object(s["v"])(window,'scroll resize',this.clearOff);var e=this.model,n=e.get('frames');this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.className=this.config.stylePrefix+'canvas';var r=this.em,i=this.config;this.frames=new N({collection:n,config:F(F({},i),{},{canvasView:this,renderContent:1})}),this.listenTo(r,'change:canvasOffset',this.clearOff),this.listenTo(r,'component:selected',this.checkSelected),this.listenTo(e,'change:zoom change:x change:y',this.updateFrames),this.listenTo(n,'loaded:all',(function(){return r.trigger('loaded')})),this.toggleListeners(1)},checkSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.scroll,r=this.em.get('currentFrame');n&&t.views.forEach((function(t){t._getFrame()!==r&&t.scrollIntoView(n)}))},remove:function(){var t=this.model.get('frames');t.remove(t.models),this.frames.remove(),this.frames={},v.a.View.prototype.remove.apply(this,arguments),this.toggleListeners()},preventDefault:function(t){t&&(t.preventDefault(),t._parentEvent&&t._parentEvent.preventDefault())},onCanvasMove:function(t){},toggleListeners:function(t){this.el;(t?s["v"]:s["u"])(document,'keypress',this.onKeyPress)},onKeyPress:function(t){var e=this.em;' '!==Object(s["f"])(t)||1===e.getZoomDecimal()||e.get('Canvas').isInputFocused()||(this.preventDefault(t),e.get('Editor').runCommand('core:canvas-move'))},onWheel:function(t){if((t.ctrlKey||t.metaKey)&&this.em.getConfig('multiFrames')){this.preventDefault(t);var e=this.model,n=Math.max(-1,Math.min(1,t.wheelDelta||-t.detail)),r=e.get('zoom');e.set('zoom',r+2*n)}},updateFrames:function(t){var e=this.em,n=this.model.attributes,r=n.x,i=n.y,o=this.getZoom(),a={preserveSelected:1},s=o?1/o:1;this.framesArea.style.transform="scale(".concat(o,") translate(").concat(r*s,"px, ").concat(i*s,"px)"),this.clearOff(),e.stopDefault(a),e.trigger('canvas:update',t),V&&clearTimeout(V),V=setTimeout((function(){return e.runDefault(a)}),300)},getZoom:function(){return this.em.getZoomDecimal()},isElInViewport:function(t){var e=Object(s["e"])(t),n=Object(s["d"])(e),r=this.getFrameOffset(e),i=n.top,o=n.left;return i>=0&&o>=0&&i<=r.height&&o<=r.width},offset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(s["d"])(t),r=t.ownerDocument.body,i=e.noScroll;return{top:n.top+(i?0:r.scrollTop),left:n.left+(i?0:r.scrollLeft),width:n.width,height:n.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(t){if(!this.frmOff||t){var e=this.frame.el,n=t?t.ownerDocument.defaultView.frameElement:e;this.frmOff=this.offset(n||e)}return this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(t,e){var n=this.getZoom(),r=e||{},i=this.getFrameOffset(t),o=this.getCanvasOffset(),a=this.offset(t,e),s=r.avoidFrameOffset?0:i.top,l=r.avoidFrameOffset?0:i.left;return{top:a.top*n+s-o.top,left:a.left*n+l-o.left,height:a.height*n,width:a.width*n,zoom:n,rect:a}},getElementOffsets:function(t){var e=this;if(!t||Object(s["r"])(t))return{};var n={},r=window.getComputedStyle(t);return['marginTop','marginRight','marginBottom','marginLeft','paddingTop','paddingRight','paddingBottom','paddingLeft'].forEach((function(t){n[t]=parseFloat(r[t])*e.getZoom()})),n},getPosition:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.frame.el.contentDocument;if(e){var n=e.body,r=this.getZoom(),i=this.getFrameOffset(),o=this.getCanvasOffset(),a=t.noScroll;return{top:i.top+(a?0:n.scrollTop)*r-o.top,left:i.left+(a?0:n.scrollLeft)*r-o.left,width:o.width,height:o.height}}},updateScript:function(t){var e=t.model,n=e.getId();t.scriptContainer||(t.scriptContainer=R("<div data-id=\"".concat(n,"\">")),this.getJsContainer().appendChild(t.scriptContainer.get(0))),t.el.id=n,t.scriptContainer.html('');var r=document.createElement('script'),i=e.getScriptString(),o=e.get('script-props')?i:"function(){".concat(i,";}"),a=JSON.stringify(e.__getScriptProps());r.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('".concat(n,"');\n if (!item) return;\n (").concat(o,".bind(item))(").concat(a,")\n }, 1);"),setTimeout((function(){return t.scriptContainer.get(0).appendChild(r)}),0)},getJsContainer:function(t){var e=this.getFrameView(t);return e&&e.getJsContainer()},getFrameView:function(t){return t&&t._getFrame()||this.em.get('currentFrame')},render:function(){var t=this.el,e=this.$el,n=this.ppfx,r=this.model,i=this.em,o=this.frames,a=i.get('CssComposer'),s=r.get('wrapper');e.html(this.template());var l=e.find('[data-frames]');this.framesArea=l.get(0),this.wrapper=s,s&&'function'==typeof s.render&&r.get('frame').set({wrapper:s,root:s.getWrapper(),styles:a.getAll()});var c=e.find('[data-tools]');this.toolsWrapper=c.get(0),c.append("\n <div class=\"".concat(n,"tools ").concat(n,"tools-gl\" style=\"pointer-events:none\">\n <div class=\"").concat(n,"placeholder\">\n <div class=\"").concat(n,"placeholder-int\"></div>\n </div>\n </div>\n <div id=\"").concat(n,"tools\" style=\"pointer-events:none\">\n <div class=\"").concat(n,"badge\"></div>\n <div class=\"").concat(n,"ghost\"></div>\n <div class=\"").concat(n,"toolbar\" style=\"pointer-events:all\"></div>\n <div class=\"").concat(n,"resizer\"></div>\n <div class=\"").concat(n,"offset-v\"></div>\n <div class=\"").concat(n,"offset-fixed-v\"></div>\n </div>\n "));var u=t.querySelector("#".concat(n,"tools"));this.hlEl=t.querySelector(".".concat(n,"highlighter")),this.badgeEl=t.querySelector(".".concat(n,"badge")),this.placerEl=t.querySelector(".".concat(n,"placeholder")),this.ghostEl=t.querySelector(".".concat(n,"ghost")),this.toolbarEl=t.querySelector(".".concat(n,"toolbar")),this.resizerEl=t.querySelector(".".concat(n,"resizer")),this.offsetEl=t.querySelector(".".concat(n,"offset-v")),this.fixedOffsetEl=t.querySelector(".".concat(n,"offset-fixed-v")),this.toolsGlobEl=t.querySelector(".".concat(n,"tools-gl")),this.toolsEl=u,this.el.className=this.className;var d=r.get('frames');return d.listenToLoad(),o.render(),i.setCurrentFrame(d.at(0).view),l.append(o.el),this.frame=d.at(0).view,this}});function H(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?H(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n={};return{getCanvasView:function(){return e},name:'Canvas',init:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=$($($({},p),r),{},{module:this}),this.em=n.em;var i=n.pStylePrefix;i&&(n.stylePrefix=i+n.stylePrefix),t=new C(r),e=new z({model:t,config:n});var o=n.em.get('DomComponents');return o&&this.setWrapper(o),this.model=t,this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),this},getConfig:function(){return n},setWrapper:function(e){t.set('wrapper',e)},getElement:function(){return e.el},getFrame:function(e){return e?this.getFrames()[e]:t.get('frame')},getFrameEl:function(){var t=e.frame;return t&&t.el},getFramesEl:function(){return e.framesArea},getWindow:function(){return this.getFrameEl().contentWindow},getDocument:function(){var t=this.getFrameEl();return t&&t.contentDocument},getBody:function(){var t=this.getDocument();return t&&t.body},getWrapperEl:function(){var t=this.getBody();return t&&t.querySelector('#wrapper')},_getCompFrame:function(t){return t&&t._getFrame()},_getLocalEl:function(t,e,n){var r=t,i=this._getCompFrame(e);return r=i?i[n]():r},getGlobalToolsEl:function(){return e.toolsGlobEl},getToolsEl:function(t){return this._getLocalEl(e.toolsEl,t,'getToolsEl')},getHighlighter:function(t){return this._getLocalEl(e.hlEl,t,'getHighlighter')},getBadgeEl:function(t){return this._getLocalEl(e.badgeEl,t,'getBadgeEl')},getPlacerEl:function(){return e.placerEl},getGhostEl:function(){return e.ghostEl},getToolbarEl:function(){return e.toolbarEl},getResizerEl:function(){return e.resizerEl},getOffsetViewerEl:function(t){return this._getLocalEl(e.offsetEl,t,'getOffsetViewerEl')},getFixedOffsetViewerEl:function(){return e.fixedOffsetEl},render:function(){return e.render().el},getOffset:function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());return{top:t.top-e.top,left:t.left-e.left}},offset:function(t){return e.offset(t)},setCustomBadgeLabel:function(t){n.customBadgeLabel=t},getElementPos:function(t,n){return e.getElementPos(t,n)},getElementOffsets:function(t){return e.getElementOffsets(t)},getRect:function(){var t=e.getPosition(),n=t.top,r=t.left;return $($({},e.getCanvasOffset()),{},{topScroll:n,leftScroll:r})},getTargetToElementDim:function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i||{},a=e.getPosition();if(a){var s=o.elPos||e.getElementPos(r),l=i.toRight||0,c=o.targetHeight||t.offsetHeight,u=o.targetWidth||t.offsetWidth,d=o.event||null,h=s.top-c,f=s.left;f+=l?s.width:0;var p=(f=l?f-u:f)<a.left?a.left:f,g=h<a.top?a.top:h,v={top:g=g>s.top+s.height?s.top+s.height:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:a.top,canvasLeft:a.left,canvasWidth:a.width,canvasHeight:a.height};return d&&n.em&&n.em.trigger(d,v),v}},canvasRectOffset:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=function(t){var e=t.defaultView;return e&&e.frameElement},o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,a=n.em.getZoomDecimal(),s=e?'top':'left',l=t.ownerDocument,c=r.offset?i(l):{},u=c.offsetTop,d=void 0===u?0:u,h=c.offsetLeft,f=void 0===h?0:h,p=l.body||{},g=p.scrollTop,v=void 0===g?0:g,m=p.scrollLeft,b=void 0===m?0:m,y=e?v:b,w=e?d:f;return o[s]-(y-w)*a};return{top:o(t,1,e),left:o(t,0,e)}},getTargetToElementFixed:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.pos||this.getElementPos(t),i=n.canvasOff||this.canvasRectOffset(t,r),o=e.offsetHeight||0,a=e.offsetWidth||0,s=r.left+r.width,l=this.getCanvasView(),c=l.getPosition(),u=l.getFrameOffset(t),d=n.event,h=-o,f=r.width-a;f=r.left<-f?-r.left:f,f=s>c.width?f-(s-c.width):f;var p=r.height+o,g=p<u.height;i.top<o&&(g?h+=p:h=-i.top<r.height?-i.top:r.height);var v={top:h,left:f,canvasOffsetTop:i.top,canvasOffsetLeft:i.left};return d&&this.em.trigger(d,v),v},getMouseRelativePos:function(t,e){var n=0,r=0,i=(e||{}).subWinOffset,o=t.target.ownerDocument,a=o.defaultView||o.parentWindow,s=a.frameElement,l=i?a.pageYOffset:0,c=i?a.pageXOffset:0;if(s){var u=s.getBoundingClientRect();n=u.top||0,r=u.left||0}return{y:t.clientY+n-l,x:t.clientX+r-c}},getMouseRelativeCanvas:function(t,n){var r=this.getZoomDecimal(),i=e.getPosition(n),o=i.top,a=i.left;return{y:t.clientY*r+o,x:t.clientX*r+a}},hasFocus:function(){return this.getDocument().hasFocus()},isInputFocused:function(){var t=this.getDocument(),e=this.getFrameEl(),n=['body'].concat(i()(this.getConfig().notTextable)),r=e&&document.activeElement===e?t&&t.activeElement:document.activeElement;return r&&!n.some((function(t){return r.matches(t)}))},scrollTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(s["e"])(t),r=n&&Object(s["j"])(n);r&&r.scrollIntoView(e)},startAutoscroll:function(t){var e=t&&t.view||this.em.getCurrentFrame();e&&e.startAutoscroll()},stopAutoscroll:function(t){var e=t&&t.view||this.em.getCurrentFrame();e&&e.stopAutoscroll()},postRender:function(){Object(s["k"])(n.em)&&(this.droppable=new f(n.em))},setZoom:function(e){return t.set('zoom',parseFloat(e)),this},getZoom:function(){return parseFloat(t.get('zoom'))},getZoomDecimal:function(){return this.getZoom()/100},getZoomMultiplier:function(){var t=this.getZoomDecimal();return t?1/t:1},toggleFramesEvents:function(t){this.getFramesEl().style.pointerEvents=t?'':'none'},getFrameWrapperEl:function(){return e.frame.getWrapper()},getFrames:function(){return t.get('frames').map((function(t){return t}))},addFrame:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.get('frames').add($({},e),$($({},n),{},{em:this.em}))},destroy:function(){var r=this;t.stopListening(),e.remove(),[n,t,e].forEach((function(t){return{}})),['em','model','droppable'].forEach((function(t){return r[t]={}}))}}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i={stylePrefix:'trt-',appendTo:'',optionsTarget:[{value:!1},{value:'_blank'}]},o=n(20),a=n(2),s=n.n(a),l=n(73),c=n.n(l),u=n(1),d=n.n(u),h=n(3);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){s()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var g=d.a.$,v=d.a.View.extend({events:{},eventCapture:['change'],appendInput:1,attributes:function(){return this.model.get('attributes')},templateLabel:function(){var t=this.ppfx,e=this.getLabel();return"<div class=\"".concat(t,"label\" title=\"").concat(e,"\">").concat(e,"</div>")},templateInput:function(){var t=this.clsField;return"<div class=\"".concat(t,"\" data-input></div>")},initialize:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.config,r=void 0===n?{}:n,i=this.model,o=this.eventCapture,a=i.target,s=i.attributes.type;this.config=r,this.em=r.em,this.pfx=r.stylePrefix||'',this.ppfx=r.pStylePrefix||'',this.target=a;var l=this.ppfx;this.clsField="".concat(l,"field ").concat(l,"field-").concat(s),[['change:value',this.onValueChange],['remove',this.removeView]].forEach((function(e){var n=c()(e,2),r=n[0],o=n[1];i.off(r,o),t.listenTo(i,r,o)})),i.view=this,this.listenTo(i,'change:label',this.render),this.listenTo(i,'change:placeholder',this.rerender),o.forEach((function(e){return t.events[e]='onChange'})),this.delegateEvents(),this.init()},getClbOpts:function(){return{component:this.target,trait:this.model,elInput:this.getInputElem()}},removeView:function(){this.remove(),this.removed()},init:function(){},removed:function(){},onRender:function(){},onUpdate:function(){},onEvent:function(){},onChange:function(t){var e=this.getInputElem();e&&!Object(r["isUndefined"])(e.value)&&this.model.set('value',e.value),this.onEvent(p(p({},this.getClbOpts()),{},{event:t}))},getValueForTarget:function(){return this.model.get('value')},setInputValue:function(t){var e=this.getInputElem();e&&(e.value=t)},onValueChange:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(n.fromTarget)this.setInputValue(t.get('value')),this.postUpdate();else{var r=this.getValueForTarget();t.setTargetValue(r,n)}},renderLabel:function(){var t=this.$el,e=this.target,n=this.getLabel(),r=this.templateLabel(e);this.createLabel&&(r=this.createLabel({label:n,component:e,trait:this})||''),t.find('[data-label]').append(r)},getLabel:function(){var t=this.em,e=this.model.attributes,n=e.label,r=e.name;return t.t("traitManager.traits.labels.".concat(r))||Object(h["c"])(n||r).replace(/-/g,' ')},getComponent:function(){return this.target},getInputEl:function(){if(!this.$input){var t=this.em,e=this.model,n=e,i=e.attributes.name,o=n.get('placeholder')||n.get('default')||'',a=n.get('type')||'text',s=n.get('min'),l=n.get('max'),c=this.getModelValue(),u=g("<input type=\"".concat(a,"\" placeholder=\"").concat(o,"\">")),d=t.t("traitManager.traits.attributes.".concat(i))||{};u.attr(d),Object(r["isUndefined"])(c)||(n.set({value:c},{silent:!0}),u.prop('value',c)),s&&u.prop('min',s),l&&u.prop('max',l),this.$input=u}return this.$input.get(0)},getInputElem:function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get('name');if(e.get('changeProp'))t=n.get(i);else{var o=n.get('attributes');t=e.get('value')||o[i]}return Object(r["isUndefined"])(t)?'':t},getElInput:function(){return this.elInput},renderField:function(){var t=this.$el,e=this.appendInput,n=this.model,i=t.find('[data-input]'),o=i[i.length-1],a=n.el;a||(a=this.createInput?this.createInput(this.getClbOpts()):this.getInputEl()),Object(r["isString"])(a)?(o.innerHTML=a,this.elInput=o.firstChild):(e?o.appendChild(a):o.insertBefore(a,o.firstChild),this.elInput=a),n.el=this.elInput},hasLabel:function(){var t=this.model.attributes.label;return!this.noLabel&&!1!==t},rerender:function(){this.model.el=null,this.render()},postUpdate:function(){this.onUpdate(this.getClbOpts())},render:function(){var t=this.$el,e=this.pfx,n=this.ppfx,i=this.model.attributes,o=i.type,a=i.id,s=this.hasLabel&&this.hasLabel(),l="".concat(e,"trait");this.$input=null;var c="<div class=\"".concat(l," ").concat(l,"--").concat(o,"\">\n ").concat(s?"<div class=\"".concat(n,"label-wrp\" data-label></div>"):'',"\n <div class=\"").concat(n,"field-wrp ").concat(n,"field-wrp--").concat(o,"\" data-input>\n ").concat(this.templateInput?Object(r["isFunction"])(this.templateInput)?this.templateInput(this.getClbOpts()):this.templateInput:'',"\n </div>\n </div>");return t.empty().append(c),s&&this.renderLabel(),this.renderField(),this.el.className="".concat(l,"__wrp ").concat(l,"__wrp-").concat(a),this.postUpdate(),this.onRender(this.getClbOpts()),this}}),m=d.a.$,b=v.extend({init:function(){this.listenTo(this.model,'change:options',this.rerender)},templateInput:function(){var t=this.ppfx,e=this.clsField;return"<div class=\"".concat(e,"\">\n <div data-input></div>\n <div class=\"").concat(t,"sel-arrow\">\n <div class=\"").concat(t,"d-s-arrow\"></div>\n </div>\n </div>")},getInputEl:function(){if(!this.$input){var t=this.model,e=this.em,n=t.get('name'),i=t.get('options')||[],o=[],a='<select>';i.forEach((function(t){var i,s,l,c='';Object(r["isString"])(t)?(i=t,s=t):(i=t.name||t.label||t.value,s="".concat(Object(r["isUndefined"])(t.value)?t.id:t.value).replace(/"/g,'"'),c+=(l=t.style?t.style.replace(/"/g,'"'):'')?" style=\"".concat(l,"\""):'');var u=e.t("traitManager.traits.options.".concat(n,".").concat(s))||i;a+="<option value=\"".concat(s,"\"").concat(c,">").concat(u,"</option>"),o.push(s)})),a+='</select>',this.$input=m(a);var s=t.getTargetValue(),l=o.indexOf(s)>=0?s:t.get('default');!Object(r["isUndefined"])(l)&&this.$input.val(l)}return this.$input.get(0)}}),y=v.extend({appendInput:0,templateInput:function(){var t=this.ppfx,e=this.clsField;return"<label class=\"".concat(e,"\" data-input>\n <i class=\"").concat(t,"chk-icon\"></i>\n </label>")},onChange:function(){var t=this.getInputElem().checked;this.model.set('value',this.getCheckedValue(t))},getCheckedValue:function(t){var e=t,n=this.model.attributes,i=n.valueTrue,o=n.valueFalse;return e&&!Object(r["isUndefined"])(i)&&(e=i),e||Object(r["isUndefined"])(o)||(e=o),e},getInputEl:function(){for(var t=!this.$input,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var o=v.prototype.getInputEl.apply(this,n);if(t){var a,s,l=this.model,c=this.target,u=l.attributes,d=(u.valueTrue,u.valueFalse),h=l.get('name');l.get('changeProp')?s=a=c.get(h):a=!(!(s=c.get('attributes')[h])&&''!==s),Object(r["isUndefined"])(d)||s!==d||(a=!1),o.checked=a}return o}}),w=n(32),x=v.extend({getValueForTarget:function(){var t=this.model,e=t.attributes,n=e.value,i=e.unit;return Object(r["isUndefined"])(n)||''===n?t.get('default'):n+i},getInputEl:function(){if(!this.input){var t=this.ppfx,e=this.model,n=this.getModelValue(),r=new w["a"]({contClass:"".concat(t,"field-int"),type:'number',model:e,ppfx:t});this.input=r.render(),this.$input=this.input.inputEl,this.$unit=this.input.unitEl,e.set('value',n,{fromTarget:1}),this.$input.val(n),this.input=r.el}return this.input}}),O=n(38),C=v.extend({templateInput:'',getInputEl:function(){if(!this.input){var t=this.model,e=this.getModelValue(),n=new O["a"]({model:t,target:this.config.em,contClass:this.ppfx+'field-color',ppfx:this.ppfx}).render();n.setValue(e,{fromTarget:1}),this.input=n.el}return this.input}}),S=v.extend({events:{'click button':'handleClick'},templateInput:'',handleClick:function(){var t=this.model,e=this.em,n=t.get('command');n&&(Object(r["isString"])(n)?e.get('Commands').run(n):n(e.get('Editor'),t))},renderLabel:function(){this.model.get('label')&&v.prototype.renderLabel.apply(this,arguments)},getInputEl:function(){var t=this.model,e=this.ppfx,n=t.props(),r=n.labelButton,i=n.text,o=n.full,a=r||i,s="".concat(e,"btn");return"<button type=\"button\" class=\"".concat(s,"-prim").concat(o?" ".concat(s,"--full"):'',"\">").concat(a,"</button>")}}),k=o["a"].extend({ns:'Traits',itemView:v,reuseView:1,itemsView:{text:v,number:x,select:b,checkbox:y,color:C,button:S},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.config=e,this.em=t.editor,this.pfx=e.stylePrefix||'',this.ppfx=e.pStylePrefix||'',this.className=this.pfx+'traits';var n='component:toggled';this.listenTo(this.em,n,this.updatedCollection),this.updatedCollection()},updatedCollection:function(){var t=this.ppfx,e=this.em.getSelected();this.el.className="".concat(this.className," ").concat(t,"one-bg ").concat(t,"two-color"),this.collection=e?e.get('traits'):[],this.render()}});e["default"]=function(){var t,e={};return{TraitsView:k,name:'TraitManager',getConfig:function(){return e},init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=n,Object(r["defaults"])(e,i);var o=e.pStylePrefix;return o&&(e.stylePrefix="".concat(o).concat(e.stylePrefix)),t=new k({collection:[],editor:e.em,config:e}),this},postRender:function(){var t=this.getConfig().appendTo;t&&(Object(r["isElement"])(t)?t:document.querySelector(t)).appendChild(this.render())},getTraitsViewer:function(){return t},addType:function(e,n){var r=t.itemView;t.itemsView[e]=r.extend(n)},getType:function(e){return t.itemsView[e]},render:function(){return t.render().el},destroy:function(){t.remove(),[e,t].forEach((function(t){return{}}))}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a={appendTo:'',appendOnClick:0,blocks:[]},s=n(1),l=n.n(s),c=l.a.Model.extend({defaults:{id:'',label:'',open:!0,attributes:{}}}),u=l.a.Model.extend({defaults:{activate:0,select:0,resetId:0,label:'',disable:0,media:'',content:'',category:'',attributes:{}},initialize:function(){var t=this.get('category');if(t&&'string'==typeof t)new c({id:t,label:t})}}),d=l.a.Collection.extend({model:u}),h=l.a.Collection.extend({model:c}),f=n(3),p=l.a.View.extend({events:{click:'handleClick',mousedown:'startDrag',dragstart:'handleDragStart',drag:'handleDrag',dragend:'handleDragEnd'},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model;this.em=e.em,this.config=e,this.endDrag=this.endDrag.bind(this),this.ppfx=e.pStylePrefix||'',this.listenTo(n,'destroy remove',this.remove),this.listenTo(n,'change',this.render)},handleClick:function(){var t=this.config,e=this.model,n=this.em;if(t.appendOnClick){var r,i=t.getSorter(),o=e.get('content'),a=n.getSelected();if(i.setDropContent(o),a)if(i.validTarget(a.getEl(),o).valid)r=a;else{var s=a.parent();i.validTarget(s.getEl(),o).valid&&(r=s)}if(!r){var l=n.getWrapper();i.validTarget(l.getEl(),o).valid&&(r=l)}var c=r&&r.append(o)[0];c&&n.setSelected(c,{scroll:1})}},startDrag:function(t){var e=this.config,n=this.em,r=this.model.get('disable');if(0===t.button&&e.getSorter&&!this.el.draggable&&!r){n.refreshCanvas();var i=e.getSorter();i.setDragHelper(this.el,t),i.setDropContent(this.model.get('content')),i.startSort(this.el),Object(f["v"])(document,'mouseup',this.endDrag)}},handleDragStart:function(t){var e=this.em,n=this.model,r=n.get('content'),i=Object(o["isObject"])(r)?JSON.stringify(r):r;e.set('dragResult'),t.dataTransfer.setData('text',i),e.set('dragContent',r),e.trigger('block:drag:start',n,t)},handleDrag:function(t){this.em.trigger('block:drag',this.model,t)},handleDragEnd:function(){var t=this.em,e=this.model,n=t.get('dragResult');if(n){var r='activeOnRender',i=n.get&&n.get(r);(e.get('activate')||i)&&(n.trigger('active'),n.set(r,0)),e.get('select')&&t.setSelected(n),e.get('resetId')&&n.onAll((function(t){return t.resetId()}))}t.set({dragResult:null,dragContent:null}),t.trigger('block:drag:stop',n,e)},endDrag:function(t){Object(f["u"])(document,'mouseup',this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.em,e=this.el,n=this.$el,r=this.ppfx,i=this.model,o=i.get('disable'),a=i.get('attributes')||{},s=a.class||'',l="".concat(r,"block"),c=t&&t.t("blockManager.labels.".concat(i.id))||i.get('label'),u=i.get('render'),d=i.get('media'),h=o?"".concat(l,"--disable"):"".concat(r,"four-color-h");n.attr(a),e.className="".concat(s," ").concat(l," ").concat(r,"one-bg ").concat(h).trim(),e.innerHTML="\n ".concat(d?"<div class=\"".concat(l,"__media\">").concat(d,"</div>"):'',"\n <div class=\"").concat(l,"-label\">").concat(c,"</div>\n "),e.title=e.textContent.trim(),e.setAttribute('draggable',!(!Object(f["k"])(t)||o));var p=u&&u({el:e,model:i,className:l,prefix:r});return p&&(e.innerHTML=p),this}}),g=l.a.View.extend({template:Object(o["template"])("\n <div class=\"<%= pfx %>title\">\n <i class=\"<%= pfx %>caret-icon\"></i>\n <%= label %>\n </div>\n <div class=\"<%= pfx %>blocks-c\"></div>\n "),events:{},initialize:function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t;var e=t.pStylePrefix||'';this.em=t.em,this.pfx=e,this.caretR='fa fa-caret-right',this.caretD='fa fa-caret-down',this.iconClass="".concat(e,"caret-icon"),this.activeClass="".concat(e,"open"),this.className="".concat(e,"block-category"),this.events["click .".concat(e,"title")]='toggle',this.listenTo(this.model,'change:open',this.updateVisibility),this.delegateEvents()},updateVisibility:function(){this.model.get('open')?this.open():this.close()},open:function(){this.el.className="".concat(this.className," ").concat(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getBlocksEl().style.display=''},close:function(){this.el.className=this.className,this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getBlocksEl().style.display='none'},toggle:function(){var t=this.model;t.set('open',!t.get('open'))},getIconEl:function(){return this.iconEl||(this.iconEl=this.el.querySelector('.'+this.iconClass)),this.iconEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector('.'+this.pfx+'blocks-c')),this.blocksEl},append:function(t){this.getBlocksEl().appendChild(t)},render:function(){var t=this.em,e=this.el,n=this.$el,r=this.model,i=t.t("blockManager.categories.".concat(r.id))||r.get('label');return e.innerHTML=this.template({pfx:this.pfx,label:i}),e.className=this.className,n.css({order:r.get('order')}),this.updateVisibility(),this}});function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var b=l.a.View.extend({initialize:function(t,e){Object(o["bindAll"])(this,'getSorter','onDrag','onDrop'),this.config=e||{},this.categories=t.categories||'',this.renderedCategories=[];var n=this.config.pStylePrefix||'';this.ppfx=n,this.noCatClass="".concat(n,"blocks-no-cat"),this.blockContClass="".concat(n,"blocks-c"),this.catsClass="".concat(n,"block-categories");var r=this.collection;this.listenTo(r,'add',this.addTo),this.listenTo(r,'reset',this.render),this.em=this.config.em,this.tac='test-tac',this.grabbingCls=this.ppfx+'grabbing',this.em&&(this.config.getSorter=this.getSorter,this.canvas=this.em.get('Canvas'))},updateConfig:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=m(m({},this.config),t)},getSorter:function(){if(this.em){if(!this.sorter){var t=this.em.get('Utils'),e=this.canvas;this.sorter=new t.Sorter({container:e.getBody(),placer:e.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:e.getFrameEl().contentDocument,direction:'a',wmargin:1,nested:1,em:this.em,canvasRelative:1})}return this.sorter}},onDrag:function(t){this.em.stopDefault(),this.em.trigger('block:drag:start',t)},onMove:function(t){this.em.trigger('block:drag:move',t)},onDrop:function(t){var e=this.em;e.runDefault(),t&&t.get&&(t.get('activeOnRender')&&(t.trigger('active'),t.set('activeOnRender',0)),e.trigger('block:drag:stop',t))},addTo:function(t){this.add(t)},add:function(t,e){var n=this.config,r=e||null,i=new p({model:t,attributes:t.get('attributes')},n).render().el,a=t.get('category');if(a&&this.categories&&!n.ignoreCategories){Object(o["isString"])(a)?a={id:a,label:a}:Object(o["isObject"])(a)&&!a.id&&(a.id=a.label);var s=this.categories.add(a),l=s.get('id'),c=this.renderedCategories[l],u=this.getCategoriesEl();return t.set('category',s),!c&&u&&(c=new g({model:s},this.config).render(),this.renderedCategories[l]=c,u.appendChild(c.el)),void(c&&c.append(i))}r?r.appendChild(i):this.append(i)},getCategoriesEl:function(){return this.catsEl||(this.catsEl=this.el.querySelector(".".concat(this.catsClass))),this.catsEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.noCatClass," .").concat(this.blockContClass))),this.blocksEl},append:function(t){var e=this.getBlocksEl();e&&e.appendChild(t)},render:function(){var t=this,e=this.ppfx,n=document.createDocumentFragment();this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML="\n <div class=\"".concat(this.catsClass,"\"></div>\n <div class=\"").concat(this.noCatClass,"\">\n <div class=\"").concat(this.blockContClass,"\"></div>\n </div>\n "),this.collection.each((function(e){return t.add(e,n)})),this.append(n);var r="".concat(this.blockContClass,"s ").concat(e,"one-bg ").concat(e,"two-color");return this.$el.addClass(r),this}});function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n,r={},i=[];return{name:'BlockManager',init:function(n){var o=(r=n||{}).em;for(var s in a)s in r||(r[s]=a[s]);return t=new d([]),e=new d([]),i=new h,t.listenTo(t,'add',(function(t){e.add(t),o&&o.trigger('block:add',t)})),t.listenTo(t,'remove',(function(t){e.remove(t),o&&o.trigger('block:remove',t)})),t.listenTo(t,'reset',(function(t){e.reset(t.models)})),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},postRender:function(){n=new b({collection:e,categories:i},r);var t=this.getConfig().appendTo;t&&(Object(o["isElement"])(t)?t:document.querySelector(t)).appendChild(this.render(e.models))},add:function(e,n){var r=n||{};return r.id=e,t.add(r)},get:function(e){return t.get(e)},getAll:function(){return t},getAllVisible:function(){return e},remove:function(e){return t.remove(e)},getCategories:function(){return i},getContainer:function(){return n.el},render:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t||this.getAll().models;if(e.external){var a=new d(o);return new b({collection:a,categories:i},w(w({},r),e)).render().el}return n&&(n.updateConfig(e),n.collection.reset(o),n.rendered||(n.render(),n.rendered=1)),this.getContainer()},destroy:function(){t.reset(),t.stopListening(),e.reset(),i.reset(),n&&n.remove(),[t,e,i,n].forEach((function(t){return null})),r={}}}}},function(t,e,n){"use strict";n.r(e);var r={assets:[],noAssets:'',stylePrefix:'am-',upload:0,uploadName:'files',headers:{},params:{},credentials:'include',multiUpload:!0,autoAdd:1,customFetch:'',uploadFile:'',embedAsBase64:1,handleAdd:'',dropzone:0,openAssetsOnDrop:1,dropzoneContent:'',beforeUpload:null,showUrlInput:!0},i=n(1),o=n.n(i),a=n(2),s=n.n(a),l=o.a.Model.extend({idAttribute:'src',defaults:{type:'',src:''},getFilename:function(){return this.get('src').split('/').pop()},getExtension:function(){return this.getFilename().split('.').pop()}});function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){s()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=l.extend({defaults:u(u({},l.prototype.defaults),{},{type:'image',unitDim:'px',height:0,width:0})}),h=n(0),f=o.a.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t,this.collection=t.collection;var e=t.config||{};this.config=e,this.pfx=e.stylePrefix||'',this.ppfx=e.pStylePrefix||'',this.em=e.em,this.className=this.pfx+'asset',this.listenTo(this.model,'destroy remove',this.remove),this.model.view=this;var n=this.init&&this.init.bind(this);n&&n(t)},template:function(){var t=this.pfx;return"\n <div class=\"".concat(t,"preview-cont\">\n ").concat(this.getPreview(),"\n </div>\n <div class=\"").concat(t,"meta\">\n ").concat(this.getInfo(),"\n </div>\n <div class=\"").concat(t,"close\" data-toggle=\"asset-remove\">\n ⨯\n </div>\n ")},updateTarget:function(t){t&&t.set&&(t.set('attributes',Object(h["clone"])(t.get('attributes'))),t.set('src',this.model.get('src')))},getPreview:function(){return''},getInfo:function(){return''},render:function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this}}).extend({events:{'click [data-toggle=asset-remove]':'onRemove',click:'onClick',dblclick:'onDblClick'},getPreview:function(){var t=this.pfx,e=this.model.get('src');return"\n <div class=\"".concat(t,"preview\" style=\"background-image: url('").concat(e,"');\"></div>\n <div class=\"").concat(t,"preview-bg ").concat(this.ppfx,"checker-bg\"></div>\n ")},getInfo:function(){var t=this.pfx,e=this.model,n=e.get('name'),r=e.get('width'),i=e.get('height'),o=e.get('unitDim'),a=r&&i?"".concat(r,"x").concat(i).concat(o):'';return n=n||e.getFilename(),"\n <div class=\"".concat(t,"name\">").concat(n,"</div>\n <div class=\"").concat(t,"dimensions\">").concat(a,"</div>\n ")},init:function(t){var e=this.pfx;this.className+=" ".concat(e,"asset-image")},onClick:function(){var t=this.config.onClick,e=this.model;this.collection.trigger('deselectAll'),this.$el.addClass(this.pfx+'highlight'),Object(h["isFunction"])(t)?t(e):this.updateTarget(this.collection.target)},onDblClick:function(){var t=this.em,e=this.model,n=this.config.onDblClick;Object(h["isFunction"])(n)?n(e):(this.updateTarget(this.collection.target),t&&t.get('Modal').close());var r=this.collection.onSelect;Object(h["isFunction"])(r)&&r(e)},onRemove:function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)}}),p=n(30),g=o.a.Collection.extend(p["a"]).extend({types:[{id:'image',model:d,view:f,isType:function(t){return'string'==typeof t?{type:'image',src:t}:t}}]}),v=n(25),m=n.n(v),b=o.a.View.extend({events:{submit:'handleSubmit'},template:function(t){var e=t.pfx,n=t.ppfx,r=t.em,i=(m()(t,["pfx","ppfx","em"]),'');return this.config.showUrlInput&&(i="\n <form class=\"".concat(e,"add-asset\">\n <div class=\"").concat(n,"field ").concat(e,"add-field\">\n <input placeholder=\"").concat(r&&r.t('assetManager.inputPlh'),"\"/>\n </div>\n <button class=\"").concat(n,"btn-prim\">").concat(r&&r.t('assetManager.addButton'),"</button>\n <div style=\"clear:both\"></div>\n </form>\n ")),"\n <div class=\"".concat(e,"assets-cont\">\n <div class=\"").concat(e,"assets-header\">\n ").concat(i,"\n </div>\n <div class=\"").concat(e,"assets\" data-el=\"assets\"></div>\n <div style=\"clear:both\"></div>\n </div>\n ")},initialize:function(t){this.options=t,this.config=t.config,this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.em=this.config.em;var e=this.collection;this.listenTo(e,'reset',this.renderAssets),this.listenTo(e,'add',this.addToAsset),this.listenTo(e,'remove',this.removedAsset),this.listenTo(e,'deselectAll',this.deselectAll)},handleSubmit:function(t){t.preventDefault();var e=this.getAddInput(),n=e&&e.value.trim(),r=this.config.handleAdd;n&&(e.value='',this.getAssetsEl().scrollTop=0,r?r.bind(this)(n):this.options.globalCollection.add(n,{at:0}))},getAssetsEl:function(){return this.el.querySelector(".".concat(this.pfx,"assets"))},getAddInput:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl},removedAsset:function(t){this.collection.length||this.toggleNoAssets()},addToAsset:function(t){1==this.collection.length&&this.toggleNoAssets(1),this.addAsset(t)},addAsset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e,r=this.collection,i=this.config,o=new t.typeView({model:t,collection:r,config:i}).render().el;if(n)n.appendChild(o);else{var a=this.getAssetsEl();a&&a.insertBefore(o,a.firstChild)}return o},toggleNoAssets:function(t){var e=this.$el.find(".".concat(this.pfx,"assets"));if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},deselectAll:function(){var t=this.pfx;this.$el.find(".".concat(t,"highlight")).removeClass("".concat(t,"highlight"))},renderAssets:function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find(".".concat(this.pfx,"assets"));n.empty(),this.toggleNoAssets(this.collection.length),this.collection.each((function(n){return t.addAsset(n,e)})),n.append(e)},render:function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this.rendered=1,this}}),y=n(28);function w(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var O=o.a.View.extend({template:Object(h["template"])("\n <form>\n <div id=\"<%= pfx %>title\"><%= title %></div>\n <input type=\"file\" id=\"<%= uploadId %>\" name=\"file\" accept=\"*/*\" <%= disabled ? 'disabled' : '' %> <%= multiUpload ? 'multiple' : '' %>/>\n <div style=\"clear:both;\"></div>\n </form>\n "),events:{},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t;var e=t.config||{};this.config=e,this.em=this.config.em,this.pfx=e.stylePrefix||'',this.ppfx=e.pStylePrefix||'',this.target=this.options.globalCollection||{},this.uploadId=this.pfx+'uploadFile',this.disabled=void 0!==e.disableUpload?e.disableUpload:!e.upload&&!e.embedAsBase64,this.multiUpload=void 0===e.multiUpload||e.multiUpload,this.events['change #'+this.uploadId]='uploadFile';var n=e.uploadFile;n?this.uploadFile=n.bind(this):!e.upload&&e.embedAsBase64&&(this.uploadFile=this.constructor.embedAsBase64),this.delegateEvents()},onUploadStart:function(){var t=this.config.em;t&&t.trigger('asset:upload:start')},onUploadEnd:function(t){var e=this.$el,n=this.config.em;n&&n.trigger('asset:upload:end',t);var r=e.find('input');r&&r.val('')},onUploadError:function(t){var e=this.config.em;console.error(t),this.onUploadEnd(t),e&&e.trigger('asset:upload:error',t)},onUploadResponse:function(t,e){var n,r=this.config.em,i=this.config,o=this.target;try{n='string'==typeof t?JSON.parse(t):t}catch(e){n=t}r&&r.trigger('asset:upload:response',n),i.autoAdd&&o&&o.add(n.data,{at:0}),this.onUploadEnd(t),e&&e(n)},uploadFile:function(t,e){var n=this,r=t.dataTransfer?t.dataTransfer.files:t.target.files,i=this.config,o=i.beforeUpload;if(!1!==(o&&o(r))){var a=new FormData,s=i.params,l=i.customFetch;for(var c in s)a.append(c,s[c]);if(this.multiUpload)for(var u=0;u<r.length;u++)a.append("".concat(i.uploadName,"[]"),r[u]);else r.length&&a.append(i.uploadName,r[0]);this.target;var d=i.upload,h=i.headers,f='X-Requested-With';if(void 0===h[f]&&(h[f]='XMLHttpRequest'),d){this.onUploadStart();var p={method:'post',credentials:i.credentials||'include',headers:h,body:a};return(l?l(d,p):Object(y["a"])(d,p).then((function(t){return 1==(t.status/200|0)?t.text():t.text().then((function(t){return Promise.reject(t)}))}))).then((function(t){return n.onUploadResponse(t,e)})).catch((function(t){return n.onUploadError(t)}))}}},initDrop:function(){var t=this;if(!this.uploadForm&&(this.uploadForm=this.$el.find('form').get(0),'draggable'in this.uploadForm)){this.uploadFile;this.uploadForm.ondragover=function(){return this.className=t.pfx+'hover',!1},this.uploadForm.ondragleave=function(){return this.className='',!1},this.uploadForm.ondrop=function(e){this.className='',e.preventDefault(),t.uploadFile(e)}}},initDropzone:function(t){var e=this,n=0,r=this.config,i=t.model,o=t.el,a=i.get('Editor'),s=(i.get('Config').el,i.get('Canvas').getBody()),l=this.ppfx,c="".concat(l,"dropzone-active"),u="".concat(l,"dropzone"),d=function(){o.className=o.className.replace(c,'').trim(),n=0},h=function(){return n||(o.className+=" ".concat(c),n=1),!1},f=function(){return d(),!1},p=function(t){if(d(),t.preventDefault(),t.stopPropagation(),e.uploadFile(t),r.openAssetsOnDrop&&a){var n=a.getSelected();a.runCommand('open-assets',{target:n,onSelect:function(){a.Modal.close(),a.AssetManager.setTarget(null)}})}return!1};t.$el.append("<div class=\"".concat(u,"\">").concat(r.dropzoneContent,"</div>")),d(),'draggable'in o&&[o,s].forEach((function(t){t.ondragover=h,t.ondragleave=f,t.ondrop=p}))},render:function(){var t=this.$el,e=this.pfx,n=this.em;return t.html(this.template({title:n&&n.t('assetManager.uploadTitle'),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:e})),this.initDrop(),t.attr('class',e+'file-uploader'),this}},{embedAsBase64:function(t,e){var n=this,r=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(FileReader){var o,a=[],s=/^(.+)\/(.+)$/,l=w(r);try{var c=function(){var t=o.value,e=new Promise((function(e,n){var r=new FileReader;r.addEventListener('load',(function(i){var o,a=t.name,l=s.exec(t.type);if('image'===(o=l?l[1]:t.type)){var c={src:r.result,name:a,type:o,height:0,width:0},u=new Image;u.addEventListener('error',(function(t){n(t)})),u.addEventListener('load',(function(){c.height=u.height,c.width=u.width,e(c)})),u.src=c.src}else e(o?{src:r.result,name:a,type:o}:r.result)})),r.addEventListener('error',(function(t){n(t)})),r.addEventListener('abort',(function(t){n('Aborted')})),r.readAsDataURL(t)}));a.push(e)};for(l.s();!(o=l.n()).done;)c()}catch(t){l.e(t)}finally{l.f()}Promise.all(a).then((function(t){i.data=t,n.onUploadResponse(i,e)}),(function(t){n.onUploadError(t)}))}else this.onUploadError(new Error('Unsupported platform, FileReader is not defined'))}});e["default"]=function(){var t,e,n,i={};return{name:'AssetManager',storageKey:'assets',getConfig:function(){return i},init:function(o){var a=this;for(var s in i=o||{},r)s in i||(i[s]=r[s]);var l=i.pStylePrefix,c=i.em;l&&(i.stylePrefix=l+i.stylePrefix),t=new g([]);var u={collection:new g([]),globalCollection:t,config:i};return n=new O(u),u.fu=n,e=new b(u),t.listenTo(t,'add',(function(t){a.getAllVisible().add(t),c&&c.trigger('asset:add',t)})),t.listenTo(t,'remove',(function(t){a.getAllVisible().remove(t),c&&c.trigger('asset:remove',t)})),this},add:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0===n.at&&(n.at=0),t.add(e,n)},get:function(e){return t.where({src:e})[0]},getAll:function(){return t},getAllVisible:function(){return e.collection},remove:function(t){var e=this.get(t);return this.getAll().remove(e),this},store:function(t){var e={},n=JSON.stringify(this.getAll().toJSON());return e[this.storageKey]=n,!t&&i.stm&&i.stm.store(e),e},load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.storageKey,n=t[e]||[];if('string'==typeof n)try{n=JSON.parse(t[e])}catch(t){}return n&&n.length&&this.getAll().reset(n),n},getContainer:function(){return e.el},getAssetsEl:function(){return e.el.querySelector('[data-el=assets]')},render:function(t){var n=t||this.getAll().models;return e.rendered||e.render(),e.collection.reset(n),this.getContainer()},addType:function(t,e){this.getAll().addType(t,e)},getType:function(t){return this.getAll().getType(t)},getTypes:function(){return this.getAll().getTypes()},AssetsView:function(){return e},FileUploader:function(){return n},onLoad:function(){this.getAll().reset(i.assets)},postRender:function(t){i.dropzone&&n.initDropzone(t)},setTarget:function(t){e.collection.target=t},onSelect:function(t){e.collection.onSelect=t},onClick:function(t){i.onClick=t},onDblClick:function(t){i.onDblClick=t},destroy:function(){t.reset(),n.collection.reset(),n.remove(),e.remove(),[t,e,n].forEach((function(t){return null})),i={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(11),a={stylePrefix:'gjs-',components:'',style:'',fromElement:0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:'900px',width:'100%',log:['warning','error'],baseCss:"\n * {\n box-sizing: border-box;\n }\n html, body, [data-gjs-type=wrapper] {\n min-height: 100%;\n }\n body {\n margin: 0;\n height: 100%;\n background-color: #fff\n }\n [data-gjs-type=wrapper] {\n overflow: auto;\n overflow-x: hidden;\n }\n\n * ::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1)\n }\n\n * ::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2)\n }\n\n * ::-webkit-scrollbar {\n width: 10px\n }\n ",protectedCss:'* { box-sizing: border-box; } body {margin: 0;}',canvasCss:'',defaultCommand:'select-comp',showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:'max-width',tagVarStart:'{[ ',tagVarEnd:' ]}',keepEmptyTextNodes:0,jsInHtml:!0,nativeDnD:1,multipleSelection:1,exportWrapper:0,wrapperIsBody:1,avoidInlineStyle:1,avoidDefaults:1,clearStyles:0,dragMode:0,listenToEl:[],cssIcons:'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css',el:'',i18n:{},undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{devices:[{id:'desktop',name:'Desktop',width:''},{id:'tablet',name:'Tablet',width:'768px',widthMedia:'992px'},{id:'mobileLandscape',name:'Mobile landscape',width:'568px',widthMedia:'768px'},{id:'mobilePortrait',name:'Mobile portrait',width:'320px',widthMedia:'480px'}]},styleManager:{sectors:[{name:'General',open:!1,buildProps:['float','display','position','top','right','left','bottom']},{name:'Flex',open:!1,buildProps:['flex-direction','flex-wrap','justify-content','align-items','align-content','order','flex-basis','flex-grow','flex-shrink','align-self']},{name:'Dimension',open:!1,buildProps:['width','height','max-width','min-height','margin','padding']},{name:'Typography',open:!1,buildProps:['font-family','font-size','font-weight','letter-spacing','color','line-height','text-align','text-shadow'],properties:[{property:'text-align',list:[{value:'left',className:'fa fa-align-left'},{value:'center',className:'fa fa-align-center'},{value:'right',className:'fa fa-align-right'},{value:'justify',className:'fa fa-align-justify'}]}]},{name:'Decorations',open:!1,buildProps:['border-radius-c','background-color','border-radius','border','box-shadow','background']},{name:'Extra',open:!1,buildProps:['transition','perspective','transform']}]},blockManager:{},traitManager:{},textViewCode:'Code',keepUnusedStyles:0,multiFrames:0},s=n(0),l=n(1),c=n.n(l),u=n(3);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}c.a.$=o["default"];var f,p,g=[n(108),n(106),n(77),n(78),n(102),n(101),n(105),n(100),n(104),n(103),n(99),n(98),n(107),n(96),n(110),n(94),n(92),n(69),n(93),n(109),n(95)],v=c.a.Collection;!function(t){var e=t.$;if(e&&'jQuery'!==e.prototype.constructor.name){var n=e.fn;n.hide=function(){return this.css('display','none')},n.show=function(){return this.css('display','block')},n.focus=function(){var t=this.get(0);return t&&t.focus(),this},n.bind=function(t,e){return this.on(t,e)},n.unbind=function(t,e){if(Object(s["isObject"])(t)){for(var n in t)t.hasOwnProperty(n)&&this.off(n,t[n]);return this}return this.off(t,e)},n.click=function(t){return t?this.on('click',t):this.trigger('click')},n.change=function(t){return t?this.on('change',t):this.trigger('change')},n.keydown=function(t){return t?this.on('keydown',t):this.trigger('keydown')},n.delegate=function(t,e,n,r){return r||(r=n),this.on(e,t,(function(t){t.data=n,r(t)}))},n.scrollLeft=function(){var t=this.get(0),e=(t=9==t.nodeType?t.defaultView:t)instanceof Window?t:null;return e?e.pageXOffset:t.scrollLeft||0},n.scrollTop=function(){var t=this.get(0),e=(t=9==t.nodeType?t.defaultView:t)instanceof Window?t:null;return e?e.pageYOffset:t.scrollTop||0};var r=e.prototype.offset;n.offset=function(t){var e,n;return t&&(e=t.top,n=t.left),void 0!==e&&this.css('top',"".concat(e,"px")),void 0!==n&&this.css('left',"".concat(n,"px")),r.call(this)},e.map=function(t,e){for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n};var i=Array.prototype.indexOf;e.inArray=function(t,e,n){return null==e?-1:i.call(e,t,n)},e.Event=function(t,n){if(!(this instanceof e.Event))return new e.Event(t,n);this.type=t,this.isDefaultPrevented=function(){return!1}}}}({Backbone:c.a,$:c.a.$});var m={debug:console.log,info:console.info,warning:console.warn,error:console.error},b=c.a.Model.extend({defaults:function(){return{editing:0,selected:new v,clipboard:null,dmode:0,componentHovered:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:''}},initialize:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=e,this.set('Config',e),this.set('modules',[]),this.set('toLoad',[]),this.set('storables',[]),this.set('selected',new v),this.set('dmode',e.dragMode);var n=e.el,r=e.log,i=!0===r?Object(s["keys"])(m):Object(s["isArray"])(r)?r:[];Object(s["bindAll"])(this,'initBaseColorPicker'),n&&e.fromElement&&(this.config.components=n.innerHTML),this.attrsOrig=n?Object(s["toArray"])(n.attributes).reduce((function(t,e){return t[e.nodeName]=e.nodeValue,t}),{}):'',g.forEach((function(e){return t.loadModule(e)})),this.on('change:componentHovered',this.componentHovered,this),this.on('change:changesCount',this.updateChanges,this),i.forEach((function(e){return t.listenLog(e)})),[{from:'change:selectedComponent',to:'component:toggled'}].forEach((function(e){var n=e.from,r=e.to;t.listenTo(t,n,(function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];t.trigger.apply(t,[r].concat(i)),t.logWarning("The event '".concat(n,"' is deprecated, replace it with '").concat(r,"'"))}))}))},getContainer:function(){return this.config.el},listenLog:function(t){this.listenTo(this,"log:".concat(t),m[t])},getConfig:function(t){var e=this.config;return Object(s["isUndefined"])(t)?e:e[t]},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get('StorageManager');this.get('toLoad').forEach((function(t){t.onLoad()}));var r=function(){t.get('modules').forEach((function(e){return e.postLoad&&e.postLoad(t)})),e&&e()};n&&n.canAutoload()?this.load(r):r()},updateChanges:function(){var t=this,e=this.get('StorageManager'),n=this.get('changesCount');p&&clearTimeout(p),p=setTimeout((function(){return t.trigger('update')})),this.config.noticeOnUnload&&(window.onbeforeunload=n?function(t){return 1}:null),e.isAutosave()&&n>=e.getStepsBeforeSave()&&this.store()},loadModule:function(t){var e=this.config,n=new(t.default||t),r=n.name.charAt(0).toLowerCase()+n.name.slice(1),i=Object(s["isUndefined"])(e[r])?e[n.name]:e[r],o=i||{},a=this.get('StorageManager');if(o.pStylePrefix=e.pStylePrefix||'',Object(s["isUndefined"])(i)||i||(o._disable=1),n.storageKey&&n.store&&n.load&&a){o.stm=a;var l='domComponents'==r?'unshift':'push';this.get('storables')[l](n)}return o.em=this,n.init(h({},o)),!n.private&&this.set(n.name,n),n.onLoad&&this.get('toLoad').push(n),this.get('modules').push(n),this},init:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.destroyed&&(this.initialize(e),this.destroyed=0),this.set('Editor',t)},getEditor:function(){return this.get('Editor')},handleUpdates:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.temporary||r.noCount||r.avoidStore||(f&&clearTimeout(f),f=setTimeout((function(){n.set('changesCount',n.get('changesCount')+1,r)}),0))},componentHovered:function(t,e,n){var r=this.previous('componentHovered');r&&this.trigger('component:unhovered',r,n),e&&this.trigger('component:hovered',e,n)},getSelected:function(){return this.get('selected').last()},getSelectedAll:function(){var t=this.get('selected');return t&&t.models||[]},setSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.event,i=r&&(r.ctrlKey||r.metaKey),a=r||{},l=a.shiftKey,c=Object(s["isArray"])(t),d=c?t:[t],h=this.get('selected'),f=this.getConfig('multipleSelection');c&&this.removeSelected(h.filter((function(t){return!Object(s["contains"])(d,t)}))),d.forEach((function(t){var r=Object(u["g"])(t,o["default"]);if(!r||r.get('selectable')){if(i&&f)return e.toggleSelected(r);if(l&&f){e.clearSelection(e.get('Canvas').getWindow());var a,d,p=r.collection,g=r.index();if(e.getSelectedAll().forEach((function(t){var e=t.collection,n=t.index();e===p&&(n<g?a=Object(s["isUndefined"])(a)?n:Math.max(a,n):n>g&&(d=Object(s["isUndefined"])(d)?n:Math.min(d,n)))})),!Object(s["isUndefined"])(a))for(;a!==g;)e.addSelected(p.at(a)),a++;if(!Object(s["isUndefined"])(d))for(;d!==g;)e.addSelected(p.at(d)),d--;return e.addSelected(r)}!c&&e.removeSelected(h.filter((function(t){return t!==r}))),e.addSelected(r,n),r}}))},addSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(u["g"])(t,o["default"]),i=Object(s["isArray"])(r)?r:[r];i.forEach((function(t){if(!t||t.get('selectable')){var r=e.get('selected');n.forceChange&&r.remove(t,n),r.push(t,n)}}))},removeSelected:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.get('selected').remove(Object(u["g"])(t,o["default"]),e)},toggleSelected:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(u["g"])(t,o["default"]),i=Object(s["isArray"])(r)?r:[r];i.forEach((function(t){e.get('selected').contains(t)?e.removeSelected(t,n):e.addSelected(t,n)}))},setHovered:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(u["g"])(t,o["default"]);n&&!n.get('hoverable')||(e.forceChange&&this.set('componentHovered',''),this.set('componentHovered',n,e))},getHovered:function(){return this.get('componentHovered')},setComponents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.get('DomComponents').setComponents(t,e)},getComponents:function(){var t=this.get('DomComponents'),e=this.get('CodeManager');if(t&&e){var n=t.getComponents();return e.getCode(n,'json')}},setStyle:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get('CssComposer').getAll(),r=0,i=n.length;r<i;r++)n.pop();return n.add(t,e),this},getStyle:function(){return this.get('CssComposer').getAll()},setState:function(t){return this.set('state',t),this},getState:function(){return this.get('state')||''},getHtml:function(){var t=this.config,e=t.exportWrapper,n=t.wrapperIsBody,r=t.jsInHtml?this.getJs():'',i=this.get('DomComponents').getComponent(),o=this.get('CodeManager').getCode(i,'html',{exportWrapper:e,wrapperIsBody:n});return o+=r?"<script>".concat(r,"<\/script>"):''},getCss:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.config,n=e.wrapperIsBody,r=t.avoidProtected,i=Object(s["isUndefined"])(t.keepUnusedStyles)?e.keepUnusedStyles:t.keepUnusedStyles,o=this.get('CssComposer'),a=this.get('DomComponents').getComponent(),l=r?'':e.protectedCss;return l+this.get('CodeManager').getCode(a,'css',{cssc:o,wrapperIsBody:n,keepUnusedStyles:i})},getJs:function(){var t=this.get('DomComponents').getWrapper();return this.get('CodeManager').getCode(t,'js').trim()},store:function(t){var e=this,n=this.get('StorageManager'),r={};if(n)return this.get('storables').forEach((function(t){var e=t.store(1);for(var n in e)r[n]=e[n]})),n.store(r,(function(n){t&&t(n),e.set('changesCount',0),e.trigger('storage:store',r)})),r},load:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getCacheLoad(1,(function(n){t.get('storables').forEach((function(e){e.load(n),e.postLoad&&e.postLoad(t)})),e&&e(n)}))},getCacheLoad:function(t,e){var n=this;if(this.cacheLoad&&!t)return this.cacheLoad;var r=this.get('StorageManager'),i=[];if(!r)return{};this.get('storables').forEach((function(t){var e=t.storageKey;e=Object(s["isFunction"])(e)?e():e,(Object(s["isArray"])(e)?e:[e]).forEach((function(t){return i.push(t)}))})),r.load(i,(function(t){n.cacheLoad=t,e&&e(t),setTimeout((function(){return n.trigger('storage:load',t)}))}))},getDeviceModel:function(){var t=this.get('device');return this.get('DeviceManager').get(t)},runDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get('Commands').get(this.config.defaultCommand);e&&!this.defaultRunning&&(e.stop(this,this,t),e.run(this,this,t),this.defaultRunning=1)},stopDefault:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.get('Commands'),n=e.get(this.config.defaultCommand);n&&(n.stop(this,this,t),this.defaultRunning=0)},refreshCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set('canvasOffset',null),this.set('canvasOffset',this.get('Canvas').getOffset()),t.tools&&this.trigger('canvas:updateTools')},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},getCurrentMedia:function(){var t=this.config,e=this.getDeviceModel(),n=t.mediaCondition,r=t.devicePreviewMode,i=e&&e.get('widthMedia');return e&&i&&!r?"(".concat(n,": ").concat(i,")"):''},getWrapper:function(){return this.get('DomComponents').getWrapper()},setCurrentFrame:function(t){return this.set('currentFrame',t)},getCurrentFrame:function(){return this.get('currentFrame')},getCurrentFrameModel:function(){return(this.getCurrentFrame()||{}).model},getDirtyCount:function(){return this.get('changesCount')},getZoomDecimal:function(){return this.get('Canvas').getZoomDecimal()},getZoomMultiplier:function(){return this.get('Canvas').getZoomMultiplier()},setDragMode:function(t){return this.set('dmode',t)},t:function(){var t;return(t=this.get('I18n')).t.apply(t,arguments)},inAbsoluteMode:function(){return'absolute'===this.get('dmode')},destroyAll:function(){var t=this,e=this.config,n=this.getEditor(),r=(e.grapesjs||{}).editors,i=void 0===r?[]:r;this.stopDefault(),this.get('modules').slice().reverse().forEach((function(t){return t.destroy()})),this.view.remove(),this.stopListening(),this.clear({silent:!0}),this.destroyed=1,['config','view','_previousAttributes','_events','_listeners'].forEach((function(e){return t[e]={}})),i.splice(i.indexOf(n),1),Object(o["default"])(e.el).empty().attr(this.attrsOrig)},setEditing:function(t){return this.set('editing',t),this},isEditing:function(){return!!this.get('editing')},log:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.ns,r=e.level,i=void 0===r?'debug':r;if(this.trigger('log',t,e),i&&this.trigger("log:".concat(i),t,e),n){var o="log-".concat(n);this.trigger(o,t,e),i&&this.trigger("".concat(o,":").concat(i),t,e)}},logInfo:function(t,e){this.log(t,h(h({},e),{},{level:'info'}))},logWarning:function(t,e){this.log(t,h(h({},e),{},{level:'warning'}))},logError:function(t,e){this.log(t,h(h({},e),{},{level:'error'}))},initBaseColorPicker:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getConfig(),r=n.colorPicker,i=void 0===r?{}:r,a=n.el,s=n.stylePrefix;return Object(o["default"])(t).spectrum(h(h({containerClassName:"".concat(s,"one-bg ").concat(s,"two-color"),appendTo:a||'body',maxSelectionSize:8,showPalette:!0,palette:[],showAlpha:!0,chooseText:'Ok',cancelText:'⨯'},e),i))},data:function(t,e,n){var r='_gjs-data';if(t[r]||(t[r]={}),Object(s["isUndefined"])(n))return t[r][e];t[r][e]=n}}),y=c.a.$,w=c.a.View.extend({initialize:function(){var t=this,e=this.model;e.view=this,this.conf=e.config,this.pn=e.get('Panels'),this.cv=e.get('Canvas'),e.on('loaded',(function(){t.pn.active(),t.pn.disableButtons(),setTimeout((function(){e.runDefault(),e.trigger('load',e.get('Editor'))}))}))},render:function(){this.model;var t=this.$el,e=this.conf,n=e.stylePrefix,r=y(e.el||"body ".concat(e.container));return Object(u["a"])(e.cssIcons,{unique:1,prepand:1}),t.empty(),e.width&&r.css('width',e.width),e.height&&r.css('height',e.height),t.append(this.cv.render()),t.append(this.pn.render()),t.attr('class',"".concat(n,"editor ").concat(n,"one-bg ").concat(n,"two-color")),r.addClass("".concat(n,"editor-cont")).empty().append(t),this}});function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var C=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=O(O({},a),t);e.pStylePrefix=e.stylePrefix;var n=new b(e),r=new w({model:n,config:e});return{$:o["default"],editor:n,init:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.init(this,O(O({},e),i)),['I18n','Utils','Config','Commands','Keymaps','Modal','Panels','Canvas','Parser','CodeManager','UndoManager','RichTextEditor','DomComponents',['Components','DomComponents'],'LayerManager',['Layers','LayerManager'],'CssComposer',['Css','CssComposer'],'StorageManager',['Storage','StorageManager'],'AssetManager',['Assets','AssetManager'],'BlockManager',['Blocks','BlockManager'],'TraitManager',['Traits','TraitManager'],'SelectorManager',['Selectors','SelectorManager'],'StyleManager',['Styles','StyleManager'],'DeviceManager',['Devices','DeviceManager']].forEach((function(e){Array.isArray(e)?t[e[0]]=n.get(e[1]):t[e]=n.get(e)})),n.on('loaded',(function(){t.UndoManager.clear(),n.get('modules').forEach((function(t){t.postRender&&t.postRender(r)}))})),this},getConfig:function(t){return n.getConfig(t)},getHtml:function(t){return n.getHtml(t)},getCss:function(t){return n.getCss(t)},getJs:function(){return n.getJs()},getComponents:function(){return n.get('DomComponents').getComponents()},getWrapper:function(){return n.get('DomComponents').getWrapper()},setComponents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.setComponents(t,e),this},addComponents:function(t,e){return this.getWrapper().append(t,e)},getStyle:function(){return n.get('CssComposer').getAll()},setStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.setStyle(t,e),this},getSelected:function(){return n.getSelected()},getSelectedAll:function(){return n.getSelectedAll()},getSelectedToStyle:function(){var t=n.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t,e){return n.setSelected(t,e),this},selectAdd:function(t){return n.addSelected(t),this},selectRemove:function(t){return n.removeSelected(t),this},selectToggle:function(t){return n.toggleSelected(t),this},setDevice:function(t){return n.set('device',t),this},getDevice:function(){return n.get('device')},runCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.get('Commands').run(t,e)},stopCommand:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.get('Commands').stop(t,e)},store:function(t){return n.store(t)},load:function(t){return n.load(t)},getContainer:function(){return e.el},getDirtyCount:function(){return n.getDirtyCount()},refresh:function(t){n.refreshCanvas(t)},setCustomRte:function(t){this.RichTextEditor.customRte=t},setCustomParserCss:function(t){return this.Parser.getConfig().parserCss=t,this},setDragMode:function(t){return n.setDragMode(t),this},log:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.log(t,e),this},t:function(){return n.t.apply(n,arguments)},on:function(t,e){return n.on(t,e),this},once:function(t,e){return n.once(t,e),this},off:function(t,e){return n.off(t,e),this},trigger:function(t){return n.trigger.apply(n,arguments),this},destroy:function(){return n.destroyAll()},getEl:function(){return r.el},getModel:function(){return n},render:function(){return r.render(),r.el}}},S={plugins:[]};function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}!function(){if(function(){for(var t,e=window.navigator.userAgent,n=[['edge',/Edge\/([0-9\._]+)/],['ie',/MSIE\s(7\.0)/],['ie',/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],['ie',/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/]],r=0;r<n.length;r++){if(t=n[r][1].exec(e))break}return!!t}()){var t=DOMImplementation.prototype.createHTMLDocument;DOMImplementation.prototype.createHTMLDocument=function(e){return e||(e=''),t.apply(document.implementation,[e])}}}();var T=new function(t){var e=t||{};for(var n in S)n in e||(e[n]=S[n]);var r={};return{add:function(t,e){return r[t]?r[t]:(r[t]=e,e)},get:function(t){return r[t]},getAll:function(){return r}}},P=[],E={autorender:1,plugins:[],pluginsOpts:{}};e["default"]={$:o["default"],editors:P,plugins:T,version:'0.16.34',init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.container;if(!e)throw new Error("'container' is required");(t=j(j(j({},E),t),{},{grapesjs:this})).el=Object(s["isElement"])(e)?e:document.querySelector(e);var n=new C(t).init();return t.plugins.forEach((function(e){var r=T.get(e),i=t.pluginsOpts[e]||{};if(!r){var o=window[e];r=o&&o.default?o.default:o}r?r(n,i):Object(s["isFunction"])(e)?e(n,i):console.warn("Plugin ".concat(e," not found"))})),n.getModel().loadOnStart(),t.autorender&&n.render(),P.push(n),n}}},function(t,e,n){"use strict";n.r(e);var r='sw-visibility',i='export-template',o='open-sm',a='open-tm',s='open-layers',l='open-blocks',c='fullscreen',u='preview',d={stylePrefix:'pn-',defaults:[{id:'commands',buttons:[{}]},{id:'options',buttons:[{active:!0,id:r,className:'fa fa-square-o',command:r,context:r,attributes:{title:'View components'}},{id:u,className:'fa fa-eye',command:u,context:u,attributes:{title:'Preview'}},{id:c,className:'fa fa-arrows-alt',command:c,context:c,attributes:{title:'Fullscreen'}},{id:i,className:'fa fa-code',command:i,attributes:{title:'View code'}}]},{id:'views',buttons:[{id:o,className:'fa fa-paint-brush',command:o,active:!0,togglable:0,attributes:{title:'Open Style Manager'}},{id:a,className:'fa fa-cog',command:a,togglable:0,attributes:{title:'Settings'}},{id:s,className:'fa fa-bars',command:s,togglable:0,attributes:{title:'Open Layer Manager'}},{id:l,className:'fa fa-th-large',command:l,togglable:0,attributes:{title:'Open Blocks'}}]}],em:null,delayBtnsShow:300},h=n(1),f=n.n(h),p=n(41),g=f.a.Model.extend({defaults:{id:'',content:'',visible:!0,buttons:[],attributes:{}},initialize:function(t){this.btn=this.get('buttons')||[],this.buttons=new p["default"](this.btn),this.set('buttons',this.buttons)}}),v=f.a.Collection.extend({model:g}),m=n(2),b=n.n(m),y=n(0);function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){b()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}f.a.$;var O=f.a.View.extend({tagName:function(){return this.model.get('tagName')},events:{click:'clicked'},initialize:function(t){var e=this.model.get('className');this.config=t.config||{},this.em=this.config.em||{};var n=this.config.stylePrefix||'',r=this.config.pStylePrefix||'';this.pfx=n,this.ppfx=this.config.pStylePrefix||'',this.id=n+this.model.get('id'),this.activeCls="".concat(n,"active ").concat(r,"four-color"),this.disableCls="".concat(r,"disabled"),this.btnsVisCls="".concat(n,"visible"),this.className=n+'btn'+(e?' '+e:''),this.listenTo(this.model,'change',this.render),this.listenTo(this.model,'change:active updateActive',this.updateActive),this.listenTo(this.model,'checkActive',this.checkActive),this.listenTo(this.model,'change:bntsVis',this.updateBtnsVis),this.listenTo(this.model,'change:attributes',this.updateAttributes),this.listenTo(this.model,'change:className',this.updateClassName),this.listenTo(this.model,'change:disable',this.updateDisable),this.em&&this.em.get&&(this.commands=this.em.get('Commands'))},updateClassName:function(){var t=this.model,e=this.pfx,n=t.get('className'),r=t.get('attributes').class,i="".concat(r||''," ").concat(e,"btn ").concat(n||'');this.$el.attr('class',i.trim())},updateAttributes:function(){var t=this.em,e=this.model,n=this.$el,r=e.get('attributes')||{},i=t&&t.t&&t.t("panels.buttons.titles.".concat(e.id));n.attr(r),i&&n.attr({title:i}),this.updateClassName()},updateBtnsVis:function(){this.$buttons&&(this.model.get('bntsVis')?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},updateActive:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model,n=this.commands,r=this.$el,i=this.activeCls,o=t.fromCollection,a=e.get('context'),s=e.get('options'),l=e.get('command'),c={};l&&(n&&Object(y["isString"])(l)?c=n.get(l)||{}:Object(y["isFunction"])(l)?c=n.create({run:l}):null!==l&&Object(y["isObject"])(l)&&(c=n.create(l)),e.get('active')?(!o&&e.collection.deactivateAll(a,e),e.set('active',!0,{silent:!0}).trigger('checkActive'),n.runCommand(c,x(x({},s),{},{sender:e})),c.noStop&&e.set('active',!1)):(r.removeClass(i),n.stopCommand(c,x(x({},s),{},{sender:e,force:1}))))},updateDisable:function(){var t=this.disableCls,e=this.model.get('disable');this.$el[e?'addClass':'removeClass'](t)},checkActive:function(){var t=this.model,e=this.$el,n=this.activeCls;t.get('active')?e.addClass(n):e.removeClass(n)},clicked:function(t){var e=this.model;e.get('bntsVis')||e.get('disable')||!e.get('command')||this.toggleActive()},toggleActive:function(){var t=this.model,e=this.em,n=t.attributes,r=n.active,i=n.togglable;r&&!i||(t.set('active',!r),r?t.get('runDefaultCommand')&&e.runDefault():t.get('stopDefaultCommand')&&e.stopDefault())},render:function(){var t=this.model,e=t.get('label'),n=this.$el;return!t.get('el')&&n.empty(),this.updateAttributes(),e&&n.append(e),this.checkActive(),this.updateDisable(),this}}),C=f.a.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||'',this.parentM=this.opt.parentM||null,this.listenTo(this.collection,'add',this.addTo),this.listenTo(this.collection,'reset remove',this.render),this.className=this.pfx+'buttons'},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,r=new O({el:t.get('el'),model:t,config:this.config,parentM:this.parentM}).render().el;return n?n.appendChild(r):this.$el.append(r),r},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each((function(e){this.addToCollection(e,t)}),this),this.$el.append(t),this.$el.attr('class',Object(y["result"])(this,'className')),this}});function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var k=f.a.View.extend({initialize:function(t){var e=t.config||{},n=this.model;this.config=e,this.pfx=e.stylePrefix||'',this.ppfx=e.pStylePrefix||'',this.buttons=n.get('buttons'),this.className=this.pfx+'panel',this.id=this.pfx+n.get('id'),this.listenTo(n,'change:appendContent',this.appendContent),this.listenTo(n,'change:content',this.updateContent),this.listenTo(n,'change:visible',this.toggleVisible),n.view=this},appendContent:function(){this.$el.append(this.model.get('appendContent'))},updateContent:function(){this.$el.html(this.model.get('content'))},toggleVisible:function(){this.model.get('visible')?this.$el.removeClass("".concat(this.ppfx,"hidden")):this.$el.addClass("".concat(this.ppfx,"hidden"))},attributes:function(){return this.model.get('attributes')},initResize:function(){var t=this.config.em,e=t?t.get('Editor'):'',n=this.model.get('resizable');if(e&&n){var r,i,o,a=!0===n?[1,1,1,1]:n,s=a.length,l=0;2==s?(r=a[0],o=a[0],i=a[1],l=a[1]):4==s&&(r=a[0],i=a[1],o=a[2],l=a[3]);var c=e.Utils.Resizer.init(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach((function(e){b()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({tc:r,cr:i,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,silentFrames:1,avoidContainerUpdate:1,prefix:e.getConfig().stylePrefix,onEnd:function(){t&&t.trigger('change:canvasOffset')},posFetcher:function(t,e){var n=e.target,r=t.style,i=c.getConfig(),o=i.keyWidth,a=i.keyHeight,s=t.getBoundingClientRect(),l='container'==n,u=r[o],d=r[a];return{left:0,top:0,width:u&&!l?parseFloat(u):s.width,height:d&&!l?parseFloat(d):s.height}}},n));c.blur=function(){},c.focus(this.el)}},render:function(){var t=this.$el,e=this.ppfx,n="".concat(this.className," ").concat(this.id," ").concat(e,"one-bg ").concat(e,"two-color");if(t.addClass(n),this.buttons.length){var r=new C({collection:this.buttons,config:this.config});t.append(r.render().el)}return t.append(this.model.get('content')),this}}),j=f.a.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||'';var e=this.collection;this.listenTo(e,'add',this.addTo),this.listenTo(e,'reset',this.render),this.listenTo(e,'remove',this.onRemove),this.className=this.pfx+'panels'},onRemove:function(t){var e=t.view;e&&e.remove()},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,r=this.config,i=t.get('el'),o=new k({el:i,model:t,config:r}),a=o.render().el,s=t.get('appendTo');if(i);else if(s){document.querySelector(s).appendChild(a)}else n?n.appendChild(a):this.$el.append(a);return o.initResize(),a},render:function(){var t=this,e=this.$el,n=document.createDocumentFragment();return e.empty(),this.collection.each((function(e){return t.addToCollection(e,n)})),e.append(n),e.attr('class',this.className),this}});e["default"]=function(){var t,e,n={};return{name:'Panels',init:function(r){for(var i in n=r||{},d)i in n||(n[i]=d[i]);var o=n.pStylePrefix;return o&&(n.stylePrefix=o+n.stylePrefix),t=new v(n.defaults),e=new j({collection:t,config:n}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},removePanel:function(e){return t.remove(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get('buttons').add(e):null},removeButton:function(t,e){var n=this.getPanel(t);return n&&n.get('buttons').remove(e)},getButton:function(t,e){var n=this.getPanel(t);if(n){var r=n.get('buttons').where({id:e});return r.length?r[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each((function(t){t.get('buttons').each((function(t){t.get('active')&&t.trigger('updateActive')}))}))},disableButtons:function(){this.getPanels().each((function(t){t.get('buttons').each((function(t){t.get('disable')&&t.trigger('change:disable')}))}))},destroy:function(){t.reset(),t.stopListening(),e.remove(),[n,t,e].forEach((function(t){return{}}))},Panel:g}}},function(t,e,n){"use strict";n.r(e);var r=n(0),i={stylePrefix:'cm-',inlineCss:!1},o=n(2),a=n.n(o),s=n(1),l=n.n(s);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=l.a.Model.extend({build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.get('components');return e.exportWrapper?t.toHTML(u({},e.wrapperIsBody&&{tag:'body'})):this.buildModels(n)},buildModels:function(t){var e='';return t.each((function(t){e+=t.toHTML()})),e}}),h=n(31),f=l.a.Model.extend({build:function(t){var e=t.toJSON();return this.beforeEach(e),Object(r["each"])(e,(function(t,n){var r=e[n];if(r instanceof l.a.Model)e[n]=this.build(r);else if(r instanceof l.a.Collection){var i=r;e[n]=[],i.length&&i.each((function(t,r){e[n][r]=this.build(t)}),this)}}),this),e},beforeEach:function(t){delete t.status}}),p=l.a.Model.extend({mapModel:function(t){var e='',n=t.get('script-export')||t.get('script'),i=t.get('type'),o=t.get('components'),s=t.getId();if(n){var l=t.get('attributes');l=Object(r["extend"])({},l,{id:s}),t.set('attributes',l,{silent:1});var c=t.getScriptString(n),u=t.get('script-props');if(t.get('scriptUpdated')&&!u)this.mapJs[i+'-'+s]={ids:[s],code:c};else{var d,h=this.mapJs[i];if(u&&(d=t.__getScriptProps()),h)h.ids.push(s),d&&(h.props[s]=d);else{var f={ids:[s],code:c};d&&(f.props=a()({},s,d)),this.mapJs[i]=f}}}return o.each((function(t){e+=this.mapModel(t)}),this),e},build:function(t){this.mapJs={},this.mapModel(t);var e='';for(var n in this.mapJs){var r=this.mapJs[n];if(r.props)e+="\n var props = ".concat(JSON.stringify(r.props),";\n var ids = Object.keys(props).map(function(id) { return '#'+id }).join(',');\n var els = document.querySelectorAll(ids);\n for (var i = 0, len = els.length; i < len; i++) {\n var el = els[i];\n (").concat(r.code,".bind(el))(props[el.id]);\n }");else{var i='#'+r.ids.join(', #');e+="\n var items = document.querySelectorAll('".concat(i,"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){").concat(r.code,"}.bind(items[i]))();\n }")}}return e}}),g=n(13),v=n.n(g);n(83),n(44),n(86);function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var b=l.a.Model.extend({defaults:{input:'',label:'',codeName:'',theme:'hopscotch',readOnly:!0,lineNumbers:!0},init:function(t){return Object(r["bindAll"])(this,'onChange'),this.editor=v.a.fromTextArea(t,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({dragDrop:!1,lineWrapping:!0,mode:this.get('codeName')},this.attributes)),this.element=t,this.editor.on('change',this.onChange),this},onChange:function(){this.trigger('update',this)},getEditor:function(){return this.editor},getElement:function(){return this.element},setElement:function(t){return this.element=t,this},refresh:function(){return this.getEditor().refresh(),this},focus:function(){return this.getEditor().focus(),this},getContent:function(){var t=this.getEditor();return t&&t.getValue()},setContent:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.editor;r&&(r.setValue(t),r.autoFormatRange&&(v.a.commands.selectAll(r),r.autoFormatRange(r.getCursor(!0),r.getCursor(!1)),v.a.commands.goDocStart(r)),!n.noRefresh&&setTimeout((function(){return e.refresh()})))}}),y=l.a.View.extend({template:Object(r["template"])("\n <div class=\"<%= pfx %>editor\" id=\"<%= pfx %><%= codeName %>\">\n \t<div id=\"<%= pfx %>title\"><%= label %></div>\n \t<div id=\"<%= pfx %>code\"></div>\n </div>"),initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},render:function(){var t=this.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr('class',this.pfx+'editor-c'),this.$el.find('#'+this.pfx+'code').append(this.model.get('input')),this}});e["default"]=function(){var t={},e={},n={},o={},a={},s='CodeMirror';return{getConfig:function(){return t},config:t,EditorView:y,name:'CodeManager',init:function(e){for(var r in t=e||{},i)r in t||(t[r]=i[r]);var o=t.pStylePrefix;return o&&(t.stylePrefix=o+t.stylePrefix),n.html=new d,n.css=new h["a"],n.json=new f,n.js=new p,a.CodeMirror=new b,this.loadDefaultGenerators().loadDefaultViewers(),this},addGenerator:function(t,n){return e[t]=n,this},getGenerator:function(t){return e[t]||null},getGenerators:function(){return e},addViewer:function(t,e){return o[t]=e,this},getViewer:function(t){return o[t]||null},getViewers:function(){return o},createViewer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(r["isUndefined"])(t.type)?s:t.type,n=this.getViewer(e)&&this.getViewer(e).clone(),i=document.createElement('div'),o=document.createElement('textarea');return i.appendChild(o),n.set(t),n.init(o),n.setElement(i),n},updateViewer:function(t,e){t.setContent(e)},getCode:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.em=t.em;var i=this.getGenerator(n);return i?i.build(e,r):''},loadDefaultGenerators:function(){for(var t in n)this.addGenerator(t,n[t]);return this},loadDefaultViewers:function(){for(var t in a)this.addViewer(t,a[t]);return this},destroy:function(){[t,e,n,o,a].forEach((function(t){return{}}))}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a={stylePrefix:'sm-',sectors:[],appendTo:'',hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:0,avoidComputed:['width','height']},s=n(1),l=n.n(s),c=n(24),u=function(){return{build:function(t){var e=[];'string'==typeof t&&(t=[t]);for(var n=0,r=t.length;n<r;n++){var i={},o=t[n];switch(i.property=o,o){case'border-radius-c':i.property='border-radius'}switch(o){case'top':case'right':case'bottom':case'left':case'margin-top':case'margin-right':case'margin-bottom':case'margin-left':case'padding-top':case'padding-right':case'padding-bottom':case'padding-left':case'width':case'max-width':case'min-width':case'height':case'max-height':case'min-height':case'flex-basis':i.fixedValues=['initial','inherit','auto'];break;case'font-size':i.fixedValues=['medium','xx-small','x-small','small','large','x-large','xx-large','smaller','larger','length','initial','inherit'];break;case'letter-spacing':case'line-height':i.fixedValues=['normal','initial','inherit']}switch(o){case'float':case'position':case'text-align':i.type='radio';break;case'display':case'flex-direction':case'flex-wrap':case'justify-content':case'align-items':case'align-content':case'align-self':case'font-family':case'font-weight':case'border-style':case'box-shadow-type':case'background-repeat':case'background-position':case'background-attachment':case'background-size':case'transition-property':case'transition-timing-function':case'cursor':case'overflow':case'overflow-x':case'overflow-y':i.type='select';break;case'top':case'right':case'bottom':case'left':case'margin-top':case'margin-right':case'margin-bottom':case'margin-left':case'padding-top':case'padding-right':case'padding-bottom':case'padding-left':case'min-height':case'min-width':case'max-height':case'max-width':case'width':case'height':case'font-size':case'letter-spacing':case'line-height':case'text-shadow-h':case'text-shadow-v':case'text-shadow-blur':case'border-radius-c':case'border-top-left-radius':case'border-top-right-radius':case'border-bottom-left-radius':case'border-bottom-right-radius':case'border-width':case'box-shadow-h':case'box-shadow-v':case'box-shadow-blur':case'box-shadow-spread':case'transition-duration':case'perspective':case'transform-rotate-x':case'transform-rotate-y':case'transform-rotate-z':case'transform-scale-x':case'transform-scale-y':case'transform-scale-z':case'order':case'flex-grow':case'flex-shrink':case'flex-basis':i.type='integer';break;case'margin':case'padding':case'border-radius':case'border':case'transform':i.type='composite';break;case'color':case'text-shadow-color':case'background-color':case'border-color':case'box-shadow-color':i.type='color';break;case'text-shadow':case'box-shadow':case'background':case'transition':i.type='stack';break;case'background-image':i.type='file'}switch(o){case'float':case'background-color':case'text-shadow':i.defaults='none';break;case'display':i.defaults='block';break;case'flex-direction':i.defaults='row';break;case'flex-wrap':i.defaults='nowrap';break;case'justify-content':i.defaults='flex-start';break;case'align-items':case'align-content':i.defaults='stretch';break;case'align-self':i.defaults='auto';break;case'position':i.defaults='static';break;case'margin-top':case'margin-right':case'margin-bottom':case'margin-left':case'padding-top':case'padding-right':case'padding-bottom':case'padding-left':case'text-shadow-h':case'text-shadow-v':case'text-shadow-blur':case'border-radius-c':case'box-shadow-h':case'box-shadow-v':case'box-shadow-spread':case'perspective':case'transform-rotate-x':case'transform-rotate-y':case'transform-rotate-z':case'order':case'flex-grow':i.defaults=0;break;case'border-top-left-radius':case'border-top-right-radius':case'border-bottom-left-radius':case'border-bottom-right-radius':i.defaults='0px';break;case'transform-scale-x':case'transform-scale-y':case'transform-scale-z':case'flex-shrink':i.defaults=1;break;case'box-shadow-blur':i.defaults='5px';break;case'top':case'right':case'bottom':case'left':case'min-height':case'min-width':case'max-height':case'max-width':case'width':case'height':case'background-size':case'cursor':case'flex-basis':i.defaults='auto';break;case'font-family':i.defaults='Arial, Helvetica, sans-serif';break;case'font-size':case'border-width':i.defaults='medium';break;case'font-weight':i.defaults='400';break;case'letter-spacing':case'line-height':i.defaults='normal';break;case'color':case'text-shadow-color':case'border-color':case'box-shadow-color':i.defaults='black';break;case'text-align':i.defaults='left';break;case'border-style':i.defaults='solid';break;case'box-shadow-type':i.defaults='';break;case'background-repeat':i.defaults='repeat';break;case'background-position':i.defaults='left top';break;case'background-attachment':i.defaults='scroll';break;case'transition-property':i.defaults='width';break;case'transition-duration':i.defaults='2';break;case'transition-timing-function':i.defaults='ease';break;case'overflow':case'overflow-x':case'overflow-y':i.defaults='visible'}switch(o){case'flex-direction':case'flex-wrap':case'justify-content':case'align-items':case'align-content':i.requires={display:['flex']};break;case'order':case'flex-basis':case'flex-grow':case'flex-shrink':case'align-self':i.requiresParent={display:['flex']}}switch(o){case'top':case'bottom':case'margin-top':case'margin-bottom':case'padding-top':case'padding-bottom':case'min-height':case'max-height':case'height':i.units=['px','%','vh'];break;case'right':case'left':case'margin-right':case'margin-left':case'padding-right':case'padding-left':case'min-width':case'max-width':case'width':i.units=['px','%','vw'];break;case'flex-basis':i.units=['px','%','vw','vh'];break;case'text-shadow-v':case'text-shadow-h':case'text-shadow-blur':case'border-radius-c':case'border-top-left-radius':case'border-top-right-radius':case'border-bottom-left-radius':case'border-bottom-right-radius':case'box-shadow-h':case'box-shadow-v':i.units=['px','%'];break;case'font-size':case'letter-spacing':case'line-height':i.units=['px','em','rem','%'];break;case'border-width':i.units=['px','em'];break;case'box-shadow-blur':case'box-shadow-spread':case'perspective':i.units=['px'];break;case'transition-duration':i.units=['s'];break;case'transform-rotate-x':case'transform-rotate-y':case'transform-rotate-z':i.units=['deg']}switch(o){case'padding-top':case'padding-right':case'padding-bottom':case'padding-left':case'min-height':case'min-width':case'max-height':case'max-width':case'width':case'height':case'font-size':case'text-shadow-blur':case'border-radius-c':case'border-top-left-radius':case'border-top-right-radius':case'border-bottom-left-radius':case'border-bottom-right-radius':case'border-width':case'box-shadow-blur':case'transition-duration':case'perspective':case'flex-basis':i.min=0}switch(o){case'text-shadow':case'box-shadow':case'background':i.preview=!0}switch(o){case'background':i.detached=!0}switch(o){case'transform-rotate-x':i.functionName='rotateX';break;case'transform-rotate-y':i.functionName='rotateY';break;case'transform-rotate-z':i.functionName='rotateZ';break;case'transform-scale-x':i.functionName='scaleX';break;case'transform-scale-y':i.functionName='scaleY';break;case'transform-scale-z':i.functionName='scaleZ';break;case'background-image':i.functionName='url'}switch(o){case'float':i.list=[{value:'none'},{value:'left'},{value:'right'}];break;case'display':i.list=[{value:'block'},{value:'inline'},{value:'inline-block'},{value:'flex'},{value:'none'}];break;case'flex-direction':i.list=[{value:'row'},{value:'row-reverse'},{value:'column'},{value:'column-reverse'}];break;case'flex-wrap':i.list=[{value:'nowrap'},{value:'wrap'},{value:'wrap-reverse'}];break;case'justify-content':i.list=[{value:'flex-start'},{value:'flex-end'},{value:'center'},{value:'space-between'},{value:'space-around'},{value:'space-evenly'}];break;case'align-items':i.list=[{value:'flex-start'},{value:'flex-end'},{value:'center'},{value:'baseline'},{value:'stretch'}];break;case'align-content':i.list=[{value:'flex-start'},{value:'flex-end'},{value:'center'},{value:'space-between'},{value:'space-around'},{value:'stretch'}];break;case'align-self':i.list=[{value:'auto'},{value:'flex-start'},{value:'flex-end'},{value:'center'},{value:'baseline'},{value:'stretch'}];break;case'position':i.list=[{value:'static'},{value:'relative'},{value:'absolute'},{value:'fixed'}];break;case'font-family':var a=', sans-serif',s=['Arial, Helvetica'+a,'Arial Black, Gadget'+a,'Brush Script MT'+a,'Comic Sans MS, cursive'+a,'Courier New, Courier, monospace','Georgia, serif','Helvetica'+a,'Impact, Charcoal'+a,'Lucida Sans Unicode, Lucida Grande'+a,'Tahoma, Geneva'+a,'Times New Roman, Times, serif','Trebuchet MS, Helvetica'+a,'Verdana, Geneva'+a];i.list=[];for(var l=0,c=s.length;l<c;l++){var u={};u.value=s[l],u.name=s[l].split(',')[0],i.list.push(u)}break;case'font-weight':i.list=[{value:'100',name:'Thin'},{value:'200',name:'Extra-Light'},{value:'300',name:'Light'},{value:'400',name:'Normal'},{value:'500',name:'Medium'},{value:'600',name:'Semi-Bold'},{value:'700',name:'Bold'},{value:'800',name:'Extra-Bold'},{value:'900',name:'Ultra-Bold'}];break;case'text-align':i.list=[{value:'left'},{value:'center'},{value:'right'},{value:'justify'}];break;case'border-style':i.list=[{value:'none'},{value:'solid'},{value:'dotted'},{value:'dashed'},{value:'double'},{value:'groove'},{value:'ridge'},{value:'inset'},{value:'outset'}];break;case'box-shadow-type':i.list=[{value:'',name:'Outside'},{value:'inset',name:'Inside'}];break;case'background-repeat':i.list=[{value:'repeat'},{value:'repeat-x'},{value:'repeat-y'},{value:'no-repeat'}];break;case'background-position':i.list=[{value:'left top'},{value:'left center'},{value:'left bottom'},{value:'right top'},{value:'right center'},{value:'right bottom'},{value:'center top'},{value:'center center'},{value:'center bottom'}];break;case'background-attachment':i.list=[{value:'scroll'},{value:'fixed'},{value:'local'}];break;case'background-size':i.list=[{value:'auto'},{value:'cover'},{value:'contain'}];break;case'transition-property':i.list=[{value:'all'},{value:'width'},{value:'height'},{value:'background-color'},{value:'transform'},{value:'box-shadow'},{value:'opacity'}];break;case'transition-timing-function':i.list=[{value:'linear'},{value:'ease'},{value:'ease-in'},{value:'ease-out'},{value:'ease-in-out'}];break;case'cursor':i.list=[{value:'auto'},{value:'pointer'},{value:'copy'},{value:'crosshair'},{value:'grab'},{value:'grabbing'},{value:'help'},{value:'move'},{value:'text'}];break;case'overflow':case'overflow-x':case'overflow-y':i.list=[{value:'visible'},{value:'hidden'},{value:'scroll'},{value:'auto'}]}switch(o){case'margin':i.properties=this.build(['margin-top','margin-right','margin-bottom','margin-left']);break;case'padding':i.properties=this.build(['padding-top','padding-right','padding-bottom','padding-left']);break;case'text-shadow':i.properties=this.build(['text-shadow-h','text-shadow-v','text-shadow-blur','text-shadow-color']);break;case'border':i.properties=this.build(['border-width','border-style','border-color']);break;case'border-radius':i.properties=this.build(['border-top-left-radius','border-top-right-radius','border-bottom-right-radius','border-bottom-left-radius']);break;case'box-shadow':i.properties=this.build(['box-shadow-h','box-shadow-v','box-shadow-blur','box-shadow-spread','box-shadow-color','box-shadow-type']);break;case'background':i.properties=this.build(['background-image','background-repeat','background-position','background-attachment','background-size']);break;case'transition':i.properties=this.build(['transition-property','transition-duration','transition-timing-function']);break;case'transform':i.properties=this.build(['transform-rotate-x','transform-rotate-y','transform-rotate-z','transform-scale-x','transform-scale-y','transform-scale-z'])}e.push(i)}return e}}},d=l.a.Model.extend({defaults:{id:'',name:'',open:!0,buildProps:'',extendBuilded:1,properties:[]},initialize:function(t){var e=t||{},n=this.buildProperties(e.buildProps),r=this.get('name')||'',i=[];!this.get('id')&&this.set('id',r.replace(/ /g,'_').toLowerCase()),i=n?this.extendProperties(n):this.get('properties');var o=new c["default"](i);o.sector=this,this.set('properties',o)},extendProperties:function(t,e,n){for(var r=t.length,i=e||this.get('properties'),a=this.get('extendBuilded'),s=[],l=0,c=i.length;l<c;l++){for(var u=i[l],d=0,h=0;h<r;h++){var f=t[h];if(u.property!=f.property&&u.id!=f.property);else{var p=u.properties;p&&p.length&&(u.properties=this.extendProperties(f.properties||[],p,1)),t[h]=a?Object(o["extend"])(f,u):u,s[h]=t[h],d=1}}d||(t.push(u),s.push(u))}return n?s.filter((function(t){return t})):t},buildProperties:function(t){var e=t||[];if(e.length)return this.propFactory||(this.propFactory=new u),this.propFactory.build(e)}}),h=l.a.Collection.extend({model:d,initialize:function(){this.listenTo(this,'reset',this.onReset)},onReset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.previousModels||[];n.forEach((function(t){return t.get('properties').reset()}))}}),f=n(3),p=n(9),g=n(19),v=l.a.View.extend({template:Object(o["template"])("\n <div class=\"<%= pfx %>title\" data-sector-title>\n <i id=\"<%= pfx %>caret\" class=\"fa\"></i>\n <%= label %>\n </div>"),events:{'click [data-sector-title]':'toggle'},initialize:function(t){this.config=t.config||{},this.em=this.config.em,this.pfx=this.config.stylePrefix||'',this.target=t.target||{},this.propTarget=t.propTarget||{},this.caretR='fa-caret-right',this.caretD='fa-caret-down';var e=this.model;this.listenTo(e,'change:open',this.updateOpen),this.listenTo(e,'updateVisibility',this.updateVisibility),this.listenTo(e,'destroy remove',this.remove)},updateVisibility:function(){var t;this.model.get('properties').each((function(e){e.get('visible')&&(t=1)})),this.el.style.display=t?'':'none'},updateOpen:function(){this.model.get('open')?this.show():this.hide()},show:function(){this.$el.addClass(this.pfx+'open'),this.getPropertiesEl().style.display='',this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+'open'),this.getPropertiesEl().style.display='none',this.$caret.removeClass(this.caretD).addClass(this.caretR)},getPropertiesEl:function(){return this.$el.find(".".concat(this.pfx,"properties")).get(0)},toggle:function(t){var e=this.model.get('open')?0:1;this.model.set('open',e)},render:function(){var t=this.pfx,e=this.model,n=this.em,r=this.$el,i=e.attributes,o=i.id,a=i.name,s=n&&n.t("styleManager.sectors.".concat(o))||a;return r.html(this.template({pfx:t,label:s})),this.$caret=r.find("#".concat(t,"caret")),this.renderProperties(),r.attr('class',"".concat(t,"sector ").concat(t,"sector__").concat(o," no-select")),this.updateOpen(),this},renderProperties:function(){var t=this.model.get('properties');if(t){var e=new g["default"]({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}});function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var y='hc-state',w=l.a.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.config||{};this.pfx=e.stylePrefix||'',this.ppfx=e.pStylePrefix||'',this.target=t.target||{},this.config=e;var n={};Object(o["extend"])(n,l.a.Events);var r=document.body,i=document.createElement("el-".concat((new Date).getTime()));r.appendChild(i),n.computedDefault=b({},window.getComputedStyle(i)),r.removeChild(i),this.propTarget=n;var a=this.collection,s='component:toggled component:update:classes change:state change:device frame:resized';this.listenTo(a,'add',this.addTo),this.listenTo(a,'reset',this.render),this.listenTo(this.target,s,this.targetUpdated)},remove:function(){var t=this;l.a.View.prototype.remove.apply(this,arguments),['target','config','propTarget'].forEach((function(e){return t[e]={}}))},addTo:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.addToCollection(t,null,n)},toggleStateCls:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;t.forEach((function(t){var n=t.getEl();n&&n.classList&&n.classList[e?'add':'remove'](y)}))},targetUpdated:function(t){var e=this.target,n=this.propTarget,r=e.getSelectedAll(),i=e.getSelected(),o=t&&t.toHTML?t:i;if(o&&this.toggleStateCls([o]),i){var a=e.get('Config').devicePreviewMode?'':e.get('state'),s=e.get('SelectorManager').getConfig().componentFirst,l=i.getEl();if(n.helper=null,n.targets=null,l&&Object(f["q"])(l)){var c=a?":".concat(a):null;n.computed=window.getComputedStyle(l,c)}var u=e.get('StyleManager');i=u.getModelToStyle(i),a&&(!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.get('CssComposer'),i=r.getAll(),o=r.getClassRule(y);o?(i.remove(o),i.add(o)):o=r.setClassRule(y),o.set('important',1),o.setStyle(t),n.helper=o}(i.getStyle()),this.toggleStateCls(r,1)),n.model=i,s&&(n.targets=r.map((function(t){return u.getModelToStyle(t)})).filter(Boolean)),n.trigger('update')}},setTarget:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,r=Object(o["isArray"])(t)?t:[t],i=e.targetIsClass,a=e.stylable,s=[];r.forEach((function(t){var e=t;if(Object(o["isString"])(t)){var r,l=n.get('CssComposer').getAll();i&&(r=l.filter((function(e){return e.get('selectors').getFullString()===t}))[0]),r||(r=l.filter((function(e){return e.get('selectorsAdd')===t}))[0]),r||(r=l.add({selectors:[],selectorsAdd:t})),a&&r.set({stylable:a}),e=r}s.push(e)}));var l=this.propTarget;return l.targets=s,l.trigger('update',{targets:s}),s},addToCollection:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.pfx,i=this.target,o=this.propTarget,a=this.config,s=this.el,l=e||s,c=new v({model:t,id:"".concat(r).concat(t.get('id')),name:t.get('name'),properties:t.get('properties'),target:i,propTarget:o,config:a}).render().el;return Object(p["b"])(l,c,n.at),c},render:function(){var t=this,e=document.createDocumentFragment(),n=this.$el,r=this.pfx,i=this.ppfx;return n.empty(),this.collection.each((function(n){return t.addToCollection(n,e)})),n.append(e),n.addClass("".concat(r,"sectors ").concat(i,"one-bg ").concat(i,"two-color")),this}});function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n,r={};return{PropertyFactory:{build:function(t){var e=[];'string'==typeof t&&(t=[t]);for(var n=0,r=t.length;n<r;n++){var i={},o=t[n];switch(i.property=o,o){case'border-radius-c':i.property='border-radius'}switch(o){case'top':case'right':case'bottom':case'left':case'margin-top':case'margin-right':case'margin-bottom':case'margin-left':case'padding-top':case'padding-right':case'padding-bottom':case'padding-left':case'width':case'max-width':case'min-width':case'height':case'max-height':case'min-height':case'flex-basis':i.fixedValues=['initial','inherit','auto'];break;case'font-size':i.fixedValues=['medium','xx-small','x-small','small','large','x-large','xx-large','smaller','larger','length','initial','inherit'];break;case'letter-spacing':case'line-height':i.fixedValues=['normal','initial','inherit']}switch(o){case'float':case'position':case'text-align':i.type='radio';break;case'display':case'flex-direction':case'flex-wrap':case'justify-content':case'align-items':case'align-content':case'align-self':case'font-family':case'font-weight':case'border-style':case'box-shadow-type':case'background-repeat':case'background-position':case'background-attachment':case'background-size':case'transition-property':case'transition-timing-function':case'cursor':case'overflow':case'overflow-x':case'overflow-y':i.type='select';break;case'top':case'right':case'bottom':case'left':case'margin-top':case'margin-right':case'margin-bottom':case'margin-left':case'padding-top':case'padding-right':case'padding-bottom':case'padding-left':case'min-height':case'min-width':case'max-height':case'max-width':case'width':case'height':case'font-size':case'letter-spacing':case'line-height':case'text-shadow-h':case'text-shadow-v':case'text-shadow-blur':case'border-radius-c':case'border-top-left-radius':case'border-top-right-radius':case'border-bottom-left-radius':case'border-bottom-right-radius':case'border-width':case'box-shadow-h':case'box-shadow-v':case'box-shadow-blur':case'box-shadow-spread':case'transition-duration':case'perspective':case'transform-rotate-x':case'transform-rotate-y':case'transform-rotate-z':case'transform-scale-x':case'transform-scale-y':case'transform-scale-z':case'order':case'flex-grow':case'flex-shrink':case'flex-basis':i.type='integer';break;case'margin':case'padding':case'border-radius':case'border':case'transform':i.type='composite';break;case'color':case'text-shadow-color':case'background-color':case'border-color':case'box-shadow-color':i.type='color';break;case'text-shadow':case'box-shadow':case'background':case'transition':i.type='stack';break;case'background-image':i.type='file'}switch(o){case'float':case'background-color':case'text-shadow':i.defaults='none';break;case'display':i.defaults='block';break;case'flex-direction':i.defaults='row';break;case'flex-wrap':i.defaults='nowrap';break;case'justify-content':i.defaults='flex-start';break;case'align-items':case'align-content':i.defaults='stretch';break;case'align-self':i.defaults='auto';break;case'position':i.defaults='static';break;case'margin-top':case'margin-right':case'margin-bottom':case'margin-left':case'padding-top':case'padding-right':case'padding-bottom':case'padding-left':case'text-shadow-h':case'text-shadow-v':case'text-shadow-blur':case'border-radius-c':case'box-shadow-h':case'box-shadow-v':case'box-shadow-spread':case'perspective':case'transform-rotate-x':case'transform-rotate-y':case'transform-rotate-z':case'order':case'flex-grow':i.defaults=0;break;case'border-top-left-radius':case'border-top-right-radius':case'border-bottom-left-radius':case'border-bottom-right-radius':i.defaults='0px';break;case'transform-scale-x':case'transform-scale-y':case'transform-scale-z':case'flex-shrink':i.defaults=1;break;case'box-shadow-blur':i.defaults='5px';break;case'top':case'right':case'bottom':case'left':case'min-height':case'min-width':case'max-height':case'max-width':case'width':case'height':case'background-size':case'cursor':case'flex-basis':i.defaults='auto';break;case'font-family':i.defaults='Arial, Helvetica, sans-serif';break;case'font-size':case'border-width':i.defaults='medium';break;case'font-weight':i.defaults='400';break;case'letter-spacing':case'line-height':i.defaults='normal';break;case'color':case'text-shadow-color':case'border-color':case'box-shadow-color':i.defaults='black';break;case'text-align':i.defaults='left';break;case'border-style':i.defaults='solid';break;case'box-shadow-type':i.defaults='';break;case'background-repeat':i.defaults='repeat';break;case'background-position':i.defaults='left top';break;case'background-attachment':i.defaults='scroll';break;case'transition-property':i.defaults='width';break;case'transition-duration':i.defaults='2';break;case'transition-timing-function':i.defaults='ease';break;case'overflow':case'overflow-x':case'overflow-y':i.defaults='visible'}switch(o){case'flex-direction':case'flex-wrap':case'justify-content':case'align-items':case'align-content':i.requires={display:['flex']};break;case'order':case'flex-basis':case'flex-grow':case'flex-shrink':case'align-self':i.requiresParent={display:['flex']}}switch(o){case'top':case'bottom':case'margin-top':case'margin-bottom':case'padding-top':case'padding-bottom':case'min-height':case'max-height':case'height':i.units=['px','%','vh'];break;case'right':case'left':case'margin-right':case'margin-left':case'padding-right':case'padding-left':case'min-width':case'max-width':case'width':i.units=['px','%','vw'];break;case'flex-basis':i.units=['px','%','vw','vh'];break;case'text-shadow-v':case'text-shadow-h':case'text-shadow-blur':case'border-radius-c':case'border-top-left-radius':case'border-top-right-radius':case'border-bottom-left-radius':case'border-bottom-right-radius':case'box-shadow-h':case'box-shadow-v':i.units=['px','%'];break;case'font-size':case'letter-spacing':case'line-height':i.units=['px','em','rem','%'];break;case'border-width':i.units=['px','em'];break;case'box-shadow-blur':case'box-shadow-spread':case'perspective':i.units=['px'];break;case'transition-duration':i.units=['s'];break;case'transform-rotate-x':case'transform-rotate-y':case'transform-rotate-z':i.units=['deg']}switch(o){case'padding-top':case'padding-right':case'padding-bottom':case'padding-left':case'min-height':case'min-width':case'max-height':case'max-width':case'width':case'height':case'font-size':case'text-shadow-blur':case'border-radius-c':case'border-top-left-radius':case'border-top-right-radius':case'border-bottom-left-radius':case'border-bottom-right-radius':case'border-width':case'box-shadow-blur':case'transition-duration':case'perspective':case'flex-basis':i.min=0}switch(o){case'text-shadow':case'box-shadow':case'background':i.preview=!0}switch(o){case'background':i.detached=!0}switch(o){case'transform-rotate-x':i.functionName='rotateX';break;case'transform-rotate-y':i.functionName='rotateY';break;case'transform-rotate-z':i.functionName='rotateZ';break;case'transform-scale-x':i.functionName='scaleX';break;case'transform-scale-y':i.functionName='scaleY';break;case'transform-scale-z':i.functionName='scaleZ';break;case'background-image':i.functionName='url'}switch(o){case'float':i.list=[{value:'none'},{value:'left'},{value:'right'}];break;case'display':i.list=[{value:'block'},{value:'inline'},{value:'inline-block'},{value:'flex'},{value:'none'}];break;case'flex-direction':i.list=[{value:'row'},{value:'row-reverse'},{value:'column'},{value:'column-reverse'}];break;case'flex-wrap':i.list=[{value:'nowrap'},{value:'wrap'},{value:'wrap-reverse'}];break;case'justify-content':i.list=[{value:'flex-start'},{value:'flex-end'},{value:'center'},{value:'space-between'},{value:'space-around'},{value:'space-evenly'}];break;case'align-items':i.list=[{value:'flex-start'},{value:'flex-end'},{value:'center'},{value:'baseline'},{value:'stretch'}];break;case'align-content':i.list=[{value:'flex-start'},{value:'flex-end'},{value:'center'},{value:'space-between'},{value:'space-around'},{value:'stretch'}];break;case'align-self':i.list=[{value:'auto'},{value:'flex-start'},{value:'flex-end'},{value:'center'},{value:'baseline'},{value:'stretch'}];break;case'position':i.list=[{value:'static'},{value:'relative'},{value:'absolute'},{value:'fixed'}];break;case'font-family':var a=', sans-serif',s=['Arial, Helvetica'+a,'Arial Black, Gadget'+a,'Brush Script MT'+a,'Comic Sans MS, cursive'+a,'Courier New, Courier, monospace','Georgia, serif','Helvetica'+a,'Impact, Charcoal'+a,'Lucida Sans Unicode, Lucida Grande'+a,'Tahoma, Geneva'+a,'Times New Roman, Times, serif','Trebuchet MS, Helvetica'+a,'Verdana, Geneva'+a];i.list=[];for(var l=0,c=s.length;l<c;l++){var u={};u.value=s[l],u.name=s[l].split(',')[0],i.list.push(u)}break;case'font-weight':i.list=[{value:'100',name:'Thin'},{value:'200',name:'Extra-Light'},{value:'300',name:'Light'},{value:'400',name:'Normal'},{value:'500',name:'Medium'},{value:'600',name:'Semi-Bold'},{value:'700',name:'Bold'},{value:'800',name:'Extra-Bold'},{value:'900',name:'Ultra-Bold'}];break;case'text-align':i.list=[{value:'left'},{value:'center'},{value:'right'},{value:'justify'}];break;case'border-style':i.list=[{value:'none'},{value:'solid'},{value:'dotted'},{value:'dashed'},{value:'double'},{value:'groove'},{value:'ridge'},{value:'inset'},{value:'outset'}];break;case'box-shadow-type':i.list=[{value:'',name:'Outside'},{value:'inset',name:'Inside'}];break;case'background-repeat':i.list=[{value:'repeat'},{value:'repeat-x'},{value:'repeat-y'},{value:'no-repeat'}];break;case'background-position':i.list=[{value:'left top'},{value:'left center'},{value:'left bottom'},{value:'right top'},{value:'right center'},{value:'right bottom'},{value:'center top'},{value:'center center'},{value:'center bottom'}];break;case'background-attachment':i.list=[{value:'scroll'},{value:'fixed'},{value:'local'}];break;case'background-size':i.list=[{value:'auto'},{value:'cover'},{value:'contain'}];break;case'transition-property':i.list=[{value:'all'},{value:'width'},{value:'height'},{value:'background-color'},{value:'transform'},{value:'box-shadow'},{value:'opacity'}];break;case'transition-timing-function':i.list=[{value:'linear'},{value:'ease'},{value:'ease-in'},{value:'ease-out'},{value:'ease-in-out'}];break;case'cursor':i.list=[{value:'auto'},{value:'pointer'},{value:'copy'},{value:'crosshair'},{value:'grab'},{value:'grabbing'},{value:'help'},{value:'move'},{value:'text'}];break;case'overflow':case'overflow-x':case'overflow-y':i.list=[{value:'visible'},{value:'hidden'},{value:'scroll'},{value:'auto'}]}switch(o){case'margin':i.properties=this.build(['margin-top','margin-right','margin-bottom','margin-left']);break;case'padding':i.properties=this.build(['padding-top','padding-right','padding-bottom','padding-left']);break;case'text-shadow':i.properties=this.build(['text-shadow-h','text-shadow-v','text-shadow-blur','text-shadow-color']);break;case'border':i.properties=this.build(['border-width','border-style','border-color']);break;case'border-radius':i.properties=this.build(['border-top-left-radius','border-top-right-radius','border-bottom-right-radius','border-bottom-left-radius']);break;case'box-shadow':i.properties=this.build(['box-shadow-h','box-shadow-v','box-shadow-blur','box-shadow-spread','box-shadow-color','box-shadow-type']);break;case'background':i.properties=this.build(['background-image','background-repeat','background-position','background-attachment','background-size']);break;case'transition':i.properties=this.build(['transition-property','transition-duration','transition-timing-function']);break;case'transform':i.properties=this.build(['transform-rotate-x','transform-rotate-y','transform-rotate-z','transform-scale-x','transform-scale-y','transform-scale-z'])}e.push(i)}return e}},name:'StyleManager',getConfig:function(){return r},init:function(i){var o=(r=O(O({},a),i)).pStylePrefix;return this.em=r.em,o&&(r.stylePrefix=o+r.stylePrefix),t=new c["default"],e=new h([],r),n=new w({collection:e,target:r.em,config:r}),this},onLoad:function(){e.add(r.sectors,{silent:!0})},postRender:function(){var t=this.getConfig().appendTo;t&&(Object(o["isElement"])(t)?t:document.querySelector(t)).appendChild(this.render())},addSector:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getSector(t);return i||(n.id=t,i=e.add(n,r)),i},getSector:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.where({id:t})[0];return!r&&n.warn&&this._logNoSector(t),r},removeSector:function(t){return this.getSectors().remove(this.getSector(t,{warn:1}))},getSectors:function(){return e},addProperty:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getSector(t,{warn:1}),i=null;return r&&(i=r.get('properties').add(e,n)),i},getProperty:function(t,e){var n,r=this.getSector(t,{warn:1});return r&&(n=r.get('properties').filter((function(t){return t.get('property')===e||t.get('id')===e}))[0]),n||null},removeProperty:function(t,e){var n=this.getProperties(t);return n&&n.remove(this.getProperty(t,e))},getProperties:function(t){var e=null,n=this.getSector(t,{warn:1});return n&&(e=n.get('properties')),e},getModelToStyle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.em,i=e.skipAdd,o=t.get('classes'),a=t.getId();if(n){var s,l=n.getConfig(),c=n.get('UndoManager'),u=n.get('CssComposer'),d=n.get('SelectorManager'),h=d?d.getConfig():{},f=l.devicePreviewMode?'':n.get('state'),p=o.getStyleable(),g=p.length,v=!h.componentFirst||e.useClasses,m={noCount:1},b={state:f,addOpts:m};if(c.stop(),g&&v){var y=n.getCurrentMedia();(s=u.get(p,f,y))||i||(s=u.add(p,f,y,{},m))}else l.avoidInlineStyle&&(!(s=u.getIdRule(a,b))&&!i&&(s=u.setIdRule(a,{},b)),t.is('wrapper')&&s.set('wrapper',1));s&&(t=s),c.start()}return t},addType:function(e,n){t.addType(e,n)},getType:function(e){return t.getType(e)},getTypes:function(){return t.getTypes()},createType:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.model,i=void 0===n?{}:n,o=e.view,a=void 0===o?{}:o,s=this.getType(t);if(s)return new s.view(O({model:new s.model(i),config:r},a))},setTarget:function(t,e){return n.setTarget(t,e)},getEmitter:function(){return n.propTarget},render:function(){return n.render().el},_logNoSector:function(t){var e=this.em;e&&e.logWarning("'".concat(t,"' sector not found"))},destroy:function(){[t,e].forEach((function(t){t.reset(),t.stopListening()})),n.remove(),[r,t,e,n].forEach((function(t){return{}})),this.em={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={devices:[]},a=n(1),s=n.n(a),l=s.a.Model.extend({idAttribute:'name',defaults:{name:'',width:null,height:'',widthMedia:null,priority:null},initialize:function(){var t=this;null===this.get('widthMedia')&&this.set('widthMedia',this.get('width')),null===this.get('width')&&this.set('width',this.get('widthMedia')),!this.get('priority')&&this.set('priority',parseFloat(this.get('widthMedia'))||0);['width','height','widthMedia'].forEach((function(e){return t.checkUnit(e)}))},checkUnit:function(t){var e=this.get(t)||'';(parseFloat(e)||0).toString()===e.toString()&&this.set(t,"".concat(e,"px"))}}),c=s.a.Collection.extend({model:l,comparator:function(t,e){var n=Number.MAX_VALUE;return(e.get('priority')||n)-(t.get('priority')||n)},getSorted:function(){return this.sort()}}),u=n(0),d=s.a.View.extend({template:Object(u["template"])("\n <div class=\"<%= ppfx %>device-label\"><%= deviceLabel %></div>\n <div class=\"<%= ppfx %>field <%= ppfx %>select\">\n <span id=\"<%= ppfx %>input-holder\">\n <select class=\"<%= ppfx %>devices\"></select>\n </span>\n <div class=\"<%= ppfx %>sel-arrow\">\n <div class=\"<%= ppfx %>d-s-arrow\"></div>\n </div>\n </div>\n <button style=\"display:none\" class=\"<%= ppfx %>add-trasp\">+</button>"),events:{change:'updateDevice'},initialize:function(t){this.config=t.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||'',this.events['click .'+this.ppfx+'add-trasp']=this.startAdd,this.listenTo(this.em,'change:device',this.updateSelect),this.delegateEvents()},startAdd:function(){},updateDevice:function(){var t=this.em;if(t){var e=this.devicesEl,n=e?e.val():'';t.set('device',n)}},updateSelect:function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel(),r=n?n.get('name'):'';e.val(r)}},getOptions:function(){var t=this.collection,e=this.em,n='';return t.each((function(t){var r=t.attributes,i=r.name,o=r.id,a=e&&e.t&&e.t("deviceManager.devices.".concat(o))||i;n+="<option value=\"".concat(i,"\">").concat(a,"</option>")})),n},render:function(){var t=this.em,e=this.ppfx,n=this.$el,r=this.el;return n.html(this.template({ppfx:e,deviceLabel:t&&t.t&&t.t('deviceManager.device')})),this.devicesEl=n.find(".".concat(e,"devices")),this.devicesEl.append(this.getOptions()),r.className="".concat(e,"devices-c"),this}});function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n={};return{name:'DeviceManager',init:function(r){var i=this;for(var a in n=r||{},o)a in n||(n[a]=o[a]);return t=new c,(n.devices||[]).forEach((function(t){return i.add(t.id||t.name,t.width,t)})),e=new d({collection:t,config:n}),this},add:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=f(f({},r),{},{id:e,name:r.name||e,width:n});return t.add(i)},get:function(e){return t.get(e)},getAll:function(){return t},render:function(){return e.render().el},destroy:function(){t.reset(),t.stopListening(),e.remove(),[t,e].forEach((function(t){return null})),n={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={id:'gjs-',autosave:1,autoload:1,type:'local',stepsBeforeSave:1,storeComponents:1,storeStyles:1,storeHtml:1,storeCss:1,checkLocal:1,params:{},headers:{},urlStore:'',urlLoad:'',beforeSend:function(t,e){},onComplete:function(t,e){},contentTypeJson:!0,credentials:'include',fetchOptions:''},a=n(1),s=n.n(a),l=s.a.Model.extend({defaults:{checkLocal:!0},store:function(t,e){for(var n in this.checkStorageEnvironment(),t)localStorage.setItem(n,t[n]);'function'==typeof e&&e()},load:function(t,e){this.checkStorageEnvironment();for(var n={},r=0,i=t.length;r<i;r++){var o=localStorage.getItem(t[r]);o&&(n[t[r]]=o)}return'function'==typeof e&&e(n),n},remove:function(t){this.checkStorageEnvironment();for(var e=0,n=t.length;e<n;e++)localStorage.removeItem(t[e])},checkStorageEnvironment:function(){this.get('checkLocal')&&!localStorage&&console.warn("Your browser doesn't support localStorage")}}),c=n(28),u=n(0);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f=s.a.Model.extend({fetch:c["a"],defaults:{urlStore:'',urlLoad:'',params:{},beforeSend:function(){},onComplete:function(){},contentTypeJson:!1,credentials:'include',fetchOptions:''},onStart:function(){this.get('em');var t=this.get('beforeSend');t&&t()},onError:function(t,e){if(e)e(t);else{var n=this.get('em');console.error(t),n&&n.trigger('storage:error',t)}},onResponse:function(t,e){var n=this.get('em'),r=this.get('onComplete'),i=this.get('contentTypeJson')&&(t&&'string'==typeof t)?JSON.parse(t):t;r&&r(i),e&&e(i),n&&n.trigger('storage:response',i)},store:function(t,e,n){var r={};for(var i in t)r[i]=t[i];this.request(this.get('urlStore'),{body:r},e,n)},load:function(t,e,n){this.request(this.get('urlLoad'),{method:'get'},e,n)},request:function(t){var e,n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.get('contentTypeJson'),l=this.get('headers')||{},c=this.get('params'),d='X-Requested-With',f='Content-Type',p=i.body||{};for(var g in c)p[g]=c[g];if(Object(u["isUndefined"])(l[d])&&(l[d]='XMLHttpRequest'),Object(u["isUndefined"])(l[f])&&s&&(l[f]='application/json; charset=utf-8'),s)n=JSON.stringify(p);else for(var v in n=new FormData,p)n.append(v,p[v]);'post'===(e={method:i.method||'post',credentials:this.get('credentials'),headers:l}).method&&(e.body=n);var m=this.get('fetchOptions')||{},b=Object(u["isFunction"])(m)?m(e):e;this.onStart(),this.fetch(t,h(h({},e),b||{})).then((function(t){return 1==(t.status/200|0)?t.text():t.text().then((function(t){return Promise.reject(t)}))})).then((function(t){return r.onResponse(t,o)})).catch((function(t){return r.onError(t,a)}))}});function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var v='storage:start',m='storage:end',b='storage:error';e["default"]=function(){var t,e={},n={},r={};return{name:'StorageManager',init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=g(g({},o),n),t=e.em,e._disable&&(e.type=0),r.remote=new f(e),r.local=new l(e),e.currentStorage=e.type,this.loadDefaultProviders().setCurrent(e.type),this},getConfig:function(){return e},isAutosave:function(){return!!e.autosave},setAutosave:function(t){return e.autosave=!!t,this},getStepsBeforeSave:function(){return e.stepsBeforeSave},setStepsBeforeSave:function(t){return e.stepsBeforeSave=t,this},add:function(t,e){return n[t]=e,this},get:function(t){return n[t]||null},getStorages:function(){return n},getCurrent:function(){return e.currentStorage},setCurrent:function(t){return e.currentStorage=t,this},store:function(t,n){var r=this,i=this.get(this.getCurrent()),o={};for(var a in this.onStart('store',t),t)o[e.id+a]=t[a];return i?i.store(o,(function(t){n&&n(t),r.onEnd('store',t)}),(function(t){r.onError('store',t)})):null},load:function(t,n){var r=this,i=this.get(this.getCurrent()),o=[],a={};'string'==typeof t&&(t=[t]),this.onStart('load',t);for(var s=0,l=t.length;s<l;s++)o.push(e.id+t[s]);i?i.load(o,(function(t){var i=new RegExp('^'+e.id);for(var o in t){var s=o.replace(i,'');a[s]=t[o]}n&&n(a),r.onEnd('load',a)}),(function(t){n&&n(a),r.onError('load',t)})):n&&n(a)},loadDefaultProviders:function(){for(var t in r)this.add(t,r[t]);return this},getCurrentStorage:function(){return this.get(this.getCurrent())},onStart:function(e,n){t&&(t.trigger(v),e&&t.trigger("".concat(v,":").concat(e),n))},onEnd:function(e,n){t&&(t.trigger(m),e&&t.trigger("".concat(m,":").concat(e),n))},onError:function(e,n){t&&(t.trigger(b,n),e&&t.trigger("".concat(b,":").concat(e),n),this.onEnd(e,n))},canAutoload:function(){return this.getCurrentStorage()&&this.getConfig().autoload},destroy:function(){[e,t,n,r].forEach((function(t){return{}}))}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={stylePrefix:'mdl-',title:'',content:'',backdrop:!0},a=n(1),s=n.n(a),l=s.a.Model.extend({defaults:{title:'',content:'',open:!1}});function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=s.a.View.extend({template:function(t){var e=t.pfx,n=t.ppfx,r=t.content,i=t.title;return"<div class=\"".concat(e,"dialog ").concat(n,"one-bg ").concat(n,"two-color\">\n <div class=\"").concat(e,"header\">\n <div class=\"").concat(e,"title\">").concat(i,"</div>\n <div class=\"").concat(e,"btn-close\" data-close-modal>⨯</div>\n </div>\n <div class=\"").concat(e,"content\">\n <div id=\"").concat(e,"c\">").concat(r,"</div>\n <div style=\"clear:both\"></div>\n </div>\n </div>\n <div class=\"").concat(e,"collector\" style=\"display: none\"></div>")},events:{click:'onClick','click [data-close-modal]':'hide'},initialize:function(t){var e=this.model,n=t.config||{},r=n.stylePrefix||'';this.config=n,this.pfx=r,this.ppfx=n.pStylePrefix||'',this.listenTo(e,'change:open',this.updateOpen),this.listenTo(e,'change:title',this.updateTitle),this.listenTo(e,'change:content',this.updateContent)},onClick:function(t){this.config.backdrop&&t.target===this.el&&this.hide()},getCollector:function(){return this.$collector||(this.$collector=this.$el.find('.'+this.pfx+'collector')),this.$collector},getContent:function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(t,"content #").concat(t,"c"))),this.$content},getTitle:function(){return this.$title||(this.$title=this.$el.find('.'+this.pfx+'title')),this.$title.get(0)},updateContent:function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),r=this.model.get('content');e.length&&n.append(e),t.empty().append(r)},updateTitle:function(){var t=this.getTitle();t&&(t.innerHTML=this.model.get('title'))},updateOpen:function(){this.el.style.display=this.model.get('open')?'':'none'},hide:function(){this.model.set('open',0)},show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.model.set('open',1),this.updateAttr(t.attributes)},updateAttr:function(t){var e=this.pfx,n=this.$el,r=this.el,i=[].slice.call(r.attributes).map((function(t){return t.name}));n.removeAttr(i.join(' ')),n.attr(u(u({},t||{}),{},{class:"".concat(e,"container ").concat(t&&t.class||'').trim()}))},render:function(){var t=this.$el,e=this.model.toJSON();return e.pfx=this.pfx,e.ppfx=this.ppfx,t.html(this.template(e)),this.updateAttr(),this.updateOpen(),this}});function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n={},r=function(t,e){e&&e.trigger("modal:".concat(t?'open':'close'))};return{name:'Modal',getConfig:function(){return n},init:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=(n=f(f({},o),i)).em;this.em=a;var s=n.pStylePrefix;return s&&(n.stylePrefix=s+n.stylePrefix),(t=new l(n)).on('change:open',(function(t,e){return r(e,a)})),e=new d({model:t,config:n}),this},postRender:function(t){var e=t.model.getConfig().el||t.el;this.render().appendTo(e)},open:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),e.show(t),this},close:function(){return e.hide(),this},onceClose:function(t){return this.em.once('modal:close',t),this},onceOpen:function(t){return this.em.once('modal:open',t),this},isOpen:function(){return!!t.get('open')},setTitle:function(e){return t.set('title',e),this},getTitle:function(){return t.get('title')},setContent:function(e){return t.set('content',' '),t.set('content',e),this},getContent:function(){return t.get('content')},getContentEl:function(){return e.getContent().get(0)},getModel:function(){return t},render:function(){return e.render().$el},destroy:function(){e.remove(),[n,t,e].forEach((function(t){return{}})),this.em={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a=n(3),s={stylePrefix:'clm-',appendTo:'',selectors:[],states:[{name:'hover'},{name:'active'},{name:'nth-of-type(2n)'}],escapeName:0,selectedName:0,iconAdd:'<svg viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path></svg>',iconSync:'<svg viewBox="0 0 24 24"><path d="M12 18c-3.31 0-6-2.69-6-6 0-1 .25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4m0-11V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8z"></path></svg>',iconTagOn:'<svg viewBox="0 0 24 24"><path d="M19 19H5V5h10V3H5c-1.11 0-2 .89-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h-2m-11.09-.92L6.5 11.5 11 16 21 6l-1.41-1.42L11 13.17l-3.09-3.09z"></path></svg>',iconTagOff:'<svg viewBox="0 0 24 24"><path d="M19 3H5c-1.11 0-2 .89-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5a2 2 0 0 0-2-2m0 2v14H5V5h14z"></path></svg>',iconTagRemove:'<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg>',render:0,componentFirst:0},l=n(10),c=n(12),u=n(7),d=n.n(u),h=n(1),f=n.n(h),p='contentEditable',g=f.a.View.extend({template:function(){var t=this.pfx,e=this.model,n=this.config,r=e.get('label')||'';return"\n <span id=\"".concat(t,"checkbox\" class=\"").concat(t,"tag-status\" data-tag-status></span>\n <span id=\"").concat(t,"tag-label\" data-tag-name>").concat(r,"</span>\n <span id=\"").concat(t,"close\" class=\"").concat(t,"tag-close\" data-tag-remove>\n ").concat(n.iconTagRemove,"\n </span>\n ")},events:{'click [data-tag-remove]':'removeTag','click [data-tag-status]':'changeStatus','dblclick [data-tag-name]':'startEditTag','focusout [data-tag-name]':'endEditTag'},initialize:function(t){var e=t.config||{};this.config=e,this.coll=t.coll||null,this.pfx=e.stylePrefix||'',this.ppfx=e.pStylePrefix||'',this.em=e.em,this.listenTo(this.model,'change:active',this.updateStatus)},getInputEl:function(){return this.inputEl||(this.inputEl=this.el.querySelector('[data-tag-name]')),this.inputEl},startEditTag:function(){var t=this.em,e=this.getInputEl();e[p]=!0,e.focus(),t&&t.setEditing(1)},endEditTag:function(){var t=this.model,e=this.getInputEl(),n=e.textContent,r=this.em,i=r&&r.get('SelectorManager');if(e[p]=!1,r&&r.setEditing(0),i){var o=i.escapeName(n);i.get(o)?e.innerText=t.get('label'):t.set({name:o,label:n})}},changeStatus:function(){var t=this.model;t.set('active',!t.get('active'))},removeTag:function(){var t=this.em,e=this.model;(t&&t.getSelectedAll()).forEach((function(t){!e.get('protected')&&t&&t.getSelectors().remove(e)}))},updateStatus:function(){var t=this.model,e=this.$el,n=this.config,r=n.iconTagOn,i=n.iconTagOff,o=e.find('[data-tag-status]');t.get('active')?(o.html(r),e.removeClass('opac50')):(o.html(i),e.addClass('opac50'))},render:function(){var t=this.pfx,e=this.ppfx;return this.$el.html(this.template()),this.$el.attr('class',"".concat(t,"tag ").concat(e,"three-bg")),this.updateStatus(),this}}),v=f.a.View.extend({template:function(t){var e=t.labelInfo,n=t.labelStates,r=t.labelHead,i=t.iconSync,o=t.iconAdd,a=t.pfx,s=t.ppfx;return"\n <div id=\"".concat(a,"up\" class=\"").concat(a,"header\">\n <div id=\"").concat(a,"label\" class=\"").concat(a,"header-label\">").concat(r,"</div>\n <div id=\"").concat(a,"status-c\" class=\"").concat(a,"header-status\">\n <span id=\"").concat(a,"input-c\" data-states-c>\n <div class=\"").concat(s,"field ").concat(s,"select\">\n <span id=\"").concat(s,"input-holder\">\n <select id=\"").concat(a,"states\" data-states>\n <option value=\"\">").concat(n,"</option>\n </select>\n </span>\n <div class=\"").concat(s,"sel-arrow\">\n <div class=\"").concat(s,"d-s-arrow\"></div>\n </div>\n </div>\n </span>\n </div>\n </div>\n <div id=\"").concat(a,"tags-field\" class=\"").concat(s,"field\">\n <div id=\"").concat(a,"tags-c\" data-selectors></div>\n <input id=\"").concat(a,"new\" data-input/>\n <span id=\"").concat(a,"add-tag\" class=\"").concat(a,"tags-btn ").concat(a,"tags-btn__add\" data-add>\n ").concat(o,"\n </span>\n <span class=\"").concat(a,"tags-btn ").concat(a,"tags-btn__sync\" style=\"display: none\" data-sync-style>\n ").concat(i,"\n </span>\n </div>\n <div class=\"").concat(a,"sels-info\">\n <div class=\"").concat(a,"label-sel\">").concat(e,":</div>\n <div class=\"").concat(a,"sels\" data-selected></div>\n <div style=\"clear:both\"></div>\n </div>")},events:{'change [data-states]':'stateChanged','click [data-add]':'startNewTag','focusout [data-input]':'endNewTag','keyup [data-input]':'onInputKeyUp','click [data-sync-style]':'syncStyle'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.className=this.pfx+'tags',this.stateInputId=this.pfx+'states',this.stateInputC=this.pfx+'input-c',this.states=this.config.states||[];var e=this.config.em,n=this.collection;this.target=this.config.em,this.em=e;var r=this.getStyleEmitter(),i='component:toggled component:update:classes',o='component:update:classes change:state';this.listenTo(e,i,this.componentChanged),this.listenTo(r,'update',this.componentChanged),this.listenTo(e,o,this.__handleStateChange),this.listenTo(e,'styleable:change change:device',this.checkSync),this.listenTo(n,'add',this.addNew),this.listenTo(n,'reset',this.renderClasses),this.listenTo(n,'remove',this.tagRemoved),this.delegateEvents()},syncStyle:function(){var t,e=this.em,n=this.getTarget(),r=e.get('CssComposer'),i=this.getCommonSelectors({opts:{noDisabled:1}}),o=e.get('state'),a=e.getCurrentMedia(),s=[],l=r.get(i,o,a)||r.add(i,o,a);this.getTargets().forEach((function(e){var n=r.getIdRule(e.getId(),{state:o,mediaText:a});t=n.getStyle(),n.setStyle({}),s.push(n)})),t&&l.addStyle(t),e.trigger('component:toggled'),e.trigger('component:sync-style',{component:n,selectors:i,mediaText:a,rule:l,ruleComponents:s,state:o})},getStyleEmitter:function(){var t=this.em,e=t&&t.get('StyleManager');return e&&e.getEmitter()||{}},tagRemoved:function(t){this.updateStateVis()},getStateOptions:function(){var t=this.states,e=this.em,n=[];return t.forEach((function(t){return n.push("<option value=\"".concat(t.name,"\">").concat(e.t("selectorManager.states.".concat(t.name))||t.label||t.name,"</option>"))})),n.join('')},addNew:function(t){this.addToClasses(t)},startNewTag:function(){this.$addBtn.css({display:'none'}),this.$input.show().focus()},endNewTag:function(){this.$addBtn.css({display:''}),this.$input.hide().val('')},onInputKeyUp:function(t){13===t.keyCode?this.addNewTag(this.$input.val()):27===t.keyCode&&this.endNewTag()},checkStates:function(){var t=this.em.getState(),e=this.getStates();e&&e.val(t)},componentChanged:Object(o["debounce"])((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.targets;this.updateSelection(e)})),updateSelection:function(t){var e=t||this.getTargets(),n=[];return(e=Object(o["isArray"])(e)?e:[e])&&e.length&&(n=this.getCommonSelectors({targets:e}),this.checkSync({validSelectors:n})),this.collection.reset(n),this.updateStateVis(e),n},getCommonSelectors:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.targets,n=t.opts,r=void 0===n?{}:n,i=e||this.getTargets(),o=i.map((function(t){return t.getSelectors&&t.getSelectors().getValid(r)})).filter((function(t){return t}));return this._commonSelectors.apply(this,d()(o))},_commonSelectors:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.length?1===n.length?n[0]:2===n.length?n[0].filter((function(t){return n[1].indexOf(t)>=0})):n.slice(1).reduce((function(e,n){return t._commonSelectors(e,n)}),n[0]):[]},checkSync:Object(o["debounce"])((function(){var t,e=this.$btnSyncEl,n=this.config,r=this.collection,i=this.getTarget();if(i&&n.componentFirst&&r.length){var a=i.getStyle();t=!Object(o["isEmpty"])(a)}e&&e[t?'show':'hide']()})),getTarget:function(){return this.target.getSelected()},getTargets:function(){return this.target.getSelectedAll()},updateStateVis:function(t){var e=this.em,n=e&&e.getConfig('avoidInlineStyle'),r=this.collection.length||n?'':'none';this.getStatesC().css('display',r),this.updateSelector(t)},__handleStateChange:function(){this.updateSelector(this.getTargets())},updateSelector:function(t){var e=this,n=this.el.querySelector('[data-selected]'),r=[],i=t||this.getTargets();(i=Object(o["isArray"])(i)?i:[i]).forEach((function(t){return r.push(e.__getName(t))})),n&&(n.innerHTML=r.join(', ')),this.checkStates()},__getName:function(t){var e,n=this.pfx,r=this.config,i=this.em,a=r.selectedName,s=r.componentFirst;if(Object(o["isString"])(t))e="<span class=\"".concat(n,"sel-gen\">").concat(t,"</span>");else{if(!t||!t.get)return;var l=t.getSelectors().getStyleable(),c=i.get('state'),u=t.getId?"<span class=\"".concat(n,"sel-cmp\">").concat(t.getName(),"</span><span class=\"").concat(n,"sel-id\">#").concat(t.getId(),"</span>"):'';e=(e=this.collection.getFullString(l))?"<span class=\"".concat(n,"sel-rule\">").concat(e,"</span>"):t.get('selectorsAdd')||u,e=s&&u?u:e,e+=c?"<span class=\"".concat(n,"sel-state\">:").concat(c,"</span>"):'',e=a?a({result:e,state:c,target:t}):e}return e&&"<span class=\"".concat(n,"sel\">").concat(e,"</span>")},stateChanged:function(t){var e=this.em,n=t.target.value;e.set('state',n)},addNewTag:function(t){var e=this,n=this.em;if(t.trim()){if(n){var r=n.get('SelectorManager').add({label:t});this.getTargets().forEach((function(t){t.getSelectors().add(r),e.collection.add(r),e.updateStateVis()}))}this.endNewTag()}},addToClasses:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e,r=this.getClasses(),i=new g({model:t,config:this.config,coll:this.collection}).render().el;return n?n.appendChild(i):r.append(i),i},renderClasses:function(){var t=this,e=document.createDocumentFragment(),n=this.getClasses();n.empty(),this.collection.each((function(n){return t.addToClasses(n,e)})),n.append(e)},getClasses:function(){return this.$el.find('[data-selectors]')},getStates:function(){if(!this.$states){var t=this.$el.find('[data-states]');this.$states=t[0]&&t}return this.$states},getStatesC:function(){return this.$statesC||(this.$statesC=this.$el.find('#'+this.stateInputC)),this.$statesC},render:function(){var t=this.em,e=this.pfx,n=this.ppfx,r=this.config,i=this.$el,o=this.el,a=r.render,s={iconSync:r.iconSync,iconAdd:r.iconAdd,labelHead:t.t('selectorManager.label'),labelStates:t.t('selectorManager.emptyState'),labelInfo:t.t('selectorManager.selected'),ppfx:n,pfx:e,el:o};i.html(this.template(s));var l=a&&a(s);l&&l!==o&&i.empty().append(l),this.$input=i.find('[data-input]'),this.$addBtn=i.find('[data-add]'),this.$classes=i.find('#'+e+'tags-c'),this.$btnSyncEl=i.find('[data-sync-style]'),this.$input.hide();var c=this.getStates();return c&&c.append(this.getStateOptions()),this.renderClasses(),i.attr('class',"".concat(this.className," ").concat(n,"one-bg ").concat(n,"two-color")),this}});function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var y=function(t){return Object(o["isString"])(t)&&'#'==t[0]},w=function(t){return Object(o["isString"])(t)&&'.'==t[0]};e["default"]=function(t){var e,n=t||{};return{Selector:l["a"],Selectors:c["a"],name:'SelectorManager',getConfig:function(){return n},init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=(n=b(b({},s),t)).em,i=n.pStylePrefix;return this.em=r,i&&(n.stylePrefix=i+n.stylePrefix),this.selectorTags=new v({collection:new c["a"]([],{em:r,config:n}),config:n}),(e=new c["a"](n.selectors)).on('add',(function(t){return r.trigger('selector:add',t)})),e.on('remove',(function(t){return r.trigger('selector:remove',t)})),e.on('change',(function(t){return r.trigger('selector:update',t,t.previousAttributes(),t.changedAttributes())})),r.on('change:state',(function(t,e){return r.trigger('selector:state',e)})),this},postRender:function(){var t=this.getConfig().appendTo;t&&(Object(o["isElement"])(t)?t:document.querySelector(t)).appendChild(this.render([]))},select:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Array.isArray(t)?t:[t],r=this.em.get('StyleManager').setTarget(n,e),i=r.filter((function(t){return t})).map((function(t){return Object(a["l"])(t)||Object(a["p"])(t)&&!t.get('selectorsAdd')?t:t.getSelectorsString()}));return this.selectorTags.componentChanged({targets:i}),this},setState:function(t){return this.em.setState(t),this},getState:function(){return this.em.getState()},addSelector:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=b({},r);Object(o["isObject"])(t)?i=t:i.name=t,y(i.name)?(i.name=i.name.substr(1),i.type=l["a"].TYPE_ID):w(i.name)&&(i.name=i.name.substr(1)),i.label&&!i.name&&(i.name=this.escapeName(i.label));var a=i.name,s=a?this.get(a,i.type):e.where(i)[0];return s||e.add(i,{config:n})},getSelector:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l["a"].TYPE_CLASS;return y(t)?(t=t.substr(1),n=l["a"].TYPE_ID):w(t)&&(t=t.substr(1)),e.where({name:t,type:n})[0]},add:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(o["isArray"])(t)?t.map((function(t){return e.addSelector(t,n)})):this.addSelector(t,n)},addClass:function(t){var e=this,n=[];return Object(o["isString"])(t)&&(t=t.trim().split(' ')),t.forEach((function(t){return n.push(e.addSelector(t))})),n},get:function(t,e){var n=this;if(Object(o["isArray"])(t)){var r=[];return t.map((function(t){return n.getSelector(t)})).filter((function(t){return t})).forEach((function(t){return r.indexOf(t)<0&&r.push(t)})),r}return this.getSelector(t,e)},getAll:function(){return e},escapeName:function(t){var e=n.escapeName;return e?e(t):l["a"].escapeName(t)},render:function(t){return t?(this.selectorTags=new v({collection:new c["a"](t),config:n}),this.selectorTags.render().el):this.selectorTags.render().el},destroy:function(){e.reset(),e.stopListening(),this.selectorTags.remove(),[n,e].forEach((function(t){return{}})),this.em={},this.selectorTags={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o={textTags:['br','b','i','u','a','ul','ol'],parserCss:null,parserHtml:null},a=n(0),s={4:'media',5:'font-face',6:'page',7:'keyframes',11:'counter-style',12:'supports',13:'document',14:'font-feature-values',15:'viewport'},l=Object(a["keys"])(s),c=['5','6','11','15'],u=['font-face','page','counter-style','viewport'],d=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',e=[],n=[],r=t.split(','),i=0,o=r.length;i<o;i++){var a=r[i].trim();if(/^(\.{1}[\w\-]+)+(:{1,2}[\w\-()]+)?$/gi.test(a)||/^(#{1}[\w\-]+){1}(:{1,2}[\w\-()]+)?$/gi.test(a)){var s=a.split('.').filter(Boolean);n.push(s)}else e.push(a)}return{result:n,add:e}},h=function(t){for(var e=t.style,n={},r=0,i=e.length;r<i;r++){var o=e[r],a=e.getPropertyValue(o),s=e.getPropertyPriority(o);n[o]="".concat(a).concat(s?" !".concat(s):'')}return n},f=function(t){return(t.conditionText||t.media&&t.media.mediaText||t.name||t.selectorText||'').trim()},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i=t.length,o=t[i-1],a=o?o.split(/:(.+)/):[],s=a[1],l=n.atRule,c=n.selectorsAdd,d=n.mediaText,h=u.indexOf(l)>=0;return h&&(r.singleAtRule=1),l&&(r.atRuleType=l),c&&(r.selectorsAdd=c),d&&(r.mediaText=d),s&&(t[i-1]=a[0],r.state=s,a.splice(a.length-1,1)),r.selectors=t,r.style=e,r},g=function(t){var e=document.createElement('style');e.innerHTML=t,document.head.appendChild(e);var n=e.sheet;return document.head.removeChild(e),function t(e){for(var n=[],r=e.cssRules||[],i=0,o=r.length;i<o;i++){var a=r[i],u=a.type.toString(),g=0,v='',m='',b=a.selectorText||a.keyText,y=c.indexOf(u)>=0;if(y)g=1,v=s[u],m=f(a);else if(l.indexOf(u)>=0){var w=t(a);m=f(a);for(var x=0,O=w.length;x<O;x++){var C=w[x];m&&(C.mediaText=m),C.atRuleType=s[u]}n=n.concat(w)}if(b||y){for(var S=h(a),k=d(b),j=k.add,T=void 0,P=0,E=(b=k.result).length;P<E;P++){var M=p(b[P],S,{atRule:s[u]});n.push(M),T=M}if(j.length){var D=j.join(', ');if(T)T.selectorsAdd=D;else{var A={selectors:[],selectorsAdd:D,style:S};g&&(A.singleAtRule=g),v&&(A.atRuleType=v),m&&(A.mediaText=m),n.push(A)}}}}return n}(n)},v=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{parse:function(e){var n=this,r=[],i=t.parserCss,o=t.em,a=o&&o.get&&o.get('Editor');return(i?i(e,a):g(e)).forEach((function(t){return r=r.concat(n.checkNode(t))})),o&&o.trigger('parse:css',{input:e,output:r}),r},checkNode:function(t){var e=t,n=e.selectors,r=e.style;if(Object(a["isString"])(n)){var i=[],o=d(n),s=o.result,l=o.add.join(', '),c={atRule:t.atRule,mediaText:t.params};if(s.length?s.forEach((function(t){i.push(p(t,r,c))})):i.push(p([],r,c)),l)i[i.length-1].selectorsAdd=l;t=i}return t}}},m=n(29);function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n={};return{compTypes:'',parserCss:null,parserHtml:null,name:'Parser',getConfig:function(){return n},init:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(n=y(y({},o),r)).Parser=this,t=new m["a"](n),e=new v(n),this.em=n.em,this.parserCss=e,this.parserHtml=t,this},parseHtml:function(n){var r=this.em,i=this.compTypes;return t.compTypes=r?r.get('DomComponents').getTypes():i,t.parse(n,e)},parseCss:function(t){return e.parse(t)},destroy:function(){var r=this;[n,t,e].forEach((function(t){return{}})),['em','parserCss','parserHtml'].forEach((function(t){return r[t]={}}))}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(8),a=n.n(o),s=n(0),l={placeholder:'eg. Text here'},c={locale:'en',localeFallback:'en',detectLocale:1,debug:0,messages:{en:{assetManager:{addButton:'Add image',inputPlh:'http://path/to/the/image.jpg',modalTitle:'Select Image',uploadTitle:'Drop files here or click to upload'},blockManager:{labels:{},categories:{}},domComponents:{names:{'':'Box',wrapper:'Body',text:'Text',comment:'Comment',image:'Image',video:'Video',label:'Label',link:'Link',map:'Map',tfoot:'Table foot',tbody:'Table body',thead:'Table head',table:'Table',row:'Table row',cell:'Table cell'}},deviceManager:{device:'Device',devices:{desktop:'Desktop',tablet:'Tablet',mobileLandscape:'Mobile Landscape',mobilePortrait:'Mobile Portrait'}},panels:{buttons:{titles:{preview:'Preview',fullscreen:'Fullscreen','sw-visibility':'View components','export-template':'View code','open-sm':'Open Style Manager','open-tm':'Settings','open-layers':'Open Layer Manager','open-blocks':'Open Blocks'}}},selectorManager:{label:'Classes',selected:'Selected',emptyState:'- State -',states:{hover:'Hover',active:'Click','nth-of-type(2n)':'Even/Odd'}},styleManager:{empty:'Select an element before using Style Manager',layer:'Layer',fileButton:'Images',sectors:{general:'General',layout:'Layout',typography:'Typography',decorations:'Decorations',extra:'Extra',flex:'Flex',dimension:'Dimension'},properties:{}},traitManager:{empty:'Select an element before using Trait Manager',label:'Component settings',traits:{labels:{},attributes:{id:l,alt:l,title:l,href:{placeholder:'eg. https://google.com'}},options:{target:{false:'This window',_blank:'New window'}}}}}}};function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var h=function(t){return!Array.isArray(t)&&null!==t&&'object'===a()(t)};e["default"]=function(){return{name:'I18n',config:c,init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.config=d(d(d({},c),t),{},{messages:d(d({},c.messages),t.messages||{})}),this.config.detectLocale&&(this.config.locale=this._localLang()),this.em=t.em,this},getConfig:function(){return this.config},setLocale:function(t){var e=this.em,n=this.config,r={value:t,valuePrev:n.locale};return e&&e.trigger('i18n:locale',r),n.locale=t,this},getLocale:function(){return this.config.locale},getMessages:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.config.messages;return t&&!n[t]&&this._debug("'".concat(t,"' i18n lang not found"),e),t?n[t]:n},setMessages:function(t){var e=this.em;return this.config.messages=t,e&&e.trigger('i18n:update',t),this},addMessages:function(t){var e=this.em,n=this.config.messages;return e&&e.trigger('i18n:add',t),this.setMessages(function t(){for(var e=d({},arguments.length<=0?void 0:arguments[0]),n=1;n<arguments.length;n++){var r=d({},n<0||arguments.length<=n?void 0:arguments[n]);for(var i in r){var o=e[i],a=r[i];h(o)&&h(a)?e[i]=t(o,a):e[i]=a}}return e}(n,t)),this},t:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.config,r=e.params||{},i=e.l||this.getLocale(),o=e.lFlb||n.localeFallback,a=this._getMsg(t,i,e);return a||(a=this._getMsg(t,o,e)),!a&&this._debug("'".concat(t,"' i18n key not found in '").concat(i,"' lang"),e),a=a&&Object(s["isString"])(a)?this._addParams(a,r):a},_localLang:function(){var t=window.navigator||{},e=t.language||t.userLanguage;return e?e.split('-')[0]:'en'},_addParams:function(t,e){var n=new RegExp("{([\\w\\d-]*)}",'g');return t.replace(n,(function(t,n){return e[n]||''})).trim()},_getMsg:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getMessages(e,n);if(r){var i=r[t];return!i&&t.indexOf('.')>0&&(i=t.split('.').reduce((function(t,e){if(!Object(s["isUndefined"])(t))return t[e]}),r)),i}},_debug:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.config;(e.debug||r.debug)&&n&&n.logWarning(t)},destroy:function(){this.config=c,this.em={}}}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(15),l=n.n(s),c=n(16),u=n.n(c),d=n(3);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var p='_rte',g=1,v=0,m=-1,b=function(t){var e=t.selection().anchorNode,n=e&&e.parentNode,r=e&&e.nextSibling;return n&&'A'==n.nodeName||r&&'A'==r.nodeName},y={bold:{name:'bold',icon:'<b>B</b>',attributes:{title:'Bold'},result:function(t){return t.exec('bold')}},italic:{name:'italic',icon:'<i>I</i>',attributes:{title:'Italic'},result:function(t){return t.exec('italic')}},underline:{name:'underline',icon:'<u>U</u>',attributes:{title:'Underline'},result:function(t){return t.exec('underline')}},strikethrough:{name:'strikethrough',icon:'<s>S</s>',attributes:{title:'Strike-through'},result:function(t){return t.exec('strikeThrough')}},link:{icon:"<span style=\"transform:rotate(45deg)\">⫘</span>",name:'link',attributes:{style:'font-size:1.4rem;padding:0 4px 2px;',title:'Link'},state:function(t,e){return t&&t.selection()&&b(t)?g:v},result:function(t){b(t)?t.exec('unlink'):t.insertHTML("<a class=\"link\" href=\"\">".concat(t.selection(),"</a>"))}}},w=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l()(this,t);var r=n.el;if(r[p])return r[p];r[p]=this,this.setEl(r),this.updateActiveActions=this.updateActiveActions.bind(this);var i=n.actions||[];i.forEach((function(t,e){'string'==typeof t?t=y[t]:y[t.name]&&(t=f(f({},y[t.name]),t)),i[e]=t}));var o=i.length?i:Object.keys(y).map((function(t){return y[t]}));n.classes=f(f({},{actionbar:'actionbar',button:'action',active:'active',disabled:'disabled',inactive:'inactive'}),n.classes);var a=n.classes,s=n.actionbar;if(this.actionbar=s,this.settings=n,this.classes=a,this.actions=o,!s){var c=n.actionbarContainer;(s=document.createElement('div')).className=a.actionbar,c.appendChild(s),this.actionbar=s,o.forEach((function(t){return e.addAction(t)}))}return n.styleWithCSS&&this.exec('styleWithCSS'),this.syncActions(),this}return u()(t,[{key:"destroy",value:function(){this.el=0,this.doc=0,this.actionbar=0,this.settings={},this.classes={},this.actions=[]}},{key:"setEl",value:function(t){this.el=t,this.doc=t.ownerDocument}},{key:"updateActiveActions",value:function(){var t=this;this.getActions().forEach((function(e){var n=e.btn,r=e.update,i=f({},t.classes),o=i.active,a=i.inactive,s=i.disabled,l=e.state,c=e.name,u=t.doc;if(n.className=n.className.replace(o,'').trim(),n.className=n.className.replace(a,'').trim(),n.className=n.className.replace(s,'').trim(),l)switch(l(t,u)){case g:n.className+=" ".concat(o);break;case v:n.className+=" ".concat(a);break;case m:n.className+=" ".concat(s)}else u.queryCommandSupported(c)&&u.queryCommandState(c)&&(n.className+=" ".concat(o));r&&r(t,e)}))}},{key:"enable",value:function(){return this.enabled||(this.actionbarEl().style.display='',this.el.contentEditable=!0,Object(d["v"])(this.el,'mouseup keyup',this.updateActiveActions),this.syncActions(),this.updateActiveActions(),this.el.focus(),this.enabled=1),this}},{key:"disable",value:function(){return this.actionbarEl().style.display='none',this.el.contentEditable=!1,Object(d["u"])(this.el,'mouseup keyup',this.updateActiveActions),this.enabled=0,this}},{key:"syncActions",value:function(){var t=this;this.getActions().forEach((function(e){if(t.settings.actionbar&&(!e.state||e.state&&e.state(t,t.doc)>=0)){var n=e.event||'click';e.btn["on".concat(n)]=function(n){e.result(t,e),t.updateActiveActions()}}}))}},{key:"addAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sync,r=document.createElement('span'),i=t.icon,o=t.attributes||{};for(var a in r.className=this.classes.button,t.btn=r,o)r.setAttribute(a,o[a]);'string'==typeof i?r.innerHTML=i:r.appendChild(i),this.actionbarEl().appendChild(r),n&&(this.actions.push(t),this.syncActions())}},{key:"getActions",value:function(){return this.actions}},{key:"selection",value:function(){return this.doc.getSelection()}},{key:"exec",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.doc.execCommand(t,!1,e)}},{key:"actionbarEl",value:function(){return this.actionbar}},{key:"insertHTML",value:function(t){var e=this.doc,n=e.getSelection();if(n&&n.rangeCount){var r=e.createElement('div'),i=n.getRangeAt(0);i.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach((function(t){i.insertNode(t),t})),n.removeAllRanges(),n.addRange(i),this.el.focus()}}}]),t}(),x={stylePrefix:'rte-',adjustToolbar:1,actions:['bold','italic','underline','strikethrough','link']};function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n,r,o,a={},s=function(){var e=t.style,n='-1000px';e.top=n,e.left=n,e.display='none'};return{customRte:null,name:'RichTextEditor',getConfig:function(){return a},init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=(a=C(C({},x),n)).pStylePrefix;return r&&(a.stylePrefix=r+a.stylePrefix),this.pfx=a.stylePrefix,e=a.actions||[],(t=document.createElement('div')).className="".concat(r,"rte-toolbar ").concat(r,"one-bg"),o=this.initRte(document.createElement('div')),Object(d["v"])(t,'mousedown',(function(t){return t.stopPropagation()})),this},destroy:function(){var i=this.customRte;o&&o.destroy(),i&&i.destroy&&i.destroy(),this.actionbar=0,this.actions=0,[a,t,e,n,r,o].forEach((function(t){return{}}))},postRender:function(e){var n=e.model.get('Canvas');t.style.pointerEvents='all',s(),n.getToolsEl().appendChild(t)},initRte:function(e){var n=this.pfx,r=t,s=this.actionbar,l=this.actions||i()(a.actions),c={actionbar:"".concat(n,"actionbar"),button:"".concat(n,"action"),active:"".concat(n,"active"),inactive:"".concat(n,"inactive"),disabled:"".concat(n,"disabled")},u=new w({el:e,classes:c,actions:l,actionbar:s,actionbarContainer:r});return o&&o.setEl(e),u.actionbar&&(this.actionbar=u.actionbar),u.actions&&(this.actions=u.actions),u},add:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.name=t,o.addAction(e,{sync:1})},get:function(t){var e;return o.getActions().forEach((function(n){n.name==t&&(e=n)})),e},getAll:function(){return o.getActions()},remove:function(t){var e=this.getAll(),n=this.get(t);if(n){var r=n.btn,i=e.indexOf(n);r.parentNode.removeChild(r),e.splice(i,1)}return n},getToolbarEl:function(){return t},updatePosition:function(){var e='px',r=a.em.get('Canvas'),i=t.style,o=r.getTargetToElementFixed(n,t,{event:'rteToolbarPosUpdate'});i.top=o.top+e,i.left=0+e},enable:function(e,i){n=e.el;var o=a.em.get('Canvas'),s=a.em,l=e.getChildrenContainer(),c=this.customRte;if(r=o.getElementPos(n),t.style.display='',i=c?c.enable(l,i):this.initRte(l).enable(),s){setTimeout(this.updatePosition.bind(this),0);var u='change:canvasOffset canvasScroll frame:scroll component:update';s.off(u,this.updatePosition,this),s.on(u,this.updatePosition,this),s.trigger('rte:enable',e,i)}return i},disable:function(t,e){var n=a.em,r=this.customRte,i=t.getChildrenContainer();r?r.disable(i,e):e&&e.disable(),s(),n&&n.trigger('rte:disable',t,e)}}}},function(t,e,n){"use strict";n.r(e);var r=n(17),i=n(2),o=n.n(i),a=n(1),s=n.n(a),l=n(0),c=n(3);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var h=s.a.$,f=s.a.View.extend({initialize:function(t){this.opt=t||{},Object(l["bindAll"])(this,'startSort','onMove','endMove','rollback','updateOffset','moveDragHelper');var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var n=e.container;this.el='string'==typeof n?document.querySelector(n):n,this.$el=h(this.el),this.containerSel=e.containerSel||'div',this.itemSel=e.itemSel||'div',this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||'',this.ppfx=e.ppfx||'',this.freezeClass=e.freezeClass||this.pfx+'freezed',this.onStart=e.onStart||'',this.onEndMove=e.onEndMove||'',this.direction=e.direction||'v',this.onMoveClb=e.onMove||'',this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||'',this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=h(this.document),this.dropContent=null,this.em=e.em||'',this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.scale=e.scale,this.activeTextModel=null,this.em&&this.em.on&&(this.em.on('change:canvasOffset',this.updateOffset),this.updateOffset())},getScale:function(){return Object(l["result"])(this,scale)||1},getContainerEl:function(t){if(t&&(this.el=t),!this.el){var e=this.opt.container;this.el='string'==typeof e?document.querySelector(e):e,this.$el=h(this.el)}return this.el},getDocuments:function(t){var e=this.em,n=t?t.ownerDocument:e&&e.get('Canvas').getBody().ownerDocument,r=[document];return n&&r.push(n),r},updateOffset:function(){var t=this.em.get('canvasOffset')||{};this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropModel=null,this.dropContent=t},updateTextViewCursorPosition:function(t){var e=this.em.get('Canvas'),n=e.getDocument(),r=null;if(n.caretRangeFromPoint){var i=Object(c["h"])(t);r=n.caretRangeFromPoint(i.clientX,i.clientY)}else t.rangeParent&&(r=n.createRange()).setStart(t.rangeParent,t.rangeOffset);var o=e.getWindow().getSelection();e.getFrameEl().focus(),o.removeAllRanges(),r&&o.addRange(r)},setContentEditable:function(t,e){if(t){var n=t.getEl();n.contentEditable!=e&&(n.contentEditable=e)}},toggleSortCursor:function(t){var e=this.em,n=e&&e.get('Canvas');n&&(t?n.startAutoscroll():n.stopAutoscroll())},setDragHelper:function(t,e){for(var n=e||'',r=t.cloneNode(1),i=t.getBoundingClientRect(),o=getComputedStyle(t),a='',s=0;s<o.length;s++){var l=o[s];a+="".concat(l,":").concat(o.getPropertyValue(l),";")}document.body.appendChild(r),r.className+=" ".concat(this.pfx,"bdrag"),r.setAttribute('style',a),this.dragHelper=r,r.style.width="".concat(i.width,"px"),r.style.height="".concat(i.height,"px"),n&&this.moveDragHelper(n),this.em&&h(this.em.get('Canvas').getBody().ownerDocument).off('mousemove',this.moveDragHelper).on('mousemove',this.moveDragHelper),h(document).off('mousemove',this.moveDragHelper).on('mousemove',this.moveDragHelper)},moveDragHelper:function(t){var e=t.target.ownerDocument;if(this.dragHelper&&e){var n=t.pageY,r=t.pageX,i=0,o=0,a=(e.defaultView||e.parentWindow).frameElement,s=this.dragHelper.style;if(a){var l=a.getBoundingClientRect();i=l.top+document.documentElement.scrollTop,o=l.left+document.documentElement.scrollLeft,n=t.clientY,r=t.clientX}s.top=n+i+'px',s.left=r+o+'px'}},matches:function(t,e,n){return c["s"].call(t,e)},closest:function(t,e){if(t){for(var n=t.parentNode;n&&1===n.nodeType;){if(this.matches(n,e))return n;n=n.parentNode}return null}},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},createPlaceholder:function(){var t=this.pfx,e=document.createElement('div'),n=document.createElement('div');return e.className=t+'placeholder',e.style.display='none',e.style['pointer-events']='none',n.className=t+'placeholder-int',e.appendChild(n),e},startSort:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=this.itemSel,o=this.containerSel,a=this.getContainerEl(n.container),s=this.getDocuments(t),l=this.onStart,u=this.plh;this.dropModel=null,this.target=null,this.prevTarget=null,this.moved=0,t&&!this.matches(t,"".concat(i,", ").concat(o))&&(t=this.closest(t,i)),this.eV=t,u||(u=this.createPlaceholder(),a.appendChild(u),this.plh=u),t&&((e=this.getSourceModel(t))&&e.set&&e.set('status','freezed'),this.srcModel=e),Object(c["v"])(a,'mousemove dragover',this.onMove),Object(c["v"])(s,'mouseup dragend touchend',this.endMove),Object(c["v"])(s,'keydown',this.rollback),l&&l({target:e,parent:e&&e.parent(),index:e&&e.index()}),r&&r.clearSelection(),this.toggleSortCursor(1),r&&r.trigger('sorter:drag:start',t,e)},getTargetModel:function(t){var e=t||this.target;return h(e).data('model')},getSourceModel:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.target,i=n.avoidChildren,o=void 0===i?1:i,a=this.em,s=this.eV,l=t||s,c=this.dropModel,u=this.dropContent,f=function(t){return t&&r&&t.opt&&t.opt.avoidChildren&&e.isTextableActive(t,r)};if(u&&a){if(f(c)&&(c=null),!c){var p=a.get('DomComponents').getComponents(),g={avoidChildren:o,avoidStore:1,avoidUpdateStyle:1},v=p.add(u,d(d({},g),{},{temporary:1}));if(c=(c=p.remove(v,g))instanceof Array?c[0]:c,this.dropModel=c,f(c))return this.getSourceModel(l,{target:r,avoidChildren:0})}return c}return l&&h(l).data('model')},selectTargetModel:function(t,e){if(!(t instanceof s.a.Collection||e&&e===t)){var n=this.targetModel;n&&n!==this.srcModel&&n.set('status',''),t&&t.set&&(t.set('status','selected-parent'),this.targetModel=t)}},onMove:function(t){var e=t,n=this.em,r=this.onMoveClb,i=this.plh;this.moved=1;var o=i.style.display;o&&'none'!==o||(i.style.display='block');var a=this.offset(this.el);this.elT=this.wmargin?Math.abs(a.top):a.top,this.elL=this.wmargin?Math.abs(a.left):a.left;var s=t.pageY-this.elT+this.el.scrollTop,c=t.pageX-this.elL+this.el.scrollLeft;if(this.canvasRelative&&n){var u=n.get('Canvas').getMouseRelativeCanvas(t,{noScroll:1});c=u.x,s=u.y}this.rX=c,this.rY=s,this.eventMove=t;var d=this.getSourceModel(),f=this.dimsFromTarget(t.target,c,s),p=this.target,g=p&&this.getTargetModel(p);if(this.selectTargetModel(g,d),g||(i.style.display='none'),p){this.lastDims=f;var v=this.findPosition(f,c,s);this.isTextableActive(d,g)?(this.activeTextModel=g,this.setContentEditable(g,!0),i.style.display='none',this.lastPos=v,this.updateTextViewCursorPosition(e)):(this.disableTextable(),this.activeTextModel=null,this.lastPos&&this.lastPos.index==v.index&&this.lastPos.method==v.method||(this.movePlaceholder(this.plh,f,v,this.prevTargetDim),this.$plh||(this.$plh=h(this.plh)),this.canvasRelative||(this.offTop&&this.$plh.css('top','+='+this.offTop+'px'),this.offLeft&&this.$plh.css('left','+='+this.offLeft+'px')),this.lastPos=v)),Object(l["isFunction"])(r)&&r({event:t,target:d,parent:g,index:v.index+('after'==v.method?1:0)}),n&&n.trigger('sorter:drag',{target:p,targetModel:g,sourceModel:d,dims:f,pos:v,x:c,y:s})}},isTextableActive:function(t,e){return t&&t.get&&t.get('textable')&&e&&e.is('text')},disableTextable:function(){var t=this.activeTextModel;t&&t.getView().disableEditing()},isInFlow:function(t,e){if(!t)return!1;e=e||document.body;var n=t;return n.offsetHeight,!!this.styleInFlow(n,e)},styleInFlow:function(t,e){if(!Object(c["r"])(t)){var n=t.style||{},r=h(t),i=e&&h(e);if(!(n.overflow&&'visible'!==n.overflow||'none'!==r.css('float')||i&&'flex'==i.css('display')&&'column'!==i.css('flex-direction'))){switch(n.position){case'static':case'relative':case'':break;default:return}switch(t.tagName){case'TR':case'TBODY':case'THEAD':case'TFOOT':return!0}switch(r.css('display')){case'block':case'list-item':case'table':case'flex':return!0}}}},validTarget:function(t,e){var n=this.getTargetModel(t),r=this.getSourceModel(e,{target:n}),i={valid:!0,src:e=r&&r.view&&r.view.el,srcModel:r,trg:t=n&&n.view&&n.view.el,trgModel:n};if(!e||!t)return i.valid=!1,i;var o=r.get('draggable');o=o instanceof Array?o.join(', '):o,i.dragInfo=o,o=Object(l["isString"])(o)?this.matches(t,o):o,i.draggable=o;var a=n.get('droppable');return a=(a=a instanceof s.a.Collection?1:a)instanceof Array?a.join(', '):a,i.dropInfo=a,a=Object(l["isString"])(a)?this.matches(e,a):a,a=o&&this.isTextableActive(r,n)?1:a,i.droppable=a,a&&o||(i.valid=!1),i},dimsFromTarget:function(t,e,n){var r=this.em,i=[];if(!t)return i;if(this.matches(t,"".concat(this.itemSel,", ").concat(this.containerSel))||(t=this.closest(t,this.itemSel)),this.draggable instanceof Array&&(t=this.closest(t,this.draggable.join(','))),!t)return i;if(this.prevTarget&&this.prevTarget!=t&&(this.prevTarget=null),!this.prevTarget){this.targetP=this.closest(t,this.containerSel);var o=this.validTarget(t);if(r&&r.trigger('sorter:drag:validation',o),!o.valid&&this.targetP)return this.dimsFromTarget(this.targetP,e,n);this.prevTarget=t,this.prevTargetDim=this.getDim(t),this.cacheDimsP=this.getChildrenDim(this.targetP),this.cacheDims=this.getChildrenDim(t)}if(this.prevTarget==t&&(i=this.cacheDims),this.target=this.prevTarget,this.nearBorders(this.prevTargetDim,e,n)||!this.nested&&!this.cacheDims.length){var a=this.targetP;a&&this.validTarget(a).valid&&(i=this.cacheDimsP,this.target=a)}return this.lastPos=null,i},getTargetFromEl:function(t){var e,n=t,r=this.targetPrev,i=this.em,o=this.containerSel,a=this.itemSel;if(this.matches(n,"".concat(a,", ").concat(o))||(n=this.closest(n,a)),this.draggable instanceof Array&&(n=this.closest(n,this.draggable.join(','))),r&&r!=n&&(this.targetPrev=''),!this.targetPrev){e=this.closest(n,o);var s=this.validTarget(n);if(i&&i.trigger('sorter:drag:validation',s),!s.valid&&e)return this.getTargetFromEl(e);this.targetPrev=n}return this.nearElBorders(n)&&(e=this.closest(n,o))&&this.validTarget(e).valid&&(n=e),n},nearElBorders:function(t){var e=10,n=t.getBoundingClientRect(),r=t.ownerDocument.body,i=this.getCurrentPos(),o=i.x,a=i.y,s=n.top+r.scrollTop,l=n.left+r.scrollLeft,c=n.width,u=n.height;if(a<s+e||a>s+u-e||o<l+e||o>l+c-e)return 1},getCurrentPos:function(){var t=this.eventMove;return{x:t.pageX||0,y:t.pageY||0}},getDim:function(t){var e,n,r,i,o=this.em;if(this.canvasRelative&&o){var a=o.get('Canvas'),s=a.getElementPos(t,{noScroll:1}),l=a.getElementOffsets(t);e=s.top-l.marginTop,n=s.left-l.marginLeft,r=s.height+l.marginTop+l.marginBottom,i=s.width+l.marginLeft+l.marginRight}else{var c=this.offset(t);e=this.relative?t.offsetTop:c.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:c.left-(this.wmargin?-1:1)*this.elL,r=t.offsetHeight,i=t.offsetWidth}return[e,n,r,i]},getChildrenDim:function(t){var e=this,n=[];if(!t)return n;var r=this.getTargetModel(t);if(r&&r.view&&!this.ignoreViewChildren){var i=r.getCurrentView?r.getCurrentView():r.view;t=i.getChildrenContainer()}return Object(l["each"])(t.children,(function(r,i){var o=Object(c["g"])(r,h),a=o&&o.index?o.index():i;if(Object(c["r"])(r)||e.matches(r,e.itemSel)){var s=e.getDim(r),l=e.direction;l='v'==l||'h'!=l&&e.isInFlow(r,t),s.push(l,r,a),n.push(s)}})),n},nearBorders:function(t,e,n){var r=0,i=this.borderOffset,o=e||0,a=n||0,s=t[0],l=t[1],c=t[2],u=t[3];return(s+i>a||a>s+c-i||l+i>o||o>l+u-i)&&(r=1),!!r},findPosition:function(t,e,n){for(var r={index:0,indexEl:0,method:'before'},i=0,o=0,a=0,s=0,l=0,c=0,u=0,d=0,h=0,f=t.length;h<f;h++)if(a=(d=t[h])[1]+d[3],u=d[0]+d[2],l=d[1]+d[3]/2,c=d[0]+d[2]/2,!(o&&d[1]>o||s&&c>=s||i&&a<i))if(r.index=h,r.indexEl=d[6],d[4]){if(n<c){r.method='before';break}r.method='after'}else n<u&&(s=u),e<l?(o=l,r.method='before'):(i=l,r.method='after');return r},movePlaceholder:function(t,e,n,r){var i=0,o=0,a=0,s=0,l=0,c='px',u=5,d=n.method,h=e[n.index];if(t.classList.remove('vertical'),t.classList.add('horizontal'),h)h[4]?(s=h[3]+c,l='auto',o='before'==d?h[0]-i:h[0]+h[2]-i,a=h[1]):(s='auto',l=h[2]-2*i+c,o=h[0]+i,a='before'==d?h[1]-i:h[1]+h[3]-i,t.classList.remove('horizontal'),t.classList.add('vertical'));else{if(!this.nested)return void(t.style.display='none');r&&(o=r[0]+u,a=r[1]+u,s=parseInt(r[3])-2*u+c,l='auto')}t.style.top=o+c,t.style.left=a+c,s&&(t.style.width=s),l&&(t.style.height=l)},endMove:function(t){var e,n=this,r=this.eV,i=[],o=this.getDocuments(),a=this.getContainerEl(),s=this.onEndMove,u=this.target,h=this.lastPos;if(Object(c["u"])(a,'mousemove dragover',this.onMove),Object(c["u"])(o,'mouseup dragend touchend',this.endMove),Object(c["u"])(o,'keydown',this.rollback),this.plh.style.display='none',r&&(e=this.getSourceModel(),this.selectOnEnd&&e&&e.set&&(e.set('status',''),e.set('status','selected'))),this.moved){var f=this.toMove;(Object(l["isArray"])(f)?f:f?[f]:[r]).forEach((function(t){i.push(n.move(u,t,h))}))}this.plh&&(this.plh.style.display='none');var p=this.dragHelper;if(p&&(p.parentNode.removeChild(p),this.dragHelper=null),this.disableTextable(),this.selectTargetModel(),this.toggleSortCursor(),this.toMove=null,this.eventMove=0,this.dropModel=null,Object(l["isFunction"])(s)){var g={target:e,parent:e&&e.parent(),index:e&&e.index()};i.length?i.forEach((function(t){return s(t,n,g)})):s(null,this,d(d({},g),{},{cancelled:1}))}},move:function(t,e,n){var r=this.em,i=this.activeTextModel,o=this.dropContent,a=Object(c["e"])(e);r&&r.trigger('component:dragEnd:before',t,a,n);var l,u,f,p=[],g=n.indexEl,v=this.validTarget(t,a),m=h(t).data('collection'),b=v.srcModel,y=v.droppable,w=v.draggable,x=v.dropInfo,O=v.dragInfo,C=v.trgModel;y=C instanceof s.a.Collection?1:y;var S=this.isTextableActive(b,C);if(m&&y&&w){var k={at:g='after'===n.method?g+1:g,noIncrement:1};if(o?(l=o,k.silent=!1,k.avoidUpdateStyle=1):(k.temporary=1,u=m.add({},d({},k)),b.collection&&(l=b.collection.remove(b,{temporary:1}))),S){var j=i.getView();i.trigger('active');var T=j.activeRte,P=b.getEl();delete b.opt.temporary,b.getView().render(),P.setAttribute('data-gjs-textable','true');var E=P.outerHTML;T.insertHTML&&T.insertHTML(E)}else f=m.add(l,k);o?this.dropContent=null:m.remove(u),this.prevTarget=null}else m||p.push('Target collection not found'),y||p.push("Target is not droppable, accepts [".concat(x,"]")),w||p.push("Component not draggable, acceptable by [".concat(O,"]")),console.warn('Invalid target position: '+p.join(', '));return r&&r.trigger('component:dragEnd',m,l,p),r&&r.trigger('sorter:drag:end',{targetCollection:m,modelToDrop:l,warns:p,validResult:v,dst:t,srcEl:a}),f},rollback:function(t){Object(c["u"])(this.getDocuments(),'keydown',this.rollback),27==(t.which||t.keyCode)&&(this.moved=0,this.endMove())}}),p=n(15),g=n.n(p),v=n(16),m=n.n(v);function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var w={mousePosFetcher:null,updateTarget:null,ratioDefault:0,posFetcher:null,onStart:null,onMove:null,onEnd:null,onUpdateContainer:function(){},step:1,minDim:32,maxDim:'',unitHeight:'px',unitWidth:'px',keyHeight:'height',keyWidth:'width',currentUnit:1,silentFrames:0,avoidContainerUpdate:0,keepAutoHeight:!1,keepAutoWidth:!1,autoHeight:!1,autoWidth:!1,tl:1,tc:1,tr:1,cl:1,cr:1,bl:1,bc:1,br:1},x=function(t,e){var n=e||window,r=t.getBoundingClientRect();return{left:r.left+n.pageXOffset,top:r.top+n.pageYOffset,width:r.width,height:r.height}},O=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return g()(this,t),this.setOptions(e),Object(l["bindAll"])(this,'handleKeyDown','handleMouseDown','move','stop'),this}return m()(t,[{key:"getConfig",value:function(){return this.opts}},{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=Object(l["defaults"])(t,w),this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||'',n=t.appendTo||document.body,r=this.container;for(r||((r=document.createElement('div')).className="".concat(e,"resizer-c"),n.appendChild(r),this.container=r);r.firstChild;)r.removeChild(r.firstChild);var i={};for(var o in['tl','tc','tr','cl','cr','bl','bc','br'].forEach((function(e){return i[e]=t[e]?function(t,e){var n=e.prefix||'',r=document.createElement('i');return r.className=n+'resizer-h '+n+'resizer-h-'+t,r.setAttribute('data-'+n+'handler',t),r}(e,t):''})),i){var a=i[o];a&&r.appendChild(a)}this.handlers=i,this.mousePosFetcher=t.mousePosFetcher,this.updateTarget=t.updateTarget,this.posFetcher=t.posFetcher,this.onStart=t.onStart,this.onMove=t.onMove,this.onEnd=t.onEnd,this.onUpdateContainer=t.onUpdateContainer}},{key:"toggleFrames",value:function(t){if(this.opts.silentFrames){var e=document.querySelectorAll('iframe');Object(l["each"])(e,(function(e){return e.style.pointerEvents=t?'none':''}))}}},{key:"isHandler",value:function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1}},{key:"getFocusedEl",value:function(){return this.el}},{key:"getDocumentEl",value:function(){return[this.el.ownerDocument,document]}},{key:"getElementPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.posFetcher||'';return n?n(t,e):x(t)}},{key:"focus",value:function(t){t&&t===this.el||(this.el=t,this.updateContainer({forceShow:1}),Object(c["v"])(this.getDocumentEl(),'mousedown',this.handleMouseDown))}},{key:"blur",value:function(){this.container.style.display='none',this.el&&(Object(c["u"])(this.getDocumentEl(),'mousedown',this.handleMouseDown),this.el=null)}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.el,n=this.opts||{},r='data-'+n.prefix+'handler',i=this.getElementPos(e,{target:'el'});this.handlerAttr=t.target.getAttribute(r),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var o=this.getDocumentEl();Object(c["v"])(o,'mousemove',this.move),Object(c["v"])(o,'keydown',this.handleKeyDown),Object(c["v"])(o,'mouseup',this.stop),Object(l["isFunction"])(this.onStart)&&this.onStart(t,{docs:o,config:n,el:e,resizer:this}),this.toggleFrames(1),this.move(t)}}},{key:"move",value:function(t){var e=this.onMove,n=this.mousePosFetcher,r=n?n(t):{x:t.clientX,y:t.clientY};this.currentPos=r,this.delta={x:r.x-this.startPos.x,y:r.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),e&&e(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.opts,n=this.getDocumentEl();Object(c["u"])(n,'mousemove',this.move),Object(c["u"])(n,'keydown',this.handleKeyDown),Object(c["u"])(n,'mouseup',this.stop),this.updateRect(1),this.toggleFrames(),Object(l["isFunction"])(this.onEnd)&&this.onEnd(t,{docs:n,config:e})}},{key:"updateRect",value:function(t){var e=this.el,n=this.opts,r=this.rectDim,i=this.updateTarget,o=this.getSelectedHandler(),a=n.unitHeight,s=n.unitWidth,c=n.keyWidth,u=n.keyHeight;if(Object(l["isFunction"])(i))i(e,r,{store:t,selectedHandler:o,resizer:this,config:n});else{var d=e.style;d[c]=r.w+s,d[u]=r.h+a}this.updateContainer()}},{key:"updateContainer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.opts,n=this.container,r=this.el,i=n.style;!e.avoidContainerUpdate&&r&&t.forceShow&&(i.display='block'),this.onUpdateContainer({el:n,resizer:this,opts:y(y({},e),t)})}},{key:"getSelectedHandler",value:function(){var t=this.handlers;if(this.selectedHandler)for(var e in t)if(t[e]===this.selectedHandler)return e}},{key:"handleKeyDown",value:function(t){27===t.keyCode&&(this.rectDim=this.startDim,this.stop(t))}},{key:"handleMouseDown",value:function(t){var e=t.target;this.isHandler(e)?(this.selectedHandler=e,this.start(t)):e!==this.el&&(this.selectedHandler='',this.blur())}},{key:"calc",value:function(t){var e,n=this.opts||{},r=n.step,i=this.startDim,o=n.minDim,a=n.maxDim,s=t.delta.x,l=t.delta.y,u=i.w,d=i.h,h={t:0,l:0,w:u,h:d};if(t){var f=t.handlerAttr;~f.indexOf('r')&&(e=Object(c["t"])(u+s*r,r),e=Math.max(o,e),a&&(e=Math.min(a,e)),h.w=e),~f.indexOf('b')&&(e=Object(c["t"])(d+l*r,r),e=Math.max(o,e),a&&(e=Math.min(a,e)),h.h=e),~f.indexOf('l')&&(e=Object(c["t"])(u-s*r,r),e=Math.max(o,e),a&&(e=Math.min(a,e)),h.w=e),~f.indexOf('t')&&(e=Object(c["t"])(d-l*r,r),e=Math.max(o,e),a&&(e=Math.min(a,e)),h.h=e);var p=n.ratioDefault?!t.keys.shift:t.keys.shift;if(f.indexOf('c')<0&&p){var g=i.w/i.h;h.w/h.h>g?h.h=Math.round(h.w/g):h.w=Math.round(h.h*g)}return~f.indexOf('l')&&(h.l=i.w-h.w),~f.indexOf('t')&&(h.t=i.h-h.h),h}}}]),t}(),C={init:function(t){return new O(t)}};e["default"]=function(){return{name:'Utils',init:function(){return this},destroy:function(){},Sorter:f,Resizer:C,Dragger:r["a"]}}},function(t,e,n){"use strict";n.r(e);var r=n(7),i=n.n(r),o=n(2),a=n.n(o),s=n(0),l=n(22),c={stylePrefix:'com-',defaults:[],strict:1},u=n(5);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f=[['preview','Preview','preview'],['resize','Resize','resize'],['fullscreen','Fullscreen','fullscreen'],['copy','CopyComponent'],['paste','PasteComponent'],['canvas-move','CanvasMove'],['canvas-clear','CanvasClear'],['open-code','ExportTemplate','export-template'],['open-layers','OpenLayers','open-layers'],['open-styles','OpenStyleManager','open-sm'],['open-traits','OpenTraitManager','open-tm'],['open-blocks','OpenBlocks','open-blocks'],['open-assets','OpenAssets','open-assets'],['component-select','SelectComponent','select-comp'],['component-outline','SwitchVisibility','sw-visibility'],['component-offset','ShowOffset','show-offset'],['component-move','MoveComponent','move-comp'],['component-next','ComponentNext'],['component-prev','ComponentPrev'],['component-enter','ComponentEnter'],['component-exit','ComponentExit','select-parent'],['component-delete','ComponentDelete'],['component-style-clear','ComponentStyleClear'],['component-drag','ComponentDrag']];e["default"]=function(){var t,e={},r={},o={},a={};return{CommandAbstract:l["default"],name:'Commands',init:function(){var r=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=h(h({},c),a),t=e.em;var l=e.pStylePrefix;return l&&(e.stylePrefix=l+e.stylePrefix),Object.keys(e.defaults).forEach((function(t){var n=e.defaults[t];n.id&&r.add(n.id,n)})),o['tlb-delete']={run:function(t){return t.runCommand('core:component-delete')}},o['tlb-clone']={run:function(t){t.runCommand('core:copy'),t.runCommand('core:paste')}},o['tlb-move']={run:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.getModel(),o=n&&n.event,a=n.target,l=a||t.getSelected(),c=a?[a]:i()(t.getSelectedAll()),d=o&&'dragstart'==o.type,h={preserveSelected:1},f=['absolute','translate'],p=l.get('dmode')||r.get('dmode'),g=function(){return r.stopDefault(h)},v=Object(s["includes"])(f,p);if(c.forEach((function(t){return t.trigger('disable')})),!l||!l.get('draggable'))return r.logWarning('The element is not draggable');d?setTimeout(g,0):g();var m=function(t){r.trigger("".concat(u["eventDrag"],":start"),t)},b=function(t){r.trigger(u["eventDrag"],t)},y=function(e,n,i){r.runDefault(h),c.forEach((function(t){return t.set('status','selected')})),t.select(c),l.emitUpdate(),r.trigger("".concat(u["eventDrag"],":end"),i),(v||i.cancelled)&&r.set('_cmpDrag',1)};if(v)t.runCommand('core:component-drag',{guidesInfo:1,mode:p,target:l,onStart:m,onDrag:b,onEnd:y,event:o});else{d&&o.dataTransfer.setDragImage(l.view.el,0,0);var w=t.Commands.get('move-comp');w.onStart=m,w.onDrag=b,w.onEndMoveFromModel=y,w.initSorterFromModels(c)}c.forEach((function(t){return t.set('status','freezed-selected')}))}},o['core:undo']=function(t){return t.UndoManager.undo()},o['core:redo']=function(t){return t.UndoManager.redo()},f.forEach((function(e){var r=e[2],i=n(91)("./".concat(e[1])).default,a="core:".concat(e[0]);o[a]=i,r&&(o[r]=i,['run','stop'].forEach((function(e){t.on("".concat(e,":").concat(r),(function(){for(var n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(n=t).trigger.apply(n,["".concat(e,":").concat(a)].concat(i))}))})))})),e.em&&(e.model=e.em.get('Canvas')),this.loadDefaultCommands(),this},add:function(t,e){return Object(s["isFunction"])(e)&&(e={run:e}),e.stop||(e.noStop=1),delete e.initialize,e.id=t,r[t]=l["default"].extend(e),this},get:function(n){var i=r[n];return Object(s["isFunction"])(i)?(i=new i(e),r[n]=i):i||t.logWarning("'".concat(n,"' command not found")),i},extend:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get(t);if(n){var r=h(h({},n.constructor.prototype),e);this.add(t,r);var i=f.filter((function(e){return"core:".concat(e[0])===t&&e[2]}))[0];i&&this.add(i[2],r)}return this},has:function(t){return!!r[t]},getAll:function(){return r},run:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.runCommand(this.get(t),e)},stop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.stopCommand(this.get(t),e)},isActive:function(t){return this.getActive().hasOwnProperty(t)},getActive:function(){return a},loadDefaultCommands:function(){for(var t in o)this.add(t,o[t]);return this},runCommand:function(n){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n&&n.run){var o=n.id,s=t.get('Editor');this.isActive(o)&&!i.force&&e.strict||(r=n.callRun(s,i),o&&n.stop&&!n.noStop&&!i.abort&&(a[o]=r))}return r},stopCommand:function(n){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n&&n.run){var o=n.id,s=t.get('Editor');(this.isActive(o)||i.force||!e.strict)&&(o&&delete a[o],r=n.callStop(s,i))}return r},create:function(t){return t.stop||(t.noStop=1),new(l["default"].extend(t))(e)},destroy:function(){[t,e,r,o,a].forEach((function(t){return{}}))}}}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n.n(r),o=n(0),a={stylePrefix:'css-',staticRules:'',rules:[]},s=n(34),l=n(33),c=n(37),u=n(12),d=n(10);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e["default"]=function(){var t,e,n,r={};return{Selectors:u["a"],name:'CssComposer',getConfig:function(){return r},storageKey:function(){var t=[],e=r.stm&&r.stm.getConfig()||{};return e.storeCss&&t.push('css'),e.storeStyles&&t.push('styles'),t},init:function(i){for(var o in r=i||{},a)o in r||(r[o]=a[o]);var s=r.pStylePrefix;s&&(r.stylePrefix=s+r.stylePrefix);var u=r.em&&r.em.config.style||'';return r.rules=u||r.rules,t=r.em,e=new l["a"]([],r),n=new c["a"]({collection:e,config:r}),this},onLoad:function(){e.add(r.rules)},postLoad:function(t){var e=this,n='add remove',r=this.getAll(),i=t.get('UndoManager');i&&i.add(r),t.stopListening(r,n,this.handleChange),t.listenTo(r,n,this.handleChange),r.each((function(t){return e.handleChange(t,null,{avoidStore:1})}))},handleChange:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i='change:style',o=t.get('UndoManager');o&&o.add(e);var a=t.handleUpdates.bind(t);t.stopListening(e,i,a),t.listenTo(e,i,a),!r.avoidStore&&a('','',r)},load:function(t){var n=t||'';!n&&r.stm&&(n=r.em.getCacheLoad());var i=n.styles||'';if(n.styles)try{i=JSON.parse(n.styles)}catch(t){}else n.css&&(i=r.em.get('Parser').parseCss(n.css));return Object(o["isArray"])(i)?i.length&&e.reset(i):i&&e.reset(i),i},store:function(t){if(r.stm){var n={},i=this.storageKey();return i.indexOf('css')>=0&&(n.css=r.em.getCss()),i.indexOf('styles')>=0&&(n.styles=JSON.stringify(e)),t||r.stm.store(n),n}},add:function(t,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},l=n||'',c=i||'',u=f({},o),d=this.get(t,l,c,u);return d&&d.config&&!d.config.singleAtRule||(u.state=l,u.mediaText=c,u.selectors=[],(d=new s["a"](u,r)).get('selectors').add(t,a),e.add(d,a)),d},get:function(t,n,r,i){var o=null;return e.each((function(e){o||e.compare(t,n,r,i)&&(o=e)})),o},getAll:function(){return e},clear:function(){return this.getAll().reset(),this},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],i=t instanceof Array?t:[t],o=0,a=i.length;o<a;o++){var s=i[o]||{};if(s.selectors){var l=r.em&&r.em.get('SelectorManager');l||console.warn('Selector Manager not found');for(var c=s.selectors,u=c instanceof Array?c:[c],d=[],h=0,p=u.length;h<p;h++){var g=l.add(u[h]);d.push(g)}var v=this.get(d,s.state,s.mediaText,s),m=this.add(d,s.state,s.mediaText,s),b=!v||!e.avoidUpdateStyle,y=s.style||{};if(b){var w=e.extend?f(f({},m.get('style')),y):y;m.set('style',w)}n.push(m)}}return n},setRule:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.atRuleType,o=r.atRuleParams,a=t.get('Parser').parserCss.checkNode({selectors:e,style:n})[0],s=a.state,l=a.selectorsAdd,c=t.get('SelectorManager'),u=c.add(a.selectors),d=this.add(u,s,o,{selectorsAdd:l,atRule:i});return d.setStyle(n,r),d},getRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.get('SelectorManager'),i=t.get('Parser').parserCss.checkNode({selectors:e})[0],o=r.get(i.selectors),a=i.state,s=i.selectorsAdd,l=n.atRuleType,c=n.atRuleParams;return o&&this.get(o,a,c,{selectorsAdd:s,atRule:l})},getRules:function(t){return this.getAll().filter((function(e){return e.getSelectors().getFullString()===t}))},setIdRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.addOpts,o=void 0===i?{}:i,a=r.state||'',s=r.mediaText||t.getCurrentMedia(),l=t.get('SelectorManager'),c=l.add({name:e,type:d["a"].TYPE_ID},o),u=this.add(c,a,s,{},o);return u.setStyle(n,f(f({},r),o)),u},getIdRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.state||'',i=n.mediaText||t.getCurrentMedia(),o=t.get('SelectorManager').get(e,d["a"].TYPE_ID);return o&&this.get(o,r,i)},setClassRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.state||'',o=r.mediaText||t.getCurrentMedia(),a=t.get('SelectorManager'),s=a.add({name:e,type:d["a"].TYPE_CLASS}),l=this.add(s,i,o);return l.setStyle(n,r),l},getClassRule:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.state||'',i=n.mediaText||t.getCurrentMedia(),o=t.get('SelectorManager').get(e,d["a"].TYPE_CLASS);return o&&this.get(o,r,i)},render:function(){return n.render().el},destroy:function(){e.reset(),e.stopListening(),n.remove(),[t,e,n].forEach((function(t){return null})),r={}}}}}])["default"]})); //# sourceMappingURL=grapes.min.js.map plugins.min.js 0000644 00001424673 15213377537 0007403 0 ustar 00 /*! grapesjs-lory-slider - 0.1.5 */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("grapesjs")):"function"==typeof define&&define.amd?define(["grapesjs"],t):"object"==typeof exports?exports["grapesjs-lory-slider"]=t(require("grapesjs")):e["grapesjs-lory-slider"]=t(e.grapesjs)}(this,function(e){return function(e){function t(s){if(l[s])return l[s].exports;var a=l[s]={i:s,l:!1,exports:{}};return e[s].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var l={};return t.m=e,t.c=l,t.d=function(e,l,s){t.o(e,l)||Object.defineProperty(e,l,{configurable:!1,enumerable:!0,get:s})},t.n=function(e){var l=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(l,"a",l),l},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={sliderName:"lory-slider",slideName:"lory-slide",slidesName:"lory-slides",prevName:"lory-prev",nextName:"lory-next",frameName:"lory-frame",sliderSelector:"[data-lory-slider]",slidesSelector:"[data-lory-slides]",slideSelector:"[data-lory-slide]",prevSelector:"[data-lory-prev]",nextSelector:"[data-lory-next]",frameSelector:"[data-lory-frame]",sliderId:"data-lory-slider",slideId:"data-lory-slide",slidesId:"data-lory-slides",prevId:"data-lory-prev",nextId:"data-lory-next",frameId:"data-lory-frame"}},function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e,t){var l=e.className;if((l=l&&l.toString())&&l.split(" ").indexOf(t)>=0)return 1};t.elHasClass=s},function(e,t,l){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s])}return e},r=l(3),n=s(r),d=l(4),i=s(d),o=l(11),u=s(o);t.default=n.default.plugins.add("grapesjs-lory-slider",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=a({sliderBlock:{},sliderProps:{},frameProps:{},slidesProps:{},slideProps:{},prevProps:{},nextProps:{},slideEls:'\n <div class="gjs-lory-slide"></div>\n <div class="gjs-lory-slide"></div>\n <div class="gjs-lory-slide"></div>\n ',prevEl:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 501.5 501.5">\n <g><path fill="#2E435A" d="M302.67 90.877l55.77 55.508L254.575 250.75 358.44 355.116l-55.77 55.506L143.56 250.75z"/></g>\n </svg>',nextEl:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 501.5 501.5">\n <g><path fill="#2E435A" d="M199.33 410.622l-55.77-55.508L247.425 250.75 143.56 146.384l55.77-55.507L358.44 250.75z"/></g>\n </svg>',classFrame:"gjs-lory-frame",classSlides:"gjs-lory-slides",classSlide:"gjs-lory-slide",classPrev:"gjs-lory-prev",classNext:"gjs-lory-next",script:"https://cdnjs.cloudflare.com/ajax/libs/lory.js/2.3.4/lory.min.js"},t);(0,i.default)(e,l),(0,u.default)(e,l)})},function(t,l){t.exports=e},function(e,t,l){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=l(0),r=s(a),n=l(5),d=s(n),i=l(6),o=s(i),u=l(7),p=s(u),c=l(8),f=s(c),v=l(9),m=s(v),y=l(10),g=s(y);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=e.DomComponents,s=l.getType("default");s.model,s.view,r.default.sliderName,r.default.slideName,r.default.sliderId,r.default.slideId;(0,d.default)(l,t),(0,o.default)(l,t),(0,p.default)(l,t),(0,f.default)(l,t),(0,m.default)(l,t),(0,g.default)(l,t)}},function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s])}return e},a=l(0),r=function(e){return e&&e.__esModule?e:{default:e}}(a);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=e.getType("default"),a=l.model,n=l.view,d=r.default.frameName,i=r.default.prevSelector,o=r.default.nextSelector,u=r.default.sliderName,p=r.default.slidesName,c=r.default.prevName,f=r.default.nextName,v=r.default.sliderId;r.default.prevId,r.default.nextId,r.default.frameId,r.default.slidesId,r.default.slideId;e.addType(u,{model:a.extend({defaults:s({},a.prototype.defaults,{name:"Slider","slides-to-scroll":1,"enable-mouse-events":!1,"slide-speed":300,"rewind-speed":600,"snap-back-speed":200,infinite:!1,rewind:!1,ease:"ease",droppable:i+", "+o,style:{position:"relative",width:"980px",margin:"0 auto"},traits:[{type:"checkbox",label:"Infinite",name:"infinite",changeProp:1},{type:"checkbox",label:"Rewind",name:"rewind",changeProp:1},{type:"number",label:"Slide speed",name:"slide-speed",changeProp:1},{type:"number",label:"Rewind speed",name:"rewind-speed",changeProp:1},{type:"number",label:"Slides to scroll",name:"slides-to-scroll",changeProp:1},{type:"select",label:"Timing",name:"ease",changeProp:1,options:["ease","linear","ease-in","ease-out","ease-in-out"]}],"script-deps":t.script,"class-frame":t.classFrame,"class-slides":t.classSlides,"class-prev":t.classPrev,"class-next":t.classNext,script:function(){var e=this,t="{[ script-deps ]}",l=["0","false"],s="{[ infinite ]}";s="true"==s?1:parseInt(s,10);var a={slidesToScroll:parseInt("{[ slides-to-scroll ]}",10),enableMouseEvents:l.indexOf("{[ enable-mouse-events ]}")>=0?0:1,infinite:!isNaN(s)&&s,rewind:!(l.indexOf("{[ rewind ]}")>=0),slideSpeed:parseInt("{[ slide-speed ]}",10),rewindSpeed:parseInt("{[ rewind-speed ]}",10),snapBackSpeed:parseInt("{[ snap-back-speed ]}",10),ease:"{[ ease ]}",classNameFrame:"{[ class-frame ]}",classNameSlideContainer:"{[ class-slides ]}",classNamePrevCtrl:"{[ class-prev ]}",classNameNextCtrl:"{[ class-next ]}"},r=function(){window.sliderLory=lory(e,a)};if("undefined"==typeof lory){var n=document.createElement("script");n.src=t,n.onload=r,document.head.appendChild(n)}else r()}},t.sliderProps)},{isComponent:function(e){if(e.hasAttribute&&e.hasAttribute(v))return{type:u}}}),view:n.extend({init:function(){var e=["slides-to-scroll","enable-mouse-events","slide-speed","rewind-speed","snap-back-speed","infinite","rewind","ease"],l=e.map(function(e){return"change:"+e}).join(" ");this.listenTo(this.model,l,this.render);var s=this.model.components();s.length||s.add('<div data-gjs-type="'+d+'">\n <div data-gjs-type="'+p+'">'+t.slideEls+'</div>\n </div>\n <span data-gjs-type="'+c+'">'+t.prevEl+'</span>\n <span data-gjs-type="'+f+'">'+t.nextEl+"</span>")}})})}},function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s])}return e},a=l(0),r=function(e){return e&&e.__esModule?e:{default:e}}(a),n=l(1);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=e.getType("default"),a=l.model,d=r.default.slidesName,i=(r.default.slidesId,r.default.slideSelector),o=r.default.frameSelector;e.addType(d,{model:a.extend({defaults:s({},a.prototype.defaults,{name:"Slides",droppable:i,draggable:o,style:{display:"inline-block","transition-delay":"1ms"}},t.slidesProps),init:function(){var e=t.classSlides;this.get("classes").pluck("name").indexOf(e)<0&&this.addClass(e)}},{isComponent:function(e){if((0,n.elHasClass)(e,t.classSlides))return{type:d}}}),view:l.view.extend({init:function(){this.listenTo(this.model.components(),"add remove",this.renderSlider)},renderSlider:function(){var e=this.model.parent().parent();e&&e.view.render()}})})}},function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s])}return e},a=l(0),r=function(e){return e&&e.__esModule?e:{default:e}}(a),n=l(1);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=e.getType("default"),a=l.model,d=l.view,i=r.default.slideName,o=(r.default.slideId,r.default.slidesSelector);e.addType(i,{model:a.extend({defaults:s({},a.prototype.defaults,{name:"Slide",draggable:o,style:{display:"inline-block",position:"relative",color:"#fff",width:"880px","margin-right":"10px","vertical-align":"top","min-height":"130px","white-space":"normal","background-color":"rgba(0, 0, 0, 0.1)"}},t.slideProps)},{isComponent:function(e){if((0,n.elHasClass)(e,t.classSlide))return{type:i}}}),view:d})}},function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s])}return e},a=l(0),r=function(e){return e&&e.__esModule?e:{default:e}}(a),n=l(1);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=e.getType("default"),a=l.model,d=r.default.prevName,i=(r.default.prevId,r.default.sliderSelector),o=t.classPrev,u=d;e.addType(u,{model:a.extend({defaults:s({},a.prototype.defaults,{name:"Nav Previous",copyable:0,draggable:i,style:{position:"absolute",display:"block",cursor:"pointer",top:"50%",left:0,"margin-top":"-25px"}},t.prevProps),init:function(){this.get("classes").pluck("name").indexOf(o)<0&&this.addClass(o)}},{isComponent:function(e){if((0,n.elHasClass)(e,o))return{type:u}}}),view:l.view})}},function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s])}return e},a=l(0),r=function(e){return e&&e.__esModule?e:{default:e}}(a),n=l(1);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=e.getType("default"),a=l.model,d=r.default.nextName,i=(r.default.nextId,r.default.sliderSelector),o=t.classNext,u=d;e.addType(u,{model:a.extend({defaults:s({},a.prototype.defaults,{name:"Nav Next",copyable:0,draggable:i,style:{position:"absolute",display:"block",cursor:"pointer",top:"50%",right:0,"margin-top":"-25px"}},t.nextProps),init:function(){this.get("classes").pluck("name").indexOf(o)<0&&this.addClass(o)}},{isComponent:function(e){if((0,n.elHasClass)(e,o))return{type:u}}}),view:l.view})}},function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s])}return e},a=l(0),r=function(e){return e&&e.__esModule?e:{default:e}}(a),n=l(1);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=e.getType("default"),a=l.model,d=l.view,i=r.default.frameName,o=(r.default.frameId,r.default.slidesSelector);e.addType(i,{model:a.extend({defaults:s({},a.prototype.defaults,{name:"Slider Frame",droppable:o,style:{width:"880px",margin:"0 auto",position:"relative",overflow:"hidden","white-space":"nowrap"}},t.frameProps),init:function(){var e=t.classFrame;this.get("classes").pluck("name").indexOf(e)<0&&this.addClass(e)}},{isComponent:function(e){if((0,n.elHasClass)(e,t.classFrame))return{type:i}}}),view:d})}},function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s])}return e},a=l(0),r=function(e){return e&&e.__esModule?e:{default:e}}(a);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=e.BlockManager,a=t.sliderBlock,n=r.default.sliderName;a&&l.add(n,s({label:'\n <svg class="gjs-block-svg" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M22 7.6c0-1-.5-1.6-1.3-1.6H3.4C2.5 6 2 6.7 2 7.6v9.8c0 1 .5 1.6 1.3 1.6h17.4c.8 0 1.3-.6 1.3-1.6V7.6zM21 18H3V7h18v11z" fill-rule="nonzero"/><path d="M4 12.5L6 14v-3zM20 12.5L18 14v-3z"/>\n </svg>\n <div class="gjs-block-label">Slider</div>\n ',content:{type:n}},a))}}])}); /*! grapesjs-tabs - 0.2.2 */ !function(t,e){'object'==typeof exports&&'object'==typeof module?module.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof exports?exports["grapesjs-tabs"]=e():t["grapesjs-tabs"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(t,'__esModule',{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&'object'==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:t}),2&e&&'string'!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,'a',e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var r=n(2);t.exports=function(t,e){if(null==t)return{};var n,o,a=r(t,e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(o=0;o<c.length;o++)n=c[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n.n(r),a=n(1),c=n.n(a);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var b=function(t,e){var n=e.linkModel,r=e.linkView,a=c()(e,["linkModel","linkView"]),i=a.attrTab,b=a.classTab,l=a.selectorTab;t.addType("tab",{model:n.extend({defaults:s({},n.prototype.defaults,{name:'Tab',draggable:"[".concat(a.attrTabContainer,"]"),droppable:!1},a.tabProps),init:function(){var t=this.getAttributes();t[i]=1,this.setAttributes(t),b&&this.addClass(b)},clone:function(){var t=n.prototype.clone.apply(this,arguments);return t.addAttributes(o()({},l,'')),t}},{isComponent:function(t){if(t.hasAttribute&&t.hasAttribute(i))return{type:"tab"}}}),view:r})};function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var p=function(t,e){var n=e.defaultModel,r=e.defaultView,o=c()(e,["defaultModel","defaultView"]),a=o.attrTabs;t.addType("tabs",{model:n.extend({defaults:u({},n.prototype.defaults,{name:'Tabs','attr-tabs':o.attrTabs,'attr-tab':o.attrTab,'attr-tab-content':o.attrTabContent,'class-tab-active':o.classTabActive,'selector-tab':o.selectorTab,script:function(){var t,e=this,n="[{[ attr-tab ]}]",r=document.body,o=r.matchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector,a=function(r){var o=e.querySelectorAll(n)||[];for(t=0;t<o.length;t++){var a=o[t],c=a.className.replace("{[ class-tab-active ]}",'').trim();a.className=c}!function(){var n=e.querySelectorAll("[{[ attr-tab-content ]}]")||[];for(t=0;t<n.length;t++)n[t].style.display='none'}(),r.className+=" {[ class-tab-active ]}";var i=r.getAttribute("{[ selector-tab ]}"),s=e.querySelector(i);s&&(s.style.display='')},c=e.querySelector(".{[ class-tab-active ]}"+n);(c=c||e.querySelector(n))&&a(c),e.addEventListener('click',(function(t){var e=t.target;o.call(e,n)&&a(e)}))}},o.tabsProps),init:function(){var t=this.getAttributes();t[o.attrTabs]=1,this.setAttributes(t)}},{isComponent:function(t){if(t.hasAttribute&&t.hasAttribute(a))return{type:"tabs"}}}),view:r.extend({init:function(){var t=this.model.components();!t.length&&t.add(o.template)},onRender:function(){var t=this.model.find("[".concat(o.attrTabContainer,"]"))[0];t&&t.components().each((function(e){t.onAdd(e)}))}})})};function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var y=function(t,e){var n=e.defaultModel,r=e.defaultView,o=c()(e,["defaultModel","defaultView"]),a=o.attrTabContent,i=o.classTabContent;t.addType("tab-content",{model:n.extend({defaults:d({},n.prototype.defaults,{name:'Tab Content',draggable:!1,copyable:!1,removable:!1},o.tabContentProps),init:function(){var t=this.getAttributes();t[a]=1,this.setAttributes(t),i&&this.addClass(i)}},{isComponent:function(t){if(t.hasAttribute&&t.hasAttribute(a))return{type:"tab-content"}}}),view:r})};function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var g=function(t,e){var n=e.defaultModel,r=e.defaultView,a=c()(e,["defaultModel","defaultView"]),i='tab-container',s=a.attrTabs,b=a.attrTabContainer,l=a.classTabContainer,u=a.selectorTab;t.addType(i,{model:n.extend({defaults:v({},n.prototype.defaults,{name:'Tab Container',draggable:"[".concat(s,"]"),droppable:"[".concat(a.attrTab,"]"),copyable:!1,removable:!1},a.tabContainerProps),init:function(){var t=this.getAttributes();t[b]=1,this.setAttributes(t),l&&this.addClass(l);var e=this.components();this.listenTo(e,'add',this.onAdd),this.listenTo(e,'remove',this.onRemove)},onRemove:function(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var n=t.tabContent;n&&setTimeout((function(){var e=t.collection,r=n.collection;!e&&r&&r.remove(n)}),0)},onAdd:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.getAttributes();if(!t.tabContent&&!n.avoidStore){var c=r[u],i=this.closest("[".concat(s,"]")),b=c&&i.view.$el.find(c);if(b&&b.length)t.tabContent=b.data('model');else{var l=i.components().add({type:'tab-content',components:a.templateTabContent}),p=l.getId();l.addAttributes({id:p}),t.addAttributes(o()({},u,"#".concat(p))),t.tabContent=l,l.getEl().style.display='none'}}}},{isComponent:function(t){if(t.hasAttribute&&t.hasAttribute(b))return{type:i}}}),view:r})};function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.DomComponents,r=n.getType('default'),o=n.getType('link'),a=r.model,c=r.view,i=o.model,s=o.view,l=h({},e,{defaultModel:a,defaultView:c,linkModel:i,linkView:s});b(n,l),p(n,l),y(n,l),g(n,l)};function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function P(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var T=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.BlockManager,r=e.tabsBlock,o=e.style,a='tabs',c="<div data-gjs-type=\"".concat(a,"\"></div>\n ").concat(o?"<style>".concat(o,"</style>"):'');r&&n.add(a,P({label:"\n <svg class=\"gjs-block-svg\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g fill-rule=\"evenodd\">\n <path d=\"M22 9.3c0-.8-.5-1.3-1.3-1.3H3.4C2.5 8 2 8.5 2 9.3v7.4c0 .8.5 1.3 1.3 1.3h17.4c.8 0 1.3-.5 1.3-1.3V9.3zM21 17H3V9h18v8z\" fill-rule=\"nonzero\"/><rect x=\"3\" y=\"5\" width=\"4\" height=\"2\" rx=\".5\"/><rect x=\"8\" y=\"5\" width=\"4\" height=\"2\" rx=\".5\"/><rect x=\"13\" y=\"5\" width=\"4\" height=\"2\" rx=\".5\"/>\n </g>\n </svg>\n <div class=\"gjs-block-label\">Tabs</div>\n ",content:c},r))};function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var S='data-tab';e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=x({},{tabsBlock:{},tabsProps:{},tabProps:{},tabContentProps:{},tabContainerProps:{},attrTabs:"data-tabs",attrTab:S,attrTabContent:"data-tab-content",attrTabContainer:"data-tab-container",classTab:'tab',classTabActive:'tab-active',classTabContent:'tab-content',classTabContainer:'tab-container',selectorTab:'href',template:"\n <nav ".concat("data-tab-container",">\n <a href=\"#tab1\" ").concat(S,">Tab 1</a>\n <a href=\"#tab2\" ").concat(S,">Tab 2</a>\n <a href=\"#tab3\" ").concat(S,">Tab 3</a>\n </nav>\n <div id=\"tab1\" ").concat("data-tab-content",">\n <div>Tab 1 Content</div>\n </div>\n <div id=\"tab2\" ").concat("data-tab-content",">\n <div>Tab 2 Content</div>\n </div>\n <div id=\"tab3\" ").concat("data-tab-content",">\n <div>Tab 3 Content</div>\n </div>\n "),templateTabContent:"<div>New Tab Content</div>",style:"\n .tab {\n text-decoration: none;\n color: inherit;\n padding: 7px 14px;\n transition: opacity 0.3s;\n display: inline-block;\n border-radius: 3px;\n margin-right: 10px;\n }\n\n .tab.tab-active {\n background-color: #0d94e6;\n color: white;\n }\n\n .tab-content {\n padding: 6px 12px;\n min-height: 100px;\n animation: fadeEffect 1s;\n }\n\n @keyframes fadeEffect {\n from {opacity: 0;}\n to {opacity: 1;}\n }\n "},{},e);m(t,n),T(t,n)}}])})); //# sourceMappingURL=grapesjs-tabs.min.js.map /*! grapesjs-custom-code - 0.1.3 */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["grapesjs-custom-code"]=t():e["grapesjs-custom-code"]=t()}(window,function(){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.keyCustomCode="custom-code-plugin__code",t.typeCustomCode="custom-code",t.commandNameCustomCode="custom-code:open-modal"},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r=d(o(2)),i=d(o(3)),s=d(o(4));function d(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n({blockLabel:"Custom Code",blockCustomCode:{},propsCustomCode:{},placeholderContent:"<span>Insert here your custom code</span>",toolbarBtnCustomCode:{},placeholderScript:'<div style="pointer-events: none; padding: 10px;">\n <svg viewBox="0 0 24 24" style="height: 30px; vertical-align: middle;">\n <path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"></path>\n </svg>\n Custom code with <i><script></i> can\'t be rendered on the canvas\n </div>',modalTitle:"Insert your code",codeViewOptions:{},buttonLabel:"Save",commandCustomCode:{}},t);(0,r.default)(e,o),(0,i.default)(e,o),(0,s.default)(e,o)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r=o(0);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.DomComponents,i=o.getType("default"),s=i.model,d=t.toolbarBtnCustomCode,a=void 0;o.addType("script",{view:{onRender:function(){this.model.closestType(r.typeCustomCode)&&(this.el.innerHTML="")}}}),o.addType(r.typeCustomCode,{model:s.extend({defaults:n({},s.prototype.defaults,{name:"Custom Code",editable:!0},t.propsCustomCode),init:function(){this.listenTo(this,"change:"+r.keyCustomCode,this.onCustomCodeChange);var e=this.get(r.keyCustomCode)||t.placeholderContent;!this.components().length&&this.components(e);var o=this.get("toolbar"),i="custom-code";d&&!o.filter(function(e){return e.id===i}).length&&o.unshift(n({id:i,command:r.commandNameCustomCode,label:'<svg viewBox="0 0 24 24">\n <path d="M14.6 16.6l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4z"></path>\n </svg>'},d))},onCustomCodeChange:function(){this.components(this.get(r.keyCustomCode))}},{isComponent:function(){return!1}}),view:i.view.extend({events:{dblclick:"onActive"},init:function(){this.listenTo(this.model.components(),"add remove reset",this.onComponentsChange),this.onComponentsChange()},onComponentsChange:function(){var e=this;a&&clearInterval(a),a=setTimeout(function(){var o=e.model,n=1;(o.get(r.keyCustomCode)||"").indexOf("<script")>=0&&(e.el.innerHTML=t.placeholderScript,n=0),o.set({droppable:n})},0)},onActive:function(){var e=this.model;this.em.get("Commands").run(r.commandNameCustomCode,{target:e})}})})}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r=o(0);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.BlockManager,i=t.blockCustomCode,s=t.blockLabel;i&&o.add(r.typeCustomCode,n({label:'<svg viewBox="0 0 24 24">\n <path d="M14.6 16.6l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4z"></path>\n </svg>\n <div>'+s+"</div>",category:"Extra",activate:!0,select:!0,content:{type:r.typeCustomCode}},i))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r=o(0);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.Commands,i=t.modalTitle,s=t.codeViewOptions,d=t.commandCustomCode,a=function(e,t){t instanceof HTMLElement?e.appendChild(t):t&&e.insertAdjacentHTML("beforeend",t)};o.add(r.commandNameCustomCode,n({keyCustomCode:r.keyCustomCode,run:function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.editor=e,this.options=o,this.target=o.target||e.getSelected();var n=this.target;n&&n.get("editable")&&this.showCustomCode(n)},stop:function(e){e.Modal.close()},showCustomCode:function(e){var t=this,o=this.editor,n=this.options.title||i,s=this.getContent(),d=e.get(r.keyCustomCode)||"";o.Modal.open({title:n,content:s}).getModel().once("change:open",function(){return o.stopCommand(t.id)}),this.getCodeViewer().setContent(d)},getPreContent:function(){},getPostContent:function(){},getContent:function(){var e=this.editor,t=document.createElement("div"),o=this.getCodeViewer(),n=e.getConfig("stylePrefix");return t.className=n+"custom-code",a(t,this.getPreContent()),t.appendChild(o.getElement()),a(t,this.getPostContent()),a(t,this.getContentActions()),o.refresh(),setTimeout(function(){return o.focus()},0),t},getContentActions:function(){var e=this,o=this.editor,n=document.createElement("button"),r=o.getConfig("stylePrefix");return n.innerHTML=t.buttonLabel,n.className=r+"btn-prim "+r+"btn-import__custom-code",n.onclick=function(){return e.handleSave()},n},handleSave:function(){var e=this.editor,t=this.target,o=this.getCodeViewer().getContent();t.set(r.keyCustomCode,o),e.Modal.close()},getCodeViewer:function(){var e=this.editor;return this.codeViewer||(this.codeViewer=e.CodeManager.createViewer(n({codeName:"htmlmixed",theme:"hopscotch",readOnly:0},s))),this.codeViewer}},d))}}])}); //# sourceMappingURL=grapesjs-custom-code.min.js.map /*! grapesjs-touch - 0.1.1 */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["grapesjs-touch"]=t():e["grapesjs-touch"]=t()}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(1)),i=r(n(2));function r(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){(0,i.default)(),(0,o.default)()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e;!function(e){var t=function(){function e(){this._dropEffect="move",this._effectAllowed="all",this._data={}}return Object.defineProperty(e.prototype,"dropEffect",{get:function(){return this._dropEffect},set:function(e){this._dropEffect=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"effectAllowed",{get:function(){return this._effectAllowed},set:function(e){this._effectAllowed=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"types",{get:function(){return Object.keys(this._data)},enumerable:!0,configurable:!0}),e.prototype.clearData=function(e){null!=e?delete this._data[e]:this._data=null},e.prototype.getData=function(e){return this._data[e]||""},e.prototype.setData=function(e,t){this._data[e]=t},e.prototype.setDragImage=function(e,t,o){var i=n._instance;i._imgCustom=e,i._imgOffset={x:t,y:o}},e}();e.DataTransfer=t;var n=function(){function e(){if(this._lastClick=0,e._instance)throw"DragDropTouch instance already created.";var t=!1;if(document.addEventListener("test",function(){},{get passive(){return t=!0,!0}}),"ontouchstart"in document){var n=document,o=this._touchstart.bind(this),i=this._touchmove.bind(this),r=this._touchend.bind(this),s=!!t&&{passive:!1,capture:!1};n.addEventListener("touchstart",o,s),n.addEventListener("touchmove",i,s),n.addEventListener("touchend",r),n.addEventListener("touchcancel",r)}}return e.getInstance=function(){return e._instance},e.prototype._touchstart=function(t){var n=this;if(this._shouldHandle(t)){if(Date.now()-this._lastClick<e._DBLCLICK&&this._dispatchEvent(t,"dblclick",t.target))return t.preventDefault(),void this._reset();this._reset();var o=this._closestDraggable(t.target);o&&(this._dispatchEvent(t,"mousemove",t.target)||this._dispatchEvent(t,"mousedown",t.target)||(this._dragSource=o,this._ptDown=this._getPoint(t),this._lastTouch=t,t.preventDefault(),setTimeout(function(){n._dragSource==o&&null==n._img&&n._dispatchEvent(t,"contextmenu",o)&&n._reset()},e._CTXMENU)))}},e.prototype._touchmove=function(t){if(this._shouldHandle(t)){var n=this._getTarget(t);if(this._dragSource&&!this._img)this._getDelta(t)>e._THRESHOLD&&(this._dispatchEvent(t,"dragstart",this._dragSource),this._createImage(t),this._dispatchEvent(t,"dragenter",n));if(this._img&&(this._lastTouch=t,t.preventDefault(),n!=this._lastTarget&&(this._dispatchEvent(this._lastTouch,"dragleave",this._lastTarget),this._dispatchEvent(t,"dragenter",n),this._lastTarget=n),this._moveImage(t),this._dispatchEvent(t,"dragover",n)),this._dispatchEvent(t,"mousemove",n))return this._lastTouch=t,void t.preventDefault()}},e.prototype._touchend=function(e){if(this._shouldHandle(e)){if(this._destroyImage(),this._dragSource)return e.type.indexOf("cancel")<0&&this._dispatchEvent(this._lastTouch,"drop",this._lastTarget),this._dispatchEvent(this._lastTouch,"dragend",this._dragSource),this._reset(),void e.preventDefault();if(this._dispatchEvent(this._lastTouch,"mouseup",e.target))return void e.preventDefault();this._img||(this._dragSource=null,this._dispatchEvent(this._lastTouch,"click",e.target),this._lastClick=Date.now())}},e.prototype._shouldHandle=function(e){return e&&!e.defaultPrevented&&e.touches&&e.touches.length<2},e.prototype._reset=function(){this._destroyImage(),this._dragSource=null,this._lastTouch=null,this._lastTarget=null,this._ptDown=null,this._dataTransfer=new t},e.prototype._getPoint=function(e,t){return e&&e.touches&&(e=e.touches[0]),{x:t?e.pageX:e.clientX,y:t?e.pageY:e.clientY}},e.prototype._getDelta=function(e){var t=this._getPoint(e);return Math.abs(t.x-this._ptDown.x)+Math.abs(t.y-this._ptDown.y)},e.prototype._getTarget=function(e){var t=this._getPoint(e),n=document.elementFromPoint(t.x,t.y);if(n&&"IFRAME"===n.nodeName)try{var o=n.contentWindow.document,i={x:0,y:0};do{i.x+=n.offsetLeft||0,i.y+=n.offsetTop||0,n=n.offsetParent}while(n);var r=t.x-i.x,s=t.y-i.y;n=o.elementFromPoint(r,s)}catch(e){}for(;n&&"none"==getComputedStyle(n).pointerEvents;)n=n.parentElement;return n},e.prototype._createImage=function(t){this._img&&this._destroyImage();var n=this._imgCustom||this._dragSource;if(this._img=n.cloneNode(!0),this._copyStyle(n,this._img),this._img.style.top=this._img.style.left="-9999px",!this._imgCustom){var o=n.getBoundingClientRect(),i=this._getPoint(t);this._imgOffset={x:i.x-o.left,y:i.y-o.top},this._img.style.opacity=e._OPACITY.toString()}this._moveImage(t),document.body.appendChild(this._img)},e.prototype._destroyImage=function(){this._img&&this._img.parentElement&&this._img.parentElement.removeChild(this._img),this._img=null,this._imgCustom=null},e.prototype._moveImage=function(e){var t=this;requestAnimationFrame(function(){if(t._img){var n=t._getPoint(e,!0),o=t._img.style;o.position="absolute",o.pointerEvents="none",o.zIndex="999999",o.left=Math.round(n.x-t._imgOffset.x)+"px",o.top=Math.round(n.y-t._imgOffset.y)+"px"}})},e.prototype._copyProps=function(e,t,n){for(var o=0;o<n.length;o++){var i=n[o];e[i]=t[i]}},e.prototype._copyStyle=function(t,n){if(e._rmvAtts.forEach(function(e){n.removeAttribute(e)}),t instanceof HTMLCanvasElement){var o=t,i=n;i.width=o.width,i.height=o.height,i.getContext("2d").drawImage(o,0,0)}for(var r=getComputedStyle(t),s=0;s<r.length;s++){var a=r[s];a.indexOf("transition")<0&&(n.style[a]=r[a])}n.style.pointerEvents="none";for(s=0;s<t.children.length;s++)this._copyStyle(t.children[s],n.children[s])},e.prototype._dispatchEvent=function(t,n,o){if(t&&o){var i=document.createEvent("Event"),r=t.touches?t.touches[0]:t;return i.initEvent(n,!0,!0),i.button=0,i.which=i.buttons=1,this._copyProps(i,t,e._kbdProps),this._copyProps(i,r,e._ptProps),i.dataTransfer=this._dataTransfer,o.dispatchEvent(i),i.defaultPrevented}return!1},e.prototype._closestDraggable=function(e){for(;e;e=e.parentElement)if(e.hasAttribute("draggable")&&e.draggable)return e;return null},e}();n._instance=new n,n._THRESHOLD=5,n._OPACITY=.5,n._DBLCLICK=500,n._CTXMENU=900,n._rmvAtts="id,class,style,draggable".split(","),n._kbdProps="altKey,ctrlKey,metaKey,shiftKey".split(","),n._ptProps="pageX,pageY,clientX,clientY,screenX,screenY".split(","),e.DragDropTouch=n}(e||(e={}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(){!function(){var e,t,n,i=0,r=!1,s=navigator.userAgent,a=["touchstart","touchmove","touchend","touchcancel","touchleave"],c={};function u(){var e=[];this.touchList=e,this.Touch=function(e,t,n,o,i,r,s,a){this.identifier=e,this.target=t,this.screenX=n,this.screenY=o,this.clientX=i,this.clientY=r,this.pageX=s,this.pageY=a},this.getTouch=function(t){var n;for(n=0;n<e.length;n+=1)if(e[n].identifier===t)return e[n]},this.addUpdateTouch=function(t){var n;for(n=0;n<e.length;n+=1)if(e[n].identifier===t.identifier)return void(e[n]=t);e.push(t)},this.removeTouch=function(t){var n;for(n=0;n<e.length;n+=1)e[n].identifier===t&&e.splice(n,1)},this.clearTouches=function(){for(;e.length>0;)e.pop()},this.containsTouchAt=function(t,n){var o;for(o=0;o<e.length;o+=1)if(e[o].screenX===t&&e[o].screenY===n)return!0;return!1}}function d(e,t){return e.screenX===t.screenX&&e.screenY===t.screenY}function h(e,t){var n;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}function l(o,r,s,a,c){var u,l,p;function f(e,t){var o,i;for(n.clearTouches(),o=0;o<t.length;o++)(i=t[o]).target.isSameNode(e)&&n.addUpdateTouch(i)}"pointerdown"!==o.type&&(l=e.getTouch(o.pointerId),p=l.target,o.target=p),(u="pointerdown"===o.type||"pointermove"===o.type?function(o){var r,s,a;if(T("touch!"),"pointerdown"===o.type)r="touchstart";else{if("pointermove"!==o.type)throw new Error("touchHandler received invalid event type: "+r+". Valid event types are pointerdown and pointermove");r="touchmove"}return T(r),s=new e.Touch(o.pointerId,"pointerdown"===o.type?o.target:p,o.screenX,o.screenY,o.clientX,o.clientY,o.pageX,o.pageY),o.hwTimestamp>i&&function(){var n,o,i,r,s;for(o=t.touchList,n=0;n<o.length;n+=1)s=(i=o[n]).identifier,(r=e.getTouch(s))&&!d(r,i)||t.removeTouch(s)}(),T("generating touch cloned"),e.addUpdateTouch(s),t.addUpdateTouch(s),f(s.target,e.touchList),o.type=r,(a=new h(r,{bubbles:!0,cancelable:!0})).touches=e.touchList,a.changedTouches=t.touchList,a.targetTouches=n.touchList,a.type=r,a}(o):function(o){var r,s,a;return T("touchchanged!"),o.changedTouches=[],o.changedTouches.length=1,o.changedTouches[0]=o,o.changedTouches[0].identifier=o.pointerId,"pointerup"===o.type?r="touchend":"pointercancel"===o.type?r="touchcancel":"pointerleave"===o.type&&(r="touchleave"),s=new e.Touch(o.pointerId,p,o.screenX,o.screenY,o.clientX,o.clientY,o.pageX,o.pageY),o.hwTimestamp>i&&t.clearTouches(),e.removeTouch(s.identifier),t.addUpdateTouch(s),f(s.target,e.touchList),o.type=r,(a=new h(r,{bubbles:!0,cancelable:!0})).touches=e.touchList,a.changedTouches=t.touchList,a.targetTouches=n.touchList,a.type=r,a}(o)).preventDefault=function(){void 0!==o.preventDefault&&o.preventDefault()},T("dispatching!"),o.target.dispatchEvent(u),i=event.hwTimestamp}function p(e,t,n,o,i,r){l(t)}function f(e,t,n){var o,i;if(T("setTouchAware "+n+" "+t),e.__handJobjsGlobalRegisteredEvents||(e.__handJobjsGlobalRegisteredEvents=[]),n){if(void 0!==e.__handJobjsGlobalRegisteredEvents[t])return void(e.__handJobjsGlobalRegisteredEvents[t]+=1);e.__handJobjsGlobalRegisteredEvents[t]=1,T(e.__handJobjsGlobalRegisteredEvents[t])}else void 0!==e.__handJobjsGlobalRegisteredEvents[t]&&(e.__handJobjsGlobalRegisteredEvents[t]-=1,e.__handJobjsGlobalRegisteredEvents[t]<0&&(e.__handJobjsGlobalRegisteredEvents[t]=0));o=l,void 0!==e["on"+(i=function(e){return e}(t)).toLowerCase()]&&function(e,t,n,o){if(T("registerOrUnregisterEvent"),void 0===e.__handJobjsRegisteredEvents&&(e.__handJobjsRegisteredEvents=[]),o){if(void 0!==e.__handJobjsRegisteredEvents[t])return void(e.__handJobjsRegisteredEvents[t]+=1);e.__handJobjsRegisteredEvents[t]=1,T("adding event "+t),e.addEventListener(t,n,!1)}else{if(-1!==e.__handJobjsRegisteredEvents.indexOf(t)&&(e.__handJobjsRegisteredEvents[t]-=1,0!==e.__handJobjsRegisteredEvents[t]))return;T("removing event"),e.removeEventListener(t,n),e.__handJobjsRegisteredEvents[t]=0}}(e,i,function(e){o(e,t)},n)}function v(e){var t=e.prototype?e.prototype.addEventListener:e.addEventListener;function n(e,n,o){T("customAddEventListener"),T(e),-1!==a.indexOf(e)&&(T("setting touch aware..."),f(this,e,!0)),t.call(this,e,n,o)}T("intercepting add event listener!"),T(e),e.prototype?e.prototype.addEventListener=n:e.addEventListener=n}function g(e,t){T("handle other event"),e.preventManipulation&&e.preventManipulation(),l(touchPoint)}function _(e){var t=e.prototype?e.prototype.removeEventListener:e.removeEventListener;function n(e,n,o){-1!==a.indexOf(e)&&function(e,t){if(void 0===e.ontouchdown&&void 0!==e.ontouchstart)switch(t.toLowerCase()){case"touchstart":e.removeEventListener("pointerdown",function(e){g(e)});break;case"touchmove":e.removeEventListener("pointermove",function(e){g(e)});break;case"touchend":e.removeEventListener("pointerup",function(e){g(e)});break;case"touchcancel":e.removeEventListener("pointercancel",function(e){g(e)})}}(this,e),t.call(this,e,n,o)}e.prototype?e.prototype.removeEventListener=n:e.removeEventListener=n}function m(e,t){return T("checkEventRegistration"),e.__handJobjsGlobalRegisteredEvents&&e.__handJobjsGlobalRegisteredEvents[t]}function y(e,t,n,o,i,r){T("generateTouchEventProxyIfRegistered"),function(e,t){for(T("findEventRegisteredNode");e&&!m(e,t);)e=e.parentNode;return e||(m(window,t)?window:void 0)}(n,e)&&p(0,t)}function E(e){var t=[];if(e)for(t.unshift(e);e.parentNode;)t.unshift(e.parentNode),e=e.parentNode;return t}function b(e,t){for(var n=E(e),o=E(t),i=null;n.length>0&&n[0]===o.shift();)i=n.shift();return i}function T(e){r&&console.log(e.toString())}h.prototype=window.Event.prototype,"object"!==o(window.ontouchstart)&&(s.match(/iPad/i)||s.match(/iPhone/i)||s.match(/iPod/i)||s.match(/Android/i)||s.match(/MSIE/i)&&!s.match(/Touch/i)||(function(){var e="html { -ms-touch-action: none; }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}(),e=new u,t=new u,n=new u,window.CustomEvent=h,v(window),v(window.HTMLElement||window.Element),v(document),v(HTMLBodyElement),v(HTMLDivElement),v(HTMLImageElement),v(HTMLUListElement),v(HTMLAnchorElement),v(HTMLLIElement),v(HTMLTableElement),window.HTMLSpanElement&&v(HTMLSpanElement),window.HTMLCanvasElement&&v(HTMLCanvasElement),window.SVGElement&&v(SVGElement),_(window),_(window.HTMLElement||window.Element),_(document),_(HTMLBodyElement),_(HTMLDivElement),_(HTMLImageElement),_(HTMLUListElement),_(HTMLAnchorElement),_(HTMLLIElement),_(HTMLTableElement),window.HTMLSpanElement&&_(HTMLSpanElement),window.HTMLCanvasElement&&_(HTMLCanvasElement),window.SVGElement&&_(SVGElement),function(){function t(e){return"mouse"===e.pointerType||("pointerdown"===e.type&&0===e.x&&0===e.y||"pen"===e.pointerType&&0===e.pressure&&"pointermove"===e.type)}window.addEventListener("pointerdown",function(e){T("pointerdownfired");var n=e;t(e)||(c[n.identifier]=n.target,y("touchenter",n,n.target),function(e,t,n){T("dispatchPointerEnter");for(var o=b(e,t),i=e,r=[];i&&i!==o;)m(i,"touchenter")&&r.push(i),i=i.parentNode;for(;r.length>0;)n(r.pop())}(n.target,null,function(e){p(0,n)}),y("touchstart",n,n.target))}),window.addEventListener("pointerup",function(e){var n=e,o=c[n.identifier];T("pointer up fired"),t(e)||(y("touchend",n,o),y("touchleave",n,o),function(e,t,n){T("dispatchPointerLeave");for(var o=b(e,t),i=e;i&&i!==o;)m(i,"touchleave")&&n(i),i=i.parentNode}(o,null,function(e){p(0,n)}))}),window.addEventListener("pointermove",function(n){var o=n,i=c[o.identifier];T("pointer move fired"),t(n)||(T("x: "+n.screenX+", y: "+n.screenY),e.containsTouchAt(n.screenX,n.screenY)||(i&&!0===function(e){for(;e&&!e.handJobjs_forcePreventDefault;)e=e.parentNode;return!!e||window.handJobjs_forcePreventDefault}(i)&&n.preventDefault(),y("touchmove",o,i)))})}()))}()}}])}); //# sourceMappingURL=grapesjs-touch.min.js.map /*! grapesjs-parser-postcss - 0.1.1 */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["grapesjs-parser-postcss"]=e():t["grapesjs-parser-postcss"]=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=21)}([function(t,e){e.getArg=function(t,e,r){if(e in t)return t[e];if(3===arguments.length)return r;throw new Error('"'+e+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function o(t){var e=t.match(r);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function i(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}function s(t){var r=t,n=o(t);if(n){if(!n.path)return t;r=n.path}for(var s,a=e.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)"."===(s=u[c])?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return""===(r=u.join("/"))&&(r=a?"/":"."),n?(n.path=r,i(n)):r}function a(t,e){""===t&&(t="."),""===e&&(e=".");var r=o(e),a=o(t);if(a&&(t=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||e.match(n))return e;if(a&&!a.host&&!a.path)return a.host=e,i(a);var u="/"===e.charAt(0)?e:s(t.replace(/\/+$/,"")+"/"+e);return a?(a.path=u,i(a)):u}e.urlParse=o,e.urlGenerate=i,e.normalize=s,e.join=a,e.isAbsolute=function(t){return"/"===t.charAt(0)||r.test(t)},e.relative=function(t,e){""===t&&(t="."),t=t.replace(/\/$/,"");for(var r=0;0!==e.indexOf(t+"/");){var n=t.lastIndexOf("/");if(n<0)return e;if((t=t.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)};var u=!("__proto__"in Object.create(null));function l(t){return t}function c(t){if(!t)return!1;var e=t.length;if(e<9)return!1;if(95!==t.charCodeAt(e-1)||95!==t.charCodeAt(e-2)||111!==t.charCodeAt(e-3)||116!==t.charCodeAt(e-4)||111!==t.charCodeAt(e-5)||114!==t.charCodeAt(e-6)||112!==t.charCodeAt(e-7)||95!==t.charCodeAt(e-8)||95!==t.charCodeAt(e-9))return!1;for(var r=e-10;r>=0;r--)if(36!==t.charCodeAt(r))return!1;return!0}function f(t,e){return t===e?0:null===t?1:null===e?-1:t>e?1:-1}e.toSetString=u?l:function(t){return c(t)?"$"+t:t},e.fromSetString=u?l:function(t){return c(t)?t.slice(1):t},e.compareByOriginalPositions=function(t,e,r){var n=f(t.source,e.source);return 0!==n?n:0!=(n=t.originalLine-e.originalLine)?n:0!=(n=t.originalColumn-e.originalColumn)||r?n:0!=(n=t.generatedColumn-e.generatedColumn)?n:0!=(n=t.generatedLine-e.generatedLine)?n:f(t.name,e.name)},e.compareByGeneratedPositionsDeflated=function(t,e,r){var n=t.generatedLine-e.generatedLine;return 0!==n?n:0!=(n=t.generatedColumn-e.generatedColumn)||r?n:0!==(n=f(t.source,e.source))?n:0!=(n=t.originalLine-e.originalLine)?n:0!=(n=t.originalColumn-e.originalColumn)?n:f(t.name,e.name)},e.compareByGeneratedPositionsInflated=function(t,e){var r=t.generatedLine-e.generatedLine;return 0!==r?r:0!=(r=t.generatedColumn-e.generatedColumn)?r:0!==(r=f(t.source,e.source))?r:0!=(r=t.originalLine-e.originalLine)?r:0!=(r=t.originalColumn-e.originalColumn)?r:f(t.name,e.name)},e.parseSourceMapInput=function(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(t,e,r){if(e=e||"",t&&("/"!==t[t.length-1]&&"/"!==e[0]&&(t+="/"),e=t+e),r){var n=o(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var u=n.path.lastIndexOf("/");u>=0&&(n.path=n.path.substring(0,u+1))}e=a(i(n),e)}return s(e)}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.type="decl",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(2)).default);e.default=n,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n="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},o=a(r(10)),i=a(r(11)),s=a(r(3));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.raws={},e)this[r]=e[r]}return t.prototype.error=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var r=this.positionBy(e);return this.source.input.error(t,r.line,r.column,e)}return new o.default(t)},t.prototype.warn=function(t,e,r){var n={node:this};for(var o in r)n[o]=r[o];return t.warn(e,n)},t.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.prototype.toString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default;t.stringify&&(t=t.stringify);var e="";return t(this,function(t){e+=t}),e},t.prototype.clone=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function t(e,r){var o=new e.constructor;for(var i in e)if(e.hasOwnProperty(i)){var s=e[i],a=void 0===s?"undefined":n(s);"parent"===i&&"object"===a?r&&(o[i]=r):"source"===i?o[i]=s:s instanceof Array?o[i]=s.map(function(e){return t(e,o)}):("object"===a&&null!==s&&(s=t(s)),o[i]=s)}return o}(this);for(var r in t)e[r]=t[r];return e},t.prototype.cloneBefore=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertBefore(this,e),e},t.prototype.cloneAfter=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertAfter(this,e),e},t.prototype.replaceWith=function(){if(this.parent){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var s;if(o){if(i>=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var a=s;this.parent.insertBefore(this,a)}this.remove()}return this},t.prototype.next=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}},t.prototype.prev=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}},t.prototype.before=function(t){return this.parent.insertBefore(this,t),this},t.prototype.after=function(t){return this.parent.insertAfter(this,t),this},t.prototype.toJSON=function(){var t={};for(var e in this)if(this.hasOwnProperty(e)&&"parent"!==e){var r=this[e];r instanceof Array?t[e]=r.map(function(t){return"object"===(void 0===t?"undefined":n(t))&&t.toJSON?t.toJSON():t}):"object"===(void 0===r?"undefined":n(r))&&r.toJSON?t[e]=r.toJSON():t[e]=r}return t},t.prototype.raw=function(t,e){return(new i.default).raw(this,t,e)},t.prototype.root=function(){for(var t=this;t.parent;)t=t.parent;return t},t.prototype.cleanRaws=function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between},t.prototype.positionInside=function(t){for(var e=this.toString(),r=this.source.start.column,n=this.source.start.line,o=0;o<t;o++)"\n"===e[o]?(r=1,n+=1):r+=1;return{line:n,column:r}},t.prototype.positionBy=function(t){var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r=this.toString().indexOf(t.word);-1!==r&&(e=this.positionInside(r))}return e},t}();e.default=u,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(11));e.default=function(t,e){new n.default(e).stringify(t)},t.exports=e.default},function(t,e,r){(function(t){function r(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(t){return n.exec(t).slice(1)};function i(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}e.resolve=function(){for(var e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(e=s+"/"+e,n="/"===s.charAt(0))}return e=r(i(e.split("/"),function(t){return!!t}),!n).join("/"),(n?"/":"")+e||"."},e.normalize=function(t){var n=e.isAbsolute(t),o="/"===s(t,-1);return(t=r(i(t.split("/"),function(t){return!!t}),!n).join("/"))||n||(t="."),t&&o&&(t+="/"),(n?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(i(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,r){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var o=n(t.split("/")),i=n(r.split("/")),s=Math.min(o.length,i.length),a=s,u=0;u<s;u++)if(o[u]!==i[u]){a=u;break}var l=[];for(u=a;u<o.length;u++)l.push("..");return(l=l.concat(i.slice(a))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){var e=o(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},e.basename=function(t,e){var r=o(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){return o(t)[3]};var s="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,r(38))},function(t,e,r){"use strict";e.__esModule=!0;var n=i(r(42)),o=i(r(44));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){var r=new o.default(t,e),i=new n.default(r);try{i.parse()}catch(t){throw t}return i.root},t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.type="comment",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(2)).default);e.default=n,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.type="atrule",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.append=function(){var e;this.nodes||(this.nodes=[]);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.prototype.append).call.apply(e,[this].concat(n))},e.prototype.prepend=function(){var e;this.nodes||(this.nodes=[]);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.prototype.prepend).call.apply(e,[this].concat(n))},e}(function(t){return t&&t.__esModule?t:{default:t}}(r(8)).default);e.default=n,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=s(r(1)),i=s(r(6));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.push=function(t){return t.parent=this,this.nodes.push(t),this},e.prototype.each=function(t){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;if(this.indexes[e]=0,this.nodes){for(var r=void 0,n=void 0;this.indexes[e]<this.nodes.length&&(r=this.indexes[e],!1!==(n=t(this.nodes[r],r)));)this.indexes[e]+=1;return delete this.indexes[e],n}},e.prototype.walk=function(t){return this.each(function(e,r){var n=void 0;try{n=t(e,r)}catch(t){if(t.postcssNode=e,t.stack&&e.source&&/\n\s{4}at /.test(t.stack)){var o=e.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+o.input.from+":"+o.start.line+":"+o.start.column+"$&")}throw t}return!1!==n&&e.walk&&(n=e.walk(t)),n})},e.prototype.walkDecls=function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("decl"===r.type&&t.test(r.prop))return e(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("decl"===t.type)return e(t,r)}))},e.prototype.walkRules=function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("rule"===r.type&&t.test(r.selector))return e(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("rule"===t.type)return e(t,r)}))},e.prototype.walkAtRules=function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("atrule"===r.type&&t.test(r.name))return e(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("atrule"===t.type)return e(t,r)}))},e.prototype.walkComments=function(t){return this.walk(function(e,r){if("comment"===e.type)return t(e,r)})},e.prototype.append=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var s;if(o){if(i>=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var a=s,u=this.normalize(a,this.last),l=Array.isArray(u),c=0;for(u=l?u:u[Symbol.iterator]();;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if((c=u.next()).done)break;f=c.value}var p=f;this.nodes.push(p)}}return this},e.prototype.prepend=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e=e.reverse(),o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var s;if(o){if(i>=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var a=s,u=this.normalize(a,this.first,"prepend").reverse(),l=u,c=Array.isArray(l),f=0;for(l=c?l:l[Symbol.iterator]();;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if((f=l.next()).done)break;p=f.value}var h=p;this.nodes.unshift(h)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+u.length}return this},e.prototype.cleanRaws=function(e){if(t.prototype.cleanRaws.call(this,e),this.nodes){var r=this.nodes,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var i;if(n){if(o>=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}i.cleanRaws(e)}}},e.prototype.insertBefore=function(t,e){var r=0===(t=this.index(t))&&"prepend",n=this.normalize(e,this.nodes[t],r).reverse(),o=n,i=Array.isArray(o),s=0;for(o=i?o:o[Symbol.iterator]();;){var a;if(i){if(s>=o.length)break;a=o[s++]}else{if((s=o.next()).done)break;a=s.value}var u=a;this.nodes.splice(t,0,u)}var l=void 0;for(var c in this.indexes)t<=(l=this.indexes[c])&&(this.indexes[c]=l+n.length);return this},e.prototype.insertAfter=function(t,e){t=this.index(t);var r=this.normalize(e,this.nodes[t]).reverse(),n=r,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var s;if(o){if(i>=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var a=s;this.nodes.splice(t+1,0,a)}var u=void 0;for(var l in this.indexes)t<(u=this.indexes[l])&&(this.indexes[l]=u+r.length);return this},e.prototype.removeChild=function(t){t=this.index(t),this.nodes[t].parent=void 0,this.nodes.splice(t,1);var e=void 0;for(var r in this.indexes)(e=this.indexes[r])>=t&&(this.indexes[r]=e-1);return this},e.prototype.removeAll=function(){var t=this.nodes,e=Array.isArray(t),r=0;for(t=e?t:t[Symbol.iterator]();;){var n;if(e){if(r>=t.length)break;n=t[r++]}else{if((r=t.next()).done)break;n=r.value}n.parent=void 0}return this.nodes=[],this},e.prototype.replaceValues=function(t,e,r){return r||(r=e,e={}),this.walkDecls(function(n){e.props&&-1===e.props.indexOf(n.prop)||e.fast&&-1===n.value.indexOf(e.fast)||(n.value=n.value.replace(t,r))}),this},e.prototype.every=function(t){return this.nodes.every(t)},e.prototype.some=function(t){return this.nodes.some(t)},e.prototype.index=function(t){return"number"==typeof t?t:this.nodes.indexOf(t)},e.prototype.normalize=function(t,e){var n=this;if("string"==typeof t)t=function t(e){return e.map(function(e){return e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e})}(r(5)(t).nodes);else if(Array.isArray(t)){var s=t=t.slice(0),a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var l;if(a){if(u>=s.length)break;l=s[u++]}else{if((u=s.next()).done)break;l=u.value}var c=l;c.parent&&c.parent.removeChild(c,"ignore")}}else if("root"===t.type){var f=t=t.nodes.slice(0),p=Array.isArray(f),h=0;for(f=p?f:f[Symbol.iterator]();;){var d;if(p){if(h>=f.length)break;d=f[h++]}else{if((h=f.next()).done)break;d=h.value}var g=d;g.parent&&g.parent.removeChild(g,"ignore")}}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new o.default(t)]}else if(t.selector){t=[new(r(9))(t)]}else if(t.name){t=[new(r(7))(t)]}else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new i.default(t)]}return t.map(function(t){return t.parent&&t.parent.removeChild(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/[^\s]/g,"")),t.parent=n,t})},n(e,[{key:"first",get:function(){if(this.nodes)return this.nodes[0]}},{key:"last",get:function(){if(this.nodes)return this.nodes[this.nodes.length-1]}}]),e}(s(r(2)).default);e.default=a,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=s(r(8)),i=s(r(19));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.type="rule",n.nodes||(n.nodes=[]),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"selectors",get:function(){return i.default.comma(this.selector)},set:function(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}}]),e}(o.default);e.default=a,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=s(r(24)),o=s(r(25)),i=s(r(26));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e,r,n,o,i,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),o&&(this.source=o),s&&(this.plugin=s),void 0!==r&&void 0!==n&&(this.line=r,this.column=n),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}return t.prototype.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},t.prototype.showSourceCode=function(t){var e=this;if(!this.source)return"";var r=this.source;i.default&&(void 0===t&&(t=n.default.stdout),t&&(r=(0,i.default)(r)));var s=r.split(/\r?\n/),a=Math.max(this.line-3,0),u=Math.min(this.line+2,s.length),l=String(u).length;function c(e){return t&&o.default.red?o.default.red.bold(e):e}function f(e){return t&&o.default.gray?o.default.gray(e):e}return s.slice(a,u).map(function(t,r){var n=a+1+r,o=" "+(" "+n).slice(-l)+" | ";if(n===e.line){var i=f(o.replace(/\d/g," "))+t.slice(0,e.column-1).replace(/[^\t]/g," ");return c(">")+f(o)+t+"\n "+i+c("^")}return" "+f(o)+t}).join("\n")},t.prototype.toString=function(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t},t}();e.default=a,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" "};var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.builder=e}return t.prototype.stringify=function(t,e){this[t.type](t,e)},t.prototype.root=function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)},t.prototype.comment=function(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)},t.prototype.decl=function(t,e){var r=this.raw(t,"between","colon"),n=t.prop+r+this.rawValue(t,"value");t.important&&(n+=t.raws.important||" !important"),e&&(n+=";"),this.builder(n,t)},t.prototype.rule=function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")},t.prototype.atrule=function(t,e){var r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{var o=(t.raws.between||"")+(e?";":"");this.builder(r+n+o,t)}},t.prototype.body=function(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),n=0;n<t.nodes.length;n++){var o=t.nodes[n],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,e!==n||r)}},t.prototype.block=function(t,e){var r=this.raw(t,"between","beforeOpen");this.builder(e+r+"{",t,"start");var n=void 0;t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")},t.prototype.raw=function(t,e,r){var o=void 0;if(r||(r=e),e&&void 0!==(o=t.raws[e]))return o;var i=t.parent;if("before"===r&&(!i||"root"===i.type&&i.first===t))return"";if(!i)return n[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a="raw"+function(t){return t[0].toUpperCase()+t.slice(1)}(r);return this[a]?o=this[a](s,t):s.walk(function(t){if(void 0!==(o=t.raws[e]))return!1}),void 0===o&&(o=n[r]),s.rawCache[r]=o,o},t.prototype.rawSemicolon=function(t){var e=void 0;return t.walk(function(t){if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e},t.prototype.rawEmptyBody=function(t){var e=void 0;return t.walk(function(t){if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e},t.prototype.rawIndent=function(t){if(t.raws.indent)return t.raws.indent;var e=void 0;return t.walk(function(r){var n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==r.raws.before){var o=r.raws.before.split("\n");return e=(e=o[o.length-1]).replace(/[^\s]/g,""),!1}}),e},t.prototype.rawBeforeComment=function(t,e){var r=void 0;return t.walkComments(function(t){if(void 0!==t.raws.before)return-1!==(r=t.raws.before).indexOf("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/[^\s]/g,"")),r},t.prototype.rawBeforeDecl=function(t,e){var r=void 0;return t.walkDecls(function(t){if(void 0!==t.raws.before)return-1!==(r=t.raws.before).indexOf("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/[^\s]/g,"")),r},t.prototype.rawBeforeRule=function(t){var e=void 0;return t.walk(function(r){if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return-1!==(e=r.raws.before).indexOf("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/[^\s]/g,"")),e},t.prototype.rawBeforeClose=function(t){var e=void 0;return t.walk(function(t){if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return-1!==(e=t.raws.after).indexOf("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/[^\s]/g,"")),e},t.prototype.rawBeforeOpen=function(t){var e=void 0;return t.walk(function(t){if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e},t.prototype.rawColon=function(t){var e=void 0;return t.walkDecls(function(t){if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e},t.prototype.beforeAfter=function(t,e){var r=void 0;r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var n=t.parent,o=0;n&&"root"!==n.type;)o+=1,n=n.parent;if(-1!==r.indexOf("\n")){var i=this.raw(t,null,"indent");if(i.length)for(var s=0;s<o;s++)r+=i}return r},t.prototype.rawValue=function(t,e){var r=t[e],n=t.raws[e];return n&&n.value===r?n.raw:r},t}();e.default=o,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n="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},o=function(t){return t&&t.__esModule?t:{default:t}}(r(13));var i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.version="7.0.2",this.plugins=this.normalize(e)}return t.prototype.use=function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this},t.prototype.process=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0===this.plugins.length&&(e.parser,e.stringifier),new o.default(this,t,e)}),t.prototype.normalize=function(t){var e=[],r=t,o=Array.isArray(r),i=0;for(r=o?r:r[Symbol.iterator]();;){var s;if(o){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(a.postcss&&(a=a.postcss),"object"===(void 0===a?"undefined":n(a))&&Array.isArray(a.plugins))e=e.concat(a.plugins);else if("function"==typeof a)e.push(a);else{if("object"!==(void 0===a?"undefined":n(a))||!a.parse&&!a.stringify)throw new Error(a+" is not a PostCSS plugin")}}return e},t}();e.default=i,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o="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},i=l(r(27)),s=l(r(3)),a=(l(r(39)),l(r(40))),u=l(r(5));function l(t){return t&&t.__esModule?t:{default:t}}function c(t){return"object"===(void 0===t?"undefined":o(t))&&"function"==typeof t.then}var f=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.stringified=!1,this.processed=!1;var i=void 0;if("object"===(void 0===r?"undefined":o(r))&&null!==r&&"root"===r.type)i=r;else if(r instanceof t||r instanceof a.default)i=r.root,r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var s=u.default;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{i=s(r,n)}catch(t){this.error=t}}this.result=new a.default(e,i,n)}return t.prototype.warnings=function(){return this.sync().warnings()},t.prototype.toString=function(){return this.css},t.prototype.then=function(t,e){return this.async().then(t,e)},t.prototype.catch=function(t){return this.async().catch(t)},t.prototype.finally=function(t){return this.async().then(t,t)},t.prototype.handleError=function(t,e){try{if(this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(e.postcssVersion);}else t.plugin=e.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}},t.prototype.asyncTick=function(t,e){var r=this;if(this.plugin>=this.processor.plugins.length)return this.processed=!0,t();try{var n=this.processor.plugins[this.plugin],o=this.run(n);this.plugin+=1,c(o)?o.then(function(){r.asyncTick(t,e)}).catch(function(t){r.handleError(t,n),r.processed=!0,e(t)}):this.asyncTick(t,e)}catch(t){this.processed=!0,e(t)}},t.prototype.async=function(){var t=this;return this.processed?new Promise(function(e,r){t.error?r(t.error):e(t.stringify())}):this.processing?this.processing:(this.processing=new Promise(function(e,r){if(t.error)return r(t.error);t.plugin=0,t.asyncTick(e,r)}).then(function(){return t.processed=!0,t.stringify()}),this.processing)},t.prototype.sync=function(){if(this.processed)return this.result;if(this.processed=!0,this.processing)throw new Error("Use process(css).then(cb) to work with async plugins");if(this.error)throw this.error;var t=this.result.processor.plugins,e=Array.isArray(t),r=0;for(t=e?t:t[Symbol.iterator]();;){var n;if(e){if(r>=t.length)break;n=t[r++]}else{if((r=t.next()).done)break;n=r.value}var o=n;if(c(this.run(o)))throw new Error("Use process(css).then(cb) to work with async plugins")}return this.result},t.prototype.run=function(t){this.result.lastPlugin=t;try{return t(this.result.root,this.result)}catch(e){throw this.handleError(e,t),e}},t.prototype.stringify=function(){if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=s.default;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new i.default(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},n(t,[{key:"processor",get:function(){return this.result.processor}},{key:"opts",get:function(){return this.result.opts}},{key:"css",get:function(){return this.stringify().css}},{key:"content",get:function(){return this.stringify().content}},{key:"map",get:function(){return this.stringify().map}},{key:"root",get:function(){return this.sync().root}},{key:"messages",get:function(){return this.sync().messages}}]),t}();e.default=f,t.exports=e.default},function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ var n=r(29),o=r(30),i=r(31);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return l(this,t,e,r)}function l(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=p(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),o=(t=a(t,n)).write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|h(e.length);return 0===(t=a(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?a(t,0):p(t,e);if("Buffer"===e.type&&i(e.data))return p(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(c(e),t=a(t,e<0?0:0|h(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function p(t,e){var r=e.length<0?0:0|h(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,o){var i,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var c=-1;for(i=r;i<a;i++)if(l(t,i)===l(e,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===u)return c*s}else-1!==c&&(i-=i-c),c=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var f=!0,p=0;p<u;p++)if(l(t,i+p)!==l(e,p)){f=!1;break}if(f)return i}return-1}function v(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function w(t,e,r,n){return z(F(e,t.length-r),t,r,n)}function b(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function _(t,e,r,n){return b(t,e,r,n)}function A(t,e,r,n){return z(Y(e),t,r,n)}function S(t,e,r,n){return z(function(t,e){for(var r,n,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function C(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,a,u,l=t[o],c=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&l)<<6|63&i)>127&&(c=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&l)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=f}return function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=O));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return l(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return c(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return f(null,t)},u.allocUnsafeSlow=function(t){return f(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return C(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var i=o-n,s=r-e,a=Math.min(i,s),l=this.slice(n,o),c=t.slice(e,r),f=0;f<a;++f)if(l[f]!==c[f]){i=l[f],s=c[f];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function M(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function x(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=N(t[i]);return o}function k(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function T(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function B(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function j(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,i){return i||j(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,i){return i||j(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var o=e-t;r=new u(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<r&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var s=u.isBuffer(t)?t:F(new u(t,n).toString()),a=s.length;for(i=0;i<r-e;++i)this[i+e]=s[i%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Y(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,r(28))},function(t,e,r){e.SourceMapGenerator=r(16).SourceMapGenerator,e.SourceMapConsumer=r(34).SourceMapConsumer,e.SourceNode=r(37).SourceNode},function(t,e,r){var n=r(17),o=r(0),i=r(18).ArraySet,s=r(33).MappingList;function a(t){t||(t={}),this._file=o.getArg(t,"file",null),this._sourceRoot=o.getArg(t,"sourceRoot",null),this._skipValidation=o.getArg(t,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new s,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(t){var e=t.sourceRoot,r=new a({file:t.file,sourceRoot:e});return t.eachMapping(function(t){var n={generated:{line:t.generatedLine,column:t.generatedColumn}};null!=t.source&&(n.source=t.source,null!=e&&(n.source=o.relative(e,n.source)),n.original={line:t.originalLine,column:t.originalColumn},null!=t.name&&(n.name=t.name)),r.addMapping(n)}),t.sources.forEach(function(n){var i=n;null!==e&&(i=o.relative(e,n)),r._sources.has(i)||r._sources.add(i);var s=t.sourceContentFor(n);null!=s&&r.setSourceContent(n,s)}),r},a.prototype.addMapping=function(t){var e=o.getArg(t,"generated"),r=o.getArg(t,"original",null),n=o.getArg(t,"source",null),i=o.getArg(t,"name",null);this._skipValidation||this._validateMapping(e,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},a.prototype.setSourceContent=function(t,e){var r=t;null!=this._sourceRoot&&(r=o.relative(this._sourceRoot,r)),null!=e?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(r)]=e):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},a.prototype.applySourceMap=function(t,e,r){var n=e;if(null==e){if(null==t.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=t.file}var s=this._sourceRoot;null!=s&&(n=o.relative(s,n));var a=new i,u=new i;this._mappings.unsortedForEach(function(e){if(e.source===n&&null!=e.originalLine){var i=t.originalPositionFor({line:e.originalLine,column:e.originalColumn});null!=i.source&&(e.source=i.source,null!=r&&(e.source=o.join(r,e.source)),null!=s&&(e.source=o.relative(s,e.source)),e.originalLine=i.line,e.originalColumn=i.column,null!=i.name&&(e.name=i.name))}var l=e.source;null==l||a.has(l)||a.add(l);var c=e.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=o.join(r,e)),null!=s&&(e=o.relative(s,e)),this.setSourceContent(e,n))},this)},a.prototype._validateMapping=function(t,e,r,n){if(e&&"number"!=typeof e.line&&"number"!=typeof e.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0)||e||r||n)&&!(t&&"line"in t&&"column"in t&&e&&"line"in e&&"column"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:r,original:e,name:n}))},a.prototype._serializeMappings=function(){for(var t,e,r,i,s=0,a=1,u=0,l=0,c=0,f=0,p="",h=this._mappings.toArray(),d=0,g=h.length;d<g;d++){if(t="",(e=h[d]).generatedLine!==a)for(s=0;e.generatedLine!==a;)t+=";",a++;else if(d>0){if(!o.compareByGeneratedPositionsInflated(e,h[d-1]))continue;t+=","}t+=n.encode(e.generatedColumn-s),s=e.generatedColumn,null!=e.source&&(i=this._sources.indexOf(e.source),t+=n.encode(i-f),f=i,t+=n.encode(e.originalLine-1-l),l=e.originalLine-1,t+=n.encode(e.originalColumn-u),u=e.originalColumn,null!=e.name&&(r=this._names.indexOf(e.name),t+=n.encode(r-c),c=r)),p+=t}return p},a.prototype._generateSourcesContent=function(t,e){return t.map(function(t){if(!this._sourcesContents)return null;null!=e&&(t=o.relative(e,t));var r=o.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(t.file=this._file),null!=this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=a},function(t,e,r){var n=r(32);e.encode=function(t){var e,r="",o=function(t){return t<0?1+(-t<<1):0+(t<<1)}(t);do{e=31&o,(o>>>=5)>0&&(e|=32),r+=n.encode(e)}while(o>0);return r},e.decode=function(t,e,r){var o,i,s=t.length,a=0,u=0;do{if(e>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=n.decode(t.charCodeAt(e++))))throw new Error("Invalid base64 digit: "+t.charAt(e-1));o=!!(32&i),a+=(i&=31)<<u,u+=5}while(o);r.value=function(t){var e=t>>1;return 1==(1&t)?-e:e}(a),r.rest=e}},function(t,e,r){var n=r(0),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function s(){this._array=[],this._set=i?new Map:Object.create(null)}s.fromArray=function(t,e){for(var r=new s,n=0,o=t.length;n<o;n++)r.add(t[n],e);return r},s.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},s.prototype.add=function(t,e){var r=i?t:n.toSetString(t),s=i?this.has(t):o.call(this._set,r),a=this._array.length;s&&!e||this._array.push(t),s||(i?this._set.set(t,a):this._set[r]=a)},s.prototype.has=function(t){if(i)return this._set.has(t);var e=n.toSetString(t);return o.call(this._set,e)},s.prototype.indexOf=function(t){if(i){var e=this._set.get(t);if(e>=0)return e}else{var r=n.toSetString(t);if(o.call(this._set,r))return this._set[r]}throw new Error('"'+t+'" is not in the set.')},s.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},s.prototype.toArray=function(){return this._array.slice()},e.ArraySet=s},function(t,e,r){"use strict";e.__esModule=!0;var n={split:function(t,e,r){for(var n=[],o="",i=!1,s=0,a=!1,u=!1,l=0;l<t.length;l++){var c=t[l];a?u?u=!1:"\\"===c?u=!0:c===a&&(a=!1):'"'===c||"'"===c?a=c:"("===c?s+=1:")"===c?s>0&&(s-=1):0===s&&-1!==e.indexOf(c)&&(i=!0),i?(""!==o&&n.push(o.trim()),o="",i=!1):o+=c}return(r||""!==o)&&n.push(o.trim()),n},space:function(t){return n.split(t,[" ","\n","\t"])},comma:function(t){return n.split(t,[","],!0)}};e.default=n,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.type="root",n.nodes||(n.nodes=[]),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.removeChild=function(e,r){var n=this.index(e);return!r&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),t.prototype.removeChild.call(this,e)},e.prototype.normalize=function(e,r,n){var o=t.prototype.normalize.call(this,e);if(r)if("prepend"===n)this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r){var i=o,s=Array.isArray(i),a=0;for(i=s?i:i[Symbol.iterator]();;){var u;if(s){if(a>=i.length)break;u=i[a++]}else{if((a=i.next()).done)break;u=a.value}u.raws.before=r.raws.before}}return o},e.prototype.toResult=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new(r(13))(new(r(12)),this,t).stringify()},e}(function(t){return t&&t.__esModule?t:{default:t}}(r(8)).default);e.default=n,t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=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},o=function(t){return t&&t.__esModule?t:{default:t}}(r(22));e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n({},e);t.setCustomParserCss(o.default)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createAtRule=e.createRule=e.log=void 0;var n=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},o=function(t){return t&&t.__esModule?t:{default:t}}(r(23));var i=e.log=function(t,e){return t&&t.log(e,{ns:"parser-poscss"})},s=e.createRule=function(t){var e={};return(t.nodes||[]).forEach(function(t){var r=t.prop,n=t.value,o=t.important;e[r]=n+(o?" !important":"")}),{selectors:t.selector||"",style:e}},a=e.createAtRule=function(t,e){var r=t.name,o=t.params;["media","keyframes"].indexOf(r)>=0?t.nodes.forEach(function(t){e.push(n({},s(t),{atRule:r,params:o}))}):e.push(n({},s(t),{atRule:r}))};e.default=function(t,e){var r=[];i(e,["Input CSS",t]);var n=o.default.parse(t);return i(e,["PostCSS AST",n]),n.nodes.forEach(function(t){switch(t.type){case"rule":r.push(s(t));break;case"atrule":a(t,r)}}),i(e,["Output",r]),r}},function(t,e,r){"use strict";e.__esModule=!0;var n=h(r(1)),o=h(r(12)),i=h(r(3)),s=h(r(6)),a=h(r(7)),u=h(r(47)),l=h(r(5)),c=h(r(19)),f=h(r(9)),p=h(r(20));function h(t){return t&&t.__esModule?t:{default:t}}function d(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new o.default(e)}d.plugin=function(t,e){function r(){var r=e.apply(void 0,arguments);return r.postcssPlugin=t,r.postcssVersion=(new o.default).version,r}var n=void 0;return Object.defineProperty(r,"postcss",{get:function(){return n||(n=r()),n}}),r.process=function(t,e,n){return d([r(n)]).process(t,e)},r},d.stringify=i.default,d.parse=l.default,d.vendor=u.default,d.list=c.default,d.comment=function(t){return new s.default(t)},d.atRule=function(t){return new a.default(t)},d.decl=function(t){return new n.default(t)},d.rule=function(t){return new f.default(t)},d.root=function(t){return new p.default(t)},e.default=d,t.exports=e.default},function(t,e){},function(t,e){},function(t,e){},function(t,e,r){"use strict";(function(n){e.__esModule=!0;var o=s(r(15)),i=s(r(4));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n}return t.prototype.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},t.prototype.previous=function(){var t=this;return this.previousMaps||(this.previousMaps=[],this.root.walk(function(e){if(e.source&&e.source.input.map){var r=e.source.input.map;-1===t.previousMaps.indexOf(r)&&t.previousMaps.push(r)}})),this.previousMaps},t.prototype.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(function(t){return t.inline}))},t.prototype.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(t){return t.withContent()})},t.prototype.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)for(var t=void 0,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e)},t.prototype.setSourcesContent=function(){var t=this,e={};this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!e[n]){e[n]=!0;var o=t.relative(n);t.map.setSourceContent(o,r.source.input.css)}}})},t.prototype.applyPrevMaps=function(){var t=this.previous(),e=Array.isArray(t),r=0;for(t=e?t:t[Symbol.iterator]();;){var n;if(e){if(r>=t.length)break;n=t[r++]}else{if((r=t.next()).done)break;n=r.value}var s=n,a=this.relative(s.file),u=s.root||i.default.dirname(s.file),l=void 0;!1===this.mapOpts.sourcesContent?(l=new o.default.SourceMapConsumer(s.text)).sourcesContent&&(l.sourcesContent=l.sourcesContent.map(function(){return null})):l=s.consumer(),this.map.applySourceMap(l,a,this.relative(u))}},t.prototype.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(t){return t.annotation}))},t.prototype.toBase64=function(t){return n?n.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))},t.prototype.addAnnotation=function(){var t=void 0;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:this.outputFile()+".map";var e="\n";-1!==this.css.indexOf("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"},t.prototype.outputFile=function(){return this.opts.to?this.relative(this.opts.to):this.opts.from?this.relative(this.opts.from):"to.css"},t.prototype.generateMap=function(){return this.generateString(),this.isSourcesContent()&&this.setSourcesContent(),this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.prototype.relative=function(t){if(0===t.indexOf("<"))return t;if(/^\w+:\/\//.test(t))return t;var e=this.opts.to?i.default.dirname(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(e=i.default.dirname(i.default.resolve(e,this.mapOpts.annotation))),t=i.default.relative(e,t),"\\"===i.default.sep?t.replace(/\\/g,"/"):t},t.prototype.sourcePath=function(t){return this.mapOpts.from?this.mapOpts.from:this.relative(t.source.input.from)},t.prototype.generateString=function(){var t=this;this.css="",this.map=new o.default.SourceMapGenerator({file:this.outputFile()});var e=1,r=1,n=void 0,i=void 0;this.stringify(this.root,function(o,s,a){t.css+=o,s&&"end"!==a&&(s.source&&s.source.start?t.map.addMapping({source:t.sourcePath(s),generated:{line:e,column:r-1},original:{line:s.source.start.line,column:s.source.start.column-1}}):t.map.addMapping({source:"<no source>",original:{line:1,column:0},generated:{line:e,column:r-1}})),(n=o.match(/\n/g))?(e+=n.length,i=o.lastIndexOf("\n"),r=o.length-i):r+=o.length,s&&"start"!==a&&(s.source&&s.source.end?t.map.addMapping({source:t.sourcePath(s),generated:{line:e,column:r-1},original:{line:s.source.end.line,column:s.source.end.column}}):t.map.addMapping({source:"<no source>",original:{line:1,column:0},generated:{line:e,column:r-1}}))})},t.prototype.generate=function(){if(this.clearAnnotation(),this.isMap())return this.generateMap();var t="";return this.stringify(this.root,function(e){t+=e}),[t]},t}();e.default=a,t.exports=e.default}).call(this,r(14).Buffer)},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){for(var e,r=l(t),n=r[0],s=r[1],a=new i(function(t,e,r){return 3*(e+r)/4-r}(0,n,s)),u=0,c=s>0?n-4:n,f=0;f<c;f+=4)e=o[t.charCodeAt(f)]<<18|o[t.charCodeAt(f+1)]<<12|o[t.charCodeAt(f+2)]<<6|o[t.charCodeAt(f+3)],a[u++]=e>>16&255,a[u++]=e>>8&255,a[u++]=255&e;2===s&&(e=o[t.charCodeAt(f)]<<2|o[t.charCodeAt(f+1)]>>4,a[u++]=255&e);1===s&&(e=o[t.charCodeAt(f)]<<10|o[t.charCodeAt(f+1)]<<4|o[t.charCodeAt(f+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e);return a},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=0,a=r-o;s<a;s+=16383)i.push(f(t,s,s+16383>a?a:s+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],o[s.charCodeAt(a)]=a;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function f(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(c(n));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,l=u>>1,c=-7,f=r?o-1:0,p=r?-1:1,h=t[e+f];for(f+=p,i=h&(1<<-c)-1,h>>=-c,c+=a;c>0;i=256*i+t[e+f],f+=p,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+t[e+f],f+=p,c-=8);if(0===i)i=1-l;else{if(i===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=l}return(h?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,u,l=8*i-o-1,c=(1<<l)-1,f=c>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(e*u-1)*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[r+h]=255&a,h+=d,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;t[r+h]=255&s,h+=d,s/=256,l-=8);t[r+h-d]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(t){if(0<=t&&t<r.length)return r[t];throw new TypeError("Must be between 0 and 63: "+t)},e.decode=function(t){return 65<=t&&t<=90?t-65:97<=t&&t<=122?t-97+26:48<=t&&t<=57?t-48+52:43==t?62:47==t?63:-1}},function(t,e,r){var n=r(0);function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)},o.prototype.add=function(t){!function(t,e){var r=t.generatedLine,o=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return o>r||o==r&&s>=i||n.compareByGeneratedPositionsInflated(t,e)<=0}(this._last,t)?(this._sorted=!1,this._array.push(t)):(this._last=t,this._array.push(t))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=o},function(t,e,r){var n=r(0),o=r(35),i=r(18).ArraySet,s=r(17),a=r(36).quickSort;function u(t,e){var r=t;return"string"==typeof t&&(r=n.parseSourceMapInput(t)),null!=r.sections?new f(r,e):new l(r,e)}function l(t,e){var r=t;"string"==typeof t&&(r=n.parseSourceMapInput(t));var o=n.getArg(r,"version"),s=n.getArg(r,"sources"),a=n.getArg(r,"names",[]),u=n.getArg(r,"sourceRoot",null),l=n.getArg(r,"sourcesContent",null),c=n.getArg(r,"mappings"),f=n.getArg(r,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);u&&(u=n.normalize(u)),s=s.map(String).map(n.normalize).map(function(t){return u&&n.isAbsolute(u)&&n.isAbsolute(t)?n.relative(u,t):t}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(t){return n.computeSourceURL(u,t,e)}),this.sourceRoot=u,this.sourcesContent=l,this._mappings=c,this._sourceMapURL=e,this.file=f}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function f(t,e){var r=t;"string"==typeof t&&(r=n.parseSourceMapInput(t));var o=n.getArg(r,"version"),s=n.getArg(r,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new i,this._names=new i;var a={line:-1,column:0};this._sections=s.map(function(t){if(t.url)throw new Error("Support for url field in sections not implemented.");var r=n.getArg(t,"offset"),o=n.getArg(r,"line"),i=n.getArg(r,"column");if(o<a.line||o===a.line&&i<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=r,{generatedOffset:{generatedLine:o+1,generatedColumn:i+1},consumer:new u(n.getArg(t,"map"),e)}})}u.fromSourceMap=function(t,e){return l.fromSourceMap(t,e)},u.prototype._version=3,u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),u.prototype._charIsMappingSeparator=function(t,e){var r=t.charAt(e);return";"===r||","===r},u.prototype._parseMappings=function(t,e){throw new Error("Subclasses must implement _parseMappings")},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2,u.prototype.eachMapping=function(t,e,r){var o,i=e||null;switch(r||u.GENERATED_ORDER){case u.GENERATED_ORDER:o=this._generatedMappings;break;case u.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;o.map(function(t){var e=null===t.source?null:this._sources.at(t.source);return{source:e=n.computeSourceURL(s,e,this._sourceMapURL),generatedLine:t.generatedLine,generatedColumn:t.generatedColumn,originalLine:t.originalLine,originalColumn:t.originalColumn,name:null===t.name?null:this._names.at(t.name)}},this).forEach(t,i)},u.prototype.allGeneratedPositionsFor=function(t){var e=n.getArg(t,"line"),r={source:n.getArg(t,"source"),originalLine:e,originalColumn:n.getArg(t,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,o.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(void 0===t.column)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var l=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==l;)i.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i},e.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.prototype._findSourceIndex=function(t){var e,r=t;if(null!=this.sourceRoot&&(r=n.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==t)return e;return-1},l.fromSourceMap=function(t,e){var r=Object.create(l.prototype),o=r._names=i.fromArray(t._names.toArray(),!0),s=r._sources=i.fromArray(t._sources.toArray(),!0);r.sourceRoot=t._sourceRoot,r.sourcesContent=t._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=t._file,r._sourceMapURL=e,r._absoluteSources=r._sources.toArray().map(function(t){return n.computeSourceURL(r.sourceRoot,t,e)});for(var u=t._mappings.toArray().slice(),f=r.__generatedMappings=[],p=r.__originalMappings=[],h=0,d=u.length;h<d;h++){var g=u[h],y=new c;y.generatedLine=g.generatedLine,y.generatedColumn=g.generatedColumn,g.source&&(y.source=s.indexOf(g.source),y.originalLine=g.originalLine,y.originalColumn=g.originalColumn,g.name&&(y.name=o.indexOf(g.name)),p.push(y)),f.push(y)}return a(r.__originalMappings,n.compareByOriginalPositions),r},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),l.prototype._parseMappings=function(t,e){for(var r,o,i,u,l,f=1,p=0,h=0,d=0,g=0,y=0,m=t.length,v=0,w={},b={},_=[],A=[];v<m;)if(";"===t.charAt(v))f++,v++,p=0;else if(","===t.charAt(v))v++;else{for((r=new c).generatedLine=f,u=v;u<m&&!this._charIsMappingSeparator(t,u);u++);if(i=w[o=t.slice(v,u)])v+=o.length;else{for(i=[];v<u;)s.decode(t,v,b),l=b.value,v=b.rest,i.push(l);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");w[o]=i}r.generatedColumn=p+i[0],p=r.generatedColumn,i.length>1&&(r.source=g+i[1],g+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&_.push(r)}a(A,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,a(_,n.compareByOriginalPositions),this.__originalMappings=_},l.prototype._findMapping=function(t,e,r,n,i,s){if(t[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[r]);if(t[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[n]);return o.search(t,e,i,s)},l.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var e=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var r=this._generatedMappings[t+1];if(e.generatedLine===r.generatedLine){e.lastGeneratedColumn=r.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(t){var e={generatedLine:n.getArg(t,"line"),generatedColumn:n.getArg(t,"column")},r=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(t,"bias",u.GREATEST_LOWER_BOUND));if(r>=0){var o=this._generatedMappings[r];if(o.generatedLine===e.generatedLine){var i=n.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=n.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=n.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:n.getArg(o,"originalLine",null),column:n.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return null==t}))},l.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;var r=this._findSourceIndex(t);if(r>=0)return this.sourcesContent[r];var o,i=t;if(null!=this.sourceRoot&&(i=n.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=n.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(e)return null;throw new Error('"'+i+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(t){var e=n.getArg(t,"source");if((e=this._findSourceIndex(e))<0)return{line:null,column:null,lastColumn:null};var r={source:e,originalLine:n.getArg(t,"line"),originalColumn:n.getArg(t,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(t,"bias",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:n.getArg(i,"generatedLine",null),column:n.getArg(i,"generatedColumn",null),lastColumn:n.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=l,f.prototype=Object.create(u.prototype),f.prototype.constructor=u,f.prototype._version=3,Object.defineProperty(f.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}}),f.prototype.originalPositionFor=function(t){var e={generatedLine:n.getArg(t,"line"),generatedColumn:n.getArg(t,"column")},r=o.search(e,this._sections,function(t,e){var r=t.generatedLine-e.generatedOffset.generatedLine;return r||t.generatedColumn-e.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:e.generatedLine-(i.generatedOffset.generatedLine-1),column:e.generatedColumn-(i.generatedOffset.generatedLine===e.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},f.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},f.prototype.sourceContentFor=function(t,e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(t,!0);if(n)return n}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},f.prototype.generatedPositionFor=function(t){for(var e=0;e<this._sections.length;e++){var r=this._sections[e];if(-1!==r.consumer._findSourceIndex(n.getArg(t,"source"))){var o=r.consumer.generatedPositionFor(t);if(o)return{line:o.line+(r.generatedOffset.generatedLine-1),column:o.column+(r.generatedOffset.generatedLine===o.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},f.prototype._parseMappings=function(t,e){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var o=this._sections[r],i=o.consumer._generatedMappings,s=0;s<i.length;s++){var u=i[s],l=o.consumer._sources.at(u.source);l=n.computeSourceURL(o.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;u.name&&(c=o.consumer._names.at(u.name),this._names.add(c),c=this._names.indexOf(c));var f={source:l,generatedLine:u.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(o.generatedOffset.generatedLine===u.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:c};this.__generatedMappings.push(f),"number"==typeof f.originalLine&&this.__originalMappings.push(f)}a(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),a(this.__originalMappings,n.compareByOriginalPositions)},e.IndexedSourceMapConsumer=f},function(t,e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(t,r,n,o){if(0===r.length)return-1;var i=function t(r,n,o,i,s,a){var u=Math.floor((n-r)/2)+r,l=s(o,i[u],!0);return 0===l?u:l>0?n-u>1?t(u,n,o,i,s,a):a==e.LEAST_UPPER_BOUND?n<i.length?n:-1:u:u-r>1?t(r,u,o,i,s,a):a==e.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,t,r,n,o||e.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===n(r[i],r[i-1],!0);)--i;return i}},function(t,e){function r(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function n(t,e,o,i){if(o<i){var s=o-1;r(t,function(t,e){return Math.round(t+Math.random()*(e-t))}(o,i),i);for(var a=t[i],u=o;u<i;u++)e(t[u],a)<=0&&r(t,s+=1,u);r(t,s+1,u);var l=s+1;n(t,e,o,l-1),n(t,e,l+1,i)}}e.quickSort=function(t,e){n(t,e,0,t.length-1)}},function(t,e,r){var n=r(16).SourceMapGenerator,o=r(0),i=/(\r?\n)/,s="$$$isSourceNode$$$";function a(t,e,r,n,o){this.children=[],this.sourceContents={},this.line=null==t?null:t,this.column=null==e?null:e,this.source=null==r?null:r,this.name=null==o?null:o,this[s]=!0,null!=n&&this.add(n)}a.fromStringWithSourceMap=function(t,e,r){var n=new a,s=t.split(i),u=0,l=function(){return t()+(t()||"");function t(){return u<s.length?s[u++]:void 0}},c=1,f=0,p=null;return e.eachMapping(function(t){if(null!==p){if(!(c<t.generatedLine)){var e=(r=s[u]||"").substr(0,t.generatedColumn-f);return s[u]=r.substr(t.generatedColumn-f),f=t.generatedColumn,h(p,e),void(p=t)}h(p,l()),c++,f=0}for(;c<t.generatedLine;)n.add(l()),c++;if(f<t.generatedColumn){var r=s[u]||"";n.add(r.substr(0,t.generatedColumn)),s[u]=r.substr(t.generatedColumn),f=t.generatedColumn}p=t},this),u<s.length&&(p&&h(p,l()),n.add(s.splice(u).join(""))),e.sources.forEach(function(t){var i=e.sourceContentFor(t);null!=i&&(null!=r&&(t=o.join(r,t)),n.setSourceContent(t,i))}),n;function h(t,e){if(null===t||void 0===t.source)n.add(e);else{var i=r?o.join(r,t.source):t.source;n.add(new a(t.originalLine,t.originalColumn,i,e,t.name))}}},a.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(t){this.add(t)},this);else{if(!t[s]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);t&&this.children.push(t)}return this},a.prototype.prepend=function(t){if(Array.isArray(t))for(var e=t.length-1;e>=0;e--)this.prepend(t[e]);else{if(!t[s]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);this.children.unshift(t)}return this},a.prototype.walk=function(t){for(var e,r=0,n=this.children.length;r<n;r++)(e=this.children[r])[s]?e.walk(t):""!==e&&t(e,{source:this.source,line:this.line,column:this.column,name:this.name})},a.prototype.join=function(t){var e,r,n=this.children.length;if(n>0){for(e=[],r=0;r<n-1;r++)e.push(this.children[r]),e.push(t);e.push(this.children[r]),this.children=e}return this},a.prototype.replaceRight=function(t,e){var r=this.children[this.children.length-1];return r[s]?r.replaceRight(t,e):"string"==typeof r?this.children[this.children.length-1]=r.replace(t,e):this.children.push("".replace(t,e)),this},a.prototype.setSourceContent=function(t,e){this.sourceContents[o.toSetString(t)]=e},a.prototype.walkSourceContents=function(t){for(var e=0,r=this.children.length;e<r;e++)this.children[e][s]&&this.children[e].walkSourceContents(t);var n=Object.keys(this.sourceContents);for(e=0,r=n.length;e<r;e++)t(o.fromSetString(n[e]),this.sourceContents[n[e]])},a.prototype.toString=function(){var t="";return this.walk(function(e){t+=e}),t},a.prototype.toStringWithSourceMap=function(t){var e={code:"",line:1,column:0},r=new n(t),o=!1,i=null,s=null,a=null,u=null;return this.walk(function(t,n){e.code+=t,null!==n.source&&null!==n.line&&null!==n.column?(i===n.source&&s===n.line&&a===n.column&&u===n.name||r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:e.line,column:e.column},name:n.name}),i=n.source,s=n.line,a=n.column,u=n.name,o=!0):o&&(r.addMapping({generated:{line:e.line,column:e.column}}),i=null,o=!1);for(var l=0,c=t.length;l<c;l++)10===t.charCodeAt(l)?(e.line++,e.column=0,l+1===c?(i=null,o=!1):o&&r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:e.line,column:e.column},name:n.name})):e.column++}),this.walkSourceContents(function(t,e){r.setSourceContent(t,e)}),{code:e.code,map:r}},e.SourceNode=a},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,l=[],c=!1,f=-1;function p(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&h())}function h(){if(!c){var t=a(p);c=!0;for(var e=l.length;e;){for(u=l,l=[];++f<e;)u&&u[f].run();f=-1,e=l.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new d(t,e)),1!==l.length||c||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){if(n[t])return;n[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t)};var n={};t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(t){return t&&t.__esModule?t:{default:t}}(r(41));var i=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css=void 0,this.map=void 0}return t.prototype.toString=function(){return this.css},t.prototype.warn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var r=new o.default(t,e);return this.messages.push(r),r},t.prototype.warnings=function(){return this.messages.filter(function(t){return"warning"===t.type})},n(t,[{key:"content",get:function(){return this.css}}]),t}();e.default=i,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="warning",this.text=e,r.node&&r.node.source){var n=r.node.positionBy(r);this.line=n.line,this.column=n.column}for(var o in r)this[o]=r[o]}return t.prototype.toString=function(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},t}();e.default=n,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=l(r(1)),o=l(r(43)),i=l(r(6)),s=l(r(7)),a=l(r(20)),u=l(r(9));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.input=e,this.root=new a.default,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{line:1,column:1}}}return t.prototype.createTokenizer=function(){this.tokenizer=(0,o.default)(this.input)},t.prototype.parse=function(){for(var t=void 0;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()},t.prototype.comment=function(t){var e=new i.default;this.init(e,t[2],t[3]),e.source.end={line:t[4],column:t[5]};var r=t[1].slice(2,-2);if(/^\s*$/.test(r))e.text="",e.raws.left=r,e.raws.right="";else{var n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}},t.prototype.emptyRule=function(t){var e=new u.default;this.init(e,t[2],t[3]),e.selector="",e.raws.between="",this.current=e},t.prototype.other=function(t){for(var e=!1,r=null,n=!1,o=null,i=[],s=[],a=t;a;){if(r=a[0],s.push(a),"("===r||"["===r)o||(o=a),i.push("("===r?")":"]");else if(0===i.length){if(";"===r){if(n)return void this.decl(s);break}if("{"===r)return void this.rule(s);if("}"===r){this.tokenizer.back(s.pop()),e=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),i.length>0&&this.unclosedBracket(o),e&&n){for(;s.length&&("space"===(a=s[s.length-1][0])||"comment"===a);)this.tokenizer.back(s.pop());this.decl(s)}else this.unknownWord(s)},t.prototype.rule=function(t){t.pop();var e=new u.default;this.init(e,t[0][2],t[0][3]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e},t.prototype.decl=function(t){var e=new n.default;this.init(e);var r=t[t.length-1];for(";"===r[0]&&(this.semicolon=!0,t.pop()),r[4]?e.source.end={line:r[4],column:r[5]}:e.source.end={line:r[2],column:r[3]};"word"!==t[0][0];)1===t.length&&this.unknownWord(t),e.raws.before+=t.shift()[1];for(e.source.start={line:t[0][2],column:t[0][3]},e.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;e.prop+=t.shift()[1]}e.raws.between="";for(var i=void 0;t.length;){if(":"===(i=t.shift())[0]){e.raws.between+=i[1];break}e.raws.between+=i[1]}"_"!==e.prop[0]&&"*"!==e.prop[0]||(e.raws.before+=e.prop[0],e.prop=e.prop.slice(1)),e.raws.between+=this.spacesAndCommentsFromStart(t),this.precheckMissedSemicolon(t);for(var s=t.length-1;s>0;s--){if("!important"===(i=t[s])[1].toLowerCase()){e.important=!0;var a=this.stringFrom(t,s);" !important"!==(a=this.spacesFromEnd(t)+a)&&(e.raws.important=a);break}if("important"===i[1].toLowerCase()){for(var u=t.slice(0),l="",c=s;c>0;c--){var f=u[c][0];if(0===l.trim().indexOf("!")&&"space"!==f)break;l=u.pop()[1]+l}0===l.trim().indexOf("!")&&(e.important=!0,e.raws.important=l,t=u)}if("space"!==i[0]&&"comment"!==i[0])break}this.raw(e,"value",t),-1!==e.value.indexOf(":")&&this.checkMissedSemicolon(t)},t.prototype.atrule=function(t){var e=new s.default;e.name=t[1].slice(1),""===e.name&&this.unnamedAtrule(e,t),this.init(e,t[2],t[3]);for(var r=void 0,n=void 0,o=!1,i=!1,a=[];!this.tokenizer.endOfFile();){if(";"===(t=this.tokenizer.nextToken())[0]){e.source.end={line:t[2],column:t[3]},this.semicolon=!0;break}if("{"===t[0]){i=!0;break}if("}"===t[0]){if(a.length>0){for(r=a[n=a.length-1];r&&"space"===r[0];)r=a[--n];r&&(e.source.end={line:r[4],column:r[5]})}this.end(t);break}if(a.push(t),this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end={line:t[4],column:t[5]},this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),i&&(e.nodes=[],this.current=e)},t.prototype.end=function(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end={line:t[2],column:t[3]},this.current=this.current.parent):this.unexpectedClose(t)},t.prototype.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces},t.prototype.freeSemicolon=function(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},t.prototype.init=function(t,e,r){this.current.push(t),t.source={start:{line:e,column:r},input:this.input},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)},t.prototype.raw=function(t,e,r){for(var n=void 0,o=void 0,i=r.length,s="",a=!0,u=void 0,l=void 0,c=/^([.|#])?([\w])+/i,f=0;f<i;f+=1)"comment"!==(o=(n=r[f])[0])||"rule"!==t.type?"comment"===o||"space"===o&&f===i-1?a=!1:s+=n[1]:(l=r[f-1],u=r[f+1],"space"!==l[0]&&"space"!==u[0]&&c.test(l[1])&&c.test(u[1])?s+=n[1]:a=!1);if(!a){var p=r.reduce(function(t,e){return t+e[1]},"");t.raws[e]={value:s,raw:p}}t[e]=s},t.prototype.spacesAndCommentsFromEnd=function(t){for(var e=void 0,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r},t.prototype.spacesAndCommentsFromStart=function(t){for(var e=void 0,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r},t.prototype.spacesFromEnd=function(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e},t.prototype.stringFrom=function(t,e){for(var r="",n=e;n<t.length;n++)r+=t[n][1];return t.splice(e,t.length-e),r},t.prototype.colon=function(t){for(var e=0,r=void 0,n=void 0,o=void 0,i=0;i<t.length;i++){if("("===(n=(r=t[i])[0]))e+=1;else if(")"===n)e-=1;else if(0===e&&":"===n){if(o){if("word"===o[0]&&"progid"===o[1])continue;return i}this.doubleColon(r)}o=r}return!1},t.prototype.unclosedBracket=function(t){throw this.input.error("Unclosed bracket",t[2],t[3])},t.prototype.unknownWord=function(t){throw this.input.error("Unknown word",t[0][2],t[0][3])},t.prototype.unexpectedClose=function(t){throw this.input.error("Unexpected }",t[2],t[3])},t.prototype.unclosedBlock=function(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)},t.prototype.doubleColon=function(t){throw this.input.error("Double colon",t[2],t[3])},t.prototype.unnamedAtrule=function(t,e){throw this.input.error("At-rule without name",e[2],e[3])},t.prototype.precheckMissedSemicolon=function(){},t.prototype.checkMissedSemicolon=function(t){var e=this.colon(t);if(!1!==e){for(var r=0,n=void 0,o=e-1;o>=0&&("space"===(n=t[o])[0]||2!==(r+=1));o--);throw this.input.error("Missed semicolon",n[2],n[3])}},t}();e.default=c,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.css.valueOf(),O=e.ignoreErrors,M=void 0,x=void 0,R=void 0,k=void 0,P=void 0,L=void 0,T=void 0,B=void 0,j=void 0,U=void 0,I=void 0,D=void 0,N=void 0,F=void 0,Y=r.length,z=-1,G=1,$=0,V=[],W=[];function J(e){throw t.error("Unclosed "+e,G,$-z)}return{back:function(t){W.push(t)},nextToken:function(){if(W.length)return W.pop();if($>=Y)return;((M=r.charCodeAt($))===a||M===l||M===f&&r.charCodeAt($+1)!==a)&&(z=$,G+=1);switch(M){case a:case u:case c:case f:case l:x=$;do{x+=1,(M=r.charCodeAt(x))===a&&(z=x,G+=1)}while(M===u||M===a||M===c||M===f||M===l);F=["space",r.slice($,x)],$=x-1;break;case p:F=["[","[",G,$-z];break;case h:F=["]","]",G,$-z];break;case y:F=["{","{",G,$-z];break;case m:F=["}","}",G,$-z];break;case b:F=[":",":",G,$-z];break;case v:F=[";",";",G,$-z];break;case d:if(D=V.length?V.pop()[1]:"",N=r.charCodeAt($+1),"url"===D&&N!==n&&N!==o&&N!==u&&N!==a&&N!==c&&N!==l&&N!==f){x=$;do{if(U=!1,-1===(x=r.indexOf(")",x+1))){if(O){x=$;break}J("bracket")}for(I=x;r.charCodeAt(I-1)===i;)I-=1,U=!U}while(U);F=["brackets",r.slice($,x+1),G,$-z,G,x-z],$=x}else x=r.indexOf(")",$+1),L=r.slice($,x+1),-1===x||C.test(L)?F=["(","(",G,$-z]:(F=["brackets",L,G,$-z,G,x-z],$=x);break;case g:F=[")",")",G,$-z];break;case n:case o:R=M===n?"'":'"',x=$;do{if(U=!1,-1===(x=r.indexOf(R,x+1))){if(O){x=$+1;break}J("string")}for(I=x;r.charCodeAt(I-1)===i;)I-=1,U=!U}while(U);L=r.slice($,x+1),k=L.split("\n"),(P=k.length-1)>0?(B=G+P,j=x-k[P].length):(B=G,j=z),F=["string",r.slice($,x+1),G,$-z,B,x-j],z=j,G=B,$=x;break;case _:A.lastIndex=$+1,A.test(r),x=0===A.lastIndex?r.length-1:A.lastIndex-2,F=["at-word",r.slice($,x+1),G,$-z,G,x-z],$=x;break;case i:for(x=$,T=!0;r.charCodeAt(x+1)===i;)x+=1,T=!T;if(M=r.charCodeAt(x+1),T&&M!==s&&M!==u&&M!==a&&M!==c&&M!==f&&M!==l&&(x+=1,E.test(r.charAt(x)))){for(;E.test(r.charAt(x+1));)x+=1;r.charCodeAt(x+1)===u&&(x+=1)}F=["word",r.slice($,x+1),G,$-z,G,x-z],$=x;break;default:M===s&&r.charCodeAt($+1)===w?(0===(x=r.indexOf("*/",$+2)+1)&&(O?x=r.length:J("comment")),L=r.slice($,x+1),k=L.split("\n"),(P=k.length-1)>0?(B=G+P,j=x-k[P].length):(B=G,j=z),F=["comment",L,G,$-z,B,x-j],z=j,G=B,$=x):(S.lastIndex=$+1,S.test(r),x=0===S.lastIndex?r.length-1:S.lastIndex-2,F=["word",r.slice($,x+1),G,$-z,G,x-z],V.push(F),$=x)}return $++,F},endOfFile:function(){return 0===W.length&&$>=Y}}};var n=39,o=34,i=92,s=47,a=10,u=32,l=12,c=9,f=13,p=91,h=93,d=40,g=41,y=123,m=125,v=59,w=42,b=58,_=64,A=/[ \n\t\r\f{}()'"\\;/[\]#]/g,S=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g,C=/.[\\/("'\n]/,E=/[a-f0-9]/i;t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n="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},o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=u(r(10)),s=u(r(45)),a=u(r(4));function u(t){return t&&t.__esModule?t:{default:t}}var l=0,c=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null===e||"object"===(void 0===e?"undefined":n(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");this.css=e.toString(),"\ufeff"!==this.css[0]&&""!==this.css[0]||(this.css=this.css.slice(1)),r.from&&(/^\w+:\/\//.test(r.from)?this.file=r.from:this.file=a.default.resolve(r.from));var o=new s.default(this.css,r);if(o.text){this.map=o;var i=o.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}this.file||(l+=1,this.id="<input css "+l+">"),this.map&&(this.map.file=this.from)}return t.prototype.error=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0,s=this.origin(e,r);return(o=s?new i.default(t,s.line,s.column,s.source,s.file,n.plugin):new i.default(t,e,r,this.css,this.file,n.plugin)).input={line:e,column:r,source:this.css},this.file&&(o.input.file=this.file),o},t.prototype.origin=function(t,e){if(!this.map)return!1;var r=this.map.consumer(),n=r.originalPositionFor({line:t,column:e});if(!n.source)return!1;var o={file:this.mapResolve(n.source),line:n.line,column:n.column},i=r.sourceContentFor(n.source);return i&&(o.source=i),o},t.prototype.mapResolve=function(t){return/^\w+:\/\//.test(t)?t:a.default.resolve(this.map.consumer().sourceRoot||".",t)},o(t,[{key:"from",get:function(){return this.file||this.id}}]),t}();e.default=c,t.exports=e.default},function(t,e,r){"use strict";(function(n){e.__esModule=!0;var o="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},i=u(r(15)),s=u(r(4)),a=u(r(46));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=r.map?r.map.prev:void 0,o=this.loadMap(r.from,n);o&&(this.text=o)}return t.prototype.consumer=function(){return this.consumerCache||(this.consumerCache=new i.default.SourceMapConsumer(this.text)),this.consumerCache},t.prototype.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},t.prototype.startWith=function(t,e){return!!t&&t.substr(0,e.length)===e},t.prototype.loadAnnotation=function(t){var e=t.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//);e&&(this.annotation=e[1].trim())},t.prototype.decodeInline=function(t){var e="data:application/json,";if(this.startWith(t,e))return decodeURIComponent(t.substr(e.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return function(t){return n?n.from(t,"base64").toString():window.atob(t)}(t.substr(RegExp.lastMatch.length));var r=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)},t.prototype.loadMap=function(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"==typeof e){var r=e(t);if(r&&a.default.existsSync&&a.default.existsSync(r))return a.default.readFileSync(r,"utf-8").toString().trim();throw new Error("Unable to load previous source map: "+r.toString())}if(e instanceof i.default.SourceMapConsumer)return i.default.SourceMapGenerator.fromSourceMap(e).toString();if(e instanceof i.default.SourceMapGenerator)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return t&&(n=s.default.join(s.default.dirname(t),n)),this.root=s.default.dirname(n),!(!a.default.existsSync||!a.default.existsSync(n))&&a.default.readFileSync(n,"utf-8").toString().trim()}},t.prototype.isMap=function(t){return"object"===(void 0===t?"undefined":o(t))&&("string"==typeof t.mappings||"string"==typeof t._mappings)},t}();e.default=l,t.exports=e.default}).call(this,r(14).Buffer)},function(t,e){},function(t,e,r){"use strict";e.__esModule=!0;e.default={prefix:function(t){var e=t.match(/^(-\w+-)/);return e?e[0]:""},unprefixed:function(t){return t.replace(/^-\w+-/,"")}},t.exports=e.default}])}); //# sourceMappingURL=grapesjs-parser-postcss.min.js.map /*! grapesjs-tui-image-editor - 0.1.3 */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["grapesjs-tui-image-editor"]=e():t["grapesjs-tui-image-editor"]=e()}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){var o=n(6);t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){o(t,e,n[e])})}return t}},function(t,e,n){var o=n(3),r=n(4),i=n(5);t.exports=function(t){return o(t)||r(t)||i()}},function(t,e,n){"use strict";n.r(e);var o=n(1),r=n.n(o),i=n(0),a=n.n(i);e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="../../assets/admin/img/pagebuilder/",o=a()({},{config:{},constructor:"",labelImageEditor:"Image Editor",labelApply:"Apply",height:"650px",width:"100%",commandId:"tui-image-editor",toolbarIcon:'<svg viewBox="0 0 24 24">\n <path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z">\n </path>\n </svg>',hideHeader:1,onApply:0,addToAssets:1,upload:0,onApplyButton:function(){},icons:{"menu.normalIcon.path":"".concat(n,"icon-d.svg"),"menu.activeIcon.path":"".concat(n,"icon-b.svg"),"menu.disabledIcon.path":"".concat(n,"icon-a.svg"),"menu.hoverIcon.path":"".concat(n,"icon-c.svg"),"submenu.normalIcon.path":"".concat(n,"icon-d.svg"),"submenu.activeIcon.path":"".concat(n,"icon-c.svg")},script:["https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7/fabric.min.js","https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js","https://uicdn.toast.com/tui-color-picker/v2.2.0/tui-color-picker.min.js","https://uicdn.toast.com/tui-image-editor/v3.4.0/tui-image-editor.min.js"],style:["https://uicdn.toast.com/tui-color-picker/v2.2.0/tui-color-picker.min.css","https://uicdn.toast.com/tui-image-editor/v3.4.0/tui-image-editor.min.css"]},e),i=o.script,c=o.style,u=o.height,s=o.width,l=o.hideHeader,d=o.icons,p=o.onApply,f=o.upload,g=o.addToAssets,m=o.commandId,h=function(){return o.constructor||window.tui&&window.tui.ImageEditor},b=h();if(!b&&i){var y=document.head,v=Array.isArray(i)?r()(i):[i];!function t(e){if(e.length){var n=document.createElement("link");n.href=e.shift(),n.rel="stylesheet",y.appendChild(n),t(e)}}(Array.isArray(c)?r()(c):[c]),function t(e){if(e.length){var n=document.createElement("script");n.src=e.shift(),n.onerror=n.onload=t.bind(null,e),y.appendChild(n)}else b=h()}(v)}var I=t.DomComponents,j=I.getType("image").model;I.addType("image",{model:{initToolbar:function(){j.prototype.initToolbar.apply(this,arguments);var t=this.get("toolbar");t.some(function(t){return t.command===m})||(t.unshift({command:m,label:o.toolbarIcon}),this.set("toolbar",t))}}}),t.Commands.add(m,{run:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.id;if(!b)return t.log("TOAST UI Image editor not found",{level:"error",ns:m}),t.stopCommand(i);this.editor=t,this.target=r.target||t.getSelected();var a=this.createContent(),c=o.labelImageEditor,u=a.children[1];t.Modal.open({title:c,content:a}).getModel().once("change:open",function(){return t.stopCommand(i)}),this.imageEditor=new b(a.children[0],this.getEditorConfig()),t.getModel().setEditing(1),u.onclick=function(){return n.applyChanges()},o.onApplyButton(u)},stop:function(t){var e=this.imageEditor;e&&e.destroy(),t.getModel().setEditing(0)},getEditorConfig:function(){var t=a()({},o.config),e=this.target.get("src");return t.includeUI||(t.includeUI={}),t.includeUI=a()({theme:{}},t.includeUI,{loadImage:{path:e,name:1},uiSize:{height:u,width:s}}),l&&(t.includeUI.theme["header.display"]="none"),d&&(t.includeUI.theme=a()({},t.includeUI.theme,d)),t},createContent:function(){var t=document.createElement("div");return t.style="position: relative",t.innerHTML='\n <div></div>\n <button class="tui-image-editor__apply-btn" style="\n position: absolute;\n top: 0; right: 0;\n margin: 10px;\n background-color: #fff;\n font-size: 1rem;\n border-radius: 3px;\n border: none;\n padding: 10px 20px;\n cursor: pointer\n ">\n '.concat(o.labelApply,"\n </botton>\n "),t},applyChanges:function(){var t=this,e=this.imageEditor,n=this.target,o=this.editor.AssetManager;p?p(e,n):"CROPPER"===e.getDrawingMode()?e.crop(e.getCropzoneRect()).then(function(){t.uploadImage(e,n,o)}):this.uploadImage(e,n,o)},uploadImage:function(t,e,n){var o=this,r=t.toDataURL();if(f){var i=this.dataUrlToBlob(r);n.FileUploader().uploadFile({dataTransfer:{files:[i]}},function(t){var e=t&&t.data&&t.data[0],n=e&&("string"==typeof e?e:e.src);n&&o.applyToTarget(n)})}else g&&n.add({src:r,name:(e.get("src")||"").split("/").pop()}),this.applyToTarget(r)},applyToTarget:function(t){this.target.set({src:t}),this.editor.Modal.close()},dataUrlToBlob:function(t){for(var e=t.split(","),n=window.atob(e[1]),o=e[0].split(":")[1].split(";")[0],r=new ArrayBuffer(n.length),i=new Uint8Array(r),a=0;a<n.length;a++)i[a]=n.charCodeAt(a);return new Blob([r],{type:o})}})}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}}])}); //# sourceMappingURL=grapesjs-tui-image-editor.min.js.map /*! grapesjs-typed - 1.0.5 */ !function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports["grapesjs-typed"]=t():e["grapesjs-typed"]=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&'object'==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,'default',{enumerable:!0,value:e}),2&t&&'string'!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,'a',t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.DomComponents,n=Object.keys,o={strings:[],'type-speed':0,'start-delay':0,'back-speed':0,'smart-backspace':!0,'back-delay':700,'fade-out':!1,'fade-out-class':'typed-fade-out','fade-out-delay':500,'show-cursor':!0,'cursor-char':'|','auto-insert-css':!0,'bind-input-focus-events':!1,'content-type':'html',loop:!1,'loop-count':1/0,shuffle:!1,attr:''},c=function(e){return'number'==typeof e?'number':'boolean'==typeof e?'checkbox':'text'},a=n(o).filter((function(e){return['strings'].indexOf(e)<0})).map((function(e){return{changeProp:1,type:c(o[e]),min:0,name:e}}));a.unshift({changeProp:1,name:'strings',type:"typed-strings"}),r.addType("typed",{model:{defaults:t.props(s({},o,{typedsrc:t.script,droppable:0,traits:a,script:function(){var e=this,t=JSON.parse('{[ strings ]}'),r=function(e){return parseInt(e,10)||0},n=function(e){return!!e},o=function(){var o=e;o.innerHTML='<span></span>';var c=parseInt('{[ loop-count ]}',10),s={typeSpeed:r('{[ type-speed ]}'),startDelay:r('{[ start-delay ]}'),backDelay:r('{[ back-delay ]}'),backSpeed:r('{[ back-speed ]}'),smartBackspace:n('{[ smart-backspace ]}'),fadeOut:n('{[ fade-out ]}'),fadeOutClass:'{[ fade-out-class ]}',fadeOutDelay:r('{[ fade-out-delay ]}'),shuffle:n('{[ shuffle ]}'),loop:n('{[ loop ]}'),loopCount:isNaN(c)?1/0:c,showCursor:n('{[ show-cursor ]}'),cursorChar:'{[ cursor-char ]}',autoInsertCss:n('{[ auto-insert-css ]}'),bindInputFocusEvents:n('{[ bind-input-focus-events ]}'),attr:'{[ attr ]}',contentType:'{[ content-type ]}'};t&&t.length&&(s.strings=t),new Typed(o.children[0],s)};if(window.Typed)o();else{var c=document.createElement('script');c.src='{[ typedsrc ]}',c.onload=o,document.head.appendChild(c)}}})),init:function(){var e=this,t=a.filter((function(e){return['strings'].indexOf(e.name)<0})).map((function(e){return"change:".concat(e.name)})).join(' ');this.on(t,(function(){return e.trigger('change:script')})),this.on('change:strings',this.onStringsChange)},onStringsChange:function(e,t){Array.isArray(t)||(this.set({strings:t.split('\n')}),this.trigger('change:script'))}}})};function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.BlockManager,n=t.block;n&&r.add("typed",p({label:'Typed',media:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><path d="M212.3 44l2.3 49.6h-6A60 60 0 00204 75c-3.2-6-7.5-10.5-12.9-13.3a44.9 44.9 0 00-21.1-4.3h-29.8V219c0 13 1.4 21 4.2 24.3 4 4.4 10 6.6 18.2 6.6h7.4v5.7H80.2V250h7.5c9 0 15.3-2.7 19-8.2 2.4-3.3 3.5-10.9 3.5-22.7V57.3H84.8a71 71 0 00-21.1 2.2 29 29 0 00-13.9 11.3 46.1 46.1 0 00-6.9 22.8H37L39.5 44h172.8zM245 22h18v256h-18z"/></svg>',content:{type:"typed"}},n))},f=function(e){e.TraitManager.addType("typed-strings",{createInput:function(e){var t=e.component;return"<textarea>".concat(t.get('strings').join('\n'),"</textarea>")},onUpdate:function(e){var t=e.component;e.elInput.value=t.get('strings').join('\n')}})};function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(r,!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=d({},{script:'https://cdn.jsdelivr.net/npm/typed.js@2.0.11',block:{},props:function(e){return e}},{},t);a(e,r),u(e,r),f(e)}}])})); //# sourceMappingURL=grapesjs-typed.min.js.map /*! grapesjs-component-countdown - 0.1.3 */ !function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("grapesjs")):"function"==typeof define&&define.amd?define(["grapesjs"],n):"object"==typeof exports?exports["grapesjs-component-countdown"]=n(require("grapesjs")):e["grapesjs-component-countdown"]=n(e.grapesjs)}(this,function(e){return function(e){function n(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=1)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.countdownRef="countdown"},function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=t(2),d=o(a),s=t(3),l=o(s),r=t(4),i=o(r),c=t(0);n.default=d.default.plugins.add("gjs-component-countdown",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n,o={blocks:[c.countdownRef],defaultStyle:!0,startTime:"",endText:"EXPIRED",dateInputType:"date",countdownClsPfx:"countdown",labelCountdown:"Countdown",labelCountdownCategory:"Extra",labelDays:"days",labelHours:"hours",labelMinutes:"minutes",labelSeconds:"seconds"};for(var a in o)a in t||(t[a]=o[a]);(0,l.default)(e,t),(0,i.default)(e,t)})},function(n,t){n.exports=e},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n,a=e.DomComponents,d=a.getType("default"),s=a.getType("text"),l=d.model,r=d.view,i=(s.model,s.view,t.countdownClsPfx);a.addType("countdown",{model:l.extend({defaults:o({},l.prototype.defaults,{startfrom:t.startTime,endText:t.endText,droppable:!1,traits:[{label:"Start",name:"startfrom",changeProp:1,type:t.dateInputType},{label:"End text",name:"endText",changeProp:1}],script:function(){var e=new Date("{[ startfrom ]}").getTime(),n=this.querySelector("[data-js=countdown]"),t=this.querySelector("[data-js=countdown-endtext]"),o=this.querySelector("[data-js=countdown-day]"),a=this.querySelector("[data-js=countdown-hour]"),d=this.querySelector("[data-js=countdown-minute]"),s=this.querySelector("[data-js=countdown-second]"),l=this.gjs_countdown_interval;l&&l&&clearInterval(l);var r=function(e,n,t,l){o.innerHTML=e<10?"0"+e:e,a.innerHTML=n<10?"0"+n:n,d.innerHTML=t<10?"0"+t:t,s.innerHTML=l<10?"0"+l:l},i=function(){var o=(new Date).getTime(),a=e-o,d=Math.floor(a/864e5),s=Math.floor(a%864e5/36e5),l=Math.floor(a%36e5/6e4),i=Math.floor(a%6e4/1e3);r(d,s,l,i),a<0&&(clearInterval(c),t.innerHTML="{[ endText ]}",n.style.display="none",t.style.display="")};if(e){var c=setInterval(i,1e3);this.gjs_countdown_interval=c,t.style.display="none",n.style.display="",i()}else r(0,0,0,0)}})},{isComponent:function(e){if(e.getAttribute&&"countdown"==e.getAttribute("data-gjs-type"))return{type:"countdown"}}}),view:r.extend({init:function(){this.listenTo(this.model,"change:startfrom change:endText",this.updateScript);var e=this.model.get("components");e.length||(e.reset(),e.add('\n <span data-js="countdown" class="'+i+'-cont">\n <div class="'+i+'-block">\n <div data-js="countdown-day" class="'+i+'-digit"></div>\n <div class="'+i+'-label">'+t.labelDays+'</div>\n </div>\n <div class="'+i+'-block">\n <div data-js="countdown-hour" class="'+i+'-digit"></div>\n <div class="'+i+'-label">'+t.labelHours+'</div>\n </div>\n <div class="'+i+'-block">\n <div data-js="countdown-minute" class="'+i+'-digit"></div>\n <div class="'+i+'-label">'+t.labelMinutes+'</div>\n </div>\n <div class="'+i+'-block">\n <div data-js="countdown-second" class="'+i+'-digit"></div>\n <div class="'+i+'-label">'+t.labelSeconds+'</div>\n </div>\n </span>\n <span data-js="countdown-endtext" class="'+i+'-endtext"></span>\n '))}})})}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n,a=e.BlockManager,d=t.countdownClsPfx,s=t.defaultStyle?"<style>\n ."+d+" {\n text-align: center;\n font-family: Helvetica, serif;\n }\n\n ."+d+"-block {\n display: inline-block;\n margin: 0 10px;\n padding: 10px;\n }\n\n ."+d+"-digit {\n font-size: 5rem;\n }\n\n ."+d+"-endtext {\n font-size: 5rem;\n }\n\n ."+d+"-cont,\n ."+d+"-block {\n display: inline-block;\n }\n </style>":"";t.blocks.indexOf(o.countdownRef)>=0&&a.add(o.countdownRef,{label:t.labelCountdown,category:t.labelCountdownCategory,attributes:{class:"fa fa-clock-o"},content:'\n <div class="'+d+'" data-gjs-type="countdown"></div>\n '+s+"\n "})};var o=t(0)}])}); /*! grapesjs-style-bg - 1.0.3 */ !function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports["grapesjs-style-bg"]=t():e["grapesjs-style-bg"]=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&'object'==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:e}),2&t&&'string'!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,'a',t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){var r=n(3),o=n(4),i=n(5);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&'object'==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:e}),2&t&&'string'!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,'a',t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.on=function(e,t,n){t=t.split(/\s+/);for(var r=0;r<t.length;++r)e.addEventListener(t[r],n)},t.off=function(e,t,n){t=t.split(/\s+/);for(var r=0;r<t.length;++r)e.removeEventListener(t[r],n)}},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(2));e.exports=function(e){return new r.default(e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(3)),u=r(n(4)),c=n(0),s=function(e,t){return e.position-t.position},p=function(e){return e+"-gradient("},f=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e=Object.assign({},e);var r={pfx:"grp",el:".grp",colorEl:"",min:0,max:100,direction:"90deg",type:"linear",height:"30px",width:"100%"};for(var a in r)a in e||(e[a]=r[a]);var l=e.el;if(!((l="string"==typeof l?document.querySelector(l):l)instanceof HTMLElement))throw"Element not found, given "+l;return n.el=l,n.handlers=[],n.options=e,n.on("handler:color:change",(function(e,t){return n.change(t)})),n.on("handler:position:change",(function(e,t){return n.change(t)})),n.on("handler:remove",(function(e){return n.change(1)})),n.on("handler:add",(function(e){return n.change(1)})),n.render(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"setColorPicker",value:function(e){this.colorPicker=e}},{key:"getValue",value:function(e,t){var n=this.getColorValue(),r=e||this.getType(),o=t||this.getDirection();return n?r+"-gradient("+o+", "+n+")":""}},{key:"getSafeValue",value:function(e,t){var n=this.previewEl,r=this.getValue(e,t);if(!this.sandEl&&(this.sandEl=document.createElement("div")),!n||!r)return"";for(var o=this.sandEl.style,i=[r].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(this.getPrefixedValues(e,t))),a=void 0,l=0;l<i.length&&(a=i[l],o.backgroundImage=a,o.backgroundImage!=a);l++);return o.backgroundImage}},{key:"setValue",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.type,o=this.direction,i=t.indexOf("(")+1,a=t.lastIndexOf(")"),l=t.substring(i,a),u=l.split(/,(?![^(]*\)) /);if(this.clear(n),l){u.length>2&&(o=u.shift());var c=void 0;["repeating-linear","repeating-radial","linear","radial"].forEach((function(e){t.indexOf(p(e))>-1&&!c&&(c=1,r=e)})),this.setDirection(o,n),this.setType(r,n),u.forEach((function(t){var r=t.split(" "),o=parseFloat(r.pop()),i=r.join("");e.addHandler(o,i,0,n)})),this.updatePreview()}else this.updatePreview()}},{key:"getColorValue",value:function(){var e=this.handlers;return e.sort(s),(e=1==e.length?[e[0],e[0]]:e).map((function(e){return e.getValue()})).join(", ")}},{key:"getPrefixedValues",value:function(e,t){var n=this.getValue(e,t);return["-moz-","-webkit-","-o-","-ms-"].map((function(e){return""+e+n}))}},{key:"change",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.updatePreview(),!t.silent&&this.emit("change",e)}},{key:"setDirection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.options.direction=e,this.change(1,t)}},{key:"getDirection",value:function(){return this.options.direction}},{key:"setType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.options.type=e,this.change(1,t)}},{key:"getType",value:function(){return this.options.type}},{key:"addHandler",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=new u.default(this,e,t,n);return!r.silent&&this.emit("handler:add",o),o}},{key:"getHandler",value:function(e){return this.handlers[e]}},{key:"getHandlers",value:function(){return this.handlers}},{key:"clear",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.handlers,n=t.length-1;n>=0;n--)t[n].remove(e)}},{key:"getSelected",value:function(){for(var e=this.getHandlers(),t=0;t<e.length;t++){var n=e[t];if(n.isSelected())return n}return null}},{key:"updatePreview",value:function(){var e=this.previewEl;e&&(e.style.backgroundImage=this.getSafeValue("linear","to right"))}},{key:"initEvents",value:function(){var e=this,t=this.options,n=t.min,r=t.max,o=this.previewEl,i=0,a={};o&&(0,c.on)(o,"click",(function(t){a.w=o.clientWidth,a.h=o.clientHeight;var l=t.offsetX-o.clientLeft,u=t.offsetY-o.clientTop;if(!((i=l/a.w*100)>r||i<n)){var c=document.createElement("canvas"),s=c.getContext("2d");c.width=a.w,c.height=a.h;var p=s.createLinearGradient(0,0,a.w,a.h);e.getHandlers().forEach((function(e){return p.addColorStop(e.position/100,e.color)})),s.fillStyle=p,s.fillRect(0,0,c.width,c.height),c.style.background="black";var f=c.getContext("2d").getImageData(l,u,1,1).data,d="rgba("+f[0]+", "+f[1]+", "+f[2]+", "+f[3]+")";e.addHandler(i,d)}}))}},{key:"render",value:function(){var e=this.options,t=this.el,n=e.pfx,r=e.height,o=e.width;if(t){var i=n+"-wrapper",a=n+"-preview";t.innerHTML='\n <div class="'+i+'">\n <div class="'+a+'"></div>\n </div>\n ';var l=t.querySelector("."+i),u=t.querySelector("."+a),c=l.style;c.position="relative",this.wrapperEl=l,this.previewEl=u,r&&(c.height=r),o&&(c.width=o),this.initEvents(),this.updatePreview()}}}]),t}(l.default);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"on",value:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this}},{key:"once",value:function(e,t,n){function r(){o.off(e,r),t.apply(n,arguments)}var o=this;return r._=t,this.on(e,r,n)}},{key:"emit",value:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this}},{key:"off",value:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}}]),e}();t.default=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"black",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;r(this,e),t.getHandlers().push(this),this.gp=t,this.position=n,this.color=o,this.selected=0,this.render(),i&&this.select()}return o(e,[{key:"toJSON",value:function(){return{position:this.position,selected:this.selected,color:this.color}}},{key:"setColor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.color=e,this.emit("handler:color:change",this,t)}},{key:"setPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getEl();this.position=e,n&&(n.style.left=e+"%"),this.emit("handler:position:change",this,t)}},{key:"getColor",value:function(){return this.color}},{key:"getPosition",value:function(){return this.position}},{key:"isSelected",value:function(){return!!this.selected}},{key:"getValue",value:function(){return this.getColor()+" "+this.getPosition()+"%"}},{key:"select",value:function(){var e=this.getEl();this.gp.getHandlers().forEach((function(e){return e.deselect()})),this.selected=1;var t=this.getSelectedCls();e&&(e.className+=" "+t),this.emit("handler:select",this)}},{key:"deselect",value:function(){var e=this.getEl();this.selected=0;var t=this.getSelectedCls();e&&(e.className=e.className.replace(t,"").trim()),this.emit("handler:deselect",this)}},{key:"getSelectedCls",value:function(){return this.gp.options.pfx+"-handler-selected"}},{key:"remove",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getEl(),n=this.gp.getHandlers(),r=n.splice(n.indexOf(this),1)[0];return t&&t.parentNode.removeChild(t),!e.silent&&this.emit("handler:remove",r),r}},{key:"getEl",value:function(){return this.el}},{key:"initEvents",value:function(){var e=this,t=this.getEl(),n=this.gp.previewEl,r=this.gp.options,o=r.min,a=r.max,l=t.querySelector("[data-toggle=handler-close]"),u=t.querySelector("[data-toggle=handler-color-c]"),c=t.querySelector("[data-toggle=handler-color-wrap]"),s=t.querySelector("[data-toggle=handler-color]"),p=t.querySelector("[data-toggle=handler-drag]");if(u&&(0,i.on)(u,"click",(function(e){return e.stopPropagation()})),l&&(0,i.on)(l,"click",(function(t){t.stopPropagation(),e.remove()})),s&&(0,i.on)(s,"change",(function(t){var n=t.target.value;e.setColor(n),c&&(c.style.backgroundColor=n)})),p){var f=0,d=0,h=0,v={},g={},y={},b=function(t){h=1,y.x=t.clientX-g.x,y.y=t.clientY-g.y,f=100*y.x,f/=v.w,f=(f=(f=d+f)<o?o:f)>a?a:f,e.setPosition(f,0),e.emit("handler:drag",e,f),0===t.which&&m(t)},m=function t(n){h&&(h=0,e.setPosition(f),(0,i.off)(document,"touchmove mousemove",b),(0,i.off)(document,"touchend mouseup",t),e.emit("handler:drag:end",e,f))};(0,i.on)(p,"touchstart mousedown",(function(t){0===t.button&&(e.select(),d=e.position,v.w=n.clientWidth,v.h=n.clientHeight,g.x=t.clientX,g.y=t.clientY,(0,i.on)(document,"touchmove mousemove",b),(0,i.on)(document,"touchend mouseup",m),e.emit("handler:drag:start",e))})),(0,i.on)(p,"click",(function(e){return e.stopPropagation()}))}}},{key:"emit",value:function(){var e;(e=this.gp).emit.apply(e,arguments)}},{key:"render",value:function(){var e=this.gp,t=e.options,n=e.previewEl,r=e.colorPicker,o=t.pfx,i=t.colorEl,a=this.getColor();if(n){var l=document.createElement("div"),u=l.style,c=o+"-handler";return l.className=c,l.innerHTML='\n <div class="'+c+'-close-c">\n <div class="'+c+'-close" data-toggle="handler-close">⨯</div>\n </div>\n <div class="'+c+'-drag" data-toggle="handler-drag"></div>\n <div class="'+c+'-cp-c" data-toggle="handler-color-c">\n '+(i||'\n <div class="'+c+'-cp-wrap" data-toggle="handler-color-wrap" style="background-color: '+a+'">\n <input type="color" data-toggle="handler-color" value="'+a+'">\n </div>')+"\n </div>\n ",u.position="absolute",u.top=0,u.left=this.position+"%",n.appendChild(l),this.el=l,this.initEvents(),r&&r(this),l}}}]),e}();t.default=a}])},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(1),a=n.n(i),l=n(2),u=n.n(l);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p,f,d=function(e){return(1==e.getAlpha()?e.toHexString():e.toRgbString()).replace(/ /g,'')},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.StyleManager,r=t.colorPicker;n.addType('gradient',{view:{events:{},templateInput:function(){return''},setValue:function(e){var t=this.gp,n=this.model.getDefaultValue();e=e||n,t&&t.setValue(e,{silent:1}),f&&f.setValue(t.getType()),p&&p.setValue(t.getDirection())},onRender:function(){var o=this,i=this.ppfx,l=this.em,c=this.model,h=s({},t,{},c.get('gradientConfig')||{}),v=h.onCustomInputChange,g=document.createElement('div'),y=r&&"<div class=\"grp-handler-cp-wrap\">\n <div class=\"".concat(i,"field-colorp-c\">\n <div class=\"").concat(i,"checker-bg\"></div>\n <div class=\"").concat(i,"field-color-picker\" ").concat("data-cp","></div>\n </div>\n </div>"),b=new u.a(s({el:g,colorEl:y},h.grapickOpts)),m=this.el.querySelector(".".concat(i,"fields"));m.style.flexWrap='wrap',m.appendChild(g.children[0]),this.gp=b,b.on('change',(function(e){var t=b.getSafeValue();c.setValueFromInput(t,e)})),[['inputDirection','integer','setDirection',{name:'Direction',units:['deg'],defaults:90,fixedValues:['top','right','bottom','left']}],['inputType','select','setType',{name:'Type',defaults:'linear',options:[{value:'radial'},{value:'linear'},{value:'repeating-radial'},{value:'repeating-linear'}]}]].forEach((function(e){var t=e[0],r=h[e[0]];if(r){var i=c.parent,l=e[1],u='object'==a()(r)?r:{},d=n.createType(u.type||l,{model:s({},e[3],{},u),view:{propTarget:o.propTarget}});i&&(d.model.parent=i),d.render(),d.model.on('change:value',(function(t){b[e[2]](t.getFullValue()),v({model:t,input:e,inputDirection:p,inputType:f})})),m.appendChild(d.el),'inputDirection'==t&&(p=d),'inputType'==t&&(f=d)}})),'default'==r&&(r=function(t){var n=t.getEl().querySelector("[".concat("data-cp","]")),r=n.style;r.backgroundColor=t.getColor();var o=l&&l.getConfig()||{},a=o.colorPicker||{},u=o.el,c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=d(e);r.backgroundColor=o,t.setColor(o,n)},p={color:t.getColor(),change:function(e){c(e)},move:function(e){c(e,0)}},f=l&&l.initBaseColorPicker;f?f(n,p):e.$(n).spectrum(s({containerClassName:"".concat(i,"one-bg ").concat(i,"two-color"),appendTo:u||'body',maxSelectionSize:8,showPalette:!0,palette:[],showAlpha:!0,chooseText:'Ok',cancelText:'⨯'},p,{},a))}),r&&b.setColorPicker(r)}}})};function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={grapickOpts:{},colorPicker:'',inputDirection:1,inputType:1,onCustomInputChange:function(){return 0}},r=g({},n,{},t);h(e,r)}}])},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"typeBg",(function(){return p})),n.d(r,"typeImage",(function(){return f})),n.d(r,"typeBgRepeat",(function(){return d})),n.d(r,"typeBgPos",(function(){return h})),n.d(r,"typeBgAttach",(function(){return v})),n.d(r,"typeBgSize",(function(){return g})),n.d(r,"typeColorLin",(function(){return y})),n.d(r,"typeGradient",(function(){return b}));var o=n(0),i=n.n(o),a=n(1),l=n.n(a),u=n(2),c=n.n(u),s='style="max-height: 16px; display: block" viewBox="0 0 24 24"',p={name:' ',property:"__bg-type",type:'radio',defaults:'img',options:[{value:'img',name:"<svg ".concat(s,"><path fill=\"currentColor\" d=\"M8.5 13.5l2.5 3 3.5-4.5 4.5 6H5m16 1V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2z\"/></svg>")},{value:'color',name:"<svg ".concat(s,"><path fill=\"currentColor\" d=\"M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2z\"/></svg>")},{value:'grad',name:"<svg ".concat(s,"><path fill=\"currentColor\" d=\"M11 9h2v2h-2V9m-2 2h2v2H9v-2m4 0h2v2h-2v-2m2-2h2v2h-2V9M7 9h2v2H7V9m12-6H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2M9 18H7v-2h2v2m4 0h-2v-2h2v2m4 0h-2v-2h2v2m2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z\"/></svg>")}]},f={name:' ',property:'background-image',type:'file',functionName:'url',defaults:'none'},d={property:'background-repeat',type:'select',defaults:'repeat',options:[{value:'repeat'},{value:'repeat-x'},{value:'repeat-y'},{value:'no-repeat'}]},h={property:'background-position',type:'select',defaults:'left top',options:[{value:'left top'},{value:'left center'},{value:'left bottom'},{value:'right top'},{value:'right center'},{value:'right bottom'},{value:'center top'},{value:'center center'},{value:'center bottom'}]},v={property:'background-attachment',type:'select',defaults:'scroll',options:[{value:'scroll'},{value:'fixed'},{value:'local'}]},g={property:'background-size',type:'select',defaults:'auto',options:[{value:'auto'},{value:'cover'},{value:'contain'}]},y={name:' ',property:'background-image',type:'color-linear',defaults:'none',full:1},b={name:' ',property:'background-image',type:'gradient',value:'linear-gradient(90deg, #d983a6 0%, #713873 100%)',defaults:'none',full:1},m=function(e,t){var n=t.getType('color'),r=n.model;t.addType('color-linear',{model:r.extend({getFullValue:function(){var e=this.get('value'),t=this.get('defaults');return e?e===t?t:"linear-gradient(".concat(e,",").concat(e,")"):''}}),view:n.view})};function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=w({},{styleGradientOpts:{},propExtender:function(e){return e},typeProps:function(e){return e}},{},t),o=w({},r),a=e.StyleManager,l=a.getType('stack'),u=l.model;o=Object.keys(o).reduce((function(e,t){var r=o[t];return e[t]=n.propExtender(r)||r,e}),{});var s=function(e){var t=[o.typeImage,o.typeBgRepeat,o.typeBgPos,o.typeBgAttach,o.typeBgSize];switch(e){case'color':t=[o.typeColorLin];break;case'grad':t=[o.typeGradient]}return n.typeProps(t,e)||t};c()(e,w({colorPicker:'default',inputDirection:{property:'__gradient-direction'},inputType:{property:'__gradient-type'}},n.styleGradientOpts)),m(0,a),a.addType('bg',{model:u.extend({defaults:function(){return w({},u.prototype.defaults,{detached:1,preview:1,full:1,prepend:1,properties:[o.typeBg].concat(i()(s()))})},init:function(){this.handleTypeChange=this.handleTypeChange.bind(this),this.listenTo(this.getLayers(),'add',this.onNewLayerAdd)},_updateLayerProps:function(e,t){var n=e.get('properties');n.remove(n.filter((function(e,t){return 0!==t}))),s(t).forEach((function(e){return n.push(e)}))},onNewLayerAdd:function(e){var t=e.getPropertyAt(0);e.listenTo(t,'change:value',this.handleTypeChange)},handleTypeChange:function(e,t,n){var r=this.getCurrentLayer();r&&this._updateLayerProps(r,t),n.fromInput&&this.trigger('updateValue')},getLayersFromTarget:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.resultValue,a=[],l=r||e.getStyle()[this.get('property')],u=l["__bg-type"];return u&&this.splitValues(u).forEach((function(e,n){var r=s(e);a.push({properties:[w({},o.typeBg,{value:e})].concat(i()(r.map((function(e){var r=t.splitValues(l[e.property])[n];if('color-linear'==e.type){var o=t.parseValue(r,{complete:1});r=t.splitValues(o.value)[0]}else'file'==e.type&&(r=r&&t.parseValue(r,{complete:1}).value);return w({},e,{},r&&{value:r})}))))})})),a}}),view:l.view})}}])})); //# sourceMappingURL=grapesjs-style-bg.min.js.map /*! grapesjs-preset-webpage - 0.1.11 */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("grapesjs")):"function"==typeof define&&define.amd?define(["grapesjs"],t):"object"==typeof exports?exports["grapesjs-preset-webpage"]=t(require("grapesjs")):e["grapesjs-preset-webpage"]=t(e.grapesjs)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(t,n){t.exports=e},function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(10),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(2))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.cmdImport="gjs-open-import-webpage",t.cmdDeviceDesktop="set-device-desktop",t.cmdDeviceTablet="set-device-tablet",t.cmdDeviceMobile="set-device-mobile",t.cmdClear="canvas-clear"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=r(i),o=n(5),s=r(o),l=n(6),u=r(l),c=n(7),f=r(c),h=n(8),d=r(h),p=n(9),m=r(p),g=n(12),v=r(g),b=n(13),y=r(b),w=n(14),_=r(w),k=n(16),x=r(k),S=n(17),E=r(S),T=n(18),C=r(T),A=n(19),O=r(A);t.default=a.default.plugins.add("gjs-preset-webpage",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:[],modalImportTitle:"Import",modalImportButton:"Import",modalImportLabel:"",modalImportContent:"",importViewerOptions:{},textCleanCanvas:"Are you sure to clean the canvas?",showStylesOnChange:1,textGeneral:"General",textLayout:"Layout",textTypography:"Typography",textDecorations:"Decorations",textExtra:"Extra",customStyleManager:[],blocksBasicOpts:{},navbarOpts:{},countdownOpts:{},formsOpts:{},exportOpts:{},aviaryOpts:0,filestackOpts:0};for(var i in r)i in n||(n[i]=r[i]);var a=n.blocksBasicOpts,o=n.navbarOpts,l=n.countdownOpts,c=n.formsOpts,h=n.exportOpts,p=n.aviaryOpts,g=n.filestackOpts;a&&(0,s.default)(e,a),o&&(0,u.default)(e,o),l&&(0,f.default)(e,l),c&&(0,d.default)(e,c),h&&(0,m.default)(e,h),p&&(0,v.default)(e,p),g&&(0,y.default)(e,g),(0,E.default)(e,n),(0,x.default)(e,n),(0,_.default)(e,n),(0,C.default)(e,n),(0,O.default)(e,n)})},function(e,t,n){/*! grapesjs-blocks-basic - 0.1.7 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),a=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=a.default.plugins.add("gjs-blocks-basic",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r({blocks:["column1","column2","column3","column3-7","text","link","image","video","map"],flexGrid:0,stylePrefix:"",addBasicStyle:!0,category:"Basic",labelColumn1:"1 Column",labelColumn2:"2 Columns",labelColumn3:"3 Columns",labelColumn37:"2 Columns 3/7",labelText:"Text",labelLink:"Link",labelImage:"Image",labelVideo:"Video",labelMap:"Map"},t);n(2).default(e,i)})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.BlockManager,a=n.blocks,o=n.stylePrefix,s=n.flexGrid,l=n.addBasicStyle,u=o+"pbrow",c=o+"cell",f=s?"\n ."+u+" {\n display: flex;\n justify-content: flex-start;\n align-items: stretch;\n flex-wrap: nowrap;\n padding: 10px;\n }\n @media (max-width: 768px) {\n ."+u+" {\n flex-wrap: wrap;\n }\n }":"\n ."+u+" {\n display: table;\n padding: 10px;\n width: 100%;\n }\n @media (max-width: 768px) {\n ."+o+"cell, ."+o+"cell30, ."+o+"cell70 {\n width: 100%;\n display: block;\n }\n }",h=s?"\n ."+c+" {\n min-height: 75px;\n flex-grow: 1;\n flex-basis: 100%;\n }":"\n ."+c+" {\n width: 8%;\n display: table-cell;\n height: 75px;\n }",d="\n ."+o+"cell30 {\n width: 30%;\n }",p="\n ."+o+"cell70 {\n width: 70%;\n }",m={tl:0,tc:0,tr:0,cl:0,cr:0,bl:0,br:0,minDim:1},g=r({},m,{cr:1,bc:0,currentUnit:1,minDim:1,step:.2});s&&(g.keyWidth="flex-basis");var v={class:u,"data-gjs-droppable":"."+c,"data-gjs-resizable":m,"data-gjs-name":"Pbrow"},b={class:c,"data-gjs-draggable":"."+u,"data-gjs-resizable":g,"data-gjs-name":"Cell"};s&&(b["data-gjs-unstylable"]=["width"],b["data-gjs-stylable-require"]=["flex-basis"]);var y=["."+u,"."+c];e.on("selector:add",function(e){return y.indexOf(e.getFullName())>=0&&e.set("private",1)});var w=function(e){var t=[];for(var n in e){var r=e[n],i=r instanceof Array||r instanceof Object;r=i?JSON.stringify(r):r,t.push(n+"="+(i?"'"+r+"'":'"'+r+'"'))}return t.length?" "+t.join(" "):""},_=function(e){return a.indexOf(e)>=0},k=w(v),x=w(b);_("column1")&&i.add("column1",{label:n.labelColumn1,category:n.category,attributes:{class:"gjs-fonts gjs-f-b1"},content:"<div "+k+">\n <div "+x+"></div>\n </div>\n "+(l?"<style>\n "+f+"\n "+h+"\n </style>":"")}),_("column2")&&i.add("column2",{label:n.labelColumn2,attributes:{class:"gjs-fonts gjs-f-b2"},category:n.category,content:"<div "+k+">\n <div "+x+"></div>\n <div "+x+"></div>\n </div>\n "+(l?"<style>\n "+f+"\n "+h+"\n </style>":"")}),_("column3")&&i.add("column3",{label:n.labelColumn3,category:n.category,attributes:{class:"gjs-fonts gjs-f-b3"},content:"<div "+k+">\n <div "+x+"></div>\n <div "+x+"></div>\n <div "+x+"></div>\n </div>\n "+(l?"<style>\n "+f+"\n "+h+"\n </style>":"")}),_("column3-7")&&i.add("column3-7",{label:n.labelColumn37,category:n.category,attributes:{class:"gjs-fonts gjs-f-b37"},content:"<div "+k+">\n <div "+x+' style="'+(s?"flex-basis":"width")+': 30%;"></div>\n <div '+x+' style="'+(s?"flex-basis":"width")+': 70%;"></div>\n </div>\n '+(l?"<style>\n "+f+"\n "+h+"\n "+d+"\n "+p+"\n </style>":"")}),_("text")&&i.add("text",{label:n.labelText,category:n.category,attributes:{class:"gjs-fonts gjs-f-text"},content:{type:"text",content:"Insert your text here",style:{padding:"10px"},activeOnRender:1}}),_("link")&&i.add("link",{label:n.labelLink,category:n.category,attributes:{class:"fa fa-link"},content:{type:"link",content:"Link",style:{color:"#d983a6"}}}),_("image")&&i.add("image",{label:n.labelImage,category:n.category,attributes:{class:"gjs-fonts gjs-f-image"},content:{style:{color:"black"},type:"image",activeOnRender:1}}),_("video")&&i.add("video",{label:n.labelVideo,category:n.category,attributes:{class:"fa fa-youtube-play"},content:{type:"video",src:"img/video2.webm",style:{height:"350px",width:"615px"}}}),_("map")&&i.add("map",{label:n.labelMap,category:n.category,attributes:{class:"fa fa-map-o"},content:{type:"map",style:{height:"350px"}}})}}])})},function(e,t,n){/*! grapesjs-navbar - 0.1.5 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hNavbarRef="h-navbar",t.navbarRef="navbar",t.navbarItemsRef="navbar-items",t.menuRef="navbar-menu"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=r(i),o=n(3),s=r(o),l=n(4),u=r(l),c=n(0);t.default=a.default.plugins.add("gjs-navbar",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:[c.hNavbarRef],defaultStyle:1,navbarClsPfx:"navbar",labelNavbar:"Navbar",labelNavbarContainer:"Navbar Container",labelMenu:"Navbar Menu",labelMenuLink:"Menu link",labelBurger:"Burger",labelBurgerLine:"Burger Line",labelNavbarBlock:"Navbar",labelNavbarCategory:"Extra",labelHome:"Home",labelAbout:"About",labelContact:"Contact"};for(var i in r)i in n||(n[i]=r[i]);(0,s.default)(e,n),(0,u.default)(e,n)})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.BlockManager,a=n.navbarClsPfx||"navbar",o=n.defaultStyle?"\n <style>\n ."+a+"-items-c {\n display: inline-block;\n float: right;\n }\n\n ."+a+" {\n background-color: #222;\n color: #ddd;\n min-height: 50px;\n width: 100%;\n }\n\n ."+a+"-container {\n max-width: 950px;\n margin: 0 auto;\n width: 95%;\n }\n\n ."+a+'-container::after {\n content: "";\n clear: both;\n display: block;\n }\n\n .'+a+"-brand {\n vertical-align: top;\n display: inline-block;\n padding: 5px;\n min-height: 50px;\n min-width: 50px;\n color: inherit;\n text-decoration: none;\n }\n\n ."+a+"-menu {\n padding: 10px 0;\n display: block;\n float: right;\n margin: 0;\n }\n\n ."+a+"-menu-link {\n margin: 0;\n color: inherit;\n text-decoration: none;\n display: inline-block;\n padding: 10px 15px;\n }\n\n ."+a+"-burger {\n margin: 10px 0;\n width: 45px;\n padding: 5px 10px;\n display: none;\n float: right;\n cursor: pointer;\n }\n\n ."+a+"-burger-line {\n padding: 1px;\n background-color: white;\n margin: 5px 0;\n }\n\n @media (max-width: 768px) {\n ."+a+"-burger {\n display: block;\n }\n\n ."+a+"-items-c {\n display: none;\n width: 100%;\n }\n\n ."+a+"-menu {\n width: 100%;\n }\n\n ."+a+"-menu-link {\n display: block;\n }\n }\n </style>\n ":"";n.blocks.indexOf(r.hNavbarRef)>=0&&i.add(r.hNavbarRef,{label:'\n <svg class="gjs-block-svg" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path class="gjs-block-svg-path" d="M22,9 C22,8.4 21.5,8 20.75,8 L3.25,8 C2.5,8 2,8.4 2,9 L2,15 C2,15.6 2.5,16 3.25,16 L20.75,16 C21.5,16 22,15.6 22,15 L22,9 Z M21,15 L3,15 L3,9 L21,9 L21,15 Z" fill-rule="nonzero"></path>\n <rect class="gjs-block-svg-path" x="15" y="10" width="5" height="1"></rect>\n <rect class="gjs-block-svg-path" x="15" y="13" width="5" height="1"></rect>\n <rect class="gjs-block-svg-path" x="15" y="11.5" width="5" height="1"></rect>\n </svg>\n <div class="gjs-block-label">'+n.labelNavbarBlock+"</div>",category:n.labelNavbarCategory,content:'\n <div class="'+a+'" data-gjs-droppable="false" data-gjs-custom-name="'+n.labelNavbar+'" data-gjs="'+r.navbarRef+'">\n <div class="'+a+'-container" data-gjs-droppable="false" data-gjs-draggable="false"\n data-gjs-removable="false" data-gjs-copyable="false" data-gjs-highlightable="false"\n data-gjs-custom-name="'+n.labelNavbarContainer+'">\n\n <a href="/" class="'+a+'-brand" data-gjs-droppable="true"></a>\n\n <div class="'+a+'-burger" data-gjs-type="burger-menu">\n <div class="'+a+'-burger-line" data-gjs-custom-name="'+n.labelBurgerLine+'" data-gjs-droppable="false" data-gjs-draggable="false"></div>\n <div class="'+a+'-burger-line" data-gjs-custom-name="'+n.labelBurgerLine+'" data-gjs-droppable="false" data-gjs-draggable="false"></div>\n <div class="'+a+'-burger-line" data-gjs-custom-name="'+n.labelBurgerLine+'" data-gjs-droppable="false" data-gjs-draggable="false"></div>\n </div>\n\n <div class="'+a+'-items-c" data-gjs="'+r.navbarItemsRef+'">\n <nav class="'+a+'-menu" data-gjs="'+r.menuRef+'" data-gjs-custom-name="'+n.labelMenu+'">\n <a href="#" class="'+a+'-menu-link" data-gjs-custom-name="'+n.labelMenuLink+'" data-gjs-draggable="[data-gjs='+r.menuRef+']">'+n.labelHome+'</a>\n <a href="#" class="'+a+'-menu-link" data-gjs-custom-name="'+n.labelMenuLink+'" data-gjs-draggable="[data-gjs='+r.menuRef+']">'+n.labelAbout+'</a>\n <a href="#" class="'+a+'-menu-link" data-gjs-custom-name="'+n.labelMenuLink+'" data-gjs-draggable="[data-gjs='+r.menuRef+']">'+n.labelContact+"</a>\n </nav>\n </div>\n\n </div>\n </div>\n "+o+"\n "})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.DomComponents,a=i.getType("default"),o=a.model;i.addType("burger-menu",{model:o.extend({defaults:r({},o.prototype.defaults,{"custom-name":n.labelBurger,draggable:!1,droppable:!1,copyable:!1,removable:!1,script:function(){var e,t=0,n=function(){var e,t=document.createElement("void"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==t.style[e])return n[e]}(),r=function(e){var t=window.getComputedStyle(e),n=t.display,r=(t.position,t.visibility,t.height,parseInt(t["max-height"]));if("none"!==n&&"0"!==r)return e.offsetHeight;e.style.height="auto",e.style.display="block",e.style.position="absolute",e.style.visibility="hidden";var i=e.offsetHeight;return e.style.height="",e.style.display="",e.style.position="",e.style.visibility="",i},i=function(e){t=1;var n=r(e),i=e.style;i.display="block",i.transition="max-height 0.25s ease-in-out",i.overflowY="hidden",""==i["max-height"]&&(i["max-height"]=0),0==parseInt(i["max-height"])?(i["max-height"]="0",setTimeout(function(){i["max-height"]=n+"px"},10)):i["max-height"]="0"},a=function(r){if(r.preventDefault(),!t){var a=this.closest("[data-gjs=navbar]"),o=a.querySelector("[data-gjs=navbar-items]");i(o),e||(o.addEventListener(n,function(){t=0;var e=o.style;0==parseInt(e["max-height"])&&(e.display="",e["max-height"]="")}),e=1)}};"gjs-collapse"in this||this.addEventListener("click",a),this["gjs-collapse"]=1}})},{isComponent:function(e){if(e.getAttribute&&"burger-menu"==e.getAttribute("data-gjs-type"))return{type:"burger-menu"}}}),view:a.view})}}])})},function(e,t,n){/*! grapesjs-component-countdown - 0.1.2 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.countdownRef="countdown"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=r(i),o=n(3),s=r(o),l=n(4),u=r(l),c=n(0);t.default=a.default.plugins.add("gjs-component-countdown",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:[c.countdownRef],defaultStyle:!0,startTime:"",endText:"EXPIRED",dateInputType:"date",countdownClsPfx:"countdown",labelCountdown:"Countdown",labelCountdownCategory:"Extra",labelDays:"days",labelHours:"hours",labelMinutes:"minutes",labelSeconds:"seconds"};for(var i in r)i in n||(n[i]=r[i]);(0,s.default)(e,n),(0,u.default)(e,n)})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.DomComponents,a=i.getType("default"),o=i.getType("text"),s=a.model,l=a.view,u=(o.model,o.view,n.countdownClsPfx);i.addType("countdown",{model:s.extend({defaults:r({},s.prototype.defaults,{startfrom:n.startTime,endText:n.endText,droppable:!1,traits:[{label:"Start",name:"startfrom",changeProp:1,type:n.dateInputType},{label:"End text",name:"endText",changeProp:1}],script:function(){var e=new Date("{[ startfrom ]}").getTime(),t=this.querySelector("[data-js=countdown]"),n=this.querySelector("[data-js=countdown-endtext]"),r=this.querySelector("[data-js=countdown-day]"),i=this.querySelector("[data-js=countdown-hour]"),a=this.querySelector("[data-js=countdown-minute]"),o=this.querySelector("[data-js=countdown-second]"),s=this.gjs_countdown_interval;s&&s&&clearInterval(s);var l=function(e,t,n,s){r.innerHTML=e<10?"0"+e:e,i.innerHTML=t<10?"0"+t:t,a.innerHTML=n<10?"0"+n:n,o.innerHTML=s<10?"0"+s:s},u=function(){var r=(new Date).getTime(),i=e-r,a=Math.floor(i/864e5),o=Math.floor(i%864e5/36e5),s=Math.floor(i%36e4/6e4),u=Math.floor(i%6e4/1e3);l(a,o,s,u),i<0&&(clearInterval(c),n.innerHTML="{[ endText ]}",t.style.display="none",n.style.display="")};if(e){var c=setInterval(u,1e3);this.gjs_countdown_interval=c,n.style.display="none",t.style.display="",u()}else l(0,0,0,0)}})},{isComponent:function(e){if(e.getAttribute&&"countdown"==e.getAttribute("data-gjs-type"))return{type:"countdown"}}}),view:l.extend({init:function(){this.listenTo(this.model,"change:startfrom change:endText",this.updateScript);var e=this.model.get("components");e.length||(e.reset(),e.add('\n <span data-js="countdown" class="'+u+'-cont">\n <div class="'+u+'-block">\n <div data-js="countdown-day" class="'+u+'-digit"></div>\n <div class="'+u+'-label">'+n.labelDays+'</div>\n </div>\n <div class="'+u+'-block">\n <div data-js="countdown-hour" class="'+u+'-digit"></div>\n <div class="'+u+'-label">'+n.labelHours+'</div>\n </div>\n <div class="'+u+'-block">\n <div data-js="countdown-minute" class="'+u+'-digit"></div>\n <div class="'+u+'-label">'+n.labelMinutes+'</div>\n </div>\n <div class="'+u+'-block">\n <div data-js="countdown-second" class="'+u+'-digit"></div>\n <div class="'+u+'-label">'+n.labelSeconds+'</div>\n </div>\n </span>\n <span data-js="countdown-endtext" class="'+u+'-endtext"></span>\n '))}})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.BlockManager,a=n.countdownClsPfx,o=n.defaultStyle?"<style>\n ."+a+" {\n text-align: center;\n font-family: Helvetica, serif;\n }\n\n ."+a+"-block {\n display: inline-block;\n margin: 0 10px;\n padding: 10px;\n }\n\n ."+a+"-digit {\n font-size: 5rem;\n }\n\n ."+a+"-endtext {\n font-size: 5rem;\n }\n\n ."+a+"-cont,\n ."+a+"-block {\n display: inline-block;\n }\n </style>":"";n.blocks.indexOf(r.countdownRef)>=0&&i.add(r.countdownRef,{label:n.labelCountdown,category:n.labelCountdownCategory,attributes:{class:"fa fa-clock-o"},content:'\n <div class="'+a+'" data-gjs-type="countdown"></div>\n '+o+"\n "})};var r=n(0)}])})},function(e,t,n){/*! grapesjs-plugin-forms - 0.3.5 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default.plugins.add("gjs-plugin-forms",function(e,t){var r=t||{},i=e.getConfig(),a=(i.stylePrefix,{blocks:["form","input","textarea","select","button","label","checkbox","radio"],labelTraitMethod:"Method",labelTraitAction:"Action",labelTraitState:"State",labelTraitId:"ID",labelTraitFor:"For",labelInputName:"Input",labelTextareaName:"Textarea",labelSelectName:"Select",labelCheckboxName:"Checkbox",labelRadioName:"Radio",labelButtonName:"Button",labelTraitName:"Name",labelTraitPlaceholder:"Placeholder",labelTraitValue:"Value",labelTraitRequired:"Required",labelTraitType:"Type",labelTraitOptions:"Options",labelTraitChecked:"Checked",labelTypeText:"Text",labelTypeEmail:"Email",labelTypePassword:"Password",labelTypeNumber:"Number",labelTypeSubmit:"Submit",labelTypeReset:"Reset",labelTypeButton:"Button",labelNameLabel:"Label",labelForm:"Form",labelSelectOption:"- Select option -",labelOption:"Option",labelStateNormal:"Normal",labelStateSuccess:"Success",labelStateError:"Error"});for(var o in a)o in r||(r[o]=a[o]);n(2).default(e,r),n(3).default(e,r),n(4).default(e,r)})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.DomComponents,a=i.getType("default"),o=i.getType("text"),s=a.model,l=a.view,u=o.model,c=o.view,f={name:"id",label:n.labelTraitId},h={name:"for",label:n.labelTraitFor},d={name:"name",label:n.labelTraitName},p={name:"placeholder",label:n.labelTraitPlaceholder},m={name:"value",label:n.labelTraitValue},g={type:"checkbox",name:"required",label:n.labelTraitRequired},v={label:n.labelTraitChecked,type:"checkbox",name:"checked",changeProp:1};i.addType("form",{model:s.extend({defaults:r({},s.prototype.defaults,{droppable:":not(form)",draggable:":not(form)",traits:[{type:"select",label:n.labelTraitMethod,name:"method",options:[{value:"post",name:"POST"},{value:"get",name:"GET"}]},{label:n.labelTraitAction,name:"action"}]}),init:function(){this.listenTo(this,"change:formState",this.updateFormState)},updateFormState:function(){switch(this.get("formState")){case"success":this.showState("success");break;case"error":this.showState("error");break;default:this.showState("normal")}},showState:function(e){var t,n,r=e||"normal";"success"==r?(t="none",n="block"):"error"==r?(t="block",n="none"):(t="none",n="none");var i=this.getStateModel("success"),a=this.getStateModel("error"),o=i.getStyle(),s=a.getStyle();o.display=n,s.display=t,i.setStyle(o),a.setStyle(s)},getStateModel:function(e){for(var t,n=e||"success",r=this.get("components"),i=0;i<r.length;i++){var a=r.models[i];if(a.get("form-state-type")==n){t=a;break}}if(!t){var o=formMsgSuccess;"error"==n&&(o=formMsgError),t=r.add({"form-state-type":n,type:"text",removable:!1,copyable:!1,draggable:!1,attributes:{"data-form-state":n},content:o})}return t}},{isComponent:function(e){if("FORM"==e.tagName)return{type:"form"}}}),view:l.extend({events:{submit:function(e){e.preventDefault()}}})}),i.addType("input",{model:s.extend({defaults:r({},s.prototype.defaults,{"custom-name":n.labelInputName,tagName:"input",draggable:"form, form *",droppable:!1,traits:[d,p,{label:n.labelTraitType,type:"select",name:"type",options:[{value:"text",name:n.labelTypeText},{value:"email",name:n.labelTypeEmail},{value:"password",name:n.labelTypePassword},{value:"number",name:n.labelTypeNumber}]},g]})},{isComponent:function(e){if("INPUT"==e.tagName)return{type:"input"}}}),view:l});var b=i.getType("input"),y=b.model;i.addType("textarea",{model:b.model.extend({defaults:r({},y.prototype.defaults,{"custom-name":n.labelTextareaName,tagName:"textarea",traits:[d,p,g]})},{isComponent:function(e){if("TEXTAREA"==e.tagName)return{type:"textarea"}}}),view:l}),i.addType("select",{model:s.extend({defaults:r({},y.prototype.defaults,{"custom-name":n.labelSelectName,tagName:"select",traits:[d,{label:n.labelTraitOptions,type:"select-options"},g]})},{isComponent:function(e){if("SELECT"==e.tagName)return{type:"select"}}}),view:function(){return a.view.extend({events:{mousedown:"handleClick"},handleClick:function(e){e.preventDefault()}})}()}),i.addType("checkbox",{model:s.extend({defaults:r({},y.prototype.defaults,{"custom-name":n.labelCheckboxName,copyable:!1,attributes:{type:"checkbox"},traits:[f,d,m,g,v]}),init:function(){this.listenTo(this,"change:checked",this.handleChecked)},handleChecked:function(){var e=this.get("checked"),t=this.get("attributes"),n=this.view;e?t.checked="checked":delete t.checked,n&&(n.el.checked=e),this.set("attributes",r({},t))}},{isComponent:function(e){if("INPUT"==e.tagName&&"checkbox"==e.type)return{type:"checkbox"}}}),view:l.extend({events:{click:"handleClick"},handleClick:function(e){e.preventDefault()}})});var w=i.getType("checkbox");i.addType("radio",{model:w.model.extend({defaults:r({},w.model.prototype.defaults,{"custom-name":n.labelRadioName,attributes:{type:"radio"}})},{isComponent:function(e){if("INPUT"==e.tagName&&"radio"==e.type)return{type:"radio"}}}),view:w.view}),i.addType("button",{model:s.extend({defaults:r({},y.prototype.defaults,{"custom-name":n.labelButtonName,tagName:"button",traits:[{type:"content",label:"Text"},{label:n.labelTraitType,type:"select",name:"type",options:[{value:"submit",name:n.labelTypeSubmit},{value:"reset",name:n.labelTypeReset},{value:"button",name:n.labelTypeButton}]}]})},{isComponent:function(e){if("BUTTON"==e.tagName)return{type:"button"}}}),view:l.extend({events:{click:"handleClick"},init:function(){this.listenTo(this.model,"change:content",this.updateContent)},updateContent:function(){this.el.innerHTML=this.model.get("content")},handleClick:function(e){e.preventDefault()}})}),i.addType("label",{model:u.extend({defaults:r({},u.prototype.defaults,{"custom-name":n.labelNameLabel,tagName:"label",traits:[h]})},{isComponent:function(e){if("LABEL"==e.tagName)return{type:"label"}}}),view:c})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],e.TraitManager),n=t.getType("text");t.addType("content",{events:{keyup:"onChange"},onValueChange:function(){var e=this.model;e.target.set("content",e.get("value"))},getInputEl:function(){return this.inputEl||(this.inputEl=n.prototype.getInputEl.bind(this)(),this.inputEl.value=this.target.get("content")),this.inputEl}}),t.addType("select-options",{events:{keyup:"onChange"},onValueChange:function(){for(var e=this.model.get("value").trim(),t=e.split("\n"),n=[],r=0;r<t.length;r++){var i=t[r],a=i.split("::"),o={tagName:"option",attributes:{}};a[1]?(o.content=a[1],o.attributes.value=a[0]):(o.content=a[0],o.attributes.value=a[0]),n.push(o)}this.target.get("components").reset(n),this.target.view.render()},getInputEl:function(){if(!this.$input){for(var e=this.model,t=this.target,n=(e.get("name"),""),r=t.get("components"),i=0;i<r.length;i++){var a=r.models[i];n+=(a.get("attributes").value||"")+"::"+a.get("content")+"\n"}this.$input=document.createElement("textarea"),this.$input.value=n}return this.$input}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r=e.BlockManager;n.blocks.indexOf("form")>=0&&r.add("form",{label:'\n <svg class="gjs-block-svg" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path class="gjs-block-svg-path" d="M22,5.5 C22,5.2 21.5,5 20.75,5 L3.25,5 C2.5,5 2,5.2 2,5.5 L2,8.5 C2,8.8 2.5,9 3.25,9 L20.75,9 C21.5,9 22,8.8 22,8.5 L22,5.5 Z M21,8 L3,8 L3,6 L21,6 L21,8 Z" fill-rule="nonzero"></path>\n <path class="gjs-block-svg-path" d="M22,10.5 C22,10.2 21.5,10 20.75,10 L3.25,10 C2.5,10 2,10.2 2,10.5 L2,13.5 C2,13.8 2.5,14 3.25,14 L20.75,14 C21.5,14 22,13.8 22,13.5 L22,10.5 Z M21,13 L3,13 L3,11 L21,11 L21,13 Z" fill-rule="nonzero"></path>\n <rect class="gjs-block-svg-path" x="2" y="15" width="10" height="3" rx="0.5"></rect>\n </svg>\n <div class="gjs-block-label">'+n.labelForm+"</div>",category:"Forms",content:'\n <form class="form">\n <div class="form-group">\n <label class="label">Name</label>\n <input placeholder="Type here your name" class="input"/>\n </div>\n <div class="form-group">\n <label class="label">Email</label>\n <input type="email" placeholder="Type here your email" class="input"/>\n </div>\n <div class="form-group">\n <label class="label">Gender</label>\n <input type="checkbox" class="checkbox" value="M">\n <label class="checkbox-label">M</label>\n <input type="checkbox" class="checkbox" value="F">\n <label class="checkbox-label">F</label>\n </div>\n <div class="form-group">\n <label class="label">Message</label>\n <textarea class="textarea"></textarea>\n </div>\n <div class="form-group">\n <button type="submit" class="button">Send</button>\n </div>\n </form>\n '}),n.blocks.indexOf("input")>=0&&r.add("input",{label:'\n <svg class="gjs-block-svg" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path class="gjs-block-svg-path" d="M22,9 C22,8.4 21.5,8 20.75,8 L3.25,8 C2.5,8 2,8.4 2,9 L2,15 C2,15.6 2.5,16 3.25,16 L20.75,16 C21.5,16 22,15.6 22,15 L22,9 Z M21,15 L3,15 L3,9 L21,9 L21,15 Z"></path>\n <polygon class="gjs-block-svg-path" points="4 10 5 10 5 14 4 14"></polygon>\n </svg>\n <div class="gjs-block-label">'+n.labelInputName+"</div>",category:"Forms",content:'<input class="input"/>'}),n.blocks.indexOf("textarea")>=0&&r.add("textarea",{label:'\n <svg class="gjs-block-svg" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path class="gjs-block-svg-path" d="M22,7.5 C22,6.6 21.5,6 20.75,6 L3.25,6 C2.5,6 2,6.6 2,7.5 L2,16.5 C2,17.4 2.5,18 3.25,18 L20.75,18 C21.5,18 22,17.4 22,16.5 L22,7.5 Z M21,17 L3,17 L3,7 L21,7 L21,17 Z"></path>\n <polygon class="gjs-block-svg-path" points="4 8 5 8 5 12 4 12"></polygon>\n <polygon class="gjs-block-svg-path" points="19 7 20 7 20 17 19 17"></polygon>\n <polygon class="gjs-block-svg-path" points="20 8 21 8 21 9 20 9"></polygon>\n <polygon class="gjs-block-svg-path" points="20 15 21 15 21 16 20 16"></polygon>\n </svg>\n <div class="gjs-block-label">'+n.labelTextareaName+"</div>",category:"Forms",content:'<textarea class="textarea"></textarea>'}),n.blocks.indexOf("select")>=0&&r.add("select",{label:'\n <svg class="gjs-block-svg" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path class="gjs-block-svg-path" d="M22,9 C22,8.4 21.5,8 20.75,8 L3.25,8 C2.5,8 2,8.4 2,9 L2,15 C2,15.6 2.5,16 3.25,16 L20.75,16 C21.5,16 22,15.6 22,15 L22,9 Z M21,15 L3,15 L3,9 L21,9 L21,15 Z" fill-rule="nonzero"></path>\n <polygon class="gjs-block-svg-path" transform="translate(18.500000, 12.000000) scale(1, -1) translate(-18.500000, -12.000000) " points="18.5 11 20 13 17 13"></polygon>\n <rect class="gjs-block-svg-path" x="4" y="11.5" width="11" height="1"></rect>\n </svg>\n <div class="gjs-block-label">'+n.labelSelectName+"</div>",category:"Forms",content:'<select class="select">\n '+(n.labelSelectOption?'<option value="">'+n.labelSelectOption+"</option>":"")+'\n <option value="1">'+n.labelOption+" 1</option>\n </select>"}),n.blocks.indexOf("button")>=0&&r.add("button",{label:'\n <svg class="gjs-block-svg" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path class="gjs-block-svg-path" d="M22,9 C22,8.4 21.5,8 20.75,8 L3.25,8 C2.5,8 2,8.4 2,9 L2,15 C2,15.6 2.5,16 3.25,16 L20.75,16 C21.5,16 22,15.6 22,15 L22,9 Z M21,15 L3,15 L3,9 L21,9 L21,15 Z" fill-rule="nonzero"></path>\n <rect class="gjs-block-svg-path" x="4" y="11.5" width="16" height="1"></rect>\n </svg>\n <div class="gjs-block-label">'+n.labelButtonName+"</div>",category:"Forms",content:'<button class="button">Send</button>'}),n.blocks.indexOf("label")>=0&&r.add("label",{label:'\n <svg class="gjs-block-svg" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path class="gjs-block-svg-path" d="M22,11.875 C22,11.35 21.5,11 20.75,11 L3.25,11 C2.5,11 2,11.35 2,11.875 L2,17.125 C2,17.65 2.5,18 3.25,18 L20.75,18 C21.5,18 22,17.65 22,17.125 L22,11.875 Z M21,17 L3,17 L3,12 L21,12 L21,17 Z" fill-rule="nonzero"></path>\n <rect class="gjs-block-svg-path" x="2" y="5" width="14" height="5" rx="0.5"></rect>\n <polygon class="gjs-block-svg-path" fill-rule="nonzero" points="4 13 5 13 5 16 4 16"></polygon>\n </svg>\n <div class="gjs-block-label">'+n.labelNameLabel+"</div>",category:"Forms",content:'<label class="label">Label</label>'}),n.blocks.indexOf("checkbox")>=0&&r.add("checkbox",{label:n.labelCheckboxName,attributes:{class:"fa fa-check-square"},category:"Forms",content:'<input type="checkbox" class="checkbox"/>'}),n.blocks.indexOf("radio")>=0&&r.add("radio",{label:n.labelRadioName,attributes:{class:"fa fa-dot-circle-o"},category:"Forms",content:'<input type="radio" class="radio"/>'})}}])})},function(e,t,n){(function(t,r){/*! grapesjs-plugin-export - 0.1.5 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=50)}([function(e,t,n){"use strict";function r(e){var t=null;return t=l.uint8array?new Uint8Array(e.length):new Array(e.length),a(e,t)}function i(e){return e}function a(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}function o(e){var n=65536,r=t.getTypeOf(e),i=!0;if("uint8array"===r?i=d.applyCanBeUsed.uint8array:"nodebuffer"===r&&(i=d.applyCanBeUsed.nodebuffer),i)for(;n>1;)try{return d.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return d.stringifyByChar(e)}function s(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}var l=n(3),u=n(29),c=n(14),f=n(66),h=n(9);t.newBlob=function(e,n){t.checkSupport("blob");try{return new Blob([e],{type:n})}catch(t){try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,i=new r;return i.append(e),i.getBlob(n)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(e,t,n){var r=[],i=0,a=e.length;if(a<=n)return String.fromCharCode.apply(null,e);for(;i<a;)"array"===t||"nodebuffer"===t?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,a)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,a)))),i+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return l.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return l.nodebuffer&&1===String.fromCharCode.apply(null,c.allocBuffer(1)).length}catch(e){return!1}}()}};t.applyFromCharCode=o;var p={};p.string={string:i,array:function(e){return a(e,new Array(e.length))},arraybuffer:function(e){return p.string.uint8array(e).buffer},uint8array:function(e){return a(e,new Uint8Array(e.length))},nodebuffer:function(e){return a(e,c.allocBuffer(e.length))}},p.array={string:o,array:i,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return c.newBufferFrom(e)}},p.arraybuffer={string:function(e){return o(new Uint8Array(e))},array:function(e){return s(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:i,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return c.newBufferFrom(new Uint8Array(e))}},p.uint8array={string:o,array:function(e){return s(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:i,nodebuffer:function(e){return c.newBufferFrom(e)}},p.nodebuffer={string:o,array:function(e){return s(e,new Array(e.length))},arraybuffer:function(e){return p.nodebuffer.uint8array(e).buffer},uint8array:function(e){return s(e,new Uint8Array(e.length))},nodebuffer:i},t.transformTo=function(e,n){if(n||(n=""),!e)return n;t.checkSupport(e);var r=t.getTypeOf(n);return p[r][e](n)},t.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":l.nodebuffer&&c.isBuffer(e)?"nodebuffer":l.uint8array&&e instanceof Uint8Array?"uint8array":l.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},t.checkSupport=function(e){if(!l[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},t.MAX_VALUE_16BITS=65535,t.MAX_VALUE_32BITS=-1,t.pretty=function(e){var t,n,r="";for(n=0;n<(e||"").length;n++)t=e.charCodeAt(n),r+="\\x"+(t<16?"0":"")+t.toString(16).toUpperCase();return r},t.delay=function(e,t,n){f(function(){e.apply(n||null,t||[])})},t.inherits=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n},t.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},t.prepareContent=function(e,n,i,a,o){return h.Promise.resolve(n).then(function(e){return l.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new h.Promise(function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)}):e}).then(function(n){var s=t.getTypeOf(n);return s?("arraybuffer"===s?n=t.transformTo("uint8array",n):"string"===s&&(o?n=u.decode(n):i&&!0!==a&&(n=r(n))),n):h.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},e.exports=r},function(e,t,n){"use strict";(function(e){function r(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(this,e)}return o(this,e,t,n)}function o(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?h(e,t,n,r):"string"==typeof t?c(e,t,n):d(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t,n,r){return s(t),t<=0?i(e,t):void 0!==n?"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}function u(e,t){if(s(t),e=i(e,t<0?0:0|p(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function c(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(t,n);e=i(e,r);var o=e.write(t,n);return o!==r&&(e=e.slice(0,o)),e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=f(e,t),e}function d(e,t){if(a.isBuffer(t)){var n=0|p(t.length);return e=i(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||X(t.length)?i(e,0):f(e,t);if("Buffer"===t.type&&$(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function g(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return Y(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;u<s;u++)if(a(e,u)===a(t,-1===c?0:u-c)){if(-1===c&&(c=u),u-c+1===l)return c*o}else-1!==c&&(u-=u-c),c=-1}else for(n+l>s&&(n=s-l),u=n;u>=0;u--){for(var f=!0,h=0;h<l;h++)if(a(e,u+h)!==a(t,h)){f=!1;break}if(f)return u}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function k(e,t,n,r){return K(Y(t,e.length-n),e,n,r)}function x(e,t,n,r){return K(q(t),e,n,r)}function S(e,t,n,r){return x(e,t,n,r)}function E(e,t,n,r){return K(V(t),e,n,r)}function T(e,t,n,r){return K(H(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?G.fromByteArray(e):G.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=e[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=e[i+1],u=e[i+2],128==(192&l)&&128==(192&u)&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return O(r)}function O(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function I(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function L(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=W(e[a]);return i}function j(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function z(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,i){return i||z(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,i){return i||z(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,n,r,52,8),n+8}function U(e){if(e=Z(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function q(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function H(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function V(e){return G.toByteArray(U(e))}function K(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function X(e){return e!==e}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ var G=n(54),J=n(55),$=n(24);t.Buffer=a,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return o(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return l(null,e,t,n)},a.allocUnsafe=function(e){return u(null,e)},a.allocUnsafeSlow=function(e){return u(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=g,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):v.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),f=0;f<l;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{var i=t-e;r=new a(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},a.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},a.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),J.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),J.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),J.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),J.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=a.isBuffer(e)?e:Y(new a(e,r).toString()),l=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%l]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(t,n(10))},function(e,t,n){"use strict";(function(e){if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,t.nodebuffer=void 0!==e,t.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)t.blob=!1;else{var r=new ArrayBuffer(0);try{t.blob=0===new Blob([r],{type:"application/zip"}).size}catch(e){try{var i=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,a=new i;a.append(r),t.blob=0===a.getBlob("application/zip").size}catch(e){t.blob=!1}}}try{t.nodestream=!!n(25).Readable}catch(e){t.nodestream=!1}}).call(t,n(2).Buffer)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)return void e.set(t.subarray(n,n+r),i);for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r,i,a,o;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},o={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,a)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(i)},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);u.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||s(a,this)}function a(e){e.end()}var o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var s=n(16),l=n(8);l.inherits=n(7);var u=n(26),c=n(17);l.inherits(r,u);for(var f=o(c.prototype),h=0;h<f.length;h++){var d=f[h];r.prototype[d]||(r.prototype[d]=c.prototype[d])}},function(e,t,n){"use strict";function r(){l.call(this,"utf-8 decode"),this.leftOver=null}function i(){l.call(this,"utf-8 encode")}for(var a=n(0),o=n(3),s=n(14),l=n(1),u=new Array(256),c=0;c<256;c++)u[c]=c>=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;u[254]=u[254]=1;var f=function(e){var t,n,r,i,a,s=e.length,l=0;for(i=0;i<s;i++)n=e.charCodeAt(i),55296==(64512&n)&&i+1<s&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=o.uint8array?new Uint8Array(l):new Array(l),a=0,i=0;a<l;i++)n=e.charCodeAt(i),55296==(64512&n)&&i+1<s&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},h=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+u[e[n]]>t?n:t},d=function(e){var t,n,r,i,o=e.length,s=new Array(2*o);for(n=0,t=0;t<o;)if((r=e[t++])<128)s[n++]=r;else if((i=u[r])>4)s[n++]=65533,t+=i-1;else{for(r&=2===i?31:3===i?15:7;i>1&&t<o;)r=r<<6|63&e[t++],i--;i>1?s[n++]=65533:r<65536?s[n++]=r:(r-=65536,s[n++]=55296|r>>10&1023,s[n++]=56320|1023&r)}return s.length!==n&&(s.subarray?s=s.subarray(0,n):s.length=n),a.applyFromCharCode(s)};t.utf8encode=function(e){return o.nodebuffer?s.newBufferFrom(e,"utf-8"):f(e)},t.utf8decode=function(e){return o.nodebuffer?a.transformTo("nodebuffer",e).toString("utf-8"):(e=a.transformTo(o.uint8array?"uint8array":"array",e),d(e))},a.inherits(r,l),r.prototype.processChunk=function(e){var n=a.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var r=n;n=new Uint8Array(r.length+this.leftOver.length),n.set(this.leftOver,0),n.set(r,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var i=h(n),s=n;i!==n.length&&(o.uint8array?(s=n.subarray(0,i),this.leftOver=n.subarray(i,n.length)):(s=n.slice(0,i),this.leftOver=n.slice(i,n.length))),this.push({data:t.utf8decode(s),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=r,a.inherits(i,l),i.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=i},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function a(e){return null==e}function o(e){return"number"==typeof e}function s(e){return"string"==typeof e}function l(e){return"symbol"==typeof e}function u(e){return void 0===e}function c(e){return"[object RegExp]"===g(e)}function f(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===g(e)}function d(e){return"[object Error]"===g(e)||e instanceof Error}function p(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function g(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=i,t.isNullOrUndefined=a,t.isNumber=o,t.isString=s,t.isSymbol=l,t.isUndefined=u,t.isRegExp=c,t.isObject=f,t.isDate=h,t.isError=d,t.isFunction=p,t.isPrimitive=m,t.isBuffer=e.isBuffer}).call(t,n(2).Buffer)},function(e,t,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:n(80),e.exports={Promise:r}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(12).EventEmitter;n(7)(r,i),r.Readable=n(56),r.Writable=n(62),r.Duplex=n(63),r.Transform=n(64),r.PassThrough=n(65),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function a(){c||(c=!0,e.end())}function o(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(l(),0===i.listenerCount(this,"error"))throw e}function l(){u.removeListener("data",n),e.removeListener("drain",r),u.removeListener("end",a),u.removeListener("close",o),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",l),u.removeListener("close",l),e.removeListener("close",l)}var u=this;u.on("data",n),e.on("drain",r),e._isStdio||t&&!1===t.end||(u.on("end",a),u.on("close",o));var c=!1;return u.on("error",s),e.on("error",s),u.on("end",l),u.on("close",l),e.on("close",l),e.emit("pipe",u),e}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l<i;l++)u[l].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(i=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function o(){m&&d&&(m=!1,d.length?p=d.concat(p):g=-1,p.length&&s())}function s(){if(!m){var e=i(o);m=!0;for(var t=p.length;t;){for(d=p,p=[];++g<t;)d&&d[g].run();g=-1,t=p.length}d=null,m=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var c,f,h=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,p=[],m=!1,g=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new l(e,t)),1!==p.length||m||i(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.prependListener=u,h.prependOnceListener=u,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t,n){"use strict";(function(t){e.exports={isNode:void 0!==t,newBufferFrom:function(e,n){return new t(e,n)},allocBuffer:function(e){return t.alloc?t.alloc(e):new t(e)},isBuffer:function(e){return t.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}}).call(t,n(2).Buffer)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";(function(t){function n(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick(function(){e.apply(null,a)})}}!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports=n:e.exports=t.nextTick}).call(t,n(13))},function(e,t,n){"use strict";(function(t,r){function i(){}function a(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function o(e,t){I=I||n(5),e=e||{},this.objectMode=!!e.objectMode,t instanceof I&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){m(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new x(this),this.corkedRequestsFree.next=new x(this)}function s(e){if(I=I||n(5),!(this instanceof s||this instanceof I))return new s(e);this._writableState=new o(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),A.call(this)}function l(e,t){var n=new Error("write after end");e.emit("error",n),S(t,n)}function u(e,t,n,r){var i=!0;if(!T.isBuffer(n)&&"string"!=typeof n&&null!==n&&void 0!==n&&!t.objectMode){var a=new TypeError("Invalid non-string/buffer chunk");e.emit("error",a),S(r,a),i=!1}return i}function c(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=new T(t,n)),t}function f(e,t,n,r,i){n=c(t,n,r),T.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;if(s||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest=new a(n,r,i),l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else h(e,t,!1,o,n,r,i);return s}function h(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function d(e,t,n,r,i){--t.pendingcb,n?S(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function p(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function m(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(p(n),t)d(e,n,r,t,i);else{var a=y(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||b(e,n),r?E(g,e,n,a,i):g(e,n,a,i)}}function g(e,t,n,r){n||v(e,t),t.pendingcb--,r(),_(e,t)}function v(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function b(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0;n;)i[o]=n,n=n.next,o+=1;h(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,t.corkedRequestsFree=a.next,a.next=null}else{for(;n;){var s=n.chunk,l=n.encoding,u=n.callback;if(h(e,t,!1,t.objectMode?1:s.length,s,l,u),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function _(e,t){var n=y(t);return n&&(0===t.pendingcb?(w(e,t),t.finished=!0,e.emit("finish")):w(e,t)),n}function k(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?S(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function x(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}e.exports=s;var S=n(16),E=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:S,T=n(2).Buffer;s.WritableState=o;var C=n(8);C.inherits=n(7);var A,O={deprecate:n(60)};!function(){try{A=n(11)}catch(e){}finally{A||(A=n(12).EventEmitter)}}();var T=n(2).Buffer;C.inherits(s,A);var I;o.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(o.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var I;s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},s.prototype.write=function(e,t,n){var r=this._writableState,a=!1;return"function"==typeof t&&(n=t,t=null),T.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=i),r.ended?l(this,n):u(this,r,e,n)&&(r.pendingcb++,a=f(this,r,e,t,n)),a},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e},s.prototype._write=function(e,t,n){n(new Error("not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||k(this,r,n)}}).call(t,n(13),n(58).setImmediate)},function(e,t,n){"use strict";function r(e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState=new r(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e){o(t,e)}):o(t)})}function o(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}e.exports=a;var s=n(5),l=n(8);l.inherits=n(7),l.inherits(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(32)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";function r(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}var i=n(9),a=n(36),o=n(37),s=n(38),o=n(37);r.prototype={getContentWorker:function(){var e=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},r.createWorkerFrom=function(e,t,n){return e.pipe(new s).pipe(new o("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){var i=o,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^i[255&(e^t[s])];return-1^e}function i(e,t,n,r){var i=o,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^i[255&(e^t.charCodeAt(s))];return-1^e}var a=n(0),o=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==a.getTypeOf(e)?r(0|t,e,e.length,0):i(0|t,e,e.length,0):0}},function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(11)},function(e,t,n){"use strict";(function(t){function r(e,t){B=B||n(5),e=e||{},this.objectMode=!!e.objectMode,t instanceof B&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(j||(j=n(27).StringDecoder),this.decoder=new j(e.encoding),this.encoding=e.encoding)}function i(e){if(B=B||n(5),!(this instanceof i))return new i(e);this._readableState=new r(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),A.call(this)}function a(e,t,n,r,i){var a=u(t,n);if(a)e.emit("error",a);else if(null===n)t.reading=!1,c(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var l;!t.decoder||i||r||(n=t.decoder.write(n),l=!t.objectMode&&0===n.length),i||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e))),d(e,t)}else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function s(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function l(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function u(e,t){var n=null;return C.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function c(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(L("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?E(h,e):h(e))}function h(e){L("emit readable"),e.emit("readable"),y(e)}function d(e,t){t.readingMore||(t.readingMore=!0,E(p,e,t))}function p(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(L("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function m(e){return function(){var t=e._readableState;L("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&O(e,"data")&&(t.flowing=!0,y(e))}}function g(e){L("readable nexttick read 0"),e.read(0)}function v(e,t){t.resumeScheduled||(t.resumeScheduled=!0,E(b,e,t))}function b(e,t){t.reading||(L("resume read 0"),e.read(0)),t.resumeScheduled=!1,e.emit("resume"),y(e),t.flowing&&!t.reading&&e.read(0)}function y(e){var t=e._readableState;if(L("flow",t.flowing),t.flowing)do{var n=e.read()}while(null!==n&&t.flowing)}function w(e,t){var n,r=t.buffer,i=t.length,a=!!t.decoder,o=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(o)n=r.shift();else if(!e||e>=i)n=a?r.join(""):1===r.length?r[0]:C.concat(r,i),r.length=0;else if(e<r[0].length){var s=r[0];n=s.slice(0,e),r[0]=s.slice(e)}else if(e===r[0].length)n=r.shift();else{n=a?"":new C(e);for(var l=0,u=0,c=r.length;u<c&&l<e;u++){var s=r[0],f=Math.min(e-l,s.length);a?n+=s.slice(0,f):s.copy(n,l,0,f),f<s.length?r[0]=s.slice(f):r.shift(),l+=f}}return n}function _(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,E(k,t,e))}function k(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function x(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function S(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}e.exports=i;var E=n(16),T=n(24),C=n(2).Buffer;i.ReadableState=r;var A,O=(n(12),function(e,t){return e.listeners(t).length});!function(){try{A=n(11)}catch(e){}finally{A||(A=n(12).EventEmitter)}}();var C=n(2).Buffer,I=n(8);I.inherits=n(7);var R=n(57),L=void 0;L=R&&R.debuglog?R.debuglog("stream"):function(){};var j;I.inherits(i,A);var B,B;i.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=new C(e,t),t=""),a(this,n,e,t,!1)},i.prototype.unshift=function(e){return a(this,this._readableState,e,"",!0)},i.prototype.isPaused=function(){return!1===this._readableState.flowing},i.prototype.setEncoding=function(e){return j||(j=n(27).StringDecoder),this._readableState.decoder=new j(e),this._readableState.encoding=e,this};var M=8388608;i.prototype.read=function(e){L("read",e);var t=this._readableState,n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return L("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?_(this):f(this),null;if(0===(e=l(e,t))&&t.ended)return 0===t.length&&_(this),null;var r=t.needReadable;L("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,L("length less than watermark",r)),(t.ended||t.reading)&&(r=!1,L("reading or ended",r)),r&&(L("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),r&&!t.reading&&(e=l(n,t));var i;return i=e>0?w(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&_(this),null!==i&&this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,n){function r(e){L("onunpipe"),e===f&&a()}function i(){L("onend"),e.end()}function a(){L("cleanup"),e.removeListener("close",l),e.removeListener("finish",u),e.removeListener("drain",g),e.removeListener("error",s),e.removeListener("unpipe",r),f.removeListener("end",i),f.removeListener("end",a),f.removeListener("data",o),v=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function o(t){L("ondata"),!1===e.write(t)&&(1!==h.pipesCount||h.pipes[0]!==e||1!==f.listenerCount("data")||v||(L("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++),f.pause())}function s(t){L("onerror",t),c(),e.removeListener("error",s),0===O(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",u),c()}function u(){L("onfinish"),e.removeListener("close",l),c()}function c(){L("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,L("pipe count=%d opts=%j",h.pipesCount,n);var d=(!n||!1!==n.end)&&e!==t.stdout&&e!==t.stderr,p=d?i:a;h.endEmitted?E(p):f.once("end",p),e.on("unpipe",r);var g=m(f);e.on("drain",g);var v=!1;return f.on("data",o),e._events&&e._events.error?T(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",l),e.once("finish",u),e.emit("pipe",f),h.flowing||(L("pipe resume"),f.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var a=S(t.pipes,e);return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var n=A.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&!this._readableState.endEmitted){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&f(this):E(g,this))}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var e=this._readableState;return e.flowing||(L("resume"),e.flowing=!0,v(this,e)),this},i.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(L("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){L("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return x(["error","close","destroy","pause","resume"],function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){L("wrapped _read",t),n&&(n=!1,e.resume())},r},i._fromList=w}).call(t,n(13))},function(e,t,n){"use strict";function r(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function i(e){var t=r(e);if("string"!=typeof t&&(b.isEncoding===y||!y(e)))throw new Error("Unknown encoding: "+e);return t||e}function a(e){this.encoding=i(e);var t;switch(this.encoding){case"utf16le":this.text=h,this.end=d,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=p,this.end=m,t=3;break;default:return this.write=g,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=b.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n?0:(i=o(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n?0:(i=o(t[r]),i>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0)}function l(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(n+2)}}function u(e){var t=this.lastTotal-this.lastNeed,n=l(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t}function h(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}var b=n(61).Buffer,y=b.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=f,a.prototype.text=c,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);i.call(this,e)}e.exports=r;var i=n(18),a=n(8);a.inherits=n(7),a.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r=n(0),i=n(3),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.encode=function(e){for(var t,n,i,o,s,l,u,c=[],f=0,h=e.length,d=h,p="string"!==r.getTypeOf(e);f<e.length;)d=h-f,p?(t=e[f++],n=f<h?e[f++]:0,i=f<h?e[f++]:0):(t=e.charCodeAt(f++),n=f<h?e.charCodeAt(f++):0,i=f<h?e.charCodeAt(f++):0),o=t>>2,s=(3&t)<<4|n>>4,l=d>1?(15&n)<<2|i>>6:64,u=d>2?63&i:64,c.push(a.charAt(o)+a.charAt(s)+a.charAt(l)+a.charAt(u));return c.join("")},t.decode=function(e){var t,n,r,o,s,l,u,c=0,f=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");var h=3*e.length/4;if(e.charAt(e.length-1)===a.charAt(64)&&h--,e.charAt(e.length-2)===a.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");var d;for(d=i.uint8array?new Uint8Array(0|h):new Array(0|h);c<e.length;)o=a.indexOf(e.charAt(c++)),s=a.indexOf(e.charAt(c++)),l=a.indexOf(e.charAt(c++)),u=a.indexOf(e.charAt(c++)),t=o<<2|s>>4,n=(15&s)<<4|l>>2,r=(3&l)<<6|u,d[f++]=t,64!==l&&(d[f++]=n),64!==u&&(d[f++]=r);return d}},function(e,t){var n=e.exports={version:"2.3.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(69);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(19),i=n(15).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";(function(t){function r(e,t,n){switch(e){case"blob":return s.newBlob(s.transformTo("arraybuffer",t),n);case"base64":return c.encode(t);default:return s.transformTo(e,t)}}function i(e,n){var r,i=0,a=null,o=0;for(r=0;r<n.length;r++)o+=n[r].length;switch(e){case"string":return n.join("");case"array":return Array.prototype.concat.apply([],n);case"uint8array":for(a=new Uint8Array(o),r=0;r<n.length;r++)a.set(n[r],i),i+=n[r].length;return a;case"nodebuffer":return t.concat(n);default:throw new Error("concat : unsupported type '"+e+"'")}}function a(e,t){return new h.Promise(function(n,a){var o=[],s=e._internalType,l=e._outputType,u=e._mimeType;e.on("data",function(e,n){o.push(e),t&&t(n)}).on("error",function(e){o=[],a(e)}).on("end",function(){try{var e=r(l,i(s,o),u);n(e)}catch(e){a(e)}o=[]}).resume()})}function o(e,t,n){var r=t;switch(t){case"blob":case"arraybuffer":r="uint8array";break;case"base64":r="string"}try{this._internalType=r,this._outputType=t,this._mimeType=n,s.checkSupport(r),this._worker=e.pipe(new l(r)),e.lock()}catch(e){this._worker=new u("error"),this._worker.error(e)}}var s=n(0),l=n(82),u=n(1),c=n(29),f=n(3),h=n(9),d=null;if(f.nodestream)try{d=n(83)}catch(e){}o.prototype={accumulate:function(e){return a(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){s.delay(t,arguments,n)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(s.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:"nodebuffer"!==this._outputType},e)}},e.exports=o}).call(t,n(2).Buffer)},function(e,t,n){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},function(e,t,n){"use strict";function r(e){a.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=i.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}var i=n(0),a=n(1);i.inherits(r,a),r.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=r},function(e,t,n){"use strict";function r(e){a.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}var i=n(0),a=n(1);i.inherits(r,a),r.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}a.prototype.processChunk.call(this,e)},e.exports=r},function(e,t,n){"use strict";function r(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var i=n(1),a=n(22);n(0).inherits(r,i),r.prototype.processChunk=function(e){this.streamInfo.crc32=a(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=r},function(e,t,n){"use strict";var r=n(1);t.STORE={magic:"\0\0",compressWorker:function(e){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},t.DEFLATE=n(86)},function(e,t,n){"use strict";function r(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){o=n>2e3?2e3:n,n-=o;do{i=i+t[r++]|0,a=a+i|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=r},function(e,t,n){"use strict";function r(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}var i=n(4),a=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var s=new i.Buf8(256),l=0;l<256;l++)s[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;s[254]=s[254]=1,t.string2buf=function(e){var t,n,r,a,o,s=e.length,l=0;for(a=0;a<s;a++)n=e.charCodeAt(a),55296==(64512&n)&&a+1<s&&56320==(64512&(r=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(r-56320),a++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(l),o=0,a=0;o<l;a++)n=e.charCodeAt(a),55296==(64512&n)&&a+1<s&&56320==(64512&(r=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(r-56320),a++),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},t.buf2binstring=function(e){return r(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,i,a,o,l=t||e.length,u=new Array(2*l);for(i=0,n=0;n<l;)if((a=e[n++])<128)u[i++]=a;else if((o=s[a])>4)u[i++]=65533,n+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&n<l;)a=a<<6|63&e[n++],o--;o>1?u[i++]=65533:a<65536?u[i++]=a:(a-=65536,u[i++]=55296|a>>10&1023,u[i++]=56320|1023&a)}return r(u,i)},t.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+s[e[n]]>t?n:t}},function(e,t,n){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=r},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},function(e,t,n){"use strict";var r=n(0),i=n(3),a=n(47),o=n(100),s=n(101),l=n(49);e.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new l(r.transformTo("uint8array",e)):new a(r.transformTo("array",e)):new o(e)}},function(e,t,n){"use strict";function r(e){i.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}var i=n(48);n(0).inherits(r,i),r.prototype.byteAt=function(e){return this.data[this.zero+e]},r.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===n&&this.data[a+2]===r&&this.data[a+3]===i)return a-this.zero;return-1},r.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&n===a[1]&&r===a[2]&&i===a[3]},r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";function r(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}var i=n(0);r.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return i.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=r},function(e,t,n){"use strict";function r(e){i.call(this,e)}var i=n(47);n(0).inherits(r,i),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(51),a=r(i),o=n(52),s=r(o),l=n(103),u=r(l);t.default=a.default.plugins.add("gjs-plugin-export",function(e,t){var n=t||{},r=e.getConfig(),i=r.stylePrefix,a=document.createElement("BUTTON"),o={addExportBtn:1,btnLabel:"Export to ZIP",preHtml:'<!doctype html><html lang="en"><head><meta charset="utf-8"><link rel="stylesheet" href="./css/style.css"></head><body>',postHtml:"</body><html>",preCss:"",postCss:""};for(var l in o)l in n||(n[l]=o[l]);a.innerHTML=n.btnLabel,a.className=i+"btn-prim",e.Commands.add("gjs-export-zip",{run:function(){var t=new s.default,r=t.folder("css"),i="grapesjs_template_"+Date.now()+".zip";t.file("index.html",n.preHtml+e.getHtml()+n.postHtml),r.file("style.css",n.preCss+e.getCss()+n.postCss),t.generateAsync({type:"blob"}).then(function(e){u.default.saveAs(e,i)})}}),n.addExportBtn&&e.on("run:export-template",function(){e.Modal.getContentEl().appendChild(a),a.onclick=function(){e.runCommand("gjs-export-zip")}})})},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}r.prototype=n(53),r.prototype.loadAsync=n(98),r.support=n(3),r.defaults=n(35),r.version="3.1.5",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=n(9),e.exports=r},function(e,t,n){"use strict";function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var i=n(6),a=n(0),o=n(1),s=n(34),l=n(35),u=n(21),c=n(84),f=n(85),h=n(14),d=n(97),p=function(e,t,n){var r,i=a.getTypeOf(t),s=a.extend(n||{},l);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=g(e)),s.createFolders&&(r=m(e))&&v.call(this,r,!0);var f="string"===i&&!1===s.binary&&!1===s.base64;n&&void 0!==n.binary||(s.binary=!f),(t instanceof u&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var p=null;p=t instanceof u||t instanceof o?t:h.isNode&&h.isStream(t)?new d(e,t):a.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var b=new c(e,p,s);this.files[e]=b},m=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},v=function(e,t){return t=void 0!==t?t:l.createFolders,e=g(e),this.files[e]||p.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]},b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(1===arguments.length){if(r(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,p.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(r(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=v.call(this,t),i=this.clone();return i.root=n.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if(n=a.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode}),n.type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");a.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var r=n.comment||this.comment||"";t=f.generateWorker(this,n,r)}catch(e){t=new o("error"),t.error(e)}return new s(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};e.exports=b},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function a(e){var t,n,i,a,o,s=e.length;a=r(e),o=new f(3*s/4-a),n=a>0?s-4:s;var l=0;for(t=0;t<n;t+=4)i=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],o[l++]=i>>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===a?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===a&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(o(r));return i.join("")}function l(e){for(var t,n=e.length,r=n%3,i="",a=[],o=0,l=n-r;o<l;o+=16383)a.push(s(e,o,o+16383>l?l:o+16383));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),a.push(i),a.join("")}t.byteLength=i,t.toByteArray=a,t.fromByteArray=l;for(var u=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=h.length;d<p;++d)u[d]=h[d],c[h.charCodeAt(d)]=d;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=u}return(d?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+f>=1?h/l:h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+d]=255&o,d+=p,o/=256,u-=8);e[n+d-p]|=128*m}},function(e,t,n){var r=function(){try{return n(11)}catch(e){}}();t=e.exports=n(26),t.Stream=r||t,t.Readable=t,t.Writable=n(17),t.Duplex=n(5),t.Transform=n(18),t.PassThrough=n(28)},function(e,t){},function(e,n,i){function a(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;n.setTimeout=function(){return new a(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new a(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},i(59),n.setImmediate=t,n.clearImmediate=r},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[l]=r,s(l),l++}function i(e){delete u[e]}function a(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function o(e){if(c)setTimeout(o,0,e);else{var t=u[e];if(t){c=!0;try{a(t)}finally{i(e),c=!1}}}}if(!e.setImmediate){var s,l=1,u={},c=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){o(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&o(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){o(e.data)},s=function(t){e.port2.postMessage(t)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var e=f.documentElement;s=function(t){var n=f.createElement("script");n.onreadystatechange=function(){o(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(o,0,e)}}(),h.setImmediate=r,h.clearImmediate=i}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(10),n(13))},function(e,t,n){(function(t){function n(e,t){function n(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var i=!1;return n}function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=n}).call(t,n(10))},function(e,t,n){function r(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return o(e,t,n)}var a=n(2),o=a.Buffer;o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=a:(r(a,t),t.Buffer=i),r(o,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.SlowBuffer(e)}},function(e,t,n){e.exports=n(17)},function(e,t,n){e.exports=n(5)},function(e,t,n){e.exports=n(18)},function(e,t,n){e.exports=n(28)},function(e,t,n){n(67),e.exports=n(30).setImmediate},function(e,t,n){var r=n(68),i=n(76);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){var r=n(15),i=n(30),a=n(31),o=n(70),s=function(e,t,n){var l,u,c,f=e&s.F,h=e&s.G,d=e&s.S,p=e&s.P,m=e&s.B,g=e&s.W,v=h?i:i[t]||(i[t]={}),b=v.prototype,y=h?r:d?r[t]:(r[t]||{}).prototype;h&&(n=t);for(l in n)(u=!f&&y&&void 0!==y[l])&&l in v||(c=u?y[l]:n[l],v[l]=h&&"function"!=typeof y[l]?n[l]:m&&u?a(c,r):g&&y[l]==c?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):p&&"function"==typeof c?a(Function.call,c):c,p&&((v.virtual||(v.virtual={}))[l]=c,e&s.R&&b&&!b[l]&&o(b,l,c)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(71),i=n(75);e.exports=n(20)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(72),i=n(73),a=n(74),o=Object.defineProperty;t.f=n(20)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(19);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(20)&&!n(32)(function(){return 7!=Object.defineProperty(n(33)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(19);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r,i,a,o=n(31),s=n(77),l=n(78),u=n(33),c=n(15),f=c.process,h=c.setImmediate,d=c.clearImmediate,p=c.MessageChannel,m=0,g={},v=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){v.call(e.data)};h&&d||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete g[e]},"process"==n(79)(f)?r=function(e){f.nextTick(o(v,e,1))}:p?(i=new p,a=i.port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),v.call(e)}}:function(e){setTimeout(o(v,e,1),0)}),e.exports={set:h,clear:d}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){e.exports=n(15).document&&document.documentElement},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";function r(){}function i(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,e!==r&&l(this,e)}function a(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function o(e,t,n){p(function(){var r;try{r=t(n)}catch(t){return m.reject(e,t)}r===e?m.reject(e,new TypeError("Cannot resolve promise with itself")):m.resolve(e,r)})}function s(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function l(e,t){function n(t){a||(a=!0,m.reject(e,t))}function r(t){a||(a=!0,m.resolve(e,t))}function i(){t(r,n)}var a=!1,o=u(i);"error"===o.status&&n(o.value)}function u(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}function c(e){return e instanceof this?e:m.resolve(new this(r),e)}function f(e){var t=new this(r);return m.reject(t,e)}function h(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var a=new Array(n),o=0,s=-1,l=new this(r);++s<n;)!function(e,r){function s(e){a[r]=e,++o!==n||i||(i=!0,m.resolve(l,a))}t.resolve(e).then(s,function(e){i||(i=!0,m.reject(l,e))})}(e[s],s);return l}function d(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var a=-1,o=new this(r);++a<n;)!function(e){t.resolve(e).then(function(e){i||(i=!0,m.resolve(o,e))},function(e){i||(i=!0,m.reject(o,e))})}(e[a]);return o}var p=n(81),m={},g=["REJECTED"],v=["FULFILLED"],b=["PENDING"];e.exports=i,i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){if("function"!=typeof e&&this.state===v||"function"!=typeof t&&this.state===g)return this;var n=new this.constructor(r);return this.state!==b?o(n,this.state===v?e:t,this.outcome):this.queue.push(new a(n,e,t)),n},a.prototype.callFulfilled=function(e){m.resolve(this.promise,e)},a.prototype.otherCallFulfilled=function(e){o(this.promise,this.onFulfilled,e)},a.prototype.callRejected=function(e){m.reject(this.promise,e)},a.prototype.otherCallRejected=function(e){o(this.promise,this.onRejected,e)},m.resolve=function(e,t){var n=u(s,t);if("error"===n.status)return m.reject(e,n.value);var r=n.value;if(r)l(e,r);else{e.state=v,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},m.reject=function(e,t){e.state=g,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},i.resolve=c,i.reject=f,i.all=h,i.race=d},function(e,t,n){"use strict";(function(t){function n(){c=!0;for(var e,t,n=f.length;n;){for(t=f,f=[],e=-1;++e<n;)t[e]();n=f.length}c=!1}function r(e){1!==f.push(e)||c||i()}var i,a=t.MutationObserver||t.WebKitMutationObserver;if(a){var o=0,s=new a(n),l=t.document.createTextNode("");s.observe(l,{characterData:!0}),i=function(){l.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)i="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){n(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(n,0)};else{var u=new t.MessageChannel;u.port1.onmessage=n,i=function(){u.port2.postMessage(0)}}var c,f=[];e.exports=r}).call(t,n(10))},function(e,t,n){"use strict";function r(e){i.call(this,"ConvertWorker to "+e),this.destType=e}var i=n(1),a=n(0);a.inherits(r,i),r.prototype.processChunk=function(e){this.push({data:a.transformTo(this.destType,e.data),meta:e.meta})},e.exports=r},function(e,t,n){"use strict";function r(e,t,n){i.call(this,t),this._helper=e;var r=this;e.on("data",function(e,t){r.push(e)||r._helper.pause(),n&&n(t)}).on("error",function(e){r.emit("error",e)}).on("end",function(){r.push(null)})}var i=n(25).Readable;n(0).inherits(r,i),r.prototype._read=function(){this._helper.resume()},e.exports=r},function(e,t,n){"use strict";var r=n(34),i=n(36),a=n(6),o=n(21),s=n(1),l=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};l.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");n=e.toLowerCase();var i="string"===n||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!i&&(t=t.pipe(new a.Utf8EncodeWorker)),!o&&i&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(e){t=new s("error"),t.error(e)}return new r(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof o&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof s?this._data:new i(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)l.prototype[u[f]]=c;e.exports=l},function(e,t,n){"use strict";var r=n(39),i=n(96),a=function(e,t){var n=e||t,i=r[n];if(!i)throw new Error(n+" is not a valid compression method !");return i};t.generateWorker=function(e,t,n){var r=new i(t.streamFiles,n,t.platform,t.encodeFileName),o=0;try{e.forEach(function(e,n){o++;var i=a(n.options.compression,t.compression),s=n.options.compressionOptions||t.compressionOptions||{},l=n.dir,u=n.date;n._compressWorker(i,s).withStreamInfo("file",{name:e,dir:l,date:u,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(r)}),r.entriesCount=o}catch(e){r.error(e)}return r}},function(e,t,n){"use strict";function r(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,a=n(87),o=n(0),s=n(1),l=i?"uint8array":"array";t.magic="\b\0",o.inherits(r,s),r.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(l,e.data),!1)},r.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},r.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},r.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},t.compressWorker=function(e){return new r("Deflate",e)},t.uncompressWorker=function(){return new r("Inflate",{})}},function(e,t,n){"use strict";var r=n(4).assign,i=n(88),a=n(91),o=n(44),s={};r(s,i,a,o),e.exports=s},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.options=l.assign({level:p,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var n=s.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==d)throw new Error(c[n]);if(t.header&&s.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(i="string"==typeof t.dictionary?u.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=s.deflateSetDictionary(this.strm,i))!==d)throw new Error(c[n]);this._dict_set=!0}}function i(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}function a(e,t){return t=t||{},t.raw=!0,i(e,t)}function o(e,t){return t=t||{},t.gzip=!0,i(e,t)}var s=n(89),l=n(4),u=n(42),c=n(23),f=n(43),h=Object.prototype.toString,d=0,p=-1,m=0,g=8;r.prototype.push=function(e,t){var n,r,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=u.string2buf(e):"[object ArrayBuffer]"===h.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new l.Buf8(a),i.next_out=0,i.avail_out=a),1!==(n=s.deflate(i,r))&&n!==d)return this.onEnd(n),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(u.buf2binstring(l.shrinkBuf(i.output,i.next_out))):this.onData(l.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&1!==n);return 4===r?(n=s.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===d):2!==r||(this.onEnd(d),i.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=r,t.deflate=i,t.deflateRaw=a,t.gzip=o},function(e,t,n){"use strict";function r(e,t){return e.msg=B[t],t}function i(e){return(e<<1)-(e>4?9:0)}function a(e){for(var t=e.length;--t>=0;)e[t]=0}function o(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(I.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function s(e,t){R._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function l(e,t){e.pending_buf[e.pending++]=t}function u(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function c(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,I.arraySet(t,e.input,e.next_in,i,n),1===e.state.wrap?e.adler=L(e.adler,t,i,n):2===e.state.wrap&&(e.adler=j(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function f(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-ue?e.strstart-(e.w_size-ue):0,u=e.window,c=e.w_mask,f=e.prev,h=e.strstart+le,d=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,u[n+o]===p&&u[n+o-1]===d&&u[n]===u[a]&&u[++n]===u[a+1]){a+=2,n++;do{}while(u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&a<h);if(r=le-(h-a),a=h-le,r>o){if(e.match_start=t,o=r,r>=s)break;d=u[a+o-1],p=u[a+o]}}}while((t=f[t&c])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function h(e){var t,n,r,i,a,o=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-ue)){I.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,n=e.hash_size,t=n;do{r=e.head[--t],e.head[t]=r>=o?r-o:0}while(--n);n=o,t=n;do{r=e.prev[--t],e.prev[t]=r>=o?r-o:0}while(--n);i+=o}if(0===e.strm.avail_in)break;if(n=c(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=se)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+se-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<se)););}while(e.lookahead<ue&&0!==e.strm.avail_in)}function d(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(h(e),0===e.lookahead&&t===M)return be;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,s(e,!1),0===e.strm.avail_out))return be;if(e.strstart-e.block_start>=e.w_size-ue&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):(e.strstart>e.block_start&&(s(e,!1),e.strm.avail_out),be)}function p(e,t){for(var n,r;;){if(e.lookahead<ue){if(h(e),e.lookahead<ue&&t===M)return be;if(0===e.lookahead)break}if(n=0,e.lookahead>=se&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+se-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-ue&&(e.match_length=f(e,n)),e.match_length>=se)if(r=R._tr_tally(e,e.strstart-e.match_start,e.match_length-se),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=se){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+se-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=R._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=e.strstart<se-1?e.strstart:se-1,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function m(e,t){for(var n,r,i;;){if(e.lookahead<ue){if(h(e),e.lookahead<ue&&t===M)return be;if(0===e.lookahead)break}if(n=0,e.lookahead>=se&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+se-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=se-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-ue&&(e.match_length=f(e,n),e.match_length<=5&&(e.strategy===H||e.match_length===se&&e.strstart-e.match_start>4096)&&(e.match_length=se-1)),e.prev_length>=se&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-se,r=R._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-se),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+se-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=se-1,e.strstart++,r&&(s(e,!1),0===e.strm.avail_out))return be}else if(e.match_available){if(r=R._tr_tally(e,0,e.window[e.strstart-1]),r&&s(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return be}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=R._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<se-1?e.strstart:se-1,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function g(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=le){if(h(e),e.lookahead<=le&&t===M)return be;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=se&&e.strstart>0&&(i=e.strstart-1,(r=o[i])===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+le;do{}while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=le-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=se?(n=R._tr_tally(e,1,e.match_length-se),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=R._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function v(e,t){for(var n;;){if(0===e.lookahead&&(h(e),0===e.lookahead)){if(t===M)return be;break}if(e.match_length=0,n=R._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function b(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function y(e){e.window_size=2*e.w_size,a(e.head),e.max_lazy_match=O[e.level].max_lazy,e.good_match=O[e.level].good_length,e.nice_match=O[e.level].nice_length,e.max_chain_length=O[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=se-1,e.match_available=0,e.ins_h=0}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new I.Buf16(2*ae),this.dyn_dtree=new I.Buf16(2*(2*re+1)),this.bl_tree=new I.Buf16(2*(2*ie+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new I.Buf16(oe+1),this.heap=new I.Buf16(2*ne+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new I.Buf16(2*ne+1),a(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function _(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=J,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?fe:ge,e.adler=2===t.wrap?0:1,t.last_flush=M,R._tr_init(t),F):r(e,Z)}function k(e){var t=_(e);return t===F&&y(e.state),t}function x(e,t){return e&&e.state?2!==e.state.wrap?Z:(e.state.gzhead=t,F):Z}function S(e,t,n,i,a,o){if(!e)return Z;var s=1;if(t===q&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>Q||n!==$||i<8||i>15||t<0||t>9||o<0||o>X)return r(e,Z);8===i&&(i=9);var l=new w;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+se-1)/se),l.window=new I.Buf8(2*l.w_size),l.head=new I.Buf16(l.hash_size),l.prev=new I.Buf16(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new I.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=o,l.method=n,k(e)}function E(e,t){return S(e,t,$,ee,te,G)}function T(e,t){var n,s,c,f;if(!e||!e.state||t>D||t<0)return e?r(e,Z):Z;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===ve&&t!==z)return r(e,0===e.avail_out?Y:Z);if(s.strm=e,n=s.last_flush,s.last_flush=t,s.status===fe)if(2===s.wrap)e.adler=0,l(s,31),l(s,139),l(s,8),s.gzhead?(l(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),l(s,255&s.gzhead.time),l(s,s.gzhead.time>>8&255),l(s,s.gzhead.time>>16&255),l(s,s.gzhead.time>>24&255),l(s,9===s.level?2:s.strategy>=V||s.level<2?4:0),l(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(l(s,255&s.gzhead.extra.length),l(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=j(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=he):(l(s,0),l(s,0),l(s,0),l(s,0),l(s,0),l(s,9===s.level?2:s.strategy>=V||s.level<2?4:0),l(s,ke),s.status=ge);else{var h=$+(s.w_bits-8<<4)<<8,d=-1;d=s.strategy>=V||s.level<2?0:s.level<6?1:6===s.level?2:3,h|=d<<6,0!==s.strstart&&(h|=ce),h+=31-h%31,s.status=ge,u(s,h),0!==s.strstart&&(u(s,e.adler>>>16),u(s,65535&e.adler)),e.adler=1}if(s.status===he)if(s.gzhead.extra){for(c=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending!==s.pending_buf_size));)l(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=de)}else s.status=de;if(s.status===de)if(s.gzhead.name){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,l(s,f)}while(0!==f);s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),0===f&&(s.gzindex=0,s.status=pe)}else s.status=pe;if(s.status===pe)if(s.gzhead.comment){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,l(s,f)}while(0!==f);s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),0===f&&(s.status=me)}else s.status=me;if(s.status===me&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&o(e),s.pending+2<=s.pending_buf_size&&(l(s,255&e.adler),l(s,e.adler>>8&255),e.adler=0,s.status=ge)):s.status=ge),0!==s.pending){if(o(e),0===e.avail_out)return s.last_flush=-1,F}else if(0===e.avail_in&&i(t)<=i(n)&&t!==z)return r(e,Y);if(s.status===ve&&0!==e.avail_in)return r(e,Y);if(0!==e.avail_in||0!==s.lookahead||t!==M&&s.status!==ve){var p=s.strategy===V?v(s,t):s.strategy===K?g(s,t):O[s.level].func(s,t);if(p!==we&&p!==_e||(s.status=ve),p===be||p===we)return 0===e.avail_out&&(s.last_flush=-1),F;if(p===ye&&(t===P?R._tr_align(s):t!==D&&(R._tr_stored_block(s,0,0,!1),t===N&&(a(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),o(e),0===e.avail_out))return s.last_flush=-1,F}return t!==z?F:s.wrap<=0?U:(2===s.wrap?(l(s,255&e.adler),l(s,e.adler>>8&255),l(s,e.adler>>16&255),l(s,e.adler>>24&255),l(s,255&e.total_in),l(s,e.total_in>>8&255),l(s,e.total_in>>16&255),l(s,e.total_in>>24&255)):(u(s,e.adler>>>16),u(s,65535&e.adler)),o(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?F:U)}function C(e){var t;return e&&e.state?(t=e.state.status)!==fe&&t!==he&&t!==de&&t!==pe&&t!==me&&t!==ge&&t!==ve?r(e,Z):(e.state=null,t===ge?r(e,W):F):Z}function A(e,t){var n,r,i,o,s,l,u,c,f=t.length;if(!e||!e.state)return Z;if(n=e.state,2===(o=n.wrap)||1===o&&n.status!==fe||n.lookahead)return Z;for(1===o&&(e.adler=L(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===o&&(a(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new I.Buf8(n.w_size),I.arraySet(c,t,f-n.w_size,n.w_size,0),t=c,f=n.w_size),s=e.avail_in,l=e.next_in,u=e.input,e.avail_in=f,e.next_in=0,e.input=t,h(n);n.lookahead>=se;){r=n.strstart,i=n.lookahead-(se-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+se-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--i);n.strstart=r,n.lookahead=se-1,h(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=se-1,n.match_available=0,e.next_in=l,e.input=u,e.avail_in=s,n.wrap=o,F}var O,I=n(4),R=n(90),L=n(40),j=n(41),B=n(23),M=0,P=1,N=3,z=4,D=5,F=0,U=1,Z=-2,W=-3,Y=-5,q=-1,H=1,V=2,K=3,X=4,G=0,J=2,$=8,Q=9,ee=15,te=8,ne=286,re=30,ie=19,ae=2*ne+1,oe=15,se=3,le=258,ue=le+se+1,ce=32,fe=42,he=69,de=73,pe=91,me=103,ge=113,ve=666,be=1,ye=2,we=3,_e=4,ke=3;O=[new b(0,0,0,0,d),new b(4,4,8,4,p),new b(4,5,16,8,p),new b(4,6,32,32,p),new b(4,4,16,16,m),new b(8,16,32,32,m),new b(8,16,128,128,m),new b(8,32,128,256,m),new b(32,128,258,1024,m),new b(32,258,258,4096,m)],t.deflateInit=E,t.deflateInit2=S,t.deflateReset=k,t.deflateResetKeep=_,t.deflateSetHeader=x,t.deflate=T,t.deflateEnd=C,t.deflateSetDictionary=A,t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,n){"use strict";function r(e){for(var t=e.length;--t>=0;)e[t]=0}function i(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?ae[e]:ae[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function l(e,t,n){e.bi_valid>V-n?(e.bi_buf|=t<<e.bi_valid&65535,s(e,e.bi_buf),e.bi_buf=t>>V-e.bi_valid,e.bi_valid+=n-V):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function u(e,t,n){l(e,n[2*t],n[2*t+1])}function c(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function f(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function h(e,t){var n,r,i,a,o,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(a=0;a<=H;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<q;n++)r=e.heap[n],a=l[2*l[2*r+1]+1]+1,a>p&&(a=p,m++),l[2*r+1]=a,r>u||(e.bl_count[a]++,o=0,r>=d&&(o=h[r-d]),s=l[2*r],e.opt_len+=s*(a+o),f&&(e.static_len+=s*(c[2*r+1]+o)));if(0!==m){do{for(a=p-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(r=e.bl_count[a];0!==r;)(i=e.heap[--n])>u||(l[2*i+1]!==a&&(e.opt_len+=(a-l[2*i+1])*l[2*i],l[2*i+1]=a),r--)}}function d(e,t,n){var r,i,a=new Array(H+1),o=0;for(r=1;r<=H;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=c(a[s]++,s))}}function p(){var e,t,n,r,a,o=new Array(H+1);for(n=0,r=0;r<F-1;r++)for(se[r]=n,e=0;e<1<<Q[r];e++)oe[n++]=r;for(oe[n-1]=r,a=0,r=0;r<16;r++)for(le[r]=a,e=0;e<1<<ee[r];e++)ae[a++]=r;for(a>>=7;r<W;r++)for(le[r]=a<<7,e=0;e<1<<ee[r]-7;e++)ae[256+a++]=r;for(t=0;t<=H;t++)o[t]=0;for(e=0;e<=143;)re[2*e+1]=8,e++,o[8]++;for(;e<=255;)re[2*e+1]=9,e++,o[9]++;for(;e<=279;)re[2*e+1]=7,e++,o[7]++;for(;e<=287;)re[2*e+1]=8,e++,o[8]++;for(d(re,Z+1,o),e=0;e<W;e++)ie[2*e+1]=5,ie[2*e]=c(e,5);ue=new i(re,Q,U+1,Z,H),ce=new i(ie,ee,0,W,H),fe=new i(new Array(0),te,0,Y,K)}function m(e){var t;for(t=0;t<Z;t++)e.dyn_ltree[2*t]=0;for(t=0;t<W;t++)e.dyn_dtree[2*t]=0;for(t=0;t<Y;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*X]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function g(e){e.bi_valid>8?s(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function v(e,t,n,r){g(e),r&&(s(e,n),s(e,~n)),L.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function b(e,t,n,r){var i=2*t,a=2*n;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function y(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&b(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!b(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function w(e,t,n){var r,i,a,s,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0===r?u(e,i,t):(a=oe[i],u(e,a+U+1,t),s=Q[a],0!==s&&(i-=se[a],l(e,i,s)),r--,a=o(r),u(e,a,n),0!==(s=ee[a])&&(r-=le[a],l(e,r,s)))}while(c<e.last_lit);u(e,X,t)}function _(e,t){var n,r,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=q,n=0;n<l;n++)0!==a[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):a[2*n+1]=0;for(;e.heap_len<2;)i=e.heap[++e.heap_len]=u<2?++u:0,a[2*i]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=u,n=e.heap_len>>1;n>=1;n--)y(e,a,n);i=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],y(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,y(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],h(e,t),d(a,u,e.bl_count)}function k(e,t,n){var r,i,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s<l&&i===o||(s<u?e.bl_tree[2*i]+=s:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[2*G]++):s<=10?e.bl_tree[2*J]++:e.bl_tree[2*$]++,s=0,a=i,0===o?(l=138,u=3):i===o?(l=6,u=3):(l=7,u=4))}function x(e,t,n){var r,i,a=-1,o=t[1],s=0,c=7,f=4;for(0===o&&(c=138,f=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++s<c&&i===o)){if(s<f)do{u(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==a&&(u(e,i,e.bl_tree),s--),u(e,G,e.bl_tree),l(e,s-3,2)):s<=10?(u(e,J,e.bl_tree),l(e,s-3,3)):(u(e,$,e.bl_tree),l(e,s-11,7));s=0,a=i,0===o?(c=138,f=3):i===o?(c=6,f=3):(c=7,f=4)}}function S(e){var t;for(k(e,e.dyn_ltree,e.l_desc.max_code),k(e,e.dyn_dtree,e.d_desc.max_code),_(e,e.bl_desc),t=Y-1;t>=3&&0===e.bl_tree[2*ne[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function E(e,t,n,r){var i;for(l(e,t-257,5),l(e,n-1,5),l(e,r-4,4),i=0;i<r;i++)l(e,e.bl_tree[2*ne[i]+1],3);x(e,e.dyn_ltree,t-1),x(e,e.dyn_dtree,n-1)}function T(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return B;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return M;for(t=32;t<U;t++)if(0!==e.dyn_ltree[2*t])return M;return B}function C(e){he||(p(),he=!0),e.l_desc=new a(e.dyn_ltree,ue),e.d_desc=new a(e.dyn_dtree,ce),e.bl_desc=new a(e.bl_tree,fe),e.bi_buf=0,e.bi_valid=0,m(e)}function A(e,t,n,r){l(e,(N<<1)+(r?1:0),3),v(e,t,n,!0)}function O(e){l(e,z<<1,3),u(e,X,re),f(e)}function I(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===P&&(e.strm.data_type=T(e)),_(e,e.l_desc),_(e,e.d_desc),o=S(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?A(e,t,n,r):e.strategy===j||a===i?(l(e,(z<<1)+(r?1:0),3),w(e,re,ie)):(l(e,(D<<1)+(r?1:0),3),E(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),w(e,e.dyn_ltree,e.dyn_dtree)),m(e),r&&g(e)}function R(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(oe[n]+U+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1}var L=n(4),j=4,B=0,M=1,P=2,N=0,z=1,D=2,F=29,U=256,Z=U+1+F,W=30,Y=19,q=2*Z+1,H=15,V=16,K=7,X=256,G=16,J=17,$=18,Q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ee=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],te=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ne=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],re=new Array(2*(Z+2));r(re);var ie=new Array(2*W);r(ie);var ae=new Array(512);r(ae);var oe=new Array(256);r(oe);var se=new Array(F);r(se);var le=new Array(W);r(le);var ue,ce,fe,he=!1;t._tr_init=C,t._tr_stored_block=A,t._tr_flush_block=I,t._tr_tally=R,t._tr_align=O},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var n=o.inflateInit2(this.strm,t.windowBits);if(n!==u.Z_OK)throw new Error(c[n]);this.header=new h,o.inflateGetHeader(this.strm,this.header)}function i(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}function a(e,t){return t=t||{},t.raw=!0,i(e,t)}var o=n(92),s=n(4),l=n(42),u=n(44),c=n(23),f=n(43),h=n(95),d=Object.prototype.toString;r.prototype.push=function(e,t){var n,r,i,a,c,f,h=this.strm,p=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?u.Z_FINISH:u.Z_NO_FLUSH,"string"==typeof e?h.input=l.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new s.Buf8(p),h.next_out=0,h.avail_out=p),n=o.inflate(h,u.Z_NO_FLUSH),n===u.Z_NEED_DICT&&m&&(f="string"==typeof m?l.string2buf(m):"[object ArrayBuffer]"===d.call(m)?new Uint8Array(m):m,n=o.inflateSetDictionary(this.strm,f)),n===u.Z_BUF_ERROR&&!0===g&&(n=u.Z_OK,g=!1),n!==u.Z_STREAM_END&&n!==u.Z_OK)return this.onEnd(n),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&n!==u.Z_STREAM_END&&(0!==h.avail_in||r!==u.Z_FINISH&&r!==u.Z_SYNC_FLUSH)||("string"===this.options.to?(i=l.utf8border(h.output,h.next_out),a=h.next_out-i,c=l.buf2string(h.output,i),h.next_out=a,h.avail_out=p-a,a&&s.arraySet(h.output,h.output,i,a,0),this.onData(c)):this.onData(s.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(g=!0)}while((h.avail_in>0||0===h.avail_out)&&n!==u.Z_STREAM_END);return n===u.Z_STREAM_END&&(r=u.Z_FINISH),r===u.Z_FINISH?(n=o.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===u.Z_OK):r!==u.Z_SYNC_FLUSH||(this.onEnd(u.Z_OK),h.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===u.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=r,t.inflate=i,t.inflateRaw=a,t.ungzip=i},function(e,t,n){"use strict";function r(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new b.Buf16(320),this.work=new b.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=N,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new b.Buf32(me),t.distcode=t.distdyn=new b.Buf32(ge),t.sane=1,t.back=-1,O):L}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,a(e)):L}function s(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?L:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,o(e))):L}function l(e,t){var n,r;return e?(r=new i,e.state=r,r.window=null,n=s(e,t),n!==O&&(e.state=null),n):L}function u(e){return l(e,ve)}function c(e){if(be){var t;for(g=new b.Buf32(512),v=new b.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(k(S,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;k(E,e.lens,0,32,v,0,e.work,{bits:5}),be=!1}e.lencode=g,e.lenbits=9,e.distcode=v,e.distbits=5}function f(e,t,n,r){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new b.Buf8(a.wsize)),r>=a.wsize?(b.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),b.arraySet(a.window,t,n-r,i,a.wnext),r-=i,r?(b.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function h(e,t){var n,i,a,o,s,l,u,h,d,p,m,g,v,me,ge,ve,be,ye,we,_e,ke,xe,Se,Ee,Te=0,Ce=new b.Buf8(4),Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return L;n=e.state,n.mode===K&&(n.mode=X),s=e.next_out,a=e.output,u=e.avail_out,o=e.next_in,i=e.input,l=e.avail_in,h=n.hold,d=n.bits,p=l,m=u,xe=O;e:for(;;)switch(n.mode){case N:if(0===n.wrap){n.mode=X;break}for(;d<16;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if(2&n.wrap&&35615===h){n.check=0,Ce[0]=255&h,Ce[1]=h>>>8&255,n.check=w(n.check,Ce,2,0),h=0,d=0,n.mode=z;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",n.mode=he;break}if((15&h)!==P){e.msg="unknown compression method",n.mode=he;break}if(h>>>=4,d-=4,ke=8+(15&h),0===n.wbits)n.wbits=ke;else if(ke>n.wbits){e.msg="invalid window size",n.mode=he;break}n.dmax=1<<ke,e.adler=n.check=1,n.mode=512&h?H:K,h=0,d=0;break;case z:for(;d<16;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if(n.flags=h,(255&n.flags)!==P){e.msg="unknown compression method",n.mode=he;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=he;break}n.head&&(n.head.text=h>>8&1),512&n.flags&&(Ce[0]=255&h,Ce[1]=h>>>8&255,n.check=w(n.check,Ce,2,0)),h=0,d=0,n.mode=D;case D:for(;d<32;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}n.head&&(n.head.time=h),512&n.flags&&(Ce[0]=255&h,Ce[1]=h>>>8&255,Ce[2]=h>>>16&255,Ce[3]=h>>>24&255,n.check=w(n.check,Ce,4,0)),h=0,d=0,n.mode=F;case F:for(;d<16;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}n.head&&(n.head.xflags=255&h,n.head.os=h>>8),512&n.flags&&(Ce[0]=255&h,Ce[1]=h>>>8&255,n.check=w(n.check,Ce,2,0)),h=0,d=0,n.mode=U;case U:if(1024&n.flags){for(;d<16;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}n.length=h,n.head&&(n.head.extra_len=h),512&n.flags&&(Ce[0]=255&h,Ce[1]=h>>>8&255,n.check=w(n.check,Ce,2,0)),h=0,d=0}else n.head&&(n.head.extra=null);n.mode=Z;case Z:if(1024&n.flags&&(g=n.length,g>l&&(g=l),g&&(n.head&&(ke=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),b.arraySet(n.head.extra,i,o,g,ke)),512&n.flags&&(n.check=w(n.check,i,g,o)),l-=g,o+=g,n.length-=g),n.length))break e;n.length=0,n.mode=W;case W:if(2048&n.flags){if(0===l)break e;g=0;do{ke=i[o+g++],n.head&&ke&&n.length<65536&&(n.head.name+=String.fromCharCode(ke))}while(ke&&g<l);if(512&n.flags&&(n.check=w(n.check,i,g,o)),l-=g,o+=g,ke)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Y;case Y:if(4096&n.flags){if(0===l)break e;g=0;do{ke=i[o+g++],n.head&&ke&&n.length<65536&&(n.head.comment+=String.fromCharCode(ke))}while(ke&&g<l);if(512&n.flags&&(n.check=w(n.check,i,g,o)),l-=g,o+=g,ke)break e}else n.head&&(n.head.comment=null);n.mode=q;case q:if(512&n.flags){for(;d<16;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if(h!==(65535&n.check)){e.msg="header crc mismatch",n.mode=he;break}h=0,d=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=K;break;case H:for(;d<32;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}e.adler=n.check=r(h),h=0,d=0,n.mode=V;case V:if(0===n.havedict)return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=l,n.hold=h,n.bits=d,R;e.adler=n.check=1,n.mode=K;case K:if(t===C||t===A)break e;case X:if(n.last){h>>>=7&d,d-=7&d,n.mode=ue;break}for(;d<3;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}switch(n.last=1&h,h>>>=1,d-=1,3&h){case 0:n.mode=G;break;case 1:if(c(n),n.mode=ne,t===A){h>>>=2,d-=2;break e}break;case 2:n.mode=Q;break;case 3:e.msg="invalid block type",n.mode=he}h>>>=2,d-=2;break;case G:for(h>>>=7&d,d-=7&d;d<32;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){e.msg="invalid stored block lengths",n.mode=he;break}if(n.length=65535&h,h=0,d=0,n.mode=J,t===A)break e;case J:n.mode=$;case $:if(g=n.length){if(g>l&&(g=l),g>u&&(g=u),0===g)break e;b.arraySet(a,i,o,g,s),l-=g,o+=g,u-=g,s+=g,n.length-=g;break}n.mode=K;break;case Q:for(;d<14;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if(n.nlen=257+(31&h),h>>>=5,d-=5,n.ndist=1+(31&h),h>>>=5,d-=5,n.ncode=4+(15&h),h>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=he;break}n.have=0,n.mode=ee;case ee:for(;n.have<n.ncode;){for(;d<3;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}n.lens[Ae[n.have++]]=7&h,h>>>=3,d-=3}for(;n.have<19;)n.lens[Ae[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Se={bits:n.lenbits},xe=k(x,n.lens,0,19,n.lencode,0,n.work,Se),n.lenbits=Se.bits,xe){e.msg="invalid code lengths set",n.mode=he;break}n.have=0,n.mode=te;case te:for(;n.have<n.nlen+n.ndist;){for(;Te=n.lencode[h&(1<<n.lenbits)-1],ge=Te>>>24,ve=Te>>>16&255,be=65535&Te,!(ge<=d);){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if(be<16)h>>>=ge,d-=ge,n.lens[n.have++]=be;else{if(16===be){for(Ee=ge+2;d<Ee;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if(h>>>=ge,d-=ge,0===n.have){e.msg="invalid bit length repeat",n.mode=he;break}ke=n.lens[n.have-1],g=3+(3&h),h>>>=2,d-=2}else if(17===be){for(Ee=ge+3;d<Ee;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}h>>>=ge,d-=ge,ke=0,g=3+(7&h),h>>>=3,d-=3}else{for(Ee=ge+7;d<Ee;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}h>>>=ge,d-=ge,ke=0,g=11+(127&h),h>>>=7,d-=7}if(n.have+g>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=he;break}for(;g--;)n.lens[n.have++]=ke}}if(n.mode===he)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=he;break}if(n.lenbits=9,Se={bits:n.lenbits},xe=k(S,n.lens,0,n.nlen,n.lencode,0,n.work,Se),n.lenbits=Se.bits,xe){e.msg="invalid literal/lengths set",n.mode=he;break}if(n.distbits=6,n.distcode=n.distdyn,Se={bits:n.distbits},xe=k(E,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Se),n.distbits=Se.bits,xe){e.msg="invalid distances set",n.mode=he;break}if(n.mode=ne,t===A)break e;case ne:n.mode=re;case re:if(l>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=l,n.hold=h,n.bits=d,_(e,m),s=e.next_out,a=e.output,u=e.avail_out,o=e.next_in,i=e.input,l=e.avail_in,h=n.hold,d=n.bits,n.mode===K&&(n.back=-1);break}for(n.back=0;Te=n.lencode[h&(1<<n.lenbits)-1],ge=Te>>>24,ve=Te>>>16&255,be=65535&Te,!(ge<=d);){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if(ve&&0==(240&ve)){for(ye=ge,we=ve,_e=be;Te=n.lencode[_e+((h&(1<<ye+we)-1)>>ye)],ge=Te>>>24,ve=Te>>>16&255,be=65535&Te,!(ye+ge<=d);){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}h>>>=ye,d-=ye,n.back+=ye}if(h>>>=ge,d-=ge,n.back+=ge,n.length=be,0===ve){n.mode=le;break}if(32&ve){n.back=-1,n.mode=K;break}if(64&ve){e.msg="invalid literal/length code",n.mode=he;break}n.extra=15&ve,n.mode=ie;case ie:if(n.extra){for(Ee=n.extra;d<Ee;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}n.length+=h&(1<<n.extra)-1,h>>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=ae;case ae:for(;Te=n.distcode[h&(1<<n.distbits)-1],ge=Te>>>24,ve=Te>>>16&255,be=65535&Te,!(ge<=d);){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if(0==(240&ve)){for(ye=ge,we=ve,_e=be;Te=n.distcode[_e+((h&(1<<ye+we)-1)>>ye)],ge=Te>>>24,ve=Te>>>16&255,be=65535&Te,!(ye+ge<=d);){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}h>>>=ye,d-=ye,n.back+=ye}if(h>>>=ge,d-=ge,n.back+=ge,64&ve){e.msg="invalid distance code",n.mode=he;break}n.offset=be,n.extra=15&ve,n.mode=oe;case oe:if(n.extra){for(Ee=n.extra;d<Ee;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}n.offset+=h&(1<<n.extra)-1,h>>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=he;break}n.mode=se;case se:if(0===u)break e;if(g=m-u,n.offset>g){if((g=n.offset-g)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=he;break}g>n.wnext?(g-=n.wnext,v=n.wsize-g):v=n.wnext-g,g>n.length&&(g=n.length),me=n.window}else me=a,v=s-n.offset,g=n.length;g>u&&(g=u),u-=g,n.length-=g;do{a[s++]=me[v++]}while(--g);0===n.length&&(n.mode=re);break;case le:if(0===u)break e;a[s++]=n.length,u--,n.mode=re;break;case ue:if(n.wrap){for(;d<32;){if(0===l)break e;l--,h|=i[o++]<<d,d+=8}if(m-=u,e.total_out+=m,n.total+=m,m&&(e.adler=n.check=n.flags?w(n.check,a,m,s-m):y(n.check,a,m,s-m)),m=u,(n.flags?h:r(h))!==n.check){e.msg="incorrect data check",n.mode=he;break}h=0,d=0}n.mode=ce;case ce:if(n.wrap&&n.flags){for(;d<32;){if(0===l)break e;l--,h+=i[o++]<<d,d+=8}if(h!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=he;break}h=0,d=0}n.mode=fe;case fe:xe=I;break e;case he:xe=j;break e;case de:return B;case pe:default:return L}return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=l,n.hold=h,n.bits=d,(n.wsize||m!==e.avail_out&&n.mode<he&&(n.mode<ue||t!==T))&&f(e,e.output,e.next_out,m-e.avail_out)?(n.mode=de,B):(p-=e.avail_in,m-=e.avail_out,e.total_in+=p,e.total_out+=m,n.total+=m,n.wrap&&m&&(e.adler=n.check=n.flags?w(n.check,a,m,e.next_out-m):y(n.check,a,m,e.next_out-m)),e.data_type=n.bits+(n.last?64:0)+(n.mode===K?128:0)+(n.mode===ne||n.mode===J?256:0),(0===p&&0===m||t===T)&&xe===O&&(xe=M),xe)}function d(e){if(!e||!e.state)return L;var t=e.state;return t.window&&(t.window=null),e.state=null,O}function p(e,t){var n;return e&&e.state?(n=e.state,0==(2&n.wrap)?L:(n.head=t,t.done=!1,O)):L}function m(e,t){var n,r,i=t.length;return e&&e.state?(n=e.state,0!==n.wrap&&n.mode!==V?L:n.mode===V&&(r=1,(r=y(r,t,i,0))!==n.check)?j:f(e,t,i,i)?(n.mode=de,B):(n.havedict=1,O)):L}var g,v,b=n(4),y=n(40),w=n(41),_=n(93),k=n(94),x=0,S=1,E=2,T=4,C=5,A=6,O=0,I=1,R=2,L=-2,j=-3,B=-4,M=-5,P=8,N=1,z=2,D=3,F=4,U=5,Z=6,W=7,Y=8,q=9,H=10,V=11,K=12,X=13,G=14,J=15,$=16,Q=17,ee=18,te=19,ne=20,re=21,ie=22,ae=23,oe=24,se=25,le=26,ue=27,ce=28,fe=29,he=30,de=31,pe=32,me=852,ge=592,ve=15,be=!0;t.inflateReset=o,t.inflateReset2=s,t.inflateResetKeep=a,t.inflateInit=u,t.inflateInit2=l,t.inflate=h,t.inflateEnd=d,t.inflateGetHeader=p,t.inflateSetDictionary=m,t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,i,a,o,s,l,u,c,f,h,d,p,m,g,v,b,y,w,_,k,x,S,E,T;n=e.state,r=e.next_in,E=e.input,i=r+(e.avail_in-5),a=e.next_out,T=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),l=n.dmax,u=n.wsize,c=n.whave,f=n.wnext,h=n.window,d=n.hold,p=n.bits,m=n.lencode,g=n.distcode,v=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{p<15&&(d+=E[r++]<<p,p+=8,d+=E[r++]<<p,p+=8),y=m[d&v];t:for(;;){if(w=y>>>24,d>>>=w,p-=w,0==(w=y>>>16&255))T[a++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=m[(65535&y)+(d&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}_=65535&y,w&=15,w&&(p<w&&(d+=E[r++]<<p,p+=8),_+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=E[r++]<<p,p+=8,d+=E[r++]<<p,p+=8),y=g[d&b];n:for(;;){if(w=y>>>24,d>>>=w,p-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(d&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&y,w&=15,p<w&&(d+=E[r++]<<p,(p+=8)<w&&(d+=E[r++]<<p,p+=8)),(k+=d&(1<<w)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=w,p-=w,w=a-o,k>w){if((w=k-w)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=0,S=h,0===f){if(x+=u-w,w<_){_-=w;do{T[a++]=h[x++]}while(--w);x=a-k,S=T}}else if(f<w){if(x+=u+f-w,(w-=f)<_){_-=w;do{T[a++]=h[x++]}while(--w);if(x=0,f<_){w=f,_-=w;do{T[a++]=h[x++]}while(--w);x=a-k,S=T}}}else if(x+=f-w,w<_){_-=w;do{T[a++]=h[x++]}while(--w);x=a-k,S=T}for(;_>2;)T[a++]=S[x++],T[a++]=S[x++],T[a++]=S[x++],_-=3;_&&(T[a++]=S[x++],_>1&&(T[a++]=S[x++]))}else{x=a-k;do{T[a++]=T[x++],T[a++]=T[x++],T[a++]=T[x++],_-=3}while(_>2);_&&(T[a++]=T[x++],_>1&&(T[a++]=T[x++]))}break}}break}}while(r<i&&a<s);_=p>>3,r-=_,p-=_<<3,d&=(1<<p)-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=d,n.bits=p}},function(e,t,n){"use strict";var r=n(4),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,l,u,c,f,h){var d,p,m,g,v,b,y,w,_,k=h.bits,x=0,S=0,E=0,T=0,C=0,A=0,O=0,I=0,R=0,L=0,j=null,B=0,M=new r.Buf16(16),P=new r.Buf16(16),N=null,z=0;for(x=0;x<=15;x++)M[x]=0;for(S=0;S<l;S++)M[t[n+S]]++;for(C=k,T=15;T>=1&&0===M[T];T--);if(C>T&&(C=T),0===T)return u[c++]=20971520,u[c++]=20971520,h.bits=1,0;for(E=1;E<T&&0===M[E];E++);for(C<E&&(C=E),I=1,x=1;x<=15;x++)if(I<<=1,(I-=M[x])<0)return-1;if(I>0&&(0===e||1!==T))return-1;for(P[1]=0,x=1;x<15;x++)P[x+1]=P[x]+M[x];for(S=0;S<l;S++)0!==t[n+S]&&(f[P[t[n+S]]++]=S);if(0===e?(j=N=f,b=19):1===e?(j=i,B-=257,N=a,z-=257,b=256):(j=o,N=s,b=-1),L=0,S=0,x=E,v=c,A=C,O=0,m=-1,R=1<<C,g=R-1,1===e&&R>852||2===e&&R>592)return 1;for(;;){y=x-O,f[S]<b?(w=0,_=f[S]):f[S]>b?(w=N[z+f[S]],_=j[B+f[S]]):(w=96,_=0),d=1<<x-O,p=1<<A,E=p;do{p-=d,u[v+(L>>O)+p]=y<<24|w<<16|_|0}while(0!==p);for(d=1<<x-1;L&d;)d>>=1;if(0!==d?(L&=d-1,L+=d):L=0,S++,0==--M[x]){if(x===T)break;x=t[n+f[S]]}if(x>C&&(L&g)!==m){for(0===O&&(O=C),v+=E,A=x-O,I=1<<A;A+O<T&&!((I-=M[A+O])<=0);)A++,I<<=1;if(R+=1<<A,1===e&&R>852||2===e&&R>592)return 1;m=L&g,u[m]=C<<24|A<<16|v-c|0}}return 0!==L&&(u[v+L]=x-O<<24|64<<16|0),h.bits=C,0}},function(e,t,n){"use strict";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var i=n(0),a=n(1),o=n(6),s=n(22),l=n(45),u=function(e,t){var n,r="";for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r},c=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16},f=function(e,t){return 63&(e||0)},h=function(e,t,n,r,a,h){var d,p,m=e.file,g=e.compression,v=h!==o.utf8encode,b=i.transformTo("string",h(m.name)),y=i.transformTo("string",o.utf8encode(m.name)),w=m.comment,_=i.transformTo("string",h(w)),k=i.transformTo("string",o.utf8encode(w)),x=y.length!==m.name.length,S=k.length!==w.length,E="",T="",C="",A=m.dir,O=m.date,I={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var R=0;t&&(R|=8),v||!x&&!S||(R|=2048);var L=0,j=0;A&&(L|=16),"UNIX"===a?(j=798,L|=c(m.unixPermissions,A)):(j=20,L|=f(m.dosPermissions)),d=O.getUTCHours(),d<<=6,d|=O.getUTCMinutes(),d<<=5,d|=O.getUTCSeconds()/2,p=O.getUTCFullYear()-1980,p<<=4,p|=O.getUTCMonth()+1,p<<=5,p|=O.getUTCDate(),x&&(T=u(1,1)+u(s(b),4)+y,E+="up"+u(T.length,2)+T),S&&(C=u(1,1)+u(s(_),4)+k,E+="uc"+u(C.length,2)+C);var B="";return B+="\n\0",B+=u(R,2),B+=g.magic,B+=u(d,2),B+=u(p,2),B+=u(I.crc32,4),B+=u(I.compressedSize,4),B+=u(I.uncompressedSize,4),B+=u(b.length,2),B+=u(E.length,2),{fileRecord:l.LOCAL_FILE_HEADER+B+b+E,dirRecord:l.CENTRAL_FILE_HEADER+u(j,2)+B+u(_.length,2)+"\0\0\0\0"+u(L,4)+u(r,4)+b+E+_}},d=function(e,t,n,r,a){var o=i.transformTo("string",a(r));return l.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(e,2)+u(e,2)+u(t,4)+u(n,4)+u(o.length,2)+o},p=function(e){return l.DATA_DESCRIPTOR+u(e.crc32,4)+u(e.compressedSize,4)+u(e.uncompressedSize,4)};i.inherits(r,a),r.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},r.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=h(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},r.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=h(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:p(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},r.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,r=d(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},r.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},r.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},r.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},r.prototype.error=function(e){var t=this._sources;if(!a.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},r.prototype.lock=function(){a.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},e.exports=r},function(e,t,n){"use strict";function r(e,t){a.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}var i=n(0),a=n(1);i.inherits(r,a),r.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},r.prototype.pause=function(){return!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},r.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=r},function(e,t,n){"use strict";function r(e){return new a.Promise(function(t,n){var r=e.decompressed.getContentWorker().pipe(new l);r.on("error",function(e){n(e)}).on("end",function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}var i=n(0),a=n(9),o=n(6),i=n(0),s=n(99),l=n(38),u=n(14);e.exports=function(e,t){var n=this;return t=i.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(e)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new s(t);return n.load(e),n}).then(function(e){var n=[a.Promise.resolve(e)],i=e.files;if(t.checkCRC32)for(var o=0;o<i.length;o++)n.push(r(i[o]));return a.Promise.all(n)}).then(function(e){for(var r=e.shift(),i=r.files,a=0;a<i.length;a++){var o=i[a];n.file(o.fileNameStr,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:t.createFolders})}return r.zipComment.length&&(n.comment=r.zipComment),n})}},function(e,t,n){"use strict";function r(e){this.files=[],this.loadOptions=e}var i=n(46),a=n(0),o=n(45),s=n(102),l=(n(6),n(3));r.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(t)+", expected "+a.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4),i=r===t;return this.reader.setIndex(n),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=l.uint8array?"uint8array":"array",n=a.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)e=new s({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(r>0)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=i(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=r},function(e,t,n){"use strict";function r(e){i.call(this,e)}var i=n(48);n(0).inherits(r,i),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";function r(e){i.call(this,e)}var i=n(49);n(0).inherits(r,i),r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";function r(e,t){this.options=e,this.loadOptions=t}var i=n(46),a=n(0),o=n(21),s=n(22),l=n(6),u=n(39),c=n(3),f=function(e){for(var t in u)if(u.hasOwnProperty(t)&&u[t].magic===e)return u[t];return null};r.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=f(this.compressionMethod)))throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r}},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=l.utf8decode(this.fileName),this.fileCommentStr=l.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=a.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var i=a.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=i(e.value);return 1!==t.readInt(1)?null:s(this.fileName)!==t.readInt(4)?null:l.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=i(e.value);return 1!==t.readInt(1)?null:s(this.fileComment)!==t.readInt(4)?null:l.utf8decode(t.readData(e.length-5))}return null}},e.exports=r},function(e,t,n){var r,i=i||function(e){"use strict";if(!(void 0===e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in r,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},o=/constructor/i.test(e.HTMLElement)||e.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent),l=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},u=function(e){var t=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};setTimeout(t,4e4)},c=function(e,t,n){t=[].concat(t);for(var r=t.length;r--;){var i=e["on"+t[r]];if("function"==typeof i)try{i.call(e,n||e)}catch(e){l(e)}}},f=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},h=function(t,l,h){h||(t=f(t));var d,p=this,m=t.type,g="application/octet-stream"===m,v=function(){c(p,"writestart progress write writeend".split(" "))};if(p.readyState=p.INIT,i)return d=n().createObjectURL(t),void setTimeout(function(){r.href=d,r.download=l,a(r),v(),u(d),p.readyState=p.DONE});!function(){if((s||g&&o)&&e.FileReader){var r=new FileReader;return r.onloadend=function(){var t=s?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,p.readyState=p.DONE,v()},r.readAsDataURL(t),void(p.readyState=p.INIT)}d||(d=n().createObjectURL(t)),g?e.location.href=d:e.open(d,"_blank")||(e.location.href=d),p.readyState=p.DONE,v(),u(d)}()},d=h.prototype,p=function(e,t,n){return new h(e,t||e.name||"download",n)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return t=t||e.name||"download",n||(e=f(e)),navigator.msSaveOrOpenBlob(e,t)}:(d.abort=function(){},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,p)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==e&&e.exports?e.exports.saveAs=i:null!==n(104)&&null!==n(105)&&void 0!==(r=function(){return i}.call(t,n,t,e))&&(e.exports=r)},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){(function(t){e.exports=t}).call(t,{})}])})}).call(t,n(1).setImmediate,n(1).clearImmediate)},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[l]=r,s(l),l++}function i(e){delete u[e]}function a(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function o(e){if(c)setTimeout(o,0,e);else{var t=u[e];if(t){c=!0;try{a(t)}finally{i(e),c=!1}}}}if(!e.setImmediate){var s,l=1,u={},c=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){o(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&o(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){o(e.data)},s=function(t){e.port2.postMessage(t)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var e=f.documentElement;s=function(t){var n=f.createElement("script");n.onreadystatechange=function(){o(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(o,0,e)}}(),h.setImmediate=r,h.clearImmediate=i}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(2),n(11))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function o(){m&&d&&(m=!1,d.length?p=d.concat(p):g=-1,p.length&&s())}function s(){if(!m){var e=i(o);m=!0;for(var t=p.length;t;){for(d=p,p=[];++g<t;)d&&d[g].run();g=-1,t=p.length}d=null,m=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var c,f,h=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,p=[],m=!1,g=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new l(e,t)),1!==p.length||m||i(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.prependListener=u,h.prependOnceListener=u,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t,n){/*! grapesjs-aviary - 0.1.2 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default.plugins.add("gjs-aviary",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r=e.getModel(),i=void 0,a={key:"1",onApply:null,getFilename:null,closeOnApply:!0,config:{}};for(var o in a)o in n||(n[o]=a[o]);var s=n.config;s.apiKey=n.key,s.onSave=function(e,t){i.set("src",t);var r="function"==typeof n.getFilename?n.getFilename:c,a=r(i);("function"==typeof n.onApply?n.onApply:f)(t,a,i),n.closeOnApply&&l.close()};var l=new Aviary.Feather(s),u=e.Commands,c=function(e){var t=e.get("src").split("/").pop();return Date.now()+"_"+t.slice(-15)},f=function(t,n){e.AssetManager.add({src:t,name:n})},h=document.createElement("img");u.add("image-editor",{run:function(e,t,n){var a=n||{},o=a.model||e.getSelected();i=o,h.src=o.get("src"),l.launch({image:h}),r.trigger("gjs-aviary:launch",o,l)}})})},function(t,n){t.exports=e}])})},function(e,t,n){/*! grapesjs-plugin-filestack - 0.1.1 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default.plugins.add("gjs-plugin-filestack",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r=e.getConfig(),i=r.stylePrefix||"",a=void 0,o={key:"",btnEl:"",btnText:"Add images",filestackOpts:{accept:"image/*",maxFiles:10},onComplete:function(e,t){}};for(var s in o)s in n||(n[s]=o[s]);if(!filestack)throw new Error("Filestack instance not found");if(!n.key)throw new Error("Filestack's API key not found");var l=filestack.init(n.key);e.on("run:open-assets",function(){var t=e.Modal,r=t.getContentEl(),o=r.querySelector("."+i+"am-file-uploader"),s=r.querySelector("."+i+"am-assets-header"),c=r.querySelector("."+i+"am-assets-cont");o&&(o.style.display="none"),s&&(s.style.display="none"),c.style.width="100%",a||(a=n.btnEl,a||(a=document.createElement("button"),a.className=i+"btn-prim "+i+"btn-filestack",a.innerHTML=n.btnText),a.onclick=function(){l.pick(n.filestackOpts).then(function(e){var t=e.filesUploaded,r=t instanceof Array?t:[t],i=u(r);n.onComplete(r,i)})}),c.insertBefore(a,s)});var u=function(t){var n=t.map(function(e){return e.src=e.url,e});return e.AssetManager.add(n)}})},function(t,n){t.exports=e}])})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),i=function(e){return e&&e.__esModule?e:{default:e}}(r),a=n(3);t.default=function(e,t){var n=e.Commands,r=t.textCleanCanvas;n.add(a.cmdImport,(0,i.default)(e,t)),n.add(a.cmdDeviceDesktop,function(e){return e.setDevice("Desktop")}),n.add(a.cmdDeviceTablet,function(e){return e.setDevice("Tablet")}),n.add(a.cmdDeviceMobile,function(e){return e.setDevice("Mobile portrait")}),n.add(a.cmdClear,function(e){return confirm(r)&&e.runCommand("core:canvas-clear")})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t){var n=e.getConfig("stylePrefix"),i=e.Modal,a=e.CodeManager.getViewer("CodeMirror").clone(),o=document.createElement("div"),s=t.modalImportLabel,l=t.modalImportContent,u=a.editor,c=document.createElement("button");return c.type="button",c.innerHTML=t.modalImportButton,c.className=n+"btn-prim "+n+"btn-import",c.onclick=function(t){e.setComponents(u.getValue().trim()),i.close()},a.set(r({codeName:"htmlmixed",theme:"hopscotch",readOnly:0},t.importViewerOptions)),{run:function(e){var r=this;if(!u){var f=document.createElement("textarea");if(s){var h=document.createElement("div");h.className=n+"import-label",h.innerHTML=s,o.appendChild(h)}o.appendChild(f),o.appendChild(c),a.init(f),u=a.editor}i.setTitle(t.modalImportTitle),i.setContent(o);var d="function"==typeof l?l(e):l;a.setContent(d||""),i.open().getModel().once("change:open",function(){return e.stopCommand(r.id)}),u.refresh()},stop:function(){i.close()}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.BlockManager,r=function(e){return t.blocks.indexOf(e)>=0};r("link-block")&&n.add("link-block",{category:"Basic",label:"Link Block",attributes:{class:"fa fa-link"},content:{type:"link",editable:!1,droppable:!0,style:{display:"inline-block",padding:"5px","min-height":"50px","min-width":"50px"}}}),r("quote")&&n.add("quote",{label:"Quote",category:"Basic",attributes:{class:"fa fa-quote-right"},content:'<blockquote class="quote">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit\n </blockquote>'}),r("text-basic")&&n.add("text-basic",{category:"Basic",label:"Text section",attributes:{class:"gjs-fonts gjs-f-h1p"},content:'<section class="bdg-sect">\n <h1 class="heading">Insert title here</h1>\n <p class="paragraph">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>\n </section>'})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],e.DomComponents),n=t.getType("default");n.model,n.view}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);t.default=function(e,t){var n=e.Panels,i=e.getConfig(),a="sw-visibility",o="export-template",s="open-sm",l="open-layers",u="open-blocks",c="fullscreen",f="preview";i.showDevices=0,n.getPanels().reset([{id:"commands",buttons:[{}]},{id:"options",buttons:[{id:a,command:a,context:a,className:"fa fa-square-o"},{id:f,context:f,command:function(e){return e.runCommand(f)},className:"fa fa-eye"},{id:c,command:c,context:c,className:"fa fa-arrows-alt"},{id:o,className:"fa fa-code",command:function(e){return e.runCommand(o)}},{id:"undo",className:"fa fa-undo",command:function(e){return e.runCommand("core:undo")}},{id:"redo",className:"fa fa-repeat",command:function(e){return e.runCommand("core:redo")}},{id:r.cmdImport,className:"fa fa-download",command:function(e){return e.runCommand(r.cmdImport)}},{id:r.cmdClear,className:"fa fa-trash",command:function(e){return e.runCommand(r.cmdClear)}}]},{id:"views",buttons:[{id:s,command:s,active:!0,className:"fa fa-paint-brush"},{id:"open-tm",command:"open-tm",className:"fa fa-cog"},{id:l,command:l,className:"fa fa-bars"},{id:u,command:u,className:"fa fa-th-large"}]}]),n.addPanel({id:"devices-c"}).get("buttons").add([{id:r.cmdDeviceDesktop,command:r.cmdDeviceDesktop,className:"fa fa-desktop",active:1},{id:r.cmdDeviceTablet,command:r.cmdDeviceTablet,className:"fa fa-tablet"},{id:r.cmdDeviceMobile,command:r.cmdDeviceMobile,className:"fa fa-mobile"}]);var h=n.getButton("views",u);e.on("load",function(){return h&&h.set("active",1)}),t.showStylesOnChange&&e.on("component:selected",function(){var t=n.getButton("views",s),r=n.getButton("views",l);r&&r.get("active")||!e.getSelected()||t&&t.set("active",1)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.StyleManager,r=t.customStyleManager;n.getSectors().reset(r&&r.length?r:[{name:t.textGeneral,open:!1,buildProps:["float","display","position","top","right","left","bottom"]},{name:t.textLayout,open:!1,buildProps:["width","height","max-width","min-height","margin","padding"]},{name:t.textTypography,open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"],properties:[{property:"text-align",list:[{value:"left",className:"fa fa-align-left"},{value:"center",className:"fa fa-align-center"},{value:"right",className:"fa fa-align-right"},{value:"justify",className:"fa fa-align-justify"}]}]},{name:t.textDecorations,open:!1,buildProps:["border-radius-c","background-color","border-radius","border","box-shadow","background"]},{name:t.textExtra,open:!1,buildProps:["transition","perspective","transform"]}])}}])}); /*! grapesjs-plugin-ckeditor - 0.0.9 */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("grapesjs")):"function"==typeof define&&define.amd?define(["grapesjs"],t):"object"==typeof exports?exports["grapesjs-plugin-ckeditor"]=t(require("grapesjs")):e["grapesjs-plugin-ckeditor"]=t(e.grapesjs)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(e){return e&&e.__esModule?e:{default:e}}(o),i=function(e){return e.stopPropagation()};t.default=r.default.plugins.add("gjs-plugin-ckeditor",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,o={options:{},position:"left"};for(var a in o)a in n||(n[a]=o[a]);if(!CKEDITOR)throw new Error("CKEDITOR instance not found");e.setCustomRte({enable:function(t,o){if(o&&"destroyed"!=o.status)return this.focus(t,o),o;t.contentEditable=!0;var a=e.RichTextEditor.getToolbarEl();[].forEach.call(a.children,function(e){e.style.display="none"});var s=n.options;return s.extraPlugins?"string"==typeof s.extraPlugins?s.extraPlugins+=",sharedspace":s.extraPlugins.push("sharedspace"):s.extraPlugins="sharedspace",n.options.sharedSpaces||(n.options.sharedSpaces={top:a}),o=CKEDITOR.inline(t,n.options),o.on("contentDom",function(){var e=o.editable();e.attachListener(e,"click",function(){t.click()})}),o.on("instanceReady",function(t){var n=a.querySelector("#cke_"+o.name);n&&(n.style.display="block"),e.trigger("canvasScroll")}),o.on("dialogShow",function(e){var t=r.default.$(".cke_dialog_background_cover, .cke_dialog");["off","on"].forEach(function(e){return t[e]("mousedown",i)})}),this.focus(t,o),o},disable:function(e,t){e.contentEditable=!1,t&&t.focusManager&&t.focusManager.blur(!0)},focus:function(e,t){t&&t.focusManager.hasFocus||(e.contentEditable=!0,t&&t.focus())}}),e.on("rteToolbarPosUpdate",function(e){switch(n.position){case"center":var t=e.elementWidth/2-e.targetWidth/2;e.left=e.elementLeft+t;break;case"right":var o=e.targetWidth;e.left=e.elementLeft+e.elementWidth-o}e.top<=e.canvasTop&&(e.top=e.elementTop+e.elementHeight),e.left<e.canvasLeft&&(e.left=e.canvasLeft)})})},function(t,n){t.exports=e}])});
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.59 |
proxy
|
phpinfo
|
Settings