/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/girasol-form-making@1.1.1-5.1/dist/FormMaking.common.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
module.exports=function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,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(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.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="fb15")}({"006a":function(e,t,n){n("967a")},"014b":function(e,t,n){"use strict";var r=n("e53d"),a=n("07e3"),o=n("8e60"),i=n("63b6"),s=n("9138"),l=n("ebfd").KEY,u=n("294c"),c=n("dbdb"),f=n("45f2"),d=n("62a0"),p=n("5168"),m=n("ccb9"),h=n("6718"),g=n("47ee"),v=n("9003"),b=n("e4ae"),y=n("f772"),w=n("36c3"),x=n("1bc3"),C=n("aebd"),_=n("a159"),S=n("0395"),k=n("bf0b"),E=n("d9f6"),T=n("c3a1"),N=k.f,R=E.f,O=S.f,P=r.Symbol,A=r.JSON,D=A&&A.stringify,M="prototype",I=p("_hidden"),L=p("toPrimitive"),B={}.propertyIsEnumerable,F=c("symbol-registry"),j=c("symbols"),H=c("op-symbols"),U=Object[M],z="function"==typeof P,W=r.QObject,V=!W||!W[M]||!W[M].findChild,q=o&&u(function(){return 7!=_(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=N(U,t);r&&delete U[t],R(e,t,n),r&&e!==U&&R(U,t,r)}:R,$=function(e){var t=j[e]=_(P[M]);return t._k=e,t},X=z&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},Y=function(e,t,n){return e===U&&Y(H,t,n),b(e),t=x(t,!0),b(n),a(j,t)?(n.enumerable?(a(e,I)&&e[I][t]&&(e[I][t]=!1),n=_(n,{enumerable:C(0,!1)})):(a(e,I)||R(e,I,C(1,{})),e[I][t]=!0),q(e,t,n)):R(e,t,n)},G=function(e,t){b(e);for(var n,r=g(t=w(t)),o=0,i=r.length;o<i;)Y(e,n=r[o++],t[n]);return e},K=function(e){var t=B.call(this,e=x(e,!0));return!(this===U&&a(j,e)&&!a(H,e))&&(!(t||!a(this,e)||!a(j,e)||a(this,I)&&this[I][e])||t)},J=function(e,t){if(e=w(e),t=x(t,!0),e!==U||!a(j,t)||a(H,t)){var n=N(e,t);return!n||!a(j,t)||a(e,I)&&e[I][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=O(w(e)),r=[],o=0;n.length>o;)a(j,t=n[o++])||t==I||t==l||r.push(t);return r},Q=function(e){for(var t,n=e===U,r=O(n?H:w(e)),o=[],i=0;r.length>i;)!a(j,t=r[i++])||n&&!a(U,t)||o.push(j[t]);return o};z||(s((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var t=d(0<arguments.length?arguments[0]:void 0),n=function(e){this===U&&n.call(H,e),a(this,I)&&a(this[I],t)&&(this[I][t]=!1),q(this,t,C(1,e))};return o&&V&&q(U,t,{configurable:!0,set:n}),$(t)})[M],"toString",function(){return this._k}),k.f=J,E.f=Y,n("6abf").f=S.f=Z,n("355d").f=K,n("9aa9").f=Q,o&&!n("b8e3")&&s(U,"propertyIsEnumerable",K,!0),m.f=function(e){return $(p(e))}),i(i.G+i.W+i.F*!z,{Symbol:P});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)p(ee[te++]);for(var ne=T(p.store),re=0;ne.length>re;)h(ne[re++]);i(i.S+i.F*!z,"Symbol",{for:function(e){return a(F,e+="")?F[e]:F[e]=P(e)},keyFor:function(e){if(!X(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),i(i.S+i.F*!z,"Object",{create:function(e,t){return void 0===t?_(e):G(_(e),t)},defineProperty:Y,defineProperties:G,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:Q}),A&&i(i.S+i.F*(!z||u(function(){var e=P();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(y(t)||void 0!==e)&&!X(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!X(t))return t}),r[1]=t,D.apply(A,r)}}),P[M][L]||n("35e8")(P[M],L,P[M].valueOf),f(P,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},"01f9":function(e,t,n){"use strict";var y=n("2d00"),w=n("5ca1"),x=n("2aba"),C=n("32e9"),_=n("84f2"),S=n("41a0"),k=n("7f20"),E=n("38fd"),T=n("2b4c")("iterator"),N=!([].keys&&"next"in[].keys()),R="values",O=function(){return this};e.exports=function(e,t,n,r,o,i,a){S(n,t,r);var s,l,u,c=function(e){if(!N&&e in m)return m[e];switch(e){case"keys":case R:return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d=o==R,p=!1,m=e.prototype,h=m[T]||m["@@iterator"]||o&&m[o],g=h||c(o),v=o?d?c("entries"):g:void 0,b="Array"==t&&m.entries||h;if(b&&(u=E(b.call(new e)))!==Object.prototype&&u.next&&(k(u,f,!0),y||"function"==typeof u[T]||C(u,T,O)),d&&h&&h.name!==R&&(p=!0,g=function(){return h.call(this)}),y&&!a||!N&&!p&&m[T]||C(m,T,g),_[t]=g,_[f]=O,o)if(s={values:d?g:c(R),keys:i?g:c("keys"),entries:v},a)for(l in s)l in m||x(m,l,s[l]);else w(w.P+w.F*(N||p),t,s);return s}},"02f4":function(e,t,n){var l=n("4588"),u=n("be13");e.exports=function(s){return function(e,t){var n,r,o=String(u(e)),i=l(t),a=o.length;return i<0||a<=i?s?"":void 0:(n=o.charCodeAt(i))<55296||56319<n||i+1===a||(r=o.charCodeAt(i+1))<56320||57343<r?s?o.charAt(i):n:s?o.slice(i,i+2):r-56320+(n-55296<<10)+65536}}},"036c":function(e,t,n){n("8d38")},"0390":function(e,t,n){"use strict";var r=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"0395":function(e,t,n){var r=n("36c3"),o=n("6abf").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},"044b":function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
e.exports=function(e){return null!=e&&(n(e)||"function"==typeof(t=e).readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))||!!e._isBuffer);var t}},"07e3":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"0808":function(e,t,n){},"0a06":function(e,t,n){"use strict";var r=n("2444"),o=n("c532"),i=n("f6b4"),a=n("5270");function s(e){this.defaults=e,this.interceptors={request:new i,response:new i}}s.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(r,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},o.forEach(["delete","get","head","options"],function(n){s.prototype[n]=function(e,t){return this.request(o.merge(t||{},{method:n,url:e}))}}),o.forEach(["post","put","patch"],function(r){s.prototype[r]=function(e,t,n){return this.request(o.merge(n||{},{method:r,url:e,data:t}))}}),e.exports=s},"0a49":function(e,t,n){var y=n("9b43"),w=n("626a"),x=n("4bf8"),C=n("9def"),r=n("cd1c");e.exports=function(f,e){var d=1==f,p=2==f,m=3==f,h=4==f,g=6==f,v=5==f||g,b=e||r;return function(e,t,n){for(var r,o,i=x(e),a=w(i),s=y(t,n,3),l=C(a.length),u=0,c=d?b(e,l):p?b(e,0):void 0;u<l;u++)if((v||u in a)&&(o=s(r=a[u],u,i),f))if(d)c[u]=o;else if(o)switch(f){case 3:return!0;case 5:return r;case 6:return u;case 2:c.push(r)}else if(h)return!1;return g?-1:m||h?h:c}}},"0bfb":function(e,t,n){"use strict";var r=n("cb7c");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0d58":function(e,t,n){var r=n("ce10"),o=n("e11e");e.exports=Object.keys||function(e){return r(e,o)}},"0df6":function(e,t,n){"use strict";e.exports=function(t){return function(e){return t.apply(null,e)}}},"0f59":function(e,t,n){},"0fa2":function(e,t,n){n("84f5")},"0fc9":function(e,t,n){var r=n("3a38"),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},1169:function(e,t,n){var r=n("2d95");e.exports=Array.isArray||function(e){return"Array"==r(e)}},"11e9":function(e,t,n){var r=n("52a7"),o=n("4630"),i=n("6821"),a=n("6a99"),s=n("69a8"),l=n("c69a"),u=Object.getOwnPropertyDescriptor;t.f=n("9e1e")?u:function(e,t){if(e=i(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},1495:function(e,t,n){var a=n("86cc"),s=n("cb7c"),l=n("0d58");e.exports=n("9e1e")?Object.defineProperties:function(e,t){s(e);for(var n,r=l(t),o=r.length,i=0;i<o;)a.f(e,n=r[i++],t[n]);return e}},1654:function(e,t,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},1691:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"17b4":function(e,t,n){"use strict";var r=n("cebc"),o=n("c7f0"),i=n("9336"),a=n("c26b"),s={props:["widget","models","rules","remote"],components:{FmUpload:o.a,FmEditor:i.a},data:function(){return{dataModel:this.models[this.widget.model]}},created:function(){var t=this;this.widget.options.remote&&this.remote[this.widget.options.remoteFunc]&&this.remote[this.widget.options.remoteFunc](function(e){t.widget.options.remoteOptions=e.map(function(e){return{value:e[t.widget.options.props.value],label:e[t.widget.options.props.label],children:e[t.widget.options.props.children]}})}),"imgupload"===this.widget.type&&this.remote[this.widget.options.tokenFunc](function(e){t.widget.options.token=e})},methods:{},watch:{dataModel:{deep:!0,handler:function(e){this.models[this.widget.model]=e,a.a.$emit("changeModels",Object(r.a)({},this.models))}},models:{deep:!0,handler:function(e){this.dataModel=e[this.widget.model]}}}},l=n("2877"),u={name:"GenerateFormList",components:{GenerateFormItem:Object(l.a)(s,function(){var n=this,e=n.$createElement,r=n._self._c||e;return r("el-form-item",{staticStyle:{padding:"5px",margin:"0px"},attrs:{label:n.widget.name,prop:n.widget.model,"label-width":0===n.widget.labelWidth?"":n.widget.labelWidth+"px",size:n.widget.size}},["input"==n.widget.type?["number"==n.widget.options.dataType||"integer"==n.widget.options.dataType||"float"==n.widget.options.dataType?r("el-input",{style:{width:n.widget.options.width},attrs:{type:n.widget.options.dataType,placeholder:n.widget.options.placeholder},model:{value:n.dataModel,callback:function(e){n.dataModel=n._n(e)},expression:"dataModel"}}):r("el-input",{style:{width:n.widget.options.width},attrs:{type:n.widget.options.dataType,placeholder:n.widget.options.placeholder},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"textarea"==n.widget.type?[r("el-input",{style:{width:n.widget.options.width},attrs:{type:"textarea",rows:5,disabled:n.widget.options.disabled,placeholder:n.widget.options.placeholder},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"number"==n.widget.type?[r("el-input-number",{style:{width:n.widget.options.width},attrs:{step:n.widget.options.step,"controls-position":"right"},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"radio"==n.widget.type?[r("el-radio-group",{style:{width:n.widget.options.width},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}},n._l(n.widget.options.remote?n.widget.options.remoteOptions:n.widget.options.options,function(e,t){return r("el-radio",{key:t,style:{display:n.widget.options.inline?"inline-block":"block"},attrs:{label:e.value}},[n.widget.options.remote?[n._v(n._s(e.label))]:[n._v(n._s(n.widget.options.showLabel?e.label:e.value))]],2)}),1)]:n._e(),"checkbox"==n.widget.type?[r("el-checkbox-group",{style:{width:n.widget.options.width},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}},n._l(n.widget.options.remote?n.widget.options.remoteOptions:n.widget.options.options,function(e,t){return r("el-checkbox",{key:t,style:{display:n.widget.options.inline?"inline-block":"block"},attrs:{label:e.value}},[n.widget.options.remote?[n._v(n._s(e.label))]:[n._v(n._s(n.widget.options.showLabel?e.label:e.value))]],2)}),1)]:n._e(),"time"==n.widget.type?[r("el-time-picker",{style:{width:n.widget.options.width},attrs:{"is-range":n.widget.options.isRange,placeholder:n.widget.options.placeholder,"start-placeholder":n.widget.options.startPlaceholder,"end-placeholder":n.widget.options.endPlaceholder,readonly:n.widget.options.readonly,disabled:n.widget.options.disabled,editable:n.widget.options.editable,clearable:n.widget.options.clearable,arrowControl:n.widget.options.arrowControl,"value-format":n.widget.options.format},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"date"==n.widget.type?[r("el-date-picker",{style:{width:n.widget.options.width},attrs:{type:n.widget.options.type,placeholder:n.widget.options.placeholder,"start-placeholder":n.widget.options.startPlaceholder,"end-placeholder":n.widget.options.endPlaceholder,readonly:n.widget.options.readonly,disabled:n.widget.options.disabled,editable:n.widget.options.editable,clearable:n.widget.options.clearable,"value-format":n.widget.options.timestamp?"timestamp":n.widget.options.format,format:n.widget.options.format},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"rate"==n.widget.type?[r("el-rate",{attrs:{max:n.widget.options.max,disabled:n.widget.options.disabled,"allow-half":n.widget.options.allowHalf},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"color"==n.widget.type?[r("el-color-picker",{attrs:{disabled:n.widget.options.disabled,"show-alpha":n.widget.options.showAlpha},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"select"==n.widget.type?[r("el-select",{style:{width:n.widget.options.width},attrs:{disabled:n.widget.options.disabled,multiple:n.widget.options.multiple,clearable:n.widget.options.clearable,placeholder:n.widget.options.placeholder,filterable:n.widget.options.filterable},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}},n._l(n.widget.options.remote?n.widget.options.remoteOptions:n.widget.options.options,function(e){return r("el-option",{key:e.value,attrs:{value:e.value,label:n.widget.options.showLabel||n.widget.options.remote?e.label:e.value}})}),1)]:n._e(),"switch"==n.widget.type?[r("el-switch",{attrs:{disabled:n.widget.options.disabled},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"slider"==n.widget.type?[r("el-slider",{style:{width:n.widget.options.width},attrs:{min:n.widget.options.min,max:n.widget.options.max,disabled:n.widget.options.disabled,step:n.widget.options.step,"show-input":n.widget.options.showInput,range:n.widget.options.range},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"imgupload"==n.widget.type?[r("fm-upload",{style:{width:n.widget.options.width},attrs:{disabled:n.widget.options.disabled,width:n.widget.options.size.width,height:n.widget.options.size.height,token:n.widget.options.token,domain:n.widget.options.domain},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"editor"==n.widget.type?[r("fm-editor",{attrs:{width:n.widget.options.width,height:n.widget.options.height},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e(),"cascader"==n.widget.type?[r("el-cascader",{style:{width:n.widget.options.width},attrs:{disabled:n.widget.options.disabled,clearable:n.widget.options.clearable,placeholder:n.widget.options.placeholder,options:n.widget.options.remoteOptions},model:{value:n.dataModel,callback:function(e){n.dataModel=e},expression:"dataModel"}})]:n._e()],2)},[],!1,null,null,null).exports},props:["data","remote","models","rules"],methods:{getStyle:function(e,t){return e.hasOwnProperty("layer")?t.innerStyle:t.style}},watch:{models:{deep:!0,handler:function(e){}}}},c=Object(l.a)(u,function(){var r=this,e=r.$createElement,o=r._self._c||e;return o("div",[r._l(r.data.list,function(n){return["grid"==n.type?[o("el-row",{key:n.key,attrs:{type:"flex",gutter:n.options.gutter?n.options.gutter:0,justify:n.options.justify,align:n.options.align}},r._l(n.columns,function(e,t){return o("el-col",{key:t,style:r.getStyle(n,e),attrs:{span:e.span}},[r._l(e.list,function(e){return[e.hasOwnProperty("config")?[o("generate-form-list",{key:e.key,attrs:{data:e,remote:r.remote,models:r.models,rules:r.rules}})]:["blank"==e.type?o("el-form-item",{key:e.key,attrs:{label:e.name,prop:e.model}},[r._t(e.model,null,{model:r.models})],2):o("generate-form-item",{key:e.key,attrs:{models:r.models,remote:r.remote,rules:r.rules,widget:e}})]]})],2)}),1)]:"blank"==n.type?[o("el-form-item",{key:n.key,attrs:{label:n.name,prop:n.model}},[r._t(n.model,null,{model:r.models})],2)]:[o("generate-form-item",{key:n.key,attrs:{models:r.models,rules:r.rules,widget:n,remote:r.remote}})]]})],2)},[],!1,null,"246a94b9",null);t.a=c.exports},1980:function(e,t,n){var r;"undefined"!=typeof self&&self,e.exports=(r=n("53fe"),function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,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(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.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="fb15")}({"02f4":function(e,t,n){var l=n("4588"),u=n("be13");e.exports=function(s){return function(e,t){var n,r,o=String(u(e)),i=l(t),a=o.length;return i<0||a<=i?s?"":void 0:(n=o.charCodeAt(i))<55296||56319<n||i+1===a||(r=o.charCodeAt(i+1))<56320||57343<r?s?o.charAt(i):n:s?o.slice(i,i+2):r-56320+(n-55296<<10)+65536}}},"0390":function(e,t,n){"use strict";var r=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"07e3":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"0bfb":function(e,t,n){"use strict";var r=n("cb7c");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0fc9":function(e,t,n){var r=n("3a38"),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},1654:function(e,t,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},1691:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(e,t,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(e,t,n){var o=n("f772");e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(e,t,n){var r=n("f772"),o=n("e53d").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"20fd":function(e,t,n){"use strict";var r=n("d9f6"),o=n("aebd");e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},"214f":function(e,t,n){"use strict";n("b0c5");var c=n("2aba"),f=n("32e9"),d=n("79e5"),p=n("be13"),m=n("2b4c"),h=n("520a"),g=m("species"),v=!d(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),b=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(n,e,t){var r=m(n),i=!d(function(){var e={};return e[r]=function(){return 7},7!=""[n](e)}),o=i?!d(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},"split"===n&&(t.constructor={},t.constructor[g]=function(){return t}),t[r](""),!e}):void 0;if(!i||!o||"replace"===n&&!v||"split"===n&&!b){var a=/./[r],s=t(p,r,""[n],function(e,t,n,r,o){return t.exec===h?i&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),l=s[0],u=s[1];c(String.prototype,n,l),f(RegExp.prototype,r,2==e?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)})}}},"230e":function(e,t,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"23c6":function(e,t,n){var o=n("2d95"),i=n("2b4c")("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},"241e":function(e,t,n){var r=n("25eb");e.exports=function(e){return Object(r(e))}},"25eb":function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},"294c":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"2aba":function(e,t,n){var i=n("7726"),a=n("32e9"),s=n("69a8"),l=n("ca5a")("src"),r=n("fa5b"),o="toString",u=(""+r).split(o);n("8378").inspectSource=function(e){return r.call(e)},(e.exports=function(e,t,n,r){var o="function"==typeof n;o&&(s(n,"name")||a(n,"name",t)),e[t]!==n&&(o&&(s(n,l)||a(n,l,e[t]?""+e[t]:u.join(String(t)))),e===i?e[t]=n:r?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,o,function(){return"function"==typeof this&&this[l]||r.call(this)})},"2b4c":function(e,t,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,a="function"==typeof i,s=e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))};s.store=r},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"2fdb":function(e,t,n){"use strict";var r=n("5ca1"),o=n("d2c8"),i="includes";r(r.P+r.F*n("5147")(i),"String",{includes:function(e){return!!~o(this,e,i).indexOf(e,1<arguments.length?arguments[1]:void 0)}})},"30f1":function(e,t,n){"use strict";var y=n("b8e3"),w=n("63b6"),x=n("9138"),C=n("35e8"),_=n("481b"),S=n("8f60"),k=n("45f2"),E=n("53e2"),T=n("5168")("iterator"),N=!([].keys&&"next"in[].keys()),R="values",O=function(){return this};e.exports=function(e,t,n,r,o,i,a){S(n,t,r);var s,l,u,c=function(e){if(!N&&e in m)return m[e];switch(e){case"keys":case R:return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d=o==R,p=!1,m=e.prototype,h=m[T]||m["@@iterator"]||o&&m[o],g=h||c(o),v=o?d?c("entries"):g:void 0,b="Array"==t&&m.entries||h;if(b&&(u=E(b.call(new e)))!==Object.prototype&&u.next&&(k(u,f,!0),y||"function"==typeof u[T]||C(u,T,O)),d&&h&&h.name!==R&&(p=!0,g=function(){return h.call(this)}),y&&!a||!N&&!p&&m[T]||C(m,T,g),_[t]=g,_[f]=O,o)if(s={values:d?g:c(R),keys:i?g:c("keys"),entries:v},a)for(l in s)l in m||x(m,l,s[l]);else w(w.P+w.F*(N||p),t,s);return s}},"32a6":function(e,t,n){var r=n("241e"),o=n("c3a1");n("ce7e")("keys",function(){return function(e){return o(r(e))}})},"32e9":function(e,t,n){var r=n("86cc"),o=n("4630");e.exports=n("9e1e")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"32fc":function(e,t,n){var r=n("e53d").document;e.exports=r&&r.documentElement},"335c":function(e,t,n){var r=n("6b4c");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},"355d":function(e,t){t.f={}.propertyIsEnumerable},"35e8":function(e,t,n){var r=n("d9f6"),o=n("aebd");e.exports=n("8e60")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"36c3":function(e,t,n){var r=n("335c"),o=n("25eb");e.exports=function(e){return r(o(e))}},3702:function(e,t,n){var r=n("481b"),o=n("5168")("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},"3a38":function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},"40c3":function(e,t,n){var o=n("6b4c"),i=n("5168")("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},4588:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},"45f2":function(e,t,n){var r=n("d9f6").f,o=n("07e3"),i=n("5168")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"469f":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("7d7b")},"481b":function(e,t){e.exports={}},"4aa6":function(e,t,n){e.exports=n("dc62")},"4bf8":function(e,t,n){var r=n("be13");e.exports=function(e){return Object(r(e))}},"4ee1":function(e,t,n){var i=n("5168")("iterator"),a=!1;try{var r=[7][i]();r.return=function(){a=!0},Array.from(r,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var n=!1;try{var r=[7],o=r[i]();o.next=function(){return{done:n=!0}},r[i]=function(){return o},e(r)}catch(e){}return n}},"50ed":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},5147:function(e,t,n){var r=n("2b4c")("match");e.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(e){}}return!0}},5168:function(e,t,n){var r=n("dbdb")("wks"),o=n("62a0"),i=n("e53d").Symbol,a="function"==typeof i,s=e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))};s.store=r},5176:function(e,t,n){e.exports=n("51b6")},"51b6":function(e,t,n){n("a3c3"),e.exports=n("584a").Object.assign},"520a":function(e,t,n){"use strict";var r,o,a=n("0bfb"),s=RegExp.prototype.exec,l=String.prototype.replace,i=s,u="lastIndex",c=(r=/a/,o=/b*/g,s.call(r,"a"),s.call(o,"a"),0!==r[u]||0!==o[u]),f=void 0!==/()??/.exec("")[1],d=c||f;d&&(i=function(e){var t,n,r,o,i=this;return f&&(n=new RegExp("^"+i.source+"$(?!\\s)",a.call(i))),c&&(t=i[u]),r=s.call(i,e),c&&r&&(i[u]=i.global?r.index+r[0].length:t),f&&r&&1<r.length&&l.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),e.exports=i},"53e2":function(e,t,n){var r=n("07e3"),o=n("241e"),i=n("5559")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},"549b":function(e,t,n){"use strict";var d=n("d864"),r=n("63b6"),p=n("241e"),m=n("b0dc"),h=n("3702"),g=n("b447"),v=n("20fd"),b=n("7cd6");r(r.S+r.F*!n("4ee1")(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,o,i=p(e),a="function"==typeof this?this:Array,s=arguments.length,l=1<s?arguments[1]:void 0,u=void 0!==l,c=0,f=b(i);if(u&&(l=d(l,2<s?arguments[2]:void 0,2)),null==f||a==Array&&h(f))for(t=g(i.length),n=new a(t);c<t;c++)v(n,c,u?l(i[c],c):i[c]);else for(o=f.call(i),n=new a;!(r=o.next()).done;c++)v(n,c,u?m(o,l,[r.value,c],!0):r.value);return n.length=c,n}})},"54a1":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("95d5")},5537:function(e,t,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(e,t,n){var r=n("dbdb")("keys"),o=n("62a0");e.exports=function(e){return r[e]||(r[e]=o(e))}},"584a":function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"5b4e":function(e,t,n){var l=n("36c3"),u=n("b447"),c=n("0fc9");e.exports=function(s){return function(e,t,n){var r,o=l(e),i=u(o.length),a=c(n,i);if(s&&t!=t){for(;a<i;)if((r=o[a++])!=r)return!0}else for(;a<i;a++)if((s||a in o)&&o[a]===t)return s||a||0;return!s&&-1}}},"5ca1":function(e,t,n){var h=n("7726"),g=n("8378"),v=n("32e9"),b=n("2aba"),y=n("9b43"),w="prototype",x=function(e,t,n){var r,o,i,a,s=e&x.F,l=e&x.G,u=e&x.S,c=e&x.P,f=e&x.B,d=l?h:u?h[t]||(h[t]={}):(h[t]||{})[w],p=l?g:g[t]||(g[t]={}),m=p[w]||(p[w]={});for(r in l&&(n=t),n)o=!s&&d&&void 0!==d[r],i=(o?d:n)[r],a=f&&o?y(i,h):c&&"function"==typeof i?y(Function.call,i):i,d&&b(d,r,i,e&x.U),p[r]!=i&&v(p,r,a),c&&m[r]!=i&&(m[r]=i)};h.core=g,x.F=1,x.G=2,x.S=4,x.P=8,x.B=16,x.W=32,x.U=64,x.R=128,e.exports=x},"5d73":function(e,t,n){e.exports=n("469f")},"5f1b":function(e,t,n){"use strict";var o=n("23c6"),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==o(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"626a":function(e,t,n){var r=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},"62a0":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"63b6":function(e,t,n){var h=n("e53d"),g=n("584a"),v=n("d864"),b=n("35e8"),y=n("07e3"),w="prototype",x=function(e,t,n){var r,o,i,a=e&x.F,s=e&x.G,l=e&x.S,u=e&x.P,c=e&x.B,f=e&x.W,d=s?g:g[t]||(g[t]={}),p=d[w],m=s?h:l?h[t]:(h[t]||{})[w];for(r in s&&(n=t),n)(o=!a&&m&&void 0!==m[r])&&y(d,r)||(i=o?m[r]:n[r],d[r]=s&&"function"!=typeof m[r]?n[r]:c&&o?v(i,h):f&&m[r]==i?function(r){var e=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return r.apply(this,arguments)};return e[w]=r[w],e}(i):u&&"function"==typeof i?v(Function.call,i):i,u&&((d.virtual||(d.virtual={}))[r]=i,e&x.R&&p&&!p[r]&&b(p,r,i)))};x.F=1,x.G=2,x.S=4,x.P=8,x.B=16,x.W=32,x.U=64,x.R=128,e.exports=x},6762:function(e,t,n){"use strict";var r=n("5ca1"),o=n("c366")(!0);r(r.P,"Array",{includes:function(e){return o(this,e,1<arguments.length?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(e,t,n){var r=n("626a"),o=n("be13");e.exports=function(e){return r(o(e))}},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var o=n("d3f4");e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},"6b4c":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"6c1c":function(e,t,n){n("c367");for(var r=n("e53d"),o=n("35e8"),i=n("481b"),a=n("5168")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var u=s[l],c=r[u],f=c&&c.prototype;f&&!f[a]&&o(f,a,u),i[u]=i.Array}},"71c1":function(e,t,n){var l=n("3a38"),u=n("25eb");e.exports=function(s){return function(e,t){var n,r,o=String(u(e)),i=l(t),a=o.length;return i<0||a<=i?s?"":void 0:(n=o.charCodeAt(i))<55296||56319<n||i+1===a||(r=o.charCodeAt(i+1))<56320||57343<r?s?o.charAt(i):n:s?o.slice(i,i+2):r-56320+(n-55296<<10)+65536}}},7726: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)},"774e":function(e,t,n){e.exports=n("d2d5")},"77f1":function(e,t,n){var r=n("4588"),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},"794b":function(e,t,n){e.exports=!n("8e60")&&!n("294c")(function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"7cd6":function(e,t,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");e.exports=n("584a").getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},"7d7b":function(e,t,n){var r=n("e4ae"),o=n("7cd6");e.exports=n("584a").getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},"7e90":function(e,t,n){var a=n("d9f6"),s=n("e4ae"),l=n("c3a1");e.exports=n("8e60")?Object.defineProperties:function(e,t){s(e);for(var n,r=l(t),o=r.length,i=0;i<o;)a.f(e,n=r[i++],t[n]);return e}},8378:function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},8436:function(e,t){e.exports=function(){}},"86cc":function(e,t,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(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}},"8aae":function(e,t,n){n("32a6"),e.exports=n("584a").Object.keys},"8e60":function(e,t,n){e.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(e,t,n){"use strict";var r=n("a159"),o=n("aebd"),i=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},9003:function(e,t,n){var r=n("6b4c");e.exports=Array.isArray||function(e){return"Array"==r(e)}},9138:function(e,t,n){e.exports=n("35e8")},9306:function(e,t,n){"use strict";var d=n("c3a1"),p=n("9aa9"),m=n("355d"),h=n("241e"),g=n("335c"),o=Object.assign;e.exports=!o||n("294c")(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=o({},e)[n]||Object.keys(o({},t)).join("")!=r})?function(e,t){for(var n=h(e),r=arguments.length,o=1,i=p.f,a=m.f;o<r;)for(var s,l=g(arguments[o++]),u=i?d(l).concat(i(l)):d(l),c=u.length,f=0;f<c;)a.call(l,s=u[f++])&&(n[s]=l[s]);return n}:o},9427:function(e,t,n){var r=n("63b6");r(r.S,"Object",{create:n("a159")})},"95d5":function(e,t,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");e.exports=n("584a").isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(r(t))}},"9aa9":function(e,t){t.f=Object.getOwnPropertySymbols},"9b43":function(e,t,n){var i=n("d8e8");e.exports=function(r,o,e){if(i(r),void 0===o)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},"9c6c":function(e,t,n){var r=n("2b4c")("unscopables"),o=Array.prototype;null==o[r]&&n("32e9")(o,r,{}),e.exports=function(e){o[r][e]=!0}},"9def":function(e,t,n){var r=n("4588"),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a159:function(e,t,r){var o=r("e4ae"),i=r("7e90"),a=r("1691"),s=r("5559")("IE_PROTO"),l=function(){},u="prototype",c=function(){var e,t=r("1ec9")("iframe"),n=a.length;for(t.style.display="none",r("32fc").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[u][a[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(l[u]=o(e),n=new l,l[u]=null,n[s]=e):n=c(),void 0===t?n:i(n,t)}},a352:function(e,t){e.exports=r},a3c3:function(e,t,n){var r=n("63b6");r(r.S+r.F,"Object",{assign:n("9306")})},a481:function(e,t,n){"use strict";var k=n("cb7c"),r=n("4bf8"),E=n("9def"),T=n("4588"),N=n("0390"),R=n("5f1b"),O=Math.max,P=Math.min,d=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,m=/\$([$&`']|\d\d?)/g;n("214f")("replace",2,function(o,i,C,_){return[function(e,t){var n=o(this),r=null==e?void 0:e[i];return void 0!==r?r.call(e,n,t):C.call(String(n),e,t)},function(e,t){var n=_(C,e,this,t);if(n.done)return n.value;var r=k(e),o=String(this),i="function"==typeof t;i||(t=String(t));var a=r.global;if(a){var s=r.unicode;r.lastIndex=0}for(var l,u=[];;){var c=R(r,o);if(null===c)break;if(u.push(c),!a)break;var f=String(c[0]);""===f&&(r.lastIndex=N(o,E(r.lastIndex),s))}for(var d="",p=0,m=0;m<u.length;m++){c=u[m];for(var h=String(c[0]),g=O(P(T(c.index),o.length),0),v=[],b=1;b<c.length;b++)v.push(void 0===(l=c[b])?l:String(l));var y=c.groups;if(i){var w=[h].concat(v,g,o);void 0!==y&&w.push(y);var x=String(t.apply(void 0,w))}else x=S(h,o,g,v,y,t);p<=g&&(d+=o.slice(p,g)+x,p=g+h.length)}return d+o.slice(p)}];function S(i,a,s,l,u,e){var c=s+i.length,f=l.length,t=m;return void 0!==u&&(u=r(u),t=p),C.call(e,t,function(e,t){var n;switch(t.charAt(0)){case"$":return"$";case"&":return i;case"`":return a.slice(0,s);case"'":return a.slice(c);case"<":n=u[t.slice(1,-1)];break;default:var r=+t;if(0===r)return e;if(f<r){var o=d(r/10);return 0===o?e:o<=f?void 0===l[o-1]?t.charAt(1):l[o-1]+t.charAt(1):e}n=l[r-1]}return void 0===n?"":n})}})},a4bb:function(e,t,n){e.exports=n("8aae")},a745:function(e,t,n){e.exports=n("f410")},aae3:function(e,t,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},aebd:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},b0c5:function(e,t,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},b0dc:function(e,t,n){var i=n("e4ae");e.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},b447:function(e,t,n){var r=n("3a38"),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},b8e3:function(e,t){e.exports=!0},be13:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},c366:function(e,t,n){var l=n("6821"),u=n("9def"),c=n("77f1");e.exports=function(s){return function(e,t,n){var r,o=l(e),i=u(o.length),a=c(n,i);if(s&&t!=t){for(;a<i;)if((r=o[a++])!=r)return!0}else for(;a<i;a++)if((s||a in o)&&o[a]===t)return s||a||0;return!s&&-1}}},c367:function(e,t,n){"use strict";var r=n("8436"),o=n("50ed"),i=n("481b"),a=n("36c3");e.exports=n("30f1")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},c3a1:function(e,t,n){var r=n("e6f3"),o=n("1691");e.exports=Object.keys||function(e){return r(e,o)}},c649:function(e,c,f){"use strict";(function(e){f.d(c,"c",function(){return u}),f.d(c,"a",function(){return s}),f.d(c,"b",function(){return i}),f.d(c,"d",function(){return l}),f("a481");var n,r,t=f("4aa6"),o=f.n(t),i="undefined"!=typeof window?window.console:e.console,a=/-(\w)/g,s=(n=function(e){return e.replace(a,function(e,t){return t?t.toUpperCase():""})},r=o()(null),function(e){var t=r[e];return t||(r[e]=n(e))});function l(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e,t,n){var r=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,r)}}).call(this,f("c8ba"))},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},c8bb:function(e,t,n){e.exports=n("54a1")},ca5a:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},cb7c:function(e,t,n){var r=n("d3f4");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},ce7e:function(e,t,n){var o=n("63b6"),i=n("584a"),a=n("294c");e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],r={};r[e]=t(n),o(o.S+o.F*a(function(){n(1)}),"Object",r)}},d2c8:function(e,t,n){var r=n("aae3"),o=n("be13");e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},d2d5:function(e,t,n){n("1654"),n("549b"),e.exports=n("584a").Array.from},d3f4:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},d864:function(e,t,n){var i=n("79aa");e.exports=function(r,o,e){if(i(r),void 0===o)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},d9f6:function(e,t,n){var r=n("e4ae"),o=n("794b"),i=n("1bc3"),a=Object.defineProperty;t.f=n("8e60")?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(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}},dbdb:function(e,t,n){var r=n("584a"),o=n("e53d"),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},dc62:function(e,t,n){n("9427");var r=n("584a").Object;e.exports=function(e,t){return r.create(e,t)}},e4ae:function(e,t,n){var r=n("f772");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},e53d: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)},e6f3:function(e,t,n){var a=n("07e3"),s=n("36c3"),l=n("5b4e")(!1),u=n("5559")("IE_PROTO");e.exports=function(e,t){var n,r=s(e),o=0,i=[];for(n in r)n!=u&&a(r,n)&&i.push(n);for(;t.length>o;)a(r,n=t[o++])&&(~l(i,n)||i.push(n));return i}},f410:function(e,t,n){n("1af6"),e.exports=n("584a").Array.isArray},f559:function(e,t,n){"use strict";var r=n("5ca1"),o=n("9def"),i=n("d2c8"),a="startsWith",s=""[a];r(r.P+r.F*n("5147")(a),"String",{startsWith:function(e){var t=i(this,e,a),n=o(Math.min(1<arguments.length?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},f772:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},fa5b:function(e,t,n){e.exports=n("5537")("native-function-to-string",Function.toString)},fb15:function(e,t,n){"use strict";var r;n.r(t),"undefined"!=typeof window&&(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(n.p=r[1]);var o=n("5176"),p=n.n(o),i=(n("f559"),n("a4bb")),m=n.n(i),a=(n("6762"),n("2fdb"),n("a745")),s=n.n(a),l=n("5d73"),u=n.n(l);function h(e,t){return function(e){if(s()(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=u()(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var c=n("774e"),f=n.n(c),d=n("c8bb"),g=n.n(d);function v(e){return function(e){if(s()(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(g()(Object(e))||"[object Arguments]"===Object.prototype.toString.call(e))return f()(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var b=n("a352"),y=n.n(b),w=n("c649");function x(e,t){var n=this;this.$nextTick(function(){return n.$emit(e.toLowerCase(),t)})}var C=["Start","Add","Remove","Update","End"],_=["Choose","Sort","Filter","Clone"],S=["Move"].concat(C,_).map(function(e){return"on"+e}),k=null,E={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(e){return e}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},T={name:"draggable",inheritAttrs:!1,props:E,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1,init:!1}},render:function(e){var t=this.$slots.default;this.transitionMode=function(e){if(!e||1!==e.length)return!1;var t=h(e,1)[0].componentOptions;return!!t&&["transition-group","TransitionGroup"].includes(t.tag)}(t);var n,r,o,i,a,s,l=(n=t,r=this.$slots,o=r.header,i=r.footer,s=a=0,o&&(a=o.length,n=n?[].concat(v(o),v(n)):v(o)),i&&(s=i.length,n=n?[].concat(v(n),v(i)):v(i)),{children:n,headerOffset:a,footerOffset:s}),u=l.children,c=l.headerOffset,f=l.footerOffset;this.headerOffset=c,this.footerOffset=f;var d=function(n,e){var i=null,t=function(e,t){var n,r,o;n=i,r=e,void 0===(o=t)||((n=n||{})[r]=o),i=n},r=m()(n).filter(function(e){return"id"===e||e.startsWith("data-")}).reduce(function(e,t){return e[t]=n[t],e},{});if(t("attrs",r),!e)return i;var o=e.on,a=e.props,s=e.attrs;return t("on",o),t("props",a),p()(i.attrs,s),i}(this.$attrs,this.componentData);return e(this.getTag(),d,u)},created:function(){null!==this.list&&null!==this.value&&w.b.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&w.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&w.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var n=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var t={};C.forEach(function(e){t["on"+e]=function(t){var n=this;return function(e){null!==n.realList&&n["onDrag"+t](e),x.call(n,t,e)}}.call(n,e)}),_.forEach(function(e){t["on"+e]=x.bind(n,e)});var e=m()(this.$attrs).reduce(function(e,t){return e[Object(w.a)(t)]=n.$attrs[t],e},{}),r=p()({},this.options,e,t,{onMove:function(e,t){return n.onDragMove(e,t)}});!("draggable"in r)&&(r.draggable=">*"),this._sortable=new y.a(this.rootContainer,r),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(e){this.updateOptions(e)},deep:!0},$attrs:{handler:function(e){this.updateOptions(e)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getTag:function(){return this.tag||this.element},updateOptions:function(e){for(var t in e){var n=Object(w.a)(t);-1===S.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes:function(){if(this.init||(this.noneFunctionalComponentMode=this.noneFunctionalComponentMode&&1===this.$children.length,this.init=!0),this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes:function(){var e=this;this.$nextTick(function(){e.visibleIndexes=function(e,t,n,r){if(!e)return[];var o=e.map(function(e){return e.elm}),i=t.length-r,a=v(t).map(function(e,t){return i<=t?o.length:o.indexOf(e)});return n?a.filter(function(e){return-1!==e}):a}(e.getChildrenNodes(),e.rootContainer.children,e.transitionMode,e.footerOffset)})},getUnderlyingVm:function(e){var t,n,r=(t=this.getChildrenNodes()||[],n=e,t.map(function(e){return e.elm}).indexOf(n));if(-1===r)return null;var o=this.realList[r];return{index:r,element:o}},getUnderlyingPotencialDraggableComponent:function(e){var t=e.__vue__;return t&&t.$options&&"transition-group"===t.$options._componentTag?t.$parent:t},emitChanges:function(e){var t=this;this.$nextTick(function(){t.$emit("change",e)})},alterList:function(e){if(this.list)e(this.list);else{var t=v(this.value);e(t),this.$emit("input",t)}},spliceList:function(){var t=arguments;this.alterList(function(e){return e.splice.apply(e,v(t))})},updatePosition:function(t,n){this.alterList(function(e){return e.splice(n,0,e.splice(t,1)[0])})},getRelatedContextFromMoveEvent:function(e){var t=e.to,n=e.related,r=this.getUnderlyingPotencialDraggableComponent(t);if(!r)return{component:r};var o=r.realList,i={list:o,component:r};if(t!==n&&o&&r.getUnderlyingVm){var a=r.getUnderlyingVm(n);if(a)return p()(a,i)}return i},getVmIndex:function(e){var t=this.visibleIndexes,n=t.length;return n-1<e?n:t[e]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(e){if(this.noTransitionOnDrag&&this.transitionMode){var t=this.getChildrenNodes();t[e].data=null;var n=this.getComponent();n.children=[],n.kept=void 0}},onDragStart:function(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),k=e.item},onDragAdd:function(e){var t=e.item._underlying_vm_;if(void 0!==t){Object(w.d)(e.item);var n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();var r={element:t,newIndex:n};this.emitChanges({added:r})}},onDragRemove:function(e){if(Object(w.c)(this.rootContainer,e.item,e.oldIndex),"clone"!==e.pullMode){var t=this.context.index;this.spliceList(t,1);var n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})}else Object(w.d)(e.clone)},onDragUpdate:function(e){Object(w.d)(e.item),Object(w.c)(e.from,e.item,e.oldIndex);var t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);var r={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:r})},updateProperty:function(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex:function(e,t){if(!e.element)return 0;var n=v(t.to.children).filter(function(e){return"none"!==e.style.display}),r=n.indexOf(t.related),o=e.component.getVmIndex(r),i=-1!==n.indexOf(k);return i||!t.willInsertAfter?o:o+1},onDragMove:function(e,t){var n=this.move;if(!n||!this.realList)return!0;var r=this.getRelatedContextFromMoveEvent(e),o=this.context,i=this.computeFutureIndex(r,e);p()(o,{futureIndex:i});var a=p()({},e,{relatedContext:r,draggedContext:o});return n(a,t)},onDragEnd:function(){this.computeIndexes(),k=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",T);var N=T;t.default=N}}).default)},1991:function(e,t,n){var r,o,i,a=n("9b43"),s=n("31f4"),l=n("fab2"),u=n("230e"),c=n("7726"),f=c.process,d=c.setImmediate,p=c.clearImmediate,m=c.MessageChannel,h=c.Dispatch,g=0,v={},b="onreadystatechange",y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},w=function(e){y.call(e.data)};d&&p||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},p=function(e){delete v[e]},"process"==n("2d95")(f)?r=function(e){f.nextTick(a(y,e,1))}:h&&h.now?r=function(e){h.now(a(y,e,1))}:m?(i=(o=new m).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",w,!1)):r=b in u("script")?function(e){l.appendChild(u("script"))[b]=function(){l.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:d,clear:p}},"1af6":function(e,t,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1b94":function(e,t){!function(){"use strict";var e,t,n,r,o,i,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(e){return function(){return e}},l=function(i){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var a=new Array(arguments.length-1),n=1;n<arguments.length;n++)a[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=a.concat(n);return i.apply(null,o)}},u=s(!1),c=s(!0),f=u,d=c,p=function(){return m},m=(r={fold:function(e,t){return e()},is:f,isSome:f,isNone:d,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){},or:n,orThunk:t,map:p,ap:p,each:function(){},bind:p,flatten:p,exists:f,forall:d,filter:p,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:s("none()")},Object.freeze&&Object.freeze(r),r),h=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:d,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return h(e(n))},ap:function(e){return e.fold(p,function(e){return h(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:m},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(f,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},g={some:h,none:p,from:function(e){return null==e?m:h(e)}},v=(o="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===o}),b=void 0===(i=Array.prototype.indexOf)?function(e,t){return x(e,t)}:function(e,t){return i.call(e,t)},y=function(e,t){return-1<b(e,t)},w=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},x=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},C=(Array.prototype.slice,v(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.I18n")),_=tinymce.util.Tools.resolve("tinymce.Env"),S=_.mac?"⌘":"Ctrl",k=_.mac?"Ctrl + Alt":"Shift + Alt",E={shortcuts:[{shortcut:S+" + B",action:"Bold"},{shortcut:S+" + I",action:"Italic"},{shortcut:S+" + U",action:"Underline"},{shortcut:S+" + A",action:"Select all"},{shortcut:S+" + Y or "+S+" + Shift + Z",action:"Redo"},{shortcut:S+" + Z",action:"Undo"},{shortcut:k+" + 1",action:"Header 1"},{shortcut:k+" + 2",action:"Header 2"},{shortcut:k+" + 3",action:"Header 3"},{shortcut:k+" + 4",action:"Header 4"},{shortcut:k+" + 5",action:"Header 5"},{shortcut:k+" + 6",action:"Header 6"},{shortcut:k+" + 7",action:"Paragraph"},{shortcut:k+" + 8",action:"Div"},{shortcut:k+" + 9",action:"Address"},{shortcut:"Alt + F9",action:"Focus to menubar"},{shortcut:"Alt + F10",action:"Focus to toolbar"},{shortcut:"Alt + F11",action:"Focus to element path"},{shortcut:"Ctrl + F9",action:"Focus to contextual toolbar"},{shortcut:S+" + K",action:"Insert link (if link plugin activated)"},{shortcut:S+" + S",action:"Save (if save plugin activated)"},{shortcut:S+" + F",action:"Find (if searchreplace plugin activated)"}]},T=function(){var e=w(E.shortcuts,function(e){return'<tr data-mce-tabstop="1" tabindex="-1" aria-label="Action: '+(t=e).action+", Shortcut: "+t.shortcut.replace(/Ctrl/g,"Control")+'"><td>'+C.translate(e.action)+"</td><td>"+e.shortcut+"</td></tr>";var t}).join("");return{title:"Handy Shortcuts",type:"container",style:"overflow-y: auto; overflow-x: hidden; max-height: 250px",items:[{type:"container",html:'<div><table class="mce-table-striped"><thead><th>'+C.translate("Action")+"</th><th>"+C.translate("Shortcut")+"</th></thead>"+e+"</table></div>"}]}},N=Object.keys,R=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"compat3x",name:"3.x Compatibility"},{key:"contextmenu",name:"Context Menu"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"}],O=l(function(e,o){return e.replace(/\$\{([^{}]*)\}/g,function(e,t){var n,r=o[t];return"string"==(n=typeof r)||"number"===n?r.toString():e})},'<a href="${url}" target="_blank" rel="noopener">${name}</a>'),P=function(t,n){return function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return g.some(o)}return g.none()}(R,function(e){return e.key===n}).fold(function(){var e=t.plugins[n].getMetadata;return"function"==typeof e?O(e()):n},function(e){return O({name:e.name,url:"https://www.tinymce.com/docs/plugins/"+e.key})})},A=function(t){var e,n,r,o=(r=N((e=t).plugins),void 0===e.settings.forced_plugins?r:function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n}(r,(n=l(y,e.settings.forced_plugins),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,arguments)}))),i=w(o,function(e){return"<li>"+P(t,e)+"</li>"}),a=i.length,s=i.join("");return"<p><b>"+C.translate(["Plugins installed ({0}):",a])+"</b></p><ul>"+s+"</ul>"},D=function(e){return{title:"Plugins",type:"container",style:"overflow-y: auto; overflow-x: hidden;",layout:"flex",padding:10,spacing:10,items:[(t=e,{type:"container",html:'<div style="overflow-y: auto; overflow-x: hidden; max-height: 230px; height: 230px;" data-mce-tabstop="1" tabindex="-1">'+A(t)+"</div>",flex:1}),{type:"container",html:'<div style="padding: 10px; background: #e3e7f4; height: 100%;" data-mce-tabstop="1" tabindex="-1"><p><b>'+C.translate("Premium plugins:")+'</b></p><ul><li>PowerPaste</li><li>Spell Checker Pro</li><li>Accessibility Checker</li><li>Advanced Code Editor</li><li>Enhanced Media Embed</li><li>Link Checker</li></ul><br /><p style="float: right;"><a href="https://www.tinymce.com/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+C.translate("Learn more...")+"</a></p></div>",flex:1}]};var t},M=tinymce.util.Tools.resolve("tinymce.EditorManager"),I=function(){var e,t,n='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+(e=M.majorVersion,t=M.minorVersion,0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>";return[{type:"label",html:C.translate(["You are using {0}",n])},{type:"spacer",flex:1},{text:"Close",onclick:function(){this.parent().parent().close()}}]},L=function(e,t){return function(){e.windowManager.open({title:"Help",bodyType:"tabpanel",layout:"flex",body:[T(),D(e)],buttons:I(),onPostRender:function(){this.getEl("title").innerHTML='<img src="'+t+'/img/logo.png" alt="TinyMCE Logo" style="display: inline-block; width: 200px; height: 50px">'}})}},B=function(e,t){e.addCommand("mceHelp",L(e,t))},F=function(e,t){e.addButton("help",{icon:"help",onclick:L(e,t)}),e.addMenuItem("help",{text:"Help",icon:"help",context:"help",onclick:L(e,t)})};a.add("help",function(e,t){F(e,t),B(e,t),e.shortcuts.add("Alt+0","Open help dialog","mceHelp")})}()},"1bc3":function(e,t,n){var o=n("f772");e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},"1d2b":function(e,t,n){"use strict";e.exports=function(n,r){return function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];return n.apply(r,e)}}},"1d39":function(e,t){!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e){return{isContextMenuVisible:function(){return e.get()}}},i=function(e){return e.settings.contextmenu_never_use_native},a=function(e){return e.getParam("contextmenu","link openlink image inserttable | cell row column deletetable")},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),u=function(e){return l.DOM.select(e.settings.ui_container)[0]},c=function(e,t){return{x:e,y:t}},f=function(e,t,n){return c(e.x+t,e.y+n)},d=function(e,t){if(e&&"static"!==l.DOM.getStyle(e,"position",!0)){var n=l.DOM.getPos(e),r=n.x-e.scrollLeft,o=n.y-e.scrollTop;return f(t,-r,-o)}return f(t,0,0)},s=function(e,t){if(e.inline)return d(u(e),c((a=t).pageX,a.pageY));var n,r,o,i,a,s=(n=e.getContentAreaContainer(),r=c((i=t).clientX,i.clientY),o=l.DOM.getPos(n),f(r,o.x,o.y));return d(u(e),s)},p=tinymce.util.Tools.resolve("tinymce.ui.Factory"),m=tinymce.util.Tools.resolve("tinymce.util.Tools"),h=function(e,t,n,r){null===r.get()?r.set(function(n,t){var e,r,o=[];r=a(n),m.each(r.split(/[ ,]/),function(e){var t=n.menuItems[e];"|"===e&&(t={text:e}),t&&(t.shortcut="",o.push(t))});for(var i=0;i<o.length;i++)"|"===o[i].text&&(0!==i&&i!==o.length-1||o.splice(i,1));return(e=p.create("menu",{items:o,context:"contextmenu",classes:"contextmenu"})).uiContainer=u(n),e.renderTo(u(n)),e.on("hide",function(e){e.control===this&&t.set(!1)}),n.on("remove",function(){e.remove(),e=null}),e}(e,n)):r.get().show(),r.get().moveTo(t.x,t.y),n.set(!0)},g=function(n,r,o){n.on("contextmenu",function(e){var t;t=n,(!e.ctrlKey||i(t))&&(e.preventDefault(),h(n,s(n,e),r,o))})};e.add("contextmenu",function(e){var t=r(null),n=r(!1);return g(e,n,t),o(n)})}()},"1ec9":function(e,t,n){var r=n("f772"),o=n("e53d").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"1fa8":function(e,t,n){var i=n("cb7c");e.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},"1fe0":function(e,t,n){e.exports=n.p+"fonts/tinymce.9267f79b.woff"},"20d6":function(e,t,n){"use strict";var r=n("5ca1"),o=n("0a49")(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return o(this,e,1<arguments.length?arguments[1]:void 0)}}),n("9c6c")(i)},"20fd":function(e,t,n){"use strict";var r=n("d9f6"),o=n("aebd");e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},"214f":function(e,t,n){"use strict";n("b0c5");var c=n("2aba"),f=n("32e9"),d=n("79e5"),p=n("be13"),m=n("2b4c"),h=n("520a"),g=m("species"),v=!d(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),b=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(n,e,t){var r=m(n),i=!d(function(){var e={};return e[r]=function(){return 7},7!=""[n](e)}),o=i?!d(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},"split"===n&&(t.constructor={},t.constructor[g]=function(){return t}),t[r](""),!e}):void 0;if(!i||!o||"replace"===n&&!v||"split"===n&&!b){var a=/./[r],s=t(p,r,""[n],function(e,t,n,r,o){return t.exec===h?i&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),l=s[0],u=s[1];c(String.prototype,n,l),f(RegExp.prototype,r,2==e?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)})}}},"226c":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),b=function(e){return e.getParam("media_scripts")},y=function(e){return e.getParam("audio_template_callback")},w=function(e){return e.getParam("video_template_callback")},a=function(e){return e.getParam("media_live_embeds",!0)},t=function(e){return e.getParam("media_filter_html",!0)},l=function(e){return e.getParam("media_url_resolver")},f=function(e){return e.getParam("media_alt_source",!0)},d=function(e){return e.getParam("media_poster",!0)},p=function(e){return e.getParam("media_dimensions",!0)},m=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),x=function(e,t){if(e)for(var n=0;n<e.length;n++)if(-1!==t.indexOf(e[n].filter))return e[n]},r=function(t){return function(e){return e?e.style[t].replace(/px$/,""):""}},o=function(r){return function(e,t){var n;e&&(e.style[r]=/^[0-9.]+$/.test(n=t)?n+"px":n)}},h={getMaxWidth:r("maxWidth"),getMaxHeight:r("maxHeight"),setMaxWidth:o("maxWidth"),setMaxHeight:o("maxHeight")},u=n.DOM,c=function(e){return u.getAttrib(e,"data-ephox-embed-iri")},C=function(e,t){return s=t,l=u.createFragment(s),""!==c(l.firstChild)?(i=t,a=u.createFragment(i).firstChild,{type:"ephox-embed-iri",source1:c(a),source2:"",poster:"",width:h.getMaxWidth(a),height:h.getMaxHeight(a)}):(r=e,n=t,m({validate:(o={},!1),allow_conditional_comments:!0,special:"script,noscript",start:function(e,t){if(o.source1||"param"!==e||(o.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(o.type||(o.type=e),o=v.extend(t.map,o)),"script"===e){var n=x(r,t.map.src);if(!n)return;o={type:"script",source1:t.map.src,width:n.width,height:n.height}}"source"===e&&(o.source1?o.source2||(o.source2=t.map.src):o.source1=t.map.src),"img"!==e||o.poster||(o.poster=t.map.src)}}).parse(n),o.source1=o.source1||o.src||o.data,o.source2=o.source2||"",o.poster=o.poster||"",o);var r,n,o,i,a,s,l},g=tinymce.util.Tools.resolve("tinymce.util.Promise"),_=function(e){var t={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},S=tinymce.util.Tools.resolve("tinymce.html.Writer"),k=tinymce.util.Tools.resolve("tinymce.html.Schema"),E=n.DOM,T=function(e,t){var n,r,o,i;for(n in t)if(o=""+t[n],e.map[n])for(r=e.length;r--;)(i=e[r]).name===n&&(o?(e.map[n]=o,i.value=o):(delete e.map[n],e.splice(r,1)));else o&&(e.push({name:n,value:o}),e.map[n]=o)},N=function(e,t){var n,r,o=E.createFragment(e).firstChild;return h.setMaxWidth(o,t.width),h.setMaxHeight(o,t.height),n=o.outerHTML,r=S(),m(r).parse(n),r.getContent()},R=function(e,t,n){return u=e,c=E.createFragment(u),""!==E.getAttrib(c.firstChild,"data-ephox-embed-iri")?N(e,t):(r=e,o=t,i=n,s=S(),m({validate:!1,allow_conditional_comments:!(l=0),special:"script,noscript",comment:function(e){s.comment(e)},cdata:function(e){s.cdata(e)},text:function(e,t){s.text(e,t)},start:function(e,t,n){switch(e){case"video":case"object":case"embed":case"img":case"iframe":void 0!==o.height&&void 0!==o.width&&T(t,{width:o.width,height:o.height})}if(i)switch(e){case"video":T(t,{poster:o.poster,src:""}),o.source2&&T(t,{src:""});break;case"iframe":T(t,{src:o.source1});break;case"source":if(++l<=2&&(T(t,{src:o["source"+l],type:o["source"+l+"mime"]}),!o["source"+l]))return;break;case"img":if(!o.poster)return;a=!0}s.start(e,t,n)},end:function(e){if("video"===e&&i)for(var t=1;t<=2;t++)if(o["source"+t]){var n=[];n.map={},l<t&&(T(n,{src:o["source"+t],type:o["source"+t+"mime"]}),s.start("source",n,!0))}if(o.poster&&"object"===e&&i&&!a){var r=[];r.map={},T(r,{src:o.poster,width:o.width,height:o.height}),s.start("img",r,!0)}s.end(e)}},k({})).parse(r),s.getContent());var r,o,i,a,s,l,u,c},O=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],s=function(n,e){var r=v.extend({},e);if(!r.source1&&(v.extend(r,C(b(n),r.embed)),!r.source1))return"";r.source2||(r.source2=""),r.poster||(r.poster=""),r.source1=n.convertURL(r.source1,"source"),r.source2=n.convertURL(r.source2,"source"),r.source1mime=_(r.source1),r.source2mime=_(r.source2),r.poster=n.convertURL(r.poster,"poster");var t,o,i=(t=r.source1,0<(o=O.filter(function(e){return e.regex.test(t)})).length?v.extend({},o[0],{url:function(e,t){for(var n=e.regex.exec(t),r=e.url,o=function(e){r=r.replace("$"+e,function(){return n[e]?n[e]:""})},i=0;i<n.length;i++)o(i);return r.replace(/\?$/,"")}(o[0],t)}):null);if(i&&(r.source1=i.url,r.type=i.type,r.allowFullscreen=i.allowFullscreen,r.width=r.width||i.w,r.height=r.height||i.h),r.embed)return R(r.embed,r,!0);var a=x(b(n),r.source1);a&&(r.type="script",r.width=a.width,r.height=a.height);var s,l,u,c,f,d,p,m,h=y(n),g=w(n);return r.width=r.width||300,r.height=r.height||150,v.each(r,function(e,t){r[t]=n.dom.encode(e)}),"iframe"===r.type?(m=(p=r).allowFullscreen?' allowFullscreen="1"':"",'<iframe src="'+p.source1+'" width="'+p.width+'" height="'+p.height+'"'+m+"></iframe>"):"application/x-shockwave-flash"===r.source1mime?(d='<object data="'+(f=r).source1+'" width="'+f.width+'" height="'+f.height+'" type="application/x-shockwave-flash">',f.poster&&(d+='<img src="'+f.poster+'" width="'+f.width+'" height="'+f.height+'" />'),d+="</object>"):-1!==r.source1mime.indexOf("audio")?(u=r,(c=h)?c(u):'<audio controls="controls" src="'+u.source1+'">'+(u.source2?'\n<source src="'+u.source2+'"'+(u.source2mime?' type="'+u.source2mime+'"':"")+" />\n":"")+"</audio>"):"script"===r.type?'<script src="'+r.source1+'"><\/script>':(s=r,(l=g)?l(s):'<video width="'+s.width+'" height="'+s.height+'"'+(s.poster?' poster="'+s.poster+'"':"")+' controls="controls">\n<source src="'+s.source1+'"'+(s.source1mime?' type="'+s.source1mime+'"':"")+" />\n"+(s.source2?'<source src="'+s.source2+'"'+(s.source2mime?' type="'+s.source2mime+'"':"")+" />\n":"")+"</video>")},P={},A=function(t){return function(e){return s(t,e)}},D=function(e,t){var n,r,o,i,a,s=l(e);return s?(o=t,i=A(e),a=s,new g(function(t,e){var n=function(e){return e.html&&(P[o.source1]=e),t({url:o.source1,html:e.html?e.html:i(o)})};P[o.source1]?n(P[o.source1]):a({url:o.source1},n,e)})):(n=t,r=A(e),new g(function(e){e({html:r(n),url:n.source1})}))},M=function(e){return P.hasOwnProperty(e)},I=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},L=function(e,t){var n=e.find("#width")[0],r=e.find("#height")[0],o=e.find("#constrain")[0];n&&r&&o&&t(n,r,o.checked())},B=function(e,t,n){var r=e.state.get("oldVal"),o=t.state.get("oldVal"),i=e.value(),a=t.value();n&&r&&o&&i&&a&&(i!==r?(a=Math.round(i/r*a),isNaN(a)||t.value(a)):(i=Math.round(a/o*i),isNaN(i)||e.value(i))),I(e,t)},F=function(e){L(e,B)},j=function(e){var t=function(){e(function(e){F(e)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},H=function(e){L(e,I)},U=F,z=i.ie&&i.ie<=8?"onChange":"onInput",W=function(n){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";n.notificationManager.open({type:"error",text:t})}},V=function(o,i){return function(e){var t=e.html,n=o.find("#embed")[0],r=v.extend(C(b(i),t),{source1:e.url});o.fromJSON(r),n&&(n.value(t),U(o))}},q=function(e,t){var n=e.dom.select("img[data-mce-object]");e.insertContent(t),function(e,t){var n,r,o=e.dom.select("img[data-mce-object]");for(n=0;n<t.length;n++)for(r=o.length-1;0<=r;r--)t[n]===o[r]&&o.splice(r,1);e.selection.select(o[0])}(e,n),e.nodeChanged()},$=function(r){var o,t,e,n,i,a=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){D(r,o.toJSON()).then(V(o,r)).catch(W(r))},1)},onchange:function(e){var n,t;D(r,o.toJSON()).then(V(o,r)).catch(W(r)),n=o,t=e.meta,v.each(t,function(e,t){n.find("#"+t).value(e)})},onbeforecall:function(e){e.meta=o.toJSON()}}],s=[];if(f(r)&&s.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),d(r)&&s.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),p(r)){var l=j(function(e){e(o),t=o.toJSON(),o.find("#embed").value(R(t.embed,t))});a.push(l)}n=(e=r).selection.getNode(),i=n.getAttribute("data-ephox-embed-iri"),t=i?{source1:i,"data-ephox-embed-iri":i,width:h.getMaxWidth(n),height:h.getMaxHeight(n)}:n.getAttribute("data-mce-object")?C(b(e),e.serializer.serialize(n,{selection:!0})):{};var u={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:function(e){var t=e.selection.getNode();if(t.getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri"))return e.selection.getContent()}(r),multiline:!0,rows:5,label:"Source"};u[z]=function(){t=v.extend({},C(b(r),this.value())),this.parent().parent().fromJSON(t)};var c=[{title:"General",type:"form",items:a},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},u]}];0<s.length&&c.push({title:"Advanced",type:"form",items:s}),o=r.windowManager.open({title:"Insert/edit media",data:t,bodyType:"tabpanel",body:c,onSubmit:function(){var t,e;U(o),t=r,(e=o.toJSON()).embed=R(e.embed,e),e.embed&&M(e.source1)?q(t,e.embed):D(t,e).then(function(e){q(t,e.html)}).catch(W(t))}}),H(o)},X=function(e){return{showDialog:function(){$(e)}}},Y=function(e){e.addCommand("mceMedia",function(){$(e)})},G=tinymce.util.Tools.resolve("tinymce.html.Node"),K=function(o,e){if(!1===t(o))return e;var i,a=S();return m({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(e,t,n){if(i=!0,"script"!==e&&"noscript"!==e){for(var r=0;r<t.length;r++){if(0===t[r].name.indexOf("on"))return;"style"===t[r].name&&(t[r].value=o.dom.serializeStyle(o.dom.parseStyle(t[r].value),e))}a.start(e,t,n),i=!1}},end:function(e){i||a.end(e)}},k({})).parse(e),a.getContent()},J=function(e,t){var n,r=t.name;return(n=new G("img",1)).shortEnded=!0,Q(e,t,n),n.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===r?"30":"150"),style:t.attr("style"),src:i.transparentSrc,"data-mce-object":r,class:"mce-object mce-object-"+r}),n},Z=function(e,t){var n,r,o,i=t.name;return(n=new G("span",1)).attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":i,class:"mce-preview-object mce-object-"+i}),Q(e,t,n),(r=new G(i,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),class:t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(o=new G("span",1)).attr("class","mce-shim"),n.append(r),n.append(o),n},Q=function(e,t,n){var r,o,i,a,s;for(a=(i=t.attributes).length;a--;)r=i[a].name,o=i[a].value,"width"!==r&&"height"!==r&&"style"!==r&&("data"!==r&&"src"!==r||(o=e.convertURL(o,r)),n.attr("data-mce-p-"+r,o));(s=t.firstChild&&t.firstChild.value)&&(n.attr("data-mce-html",escape(K(e,s))),n.firstChild=null)},ee=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri"))return!0;return!1},te=function(o){return function(e){for(var t,n,r=e.length;r--;)(t=e[r]).parent&&(t.parent.attr("data-mce-object")||("script"!==t.name||(n=x(b(o),t.attr("src"))))&&(n&&(n.width&&t.attr("width",n.width.toString()),n.height&&t.attr("height",n.height.toString())),"iframe"===t.name&&a(o)&&i.ceFalse?ee(t)||t.replace(Z(o,t)):ee(t)||t.replace(J(o,t))))}},ne=function(d){d.on("preInit",function(){var t=d.schema.getSpecialElements();v.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var n=d.schema.getBoolAttrs();v.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){n[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",te(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var n,r,o,i,a,s,l,u,c=e.length;c--;)if((n=e[c]).parent){for(l=n.attr(t),r=new G(l,1),"audio"!==l&&"script"!==l&&((u=n.attr("class"))&&-1!==u.indexOf("mce-preview-object")?r.attr({width:n.firstChild.attr("width"),height:n.firstChild.attr("height")}):r.attr({width:n.attr("width"),height:n.attr("height")})),r.attr({style:n.attr("style")}),o=(i=n.attributes).length;o--;){var f=i[o].name;0===f.indexOf("data-mce-p-")&&r.attr(f.substr(11),i[o].value)}"script"===l&&r.attr("type","text/javascript"),(a=n.attr("data-mce-html"))&&((s=new G("#text",3)).raw=!0,s.value=K(d,unescape(a)),r.append(s)),n.replace(r)}})}),d.on("setContent",function(){d.$("span.mce-preview-object").each(function(e,t){var n=d.$(t);0===n.find("span.mce-shim",t).length&&n.append('<span class="mce-shim"></span>')})})},re=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},oe=function(t){t.on("click keyup",function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),t.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),t.on("objectResized",function(e){var t,n=e.target;n.getAttribute("data-mce-object")&&(t=n.getAttribute("data-mce-html"))&&(t=unescape(t),n.setAttribute("data-mce-html",escape(R(t,{width:e.width,height:e.height}))))})},ie=function(e){e.addButton("media",{tooltip:"Insert/edit media",cmd:"mceMedia",stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),e.addMenuItem("media",{icon:"media",text:"Media",cmd:"mceMedia",context:"insert",prependToContext:!0})};e.add("media",function(e){return Y(e),ie(e),re(e),ne(e),oe(e),X(e)})}()},"230e":function(e,t,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"23c6":function(e,t,n){var o=n("2d95"),i=n("2b4c")("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},"241e":function(e,t,n){var r=n("25eb");e.exports=function(e){return Object(r(e))}},2444:function(s,e,l){"use strict";(function(e){var n=l("c532"),r=l("c8af"),t={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var i,a={adapter:("undefined"!=typeof XMLHttpRequest?i=l("b50d"):void 0!==e&&(i=l("b50d")),i),transformRequest:[function(e,t){return r(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return 200<=e&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){a.headers[e]={}}),n.forEach(["post","put","patch"],function(e){a.headers[e]=n.merge(t)}),s.exports=a}).call(this,l("f28c"))},"25eb":function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},"268f":function(e,t,n){e.exports=n("fde4")},"27ee":function(e,t,n){var r=n("23c6"),o=n("2b4c")("iterator"),i=n("84f2");e.exports=n("8378").getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},2877:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,s){var l,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=l):o&&(l=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:u}}n.d(t,"a",function(){return r})},"28a5":function(e,t,n){"use strict";var f=n("aae3"),y=n("cb7c"),w=n("ebd6"),x=n("0390"),C=n("9def"),_=n("5f1b"),d=n("520a"),r=n("79e5"),S=Math.min,p=[].push,a="split",m="length",h="lastIndex",k=4294967295,E=!r(function(){RegExp(k,"y")});n("214f")("split",2,function(o,i,g,v){var b;return b="c"=="abbc"[a](/(b)*/)[1]||4!="test"[a](/(?:)/,-1)[m]||2!="ab"[a](/(?:ab)*/)[m]||4!="."[a](/(.?)(.?)/)[m]||1<"."[a](/()()/)[m]||""[a](/.?/)[m]?function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!f(e))return g.call(n,e,t);for(var r,o,i,a=[],s=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,u=void 0===t?k:t>>>0,c=new RegExp(e.source,s+"g");(r=d.call(c,n))&&!(l<(o=c[h])&&(a.push(n.slice(l,r.index)),1<r[m]&&r.index<n[m]&&p.apply(a,r.slice(1)),i=r[0][m],l=o,a[m]>=u));)c[h]===r.index&&c[h]++;return l===n[m]?!i&&c.test("")||a.push(""):a.push(n.slice(l)),a[m]>u?a.slice(0,u):a}:"0"[a](void 0,0)[m]?function(e,t){return void 0===e&&0===t?[]:g.call(this,e,t)}:g,[function(e,t){var n=o(this),r=null==e?void 0:e[i];return void 0!==r?r.call(e,n,t):b.call(String(n),e,t)},function(e,t){var n=v(b,e,this,t,b!==g);if(n.done)return n.value;var r=y(e),o=String(this),i=w(r,RegExp),a=r.unicode,s=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(E?"y":"g"),l=new i(E?r:"^(?:"+r.source+")",s),u=void 0===t?k:t>>>0;if(0===u)return[];if(0===o.length)return null===_(l,o)?[o]:[];for(var c=0,f=0,d=[];f<o.length;){l.lastIndex=E?f:0;var p,m=_(l,E?o:o.slice(f));if(null===m||(p=S(C(l.lastIndex+(E?0:f)),o.length))===c)f=x(o,f,a);else{if(d.push(o.slice(c,f)),d.length===u)return d;for(var h=1;h<=m.length-1;h++)if(d.push(m[h]),d.length===u)return d;f=c=p}}return d.push(o.slice(c)),d}]})},"294c":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"29c5":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Color"),i=function(e,t){e.find("#preview")[0].getEl().style.background=t},a=function(e,t){var n=o(t),r=n.toRgb();e.fromJSON({r:r.r,g:r.g,b:r.b,hex:n.toHex().substr(1)}),i(e,n.toHex())},r=function(e,t,n){var r=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:n,onchange:function(){var e=this.rgb();r&&(r.find("#r").value(e.r),r.find("#g").value(e.g),r.find("#b").value(e.b),r.find("#hex").value(this.value().substr(1)),i(r,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,t,n=r.find("colorpicker")[0];if(e=this.name(),t=this.value(),"hex"===e)return a(r,t="#"+t),void n.value(t);t={r:r.find("#r").value(),g:r.find("#g").value(),b:r.find("#b").value()},n.value(t),a(r,t)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){t("#"+r.toJSON().hex)}});a(r,n)};e.add("colorpicker",function(n){n.settings.color_picker_callback||(n.settings.color_picker_callback=function(e,t){r(n,e,t)})})}()},"2aba":function(e,t,n){var i=n("7726"),a=n("32e9"),s=n("69a8"),l=n("ca5a")("src"),r=n("fa5b"),o="toString",u=(""+r).split(o);n("8378").inspectSource=function(e){return r.call(e)},(e.exports=function(e,t,n,r){var o="function"==typeof n;o&&(s(n,"name")||a(n,"name",t)),e[t]!==n&&(o&&(s(n,l)||a(n,l,e[t]?""+e[t]:u.join(String(t)))),e===i?e[t]=n:r?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,o,function(){return"function"==typeof this&&this[l]||r.call(this)})},"2aeb":function(e,t,r){var o=r("cb7c"),i=r("1495"),a=r("e11e"),s=r("613b")("IE_PROTO"),l=function(){},u="prototype",c=function(){var e,t=r("230e")("iframe"),n=a.length;for(t.style.display="none",r("fab2").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[u][a[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(l[u]=o(e),n=new l,l[u]=null,n[s]=e):n=c(),void 0===t?n:i(n,t)}},"2b4c":function(e,t,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},"2d00":function(e,t){e.exports=!1},"2d83":function(e,t,n){"use strict";var a=n("387f");e.exports=function(e,t,n,r,o){var i=new Error(e);return a(i,t,n,r,o)}},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"2e67":function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"2f05":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(e)},t=function(e){var t=e.selection.getNode();return"A"===t.tagName&&""===e.dom.getAttrib(t,"href")?t.id||t.name:""},a=function(e,t){var n=e.selection.getNode();"A"===n.tagName&&""===e.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=t,e.undoManager.add()):(e.focus(),e.selection.collapse(!0),e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:t})))},n=function(o){var e=t(o);o.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:e},onsubmit:function(e){var t,n,r=e.data.id;t=o,(i(n=r)?(a(t,n),0):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))&&e.preventDefault()}})},r=function(e){e.addCommand("mceAnchor",function(){n(e)})},o=function(r){return function(e){for(var t=0;t<e.length;t++)(n=e[t]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||e[t].attr("contenteditable",r);var n}},s=function(e){e.on("PreInit",function(){e.parser.addNodeFilter("a",o("false")),e.serializer.addNodeFilter("a",o(null))})},l=function(e){e.addButton("anchor",{icon:"anchor",tooltip:"Anchor",cmd:"mceAnchor",stateSelector:"a:not([href])"}),e.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",cmd:"mceAnchor"})};e.add("anchor",function(e){s(e),r(e),l(e)})}()},3062:function(e,t,n){n("959a")},"30b5":function(e,t,n){"use strict";var i=n("c532");function a(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(i.isURLSearchParams(t))r=t.toString();else{var o=[];i.forEach(t,function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),o.push(a(t)+"="+a(e))}))}),r=o.join("&")}return r&&(e+=(-1===e.indexOf("?")?"?":"&")+r),e}},"30f1":function(e,t,n){"use strict";var y=n("b8e3"),w=n("63b6"),x=n("9138"),C=n("35e8"),_=n("481b"),S=n("8f60"),k=n("45f2"),E=n("53e2"),T=n("5168")("iterator"),N=!([].keys&&"next"in[].keys()),R="values",O=function(){return this};e.exports=function(e,t,n,r,o,i,a){S(n,t,r);var s,l,u,c=function(e){if(!N&&e in m)return m[e];switch(e){case"keys":case R:return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d=o==R,p=!1,m=e.prototype,h=m[T]||m["@@iterator"]||o&&m[o],g=h||c(o),v=o?d?c("entries"):g:void 0,b="Array"==t&&m.entries||h;if(b&&(u=E(b.call(new e)))!==Object.prototype&&u.next&&(k(u,f,!0),y||"function"==typeof u[T]||C(u,T,O)),d&&h&&h.name!==R&&(p=!0,g=function(){return h.call(this)}),y&&!a||!N&&!p&&m[T]||C(m,T,g),_[t]=g,_[f]=O,o)if(s={values:d?g:c(R),keys:i?g:c("keys"),entries:v},a)for(l in s)l in m||x(m,l,s[l]);else w(w.P+w.F*(N||p),t,s);return s}},"314e":function(e,t,n){"use strict";var r=n("fd61");n.n(r).a},"31f4":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)}},"32a6":function(e,t,n){var r=n("241e"),o=n("c3a1");n("ce7e")("keys",function(){return function(e){return o(r(e))}})},"32e9":function(e,t,n){var r=n("86cc"),o=n("4630");e.exports=n("9e1e")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"32f9":function(e,t,n){"use strict";var r=n("c4be");n.n(r).a},"32fc":function(e,t,n){var r=n("e53d").document;e.exports=r&&r.documentElement},"335c":function(e,t,n){var r=n("6b4c");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},"33a4":function(e,t,n){var r=n("84f2"),o=n("2b4c")("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},3516:function(e,t,n){"use strict";var r=n("65ff");n.n(r).a},"355d":function(e,t){t.f={}.propertyIsEnumerable},"35e8":function(e,t,n){var r=n("d9f6"),o=n("aebd");e.exports=n("8e60")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"36c3":function(e,t,n){var r=n("335c"),o=n("25eb");e.exports=function(e){return r(o(e))}},3702:function(e,t,n){var r=n("481b"),o=n("5168")("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},3846:function(e,t,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"387f":function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},"38fd":function(e,t,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},3934:function(e,t,n){"use strict";var a=n("c532");e.exports=a.isStandardBrowserEnv()?function(){var n,r=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");function i(e){var t=e;return r&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}return n=i(window.location.href),function(e){var t=a.isString(e)?i(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0}},"3a38":function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},"40c3":function(e,t,n){var o=n("6b4c"),i=n("5168")("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},"41a0":function(e,t,n){"use strict";var r=n("2aeb"),o=n("4630"),i=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},4260:function(e,t,n){"use strict";n.d(t,"a",function(){return r});n("6b54"),n("a481"),n("551c");var r=function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==e?t:7&t|8).toString(16)})}},4497:function(e,t,n){n("1b94")},"454f":function(e,t,n){n("46a7");var r=n("584a").Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},"456d":function(e,t,n){var r=n("4bf8"),o=n("0d58");n("5eda")("keys",function(){return function(e){return o(r(e))}})},4588:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},"45f2":function(e,t,n){var r=n("d9f6").f,o=n("07e3"),i=n("5168")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"467f":function(e,t,n){"use strict";var o=n("2d83");e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(o("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},"46a7":function(e,t,n){var r=n("63b6");r(r.S+r.F*!n("8e60"),"Object",{defineProperty:n("d9f6").f})},"47ee":function(e,t,n){var s=n("c3a1"),l=n("9aa9"),u=n("355d");e.exports=function(e){var t=s(e),n=l.f;if(n)for(var r,o=n(e),i=u.f,a=0;o.length>a;)i.call(e,r=o[a++])&&t.push(r);return t}},"481b":function(e,t){e.exports={}},"4a03":function(e,t){!function(){"use strict";var e,t,n,r,o,i=tinymce.util.Tools.resolve("tinymce.ThemeManager"),p=tinymce.util.Tools.resolve("tinymce.EditorManager"),x=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=function(e){return!1!==c(e)},c=function(e){return e.getParam("menubar")},d=function(e){return e.getParam("toolbar_items_size")},m=function(e){return e.getParam("menu")},h=function(e){return!1===e.settings.skin},g=function(e){var t=e.getParam("resize","vertical");return!1===t?"none":"both"===t?"both":"vertical"},v=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),b=tinymce.util.Tools.resolve("tinymce.ui.Factory"),y=tinymce.util.Tools.resolve("tinymce.util.I18n"),a=function(e){return e.fire("SkinLoaded")},w=function(e){return e.fire("ResizeEditor")},C=function(e){return e.fire("BeforeRenderUI")},s=function(t,n){return function(){var e=t.find(n)[0];e&&e.focus(!0)}},_=function(e,t){e.shortcuts.add("Alt+F9","",s(t,"menubar")),e.shortcuts.add("Alt+F10,F10","",s(t,"toolbar")),e.shortcuts.add("Alt+F11","",s(t,"elementpath")),t.on("cancel",function(){e.focus()})},S=tinymce.util.Tools.resolve("tinymce.geom.Rect"),u=tinymce.util.Tools.resolve("tinymce.util.Delay"),k=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},E=function(e){return function(){return e}},l=E(!1),T=E(!0),N=l,R=T,O=function(){return P},P=(r={fold:function(e,t){return e()},is:N,isSome:N,isNone:R,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){},or:n,orThunk:t,map:O,ap:O,each:function(){},bind:O,flatten:O,exists:N,forall:R,filter:O,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:E("none()")},Object.freeze&&Object.freeze(r),r),A=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:R,isNone:N,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return A(e(n))},ap:function(e){return e.fold(O,function(e){return A(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:P},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(N,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},D={some:A,none:O,from:function(e){return null==e?P:A(e)}},M=function(e){return e?e.getRoot().uiContainer:null},I={getUiContainerDelta:function(e){var t=M(e);if(t&&"static"!==v.DOM.getStyle(t,"position",!0)){var n=v.DOM.getPos(t),r=t.scrollLeft-n.x,o=t.scrollTop-n.y;return D.some({x:r,y:o})}return D.none()},setUiContainer:function(e,t){var n=v.DOM.select(e.settings.ui_container)[0];t.getRoot().uiContainer=n},getUiContainer:M,inheritUiContainer:function(e,t){return t.uiContainer=M(e)}},L=function(r,e,o){var i,a=[];if(e)return x.each(e.split(/[ ,]/),function(t){var e,n=function(){var e=r.selection;t.settings.stateSelector&&e.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&e.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})};"|"===t?i=null:(i||(i={type:"buttongroup",items:[]},a.push(i)),r.buttons[t]&&(e=t,"function"==typeof(t=r.buttons[e])&&(t=t()),t.type=t.type||"button",t.size=o,t=b.create(t),i.items.push(t),r.initialized?n():r.on("init",n)))}),{type:"toolbar",layout:"flow",items:a}},B=L,F=function(n,r){var e,t,o=[];if(x.each(!1===(t=(e=n).getParam("toolbar"))?[]:x.isArray(t)?x.grep(t,function(e){return 0<e.length}):function(e,t){for(var n=[],r=1;r<10;r++){var o=e["toolbar"+r];if(!o)break;n.push(o)}var i=e.toolbar?[e.toolbar]:[t];return 0<n.length?n:i}(e.settings,"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),function(e){var t;(t=e)&&o.push(L(n,t,r))}),o.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:o}},j=v.DOM,H=function(e){return{left:e.x,top:e.y,width:e.w,height:e.h,right:e.x+e.w,bottom:e.y+e.h}},U=function(e,t){e.moveTo(t.left,t.top)},z=function(e,t,n,r,o,i){return i=H({x:t,y:n,w:i.w,h:i.h}),e&&(i=e({elementRect:H(r),contentAreaRect:H(o),panelRect:i})),i},W=function(w){var r,i=function(){return w.contextToolbars||[]},n=function(e,t){var n,r,o,i,a,s,l,u=w.getParam("inline_toolbar_position_handler");if(!w.removed){if(!e||!e.toolbar.panel)return c=w,void x.each(c.contextToolbars,function(e){e.panel&&e.panel.hide()});var c,f,d,p,m;l=["bc-tc","tc-bc","tl-bl","bl-tl","tr-br","br-tr"],a=e.toolbar.panel,t&&a.show(),f=e.element,d=j.getPos(w.getContentAreaContainer()),p=w.dom.getRect(f),"BODY"===(m=w.dom.getRoot()).nodeName&&(p.x-=m.ownerDocument.documentElement.scrollLeft||m.scrollLeft,p.y-=m.ownerDocument.documentElement.scrollTop||m.scrollTop),p.x+=d.x,p.y+=d.y,o=p,r=j.getRect(a.getEl()),i=j.getRect(w.getContentAreaContainer()||w.getBody());var h,g,v,b=I.getUiContainerDelta(a).getOr({x:0,y:0});if(o.x+=b.x,o.y+=b.y,r.x+=b.x,r.y+=b.y,i.x+=b.x,i.y+=b.y,"inline"!==j.getStyle(e.element,"display",!0)){var y=e.element.getBoundingClientRect();o.w=y.width,o.h=y.height}w.inline||(i.w=w.getDoc().documentElement.offsetWidth),w.selection.controlSelection.isResizable(e.element)&&o.w<25&&(o=S.inflate(o,0,8)),n=S.findBestRelativePosition(r,o,i,l),o=S.clamp(o,i),n?(s=S.relativePosition(r,o,n),U(a,z(u,s.x,s.y,o,i,r))):(i.h+=r.h,(o=S.intersect(i,o))?(n=S.findBestRelativePosition(r,o,i,["bc-tc","bl-tl","br-tr"]))?(s=S.relativePosition(r,o,n),U(a,z(u,s.x,s.y,o,i,r))):U(a,z(u,o.x,o.y,o,i,r)):a.hide()),h=a,v=function(e,t){return e===t},g=(g=n)?g.substr(0,2):"",x.each({t:"down",b:"up"},function(e,t){h.classes.toggle("arrow-"+e,v(t,g.substr(0,1)))}),x.each({l:"left",r:"right"},function(e,t){h.classes.toggle("arrow-"+e,v(t,g.substr(1,1)))})}},o=function(e){return function(){u.requestAnimationFrame(function(){w.selection&&n(s(w.selection.getNode()),e)})}},t=function(e){var t;if(e.toolbar.panel)return e.toolbar.panel.show(),void n(e);t=b.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:B(w,e.toolbar.items),oncancel:function(){w.focus()}}),I.setUiContainer(w,t),function(e){if(!r){var t=o(!0),n=I.getUiContainer(e);r=w.selection.getScrollContainer()||w.getWin(),j.bind(r,"scroll",t),j.bind(n,"scroll",t),w.on("remove",function(){j.unbind(r,"scroll",t),j.unbind(n,"scroll",t)})}}(t),(e.toolbar.panel=t).renderTo().reflow(),n(e)},a=function(){x.each(i(),function(e){e.panel&&e.panel.hide()})},s=function(e){var t,n,r,o=i();for(t=(r=w.$(e).parents().add(e)).length-1;0<=t;t--)for(n=o.length-1;0<=n;n--)if(o[n].predicate(r[t]))return{toolbar:o[n],element:r[t]};return null};w.on("click keyup setContent ObjectResized",function(e){("setcontent"!==e.type||e.selection)&&u.setEditorTimeout(w,function(){var e;(e=s(w.selection.getNode()))?(a(),t(e)):a()})}),w.on("blur hide contextmenu",a),w.on("ObjectResizeStart",function(){var e=s(w.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.hide()}),w.on("ResizeEditor ResizeWindow",o(!0)),w.on("nodeChange",o(!1)),w.on("remove",function(){x.each(i(),function(e){e.panel&&e.panel.remove()}),w.contextToolbars={}}),w.shortcuts.add("ctrl+F9","",function(){var e=s(w.selection.getNode());e&&e.toolbar.panel&&e.toolbar.panel.items()[0].focus()})},V=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},q=V("function"),$=V("number"),X=void 0===(o=Array.prototype.indexOf)?function(e,t){return ee(e,t)}:function(e,t){return o.call(e,t)},Y=function(e,t){return Q(e,t).isSome()},G=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},K=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)},J=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n},Z=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return D.some(o)}return D.none()},Q=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n,e))return D.some(n);return D.none()},ee=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},te=Array.prototype.push,ne=(Array.prototype.slice,q(Array.from)&&Array.from,{file:{title:"File",items:"newdocument restoredraft | preview | print"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen"},insert:{title:"Insert",items:"image link media template codesample inserttable | charmap hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | blockformats align | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code"},table:{title:"Table"},help:{title:"Help"}}),re=function(e,t){return"|"===e?{name:"|",item:{text:"|"}}:t?{name:e,item:t}:null},oe=function(e){return e&&"|"===e.item.text},ie=function(n,e,t,r){var o,i,a,s,l,u,c;return e?(i=e[r],s=!0):i=ne[r],i&&(o={text:i.title},a=[],x.each((i.items||"").split(/[ ,]/),function(e){var t=re(e,n[e]);t&&a.push(t)}),s||x.each(n,function(e,t){var n;e.context!==r||(n=t,Q(a,function(e){return e.name===n}).isSome())||("before"===e.separator&&a.push({name:"|",item:{text:"|"}}),e.prependToContext?a.unshift(re(t,e)):a.push(re(t,e)),"after"===e.separator&&a.push({name:"|",item:{text:"|"}}))}),o.menu=G((l=t,u=J(a,function(e){return!1===l.hasOwnProperty(e.name)}),c=J(u,function(e,t,n){return!oe(e)||!oe(n[t-1])}),J(c,function(e,t,n){return!oe(e)||0<t&&t<n.length-1})),function(e){return e.item}),!o.menu.length)?null:o},ae=function(e){for(var t,n=[],r=function(e){var t,n=[],r=m(e);if(r)for(t in r)n.push(t);else for(t in ne)n.push(t);return n}(e),o=x.makeMap((t=e,t.getParam("removed_menuitems","")).split(/[ ,]/)),i=c(e),a="string"==typeof i?i.split(/[ ,]/):r,s=0;s<a.length;s++){var l=a[s],u=ie(e.menuItems,m(e),o,l);u&&n.push(u)}return n},se=v.DOM,le=function(e){return{width:e.clientWidth,height:e.clientHeight}},ue=function(e,t,n){var r,o,i,a;r=e.getContainer(),o=e.getContentAreaContainer().firstChild,i=le(r),a=le(o),null!==t&&(t=Math.max(e.getParam("min_width",100,"number"),t),t=Math.min(e.getParam("max_width",65535,"number"),t),se.setStyle(r,"width",t+(i.width-a.width)),se.setStyle(o,"width",t)),n=Math.max(e.getParam("min_height",100,"number"),n),n=Math.min(e.getParam("max_height",65535,"number"),n),se.setStyle(o,"height",n),w(e)},ce=ue,fe=function(e,t,n){var r=e.getContentAreaContainer();ue(e,r.clientWidth+t,r.clientHeight+n)},de=tinymce.util.Tools.resolve("tinymce.Env"),pe=function(e,t,n){var r,o=e.settings[n];o&&o((r=t.getEl("body"),{element:function(){return r}}))},me=function(c,f,d){return function(e){var t,n,r,o,i,a=e.control,s=a.parents().filter("panel")[0],l=s.find("#"+f)[0],u=(t=d,n=f,x.grep(t,function(e){return e.name===n})[0]);r=f,o=s,i=d,x.each(i,function(e){var t=o.items().filter("#"+e.name)[0];t&&t.visible()&&e.name!==r&&(pe(e,t,"onhide"),t.visible(!1))}),a.parent().items().each(function(e){e.active(!1)}),l&&l.visible()?(pe(u,l,"onhide"),l.hide(),a.active(!1)):(l?l.show():(l=b.create({type:"container",name:f,layout:"stack",classes:"sidebar-panel",html:""}),s.prepend(l),pe(u,l,"onrender")),pe(u,l,"onshow"),a.active(!0)),w(c)}},he=function(e){return!(de.ie&&!(11<=de.ie)||!e.sidebars)&&0<e.sidebars.length},ge=function(n){return{type:"panel",name:"sidebar",layout:"stack",classes:"sidebar",items:[{type:"toolbar",layout:"stack",classes:"sidebar-toolbar",items:x.map(n.sidebars,function(e){var t=e.settings;return{type:"button",icon:t.icon,image:t.image,tooltip:t.tooltip,onclick:me(n,e.name,n.sidebars)}})}]}},ve=function(e){var t=function(){e._skinLoaded=!0,a(e)};return function(){e.initialized?t():e.on("init",t)}},be=v.DOM,ye=function(e){return{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",border:e,html:""}},we=function(t,e,n){var r,o,i,a,s;if(!1===h(t)&&n.skinUiCss?be.styleSheetLoader.load(n.skinUiCss,ve(t)):ve(t)(),r=e.panel=b.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[{type:"container",classes:"top-part",items:[!1===f(t)?null:{type:"menubar",border:"0 0 1 0",items:ae(t)},F(t,d(t))]},he(t)?(a=t,{type:"panel",layout:"stack",classes:"edit-aria-container",border:"1 0 0 0",items:[ye("0"),ge(a)]}):ye("1 0 0 0")]}),I.setUiContainer(t,r),"none"!==g(t)&&(o={type:"resizehandle",direction:g(t),onResizeStart:function(){var e=t.getContentAreaContainer().firstChild;i={width:e.clientWidth,height:e.clientHeight}},onResize:function(e){"both"===g(t)?ce(t,i.width+e.deltaX,i.height+e.deltaY):ce(t,null,i.height+e.deltaY)}}),t.getParam("statusbar",!0,"boolean")){var l=y.translate(["Powered by {0}",'<a href="https://www.tinymce.com/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce" rel="noopener" target="_blank" role="presentation" tabindex="-1">tinymce</a>']),u=t.getParam("branding",!0,"boolean")?{type:"label",classes:"branding",html:" "+l}:null;r.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:t},o,u]})}return C(t),t.on("SwitchMode",(s=r,function(e){s.find("*").disabled("readonly"===e.mode)})),r.renderBefore(n.targetNode).reflow(),t.getParam("readonly",!1,"boolean")&&t.setMode("readonly"),n.width&&be.setStyle(r.getEl(),"width",n.width),t.on("remove",function(){r.remove(),r=null}),_(t,r),W(t),{iframeContainer:r.find("#iframe")[0].getEl(),editorContainer:r.getEl()}},xe=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),Ce=0,_e={id:function(){return"mceu_"+Ce++},create:function(e,t,n){var r=document.createElement(e);return v.DOM.setAttribs(r,t),"string"==typeof n?r.innerHTML=n:x.each(n,function(e){e.nodeType&&r.appendChild(e)}),r},createFragment:function(e){return v.DOM.createFragment(e)},getWindowSize:function(){return v.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return v.DOM.getPos(e,t||_e.getContainer())},getContainer:function(){return de.container?de.container:document.body},getViewPort:function(e){return v.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return v.DOM.addClass(e,t)},removeClass:function(e,t){return v.DOM.removeClass(e,t)},hasClass:function(e,t){return v.DOM.hasClass(e,t)},toggleClass:function(e,t,n){return v.DOM.toggleClass(e,t,n)},css:function(e,t,n){return v.DOM.setStyle(e,t,n)},getRuntimeStyle:function(e,t){return v.DOM.getStyle(e,t,!0)},on:function(e,t,n,r){return v.DOM.bind(e,t,n,r)},off:function(e,t,n){return v.DOM.unbind(e,t,n)},fire:function(e,t,n){return v.DOM.fire(e,t,n)},innerHtml:function(e,t){v.DOM.setHTML(e,t)}},Se=function(e){return"static"===_e.getRuntimeStyle(e,"position")},ke=function(e){return e.state.get("fixed")};function Ee(e,t,n){var r,o,i,a,s,l,u,c,f,d;return f=Te(),i=(o=_e.getPos(t,I.getUiContainer(e))).x,a=o.y,ke(e)&&Se(document.body)&&(i-=f.x,a-=f.y),r=e.getEl(),s=(d=_e.getSize(r)).width,l=d.height,u=(d=_e.getSize(t)).width,c=d.height,"b"===(n=(n||"").split(""))[0]&&(a+=c),"r"===n[1]&&(i+=u),"c"===n[0]&&(a+=Math.round(c/2)),"c"===n[1]&&(i+=Math.round(u/2)),"b"===n[3]&&(a-=l),"r"===n[4]&&(i-=s),"c"===n[3]&&(a-=Math.round(l/2)),"c"===n[4]&&(i-=Math.round(s/2)),{x:i,y:a,w:s,h:l}}var Te=function(){var e=window,t=Math.max(e.pageXOffset,document.body.scrollLeft,document.documentElement.scrollLeft),n=Math.max(e.pageYOffset,document.body.scrollTop,document.documentElement.scrollTop);return{x:t,y:n,w:t+(e.innerWidth||document.documentElement.clientWidth),h:n+(e.innerHeight||document.documentElement.clientHeight)}},Ne=function(e){var t,n=I.getUiContainer(e);return n&&!ke(e)?{x:0,y:0,w:(t=n).scrollWidth-1,h:t.scrollHeight-1}:Te()},Re={testMoveRel:function(e,t){for(var n=Ne(this),r=0;r<t.length;r++){var o=Ee(this,e,t[r]);if(ke(this)){if(0<o.x&&o.x+o.w<n.w&&0<o.y&&o.y+o.h<n.h)return t[r]}else if(o.x>n.x&&o.x+o.w<n.w&&o.y>n.y&&o.y+o.h<n.h)return t[r]}return t[0]},moveRel:function(e,t){"string"!=typeof t&&(t=this.testMoveRel(e,t));var n=Ee(this,e,t);return this.moveTo(n.x,n.y)},moveBy:function(e,t){var n=this.layoutRect();return this.moveTo(n.x+e,n.y+t),this},moveTo:function(e,t){var n=this;function r(e,t,n){return e<0?0:t<e+n&&(e=t-n)<0?0:e}if(n.settings.constrainToViewport){var o=Ne(this),i=n.layoutRect();e=r(e,o.w,i.w),t=r(t,o.h,i.h)}var a=I.getUiContainer(n);return a&&Se(a)&&!ke(n)&&(e-=a.scrollLeft,t-=a.scrollTop),a&&(e+=1,t+=1),n.state.get("rendered")?n.layoutRect({x:e,y:t}).repaint():(n.settings.x=e,n.settings.y=t),n.fire("move",{x:e,y:t}),n}},Oe=tinymce.util.Tools.resolve("tinymce.util.Class"),Pe=tinymce.util.Tools.resolve("tinymce.util.EventDispatcher"),Ae=function(e){var t;if(e)return"number"==typeof e?{top:e=e||0,left:e,bottom:e,right:e}:(1===(t=(e=e.split(" ")).length)?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],10)||0,right:parseInt(e[1],10)||0,bottom:parseInt(e[2],10)||0,left:parseInt(e[3],10)||0})},De=function(r,e){function t(e){var t=parseFloat(function(e){var t=r.ownerDocument.defaultView;if(t){var n=t.getComputedStyle(r,null);return n?(e=e.replace(/[A-Z]/g,function(e){return"-"+e}),n.getPropertyValue(e)):null}return r.currentStyle[e]}(e));return isNaN(t)?0:t}return{top:t(e+"TopWidth"),right:t(e+"RightWidth"),bottom:t(e+"BottomWidth"),left:t(e+"LeftWidth")}};function Me(){}function Ie(e){this.cls=[],this.cls._map={},this.onchange=e||Me,this.prefix=""}x.extend(Ie.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){var t=void 0;for(t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),Ie.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)0<t&&(e+=" "),e+=this.prefix+this.cls[t];return e};var Le,Be,Fe,je=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,He=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,Ue=/^\s*|\s*$/g,ze=Oe.extend({init:function(e){var i=this.match;function a(e,t,n){var r;function o(e){e&&t.push(e)}return o(function(t){if(t)return t=t.toLowerCase(),function(e){return"*"===t||e.type===t}}((r=je.exec(e.replace(Ue,"")))[1])),o(function(t){if(t)return function(e){return e._name===t}}(r[2])),o(function(n){if(n)return n=n.split("."),function(e){for(var t=n.length;t--;)if(!e.classes.contains(n[t]))return!1;return!0}}(r[3])),o(function(n,r,o){if(n)return function(e){var t=e[n]?e[n]():"";return r?"="===r?t===o:"*="===r?0<=t.indexOf(o):"~="===r?0<=(" "+t+" ").indexOf(" "+o+" "):"!="===r?t!==o:"^="===r?0===t.indexOf(o):"$="===r&&t.substr(t.length-o.length)===o:!!o}}(r[4],r[5],r[6])),o(function(r){var t;if(r)return(r=/(?:not\((.+)\))|(.+)/i.exec(r))[1]?(t=s(r[1],[]),function(e){return!i(e,t)}):(r=r[2],function(e,t,n){return"first"===r?0===t:"last"===r?t===n-1:"even"===r?t%2==0:"odd"===r?t%2==1:!!e[r]&&e[r]()})}(r[7])),t.pseudo=!!r[7],t.direct=n,t}function s(e,t){var n,r,o,i=[];do{if(He.exec(""),(r=He.exec(e))&&(e=r[3],i.push(r[1]),r[2])){n=r[3];break}}while(r);for(n&&s(n,t),e=[],o=0;o<i.length;o++)">"!==i[o]&&e.push(a(i[o],[],">"===i[o-1]));return t.push(e),t}this._selectors=s(e,[])},match:function(e,t){var n,r,o,i,a,s,l,u,c,f,d,p,m;for(n=0,r=(t=t||this._selectors).length;n<r;n++){for(m=e,p=0,o=(i=(a=t[n]).length)-1;0<=o;o--)for(u=a[o];m;){if(u.pseudo)for(c=f=(d=m.parent().items()).length;c--&&d[c]!==m;);for(s=0,l=u.length;s<l;s++)if(!u[s](m,c,f)){s=l+1;break}if(s===l){p++;break}if(o===i-1)break;m=m.parent()}if(p===i)return!0}return!1},find:function(e){var t,n,u=[],r=this._selectors;function c(e,t,n){var r,o,i,a,s,l=t[n];for(r=0,o=e.length;r<o;r++){for(s=e[r],i=0,a=l.length;i<a;i++)if(!l[i](s,r,o)){i=a+1;break}if(i===a)n===t.length-1?u.push(s):s.items&&c(s.items(),t,n+1);else if(l.direct)return;s.items&&c(s.items(),t,n)}}if(e.items){for(t=0,n=r.length;t<n;t++)c(e.items(),r[t],0);1<n&&(u=function(e){for(var t,n=[],r=e.length;r--;)(t=e[r]).__checked||(n.push(t),t.__checked=1);for(r=n.length;r--;)delete n[r].__checked;return n}(u))}return Le||(Le=ze.Collection),new Le(u)}}),We=Array.prototype.push,Ve=Array.prototype.slice;Fe={length:0,init:function(e){e&&this.add(e)},add:function(e){return x.isArray(e)?We.apply(this,e):e instanceof Be?this.add(e.toArray()):We.call(this,e),this},set:function(e){var t,n=this.length;for(this.length=0,this.add(e),t=this.length;t<n;t++)delete this[t];return this},filter:function(t){var e,n,r,o,i=[];for(o="string"==typeof t?(t=new ze(t),function(e){return t.match(e)}):t,e=0,n=this.length;e<n;e++)o(r=this[e])&&i.push(r);return new Be(i)},slice:function(){return new Be(Ve.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(e){return x.each(this,e),this},toArray:function(){return x.toArray(this)},indexOf:function(e){for(var t=this.length;t--&&this[t]!==e;);return t},reverse:function(){return new Be(x.toArray(this).reverse())},hasClass:function(e){return!!this[0]&&this[0].classes.contains(e)},prop:function(t,n){var e;return void 0!==n?(this.each(function(e){e[t]&&e[t](n)}),this):(e=this[0])&&e[t]?e[t]():void 0},exec:function(t){var n=x.toArray(arguments).slice(1);return this.each(function(e){e[t]&&e[t].apply(e,n)}),this},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(t){return this.each(function(e){e.classes.add(t)})},removeClass:function(t){return this.each(function(e){e.classes.remove(t)})}},x.each("fire on off show hide append prepend before after reflow".split(" "),function(n){Fe[n]=function(){var t=x.toArray(arguments);return this.each(function(e){n in e&&e[n].apply(e,t)}),this}}),x.each("text name disabled active selected checked visible parent value data".split(" "),function(t){Fe[t]=function(e){return this.prop(t,e)}}),Be=Oe.extend(Fe);var qe=ze.Collection=Be,$e=function(e){this.create=e.create};$e.create=function(o,i){return new $e({create:function(t,n){var r,e=function(e){t.set(n,e.value)};return t.on("change:"+n,function(e){o.set(i,e.value)}),o.on("change:"+i,e),(r=t._bindings)||(r=t._bindings=[],t.on("destroy",function(){for(var e=r.length;e--;)r[e]()})),r.push(function(){o.off("change:"+i,e)}),o.get(i)}})};var Xe=tinymce.util.Tools.resolve("tinymce.util.Observable");function Ye(e){return 0<e.nodeType}var Ge,Ke,Je=Oe.extend({Mixins:[Xe],init:function(e){var t,n;for(t in e=e||{})(n=e[t])instanceof $e&&(e[t]=n.create(this,t));this.data=e},set:function(e,t){var n,r,o=this.data[e];if(t instanceof $e&&(t=t.create(this,e)),"object"!=typeof e)return function e(t,n){var r,o;if(t===n)return!0;if(null===t||null===n)return t===n;if("object"!=typeof t||"object"!=typeof n)return t===n;if(x.isArray(n)){if(t.length!==n.length)return!1;for(r=t.length;r--;)if(!e(t[r],n[r]))return!1}if(Ye(t)||Ye(n))return t===n;for(r in o={},n){if(!e(t[r],n[r]))return!1;o[r]=!0}for(r in t)if(!o[r]&&!e(t[r],n[r]))return!1;return!0}(o,t)||(this.data[e]=t,r={target:this,name:e,value:t,oldValue:o},this.fire("change:"+e,r),this.fire("change",r)),this;for(n in e)this.set(n,e[n]);return this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(e){return $e.create(this,e)},destroy:function(){this.fire("destroy")}}),Ze={},Qe={add:function(e){var t=e.parent();if(t){if(!t._layout||t._layout.isNative())return;Ze[t._id]||(Ze[t._id]=t),Ge||(Ge=!0,u.requestAnimationFrame(function(){var e,t;for(e in Ge=!1,Ze)(t=Ze[e]).state.get("rendered")&&t.reflow();Ze={}},document.body))}},remove:function(e){Ze[e._id]&&delete Ze[e._id]}},et="onmousewheel"in document,tt=!1,nt=0,rt={Statics:{classPrefix:"mce-"},isRtl:function(){return Ke.rtl},classPrefix:"mce-",init:function(t){var e,n,r=this;function o(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)r.classes.add(e[t])}r.settings=t=x.extend({},r.Defaults,t),r._id=t.id||"mceu_"+nt++,r._aria={role:t.role},r._elmCache={},r.$=xe,r.state=new Je({visible:!0,active:!1,disabled:!1,value:""}),r.data=new Je(t.data),r.classes=new Ie(function(){r.state.get("rendered")&&(r.getEl().className=this.toString())}),r.classes.prefix=r.classPrefix,(e=t.classes)&&(r.Defaults&&(n=r.Defaults.classes)&&e!==n&&o(n),o(e)),x.each("title text name visible disabled active value".split(" "),function(e){e in t&&r[e](t[e])}),r.on("click",function(){if(r.disabled())return!1}),r.settings=t,r.borderBox=Ae(t.border),r.paddingBox=Ae(t.padding),r.marginBox=Ae(t.margin),t.hidden&&r.hide()},Properties:"parent,name",getContainerElm:function(){var e=I.getUiContainer(this);return e||_e.getContainer()},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e,t,n,r,o,i,a,s,l,u,c=this,f=c.settings,d=c.getEl();e=c.borderBox=c.borderBox||De(d,"border"),c.paddingBox=c.paddingBox||De(d,"padding"),c.marginBox=c.marginBox||De(d,"margin"),u=_e.getSize(d),s=f.minWidth,l=f.minHeight,o=s||u.width,i=l||u.height,n=f.width,r=f.height,a=void 0!==(a=f.autoResize)?a:!n&&!r,n=n||o,r=r||i;var p=e.left+e.right,m=e.top+e.bottom,h=f.maxWidth||65535,g=f.maxHeight||65535;return c._layoutRect=t={x:f.x||0,y:f.y||0,w:n,h:r,deltaW:p,deltaH:m,contentW:n-p,contentH:r-m,innerW:n-p,innerH:r-m,startMinWidth:s||0,startMinHeight:l||0,minW:Math.min(o,h),minH:Math.min(i,g),maxW:h,maxH:g,autoResize:a,scrollW:0},c._lastLayoutRect={},t},layoutRect:function(e){var t,n,r,o,i,a=this._layoutRect;return a||(a=this.initLayoutRect()),e?(r=a.deltaW,o=a.deltaH,void 0!==e.x&&(a.x=e.x),void 0!==e.y&&(a.y=e.y),void 0!==e.minW&&(a.minW=e.minW),void 0!==e.minH&&(a.minH=e.minH),void 0!==(n=e.w)&&(n=(n=n<a.minW?a.minW:n)>a.maxW?a.maxW:n,a.w=n,a.innerW=n-r),void 0!==(n=e.h)&&(n=(n=n<a.minH?a.minH:n)>a.maxH?a.maxH:n,a.h=n,a.innerH=n-o),void 0!==(n=e.innerW)&&(n=(n=n<a.minW-r?a.minW-r:n)>a.maxW-r?a.maxW-r:n,a.innerW=n,a.w=n+r),void 0!==(n=e.innerH)&&(n=(n=n<a.minH-o?a.minH-o:n)>a.maxH-o?a.maxH-o:n,a.innerH=n,a.h=n+o),void 0!==e.contentW&&(a.contentW=e.contentW),void 0!==e.contentH&&(a.contentH=e.contentH),(t=this._lastLayoutRect).x===a.x&&t.y===a.y&&t.w===a.w&&t.h===a.h||((i=Ke.repaintControls)&&i.map&&!i.map[this._id]&&(i.push(this),i.map[this._id]=!0),t.x=a.x,t.y=a.y,t.w=a.w,t.h=a.h),this):a},repaint:function(){var e,t,n,r,o,i,a,s,l,u,c=this;l=document.createRange?function(e){return e}:Math.round,e=c.getEl().style,r=c._layoutRect,s=c._lastRepaintRect||{},i=(o=c.borderBox).left+o.right,a=o.top+o.bottom,r.x!==s.x&&(e.left=l(r.x)+"px",s.x=r.x),r.y!==s.y&&(e.top=l(r.y)+"px",s.y=r.y),r.w!==s.w&&(u=l(r.w-i),e.width=(0<=u?u:0)+"px",s.w=r.w),r.h!==s.h&&(u=l(r.h-a),e.height=(0<=u?u:0)+"px",s.h=r.h),c._hasBody&&r.innerW!==s.innerW&&(u=l(r.innerW),(n=c.getEl("body"))&&((t=n.style).width=(0<=u?u:0)+"px"),s.innerW=r.innerW),c._hasBody&&r.innerH!==s.innerH&&(u=l(r.innerH),(n=n||c.getEl("body"))&&((t=t||n.style).height=(0<=u?u:0)+"px"),s.innerH=r.innerH),c._lastRepaintRect=s,c.fire("repaint",{},!1)},updateLayoutRect:function(){this.parent()._lastRect=null,_e.css(this.getEl(),{width:"",height:""}),this._layoutRect=this._lastRepaintRect=this._lastLayoutRect=null,this.initLayoutRect()},on:function(e,t){var n,r,o,i=this;return ot(i).on(e,"string"!=typeof(n=t)?n:function(e){return r||i.parentsAndSelf().each(function(e){var t=e.settings.callbacks;if(t&&(r=t[n]))return o=e,!1}),r?r.call(o,e):(e.action=n,void this.fire("execute",e))}),i},off:function(e,t){return ot(this).off(e,t),this},fire:function(e,t,n){if((t=t||{}).control||(t.control=this),t=ot(this).fire(e,t),!1!==n&&this.parent)for(var r=this.parent();r&&!t.isPropagationStopped();)r.fire(e,t,!1),r=r.parent();return t},hasEventListeners:function(e){return ot(this).has(e)},parents:function(e){var t,n=new qe;for(t=this.parent();t;t=t.parent())n.add(t);return e&&(n=n.filter(e)),n},parentsAndSelf:function(e){return new qe(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=xe("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this.getEl(this.ariaTarget);return void 0===t?this._aria[e]:(this._aria[e]=t,this.state.get("rendered")&&n.setAttribute("role"===e?e:"aria-"+e,t),this)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return Ke.translate?Ke.translate(e):e},before:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this),!0),this},after:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this)),this},remove:function(){var t,e,n=this,r=n.getEl(),o=n.parent();if(n.items){var i=n.items().toArray();for(e=i.length;e--;)i[e].remove()}o&&o.items&&(t=[],o.items().each(function(e){e!==n&&t.push(e)}),o.items().set(t),o._lastRect=null),n._eventsRoot&&n._eventsRoot===n&&xe(r).off();var a=n.getRoot().controlIdLookup;return a&&delete a[n._id],r&&r.parentNode&&r.parentNode.removeChild(r),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return xe(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return xe(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e,t,n,r,o,i=this,a=i.settings;for(r in i.$el=xe(i.getEl()),i.state.set("rendered",!0),a)0===r.indexOf("on")&&i.on(r.substr(2),a[r]);if(i._eventsRoot){for(n=i.parent();!o&&n;n=n.parent())o=n._eventsRoot;if(o)for(r in o._nativeEvents)i._nativeEvents[r]=!0}it(i),a.style&&(e=i.getEl())&&(e.setAttribute("style",a.style),e.style.cssText=a.style),i.settings.border&&(t=i.borderBox,i.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var s=i.getRoot();for(var l in s.controlIdLookup||(s.controlIdLookup={}),(s.controlIdLookup[i._id]=i)._aria)i.aria(l,i._aria[l]);!1===i.state.get("visible")&&(i.getEl().style.display="none"),i.bindStates(),i.state.on("change:visible",function(e){var t,n=e.value;i.state.get("rendered")&&(i.getEl().style.display=!1===n?"none":"",i.getEl().getBoundingClientRect()),(t=i.parent())&&(t._lastRect=null),i.fire(n?"show":"hide"),Qe.add(i)}),i.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){var t,n,r,o,i,a,s=this.getEl(),l=s.parentNode,u=function(e,t){var n,r,o=e;for(n=r=0;o&&o!==t&&o.nodeType;)n+=o.offsetLeft||0,r+=o.offsetTop||0,o=o.offsetParent;return{x:n,y:r}}(s,l);return t=u.x,n=u.y,r=s.offsetWidth,o=s.offsetHeight,i=l.clientWidth,a=l.clientHeight,"end"===e?(t-=i-r,n-=a-o):"center"===e&&(t-=i/2-r/2,n-=a/2-o/2),l.scrollLeft=t,l.scrollTop=n,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),t=(e=t).parent()}e||(e=this);for(var r=n.length;r--;)n[r].rootControl=e;return e},reflow:function(){Qe.remove(this);var e=this.parent();return e&&e._layout&&!e._layout.isNative()&&e.reflow(),this}};function ot(n){return n._eventDispatcher||(n._eventDispatcher=new Pe({scope:n,toggleEvent:function(e,t){t&&Pe.isNative(e)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[e]=!0,n.state.get("rendered")&&it(n))}})),n._eventDispatcher}function it(s){var e,t,n,l,r,o;function i(e){var t=s.getParentCtrl(e.target);t&&t.fire(e.type,e)}function a(){var e=l._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),l._lastHoverCtrl=null)}function u(e){var t,n,r,o=s.getParentCtrl(e.target),i=l._lastHoverCtrl,a=0;if(o!==i){if((n=(l._lastHoverCtrl=o).parents().toArray().reverse()).push(o),i){for((r=i.parents().toArray().reverse()).push(i),a=0;a<r.length&&n[a]===r[a];a++);for(t=r.length-1;a<=t;t--)(i=r[t]).fire("mouseleave",{target:i.getEl()})}for(t=a;t<n.length;t++)(o=n[t]).fire("mouseenter",{target:o.getEl()})}}function c(e){e.preventDefault(),"mousewheel"===e.type?(e.deltaY=-.025*e.wheelDelta,e.wheelDeltaX&&(e.deltaX=-.025*e.wheelDeltaX)):(e.deltaX=0,e.deltaY=e.detail),e=s.fire("wheel",e)}if(r=s._nativeEvents){for((n=s.parents().toArray()).unshift(s),e=0,t=n.length;!l&&e<t;e++)l=n[e]._eventsRoot;for(l||(l=n[n.length-1]||s),s._eventsRoot=l,t=e,e=0;e<t;e++)n[e]._eventsRoot=l;var f=l._delegates;for(o in f||(f=l._delegates={}),r){if(!r)return!1;"wheel"!==o||tt?("mouseenter"===o||"mouseleave"===o?l._hasMouseEnter||(xe(l.getEl()).on("mouseleave",a).on("mouseover",u),l._hasMouseEnter=1):f[o]||(xe(l.getEl()).on(o,i),f[o]=!0),r[o]=!1):et?xe(s.getEl()).on("mousewheel",c):xe(s.getEl()).on("DOMMouseScroll",c)}}}x.each("text title visible disabled active value".split(" "),function(t){rt[t]=function(e){return 0===arguments.length?this.state.get(t):(void 0!==e&&this.state.set(t,e),this)}});var at=Ke=Oe.extend(rt),st=function(e){return!!e.getAttribute("data-mce-tabstop")};function lt(e){var i,o,t=e.root;function n(e){return e&&1===e.nodeType}try{i=document.activeElement}catch(e){i=document.body}function a(e){return n(e=e||i)?e.getAttribute("role"):null}function r(e){for(var t,n=e||i;n=n.parentNode;)if(t=a(n))return t}function s(e){var t=i;if(n(t))return t.getAttribute("aria-"+e)}function l(e){var t=e.tagName.toUpperCase();return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t}function u(e){var o=[];return function e(t){if(1===t.nodeType&&"none"!==t.style.display&&!t.disabled){var n;(l(n=t)&&!n.hidden||st(n)||/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(a(n)))&&o.push(t);for(var r=0;r<t.childNodes.length;r++)e(t.childNodes[r])}}(e||t.getEl()),o}function c(e){var t,n;(n=(e=e||o).parents().toArray()).unshift(e);for(var r=0;r<n.length&&!(t=n[r]).settings.ariaRoot;r++);return t}function f(e,t){return e<0?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,r=c();t=t||u(r.getEl());for(var o=0;o<t.length;o++)t[o]===i&&(n=o);n+=e,r.lastAriaIndex=f(n,t)}function p(){"tablist"===r()?d(-1,u(i.parentNode)):o.parent().submenu?v():d(-1)}function m(){var e=a(),t=r();"tablist"===t?d(1,u(i.parentNode)):"menuitem"===e&&"menu"===t&&s("haspopup")?b():d(1)}function h(){d(-1)}function g(){var e=a(),t=r();"menuitem"===e&&"menubar"===t?b():"button"===e&&s("haspopup")?b({key:"down"}):d(1)}function v(){o.fire("cancel")}function b(e){e=e||{},o.fire("click",{target:i,aria:e})}return o=t.getParentCtrl(i),t.on("keydown",function(e){function t(e,t){l(i)||st(i)||"slider"!==a(i)&&!1!==t(e)&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,p);break;case 39:t(e,m);break;case 38:t(e,h);break;case 40:t(e,g);break;case 27:v();break;case 14:case 13:case 32:t(e,b);break;case 9:!function(e){if("tablist"===r()){var t=u(o.getEl("body"))[0];t&&t.focus()}else d(e.shiftKey?-1:1)}(e),e.preventDefault()}}),t.on("focusin",function(e){i=e.target,o=e.control}),{focusFirst:function(e){var t=c(e),n=u(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?f(t.lastAriaIndex,n):f(0,n)}}}var ut={},ct=at.extend({init:function(e){var t=this;t._super(e),(e=t.settings).fixed&&t.state.set("fixed",!0),t._items=new qe,t.isRtl()&&t.classes.add("rtl"),t.bodyClasses=new Ie(function(){t.state.get("rendered")&&(t.getEl("body").className=this.toString())}),t.bodyClasses.prefix=t.classPrefix,t.classes.add("container"),t.bodyClasses.add("container-body"),e.containerCls&&t.classes.add(e.containerCls),t._layout=b.create((e.layout||"")+"layout"),t.settings.items?t.add(t.settings.items):t.add(t.render()),t._hasBody=!0},items:function(){return this._items},find:function(e){return(e=ut[e]=ut[e]||new ze(e)).find(this)},add:function(e){return this.items().add(this.create(e)).parent(this),this},focus:function(e){var t,n,r;if(!e||!(n=this.keyboardNav||this.parents().eq(-1)[0].keyboardNav))return r=this.find("*"),this.statusbar&&r.add(this.statusbar.items()),r.each(function(e){if(e.settings.autofocus)return t=null,!1;e.canFocus&&(t=t||e)}),t&&t.focus(),this;n.focusFirst(this)},replace:function(e,t){for(var n,r=this.items(),o=r.length;o--;)if(r[o]===e){r[o]=t;break}0<=o&&((n=t.getEl())&&n.parentNode.removeChild(n),(n=e.getEl())&&n.parentNode.removeChild(n)),t.parent(this)},create:function(e){var t,n=this,r=[];return x.isArray(e)||(e=[e]),x.each(e,function(e){e&&(e instanceof at||("string"==typeof e&&(e={type:e}),t=x.extend({},n.settings.defaults,e),e.type=t.type=t.type||e.type||n.settings.defaultType||(t.defaults?t.defaults.type:null),e=b.create(t)),r.push(e))}),r},renderNew:function(){var r=this;return r.items().each(function(e,t){var n;e.parent(r),e.state.get("rendered")||((n=r.getEl("body")).hasChildNodes()&&t<=n.childNodes.length-1?xe(n.childNodes[t]).before(e.renderHtml()):xe(n).append(e.renderHtml()),e.postRender(),Qe.add(e))}),r._layout.applyClasses(r.items().filter(":visible")),r._lastRect=null,r},append:function(e){return this.add(e).renderNew()},prepend:function(e){return this.items().set(this.create(e).concat(this.items().toArray())),this.renderNew()},insert:function(e,t,n){var r,o,i;return e=this.create(e),r=this.items(),!n&&t<r.length-1&&(t+=1),0<=t&&t<r.length&&(o=r.slice(0,t).toArray(),i=r.slice(t).toArray(),r.set(o.concat(e,i))),this.renderNew()},fromJSON:function(e){for(var t in e)this.find("#"+t).value(e[t]);return this},toJSON:function(){var r={};return this.find("*").each(function(e){var t=e.name(),n=e.value();t&&void 0!==n&&(r[t]=n)}),r},renderHtml:function(){var e=this._layout,t=this.settings.role;return this.preRender(),e.preRender(this),'<div id="'+this._id+'" class="'+this.classes+'"'+(t?' role="'+this.settings.role+'"':"")+'><div id="'+this._id+'-body" class="'+this.bodyClasses+'">'+(this.settings.html||"")+e.renderHtml(this)+"</div></div>"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t.state.set("rendered",!0),t.settings.style&&t.$el.css(t.settings.style),t.settings.border&&(e=t.borderBox,t.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=lt({root:t})),t},initLayoutRect:function(){var e=this._super();return this._layout.recalc(this),e},recalc:function(){var e=this._layoutRect,t=this._lastRect;if(!t||t.w!==e.w||t.h!==e.h)return this._layout.recalc(this),e=this.layoutRect(),this._lastRect={x:e.x,y:e.y,w:e.w,h:e.h},!0},reflow:function(){var e;if(Qe.remove(this),this.visible()){for(at.repaintControls=[],at.repaintControls.map={},this.recalc(),e=at.repaintControls.length;e--;)at.repaintControls[e].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),at.repaintControls=[]}return this}});function ft(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}function dt(e,p){var m,h,t,g,v,b,y,w=p.document||document;p=p||{};var x=w.getElementById(p.handle||e);t=function(e){var t,n,r,o,i,a,s,l,u,c,f,d=(t=w,u=Math.max,n=t.documentElement,r=t.body,o=u(n.scrollWidth,r.scrollWidth),i=u(n.clientWidth,r.clientWidth),a=u(n.offsetWidth,r.offsetWidth),s=u(n.scrollHeight,r.scrollHeight),l=u(n.clientHeight,r.clientHeight),{width:o<a?i:o,height:s<u(n.offsetHeight,r.offsetHeight)?l:s});ft(e),e.preventDefault(),h=e.button,c=x,b=e.screenX,y=e.screenY,f=window.getComputedStyle?window.getComputedStyle(c,null).getPropertyValue("cursor"):c.runtimeStyle.cursor,m=xe("<div></div>").css({position:"absolute",top:0,left:0,width:d.width,height:d.height,zIndex:2147483647,opacity:1e-4,cursor:f}).appendTo(w.body),xe(w).on("mousemove touchmove",v).on("mouseup touchend",g),p.start(e)},v=function(e){if(ft(e),e.button!==h)return g(e);e.deltaX=e.screenX-b,e.deltaY=e.screenY-y,e.preventDefault(),p.drag(e)},g=function(e){ft(e),xe(w).off("mousemove touchmove",v).off("mouseup touchend",g),m.remove(),p.stop&&p.stop(e)},this.destroy=function(){xe(x).off()},xe(x).on("mousedown touchstart",t)}var pt,mt,ht,gt,vt={init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var g=this,v=2;function n(){var m,h,e;function t(e,t,n,r,o,i){var a,s,l,u,c,f,d,p;if(s=g.getEl("scroll"+e)){if(d=t.toLowerCase(),p=n.toLowerCase(),xe(g.getEl("absend")).css(d,g.layoutRect()[r]-1),!o)return void xe(s).css("display","none");xe(s).css("display","block"),a=g.getEl("body"),l=g.getEl("scroll"+e+"t"),u=a["client"+n]-2*v,c=(u-=m&&h?s["client"+i]:0)/a["scroll"+n],(f={})[d]=a["offset"+t]+v,f[p]=u,xe(s).css(f),(f={})[d]=a["scroll"+t]*c,f[p]=u*c,xe(l).css(f)}}e=g.getEl("body"),m=e.scrollWidth>e.clientWidth,h=e.scrollHeight>e.clientHeight,t("h","Left","Width","contentW",m,"Height"),t("v","Top","Height","contentH",h,"Width")}g.settings.autoScroll&&(g._hasScroll||(g._hasScroll=!0,function(){function e(a,s,l,u,c){var f,e=g._id+"-scroll"+a,t=g.classPrefix;xe(g.getEl()).append('<div id="'+e+'" class="'+t+"scrollbar "+t+"scrollbar-"+a+'"><div id="'+e+'t" class="'+t+'scrollbar-thumb"></div></div>'),g.draghelper=new dt(e+"t",{start:function(){f=g.getEl("body")["scroll"+s],xe("#"+e).addClass(t+"active")},drag:function(e){var t,n,r,o,i=g.layoutRect();n=i.contentW>i.innerW,r=i.contentH>i.innerH,o=g.getEl("body")["client"+l]-2*v,t=(o-=n&&r?g.getEl("scroll"+a)["client"+c]:0)/g.getEl("body")["scroll"+l],g.getEl("body")["scroll"+s]=f+e["delta"+u]/t},stop:function(){xe("#"+e).removeClass(t+"active")}})}g.classes.add("scroll"),e("v","Top","Height","Y","Width"),e("h","Left","Width","X","Height")}(),g.on("wheel",function(e){var t=g.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),xe(g.getEl("body")).on("scroll",n)),n())}},bt=ct.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[vt],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n='<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}}),yt={resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(e,t){if(e<=1||t<=1){var n=_e.getWindowSize();e=e<=1?e*n.w:e,t=t<=1?t*n.h:t}return this._layoutRect.autoResize=!1,this.layoutRect({minW:e,minH:t,w:e,h:t}).reflow()},resizeBy:function(e,t){var n=this.layoutRect();return this.resizeTo(n.w+e,n.h+t)}},wt=[],xt=[];function Ct(e,t){for(;e;){if(e===t)return!0;e=e.parent()}}function _t(){pt||(pt=function(e){2!==e.button&&function(e){for(var t=wt.length;t--;){var n=wt[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(Ct(r,n)||n.parent()===r))continue;(e=n.fire("autohide",{target:e.target})).isDefaultPrevented()||n.hide()}}}(e)},xe(document).on("click touchstart",pt))}function St(o){var e=_e.getViewPort().y;function t(e,t){for(var n,r=0;r<wt.length;r++)if(wt[r]!==o)for(n=wt[r].parent();n&&(n=n.parent());)n===o&&wt[r].fixed(e).moveBy(0,t).repaint()}o.settings.autofix&&(o.state.get("fixed")?o._autoFixY>e&&(o.fixed(!1).layoutRect({y:o._autoFixY}).repaint(),t(!1,o._autoFixY-e)):(o._autoFixY=o.layoutRect().y,o._autoFixY<e&&(o.fixed(!0).layoutRect({y:0}).repaint(),t(!0,e-o._autoFixY))))}function kt(e,t){var n,r,o=Et.zIndex||65535;if(e)xt.push(t);else for(n=xt.length;n--;)xt[n]===t&&xt.splice(n,1);if(xt.length)for(n=0;n<xt.length;n++)xt[n].modal&&(o++,r=xt[n]),xt[n].getEl().style.zIndex=o,xt[n].zIndex=o,o++;var i=xe("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];r?xe(i).css("z-index",r.zIndex-1):i&&(i.parentNode.removeChild(i),gt=!1),Et.currentZIndex=o}var Et=bt.extend({Mixins:[Re,yt],init:function(e){var r=this;r._super(e),(r._eventsRoot=r).classes.add("floatpanel"),e.autohide&&(_t(),function(){if(!ht){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;ht=function(){document.all&&t===e.clientWidth&&n===e.clientHeight||(t=e.clientWidth,n=e.clientHeight,Et.hideAll())},xe(window).on("resize",ht)}}(),wt.push(r)),e.autofix&&(mt||(mt=function(){var e;for(e=wt.length;e--;)St(wt[e])},xe(window).on("scroll",mt)),r.on("move",function(){St(this)})),r.on("postrender show",function(e){if(e.control===r){var t,n=r.classPrefix;r.modal&&!gt&&((t=xe("#"+n+"modal-block",r.getContainerElm()))[0]||(t=xe('<div id="'+n+'modal-block" class="'+n+"reset "+n+'fade"></div>').appendTo(r.getContainerElm())),u.setTimeout(function(){t.addClass(n+"in"),xe(r.getEl()).addClass(n+"in")}),gt=!0),kt(!0,r)}}),r.on("show",function(){r.parents().each(function(e){if(e.state.get("fixed"))return r.fixed(!0),!1})}),e.popover&&(r._preBodyHtml='<div class="'+r.classPrefix+'arrow"></div>',r.classes.add("popover").add("bottom").add(r.isRtl()?"end":"start")),r.aria("label",e.ariaLabel),r.aria("labelledby",r._id),r.aria("describedby",r.describedBy||r._id+"-none")},fixed:function(e){if(this.state.get("fixed")!==e){if(this.state.get("rendered")){var t=_e.getViewPort();e?this.layoutRect().y-=t.y:this.layoutRect().y+=t.y}this.classes.toggle("fixed",e),this.state.set("fixed",e)}return this},show:function(){var e,t=this._super();for(e=wt.length;e--&&wt[e]!==this;);return-1===e&&wt.push(this),t},hide:function(){return Tt(this),kt(!1,this),this._super()},hideAll:function(){Et.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),kt(!1,this)),this},remove:function(){Tt(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function Tt(e){var t;for(t=wt.length;t--;)wt[t]===e&&wt.splice(t,1);for(t=xt.length;t--;)xt[t]===e&&xt.splice(t,1)}Et.hideAll=function(){for(var e=wt.length;e--;){var t=wt[e];t&&t.settings.autohide&&(t.hide(),wt.splice(e,1))}};var Nt=function(a,n,e){var s,r,l=v.DOM,t=a.getParam("fixed_toolbar_container");t&&(r=l.select(t)[0]);var o=function(){if(s&&s.moveRel&&s.visible()&&!s._fixed){var e=a.selection.getScrollContainer(),t=a.getBody(),n=0,r=0;if(e){var o=l.getPos(t),i=l.getPos(e);n=Math.max(0,i.x-o.x),r=Math.max(0,i.y-o.y)}s.fixed(!1).moveRel(t,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(n,r)}},i=function(){s&&(s.show(),o(),l.addClass(a.getBody(),"mce-edit-focus"))},u=function(){s&&(s.hide(),Et.hideAll(),l.removeClass(a.getBody(),"mce-edit-focus"))},c=function(){var e,t;s?s.visible()||i():(s=n.panel=b.create({type:r?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:(e=r,t=a,!(!e||t.settings.ui_container)),border:1,items:[!1===f(a)?null:{type:"menubar",border:"0 0 1 0",items:ae(a)},F(a,d(a))]}),I.setUiContainer(a,s),C(a),r?s.renderTo(r).reflow():s.renderTo().reflow(),_(a,s),i(),W(a),a.on("nodeChange",o),a.on("ResizeWindow",o),a.on("activate",i),a.on("deactivate",u),a.nodeChanged())};return a.settings.content_editable=!0,a.on("focus",function(){!1===h(a)&&e.skinUiCss?l.styleSheetLoader.load(e.skinUiCss,c,c):c()}),a.on("blur hide",u),a.on("remove",function(){s&&(s.remove(),s=null)}),!1===h(a)&&e.skinUiCss?l.styleSheetLoader.load(e.skinUiCss,ve(a)):ve(a)(),{}};function Rt(r,o){var i,a,s=this,l=at.classPrefix;s.show=function(e,t){function n(){i&&(xe(r).append('<div class="'+l+"throbber"+(o?" "+l+"throbber-inline":"")+'"></div>'),t&&t())}return s.hide(),i=!0,e?a=u.setTimeout(n,e):n(),s},s.hide=function(){var e=r.lastChild;return u.clearTimeout(a),e&&-1!==e.className.indexOf("throbber")&&e.parentNode.removeChild(e),i=!1,s}}var Ot=function(e,t){var n;e.on("ProgressState",function(e){n=n||new Rt(t.panel.getEl("body")),e.state?n.show(e.time):n.hide()})},Pt=function(e,t,n){var r=function(e){var t=e.settings,n=t.skin,r=t.skin_url;if(!1!==n){var o=n||"lightgray";r=r?e.documentBaseURI.toAbsolute(r):p.baseURL+"/skins/"+o}return r}(e);return r&&(n.skinUiCss=r+"/skin.min.css",e.contentCSS.push(r+"/content"+(e.inline?".inline":"")+".min.css")),Ot(e,t),e.getParam("inline",!1,"boolean")?Nt(e,t,n):we(e,t,n)},At=at.extend({Mixins:[Re],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this.classPrefix;return'<div id="'+this._id+'" class="'+this.classes+'" role="presentation"><div class="'+e+'tooltip-arrow"></div><div class="'+e+'tooltip-inner">'+this.encode(this.state.get("text"))+"</div></div>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().lastChild.innerHTML=t.encode(e.value)}),t._super()},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}}),Dt=at.extend({init:function(r){var o=this;o._super(r),r=o.settings,o.canFocus=!0,r.tooltip&&!1!==Dt.tooltips&&(o.on("mouseenter",function(e){var t=o.tooltip().moveTo(-65535);if(e.control===o){var n=t.text(r.tooltip).show().testMoveRel(o.getEl(),["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"===n),t.classes.toggle("tooltip-nw","bc-tl"===n),t.classes.toggle("tooltip-ne","bc-tr"===n),t.moveRel(o.getEl(),n)}else t.hide()}),o.on("mouseleave mousedown click",function(){o.tooltip().remove(),o._tooltip=null})),o.aria("label",r.ariaLabel||r.tooltip)},tooltip:function(){return this._tooltip||(this._tooltip=new At({type:"tooltip"}),I.inheritUiContainer(this,this._tooltip),this._tooltip.renderTo()),this._tooltip},postRender:function(){var e=this.settings;this._super(),this.parent()||!e.width&&!e.height||(this.initLayoutRect(),this.repaint()),e.autofocus&&this.focus()},bindStates:function(){var t=this;function n(e){t.aria("disabled",e),t.classes.toggle("disabled",e)}function r(e){t.aria("pressed",e),t.classes.toggle("active",e)}return t.state.on("change:disabled",function(e){n(e.value)}),t.state.on("change:active",function(e){r(e.value)}),t.state.get("disabled")&&n(!0),t.state.get("active")&&r(!0),t._super()},remove:function(){this._super(),this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}}),Mt=Dt.extend({Defaults:{value:0},init:function(e){this._super(e),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div class="'+t+'bar-container"><div class="'+t+'bar"></div></div><div class="'+t+'text">0%</div></div>'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var t=this;function n(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}return t.state.on("change:value",function(e){n(e.value)}),n(t.state.get("value")),t._super()}}),It=function(e,t){e.getEl().lastChild.textContent=t+(e.progressBar?" "+e.progressBar.value()+"%":"")},Lt=at.extend({Mixins:[Re],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),t.maxWidth=e.maxWidth,e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||0<e.timeout)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new Mt),t.on("click",function(e){-1!==e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e,t=this,n=t.classPrefix,r="",o="",i="";return t.icon&&(r='<i class="'+n+"ico "+n+"i-"+t.icon+'"></i>'),e=' style="max-width: '+t.maxWidth+"px;"+(t.color?"background-color: "+t.color+';"':'"'),t.closeButton&&(o='<button type="button" class="'+n+'close" aria-hidden="true">×</button>'),t.progressBar&&(i=t.progressBar.renderHtml()),'<div id="'+t._id+'" class="'+t.classes+'"'+e+' role="presentation">'+r+'<div class="'+n+'notification-inner">'+t.state.get("text")+"</div>"+i+o+'<div style="clip: rect(1px, 1px, 1px, 1px);height: 1px;overflow: hidden;position: absolute;width: 1px;" aria-live="assertive" aria-relevant="additions" aria-atomic="true"></div></div>'},postRender:function(){var e=this;return u.setTimeout(function(){e.$el.addClass(e.classPrefix+"in"),It(e,e.state.get("text"))},100),e._super()},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().firstChild.innerHTML=e.value,It(t,e.value)}),t.progressBar&&(t.progressBar.bindStates(),t.progressBar.state.on("change:value",function(e){It(t,t.state.get("text"))})),t._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}});function Bt(i){var a=function(e){return e.inline?e.getElement():e.getContentAreaContainer()};return{open:function(e,t){var n,r=x.extend(e,{maxWidth:(n=a(i),_e.getSize(n).width)}),o=new Lt(r);return 0<(o.args=r).timeout&&(o.timer=setTimeout(function(){o.close(),t()},r.timeout)),o.on("close",function(){t()}),o.renderTo(),o},close:function(e){e.close()},reposition:function(e){K(e,function(e){e.moveTo(0,0)}),function(n){if(0<n.length){var e=n.slice(0,1)[0],t=a(i);e.moveRel(t,"tc-tc"),K(n,function(e,t){0<t&&e.moveRel(n[t-1].getEl(),"bc-tc")})}}(e)},getArgs:function(e){return e.args}}}var Ft=[],jt="";function Ht(e){var t,n=xe("meta[name=viewport]")[0];!1!==de.overrideViewPort&&(n||((n=document.createElement("meta")).setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),(t=n.getAttribute("content"))&&void 0!==jt&&(jt=t),n.setAttribute("content",e?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":jt))}function Ut(e,t){(function(){for(var e=0;e<Ft.length;e++)if(Ft[e]._fullscreen)return!0;return!1})()&&!1===t&&xe([document.documentElement,document.body]).removeClass(e+"fullscreen")}var zt=Et.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var n=this;n._super(e),n.isRtl()&&n.classes.add("rtl"),n.classes.add("window"),n.bodyClasses.add("window-body"),n.state.set("fixed",!0),e.buttons&&(n.statusbar=new bt({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.classes.add("foot"),n.statusbar.parent(n)),n.on("click",function(e){var t=n.classPrefix+"close";(_e.hasClass(e.target,t)||_e.hasClass(e.target.parentNode,t))&&n.close()}),n.on("cancel",function(){n.close()}),n.on("move",function(e){e.control===n&&Et.hideAll()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e,t,n,r,o=this,i=o.statusbar;o._fullscreen&&(o.layoutRect(_e.getWindowSize()),o.layoutRect().contentH=o.layoutRect().innerH),o._super(),e=o.layoutRect(),o.settings.title&&!o._fullscreen&&(t=e.headerW)>e.w&&(n=e.x-Math.max(0,t/2),o.layoutRect({w:t,x:n}),r=!0),i&&(i.layoutRect({w:o.layoutRect().innerW}).recalc(),(t=i.layoutRect().minW+e.deltaW)>e.w&&(n=e.x-Math.max(0,t-e.w),o.layoutRect({w:t,x:n}),r=!0)),r&&o.recalc()},initLayoutRect:function(){var e,t=this._super(),n=0;if(this.settings.title&&!this._fullscreen){e=this.getEl("head");var r=_e.getSize(e);t.headerW=r.width,t.headerH=r.height,n+=t.headerH}this.statusbar&&(n+=this.statusbar.layoutRect().h),t.deltaH+=n,t.minH+=n,t.h+=n;var o=_e.getWindowSize();return t.x=this.settings.x||Math.max(0,o.w/2-t.w/2),t.y=this.settings.y||Math.max(0,o.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,o=e.settings,i="",a="",s=o.html;return e.preRender(),t.preRender(e),o.title&&(i='<div id="'+n+'-head" class="'+r+'window-head"><div id="'+n+'-title" class="'+r+'title">'+e.encode(o.title)+'</div><div id="'+n+'-dragh" class="'+r+'dragh"></div><button type="button" class="'+r+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),o.url&&(s='<iframe src="'+o.url+'" tabindex="-1"></iframe>'),void 0===s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+i+'<div id="'+n+'-body" class="'+e.bodyClasses+'">'+s+"</div>"+a+"</div></div>"},fullscreen:function(e){var n,t,r=this,o=document.documentElement,i=r.classPrefix;if(e!==r._fullscreen)if(xe(window).on("resize",function(){var e;if(r._fullscreen)if(n)r._timer||(r._timer=u.setTimeout(function(){var e=_e.getWindowSize();r.moveTo(0,0).resizeTo(e.w,e.h),r._timer=0},50));else{e=(new Date).getTime();var t=_e.getWindowSize();r.moveTo(0,0).resizeTo(t.w,t.h),50<(new Date).getTime()-e&&(n=!0)}}),t=r.layoutRect(),r._fullscreen=e){r._initial={x:t.x,y:t.y,w:t.w,h:t.h},r.borderBox=Ae("0"),r.getEl("head").style.display="none",t.deltaH-=t.headerH+2,xe([o,document.body]).addClass(i+"fullscreen"),r.classes.add("fullscreen");var a=_e.getWindowSize();r.moveTo(0,0).resizeTo(a.w,a.h)}else r.borderBox=Ae(r.settings.border),r.getEl("head").style.display="",t.deltaH+=t.headerH,xe([o,document.body]).removeClass(i+"fullscreen"),r.classes.remove("fullscreen"),r.moveTo(r._initial.x,r._initial.y).resizeTo(r._initial.w,r._initial.h);return r.reflow()},postRender:function(){var t,n=this;setTimeout(function(){n.classes.add("in"),n.fire("open")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new dt(n._id+"-dragh",{start:function(){t={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(e){n.moveTo(t.x+e.deltaX,t.y+e.deltaY)}}),n.on("submit",function(e){e.isDefaultPrevented()||n.close()}),Ft.push(n),Ht(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e;for(this.dragHelper.destroy(),this._super(),this.statusbar&&this.statusbar.remove(),Ut(this.classPrefix,!1),e=Ft.length;e--;)Ft[e]===this&&Ft.splice(e,1);Ht(0<Ft.length)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});!function(){if(!de.desktop){var n={w:window.innerWidth,h:window.innerHeight};u.setInterval(function(){var e=window.innerWidth,t=window.innerHeight;n.w===e&&n.h===t||(n={w:e,h:t},xe(window).trigger("resize"))},100)}xe(window).on("resize",function(){var e,t,n=_e.getWindowSize();for(e=0;e<Ft.length;e++)t=Ft[e].layoutRect(),Ft[e].moveTo(Ft[e].settings.x||Math.max(0,n.w/2-t.w/2),Ft[e].settings.y||Math.max(0,n.h/2-t.h/2))})}();var Wt=zt.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(e){var t,r=e.callback||function(){};function n(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),r(t)}}}switch(e.buttons){case Wt.OK_CANCEL:t=[n("Ok",!0,!0),n("Cancel",!1)];break;case Wt.YES_NO:case Wt.YES_NO_CANCEL:t=[n("Yes",1,!0),n("No",0)],e.buttons===Wt.YES_NO_CANCEL&&t.push(n("Cancel",-1));break;default:t=[n("Ok",!0,!0)]}return new zt({padding:20,x:e.x,y:e.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:t,title:e.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:e.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:e.onClose,onCancel:function(){r(!1)}}).renderTo(document.body).reflow()},alert:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,Wt.msgBox(e)},confirm:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,e.buttons=Wt.OK_CANCEL,Wt.msgBox(e)}}}),Vt=function(n){return{renderUI:function(e){return Pt(n,this,e)},resizeTo:function(e,t){return ce(n,e,t)},resizeBy:function(e,t){return fe(n,e,t)},getNotificationManagerImpl:function(){return Bt(n)},getWindowManagerImpl:function(){return{open:function(n,e,t){var r;return n.title=n.title||" ",n.url=n.url||n.file,n.url&&(n.width=parseInt(n.width||320,10),n.height=parseInt(n.height||240,10)),n.body&&(n.items={defaults:n.defaults,type:n.bodyType||"form",items:n.body,data:n.data,callbacks:n.commands}),n.url||n.buttons||(n.buttons=[{text:"Ok",subtype:"primary",onclick:function(){r.find("form")[0].submit()}},{text:"Cancel",onclick:function(){r.close()}}]),(r=new zt(n)).on("close",function(){t(r)}),n.data&&r.on("postRender",function(){this.find("*").each(function(e){var t=e.name();t in n.data&&e.value(n.data[t])})}),r.features=n||{},r.params=e||{},r=r.renderTo(document.body).reflow()},alert:function(e,t,n){var r;return(r=Wt.alert(e,function(){t()})).on("close",function(){n(r)}),r},confirm:function(e,t,n){var r;return(r=Wt.confirm(e,function(e){t(e)})).on("close",function(){n(r)}),r},close:function(e){e.close()},getParams:function(e){return e.params},setParams:function(e,t){e.params=t}}}}},qt=Oe.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=x.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t,n,r,o,i=this.settings;t=i.firstControlClass,n=i.lastControlClass,e.each(function(e){e.classes.remove(t).remove(n).add(i.controlClass),e.visible()&&(r||(r=e),o=e)}),r&&r.classes.add(t),o&&o.classes.add(n)},renderHtml:function(e){var t="";return this.applyClasses(e.items()),e.items().each(function(e){t+=e.renderHtml()}),t},recalc:function(){},postRender:function(){},isNative:function(){return!1}}),$t=qt.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}}),Xt=Dt.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&((e=t.style).width=e.height="100%"),this._super()},renderHtml:function(){var e,t,n=this._id,r=this.classPrefix,o=this.state.get("icon"),i=this.state.get("text"),a="",s=this.settings;return e=(e=s.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1])," style=\"background-image: url('"+e+"')\""):"",i&&(this.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+this.encode(i)+"</span>"),o=o?r+"ico "+r+"i-"+o:"",t="boolean"==typeof s.active?' aria-pressed="'+s.active+'"':"",'<div id="'+n+'" class="'+this.classes+'" tabindex="-1"'+t+'><button id="'+n+'-button" role="presentation" type="button" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+a+"</button></div>"},bindStates:function(){var i=this,n=i.$,r=i.classPrefix+"txt";function a(e){var t=n("span."+r,i.getEl());e?(t[0]||(n("button:first",i.getEl()).append('<span class="'+r+'"></span>'),t=n("span."+r,i.getEl())),t.html(i.encode(e))):t.remove(),i.classes.toggle("btn-has-text",!!e)}return i.state.on("change:text",function(e){a(e.value)}),i.state.on("change:icon",function(e){var t=e.value,n=i.classPrefix;t=(i.settings.icon=t)?n+"ico "+n+"i-"+i.settings.icon:"";var r=i.getEl().firstChild,o=r.getElementsByTagName("i")[0];t?(o&&o===r.firstChild||(o=document.createElement("i"),r.insertBefore(o,r.firstChild)),o.className=t):o&&r.removeChild(o),a(i.state.get("text"))}),i._super()}}),Yt=Xt.extend({init:function(e){e=x.extend({text:"Browse...",multiple:!1,accept:null},e),this._super(e),this.classes.add("browsebutton"),e.multiple&&this.classes.add("multiple")},postRender:function(){var n=this,t=_e.create("input",{type:"file",id:n._id+"-browse",accept:n.settings.accept});n._super(),xe(t).on("change",function(e){var t=e.target.files;n.value=function(){return t.length?n.settings.multiple?t:t[0]:null},e.preventDefault(),t.length&&n.fire("change",e)}),xe(t).on("click",function(e){e.stopPropagation()}),xe(n.getEl("button")).on("click",function(e){e.stopPropagation(),t.click()}),n.getEl().appendChild(t)},remove:function(){xe(this.getEl("button")).off(),xe(this.getEl("input")).off(),this._super()}}),Gt=ct.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this._layout;return this.classes.add("btn-group"),this.preRender(),e.preRender(this),'<div id="'+this._id+'" class="'+this.classes+'"><div id="'+this._id+'-body">'+(this.settings.html||"")+e.renderHtml(this)+"</div></div>"}}),Kt=Dt.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'" unselectable="on" aria-labelledby="'+e+'-al" tabindex="-1"><i class="'+t+"ico "+t+'i-checkbox"></i><span id="'+e+'-al" class="'+t+'label">'+this.encode(this.state.get("text"))+"</span></div>"},bindStates:function(){var i=this;function t(e){i.classes.toggle("checked",e),i.aria("checked",e)}return i.state.on("change:text",function(e){i.getEl("al").firstChild.data=i.translate(e.value)}),i.state.on("change:checked change:value",function(e){i.fire("change"),t(e.value)}),i.state.on("change:icon",function(e){var t=e.value,n=i.classPrefix;if(void 0===t)return i.settings.icon;t=(i.settings.icon=t)?n+"ico "+n+"i-"+i.settings.icon:"";var r=i.getEl().firstChild,o=r.getElementsByTagName("i")[0];t?(o&&o===r.firstChild||(o=document.createElement("i"),r.insertBefore(o,r.firstChild)),o.className=t):o&&r.removeChild(o)}),i.state.get("checked")&&t(!0),i._super()}}),Jt=tinymce.util.Tools.resolve("tinymce.util.VK"),Zt=Dt.extend({init:function(r){var o=this;o._super(r),r=o.settings,o.classes.add("combobox"),o.subinput=!0,o.ariaTarget="inp",r.menu=r.menu||r.values,r.menu&&(r.icon="caret"),o.on("click",function(e){var t=e.target,n=o.getEl();if(xe.contains(n,t)||t===n)for(;t&&t!==n;)t.id&&-1!==t.id.indexOf("-open")&&(o.fire("action"),r.menu&&(o.showMenu(),e.aria&&o.menu.items()[0].focus())),t=t.parentNode}),o.on("keydown",function(e){var t;13===e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),o.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),o.fire("submit",{data:t.toJSON()}))}),o.on("keyup",function(e){if("INPUT"===e.target.nodeName){var t=o.state.get("value"),n=e.target.value;n!==t&&(o.state.set("value",n),o.fire("autocomplete",e))}}),o.on("mouseover",function(e){var t=o.tooltip().moveTo(-65535);if(o.statusLevel()&&-1!==e.target.className.indexOf(o.classPrefix+"status")){var n=o.statusMessage()||"Ok",r=t.text(n).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"===r),t.classes.toggle("tooltip-nw","bc-tl"===r),t.classes.toggle("tooltip-ne","bc-tr"===r),t.moveRel(e.target,r)}})},statusLevel:function(e){return 0<arguments.length&&this.state.set("statusLevel",e),this.state.get("statusLevel")},statusMessage:function(e){return 0<arguments.length&&this.state.set("statusMessage",e),this.state.get("statusMessage")},showMenu:function(){var e,t=this,n=t.settings;t.menu||((e=n.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",t.menu=b.create(e).parent(t).renderTo(t.getContainerElm()),t.fire("createmenu"),t.menu.reflow(),t.menu.on("cancel",function(e){e.control===t.menu&&t.focus()}),t.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()===t.value())})}).fire("show"),t.menu.on("select",function(e){t.value(e.control.value())}),t.on("focusin",function(e){"INPUT"===e.target.tagName.toUpperCase()&&t.menu.hide()}),t.aria("expanded",!0)),t.menu.show(),t.menu.layoutRect({w:t.layoutRect().w}),t.menu.moveRel(t.getEl(),t.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,n=this.getEl(),r=this.getEl("open"),o=this.layoutRect(),i=0,a=n.firstChild;this.statusLevel()&&"none"!==this.statusLevel()&&(i=parseInt(_e.getRuntimeStyle(a,"padding-right"),10)-parseInt(_e.getRuntimeStyle(a,"padding-left"),10)),e=r?o.w-_e.getSize(r).width-10:o.w-10;var s=document;return s.all&&(!s.documentMode||s.documentMode<=8)&&(t=this.layoutRect().h-2+"px"),xe(a).css({width:e-i,lineHeight:t}),this._super(),this},postRender:function(){var t=this;return xe(this.getEl("inp")).on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)}),t._super()},renderHtml:function(){var e,t,n,r=this,o=r._id,i=r.settings,a=r.classPrefix,s=r.state.get("value")||"",l="",u="";return"spellcheck"in i&&(u+=' spellcheck="'+i.spellcheck+'"'),i.maxLength&&(u+=' maxlength="'+i.maxLength+'"'),i.size&&(u+=' size="'+i.size+'"'),i.subtype&&(u+=' type="'+i.subtype+'"'),n='<i id="'+o+'-status" class="mce-status mce-ico" style="display: none"></i>',r.disabled()&&(u+=' disabled="disabled"'),(e=i.icon)&&"caret"!==e&&(e=a+"ico "+a+"i-"+i.icon),t=r.state.get("text"),(e||t)&&(l='<div id="'+o+'-open" class="'+a+"btn "+a+'open" tabIndex="-1" role="button"><button id="'+o+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!==e?'<i class="'+e+'"></i>':'<i class="'+a+'caret"></i>')+(t?(e?" ":"")+t:"")+"</button></div>",r.classes.add("has-open")),'<div id="'+o+'" class="'+r.classes+'"><input id="'+o+'-inp" class="'+a+'textbox" value="'+r.encode(s,!1)+'" hidefocus="1"'+u+' placeholder="'+r.encode(i.placeholder)+'" />'+n+l+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(e,r){var o=this;if(0!==e.length){o.menu?o.menu.items().remove():o.menu=b.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(o).renderTo(),x.each(e,function(e){var t,n;o.menu.add({text:e.title,url:e.previewUrl,match:r,classes:"menu-item-ellipsis",onclick:(t=e.value,n=e.title,function(){o.fire("selectitem",{title:n,value:t})})})}),o.menu.renderNew(),o.hideMenu(),o.menu.on("cancel",function(e){e.control.parent()===o.menu&&(e.stopPropagation(),o.focus(),o.hideMenu())}),o.menu.on("select",function(){o.focus()});var t=o.layoutRect().w;o.menu.layoutRect({w:t,minW:0,maxW:t}),o.menu.repaint(),o.menu.reflow(),o.menu.show(),o.menu.moveRel(o.getEl(),o.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])}else o.hideMenu()},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var o=this;o.state.on("change:value",function(e){o.getEl("inp").value!==e.value&&(o.getEl("inp").value=e.value)}),o.state.on("change:disabled",function(e){o.getEl("inp").disabled=e.value}),o.state.on("change:statusLevel",function(e){var t=o.getEl("status"),n=o.classPrefix,r=e.value;_e.css(t,"display","none"===r?"none":""),_e.toggleClass(t,n+"i-checkmark","ok"===r),_e.toggleClass(t,n+"i-warning","warn"===r),_e.toggleClass(t,n+"i-error","error"===r),o.classes.toggle("has-status","none"!==r),o.repaint()}),_e.on(o.getEl("status"),"mouseleave",function(){o.tooltip().hide()}),o.on("cancel",function(e){o.menu&&o.menu.visible()&&(e.stopPropagation(),o.hideMenu())});var n=function(e,t){t&&0<t.items().length&&t.items().eq(e)[0].focus()};return o.on("keydown",function(e){var t=e.keyCode;"INPUT"===e.target.nodeName&&(t===Jt.DOWN?(e.preventDefault(),o.fire("autocomplete"),n(0,o.menu)):t===Jt.UP&&(e.preventDefault(),n(-1,o.menu)))}),o._super()},remove:function(){xe(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}}),Qt=Zt.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl("open"),n=t?t.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=e}catch(e){}},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.state.get("rendered")&&t.repaintColor(e.value)}),t._super()}}),en=Xt.extend({showPanel:function(){var t=this,e=t.settings;if(t.classes.add("opened"),t.panel)t.panel.show();else{var n=e.panel;n.type&&(n={layout:"grid",items:n}),n.role=n.role||"dialog",n.popover=!0,n.autohide=!0,n.ariaRoot=!0,t.panel=new Et(n).on("hide",function(){t.classes.remove("opened")}).on("cancel",function(e){e.stopPropagation(),t.focus(),t.hidePanel()}).parent(t).renderTo(t.getContainerElm()),t.panel.fire("show"),t.panel.reflow()}var r=t.panel.testMoveRel(t.getEl(),e.popoverAlign||(t.isRtl()?["bc-tc","bc-tl","bc-tr"]:["bc-tc","bc-tr","bc-tl","tc-bc","tc-br","tc-bl"]));t.panel.classes.toggle("start","l"===r.substr(-1)),t.panel.classes.toggle("end","r"===r.substr(-1));var o="t"===r.substr(0,1);t.panel.classes.toggle("bottom",!o),t.panel.classes.toggle("top",o),t.panel.moveRel(t.getEl(),r)},hidePanel:function(){this.panel&&this.panel.hide()},postRender:function(){var t=this;return t.aria("haspopup",!0),t.on("click",function(e){e.control===t&&(t.panel&&t.panel.visible()?t.hidePanel():(t.showPanel(),t.panel.focus(!!e.aria)))}),t._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}}),tn=v.DOM,nn=en.extend({init:function(e){this._super(e),this.classes.add("splitbtn"),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),o=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",i=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return r&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(r)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(o?'<i class="'+o+'"'+i+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+a+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var t=this,n=t.settings.onclick;return t.on("click",function(e){e.aria&&"down"===e.aria.key||e.control!==t||tn.getParent(e.target,"."+t.classPrefix+"open")||(e.stopImmediatePropagation(),n.call(t,e))}),delete t.settings.onclick,t._super()}}),rn=tinymce.util.Tools.resolve("tinymce.util.Color"),on=Dt.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){var n,r,o,i,a,s=this,l=s.color();function u(e,t){var n,r,o=_e.getPos(e);return n=t.pageX-o.x,r=t.pageY-o.y,{x:n=Math.max(0,Math.min(n/e.clientWidth,1)),y:r=Math.max(0,Math.min(r/e.clientHeight,1))}}function c(e,t){var n=(360-e.h)/360;_e.css(o,{top:100*n+"%"}),t||_e.css(a,{left:e.s+"%",top:100-e.v+"%"}),i.style.background=rn({s:100,v:100,h:e.h}).toHex(),s.color().parse({s:e.s,v:e.v,h:e.h})}function e(e){var t;t=u(i,e),n.s=100*t.x,n.v=100*(1-t.y),c(n),s.fire("change")}function t(e){var t;t=u(r,e),(n=l.toHsv()).h=360*(1-t.y),c(n,!0),s.fire("change")}r=s.getEl("h"),o=s.getEl("hp"),i=s.getEl("sv"),a=s.getEl("svp"),s._repaint=function(){c(n=l.toHsv())},s._super(),s._svdraghelper=new dt(s._id+"-sv",{start:e,drag:e}),s._hdraghelper=new dt(s._id+"-h",{start:t,drag:t}),s._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){if(!arguments.length)return this.color().toHex();this.color().parse(e),this._rendered&&this._repaint()},color:function(){return this._color||(this._color=rn()),this._color},renderHtml:function(){var e,t=this._id,i=this.classPrefix,a="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return e='<div id="'+t+'-h" class="'+i+'colorpicker-h" style="background: -ms-linear-gradient(top,'+a+");background: linear-gradient(to bottom,"+a+');">'+function(){var e,t,n,r,o="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",e=0,t=(r=a.split(",")).length-1;e<t;e++)o+='<div class="'+i+'colorpicker-h-chunk" style="height:'+100/t+"%;"+n+r[e]+",endColorstr="+r[e+1]+");-ms-"+n+r[e]+",endColorstr="+r[e+1]+')"></div>';return o}()+'<div id="'+t+'-hp" class="'+i+'colorpicker-h-marker"></div></div>','<div id="'+t+'" class="'+this.classes+'"><div id="'+t+'-sv" class="'+i+'colorpicker-sv"><div class="'+i+'colorpicker-overlay1"><div class="'+i+'colorpicker-overlay2"><div id="'+t+'-svp" class="'+i+'colorpicker-selector1"><div class="'+i+'colorpicker-selector2"></div></div></div></div></div>'+e+"</div>"}}),an=Dt.extend({init:function(e){e=x.extend({height:100,text:"Drop an image here",multiple:!1,accept:null},e),this._super(e),this.classes.add("dropzone"),e.multiple&&this.classes.add("multiple")},renderHtml:function(){var e,t,n=this.settings;return e={id:this._id,hidefocus:"1"},t=_e.create("div",e,"<span>"+this.translate(n.text)+"</span>"),n.height&&_e.css(t,"height",n.height+"px"),n.width&&_e.css(t,"width",n.width+"px"),t.className=this.classes,t.outerHTML},postRender:function(){var r=this,e=function(e){e.preventDefault(),r.classes.toggle("dragenter"),r.getEl().className=r.classes};r._super(),r.$el.on("dragover",function(e){e.preventDefault()}),r.$el.on("dragenter",e),r.$el.on("dragleave",e),r.$el.on("drop",function(e){if(e.preventDefault(),!r.state.get("disabled")){var t=function(e){var t=r.settings.accept;if("string"!=typeof t)return e;var n=new RegExp("("+t.split(/\s*,\s*/).join("|")+")$","i");return x.grep(e,function(e){return n.test(e.name)})}(e.dataTransfer.files);r.value=function(){return t.length?r.settings.multiple?t:t[0]:null},t.length&&r.fire("change",e)}})},remove:function(){this.$el.off(),this._super()}}),sn=Dt.extend({init:function(e){var n=this;e.delimiter||(e.delimiter="»"),n._super(e),n.classes.add("path"),n.canFocus=!0,n.on("click",function(e){var t;(t=e.target.getAttribute("data-index"))&&n.fire("select",{value:n.row()[t],index:t})}),n.row(n.settings.row)},focus:function(){return this.getEl().firstChild.focus(),this},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'">'+this._getDataPathHtml(this.state.get("row"))+"</div>"},bindStates:function(){var t=this;return t.state.on("change:row",function(e){t.innerHtml(t._getDataPathHtml(e.value))}),t._super()},_getDataPathHtml:function(e){var t,n,r=e||[],o="",i=this.classPrefix;for(t=0,n=r.length;t<n;t++)o+=(0<t?'<div class="'+i+'divider" aria-hidden="true"> '+this.settings.delimiter+" </div>":"")+'<div role="button" class="'+i+"path-item"+(t===n-1?" "+i+"last":"")+'" data-index="'+t+'" tabindex="-1" id="'+this._id+"-"+t+'" aria-level="'+(t+1)+'">'+r[t].name+"</div>";return o||(o='<div class="'+i+'path-item"> </div>'),o}}),ln=sn.extend({postRender:function(){var i=this,a=i.settings.editor;function s(e){if(1===e.nodeType){if("BR"===e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}return!1!==a.settings.elementpath&&(i.on("select",function(e){a.focus(),a.selection.select(this.row()[e.index].element),a.nodeChanged()}),a.on("nodeChange",function(e){for(var t=[],n=e.parents,r=n.length;r--;)if(1===n[r].nodeType&&!s(n[r])){var o=a.fire("ResolveName",{name:n[r].nodeName.toLowerCase(),target:n[r]});if(o.isDefaultPrevented()||t.push({name:o.name,element:n[r]}),o.isPropagationStopped())break}i.row(t)})),i._super()}}),un=ct.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}}),cn=ct.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:15,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var r=this,e=r.items();r.settings.formItemDefaults||(r.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),e.each(function(e){var t,n=e.settings.label;n&&((t=new un(x.extend({items:{type:"label",id:e._id+"-l",text:n,flex:0,forId:e._id,disabled:e.disabled()}},r.settings.formItemDefaults))).type="formitem",e.aria("labelledby",e._id+"-l"),void 0===e.settings.flex&&(e.settings.flex=1),r.replace(e,t),t.add(e))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){this._super(),this.fromJSON(this.settings.data)},bindStates:function(){var n=this;function e(){var e,t,r=0,o=[];if(!1!==n.settings.labelGapCalc)for(("children"===n.settings.labelGapCalc?n.find("formitem"):n.items()).filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;r=r<n?n:r,o.push(t)}),t=n.settings.labelGap||0,e=o.length;e--;)o[e].settings.minWidth=r+t}n._super(),n.on("show",e),e()}}),fn=cn.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}}),dn=0,pn=function(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:E(e)}},mn={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw"HTML must have a single root node";return pn(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return pn(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return pn(n)},fromDom:pn,fromPoint:function(e,t,n){var r=e.dom();return D.from(r.elementFromPoint(t,n)).map(pn)}},hn=function(n){var r,o=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o||(o=!0,r=n.apply(null,e)),r}},gn={ATTRIBUTE:Node.ATTRIBUTE_NODE,CDATA_SECTION:Node.CDATA_SECTION_NODE,COMMENT:Node.COMMENT_NODE,DOCUMENT:Node.DOCUMENT_NODE,DOCUMENT_TYPE:Node.DOCUMENT_TYPE_NODE,DOCUMENT_FRAGMENT:Node.DOCUMENT_FRAGMENT_NODE,ELEMENT:Node.ELEMENT_NODE,TEXT:Node.TEXT_NODE,PROCESSING_INSTRUCTION:Node.PROCESSING_INSTRUCTION_NODE,ENTITY_REFERENCE:Node.ENTITY_REFERENCE_NODE,ENTITY:Node.ENTITY_NODE,NOTATION:Node.NOTATION_NODE},vn=function(e){return e.dom().nodeType},bn=function(t){return function(e){return vn(e)===t}},yn=(bn(gn.ELEMENT),bn(gn.TEXT),bn(gn.DOCUMENT),hn(function(){return yn(mn.fromDom(document))}),function(e){var t=e.dom().body;if(null==t)throw"Body is not available yet";return mn.fromDom(t)}),wn=("undefined"!=typeof window?window:Function("return this;")(),function(){return xn(0,0)}),xn=function(e,t){return{major:e,minor:t}},Cn={nu:xn,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?wn():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return xn(r(1),r(2))}(e,n)},unknown:wn},_n="Firefox",Sn=function(e,t){return function(){return t===e}},kn=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Sn("Edge",t),isChrome:Sn("Chrome",t),isIE:Sn("IE",t),isOpera:Sn("Opera",t),isFirefox:Sn(_n,t),isSafari:Sn("Safari",t)}},En={unknown:function(){return kn({current:void 0,version:Cn.unknown()})},nu:kn,edge:E("Edge"),chrome:E("Chrome"),ie:E("IE"),opera:E("Opera"),firefox:E(_n),safari:E("Safari")},Tn="Windows",Nn="Android",Rn="Solaris",On="FreeBSD",Pn=function(e,t){return function(){return t===e}},An=function(e){var t=e.current;return{current:t,version:e.version,isWindows:Pn(Tn,t),isiOS:Pn("iOS",t),isAndroid:Pn(Nn,t),isOSX:Pn("OSX",t),isLinux:Pn("Linux",t),isSolaris:Pn(Rn,t),isFreeBSD:Pn(On,t)}},Dn={unknown:function(){return An({current:void 0,version:Cn.unknown()})},nu:An,windows:E(Tn),ios:E("iOS"),android:E(Nn),linux:E("Linux"),osx:E("OSX"),solaris:E(Rn),freebsd:E(On)},Mn=function(e,t){var n=String(t).toLowerCase();return Z(e,function(e){return e.search(n)})},In=function(e,n){return Mn(e,n).map(function(e){var t=Cn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Ln=function(e,n){return Mn(e,n).map(function(e){var t=Cn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Bn=function(e,t){return-1!==e.indexOf(t)},Fn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,jn=function(t){return function(e){return Bn(e,t)}},Hn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Bn(e,"edge/")&&Bn(e,"chrome")&&Bn(e,"safari")&&Bn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Fn],search:function(e){return Bn(e,"chrome")&&!Bn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Bn(e,"msie")||Bn(e,"trident")}},{name:"Opera",versionRegexes:[Fn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:jn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:jn("firefox")},{name:"Safari",versionRegexes:[Fn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Bn(e,"safari")||Bn(e,"mobile/"))&&Bn(e,"applewebkit")}}],Un=[{name:"Windows",search:jn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Bn(e,"iphone")||Bn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:jn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:jn("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:jn("linux"),versionRegexes:[]},{name:"Solaris",search:jn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:jn("freebsd"),versionRegexes:[]}],zn={browsers:E(Hn),oses:E(Un)},Wn=function(e){var t,n,r,o,i,a,s,l,u,c,f,d=zn.browsers(),p=zn.oses(),m=In(d,e).fold(En.unknown,En.nu),h=Ln(p,e).fold(Dn.unknown,Dn.nu);return{browser:m,os:h,deviceType:(n=m,r=e,o=(t=h).isiOS()&&!0===/ipad/i.test(r),i=t.isiOS()&&!o,a=t.isAndroid()&&3===t.version.major,s=t.isAndroid()&&4===t.version.major,l=o||a||s&&!0===/mobile/i.test(r),u=t.isiOS()||t.isAndroid(),c=u&&!l,f=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(r),{isiPad:E(o),isiPhone:E(i),isTablet:E(l),isPhone:E(c),isTouch:E(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:E(f)})}},Vn=hn(function(){var e=navigator.userAgent;return Wn(e)}),qn=gn.ELEMENT,$n=gn.DOCUMENT,Xn=function(e){return e.nodeType!==qn&&e.nodeType!==$n||0===e.childElementCount},Yn={all:function(e,t){var n=void 0===t?document:t.dom();return Xn(n)?[]:G(n.querySelectorAll(e),mn.fromDom)},is:function(e,t){var n=e.dom();if(n.nodeType!==qn)return!1;if(void 0!==n.matches)return n.matches(t);if(void 0!==n.msMatchesSelector)return n.msMatchesSelector(t);if(void 0!==n.webkitMatchesSelector)return n.webkitMatchesSelector(t);if(void 0!==n.mozMatchesSelector)return n.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},one:function(e,t){var n=void 0===t?document:t.dom();return Xn(n)?D.none():D.from(n.querySelector(e)).map(mn.fromDom)}},Gn=(Vn().browser.isIE(),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}("element","offset"),function(e,t){return Yn.all(t,e)}),Kn=x.trim,Jn=function(t){return function(e){if(e&&1===e.nodeType){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Zn=Jn("true"),Qn=Jn("false"),er=function(e,t,n,r,o){return{type:e,title:t,url:n,level:r,attach:o}},tr=function(e){return e.innerText||e.textContent},nr=function(e){return e.id?e.id:(t="h",n=(new Date).getTime(),t+"_"+Math.floor(1e9*Math.random())+ ++dn+String(n));var t,n},rr=function(e){return(t=e)&&"A"===t.nodeName&&(t.id||t.name)&&ir(e);var t},or=function(e){return e&&/^(H[1-6])$/.test(e.nodeName)},ir=function(e){return function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return Zn(e)}return!1}(e)&&!Qn(e)},ar=function(e){return or(e)&&ir(e)},sr=function(e){var t,n=nr(e);return er("header",tr(e),"#"+n,or(t=e)?parseInt(t.nodeName.substr(1),10):0,function(){e.id=n})},lr=function(e){var t=e.id||e.name,n=tr(e);return er("anchor",n||"#"+t,"#"+t,0,k)},ur=function(e){var t,n;return t="h1,h2,h3,h4,h5,h6,a:not([href])",n=e,G(Gn(mn.fromDom(n),t),function(e){return e.dom()})},cr=function(e){return 0<Kn(e.title).length},fr=function(e){var t,n=ur(e);return J((t=n,G(J(t,ar),sr)).concat(G(J(n,rr),lr)),cr)},dr={},pr=function(e){return{title:e.title,value:{title:{raw:e.title},url:e.url,attach:e.attach}}},mr=function(e,t){return{title:e,value:{title:e,url:t,attach:k}}},hr=function(e,t,n){var r=t in e?e[t]:n;return!1===r?null:r},gr=function(e,r,o,t){var n,i,a,s,l,u,c={title:"-"},f=function(e){var t=e.hasOwnProperty(o)?e[o]:[],n=J(t,function(e){return t=e,!Y(r,function(e){return e.url===t});var t});return x.map(n,function(e){return{title:e,value:{title:e,url:e,attach:k}}})},d=function(t){var e,n=J(r,function(e){return e.type===t});return e=n,x.map(e,pr)};return!1===t.typeahead_urls?[]:"file"===o?(n=[br(e,f(dr)),br(e,d("header")),br(e,(s=d("anchor"),l=hr(t,"anchor_top","#top"),u=hr(t,"anchor_bottom","#bottom"),null!==l&&s.unshift(mr("<top>",l)),null!==u&&s.push(mr("<bottom>",u)),s))],i=function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(c,t)},a=[],K(n,function(e){a=i(a,e)}),a):br(e,f(dr))},vr=function(e,t){var n,r,o,i=dr[t];/^https?/.test(e)&&(i?(n=i,r=e,o=X(n,r),-1===o?D.none():D.some(o)).isNone()&&(dr[t]=i.slice(0,5).concat(e)):dr[t]=[e])},br=function(e,t){var n=e.toLowerCase(),r=x.grep(t,function(e){return-1!==e.title.toLowerCase().indexOf(n)});return 1===r.length&&r[0].title===e?[]:r},yr=function(i,e,n){var r=e.filepicker_validator_handler;r&&i.state.on("change:value",function(e){var t;0!==(t=e.value).length?r({url:t,type:n},function(e){var t,n,r,o=(n=(t=e).status,r=t.message,"valid"===n?{status:"ok",message:r}:"unknown"===n?{status:"warn",message:r}:"invalid"===n?{status:"warn",message:r}:{status:"none",message:""});i.statusMessage(o.message),i.statusLevel(o.status)}):i.statusLevel("none")})},wr=Zt.extend({Statics:{clearHistory:function(){dr={}}},init:function(e){var t,n,r,o,i,a,s,l,u=this,c=window.tinymce?window.tinymce.activeEditor:p.activeEditor,f=c.settings,d=e.filetype;e.spellcheck=!1,(r=f.file_picker_types||f.file_browser_callback_types)&&(r=x.makeMap(r,/[, ]/)),r&&!r[d]||(!(n=f.file_picker_callback)||r&&!r[d]?!(n=f.file_browser_callback)||r&&!r[d]||(t=function(){n(u.getEl("inp").id,u.value(),d,window)}):t=function(){var e=u.fire("beforecall").meta;e=x.extend({filetype:d},e),n.call(c,function(e,t){u.value(e).fire("change",{meta:t})},u.value(),e)}),t&&(e.icon="browse",e.onaction=t),u._super(e),u.classes.add("filepicker"),o=u,i=f,a=c.getBody(),s=d,l=function(e){var t=fr(a),n=gr(e,t,s,i);o.showAutoComplete(n,e)},o.on("autocomplete",function(){l(o.value())}),o.on("selectitem",function(e){var t=e.value;o.value(t.url);var n,r=(n=t.title).raw?n.raw:n;"image"===s?o.fire("change",{meta:{alt:r,attach:t.attach}}):o.fire("change",{meta:{text:r,attach:t.attach}}),o.focus()}),o.on("click",function(e){0===o.value().length&&"INPUT"===e.target.nodeName&&l("")}),o.on("PostRender",function(){o.getRoot().on("submit",function(e){e.isDefaultPrevented()||vr(o.value(),s)})}),yr(u,f,d)}}),xr=$t.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}}),Cr=$t.extend({recalc:function(e){var t,n,r,o,i,a,s,l,u,c,f,d,p,m,h,g,v,b,y,w,x,C,_,S,k,E,T,N,R,O,P,A,D,M,I,L,B,F=[],j=Math.max,H=Math.min;for(r=e.items().filter(":visible"),o=e.layoutRect(),i=e.paddingBox,a=e.settings,d=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,u=a.spacing||0,"row-reversed"!==d&&"column-reverse"!==d||(r=r.set(r.toArray().reverse()),d=d.split("-")[0]),B="column"===d?(S="y",C="h",_="minH",k="maxH",T="innerH",E="top",N="deltaH",R="contentH",M="left",A="w",O="x",P="innerW",D="minW",I="right",L="deltaW","contentW"):(S="x",C="w",_="minW",k="maxW",T="innerW",E="left",N="deltaW",R="contentW",M="top",A="h",O="y",P="innerH",D="minH",I="bottom",L="deltaH","contentH"),f=o[T]-i[E]-i[E],x=c=0,t=0,n=r.length;t<n;t++)m=(p=r[t]).layoutRect(),f-=t<n-1?u:0,0<(h=p.settings.flex)&&(c+=h,m[k]&&F.push(p),m.flex=h),f-=m[_],x<(g=i[M]+m[D]+i[I])&&(x=g);if((y={})[_]=f<0?o[_]-f+o[N]:o[T]-f+o[N],y[D]=x+o[L],y[R]=o[T]-f,y[B]=x,y.minW=H(y.minW,o.maxW),y.minH=H(y.minH,o.maxH),y.minW=j(y.minW,o.startMinWidth),y.minH=j(y.minH,o.startMinHeight),!o.autoResize||y.minW===o.minW&&y.minH===o.minH){for(b=f/c,t=0,n=F.length;t<n;t++)(v=(m=(p=F[t]).layoutRect())[k])<(g=m[_]+m.flex*b)?(f-=m[k]-m[_],c-=m.flex,m.flex=0,m.maxFlexSize=v):m.maxFlexSize=0;for(b=f/c,w=i[E],y={},0===c&&("end"===l?w=f+i[E]:"center"===l?(w=Math.round(o[T]/2-(o[T]-f)/2)+i[E])<0&&(w=i[E]):"justify"===l&&(w=i[E],u=Math.floor(f/(r.length-1)))),y[O]=i[M],t=0,n=r.length;t<n;t++)g=(m=(p=r[t]).layoutRect()).maxFlexSize||m[_],"center"===s?y[O]=Math.round(o[P]/2-m[A]/2):"stretch"===s?(y[A]=j(m[D]||0,o[P]-i[M]-i[I]),y[O]=i[M]):"end"===s&&(y[O]=o[P]-m[A]-i.top),0<m.flex&&(g+=m.flex*b),y[C]=g,y[S]=w,p.layoutRect(y),p.recalc&&p.recalc(),w+=g+u}else if(y.w=y.minW,y.h=y.minH,e.layoutRect(y),this.recalc(e),null===e._lastRect){var U=e.parent();U&&(U._lastRect=null,U.recalc())}}}),_r=qt.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}}),Sr=function(e,t){return Yn.one(t,e)},kr=function(e,t){return function(){e.execCommand("mceToggleFormat",!1,t)}},Er=function(e,t,n){var r=function(e){n(e,t)};e.formatter?e.formatter.formatChanged(t,r):e.on("init",function(){e.formatter.formatChanged(t,r)})},Tr=function(e,n){return function(t){Er(e,n,function(e){t.control.active(e)})}},Nr=function(r){var t=["alignleft","aligncenter","alignright","alignjustify"],e=[{text:"Left",icon:"alignleft",onclick:kr(r,"alignleft")},{text:"Center",icon:"aligncenter",onclick:kr(r,"aligncenter")},{text:"Right",icon:"alignright",onclick:kr(r,"alignright")},{text:"Justify",icon:"alignjustify",onclick:kr(r,"alignjustify")}];r.addMenuItem("align",{text:"Align",menu:e}),r.addButton("align",{type:"menubutton",icon:"alignleft",menu:e,onShowMenu:function(e){var n=e.control.menu;x.each(t,function(t,e){n.items().eq(e).each(function(e){return e.active(r.formatter.match(t))})})},onPostRender:function(e){var n=e.control;x.each(t,function(t,e){Er(r,t,function(e){n.icon("alignleft"),e&&n.icon(t)})})}}),x.each({alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(e,t){r.addButton(t,{active:!1,tooltip:e[0],cmd:e[1],onPostRender:Tr(r,t)})})},Rr=function(e){return e?e.split(",")[0]:""},Or=function(l,u){return function(){var s=this;s.state.set("value",null),l.on("init nodeChange",function(e){var t,n,r,o,i=l.queryCommandValue("FontName"),a=(t=u,o=(n=i)?n.toLowerCase():"",x.each(t,function(e){e.value.toLowerCase()===o&&(r=e.value)}),x.each(t,function(e){r||Rr(e.value).toLowerCase()!==Rr(o).toLowerCase()||(r=e.value)}),r);s.value(a||null),!a&&i&&s.text(Rr(i))})}},Pr=function(n){n.addButton("fontselect",function(){var e,t=(e=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(n.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),x.map(e,function(e){return{text:{raw:e[0]},value:e[1],textStyle:-1===e[1].indexOf("dings")?"font-family:"+e[1]:""}}));return{type:"listbox",text:"Font Family",tooltip:"Font Family",values:t,fixedWidth:!0,onPostRender:Or(n,t),onselect:function(e){e.control.settings.value&&n.execCommand("FontName",!1,e.control.settings.value)}}})},Ar=function(e){Pr(e)},Dr=function(e,t){return/[0-9.]+px$/.test(e)?(n=72*parseInt(e,10)/96,r=t||0,o=Math.pow(10,r),Math.round(n*o)/o+"pt"):e;var n,r,o},Mr=function(e,t,n){var r;return x.each(e,function(e){e.value===n?r=n:e.value===t&&(r=t)}),r},Ir=function(n){n.addButton("fontsizeselect",function(){var e,a,s,t=(e=n.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt",x.map(e.split(" "),function(e){var t=e,n=e,r=e.split("=");return 1<r.length&&(t=r[0],n=r[1]),{text:t,value:n}}));return{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:t,fixedWidth:!0,onPostRender:(a=n,s=t,function(){var i=this;a.on("init nodeChange",function(e){var t,n,r,o;if(t=a.queryCommandValue("FontSize"))for(r=3;!o&&0<=r;r--)n=Dr(t,r),o=Mr(s,n,t);i.value(o||null),o||i.text(n)})}),onclick:function(e){e.control.settings.value&&n.execCommand("FontSize",!1,e.control.settings.value)}}})},Lr=function(e){Ir(e)},Br=function(n,e){var r=e.length;return x.each(e,function(e){e.menu&&(e.hidden=0===Br(n,e.menu));var t=e.format;t&&(e.hidden=!n.formatter.canApply(t)),e.hidden&&r--}),r},Fr=function(n,e){var r=e.items().length;return e.items().each(function(e){e.menu&&e.visible(0<Fr(n,e.menu)),!e.menu&&e.settings.menu&&e.visible(0<Br(n,e.settings.menu));var t=e.settings.format;t&&e.visible(n.formatter.canApply(t)),e.visible()||r--}),r},jr=function(e){var r,o,i,t,a,n,s,l,u=(o=0,i=[],t=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],a=function(e){var r=[];if(e)return x.each(e,function(e){var t={text:e.title,icon:e.icon};if(e.items)t.menu=a(e.items);else{var n=e.format||"custom"+o++;e.format||(e.name=n,i.push(e)),t.format=n,t.cmd=e.cmd}r.push(t)}),r},(r=e).on("init",function(){x.each(i,function(e){r.formatter.register(e.name,e)})}),{type:"menu",items:r.settings.style_formats_merge?r.settings.style_formats?a(t.concat(r.settings.style_formats)):a(t):a(r.settings.style_formats||t),onPostRender:function(e){r.fire("renderFormatsMenu",{control:e.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return r.formatter.getCssText(this.settings.format)},onPostRender:function(){var n=this;n.parent().on("show",function(){var e,t;(e=n.settings.format)&&(n.disabled(!r.formatter.canApply(e)),n.active(r.formatter.match(e))),(t=n.settings.cmd)&&n.active(r.queryCommandState(t))})},onclick:function(){this.settings.format&&kr(r,this.settings.format)(),this.settings.cmd&&r.execCommand(this.settings.cmd)}}});n=u,e.addMenuItem("formats",{text:"Formats",menu:n}),l=u,(s=e).addButton("styleselect",{type:"menubutton",text:"Formats",menu:l,onShowMenu:function(){s.settings.style_formats_autohide&&Fr(s,this.menu)}})},Hr=function(n,e){return function(){var o,i,a,t=[];return x.each(e,function(e){t.push({text:e[0],value:e[1],textStyle:function(){return n.formatter.getCssText(e[1])}})}),{type:"listbox",text:e[0][0],values:t,fixedWidth:!0,onselect:function(e){if(e.control){var t=e.control.value();kr(n,t)()}},onPostRender:(o=n,i=t,function(){var t=this;o.on("nodeChange",function(e){var n=o.formatter,r=null;x.each(e.parents,function(t){if(x.each(i,function(e){if(a?n.matchNode(t,a,{value:e.value})&&(r=e.value):n.matchNode(t,e.value)&&(r=e.value),r)return!1}),r)return!1}),t.value(r)})})}}},Ur=function(e){var t,n,r=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");e.addMenuItem("blockformats",{text:"Blocks",menu:(t=e,n=r,x.map(n,function(e){return{text:e[0],onclick:kr(t,e[1]),textStyle:function(){return t.formatter.getCssText(e[1])}}}))}),e.addButton("formatselect",Hr(e,r))},zr=function(t,e){var n,r;if("string"==typeof e)r=e.split(" ");else if(x.isArray(e))return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Array.prototype.isPrototypeOf(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);te.apply(t,e[n])}return t}(x.map(e,function(e){return zr(t,e)}));return n=x.grep(r,function(e){return"|"===e||e in t.menuItems}),x.map(n,function(e){return"|"===e?{text:"-"}:t.menuItems[e]})},Wr=function(e){return e&&"-"===e.text},Vr=function(e){var t=J(e,function(e,t,n){return!Wr(e)||!Wr(n[t-1])});return J(t,function(e,t,n){return!Wr(e)||0<t&&t<n.length-1})},qr=function(e){var t,n,r,o,i=e.settings.insert_button_items;return Vr(i?zr(e,i):(t=e,n="insert",r=[{text:"-"}],o=x.grep(t.menuItems,function(e){return e.context===n}),x.each(o,function(e){"before"===e.separator&&r.push({text:"|"}),e.prependToContext?r.unshift(e):r.push(e),"after"===e.separator&&r.push({text:"|"})}),r))},$r=function(e){var t;(t=e).addButton("insert",{type:"menubutton",icon:"insert",menu:[],oncreatemenu:function(){this.menu.add(qr(t)),this.menu.renderNew()}})},Xr=function(e){var n,r,o;n=e,x.each({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(e,t){n.addButton(t,{active:!1,tooltip:e,onPostRender:Tr(n,t),onclick:kr(n,t)})}),r=e,x.each({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"],removeformat:["Clear formatting","RemoveFormat"],remove:["Remove","Delete"]},function(e,t){r.addButton(t,{tooltip:e[0],cmd:e[1]})}),o=e,x.each({blockquote:["Blockquote","mceBlockQuote"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"]},function(e,t){o.addButton(t,{active:!1,tooltip:e[0],cmd:e[1],onPostRender:Tr(o,t)})})},Yr=function(e){var n;Xr(e),n=e,x.each({bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline","Meta+U"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"],newdocument:["New document","mceNewDocument"],cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"]},function(e,t){n.addMenuItem(t,{text:e[0],icon:t,shortcut:e[2],cmd:e[1]})}),n.addMenuItem("codeformat",{text:"Code",icon:"code",onclick:kr(n,"code")})},Gr=function(n,r){return function(){var e=this,t=function(){var e="redo"===r?"hasRedo":"hasUndo";return!!n.undoManager&&n.undoManager[e]()};e.disabled(!t()),n.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){e.disabled(n.readonly||!t())})}},Kr=function(e){var t,n;(t=e).addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:Gr(t,"undo"),cmd:"undo"}),t.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:Gr(t,"redo"),cmd:"redo"}),(n=e).addButton("undo",{tooltip:"Undo",onPostRender:Gr(n,"undo"),cmd:"undo"}),n.addButton("redo",{tooltip:"Redo",onPostRender:Gr(n,"redo"),cmd:"redo"})},Jr=function(e){var t,n;(t=e).addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:(n=t,function(){var t=this;n.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(n.hasVisual)}),cmd:"mceToggleVisualAid"})},Zr={setup:function(e){var t;e.rtl&&(at.rtl=!0),e.on("mousedown",function(){Et.hideAll()}),(t=e).settings.ui_container&&(de.container=Sr(mn.fromDom(document.body),t.settings.ui_container).fold(E(null),function(e){return e.dom()})),Dt.tooltips=!de.iOS,at.translate=function(e){return p.translate(e)},Ur(e),Nr(e),Yr(e),Kr(e),Lr(e),Ar(e),jr(e),Jr(e),$r(e)}},Qr=$t.extend({recalc:function(e){var t,n,r,o,i,a,s,l,u,c,f,d,p,m,h,g,v,b,y,w,x,C,_,S,k,E,T,N,R=[],O=[];t=e.settings,o=e.items().filter(":visible"),i=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(o.length)),n=Math.ceil(o.length/r),b=t.spacingH||t.spacing||0,y=t.spacingV||t.spacing||0,w=t.alignH||t.align,x=t.alignV||t.align,g=e.paddingBox,N="reverseRows"in t?t.reverseRows:e.isRtl(),w&&"string"==typeof w&&(w=[w]),x&&"string"==typeof x&&(x=[x]);for(f=0;f<r;f++)R.push(0);for(d=0;d<n;d++)O.push(0);for(d=0;d<n;d++)for(f=0;f<r&&(c=o[d*r+f]);f++)S=(u=c.layoutRect()).minW,k=u.minH,R[f]=S>R[f]?S:R[f],O[d]=k>O[d]?k:O[d];for(E=i.innerW-g.left-g.right,f=C=0;f<r;f++)C+=R[f]+(0<f?b:0),E-=(0<f?b:0)+R[f];for(T=i.innerH-g.top-g.bottom,d=_=0;d<n;d++)_+=O[d]+(0<d?y:0),T-=(0<d?y:0)+O[d];if(C+=g.left+g.right,_+=g.top+g.bottom,(l={}).minW=C+(i.w-i.innerW),l.minH=_+(i.h-i.innerH),l.contentW=l.minW-i.deltaW,l.contentH=l.minH-i.deltaH,l.minW=Math.min(l.minW,i.maxW),l.minH=Math.min(l.minH,i.maxH),l.minW=Math.max(l.minW,i.startMinWidth),l.minH=Math.max(l.minH,i.startMinHeight),!i.autoResize||l.minW===i.minW&&l.minH===i.minH){var P;i.autoResize&&((l=e.layoutRect(l)).contentW=l.minW-i.deltaW,l.contentH=l.minH-i.deltaH),P="start"===t.packV?0:0<T?Math.floor(T/n):0;var A=0,D=t.flexWidths;if(D)for(f=0;f<D.length;f++)A+=D[f];else A=r;var M=E/A;for(f=0;f<r;f++)R[f]+=D?D[f]*M:M;for(m=g.top,d=0;d<n;d++){for(p=g.left,s=O[d]+P,f=0;f<r&&(c=o[N?d*r+r-1-f:d*r+f]);f++)h=c.settings,u=c.layoutRect(),a=Math.max(R[f],u.startMinWidth),u.x=p,u.y=m,"center"===(v=h.alignH||(w?w[f]||w[0]:null))?u.x=p+a/2-u.w/2:"right"===v?u.x=p+a-u.w:"stretch"===v&&(u.w=a),"center"===(v=h.alignV||(x?x[f]||x[0]:null))?u.y=m+s/2-u.h/2:"bottom"===v?u.y=m+s-u.h:"stretch"===v&&(u.h=s),c.layoutRect(u),p+=a+b,c.recalc&&c.recalc();m+=s+y}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var I=e.parent();I&&(I._lastRect=null,I.recalc())}}}),eo=Dt.extend({renderHtml:function(){return this.classes.add("iframe"),this.canFocus=!1,'<iframe id="'+this._id+'" class="'+this.classes+'" tabindex="-1" src="'+(this.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,r=this.getEl().contentWindow.document.body;return r?(r.innerHTML=e,t&&t()):u.setTimeout(function(){n.html(e)}),this}}),to=Dt.extend({init:function(e){this._super(e),this.classes.add("widget").add("infobox"),this.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this.classPrefix;return'<div id="'+this._id+'" class="'+this.classes+'"><div id="'+this._id+'-body">'+this.encode(this.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+e+"ico "+e+'i-help"></i></button></div></div>'},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl("body").firstChild.data=t.encode(e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t.state.on("change:help",function(e){t.classes.toggle("has-help",e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}}),no=Dt.extend({init:function(e){this._super(e),this.classes.add("widget").add("label"),this.canFocus=!1,e.multiline&&this.classes.add("autoscroll"),e.strong&&this.classes.add("strong")},initLayoutRect:function(){var e=this._super();return this.settings.multiline&&(_e.getSize(this.getEl()).width>e.maxW&&(e.minW=e.maxW,this.classes.add("multiline")),this.getEl().style.width=e.minW+"px",e.startMinH=e.h=e.minH=Math.min(e.maxH,_e.getSize(this.getEl()).height)),e},repaint:function(){return this.settings.multiline||(this.getEl().style.lineHeight=this.layoutRect().h+"px"),this._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e,t,n=this,r=n.settings.forId,o=n.settings.html?n.settings.html:n.encode(n.state.get("text"));return!r&&(t=n.settings.forName)&&(e=n.getRoot().find("#"+t)[0])&&(r=e._id),r?'<label id="'+n._id+'" class="'+n.classes+'"'+(r?' for="'+r+'"':"")+">"+o+"</label>":'<span id="'+n._id+'" class="'+n.classes+'">'+o+"</span>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.innerHtml(t.encode(e.value)),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}}),ro=ct.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){this._super(e),this.classes.add("toolbar")},postRender:function(){return this.items().each(function(e){e.classes.add("toolbar-item")}),this._super()}}),oo=ro.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}}),io=Xt.extend({init:function(e){this._renderOpen=!0,this._super(e),e=this.settings,this.classes.add("menubtn"),e.fixedWidth&&this.classes.add("fixed-width"),this.aria("haspopup",!0),this.state.set("menu",e.menu||this.render())},showMenu:function(e){var t,n=this;if(n.menu&&n.menu.visible()&&!1!==e)return n.hideMenu();n.menu||(t=n.state.get("menu")||[],n.classes.add("opened"),t.length?t={type:"menu",animate:!0,items:t}:(t.type=t.type||"menu",t.animate=!0),t.renderTo?n.menu=t.parent(n).show().renderTo():n.menu=b.create(t).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(e){"hide"===e.type&&e.control.parent()===n&&n.classes.remove("opened-under"),e.control===n.menu&&(n.activeMenu("show"===e.type),n.classes.toggle("opened","show"===e.type)),n.aria("expanded","show"===e.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.repaint(),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]);var r=n.menu.layoutRect(),o=n.$el.offset().top+n.layoutRect().h;o>r.y&&o<r.y+r.h&&n.classes.add("opened-under"),n.fire("showmenu")},hideMenu:function(){this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e,t=this,n=t._id,r=t.classPrefix,o=t.settings.icon,i=t.state.get("text"),a="";return e=(e=t.settings.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1])," style=\"background-image: url('"+e+"')\""):"",i&&(t.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+t.encode(i)+"</span>"),o=t.settings.icon?r+"ico "+r+"i-"+o:"",t.aria("role",t.parent()instanceof oo?"menuitem":"button"),'<div id="'+n+'" class="'+t.classes+'" tabindex="-1" aria-labelledby="'+n+'"><button id="'+n+'-open" role="presentation" type="button" tabindex="-1">'+(o?'<i class="'+o+'"'+e+"></i>":"")+a+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var o=this;return o.on("click",function(e){e.control===o&&function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}(e.target,o.getEl())&&(o.focus(),o.showMenu(!e.aria),e.aria&&o.menu.items().filter(":visible")[0].focus())}),o.on("mouseenter",function(e){var t,n=e.control,r=o.parent();n&&r&&n instanceof io&&n.parent()===r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!==n&&(e.menu&&e.menu.visible()&&(t=!0),e.hideMenu())}),t&&(n.focus(),n.showMenu()))}),o._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}}),ao=Et.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var t=e.items,n=t.length;n--;)t[n]=x.extend({},e.itemDefaults,t[n]);this._super(e),this.classes.add("menu"),e.animate&&11!==de.ie&&this.classes.add("animate")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){this.hideAll(),this.fire("select")},load:function(){var t,n=this;function r(){n.throbber&&(n.throbber.hide(),n.throbber=null)}n.settings.itemsFactory&&(n.throbber||(n.throbber=new Rt(n.getEl("body"),!0),0===n.items().length?(n.throbber.show(),n.fire("loading")):n.throbber.show(100,function(){n.items().remove(),n.fire("loading")}),n.on("hide close",r)),n.requestTime=t=(new Date).getTime(),n.settings.itemsFactory(function(e){0!==e.length?n.requestTime===t&&(n.getEl().style.width="",n.getEl("body").style.width="",r(),n.items().remove(),n.getEl("body").innerHTML="",n.add(e),n.renderNew(),n.fire("loaded")):n.hide()}))},hideAll:function(){return this.find("menuitem").exec("hideMenu"),this._super()},preRender:function(){var n=this;return n.items().each(function(e){var t=e.settings;if(t.icon||t.image||t.selectable)return!(n._hasIcons=!0)}),n.settings.itemsFactory&&n.on("postrender",function(){n.settings.itemsFactory&&n.load()}),n.on("show hide",function(e){e.control===n&&("show"===e.type?u.setTimeout(function(){n.classes.add("in")},0):n.classes.remove("in"))}),n._super()}}),so=io.extend({init:function(r){var e,o,i,n,a=this;a._super(r),r=a.settings,a._values=e=r.values,e&&(void 0!==r.value&&function e(t){for(var n=0;n<t.length;n++){if(o=t[n].selected||r.value===t[n].value)return i=i||t[n].text,a.state.set("value",t[n].value),!0;if(t[n].menu&&e(t[n].menu))return!0}}(e),!o&&0<e.length&&(i=e[0].text,a.state.set("value",e[0].value)),a.state.set("menu",e)),a.state.set("text",r.text||i),a.classes.add("listbox"),a.on("select",function(e){var t=e.control;n&&(e.lastControl=n),r.multiple?t.active(!t.active()):a.value(e.control.value()),n=t})},value:function(n){return 0===arguments.length?this.state.get("value"):(void 0===n||(this.settings.values&&!function t(e){return Y(e,function(e){return e.menu?t(e.menu):e.value===n})}(this.settings.values)?null===n&&this.state.set("value",null):this.state.set("value",n)),this)},bindStates:function(){var r=this;return r.on("show",function(e){var t,n;t=e.control,n=r.value(),t instanceof ao&&t.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}),r.state.on("change:value",function(e){var t=function e(t,n){var r;if(t)for(var o=0;o<t.length;o++){if(t[o].value===n)return t[o];if(t[o].menu&&(r=e(t[o].menu,n)))return r}}(r.state.get("menu"),e.value);t?r.text(t.text):r.text(r.settings.text)}),r._super()}}),lo=Dt.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t,n=this;n._super(e),e=n.settings,n.classes.add("menu-item"),e.menu&&n.classes.add("menu-item-expand"),e.preview&&n.classes.add("menu-item-preview"),"-"!==(t=n.state.get("text"))&&"|"!==t||(n.classes.add("menu-item-sep"),n.aria("role","separator"),n.state.set("text","-")),e.selectable&&(n.aria("role","menuitemcheckbox"),n.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||n.classes.add("menu-item-normal"),n.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&n.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var t,n=this,e=n.settings,r=n.parent();if(r.items().each(function(e){e!==n&&e.hideMenu()}),e.menu){(t=n.menu)?t.show():((t=e.menu).length?t={type:"menu",items:t}:t.type=t.type||"menu",r.settings.itemDefaults&&(t.itemDefaults=r.settings.itemDefaults),(t=n.menu=b.create(t).parent(n).renderTo()).reflow(),t.on("cancel",function(e){e.stopPropagation(),n.focus(),t.hide()}),t.on("show hide",function(e){e.control.items&&e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),t.on("hide",function(e){e.control===t&&n.classes.remove("selected")}),t.submenu=!0),t._parentMenu=r,t.classes.add("menu-sub");var o=t.testMoveRel(n.getEl(),n.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);t.moveRel(n.getEl(),o),o="menu-sub-"+(t.rel=o),t.classes.remove(t._lastRel).add(o),t._lastRel=o,n.classes.add("selected"),n.aria("expanded",!0)}},hideMenu:function(){return this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide(),this.aria("expanded",!1)),this},renderHtml:function(){var e,t=this,n=t._id,r=t.settings,o=t.classPrefix,i=t.state.get("text"),a=t.settings.icon,s="",l=r.shortcut,u=t.encode(r.url);function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function f(e){var t=r.match||"";return t?e.replace(new RegExp(c(t),"gi"),function(e){return"!mce~match["+e+"]mce~match!"}):e}function d(e){return e.replace(new RegExp(c("!mce~match["),"g"),"<b>").replace(new RegExp(c("]mce~match!"),"g"),"</b>")}return a&&t.parent().classes.add("menu-has-icons"),r.image&&(s=" style=\"background-image: url('"+r.image+"')\""),l&&(l=function(e){var t,n,r={};for(r=de.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)(n=r[e[t].toLowerCase()])&&(e[t]=n);return e.join("+")}(l)),a=o+"ico "+o+"i-"+(t.settings.icon||"none"),e="-"!==i?'<i class="'+a+'"'+s+"></i> ":"",i=d(t.encode(f(i))),u=d(t.encode(f(u))),'<div id="'+n+'" class="'+t.classes+'" tabindex="-1">'+e+("-"!==i?'<span id="'+n+'-text" class="'+o+'text">'+i+"</span>":"")+(l?'<div id="'+n+'-shortcut" class="'+o+'menu-shortcut">'+l+"</div>":"")+(r.menu?'<div class="'+o+'caret"></div>':"")+(u?'<div class="'+o+'menu-item-link">'+u+"</div>":"")+"</div>"},postRender:function(){var t=this,n=t.settings,e=n.textStyle;if("function"==typeof e&&(e=e.call(this)),e){var r=t.getEl("text");r&&(r.setAttribute("style",e),t._textStyle=e)}return t.on("mouseenter click",function(e){e.control===t&&(n.menu||"click"!==e.type?(t.showMenu(),e.aria&&t.menu.focus(!0)):(t.fire("select"),u.requestAnimationFrame(function(){t.parent().hideAll()})))}),t._super(),t},hover:function(){return this.parent().items().each(function(e){e.classes.remove("selected")}),this.classes.toggle("selected",!0),this},active:function(e){return function(e,t){var n=e._textStyle;if(n){var r=e.getEl("text");r.setAttribute("style",n),t&&(r.style.color="",r.style.backgroundColor="")}}(this,e),void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}}),uo=Kt.extend({Defaults:{classes:"radio",role:"radio"}}),co=Dt.extend({renderHtml:function(){var e=this.classPrefix;return this.classes.add("resizehandle"),"both"===this.settings.direction&&this.classes.add("resizehandle-both"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"><i class="'+e+"ico "+e+'i-resize"></i></div>'},postRender:function(){var t=this;t._super(),t.resizeDragHelper=new dt(this._id,{start:function(){t.fire("ResizeStart")},drag:function(e){"both"!==t.settings.direction&&(e.deltaX=0),t.fire("Resize",e)},stop:function(){t.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}});function fo(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}var po=Dt.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var n=this;n._super(e),n.settings.size&&(n.size=n.settings.size),n.settings.options&&(n._options=n.settings.options),n.on("keydown",function(e){var t;13===e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e,t="";return e=fo(this._options),this.size&&(t=' size = "'+this.size+'"'),'<select id="'+this._id+'" class="'+this.classes+'"'+t+">"+e+"</select>"},bindStates:function(){var t=this;return t.state.on("change:options",function(e){t.getEl().innerHTML=fo(e.value)}),t._super()}});function mo(e,t,n){return e<t&&(e=t),n<e&&(e=n),e}function ho(e,t,n){e.setAttribute("aria-"+t,n)}function go(e,t){var n,r,o,i,a;n="v"===e.settings.orientation?(o="top",r="height","h"):(o="left",r="width","w"),a=e.getEl("handle"),i=((e.layoutRect()[n]||100)-_e.getSize(a)[r])*((t-e._minValue)/(e._maxValue-e._minValue))+"px",a.style[o]=i,a.style.height=e.layoutRect().h+"px",ho(a,"valuenow",t),ho(a,"valuetext",""+e.settings.previewFilter(t)),ho(a,"valuemin",e._minValue),ho(a,"valuemax",e._maxValue)}var vo=Dt.extend({init:function(e){e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),this._super(e),this.classes.add("slider"),"v"===e.orientation&&this.classes.add("vertical"),this._minValue=$(e.minValue)?e.minValue:0,this._maxValue=$(e.maxValue)?e.maxValue:100,this._initValue=this.state.get("value")},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div id="'+e+'-handle" class="'+t+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var e,t,n,r,o,i,a,s,l,u,c,f,d,p,m=this;e=m._minValue,t=m._maxValue,i="v"===m.settings.orientation?(n="screenY",r="top",o="height","h"):(n="screenX",r="left",o="width","w"),m._super(),function(i,a){function t(e){var t,n,r,o;t=mo(t=(((t=m.value())+(o=n=i))/((r=a)-o)+.05*e)*(r-n)-n,i,a),m.value(t),m.fire("dragstart",{value:t}),m.fire("drag",{value:t}),m.fire("dragend",{value:t})}m.on("keydown",function(e){switch(e.keyCode){case 37:case 38:t(-1);break;case 39:case 40:t(1)}})}(e,t),a=e,s=t,l=m.getEl("handle"),m._dragHelper=new dt(m._id,{handle:m._id+"-handle",start:function(e){u=e[n],c=parseInt(m.getEl("handle").style[r],10),f=(m.layoutRect()[i]||100)-_e.getSize(l)[o],m.fire("dragstart",{value:p})},drag:function(e){var t=e[n]-u;d=mo(c+t,0,f),l.style[r]=d+"px",p=a+d/f*(s-a),m.value(p),m.tooltip().text(""+m.settings.previewFilter(p)).show().moveRel(l,"bc tc"),m.fire("drag",{value:p})},stop:function(){m.tooltip().hide(),m.fire("dragend",{value:p})}})},repaint:function(){this._super(),go(this,this.value())},bindStates:function(){var t=this;return t.state.on("change:value",function(e){go(t,e.value)}),t._super()}}),bo=Dt.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"></div>'}}),yo=io.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,t,n=this.getEl(),r=this.layoutRect();return this._super(),e=n.firstChild,t=n.lastChild,xe(e).css({width:r.w-_e.getSize(t).width,height:r.h-2}),xe(t).css({height:r.h-2}),this},activeMenu:function(e){xe(this.getEl().lastChild).toggleClass(this.classPrefix+"active",e)},renderHtml:function(){var e,t,n=this,r=n._id,o=n.classPrefix,i=n.state.get("icon"),a=n.state.get("text"),s=n.settings,l="";return e=(e=s.image)?(i="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1])," style=\"background-image: url('"+e+"')\""):"",i=s.icon?o+"ico "+o+"i-"+i:"",a&&(n.classes.add("btn-has-text"),l='<span class="'+o+'txt">'+n.encode(a)+"</span>"),t="boolean"==typeof s.active?' aria-pressed="'+s.active+'"':"",'<div id="'+r+'" class="'+n.classes+'" role="button"'+t+' tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(i?'<i class="'+i+'"'+e+"></i>":"")+l+'</button><button type="button" class="'+o+'open" hidefocus="1" tabindex="-1">'+(n._menuBtnText?(i?" ":"")+n._menuBtnText:"")+' <i class="'+o+'caret"></i></button></div>'},postRender:function(){var n=this.settings.onclick;return this.on("click",function(e){var t=e.target;if(e.control===this)for(;t;){if(e.aria&&"down"!==e.aria.key||"BUTTON"===t.nodeName&&-1===t.className.indexOf("open"))return e.stopImmediatePropagation(),void(n&&n.call(this,e));t=t.parentNode}}),delete this.settings.onclick,this._super()}}),wo=_r.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}}),xo=bt.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(n){var e;this.activeTabId&&(e=this.getEl(this.activeTabId),xe(e).removeClass(this.classPrefix+"active"),e.setAttribute("aria-selected","false")),this.activeTabId="t"+n,(e=this.getEl("t"+n)).setAttribute("aria-selected","true"),xe(e).addClass(this.classPrefix+"active"),this.items()[n].show().fire("showtab"),this.reflow(),this.items().each(function(e,t){n!==t&&e.hide()})},renderHtml:function(){var r=this,e=r._layout,o="",i=r.classPrefix;return r.preRender(),e.preRender(r),r.items().each(function(e,t){var n=r._id+"-t"+t;e.aria("role","tabpanel"),e.aria("labelledby",n),o+='<div id="'+n+'" class="'+i+'tab" unselectable="on" role="tab" aria-controls="'+e._id+'" aria-selected="false" tabIndex="-1">'+r.encode(e.settings.title)+"</div>"}),'<div id="'+r._id+'" class="'+r.classes+'" hidefocus="1" tabindex="-1"><div id="'+r._id+'-head" class="'+i+'tabs" role="tablist">'+o+'</div><div id="'+r._id+'-body" class="'+r.bodyClasses+'">'+e.renderHtml(r)+"</div></div>"},postRender:function(){var r=this;r._super(),r.settings.activeTab=r.settings.activeTab||0,r.activateTab(r.settings.activeTab),this.on("click",function(e){var t=e.target.parentNode;if(t&&t.id===r._id+"-head")for(var n=t.childNodes.length;n--;)t.childNodes[n]===e.target&&r.activateTab(n)})},initLayoutRect:function(){var e,t,n;t=(t=_e.getSize(this.getEl("head")).width)<0?0:t,n=0,this.items().each(function(e){t=Math.max(t,e.layoutRect().minW),n=Math.max(n,e.layoutRect().minH)}),this.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=n,e.layoutRect({x:0,y:0,w:t,h:n})});var r=_e.getSize(this.getEl("head")).height;return this.settings.minWidth=t,this.settings.minHeight=n+r,(e=this._super()).deltaH+=r,e.innerH=e.h-e.deltaH,e}}),Co=Dt.extend({init:function(e){var n=this;n._super(e),n.classes.add("textbox"),e.multiline?n.classes.add("multiline"):(n.on("keydown",function(e){var t;13===e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))}),n.on("keyup",function(e){n.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,r,o,i=0;e=this.getEl().style,t=this._layoutRect,o=this._lastRepaintRect||{};var a=document;return!this.settings.multiline&&a.all&&(!a.documentMode||a.documentMode<=8)&&(e.lineHeight=t.h-i+"px"),r=(n=this.borderBox).left+n.right+8,i=n.top+n.bottom+(this.settings.multiline?8:0),t.x!==o.x&&(e.left=t.x+"px",o.x=t.x),t.y!==o.y&&(e.top=t.y+"px",o.y=t.y),t.w!==o.w&&(e.width=t.w-r+"px",o.w=t.w),t.h!==o.h&&(e.height=t.h-i+"px",o.h=t.h),this._lastRepaintRect=o,this.fire("repaint",{},!1),this},renderHtml:function(){var t,e,n=this.settings;return t={id:this._id,hidefocus:"1"},x.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){t[e]=n[e]}),this.disabled()&&(t.disabled="disabled"),n.subtype&&(t.type=n.subtype),(e=_e.create(n.multiline?"textarea":"input",t)).value=this.state.get("value"),e.className=this.classes.toString(),e.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var t=this;t.getEl().value=t.state.get("value"),t._super(),t.$el.on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)})},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.getEl().value!==e.value&&(t.getEl().value=e.value)}),t.state.on("change:disabled",function(e){t.getEl().disabled=e.value}),t._super()},remove:function(){this.$el.off(),this._super()}}),_o=function(){return{Selector:ze,Collection:qe,ReflowQueue:Qe,Control:at,Factory:b,KeyboardNavigation:lt,Container:ct,DragHelper:dt,Scrollable:vt,Panel:bt,Movable:Re,Resizable:yt,FloatPanel:Et,Window:zt,MessageBox:Wt,Tooltip:At,Widget:Dt,Progress:Mt,Notification:Lt,Layout:qt,AbsoluteLayout:$t,Button:Xt,ButtonGroup:Gt,Checkbox:Kt,ComboBox:Zt,ColorBox:Qt,PanelButton:en,ColorButton:nn,ColorPicker:on,Path:sn,ElementPath:ln,FormItem:un,Form:cn,FieldSet:fn,FilePicker:wr,FitLayout:xr,FlexLayout:Cr,FlowLayout:_r,FormatControls:Zr,GridLayout:Qr,Iframe:eo,InfoBox:to,Label:no,Toolbar:ro,MenuBar:oo,MenuButton:io,MenuItem:lo,Throbber:Rt,Menu:ao,ListBox:so,Radio:uo,ResizeHandle:co,SelectBox:po,Slider:vo,Spacer:bo,SplitButton:yo,StackLayout:wo,TabPanel:xo,TextBox:Co,DropZone:an,BrowseButton:Yt}},So=function(n){n.ui?x.each(_o(),function(e,t){n.ui[t]=e}):n.ui=_o()};x.each(_o(),function(e,t){b.add(t,e)}),So(window.tinymce?window.tinymce:{}),i.add("modern",function(e){return Zr.setup(e),Vt(e)})}()},"4a59":function(e,t,n){var d=n("9b43"),p=n("1fa8"),m=n("33a4"),h=n("cb7c"),g=n("9def"),v=n("27ee"),b={},y={};(t=e.exports=function(e,t,n,r,o){var i,a,s,l,u=o?function(){return e}:v(e),c=d(n,r,t?2:1),f=0;if("function"!=typeof u)throw TypeError(e+" is not iterable!");if(m(u)){for(i=g(e.length);f<i;f++)if((l=t?c(h(a=e[f])[0],a[1]):c(e[f]))===b||l===y)return l}else for(s=u.call(e);!(a=s.next()).done;)if((l=p(s,c,a.value,t))===b||l===y)return l}).BREAK=b,t.RETURN=y},"4bf8":function(e,t,n){var r=n("be13");e.exports=function(e){return Object(r(e))}},"4d7f":function(module,__webpack_exports__,__webpack_require__){"use strict";var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("551c"),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__),_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("cebc"),_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("75fc"),core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("cadf"),core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("456d"),core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("ac6a"),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_5__),_GenerateFormList__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("17b4"),_util_index_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("4260"),_eventVue__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("c26b");__webpack_exports__.a={name:"fm-generate-form",components:{GenerateFormList:_GenerateFormList__WEBPACK_IMPORTED_MODULE_6__.a},props:["data","remote","value","insite","Test"],data:function(){return{models:{},rules:{}}},created:function(){this.changeModels(),this.generateModle(this.data.list)},mounted:function(){},methods:{generateModle:function generateModle(genList){for(var _this=this,_loop=function _loop(i){genList[i].hasOwnProperty("config")?_this.generateModle(genList[i].list):"grid"===genList[i].type?genList[i].columns.forEach(function(e){_this.generateModle(e.list)}):(_this.value&&0<=Object.keys(_this.value).indexOf(genList[i].model)?_this.models[genList[i].model]=_this.value[genList[i].model]:"blank"===genList[i].type?_this.models[genList[i].model]="String"===genList[i].options.defaultType?"":"Object"===genList[i].options.defaultType?{}:[]:_this.models[genList[i].model]=genList[i].options.defaultValue,_this.rules[genList[i].model]?_this.rules[genList[i].model]=[].concat(Object(_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__.a)(_this.rules[genList[i].model]),Object(_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__.a)(genList[i].rules.map(function(item){return item.pattern?Object(_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__.a)({},item,{pattern:eval(item.pattern)}):Object(_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__.a)({},item)}))):_this.rules[genList[i].model]=Object(_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__.a)(genList[i].rules.map(function(item){return item.pattern?Object(_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__.a)({},item,{pattern:eval(item.pattern)}):Object(_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__.a)({},item)})))},i=0;i<genList.length;i++)_loop(i)},getData:function(){var r=this;return new Promise(function(t,n){r.$refs.generateForm.validate(function(e){e?t(r.models):n(new Error("表单数据校验失败").message)})})},refresh:function(){},changeModels:function(){var t=this;_eventVue__WEBPACK_IMPORTED_MODULE_8__.a.$on("changeModels",function(e){t.models=e})}},watch:{data:{deep:!0,handler:function(e){this.generateModle(e.list)}},value:{deep:!0,handler:function(e){this.models=Object(_Users_Tiger_WebstormProjects_vue_form_making_node_modules_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_1__.a)({},this.models,e)}}}}},"4ee1":function(e,t,n){var i=n("5168")("iterator"),a=!1;try{var r=[7][i]();r.return=function(){a=!0},Array.from(r,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var n=!1;try{var r=[7],o=r[i]();o.next=function(){return{done:n=!0}},r[i]=function(){return o},e(r)}catch(e){}return n}},"50ed":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},5168:function(e,t,n){var r=n("dbdb")("wks"),o=n("62a0"),i=n("e53d").Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},"520a":function(e,t,n){"use strict";var r,o,i=n("0bfb"),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,u="lastIndex",c=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r[u]||0!==o[u]),f=void 0!==/()??/.exec("")[1];(c||f)&&(l=function(e){var t,n,r,o;return f&&(n=new RegExp("^"+this.source+"$(?!\\s)",i.call(this))),c&&(t=this[u]),r=a.call(this,e),c&&r&&(this[u]=this.global?r.index+r[0].length:t),f&&r&&1<r.length&&s.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),e.exports=l},5270:function(e,t,n){"use strict";var r=n("c532"),o=n("c401"),i=n("2e67"),a=n("2444"),s=n("d925"),l=n("e683");function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(t){return u(t),t.baseURL&&!s(t.url)&&(t.url=l(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},"52a7":function(e,t){t.f={}.propertyIsEnumerable},"53e2":function(e,t,n){var r=n("07e3"),o=n("241e"),i=n("5559")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},"53fe":function(t,n,r){var o,i;
/**!
 * Sortable
 * @author	RubaXa   <trash@rubaxa.org>
 * @author	owenm    <owen23355@gmail.com>
 * @license MIT
 */
/**!
 * Sortable
 * @author	RubaXa   <trash@rubaxa.org>
 * @author	owenm    <owen23355@gmail.com>
 * @license MIT
 */
!function(e){"use strict";void 0===(i="function"==typeof(o=e)?o.call(n,r,n,t):o)||(t.exports=i)}(function(){"use strict";if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var q,$,p,m,X,Y,d,P,A,D,G,r,K,o,J,Z,s,l,u,h,M,Q,ee,te,ne,re,g,oe,I=[],L=!1,v=!1,ie=!1,c=[],ae=!1,se=!1,b=[],i=/\s+/g,le="Sortable"+(new Date).getTime(),y=window,ue=y.document,w=y.parseInt,ce=y.setTimeout,t=y.jQuery||y.Zepto,n=y.Polymer,a={capture:!1,passive:!1},x=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),C=!!navigator.userAgent.match(/Edge/i),f=!!navigator.userAgent.match(/firefox/i),_=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),S=!!navigator.userAgent.match(/iP(ad|od|hone)/i),k=C||x?"cssFloat":"float",E="draggable"in ue.createElement("div"),T=function(){if(x)return!1;var e=ue.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}(),fe=!1,N=!1,de=Math.abs,R=Math.min,O=Math.max,B=[],F=function(e,t){var n=_e(e),r=w(n.width)-w(n.paddingLeft)-w(n.paddingRight)-w(n.borderLeftWidth)-w(n.borderRightWidth),o=Oe(e,0,t),i=Oe(e,1,t),a=o&&_e(o),s=i&&_e(i),l=a&&w(a.marginLeft)+w(a.marginRight)+He(o).width,u=s&&w(s.marginLeft)+w(s.marginRight)+He(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&"none"!==a.float){var c="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||r<=l&&"none"===n[k]||i&&"none"===n[k]&&r<l+u)?"vertical":"horizontal"},j=function(e,t){if(!e||!e.getBoundingClientRect)return H();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=_e(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n||!n.getBoundingClientRect||n===ue.body)return H();if(r||t)return n;r=!0}}}while(n=n.parentNode);return H()},H=function(){return x?ue.documentElement:ue.scrollingElement},pe=function(e,t,n){e.scrollLeft+=t,e.scrollTop+=n},U=e(function(n,e,t,r){if(e.scroll){var o=t?t[le]:window,i=e.scrollSensitivity,a=e.scrollSpeed,s=n.clientX,l=n.clientY,u=H(),c=!1;A!==t&&(z(),P=e.scroll,D=e.scrollFn,!0===P&&(P=j(t,!0),A=P));var f=0,d=P;do{var p,m,h,g,v,b,y,w,x,C=d,_=He(C),S=_.top,k=_.bottom,E=_.left,T=_.right,N=_.width,R=_.height;if(p=C.scrollWidth,m=C.scrollHeight,h=_e(C),w=C.scrollLeft,x=C.scrollTop,y=C===u?(b=N<p&&("auto"===h.overflowX||"scroll"===h.overflowX||"visible"===h.overflowX),R<m&&("auto"===h.overflowY||"scroll"===h.overflowY||"visible"===h.overflowY)):(b=N<p&&("auto"===h.overflowX||"scroll"===h.overflowX),R<m&&("auto"===h.overflowY||"scroll"===h.overflowY)),g=b&&(de(T-s)<=i&&w+N<p)-(de(E-s)<=i&&!!w),v=y&&(de(k-l)<=i&&x+R<m)-(de(S-l)<=i&&!!x),!I[f])for(var O=0;O<=f;O++)I[O]||(I[O]={});I[f].vx==g&&I[f].vy==v&&I[f].el===C||(I[f].el=C,I[f].vx=g,I[f].vy=v,clearInterval(I[f].pid),!C||0==g&&0==v||(c=!0,I[f].pid=setInterval(function(){r&&0===this.layer&&(be.active._emulateDragOver(!0),be.active._onTouchMove(M,!0));var e=I[this.layer].vy?I[this.layer].vy*a:0,t=I[this.layer].vx?I[this.layer].vx*a:0;"function"==typeof D&&"continue"!==D.call(o,t,e,n,M,I[this.layer].el)||pe(I[this.layer].el,t,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&d!==u&&(d=j(d,!1)));L=c}},30),z=function(){I.forEach(function(e){clearInterval(e.pid)}),I=[]},W=function(e){function l(a,s){return function(e,t,n,r){var o=e.options.group.name&&t.options.group.name&&e.options.group.name===t.options.group.name;if(null==a&&(s||o))return!0;if(null==a||!1===a)return!1;if(s&&"clone"===a)return a;if("function"==typeof a)return l(a(e,t,n,r),s)(e,t,n,r);var i=(s?e:t).options.group.name;return!0===a||"string"==typeof a&&a===i||a.join&&-1<a.indexOf(i)}}var t={},n=e.group;n&&"object"==typeof n||(n={name:n}),t.name=n.name,t.checkPull=l(n.pull,!0),t.checkPut=l(n.put),t.revertClone=n.revertClone,e.group=t},V=function(e){q&&q.parentNode&&q.parentNode[le]&&q.parentNode[le]._computeIsAligned(e)},me=function(){!T&&p&&_e(p,"display","none")},he=function(){!T&&p&&_e(p,"display","")};ue.addEventListener("click",function(e){if(ie)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ie=!1},!0);var ge,ve=function(e){if(q){var t=function(e,t){for(var n=0;n<c.length;n++)if(!Pe(c[n])){var r=He(c[n]),o=c[n][le].options.emptyInsertThreshold,i=e>=r.left-o&&e<=r.right+o,a=t>=r.top-o&&t<=r.bottom+o;if(o&&i&&a)return c[n]}}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(t){var n={};for(var r in e)n[r]=e[r];n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[le]._onDragOver(n)}}};function be(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(e);this.el=e,this.options=t=Le({},t),e[le]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return F(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:w(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==be.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in n)!(r in t)&&(t[r]=n[r]);for(var o in W(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&E,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?we(e,"pointerdown",this._onTapStart):(we(e,"mousedown",this._onTapStart),we(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(we(e,"dragover",this),we(e,"dragenter",this)),c.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[])}function ye(e,t,n,r){if(e){n=n||ue;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&Ie(e,t):Ie(e,t))||r&&e===n)return e;if(e===n)break}while(e=(o=e).host&&o!==ue&&o.host.nodeType?o.host:o.parentNode)}var o;return null}function we(e,t,n){e.addEventListener(t,n,!x&&a)}function xe(e,t,n){e.removeEventListener(t,n,!x&&a)}function Ce(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(i," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(i," ")}}function _e(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return ue.defaultView&&ue.defaultView.getComputedStyle?n=ue.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function Se(e){var t="";do{var n=_e(e,"transform");n&&"none"!==n&&(t=n+" "+t)}while(e=e.parentNode);return window.DOMMatrix?new DOMMatrix(t):window.WebKitCSSMatrix?new WebKitCSSMatrix(t):window.CSSMatrix?new CSSMatrix(t):void 0}function ke(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function Ee(e,t,n,r,o,i,a,s,l,u,c){var f,d=(e=e||t[le]).options,p="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||x||C?(f=ue.createEvent("Event")).initEvent(n,!0,!0):f=new CustomEvent(n,{bubbles:!0,cancelable:!0}),f.to=o||t,f.from=i||t,f.item=r||t,f.clone=m,f.oldIndex=a,f.newIndex=s,f.oldDraggableIndex=l,f.newDraggableIndex=u,f.originalEvent=c,f.pullMode=Z?Z.lastPutMode:void 0,t&&t.dispatchEvent(f),d[p]&&d[p].call(e,f)}function Te(e,t,n,r,o,i,a,s){var l,u,c=e[le],f=c.options.onMove;return!window.CustomEvent||x||C?(l=ue.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=i||He(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),f&&(u=f.call(c,l,a)),u}function Ne(e){e.draggable=!1}function Re(){fe=!1}function Oe(e,t,n){for(var r=0,o=0,i=e.children;o<i.length;){if("none"!==i[o].style.display&&i[o]!==p&&i[o]!==q&&ye(i[o],n.draggable,e,!1)){if(r===t)return i[o];r++}o++}return null}function Pe(e){for(var t=e.lastElementChild;t&&(t===p||"none"===_e(t,"display"));)t=t.previousElementSibling;return t||null}function Ae(e){return Me(q)<Me(e)?1:-1}function De(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Me(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e&&(e=e.previousElementSibling);)"TEMPLATE"===e.nodeName.toUpperCase()||e===m||t&&!Ie(e,t)||n++;return n}function Ie(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function e(n,r){return function(){if(!ge){var e=arguments,t=this;ge=ce(function(){1===e.length?n.call(t,e[0]):n.apply(t,e),ge=void 0},r)}}}function Le(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Be(e){return n&&n.dom?n.dom(e).cloneNode(!0):t?t(e).clone(!0)[0]:e.cloneNode(!0)}function Fe(e){return ce(e,0)}function je(e){return clearTimeout(e)}function He(e,t,n,r){if(e.getBoundingClientRect||e===y){var o,i,a,s,l,u,c;if(c=e!==y&&e!==H()?(i=(o=e.getBoundingClientRect()).top,a=o.left,s=o.bottom,l=o.right,u=o.height,o.width):(a=i=0,s=window.innerHeight,l=window.innerWidth,u=window.innerHeight,window.innerWidth),r&&e!==y&&(n=n||e.parentNode,!x))do{if(n&&n.getBoundingClientRect&&"none"!==_e(n,"transform")){var f=n.getBoundingClientRect();i-=f.top+w(_e(n,"border-top-width")),a-=f.left+w(_e(n,"border-left-width")),s=i+o.height,l=a+o.width;break}}while(n=n.parentNode);if(t&&e!==y){var d=Se(n||e),p=d&&d.a,m=d&&d.d;d&&(s=(i/=m)+(u/=m),l=(a/=p)+(c/=p))}return{top:i,left:a,bottom:s,right:l,width:c,height:u}}}function Ue(e,t){for(var n=j(e,!0),r=He(e)[t];n;){var o=He(n)[t];if(!("top"===t||"left"===t?o<=r:r<=o))return n;if(n===H())break;n=j(n,!1)}return!1}function ze(e){var t=0,n=0,r=H();if(e)do{var o=Se(e),i=o.a,a=o.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}return be.prototype={constructor:be,_computeIsAligned:function(e){var t;if(p&&!T?(me(),t=ue.elementFromPoint(e.clientX,e.clientY),he()):t=e.target,t=ye(t,this.options.draggable,this.el,!1),!N&&q&&q.parentNode===this.el){for(var n,r,o,i,a,s,l,u,c=this.el.children,f=0;f<c.length;f++)ye(c[f],this.options.draggable,this.el,!1)&&c[f]!==t&&(c[f].sortableMouseAligned=(n=e.clientX,r=e.clientY,o=c[f],i=this._getDirection(e,null),this.options,void 0,a=He(o),s="vertical"===i?a.left:a.top,l="vertical"===i?a.right:a.bottom,s<(u="vertical"===i?n:r)&&u<l));ye(t,this.options.draggable,this.el,!0)||(ee=null),N=!0,ce(function(){N=!1},30)}},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,q):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t,n,r=this,o=this.el,i=this.options,a=i.preventOnFilter,s=e.type,l=e.touches&&e.touches[0],u=(l||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,f=i.filter;if(function(e){B.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var r=t[n];r.checked&&B.push(r)}}(o),!q&&!(/mousedown|pointerdown/.test(s)&&0!==e.button||i.disabled||c.isContentEditable||(u=ye(u,i.draggable,o,!1),d===u))){if(t=Me(u),n=Me(u,i.draggable),"function"==typeof f){if(f.call(this,e,u,this))return Ee(r,c,"filter",u,o,o,t,void 0,n),void(a&&e.cancelable&&e.preventDefault())}else if(f&&(f=f.split(",").some(function(e){if(e=ye(c,e.trim(),o,!1))return Ee(r,e,"filter",u,o,o,t,void 0,n),!0})))return void(a&&e.cancelable&&e.preventDefault());i.handle&&!ye(c,i.handle,o,!1)||this._prepareDragStart(e,l,u,t,n)}}},_handleAutoScroll:function(t,n){if(q&&this.options.scroll){var r=t.clientX,o=t.clientY,e=ue.elementFromPoint(r,o),i=this;if(n||C||x||_){U(t,i.options,e,n);var a=j(e,!0);!L||s&&r===l&&o===u||(s&&clearInterval(s),s=setInterval(function(){if(q){var e=j(ue.elementFromPoint(r,o),!0);e!==a&&(a=e,z(),U(t,i.options,a,n))}},10),l=r,u=o)}else{if(!i.options.bubbleScroll||j(e,!0)===H())return void z();U(t,i.options,j(e,!1),!1)}}},_prepareDragStart:function(e,t,n,r,o){var i,a=this,s=a.el,l=a.options,u=s.ownerDocument;n&&!q&&n.parentNode===s&&(X=s,$=(q=n).parentNode,Y=q.nextSibling,d=n,J=l.group,G=r,K=o,h={target:q,clientX:(t||e).clientX,clientY:(t||e).clientY},this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,q.style["will-change"]="all",q.style.transition="",q.style.transform="",i=function(){a._disableDelayedDragEvents(),!f&&a.nativeDraggable&&(q.draggable=!0),a._triggerDragStart(e,t),Ee(a,X,"choose",q,X,X,G,void 0,K),Ce(q,l.chosenClass,!0)},l.ignore.split(",").forEach(function(e){ke(q,e.trim(),Ne)}),we(u,"dragover",ve),we(u,"mousemove",ve),we(u,"touchmove",ve),we(u,"mouseup",a._onDrop),we(u,"touchend",a._onDrop),we(u,"touchcancel",a._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,q.draggable=!0),!l.delay||l.delayOnTouchOnly&&!t||this.nativeDraggable&&(C||x)?i():(we(u,"mouseup",a._disableDelayedDrag),we(u,"touchend",a._disableDelayedDrag),we(u,"touchcancel",a._disableDelayedDrag),we(u,"mousemove",a._delayedDragTouchMoveHandler),we(u,"touchmove",a._delayedDragTouchMoveHandler),l.supportPointer&&we(u,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=ce(i,l.delay)))},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;O(de(t.clientX-this._lastX),de(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){q&&Ne(q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;xe(e,"mouseup",this._disableDelayedDrag),xe(e,"touchend",this._disableDelayedDrag),xe(e,"touchcancel",this._disableDelayedDrag),xe(e,"mousemove",this._delayedDragTouchMoveHandler),xe(e,"touchmove",this._delayedDragTouchMoveHandler),xe(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||("touch"==e.pointerType?e:null),!this.nativeDraggable||t?this.options.supportPointer?we(ue,"pointermove",this._onTouchMove):we(ue,t?"touchmove":"mousemove",this._onTouchMove):(we(q,"dragend",this),we(X,"dragstart",this._onDragStart));try{ue.selection?Fe(function(){ue.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(v=!1,X&&q){this.nativeDraggable&&(we(ue,"dragover",this._handleAutoScroll),we(ue,"dragover",V));var n=this.options;!e&&Ce(q,n.dragClass,!1),Ce(q,n.ghostClass,!0),_e(q,"transform",""),be.active=this,e&&this._appendGhost(),Ee(this,X,"start",q,X,X,G,void 0,K,void 0,t)}else this._nulling()},_emulateDragOver:function(e){if(M){if(this._lastX===M.clientX&&this._lastY===M.clientY&&!e)return;this._lastX=M.clientX,this._lastY=M.clientY,me();for(var t=ue.elementFromPoint(M.clientX,M.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(M.clientX,M.clientY))!==n;)n=t;if(n)do{if(n[le])if(n[le]._onDragOver({clientX:M.clientX,clientY:M.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break;t=n}while(n=n.parentNode);q.parentNode[le]._computeIsAligned(M),he()}},_onTouchMove:function(e,t){if(h){var n=this.options,r=n.fallbackTolerance,o=n.fallbackOffset,i=e.touches?e.touches[0]:e,a=p&&Se(p),s=p&&a&&a.a,l=p&&a&&a.d,u=S&&g&&ze(g),c=(i.clientX-h.clientX+o.x)/(s||1)+(u?u[0]-b[0]:0)/(s||1),f=(i.clientY-h.clientY+o.y)/(l||1)+(u?u[1]-b[1]:0)/(l||1),d=e.touches?"translate3d("+c+"px,"+f+"px,0)":"translate("+c+"px,"+f+"px)";if(!be.active&&!v){if(r&&R(de(i.clientX-this._lastX),de(i.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}!t&&this._handleAutoScroll(i,!0),Q=!0,M=i,_e(p,"webkitTransform",d),_e(p,"mozTransform",d),_e(p,"msTransform",d),_e(p,"transform",d),e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!p){var e=this.options.fallbackOnBody?ue.body:X,t=He(q,!0,e,!S),n=(_e(q),this.options);if(S){for(g=e;"static"===_e(g,"position")&&"none"===_e(g,"transform")&&g!==ue;)g=g.parentNode;if(g!==ue){var r=He(g,!0);t.top-=r.top,t.left-=r.left}g!==ue.body&&g!==ue.documentElement?(g===ue&&(g=H()),t.top+=g.scrollTop,t.left+=g.scrollLeft):g=H(),b=ze(g)}Ce(p=q.cloneNode(!0),n.ghostClass,!1),Ce(p,n.fallbackClass,!0),Ce(p,n.dragClass,!0),_e(p,"box-sizing","border-box"),_e(p,"margin",0),_e(p,"top",t.top),_e(p,"left",t.left),_e(p,"width",t.width),_e(p,"height",t.height),_e(p,"opacity","0.8"),_e(p,"position",S?"absolute":"fixed"),_e(p,"zIndex","100000"),_e(p,"pointerEvents","none"),e.appendChild(p)}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;(m=Be(q)).draggable=!1,m.style["will-change"]="",this._hideClone(),Ce(m,n.options.chosenClass,!1),n._cloneId=Fe(function(){n.options.removeCloneOnHide||X.insertBefore(m,q),Ee(n,X,"clone",q)}),!t&&Ce(q,o.dragClass,!0),t?(ie=!0,n._loopId=setInterval(n._emulateDragOver,50)):(xe(ue,"mouseup",n._onDrop),xe(ue,"touchend",n._onDrop),xe(ue,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,q)),we(ue,"drop",n),_e(q,"transform","translateZ(0)")),v=!0,n._dragStartId=Fe(n._dragStarted.bind(n,t,e)),we(ue,"selectstart",n),_&&_e(ue.body,"user-select","none")},_onDragOver:function(t){var n,r,e,o=this.el,i=t.target,a=this.options,s=a.group,l=be.active,u=J===s,c=a.sort,f=this;if(!fe){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),Q=!0,i=ye(i,a.draggable,o,!0),q.contains(t.target)||i.animated)return W(!1);if(i!==q&&(ie=!1),l&&!a.disabled&&(u?c||(e=!X.contains(q)):Z===this||(this.lastPutMode=J.checkPull(this,l,q,t))&&s.checkPut(this,l,q,t))){var d=this._getDirection(t,i);if(n=He(q),e)return this._hideClone(),$=X,Y?X.insertBefore(q,Y):X.appendChild(q),W(!0);var p=Pe(o);if(p&&(I=t,L=d,B=He(Pe(o)),F="vertical"===L?I.clientY:I.clientX,j="vertical"===L?I.clientX:I.clientY,H="vertical"===L?B.bottom:B.right,U="vertical"===L?B.left:B.top,z="vertical"===L?B.right:B.bottom,!("vertical"===L?z+10<j||j<=z&&H<F&&U<=j:H<F&&U<j||F<=H&&z+10<j)||p.animated)){if(i&&i!==q&&i.parentNode===o){var m,h=0,g=i.sortableMouseAligned,v=q.parentNode!==o,b="vertical"===d?"top":"left",y=Ue(i,"top")||Ue(q,"top"),w=y?y.scrollTop:void 0;if(ee!==i&&(ne=null,m=He(i)[b],ae=!1),k=i,E=d,T=(S=q)===q&&oe||He(S),N=k===q&&oe||He(k),R="vertical"===E?T.left:T.top,O="vertical"===E?T.right:T.bottom,P="vertical"===E?T.width:T.height,A="vertical"===E?N.left:N.top,D="vertical"===E?N.right:N.bottom,M="vertical"===E?N.width:N.height,ne=(R===A||O===D||R+P/2===A+M/2)&&g||v||y||a.invertSwap||"insert"===ne||"swap"===ne?("swap"!==ne&&(se=a.invertSwap||v),h=function(e,t,n,r,o,i,a){var s=He(t),l="vertical"===n?e.clientY:e.clientX,u="vertical"===n?s.height:s.width,c="vertical"===n?s.top:s.left,f="vertical"===n?s.bottom:s.right,d=He(q),p=!1;if(!i)if(a&&re<u*r)if(!ae&&(1===te?c+u*o/2<l:l<f-u*o/2)&&(ae=!0),ae)p=!0;else{"vertical"===n?d.top:d.left,"vertical"===n?d.bottom:d.right;if(1===te?l<c+re:f-re<l)return-1*te}else if(c+u*(1-r)/2<l&&l<f-u*(1-r)/2)return Ae(t);if((p=p||i)&&(l<c+u*o/2||f-u*o/2<l))return c+u/2<l?1:-1;return 0}(t,i,d,a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,se,ee===i),"swap"):(h=Ae(i),"insert"),0===h)return W(!1);oe=null,te=h,r=He(ee=i);var x=i.nextElementSibling,C=!1,_=Te(X,o,q,n,i,r,t,C=1===h);if(!1!==_)return 1!==_&&-1!==_||(C=1===_),fe=!0,ce(Re,30),u?l._hideClone():l._showClone(this),C&&!x?o.appendChild(q):i.parentNode.insertBefore(q,C?x:i),y&&pe(y,0,w-y.scrollTop),$=q.parentNode,void 0===m||se||(re=de(m-He(i)[b])),V(),W(!0)}}else if(p&&o===t.target&&(i=p),i&&(r=He(i)),u?l._hideClone():l._showClone(this),!1!==Te(X,o,q,n,i,r,t,!!i))return o.appendChild(q),$=o,oe=null,V(),W(!0);if(o.contains(q))return W(!1)}var S,k,E,T,N,R,O,P,A,D,M,I,L,B,F,j,H,U,z;return!1}function W(e){return e&&(u?l._hideClone():l._showClone(f),l&&(Ce(q,Z?Z.options.ghostClass:l.options.ghostClass,!1),Ce(q,a.ghostClass,!0)),Z!==f&&f!==be.active?Z=f:f===be.active&&(Z=null),n&&f._animate(n,q),i&&r&&f._animate(r,i)),(i===q&&!q.animated||i===o&&!i.animated)&&(ee=null),a.dragoverBubble||t.rootEl||i===ue||(f._handleAutoScroll(t),q.parentNode[le]._computeIsAligned(t),!e&&ve(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),!0}function V(){Ee(f,X,"change",i,o,X,G,Me(q),K,Me(q,a.draggable),t)}},_animate:function(e,t){var n=this.options.animation;if(n){var r=He(t);if(t===q&&(oe=r),1===e.nodeType&&(e=He(e)),e.left+e.width/2!==r.left+r.width/2||e.top+e.height/2!==r.top+r.height/2){var o=Se(this.el),i=o&&o.a,a=o&&o.d;_e(t,"transition","none"),_e(t,"transform","translate3d("+(e.left-r.left)/(i||1)+"px,"+(e.top-r.top)/(a||1)+"px,0)"),this._repaint(t),_e(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),_e(t,"transform","translate3d(0,0,0)")}"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=ce(function(){_e(t,"transition",""),_e(t,"transform",""),t.animated=!1},n)}},_repaint:function(e){return e.offsetWidth},_offMoveEvents:function(){xe(ue,"touchmove",this._onTouchMove),xe(ue,"pointermove",this._onTouchMove),xe(ue,"dragover",ve),xe(ue,"mousemove",ve),xe(ue,"touchmove",ve)},_offUpEvents:function(){var e=this.el.ownerDocument;xe(e,"mouseup",this._onDrop),xe(e,"touchend",this._onDrop),xe(e,"pointerup",this._onDrop),xe(e,"touchcancel",this._onDrop),xe(ue,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ae=se=L=v=!1,clearInterval(this._loopId),clearInterval(s),z(),clearTimeout(ge),ge=void 0,clearTimeout(this._dragStartTimer),je(this._cloneId),je(this._dragStartId),xe(ue,"mousemove",this._onTouchMove),this.nativeDraggable&&(xe(ue,"drop",this),xe(t,"dragstart",this._onDragStart),xe(ue,"dragover",this._handleAutoScroll),xe(ue,"dragover",V)),_&&_e(ue.body,"user-select",""),this._offMoveEvents(),this._offUpEvents(),e&&(Q&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),p&&p.parentNode&&p.parentNode.removeChild(p),(X===$||Z&&"clone"!==Z.lastPutMode)&&m&&m.parentNode&&m.parentNode.removeChild(m),q&&(this.nativeDraggable&&xe(q,"dragend",this),Ne(q),q.style["will-change"]="",Ce(q,Z?Z.options.ghostClass:this.options.ghostClass,!1),Ce(q,this.options.chosenClass,!1),Ee(this,X,"unchoose",q,$,X,G,null,K,null,e),X!==$?(r=Me(q),o=Me(q,n.draggable),0<=r&&(Ee(null,$,"add",q,$,X,G,r,K,o,e),Ee(this,X,"remove",q,$,X,G,r,K,o,e),Ee(null,$,"sort",q,$,X,G,r,K,o,e),Ee(this,X,"sort",q,$,X,G,r,K,o,e)),Z&&Z.save()):q.nextSibling!==Y&&(r=Me(q),o=Me(q,n.draggable),0<=r&&(Ee(this,X,"update",q,$,X,G,r,K,o,e),Ee(this,X,"sort",q,$,X,G,r,K,o,e))),be.active&&(null!=r&&-1!==r||(r=G,o=K),Ee(this,X,"end",q,$,X,G,r,K,o,e),this.save()))),this._nulling()},_nulling:function(){X=q=$=p=Y=m=d=P=A=I.length=s=l=u=h=M=Q=r=G=ee=te=oe=Z=J=be.active=null,B.forEach(function(e){e.checked=!0}),B.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":q&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)ye(e=n[r],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||De(e));return t},sort:function(e){var r={},o=this.el;this.toArray().forEach(function(e,t){var n=o.children[t];ye(n,this.options.draggable,o,!1)&&(r[e]=n)},this),e.forEach(function(e){r[e]&&(o.removeChild(r[e]),o.appendChild(r[e]))})},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return ye(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];n[e]=t,"group"===e&&W(n)},destroy:function(){var e=this.el;e[le]=null,xe(e,"mousedown",this._onTapStart),xe(e,"touchstart",this._onTapStart),xe(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(xe(e,"dragover",this),xe(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),c.splice(c.indexOf(this.el),1),this.el=e=null},_hideClone:function(){m.cloneHidden||(_e(m,"display","none"),m.cloneHidden=!0,m.parentNode&&this.options.removeCloneOnHide&&m.parentNode.removeChild(m))},_showClone:function(e){"clone"===e.lastPutMode?m.cloneHidden&&(X.contains(q)&&!this.options.group.revertClone?X.insertBefore(m,q):Y?X.insertBefore(m,Y):X.appendChild(m),this.options.group.revertClone&&this._animate(q,m),_e(m,"display",""),m.cloneHidden=!1):this._hideClone()}},we(ue,"touchmove",function(e){(be.active||v)&&e.cancelable&&e.preventDefault()}),be.utils={on:we,off:xe,css:_e,find:ke,is:function(e,t){return!!ye(e,t,e,!1)},extend:Le,throttle:e,closest:ye,toggleClass:Ce,clone:Be,index:Me,nextTick:Fe,cancelNextTick:je,detectDirection:F,getChild:Oe},be.create=function(e,t){return new be(e,t)},be.version="1.9.0",be})},"549b":function(e,t,n){"use strict";var d=n("d864"),r=n("63b6"),p=n("241e"),m=n("b0dc"),h=n("3702"),g=n("b447"),v=n("20fd"),b=n("7cd6");r(r.S+r.F*!n("4ee1")(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,o,i=p(e),a="function"==typeof this?this:Array,s=arguments.length,l=1<s?arguments[1]:void 0,u=void 0!==l,c=0,f=b(i);if(u&&(l=d(l,2<s?arguments[2]:void 0,2)),null==f||a==Array&&h(f))for(n=new a(t=g(i.length));c<t;c++)v(n,c,u?l(i[c],c):i[c]);else for(o=f.call(i),n=new a;!(r=o.next()).done;c++)v(n,c,u?m(o,l,[r.value,c],!0):r.value);return n.length=c,n}})},"54a1":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("95d5")},"551c":function(e,t,n){"use strict";var r,o,i,a,s=n("2d00"),l=n("7726"),u=n("9b43"),c=n("23c6"),f=n("5ca1"),d=n("d3f4"),p=n("d8e8"),m=n("f605"),h=n("4a59"),g=n("ebd6"),v=n("1991").set,b=n("8079")(),y=n("a5b8"),w=n("9c80"),x=n("a25f"),C=n("bcaa"),_="Promise",S=l.TypeError,k=l.process,E=k&&k.versions,T=E&&E.v8||"",N=l[_],R="process"==c(k),O=function(){},P=o=y.f,A=!!function(){try{var e=N.resolve(1),t=(e.constructor={})[n("2b4c")("species")]=function(e){e(O,O)};return(R||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof t&&0!==T.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),D=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},M=function(c,n){if(!c._n){c._n=!0;var r=c._c;b(function(){for(var l=c._v,u=1==c._s,e=0,t=function(e){var t,n,r,o=u?e.ok:e.fail,i=e.resolve,a=e.reject,s=e.domain;try{o?(u||(2==c._h&&B(c),c._h=1),!0===o?t=l:(s&&s.enter(),t=o(l),s&&(s.exit(),r=!0)),t===e.promise?a(S("Promise-chain cycle")):(n=D(t))?n.call(t,i,a):i(t)):a(l)}catch(e){s&&!r&&s.exit(),a(e)}};r.length>e;)t(r[e++]);c._c=[],c._n=!1,n&&!c._h&&I(c)})}},I=function(i){v.call(l,function(){var e,t,n,r=i._v,o=L(i);if(o&&(e=w(function(){R?k.emit("unhandledRejection",r,i):(t=l.onunhandledrejection)?t({promise:i,reason:r}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",r)}),i._h=R||L(i)?2:1),i._a=void 0,o&&e.e)throw e.v})},L=function(e){return 1!==e._h&&0===(e._a||e._c).length},B=function(t){v.call(l,function(){var e;R?k.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),M(t,!0))},j=function(e){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw S("Promise can't be resolved itself");(n=D(e))?b(function(){var t={_w:r,_d:!1};try{n.call(e,u(j,t,1),u(F,t,1))}catch(e){F.call(t,e)}}):(r._v=e,r._s=1,M(r,!1))}catch(e){F.call({_w:r,_d:!1},e)}}};A||(N=function(e){m(this,N,_,"_h"),p(e),r.call(this);try{e(u(j,this,1),u(F,this,1))}catch(e){F.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n("dcbc")(N.prototype,{then:function(e,t){var n=P(g(this,N));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=R?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=u(j,e,1),this.reject=u(F,e,1)},y.f=P=function(e){return e===N||e===a?new i(e):o(e)}),f(f.G+f.W+f.F*!A,{Promise:N}),n("7f20")(N,_),n("7a56")(_),a=n("8378")[_],f(f.S+f.F*!A,_,{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!A),_,{resolve:function(e){return C(s&&this===a?N:this,e)}}),f(f.S+f.F*!(A&&n("5cc5")(function(e){N.all(e).catch(O)})),_,{all:function(e){var a=this,t=P(a),s=t.resolve,l=t.reject,n=w(function(){var r=[],o=0,i=1;h(e,!1,function(e){var t=o++,n=!1;r.push(void 0),i++,a.resolve(e).then(function(e){n||(n=!0,r[t]=e,--i||s(r))},l)}),--i||s(r)});return n.e&&l(n.v),t.promise},race:function(e){var t=this,n=P(t),r=n.reject,o=w(function(){h(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},5537:function(e,t,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(e,t,n){var r=n("dbdb")("keys"),o=n("62a0");e.exports=function(e){return r[e]||(r[e]=o(e))}},"584a":function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"5ac5":function(QC,e,t){!function(){"use strict";var e,t,n,r,o,i,a,s,l,u,c,f,d,p,m,h,g,v=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},b=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,arguments))}},y=function(e){return function(){return e}},w=function(e){return e},x=function(i){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var a=new Array(arguments.length-1),n=1;n<arguments.length;n++)a[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=a.concat(n);return i.apply(null,o)}},C=y(!1),_=y(!0),S=C,k=_,E=function(){return T},T=(r={fold:function(e,t){return e()},is:S,isSome:S,isNone:k,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){},or:n,orThunk:t,map:E,ap:E,each:function(){},bind:E,flatten:E,exists:S,forall:k,filter:E,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:y("none()")},Object.freeze&&Object.freeze(r),r),N=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:k,isNone:S,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return N(e(n))},ap:function(e){return e.fold(E,function(e){return N(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:T},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(S,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},R={some:N,none:E,from:function(e){return null==e?T:N(e)}},O=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},P=O("string"),A=O("object"),D=O("array"),M=O("null"),I=O("boolean"),L=O("function"),B=O("number"),F=void 0===(o=Array.prototype.indexOf)?function(e,t){return Y(e,t)}:function(e,t){return o.call(e,t)},j=function(e,t){return-1<F(e,t)},H=function(e,t){return X(e,t).isSome()},U=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},z=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)},W=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o,e)?n:r).push(a)}return{pass:n,fail:r}},V=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n},q=function(e,t,n){return z(e,function(e){n=t(n,e)}),n},$=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return R.some(o)}return R.none()},X=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n,e))return R.some(n);return R.none()},Y=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},G=Array.prototype.push,K=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Array.prototype.isPrototypeOf(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);G.apply(t,e[n])}return t}(U(e,t))},J=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n,e))return!1;return!0},Z=Array.prototype.slice,Q=function(e,t){return V(e,function(e){return!j(t,e)})},ee=function(e){return 0===e.length?R.none():R.some(e[0])},te=function(e){return 0===e.length?R.none():R.some(e[e.length-1])},ne=L(Array.from)?Array.from:function(e){return Z.call(e)},re="undefined"!=typeof window?window:Function("return this;")(),oe=function(e,t){return function(e,t){for(var n=null!=t?t:re,r=0;r<e.length&&null!=n;++r)n=n[e[r]];return n}(e.split("."),t)},ie={getOrDie:function(e,t){var n=oe(e,t);if(null==n)throw e+" not available on this browser";return n}},ae=function(){return ie.getOrDie("URL")},se={createObjectURL:function(e){return ae().createObjectURL(e)},revokeObjectURL:function(e){ae().revokeObjectURL(e)}},le=navigator,ue=le.userAgent,ce=function(e){return"matchMedia"in window&&matchMedia(e).matches};d=/Android/.test(ue),a=(a=!(i=/WebKit/.test(ue))&&/MSIE/gi.test(ue)&&/Explorer/gi.test(le.appName))&&/MSIE (\w+)\./.exec(ue)[1],s=-1!==ue.indexOf("Trident/")&&(-1!==ue.indexOf("rv:")||-1!==le.appName.indexOf("Netscape"))&&11,l=-1!==ue.indexOf("Edge/")&&!a&&!s&&12,a=a||s||l,u=!i&&!s&&/Gecko/.test(ue),c=-1!==ue.indexOf("Mac"),f=/(iPad|iPhone)/.test(ue),p="FormData"in window&&"FileReader"in window&&"URL"in window&&!!se.createObjectURL,m=ce("only screen and (max-device-width: 480px)")&&(d||f),h=ce("only screen and (min-width: 800px)")&&(d||f),g=-1!==ue.indexOf("Windows Phone"),l&&(i=!1);var fe,de,pe,me,he,ge,ve,be,ye,we,xe,Ce,_e,Se,ke,Ee,Te,Ne,Re,Oe={opera:!1,webkit:i,ie:a,gecko:u,mac:c,iOS:f,android:d,contentEditable:!f||p||534<=parseInt(ue.match(/AppleWebKit\/(\d*)/)[1],10),transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!==a,range:window.getSelection&&"Range"in window,documentMode:a&&!l?document.documentMode||7:10,fileApi:p,ceFalse:!1===a||8<a,cacheSuffix:null,container:null,overrideViewPort:null,experimentalShadowDom:!1,canHaveCSP:!1===a||11<a,desktop:!m&&!h,windowsPhone:g},Pe=window.Promise?window.Promise:function(){function n(e,t){return function(){e.apply(t,arguments)}}var e=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],u(e,n(r,this),n(o,this))},t=i.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)};function a(n){var r=this;null!==this._state?t(function(){var e=r._state?n.onFulfilled:n.onRejected;if(null!==e){var t;try{t=e(r._value)}catch(e){return void n.reject(e)}n.resolve(t)}else(r._state?n.resolve:n.reject)(r._value)}):this._deferreds.push(n)}function r(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void u(n(t,e),n(r,this),n(o,this))}this._state=!0,this._value=e,s.call(this)}catch(e){o.call(this,e)}}function o(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;e<t;e++)a.call(this,this._deferreds[e]);this._deferreds=null}function l(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function u(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}}return i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(n,r){var o=this;return new i(function(e,t){a.call(o,new l(n,r,e,t))})},i.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&e(arguments[0])?arguments[0]:arguments);return new i(function(r,o){if(0===s.length)return r([]);var i=s.length;function a(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){a(t,e)},o)}s[t]=e,0==--i&&r(s)}catch(e){o(e)}}for(var e=0;e<s.length;e++)a(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i}(),Ae=function(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)},De=function(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)},Me=function(t,n){var r,e;return(e=function(){var e=arguments;clearTimeout(r),r=Ae(function(){t.apply(this,e)},n)}).stop=function(){clearTimeout(r)},e},Ie={requestAnimationFrame:function(e,t){fe?fe.then(e):fe=new Pe(function(e){t||(t=document.body),function(e,t){var n,r=window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=window[o[n]+"RequestAnimationFrame"];r||(r=function(e){window.setTimeout(e,0)}),r(e,t)}(e,t)}).then(e)},setTimeout:Ae,setInterval:De,setEditorTimeout:function(e,t,n){return Ae(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=De(function(){e.removed?clearInterval(r):t()},n)},debounce:Me,throttle:Me,clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)}},Le=/^(?:mouse|contextmenu)|click/,Be={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1},Fe=function(){return!1},je=function(){return!0},He=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},Ue=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},ze=function(e,t){var n,r,o=t||{};for(n in e)Be[n]||(o[n]=e[n]);if(o.target||(o.target=o.srcElement||document),Oe.experimentalShadowDom&&(o.target=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&0<n.length)return n[0]}return t}(e,o.target)),e&&Le.test(e.type)&&void 0===e.pageX&&void 0!==e.clientX){var i=o.target.ownerDocument||document,a=i.documentElement,s=i.body;o.pageX=e.clientX+(a&&a.scrollLeft||s&&s.scrollLeft||0)-(a&&a.clientLeft||s&&s.clientLeft||0),o.pageY=e.clientY+(a&&a.scrollTop||s&&s.scrollTop||0)-(a&&a.clientTop||s&&s.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=je,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=je,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=je,o.stopPropagation()})==((r=o).isDefaultPrevented===je||r.isDefaultPrevented===Fe)&&(o.isDefaultPrevented=Fe,o.isPropagationStopped=Fe,o.isImmediatePropagationStopped=Fe),void 0===o.metaKey&&(o.metaKey=!1),o},We=function(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){return"complete"===r.readyState||"interactive"===r.readyState&&r.body},a=function(){n.domLoaded||(n.domLoaded=!0,t(o))},s=function(){i()&&(Ue(r,"readystatechange",s),a())},l=function(){try{r.documentElement.doScroll("left")}catch(e){return void Ie.setTimeout(l)}a()};!r.addEventListener||Oe.ie&&Oe.ie<11?(He(r,"readystatechange",s),r.documentElement.doScroll&&e.self===e.top&&l()):i()?a():He(e,"DOMContentLoaded",a),He(e,"load",a)}},Ve=function(){var p,m,h,g,v,b=this,y={};m="mce-data-"+(+new Date).toString(32),g="onmouseenter"in document.documentElement,h="onfocusin"in document.documentElement,v={mouseenter:"mouseover",mouseleave:"mouseout"},p=1,b.domLoaded=!1,b.events=y;var w=function(e,t){var n,r,o,i,a=y[t];if(n=a&&a[e.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return};b.bind=function(e,t,n,r){var o,i,a,s,l,u,c,f=window,d=function(e){w(ze(e||f.event),o)};if(e&&3!==e.nodeType&&8!==e.nodeType){for(e[m]?o=e[m]:(o=p++,e[m]=o,y[o]={}),r=r||e,a=(t=t.split(" ")).length;a--;)u=d,l=c=!1,"DOMContentLoaded"===(s=t[a])&&(s="ready"),b.domLoaded&&"ready"===s&&"complete"===e.readyState?n.call(r,ze({type:s})):(g||(l=v[s])&&(u=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=ze(e||f.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,w(e,o))}),h||"focusin"!==s&&"focusout"!==s||(c=!0,l="focusin"===s?"focus":"blur",u=function(e){(e=ze(e||f.event)).type="focus"===e.type?"focusin":"focusout",w(e,o)}),(i=y[o][s])?"ready"===s&&b.domLoaded?n({type:s}):i.push({func:n,scope:r}):(y[o][s]=i=[{func:n,scope:r}],i.fakeName=l,i.capture=c,i.nativeHandler=u,"ready"===s?We(e,u,b):He(e,l||s,u,c)));return e=i=0,n}},b.unbind=function(t,e,n){var r,o,i,a,s,l;if(!t||3===t.nodeType||8===t.nodeType)return b;if(r=t[m]){if(l=y[r],e){for(i=(e=e.split(" ")).length;i--;)if(o=l[s=e[i]]){if(n)for(a=o.length;a--;)if(o[a].func===n){var u=o.nativeHandler,c=o.fakeName,f=o.capture;(o=o.slice(0,a).concat(o.slice(a+1))).nativeHandler=u,o.fakeName=c,o.capture=f,l[s]=o}n&&0!==o.length||(delete l[s],Ue(t,o.fakeName||s,o.nativeHandler,o.capture))}}else{for(s in l)o=l[s],Ue(t,o.fakeName||s,o.nativeHandler,o.capture);l={}}for(s in l)return b;delete y[r];try{delete t[m]}catch(e){t[m]=null}}return b},b.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return b;for((n=ze(null,n)).type=t,n.target=e;(r=e[m])&&w(n,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!n.isPropagationStopped(););return b},b.clean=function(e){var t,n,r=b.unbind;if(!e||3===e.nodeType||8===e.nodeType)return b;if(e[m]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[m]&&r(e);return b},b.destroy=function(){y={}},b.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}};Ve.Event=new Ve,Ve.Event.bind(window,"ready",function(){});var qe="sizzle"+-new Date,$e=window.document,Xe=0,Ye=0,Ge=Tt(),Ke=Tt(),Je=Tt(),Ze=function(e,t){return e===t&&(Ce=!0),0},Qe="undefined",et={}.hasOwnProperty,tt=[],nt=tt.pop,rt=tt.push,ot=tt.push,it=tt.slice,at=tt.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},st="[\\x20\\t\\r\\n\\f]",lt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ut="\\["+st+"*("+lt+")(?:"+st+"*([*^$|!~]?=)"+st+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+lt+"))|)"+st+"*\\]",ct=":("+lt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ut+")*)|.*)\\)|)",ft=new RegExp("^"+st+"+|((?:^|[^\\\\])(?:\\\\.)*)"+st+"+$","g"),dt=new RegExp("^"+st+"*,"+st+"*"),pt=new RegExp("^"+st+"*([>+~]|"+st+")"+st+"*"),mt=new RegExp("="+st+"*([^\\]'\"]*?)"+st+"*\\]","g"),ht=new RegExp(ct),gt=new RegExp("^"+lt+"$"),vt={ID:new RegExp("^#("+lt+")"),CLASS:new RegExp("^\\.("+lt+")"),TAG:new RegExp("^("+lt+"|[*])"),ATTR:new RegExp("^"+ut),PSEUDO:new RegExp("^"+ct),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+st+"*(even|odd|(([+-]|)(\\d*)n|)"+st+"*(?:([+-]|)"+st+"*(\\d+)|))"+st+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+st+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+st+"*((?:-\\d)?\\d*)"+st+"*\\)|)(?=[^-]|$)","i")},bt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,wt=/^[^{]+\{\s*\[native \w/,xt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ct=/[+~]/,_t=/'|\\/g,St=new RegExp("\\\\([\\da-f]{1,6}"+st+"?|("+st+")|.)","ig"),kt=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{ot.apply(tt=it.call($e.childNodes),$e.childNodes),tt[$e.childNodes.length].nodeType}catch(e){ot={apply:tt.length?function(e,t){rt.apply(e,it.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Et=function(e,t,n,r){var o,i,a,s,l,u,c,f,d,p;if((t?t.ownerDocument||t:$e)!==Se&&_e(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=(t=t||Se).nodeType)&&9!==s)return[];if(Ee&&!r){if(o=xt.exec(e))if(a=o[1]){if(9===s){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Re(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return ot.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&pe.getElementsByClassName)return ot.apply(n,t.getElementsByClassName(a)),n}if(pe.qsa&&(!Te||!Te.test(e))){if(f=c=qe,d=t,p=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=ve(e),(c=t.getAttribute("id"))?f=c.replace(_t,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",l=u.length;l--;)u[l]=f+It(u[l]);d=Ct.test(e)&&Dt(t.parentNode)||t,p=u.join(",")}if(p)try{return ot.apply(n,d.querySelectorAll(p)),n}catch(e){}finally{c||t.removeAttribute("id")}}}return ye(e.replace(ft,"$1"),t,n,r)};function Tt(){var r=[];return function e(t,n){return r.push(t+" ")>me.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function Nt(e){return e[qe]=!0,e}function Rt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function Ot(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Pt(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function At(a){return Nt(function(i){return i=+i,Nt(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Dt(e){return e&&typeof e.getElementsByTagName!==Qe&&e}for(de in pe=Et.support={},ge=Et.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},_e=Et.setDocument=function(e){var t,l=e?e.ownerDocument||e:$e,n=l.defaultView;return l!==Se&&9===l.nodeType&&l.documentElement?(ke=(Se=l).documentElement,Ee=!ge(l),n&&n!==function(e){try{return e.top}catch(e){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){_e()},!1):n.attachEvent&&n.attachEvent("onunload",function(){_e()})),pe.attributes=!0,pe.getElementsByTagName=!0,pe.getElementsByClassName=wt.test(l.getElementsByClassName),pe.getById=!0,me.find.ID=function(e,t){if(typeof t.getElementById!==Qe&&Ee){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},me.filter.ID=function(e){var t=e.replace(St,kt);return function(e){return e.getAttribute("id")===t}},me.find.TAG=pe.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Qe)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},me.find.CLASS=pe.getElementsByClassName&&function(e,t){if(Ee)return t.getElementsByClassName(e)},Ne=[],Te=[],pe.disconnectedMatch=!0,Te=Te.length&&new RegExp(Te.join("|")),Ne=Ne.length&&new RegExp(Ne.join("|")),t=wt.test(ke.compareDocumentPosition),Re=t||wt.test(ke.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Ze=t?function(e,t){if(e===t)return Ce=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!pe.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument===$e&&Re($e,e)?-1:t===l||t.ownerDocument===$e&&Re($e,t)?1:xe?at.call(xe,e)-at.call(xe,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Ce=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!o||!i)return e===l?-1:t===l?1:o?-1:i?1:xe?at.call(xe,e)-at.call(xe,t):0;if(o===i)return Rt(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?Rt(a[r],s[r]):a[r]===$e?-1:s[r]===$e?1:0},l):Se},Et.matches=function(e,t){return Et(e,null,null,t)},Et.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Se&&_e(e),t=t.replace(mt,"='$1']"),pe.matchesSelector&&Ee&&(!Ne||!Ne.test(t))&&(!Te||!Te.test(t)))try{var n=(void 0).call(e,t);if(n||pe.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<Et(t,Se,null,[e]).length},Et.contains=function(e,t){return(e.ownerDocument||e)!==Se&&_e(e),Re(e,t)},Et.attr=function(e,t){(e.ownerDocument||e)!==Se&&_e(e);var n=me.attrHandle[t.toLowerCase()],r=n&&et.call(me.attrHandle,t.toLowerCase())?n(e,t,!Ee):void 0;return void 0!==r?r:pe.attributes||!Ee?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},Et.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},Et.uniqueSort=function(e){var t,n=[],r=0,o=0;if(Ce=!pe.detectDuplicates,xe=!pe.sortStable&&e.slice(0),e.sort(Ze),Ce){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return xe=null,e},he=Et.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=he(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=he(t);return n},(me=Et.selectors={cacheLength:50,createPseudo:Nt,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(St,kt),e[3]=(e[3]||e[4]||e[5]||"").replace(St,kt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Et.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Et.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return vt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ht.test(n)&&(t=ve(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(St,kt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Ge[e+" "];return t||(t=new RegExp("(^|"+st+")"+e+"("+st+"|$)"))&&Ge(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Qe&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=Et.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1<t.indexOf(o):"$="===r?o&&t.slice(-o.length)===o:"~="===r?-1<(" "+t+" ").indexOf(o):"|="===r&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(p,e,t,m,h){var g="nth"!==p.slice(0,3),v="last"!==p.slice(-4),b="of-type"===e;return 1===m&&0===h?function(e){return!!e.parentNode}:function(e,t,n){var r,o,i,a,s,l,u=g!==v?"nextSibling":"previousSibling",c=e.parentNode,f=b&&e.nodeName.toLowerCase(),d=!n&&!b;if(c){if(g){for(;u;){for(i=e;i=i[u];)if(b?i.nodeName.toLowerCase()===f:1===i.nodeType)return!1;l=u="only"===p&&!l&&"nextSibling"}return!0}if(l=[v?c.firstChild:c.lastChild],v&&d){for(s=(r=(o=c[qe]||(c[qe]={}))[p]||[])[0]===Xe&&r[1],a=r[0]===Xe&&r[2],i=s&&c.childNodes[s];i=++s&&i&&i[u]||(a=s=0)||l.pop();)if(1===i.nodeType&&++a&&i===e){o[p]=[Xe,s,a];break}}else if(d&&(r=(e[qe]||(e[qe]={}))[p])&&r[0]===Xe)a=r[1];else for(;(i=++s&&i&&i[u]||(a=s=0)||l.pop())&&((b?i.nodeName.toLowerCase()!==f:1!==i.nodeType)||!++a||(d&&((i[qe]||(i[qe]={}))[p]=[Xe,a]),i!==e)););return(a-=h)===m||a%m==0&&0<=a/m}}},PSEUDO:function(e,i){var t,a=me.pseudos[e]||me.setFilters[e.toLowerCase()]||Et.error("unsupported pseudo: "+e);return a[qe]?a(i):1<a.length?(t=[e,e,"",i],me.setFilters.hasOwnProperty(e.toLowerCase())?Nt(function(e,t){for(var n,r=a(e,i),o=r.length;o--;)e[n=at.call(e,r[o])]=!(t[n]=r[o])}):function(e){return a(e,0,t)}):a}},pseudos:{not:Nt(function(e){var r=[],o=[],s=be(e.replace(ft,"$1"));return s[qe]?Nt(function(e,t,n,r){for(var o,i=s(e,null,r,[]),a=e.length;a--;)(o=i[a])&&(e[a]=!(t[a]=o))}):function(e,t,n){return r[0]=e,s(r,null,n,o),!o.pop()}}),has:Nt(function(t){return function(e){return 0<Et(t,e).length}}),contains:Nt(function(t){return t=t.replace(St,kt),function(e){return-1<(e.textContent||e.innerText||he(e)).indexOf(t)}}),lang:Nt(function(n){return gt.test(n||"")||Et.error("unsupported lang: "+n),n=n.replace(St,kt).toLowerCase(),function(e){var t;do{if(t=Ee?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===ke},focus:function(e){return e===Se.activeElement&&(!Se.hasFocus||Se.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!me.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return bt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:At(function(){return[0]}),last:At(function(e,t){return[t-1]}),eq:At(function(e,t,n){return[n<0?n+t:n]}),even:At(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:At(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:At(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:At(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=me.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})me.pseudos[de]=Ot(de);for(de in{submit:!0,reset:!0})me.pseudos[de]=Pt(de);function Mt(){}function It(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Lt(a,e,t){var s=e.dir,l=t&&"parentNode"===s,u=Ye++;return e.first?function(e,t,n){for(;e=e[s];)if(1===e.nodeType||l)return a(e,t,n)}:function(e,t,n){var r,o,i=[Xe,u];if(n){for(;e=e[s];)if((1===e.nodeType||l)&&a(e,t,n))return!0}else for(;e=e[s];)if(1===e.nodeType||l){if((r=(o=e[qe]||(e[qe]={}))[s])&&r[0]===Xe&&r[1]===u)return i[2]=r[2];if((o[s]=i)[2]=a(e,t,n))return!0}}}function Bt(o){return 1<o.length?function(e,t,n){for(var r=o.length;r--;)if(!o[r](e,t,n))return!1;return!0}:o[0]}function Ft(e,t,n,r,o){for(var i,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(i=e[s])&&(n&&!n(i,r,o)||(a.push(i),u&&t.push(s)));return a}function jt(p,m,h,g,v,e){return g&&!g[qe]&&(g=jt(g)),v&&!v[qe]&&(v=jt(v,e)),Nt(function(e,t,n,r){var o,i,a,s=[],l=[],u=t.length,c=e||function(e,t,n){for(var r=0,o=t.length;r<o;r++)Et(e,t[r],n);return n}(m||"*",n.nodeType?[n]:n,[]),f=!p||!e&&m?c:Ft(c,s,p,n,r),d=h?v||(e?p:u||g)?[]:t:f;if(h&&h(f,d,n,r),g)for(o=Ft(d,l),g(o,[],n,r),i=o.length;i--;)(a=o[i])&&(d[l[i]]=!(f[l[i]]=a));if(e){if(v||p){if(v){for(o=[],i=d.length;i--;)(a=d[i])&&o.push(f[i]=a);v(null,d=[],o,r)}for(i=d.length;i--;)(a=d[i])&&-1<(o=v?at.call(e,a):s[i])&&(e[o]=!(t[o]=a))}}else d=Ft(d===t?d.splice(u,d.length):d),v?v(null,t,d,r):ot.apply(t,d)})}function Ht(e){for(var r,t,n,o=e.length,i=me.relative[e[0].type],a=i||me.relative[" "],s=i?1:0,l=Lt(function(e){return e===r},a,!0),u=Lt(function(e){return-1<at.call(r,e)},a,!0),c=[function(e,t,n){return!i&&(n||t!==we)||((r=t).nodeType?l(e,t,n):u(e,t,n))}];s<o;s++)if(t=me.relative[e[s].type])c=[Lt(Bt(c),t)];else{if((t=me.filter[e[s].type].apply(null,e[s].matches))[qe]){for(n=++s;n<o&&!me.relative[e[n].type];n++);return jt(1<s&&Bt(c),1<s&&It(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ft,"$1"),t,s<n&&Ht(e.slice(s,n)),n<o&&Ht(e=e.slice(n)),n<o&&It(e))}c.push(t)}return Bt(c)}Mt.prototype=me.filters=me.pseudos,me.setFilters=new Mt,ve=Et.tokenize=function(e,t){var n,r,o,i,a,s,l,u=Ke[e+" "];if(u)return t?0:u.slice(0);for(a=e,s=[],l=me.preFilter;a;){for(i in n&&!(r=dt.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(o=[])),n=!1,(r=pt.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(ft," ")}),a=a.slice(n.length)),me.filter)!(r=vt[i].exec(a))||l[i]&&!(r=l[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?Et.error(e):Ke(e,s).slice(0)},be=Et.compile=function(e,t){var n,g,v,b,y,r,o=[],i=[],a=Je[e+" "];if(!a){for(t||(t=ve(e)),n=t.length;n--;)(a=Ht(t[n]))[qe]?o.push(a):i.push(a);(a=Je(e,(g=i,b=0<(v=o).length,y=0<g.length,r=function(e,t,n,r,o){var i,a,s,l=0,u="0",c=e&&[],f=[],d=we,p=e||y&&me.find.TAG("*",o),m=Xe+=null==d?1:Math.random()||.1,h=p.length;for(o&&(we=t!==Se&&t);u!==h&&null!=(i=p[u]);u++){if(y&&i){for(a=0;s=g[a++];)if(s(i,t,n)){r.push(i);break}o&&(Xe=m)}b&&((i=!s&&i)&&l--,e&&c.push(i))}if(l+=u,b&&u!==l){for(a=0;s=v[a++];)s(c,f,t,n);if(e){if(0<l)for(;u--;)c[u]||f[u]||(f[u]=nt.call(r));f=Ft(f)}ot.apply(r,f),o&&!e&&0<f.length&&1<l+v.length&&Et.uniqueSort(r)}return o&&(Xe=m,we=d),c},b?Nt(r):r))).selector=e}return a},ye=Et.select=function(e,t,n,r){var o,i,a,s,l,u="function"==typeof e&&e,c=!r&&ve(e=u.selector||e);if(n=n||[],1===c.length){if(2<(i=c[0]=c[0].slice(0)).length&&"ID"===(a=i[0]).type&&pe.getById&&9===t.nodeType&&Ee&&me.relative[i[1].type]){if(!(t=(me.find.ID(a.matches[0].replace(St,kt),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=vt.needsContext.test(e)?0:i.length;o--&&(a=i[o],!me.relative[s=a.type]);)if((l=me.find[s])&&(r=l(a.matches[0].replace(St,kt),Ct.test(i[0].type)&&Dt(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&It(i)))return ot.apply(n,r),n;break}}return(u||be(e,c))(r,t,!Ee,n,Ct.test(e)&&Dt(t.parentNode)||t),n},pe.sortStable=qe.split("").sort(Ze).join("")===qe,pe.detectDuplicates=!!Ce,_e(),pe.sortDetached=!0;var Ut=Array.isArray,zt=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,void 0!==e.length){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1},Wt=function(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1},Vt={isArray:Ut,toArray:function(e){var t,n,r=e;if(!Ut(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:zt,map:function(n,r){var o=[];return zt(n,function(e,t){o.push(r(e,t,n))}),o},filter:function(n,r){var o=[];return zt(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o},indexOf:function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},findIndex:Wt,find:function(e,t,n){var r=Wt(e,t,n);if(-1!==r)return e[r]},last:function(e){return e[e.length-1]}},qt=/^\s*|\s*$/g,$t=function(e){return null==e?"":(""+e).replace(qt,"")},Xt=function(e,t){return t?!("array"!==t||!Vt.isArray(e))||typeof e===t:void 0!==e},Yt=function(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),Vt.each(e,function(e,t){if(!1===n.call(o,e,t,r))return!1;Yt(e,n,r,o)}))},Gt={trim:$t,isArray:Vt.isArray,is:Xt,toArray:Vt.toArray,makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:Vt.each,map:Vt.map,grep:Vt.filter,inArray:Vt.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s,l=arguments;for(n=1,r=l.length;n<r;n++)for(o in t=l[n])t.hasOwnProperty(o)&&void 0!==(s=t[o])&&(e[o]=s);return e},create:function(e,t,n){var r,o,i,a,s,l=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=this.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},l=1),o[i]=t[i],this.extend(o[i].prototype,t),e[5]&&(r=this.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],s=o[i],o[i]=l?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],s.apply(this,arguments)},o[i].prototype[i]=o[i],this.each(r,function(e,t){o[i].prototype[t]=r[t]}),this.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),this.each(t.static,function(e,t){o[i][t]=e})}},walk:Yt,createNS:function(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||Xt(e,"array")?e:Vt.map(e.split(t||","),$t)},_addCacheSuffix:function(e){var t=Oe.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Kt=document,Jt=Array.prototype.push,Zt=Array.prototype.slice,Qt=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,en=Ve.Event,tn=Gt.makeMap("children,contents,next,prev"),nn=function(e){return void 0!==e},rn=function(e){return"string"==typeof e},on=function(e,t){var n,r,o;for(o=(t=t||Kt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},an=function(e,t,n,r){var o;if(rn(t))t=on(t,wn(e[0]));else if(t.length&&!t.nodeType){if(t=hn.makeArray(t),r)for(o=t.length-1;0<=o;o--)an(e,t[o],n,r);else for(o=0;o<t.length;o++)an(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},sn=function(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")},ln=function(e,t,n){var r,o;return t=hn(t)[0],e.each(function(){n&&r===this.parentNode||(r=this.parentNode,o=t.cloneNode(!1),this.parentNode.insertBefore(o,this)),o.appendChild(this)}),e},un=Gt.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),cn=Gt.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),fn={for:"htmlFor",class:"className",readonly:"readOnly"},dn={float:"cssFloat"},pn={},mn={},hn=function(e,t){return new hn.fn.init(e,t)},gn=/^\s*|\s*$/g,vn=function(e){return null==e?"":(""+e).replace(gn,"")},bn=function(e,t){var n,r,o,i;if(e)if(void 0===(n=e.length)){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e},yn=function(e,n){var r=[];return bn(e,function(e,t){n(t,e)&&r.push(t)}),r},wn=function(e){return e?9===e.nodeType?e:e.ownerDocument:Kt};hn.fn=hn.prototype={constructor:hn,selector:"",context:null,length:0,init:function(e,t){var n,r,o=this;if(!e)return o;if(e.nodeType)return o.context=o[0]=e,o.length=1,o;if(t&&t.nodeType)o.context=t;else{if(t)return hn(e).attr(t);o.context=t=document}if(rn(e)){if(!(n="<"===(o.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Qt.exec(e)))return hn(t).find(e);if(n[1])for(r=on(e,wn(t)).firstChild;r;)Jt.call(o,r),r=r.nextSibling;else{if(!(r=wn(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Gt.toArray(this)},add:function(e,t){var n,r;if(rn(e))return this.add(hn(e));if(!1!==t)for(n=hn.unique(this.toArray().concat(hn.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else Jt.apply(this,hn.makeArray(e));return this},attr:function(t,n){var e,r=this;if("object"==typeof t)bn(t,function(e,t){r.attr(e,t)});else{if(!nn(n)){if(r[0]&&1===r[0].nodeType){if((e=pn[t])&&e.get)return e.get(r[0],t);if(cn[t])return r.prop(t)?t:void 0;null===(n=r[0].getAttribute(t,2))&&(n=void 0)}return n}this.each(function(){var e;if(1===this.nodeType){if((e=pn[t])&&e.set)return void e.set(this,n);null===n?this.removeAttribute(t,2):this.setAttribute(t,n,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=fn[e]||e))bn(e,function(e,t){n.prop(e,t)});else{if(!nn(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1===this.nodeType&&(this[e]=t)})}return n},css:function(t,n){var e,r,o=this,i=function(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})},a=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})};if("object"==typeof t)bn(t,function(e,t){o.css(e,t)});else if(nn(n))t=i(t),"number"!=typeof n||un[t]||(n=n.toString()+"px"),o.each(function(){var e=this.style;if((r=mn[t])&&r.set)r.set(this,n);else{try{this.style[dn[t]||t]=n}catch(e){}null!==n&&""!==n||(e.removeProperty?e.removeProperty(a(t)):e.removeAttribute(t))}});else{if(e=o[0],(r=mn[t])&&r.get)return r.get(e);if(!e.ownerDocument.defaultView)return e.currentStyle?e.currentStyle[i(t)]:"";try{return e.ownerDocument.defaultView.getComputedStyle(e,null).getPropertyValue(a(t))}catch(e){return}}return o},remove:function(){for(var e,t=this.length;t--;)e=this[t],en.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(t){var n,r=this;if(nn(t)){n=r.length;try{for(;n--;)r[n].innerHTML=t}catch(e){hn(r[n]).empty().append(t)}return r}return r[0]?r[0].innerHTML:""},text:function(e){var t;if(nn(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return an(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return an(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?an(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?an(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return hn(e).append(this),this},prependTo:function(e){return hn(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return ln(this,e)},wrapAll:function(e){return ln(this,e,!0)},wrapInner:function(e){return this.each(function(){hn(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){hn(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),hn(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(o,i){var e=this;return"string"!=typeof o||(-1!==o.indexOf(" ")?bn(o.split(" "),function(){e.toggleClass(this,i)}):e.each(function(e,t){var n,r;(r=sn(t,o))!==i&&(n=t.className,r?t.className=vn((" "+n+" ").replace(" "+o+" "," ")):t.className+=n?" "+o:o)})),e},hasClass:function(e){return sn(this[0],e)},each:function(e){return bn(this,e)},on:function(e,t){return this.each(function(){en.bind(this,e,t)})},off:function(e,t){return this.each(function(){en.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?en.fire(this,e.type,e):en.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new hn(Zt.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)hn.find(e,this[t],r);return hn(r)},filter:function(n){return hn("function"==typeof n?yn(this.toArray(),function(e,t){return n(t,e)}):hn.filter(n,this.toArray()))},closest:function(n){var r=[];return n instanceof hn&&(n=n[0]),this.each(function(e,t){for(;t;){if("string"==typeof n&&hn(t).is(n)){r.push(t);break}if(t===n){r.push(t);break}t=t.parentNode}}),hn(r)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:Jt,sort:[].sort,splice:[].splice},Gt.extend(hn,{extend:Gt.extend,makeArray:function(e){return(t=e)&&t===t.window||e.nodeType?[e]:Gt.toArray(e);var t},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:Gt.isArray,each:bn,trim:vn,grep:yn,find:Et,expr:Et.selectors,unique:Et.uniqueSort,text:Et.getText,contains:Et.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return t=1===t.length?hn.find.matchesSelector(t[0],e)?[t[0]]:[]:hn.find.matches(e,t)}});var xn=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof hn&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&hn(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},Cn=function(e,t,n,r){var o=[];for(r instanceof hn&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(void 0!==r){if(e===r)break;if("string"==typeof r&&hn(e).is(r))break}o.push(e)}return o},_n=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};bn({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xn(e,"parentNode")},next:function(e){return _n(e,"nextSibling",1)},prev:function(e){return _n(e,"previousSibling",1)},children:function(e){return Cn(e.firstChild,"nextSibling",1)},contents:function(e){return Gt.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,r){hn.fn[e]=function(t){var n=[];return this.each(function(){var e=r.call(n,this,t,n);e&&(hn.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(tn[e]||(n=hn.unique(n)),0===e.indexOf("parents")&&(n=n.reverse())),n=hn(n),t?n.filter(t):n}}),bn({parentsUntil:function(e,t){return xn(e,"parentNode",t)},nextUntil:function(e,t){return Cn(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return Cn(e,"previousSibling",1,t).slice(1)}},function(r,o){hn.fn[r]=function(t,e){var n=[];return this.each(function(){var e=o.call(n,this,t,n);e&&(hn.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(n=hn.unique(n),0!==r.indexOf("parents")&&"prevUntil"!==r||(n=n.reverse())),n=hn(n),e?n.filter(e):n}}),hn.fn.is=function(e){return!!e&&0<this.filter(e).length},hn.fn.init.prototype=hn.fn,hn.overrideDefaults=function(n){var r,o=function(e,t){return r=r||n(),0===arguments.length&&(e=r.element),t||(t=r.context),new o.fn.init(e,t)};return hn.extend(o,this),o};var Sn=function(n,r,e){bn(e,function(e,t){n[e]=n[e]||{},n[e][r]=t})};Oe.ie&&Oe.ie<8&&(Sn(pn,"get",{maxlength:function(e){var t=e.maxLength;if(2147483647!==t)return t},size:function(e){var t=e.size;if(20!==t)return t},class:function(e){return e.className},style:function(e){var t=e.style.cssText;if(0!==t.length)return t}}),Sn(pn,"set",{class:function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),Oe.ie&&Oe.ie<9&&(dn.float="styleFloat",Sn(mn,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),hn.attrHooks=pn,hn.cssHooks=mn;var kn=function(n){var r,o=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o||(o=!0,r=n.apply(null,e)),r}},En=function(){return Tn(0,0)},Tn=function(e,t){return{major:e,minor:t}},Nn={nu:Tn,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?En():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return Tn(r(1),r(2))}(e,n)},unknown:En},Rn=function(e,t){return function(){return t===e}},On=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Rn("Edge",t),isChrome:Rn("Chrome",t),isIE:Rn("IE",t),isOpera:Rn("Opera",t),isFirefox:Rn("Firefox",t),isSafari:Rn("Safari",t)}},Pn={unknown:function(){return On({current:void 0,version:Nn.unknown()})},nu:On,edge:y("Edge"),chrome:y("Chrome"),ie:y("IE"),opera:y("Opera"),firefox:y("Firefox"),safari:y("Safari")},An=function(e,t){return function(){return t===e}},Dn=function(e){var t=e.current;return{current:t,version:e.version,isWindows:An("Windows",t),isiOS:An("iOS",t),isAndroid:An("Android",t),isOSX:An("OSX",t),isLinux:An("Linux",t),isSolaris:An("Solaris",t),isFreeBSD:An("FreeBSD",t)}},Mn={unknown:function(){return Dn({current:void 0,version:Nn.unknown()})},nu:Dn,windows:y("Windows"),ios:y("iOS"),android:y("Android"),linux:y("Linux"),osx:y("OSX"),solaris:y("Solaris"),freebsd:y("FreeBSD")},In=function(e,t){var n=String(t).toLowerCase();return $(e,function(e){return e.search(n)})},Ln=function(e,n){return In(e,n).map(function(e){var t=Nn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Bn=function(e,n){return In(e,n).map(function(e){var t=Nn.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Fn=function(e,t){return-1!==e.indexOf(t)},jn=function(e){return e.replace(/^\s+|\s+$/g,"")},Hn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Un=function(t){return function(e){return Fn(e,t)}},zn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Fn(e,"edge/")&&Fn(e,"chrome")&&Fn(e,"safari")&&Fn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Hn],search:function(e){return Fn(e,"chrome")&&!Fn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Fn(e,"msie")||Fn(e,"trident")}},{name:"Opera",versionRegexes:[Hn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Un("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Un("firefox")},{name:"Safari",versionRegexes:[Hn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Fn(e,"safari")||Fn(e,"mobile/"))&&Fn(e,"applewebkit")}}],Wn=[{name:"Windows",search:Un("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Fn(e,"iphone")||Fn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Un("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Un("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Un("linux"),versionRegexes:[]},{name:"Solaris",search:Un("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Un("freebsd"),versionRegexes:[]}],Vn={browsers:y(zn),oses:y(Wn)},qn=function(e){var t,n,r,o,i,a,s,l,u,c,f,d=Vn.browsers(),p=Vn.oses(),m=Ln(d,e).fold(Pn.unknown,Pn.nu),h=Bn(p,e).fold(Mn.unknown,Mn.nu);return{browser:m,os:h,deviceType:(n=m,r=e,o=(t=h).isiOS()&&!0===/ipad/i.test(r),i=t.isiOS()&&!o,a=t.isAndroid()&&3===t.version.major,s=t.isAndroid()&&4===t.version.major,l=o||a||s&&!0===/mobile/i.test(r),u=t.isiOS()||t.isAndroid(),c=u&&!l,f=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(r),{isiPad:y(o),isiPhone:y(i),isTablet:y(l),isPhone:y(c),isTouch:y(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:y(f)})}},$n={detect:kn(function(){var e=navigator.userAgent;return qn(e)})},Xn=function(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:y(e)}},Yn={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw"HTML must have a single root node";return Xn(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return Xn(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return Xn(n)},fromDom:Xn,fromPoint:function(e,t,n){var r=e.dom();return R.from(r.elementFromPoint(t,n)).map(Xn)}},Gn={ATTRIBUTE:Node.ATTRIBUTE_NODE,CDATA_SECTION:Node.CDATA_SECTION_NODE,COMMENT:Node.COMMENT_NODE,DOCUMENT:Node.DOCUMENT_NODE,DOCUMENT_TYPE:Node.DOCUMENT_TYPE_NODE,DOCUMENT_FRAGMENT:Node.DOCUMENT_FRAGMENT_NODE,ELEMENT:Node.ELEMENT_NODE,TEXT:Node.TEXT_NODE,PROCESSING_INSTRUCTION:Node.PROCESSING_INSTRUCTION_NODE,ENTITY_REFERENCE:Node.ENTITY_REFERENCE_NODE,ENTITY:Node.ENTITY_NODE,NOTATION:Node.NOTATION_NODE},Kn=function(e){return e.dom().nodeName.toLowerCase()},Jn=function(e){return e.dom().nodeType},Zn=function(t){return function(e){return Jn(e)===t}},Qn=Zn(Gn.ELEMENT),er=Zn(Gn.TEXT),tr=Zn(Gn.DOCUMENT),nr={name:Kn,type:Jn,value:function(e){return e.dom().nodeValue},isElement:Qn,isText:er,isDocument:tr,isComment:function(e){return Jn(e)===Gn.COMMENT||"#comment"===Kn(e)}},rr=Object.keys,or=function(e,t){for(var n=rr(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i,e)}},ir=function(r,o){var i={};return or(r,function(e,t){var n=o(e,t,r);i[n.k]=n.v}),i},ar=function(e,t,n){if(!(P(n)||I(n)||B(n)))throw new Error("Attribute value was not simple");e.setAttribute(t,n+"")},sr=function(e,t,n){ar(e.dom(),t,n)},lr=function(e,t){var n=e.dom().getAttribute(t);return null===n?void 0:n},ur=function(e,t){var n=e.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},cr={clone:function(e){return q(e.dom().attributes,function(e,t){return e[t.name]=t.value,e},{})},set:sr,setAll:function(e,t){var n=e.dom();or(t,function(e,t){ar(n,t,e)})},get:lr,has:ur,remove:function(e,t){e.dom().removeAttribute(t)},hasNone:function(e){var t=e.dom().attributes;return null==t||0===t.length},transfer:function(o,i,e){nr.isElement(o)&&nr.isElement(i)&&z(e,function(e){var t,n,r;n=i,ur(t=o,r=e)&&!ur(n,r)&&sr(n,r,lr(t,r))})}},fr=kn(function(){return dr(Yn.fromDom(document))}),dr=function(e){var t=e.dom().body;if(null==t)throw"Body is not available yet";return Yn.fromDom(t)},pr={body:fr,getBody:dr,inBody:function(e){var t=nr.isText(e)?e.dom().parentNode:e.dom();return null!=t&&t.ownerDocument.body.contains(t)}},mr=function(e){return void 0!==e.style},hr=function(e,t,n){if(!P(n))throw new Error("CSS value must be a string: "+n);mr(e)&&e.style.setProperty(t,n)},gr=function(e,t){return mr(e)?e.style.getPropertyValue(t):""},vr=function(e,t){var n=e.dom(),r=gr(n,t);return R.from(r).filter(function(e){return 0<e.length})},br=function(e,t){var n=e.dom();or(t,function(e,t){hr(n,t,e)})},yr=function(e,t){var n=e.dom(),r=window.getComputedStyle(n).getPropertyValue(t),o=""!==r||pr.inBody(e)?r:gr(n,t);return null===o?void 0:o},wr=vr,xr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return z(t,function(e,t){r[e]=y(n[t])}),r}},Cr=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},_r=function(){return ie.getOrDie("Node")},Sr=function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)},kr=function(e,t){return Sr(e,t,_r().DOCUMENT_POSITION_CONTAINED_BY)},Er=Gn.ELEMENT,Tr=Gn.DOCUMENT,Nr=function(e){return e.nodeType!==Er&&e.nodeType!==Tr||0===e.childElementCount},Rr={all:function(e,t){var n=void 0===t?document:t.dom();return Nr(n)?[]:U(n.querySelectorAll(e),Yn.fromDom)},is:function(e,t){var n=e.dom();if(n.nodeType!==Er)return!1;if(void 0!==n.matches)return n.matches(t);if(void 0!==n.msMatchesSelector)return n.msMatchesSelector(t);if(void 0!==n.webkitMatchesSelector)return n.webkitMatchesSelector(t);if(void 0!==n.mozMatchesSelector)return n.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},one:function(e,t){var n=void 0===t?document:t.dom();return Nr(n)?R.none():R.from(n.querySelector(e)).map(Yn.fromDom)}},Or=function(e,t){return e.dom()===t.dom()},Pr=$n.detect().browser.isIE()?function(e,t){return kr(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},Ar={eq:Or,isEqualNode:function(e,t){return e.dom().isEqualNode(t.dom())},member:function(e,t){return H(t,x(Or,e))},contains:Pr,is:Rr.is},Dr=function(e){var t=e.dom();return R.from(t.parentNode).map(Yn.fromDom)},Mr=function(e){var t=e.dom();return R.from(t.previousSibling).map(Yn.fromDom)},Ir=function(e){var t=e.dom();return R.from(t.nextSibling).map(Yn.fromDom)},Lr=function(e){var t=e.dom();return U(t.childNodes,Yn.fromDom)},Br=function(e,t){var n=e.dom().childNodes;return R.from(n[t]).map(Yn.fromDom)},Fr=xr("element","offset"),jr={owner:function(e){return Yn.fromDom(e.dom().ownerDocument)},defaultView:function(e){var t=e.dom().ownerDocument.defaultView;return Yn.fromDom(t)},documentElement:function(e){return Yn.fromDom(e.dom().ownerDocument.documentElement)},parent:Dr,findIndex:function(n){return Dr(n).bind(function(e){var t=Lr(e);return X(t,function(e){return Ar.eq(n,e)})})},parents:function(e,t){for(var n=L(t)?t:y(!1),r=e.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Yn.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o},siblings:function(t){return Dr(t).map(Lr).map(function(e){return V(e,function(e){return!Ar.eq(t,e)})}).getOr([])},prevSibling:Mr,offsetParent:function(e){var t=e.dom();return R.from(t.offsetParent).map(Yn.fromDom)},prevSiblings:function(e){return t=Cr(e,Mr),(n=Z.call(t,0)).reverse(),n;var t,n},nextSibling:Ir,nextSiblings:function(e){return Cr(e,Ir)},children:Lr,child:Br,firstChild:function(e){return Br(e,0)},lastChild:function(e){return Br(e,e.dom().childNodes.length-1)},childNodesCount:function(e){return e.dom().childNodes.length},hasChildNodes:function(e){return e.dom().hasChildNodes()},leaf:function(e,t){var n=Lr(e);return 0<n.length&&t<n.length?Fr(n[t],0):Fr(e,t)}},Hr=$n.detect().browser,Ur=function(e){return $(e,nr.isElement)},zr={getPos:function(e,t,n){var r,o,i,a=0,s=0,l=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===yr(Yn.fromDom(e),"position"))return{x:a=(o=t.getBoundingClientRect()).left+(l.documentElement.scrollLeft||e.scrollLeft)-l.documentElement.clientLeft,y:s=o.top+(l.documentElement.scrollTop||e.scrollTop)-l.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType;)a+=r.offsetLeft||0,s+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType;)a-=r.scrollLeft||0,s-=r.scrollTop||0,r=r.parentNode;s+=(i=Yn.fromDom(t),Hr.isFirefox()&&"table"===nr.name(i)?Ur(jr.children(i)).filter(function(e){return"caption"===nr.name(e)}).bind(function(o){return Ur(jr.nextSiblings(o)).map(function(e){var t=e.dom().offsetTop,n=o.dom().offsetTop,r=o.dom().offsetHeight;return t<=n?-r:0})}).getOr(0):0)}return{x:a,y:s}}},Wr=function(e){var n=R.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){setTimeout(function(){t(e)},0)})};return e(function(e){n=R.some(e),i(t),t=[]}),{get:r,map:function(n){return Wr(function(t){r(function(e){t(n(e))})})},isReady:o}},Vr={nu:Wr,pure:function(t){return Wr(function(e){e(t)})}},qr=function(t){var e=function(e){var r;t((r=e,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this;setTimeout(function(){r.apply(n,e)},0)}))},n=function(){return Vr.nu(e)};return{map:function(r){return qr(function(n){e(function(e){var t=r(e);n(t)})})},bind:function(n){return qr(function(t){e(function(e){n(e).get(t)})})},anonBind:function(n){return qr(function(t){e(function(e){n.get(t)})})},toLazy:n,toCached:function(){var t=null;return qr(function(e){null===t&&(t=n()),t.get(e)})},get:e}},$r={nu:qr,pure:function(t){return qr(function(e){e(t)})}},Xr=function(a,e){return e(function(r){var o=[],i=0;0===a.length?r([]):z(a,function(e,t){var n;e.get((n=t,function(e){o[n]=e,++i>=a.length&&r(o)}))})})},Yr=function(e){return Xr(e,$r.nu)},Gr=function(n){return{is:function(e){return n===e},isValue:_,isError:C,getOr:y(n),getOrThunk:y(n),getOrDie:y(n),or:function(e){return Gr(n)},orThunk:function(e){return Gr(n)},fold:function(e,t){return t(n)},map:function(e){return Gr(e(n))},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return R.some(n)}}},Kr=function(n){return{is:C,isValue:C,isError:_,getOr:w,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Kr(n)},each:v,bind:function(e){return Kr(n)},exists:C,forall:_,toOption:R.none}},Jr={value:Gr,error:Kr};function Zr(d,e){var p,m=0,h={};p=(e=e||{}).maxLoadTime||5e3;var n=function(e,t,n){var r,o,i,a=function(){for(var e=i.passed,t=e.length;t--;)e[t]();i.status=2,i.passed=[],i.failed=[]},s=function(){for(var e=i.failed,t=e.length;t--;)e[t]();i.status=3,i.passed=[],i.failed=[]},l=function(e,t){e()||((new Date).getTime()-o<p?Ie.setTimeout(t):s())},u=function(){l(function(){return d.styleSheets.length,a(),!0},u)};if(e=Gt._addCacheSuffix(e),h[e]?i=h[e]:(i={passed:[],failed:[]},h[e]=i),t&&i.passed.push(t),n&&i.failed.push(n),1!==i.status)if(2!==i.status)if(3!==i.status){if(i.status=1,(r=d.createElement("link")).rel="stylesheet",r.type="text/css",r.id="u"+m++,r.async=!1,r.defer=!1,r.crossOrigin="anonymous",o=(new Date).getTime(),"onload"in r&&!((c=navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(c[1],10)<536))r.onload=u,r.onerror=s;else{if(0<navigator.userAgent.indexOf("Firefox"))return;u()}var c,f;f=r,d.getElementsByTagName("head")[0].appendChild(f),u()}else s();else a()},t=function(t){return $r.nu(function(e){n(t,b(e,y(Jr.value(t))),b(e,y(Jr.error(t))))})},o=function(e){return e.fold(w,w)};return{load:n,loadAll:function(e,n,r){Yr(U(e,t)).get(function(e){var t=W(e,function(e){return e.isValue()});0<t.fail.length?r(t.fail.map(o)):n(t.pass.map(o))})}}}function Qr(e,s){var t=e,n=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==s){if(o=e[n])return o;for(i=e.parentNode;i&&i!==s;i=i.parentNode)if(o=i[n])return o}}};this.current=function(){return t},this.next=function(e){return t=n(t,"firstChild","nextSibling",e)},this.prev=function(e){return t=n(t,"lastChild","previousSibling",e)},this.prev2=function(e){return t=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],s&&o===s)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==s)return i}}(t,"lastChild","previousSibling",e)}}var eo,to,no,ro=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(t,y(!0))).hasOwnProperty(nr.name(e))}},oo=ro(["h1","h2","h3","h4","h5","h6"]),io=ro(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),ao=function(e){return nr.isElement(e)&&!io(e)},so=function(e){return nr.isElement(e)&&"br"===nr.name(e)},lo=ro(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),uo=ro(["ul","ol","dl"]),co=ro(["li","dd","dt"]),fo=ro(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),po=ro(["thead","tbody","tfoot"]),mo=ro(["td","th"]),ho=ro(["pre","script","textarea","style"]),go=function(t){return function(e){return!!e&&e.nodeType===t}},vo=go(1),bo=function(e){var r=e.toLowerCase().split(" ");return function(e){var t,n;if(e&&e.nodeType)for(n=e.nodeName.toLowerCase(),t=0;t<r.length;t++)if(n===r[t])return!0;return!1}},yo=function(t){return function(e){if(vo(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},wo=go(3),xo=go(8),Co=go(9),_o=bo("br"),So=yo("true"),ko=yo("false"),Eo={isText:wo,isElement:vo,isComment:xo,isDocument:Co,isBr:_o,isContentEditableTrue:So,isContentEditableFalse:ko,matchNodeNames:bo,hasPropValue:function(t,n){return function(e){return vo(e)&&e[t]===n}},hasAttribute:function(t,e){return function(e){return vo(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,n){return function(e){return vo(e)&&e.getAttribute(t)===n}},matchStyleValues:function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if(vo(e))for(t=0;t<o.length;t++){var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if((n?n.getPropertyValue(r):null)===o[t])return!0}return!1}},isBogus:function(e){return vo(e)&&e.hasAttribute("data-mce-bogus")},isBogusAll:function(e){return vo(e)&&"all"===e.getAttribute("data-mce-bogus")},isTable:function(e){return vo(e)&&"TABLE"===e.tagName}},To=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},No=function(e,t){var n,r=t.childNodes;if(!Eo.isElement(t)||!To(t)){for(n=r.length-1;0<=n;n--)No(e,r[n]);if(!1===Eo.isDocument(t)){if(Eo.isText(t)&&0<t.nodeValue.length){var o=Gt.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<o)return;if(0===o&&(a=(i=t).previousSibling&&"SPAN"===i.previousSibling.nodeName,s=i.nextSibling&&"SPAN"===i.nextSibling.nodeName,a&&s))return}else if(Eo.isElement(t)&&(1===(r=t.childNodes).length&&To(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||fo(Yn.fromDom(t))))return;e.remove(t)}var i,a,s;return t}},Ro={trimNode:No},Oo=Gt.makeMap,Po=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ao=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Do=/[<>&\"\']/g,Mo=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Io={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};to={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},no={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};var Lo=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),to[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}};eo=Lo("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var Bo=function(e,t){return e.replace(t?Po:Ao,function(e){return to[e]||e})},Fo=function(e,t){return e.replace(t?Po:Ao,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":to[e]||"&#"+e.charCodeAt(0)+";"})},jo=function(e,t,n){return n=n||eo,e.replace(t?Po:Ao,function(e){return to[e]||n[e]||e})},Ho={encodeRaw:Bo,encodeAllRaw:function(e){return(""+e).replace(Do,function(e){return to[e]||e})},encodeNumeric:Fo,encodeNamed:jo,getEncodeFunc:function(e,t){var n=Lo(t)||eo,r=Oo(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Po:Ao,function(e){return void 0!==to[e]?to[e]:void 0!==n[e]?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return jo(e,t,n)}:jo:r.numeric?Fo:Bo},decode:function(e){return e.replace(Mo,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):Io[t]||String.fromCharCode(t):no[e]||eo[e]||(n=e,(r=Yn.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},Uo={},zo={},Wo=Gt.makeMap,Vo=Gt.each,qo=Gt.extend,$o=Gt.explode,Xo=Gt.inArray,Yo=function(e,t){return(e=Gt.trim(e))?e.split(t||" "):[]},Go=function(e){var s,t,n,r,o,i,l={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o};for(t=t||"","string"==typeof(n=n||[])&&(n=Yo(n)),r=(e=Yo(e)).length;r--;)i={attributes:a(o=Yo([s,t].join(" "))),attributesOrder:o,children:a(n,zo)},l[e[r]]=i},u=function(e,t){var n,r,o,i;for(n=(e=Yo(e)).length,t=Yo(t);n--;)for(r=l[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])};return Uo[e]?Uo[e]:(s="id accesskey class dir lang style tabindex title role",t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",n="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e&&(s+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",t+=" article aside details dialog figure main header footer hgroup section nav",n+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(s+=" xml:lang",n=[n,i="acronym applet basefont big font strike tt"].join(" "),Vo(Yo(i),function(e){a(e,"",n)}),t=[t,o="center dir isindex noframes"].join(" "),r=[t,n].join(" "),Vo(Yo(o),function(e){a(e,"",r)})),r=r||[t,n].join(" "),a("html","manifest","head body"),a("head","","base command link meta noscript script style title"),a("title hr noscript br"),a("base","href target"),a("link","href rel media hreflang type sizes hreflang"),a("meta","name http-equiv content charset"),a("style","media type scoped"),a("script","src async defer type charset"),a("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",r),a("address dt dd div caption","",r),a("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",n),a("blockquote","cite",r),a("ol","reversed start type","li"),a("ul","","li"),a("li","value",r),a("dl","","dt dd"),a("a","href target rel media hreflang type",n),a("q","cite",n),a("ins del","cite datetime",r),a("img","src sizes srcset alt usemap ismap width height"),a("iframe","src name width height",r),a("embed","src type width height"),a("object","data type typemustmatch name usemap form width height",[r,"param"].join(" ")),a("param","name value"),a("map","name",[r,"area"].join(" ")),a("area","alt coords shape href target rel media hreflang type"),a("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),a("colgroup","span","col"),a("col","span"),a("tbody thead tfoot","","tr"),a("tr","","td th"),a("td","colspan rowspan headers",r),a("th","colspan rowspan headers scope abbr",r),a("form","accept-charset action autocomplete enctype method name novalidate target",r),a("fieldset","disabled form name",[r,"legend"].join(" ")),a("label","form for",n),a("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),a("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?r:n),a("select","disabled form multiple name required size","option optgroup"),a("optgroup","disabled label","option"),a("option","disabled label selected value"),a("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),a("menu","type label",[r,"li"].join(" ")),a("noscript","",r),"html4"!==e&&(a("wbr"),a("ruby","",[n,"rt rp"].join(" ")),a("figcaption","",r),a("mark rt rp summary bdi","",n),a("canvas","width height",r),a("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[r,"track source"].join(" ")),a("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[r,"track source"].join(" ")),a("picture","","img source"),a("source","src srcset type media sizes"),a("track","kind src srclang label default"),a("datalist","",[n,"option"].join(" ")),a("article section nav aside main header footer","",r),a("hgroup","","h1 h2 h3 h4 h5 h6"),a("figure","",[r,"figcaption"].join(" ")),a("time","datetime",n),a("dialog","open",r),a("command","type label icon disabled checked radiogroup command"),a("output","for form name",n),a("progress","value max",n),a("meter","value min max low high optimum",n),a("details","open",[r,"summary"].join(" ")),a("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(u("script","language xml:space"),u("style","xml:space"),u("object","declare classid code codebase codetype archive standby align border hspace vspace"),u("embed","align name hspace vspace"),u("param","valuetype type"),u("a","charset name rev shape coords"),u("br","clear"),u("applet","codebase archive code object alt name width height align hspace vspace"),u("img","name longdesc align border hspace vspace"),u("iframe","longdesc frameborder marginwidth marginheight scrolling align"),u("font basefont","size color face"),u("input","usemap align"),u("select","onchange"),u("textarea"),u("h1 h2 h3 h4 h5 h6 div p legend caption","align"),u("ul","type compact"),u("li","type"),u("ol dl menu dir","compact"),u("pre","width xml:space"),u("hr","align noshade size width"),u("isindex","prompt"),u("table","summary width frame rules cellspacing cellpadding align bgcolor"),u("col","width align char charoff valign"),u("colgroup","width align char charoff valign"),u("thead","align char charoff valign"),u("tr","align char charoff valign bgcolor"),u("th","axis align char charoff valign nowrap bgcolor width height"),u("form","accept"),u("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),u("tfoot","align char charoff valign"),u("tbody","align char charoff valign"),u("area","nohref"),u("body","background bgcolor text link vlink alink")),"html4"!==e&&(u("input button select textarea","autofocus"),u("input textarea","placeholder"),u("a","download"),u("link script img","crossorigin"),u("iframe","sandbox seamless allowfullscreen")),Vo(Yo("a form meter progress dfn"),function(e){l[e]&&delete l[e].children[e]}),delete l.caption.children.table,delete l.script,Uo[e]=l)},Ko=function(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),Vo(e,function(e,t){r[t]=r[t.toUpperCase()]="map"===n?Wo(e,/[, ]/):$o(e,/[, ]/)})),r};function Jo(i){var e,t,n,r,o,a,s,l,u,c,f,d,p,_={},m={},S=[],h={},g={},v=function(e,t,n){var r=i[e];return r?r=Wo(r,/[, ]/,Wo(r.toUpperCase(),/[, ]/)):(r=Uo[e])||(r=Wo(t," ",Wo(t.toUpperCase()," ")),r=qo(r,n),Uo[e]=r),r};n=Go((i=i||{}).schema),!1===i.verify_html&&(i.valid_elements="*[*]"),e=Ko(i.valid_styles),t=Ko(i.invalid_styles,"map"),l=Ko(i.valid_classes,"map"),r=v("whitespace_elements","pre script noscript style textarea video audio iframe object code"),o=v("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),a=v("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),s=v("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),c=v("non_empty_elements","td th iframe video audio object script pre code",a),f=v("move_caret_before_on_enter_elements","table",c),d=v("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),u=v("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",d),p=v("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),Vo((i.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(e){g[e]=new RegExp("</"+e+"[^>]*>","gi")});var k=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},b=function(e){var t,n,r,o,i,a,s,l,u,c,f,d,p,m,h,g,v,b,y,w=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,x=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,C=/[*?+]/;if(e)for(e=Yo(e,","),_["@"]&&(g=_["@"].attributes,v=_["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=w.exec(e[t])){if(m=i[1],u=i[2],h=i[3],l=i[5],a={attributes:d={},attributesOrder:p=[]},"#"===m&&(a.paddEmpty=!0),"-"===m&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),g){for(b in g)d[b]=g[b];p.push.apply(p,v)}if(l)for(r=0,o=(l=Yo(l,"|")).length;r<o;r++)if(i=x.exec(l[r])){if(s={},f=i[1],c=i[2].replace(/[\\:]:/g,":"),m=i[3],y=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(c),s.required=!0),"-"===f){delete d[c],p.splice(Xo(p,c),1);continue}m&&("="===m&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:c,value:y}),s.defaultValue=y),":"===m&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:c,value:y}),s.forcedValue=y),"<"===m&&(s.validValues=Wo(y,"?"))),C.test(c)?(a.attributePatterns=a.attributePatterns||[],s.pattern=k(c),a.attributePatterns.push(s)):(d[c]||p.push(c),d[c]=s)}g||"@"!==u||(g=d,v=p),h&&(a.outputName=u,_[h]=a),C.test(u)?(a.pattern=k(u),S.push(a)):_[u]=a}},y=function(e){_={},S=[],b(e),Vo(n,function(e,t){m[t]=e.children})},w=function(e){var a=/^(~)?(.+)$/;e&&(Uo.text_block_elements=Uo.block_elements=null,Vo(Yo(e,","),function(e){var t=a.exec(e),n="~"===t[1],r=n?"span":"div",o=t[2];if(m[o]=m[r],h[o]=r,n||(u[o.toUpperCase()]={},u[o]={}),!_[o]){var i=_[r];delete(i=qo({},i)).removeEmptyAttrs,delete i.removeEmpty,_[o]=i}Vo(m,function(e,t){e[r]&&(m[t]=e=qo({},m[t]),e[o]=e[r])})}))},x=function(e){var o=/^([+\-]?)(\w+)\[([^\]]+)\]$/;Uo[i.schema]=null,e&&Vo(Yo(e,","),function(e){var t,n,r=o.exec(e);r&&(n=r[1],t=n?m[r[2]]:m[r[2]]={"#comment":{}},t=m[r[2]],Vo(Yo(r[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})},C=function(e){var t,n=_[e];if(n)return n;for(t=S.length;t--;)if((n=S[t]).pattern.test(e))return n};return i.valid_elements?y(i.valid_elements):(Vo(n,function(e,t){_[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},m[t]=e.children}),"html5"!==i.schema&&Vo(Yo("strong/b em/i"),function(e){e=Yo(e,"/"),_[e[1]].outputName=e[0]}),Vo(Yo("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){_[e]&&(_[e].removeEmpty=!0)}),Vo(Yo("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){_[e].paddEmpty=!0}),Vo(Yo("span"),function(e){_[e].removeEmptyAttrs=!0})),w(i.custom_elements),x(i.valid_children),b(i.extended_valid_elements),x("+ol[ul|ol],+ul[ul|ol]"),Vo({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){_[t]&&(_[t].parentsRequired=Yo(e))}),i.invalid_elements&&Vo($o(i.invalid_elements),function(e){_[e]&&delete _[e]}),C("span")||b("span[!data-mce-type|*]"),{children:m,elements:_,getValidStyles:function(){return e},getValidClasses:function(){return l},getBlockElements:function(){return u},getInvalidStyles:function(){return t},getShortEndedElements:function(){return a},getTextBlockElements:function(){return d},getTextInlineElements:function(){return p},getBoolAttrs:function(){return s},getElementRule:C,getSelfClosingElements:function(){return o},getNonEmptyElements:function(){return c},getMoveCaretBeforeOnEnterElements:function(){return f},getWhiteSpaceElements:function(){return r},getSpecialElements:function(){return g},isValidChild:function(e,t){var n=m[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=C(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return h},addValidElements:b,setValidElements:y,addCustomElements:w,addValidChildren:x}}var Zo=function(e,t,n,r){var o=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+o(t)+o(n)+o(r)};function Qo(y,e){var w,t,u,c,x=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,C=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,_=/\s*([^:]+):\s*([^;]+);?/g,S=/\s+$/,k={},E="\ufeff";for(y=y||{},e&&(u=e.getValidStyles(),c=e.getInvalidStyles()),t=("\\\" \\' \\; \\: ; : "+E).split(" "),w=0;w<t.length;w++)k[t[w]]=E+w,k[E+w]=t[w];return{toHex:function(e){return e.replace(x,Zo)},parse:function(e){var t,n,r,o,i,a,s,l,u={},c=y.url_converter,f=y.url_converter_scope||this,d=function(e,t,n){var r,o,i,a;if((r=u[e+"-top"+t])&&(o=u[e+"-right"+t])&&(i=u[e+"-bottom"+t])&&(a=u[e+"-left"+t])){var s=[r,o,i,a];for(w=s.length-1;w--&&s[w]===s[w+1];);-1<w&&n||(u[e+t]=-1===w?s[0]:s.join(" "),delete u[e+"-top"+t],delete u[e+"-right"+t],delete u[e+"-bottom"+t],delete u[e+"-left"+t])}},p=function(e){var t,n=u[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return u[e]=n[0],!0}},m=function(e){return o=!0,k[e]},h=function(e,t){return o&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return k[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},g=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},v=function(e){return e.replace(/\\[0-9a-f]+/gi,g)},b=function(e,t,n,r,o,i){if(o=o||i)return"'"+(o=h(o)).replace(/\'/g,"\\'")+"'";if(t=h(t||n||r),!y.allow_script_urls){var a=t.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(a))return"";if(!y.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return c&&(t=c.call(f,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')"};if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,m).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,m)});t=_.exec(e);)if(_.lastIndex=t.index+t[0].length,n=t[1].replace(S,"").toLowerCase(),r=t[2].replace(S,""),n&&r){if(n=v(n),r=v(r),-1!==n.indexOf(E)||-1!==n.indexOf('"'))continue;if(!y.allow_script_urls&&("behavior"===n||/expression\s*\(|\/\*|\*\//.test(r)))continue;"font-weight"===n&&"700"===r?r="bold":"color"!==n&&"background-color"!==n||(r=r.toLowerCase()),r=(r=r.replace(x,Zo)).replace(C,b),u[n]=o?h(r,!0):r}d("border","",!0),d("border","-width"),d("border","-color"),d("border","-style"),d("padding",""),d("margin",""),i="border",s="border-style",l="border-color",p(a="border-width")&&p(s)&&p(l)&&(u[i]=u[a]+" "+u[s]+" "+u[l],delete u[a],delete u[s],delete u[l]),"medium none"===u.border&&delete u.border,"none"===u["border-image"]&&delete u["border-image"]}return u},serialize:function(i,e){var t,n,r,o,a,s="",l=function(e){var t,n,r,o;if(t=u[e])for(n=0,r=t.length;n<r;n++)e=t[n],(o=i[e])&&(s+=(0<s.length?" ":"")+e+": "+o+";")};if(e&&u)l("*"),l(e);else for(t in i)!(n=i[t])||c&&(r=t,o=e,a=void 0,(a=c["*"])&&a[r]||(a=c[o])&&a[r])||(s+=(0<s.length?" ":"")+t+": "+n+";");return s}}}var ei,ti=Gt.each,ni=Gt.grep,ri=Oe.ie,oi=/^([a-z0-9],?)+$/i,ii=/^[ \t\r\n]*$/,ai=function(n,r,o){var e={},i=r.keep_values,t={set:function(e,t,n){r.url_converter&&(t=r.url_converter.call(r.url_converter_scope||o(),t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}};return e={style:{set:function(e,t){null===t||"object"!=typeof t?(i&&e.attr("data-mce-style",t),e.attr("style",t)):e.css(t)},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return t=n.serialize(n.parse(t),e[0].nodeName)}}},i&&(e.href=e.src=t),e},si=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r||(r=null),t.attr("data-mce-style",r)},li=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o};function ui(a,s){var l,u=this;void 0===s&&(s={});var r={},i=window,o={},t=0,e=Zr(a),c=[],f=s.schema?s.schema:Jo({}),d=Qo({url_converter:s.url_converter,url_converter_scope:s.url_converter_scope},s.schema),p=s.ownEvents?new Ve(s.proxy):Ve.Event,n=f.getBlockElements(),m=hn.overrideDefaults(function(){return{context:a,element:U.getRoot()}}),h=function(e){if(e&&a&&"string"==typeof e){var t=a.getElementById(e);return t&&t.id!==e?a.getElementsByName(e)[1]:t}return e},g=function(e){return"string"==typeof e&&(e=h(e)),m(e)},v=function(e,t,n){var r,o,i=g(e);return i.length&&(o=(r=l[t])&&r.get?r.get(i,t):i.attr(t)),void 0===o&&(o=n||""),o},b=function(e){var t=h(e);return t?t.attributes:[]},y=function(e,t,n){var r,o;""===n&&(n=null);var i=g(e);r=i.attr(t),i.length&&((o=l[t])&&o.set?o.set(i,n,t):i.attr(t,n),r!==n&&s.onSetAttrib&&s.onSetAttrib({attrElm:i,attrName:t,attrValue:n}))},w=function(){return s.root_element||a.body},x=function(e,t){return zr.getPos(a.body,h(e),t)},C=function(e,t,n){var r=g(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=Oe.ie&&Oe.ie<12?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:void 0)},_=function(e){var t,n;return e=h(e),t=C(e,"width"),n=C(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},S=function(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(oi.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;0<=n;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return 0<Et(t,i[0].ownerDocument||i[0],null,i).length},k=function(e,t,n,r){var o,i=[],a=h(e);for(r=void 0===r,n=n||("BODY"!==w().nodeName?w().parentNode:null),Gt.is(t,"string")&&(t="*"===(o=t)?function(e){return 1===e.nodeType}:function(e){return S(e,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},E=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return S(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null},T=function(e,n,r){var o,t="string"==typeof e?h(e):e;if(!t)return!1;if(Gt.isArray(t)&&(t.length||0===t.length))return o=[],ti(t,function(e,t){e&&("string"==typeof e&&(e=h(e)),o.push(n.call(r,e,t)))}),o;var i=r||u;return n.call(i,t)},N=function(e,t){g(e).each(function(e,n){ti(t,function(e,t){y(n,t,e)})})},R=function(e,n){var t=g(e);ri?t.each(function(e,t){if(!1!==t.canHaveHTML){for(;t.firstChild;)t.removeChild(t.firstChild);try{t.innerHTML="<br>"+n,t.removeChild(t.firstChild)}catch(e){hn("<div></div>").html("<br>"+n).contents().slice(1).appendTo(t)}return n}}):t.html(n)},O=function(e,n,r,o,i){return T(e,function(e){var t="string"==typeof n?a.createElement(n):n;return N(t,r),o&&("string"!=typeof o&&o.nodeType?t.appendChild(o):"string"==typeof o&&R(t,o)),i?t:e.appendChild(t)})},P=function(e,t,n){return O(a.createElement(e),e,t,n,!0)},A=Ho.decode,D=Ho.encodeAllRaw,M=function(e,t){var n=g(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),1<n.length?n.toArray():n[0]},I=function(e,t,n){g(e).toggleClass(t,n).each(function(){""===this.className&&hn(this).attr("class",null)})},L=function(t,e,n){return T(e,function(e){return Gt.is(e,"array")&&(t=t.cloneNode(!0)),n&&ti(ni(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})},B=function(){return a.createRange()},F=function(e,t,n,r){if(Gt.isArray(e)){for(var o=e.length;o--;)e[o]=F(e[o],t,n,r);return e}return!s.collect||e!==a&&e!==i||c.push([e,t,n,r]),p.bind(e,t,n,r||U)},j=function(e,t,n){var r;if(Gt.isArray(e)){for(r=e.length;r--;)e[r]=j(e[r],t,n);return e}if(c&&(e===a||e===i))for(r=c.length;r--;){var o=c[r];e!==o[0]||t&&t!==o[1]||n&&n!==o[2]||p.unbind(o[0],o[1],o[2])}return p.unbind(e,t,n)},H=function(e){if(e&&Eo.isElement(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},U={doc:a,settings:s,win:i,files:o,stdMode:!0,boxModel:!0,styleSheetLoader:e,boundEvents:c,styles:d,schema:f,events:p,isBlock:function(e){if("string"==typeof e)return!!n[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!n[e.nodeName])}return!1},$:m,$$:g,root:null,clone:function(t,e){if(!ri||1!==t.nodeType||e)return t.cloneNode(e);if(e)return null;var n=a.createElement(t.nodeName);return ti(b(t),function(e){y(n,e.nodeName,v(t,e.nodeName))}),n},getRoot:w,getViewPort:function(e){var t=e||i,n=t.document,r=n.documentElement;return{x:t.pageXOffset||r.scrollLeft,y:t.pageYOffset||r.scrollTop,w:t.innerWidth||r.clientWidth,h:t.innerHeight||r.clientHeight}},getRect:function(e){var t,n;return e=h(e),t=x(e),n=_(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:_,getParent:function(e,t,n){var r=k(e,t,n,!1);return r&&0<r.length?r[0]:null},getParents:k,get:h,getNext:function(e,t){return E(e,t,"nextSibling")},getPrev:function(e,t){return E(e,t,"previousSibling")},select:function(e,t){return Et(e,h(t)||s.root_element||a,[])},is:S,add:O,create:P,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&void 0!==t[r]&&(o+=" "+r+'="'+D(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(e){var t,n=a.createElement("div"),r=a.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r},remove:M,setStyle:function(e,t,n){var r=g(e).css(t,n);s.update_styles&&si(d,r)},getStyle:C,setStyles:function(e,t){var n=g(e).css(t);s.update_styles&&si(d,n)},removeAllAttribs:function(e){return T(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:y,setAttribs:N,getAttrib:v,getPos:x,parseStyle:function(e){return d.parse(e)},serializeStyle:function(e,t){return d.serialize(e,t)},addStyle:function(e){var t,n;if(U!==ui.DOM&&a===document){if(r[e])return;r[e]=!0}(n=a.getElementById("mceDefaultStyles"))||((n=a.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=a.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(a.createTextNode(e))},loadCSS:function(e){var n;U===ui.DOM||a!==document?(e||(e=""),n=a.getElementsByTagName("head")[0],ti(e.split(","),function(e){var t;e=Gt._addCacheSuffix(e),o[e]||(o[e]=!0,t=P("link",{rel:"stylesheet",href:e}),n.appendChild(t))})):ui.DOM.loadCSS(e)},addClass:function(e,t){g(e).addClass(t)},removeClass:function(e,t){I(e,t,!1)},hasClass:function(e,t){return g(e).hasClass(t)},toggleClass:I,show:function(e){g(e).show()},hide:function(e){g(e).hide()},isHidden:function(e){return"none"===g(e).css("display")},uniqueId:function(e){return(e||"mce_")+t++},setHTML:R,getOuterHTML:function(e){var t="string"==typeof e?h(e):e;return Eo.isElement(t)?t.outerHTML:hn("<div></div>").append(hn(t).clone()).html()},setOuterHTML:function(e,t){g(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}M(hn(this).html(t),!0)})},decode:A,encode:D,insertAfter:function(e,t){var r=h(t);return T(e,function(e){var t,n;return t=r.parentNode,(n=r.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:L,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=P(e),ti(b(t),function(e){y(n,e.nodeName,v(t,e.nodeName))}),L(n,t,!0)),n||t},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return d.toHex(Gt.trim(e))},run:T,getAttribs:b,isEmpty:function(e,t){var n,r,o,i,a,s,l=0;if(e=e.firstChild){a=new Qr(e,e.parentNode),t=t||(f?f.getNonEmptyElements():null),i=f?f.getWhiteSpaceElements():{};do{if(o=e.nodeType,Eo.isElement(e)){var u=e.getAttribute("data-mce-bogus");if(u){e=a.next("all"===u);continue}if(s=e.nodeName.toLowerCase(),t&&t[s]){if("br"!==s)return!1;l++,e=a.next();continue}for(n=(r=b(e)).length;n--;)if("name"===(s=r[n].nodeName)||"data-mce-bookmark"===s)return!1}if(8===o)return!1;if(3===o&&!ii.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&i[e.parentNode.nodeName]&&ii.test(e.nodeValue))return!1;e=a.next()}while(e)}return l<=1},createRng:B,nodeIndex:li,split:function(e,t,n){var r,o,i,a=B();if(e&&t)return a.setStart(e.parentNode,li(e)),a.setEnd(t.parentNode,li(t)),r=a.extractContents(),(a=B()).setStart(t.parentNode,li(t)+1),a.setEnd(e.parentNode,li(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(Ro.trimNode(U,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Ro.trimNode(U,o),e),M(e),n||t},bind:F,unbind:j,fire:function(e,t,n){return p.fire(e,t,n)},getContentEditable:H,getContentEditableParent:function(e){for(var t=w(),n=null;e&&e!==t&&null===(n=H(e));e=e.parentNode);return n},destroy:function(){if(c)for(var e=c.length;e--;){var t=c[e];p.unbind(t[0],t[1],t[2])}Et.setDocument&&Et.setDocument()},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}};return l=ai(d,s,function(){return U}),U}(ei=ui||(ui={})).DOM=ei(document),ei.nodeIndex=li;var ci=ui,fi=ci.DOM,di=Gt.each,pi=Gt.grep,mi=function(e){return"function"==typeof e},hi=function(){var c={},o=[],i={},a=[],f=0;this.isDone=function(e){return 2===c[e]},this.markDone=function(e){c[e]=2},this.add=this.load=function(e,t,n,r){void 0===c[e]&&(o.push(e),c[e]=0),t&&(i[e]||(i[e]=[]),i[e].push({success:t,failure:r,scope:n||this}))},this.remove=function(e){delete c[e],delete i[e]},this.loadQueue=function(e,t,n){this.loadScripts(o,e,t,n)},this.loadScripts=function(n,e,t,r){var s,l=[],u=function(t,e){di(i[e],function(e){mi(e[t])&&e[t].call(e.scope)}),i[e]=void 0};a.push({success:e,failure:r,scope:t||this}),(s=function(){var e=pi(n);if(n.length=0,di(e,function(e){var t,n,r,o,i,a;2!==c[e]?3!==c[e]?1!==c[e]&&(c[e]=1,f++,t=e,n=function(){c[e]=2,f--,u("success",e),s()},r=function(){c[e]=3,f--,l.push(e),u("failure",e),s()},i=(a=fi).uniqueId(),(o=document.createElement("script")).id=i,o.type="text/javascript",o.src=Gt._addCacheSuffix(t),o.onload=function(){a.remove(i),o&&(o.onreadystatechange=o.onload=o=null),n()},o.onerror=function(){mi(r)?r():"undefined"!=typeof console&&console.log},(document.getElementsByTagName("head")[0]||document.body).appendChild(o)):u("failure",e):u("success",e)}),!f){var t=a.slice(0);a.length=0,di(t,function(e){0===l.length?mi(e.success)&&e.success.call(e.scope):mi(e.failure)&&e.failure.call(e.scope,l)})}})()}};hi.ScriptLoader=new hi;var gi,vi=Gt.each;function bi(){var r=this,o=[],a={},s={},i=[],l=function(e){var t;return s[e]&&(t=s[e].dependencies),t||[]},u=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},c=function(e,n,t,r){var o=l(e);vi(o,function(e){var t=u(n,e);f(t.resource,t,void 0,void 0)}),t&&(r?t.call(r):t.call(hi))},f=function(e,t,n,r,o){if(!a[e]){var i="string"==typeof t?t:t.prefix+t.resource+t.suffix;0!==i.indexOf("/")&&-1===i.indexOf("://")&&(i=bi.baseURL+"/"+i),a[e]=i.substring(0,i.lastIndexOf("/")),s[e]?c(e,t,n,r):hi.ScriptLoader.add(i,function(){return c(e,t,n,r)},r,o)}};return{items:o,urls:a,lookup:s,_listeners:i,get:function(e){if(s[e])return s[e].instance},dependencies:l,requireLangPack:function(e,t){var n=bi.language;if(n&&!1!==bi.languageLoad){if(t)if(-1!==(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1===t.indexOf(","+n+","))return;hi.ScriptLoader.add(a[e]+"/langs/"+n+".js")}},add:function(t,e,n){o.push(e),s[t]={instance:e,dependencies:n};var r=W(i,function(e){return e.name===t});return i=r.fail,vi(r.pass,function(e){e.callback()}),e},remove:function(e){delete a[e],delete s[e]},createUrl:u,addComponents:function(e,t){var n=r.urls[e];vi(t,function(e){hi.ScriptLoader.add(n+"/"+e)})},load:f,waitFor:function(e,t){s.hasOwnProperty(e)?t():i.push({name:e,callback:t})}}}(gi=bi||(bi={})).PluginManager=gi(),gi.ThemeManager=gi();var yi=function(t,n){jr.parent(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},wi=function(e,t){e.dom().appendChild(t.dom())},xi={before:yi,after:function(e,t){jr.nextSibling(e).fold(function(){jr.parent(e).each(function(e){wi(e,t)})},function(e){yi(e,t)})},prepend:function(t,n){jr.firstChild(t).fold(function(){wi(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})},append:wi,appendAt:function(e,t,n){jr.child(e,n).fold(function(){wi(e,t)},function(e){yi(e,t)})},wrap:function(e,t){yi(e,t),wi(t,e)}},Ci=function(t,e){z(e,function(e){xi.before(t,e)})},_i=function(t,e){z(e,function(e){xi.append(t,e)})},Si=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},ki={empty:function(e){e.dom().textContent="",z(jr.children(e),function(e){Si(e)})},remove:Si,unwrap:function(e){var t=jr.children(e);0<t.length&&Ci(e,t),Si(e)}},Ei=function(n,r){var o=null;return{cancel:function(){null!==o&&(clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null===o&&(o=setTimeout(function(){n.apply(null,e),o=null},r))}}},Ti=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return Ti(n())}}},Ni=function(e,t){var n=cr.get(e,t);return void 0===n||""===n?[]:n.split(" ")},Ri=Ni,Oi=function(e,t,n){var r=Ni(e,t).concat([n]);return cr.set(e,t,r.join(" ")),!0},Pi=function(e,t,n){var r=V(Ni(e,t),function(e){return e!==n});return 0<r.length?cr.set(e,t,r.join(" ")):cr.remove(e,t),!1},Ai=function(e){return Ri(e,"class")},Di=function(e,t){return Oi(e,"class",t)},Mi=function(e,t){return Pi(e,"class",t)},Ii=Ai,Li=Di,Bi=Mi,Fi=function(e,t){return j(Ai(e),t)?Mi(e,t):Di(e,t)},ji=function(e){return void 0!==e.dom().classList},Hi=function(e,t){return ji(e)&&e.dom().classList.contains(t)},Ui={add:function(e,t){ji(e)?e.dom().classList.add(t):Li(e,t)},remove:function(e,t){var n;ji(e)?e.dom().classList.remove(t):Bi(e,t),0===(ji(n=e)?n.dom().classList:Ii(n)).length&&cr.remove(n,"class")},toggle:function(e,t){return ji(e)?e.dom().classList.toggle(t):Fi(e,t)},toggler:function(e,t){var n,r,o,i,a,s,l=ji(e),u=e.dom().classList;return n=function(){l?u.remove(t):Bi(e,t)},r=function(){l?u.add(t):Li(e,t)},o=Hi(e,t),i=o||!1,{on:a=function(){r(),i=!0},off:s=function(){n(),i=!1},toggle:function(){(i?s:a)()},isOn:function(){return i}}},has:Hi},zi=function(e,t){return Rr.all(t,e)};function Wi(e,t,n,r,o){return e(n,r)?R.some(n):L(o)&&o(n)?R.none():t(n,r,o)}var Vi,qi=function(e,t,n){for(var r=e.dom(),o=L(n)?n:y(!1);r.parentNode;){r=r.parentNode;var i=Yn.fromDom(r);if(t(i))return R.some(i);if(o(i))break}return R.none()},$i=function(e,t){return $(e.dom().childNodes,b(t,Yn.fromDom)).map(Yn.fromDom)},Xi=function(e,r){var o=function(e){for(var t=0;t<e.childNodes.length;t++){if(r(Yn.fromDom(e.childNodes[t])))return R.some(Yn.fromDom(e.childNodes[t]));var n=o(e.childNodes[t]);if(n.isSome())return n}return R.none()};return o(e.dom())},Yi={first:function(e){return Xi(pr.body(),e)},ancestor:qi,closest:function(e,t,n){return Wi(function(e){return t(e)},qi,e,t,n)},sibling:function(t,n){var e=t.dom();return e.parentNode?$i(Yn.fromDom(e.parentNode),function(e){return!Ar.eq(t,e)&&n(e)}):R.none()},child:$i,descendant:Xi},Gi=function(e,t,n){return Yi.ancestor(e,function(e){return Rr.is(e,t)},n)},Ki=Gi,Ji=function(e,t){return Rr.one(t,e)},Zi=function(e,t,n){return Wi(Rr.is,Gi,e,t,n)},Qi=y("mce-annotation"),ea=y("data-mce-annotation"),ta=y("data-mce-annotation-uid"),na=function(r,e){var t=r.selection.getRng(),n=Yn.fromDom(t.startContainer),o=Yn.fromDom(r.getBody()),i=e.fold(function(){return"."+Qi()},function(e){return"["+ea()+'="'+e+'"]'}),a=jr.child(n,t.startOffset).getOr(n),s=Zi(a,i,function(e){return Ar.eq(e,o)}),l=function(e,t){return cr.has(e,t)?R.some(cr.get(e,t)):R.none()};return s.bind(function(e){return l(e,""+ta()).bind(function(n){return l(e,""+ea()).map(function(e){var t=ra(r,n);return{uid:n,name:e,elements:t}})})})},ra=function(e,t){var n=Yn.fromDom(e.getBody());return zi(n,"["+ta()+'="'+t+'"]')},oa=function(i,e){var n,r,o,a=Ti({}),u=function(e,t){s(e,function(e){return t(e),e})},s=function(e,t){var n=a.get(),r=t(n.hasOwnProperty(e)?n[e]:{listeners:[],previous:Ti(R.none())});n[e]=r,a.set(n)},t=(n=function(){var e,t,n,r=a.get(),o=(e=rr(r),(n=Z.call(e,0)).sort(t),n);z(o,function(e){s(e,function(s){var l=s.previous.get();return na(i,R.some(e)).fold(function(){var t;l.isSome()&&(u(t=e,function(e){z(e.listeners,function(e){return e(!1,t)})}),s.previous.set(R.none()))},function(e){var t,n,r,o=e.uid,i=e.name,a=e.elements;l.is(o)||(n=o,r=a,u(t=i,function(e){z(e.listeners,function(e){return e(!0,t,{uid:n,nodes:U(r,function(e){return e.dom()})})})}),s.previous.set(R.some(o)))}),{previous:s.previous,listeners:s.listeners}})})},r=30,o=null,{cancel:function(){null!==o&&(clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==o&&clearTimeout(o),o=setTimeout(function(){n.apply(null,e),o=null},r)}});return i.on("remove",function(){t.cancel()}),i.on("nodeChange",function(){t.throttle()}),{addListener:function(e,t){s(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}},ia=function(e,n){e.on("init",function(){e.serializer.addNodeFilter("span",function(e){z(e,function(t){var e;(e=t,R.from(e.attributes.map[ea()]).bind(n.lookup)).each(function(e){!1===e.persistent&&t.unwrap()})})})})},aa=0,sa=function(t,e){z(e,function(e){Ui.add(t,e)})},la=function(e,t){return Yn.fromDom(e.dom().cloneNode(t))},ua=function(e){return la(e,!0)},ca=function(e){return la(e,!1)},fa=ua,da=function(e,t){var n=(t||document).createElement("div");return n.innerHTML=e,jr.children(Yn.fromDom(n))},pa=function(e){return e.dom().innerHTML},ma=pa,ha=function(e,t){var n=jr.owner(e).dom(),r=Yn.fromDom(n.createDocumentFragment()),o=da(t,n);_i(r,o),ki.empty(e),xi.append(e,r)},ga=[].slice,va=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=ga.call(arguments);return r.length-1>=e.length?e.apply(this,r.slice(1)):function(){var e=r.concat([].slice.call(arguments));return va.apply(this,e)}},ba={constant:function(e){return function(){return e}},negate:function(t){return function(e){return!t(e)}},and:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ga.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},or:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ga.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}},curry:va,compose:function(t,n){return function(e){return t(n(e))}},noop:function(){}},ya="\ufeff",wa=function(e){return e===ya},xa=ya,Ca=function(e){return e.replace(new RegExp(ya,"g"),"")},_a=Eo.isElement,Sa=Eo.isText,ka=function(e){return Sa(e)&&(e=e.parentNode),_a(e)&&e.hasAttribute("data-mce-caret")},Ea=function(e){return Sa(e)&&wa(e.data)},Ta=function(e){return ka(e)||Ea(e)},Na=function(e){return e.firstChild!==e.lastChild||!Eo.isBr(e.firstChild)},Ra=function(e){var t=e.container();return e&&Eo.isText(t)&&t.data.charAt(e.offset())===xa},Oa=function(e){var t=e.container();return e&&Eo.isText(t)&&t.data.charAt(e.offset()-1)===xa},Pa=function(e,t,n){var r,o,i;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(((i=document.createElement("br")).setAttribute("data-mce-bogus","1"),i)),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r},Aa=function(e){return Sa(e)&&e.data[0]===xa},Da=function(e){return Sa(e)&&e.data[e.data.length-1]===xa},Ma=function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],Eo.isBogus(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},Ia=Eo.isContentEditableTrue,La=Eo.isContentEditableFalse,Ba=Eo.isBr,Fa=Eo.isText,ja=Eo.matchNodeNames("script style textarea"),Ha=Eo.matchNodeNames("img input textarea hr iframe video audio object"),Ua=Eo.matchNodeNames("table"),za=Ta,Wa=function(e){return!za(e)&&(Fa(e)?!ja(e.parentNode):Ha(e)||Ba(e)||Ua(e)||Va(e))},Va=function(e){return!1===(t=e,Eo.isElement(t)&&"true"===t.getAttribute("unselectable"))&&La(e);var t},qa=function(e){return Ha(e)||!!Va(t=e)&&!0!==Vt.reduce(t.getElementsByTagName("*"),function(e,t){return e||Ia(t)},!1);var t},$a=function(e,t){return Wa(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(Va(e))return!1;if(Ia(e))return!0}return!0}(e,t)},Xa=Math.round,Ya=function(e){return e?{left:Xa(e.left),top:Xa(e.top),bottom:Xa(e.bottom),right:Xa(e.right),width:Xa(e.width),height:Xa(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Ga=function(e,t){return e=Ya(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e},Ka=function(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2},Ja=function(e,t){return e.bottom-e.height/2<t.top||!(e.top>t.bottom)&&Ka(t.top-e.bottom,e,t)},Za=function(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&Ka(t.bottom-e.top,e,t)},Qa=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},es=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},ts=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯ﾞ-ﾟ]"),ns=function(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&ts.test(e)},rs=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];if(!o.isSome())return R.none();n.push(o.getOrDie())}return R.some(t.apply(null,n))},os=Eo.isElement,is=Wa,as=Eo.matchStyleValues("display","block table"),ss=Eo.matchStyleValues("float","left right"),ls=ba.and(os,is,ba.negate(ss)),us=ba.negate(Eo.matchStyleValues("white-space","pre pre-line pre-wrap")),cs=Eo.isText,fs=Eo.isBr,ds=ci.nodeIndex,ps=es,ms=function(e){return"createRange"in e?e.createRange():ci.DOM.createRng()},hs=function(e){return e&&/[\r\n\t ]/.test(e)},gs=function(e){return!!e.setStart&&!!e.setEnd},vs=function(e){var t,n=e.startContainer,r=e.startOffset;return!!(hs(e.toString())&&us(n.parentNode)&&Eo.isText(n)&&(t=n.data,hs(t[r-1])||hs(t[r+1])))},bs=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},ys=function(e){var t,n,r,o,i,a,s,l;return t=0<(n=e.getClientRects()).length?Ya(n[0]):Ya(e.getBoundingClientRect()),!gs(e)&&fs(e)&&bs(t)?(i=(r=e).ownerDocument,a=ms(i),s=i.createTextNode(" "),(l=r.parentNode).insertBefore(s,r),a.setStart(s,0),a.setEnd(s,1),o=Ya(a.getBoundingClientRect()),l.removeChild(s),o):bs(t)&&gs(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&Eo.isText(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),ys(i)}return null}(e):t},ws=function(e,t){var n=Ga(e,t);return n.width=1,n.right=n.left+1,n},xs=function(e){var t,n,r=[],o=function(e){var t,n;0!==e.height&&(0<r.length&&(t=e,n=r[r.length-1],t.left===n.left&&t.top===n.top&&t.bottom===n.bottom&&t.right===n.right)||r.push(e))},i=function(e,t){var n=ms(e.ownerDocument);if(t<e.data.length){if(ns(e.data[t]))return r;if(ns(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!vs(n)))return o(ws(ys(n),!1)),r}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),vs(n)||o(ws(ys(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),vs(n)||o(ws(ys(n),!0)))};if(cs(e.container()))return i(e.container(),e.offset()),r;if(os(e.container()))if(e.isAtEnd())n=ps(e.container(),e.offset()),cs(n)&&i(n,n.data.length),ls(n)&&!fs(n)&&o(ws(ys(n),!1));else{if(n=ps(e.container(),e.offset()),cs(n)&&i(n,0),ls(n)&&e.isAtEnd())return o(ws(ys(n),!1)),r;t=ps(e.container(),e.offset()-1),ls(t)&&!fs(t)&&(as(t)||as(n)||!ls(n))&&o(ws(ys(t),!1)),ls(n)&&o(ws(ys(n),!0))}return r};function Cs(t,n,e){var r=function(){return e||(e=xs(Cs(t,n))),e};return{container:ba.constant(t),offset:ba.constant(n),toRange:function(){var e;return(e=ms(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return cs(t),0===n},isAtEnd:function(){return cs(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return ps(t,e?n-1:n)}}}(Vi=Cs||(Cs={})).fromRangeStart=function(e){return Vi(e.startContainer,e.startOffset)},Vi.fromRangeEnd=function(e){return Vi(e.endContainer,e.endOffset)},Vi.after=function(e){return Vi(e.parentNode,ds(e)+1)},Vi.before=function(e){return Vi(e.parentNode,ds(e))},Vi.isAbove=function(e,t){return rs([ee(t.getClientRects()),te(e.getClientRects())],Ja).getOr(!1)},Vi.isBelow=function(e,t){return rs([te(t.getClientRects()),ee(e.getClientRects())],Za).getOr(!1)},Vi.isAtStart=function(e){return!!e&&e.isAtStart()},Vi.isAtEnd=function(e){return!!e&&e.isAtEnd()},Vi.isTextPosition=function(e){return!!e&&Eo.isText(e.container())},Vi.isElementPosition=function(e){return!1===Vi.isTextPosition(e)};var _s,Ss,ks=Cs,Es=Eo.isText,Ts=Eo.isBogus,Ns=ci.nodeIndex,Rs=function(e){var t=e.parentNode;return Ts(t)?Rs(t):t},Os=function(e){return e?Vt.reduce(e.childNodes,function(e,t){return Ts(t)&&"BR"!==t.nodeName?e=e.concat(Os(t)):e.push(t),e},[]):[]},Ps=function(t){return function(e){return t===e}},As=function(e){var t,r,n,o;return(Es(e)?"text()":e.nodeName.toLowerCase())+"["+(r=Os(Rs(t=e)),n=Vt.findIndex(r,Ps(t),t),r=r.slice(0,n+1),o=Vt.reduce(r,function(e,t,n){return Es(t)&&Es(r[n-1])&&e++,e},0),r=Vt.filter(r,Eo.matchNodeNames(t.nodeName)),(n=Vt.findIndex(r,Ps(t),t))-o)+"]"},Ds=function(e,t){var n,r,o,i,a,s=[];return n=t.container(),r=t.offset(),Es(n)?o=function(e,t){for(;(e=e.previousSibling)&&Es(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),s.push(As(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;!(t===e||n&&n(t));t=t.parentNode)r.push(t);return r}(e,n),a=Vt.filter(a,ba.negate(Eo.isBogus)),(s=s.concat(Vt.map(a,function(e){return As(e)}))).reverse().join("/")+","+o},Ms=function(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=1<n.length?n[1]:"before",(r=Vt.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),n=e,r=t[1],o=parseInt(t[2],10),i=Os(n),i=Vt.filter(i,function(e,t){return!Es(e)||!Es(i[t-1])}),(i=Vt.filter(i,Eo.matchNodeNames(r)))[o]):null;var n,r,o,i},e))?Es(r)?function(e,t){for(var n,r=e,o=0;Es(r);){if(n=r.data.length,o<=t&&t<=o+n){e=r,t-=o;break}if(!Es(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return Es(e)&&t>e.data.length&&(t=e.data.length),ks(e,t)}(r,parseInt(o,10)):(o="after"===o?Ns(r)+1:Ns(r),ks(r.parentNode,o)):null):null},Is=Eo.isContentEditableFalse,Ls=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],s=r[o?"startOffset":"endOffset"],l=[],u=0,c=e.getRoot();for(Eo.isText(a)?l.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Eo.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,s):s):(s>=(i=a.childNodes).length&&i.length&&(u=1,s=Math.max(0,i.length-1)),l.push(e.nodeIndex(i[s],n)+u));a&&a!==c;a=a.parentNode)l.push(e.nodeIndex(a,n));return l},Bs=function(e){Eo.isText(e)&&0===e.data.length&&e.parentNode.removeChild(e)},Fs=function(e,t,n){var r=0;return Gt.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r},js=function(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],Eo.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))},Hs=function(e){return js(e,!0),js(e,!1),e},Us=function(e,t){var n;if(Eo.isElement(e)&&(e=es(e,t),Is(e)))return e;if(Ta(e)){if(Eo.isText(e)&&ka(e)&&(e=e.parentNode),n=e.previousSibling,Is(n))return n;if(n=e.nextSibling,Is(n))return n}},zs=function(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Is(r)||"IMG"===o)return{name:o,index:Fs(n.dom,o,r)};var a,s,l,u,c,f,d,p=Us((a=i).startContainer,a.startOffset)||Us(a.endContainer,a.endOffset);return p?{name:o=p.tagName,index:Fs(n.dom,o,p)}:(s=e,u=t,c=i,f=(l=n).dom,(d={}).start=Ls(f,s,u,c,!0),l.isCollapsed()||(d.end=Ls(f,s,u,c,!1)),d)},Ws=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},Vs=function(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),s=a.nodeName;if("IMG"===s)return{name:s,index:Fs(n,s,a)};var l=Hs(r.cloneRange());if(!i){l.collapse(!1);var u=Ws(n,o+"_end",t);l.insertNode(u),Bs(u.nextSibling)}(r=Hs(r)).collapse(!0);var c=Ws(n,o+"_start",t);return r.insertNode(c),Bs(c.previousSibling),Bs(c.nextSibling),e.moveToBookmark({id:o,keep:1}),{id:o}},qs={getBookmark:function(e,t,n){return 2===t?zs(Ca,n,e):3===t?(o=(r=e).getRng(),{start:Ds(r.dom.getRoot(),ks.fromRangeStart(o)),end:Ds(r.dom.getRoot(),ks.fromRangeEnd(o))}):t?{rng:e.getRng()}:Vs(e,!1);var r,o},getUndoBookmark:x(zs,w,!0),getPersistentBookmark:Vs},$s="_mce_caret",Xs=function(e){return Eo.isElement(e)&&e.id===$s},Ys=function(e,t){for(;t&&t!==e;){if(t.id===$s)return t;t=t.parentNode}return null},Gs=Eo.isElement,Ks=Eo.isText,Js=function(e){var t=e.parentNode;t&&t.removeChild(e)},Zs=function(e,t){0===t.length?Js(e):e.nodeValue=t},Qs=function(e){var t=Ca(e);return{count:e.length-t.length,text:t}},el=function(e,t){return rl(e),t},tl=function(e,t){var n,r,o,i=t.container(),a=(n=ne(i.childNodes),r=e,o=F(n,r),-1===o?R.none():R.some(o)).map(function(e){return e<t.offset()?ks(i,t.offset()-1):t}).getOr(t);return rl(e),a},nl=function(e,t){return Ks(e)&&t.container()===e?(r=t,o=Qs((n=e).data.substr(0,r.offset())),i=Qs(n.data.substr(r.offset())),0<(a=o.text+i.text).length?(Zs(n,a),ks(n,r.offset()-o.count)):r):el(e,t);var n,r,o,i,a},rl=function(e){if(Gs(e)&&Ta(e)&&(Na(e)?e.removeAttribute("data-mce-caret"):Js(e)),Ks(e)){var t=Ca(function(e){try{return e.nodeValue}catch(e){return""}}(e));Zs(e,t)}},ol={removeAndReposition:function(e,t){return ks.isTextPosition(t)?nl(e,t):(n=e,(r=t).container()===n.parentNode?tl(n,r):el(n,r));var n,r},remove:rl},il=Eo.isContentEditableTrue,al=Eo.isContentEditableFalse,sl=function(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)},ll=function(e,t){var n,r;return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:((r=(n=t).ownerDocument.createRange()).selectNode(n),r)},ul=function(e,t,n){var r=Ku(1,e.getBody(),t),o=ks.fromRangeStart(r),i=o.getNode();if(al(i))return sl(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(al(a))return sl(1,e,a,!1,!1);var s=e.dom.getParent(o.getNode(),function(e){return al(e)||il(e)});return al(s)?sl(1,e,s,!1,n):null},cl=function(e,t,n){if(!t||!t.collapsed)return t;var r=ul(e,t,n);return r||t};(Ss=_s||(_s={}))[Ss.Backwards=-1]="Backwards",Ss[Ss.Forwards=1]="Forwards";var fl,dl,pl=Eo.isContentEditableFalse,ml=Eo.isText,hl=Eo.isElement,gl=Eo.isBr,vl=Wa,bl=qa,yl=$a,wl=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},xl=function(e,t){if(ju(e)){if(vl(t.previousSibling)&&!ml(t.previousSibling))return ks.before(t);if(ml(t))return ks(t,0)}if(Hu(e)){if(vl(t.nextSibling)&&!ml(t.nextSibling))return ks.after(t);if(ml(t))return ks(t,t.data.length)}return Hu(e)?gl(t)?ks.before(t):ks.after(t):ks.before(t)},Cl=function(e,t,n){var r,o,i,a,s;if(!hl(n)||!t)return null;if(t.isEqual(ks.after(n))&&n.lastChild){if(s=ks.after(n.lastChild),Hu(e)&&vl(n.lastChild)&&hl(n.lastChild))return gl(n.lastChild)?ks.before(n.lastChild):s}else s=t;var l,u,c,f=s.container(),d=s.offset();if(ml(f)){if(Hu(e)&&0<d)return ks(f,--d);if(ju(e)&&d<f.length)return ks(f,++d);r=f}else{if(Hu(e)&&0<d&&(o=wl(f,d-1),vl(o)))return!bl(o)&&(i=zu(o,e,yl,o))?ml(i)?ks(i,i.data.length):ks.after(i):ml(o)?ks(o,o.data.length):ks.before(o);if(ju(e)&&d<f.childNodes.length&&(o=wl(f,d),vl(o)))return gl(o)&&n.lastChild===o?null:(l=o,u=n,Eo.isBr(l)&&!qa(l.nextSibling)&&(c=Cl(_s.Forwards,ks.after(l),u))&&!Vu(ks.before(l),ks.before(c),u)?Cl(e,ks.after(o),n):!bl(o)&&(i=zu(o,e,yl,o))?ml(i)?ks(i,0):ks.before(i):ml(o)?ks(o,0):ks.after(o));r=o||s.getNode()}return(ju(e)&&s.isAtEnd()||Hu(e)&&s.isAtStart())&&(r=zu(r,e,ba.constant(!0),n,!0),yl(r,n))?xl(e,r):(o=zu(r,e,yl,n),!(a=Vt.last(Vt.filter(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(f,n),pl)))||o&&a.contains(o)?o?xl(e,o):null:s=ju(e)?ks.after(a):ks.before(a))},_l=function(t){return{next:function(e){return Cl(_s.Forwards,e,t)},prev:function(e){return Cl(_s.Backwards,e,t)}}};(dl=fl||(fl={}))[dl.Br=0]="Br",dl[dl.Block=1]="Block",dl[dl.Wrap=2]="Wrap",dl[dl.Eol=3]="Eol";var Sl,kl,El,Tl,Nl,Rl=function(e,t){return e===_s.Backwards?t.reverse():t},Ol=function(e,t,n,r){for(var o,i,a,s,l,u,c=_l(n),f=r,d=[];f&&(l=c,u=f,o=t===_s.Forwards?l.next(u):l.prev(u));){if(Eo.isBr(o.getNode(!1)))return t===_s.Forwards?{positions:Rl(t,d).concat([o]),breakType:fl.Br,breakAt:R.some(o)}:{positions:Rl(t,d),breakType:fl.Br,breakAt:R.some(o)};if(o.isVisible()){if(e(f,o)){var p=(i=t,a=f,s=o,Eo.isBr(s.getNode(i===_s.Forwards))?fl.Br:!1===Vu(a,s)?fl.Block:fl.Wrap);return{positions:Rl(t,d),breakType:p,breakAt:R.some(o)}}d.push(o),f=o}else f=o}return{positions:Rl(t,d),breakType:fl.Eol,breakAt:R.none()}},Pl=function(n,r,o,e){return r(o,e).breakAt.map(function(e){var t=r(o,e).positions;return n===_s.Backwards?t.concat(e):[e].concat(t)}).getOr([])},Al=function(e,i){return q(e,function(e,o){return e.fold(function(){return R.some(o)},function(r){return rs([ee(r.getClientRects()),ee(o.getClientRects())],function(e,t){var n=Math.abs(i-e.left);return Math.abs(i-t.left)<=n?o:r}).or(e)})},R.none())},Dl=function(t,e){return ee(e.getClientRects()).bind(function(e){return Al(t,e.left)})},Ml=x(Ol,Cs.isAbove,-1),Il=x(Ol,Cs.isBelow,1),Ll=x(Pl,-1,Ml),Bl=x(Pl,1,Il),Fl=function(e,t,n,r,o){var i,a,s,l,u=zi(Yn.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),c=V((i=e,K(u,function(e){var t,n,r=(t=Ya(e.getBoundingClientRect()),n=-1,{left:t.left-n,top:t.top-n,right:t.right+2*n,bottom:t.bottom+2*n,width:t.width+n,height:t.height+n});return[{x:r.left,y:i(r),cell:e},{x:r.right,y:i(r),cell:e}]})),function(e){return t(e,o)});return(a=c,s=r,l=o,q(a,function(e,r){return e.fold(function(){return R.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-s)+Math.abs(e.y-l)),n=Math.sqrt(Math.abs(r.x-s)+Math.abs(r.y-l));return R.some(n<t?r:e)})},R.none())).map(function(e){return e.cell})},jl=x(Fl,function(e){return e.bottom},function(e,t){return e.y<t}),Hl=x(Fl,function(e){return e.top},function(e,t){return e.y>t}),Ul=function(t,n){return ee(n.getClientRects()).bind(function(e){return jl(t,e.left,e.top)}).bind(function(e){return Dl((t=e,fc.lastPositionIn(t).map(function(e){return Ml(t,e).positions.concat(e)}).getOr([])),n);var t})},zl=function(t,n){return te(n.getClientRects()).bind(function(e){return Hl(t,e.left,e.top)}).bind(function(e){return Dl((t=e,fc.firstPositionIn(t).map(function(e){return[e].concat(Il(t,e).positions)}).getOr([])),n);var t})},Wl=function(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}},Vl=function(e,t,n){var r,o,i,a,s,l=e.dom,u=l.getRoot(),c=0;if(s={elm:t,alignToTop:n},e.fire("scrollIntoView",s),!s.isDefaultPrevented()&&Eo.isElement(t)){if(!1===n&&(c=t.offsetHeight),"BODY"!==u.nodeName){var f=e.selection.getScrollContainer();if(f)return r=Wl(t).y-Wl(f).y+c,a=f.clientHeight,void((r<(i=f.scrollTop)||i+a<r+25)&&(f.scrollTop=r<i?r:r-a+25))}o=l.getViewPort(e.getWin()),r=l.getPos(t).y+c,i=o.y,a=o.h,(r<o.y||i+a<r+25)&&e.getWin().scrollTo(0,r<i?r:r-a+25)}},ql=function(d,e){ee(Cs.fromRangeStart(e).getClientRects()).each(function(e){var t,n,r,o,i,a,s,l,u,c=function(e){if(e.inline)return e.getBody().getBoundingClientRect();var t=e.getWin();return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight,width:t.innerWidth,height:t.innerHeight}}(d),f={x:(i=t=c,a=n=e,a.left>i.left&&a.right<i.right?0:a.left<i.left?a.left-i.left:a.right-i.right),y:(r=t,o=n,o.top>r.top&&o.bottom<r.bottom?0:o.top<r.top?o.top-r.top:o.bottom-r.bottom)};l=0!==f.x?0<f.x?f.x+4:f.x-4:0,u=0!==f.y?0<f.y?f.y+4:f.y-4:0,(s=d).inline?(s.getBody().scrollLeft+=l,s.getBody().scrollTop+=u):s.getWin().scrollBy(l,u)})},$l=function(e,t,n){var r=e.getParam(t,n);if(-1===r.indexOf("="))return r;var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n},Xl=function(e){return e.getParam("iframe_attrs",{})},Yl=function(e){return e.getParam("doctype","<!DOCTYPE html>")},Gl=function(e){return e.getParam("document_base_url","")},Kl=function(e){return $l(e,"body_id","tinymce")},Jl=function(e){return $l(e,"body_class","")},Zl=function(e){return e.getParam("content_security_policy","")},Ql=function(e){return e.getParam("br_in_pre",!0)},eu=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":t},tu=function(e){return e.getParam("forced_root_block_attrs",{})},nu=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},ru=function(e){return e.getParam("no_newline_selector","")},ou=function(e){return e.getParam("keep_styles",!0)},iu=function(e){return e.getParam("end_container_on_empty_block",!1)},au=function(e){return Gt.explode(e.getParam("font_size_style_values",""))},su=function(e){return Gt.explode(e.getParam("font_size_classes",""))},lu=function(e){return e.getParam("images_dataimg_filter",y(!0),"function")},uu=function(e){return e.getParam("automatic_uploads",!0,"boolean")},cu=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},fu=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},du=function(e){return e.getParam("images_upload_url","","string")},pu=function(e){return e.getParam("images_upload_base_path","","string")},mu=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},hu=function(e){return e.getParam("images_upload_handler",null,"function")},gu=$n.detect().browser,vu=function(){return gu.isIE()||gu.isEdge()||gu.isFirefox()},bu=function(e,t){e.selection.setRng(t),ql(e,t)},yu=function(e,t,n){var r,o,i,a,s=e(t,n);return(a=s).breakType===fl.Wrap&&0===a.positions.length||!Eo.isBr(n.getNode())&&(i=s).breakType===fl.Br&&1===i.positions.length?(r=e,o=t,!s.breakAt.map(function(e){return r(o,e).breakAt.isSome()}).getOr(!1)):s.breakAt.isNone()},wu=ba.curry(yu,Ml),xu=ba.curry(yu,Il),Cu=function(e,t,n,r){var o,i,a,s,l=e.selection.getRng(),u=t?1:-1;if(vu()&&(o=t,i=l,a=n,s=ks.fromRangeStart(i),fc.positionIn(!o,a).map(function(e){return e.isEqual(s)}).getOr(!1))){var c=sl(u,e,n,!t,!0);return bu(e,c),!0}return!1},_u=function(e,t){var n=t.getNode(e);return Eo.isElement(n)&&"TABLE"===n.nodeName?R.some(n):R.none()},Su=function(s,l,u){var e=_u(!!l,u),t=!1===l;e.fold(function(){return bu(s,u.toRange())},function(a){return fc.positionIn(t,s.getBody()).filter(function(e){return e.isEqual(u)}).fold(function(){return bu(s,u.toRange())},function(e){return n=l,o=a,t=u,void((i=eu(r=s))?r.undoManager.transact(function(){var e=Yn.fromTag(i);cr.setAll(e,tu(r)),xi.append(e,Yn.fromTag("br")),n?xi.after(Yn.fromDom(o),e):xi.before(Yn.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),bu(r,t)}):bu(r,t.toRange()));var n,r,o,t,i})})},ku=function(e,t,n,r){var o,i,a,s,l,u,c=e.selection.getRng(),f=ks.fromRangeStart(c),d=e.getBody();if(t||!wu(r,f))return!(!t||!xu(r,f))&&(o=d,p=zl(i=n,a=f).orThunk(function(){return ee(a.getClientRects()).bind(function(e){return Al(Bl(o,ks.after(i)),e.left)})}).getOr(ks.after(i)),Su(e,t,p),!0);var p=(s=d,Ul(l=n,u=f).orThunk(function(){return ee(u.getClientRects()).bind(function(e){return Al(Ll(s,ks.before(l)),e.left)})}).getOr(ks.before(l)));return Su(e,t,p),!0},Eu=function(t,n){return function(){return R.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return R.from(t.dom.getParent(e,"table")).map(function(e){return Cu(t,n,e)})}).getOr(!1)}},Tu=function(n,r){return function(){return R.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return R.from(n.dom.getParent(t,"table")).map(function(e){return ku(n,r,e,t)})}).getOr(!1)}},Nu=Eo.isContentEditableFalse,Ru=function(e,t,n){var r,o,i,a,s,l=Ga(t.getBoundingClientRect(),n);return i="BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,e.scrollTop||r.scrollTop):(s=e.getBoundingClientRect(),o=e.scrollLeft-s.left,e.scrollTop-s.top),l.left+=o,l.right+=o,l.top+=i,l.bottom+=i,l.width=1,0<(a=t.offsetWidth-t.clientWidth)&&(n&&(a*=-1),l.left+=a,l.right+=a),l},Ou=function(a,s,e){var t,l,u=Ti(R.none()),c=function(){!function(e){var t,n,r,o,i;for(t=hn("*[contentEditable=false]",e),o=0;o<t.length;o++)r=(n=t[o]).previousSibling,Da(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),r=n.nextSibling,Aa(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(a),l&&(ol.remove(l),l=null),u.get().each(function(e){hn(e.caret).remove(),u.set(R.none())}),clearInterval(t)},f=function(){t=Ie.setInterval(function(){e()?hn("div.mce-visual-caret",a).toggleClass("mce-visual-caret-hidden"):hn("div.mce-visual-caret",a).addClass("mce-visual-caret-hidden")},500)};return{show:function(t,e){var n,r,o;if(c(),o=e,Eo.isElement(o)&&/^(TD|TH)$/i.test(o.tagName))return null;if(!s(e))return l=function(e,t){var n,r,o;if(r=e.ownerDocument.createTextNode(xa),o=e.parentNode,t){if(n=e.previousSibling,Sa(n)){if(Ta(n))return n;if(Da(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,Sa(n)){if(Ta(n))return n;if(Aa(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(e,t),r=e.ownerDocument.createRange(),Nu(l.nextSibling)?(r.setStart(l,0),r.setEnd(l,0)):(r.setStart(l,1),r.setEnd(l,1)),r;l=Pa("p",e,t),n=Ru(a,e,t),hn(l).css("top",n.top);var i=hn('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(a)[0];return u.set(R.some({caret:i,element:e,before:t})),u.get().each(function(e){t&&hn(e.caret).addClass("mce-visual-caret-before")}),f(),(r=e.ownerDocument.createRange()).setStart(l,0),r.setEnd(l,0),r},hide:c,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){u.get().each(function(e){var t=Ru(a,e.element,e.before);hn(e.caret).css(t)})},destroy:function(){return Ie.clearInterval(t)}}},Pu=function(e){return Nu(e)||Eo.isTable(e)&&vu()},Au=Eo.isContentEditableFalse,Du=Eo.matchStyleValues("display","block table table-cell table-caption list-item"),Mu=Ta,Iu=ka,Lu=ba.curry,Bu=Eo.isElement,Fu=Wa,ju=function(e){return 0<e},Hu=function(e){return e<0},Uu=function(e,t){for(var n;n=e(t);)if(!Iu(n))return n;return null},zu=function(e,t,n,r,o){var i=new Qr(e,r);if(Hu(t)){if((Au(e)||Iu(e))&&n(e=Uu(i.prev,!0)))return e;for(;e=Uu(i.prev,o);)if(n(e))return e}if(ju(t)){if((Au(e)||Iu(e))&&n(e=Uu(i.next,!0)))return e;for(;e=Uu(i.next,o);)if(n(e))return e}return null},Wu=function(e,t){for(;e&&e!==t;){if(Du(e))return e;e=e.parentNode}return null},Vu=function(e,t,n){return Wu(e.container(),n)===Wu(t.container(),n)},qu=function(e,t){var n,r;return t?(n=t.container(),r=t.offset(),Bu(n)?n.childNodes[r+e]:null):null},$u=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},Xu=function(e,t,n){var r,o,i,a;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],Mu(r)&&(r=r[o]),Au(r)){if(a=n,Wu(r,i=t)===Wu(a,i))return r;break}if(Fu(r))break;n=n.parentNode}return null},Yu=Lu($u,!0),Gu=Lu($u,!1),Ku=function(e,t,n){var r,o,i,a,s=Lu(Xu,!0,t),l=Lu(Xu,!1,t);if(o=n.startContainer,i=n.startOffset,ka(o)){if(Bu(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,Pu(r)))return Yu(r);if("after"===a&&(r=o.previousSibling,Pu(r)))return Gu(r)}if(!n.collapsed)return n;if(Eo.isText(o)){if(Mu(o)){if(1===e){if(r=l(o))return Yu(r);if(r=s(o))return Gu(r)}if(-1===e){if(r=s(o))return Gu(r);if(r=l(o))return Yu(r)}return n}if(Da(o)&&i>=o.data.length-1)return 1===e&&(r=l(o))?Yu(r):n;if(Aa(o)&&i<=1)return-1===e&&(r=s(o))?Gu(r):n;if(i===o.data.length)return(r=l(o))?Yu(r):n;if(0===i)return(r=s(o))?Gu(r):n}return n},Ju=function(e,t){var n=qu(e,t);return Au(n)&&!Eo.isBogusAll(n)},Zu=function(e,t){return Eo.isTable(qu(e,t))},Qu=function(e,t){return R.from(qu(e?0:-1,t)).filter(Au)},ec=function(e,t,n){var r=Ku(e,t,n);return-1===e?Cs.fromRangeStart(r):Cs.fromRangeEnd(r)},tc=Lu(Ju,0),nc=Lu(Ju,-1),rc=Lu(Zu,0),oc=Lu(Zu,-1),ic=function(e){return ks.isTextPosition(e)?0===e.offset():Wa(e.getNode())},ac=function(e){if(ks.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Wa(e.getNode(!0))},sc=function(e,t){return!ks.isTextPosition(e)&&!ks.isTextPosition(t)&&e.getNode()===t.getNode(!0)},lc=function(e,t,n){return e?!sc(t,n)&&(r=t,!(!ks.isTextPosition(r)&&Eo.isBr(r.getNode())))&&ac(t)&&ic(n):!sc(n,t)&&ic(t)&&ac(n);var r},uc=function(e,t,n){var r=_l(t);return R.from(e?r.next(n):r.prev(n))},cc=function(e,t){var n,r,o,i,a,s=e?t.firstChild:t.lastChild;return Eo.isText(s)?R.some(ks(s,e?0:s.data.length)):s?Wa(s)?R.some(e?ks.before(s):(a=s,Eo.isBr(a)?ks.before(a):ks.after(a))):(r=t,o=s,i=(n=e)?ks.before(o):ks.after(o),uc(n,r,i)):R.none()},fc={fromPosition:uc,nextPosition:x(uc,!0),prevPosition:x(uc,!1),navigate:function(t,n,r){return uc(t,n,r).bind(function(e){return Vu(r,e,n)&&lc(t,r,e)?uc(t,n,e):R.some(e)})},positionIn:cc,firstPositionIn:x(cc,!0),lastPositionIn:x(cc,!1)},dc=function(e,t){return!e.isBlock(t)||t.innerHTML||Oe.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t},pc=function(e,t){return fc.lastPositionIn(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},mc=function(e,t,n){return!(!1!==t.hasChildNodes()||!Ys(e,t)||(o=n,i=(r=t).ownerDocument.createTextNode(xa),r.appendChild(i),o.setStart(i,0),o.setEnd(i,0),0));var r,o,i},hc=function(e,t,n,r){var o,i,a,s,l=n[t?"start":"end"],u=e.getRoot();if(l){for(a=l[0],i=u,o=l.length-1;1<=o;o--){if(s=i.childNodes,mc(u,i,r))return!0;if(l[o]>s.length-1)return!!mc(u,i,r)||pc(i,r);i=s[l[o]]}3===i.nodeType&&(a=Math.min(l[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(l[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},gc=function(e){return Eo.isText(e)&&0<e.data.length},vc=function(e,t,n){var r,o,i,a,s,l,u=e.get(n.id+"_"+t),c=n.keep;if(u){if(r=u.parentNode,o="start"===t?c?u.hasChildNodes()?(r=u.firstChild,1):gc(u.nextSibling)?(r=u.nextSibling,0):gc(u.previousSibling)?(r=u.previousSibling,u.previousSibling.data.length):(r=u.parentNode,e.nodeIndex(u)+1):e.nodeIndex(u):c?u.hasChildNodes()?(r=u.firstChild,1):gc(u.previousSibling)?(r=u.previousSibling,u.previousSibling.data.length):(r=u.parentNode,e.nodeIndex(u)):e.nodeIndex(u),s=r,l=o,!c){for(a=u.previousSibling,i=u.nextSibling,Gt.each(Gt.grep(u.childNodes),function(e){Eo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});u=e.get(n.id+"_"+t);)e.remove(u,!0);a&&i&&a.nodeType===i.nodeType&&Eo.isText(a)&&!Oe.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),s=a,l=o)}return R.some(ks(s,l))}return R.none()},bc=function(e,t){var n,r,o,i,a,s,l,u,c,f,d,p,m,h,g,v,b=e.dom;if(t){if(v=t,Gt.isArray(v.start))return h=t,g=(m=b).createRng(),hc(m,!0,h,g)&&hc(m,!1,h,g)?R.some(g):R.none();if("string"==typeof t.start)return R.some((f=t,d=(c=b).createRng(),p=Ms(c.getRoot(),f.start),d.setStart(p.container(),p.offset()),p=Ms(c.getRoot(),f.end),d.setEnd(p.container(),p.offset()),d));if(t.hasOwnProperty("id"))return l=vc(o=b,"start",i=t),u=vc(o,"end",i),rs([l,(a=u,s=l,a.isSome()?a:s)],function(e,t){var n=o.createRng();return n.setStart(dc(o,e.container()),e.offset()),n.setEnd(dc(o,t.container()),t.offset()),n});if(t.hasOwnProperty("name"))return n=b,r=t,R.from(n.select(r.name)[r.index]).map(function(e){var t=n.createRng();return t.selectNode(e),t});if(t.hasOwnProperty("rng"))return R.some(t.rng)}return R.none()},yc=function(e,t,n){return qs.getBookmark(e,t,n)},wc=function(t,e){bc(t,e).each(function(e){t.setRng(e)})},xc=function(e){return Eo.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Cc=function(e){return e&&/^(IMG)$/.test(e.nodeName)},_c=function(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)},Sc=function(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},kc={isInlineBlock:Cc,moveStart:function(e,t,n){var r,o,i,a=n.startOffset,s=n.startContainer;if((n.startContainer!==n.endContainer||!Cc(n.startContainer.childNodes[n.startOffset]))&&1===s.nodeType)for(a<(i=s.childNodes).length?r=new Qr(s=i[a],e.getParent(s,e.isBlock)):(r=new Qr(s=i[i.length-1],e.getParent(s,e.isBlock))).next(!0),o=r.current();o;o=r.next())if(3===o.nodeType&&!_c(o))return n.setStart(o,0),void t.setRng(n)},getNonWhiteSpaceSibling:function(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1===e.nodeType||!_c(e))return e},isTextBlock:function(e,t){return t.nodeType&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},isValid:function(e,t,n){return e.schema.isValidChild(t,n)},isWhiteSpaceNode:_c,replaceVars:function(e,n){return"string"!=typeof e?e=e(n):n&&(e=e.replace(/%(\w+)/g,function(e,t){return n[t]||e})),e},isEq:function(e,t){return t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()},normalizeStyleValue:Sc,getStyle:function(e,t,n){return Sc(e,e.getStyle(t,n),n)},getTextDecoration:function(t,e){var n;return t.getParent(e,function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n}),n},getParents:function(e,t,n){return e.getParents(t,n,e.getRoot())}},Ec=xc,Tc=kc.getParents,Nc=kc.isWhiteSpaceNode,Rc=kc.isTextBlock,Oc=function(e,t){for(void 0===t&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}},Pc=function(e,t){for(var n=t;n;){if(1===n.nodeType&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},Ac=function(e,t,n,r){var o,i,a=n.nodeValue;return void 0===r&&(r=e?a.length:0),e?(o=a.lastIndexOf(" ",r),-1!==(o=(i=a.lastIndexOf(" ",r))<o?o:i)&&!t&&(o<r||!e)&&o<=a.length&&o++):(o=a.indexOf(" ",r),i=a.indexOf(" ",r),o=-1!==o&&(-1===i||o<i)?o:i),o},Dc=function(e,t,n,r,o,i){var a,s,l,u;if(3===n.nodeType){if(-1!==(l=Ac(o,i,n,r)))return{container:n,offset:l};u=n}for(a=new Qr(n,e.getParent(n,e.isBlock)||t);s=a[o?"prev":"next"]();)if(3!==s.nodeType||Ec(s.parentNode)){if(e.isBlock(s)||kc.isEq(s,"BR"))break}else if(-1!==(l=Ac(o,i,u=s)))return{container:s,offset:l};if(u)return{container:u,offset:r=o?0:u.length}},Mc=function(e,t,n,r,o){var i,a,s,l;for(3===r.nodeType&&0===r.nodeValue.length&&r[o]&&(r=r[o]),i=Tc(e,r),a=0;a<i.length;a++)for(s=0;s<t.length;s++)if(!("collapsed"in(l=t[s])&&l.collapsed!==n.collapsed)&&e.is(i[a],l.selector))return i[a];return r},Ic=function(t,e,n,r){var o,i=t.dom,a=i.getRoot();if(e[0].wrapper||(o=i.getParent(n,e[0].block,a)),!o){var s=i.getParent(n,"LI,TD,TH");o=i.getParent(3===n.nodeType?n.parentNode:n,function(e){return e!==a&&Rc(t,e)},s)}if(o&&e[0].wrapper&&(o=Tc(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!kc.isEq(o,"br")););return o||n},Lc=function(e,t,n,r,o,i,a){var s,l,u,c,f,d;if(s=l=a?n:o,c=a?"previousSibling":"nextSibling",f=e.getRoot(),3===s.nodeType&&!Nc(s)&&(a?0<r:i<s.nodeValue.length))return s;for(;;){if(!t[0].block_expand&&e.isBlock(l))return l;for(u=l[c];u;u=u[c])if(!Ec(u)&&!Nc(u)&&("BR"!==(d=u).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return l;if(l===f||l.parentNode===f){s=l;break}l=l.parentNode}return s},Bc=function(e,t,n,r){var o,i=t.startContainer,a=t.startOffset,s=t.endContainer,l=t.endOffset,u=e.dom;return 1===i.nodeType&&i.hasChildNodes()&&3===(i=es(i,a)).nodeType&&(a=0),1===s.nodeType&&s.hasChildNodes()&&3===(s=es(s,t.collapsed?l:l-1)).nodeType&&(l=s.nodeValue.length),i=Pc(u,i),s=Pc(u,s),(Ec(i.parentNode)||Ec(i))&&(i=Ec(i)?i:i.parentNode,3===(i=t.collapsed?i.previousSibling||i:i.nextSibling||i).nodeType&&(a=t.collapsed?i.length:0)),(Ec(s.parentNode)||Ec(s))&&(s=Ec(s)?s:s.parentNode,3===(s=t.collapsed?s.nextSibling||s:s.previousSibling||s).nodeType&&(l=t.collapsed?0:s.length)),t.collapsed&&((o=Dc(u,e.getBody(),i,a,!0,r))&&(i=o.container,a=o.offset),(o=Dc(u,e.getBody(),s,l,!1,r))&&(s=o.container,l=o.offset)),n[0].inline&&(s=r?s:function(e,t){var n=Oc(e,t);if(n.node){for(;n.node&&0===n.offset&&n.node.previousSibling;)n=Oc(n.node.previousSibling);n.node&&0<n.offset&&3===n.node.nodeType&&" "===n.node.nodeValue.charAt(n.offset-1)&&1<n.offset&&(e=n.node).splitText(n.offset-1)}return e}(s,l)),(n[0].inline||n[0].block_expand)&&(n[0].inline&&3===i.nodeType&&0!==a||(i=Lc(u,n,i,a,s,l,!0)),n[0].inline&&3===s.nodeType&&l!==s.nodeValue.length||(s=Lc(u,n,i,a,s,l,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(i=Mc(u,n,t,i,"previousSibling"),s=Mc(u,n,t,s,"nextSibling")),(n[0].block||n[0].selector)&&(i=Ic(e,n,i,"previousSibling"),s=Ic(e,n,s,"nextSibling"),n[0].block&&(u.isBlock(i)||(i=Lc(u,n,i,a,s,l,!0)),u.isBlock(s)||(s=Lc(u,n,i,a,s,l,!1)))),1===i.nodeType&&(a=u.nodeIndex(i),i=i.parentNode),1===s.nodeType&&(l=u.nodeIndex(s)+1,s=s.parentNode),{startContainer:i,startOffset:a,endContainer:s,endOffset:l}},Fc=Gt.each,jc=function(e,t,o){var n,r,i,a,s,l,u,c=t.startContainer,f=t.startOffset,d=t.endContainer,p=t.endOffset;if(0<(u=e.select("td[data-mce-selected],th[data-mce-selected]")).length)Fc(u,function(e){o([e])});else{var m,h,g,v=function(e){var t;return 3===(t=e[0]).nodeType&&t===c&&f>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===p&&0<e.length&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e},b=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},y=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},w=function(e,t,n){var r=n?"nextSibling":"previousSibling";for(s=(a=e).parentNode;a&&a!==t;a=s)s=a.parentNode,(l=b(a===e?a:a[r],r)).length&&(n||l.reverse(),o(v(l)))};if(1===c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[f]),1===d.nodeType&&d.hasChildNodes()&&(h=p,g=(m=d).childNodes,--h>g.length-1?h=g.length-1:h<0&&(h=0),d=g[h]||m),c===d)return o(v([c]));for(n=e.findCommonAncestor(c,d),a=c;a;a=a.parentNode){if(a===d)return w(c,n,!0);if(a===n)break}for(a=d;a;a=a.parentNode){if(a===c)return w(d,n);if(a===n)break}r=y(c,n)||c,i=y(d,n)||d,w(c,r,!0),(l=b(r===c?r:r.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&o(v(l)),w(d,i)}},Hc=(Sl=nr.isText,kl="text",El=function(e){return Sl(e)?R.from(e.dom().nodeValue):R.none()},Tl=$n.detect().browser,{get:function(e){if(!Sl(e))throw new Error("Can only get "+kl+" value of a "+kl+" node");return Nl(e).getOr("")},getOption:Nl=Tl.isIE()&&10===Tl.version.major?function(e){try{return El(e)}catch(e){return R.none()}}:El,set:function(e,t){if(!Sl(e))throw new Error("Can only set raw "+kl+" value of a "+kl+" node");e.dom().nodeValue=t}}),Uc=function(e){return Hc.get(e)},zc=function(r,o,i,a){return jr.parent(o).fold(function(){return"skipping"},function(e){return"br"===a||(n=o,nr.isText(n)&&"\ufeff"===Uc(n))?"valid":(t=o,nr.isElement(t)&&Ui.has(t,Qi())?"existing":Xs(o)?"caret":kc.isValid(r,i,a)&&kc.isValid(r,nr.name(e),i)?"valid":"invalid-child");var t,n})},Wc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},Vc=function(e,t,n,r){var o,i,a=t.uid,s=void 0===a?(o="mce-annotation",i=(new Date).getTime(),o+"_"+Math.floor(1e9*Math.random())+ ++aa+String(i)):a,l=Wc(t,["uid"]),u=Yn.fromTag("span",e);Ui.add(u,Qi()),cr.set(u,""+ta(),s),cr.set(u,""+ea(),n);var c=r(s,l),f=c.attributes,d=void 0===f?{}:f,p=c.classes,m=void 0===p?[]:p;return cr.setAll(u,d),sa(u,m),u},qc=function(r,e,t,n,o){var i=[],a=Vc(r.getDoc(),o,t,n),s=Ti(R.none()),l=function(){s.set(R.none())},u=function(e){z(e,c)},c=function(e){switch(zc(r,e,"span",nr.name(e))){case"invalid-child":l();var t=jr.children(e);u(t),l();break;case"valid":var n=s.get().getOrThunk(function(){var e=ca(a);return i.push(e),s.set(R.some(e)),e});xi.wrap(e,n)}};return jc(r.dom,e,function(e){var t;l(),t=U(e,Yn.fromDom),u(t)}),i},$c=function(l,u,c,f){l.undoManager.transact(function(){var e,t,n,r,o=l.selection.getRng();if(o.collapsed&&(r=Bc(e=l,t=o,[{inline:!0}],3===(n=t).startContainer.nodeType&&n.startContainer.nodeValue.length>=n.startOffset&&" "===n.startContainer.nodeValue[n.startOffset]),t.setStart(r.startContainer,r.startOffset),t.setEnd(r.endContainer,r.endOffset),e.selection.setRng(t)),l.selection.getRng().collapsed){var i=Vc(l.getDoc(),f,u,c.decorate);ha(i," "),l.selection.getRng().insertNode(i.dom()),l.selection.select(i.dom())}else{var a=qs.getPersistentBookmark(l.selection,!1),s=l.selection.getRng();qc(l,s,u,c.decorate,f),l.selection.moveToBookmark(a)}})};function Xc(l){var n,r=(n={},{register:function(e,t){n[e]={name:e,settings:t}},lookup:function(e){return n.hasOwnProperty(e)?R.from(n[e]).map(function(e){return e.settings}):R.none()}});ia(l,r);var o=oa(l);return{register:function(e,t){r.register(e,t)},annotate:function(t,n){r.lookup(t).each(function(e){$c(l,t,e,n)})},annotationChanged:function(e,t){o.addListener(e,t)},remove:function(e){na(l,R.some(e)).each(function(e){var t=e.elements;z(t,ki.unwrap)})},getAll:function(e){var t,n,r,o,i,a,s=(t=l,n=e,r=Yn.fromDom(t.getBody()),o=zi(r,"["+ea()+'="'+n+'"]'),i={},z(o,function(e){var t=cr.get(e,ta()),n=i.hasOwnProperty(t)?i[t]:[];i[t]=n.concat([e])}),i);return a=function(e){return U(e,function(e){return e.dom()})},ir(s,function(e,t,n){return{k:t,v:a(e,t,n)}})}}}var Yc=function(e){return Gt.grep(e.childNodes,function(e){return"LI"===e.nodeName})},Gc=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&(" "===(t=e.firstChild).data||Eo.isBr(t));var t},Kc=function(e){return 0<e.length&&(!(t=e[e.length-1]).firstChild||Gc(t))?e.slice(0,-1):e;var t},Jc=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Zc=function(e,t){var n=ks.after(e),r=_l(t).prev(n);return r?r.toRange():null},Qc=function(t,e,n){var r,o,i,a,s=t.parentNode;return Gt.each(e,function(e){s.insertBefore(e,t)}),r=t,o=n,i=ks.before(r),(a=_l(o).next(i))?a.toRange():null},ef=function(e,t){var n,r,o,i,a,s,l=t.firstChild,u=t.lastChild;return l&&"meta"===l.name&&(l=l.next),u&&"mce_marker"===u.attr("id")&&(u=u.prev),r=u,s=(n=e).getNonEmptyElements(),r&&(r.isEmpty(s)||(o=r,n.getBlockElements()[o.name]&&(a=o).firstChild&&a.firstChild===a.lastChild&&("br"===(i=o.firstChild).name||" "===i.value)))&&(u=u.prev),!(!l||l!==u||"ul"!==l.name&&"ol"!==l.name)},tf=function(e,o,i,t){var n,r,a,s,l,u,c,f,d,p,m,h,g,v,b,y,w,x,C,_=(n=o,r=t,u=e.serialize(r),c=n.createFragment(u),s=(a=c).firstChild,l=a.lastChild,s&&"META"===s.nodeName&&s.parentNode.removeChild(s),l&&"mce_marker"===l.id&&l.parentNode.removeChild(l),a),S=Jc(o,i.startContainer),k=Kc(Yc(_.firstChild)),E=o.getRoot(),T=function(e){var t=ks.fromRangeStart(i),n=_l(o.getRoot()),r=1===e?n.prev(t):n.next(t);return!r||Jc(o,r.getNode())!==S};return T(1)?Qc(S,k,E):T(2)?(f=S,d=k,p=E,o.insertAfter(d.reverse(),f),Zc(d[0],p)):(h=k,g=E,v=m=S,y=(b=i).cloneRange(),w=b.cloneRange(),y.setStartBefore(v),w.setEndAfter(v),x=[y.cloneContents(),w.cloneContents()],(C=m.parentNode).insertBefore(x[0],m),Gt.each(h,function(e){C.insertBefore(e,m)}),C.insertBefore(x[1],m),C.removeChild(m),Zc(h[h.length-1],g))},nf=function(e,t){return!!Jc(e,t)},rf=Gt.each,of=function(o){this.compare=function(e,t){if(e.nodeName!==t.nodeName)return!1;var n=function(n){var r={};return rf(o.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=o.getAttrib(n,t))}),r},r=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!(!r(n(e),n(t))||!r(o.parseStyle(o.getAttrib(e,"style")),o.parseStyle(o.getAttrib(t,"style")))||xc(e)||xc(t))}},af=function(e){var t=zi(e,"br"),n=V(function(e){for(var t=[],n=e.dom();n;)t.push(Yn.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),so);t.length===n.length&&z(n,ki.remove)},sf=function(e){ki.empty(e),xi.append(e,Yn.fromHtml('<br data-mce-bogus="1">'))},lf=function(n){jr.lastChild(n).each(function(t){jr.prevSibling(t).each(function(e){io(n)&&so(t)&&io(e)&&ki.remove(t)})})},uf=Gt.makeMap;function cf(e){var s,l,u,c,f,d=[];return s=(e=e||{}).indent,l=uf(e.indent_before||""),u=uf(e.indent_after||""),c=Ho.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(s&&l[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n"),d.push("<",e),t)for(r=0,o=t.length;r<o;r++)i=t[r],d.push(" ",i.name,'="',c(i.value,!0),'"');d[d.length]=!n||f?">":" />",n&&s&&u[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n")},end:function(e){var t;d.push("</",e,">"),s&&u[e]&&0<d.length&&0<(t=d[d.length-1]).length&&"\n"!==t&&d.push("\n")},text:function(e,t){0<e.length&&(d[d.length]=t?e:c(e))},cdata:function(e){d.push("<![CDATA[",e,"]]>")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push("<?",e," ",c(t),"?>"):d.push("<?",e,"?>"),s&&d.push("\n")},doctype:function(e){d.push("<!DOCTYPE",e,">",s?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}}function ff(t,m){void 0===m&&(m=Jo());var h=cf(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(e){var f,d;d=t.validate,f={3:function(e){h.text(e.value,e.raw)},8:function(e){h.comment(e.value)},7:function(e){h.pi(e.name,e.value)},10:function(e){h.doctype(e.value)},4:function(e){h.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;p(e),e=e.next;);}},h.reset();var p=function(e){var t,n,r,o,i,a,s,l,u,c=f[e.type];if(c)c(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1<r.length&&((a=[]).map={},u=m.getElementRule(e.name))){for(s=0,l=u.attributesOrder.length;s<l;s++)(o=u.attributesOrder[s])in r.map&&(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));for(s=0,l=r.length;s<l;s++)(o=r[s].name)in a.map||(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));r=a}if(h.start(e.name,r,n),!n){if(e=e.firstChild)for(;p(e),e=e.next;);h.end(t)}}};return 1!==e.type||t.inner?f[11](e):p(e),h.getContent()}}}var df=function(a){var s=ks.fromRangeStart(a),l=ks.fromRangeEnd(a),u=a.commonAncestorContainer;return fc.fromPosition(!1,u,l).map(function(e){return!Vu(s,l,u)&&Vu(s,e,u)?(t=s.container(),n=s.offset(),r=e.container(),o=e.offset(),(i=document.createRange()).setStart(t,n),i.setEnd(r,o),i):a;var t,n,r,o,i}).getOr(a)},pf=function(e){return e.collapsed?e:df(e)},mf=Eo.matchNodeNames("td th"),hf=function(e,t){var n,r,o=e.selection.getRng(),i=o.startContainer,a=o.startOffset;o.collapsed&&(n=i,r=a,Eo.isText(n)&&" "===n.nodeValue[r-1])&&Eo.isText(i)&&(i.insertData(a-1," "),i.deleteData(a,1),o.setStart(i,a),o.setEnd(i,a),e.selection.setRng(o)),e.selection.setContent(t)},gf=function(e,t,n){var r,o,i,a,s,l,u,c,f,d,p,m=e.selection,h=e.dom;if(/^ | $/.test(t)&&(t=function(e,t){var n,r;n=e.startContainer,r=e.startOffset;var o=function(e){return n[e]&&3===n[e].nodeType};return 3===n.nodeType&&(0<r?t=t.replace(/^&nbsp;/," "):o("previousSibling")||(t=t.replace(/^ /,"&nbsp;")),r<n.length?t=t.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(t=t.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),t}(m.getRng(),t)),r=e.parser,p=n.merge,o=ff({validate:e.settings.validate},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',l={content:t,format:"html",selection:!0,paste:n.paste},(l=e.fire("BeforeSetContent",l)).isDefaultPrevented())e.fire("SetContent",{content:l.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=l.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var g,v,b,y,w,x,C=(c=m.getRng()).startContainer||(c.parentElement?c.parentElement():null),_=e.getBody();C===_&&m.isCollapsed()&&h.isBlock(_.firstChild)&&(g=e,(v=_.firstChild)&&!g.schema.getShortEndedElements()[v.nodeName])&&h.isEmpty(_.firstChild)&&((c=h.createRng()).setStart(_.firstChild,0),c.setEnd(_.firstChild,0),m.setRng(c)),m.isCollapsed()||(e.selection.setRng(pf(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),b=e.selection.getRng(),y=t,w=b.startContainer,x=b.startOffset,3===w.nodeType&&b.collapsed&&(" "===w.data[x]?(w.deleteData(x,1),/[\u00a0| ]$/.test(y)||(y+=" ")):" "===w.data[x-1]&&(w.deleteData(x-1,1),/[\u00a0| ]$/.test(y)||(y=" "+y))),t=y);var S,k,E,T={context:(i=m.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(s=r.parse(t,T),!0===n.paste&&ef(e.schema,s)&&nf(h,i))return c=tf(o,h,e.selection.getRng(),s),e.selection.setRng(c),void e.fire("SetContent",l);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(s),"mce_marker"===(f=s.lastChild).attr("id"))for(f=(u=f).prev;f;f=f.walk(!0))if(3===f.type||!h.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(u,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),T.invalid){for(hf(e,d),i=m.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:h.getOuterHTML(i),t=o.serialize(r.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(s)}))),i===a?h.setHTML(a,t):h.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):hf(e,t)}}(e,t=o.serialize(s),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new of(r);Gt.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,p),function(n,e){var t,r,o,i,a,s=n.dom,l=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return s.remove(e),l.select(t);var u=s.createRng();(i=e.previousSibling)&&3===i.nodeType?(u.setStart(i,i.nodeValue.length),Oe.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(u.setStartBefore(e),u.setEndBefore(e)),r=s.getParent(e,s.isBlock),s.remove(e),r&&s.isEmpty(r)&&(n.$(r).empty(),u.setStart(r,0),u.setEnd(r,0),mf(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var t=ks.fromRangeStart(e);if(t=_l(n.getBody()).next(t))return t.toRange()}(u))?s.add(r,s.create("br",{"data-mce-bogus":"1"})):(u=o,s.remove(r))),l.setRng(u)}}(e,h.get("mce_marker")),S=e.getBody(),Gt.each(S.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),k=e.dom,E=e.selection.getStart(),R.from(k.getParent(E,"td,th")).map(Yn.fromDom).each(lf),e.fire("SetContent",l),e.addVisual()}},vf=function(e,t){var n,r,o="string"!=typeof(n=t)?(r=Gt.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};gf(e,o.content,o.details)},bf=xr("sections","settings"),yf=$n.detect().deviceType.isTouch(),wf=["lists","autolink","autosave"],xf={theme:"mobile"},Cf=function(e){var t=D(e)?e.join(" "):e,n=U(P(t)?t.split(" "):[],jn);return V(n,function(e){return 0<e.length})},_f=function(n,e){var r,o,i,t=(r=function(e,t){return j(n,t)},o={},i={},or(e,function(e,t){(r(e,t)?o:i)[t]=e}),{t:o,f:i});return bf(t.t,t.f)},Sf=function(e,t){return e.sections().hasOwnProperty(t)},kf=function(e,t,n,r){var o,i=Cf(n.forced_plugins),a=Cf(r.plugins),s=e&&Sf(t,"mobile")?V(a,x(j,wf)):a,l=(o=s,[].concat(Cf(i)).concat(Cf(o)));return Gt.extend(r,{plugins:l.join(" ")})},Ef=function(e,t,n,r){var o,i,a,s,l,u,c,f,d,p,m=_f(["mobile"],r),h=Gt.extend(t,n,m.settings(),(f=e,p=(d=m).settings().inline,f&&Sf(d,"mobile")&&!p?(s="mobile",l=xf,u=m.sections(),c=u.hasOwnProperty(s)?u[s]:{},Gt.extend({},l,c)):{}),{validate:!0,content_editable:m.settings().inline,external_plugins:(o=n,i=m.settings(),a=i.external_plugins?i.external_plugins:{},o&&o.external_plugins?Gt.extend({},o.external_plugins,a):a)});return kf(e,m,n,h)},Tf=function(e,t,n){return R.from(t.settings[n]).filter(e)},Nf=x(Tf,P),Rf=function(e,t,n,r){var o,i,a,s=t in e.settings?e.settings[t]:n;return"hash"===r?(a={},"string"==typeof(i=s)?z(0<i.indexOf("=")?i.split(/[;,](?![^=;,]*(?:[;,]|$))/):i.split(","),function(e){var t=e.split("=");1<t.length?a[Gt.trim(t[0])]=Gt.trim(t[1]):a[Gt.trim(t[0])]=Gt.trim(t)}):a=i,a):"string"===r?Tf(P,e,t).getOr(n):"number"===r?Tf(B,e,t).getOr(n):"boolean"===r?Tf(I,e,t).getOr(n):"object"===r?Tf(A,e,t).getOr(n):"array"===r?Tf(D,e,t).getOr(n):"string[]"===r?Tf((o=P,function(e){return D(e)&&J(e,o)}),e,t).getOr(n):"function"===r?Tf(L,e,t).getOr(n):s},Of=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Pf=function(e,t){var n=t.container(),r=t.offset();return e?Ea(n)?Eo.isText(n.nextSibling)?ks(n.nextSibling,0):ks.after(n):Ra(t)?ks(n,r+1):t:Ea(n)?Eo.isText(n.previousSibling)?ks(n.previousSibling,n.previousSibling.data.length):ks.before(n):Oa(t)?ks(n,r-1):t},Af={isInlineTarget:function(e,t){var n=Nf(e,"inline_boundaries_selector").getOr("a[href],code");return Rr.is(Yn.fromDom(t),n)},findRootInline:function(e,t,n){var r,o,i,a=(r=e,o=t,i=n,V(ci.DOM.getParents(i.container(),"*",o),r));return R.from(a[a.length-1])},isRtl:function(e){return"rtl"===ci.DOM.getStyle(e,"direction",!0)||(t=e.textContent,Of.test(t));var t},isAtZwsp:function(e){return Ra(e)||Oa(e)},normalizePosition:Pf,normalizeForwards:x(Pf,!0),normalizeBackwards:x(Pf,!1),hasSameParentBlock:function(e,t,n){var r=Wu(t,e),o=Wu(n,e);return r&&r===o}},Df=function(e,t){return Ar.contains(e,t)?Yi.closest(t,function(e){return lo(e)||co(e)},(n=e,function(e){return Ar.eq(n,Yn.fromDom(e.dom().parentNode))})):R.none();var n},Mf=function(e){var t,n,r;e.dom.isEmpty(e.getBody())&&(e.setContent(""),n=(t=e).getBody(),r=n.firstChild&&t.dom.isBlock(n.firstChild)?n.firstChild:n,t.selection.setCursorLocation(r,0))},If=function(i,a,s){return rs([fc.firstPositionIn(s),fc.lastPositionIn(s)],function(e,t){var n=Af.normalizePosition(!0,e),r=Af.normalizePosition(!1,t),o=Af.normalizePosition(!1,a);return i?fc.nextPosition(s,o).map(function(e){return e.isEqual(r)&&a.isEqual(n)}).getOr(!1):fc.prevPosition(s,o).map(function(e){return e.isEqual(n)&&a.isEqual(r)}).getOr(!1)}).getOr(!0)},Lf=function(e,t,n){return Ki(e,t,n).isSome()},Bf=function(e,t){return Eo.isText(t)&&/^[ \t\r\n]*$/.test(t.data)&&!1===(n=e,r=t,o=Yn.fromDom(n),i=Yn.fromDom(r),Lf(i,"pre,code",x(Ar.eq,o)));var n,r,o,i},Ff=function(e,t){return Wa(t)&&!1===Bf(e,t)||(n=t,Eo.isElement(n)&&"A"===n.nodeName&&n.hasAttribute("name"))||jf(t);var n},jf=Eo.hasAttribute("data-mce-bookmark"),Hf=Eo.hasAttribute("data-mce-bogus"),Uf=Eo.hasAttributeValue("data-mce-bogus","all"),zf=function(e){return function(e){var t,n,r=0;if(Ff(e,e))return!1;if(!(n=e.firstChild))return!0;t=new Qr(n,e);do{if(Uf(n))n=t.next(!0);else if(Hf(n))n=t.next();else if(Eo.isBr(n))r++,n=t.next();else{if(Ff(e,n))return!1;n=t.next()}}while(n);return r<=1}(e.dom())},Wf=xr("block","position"),Vf=xr("from","to"),qf=function(e,t){var n=Yn.fromDom(e),r=Yn.fromDom(t.container());return Df(n,r).map(function(e){return Wf(e,t)})},$f=function(o,i,e){var t=qf(o,ks.fromRangeStart(e)),n=t.bind(function(e){return fc.fromPosition(i,o,e.position()).bind(function(e){return qf(o,e).map(function(e){return t=o,n=i,r=e,Eo.isBr(r.position().getNode())&&!1===zf(r.block())?fc.positionIn(!1,r.block().dom()).bind(function(e){return e.isEqual(r.position())?fc.fromPosition(n,t,e).bind(function(e){return qf(t,e)}):R.some(r)}).getOr(r):r;var t,n,r})})});return rs([t,n],Vf).filter(function(e){return r=e,!1===Ar.eq(r.from().block(),r.to().block())&&(n=e,jr.parent(n.from().block()).bind(function(t){return jr.parent(n.to().block()).filter(function(e){return Ar.eq(t,e)})}).isSome())&&(t=e,!1===Eo.isContentEditableFalse(t.from().block())&&!1===Eo.isContentEditableFalse(t.to().block()));var t,n,r})},Xf=function(e,t,n){return n.collapsed?$f(e,t,n):R.none()},Yf=function(e,t,n){return Ar.contains(t,e)?jr.parents(e,function(e){return n(e)||Ar.eq(e,t)}).slice(0,-1):[]},Gf=function(e,t){return Yf(e,t,y(!1))},Kf=Gf,Jf=function(e,t){return[e].concat(Gf(e,t))},Zf=function(e){var t,n,r=(t=e,n=jr.children(t),X(n,io).fold(function(){return n},function(e){return n.slice(0,e)}));return z(r,ki.remove),r},Qf=function(e,t){var n=Jf(t,e);return $(n.reverse(),zf).each(ki.remove)},ed=function(e,t,n,r){if(zf(n))return sf(n),fc.firstPositionIn(n.dom());var o;o=r,0===V(jr.prevSiblings(o),function(e){return!zf(e)}).length&&zf(t)&&xi.before(r,Yn.fromTag("br"));var i=fc.prevPosition(n.dom(),ks.before(r.dom()));return z(Zf(t),function(e){xi.before(r,e)}),Qf(e,t),i},td=function(e,t,n){if(zf(n))return ki.remove(n),zf(t)&&sf(t),fc.firstPositionIn(t.dom());var r=fc.lastPositionIn(n.dom());return z(Zf(t),function(e){xi.append(n,e)}),Qf(e,t),r},nd=function(e,t){return Ar.contains(t,e)?(n=Jf(e,t),R.from(n[n.length-1])):R.none();var n},rd=function(e,t){fc.positionIn(e,t.dom()).map(function(e){return e.getNode()}).map(Yn.fromDom).filter(so).each(ki.remove)},od=function(e,t,n){return rd(!0,t),rd(!1,n),nd(t,n).fold(x(td,e,t,n),x(ed,e,t,n))},id=function(e,t,n,r){return t?od(e,r,n):od(e,n,r)},ad=function(t,n){var e,r=Yn.fromDom(t.getBody());return(e=Xf(r.dom(),n,t.selection.getRng()).bind(function(e){return id(r,n,e.from().block(),e.to().block())})).each(function(e){t.selection.setRng(e.toRange())}),e.isSome()},sd=function(e,t){var n=Yn.fromDom(t),r=x(Ar.eq,e);return Yi.ancestor(n,mo,r).isSome()},ld=function(e,t){var n,r,o=fc.prevPosition(e.dom(),ks.fromRangeStart(t)).isNone(),i=fc.nextPosition(e.dom(),ks.fromRangeEnd(t)).isNone();return!(sd(n=e,(r=t).startContainer)||sd(n,r.endContainer))&&o&&i},ud=function(e){var n,r,o,t,i=Yn.fromDom(e.getBody()),a=e.selection.getRng();return ld(i,a)?((t=e).setContent(""),t.selection.setCursorLocation(),!0):(n=i,r=e.selection,o=r.getRng(),rs([Df(n,Yn.fromDom(o.startContainer)),Df(n,Yn.fromDom(o.endContainer))],function(e,t){return!1===Ar.eq(e,t)&&(o.deleteContents(),id(n,!0,e,t).each(function(e){r.setRng(e.toRange())}),!0)}).getOr(!1))},cd=function(e,t){return!e.selection.isCollapsed()&&ud(e)},fd=function(a){if(!D(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var s=[],n={};return z(a,function(e,r){var t=rr(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(void 0!==n[o])throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!D(i))throw new Error("case arguments must be an array");s.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t<n.length;t++)n[t]=arguments[t];return{fold:function(){if(arguments.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+arguments.length);return arguments[r].apply(null,n)},match:function(e){var t=rr(e);if(s.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+s.join(",")+"\nActual: "+t.join(","));if(!J(s,function(e){return j(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+s.join(", "));return e[o].apply(null,n)},log:function(e){}}}}),n},dd=fd([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),pd=function(e,t,n,r){var o=r.getNode(!1===t);return Df(Yn.fromDom(e),Yn.fromDom(n.getNode())).map(function(e){return zf(e)?dd.remove(e.dom()):dd.moveToElement(o)}).orThunk(function(){return R.some(dd.moveToElement(o))})},md=function(s,l,u){return fc.fromPosition(l,s,u).bind(function(e){return a=e.getNode(),mo(Yn.fromDom(a))||co(Yn.fromDom(a))?R.none():(t=s,o=e,i=function(e){return ao(Yn.fromDom(e))&&!Vu(r,o,t)},Qu(!(n=l),r=u).fold(function(){return Qu(n,o).fold(y(!1),i)},i)?R.none():l&&Eo.isContentEditableFalse(e.getNode())?pd(s,l,u,e):!1===l&&Eo.isContentEditableFalse(e.getNode(!0))?pd(s,l,u,e):l&&nc(u)?R.some(dd.moveToPosition(e)):!1===l&&tc(u)?R.some(dd.moveToPosition(e)):R.none());var t,n,r,o,i,a})},hd=function(r,e,o){return i=e,a=o.getNode(!1===i),s=i?"after":"before",Eo.isElement(a)&&a.getAttribute("data-mce-caret")===s?(t=e,n=o.getNode(!1===e),t&&Eo.isContentEditableFalse(n.nextSibling)?R.some(dd.moveToElement(n.nextSibling)):!1===t&&Eo.isContentEditableFalse(n.previousSibling)?R.some(dd.moveToElement(n.previousSibling)):R.none()).fold(function(){return md(r,e,o)},R.some):md(r,e,o).bind(function(e){return t=r,n=o,e.fold(function(e){return R.some(dd.remove(e))},function(e){return R.some(dd.moveToElement(e))},function(e){return Vu(n,e,t)?R.none():R.some(dd.moveToPosition(e))});var t,n});var t,n,i,a,s},gd=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===ks.isTextPosition(n)&&o===r.parentNode&&i>ks.before(r).offset()?ks(t.container(),t.offset()-1):t;var n,r,o,i},vd=function(e){return Wa(e.previousSibling)?R.some((t=e.previousSibling,Eo.isText(t)?ks(t,t.data.length):ks.after(t))):e.previousSibling?fc.lastPositionIn(e.previousSibling):R.none();var t},bd=function(e){return Wa(e.nextSibling)?R.some((t=e.nextSibling,Eo.isText(t)?ks(t,0):ks.before(t))):e.nextSibling?fc.firstPositionIn(e.nextSibling):R.none();var t},yd=function(r,o){return vd(o).orThunk(function(){return bd(o)}).orThunk(function(){return e=r,t=o,n=ks.before(t.previousSibling?t.previousSibling:t.parentNode),fc.prevPosition(e,n).fold(function(){return fc.nextPosition(e,ks.after(t))},R.some);var e,t,n})},wd=function(n,r){return bd(r).orThunk(function(){return vd(r)}).orThunk(function(){return e=n,t=r,fc.nextPosition(e,ks.after(t)).fold(function(){return fc.prevPosition(e,ks.before(t))},R.some);var e,t})},xd=function(e,t,n){return(r=e,o=t,i=n,r?wd(o,i):yd(o,i)).map(x(gd,n));var r,o,i},Cd=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},_d=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(nr.name(t))},Sd=function(e){if(zf(e)){var t=Yn.fromHtml('<br data-mce-bogus="1">');return ki.empty(e),xi.append(e,t),R.some(ks.before(t.dom()))}return R.none()},kd=function(t,n,e){var r,a,o,i=xd(n,t.getBody(),e.dom()),s=Yi.ancestor(e,x(_d,t),(r=t.getBody(),function(e){return e.dom()===r})),l=(a=e,o=i,rs([jr.prevSibling(a),jr.nextSibling(a),o],function(e,t,n){var r,o=e.dom(),i=t.dom();return Eo.isText(o)&&Eo.isText(i)?(r=o.data.length,o.appendData(i.data),ki.remove(t),ki.remove(a),n.container()===i?ks(o,r):n):(ki.remove(a),n)}).orThunk(function(){return ki.remove(a),o}));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):s.bind(Sd).fold(function(){Cd(t,n,l)},function(e){Cd(t,n,R.some(e))})},Ed=function(a,s){var e,t,n,r,o;return(e=a.getBody(),t=s,n=a.selection.getRng(),r=Ku(t?1:-1,e,n),o=ks.fromRangeStart(r),!1===t&&nc(o)?R.some(dd.remove(o.getNode(!0))):t&&tc(o)?R.some(dd.remove(o.getNode())):hd(e,t,o)).map(function(e){return e.fold((o=a,i=s,function(e){return o._selectionOverrides.hideFakeCaret(),kd(o,i,Yn.fromDom(e)),!0}),(n=a,r=s,function(e){var t=r?ks.before(e):ks.after(e);return n.selection.setRng(t.toRange()),!0}),(t=a,function(e){return t.selection.setRng(e.toRange()),!0}));var t,n,r,o,i}).getOr(!1)},Td=function(e,t){var n,r=e.selection.getNode();return!!Eo.isContentEditableFalse(r)&&(n=Yn.fromDom(e.getBody()),z(zi(n,".mce-offscreen-selection"),ki.remove),kd(e,t,Yn.fromDom(e.selection.getNode())),Mf(e),!0)},Nd=function(e,t){return e.selection.isCollapsed()?Ed(e,t):Td(e,t)},Rd=function(e){var t,n=function(e,t){for(;t&&t!==e;){if(Eo.isContentEditableTrue(t)||Eo.isContentEditableFalse(t))return t;t=t.parentNode}return null}(e.getBody(),e.selection.getNode());return Eo.isContentEditableTrue(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(ks.before(t).toRange())),!0},Od=Eo.isText,Pd=function(e){return Od(e)&&e.data[0]===xa},Ad=function(e){return Od(e)&&e.data[e.data.length-1]===xa},Dd=function(e){return e.ownerDocument.createTextNode(xa)},Md=function(e,t){return e?function(e){if(Od(e.previousSibling))return Ad(e.previousSibling)||e.previousSibling.appendData(xa),e.previousSibling;if(Od(e))return Pd(e)||e.insertData(0,xa),e;var t=Dd(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(Od(e.nextSibling))return Pd(e.nextSibling)||e.nextSibling.insertData(0,xa),e.nextSibling;if(Od(e))return Ad(e)||e.appendData(xa),e;var t=Dd(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},Id=x(Md,!0),Ld=x(Md,!1),Bd=function(e,t){return Eo.isText(e.container())?Md(t,e.container()):Md(t,e.getNode())},Fd=function(e,t){var n=t.get();return n&&e.container()===n&&Ea(n)},jd=function(n,e){return e.fold(function(e){ol.remove(n.get());var t=Id(e);return n.set(t),R.some(ks(t,t.length-1))},function(e){return fc.firstPositionIn(e).map(function(e){if(Fd(e,n))return ks(n.get(),1);ol.remove(n.get());var t=Bd(e,!0);return n.set(t),ks(t,1)})},function(e){return fc.lastPositionIn(e).map(function(e){if(Fd(e,n))return ks(n.get(),n.get().length-1);ol.remove(n.get());var t=Bd(e,!1);return n.set(t),ks(t,t.length-1)})},function(e){ol.remove(n.get());var t=Ld(e);return n.set(t),R.some(ks(t,1))})},Hd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return R.none()},Ud=fd([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),zd=function(e,t){var n=Wu(t,e);return n||e},Wd=function(e,t,n){var r=Af.normalizeForwards(n),o=zd(t,r.container());return Af.findRootInline(e,o,r).fold(function(){return fc.nextPosition(o,r).bind(x(Af.findRootInline,e,o)).map(function(e){return Ud.before(e)})},R.none)},Vd=function(e,t){return null===Ys(e,t)},qd=function(e,t,n){return Af.findRootInline(e,t,n).filter(x(Vd,t))},$d=function(e,t,n){var r=Af.normalizeBackwards(n);return qd(e,t,r).bind(function(e){return fc.prevPosition(e,r).isNone()?R.some(Ud.start(e)):R.none()})},Xd=function(e,t,n){var r=Af.normalizeForwards(n);return qd(e,t,r).bind(function(e){return fc.nextPosition(e,r).isNone()?R.some(Ud.end(e)):R.none()})},Yd=function(e,t,n){var r=Af.normalizeBackwards(n),o=zd(t,r.container());return Af.findRootInline(e,o,r).fold(function(){return fc.prevPosition(o,r).bind(x(Af.findRootInline,e,o)).map(function(e){return Ud.after(e)})},R.none)},Gd=function(e){return!1===Af.isRtl(Jd(e))},Kd=function(e,t,n){return Hd([Wd,$d,Xd,Yd],[e,t,n]).filter(Gd)},Jd=function(e){return e.fold(w,w,w,w)},Zd=function(e){return e.fold(y("before"),y("start"),y("end"),y("after"))},Qd=function(e){return e.fold(Ud.before,Ud.before,Ud.after,Ud.after)},ep=function(n,e,r,t,o,i){return rs([Af.findRootInline(e,r,t),Af.findRootInline(e,r,o)],function(e,t){return e!==t&&Af.hasSameParentBlock(r,e,t)?Ud.after(n?e:t):i}).getOr(i)},tp=function(e,r){return e.fold(y(!0),function(e){return n=r,!(Zd(t=e)===Zd(n)&&Jd(t)===Jd(n));var t,n})},np=function(e,t){return e?t.fold(b(R.some,Ud.start),R.none,b(R.some,Ud.after),R.none):t.fold(R.none,b(R.some,Ud.before),R.none,b(R.some,Ud.end))},rp=function(a,s,l,u){var e=Af.normalizePosition(a,u),c=Kd(s,l,e);return Kd(s,l,e).bind(x(np,a)).orThunk(function(){return t=a,n=s,r=l,o=c,e=u,i=Af.normalizePosition(t,e),fc.fromPosition(t,r,i).map(x(Af.normalizePosition,t)).fold(function(){return o.map(Qd)},function(e){return Kd(n,r,e).map(x(ep,t,n,r,i,e)).filter(x(tp,o))}).filter(Gd);var t,n,r,o,e,i})},op=Kd,ip=rp,ap=(x(rp,!1),x(rp,!0),Qd),sp=function(e){return e.fold(Ud.start,Ud.start,Ud.end,Ud.end)},lp=function(e){return L(e.selection.getSel().modify)},up=function(e,t,n){var r=e?1:-1;return t.setRng(ks(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},cp=function(e,t){var n=t.selection.getRng(),r=e?ks.fromRangeEnd(n):ks.fromRangeStart(n);return!!lp(t)&&(e&&Ra(r)?up(!0,t.selection,r):!(e||!Oa(r))&&up(!1,t.selection,r))},fp=function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},dp=function(e){return!1!==e.settings.inline_boundaries},pp=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},mp=function(t,e,n){return jd(e,n).map(function(e){return fp(t,e),n})},hp=function(e,t,n){return function(){return!!dp(t)&&cp(e,t)}},gp={move:function(a,s,l){return function(){return!!dp(a)&&(t=a,n=s,e=l,r=t.getBody(),o=ks.fromRangeStart(t.selection.getRng()),i=x(Af.isInlineTarget,t),ip(e,i,r,o).bind(function(e){return mp(t,n,e)})).isSome();var t,n,e,r,o,i}},moveNextWord:x(hp,!0),movePrevWord:x(hp,!1),setupSelectedState:function(a){var s=Ti(null),l=x(Af.isInlineTarget,a);return a.on("NodeChange",function(e){var t,n,r,o,i;dp(a)&&(t=l,n=a.dom,r=e.parents,o=V(n.select('*[data-mce-selected="inline-boundary"]'),t),i=V(r,t),z(Q(o,i),x(pp,!1)),z(Q(i,o),x(pp,!0)),function(e,t){if(e.selection.isCollapsed()&&!0!==e.composing&&t.get()){var n=ks.fromRangeStart(e.selection.getRng());ks.isTextPosition(n)&&!1===Af.isAtZwsp(n)&&(fp(e,ol.removeAndReposition(t.get(),n)),t.set(null))}}(a,s),function(n,r,o,e){if(r.selection.isCollapsed()){var t=V(e,n);z(t,function(e){var t=ks.fromRangeStart(r.selection.getRng());op(n,r.getBody(),t).bind(function(e){return mp(r,o,e)})})}}(l,a,s,e.parents))}),s},setCaretPosition:fp},vp=function(t,n){return function(e){return jd(n,e).map(function(e){return gp.setCaretPosition(t,e),!0}).getOr(!1)}},bp=function(r,o,i,a){var s=r.getBody(),l=x(Af.isInlineTarget,r);r.undoManager.ignore(function(){var e,t,n;r.selection.setRng((e=i,t=a,(n=document.createRange()).setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n)),r.execCommand("Delete"),op(l,s,ks.fromRangeStart(r.selection.getRng())).map(sp).map(vp(r,o))}),r.nodeChanged()},yp=function(n,r,i,o){var e,t,a=(e=n.getBody(),t=o.container(),Wu(t,e)||e),s=x(Af.isInlineTarget,n),l=op(s,a,o);return l.bind(function(e){return i?e.fold(y(R.some(sp(e))),R.none,y(R.some(ap(e))),R.none):e.fold(R.none,y(R.some(ap(e))),R.none,y(R.some(sp(e))))}).map(vp(n,r)).getOrThunk(function(){var t=fc.navigate(i,a,o),e=t.bind(function(e){return op(s,a,e)});return l.isSome()&&e.isSome()?Af.findRootInline(s,a,o).map(function(e){return o=e,!!rs([fc.firstPositionIn(o),fc.lastPositionIn(o)],function(e,t){var n=Af.normalizePosition(!0,e),r=Af.normalizePosition(!1,t);return fc.nextPosition(o,n).map(function(e){return e.isEqual(r)}).getOr(!0)}).getOr(!0)&&(kd(n,i,Yn.fromDom(e)),!0);var o}).getOr(!1):e.bind(function(e){return t.map(function(e){return i?bp(n,r,o,e):bp(n,r,e,o),!0})}).getOr(!1)})},wp=function(e,t,n){if(e.selection.isCollapsed()&&!1!==e.settings.inline_boundaries){var r=ks.fromRangeStart(e.selection.getRng());return yp(e,t,n,r)}return!1},xp=xr("start","end"),Cp=xr("rng","table","cells"),_p=fd([{removeTable:["element"]},{emptyCells:["cells"]}]),Sp=function(e,t){return Zi(Yn.fromDom(e),"td,th",t)},kp=function(e,t){return Ki(e,"table",t)},Ep=function(e){return!1===Ar.eq(e.start(),e.end())},Tp=function(e,n){return kp(e.start(),n).bind(function(t){return kp(e.end(),n).bind(function(e){return Ar.eq(t,e)?R.some(t):R.none()})})},Np=function(e){return zi(e,"td,th")},Rp=function(r,e){var t=Sp(e.startContainer,r),n=Sp(e.endContainer,r);return e.collapsed?R.none():rs([t,n],xp).fold(function(){return t.fold(function(){return n.bind(function(t){return kp(t,r).bind(function(e){return ee(Np(e)).map(function(e){return xp(e,t)})})})},function(t){return kp(t,r).bind(function(e){return te(Np(e)).map(function(e){return xp(t,e)})})})},function(e){return Op(r,e)?R.none():(n=r,kp((t=e).start(),n).bind(function(e){return te(Np(e)).map(function(e){return xp(t.start(),e)})}));var t,n})},Op=function(e,t){return Tp(t,e).isSome()},Pp=function(e,t){var n,r,o,i,a,s=(n=e,x(Ar.eq,n));return(r=t,o=s,i=Sp(r.startContainer,o),a=Sp(r.endContainer,o),rs([i,a],xp).filter(Ep).filter(function(e){return Op(o,e)}).orThunk(function(){return Rp(o,r)})).bind(function(e){return Tp(t=e,s).map(function(e){return Cp(t,e,Np(e))});var t})},Ap=function(e,t){return X(e,function(e){return Ar.eq(e,t)})},Dp=function(n){return(r=n,rs([Ap(r.cells(),r.rng().start()),Ap(r.cells(),r.rng().end())],function(e,t){return r.cells().slice(e,t+1)})).map(function(e){var t=n.cells();return e.length===t.length?_p.removeTable(n.table()):_p.emptyCells(e)});var r},Mp=function(e,t){return Pp(e,t).bind(Dp)},Ip=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},Lp=Ip,Bp=function(e){return K(e,function(e){var t=Qa(e);return t?[Yn.fromDom(t)]:[]})},Fp=function(e){return 1<Ip(e).length},jp=function(e){return V(Bp(e),mo)},Hp=function(e){return zi(e,"td[data-mce-selected],th[data-mce-selected]")},Up=function(e,t){var n=Hp(t),r=jp(e);return 0<n.length?n:r},zp=Up,Wp=function(e){return Up(Lp(e.selection.getSel()),Yn.fromDom(e.getBody()))},Vp=function(e,t){return z(t,sf),e.selection.setCursorLocation(t[0].dom(),0),!0},qp=function(e,t){return kd(e,!1,t),!0},$p=function(n,e,r,t){return Yp(e,t).fold(function(){return t=n,Mp(e,r).map(function(e){return e.fold(x(qp,t),x(Vp,t))});var t},function(e){return Gp(n,e)}).getOr(!1)},Xp=function(e,t){return $(Jf(t,e),mo)},Yp=function(e,t){return $(Jf(t,e),function(e){return"caption"===nr.name(e)})},Gp=function(e,t){return sf(t),e.selection.setCursorLocation(t.dom(),0),R.some(!0)},Kp=function(s,l,u,c,f){return fc.navigate(u,s.getBody(),f).bind(function(e){return r=c,o=u,i=f,a=e,fc.firstPositionIn(r.dom()).bind(function(t){return fc.lastPositionIn(r.dom()).map(function(e){return o?i.isEqual(t)&&a.isEqual(e):i.isEqual(e)&&a.isEqual(t)})}).getOr(!0)?Gp(s,c):(t=c,n=e,Yp(l,Yn.fromDom(n.getNode())).map(function(e){return!1===Ar.eq(e,t)}));var t,n,r,o,i,a}).or(R.some(!0))},Jp=function(a,s,l,e){var u=ks.fromRangeStart(a.selection.getRng());return Xp(l,e).bind(function(e){return zf(e)?Gp(a,e):(t=a,n=l,r=s,o=e,i=u,fc.navigate(r,t.getBody(),i).bind(function(e){return Xp(n,Yn.fromDom(e.getNode())).map(function(e){return!1===Ar.eq(e,o)})}));var t,n,r,o,i})},Zp=function(a,s,e){var l=Yn.fromDom(a.getBody());return Yp(l,e).fold(function(){return Jp(a,s,l,e)},function(e){return t=a,n=s,r=l,o=e,i=ks.fromRangeStart(t.selection.getRng()),zf(o)?Gp(t,o):Kp(t,r,n,o,i);var t,n,r,o,i}).getOr(!1)},Qp=function(e,t){var n,r,o,i,a,s=Yn.fromDom(e.selection.getStart(!0)),l=Wp(e);return e.selection.isCollapsed()&&0===l.length?Zp(e,t,s):(n=e,r=s,o=Yn.fromDom(n.getBody()),i=n.selection.getRng(),0!==(a=Wp(n)).length?Vp(n,a):$p(n,o,i,r))},em=function(e,t){e.getDoc().execCommand(t,!1,null)},tm=function(e){Nd(e,!1)||wp(e,!1)||ad(e,!1)||Qp(e)||cd(e,!1)||(em(e,"Delete"),Mf(e))},nm=function(e){Nd(e,!0)||wp(e,!0)||ad(e,!0)||Qp(e)||cd(e,!0)||em(e,"ForwardDelete")},rm=function(l){return function(s,e){return R.from(e).map(Yn.fromDom).filter(nr.isElement).bind(function(e){return(r=l,o=s,i=e.dom(),a=function(e){return wr(e,r)},Yi.closest(Yn.fromDom(i),function(e){return a(e).isSome()},function(e){return Ar.eq(Yn.fromDom(o),e)}).bind(a)).or((t=l,n=e.dom(),R.from(ci.DOM.getStyle(n,t,!0))));var t,n,r,o,i,a}).getOr("")}},om={getFontSize:rm("font-size"),getFontFamily:b(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},rm("font-family")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?(n=72*parseInt(e,10)/96,r=t||0,o=Math.pow(10,r),Math.round(n*o)/o+"pt"):e;var n,r,o}},im=function(e){return fc.firstPositionIn(e.getBody()).map(function(e){var t=e.container();return Eo.isText(t)?t.parentNode:t})},am=function(o){return R.from(o.selection.getRng()).bind(function(e){var t,n,r=o.getBody();return n=r,(t=e).startContainer===n&&0===t.startOffset?R.none():R.from(o.selection.getStart(!0))})},sm=function(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=au(e),o=su(e);return o?o[n-1]||t:r[n-1]||t}return t}return t},lm=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},um=function(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)},cm=function(e,t,n){return um(e,t,function(e){return e.nodeName===n})},fm=function(e){return e&&"TABLE"===e.nodeName},dm=function(e,t,n){for(var r=new Qr(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(Eo.isBr(t))return!0},pm=function(e,t,n,r,o){var i,a,s,l,u,c,f=e.getRoot(),d=e.schema.getNonEmptyElements();if(s=e.getParent(o.parentNode,e.isBlock)||f,r&&Eo.isBr(o)&&t&&e.isEmpty(s))return R.some(Cs(o.parentNode,e.nodeIndex(o)));for(i=new Qr(o,s);l=i[r?"prev":"next"]();){if("false"===e.getContentEditableParent(l)||(c=f,Ta(u=l)&&!1===um(u,c,Xs)))return R.none();if(Eo.isText(l)&&0<l.nodeValue.length)return!1===cm(l,f,"A")?R.some(Cs(l,r?l.nodeValue.length:0)):R.none();if(e.isBlock(l)||d[l.nodeName.toLowerCase()])return R.none();a=l}return n&&a?R.some(Cs(a,0)):R.none()},mm=function(e,t,n,r){var o,i,a,s,l,u,c,f,d,p,m=e.getRoot(),h=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],c=Eo.isElement(o)&&i===o.childNodes.length,l=e.schema.getNonEmptyElements(),u=n,Ta(o))return R.none();if(Eo.isElement(o)&&i>o.childNodes.length-1&&(u=!1),Eo.isDocument(o)&&(o=m,i=0),o===m){if(u&&(s=o.childNodes[0<i?i-1:0])){if(Ta(s))return R.none();if(l[s.nodeName]||fm(s))return R.none()}if(o.hasChildNodes()){if(i=Math.min(!u&&0<i?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Eo.isText(o)&&c?o.data.length:0,!t&&o===m.lastChild&&fm(o))return R.none();if(function(e,t){for(;t&&t!==e;){if(Eo.isContentEditableFalse(t))return!0;t=t.parentNode}return!1}(m,o)||Ta(o))return R.none();if(o.hasChildNodes()&&!1===fm(o)){a=new Qr(s=o,m);do{if(Eo.isContentEditableFalse(s)||Ta(s)){h=!1;break}if(Eo.isText(s)&&0<s.nodeValue.length){i=u?0:s.nodeValue.length,o=s,h=!0;break}if(l[s.nodeName.toLowerCase()]&&(!(f=s)||!/^(TD|TH|CAPTION)$/.test(f.nodeName))){i=e.nodeIndex(s),o=s.parentNode,u||i++,h=!0;break}}while(s=u?a.next():a.prev())}}}return t&&(Eo.isText(o)&&0===i&&pm(e,c,t,!0,o).each(function(e){o=e.container(),i=e.offset(),h=!0}),Eo.isElement(o)&&((s=o.childNodes[i])||(s=o.childNodes[i-1]),!s||!Eo.isBr(s)||(p="A",(d=s).previousSibling&&d.previousSibling.nodeName===p)||dm(e,s,!1)||dm(e,s,!0)||pm(e,c,t,!0,s).each(function(e){o=e.container(),i=e.offset(),h=!0}))),u&&!t&&Eo.isText(o)&&i===o.nodeValue.length&&pm(e,c,t,!1,o).each(function(e){o=e.container(),i=e.offset(),h=!0}),h?R.some(Cs(o,i)):R.none()},hm=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=Cs.fromRangeStart(t);return mm(e,n,!0,r).each(function(e){n&&Cs.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||mm(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),lm(t,r)?R.none():R.some(r)},gm=function(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},vm=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},bm=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();hm(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var s=a.startOffset,l=a.startContainer;if(1===l.nodeType&&l.hasChildNodes()){var u=s>l.childNodes.length-1;l=l.childNodes[Math.min(s,l.childNodes.length-1)]||l,s=u&&3===l.nodeType?l.nodeValue.length:0}var c=i.getParent(l,i.isBlock),f=c?i.getParent(c.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",p=t&&t.ctrlKey;"LI"!==d||p||(c=f),l&&3===l.nodeType&&s>=l.nodeValue.length&&(function(e,t,n){for(var r,o=new Qr(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0}(e.schema,l,c)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),a.insertNode(n),gm(i,o,n),vm(i,o,n,r),e.undoManager.add()},ym=function(e,t){var n=Yn.fromTag("br");xi.before(Yn.fromDom(t),n),e.undoManager.add()},wm=function(e,t){xm(e.getBody(),t)||xi.after(Yn.fromDom(t),Yn.fromTag("br"));var n=Yn.fromTag("br");xi.after(Yn.fromDom(t),n),gm(e.dom,e.selection,n.dom()),vm(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},xm=function(e,t){return n=ks.after(t),!!Eo.isBr(n.getNode())||fc.nextPosition(e,ks.after(t)).map(function(e){return Eo.isBr(e.getNode())}).getOr(!1);var n},Cm=function(e){return e&&"A"===e.nodeName&&"href"in e},_m=function(e){return e.fold(y(!1),Cm,Cm,y(!1))},Sm=function(e,t){t.fold(v,x(ym,e),x(wm,e),v)},km=function(e,t){var n,r,o,i=(n=e,r=x(Af.isInlineTarget,n),o=ks.fromRangeStart(n.selection.getRng()),op(r,n.getBody(),o).filter(_m));i.isSome()?i.each(x(Sm,e)):bm(e,t)},Em=fd([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Tm=(Em.before,Em.on,Em.after,function(e){return e.fold(w,w,w)}),Nm=fd([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Rm=xr("start","soffset","finish","foffset"),Om={domRange:Nm.domRange,relative:Nm.relative,exact:Nm.exact,exactFromRange:function(e){return Nm.exact(e.start(),e.soffset(),e.finish(),e.foffset())},range:Rm,getWin:function(e){var t=e.match({domRange:function(e){return Yn.fromDom(e.startContainer)},relative:function(e,t){return Tm(e)},exact:function(e,t,n,r){return e}});return jr.defaultView(t)}},Pm=$n.detect().browser,Am=function(e,t){var n=nr.isText(t)?Uc(t).length:jr.children(t).length+1;return n<e?n:e<0?0:e},Dm=function(e){return Om.range(e.start(),Am(e.soffset(),e.start()),e.finish(),Am(e.foffset(),e.finish()))},Mm=function(e,t){return Ar.contains(e,t)||Ar.eq(e,t)},Im=function(t){return function(e){return Mm(t,e.start())&&Mm(t,e.finish())}},Lm=function(e){return!0===e.inline||Pm.isIE()},Bm=function(e){return Om.range(Yn.fromDom(e.startContainer),e.startOffset,Yn.fromDom(e.endContainer),e.endOffset)},Fm=function(e){var t=e.getSelection();return(t&&0!==t.rangeCount?R.from(t.getRangeAt(0)):R.none()).map(Bm)},jm=function(e){var t=jr.defaultView(e);return Fm(t.dom()).filter(Im(e))},Hm=function(e,t){return R.from(t).filter(Im(e)).map(Dm)},Um=function(e){var t=document.createRange();try{return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),R.some(t)}catch(e){return R.none()}},zm=function(e){return(e.bookmark?e.bookmark:R.none()).bind(x(Hm,Yn.fromDom(e.getBody()))).bind(Um)},Wm=function(e){var t=Lm(e)?jm(Yn.fromDom(e.getBody())):R.none();e.bookmark=t.isSome()?t:e.bookmark},Vm=function(t){zm(t).each(function(e){t.selection.setRng(e)})},qm=zm,$m=function(e,t){var n=e.settings,r=e.dom,o=e.selection,i=e.formatter,a=/[a-z%]+$/i.exec(n.indentation)[0],s=parseInt(n.indentation,10),l=e.getParam("indent_use_margin",!1);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||(n.forced_root_block||r.getParent(o.getNode(),r.isBlock)||i.apply("div"),z(o.getSelectedBlocks(),function(e){return function(e,t,n,r,o,i){if("false"!==e.getContentEditable(i)&&"LI"!==i.nodeName){var a=n?"margin":"padding";if(a="TABLE"===i.nodeName?"margin":a,a+="rtl"===e.getStyle(i,"direction",!0)?"Right":"Left","outdent"===t){var s=Math.max(0,parseInt(i.style[a]||0,10)-r);e.setStyle(i,a,s?s+o:"")}else s=parseInt(i.style[a]||0,10)+r+o,e.setStyle(i,a,s)}}(r,t,l,s,a,e)}))},Xm=Gt.each,Ym=Gt.extend,Gm=Gt.map,Km=Gt.inArray;function Jm(s){var o,i,a,t,l={state:{},exec:{},value:{}},n=s.settings;s.on("PreInit",function(){o=s.dom,i=s.selection,n=s.settings,a=s.formatter});var r=function(e){var t;if(!s.quirks.isHidden()&&!s.removed){if(e=e.toLowerCase(),t=l.state[e])return t(e);try{return s.getDoc().queryCommandState(e)}catch(e){}return!1}},e=function(e,n){n=n||"exec",Xm(e,function(t,e){Xm(e.toLowerCase().split(","),function(e){l[n][e]=t})})},u=function(e,t,n){e=e.toLowerCase(),l.value[e]=function(){return t.call(n||s)}};Ym(this,{execCommand:function(t,n,r,e){var o,i,a=!1;if(!s.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus?Vm(s):s.focus(),(e=s.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=l.exec[i])return o(i,n,r),s.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(Xm(s.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,r))return s.fire("ExecCommand",{command:t,ui:n,value:r}),!(a=!0)}),a)return a;if(s.theme&&s.theme.execCommand&&s.theme.execCommand(t,n,r))return s.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{a=s.getDoc().execCommand(t,n,r)}catch(e){}return!!a&&(s.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},queryCommandState:r,queryCommandValue:function(e){var t;if(!s.quirks.isHidden()&&!s.removed){if(e=e.toLowerCase(),t=l.value[e])return t(e);try{return s.getDoc().queryCommandValue(e)}catch(e){}}},queryCommandSupported:function(e){if(e=e.toLowerCase(),l.exec[e])return!0;try{return s.getDoc().queryCommandSupported(e)}catch(e){}return!1},addCommands:e,addCommand:function(e,o,i){e=e.toLowerCase(),l.exec[e]=function(e,t,n,r){return o.call(i||s,t,n,r)}},addQueryStateHandler:function(e,t,n){e=e.toLowerCase(),l.state[e]=function(){return t.call(n||s)}},addQueryValueHandler:u,hasCustomCommand:function(e){return e=e.toLowerCase(),!!l.exec[e]}});var c=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=null),s.getDoc().execCommand(e,t,n)},f=function(e){return a.match(e)},d=function(e,t){a.toggle(e,t?{value:t}:void 0),s.nodeChanged()},p=function(e){t=i.getBookmark(e)},m=function(){i.moveToBookmark(t)};e({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){s.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=s.getDoc();try{c(e)}catch(e){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var r=s.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");Oe.mac&&(r=r.replace(/Ctrl\+/g,"⌘+")),s.notificationManager.open({text:r,type:"error"})}},unlink:function(){if(i.isCollapsed()){var e=s.dom.getParent(s.selection.getStart(),"a");e&&s.dom.remove(e,!0)}else a.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),Xm("left,center,right,justify".split(","),function(e){t!==e&&a.remove("align"+e)}),"none"!==t&&d("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;c(e),(t=o.getParent(i.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(p(),o.split(n,t),m()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){d(e)},"ForeColor,HiliteColor":function(e,t,n){d(e,n)},FontName:function(e,t,n){var r,o;o=n,(r=s).formatter.toggle("fontname",{value:sm(r,o)}),r.nodeChanged()},FontSize:function(e,t,n){var r,o;o=n,(r=s).formatter.toggle("fontsize",{value:sm(r,o)}),r.nodeChanged()},RemoveFormat:function(e){a.remove(e)},mceBlockQuote:function(){d("blockquote")},FormatBlock:function(e,t,n){return d(n||"p")},mceCleanup:function(){var e=i.getBookmark();s.setContent(s.getContent()),i.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||i.getNode();r!==s.getBody()&&(p(),s.dom.remove(r,!0),m())},mceSelectNodeDepth:function(e,t,n){var r=0;o.getParent(i.getNode(),function(e){if(1===e.nodeType&&r++===n)return i.select(e),!1},s.getBody())},mceSelectNode:function(e,t,n){i.select(n)},mceInsertContent:function(e,t,n){vf(s,n)},mceInsertRawHTML:function(e,t,n){i.setContent("tiny_mce_marker");var r=s.getContent();s.setContent(r.replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){d(n)},mceSetContent:function(e,t,n){s.setContent(n)},"Indent,Outdent":function(e){$m(s,e)},mceRepaint:function(){},InsertHorizontalRule:function(){s.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){s.hasVisual=!s.hasVisual,s.addVisual()},mceReplaceContent:function(e,t,n){s.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=o.getParent(i.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||a.remove("link"),n.href&&a.apply("link",n,r)},selectAll:function(){var e=o.getParent(i.getStart(),Eo.isContentEditableTrue);if(e){var t=o.createRng();t.selectNodeContents(e),i.setRng(t)}},delete:function(){tm(s)},forwardDelete:function(){nm(s)},mceNewDocument:function(){s.setContent("")},InsertLineBreak:function(e,t,n){return km(s,n),!0}});var h=function(n){return function(){var e=i.isCollapsed()?[o.getParent(i.getNode(),o.isBlock)]:i.getSelectedBlocks(),t=Gm(e,function(e){return!!a.matchNode(e,n)});return-1!==Km(t,!0)}};e({JustifyLeft:h("alignleft"),JustifyCenter:h("aligncenter"),JustifyRight:h("alignright"),JustifyFull:h("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return f(e)},mceBlockQuote:function(){return f("blockquote")},Outdent:function(){var e;if(n.inline_styles){if((e=o.getParent(i.getStart(),o.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0;if((e=o.getParent(i.getEnd(),o.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0}return r("InsertUnorderedList")||r("InsertOrderedList")||!n.inline_styles&&!!o.getParent(i.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=o.getParent(i.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),e({Undo:function(){s.undoManager.undo()},Redo:function(){s.undoManager.redo()}}),u("FontName",function(){return am(t=s).fold(function(){return im(t).map(function(e){return om.getFontFamily(t.getBody(),e)}).getOr("")},function(e){return om.getFontFamily(t.getBody(),e)});var t},this),u("FontSize",function(){return am(t=s).fold(function(){return im(t).map(function(e){return om.getFontSize(t.getBody(),e)}).getOr("")},function(e){return om.getFontSize(t.getBody(),e)});var t},this)}var Zm=Gt.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," "),Qm=function(a){var s,l,u=this,c={},f=function(){return!1},d=function(){return!0};s=(a=a||{}).scope||u,l=a.toggleEvent||f;var r=function(e,t,n,r){var o,i,a;if(!1===t&&(t=f),t)for(t={func:t},r&&Gt.extend(t,r),a=(i=e.toLowerCase().split(" ")).length;a--;)e=i[a],(o=c[e])||(o=c[e]=[],l(e,!0)),n?o.unshift(t):o.push(t);return u},p=function(e,t){var n,r,o,i,a;if(e)for(n=(i=e.toLowerCase().split(" ")).length;n--;){if(e=i[n],r=c[e],!e){for(o in c)l(o,!1),delete c[o];return u}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),c[e]=r);else r.length=0;r.length||(l(e,!1),delete c[e])}}else{for(e in c)l(e,!1);c={}}return u};u.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=s),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=d},t.stopPropagation=function(){t.isPropagationStopped=d},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=d},t.isDefaultPrevented=f,t.isPropagationStopped=f,t.isImmediatePropagationStopped=f),a.beforeFire&&a.beforeFire(t),n=c[e])for(r=0,o=n.length;r<o;r++){if((i=n[r]).once&&p(e,i.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(!1===i.func.call(s,t))return t.preventDefault(),t}return t},u.on=r,u.off=p,u.once=function(e,t,n){return r(e,t,n,{once:!0})},u.has=function(e){return e=e.toLowerCase(),!(!c[e]||0===c[e].length)}};Qm.isNative=function(e){return!!Zm[e.toLowerCase()]};var eh,th=function(n){return n._eventDispatcher||(n._eventDispatcher=new Qm({scope:n,toggleEvent:function(e,t){Qm.isNative(e)&&n.toggleNativeEvent&&n.toggleNativeEvent(e,t)}})),n._eventDispatcher},nh={fire:function(e,t,n){if(this.removed&&"remove"!==e)return t;if(t=th(this).fire(e,t,n),!1!==n&&this.parent)for(var r=this.parent();r&&!t.isPropagationStopped();)r.fire(e,t,!1),r=r.parent();return t},on:function(e,t,n){return th(this).on(e,t,n)},off:function(e,t){return th(this).off(e,t)},once:function(e,t){return th(this).once(e,t)},hasEventListeners:function(e){return th(this).has(e)}},rh=function(e,t){return e.fire("PreProcess",t)},oh=function(e,t){return e.fire("PostProcess",t)},ih=function(e){return e.fire("remove")},ah=function(e,t){return e.fire("SwitchMode",{mode:t})},sh=function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})},lh=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},uh=function(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(e){}},ch=function(e,t){var n,r,o;n=Yn.fromDom(e.getBody()),r="mce-content-readonly",o=t,Ui.has(n,r)&&!1===o?Ui.remove(n,r):o&&Ui.add(n,r),t?(e.selection.controlSelection.hideResizeRect(),e.readonly=!0,e.getBody().contentEditable="false"):(e.readonly=!1,e.getBody().contentEditable="true",uh(e,"StyleWithCSS",!1),uh(e,"enableInlineTableEditing",!1),uh(e,"enableObjectResizing",!1),e.focus(),e.nodeChanged())},fh=function(e){return e.readonly?"readonly":"design"},dh=ci.DOM,ph=function(e,t){return"selectionchange"===t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=dh.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()},mh=function(e,t,n){var r;(r=e).hidden||r.readonly?!0===e.readonly&&n.preventDefault():e.fire(t,n)},hh=function(i,a){var e,t;if(i.delegates||(i.delegates={}),!i.delegates[a]&&!i.removed)if(e=ph(i,a),i.settings.event_root){if(eh||(eh={},i.editorManager.on("removeEditor",function(){var e;if(!i.editorManager.activeEditor&&eh){for(e in eh)i.dom.unbind(ph(i,e));eh=null}})),eh[a])return;t=function(e){for(var t=e.target,n=i.editorManager.get(),r=n.length;r--;){var o=n[r].getBody();(o===t||dh.isChildOf(t,o))&&mh(n[r],a,e)}},eh[a]=t,dh.bind(e,a,t)}else t=function(e){mh(i,a,e)},dh.bind(e,a,t),i.delegates[a]=t},gh={bindPendingEventDelegates:function(){var t=this;Gt.each(t._pendingNativeEvents,function(e){hh(t,e)})},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?hh(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(ph(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this,n=t.getBody(),r=t.dom;if(t.delegates){for(e in t.delegates)t.dom.unbind(ph(t,e),e,t.delegates[e]);delete t.delegates}!t.inline&&n&&r&&(n.onload=null,r.unbind(t.getWin()),r.unbind(t.getDoc())),r&&(r.unbind(n),r.unbind(t.getContainer()))}},vh=gh=Gt.extend({},nh,gh),bh=Gt.each,yh=Gt.explode,wh={f9:120,f10:121,f11:122},xh=Gt.makeMap("alt,ctrl,shift,meta,access");function Ch(i){var a={},r=[],s=function(e){var t,n,r={};for(n in bh(yh(e,"+"),function(e){e in xh?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=wh[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],xh)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,Oe.mac?r.ctrl=!0:r.shift=!0),r.meta&&(Oe.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},l=function(e,t,n,r){var o;return(o=Gt.map(yh(e,">"),s))[o.length-1]=Gt.extend(o[o.length-1],{func:n,scope:r||i}),Gt.extend(o[0],{desc:i.translate(t),subpatterns:o.slice(1)})},o=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},u=function(e){return e.func?e.func.call(e.scope):null};i.on("keyup keypress keydown",function(t){var e,n;((n=t).altKey||n.ctrlKey||n.metaKey||"keydown"===(e=t).type&&112<=e.keyCode&&e.keyCode<=123)&&!t.isDefaultPrevented()&&(bh(a,function(e){if(o(t,e))return r=e.subpatterns.slice(0),"keydown"===t.type&&u(e),!0}),o(t,r[0])&&(1===r.length&&"keydown"===t.type&&u(r[0]),r.shift()))}),this.add=function(e,n,r,o){var t;return"string"==typeof(t=r)?r=function(){i.execCommand(t,!1,null)}:Gt.isArray(t)&&(r=function(){i.execCommand(t[0],t[1],t[2])}),bh(yh(Gt.trim(e.toLowerCase())),function(e){var t=l(e,n,r,o);a[t.id]=t}),!0},this.remove=function(e){var t=l(e);return!!a[t.id]&&(delete a[t.id],!0)}}var _h=function(e){var t=void 0!==e?e.dom():document;return R.from(t.activeElement).map(Yn.fromDom)},Sh=function(e){var t=jr.owner(e).dom();return e.dom()===t.activeElement},kh=function(t){return _h(jr.owner(t)).filter(function(e){return t.dom().contains(e.dom())})},Eh=function(t,e){return(n=e,n.collapsed?R.from(es(n.startContainer,n.startOffset)).map(Yn.fromDom):R.none()).bind(function(e){return po(e)?R.some(e):!1===Ar.contains(t,e)?R.some(t):R.none()});var n},Th=function(t,e){Eh(Yn.fromDom(t.getBody()),e).bind(function(e){return fc.firstPositionIn(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})},Nh=function(t){if(t.setActive)try{t.setActive()}catch(e){t.focus()}else t.focus()},Rh=function(e){var t,n=e.getBody();return n&&(t=Yn.fromDom(n),Sh(t)||kh(t).isSome())},Oh=function(e){return e.inline?Rh(e):(t=e).iframeElement&&Sh(Yn.fromDom(t.iframeElement));var t},Ph=function(e){return e.editorManager.setActive(e)},Ah=function(e,t){e.removed||(t?Ph(e):function(t){var e=t.selection,n=t.settings.content_editable,r=t.getBody(),o=e.getRng();t.quirks.refreshContentEditable();var i,a,s=(i=t,a=e.getNode(),i.dom.getParent(a,function(e){return"true"===i.dom.getContentEditable(e)}));if(t.$.contains(r,s))return Nh(s),Th(t,o),Ph(t);void 0!==t.bookmark&&!1===Oh(t)&&qm(t).each(function(e){t.selection.setRng(e),o=e}),n||(Oe.opera||Nh(r),t.getWin().focus()),(Oe.gecko||n)&&(Nh(r),Th(t,o)),Ph(t)}(e))},Dh=Oh,Mh=function(e,t){return t.dom()[e]},Ih=function(e,t){return parseInt(yr(t,e),10)},Lh=x(Mh,"clientWidth"),Bh=x(Mh,"clientHeight"),Fh=x(Ih,"margin-top"),jh=x(Ih,"margin-left"),Hh=function(e,t,n){var r,o,i,a,s,l,u,c,f,d,p=Yn.fromDom(e.getBody()),m=e.inline?p:jr.documentElement(p),h=(r=e.inline,i=t,a=n,s=(o=m).dom().getBoundingClientRect(),{x:i-(r?s.left+o.dom().clientLeft+jh(o):0),y:a-(r?s.top+o.dom().clientTop+Fh(o):0)});return u=h.x,c=h.y,f=Lh(l=m),d=Bh(l),0<=u&&0<=c&&u<=f&&c<=d},Uh=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,R.from(t).map(Yn.fromDom)).map(function(e){return Ar.contains(jr.owner(e),e)}).getOr(!1)};function zh(n){var t,o=[],i=function(){var e,t=n.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():{open:e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:e,reposition:e,getArgs:e}},a=function(){0<o.length&&i().reposition(o)},s=function(t){X(o,function(e){return e===t}).each(function(e){o.splice(e,1)})},r=function(r){if(!n.removed&&Uh(n))return $(o,function(e){return t=i().getArgs(e),n=r,!(t.type!==n.type||t.text!==n.text||t.progressBar||t.timeout||n.progressBar||n.timeout);var t,n}).getOrThunk(function(){n.editorManager.setActive(n);var e,t=i().open(r,function(){s(t),a()});return e=t,o.push(e),a(),t})};return(t=n).on("SkinLoaded",function(){var e=t.settings.service_message;e&&r({text:e,type:"warning",timeout:0,icon:""})}),t.on("ResizeEditor ResizeWindow",function(){Ie.requestAnimationFrame(a)}),t.on("remove",function(){z(o.slice(),function(e){i().close(e)})}),{open:r,close:function(){R.from(o[0]).each(function(e){i().close(e),s(e),a()})},getNotifications:function(){return o}}}function Wh(r){var o=[],i=function(){var e,t=r.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():{open:e=function(){throw new Error("Theme did not provide a WindowManager implementation.")},alert:e,confirm:e,close:e,getParams:e,setParams:e}},a=function(e,t){return function(){return t?t.apply(e,arguments):void 0}},s=function(e){var t;o.push(e),t=e,r.fire("OpenWindow",{win:t})},l=function(n){X(o,function(e){return e===n}).each(function(e){var t;o.splice(e,1),t=n,r.fire("CloseWindow",{win:t}),0===o.length&&r.focus()})},e=function(){return R.from(o[o.length-1])};return r.on("remove",function(){z(o.slice(0),function(e){i().close(e)})}),{windows:o,open:function(e,t){r.editorManager.setActive(r),Wm(r);var n=i().open(e,t,l);return s(n),n},alert:function(e,t,n){var r=i().alert(e,a(n||this,t),l);s(r)},confirm:function(e,t,n){var r=i().confirm(e,a(n||this,t),l);s(r)},close:function(){e().each(function(e){i().close(e),l(e)})},getParams:function(){return e().map(i().getParams).getOr(null)},setParams:function(t){e().each(function(e){i().setParams(e,t)})},getWindows:function(){return o}}}var Vh=bi.PluginManager,qh=function(e,t){var n=function(e,t){for(var n in Vh.urls)if(Vh.urls[n]+"/plugin"+t+".js"===e)return n;return null}(t,e.suffix);return n?"Failed to load plugin: "+n+" from url "+t:"Failed to load plugin url: "+t},$h=function(e,t){e.notificationManager.open({type:"error",text:t})},Xh=function(e,t){e._skinLoaded?$h(e,t):e.on("SkinLoaded",function(){$h(e,t)})},Yh=function(e,t){Xh(e,qh(e,t))},Gh=function(e,t){Xh(e,"Failed to upload image: "+t)},Kh=Xh,Jh=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=window.console;r&&(r.error?r.error.apply(r,arguments):r.log.apply(r,arguments))},Zh=bi.PluginManager,Qh=bi.ThemeManager;function eg(){return new(ie.getOrDie("XMLHttpRequest"))}function tg(s,l){var r={},n=function(e,r,o,t){var i,n;(i=eg()).open("POST",l.url),i.withCredentials=l.credentials,i.upload.onprogress=function(e){t(e.loaded/e.total*100)},i.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,t,n;i.status<200||300<=i.status?o("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?r((t=l.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):o("Invalid JSON: "+i.responseText)},(n=new FormData).append("file",e.blob(),e.filename()),i.send(n)},u=function(e,t){return{url:t,blobInfo:e,status:!0}},c=function(e,t){return{url:"",blobInfo:e,status:!1,error:t}},f=function(e,t){Gt.each(r[e],function(e){e(t)}),delete r[e]},o=function(e,n){return e=Gt.grep(e,function(e){return!s.isUploaded(e.blobUri())}),Pe.all(Gt.map(e,function(e){return s.isPending(e.blobUri())?(t=e.blobUri(),new Pe(function(e){r[t]=r[t]||[],r[t].push(e)})):(o=e,i=l.handler,a=n,s.markPending(o.blobUri()),new Pe(function(t){var n;try{var r=function(){n&&n.close()};i(o,function(e){r(),s.markUploaded(o.blobUri(),e),f(o.blobUri(),u(o,e)),t(u(o,e))},function(e){r(),s.removeFailed(o.blobUri()),f(o.blobUri(),c(o,e)),t(c(o,e))},function(e){e<0||100<e||(n||(n=a()),n.progressBar.value(e))})}catch(e){t(c(o,e.message))}}));var o,i,a,t}))};return!1===L(l.handler)&&(l.handler=n),{upload:function(e,t){return l.url||l.handler!==n?o(e,t):new Pe(function(e){e([])})}}}var ng=function(e){return ie.getOrDie("atob")(e)},rg=function(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}},og=function(a){return new Pe(function(t){var e,n,r,o,i=rg(a);try{e=ng(i.data)}catch(e){return void t(new Blob([]))}for(o=e.length,n=new(ie.getOrDie("Uint8Array"))(o),r=0;r<n.length;r++)n[r]=e.charCodeAt(r);t(new Blob([n],{type:i.type}))})},ig=function(e){return 0===e.indexOf("blob:")?(o=e,new Pe(function(e,t){var n=function(){t("Cannot convert "+o+" to Blob. Resource might not exist or is inaccessible.")};try{var r=eg();r.open("GET",o,!0),r.responseType="blob",r.onload=function(){200===this.status?e(this.response):n()},r.onerror=n,r.send()}catch(e){n()}})):0===e.indexOf("data:")?og(e):null;var o},ag=function(n){return new Pe(function(e){var t=new(ie.getOrDie("FileReader"));t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})},sg=rg,lg=0,ug=function(e){return(e||"blobid")+lg++},cg=function(n,r,o,t){var i,a;0!==r.src.indexOf("blob:")?(i=sg(r.src).data,(a=n.findFirst(function(e){return e.base64()===i}))?o({image:r,blobInfo:a}):ig(r.src).then(function(e){a=n.create(ug(),e,i),n.add(a),o({image:r,blobInfo:a})},function(e){t(e)})):(a=n.getByUri(r.src))?o({image:r,blobInfo:a}):ig(r.src).then(function(t){ag(t).then(function(e){i=sg(e).data,a=n.create(ug(),t,i),n.add(a),o({image:r,blobInfo:a})})},function(e){t(e)})},fg=function(e){return e?e.getElementsByTagName("img"):[]},dg=0,pg={uuid:function(e){return e+dg+++(t=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+t()+t()+t());var t}};function mg(s){var n,o,i,t,e,a,r,l,u,c,f=(n=[],o=ba.constant,i=function(e){var t,n,r;if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return t=e.id||pg.uuid("blobid"),n=e.name||t,{id:o(t),name:o(n),filename:o(n+"."+(r=e.blob.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[r.toLowerCase()]||"dat")),blob:o(e.blob),base64:o(e.base64),blobUri:o(e.blobUri||se.createObjectURL(e.blob)),uri:o(e.uri)}},{create:function(e,t,n,r){if(P(e))return i({id:e,name:r,blob:t,base64:n});if(A(e))return i(e);throw new Error("Unknown input type")},add:function(e){t(e.id())||n.push(e)},get:t=function(t){return e(function(e){return e.id()===t})},getByUri:function(t){return e(function(e){return e.blobUri()===t})},findFirst:e=function(e){return Vt.filter(n,e)[0]},removeByUri:function(t){n=Vt.filter(n,function(e){return e.blobUri()!==t||(se.revokeObjectURL(e.blobUri()),!1)})},destroy:function(){Vt.each(n,function(e){se.revokeObjectURL(e.blobUri())}),n=[]}}),d=(l={},u=function(e,t){return{status:e,resultUri:t}},{hasBlobUri:c=function(e){return e in l},getResultUri:function(e){var t=l[e];return t?t.resultUri:null},isPending:function(e){return!!c(e)&&1===l[e].status},isUploaded:function(e){return!!c(e)&&2===l[e].status},markPending:function(e){l[e]=u(1,null)},markUploaded:function(e,t){l[e]=u(2,t)},removeFailed:function(e){delete l[e]},destroy:function(){l={}}}),p=[],m=function(t){return function(e){return s.selection?t(e):[]}},h=function(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e},g=function(e,t,n){return e=h(e,'src="'+t+'"','src="'+n+'"'),e=h(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},v=function(t,n){z(s.undoManager.data,function(e){"fragmented"===e.type?e.fragments=U(e.fragments,function(e){return g(e,t,n)}):e.content=g(e.content,t,n)})},b=function(){return s.notificationManager.open({text:s.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})},y=function(e,t){f.removeByUri(e.src),v(e.src,t),s.$(e).attr({src:cu(s)?t+"?"+(new Date).getTime():t,"data-mce-src":s.convertURL(t,"src")})},w=function(n){return a||(a=tg(d,{url:du(s),basePath:pu(s),credentials:mu(s),handler:hu(s)})),_().then(m(function(r){var e;return e=U(r,function(e){return e.blobInfo}),a.upload(e,b).then(m(function(e){var t=U(e,function(e,t){var n=r[t].image;return e.status&&fu(s)?y(n,e.url):e.error&&Gh(s,e.error),{element:n,status:e.status}});return n&&n(t),t}))}))},x=function(e){if(uu(s))return w(e)},C=function(t){return!1!==J(p,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||lu(s)(t))},_=function(){var o,i,a;return r||(o=d,i=f,a={},r={findAll:function(e,n){var t;n||(n=ba.constant(!0)),t=Vt.filter(fg(e),function(e){var t=e.src;return!!Oe.fileApi&&!e.hasAttribute("data-mce-bogus")&&!e.hasAttribute("data-mce-placeholder")&&!(!t||t===Oe.transparentSrc)&&(0===t.indexOf("blob:")?!o.isUploaded(t)&&n(e):0===t.indexOf("data:")&&n(e))});var r=Vt.map(t,function(n){if(a[n.src])return new Pe(function(t){a[n.src].then(function(e){if("string"==typeof e)return e;t({image:n,blobInfo:e.blobInfo})})});var e=new Pe(function(e,t){cg(i,n,e,t)}).then(function(e){return delete a[e.image.src],e}).catch(function(e){return delete a[n.src],e});return a[n.src]=e});return Pe.all(r)}}),r.findAll(s.getBody(),C).then(m(function(e){return e=V(e,function(e){return"string"!=typeof e||(Kh(s,e),!1)}),z(e,function(e){v(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),e}))},S=function(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var t=d.getResultUri(n);if(t)return'src="'+t+'"';var r=f.getByUri(n);return r||(r=q(s.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null)),r?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':e})};return s.on("setContent",function(){uu(s)?x():_()}),s.on("RawSaveContent",function(e){e.content=S(e.content)}),s.on("getContent",function(e){e.source_view||"raw"===e.format||(e.content=S(e.content))}),s.on("PostRender",function(){s.parser.addNodeFilter("img",function(e){z(e,function(e){var t=e.attr("src");if(!f.getByUri(t)){var n=d.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:f,addFilter:function(e){p.push(e)},uploadImages:w,uploadImagesAuto:x,scanForImages:_,destroy:function(){f.destroy(),d.destroy(),r=a=null}}}var hg=function(e,t){return e.hasOwnProperty(t.nodeName)},gg=function(e,t){if(Eo.isText(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||hg(e,t.nextSibling)))return!0}return!1},vg=function(e){var t,n,r,o,i,a,s,l,u,c,f,d=e.settings,p=e.dom,m=e.selection,h=e.schema,g=h.getBlockElements(),v=m.getStart(),b=e.getBody();if(f=d.forced_root_block,v&&Eo.isElement(v)&&f&&(c=b.nodeName.toLowerCase(),h.isValidChild(c,f.toLowerCase())&&(y=g,w=b,x=v,!H(Kf(Yn.fromDom(x),Yn.fromDom(w)),function(e){return hg(y,e.dom())})))){var y,w,x,C,_;for(n=(t=m.getRng()).startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,u=Dh(e),v=b.firstChild;v;)if(C=g,_=v,Eo.isText(_)||Eo.isElement(_)&&!hg(C,_)&&!xc(_)){if(gg(g,v)){v=(s=v).nextSibling,p.remove(s);continue}a||(a=p.create(f,e.settings.forced_root_block_attrs),v.parentNode.insertBefore(a,v),l=!0),v=(s=v).nextSibling,a.appendChild(s)}else a=null,v=v.nextSibling;l&&u&&(t.setStart(n,r),t.setEnd(o,i),m.setRng(t),e.nodeChanged())}},bg=function(e){e.settings.forced_root_block&&e.on("NodeChange",x(vg,e))},yg=function(t){return jr.firstChild(t).fold(y([t]),function(e){return[t].concat(yg(e))})},wg=function(t){return jr.lastChild(t).fold(y([t]),function(e){return"br"===nr.name(e)?jr.prevSibling(e).map(function(e){return[t].concat(wg(e))}).getOr([]):[t].concat(wg(e))})},xg=function(o,e){return rs([(i=e,a=i.startContainer,s=i.startOffset,Eo.isText(a)?0===s?R.some(Yn.fromDom(a)):R.none():R.from(a.childNodes[s]).map(Yn.fromDom)),(t=e,n=t.endContainer,r=t.endOffset,Eo.isText(n)?r===n.data.length?R.some(Yn.fromDom(n)):R.none():R.from(n.childNodes[r-1]).map(Yn.fromDom))],function(e,t){var n=$(yg(o),x(Ar.eq,e)),r=$(wg(o),x(Ar.eq,t));return n.isSome()&&r.isSome()}).getOr(!1);var t,n,r,i,a,s},Cg=function(e,t,n,r){var o=n,i=new Qr(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==Gt.trim(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(Oe.ie&&Oe.ie<11&&e.isBlock(n)&&e.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},_g=function(e){var t=e.selection.getSel();return t&&0<t.rangeCount};function Sg(i){var r,o=[];"onselectionchange"in i.getDoc()||i.on("NodeChange Click MouseUp KeyUp Focus",function(e){var t,n;n={startContainer:(t=i.selection.getRng()).startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset},"nodechange"!==e.type&&lm(n,r)||i.fire("SelectionChange"),r=n}),i.on("contextmenu",function(){i.fire("SelectionChange")}),i.on("SelectionChange",function(){var e=i.selection.getStart(!0);!e||!Oe.range&&i.selection.isCollapsed()||_g(i)&&!function(e){var t,n;if((n=i.$(e).parentsUntil(i.getBody()).add(e)).length===o.length){for(t=n.length;0<=t&&n[t]===o[t];t--);if(-1===t)return o=n,!0}return o=n,!1}(e)&&i.dom.isChildOf(e,i.getBody())&&i.nodeChanged({selectionChange:!0})}),i.on("MouseUp",function(e){!e.isDefaultPrevented()&&_g(i)&&("IMG"===i.selection.getNode().nodeName?Ie.setEditorTimeout(i,function(){i.nodeChanged()}):i.nodeChanged())}),this.nodeChanged=function(e){var t,n,r,o=i.selection;i.initialized&&o&&!i.settings.disable_nodechange&&!i.readonly&&(r=i.getBody(),(t=o.getStart(!0)||r).ownerDocument===i.getDoc()&&i.dom.isChildOf(t,r)||(t=r),n=[],i.dom.getParent(t,function(e){if(e===r)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,i.fire("NodeChange",e))}}var kg,Eg,Tg=function(e){var t,n,r,o;return o=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}},Ng=function(e,t){return n=(s=e).inline?Tg(s.getBody()):{left:0,top:0},a=(i=e).getBody(),r=i.inline?{left:a.scrollLeft,top:a.scrollTop}:{left:0,top:0},{pageX:(o=function(e,t){if(t.target.ownerDocument===e.getDoc())return{left:t.pageX,top:t.pageY};var n,r,o,i,a,s=Tg(e.getContentAreaContainer()),l=(r=(n=e).getBody(),o=n.getDoc().documentElement,i={left:r.scrollLeft,top:r.scrollTop},a={left:r.scrollLeft||o.scrollLeft,top:r.scrollTop||o.scrollTop},n.inline?i:a);return{left:t.pageX-s.left+l.left,top:t.pageY-s.top+l.top}}(e,t)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o,i,a,s},Rg=Eo.isContentEditableFalse,Og=Eo.isContentEditableTrue,Pg=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},Ag=function(s,l){return function(e){if(0===e.button){var t=Vt.find(l.dom.getParents(e.target),ba.or(Rg,Og));if(i=l.getBody(),Rg(a=t)&&a!==i){var n=l.dom.getPos(t),r=l.getBody(),o=l.getDoc().documentElement;s.element=t,s.screenX=e.screenX,s.screenY=e.screenY,s.maxX=(l.inline?r.scrollWidth:o.offsetWidth)-2,s.maxY=(l.inline?r.scrollHeight:o.offsetHeight)-2,s.relX=e.pageX-n.x,s.relY=e.pageY-n.y,s.width=t.offsetWidth,s.height=t.offsetHeight,s.ghost=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(l,t,s.width,s.height)}}var i,a}},Dg=function(c,f){return function(e){if(c.dragging&&(l=(i=f).selection,u=l.getSel().getRangeAt(0).startContainer,a=3===u.nodeType?u.parentNode:u,s=c.element,a!==s&&!i.dom.isChildOf(a,s)&&!Rg(a))){var t=(r=c.element,(o=r.cloneNode(!0)).removeAttribute("data-mce-selected"),o),n=f.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,f.undoManager.transact(function(){Pg(c.element),f.insertContent(f.dom.getOuterHTML(t)),f._selectionOverrides.hideFakeCaret()}))}var r,o,i,a,s,l,u;Mg(c)}},Mg=function(e){e.dragging=!1,e.element=null,Pg(e.ghost)},Ig=function(e){var t,n,r,o,i,a,h,g,v,s,l,u={};t=ci.DOM,a=document,n=Ag(u,e),h=u,g=e,v=Ie.throttle(function(e,t){g._selectionOverrides.hideFakeCaret(),g.selection.placeCaretAt(e,t)},0),r=function(e){var t,n,r,o,i,a,s,l,u,c,f,d,p=Math.max(Math.abs(e.screenX-h.screenX),Math.abs(e.screenY-h.screenY));if(h.element&&!h.dragging&&10<p){if(g.fire("dragstart",{target:h.element}).isDefaultPrevented())return;h.dragging=!0,g.focus()}if(h.dragging){var m=(f=h,{pageX:(d=Ng(g,e)).pageX-f.relX,pageY:d.pageY+5});u=h.ghost,c=g.getBody(),u.parentNode!==c&&c.appendChild(u),t=h.ghost,n=m,r=h.width,o=h.height,i=h.maxX,a=h.maxY,l=s=0,t.style.left=n.pageX+"px",t.style.top=n.pageY+"px",n.pageX+r>i&&(s=n.pageX+r-i),n.pageY+o>a&&(l=n.pageY+o-a),t.style.width=r-s+"px",t.style.height=o-l+"px",v(e.clientX,e.clientY)}},o=Dg(u,e),s=u,i=function(){s.dragging&&l.fire("dragend"),Mg(s)},(l=e).on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},Lg=function(e){var n;Ig(e),(n=e).on("drop",function(e){var t=void 0!==e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Rg(t)||Rg(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},Bg=function(e){return Vt.reduce(e,function(e,t){return e.concat(function(t){var e=function(e){return Vt.map(e,function(e){return(e=Ya(e)).node=t,e})};if(Eo.isElement(t))return e(t.getClientRects());if(Eo.isText(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(t))},[])};(Eg=kg||(kg={}))[Eg.Up=-1]="Up",Eg[Eg.Down=1]="Down";var Fg=function(o,i,a,e,s,t){var n,l,u=0,c=[],r=function(e){var t,n,r;for(r=Bg([e]),-1===o&&(r=r.reverse()),t=0;t<r.length;t++)if(n=r[t],!a(n,l)){if(0<c.length&&i(n,Vt.last(c))&&u++,n.line=u,s(n))return!0;c.push(n)}};return(l=Vt.last(t.getClientRects()))&&(r(n=t.getNode()),function(e,t,n,r){for(;r=zu(r,e,$a,t);)if(n(r))return}(o,e,r,n)),c},jg=x(Fg,kg.Up,Ja,Za),Hg=x(Fg,kg.Down,Za,Ja),Ug=function(n){return function(e){return t=n,e.line>t;var t}},zg=function(n){return function(e){return t=n,e.line===t;var t}},Wg=Eo.isContentEditableFalse,Vg=zu,qg=function(e,t){return Math.abs(e.left-t)},$g=function(e,t){return Math.abs(e.right-t)},Xg=function(e,t){return e>=t.left&&e<=t.right},Yg=function(e,o){return Vt.reduce(e,function(e,t){var n,r;return n=Math.min(qg(e,o),$g(e,o)),r=Math.min(qg(t,o),$g(t,o)),Xg(o,t)?t:Xg(o,e)?e:r===n&&Wg(t.node)?t:r<n?t:e})},Gg=function(e,t,n,r){for(;r=Vg(r,e,$a,t);)if(n(r))return},Kg=function(e,t,n){var r,o,i,a,s,l,u,c,f=Bg((o=e,Vt.filter(Vt.toArray(o.getElementsByTagName("*")),Pu))),d=Vt.filter(f,function(e){return n>=e.top&&n<=e.bottom});return(r=Yg(d,t))&&(r=Yg((s=e,c=function(t,e){var n;return n=Vt.filter(Bg([e]),function(e){return!t(e,l)}),u=u.concat(n),0===n.length},(u=[]).push(l=r),Gg(kg.Up,s,x(c,Ja),l.node),Gg(kg.Down,s,x(c,Za),l.node),u),t))&&Pu(r.node)?(a=t,{node:(i=r).node,before:qg(i,a)<$g(i,a)}):null},Jg=function(i,a,e){return!e.collapsed&&q(e.getClientRects(),function(e,t){return e||(o=a,(r=i)>=(n=t).left&&r<=n.right&&o>=n.top&&o<=n.bottom);var n,r,o},!1)},Zg=function(t){var e=Ei(function(){if(!t.removed&&t.selection.getRng().collapsed){var e=cl(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},Qg={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return Oe.mac?e.metaKey:e.ctrlKey&&!e.altKey}},ev=Eo.isContentEditableTrue,tv=Eo.isContentEditableFalse,nv=nc,rv=tc,ov=function(e,t){for(var n=e.getBody();t&&t!==n;){if(ev(t)||tv(t))return t;t=t.parentNode}return null},iv=function(m){var h,e,t,a=m.getBody(),o=Ou(m.getBody(),function(e){return m.dom.isBlock(e)},function(){return Dh(m)}),g="sel-"+m.dom.uniqueId(),s=function(e){e&&m.selection.setRng(e)},l=function(){return m.selection.getRng()},v=function(e,t,n,r){return void 0===r&&(r=!0),m.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&m.selection.scrollIntoView(t,-1===e),o.show(n,t))},b=function(e,t){return t=Ku(e,a,t),-1===e?ks.fromRangeStart(t):ks.fromRangeEnd(t)},n=function(e){return Ta(e)||Aa(e)||Da(e)},y=function(e){return n(e.startContainer)||n(e.endContainer)},u=function(e,t){var n,r,o,i,a,s,l,u,c,f,d=m.$,p=m.dom;if(!e)return null;if(e.collapsed){if(!y(e))if(!1===t){if(u=b(-1,e),Pu(u.getNode(!0)))return v(-1,u.getNode(!0),!1,!1);if(Pu(u.getNode()))return v(-1,u.getNode(),!u.isAtEnd(),!1)}else{if(u=b(1,e),Pu(u.getNode()))return v(1,u.getNode(),!u.isAtEnd(),!1);if(Pu(u.getNode(!0)))return v(1,u.getNode(!0),!1,!1)}return null}return i=e.startContainer,a=e.startOffset,s=e.endOffset,3===i.nodeType&&0===a&&tv(i.parentNode)&&(i=i.parentNode,a=p.nodeIndex(i),i=i.parentNode),1!==i.nodeType?null:(s===a+1&&(n=i.childNodes[a]),tv(n)?(c=f=n.cloneNode(!0),(l=m.fire("ObjectSelected",{target:n,targetClone:c})).isDefaultPrevented()?null:(r=Ji(Yn.fromDom(m.getBody()),"#"+g).fold(function(){return d([])},function(e){return d([e.dom()])}),c=l.targetClone,0===r.length&&(r=d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",g)).appendTo(m.getBody()),e=m.dom.createRng(),c===f&&Oe.ie?(r.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(c),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(c)):(r.empty().append(" ").append(c).append(" "),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:p.getPos(n,m.getBody()).y}),r[0].focus(),(o=m.selection.getSel()).removeAllRanges(),o.addRange(e),z(zi(Yn.fromDom(m.getBody()),"*[data-mce-selected]"),function(e){cr.remove(e,"data-mce-selected")}),n.setAttribute("data-mce-selected","1"),h=n,w(),e)):null)},c=function(){h&&(h.removeAttribute("data-mce-selected"),Ji(Yn.fromDom(m.getBody()),"#"+g).each(ki.remove),h=null),Ji(Yn.fromDom(m.getBody()),"#"+g).each(ki.remove),h=null},w=function(){o.hide()};return Oe.ceFalse&&(function(){m.on("mouseup",function(e){var t=l();t.collapsed&&Hh(m,e.clientX,e.clientY)&&s(ul(m,t,!1))}),m.on("click",function(e){var t;(t=ov(m,e.target))&&(tv(t)&&(e.preventDefault(),m.focus()),ev(t)&&m.dom.isChildOf(t,m.selection.getNode())&&c())}),m.on("blur NewBlock",function(){c()}),m.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,r,i=function(e,t){var n,r,o=m.dom.getParent(e,m.dom.isBlock),i=m.dom.getParent(t,m.dom.isBlock);return!(!o||!m.dom.isChildOf(o,i)||!1!==tv(ov(m,o)))||o&&(n=o,r=i,!(m.dom.getParent(n,m.dom.isBlock)===m.dom.getParent(r,m.dom.isBlock)))&&function(e){var t=_l(e);if(!e.firstChild)return!1;var n=ks.before(e.firstChild),r=t.next(n);return r&&!rv(r)&&!nv(r)}(o)};r=!1,(n=m).on("touchstart",function(){r=!1}),n.on("touchmove",function(){r=!0}),n.on("touchend",function(e){var t=ov(n,e.target);tv(t)&&(r||(e.preventDefault(),u(ll(n,t))))}),m.on("mousedown",function(e){var t,n=e.target;if((n===a||"HTML"===n.nodeName||m.dom.isChildOf(n,a))&&!1!==Hh(m,e.clientX,e.clientY))if(t=ov(m,n))tv(t)?(e.preventDefault(),u(ll(m,t))):(c(),ev(t)&&e.shiftKey||Jg(e.clientX,e.clientY,m.selection.getRng())||(w(),m.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===Pu(n)){c(),w();var r=Kg(a,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=v(1,r.node,r.before,!1);m.getBody().focus(),s(o)}}}),m.on("keypress",function(e){Qg.modifierPressed(e)||(e.keyCode,tv(m.selection.getNode())&&e.preventDefault())}),m.on("getSelectionRange",function(e){var t=e.range;if(h){if(!h.parentNode)return void(h=null);(t=t.cloneRange()).selectNode(h),e.range=t}}),m.on("setSelectionRange",function(e){var t;(t=u(e.range,e.forward))&&(e.range=t)}),m.on("AfterSetSelectionRange",function(e){var t,n=e.range;y(n)||"mcepastebin"===n.startContainer.parentNode.id||w(),t=n.startContainer.parentNode,m.dom.hasClass(t,"mce-offscreen-selection")||c()}),m.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!Oe.ie){var r=(t=m.dom.get(g))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),Lg(m),Zg(m)}(),e=m.contentStyles,t=".mce-content-body",e.push(o.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")),{showCaret:v,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(Ma(e),s(l()),m.selection.scrollIntoView(e[0]))},hideFakeCaret:w,destroy:function(){o.destroy(),h=null}}},av=function(e,t,n){var r,o,i,a,s=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])s--;else if(!o[1]){if(o[2]in a)continue;s++}if(0===s)break}return r};function sv(F,j){void 0===j&&(j=Jo());var e=function(){};!1!==(F=F||{}).fix_self_closing&&(F.fix_self_closing=!0);var H=F.comment?F.comment:e,U=F.cdata?F.cdata:e,z=F.text?F.text:e,W=F.start?F.start:e,V=F.end?F.end:e,q=F.pi?F.pi:e,$=F.doctype?F.doctype:e;return{parse:function(e){var t,n,r,f,o,i,a,d,s,l,p,u,m,c,h,g,v,b,y,w,x,C,_,S,k,E,T,N,R,O=0,P=[],A=0,D=Ho.decode,M=Gt.makeMap("src,href,data,background,formaction,poster,xlink:href"),I=/((java|vb)script|mhtml):/i,L=function(e){var t,n;for(t=P.length;t--&&P[t].name!==e;);if(0<=t){for(n=P.length-1;t<=n;n--)(e=P[n]).valid&&V(e.name);P.length=t}},B=function(e,t,n,r,o){var i,a,s,l,u;if(n=(t=t.toLowerCase())in p?t:D(n||r||o||""),m&&!d&&0==(0===(s=t).indexOf("data-")||0===s.indexOf("aria-"))){if(!(i=b[t])&&y){for(a=y.length;a--&&!(i=y[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(M[t]&&!F.allow_script_urls){var c=n.replace(/[\s\u0000-\u001F]+/g,"");try{c=decodeURIComponent(c)}catch(e){c=unescape(c)}if(I.test(c))return;if(u=c,!(l=F).allow_html_data_urls&&(/^data:image\//i.test(u)?!1===l.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(u):/^data:/i.test(u)))return}d&&(t in M||0===t.indexOf("on"))||(f.map[t]=n,f.push({name:t,value:n}))};for(k=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),E=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,l=j.getShortEndedElements(),S=F.self_closing_elements||j.getSelfClosingElements(),p=j.getBoolAttrs(),m=F.validate,s=F.remove_internals,R=F.fix_self_closing,T=j.getSpecialElements(),_=e+">";t=k.exec(_);){if(O<t.index&&z(D(e.substr(O,t.index-O))),n=t[6])":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),L(n);else if(n=t[7]){if(t.index+t[0].length>e.length){z(D(e.substr(t.index))),O=t.index+t[0].length;continue}if(":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),u=n in l,R&&S[n]&&0<P.length&&P[P.length-1].name===n&&L(n),!m||(c=j.getElementRule(n))){if(h=!0,m&&(b=c.attributes,y=c.attributePatterns),(v=t[8])?((d=-1!==v.indexOf("data-mce-type"))&&s&&(h=!1),(f=[]).map={},v.replace(E,B)):(f=[]).map={},m&&!d){if(w=c.attributesRequired,x=c.attributesDefault,C=c.attributesForced,c.removeEmptyAttrs&&!f.length&&(h=!1),C)for(o=C.length;o--;)a=(g=C[o]).name,"{$uid}"===(N=g.value)&&(N="mce_"+A++),f.map[a]=N,f.push({name:a,value:N});if(x)for(o=x.length;o--;)(a=(g=x[o]).name)in f.map||("{$uid}"===(N=g.value)&&(N="mce_"+A++),f.map[a]=N,f.push({name:a,value:N}));if(w){for(o=w.length;o--&&!(w[o]in f.map););-1===o&&(h=!1)}if(g=f.map["data-mce-bogus"]){if("all"===g){O=av(j,e,k.lastIndex),k.lastIndex=O;continue}h=!1}}h&&W(n,f,u)}else h=!1;if(r=T[n]){r.lastIndex=O=t.index+t[0].length,O=(t=r.exec(e))?(h&&(i=e.substr(O,t.index-O)),t.index+t[0].length):(i=e.substr(O),e.length),h&&(0<i.length&&z(i,!0),V(n)),k.lastIndex=O;continue}u||(v&&v.indexOf("/")===v.length-1?h&&V(n):P.push({name:n,valid:h}))}else(n=t[1])?(">"===n.charAt(0)&&(n=" "+n),F.allow_conditional_comments||"[if"!==n.substr(0,3).toLowerCase()||(n=" "+n),H(n)):(n=t[2])?U(n.replace(/<!--|-->/g,"")):(n=t[3])?$(n):(n=t[4])&&q(n,t[5]);O=t.index+t[0].length}for(O<e.length&&z(D(e.substr(O))),o=P.length-1;0<=o;o--)(n=P[o]).valid&&V(n.name)}}}(sv||(sv={})).findEndTag=av;var lv=sv,uv=function(e,t){var n,r,o,i,a,s,l,u,c=t,f=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,d=e.schema;for(s=e.getTempAttrs(),l=c,u=new RegExp(["\\s?("+s.join("|")+')="[^"]+"'].join("|"),"gi"),c=l.replace(u,""),a=d.getShortEndedElements();i=f.exec(c);)r=f.lastIndex,o=i[0].length,n=a[i[1]]?r:lv.findEndTag(d,c,r),c=c.substring(0,r-o)+c.substring(n),f.lastIndex=r-o;return Ca(c)},cv={trimExternal:uv,trimInternal:uv},fv=0,dv=2,pv=1,mv=function(m,h){var e=m.length+h.length+2,g=new Array(e),v=new Array(e),u=function(e,t,n,r,o){var i=c(e,t,n,r);if(null===i||i.start===t&&i.diag===t-r||i.end===e&&i.diag===e-n)for(var a=e,s=n;a<t||s<r;)a<t&&s<r&&m[a]===h[s]?(o.push([0,m[a]]),++a,++s):r-n<t-e?(o.push([2,m[a]]),++a):(o.push([1,h[s]]),++s);else{u(e,i.start,n,i.start-i.diag,o);for(var l=i.start;l<i.end;++l)o.push([0,m[l]]);u(i.end,t,i.end-i.diag,r,o)}},b=function(e,t,n,r){for(var o=e;o-t<r&&o<n&&m[o]===h[o-t];)++o;return{start:e,end:o,diag:t}},c=function(e,t,n,r){var o=t-e,i=r-n;if(0===o||0===i)return null;var a,s,l,u,c,f=o-i,d=i+o,p=(d%2==0?d:d+1)/2;for(g[1+p]=e,v[1+p]=t+1,a=0;a<=p;++a){for(s=-a;s<=a;s+=2){for(l=s+p,s===-a||s!==a&&g[l-1]<g[l+1]?g[l]=g[l+1]:g[l]=g[l-1]+1,c=(u=g[l])-e+n-s;u<t&&c<r&&m[u]===h[c];)g[l]=++u,++c;if(f%2!=0&&f-a<=s&&s<=f+a&&v[l-f]<=g[l])return b(v[l-f],s+e-n,t,r)}for(s=f-a;s<=f+a;s+=2){for(l=s+p-f,s===f-a||s!==f+a&&v[l+1]<=v[l-1]?v[l]=v[l+1]-1:v[l]=v[l-1],c=(u=v[l]-1)-e+n-s;e<=u&&n<=c&&m[u]===h[c];)v[l]=u--,c--;if(f%2==0&&-a<=s&&s<=a&&v[l]<=g[l+f])return b(v[l],s+e-n,t,r)}}},t=[];return u(0,m.length,0,h.length,t),t},hv=function(e){return Eo.isElement(e)?e.outerHTML:Eo.isText(e)?Ho.encodeRaw(e.data,!1):Eo.isComment(e)?"\x3c!--"+e.data+"--\x3e":""},gv=function(e,t,n){var r=function(e){var t,n,r;for(r=document.createElement("div"),t=document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)},vv=function(e){return Vt.filter(Vt.map(e.childNodes,hv),function(e){return 0<e.length})},bv=function(e,t){var n,r,o,i=Vt.map(t.childNodes,hv);return n=mv(i,e),r=t,o=0,Vt.each(n,function(e){e[0]===fv?o++:e[0]===pv?(gv(r,e[1],o),o++):e[0]===dv&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(r,o)}),t},yv=Ti(R.none()),wv=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},xv=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},Cv=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},_v=function(e){var t=Yn.fromTag("body",yv.get().getOrThunk(function(){var e=document.implementation.createHTMLDocument("undo");return yv.set(R.some(e)),e}));return ha(t,Cv(e)),z(zi(t,"*[data-mce-bogus]"),ki.unwrap),ma(t)},Sv=function(n){var e,t,r;return e=vv(n.getBody()),-1!==(t=(r=K(e,function(e){var t=cv.trimInternal(n.serializer,e);return 0<t.length?[t]:[]})).join("")).indexOf("</iframe>")?wv(r):xv(t)},kv=function(e,t,n){"fragmented"===t.type?bv(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},Ev=function(e,t){return!(!e||!t)&&(r=t,Cv(e)===Cv(r)||(n=t,_v(e)===_v(n)));var n,r};function Tv(s){var l,r,o=this,u=0,c=[],t=0,f=function(){return 0===t},i=function(e){f()&&(o.typing=e)},d=function(e){s.setDirty(e)},a=function(e){i(!1),o.add({},e)},n=function(){o.typing&&(i(!1),o.add())};return s.on("init",function(){o.add()}),s.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(n(),o.beforeChange())}),s.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&a(e)}),s.on("ObjectResizeStart Cut",function(){o.beforeChange()}),s.on("SaveContent ObjectResized blur",a),s.on("DragEnd",a),s.on("KeyUp",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(a(),s.nodeChanged()),46!==t&&8!==t||s.nodeChanged(),r&&o.typing&&!1===Ev(Sv(s),c[0])&&(!1===s.isDirty()&&(d(!0),s.fire("change",{level:c[0],lastLevel:null})),s.fire("TypingUndo"),r=!1,s.nodeChanged()))}),s.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)o.typing&&a(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20<t)||224===t||91===t||o.typing||n||(o.beforeChange(),i(!0),o.add({},e),r=!0)}}),s.on("MouseDown",function(e){o.typing&&a(e)}),s.on("input",function(e){var t;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(t=e).inputType&&null===t.data)&&a(e)}),s.addShortcut("meta+z","","Undo"),s.addShortcut("meta+y,meta+shift+z","","Redo"),s.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||s.nodeChanged()}),o={data:c,typing:!1,beforeChange:function(){f()&&(l=qs.getUndoBookmark(s.selection))},add:function(e,t){var n,r,o,i=s.settings;if(o=Sv(s),e=e||{},e=Gt.extend(e,o),!1===f()||s.removed)return null;if(r=c[u],s.fire("BeforeAddUndo",{level:e,lastLevel:r,originalEvent:t}).isDefaultPrevented())return null;if(r&&Ev(r,e))return null;if(c[u]&&(c[u].beforeBookmark=l),i.custom_undo_redo_levels&&c.length>i.custom_undo_redo_levels){for(n=0;n<c.length-1;n++)c[n]=c[n+1];c.length--,u=c.length}e.bookmark=qs.getUndoBookmark(s.selection),u<c.length-1&&(c.length=u+1),c.push(e),u=c.length-1;var a={level:e,lastLevel:r,originalEvent:t};return s.fire("AddUndo",a),0<u&&(d(!0),s.fire("change",a)),e},undo:function(){var e;return o.typing&&(o.add(),o.typing=!1,i(!1)),0<u&&(e=c[--u],kv(s,e,!0),d(!0),s.fire("undo",{level:e})),e},redo:function(){var e;return u<c.length-1&&(e=c[++u],kv(s,e,!1),d(!0),s.fire("redo",{level:e})),e},clear:function(){c=[],u=0,o.typing=!1,o.data=c,s.fire("ClearUndos")},hasUndo:function(){return 0<u||o.typing&&c[0]&&!Ev(Sv(s),c[0])},hasRedo:function(){return u<c.length-1&&!o.typing},transact:function(e){return n(),o.beforeChange(),o.ignore(e),o.add()},ignore:function(e){try{t++,e()}finally{t--}},extra:function(e,t){var n,r;o.transact(e)&&(r=c[u].bookmark,n=c[u-1],kv(s,n,!0),o.transact(t)&&(c[u-1].beforeBookmark=r))}}}var Nv,Rv,Ov=kc.isEq,Pv=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&e.dom.is(t,r[o].selector))return!0;return!1},Av=function(t,e,n,r){var o=t.dom.getRoot();return e!==o&&(e=t.dom.getParent(e,function(e){return!!Pv(t,e,n)||e.parentNode===o||!!Iv(t,e,n,r,!0)}),Iv(t,e,n,r))},Dv=function(e,t,n){return!!Ov(t,n.inline)||!!Ov(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0)},Mv=function(e,t,n,r,o,i){var a,s,l,u=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(u)if(void 0===u.length){for(a in u)if(u.hasOwnProperty(a)){if(s="attributes"===r?e.getAttrib(t,a):kc.getStyle(e,t,a),o&&!s&&!n.exact)return;if((!o||n.exact)&&!Ov(s,kc.normalizeStyleValue(e,kc.replaceVars(u[a],i),a)))return}}else for(l=0;l<u.length;l++)if("attributes"===r?e.getAttrib(t,u[l]):kc.getStyle(e,t,u[l]))return n;return n},Iv=function(e,t,n,r,o){var i,a,s,l,u=e.formatter.get(n),c=e.dom;if(u&&t)for(a=0;a<u.length;a++)if(i=u[a],Dv(e.dom,t,i)&&Mv(c,t,i,"attributes",o,r)&&Mv(c,t,i,"styles",o,r)){if(l=i.classes)for(s=0;s<l.length;s++)if(!e.dom.hasClass(t,l[s]))return;return i}},Lv={matchNode:Iv,matchName:Dv,match:function(e,t,n,r){var o;return r?Av(e,r,t,n):(r=e.selection.getNode(),!!Av(e,r,t,n)||!((o=e.selection.getStart())===r||!Av(e,o,t,n)))},matchAll:function(r,o,i){var e,a=[],s={};return e=r.selection.getStart(),r.dom.getParent(e,function(e){var t,n;for(t=0;t<o.length;t++)n=o[t],!s[n]&&Iv(r,e,n,i)&&(s[n]=!0,a.push(n))},r.dom.getRoot()),a},canApply:function(e,t){var n,r,o,i,a,s=e.formatter.get(t),l=e.dom;if(s)for(n=e.selection.getStart(),r=kc.getParents(l,n),i=s.length-1;0<=i;i--){if(!(a=s[i].selector)||s[i].defaultBlock)return!0;for(o=r.length-1;0<=o;o--)if(l.is(r[o],a))return!0}return!1},matchesUnInheritedFormatSelector:Pv},Bv=function(e,t){return e.splitText(t)},Fv=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Eo.isText(t)?0<n&&n<t.nodeValue.length&&(t=(r=Bv(t,n)).previousSibling,n<o?(t=r=Bv(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(Eo.isText(t)&&0<n&&n<t.nodeValue.length&&(t=Bv(t,n),n=0),Eo.isText(r)&&0<o&&o<r.nodeValue.length&&(o=(r=Bv(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}},jv=xa,Hv="_mce_caret",Uv=function(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==jv||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length},zv=function(e){var t;if(e)for(e=(t=new Qr(e,e)).current();e;e=t.next())if(3===e.nodeType)return e;return null},Wv=function(e){var t=Yn.fromTag("span");return cr.setAll(t,{id:Hv,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&xi.append(t,Yn.fromText(jv)),t},Vv=function(e,t,n,r){var o,i,a,s;o=t.getRng(!0),i=e.getParent(n,e.isBlock),Uv(n)?(!1!==r&&(o.setStartBefore(n),o.setEndBefore(n)),e.remove(n)):((s=zv(n))&&s.nodeValue.charAt(0)===jv&&s.deleteData(0,1),a=s,o.startContainer===a&&0<o.startOffset&&o.setStart(a,o.startOffset-1),o.endContainer===a&&0<o.endOffset&&o.setEnd(a,o.endOffset-1),e.remove(n,!0)),i&&e.isEmpty(i)&&sf(Yn.fromDom(i)),t.setRng(o)},qv=function(e,t,n,r,o){if(r)Vv(t,n,r,o);else if(!(r=Ys(e,n.getStart())))for(;r=t.get(Hv);)Vv(t,n,r,!1)},$v=function(e,t,n){var r=e.dom,o=r.getParent(n,ba.curry(kc.isTextBlock,e));o&&r.isEmpty(o)?n.parentNode.replaceChild(t,n):(af(Yn.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))},Xv=function(e,t){return e.appendChild(t),t},Yv=function(e,t){var n,r,o=(n=function(e,t){return Xv(e,t.cloneNode(!1))},r=t,function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n,e)}(e,function(e){r=n(r,e)}),r);return Xv(o,o.ownerDocument.createTextNode(jv))},Gv=function(e){var i=e.dom,a=e.selection,s=e.getBody();e.on("mouseup keydown",function(e){var t,n,r,o;t=s,n=i,r=a,o=e.keyCode,qv(t,n,r,null,!1),8===o&&r.isCollapsed()&&r.getStart().innerHTML===jv&&qv(t,n,r,Ys(t,r.getStart())),37!==o&&39!==o||qv(t,n,r,Ys(t,r.getStart()))})},Kv=function(e,t){return e.schema.getTextInlineElements().hasOwnProperty(nr.name(t))&&!Xs(t.dom())&&!Eo.isBogus(t.dom())},Jv={},Zv=Vt.filter,Qv=Vt.each;Rv=function(e){var t,n,r=e.selection.getRng();t=Eo.matchNodeNames("pre"),r.collapsed||(n=e.selection.getSelectedBlocks(),Qv(Zv(Zv(n,t),function(e){return t(e.previousSibling)&&-1!==Vt.indexOf(n,e.previousSibling)}),function(e){var t,n;t=e.previousSibling,hn(n=e).remove(),hn(t).append("<br><br>").append(n.childNodes)}))},Jv[Nv="pre"]||(Jv[Nv]=[]),Jv[Nv].push(Rv);var eb=function(e,t){Qv(Jv[e],function(e){e(t)})},tb=/^(src|href|style)$/,nb=Gt.each,rb=kc.isEq,ob=function(e){return/^(TH|TD)$/.test(e.nodeName)},ib=function(e,t,n){var r,o,i;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],Eo.isElement(r)&&(i=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[i<o?i:o]),Eo.isText(r)&&n&&o>=r.nodeValue.length&&(r=new Qr(r,e.getBody()).next()||r),Eo.isText(r)&&!n&&0===o&&(r=new Qr(r,e.getBody()).prev()||r),r},ab=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},sb=function(e,t,n,r){return!(t=kc.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},lb=function(e,n,r,o,i){var t,a,s,l,u,c,f,d,p,m,h,g,v,b,y=e.dom;if(u=y,!(rb(c=o,(f=n).inline)||rb(c,f.block)||(f.selector?Eo.isElement(c)&&u.is(c,f.selector):void 0)||(l=o,n.links&&"A"===l.tagName)))return!1;if("all"!==n.remove)for(nb(n.styles,function(e,t){e=kc.normalizeStyleValue(y,kc.replaceVars(e,r),t),"number"==typeof t&&(t=e,i=0),(n.remove_similar||!i||rb(kc.getStyle(y,i,t),e))&&y.setStyle(o,t,""),s=1}),s&&""===y.getAttrib(o,"style")&&(o.removeAttribute("style"),o.removeAttribute("data-mce-style")),nb(n.attributes,function(e,t){var n;if(e=kc.replaceVars(e,r),"number"==typeof t&&(t=e,i=0),!i||rb(y.getAttrib(i,t),e)){if("class"===t&&(e=y.getAttrib(o,t))&&(n="",nb(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n))return void y.setAttrib(o,t,n);"class"===t&&o.removeAttribute("className"),tb.test(t)&&o.removeAttribute("data-mce-"+t),o.removeAttribute(t)}}),nb(n.classes,function(e){e=kc.replaceVars(e,r),i&&!y.hasClass(i,e)||y.removeClass(o,e)}),a=y.getAttribs(o),t=0;t<a.length;t++){var w=a[t].nodeName;if(0!==w.indexOf("_")&&0!==w.indexOf("data-"))return!1}return"none"!==n.remove?(d=e,m=n,g=(p=o).parentNode,v=d.dom,b=d.settings.forced_root_block,m.block&&(b?g===v.getRoot()&&(m.list_block&&rb(p,m.list_block)||nb(Gt.grep(p.childNodes),function(e){kc.isValid(d,b,e.nodeName.toLowerCase())?h?h.appendChild(e):(h=ab(v,e,b),v.setAttribs(h,d.settings.forced_root_block_attrs)):h=0})):v.isBlock(p)&&!v.isBlock(g)&&(sb(v,p,!1)||sb(v,p.firstChild,!0,1)||p.insertBefore(v.create("br"),p.firstChild),sb(v,p,!0)||sb(v,p.lastChild,!1,1)||p.appendChild(v.create("br")))),m.selector&&m.inline&&!rb(m.inline,p)||v.remove(p,1),!0):void 0},ub=lb,cb=function(l,u,c,e,f){var t,n,d=l.formatter.get(u),p=d[0],a=!0,s=l.dom,r=l.selection,i=function(e){var n,t,r,o,i,a,s=(n=l,t=e,r=u,o=c,i=f,nb(kc.getParents(n.dom,t.parentNode).reverse(),function(e){var t;a||"_start"===e.id||"_end"===e.id||(t=Lv.matchNode(n,e,r,o,i))&&!1!==t.split&&(a=e)}),a);return function(e,t,n,r,o,i,a,s){var l,u,c,f,d,p,m=e.dom;if(n){for(p=n.parentNode,l=r.parentNode;l&&l!==p;l=l.parentNode){for(u=m.clone(l,!1),d=0;d<t.length;d++)if(lb(e,t[d],s,u,u)){u=0;break}u&&(c&&u.appendChild(c),f||(f=u),c=u)}!i||a.mixed&&m.isBlock(n)||(r=m.split(n,r)),c&&(o.parentNode.insertBefore(c,o),f.appendChild(o))}return r}(l,d,s,e,e,!0,p,c)},m=function(e){var t,n,r,o,i;if(Eo.isElement(e)&&s.getContentEditable(e)&&(o=a,a="true"===s.getContentEditable(e),i=!0),t=Gt.grep(e.childNodes),a&&!i)for(n=0,r=d.length;n<r&&!lb(l,d[n],c,e,e);n++);if(p.deep&&t.length){for(n=0,r=t.length;n<r;n++)m(t[n]);i&&(a=o)}},h=function(e){var t=s.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return xc(n)&&(n=n[e?"firstChild":"lastChild"]),Eo.isText(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),s.remove(t,!0),n},o=function(e){var t,n,r=e.commonAncestorContainer;if(e=Bc(l,e,d,!0),p.split){if(e=Fv(e),(t=ib(l,e,!0))!==(n=ib(l,e))){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"===t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&ob(n)&&n.firstChild&&(n=n.firstChild||n),s.isChildOf(t,n)&&t!==n&&!s.isBlock(n)&&!ob(t)&&!ob(n)){var o=function(e,t,n,r,o){var i=(r?"next":"previous")+"Sibling",a=e.create(n,o);t.parentNode.insertBefore(a,t);for(var s=[t],l=t;l=l[i];)s.push(l);return s.forEach(function(e){return a.appendChild(e)}),a}(s,t,"span",!0,{id:"_start","data-mce-type":"bookmark"});return i(o),void(t=h(!0))}t=ab(s,t,"span",{id:"_start","data-mce-type":"bookmark"}),n=ab(s,n,"span",{id:"_end","data-mce-type":"bookmark"}),i(t),i(n),t=h(!0),n=h()}else t=n=i(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=s.nodeIndex(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=s.nodeIndex(n)+1}jc(s,e,function(e){nb(e,function(e){m(e),Eo.isElement(e)&&"underline"===l.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===kc.getTextDecoration(s,e.parentNode)&&lb(l,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})};if(e)e.nodeType?((n=s.createRng()).setStartBefore(e),n.setEndAfter(e),o(n)):o(e);else if("false"!==s.getContentEditable(r.getNode()))r.isCollapsed()&&p.inline&&!s.select("td[data-mce-selected],th[data-mce-selected]").length?function(e,t,n,r){var o,i,a,s,l,u,c,f=e.dom,d=e.selection,p=[],m=d.getRng();for(o=m.startContainer,i=m.startOffset,3===(l=o).nodeType&&(i!==o.nodeValue.length&&(s=!0),l=l.parentNode);l;){if(Lv.matchNode(e,l,t,n,r)){u=l;break}l.nextSibling&&(s=!0),p.push(l),l=l.parentNode}if(u)if(s){a=d.getBookmark(),m.collapse(!0);var h=Bc(e,m,e.formatter.get(t),!0);h=Fv(h),e.formatter.remove(t,n,h),d.moveToBookmark(a)}else{c=Ys(e.getBody(),u);var g=Wv(!1).dom(),v=Yv(p,g);$v(e,g,c||u),Vv(f,d,c,!1),d.setCursorLocation(v,1),f.isEmpty(u)&&f.remove(u)}}(l,u,c,f):(t=qs.getPersistentBookmark(l.selection,!0),o(r.getRng()),r.moveToBookmark(t),p.inline&&Lv.match(l,u,c,r.getStart())&&kc.moveStart(s,r,r.getRng()),l.nodeChanged());else{e=r.getNode();for(var g=0,v=d.length;g<v&&(!d[g].ceFalseOverride||!lb(l,d[g],c,e,e));g++);}},fb=Gt.each,db=function(e){return e&&1===e.nodeType&&!xc(e)&&!Xs(e)&&!Eo.isBogus(e)},pb=function(e,t){var n;for(n=e;n;n=n[t]){if(3===n.nodeType&&0!==n.nodeValue.length)return e;if(1===n.nodeType&&!xc(n))return n}return e},mb=function(e,t,n){var r,o,i=new of(e);if(t&&n&&(t=pb(t,"previousSibling"),n=pb(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)r=(o=r).nextSibling,t.appendChild(o);return e.remove(n),Gt.each(Gt.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n},hb=function(e,t,n){fb(e.childNodes,function(e){db(e)&&(t(e)&&n(e),e.hasChildNodes()&&hb(e,t,n))})},gb=function(n,e){return x(function(e,t){return!(!t||!kc.getStyle(n,t,e))},e)},vb=function(r,e,t){return x(function(e,t,n){r.setStyle(n,e,t),""===n.getAttribute("style")&&n.removeAttribute("style"),bb(r,n)},e,t)},bb=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},yb=function(e,t){var n;1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType&&(n=kc.getTextDecoration(e,t.parentNode),e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null))},wb=function(n,e,r,o){fb(e,function(t){fb(n.dom.select(t.inline,o),function(e){db(e)&&ub(n,t,r,e,t.exact?e:null)}),function(r,e,t){if(e.clear_child_styles){var n=e.links?"*:not(a)":"*";fb(r.select(n,t),function(n){db(n)&&fb(e.styles,function(e,t){r.setStyle(n,t,"")})})}}(n.dom,t,o)})},xb=function(e,t,n,r){(t.styles.color||t.styles.textDecoration)&&(Gt.walk(r,x(yb,e),"childNodes"),yb(e,r))},Cb=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&hb(r,gb(e,"fontSize"),vb(e,"backgroundColor",kc.replaceVars(t.styles.backgroundColor,n)))},_b=function(e,t,n,r){"sub"!==t.inline&&"sup"!==t.inline||(hb(r,gb(e,"fontSize"),vb(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))},Sb=function(e,t,n,r){r&&!1!==t.merge_siblings&&(r=mb(e,kc.getNonWhiteSpaceSibling(r),r),r=mb(e,r,kc.getNonWhiteSpaceSibling(r,!0)))},kb=function(t,n,r,o,i){Lv.matchNode(t,i.parentNode,r,o)&&ub(t,n,o,i)||n.merge_with_parents&&t.dom.getParent(i.parentNode,function(e){if(Lv.matchNode(t,e,r,o))return ub(t,n,o,i),!0})},Eb=Gt.each,Tb=function(m,h,g,r){var e,t,v=m.formatter.get(h),b=v[0],o=!r&&m.selection.isCollapsed(),i=m.dom,n=m.selection,y=function(n,e){if(e=e||b,n){if(e.onformat&&e.onformat(n,e,g,r),Eb(e.styles,function(e,t){i.setStyle(n,t,kc.replaceVars(e,g))}),e.styles){var t=i.getAttrib(n,"style");t&&n.setAttribute("data-mce-style",t)}Eb(e.attributes,function(e,t){i.setAttrib(n,t,kc.replaceVars(e,g))}),Eb(e.classes,function(e){e=kc.replaceVars(e,g),i.hasClass(n,e)||i.addClass(n,e)})}},w=function(e,t){var n=!1;return!!b.selector&&(Eb(e,function(e){if(!("collapsed"in e&&e.collapsed!==o))return i.is(t,e.selector)&&!Xs(t)?(y(t,e),!(n=!0)):void 0}),n)},a=function(l,e,t,u){var c,f,d=[],p=!0;c=b.inline||b.block,f=l.create(c),y(f),jc(l,e,function(e){var a,s=function(e){var t,n,r,o;if(o=p,t=e.nodeName.toLowerCase(),n=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&l.getContentEditable(e)&&(o=p,p="true"===l.getContentEditable(e),r=!0),kc.isEq(t,"br"))return a=0,void(b.block&&l.remove(e));if(b.wrapper&&Lv.matchNode(m,e,h,g))a=0;else{if(p&&!r&&b.block&&!b.wrapper&&kc.isTextBlock(m,t)&&kc.isValid(m,n,c))return e=l.rename(e,c),y(e),d.push(e),void(a=0);if(b.selector){var i=w(v,e);if(!b.inline||i)return void(a=0)}!p||r||!kc.isValid(m,c,t)||!kc.isValid(m,n,c)||!u&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||Xs(e)||b.inline&&l.isBlock(e)?(a=0,Eb(Gt.grep(e.childNodes),s),r&&(p=o),a=0):(a||(a=l.clone(f,!1),e.parentNode.insertBefore(a,e),d.push(a)),a.appendChild(e))}};Eb(e,s)}),!0===b.links&&Eb(d,function(e){var t=function(e){"A"===e.nodeName&&y(e,b),Eb(Gt.grep(e.childNodes),t)};t(e)}),Eb(d,function(e){var t,n,r,o,i,a=function(e){var n=!1;return Eb(e.childNodes,function(e){if((t=e)&&1===t.nodeType&&!xc(t)&&!Xs(t)&&!Eo.isBogus(t))return n=e,!1;var t}),n};n=0,Eb(e.childNodes,function(e){kc.isWhiteSpaceNode(e)||xc(e)||n++}),t=n,!(1<d.length)&&l.isBlock(e)||0!==t?(b.inline||b.wrapper)&&(b.exact||1!==t||((o=a(r=e))&&!xc(o)&&Lv.matchName(l,o,b)&&(i=l.clone(o,!1),y(i),l.replace(i,r,!0),l.remove(o,1)),e=i||r),wb(m,v,g,e),kb(m,b,h,g,e),Cb(l,b,g,e),_b(l,b,g,e),Sb(l,b,g,e)):l.remove(e,1)})};if("false"!==i.getContentEditable(n.getNode())){if(b){if(r)r.nodeType?w(v,r)||((t=i.createRng()).setStartBefore(r),t.setEndAfter(r),a(i,Bc(m,t,v),0,!0)):a(i,r,0,!0);else if(o&&b.inline&&!i.select("td[data-mce-selected],th[data-mce-selected]").length)!function(e,t,n){var r,o,i,a,s,l,u=e.selection;a=(r=u.getRng(!0)).startOffset,l=r.startContainer.nodeValue,(o=Ys(e.getBody(),u.getStart()))&&(i=zv(o));var c,f,d=/[^\s\u00a0\u00ad\u200b\ufeff]/;l&&0<a&&a<l.length&&d.test(l.charAt(a))&&d.test(l.charAt(a-1))?(s=u.getBookmark(),r.collapse(!0),r=Bc(e,r,e.formatter.get(t)),r=Fv(r),e.formatter.apply(t,n,r),u.moveToBookmark(s)):(o&&i.nodeValue===jv||(c=e.getDoc(),f=Wv(!0).dom(),i=(o=c.importNode(f,!0)).firstChild,r.insertNode(o),a=1),e.formatter.apply(t,n,o),u.setCursorLocation(i,a))}(m,h,g);else{var s=m.selection.getNode();m.settings.forced_root_block||!v[0].defaultBlock||i.getParent(s,i.isBlock)||Tb(m,v[0].defaultBlock),m.selection.setRng(pf(m.selection.getRng())),e=qs.getPersistentBookmark(m.selection,!0),a(i,Bc(m,n.getRng(),v)),b.styles&&xb(i,b,g,s),n.moveToBookmark(e),kc.moveStart(i,n,n.getRng()),m.nodeChanged()}eb(h,m)}}else{r=n.getNode();for(var l=0,u=v.length;l<u;l++)if(v[l].ceFalseOverride&&i.is(r,v[l].selector))return void y(r,v[l])}},Nb={applyFormat:Tb},Rb=Gt.each,Ob=function(e,t,n,r,o){var i,a,s,l,u,c,f,d;null===t.get()&&(a=e,s={},(i=t).set({}),a.on("NodeChange",function(n){var r=kc.getParents(a.dom,n.element),o={};r=Gt.grep(r,function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")}),Rb(i.get(),function(e,n){Rb(r,function(t){return a.formatter.matchNode(t,n,{},e.similar)?(s[n]||(Rb(e,function(e){e(!0,{node:t,format:n,parents:r})}),s[n]=e),o[n]=e,!1):!Lv.matchesUnInheritedFormatSelector(a,t,n)&&void 0})}),Rb(s,function(e,t){o[t]||(delete s[t],Rb(e,function(e){e(!1,{node:n.element,format:t,parents:r})}))})})),u=n,c=r,f=o,d=(l=t).get(),Rb(u.split(","),function(e){d[e]||(d[e]=[],d[e].similar=f),d[e].push(c)}),l.set(d)},Pb={get:function(r){var t={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(n,e,t){Gt.each(t,function(e,t){r.setAttrib(n,t,e)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return Gt.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){t[e]={block:e,remove:"all"}}),t}},Ab=Gt.each,Db=ci.DOM,Mb=function(e,t){var n,o,r,p=t&&t.schema||Jo({}),m=function(e){var t,n,r;return o="string"==typeof e?{name:e,classes:[],attrs:{}}:e,t=Db.create(o.name),n=t,(r=o).classes.length&&Db.addClass(n,r.classes.join(" ")),Db.setAttribs(n,r.attrs),t},h=function(n,e,t){var r,o,i,a,s,l,u,c,f=0<e.length&&e[0],d=f&&f.name;if(s=d,l="string"!=typeof(a=n)?a.nodeName.toLowerCase():a,u=p.getElementRule(l),i=!(!(c=u&&u.parentsRequired)||!c.length)&&(s&&-1!==Gt.inArray(c,s)?s:c[0]))d===i?(o=e[0],e=e.slice(1)):o=i;else if(f)o=e[0],e=e.slice(1);else if(!t)return n;return o&&(r=m(o)).appendChild(n),t&&(r||(r=Db.create("div")).appendChild(n),Gt.each(t,function(e){var t=m(e);r.insertBefore(t,n)})),h(r,e,o&&o.siblings)};return e&&e.length?(o=e[0],n=m(o),(r=Db.create("div")).appendChild(h(n,e.slice(1),o.siblings)),r):""},Ib=function(e){var t,a={classes:[],attrs:{}};return"*"!==(e=a.selector=Gt.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,n,r,o){switch(t){case"#":a.attrs.id=n;break;case".":a.classes.push(n);break;case":":-1!==Gt.inArray("checked disabled enabled read-only required".split(" "),n)&&(a.attrs[n]=n)}if("["===r){var i=o.match(/([\w\-]+)(?:\=\"([^\"]+))?/);i&&(a.attrs[i[1]]=i[2])}return""})),a.name=t||"div",a},Lb=function(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Gt.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=Gt.map(e.split(/(?:~\+|~|\+)/),Ib),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},Bb=function(n,e){var t,r,o,i,a,s,l="";if(!1===(s=n.settings.preview_styles))return"";"string"!=typeof s&&(s="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var u=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(s=e.preview)?"":(t=e.block||e.inline||"span",r=(i=Lb(e.selector)).length?(i[0].name||(i[0].name=t),t=e.selector,Mb(i,n)):Mb([t],n),o=Db.select(t,r)[0]||r.firstChild,Ab(e.styles,function(e,t){(e=u(e))&&Db.setStyle(o,t,e)}),Ab(e.attributes,function(e,t){(e=u(e))&&Db.setAttrib(o,t,e)}),Ab(e.classes,function(e){e=u(e),Db.hasClass(o,e)||Db.addClass(o,e)}),n.fire("PreviewFormats"),Db.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=Db.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Ab(s.split(" "),function(e){var t=Db.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=Db.getStyle(n.getBody(),e,!0),"#ffffff"===Db.toHex(t).toLowerCase())||"color"===e&&"#000000"===Db.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(l+="padding:0 2px;"),l+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),Db.remove(r),l)},Fb=function(e,t,n,r,o){var i=t.get(n);!Lv.match(e,n,r,o)||"toggle"in i[0]&&!i[0].toggle?Nb.applyFormat(e,n,r,o):cb(e,n,r,o)},jb=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])};function Hb(e){var t,n,r,o=(t=e,n={},(r=function(e,t){e&&("string"!=typeof e?Gt.each(e,function(e,t){r(t,e)}):(t=t.length?t:[t],Gt.each(t,function(e){void 0===e.deep&&(e.deep=!e.selector),void 0===e.split&&(e.split=!e.selector||e.inline),void 0===e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),n[e]=t))})(Pb.get(t.dom)),r(t.settings.formats),{get:function(e){return e?n[e]:n},register:r,unregister:function(e){return e&&n[e]&&delete n[e],n}}),i=Ti(null);return jb(e),Gv(e),{get:o.get,register:o.register,unregister:o.unregister,apply:x(Nb.applyFormat,e),remove:x(cb,e),toggle:x(Fb,e,o),match:x(Lv.match,e),matchAll:x(Lv.matchAll,e),matchNode:x(Lv.matchNode,e),canApply:x(Lv.canApply,e),formatChanged:x(Ob,e,i),getCssText:x(Bb,e)}}var Ub,zb=Object.prototype.hasOwnProperty,Wb=(Ub=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)zb.call(o,i)&&(n[i]=Ub(n[i],o[i]))}return n}),Vb={register:function(t,l,u){t.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attributes.map["data-mce-tabindex"]),n.attr(t,null)}),t.addAttributeFilter("src,href,style",function(e,t){for(var n,r,o=e.length,i="data-mce-"+t,a=l.url_converter,s=l.url_converter_scope;o--;)void 0!==(r=(n=e[o]).attributes.map[i])?(n.attr(t,0<r.length?r:null),n.attr(i,null)):(r=n.attributes.map[t],"style"===t?r=u.serializeStyle(u.parseStyle(r),n.name):a&&(r=a.call(s,r,t,n.name)),n.attr(t,0<r.length?r:null))}),t.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<n.length?n:null))}),t.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;)"bookmark"!==(r=e[o]).attributes.map["data-mce-type"]||n.cleanup||r.remove()}),t.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=Ho.decode(t.value))}),t.addNodeFilter("script,style",function(e,t){for(var n,r,o,i=e.length,a=function(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===l.element_format&&0<r.length&&(n.firstChild.value="// <![CDATA[\n"+a(r)+"\n// ]]>")):"xhtml"===l.element_format&&0<r.length&&(n.firstChild.value="\x3c!--\n"+a(r)+"\n--\x3e")}),t.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)0===(t=e[n]).value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),t.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),t.addAttributeFilter("data-mce-type",function(e){z(e,function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())})}),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})},trimTrailingBr:function(e){var t,n,r=function(e){return e&&"br"===e.name};r(t=e.lastChild)&&r(n=t.prev)&&(t.remove(),n.remove())}},qb={process:function(e,t,n){return f=n,(c=e)&&c.hasEventListeners("PreProcess")&&!f.no_events?(o=t,i=n,u=(r=e).dom,o=o.cloneNode(!0),(a=document.implementation).createHTMLDocument&&(s=a.createHTMLDocument(""),Gt.each("BODY"===o.nodeName?o.childNodes:[o],function(e){s.body.appendChild(s.importNode(e,!0))}),o="BODY"!==o.nodeName?s.body.firstChild:s.body,l=u.doc,u.doc=s),rh(r,Wb(i,{node:o})),l&&(u.doc=l),o):t;var r,o,i,a,s,l,u,c,f}},$b=function(e,a,s){e.addNodeFilter("font",function(e){z(e,function(e){var t,n=a.parse(e.attr("style")),r=e.attr("color"),o=e.attr("face"),i=e.attr("size");r&&(n.color=r),o&&(n["font-family"]=o),i&&(n["font-size"]=s[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",a.serialize(n)),t=e,z(["color","face","size"],function(e){t.attr(e,null)})})})},Xb=function(e,t){var n,r=Qo();t.convert_fonts_to_spans&&$b(e,r,Gt.explode(t.font_size_legacy_values)),n=r,e.addNodeFilter("strike",function(e){z(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})},Yb={register:function(e,t){t.inline_styles&&Xb(e,t)}},Gb=/^[ \t\r\n]*$/,Kb={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Jb=function(e,t,n){var r,o,i=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[i])return e[i];if(e!==t){if(r=e[a])return r;for(o=e.parent;o&&o!==t;o=o.parent)if(r=o[a])return r}},Zb=function(){function a(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}return a.create=function(e,t){var n,r;if(n=new a(e,Kb[e]||1),t)for(r in t)n.attr(r,t[r]);return n},a.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},a.prototype.attr=function(e,t){var n,r;if("string"!=typeof e){for(r in e)this.attr(r,e[r]);return this}if(n=this.attributes){if(void 0===t)return n.map[e];if(null===t){if(e in n.map)for(delete n.map[e],r=n.length;r--;)if(n[r].name===e)return n=n.splice(r,1),this;return this}if(e in n.map){for(r=n.length;r--;)if(n[r].name===e){n[r].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,this}},a.prototype.clone=function(){var e,t,n,r,o,i=new a(this.name,this.type);if(n=this.attributes){for((o=[]).map={},e=0,t=n.length;e<t;e++)"id"!==(r=n[e]).name&&(o[o.length]={name:r.name,value:r.value},o.map[r.name]=r.value);i.attributes=o}return i.value=this.value,i.shortEnded=this.shortEnded,i},a.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},a.prototype.unwrap=function(){var e,t;for(e=this.firstChild;e;)t=e.next,this.insert(e,this,!0),e=t;this.remove()},a.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},a.prototype.append=function(e){var t;return e.parent&&e.remove(),(t=this.lastChild)?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},a.prototype.insert=function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},a.prototype.getAll=function(e){var t,n=[];for(t=this.firstChild;t;t=Jb(t,this))t.name===e&&n.push(t);return n},a.prototype.empty=function(){var e,t,n;if(this.firstChild){for(e=[],n=this.firstChild;n;n=Jb(n,this))e.push(n);for(t=e.length;t--;)(n=e[t]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}return this.firstChild=this.lastChild=null,this},a.prototype.isEmpty=function(e,t,n){var r,o,i=this.firstChild;if(t=t||{},i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(e[i.name])return!1;for(r=i.attributes.length;r--;)if("name"===(o=i.attributes[r].name)||0===o.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!Gb.test(i.value))return!1;if(3===i.type&&i.parent&&t[i.parent.name]&&Gb.test(i.value))return!1;if(n&&n(i))return!1}while(i=Jb(i,this));return!0},a.prototype.walk=function(e){return Jb(this,null,e)},a}(),Qb=function(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new Zb("br",1)).shortEnded=!0:r.empty().append(new Zb("#text",3)).value=" "},ey=function(e){return ty(e,"#text")&&" "===e.firstChild.value},ty=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},ny=function(r,e,t,n){return n.isEmpty(e,t,function(e){return t=e,(n=r.getElementRule(t.name))&&n.paddEmpty;var t,n})},ry=function(e,t){return e&&(t[e.name]||"br"===e.name)},oy=function(e,h){var g=e.schema;h.remove_trailing_brs&&e.addNodeFilter("br",function(e,t,n){var r,o,i,a,s,l,u,c,f=e.length,d=Gt.extend({},g.getBlockElements()),p=g.getNonEmptyElements(),m=g.getNonEmptyElements();for(d.body=1,r=0;r<f;r++)if(i=(o=e[r]).parent,d[o.parent.name]&&o===i.lastChild){for(s=o.prev;s;){if("span"!==(l=s.name)||"bookmark"!==s.attr("data-mce-type")){if("br"!==l)break;if("br"===l){o=null;break}}s=s.prev}o&&(o.remove(),ny(g,p,m,i)&&(u=g.getElementRule(i.name))&&(u.removeEmpty?i.remove():u.paddEmpty&&Qb(h,n,d,i)))}else{for(a=o;i&&i.firstChild===a&&i.lastChild===a&&!d[(a=i).name];)i=i.parent;a===i&&!0!==h.padd_empty_with_br&&((c=new Zb("#text",3)).value=" ",o.replace(c))}}),e.addAttributeFilter("href",function(e){var t,n,r,o=e.length;if(!h.allow_unsafe_link_target)for(;o--;)"a"===(t=e[o]).name&&"_blank"===t.attr("target")&&t.attr("rel",(n=t.attr("rel"),r=n?Gt.trim(n):"",/\b(noopener)\b/g.test(r)?r:r.split(" ").filter(function(e){return 0<e.length}).concat(["noopener"]).sort().join(" ")))}),h.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,t=o.lastChild;n=t.prev,r.insert(t,o),t=n;);}),h.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new Zb("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),h.validate&&g.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,n,r,o,i,a,s,l=e.length,u=g.getValidClasses();l--;){for(n=(t=e[l]).attr("class").split(" "),i="",r=0;r<n.length;r++)o=n[r],s=!1,(a=u["*"])&&a[o]&&(s=!0),a=u[t.name],!s&&a&&a[o]&&(s=!0),s&&(i&&(i+=" "),i+=o);i.length||(i=null),t.attr("class",i)}})},iy=Gt.makeMap,ay=Gt.each,sy=Gt.explode,ly=Gt.extend;function uy(E,T){void 0===T&&(T=Jo());var N={},R=[],O={},P={};(E=E||{}).validate=!("validate"in E)||E.validate,E.root_name=E.root_name||"body";var A=function(e){var t,n,r;n in N&&((r=O[n])?r.push(e):O[n]=[e]),t=R.length;for(;t--;)(n=R[t].name)in e.attributes.map&&((r=P[n])?r.push(e):P[n]=[e]);return e},e={schema:T,addAttributeFilter:function(e,n){ay(sy(e),function(e){var t;for(t=0;t<R.length;t++)if(R[t].name===e)return void R[t].callbacks.push(n);R.push({name:e,callbacks:[n]})})},getAttributeFilters:function(){return[].concat(R)},addNodeFilter:function(e,n){ay(sy(e),function(e){var t=N[e];t||(N[e]=t=[]),t.push(n)})},getNodeFilters:function(){var e=[];for(var t in N)N.hasOwnProperty(t)&&e.push({name:t,callbacks:N[t]});return e},filterNode:A,parse:function(e,a){var t,n,r,o,i,s,l,u,c,f,d,p=[];a=a||{},O={},P={},c=ly(iy("script,style,head,html,body,title,meta,param"),T.getBlockElements());var m=T.getNonEmptyElements(),h=T.children,g=E.validate,v="forced_root_block"in a?a.forced_root_block:E.forced_root_block,b=T.getWhiteSpaceElements(),y=/^[ \t\r\n]+/,w=/[ \t\r\n]+$/,x=/[ \t\r\n]+/g,C=/^[ \t\r\n]+$/;f=b.hasOwnProperty(a.context)||b.hasOwnProperty(E.root_name);var _=function(e,t){var n,r=new Zb(e,t);return e in N&&((n=O[e])?n.push(r):O[e]=[r]),r},S=function(e){var t,n,r,o,i=T.getBlockElements();for(t=e.prev;t&&3===t.type;){if(0<(r=t.value.replace(w,"")).length)return void(t.value=r);if(n=t.next){if(3===n.type&&n.value.length){t=t.prev;continue}if(!i[n.name]&&"script"!==n.name&&"style"!==n.name){t=t.prev;continue}}o=t.prev,t.remove(),t=o}};t=lv({validate:g,allow_script_urls:E.allow_script_urls,allow_conditional_comments:E.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(T.getSelfClosingElements()),cdata:function(e){d.append(_("#cdata",4)).value=e},text:function(e,t){var n;f||(e=e.replace(x," "),ry(d.lastChild,c)&&(e=e.replace(y,""))),0!==e.length&&((n=_("#text",3)).raw=!!t,d.append(n).value=e)},comment:function(e){d.append(_("#comment",8)).value=e},pi:function(e,t){d.append(_(e,7)).value=t,S(d)},doctype:function(e){d.append(_("#doctype",10)).value=e,S(d)},start:function(e,t,n){var r,o,i,a,s;if(i=g?T.getElementRule(e):{}){for((r=_(i.outputName||e,1)).attributes=t,r.shortEnded=n,d.append(r),(s=h[d.name])&&h[r.name]&&!s[r.name]&&p.push(r),o=R.length;o--;)(a=R[o].name)in t.map&&((l=P[a])?l.push(r):P[a]=[r]);c[e]&&S(r),n||(d=r),!f&&b[e]&&(f=!0)}},end:function(e){var t,n,r,o,i;if(n=g?T.getElementRule(e):{}){if(c[e]&&!f){if((t=d.firstChild)&&3===t.type)if(0<(r=t.value.replace(y,"")).length)t.value=r,t=t.next;else for(o=t.next,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.next,(0===r.length||C.test(r))&&(t.remove(),t=o),t=o;if((t=d.lastChild)&&3===t.type)if(0<(r=t.value.replace(w,"")).length)t.value=r,t=t.prev;else for(o=t.prev,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.prev,(0===r.length||C.test(r))&&(t.remove(),t=o),t=o}if(f&&b[e]&&(f=!1),n.removeEmpty&&ny(T,m,b,d)&&!d.attributes.map.name&&!d.attr("id"))return i=d.parent,c[d.name]?d.empty().remove():d.unwrap(),void(d=i);n.paddEmpty&&(ey(d)||ny(T,m,b,d))&&Qb(E,a,c,d),d=d.parent}}},T);var k=d=new Zb(a.context||E.root_name,11);if(t.parse(e),g&&p.length&&(a.context?a.invalid=!0:function(e){var t,n,r,o,i,a,s,l,u,c,f,d,p,m,h,g;for(d=iy("tr,td,th,tbody,thead,tfoot,table"),c=T.getNonEmptyElements(),f=T.getWhiteSpaceElements(),p=T.getTextBlockElements(),m=T.getSpecialElements(),t=0;t<e.length;t++)if((n=e[t]).parent&&!n.fixed)if(p[n.name]&&"li"===n.parent.name){for(h=n.next;h&&p[h.name];)h.name="li",h.fixed=!0,n.parent.insert(h,n.parent),h=h.next;n.unwrap(n)}else{for(o=[n],r=n.parent;r&&!T.isValidChild(r.name,n.name)&&!d[r.name];r=r.parent)o.push(r);if(r&&1<o.length){for(o.reverse(),i=a=A(o[0].clone()),u=0;u<o.length-1;u++){for(T.isValidChild(a.name,o[u].name)?(s=A(o[u].clone()),a.append(s)):s=a,l=o[u].firstChild;l&&l!==o[u+1];)g=l.next,s.append(l),l=g;a=s}ny(T,c,f,i)?r.insert(n,o[0],!0):(r.insert(i,o[0],!0),r.insert(n,i)),r=o[0],(ny(T,c,f,r)||ty(r,"br"))&&r.empty().remove()}else if(n.parent){if("li"===n.name){if((h=n.prev)&&("ul"===h.name||"ul"===h.name)){h.append(n);continue}if((h=n.next)&&("ul"===h.name||"ul"===h.name)){h.insert(n,h.firstChild,!0);continue}n.wrap(A(new Zb("ul",1)));continue}T.isValidChild(n.parent.name,"div")&&T.isValidChild("div",n.name)?n.wrap(A(new Zb("div",1))):m[n.name]?n.empty().remove():n.unwrap()}}}(p)),v&&("body"===k.name||a.isRootContent)&&function(){var e,t,n=k.firstChild,r=function(e){e&&((n=e.firstChild)&&3===n.type&&(n.value=n.value.replace(y,"")),(n=e.lastChild)&&3===n.type&&(n.value=n.value.replace(w,"")))};if(T.isValidChild(k.name,v.toLowerCase())){for(;n;)e=n.next,3===n.type||1===n.type&&"p"!==n.name&&!c[n.name]&&!n.attr("data-mce-type")?(t||((t=_(v,1)).attr(E.forced_root_block_attrs),k.insert(t,n)),t.append(n)):(r(t),t=null),n=e;r(t)}}(),!a.invalid){for(u in O){for(l=N[u],i=(n=O[u]).length;i--;)n[i].parent||n.splice(i,1);for(r=0,o=l.length;r<o;r++)l[r](n,u,a)}for(r=0,o=R.length;r<o;r++)if((l=R[r]).name in P){for(i=(n=P[l.name]).length;i--;)n[i].parent||n.splice(i,1);for(i=0,s=l.callbacks.length;i<s;i++)l.callbacks[i](n,l.name,a)}}return k}};return oy(e,E),Yb.register(e,E),e}var cy=function(e,t,n){-1===Gt.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))},fy=function(e,t,n){var r=Ca(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||ho(Yn.fromDom(t))?r:Gt.trim(r)},dy=function(e,t,n){var r=n.selection?Wb({forced_root_block:!1},n):n,o=e.parse(t,r);return Vb.trimTrailingBr(o),o},py=function(e,t,n,r,o){var i,a,s,l,u=(i=r,ff(t,n).serialize(i));return a=e,l=u,(s=o).no_events||!a?l:oh(a,Wb(s,{content:l})).content};function my(e,t){var a,s,l,u,c,n,r=(a=e,n=["data-mce-selected"],l=(s=t)&&s.dom?s.dom:ci.DOM,u=s&&s.schema?s.schema:Jo(a),a.entity_encoding=a.entity_encoding||"named",a.remove_trailing_brs=!("remove_trailing_brs"in a)||a.remove_trailing_brs,c=uy(a,u),Vb.register(c,a,l),{schema:u,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,serialize:function(e,t){var n=Wb({format:"html"},t||{}),r=qb.process(s,e,n),o=fy(l,r,n),i=dy(c,o,n);return"tree"===n.format?i:py(s,a,u,i,n)},addRules:function(e){u.addValidElements(e)},setRules:function(e){u.setValidElements(e)},addTempAttr:x(cy,c,n),getTempAttrs:function(){return n}});return{schema:r.schema,addNodeFilter:r.addNodeFilter,addAttributeFilter:r.addAttributeFilter,serialize:r.serialize,addRules:r.addRules,setRules:r.setRules,addTempAttr:r.addTempAttr,getTempAttrs:r.getTempAttrs}}function hy(e){return{getBookmark:x(yc,e),moveToBookmark:x(wc,e)}}(hy||(hy={})).isBookmarkNode=xc;var gy=hy,vy=Eo.isContentEditableFalse,by=Eo.isContentEditableTrue,yy=function(r,a){var s,l,u,c,f,d,p,m,h,g,v,b,i,y,w,x,C,_=a.dom,S=Gt.each,k=a.getDoc(),E=document,T=Math.abs,N=Math.round,R=a.getBody();c={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var e=".mce-content-body";a.contentStyles.push(e+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: content-box;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+e+" .mce-resizehandle:hover {background: #000}"+e+" img[data-mce-selected],"+e+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+e+" .mce-clonedresizable {position: absolute;"+(Oe.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+e+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}");var O=function(e){return e&&("IMG"===e.nodeName||a.dom.is(e,"figure.image"))},n=function(e){var t,n,r=e.target;t=e,n=a.selection.getRng(),!O(t.target)||Jg(t.clientX,t.clientY,n)||e.isDefaultPrevented()||(e.preventDefault(),a.selection.select(r))},P=function(e){return a.dom.is(e,"figure.image")?e.querySelector("img"):e},A=function(e){var t=a.settings.object_resizing;return!1!==t&&!Oe.iOS&&("string"!=typeof t&&(t="table,img,figure.image,div"),"false"!==e.getAttribute("data-mce-resize")&&e!==a.getBody()&&Rr.is(Yn.fromDom(e),t))},D=function(e){var t,n,r,o;t=e.screenX-d,n=e.screenY-p,y=t*f[2]+g,w=n*f[3]+v,y=y<5?5:y,w=w<5?5:w,(O(s)&&!1!==a.settings.resize_img_proportional?!Qg.modifierPressed(e):Qg.modifierPressed(e)||O(s)&&f[2]*f[3]!=0)&&(T(t)>T(n)?(w=N(y*b),y=N(w/b)):(y=N(w/b),w=N(y*b))),_.setStyles(P(l),{width:y,height:w}),r=0<(r=f.startPos.x+t)?r:0,o=0<(o=f.startPos.y+n)?o:0,_.setStyles(u,{left:r,top:o,display:"block"}),u.innerHTML=y+" &times; "+w,f[2]<0&&l.clientWidth<=y&&_.setStyle(l,"left",m+(g-y)),f[3]<0&&l.clientHeight<=w&&_.setStyle(l,"top",h+(v-w)),(t=R.scrollWidth-x)+(n=R.scrollHeight-C)!=0&&_.setStyles(u,{left:r-t,top:o-n}),i||(sh(a,s,g,v),i=!0)},M=function(){i=!1;var e=function(e,t){t&&(s.style[e]||!a.schema.isValid(s.nodeName.toLowerCase(),e)?_.setStyle(P(s),e,t):_.setAttrib(P(s),e,t))};e("width",y),e("height",w),_.unbind(k,"mousemove",D),_.unbind(k,"mouseup",M),E!==k&&(_.unbind(E,"mousemove",D),_.unbind(E,"mouseup",M)),_.remove(l),_.remove(u),o(s),lh(a,s,y,w),_.setAttrib(s,"style",_.getAttrib(s,"style")),a.nodeChanged()},o=function(e){var t,r,o,n,i;I(),F(),t=_.getPos(e,R),m=t.x,h=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,s!==e&&(s=e,y=w=0),n=a.fire("ObjectSelected",{target:e}),A(e)&&!n.isDefaultPrevented()?S(c,function(n,e){var t;(t=_.get("mceResizeHandle"+e))&&_.remove(t),t=_.add(R,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===Oe.ie&&(t.contentEditable=!1),_.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),d=(t=e).screenX,p=t.screenY,g=P(s).clientWidth,v=P(s).clientHeight,b=v/g,(f=n).startPos={x:r*n[0]+m,y:o*n[1]+h},x=R.scrollWidth,C=R.scrollHeight,l=s.cloneNode(!0),_.addClass(l,"mce-clonedresizable"),_.setAttrib(l,"data-mce-bogus","all"),l.contentEditable=!1,l.unSelectabe=!0,_.setStyles(l,{left:m,top:h,margin:0}),l.removeAttribute("data-mce-selected"),R.appendChild(l),_.bind(k,"mousemove",D),_.bind(k,"mouseup",M),E!==k&&(_.bind(E,"mousemove",D),_.bind(E,"mouseup",M)),u=_.add(R,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},g+" &times; "+v)}),n.elm=t,_.setStyles(t,{left:r*n[0]+m-t.offsetWidth/2,top:o*n[1]+h-t.offsetHeight/2})}):I(),s.setAttribute("data-mce-selected","1")},I=function(){var e,t;for(e in F(),s&&s.removeAttribute("data-mce-selected"),c)(t=_.get("mceResizeHandle"+e))&&(_.unbind(t),_.remove(t))},L=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};i||a.removed||(S(_.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=_.$(t).closest("table,img,figure.image,hr")[0],R)&&(j(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?o(t):I())},B=function(e){return vy(function(e,t){for(;t&&t!==e;){if(by(t)||vy(t))return t;t=t.parentNode}return null}(a.getBody(),e))},F=function(){for(var e in c){var t=c[e];t.elm&&(_.unbind(t.elm),delete t.elm)}},j=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return a.on("init",function(){j(),Oe.ie&&11<=Oe.ie&&(a.on("mousedown click",function(e){var t=e.target,n=t.nodeName;i||!/^(TABLE|IMG|HR)$/.test(n)||B(t)||(2!==e.button&&a.selection.select(t,"TABLE"===n),"mousedown"===e.type&&a.nodeChanged())}),a.dom.bind(R,"mscontrolselect",function(e){var t=function(e){Ie.setEditorTimeout(a,function(){a.selection.select(e)})};if(B(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))}));var t=Ie.throttle(function(e){a.composing||L(e)});a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",t),a.on("keyup compositionend",function(e){s&&"TABLE"===s.nodeName&&t(e)}),a.on("hide blur",I),a.on("contextmenu",n)}),a.on("remove",F),{isResizable:A,showResizeRect:o,hideResizeRect:I,updateResizeRect:L,destroy:function(){s=l=null}}},wy=function(e){return Eo.isContentEditableTrue(e)||Eo.isContentEditableFalse(e)},xy=function(t,n,r){var o,e,i,a,s,l=r;if(l.caretPositionFromPoint)(e=l.caretPositionFromPoint(t,n))&&((o=r.createRange()).setStart(e.offsetNode,e.offset),o.collapse(!0));else if(r.caretRangeFromPoint)o=r.caretRangeFromPoint(t,n);else if(l.body.createTextRange){o=l.body.createTextRange();try{o.moveToPoint(t,n),o.collapse(!0)}catch(e){o=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=Gt.toArray(o.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(e){}}return null}(t,n,r)}return i=o,a=r.body,s=i&&i.parentElement?i.parentElement():null,Eo.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(s,a,wy))?null:i}return o},Cy=function(n,e){return U(e,function(e){var t=n.fire("GetSelectionRange",{range:e});return t.range!==e?t.range:e})},_y=function(e,t){var n=(t||document).createDocumentFragment();return z(e,function(e){n.appendChild(e.dom())}),Yn.fromDom(n)},Sy=xr("element","width","rows"),ky=xr("element","cells"),Ey=xr("x","y"),Ty=function(e,t){var n=parseInt(cr.get(e,t),10);return isNaN(n)?1:n},Ny=function(e){return q(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},Ry=function(e,t){for(var n=e.rows(),r=0;r<n.length;r++)for(var o=n[r].cells(),i=0;i<o.length;i++)if(Ar.eq(o[i],t))return R.some(Ey(i,r));return R.none()},Oy=function(e,t,n,r,o){for(var i=[],a=e.rows(),s=n;s<=o;s++){var l=a[s].cells(),u=t<r?l.slice(t,r+1):l.slice(r,t+1);i.push(ky(a[s].element(),u))}return i},Py=function(e){var o=Sy(ca(e),0,[]);return z(zi(e,"tr"),function(n,r){z(zi(n,"td,th"),function(e,t){!function(e,t,n,r,o){for(var i=Ty(o,"rowspan"),a=Ty(o,"colspan"),s=e.rows(),l=n;l<n+i;l++){s[l]||(s[l]=ky(fa(r),[]));for(var u=t;u<t+a;u++)s[l].cells()[u]=l===n&&u===t?o:ca(o)}}(o,function(e,t,n){for(;r=t,o=n,i=void 0,((i=e.rows())[o]?i[o].cells():[])[r];)t++;var r,o,i;return t}(o,t,r),r,n,e)})}),Sy(o.element(),Ny(o.rows()),o.rows())},Ay=function(e){return n=U((t=e).rows(),function(e){var t=U(e.cells(),function(e){var t=fa(e);return cr.remove(t,"colspan"),cr.remove(t,"rowspan"),t}),n=ca(e.element());return _i(n,t),n}),r=ca(t.element()),o=Yn.fromTag("tbody"),_i(o,n),xi.append(r,o),r;var t,n,r,o},Dy=function(c,e,t){return Ry(c,e).bind(function(u){return Ry(c,t).map(function(e){return t=c,r=e,o=(n=u).x(),i=n.y(),a=r.x(),s=r.y(),l=i<s?Oy(t,o,i,a,s):Oy(t,o,s,a,i),Sy(t.element(),Ny(l),l);var t,n,r,o,i,a,s,l})})},My=function(n,t){return $(n,function(e){return"li"===nr.name(e)&&xg(e,t)}).fold(y([]),function(e){return(t=n,$(t,function(e){return"ul"===nr.name(e)||"ol"===nr.name(e)})).map(function(e){return[Yn.fromTag("li"),Yn.fromTag(nr.name(e))]}).getOr([]);var t})},Iy=function(e,t){var n,r=Yn.fromDom(t.commonAncestorContainer),o=Jf(r,e),i=V(o,function(e){return ao(e)||oo(e)}),a=My(o,t),s=i.concat(a.length?a:co(n=r)?jr.parent(n).filter(uo).fold(y([]),function(e){return[n,e]}):uo(n)?[n]:[]);return U(s,ca)},Ly=function(){return _y([])},By=function(e,t){return n=Yn.fromDom(t.cloneContents()),r=Iy(e,t),o=q(r,function(e,t){return xi.append(t,e),t},n),0<r.length?_y([o]):o;var n,r,o},Fy=function(e,o){return(t=e,n=o[0],Ki(n,"table",x(Ar.eq,t))).bind(function(e){var t=o[0],n=o[o.length-1],r=Py(e);return Dy(r,t,n).map(function(e){return _y([Ay(e)])})}).getOrThunk(Ly);var t,n},jy=function(e,t){var n,r,o=zp(t,e);return 0<o.length?Fy(e,o):(n=e,0<(r=t).length&&r[0].collapsed?Ly():By(n,r[0]))},Hy=function(e,t){var n,r=e.selection.getRng(),o=e.dom.create("body"),i=e.selection.getSel(),a=Cy(e,Lp(i));if((t=t||{}).get=!0,t.format=t.format||"html",t.selection=!0,(t=e.fire("BeforeGetContent",t)).isDefaultPrevented())return e.fire("GetContent",t),t.content;if("text"===t.format)return e.selection.isCollapsed()?"":Ca(r.text||(i.toString?i.toString():""));r.cloneContents?(n=t.contextual?jy(Yn.fromDom(e.getBody()),a).dom():r.cloneContents())&&o.appendChild(n):void 0!==r.item||void 0!==r.htmlText?(o.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText),o.removeChild(o.firstChild)):o.innerHTML=r.toString(),t.getInner=!0;var s=e.selection.serializer.serialize(o,t);return"tree"===t.format?s:(t.content=e.selection.isCollapsed()?"":s,e.fire("GetContent",t),t.content)},Uy=function(e,t,n){var r,o,i,a=e.selection.getRng(),s=e.getDoc();if((n=n||{format:"html"}).set=!0,n.selection=!0,n.content=t,n.no_events||!(n=e.fire("BeforeSetContent",n)).isDefaultPrevented()){if(t=n.content,a.insertNode){t+='<span id="__caret">_</span>',a.startContainer===s&&a.endContainer===s?s.body.innerHTML=t:(a.deleteContents(),0===s.body.childNodes.length?s.body.innerHTML=t:a.createContextualFragment?a.insertNode(a.createContextualFragment(t)):(o=s.createDocumentFragment(),i=s.createElement("div"),o.appendChild(i),i.outerHTML=t,a.insertNode(o))),r=e.dom.get("__caret"),(a=s.createRange()).setStartBefore(r),a.setEndBefore(r),e.selection.setRng(a),e.dom.remove("__caret");try{e.selection.setRng(a)}catch(e){}}else a.item&&(s.execCommand("Delete",!1,null),a=e.getRng()),/^\s+/.test(t)?(a.pasteHTML('<span id="__mce_tmp">_</span>'+t),e.dom.remove("__mce_tmp")):a.pasteHTML(t);n.no_events||e.fire("SetContent",n)}else e.fire("SetContent",n)},zy=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return R.from(i).map(Yn.fromDom).map(function(e){return r&&t.collapsed?e:jr.child(e,o(e,a)).getOr(e)}).bind(function(e){return nr.isElement(e)?R.some(e):jr.parent(e)}).map(function(e){return e.dom()}).getOr(e)},Wy=function(e,t,n){return zy(e,t,!0,n,function(e,t){return Math.min(jr.childNodesCount(e),t)})},Vy=function(e,t,n){return zy(e,t,!1,n,function(e,t){return 0<t?t-1:t})},qy=function(e,t){for(var n=e;e&&Eo.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},$y=Gt.each,Xy=function(e){return!!e.select},Yy=function(e){return!(!e||!e.ownerDocument)&&Ar.contains(Yn.fromDom(e.ownerDocument),Yn.fromDom(e))},Gy=function(a,s,e,l){var n,t,u,c,f,r=function(e,t){return Uy(l,e,t)},o=function(e){var t=p();t.collapse(!!e),i(t)},d=function(){return s.getSelection?s.getSelection():s.document.selection},p=function(){var e,t,n,r,o=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}};if(!s)return null;if(null==(r=s.document))return null;if(void 0!==l.bookmark&&!1===Dh(l)){var i=qm(l);if(i.isSome())return i.map(function(e){return Cy(l,[e])[0]}).getOr(r.createRange())}try{(e=d())&&(t=0<e.rangeCount?e.getRangeAt(0):e.createRange?e.createRange():r.createRange())}catch(e){}return(t=Cy(l,[t])[0])||(t=r.createRange?r.createRange():r.body.createTextRange()),t.setStart&&9===t.startContainer.nodeType&&t.collapsed&&(n=a.getRoot(),t.setStart(n,0),t.setEnd(n,0)),u&&c&&(0===o(t.START_TO_START,t,u)&&0===o(t.END_TO_END,t,u)?t=c:c=u=null),t},i=function(e,t){var n,r;if((o=e)&&(Xy(o)||Yy(o.startContainer)&&Yy(o.endContainer))){var o,i=Xy(e)?e:null;if(i){c=null;try{i.select()}catch(e){}}else{if(n=d(),e=l.fire("SetSelectionRange",{range:e,forward:t}).range,n){c=e;try{n.removeAllRanges(),n.addRange(e)}catch(e){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),u=0<n.rangeCount?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||Oe.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(r=e.startContainer.childNodes[e.startOffset])&&"IMG"===r.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(r,0,r,1)),l.fire("AfterSetSelectionRange",{range:e,forward:t})}}},m=function(){var e,t,n=d();return!(n&&n.anchorNode&&n.focusNode)||((e=a.createRng()).setStart(n.anchorNode,n.anchorOffset),e.collapse(!0),(t=a.createRng()).setStart(n.focusNode,n.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)},h={bookmarkManager:null,controlSelection:null,dom:a,win:s,serializer:e,editor:l,collapse:o,setCursorLocation:function(e,t){var n=a.createRng();e?(n.setStart(e,t),n.setEnd(e,t),i(n),o(!1)):(Cg(a,n,l.getBody(),!0),i(n))},getContent:function(e){return Hy(l,e)},setContent:r,getBookmark:function(e,t){return n.getBookmark(e,t)},moveToBookmark:function(e){return n.moveToBookmark(e)},select:function(e,t){var r,n,o;return(r=a,n=e,o=t,R.from(n).map(function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),o&&(Cg(r,n,e,!0),Cg(r,n,e,!1)),n})).each(i),e},isCollapsed:function(){var e=p(),t=d();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:m,setNode:function(e){return r(a.getOuterHTML(e)),e},getNode:function(){return e=l.getBody(),(t=p())?(r=t.startContainer,o=t.endContainer,i=t.startOffset,a=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?qy(r.nextSibling,!0):r.parentNode,o=0===a?qy(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n):e;var e,t,n,r,o,i,a},getSel:d,setRng:i,getRng:p,getStart:function(e){return Wy(l.getBody(),p(),e)},getEnd:function(e){return Vy(l.getBody(),p(),e)},getSelectedBlocks:function(e,t){return function(e,t,n,r){var o,i,a=[];if(i=e.getRoot(),n=e.getParent(n||Wy(i,t,t.collapsed),e.isBlock),r=e.getParent(r||Vy(i,t,t.collapsed),e.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r)for(var s=new Qr(o=n,i);(o=s.next())&&o!==r;)e.isBlock(o)&&a.push(o);return r&&n!==r&&r!==i&&a.push(r),a}(a,p(),e,t)},normalize:function(){var e=p(),t=d();if(Fp(t)||!_g(l))return e;var n=hm(a,e);return n.each(function(e){i(e,m())}),n.getOr(e)},selectorChanged:function(e,t){var i;return f||(f={},i={},l.on("NodeChange",function(e){var n=e.element,r=a.getParents(n,null,a.getRoot()),o={};$y(f,function(e,n){$y(r,function(t){if(a.is(t,n))return i[n]||($y(e,function(e){e(!0,{node:t,selector:n,parents:r})}),i[n]=e),o[n]=e,!1})}),$y(i,function(e,t){o[t]||(delete i[t],$y(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),f[e]||(f[e]=[]),f[e].push(t),h},getScrollContainer:function(){for(var e,t=a.getRoot();t&&"BODY"!==t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return Vl(l,e,t)},placeCaretAt:function(e,t){return i(xy(e,t,l.getDoc()))},getBoundingClientRect:function(){var e=p();return e.collapsed?ks.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=u=c=null,t.destroy()}};return n=gy(h),t=yy(h,l),h.bookmarkManager=n,h.controlSelection=t,h},Ky=Eo.isContentEditableFalse,Jy=Qa,Zy=nc,Qy=tc,ew=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},tw=function(e,t,n,r){var o,i,a,s,l,u,c=e===_s.Forwards,f=c?Qy:Zy;return!r.collapsed&&(o=Jy(r),Ky(o))?sl(e,t,o,e===_s.Backwards,!0):(s=ka(r.startContainer),f(i=ec(e,t.getBody(),r))?ll(t,i.getNode(!c)):(i=n(i))?f(i)?sl(e,t,i.getNode(!c),c,!0):f(a=n(i))&&(!(u=Vu(l=i,a))&&Eo.isBr(l.getNode())||u)?sl(e,t,a.getNode(!c),c,!0):s?cl(t,i.toRange(),!0):null:s?r:null)},nw=function(e,t,n,r){var o,i,a,s,l,u,c,f,d;if(d=Jy(r),o=ec(e,t.getBody(),r),i=n(t.getBody(),Ug(1),o),a=Vt.filter(i,zg(1)),l=Vt.last(o.getClientRects()),(Qy(o)||rc(o))&&(d=o.getNode()),(Zy(o)||oc(o))&&(d=o.getNode(!0)),!l)return null;if(u=l.left,(s=Yg(a,u))&&Ky(s.node))return c=Math.abs(u-s.left),f=Math.abs(u-s.right),sl(e,t,s.node,c<f,!0);if(d){var p=function(e,t,n,r){var o,i,a,s,l,u,c=_l(t),f=[],d=0,p=function(e){return Vt.last(e.getClientRects())};u=p(s=1===e?(o=c.next,i=Za,a=Ja,ks.after(r)):(o=c.prev,i=Ja,a=Za,ks.before(r)));do{if(s.isVisible()&&!a(l=p(s),u)){if(0<f.length&&i(l,Vt.last(f))&&d++,(l=Ya(l)).position=s,l.line=d,n(l))return f;f.push(l)}}while(s=o(s));return f}(e,t.getBody(),Ug(1),d);if(s=Yg(Vt.filter(p,zg(1)),u))return cl(t,s.position.toRange(),!0);if(s=Vt.last(Vt.filter(p,zg(0))))return cl(t,s.position.toRange(),!0)}},rw=function(e,t,n){var r,o,i,a,s=_l(e.getBody()),l=ba.curry(ew,s.next),u=ba.curry(ew,s.prev);if(n.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(n.startContainer,"PRE")))return;(1===t?l(ks.fromRangeStart(n)):u(ks.fromRangeStart(n)))||(a=(i=e).dom.create(i.settings.forced_root_block),(!Oe.ie||11<=Oe.ie)&&(a.innerHTML='<br data-mce-bogus="1">'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},ow=function(c,f){return function(){var e,t,n,r,o,i,a,s,l,u=(t=f,r=_l((e=c).getBody()),o=ba.curry(ew,r.next),i=ba.curry(ew,r.prev),a=t?_s.Forwards:_s.Backwards,s=t?o:i,l=e.selection.getRng(),(n=tw(a,e,s,l))?n:(n=rw(e,a,l))||null);return!!u&&(c.selection.setRng(u),!0)}},iw=function(s,l){return function(){var e,t,n,r,o,i,a=(r=(t=l)?1:-1,o=t?Hg:jg,i=(e=s).selection.getRng(),(n=nw(r,e,o,i))?n:(n=rw(e,r,i))||null);return!!a&&(s.selection.setRng(a),!0)}},aw=function(e,r){return K(U(e,function(e){return Wb({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:v},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},sw=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}},lw=function(e,t){return $(aw(e,t),function(e){return e.action()})},uw=function(i,a){i.on("keydown",function(e){var t,n,r,o;!1===e.isDefaultPrevented()&&(t=i,n=a,r=e,o=$n.detect().os,lw([{keyCode:Qg.RIGHT,action:ow(t,!0)},{keyCode:Qg.LEFT,action:ow(t,!1)},{keyCode:Qg.UP,action:iw(t,!1)},{keyCode:Qg.DOWN,action:iw(t,!0)},{keyCode:Qg.RIGHT,action:Eu(t,!0)},{keyCode:Qg.LEFT,action:Eu(t,!1)},{keyCode:Qg.UP,action:Tu(t,!1)},{keyCode:Qg.DOWN,action:Tu(t,!0)},{keyCode:Qg.RIGHT,action:gp.move(t,n,!0)},{keyCode:Qg.LEFT,action:gp.move(t,n,!1)},{keyCode:Qg.RIGHT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:gp.moveNextWord(t,n)},{keyCode:Qg.LEFT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:gp.movePrevWord(t,n)}],r).each(function(e){r.preventDefault()}))})},cw=function(e){return 1===jr.children(e).length},fw=function(e,t,n,r){var o,i,a,s,l=x(Kv,t),u=U(V(r,l),function(e){return e.dom()});if(0===u.length)kd(t,e,n);else{var c=(o=n.dom(),i=u,a=Wv(!1),s=Yv(i,a.dom()),xi.before(Yn.fromDom(o),a),ki.remove(Yn.fromDom(o)),ks(s,0));t.selection.setRng(c.toRange())}},dw=function(n,r){var t,e=Yn.fromDom(n.getBody()),o=Yn.fromDom(n.selection.getStart()),i=V((t=Jf(o,e),X(t,io).fold(y(t),function(e){return t.slice(0,e)})),cw);return te(i).map(function(e){var t=ks.fromRangeStart(n.selection.getRng());return!!If(r,t,e.dom())&&(fw(r,n,e,i),!0)}).getOr(!1)},pw=function(e,t){return!!e.selection.isCollapsed()&&dw(e,t)},mw=function(o,i){o.on("keydown",function(e){var t,n,r;!1===e.isDefaultPrevented()&&(t=o,n=i,r=e,lw([{keyCode:Qg.BACKSPACE,action:sw(Nd,t,!1)},{keyCode:Qg.DELETE,action:sw(Nd,t,!0)},{keyCode:Qg.BACKSPACE,action:sw(wp,t,n,!1)},{keyCode:Qg.DELETE,action:sw(wp,t,n,!0)},{keyCode:Qg.BACKSPACE,action:sw(Qp,t,!1)},{keyCode:Qg.DELETE,action:sw(Qp,t,!0)},{keyCode:Qg.BACKSPACE,action:sw(cd,t,!1)},{keyCode:Qg.DELETE,action:sw(cd,t,!0)},{keyCode:Qg.BACKSPACE,action:sw(ad,t,!1)},{keyCode:Qg.DELETE,action:sw(ad,t,!0)},{keyCode:Qg.BACKSPACE,action:sw(pw,t,!1)},{keyCode:Qg.DELETE,action:sw(pw,t,!0)}],r).each(function(e){r.preventDefault()}))}),o.on("keyup",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=o,n=e,lw([{keyCode:Qg.BACKSPACE,action:sw(Rd,t)},{keyCode:Qg.DELETE,action:sw(Rd,t)}],n))})},hw=function(e){return R.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},gw=function(e,t){var n,r,o,i=t,a=e.dom,s=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var l=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);l&&/^(UL|OL|DL)$/.test(l.nodeName)&&t.insertBefore(a.doc.createTextNode(" "),t.firstChild)}if(o=a.createRng(),t.normalize(),t.hasChildNodes()){for(n=new Qr(t,t);r=n.current();){if(Eo.isText(r)){o.setStart(r,0),o.setEnd(r,0);break}if(s[r.nodeName.toLowerCase()]){o.setStartBefore(r),o.setEndBefore(r);break}i=r,r=n.next()}r||(o.setStart(i,0),o.setEnd(i,0))}else Eo.isBr(t)?t.nextSibling&&a.isBlock(t.nextSibling)?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)):(o.setStart(t,0),o.setEnd(t,0));e.selection.setRng(o),a.remove(void 0),e.selection.scrollIntoView(t)}},vw=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},bw=hw,yw=function(e){return hw(e).fold(y(""),function(e){return e.nodeName.toUpperCase()})},ww=function(e){return hw(e).filter(function(e){return co(Yn.fromDom(e))}).isSome()},xw=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},Cw=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},_w=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},Sw=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!Eo.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},kw=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){var s;Cw(s=n)&&Cw(s.parentNode)&&(o="LI");var l,u,c=o?t(o):i.create("BR");if(Sw(n,r,!0)&&Sw(n,r,!1))xw(n,"LI")?i.insertAfter(c,_w(n)):i.replace(c,n);else if(Sw(n,r,!0))xw(n,"LI")?(i.insertAfter(c,_w(n)),c.appendChild(i.doc.createTextNode(" ")),c.appendChild(n)):n.parentNode.insertBefore(c,n);else if(Sw(n,r,!1))i.insertAfter(c,_w(n));else{n=_w(n);var f=a.cloneRange();f.setStartAfter(r),f.setEndAfter(n);var d=f.extractContents();"LI"===o&&(u="LI",(l=d).firstChild&&l.firstChild.nodeName===u)?(c=d.firstChild,i.insertAfter(d,n)):(i.insertAfter(d,n),i.insertAfter(c,n))}i.remove(r),gw(e,c)}},Ew=function(e){e.innerHTML='<br data-mce-bogus="1">'},Tw=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},Nw=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},Rw=function(e,t,n){return!1===Eo.isText(t)?n:e?1===n&&t.data.charAt(n-1)===xa?0:n:n===t.data.length-1&&t.data.charAt(n)===xa?t.data.length:n},Ow=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},Pw=function(e,t){var n=eu(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&e.dom.setAttribs(t,tu(e))},Aw=function(a,e){var t,s,l,i,u,n,r,o,c,f,d,p,m,h,g,v,b,y,w=a.dom,x=a.schema,C=x.getNonEmptyElements(),_=a.selection.getRng(),S=function(e){var t,n,r,o=l,i=x.getTextInlineElements();if(e||"TABLE"===f||"HR"===f?(t=w.create(e||p),Pw(a,t)):t=u.cloneNode(!1),r=t,!1===ou(a))w.setAttrib(t,"style",null),w.setAttrib(t,"class",null);else do{if(i[o.nodeName]){if(Xs(o))continue;n=o.cloneNode(!1),w.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):r=n,t.appendChild(n)}}while((o=o.parentNode)&&o!==s);return Ew(r),t},k=function(e){var t,n,r,o;if(o=Rw(e,l,i),Eo.isText(l)&&(e?0<o:o<l.nodeValue.length))return!1;if(l.parentNode===u&&m&&!e)return!0;if(e&&Eo.isElement(l)&&l===u.firstChild)return!0;if(Tw(l,"TABLE")||Tw(l,"HR"))return m&&!e||!m&&e;for(t=new Qr(l,u),Eo.isText(l)&&(e&&0===o?t.prev():e||o!==l.nodeValue.length||t.next());n=t.current();){if(Eo.isElement(n)){if(!n.getAttribute("data-mce-bogus")&&(r=n.nodeName.toLowerCase(),C[r]&&"br"!==r))return!1}else if(Eo.isText(n)&&!/^[ \t\r\n]*$/.test(n.nodeValue))return!1;e?t.prev():t.next()}return!0},E=function(){r=/^(H[1-6]|PRE|FIGURE)$/.test(f)&&"HGROUP"!==d?S(p):S(),iu(a)&&Nw(w,c)&&w.isEmpty(u)?r=w.split(c,u):w.insertAfter(r,u),gw(a,r)};hm(w,_).each(function(e){_.setStart(e.startContainer,e.startOffset),_.setEnd(e.endContainer,e.endOffset)}),l=_.startContainer,i=_.startOffset,p=eu(a),n=e.shiftKey,Eo.isElement(l)&&l.hasChildNodes()&&(m=i>l.childNodes.length-1,l=l.childNodes[Math.min(i,l.childNodes.length-1)]||l,i=m&&Eo.isText(l)?l.nodeValue.length:0),(s=Ow(w,l))&&((p&&!n||!p&&n)&&(l=function(e,t,n,r,o){var i,a,s,l,u,c,f,d=t||"P",p=e.dom,m=Ow(p,r);if(!(a=p.getParent(r,p.isBlock))||!Nw(p,a)){if(c=(a=a||m)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=p.create(d),Pw(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(l=r;l.parentNode!==a;)l=l.parentNode;for(;l&&!p.isBlock(l);)l=(s=l).previousSibling;if(s&&e.schema.isValidChild(c,d.toLowerCase())){for(i=p.create(d),Pw(e,i),s.parentNode.insertBefore(i,s),l=s;l&&!p.isBlock(l);)u=l.nextSibling,i.appendChild(l),l=u;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,p,_,l,i)),u=w.getParent(l,w.isBlock),c=u?w.getParent(u.parentNode,w.isBlock):null,f=u?u.nodeName.toUpperCase():"","LI"!==(d=c?c.nodeName.toUpperCase():"")||e.ctrlKey||(c=(u=c).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&w.isEmpty(u)?kw(a,S,c,u,p):p&&u===a.getBody()||(p=p||"P",ka(u)?(r=Ma(u),w.isEmpty(u)&&Ew(u),gw(a,r)):k()?E():k(!0)?(r=u.parentNode.insertBefore(S(),u),gw(a,Tw(u,"HR")?r:u)):((t=(b=_,y=b.cloneRange(),y.setStart(b.startContainer,Rw(!0,b.startContainer,b.startOffset)),y.setEnd(b.endContainer,Rw(!1,b.endContainer,b.endOffset)),y).cloneRange()).setEndAfter(u),function(e){for(;Eo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o=t.extractContents()),r=o.firstChild,w.insertAfter(o,u),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;Eo.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=o)&&"A"===a.nodeName&&0===Gt.trim(Ca(a.innerText||a.textContent)).length&&e.remove(o);var a}}(w,C,r),h=w,(g=u).normalize(),(v=g.lastChild)&&!/^(left|right)$/gi.test(h.getStyle(v,"float",!0))||h.add(g,"br"),w.isEmpty(u)&&Ew(u),r.normalize(),w.isEmpty(r)?(w.remove(r),E()):gw(a,r)),w.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},Dw=function(e,t){return bw(e).filter(function(e){return 0<t.length&&Rr.is(Yn.fromDom(e),t)}).isSome()},Mw=function(e){return Dw(e,nu(e))},Iw=function(e){return Dw(e,ru(e))},Lw=fd([{br:[]},{block:[]},{none:[]}]),Bw=function(e,t){return Iw(e)},Fw=function(n){return function(e,t){return""===eu(e)===n}},jw=function(n){return function(e,t){return ww(e)===n}},Hw=function(n,r){return function(e,t){return yw(e)===n.toUpperCase()===r}},Uw=function(e){return Hw("pre",e)},zw=function(n){return function(e,t){return Ql(e)===n}},Ww=function(e,t){return Mw(e)},Vw=function(e,t){return t},qw=function(e){var t=eu(e),n=vw(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},$w=function(e,t){return function(n,r){return q(e,function(e,t){return e&&t(n,r)},!0)?R.some(t):R.none()}},Xw=function(e,t){return Hd([$w([Bw],Lw.none()),$w([Hw("summary",!0)],Lw.br()),$w([Uw(!0),zw(!1),Vw],Lw.br()),$w([Uw(!0),zw(!1)],Lw.block()),$w([Uw(!0),zw(!0),Vw],Lw.block()),$w([Uw(!0),zw(!0)],Lw.br()),$w([jw(!0),Vw],Lw.br()),$w([jw(!0)],Lw.block()),$w([Fw(!0),Vw,qw],Lw.block()),$w([Fw(!0)],Lw.br()),$w([Ww],Lw.br()),$w([Fw(!1),Vw],Lw.br()),$w([qw],Lw.block())],[e,t.shiftKey]).getOr(Lw.none())},Yw=function(e,t){Xw(e,t).fold(function(){km(e,t)},function(){Aw(e,t)},v)},Gw=function(o){o.on("keydown",function(e){var t,n,r;e.keyCode===Qg.ENTER&&(t=o,(n=e).isDefaultPrevented()||(n.preventDefault(),(r=t.undoManager).typing&&(r.typing=!1,r.add()),t.undoManager.transact(function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),Yw(t,n)})))})},Kw=function(e,t,n){return s=t,!(!Jw(n)||!Eo.isText(s.container())||(r=e,i=(o=t).container(),a=o.offset(),i.insertData(a," "),r.selection.setCursorLocation(i,a+1),0));var r,o,i,a,s},Jw=function(e){return e.fold(y(!1),y(!0),y(!0),y(!1))},Zw=function(e){return!!e.selection.isCollapsed()&&(t=e,n=x(Af.isInlineTarget,t),r=ks.fromRangeStart(t.selection.getRng()),op(n,t.getBody(),r).map(x(Kw,t,r)).getOr(!1));var t,n,r},Qw=function(r){r.on("keydown",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=r,n=e,lw([{keyCode:Qg.SPACEBAR,action:sw(Zw,t)}],n).each(function(e){n.preventDefault()}))})},ex=function(e,t){var n;t.hasAttribute("data-mce-caret")&&(Ma(t),(n=e).selection.setRng(n.selection.getRng()),e.selection.scrollIntoView(t))},tx=function(e,t){var n,r=(n=e,Ji(Yn.fromDom(n.getBody()),"*[data-mce-caret]").fold(y(null),function(e){return e.dom()}));if(r)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void ex(e,r)):void(Na(r)&&(ex(e,r),e.undoManager.add()))},nx=function(e){e.on("keyup compositionstart",x(tx,e))},rx=function(e){var t=gp.setupSelectedState(e);nx(e),uw(e,t),mw(e,t),Gw(e),Qw(e)};function ox(s){var l,n,r,o=Gt.each,u=Qg.BACKSPACE,c=Qg.DELETE,f=s.dom,d=s.selection,e=s.settings,t=s.parser,i=Oe.gecko,a=Oe.ie,p=Oe.webkit,m="data:text/mce-internal,",h=a?"Text":"URL",g=function(e,t){try{s.getDoc().execCommand(e,!1,t)}catch(e){}},v=function(e){return e.isDefaultPrevented()},b=function(){s.shortcuts.add("meta+a",null,"SelectAll")},y=function(){s.on("keydown",function(e){if(!v(e)&&e.keyCode===u&&d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},w=function(){s.inline||(s.contentStyles.push("body {min-height: 150px}"),s.on("click",function(e){var t;if("HTML"===e.target.nodeName){if(11<Oe.ie)return void s.getBody().focus();t=s.selection.getRng(),s.getBody().focus(),s.selection.setRng(t),s.selection.normalize(),s.nodeChanged()}}))};return s.on("keydown",function(e){var t,n,r,o,i;if(!v(e)&&e.keyCode===Qg.BACKSPACE&&(n=(t=d.getRng()).startContainer,r=t.startOffset,o=f.getRoot(),i=n,t.collapsed&&0===r)){for(;i&&i.parentNode&&i.parentNode.firstChild===i&&i.parentNode!==o;)i=i.parentNode;"BLOCKQUOTE"===i.tagName&&(s.formatter.toggle("blockquote",null,i),(t=f.createRng()).setStart(n,0),t.setEnd(n,0),d.setRng(t))}}),l=function(e){var t=f.create("body"),n=e.cloneContents();return t.appendChild(n),d.serializer.serialize(t,{format:"html"})},s.on("keydown",function(e){var t,n,r,o,i,a=e.keyCode;if(!v(e)&&(a===c||a===u)){if(t=s.selection.isCollapsed(),n=s.getBody(),t&&!f.isEmpty(n))return;if(!t&&(r=s.selection.getRng(),o=l(r),(i=f.createRng()).selectNode(s.getBody()),o!==l(i)))return;e.preventDefault(),s.setContent(""),n.firstChild&&f.isBlock(n.firstChild)?s.selection.setCursorLocation(n.firstChild,0):s.selection.setCursorLocation(n,0),s.nodeChanged()}}),Oe.windowsPhone||s.on("keyup focusin mouseup",function(e){Qg.modifierPressed(e)||d.normalize()},!0),p&&(s.settings.content_editable||f.bind(s.getDoc(),"mousedown mouseup",function(e){var t;if(e.target===s.getDoc().documentElement)if(t=d.getRng(),s.getBody().focus(),"mousedown"===e.type){if(Ta(t.startContainer))return;d.placeCaretAt(e.clientX,e.clientY)}else d.setRng(t)}),s.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==f.getContentEditableParent(t)&&(e.preventDefault(),s.selection.select(t),s.nodeChanged()),"A"===t.nodeName&&f.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),d.select(t))}),e.forced_root_block&&s.on("init",function(){g("DefaultParagraphSeparator",e.forced_root_block)}),s.on("init",function(){s.dom.bind(s.getBody(),"submit",function(e){e.preventDefault()})}),y(),t.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),Oe.iOS?(s.inline||s.on("keydown",function(){document.activeElement===document.body&&s.getWin().focus()}),w(),s.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),s.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):b()),11<=Oe.ie&&(w(),y()),Oe.ie&&(b(),g("AutoUrlDetect",!1),s.on("dragstart",function(e){var t,n,r;(t=e).dataTransfer&&(s.selection.isCollapsed()&&"IMG"===t.target.tagName&&d.select(t.target),0<(n=s.selection.getContent()).length&&(r=m+escape(s.id)+","+escape(n),t.dataTransfer.setData(h,r)))}),s.on("drop",function(e){if(!v(e)){var t=(i=e).dataTransfer&&(a=i.dataTransfer.getData(h))&&0<=a.indexOf(m)?(a=a.substr(m.length).split(","),{id:unescape(a[0]),html:unescape(a[1])}):null;if(t&&t.id!==s.id){e.preventDefault();var n=xy(e.x,e.y,s.getDoc());d.setRng(n),r=t.html,o=!0,s.queryCommandSupported("mceInsertClipboardContent")?s.execCommand("mceInsertClipboardContent",!1,{content:r,internal:o}):s.execCommand("mceInsertContent",!1,r)}}var r,o,i,a})),i&&(s.on("keydown",function(e){if(!v(e)&&e.keyCode===u){if(!s.getBody().getElementsByTagName("hr").length)return;if(d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode(),n=t.previousSibling;if("HR"===t.nodeName)return f.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(f.remove(n),e.preventDefault())}}}),Range.prototype.getClientRects||s.on("mousedown",function(e){if(!v(e)&&"HTML"===e.target.nodeName){var t=s.getBody();t.blur(),Ie.setEditorTimeout(s,function(){t.focus()})}}),n=function(){var e=f.getAttribs(d.getStart().cloneNode(!1));return function(){var t=d.getStart();t!==s.getBody()&&(f.setAttrib(t,"style",null),o(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}},r=function(){return!d.isCollapsed()&&f.getParent(d.getStart(),f.isBlock)!==f.getParent(d.getEnd(),f.isBlock)},s.on("keypress",function(e){var t;if(!v(e)&&(8===e.keyCode||46===e.keyCode)&&r())return t=n(),s.getDoc().execCommand("delete",!1,null),t(),e.preventDefault(),!1}),f.bind(s.getDoc(),"cut",function(e){var t;!v(e)&&r()&&(t=n(),Ie.setEditorTimeout(s,function(){t()}))}),e.readonly||s.on("BeforeExecCommand MouseDown",function(){g("StyleWithCSS",!1),g("enableInlineTableEditing",!1),e.object_resizing||g("enableObjectResizing",!1)}),s.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(f.select("a"),function(e){var t=e.parentNode,n=f.getRoot();if(t.lastChild===e){for(;t&&!f.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}f.add(t,"br",{"data-mce-bogus":1})}})}),s.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),Oe.mac&&s.on("keydown",function(e){!Qg.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),s.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}),y()),{refreshContentEditable:function(){},isHidden:function(){var e;return!i||s.removed?0:!(e=s.selection.getSel())||!e.rangeCount||0===e.rangeCount}}}var ix=function(e){return Eo.isElement(e)&&lo(Yn.fromDom(e))},ax=function(t){t.on("click",function(e){3<=e.detail&&function(e){var t=e.selection.getRng(),n=Cs.fromRangeStart(t),r=Cs.fromRangeEnd(t);if(Cs.isElementPosition(n)){var o=n.container();ix(o)&&fc.firstPositionIn(o).each(function(e){return t.setStart(e.container(),e.offset())})}Cs.isElementPosition(r)&&(o=n.container(),ix(o)&&fc.lastPositionIn(o).each(function(e){return t.setEnd(e.container(),e.offset())})),e.selection.setRng(pf(t))}(t)})},sx=function(e){var t,n;(t=e).on("click",function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}),(n=e).parser.addNodeFilter("details",function(e){z(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),n.serializer.addNodeFilter("details",function(e){z(e,function(e){var t=e.attr("data-mce-open");e.attr("open",P(t)?t:null),e.attr("data-mce-open",null)})})},lx=ci.DOM,ux=function(e){var t;e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),(t=e).settings.auto_focus&&Ie.setEditorTimeout(t,function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()},100)},cx=function(t,e){var n,r,s,o,i,a,l,u,c,f=t.settings,d=t.getElement(),p=t.getDoc();f.inline||(t.getElement().style.visibility=t.orgVisibility),e||f.content_editable||(p.open(),p.write(t.iframeHTML),p.close()),f.content_editable&&(t.on("remove",function(){var e=this.getBody();lx.removeClass(e,"mce-content-body"),lx.removeClass(e,"mce-edit-focus"),lx.setAttrib(e,"contentEditable",null)}),lx.addClass(d,"mce-content-body"),t.contentDocument=p=f.content_document||document,t.contentWindow=f.content_window||window,t.bodyElement=d,f.content_document=f.content_window=null,f.root_name=d.nodeName.toLowerCase()),(n=t.getBody()).disabled=!0,t.readonly=f.readonly,t.readonly||(t.inline&&"static"===lx.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=t.getParam("content_editable_state",!0)),n.disabled=!1,t.editorUpload=mg(t),t.schema=Jo(f),t.dom=ci(p,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:f.force_hex_style_colors,class_filter:f.class_filter,update_styles:!0,root_element:t.inline?t.getBody():null,collect:f.content_editable,schema:t.schema,onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=((o=uy((s=t).settings,s.schema)).addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,o,i=e.length,a=s.dom;i--;)if(r=(n=e[i]).attr(t),o="data-mce-"+t,!n.attributes.map[o]){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=a.serializeStyle(a.parseStyle(r),n.name)).length||(r=null),n.attr(o,r),n.attr(t,r)):"tabindex"===t?(n.attr(o,r),n.attr(t,null)):n.attr(o,s.convertURL(r,t,n.name))}}),o.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),o.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),o.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=s.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new Zb("br",1)).shortEnded=!0)}),o),t.serializer=my(f,t),t.selection=Gy(t.dom,t.getWin(),t.serializer,t),t.annotator=Xc(t),t.formatter=Hb(t),t.undoManager=Tv(t),t._nodeChangeDispatcher=new Sg(t),t._selectionOverrides=iv(t),sx(t),ax(t),rx(t),bg(t),t.fire("PreInit"),f.browser_spellcheck||f.gecko_spellcheck||(p.body.spellcheck=!1,lx.setAttrib(n,"spellcheck","false")),t.quirks=ox(t),t.fire("PostRender"),f.directionality&&(n.dir=f.directionality),f.nowrap&&(n.style.whiteSpace="nowrap"),f.protect&&t.on("BeforeSetContent",function(t){Gt.each(f.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.on("compositionstart compositionend",function(e){t.composing="compositionstart"===e.type}),0<t.contentStyles.length&&(r="",Gt.each(t.contentStyles,function(e){r+=e+"\r\n"}),t.dom.addStyle(r)),(i=t,i.inline?lx.styleSheetLoader:i.dom.styleSheetLoader).loadAll(t.contentCSS,function(e){ux(t)},function(e){ux(t)}),f.content_style&&(a=t,l=f.content_style,u=Yn.fromDom(a.getDoc().head),c=Yn.fromTag("style"),cr.set(c,"type","text/css"),xi.append(c,Yn.fromText(l)),xi.append(u,c))},fx=ci.DOM,dx=function(e,t){var n,r,o,i,a,s,l,u=e.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),c=(n=e.id,r=u,o=t.height,i=Xl(e),l=Yn.fromTag("iframe"),cr.setAll(l,i),cr.setAll(l,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),br(l,{width:"100%",height:(a=o,s="number"==typeof a?a+"px":a,s||""),display:"block"}),l).dom();c.onload=function(){c.onload=null,e.fire("load")};var f,d,p,m,h=function(e,t){if(document.domain!==window.location.hostname&&Oe.ie&&Oe.ie<12){var n=pg.uuid("mce");e[n]=function(){cx(e)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return fx.setAttrib(t,"src",r),!0}return!1}(e,c);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=c,e.iframeHTML=(m=Yl(f=e)+"<html><head>",Gl(f)!==f.documentBaseUrl&&(m+='<base href="'+f.documentBaseURI.getURI()+'" />'),m+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',d=Kl(f),p=Jl(f),Zl(f)&&(m+='<meta http-equiv="Content-Security-Policy" content="'+Zl(f)+'" />'),m+='</head><body id="'+d+'" class="mce-content-body '+p+'" data-id="'+f.id+'"><br></body></html>'),fx.add(t.iframeContainer,c),h},px=function(e,t){var n=dx(e,t);t.editorContainer&&(fx.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=fx.isHidden(t.editorContainer)),e.getElement().style.display="none",fx.setAttrib(e.id,"aria-hidden","true"),n||cx(e)},mx=ci.DOM,hx=function(t,n,e){var r,o,i=Zh.get(e);if(r=Zh.urls[e]||t.documentBaseUrl.replace(/\/$/,""),e=Gt.trim(e),i&&-1===Gt.inArray(n,e)){if(Gt.each(Zh.dependencies(e),function(e){hx(t,n,e)}),t.plugins[e])return;o=new i(t,r,t.$),(t.plugins[e]=o).init&&(o.init(t,r),n.push(e))}},gx=function(e){return e.replace(/^\-/,"")},vx=function(e){return{editorContainer:e,iframeContainer:e}},bx=function(e){var t,n,r=e.getElement();return e.inline?vx(null):(t=r,n=mx.create("div"),mx.insertAfter(n,t),vx(n))},yx=function(e){var t,n,r,o,i,a,s,l,u,c,f,d=e.settings,p=e.getElement();return e.orgDisplay=p.style.display,P(d.theme)?(c=(o=e).settings,f=o.getElement(),i=c.width||mx.getStyle(f,"width")||"100%",a=c.height||mx.getStyle(f,"height")||f.offsetHeight,s=c.min_height||100,(l=/^[0-9\.]+(|px)$/i).test(""+i)&&(i=Math.max(parseInt(i,10),100)),l.test(""+a)&&(a=Math.max(parseInt(a,10),s)),u=o.theme.renderUI({targetNode:f,width:i,height:a,deltaWidth:c.delta_width,deltaHeight:c.delta_height}),c.content_editable||(a=(u.iframeHeight||a)+("number"==typeof a?u.deltaHeight||0:""))<s&&(a=s),u.height=a,u):L(d.theme)?(r=(t=e).getElement(),(n=t.settings.theme(t,r)).editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||t.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||t.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:r.offsetHeight,n):bx(e)},wx=function(t){var e,n,r,o,i,a,s=t.settings,l=t.getElement();return t.rtl=s.rtl_ui||t.editorManager.i18n.rtl,t.editorManager.i18n.setCode(s.language),s.aria_label=s.aria_label||mx.getAttrib(l,"aria-label",t.getLang("aria.rich_text_area")),t.fire("ScriptsLoaded"),o=(n=t).settings.theme,P(o)?(n.settings.theme=gx(o),r=Qh.get(o),n.theme=new r(n,Qh.urls[o]),n.theme.init&&n.theme.init(n,Qh.urls[o]||n.documentBaseUrl.replace(/\/$/,""),n.$)):n.theme={},i=t,a=[],Gt.each(i.settings.plugins.split(/[ ,]/),function(e){hx(i,a,gx(e))}),e=yx(t),t.editorContainer=e.editorContainer?e.editorContainer:null,s.content_css&&Gt.each(Gt.explode(s.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),s.content_editable?cx(t):px(t,e)},xx=ci.DOM,Cx=function(e){return"-"===e.charAt(0)},_x=function(i,a){var s=hi.ScriptLoader;!function(e,t,n,r){var o=t.settings,i=o.theme;if(P(i)){if(!Cx(i)&&!Qh.urls.hasOwnProperty(i)){var a=o.theme_url;a?Qh.load(i,t.documentBaseURI.toAbsolute(a)):Qh.load(i,"themes/"+i+"/theme"+n+".js")}e.loadQueue(function(){Qh.waitFor(i,r)})}else r()}(s,i,a,function(){var e,t,n,r,o;e=s,(n=(t=i).settings).language&&"en"!==n.language&&!n.language_url&&(n.language_url=t.editorManager.baseURL+"/langs/"+n.language+".js"),n.language_url&&!t.editorManager.i18n.data[n.language]&&e.add(n.language_url),r=i.settings,o=a,Gt.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),Gt.each(r.external_plugins,function(e,t){Zh.load(t,e),r.plugins+=" "+t}),Gt.each(r.plugins.split(/[ ,]/),function(e){if((e=Gt.trim(e))&&!Zh.urls[e])if(Cx(e)){e=e.substr(1,e.length);var t=Zh.dependencies(e);Gt.each(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=Zh.createUrl(t,e),Zh.load(e.resource,e)})}else Zh.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),s.loadQueue(function(){i.removed||wx(i)},i,function(e){Yh(i,e[0]),i.removed||wx(i)})})},Sx=function(t){var e=t.settings,n=t.id,r=function(){xx.unbind(window,"ready",r),t.render()};if(Ve.Event.domLoaded){if(t.getElement()&&Oe.contentEditable){e.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||xx.getParent(n,"form");o&&(t.formElement=o,e.hidden_input&&!/TEXTAREA|INPUT/i.test(t.getElement().nodeName)&&(xx.insertAfter(xx.create("input",{type:"hidden",name:n}),n),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},xx.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.setContent(t.startContent,{format:"raw"})}),!e.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=Wh(t),t.notificationManager=zh(t),"xml"===e.encoding&&t.on("GetContent",function(e){e.save&&(e.content=xx.encode(e.content))}),e.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),e.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),_x(t,t.suffix)}}else xx.bind(window,"ready",r)},kx=function(e,t,n){var r=e.sidebars?e.sidebars:[];r.push({name:t,settings:n}),e.sidebars=r},Ex=Gt.each,Tx=Gt.trim,Nx="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),Rx={ftp:21,http:80,https:443,mailto:25},Ox=function(r,e){var t,n,o=this;if(r=Tx(r),t=(e=o.settings=e||{}).base_uri,/^([\w\-]+):([^\/]{2})/i.test(r)||/^\s*#/.test(r))o.source=r;else{var i=0===r.indexOf("//");0!==r.indexOf("/")||i||(r=(t&&t.protocol||"http")+"://mce_host"+r),/^[\w\-]*:?\/\//.test(r)||(n=e.base_uri?e.base_uri.path:new Ox(document.location.href).directory,r=""==e.base_uri.protocol?"//mce_host"+o.toAbsPath(n,r):(r=/([^#?]*)([#?]?.*)/.exec(r),(t&&t.protocol||"http")+"://mce_host"+o.toAbsPath(n,r[1])+r[2])),r=r.replace(/@@/g,"(mce_at)"),r=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(r),Ex(Nx,function(e,t){var n=r[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[e]=n}),t&&(o.protocol||(o.protocol=t.protocol),o.userInfo||(o.userInfo=t.userInfo),o.port||"mce_host"!==o.host||(o.port=t.port),o.host&&"mce_host"!==o.host||(o.host=t.host),o.source=""),i&&(o.protocol="")}};Ox.prototype={setPath:function(e){e=/^(.*?)\/?(\w+)?$/.exec(e),this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},toRelative:function(e){var t;if("./"===e)return e;if("mce_host"!==(e=new Ox(e,{base_uri:this})).host&&this.host!==e.host&&e.host||this.port!==e.port||this.protocol!==e.protocol&&""!==e.protocol)return e.getURI();var n=this.getURI(),r=e.getURI();return n===r||"/"===n.charAt(n.length-1)&&n.substr(0,n.length-1)===r?n:(t=this.toRelPath(this.path,e.path),e.query&&(t+="?"+e.query),e.anchor&&(t+="#"+e.anchor),t)},toAbsolute:function(e,t){return(e=new Ox(e,{base_uri:this})).getURI(t&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=Rx[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r,o,i=0,a="";if(e=(e=e.substring(0,e.lastIndexOf("/"))).split("/"),n=t.split("/"),e.length>=n.length)for(r=0,o=e.length;r<o;r++)if(r>=n.length||e[r]!==n[r]){i=r+1;break}if(e.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=e.length||e[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=e.length-(i-1);r<o;r++)a+="../";for(r=i-1,o=n.length;r<o;r++)a+=r!==i-1?"/"+n[r]:n[r];return a},toAbsPath:function(e,t){var n,r,o,i=0,a=[];for(r=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),Ex(e,function(e){e&&a.push(e)}),e=a,n=t.length-1,a=[];0<=n;n--)0!==t[n].length&&"."!==t[n]&&(".."!==t[n]?0<i?i--:a.push(t[n]):i++);return 0!==(o=(n=e.length-i)<=0?a.reverse().join("/"):e.slice(0,n).join("/")+"/"+a.reverse().join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(n.protocol?t+=n.protocol+"://":t+="//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},Ox.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}},Ox.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t};var Px=function(e,t,n){var r,o,i,a,s;if(t.format=t.format?t.format:"html",t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)r=Gt.trim(cv.trimExternal(e.serializer,n.innerHTML));else if("text"===t.format)r=Ca(n.innerText||n.textContent);else{if("tree"===t.format)return e.serializer.serialize(n,t);i=(o=e).serializer.serialize(n,t),a=eu(o),s=new RegExp("^(<"+a+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+a+">[\r\n]*|<br \\/>[\r\n]*)$"),r=i.replace(s,"")}return"text"===t.format||ho(Yn.fromDom(n))?t.content=r:t.content=Gt.trim(r),t.no_events||e.fire("GetContent",t),t.content},Ax=function(e,t){t(e),e.firstChild&&Ax(e.firstChild,t),e.next&&Ax(e.next,t)},Dx=function(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&Ax(t.firstChild,function(t){z(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),z(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);z(r,function(t){z(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})},Mx=function(e){return e instanceof Zb},Ix=function(e,t){var r;e.dom.setHTML(e.getBody(),t),Dh(r=e)&&fc.firstPositionIn(r.getBody()).each(function(e){var t=e.getNode(),n=Eo.isTable(t)?fc.firstPositionIn(t).getOr(e):e;r.selection.setRng(n.toRange())})},Lx=function(s,l,u){return void 0===u&&(u={}),u.format=u.format?u.format:"html",u.set=!0,u.content=Mx(l)?"":l,Mx(l)||u.no_events||(s.fire("BeforeSetContent",u),l=u.content),R.from(s.getBody()).fold(y(l),function(e){return Mx(l)?function(e,t,n,r){Dx(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=ff({validate:e.validate},e.schema).serialize(n);return r.content=ho(Yn.fromDom(t))?o:Gt.trim(o),Ix(e,r.content),r.no_events||e.fire("SetContent",r),n}(s,e,l,u):(t=s,n=e,o=u,0===(r=l).length||/^\s+$/.test(r)?(a='<br data-mce-bogus="1">',"TABLE"===n.nodeName?r="<tr><td>"+a+"</td></tr>":/^(UL|OL)$/.test(n.nodeName)&&(r="<li>"+a+"</li>"),(i=eu(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,r=t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||(r='<br data-mce-bogus="1">'),Ix(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=ff({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=ho(Yn.fromDom(n))?r:Gt.trim(r),Ix(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Bx=ci.DOM,Fx=function(e){return R.from(e).each(function(e){return e.destroy()})},jx=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Bx.remove(o.nextSibling),!e.inline&&r&&(i=e,Bx.setStyle(i.id,"display",i.orgDisplay)),ih(e),e.editorManager.remove(e),Bx.remove(e.getContainer()),Fx(t),Fx(n),e.destroy()}var i},Hx=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Fx(i),Fx(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),Bx.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Ux=ci.DOM,zx=Gt.extend,Wx=Gt.each,Vx=Gt.resolve,qx=Oe.ie,$x=function(e,t,n){var r,o,i,a,s,l,u,c=this,f=c.documentBaseUrl=n.documentBaseURL,d=n.baseURI;r=c,o=e,i=f,a=n.defaultSettings,s=t,u={id:o,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(l=r).convertURL,url_converter_scope:l,ie7_compat:!0},t=Ef(yf,u,a,s),c.settings=t,bi.language=t.language||"en",bi.languageLoad=t.language_load,bi.baseURL=n.baseURL,c.id=e,c.setDirty(!1),c.plugins={},c.documentBaseURI=new Ox(t.document_base_url,{base_uri:d}),c.baseURI=d,c.contentCSS=[],c.contentStyles=[],c.shortcuts=new Ch(c),c.loadedCSS={},c.editorCommands=new Jm(c),c.suffix=n.suffix,c.editorManager=n,c.inline=t.inline,c.buttons={},c.menuItems={},t.cache_suffix&&(Oe.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(Oe.overrideViewPort=!1),n.fire("SetupEditor",{editor:c}),c.execCallback("setup",c),c.$=hn.overrideDefaults(function(){return{context:c.inline?c.getBody():c.getDoc(),element:c.getBody()}})};zx($x.prototype={render:function(){Sx(this)},focus:function(e){Ah(this,e)},hasFocus:function(){return Dh(this)},execCallback:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?Vx(r):0,o=Vx(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,Array.prototype.slice.call(arguments,1))},translate:function(e){if(e&&Gt.is(e,"string")){var n=this.settings.language||"en",r=this.editorManager.i18n;e=r.data[n+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,t){return r.data[n+"."+t]||"{#"+t+"}"})}return this.editorManager.translate(e)},getLang:function(e,t){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(void 0!==t?t:"{#"+e+"}")},getParam:function(e,t,n){return Rf(this,e,t,n)},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.stateSelector&&void 0===t.active&&(t.active=!1),t.text||t.icon||(t.icon=e),t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addSidebar:function(e,t){return kx(this,e,t)},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems[e]=t},addContextToolbar:function(e,t){var n,r=this;r.contextToolbars=r.contextToolbars||[],"string"==typeof e&&(n=e,e=function(e){return r.dom.is(e,n)}),r.contextToolbars.push({id:pg.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable=!0:(Ux.show(this.getContainer()),Ux.hide(this.id)),this.load(),this.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(qx&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(Ux.hide(e.getContainer()),Ux.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var t,n=this.getElement();return this.removed?"":n?((e=e||{}).load=!0,t=this.setContent(void 0!==n.value?n.value:n.innerHTML,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t):void 0},save:function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(o.nodeName)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=Ux.getParent(r.id,"form"))&&Wx(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},setContent:function(e,t){return Lx(this,e,t)},getContent:function(e){return t=this,void 0===(n=e)&&(n={}),R.from(t.getBody()).fold(y("tree"===n.format?new Zb("body",11):""),function(e){return Px(t,n,e)});var t,n},insertContent:function(e,t){t&&(e=zx({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},setMode:function(e){var t,n;(n=e)!==fh(t=this)&&(t.initialized?ch(t,"readonly"===n):t.on("init",function(){ch(t,"readonly"===n)}),ah(t,n))},getContainer:function(){return this.container||(this.container=Ux.get(this.editorContainer||this.id+"_parent")),this.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=Ux.get(this.id)),this.targetElm},getWin:function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},getDoc:function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var n,r=this,o=r.settings,i=r.dom;e=e||r.getBody(),void 0===r.hasVisual&&(r.hasVisual=o.visual),Wx(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=o.visual_table_class||"mce-item-table",void((t=i.getAttrib(e,"border"))&&"0"!==t||!r.hasVisual?i.removeClass(e,n):i.addClass(e,n));case"A":return void(i.getAttrib(e,"href")||(t=i.getAttrib(e,"name")||e.id,n=o.visual_anchor_class||"mce-item-anchor",t&&r.hasVisual?i.addClass(e,n):i.removeClass(e,n)))}}),r.fire("VisualAid",{element:e,hasVisual:r.hasVisual})},remove:function(){jx(this)},destroy:function(e){Hx(this,e)},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},vh);var Xx,Yx,Gx,Kx={isEditorUIElement:function(e){return-1!==e.className.toString().indexOf("mce-")}},Jx=function(n,e){var t,r;$n.detect().browser.isIE()?(r=n).on("focusout",function(){Wm(r)}):(t=e,n.on("mouseup touchend",function(e){t.throttle()})),n.on("keyup nodechange",function(e){var t;"nodechange"===(t=e).type&&t.selectionChange||Wm(n)})},Zx=function(e){var t,n,r,o=Ei(function(){Wm(e)},0);e.inline&&(t=e,n=o,r=function(){n.throttle()},ci.DOM.bind(document,"mouseup",r),t.on("remove",function(){ci.DOM.unbind(document,"mouseup",r)})),e.on("init",function(){Jx(e,o)}),e.on("remove",function(){o.cancel()})},Qx=ci.DOM,eC=function(e){return Kx.isEditorUIElement(e)},tC=function(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==Qx.getParent(e,function(e){return eC(e)||!!n&&t.dom.is(e,n)})},nC=function(r,e){var t=e.editor;Zx(t),t.on("focusin",function(){var e=r.focusedEditor;e!==this&&(e&&e.fire("blur",{focusedEditor:this}),r.setActive(this),(r.focusedEditor=this).fire("focus",{blurredEditor:e}),this.focus(!0))}),t.on("focusout",function(){var t=this;Ie.setEditorTimeout(t,function(){var e=r.focusedEditor;tC(t,function(){try{return document.activeElement}catch(e){return document.body}}())||e!==t||(t.fire("blur",{focusedEditor:null}),r.focusedEditor=null)})}),Xx||(Xx=function(e){var t,n=r.activeEditor;t=e.target,n&&t.ownerDocument===document&&(t===document.body||tC(n,t)||r.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),r.focusedEditor=null))},Qx.bind(document,"focusin",Xx))},rC=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(Qx.unbind(document,"focusin",Xx),Xx=null)},oC=function(e){e.on("AddEditor",x(nC,e)),e.on("RemoveEditor",x(rC,e))},iC={},aC="en",sC={setCode:function(e){e&&(aC=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return aC},rtl:!1,add:function(e,t){var n=iC[e];for(var r in n||(iC[e]=n={}),t)n[r]=t[r];this.setCode(e)},translate:function(e){var t=iC[aC]||{},n=function(e){return Gt.is(e,"function")?Object.prototype.toString.call(e):r(e)?"":""+e},r=function(e){return""===e||null===e||Gt.is(e,"undefined")},o=function(e){return e=n(e),Gt.hasOwn(t,e)?n(t[e]):e};if(r(e))return"";if(Gt.is(e,"object")&&Gt.hasOwn(e,"raw"))return n(e.raw);if(Gt.is(e,"array")){var i=e.slice(1);e=o(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return Gt.hasOwn(i,t)?n(i[t]):e})}return o(e).replace(/{context:\w+}$/,"")},data:iC},lC=ci.DOM,uC=Gt.explode,cC=Gt.each,fC=Gt.extend,dC=0,pC=!1,mC=[],hC=[],gC=function(t){cC(Gx.get(),function(e){"scroll"===t.type?e.fire("ScrollWindow",t):e.fire("ResizeWindow",t)})},vC=function(e){e!==pC&&(e?hn(window).on("resize scroll",gC):hn(window).off("resize scroll",gC),pC=e)},bC=function(t){var e=hC;delete mC[t.id];for(var n=0;n<mC.length;n++)if(mC[n]===t){mC.splice(n,1);break}return hC=V(hC,function(e){return t!==e}),Gx.activeEditor===t&&(Gx.activeEditor=0<hC.length?hC[0]:null),Gx.focusedEditor===t&&(Gx.focusedEditor=null),e.length!==hC.length};fC(Gx={defaultSettings:{},$:hn,majorVersion:"4",minorVersion:"8.4",releaseDate:"2018-10-23",editors:mC,i18n:sC,activeEditor:null,settings:{},setup:function(){var e,t,n,r,o="";if(t=Ox.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),n=window.tinymce||window.tinyMCEPreInit)e=n.base||n.baseURL,o=n.suffix;else{for(var i=document.getElementsByTagName("script"),a=0;a<i.length;a++){var s=(r=i[a].src).substring(r.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(r)){-1!==s.indexOf(".min")&&(o=".min"),e=r.substring(0,r.lastIndexOf("/"));break}}!e&&document.currentScript&&(-1!==(r=document.currentScript.src).indexOf(".min")&&(o=".min"),e=r.substring(0,r.lastIndexOf("/")))}this.baseURL=new Ox(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new Ox(this.baseURL),this.suffix=o,oC(this)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&(this.baseURL=new Ox(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new Ox(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;for(var o in r)bi.PluginManager.urls[o]=r[o]},init:function(r){var n,s,l=this;s=Gt.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var u=function(e){var t=e.id;return t||(t=(t=e.name)&&!lC.get(t)?e.name:lC.uniqueId(),e.setAttribute("id",t)),t},c=function(e,t){return t.constructor===RegExp?t.test(e.className):lC.hasClass(e,t)},f=function(e){n=e},e=function(){var o,i=0,a=[],n=function(e,t,n){var r=new $x(e,t,l);a.push(r),r.on("init",function(){++i===o.length&&f(a)}),r.targetElm=r.targetElm||n,r.render()};lC.unbind(window,"ready",e),function(e){var t=r[e];t&&t.apply(l,Array.prototype.slice.call(arguments,2))}("onpageload"),o=hn.unique(function(t){var e,n=[];if(Oe.ie&&Oe.ie<11)return Jh("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(t.types)return cC(t.types,function(e){n=n.concat(lC.select(e.selector))}),n;if(t.selector)return lC.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":0<(e=t.elements||"").length&&cC(uC(e),function(t){var e;(e=lC.get(t))?n.push(e):cC(document.forms,function(e){cC(e.elements,function(e){e.name===t&&(t="mce_editor_"+dC++,lC.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":cC(lC.select("textarea"),function(e){t.editor_deselector&&c(e,t.editor_deselector)||t.editor_selector&&!c(e,t.editor_selector)||n.push(e)})}return n}(r)),r.types?cC(r.types,function(t){Gt.each(o,function(e){return!lC.is(e,t.selector)||(n(u(e),fC({},r,t),e),!1)})}):(Gt.each(o,function(e){var t;(t=l.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(bC(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}),0===(o=Gt.grep(o,function(e){return!l.get(e.id)})).length?f([]):cC(o,function(e){var t;t=e,r.inline&&t.tagName.toLowerCase()in s?Jh("Could not initialize inline editor on invalid inline target element",e):n(u(e),r,e)}))};return l.settings=r,lC.bind(window,"ready",e),new Pe(function(t){n?t(n):f=function(e){t(e)}})},get:function(t){return 0===arguments.length?hC.slice(0):P(t)?$(hC,function(e){return e.id===t}).getOr(null):B(t)&&hC[t]?hC[t]:null},add:function(e){var t=this;return mC[e.id]===e||(null===t.get(e.id)&&("length"!==e.id&&(mC[e.id]=e),mC.push(e),hC.push(e)),vC(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),Yx||(Yx=function(){t.fire("BeforeUnload")},lC.bind(window,"beforeunload",Yx))),e},createEditor:function(e,t){return this.add(new $x(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!P(e))return n=e,M(r.get(n.id))?null:(bC(n)&&r.fire("RemoveEditor",{editor:n}),0===hC.length&&lC.unbind(window,"beforeunload",Yx),n.remove(),vC(0<hC.length),n);cC(lC.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=hC.length-1;0<=t;t--)r.remove(hC[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new $x(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",0,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){cC(hC,function(e){e.save()})},addI18n:function(e,t){sC.add(e,t)},translate:function(e){return sC.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},nh),Gx.setup();var yC,wC=Gx;function xC(n){return{walk:function(e,t){return jc(n,e,t)},split:Fv,normalize:function(t){return hm(n,t).fold(y(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}(yC=xC||(xC={})).compareRanges=lm,yC.getCaretRangeFromPoint=xy,yC.getSelectedNode=Qa,yC.getNode=es;var CC,_C,SC=xC,kC=Math.min,EC=Math.max,TC=Math.round,NC=function(e,t,n){var r,o,i,a,s,l;return r=t.x,o=t.y,i=e.w,a=e.h,s=t.w,l=t.h,"b"===(n=(n||"").split(""))[0]&&(o+=l),"r"===n[1]&&(r+=s),"c"===n[0]&&(o+=TC(l/2)),"c"===n[1]&&(r+=TC(s/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=TC(a/2)),"c"===n[4]&&(r-=TC(i/2)),RC(r,o,i,a)},RC=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},OC={inflate:function(e,t,n){return RC(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:NC,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if((o=NC(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=EC(e.x,t.x),r=EC(e.y,t.y),o=kC(e.x+e.w,t.x+t.w),i=kC(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:RC(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,s,l,u,c,f,d;return s=e.x,l=e.y,u=e.x+e.w,c=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=EC(0,t.x-s),o=EC(0,t.y-l),i=EC(0,u-f),a=EC(0,c-d),s+=r,l+=o,n&&(u+=r,c+=o,s-=i,l-=a),RC(s,l,(u-=i)-s,(c-=a)-l)},create:RC,fromClientRect:function(e){return RC(e.left,e.top,e.width,e.height)}},PC={},AC={add:function(e,t){PC[e.toLowerCase()]=t},has:function(e){return!!PC[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=PC.hasOwnProperty(t)?PC[t]:null;if(null===n)throw new Error("Could not find module for type: "+e);return n},create:function(e,t){var n;if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=PC[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},DC=Gt.each,MC=Gt.extend,IC=function(){};IC.extend=CC=function(n){var e,t,r,o=this.prototype,i=function(){var e,t,n;if(!_C&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},a=function(){return this},s=function(n,r){return function(){var e,t=this._super;return this._super=o[n],e=r.apply(this,arguments),this._super=t,e}};for(t in _C=!0,e=new this,_C=!1,n.Mixins&&(DC(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),o.Mixins&&(n.Mixins=o.Mixins.concat(n.Mixins))),n.Methods&&DC(n.Methods.split(","),function(e){n[e]=a}),n.Properties&&DC(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return void 0!==e?(this[t]=e,this):this[t]}}),n.Statics&&DC(n.Statics,function(e,t){i[t]=e}),n.Defaults&&o.Defaults&&(n.Defaults=MC({},o.Defaults,n.Defaults)),n)"function"==typeof(r=n[t])&&o[t]?e[t]=s(t,r):e[t]=r;return i.prototype=e,(i.constructor=i).extend=CC,i};var LC=Math.min,BC=Math.max,FC=Math.round,jC=function(e,n){var r,o,t,i;if(n=n||'"',null===e)return"null";if("string"==(t=typeof e))return o="\bb\tt\nn\ff\rr\"\"''\\\\",n+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=o.indexOf(t))+1?"\\"+o.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"!==t)return""+e;if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(r=0,o="[";r<e.length;r++)o+=(0<r?",":"")+jC(e[r],n);return o+"]"}for(i in o="{",e)e.hasOwnProperty(i)&&(o+="function"!=typeof e[i]?(1<o.length?","+n:n)+i+n+":"+jC(e[i],n):"");return o+"}"},HC={serialize:jC,parse:function(e){try{return JSON.parse(e)}catch(e){}}},UC={callbacks:{},count:0,send:function(t){var n=this,r=ci.DOM,o=void 0!==t.count?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},zC={send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4<n++?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",zC.fire("beforeInitialize",{settings:e}),t=eg()){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&Gt.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=zC.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();setTimeout(r,10)}}};Gt.extend(zC,nh);var WC,VC,qC,$C,XC=Gt.extend,YC=function(e){this.settings=XC({},e),this.count=0};YC.sendRPC=function(e){return(new YC).send(e)},YC.prototype={send:function(n){var r=n.error,o=n.success;(n=XC(this.settings,n)).success=function(e,t){void 0===(e=HC.parse(e))&&(e={error:"JSON Parse error."}),e.error?r.call(n.error_scope||n.scope,e.error,t):o.call(n.success_scope||n.scope,e.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=HC.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",zC.send(n)}};try{WC=window.localStorage}catch(e){VC={},qC=[],$C={getItem:function(e){var t=VC[e];return t||null},setItem:function(e,t){qC.push(e),VC[e]=String(t)},key:function(e){return qC[e]},removeItem:function(t){qC=qC.filter(function(e){return e===t}),delete VC[t]},clear:function(){qC=[],VC={}},length:0},Object.defineProperty($C,"length",{get:function(){return qC.length},configurable:!1,enumerable:!1}),WC=$C}var GC,KC=wC,JC={geom:{Rect:OC},util:{Promise:Pe,Delay:Ie,Tools:Gt,VK:Qg,URI:Ox,Class:IC,EventDispatcher:Qm,Observable:nh,I18n:sC,XHR:zC,JSON:HC,JSONRequest:YC,JSONP:UC,LocalStorage:WC,Color:function(e){var n={},s=0,l=0,u=0,t=function(e){var t;return"object"==typeof e?"r"in e?(s=e.r,l=e.g,u=e.b):"v"in e&&function(e,t,n){var r,o,i,a;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=BC(0,LC(t,1)),n=BC(0,LC(n,1)),0!==t){switch(r=e/60,i=(o=n*t)*(1-Math.abs(r%2-1)),a=n-o,Math.floor(r)){case 0:s=o,l=i,u=0;break;case 1:s=i,l=o,u=0;break;case 2:s=0,l=o,u=i;break;case 3:s=0,l=i,u=o;break;case 4:s=i,l=0,u=o;break;case 5:s=o,l=0,u=i;break;default:s=l=u=0}s=FC(255*(s+a)),l=FC(255*(l+a)),u=FC(255*(u+a))}else s=l=u=FC(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(s=parseInt(t[1],10),l=parseInt(t[2],10),u=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(s=parseInt(t[1],16),l=parseInt(t[2],16),u=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(s=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),u=parseInt(t[3]+t[3],16)),s=s<0?0:255<s?255:s,l=l<0?0:255<l?255:l,u=u<0?0:255<u?255:u,n};return e&&t(e),n.toRgb=function(){return{r:s,g:l,b:u}},n.toHsv=function(){return e=s,t=l,n=u,o=0,(i=LC(e/=255,LC(t/=255,n/=255)))===(a=BC(e,BC(t,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,{h:FC(60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/((o=a)-i))),s:FC(100*r),v:FC(100*o)});var e,t,n,r,o,i,a},n.toHex=function(){var e=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+e(s)+e(l)+e(u)},n.parse=t,n}},dom:{EventUtils:Ve,Sizzle:Et,DomQuery:hn,TreeWalker:Qr,DOMUtils:ci,ScriptLoader:hi,RangeUtils:SC,Serializer:my,ControlSelection:yy,BookmarkManager:gy,Selection:Gy,Event:Ve.Event},html:{Styles:Qo,Entities:Ho,Node:Zb,Schema:Jo,SaxParser:lv,DomParser:uy,Writer:cf,Serializer:ff},ui:{Factory:AC},Env:Oe,AddOnManager:bi,Annotator:Xc,Formatter:Hb,UndoManager:Tv,EditorCommands:Jm,WindowManager:Wh,NotificationManager:zh,EditorObservable:vh,Shortcuts:Ch,Editor:$x,FocusManager:Kx,EditorManager:wC,DOM:ci.DOM,ScriptLoader:hi.ScriptLoader,PluginManager:bi.PluginManager,ThemeManager:bi.ThemeManager,trim:Gt.trim,isArray:Gt.isArray,is:Gt.is,toArray:Gt.toArray,makeMap:Gt.makeMap,each:Gt.each,map:Gt.map,grep:Gt.grep,inArray:Gt.inArray,extend:Gt.extend,create:Gt.create,walk:Gt.walk,createNS:Gt.createNS,resolve:Gt.resolve,explode:Gt.explode,_addCacheSuffix:Gt._addCacheSuffix,isOpera:Oe.opera,isWebKit:Oe.webkit,isIE:Oe.ie,isGecko:Oe.gecko,isMac:Oe.mac},ZC=KC=Gt.extend(KC,JC);GC=ZC,window.tinymce=GC,window.tinyMCE=GC,function(e){try{QC.exports=e}catch(e){}}(ZC)}()},"5b4e":function(e,t,n){var l=n("36c3"),u=n("b447"),c=n("0fc9");e.exports=function(s){return function(e,t,n){var r,o=l(e),i=u(o.length),a=c(n,i);if(s&&t!=t){for(;a<i;)if((r=o[a++])!=r)return!0}else for(;a<i;a++)if((s||a in o)&&o[a]===t)return s||a||0;return!s&&-1}}},"5ca1":function(e,t,n){var h=n("7726"),g=n("8378"),v=n("32e9"),b=n("2aba"),y=n("9b43"),w="prototype",x=function(e,t,n){var r,o,i,a,s=e&x.F,l=e&x.G,u=e&x.S,c=e&x.P,f=e&x.B,d=l?h:u?h[t]||(h[t]={}):(h[t]||{})[w],p=l?g:g[t]||(g[t]={}),m=p[w]||(p[w]={});for(r in l&&(n=t),n)i=((o=!s&&d&&void 0!==d[r])?d:n)[r],a=f&&o?y(i,h):c&&"function"==typeof i?y(Function.call,i):i,d&&b(d,r,i,e&x.U),p[r]!=i&&v(p,r,a),c&&m[r]!=i&&(m[r]=i)};h.core=g,x.F=1,x.G=2,x.S=4,x.P=8,x.B=16,x.W=32,x.U=64,x.R=128,e.exports=x},"5cc5":function(e,t,n){var i=n("2b4c")("iterator"),a=!1;try{var r=[7][i]();r.return=function(){a=!0},Array.from(r,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var n=!1;try{var r=[7],o=r[i]();o.next=function(){return{done:n=!0}},r[i]=function(){return o},e(r)}catch(e){}return n}},"5dbc":function(e,t,n){var i=n("d3f4"),a=n("8b97").set;e.exports=function(e,t,n){var r,o=t.constructor;return o!==n&&"function"==typeof o&&(r=o.prototype)!==n.prototype&&i(r)&&a&&a(e,r),e}},"5ecf":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e,n){var r;return e.dom.getParents(e.selection.getStart(),function(e){var t;(t=e.style["forecolor"===n?"color":"background-color"])&&(r=r||t)}),r},m=function(e){var t,n=[];for(t=0;t<e.length;t+=2)n.push({text:e[t+1],color:"#"+e[t]});return n},r=function(e,t,n){e.undoManager.transact(function(){e.focus(),e.formatter.apply(t,{value:n}),e.nodeChanged()})},t=function(e,t){e.undoManager.transact(function(){e.focus(),e.formatter.remove(t,{value:null},null,!0),e.nodeChanged()})},n=function(n){n.addCommand("mceApplyTextcolor",function(e,t){r(n,e,t)}),n.addCommand("mceRemoveTextcolor",function(e){t(n,e)})},h=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],a=function(e){return e.getParam("textcolor_map",i)},s=function(e){return e.getParam("textcolor_rows",5)},u=function(e){return e.getParam("textcolor_cols",8)},c=function(e){return e.getParam("color_picker_callback",null)},f=function(e){return e.getParam("forecolor_map",a(e))},d=function(e){return e.getParam("backcolor_map",a(e))},p=function(e){return e.getParam("forecolor_rows",s(e))},g=function(e){return e.getParam("backcolor_rows",s(e))},v=function(e){return e.getParam("forecolor_cols",u(e))},b=function(e){return e.getParam("backcolor_cols",u(e))},y=c,w=function(e){return"function"==typeof c(e)},x=tinymce.util.Tools.resolve("tinymce.util.I18n"),C=function(e,t,n,r){var o,i,a,s,l,u,c,f=0,d=h.DOM.uniqueId("mcearia"),p=function(e,t){var n="transparent"===e;return'<td class="mce-grid-cell'+(n?" mce-colorbtn-trans":"")+'"><div id="'+d+"-"+f+++'" data-mce-color="'+(e||"")+'" role="option" tabIndex="-1" style="'+(e?"background-color: "+e:"")+'" title="'+x.translate(t)+'">'+(n?"&#215;":"")+"</div></td>"};for((o=m(n)).push({text:x.translate("No color"),color:"transparent"}),a='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',s=o.length-1,u=0;u<t;u++){for(a+="<tr>",l=0;l<e;l++)a+=s<(c=u*e+l)?"<td></td>":p((i=o[c]).color,i.text);a+="</tr>"}if(r){for(a+='<tr><td colspan="'+e+'" class="mce-custom-color-btn"><div id="'+d+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+d+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+x.translate("Custom...")+"</button></div></td></tr>",a+="<tr>",l=0;l<e;l++)a+=p("","Custom color");a+="</tr>"}return a+="</tbody></table>"},_=function(e,t){e.style.background=t,e.setAttribute("data-mce-color",t)},S=function(n){return function(e){var t=e.control;t._color?n.execCommand("mceApplyTextcolor",t.settings.format,t._color):n.execCommand("mceRemoveTextcolor",t.settings.format)}},k=function(r,s){return function(e){var t,i=this.parent(),n=o(r,i.settings.format),a=function(e){r.execCommand("mceApplyTextcolor",i.settings.format,e),i.hidePanel(),i.color(e)};h.DOM.getParent(e.target,".mce-custom-color-btn")&&(i.hidePanel(),y(r).call(r,function(e){var t,n,r,o=i.panel.getEl().getElementsByTagName("table")[0];for(t=l.map(o.rows[o.rows.length-1].childNodes,function(e){return e.firstChild}),r=0;r<t.length&&(n=t[r]).getAttribute("data-mce-color");r++);if(r===s)for(r=0;r<s-1;r++)_(t[r],t[r+1].getAttribute("data-mce-color"));_(n,e),a(e)},n)),(t=e.target.getAttribute("data-mce-color"))?(this.lastId&&h.DOM.get(this.lastId).setAttribute("aria-selected","false"),e.target.setAttribute("aria-selected",!0),this.lastId=e.target.id,"transparent"===t?(r.execCommand("mceRemoveTextcolor",i.settings.format),i.hidePanel(),i.resetColor()):a(t)):null!==t&&i.hidePanel()}},E=function(o,i){return function(){var e=i?v(o):b(o),t=i?p(o):g(o),n=i?f(o):d(o),r=w(o);return C(e,t,n,r)}},T=function(e){e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:E(e,!0),onclick:k(e,v(e))},onclick:S(e)}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:E(e,!1),onclick:k(e,b(e))},onclick:S(e)})};e.add("textcolor",function(e){n(e),T(e)})}()},"5eda":function(e,t,n){var o=n("5ca1"),i=n("8378"),a=n("79e5");e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],r={};r[e]=t(n),o(o.S+o.F*a(function(){n(1)}),"Object",r)}},"5f1b":function(e,t,n){"use strict";var o=n("23c6"),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==o(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"613b":function(e,t,n){var r=n("5537")("keys"),o=n("ca5a");e.exports=function(e){return r[e]||(r[e]=o(e))}},"626a":function(e,t,n){var r=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},"62a0":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"63b6":function(e,t,n){var h=n("e53d"),g=n("584a"),v=n("d864"),b=n("35e8"),y=n("07e3"),w="prototype",x=function(e,t,n){var r,o,i,a=e&x.F,s=e&x.G,l=e&x.S,u=e&x.P,c=e&x.B,f=e&x.W,d=s?g:g[t]||(g[t]={}),p=d[w],m=s?h:l?h[t]:(h[t]||{})[w];for(r in s&&(n=t),n)(o=!a&&m&&void 0!==m[r])&&y(d,r)||(i=o?m[r]:n[r],d[r]=s&&"function"!=typeof m[r]?n[r]:c&&o?v(i,h):f&&m[r]==i?function(r){var e=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return r.apply(this,arguments)};return e[w]=r[w],e}(i):u&&"function"==typeof i?v(Function.call,i):i,u&&((d.virtual||(d.virtual={}))[r]=i,e&x.R&&p&&!p[r]&&b(p,r,i)))};x.F=1,x.G=2,x.S=4,x.P=8,x.B=16,x.W=32,x.U=64,x.R=128,e.exports=x},"65ff":function(e,t,n){},6718:function(e,t,n){var r=n("e53d"),o=n("584a"),i=n("b8e3"),a=n("ccb9"),s=n("d9f6").f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},6821:function(e,t,n){var r=n("626a"),o=n("be13");e.exports=function(e){return r(o(e))}},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var o=n("d3f4");e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},"6abf":function(e,t,n){var r=n("e6f3"),o=n("1691").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},"6b4c":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"6b54":function(e,t,n){"use strict";n("3846");var r=n("cb7c"),o=n("0bfb"),i=n("9e1e"),a="toString",s=/./[a],l=function(e){n("2aba")(RegExp.prototype,a,e,!0)};n("79e5")(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?l(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?o.call(e):void 0)}):s.name!=a&&l(function(){return s.call(this)})},"6c1c":function(e,t,n){n("c367");for(var r=n("e53d"),o=n("35e8"),i=n("481b"),a=n("5168")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var u=s[l],c=r[u],f=c&&c.prototype;f&&!f[a]&&o(f,a,u),i[u]=i.Array}},"6cba":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(e,t){return e.fire("insertCustomChar",{chr:t})},s=function(e,t){var n=r(e,t).chr;e.execCommand("mceInsertContent",!1,n)},n=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return e.settings.charmap},i=function(e){return e.settings.charmap_append},a=n.isArray,l=function(e){return a(e)?[].concat((t=e,n.grep(t,function(e){return a(e)&&2===e.length}))):"function"==typeof e?e():[];var t},u=function(e){return function(e,t){var n=o(e);n&&(t=l(n));var r=i(e);return r?[].concat(t).concat(l(r)):t}(e,[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]])},t=function(t){return{getCharMap:function(){return u(t)},insertChar:function(e){s(t,e)}}},c=function(e){var t,n,r,o=Math.min(e.length,25),i=Math.ceil(e.length/o);for(t='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>',r=0;r<i;r++){for(t+="<tr>",n=0;n<o;n++){var a=r*o+n;if(a<e.length){var s=e[a],l=parseInt(s[0],10),u=s?String.fromCharCode(l):"&nbsp;";t+='<td title="'+s[1]+'"><div tabindex="-1" title="'+s[1]+'" role="button" data-chr="'+l+'">'+u+"</div></td>"}else t+="<td />"}t+="</tr>"}return t+="</tbody></table>"},f=function(e){for(;e;){if("TD"===e.nodeName)return e;e=e.parentNode}},d=function(i){var a,e={type:"container",html:c(u(i)),onclick:function(e){var t=e.target;if(/^(TD|DIV)$/.test(t.nodeName)){var n=f(t).firstChild;if(n&&n.hasAttribute("data-chr")){var r=n.getAttribute("data-chr"),o=parseInt(r,10);isNaN(o)||s(i,String.fromCharCode(o)),e.ctrlKey||a.close()}}},onmouseover:function(e){var t=f(e.target);t&&t.firstChild?(a.find("#preview").text(t.firstChild.firstChild.data),a.find("#previewTitle").text(t.title)):(a.find("#preview").text(" "),a.find("#previewTitle").text(" "))}};a=i.windowManager.open({title:"Special character",spacing:10,padding:10,items:[e,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"spacer",minHeight:20},{type:"label",name:"previewTitle",text:" ",style:"white-space: pre-wrap;",border:1,minWidth:140}]}],buttons:[{text:"Close",onclick:function(){a.close()}}]})},p=function(e){e.addCommand("mceShowCharmap",function(){d(e)})},m=function(e){e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})};e.add("charmap",function(e){return p(e),m(e),t(e)})}()},"6e27":function(e,t,n){},"71c1":function(e,t,n){var l=n("3a38"),u=n("25eb");e.exports=function(s){return function(e,t){var n,r,o=String(u(e)),i=l(t),a=o.length;return i<0||a<=i?s?"":void 0:(n=o.charCodeAt(i))<55296||56319<n||i+1===a||(r=o.charCodeAt(i+1))<56320||57343<r?s?o.charAt(i):n:s?o.slice(i,i+2):r-56320+(n-55296<<10)+65536}}},7389:function(e,t,n){n("f9d5")},7526:function(e,t,n){n("29c5")},"75fc":function(e,t,n){"use strict";var r=n("a745"),o=n.n(r);var i=n("774e"),a=n.n(i),s=n("c8bb"),l=n.n(s);function u(e){return function(e){if(o()(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(l()(Object(e))||"[object Arguments]"===Object.prototype.toString.call(e))return a()(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return u})},7726: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)},"774e":function(e,t,n){e.exports=n("d2d5")},"77f1":function(e,t,n){var r=n("4588"),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},"794b":function(e,t,n){e.exports=!n("8e60")&&!n("294c")(function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"7a01":function(e,t){!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");function h(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var f={findAndReplaceDOMText:function(e,t,n,r,o){var i,a,v,d,p,m,s=[],l=0;function u(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(0<t){var r=e[t];if(!r)throw new Error("Invalid capture group");n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}if(v=t.ownerDocument,d=o.getBlockElements(),p=o.getWhiteSpaceElements(),m=o.getShortEndedElements(),a=function e(t){var n;if(3===t.nodeType)return t.data;if(p[t.nodeName]&&!d[t.nodeName])return"";if(n="",h(t))return"\n";if((d[t.nodeName]||m[t.nodeName])&&(n+="\n"),t=t.firstChild)for(;n+=e(t),t=t.nextSibling;);return n}(t)){if(e.global)for(;i=e.exec(a);)s.push(u(i,r));else i=a.match(e),s.push(u(i,r));return s.length&&(l=s.length,function(e,t,n){var r,o,i,a,s=[],l=0,u=e,c=t.shift(),f=0;e:for(;;){if((d[u.nodeName]||m[u.nodeName]||h(u))&&l++,3===u.nodeType&&(!o&&u.length+l>=c[1]?(o=u,a=c[1]-l):r&&s.push(u),!r&&u.length+l>c[0]&&(r=u,i=c[0]-l),l+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:a,innerNodes:s,match:c[2],matchIndex:f}),l-=o.length-a,o=r=null,s=[],f++,!(c=t.shift()))break}else if(p[u.nodeName]&&!d[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!h(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(t,s,function(e){var g;if("function"!=typeof e){var r=e.nodeType?e:v.createElement(e);g=function(e,t){var n=r.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(v.createTextNode(e)),n}}else g=e;return function(e){var t,n,r,o=e.startNode,i=e.endNode,a=e.matchIndex;if(o===i){var s=o;r=s.parentNode,0<e.startNodeIndex&&(t=v.createTextNode(s.data.substring(0,e.startNodeIndex)),r.insertBefore(t,s));var l=g(e.match[0],a);return r.insertBefore(l,s),e.endNodeIndex<s.length&&(n=v.createTextNode(s.data.substring(e.endNodeIndex)),r.insertBefore(n,s)),s.parentNode.removeChild(s),l}t=v.createTextNode(o.data.substring(0,e.startNodeIndex)),n=v.createTextNode(i.data.substring(e.endNodeIndex));for(var u=g(o.data.substring(e.startNodeIndex),a),c=[],f=0,d=e.innerNodes.length;f<d;++f){var p=e.innerNodes[f],m=g(p.data,a);p.parentNode.replaceChild(m,p),c.push(m)}var h=g(i.data.substring(0,e.endNodeIndex),a);return(r=o.parentNode).insertBefore(t,o),r.insertBefore(u,o),r.removeChild(o),(r=i.parentNode).insertBefore(h,i),r.insertBefore(n,i),r.removeChild(i),h}}(n))),l}}},m=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},g=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},a=function(e,t){var n,r=[];if((n=p.toArray(e.getBody().getElementsByTagName("span"))).length)for(var o=0;o<n.length;o++){var i=m(n[o]);null!==i&&i.length&&i===t.toString()&&r.push(n[o])}return r},d=function(e,t,n){var r=t.get(),o=e.dom;(n=!1!==n)?r++:r--,o.removeClass(a(e,t.get()),"mce-match-marker-selected");var i=a(e,r);return i.length?(o.addClass(a(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(i[0]),r):-1},v=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},b=function(e,t){var n=d(e,t,!0);-1!==n&&t.set(n)},y=function(e,t){var n=d(e,t,!1);-1!==n&&t.set(n)},w=function(e){var t=m(e);return null!==t&&0<t.length},x=function(e,t,n){var r,o,i,a;for(o=p.toArray(e.getBody().getElementsByTagName("span")),r=0;r<o.length;r++){var s=m(o[r]);null!==s&&s.length&&(s===t.get().toString()&&(i||(i=o[r].firstChild),a=o[r].firstChild),g(o[r]))}if(i&&a){var l=e.dom.createRng();return l.setStart(i,0),l.setEnd(a,a.data.length),!1!==n&&e.selection.setRng(l),l}},C=function(e,t){return 0<a(e,t.get()+1).length},_=function(e,t){return 0<a(e,t.get()-1).length},S={done:x,find:function(e,t,n,r,o){n=(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).replace(/\s/g,"[^\\S\\r\\n]"),n=o?"\\b"+n+"\\b":n;var i,a,s,l,u,c=(i=e,a=t,s=new RegExp(n,r?"g":"gi"),(u=i.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",l=i.getBody(),x(i,a,!1),f.findAndReplaceDOMText(s,l,u,!1,i.schema));return c&&(t.set(-1),t.set(d(e,t,!0))),c},next:b,prev:y,replace:function(e,t,n,r,o){var i,a,s,l,u,c,f=t.get();for(r=!1!==r,s=e.getBody(),a=p.grep(p.toArray(s.getElementsByTagName("span")),w),i=0;i<a.length;i++){var d=m(a[i]);if(l=u=parseInt(d,10),o||l===t.get()){for(n.length?(a[i].firstChild.nodeValue=n,g(a[i])):v(e.dom,a[i]);a[++i];){if((l=parseInt(m(a[i]),10))!==u){i--;break}v(e.dom,a[i])}r&&f--}else u>t.get()&&a[i].setAttribute("data-mce-index",u-1)}return t.set(f),r?(c=C(e,t),b(e,t)):(c=_(e,t),y(e,t)),!o&&c},hasNext:C,hasPrev:_},n=function(r,o){return{done:function(e){return S.done(r,o,e)},find:function(e,t,n){return S.find(r,o,e,t,n)},next:function(){return S.next(r,o)},prev:function(){return S.prev(r,o)},replace:function(e,t,n){return S.replace(r,o,e,t,n)}}},o=function(i,a){var e,s={};function l(){c.statusbar.find("#next").disabled(!1===S.hasNext(i,a)),c.statusbar.find("#prev").disabled(!1===S.hasPrev(i,a))}function u(){i.windowManager.alert("Could not find the specified string.",function(){c.find("#find")[0].focus()})}i.undoManager.add(),e=p.trim(i.selection.getContent({format:"text"}));var c=i.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){i.focus(),S.done(i,a),i.undoManager.add()},onSubmit:function(e){var t,n,r,o;return e.preventDefault(),n=c.find("#case").checked(),o=c.find("#words").checked(),(r=c.find("#find").value()).length?s.text===r&&s.caseState===n&&s.wholeWord===o?S.hasNext(i,a)?(S.next(i,a),void l()):void u():((t=S.find(i,a,r,n,o))||u(),c.statusbar.items().slice(1).disabled(0===t),l(),void(s={text:r,caseState:n,wholeWord:o})):(S.done(i,a,!1),void c.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){c.submit()}},{text:"Replace",disabled:!0,onclick:function(){S.replace(i,a,c.find("#replace").value())||(c.statusbar.items().slice(1).disabled(!0),a.set(-1),s={})}},{text:"Replace all",disabled:!0,onclick:function(){S.replace(i,a,c.find("#replace").value(),!0,!0),c.statusbar.items().slice(1).disabled(!0),s={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){S.prev(i,a),l()}},{text:"Next",name:"next",disabled:!0,onclick:function(){S.next(i,a),l()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:e},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})},i=function(e,t){e.addCommand("SearchReplace",function(){o(e,t)})},s=function(e,t){return function(){o(e,t)}},l=function(e,t){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:s(e,t),separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",onclick:s(e,t)}),e.shortcuts.add("Meta+F","",s(e,t))};e.add("searchreplace",function(e){var t=r(-1);return i(e,t),l(e,t),n(e,t)})}()},"7a56":function(e,t,n){"use strict";var r=n("7726"),o=n("86cc"),i=n("9e1e"),a=n("2b4c")("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},"7a77":function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},"7a8b":function(e,t,n){e.exports=n.p+"fonts/tinymce.f8d29256.ttf"},"7aac":function(e,t,n){"use strict";var s=n("c532");e.exports=s.isStandardBrowserEnv()?{write:function(e,t,n,r,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),s.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),s.isString(r)&&a.push("path="+r),s.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"7cd6":function(e,t,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");e.exports=n("584a").getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},"7e90":function(e,t,n){var a=n("d9f6"),s=n("e4ae"),l=n("c3a1");e.exports=n("8e60")?Object.defineProperties:function(e,t){s(e);for(var n,r=l(t),o=r.length,i=0;i<o;)a.f(e,n=r[i++],t[n]);return e}},"7ec3":function(e,t){!function(){"use strict";var a,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=function(e){return!1!==e.settings.image_dimensions},s=function(e){return!0===e.settings.image_advtab},d=function(e){return e.getParam("image_prepend_url","")},n=function(e){return e.getParam("image_class_list")},r=function(e){return!1!==e.settings.image_description},o=function(e){return!0===e.settings.image_title},i=function(e){return!0===e.settings.image_caption},l=function(e){return e.getParam("image_list",!1)},u=function(e){return e.getParam("images_upload_url",!1)},c=function(e){return e.getParam("images_upload_handler",!1)},p=function(e){return e.getParam("images_upload_url")},m=function(e){return e.getParam("images_upload_handler")},h=function(e){return e.getParam("images_upload_base_path")},g=function(e){return e.getParam("images_upload_credentials")},v="undefined"!=typeof window?window:Function("return this;")(),b=function(e,t){return function(e,t){for(var n=null!=t?t:v,r=0;r<e.length&&null!=n;++r)n=n[e[r]];return n}(e.split("."),t)},y={getOrDie:function(e,t){var n=b(e,t);if(null==n)throw e+" not available on this browser";return n}},w=tinymce.util.Tools.resolve("tinymce.util.Promise"),x=tinymce.util.Tools.resolve("tinymce.util.Tools"),C=tinymce.util.Tools.resolve("tinymce.util.XHR"),_=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},S=function(e,n){var r=document.createElement("img");function t(e,t){r.parentNode&&r.parentNode.removeChild(r),n({width:e,height:t})}r.onload=function(){t(_(r.width,r.clientWidth),_(r.height,r.clientHeight))},r.onerror=function(){t(0,0)};var o=r.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(r),r.src=e},k=function(e,o,t){return function n(e,r){return r=r||[],x.each(e,function(e){var t={text:e.text||e.title};e.menu?t.menu=n(e.menu):(t.value=e.value,o(t)),r.push(t)}),r}(e,t||[])},E=function(e){return e&&(e=e.replace(/px$/,"")),e},T=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},N=function(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},t=function(e,t){var n=l(e);"string"==typeof n?C.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeof n?n(t):t(n)},R=function(e,t,n){function r(){n.onload=n.onerror=null,e.selection&&(e.selection.select(n),e.nodeChanged())}n.onload=function(){t.width||t.height||!f(e)||e.dom.setAttribs(n,{width:n.clientWidth,height:n.clientHeight}),r()},n.onerror=r},O=function(r){return new w(function(e,t){var n=new(y.getOrDie("FileReader"));n.onload=function(){e(n.result)},n.onerror=function(){t(n.error.message)},n.readAsDataURL(r)})},P=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),A=Object.prototype.hasOwnProperty,D=(a=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)A.call(o,i)&&(n[i]=a(n[i],o[i]))}return n}),M=P.DOM,I=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?E(e.style.marginLeft):""},L=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?E(e.style.marginTop):""},B=function(e){return e.style.borderWidth?E(e.style.borderWidth):""},F=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},j=function(e,t){return e.style[t]?e.style[t]:""},H=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},U=function(e,t,n){e.setAttribute(t,n)},z=function(e){var t,n,r,o;H(e)?(o=(r=e).parentNode,M.insertAfter(r,o),M.remove(o)):(t=e,n=M.create("figure",{class:"image"}),M.insertAfter(n,t),n.appendChild(t),n.appendChild(M.create("figcaption",{contentEditable:!0},"Caption")),n.contentEditable="false")},W=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},V=function(e,r){return function(e,t,n){e.style[t]?(e.style[t]=T(n),W(e,r)):U(e,t,n)}},q=function(e,t){return e.style[t]?E(e.style[t]):F(e,t)},$=function(e,t){var n=T(t);e.style.marginLeft=n,e.style.marginRight=n},X=function(e,t){var n=T(t);e.style.marginTop=n,e.style.marginBottom=n},Y=function(e,t){var n=T(t);e.style.borderWidth=n},G=function(e,t){e.style.borderStyle=t},K=function(e){return"FIGURE"===e.nodeName},J=function(e,t){var n=document.createElement("img");return U(n,"style",t.style),(I(n)||""!==t.hspace)&&$(n,t.hspace),(L(n)||""!==t.vspace)&&X(n,t.vspace),(B(n)||""!==t.border)&&Y(n,t.border),(j(n,"borderStyle")||""!==t.borderStyle)&&G(n,t.borderStyle),e(n.getAttribute("style"))},Z=function(e,t){return{src:F(t,"src"),alt:F(t,"alt"),title:F(t,"title"),width:q(t,"width"),height:q(t,"height"),class:F(t,"class"),style:e(F(t,"style")),caption:H(t),hspace:I(t),vspace:L(t),border:B(t),borderStyle:j(t,"borderStyle")}},Q=function(e,t,n,r,o){n[r]!==t[r]&&o(e,r,n[r])},ee=function(r,o){return function(e,t,n){r(e,n),W(e,o)}},te=function(e,t,n){var r=Z(e,n);Q(n,r,t,"caption",function(e,t,n){return z(e)}),Q(n,r,t,"src",U),Q(n,r,t,"alt",U),Q(n,r,t,"title",U),Q(n,r,t,"width",V(0,e)),Q(n,r,t,"height",V(0,e)),Q(n,r,t,"class",U),Q(n,r,t,"style",ee(function(e,t){return U(e,"style",t)},e)),Q(n,r,t,"hspace",ee($,e)),Q(n,r,t,"vspace",ee(X,e)),Q(n,r,t,"border",ee(Y,e)),Q(n,r,t,"borderStyle",ee(G,e))},ne=function(e,t){var n=e.dom.styles.parse(t),r=N(n),o=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(o)},re=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||t.getAttribute("data-mce-object")||t.getAttribute("data-mce-placeholder"))?null:t},oe=function(t,e){var n=t.dom,r=n.getParent(e.parentNode,function(e){return t.schema.getTextBlockElements()[e.nodeName]});return r?n.split(r,e):e},ie=function(t){var e=re(t);return e?Z(function(e){return ne(t,e)},e):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""}},ae=function(t,e){var n=function(e,t){var n=document.createElement("img");if(te(e,D(t,{caption:!1}),n),U(n,"alt",t.alt),t.caption){var r=M.create("figure",{class:"image"});return r.appendChild(n),r.appendChild(M.create("figcaption",{contentEditable:!0},"Caption")),r.contentEditable="false",r}return n}(function(e){return ne(t,e)},e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),K(r)){var o=oe(t,r);t.selection.select(o)}else t.selection.select(r)},se=function(e,t){var n=re(e);n?t.src?function(t,e){var n,r=re(t);if(te(function(e){return ne(t,e)},e,r),n=r,t.dom.setAttrib(n,"src",n.getAttribute("src")),K(r.parentNode)){var o=r.parentNode;oe(t,o),t.selection.select(r.parentNode)}else t.selection.select(r),R(t,e,r)}(e,t):function(e,t){if(t){var n=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(n),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}}(e,n):t.src&&ae(e,t)},le=function(n,r){r.find("#style").each(function(e){var t=J(function(e){return ne(n,e)},D({src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""},r.toJSON()));e.value(t)})},ue=function(t){return{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:(i=t,function(e){var t=i.dom,n=e.control.rootControl;if(s(i)){var r=n.toJSON(),o=t.parseStyle(r.style);n.find("#vspace").value(""),n.find("#hspace").value(""),((o=N(o))["margin-top"]&&o["margin-bottom"]||o["margin-right"]&&o["margin-left"])&&(o["margin-top"]===o["margin-bottom"]?n.find("#vspace").value(E(o["margin-top"])):n.find("#vspace").value(""),o["margin-right"]===o["margin-left"]?n.find("#hspace").value(E(o["margin-right"])):n.find("#hspace").value("")),o["border-width"]?n.find("#border").value(E(o["border-width"])):n.find("#border").value(""),o["border-style"]?n.find("#borderStyle").value(o["border-style"]):n.find("#borderStyle").value(""),n.find("#style").value(t.serializeStyle(t.parseStyle(t.serializeStyle(o))))}})},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,defaults:{type:"textbox",maxWidth:50,onchange:function(e){le(t,e.control.rootControl)}},items:[{label:"Vertical space",name:"vspace"},{label:"Border width",name:"border"},{label:"Horizontal space",name:"hspace"},{label:"Border style",type:"listbox",name:"borderStyle",width:90,maxWidth:90,onselect:function(e){le(t,e.control.rootControl)},values:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]};var i},ce=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},fe=function(e,t){var n=e.find("#width")[0],r=e.find("#height")[0],o=e.find("#constrain")[0];n&&r&&o&&t(n,r,o.checked())},de=function(e,t,n){var r=e.state.get("oldVal"),o=t.state.get("oldVal"),i=e.value(),a=t.value();n&&r&&o&&i&&a&&(i!==r?(a=Math.round(i/r*a),isNaN(a)||t.value(a)):(i=Math.round(a/o*i),isNaN(i)||e.value(i))),ce(e,t)},pe=function(e){fe(e,de)},me=function(){var e=function(e){pe(e.control.rootControl)};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},he=function(e){fe(e,ce)},ge=pe,ve=function(e){e.meta=e.control.rootControl.toJSON()},be=function(c,e){var t=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:function(e){var t,n,r,o,i,a,s,l,u;n=c,a=(t=e).meta||{},s=t.control,l=s.rootControl,(u=l.find("#image-list")[0])&&u.value(n.convertURL(s.value(),"src")),x.each(a,function(e,t){l.find("#"+t).value(e)}),a.width||a.height||(r=n.convertURL(s.value(),"src"),o=d(n),i=new RegExp("^(?:[a-z]+:)?//","i"),o&&!i.test(r)&&r.substring(0,o.length)!==o&&(r=o+r),s.value(r),S(n.documentBaseURI.toAbsolute(s.value()),function(e){e.width&&e.height&&f(n)&&(l.find("#width").value(e.width),l.find("#height").value(e.height),he(l))}))},onbeforecall:ve},e];return r(c)&&t.push({name:"alt",type:"textbox",label:"Image description"}),o(c)&&t.push({name:"title",type:"textbox",label:"Image Title"}),f(c)&&t.push(me()),n(c)&&t.push({name:"class",type:"listbox",label:"Class",values:k(n(c),function(e){e.value&&(e.textStyle=function(){return c.formatter.getCssText({inline:"img",classes:[e.value]})})})}),i(c)&&t.push({name:"caption",type:"checkbox",label:"Caption"}),t},ye=function(e,t){return{title:"General",type:"form",items:be(e,t)}},we=be,xe=function(){return y.getOrDie("URL")},Ce=function(e){return xe().createObjectURL(e)},_e=function(e){xe().revokeObjectURL(e)},Se=tinymce.util.Tools.resolve("tinymce.ui.Factory"),ke=function(){};function Ee(a){var t=function(e,r,o,t){var i,n;(i=new(y.getOrDie("XMLHttpRequest"))).open("POST",a.url),i.withCredentials=a.credentials,i.upload.onprogress=function(e){t(e.loaded/e.total*100)},i.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,t,n;i.status<200||300<=i.status?o("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?r((t=a.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):o("Invalid JSON: "+i.responseText)},(n=new FormData).append("file",e.blob(),e.filename()),i.send(n)};return a=x.extend({credentials:!1,handler:t},a),{upload:function(e){return a.url||a.handler!==t?(n=e,r=a.handler,new w(function(e,t){try{r(n,e,t,ke)}catch(e){t(e.message)}})):w.reject("Upload url missing from the settings.");var n,r}}}var Te=function(l){return function(e){var t=Se.get("Throbber"),n=e.control.rootControl,r=new t(n.getEl()),o=e.control.value(),i=Ce(o),a=Ee({url:p(l),basePath:h(l),credentials:g(l),handler:m(l)}),s=function(){r.hide(),_e(i)};return r.show(),O(o).then(function(e){var t=l.editorUpload.blobCache.create({blob:o,blobUri:i,name:o.name?o.name.replace(/\.[^\.]+$/,""):null,base64:e.split(",")[1]});return a.upload(t).then(function(e){var t=n.find("#src");return t.value(e),n.find("tabpanel")[0].activateTab(0),t.fire("change"),s(),e})}).catch(function(e){l.windowManager.alert(e),s()})}},Ne=".jpg,.jpeg,.png,.gif",Re=function(e){return{title:"Upload",type:"form",layout:"flex",direction:"column",align:"stretch",padding:"20 20 20 20",items:[{type:"container",layout:"flex",direction:"column",align:"center",spacing:10,items:[{text:"Browse for an image",type:"browsebutton",accept:Ne,onchange:Te(e)},{text:"OR",type:"label"}]},{text:"Drop an image here",type:"dropzone",accept:Ne,height:100,onchange:Te(e)}]}},Oe=function(i){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var a=new Array(arguments.length-1),n=1;n<arguments.length;n++)a[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=a.concat(n);return i.apply(null,o)}},Pe=function(t,e){var n=e.control.getRoot();ge(n),t.undoManager.transact(function(){var e=D(ie(t),n.toJSON());se(t,e)}),t.editorUpload.uploadImagesAuto()};function Ae(i){function e(e){var n,t,r=ie(i);if(e&&(t={type:"listbox",label:"Image list",name:"image-list",values:k(e,function(e){e.value=i.convertURL(e.value||e.url,"src")},[{text:"None",value:""}]),value:r.src&&i.convertURL(r.src,"src"),onselect:function(e){var t=n.find("#alt");(!t.value()||e.lastControl&&t.value()===e.lastControl.text())&&t.value(e.control.text()),n.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){t=this}}),s(i)||u(i)||c(i)){var o=[ye(i,t)];s(i)&&o.push(ue(i)),(u(i)||c(i))&&o.push(Re(i)),n=i.windowManager.open({title:"Insert/edit image",data:r,bodyType:"tabpanel",body:o,onSubmit:Oe(Pe,i)})}else n=i.windowManager.open({title:"Insert/edit image",data:r,body:we(i,t),onSubmit:Oe(Pe,i)});he(n)}return{open:function(){t(i,e)}}}var De=function(e){e.addCommand("mceImage",Ae(e).open)},Me=function(i){return function(e){for(var t,n,r=e.length,o=function(e){e.attr("contenteditable",i?"true":null)};r--;)t=e[r],(n=t.attr("class"))&&/\bimage\b/.test(n)&&(t.attr("contenteditable",i?"false":null),x.each(t.getAll("figcaption"),o))}},Ie=function(e){e.on("preInit",function(){e.parser.addNodeFilter("figure",Me(!0)),e.serializer.addNodeFilter("figure",Me(!1))})},Le=function(e){e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:Ae(e).open,stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),e.addMenuItem("image",{icon:"image",text:"Image",onclick:Ae(e).open,context:"insert",prependToContext:!0})};e.add("image",function(e){Ie(e),Le(e),De(e)})}()},"7f20":function(e,t,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},"7f7f":function(e,t,n){var r=n("86cc").f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n("9e1e")&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},8079:function(e,t,n){var s=n("7726"),l=n("1991").set,u=s.MutationObserver||s.WebKitMutationObserver,c=s.process,f=s.Promise,d="process"==n("2d95")(c);e.exports=function(){var n,r,o,e=function(){var e,t;for(d&&(e=c.domain)&&e.exit();n;){t=n.fn,n=n.next;try{t()}catch(e){throw n?o():r=void 0,e}}r=void 0,e&&e.enter()};if(d)o=function(){c.nextTick(e)};else if(!u||s.navigator&&s.navigator.standalone)if(f&&f.resolve){var t=f.resolve(void 0);o=function(){t.then(e)}}else o=function(){l.call(s,e)};else{var i=!0,a=document.createTextNode("");new u(e).observe(a,{characterData:!0}),o=function(){a.data=i=!i}}return function(e){var t={fn:e,next:void 0};r&&(r.next=t),n||(n=t,o()),r=t}}},8378:function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},8436:function(e,t){e.exports=function(){}},"84f2":function(e,t){e.exports={}},"84f5":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),r=function(e){return e.getParam("code_dialog_width",600)},o=function(e){return e.getParam("code_dialog_height",Math.min(t.DOM.getViewPort().h-200,500))},i=function(e,t){e.focus(),e.undoManager.transact(function(){e.setContent(t)}),e.selection.setCursorLocation(),e.nodeChanged()},a=function(e){return e.getContent({source_view:!0})},n=function(t){var e=r(t),n=o(t);t.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e,minHeight:n,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(e){i(t,e.data.code)}}).find("#code").value(a(t))},s=function(e){e.addCommand("mceCodeEditor",function(){n(e)})},l=function(e){e.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){n(e)}}),e.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){n(e)}})};e.add("code",function(e){return s(e),l(e),{}})}()},"85f2":function(e,t,n){e.exports=n("454f")},"86cc":function(e,t,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(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}},8800:function(e,t,n){n("ac3a")},"8aae":function(e,t,n){n("32a6"),e.exports=n("584a").Object.keys},"8b97":function(e,t,o){var n=o("d3f4"),r=o("cb7c"),i=function(e,t){if(r(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,r){try{(r=o("9b43")(Function.call,o("11e9").f(Object.prototype,"__proto__").set,2))(e,[]),n=!(e instanceof Array)}catch(e){n=!0}return function(e,t){return i(e,t),n?e.__proto__=t:r(e,t),e}}({},!1):void 0),check:i}},"8bbf":function(e,t){e.exports=require("vue")},"8c6f":function(e,t,n){n("f381")},"8d38":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(e,t,n){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";e.execCommand(r,!1,!1===n?null:{"list-style-type":n})},o=function(n){n.addCommand("ApplyUnorderedListStyle",function(e,t){l(n,"UL",t["list-style-type"])}),n.addCommand("ApplyOrderedListStyle",function(e,t){l(n,"OL",t["list-style-type"])})},t=function(e){var t=e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},n=function(e){var t=e.getParam("advlist_bullet_styles","default,circle,disc,square");return t?t.split(/[ ,]/):[]},u=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},c=function(r){return function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)&&(n=e,(t=r).$.contains(t.getBody(),n));var t,n}},f=function(e){var t=e.dom.getParent(e.selection.getNode(),"ol,ul");return e.dom.getStyle(t,"listStyleType")||""},d=function(e){return s.map(e,function(e){return{text:e.replace(/\-/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),data:"default"===e?"":e}})},p=function(i,a){return function(e){var o=e.control;i.on("NodeChange",function(e){var t=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e.parents,u),n=-1!==t?e.parents.slice(0,t):e.parents,r=s.grep(n,c(i));o.active(0<r.length&&r[0].nodeName===a)})}},m=function(t,e,n,r,o,i){var a;t.addButton(e,{active:!1,type:"splitbutton",tooltip:n,menu:d(i),onPostRender:p(t,o),onshow:(a=t,function(e){var t=f(a);e.control.items().each(function(e){e.active(e.settings.data===t)})}),onselect:function(e){l(t,o,e.control.settings.data)},onclick:function(){t.execCommand(r)}})},r=function(e,t,n,r,o,i){var a,s,l,u,c;0<i.length?m(e,t,n,r,o,i):(s=t,l=n,u=r,c=o,(a=e).addButton(s,{active:!1,type:"button",tooltip:l,onPostRender:p(a,c),onclick:function(){a.execCommand(u)}}))},i=function(e){r(e,"numlist","Numbered list","InsertOrderedList","OL",t(e)),r(e,"bullist","Bullet list","InsertUnorderedList","UL",n(e))};e.add("advlist",function(e){var t,n,r;n="lists",r=(t=e).settings.plugins?t.settings.plugins:"",-1!==s.inArray(r.split(/[ ,]/),n)&&(i(e),o(e))})}()},"8df4":function(e,t,n){"use strict";var r=n("7a77");function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},e.exports=o},"8e60":function(e,t,n){e.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(e,t,n){"use strict";var r=n("a159"),o=n("aebd"),i=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},9003:function(e,t,n){var r=n("6b4c");e.exports=Array.isArray||function(e){return"Array"==r(e)}},9093:function(e,t,n){var r=n("ce10"),o=n("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},9138:function(e,t,n){e.exports=n("35e8")},9336:function(e,t,n){"use strict";var r=n("4260"),o=n("5ac5"),i=n.n(o),a=(n("4a03"),n("c3d2"),n("6e27"),n("7a8b"),n("1fe0"),n("036c"),n("fa4f"),n("3062"),n("8800"),n("f3bd"),n("ce3a"),n("8c6f"),n("006a"),n("d6ef"),n("c307"),n("e71e"),n("cc8a"),n("0fa2"),n("a570"),n("7389"),n("d2e4"),n("d015"),n("99d0"),n("e3b9"),n("4497"),n("b621"),n("7526"),{props:{value:{type:String,default:""},height:{type:String,default:"200px"},width:{type:String}},data:function(){return{id:"editor-"+Object(r.a)(),content:this.value}},mounted:function(){var t=this;i.a.init({selector:"#"+t.id,language_url:"http://tools.xiaoyaoji.cn/form/lib/tinymce/zh_CN.js",language:"zh_CN",height:this.height,menubar:!1,init_instance_callback:function(e){e.on("input change undo redo",function(){t.$emit("input",e.getContent())})},setup:function(e){e.on("input change undo redo",function(){t.$emit("input",e.getContent())})},plugins:["advlist autolink lists link image charmap print preview anchor textcolor colorpicker","searchreplace visualblocks code fullscreen","insertdatetime table media  contextmenu paste code help wordcount"],toolbar:"insert table | undo redo |  formatselect | bold italic strikethrough forecolor backcolor  | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | code "})},methods:{setHtml:function(e){this.content=e,i.a.activeEditor.setContent(e),this.$emit("input",e)}},beforeDestroy:function(){i.a.get(this.id).destroy()},watch:{value:function(e){this.content=e}}}),s=(n("e769"),n("2877")),l=Object(s.a)(a,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"fm-editor-container",style:{width:this.width}},[t("textarea",{attrs:{id:this.id},domProps:{value:this.content}})])},[],!1,null,null,null);t.a=l.exports},"959a":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),u=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),h=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),g=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),r=function(e){return e&&"BR"===e.nodeName},o=function(e){return e&&3===e.nodeType},v=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},i=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},a=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},b=r,s=function(e){return e.parentNode.firstChild===e},c=function(e){return e.parentNode.lastChild===e},y=function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},f=function(e,t){return e&&e.nodeName in t},d=function(e,t){return!!r(t)&&!(!e.isBlock(t.nextSibling)||r(t.previousSibling))},p=function(e,t,n){var r=e.isEmpty(t);return!(n&&0<e.select("span[data-mce-type=bookmark]",t).length)&&r},m=function(e,t){return e.isChildOf(t,e.getRoot())},w=function(e,t){var n=l.getNode(e,t);return i(e)&&o(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:{container:e,offset:t}},x=function(e){var t=e.cloneRange(),n=w(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var r=w(e.endContainer,e.endOffset);return t.setEnd(r.container,r.offset),t},C=t.DOM,_=function(o){var i={},e=function(e){var t,n,r;n=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===n.nodeType&&(t=C.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(r=Math.min(r,n.childNodes.length-1),e?n.insertBefore(t,n.childNodes[r]):C.insertAfter(t,n.childNodes[r])):n.appendChild(t),n=t,r=0),i[e?"startContainer":"endContainer"]=n,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},S=function(o){function e(e){var t,n,r;t=r=o[e?"startContainer":"endContainer"],n=o[e?"startOffset":"endOffset"],t&&(1===t.nodeType&&(n=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(t),t=t.parentNode,C.remove(r),!t.hasChildNodes()&&C.isBlock(t)&&t.appendChild(C.create("br"))),o[e?"startContainer":"endContainer"]=t,o[e?"startOffset":"endOffset"]=n)}e(!0),e();var t=C.createRng();return t.setStart(o.startContainer,o.startOffset),o.endContainer&&t.setEnd(o.endContainer,o.endOffset),x(t)},k=t.DOM,E=function(e,t){var n,r=t.parentNode;"LI"===r.nodeName&&r.firstChild===t&&((n=r.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),p(e,r)&&k.remove(r)):k.setStyle(r,"listStyleType","none")),v(r)&&(n=r.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)},T=function(t,e){g.each(g.grep(t.select("ol,ul",e)),function(e){E(t,e)})},N=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),R=function(e){var t=e.selection.getStart(!0);return e.dom.getParent(t,"OL,UL,DL",O(e,t))},O=function(e,t){var n=e.dom.getParents(t,"TD,TH");return 0<n.length?n[0]:e.getBody()},P={getParentList:R,getSelectedSubLists:function(e){var t,n,r,o=R(e),i=e.selection.getSelectedBlocks();return r=i,(n=o)&&1===r.length&&r[0]===n?(t=o,g.grep(t.querySelectorAll("ol,ul,dl"),function(e){return v(e)})):g.grep(i,function(e){return v(e)&&o!==e})},getSelectedListItems:function(e){var n,t,r,o=e.selection.getSelectedBlocks();return g.grep((n=e,t=o,r=g.map(t,function(e){var t=n.dom.getParent(e,"li,dd,dt",O(n,e));return t||e}),N.unique(r)),function(e){return i(e)})},getClosestListRootElm:O},A=tinymce.util.Tools.resolve("tinymce.Env"),D=t.DOM,M=function(e,t,n){var r,o,i,a=D.createFragment(),s=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&((o=D.create(n)).tagName===e.settings.forced_root_block&&D.setAttribs(o,e.settings.forced_root_block_attrs),f(t.firstChild,s)||a.appendChild(o)),t)for(;r=t.firstChild;){var l=r.nodeName;i||"SPAN"===l&&"bookmark"===r.getAttribute("data-mce-type")||(i=!0),f(r,s)?(a.appendChild(r),o=null):n?(o||(o=D.create(n),a.appendChild(o)),o.appendChild(r)):a.appendChild(r)}return e.settings.forced_root_block?i||A.ie&&!(10<A.ie)||o.appendChild(D.create("br",{"data-mce-bogus":"1"})):a.appendChild(D.create("br")),a},I=t.DOM,L=function(e,t,n,r){var o,i,a,s,l;for(a=I.select('span[data-mce-type="bookmark"]',t),r=r||M(e,n),(o=I.createRng()).setStartAfter(n),o.setEndAfter(t),s=(i=o.extractContents()).firstChild;s;s=s.firstChild)if("LI"===s.nodeName&&e.dom.isEmpty(s)){I.remove(s);break}e.dom.isEmpty(i)||I.insertAfter(i,t),I.insertAfter(r,t),p(e.dom,n.parentNode)&&(l=n.parentNode,g.each(a,function(e){l.parentNode.insertBefore(e,n.parentNode)}),I.remove(l)),I.remove(n),p(e.dom,t)&&I.remove(t)},B=t.DOM,F=function(e,t){p(e,t)&&B.remove(t)},j=function(e,t){var n,r,o=t.parentNode;return o?(n=o.parentNode,o===e.getBody()||("DD"===t.nodeName?B.rename(t,"DT"):s(t)&&c(t)?"LI"===n.nodeName?(B.insertAfter(t,n),F(e.dom,n),B.remove(o)):v(n)?B.remove(o,!0):(n.insertBefore(M(e,t),o),B.remove(o)):s(t)?"LI"===n.nodeName?(B.insertAfter(t,n),t.appendChild(o),F(e.dom,n)):v(n)?n.insertBefore(t,o):(n.insertBefore(M(e,t),o),B.remove(t)):c(t)?"LI"===n.nodeName?B.insertAfter(t,n):v(n)?B.insertAfter(t,o):(B.insertAfter(M(e,t),o),B.remove(t)):(r="LI"===n.nodeName?(o=n,M(e,t,"LI")):v(n)?M(e,t,"LI"):M(e,t),L(e,o,t,r),T(e.dom,o.parentNode)))):F(e.dom,t),!0},H=j,U=function(e){var t=P.getSelectedListItems(e);if(t.length){var n=_(e.selection.getRng()),r=void 0,o=void 0,i=P.getClosestListRootElm(e,e.selection.getStart(!0));for(r=t.length;r--;)for(var a=t[r].parentNode;a&&a!==i;){for(o=t.length;o--;)if(t[o]===a){t.splice(r,1);break}a=a.parentNode}for(r=0;r<t.length&&(j(e,t[r])||0!==r);r++);return e.selection.setRng(S(n)),e.nodeChanged(),!0}},z=function(n,e){g.each(e,function(e,t){n.setAttribute(t,e)})},W=function(e,t,n){var r,o,i,a,s,l,u;r=e,o=t,a=(i=n)["list-style-type"]?i["list-style-type"]:null,r.setStyle(o,"list-style-type",a),s=e,z(l=t,(u=n)["list-attributes"]),g.each(s.select("li",l),function(e){z(e,u["list-item-attributes"])})},V=function(e,t,n,r){var o,i;for(o=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!n&&b(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(y(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},q=function(c,f,d){void 0===d&&(d={});var e,t=c.selection.getRng(!0),p="LI",n=P.getClosestListRootElm(c,c.selection.getStart(!0)),m=c.dom;"false"!==m.getContentEditable(c.selection.getNode())&&("DL"===(f=f.toUpperCase())&&(p="DT"),e=_(t),g.each(function(n,e,r){for(var o,i=[],a=n.dom,t=V(n,e,!0,r),s=V(n,e,!1,r),l=[],u=t;u&&(l.push(u),u!==s);u=u.nextSibling);return g.each(l,function(e){if(y(n,e))return i.push(e),void(o=null);if(a.isBlock(e)||b(e))return b(e)&&a.remove(e),void(o=null);var t=e.nextSibling;h.isBookmarkNode(e)&&(y(n,t)||!t&&e.parentNode===r)?o=null:(o||(o=a.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(c,t,n),function(e){var t,n,r,o,i,a,s,l,u;(n=e.previousSibling)&&v(n)&&n.nodeName===f&&(r=n,o=d,i=m.getStyle(r,"list-style-type"),a=o?o["list-style-type"]:"",i===(a=null===a?"":a))?(t=n,e=m.rename(e,p),n.appendChild(e)):(t=m.create(f),e.parentNode.insertBefore(t,e),t.appendChild(e),e=m.rename(e,p)),s=m,l=e,u=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],g.each(u,function(e){var t;return s.setStyle(l,((t={})[e]="",t))}),W(m,t,d),Y(c.dom,t)}),c.selection.setRng(S(e)))},$=function(r){var e=_(r.selection.getRng(!0)),o=P.getClosestListRootElm(r,r.selection.getStart(!0)),t=P.getSelectedListItems(r),n=g.grep(t,function(e){return r.dom.isEmpty(e)});t=g.grep(t,function(e){return!r.dom.isEmpty(e)}),g.each(n,function(e){p(r.dom,e)&&H(r,e)}),g.each(t,function(e){var t,n;if(e.parentNode!==r.getBody()){for(t=e;t&&t!==o;t=t.parentNode)v(t)&&(n=t);L(r,n,e),T(r.dom,n.parentNode)}}),r.selection.setRng(S(e))},X=function(e,t,n){return l=n,(s=t)&&l&&v(s)&&s.nodeName===l.nodeName&&(i=t,a=n,(o=e).getStyle(i,"list-style-type",!0)===o.getStyle(a,"list-style-type",!0))&&(r=n,t.className===r.className);var r,o,i,a,s,l},Y=function(e,t){var n,r;if(n=t.nextSibling,X(e,t,n)){for(;r=n.firstChild;)t.appendChild(r);e.remove(n)}if(n=t.previousSibling,X(e,t,n)){for(;r=n.lastChild;)t.insertBefore(r,t.firstChild);e.remove(n)}},G=function(t,e,n,r,o){if(e.nodeName!==r||K(o)){var i=_(t.selection.getRng(!0));g.each([e].concat(n),function(e){!function(e,t,n,r){if(t.nodeName!==n){var o=e.rename(t,n);W(e,o,r)}else W(e,t,r)}(t.dom,e,r,o)}),t.selection.setRng(S(i))}else $(t)},K=function(e){return"list-style-type"in e},J={toggleList:function(e,t,n){var r=P.getParentList(e),o=P.getSelectedSubLists(e);n=n||{},r&&0<o.length?G(e,r,o,t,n):function(e,t,n,r){if(t!==e.getBody())if(t)if(t.nodeName!==n||K(r)){var o=_(e.selection.getRng(!0));W(e.dom,t,r),Y(e.dom,e.dom.rename(t,n)),e.selection.setRng(S(o))}else $(e);else q(e,n,r)}(e,r,t,n)},removeList:$,mergeWithAdjacentLists:Y},Z=function(e,t,n,r){var o,i,a=t.startContainer,s=t.startOffset;if(3===a.nodeType&&(n?s<a.data.length:0<s))return a;for(o=e.schema.getNonEmptyElements(),1===a.nodeType&&(a=l.getNode(a,s)),i=new u(a,r),n&&d(e.dom,a)&&i.next();a=i[n?"next":"prev2"]();){if("LI"===a.nodeName&&!a.hasChildNodes())return a;if(o[a.nodeName])return a;if(3===a.nodeType&&0<a.data.length)return a}},Q=function(e,t){var n=t.childNodes;return 1===n.length&&!v(n[0])&&e.isBlock(n[0])},ee=function(e,t,n){var r,o,i,a;if(o=Q(e,n)?n.firstChild:n,Q(i=e,a=t)&&i.remove(a.firstChild,!0),!p(e,t,!0))for(;r=t.firstChild;)o.appendChild(r)},te=function(e,t,n){var r,o,i=t.parentNode;m(e,t)&&m(e,n)&&(v(n.lastChild)&&(o=n.lastChild),i===n.lastChild&&b(i.previousSibling)&&e.remove(i.previousSibling),(r=n.lastChild)&&b(r)&&t.hasChildNodes()&&e.remove(r),p(e,n,!0)&&e.$(n).empty(),ee(e,t,n),o&&n.appendChild(o),e.remove(t),p(e,i)&&i!==e.getRoot()&&e.remove(i))},ne=function(e,t,n,r){var o,i,a,s=e.dom;if(s.isEmpty(r))i=n,a=r,(o=e).dom.$(a).empty(),te(o.dom,i,a),o.selection.setCursorLocation(a);else{var l=_(t);te(s,n,r),e.selection.setRng(S(l))}},re=function(e,t){var n,r,o,i=e.dom,a=e.selection,s=a.getStart(),l=P.getClosestListRootElm(e,s),u=i.getParent(a.getStart(),"LI",l);if(u){if((n=u.parentNode)===e.getBody()&&p(i,n))return!0;if(r=x(a.getRng(!0)),(o=i.getParent(Z(e,r,t,l),"LI",l))&&o!==u)return t?ne(e,r,o,u):function(e,t,n,r){var o=_(t);te(e.dom,n,r);var i=S(o);e.selection.setRng(i)}(e,r,u,o),!0;if(!o&&!t)return J.removeList(e),!0}return!1},oe=function(e,t){return re(e,t)||function(o,i){var a=o.dom,e=o.selection.getStart(),s=P.getClosestListRootElm(o,e),l=a.getParent(e,a.isBlock,s);if(l&&a.isEmpty(l)){var t=x(o.selection.getRng(!0)),u=a.getParent(Z(o,t,i,s),"LI",s);if(u)return o.undoManager.transact(function(){var e,t,n,r;t=l,n=s,r=(e=a).getParent(t.parentNode,e.isBlock,n),e.remove(t),r&&e.isEmpty(r)&&e.remove(r),J.mergeWithAdjacentLists(a,u.parentNode),o.selection.select(u,!0),o.selection.collapse(i)}),!0}return!1}(e,t)},ie=function(e,t){return e.selection.isCollapsed()?oe(e,t):(r=(n=e).selection.getStart(),o=P.getClosestListRootElm(n,r),!!(n.dom.getParent(r,"LI,DT,DD",o)||0<P.getSelectedListItems(n).length)&&(n.undoManager.transact(function(){n.execCommand("Delete"),T(n.dom,n.getBody())}),!0));var n,r,o},ae=function(t){t.on("keydown",function(e){e.keyCode===n.BACKSPACE?ie(t,!1)&&e.preventDefault():e.keyCode===n.DELETE&&ie(t,!0)&&e.preventDefault()})},se=ie,le=function(t){return{backspaceDelete:function(e){se(t,e)}}},ue=t.DOM,ce=function(e,t){var n;if(v(e)){for(;n=e.firstChild;)t.appendChild(n);ue.remove(e)}},fe=function(e){var t,n,r,o,i=P.getSelectedListItems(e);if(i.length){for(var a=_(e.selection.getRng(!0)),s=0;s<i.length&&(t=i[s],o=r=n=void 0,("DT"===t.nodeName?(ue.rename(t,"DD"),1):(n=t.previousSibling)&&v(n)?(n.appendChild(t),1):n&&"LI"===n.nodeName&&v(n.lastChild)?(n.lastChild.appendChild(t),ce(t.lastChild,n.lastChild),1):(n=t.nextSibling)&&v(n)?(n.insertBefore(t,n.firstChild),1):(n=t.previousSibling)&&"LI"===n.nodeName&&(r=ue.create(t.parentNode.nodeName),(o=ue.getStyle(t.parentNode,"listStyleType"))&&ue.setStyle(r,"listStyleType",o),n.appendChild(r),r.appendChild(t),ce(t.lastChild,r),1))||0!==s);s++);return e.selection.setRng(S(a)),e.nodeChanged(),!0}},de=function(t,n){return function(){var e=t.dom.getParent(t.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===n}},pe=function(r){r.on("BeforeExecCommand",function(e){var t,n=e.command.toLowerCase();if("indent"===n?fe(r)&&(t=!0):"outdent"===n&&U(r)&&(t=!0),t)return r.fire("ExecCommand",{command:e.command}),e.preventDefault(),!0}),r.addCommand("InsertUnorderedList",function(e,t){J.toggleList(r,"UL",t)}),r.addCommand("InsertOrderedList",function(e,t){J.toggleList(r,"OL",t)}),r.addCommand("InsertDefinitionList",function(e,t){J.toggleList(r,"DL",t)}),r.addQueryStateHandler("InsertUnorderedList",de(r,"UL")),r.addQueryStateHandler("InsertOrderedList",de(r,"OL")),r.addQueryStateHandler("InsertDefinitionList",de(r,"DL"))},me=function(e){return e.getParam("lists_indent_on_tab",!0)},he=function(e){var t;me(e)&&(t=e).on("keydown",function(e){e.keyCode!==n.TAB||n.metaKeyPressed(e)||t.dom.getParent(t.selection.getStart(),"LI,DT,DD")&&(e.preventDefault(),e.shiftKey?U(t):fe(t))}),ae(e)},ge=function(t,i){return function(e){var o=e.control;t.on("NodeChange",function(e){var t=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e.parents,a),n=-1!==t?e.parents.slice(0,t):e.parents,r=g.grep(n,v);o.active(0<r.length&&r[0].nodeName===i)})}},ve=function(e){var t,n,r,o;n="advlist",r=(t=e).settings.plugins?t.settings.plugins:"",-1===g.inArray(r.split(/[ ,]/),n)&&(e.addButton("numlist",{active:!1,title:"Numbered list",cmd:"InsertOrderedList",onPostRender:ge(e,"OL")}),e.addButton("bullist",{active:!1,title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:ge(e,"UL")})),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:(o=e,function(e){var n=e.control;o.on("nodechange",function(){var e=P.getSelectedListItems(o),t=0<e.length&&s(e[0]);n.disabled(t)})})})};e.add("lists",function(e){return he(e),ve(e),pe(e),le(e)})}()},"95d5":function(e,t,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");e.exports=n("584a").isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(r(t))}},"967a":function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),a=function(e){return parseInt(e.getParam("plugin_preview_width","650"),10)},s=function(e){return parseInt(e.getParam("plugin_preview_height","500"),10)},l=function(e){return e.getParam("content_style","")},u=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(t){var n="",r=t.dom.encode,e=l(t);n+='<base href="'+r(t.documentBaseURI.getURI())+'">',e&&(n+='<style type="text/css">'+e+"</style>"),u.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+r(t.documentBaseURI.toAbsolute(e))+'">'});var o=t.settings.body_id||"tinymce";-1!==o.indexOf("=")&&(o=(o=t.getParam("body_id","","hash"))[t.id]||o);var i=t.settings.body_class||"";-1!==i.indexOf("=")&&(i=(i=t.getParam("body_class","","hash"))[t.id]||"");var a=t.settings.directionality?' dir="'+t.settings.directionality+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+r(o)+'" class="mce-content-body '+r(i)+'"'+r(a)+">"+t.getContent()+'<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);<\/script> </body></html>'},f=function(e,t,n){var r=c(e);if(n)t.src="data:text/html;charset=utf-8,"+encodeURIComponent(r);else{var o=t.contentWindow.document;o.open(),o.write(r),o.close()}},t=function(n){var r=!i.ie,e='<iframe src="" frameborder="0"'+(r?' sandbox="allow-scripts"':"")+"></iframe>",t=a(n),o=s(n);n.windowManager.open({title:"Preview",width:t,height:o,html:e,buttons:{text:"Close",onclick:function(e){e.control.parent().parent().close()}},onPostRender:function(e){var t=e.control.getEl("body").firstChild;f(n,t,r)}})},n=function(e){e.addCommand("mcePreview",function(){t(e)})},r=function(e){e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})};e.add("preview",function(e){n(e),r(e)})}()},"99d0":function(e,t,n){n("1d39")},"9aa9":function(e,t){t.f=Object.getOwnPropertySymbols},"9b43":function(e,t,n){var i=n("d8e8");e.exports=function(r,o,e){if(i(r),void 0===o)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},"9c6c":function(e,t,n){var r=n("2b4c")("unscopables"),o=Array.prototype;null==o[r]&&n("32e9")(o,r,{}),e.exports=function(e){o[r][e]=!0}},"9c80":function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},"9def":function(e,t,n){var r=n("4588"),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"9fa6":function(e,t,n){"use strict";function s(){this.message="String contains an invalid character"}(s.prototype=new Error).code=5,s.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,n,r=String(e),o="",i=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.charAt(0|i)||(a="=",i%1);o+=a.charAt(63&t>>8-i%1*8)){if(255<(n=r.charCodeAt(i+=.75)))throw new s;t=t<<8|n}return o}},a159:function(e,t,r){var o=r("e4ae"),i=r("7e90"),a=r("1691"),s=r("5559")("IE_PROTO"),l=function(){},u="prototype",c=function(){var e,t=r("1ec9")("iframe"),n=a.length;for(t.style.display="none",r("32fc").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[u][a[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(l[u]=o(e),n=new l,l[u]=null,n[s]=e):n=c(),void 0===t?n:i(n,t)}},a25f:function(e,t,n){var r=n("7726").navigator;e.exports=r&&r.userAgent||""},a39d:function(e,t){!function(){"use strict";var u=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return u(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(e.settings.plugins)||!t.get("powerpaste")||(void 0!==window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},s=function(e,t){return{clipboard:e,quirks:t}},f=function(e,t,n,r){return e.fire("PastePreProcess",{content:t,internal:n,wordContent:r})},d=function(e,t,n,r){return e.fire("PastePostProcess",{node:t,internal:n,wordContent:r})},l=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},n=function(e,t){return e.fire("paste",{ieFake:t})},p={shouldPlainTextInform:function(e){return e.getParam("paste_plaintext_inform",!0)},shouldBlockDrop:function(e){return e.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(e){return e.getParam("paste_data_images",!1)},shouldFilterDrop:function(e){return e.getParam("paste_filter_drop",!0)},getPreProcess:function(e){return e.getParam("paste_preprocess")},getPostProcess:function(e){return e.getParam("paste_postprocess")},getWebkitStyles:function(e){return e.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(e){return e.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(e){return e.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(e){return e.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(e){return e.getParam("paste_as_text",!1)},getRetainStyleProps:function(e){return e.getParam("paste_retain_style_properties")},getWordValidElements:function(e){return e.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(e){return e.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(e){return e.getParam("paste_enable_default_filters",!0)}},r=function(e,t,n){var r,o,i;"text"===t.pasteFormat.get()?(t.pasteFormat.set("html"),l(e,!1)):(t.pasteFormat.set("text"),l(e,!0),i=e,!1===n.get()&&p.shouldPlainTextInform(i)&&(o="Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.",(r=e).notificationManager.open({text:r.translate(o),type:"info"}),n.set(!0))),e.focus()},c=function(e,n,t){e.addCommand("mceTogglePlainTextPaste",function(){r(e,n,t)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&n.pasteHtml(t.content,t.internal),t.text&&n.pasteText(t.text)})},g=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.util.Delay"),b=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=tinymce.util.Tools.resolve("tinymce.util.VK"),e="x-tinymce/html",i="\x3c!-- "+e+" --\x3e",m=function(e){return i+e},h=function(e){return e.replace(i,"")},y=function(e){return-1!==e.indexOf(i)},w=function(){return e},x=tinymce.util.Tools.resolve("tinymce.html.Entities"),C=function(e){return e.replace(/\r?\n/g,"<br>")},_=function(e,t,n){var r=e.split(/\n\n/),o=function(e,t){var n,r=[],o="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+x.encodeAllRaw(t[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(t,n),i="</"+t+">",a=b.map(r,function(e){return e.split(/\n/).join("<br />")});return 1===a.length?a[0]:b.map(a,function(e){return o+e+i}).join("")},S=function(e){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e)},k=function(e,t,n){return t?_(e,t,n):C(e)},E=tinymce.util.Tools.resolve("tinymce.html.DomParser"),T=tinymce.util.Tools.resolve("tinymce.html.Node"),N=tinymce.util.Tools.resolve("tinymce.html.Schema"),R=tinymce.util.Tools.resolve("tinymce.html.Serializer");function O(t,e){return b.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}var P={filter:O,innerText:function(e){var t=N(),n=E({},t),o="",i=t.getShortEndedElements(),a=b.makeMap("script noscript style textarea video audio iframe object"," "),s=t.getBlockElements();return e=O(e,[/<!\[[^\]]+\]>/g]),function e(t){var n=t.name,r=t;if("br"!==n){if("wbr"!==n)if(i[n]&&(o+=" "),a[n])o+=" ";else{if(3===t.type&&(o+=t.value),!t.shortEnded&&(t=t.firstChild))for(;e(t),t=t.next;);s[n]&&r.next&&(o+="\n","p"===n&&(o+="\n"))}}else o+="\n"}(n.parse(e)),o},trimHtml:function(e){return e=O(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?" ":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function(e){var t=0;return function(){return e+t++}},isMsEdge:function(){return-1!==navigator.userAgent.indexOf(" Edge/")}};function A(t){var n,e;return e=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],t=t.replace(/^[\u00a0 ]+/,""),b.each(e,function(e){if(e.test(t))return!(n=!0)}),n}function D(e){var o,i,a=1;function n(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=n(e),e=e.next;);return t}function s(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!s(e,t))return!1}while(e=e.next);return!0}function t(e,t,n){var r=e._listLevel||a;r!==a&&(r<a?o&&(o=o.parent.parent):(i=o,o=null)),o&&o.name===t?o.append(e):(i=i||o,o=new T(t,1),1<n&&o.attr("start",""+n),e.wrap(o)),e.name="li",a<r&&i&&i.lastChild.append(o),a=r,function e(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)for(;e(t),t=t.next;);}(e),s(e,/^\u00a0+/),s(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),s(e,/^\u00a0+/)}for(var r=[],l=e.firstChild;null!=l;)if(r.push(l),null!==(l=l.walk()))for(;void 0!==l&&l.parent!==e;)l=l.walk();for(var u=0;u<r.length;u++)if("p"===(e=r[u]).name&&e.firstChild){var c=n(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)){t(e,"ul");continue}if(A(c)){var f=/([0-9]+)\./.exec(c),d=1;f&&(d=parseInt(f[1],10)),t(e,"ol",d);continue}if(e._listLevel){t(e,"ul",1);continue}o=null}else i=o,o=null}function M(n,r,o,i){var a,s={},e=n.dom.parseStyle(i);return b.each(e,function(e,t){switch(t){case"mso-list":(a=/\w+ \w+([0-9]+)/i.exec(i))&&(o._listLevel=parseInt(a[1],10)),/Ignore/i.test(e)&&o.firstChild&&(o._listIgnore=!0,o.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(s[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void o.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"===p.getRetainStyleProps(n)||r&&r[t])&&(s[t]=e):o.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],o.wrap(new T("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],o.wrap(new T("i",1))),(s=n.dom.serializeStyle(s,o.name))||null}var I={preProcess:function(e,t){return p.shouldUseDefaultFilters(e)?function(r,e){var t,o;(t=p.getRetainStyleProps(r))&&(o=b.makeMap(t.split(/[, ]/))),e=P.filter(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(" "):""}]]);var n=p.getWordValidElements(r),i=N({valid_elements:n,valid_children:"-li[p]"});b.each(i.elements,function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var a=E({},i);a.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",M(r,o,t,t.attr("style"))),"span"===t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),a.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),a.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),a.addNodeFilter("a",function(e){for(var t,n,r,o=e.length;o--;)if(n=(t=e[o]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()});var s=a.parse(e);return p.shouldConvertWordFakeLists(r)&&D(s),e=R({validate:r.settings.validate},i).serialize(s)}(e,t):t},isWordContent:function(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}},L=function(e,t){return{content:e,cancelled:t}},B=function(e,t,n,r){var o,i,a,s,l,u,c=f(e,t,n,r);return e.hasEventListeners("PastePostProcess")&&!c.isDefaultPrevented()?(o=e,i=c.content,a=n,s=r,l=o.dom.create("div",{style:"display:none"},i),u=d(o,l,a,s),L(u.node.innerHTML,u.isDefaultPrevented())):L(c.content,c.isDefaultPrevented())},F=function(e,t,n){var r=I.isWordContent(t),o=r?I.preProcess(e,t):t;return B(e,o,n,r)},j=function(e,t){var n,r;return e.insertContent((n=t,r=e.dom.create("body",{},n),b.each(r.querySelectorAll("meta"),function(e){return e.parentNode.removeChild(e)}),r.innerHTML),{merge:p.shouldMergeFormats(e),paste:!0}),!0},H=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},U=function(e){return H(e)&&/.(gif|jpe?g|png)$/.test(e)},z=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!H(t)||(o=t,i=n,(r=e).undoManager.extra(function(){i(r,o)},function(){r.execCommand("mceInsertLink",!1,o)}),0));var r,o,i},W=function(e,t,n){return!!U(t)&&(o=t,i=n,(r=e).undoManager.extra(function(){i(r,o)},function(){r.insertContent('<img src="'+o+'">')}),!0);var r,o,i},V=function(e,t){var n,r;!1===p.isSmartPasteEnabled(e)?j(e,t):(n=e,r=t,b.each([z,W,j],function(e){return!0!==e(n,r,j)}))},q=function(e,t,n){var r=n||y(t),o=F(e,h(t),r);!1===o.cancelled&&V(e,o.content)},$=function(e,t){t=e.dom.encode(t).replace(/\r\n/g,"\n"),t=k(t,e.settings.forced_root_block,e.settings.forced_root_block_attrs),q(e,t,!1)},X=function(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&0<n.length&&-1===n.indexOf("data:text/mce-internal,")&&(t["text/plain"]=n)}if(e.types)for(var r=0;r<e.types.length;r++){var o=e.types[r];try{t[o]=e.getData(o)}catch(e){t[o]=""}}}return t},Y=function(e,t){return t in e&&0<e[t].length},G=function(e){return Y(e,"text/html")||Y(e,"text/plain")},K=P.createIdGenerator("mceclip"),J=function(e,t,n,r){t&&(e.selection.setRng(t),t=null);var o,i,a,s,l,u,c,f=n.result,d=-1!==(i=(o=f).indexOf(","))?o.substr(i+1):null,p=K(),m=e.settings.images_reuse_filename&&r.name?(a=e,s=r.name,(l=s.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i))?a.dom.encode(l[1]):null):p,h=new Image;if(h.src=f,u=e.settings,c=h,!u.images_dataimg_filter||u.images_dataimg_filter(c)){var g,v=e.editorUpload.blobCache,b=void 0;(g=v.findFirst(function(e){return e.base64()===d}))?b=g:(b=v.create(p,r,d,m),v.add(b)),q(e,'<img src="'+b.blobUri()+'">',!1)}else q(e,'<img src="'+f+'">',!1)},Z=function(a,s,l){var e="paste"===s.type?s.clipboardData:s.dataTransfer;function t(e){var t,n,r,o=!1;if(e)for(t=0;t<e.length;t++)if(n=e[t],/^image\/(jpeg|png|gif|bmp)$/.test(n.type)){var i=n.getAsFile?n.getAsFile():n;(r=new window.FileReader).onload=J.bind(null,a,l,r,i),r.readAsDataURL(i),s.preventDefault(),o=!0}return o}if(a.settings.paste_data_images&&e)return t(e.items)||t(e.files)},Q=function(e){return o.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},ee=function(c,f,d){var p,m=0;function h(e,t,n,r){var o,i;Y(e,"text/html")?o=e["text/html"]:(o=f.getHtml(),r=r||y(o),f.isDefaultContent(o)&&(n=!0)),o=P.trimHtml(o),f.remove(),i=!1===r&&S(o),o.length&&!i||(n=!0),n&&(o=Y(e,"text/plain")&&i?e["text/plain"]:P.innerText(o)),f.isDefaultContent(o)?t||c.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?$(c,o):q(c,o,r)}c.on("keydown",function(e){function t(e){Q(e)&&!e.isDefaultPrevented()&&f.remove()}if(Q(e)&&!e.isDefaultPrevented()){if((p=e.shiftKey&&86===e.keyCode)&&g.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(e.stopImmediatePropagation(),m=(new Date).getTime(),g.ie&&p)return e.preventDefault(),void n(c,!0);f.remove(),f.create(),c.once("keyup",t),c.once("paste",function(){c.off("keyup",t)})}}),c.on("paste",function(e){var t,n,r,o=(new Date).getTime(),i=(t=c,n=X(e.clipboardData||t.getDoc().dataTransfer),P.isMsEdge()?b.extend(n,{"text/html":""}):n),a=(new Date).getTime()-o,s=(new Date).getTime()-m-a<1e3,l="text"===d.get()||p,u=Y(i,w());p=!1,e.isDefaultPrevented()||(r=e.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length)?f.remove():G(i)||!Z(c,e,f.getLastRng()||c.selection.getRng())?(s||e.preventDefault(),!g.ie||s&&!e.ieFake||Y(i,"text/html")||(f.create(),c.dom.bind(f.getEl(),"paste",function(e){e.stopPropagation()}),c.getDoc().execCommand("Paste",!1,null),i["text/html"]=f.getHtml()),Y(i,"text/html")?(e.preventDefault(),u||(u=y(i["text/html"])),h(i,s,l,u)):v.setEditorTimeout(c,function(){h(i,s,l,u)},0)):f.remove()})},te=function(e){return g.ie&&e.inline?document.body:e.getBody()},ne=function(t,e,n){var r;te(r=t)!==r.getBody()&&t.dom.bind(e,"paste keyup",function(e){ie(t,n)||t.fire("paste")})},re=function(e){return e.dom.get("mcepastebin")},oe=function(e,t){return t===e},ie=function(e,t){var n,r=re(e);return(n=r)&&"mcepastebin"===n.id&&oe(t,r.innerHTML)},ae=function(a){var s=u(null),l="%MCEPASTEBIN%";return{create:function(){return t=s,n=l,o=(e=a).dom,i=e.getBody(),t.set(e.selection.getRng()),r=e.dom.add(te(e),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(g.ie||g.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),ne(e,r,n),r.focus(),void e.selection.select(r,!0);var e,t,n,r,o,i},remove:function(){return function(e,t){if(re(e)){for(var n=void 0,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(a,s)},getEl:function(){return re(a)},getHtml:function(){return function(n){var t,e,r,o,i,a=function(e,t){e.appendChild(t),n.dom.remove(t,!0)};for(e=b.grep(te(n).childNodes,function(e){return"mcepastebin"===e.id}),t=e.shift(),b.each(e,function(e){a(t,e)}),r=(o=n.dom.select("div[id=mcepastebin]",t)).length-1;0<=r;r--)i=n.dom.create("div"),t.insertBefore(i,o[r]),a(i,o[r]);return t?t.innerHTML:""}(a)},getLastRng:function(){return s.get()},isDefault:function(){return ie(a,l)},isDefaultContent:function(e){return oe(l,e)}}},se=function(n,e){var t=ae(n);return n.on("preInit",function(){return ee(a=n,t,e),void a.parser.addNodeFilter("img",function(e,t,n){var r,o=function(e){e.attr("data-mce-object")||s===g.transparentSrc||e.remove()};if(!a.settings.paste_data_images&&(r=n).data&&!0===r.data.paste)for(var i=e.length;i--;)(s=e[i].attributes.map.src)&&(0===s.indexOf("webkit-fake-url")?o(e[i]):a.settings.allow_html_data_urls||0!==s.indexOf("data:")||o(e[i]))});var a,s}),{pasteFormat:e,pasteHtml:function(e,t){return q(n,e,t)},pasteText:function(e){return $(n,e)},pasteImageData:function(e,t){return Z(n,e,t)},getDataTransferItems:X,hasHtmlOrText:G,hasContentType:Y}},le=function(){},ue=function(e,t,n){if(r=e,!1!==g.iOS||void 0===r||"function"!=typeof r.setData||!0===P.isMsEdge())return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(w(),t),!0}catch(e){return!1}var r},ce=function(e,t,n,r){ue(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},fe=function(s){return function(e,t){var n=m(e),r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),o=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(o),s.dom.add(s.getBody(),r);var i=s.selection.getRng();o.focus();var a=s.dom.createRng();a.selectNodeContents(o),s.selection.setRng(a),setTimeout(function(){s.selection.setRng(i),r.parentNode.removeChild(r),t()},0)}},de=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},pe=function(e){var t,n;e.on("cut",(t=e,function(e){!1===t.selection.isCollapsed()&&ce(e,de(t),fe(t),function(){setTimeout(function(){t.execCommand("Delete")},0)})})),e.on("copy",(n=e,function(e){!1===n.selection.isCollapsed()&&ce(e,de(n),fe(n),le)}))},me=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),he=function(e,t){return me.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},ge=function(e,t){e.focus(),e.selection.setRng(t)},ve=function(a,s,l){p.shouldBlockDrop(a)&&a.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),p.shouldPasteDataImages(a)||a.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),a.on("drop",function(e){var t,n;if(n=he(a,e),!e.isDefaultPrevented()&&!l.get()){t=s.getDataTransferItems(e.dataTransfer);var r,o=s.hasContentType(t,w());if((s.hasHtmlOrText(t)&&(!(r=t["text/plain"])||0!==r.indexOf("file://"))||!s.pasteImageData(e,n))&&n&&p.shouldFilterDrop(a)){var i=t["mce-internal"]||t["text/html"]||t["text/plain"];i&&(e.preventDefault(),v.setEditorTimeout(a,function(){a.undoManager.transact(function(){t["mce-internal"]&&a.execCommand("Delete"),ge(a,n),i=P.trimHtml(i),t["text/html"]?s.pasteHtml(i,o):s.pasteText(i)})}))}}}),a.on("dragstart",function(e){l.set(!0)}),a.on("dragover dragend",function(e){p.shouldPasteDataImages(a)&&!1===l.get()&&(e.preventDefault(),ge(a,he(a,e))),"dragend"===e.type&&l.set(!1)})},be=function(e){var t=e.plugins.paste,n=p.getPreProcess(e);n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=p.getPostProcess(e);r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})};function ye(t,n){t.on("PastePreProcess",function(e){e.content=n(t,e.content,e.internal,e.wordContent)})}function we(e,t){if(!I.isWordContent(t))return t;var n=[];b.each(e.schema.getBlockElements(),function(e,t){n.push(t)});var r=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return t=P.filter(t,[[r,"$1"]]),t=P.filter(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function xe(e,t,n,r){if(r||n)return t;var u,o=p.getWebkitStyles(e);if(!1===p.shouldRemoveWebKitStyles(e)||"all"===o)return t;if(o&&(u=o.split(/[, ]/)),u){var c=e.dom,f=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var o=c.parseStyle(c.decode(n)),i={};if("none"===u)return t+r;for(var a=0;a<u.length;a++){var s=o[u[a]],l=c.getStyle(f,u[a],!0);/color/.test(u[a])&&(s=c.toHex(s),l=c.toHex(l)),l!==s&&(i[u[a]]=s)}return(i=c.serializeStyle(i,"span"))?t+' style="'+i+'"'+r:t+r})}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function Ce(n,e){n.$("a",e).find("font,u").each(function(e,t){n.dom.remove(t,!0)})}var _e=function(e){var t,n;g.webkit&&ye(e,xe),g.ie&&(ye(e,we),n=Ce,(t=e).on("PastePostProcess",function(e){n(t,e.node)}))},Se=function(e,t,n){var r=n.control;r.active("text"===t.pasteFormat.get()),e.on("PastePlainTextToggle",function(e){r.active(e.state)})},ke=function(e,t){var n=function(i){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var a=new Array(arguments.length-1),n=1;n<arguments.length;n++)a[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=a.concat(n);return i.apply(null,o)}}(Se,e,t);e.addButton("pastetext",{active:!1,icon:"pastetext",tooltip:"Paste as text",cmd:"mceTogglePlainTextPaste",onPostRender:n}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:t.pasteFormat,cmd:"mceTogglePlainTextPaste",onPostRender:n})};t.add("paste",function(e){if(!1===a(e)){var t=u(!1),n=u(!1),r=u(p.isPasteAsTextEnabled(e)?"text":"html"),o=se(e,r),i=_e(e);return ke(e,o),c(e,o,t),be(e),pe(e),ve(e,o,n),s(o,i)}})}()},a481:function(e,t,n){"use strict";var S=n("cb7c"),r=n("4bf8"),k=n("9def"),E=n("4588"),T=n("0390"),N=n("5f1b"),R=Math.max,O=Math.min,d=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,m=/\$([$&`']|\d\d?)/g;n("214f")("replace",2,function(o,i,x,C){return[function(e,t){var n=o(this),r=null==e?void 0:e[i];return void 0!==r?r.call(e,n,t):x.call(String(n),e,t)},function(e,t){var n=C(x,e,this,t);if(n.done)return n.value;var r=S(e),o=String(this),i="function"==typeof t;i||(t=String(t));var a=r.global;if(a){var s=r.unicode;r.lastIndex=0}for(var l=[];;){var u=N(r,o);if(null===u)break;if(l.push(u),!a)break;""===String(u[0])&&(r.lastIndex=T(o,k(r.lastIndex),s))}for(var c,f="",d=0,p=0;p<l.length;p++){u=l[p];for(var m=String(u[0]),h=R(O(E(u.index),o.length),0),g=[],v=1;v<u.length;v++)g.push(void 0===(c=u[v])?c:String(c));var b=u.groups;if(i){var y=[m].concat(g,h,o);void 0!==b&&y.push(b);var w=String(t.apply(void 0,y))}else w=_(m,o,h,g,b,t);d<=h&&(f+=o.slice(d,h)+w,d=h+m.length)}return f+o.slice(d)}];function _(i,a,s,l,u,e){var c=s+i.length,f=l.length,t=m;return void 0!==u&&(u=r(u),t=p),x.call(e,t,function(e,t){var n;switch(t.charAt(0)){case"$":return"$";case"&":return i;case"`":return a.slice(0,s);case"'":return a.slice(c);case"<":n=u[t.slice(1,-1)];break;default:var r=+t;if(0===r)return e;if(f<r){var o=d(r/10);return 0===o?e:o<=f?void 0===l[o-1]?t.charAt(1):l[o-1]+t.charAt(1):e}n=l[r-1]}return void 0===n?"":n})}})},a4bb:function(e,t,n){e.exports=n("8aae")},a570:function(e,t,n){n("adef")},a5b8:function(e,t,n){"use strict";var o=n("d8e8");function r(e){var n,r;this.promise=new e(function(e,t){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=e,r=t}),this.resolve=o(n),this.reject=o(r)}e.exports.f=function(e){return new r(e)}},a745:function(e,t,n){e.exports=n("f410")},aa1c:function(e,t,n){},aa77:function(e,t,n){var a=n("5ca1"),r=n("be13"),s=n("79e5"),l=n("fdef"),o="["+l+"]",i=RegExp("^"+o+o+"*"),u=RegExp(o+o+"*$"),c=function(e,t,n){var r={},o=s(function(){return!!l[e]()||"​"!="​"[e]()}),i=r[e]=o?t(f):l[e];n&&(r[n]=i),a(a.P+a.F*o,"String",r)},f=c.trim=function(e,t){return e=String(r(e)),1&t&&(e=e.replace(i,"")),2&t&&(e=e.replace(u,"")),e};e.exports=c},aae3:function(e,t,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},ac3a:function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),t=function(e){return e.target_list},r=function(e){return e.rel_list},o=function(e){return e.link_class_list},b=function(e){return"boolean"==typeof e.link_assume_external_targets&&e.link_assume_external_targets},a=function(e){return"boolean"==typeof e.link_context_toolbar&&e.link_context_toolbar},i=function(e){return e.link_list},y=function(e){return"string"==typeof e.default_link_target},w=function(e){return e.default_link_target},x=t,C=function(e,t){e.settings.target_list=t},_=function(e){return!1!==t(e)},S=r,k=function(e){return void 0!==r(e)},E=o,T=function(e){return void 0!==o(e)},N=function(e){return!1!==e.link_title},R=function(e){return"boolean"==typeof e.allow_unsafe_link_target&&e.allow_unsafe_link_target},s=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.Env"),u=function(e){if(!l.ie||10<l.ie){var t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i=t,a=n,document.body.appendChild(i),i.dispatchEvent(a),document.body.removeChild(i)}else{var r=window.open("","_blank");if(r){r.opener=null;var o=r.document;o.open(),o.write('<meta http-equiv="refresh" content="0; url='+s.DOM.encode(e)+'">'),o.close()}}var i,a},O=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(e,t){var n,r,o=["noopener"],i=e?e.split(/\s+/):[],a=function(e){return e.filter(function(e){return-1===O.inArray(o,e)})};return(i=t?(n=a(n=i)).length?n.concat(o):o:a(i)).length?(r=i,O.trim(r.sort().join(" "))):null},f=function(e,t){return t=t||e.selection.getNode(),p(t)?e.dom.select("a[href]",t)[0]:e.dom.getParent(t,"a[href]")},d=function(e){return e&&"A"===e.nodeName&&e.href},p=function(e){return e&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className)},m=function(e,t){var n,r;(r=e.dom.select("img",t)[0])&&(n=e.dom.getParents(r,"a[href]",t)[0])&&(n.parentNode.insertBefore(r,n),e.dom.remove(n))},h=function(e,t,n){var r,o;(o=e.dom.select("img",t)[0])&&(r=e.dom.create("a",n),o.parentNode.insertBefore(r,o),r.appendChild(o))},P=function(o,i){return function(r){o.undoManager.transact(function(){var e=o.selection.getNode(),t=f(o,e),n={href:r.href,target:r.target?r.target:null,rel:r.rel?r.rel:null,class:r.class?r.class:null,title:r.title?r.title:null};k(o.settings)||!1!==R(o.settings)||(n.rel=c(n.rel,"_blank"===n.target)),r.href===i.href&&(i.attach(),i={}),t?(o.focus(),r.hasOwnProperty("text")&&("innerText"in t?t.innerText=r.text:t.textContent=r.text),o.dom.setAttribs(t,n),o.selection.select(t),o.undoManager.add()):p(e)?h(o,e,n):r.hasOwnProperty("text")?o.insertContent(o.dom.createHTML("a",n,o.dom.encode(r.text))):o.execCommand("mceInsertLink",!1,n)})}},A=function(t){return function(){t.undoManager.transact(function(){var e=t.selection.getNode();p(e)?m(t,e):t.execCommand("unlink")})}},g=d,v=function(e){return 0<O.grep(e,d).length},D=function(e){return!(/</.test(e)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(e)||-1===e.indexOf("href=")))},M=f,I=function(e,t){var n=t?t.innerText||t.textContent:e.getContent({format:"text"});return n.replace(/\uFEFF/g,"")},L=c,B=tinymce.util.Tools.resolve("tinymce.util.Delay"),F=tinymce.util.Tools.resolve("tinymce.util.XHR"),j={},H=function(e,r,t){var o=function(e,n){return n=n||[],O.each(e,function(e){var t={text:e.text||e.title};e.menu?t.menu=o(e.menu):(t.value=e.value,r&&r(t)),n.push(t)}),n};return o(e,t||[])},U=function(t,e,n){var r=t.selection.getRng();B.setEditorTimeout(t,function(){t.windowManager.confirm(e,function(e){t.selection.setRng(r),n(e)})})},z=function(a,e){var t,s,r,l,n,o,i,u,c,f,d,p={},m=a.selection,h=a.dom,g=function(e){var t=r.find("#text");(!t.value()||e.lastControl&&t.value()===e.lastControl.text())&&t.value(e.control.text()),r.find("#href").value(e.control.value())},v=function(){s||!l||p.text||this.parent().parent().find("#text")[0].value(this.value())};l=D(m.getContent()),t=M(a),p.text=s=I(a.selection,t),p.href=t?h.getAttrib(t,"href"):"",t?p.target=h.getAttrib(t,"target"):y(a.settings)&&(p.target=w(a.settings)),(d=h.getAttrib(t,"rel"))&&(p.rel=d),(d=h.getAttrib(t,"class"))&&(p.class=d),(d=h.getAttrib(t,"title"))&&(p.title=d),l&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){p.text=this.value()}}),e&&(o={type:"listbox",label:"Link list",values:H(e,function(e){e.value=a.convertURL(e.value||e.url,"href")},[{text:"None",value:""}]),onselect:g,value:a.convertURL(p.href,"href"),onPostRender:function(){o=this}}),_(a.settings)&&(void 0===x(a.settings)&&C(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),u={name:"target",type:"listbox",label:"Target",values:H(x(a.settings))}),k(a.settings)&&(i={name:"rel",type:"listbox",label:"Rel",values:H(S(a.settings),function(e){!1===R(a.settings)&&(e.value=L(e.value,"_blank"===p.target))})}),T(a.settings)&&(c={name:"class",type:"listbox",label:"Class",values:H(E(a.settings),function(e){e.value&&(e.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[e.value]})})})}),N(a.settings)&&(f={name:"title",type:"textbox",label:"Title",value:p.title}),r=a.windowManager.open({title:"Insert link",data:p,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(e){var t=e.meta||{};o&&o.value(a.convertURL(this.value(),"href")),O.each(e.meta,function(e,t){var n=r.find("#"+t);"text"===t?0===s.length&&(n.value(e),p.text=e):n.value(e)}),t.attach&&(j={href:this.value(),attach:t.attach}),t.text||v.call(this)},onkeyup:v,onpaste:v,onbeforecall:function(e){e.meta=r.toJSON()}},n,f,function(n){var r=[];if(O.each(a.dom.select("a:not([href])"),function(e){var t=e.name||e.id;t&&r.push({text:t,value:"#"+t,selected:-1!==n.indexOf("#"+t)})}),r.length)return r.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:r,onselect:g}}(p.href),o,i,u,c],onSubmit:function(e){var t=b(a.settings),n=P(a,j),r=A(a),o=O.extend({},p,e.data),i=o.href;i?(l&&o.text!==s||delete o.text,0<i.indexOf("@")&&-1===i.indexOf("//")&&-1===i.indexOf("mailto:")?U(a,"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(o.href="mailto:"+i),n(o)}):!0===t&&!/^\w+:/i.test(i)||!1===t&&/^\s*www[\.|\d\.]/i.test(i)?U(a,"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(o.href="http://"+i),n(o)}):n(o)):r()}})},W=function(e){var t,n,r;n=z,"string"==typeof(r=i((t=e).settings))?F.send({url:r,success:function(e){n(t,JSON.parse(e))}}):"function"==typeof r?r(function(e){n(t,e)}):n(t,r)},V=function(e,t){return e.dom.getParent(t,"a[href]")},q=function(e){return V(e,e.selection.getStart())},$=function(e,t){if(t){var n=(o=t).getAttribute("data-mce-href")||o.getAttribute("href");if(/^#/.test(n)){var r=e.$(n);r.length&&e.selection.scrollIntoView(r[0],!0)}else u(t.href)}var o},X=function(e){return function(){W(e)}},Y=function(e){return function(){$(e,q(e))}},G=function(i){return function(e){var t,n,r,o;return!!(a(i.settings)&&(!(o=i.plugins.contextmenu)||!o.isContextMenuVisible())&&g(e)&&3===(r=(n=(t=i.selection).getRng()).startContainer).nodeType&&t.isCollapsed()&&0<n.startOffset&&n.startOffset<r.data.length)}},K=function(r){r.on("click",function(e){var t=V(r,e.target);t&&n.metaKeyPressed(e)&&(e.preventDefault(),$(r,t))}),r.on("keydown",function(e){var t,n=q(r);n&&13===e.keyCode&&!0===(t=e).altKey&&!1===t.shiftKey&&!1===t.ctrlKey&&!1===t.metaKey&&(e.preventDefault(),$(r,n))})},J=function(n){return function(){var t=this;n.on("nodechange",function(e){t.active(!n.readonly&&!!M(n,e.element))})}},Z=function(n){return function(){var t=this,e=function(e){v(e.parents)?t.show():t.hide()};v(n.dom.getParents(n.selection.getStart()))||t.hide(),n.on("nodechange",e),t.on("remove",function(){n.off("nodechange",e)})}},Q=function(e){e.addCommand("mceLink",X(e))},ee=function(e){e.addShortcut("Meta+K","",X(e))},te=function(e){e.addButton("link",{active:!1,icon:"link",tooltip:"Insert/edit link",onclick:X(e),onpostrender:J(e)}),e.addButton("unlink",{active:!1,icon:"unlink",tooltip:"Remove link",onclick:A(e),onpostrender:J(e)}),e.addContextToolbar&&e.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:Y(e)})},ne=function(e){e.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:Y(e),onPostRender:Z(e),prependToContext:!0}),e.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:X(e),stateSelector:"a[href]",context:"insert",prependToContext:!0}),e.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onclick:A(e),stateSelector:"a[href]"})},re=function(e){e.addContextToolbar&&e.addContextToolbar(G(e),"openlink | link unlink")};e.add("link",function(e){te(e),ne(e),re(e),K(e),Q(e),ee(e)})}()},ac6a:function(e,t,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),a=n("7726"),s=n("32e9"),l=n("84f2"),u=n("2b4c"),c=u("iterator"),f=u("toStringTag"),d=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=o(p),h=0;h<m.length;h++){var g,v=m[h],b=p[v],y=a[v],w=y&&y.prototype;if(w&&(w[c]||s(w,c,d),w[f]||s(w,f,v),l[v]=d,b))for(g in r)w[g]||i(w,g,r[g],!0)}},adef:function(e,t){!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{isFullscreen:function(){return null!==e.get()}}},t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=function(e,t){e.fire("FullscreenStateChanged",{state:t})},h=t.DOM,o=function(e,t){var n,o,i,r,a,s,l=document.body,u=document.documentElement,c=t.get(),f=function(){var e,t,n,r;h.setStyle(i,"height",(n=window,r=document.body,r.offsetWidth&&(e=r.offsetWidth,t=r.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}).h-(o.clientHeight-i.clientHeight))},d=function(){h.unbind(window,"resize",f)};if(n=(o=e.getContainer()).style,r=(i=e.getContentAreaContainer().firstChild).style,c)r.width=c.iframeWidth,r.height=c.iframeHeight,c.containerWidth&&(n.width=c.containerWidth),c.containerHeight&&(n.height=c.containerHeight),h.removeClass(l,"mce-fullscreen"),h.removeClass(u,"mce-fullscreen"),h.removeClass(o,"mce-fullscreen"),a=c.scrollPos,window.scrollTo(a.x,a.y),h.unbind(window,"resize",c.resizeHandler),e.off("remove",c.removeHandler),t.set(null),m(e,!1);else{var p={scrollPos:(s=h.getViewPort(),{x:s.x,y:s.y}),containerWidth:n.width,containerHeight:n.height,iframeWidth:r.width,iframeHeight:r.height,resizeHandler:f,removeHandler:d};r.width=r.height="100%",n.width=n.height="",h.addClass(l,"mce-fullscreen"),h.addClass(u,"mce-fullscreen"),h.addClass(o,"mce-fullscreen"),h.bind(window,"resize",f),e.on("remove",d),f(),t.set(p),m(e,!0)}},i=function(e,t){e.addCommand("mceFullScreen",function(){o(e,t)})},a=function(n){return function(e){var t=e.control;n.on("FullscreenStateChanged",function(e){t.active(e.state)})}},s=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:a(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:a(e)})};e.add("fullscreen",function(e){var t=r(null);return e.settings.inline||(i(e,t),s(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),n(t)})}()},aebd:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},b0c5:function(e,t,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},b0dc:function(e,t,n){var i=n("e4ae");e.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},b20f:function(e,t,n){},b311:function(e,t,n){
/*!
 * clipboard.js v2.0.4
 * https://zenorocha.github.io/clipboard.js
 * 
 * Licensed MIT © Zeno Rocha
 */
var r;r=function(){return function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,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(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.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=0)}([function(e,t,n){"use strict";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},i=function(){function r(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(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),a=r(n(1)),s=r(n(3)),l=r(n(4));function r(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var n=function(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}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.resolveOptions(t),n.listenClick(e),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)}(r,s.default),i(r,[{key:"resolveOptions",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===o(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,l.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return c("action",e)}},{key:"defaultTarget",value:function(e){var t=c("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return c("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),r}();function c(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}e.exports=u},function(e,t,n){"use strict";var r,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},i=function(){function r(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(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),a=n(2),s=(r=a)&&r.__esModule?r:{default:r};var l=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.resolveOptions(e),this.initSelection()}return i(t,[{key:"resolveOptions",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,s.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,s.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":o(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),t}();e.exports=l},function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit: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},off: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.exports=n},function(e,t,n){var d=n(5),p=n(6);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!d.string(t))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(e))return c=t,f=n,(u=e).addEventListener(c,f),{destroy:function(){u.removeEventListener(c,f)}};if(d.nodeList(e))return a=e,s=t,l=n,Array.prototype.forEach.call(a,function(e){e.addEventListener(s,l)}),{destroy:function(){Array.prototype.forEach.call(a,function(e){e.removeEventListener(s,l)})}};if(d.string(e))return r=e,o=t,i=n,p(document.body,r,o,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var r,o,i,a,s,l,u,c,f}},function(e,n){n.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},n.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||n.node(e[0]))},n.string=function(e){return"string"==typeof e||e instanceof String},n.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var a=n(7);function i(e,t,n,r,o){var i=function(t,n,e,r){return function(e){e.delegateTarget=a(e.target,n),e.delegateTarget&&r.call(t,e)}}.apply(this,arguments);return e.addEventListener(n,i,o),{destroy:function(){e.removeEventListener(n,i,o)}}}e.exports=function(e,t,n,r,o){return"function"==typeof e.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return i(e,t,n,r,o)}))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}}])},e.exports=r()},b439:function(e,t){!function(){"use strict";var e,t,n,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),w=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},x=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,arguments))}},C=function(e){return function(){return e}},a=function(e){return e},_=function(i){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var a=new Array(arguments.length-1),n=1;n<arguments.length;n++)a[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=a.concat(n);return i.apply(null,o)}},p=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,arguments)}},s=function(e){return e()},l=C(!1),u=C(!0),c=l,f=u,d=function(){return m},m=(r={fold:function(e,t){return e()},is:c,isSome:c,isNone:f,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){},or:n,orThunk:t,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:c,forall:f,filter:d,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:C("none()")},Object.freeze&&Object.freeze(r),r),h=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:f,isNone:c,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return h(e(n))},ap:function(e){return e.fold(d,function(e){return h(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:m},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(c,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},S={some:h,none:d,from:function(e){return null==e?m:h(e)}},g=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},v=g("string"),b=g("array"),y=g("boolean"),k=g("function"),E=g("number"),T=void 0===(o=Array.prototype.indexOf)?function(e,t){return B(e,t)}:function(e,t){return o.call(e,t)},N=function(e,t){return-1<T(e,t)},R=function(e,t){return L(e,t).isSome()},O=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},P=function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)},A=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n},D=function(e,t,n){return function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n,e)}(e,function(e){n=t(n,e)}),n},M=function(e,t,n){return P(e,function(e){n=t(n,e)}),n},I=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return S.some(o)}return S.none()},L=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n,e))return S.some(n);return S.none()},B=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},F=Array.prototype.push,j=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Array.prototype.isPrototypeOf(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);F.apply(t,e[n])}return t},H=function(e,t){var n=O(e,t);return j(n)},U=function(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n,e))return!1;return!0},z=Array.prototype.slice,W=function(e){var t=z.call(e,0);return t.reverse(),t},V=(k(Array.from)&&Array.from,Object.keys),q=function(e,t){for(var n=V(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i,e)}},$=function(e,r){return X(e,function(e,t,n){return{k:t,v:r(e,t,n)}})},X=function(r,o){var i={};return q(r,function(e,t){var n=o(e,t,r);i[n.k]=n.v}),i},Y=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return P(t,function(e,t){r[e]=C(n[t])}),r}},G=function(e){return e.slice(0).sort()},K=function(e,t){throw new Error("All required keys ("+G(e).join(", ")+") were not specified. Specified keys were: "+G(t).join(", ")+".")},J=function(e){throw new Error("Unsupported keys for object: "+G(e).join(", "))},Z=function(t,e){if(!b(e))throw new Error("The "+t+" fields must be an array. Was: "+e+".");P(e,function(e){if(!v(e))throw new Error("The value "+e+" in the "+t+" fields was not a string.")})},Q=function(e){var n=G(e);I(n,function(e,t){return t<n.length-1&&e===n[t+1]}).each(function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+n.join(", ")+"].")})},ee=function(o,i){var a=o.concat(i);if(0===a.length)throw new Error("You must specify at least one required or optional field.");return Z("required",o),Z("optional",i),Q(a),function(t){var n=V(t);U(o,function(e){return N(n,e)})||K(o,n);var e=A(n,function(e){return!N(a,e)});0<e.length&&J(e);var r={};return P(o,function(e){r[e]=C(t[e])}),P(i,function(e){r[e]=C(Object.prototype.hasOwnProperty.call(t,e)?S.some(t[e]):S.none())}),r}},te=Y("width","height"),ne=Y("rows","columns"),re=Y("row","column"),oe=Y("x","y"),ie=Y("element","rowspan","colspan"),ae=Y("element","rowspan","colspan","isNew"),se={dimensions:te,grid:ne,address:re,coords:oe,extended:Y("element","rowspan","colspan","row","column"),detail:ie,detailnew:ae,rowdata:Y("element","cells","section"),elementnew:Y("element","isNew"),rowdatanew:Y("element","cells","section","isNew"),rowcells:Y("cells","section"),rowdetails:Y("details","section"),bounds:Y("startRow","startCol","finishRow","finishCol")},le=function(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:C(e)}},ue={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw"HTML must have a single root node";return le(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return le(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return le(n)},fromDom:le,fromPoint:function(e,t,n){var r=e.dom();return S.from(r.elementFromPoint(t,n)).map(le)}},ce={ATTRIBUTE:Node.ATTRIBUTE_NODE,CDATA_SECTION:Node.CDATA_SECTION_NODE,COMMENT:Node.COMMENT_NODE,DOCUMENT:Node.DOCUMENT_NODE,DOCUMENT_TYPE:Node.DOCUMENT_TYPE_NODE,DOCUMENT_FRAGMENT:Node.DOCUMENT_FRAGMENT_NODE,ELEMENT:Node.ELEMENT_NODE,TEXT:Node.TEXT_NODE,PROCESSING_INSTRUCTION:Node.PROCESSING_INSTRUCTION_NODE,ENTITY_REFERENCE:Node.ENTITY_REFERENCE_NODE,ENTITY:Node.ENTITY_NODE,NOTATION:Node.NOTATION_NODE},fe=ce.ELEMENT,de=ce.DOCUMENT,pe=function(e){return e.nodeType!==fe&&e.nodeType!==de||0===e.childElementCount},me={all:function(e,t){var n=void 0===t?document:t.dom();return pe(n)?[]:O(n.querySelectorAll(e),ue.fromDom)},is:function(e,t){var n=e.dom();if(n.nodeType!==fe)return!1;if(void 0!==n.matches)return n.matches(t);if(void 0!==n.msMatchesSelector)return n.msMatchesSelector(t);if(void 0!==n.webkitMatchesSelector)return n.webkitMatchesSelector(t);if(void 0!==n.mozMatchesSelector)return n.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},one:function(e,t){var n=void 0===t?document:t.dom();return pe(n)?S.none():S.from(n.querySelector(e)).map(ue.fromDom)}},he=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},ge="undefined"!=typeof window?window:Function("return this;")(),ve=function(e,t){return function(e,t){for(var n=null!=t?t:ge,r=0;r<e.length&&null!=n;++r)n=n[e[r]];return n}(e.split("."),t)},be=function(e,t){var n=ve(e,t);if(null==n)throw e+" not available on this browser";return n},ye=function(){return be("Node")},we=function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)},xe=function(e,t){return we(e,t,ye().DOCUMENT_POSITION_CONTAINED_BY)},Ce=function(n){var r,o=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o||(o=!0,r=n.apply(null,e)),r}},_e=function(){return Se(0,0)},Se=function(e,t){return{major:e,minor:t}},ke={nu:Se,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?_e():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return Se(r(1),r(2))}(e,n)},unknown:_e},Ee=function(e,t){return function(){return t===e}},Te=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Ee("Edge",t),isChrome:Ee("Chrome",t),isIE:Ee("IE",t),isOpera:Ee("Opera",t),isFirefox:Ee("Firefox",t),isSafari:Ee("Safari",t)}},Ne={unknown:function(){return Te({current:void 0,version:ke.unknown()})},nu:Te,edge:C("Edge"),chrome:C("Chrome"),ie:C("IE"),opera:C("Opera"),firefox:C("Firefox"),safari:C("Safari")},Re=function(e,t){return function(){return t===e}},Oe=function(e){var t=e.current;return{current:t,version:e.version,isWindows:Re("Windows",t),isiOS:Re("iOS",t),isAndroid:Re("Android",t),isOSX:Re("OSX",t),isLinux:Re("Linux",t),isSolaris:Re("Solaris",t),isFreeBSD:Re("FreeBSD",t)}},Pe={unknown:function(){return Oe({current:void 0,version:ke.unknown()})},nu:Oe,windows:C("Windows"),ios:C("iOS"),android:C("Android"),linux:C("Linux"),osx:C("OSX"),solaris:C("Solaris"),freebsd:C("FreeBSD")},Ae=function(e,t){var n=String(t).toLowerCase();return I(e,function(e){return e.search(n)})},De=function(e,n){return Ae(e,n).map(function(e){var t=ke.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Me=function(e,n){return Ae(e,n).map(function(e){var t=ke.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Ie=function(e,t){return-1!==e.indexOf(t)},Le=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Be=function(t){return function(e){return Ie(e,t)}},Fe=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Ie(e,"edge/")&&Ie(e,"chrome")&&Ie(e,"safari")&&Ie(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Le],search:function(e){return Ie(e,"chrome")&&!Ie(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Ie(e,"msie")||Ie(e,"trident")}},{name:"Opera",versionRegexes:[Le,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Be("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Be("firefox")},{name:"Safari",versionRegexes:[Le,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Ie(e,"safari")||Ie(e,"mobile/"))&&Ie(e,"applewebkit")}}],je=[{name:"Windows",search:Be("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Ie(e,"iphone")||Ie(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Be("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Be("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Be("linux"),versionRegexes:[]},{name:"Solaris",search:Be("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Be("freebsd"),versionRegexes:[]}],He={browsers:C(Fe),oses:C(je)},Ue=function(e){var t,n,r,o,i,a,s,l,u,c,f,d=He.browsers(),p=He.oses(),m=De(d,e).fold(Ne.unknown,Ne.nu),h=Me(p,e).fold(Pe.unknown,Pe.nu);return{browser:m,os:h,deviceType:(n=m,r=e,o=(t=h).isiOS()&&!0===/ipad/i.test(r),i=t.isiOS()&&!o,a=t.isAndroid()&&3===t.version.major,s=t.isAndroid()&&4===t.version.major,l=o||a||s&&!0===/mobile/i.test(r),u=t.isiOS()||t.isAndroid(),c=u&&!l,f=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(r),{isiPad:C(o),isiPhone:C(i),isTablet:C(l),isPhone:C(c),isTouch:C(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:C(f)})}},ze={detect:Ce(function(){var e=navigator.userAgent;return Ue(e)})},We=function(e,t){return e.dom()===t.dom()},Ve=ze.detect().browser.isIE()?function(e,t){return xe(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},qe={eq:We,isEqualNode:function(e,t){return e.dom().isEqualNode(t.dom())},member:function(e,t){return R(t,_(We,e))},contains:Ve,is:me.is},$e=function(e){var t=e.dom();return S.from(t.parentNode).map(ue.fromDom)},Xe=function(e){var t=e.dom();return S.from(t.previousSibling).map(ue.fromDom)},Ye=function(e){var t=e.dom();return S.from(t.nextSibling).map(ue.fromDom)},Ge=function(e){var t=e.dom();return O(t.childNodes,ue.fromDom)},Ke=function(e,t){var n=e.dom().childNodes;return S.from(n[t]).map(ue.fromDom)},Je=Y("element","offset"),Ze={owner:function(e){return ue.fromDom(e.dom().ownerDocument)},defaultView:function(e){var t=e.dom().ownerDocument.defaultView;return ue.fromDom(t)},documentElement:function(e){return ue.fromDom(e.dom().ownerDocument.documentElement)},parent:$e,findIndex:function(n){return $e(n).bind(function(e){var t=Ge(e);return L(t,function(e){return qe.eq(n,e)})})},parents:function(e,t){for(var n=k(t)?t:C(!1),r=e.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=ue.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o},siblings:function(t){return $e(t).map(Ge).map(function(e){return A(e,function(e){return!qe.eq(t,e)})}).getOr([])},prevSibling:Xe,offsetParent:function(e){var t=e.dom();return S.from(t.offsetParent).map(ue.fromDom)},prevSiblings:function(e){return W(he(e,Xe))},nextSibling:Ye,nextSiblings:function(e){return he(e,Ye)},children:Ge,child:Ke,firstChild:function(e){return Ke(e,0)},lastChild:function(e){return Ke(e,e.dom().childNodes.length-1)},childNodesCount:function(e){return e.dom().childNodes.length},hasChildNodes:function(e){return e.dom().hasChildNodes()},leaf:function(e,t){var n=Ge(e);return 0<n.length&&t<n.length?Je(n[t],0):Je(e,t)}},Qe=function(e,t,n){return H(Ze.children(e),function(e){return me.is(e,t)?n(e)?[e]:[]:Qe(e,t,n)})},et={firstLayer:function(e,t){return Qe(e,t,C(!0))},filterFirstLayer:Qe},tt=function(e){return e.dom().nodeName.toLowerCase()},nt=function(e){return e.dom().nodeType},rt=function(t){return function(e){return nt(e)===t}},ot=rt(ce.ELEMENT),it=rt(ce.TEXT),at=rt(ce.DOCUMENT),st={name:tt,type:nt,value:function(e){return e.dom().nodeValue},isElement:ot,isText:it,isDocument:at,isComment:function(e){return nt(e)===ce.COMMENT||"#comment"===tt(e)}},lt=function(e,t,n){if(!(v(n)||y(n)||E(n)))throw new Error("Attribute value was not simple");e.setAttribute(t,n+"")},ut=function(e,t,n){lt(e.dom(),t,n)},ct=function(e,t){var n=e.dom().getAttribute(t);return null===n?void 0:n},ft=function(e,t){var n=e.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},dt={clone:function(e){return M(e.dom().attributes,function(e,t){return e[t.name]=t.value,e},{})},set:ut,setAll:function(e,t){var n=e.dom();q(t,function(e,t){lt(n,t,e)})},get:ct,has:ft,remove:function(e,t){e.dom().removeAttribute(t)},hasNone:function(e){var t=e.dom().attributes;return null==t||0===t.length},transfer:function(o,i,e){st.isElement(o)&&st.isElement(i)&&P(e,function(e){var t,n,r;n=i,ft(t=o,r=e)&&!ft(n,r)&&ut(n,r,ct(t,r))})}},pt=Ce(function(){return mt(ue.fromDom(document))}),mt=function(e){var t=e.dom().body;if(null==t)throw"Body is not available yet";return ue.fromDom(t)},ht={body:pt,getBody:mt,inBody:function(e){var t=st.isText(e)?e.dom().parentNode:e.dom();return null!=t&&t.ownerDocument.body.contains(t)}},gt=function(e,t){var n=[];return P(Ze.children(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(gt(e,t))}),n},vt={all:function(e){return gt(ht.body(),e)},ancestors:function(e,t,n){return A(Ze.parents(e,n),t)},siblings:function(e,t){return A(Ze.siblings(e),t)},children:function(e,t){return A(Ze.children(e),t)},descendants:gt},bt={all:function(e){return me.all(e)},ancestors:function(e,t,n){return vt.ancestors(e,function(e){return me.is(e,t)},n)},siblings:function(e,t){return vt.siblings(e,function(e){return me.is(e,t)})},children:function(e,t){return vt.children(e,function(e){return me.is(e,t)})},descendants:function(e,t){return me.all(t,e)}};function yt(e,t,n,r,o){return e(n,r)?S.some(n):k(o)&&o(n)?S.none():t(n,r,o)}var wt,xt,Ct,_t,St,kt=function(e,t,n){for(var r=e.dom(),o=k(n)?n:C(!1);r.parentNode;){r=r.parentNode;var i=ue.fromDom(r);if(t(i))return S.some(i);if(o(i))break}return S.none()},Et=function(e,t){return I(e.dom().childNodes,x(t,ue.fromDom)).map(ue.fromDom)},Tt=function(e,r){var o=function(e){for(var t=0;t<e.childNodes.length;t++){if(r(ue.fromDom(e.childNodes[t])))return S.some(ue.fromDom(e.childNodes[t]));var n=o(e.childNodes[t]);if(n.isSome())return n}return S.none()};return o(e.dom())},Nt={first:function(e){return Tt(ht.body(),e)},ancestor:kt,closest:function(e,t,n){return yt(function(e){return t(e)},kt,e,t,n)},sibling:function(t,n){var e=t.dom();return e.parentNode?Et(ue.fromDom(e.parentNode),function(e){return!qe.eq(t,e)&&n(e)}):S.none()},child:Et,descendant:Tt},Rt=function(e,t,n){return Nt.ancestor(e,function(e){return me.is(e,t)},n)},Ot={first:function(e){return me.one(e)},ancestor:Rt,sibling:function(e,t){return Nt.sibling(e,function(e){return me.is(e,t)})},child:function(e,t){return Nt.child(e,function(e){return me.is(e,t)})},descendant:function(e,t){return me.one(t,e)},closest:function(e,t,n){return yt(me.is,Rt,e,t,n)}},Pt=function(e,t,n){var r=void 0!==n?n:C(!1);return r(t)?S.none():N(e,st.name(t))?S.some(t):Ot.ancestor(t,e.join(","),function(e){return me.is(e,"table")||r(e)})},At=function(t,e){return Ze.parent(e).map(function(e){return bt.children(e,t)})},Dt=_(At,"th,td"),Mt=_(At,"tr"),It=function(e,t){return parseInt(dt.get(e,t),10)},Lt={cell:function(e,t){return Pt(["td","th"],e,t)},firstCell:function(e){return Ot.descendant(e,"th,td")},cells:function(e){return et.firstLayer(e,"th,td")},neighbourCells:Dt,table:function(e,t){return Ot.closest(e,"table",t)},row:function(e,t){return Pt(["tr"],e,t)},rows:function(e){return et.firstLayer(e,"tr")},notCell:function(e,t){return Pt(["caption","tr","tbody","tfoot","thead"],e,t)},neighbourRows:Mt,attr:It,grid:function(e,t,n){var r=It(e,t),o=It(e,n);return se.grid(r,o)}},Bt=function(e){var t=Lt.rows(e);return O(t,function(e){var t=e,n=Ze.parent(t).map(function(e){var t=st.name(e);return"tfoot"===t||"thead"===t||"tbody"===t?t:"tbody"}).getOr("tbody"),r=O(Lt.cells(e),function(e){var t=dt.has(e,"rowspan")?parseInt(dt.get(e,"rowspan"),10):1,n=dt.has(e,"colspan")?parseInt(dt.get(e,"colspan"),10):1;return se.detail(e,t,n)});return se.rowdata(t,r,n)})},Ft=function(e,n){return O(e,function(e){var t=O(Lt.cells(e),function(e){var t=dt.has(e,"rowspan")?parseInt(dt.get(e,"rowspan"),10):1,n=dt.has(e,"colspan")?parseInt(dt.get(e,"colspan"),10):1;return se.detail(e,t,n)});return se.rowdata(e,t,n.section())})},jt=function(e,t){return e+","+t},Ht=function(e,t){var n=H(e.all(),function(e){return e.cells()});return A(n,t)},Ut={generate:function(e){var c={},t=[],n=e.length,f=0;P(e,function(e,l){var u=[];P(e.cells(),function(e,t){for(var n=0;void 0!==c[jt(l,n)];)n++;for(var r=se.extended(e.element(),e.rowspan(),e.colspan(),l,n),o=0;o<e.colspan();o++)for(var i=0;i<e.rowspan();i++){var a=n+o,s=jt(l+i,a);c[s]=r,f=Math.max(f,a+1)}u.push(r)}),t.push(se.rowdata(e.element(),u,e.section()))});var r=se.grid(n,f);return{grid:C(r),access:C(c),all:C(t)}},getAt:function(e,t,n){var r=e.access()[jt(t,n)];return void 0!==r?S.some(r):S.none()},findItem:function(e,t,n){var r=Ht(e,function(e){return n(t,e.element())});return 0<r.length?S.some(r[0]):S.none()},filterItems:Ht,justCells:function(e){var t=O(e.all(),function(e){return e.cells()});return j(t)}},zt=function(e){return void 0!==e.style},Wt=function(e,t,n){if(!v(n))throw new Error("CSS value must be a string: "+n);zt(e)&&e.style.setProperty(t,n)},Vt=function(e,t){zt(e)&&e.style.removeProperty(t)},qt=function(e,t,n){var r=e.dom();Wt(r,t,n)},$t=function(e,t){return zt(e)?e.style.getPropertyValue(t):""},Xt=function(e,t){var n=e.dom(),r=$t(n,t);return S.from(r).filter(function(e){return 0<e.length})},Yt={copy:function(e,t){var n=e.dom(),r=t.dom();zt(n)&&zt(r)&&(r.style.cssText=n.style.cssText)},set:qt,preserve:function(e,t){var n=dt.get(e,"style"),r=t(e);return(void 0===n?dt.remove:dt.set)(e,"style",n),r},setAll:function(e,t){var n=e.dom();q(t,function(e,t){Wt(n,t,e)})},setOptions:function(e,t){var n=e.dom();q(t,function(e,t){e.fold(function(){Vt(n,t)},function(e){Wt(n,t,e)})})},remove:function(e,t){var n=e.dom();Vt(n,t),dt.has(e,"style")&&""===dt.get(e,"style").replace(/^\s+|\s+$/g,"")&&dt.remove(e,"style")},get:function(e,t){var n=e.dom(),r=window.getComputedStyle(n).getPropertyValue(t),o=""!==r||ht.inBody(e)?r:$t(n,t);return null===o?void 0:o},getRaw:Xt,getAllRaw:function(e){var t={},n=e.dom();if(zt(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t},isValidValue:function(e,t,n){var r=ue.fromTag(e);return qt(r,t,n),Xt(r,t).isSome()},reflow:function(e){return e.dom().offsetWidth},transfer:function(r,o,e){st.isElement(r)&&st.isElement(o)&&P(e,function(e){var t,n;t=o,Xt(r,n=e).each(function(e){Xt(t,n).isNone()&&qt(t,n,e)})})}},Gt=function(t,n){Ze.parent(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},Kt=function(e,t){e.dom().appendChild(t.dom())},Jt={before:Gt,after:function(e,t){Ze.nextSibling(e).fold(function(){Ze.parent(e).each(function(e){Kt(e,t)})},function(e){Gt(e,t)})},prepend:function(t,n){Ze.firstChild(t).fold(function(){Kt(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})},append:Kt,appendAt:function(e,t,n){Ze.child(e,n).fold(function(){Kt(e,t)},function(e){Gt(e,t)})},wrap:function(e,t){Gt(e,t),Kt(t,e)}},Zt={before:function(t,e){P(e,function(e){Jt.before(t,e)})},after:function(r,o){P(o,function(e,t){var n=0===t?r:o[t-1];Jt.after(n,e)})},prepend:function(t,e){P(e.slice().reverse(),function(e){Jt.prepend(t,e)})},append:function(t,e){P(e,function(e){Jt.append(t,e)})}},Qt=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},en={empty:function(e){e.dom().textContent="",P(Ze.children(e),function(e){Qt(e)})},remove:Qt,unwrap:function(e){var t=Ze.children(e);0<t.length&&Zt.before(e,t),Qt(e)}},tn=Y("minRow","minCol","maxRow","maxCol"),nn=function(e,t){var n,i,r,a,s,l,u,o,c,f,d=function(e){return me.is(e.element(),t)},p=Bt(e),m=Ut.generate(p),h=(i=d,r=(n=m).grid().columns(),a=n.grid().rows(),s=r,u=l=0,q(n.access(),function(e){if(i(e)){var t=e.row(),n=t+e.rowspan()-1,r=e.column(),o=r+e.colspan()-1;t<a?a=t:l<n&&(l=n),r<s?s=r:u<o&&(u=o)}}),tn(a,s,l,u)),g="th:not("+t+"),td:not("+t+")",v=et.filterFirstLayer(e,"th,td",function(e){return me.is(e,g)});return P(v,en.remove),function(e,t,n,r){for(var o,i,a,s=t.grid().columns(),l=t.grid().rows(),u=0;u<l;u++)for(var c=!1,f=0;f<s;f++)u<n.minRow()||u>n.maxRow()||f<n.minCol()||f>n.maxCol()||(Ut.getAt(t,u,f).filter(r).isNone()?(o=c,i=e[u].element(),a=ue.fromTag("td"),Jt.append(a,ue.fromTag("br")),(o?Jt.append:Jt.prepend)(i,a)):c=!0)}(p,m,h,d),o=e,c=h,f=A(et.firstLayer(o,"tr"),function(e){return 0===e.dom().childElementCount}),P(f,en.remove),c.minCol()!==c.maxCol()&&c.minRow()!==c.maxRow()||P(et.firstLayer(o,"th,td"),function(e){dt.remove(e,"rowspan"),dt.remove(e,"colspan")}),dt.remove(o,"width"),dt.remove(o,"height"),Yt.remove(o,"width"),Yt.remove(o,"height"),e},rn=function(e,t){return ue.fromDom(e.dom().cloneNode(t))},on=function(e){return rn(e,!0)},an=function(e,t){var n=ue.fromTag(t),r=dt.clone(e);return dt.setAll(n,r),n},sn=function(e){return rn(e,!1)},ln=on,un=function(e,t){var n=an(e,t),r=Ze.children(on(e));return Zt.append(n,r),n},cn=(wt=st.isText,xt="text",Ct=function(e){return wt(e)?S.from(e.dom().nodeValue):S.none()},_t=ze.detect().browser,{get:function(e){if(!wt(e))throw new Error("Can only get "+xt+" value of a "+xt+" node");return St(e).getOr("")},getOption:St=_t.isIE()&&10===_t.version.major?function(e){try{return Ct(e)}catch(e){return S.none()}}:Ct,set:function(e,t){if(!wt(e))throw new Error("Can only set raw "+xt+" value of a "+xt+" node");e.dom().nodeValue=t}}),fn={get:function(e){return cn.get(e)},getOption:function(e){return cn.getOption(e)},set:function(e,t){cn.set(e,t)}},dn=function(e){return"img"===st.name(e)?1:fn.getOption(e).fold(function(){return Ze.children(e).length},function(e){return e.length})},pn=["img","br"],mn=dn,hn=function(e){return fn.getOption(e).filter(function(e){return 0!==e.trim().length||-1<e.indexOf(" ")}).isSome()||N(pn,st.name(e))},gn=function(e,i){var a=function(e){for(var t=Ze.children(e),n=t.length-1;0<=n;n--){var r=t[n];if(i(r))return S.some(r);var o=a(r);if(o.isSome())return o}return S.none()};return a(e)},vn={first:function(e){return Nt.descendant(e,hn)},last:function(e){return gn(e,hn)}},bn=function(){var e=ue.fromTag("td");return Jt.append(e,ue.fromTag("br")),e},yn=function(e,t,n){var r=un(e,t);return q(n,function(e,t){null===e?dt.remove(r,t):dt.set(r,t,e)}),r},wn=function(e){return e},xn=function(e){return function(){return ue.fromTag("tr",e.dom())}},Cn=function(l,e,u){return{row:xn(e),cell:function(e){var r,o,i,t=Ze.owner(e.element()),n=ue.fromTag(st.name(e.element()),t.dom()),a=u.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),s=0<a.length?(r=e.element(),o=n,i=a,vn.first(r).map(function(e){var t=i.join(","),n=bt.ancestors(e,t,function(e){return qe.eq(e,r)});return D(n,function(e,t){var n=sn(t);return dt.remove(n,"contenteditable"),Jt.append(e,n),n},o)}).getOr(o)):n;return Jt.append(s,ue.fromTag("br")),Yt.copy(e.element(),n),Yt.remove(n,"height"),1!==e.colspan()&&Yt.remove(e.element(),"width"),l(e.element(),n),n},replace:yn,gap:bn}},_n=function(e){return{row:xn(e),cell:bn,replace:wn,gap:bn}},Sn=function(e,t){var n=(t||document).createElement("div");return n.innerHTML=e,Ze.children(ue.fromDom(n))},kn=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function En(){return{up:C({selector:Ot.ancestor,closest:Ot.closest,predicate:Nt.ancestor,all:Ze.parents}),down:C({selector:bt.descendants,predicate:vt.descendants}),styles:C({get:Yt.get,getRaw:Yt.getRaw,set:Yt.set,remove:Yt.remove}),attrs:C({get:dt.get,set:dt.set,remove:dt.remove,copyTo:function(e,t){var n=dt.clone(e);dt.setAll(t,n)}}),insert:C({before:Jt.before,after:Jt.after,afterAll:Zt.after,append:Jt.append,appendAll:Zt.append,prepend:Jt.prepend,wrap:Jt.wrap}),remove:C({unwrap:en.unwrap,remove:en.remove}),create:C({nu:ue.fromTag,clone:function(e){return ue.fromDom(e.dom().cloneNode(!1))},text:ue.fromText}),query:C({comparePosition:function(e,t){return e.dom().compareDocumentPosition(t.dom())},prevSibling:Ze.prevSibling,nextSibling:Ze.nextSibling}),property:C({children:Ze.children,name:st.name,parent:Ze.parent,isText:st.isText,isComment:st.isComment,isElement:st.isElement,getText:fn.get,setText:fn.set,isBoundary:function(e){return!!st.isElement(e)&&("body"===st.name(e)||N(kn,st.name(e)))},isEmptyTag:function(e){return!!st.isElement(e)&&N(["br","img","hr","input"],st.name(e))}}),eq:qe.eq,is:qe.is}}var Tn=Y("left","right"),Nn=function(e,t,n){var r=e.property().children(t);return L(r,_(e.eq,n)).map(function(e){return{before:C(r.slice(0,e)),after:C(r.slice(e+1))}})},Rn=function(n,r,o){return Nn(n,r,o).map(function(e){var t=n.create().clone(r);return n.insert().appendAll(t,e.before().concat([o])),n.insert().appendAll(r,e.after()),n.insert().before(r,t),Tn(t,r)})},On=function(n,r,e){return Nn(n,r,e).map(function(e){var t=n.create().clone(r);return n.insert().appendAll(t,e.after()),n.insert().after(r,t),Tn(r,t)})},Pn=function(i,e,a,s){var r=Y("first","second","splits"),l=function(e,t,o){var n=r(e,S.none(),o);return a(e)?r(e,t,o):i.property().parent(e).bind(function(r){return s(i,r,e).map(function(e){var t=[{first:e.left,second:e.right}],n=a(r)?r:e.left();return l(n,S.some(e.right()),o.concat(t))}).getOr(n)})};return l(e,S.none(),[])},An=function(r,o,e,t){var n=o(r,e);return D(t,function(e,t){var n=o(r,t);return Dn(r,e,n)},n)},Dn=function(t,e,n){return e.bind(function(e){return n.filter(_(t.eq,e))})},Mn=function(e,t,n){return 0<n.length?An(e,t,(r=n)[0],r.slice(1)):S.none();var r},In=function(e,t){return _(e.eq,t)},Ln=function(t,e,n,r){var o=void 0!==r?r:C(!1),i=[e].concat(t.up().all(e)),a=[n].concat(t.up().all(n)),s=function(t){return L(t,o).fold(function(){return t},function(e){return t.slice(0,e+1)})},l=s(i),u=s(a),c=I(l,function(e){return R(u,In(t,e))});return{firstpath:C(l),secondpath:C(u),shared:C(c)}},Bn=function(t,e,n){var r=Ln(t,e,n);return r.shared().bind(function(e){return function(o,i,e,t){var a=o.property().children(i);if(o.eq(i,e[0]))return S.some([e[0]]);if(o.eq(i,t[0]))return S.some([t[0]]);var n=function(e){var t=W(e),n=L(t,In(o,i)).getOr(-1),r=n<t.length-1?t[n+1]:t[n];return L(a,In(o,r))},r=n(e),s=n(t);return r.bind(function(r){return s.map(function(e){var t=Math.min(r,e),n=Math.max(r,e);return a.slice(t,n+1)})})}(t,e,r.firstpath(),r.secondpath())})},Fn=Ln,jn=function(e,t,n){return Mn(e,t,n)},Hn=function(e,t,n){return Bn(e,t,n)},Un=function(e,t,n,r){return Fn(e,t,n,r)},zn=function(e,t,n){return Rn(e,t,n)},Wn=function(e,t,n){return On(e,t,n)},Vn=function(e,t,n,r){return Pn(e,t,n,r)},qn=En(),$n={sharedOne:function(n,e){return jn(qn,function(e,t){return n(t)},e)},subset:function(e,t){return Hn(qn,e,t)},ancestors:function(e,t,n){return Un(qn,e,t,n)},breakToLeft:function(e,t){return zn(qn,e,t)},breakToRight:function(e,t){return Wn(qn,e,t)},breakPath:function(e,t,r){return Vn(qn,e,t,function(e,t,n){return r(t,n)})}},Xn=function(e,t){return t.column()>=e.startCol()&&t.column()+t.colspan()-1<=e.finishCol()&&t.row()>=e.startRow()&&t.row()+t.rowspan()-1<=e.finishRow()},Yn=function(e,t){var n=t.column(),r=t.column()+t.colspan()-1,o=t.row(),i=t.row()+t.rowspan()-1;return n<=e.finishCol()&&r>=e.startCol()&&o<=e.finishRow()&&i>=e.startRow()},Gn=function(e,t){for(var n=!0,r=_(Xn,t),o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)n=n&&Ut.getAt(e,o,i).exists(r);return n?S.some(t):S.none()},Kn=function(e,t,n){var r=Ut.findItem(e,t,qe.eq),o=Ut.findItem(e,n,qe.eq);return r.bind(function(r){return o.map(function(e){return t=r,n=e,se.bounds(Math.min(t.row(),n.row()),Math.min(t.column(),n.column()),Math.max(t.row()+t.rowspan()-1,n.row()+n.rowspan()-1),Math.max(t.column()+t.colspan()-1,n.column()+n.colspan()-1));var t,n})})},Jn=Kn,Zn=function(t,e,n){return Kn(t,e,n).bind(function(e){return Gn(t,e)})},Qn=function(r,e,o,i){return Ut.findItem(r,e,qe.eq).bind(function(e){var t=0<o?e.row()+e.rowspan()-1:e.row(),n=0<i?e.column()+e.colspan()-1:e.column();return Ut.getAt(r,t+o,n+i).map(function(e){return e.element()})})},er=function(n,e,t){return Jn(n,e,t).map(function(e){var t=Ut.filterItems(n,_(Yn,e));return O(t,function(e){return e.element()})})},tr=function(e,t){return Ut.findItem(e,t,function(e,t){return qe.contains(t,e)}).bind(function(e){return e.element()})},nr=function(e){var t=Bt(e);return Ut.generate(t)},rr=function(n,r,o){return Lt.table(n).bind(function(e){var t=nr(e);return Qn(t,n,r,o)})},or=function(e,t,n){var r=nr(e);return er(r,t,n)},ir=function(e,t,n,r,o){var i=nr(e),a=qe.eq(e,n)?t:tr(i,t),s=qe.eq(e,o)?r:tr(i,r);return er(i,a,s)},ar=function(e,t,n){var r=nr(e);return Zn(r,t,n)},sr=function(e,t){return Ot.ancestor(e,"table")},lr=ee(["boxes","start","finish"],[]),ur=function(s,l,r){var u=function(t){return function(e){return r(e)||qe.eq(e,t)}};return qe.eq(s,l)?S.some(lr({boxes:S.some([s]),start:s,finish:l})):sr(s).bind(function(a){return sr(l).bind(function(i){if(qe.eq(a,i))return S.some(lr({boxes:or(a,s,l),start:s,finish:l}));if(qe.contains(a,i)){var e=0<(t=bt.ancestors(l,"td,th",u(a))).length?t[t.length-1]:l;return S.some(lr({boxes:ir(a,s,a,l,i),start:s,finish:e}))}if(qe.contains(i,a)){var t,n=0<(t=bt.ancestors(s,"td,th",u(i))).length?t[t.length-1]:s;return S.some(lr({boxes:ir(i,s,a,l,i),start:s,finish:n}))}return $n.ancestors(s,l).shared().bind(function(e){return Ot.closest(e,"table",r).bind(function(e){var t=bt.ancestors(l,"td,th",u(e)),n=0<t.length?t[t.length-1]:l,r=bt.ancestors(s,"td,th",u(e)),o=0<r.length?r[r.length-1]:s;return S.some(lr({boxes:ir(e,s,a,l,i),start:o,finish:n}))})})})})},cr=ur,fr=function(e,t){var n=bt.descendants(e,t);return 0<n.length?S.some(n):S.none()},dr=function(e,t,n,r,o){return(i=e,a=o,I(i,function(e){return me.is(e,a)})).bind(function(e){return rr(e,t,n).bind(function(e){return t=e,n=r,Ot.ancestor(t,"table").bind(function(e){return Ot.descendant(e,n).bind(function(e){return ur(e,t).bind(function(t){return t.boxes().map(function(e){return{boxes:C(e),start:C(t.start()),finish:C(t.finish())}})})})});var t,n})});var i,a},pr=function(e,t,r){return Ot.descendant(e,t).bind(function(n){return Ot.descendant(e,r).bind(function(t){return $n.sharedOne(sr,[n,t]).map(function(e){return{first:C(n),last:C(t),table:C(e)}})})})},mr=function(e,t){return fr(e,t)},hr=function(o,e,t){return pr(o,e,t).bind(function(n){var e=function(e){return qe.eq(o,e)},t=Ot.ancestor(n.first(),"thead,tfoot,tbody,table",e),r=Ot.ancestor(n.last(),"thead,tfoot,tbody,table",e);return t.bind(function(t){return r.bind(function(e){return qe.eq(t,e)?ar(n.table(),n.first(),n.last()):S.none()})})})},gr="data-mce-selected",vr="data-mce-first-selected",br="data-mce-last-selected",yr={selected:C(gr),selectedSelector:C("td[data-mce-selected],th[data-mce-selected]"),attributeSelector:C("[data-mce-selected]"),firstSelected:C(vr),firstSelectedSelector:C("td[data-mce-first-selected],th[data-mce-first-selected]"),lastSelected:C(br),lastSelectedSelector:C("td[data-mce-last-selected],th[data-mce-last-selected]")},wr=function(a){if(!b(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var s=[],n={};return P(a,function(e,r){var t=V(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(void 0!==n[o])throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!b(i))throw new Error("case arguments must be an array");s.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t<n.length;t++)n[t]=arguments[t];return{fold:function(){if(arguments.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+arguments.length);return arguments[r].apply(null,n)},match:function(e){var t=V(e);if(s.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+s.join(",")+"\nActual: "+t.join(","));if(!U(s,function(e){return N(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+s.join(", "));return e[o].apply(null,n)},log:function(e){}}}}),n},xr=wr([{none:[]},{multiple:["elements"]},{single:["selection"]}]),Cr={cata:function(e,t,n,r){return e.fold(t,n,r)},none:xr.none,multiple:xr.multiple,single:xr.single},_r=function(e,t){return Cr.cata(t.get(),C([]),a,C([e]))},Sr=function(n,e){return Cr.cata(e.get(),S.none,function(t,e){return 0===t.length?S.none():hr(n,yr.firstSelectedSelector(),yr.lastSelectedSelector()).bind(function(e){return 1<t.length?S.some({bounds:C(e),cells:C(t)}):S.none()})},S.none)},kr=function(e,t){var n=_r(e,t);return 0<n.length&&U(n,function(e){return dt.has(e,"rowspan")&&1<parseInt(dt.get(e,"rowspan"),10)||dt.has(e,"colspan")&&1<parseInt(dt.get(e,"colspan"),10)})?S.some(n):S.none()},Er=_r,Tr=function(e){return{element:C(e),mergable:S.none,unmergable:S.none,selection:C([e])}},Nr=Y("element","clipboard","generators"),Rr={noMenu:Tr,forMenu:function(e,t,n){return{element:C(n),mergable:C(Sr(t,e)),unmergable:C(kr(n,e)),selection:C(Er(n,e))}},notCell:function(e){return Tr(e)},paste:Nr,pasteRows:function(e,t,n,r,o){return{element:C(n),mergable:S.none,unmergable:S.none,selection:C(Er(n,e)),clipboard:C(r),generators:C(o)}}},Or=function(s,e,l,u){s.on("BeforeGetContent",function(n){!0===n.selection&&Cr.cata(e.get(),w,function(e){var t;n.preventDefault(),(t=e,Lt.table(t[0]).map(ln).map(function(e){return[nn(e,yr.attributeSelector())]})).each(function(e){n.content=O(e,function(e){return t=e,s.selection.serializer.serialize(t.dom(),{});var t}).join("")})},w)}),s.on("BeforeSetContent",function(a){!0===a.selection&&!0===a.paste&&S.from(s.dom.getParent(s.selection.getStart(),"th,td")).each(function(e){var i=ue.fromDom(e);Lt.table(i).bind(function(t){var e=A(Sn(a.content),function(e){return"meta"!==st.name(e)});if(1===e.length&&"table"===st.name(e[0])){a.preventDefault();var n=ue.fromDom(s.getDoc()),r=_n(n),o=Rr.paste(i,e[0],r);l.pasteCells(t,o).each(function(e){s.selection.setRng(e),s.focus(),u.clear(t)})}})})})};function Pr(r,o){var e=function(e){var t=o(e);if(t<=0||null===t){var n=Yt.get(e,r);return parseFloat(n)||0}return t},i=function(o,e){return M(e,function(e,t){var n=Yt.get(o,t),r=void 0===n?0:parseInt(n,10);return isNaN(r)?e:e+r},0)};return{set:function(e,t){if(!E(t)&&!t.match(/^[0-9]+$/))throw r+".set accepts only positive integer values. Value was "+t;var n=e.dom();zt(n)&&(n.style[r]=t+"px")},get:e,getOuter:e,aggregate:i,max:function(e,t,n){var r=i(e,n);return r<t?t-r:0}}}var Ar=Pr("height",function(e){var t=e.dom();return ht.inBody(e)?t.getBoundingClientRect().height:t.offsetHeight}),Dr=function(e){return Ar.get(e)},Mr=function(e){return Ar.getOuter(e)},Ir=Pr("width",function(e){return e.dom().offsetWidth}),Lr=function(e){return Ir.get(e)},Br=function(e){return Ir.getOuter(e)},Fr=ze.detect(),jr=function(e,t,n){return r=Yt.get(e,t),o=n,i=parseFloat(r),isNaN(i)?o:i;var r,o,i},Hr=function(e){return Fr.browser.isIE()||Fr.browser.isEdge()?(n=jr(t=e,"padding-top",0),r=jr(t,"padding-bottom",0),o=jr(t,"border-top-width",0),i=jr(t,"border-bottom-width",0),a=t.dom().getBoundingClientRect().height,"border-box"===Yt.get(t,"box-sizing")?a:a-n-r-(o+i)):jr(e,"height",Dr(e));var t,n,r,o,i,a},Ur=/(\d+(\.\d+)?)(\w|%)*/,zr=/(\d+(\.\d+)?)%/,Wr=/(\d+(\.\d+)?)px|em/,Vr=function(e,t){Yt.set(e,"height",t+"px")},qr=function(e,t,n,r){var o,i,a,s,l,u,c,f,d,p=parseInt(e,10);return f=u="%",d=(c=e).length-u.length,""!==f&&(c.length<f.length||c.substr(d,d+f.length)!==f)||"table"===st.name(t)?p:(o=t,i=p,a=n,s=r,l=Lt.table(o).map(function(e){var t=a(e);return Math.floor(i/100*t)}).getOr(i),s(o,l),l)},$r=function(e){var t,n=(t=e,Yt.getRaw(t,"height").getOrThunk(function(){return Hr(t)+"px"}));return n?qr(n,e,Dr,Vr):Dr(e)},Xr=function(e,t){return dt.has(e,t)?parseInt(dt.get(e,t),10):1},Yr=function(e){return Yt.getRaw(e,"width").fold(function(){return S.from(dt.get(e,"width"))},function(e){return S.some(e)})},Gr=function(e,t){return e/t.pixelWidth()*100},Kr={percentageBasedSizeRegex:C(zr),pixelBasedSizeRegex:C(Wr),setPixelWidth:function(e,t){Yt.set(e,"width",t+"px")},setPercentageWidth:function(e,t){Yt.set(e,"width",t+"%")},setHeight:Vr,getPixelWidth:function(t,n){return Yr(t).fold(function(){return Lr(t)},function(e){return function(e,t,n){if(Wr.test(t)){var r=Wr.exec(t);return parseInt(r[1],10)}if(zr.test(t)){var o=zr.exec(t),i=parseFloat(o[1]);return i/100*n.pixelWidth()}return Lr(e)}(t,e,n)})},getPercentageWidth:function(t,n){return Yr(t).fold(function(){var e=Lr(t);return Gr(e,n)},function(e){return function(e,t,n){if(zr.test(t)){var r=zr.exec(t);return parseFloat(r[1])}var o=Lr(e);return Gr(o,n)}(t,e,n)})},getGenericWidth:function(e){return Yr(e).bind(function(e){if(Ur.test(e)){var t=Ur.exec(e);return S.some({width:C(t[1]),unit:C(t[3])})}return S.none()})},setGenericWidth:function(e,t,n){Yt.set(e,"width",t+n)},getHeight:function(e){return n="rowspan",$r(t=e)/Xr(t,n);var t,n},getRawWidth:Yr},Jr=function(n,r){Kr.getGenericWidth(n).each(function(e){var t=e.width()/2;Kr.setGenericWidth(n,t,e.unit()),Kr.setGenericWidth(r,t,e.unit())})},Zr=function(e,t){var n=t||ue.fromDom(document.documentElement);return Nt.ancestor(e,_(qe.eq,n)).isSome()},Qr=function(e){var t=e.dom();return t===t.window&&e instanceof Window?e:st.isDocument(e)?t.defaultView||t.parentWindow:null},eo=function(n,r){return{left:C(n),top:C(r),translate:function(e,t){return eo(n+e,r+t)}}},to=eo,no=function(e,t){return void 0!==e?e:void 0!==t?t:0},ro=function(e){var t,n=e.dom(),r=n.ownerDocument,o=r.body,i=ue.fromDom(r.documentElement);return o===n?to(o.offsetLeft,o.offsetTop):Zr(e,i)?(t=n.getBoundingClientRect(),to(t.left,t.top)):to(0,0)},oo=function(e){var t=e.dom().ownerDocument,n=t.body,r=Qr(ue.fromDom(t)),o=t.documentElement,i=no(r.pageYOffset,o.scrollTop),a=no(r.pageXOffset,o.scrollLeft),s=no(o.clientTop,n.clientTop),l=no(o.clientLeft,n.clientLeft);return ro(e).translate(a-l,i-s)},io=Y("row","y"),ao=Y("col","x"),so=function(e){return oo(e).left()+Br(e)},lo=function(e){return oo(e).left()},uo=function(e,t){return ao(e,lo(t))},co=function(e,t){return ao(e,so(t))},fo=function(e){return oo(e).top()},po=function(n,t,r){if(0===r.length)return[];var e=O(r.slice(1),function(e,t){return e.map(function(e){return n(t,e)})}),o=r[r.length-1].map(function(e){return t(r.length-1,e)});return e.concat([o])},mo={delta:a,positions:_(po,function(e,t){return io(e,fo(t))},function(e,t){return io(e,fo(t)+Mr(t))}),edge:fo},ho={delta:a,edge:lo,positions:_(po,uo,co)},go={height:mo,rtl:{delta:function(e,t){return-e},edge:so,positions:_(po,co,uo)},ltr:ho},vo={ltr:go.ltr,rtl:go.rtl};function bo(t){var n=function(e){return t(e).isRtl()?vo.rtl:vo.ltr};return{delta:function(e,t){return n(t).delta(e,t)},edge:function(e){return n(e).edge(e)},positions:function(e,t){return n(t).positions(e,t)}}}var yo,wo=function(e){var t=Bt(e);return Ut.generate(t).grid()},xo=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return xo(n())}}},Co=function(r,o,i){if(0===o.length)throw new Error("You must specify at least one required field.");return Z("required",o),Q(o),function(t){var n=V(t);U(o,function(e){return N(n,e)})||K(o,n),r(o,n);var e=A(o,function(e){return!i.validate(t[e],e)});return 0<e.length&&function(e,t){throw new Error("All values need to be of type: "+t+". Keys ("+G(e).join(", ")+") were not.")}(e,i.label),t}},_o=function(t,e){var n=A(e,function(e){return!N(t,e)});0<n.length&&J(n)},So=function(e){return Co(_o,e,{validate:k,label:"function"})},ko=function(e){var t=dt.has(e,"colspan")?parseInt(dt.get(e,"colspan"),10):1,n=dt.has(e,"rowspan")?parseInt(dt.get(e,"rowspan"),10):1;return{element:C(e),colspan:C(t),rowspan:C(n)}},Eo=So(["cell","row","replace","gap"]),To=function(r,e){Eo(r);var n=xo(S.none()),o=void 0!==e?e:ko,i=function(e){var t,n=o(e);return t=n,r.cell(t)},a=function(e){var t=i(e);return n.get().isNone()&&n.set(S.some(t)),s=S.some({item:e,replacement:t}),t},s=S.none();return{getOrInit:function(t,n){return s.fold(function(){return a(t)},function(e){return n(t,e.item)?e.replacement:a(t)})},cursor:n.get}},No=function(o,s){return function(n){var r=xo(S.none());Eo(n);var i=[],a=function(e){var t=n.replace(e,s,{scope:o});return i.push({item:e,sub:t}),r.get().isNone()&&r.set(S.some(t)),t};return{replaceOrInit:function(t,n){return(r=t,o=n,I(i,function(e){return o(e.item,r)})).fold(function(){return a(t)},function(e){return n(t,e.item)?e.sub:a(t)});var r,o},cursor:r.get}}},Ro=function(n){Eo(n);var e=xo(S.none());return{combine:function(t){return e.get().isNone()&&e.set(S.some(t)),function(){var e=n.cell({element:C(t),colspan:C(1),rowspan:C(1)});return Yt.remove(e,"width"),Yt.remove(t,"width"),e}},cursor:e.get}},Oo=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],Po=function(e,t){var n=e.property().name(t);return N(Oo,n)},Ao=function(e,t){return N(["br","img","hr","input"],e.property().name(t))},Do=Po,Mo=function(e,t){var n=e.property().name(t);return N(["ol","ul"],n)},Io=Ao,Lo=En(),Bo=function(e){return Do(Lo,e)},Fo=function(e){return Mo(Lo,e)},jo=function(e){return Io(Lo,e)},Ho=function(e){var t,i=function(e){return"br"===st.name(e)},n=function(o){return vn.last(o).bind(function(n){var e,r=(e=n,Ze.nextSibling(e).map(function(e){return!!Bo(e)||(jo(e)?"img"!==st.name(e):void 0)}).getOr(!1));return Ze.parent(n).map(function(e){return!0===r||(t=e,"li"===st.name(t)||Nt.ancestor(t,Fo).isSome())||i(n)||Bo(e)&&!qe.eq(o,e)?[]:[ue.fromTag("br")];var t})}).getOr([])},r=0===(t=H(e,function(e){var t=Ze.children(e);return U(t,function(e){return i(e)||st.isText(e)&&0===fn.get(e).trim().length})?[]:t.concat(n(e))})).length?[ue.fromTag("br")]:t;en.empty(e[0]),Zt.append(e[0],r)},Uo=Object.prototype.hasOwnProperty,zo=(yo=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)Uo.call(o,i)&&(n[i]=yo(n[i],o[i]))}return n}),Wo=function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t},Vo=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return S.none()},qo=function(e,t){return se.rowcells(t,e.section())},$o=function(e,t){return e.cells()[t]},Xo={addCell:function(e,t,n){var r=e.cells(),o=r.slice(0,t),i=r.slice(t),a=o.concat([n]).concat(i);return qo(e,a)},setCells:qo,mutateCell:function(e,t,n){e.cells()[t]=n},getCell:$o,getCellElement:function(e,t){return $o(e,t).element()},mapCells:function(e,t){var n=e.cells(),r=O(n,t);return se.rowcells(r,e.section())},cellLength:function(e){return e.cells().length}},Yo=function(e,t){if(0===e.length)return 0;var n=e[0];return L(e,function(e){return!t(n.element(),e.element())}).fold(function(){return e.length},function(e){return e})},Go=function(e,t,n,r){var o,i,a,s,l=(o=e,i=t,o[i]).cells().slice(n),u=Yo(l,r),c=(a=e,s=n,O(a,function(e){return Xo.getCell(e,s)})).slice(t),f=Yo(c,r);return{colspan:C(u),rowspan:C(f)}},Ko=function(o,i){var a=O(o,function(e,t){return O(e.cells(),function(e,t){return!1})});return O(o,function(e,r){var t=H(e.cells(),function(e,t){if(!1!==a[r][t])return[];var n=Go(o,r,t,i);return function(e,t,n,r){for(var o=e;o<e+n;o++)for(var i=t;i<t+r;i++)a[o][i]=!0}(r,t,n.rowspan(),n.colspan()),[se.detailnew(e.element(),n.rowspan(),n.colspan(),e.isNew())]});return se.rowdetails(t,e.section())})},Jo=function(e,t,n){for(var r=[],o=0;o<e.grid().rows();o++){for(var i=[],a=0;a<e.grid().columns();a++){var s=Ut.getAt(e,o,a).map(function(e){return se.elementnew(e.element(),n)}).getOrThunk(function(){return se.elementnew(t.gap(),!0)});i.push(s)}var l=se.rowcells(i,e.all()[o].section());r.push(l)}return r},Zo=function(e,t,n,r){n===r?dt.remove(e,t):dt.set(e,t,n)},Qo=function(o,e){var i=[],a=[],t=function(e,t){var n;0<e.length?function(e,t){var n=Ot.child(o,t).getOrThunk(function(){var e=ue.fromTag(t,Ze.owner(o).dom());return Jt.append(o,e),e});en.empty(n);var r=O(e,function(e){e.isNew()&&i.push(e.element());var t=e.element();return en.empty(t),P(e.cells(),function(e){e.isNew()&&a.push(e.element()),Zo(e.element(),"colspan",e.colspan(),1),Zo(e.element(),"rowspan",e.rowspan(),1),Jt.append(t,e.element())}),t});Zt.append(n,r)}(e,t):(n=t,Ot.child(o,n).each(en.remove))},n=[],r=[],s=[];return P(e,function(e){switch(e.section()){case"thead":n.push(e);break;case"tbody":r.push(e);break;case"tfoot":s.push(e)}}),t(n,"thead"),t(r,"tbody"),t(s,"tfoot"),{newRows:C(i),newCells:C(a)}},ei=function(e){return O(e,function(e){var n=sn(e.element());return P(e.cells(),function(e){var t=ln(e.element());Zo(t,"colspan",e.colspan(),1),Zo(t,"rowspan",e.rowspan(),1),Jt.append(n,t)}),n})},ti=function(e,t){for(var n=[],r=0;r<e;r++)n.push(t(r));return n},ni=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n},ri=function(t,n){if(n<0||n>=t.length-1)return S.none();var e=t[n].fold(function(){var e=W(t.slice(0,n));return Vo(e,function(e,t){return e.map(function(e){return{value:e,delta:t+1}})})},function(e){return S.some({value:e,delta:0})}),r=t[n+1].fold(function(){var e=t.slice(n+1);return Vo(e,function(e,t){return e.map(function(e){return{value:e,delta:t+1}})})},function(e){return S.some({value:e,delta:1})});return e.bind(function(n){return r.map(function(e){var t=e.delta+n.delta;return Math.abs(e.value-n.value)/t})})},oi=function(e,t,n){var r=e();return I(r,t).orThunk(function(){return S.from(r[0]).orThunk(n)}).map(function(e){return e.element()})},ii=function(n){var e=n.grid(),t=ni(0,e.columns()),r=ni(0,e.rows());return O(t,function(t){return oi(function(){return H(r,function(e){return Ut.getAt(n,e,t).filter(function(e){return e.column()===t}).fold(C([]),function(e){return[e]})})},function(e){return 1===e.colspan()},function(){return Ut.getAt(n,0,t)})})},ai=function(n){var e=n.grid(),t=ni(0,e.rows()),r=ni(0,e.columns());return O(t,function(t){return oi(function(){return H(r,function(e){return Ut.getAt(n,t,e).filter(function(e){return e.row()===t}).fold(C([]),function(e){return[e]})})},function(e){return 1===e.rowspan()},function(){return Ut.getAt(n,t,0)})})},si=function(e,t,n,r,o){var i=ue.fromTag("div");return Yt.setAll(i,{position:"absolute",left:t-r/2+"px",top:n+"px",height:o+"px",width:r+"px"}),dt.setAll(i,{"data-column":e,role:"presentation"}),i},li=function(e,t,n,r,o){var i=ue.fromTag("div");return Yt.setAll(i,{position:"absolute",left:t+"px",top:n-o/2+"px",height:o+"px",width:r+"px"}),dt.setAll(i,{"data-row":e,role:"presentation"}),i},ui=function(e){var t=e.replace(/\./g,"-");return{resolve:function(e){return t+"-"+e}}},ci={resolve:ui("ephox-snooker").resolve},fi=function(e,t){var n=dt.get(e,t);return void 0===n||""===n?[]:n.split(" ")},di=fi,pi=function(e,t,n){var r=fi(e,t).concat([n]);return dt.set(e,t,r.join(" ")),!0},mi=function(e,t,n){var r=A(fi(e,t),function(e){return e!==n});return 0<r.length?dt.set(e,t,r.join(" ")):dt.remove(e,t),!1},hi=function(e){return di(e,"class")},gi=function(e,t){return pi(e,"class",t)},vi=function(e,t){return mi(e,"class",t)},bi=hi,yi=gi,wi=vi,xi=function(e,t){return N(hi(e),t)?vi(e,t):gi(e,t)},Ci=function(e){return void 0!==e.dom().classList},_i=function(e,t){return Ci(e)&&e.dom().classList.contains(t)},Si={add:function(e,t){Ci(e)?e.dom().classList.add(t):yi(e,t)},remove:function(e,t){var n;Ci(e)?e.dom().classList.remove(t):wi(e,t),0===(Ci(n=e)?n.dom().classList:bi(n)).length&&dt.remove(n,"class")},toggle:function(e,t){return Ci(e)?e.dom().classList.toggle(t):xi(e,t)},toggler:function(e,t){var n,r,o,i,a,s,l=Ci(e),u=e.dom().classList;return n=function(){l?u.remove(t):wi(e,t)},r=function(){l?u.add(t):yi(e,t)},o=_i(e,t),i=o||!1,{on:a=function(){r(),i=!0},off:s=function(){n(),i=!1},toggle:function(){(i?s:a)()},isOn:function(){return i}}},has:_i},ki=ci.resolve("resizer-bar"),Ei=ci.resolve("resizer-rows"),Ti=ci.resolve("resizer-cols"),Ni=function(e){var t=bt.descendants(e.parent(),"."+ki);P(t,en.remove)},Ri=function(n,e,r){var o=n.origin();P(e,function(e,t){e.each(function(e){var t=r(o,e);Si.add(t,ki),Jt.append(n.parent(),t)})})},Oi=function(e,t,n,r,o,i){var a,s,l,u,c=oo(t),f=0<n.length?o.positions(n,t):[];a=e,s=f,l=c,u=Br(t),Ri(a,s,function(e,t){var n=li(t.row(),l.left()-e.left(),t.y()-e.top(),u,7);return Si.add(n,Ei),n});var d,p,m,h,g=0<r.length?i.positions(r,t):[];d=e,p=g,m=c,h=Mr(t),Ri(d,p,function(e,t){var n=si(t.col(),t.x()-e.left(),m.top()-e.top(),7,h);return Si.add(n,Ti),n})},Pi=function(e,t){var n=bt.descendants(e.parent(),"."+ki);P(n,t)},Ai={refresh:function(e,t,n,r){Ni(e);var o=Bt(t),i=Ut.generate(o),a=ai(i),s=ii(i);Oi(e,t,a,s,n,r)},hide:function(e){Pi(e,function(e){Yt.set(e,"display","none")})},show:function(e){Pi(e,function(e){Yt.set(e,"display","block")})},destroy:Ni,isRowBar:function(e){return Si.has(e,Ei)},isColBar:function(e){return Si.has(e,Ti)}},Di=function(e,r){return O(e,function(e){var t,n=(t=e.details(),Vo(t,function(e){return Ze.parent(e.element()).map(function(e){var t=Ze.parent(e).isNone();return se.elementnew(e,t)})}).getOrThunk(function(){return se.elementnew(r.row(),!0)}));return se.rowdatanew(n.element(),e.details(),e.section(),n.isNew())})},Mi=function(e,t){var n=Ko(e,qe.eq);return Di(n,t)},Ii=function(e,t){var n=j(O(e.all(),function(e){return e.cells()}));return I(n,function(e){return qe.eq(t,e.element())})},Li=function(s,l,u,c,f){return function(n,r,e,o,i){var t=Bt(r),a=Ut.generate(t);return l(a,e).map(function(e){var t=Jo(a,o,!1),n=s(t,e,qe.eq,f(o)),r=Mi(n.grid(),o);return{grid:C(r),cursor:n.cursor}}).fold(function(){return S.none()},function(e){var t=Qo(r,e.grid());return u(r,e.grid(),i),c(r),Ai.refresh(n,r,go.height,i),S.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})})}},Bi=Mi,Fi=function(t,e){return Lt.cell(e.element()).bind(function(e){return Ii(t,e)})},ji=function(t,e){var n=O(e.selection(),function(e){return Lt.cell(e).bind(function(e){return Ii(t,e)})}),r=Wo(n);return 0<r.length?S.some(r):S.none()},Hi=function(t,n){return Lt.cell(n.element()).bind(function(e){return Ii(t,e).map(function(e){return zo(e,{generators:n.generators,clipboard:n.clipboard})})})},Ui=function(t,e){var n=O(e.selection(),function(e){return Lt.cell(e).bind(function(e){return Ii(t,e)})}),r=Wo(n);return 0<r.length?S.some(zo({cells:r},{generators:e.generators,clipboard:e.clipboard})):S.none()},zi=function(e,t){return t.mergable()},Wi=function(e,t){return t.unmergable()},Vi=function(n){return{is:function(e){return n===e},isValue:u,isError:l,getOr:C(n),getOrThunk:C(n),getOrDie:C(n),or:function(e){return Vi(n)},orThunk:function(e){return Vi(n)},fold:function(e,t){return t(n)},map:function(e){return Vi(e(n))},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return S.some(n)}}},qi=function(n){return{is:l,isValue:l,isError:u,getOr:a,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return qi(n)},each:w,bind:function(e){return qi(n)},exists:l,forall:u,toOption:S.none}},$i={value:Vi,error:qi},Xi=function(e,t){return O(e,function(){return se.elementnew(t.cell(),!0)})},Yi=function(t,e,n){return t.concat(ti(e,function(e){return Xo.setCells(t[t.length-1],Xi(t[t.length-1].cells(),n))}))},Gi=function(e,t,n){return O(e,function(e){return Xo.setCells(e,e.cells().concat(Xi(ni(0,t),n)))})},Ki=function(e,t,n){if(e.row()>=t.length||e.column()>Xo.cellLength(t[0]))return $i.error("invalid start address out of table bounds, row: "+e.row()+", column: "+e.column());var r=t.slice(e.row()),o=r[0].cells().slice(e.column()),i=Xo.cellLength(n[0]),a=n.length;return $i.value({rowDelta:C(r.length-a),colDelta:C(o.length-i)})},Ji=function(e,t){var n=Xo.cellLength(e[0]),r=Xo.cellLength(t[0]);return{rowDelta:C(0),colDelta:C(n-r)}},Zi=function(e,t,n){var r=t.colDelta()<0?Gi:a;return(t.rowDelta()<0?Yi:a)(r(e,Math.abs(t.colDelta()),n),Math.abs(t.rowDelta()),n)},Qi=function(e,t,n,r){if(0===e.length)return e;for(var o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)Xo.mutateCell(e[o],i,se.elementnew(r(),!1));return e},ea=function(e,t,n,r){for(var o=!0,i=0;i<e.length;i++)for(var a=0;a<Xo.cellLength(e[0]);a++){var s=n(Xo.getCellElement(e[i],a),t);!0===s&&!1===o?Xo.mutateCell(e[i],a,se.elementnew(r(),!0)):!0===s&&(o=!1)}return e},ta=function(i,a,s,l){if(0<a&&a<i.length){var e=i[a-1].cells(),t=(n=s,M(e,function(e,t){return R(e,function(e){return n(e.element(),t.element())})?e:e.concat([t])},[]));P(t,function(e){for(var t=S.none(),n=a;n<i.length;n++)for(var r=0;r<Xo.cellLength(i[0]);r++){var o=i[n].cells()[r];s(o.element(),e.element())&&(t.isNone()&&(t=S.some(l())),t.each(function(e){Xo.mutateCell(i[n],r,se.elementnew(e,!0))}))}})}var n;return i},na=function(n,r,o,i,a){return Ki(n,r,o).map(function(e){var t=Zi(r,e,i);return function(e,t,n,r,o){for(var i,a,s,l,u,c,f,d=e.row(),p=e.column(),m=d+n.length,h=p+Xo.cellLength(n[0]),g=d;g<m;g++)for(var v=p;v<h;v++){i=t,a=g,s=v,l=o,c=u=void 0,u=Xo.getCell(i[a],s),c=_(l,u.element()),f=i[a],1<i.length&&1<Xo.cellLength(f)&&(0<s&&c(Xo.getCellElement(f,s-1))||s<f.length-1&&c(Xo.getCellElement(f,s+1))||0<a&&c(Xo.getCellElement(i[a-1],s))||a<i.length-1&&c(Xo.getCellElement(i[a+1],s)))&&ea(t,Xo.getCellElement(t[g],v),o,r.cell);var b=Xo.getCellElement(n[g-d],v-p),y=r.replace(b);Xo.mutateCell(t[g],v,se.elementnew(y,!0))}return t}(n,t,o,i,a)})},ra=function(e,t,n,r,o){ta(t,e,o,r.cell);var i=Ji(n,t),a=Zi(n,i,r),s=Ji(t,a),l=Zi(t,s,r);return l.slice(0,e).concat(a).concat(l.slice(e,l.length))},oa=function(n,r,e,o,i){var t=n.slice(0,r),a=n.slice(r),s=Xo.mapCells(n[e],function(e,t){return 0<r&&r<n.length&&o(Xo.getCellElement(n[r-1],t),Xo.getCellElement(n[r],t))?Xo.getCell(n[r],t):se.elementnew(i(e.element(),o),!0)});return t.concat([s]).concat(a)},ia=function(e,n,r,o,i){return O(e,function(e){var t=0<n&&n<Xo.cellLength(e)&&o(Xo.getCellElement(e,n-1),Xo.getCellElement(e,n))?Xo.getCell(e,n):se.elementnew(i(Xo.getCellElement(e,r),o),!0);return Xo.addCell(e,n,t)})},aa=function(e,r,o,i,a){var s=o+1;return O(e,function(e,t){var n=t===r?se.elementnew(a(Xo.getCellElement(e,o),i),!0):Xo.getCell(e,o);return Xo.addCell(e,s,n)})},sa=function(e,t,n,r,o){var i=t+1,a=e.slice(0,i),s=e.slice(i),l=Xo.mapCells(e[t],function(e,t){return t===n?se.elementnew(o(e.element(),r),!0):e});return a.concat([l]).concat(s)},la=function(e,t,n){return e.slice(0,t).concat(e.slice(n+1))},ua=function(e,n,r){var t=O(e,function(e){var t=e.cells().slice(0,n).concat(e.cells().slice(r+1));return se.rowcells(t,e.section())});return A(t,function(e){return 0<e.cells().length})},ca=function(e,n,r,o){return O(e,function(e){return Xo.mapCells(e,function(e){return t=e,R(n,function(e){return r(t.element(),e.element())})?se.elementnew(o(e.element(),r),!0):e;var t})})},fa=function(e,t,n,r){return void 0!==Xo.getCellElement(e[t],n)&&0<t&&r(Xo.getCellElement(e[t-1],n),Xo.getCellElement(e[t],n))},da=function(e,t,n){return 0<t&&n(Xo.getCellElement(e,t-1),Xo.getCellElement(e,t))},pa=function(n,r,o,e){var t=H(n,function(e,t){return fa(n,t,r,o)||da(e,r,o)?[]:[Xo.getCell(e,r)]});return ca(n,t,o,e)},ma=function(n,r,o,e){var i=n[r],t=H(i.cells(),function(e,t){return fa(n,r,t,o)||da(i,t,o)?[]:[e]});return ca(n,t,o,e)},ha=function(e){return{fold:e}},ga=function(){return ha(function(e,t,n,r,o){return e()})},va=function(i){return ha(function(e,t,n,r,o){return t(i)})},ba=function(i,a){return ha(function(e,t,n,r,o){return n(i,a)})},ya=function(i,a,s){return ha(function(e,t,n,r,o){return r(i,a,s)})},wa=function(i,a){return ha(function(e,t,n,r,o){return o(i,a)})},xa=function(e,t,i,a){var n,r,s=e.slice(0),o=(r=t,0===(n=e).length?ga():1===n.length?va(0):0===r?ba(0,1):r===n.length-1?wa(r-1,r):0<r&&r<n.length-1?ya(r-1,r,r+1):ga()),l=function(e){return O(e,C(0))},u=C(l(s)),c=function(e,t){if(0<=i){var n=Math.max(a.minCellWidth(),s[t]-i);return l(s.slice(0,e)).concat([i,n-s[t]]).concat(l(s.slice(t+1)))}var r=Math.max(a.minCellWidth(),s[e]+i),o=s[e]-r;return l(s.slice(0,e)).concat([r-s[e],o]).concat(l(s.slice(t+1)))},f=c;return o.fold(u,function(e){return a.singleColumnWidth(s[e],i)},f,function(e,t,n){return c(t,n)},function(e,t){if(0<=i)return l(s.slice(0,t)).concat([i]);var n=Math.max(a.minCellWidth(),s[t]+i);return l(s.slice(0,t)).concat([n-s[t]])})},Ca=function(e,t){return dt.has(e,t)&&1<parseInt(dt.get(e,t),10)},_a={hasColspan:function(e){return Ca(e,"colspan")},hasRowspan:function(e){return Ca(e,"rowspan")},minWidth:C(10),minHeight:C(10),getInt:function(e,t){return parseInt(Yt.get(e,t),10)}},Sa=function(e,t,n){return Yt.getRaw(e,t).fold(function(){return n(e)+"px"},function(e){return e})},ka=function(e){return Sa(e,"width",Kr.getPixelWidth)},Ea=function(e){return Sa(e,"height",Kr.getHeight)},Ta=function(e,t,n,r,o){var i=ii(e),a=O(i,function(e){return e.map(t.edge)});return O(i,function(e,t){return e.filter(p(_a.hasColspan)).fold(function(){var e=ri(a,t);return r(e)},function(e){return n(e,o)})})},Na=function(e){return e.map(function(e){return e+"px"}).getOr("")},Ra=function(e,t,n,r){var o=ai(e),i=O(o,function(e){return e.map(t.edge)});return O(o,function(e,t){return e.filter(p(_a.hasRowspan)).fold(function(){var e=ri(i,t);return r(e)},function(e){return n(e)})})},Oa={getRawWidths:function(e,t){return Ta(e,t,ka,Na)},getPixelWidths:function(e,t,n){return Ta(e,t,Kr.getPixelWidth,function(e){return e.getOrThunk(n.minCellWidth)},n)},getPercentageWidths:function(e,t,n){return Ta(e,t,Kr.getPercentageWidth,function(e){return e.fold(function(){return n.minCellWidth()},function(e){return e/n.pixelWidth()*100})},n)},getPixelHeights:function(e,t){return Ra(e,t,Kr.getHeight,function(e){return e.getOrThunk(_a.minHeight)})},getRawHeights:function(e,t){return Ra(e,t,Ea,Na)}},Pa=function(e,t,n){for(var r=0,o=e;o<t;o++)r+=void 0!==n[o]?n[o]:0;return r},Aa=function(e,n){var t=Ut.justCells(e);return O(t,function(e){var t=Pa(e.column(),e.column()+e.colspan(),n);return{element:e.element,width:C(t),colspan:e.colspan}})},Da=function(e,n){var t=Ut.justCells(e);return O(t,function(e){var t=Pa(e.row(),e.row()+e.rowspan(),n);return{element:e.element,height:C(t),rowspan:e.rowspan}})},Ma=function(e,n){return O(e.all(),function(e,t){return{element:e.element,height:C(n[t])}})},Ia=function(e){var t=parseInt(e,10),n=a;return{width:C(t),pixelWidth:C(t),getWidths:Oa.getPixelWidths,getCellDelta:n,singleColumnWidth:function(e,t){return[Math.max(_a.minWidth(),e+t)-e]},minCellWidth:_a.minWidth,setElementWidth:Kr.setPixelWidth,setTableWidth:function(e,t,n){var r=D(t,function(e,t){return e+t},0);Kr.setPixelWidth(e,r)}}},La=function(e,t){if(Kr.percentageBasedSizeRegex().test(t)){var n=Kr.percentageBasedSizeRegex().exec(t);return o=n[1],i=e,a=parseFloat(o),s=Lr(i),{width:C(a),pixelWidth:C(s),getWidths:Oa.getPercentageWidths,getCellDelta:function(e){return e/s*100},singleColumnWidth:function(e,t){return[100-e]},minCellWidth:function(){return _a.minWidth()/s*100},setElementWidth:Kr.setPercentageWidth,setTableWidth:function(e,t,n){var r=a+n;Kr.setPercentageWidth(e,r)}}}if(Kr.pixelBasedSizeRegex().test(t)){var r=Kr.pixelBasedSizeRegex().exec(t);return Ia(r[1])}var o,i,a,s,l=Lr(e);return Ia(l)},Ba=function(t){return Kr.getRawWidth(t).fold(function(){var e=Lr(t);return Ia(e)},function(e){return La(t,e)})},Fa=function(e){return Ut.generate(e)},ja=function(e){var t=Bt(e);return Fa(t)},Ha=function(e,t,n,r){var o=Ba(e),i=o.getCellDelta(t),a=ja(e),s=o.getWidths(a,r,o),l=xa(s,n,i,o),u=O(l,function(e,t){return e+s[t]}),c=Aa(a,u);P(c,function(e){o.setElementWidth(e.element(),e.width())}),n===a.grid().columns()-1&&o.setTableWidth(e,u,i)},Ua=function(e,n,r,t){var o=ja(e),i=Oa.getPixelHeights(o,t),a=O(i,function(e,t){return r===t?Math.max(n+e,_a.minHeight()):e}),s=Da(o,a),l=Ma(o,a);P(l,function(e){Kr.setHeight(e.element(),e.height())}),P(s,function(e){Kr.setHeight(e.element(),e.height())});var u=D(a,function(e,t){return e+t},0);Kr.setHeight(e,u)},za=function(e,t,n){var r=Ba(e),o=Fa(t),i=r.getWidths(o,n,r),a=Aa(o,i);P(a,function(e){r.setElementWidth(e.element(),e.width())});var s=D(i,function(e,t){return t+e},0);0<a.length&&r.setElementWidth(e,s)},Wa=function(e){0===Lt.cells(e).length&&en.remove(e)},Va=Y("grid","cursor"),qa=function(e,t,n){return $a(e,t,n).orThunk(function(){return $a(e,0,0)})},$a=function(e,t,n){return S.from(e[t]).bind(function(e){return S.from(e.cells()[n]).bind(function(e){return S.from(e.element())})})},Xa=function(e,t,n){return Va(e,$a(e,t,n))},Ya=function(e){return M(e,function(e,t){return R(e,function(e){return e.row()===t.row()})?e:e.concat([t])},[]).sort(function(e,t){return e.row()-t.row()})},Ga=function(e){return M(e,function(e,t){return R(e,function(e){return e.column()===t.column()})?e:e.concat([t])},[]).sort(function(e,t){return e.column()-t.column()})},Ka=function(e,t,n){var r=Ft(e,n),o=Ut.generate(r);return Jo(o,t,!0)},Ja=za,Za={insertRowBefore:Li(function(e,t,n,r){var o=t.row(),i=t.row(),a=oa(e,i,o,n,r.getOrInit);return Xa(a,i,t.column())},Fi,w,w,To),insertRowsBefore:Li(function(e,t,n,r){var o=t[0].row(),i=t[0].row(),a=Ya(t),s=M(a,function(e,t){return oa(e,i,o,n,r.getOrInit)},e);return Xa(s,i,t[0].column())},ji,w,w,To),insertRowAfter:Li(function(e,t,n,r){var o=t.row(),i=t.row()+t.rowspan(),a=oa(e,i,o,n,r.getOrInit);return Xa(a,i,t.column())},Fi,w,w,To),insertRowsAfter:Li(function(e,t,n,r){var o=Ya(t),i=o[o.length-1].row(),a=o[o.length-1].row()+o[o.length-1].rowspan(),s=M(o,function(e,t){return oa(e,a,i,n,r.getOrInit)},e);return Xa(s,a,t[0].column())},ji,w,w,To),insertColumnBefore:Li(function(e,t,n,r){var o=t.column(),i=t.column(),a=ia(e,i,o,n,r.getOrInit);return Xa(a,t.row(),i)},Fi,Ja,w,To),insertColumnsBefore:Li(function(e,t,n,r){var o=Ga(t),i=o[0].column(),a=o[0].column(),s=M(o,function(e,t){return ia(e,a,i,n,r.getOrInit)},e);return Xa(s,t[0].row(),a)},ji,Ja,w,To),insertColumnAfter:Li(function(e,t,n,r){var o=t.column(),i=t.column()+t.colspan(),a=ia(e,i,o,n,r.getOrInit);return Xa(a,t.row(),i)},Fi,Ja,w,To),insertColumnsAfter:Li(function(e,t,n,r){var o=t[t.length-1].column(),i=t[t.length-1].column()+t[t.length-1].colspan(),a=Ga(t),s=M(a,function(e,t){return ia(e,i,o,n,r.getOrInit)},e);return Xa(s,t[0].row(),i)},ji,Ja,w,To),splitCellIntoColumns:Li(function(e,t,n,r){var o=aa(e,t.row(),t.column(),n,r.getOrInit);return Xa(o,t.row(),t.column())},Fi,Ja,w,To),splitCellIntoRows:Li(function(e,t,n,r){var o=sa(e,t.row(),t.column(),n,r.getOrInit);return Xa(o,t.row(),t.column())},Fi,w,w,To),eraseColumns:Li(function(e,t,n,r){var o=Ga(t),i=ua(e,o[0].column(),o[o.length-1].column()),a=qa(i,t[0].row(),t[0].column());return Va(i,a)},ji,Ja,Wa,To),eraseRows:Li(function(e,t,n,r){var o=Ya(t),i=la(e,o[0].row(),o[o.length-1].row()),a=qa(i,t[0].row(),t[0].column());return Va(i,a)},ji,w,Wa,To),makeColumnHeader:Li(function(e,t,n,r){var o=pa(e,t.column(),n,r.replaceOrInit);return Xa(o,t.row(),t.column())},Fi,w,w,No("row","th")),unmakeColumnHeader:Li(function(e,t,n,r){var o=pa(e,t.column(),n,r.replaceOrInit);return Xa(o,t.row(),t.column())},Fi,w,w,No(null,"td")),makeRowHeader:Li(function(e,t,n,r){var o=ma(e,t.row(),n,r.replaceOrInit);return Xa(o,t.row(),t.column())},Fi,w,w,No("col","th")),unmakeRowHeader:Li(function(e,t,n,r){var o=ma(e,t.row(),n,r.replaceOrInit);return Xa(o,t.row(),t.column())},Fi,w,w,No(null,"td")),mergeCells:Li(function(e,t,n,r){var o=t.cells();Ho(o);var i=Qi(e,t.bounds(),n,C(o[0]));return Va(i,S.from(o[0]))},zi,w,w,Ro),unmergeCells:Li(function(e,t,n,r){var o=D(t,function(e,t){return ea(e,t,n,r.combine(t))},e);return Va(o,S.from(t[0]))},Wi,Ja,w,Ro),pasteCells:Li(function(e,n,t,r){var o,i,a,s,l=(o=n.clipboard(),i=n.generators(),a=Bt(o),s=Ut.generate(a),Jo(s,i,!0)),u=se.address(n.row(),n.column());return na(u,e,l,n.generators(),t).fold(function(){return Va(e,S.some(n.element()))},function(e){var t=qa(e,n.row(),n.column());return Va(e,t)})},Hi,Ja,w,To),pasteRowsBefore:Li(function(e,t,n,r){var o=e[t.cells[0].row()],i=t.cells[0].row(),a=Ka(t.clipboard(),t.generators(),o),s=ra(i,e,a,t.generators(),n),l=qa(s,t.cells[0].row(),t.cells[0].column());return Va(s,l)},Ui,w,w,To),pasteRowsAfter:Li(function(e,t,n,r){var o=e[t.cells[0].row()],i=t.cells[t.cells.length-1].row()+t.cells[t.cells.length-1].rowspan(),a=Ka(t.clipboard(),t.generators(),o),s=ra(i,e,a,t.generators(),n),l=qa(s,t.cells[0].row(),t.cells[0].column());return Va(s,l)},Ui,w,w,To)},Qa=function(e){return ue.fromDom(e.getBody())},es=function(e){return e.getBoundingClientRect().width},ts=function(e){return e.getBoundingClientRect().height},ns=function(t){return function(e){return qe.eq(e,Qa(t))}},rs=function(e){return/^[0-9]+$/.test(e)&&(e+="px"),e},os=function(e){var t=bt.descendants(e,"td[data-mce-style],th[data-mce-style]");dt.remove(e,"data-mce-style"),P(t,function(e){dt.remove(e,"data-mce-style")})},is=function(e){return"rtl"===Yt.get(e,"direction")?"rtl":"ltr"},as={onDirection:function(t,n){return function(e){return"rtl"===is(e)?n:t}},getDirection:is},ss={isRtl:C(!1)},ls={isRtl:C(!0)},us={directionAt:function(e){return"rtl"===as.getDirection(e)?ls:ss}},cs=["tableprops","tabledelete","|","tableinsertrowbefore","tableinsertrowafter","tabledeleterow","|","tableinsertcolbefore","tableinsertcolafter","tabledeletecol"],fs={"border-collapse":"collapse",width:"100%"},ds={border:"1"},ps=function(e){return e.getParam("table_cell_advtab",!0,"boolean")},ms=function(e){return e.getParam("table_row_advtab",!0,"boolean")},hs=function(e){return e.getParam("table_advtab",!0,"boolean")},gs=function(e){return e.getParam("table_style_by_css",!1,"boolean")},vs=function(e){return e.getParam("table_cell_class_list",[],"array")},bs=function(e){return e.getParam("table_row_class_list",[],"array")},ys=function(e){return e.getParam("table_class_list",[],"array")},ws=function(e){return!1===e.getParam("table_responsive_width")},xs=function(e,t){return e.fire("newrow",{node:t})},Cs=function(e,t){return e.fire("newcell",{node:t})},_s=function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})},Ss=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},ks=function(c,e){var t,n=function(e){return"table"===st.name(Qa(e))},f=(t=c.getParam("table_clone_elements"),v(t)?S.some(t.split(/[ ,]/)):Array.isArray(t)?S.some(t):S.none()),r=function(a,s,l,u){return function(e,t){os(e);var n=u(),r=ue.fromDom(c.getDoc()),o=bo(us.directionAt),i=Cn(l,r,f);return s(e)?a(n,e,t,i,o).bind(function(e){return P(e.newRows(),function(e){xs(c,e.dom())}),P(e.newCells(),function(e){Cs(c,e.dom())}),e.cursor().map(function(e){var t=c.dom.createRng();return t.setStart(e.dom(),0),t.setEnd(e.dom(),0),t})}):S.none()}};return{deleteRow:r(Za.eraseRows,function(e){var t=wo(e);return!1===n(c)||1<t.rows()},w,e),deleteColumn:r(Za.eraseColumns,function(e){var t=wo(e);return!1===n(c)||1<t.columns()},w,e),insertRowsBefore:r(Za.insertRowsBefore,u,w,e),insertRowsAfter:r(Za.insertRowsAfter,u,w,e),insertColumnsBefore:r(Za.insertColumnsBefore,u,Jr,e),insertColumnsAfter:r(Za.insertColumnsAfter,u,Jr,e),mergeCells:r(Za.mergeCells,u,w,e),unmergeCells:r(Za.unmergeCells,u,w,e),pasteRowsBefore:r(Za.pasteRowsBefore,u,w,e),pasteRowsAfter:r(Za.pasteRowsAfter,u,w,e),pasteCells:r(Za.pasteCells,u,w,e)}},Es=function(e,t,r){var n=Bt(e),o=Ut.generate(n);return ji(o,t).map(function(e){var t=Jo(o,r,!1).slice(e[0].row(),e[e.length-1].row()+e[e.length-1].rowspan()),n=Bi(t,r);return ei(n)})},Ts=tinymce.util.Tools.resolve("tinymce.util.Tools"),Ns=function(e,t,n){n&&e.formatter.apply("align"+n,{},t)},Rs=function(e,t,n){n&&e.formatter.apply("valign"+n,{},t)},Os=function(t,n){Ts.each("left center right".split(" "),function(e){t.formatter.remove("align"+e,{},n)})},Ps=function(t,n){Ts.each("top middle bottom".split(" "),function(e){t.formatter.remove("valign"+e,{},n)})},As=function(o,e,i){var t;return t=function(e,t){for(var n=0;n<t.length;n++){var r=o.getStyle(t[n],i);if(void 0===e&&(e=r),e!==r)return""}return e}(t,o.select("td,th",e))},Ds=function(e,t){var n=e.dom,r=t.control.rootControl,o=r.toJSON(),i=n.parseStyle(o.style);i["border-style"]=o.borderStyle,i["border-color"]=o.borderColor,i["background-color"]=o.backgroundColor,i.width=o.width?rs(o.width):"",i.height=o.height?rs(o.height):"",r.find("#style").value(n.serializeStyle(n.parseStyle(n.serializeStyle(i))))},Ms=function(e,t){var n=e.dom,r=t.control.rootControl,o=r.toJSON(),i=n.parseStyle(o.style);r.find("#borderStyle").value(i["border-style"]||""),r.find("#borderColor").value(i["border-color"]||""),r.find("#backgroundColor").value(i["background-color"]||""),r.find("#width").value(i.width||""),r.find("#height").value(i.height||"")},Is={createStyleForm:function(n){var e=function(){var e=n.getParam("color_picker_callback");if(e)return function(t){return e.call(n,function(e){t.control.value(e).fire("change")},t.control.value())}};return{title:"Advanced",type:"form",defaults:{onchange:_(Ds,n)},items:[{label:"Style",name:"style",type:"textbox",onchange:_(Ms,n)},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border style",type:"listbox",name:"borderStyle",width:90,onselect:_(Ds,n),values:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]},{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}},buildListItems:function(e,r,t){var o=function(e,n){return n=n||[],Ts.each(e,function(e){var t={text:e.text||e.title};e.menu?t.menu=o(e.menu):(t.value=e.value,r&&r(t)),n.push(t)}),n};return o(e,t||[])},updateStyleField:Ds,extractAdvancedStyles:function(e,t){var n=e.parseStyle(e.getAttrib(t,"style")),r={};return n["border-style"]&&(r.borderStyle=n["border-style"]),n["border-color"]&&(r.borderColor=n["border-color"]),n["background-color"]&&(r.backgroundColor=n["background-color"]),r.style=e.serializeStyle(n),r},updateAdvancedFields:Ms,syncAdvancedStyleFields:function(e,t){t.control.rootControl.find("#style")[0].getEl().isEqualNode(document.activeElement)?Ms(e,t):Ds(e,t)}},Ls=function(r,o,e){var i,a=r.dom;function s(e,t,n){(1===o.length||n)&&a.setAttrib(e,t,n)}function l(e,t,n){(1===o.length||n)&&a.setStyle(e,t,n)}ps(r)&&Is.syncAdvancedStyleFields(r,e),i=e.control.rootControl.toJSON(),r.undoManager.transact(function(){Ts.each(o,function(e){var t,n;s(e,"scope",i.scope),1===o.length?s(e,"style",i.style):(t=e,n=i.style,delete t.dataset.mceStyle,t.style.cssText+=";"+n),s(e,"class",i.class),l(e,"width",rs(i.width)),l(e,"height",rs(i.height)),i.type&&e.nodeName.toLowerCase()!==i.type&&(e=a.rename(e,i.type)),1===o.length&&(Os(r,e),Ps(r,e)),i.align&&Ns(r,e,i.align),i.valign&&Rs(r,e,i.valign)}),r.focus()})},Bs=function(t){var e,n,r,o=[];if(o=t.dom.select("td[data-mce-selected],th[data-mce-selected]"),e=t.dom.getParent(t.selection.getStart(),"td,th"),!o.length&&e&&o.push(e),e=e||o[0]){var i,a,s,l;n=1<o.length?{width:"",height:"",scope:"",class:"",align:"",valign:"",style:"",type:e.nodeName.toLowerCase()}:(a=e,s=(i=t).dom,l={width:s.getStyle(a,"width")||s.getAttrib(a,"width"),height:s.getStyle(a,"height")||s.getAttrib(a,"height"),scope:s.getAttrib(a,"scope"),class:s.getAttrib(a,"class"),type:a.nodeName.toLowerCase(),style:"",align:"",valign:""},Ts.each("left center right".split(" "),function(e){i.formatter.matchNode(a,"align"+e)&&(l.align=e)}),Ts.each("top middle bottom".split(" "),function(e){i.formatter.matchNode(a,"valign"+e)&&(l.valign=e)}),ps(i)&&Ts.extend(l,Is.extractAdvancedStyles(s,a)),l),0<vs(t).length&&(r={name:"class",type:"listbox",label:"Class",values:Is.buildListItems(vs(t),function(e){e.value&&(e.textStyle=function(){return t.formatter.getCssText({block:"td",classes:[e.value]})})})});var u={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width",onchange:_(Is.updateStyleField,t)},{label:"Height",name:"height",onchange:_(Is.updateStyleField,t)},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},r]};ps(t)?t.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:n,body:[{title:"General",type:"form",items:u},Is.createStyleForm(t)],onsubmit:_(Ls,t,o)}):t.windowManager.open({title:"Cell properties",data:n,body:u,onsubmit:_(Ls,t,o)})}};function Fs(c,f,d,e){var p=c.dom;function m(e,t,n){(1===f.length||n)&&p.setAttrib(e,t,n)}ms(c)&&Is.syncAdvancedStyleFields(c,e);var h=e.control.rootControl.toJSON();c.undoManager.transact(function(){Ts.each(f,function(e){var t,n,r,o,i,a,s,l,u;m(e,"scope",h.scope),m(e,"style",h.style),m(e,"class",h.class),t=e,n="height",r=rs(h.height),(1===f.length||r)&&p.setStyle(t,n,r),h.type!==e.parentNode.nodeName.toLowerCase()&&(o=c.dom,i=e,a=h.type,s=o.getParent(i,"table"),l=i.parentNode,(u=o.select(a,s)[0])||(u=o.create(a),s.firstChild?"CAPTION"===s.firstChild.nodeName?o.insertAfter(u,s.firstChild):s.insertBefore(u,s.firstChild):s.appendChild(u)),u.appendChild(i),l.hasChildNodes()||o.remove(l)),h.align!==d.align&&(Os(c,e),Ns(c,e,h.align))}),c.focus()})}var js=function(t){var e,n,r,o,i,a,s,l,u,c,f=t.dom,d=[];e=f.getParent(t.selection.getStart(),"table"),n=f.getParent(t.selection.getStart(),"td,th"),Ts.each(e.rows,function(t){Ts.each(t.cells,function(e){if(f.getAttrib(e,"data-mce-selected")||e===n)return d.push(t),!1})}),(r=d[0])&&(i=1<d.length?{height:"",scope:"",style:"",class:"",align:"",type:r.parentNode.nodeName.toLowerCase()}:(l=r,u=(s=t).dom,c={height:u.getStyle(l,"height")||u.getAttrib(l,"height"),scope:u.getAttrib(l,"scope"),class:u.getAttrib(l,"class"),align:"",style:"",type:l.parentNode.nodeName.toLowerCase()},Ts.each("left center right".split(" "),function(e){s.formatter.matchNode(l,"align"+e)&&(c.align=e)}),ms(s)&&Ts.extend(c,Is.extractAdvancedStyles(u,l)),c),0<bs(t).length&&(o={name:"class",type:"listbox",label:"Class",values:Is.buildListItems(bs(t),function(e){e.value&&(e.textStyle=function(){return t.formatter.getCssText({block:"tr",classes:[e.value]})})})}),a={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"Header",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},o]},ms(t)?t.windowManager.open({title:"Row properties",data:i,bodyType:"tabpanel",body:[{title:"General",type:"form",items:a},Is.createStyleForm(t)],onsubmit:_(Fs,t,d,i)}):t.windowManager.open({title:"Row properties",data:i,body:a,onsubmit:_(Fs,t,d,i)}))},Hs=tinymce.util.Tools.resolve("tinymce.Env"),Us={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},percentages:!0},zs=function(e,t,n,r,o){void 0===o&&(o=Us);var i=ue.fromTag("table");Yt.setAll(i,o.styles),dt.setAll(i,o.attributes);var a=ue.fromTag("tbody");Jt.append(i,a);for(var s=[],l=0;l<e;l++){for(var u=ue.fromTag("tr"),c=0;c<t;c++){var f=l<n||c<r?ue.fromTag("th"):ue.fromTag("td");c<r&&dt.set(f,"scope","row"),l<n&&dt.set(f,"scope","col"),Jt.append(f,ue.fromTag("br")),o.percentages&&Yt.set(f,"width",100/t+"%"),Jt.append(u,f)}s.push(u)}return Zt.append(a,s),i},Ws=function(e){return e.dom().innerHTML},Vs=function(e){var t=ue.fromTag("div"),n=ue.fromDom(e.dom().cloneNode(!0));return Jt.append(t,n),Ws(t)},qs=function(e,t){e.selection.select(t.dom(),!0),e.selection.collapse(!0)},$s=function(o,e,t){var n,r,i=o.getParam("table_default_styles",fs,"object"),a={styles:i,attributes:(r=o,r.getParam("table_default_attributes",ds,"object")),percentages:(n=i.width,v(n)&&-1!==n.indexOf("%")&&!ws(o))},s=zs(t,e,0,0,a);dt.set(s,"data-mce-id","__mce");var l=Vs(s);return o.insertContent(l),Ot.descendant(Qa(o),'table[data-mce-id="__mce"]').map(function(e){var t,n,r;return ws(o)&&Yt.set(e,"width",Yt.get(e,"width")),dt.remove(e,"data-mce-id"),t=o,P(bt.descendants(e,"tr"),function(e){xs(t,e.dom()),P(bt.descendants(e,"th,td"),function(e){Cs(t,e.dom())})}),n=o,r=e,Ot.descendant(r,"td,th").each(_(qs,n)),e.dom()}).getOr(null)};function Xs(e,t,n,r){if("TD"===t.tagName||"TH"===t.tagName)e.setStyle(t,n,r);else if(t.children)for(var o=0;o<t.children.length;o++)Xs(e,t.children[o],n,r)}var Ys=function(e,t,n){var r,o,i=e.dom;hs(e)&&Is.syncAdvancedStyleFields(e,n),!1===(o=n.control.rootControl.toJSON()).class&&delete o.class,e.undoManager.transact(function(){t||(t=$s(e,o.cols||1,o.rows||1)),function(e,t,n){var r,o=e.dom,i={},a={};if(i.class=n.class,a.height=rs(n.height),o.getAttrib(t,"width")&&!gs(e)?i.width=(r=n.width)?r.replace(/px$/,""):"":a.width=rs(n.width),gs(e)?(a["border-width"]=rs(n.border),a["border-spacing"]=rs(n.cellspacing),Ts.extend(i,{"data-mce-border-color":n.borderColor,"data-mce-cell-padding":n.cellpadding,"data-mce-border":n.border})):Ts.extend(i,{border:n.border,cellpadding:n.cellpadding,cellspacing:n.cellspacing}),gs(e)&&t.children)for(var s=0;s<t.children.length;s++)Xs(o,t.children[s],{"border-width":rs(n.border),"border-color":n.borderColor,padding:rs(n.cellpadding)});n.style?Ts.extend(a,o.parseStyle(n.style)):a=Ts.extend({},o.parseStyle(o.getAttrib(t,"style")),a),i.style=o.serializeStyle(a),o.setAttribs(t,i)}(e,t,o),(r=i.select("caption",t)[0])&&!o.caption&&i.remove(r),!r&&o.caption&&((r=i.create("caption")).innerHTML=Hs.ie?" ":'<br data-mce-bogus="1"/>',t.insertBefore(r,t.firstChild)),Os(e,t),o.align&&Ns(e,t,o.align),e.focus(),e.addVisual()})},Gs=function(t,e){var n,r,o,i,a,s,l,u,c,f,d=t.dom,p={};!0===e?(n=d.getParent(t.selection.getStart(),"table"))&&(l=n,u=(s=t).dom,c={width:u.getStyle(l,"width")||u.getAttrib(l,"width"),height:u.getStyle(l,"height")||u.getAttrib(l,"height"),cellspacing:u.getStyle(l,"border-spacing")||u.getAttrib(l,"cellspacing"),cellpadding:u.getAttrib(l,"data-mce-cell-padding")||u.getAttrib(l,"cellpadding")||As(s.dom,l,"padding"),border:u.getAttrib(l,"data-mce-border")||u.getAttrib(l,"border")||As(s.dom,l,"border"),borderColor:u.getAttrib(l,"data-mce-border-color"),caption:!!u.select("caption",l)[0],class:u.getAttrib(l,"class")},Ts.each("left center right".split(" "),function(e){s.formatter.matchNode(l,"align"+e)&&(c.align=e)}),hs(s)&&Ts.extend(c,Is.extractAdvancedStyles(u,l)),p=c):(r={label:"Cols",name:"cols"},o={label:"Rows",name:"rows"}),0<ys(t).length&&(p.class&&(p.class=p.class.replace(/\s*mce\-item\-table\s*/g,"")),i={name:"class",type:"listbox",label:"Class",values:Is.buildListItems(ys(t),function(e){e.value&&(e.textStyle=function(){return t.formatter.getCssText({block:"table",classes:[e.value]})})})}),a={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:(f=t,f.getParam("table_appearance_options",!0,"boolean")?[r,o,{label:"Width",name:"width",onchange:_(Is.updateStyleField,t)},{label:"Height",name:"height",onchange:_(Is.updateStyleField,t)},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[r,o,{label:"Width",name:"width",onchange:_(Is.updateStyleField,t)},{label:"Height",name:"height",onchange:_(Is.updateStyleField,t)}])},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},i]},hs(t)?t.windowManager.open({title:"Table properties",data:p,bodyType:"tabpanel",body:[{title:"General",type:"form",items:a},Is.createStyleForm(t)],onsubmit:_(Ys,t,n)}):t.windowManager.open({title:"Table properties",data:p,body:a,onsubmit:_(Ys,t,n)})},Ks=Ts.each,Js=function(s,t,l,u,n){var r=ns(s),c=function(){return ue.fromDom(s.dom.getParent(s.selection.getStart(),"th,td"))},f=function(e){return Lt.table(e,r)},d=function(e){return{width:es(e.dom()),height:es(e.dom())}},o=function(t){var n=c();f(n).each(function(i){var e=Rr.forMenu(u,i,n),a=d(i);t(i,e).each(function(e){var t,n,r,o;t=s,n=a,o=d(r=i),n.width===o.width&&n.height===o.height||(_s(t,r.dom(),n.width,n.height),Ss(t,r.dom(),o.width,o.height)),s.selection.setRng(e),s.focus(),l.clear(i),os(i)})})},i=function(e){var o=c();return f(o).bind(function(e){var t=ue.fromDom(s.getDoc()),n=Rr.forMenu(u,e,o),r=Cn(w,t,S.none());return Es(e,n,r)})},a=function(a){n.get().each(function(e){var o=O(e,function(e){return ln(e)}),i=c();f(i).bind(function(t){var e=ue.fromDom(s.getDoc()),n=_n(e),r=Rr.pasteRows(u,t,i,o,n);a(t,r).each(function(e){s.selection.setRng(e),s.focus(),l.clear(t)})})})};Ks({mceTableSplitCells:function(){o(t.unmergeCells)},mceTableMergeCells:function(){o(t.mergeCells)},mceTableInsertRowBefore:function(){o(t.insertRowsBefore)},mceTableInsertRowAfter:function(){o(t.insertRowsAfter)},mceTableInsertColBefore:function(){o(t.insertColumnsBefore)},mceTableInsertColAfter:function(){o(t.insertColumnsAfter)},mceTableDeleteCol:function(){o(t.deleteColumn)},mceTableDeleteRow:function(){o(t.deleteRow)},mceTableCutRow:function(e){n.set(i()),o(t.deleteRow)},mceTableCopyRow:function(e){n.set(i())},mceTablePasteRowBefore:function(e){a(t.pasteRowsBefore)},mceTablePasteRowAfter:function(e){a(t.pasteRowsAfter)},mceTableDelete:function(){var e=ue.fromDom(s.dom.getParent(s.selection.getStart(),"th,td"));Lt.table(e,r).filter(p(r)).each(function(e){var t=ue.fromText("");Jt.after(e,t),en.remove(e);var n=s.dom.createRng();n.setStart(t.dom(),0),n.setEnd(t.dom(),0),s.selection.setRng(n)})}},function(e,t){s.addCommand(t,e)}),Ks({mceInsertTable:_(Gs,s),mceTableProps:_(Gs,s,!0),mceTableRowProps:_(js,s),mceTableCellProps:_(Bs,s)},function(n,e){s.addCommand(e,function(e,t){n(t)})})},Zs=function(e){var t=S.from(e.dom().documentElement).map(ue.fromDom).getOr(e);return{parent:C(t),view:C(e),origin:C(to(0,0))}},Qs=function(e,t){return{parent:C(t),view:C(e),origin:C(to(0,0))}};function el(e){var n=Y.apply(null,e),r=[];return{bind:function(e){if(void 0===e)throw"Event bind error: undefined handler";r.push(e)},unbind:function(t){r=A(r,function(e){return e!==t})},trigger:function(){var t=n.apply(null,arguments);P(r,function(e){e(t)})}}}var tl={create:function(e){return{registry:$(e,function(e){return{bind:e.bind,unbind:e.unbind}}),trigger:$(e,function(e){return e.trigger})}}},nl={mode:So(["compare","extract","mutate","sink"]),sink:So(["element","start","stop","destroy"]),api:So(["forceDrop","drop","move","delayDrop"])},rl={resolve:ui("ephox-dragster").resolve},ol=function(p,m){return function(e){if(p(e)){var t,n,r,o,i,a,s,l=ue.fromDom(e.target),u=function(){e.stopPropagation()},c=function(){e.preventDefault()},f=x(c,u),d=(t=l,n=e.clientX,r=e.clientY,o=u,i=c,a=f,s=e,{target:C(t),x:C(n),y:C(r),stop:o,prevent:i,kill:a,raw:C(s)});m(d)}}},il=function(e,t,n,r,o){var i=ol(n,r);return e.dom().addEventListener(t,i,o),{unbind:_(al,e,t,i,o)}},al=function(e,t,n,r){e.dom().removeEventListener(t,n,r)},sl=function(e,t,n,r){return il(e,t,n,r,!1)},ll=function(e,t,n,r){return il(e,t,n,r,!0)},ul=C(!0),cl={bind:function(e,t,n){return sl(e,t,ul,n)},capture:function(e,t,n){return ll(e,t,ul,n)}},fl=nl.mode({compare:function(e,t){return to(t.left()-e.left(),t.top()-e.top())},extract:function(e){return S.some(to(e.x(),e.y()))},sink:function(e,t){var n,r,o,i=(n=t,r=zo({layerClass:rl.resolve("blocker")},n),o=ue.fromTag("div"),dt.set(o,"role","presentation"),Yt.setAll(o,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),Si.add(o,rl.resolve("blocker")),Si.add(o,r.layerClass),{element:function(){return o},destroy:function(){en.remove(o)}}),a=cl.bind(i.element(),"mousedown",e.forceDrop),s=cl.bind(i.element(),"mouseup",e.drop),l=cl.bind(i.element(),"mousemove",e.move),u=cl.bind(i.element(),"mouseout",e.delayDrop);return nl.sink({element:i.element,start:function(e){Jt.append(e,i.element())},stop:function(){en.remove(i.element())},destroy:function(){i.destroy(),s.unbind(),l.unbind(),u.unbind(),a.unbind()}})},mutate:function(e,t){e.mutate(t.left(),t.top())}});function dl(){var i=S.none(),a=tl.create({move:el(["info"])});return{onEvent:function(e,o){o.extract(e).each(function(e){var t,n,r;(t=o,n=e,r=i.map(function(e){return t.compare(e,n)}),i=S.some(n),r).each(function(e){a.trigger.move(e)})})},reset:function(){i=S.none()},events:a.registry}}function pl(){var e={onEvent:function(e,t){},reset:w},t=dl(),n=e;return{on:function(){n.reset(),n=t},off:function(){n.reset(),n=e},isOn:function(){return n===t},onEvent:function(e,t){n.onEvent(e,t)},events:t.events}}var ml=function(t,n,e){var r,o,i,a=!1,s=tl.create({start:el([]),stop:el([])}),l=pl(),u=function(){d.stop(),l.isOn()&&(l.off(),s.trigger.stop())},c=(r=u,o=200,i=null,{cancel:function(){null!==i&&(clearTimeout(i),i=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==i&&clearTimeout(i),i=setTimeout(function(){r.apply(null,e),i=null},o)}});l.events.move.bind(function(e){n.mutate(t,e.info())});var f=function(t){return function(){var e=Array.prototype.slice.call(arguments,0);if(a)return t.apply(null,e)}},d=n.sink(nl.api({forceDrop:u,drop:f(u),move:f(function(e,t){c.cancel(),l.onEvent(e,n)}),delayDrop:f(c.throttle)}),e);return{element:d.element,go:function(e){d.start(e),l.on(),s.trigger.start()},on:function(){a=!0},off:function(){a=!1},destroy:function(){d.destroy()},events:s.registry}},hl={transform:function(e,t){var n=void 0!==t?t:{},r=void 0!==n.mode?n.mode:fl;return ml(e,r,t)}};function gl(){var n,r=tl.create({drag:el(["xDelta","yDelta","target"])}),o=S.none(),e={mutate:function(e,t){n.trigger.drag(e,t)},events:(n=tl.create({drag:el(["xDelta","yDelta"])})).registry};return e.events.drag.bind(function(t){o.each(function(e){r.trigger.drag(t.xDelta(),t.yDelta(),e)})}),{assign:function(e){o=S.some(e)},get:function(){return o},mutate:e.mutate,events:r.registry}}var vl={any:function(e){return Ot.first(e).isSome()},ancestor:function(e,t,n){return Ot.ancestor(e,t,n).isSome()},sibling:function(e,t){return Ot.sibling(e,t).isSome()},child:function(e,t){return Ot.child(e,t).isSome()},descendant:function(e,t){return Ot.descendant(e,t).isSome()},closest:function(e,t,n){return Ot.closest(e,t,n).isSome()}},bl=ci.resolve("resizer-bar-dragging");function yl(e,n){var r=go.height,t=function(o,t,i){var n=gl(),r=hl.transform(n,{}),a=S.none(),e=function(e,t){return S.from(dt.get(e,t))};n.events.drag.bind(function(n){e(n.target(),"data-row").each(function(e){var t=_a.getInt(n.target(),"top");Yt.set(n.target(),"top",t+n.yDelta()+"px")}),e(n.target(),"data-column").each(function(e){var t=_a.getInt(n.target(),"left");Yt.set(n.target(),"left",t+n.xDelta()+"px")})});var s=function(e,t){return _a.getInt(e,t)-parseInt(dt.get(e,"data-initial-"+t),10)};r.events.stop.bind(function(){n.get().each(function(r){a.each(function(n){e(r,"data-row").each(function(e){var t=s(r,"top");dt.remove(r,"data-initial-top"),d.trigger.adjustHeight(n,t,parseInt(e,10))}),e(r,"data-column").each(function(e){var t=s(r,"left");dt.remove(r,"data-initial-left"),d.trigger.adjustWidth(n,t,parseInt(e,10))}),Ai.refresh(o,n,i,t)})})});var l=function(e,t){d.trigger.startAdjust(),n.assign(e),dt.set(e,"data-initial-"+t,parseInt(Yt.get(e,t),10)),Si.add(e,bl),Yt.set(e,"opacity","0.2"),r.go(o.parent())},u=cl.bind(o.parent(),"mousedown",function(e){Ai.isRowBar(e.target())&&l(e.target(),"top"),Ai.isColBar(e.target())&&l(e.target(),"left")}),c=function(e){return qe.eq(e,o.view())},f=cl.bind(o.view(),"mouseover",function(e){"table"===st.name(e.target())||vl.closest(e.target(),"table",c)?(a="table"===st.name(e.target())?S.some(e.target()):Ot.ancestor(e.target(),"table",c)).each(function(e){Ai.refresh(o,e,i,t)}):ht.inBody(e.target())&&Ai.destroy(o)}),d=tl.create({adjustHeight:el(["table","delta","row"]),adjustWidth:el(["table","delta","column"]),startAdjust:el([])});return{destroy:function(){u.unbind(),f.unbind(),r.destroy(),Ai.destroy(o)},refresh:function(e){Ai.refresh(o,e,i,t)},on:r.on,off:r.off,hideBars:_(Ai.hide,o),showBars:_(Ai.show,o),events:d.registry}}(e,n,r),o=tl.create({beforeResize:el(["table"]),afterResize:el(["table"]),startDrag:el([])});return t.events.adjustHeight.bind(function(e){o.trigger.beforeResize(e.table());var t=r.delta(e.delta(),e.table());Ua(e.table(),t,e.row(),r),o.trigger.afterResize(e.table())}),t.events.startAdjust.bind(function(e){o.trigger.startDrag()}),t.events.adjustWidth.bind(function(e){o.trigger.beforeResize(e.table());var t=n.delta(e.delta(),e.table());Ha(e.table(),t,e.column(),n),o.trigger.afterResize(e.table())}),{on:t.on,off:t.off,hideBars:t.hideBars,showBars:t.showBars,destroy:t.destroy,events:o.registry}}var wl=function(e,t){return e.inline?Qs(Qa(e),(n=ue.fromTag("div"),Yt.setAll(n,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Jt.append(ht.body(),n),n)):Zs(ue.fromDom(e.getDoc()));var n},xl=function(e,t){e.inline&&en.remove(t.parent())},Cl=function(a){var s,l,o=S.none(),i=S.none(),u=S.none(),c=/(\d+(\.\d+)?)%/,f=function(e){return"TABLE"===e.nodeName};return a.on("init",function(){var e,t=bo(us.directionAt),n=wl(a);if(u=S.some(n),("table"===(e=a.getParam("object_resizing",!0))||e)&&a.getParam("table_resize_bars",!0,"boolean")){var r=yl(n,t);r.on(),r.events.startDrag.bind(function(e){o=S.some(a.selection.getRng())}),r.events.beforeResize.bind(function(e){var t=e.table().dom();_s(a,t,es(t),ts(t))}),r.events.afterResize.bind(function(e){var t=e.table(),n=t.dom();os(t),o.each(function(e){a.selection.setRng(e),a.focus()}),Ss(a,n,es(n),ts(n)),a.undoManager.add()}),i=S.some(r)}}),a.on("ObjectResizeStart",function(e){var t,n=e.target;f(n)&&(s=e.width,t=n,l=a.dom.getStyle(t,"width")||a.dom.getAttrib(t,"width"))}),a.on("ObjectResized",function(e){var t=e.target;if(f(t)){var n=t;if(c.test(l)){var r=parseFloat(c.exec(l)[1]),o=e.width*r/s;a.dom.setStyle(n,"width",o+"%")}else{var i=[];Ts.each(n.rows,function(e){Ts.each(e.cells,function(e){var t=a.dom.getStyle(e,"width",!0);i.push({cell:e,width:t})})}),Ts.each(i,function(e){a.dom.setStyle(e.cell,"width",e.width),a.dom.setAttrib(e.cell,"width",null)})}}}),{lazyResize:function(){return i},lazyWire:function(){return u.getOr(Zs(ue.fromDom(a.getBody())))},destroy:function(){i.each(function(e){e.destroy()}),u.each(function(e){xl(a,e)})}}},_l=function(e){return{fold:e}},Sl=function(o){return _l(function(e,t,n,r){return e(o)})},kl=function(o){return _l(function(e,t,n,r){return t(o)})},El=function(o,i){return _l(function(e,t,n,r){return n(o,i)})},Tl=function(o){return _l(function(e,t,n,r){return r(o)})},Nl=function(n,e){return Lt.table(n,e).bind(function(e){var t=Lt.cells(e);return L(t,function(e){return qe.eq(n,e)}).map(function(e){return{index:C(e),all:C(t)}})})},Rl=function(t,e){return Nl(t,e).fold(function(){return Sl(t)},function(e){return e.index()+1<e.all().length?El(t,e.all()[e.index()+1]):Tl(t)})},Ol=function(t,e){return Nl(t,e).fold(function(){return Sl()},function(e){return 0<=e.index()-1?El(t,e.all()[e.index()-1]):kl(t)})},Pl=wr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Al={before:Pl.before,on:Pl.on,after:Pl.after,cata:function(e,t,n,r){return e.fold(t,n,r)},getStart:function(e){return e.fold(a,a,a)}},Dl=wr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Ml=Y("start","soffset","finish","foffset"),Il={domRange:Dl.domRange,relative:Dl.relative,exact:Dl.exact,exactFromRange:function(e){return Dl.exact(e.start(),e.soffset(),e.finish(),e.foffset())},range:Ml,getWin:function(e){var t=e.match({domRange:function(e){return ue.fromDom(e.startContainer)},relative:function(e,t){return Al.getStart(e)},exact:function(e,t,n,r){return e}});return Ze.defaultView(t)}},Ll=function(e,t,n,r){var o=Ze.owner(e).dom().createRange();return o.setStart(e.dom(),t),o.setEnd(n.dom(),r),o},Bl=function(e,t,n,r){var o=Ll(e,t,n,r),i=qe.eq(e,n)&&t===r;return o.collapsed&&!i},Fl=function(e,t){e.selectNodeContents(t.dom())},jl=function(e){e.deleteContents()},Hl=function(e){return{left:C(e.left),top:C(e.top),right:C(e.right),bottom:C(e.bottom),width:C(e.width),height:C(e.height)}},Ul={create:function(e){return e.document.createRange()},replaceWith:function(e,t){jl(e),e.insertNode(t.dom())},selectNodeContents:function(e,t){var n=e.document.createRange();return Fl(n,t),n},selectNodeContentsUsing:Fl,relativeToNative:function(e,t,n){var r,o,i=e.document.createRange();return r=i,t.fold(function(e){r.setStartBefore(e.dom())},function(e,t){r.setStart(e.dom(),t)},function(e){r.setStartAfter(e.dom())}),o=i,n.fold(function(e){o.setEndBefore(e.dom())},function(e,t){o.setEnd(e.dom(),t)},function(e){o.setEndAfter(e.dom())}),i},exactToNative:function(e,t,n,r,o){var i=e.document.createRange();return i.setStart(t.dom(),n),i.setEnd(r.dom(),o),i},deleteContents:jl,cloneFragment:function(e){var t=e.cloneContents();return ue.fromDom(t)},getFirstRect:function(e){var t=e.getClientRects(),n=0<t.length?t[0]:e.getBoundingClientRect();return 0<n.width||0<n.height?S.some(n).map(Hl):S.none()},getBounds:function(e){var t=e.getBoundingClientRect();return 0<t.width||0<t.height?S.some(t).map(Hl):S.none()},isWithin:function(e,t){return t.compareBoundaryPoints(e.END_TO_START,e)<1&&-1<t.compareBoundaryPoints(e.START_TO_END,e)},toString:function(e){return e.toString()}},zl=wr([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Wl=function(e,t,n){return t(ue.fromDom(n.startContainer),n.startOffset,ue.fromDom(n.endContainer),n.endOffset)},Vl=function(e,t){var o,n,r,i=(o=e,t.match({domRange:function(e){return{ltr:C(e),rtl:S.none}},relative:function(e,t){return{ltr:Ce(function(){return Ul.relativeToNative(o,e,t)}),rtl:Ce(function(){return S.some(Ul.relativeToNative(o,t,e))})}},exact:function(e,t,n,r){return{ltr:Ce(function(){return Ul.exactToNative(o,e,t,n,r)}),rtl:Ce(function(){return S.some(Ul.exactToNative(o,n,r,e,t))})}}}));return(r=(n=i).ltr()).collapsed?n.rtl().filter(function(e){return!1===e.collapsed}).map(function(e){return zl.rtl(ue.fromDom(e.endContainer),e.endOffset,ue.fromDom(e.startContainer),e.startOffset)}).getOrThunk(function(){return Wl(0,zl.ltr,r)}):Wl(0,zl.ltr,r)},ql={ltr:zl.ltr,rtl:zl.rtl,diagnose:Vl,asLtrRange:function(i,e){return Vl(i,e).match({ltr:function(e,t,n,r){var o=i.document.createRange();return o.setStart(e.dom(),t),o.setEnd(n.dom(),r),o},rtl:function(e,t,n,r){var o=i.document.createRange();return o.setStart(n.dom(),r),o.setEnd(e.dom(),t),o}})}},$l=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Xl=function(e,t,n,r,o){if(0===o)return 0;if(t===r)return o-1;for(var i=r,a=1;a<o;a++){var s=e(a),l=Math.abs(t-s.left);if(n<=s.bottom){if(n<s.top||i<l)return a-1;i=l}}return 0},Yl={locate:function(u,c,f,d){var e=u.dom().createRange();e.selectNode(c.dom());var t=e.getClientRects();return Vo(t,function(e){return $l(e,f,d)?S.some(e):S.none()}).map(function(e){return n=u,t=f,o=d,i=e,a=function(e){var t=n.dom().createRange();return t.setStart(r.dom(),e),t.collapse(!0),t},s=fn.get(r=c).length,l=Xl(function(e){return a(e).getBoundingClientRect()},t,o,i.right,s),a(l);var n,r,t,o,i,a,s,l})}},Gl=function(t,e,n,r){var o=t.dom().createRange(),i=Ze.children(e);return Vo(i,function(e){return o.selectNode(e.dom()),$l(o.getBoundingClientRect(),n,r)?Kl(t,e,n,r):S.none()})},Kl=function(e,t,n,r){return(st.isText(t)?Yl.locate:Gl)(e,t,n,r)},Jl=function(e,t,n,r){var o=e.dom().createRange();o.selectNode(t.dom());var i=o.getBoundingClientRect(),a=Math.max(i.left,Math.min(i.right,n)),s=Math.max(i.top,Math.min(i.bottom,r));return Kl(e,t,a,s)},Zl=function(e,t){return t-e.left<e.right-t},Ql=function(e,t,n){var r=e.dom().createRange();return r.selectNode(t.dom()),r.collapse(n),r},eu=function(t,e,n){var r=t.dom().createRange();r.selectNode(e.dom());var o=r.getBoundingClientRect(),i=Zl(o,n);return(!0===i?vn.first:vn.last)(e).map(function(e){return Ql(t,e,i)})},tu=function(e,t,n){var r=t.dom().getBoundingClientRect(),o=Zl(r,n);return S.some(Ql(e,t,o))},nu=function(e,t,n){return(0===Ze.children(t).length?tu:eu)(e,t,n)},ru=document.caretPositionFromPoint?function(n,e,t){return S.from(n.dom().caretPositionFromPoint(e,t)).bind(function(e){if(null===e.offsetNode)return S.none();var t=n.dom().createRange();return t.setStart(e.offsetNode,e.offset),t.collapse(),S.some(t)})}:document.caretRangeFromPoint?function(e,t,n){return S.from(e.dom().caretRangeFromPoint(t,n))}:function(n,r,o){return ue.fromPoint(n,r,o).bind(function(e){var t=function(){return nu(n,e,r)};return 0===Ze.children(e).length?t():function(e,t,n,r){var o=e.dom().createRange();o.selectNode(t.dom());var i=o.getBoundingClientRect(),a=Math.max(i.left,Math.min(i.right,n)),s=Math.max(i.top,Math.min(i.bottom,r));return Jl(e,t,a,s)}(n,e,r,o).orThunk(t)})},ou=function(e,t,n){var r=ue.fromDom(e.document);return ru(r,t,n).map(function(e){return Il.range(ue.fromDom(e.startContainer),e.startOffset,ue.fromDom(e.endContainer),e.endOffset)})},iu=function(e,t){var n=st.name(e);return"input"===n?Al.after(e):N(["br","img"],n)?0===t?Al.before(e):Al.after(e):Al.on(e,t)},au=function(e,t){var n=e.fold(Al.before,iu,Al.after),r=t.fold(Al.before,iu,Al.after);return Il.relative(n,r)},su=function(e,t,n,r){var o=iu(e,t),i=iu(n,r);return Il.relative(o,i)},lu=function(e){return e.match({domRange:function(e){var t=ue.fromDom(e.startContainer),n=ue.fromDom(e.endContainer);return su(t,e.startOffset,n,e.endOffset)},relative:au,exact:su})},uu=au,cu=su,fu=function(e,t){S.from(e.getSelection()).each(function(e){e.removeAllRanges(),e.addRange(t)})},du=function(e,t,n,r,o){var i=Ul.exactToNative(e,t,n,r,o);fu(e,i)},pu=function(c,e){return ql.diagnose(c,e).match({ltr:function(e,t,n,r){du(c,e,t,n,r)},rtl:function(t,n,r,o){var e,i,a,s,l,u=c.getSelection();if(u.setBaseAndExtent)u.setBaseAndExtent(t.dom(),n,r.dom(),o);else if(u.extend)try{i=t,a=n,s=r,l=o,(e=u).collapse(i.dom(),a),e.extend(s.dom(),l)}catch(e){du(c,r,o,t,n)}else du(c,r,o,t,n)}})},mu=function(e){var t=ue.fromDom(e.anchorNode),n=ue.fromDom(e.focusNode);return Bl(t,e.anchorOffset,n,e.focusOffset)?S.some(Il.range(ue.fromDom(e.anchorNode),e.anchorOffset,ue.fromDom(e.focusNode),e.focusOffset)):function(e){if(0<e.rangeCount){var t=e.getRangeAt(0),n=e.getRangeAt(e.rangeCount-1);return S.some(Il.range(ue.fromDom(t.startContainer),t.startOffset,ue.fromDom(n.endContainer),n.endOffset))}return S.none()}(e)},hu=function(e){return S.from(e.getSelection()).filter(function(e){return 0<e.rangeCount}).bind(mu)},gu=function(e,t,n,r,o){var i=cu(t,n,r,o);pu(e,i)},vu=function(e){return hu(e).map(function(e){return Il.exact(e.start(),e.soffset(),e.finish(),e.foffset())})},bu=function(e,t,n){var r=uu(t,n);pu(e,r)},yu=function(e){var o=Il.getWin(e).dom(),t=function(e,t,n,r){return Ul.exactToNative(o,e,t,n,r)},n=lu(e);return ql.diagnose(o,n).match({ltr:t,rtl:t})},wu=function(e,t){var n=Ul.selectNodeContents(e,t);fu(e,n)},xu=function(e){e.getSelection().removeAllRanges()},Cu=function(e,t){var n=ql.asLtrRange(e,t);return Ul.getFirstRect(n)},_u=function(e,t,n){return ou(e,t,n)},Su=tinymce.util.Tools.resolve("tinymce.util.VK"),ku=function(e,t,n,r){return Ru(e,t,Rl(n),r)},Eu=function(e,t,n,r){return Ru(e,t,Ol(n),r)},Tu=function(e,t){var n=Il.exact(t,0,t,0);return yu(n)},Nu=function(e,t){var n,r=bt.descendants(t,"tr");return(n=r,0===n.length?S.none():S.some(n[n.length-1])).bind(function(e){return Ot.descendant(e,"td,th").map(function(e){return Tu(0,e)})})},Ru=function(r,e,t,o,n){return t.fold(S.none,S.none,function(e,t){return vn.first(t).map(function(e){return Tu(0,e)})},function(n){return Lt.table(n,e).bind(function(e){var t=Rr.noMenu(n);return r.undoManager.transact(function(){o.insertRowsAfter(e,t)}),Nu(0,e)})})},Ou=["table","li","dl"],Pu=function(t,n,r,o){if(t.keyCode===Su.TAB){var i=Qa(n),a=function(e){var t=st.name(e);return qe.eq(e,i)||N(Ou,t)},e=n.selection.getRng();if(e.collapsed){var s=ue.fromDom(e.startContainer);Lt.cell(s,a).each(function(e){t.preventDefault(),(t.shiftKey?Eu:ku)(n,a,e,r,o).each(function(e){n.selection.setRng(e)})})}}},Au={response:Y("selection","kill")},Du=function(t){return function(e){return e===t}},Mu=Du(38),Iu=Du(40),Lu={ltr:{isBackward:Du(37),isForward:Du(39)},rtl:{isBackward:Du(39),isForward:Du(37)},isUp:Mu,isDown:Iu,isNavigation:function(e){return 37<=e&&e<=40}},Bu=function(e,t){var n=ql.asLtrRange(e,t);return{start:C(ue.fromDom(n.startContainer)),soffset:C(n.startOffset),finish:C(ue.fromDom(n.endContainer)),foffset:C(n.endOffset)}},Fu=function(e,t,n,r){return{start:C(Al.on(e,t)),finish:C(Al.on(n,r))}},ju=(ze.detect().browser.isSafari(),function(e){var t=void 0!==e?e.dom():document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return to(n,r)}),Hu=ju,Uu=function(e,t,n){(void 0!==n?n.dom():document).defaultView.scrollBy(e,t)};function zu(i){return{elementFromPoint:function(e,t){return ue.fromPoint(ue.fromDom(i.document),e,t)},getRect:function(e){return e.dom().getBoundingClientRect()},getRangedRect:function(e,t,n,r){var o=Il.exact(e,t,n,r);return Cu(i,o).map(function(e){return $(e,s)})},getSelection:function(){return vu(i).map(function(e){return Bu(i,e)})},fromSitus:function(e){var t=Il.relative(e.start(),e.finish());return Bu(i,t)},situsFromPoint:function(e,t){return _u(i,e,t).map(function(e){return{start:C(Al.on(e.start(),e.soffset())),finish:C(Al.on(e.finish(),e.foffset()))}})},clearSelection:function(){xu(i)},setSelection:function(e){gu(i,e.start(),e.soffset(),e.finish(),e.foffset())},setRelativeSelection:function(e,t){bu(i,e,t)},selectContents:function(e){wu(i,e)},getInnerHeight:function(){return i.innerHeight},getScrollY:function(){return Hu(ue.fromDom(i.document)).top()},scrollBy:function(e,t){Uu(e,t,ue.fromDom(i.document))}}}var Wu=function(n,e,r,t,o){return qe.eq(r,t)?S.none():cr(r,t,e).bind(function(e){var t=e.boxes().getOr([]);return 0<t.length?(o(n,t,e.start(),e.finish()),S.some(Au.response(S.some(Fu(r,0,r,mn(r))),!0))):S.none()})},Vu={sync:function(n,r,e,t,o,i,a){return qe.eq(e,o)&&t===i?S.none():Ot.closest(e,"td,th",r).bind(function(t){return Ot.closest(o,"td,th",r).bind(function(e){return Wu(n,r,t,e,a)})})},detect:Wu,update:function(e,t,n,r,o){return dr(r,e,t,o.firstSelectedSelector(),o.lastSelectedSelector()).map(function(e){return o.clear(n),o.selectRange(n,e.boxes(),e.start(),e.finish()),e.boxes()})}},qu=ee(["left","top","right","bottom"],[]),$u={nu:qu,moveUp:function(e,t){return qu({left:e.left(),top:e.top()-t,right:e.right(),bottom:e.bottom()-t})},moveDown:function(e,t){return qu({left:e.left(),top:e.top()+t,right:e.right(),bottom:e.bottom()+t})},moveBottomTo:function(e,t){var n=e.bottom()-e.top();return qu({left:e.left(),top:t-n,right:e.right(),bottom:t})},moveTopTo:function(e,t){var n=e.bottom()-e.top();return qu({left:e.left(),top:t,right:e.right(),bottom:t+n})},getTop:function(e){return e.top()},getBottom:function(e){return e.bottom()},translate:function(e,t,n){return qu({left:e.left()+t,top:e.top()+n,right:e.right()+t,bottom:e.bottom()+n})},toString:function(e){return"("+e.left()+", "+e.top()+") -> ("+e.right()+", "+e.bottom()+")"}},Xu=function(e){return $u.nu({left:e.left,top:e.top,right:e.right,bottom:e.bottom})},Yu=function(e,t){return S.some(e.getRect(t))},Gu=function(e,t,n){return st.isElement(t)?Yu(e,t).map(Xu):st.isText(t)?(r=e,o=t,i=n,0<=i&&i<mn(o)?r.getRangedRect(o,i,o,i+1):0<i?r.getRangedRect(o,i-1,o,i):S.none()).map(Xu):S.none();var r,o,i},Ku=function(e,t){return st.isElement(t)?Yu(e,t).map(Xu):st.isText(t)?e.getRangedRect(t,0,t,mn(t)).map(Xu):S.none()},Ju=Y("item","mode"),Zu=function(e,t,n,r){var o=void 0!==r?r:Qu;return e.property().parent(t).map(function(e){return Ju(e,o)})},Qu=function(e,t,n,r){var o=void 0!==r?r:ec;return n.sibling(e,t).map(function(e){return Ju(e,o)})},ec=function(e,t,n,r){var o=void 0!==r?r:ec,i=e.property().children(t);return n.first(i).map(function(e){return Ju(e,o)})},tc=[{current:Zu,next:Qu,fallback:S.none()},{current:Qu,next:ec,fallback:S.some(Zu)},{current:ec,next:ec,fallback:S.some(Qu)}],nc=function(t,n,r,o,e){return I(e=void 0!==e?e:tc,function(e){return e.current===r}).bind(function(e){return e.current(t,n,o,e.next).orThunk(function(){return e.fallback.bind(function(e){return nc(t,n,e,o)})})})},rc={backtrack:Zu,sidestep:Qu,advance:ec,go:nc},oc={left:function(){return{sibling:function(e,t){return e.query().prevSibling(t)},first:function(e){return 0<e.length?S.some(e[e.length-1]):S.none()}}},right:function(){return{sibling:function(e,t){return e.query().nextSibling(t)},first:function(e){return 0<e.length?S.some(e[0]):S.none()}}}},ic=function(t,e,n,r,o,i){return rc.go(t,e,r,o).bind(function(e){return i(e.item())?S.none():n(e.item())?S.some(e.item()):ic(t,e.item(),n,e.mode(),o,i)})},ac=function(e,t,n,r){return ic(e,t,n,rc.sidestep,oc.left(),r)},sc=function(e,t,n,r){return ic(e,t,n,rc.sidestep,oc.right(),r)},lc=function(e,t){return 0===e.property().children(t).length},uc=function(e,t,n,r){return ac(e,t,n,r)},cc=function(e,t,n,r){return sc(e,t,n,r)},fc={before:function(e,t,n){return uc(e,t,_(lc,e),n)},after:function(e,t,n){return cc(e,t,_(lc,e),n)},seekLeft:uc,seekRight:cc,walkers:function(){return{left:oc.left,right:oc.right}},walk:function(e,t,n,r,o){return rc.go(e,t,n,r,o)},backtrack:rc.backtrack,sidestep:rc.sidestep,advance:rc.advance},dc=En(),pc={gather:function(e,t,n){return fc.gather(dc,e,t,n)},before:function(e,t){return fc.before(dc,e,t)},after:function(e,t){return fc.after(dc,e,t)},seekLeft:function(e,t,n){return fc.seekLeft(dc,e,t,n)},seekRight:function(e,t,n){return fc.seekRight(dc,e,t,n)},walkers:function(){return fc.walkers()},walk:function(e,t,n,r){return fc.walk(dc,e,t,n,r)}},mc=wr([{none:[]},{retry:["caret"]}]),hc=function(t,e,r){return Nt.closest(e,Bo).fold(C(!1),function(e){return Ku(t,e).exists(function(e){return n=e,(t=r).left()<n.left()||Math.abs(n.right()-t.left())<1||t.left()>n.right();var t,n})})},gc={point:$u.getTop,adjuster:function(e,t,n,r,o){var i=$u.moveUp(o,5);return Math.abs(n.top()-r.top())<1?mc.retry(i):n.bottom()<o.top()?mc.retry(i):n.bottom()===o.top()?mc.retry($u.moveUp(o,1)):hc(e,t,o)?mc.retry($u.translate(i,5,0)):mc.none()},move:$u.moveUp,gather:pc.before},vc={point:$u.getBottom,adjuster:function(e,t,n,r,o){var i=$u.moveDown(o,5);return Math.abs(n.bottom()-r.bottom())<1?mc.retry(i):n.top()>o.bottom()?mc.retry(i):n.top()===o.bottom()?mc.retry($u.moveDown(o,1)):hc(e,t,o)?mc.retry($u.translate(i,5,0)):mc.none()},move:$u.moveDown,gather:pc.after},bc=function(n,r,o,i,a){return 0===a?S.some(i):(l=n,u=i.left(),c=r.point(i),l.elementFromPoint(u,c).filter(function(e){return"table"===st.name(e)}).isSome()?(t=i,s=a-1,bc(n,e=r,o,e.move(t,5),s)):n.situsFromPoint(i.left(),r.point(i)).bind(function(e){return e.start().fold(S.none,function(t,e){return Ku(n,t,e).bind(function(e){return r.adjuster(n,t,e,o,i).fold(S.none,function(e){return bc(n,r,o,e,a-1)})}).orThunk(function(){return S.some(i)})},S.none)}));var e,t,s,l,u,c},yc=function(t,n,e){var r,o,i,a=t.move(e,5),s=bc(n,t,e,a,100).getOr(a);return(r=t,o=s,i=n,r.point(o)>i.getInnerHeight()?S.some(r.point(o)-i.getInnerHeight()):r.point(o)<0?S.some(-r.point(o)):S.none()).fold(function(){return n.situsFromPoint(s.left(),t.point(s))},function(e){return n.scrollBy(0,e),n.situsFromPoint(s.left(),t.point(s)-e)})},wc={tryUp:_(yc,gc),tryDown:_(yc,vc),ieTryUp:function(e,t){return e.situsFromPoint(t.left(),t.top()-5)},ieTryDown:function(e,t){return e.situsFromPoint(t.left(),t.bottom()+5)},getJumpSize:C(5)},xc=wr([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),Cc=function(e){return Ot.closest(e,"tr")},_c={verify:function(s,e,t,n,r,l,o){return Ot.closest(n,"td,th",o).bind(function(a){return Ot.closest(e,"td,th",o).map(function(i){return qe.eq(a,i)?qe.eq(n,a)&&mn(a)===r?l(i):xc.none("in same cell"):$n.sharedOne(Cc,[a,i]).fold(function(){return t=i,n=a,r=(e=s).getRect(t),(o=e.getRect(n)).right>r.left&&o.left<r.right?xc.success():l(i);var e,t,n,r,o},function(e){return l(i)})})}).getOr(xc.none("default"))},cata:function(e,t,n,r,o){return e.fold(t,n,r,o)},adt:xc},Sc={point:Y("element","offset"),delta:Y("element","deltaOffset"),range:Y("element","start","finish"),points:Y("begin","end"),text:Y("element","text")},kc=(Y("ancestor","descendants","element","index"),Y("parent","children","element","index")),Ec=function(e,t){return L(e,_(qe.eq,t))},Tc=function(r){return Ze.parent(r).bind(function(t){var n=Ze.children(t);return Ec(n,r).map(function(e){return kc(t,n,r,e)})})},Nc=function(e){return"br"===st.name(e)},Rc=function(e,t,n){return t(e,n).bind(function(e){return st.isText(e)&&0===fn.get(e).trim().length?Rc(e,t,n):S.some(e)})},Oc=function(t,e,n,r){return(o=e,i=n,Ze.child(o,i).filter(Nc).orThunk(function(){return Ze.child(o,i-1).filter(Nc)})).bind(function(e){return r.traverse(e).fold(function(){return Rc(e,r.gather,t).map(r.relative)},function(e){return Tc(e).map(function(e){return Al.on(e.parent(),e.index())})})});var o,i},Pc=function(e,t,n,r){var o,i,a;return(Nc(t)?(o=e,i=t,(a=r).traverse(i).orThunk(function(){return Rc(i,a.gather,o)}).map(a.relative)):Oc(e,t,n,r)).map(function(e){return{start:C(e),finish:C(e)}})},Ac=function(e){return _c.cata(e,function(e){return S.none()},function(){return S.none()},function(e){return S.some(Sc.point(e,0))},function(e){return S.some(Sc.point(e,mn(e)))})},Dc=ze.detect(),Mc=function(r,o,i,a,s,l){return 0===l?S.none():Bc(r,o,i,a,s).bind(function(e){var t=r.fromSitus(e),n=_c.verify(r,i,a,t.finish(),t.foffset(),s.failure,o);return _c.cata(n,function(){return S.none()},function(){return S.some(e)},function(e){return qe.eq(i,e)&&0===a?Ic(r,i,a,$u.moveUp,s):Mc(r,o,e,0,s,l-1)},function(e){return qe.eq(i,e)&&a===mn(e)?Ic(r,i,a,$u.moveDown,s):Mc(r,o,e,mn(e),s,l-1)})})},Ic=function(t,e,n,r,o){return Gu(t,e,n).bind(function(e){return Lc(t,o,r(e,wc.getJumpSize()))})},Lc=function(e,t,n){return Dc.browser.isChrome()||Dc.browser.isSafari()||Dc.browser.isFirefox()||Dc.browser.isEdge()?t.otherRetry(e,n):Dc.browser.isIE()?t.ieRetry(e,n):S.none()},Bc=function(t,e,n,r,o){return Gu(t,n,r).bind(function(e){return Lc(t,o,e)})},Fc=function(t,n,r){return(o=t,i=n,a=r,o.getSelection().bind(function(r){return Pc(i,r.finish(),r.foffset(),a).fold(function(){return S.some(Sc.point(r.finish(),r.foffset()))},function(e){var t=o.fromSitus(e),n=_c.verify(o,r.finish(),r.foffset(),t.finish(),t.foffset(),a.failure,i);return Ac(n)})})).bind(function(e){return Mc(t,n,e.element(),e.offset(),r,20).map(t.fromSitus)});var o,i,a},jc=function(e,t,n){return Nt.ancestor(e,t,n).isSome()},Hc=ze.detect(),Uc=function(r,o,i,e,a){return Ot.closest(e,"td,th",o).bind(function(n){return Ot.closest(n,"table",o).bind(function(e){return t=e,jc(a,function(e){return Ze.parent(e).exists(function(e){return qe.eq(e,t)})})?Fc(r,o,i).bind(function(t){return Ot.closest(t.finish(),"td,th",o).map(function(e){return{start:C(n),finish:C(e),range:C(t)}})}):S.none();var t})})},zc=function(e,t,n,r,o,i){return Hc.browser.isIE()?S.none():i(r,t).orThunk(function(){return Uc(e,t,n,r,o).map(function(e){var t=e.range();return Au.response(S.some(Fu(t.start(),t.soffset(),t.finish(),t.foffset())),!0)})})},Wc=function(e,t,n,r,o,i,a){return Uc(e,n,r,o,i).bind(function(e){return Vu.detect(t,n,e.start(),e.finish(),a)})},Vc=function(e,r){return Ot.closest(e,"tr",r).bind(function(n){return Ot.closest(n,"table",r).bind(function(e){var t=bt.descendants(e,"tr");return qe.eq(n,t[0])?pc.seekLeft(e,function(e){return vn.last(e).isSome()},r).map(function(e){var t=mn(e);return Au.response(S.some(Fu(e,t,e,t)),!0)}):S.none()})})},qc=function(e,r){return Ot.closest(e,"tr",r).bind(function(n){return Ot.closest(n,"table",r).bind(function(e){var t=bt.descendants(e,"tr");return qe.eq(n,t[t.length-1])?pc.seekRight(e,function(e){return vn.first(e).isSome()},r).map(function(e){return Au.response(S.some(Fu(e,0,e,0)),!0)}):S.none()})})},$c=function(e,t){return Ot.closest(e,"td,th",t)},Xc={down:{traverse:Ze.nextSibling,gather:pc.after,relative:Al.before,otherRetry:wc.tryDown,ieRetry:wc.ieTryDown,failure:_c.adt.failedDown},up:{traverse:Ze.prevSibling,gather:pc.before,relative:Al.before,otherRetry:wc.tryUp,ieRetry:wc.ieTryUp,failure:_c.adt.failedUp}},Yc=Y("rows","cols"),Gc={mouse:function(e,t,n,r){var o,i,a,s,l,u,c=zu(e),f=(o=c,i=t,a=n,s=r,l=S.none(),u=function(){l=S.none()},{mousedown:function(e){s.clear(i),l=$c(e.target(),a)},mouseover:function(e){l.each(function(r){s.clear(i),$c(e.target(),a).each(function(n){cr(r,n,a).each(function(e){var t=e.boxes().getOr([]);(1<t.length||1===t.length&&!qe.eq(r,n))&&(s.selectRange(i,t,e.start(),e.finish()),o.selectContents(n))})})})},mouseup:function(){l.each(u)}});return{mousedown:f.mousedown,mouseover:f.mouseover,mouseup:f.mouseup}},keyboard:function(e,l,u,c){var f=zu(e),d=function(){return c.clear(l),S.none()};return{keydown:function(e,t,n,r,o,i){var a=e.raw().which,s=!0===e.raw().shiftKey;return fr(l,c.selectedSelector()).fold(function(){return Lu.isDown(a)&&s?_(Wc,f,l,u,Xc.down,r,t,c.selectRange):Lu.isUp(a)&&s?_(Wc,f,l,u,Xc.up,r,t,c.selectRange):Lu.isDown(a)?_(zc,f,u,Xc.down,r,t,qc):Lu.isUp(a)?_(zc,f,u,Xc.up,r,t,Vc):S.none},function(t){var e=function(e){return function(){return Vo(e,function(e){return Vu.update(e.rows(),e.cols(),l,t,c)}).fold(function(){return pr(l,c.firstSelectedSelector(),c.lastSelectedSelector()).map(function(e){var t=Lu.isDown(a)||i.isForward(a)?Al.after:Al.before;return f.setRelativeSelection(Al.on(e.first(),0),t(e.table())),c.clear(l),Au.response(S.none(),!0)})},function(e){return S.some(Au.response(S.none(),!0))})}};return Lu.isDown(a)&&s?e([Yc(1,0)]):Lu.isUp(a)&&s?e([Yc(-1,0)]):i.isBackward(a)&&s?e([Yc(0,-1),Yc(-1,0)]):i.isForward(a)&&s?e([Yc(0,1),Yc(1,0)]):Lu.isNavigation(a)&&!1===s?d:S.none})()},keyup:function(t,n,r,o,i){return fr(l,c.selectedSelector()).fold(function(){var e=t.raw().which;return 0==(!0===t.raw().shiftKey)?S.none():Lu.isNavigation(e)?Vu.sync(l,u,n,r,o,i,c.selectRange):S.none()},S.none)}}}},Kc=function(t,e){P(e,function(e){Si.remove(t,e)})},Jc=function(t){return function(e){Si.add(e,t)}},Zc=function(t){return function(e){Kc(e,t)}},Qc={byClass:function(o){var i=Jc(o.selected()),n=Zc([o.selected(),o.lastSelected(),o.firstSelected()]),a=function(e){var t=bt.descendants(e,o.selectedSelector());P(t,n)};return{clear:a,selectRange:function(e,t,n,r){a(e),P(t,i),Si.add(n,o.firstSelected()),Si.add(r,o.lastSelected())},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}},byAttr:function(o){var n=function(e){dt.remove(e,o.selected()),dt.remove(e,o.firstSelected()),dt.remove(e,o.lastSelected())},i=function(e){dt.set(e,o.selected(),"1")},a=function(e){var t=bt.descendants(e,o.selectedSelector());P(t,n)};return{clear:a,selectRange:function(e,t,n,r){a(e),P(t,i),dt.set(n,o.firstSelected(),"1"),dt.set(r,o.lastSelected(),"1")},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}}},ef=function(e){return!1===Si.has(ue.fromDom(e.target),"ephox-snooker-resizer-bar")},tf=Ts.each,nf=function(t){var n=[];function e(e){return function(){t.execCommand(e)}}tf("inserttable tableprops deletetable | cell row column".split(" "),function(e){"|"===e?n.push({text:"-"}):n.push(t.menuItems[e])}),t.addButton("table",{type:"menubutton",title:"Table",menu:n}),t.addButton("tableprops",{title:"Table properties",onclick:e("mceTableProps"),icon:"table"}),t.addButton("tabledelete",{title:"Delete table",onclick:e("mceTableDelete")}),t.addButton("tablecellprops",{title:"Cell properties",onclick:e("mceTableCellProps")}),t.addButton("tablemergecells",{title:"Merge cells",onclick:e("mceTableMergeCells")}),t.addButton("tablesplitcells",{title:"Split cell",onclick:e("mceTableSplitCells")}),t.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:e("mceTableInsertRowBefore")}),t.addButton("tableinsertrowafter",{title:"Insert row after",onclick:e("mceTableInsertRowAfter")}),t.addButton("tabledeleterow",{title:"Delete row",onclick:e("mceTableDeleteRow")}),t.addButton("tablerowprops",{title:"Row properties",onclick:e("mceTableRowProps")}),t.addButton("tablecutrow",{title:"Cut row",onclick:e("mceTableCutRow")}),t.addButton("tablecopyrow",{title:"Copy row",onclick:e("mceTableCopyRow")}),t.addButton("tablepasterowbefore",{title:"Paste row before",onclick:e("mceTablePasteRowBefore")}),t.addButton("tablepasterowafter",{title:"Paste row after",onclick:e("mceTablePasteRowAfter")}),t.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:e("mceTableInsertColBefore")}),t.addButton("tableinsertcolafter",{title:"Insert column after",onclick:e("mceTableInsertColAfter")}),t.addButton("tabledeletecol",{title:"Delete column",onclick:e("mceTableDeleteCol")})},rf=function(t){var e,n=""===(e=t.getParam("table_toolbar",cs))||!1===e?[]:v(e)?e.split(/[ ,]/):b(e)?e:[];0<n.length&&t.addContextToolbar(function(e){return t.dom.is(e,"table")&&t.getBody().contains(e)},n.join(" "))},of=function(o,n){var r=S.none(),i=[],a=[],s=[],l=[],u=function(e){e.disabled(!0)},c=function(e){e.disabled(!1)},e=function(){var t=this;i.push(t),r.fold(function(){u(t)},function(e){c(t)})},t=function(){var t=this;a.push(t),r.fold(function(){u(t)},function(e){c(t)})};o.on("init",function(){o.on("nodechange",function(e){var t=S.from(o.dom.getParent(o.selection.getStart(),"th,td"));(r=t.bind(function(e){var t=ue.fromDom(e);return Lt.table(t).map(function(e){return Rr.forMenu(n,e,t)})})).fold(function(){P(i,u),P(a,u),P(s,u),P(l,u)},function(t){P(i,c),P(a,c),P(s,function(e){e.disabled(t.mergable().isNone())}),P(l,function(e){e.disabled(t.unmergable().isNone())})})})});var f=function(e,t,n,r){var o,i,a,s,l,u=r.getEl().getElementsByTagName("table")[0],c=r.isRtl()||"tl-tr"===r.parent().rel;for(u.nextSibling.innerHTML=t+1+" x "+(n+1),c&&(t=9-t),i=0;i<10;i++)for(o=0;o<10;o++)s=u.rows[i].childNodes[o].firstChild,l=(c?t<=o:o<=t)&&i<=n,e.dom.toggleClass(s,"mce-active",l),l&&(a=s);return a.parentNode},d=!1===o.getParam("table_grid",!0,"boolean")?{text:"Table",icon:"table",context:"table",onclick:p("mceInsertTable")}:{text:"Table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(e){e.aria&&(this.parent().hideAll(),e.stopImmediatePropagation(),o.execCommand("mceInsertTable"))},onshow:function(){f(o,0,0,this.menu.items()[0])},onhide:function(){var e=this.menu.items()[0].getEl().getElementsByTagName("a");o.dom.removeClass(e,"mce-active"),o.dom.addClass(e[0],"mce-active")},menu:[{type:"container",html:function(){var e="";e='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var t=0;t<10;t++){e+="<tr>";for(var n=0;n<10;n++)e+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*t+n)+'" href="#" data-mce-x="'+n+'" data-mce-y="'+t+'"></a></td>';e+="</tr>"}return e+="</table>",e+='<div class="mce-text-center" role="presentation">1 x 1</div>'}(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(e){var t,n,r=e.target;"A"===r.tagName.toUpperCase()&&(t=parseInt(r.getAttribute("data-mce-x"),10),n=parseInt(r.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"===this.parent().rel)&&(t=9-t),t===this.lastX&&n===this.lastY||(f(o,t,n,e.control),this.lastX=t,this.lastY=n))},onclick:function(e){var t=this;"A"===e.target.tagName.toUpperCase()&&(e.preventDefault(),e.stopPropagation(),t.parent().cancel(),o.undoManager.transact(function(){$s(o,t.lastX+1,t.lastY+1)}),o.addVisual())}}]};function p(e){return function(){o.execCommand(e)}}var m={text:"Table properties",context:"table",onPostRender:e,onclick:p("mceTableProps")},h={text:"Delete table",context:"table",onPostRender:e,cmd:"mceTableDelete"},g={text:"Row",context:"table",menu:[{text:"Insert row before",onclick:p("mceTableInsertRowBefore"),onPostRender:t},{text:"Insert row after",onclick:p("mceTableInsertRowAfter"),onPostRender:t},{text:"Delete row",onclick:p("mceTableDeleteRow"),onPostRender:t},{text:"Row properties",onclick:p("mceTableRowProps"),onPostRender:t},{text:"-"},{text:"Cut row",onclick:p("mceTableCutRow"),onPostRender:t},{text:"Copy row",onclick:p("mceTableCopyRow"),onPostRender:t},{text:"Paste row before",onclick:p("mceTablePasteRowBefore"),onPostRender:t},{text:"Paste row after",onclick:p("mceTablePasteRowAfter"),onPostRender:t}]},v={text:"Column",context:"table",menu:[{text:"Insert column before",onclick:p("mceTableInsertColBefore"),onPostRender:t},{text:"Insert column after",onclick:p("mceTableInsertColAfter"),onPostRender:t},{text:"Delete column",onclick:p("mceTableDeleteCol"),onPostRender:t}]},b={separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:p("mceTableCellProps"),onPostRender:t},{text:"Merge cells",onclick:p("mceTableMergeCells"),onPostRender:function(){var t=this;s.push(t),r.fold(function(){u(t)},function(e){t.disabled(e.mergable().isNone())})}},{text:"Split cell",onclick:p("mceTableSplitCells"),onPostRender:function(){var t=this;l.push(t),r.fold(function(){u(t)},function(e){t.disabled(e.unmergable().isNone())})}}]};o.addMenuItem("inserttable",d),o.addMenuItem("tableprops",m),o.addMenuItem("deletetable",h),o.addMenuItem("row",g),o.addMenuItem("column",v),o.addMenuItem("cell",b)},af=function(n,r){return{insertTable:function(e,t){return $s(n,e,t)},setClipboardRows:function(e){return t=r,n=O(e,ue.fromDom),void t.set(S.from(n));var t,n},getClipboardRows:function(){return r.get().fold(function(){},function(e){return O(e,function(e){return e.dom()})})}}};i.add("table",function(t){var h,g,v,b,y,n,r=Cl(t),e=(h=t,g=r.lazyResize,v=ee(["mousedown","mouseover","mouseup","keyup","keydown"],[]),b=S.none(),y=Qc.byAttr(yr),h.on("init",function(e){var r=h.getWin(),o=Qa(h),t=ns(h),n=Gc.mouse(r,o,t,y),s=Gc.keyboard(r,o,t,y),l=function(e,t){!0===e.raw().shiftKey&&(t.kill()&&e.kill(),t.selection().each(function(e){var t=Il.relative(e.start(),e.finish()),n=ql.asLtrRange(r,t);h.selection.setRng(n)}))},i=function(e){var t=c(e);if(t.raw().shiftKey&&Lu.isNavigation(t.raw().which)){var n=h.selection.getRng(),r=ue.fromDom(n.startContainer),o=ue.fromDom(n.endContainer);s.keyup(t,r,n.startOffset,o,n.endOffset).each(function(e){l(t,e)})}},a=function(e){var t=c(e);g().each(function(e){e.hideBars()});var n=h.selection.getRng(),r=ue.fromDom(h.selection.getStart()),o=ue.fromDom(n.startContainer),i=ue.fromDom(n.endContainer),a=us.directionAt(r).isRtl()?Lu.rtl:Lu.ltr;s.keydown(t,o,n.startOffset,i,n.endOffset,a).each(function(e){l(t,e)}),g().each(function(e){e.showBars()})},u=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},c=function(e){var t=ue.fromDom(e.target),n=function(){e.stopPropagation()},r=function(){e.preventDefault()},o=x(r,n);return{target:C(t),x:C(u(e)?e.x:null),y:C(u(e)?e.y:null),stop:n,prevent:r,kill:o,raw:C(e)}},f=function(e){return 0===e.button},d=function(e){f(e)&&ef(e)&&n.mousedown(c(e))},p=function(e){var t;void 0!==(t=e).buttons&&0==(1&t.buttons)||!ef(e)||n.mouseover(c(e))},m=function(e){f(e)&&ef(e)&&n.mouseup(c(e))};h.on("mousedown",d),h.on("mouseover",p),h.on("mouseup",m),h.on("keyup",i),h.on("keydown",a),h.on("nodechange",function(){var e=h.selection,t=ue.fromDom(e.getStart()),n=ue.fromDom(e.getEnd());$n.sharedOne(Lt.table,[t,n]).fold(function(){y.clear(o)},w)}),b=S.some(v({mousedown:d,mouseover:p,mouseup:m,keyup:i,keydown:a}))}),{clear:y.clear,destroy:function(){b.each(function(e){})}}),o=ks(t,r.lazyWire),i=(n=t,{get:function(){var e=Qa(n);return mr(e,yr.selectedSelector()).fold(function(){return void 0===n.selection.getStart()?Cr.none():Cr.single(n.selection)},function(e){return Cr.multiple(e)})}}),a=xo(S.none());return Js(t,o,e,i,a),Or(t,i,o,e),of(t,i),nf(t),rf(t),t.on("PreInit",function(){t.serializer.addTempAttr(yr.firstSelected()),t.serializer.addTempAttr(yr.lastSelected())}),t.getParam("table_tab_navigation",!0,"boolean")&&t.on("keydown",function(e){Pu(e,t,o,r.lazyWire)}),t.on("remove",function(){r.destroy(),e.destroy()}),af(t,a)})}()},b447:function(e,t,n){var r=n("3a38"),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},b50d:function(e,t,d){"use strict";var p=d("c532"),m=d("467f"),h=d("30b5"),g=d("c345"),v=d("3934"),b=d("2d83"),y="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||d("9fa6");e.exports=function(f){return new Promise(function(n,r){var o=f.data,i=f.headers;p.isFormData(o)&&delete i["Content-Type"];var a=new XMLHttpRequest,e="onreadystatechange",s=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in a||v(f.url)||(a=new window.XDomainRequest,e="onload",s=!0,a.onprogress=function(){},a.ontimeout=function(){}),f.auth){var t=f.auth.username||"",l=f.auth.password||"";i.Authorization="Basic "+y(t+":"+l)}if(a.open(f.method.toUpperCase(),h(f.url,f.params,f.paramsSerializer),!0),a.timeout=f.timeout,a[e]=function(){if(a&&(4===a.readyState||s)&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in a?g(a.getAllResponseHeaders()):null,t={data:f.responseType&&"text"!==f.responseType?a.response:a.responseText,status:1223===a.status?204:a.status,statusText:1223===a.status?"No Content":a.statusText,headers:e,config:f,request:a};m(n,r,t),a=null}},a.onerror=function(){r(b("Network Error",f,null,a)),a=null},a.ontimeout=function(){r(b("timeout of "+f.timeout+"ms exceeded",f,"ECONNABORTED",a)),a=null},p.isStandardBrowserEnv()){var u=d("7aac"),c=(f.withCredentials||v(f.url))&&f.xsrfCookieName?u.read(f.xsrfCookieName):void 0;c&&(i[f.xsrfHeaderName]=c)}if("setRequestHeader"in a&&p.forEach(i,function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:a.setRequestHeader(t,e)}),f.withCredentials&&(a.withCredentials=!0),f.responseType)try{a.responseType=f.responseType}catch(e){if("json"!==f.responseType)throw e}"function"==typeof f.onDownloadProgress&&a.addEventListener("progress",f.onDownloadProgress),"function"==typeof f.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",f.onUploadProgress),f.cancelToken&&f.cancelToken.promise.then(function(e){a&&(a.abort(),r(e),a=null)}),void 0===o&&(o=null),a.send(o)})}},b621:function(e,t,n){n("ef8b")},b8e3:function(e,t){e.exports=!0},ba71:function(e,t){!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){e.fire("VisualBlocks",{state:t})},o=function(e){return e.getParam("visualblocks_default_state",!1)},a=function(e){return e.settings.visualblocks_content_css},s=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=s.DOM.uniqueId(),c=function(e,t){var n=l.toArray(e.getElementsByTagName("link"));if(0===l.grep(n,function(e){return e.id===u}).length){var r=s.DOM.create("link",{id:u,rel:"stylesheet",href:t});e.getElementsByTagName("head")[0].appendChild(r)}},f=function(e,t,n){var r=e.dom,o=a(e);c(e.getDoc(),o||t+"/css/visualblocks.css"),r.toggleClass(e.getBody(),"mce-visualblocks"),n.set(!n.get()),i(e,n.get())},d=function(e,t,n){e.addCommand("mceVisualBlocks",function(){f(e,t,n)})},p=function(t,e,n){t.on("PreviewFormats AfterPreviewFormats",function(e){n.get()&&t.dom.toggleClass(t.getBody(),"mce-visualblocks","afterpreviewformats"===e.type)}),t.on("init",function(){o(t)&&f(t,e,n)}),t.on("remove",function(){t.dom.removeClass(t.getBody(),"mce-visualblocks")})},n=function(n,r){return function(e){var t=e.control;t.active(r.get()),n.on("VisualBlocks",function(e){t.active(e.state)})}},m=function(e,t){e.addButton("visualblocks",{active:!1,title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n(e,t)}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n(e,t),selectable:!0,context:"view",prependToContext:!0})};e.add("visualblocks",function(e,t){var n=r(!1);d(e,t,n),m(e,n),p(e,t,n)})}()},bc3a:function(e,t,n){e.exports=n("cee4")},bcaa:function(e,t,n){var r=n("cb7c"),o=n("d3f4"),i=n("a5b8");e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},be13:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},bf0b:function(e,t,n){var r=n("355d"),o=n("aebd"),i=n("36c3"),a=n("1bc3"),s=n("07e3"),l=n("794b"),u=Object.getOwnPropertyDescriptor;t.f=n("8e60")?u:function(e,t){if(e=i(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},bf90:function(e,t,n){var r=n("36c3"),o=n("bf0b").f;n("ce7e")("getOwnPropertyDescriptor",function(){return function(e,t){return o(r(e),t)}})},c26b:function(e,t,n){"use strict";var r=n("8bbf"),o=n.n(r);t.a=new o.a},c307:function(e,t,n){n("5ecf")},c345:function(e,t,n){"use strict";var i=n("c532"),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,r,o={};return e&&i.forEach(e.split("\n"),function(e){if(r=e.indexOf(":"),t=i.trim(e.substr(0,r)).toLowerCase(),n=i.trim(e.substr(r+1)),t){if(o[t]&&0<=a.indexOf(t))return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}}),o}},c366:function(e,t,n){var l=n("6821"),u=n("9def"),c=n("77f1");e.exports=function(s){return function(e,t,n){var r,o=l(e),i=u(o.length),a=c(n,i);if(s&&t!=t){for(;a<i;)if((r=o[a++])!=r)return!0}else for(;a<i;a++)if((s||a in o)&&o[a]===t)return s||a||0;return!s&&-1}}},c367:function(e,t,n){"use strict";var r=n("8436"),o=n("50ed"),i=n("481b"),a=n("36c3");e.exports=n("30f1")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},c3a1:function(e,t,n){var r=n("e6f3"),o=n("1691");e.exports=Object.keys||function(e){return r(e,o)}},c3d2:function(e,t,n){},c401:function(e,t,n){"use strict";var r=n("c532");e.exports=function(t,n,e){return r.forEach(e,function(e){t=e(t,n)}),t}},c4be:function(e,t,n){},c532:function(e,t,n){"use strict";var o=n("1d2b"),r=n("044b"),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:r,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function n(){var r={};function e(e,t){"object"==typeof r[t]&&"object"==typeof e?r[t]=n(r[t],e):r[t]=e}for(var t=0,o=arguments.length;t<o;t++)u(arguments[t],e);return r},extend:function(n,e,r){return u(e,function(e,t){n[t]=r&&"function"==typeof e?o(e,r):e}),n},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},c5f6:function(e,t,n){"use strict";var r=n("7726"),o=n("69a8"),i=n("2d95"),a=n("5dbc"),c=n("6a99"),s=n("79e5"),l=n("9093").f,u=n("11e9").f,f=n("86cc").f,d=n("aa77").trim,p="Number",m=r[p],h=m,g=m.prototype,v=i(n("2aeb")(g))==p,b="trim"in String.prototype,y=function(e){var t=c(e,!1);if("string"==typeof t&&2<t.length){var n,r,o,i=(t=b?t.trim():d(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+t}for(var a,s=t.slice(2),l=0,u=s.length;l<u;l++)if((a=s.charCodeAt(l))<48||o<a)return NaN;return parseInt(s,r)}}return+t};if(!m(" 0o1")||!m("0b1")||m("+0x1")){m=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof m&&(v?s(function(){g.valueOf.call(n)}):i(n)!=p)?a(new h(y(t)),n,m):y(t)};for(var w,x=n("9e1e")?l(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;x.length>C;C++)o(h,w=x[C])&&!o(m,w)&&f(m,w,u(h,w));(m.prototype=g).constructor=m,n("2aba")(r,p,m)}},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c7f0:function(e,t,n){"use strict";var a=n("cebc"),r=(n("28a5"),n("20d6"),n("c5f6"),n("c82c")),o=n.n(r),i=n("cea2");n("0808");var s={props:{value:{type:Array,default:function(){return[]}},width:{type:Number,default:100},height:{type:Number,default:100},token:{type:String,default:""},domain:{type:String,default:""},multiple:{type:Boolean,default:!0},length:{type:Number,default:9}},data:function(){return{fileList:this.value.map(function(e){return{key:e.key?e.key:(new Date).getTime()+"_"+Math.ceil(99999*Math.random()),url:e.url,percent:e.percent?e.percent:100,status:e.status?e.status:"success"}}),viewer:null,uploadId:"upload_"+(new Date).getTime()}},computed:{miniWidth:function(){return this.width>this.height?this.height:this.width}},methods:{handleChange:function(){for(var o=this,i=this.$refs.uploadInput.files,e=function(e){var t=i[e],n=new FileReader,r=(new Date).getTime()+"_"+Math.ceil(99999*Math.random());n.readAsDataURL(t),n.onload=function(){o.fileList.push({key:r,url:n.result,percent:0,status:"uploading"}),o.$nextTick(function(){o.uplaodAction2(n.result,t,r)})}},t=0;t<i.length;t++)e(t);this.$refs.uploadInput.value=[]},uplaodAction:function(e,t,n){var r=this,o=(this.fileList.findIndex(function(e){return e.key===n}),new XMLHttpRequest),i="http://upload-z2.qiniu.com/putb64/"+t.size;o.open("POST",i,!0),o.setRequestHeader("Content-Type","application/octet-stream"),o.setRequestHeader("Authorization","UpToken "+this.token),o.send(e.split(",")[1]),o.onreadystatechange=function(){if(4===o.readyState){var e=JSON.parse(o.response);e?(r.$set(r.fileList,r.fileList.findIndex(function(e){return e.key===n}),Object(a.a)({},r.fileList[r.fileList.findIndex(function(e){return e.key===n})],{url:r.domain+e.key,percent:100})),setTimeout(function(){r.$set(r.fileList,r.fileList.findIndex(function(e){return e.key===n}),Object(a.a)({},r.fileList[r.fileList.findIndex(function(e){return e.key===n})],{status:"success"})),r.$emit("input",r.fileList)},200)):(r.$set(r.fileList,r.fileList.findIndex(function(e){return e.key===n}),Object(a.a)({},r.fileList[r.fileList.findIndex(function(e){return e.key===n})],{status:"error"})),r.fileList.splice(r.fileList.findIndex(function(e){return e.key===n}),1))}},o.onprogress=function(e){e.total&&e.loaded&&r.$set(r.fileList[r.fileList.findIndex(function(e){return e.key===n})],"percent",e.loaded/e.total*100)}},uplaodAction2:function(e,t,n){var r=this;i.upload(t,n,this.token,{fname:n,mimeType:[]},{useCdnDomain:!0,region:i.region.z2}).subscribe({next:function(e){r.$set(r.fileList[r.fileList.findIndex(function(e){return e.key===n})],"percent",parseInt(e.total.percent))},error:function(e){r.$set(r.fileList,r.fileList.findIndex(function(e){return e.key===n}),Object(a.a)({},r.fileList[r.fileList.findIndex(function(e){return e.key===n})],{status:"error"})),r.fileList.splice(r.fileList.findIndex(function(e){return e.key===n}),1)},complete:function(e){r.$set(r.fileList,r.fileList.findIndex(function(e){return e.key===n}),Object(a.a)({},r.fileList[r.fileList.findIndex(function(e){return e.key===n})],{url:r.domain+e.key,percent:100})),setTimeout(function(){r.$set(r.fileList,r.fileList.findIndex(function(e){return e.key===n}),Object(a.a)({},r.fileList[r.fileList.findIndex(function(e){return e.key===n})],{status:"success"})),r.$emit("input",r.fileList)},200)}})},handleRemove:function(t){this.fileList.splice(this.fileList.findIndex(function(e){return e.key===t}),1)},handlePreviewFile:function(t){var e=this;this.viewer&&this.viewer.destroy(),this.uploadId="upload_"+(new Date).getTime(),this.$nextTick(function(){e.viewer=new o.a(document.getElementById(e.uploadId)),e.viewer.view(e.fileList.findIndex(function(e){return e.key===t}))})}},watch:{}},l=(n("3516"),n("2877")),u=Object(l.a)(s,function(){var n=this,e=n.$createElement,r=n._self._c||e;return r("div",{staticClass:"fm-uplaod-container",attrs:{id:n.uploadId}},[n._l(n.fileList,function(t){return r("div",{key:t.key,staticClass:"upload-file",class:{uploading:"uploading"==t.status,"is-success":"success"==t.status},style:{width:n.width+"px",height:n.height+"px"},attrs:{id:t.key}},[r("img",{attrs:{src:t.url}}),"uploading"==t.status?r("el-progress",{staticClass:"upload-progress",attrs:{width:.9*n.miniWidth,type:"circle",percentage:t.percent}}):n._e(),"success"==t.status?r("label",{staticClass:"item-status"},[r("i",{staticClass:"el-icon-upload-success el-icon-check"})]):n._e(),r("div",{staticClass:"uplaod-action"},[r("i",{staticClass:"el-icon-view",style:{"font-size":n.miniWidth/4+"px"},on:{click:function(e){return n.handlePreviewFile(t.key)}}}),r("i",{staticClass:"el-icon-delete",style:{"font-size":n.miniWidth/4+"px"},on:{click:function(e){return n.handleRemove(t.key)}}})])],1)}),n.token?r("div",{staticClass:"el-upload el-upload--picture-card",style:{width:n.width+"px",height:n.height+"px"}},[r("i",{staticClass:"el-icon-plus",style:{fontSize:n.miniWidth/4+"px",marginTop:-n.miniWidth/8+"px",marginLeft:-n.miniWidth/8+"px"}}),r("input",{ref:"uploadInput",staticClass:"el-upload__input upload-input",style:{width:n.width+"px",height:n.height+"px"},attrs:{accept:"image/*",multiple:"",type:"file",name:"file"},on:{change:n.handleChange}})]):n._e()],2)},[],!1,null,null,null);t.a=u.exports},c82c:function(e,t,n){
/*!
 * Viewer.js v1.3.3
 * https://fengyuanchen.github.io/viewerjs
 *
 * Copyright 2015-present Chen Fengyuan
 * Released under the MIT license
 *
 * Date: 2019-04-06T14:06:28.301Z
 */
e.exports=function(){"use strict";function t(e){return(t="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})(e)}function o(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)}}var i={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,zoomable:!0,rotatable:!0,scalable:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,zoom:null,zoomed:null},a="undefined"!=typeof window,s=a?window:{},l=!!a&&"ontouchstart"in s.document.documentElement,e=!!a&&"PointerEvent"in s,v="viewer",c="move",f="zoom",p="".concat(v,"-active"),b="".concat(v,"-close"),y="".concat(v,"-fade"),w="".concat(v,"-fixed"),x="".concat(v,"-fullscreen"),u="".concat(v,"-fullscreen-exit"),C="".concat(v,"-hide"),n="".concat(v,"-hide-md-down"),r="".concat(v,"-hide-sm-down"),d="".concat(v,"-hide-xs-down"),m="".concat(v,"-in"),_="".concat(v,"-invisible"),h="".concat(v,"-loading"),g="".concat(v,"-move"),S="".concat(v,"-open"),k="".concat(v,"-show"),E="".concat(v,"-transition"),T="click",N="dblclick",R="load",O=l?"touchstart":"mousedown",P=l?"touchmove":"mousemove",A=l?"touchend touchcancel":"mouseup",D=e?"pointerdown":O,M=e?"pointermove":P,I=e?"pointerup pointercancel":A,L="transitionend",B="viewed",F="".concat(v,"Action"),j=/\s\s*/,H=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function U(e){return"string"==typeof e}var z=Number.isNaN||s.isNaN;function W(e){return"number"==typeof e&&!z(e)}function V(e){return void 0===e}function q(e){return"object"===t(e)&&null!==e}var $=Object.prototype.hasOwnProperty;function X(e){if(!q(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&$.call(n,"isPrototypeOf")}catch(e){return!1}}function Y(e){return"function"==typeof e}function G(t,n){if(t&&Y(n))if(Array.isArray(t)||W(t.length)){var e,r=t.length;for(e=0;e<r&&!1!==n.call(t,t[e],e,t);e+=1);}else q(t)&&Object.keys(t).forEach(function(e){n.call(t,t[e],e,t)});return t}var K=Object.assign||function(n){for(var e=arguments.length,t=new Array(1<e?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return q(n)&&0<t.length&&t.forEach(function(t){q(t)&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},J=/^(?:width|height|left|top|marginLeft|marginTop)$/;function Z(e,t){var n=e.style;G(t,function(e,t){J.test(t)&&W(e)&&(e+="px"),n[t]=e})}function Q(e,t){return e.classList?e.classList.contains(t):-1<e.className.indexOf(t)}function ee(e,t){if(t)if(W(e.length))G(e,function(e){ee(e,t)});else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function te(e,t){t&&(W(e.length)?G(e,function(e){te(e,t)}):e.classList?e.classList.remove(t):0<=e.className.indexOf(t)&&(e.className=e.className.replace(t,"")))}function ne(e,t,n){t&&(W(e.length)?G(e,function(e){ne(e,t,n)}):n?ee(e,t):te(e,t))}var re=/([a-z\d])([A-Z])/g;function oe(e){return e.replace(re,"$1-$2").toLowerCase()}function ie(e,t){return q(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(oe(t)))}function ae(e,t,n){q(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(oe(t)),n)}var se=function(){var e=!1;if(a){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});s.addEventListener("test",n,r),s.removeEventListener("test",n,r)}return e}();function le(n,e,r){var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},i=r;e.trim().split(j).forEach(function(e){if(!se){var t=n.listeners;t&&t[e]&&t[e][r]&&(i=t[e][r],delete t[e][r],0===Object.keys(t[e]).length&&delete t[e],0===Object.keys(t).length&&delete n.listeners)}n.removeEventListener(e,i,o)})}function ue(i,e,a){var s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},l=a;e.trim().split(j).forEach(function(r){if(s.once&&!se){var e=i.listeners,o=void 0===e?{}:e;l=function(){delete o[r][a],i.removeEventListener(r,l,s);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(i,t)},o[r]||(o[r]={}),o[r][a]&&i.removeEventListener(r,o[r][a],s),o[r][a]=l,i.listeners=o}i.addEventListener(r,l,s)})}function ce(e,t,n){var r;return Y(Event)&&Y(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function fe(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,o=e.translateX,i=e.translateY,a=[];W(o)&&0!==o&&a.push("translateX(".concat(o,"px)")),W(i)&&0!==i&&a.push("translateY(".concat(i,"px)")),W(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),W(n)&&1!==n&&a.push("scaleX(".concat(n,")")),W(r)&&1!==r&&a.push("scaleY(".concat(r,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}var de=s.navigator&&/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(s.navigator.userAgent);function pe(e,t){var n=document.createElement("img");if(e.naturalWidth&&!de)return t(e.naturalWidth,e.naturalHeight),n;var r=document.body||document.documentElement;return n.onload=function(){t(n.width,n.height),de||r.removeChild(n)},n.src=e.src,de||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(n)),n}function me(e){switch(e){case 2:return d;case 3:return r;case 4:return n;default:return""}}function he(e,t){var n=e.pageX,r=e.pageY,o={endX:n,endY:r};return t?o:K({timeStamp:Date.now(),startX:n,startY:r},o)}var ge={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var e,t=this.options,n=this.parent;t.inline&&(e={width:Math.max(n.offsetWidth,t.minWidth),height:Math.max(n.offsetHeight,t.minHeight)},this.parentData=e),!this.fulled&&e||(e=this.containerData),this.viewerData=K({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&Z(this.viewer,this.viewerData)},initList:function(){var a=this,e=this.element,s=this.options,t=this.list,l=[];G(this.images,function(e,t){var n,r=e.src,o=e.alt||(U(n=r)?n.replace(/^.*\//,"").replace(/[?&#].*$/,""):""),i=s.url;U(i)?i=e.getAttribute(i):Y(i)&&(i=i.call(a,e)),(r||i)&&l.push("<li><img"+' src="'.concat(r||i,'"')+' role="button" data-viewer-action="view"'+' data-index="'.concat(t,'"')+' data-original-url="'.concat(i||r,'"')+' alt="'.concat(o,'"')+"></li>")}),t.innerHTML=l.join(""),this.items=t.getElementsByTagName("li"),G(this.items,function(t){var e=t.firstElementChild;ae(e,"filled",!0),s.loading&&ee(t,h),ue(e,R,function(e){s.loading&&te(t,h),a.loadImage(e)},{once:!0})}),s.transition&&ue(e,B,function(){ee(t,E)},{once:!0})},renderList:function(e){var t=e||this.index,n=this.items[t].offsetWidth||30,r=n+1;Z(this.list,K({width:r*this.length},fe({translateX:(this.viewerData.width-n)/2-r*t})))},resetList:function(){var e=this.list;e.innerHTML="",te(e,E),Z(e,fe({translateX:0}))},initImage:function(s){var e,l=this,u=this.options,t=this.image,n=this.viewerData,r=this.footer.offsetHeight,c=n.width,f=Math.max(n.height-r,r),d=this.imageData||{};this.imageInitializing={abort:function(){e.onload=null}},e=pe(t,function(e,t){var n=e/t,r=c,o=f;l.imageInitializing=!1,c<f*n?o=c/n:r=f*n,r=Math.min(.9*r,e),o=Math.min(.9*o,t);var i={naturalWidth:e,naturalHeight:t,aspectRatio:n,ratio:r/e,width:r,height:o,left:(c-r)/2,top:(f-o)/2},a=K({},i);u.rotatable&&(i.rotate=d.rotate||0,a.rotate=0),u.scalable&&(i.scaleX=d.scaleX||1,i.scaleY=d.scaleY||1,a.scaleX=1,a.scaleY=1),l.imageData=i,l.initialImageData=a,s&&s()})},renderImage:function(e){var t=this,n=this.image,r=this.imageData;if(Z(n,K({width:r.width,height:r.height,marginLeft:r.left,marginTop:r.top},fe(r))),e)if((this.viewing||this.zooming)&&this.options.transition){var o=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){le(n,L,o)}},ue(n,L,o,{once:!0})}else e()},resetImage:function(){if(this.viewing||this.viewed){var e=this.image;this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null}}},ve={bind:function(){var e=this.options,t=this.viewer,n=this.canvas,r=this.element.ownerDocument;ue(t,T,this.onClick=this.click.bind(this)),ue(t,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),ue(t,"dragstart",this.onDragStart=this.dragstart.bind(this)),ue(n,D,this.onPointerDown=this.pointerdown.bind(this)),ue(r,M,this.onPointerMove=this.pointermove.bind(this)),ue(r,I,this.onPointerUp=this.pointerup.bind(this)),ue(r,"keydown",this.onKeyDown=this.keydown.bind(this)),ue(window,"resize",this.onResize=this.resize.bind(this)),e.toggleOnDblclick&&ue(n,N,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,n=this.canvas,r=this.element.ownerDocument;le(t,T,this.onClick),le(t,"wheel",this.onWheel,{passive:!1,capture:!0}),le(t,"dragstart",this.onDragStart),le(n,D,this.onPointerDown),le(r,M,this.onPointerMove),le(r,I,this.onPointerUp),le(r,"keydown",this.onKeyDown),le(window,"resize",this.onResize),e.toggleOnDblclick&&le(n,N,this.onDblclick)}},be={click:function(e){var t=e.target,n=this.options,r=this.imageData,o=ie(t,F);switch(l&&e.isTrusted&&t===this.canvas&&clearTimeout(this.clickCanvasTimeout),o){case"mix":this.played?this.stop():n.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.hide();break;case"view":this.view(ie(t,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(n.loop);break;case"play":this.play(n.fullscreen);break;case"next":this.next(n.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-r.scaleX||-1);break;case"flip-vertical":this.scaleY(-r.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(l&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle())},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,n=this.options,r=this.image,o=this.index,i=this.viewerData;te(r,_),n.loading&&te(this.canvas,h),r.style.cssText="height:0;"+"margin-left:".concat(i.width/2,"px;")+"margin-top:".concat(i.height/2,"px;")+"max-width:none!important;position:absolute;width:0;",this.initImage(function(){ne(r,g,n.movable),ne(r,E,n.transition),e.renderImage(function(){e.viewed=!0,e.viewing=!1,Y(n.viewed)&&ue(t,B,n.viewed,{once:!0}),ce(t,B,{originalImage:e.images[o],index:o,image:r})})})},loadImage:function(e){var i=e.target,t=i.parentNode,a=t.offsetWidth||30,s=t.offsetHeight||50,l=!!ie(i,"filled");pe(i,function(e,t){var n=e/t,r=a,o=s;a<s*n?l?r=s*n:o=a/n:l?o=a/n:r=s*n,Z(i,K({width:r,height:o},fe({translateX:(a-r)/2,translateY:(s-o)/2})))})},keydown:function(e){var t=this.options;if(this.fulled&&t.keyboard)switch(e.keyCode||e.which||e.charCode){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}},dragstart:function(e){"img"===e.target.tagName.toLowerCase()&&e.preventDefault()},pointerdown:function(e){var t=this.options,n=this.pointers,r=e.buttons,o=e.button;if(!(!this.viewed||this.showing||this.viewing||this.hiding||W(r)&&1!==r||W(o)&&0!==o||e.ctrlKey)){e.preventDefault(),e.changedTouches?G(e.changedTouches,function(e){n[e.identifier]=he(e)}):n[e.pointerId||0]=he(e);var i=!!t.movable&&c;1<Object.keys(n).length?i=f:"touch"!==e.pointerType&&"touchstart"!==e.type||!this.isSwitchable()||(i="switch"),!t.transition||i!==c&&i!==f||te(this.image,E),this.action=i}},pointermove:function(e){var t=this.pointers,n=this.action;this.viewed&&n&&(e.preventDefault(),e.changedTouches?G(e.changedTouches,function(e){K(t[e.identifier]||{},he(e,!0))}):K(t[e.pointerId||0]||{},he(e,!0)),this.change(e))},pointerup:function(e){var t,n=this,r=this.options,o=this.action,i=this.pointers;e.changedTouches?G(e.changedTouches,function(e){t=i[e.identifier],delete i[e.identifier]}):(t=i[e.pointerId||0],delete i[e.pointerId||0]),o&&(e.preventDefault(),!r.transition||o!==c&&o!==f||ee(this.image,E),this.action=!1,l&&o!==f&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),r.toggleOnDblclick&&this.viewed&&e.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){ce(n.image,N)},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){n.imageClicked=!1},500)):(this.imageClicked=!1,r.backdrop&&"static"!==r.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){ce(n.canvas,T)},50)))))},resize:function(){var t=this;if(this.isShown&&!this.hiding&&(this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();G(this.player.getElementsByTagName("img"),function(e){ue(e,R,t.loadImage.bind(t),{once:!0}),ce(e,R)})}},wheel:function(e){var t=this;if(this.viewed&&(e.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50);var n=Number(this.options.zoomRatio)||.1,r=1;e.deltaY?r=0<e.deltaY?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=0<e.detail?1:-1),this.zoom(-r*n,!0,e)}}},ye={show:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.element,n=this.options;if(n.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;if(Y(n.show)&&ue(t,"show",n.show,{once:!0}),!1===ce(t,"show")||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var r=this.viewer;if(te(r,C),n.transition&&!e){var o=this.shown.bind(this);this.transitioning={abort:function(){le(r,L,o),te(r,m)}},ee(r,E),r.offsetWidth,ue(r,L,o,{once:!0}),ee(r,m)}else ee(r,m),this.shown();return this},hide:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.element,n=this.options;if(n.inline||this.hiding||!this.isShown&&!this.showing)return this;if(Y(n.hide)&&ue(t,"hide",n.hide,{once:!0}),!1===ce(t,"hide"))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var r=this.viewer;if(n.transition&&!e){var o=this.hidden.bind(this),i=function(){ue(r,L,o,{once:!0}),te(r,m)};this.transitioning={abort:function(){this.viewed?le(this.image,L,i):le(r,L,o)}},this.viewed&&Q(this.image,E)?(ue(this.image,L,i,{once:!0}),this.zoomTo(0,!1,!1,!0)):i()}else te(r,m),this.hidden();return this},view:function(){var n=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(e=Number(e)||0,!this.isShown)return this.index=e,this.show();if(this.hiding||this.played||e<0||e>=this.length||this.viewed&&e===this.index)return this;this.viewing&&this.viewing.abort();var t=this.element,r=this.options,o=this.title,i=this.canvas,a=this.items[e],s=a.querySelector("img"),l=ie(s,"originalUrl"),u=s.getAttribute("alt"),c=document.createElement("img");if(c.src=l,c.alt=u,Y(r.view)&&ue(t,"view",r.view,{once:!0}),!1===ce(t,"view",{originalImage:this.images[e],index:e,image:c})||!this.isShown||this.hiding||this.played)return this;this.image=c,te(this.items[this.index],p),ee(a,p),this.viewed=!1,this.index=e,this.imageData={},ee(c,_),r.loading&&ee(i,h),i.innerHTML="",i.appendChild(c),this.renderList(),o.innerHTML="";var f,d=function(){var e=n.imageData,t=Array.isArray(r.title)?r.title[1]:r.title;o.innerHTML=Y(t)?t.call(n,c,e):"".concat(u," (").concat(e.naturalWidth," × ").concat(e.naturalHeight,")")};return ue(t,B,d,{once:!0}),this.viewing={abort:function(){le(t,B,d),c.complete?this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort():(c.src="",le(c,R,f),this.timeout&&clearTimeout(this.timeout))}},c.complete?this.load():(ue(c,R,f=this.load.bind(this),{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){te(c,_),n.timeout=!1},1e3)),this},prev:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.length-1,n=this.index+1;return t<n&&(n=e?0:t),this.view(n),this},move:function(e,t){var n=this.imageData;return this.moveTo(V(e)?e:n.left+Number(e),V(t)?t:n.top+Number(t)),this},moveTo:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData;if(e=Number(e),t=Number(t),this.viewed&&!this.played&&this.options.movable){var r=!1;W(e)&&(n.left=e,r=!0),W(t)&&(n.top=t,r=!0),r&&this.renderImage()}return this},zoom:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(r.width*e/r.naturalWidth,t,n),this},zoomTo:function(e){var r,o,i,t,n,a=this,s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],l=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,u=3<arguments.length&&void 0!==arguments[3]&&arguments[3],c=this.element,f=this.options,d=this.pointers,p=this.imageData,m=p.width,h=p.height,g=p.left,v=p.top,b=p.naturalWidth,y=p.naturalHeight;if(W(e=Math.max(0,e))&&this.viewed&&!this.played&&(u||f.zoomable)){if(!u){var w=Math.max(.01,f.minZoomRatio),x=Math.min(100,f.maxZoomRatio);e=Math.min(Math.max(e,w),x)}l&&.95<e&&e<1.05&&(e=1);var C=b*e,_=y*e,S=C-m,k=_-h,E=m/b;if(Y(f.zoom)&&ue(c,"zoom",f.zoom,{once:!0}),!1===ce(c,"zoom",{ratio:e,oldRatio:E,originalEvent:l}))return this;if(this.zooming=!0,l){var T=(t=this.viewer,{left:(n=t.getBoundingClientRect()).left+(window.pageXOffset-document.documentElement.clientLeft),top:n.top+(window.pageYOffset-document.documentElement.clientTop)}),N=d&&Object.keys(d).length?(i=o=r=0,G(d,function(e){var t=e.startX,n=e.startY;r+=t,o+=n,i+=1}),{pageX:r/=i,pageY:o/=i}):{pageX:l.pageX,pageY:l.pageY};p.left-=S*((N.pageX-T.left-g)/m),p.top-=k*((N.pageY-T.top-v)/h)}else p.left-=S/2,p.top-=k/2;p.width=C,p.height=_,p.ratio=e,this.renderImage(function(){a.zooming=!1,Y(f.zoomed)&&ue(c,"zoomed",f.zoomed,{once:!0}),ce(c,"zoomed",{ratio:e,oldRatio:E,originalEvent:l})}),s&&this.tooltip()}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this.imageData;return W(e=Number(e))&&this.viewed&&!this.played&&this.options.rotatable&&(t.rotate=e,this.renderImage()),this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData;if(e=Number(e),t=Number(t),this.viewed&&!this.played&&this.options.scalable){var r=!1;W(e)&&(n.scaleX=e,r=!0),W(t)&&(n.scaleY=t,r=!0),r&&this.renderImage()}return this},play:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var o=this.options,i=this.player,a=this.loadImage.bind(this),s=[],l=0,u=0;if(this.played=!0,this.onLoadWhenPlay=a,e&&this.requestFullscreen(),ee(i,k),G(this.items,function(e,t){var n=e.querySelector("img"),r=document.createElement("img");r.src=ie(n,"originalUrl"),r.alt=n.getAttribute("alt"),l+=1,ee(r,y),ne(r,E,o.transition),Q(e,p)&&(ee(r,m),u=t),s.push(r),ue(r,R,a,{once:!0}),i.appendChild(r)}),W(o.interval)&&0<o.interval){var n=function e(){t.playing=setTimeout(function(){te(s[u],m),ee(s[u=(u+=1)<l?u:0],m),e()},o.interval)};1<l&&n()}return this},stop:function(){var t=this;if(!this.played)return this;var e=this.player;return this.played=!1,clearTimeout(this.playing),G(e.getElementsByTagName("img"),function(e){le(e,R,t.onLoadWhenPlay)}),te(e,k),e.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,n=this.viewer,r=this.image,o=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),ee(this.button,u),t.transition&&(te(o,E),this.viewed&&te(r,E)),ee(n,w),n.setAttribute("style",""),Z(n,{zIndex:t.zIndex}),this.initContainer(),this.viewerData=K({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){ee(r,E),ee(o,E)},0)})})),this},exit:function(){var e=this,t=this.options,n=this.viewer,r=this.image,o=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline&&(this.fulled=!1,this.close(),te(this.button,u),t.transition&&(te(o,E),this.viewed&&te(r,E)),te(n,w),Z(n,{zIndex:t.zIndexInline}),this.viewerData=K({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){ee(r,E),ee(o,E)},0)})})),this},tooltip:function(){var e=this,t=this.options,n=this.tooltipBox,r=this.imageData;return this.viewed&&!this.played&&t.tooltip&&(n.textContent="".concat(Math.round(100*r.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&ce(n,L),ee(n,k),ee(n,y),ee(n,E),n.offsetWidth,ee(n,m)):ee(n,k),this.tooltipping=setTimeout(function(){t.transition?(ue(n,L,function(){te(n,k),te(n,y),te(n,E),e.fading=!1},{once:!0}),te(n,m),e.fading=!0):te(n,k),e.tooltipping=!1},1e3)),this},toggle:function(){return 1===this.imageData.ratio?this.zoomTo(this.initialImageData.ratio,!0):this.zoomTo(1,!0),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=K({},this.initialImageData),this.renderImage()),this},update:function(){var e=this.element,t=this.options,n=this.isImg;if(n&&!e.parentNode)return this.destroy();var o=[];if(G(n?[e]:e.querySelectorAll("img"),function(e){t.filter?t.filter(e)&&o.push(e):o.push(e)}),!o.length)return this;if(this.images=o,this.length=o.length,this.ready){var i=[];if(G(this.items,function(e,t){var n=e.querySelector("img"),r=o[t];r?r.src!==n.src&&i.push(t):i.push(t)}),Z(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var r=i.indexOf(this.index);0<=r?(this.viewed=!1,this.view(Math.max(this.index-(r+1),0))):ee(this.items[this.index],p)}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e[v]&&(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||le(e,T,this.onStart),e[v]=void 0),this}},we={open:function(){var e=this.body;ee(e,S),e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyPaddingRight)||0),"px")},close:function(){var e=this.body;te(e,S),e.style.paddingRight=this.initialBodyPaddingRight},shown:function(){var e=this.element,t=this.options;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,Y(t.shown)&&ue(e,"shown",t.shown,{once:!0}),!1!==ce(e,"shown")&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var e=this.element,t=this.options;this.fulled=!1,this.viewed=!1,this.isShown=!1,this.close(),this.unbind(),ee(this.viewer,C),this.resetList(),this.resetImage(),this.hiding=!1,this.destroyed||(Y(t.hidden)&&ue(e,"hidden",t.hidden,{once:!0}),ce(e,"hidden"))},requestFullscreen:function(){var e=this.element.ownerDocument;if(this.fulled&&!(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)){var t=e.documentElement;t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}},exitFullscreen:function(){var e=this.element.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t,n,l,r=this.options,o=this.pointers,i=o[Object.keys(o)[0]],a=i.endX-i.startX,s=i.endY-i.startY;switch(this.action){case c:this.move(a,s);break;case f:this.zoom((n=K({},t=o),l=[],G(t,function(s,e){delete n[e],G(n,function(e){var t=Math.abs(s.startX-e.startX),n=Math.abs(s.startY-e.startY),r=Math.abs(s.endX-e.endX),o=Math.abs(s.endY-e.endY),i=Math.sqrt(t*t+n*n),a=(Math.sqrt(r*r+o*o)-i)/i;l.push(a)})}),l.sort(function(e,t){return Math.abs(e)<Math.abs(t)}),l[0]),!1,e);break;case"switch":this.action="switched";var u=Math.abs(a);1<u&&u>Math.abs(s)&&(this.pointers={},1<a?this.prev(r.loop):a<-1&&this.next(r.loop))}G(o,function(e){e.startX=e.endX,e.startY=e.endY})},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return 1<this.length&&0<=e.left&&0<=e.top&&e.width<=t.width&&e.height<=t.height}},xe=s.Viewer,Ce=function(){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),!e||1!==e.nodeType)throw new Error("The first argument is required and must be an element.");this.element=e,this.options=K({},i,X(t)&&t),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.init()}return e=n,r=[{key:"noConflict",value:function(){return window.Viewer=xe,n}},{key:"setDefaults",value:function(e){K(i,X(e)&&e)}}],(t=[{key:"init",value:function(){var n=this,e=this.element,r=this.options;if(!e[v]){e[v]=this;var t="img"===e.tagName.toLowerCase(),o=[];G(t?[e]:e.querySelectorAll("img"),function(e){Y(r.filter)?r.filter.call(n,e)&&o.push(e):o.push(e)}),this.isImg=t,this.length=o.length,this.images=o;var i=e.ownerDocument,a=i.body||i.documentElement;if(this.body=a,this.scrollbarWidth=window.innerWidth-i.documentElement.clientWidth,this.initialBodyPaddingRight=window.getComputedStyle(a).paddingRight,V(document.createElement(v).style.transition)&&(r.transition=!1),r.inline){var s=0,l=function(){var e;(s+=1)===n.length&&(n.initializing=!1,n.delaying={abort:function(){clearTimeout(e)}},e=setTimeout(function(){n.delaying=!1,n.build()},0))};this.initializing={abort:function(){G(o,function(e){e.complete||le(e,R,l)})}},G(o,function(e){e.complete?l():ue(e,R,l,{once:!0})})}else ue(e,T,this.onStart=function(e){var t=e.target;"img"!==t.tagName.toLowerCase()||Y(r.filter)&&!r.filter.call(n,t)||n.view(n.images.indexOf(t))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,l=this.options,t=e.parentNode,n=document.createElement("div");n.innerHTML='<div class="viewer-container" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list"></ul></div></div><div class="viewer-tooltip"></div><div role="button" class="viewer-button" data-viewer-action="mix"></div><div class="viewer-player"></div></div>';var r=n.querySelector(".".concat(v,"-container")),o=r.querySelector(".".concat(v,"-title")),i=r.querySelector(".".concat(v,"-toolbar")),a=r.querySelector(".".concat(v,"-navbar")),s=r.querySelector(".".concat(v,"-button")),u=r.querySelector(".".concat(v,"-canvas"));if(this.parent=t,this.viewer=r,this.title=o,this.toolbar=i,this.navbar=a,this.button=s,this.canvas=u,this.footer=r.querySelector(".".concat(v,"-footer")),this.tooltipBox=r.querySelector(".".concat(v,"-tooltip")),this.player=r.querySelector(".".concat(v,"-player")),this.list=r.querySelector(".".concat(v,"-list")),ee(o,l.title?me(Array.isArray(l.title)?l.title[0]:l.title):C),ee(a,l.navbar?me(l.navbar):C),ne(s,C,!l.button),l.backdrop&&(ee(r,"".concat(v,"-backdrop")),l.inline||"static"===l.backdrop||ae(u,F,"hide")),U(l.className)&&l.className&&l.className.split(j).forEach(function(e){ee(r,e)}),l.toolbar){var c=document.createElement("ul"),f=X(l.toolbar),d=H.slice(0,3),p=H.slice(7,9),m=H.slice(9);f||ee(i,me(l.toolbar)),G(f?l.toolbar:H,function(e,t){var n=f&&X(e),r=f?oe(t):e,o=n&&!V(e.show)?e.show:e;if(o&&(l.zoomable||-1===d.indexOf(r))&&(l.rotatable||-1===p.indexOf(r))&&(l.scalable||-1===m.indexOf(r))){var i=n&&!V(e.size)?e.size:e,a=n&&!V(e.click)?e.click:e,s=document.createElement("li");s.setAttribute("role","button"),ee(s,"".concat(v,"-").concat(r)),Y(a)||ae(s,F,r),W(o)&&ee(s,me(o)),-1!==["small","large"].indexOf(i)?ee(s,"".concat(v,"-").concat(i)):"play"===r&&ee(s,"".concat(v,"-large")),Y(a)&&ue(s,T,a),c.appendChild(s)}}),i.appendChild(c)}else ee(i,C);if(!l.rotatable){var h=i.querySelectorAll('li[class*="rotate"]');ee(h,_),G(h,function(e){i.appendChild(e)})}if(l.inline)ee(s,x),Z(r,{zIndex:l.zIndexInline}),"static"===window.getComputedStyle(t).position&&Z(t,{position:"relative"}),t.insertBefore(r,e.nextSibling);else{ee(s,b),ee(r,w),ee(r,y),ee(r,C),Z(r,{zIndex:l.zIndex});var g=l.container;U(g)&&(g=e.ownerDocument.querySelector(g)),g||(g=this.body),g.appendChild(r)}l.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,Y(l.ready)&&ue(e,"ready",l.ready,{once:!0}),!1!==ce(e,"ready")?this.ready&&l.inline&&this.view(this.index):this.ready=!1}}}])&&o(e.prototype,t),r&&o(e,r),n;var e,t,r}();return K(Ce.prototype,ge,ve,be,ye,we),Ce}()},c8af:function(e,t,n){"use strict";var o=n("c532");e.exports=function(n,r){o.forEach(n,function(e,t){t!==r&&t.toUpperCase()===r.toUpperCase()&&(n[r]=e,delete n[t])})}},c8bb:function(e,t,n){e.exports=n("54a1")},ca5a:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},cadf:function(e,t,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),a=n("6821");e.exports=n("01f9")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(e,t,n){var r=n("d3f4");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},cc8a:function(e,t,n){n("ba71")},ccb9:function(e,t,n){t.f=n("5168")},ccfb:function(e,t,n){"use strict";var r=n("ff24");n.n(r).a},cd1c:function(e,t,n){var r=n("e853");e.exports=function(e,t){return new(r(e))(t)}},ce10:function(e,t,n){var a=n("69a8"),s=n("6821"),l=n("c366")(!1),u=n("613b")("IE_PROTO");e.exports=function(e,t){var n,r=s(e),o=0,i=[];for(n in r)n!=u&&a(r,n)&&i.push(n);for(;t.length>o;)a(r,n=t[o++])&&(~l(i,n)||i.push(n));return i}},ce3a:function(e,t,n){n("6cba")},ce7e:function(e,t,n){var o=n("63b6"),i=n("584a"),a=n("294c");e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],r={};r[e]=t(n),o(o.S+o.F*a(function(){n(1)}),"Object",r)}},cea2:function(e,t,r){"undefined"!=typeof self&&self,e.exports=function(n){function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var o={};return r.m=n,r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get: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="/dist/",r(r.s=58)}([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){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(30)("wks"),o=n(22),i=n(0).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(7);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var h=n(0),g=n(1),v=n(19),b=n(5),y=n(9),w=function(e,t,n){var r,o,i,a=e&w.F,s=e&w.G,l=e&w.S,u=e&w.P,c=e&w.B,f=e&w.W,d=s?g:g[t]||(g[t]={}),p=d.prototype,m=s?h:l?h[t]:(h[t]||{}).prototype;for(r in s&&(n=t),n)(o=!a&&m&&void 0!==m[r])&&y(d,r)||(i=o?m[r]:n[r],d[r]=s&&"function"!=typeof m[r]?n[r]:c&&o?v(i,h):f&&m[r]==i?function(r){var e=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return r.apply(this,arguments)};return e.prototype=r.prototype,e}(i):u&&"function"==typeof i?v(Function.call,i):i,u&&((d.virtual||(d.virtual={}))[r]=i,e&w.R&&p&&!p[r]&&b(p,r,i)))};w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,e.exports=w},function(e,t,n){var r=n(6),o=n(21);e.exports=n(8)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(3),o=n(43),i=n(28),a=Object.defineProperty;t.f=n(8)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(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){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(47),o=n(26);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e+864e5;return(new Date).getTime()>t}function a(t){return(0,g.default)(t).filter(function(e){return e.startsWith("x:")}).map(function(e){return[e,t[e].toString()]})}function i(e){return"qiniu_js_sdk_upload_file_"+e.name+"_size_"+e.size}function s(e){try{return JSON.parse(localStorage.getItem(i(e)))||[]}catch(e){return window.console&&window.console.warn,[]}}function l(e){return{Authorization:"UpToken "+e}}function u(){return window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP")}function c(r){return new p.default(function(n,e){var t=new FileReader;t.readAsArrayBuffer(r),t.onload=function(e){var t=e.target.result;n(t)},t.onerror=function(){e(new Error("fileReader 读取错误"))}})}function f(e,t){return new p.default(function(r,o){var i=u();i.open(t.method,e),t.onCreate&&t.onCreate(i),t.headers&&(0,g.default)(t.headers).forEach(function(e){return i.setRequestHeader(e,t.headers[e])}),i.upload.addEventListener("progress",function(e){e.lengthComputable&&t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}),i.onreadystatechange=function(){var e=i.responseText;if(4===i.readyState){var t=i.getResponseHeader("x-reqId")||"";if(200!==i.status){var n="xhr request failed, code: "+i.status+";";return e&&(n=n+" response: "+e),void o({code:i.status,message:n,reqId:t,isRequestError:!0})}try{r({data:JSON.parse(e),reqId:t})}catch(e){o(e)}}},i.send(t.body)})}function d(){return"http:"===window.location.protocol?"http:":"https:"}t.__esModule=!0;var p=r(n(18)),m=r(n(34)),h=r(n(86)),g=r(n(36));t.isChunkExpired=o,t.getChunks=function(e,t){for(var n=[],r=Math.ceil(e.size/t),o=0;o<r;o++){var i=e.slice(t*o,o===r-1?e.size:t*(o+1));n.push(i)}return n},t.filterParams=a,t.sum=function(e){return e.reduce(function(e,t){return e+t},0)},t.setLocalFileInfo=function(e,t){try{localStorage.setItem(i(e),(0,h.default)(t))}catch(e){window.console&&window.console.warn}},t.removeLocalFileInfo=function(e){try{localStorage.removeItem(i(e))}catch(e){window.console&&window.console.warn}},t.getLocalFileInfo=s,t.getResumeUploadedSize=function(e){return s(e).filter(function(e){return e&&!o(e.time)}).reduce(function(e,t){return e+t.size},0)},t.createMkFileUrl=function(e,t,n,r){var o=e+"/mkfile/"+t;null!=n&&(o+="/key/"+(0,v.urlSafeBase64Encode)(n)),r.mimeType&&(o+="/mimeType/"+(0,v.urlSafeBase64Encode)(r.mimeType));var i=r.fname;return i&&(o+="/fname/"+(0,v.urlSafeBase64Encode)(i)),r.params&&a(r.params).forEach(function(e){return o+="/"+encodeURIComponent(e[0])+"/"+(0,v.urlSafeBase64Encode)(e[1])}),o},t.getHeadersForChunkUpload=function(e){var t=l(e);return(0,m.default)({"content-type":"application/octet-stream"},t)},t.getHeadersForMkFile=function(e){var t=l(e);return(0,m.default)({"content-type":"text/plain"},t)},t.createXHR=u,t.computeMd5=function(e){return c(e).then(function(e){var t=new y.default.ArrayBuffer;return t.append(e),t.end()})},t.readAsArrayBuffer=c,t.request=f,t.getPortFromUrl=function(e){if(e&&e.match){var t=e.match(/(^https?)/);if(!t)return"";var n=t[1];return(t=e.match(/^https?:\/\/([^:^\/]*):(\d*)/))?t[2]:"http"===n?"80":"443"}return""},t.getDomainFromUrl=function(e){if(e&&e.match){var t=e.match(/^https?:\/\/([^:^\/]*)/);return t?t[1]:""}return""},t.getUploadUrl=function(e,t){var n=d();if(null!=e.uphost)return p.default.resolve(n+"//"+e.uphost);if(null==e.region)return function(e){try{var t=(n=e.split(":"),r=n[0],(o=JSON.parse((0,v.urlSafeBase64Decode)(n[2]))).ak=r,o.bucket=o.scope.split(":")[0],o);return f(d()+"//api.qiniu.com/v2/query?ak="+t.ak+"&bucket="+t.bucket,{method:"GET"})}catch(e){return p.default.reject(e)}var n,r,o}(t).then(function(e){var t=e.data.up.acc.main;return n+"//"+t[0]});var r=b.regionUphostMap[e.region],o=e.useCdnDomain?r.cdnUphost:r.srcUphost;return p.default.resolve(n+"//"+o)},t.isContainFileMimeType=function(e,t){return-1<t.indexOf(e)},t.createObjectURL=function(e){return(window.URL||window.webkitURL||window.mozURL).createObjectURL(e)},t.getTransform=function(e,t){var n=e.width,r=e.height;switch(t){case 1:return{width:n,height:r,matrix:[1,0,0,1,0,0]};case 2:return{width:n,height:r,matrix:[-1,0,0,1,n,0]};case 3:return{width:n,height:r,matrix:[-1,0,0,-1,n,r]};case 4:return{width:n,height:r,matrix:[1,0,0,-1,0,r]};case 5:return{width:r,height:n,matrix:[0,1,1,0,0,0]};case 6:return{width:r,height:n,matrix:[0,1,-1,0,r,0]};case 7:return{width:r,height:n,matrix:[0,-1,-1,0,r,n]};case 8:return{width:r,height:n,matrix:[0,-1,1,0,0,n]}}};var v=n(56),b=n(39),y=r(n(91))},function(e,t){e.exports=!0},function(e,t){e.exports={}},function(e,t,n){var r=n(46),o=n(31);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){e.exports={default:n(59),__esModule:!0}},function(e,t,n){var i=n(20);e.exports=function(r,o,e){if(i(r),void 0===o)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(6).f,o=n(9),i=n(2)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,n){var r=n(7),o=n(0).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var o=n(7);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(30)("keys"),o=n(22);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(1),o=n(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(13)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(26);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";var o=n(20);e.exports.f=function(e){return new function(e){var n,r;this.promise=new e(function(e,t){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=e,r=t}),this.resolve=o(n),this.reject=o(r)}(e)}},function(e,t,n){e.exports={default:n(83),__esModule:!0}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){e.exports={default:n(88),__esModule:!0}},function(e,t,n){t.f=n(2)},function(e,t,n){var r=n(0),o=n(1),i=n(13),a=n(37),s=n(6).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){"use strict";t.__esModule=!0,t.regionUphostMap={z0:{srcUphost:"up.qiniup.com",cdnUphost:"upload.qiniup.com"},z1:{srcUphost:"up-z1.qiniup.com",cdnUphost:"upload-z1.qiniup.com"},z2:{srcUphost:"up-z2.qiniup.com",cdnUphost:"upload-z2.qiniup.com"},na0:{srcUphost:"up-na0.qiniup.com",cdnUphost:"upload-na0.qiniup.com"},as0:{srcUphost:"up-as0.qiniup.com",cdnUphost:"upload-as0.qiniup.com"}},t.region={z0:"z0",z1:"z1",z2:"z2",na0:"na0",as0:"as0"}},function(e,t){},function(e,t,n){"use strict";var r=n(60)(!0);n(42)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var y=n(13),w=n(4),x=n(44),C=n(5),_=n(14),S=n(61),k=n(23),E=n(65),T=n(2)("iterator"),N=!([].keys&&"next"in[].keys()),R=function(){return this};e.exports=function(e,t,n,r,o,i,a){S(n,t,r);var s,l,u,c=function(e){if(!N&&e in m)return m[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d="values"==o,p=!1,m=e.prototype,h=m[T]||m["@@iterator"]||o&&m[o],g=h||c(o),v=o?d?c("entries"):g:void 0,b="Array"==t&&m.entries||h;if(b&&(u=E(b.call(new e)))!==Object.prototype&&u.next&&(k(u,f,!0),y||"function"==typeof u[T]||C(u,T,R)),d&&h&&"values"!==h.name&&(p=!0,g=function(){return h.call(this)}),y&&!a||!N&&!p&&m[T]||C(m,T,g),_[t]=g,_[f]=R,o)if(s={values:d?g:c("values"),keys:i?g:c("keys"),entries:v},a)for(l in s)l in m||x(m,l,s[l]);else w(w.P+w.F*(N||p),t,s);return s}},function(e,t,n){e.exports=!n(8)&&!n(10)(function(){return 7!=Object.defineProperty(n(27)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=n(5)},function(e,t,r){var o=r(3),i=r(62),a=r(31),s=r(29)("IE_PROTO"),l=function(){},u=function(){var e,t=r(27)("iframe"),n=a.length;for(t.style.display="none",r(49).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u.prototype[a[n]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(l.prototype=o(e),n=new l,l.prototype=null,n[s]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var a=n(9),s=n(11),l=n(63)(!1),u=n(29)("IE_PROTO");e.exports=function(e,t){var n,r=s(e),o=0,i=[];for(n in r)n!=u&&a(r,n)&&i.push(n);for(;t.length>o;)a(r,n=t[o++])&&(~l(i,n)||i.push(n));return i}},function(e,t,n){var r=n(16);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(25),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(0).document;e.exports=r&&r.documentElement},function(e,t,n){n(66);for(var r=n(0),o=n(5),i=n(14),a=n(2)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var u=s[l],c=r[u],f=c&&c.prototype;f&&!f[a]&&o(f,a,u),i[u]=i.Array}},function(e,t,n){var o=n(16),i=n(2)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var o=n(3),i=n(20),a=n(2)("species");e.exports=function(e,t){var n,r=o(e).constructor;return void 0===r||null==(n=o(r)[a])?t:i(n)}},function(e,t,n){var r,o,i,a=n(19),s=n(75),l=n(49),u=n(27),c=n(0),f=c.process,d=c.setImmediate,p=c.clearImmediate,m=c.MessageChannel,h=c.Dispatch,g=0,v={},b=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},y=function(e){b.call(e.data)};d&&p||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},p=function(e){delete v[e]},"process"==n(16)(f)?r=function(e){f.nextTick(a(b,e,1))}:h&&h.now?r=function(e){h.now(a(b,e,1))}:m?(i=(o=new m).port2,o.port1.onmessage=y,r=a(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",y,!1)):r="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:d,clear:p}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(3),o=n(7),i=n(33);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";t.__esModule=!0,t.urlSafeBase64Encode=function(e){return(e=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=void 0,r=void 0,o=void 0,i=void 0,a=void 0,s=void 0,l=void 0,u=void 0,c=0,f=0,d="",p=[];if(!e)return e;for(e=function(e){if(null==e)return"";var t=e+"",n="",r=void 0,o=void 0,i=0;r=o=0,i=t.length;for(var a=0;a<i;a++){var s=t.charCodeAt(a),l=null;if(s<128)o++;else if(127<s&&s<2048)l=String.fromCharCode(s>>6|192,63&s|128);else if(63488&s^!0)l=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128);else{if(64512&s^!0)throw new RangeError("Unmatched trail surrogate at "+a);var u=t.charCodeAt(++a);if(64512&u^!0)throw new RangeError("Unmatched lead surrogate at "+(a-1));s=((1023&s)<<10)+(1023&u)+65536,l=String.fromCharCode(s>>18|240,s>>12&63|128,s>>6&63|128,63&s|128)}null!==l&&(r<o&&(n+=t.slice(r,o)),n+=l,r=o=a+1)}return r<o&&(n+=t.slice(r,i)),n}(e+"");n=e.charCodeAt(c++),r=e.charCodeAt(c++),o=e.charCodeAt(c++),i=(u=n<<16|r<<8|o)>>18&63,a=u>>12&63,s=u>>6&63,l=63&u,p[f++]=t.charAt(i)+t.charAt(a)+t.charAt(s)+t.charAt(l),c<e.length;);switch(d=p.join(""),e.length%3){case 1:d=d.slice(0,-2)+"==";break;case 2:d=d.slice(0,-1)+"="}return d}(e)).replace(/\//g,"_").replace(/\+/g,"-")},t.urlSafeBase64Decode=function(e){return function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=void 0,r=void 0,o=void 0,i=void 0,a=void 0,s=void 0,l=void 0,u=void 0,c=0,f=0,d=[];if(!e)return e;for(e+="";i=t.indexOf(e.charAt(c++)),a=t.indexOf(e.charAt(c++)),s=t.indexOf(e.charAt(c++)),l=t.indexOf(e.charAt(c++)),n=(u=i<<18|a<<12|s<<6|l)>>16&255,r=u>>8&255,o=255&u,d[f++]=64===s?String.fromCharCode(n):64===l?String.fromCharCode(n,r):String.fromCharCode(n,r,o),c<e.length;);return d.join("")}(e=e.replace(/_/g,"/").replace(/-/g,"+"))}},function(e,t,n){var r=n(46),o=n(31).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){"use strict";t.__esModule=!0,t.pipeline=t.compressImage=t.exif=t.imageInfo=t.watermark=t.imageMogr2=t.getUploadUrl=t.filterParams=t.getHeadersForMkFile=t.getResumeUploadedSize=t.getHeadersForChunkUpload=t.createMkFileUrl=t.region=t.upload=void 0;var r,o=n(39),i=n(12),a=n(92),s=n(94),l=n(95),u=n(109),c=(r=n(110))&&r.__esModule?r:{default:r},f=new u.StatisticsLogger;t.upload=function(e,t,n,r,o){var i={file:e,key:t,token:n,putExtra:r,config:o};return new l.Observable(function(t){var e=new a.UploadManager(i,{onData:function(e){return t.next(e)},onError:function(e){return t.error(e)},onComplete:function(e){return t.complete(e)}},f);return e.putFile(),e.stop.bind(e)})},t.region=o.region,t.createMkFileUrl=i.createMkFileUrl,t.getHeadersForChunkUpload=i.getHeadersForChunkUpload,t.getResumeUploadedSize=i.getResumeUploadedSize,t.getHeadersForMkFile=i.getHeadersForMkFile,t.filterParams=i.filterParams,t.getUploadUrl=i.getUploadUrl,t.imageMogr2=s.imageMogr2,t.watermark=s.watermark,t.imageInfo=s.imageInfo,t.exif=s.exif,t.compressImage=c.default,t.pipeline=s.pipeline},function(e,t,n){n(40),n(41),n(50),n(69),n(81),n(82),e.exports=n(1).Promise},function(e,t,n){var l=n(25),u=n(26);e.exports=function(s){return function(e,t){var n,r,o=String(u(e)),i=l(t),a=o.length;return i<0||a<=i?s?"":void 0:(n=o.charCodeAt(i))<55296||56319<n||i+1===a||(r=o.charCodeAt(i+1))<56320||57343<r?s?o.charAt(i):n:s?o.slice(i,i+2):r-56320+(n-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(45),o=n(21),i=n(23),a={};n(5)(a,n(2)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var a=n(6),s=n(3),l=n(15);e.exports=n(8)?Object.defineProperties:function(e,t){s(e);for(var n,r=l(t),o=r.length,i=0;i<o;)a.f(e,n=r[i++],t[n]);return e}},function(e,t,n){var l=n(11),u=n(48),c=n(64);e.exports=function(s){return function(e,t,n){var r,o=l(e),i=u(o.length),a=c(n,i);if(s&&t!=t){for(;a<i;)if((r=o[a++])!=r)return!0}else for(;a<i;a++)if((s||a in o)&&o[a]===t)return s||a||0;return!s&&-1}}},function(e,t,n){var r=n(25),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(9),o=n(32),i=n(29)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";var r=n(67),o=n(68),i=n(14),a=n(11);e.exports=n(42)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r,o,i,a,s=n(13),l=n(0),u=n(19),c=n(51),f=n(4),d=n(7),p=n(20),m=n(70),h=n(71),g=n(52),v=n(53).set,b=n(76)(),y=n(33),w=n(54),x=n(77),C=n(55),_=l.TypeError,S=l.process,k=S&&S.versions,E=k&&k.v8||"",T=l.Promise,N="process"==c(S),R=function(){},O=o=y.f,P=!!function(){try{var e=T.resolve(1),t=(e.constructor={})[n(2)("species")]=function(e){e(R,R)};return(N||"function"==typeof PromiseRejectionEvent)&&e.then(R)instanceof t&&0!==E.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),A=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},D=function(c,t){if(!c._n){c._n=!0;var n=c._c;b(function(){for(var l=c._v,u=1==c._s,e=0;n.length>e;)!function(e){var t,n,r,o=u?e.ok:e.fail,i=e.resolve,a=e.reject,s=e.domain;try{o?(u||(2==c._h&&L(c),c._h=1),!0===o?t=l:(s&&s.enter(),t=o(l),s&&(s.exit(),r=!0)),t===e.promise?a(_("Promise-chain cycle")):(n=A(t))?n.call(t,i,a):i(t)):a(l)}catch(e){s&&!r&&s.exit(),a(e)}}(n[e++]);c._c=[],c._n=!1,t&&!c._h&&M(c)})}},M=function(i){v.call(l,function(){var e,t,n,r=i._v,o=I(i);if(o&&(e=w(function(){N?S.emit("unhandledRejection",r,i):(t=l.onunhandledrejection)?t({promise:i,reason:r}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",r)}),i._h=N||I(i)?2:1),i._a=void 0,o&&e.e)throw e.v})},I=function(e){return 1!==e._h&&0===(e._a||e._c).length},L=function(t){v.call(l,function(){var e;N?S.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),D(t,!0))},F=function(e){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw _("Promise can't be resolved itself");(n=A(e))?b(function(){var t={_w:r,_d:!1};try{n.call(e,u(F,t,1),u(B,t,1))}catch(e){B.call(t,e)}}):(r._v=e,r._s=1,D(r,!1))}catch(e){B.call({_w:r,_d:!1},e)}}};P||(T=function(e){m(this,T,"Promise","_h"),p(e),r.call(this);try{e(u(F,this,1),u(B,this,1))}catch(e){B.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(78)(T.prototype,{then:function(e,t){var n=O(g(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=N?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=u(F,e,1),this.reject=u(B,e,1)},y.f=O=function(e){return e===T||e===a?new i(e):o(e)}),f(f.G+f.W+f.F*!P,{Promise:T}),n(23)(T,"Promise"),n(79)("Promise"),a=n(1).Promise,f(f.S+f.F*!P,"Promise",{reject:function(e){var t=O(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!P),"Promise",{resolve:function(e){return C(s&&this===a?T:this,e)}}),f(f.S+f.F*!(P&&n(80)(function(e){T.all(e).catch(R)})),"Promise",{all:function(e){var a=this,t=O(a),s=t.resolve,l=t.reject,n=w(function(){var r=[],o=0,i=1;h(e,!1,function(e){var t=o++,n=!1;r.push(void 0),i++,a.resolve(e).then(function(e){n||(n=!0,r[t]=e,--i||s(r))},l)}),--i||s(r)});return n.e&&l(n.v),t.promise},race:function(e){var t=this,n=O(t),r=n.reject,o=w(function(){h(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var d=n(19),p=n(72),m=n(73),h=n(3),g=n(48),v=n(74),b={},y={};(t=e.exports=function(e,t,n,r,o){var i,a,s,l,u=o?function(){return e}:v(e),c=d(n,r,t?2:1),f=0;if("function"!=typeof u)throw TypeError(e+" is not iterable!");if(m(u)){for(i=g(e.length);f<i;f++)if((l=t?c(h(a=e[f])[0],a[1]):c(e[f]))===b||l===y)return l}else for(s=u.call(e);!(a=s.next()).done;)if((l=p(s,c,a.value,t))===b||l===y)return l}).BREAK=b,t.RETURN=y},function(e,t,n){var i=n(3);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&i(o.call(e)),t}}},function(e,t,n){var r=n(14),o=n(2)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(51),o=n(2)("iterator"),i=n(14);e.exports=n(1).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},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){var s=n(0),l=n(53).set,u=s.MutationObserver||s.WebKitMutationObserver,c=s.process,f=s.Promise,d="process"==n(16)(c);e.exports=function(){var n,r,o,e=function(){var e,t;for(d&&(e=c.domain)&&e.exit();n;){t=n.fn,n=n.next;try{t()}catch(e){throw n?o():r=void 0,e}}r=void 0,e&&e.enter()};if(d)o=function(){c.nextTick(e)};else if(!u||s.navigator&&s.navigator.standalone)if(f&&f.resolve){var t=f.resolve(void 0);o=function(){t.then(e)}}else o=function(){l.call(s,e)};else{var i=!0,a=document.createTextNode("");new u(e).observe(a,{characterData:!0}),o=function(){a.data=i=!i}}return function(e){var t={fn:e,next:void 0};r&&(r.next=t),n||(n=t,o()),r=t}}},function(e,t,n){var r=n(0).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){var o=n(5);e.exports=function(e,t,n){for(var r in t)n&&e[r]?e[r]=t[r]:o(e,r,t[r]);return e}},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(6),a=n(8),s=n(2)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:r[e];a&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var i=n(2)("iterator"),a=!1;try{var r=[7][i]();r.return=function(){a=!0},Array.from(r,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var n=!1;try{var r=[7],o=r[i]();o.next=function(){return{done:n=!0}},r[i]=function(){return o},e(r)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(4),o=n(1),i=n(0),a=n(52),s=n(55);r(r.P+r.R,"Promise",{finally:function(t){var n=a(this,o.Promise||i.Promise),e="function"==typeof t;return this.then(e?function(e){return s(n,t()).then(function(){return e})}:t,e?function(e){return s(n,t()).then(function(){throw e})}:t)}})},function(e,t,n){"use strict";var r=n(4),o=n(33),i=n(54);r(r.S,"Promise",{try:function(e){var t=o.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){n(84),e.exports=n(1).Object.assign},function(e,t,n){var r=n(4);r(r.S+r.F,"Object",{assign:n(85)})},function(e,t,n){"use strict";var d=n(15),p=n(35),m=n(24),h=n(32),g=n(47),o=Object.assign;e.exports=!o||n(10)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=o({},e)[n]||Object.keys(o({},t)).join("")!=r})?function(e,t){for(var n=h(e),r=arguments.length,o=1,i=p.f,a=m.f;o<r;)for(var s,l=g(arguments[o++]),u=i?d(l).concat(i(l)):d(l),c=u.length,f=0;f<c;)a.call(l,s=u[f++])&&(n[s]=l[s]);return n}:o},function(e,t,n){e.exports={default:n(87),__esModule:!0}},function(e,t,n){var r=n(1),o=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return o.stringify.apply(o,arguments)}},function(e,t,n){n(89),e.exports=n(1).Object.keys},function(e,t,n){var r=n(32),o=n(15);n(90)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){var o=n(4),i=n(1),a=n(10);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],r={};r[e]=t(n),o(o.S+o.F*a(function(){n(1)}),"Object",r)}},function(e,t,n){e.exports=function(e){"use strict";function u(e,t){var n=e[0],r=e[1],o=e[2],i=e[3];r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&o)+t[1]-389564586|0)<<12|i>>>20)+n|0)&n|~i&r)+t[2]+606105819|0)<<17|o>>>15)+i|0)&i|~o&n)+t[3]-1044525330|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&o)+t[5]+1200080426|0)<<12|i>>>20)+n|0)&n|~i&r)+t[6]-1473231341|0)<<17|o>>>15)+i|0)&i|~o&n)+t[7]-45705983|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&o)+t[9]-1958414417|0)<<12|i>>>20)+n|0)&n|~i&r)+t[10]-42063|0)<<17|o>>>15)+i|0)&i|~o&n)+t[11]-1990404162|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&o|~r&i)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&o)+t[13]-40341101|0)<<12|i>>>20)+n|0)&n|~i&r)+t[14]-1502002290|0)<<17|o>>>15)+i|0)&i|~o&n)+t[15]+1236535329|0)<<22|r>>>10)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[1]-165796510|0)<<5|n>>>27)+r|0)&o|r&~o)+t[6]-1069501632|0)<<9|i>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|o>>>18)+i|0)&n|i&~n)+t[0]-373897302|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[5]-701558691|0)<<5|n>>>27)+r|0)&o|r&~o)+t[10]+38016083|0)<<9|i>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|o>>>18)+i|0)&n|i&~n)+t[4]-405537848|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[9]+568446438|0)<<5|n>>>27)+r|0)&o|r&~o)+t[14]-1019803690|0)<<9|i>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|o>>>18)+i|0)&n|i&~n)+t[8]+1163531501|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r&i|o&~i)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&o|r&~o)+t[2]-51403784|0)<<9|i>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|o>>>18)+i|0)&n|i&~n)+t[12]-1926607734|0)<<20|r>>>12)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^o)+t[8]-2022574463|0)<<11|i>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|o>>>16)+i|0)^i^n)+t[14]-35309556|0)<<23|r>>>9)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^o)+t[4]+1272893353|0)<<11|i>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|o>>>16)+i|0)^i^n)+t[10]-1094730640|0)<<23|r>>>9)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^o)+t[0]-358537222|0)<<11|i>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|o>>>16)+i|0)^i^n)+t[6]+76029189|0)<<23|r>>>9)+o|0,r=((r+=((o=((o+=((i=((i+=((n=((n+=(r^o^i)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^o)+t[12]-421815835|0)<<11|i>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|o>>>16)+i|0)^i^n)+t[2]-995338651|0)<<23|r>>>9)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~o))+t[7]+1126891415|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[14]-1416354905|0)<<15|o>>>17)+i|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~o))+t[3]-1894986606|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[10]-1051523|0)<<15|o>>>17)+i|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~o))+t[15]-30611744|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[6]-1560198380|0)<<15|o>>>17)+i|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+o|0,r=((r+=((i=((i+=(r^((n=((n+=(o^(r|~i))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~o))+t[11]-1120210379|0)<<10|i>>>22)+n|0)^((o=((o+=(n^(i|~r))+t[2]+718787259|0)<<15|o>>>17)+i|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+o|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=o+e[2]|0,e[3]=i+e[3]|0}function c(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function f(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function r(e){var t,n,r,o,i,a,s=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=s;t+=64)u(l,c(e.substring(t-64,t)));for(n=(e=e.substring(t-64)).length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)r[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),55<t)for(u(l,r),t=0;t<16;t+=1)r[t]=0;return o=(o=8*s).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(o[2],16),a=parseInt(o[1],16)||0,r[14]=i,r[15]=a,u(l,r),l}function n(e){var t,n="";for(t=0;t<4;t+=1)n+=l[e>>8*t+4&15]+l[e>>8*t&15];return n}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=n(e[t]);return e.join("")}function o(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function s(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function i(){this.reset()}var l=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return a(r("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function u(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(e,t){var n,r,o,i,a=this.byteLength,s=u(e,a),l=a;return void 0!==t&&(l=u(t,a)),l<s?new ArrayBuffer(0):(n=l-s,r=new ArrayBuffer(n),o=new Uint8Array(r),i=new Uint8Array(this,s,n),o.set(i),r)}}(),i.prototype.append=function(e){return this.appendBinary(o(e)),this},i.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,n=this._buff.length;for(t=64;t<=n;t+=64)u(this._hash,c(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},i.prototype.end=function(e){var t,n,r=this._buff,o=r.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)i[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(i,o),n=a(this._hash),e&&(n=s(n)),this.reset(),n},i.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},i.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},i.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},i.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},i.prototype._finish=function(e,t){var n,r,o,i=t;if(e[i>>2]|=128<<(i%4<<3),55<i)for(u(this._hash,e),i=0;i<16;i+=1)e[i]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(n[2],16),o=parseInt(n[1],16)||0,e[14]=r,e[15]=o,u(this._hash,e)},i.hash=function(e,t){return i.hashBinary(o(e),t)},i.hashBinary=function(e,t){var n=a(r(e));return t?s(n):n},(i.ArrayBuffer=function(){this.reset()}).prototype.append=function(e){var t,n,r,o,i=(n=this._buff.buffer,r=e,(o=new Uint8Array(n.byteLength+r.byteLength)).set(new Uint8Array(n)),o.set(new Uint8Array(r),n.byteLength),o),a=i.length;for(this._length+=e.byteLength,t=64;t<=a;t+=64)u(this._hash,f(i.subarray(t-64,t)));return this._buff=t-64<a?new Uint8Array(i.buffer.slice(t-64)):new Uint8Array(0),this},i.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,o=r.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<o;t+=1)i[t>>2]|=r[t]<<(t%4<<3);return this._finish(i,o),n=a(this._hash),e&&(n=s(n)),this.reset(),n},i.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},i.ArrayBuffer.prototype.getState=function(){var e,t=i.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},i.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,r=e.length,o=new ArrayBuffer(r),i=new Uint8Array(o);for(n=0;n<r;n+=1)i[n]=e.charCodeAt(n);return i}(e.buff),i.prototype.setState.call(this,e)},i.ArrayBuffer.prototype.destroy=i.prototype.destroy,i.ArrayBuffer.prototype._finish=i.prototype._finish,i.ArrayBuffer.hash=function(e,t){var n=a(function(e){var t,n,r,o,i,a,s=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=s;t+=64)u(l,f(e.subarray(t-64,t)));for(n=(e=t-64<s?e.subarray(t-64):new Uint8Array(0)).length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)r[t>>2]|=e[t]<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),55<t)for(u(l,r),t=0;t<16;t+=1)r[t]=0;return o=(o=8*s).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(o[2],16),a=parseInt(o[1],16)||0,r[14]=i,r[15]=a,u(l,r),l}(new Uint8Array(e)));return t?s(n):n},i}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.UploadManager=void 0;var f=r(n(18)),a=r(n(34)),i=r(n(17)),d=n(12),s=n(93);t.UploadManager=function(){function o(e,t,n){var r=this;(0,i.default)(this,o),this.config=(0,a.default)({useCdnDomain:!0,disableStatisticsReport:!1,retryCount:3,checkByMD5:!1,uphost:null,forceDirect:!1,concurrentRequestLimit:3,region:null},e.config),this.putExtra=(0,a.default)({fname:"",params:{},mimeType:null},e.putExtra),this.statisticsLogger=n,this.progress=null,this.xhrList=[],this.xhrHandler=function(e){return r.xhrList.push(e)},this.aborted=!1,this.file=e.file,this.key=e.key,this.token=e.token,this.onData=function(){},this.onError=function(){},this.onComplete=function(){},(this.retryCount=0,a.default)(this,t)}return o.prototype.putFile=function(){var i=this;if(this.aborted=!1,this.putExtra.fname||(this.putExtra.fname=this.file.name),!this.putExtra.mimeType||!this.putExtra.mimeType.length||(0,d.isContainFileMimeType)(this.file.type,this.putExtra.mimeType)){var e=(0,d.getUploadUrl)(this.config,this.token).then(function(e){return i.uploadUrl=e,i.uploadAt=(new Date).getTime(),i.config.forceDirect?i.directUpload():4194304<i.file.size?i.resumeUpload():i.directUpload()});return e.then(function(e){i.onComplete(e.data),i.config.disableStatisticsReport||i.sendLog(e.reqId,200)},function(e){if(i.clear(),e.isRequestError&&!i.config.disableStatisticsReport){var t=i.aborted?"":e.reqId,n=i.aborted?-2:e.code;i.sendLog(t,n)}var r=e.isRequestError&&0===e.code&&!i.aborted,o=++i.retryCount<=i.config.retryCount;r&&o?i.putFile():i.onError(e)}),e}var t=new Error("file type doesn't match with what you specify");this.onError(t)},o.prototype.clear=function(){this.xhrList.forEach(function(e){return e.abort()}),this.xhrList=[]},o.prototype.stop=function(){this.clear(),this.aborted=!0},o.prototype.sendLog=function(e,t){this.statisticsLogger.log({code:t,reqId:e,host:(0,d.getDomainFromUrl)(this.uploadUrl),remoteIp:"",port:(0,d.getPortFromUrl)(this.uploadUrl),duration:((new Date).getTime()-this.uploadAt)/1e3,time:Math.floor(this.uploadAt/1e3),bytesSent:this.progress?this.progress.total.loaded:0,upType:"jssdk-h5",size:this.file.size},this.token)},o.prototype.directUpload=function(){var t=this,n=new FormData;return n.append("file",this.file),n.append("token",this.token),null!=this.key&&n.append("key",this.key),n.append("fname",this.putExtra.fname),(0,d.filterParams)(this.putExtra.params).forEach(function(e){return n.append(e[0],e[1])}),(0,d.request)(this.uploadUrl,{method:"POST",body:n,onProgress:function(e){t.updateDirectProgress(e.loaded,e.total)},onCreate:this.xhrHandler}).then(function(e){return t.finishDirectProgress(),e})},o.prototype.resumeUpload=function(){var t=this;this.loaded={mkFileProgress:0,chunks:null},this.ctxList=[],this.localInfo=(0,d.getLocalFileInfo)(this.file),this.chunks=(0,d.getChunks)(this.file,4194304),this.initChunksProgress();var n=new s.Pool(function(e){return t.uploadChunk(e)},this.config.concurrentRequestLimit),e=this.chunks.map(function(e,t){return n.enqueue({chunk:e,index:t})}),r=f.default.all(e).then(function(){return t.mkFileReq()});return r.then(function(e){(0,d.removeLocalFileInfo)(t.file)},function(e){701!==e.code||(0,d.removeLocalFileInfo)(t.file)}),r},o.prototype.uploadChunk=function(e){var o=this,i=e.index,a=e.chunk,s=this.localInfo[i],l=this.uploadUrl+"/mkblk/"+a.size,u=s&&!(0,d.isChunkExpired)(s.time),t=this.config.checkByMD5,c=function(){return o.updateChunkProgress(a.size,i),o.ctxList[i]={ctx:s.ctx,size:s.size,time:s.time,md5:s.md5},f.default.resolve(null)};return u&&!t?c():(0,d.computeMd5)(a).then(function(t){if(u&&t===s.md5)return c();var e=(0,d.getHeadersForChunkUpload)(o.token),n=function(e){o.updateChunkProgress(e.loaded,i)},r=o.xhrHandler;return(0,d.request)(l,{method:"POST",headers:e,body:a,onProgress:n,onCreate:r}).then(function(e){n({loaded:a.size}),o.ctxList[i]={time:(new Date).getTime(),ctx:e.data.ctx,size:a.size,md5:t},(0,d.setLocalFileInfo)(o.file,o.ctxList)})})},o.prototype.mkFileReq=function(){var t=this,e=(0,a.default)({mimeType:"application/octet-stream"},this.putExtra),n=(0,d.createMkFileUrl)(this.uploadUrl,this.file.size,this.key,e),r=this.ctxList.map(function(e){return e.ctx}).join(","),o=(0,d.getHeadersForMkFile)(this.token),i=this.xhrHandler;return(0,d.request)(n,{method:"POST",body:r,headers:o,onCreate:i}).then(function(e){return t.updateMkFileProgress(1),f.default.resolve(e)})},o.prototype.updateDirectProgress=function(e,t){this.progress={total:this.getProgressInfoItem(e,t+1)},this.onData(this.progress)},o.prototype.finishDirectProgress=function(){if(!this.progress)return this.progress={total:this.getProgressInfoItem(this.file.size,this.file.size)},void this.onData(this.progress);var e=this.progress.total;this.progress={total:this.getProgressInfoItem(e.loaded+1,e.size)},this.onData(this.progress)},o.prototype.initChunksProgress=function(){this.loaded.chunks=this.chunks.map(function(e){return 0}),this.notifyResumeProgress()},o.prototype.updateChunkProgress=function(e,t){this.loaded.chunks[t]=e,this.notifyResumeProgress()},o.prototype.updateMkFileProgress=function(e){this.loaded.mkFileProgress=e,this.notifyResumeProgress()},o.prototype.notifyResumeProgress=function(){var n=this;this.progress={total:this.getProgressInfoItem((0,d.sum)(this.loaded.chunks)+this.loaded.mkFileProgress,this.file.size+1),chunks:this.chunks.map(function(e,t){return n.getProgressInfoItem(n.loaded.chunks[t],e.size)})},this.onData(this.progress)},o.prototype.getProgressInfoItem=function(e,t){return{loaded:e,size:t,percent:e/t*100}},o}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.Pool=void 0;var o=r(n(18)),i=r(n(17));t.Pool=function(){function n(e,t){(0,i.default)(this,n),this.runTask=e,this.queue=[],this.processing=[],this.limit=t}return n.prototype.enqueue=function(n){var r=this;return new o.default(function(e,t){r.queue.push({task:n,resolve:e,reject:t}),r.check()})},n.prototype.run=function(t){var e=this;this.queue=this.queue.filter(function(e){return e!==t}),this.processing.push(t),this.runTask(t.task).then(function(){e.processing=e.processing.filter(function(e){return e!==t}),t.resolve(),e.check()},function(e){return t.reject(e)})},n.prototype.check=function(){var n=this,e=this.processing.length,t=this.limit-e;this.queue.slice(0,t).forEach(function(e,t){n.run(e)})},n}()},function(e,t,n){"use strict";function m(e,t){return e=encodeURIComponent(e),"/"!==t.slice(t.length-1)&&(t+="/"),t+e}function u(e,t,n){if(!/^\d$/.test(e.mode))throw"mode should be number in imageView2";var r=e.mode,o=e.w,i=e.h,a=e.q,s=e.format;if(!o&&!i)throw"param w and h is empty in imageView2";var l="imageView2/"+encodeURIComponent(r);return l+=o?"/w/"+encodeURIComponent(o):"",l+=i?"/h/"+encodeURIComponent(i):"",l+=a?"/q/"+encodeURIComponent(a):"",l+=s?"/format/"+encodeURIComponent(s):"",t&&(l=m(t,n)+"?"+l),l}function c(e,t,n){var r=e["auto-orient"],o=e.thumbnail,i=e.strip,a=e.gravity,s=e.crop,l=e.quality,u=e.rotate,c=e.format,f=e.blur,d="imageMogr2";return d+=r?"/auto-orient":"",d+=o?"/thumbnail/"+encodeURIComponent(o):"",d+=i?"/strip":"",d+=a?"/gravity/"+encodeURIComponent(a):"",d+=l?"/quality/"+encodeURIComponent(l):"",d+=s?"/crop/"+encodeURIComponent(s):"",d+=u?"/rotate/"+encodeURIComponent(u):"",d+=c?"/format/"+encodeURIComponent(c):"",d+=f?"/blur/"+encodeURIComponent(f):"",t&&(d=m(t,n)+"?"+d),d}function f(e,t,n){var r=e.mode;if(!r)throw"mode can't be empty in watermark";var o="watermark/"+r;if(1!==r&&2!==r)throw"mode is wrong";if(1===r){var i=e.image;if(!i)throw"image can't be empty in watermark";o+=i?"/image/"+(0,h.urlSafeBase64Encode)(i):""}if(2===r){var a=e.text,s=e.font,l=e.fontsize,u=e.fill;if(!a)throw"text can't be empty in watermark";o+=a?"/text/"+(0,h.urlSafeBase64Encode)(a):"",o+=s?"/font/"+(0,h.urlSafeBase64Encode)(s):"",o+=l?"/fontsize/"+l:"",o+=u?"/fill/"+(0,h.urlSafeBase64Encode)(u):""}var c=e.dissolve,f=e.gravity,d=e.dx,p=e.dy;return o+=c?"/dissolve/"+encodeURIComponent(c):"",o+=f?"/gravity/"+encodeURIComponent(f):"",o+=d?"/dx/"+encodeURIComponent(d):"",o+=p?"/dy/"+encodeURIComponent(p):"",t&&(o=m(t,n)+"?"+o),o}t.__esModule=!0,t.imageView2=u,t.imageMogr2=c,t.watermark=f,t.imageInfo=function(e,t){var n=m(e,t)+"?imageInfo";return(0,r.request)(n,{method:"GET"})},t.exif=function(e,t){var n=m(e,t)+"?exif";return(0,r.request)(n,{method:"GET"})},t.pipeline=function(e,t,n){var r=void 0,o=void 0,i="";if("[object Array]"!==Object.prototype.toString.call(e))throw"pipeline's first param should be array";for(var a=0,s=e.length;a<s;a++){if(!(r=e[a]).fop)throw"fop can't be empty in pipeline";switch(r.fop){case"watermark":i+=f(r)+"|";break;case"imageView2":i+=u(r)+"|";break;case"imageMogr2":i+=c(r)+"|";break;default:o=!0}if(o)throw"fop is wrong in pipeline"}if(t){var l=(i=m(t,n)+"?"+i).length;"|"===i.slice(l-1)&&(i=i.slice(0,l-1))}return i};var r=n(12),h=n(56)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.Observable=void 0;var o=r(n(96)),i=r(n(17));t.Observable=function(){function t(e){(0,i.default)(this,t),this.subscribeAction=e}return t.prototype.subscribe=function(e,t,n){var r=new a(e,t,n),o=this.subscribeAction(r);return new s(r,o)},t}();var a=function(){function r(e,t,n){(0,i.default)(this,r),this.isStopped=!1,"object"===(void 0===e?"undefined":(0,o.default)(e))?(this._onNext=e.next,this._onError=e.error,this._onCompleted=e.complete):(this._onNext=e,this._onError=t,this._onCompleted=n)}return r.prototype.next=function(e){!this.isStopped&&this._onNext&&this._onNext(e)},r.prototype.error=function(e){!this.isStopped&&this._onError&&(this.isStopped=!0,this._onError(e))},r.prototype.complete=function(e){!this.isStopped&&this._onCompleted&&(this.isStopped=!0,this._onCompleted(e))},r}(),s=function(){function n(e,t){(0,i.default)(this,n),this.observer=e,this.result=t}return n.prototype.unsubscribe=function(){this.observer.isStopped=!0,this.result()},n}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=r(n(97)),i=r(n(99)),a="function"==typeof i.default&&"symbol"==typeof o.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};t.default="function"==typeof i.default&&"symbol"===a(o.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":a(e)}},function(e,t,n){e.exports={default:n(98),__esModule:!0}},function(e,t,n){n(41),n(50),e.exports=n(37).f("iterator")},function(e,t,n){e.exports={default:n(100),__esModule:!0}},function(e,t,n){n(101),n(40),n(107),n(108),e.exports=n(1).Symbol},function(e,t,n){"use strict";var r=n(0),a=n(9),o=n(8),i=n(4),s=n(44),l=n(102).KEY,u=n(10),c=n(30),f=n(23),d=n(22),p=n(2),m=n(37),h=n(38),g=n(103),v=n(104),b=n(3),y=n(7),w=n(11),x=n(28),C=n(21),_=n(45),S=n(105),k=n(106),E=n(6),T=n(15),N=k.f,R=E.f,O=S.f,P=r.Symbol,A=r.JSON,D=A&&A.stringify,M=p("_hidden"),I=p("toPrimitive"),L={}.propertyIsEnumerable,B=c("symbol-registry"),F=c("symbols"),j=c("op-symbols"),H=Object.prototype,U="function"==typeof P,z=r.QObject,W=!z||!z.prototype||!z.prototype.findChild,V=o&&u(function(){return 7!=_(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=N(H,t);r&&delete H[t],R(e,t,n),r&&e!==H&&R(H,t,r)}:R,q=function(e){var t=F[e]=_(P.prototype);return t._k=e,t},$=U&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},X=function(e,t,n){return e===H&&X(j,t,n),b(e),t=x(t,!0),b(n),a(F,t)?(n.enumerable?(a(e,M)&&e[M][t]&&(e[M][t]=!1),n=_(n,{enumerable:C(0,!1)})):(a(e,M)||R(e,M,C(1,{})),e[M][t]=!0),V(e,t,n)):R(e,t,n)},Y=function(e,t){b(e);for(var n,r=g(t=w(t)),o=0,i=r.length;o<i;)X(e,n=r[o++],t[n]);return e},G=function(e){var t=L.call(this,e=x(e,!0));return!(this===H&&a(F,e)&&!a(j,e))&&(!(t||!a(this,e)||!a(F,e)||a(this,M)&&this[M][e])||t)},K=function(e,t){if(e=w(e),t=x(t,!0),e!==H||!a(F,t)||a(j,t)){var n=N(e,t);return!n||!a(F,t)||a(e,M)&&e[M][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=O(w(e)),r=[],o=0;n.length>o;)a(F,t=n[o++])||t==M||t==l||r.push(t);return r},Z=function(e){for(var t,n=e===H,r=O(n?j:w(e)),o=[],i=0;r.length>i;)!a(F,t=r[i++])||n&&!a(H,t)||o.push(F[t]);return o};U||(s((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var t=d(0<arguments.length?arguments[0]:void 0),n=function(e){this===H&&n.call(j,e),a(this,M)&&a(this[M],t)&&(this[M][t]=!1),V(this,t,C(1,e))};return o&&W&&V(H,t,{configurable:!0,set:n}),q(t)}).prototype,"toString",function(){return this._k}),k.f=K,E.f=X,n(57).f=S.f=J,n(24).f=G,n(35).f=Z,o&&!n(13)&&s(H,"propertyIsEnumerable",G,!0),m.f=function(e){return q(p(e))}),i(i.G+i.W+i.F*!U,{Symbol:P});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)p(Q[ee++]);for(var te=T(p.store),ne=0;te.length>ne;)h(te[ne++]);i(i.S+i.F*!U,"Symbol",{for:function(e){return a(B,e+="")?B[e]:B[e]=P(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in B)if(B[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),i(i.S+i.F*!U,"Object",{create:function(e,t){return void 0===t?_(e):Y(_(e),t)},defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:K,getOwnPropertyNames:J,getOwnPropertySymbols:Z}),A&&i(i.S+i.F*(!U||u(function(){var e=P();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(y(t)||void 0!==e)&&!$(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,D.apply(A,r)}}),P.prototype[I]||n(5)(P.prototype,I,P.prototype.valueOf),f(P,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(22)("meta"),o=n(7),i=n(9),a=n(6).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(10)(function(){return l(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&f.NEED&&l(e)&&!i(e,r)&&c(e),e}}},function(e,t,n){var s=n(15),l=n(35),u=n(24);e.exports=function(e){var t=s(e),n=l.f;if(n)for(var r,o=n(e),i=u.f,a=0;o.length>a;)i.call(e,r=o[a++])&&t.push(r);return t}},function(e,t,n){var r=n(16);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(11),o=n(57).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},function(e,t,n){var r=n(24),o=n(21),i=n(11),a=n(28),s=n(9),l=n(43),u=Object.getOwnPropertyDescriptor;t.f=n(8)?u:function(e,t){if(e=i(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){n(38)("asyncIterator")},function(e,t,n){n(38)("observable")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.StatisticsLogger=void 0;var o=r(n(36)),i=r(n(17)),a=n(12);t.StatisticsLogger=function(){function e(){(0,i.default)(this,e)}return e.prototype.log=function(t,e){var n="";(0,o.default)(t).forEach(function(e){return n+=t[e]+","}),this.send(n,e,0)},e.prototype.send=function(e,t,n){var r=(0,a.createXHR)(),o=this;r.open("POST","https://uplog.qbox.me/log/3"),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.setRequestHeader("Authorization","UpToken "+t),r.onreadystatechange=function(){4===r.readyState&&200!==r.status&&++n<=3&&o.send(e,t,n)},r.send(e)},e}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var b=r(n(18)),o=r(n(34)),i=r(n(17)),a=r(n(36)),c=n(111),f=n(12),s={PNG:"image/png",JPEG:"image/jpeg",WEBP:"image/webp",BMP:"image/bmp"},y=Math.log(2),l=(0,a.default)(s).map(function(e){return s[e]}),u=s.JPEG,d=function(){function n(e,t){(0,i.default)(this,n),this.config=(0,o.default)({quality:.92,noCompressIfLarger:!1},t),this.file=e}return n.prototype.process=function(){var n=this;this.outputType=this.file.type;var e,r={};return e=this.file.type,l.includes(e)?this.getOriginImage().then(function(e){return n.getCanvas(e)}).then(function(e){var t=1;return n.config.maxWidth&&(t=Math.min(1,n.config.maxWidth/e.width)),n.config.maxHeight&&(t=Math.min(1,t,n.config.maxHeight/e.height)),r.width=e.width,r.height=e.height,n.doScale(e,t)}).then(function(e){var t=n.toBlob(e);return t.size>n.file.size&&n.config.noCompressIfLarger?{dist:n.file,width:r.width,height:r.height}:{dist:t,width:e.width,height:e.height}}):b.default.reject(new Error("unsupported file type: "+this.file.type))},n.prototype.clear=function(e,t,n){this.outputType===u?(e.fillStyle="#fff",e.fillRect(0,0,t,n)):e.clearRect(0,0,t,n)},n.prototype.getOriginImage=function(){var o=this;return new b.default(function(e,t){var n=(0,f.createObjectURL)(o.file),r=new Image;r.onload=function(){e(r)},r.onerror=function(){t("image load error")},r.src=n})},n.prototype.getCanvas=function(l){var u=this;return new b.default(function(s,e){c.EXIF.getData(l,function(){var e=c.EXIF.getTag(l,"Orientation")||1,t=(0,f.getTransform)(l,e),n=t.width,r=t.height,o=t.matrix,i=document.createElement("canvas"),a=i.getContext("2d");i.width=n,i.height=r,u.clear(a,n,r),a.transform.apply(a,o),a.drawImage(l,0,0),s(i)})})},n.prototype.doScale=function(e,t){if(1===t)return b.default.resolve(e);var n=e.getContext("2d"),r=Math.min(4,Math.ceil(1/t/y)),o=Math.pow(t,1/r),i=document.createElement("canvas"),a=i.getContext("2d"),s=e.width,l=e.height,u=s,c=l;i.width=s,i.height=l;for(var f=void 0,d=void 0,p=0;p<r;p++){var m=s*o|0,h=l*o|0;p===r-1&&(m=u*t,h=c*t),d=p%2==0?(f=e,a):(f=i,n),this.clear(d,s,l),d.drawImage(f,0,0,s,l,0,0,m,h),s=m,l=h}var g=f===e?i:e,v=d.getImageData(0,0,s,l);return g.width=s,g.height=l,d.putImageData(v,0,0),b.default.resolve(g)},n.prototype.toBlob=function(e){var t=e.toDataURL(this.outputType,this.config.quality),n=atob(t.split(",")[1]).split("").map(function(e){return e.charCodeAt(0)});return new Blob([new Uint8Array(n)],{type:this.outputType})},n}();t.default=function(e,t){return new d(e,t).process()}},function(e,t,r){var a;(function(){function o(e){return!!e.exifdata}function r(o,i){function t(e){var t=s(e);o.exifdata=t||{};var n=function(e){var t,n,r=new DataView(e);if(255!=r.getUint8(0)||216!=r.getUint8(1))return!1;for(var o=2,i=e.byteLength;o<i;){if(n=o,56===(t=r).getUint8(n)&&66===t.getUint8(n+1)&&73===t.getUint8(n+2)&&77===t.getUint8(n+3)&&4===t.getUint8(n+4)&&4===t.getUint8(n+5)){var a=r.getUint8(o+7);return a%2!=0&&(a+=1),0===a&&(a=4),l(e,o+8+a,r.getUint16(o+6+a))}o++}}(e);if(o.iptcdata=n||{},u.isXmpEnabled){var r=function(e){if("DOMParser"in self){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength,o=new DOMParser;n<r-4;){if("http"==m(t,n,4)){var i=n-1,a=t.getUint16(n-2)-1,s=m(t,i,a),l=s.indexOf("xmpmeta>")+8,u=(s=s.substring(s.indexOf("<x:xmpmeta"),l)).indexOf("x:xmpmeta")+10;return s=s.slice(0,u)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+s.slice(u),p(o.parseFromString(s,"text/xml"))}n++}}}(e);o.xmpdata=r||{}}i&&i.call(o)}if(o.src)if(/^data\:/i.test(o.src))t(function(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),r=n.length,o=new ArrayBuffer(r),i=new Uint8Array(o),a=0;a<r;a++)i[a]=n.charCodeAt(a);return o}(o.src));else if(/^blob\:/i.test(o.src))(n=new FileReader).onload=function(e){t(e.target.result)},r=o.src,(a=new XMLHttpRequest).open("GET",r,!0),a.responseType="blob",a.onload=function(e){var t;200!=this.status&&0!==this.status||(t=this.response,n.readAsArrayBuffer(t))},a.send();else{var e=new XMLHttpRequest;e.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";t(e.response),e=null},e.open("GET",o.src,!0),e.responseType="arraybuffer",e.send(null)}else if(self.FileReader&&(o instanceof self.Blob||o instanceof self.File)){var n;(n=new FileReader).onload=function(e){t(e.target.result)},n.readAsArrayBuffer(o)}var r,a}function s(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,r=e.byteLength;n<r;){if(255!=t.getUint8(n))return!1;if(225==t.getUint8(n+1))return i(t,n+4,t.getUint16(n+2));n+=2+t.getUint16(n+2)}}function l(e,t,n){for(var r,o,i,a,s=new DataView(e),l={},u=t;u<t+n;)28===s.getUint8(u)&&2===s.getUint8(u+1)&&(a=s.getUint8(u+2))in w&&(i=s.getInt16(u+3),o=w[a],r=m(s,u+5,i),l.hasOwnProperty(o)?l[o]instanceof Array?l[o].push(r):l[o]=[l[o],r]:l[o]=r),u++;return l}function d(e,t,n,r,o){var i,a,s,l=e.getUint16(n,!o),u={};for(s=0;s<l;s++)i=n+12*s+2,a=r[e.getUint16(i,!o)],u[a]=c(e,i,t,n,o);return u}function c(e,t,n,r,o){var i,a,s,l,u,c,f=e.getUint16(t+2,!o),d=e.getUint32(t+4,!o),p=e.getUint32(t+8,!o)+n;switch(f){case 1:case 7:if(1==d)return e.getUint8(t+8,!o);for(i=4<d?p:t+8,a=[],l=0;l<d;l++)a[l]=e.getUint8(i+l);return a;case 2:return m(e,i=4<d?p:t+8,d-1);case 3:if(1==d)return e.getUint16(t+8,!o);for(i=2<d?p:t+8,a=[],l=0;l<d;l++)a[l]=e.getUint16(i+2*l,!o);return a;case 4:if(1==d)return e.getUint32(t+8,!o);for(a=[],l=0;l<d;l++)a[l]=e.getUint32(p+4*l,!o);return a;case 5:if(1==d)return u=e.getUint32(p,!o),c=e.getUint32(p+4,!o),(s=new Number(u/c)).numerator=u,s.denominator=c,s;for(a=[],l=0;l<d;l++)u=e.getUint32(p+8*l,!o),c=e.getUint32(p+4+8*l,!o),a[l]=new Number(u/c),a[l].numerator=u,a[l].denominator=c;return a;case 9:if(1==d)return e.getInt32(t+8,!o);for(a=[],l=0;l<d;l++)a[l]=e.getInt32(p+4*l,!o);return a;case 10:if(1==d)return e.getInt32(p,!o)/e.getInt32(p+4,!o);for(a=[],l=0;l<d;l++)a[l]=e.getInt32(p+8*l,!o)/e.getInt32(p+4+8*l,!o);return a}}function m(e,t,r){var o="";for(n=t;n<t+r;n++)o+=String.fromCharCode(e.getUint8(n));return o}function i(e,t){if("Exif"!=m(e,t,4))return!1;var n,r,o,i,a,s=t+6;if(18761==e.getUint16(s))n=!1;else{if(19789!=e.getUint16(s))return!1;n=!0}if(42!=e.getUint16(s+2,!n))return!1;var l=e.getUint32(s+4,!n);if(l<8)return!1;if((r=d(e,s,s+l,g,n)).ExifIFDPointer)for(o in i=d(e,s,s+r.ExifIFDPointer,h,n)){switch(o){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":i[o]=y[o][i[o]];break;case"ExifVersion":case"FlashpixVersion":i[o]=String.fromCharCode(i[o][0],i[o][1],i[o][2],i[o][3]);break;case"ComponentsConfiguration":i[o]=y.Components[i[o][0]]+y.Components[i[o][1]]+y.Components[i[o][2]]+y.Components[i[o][3]]}r[o]=i[o]}if(r.GPSInfoIFDPointer)for(o in a=d(e,s,s+r.GPSInfoIFDPointer,v,n)){switch(o){case"GPSVersionID":a[o]=a[o][0]+"."+a[o][1]+"."+a[o][2]+"."+a[o][3]}r[o]=a[o]}return r.thumbnail=function(e,t,n,r){var o,i,a,s,l=(i=t+n,a=r,s=(o=e).getUint16(i,!a),o.getUint32(i+2+12*s,!a));if(!l)return{};if(l>e.byteLength)return{};var u=d(e,t,t+l,b,r);if(u.Compression)switch(u.Compression){case 6:if(u.JpegIFOffset&&u.JpegIFByteCount){var c=t+u.JpegIFOffset,f=u.JpegIFByteCount;u.blob=new Blob([new Uint8Array(e.buffer,c,f)],{type:"image/jpeg"})}}else u.PhotometricInterpretation;return u}(e,s,l,n),r}function f(e){var t={};if(1==e.nodeType){if(0<e.attributes.length){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);t["@attributes"][r.nodeName]=r.nodeValue}}}else if(3==e.nodeType)return e.nodeValue;if(e.hasChildNodes())for(var o=0;o<e.childNodes.length;o++){var i=e.childNodes.item(o),a=i.nodeName;if(null==t[a])t[a]=f(i);else{if(null==t[a].push){var s=t[a];t[a]=[],t[a].push(s)}t[a].push(f(i))}}return t}function p(e){try{var t={};if(0<e.children.length)for(var n=0;n<e.children.length;n++){var r=e.children.item(n),o=r.attributes;for(var i in o){var a=o[i],s=a.nodeName,l=a.nodeValue;void 0!==s&&(t[s]=l)}var u=r.nodeName;if(void 0===t[u])t[u]=f(r);else{if(void 0===t[u].push){var c=t[u];t[u]=[],t[u].push(c)}t[u].push(f(r))}}else t=e.textContent;return t}catch(e){}}var u=function(e){return e instanceof u?e:this instanceof u?void(this.EXIFwrapped=e):new u(e)};void 0!==e&&e.exports&&(t=e.exports=u);var h=(t.EXIF=u).Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},g=u.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},v=u.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},b=u.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},y=u.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}},w={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};u.enableXmp=function(){u.isXmpEnabled=!0},u.disableXmp=function(){u.isXmpEnabled=!1},u.getData=function(e,t){return!((self.Image&&e instanceof self.Image||self.HTMLImageElement&&e instanceof self.HTMLImageElement)&&!e.complete||(o(e)?t&&t.call(e):r(e,t),0))},u.getTag=function(e,t){if(o(e))return e.exifdata[t]},u.getIptcTag=function(e,t){if(o(e))return e.iptcdata[t]},u.getAllTags=function(e){if(!o(e))return{};var t,n=e.exifdata,r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);return r},u.getAllIptcTags=function(e){if(!o(e))return{};var t,n=e.iptcdata,r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);return r},u.pretty=function(e){if(!o(e))return"";var t,n=e.exifdata,r="";for(t in n)n.hasOwnProperty(t)&&("object"==typeof n[t]?n[t]instanceof Number?r+=t+" : "+n[t]+" ["+n[t].numerator+"/"+n[t].denominator+"]\r\n":r+=t+" : ["+n[t].length+" values]\r\n":r+=t+" : "+n[t]+"\r\n");return r},u.readFromBinaryFile=function(e){return s(e)},void 0===(a=function(){return u}.apply(t,[]))||(e.exports=a)}).call(this)}])},cebc:function(e,t,n){"use strict";var r=n("268f"),a=n.n(r),o=n("e265"),s=n.n(o),i=n("a4bb"),l=n.n(i),u=n("85f2"),c=n.n(u);function f(o){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{},t=l()(i);"function"==typeof s.a&&(t=t.concat(s()(i).filter(function(e){return a()(i,e).enumerable}))),t.forEach(function(e){var t,n,r;t=o,r=i[n=e],n in t?c()(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r})}return o}n.d(t,"a",function(){return f})},cee4:function(e,t,n){"use strict";var r=n("c532"),o=n("1d2b"),i=n("0a06"),a=n("2444");function s(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var l=s(a);l.Axios=i,l.create=function(e){return s(r.merge(a,e))},l.Cancel=n("7a77"),l.CancelToken=n("8df4"),l.isCancel=n("2e67"),l.all=function(e){return Promise.all(e)},l.spread=n("0df6"),e.exports=l,e.exports.default=l},d015:function(e,t,n){n("b439")},d2d5:function(e,t,n){n("1654"),n("549b"),e.exports=n("584a").Array.from},d2e4:function(e,t,n){n("226c")},d3f4:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},d53b:function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},d6ef:function(e,t,n){n("2f05")},d7cd:function(e,t,n){"use strict";var r=n("aa1c");n.n(r).a},d864:function(e,t,n){var i=n("79aa");e.exports=function(r,o,e){if(i(r),void 0===o)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},d925:function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},d9f6:function(e,t,n){var r=n("e4ae"),o=n("794b"),i=n("1bc3"),a=Object.defineProperty;t.f=n("8e60")?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(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}},dbdb:function(e,t,n){var r=n("584a"),o=n("e53d"),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},dcbc:function(e,t,n){var o=n("2aba");e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e265:function(e,t,n){e.exports=n("ed33")},e3b9:function(e,t,n){n("a39d")},e4ae:function(e,t,n){var r=n("f772");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},e53d: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)},e683:function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},e6f3:function(e,t,n){var a=n("07e3"),s=n("36c3"),l=n("5b4e")(!1),u=n("5559")("IE_PROTO");e.exports=function(e,t){var n,r=s(e),o=0,i=[];for(n in r)n!=u&&a(r,n)&&i.push(n);for(;t.length>o;)a(r,n=t[o++])&&(~l(i,n)||i.push(n));return i}},e71e:function(e,t,n){n("7a01")},e769:function(e,t,n){"use strict";var r=n("f1b4");n.n(r).a},e853:function(e,t,n){var r=n("d3f4"),o=n("1169"),i=n("2b4c")("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},eb0d:function(e,t,n){},ebd6:function(e,t,n){var o=n("cb7c"),i=n("d8e8"),a=n("2b4c")("species");e.exports=function(e,t){var n,r=o(e).constructor;return void 0===r||null==(n=o(r)[a])?t:i(n)}},ebfd:function(e,t,n){var r=n("62a0")("meta"),o=n("f772"),i=n("07e3"),a=n("d9f6").f,s=0,l=Object.isExtensible||function(){return!0},u=!n("294c")(function(){return l(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&f.NEED&&l(e)&&!i(e,r)&&c(e),e}}},ed33:function(e,t,n){n("014b"),e.exports=n("584a").Object.getOwnPropertySymbols},ef8b:function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),n=tinymce.util.Tools.resolve("tinymce.Env"),t="[-'\\.‘’․﹒＇．]",r="[:··״‧︓﹕：]",o="[±+*/,;;։،؍٬߸⁄︐︔﹐﹔，；]",i="[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",a="\\r",s="\\n",u="[\v\f\u2028\u2029]",c="[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ऀ-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖౢౣಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣംഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈᧉᨗ-ᨛᩕ-ᩞ᩠-᩿᩼ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-᯦᮪-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ᷀-ᷦ᷼-᷿‌‍⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲꙼꙽꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꨩ-ꨶꩃꩌꩍꩻꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︦ﾞﾟ]",f="[­؀-؃۝܏឴឵‎‏‪-‮⁠-⁤⁪-⁯\ufeff￹-￻]",d="[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ｦ-ﾝ]",p="[=_‿⁀⁔︳︴﹍-﹏＿∀-⋿<>]",m="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫！-＃％-＊，-／：；？＠［-］＿｛｝｟-･]",h={characterIndices:{ALETTER:0,MIDNUMLET:1,MIDLETTER:2,MIDNUM:3,NUMERIC:4,CR:5,LF:6,NEWLINE:7,EXTEND:8,FORMAT:9,KATAKANA:10,EXTENDNUMLET:11,AT:12,OTHER:13},SETS:[new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚﾠ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]"),new RegExp(t),new RegExp(r),new RegExp(o),new RegExp(i),new RegExp(a),new RegExp(s),new RegExp(u),new RegExp(c),new RegExp(f),new RegExp(d),new RegExp(p),new RegExp("@")],EMPTY_STRING:"",PUNCTUATION:new RegExp("^"+m+"$"),WHITESPACE:/^\s+$/},g=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,void 0!==e.length){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1},v=function(n,r){var o=[];return g(n,function(e,t){o.push(r(e,t,n))}),o},b=h.SETS,y=h.characterIndices.OTHER,w=function(e){var t,n,r=y,o=b.length;for(t=0;t<o;++t)if((n=b[t])&&n.test(e)){r=t;break}return r},x=function(e){var n,r,t=(n=w,r={},function(e){if(r[e])return r[e];var t=n(e);return r[e]=t});return v(e.split(""),t)},C=h.characterIndices,_=function(e,t){var n,r,o=e[t],i=e[t+1];return!(t<0||t>e.length-1&&0!==t||o===C.ALETTER&&i===C.ALETTER||(r=e[t+2],o===C.ALETTER&&(i===C.MIDLETTER||i===C.MIDNUMLET||i===C.AT)&&r===C.ALETTER||(n=e[t-1],(o===C.MIDLETTER||o===C.MIDNUMLET||i===C.AT)&&i===C.ALETTER&&n===C.ALETTER||!(o!==C.NUMERIC&&o!==C.ALETTER||i!==C.NUMERIC&&i!==C.ALETTER)||(o===C.MIDNUM||o===C.MIDNUMLET)&&i===C.NUMERIC&&n===C.NUMERIC||o===C.NUMERIC&&(i===C.MIDNUM||i===C.MIDNUMLET)&&r===C.NUMERIC||o===C.EXTEND||o===C.FORMAT||n===C.EXTEND||n===C.FORMAT||i===C.EXTEND||i===C.FORMAT||o===C.CR&&i===C.LF||o!==C.NEWLINE&&o!==C.CR&&o!==C.LF&&i!==C.NEWLINE&&i!==C.CR&&i!==C.LF&&(o===C.KATAKANA&&i===C.KATAKANA||i===C.EXTENDNUMLET&&(o===C.ALETTER||o===C.NUMERIC||o===C.KATAKANA||o===C.EXTENDNUMLET)||o===C.EXTENDNUMLET&&(i===C.ALETTER||i===C.NUMERIC||i===C.KATAKANA)||o===C.AT))))},S=h.EMPTY_STRING,k=h.WHITESPACE,E=h.PUNCTUATION,T=function(e,t,n){var r=function(e,t){var n;for(n=t;n<e.length;++n){var r=e.charAt(n);if(k.test(r))break}return n}(t,n+1),o=t.substring(n+1,r);return"://"===o.substr(0,3)?{word:e+o,index:r}:{word:e,index:n}},N=function(e,t){return function(e,t){var n,r,o,i,a=0,s=x(e),l=s.length,u=[],c=[];for(t||(t={}),t.ignoreCase&&(e=e.toLowerCase()),r=t.includePunctuation,o=t.includeWhitespace;a<l;++a)if(n=e.charAt(a),u.push(n),_(s,a)){if((u=u.join(S))&&(o||!k.test(u))&&(r||!E.test(u)))if("http"===(i=u)||"https"===i){var f=T(u,e,a);c.push(f.word),a=f.index}else c.push(u);u=[]}return c}(e.replace(/\ufeff/g,""),t)},R=function(e,t){return n.ie?function(e,t){for(var n,r=t.getBlockElements(),o=t.getShortEndedElements(),i=t.getWhiteSpaceElements(),a="",s=new l(e,e);e=s.next();)3===e.nodeType?a+=e.data:(r[(n=e).nodeName]||o[n.nodeName]||i[n.nodeName])&&(a+=" ");return a}(e,t):e.innerText},O=function(e){return N((t=e,t.removed?"":R(t.getBody(),t.schema))).length;var t},P=function(e){return{getCount:function(){return O(e)}}},A=tinymce.util.Tools.resolve("tinymce.util.Delay"),D=tinymce.util.Tools.resolve("tinymce.util.I18n"),M=function(n){var r=function(e){return D.translate(["{0} words",O(e)])},o=function(){n.theme.panel.find("#wordcount").text(r(n))};n.on("init",function(){var e=n.theme.panel&&n.theme.panel.find("#statusbar")[0],t=A.debounce(o,300);e&&A.setEditorTimeout(n,function(){e.insert({type:"label",name:"wordcount",text:r(n),classes:"wordcount",disabled:n.settings.readonly},0),n.on("setcontent beforeaddundo undo redo keyup",t)},0)})};e.add("wordcount",function(e){return M(e),P(e)})}()},f060:function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),g=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},v=function(e){return e.getParam("default_link_target","")},r=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;n<t&&(t=n)}return t},b=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,r(t,n)):e.setStartBefore(t)},y=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,r(t,n)):e.setEndAfter(t)},o=function(e,t,n){var r,o,i,a,s,l,u,c,f,d,p=g(e),m=v(e);if("A"!==e.selection.getNode().tagName){if((r=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(c=r.endContainer.previousSibling)){if(!r.endContainer.firstChild||!r.endContainer.firstChild.nextSibling)return;c=r.endContainer.firstChild.nextSibling}if(f=c.length,b(r,c,f),y(r,c,f),r.endOffset<5)return;o=r.endOffset,a=c}else{if(3!==(a=r.endContainer).nodeType&&a.firstChild){for(;3!==a.nodeType&&a.firstChild;)a=a.firstChild;3===a.nodeType&&(b(r,a,0),y(r,a,a.nodeValue.length))}o=1===r.endOffset?2:r.endOffset-1-t}for(i=o;b(r,a,2<=o?o-2:0),y(r,a,1<=o?o-1:0),o-=1," "!==(d=r.toString())&&""!==d&&160!==d.charCodeAt(0)&&0<=o-2&&d!==n;);var h;(h=r.toString())===n||" "===h||160===h.charCodeAt(0)?(b(r,a,o),y(r,a,i),o+=1):(0===r.startOffset?b(r,a,0):b(r,a,o),y(r,a,i)),"."===(l=r.toString()).charAt(l.length-1)&&y(r,a,i-1),(u=(l=r.toString().trim()).match(p))&&("www."===u[1]?u[1]="http://www.":/@$/.test(u[1])&&!/^mailto:/.test(u[1])&&(u[1]="mailto:"+u[1]),s=e.selection.getBookmark(),e.selection.setRng(r),e.execCommand("createlink",!1,u[1]+u[2]),m&&e.dom.setAttrib(e.selection.getNode(),"target",m),e.selection.moveToBookmark(s),e.nodeChanged())}},t=function(t){var e;t.on("keydown",function(e){13!==e.keyCode||o(t,-1,"")}),n.ie?t.on("focus",function(){if(!e){e=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||o(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||o(t,0,"")}))};e.add("autolink",function(e){t(e)})}()},f1b4:function(e,t,n){},f28c:function(e,t){var n,r,o=e.exports={};function i(){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===i||!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:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],c=!1,f=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):f=-1,u.length&&p())}function p(){if(!c){var e=s(d);c=!0;for(var t=u.length;t;){for(l=u,u=[];++f<t;)l&&l[f].run();f=-1,t=u.length}l=null,c=!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)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||c||s(p)},m.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=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},f381:function(e,t){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){e.addCommand("mcePrint",function(){e.getWin().print()})},n=function(e){e.addButton("print",{title:"Print",cmd:"mcePrint"}),e.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print"})};e.add("print",function(e){t(e),n(e),e.addShortcut("Meta+P","","mcePrint")})}()},f3bd:function(e,t,n){n("7ec3")},f410:function(e,t,n){n("1af6"),e.exports=n("584a").Array.isArray},f5df:function(e,t,n){},f605:function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},f6b4:function(e,t,n){"use strict";var r=n("c532");function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},e.exports=o},f6fd:function(e,t){var n,r,o;n=document,r="currentScript",o=n.getElementsByTagName("script"),r in n||Object.defineProperty(n,r,{get:function(){try{throw new Error}catch(e){var t,n=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(e.stack)||[!1])[1];for(t in o)if(o[t].src==n||"interactive"==o[t].readyState)return o[t];return null}}})},f772:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},f9d5:function(e,t){!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},o=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},i=n,a=o,s=function(e){var t=o(e);return 0<t.length?t[0]:n(e)},c=function(e){return e.getParam("insertdatetime_element",!1)},l="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),u="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),f="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),d="January February March April May June July August September October November December".split(" "),p=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},m=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",p(n.getMonth()+1,2))).replace("%d",p(n.getDate(),2))).replace("%H",""+p(n.getHours(),2))).replace("%M",""+p(n.getMinutes(),2))).replace("%S",""+p(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(d[n.getMonth()]))).replace("%b",""+e.translate(f[n.getMonth()]))).replace("%A",""+e.translate(u[n.getDay()]))).replace("%a",""+e.translate(l[n.getDay()]))).replace("%%","%")},h=function(e,t){if(c(e)){var n=m(e,t),r=void 0;r=/%[HMSIp]/.test(t)?m(e,"%Y-%m-%dT%H:%M"):m(e,"%Y-%m-%d");var o=e.dom.getParent(e.selection.getStart(),"time");o?(a=o,s=r,l=n,u=(i=e).dom.create("time",{datetime:s},l),a.parentNode.insertBefore(u,a),i.dom.remove(a),i.selection.select(u,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(m(e,t));var i,a,s,l,u},g=m,v=function(e){e.addCommand("mceInsertDate",function(){h(e,t(e))}),e.addCommand("mceInsertTime",function(){h(e,i(e))})},b=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=function(t,n){var r,o,e,i=(o=n,e=a(r=t),b.map(e,function(e){return{text:g(r,e),onclick:function(){o.set(e),h(r,e)}}}));t.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",menu:i,onclick:function(){var e=n.get();h(t,e||s(t))}}),t.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:i,context:"insert"})};e.add("insertdatetime",function(e){var t=r(null);v(e),y(e,t)})}()},fa4f:function(e,t,n){n("f060")},fa5b:function(e,t,n){e.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(e,t,n){var r=n("7726").document;e.exports=r&&r.documentElement},fb15:function(e,t,n){"use strict";var r;(n.r(t),"undefined"!=typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("ac6a"),n("7f7f"),n("8bbf"),n("f5df");var o=n("1980"),i=n.n(o),u=n("cebc"),a=(n("cadf"),n("456d"),{components:{Draggable:i.a},props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,range:null,length:null}}},computed:{show:function(){return!!(this.data&&0<Object.keys(this.data).length)}},methods:{handleOptionsRemove:function(e){"grid"===this.data.type?this.data.columns.splice(e,1):this.data.options.options.splice(e,1)},handleAddOption:function(){this.data.options.showLabel?this.data.options.options.push({value:"新选项",label:"新选项"}):this.data.options.options.push({value:"新选项"})},handleAddColumn:function(){this.data.columns.push({span:"",list:[],style:{textAlign:"left",borderWidth:"1px",borderStyle:"solid",borderColor:"#999",margin:"0px -1px -1px 0px",overflow:"hidden"},innerStyle:{textAlign:"left",borderWidth:"0px 1px 1px 0px",borderStyle:"solid",borderColor:"#999",margin:"0px 0.5px 0px 0px",overflow:"hidden"}})},generateRule:function(){var t=this;this.data.rules=[],Object.keys(this.validator).forEach(function(e){t.validator[e]&&t.data.rules.push(t.validator[e])})},handleSelectMuliple:function(e){e?this.data.options.defaultValue?this.data.options.defaultValue=[this.data.options.defaultValue]:this.data.options.defaultValue=[]:0<this.data.options.defaultValue.length?this.data.options.defaultValue=this.data.options.defaultValue[0]:this.data.options.defaultValue=""}},watch:{"data.options.isRange":function(e){void 0!==e&&(e?this.data.options.defaultValue=null:0<=Object.keys(this.data.options).indexOf("defaultValue")&&(this.data.options.defaultValue=""))},"data.options.required":function(e){var t=this;this.validator.required=e?{required:!0,message:"".concat(this.data.name,"必须填写"),trigger:"blur"}:null,this.$nextTick(function(){t.generateRule()})},"data.options.dataType":function(e){if(!this.show)return!1;this.validator.type=e?{type:e,message:this.data.name+"格式不正确"}:null,this.generateRule()},"data.options.pattern":function(e){if(!this.show)return!1;this.validator.pattern=e?{pattern:e,message:this.data.name+"格式不匹配"}:null,this.generateRule()}}}),s=n("2877"),l=Object(s.a)(a,function(){var r=this,e=r.$createElement,o=r._self._c||e;return r.show?o("div",[o("el-form",{attrs:{"label-position":"top"}},["grid"!=r.data.type?o("el-form-item",{attrs:{label:"标题"}},[o("el-input",{model:{value:r.data.name,callback:function(e){r.$set(r.data,"name",e)},expression:"data.name"}})],1):r._e(),0<=Object.keys(r.data).indexOf("labelWidth")?o("el-form-item",{attrs:{label:"标签字段宽度（0为全局默认）"}},[o("el-input-number",{attrs:{min:0,max:200,step:10},model:{value:r.data.labelWidth,callback:function(e){r.$set(r.data,"labelWidth",e)},expression:"data.labelWidth"}})],1):r._e(),0<=Object.keys(r.data).indexOf("size")?o("el-form-item",{attrs:{label:"组件尺寸"}},[o("el-radio-group",{model:{value:r.data.size,callback:function(e){r.$set(r.data,"size",e)},expression:"data.size"}},[o("el-radio-button",{attrs:{label:"medium"}},[r._v("medium")]),o("el-radio-button",{attrs:{label:"small"}},[r._v("small")]),o("el-radio-button",{attrs:{label:"mini"}},[r._v("mini")])],1)],1):r._e(),0<=Object.keys(r.data.options).indexOf("width")?o("el-form-item",{attrs:{label:"宽度"}},[o("el-input",{model:{value:r.data.options.width,callback:function(e){r.$set(r.data.options,"width",e)},expression:"data.options.width"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("height")?o("el-form-item",{attrs:{label:"高度"}},[o("el-input",{model:{value:r.data.options.height,callback:function(e){r.$set(r.data.options,"height",e)},expression:"data.options.height"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("size")?o("el-form-item",{attrs:{label:"大小"}},[r._v("\n      宽度："),o("el-input",{staticStyle:{width:"90px"},attrs:{type:"number"},model:{value:r.data.options.size.width,callback:function(e){r.$set(r.data.options.size,"width",r._n(e))},expression:"data.options.size.width"}}),r._v("\n      高度："),o("el-input",{staticStyle:{width:"90px"},attrs:{type:"number"},model:{value:r.data.options.size.height,callback:function(e){r.$set(r.data.options.size,"height",r._n(e))},expression:"data.options.size.height"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("placeholder")&&("time"!=r.data.type||"date"!=r.data.type)?o("el-form-item",{attrs:{label:"占位内容"}},[o("el-input",{model:{value:r.data.options.placeholder,callback:function(e){r.$set(r.data.options,"placeholder",e)},expression:"data.options.placeholder"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("inline")?o("el-form-item",{attrs:{label:"布局方式"}},[o("el-radio-group",{model:{value:r.data.options.inline,callback:function(e){r.$set(r.data.options,"inline",e)},expression:"data.options.inline"}},[o("el-radio-button",{attrs:{label:!1}},[r._v("块级")]),o("el-radio-button",{attrs:{label:!0}},[r._v("行内")])],1)],1):r._e(),0<=Object.keys(r.data.options).indexOf("showInput")?o("el-form-item",{attrs:{label:"显示输入框"}},[o("el-switch",{model:{value:r.data.options.showInput,callback:function(e){r.$set(r.data.options,"showInput",e)},expression:"data.options.showInput"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("min")?o("el-form-item",{attrs:{label:"最小值"}},[o("el-input-number",{attrs:{min:0,max:100,step:1},model:{value:r.data.options.min,callback:function(e){r.$set(r.data.options,"min",e)},expression:"data.options.min"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("max")?o("el-form-item",{attrs:{label:"最大值"}},[o("el-input-number",{attrs:{min:0,max:100,step:1},model:{value:r.data.options.max,callback:function(e){r.$set(r.data.options,"max",e)},expression:"data.options.max"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("step")?o("el-form-item",{attrs:{label:"步长"}},[o("el-input-number",{attrs:{min:0,max:100,step:1},model:{value:r.data.options.step,callback:function(e){r.$set(r.data.options,"step",e)},expression:"data.options.step"}})],1):r._e(),"select"==r.data.type?o("el-form-item",{attrs:{label:"是否多选"}},[o("el-switch",{on:{change:r.handleSelectMuliple},model:{value:r.data.options.multiple,callback:function(e){r.$set(r.data.options,"multiple",e)},expression:"data.options.multiple"}})],1):r._e(),"select"==r.data.type?o("el-form-item",{attrs:{label:"是否可搜索"}},[o("el-switch",{model:{value:r.data.options.filterable,callback:function(e){r.$set(r.data.options,"filterable",e)},expression:"data.options.filterable"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("allowHalf")?o("el-form-item",{attrs:{label:"允许半选"}},[o("el-switch",{model:{value:r.data.options.allowHalf,callback:function(e){r.$set(r.data.options,"allowHalf",e)},expression:"data.options.allowHalf"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("showAlpha")?o("el-form-item",{attrs:{label:"支持透明度选择"}},[o("el-switch",{model:{value:r.data.options.showAlpha,callback:function(e){r.$set(r.data.options,"showAlpha",e)},expression:"data.options.showAlpha"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("showLabel")?o("el-form-item",{attrs:{label:"是否显示标签"}},[o("el-switch",{model:{value:r.data.options.showLabel,callback:function(e){r.$set(r.data.options,"showLabel",e)},expression:"data.options.showLabel"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("options")?o("el-form-item",{attrs:{label:"选项"}},[o("el-radio-group",{staticStyle:{"margin-bottom":"10px"},attrs:{size:"mini"},model:{value:r.data.options.remote,callback:function(e){r.$set(r.data.options,"remote",e)},expression:"data.options.remote"}},[o("el-radio-button",{attrs:{label:!1}},[r._v("静态数据")]),o("el-radio-button",{attrs:{label:!0}},[r._v("远端数据")])],1),r.data.options.remote?[o("div",[o("el-input",{attrs:{size:"mini"},model:{value:r.data.options.remoteFunc,callback:function(e){r.$set(r.data.options,"remoteFunc",e)},expression:"data.options.remoteFunc"}},[o("template",{slot:"prepend"},[r._v("远端方法")])],2),o("el-input",{attrs:{size:"mini"},model:{value:r.data.options.props.value,callback:function(e){r.$set(r.data.options.props,"value",e)},expression:"data.options.props.value"}},[o("template",{slot:"prepend"},[r._v("值")])],2),o("el-input",{attrs:{size:"mini"},model:{value:r.data.options.props.label,callback:function(e){r.$set(r.data.options.props,"label",e)},expression:"data.options.props.label"}},[o("template",{slot:"prepend"},[r._v("标签")])],2)],1)]:["radio"==r.data.type||"select"==r.data.type&&!r.data.options.multiple?[o("el-radio-group",{model:{value:r.data.options.defaultValue,callback:function(e){r.$set(r.data.options,"defaultValue",e)},expression:"data.options.defaultValue"}},[o("draggable",r._b({attrs:{tag:"ul",list:r.data.options.options,handle:".drag-item"}},"draggable",{group:{name:"options"},ghostClass:"ghost",handle:".drag-item"},!1),r._l(r.data.options.options,function(t,n){return o("li",{key:n},[o("el-radio",{staticStyle:{"margin-right":"5px"},attrs:{label:t.value}},[o("el-input",{style:{width:r.data.options.showLabel?"90px":"190px"},attrs:{size:"mini"},model:{value:t.value,callback:function(e){r.$set(t,"value",e)},expression:"item.value"}}),r.data.options.showLabel?o("el-input",{staticStyle:{width:"100px"},attrs:{size:"mini"},model:{value:t.label,callback:function(e){r.$set(t,"label",e)},expression:"item.label"}}):r._e()],1),o("i",{staticClass:"drag-item",staticStyle:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[o("i",{staticClass:"iconfont icon-icon_bars"})]),o("el-button",{staticStyle:{padding:"4px","margin-left":"5px"},attrs:{circle:"",plain:"",type:"danger",size:"mini",icon:"el-icon-minus"},on:{click:function(e){return r.handleOptionsRemove(n)}}})],1)}),0)],1)]:r._e(),"checkbox"==r.data.type||"select"==r.data.type&&r.data.options.multiple?[o("el-checkbox-group",{model:{value:r.data.options.defaultValue,callback:function(e){r.$set(r.data.options,"defaultValue",e)},expression:"data.options.defaultValue"}},[o("draggable",r._b({attrs:{tag:"ul",list:r.data.options.options,handle:".drag-item"}},"draggable",{group:{name:"options"},ghostClass:"ghost",handle:".drag-item"},!1),r._l(r.data.options.options,function(t,n){return o("li",{key:n},[o("el-checkbox",{staticStyle:{"margin-right":"5px"},attrs:{label:t.value}},[o("el-input",{style:{width:r.data.options.showLabel?"90px":"190px"},attrs:{size:"mini"},model:{value:t.value,callback:function(e){r.$set(t,"value",e)},expression:"item.value"}}),r.data.options.showLabel?o("el-input",{staticStyle:{width:"100px"},attrs:{size:"mini"},model:{value:t.label,callback:function(e){r.$set(t,"label",e)},expression:"item.label"}}):r._e()],1),o("i",{staticClass:"drag-item",staticStyle:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[o("i",{staticClass:"iconfont icon-icon_bars"})]),o("el-button",{staticStyle:{padding:"4px","margin-left":"5px"},attrs:{circle:"",plain:"",type:"danger",size:"mini",icon:"el-icon-minus"},on:{click:function(e){return r.handleOptionsRemove(n)}}})],1)}),0)],1)]:r._e(),o("div",{staticStyle:{"margin-left":"22px"}},[o("el-button",{attrs:{type:"text"},on:{click:r.handleAddOption}},[r._v("添加选项")])],1)]],2):r._e(),"cascader"==r.data.type?o("el-form-item",{attrs:{label:"远端数据"}},[o("div",[o("el-input",{attrs:{size:"mini"},model:{value:r.data.options.remoteFunc,callback:function(e){r.$set(r.data.options,"remoteFunc",e)},expression:"data.options.remoteFunc"}},[o("template",{slot:"prepend"},[r._v("远端方法")])],2),o("el-input",{attrs:{size:"mini"},model:{value:r.data.options.props.value,callback:function(e){r.$set(r.data.options.props,"value",e)},expression:"data.options.props.value"}},[o("template",{slot:"prepend"},[r._v("值")])],2),o("el-input",{attrs:{size:"mini"},model:{value:r.data.options.props.label,callback:function(e){r.$set(r.data.options.props,"label",e)},expression:"data.options.props.label"}},[o("template",{slot:"prepend"},[r._v("标签")])],2),o("el-input",{attrs:{size:"mini"},model:{value:r.data.options.props.children,callback:function(e){r.$set(r.data.options.props,"children",e)},expression:"data.options.props.children"}},[o("template",{slot:"prepend"},[r._v("子选项")])],2)],1)]):r._e(),0<=Object.keys(r.data.options).indexOf("defaultValue")&&("textarea"==r.data.type||"input"==r.data.type||"rate"==r.data.type||"color"==r.data.type||"switch"==r.data.type)?o("el-form-item",{attrs:{label:"默认值"}},["textarea"==r.data.type?o("el-input",{attrs:{type:"textarea",rows:5},model:{value:r.data.options.defaultValue,callback:function(e){r.$set(r.data.options,"defaultValue",e)},expression:"data.options.defaultValue"}}):r._e(),"input"==r.data.type?o("el-input",{model:{value:r.data.options.defaultValue,callback:function(e){r.$set(r.data.options,"defaultValue",e)},expression:"data.options.defaultValue"}}):r._e(),"rate"==r.data.type?o("el-rate",{staticStyle:{display:"inline-block","vertical-align":"middle"},attrs:{max:r.data.options.max,"allow-half":r.data.options.allowHalf},model:{value:r.data.options.defaultValue,callback:function(e){r.$set(r.data.options,"defaultValue",e)},expression:"data.options.defaultValue"}}):r._e(),"rate"==r.data.type?o("el-button",{staticStyle:{display:"inline-block","vertical-align":"middle","margin-left":"10px"},attrs:{type:"text"},on:{click:function(e){r.data.options.defaultValue=0}}},[r._v("清空")]):r._e(),"color"==r.data.type?o("el-color-picker",{attrs:{"show-alpha":r.data.options.showAlpha},model:{value:r.data.options.defaultValue,callback:function(e){r.$set(r.data.options,"defaultValue",e)},expression:"data.options.defaultValue"}}):r._e(),"switch"==r.data.type?o("el-switch",{model:{value:r.data.options.defaultValue,callback:function(e){r.$set(r.data.options,"defaultValue",e)},expression:"data.options.defaultValue"}}):r._e()],1):r._e(),"time"==r.data.type||"date"==r.data.type?["date"==r.data.type?o("el-form-item",{attrs:{label:"显示类型"}},[o("el-select",{model:{value:r.data.options.type,callback:function(e){r.$set(r.data.options,"type",e)},expression:"data.options.type"}},[o("el-option",{attrs:{value:"year"}}),o("el-option",{attrs:{value:"month"}}),o("el-option",{attrs:{value:"date"}}),o("el-option",{attrs:{value:"dates"}}),o("el-option",{attrs:{value:"datetime"}}),o("el-option",{attrs:{value:"datetimerange"}}),o("el-option",{attrs:{value:"daterange"}})],1)],1):r._e(),"time"==r.data.type?o("el-form-item",{attrs:{label:"是否为范围选择"}},[o("el-switch",{model:{value:r.data.options.isRange,callback:function(e){r.$set(r.data.options,"isRange",e)},expression:"data.options.isRange"}})],1):r._e(),"date"==r.data.type?o("el-form-item",{attrs:{label:"是否获取时间戳"}},[o("el-switch",{model:{value:r.data.options.timestamp,callback:function(e){r.$set(r.data.options,"timestamp",e)},expression:"data.options.timestamp"}})],1):r._e(),!r.data.options.isRange&&"time"==r.data.type||"time"!=r.data.type&&"datetimerange"!=r.data.options.type&&"daterange"!=r.data.options.type?o("el-form-item",{attrs:{label:"占位内容"}},[o("el-input",{model:{value:r.data.options.placeholder,callback:function(e){r.$set(r.data.options,"placeholder",e)},expression:"data.options.placeholder"}})],1):r._e(),r.data.options.isRange||"datetimerange"==r.data.options.type||"daterange"==r.data.options.type?o("el-form-item",{attrs:{label:"开始时间占位内容"}},[o("el-input",{model:{value:r.data.options.startPlaceholder,callback:function(e){r.$set(r.data.options,"startPlaceholder",e)},expression:"data.options.startPlaceholder"}})],1):r._e(),r.data.options.isRange||"datetimerange"==r.data.options.type||"daterange"==r.data.options.type?o("el-form-item",{attrs:{label:"结束时间占位内容"}},[o("el-input",{model:{value:r.data.options.endPlaceholder,callback:function(e){r.$set(r.data.options,"endPlaceholder",e)},expression:"data.options.endPlaceholder"}})],1):r._e(),o("el-form-item",{attrs:{label:"格式"}},[o("el-input",{model:{value:r.data.options.format,callback:function(e){r.$set(r.data.options,"format",e)},expression:"data.options.format"}})],1),"time"==r.data.type&&0<=Object.keys(r.data.options).indexOf("isRange")?o("el-form-item",{attrs:{label:"默认值"}},[r.data.options.isRange?r._e():o("el-time-picker",{key:"1",staticStyle:{width:"100%"},attrs:{arrowControl:r.data.options.arrowControl,"value-format":r.data.options.format},model:{value:r.data.options.defaultValue,callback:function(e){r.$set(r.data.options,"defaultValue",e)},expression:"data.options.defaultValue"}}),r.data.options.isRange?o("el-time-picker",{key:"2",staticStyle:{width:"100%"},attrs:{"is-range":"",arrowControl:r.data.options.arrowControl,"value-format":r.data.options.format},model:{value:r.data.options.defaultValue,callback:function(e){r.$set(r.data.options,"defaultValue",e)},expression:"data.options.defaultValue"}}):r._e()],1):r._e()]:r._e(),"imgupload"==r.data.type?[o("el-form-item",{attrs:{label:"最大上传数"}},[o("el-input",{attrs:{type:"number"},model:{value:r.data.options.length,callback:function(e){r.$set(r.data.options,"length",r._n(e))},expression:"data.options.length"}})],1),o("el-form-item",{attrs:{label:"Domain",required:!0}},[o("el-input",{model:{value:r.data.options.domain,callback:function(e){r.$set(r.data.options,"domain",e)},expression:"data.options.domain"}})],1),o("el-form-item",{attrs:{label:"获取七牛Token方法",required:!0}},[o("el-input",{model:{value:r.data.options.tokenFunc,callback:function(e){r.$set(r.data.options,"tokenFunc",e)},expression:"data.options.tokenFunc"}})],1)]:r._e(),"blank"==r.data.type?[o("el-form-item",{attrs:{label:"绑定数据类型"}},[o("el-select",{model:{value:r.data.options.defaultType,callback:function(e){r.$set(r.data.options,"defaultType",e)},expression:"data.options.defaultType"}},[o("el-option",{attrs:{value:"String",label:"字符"}}),o("el-option",{attrs:{value:"Object",label:"对象"}}),o("el-option",{attrs:{value:"Array",label:"数组"}})],1)],1)]:r._e(),"grid"==r.data.type?[o("el-form-item",{attrs:{label:"栅格间隔"}},[o("el-input",{attrs:{type:"number"},model:{value:r.data.options.gutter,callback:function(e){r.$set(r.data.options,"gutter",r._n(e))},expression:"data.options.gutter"}})],1),o("el-form-item",{attrs:{label:"列配置项（总和不能超过24）"}},[o("draggable",r._b({attrs:{tag:"ul",list:r.data.columns,handle:".drag-item"}},"draggable",{group:{name:"options"},ghostClass:"ghost",handle:".drag-item"},!1),r._l(r.data.columns,function(t,n){return o("li",{key:n,staticStyle:{border:"#c8c8c8 dashed 1px","margin-bottom":"10px",padding:"3px"}},[o("i",{staticClass:"drag-item",staticStyle:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[o("i",{staticClass:"iconfont icon-icon_bars"})]),o("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:"栅格值",size:"mini",type:"number"},model:{value:t.span,callback:function(e){r.$set(t,"span",r._n(e))},expression:"item.span"}}),o("el-select",{staticStyle:{width:"85px","margin-left":"5px"},attrs:{size:"mini"},model:{value:t.innerStyle.textAlign,callback:function(e){r.$set(t.innerStyle,"textAlign",e)},expression:"item.innerStyle.textAlign"}},[o("el-option",{attrs:{value:"left",label:"左对齐"}}),o("el-option",{attrs:{value:"right",label:"右对齐"}}),o("el-option",{attrs:{value:"center",label:"居中"}})],1),o("el-select",{staticStyle:{width:"85px","margin-left":"5px"},attrs:{size:"mini"},model:{value:t.innerStyle.borderWidth,callback:function(e){r.$set(t.innerStyle,"borderWidth",e)},expression:"item.innerStyle.borderWidth"}},[o("el-option",{attrs:{label:"外层默认",value:"1px"}}),o("el-option",{attrs:{label:"内层默认",value:"0px 1px 1px 0px"}}),o("el-option",{attrs:{value:"1px",label:"四边线"}}),o("el-option",{attrs:{label:"上边线",value:"1px 0px 0px 0px"}}),o("el-option",{attrs:{label:"下边线",value:"0px 0px 1px 0px"}}),o("el-option",{attrs:{label:"左边线",value:"0px 0px 0px 1px"}}),o("el-option",{attrs:{label:"右边线",value:"0px 1px 0px 0px"}}),o("el-option",{attrs:{label:"左+上",value:"1px 0px 0px 1px"}}),o("el-option",{attrs:{label:"右+下",value:"0px 1px 1px 0px"}}),o("el-option",{attrs:{label:"无边线",value:"0px"}})],1),o("el-select",{staticStyle:{width:"105px","margin-left":"5px"},attrs:{size:"mini"},model:{value:t.innerStyle.margin,callback:function(e){r.$set(t.innerStyle,"margin",e)},expression:"item.innerStyle.margin"}},[o("el-option",{attrs:{label:"外层边距",value:"0px -1px -1px 0px"}}),o("el-option",{attrs:{label:"内层边距1",value:"0px 0.5px 0px 0px"}}),o("el-option",{attrs:{label:"内层边距2",value:"0px -0.5px 0px 0px"}}),o("el-option",{attrs:{label:"无边距",value:""}})],1),o("el-button",{staticStyle:{padding:"4px","margin-left":"5px"},attrs:{circle:"",plain:"",type:"danger",size:"mini",icon:"el-icon-minus"},on:{click:function(e){return r.handleOptionsRemove(n)}}})],1)}),0),o("div",{staticStyle:{"margin-left":"22px"}},[o("el-button",{attrs:{type:"text"},on:{click:r.handleAddColumn}},[r._v("添加列")])],1)],1),o("el-form-item",{attrs:{label:"水平排列方式"}},[o("el-select",{model:{value:r.data.options.justify,callback:function(e){r.$set(r.data.options,"justify",e)},expression:"data.options.justify"}},[o("el-option",{attrs:{value:"start",label:"左对齐"}}),o("el-option",{attrs:{value:"end",label:"右对齐"}}),o("el-option",{attrs:{value:"center",label:"居中"}}),o("el-option",{attrs:{value:"space-around",label:"两侧间隔相等"}}),o("el-option",{attrs:{value:"space-between",label:"两端对齐"}})],1)],1),o("el-form-item",{attrs:{label:"垂直排列方式"}},[o("el-select",{model:{value:r.data.options.align,callback:function(e){r.$set(r.data.options,"align",e)},expression:"data.options.align"}},[o("el-option",{attrs:{value:"top",label:"顶部对齐"}}),o("el-option",{attrs:{value:"middle",label:"居中"}}),o("el-option",{attrs:{value:"bottom",label:"底部对齐"}})],1)],1)]:r._e(),"grid"!=r.data.type?[o("el-form-item",{attrs:{label:"数据绑定Key"}},[o("el-input",{model:{value:r.data.model,callback:function(e){r.$set(r.data,"model",e)},expression:"data.model"}})],1),o("el-form-item",{attrs:{label:"操作属性"}},[0<=Object.keys(r.data.options).indexOf("readonly")?o("el-checkbox",{model:{value:r.data.options.readonly,callback:function(e){r.$set(r.data.options,"readonly",e)},expression:"data.options.readonly"}},[r._v("完全只读")]):r._e(),0<=Object.keys(r.data.options).indexOf("disabled")?o("el-checkbox",{model:{value:r.data.options.disabled,callback:function(e){r.$set(r.data.options,"disabled",e)},expression:"data.options.disabled"}},[r._v("禁用\t")]):r._e(),0<=Object.keys(r.data.options).indexOf("editable")?o("el-checkbox",{model:{value:r.data.options.editable,callback:function(e){r.$set(r.data.options,"editable",e)},expression:"data.options.editable"}},[r._v("文本框可输入")]):r._e(),0<=Object.keys(r.data.options).indexOf("clearable")?o("el-checkbox",{model:{value:r.data.options.clearable,callback:function(e){r.$set(r.data.options,"clearable",e)},expression:"data.options.clearable"}},[r._v("显示清除按钮")]):r._e(),0<=Object.keys(r.data.options).indexOf("arrowControl")?o("el-checkbox",{model:{value:r.data.options.arrowControl,callback:function(e){r.$set(r.data.options,"arrowControl",e)},expression:"data.options.arrowControl"}},[r._v("使用箭头进行时间选择")]):r._e()],1),o("el-form-item",{attrs:{label:"校验"}},[o("div",[o("el-checkbox",{model:{value:r.data.options.required,callback:function(e){r.$set(r.data.options,"required",e)},expression:"data.options.required"}},[r._v("必填")])],1),0<=Object.keys(r.data.options).indexOf("dataType")?o("el-select",{attrs:{size:"mini"},model:{value:r.data.options.dataType,callback:function(e){r.$set(r.data.options,"dataType",e)},expression:"data.options.dataType"}},[o("el-option",{attrs:{value:"string",label:"字符串"}}),o("el-option",{attrs:{value:"number",label:"数字"}}),o("el-option",{attrs:{value:"boolean",label:"布尔值"}}),o("el-option",{attrs:{value:"integer",label:"整数"}}),o("el-option",{attrs:{value:"float",label:"浮点数"}}),o("el-option",{attrs:{value:"url",label:"URL地址"}}),o("el-option",{attrs:{value:"email",label:"邮箱地址"}}),o("el-option",{attrs:{value:"hex",label:"十六进制"}})],1):r._e(),0<=Object.keys(r.data.options).indexOf("pattern")?o("div",[o("el-input",{staticStyle:{width:"240px"},attrs:{size:"mini",placeholder:"填写正则表达式"},model:{value:r.data.options.pattern,callback:function(e){r.$set(r.data.options,"pattern",e)},expression:"data.options.pattern"}})],1):r._e()],1)]:r._e()],2)],1):r._e()},[],!1,null,null,null).exports,c={props:["data"]},f=Object(s.a)(c,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"form-config-container"},[n("el-form",{attrs:{"label-position":"top"}},[n("el-form-item",{attrs:{label:"全局默认标签对齐方式"}},[n("el-radio-group",{model:{value:t.data.labelPosition,callback:function(e){t.$set(t.data,"labelPosition",e)},expression:"data.labelPosition"}},[n("el-radio-button",{attrs:{label:"left"}},[t._v("左对齐")]),n("el-radio-button",{attrs:{label:"right"}},[t._v("右对齐")]),n("el-radio-button",{attrs:{label:"top"}},[t._v("顶部对齐")])],1)],1),n("el-form-item",{attrs:{label:"全局默认标签字段宽度"}},[n("el-input-number",{attrs:{min:0,max:200,step:10},model:{value:t.data.labelWidth,callback:function(e){t.$set(t.data,"labelWidth",e)},expression:"data.labelWidth"}})],1),n("el-form-item",{attrs:{label:"全局默认组件尺寸"}},[n("el-radio-group",{model:{value:t.data.size,callback:function(e){t.$set(t.data,"size",e)},expression:"data.size"}},[n("el-radio-button",{attrs:{label:"medium"}},[t._v("medium")]),n("el-radio-button",{attrs:{label:"small"}},[t._v("small")]),n("el-radio-button",{attrs:{label:"mini"}},[t._v("mini")])],1)],1)],1)],1)},[],!1,null,null,null).exports,d=n("c7f0"),p=n("9336"),m={props:["element","select","index","data"],components:{FmUpload:d.a,FmEditor:p.a},data:function(){return{selectWidget:this.select}},mounted:function(){},methods:{handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleWidgetDelete:function(e){var t=this;this.data.list.length-1===e?this.selectWidget=0===e?{}:this.data.list[e-1]:this.selectWidget=this.data.list[e+1],this.$nextTick(function(){t.data.list.splice(e,1)})},handleWidgetClone:function(e){var t=this,n=Object(u.a)({},this.data.list[e],{options:Object(u.a)({},this.data.list[e].options),key:Date.parse(new Date)+"_"+Math.ceil(99999*Math.random())});"radio"!==this.data.list[e].type&&"checkbox"!==this.data.list[e].type||(n=Object(u.a)({},n,{options:Object(u.a)({},n.options,{options:n.options.options.map(function(e){return Object(u.a)({},e)})})})),this.data.list.splice(e,0,n),this.$nextTick(function(){t.selectWidget=t.data.list[e+1]})}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!0}}},h=Object(s.a)(m,function(){var n=this,e=n.$createElement,r=n._self._c||e;return n.element&&n.element.key?r("el-form-item",{staticClass:"widget-view ",class:{active:n.selectWidget.key==n.element.key,is_req:n.element.options.required},staticStyle:{padding:"5px",margin:"0px"},attrs:{label:n.element.name,"label-width":0===n.element.labelWidth?"":n.element.labelWidth+"px",size:n.element.size},nativeOn:{click:function(e){return e.stopPropagation(),n.handleSelectWidget(n.index)}}},["input"==n.element.type?[r("el-input",{style:{width:n.element.options.width},attrs:{placeholder:n.element.options.placeholder},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"textarea"==n.element.type?[r("el-input",{style:{width:n.element.options.width},attrs:{type:"textarea",rows:5,disabled:n.element.options.disabled,placeholder:n.element.options.placeholder},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"number"==n.element.type?[r("el-input-number",{style:{width:n.element.options.width},attrs:{disabled:n.element.options.disabled,"controls-position":n.element.options.controlsPosition},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"radio"==n.element.type?[r("el-radio-group",{style:{width:n.element.options.width},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}},n._l(n.element.options.options,function(e,t){return r("el-radio",{key:e.value+t,style:{display:n.element.options.inline?"inline-block":"block"},attrs:{label:e.value}},[n._v("\n            "+n._s(n.element.options.showLabel?e.label:e.value)+"\n          ")])}),1)]:n._e(),"checkbox"==n.element.type?[r("el-checkbox-group",{style:{width:n.element.options.width},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}},n._l(n.element.options.options,function(e,t){return r("el-checkbox",{key:e.value+t,style:{display:n.element.options.inline?"inline-block":"block"},attrs:{label:e.value}},[n._v("\n            "+n._s(n.element.options.showLabel?e.label:e.value)+"\n          ")])}),1)]:n._e(),"time"==n.element.type?[r("el-time-picker",{style:{width:n.element.options.width},attrs:{"is-range":n.element.options.isRange,placeholder:n.element.options.placeholder,"start-placeholder":n.element.options.startPlaceholder,"end-placeholder":n.element.options.endPlaceholder,readonly:n.element.options.readonly,disabled:n.element.options.disabled,editable:n.element.options.editable,clearable:n.element.options.clearable,arrowControl:n.element.options.arrowControl},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"date"==n.element.type?[r("el-date-picker",{style:{width:n.element.options.width},attrs:{type:n.element.options.type,"is-range":n.element.options.isRange,placeholder:n.element.options.placeholder,"start-placeholder":n.element.options.startPlaceholder,"end-placeholder":n.element.options.endPlaceholder,readonly:n.element.options.readonly,disabled:n.element.options.disabled,editable:n.element.options.editable,clearable:n.element.options.clearable},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"rate"==n.element.type?[r("el-rate",{attrs:{max:n.element.options.max,disabled:n.element.options.disabled,"allow-half":n.element.options.allowHalf},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"color"==n.element.type?[r("el-color-picker",{attrs:{disabled:n.element.options.disabled,"show-alpha":n.element.options.showAlpha},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"select"==n.element.type?[r("el-select",{style:{width:n.element.options.width},attrs:{disabled:n.element.options.disabled,multiple:n.element.options.multiple,clearable:n.element.options.clearable,placeholder:n.element.options.placeholder},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}},n._l(n.element.options.options,function(e){return r("el-option",{key:e.value,attrs:{value:e.value,label:n.element.options.showLabel?e.label:e.value}})}),1)]:n._e(),"switch"==n.element.type?[r("el-switch",{attrs:{disabled:n.element.options.disabled},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"slider"==n.element.type?[r("el-slider",{style:{width:n.element.options.width},attrs:{min:n.element.options.min,max:n.element.options.max,disabled:n.element.options.disabled,step:n.element.options.step,"show-input":n.element.options.showInput,range:n.element.options.range},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"imgupload"==n.element.type?[r("fm-upload",{style:{width:n.element.options.width},attrs:{disabled:n.element.options.disabled,width:n.element.options.size.width,height:n.element.options.size.height,token:"xxx",domain:"xxx"},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"cascader"==n.element.type?[r("el-cascader",{style:{width:n.element.options.width},attrs:{disabled:n.element.options.disabled,clearable:n.element.options.clearable,placeholder:n.element.options.placeholder,options:n.element.options.remoteOptions},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"editor"==n.element.type?[r("fm-editor",{attrs:{width:n.element.options.width,height:n.element.options.height},model:{value:n.element.options.defaultValue,callback:function(e){n.$set(n.element.options,"defaultValue",e)},expression:"element.options.defaultValue"}})]:n._e(),"blank"==n.element.type?[r("div",{staticStyle:{height:"50px",color:"#999",background:"#eee","line-height":"50px","text-align":"center"}},[n._v("自定义区域")])]:n._e(),n.selectWidget.key==n.element.key?r("el-button",{staticClass:"widget-action-delete",attrs:{title:"删除",circle:"",plain:"",type:"danger"},on:{click:function(e){return e.stopPropagation(),n.handleWidgetDelete(n.index)}}},[r("i",{staticClass:"iconfont icon-trash"})]):n._e(),n.selectWidget.key==n.element.key?r("el-button",{staticClass:"widget-action-clone",attrs:{title:"复制",circle:"",plain:"",type:"primary"},on:{click:function(e){return e.stopPropagation(),n.handleWidgetClone(n.index)}}},[r("i",{staticClass:"iconfont icon-icon_clone"})]):n._e()],2):n._e()},[],!1,null,null,null).exports,g={name:"WidgetForm",components:{Draggable:i.a,WidgetFormItem:h},props:["data","select"],data:function(){return{selectWidget:this.select}},mounted:function(){document.body.ondrop=function(e){-1<navigator.userAgent.toLowerCase().indexOf("firefox")&&(e.preventDefault(),e.stopPropagation())}},methods:{getStyle:function(e,t){return e.hasOwnProperty("layer")?t.innerStyle:t.style},handleMoveEnd:function(e){e.newIndex,e.oldIndex},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleWidgetAdd:function(e){var t=e.newIndex,n=(e.to,Date.parse(new Date)+"_"+Math.ceil(99999*Math.random()));this.$set(this.data.list,t,Object(u.a)({},this.data.list[t],{options:Object(u.a)({},this.data.list[t].options,{remoteFunc:"func_"+n}),key:n,model:this.data.list[t].type+"_"+n,rules:[]})),"radio"!==this.data.list[t].type&&"checkbox"!==this.data.list[t].type&&"select"!==this.data.list[t].type||this.$set(this.data.list,t,Object(u.a)({},this.data.list[t],{options:Object(u.a)({},this.data.list[t].options,{options:this.data.list[t].options.options.map(function(e){return Object(u.a)({},e)})})})),"grid"===this.data.list[t].type&&this.$set(this.data.list,t,JSON.parse(JSON.stringify(this.data.list[t]))),this.selectWidget=this.data.list[t]},handleWidgetColAdd:function(e,t,n){var r=e.newIndex,o=(e.oldIndex,e.item);if(0<=o.className.indexOf("data-grid")){var i=e.newIndex,a={list:[],config:{labelWidth:100,labelPosition:"left",size:"small"},key:Date.parse(new Date)+"_"+Math.ceil(99999*Math.random())};a.list.push(t.columns[n].list[i]),this.$set(t.columns[n].list,i,JSON.parse(JSON.stringify(a)));var s=Date.parse(new Date)+"_"+Math.ceil(99999*Math.random());this.$set(t.columns[n].list[i].list,0,Object(u.a)({},t.columns[n].list[i].list[0],{layer:"child",options:Object(u.a)({},t.columns[n].list[i].list[0].options,{remoteFunc:"func_"+s}),key:s,model:t.columns[n].list[i].list[0].type+"_"+s,rules:[]})),this.selectWidget=t.columns[n].list[i].list[0]}else{var l=Date.parse(new Date)+"_"+Math.ceil(99999*Math.random());this.$set(t.columns[n].list,r,Object(u.a)({},t.columns[n].list[r],{options:Object(u.a)({},t.columns[n].list[r].options,{remoteFunc:"func_"+l}),key:l,model:t.columns[n].list[r].type+"_"+l,rules:[]})),"radio"!==t.columns[n].list[r].type&&"checkbox"!==t.columns[n].list[r].type&&"select"!==t.columns[n].list[r].type||this.$set(t.columns[n].list,r,Object(u.a)({},t.columns[n].list[r],{options:Object(u.a)({},t.columns[n].list[r].options,{options:t.columns[n].list[r].options.options.map(function(e){return Object(u.a)({},e)})})})),this.selectWidget=t.columns[n].list[r]}},handleWidgetDelete:function(e){var t=this;this.data.list.length-1===e?this.selectWidget=0===e?{}:this.data.list[e-1]:this.selectWidget=this.data.list[e+1],this.$nextTick(function(){t.data.list.splice(e,1)})}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!0}}},v=(n("ccfb"),Object(s.a)(g,function(){var o=this,e=o.$createElement,i=o._self._c||e;return i("div",[i("draggable",o._b({on:{end:o.handleMoveEnd,add:o.handleWidgetAdd},model:{value:o.data.list,callback:function(e){o.$set(o.data,"list",e)},expression:"data.list"}},"draggable",{group:"people",ghostClass:"ghost"},!1),[o._l(o.data.list,function(r,t){return["grid"==r.type?[r&&r.key?i("div",{key:r.key,staticClass:"widget-grid-container data-grid",staticStyle:{position:"relative"}},[i("el-row",{staticClass:"widget-grid ",class:{active:o.selectWidget.key==r.key},attrs:{type:"flex",gutter:r.options.gutter?r.options.gutter:0,justify:r.options.justify,align:r.options.align},nativeOn:{click:function(e){return e.stopPropagation(),o.handleSelectWidget(t)}}},o._l(r.columns,function(n,t){return i("el-col",{key:t,style:o.getStyle(r,n),attrs:{span:n.span?n.span:0}},[i("draggable",o._b({staticClass:"widget-form-list ttt",staticStyle:{"padding-bottom":"50px"},attrs:{filter:"widget-grid-container"},on:{end:o.handleMoveEnd,add:function(e){return o.handleWidgetColAdd(e,r,t)}},model:{value:n.list,callback:function(e){o.$set(n,"list",e)},expression:"col.list"}},"draggable",{group:"people",ghostClass:"ghost"},!1),[o._l(n.list,function(e,t){return[e.hasOwnProperty("config")&&e.key?[i("widget-form",{key:e.key,ref:"widgetForm",refInFor:!0,attrs:{data:e,select:o.selectWidget},on:{"update:select":function(e){o.selectWidget=e}}})]:[e.key?i("widget-form-item",{key:e.key,attrs:{element:e,select:o.selectWidget,index:t,data:n},on:{"update:select":function(e){o.selectWidget=e}}}):o._e()]]})],2)],1)}),1),o.selectWidget.key==r.key?i("el-button",{staticClass:"widget-action-delete",staticStyle:{bottom:"-20px"},attrs:{title:"删除",circle:"",plain:"",type:"danger"},on:{click:function(e){return e.stopPropagation(),o.handleWidgetDelete(t)}}},[i("i",{staticClass:"iconfont icon-trash"})]):o._e()],1):o._e()]:[r&&r.key?i("widget-form-item",{key:r.key,attrs:{element:r,select:o.selectWidget,index:t,data:o.data},on:{"update:select":function(e){o.selectWidget=e}}}):o._e()]]})],2)],1)},[],!1,null,null,null).exports),b={props:{visible:Boolean,loadingText:{type:String,default:""},title:{type:String,default:""},width:{type:String,default:"600px"},form:{type:Boolean,default:!0},action:{type:Boolean,default:!0}},computed:{show:function(){return!this.form||this.showForm}},data:function(){return{loading:!1,dialogVisible:this.visible,id:"dialog_"+(new Date).getTime(),showForm:!1}},methods:{close:function(){this.dialogVisible=!1},submit:function(){this.loading=!0,this.$emit("on-submit")},end:function(){this.loading=!1}},mounted:function(){},watch:{dialogVisible:function(e){var t=this;e?this.showForm=!0:(this.loading=!1,this.$emit("on-close"),setTimeout(function(){t.showForm=!1},300))},visible:function(e){this.dialogVisible=e}}},y=(n("d7cd"),Object(s.a)(b,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{ref:"elDialog",staticClass:"cus-dialog-container",attrs:{title:t.title,visible:t.dialogVisible,"close-on-click-modal":!1,"append-to-body":"",center:"",width:t.width,id:t.id},on:{"update:visible":function(e){t.dialogVisible=e}}},[t.show?n("span",[t._t("default")],2):t._e(),t.action?n("span",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"dialog-footer",attrs:{slot:"footer","element-loading-text":t.loadingText},slot:"footer"},[t._t("action",[n("el-button",{on:{click:t.close}},[t._v("取消")]),n("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")])])],2):t._e()])},[],!1,null,null,null).exports),w=n("4d7f").a,x=(n("32f9"),Object(s.a)(w,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-form",{ref:"generateForm",attrs:{"inline-message":"",size:e.data.config.size,model:e.models,rules:e.rules,"label-position":e.data.config.labelPosition,"label-width":e.data.config.labelWidth+"px"}},[n("generate-form-list",{attrs:{data:e.data,models:e.models,rules:e.rules,remote:e.remote}})],1)],1)},[],!1,null,null,null).exports),C=n("b311"),_=n.n(C),S=[{type:"input",name:"单行文本",icon:"icon-input",labelWidth:"",size:"",options:{width:"100%",defaultValue:"",required:!1,dataType:"string",pattern:"",placeholder:""}},{type:"textarea",name:"多行文本",icon:"icon-diy-com-textarea",labelWidth:"",size:"",options:{width:"100%",defaultValue:"",required:!1,disabled:!1,pattern:"",placeholder:""}},{type:"number",name:"计数器",icon:"icon-number",labelWidth:"",size:"",options:{width:"",required:!1,defaultValue:0,min:"",max:"",step:1,disabled:!1,controlsPosition:""}},{type:"radio",name:"单选框组",icon:"icon-radio-active",labelWidth:"",size:"",options:{inline:!1,defaultValue:"",showLabel:!1,options:[{value:"选项1",label:"选项1"},{value:"选项2",label:"选项2"},{value:"选项3",label:"选项3"}],required:!1,width:"",remote:!1,remoteOptions:[],props:{value:"value",label:"label"},remoteFunc:""}},{type:"checkbox",name:"多选框组",icon:"icon-check-box",labelWidth:"",size:"",options:{inline:!1,defaultValue:[],showLabel:!1,options:[{value:"选项1"},{value:"选项2"},{value:"选项3"}],required:!1,width:"",remote:!1,remoteOptions:[],props:{value:"value",label:"label"},remoteFunc:""}},{type:"time",name:"时间选择器",icon:"icon-time",labelWidth:"",size:"",options:{defaultValue:"21:19:56",readonly:!1,disabled:!1,editable:!0,clearable:!0,placeholder:"",startPlaceholder:"",endPlaceholder:"",isRange:!1,arrowControl:!0,format:"HH:mm:ss",required:!1,width:""}},{type:"date",name:"日期选择器",icon:"icon-date",labelWidth:"",size:"",options:{defaultValue:"",readonly:!1,disabled:!1,editable:!0,clearable:!0,placeholder:"",startPlaceholder:"",endPlaceholder:"",type:"date",format:"yyyy-MM-dd",timestamp:!1,required:!1,width:""}},{type:"rate",name:"评分",icon:"icon-icon-test",labelWidth:"",size:"",options:{defaultValue:null,max:5,disabled:!1,allowHalf:!1,required:!1}},{type:"color",name:"颜色选择器",icon:"icon-color",labelWidth:"",size:"",options:{defaultValue:"",disabled:!1,showAlpha:!1,required:!1}},{type:"select",name:"下拉选择框",icon:"icon-select",labelWidth:"",size:"",options:{defaultValue:"",multiple:!1,disabled:!1,clearable:!1,placeholder:"",required:!1,showLabel:!1,width:"",options:[{value:"下拉框1"},{value:"下拉框2"},{value:"下拉框3"}],remote:!1,filterable:!1,remoteOptions:[],props:{value:"value",label:"label"},remoteFunc:""}},{type:"switch",name:"开关",icon:"icon-switch",labelWidth:"",size:"",options:{defaultValue:!1,required:!1,disabled:!1}},{type:"slider",name:"滑块",icon:"icon-slider",labelWidth:"",size:"",options:{defaultValue:0,disabled:!1,required:!1,min:0,max:100,step:1,showInput:!1,range:!1,width:""}}],k=[{type:"blank",name:"自定义",icon:"icon-ic",options:{defaultType:"String"}},{type:"imgupload",name:"图片",icon:"icon-tupian",options:{defaultValue:[],size:{width:100,height:100},width:"",tokenFunc:"funcGetToken",token:"",domain:"http://pfp81ptt6.bkt.clouddn.com/",disabled:!1,length:8,multiple:!0,labelPosition:"",labelWidth:""}},{type:"editor",name:"编辑器",icon:"icon-fuwenbenkuang",options:{defaultValue:"",width:"",labelWidth:"",size:""}},{type:"cascader",name:"级联选择器",icon:"icon-jilianxuanze",options:{defaultValue:[],width:"",placeholder:"",disabled:!1,clearable:!1,remote:!0,remoteOptions:[],props:{value:"value",label:"label",children:"children"},remoteFunc:"",labelWidth:"",size:""}}],E=[{type:"grid",name:"栅格布局",icon:"icon-grid-",columns:[{span:12,list:[],style:{textAlign:"left",borderWidth:"1px",borderStyle:"solid",borderColor:"#999",margin:"0px -1px -1px 0px",overflow:"hidden"},innerStyle:{textAlign:"left",borderWidth:"0px 1px 1px 0px",borderStyle:"solid",borderColor:"#999",margin:"0px 0.5px 0px 0px",overflow:"hidden"}},{span:12,list:[],style:{textAlign:"left",borderWidth:"1px",borderStyle:"solid",borderColor:"#999",margin:"0px -1px -1px 0px",overflow:"hidden"},innerStyle:{textAlign:"left",borderWidth:"0px 1px 1px 0px",borderStyle:"solid",borderColor:"#999",margin:"0px -0.5px 0px 0px",overflow:"hidden"}}],options:{gutter:0,justify:"start",align:"top"}}],T=(n("4260"),n("551c"),n("bc3a")),N=n.n(T).a.create({withCredentials:!1});N.interceptors.request.use(function(e){return e},function(e){return Promise.reject(new Error(e).message)}),N.interceptors.response.use(function(e){return e.data},function(e){return Promise.reject(new Error(e).message)});var R=N;var O=function(e){var t=[],n=[],r=[];!function t(e,n,r,o){for(var i=0;i<e.length;i++)e[i].hasOwnProperty("config")?t(e[i].list,n,r,o):"grid"==e[i].type?e[i].columns.forEach(function(e){t(e.list,n,r,o)}):"blank"==e[i].type?e[i].model&&o.push({name:e[i].model,label:e[i].name}):"imgupload"==e[i].type?e[i].options.tokenFunc&&r.push({func:e[i].options.tokenFunc,label:e[i].name,model:e[i].model}):e[i].options.remote&&e[i].options.remoteFunc&&n.push({func:e[i].options.remoteFunc,label:e[i].name,model:e[i].model})}(JSON.parse(e).list,t,n,r);for(var o="",i="",a=0;a<t.length;a++)o+="\n            ".concat(t[a].func," (resolve) {\n              // ").concat(t[a].label," ").concat(t[a].model,"\n              // 获取到远端数据后执行回调函数\n              // resolve(data)\n            },\n    ");for(var s=0;s<n.length;s++)o+="\n            ".concat(n[s].func," (resolve) {\n              // ").concat(n[s].label," ").concat(n[s].model,"\n              // 获取到token数据后执行回调函数\n              // resolve(token)\n            },\n    ");for(var l=0;l<r.length;l++)i+='\n        <template slot="'.concat(r[l].name,'" slot-scope="scope">\n          \x3c!-- ').concat(r[l].label,' --\x3e\n          \x3c!-- 通过 v-model="scope.model.').concat(r[l].name,'" 绑定数据 --\x3e\n        </template>\n    ');return'<!DOCTYPE html>\n  <html>\n  <head>\n    <meta charset="UTF-8">\n    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">\n    <link rel="stylesheet" href="https://unpkg.com/form-making/dist/FormMaking.css">\n  </head>\n  <body>\n    <div id="app">\n      <fm-generate-form :data="jsonData" :remote="remoteFuncs" :value="editData" ref="generateForm">\n        '.concat(i,'\n      </fm-generate-form>\n      <el-button type="primary" @click="handleSubmit">提交</el-button>\n    </div>\n    <script src="https://unpkg.com/vue/dist/vue.js"><\/script>\n    <script src="https://unpkg.com/element-ui/lib/index.js"><\/script>\n    <script src="https://unpkg.com/form-making/dist/FormMaking.umd.js"><\/script>\n    <script>\n      new Vue({\n        el: \'#app\',\n        data: {\n          jsonData: ').concat(e,",\n          editData: {},\n          remoteFuncs: {\n            ").concat(o,"\n          }\n        },\n        methods: {\n          handleSubmit () {\n            this.$refs.generateForm.getData().then(data => {\n              // 数据校验成功\n              // data 为获取的表单数据\n            }).catch(e => {\n              // 数据校验失败\n            })\n          }\n        }\n      })\n    <\/script>\n  </body>\n  </html>")},P={name:"fm-making-form",components:{Draggable:i.a,WidgetConfig:l,FormConfig:f,WidgetForm:v,CusDialog:y,GenerateForm:x},props:{preview:{type:Boolean,default:!1},generateCode:{type:Boolean,default:!1},generateJson:{type:Boolean,default:!1},upload:{type:Boolean,default:!1}},data:function(){return{basicComponents:S,layoutComponents:E,advanceComponents:k,resetJson:!1,widgetForm:{list:[],config:{labelWidth:100,labelPosition:"left",size:"small"}},configTab:"widget",widgetFormSelect:null,previewVisible:!1,jsonVisible:!1,codeVisible:!1,uploadVisible:!1,remoteFuncs:{func_test:function(e){setTimeout(function(){e([{id:"1",name:"1111"},{id:"2",name:"2222"},{id:"3",name:"3333"}])},2e3)},funcGetToken:function(t){R.get("http://tools-server.xiaoyaoji.cn/api/uptoken").then(function(e){t(e.uptoken)})},func_cascader:function(e){e([{value:"zhinan",label:"指南",children:[{value:"shejiyuanze",label:"设计原则",children:[{value:"yizhi",label:"一致"},{value:"fankui",label:"反馈"},{value:"xiaolv",label:"效率"},{value:"kekong",label:"可控"}]},{value:"daohang",label:"导航",children:[{value:"cexiangdaohang",label:"侧向导航"},{value:"dingbudaohang",label:"顶部导航"}]}]},{value:"zujian",label:"组件",children:[{value:"basic",label:"Basic",children:[{value:"layout",label:"Layout 布局"},{value:"color",label:"Color 色彩"},{value:"typography",label:"Typography 字体"},{value:"icon",label:"Icon 图标"},{value:"button",label:"Button 按钮"}]},{value:"form",label:"Form",children:[{value:"radio",label:"Radio 单选框"},{value:"checkbox",label:"Checkbox 多选框"},{value:"input",label:"Input 输入框"},{value:"input-number",label:"InputNumber 计数器"},{value:"select",label:"Select 选择器"},{value:"cascader",label:"Cascader 级联选择器"},{value:"switch",label:"Switch 开关"},{value:"slider",label:"Slider 滑块"},{value:"time-picker",label:"TimePicker 时间选择器"},{value:"date-picker",label:"DatePicker 日期选择器"},{value:"datetime-picker",label:"DateTimePicker 日期时间选择器"},{value:"upload",label:"Upload 上传"},{value:"rate",label:"Rate 评分"},{value:"form",label:"Form 表单"}]},{value:"data",label:"Data",children:[{value:"table",label:"Table 表格"},{value:"tag",label:"Tag 标签"},{value:"progress",label:"Progress 进度条"},{value:"tree",label:"Tree 树形控件"},{value:"pagination",label:"Pagination 分页"},{value:"badge",label:"Badge 标记"}]},{value:"notice",label:"Notice",children:[{value:"alert",label:"Alert 警告"},{value:"loading",label:"Loading 加载"},{value:"message",label:"Message 消息提示"},{value:"message-box",label:"MessageBox 弹框"},{value:"notification",label:"Notification 通知"}]},{value:"navigation",label:"Navigation",children:[{value:"menu",label:"NavMenu 导航菜单"},{value:"tabs",label:"Tabs 标签页"},{value:"breadcrumb",label:"Breadcrumb 面包屑"},{value:"dropdown",label:"Dropdown 下拉菜单"},{value:"steps",label:"Steps 步骤条"}]},{value:"others",label:"Others",children:[{value:"dialog",label:"Dialog 对话框"},{value:"tooltip",label:"Tooltip 文字提示"},{value:"popover",label:"Popover 弹出框"},{value:"card",label:"Card 卡片"},{value:"carousel",label:"Carousel 走马灯"},{value:"collapse",label:"Collapse 折叠面板"}]}]},{value:"ziyuan",label:"资源",children:[{value:"axure",label:"Axure Components"},{value:"sketch",label:"Sketch Templates"},{value:"jiaohu",label:"组件交互文档"}]}])},upload_callback:function(e,t,n){}},widgetModels:{},blank:"",htmlTemplate:"",jsonTemplate:"",uploadEditor:null,jsonEg:'{\n  "list": [\n    {\n      "type": "input",\n      "name": "单行文本",\n      "icon": "icon-input",\n      "options": {\n        "width": "100%",\n        "defaultValue": "",\n        "required": false,\n        "dataType": "string",\n        "pattern": "",\n        "placeholder": "",\n        "remoteFunc": "func_1540908864000_94322"\n      },\n      "key": "1540908864000_94322",\n      "model": "input_1540908864000_94322",\n      "rules": [\n        {\n          "type": "string",\n          "message": "单行文本格式不正确"\n        }\n      ]\n    },\n    {\n      "type": "textarea",\n      "name": "多行文本",\n      "icon": "icon-diy-com-textarea",\n      "options": {\n        "width": "100%",\n        "defaultValue": "",\n        "required": false,\n        "pattern": "",\n        "placeholder": "",\n        "remoteFunc": "func_1540908876000_19435"\n      },\n      "key": "1540908876000_19435",\n      "model": "textarea_1540908876000_19435",\n      "rules": []\n    }\n  ],\n  "config": {\n    "labelWidth": 100,\n    "labelPosition": "top",\n    "size": "small"\n  }\n}'}},mounted:function(){},methods:{handleGoGithub:function(){window.location.href="https://github.com/GavinZhuLei/vue-form-making"},handleConfigSelect:function(e){this.configTab=e},handleMoveEnd:function(e){},handleMoveStart:function(e){e.oldIndex},handleMove:function(e){return!0},handlePreview:function(){this.previewVisible=!0},handleTest:function(){var t=this;this.$refs.generateForm.getData().then(function(e){t.$alert(e,"").catch(function(e){}),t.$refs.widgetPreview.end()}).catch(function(e){t.$refs.widgetPreview.end()})},handleGenerateJson:function(){this.jsonVisible=!0,this.jsonTemplate=this.widgetForm,this.$nextTick(function(){ace.edit("jsoneditor").session.setMode("ace/mode/json");new _.a("#copybtn")})},handleGenerateCode:function(){this.codeVisible=!0,this.htmlTemplate=O(JSON.stringify(this.widgetForm)),this.$nextTick(function(){ace.edit("codeeditor").session.setMode("ace/mode/html")})},handleUpload:function(){var e=this;this.uploadVisible=!0,this.$nextTick(function(){e.uploadEditor=ace.edit("uploadeditor"),e.uploadEditor.session.setMode("ace/mode/json")})},handleUploadJson:function(){try{this.setJSON(JSON.parse(this.uploadEditor.getValue())),this.uploadVisible=!1}catch(e){this.$message.error(e.message),this.$refs.uploadJson.end()}},getJSON:function(){return this.widgetForm},getHtml:function(){return O(JSON.stringify(this.widgetForm))},setJSON:function(e){0<(this.widgetForm=e).list.length&&(this.widgetFormSelect=e.list[0])},handleInput:function(e){this.blank=e}},watch:{widgetForm:{deep:!0,handler:function(e){}}}},A=(n("314e"),Object(s.a)(P,function(){var n=this,e=n.$createElement,r=n._self._c||e;return r("el-container",{staticClass:"fm2-container"},[r("el-main",{staticClass:"fm2-main"},[r("el-container",[r("el-aside",{staticStyle:{wdith:"250px"}},[r("div",{staticClass:"components-list"},[r("div",{staticClass:"widget-cate"},[n._v("基础组件")]),r("draggable",n._b({attrs:{tag:"ul",list:n.basicComponents,move:n.handleMove},on:{end:n.handleMoveEnd,start:n.handleMoveStart}},"draggable",{group:{name:"people",pull:"clone",put:!1},sort:!1,ghostClass:"ghost"},!1),n._l(n.basicComponents,function(e,t){return r("li",{key:t,staticClass:"form-edit-widget-label"},[r("a",[r("i",{staticClass:"icon iconfont",class:e.icon}),r("span",[n._v(n._s(e.name))])])])}),0),r("div",{staticClass:"widget-cate"},[n._v("高级组件")]),r("draggable",n._b({attrs:{tag:"ul",list:n.advanceComponents,move:n.handleMove},on:{end:n.handleMoveEnd,start:n.handleMoveStart}},"draggable",{group:{name:"people",pull:"clone",put:!1},sort:!1,ghostClass:"ghost"},!1),n._l(n.advanceComponents,function(e,t){return r("li",{key:t,staticClass:"form-edit-widget-label"},[r("a",[r("i",{staticClass:"icon iconfont",class:e.icon}),r("span",[n._v(n._s(e.name))])])])}),0),r("div",{staticClass:"widget-cate"},[n._v("布局组件")]),r("draggable",n._b({attrs:{tag:"ul",list:n.layoutComponents,move:n.handleMove},on:{end:n.handleMoveEnd,start:n.handleMoveStart}},"draggable",{group:{name:"people",pull:"clone",put:!1},sort:!1,ghostClass:"ghost"},!1),n._l(n.layoutComponents,function(e,t){return r("li",{key:t,staticClass:"form-edit-widget-label data-grid"},[r("a",[r("i",{staticClass:"icon iconfont",class:e.icon}),r("span",[n._v(n._s(e.name))])])])}),0)],1)]),r("el-container",{staticClass:"center-container",attrs:{direction:"vertical"}},[r("el-header",{staticClass:"btn-bar",staticStyle:{height:"45px"}},[n._t("action"),n.upload?r("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-upload2"},on:{click:n.handleUpload}},[n._v("导入JSON")]):n._e(),n.preview?r("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-view"},on:{click:n.handlePreview}},[n._v("预览")]):n._e(),n.generateJson?r("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-tickets"},on:{click:n.handleGenerateJson}},[n._v("生成JSON")]):n._e(),n.generateCode?r("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-document"},on:{click:n.handleGenerateCode}},[n._v("生成代码")]):n._e()],2),r("el-main",{class:{"widget-empty":0==n.widgetForm.list.length}},[r("el-form",{staticClass:"widget-form-list",attrs:{size:n.widgetForm.config.size,"label-position":n.widgetForm.config.labelPosition,"label-width":n.widgetForm.config.labelWidth+"px"}},[n.resetJson?n._e():r("widget-form",{ref:"widgetForm",staticClass:"widget-form-container",attrs:{data:n.widgetForm,select:n.widgetFormSelect},on:{"update:select":function(e){n.widgetFormSelect=e}}})],1)],1)],1),r("el-aside",{staticClass:"widget-config-container"},[r("el-container",[r("el-header",{attrs:{height:"45px"}},[r("div",{staticClass:"config-tab",class:{active:"widget"==n.configTab},on:{click:function(e){return n.handleConfigSelect("widget")}}},[n._v("组件设置")]),r("div",{staticClass:"config-tab",class:{active:"form"==n.configTab},on:{click:function(e){return n.handleConfigSelect("form")}}},[n._v("表单全局设置")])]),r("el-main",{staticClass:"config-content"},[r("widget-config",{directives:[{name:"show",rawName:"v-show",value:"widget"==n.configTab,expression:"configTab=='widget'"}],attrs:{data:n.widgetFormSelect}}),r("form-config",{directives:[{name:"show",rawName:"v-show",value:"form"==n.configTab,expression:"configTab=='form'"}],attrs:{data:n.widgetForm.config}})],1)],1)],1),r("cus-dialog",{ref:"widgetPreview",attrs:{visible:n.previewVisible,width:"1000px",form:""},on:{"on-close":function(e){n.previewVisible=!1,n.rules={},n.models={}},"on-submit":n.handleTest}},[n.previewVisible?r("generate-form",{ref:"generateForm",attrs:{insite:"true",data:n.widgetForm,value:n.widgetModels,remote:n.remoteFuncs},scopedSlots:n._u([{key:"blank",fn:function(t){return[n._v("\n            宽度："),r("el-input",{staticStyle:{width:"100px"},model:{value:t.model.blank.width,callback:function(e){n.$set(t.model.blank,"width",e)},expression:"scope.model.blank.width"}}),n._v("\n            高度："),r("el-input",{staticStyle:{height:"100px"},model:{value:t.model.blank.height,callback:function(e){n.$set(t.model.blank,"height",e)},expression:"scope.model.blank.height"}})]}}],null,!1,2667525456)}):n._e()],1),r("cus-dialog",{ref:"uploadJson",attrs:{visible:n.uploadVisible,width:"800px",form:""},on:{"on-close":function(e){n.uploadVisible=!1},"on-submit":n.handleUploadJson}},[r("el-alert",{attrs:{type:"info",title:"JSON格式如下，直接复制生成的json覆盖此处代码点击确定即可"}}),r("div",{staticStyle:{height:"400px",width:"100%"},attrs:{id:"uploadeditor"}},[n._v(n._s(n.jsonEg))])],1),r("cus-dialog",{ref:"jsonPreview",attrs:{visible:n.jsonVisible,width:"800px",form:""},on:{"on-close":function(e){n.jsonVisible=!1}}},[r("div",{staticStyle:{height:"400px",width:"100%"},attrs:{id:"jsoneditor"}},[n._v(n._s(n.jsonTemplate))]),r("template",{slot:"action"},[r("el-button",{attrs:{id:"copybtn","data-clipboard-target":".ace_text-input"}},[n._v("双击复制")])],1)],2),r("cus-dialog",{ref:"codePreview",attrs:{visible:n.codeVisible,width:"800px",form:"",action:!1},on:{"on-close":function(e){n.codeVisible=!1}}},[r("div",{staticStyle:{height:"500px",width:"100%"},attrs:{id:"codeeditor"}},[n._v(n._s(n.htmlTemplate))])])],1)],1),r("el-footer",{attrs:{height:"30px"}},[n._v("Powered by "),r("a",{attrs:{target:"_blank",href:"https://github.com/GavinZhuLei/vue-form-making"}},[n._v("GavinZhuLei")])])],1)},[],!1,null,null,null).exports);n("0f59"),n("eb0d"),n("b20f");A.install=function(e){e.component(A.name,A)},x.install=function(e){e.component(x.name,x)};var D=[A,x],M=function(t){1<arguments.length&&void 0!==arguments[1]&&arguments[1];D.forEach(function(e){t.component(e.name,e)})};"undefined"!=typeof window&&window.Vue&&M(window.Vue);var I={install:M,MakingForm:A,GenerateForm:x};n.d(t,"install",function(){return M}),n.d(t,"MakingForm",function(){return A}),n.d(t,"GenerateForm",function(){return x});t.default=I},fd61:function(e,t,n){},fde4:function(e,t,n){n("bf90");var r=n("584a").Object;e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},fdef:function(e,t){e.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"},ff24:function(e,t,n){}});