UNPKG

tinymce-first

Version:

一个简单的组件库

3 lines 1.37 MB
(function(yh,gi){typeof exports=="object"&&typeof module<"u"?gi(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],gi):(yh=typeof globalThis<"u"?globalThis:yh||self,gi(yh.tinymceEdit={},yh.Vue))})(this,function(yh,gi){"use strict";var F$=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],N$=function(kt){return F$.map(function(mr){return mr.toLowerCase()}).indexOf(kt.toLowerCase())!==-1},P$=function(kt,mr,nr){Object.keys(mr).filter(N$).forEach(function(zn){var Qt=mr[zn];typeof Qt=="function"&&(zn==="onInit"?Qt(kt,nr):nr.on(zn.substring(2),function(Jr){return Qt(Jr,nr)}))})},I$=function(kt,mr,nr,zn){var Qt=kt.modelEvents?kt.modelEvents:null,Jr=Array.isArray(Qt)?Qt.join(" "):Qt;gi.watch(zn,function(Nr,cn){nr&&typeof Nr=="string"&&Nr!==cn&&Nr!==nr.getContent({format:kt.outputFormat})&&nr.setContent(Nr)}),nr.on(Jr||"change input undo redo",function(){mr.emit("update:modelValue",nr.getContent({format:kt.outputFormat}))})},$$=function(kt,mr,nr,zn,Qt,Jr){zn.setContent(Jr()),nr.attrs["onUpdate:modelValue"]&&I$(mr,nr,zn,Qt),P$(kt,nr.attrs,zn)},yP=0,bP=function(kt){var mr=Date.now(),nr=Math.floor(Math.random()*1e9);return yP++,kt+"_"+nr+yP+String(mr)},L$=function(kt){return kt!==null&&kt.tagName.toLowerCase()==="textarea"},kP=function(kt){return typeof kt>"u"||kt===""?[]:Array.isArray(kt)?kt:kt.split(" ")},H$=function(kt,mr){return kP(kt).concat(kP(mr))},V$=function(kt){return kt==null},wP=function(){return{listeners:[],scriptId:bP("tiny-script"),scriptLoaded:!1}},U$=function(){var kt=wP(),mr=function(Qt,Jr,Nr,cn){var Et=Jr.createElement("script");Et.referrerPolicy="origin",Et.type="application/javascript",Et.id=Qt,Et.src=Nr;var no=function(){Et.removeEventListener("load",no),cn()};Et.addEventListener("load",no),Jr.head&&Jr.head.appendChild(Et)},nr=function(Qt,Jr,Nr){kt.scriptLoaded?Nr():(kt.listeners.push(Nr),Qt.getElementById(kt.scriptId)||mr(kt.scriptId,Qt,Jr,function(){kt.listeners.forEach(function(cn){return cn()}),kt.scriptLoaded=!0}))},zn=function(){kt=wP()};return{load:nr,reinitialize:zn}},j$=U$(),W$=function(){return typeof window<"u"?window:global},k1=function(){var kt=W$();return kt&&kt.tinymce?kt.tinymce:null},q$={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(kt){return kt==="html"||kt==="text"}}},w1=function(){return w1=Object.assign||function(kt){for(var mr,nr=1,zn=arguments.length;nr<zn;nr++){mr=arguments[nr];for(var Qt in mr)Object.prototype.hasOwnProperty.call(mr,Qt)&&(kt[Qt]=mr[Qt])}return kt},w1.apply(this,arguments)},G$=function(kt,mr,nr,zn){return kt(zn||"div",{id:mr,ref:nr})},K$=function(kt,mr,nr){return kt("textarea",{id:mr,visibility:"hidden",ref:nr})},X$=gi.defineComponent({props:q$,setup:function(kt,mr){var nr=kt.init?w1({},kt.init):{},zn=gi.toRefs(kt),Qt=zn.disabled,Jr=zn.modelValue,Nr=zn.tagName,cn=gi.ref(null),Et=null,no=kt.id||bP("tiny-vue"),zo=kt.init&&kt.init.inline||kt.inline,qn=!!mr.attrs["onUpdate:modelValue"],mn=!0,_a=kt.initialValue?kt.initialValue:"",Mt="",nt=function(fr){return qn?function(){return Jr!=null&&Jr.value?Jr.value:""}:function(){return fr?_a:Mt}},rn=function(){var fr=nt(mn),ie=w1(w1({},nr),{readonly:kt.disabled,selector:"#"+no,plugins:H$(nr.plugins,kt.plugins),toolbar:kt.toolbar||nr.toolbar,inline:zo,setup:function(At){Et=At,At.on("init",function(Nn){return $$(Nn,kt,mr,At,Jr,fr)}),typeof nr.setup=="function"&&nr.setup(At)}});L$(cn.value)&&(cn.value.style.visibility=""),k1().init(ie),mn=!1};gi.watch(Qt,function(fr){var ie;Et!==null&&(typeof((ie=Et.mode)===null||ie===void 0?void 0:ie.set)=="function"?Et.mode.set(fr?"readonly":"design"):Et.setMode(fr?"readonly":"design"))}),gi.watch(Nr,function(fr){var ie;qn||(Mt=Et.getContent()),(ie=k1())===null||ie===void 0||ie.remove(Et),gi.nextTick(function(){return rn()})}),gi.onMounted(function(){if(k1()!==null)rn();else if(cn.value&&cn.value.ownerDocument){var fr=kt.cloudChannel?kt.cloudChannel:"5",ie=kt.apiKey?kt.apiKey:"no-api-key",At=V$(kt.tinymceScriptSrc)?"https://cdn.tiny.cloud/1/"+ie+"/tinymce/"+fr+"/tinymce.min.js":kt.tinymceScriptSrc;j$.load(cn.value.ownerDocument,At,rn)}}),gi.onBeforeUnmount(function(){k1()!==null&&k1().remove(Et)}),zo||(gi.onActivated(function(){mn||rn()}),gi.onDeactivated(function(){var fr;qn||(Mt=Et.getContent()),(fr=k1())===null||fr===void 0||fr.remove(Et)}));var ht=function(fr){var ie;Mt=Et.getContent(),(ie=k1())===null||ie===void 0||ie.remove(Et),nr=w1(w1({},nr),fr),gi.nextTick(function(){return rn()})};return mr.expose({rerender:ht}),function(){return zo?G$(gi.h,no,cn,kt.tagName):K$(gi.h,no,cn)}}}),ST=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y$(kt){return kt&&kt.__esModule&&Object.prototype.hasOwnProperty.call(kt,"default")?kt.default:kt}var _P={exports:{}};(function(kt){(function(){var mr=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var r=typeof e;return r==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":r==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":r},nr=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},zn=function(e,r){var a=Array.prototype.slice.call(e);return a.sort(r)},Qt=function(e,r){return Jr(function(a,i){return e.eq(r(a),r(i))})},Jr=function(e){return{eq:e}},Nr=Jr(function(e,r){return e===r}),cn=Nr,Et=function(e){return Jr(function(r,a){if(r.length!==a.length)return!1;for(var i=r.length,s=0;s<i;s++)if(!e.eq(r[s],a[s]))return!1;return!0})},no=function(e,r){return Qt(Et(e),function(a){return zn(a,r)})},zo=function(e){return Jr(function(r,a){var i=Object.keys(r),s=Object.keys(a);if(!no(cn).eq(i,s))return!1;for(var f=i.length,g=0;g<f;g++){var y=i[g];if(!e.eq(r[y],a[y]))return!1}return!0})},qn=Jr(function(e,r){if(e===r)return!0;var a=mr(e),i=mr(r);return a!==i?!1:nr(a)?e===r:a==="array"?Et(qn).eq(e,r):a==="object"?zo(qn).eq(e,r):!1}),mn=function(e){var r=typeof e;return e===null?"null":r==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":r==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":r},_a=function(e){return function(r){return mn(r)===e}},Mt=function(e){return function(r){return typeof r===e}},nt=function(e){return function(r){return e===r}},rn=_a("string"),ht=_a("object"),fr=_a("array"),ie=nt(null),At=Mt("boolean"),Nn=nt(void 0),Hn=function(e){return e==null},yr=function(e){return!Hn(e)},Dt=Mt("function"),Pr=Mt("number"),$t=function(){},ja=function(e,r){return function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];return e(r.apply(null,a))}},te=function(e,r){return function(a){return e(r(a))}},j=function(e){return function(){return e}},ar=function(e){return e},Su=function(e,r){return e===r};function dt(e){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];var f=r.concat(i);return e.apply(null,f)}}var pi=function(e){return function(r){return!e(r)}},Xn=function(e){return function(){throw new Error(e)}},T=function(e){return e()},fa=function(e){e()},st=j(!1),Rt=j(!0),xu=function(){return Cc},Cc=function(){var e=function(i){return i()},r=ar,a={fold:function(i,s){return i()},isSome:st,isNone:Rt,getOr:r,getOrThunk:e,getOrDie:function(i){throw new Error(i||"error: getOrDie called on none.")},getOrNull:j(null),getOrUndefined:j(void 0),or:r,orThunk:e,map:xu,each:$t,bind:xu,exists:st,forall:Rt,filter:function(){return xu()},toArray:function(){return[]},toString:j("none()")};return a}(),Ar=function(e){var r=j(e),a=function(){return s},i=function(f){return f(e)},s={fold:function(f,g){return g(e)},isSome:Rt,isNone:st,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:a,orThunk:a,map:function(f){return Ar(f(e))},each:function(f){f(e)},bind:i,exists:i,forall:i,filter:function(f){return f(e)?s:Cc},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return s},ra=function(e){return e==null?Cc:Ar(e)},G={some:Ar,none:xu,from:ra},hi=Array.prototype.slice,qe=Array.prototype.indexOf,Pt=Array.prototype.push,Jc=function(e,r){return qe.call(e,r)},Ge=function(e,r){var a=Jc(e,r);return a===-1?G.none():G.some(a)},Ne=function(e,r){return Jc(e,r)>-1},yt=function(e,r){for(var a=0,i=e.length;a<i;a++){var s=e[a];if(r(s,a))return!0}return!1},ft=function(e,r){for(var a=e.length,i=new Array(a),s=0;s<a;s++){var f=e[s];i[s]=r(f,s)}return i},Xe=function(e,r){for(var a=0,i=e.length;a<i;a++){var s=e[a];r(s,a)}},or=function(e,r){for(var a=e.length-1;a>=0;a--){var i=e[a];r(i,a)}},Vn=function(e,r){for(var a=[],i=[],s=0,f=e.length;s<f;s++){var g=e[s],y=r(g,s)?a:i;y.push(g)}return{pass:a,fail:i}},Ft=function(e,r){for(var a=[],i=0,s=e.length;i<s;i++){var f=e[i];r(f,i)&&a.push(f)}return a},Tn=function(e,r,a){return or(e,function(i,s){a=r(a,i,s)}),a},Oe=function(e,r,a){return Xe(e,function(i,s){a=r(a,i,s)}),a},Se=function(e,r,a){for(var i=0,s=e.length;i<s;i++){var f=e[i];if(r(f,i))return G.some(f);if(a(f,i))break}return G.none()},vt=function(e,r){return Se(e,r,st)},Gt=function(e,r){for(var a=0,i=e.length;a<i;a++){var s=e[a];if(r(s,a))return G.some(a)}return G.none()},Or=function(e){for(var r=[],a=0,i=e.length;a<i;++a){if(!fr(e[a]))throw new Error("Arr.flatten item "+a+" was not an array, input: "+e);Pt.apply(r,e[a])}return r},Vr=function(e,r){return Or(ft(e,r))},En=function(e,r){for(var a=0,i=e.length;a<i;++a){var s=e[a];if(r(s,a)!==!0)return!1}return!0},Ma=function(e){var r=hi.call(e,0);return r.reverse(),r},yi=function(e,r){return Ft(e,function(a){return!Ne(r,a)})},Ca=function(e,r){for(var a={},i=0,s=e.length;i<s;i++){var f=e[i];a[String(f)]=r(f,i)}return a},Pn=function(e,r){var a=hi.call(e,0);return a.sort(r),a},gn=function(e,r){return r>=0&&r<e.length?G.some(e[r]):G.none()},Jn=function(e){return gn(e,0)},Zr=function(e){return gn(e,e.length-1)},$r=Dt(Array.from)?Array.from:function(e){return hi.call(e)},Li=function(e,r){for(var a=0;a<e.length;a++){var i=r(e[a],a);if(i.isSome())return i}return G.none()},Vo=Object.keys,Uo=Object.hasOwnProperty,Ur=function(e,r){for(var a=Vo(e),i=0,s=a.length;i<s;i++){var f=a[i],g=e[f];r(g,f)}},Hi=function(e,r){return Sc(e,function(a,i){return{k:i,v:r(a,i)}})},Sc=function(e,r){var a={};return Ur(e,function(i,s){var f=r(i,s);a[f.k]=f.v}),a},Vi=function(e){return function(r,a){e[a]=r}},Yt=function(e,r,a,i){var s={};return Ur(e,function(f,g){(r(f,g)?a:i)(f,g)}),s},pn=function(e,r){var a={},i={};return Yt(e,r,Vi(a),Vi(i)),{t:a,f:i}},Sa=function(e,r){var a={};return Yt(e,r,Vi(a),$t),a},zu=function(e,r){var a=[];return Ur(e,function(i,s){a.push(r(i,s))}),a},sd=function(e){return zu(e,ar)},Sn=function(e,r){return Dr(e,r)?G.from(e[r]):G.none()},Dr=function(e,r){return Uo.call(e,r)},uu=function(e,r){return Dr(e,r)&&e[r]!==void 0&&e[r]!==null},ld=function(e,r,a){return a===void 0&&(a=qn),zo(a).eq(e,r)},bl=Array.isArray,Tu=function(e){if(bl(e))return e;for(var r=[],a=0,i=e.length;a<i;a++)r[a]=e[a];return r},Qc=function(e,r,a){var i,s;if(!e)return!1;if(a=a||e,e.length!==void 0){for(i=0,s=e.length;i<s;i++)if(r.call(a,e[i],i,e)===!1)return!1}else for(i in e)if(Dr(e,i)&&r.call(a,e[i],i,e)===!1)return!1;return!0},Ds=function(e,r){var a=[];return Qc(e,function(i,s){a.push(r(i,s,e))}),a},Eu=function(e,r){var a=[];return Qc(e,function(i,s){(!r||r(i,s,e))&&a.push(i)}),a},es=function(e,r){if(e){for(var a=0,i=e.length;a<i;a++)if(e[a]===r)return a}return-1},kl=function(e,r,a,i){for(var s=Nn(a)?e[0]:a,f=0;f<e.length;f++)s=r.call(i,s,e[f],f);return s},Fa=function(e,r,a){var i,s;for(i=0,s=e.length;i<s;i++)if(r.call(a,e[i],i,e))return i;return-1},Au=function(e){return e[e.length-1]},Zt=function(){return Zt=Object.assign||function(r){for(var a,i=1,s=arguments.length;i<s;i++){a=arguments[i];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(r[f]=a[f])}return r},Zt.apply(this,arguments)};function cf(e,r){var a={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(a[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)r.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(a[i[s]]=e[i[s]]);return a}function Ou(e,r,a){if(a||arguments.length===2)for(var i=0,s=r.length,f;i<s;i++)(f||!(i in r))&&(f||(f=Array.prototype.slice.call(r,0,i)),f[i]=r[i]);return e.concat(f||Array.prototype.slice.call(r))}var Du=function(e){var r=!1,a;return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return r||(r=!0,a=e.apply(null,i)),a}},jo=function(e,r,a,i){var s=e.isiOS()&&/ipad/i.test(a)===!0,f=e.isiOS()&&!s,g=e.isiOS()||e.isAndroid(),y=g||i("(pointer:coarse)"),k=s||!f&&g&&i("(min-device-width:768px)"),x=f||g&&!k,B=r.isSafari()&&e.isiOS()&&/safari/i.test(a)===!1,M=!x&&!k&&!B;return{isiPad:j(s),isiPhone:j(f),isTablet:j(k),isPhone:j(x),isTouch:j(y),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:j(B),isDesktop:j(M)}},ts=function(e,r){for(var a=0;a<e.length;a++){var i=e[a];if(i.test(r))return i}},Bv=function(e,r){var a=ts(e,r);if(!a)return{major:0,minor:0};var i=function(s){return Number(r.replace(a,"$"+s))};return Ui(i(1),i(2))},Rs=function(e,r){var a=String(r).toLowerCase();return e.length===0?fd():Bv(e,a)},fd=function(){return Ui(0,0)},Ui=function(e,r){return{major:e,minor:r}},Ru={nu:Ui,detect:Rs,unknown:fd},it=function(e,r){return Li(r.brands,function(a){var i=a.brand.toLowerCase();return vt(e,function(s){var f;return i===((f=s.brand)===null||f===void 0?void 0:f.toLowerCase())}).map(function(s){return{current:s.name,version:Ru.nu(parseInt(a.version,10),0)}})})},wl=function(e,r){var a=String(r).toLowerCase();return vt(e,function(i){return i.search(a)})},Mv=function(e,r){return wl(e,r).map(function(a){var i=Ru.detect(a.versionRegexes,r);return{current:a.name,version:i}})},sf=function(e,r){return wl(e,r).map(function(a){var i=Ru.detect(a.versionRegexes,r);return{current:a.name,version:i}})},Z=function(e,r){return e.substring(r)},ne=function(e,r,a){return r===""||e.length>=r.length&&e.substr(a,a+r.length)===r},Me=function(e,r){return Ye(e,r)?Z(e,r.length):e},Ve=function(e,r){return e.indexOf(r)!==-1},Ye=function(e,r){return ne(e,r,0)},wt=function(e){return function(r){return r.replace(e,"")}},Bt=wt(/^\s+|\s+$/g),wr=wt(/^\s+/g),Tr=wt(/\s+$/g),Qr=function(e){return e.length>0},Gn=function(e){return!Qr(e)},ha=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ji=function(e){return function(r){return Ve(r,e)}},Ze=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Ve(e,"edge/")&&Ve(e,"chrome")&&Ve(e,"safari")&&Ve(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ha],search:function(e){return Ve(e,"chrome")&&!Ve(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Ve(e,"msie")||Ve(e,"trident")}},{name:"Opera",versionRegexes:[ha,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ji("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ji("firefox")},{name:"Safari",versionRegexes:[ha,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Ve(e,"safari")||Ve(e,"mobile/"))&&Ve(e,"applewebkit")}}],zr=[{name:"Windows",search:ji("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Ve(e,"iphone")||Ve(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ji("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ji("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ji("linux"),versionRegexes:[]},{name:"Solaris",search:ji("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ji("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ji("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Rn={browsers:j(Ze),oses:j(zr)},ri="Edge",rs="Chrome",en="IE",bh="Opera",Fv="Firefox",Bu="Safari",kh=function(){return ns({current:void 0,version:Ru.unknown()})},ns=function(e){var r=e.current,a=e.version,i=function(s){return function(){return r===s}};return{current:r,version:a,isEdge:i(ri),isChrome:i(rs),isIE:i(en),isOpera:i(bh),isFirefox:i(Fv),isSafari:i(Bu)}},dd={unknown:kh,nu:ns,edge:j(ri),chrome:j(rs),ie:j(en),opera:j(bh),firefox:j(Fv),safari:j(Bu)},Wo="Windows",Nv="iOS",xg="Android",vd="Linux",Pv="OSX",Bs="Solaris",zg="FreeBSD",Iv="ChromeOS",Ms=function(){return tc({current:void 0,version:Ru.unknown()})},tc=function(e){var r=e.current,a=e.version,i=function(s){return function(){return r===s}};return{current:r,version:a,isWindows:i(Wo),isiOS:i(Nv),isAndroid:i(xg),isOSX:i(Pv),isLinux:i(vd),isSolaris:i(Bs),isFreeBSD:i(zg),isChromeOS:i(Iv)}},as={unknown:Ms,nu:tc,windows:j(Wo),ios:j(Nv),android:j(xg),linux:j(vd),osx:j(Pv),solaris:j(Bs),freebsd:j(zg),chromeos:j(Iv)},md=function(e,r,a){var i=Rn.browsers(),s=Rn.oses(),f=r.bind(function(k){return it(i,k)}).orThunk(function(){return Mv(i,e)}).fold(dd.unknown,dd.nu),g=sf(s,e).fold(as.unknown,as.nu),y=jo(g,f,e,a);return{browser:f,os:g,deviceType:y}},wh={detect:md},_h=function(e){return window.matchMedia(e).matches},Ch=Du(function(){return wh.detect(navigator.userAgent,G.from(navigator.userAgentData),_h)}),cu=function(){return Ch()},Tg=navigator.userAgent,$v=cu(),qo=$v.browser,Wi=$v.os,Mu=$v.deviceType,_1=/WebKit/.test(Tg)&&!qo.isEdge(),bi="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,_l=Tg.indexOf("Windows Phone")!==-1,rr={opera:qo.isOpera(),webkit:_1,ie:qo.isIE()||qo.isEdge()?qo.version.major:!1,gecko:qo.isFirefox(),mac:Wi.isOSX()||Wi.isiOS(),iOS:Mu.isiPad()||Mu.isiPhone(),android:Wi.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:qo.isIE()?document.documentMode||7:10,fileApi:bi,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!qo.isIE(),desktop:Mu.isDesktop(),windowsPhone:_l,browser:{current:qo.current,version:qo.version,isChrome:qo.isChrome,isEdge:qo.isEdge,isFirefox:qo.isFirefox,isIE:qo.isIE,isOpera:qo.isOpera,isSafari:qo.isSafari},os:{current:Wi.current,version:Wi.version,isAndroid:Wi.isAndroid,isChromeOS:Wi.isChromeOS,isFreeBSD:Wi.isFreeBSD,isiOS:Wi.isiOS,isLinux:Wi.isLinux,isOSX:Wi.isOSX,isSolaris:Wi.isSolaris,isWindows:Wi.isWindows},deviceType:{isDesktop:Mu.isDesktop,isiPad:Mu.isiPad,isiPhone:Mu.isiPhone,isPhone:Mu.isPhone,isTablet:Mu.isTablet,isTouch:Mu.isTouch,isWebView:Mu.isWebView}},C1=/^\s*|\s*$/g,Sh=function(e){return e==null?"":(""+e).replace(C1,"")},An=function(e,r){return r?r==="array"&&bl(e)?!0:typeof e===r:e!==void 0},Eg=function(e,r,a){var i;for(e=e||[],r=r||",",typeof e=="string"&&(e=e.split(r)),a=a||{},i=e.length;i--;)a[e[i]]={};return a},Lv=Dr,S1=function(e,r,a){var i=this,s,f,g,y=0;e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e);var k=e[3].match(/(^|\.)(\w+)$/i)[2],x=i.createNS(e[3].replace(/\.\w+$/,""),a);if(!x[k]){if(e[2]==="static"){x[k]=r,this.onCreate&&this.onCreate(e[2],e[3],x[k]);return}r[k]||(r[k]=function(){},y=1),x[k]=r[k],i.extend(x[k].prototype,r),e[5]&&(s=i.resolve(e[5]).prototype,f=e[5].match(/\.(\w+)$/i)[1],g=x[k],y?x[k]=function(){return s[f].apply(this,arguments)}:x[k]=function(){return this.parent=s[f],g.apply(this,arguments)},x[k].prototype[k]=x[k],i.each(s,function(B,M){x[k].prototype[M]=s[M]}),i.each(r,function(B,M){s[M]?x[k].prototype[M]=function(){return this.parent=s[M],B.apply(this,arguments)}:M!==k&&(x[k].prototype[M]=B)})),i.each(r.static,function(B,M){x[k][M]=B})}},In=function(e){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];for(var i=0;i<r.length;i++){var s=r[i];for(var f in s)if(Dr(s,f)){var g=s[f];g!==void 0&&(e[f]=g)}}return e},os=function(e,r,a,i){i=i||this,e&&(a&&(e=e[a]),Qc(e,function(s,f){if(r.call(i,s,f,a)===!1)return!1;os(s,r,a,i)}))},x1=function(e,r){var a,i;for(r=r||window,e=e.split("."),a=0;a<e.length;a++)i=e[a],r[i]||(r[i]={}),r=r[i];return r},Hv=function(e,r){var a,i;for(r=r||window,e=e.split("."),a=0,i=e.length;a<i&&(r=r[e[a]],!!r);a++);return r},Wa=function(e,r){return!e||An(e,"array")?e:Ds(e.split(r||","),Sh)},Cl=function(e){var r=rr.cacheSuffix;return r&&(e+=(e.indexOf("?")===-1?"?":"&")+r),e},_e={trim:Sh,isArray:bl,is:An,toArray:Tu,makeMap:Eg,each:Qc,map:Ds,grep:Eu,inArray:es,hasOwn:Lv,extend:In,create:S1,walk:os,createNS:x1,resolve:Hv,explode:Wa,_addCacheSuffix:Cl},gd=function(e,r){var a=r||document,i=a.createElement("div");if(i.innerHTML=e,!i.hasChildNodes()||i.childNodes.length>1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Sl(i.childNodes[0])},Na=function(e,r){var a=r||document,i=a.createElement(e);return Sl(i)},z1=function(e,r){var a=r||document,i=a.createTextNode(e);return Sl(i)},Sl=function(e){if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},O=function(e,r,a){return G.from(e.dom.elementFromPoint(r,a)).map(Sl)},D={fromHtml:gd,fromTag:Na,fromText:z1,fromDom:Sl,fromPoint:O},X=function(e,r){var a=[],i=function(f){return a.push(f),r(f)},s=r(e);do s=s.bind(i);while(s.isSome());return a},me=function(e,r,a){return(e.compareDocumentPosition(r)&a)!==0},Ct=function(e,r){return me(e,r,Node.DOCUMENT_POSITION_CONTAINED_BY)},br=8,sn=9,ni=11,xc=1,To=3,fo=function(e,r){var a=e.dom;if(a.nodeType!==xc)return!1;var i=a;if(i.matches!==void 0)return i.matches(r);if(i.msMatchesSelector!==void 0)return i.msMatchesSelector(r);if(i.webkitMatchesSelector!==void 0)return i.webkitMatchesSelector(r);if(i.mozMatchesSelector!==void 0)return i.mozMatchesSelector(r);throw new Error("Browser lacks native selectors")},lf=function(e){return e.nodeType!==xc&&e.nodeType!==sn&&e.nodeType!==ni||e.childElementCount===0},xh=function(e,r){var a=r===void 0?document:r.dom;return lf(a)?[]:ft(a.querySelectorAll(e),D.fromDom)},is=function(e,r){var a=r===void 0?document:r.dom;return lf(a)?G.none():G.from(a.querySelector(e)).map(D.fromDom)},Kn=function(e,r){return e.dom===r.dom},zh=function(e,r){var a=e.dom,i=r.dom;return a===i?!1:a.contains(i)},vo=function(e,r){return Ct(e.dom,r.dom)},ai=function(e,r){return cu().browser.isIE()?vo(e,r):zh(e,r)};typeof window<"u"||Function("return this;")();var Oa=function(e){var r=e.dom.nodeName;return r.toLowerCase()},pd=function(e){return e.dom.nodeType},_r=function(e){return function(r){return pd(r)===e}},rc=function(e){return pd(e)===br||Oa(e)==="#comment"},oa=_r(xc),ya=_r(To),Vw=_r(sn),Go=_r(ni),T1=function(e){return function(r){return oa(r)&&Oa(r)===e}},xl=function(e){return D.fromDom(e.dom.ownerDocument)},ir=function(e){return Vw(e)?e:xl(e)},nc=function(e){return D.fromDom(ir(e).dom.documentElement)},qa=function(e){return D.fromDom(ir(e).dom.defaultView)},xa=function(e){return G.from(e.dom.parentNode).map(D.fromDom)},mo=function(e,r){for(var a=Dt(r)?r:st,i=e.dom,s=[];i.parentNode!==null&&i.parentNode!==void 0;){var f=i.parentNode,g=D.fromDom(f);if(s.push(g),a(g)===!0)break;i=f}return s},Ga=function(e){var r=function(a){return Ft(a,function(i){return!Kn(e,i)})};return xa(e).map(Fu).map(r).getOr([])},hd=function(e){return G.from(e.dom.previousSibling).map(D.fromDom)},zc=function(e){return G.from(e.dom.nextSibling).map(D.fromDom)},hn=function(e){return Ma(X(e,hd))},Qn=function(e){return X(e,zc)},Fu=function(e){return ft(e.dom.childNodes,D.fromDom)},ff=function(e,r){var a=e.dom.childNodes;return G.from(a[r]).map(D.fromDom)},Eo=function(e){return ff(e,0)},Fs=function(e){return ff(e,e.dom.childNodes.length-1)},Uw=function(e){return e.dom.childNodes.length},jw=function(e){var r=e.dom.head;if(r==null)throw new Error("Head is not available yet");return D.fromDom(r)},na=function(e){return Go(e)&&yr(e.dom.host)},yd=Dt(Element.prototype.attachShadow)&&Dt(Node.prototype.getRootNode),Ag=j(yd),Nu=yd?function(e){return D.fromDom(e.dom.getRootNode())}:ir,Ka=function(e){return na(e)?e:jw(ir(e))},df=function(e){var r=Nu(e);return na(r)?G.some(r):G.none()},vf=function(e){return D.fromDom(e.dom.host)},ki=function(e){if(Ag()&&yr(e.target)){var r=D.fromDom(e.target);if(oa(r)&&Tc(r)&&e.composed&&e.composedPath){var a=e.composedPath();if(a)return Jn(a)}}return G.from(e.target)},Tc=function(e){return yr(e.dom.shadowRoot)},oi=function(e,r){var a=xa(e);a.each(function(i){i.dom.insertBefore(r.dom,e.dom)})},Og=function(e,r){var a=zc(e);a.fold(function(){var i=xa(e);i.each(function(s){go(s,r)})},function(i){oi(i,r)})},us=function(e,r){var a=Eo(e);a.fold(function(){go(e,r)},function(i){e.dom.insertBefore(r.dom,i.dom)})},go=function(e,r){e.dom.appendChild(r.dom)},E1=function(e,r){oi(e,r),go(r,e)},Ww=function(e,r){Xe(r,function(a){oi(e,a)})},bd=function(e,r){Xe(r,function(a){go(e,a)})},kd=function(e){e.dom.textContent="",Xe(Fu(e),function(r){Da(r)})},Da=function(e){var r=e.dom;r.parentNode!==null&&r.parentNode.removeChild(r)},Dg=function(e){var r=Fu(e);r.length>0&&Ww(e,r),Da(e)},wd=function(e){var r=ya(e)?e.dom.parentNode:e.dom;if(r==null||r.ownerDocument===null)return!1;var a=r.ownerDocument;return df(D.fromDom(r)).fold(function(){return a.body.contains(r)},te(wd,vf))},wi=function(e,r){var a=function(i,s){return wi(e+i,r+s)};return{left:e,top:r,translate:a}},mf=wi,_d=function(e){var r=e.getBoundingClientRect();return mf(r.left,r.top)},Cd=function(e,r){return e!==void 0?e:r!==void 0?r:0},ba=function(e){var r=e.dom.ownerDocument,a=r.body,i=r.defaultView,s=r.documentElement;if(a===e.dom)return mf(a.offsetLeft,a.offsetTop);var f=Cd(i==null?void 0:i.pageYOffset,s.scrollTop),g=Cd(i==null?void 0:i.pageXOffset,s.scrollLeft),y=Cd(s.clientTop,a.clientTop),k=Cd(s.clientLeft,a.clientLeft);return Pu(e).translate(g-k,f-y)},Pu=function(e){var r=e.dom,a=r.ownerDocument,i=a.body;return i===r?mf(i.offsetLeft,i.offsetTop):wd(e)?_d(r):mf(0,0)},Th=function(e){var r=e!==void 0?e.dom:document,a=r.body.scrollLeft||r.documentElement.scrollLeft,i=r.body.scrollTop||r.documentElement.scrollTop;return mf(a,i)},Ec=function(e,r,a){var i=a!==void 0?a.dom:document,s=i.defaultView;s&&s.scrollTo(e,r)},A1=function(e,r){var a=cu().browser.isSafari();a&&Dt(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(r)},qw=function(e){var r=e===void 0?window:e;return cu().browser.isFirefox()?G.none():G.from(r.visualViewport)},O1=function(e,r,a,i){return{x:e,y:r,width:a,height:i,right:e+a,bottom:r+i}},Rg=function(e){var r=e===void 0?window:e,a=r.document,i=Th(D.fromDom(a));return qw(r).fold(function(){var s=r.document.documentElement,f=s.clientWidth,g=s.clientHeight;return O1(i.left,i.top,f,g)},function(s){return O1(Math.max(s.pageLeft,i.left),Math.max(s.pageTop,i.top),s.width,s.height)})},Sd=function(e){return function(r){return!!r&&r.nodeType===e}},gf=function(e){return!!e&&!Object.getPrototypeOf(e)},dr=Sd(1),Ac=function(e){var r=e.map(function(a){return a.toLowerCase()});return function(a){if(a&&a.nodeName){var i=a.nodeName.toLowerCase();return Ne(r,i)}return!1}},su=function(e,r){var a=r.toLowerCase().split(" ");return function(i){if(dr(i))for(var s=0;s<a.length;s++){var f=i.ownerDocument.defaultView.getComputedStyle(i,null),g=f?f.getPropertyValue(e):null;if(g===a[s])return!0}return!1}},_i=function(e){return function(r){return dr(r)&&r.hasAttribute(e)}},Oc=function(e,r){return function(a){return dr(a)&&a.getAttribute(e)===r}},Pa=function(e){return dr(e)&&e.hasAttribute("data-mce-bogus")},Ko=function(e){return dr(e)&&e.getAttribute("data-mce-bogus")==="all"},Xa=function(e){return dr(e)&&e.tagName==="TABLE"},pf=function(e){return function(r){return!!(dr(r)&&(r.contentEditable===e||r.getAttribute("data-mce-contenteditable")===e))}},ii=Ac(["textarea","input"]),St=Sd(3),Bg=Sd(8),D1=Sd(9),Sr=Sd(11),Un=Ac(["br"]),Eh=Ac(["img"]),Ns=pf("true"),ia=pf("false"),Ah=Ac(["td","th"]),Dc=Ac(["video","audio","object","embed"]),Oh=function(e,r,a){return a===void 0&&(a=Su),e.exists(function(i){return a(i,r)})},Er=function(e){for(var r=[],a=function(s){r.push(s)},i=0;i<e.length;i++)e[i].each(a);return r},qi=function(e,r,a){return e.isSome()&&r.isSome()?G.some(a(e.getOrDie(),r.getOrDie())):G.none()},g8=function(e,r,a,i){return e.isSome()&&r.isSome()&&a.isSome()?G.some(i(e.getOrDie(),r.getOrDie(),a.getOrDie())):G.none()},p8=function(e,r){return e?G.some(r):G.none()},da=function(e){return e.style!==void 0&&Dt(e.style.getPropertyValue)},Dh=function(e,r,a){if(rn(a)||At(a)||Pr(a))e.setAttribute(r,a+"");else throw console.error("Invalid call to Attribute.set. Key ",r,":: Value ",a,":: Element ",e),new Error("Attribute value was not simple")},Ps=function(e,r,a){Dh(e.dom,r,a)},Is=function(e,r){var a=e.dom;Ur(r,function(i,s){Dh(a,s,i)})},xd=function(e,r){var a=e.dom.getAttribute(r);return a===null?void 0:a},R1=function(e,r){return G.from(xd(e,r))},B1=function(e,r){var a=e.dom;return a&&a.hasAttribute?a.hasAttribute(r):!1},ln=function(e,r){e.dom.removeAttribute(r)},Rh=function(e){return Oe(e.dom.attributes,function(r,a){return r[a.name]=a.value,r},{})},cs=function(e,r,a){if(!rn(a))throw console.error("Invalid call to CSS.set. Property ",r,":: Value ",a,":: Element ",e),new Error("CSS value must be a string: "+a);da(e)&&e.style.setProperty(r,a)},zl=function(e,r){var a=e.dom;Ur(r,function(i,s){cs(a,s,i)})},Ci=function(e,r){var a=e.dom,i=window.getComputedStyle(a),s=i.getPropertyValue(r);return s===""&&!wd(e)?zd(a,r):s},zd=function(e,r){return da(e)?e.style.getPropertyValue(r):""},Td=function(e,r){var a=e.dom,i=zd(a,r);return G.from(i).filter(function(s){return s.length>0})},za=function(e){var r={},a=e.dom;if(da(a))for(var i=0;i<a.style.length;i++){var s=a.style.item(i);r[s]=a.style[s]}return r},h8=function(e){return e.dom.offsetWidth},Gw=cu().browser,Kw=function(e){return vt(e,oa)},y8=function(e){return Gw.isFirefox()&&Oa(e)==="table"?Kw(Fu(e)).filter(function(r){return Oa(r)==="caption"}).bind(function(r){return Kw(Qn(r)).map(function(a){var i=a.dom.offsetTop,s=r.dom.offsetTop,f=r.dom.offsetHeight;return i<=s?-f:0})}).getOr(0):0},ss=function(e,r){return e.children&&Ne(e.children,r)},Mg=function(e,r,a){var i=0,s=0,f=e.ownerDocument;if(a=a||e,r){if(a===e&&r.getBoundingClientRect&&Ci(D.fromDom(e),"position")==="static"){var g=r.getBoundingClientRect();return i=g.left+(f.documentElement.scrollLeft||e.scrollLeft)-f.documentElement.clientLeft,s=g.top+(f.documentElement.scrollTop||e.scrollTop)-f.documentElement.clientTop,{x:i,y:s}}for(var y=r;y&&y!==a&&y.nodeType&&!ss(y,a);){var k=y;i+=k.offsetLeft||0,s+=k.offsetTop||0,y=k.offsetParent}for(y=r.parentNode;y&&y!==a&&y.nodeType&&!ss(y,a);)i-=y.scrollLeft||0,s-=y.scrollTop||0,y=y.parentNode;s+=y8(D.fromDom(r))}return{x:i,y:s}},Gi={},Vv={exports:Gi};(function(e,r,a,i){(function(s,f){typeof r=="object"&&typeof a<"u"?a.exports=f():typeof e=="function"&&e.amd?e(f):(s=typeof globalThis<"u"?globalThis:s||self,s.EphoxContactWrapper=f())})(this,function(){var s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof ST<"u"?ST:typeof self<"u"?self:{},f={exports:{}};(function(x){(function(B){var M=setTimeout;function F(){}function $(Q,fe){return function(){Q.apply(fe,arguments)}}function H(Q){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof Q!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],se(Q,this)}function V(Q,fe){for(;Q._state===3;)Q=Q._value;if(Q._state===0){Q._deferreds.push(fe);return}Q._handled=!0,H._immediateFn(function(){var ze=Q._state===1?fe.onFulfilled:fe.onRejected;if(ze===null){(Q._state===1?U:J)(fe.promise,Q._value);return}var He;try{He=ze(Q._value)}catch(er){J(fe.promise,er);return}U(fe.promise,He)})}function U(Q,fe){try{if(fe===Q)throw new TypeError("A promise cannot be resolved with itself.");if(fe&&(typeof fe=="object"||typeof fe=="function")){var ze=fe.then;if(fe instanceof H){Q._state=3,Q._value=fe,Y(Q);return}else if(typeof ze=="function"){se($(ze,fe),Q);return}}Q._state=1,Q._value=fe,Y(Q)}catch(He){J(Q,He)}}function J(Q,fe){Q._state=2,Q._value=fe,Y(Q)}function Y(Q){Q._state===2&&Q._deferreds.length===0&&H._immediateFn(function(){Q._handled||H._unhandledRejectionFn(Q._value)});for(var fe=0,ze=Q._deferreds.length;fe<ze;fe++)V(Q,Q._deferreds[fe]);Q._deferreds=null}function le(Q,fe,ze){this.onFulfilled=typeof Q=="function"?Q:null,this.onRejected=typeof fe=="function"?fe:null,this.promise=ze}function se(Q,fe){var ze=!1;try{Q(function(He){ze||(ze=!0,U(fe,He))},function(He){ze||(ze=!0,J(fe,He))})}catch(He){if(ze)return;ze=!0,J(fe,He)}}H.prototype.catch=function(Q){return this.then(null,Q)},H.prototype.then=function(Q,fe){var ze=new this.constructor(F);return V(this,new le(Q,fe,ze)),ze},H.all=function(Q){var fe=Array.prototype.slice.call(Q);return new H(function(ze,He){if(fe.length===0)return ze([]);var er=fe.length;function gt(Ht,je){try{if(je&&(typeof je=="object"||typeof je=="function")){var mt=je.then;if(typeof mt=="function"){mt.call(je,function(We){gt(Ht,We)},He);return}}fe[Ht]=je,--er===0&&ze(fe)}catch(We){He(We)}}for(var Ee=0;Ee<fe.length;Ee++)gt(Ee,fe[Ee])})},H.resolve=function(Q){return Q&&typeof Q=="object"&&Q.constructor===H?Q:new H(function(fe){fe(Q)})},H.reject=function(Q){return new H(function(fe,ze){ze(Q)})},H.race=function(Q){return new H(function(fe,ze){for(var He=0,er=Q.length;He<er;He++)Q[He].then(fe,ze)})},H._immediateFn=typeof setImmediate=="function"?function(Q){setImmediate(Q)}:function(Q){M(Q,0)},H._unhandledRejectionFn=function(fe){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",fe)},H._setImmediateFn=function(fe){H._immediateFn=fe},H._setUnhandledRejectionFn=function(fe){H._unhandledRejectionFn=fe},x.exports?x.exports=H:B.Promise||(B.Promise=H)})(s)})(f);var g=f.exports,y=function(){return typeof window<"u"?window:Function("return this;")()}(),k={boltExport:y.Promise||g};return k})})(void 0,Gi,Vv);var M1=Vv.exports.boltExport,Fg=function(e){var r=G.none(),a=[],i=function(x){return Fg(function(B){s(function(M){B(x(M))})})},s=function(x){g()?k(x):a.push(x)},f=function(x){g()||(r=G.some(x),y(a),a=[])},g=function(){return r.isSome()},y=function(x){Xe(x,k)},k=function(x){r.each(function(B){setTimeout(function(){x(B)},0)})};return e(f),{get:s,map:i,isReady:g}},Bh=function(e){return Fg(function(r){r(e)})},Xw={nu:Fg,pure:Bh},b8=function(e){setTimeout(function(){throw e},0)},ls=function(e){var r=function(k){e().then(k,b8)},a=function(k){return ls(function(){return e().then(k)})},i=function(k){return ls(function(){return e().then(function(x){return k(x).toPromise()})})},s=function(k){return ls(function(){return e().then(function(){return k.toPromise()})})},f=function(){return Xw.nu(r)},g=function(){var k=null;return ls(function(){return k===null&&(k=e()),k})},y=e;return{map:a,bind:i,anonBind:s,toLazy:f,toCached:g,toPromise:y,get:r}},Ng=function(e){return ls(function(){return new M1(e)})},k8=function(e){return ls(function(){return M1.resolve(e)})},F1={nu:Ng,pure:k8},w8=function(e,r){return r(function(a){var i=[],s=0,f=function(g){return function(y){i[g]=y,s++,s>=e.length&&a(i)}};e.length===0?a([]):Xe(e,function(g,y){g.get(f(y))})})},_8=function(e){return w8(e,F1.nu)},Uv=function(e){var r=function(M){return Uv(e)},a=function(M){return Uv(e)},i=function(M){return Uv(M(e))},s=function(M){return Uv(e)},f=function(M){M(e)},g=function(M){return M(e)},y=function(M,F){return F(e)},k=function(M){return M(e)},x=function(M){return M(e)},B=function(){return G.some(e)};return{isValue:Rt,isError:st,getOr:j(e),getOrThunk:j(e),getOrDie:j(e),or:r,orThunk:a,fold:y,map:i,mapError:s,each:f,bind:g,exists:k,forall:x,toOptional:B}},Pg=function(e){var r=function(x){return x()},a=function(){return Xn(String(e))()},i=ar,s=function(x){return x()},f=function(x){return Pg(e)},g=function(x){return Pg(x(e))},y=function(x){return Pg(e)},k=function(x,B){return x(e)};return{isValue:st,isError:Rt,getOr:ar,getOrThunk:r,getOrDie:a,or:i,orThunk:s,fold:k,map:f,mapError:g,each:$t,bind:y,exists:st,forall:Rt,toOptional:G.none}},Yw=function(e,r){return e.fold(function(){return Pg(r)},Uv)},Zw={value:Uv,error:Pg,fromOption:Yw},lu=function(e){if(!fr(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");var r=[],a={};return Xe(e,function(i,s){var f=Vo(i);if(f.length!==1)throw new Error("one and only one name per case");var g=f[0],y=i[g];if(a[g]!==void 0)throw new Error("duplicate key detected:"+g);if(g==="cata")throw new Error("cannot have a case named cata (sorry)");if(!fr(y))throw new Error("case arguments must be an array");r.push(g),a[g]=function(){for(var k=[],x=0;x<arguments.length;x++)k[x]=arguments[x];var B=k.length;if(B!==y.length)throw new Error("Wrong number of arguments to case "+g+". Expected "+y.length+" ("+y+"), got "+B);var M=function(F){var $=Vo(F);if(r.length!==$.length)throw new Error("Wrong number of arguments to match. Expected: "+r.join(",")+` Actual: `+$.join(","));var H=En(r,function(V){return Ne($,V)});if(!H)throw new Error("Not all branches were specified when using match. Specified: "+$.join(", ")+` Required: `+r.join(", "));return F[g].apply(null,k)};return{fold:function(){for(var F=[],$=0;$<arguments.length;$++)F[$]=arguments[$];if(F.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+F.length);var H=F[s];return H.apply(null,k)},match:M,log:function(F){console.log(F,{constructors:r,constructor:g,params:k})}}}}),a},Ut={generate:lu};Ut.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var Tl=function(e){return e.fold(ar,ar)};function Ig(e,r,a,i,s){return e(a,i)?G.some(a):Dt(s)&&s(a)?G.none():r(a,i,s)}var hf=function(e,r,a){for(var i=e.dom,s=Dt(a)?a:st;i.parentNode;){i=i.parentNode;var f=D.fromDom(i);if(r(f))return G.some(f);if(s(f))break}return G.none()},jv=function(e,r,a){var i=function(s,f){return f(s)};return Ig(i,hf,e,r,a)},N1=function(e,r){var a=e.dom;return a.parentNode?Rc(D.fromDom(a.parentNode),function(i){return!Kn(e,i)&&r(i)}):G.none()},Rc=function(e,r){var a=function(s){return r(D.fromDom(s))},i=vt(e.dom.childNodes,a);return i.map(D.fromDom)},Ed=function(e,r,a){return hf(e,function(i){return fo(i,r)},a)},Wv=function(e,r){return is(r,e)},Ta=function(e,r,a){var i=function(s,f){return fo(s,f)};return Ig(i,Ed,e,r,a)},po=window.Promise?window.Promise:M1,$g,$s=function(e,r){for(var a=window.requestAnimationFrame,i=["ms","moz","webkit"],s=function(g){window.setTimeout(g,0)},f=0;f<i.length&&!a;f++)a=window[i[f]+"RequestAnimationFrame"];a||(a=s),a(e,r)},Lg=function(e,r){return typeof r!="number"&&(r=0),setTimeout(e,r)},Mh=function(e,r){return typeof r!="number"&&(r=1),setInterval(e,r)},Fh=function(e){return clearTimeout(e)},C8=function(e){return clearInterval(e)},qv=function(e,r){var a,i=function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];clearTimeout(a),a=Lg(function(){e.apply(this,s)},r)};return i.stop=function(){clearTimeout(a)},i},Xo={requestAnimationFrame:function(e,r){if($g){$g.then(e);return}$g=new po(function(a){r||(r=document.body),$s(a,r)}).then(e)},setTimeout:Lg,setInterval:Mh,setEditorTimeout:function(e,r,a){return Lg(function(){e.removed||r()},a)},setEditorInterval:function(e,r,a){var i=Mh(function(){e.removed?clearInterval(i):r()},a);return i},debounce:qv,throttle:qv,clearInterval:C8,clearTimeout:Fh},Jw=function(e,r){r===void 0&&(r={});var a=0,i={},s=D.fromDom(e),f=ir(s),g=r.maxLoadTime||5e3,y=function(U){r.referrerPolicy=U},k=function(U){go(Ka(s),U)},x=function(U){var J=Ka(s);Wv(J,"#"+U).each(Da)},B=function(U){return Sn(i,U).getOrThunk(function(){return{id:"mce-u"+a++,passed:[],failed:[],count:0}})},M=function(U,J,Y){var le,se=_e._addCacheSuffix(U),Q=B(se);i[se]=Q,Q.count++;var fe=function(je,mt){for(var We=je.length;We--;)je[We]();Q.status=mt,Q.passed=[],Q.failed=[],le&&(le.onload=null,le.onerror=null,le=null)},ze=function(){return fe(Q.passed,2)},He=function(){return fe(Q.failed,3)},er=function(je,mt){je()||(Date.now()-Ht<g?Xo.setTimeout(mt):He())},gt=function(){er(function(){for(var je=e.styleSheets,mt=je.length;mt--;){var We=je[mt],at=We.ownerNode;if(at&&at.id===le.id)return ze(),!0}return!1},gt)};if(J&&Q.passed.push(J),Y&&Q.failed.push(Y),Q.status!==1){if(Q.status===2){ze();return}if(Q.status===3){He();return}Q.status=1;var Ee=D.fromTag("link",f.dom);Is(Ee,{rel:"stylesheet",type:"text/css",id:Q.id});var Ht=Date.now();r.contentCssCors&&Ps(Ee,"crossOrigin","anonymous"),r.referrerPolicy&&Ps(Ee,"referrerpolicy",r.referrerPolicy),le=Ee.dom,le.onload=gt,le.onerror=He,k(Ee),Ps(Ee,"href",se)}},F=function(U){return F1.nu(function(J){M(U,ja(J,j(Zw.value(U))),ja(J,j(Zw.error(U))))})},$=function(U,J,Y){_8(ft(U,F)).get(function(le){var se=Vn(le,function(Q){return Q.isValue()});se.fail.length>0?Y(se.fail.map(Tl)):J(se.pass.map(Tl))})},H=function(U){var J=_e._addCacheSuffix(U);Sn(i,J).each(function(Y){var le=--Y.count;le===0&&(delete i[J],x(Y.id))})},V=function(U){Xe(U,function(J){H(J)})};return{load:M,loadAll:$,unload:H,unloadAll:V,_setReferrerPolicy:y}},ua=function(){var e=new WeakMap,r=function(a,i){var s=Nu(a),f=s.dom;return G.from(e.get(f)).getOrThunk(function(){var g=Jw(f,i);return e.set(f,g),g})};return{forElement:r}},Bc=ua(),wn=function(){function e(r,a){this.node=r,this.rootNode=a,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return e.prototype.current=function(){return this.node},e.prototype.next=function(r){return this.node=this.findSibling(this.node,"firstChild","nextSibling",r),this.node},e.prototype.prev=function(r){return this.node=this.findSibling(this.node,"lastChild","previousSibling",r),this.node},e.prototype.prev2=function(r){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",r),this.node},e.prototype.findSibling=function(r,a,i,s){var f,g;if(r){if(!s&&r[a])return r[a];if(r!==this.rootNode){if(f=r[i],f)return f;for(g=r.parentNode;g&&g!==this.rootNode;g=g.parentNode)if(f=g[i],f)return f}}},e.prototype.findPreviousNode=function(r,a,i,s){var f,g,y;if(r){if(f=r[i],this.rootNode&&f===this.rootNode)return;if(f){if(!s){for(y=f[a];y;y=y[a])if(!y[a])return y}return f}if(g=r.parentNode,g&&g!==this.rootNode)return g}},e}(),yf=["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"],ac=["td","th"],S8=["thead","tbody","tfoot"],Ya=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],Si=["h1","h2","h3","h4","h5","h6"],Qw=["li","dd","dt"],Te=["ul","ol","dl"],Ki=["pre","script","textarea","style"],El=function(e){var r;return function(a){return r=r||Ca(e,Rt),Dr(r,Oa(a))}},ur=El(Si),Iu=El(yf),x8=function(e){return Oa(e)==="table"},ui=function(e){return oa(e)&&!Iu(e)},Gv=function(e){return oa(e)&&Oa(e)==="br"},Ls=El(Ya),Mc=El(Te),Yo=El(Qw),nn=El(S8),fs=El(ac),Ad=El(Ki),jn=function(e,r,a){return Ed(e,r,a).isSome()},bf="\uFEFF",fu=" ",du=function(e){return e===bf},z8=function(e){return e.replace(/\uFEFF/g,"")},ce=bf,xi=du,Xi=z8,Kv=dr,$u=St,Bn=function(e){return $u(e)&&(e=e.parentNode),Kv(e)&&e.hasAttribute("data-mce-caret")},Wn=function(e){return $u(e)&&xi(e.data)},Yi=function(e){return Bn(e)||Wn(e)},Al=function(e){return e.firstChild!==e.lastChild||!Un(e.firstChild)},P1=function(e,r){var a=e.ownerDocument,i=a.createTextNode(ce),s=e.parentNode;if(r){var f=e.previousSibling;if($u(f)){if(Yi(f))return f;if(Vg(f))return f.splitText(f.data.length-1)}s.insertBefore(i,e)}else{var f=e.nextSibling;if($u(f)){if(Yi(f))return f;if(Hg(f))return f.splitText(1),f}e.nextSibling?s.insertBefore(i,e.nextSibling):s.appendChild(i)}return i},Kt=function(e){var r=e.container();return St(r)?r.data.charAt(e.offset())===ce||e.isAtStart()&&Wn(r.previousSibling):!1},Nh=function(e){var r=e.container();return St(r)?r.data.charAt(e.offset()-1)===ce||e.isAtEnd()&&Wn(r.nextSibling):!1},Lu=function(){var e=document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e},e_=function(e,r,a){var i=r.ownerDocument,s=i.createElement(e);s.setAttribute("data-mce-caret",a?"before":"after"),s.setAttribute("data-mce-bogus","all"),s.appendChild(Lu());var f=r.parentNode;return a?f.insertBefore(s,r):r.nextSibling?f.insertBefore(s,r.nextSibling):f.appendChild(s),s},Hg=function(e){return $u(e)&&e.data[0]===ce},Vg=function(e){return $u(e)&&e.data[e.data.length-1]===ce},I1=function(e){var r=e.getElementsByTagName("br"),a=r[r.length-1];Pa(a)&&a.parentNode.removeChild(a)},$1=function(e){return e&&e.hasAttribute("data-mce-caret")?(I1(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null},Hs=function(e){return Bn(e.startContainer)},Ol=Ns,T8=ia,L1=Un,E8=St,t_=Ac(["script","style","textarea"]),Ug=Ac(["img","input","textarea","hr","iframe","video","audio","object","embed"]),Xv=Ac(["table"]),r_=Yi,Vs=function(e){return r_(e)?!1:E8(e)?!t_(e.parentNode):Ug(e)||L1(e)||Xv(e)||H1(e)},Yv=function(e){return dr(e)&&e.getAttribute("unselectable")==="true"},H1=function(e){return Yv(e)===!1&&T8(e)},n_=function(e,r){for(e=e.parentNode;e&&e!==r;e=e.parentNode){if(H1(e))return!1;if(Ol(e))return!0}return!0},A8=function(e){return H1(e)?Oe($r(e.getElementsByTagName("*")),function(r,a){return r||Ol(a)},!1)!==!0:!1},O8=function(e){return Ug(e)||A8(e)},Ia=function(e,r){return Vs(e)&&n_(e,r)},Us=/^[ \t\r\n]*$/,Fc=function(e){return Us.test(e)},kf=function(e,r){var a=D.fromDom(r),i=D.fromDom(e);return jn(i,"pre,code",dt(Kn,a))},a_=function(e,r){return St(e)&&Fc(e.data)&&kf(e,r)===!1},Nc=function(e){return dr(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id"))},Od=function(e,r){return Vs(e)&&a_(e,r)===!1||Nc(e)||V1(e)},V1=_i("data-mce-bookmark"),U1=_i("data-mce-bogus"),Dl=Oc("data-mce-bogus","all"),oc=function(e,r){var a=0;if(Od(e,e))return!1;var i=e.firstChild;if(!i)return!0;var s=new wn(i,e);do{if(r){if(Dl(i)){i=s.next(!0);continue}if(U1(i)){i=s.next();continue}}if(Un(i)){a++,i=s.next();continue}if(Od(i,e))return!1;i=s.next()}while(i);return a<=1},Ao=function(e,r){return r===void 0&&(r=!0),oc(e.dom,r)},Ph=function(e){return e.nodeName.toLowerCase()==="span"},j1=function(e,r){return yr(e)&&(Od(e,r)||ui(D.fromDom(e)))},Dd=function(e,r){var a=new wn(e,r).prev(!1),i=new wn(e,r).next(!1),s=Nn(a)||j1(a,r),f=Nn(i)||j1(i,r);return s&&f},Zv=function(e){return Ph(e)&&e.getAttribute("data-mce-type")==="bookmark"},Jv=function(e,r){return St(e)&&e.data.length>0&&Dd(e,r)},D8=function(e){return dr(e)?e.childNodes.length>0:!1},Qv=function(e){return Sr(e)||D1(e)},W1=function(e,r,a){var i=a||r;if(dr(r)&&Zv(r))return r;for(var s=r.childNodes,f=s.length-1;f>=0;f--)W1(e,s[f],i);if(dr(r)){var g=r.childNodes;g.length===1&&Zv(g[0])&&r.parentNode.insertBefore(g[0],r)}return!Qv(r)&&!Od(r,i)&&!D8(r)&&!Jv(r,i)&&e.remove(r),r},R8=_e.makeMap,va=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ih=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wf=/[<>&\"\']/g,q1=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,G1={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:"Ÿ"},ic={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},Hu={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},Rd=function(e){var r=D.fromTag("div").dom;return r.innerHTML=e,r.textContent||r.innerText||e},_f=function(e,r){var a,i,s,f={};if(e){for(e=e.split(","),r=r||10,a=0;a<e.length;a+=2)i=String.fromCharCode(parseInt(e[a],r)),ic[i]||(s="&"+e[a+1]+";",f[i]=s,f[s]=i);return f}},$h=_f("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,y