formeo 2.1.2 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/demo/assets/{demo-BoMApzEX.js → demo-BoxWOybR.js} +1 -1
- package/dist/demo/assets/formeo-2gYSOIxJ.css +1 -0
- package/dist/demo/assets/formeo-2gYSOIxJ.css.gz +0 -0
- package/dist/demo/assets/{formeo-DXS3L3s0.js → formeo-C9NnYlMK.js} +3 -3
- package/dist/demo/assets/formeo-C9NnYlMK.js.gz +0 -0
- package/dist/demo/index.html +1 -1
- package/dist/formeo.min.js +3 -3
- package/dist/formeo.min.js.gz +0 -0
- package/dist/style.css +2 -2
- package/dist/style.css.gz +0 -0
- package/package.json +1 -1
- package/dist/demo/assets/formeo-B0S3-9Ae.css +0 -1
- package/dist/demo/assets/formeo-B0S3-9Ae.css.gz +0 -0
- package/dist/demo/assets/formeo-DXS3L3s0.js.gz +0 -0
package/dist/formeo.min.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
3
|
formeo - https://formeo.io
|
|
4
|
-
Version: 2.1.
|
|
4
|
+
Version: 2.1.3
|
|
5
5
|
Author: Draggable https://draggable.io
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Formeo={})}(this,(function(t){"use strict";var e=Object.defineProperty,n=(t,n,o)=>((t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o)(t,"symbol"!=typeof n?n+"":n,o);const o={},i=Object.freeze({method:"GET",body:""});const r=(t,e)=>{const n=[];t.on("data",(t=>n.push(t))),t.on("end",(()=>{const o=Buffer.concat(n),i={ok:t.statusCode>=200&&t.statusCode<300,status:t.statusCode,statusText:t.statusMessage,headers:new Map(Object.entries(t.headers)),body:o,arrayBuffer:()=>Promise.resolve(o),json:()=>Promise.resolve(JSON.parse(o.toString()))};e(i)}))},s={extension:".lang",location:"assets/lang/",langs:["en-US"],locale:"en-US",override:{}};class a{constructor(t=s){this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}processConfig(t){const{location:e,...n}={...s,...t},o=e.replace(/\/?$/,"/");this.config={location:o,...n};const{override:i,preloaded:r={}}=this.config,a=Object.entries(this.langs).concat(Object.entries(i||r));this.langs=a.reduce(((t,[e,n])=>(t[e]=this.applyLanguage(e,n),t)),{}),this.locale=this.config.locale||this.config.langs[0]}init(t){return this.processConfig({...this.config,...t}),this.setCurrent(this.locale)}addLanguage(t,e={}){e="string"==typeof e?a.processFile(e):e,this.applyLanguage(t,e),this.config.langs.push("locale")}getValue(t,e=this.locale){var n;return(null==(n=this.langs[e])?void 0:n[t])||this.getFallbackValue(t)}getFallbackValue(t){const e=Object.values(this.langs).find((e=>e[t]));return null==e?void 0:e[t]}makeSafe(t){const e={"{":"\\{","}":"\\}","|":"\\|"};return t=t.replace(/[{}|]/g,(t=>e[t])),new RegExp(t,"g")}put(t,e){return this.current[t]=e,e}get(t,e){const n=this;let o=this.getValue(t);if(!o)return;const i=o.match(/\{[^}]+?\}/g);if(e&&i)if("object"==typeof e)for(const r of i){const t=r.substring(1,r.length-1);o=o.replace(n.makeSafe(r),e[t]||"")}else o=o.replace(/\{[^}]+?\}/g,e);return o}static processFile(t){return a.fromFile(t.replace(/\n\n/g,"\n"))}static fromFile(t){const e=t.split("\n"),n={};for(let o,i=0;i<e.length;i++){o=/^(.+?) *?= *?([^\n]+)/.exec(e[i]),o&&(n[o[1]]=o[2].replace(/(^\s+|\s+$)/g,""))}return n}loadLang(t,e=!0){const n=this;return new Promise((function(s,a){if(-1!==n.loaded.indexOf(t)&&e)return n.applyLanguage(n.langs[t]),s(n.langs[t]);return function(t,e={}){const n={...i,...e},s=(t.startsWith("https"),o);return new Promise(((e,o)=>{const i=s.request(t,n,(t=>{r(t,e)}));i.on("error",(t=>o(new Error(t.message)))),(null==n?void 0:n.body)&&i.write(n.body),i.end()}))}([n.config.location,t,n.config.extension].join("")).then((({data:e})=>{const o=n.processFile(e);return n.applyLanguage(t,o),n.loaded.push(t),s(n.langs[t])})).catch((()=>{const e=n.applyLanguage(t);s(e)}))}))}applyLanguage(t,e={}){const n=this.config.override[t]||{},o=this.langs[t]||{};return this.langs[t]={...o,...e,...n},this.langs[t]}get getLangs(){return this.config.langs}async setCurrent(t="en-US"){return await this.loadLang(t),this.locale=t,this.current=this.langs[t],this.current}}const l=new a,c="formeo",d=[{name:"cssPreload",src:"//cdnjs.cloudflare.com/ajax/libs/loadCSS/2.0.1/cssrelpreload.min.js"},{name:"mutationObserver",src:"//cdn.jsdelivr.net/npm/mutationobserver-shim/dist/mutationobserver.min.js"},{name:"fetch",src:"https://unpkg.com/unfetch/polyfill"}],h="control-group",u=`${c}-stage`,p=`${c}-row`,m=`${c}-column`,g=`${c}-field`,f="custom-column-widths",v="column-preset",b="resizing-columns",y=new Map([[u,p],[p,m],[m,g]]),w=["external","stages","rows","columns","fields"],x=["stage","row","column","field"].reduce(((t,e)=>({...t,[e]:e})),{}),C=[{name:"controls",className:h},{name:"stage",className:u},{name:"row",className:p},{name:"column",className:m},{name:"field",className:g}],S={controls:h,stage:u,row:p,column:m,field:g},E=Object.entries(S).reduce(((t,[e,n])=>({...t,[n]:e})),{}),O=Object.values(S),M=new RegExp(`${O.join("|")}`,"g"),N=C.map((({name:t},e,n)=>{const{name:o}=n[e+1]||{};return o&&[t,o]})).filter(Boolean),_=N.slice().map((t=>t.slice().reverse())).reverse(),D=new Map(N),A=new Map(_.slice()),k=new Map([[{value:"100.0",label:"100%"}],[{value:"50.0,50.0",label:"50 | 50"},{value:"33.3,66.6",label:"33 | 66"},{value:"66.6,33.3",label:"66 | 33"}],[{value:"33.3,33.3,33.3",label:"33 | 33 | 33"},{value:"25.0,25.0,50.0",label:"25 | 25 | 50"},{value:"50.0,25.0,25.0",label:"50 | 25 | 25"},{value:"25.0,50.0,25.0",label:"25 | 50 | 25"}],[{value:"25.0,25.0,25.0,25.0",label:"25 | 25 | 25 | 25"}],[{value:"20.0,20.0,20.0,20.0,20.0",label:"20 | 20 | 20 | 20 | 20"}],[{value:"16.66,16.66,16.66,16.66,16.66,16.66",label:"16.66 | 16.66 | 16.66 | 16.66 | 16.66 | 16.66"}]].reduce(((t,e,n)=>(t.push([n,e]),t)))),j=[{type:"added",condition:(t,e)=>Boolean(void 0===t&&e)}],T=`${c}-formData`,P=`${c}-locale`,L=333,z=Math.round(166.5),$=Math.round(666),H="formeoSaved",V="formeoUpdated",I="formeoOnRender",F=["label","logical","source","thenTarget","sourceProperty","comparison","target","targetProperty","assignment","value"],R={value:"attrs.value",checked:"attrs.checked",isVisible:"config.isVisible",isNotVisible:"config.isNotVisible"},B={comparison:{equals:"==",notEquals:"!=",contains:"⊃",notContains:"!⊃"},assignment:{equals:"="},logical:{and:"&&",or:"||"},property:R},W=/(\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)/gi,q=/\bcol-\w+-\d+/g,U="f-i-";var G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function X(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Y=function(){this.__data__=[],this.size=0};var Z=function(t,e){return t===e||t!=t&&e!=e},J=Z;var K=function(t,e){for(var n=t.length;n--;)if(J(t[n][0],e))return n;return-1},Q=K,tt=Array.prototype.splice;var et=K;var nt=K;var ot=K;var it=Y,rt=function(t){var e=this.__data__,n=Q(e,t);return!(n<0)&&(n==e.length-1?e.pop():tt.call(e,n,1),--this.size,!0)},st=function(t){var e=this.__data__,n=et(e,t);return n<0?void 0:e[n][1]},at=function(t){return nt(this.__data__,t)>-1},lt=function(t,e){var n=this.__data__,o=ot(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function ct(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ct.prototype.clear=it,ct.prototype.delete=rt,ct.prototype.get=st,ct.prototype.has=at,ct.prototype.set=lt;var dt=ct,ht=dt;var ut=function(){this.__data__=new ht,this.size=0};var pt=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var mt=function(t){return this.__data__.get(t)};var gt=function(t){return this.__data__.has(t)},ft="object"==typeof G&&G&&G.Object===Object&&G,vt=ft,bt="object"==typeof self&&self&&self.Object===Object&&self,yt=vt||bt||Function("return this")(),wt=yt.Symbol,xt=wt,Ct=Object.prototype,St=Ct.hasOwnProperty,Et=Ct.toString,Ot=xt?xt.toStringTag:void 0;var Mt=function(t){var e=St.call(t,Ot),n=t[Ot];try{t[Ot]=void 0;var o=!0}catch(r){}var i=Et.call(t);return o&&(e?t[Ot]=n:delete t[Ot]),i},Nt=Object.prototype.toString;var _t=Mt,Dt=function(t){return Nt.call(t)},At=wt?wt.toStringTag:void 0;var kt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":At&&At in Object(t)?_t(t):Dt(t)};var jt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Tt=kt,Pt=jt;var Lt,zt=function(t){if(!Pt(t))return!1;var e=Tt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},$t=yt["__core-js_shared__"],Ht=(Lt=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||""))?"Symbol(src)_1."+Lt:"";var Vt=function(t){return!!Ht&&Ht in t},It=Function.prototype.toString;var Ft=function(t){if(null!=t){try{return It.call(t)}catch(e){}try{return t+""}catch(e){}}return""},Rt=zt,Bt=Vt,Wt=jt,qt=Ft,Ut=/^\[object .+?Constructor\]$/,Gt=Function.prototype,Xt=Object.prototype,Yt=Gt.toString,Zt=Xt.hasOwnProperty,Jt=RegExp("^"+Yt.call(Zt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Kt=function(t){return!(!Wt(t)||Bt(t))&&(Rt(t)?Jt:Ut).test(qt(t))},Qt=function(t,e){return null==t?void 0:t[e]};var te=function(t,e){var n=Qt(t,e);return Kt(n)?n:void 0},ee=te(yt,"Map"),ne=te(Object,"create"),oe=ne;var ie=function(){this.__data__=oe?oe(null):{},this.size=0};var re=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},se=ne,ae=Object.prototype.hasOwnProperty;var le=function(t){var e=this.__data__;if(se){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ae.call(e,t)?e[t]:void 0},ce=ne,de=Object.prototype.hasOwnProperty;var he=ne;var ue=ie,pe=re,me=le,ge=function(t){var e=this.__data__;return ce?void 0!==e[t]:de.call(e,t)},fe=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=he&&void 0===e?"__lodash_hash_undefined__":e,this};function ve(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ve.prototype.clear=ue,ve.prototype.delete=pe,ve.prototype.get=me,ve.prototype.has=ge,ve.prototype.set=fe;var be=ve,ye=dt,we=ee;var xe=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Ce=function(t,e){var n=t.__data__;return xe(e)?n["string"==typeof e?"string":"hash"]:n.map},Se=Ce;var Ee=Ce;var Oe=Ce;var Me=Ce;var Ne=function(){this.size=0,this.__data__={hash:new be,map:new(we||ye),string:new be}},_e=function(t){var e=Se(this,t).delete(t);return this.size-=e?1:0,e},De=function(t){return Ee(this,t).get(t)},Ae=function(t){return Oe(this,t).has(t)},ke=function(t,e){var n=Me(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this};function je(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}je.prototype.clear=Ne,je.prototype.delete=_e,je.prototype.get=De,je.prototype.has=Ae,je.prototype.set=ke;var Te=je,Pe=dt,Le=ee,ze=Te;var $e=dt,He=ut,Ve=pt,Ie=mt,Fe=gt,Re=function(t,e){var n=this.__data__;if(n instanceof Pe){var o=n.__data__;if(!Le||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new ze(o)}return n.set(t,e),this.size=n.size,this};function Be(t){var e=this.__data__=new $e(t);this.size=e.size}Be.prototype.clear=He,Be.prototype.delete=Ve,Be.prototype.get=Ie,Be.prototype.has=Fe,Be.prototype.set=Re;var We=Be,qe=te,Ue=function(){try{var t=qe(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ge=Ue;var Xe=function(t,e,n){"__proto__"==e&&Ge?Ge(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Ye=Xe,Ze=Z;var Je=function(t,e,n){(void 0!==n&&!Ze(t[e],n)||void 0===n&&!(e in t))&&Ye(t,e,n)};var Ke,Qe,tn,en,nn,on,rn,sn=function(t){return function(e,n,o){for(var i=-1,r=Object(e),s=o(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(r[l],l,r))break}return e}}(),an={exports:{}};Ke=an,tn=yt,en=(Qe=an.exports)&&!Qe.nodeType&&Qe,nn=en&&Ke&&!Ke.nodeType&&Ke,on=nn&&nn.exports===en?tn.Buffer:void 0,rn=on?on.allocUnsafe:void 0,Ke.exports=function(t,e){if(e)return t.slice();var n=t.length,o=rn?rn(n):new t.constructor(n);return t.copy(o),o};var ln=an.exports,cn=yt.Uint8Array,dn=cn;var hn=function(t){var e=new t.constructor(t.byteLength);return new dn(e).set(new dn(t)),e};var un=function(t,e){var n=e?hn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};var pn=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e},mn=jt,gn=Object.create,fn=function(){function t(){}return function(e){if(!mn(e))return{};if(gn)return gn(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var vn=function(t,e){return function(n){return t(e(n))}},bn=vn(Object.getPrototypeOf,Object),yn=Object.prototype;var wn=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||yn)},xn=fn,Cn=bn,Sn=wn;var En=function(t){return"function"!=typeof t.constructor||Sn(t)?{}:xn(Cn(t))};var On=function(t){return null!=t&&"object"==typeof t},Mn=kt,Nn=On;var _n=function(t){return Nn(t)&&"[object Arguments]"==Mn(t)},Dn=On,An=Object.prototype,kn=An.hasOwnProperty,jn=An.propertyIsEnumerable,Tn=_n(function(){return arguments}())?_n:function(t){return Dn(t)&&kn.call(t,"callee")&&!jn.call(t,"callee")},Pn=Tn,Ln=Array.isArray;var zn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},$n=zt,Hn=zn;var Vn=function(t){return null!=t&&Hn(t.length)&&!$n(t)},In=Vn,Fn=On;var Rn=function(t){return Fn(t)&&In(t)},Bn={exports:{}};var Wn=function(){return!1};!function(t,e){var n=yt,o=Wn,i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,s=r&&r.exports===i?n.Buffer:void 0,a=(s?s.isBuffer:void 0)||o;t.exports=a}(Bn,Bn.exports);var qn=Bn.exports,Un=kt,Gn=bn,Xn=On,Yn=Function.prototype,Zn=Object.prototype,Jn=Yn.toString,Kn=Zn.hasOwnProperty,Qn=Jn.call(Object);var to=function(t){if(!Xn(t)||"[object Object]"!=Un(t))return!1;var e=Gn(t);if(null===e)return!0;var n=Kn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Jn.call(n)==Qn},eo=kt,no=zn,oo=On,io={};io["[object Float32Array]"]=io["[object Float64Array]"]=io["[object Int8Array]"]=io["[object Int16Array]"]=io["[object Int32Array]"]=io["[object Uint8Array]"]=io["[object Uint8ClampedArray]"]=io["[object Uint16Array]"]=io["[object Uint32Array]"]=!0,io["[object Arguments]"]=io["[object Array]"]=io["[object ArrayBuffer]"]=io["[object Boolean]"]=io["[object DataView]"]=io["[object Date]"]=io["[object Error]"]=io["[object Function]"]=io["[object Map]"]=io["[object Number]"]=io["[object Object]"]=io["[object RegExp]"]=io["[object Set]"]=io["[object String]"]=io["[object WeakMap]"]=!1;var ro=function(t){return oo(t)&&no(t.length)&&!!io[eo(t)]};var so=function(t){return function(e){return t(e)}},ao={exports:{}};!function(t,e){var n=ft,o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,r=i&&i.exports===o&&n.process,s=function(){try{var t=i&&i.require&&i.require("util").types;return t||r&&r.binding&&r.binding("util")}catch(e){}}();t.exports=s}(ao,ao.exports);var lo=ao.exports,co=ro,ho=so,uo=lo&&lo.isTypedArray,po=uo?ho(uo):co;var mo=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},go=Xe,fo=Z,vo=Object.prototype.hasOwnProperty;var bo=function(t,e,n){var o=t[e];vo.call(t,e)&&fo(o,n)&&(void 0!==n||e in t)||go(t,e,n)},yo=bo,wo=Xe;var xo=function(t,e,n,o){var i=!n;n||(n={});for(var r=-1,s=e.length;++r<s;){var a=e[r],l=o?o(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?wo(n,a,l):yo(n,a,l)}return n};var Co=/^(?:0|[1-9]\d*)$/;var So=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Co.test(t))&&t>-1&&t%1==0&&t<e},Eo=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o},Oo=Pn,Mo=Ln,No=qn,_o=So,Do=po,Ao=Object.prototype.hasOwnProperty;var ko=function(t,e){var n=Mo(t),o=!n&&Oo(t),i=!n&&!o&&No(t),r=!n&&!o&&!i&&Do(t),s=n||o||i||r,a=s?Eo(t.length,String):[],l=a.length;for(var c in t)!e&&!Ao.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_o(c,l))||a.push(c);return a};var jo=jt,To=wn,Po=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},Lo=Object.prototype.hasOwnProperty;var zo=ko,$o=function(t){if(!jo(t))return Po(t);var e=To(t),n=[];for(var o in t)("constructor"!=o||!e&&Lo.call(t,o))&&n.push(o);return n},Ho=Vn;var Vo=function(t){return Ho(t)?zo(t,!0):$o(t)},Io=xo,Fo=Vo;var Ro=Je,Bo=ln,Wo=un,qo=pn,Uo=En,Go=Pn,Xo=Ln,Yo=Rn,Zo=qn,Jo=zt,Ko=jt,Qo=to,ti=po,ei=mo,ni=function(t){return Io(t,Fo(t))};var oi=We,ii=Je,ri=sn,si=function(t,e,n,o,i,r,s){var a=ei(t,n),l=ei(e,n),c=s.get(l);if(c)Ro(t,n,c);else{var d=r?r(a,l,n+"",t,e,s):void 0,h=void 0===d;if(h){var u=Xo(l),p=!u&&Zo(l),m=!u&&!p&&ti(l);d=l,u||p||m?Xo(a)?d=a:Yo(a)?d=qo(a):p?(h=!1,d=Bo(l,!0)):m?(h=!1,d=Wo(l,!0)):d=[]:Qo(l)||Go(l)?(d=a,Go(a)?d=ni(a):Ko(a)&&!Jo(a)||(d=Uo(l))):h=!1}h&&(s.set(l,d),i(d,l,o,r,s),s.delete(l)),Ro(t,n,d)}},ai=jt,li=Vo,ci=mo;var di=function t(e,n,o,i,r){e!==n&&ri(n,(function(s,a){if(r||(r=new oi),ai(s))si(e,n,a,o,t,i,r);else{var l=i?i(ci(e,a),s,a+"",e,n,r):void 0;void 0===l&&(l=s),ii(e,a,l)}}),li)};var hi=function(t){return t};var ui=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},pi=Math.max;var mi=function(t,e,n){return e=pi(void 0===e?t.length-1:e,0),function(){for(var o=arguments,i=-1,r=pi(o.length-e,0),s=Array(r);++i<r;)s[i]=o[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=o[i];return a[e]=n(s),ui(t,this,a)}};var gi=function(t){return function(){return t}},fi=Ue,vi=fi?function(t,e){return fi(t,"toString",{configurable:!0,enumerable:!1,value:gi(e),writable:!0})}:hi,bi=Date.now;var yi=function(t){var e=0,n=0;return function(){var o=bi(),i=16-(o-n);if(n=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},wi=yi(vi),xi=hi,Ci=mi,Si=wi;var Ei=Z,Oi=Vn,Mi=So,Ni=jt;var _i=function(t,e){return Si(Ci(t,e,xi),t+"")},Di=function(t,e,n){if(!Ni(n))return!1;var o=typeof e;return!!("number"==o?Oi(n)&&Mi(e,n.length):"string"==o&&e in n)&&Ei(n[e],t)};var Ai=di;const ki=X(function(t){return _i((function(e,n){var o=-1,i=n.length,r=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(i--,r):void 0,s&&Di(n[0],n[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++o<i;){var a=n[o];a&&t(e,a,o,r)}return e}))}((function(t,e,n,o){Ai(t,e,n,o)}))),ji=()=>crypto.randomUUID(),Ti=(t="",e)=>{if(!e)return!1;const n=/[|\\{}()[\]^*$+?.]/g;let o="string"==typeof e?[e]:e;o=o.map((t=>"*"===t?"":t.replace(n,"\\$&")));let i=!0;return o.length&&(i=!new RegExp(o.join("|"),"i").exec(t)),i},Pi=t=>{var e;const n=null==(e=t.className)?void 0:e.match(M);return n&&E[n[0]]},Li=t=>Array.from(new Set(t)),zi=t=>{let e;if(t){const{attrs:n={}}=t;e=n.id||t.id||ji(),t.id=e}else e=ji();return e},$i=(t,e,n=Object.create(null))=>ki({},t,e,((t,e)=>{if(Array.isArray(t))return Array.isArray(e)?Li(n.mergeArray?t.concat(e):e):e})),Hi=t=>{let e;if(null===t||!("object"==typeof t)||t instanceof Promise)return t;if(t instanceof Date)return e=new Date,e.setTime(t.getTime()),e;if(t instanceof Array){e=[];for(let n=0,o=t.length;n<o;n++)e[n]=Hi(t[n]);return e}if(t instanceof Object){e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=Hi(t[n]));return e}throw new Error("Unable to copy Object, type not supported.")},Vi=(t,e)=>t/e*100,Ii=t=>t.toString()+"%",Fi=Object.create(null,{get:{value:t=>{const e=window.sessionStorage&&window.sessionStorage.getItem(t);try{return JSON.parse(e)}catch(n){}}},set:{value:(t,e)=>{try{return window.sessionStorage&&window.sessionStorage.setItem(t,JSON.stringify(e))}catch(n){}}}}),Ri=t=>w.some((e=>new RegExp(`^${e}.`).test(t))),Bi=t=>t.startsWith("external");function Wi(t,e){let n=!1;return function(){if(!n){t(...arguments),n=!0;const o=setTimeout((()=>{n=!1,clearTimeout(o)}),e)}}}function qi(t){return t}function Ui(){}var Gi=kt,Xi=On;var Yi=function(t){return"symbol"==typeof t||Xi(t)&&"[object Symbol]"==Gi(t)},Zi=Ln,Ji=Yi,Ki=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qi=/^\w*$/;var tr=function(t,e){if(Zi(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ji(t))||(Qi.test(t)||!Ki.test(t)||null!=e&&t in Object(e))},er=Te;function nr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var o=arguments,i=e?e.apply(this,o):o[0],r=n.cache;if(r.has(i))return r.get(i);var s=t.apply(this,o);return n.cache=r.set(i,s)||r,s};return n.cache=new(nr.Cache||er),n}nr.Cache=er;var or=nr;var ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rr=/\\(\\)?/g,sr=function(t){var e=or(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ir,(function(t,n,o,i){e.push(o?i.replace(rr,"$1"):n||t)})),e}));var ar=function(t,e){for(var n=-1,o=null==t?0:t.length,i=Array(o);++n<o;)i[n]=e(t[n],n,t);return i},lr=Ln,cr=Yi,dr=wt?wt.prototype:void 0,hr=dr?dr.toString:void 0;var ur=function t(e){if("string"==typeof e)return e;if(lr(e))return ar(e,t)+"";if(cr(e))return hr?hr.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n},pr=ur;var mr=Ln,gr=tr,fr=sr,vr=function(t){return null==t?"":pr(t)};var br=function(t,e){return mr(t)?t:gr(t,e)?[t]:fr(vr(t))},yr=Yi;var wr=function(t){if("string"==typeof t||yr(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},xr=bo,Cr=br,Sr=So,Er=jt,Or=wr;var Mr=function(t,e,n,o){if(!Er(t))return t;for(var i=-1,r=(e=Cr(e,t)).length,s=r-1,a=t;null!=a&&++i<r;){var l=Or(e[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=s){var d=a[l];void 0===(c=o?o(d,l,a):void 0)&&(c=Er(d)?d:Sr(e[i+1])?[]:{})}xr(a,l,c),a=a[l]}return t};const Nr=X((function(t,e,n){return null==t?t:Mr(t,e,n)}));var _r=br,Dr=wr;var Ar=function(t,e){for(var n=0,o=(e=_r(e,t)).length;null!=t&&n<o;)t=t[Dr(e[n++])];return n&&n==o?t:void 0};const kr=X((function(t,e,n){var o=null==t?void 0:Ar(t,e);return void 0===o?n:o})),jr=Nr,Tr=t=>{const e={...t},n={string:()=>"",boolean:()=>!1,object:t=>Tr(t)};return Object.keys(t).forEach((o=>{const i=typeof t[o];n[i]&&(e[o]=n[i](t[o]))})),e},Pr="a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map((t=>`\\s${t}\\s`)),Lr=new RegExp(`(?!${Pr.join("|")})\\w\\S*`,"g"),zr=/\s+/g;function $r(t){if("string"!=typeof t)return t;if(t.trim().match(zr))return t;return t.replace(Lr,(t=>t.charAt(0).toUpperCase()+t.substring(1).replace(/[A-Z]/g,(t=>` ${t}`))))}const Hr=(t,e="-")=>t.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,e),Vr=t=>Number.isInteger(Number(t)),Ir=(t,e)=>{const n=e||t.parentElement;return Array.prototype.slice.call(n.childNodes).indexOf(t)},Fr=(t,e,n)=>{const o=n.split("||"),i=Li(e).map((e=>t.find((t=>{const n=o.find((e=>!!kr(t,e)));return n&&kr(t,n)===e})))).filter(Boolean).concat(t);return Li(i)},Rr=(t,e,n)=>{for(let o=0;o<t.length;o++)e.call(n,t[o],o)},Br=(t,e)=>{const n=[];return Rr(t,((t,o)=>n.push(e(t,o)))),n},Wr={},qr=t=>t.replace(/\b\w/g,(t=>t.toUpperCase())),Ur=()=>-1!==window.navigator.userAgent.indexOf("MSIE "),Gr={capitalize:qr,safeAttrName:t=>{if(Wr[t])return Wr[t];const e=({className:"class"}[t]||t).replace(/^\d/,"").replace(/[^a-zA-Z0-9-:]/g,"");return Wr[t]=e,e},forEach:Rr,copyObj:t=>window.JSON.parse(window.JSON.stringify(t)),map:Br,subtract:(t,e)=>e.filter((e=>!~t.indexOf(e))),indexOfNode:Ir,isInt:Vr,get:kr,orderObjectsBy:Fr,isIE:Ur},Xr={getStyle:(t,e=!1)=>{let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n},fadeOut:(t,e=250)=>{const n=1/(e/60);t.style.opacity=1,function e(){const o=Number(t.style.opacity)-n;o>0?(t.style.opacity=o,window.requestAnimationFrame(e)):t.remove()}()},slideDown:(t,e=250,n=!1)=>{t.style.display="block";const o=Xr.getStyle(t),i=parseInt(o.height,10),r=i/(e/60);t.style.height="0px",function e(){const o=parseFloat(t.style.height),s=o+r;o<i?(t.style.height=s+"px",window.requestAnimationFrame(e)):(t.style.height="auto",n&&n(t))}()},slideUp:(t,e=250,n=!1)=>{const o=Xr.getStyle(t),i=parseInt(o.height),r=o.overflow;t.style.overflow="hidden",t.style.height=i+"px";const s=o.minHeight;t.style.minHeight="auto";const a=parseFloat(i/(e/60)).toFixed(2);!function e(){const o=parseInt(t.style.height,10)-a;o>0?(t.style.height=o+"px",window.requestAnimationFrame(e)):(t.style.overflow=r,t.style.display="none",t.style.minHeight=s,delete t.style.height,n&&n(t))}()},slideToggle:(t,e=250,n="none"===Xr.getStyle(t,"display"))=>{n?Xr.slideDown(t,e):Xr.slideUp(t,e)}},Yr="no-transition",Zr={debug:!1,bubbles:!0,formeoLoaded:t=>{},onAdd:()=>{},onUpdate:t=>Kr.opts.debug&&void 0,onUpdateStage:t=>Kr.opts.debug&&void 0,onUpdateRow:t=>Kr.opts.debug&&void 0,onUpdateColumn:t=>Kr.opts.debug&&void 0,onUpdateField:t=>Kr.opts.debug&&void 0,onRender:t=>Kr.opts.debug&&void 0,onSave:t=>{},confirmClearAll:t=>{window.confirm(t.confirmationMessage)&&t.clearAllAction(t)}},Jr=({src:t,...e},n=V)=>{const o=new window.CustomEvent(n,{detail:e,bubbles:Kr.opts.debug||Kr.opts.bubbles});return o.data=(t||document).dispatchEvent(o),o},Kr={init:function(t){return this.opts={...Zr,...t},this},formeoSaved:t=>Jr(t,H),formeoUpdated:t=>Jr(t,V),formeoCleared:t=>Jr(t,"formeoCleared"),formeoOnRender:t=>Jr(t,I),formeoConditionUpdated:t=>Jr(t,"formeoConditionUpdated")},Qr=Wi((()=>{Kr.opts.onUpdate({timeStamp:window.performance.now(),type:V,detail:Dd.formData})}),z);let ts;document.addEventListener(V,Qr),document.addEventListener("formeoUpdatedStage",(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener("formeoUpdatedRow",(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener("formeoUpdatedColumn",(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener("formeoUpdatedField",(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener(I,(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onRender({timeStamp:e,type:n,detail:o})})),document.addEventListener("confirmClearAll",(t=>{t={timeStamp:t.timeStamp,type:t.type,confirmationMessage:t.detail.confirmationMessage,clearAllAction:t.detail.clearAllAction,btnCoords:t.detail.btnCoords},Kr.opts.confirmClearAll(t)})),document.addEventListener(H,(({timeStamp:t,type:e,detail:{formData:n}})=>{const o={timeStamp:t,type:e,formData:n};Kr.opts.onSave(o)})),document.addEventListener("formeoLoaded",(t=>{Kr.opts.formeoLoaded(t.detail.formeo)})),window.addEventListener("resize",(function(){ts=ts||window.requestAnimationFrame((()=>{ts=!1,Object.values(Ed.data).forEach((t=>{t.dom.classList.add(Yr),Md.dom.classList.add(Yr),Md.panels.nav.refresh(),t.refreshFieldPanels()}))}))}));var es=Te,ns=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},os=function(t){return this.__data__.has(t)};function is(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new es;++e<n;)this.add(t[e])}is.prototype.add=is.prototype.push=ns,is.prototype.has=os;var rs=is,ss=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1},as=function(t,e){return t.has(e)};var ls=function(t,e,n,o,i,r){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=r.get(t),d=r.get(e);if(c&&d)return c==e&&d==t;var h=-1,u=!0,p=2&n?new rs:void 0;for(r.set(t,e),r.set(e,t);++h<a;){var m=t[h],g=e[h];if(o)var f=s?o(g,m,h,e,t,r):o(m,g,h,t,e,r);if(void 0!==f){if(f)continue;u=!1;break}if(p){if(!ss(e,(function(t,e){if(!as(p,e)&&(m===t||i(m,t,n,o,r)))return p.push(e)}))){u=!1;break}}else if(m!==g&&!i(m,g,n,o,r)){u=!1;break}}return r.delete(t),r.delete(e),u};var cs=cn,ds=Z,hs=ls,us=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,o){n[++e]=[o,t]})),n},ps=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},ms=wt?wt.prototype:void 0,gs=ms?ms.valueOf:void 0;var fs=function(t,e,n,o,i,r,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!r(new cs(t),new cs(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ds(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=us;case"[object Set]":var l=1&o;if(a||(a=ps),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;o|=2,s.set(t,e);var d=hs(a(t),a(e),o,i,r,s);return s.delete(t),d;case"[object Symbol]":if(gs)return gs.call(t)==gs.call(e)}return!1};var vs=function(t,e){for(var n=-1,o=e.length,i=t.length;++n<o;)t[i+n]=e[n];return t},bs=Ln;var ys=function(t,e,n){var o=e(t);return bs(t)?o:vs(o,n(t))};var ws=function(t,e){for(var n=-1,o=null==t?0:t.length,i=0,r=[];++n<o;){var s=t[n];e(s,n,t)&&(r[i++]=s)}return r},xs=function(){return[]},Cs=Object.prototype.propertyIsEnumerable,Ss=Object.getOwnPropertySymbols,Es=Ss?function(t){return null==t?[]:(t=Object(t),ws(Ss(t),(function(e){return Cs.call(t,e)})))}:xs,Os=vn(Object.keys,Object),Ms=wn,Ns=Os,_s=Object.prototype.hasOwnProperty;var Ds=ko,As=function(t){if(!Ms(t))return Ns(t);var e=[];for(var n in Object(t))_s.call(t,n)&&"constructor"!=n&&e.push(n);return e},ks=Vn;var js=ys,Ts=Es,Ps=function(t){return ks(t)?Ds(t):As(t)};var Ls=function(t){return js(t,Ps,Ts)},zs=Object.prototype.hasOwnProperty;var $s=function(t,e,n,o,i,r){var s=1&n,a=Ls(t),l=a.length;if(l!=Ls(e).length&&!s)return!1;for(var c=l;c--;){var d=a[c];if(!(s?d in e:zs.call(e,d)))return!1}var h=r.get(t),u=r.get(e);if(h&&u)return h==e&&u==t;var p=!0;r.set(t,e),r.set(e,t);for(var m=s;++c<l;){var g=t[d=a[c]],f=e[d];if(o)var v=s?o(f,g,d,e,t,r):o(g,f,d,t,e,r);if(!(void 0===v?g===f||i(g,f,n,o,r):v)){p=!1;break}m||(m="constructor"==d)}if(p&&!m){var b=t.constructor,y=e.constructor;b==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return r.delete(t),r.delete(e),p},Hs=te(yt,"DataView"),Vs=ee,Is=te(yt,"Promise"),Fs=te(yt,"Set"),Rs=te(yt,"WeakMap"),Bs=kt,Ws=Ft,qs="[object Map]",Us="[object Promise]",Gs="[object Set]",Xs="[object WeakMap]",Ys="[object DataView]",Zs=Ws(Hs),Js=Ws(Vs),Ks=Ws(Is),Qs=Ws(Fs),ta=Ws(Rs),ea=Bs;(Hs&&ea(new Hs(new ArrayBuffer(1)))!=Ys||Vs&&ea(new Vs)!=qs||Is&&ea(Is.resolve())!=Us||Fs&&ea(new Fs)!=Gs||Rs&&ea(new Rs)!=Xs)&&(ea=function(t){var e=Bs(t),n="[object Object]"==e?t.constructor:void 0,o=n?Ws(n):"";if(o)switch(o){case Zs:return Ys;case Js:return qs;case Ks:return Us;case Qs:return Gs;case ta:return Xs}return e});var na=We,oa=ls,ia=fs,ra=$s,sa=ea,aa=Ln,la=qn,ca=po,da="[object Arguments]",ha="[object Array]",ua="[object Object]",pa=Object.prototype.hasOwnProperty;var ma=function(t,e,n,o,i,r){var s=aa(t),a=aa(e),l=s?ha:sa(t),c=a?ha:sa(e),d=(l=l==da?ua:l)==ua,h=(c=c==da?ua:c)==ua,u=l==c;if(u&&la(t)){if(!la(e))return!1;s=!0,d=!1}if(u&&!d)return r||(r=new na),s||ca(t)?oa(t,e,n,o,i,r):ia(t,e,l,n,o,i,r);if(!(1&n)){var p=d&&pa.call(t,"__wrapped__"),m=h&&pa.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,f=m?e.value():e;return r||(r=new na),i(g,f,n,o,r)}}return!!u&&(r||(r=new na),ra(t,e,n,o,i,r))},ga=On;var fa=function t(e,n,o,i,r){return e===n||(null==e||null==n||!ga(e)&&!ga(n)?e!=e&&n!=n:ma(e,n,o,i,t,r))},va=fa;const ba=X((function(t,e){return va(t,e)}));class ya{constructor(t,e=Object.create(null)){n(this,"toJSON",((t,e)=>JSON.stringify(t,null,e))),n(this,"get",(t=>kr(this.data,t))),n(this,"getChangeType",((t,e)=>{const n=j.find((({condition:n})=>n(t,e)))||{type:"unknown"};return n.desc="added"===n.type?`${t} to ${e}`:e,n})),n(this,"add",((t,e=Object.create(null))=>{const{id:n}=e,o=t||n||zi();return this.set(o,e)})),n(this,"remove",(t=>{const e=t.split("."),n=e.pop(),o=this.get(e);return Array.isArray(o)?o.splice(Number(n),1):delete o[n],o})),n(this,"getData",(()=>Object.entries(this.data).reduce(((t,[e,n])=>(t[e]=(null==n?void 0:n.data)?n.getData():n,t)),{}))),n(this,"setCallbacks",{}),n(this,"configVal",Object.create(null)),this.name=t,this.data=e,this.dataPath=""}get size(){return Object.keys(this.data).length}get js(){return this.data}get json(){return this.data}set(t,e){const n=kr(this.data,t);if(ba(n,e))return this.data;const o=jr(this.data,t,e),i=Array.isArray(t)?t.join("."):t,r=Object.keys(this.setCallbacks).filter((t=>new RegExp(t).test(i))),s={newVal:e,oldVal:n,path:t};for(const a of r)for(const t of this.setCallbacks[a])t(s);if(!this.disableEvents){const i=this.getChangeType(n,e),r={entity:this,dataPath:this.dataPath.replace(/\.+$/,""),changePath:this.dataPath+t,value:e,data:o,change:`${i.type}: ${i.desc}`,src:this.dom};n&&(r.previousValue=n),Kr.formeoUpdated(r)}return o}addSetCallback(t,e){this.setCallbacks[t]?this.setCallbacks[t].push(e):this.setCallbacks[t]=[e]}removeSetCallback(t,e){this.setCallbacks[t]=this.setCallbacks[t].filter((t=>t!==e))}empty(){this.data=Object.create(null)}}
|
|
8
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Formeo={})}(this,(function(t){"use strict";var e=Object.defineProperty,n=(t,n,o)=>((t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o)(t,"symbol"!=typeof n?n+"":n,o);const o={},i=Object.freeze({method:"GET",body:""});const r=(t,e)=>{const n=[];t.on("data",(t=>n.push(t))),t.on("end",(()=>{const o=Buffer.concat(n),i={ok:t.statusCode>=200&&t.statusCode<300,status:t.statusCode,statusText:t.statusMessage,headers:new Map(Object.entries(t.headers)),body:o,arrayBuffer:()=>Promise.resolve(o),json:()=>Promise.resolve(JSON.parse(o.toString()))};e(i)}))},s={extension:".lang",location:"assets/lang/",langs:["en-US"],locale:"en-US",override:{}};class a{constructor(t=s){this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}processConfig(t){const{location:e,...n}={...s,...t},o=e.replace(/\/?$/,"/");this.config={location:o,...n};const{override:i,preloaded:r={}}=this.config,a=Object.entries(this.langs).concat(Object.entries(i||r));this.langs=a.reduce(((t,[e,n])=>(t[e]=this.applyLanguage(e,n),t)),{}),this.locale=this.config.locale||this.config.langs[0]}init(t){return this.processConfig({...this.config,...t}),this.setCurrent(this.locale)}addLanguage(t,e={}){e="string"==typeof e?a.processFile(e):e,this.applyLanguage(t,e),this.config.langs.push("locale")}getValue(t,e=this.locale){var n;return(null==(n=this.langs[e])?void 0:n[t])||this.getFallbackValue(t)}getFallbackValue(t){const e=Object.values(this.langs).find((e=>e[t]));return null==e?void 0:e[t]}makeSafe(t){const e={"{":"\\{","}":"\\}","|":"\\|"};return t=t.replace(/[{}|]/g,(t=>e[t])),new RegExp(t,"g")}put(t,e){return this.current[t]=e,e}get(t,e){const n=this;let o=this.getValue(t);if(!o)return;const i=o.match(/\{[^}]+?\}/g);if(e&&i)if("object"==typeof e)for(const r of i){const t=r.substring(1,r.length-1);o=o.replace(n.makeSafe(r),e[t]||"")}else o=o.replace(/\{[^}]+?\}/g,e);return o}static processFile(t){return a.fromFile(t.replace(/\n\n/g,"\n"))}static fromFile(t){const e=t.split("\n"),n={};for(let o,i=0;i<e.length;i++){o=/^(.+?) *?= *?([^\n]+)/.exec(e[i]),o&&(n[o[1]]=o[2].replace(/(^\s+|\s+$)/g,""))}return n}loadLang(t,e=!0){const n=this;return new Promise((function(s,a){if(-1!==n.loaded.indexOf(t)&&e)return n.applyLanguage(n.langs[t]),s(n.langs[t]);return function(t,e={}){const n={...i,...e},s=(t.startsWith("https"),o);return new Promise(((e,o)=>{const i=s.request(t,n,(t=>{r(t,e)}));i.on("error",(t=>o(new Error(t.message)))),(null==n?void 0:n.body)&&i.write(n.body),i.end()}))}([n.config.location,t,n.config.extension].join("")).then((({data:e})=>{const o=n.processFile(e);return n.applyLanguage(t,o),n.loaded.push(t),s(n.langs[t])})).catch((()=>{const e=n.applyLanguage(t);s(e)}))}))}applyLanguage(t,e={}){const n=this.config.override[t]||{},o=this.langs[t]||{};return this.langs[t]={...o,...e,...n},this.langs[t]}get getLangs(){return this.config.langs}async setCurrent(t="en-US"){return await this.loadLang(t),this.locale=t,this.current=this.langs[t],this.current}}const l=new a,c="formeo",d=[{name:"cssPreload",src:"//cdnjs.cloudflare.com/ajax/libs/loadCSS/2.0.1/cssrelpreload.min.js"},{name:"mutationObserver",src:"//cdn.jsdelivr.net/npm/mutationobserver-shim/dist/mutationobserver.min.js"},{name:"fetch",src:"https://unpkg.com/unfetch/polyfill"}],h="control-group",u=`${c}-stage`,p=`${c}-row`,m=`${c}-column`,g=`${c}-field`,f="custom-column-widths",v="column-preset",b="resizing-columns",y=new Map([[u,p],[p,m],[m,g]]),w=["external","stages","rows","columns","fields"],x=["stage","row","column","field"].reduce(((t,e)=>({...t,[e]:e})),{}),C=[{name:"controls",className:h},{name:"stage",className:u},{name:"row",className:p},{name:"column",className:m},{name:"field",className:g}],S={controls:h,stage:u,row:p,column:m,field:g},E=Object.entries(S).reduce(((t,[e,n])=>({...t,[n]:e})),{}),O=Object.values(S),M=new RegExp(`${O.join("|")}`,"g"),N=C.map((({name:t},e,n)=>{const{name:o}=n[e+1]||{};return o&&[t,o]})).filter(Boolean),_=N.slice().map((t=>t.slice().reverse())).reverse(),A=new Map(N),D=new Map(_.slice()),j=new Map([[{value:"100.0",label:"100%"}],[{value:"50.0,50.0",label:"50 | 50"},{value:"33.3,66.6",label:"33 | 66"},{value:"66.6,33.3",label:"66 | 33"}],[{value:"33.3,33.3,33.3",label:"33 | 33 | 33"},{value:"25.0,25.0,50.0",label:"25 | 25 | 50"},{value:"50.0,25.0,25.0",label:"50 | 25 | 25"},{value:"25.0,50.0,25.0",label:"25 | 50 | 25"}],[{value:"25.0,25.0,25.0,25.0",label:"25 | 25 | 25 | 25"}],[{value:"20.0,20.0,20.0,20.0,20.0",label:"20 | 20 | 20 | 20 | 20"}],[{value:"16.66,16.66,16.66,16.66,16.66,16.66",label:"16.66 | 16.66 | 16.66 | 16.66 | 16.66 | 16.66"}]].reduce(((t,e,n)=>(t.push([n,e]),t)))),k=[{type:"added",condition:(t,e)=>Boolean(void 0===t&&e)}],T=`${c}-formData`,P=`${c}-locale`,L=333,z=Math.round(166.5),$=Math.round(666),H="formeoSaved",V="formeoUpdated",I="formeoOnRender",F=["label","logical","source","thenTarget","sourceProperty","comparison","target","targetProperty","assignment","value"],B={value:"attrs.value",checked:"attrs.checked",isVisible:"config.isVisible",isNotVisible:"config.isNotVisible"},R={comparison:{equals:"==",notEquals:"!=",contains:"⊃",notContains:"!⊃"},assignment:{equals:"="},logical:{and:"&&",or:"||"},property:B},W=/(\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)/gi,q=/\bcol-\w+-\d+/g,U="f-i-";var G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function X(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Y=function(){this.__data__=[],this.size=0};var Z=function(t,e){return t===e||t!=t&&e!=e},J=Z;var K=function(t,e){for(var n=t.length;n--;)if(J(t[n][0],e))return n;return-1},Q=K,tt=Array.prototype.splice;var et=K;var nt=K;var ot=K;var it=Y,rt=function(t){var e=this.__data__,n=Q(e,t);return!(n<0)&&(n==e.length-1?e.pop():tt.call(e,n,1),--this.size,!0)},st=function(t){var e=this.__data__,n=et(e,t);return n<0?void 0:e[n][1]},at=function(t){return nt(this.__data__,t)>-1},lt=function(t,e){var n=this.__data__,o=ot(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function ct(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ct.prototype.clear=it,ct.prototype.delete=rt,ct.prototype.get=st,ct.prototype.has=at,ct.prototype.set=lt;var dt=ct,ht=dt;var ut=function(){this.__data__=new ht,this.size=0};var pt=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var mt=function(t){return this.__data__.get(t)};var gt=function(t){return this.__data__.has(t)},ft="object"==typeof G&&G&&G.Object===Object&&G,vt=ft,bt="object"==typeof self&&self&&self.Object===Object&&self,yt=vt||bt||Function("return this")(),wt=yt.Symbol,xt=wt,Ct=Object.prototype,St=Ct.hasOwnProperty,Et=Ct.toString,Ot=xt?xt.toStringTag:void 0;var Mt=function(t){var e=St.call(t,Ot),n=t[Ot];try{t[Ot]=void 0;var o=!0}catch(r){}var i=Et.call(t);return o&&(e?t[Ot]=n:delete t[Ot]),i},Nt=Object.prototype.toString;var _t=Mt,At=function(t){return Nt.call(t)},Dt=wt?wt.toStringTag:void 0;var jt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Dt&&Dt in Object(t)?_t(t):At(t)};var kt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Tt=jt,Pt=kt;var Lt,zt=function(t){if(!Pt(t))return!1;var e=Tt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},$t=yt["__core-js_shared__"],Ht=(Lt=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||""))?"Symbol(src)_1."+Lt:"";var Vt=function(t){return!!Ht&&Ht in t},It=Function.prototype.toString;var Ft=function(t){if(null!=t){try{return It.call(t)}catch(e){}try{return t+""}catch(e){}}return""},Bt=zt,Rt=Vt,Wt=kt,qt=Ft,Ut=/^\[object .+?Constructor\]$/,Gt=Function.prototype,Xt=Object.prototype,Yt=Gt.toString,Zt=Xt.hasOwnProperty,Jt=RegExp("^"+Yt.call(Zt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Kt=function(t){return!(!Wt(t)||Rt(t))&&(Bt(t)?Jt:Ut).test(qt(t))},Qt=function(t,e){return null==t?void 0:t[e]};var te=function(t,e){var n=Qt(t,e);return Kt(n)?n:void 0},ee=te(yt,"Map"),ne=te(Object,"create"),oe=ne;var ie=function(){this.__data__=oe?oe(null):{},this.size=0};var re=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},se=ne,ae=Object.prototype.hasOwnProperty;var le=function(t){var e=this.__data__;if(se){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ae.call(e,t)?e[t]:void 0},ce=ne,de=Object.prototype.hasOwnProperty;var he=ne;var ue=ie,pe=re,me=le,ge=function(t){var e=this.__data__;return ce?void 0!==e[t]:de.call(e,t)},fe=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=he&&void 0===e?"__lodash_hash_undefined__":e,this};function ve(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ve.prototype.clear=ue,ve.prototype.delete=pe,ve.prototype.get=me,ve.prototype.has=ge,ve.prototype.set=fe;var be=ve,ye=dt,we=ee;var xe=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Ce=function(t,e){var n=t.__data__;return xe(e)?n["string"==typeof e?"string":"hash"]:n.map},Se=Ce;var Ee=Ce;var Oe=Ce;var Me=Ce;var Ne=function(){this.size=0,this.__data__={hash:new be,map:new(we||ye),string:new be}},_e=function(t){var e=Se(this,t).delete(t);return this.size-=e?1:0,e},Ae=function(t){return Ee(this,t).get(t)},De=function(t){return Oe(this,t).has(t)},je=function(t,e){var n=Me(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this};function ke(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ke.prototype.clear=Ne,ke.prototype.delete=_e,ke.prototype.get=Ae,ke.prototype.has=De,ke.prototype.set=je;var Te=ke,Pe=dt,Le=ee,ze=Te;var $e=dt,He=ut,Ve=pt,Ie=mt,Fe=gt,Be=function(t,e){var n=this.__data__;if(n instanceof Pe){var o=n.__data__;if(!Le||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new ze(o)}return n.set(t,e),this.size=n.size,this};function Re(t){var e=this.__data__=new $e(t);this.size=e.size}Re.prototype.clear=He,Re.prototype.delete=Ve,Re.prototype.get=Ie,Re.prototype.has=Fe,Re.prototype.set=Be;var We=Re,qe=te,Ue=function(){try{var t=qe(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ge=Ue;var Xe=function(t,e,n){"__proto__"==e&&Ge?Ge(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Ye=Xe,Ze=Z;var Je=function(t,e,n){(void 0!==n&&!Ze(t[e],n)||void 0===n&&!(e in t))&&Ye(t,e,n)};var Ke,Qe,tn,en,nn,on,rn,sn=function(t){return function(e,n,o){for(var i=-1,r=Object(e),s=o(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(r[l],l,r))break}return e}}(),an={exports:{}};Ke=an,tn=yt,en=(Qe=an.exports)&&!Qe.nodeType&&Qe,nn=en&&Ke&&!Ke.nodeType&&Ke,on=nn&&nn.exports===en?tn.Buffer:void 0,rn=on?on.allocUnsafe:void 0,Ke.exports=function(t,e){if(e)return t.slice();var n=t.length,o=rn?rn(n):new t.constructor(n);return t.copy(o),o};var ln=an.exports,cn=yt.Uint8Array,dn=cn;var hn=function(t){var e=new t.constructor(t.byteLength);return new dn(e).set(new dn(t)),e};var un=function(t,e){var n=e?hn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};var pn=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e},mn=kt,gn=Object.create,fn=function(){function t(){}return function(e){if(!mn(e))return{};if(gn)return gn(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var vn=function(t,e){return function(n){return t(e(n))}},bn=vn(Object.getPrototypeOf,Object),yn=Object.prototype;var wn=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||yn)},xn=fn,Cn=bn,Sn=wn;var En=function(t){return"function"!=typeof t.constructor||Sn(t)?{}:xn(Cn(t))};var On=function(t){return null!=t&&"object"==typeof t},Mn=jt,Nn=On;var _n=function(t){return Nn(t)&&"[object Arguments]"==Mn(t)},An=On,Dn=Object.prototype,jn=Dn.hasOwnProperty,kn=Dn.propertyIsEnumerable,Tn=_n(function(){return arguments}())?_n:function(t){return An(t)&&jn.call(t,"callee")&&!kn.call(t,"callee")},Pn=Tn,Ln=Array.isArray;var zn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},$n=zt,Hn=zn;var Vn=function(t){return null!=t&&Hn(t.length)&&!$n(t)},In=Vn,Fn=On;var Bn=function(t){return Fn(t)&&In(t)},Rn={exports:{}};var Wn=function(){return!1};!function(t,e){var n=yt,o=Wn,i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,s=r&&r.exports===i?n.Buffer:void 0,a=(s?s.isBuffer:void 0)||o;t.exports=a}(Rn,Rn.exports);var qn=Rn.exports,Un=jt,Gn=bn,Xn=On,Yn=Function.prototype,Zn=Object.prototype,Jn=Yn.toString,Kn=Zn.hasOwnProperty,Qn=Jn.call(Object);var to=function(t){if(!Xn(t)||"[object Object]"!=Un(t))return!1;var e=Gn(t);if(null===e)return!0;var n=Kn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Jn.call(n)==Qn},eo=jt,no=zn,oo=On,io={};io["[object Float32Array]"]=io["[object Float64Array]"]=io["[object Int8Array]"]=io["[object Int16Array]"]=io["[object Int32Array]"]=io["[object Uint8Array]"]=io["[object Uint8ClampedArray]"]=io["[object Uint16Array]"]=io["[object Uint32Array]"]=!0,io["[object Arguments]"]=io["[object Array]"]=io["[object ArrayBuffer]"]=io["[object Boolean]"]=io["[object DataView]"]=io["[object Date]"]=io["[object Error]"]=io["[object Function]"]=io["[object Map]"]=io["[object Number]"]=io["[object Object]"]=io["[object RegExp]"]=io["[object Set]"]=io["[object String]"]=io["[object WeakMap]"]=!1;var ro=function(t){return oo(t)&&no(t.length)&&!!io[eo(t)]};var so=function(t){return function(e){return t(e)}},ao={exports:{}};!function(t,e){var n=ft,o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,r=i&&i.exports===o&&n.process,s=function(){try{var t=i&&i.require&&i.require("util").types;return t||r&&r.binding&&r.binding("util")}catch(e){}}();t.exports=s}(ao,ao.exports);var lo=ao.exports,co=ro,ho=so,uo=lo&&lo.isTypedArray,po=uo?ho(uo):co;var mo=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},go=Xe,fo=Z,vo=Object.prototype.hasOwnProperty;var bo=function(t,e,n){var o=t[e];vo.call(t,e)&&fo(o,n)&&(void 0!==n||e in t)||go(t,e,n)},yo=bo,wo=Xe;var xo=function(t,e,n,o){var i=!n;n||(n={});for(var r=-1,s=e.length;++r<s;){var a=e[r],l=o?o(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?wo(n,a,l):yo(n,a,l)}return n};var Co=/^(?:0|[1-9]\d*)$/;var So=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Co.test(t))&&t>-1&&t%1==0&&t<e},Eo=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o},Oo=Pn,Mo=Ln,No=qn,_o=So,Ao=po,Do=Object.prototype.hasOwnProperty;var jo=function(t,e){var n=Mo(t),o=!n&&Oo(t),i=!n&&!o&&No(t),r=!n&&!o&&!i&&Ao(t),s=n||o||i||r,a=s?Eo(t.length,String):[],l=a.length;for(var c in t)!e&&!Do.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_o(c,l))||a.push(c);return a};var ko=kt,To=wn,Po=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},Lo=Object.prototype.hasOwnProperty;var zo=jo,$o=function(t){if(!ko(t))return Po(t);var e=To(t),n=[];for(var o in t)("constructor"!=o||!e&&Lo.call(t,o))&&n.push(o);return n},Ho=Vn;var Vo=function(t){return Ho(t)?zo(t,!0):$o(t)},Io=xo,Fo=Vo;var Bo=Je,Ro=ln,Wo=un,qo=pn,Uo=En,Go=Pn,Xo=Ln,Yo=Bn,Zo=qn,Jo=zt,Ko=kt,Qo=to,ti=po,ei=mo,ni=function(t){return Io(t,Fo(t))};var oi=We,ii=Je,ri=sn,si=function(t,e,n,o,i,r,s){var a=ei(t,n),l=ei(e,n),c=s.get(l);if(c)Bo(t,n,c);else{var d=r?r(a,l,n+"",t,e,s):void 0,h=void 0===d;if(h){var u=Xo(l),p=!u&&Zo(l),m=!u&&!p&&ti(l);d=l,u||p||m?Xo(a)?d=a:Yo(a)?d=qo(a):p?(h=!1,d=Ro(l,!0)):m?(h=!1,d=Wo(l,!0)):d=[]:Qo(l)||Go(l)?(d=a,Go(a)?d=ni(a):Ko(a)&&!Jo(a)||(d=Uo(l))):h=!1}h&&(s.set(l,d),i(d,l,o,r,s),s.delete(l)),Bo(t,n,d)}},ai=kt,li=Vo,ci=mo;var di=function t(e,n,o,i,r){e!==n&&ri(n,(function(s,a){if(r||(r=new oi),ai(s))si(e,n,a,o,t,i,r);else{var l=i?i(ci(e,a),s,a+"",e,n,r):void 0;void 0===l&&(l=s),ii(e,a,l)}}),li)};var hi=function(t){return t};var ui=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},pi=Math.max;var mi=function(t,e,n){return e=pi(void 0===e?t.length-1:e,0),function(){for(var o=arguments,i=-1,r=pi(o.length-e,0),s=Array(r);++i<r;)s[i]=o[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=o[i];return a[e]=n(s),ui(t,this,a)}};var gi=function(t){return function(){return t}},fi=Ue,vi=fi?function(t,e){return fi(t,"toString",{configurable:!0,enumerable:!1,value:gi(e),writable:!0})}:hi,bi=Date.now;var yi=function(t){var e=0,n=0;return function(){var o=bi(),i=16-(o-n);if(n=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},wi=yi(vi),xi=hi,Ci=mi,Si=wi;var Ei=Z,Oi=Vn,Mi=So,Ni=kt;var _i=function(t,e){return Si(Ci(t,e,xi),t+"")},Ai=function(t,e,n){if(!Ni(n))return!1;var o=typeof e;return!!("number"==o?Oi(n)&&Mi(e,n.length):"string"==o&&e in n)&&Ei(n[e],t)};var Di=di;const ji=X(function(t){return _i((function(e,n){var o=-1,i=n.length,r=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(i--,r):void 0,s&&Ai(n[0],n[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++o<i;){var a=n[o];a&&t(e,a,o,r)}return e}))}((function(t,e,n,o){Di(t,e,n,o)}))),ki=()=>crypto.randomUUID(),Ti=(t="",e)=>{if(!e)return!1;const n=/[|\\{}()[\]^*$+?.]/g;let o="string"==typeof e?[e]:e;o=o.map((t=>"*"===t?"":t.replace(n,"\\$&")));let i=!0;return o.length&&(i=!new RegExp(o.join("|"),"i").exec(t)),i},Pi=t=>{var e;const n=null==(e=t.className)?void 0:e.match(M);return n&&E[n[0]]},Li=t=>Array.from(new Set(t)),zi=t=>{let e;if(t){const{attrs:n={}}=t;e=n.id||t.id||ki(),t.id=e}else e=ki();return e},$i=(t,e,n=Object.create(null))=>ji({},t,e,((t,e)=>{if(Array.isArray(t))return Array.isArray(e)?Li(n.mergeArray?t.concat(e):e):e})),Hi=t=>{let e;if(null===t||!("object"==typeof t)||t instanceof Promise)return t;if(t instanceof Date)return e=new Date,e.setTime(t.getTime()),e;if(Array.isArray(t)){e=[];for(let n=0,o=t.length;n<o;n++)e[n]=Hi(t[n]);return e}if(t instanceof Object){e={};for(const n in t)Object.hasOwn(t,n)&&(e[n]=Hi(t[n]));return e}throw new Error("Unable to copy Object, type not supported.")},Vi=(t,e)=>t/e*100,Ii=t=>`${t.toString()}%`,Fi=Object.create(null,{get:{value:t=>{const e=window.sessionStorage&&window.sessionStorage.getItem(t);try{return JSON.parse(e)}catch(n){}}},set:{value:(t,e)=>{try{return window.sessionStorage&&window.sessionStorage.setItem(t,JSON.stringify(e))}catch(n){}}}}),Bi=t=>w.some((e=>new RegExp(`^${e}.`).test(t))),Ri=t=>t.startsWith("external");function Wi(t,e){let n=!1;return function(){if(!n){t(...arguments),n=!0;const o=setTimeout((()=>{n=!1,clearTimeout(o)}),e)}}}function qi(t){return t}function Ui(){}var Gi=jt,Xi=On;var Yi=function(t){return"symbol"==typeof t||Xi(t)&&"[object Symbol]"==Gi(t)},Zi=Ln,Ji=Yi,Ki=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qi=/^\w*$/;var tr=function(t,e){if(Zi(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ji(t))||(Qi.test(t)||!Ki.test(t)||null!=e&&t in Object(e))},er=Te;function nr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var o=arguments,i=e?e.apply(this,o):o[0],r=n.cache;if(r.has(i))return r.get(i);var s=t.apply(this,o);return n.cache=r.set(i,s)||r,s};return n.cache=new(nr.Cache||er),n}nr.Cache=er;var or=nr;var ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rr=/\\(\\)?/g,sr=function(t){var e=or(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ir,(function(t,n,o,i){e.push(o?i.replace(rr,"$1"):n||t)})),e}));var ar=function(t,e){for(var n=-1,o=null==t?0:t.length,i=Array(o);++n<o;)i[n]=e(t[n],n,t);return i},lr=Ln,cr=Yi,dr=wt?wt.prototype:void 0,hr=dr?dr.toString:void 0;var ur=function t(e){if("string"==typeof e)return e;if(lr(e))return ar(e,t)+"";if(cr(e))return hr?hr.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n},pr=ur;var mr=Ln,gr=tr,fr=sr,vr=function(t){return null==t?"":pr(t)};var br=function(t,e){return mr(t)?t:gr(t,e)?[t]:fr(vr(t))},yr=Yi;var wr=function(t){if("string"==typeof t||yr(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},xr=bo,Cr=br,Sr=So,Er=kt,Or=wr;var Mr=function(t,e,n,o){if(!Er(t))return t;for(var i=-1,r=(e=Cr(e,t)).length,s=r-1,a=t;null!=a&&++i<r;){var l=Or(e[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=s){var d=a[l];void 0===(c=o?o(d,l,a):void 0)&&(c=Er(d)?d:Sr(e[i+1])?[]:{})}xr(a,l,c),a=a[l]}return t};const Nr=X((function(t,e,n){return null==t?t:Mr(t,e,n)}));var _r=br,Ar=wr;var Dr=function(t,e){for(var n=0,o=(e=_r(e,t)).length;null!=t&&n<o;)t=t[Ar(e[n++])];return n&&n==o?t:void 0};const jr=X((function(t,e,n){var o=null==t?void 0:Dr(t,e);return void 0===o?n:o})),kr=Nr,Tr=t=>{const e={...t},n={string:()=>"",boolean:()=>!1,object:t=>Tr(t)};return Object.keys(t).forEach((o=>{const i=typeof t[o];n[i]&&(e[o]=n[i](t[o]))})),e},Pr="a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map((t=>`\\s${t}\\s`)),Lr=new RegExp(`(?!${Pr.join("|")})\\w\\S*`,"g"),zr=/\s+/g;function $r(t){if("string"!=typeof t)return t;if(t.trim().match(zr))return t;return t.replace(Lr,(t=>t.charAt(0).toUpperCase()+t.substring(1).replace(/[A-Z]/g,(t=>` ${t}`))))}const Hr=(t,e="-")=>t.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,e),Vr=t=>Number.isInteger(Number(t)),Ir=(t,e)=>{const n=e||t.parentElement;return Array.prototype.slice.call(n.childNodes).indexOf(t)},Fr=(t,e,n)=>{const o=n.split("||"),i=Li(e).map((e=>t.find((t=>{const n=o.find((e=>!!jr(t,e)));return n&&jr(t,n)===e})))).filter(Boolean).concat(t);return Li(i)},Br=(t,e,n)=>{for(let o=0;o<t.length;o++)e.call(n,t[o],o)},Rr=(t,e)=>{const n=[];return Br(t,((t,o)=>n.push(e(t,o)))),n},Wr={},qr=t=>t.replace(/\b\w/g,(t=>t.toUpperCase())),Ur=()=>-1!==window.navigator.userAgent.indexOf("MSIE "),Gr={capitalize:qr,safeAttrName:t=>{if(Wr[t])return Wr[t];const e=({className:"class"}[t]||t).replace(/^\d/,"").replace(/[^a-zA-Z0-9-:]/g,"");return Wr[t]=e,e},forEach:Br,copyObj:t=>window.JSON.parse(window.JSON.stringify(t)),map:Rr,subtract:(t,e)=>e.filter((e=>!~t.indexOf(e))),indexOfNode:Ir,isInt:Vr,get:jr,orderObjectsBy:Fr,isIE:Ur},Xr={getStyle:(t,e=!1)=>{let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n},fadeOut:(t,e=250)=>{const n=1/(e/60);t.style.opacity=1,function e(){const o=Number(t.style.opacity)-n;o>0?(t.style.opacity=o,window.requestAnimationFrame(e)):t.remove()}()},slideDown:(t,e=250,n=!1)=>{t.style.display="block";const o=Xr.getStyle(t),i=parseInt(o.height,10),r=i/(e/60);t.style.height="0px",function e(){const o=parseFloat(t.style.height),s=o+r;o<i?(t.style.height=s+"px",window.requestAnimationFrame(e)):(t.style.height="auto",n&&n(t))}()},slideUp:(t,e=250,n=!1)=>{const o=Xr.getStyle(t),i=parseInt(o.height),r=o.overflow;t.style.overflow="hidden",t.style.height=i+"px";const s=o.minHeight;t.style.minHeight="auto";const a=parseFloat(i/(e/60)).toFixed(2);!function e(){const o=parseInt(t.style.height,10)-a;o>0?(t.style.height=o+"px",window.requestAnimationFrame(e)):(t.style.overflow=r,t.style.display="none",t.style.minHeight=s,delete t.style.height,n&&n(t))}()},slideToggle:(t,e=250,n="none"===Xr.getStyle(t,"display"))=>{n?Xr.slideDown(t,e):Xr.slideUp(t,e)}},Yr="no-transition",Zr={debug:!1,bubbles:!0,formeoLoaded:t=>{},onAdd:()=>{},onUpdate:t=>Kr.opts.debug&&void 0,onUpdateStage:t=>Kr.opts.debug&&void 0,onUpdateRow:t=>Kr.opts.debug&&void 0,onUpdateColumn:t=>Kr.opts.debug&&void 0,onUpdateField:t=>Kr.opts.debug&&void 0,onRender:t=>Kr.opts.debug&&void 0,onSave:t=>{},confirmClearAll:t=>{window.confirm(t.confirmationMessage)&&t.clearAllAction(t)}},Jr=({src:t,...e},n=V)=>{const o=new window.CustomEvent(n,{detail:e,bubbles:Kr.opts.debug||Kr.opts.bubbles});return o.data=(t||document).dispatchEvent(o),o},Kr={init:function(t){return this.opts={...Zr,...t},this},formeoSaved:t=>Jr(t,H),formeoUpdated:t=>Jr(t,V),formeoCleared:t=>Jr(t,"formeoCleared"),formeoOnRender:t=>Jr(t,I),formeoConditionUpdated:t=>Jr(t,"formeoConditionUpdated")},Qr=Wi((()=>{Kr.opts.onUpdate({timeStamp:window.performance.now(),type:V,detail:Ad.formData})}),z);let ts;document.addEventListener(V,Qr),document.addEventListener("formeoUpdatedStage",(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener("formeoUpdatedRow",(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener("formeoUpdatedColumn",(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener("formeoUpdatedField",(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener(I,(t=>{const{timeStamp:e,type:n,detail:o}=t;Kr.opts.onRender({timeStamp:e,type:n,detail:o})})),document.addEventListener("confirmClearAll",(t=>{t={timeStamp:t.timeStamp,type:t.type,confirmationMessage:t.detail.confirmationMessage,clearAllAction:t.detail.clearAllAction,btnCoords:t.detail.btnCoords},Kr.opts.confirmClearAll(t)})),document.addEventListener(H,(({timeStamp:t,type:e,detail:{formData:n}})=>{const o={timeStamp:t,type:e,formData:n};Kr.opts.onSave(o)})),document.addEventListener("formeoLoaded",(t=>{Kr.opts.formeoLoaded(t.detail.formeo)})),window.addEventListener("resize",(function(){ts=ts||window.requestAnimationFrame((()=>{ts=!1,Object.values(Ed.data).forEach((t=>{t.dom.classList.add(Yr),Md.dom.classList.add(Yr),Md.panels.nav.refresh(),t.refreshFieldPanels()}))}))}));var es=Te,ns=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},os=function(t){return this.__data__.has(t)};function is(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new es;++e<n;)this.add(t[e])}is.prototype.add=is.prototype.push=ns,is.prototype.has=os;var rs=is,ss=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1},as=function(t,e){return t.has(e)};var ls=function(t,e,n,o,i,r){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=r.get(t),d=r.get(e);if(c&&d)return c==e&&d==t;var h=-1,u=!0,p=2&n?new rs:void 0;for(r.set(t,e),r.set(e,t);++h<a;){var m=t[h],g=e[h];if(o)var f=s?o(g,m,h,e,t,r):o(m,g,h,t,e,r);if(void 0!==f){if(f)continue;u=!1;break}if(p){if(!ss(e,(function(t,e){if(!as(p,e)&&(m===t||i(m,t,n,o,r)))return p.push(e)}))){u=!1;break}}else if(m!==g&&!i(m,g,n,o,r)){u=!1;break}}return r.delete(t),r.delete(e),u};var cs=cn,ds=Z,hs=ls,us=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,o){n[++e]=[o,t]})),n},ps=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},ms=wt?wt.prototype:void 0,gs=ms?ms.valueOf:void 0;var fs=function(t,e,n,o,i,r,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!r(new cs(t),new cs(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ds(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=us;case"[object Set]":var l=1&o;if(a||(a=ps),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;o|=2,s.set(t,e);var d=hs(a(t),a(e),o,i,r,s);return s.delete(t),d;case"[object Symbol]":if(gs)return gs.call(t)==gs.call(e)}return!1};var vs=function(t,e){for(var n=-1,o=e.length,i=t.length;++n<o;)t[i+n]=e[n];return t},bs=Ln;var ys=function(t,e,n){var o=e(t);return bs(t)?o:vs(o,n(t))};var ws=function(t,e){for(var n=-1,o=null==t?0:t.length,i=0,r=[];++n<o;){var s=t[n];e(s,n,t)&&(r[i++]=s)}return r},xs=function(){return[]},Cs=Object.prototype.propertyIsEnumerable,Ss=Object.getOwnPropertySymbols,Es=Ss?function(t){return null==t?[]:(t=Object(t),ws(Ss(t),(function(e){return Cs.call(t,e)})))}:xs,Os=vn(Object.keys,Object),Ms=wn,Ns=Os,_s=Object.prototype.hasOwnProperty;var As=jo,Ds=function(t){if(!Ms(t))return Ns(t);var e=[];for(var n in Object(t))_s.call(t,n)&&"constructor"!=n&&e.push(n);return e},js=Vn;var ks=ys,Ts=Es,Ps=function(t){return js(t)?As(t):Ds(t)};var Ls=function(t){return ks(t,Ps,Ts)},zs=Object.prototype.hasOwnProperty;var $s=function(t,e,n,o,i,r){var s=1&n,a=Ls(t),l=a.length;if(l!=Ls(e).length&&!s)return!1;for(var c=l;c--;){var d=a[c];if(!(s?d in e:zs.call(e,d)))return!1}var h=r.get(t),u=r.get(e);if(h&&u)return h==e&&u==t;var p=!0;r.set(t,e),r.set(e,t);for(var m=s;++c<l;){var g=t[d=a[c]],f=e[d];if(o)var v=s?o(f,g,d,e,t,r):o(g,f,d,t,e,r);if(!(void 0===v?g===f||i(g,f,n,o,r):v)){p=!1;break}m||(m="constructor"==d)}if(p&&!m){var b=t.constructor,y=e.constructor;b==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return r.delete(t),r.delete(e),p},Hs=te(yt,"DataView"),Vs=ee,Is=te(yt,"Promise"),Fs=te(yt,"Set"),Bs=te(yt,"WeakMap"),Rs=jt,Ws=Ft,qs="[object Map]",Us="[object Promise]",Gs="[object Set]",Xs="[object WeakMap]",Ys="[object DataView]",Zs=Ws(Hs),Js=Ws(Vs),Ks=Ws(Is),Qs=Ws(Fs),ta=Ws(Bs),ea=Rs;(Hs&&ea(new Hs(new ArrayBuffer(1)))!=Ys||Vs&&ea(new Vs)!=qs||Is&&ea(Is.resolve())!=Us||Fs&&ea(new Fs)!=Gs||Bs&&ea(new Bs)!=Xs)&&(ea=function(t){var e=Rs(t),n="[object Object]"==e?t.constructor:void 0,o=n?Ws(n):"";if(o)switch(o){case Zs:return Ys;case Js:return qs;case Ks:return Us;case Qs:return Gs;case ta:return Xs}return e});var na=We,oa=ls,ia=fs,ra=$s,sa=ea,aa=Ln,la=qn,ca=po,da="[object Arguments]",ha="[object Array]",ua="[object Object]",pa=Object.prototype.hasOwnProperty;var ma=function(t,e,n,o,i,r){var s=aa(t),a=aa(e),l=s?ha:sa(t),c=a?ha:sa(e),d=(l=l==da?ua:l)==ua,h=(c=c==da?ua:c)==ua,u=l==c;if(u&&la(t)){if(!la(e))return!1;s=!0,d=!1}if(u&&!d)return r||(r=new na),s||ca(t)?oa(t,e,n,o,i,r):ia(t,e,l,n,o,i,r);if(!(1&n)){var p=d&&pa.call(t,"__wrapped__"),m=h&&pa.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,f=m?e.value():e;return r||(r=new na),i(g,f,n,o,r)}}return!!u&&(r||(r=new na),ra(t,e,n,o,i,r))},ga=On;var fa=function t(e,n,o,i,r){return e===n||(null==e||null==n||!ga(e)&&!ga(n)?e!=e&&n!=n:ma(e,n,o,i,t,r))},va=fa;const ba=X((function(t,e){return va(t,e)}));class ya{constructor(t,e=Object.create(null)){n(this,"toJSON",((t,e)=>JSON.stringify(t,null,e))),n(this,"get",(t=>jr(this.data,t))),n(this,"getChangeType",((t,e)=>{const n=k.find((({condition:n})=>n(t,e)))||{type:"unknown"};return n.desc="added"===n.type?`${t} to ${e}`:e,n})),n(this,"add",((t,e=Object.create(null))=>{const{id:n}=e,o=t||n||zi();return this.set(o,e)})),n(this,"remove",(t=>{const e=t.split("."),n=e.pop(),o=this.get(e);return Array.isArray(o)?o.splice(Number(n),1):delete o[n],o})),n(this,"getData",(()=>Object.entries(this.data).reduce(((t,[e,n])=>(t[e]=(null==n?void 0:n.data)?n.getData():n,t)),{}))),n(this,"setCallbacks",{}),n(this,"configVal",Object.create(null)),this.name=t,this.data=e,this.dataPath=""}get size(){return Object.keys(this.data).length}get js(){return this.data}get json(){return this.data}set(t,e){const n=jr(this.data,t);if(ba(n,e))return this.data;const o=kr(this.data,t,e),i=Array.isArray(t)?t.join("."):t,r=Object.keys(this.setCallbacks).filter((t=>new RegExp(t).test(i))),s={newVal:e,oldVal:n,path:t};for(const a of r)for(const t of this.setCallbacks[a])t(s);if(!this.disableEvents){const i=this.getChangeType(n,e),r={entity:this,dataPath:this.dataPath.replace(/\.+$/,""),changePath:this.dataPath+t,value:e,data:o,change:`${i.type}: ${i.desc}`,src:this.dom};n&&(r.previousValue=n),Kr.formeoUpdated(r)}return o}addSetCallback(t,e){this.setCallbacks[t]?this.setCallbacks[t].push(e):this.setCallbacks[t]=[e]}removeSetCallback(t,e){this.setCallbacks[t]=this.setCallbacks[t].filter((t=>t!==e))}empty(){this.data=Object.create(null)}}
|
|
9
9
|
/**!
|
|
10
10
|
* Sortable 1.15.3
|
|
11
11
|
* @author RubaXa <trash@rubaxa.org>
|
|
12
12
|
* @author owenm <owen23355@gmail.com>
|
|
13
13
|
* @license MIT
|
|
14
|
-
*/function wa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function xa(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wa(Object(n),!0).forEach((function(e){Sa(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wa(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ca(t){return(Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Sa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ea(){return Ea=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ea.apply(this,arguments)}function Oa(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Ma(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Na=Ma(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_a=Ma(/Edge/i),Da=Ma(/firefox/i),Aa=Ma(/safari/i)&&!Ma(/chrome/i)&&!Ma(/android/i),ka=Ma(/iP(ad|od|hone)/i),ja=Ma(/chrome/i)&&Ma(/android/i),Ta={capture:!1,passive:!1};function Pa(t,e,n){t.addEventListener(e,n,!Na&&Ta)}function La(t,e,n){t.removeEventListener(e,n,!Na&&Ta)}function za(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function $a(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Ha(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&za(t,e):za(t,e))||o&&t===n)return t;if(t===n)break}while(t=$a(t))}return null}var Va,Ia=/\s+/g;function Fa(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(Ia," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(Ia," ")}}function Ra(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Ba(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Ra(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Wa(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function qa(){var t=document.scrollingElement;return t||document.documentElement}function Ua(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,s,a,l,c,d,h;if(t!==window&&t.parentNode&&t!==qa()?(s=(r=t.getBoundingClientRect()).top,a=r.left,l=r.bottom,c=r.right,d=r.height,h=r.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Na))do{if(i&&i.getBoundingClientRect&&("none"!==Ra(i,"transform")||n&&"static"!==Ra(i,"position"))){var u=i.getBoundingClientRect();s-=u.top+parseInt(Ra(i,"border-top-width")),a-=u.left+parseInt(Ra(i,"border-left-width")),l=s+r.height,c=a+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=Ba(i||t),m=p&&p.a,g=p&&p.d;p&&(l=(s/=g)+(d/=g),c=(a/=m)+(h/=m))}return{top:s,left:a,bottom:l,right:c,width:h,height:d}}}function Ga(t,e,n){for(var o=Ka(t,!0),i=Ua(t)[e];o;){if(!(i>=Ua(o)[n]))return o;if(o===qa())break;o=Ka(o,!1)}return!1}function Xa(t,e,n,o){for(var i=0,r=0,s=t.children;r<s.length;){if("none"!==s[r].style.display&&s[r]!==nc.ghost&&(o||s[r]!==nc.dragged)&&Ha(s[r],n.draggable,t,!1)){if(i===e)return s[r];i++}r++}return null}function Ya(t,e){for(var n=t.lastElementChild;n&&(n===nc.ghost||"none"===Ra(n,"display")||e&&!za(n,e));)n=n.previousElementSibling;return n||null}function Za(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===nc.clone||e&&!za(t,e)||n++;return n}function Ja(t){var e=0,n=0,o=qa();if(t)do{var i=Ba(t),r=i.a,s=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*s}while(t!==o&&(t=t.parentNode));return[e,n]}function Ka(t,e){if(!t||!t.getBoundingClientRect)return qa();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=Ra(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return qa();if(o||e)return n;o=!0}}}while(n=n.parentNode);return qa()}function Qa(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function tl(t,e){return function(){if(!Va){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),Va=setTimeout((function(){Va=void 0}),e)}}}function el(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function nl(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function ol(t,e,n){var o={};return Array.from(t.children).forEach((function(i){var r,s,a,l;if(Ha(i,e.draggable,t,!1)&&!i.animated&&i!==n){var c=Ua(i);o.left=Math.min(null!==(r=o.left)&&void 0!==r?r:1/0,c.left),o.top=Math.min(null!==(s=o.top)&&void 0!==s?s:1/0,c.top),o.right=Math.max(null!==(a=o.right)&&void 0!==a?a:-1/0,c.right),o.bottom=Math.max(null!==(l=o.bottom)&&void 0!==l?l:-1/0,c.bottom)}})),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var il="Sortable"+(new Date).getTime();function rl(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Ra(t,"display")&&t!==nc.ghost){e.push({target:t,rect:Ua(t)});var n=xa({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=Ba(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,s=n.fromRect,a=Ua(n),l=n.prevFromRect,c=n.prevToRect,d=t.rect,h=Ba(n,!0);h&&(a.top-=h.f,a.left-=h.e),n.toRect=a,n.thisAnimationDuration&&Qa(l,a)&&!Qa(s,a)&&(d.top-a.top)/(d.left-a.left)==(s.top-a.top)/(s.left-a.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(d,l,c,o.options)),Qa(a,s)||(n.prevFromRect=s,n.prevToRect=a,e||(e=o.options.animation),o.animate(n,d,a,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){Ra(t,"transition",""),Ra(t,"transform","");var i=Ba(this.el),r=i&&i.a,s=i&&i.d,a=(e.left-n.left)/(r||1),l=(e.top-n.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,Ra(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),Ra(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Ra(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Ra(t,"transition",""),Ra(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var sl=[],al={initializeByDefault:!0},ll={mount:function(t){for(var e in al)al.hasOwnProperty(e)&&!(e in t)&&(t[e]=al[e]);sl.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),sl.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";sl.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](xa({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](xa({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in sl.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var r=new o(t,e,t.options);r.sortable=t,r.options=t.options,t[i]=r,Ea(n,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);void 0!==r&&(t.options[i]=r)}},getEventProperties:function(t,e){var n={};return sl.forEach((function(o){"function"==typeof o.eventProperties&&Ea(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return sl.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};var cl=["evt"],dl=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=Oa(n,cl);ll.pluginEvent.bind(nc)(t,e,xa({dragEl:ul,parentEl:pl,ghostEl:ml,rootEl:gl,nextEl:fl,lastDownEl:vl,cloneEl:bl,cloneHidden:yl,dragStarted:jl,putSortable:Ol,activeSortable:nc.active,originalEvent:o,oldIndex:wl,oldDraggableIndex:Cl,newIndex:xl,newDraggableIndex:Sl,hideGhostForTarget:Kl,unhideGhostForTarget:Ql,cloneNowHidden:function(){yl=!0},cloneNowShown:function(){yl=!1},dispatchSortableEvent:function(t){hl({sortable:e,name:t,originalEvent:o})}},i))};function hl(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,c=t.newIndex,d=t.oldDraggableIndex,h=t.newDraggableIndex,u=t.originalEvent,p=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[il]){var g,f=e.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Na||_a?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=s||n,g.from=a||n,g.item=i||n,g.clone=r,g.oldIndex=l,g.newIndex=c,g.oldDraggableIndex=d,g.newDraggableIndex=h,g.originalEvent=u,g.pullMode=p?p.lastPutMode:void 0;var b=xa(xa({},m),ll.getEventProperties(o,e));for(var y in b)g[y]=b[y];n&&n.dispatchEvent(g),f[v]&&f[v].call(e,g)}}(xa({putSortable:Ol,cloneEl:bl,targetEl:ul,rootEl:gl,oldIndex:wl,oldDraggableIndex:Cl,newIndex:xl,newDraggableIndex:Sl},t))}var ul,pl,ml,gl,fl,vl,bl,yl,wl,xl,Cl,Sl,El,Ol,Ml,Nl,_l,Dl,Al,kl,jl,Tl,Pl,Ll,zl,$l=!1,Hl=!1,Vl=[],Il=!1,Fl=!1,Rl=[],Bl=!1,Wl=[],ql="undefined"!=typeof document,Ul=ka,Gl=_a||Na?"cssFloat":"float",Xl=ql&&!ja&&!ka&&"draggable"in document.createElement("div"),Yl=function(){if(ql){if(Na)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Zl=function(t,e){var n=Ra(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=Xa(t,0,e),r=Xa(t,1,e),s=i&&Ra(i),a=r&&Ra(r),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Ua(i).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Ua(r).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(i&&s.float&&"none"!==s.float){var d="left"===s.float?"left":"right";return!r||"both"!==a.clear&&a.clear!==d?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=o&&"none"===n[Gl]||r&&"none"===n[Gl]&&l+c>o)?"vertical":"horizontal"},Jl=function(t){function e(t,n){return function(o,i,r,s){var a=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||a))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,s),n)(o,i,r,s);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==Ca(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},Kl=function(){!Yl&&ml&&Ra(ml,"display","none")},Ql=function(){!Yl&&ml&&Ra(ml,"display","")};ql&&!ja&&document.addEventListener("click",(function(t){if(Hl)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Hl=!1,!1}),!0);var tc=function(t){if(ul){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,Vl.some((function(t){var e=t[il].options.emptyInsertThreshold;if(e&&!Ya(t)){var n=Ua(t),o=i>=n.left-e&&i<=n.right+e,a=r>=n.top-e&&r<=n.bottom+e;return o&&a?s=t:void 0}})),s);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[il]._onDragOver(n)}}var i,r,s},ec=function(t){ul&&ul.parentNode[il]._isOutsideThisEl(t.target)};function nc(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Ea({},e),t[il]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Zl(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==nc.supportPointer&&"PointerEvent"in window&&!Aa,emptyInsertThreshold:5};for(var o in ll.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in Jl(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Xl,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Pa(t,"pointerdown",this._onTapStart):(Pa(t,"mousedown",this._onTapStart),Pa(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Pa(t,"dragover",this),Pa(t,"dragenter",this)),Vl.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ea(this,rl())}function oc(t,e,n,o,i,r,s,a){var l,c,d=t[il],h=d.options.onMove;return!window.CustomEvent||Na||_a?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=i||e,l.relatedRect=r||Ua(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),h&&(c=h.call(d,l,s)),c}function ic(t){t.draggable=!1}function rc(){Bl=!1}function sc(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function ac(t){return setTimeout(t,0)}function lc(t){return clearTimeout(t)}nc.prototype={constructor:nc,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Tl=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,ul):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=o.filter;if(function(t){Wl.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Wl.push(o)}}(n),!ul&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Aa||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=Ha(a,o.draggable,n,!1))&&a.animated||vl===a)){if(wl=Za(a),Cl=Za(a,o.draggable),"function"==typeof c){if(c.call(this,t,a,this))return hl({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),dl("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=Ha(l,o.trim(),n,!1))return hl({sortable:e,rootEl:o,name:"filter",targetEl:a,fromEl:n,toEl:n}),dl("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!Ha(l,o.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,s=i.options,a=r.ownerDocument;if(n&&!ul&&n.parentNode===r){var l=Ua(n);if(gl=r,pl=(ul=n).parentNode,fl=ul.nextSibling,vl=n,El=s.group,nc.dragged=ul,Ml={target:ul,clientX:(e||t).clientX,clientY:(e||t).clientY},Al=Ml.clientX-l.left,kl=Ml.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,ul.style["will-change"]="all",o=function(){dl("delayEnded",i,{evt:t}),nc.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!Da&&i.nativeDraggable&&(ul.draggable=!0),i._triggerDragStart(t,e),hl({sortable:i,name:"choose",originalEvent:t}),Fa(ul,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){Wa(ul,t.trim(),ic)})),Pa(a,"dragover",tc),Pa(a,"mousemove",tc),Pa(a,"touchmove",tc),Pa(a,"mouseup",i._onDrop),Pa(a,"touchend",i._onDrop),Pa(a,"touchcancel",i._onDrop),Da&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ul.draggable=!0),dl("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(_a||Na))o();else{if(nc.eventCanceled)return void this._onDrop();Pa(a,"mouseup",i._disableDelayedDrag),Pa(a,"touchend",i._disableDelayedDrag),Pa(a,"touchcancel",i._disableDelayedDrag),Pa(a,"mousemove",i._delayedDragTouchMoveHandler),Pa(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&Pa(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ul&&ic(ul),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;La(t,"mouseup",this._disableDelayedDrag),La(t,"touchend",this._disableDelayedDrag),La(t,"touchcancel",this._disableDelayedDrag),La(t,"mousemove",this._delayedDragTouchMoveHandler),La(t,"touchmove",this._delayedDragTouchMoveHandler),La(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Pa(document,"pointermove",this._onTouchMove):Pa(document,e?"touchmove":"mousemove",this._onTouchMove):(Pa(ul,"dragend",this),Pa(gl,"dragstart",this._onDragStart));try{document.selection?ac((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if($l=!1,gl&&ul){dl("dragStarted",this,{evt:e}),this.nativeDraggable&&Pa(document,"dragover",ec);var n=this.options;!t&&Fa(ul,n.dragClass,!1),Fa(ul,n.ghostClass,!0),nc.active=this,t&&this._appendGhost(),hl({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Nl){this._lastX=Nl.clientX,this._lastY=Nl.clientY,Kl();for(var t=document.elementFromPoint(Nl.clientX,Nl.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Nl.clientX,Nl.clientY))!==e;)e=t;if(ul.parentNode[il]._isOutsideThisEl(t),e)do{if(e[il]){if(e[il]._onDragOver({clientX:Nl.clientX,clientY:Nl.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=$a(e));Ql()}},_onTouchMove:function(t){if(Ml){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=ml&&Ba(ml,!0),s=ml&&r&&r.a,a=ml&&r&&r.d,l=Ul&&zl&&Ja(zl),c=(i.clientX-Ml.clientX+o.x)/(s||1)+(l?l[0]-Rl[0]:0)/(s||1),d=(i.clientY-Ml.clientY+o.y)/(a||1)+(l?l[1]-Rl[1]:0)/(a||1);if(!nc.active&&!$l){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(ml){r?(r.e+=c-(_l||0),r.f+=d-(Dl||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Ra(ml,"webkitTransform",h),Ra(ml,"mozTransform",h),Ra(ml,"msTransform",h),Ra(ml,"transform",h),_l=c,Dl=d,Nl=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!ml){var t=this.options.fallbackOnBody?document.body:gl,e=Ua(ul,!0,Ul,!0,t),n=this.options;if(Ul){for(zl=t;"static"===Ra(zl,"position")&&"none"===Ra(zl,"transform")&&zl!==document;)zl=zl.parentNode;zl!==document.body&&zl!==document.documentElement?(zl===document&&(zl=qa()),e.top+=zl.scrollTop,e.left+=zl.scrollLeft):zl=qa(),Rl=Ja(zl)}Fa(ml=ul.cloneNode(!0),n.ghostClass,!1),Fa(ml,n.fallbackClass,!0),Fa(ml,n.dragClass,!0),Ra(ml,"transition",""),Ra(ml,"transform",""),Ra(ml,"box-sizing","border-box"),Ra(ml,"margin",0),Ra(ml,"top",e.top),Ra(ml,"left",e.left),Ra(ml,"width",e.width),Ra(ml,"height",e.height),Ra(ml,"opacity","0.8"),Ra(ml,"position",Ul?"absolute":"fixed"),Ra(ml,"zIndex","100000"),Ra(ml,"pointerEvents","none"),nc.ghost=ml,t.appendChild(ml),Ra(ml,"transform-origin",Al/parseInt(ml.style.width)*100+"% "+kl/parseInt(ml.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;dl("dragStart",this,{evt:t}),nc.eventCanceled?this._onDrop():(dl("setupClone",this),nc.eventCanceled||((bl=nl(ul)).removeAttribute("id"),bl.draggable=!1,bl.style["will-change"]="",this._hideClone(),Fa(bl,this.options.chosenClass,!1),nc.clone=bl),n.cloneId=ac((function(){dl("clone",n),nc.eventCanceled||(n.options.removeCloneOnHide||gl.insertBefore(bl,ul),n._hideClone(),hl({sortable:n,name:"clone"}))})),!e&&Fa(ul,i.dragClass,!0),e?(Hl=!0,n._loopId=setInterval(n._emulateDragOver,50)):(La(document,"mouseup",n._onDrop),La(document,"touchend",n._onDrop),La(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,ul)),Pa(document,"drop",n),Ra(ul,"transform","translateZ(0)")),$l=!0,n._dragStartId=ac(n._dragStarted.bind(n,e,t)),Pa(document,"selectstart",n),jl=!0,Aa&&Ra(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,r=this.el,s=t.target,a=this.options,l=a.group,c=nc.active,d=El===l,h=a.sort,u=Ol||c,p=this,m=!1;if(!Bl){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=Ha(s,a.draggable,r,!0),D("dragOver"),nc.eventCanceled)return m;if(ul.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return k(!1);if(Hl=!1,c&&!a.disabled&&(d?h||(o=pl!==gl):Ol===this||(this.lastPutMode=El.checkPull(this,c,ul,t))&&l.checkPut(this,c,ul,t))){if(i="vertical"===this._getDirection(t,s),e=Ua(ul),D("dragOverValid"),nc.eventCanceled)return m;if(o)return pl=gl,A(),this._hideClone(),D("revert"),nc.eventCanceled||(fl?gl.insertBefore(ul,fl):gl.appendChild(ul)),k(!0);var g=Ya(r,a.draggable);if(!g||function(t,e,n){var o=Ua(Ya(n.el,n.options.draggable)),i=ol(n.el,n.options,ml),r=10;return e?t.clientX>i.right+r||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>i.bottom+r||t.clientX>o.right&&t.clientY>o.top}(t,i,this)&&!g.animated){if(g===ul)return k(!1);if(g&&r===t.target&&(s=g),s&&(n=Ua(s)),!1!==oc(gl,r,ul,e,s,n,t,!!s))return A(),g&&g.nextSibling?r.insertBefore(ul,g.nextSibling):r.appendChild(ul),pl=r,j(),k(!0)}else if(g&&function(t,e,n){var o=Ua(Xa(n.el,0,n.options,!0)),i=ol(n.el,n.options,ml),r=10;return e?t.clientX<i.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<i.top-r||t.clientY<o.bottom&&t.clientX<o.left}(t,i,this)){var f=Xa(r,0,a,!0);if(f===ul)return k(!1);if(n=Ua(s=f),!1!==oc(gl,r,ul,e,s,n,t,!1))return A(),r.insertBefore(ul,f),pl=r,j(),k(!0)}else if(s.parentNode===r){n=Ua(s);var v,b,y,w=ul.parentNode!==r,x=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return o===s||i===a||o+r/2===s+l/2}(ul.animated&&ul.toRect||e,s.animated&&s.toRect||n,i),C=i?"top":"left",S=Ga(s,"top","top")||Ga(ul,"top","top"),E=S?S.scrollTop:void 0;if(Tl!==s&&(b=n[C],Il=!1,Fl=!x&&a.invertSwap||w),v=function(t,e,n,o,i,r,s,a){var l=o?t.clientY:t.clientX,c=o?n.height:n.width,d=o?n.top:n.left,h=o?n.bottom:n.right,u=!1;if(!s)if(a&&Ll<c*i){if(!Il&&(1===Pl?l>d+c*r/2:l<h-c*r/2)&&(Il=!0),Il)u=!0;else if(1===Pl?l<d+Ll:l>h-Ll)return-Pl}else if(l>d+c*(1-i)/2&&l<h-c*(1-i)/2)return function(t){return Za(ul)<Za(t)?1:-1}(e);if((u=u||s)&&(l<d+c*r/2||l>h-c*r/2))return l>d+c/2?1:-1;return 0}(t,s,n,i,x?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,Fl,Tl===s),0!==v){var O=Za(ul);do{O-=v,y=pl.children[O]}while(y&&("none"===Ra(y,"display")||y===ml))}if(0===v||y===s)return k(!1);Tl=s,Pl=v;var M=s.nextElementSibling,N=!1,_=oc(gl,r,ul,e,s,n,t,N=1===v);if(!1!==_)return 1!==_&&-1!==_||(N=1===_),Bl=!0,setTimeout(rc,30),A(),N&&!M?r.appendChild(ul):s.parentNode.insertBefore(ul,N?M:s),S&&el(S,0,E-S.scrollTop),pl=ul.parentNode,void 0===b||Fl||(Ll=Math.abs(b-Ua(s)[C])),j(),k(!0)}if(r.contains(ul))return k(!1)}return!1}function D(a,l){dl(a,p,xa({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:u,target:s,completed:k,onMove:function(n,o){return oc(gl,r,ul,e,n,Ua(n),t,o)},changed:j},l))}function A(){D("dragOverAnimationCapture"),p.captureAnimationState(),p!==u&&u.captureAnimationState()}function k(e){return D("dragOverCompleted",{insertion:e}),e&&(d?c._hideClone():c._showClone(p),p!==u&&(Fa(ul,Ol?Ol.options.ghostClass:c.options.ghostClass,!1),Fa(ul,a.ghostClass,!0)),Ol!==p&&p!==nc.active?Ol=p:p===nc.active&&Ol&&(Ol=null),u===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){D("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==u&&(u.animateAll(),u._ignoreWhileAnimating=null)),(s===ul&&!ul.animated||s===r&&!s.animated)&&(Tl=null),a.dragoverBubble||t.rootEl||s===document||(ul.parentNode[il]._isOutsideThisEl(t.target),!e&&tc(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function j(){xl=Za(ul),Sl=Za(ul,a.draggable),hl({sortable:p,name:"change",toEl:r,newIndex:xl,newDraggableIndex:Sl,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){La(document,"mousemove",this._onTouchMove),La(document,"touchmove",this._onTouchMove),La(document,"pointermove",this._onTouchMove),La(document,"dragover",tc),La(document,"mousemove",tc),La(document,"touchmove",tc)},_offUpEvents:function(){var t=this.el.ownerDocument;La(t,"mouseup",this._onDrop),La(t,"touchend",this._onDrop),La(t,"pointerup",this._onDrop),La(t,"touchcancel",this._onDrop),La(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;xl=Za(ul),Sl=Za(ul,n.draggable),dl("drop",this,{evt:t}),pl=ul&&ul.parentNode,xl=Za(ul),Sl=Za(ul,n.draggable),nc.eventCanceled||($l=!1,Fl=!1,Il=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),lc(this.cloneId),lc(this._dragStartId),this.nativeDraggable&&(La(document,"drop",this),La(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Aa&&Ra(document.body,"user-select",""),Ra(ul,"transform",""),t&&(jl&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),ml&&ml.parentNode&&ml.parentNode.removeChild(ml),(gl===pl||Ol&&"clone"!==Ol.lastPutMode)&&bl&&bl.parentNode&&bl.parentNode.removeChild(bl),ul&&(this.nativeDraggable&&La(ul,"dragend",this),ic(ul),ul.style["will-change"]="",jl&&!$l&&Fa(ul,Ol?Ol.options.ghostClass:this.options.ghostClass,!1),Fa(ul,this.options.chosenClass,!1),hl({sortable:this,name:"unchoose",toEl:pl,newIndex:null,newDraggableIndex:null,originalEvent:t}),gl!==pl?(xl>=0&&(hl({rootEl:pl,name:"add",toEl:pl,fromEl:gl,originalEvent:t}),hl({sortable:this,name:"remove",toEl:pl,originalEvent:t}),hl({rootEl:pl,name:"sort",toEl:pl,fromEl:gl,originalEvent:t}),hl({sortable:this,name:"sort",toEl:pl,originalEvent:t})),Ol&&Ol.save()):xl!==wl&&xl>=0&&(hl({sortable:this,name:"update",toEl:pl,originalEvent:t}),hl({sortable:this,name:"sort",toEl:pl,originalEvent:t})),nc.active&&(null!=xl&&-1!==xl||(xl=wl,Sl=Cl),hl({sortable:this,name:"end",toEl:pl,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){dl("nulling",this),gl=ul=pl=ml=fl=bl=vl=yl=Ml=Nl=jl=xl=Sl=wl=Cl=Tl=Pl=Ol=El=nc.dragged=nc.ghost=nc.clone=nc.active=null,Wl.forEach((function(t){t.checked=!0})),Wl.length=_l=Dl=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ul&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)Ha(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||sc(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];Ha(i,this.options.draggable,o,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Ha(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=ll.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Jl(n)},destroy:function(){dl("destroy",this);var t=this.el;t[il]=null,La(t,"mousedown",this._onTapStart),La(t,"touchstart",this._onTapStart),La(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(La(t,"dragover",this),La(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Vl.splice(Vl.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!yl){if(dl("hideClone",this),nc.eventCanceled)return;Ra(bl,"display","none"),this.options.removeCloneOnHide&&bl.parentNode&&bl.parentNode.removeChild(bl),yl=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(yl){if(dl("showClone",this),nc.eventCanceled)return;ul.parentNode!=gl||this.options.group.revertClone?fl?gl.insertBefore(bl,fl):gl.appendChild(bl):gl.insertBefore(bl,ul),this.options.group.revertClone&&this.animate(ul,bl),Ra(bl,"display",""),yl=!1}}else this._hideClone()}},ql&&Pa(document,"touchmove",(function(t){(nc.active||$l)&&t.cancelable&&t.preventDefault()})),nc.utils={on:Pa,off:La,css:Ra,find:Wa,is:function(t,e){return!!Ha(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:tl,closest:Ha,toggleClass:Fa,clone:nl,index:Za,nextTick:ac,cancelNextTick:lc,detectDirection:Zl,getChild:Xa,expando:il},nc.get=function(t){return t[il]},nc.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(nc.utils=xa(xa({},nc.utils),t.utils)),ll.mount(t)}))},nc.create=function(t,e){return new nc(t,e)},nc.version="1.15.3";var cc,dc,hc,uc,pc,mc,gc=[],fc=!1;function vc(){gc.forEach((function(t){clearInterval(t.pid)})),gc=[]}function bc(){clearInterval(mc)}var yc=tl((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,c=qa(),d=!1;dc!==n&&(dc=n,vc(),cc=e.scroll,i=e.scrollFn,!0===cc&&(cc=Ka(n,!0)));var h=0,u=cc;do{var p=u,m=Ua(p),g=m.top,f=m.bottom,v=m.left,b=m.right,y=m.width,w=m.height,x=void 0,C=void 0,S=p.scrollWidth,E=p.scrollHeight,O=Ra(p),M=p.scrollLeft,N=p.scrollTop;p===c?(x=y<S&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),C=w<E&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(x=y<S&&("auto"===O.overflowX||"scroll"===O.overflowX),C=w<E&&("auto"===O.overflowY||"scroll"===O.overflowY));var _=x&&(Math.abs(b-r)<=a&&M+y<S)-(Math.abs(v-r)<=a&&!!M),D=C&&(Math.abs(f-s)<=a&&N+w<E)-(Math.abs(g-s)<=a&&!!N);if(!gc[h])for(var A=0;A<=h;A++)gc[A]||(gc[A]={});gc[h].vx==_&&gc[h].vy==D&&gc[h].el===p||(gc[h].el=p,gc[h].vx=_,gc[h].vy=D,clearInterval(gc[h].pid),0==_&&0==D||(d=!0,gc[h].pid=setInterval(function(){o&&0===this.layer&&nc.active._onTouchMove(pc);var e=gc[this.layer].vy?gc[this.layer].vy*l:0,n=gc[this.layer].vx?gc[this.layer].vx*l:0;"function"==typeof i&&"continue"!==i.call(nc.dragged.parentNode[il],n,e,t,pc,gc[this.layer].el)||el(gc[this.layer].el,n,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&u!==c&&(u=Ka(u,!1)));fc=d}}),30),wc=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||i;s();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function xc(){}function Cc(){}xc.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=Xa(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:wc},Ea(xc,{pluginName:"revertOnSpill"}),Cc.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:wc},Ea(Cc,{pluginName:"removeOnSpill"}),nc.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?Pa(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Pa(document,"pointermove",this._handleFallbackAutoScroll):e.touches?Pa(document,"touchmove",this._handleFallbackAutoScroll):Pa(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?La(document,"dragover",this._handleAutoScroll):(La(document,"pointermove",this._handleFallbackAutoScroll),La(document,"touchmove",this._handleFallbackAutoScroll),La(document,"mousemove",this._handleFallbackAutoScroll)),bc(),vc(),clearTimeout(Va),Va=void 0},nulling:function(){pc=dc=cc=fc=mc=hc=uc=null,gc.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(pc=t,e||this.options.forceAutoScrollFallback||_a||Na||Aa){yc(t,this.options,r,e);var s=Ka(r,!0);!fc||mc&&o===hc&&i===uc||(mc&&bc(),mc=setInterval((function(){var r=Ka(document.elementFromPoint(o,i),!0);r!==s&&(s=r,vc()),yc(t,n.options,r,e)}),10),hc=o,uc=i)}else{if(!this.options.bubbleScroll||Ka(r,!0)===qa())return void vc();yc(t,this.options,Ka(r,!1),!1)}}},Ea(t,{pluginName:"scroll",initializeByDefault:!0})}),nc.mount(Cc,xc);const Sc={add:{attr:t=>{const e=window.prompt(t.message.attr);if(e&&t.isDisabled(e))return window.alert(l.get("attributeNotPermitted",e||"")),Ec.add.attrs(t);let n;e&&(n=String(window.prompt(t.message.value,"")),t.addAction(e,n))},option:t=>{t.addAction()},condition:t=>{t.addAction(t)}},click:{btn:t=>{t.action()}},save:{form:qi}},Ec={init:function(t){const e=Object.keys(Sc);return this.opts=e.reduce(((e,n)=>(e[n]={...Sc[n],...t[n]},e)),t),this},add:{attrs:t=>Ec.opts.add.attr(t),options:t=>Ec.opts.add.option(t),conditions:t=>(t.template={if:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],then:[{target:"",targetProperty:"",assignment:"",value:""}]},Ec.opts.add.condition(t))},click:{btn:t=>Ec.opts.click.btn(t)},save:{form:t=>(Ec.opts.sessionStorage&&Fi.set(T,t),Kr.formeoSaved({formData:t}),Ec.opts.save.form(t))}},Oc=Object.freeze({type:"field",displayType:"slider"}),Mc=t=>({transform:`translateX(${t?`${t}px`:0})`});class Nc{constructor(t){n(this,"toggleTabbedLayout",(()=>{this.getPanelDisplay();const t=this.isTabbed;return this.panelsWrap.parentElement.classList.toggle("tabbed-panels",t),t&&this.panelNav.removeAttribute("style"),t})),n(this,"resizePanels",(()=>{this.toggleTabbedLayout();const t=this.panelsWrap.style,e=kd.getStyle(this.currentPanel,"height");return t.height=e,e})),this.opts=$i(Oc,t),this.panelDisplay=this.opts.displayType,this.activePanelIndex=0,this.panelNav=this.createPanelNav();const e=this.createPanelsWrap();this.nav=this.navActions();const o=new window.ResizeObserver((([{contentRect:{width:t}}])=>{this.currentWidth!==t&&(this.toggleTabbedLayout(),this.currentWidth=t,this.nav.setTranslateX(this.activePanelIndex,!1))})),i=window.setTimeout((()=>{o.observe(e),window.clearTimeout(i)}),$)}getPanelDisplay(){const t=this.panelsWrap,e=parseInt(kd.getStyle(t,"width"))>390?"tabbed":"slider",n="auto"===this.opts.displayType;return this.panelDisplay=n?e:this.opts.displayType||Oc.displayType,this.panelDisplay}createPanelsWrap(){const t=kd.create({className:"panels",content:this.opts.panels.map((({config:{label:t},...e})=>e))});return"field"===this.opts.type&&this.sortableProperties(t),this.panelsWrap=t,this.panels=t.children,this.currentPanel=this.panels[this.activePanelIndex],t}sortableProperties(t){const e=this,n=t.getElementsByClassName("field-edit-group");return Gr.forEach(n,((t,n)=>{t.fieldId=e.opts.id,t.isSortable&&nc.create(t,{animation:150,group:{name:"edit-"+t.editGroup,pull:!0,put:["properties"]},sort:!0,handle:".prop-order",onSort:t=>{e.propertySave(t.to),e.resizePanels()}})}))}createPanelNavLabels(){const t=this.opts.panels.map((t=>({tag:"h5",action:{click:t=>{const e=Ir(t.target,t.target.parentElement);this.currentPanel=this.panels[e];const n=t.target.parentElement.childNodes;this.nav.refresh(e),kd.removeClasses(n,"active-tab"),t.target.classList.add("active-tab")}},content:t.config.label}))),e={className:"panel-labels",content:{content:t}},[n]=t;return n.className="active-tab",kd.create(e)}createPanelNav(){this.labels=this.createPanelNavLabels();const t={tag:"button",attrs:{className:"next-group",title:l.get("controlGroups.nextGroup"),type:"button"},dataset:{toggle:"tooltip",placement:"top"},action:{click:t=>this.nav.nextGroup(t)},content:kd.icon("triangle-right")},e={tag:"button",attrs:{className:"prev-group",title:l.get("controlGroups.prevGroup"),type:"button"},dataset:{toggle:"tooltip",placement:"top"},action:{click:t=>this.nav.prevGroup(t)},content:kd.icon("triangle-left")};return kd.create({tag:"nav",attrs:{className:"panel-nav"},content:[e,this.labels,t]})}get isTabbed(){return"tabbed"===this.panelDisplay}navActions(){const t={},e=this.currentPanel.parentElement,n=this.labels.firstChild,o=this.currentPanel.parentElement.childNodes;this.activePanelIndex=Ir(this.currentPanel,e);let i={nav:0,panel:0},r={...i};const s=t=>{const e=n.children;return kd.removeClasses(o,"active-panel"),kd.removeClasses(e,"active-tab"),this.currentPanel=o[t],this.currentPanel.classList.add("active-panel"),e[t].classList.add("active-tab"),this.currentPanel},a=({offset:t,reset:o,duration:i=z,animate:s=!this.isTabbed})=>{const a=[Mc(r.panel),Mc(t.panel)],l=[Mc(r.nav),Mc(this.isTabbed?0:t.nav)];if(o){const[t]=a,[e]=l;a.push(t),l.push(e)}const c={easing:"ease-in-out",duration:s?i:0,fill:"forwards"},d=e.animate(a,c);n.animate(l,c);const h=()=>{this.panelsWrap.style.height=kd.getStyle(this.currentPanel,"height"),d.removeEventListener("finish",h),o||(r=t)};d.addEventListener("finish",h)};return t.setTranslateX=(t,o=!0)=>{var r;r=t||this.activePanelIndex,i={nav:-n.offsetWidth*r,panel:-e.offsetWidth*r},a({offset:i,animate:o})},t.refresh=e=>{void 0!==e&&(this.activePanelIndex=e,s(e)),this.resizePanels(),t.setTranslateX(this.activePanelIndex,!1)},t.nextGroup=()=>{const t=this.activePanelIndex+1;if(t!==o.length){const e=s(t);i={nav:-n.offsetWidth*t,panel:-e.offsetLeft},a({offset:i}),this.activePanelIndex++}else i={nav:r.nav-8,panel:r.panel-8},a({offset:i,reset:!0});return this.currentPanel},t.prevGroup=()=>{if(0!==this.activePanelIndex){const t=this.activePanelIndex-1,e=s(t);i={nav:-n.offsetWidth*t,panel:-e.offsetLeft},a({offset:i}),this.activePanelIndex--}else i={nav:8,panel:8},a({offset:i,reset:!0})},t}}const _c="f-autocomplete",Dc="highlight-component";let Ac,kc=Date.now();const jc=({name:t,id:e,...n})=>["config.label","attrs.id","meta.id"].reduce(((t,e)=>(t||(t=n.get(e)),t)),null)||"external"===t&&((...t)=>l.get(t.join("."))||$r(t.join(" ")))(t,e);class Tc{constructor(t,e,n){this.key=t,this.className=t.replace(/\./g,"-"),this.value=e,this.events=[],this.i18nKey=n,this.build()}build(){const t=t=>{const e=this.list,n=this.getActiveOption();let o=new Map([[38,()=>{const t=this.getPreviousOption(n);t&&this.selectOption(t)}],[40,()=>{const t=this.getNextOption(n);t&&this.selectOption(t)}],[13,()=>{n&&(this.selectOption(n),this.setValue(n),"none"===e.style.display?this.showList(n):this.hideList()),t.preventDefault()}],[27,()=>{this.hideList()}]]).get(t.keyCode);return o||(o=()=>!1),o()},e={focus:({target:e})=>{this.updateOptions(),e.parentElement.classList.add(`${this.className}-focused`);const n=kd.toggleElementsByStr(this.list.querySelectorAll("li"),e.value);e.addEventListener("keydown",t);const o=this.list.querySelector(".active-option")||n[0];this.showList(o)},blur:({target:e})=>{e.parentElement.classList.remove(`${this.className}-focused`),e.removeEventListener("keydown",t),this.hideList()},input:t=>{const e=kd.toggleElementsByStr(this.list.querySelectorAll("li"),t.target.value);if(0===t.target.value.length&&this.clearValue(),0===e.length)this.hideList();else{const t=this.getActiveOption()||e[0];this.showList(t)}this.hiddenField.value=t.target.value,this.value=t.target.value,this.runEvent("onChange",{target:this.hiddenField})}};return this.displayField=kd.create({tag:"input",autocomplete:"off",action:e,attrs:{type:"text",className:`${_c}-display-field`,value:this.label||this.value,placeholder:l.get(`${this.i18nKey}.${this.key}.placeholder`)}}),this.hiddenField=kd.create({tag:"input",attrs:{type:"hidden",className:this.className,value:this.value}}),this.list=kd.create({tag:"ul",attrs:{className:`${_c}-list`}}),this.dom=kd.create({children:[this.displayField,this.hiddenField,this.list],className:this.className,action:{onRender:()=>{const t=this.value&&Dd.getAddress(this.value);this.label=t&&jc(t),this.label&&(this.displayField.value=this.label),this.updateOptions()}}}),this.dom}updateOptions(){const t=Date.now();t-kc>$&&(kd.empty(this.list),this.generateOptions(),kc=t);(Ac||this.generateOptions()).forEach((t=>this.list.appendChild(t)))}generateOptions(){const t=(t=>{const e=[],n=Dd.flatList();return Object.entries(n).map((([n,o])=>{const i=jc(o);if(i){const r={tag:"span",content:` ${$r(o.name)}`,className:"component-type"},s=`${o.name}.${i}`;e.push(s);const a=((t,e)=>t.reduce(((t,n)=>t+(n===e)),0))(e,s),l={tag:"span",content:a>1&&`(${a})`,className:"component-label-count"};return kd.makeOption([n,[`${i} `,l,r]],t)}})).filter(Boolean)})(),e=t=>{const e=`${_c}-list-item`;return t.classList.contains(e)||(t=t.parentElement),t};return Ac=t.map((t=>{const n=t.value;let[o]=t.label;o=o.trim();const i={tag:"li",children:t.label,dataset:{value:n,label:o},className:`${_c}-list-item`,action:{mousedown:({target:t})=>{t=e(t),this.setValue(t),this.selectOption(t),this.hideList()},mouseover:({target:t})=>{t=e(t),this.removeHighlight(),this.highlightComponent(t)}}};return kd.create(i)})),Ac}hideList(t=this.list){Xr.slideUp(t,z),this.removeHighlight()}showList(t,e=this.list){this.selectOption(t),Xr.slideDown(e,z)}getActiveOption(t=this.list){const e=t.getElementsByClassName("active-option")[0];return e&&"none"!==e.style.display?e:null}getPreviousOption(t){let e=t;do{e=e?e.previousSibling:null}while(null!=e&&"none"===e.style.display);return e}getNextOption(t){let e=t;do{e=e?e.nextSibling:null}while(null!=e&&"none"===e.style.display);return e}selectOption(t,e=this.list){const n=e.querySelectorAll("li");for(let o=0;o<n.length;o++){const{dataset:{value:t}}=n[o];if(n[o].classList.remove("active-option"),t){const e=Dd.getAddress(t);e.dom&&e.dom.classList.remove(Dc)}}t&&(t.classList.add("active-option"),this.highlightComponent(t))}removeHighlight(){const t=document.getElementsByClassName(Dc);for(let e=0;e<t.length;e++)t[e].classList.remove(Dc)}highlightComponent(t){const{dataset:{value:e}}=t;if(e){const t=Dd.getAddress(e);t.dom&&t.dom.classList.add(Dc)}}clearValue(){this.selectOption(null),this.displayField.value="",this.hiddenField.value="",this.value="",this.runEvent("onChange",{target:this.hiddenField})}setValue(t){const{label:e,value:n}=t.dataset;this.displayField.value=e,this.hiddenField.value=n,this.value=n,this.runEvent("onChange",{target:this.hiddenField})}addEvent(t,e){this.events.push([t,e])}runEvent(t,e){this.events.forEach((([n,o])=>{n===t&&o(e)}))}}const Pc=(t,e)=>{const n=(t=>{const e=Bi(t),n={"field.property":R,...B},o=e?(i=t,Dd.getAddress(i).getData()):n[t];var i;return Object.keys(o).reduce(((t,e)=>(t[e]=e,t)),{})})(t);return Object.entries(n).reduce(((n,[o,i])=>{if("id"!==o){const r={tag:"option",content:l.get(`${t}.${o}`)||o.toLowerCase(),attrs:{value:i}};e===i&&(r.attrs.selected=!0),n.push(kd.create(r))}return n}),[])},Lc=(t,e)=>{kd.empty(t),e.forEach((e=>t.add(e)))},zc=({key:t,value:e,type:n="text",checked:o})=>{const i={tag:"input",attrs:{type:n,value:e,placeholder:l.get(`${t}.placeholder`)||$r(t)},className:t.replace(/\./g,"-"),config:{}};return o&&(i.attrs.checked=!0),i},$c=t=>{const e=l.get(t);if(e)return e;const n=t.split(".");return l.get(n[n.length-1])},Hc={autocomplete:(t,e,n)=>new Tc(t,e,n),string:(t,e)=>zc({key:t,value:e}),boolean:(t,e)=>zc({key:t,value:e,type:"selected"===t?"radio":"checkbox",checked:e}),number:(t,e)=>zc({key:t,value:e,type:"number"}),array:(t,e=[])=>({tag:"select",attrs:{placeholder:$c(`placeholder.${t}`)},className:t.replace(/\./g,"-"),options:e}),object:t=>Object.entries(t).map((([t,e])=>Hc[kd.childType(e)](t,e)))},Vc=["selected","checked"],Ic={boolean:(t,e)=>({click:({target:{checked:n}})=>{var o,i;"radio"===(null==(i=null==(o=e.data)?void 0:o.attrs)?void 0:i.type)&&e.set("options",e.data.options.map((t=>({...t,selected:!1})))),e.set(t,n),e.updatePreview()}}),string:(t,e)=>({input:({target:{value:n}})=>{e.set(t,n)}}),number:(t,e)=>({input:({target:{value:n}})=>{e.set(t,Number(n)),e.updatePreview()}}),array:(t,e)=>({change:({target:{value:n}})=>{e.set(t,n),e.updatePreview()}}),object:()=>({})};class Fc{constructor({key:t,data:e,index:o,field:i}){n(this,"generateConditionFields",((t,e)=>{const n={tag:"label",className:`condition-label ${t}-condition-label`,content:l.get(t)||t};return e.map(((e,o)=>{const i=[],r=Object.entries(e).map((([e,n])=>{const r=this.conditionInput(e,n,t,o);return r&&i.push([r.className,n.trim()].filter(Boolean).join("-")),r})).filter(Boolean),s=Fr(r,F.map((t=>`condition-${t}`)),"className||dom.className");return this.processConditionUIState(s),o||s.unshift(n),this.itemFieldGroups.push(s),{children:s,className:`f-condition-row ${t}-condition-row ${i.join(" ")}`}}))})),n(this,"processConditionUIState",(t=>{const e=e=>(e=e.split("|"),t.filter((t=>e.includes(t.className)))),n=t=>{t=Array.isArray(t)?t:[t];const e=setTimeout((()=>{t.forEach((t=>{t.dom&&(t=t.dom),t.style.display="none"})),clearTimeout(e)}),L)},o=t=>{t=Array.isArray(t)?t:[t];const e=setTimeout((()=>{t.forEach((t=>{t.dom&&(t=t.dom),t.removeAttribute("style")})),clearTimeout(e)}),L)},i=new Map([["condition-source",t=>{const i=e("condition-sourceProperty"),r=i[0],s=Bi(t.value)?t.value:"field.property",a=Pc(s,r.value);return Lc(r,a),t.value?o(i):n(i)}],["condition-target",t=>{const i=e("condition-targetProperty");return Ri(t.value)&&t.value?o(i):n(i)}],["condition-sourceProperty",t=>{const i=e("condition-comparison|condition-targetProperty|condition-target"),r=t.value;return(t=>/^is|^has/.test(t))(r.substring(r.lastIndexOf(".")+1,r.length))?n(i):o(i)}]]);t.forEach((t=>{const e=i.get(t.className);e&&e(t)}))})),n(this,"conditionInput",((t,e,n,o)=>{const i=this.field,r=`${this.itemKey}.${n}.${o}`,s=`${this.field.id}.${r}`,a=`${i.name}s.${s}.${t}`,l=(t,e,n)=>{const o=Pc(n||t,e),i=Hc.array(`condition.${t}`);i.action={change:c,onRender:t=>c({target:t})};const r=kd.create(i);return Lc(r,o),r},c=({target:t})=>{const e=t.closest(".f-condition-row"),n=new RegExp(`${t.className}(?:\\S?)+`,"gm");e.className=e.className.replace(n,""),e.classList.add([t.className,t.value].filter(Boolean).join("-"));const o={dataPath:a,value:t.value,src:t};Kr.formeoUpdated(o),Dd.setAddress(a,t.value);const i=t.closest(".f-condition-row"),r=Ir(i);this.processConditionUIState(this.itemFieldGroups[r])},d={comparison:t=>l("comparison",t),logical:t=>l("logical",t),source:(t,e="source")=>{const o=Hc.autocomplete(`condition.${e}`,t,n);return Dd.setConditionMap(t,i),o.addEvent("onChange",(t=>{Dd.removeConditionMap(Dd.getAddress(a)),c(t),Dd.setConditionMap(t.target.value,i)})),o},sourceProperty:t=>l("sourceProperty",t,"field.property"),targetProperty:t=>l("targetProperty",t,"field.property"),target:t=>d.source(t,"target"),value:t=>{const e=Hc.string("condition.value",t);return e.action={input:c},kd.create(e)},assignment:t=>l("assignment",t)};if(d[t])return d[t](e)})),this.itemValues=Fr(Object.entries(e),Vc,"0");const[r,s]=t.split(".");this.field=i,this.itemKey=t,this.itemIndex=o,this.panelName=r,this.isDisabled=i.isDisabledProp(s,r),this.isHidden=this.isDisabled&&i.config.panels[r].hideDisabled,this.isLocked=i.isLockedProp(s,r),this.dom=kd.create({tag:"li",className:[`field-${t.replace(/\./g,"-")}`,"prop-wrap",this.isHidden&&"hidden-property"],children:{className:"field-prop",children:[this.itemInputs,this.itemControls]}})}get itemInputs(){this.itemFieldGroups=[];return{className:`${this.panelName}-prop-inputs prop-inputs f-input-group`,children:this.itemValues.map((([t,e])=>{let n="conditions"===this.panelName?this.generateConditionFields(t,e):this.itemInput(t,e);return["selected","checked"].includes(t)&&(n={className:"f-addon",children:n}),n}))}}get itemControls(){if(this.isLocked){return{className:`${this.panelName}-prop-controls prop-controls`,content:[]}}const t={tag:"button",attrs:{type:"button",className:"prop-remove prop-control"},action:{click:()=>{Xr.slideUp(this.dom,250,(t=>{this.field.remove(this.itemKey),kd.remove(t),this.field.resizePanelWrap()}))}},content:kd.icon("remove")};return{className:`${this.panelName}-prop-controls prop-controls`,content:[t]}}itemInput(t,e){const n=kd.childType(e)||"string",o=Object.assign({},{config:{},attrs:{}},Hc[n](t,e)),i=this.itemKey.replace(/.\d+$/,(e=>`${e}.${t}`)),r=i.split(".").filter(isNaN).join("."),[s,a]=[[...this.itemKey.split("."),t],[t]].map((t=>[this.field.id,...t].filter(Boolean).join("-")));return o.config=Object.assign({},o.config,{label:"options"!==this.panelName&&$c(r),labelAfter:!1}),o.attrs=Object.assign({},o.attrs,{name:"checkbox"===o.attrs.type?`${a}[]`:a,id:s,disabled:this.isDisabled,locked:this.isLocked}),o.action={...Ic[n](i,this.field)},o}}class Rc{constructor(t,e,o){n(this,"addAttribute",((t,e)=>{const n=Hr(t),o=`attrs.${n}`;l.current[o]||l.put(o,qr(t)),"string"==typeof e&&["true","false"].includes(e)&&(e=JSON.parse(e)),this.field.set(`attrs.${t}`,e);const i=this.props.querySelector(`.field-attrs-${n}`),r=new Fc({key:o,data:{[n]:e},field:this.field});i?this.props.replaceChild(r.dom,i):this.props.appendChild(r.dom),this.field.resizePanelWrap()})),n(this,"addOption",(()=>{const t=this.field.data.meta.id,e=this.field.get("options"),n="select"===t?"option":t,o=l.get("newOptionLabel",{type:n})||"New Option",i=`options.${this.data.length}`,r={...e.length?Tr(e[e.length-1]):{},label:o,value:Hr(o)},s=new Fc({key:i,data:r,field:this.field,index:this.props.children.length});this.editPanelItems.push(s),this.props.appendChild(s.dom),this.field.set(i,r),this.field.resizePanelWrap()})),n(this,"addCondition",(t=>{const e=`conditions.${this.field.get("conditions").length}`,n=this.props.querySelector(`.field-${e.replace(".","-")}`),o=new Fc({key:e,data:t.template,field:this.field});n?this.props.replaceChild(o.dom,n):this.props.appendChild(o.dom),this.field.set(e,t.template),this.field.resizePanelWrap()})),this.type=kd.childType(t),this.data="object"===this.type?Object.entries(t):t,this.name=e,this.field=o,this.panelConfig=this.getPanelConfig(this.data)}getPanelConfig(t){return this.props=this.createProps(t),this.editButtons=this.createEditButtons(),{id:`${this.field.id}-${this.name}-panel`,config:{label:l.get(`panel.label.${this.name}`)},attrs:{className:`f-panel ${this.name}-panel`},children:[this.props,this.editButtons]}}createProps(t){this.editPanelItems=Array.from(t).map(((t,e)=>{const n="array"===this.type,o=[this.name,n?String(e):t[0]].join("."),i=n?t:{[t[0]]:t[1]};return new Fc({key:o,data:i,field:this.field})}));const e={tag:"ul",attrs:{className:["field-edit-group",`field-edit-${this.name}`]},editGroup:this.name,isSortable:"options"===this.name,content:this.editPanelItems};return kd.create(e)}createEditButtons(){const t=this,e=this.name,n=l.get(`panelEditButtons.${e}`),o={attrs:t.addAttribute,options:t.addOption,conditions:t.addCondition};return{className:"panel-action-buttons",content:[{...kd.btnTemplate({content:n,title:n}),className:`add-${e}`,action:{click:n=>{const i={btnCoords:kd.coords(n.target),addAction:o[e]};"attrs"===e&&(i.isDisabled=t.field.isDisabledProp,i.isLocked=t.field.isLockedProp,i.message={attr:l.get(`action.add.${e}.attr`),value:l.get(`action.add.${e}.value`)});const r=$r(e),s=new window.CustomEvent(`onAdd${r}`,{detail:i});Ec.add[e](i),document.dispatchEvent(s)}}}]}}}class Bc extends ya{constructor(t,e={},o){super(t,{...e,id:e.id||zi()}),n(this,"mutationHandler",(t=>t.map((t=>{})))),n(this,"remove",(t=>{if(t){const e=t.split("."),n=e.pop(),o=this.get(e);return Array.isArray(o)?Vr(n)?o.splice(Number(n),1):this.set(e,o.filter((t=>t!==n))):delete o[n],o}if("stage"===this.name)return null;const e=this.parent,n=this.children;return Rr(n,(t=>t.remove())),this.dom.parentElement.removeChild(this.dom),((t,e)=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)})(Dd.getAddress(`${e.name}s.${e.id}.children`),this.id),e.children.length||e.emptyClass(),"row"===e.name&&e.autoColumnWidths(),Dd[`${this.name}s`].delete(this.id)})),n(this,"emptyClass",(()=>this.dom.classList.toggle("empty",!this.children.length))),n(this,"getComponentTag",(()=>kd.create({tag:"span",className:["component-tag",`${this.name}-tag`],children:[(this.isColumn||this.isField)&&kd.icon("component-corner",["bottom-left"]),kd.icon(`handle-${this.name}`),$r(this.name),(this.isColumn||this.isRow)&&kd.icon("component-corner",["bottom-right"])].filter(Boolean)}))),n(this,"removeClasses",(t=>{const e={string:()=>this.dom.classList.remove(t),array:()=>t.map((t=>this.dom.classList.remove(t)))};return e.object=e.string,e[kd.childType(t)](this.dom)})),n(this,"loadChildren",((t=this.data.children)=>t.map((t=>this.addChild({id:t}))))),n(this,"saveChildOrder",(()=>{if(this.render)return;const t=this.children.map((({id:t})=>t));return this.set("children",t),t})),n(this,"onSort",(()=>this.saveChildOrder())),n(this,"onEnd",(({to:{parentElement:t},from:{parentElement:e}})=>{null==t||t.classList.remove(`hovering-${Pi(t)}`),null==e||e.classList.remove(`hovering-${Pi(e)}`)})),n(this,"runConditions",(()=>{const t=this.get("conditions");if(!(null==t?void 0:t.length))return null;return t.map((t=>{const e=this.processConditions(t.if),n=this.processResults(t.then);return e.map((t=>this.evaluateConditions(t)&&this.execResults(n)))}))})),n(this,"value",((t,e)=>{const n=t.split("."),o=this.getComponent(t),i=o&&n.slice(2,n.length).join(".");return[!o,!i,!R[i]].some(Boolean)?t:e?o.set(R[i],e):o.get(R[i])})),n(this,"getResult",(t=>({"=":(t,e,n)=>t.set(e,n)}[t]))),n(this,"processResults",(t=>t.map((({operator:t,target:e,value:n})=>{const o=this.getComponent(e);return{target:o,propertyPath:o&&e.split(".").slice(2,e.length).join("."),action:this.getResult(t),value:this.value(n)}})))),n(this,"execResults",(t=>{const e=t.map((t=>this.execResult(t)));return Promise.all(e)})),n(this,"execResult",(({target:t,action:e,value:n,propertyPath:o})=>new Promise(((o,i)=>{try{return o(e(t,n))}catch(r){return i(r)}})))),n(this,"createChildWrap",(t=>kd.create({tag:"ul",attrs:{className:"children"},children:t}))),this.id=this.data.id,this.name=t,this.config=Dd[`${this.name}s`].config,$i(this.config,e.config),this.dataPath=`${this.name}s.${this.id}.`,this.observer=new MutationObserver(this.mutationHandler),this.render=o}observe(t){this.observer.disconnect(),this.observer.observe(t,{childList:!0})}get js(){return this.data}get json(){return this.data}empty(){const t=this.children.map((t=>t.remove()));return this.data.children=this.data.children.filter((e=>-1===t.indexOf(e))),this.dom.classList.add("empty"),t}getActionButtons(){const t=[`hovering-${this.name}`,"hovering"];return{className:[`${this.name}-actions`,"group-actions"],action:{mouseenter:({target:e})=>{Dd.stages.active.dom.classList.add(`active-hover-${this.name}`),this.dom.classList.add(...t)},mouseleave:({target:e})=>{this.dom.classList.remove(...t),Dd.stages.active.dom.classList.remove(`active-hover-${this.name}`),e.removeAttribute("style")}},children:[{...kd.btnTemplate({content:kd.icon(`handle-${this.name}`)}),className:["component-handle",`${this.name}-handle`]},{className:["action-btn-wrap",`${this.name}-action-btn-wrap`],children:this.buttons}]}}toggleEdit(t=!this.isEditing){this.isEditing=t;const e=this.dom,n="editing",o=`${n}-${this.name}`,i=this.dom.querySelector(`.${this.name}-edit`);Xr.slideToggle(i,L,t),"field"===this.name&&(Xr.slideToggle(this.preview,L,!t),e.parentElement.classList.toggle(`column-${o}`,t)),e.classList.toggle(n,t),e.classList.toggle(o,t)}get buttons(){const t=this;if(this.actionButtons)return this.actionButtons;const e={handle:(t=`handle-${this.name}`)=>({...kd.btnTemplate({content:kd.icon(t)}),className:["component-handle"]}),move:(t="move")=>({...kd.btnTemplate({content:kd.icon(t)}),className:["item-move"],meta:{id:"move"}}),edit:(e="edit")=>({...kd.btnTemplate({content:kd.icon(e)}),className:["item-edit-toggle"],meta:{id:"edit"},action:{click:e=>{t.toggleEdit()}}}),remove:(e="remove")=>({...kd.btnTemplate({content:kd.icon(e)}),className:["item-remove"],meta:{id:"remove"},action:{click:(e,n)=>{Xr.slideUp(t.dom,L,(()=>{if("column"===t.name){t.parent.autoColumnWidths(),t.remove()}else t.remove()}))}}}),clone:(t="copy")=>({...kd.btnTemplate({content:kd.icon(t)}),className:["item-clone"],meta:{id:"clone"},action:{click:()=>{this.clone(this.parent),"column"===this.name&&this.parent.autoColumnWidths()}}})},{buttons:n,disabled:o}=this.config.actionButtons,i=n.filter((t=>!o.includes(t))).map((t=>{var n;return(null==(n=e[t])?void 0:n.call(e))||t}));return this.actionButtons=i,this.actionButtons}get index(){return Ir(this.dom)}get parentType(){return A.get(this.name)}get parent(){const t=this.parentType;if(!this.dom||!t)return null;const e=this.dom.closest(`.${S[t]}`);return e&&kd.asComponent(e)}get children(){if(!this.dom)return[];const t=this.domChildren,e=D.get(this.name);return Br(t,(t=>Dd.getAddress(`${e}s.${t.id}`))).filter(Boolean)}get domChildren(){const t=this.dom.querySelector(".children");return t?t.children:[]}addChild(t={},e=this.domChildren.length){"object"!=typeof t&&(t={id:t});const n=this.dom.querySelector(".children"),{id:o=zi()}=t,i=D.get(this.name);if(!i)return null;const r=`${i}s`,s=Dd.getAddress(`${r}.${o}`)||Dd[r].add(o,t);n.insertBefore(s.dom,n.children[e]);const a=s.get("children");return(null==a?void 0:a.length)&&s.loadChildren(a),this.removeClasses("empty"),this.saveChildOrder(),s}onAdd({from:t,to:e,item:n,newIndex:o}){var i;const r=this;t.classList.contains(h)||(t=t.parentElement);const s=Pi(t),a=Pi(e.parentElement),l=new Map([[-2,()=>{const t=r.addChild({},o).addChild();return t.addChild.bind(t)}],[-1,()=>{const t=r.addChild({},o);return t.addChild.bind(t)}],[0,()=>r.addChild.bind(r)],[1,t=>{const e=Ir(r.dom);return()=>r.parent.addChild(t,e+1)}],[2,t=>()=>r.parent.parent.addChild(t)]]),c={controls:()=>{const{controlData:t}=sd.get(n.id),{meta:{id:e}}=t,i=e.startsWith("layout-")?e.replace(/^layout-/,""):"field",s=kr({stage:{row:0,column:-1,field:-2},row:{row:1,column:0,field:-1},column:{row:2,column:1,field:0},field:1},`${r.name}.${i}`),a=l.get(s)();kd.remove(n);return a(t,o)},row:()=>{const t=(l.get({stage:-1,row:0,column:1}[a])||qi)();return null==t?void 0:t({id:n.id},o)},column:()=>{const t=(l.get({stage:-2,row:-1}[a])||qi)();return null==t?void 0:t(n.id)}},d=null==(i=c[s])?void 0:i.call(c,n,o);return r.saveChildOrder(),r.removeClasses("empty"),d}onRemove({from:{parentElement:t}}){return t.classList.contains(m)&&t.classList.remove("column-editing-field"),"stage"===this.name||this.children.length?(this.emptyClass(),this.saveChildOrder()):this.remove()}onRender(){const{events:t}=this.config;if(!t)return null;t.onRender&&kd.onRender(this.dom,t.onRender)}set config(t){const e=kr(this.data,"meta.id"),n=[kr(t,"all"),e&&kr(t,e),kr(t,this.id)].reduce(((t,e)=>e?$i(t,e):t),this.configVal);this.configVal=n}get config(){return this.configVal}getComponent(t){const[e,n]=t.split("."),o=Dd[e];return n===this.id?this:null==o?void 0:o.get(n)}cloneData(){const t={...Hi(this.data),id:zi()};return"field"!==this.name&&(t.children=[]),t}clone(t=this.parent){const e=t.addChild(this.cloneData(),this.index+1);return"field"!==this.name&&this.cloneChildren(e),e}cloneChildren(t){this.children.forEach((e=>null==e?void 0:e.clone(t)))}get isRow(){return this.name===x.row}get isColumn(){return this.name===x.column}get isField(){return this.name===x.field}}class Wc extends Bc{constructor(t=Object.create(null)){super("field",{conditions:[{if:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],then:[{target:"",targetProperty:"",assignment:"",value:""}]}],...t}),n(this,"updateConditionsPanel",(()=>{const t=setTimeout((()=>{const e=this.editPanels.find((({name:t})=>"conditions"===t));if(!e)return null;const n=e.createProps(),o=this.dom.querySelector(".field-edit-conditions");o.parentElement.replaceChild(n,o),clearTimeout(t)}),L)})),n(this,"updatePreview",Wi((()=>{if(!this.preview.parentElement)return null;this.updateLabel();const t=kd.create(this.fieldPreview(),!0);this.preview.parentElement.replaceChild(t,this.preview),this.preview=t}),L)),n(this,"isDisabledProp",((t,e="attrs")=>{const n=this.config.panels[e];if(!n)return!1;return n.disabled.concat(this.get(`config.disabled${$r(e)}`)).includes(t)})),n(this,"isLockedProp",((t,e="attrs")=>{const n=this.config.panels[e];if(!n)return!1;return n.locked.concat(this.get(`config.locked${$r(e)}`)).includes(t)})),this.label=kd.create(this.labelConfig),this.preview=kd.create(this.fieldPreview()),this.editPanels=[];const e=this.getActionButtons(),o=this.actionButtons.some((t=>{var e;return"edit"===(null==(e=t.meta)?void 0:e.id)}));let i={tag:"li",attrs:{className:g},id:this.id,children:[this.label,this.getComponentTag(),e,o&&this.fieldEdit,this.preview].filter(Boolean),panelNav:this.panelNav,dataset:{hoverTag:l.get("field")}};i=kd.create(i),this.observe(i),this.dom=i,this.isEditing=!1,this.onRender(i)}get labelConfig(){if(!!this.get("config.hideLabel"))return;const t=this.get("config.editorLabel")||this.get("config.label"),e=this.get("attrs.required"),n=this.config.label.disableHTML;return{className:"prev-label",children:[{...(()=>{const e={tag:"label",attrs:{}};return n?(e.tag="input",e.attrs.value=t,e):(e.attrs.contenteditable=!0,e.children=t,e)})(),action:{input:({target:{innerHTML:t,innerText:e,value:o}})=>{super.set("config.label",n?o:t);const i=Dd.getConditionMap(`fields.${this.id}`);if(i)return i.updateConditionSourceLabel(`${this.name}s.${this.id}`,n?o:e)}}},e&&kd.requiredMark()]}}updateConditionSourceLabel(t,e){const n=this.editPanels.find((({name:t})=>"conditions"===t));if(!n)return null;n.editPanelItems.forEach((({itemFieldGroups:n})=>{n.forEach((n=>{const o=n.find((e=>e.value===t));o&&(o.displayField.value=e)}))}))}set(...t){const[e,n]=t,o=super.set(e,n);return this.updatePreview(),o}updateLabel(){if(!this.label)return null;const t=kd.create(this.labelConfig);this.label.parentElement.replaceChild(t,this.label),this.label=t}get fieldEdit(){this.editPanels=[];const t=["object","array"],e=["config","meta","action","events",...this.config.panels.disabled],n={className:["field-edit","slide-toggle","formeo-panels-wrap"]};Li([...this.config.panels.order,...Object.keys(this.data)]).filter((t=>!e.includes(t))).forEach((e=>{const n=this.get(e),o=kd.childType(n);if(t.includes(o)){const t=new Rc(n,e,this);this.editPanels.push(t)}}));const o={panels:this.editPanels.map((({panelConfig:t})=>t)),id:this.id,displayType:"auto"},i=this.editPanels.length;return i&&(this.panels=new Nc(o),n.className.push(`panel-count-${i}`),n.content=[this.panels.panelNav,this.panels.panelsWrap],this.panelNav=this.panels.nav,this.resizePanelWrap=this.panels.nav.refresh,n.action={onRender:()=>{if(this.resizePanelWrap(),!i){const t=this.dom,e=t.querySelector(".item-edit-toggle"),n=t.querySelector(".field-actions"),o=n.getElementsByTagName("button");n.style.maxWidth=o.length*o[0].clientWidth+"px",kd.remove(e)}}}),n}fieldPreview(){var t;const e=Hi(this.data);e.id=`prev-${this.id}`,(null==(t=this.data)?void 0:t.config.editableContent)&&(e.attrs={...e.attrs,contenteditable:!0});return{attrs:{className:"field-preview",style:this.isEditing&&"display: none;"},content:kd.create(e,!0),action:{change:t=>{const{target:e}=t,{checked:n,type:o}=e;if(["checkbox","radio"].includes(o)){const t=+e.id.split("-").pop();"radio"===o&&this.set("options",this.get("options").map((t=>({...t,selected:!1}))));const i="checkbox"===o?"checked":"selected";this.set(`options.${t}.${i}`,n)}},click:t=>{"true"===t.target.contentEditable&&t.preventDefault()},input:t=>{["input","meter","progress","button"].includes(this.data.tag)&&super.set("attrs.value",t.target.value),t.target.contentEditable&&super.set("content",t.target.innerHTML)}}}}}const qc={js:[],css:[]},Uc=t=>new Promise(((e,n)=>{if(qc.js.includes(t))return e(t);const o=kd.create({tag:"script",attrs:{type:"text/javascript",async:!0,src:`//${(void 0).src}`},action:{load:()=>{qc.js.push(t),e(t)},error:()=>n(new Error(`${(void 0).src} failed to load.`))}}),i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(o,i)})),Gc=t=>{const e=(t=Array.isArray(t)?t:[t]).map((t=>new Promise(((e,n)=>{if(qc.css.includes(t))return e(t);const o=kd.create({tag:"link",attrs:{rel:"preload",href:t,as:"style"},action:{load:function n(){this.removeEventListener("load",n),this.rel="stylesheet",qc.css.push(t),e(t)},error:()=>n(new Error(`${(void 0).src} failed to load.`))}});document.head.appendChild(o)}))));return Promise.all(e)},Xc=t=>("string"==typeof t?Promise.resolve(t):t.text()).then((t=>{const e="formeo-sprite";let n=document.getElementById(e);return n||(n=kd.create({id:e,children:t,attrs:{hidden:!0,style:"display: none;"}}),document.body.insertBefore(n,document.body.childNodes[0])),n})),Yc=(t,e,n=Ui)=>new Promise(((o,i)=>fetch(t).then((t=>o(e?e(t):t))).catch((t=>i(new Error(n(t))))))),Zc={js:Uc,css:Gc};class Jc{constructor({events:t={},dependencies:e={},...o}={}){n(this,"parsedHtml",(t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.textContent})),this.events=t,this.controlData=o,this.depsLoaded=this.fetchDependencies(e)}onRenderPreview(){}fetchDependencies(t,e=!0){const n=Object.entries(t).map((([t,e])=>Zc[t](e)));return Promise.all(n)}on(t){const e={prerender:qi,renderComponent:qi,render:t=>{const e=()=>{this.onRender&&this.onRender(t)};this.depsLoaded.then((()=>{e()}))}};return t?e[t]:e}static i18n(t,e){const n=this.definition;let o=n.i18n||{};o=o[o.locale]||o.default||o;const i="object"==typeof o?o[t]:o;if(i)return i;let r=n.i18n;return"object"==typeof r&&(r=r[t]),o.get(r,e)}}const Kc=[{config:{label:"row"},meta:{group:"layout",icon:"rows",id:"layout-row"}},{config:{label:"column"},meta:{group:"layout",icon:"columns",id:"layout-column"}}];const Qc=(t,e=3)=>Array.from({length:e},((t,e)=>e+1)).map((e=>{const n="checkbox"===t?"checked":"selected";return{label:l.get("labelCount",{label:$r(t),count:e}),value:`${t}-${e}`,[n]:!e}}));const td=[class extends Jc{constructor(){super({tag:"button",attrs:{className:[{label:"grouped",value:"f-btn-group"},{label:"ungrouped",value:"f-field-group"}]},config:{label:l.get("controls.form.button"),hideLabel:!0},meta:{group:"common",icon:"button",id:"button"},options:[{label:l.get("button"),type:["button","submit","reset"].map(((t,e)=>({label:t,type:t}))),className:[{label:"default",value:"",selected:!0},{label:"primary",value:"primary"},{label:"danger",value:"error"},{label:"success",value:"success"},{label:"warning",value:"warning"}]}]})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"date",required:!1,className:""},config:{label:l.get("controls.form.input.date")},meta:{group:"common",icon:"calendar",id:"date-input"}})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"hidden",value:""},config:{label:l.get("hidden"),hideLabel:!0},meta:{group:"common",icon:"hidden",id:"hidden"}})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"number",required:!1,className:""},config:{label:l.get("number")},meta:{group:"common",icon:"hash",id:"number"}})}},class extends Jc{constructor(){super({tag:"textarea",config:{label:l.get("controls.form.textarea")},meta:{group:"common",icon:"textarea",id:"textarea"},attrs:{required:!1}})}},class extends Jc{constructor(){super({tag:"input",attrs:{required:!1,type:"text",className:""},config:{label:l.get("controls.form.input.text")},meta:{group:"common",icon:"text-input",id:"text-input"}})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"file",required:!1},config:{label:l.get("fileUpload")},meta:{group:"common",icon:"upload",id:"upload"}})}},class extends Jc{constructor(){super({tag:"select",config:{label:l.get("controls.form.select")},attrs:{required:!1,className:""},meta:{group:"common",icon:"select",id:"select"},options:Qc("option")})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"checkbox",required:!1},config:{label:l.get("controls.form.checkbox-group"),disabledAttrs:["type"]},meta:{group:"common",icon:"checkbox",id:"checkbox"},options:Qc("checkbox",1)})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"radio",required:!1},config:{label:l.get("controls.form.radio-group"),disabledAttrs:["type"]},meta:{group:"common",icon:"radio-group",id:"radio"},options:Qc("radio")})}}],ed=Array.from(Array(5).keys()).slice(1).map((t=>`h${t}`)),nd="controls.html.header";const od=[class extends Jc{constructor(){super({tag:ed[0],attrs:{tag:ed.map(((t,e)=>({label:t.toUpperCase(),value:t,selected:!e}))),className:""},config:{label:l.get(nd),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"header",id:"html.header"},content:l.get(nd)})}static get definition(){return{i18n:{header:"Header222"}}}get content(){return super.i18n(nd)}},class extends Jc{constructor(){super({tag:"p",attrs:{className:""},config:{label:l.get("controls.html.paragraph"),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"paragraph",id:"paragraph"},content:"Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment."})}},class extends Jc{constructor(){super({tag:"hr",config:{label:l.get("controls.html.divider"),hideLabel:!0},meta:{group:"html",icon:"divider",id:"divider"}})}},class extends Jc{constructor(){super({tag:"textarea",config:{label:"WYSIWYG",editableContent:!0},meta:{group:"html",icon:"rich-text",id:"tinymce"},attrs:{required:!1},action:{onRender:t=>{t.id&&(this.textareaID=t.id,window.tinymce.remove("textarea#"+t.id),window.tinymce.init({selector:"textarea#"+t.id}))}}})}}],id=Object.freeze({sortable:!0,elementOrder:{},groupOrder:[],groups:[{id:"layout",label:"controls.groups.layout",elementOrder:["row","column"]},{id:"common",label:"controls.groups.form",elementOrder:["button","checkbox"]},{id:"html",label:"controls.groups.html",elementOrder:["header","block-text"]}],disable:{groups:[],elements:[],formActions:[]},elements:[],container:null,panels:{displayType:"slider"}}),rd=[...td,...od,...Kc];const sd=new class{constructor(){n(this,"applyControlEvents",(({clone:t})=>{const e=t.querySelector("button");Object.keys(this.controlEvents).map((t=>e.addEventListener(t,this.controlEvents[t])))})),n(this,"groupLabel",(t=>l.get(t)||t||"")),n(this,"addElement",(t=>{const e=kr(this.get(t),"controlData"),{meta:{group:n,id:o}}=e,i={row:()=>Cd.active.addChild(),column:()=>i.row().addChild(),field:t=>i.column().addChild(t)};return"layout"!==n?i.field(e):i[o.replace("layout-","")]()})),n(this,"applyOptions",((t={})=>{const{container:e,elements:n,groupOrder:o,...i}=$i(id,t);this.container=e,this.groupOrder=Li(o.concat(["common","html","layout"])),this.elements=n.concat(rd),this.options=i})),this.data=new Map,this.controlEvents={focus:({target:t})=>{const e=t.closest(`.${h}`);return e&&this.panels.nav.refresh(Ir(e))},click:({target:t})=>this.addElement(t.parentElement.id)}}init(t,e=!1){return this.applyOptions(t),this.registerControls(),this.buildDOM(e),this}registerControls(){return this.controls=this.elements.map((t=>{const e="function"==typeof t,n=e?new t:new Jc(t),{controlData:{meta:o,config:i}}=n,r=e?i.label:l.get(i.label)||i.label,{id:s}=this.add(n),a={tag:"button",attrs:{type:"button"},content:[{tag:"span",className:"control-icon",children:kd.icon(o.icon)},r],action:this.controlEvents};return n.dom=kd.create({tag:"li",id:s,className:["field-control",`${o.group}-control`,`${o.id}-control`],content:a,meta:o}),n.dom})),this.controls}groupElements(){let t=this.options.groups.slice(),e=this.controls.slice(),n=[];const o=[];return t=Fr(t,this.groupOrder,"id"),t=t.filter((t=>Ti(t.id,this.options.disable.groups))),n=t.map((t=>{const n={tag:"ul",attrs:{className:h,id:`${t.id}-${h}`},config:{label:this.groupLabel(t.label)}};if(this.options.elementOrder[t.id]){const e=this.options.elementOrder[t.id],n=Li(e.concat(t.elementOrder));t.elementOrder=n}return e=Fr(e,t.elementOrder,"meta.id"),n.content=e.filter((e=>{const{controlData:n}=this.get(e.id),i=n.meta.id||"";let r=!0;return r=[Ti(i,this.options.disable.elements),n.meta.group===t.id,!o.includes(n.meta.id)].every((t=>!0===t)),r&&o.push(i),r})),n})),n}add(t=Object.create(null)){const{id:e,...n}=t,o=e||zi(),i=Hi(n);return this.data.set(o,i),{id:o,...i}}get(t){return this.data.get(t)}formActions(){if(!0===this.options.disable.formActions)return null;const t={...kd.btnTemplate({content:[kd.icon("bin"),l.get("clear")],title:l.get("clearAll")}),className:["clear-form"],action:{click:t=>{Sd.size?(Kr.confirmClearAll=new window.CustomEvent("confirmClearAll",{detail:{confirmationMessage:l.get("confirmClearAll"),clearAllAction:()=>{Cd.clearAll().then((()=>{const e={src:t.target};Kr.formeoCleared(e)}))},btnCoords:kd.coords(t.target)}}),document.dispatchEvent(Kr.confirmClearAll)):window.alert(l.get("cannotClearFields"))}}},e={...kd.btnTemplate({content:[kd.icon("floppy-disk"),l.get("save")],title:l.get("save")}),className:["save-form"],action:{click:({target:t})=>{const{formData:e}=Dd,n={action:()=>{},coords:kd.coords(t),message:"",button:t};return Ec.click.btn(n),Ec.save.form(e)}}};return{className:"form-actions f-btn-group",content:Object.entries({clearBtn:t,saveBtn:e}).reduce(((t,[e,n])=>(this.options.disable.formActions.includes(e)||t.push(n),t)),[])}}buildDOM(t){const e=this.groupElements(),n=this.formActions(),{displayType:o}=this.options.panels;this.panels=new Nc({panels:e,type:"controls",displayType:o});const i=["control-groups","formeo-panels-wrap",`panel-count-${e.length}`],r=kd.create({className:i,content:[this.panels.panelNav,this.panels.panelsWrap]});let s="formeo-controls";t&&(s+=" formeo-sticky");const a=kd.create({className:s,content:[r,n]}),c=a.getElementsByClassName("control-group");this.dom=a,this.groups=c;const[d]=c;this.currentGroup=d,this.actions={filter:t=>{const e=""!==t,n=this.controls;let o=r.querySelector(".filtered-term");if(kd.toggleElementsByStr(n,t),e){const e=l.get("controls.filteringTerm",t);a.classList.add("filtered"),o?o.textContent=e:(o=kd.create({tag:"h5",className:"filtered-term",content:e}),r.insertBefore(o,r.firstChild))}else o&&(a.classList.remove("filtered"),o.remove())},addElement:this.addElement,addGroup:t=>{}};for(let l=c.length-1;l>=0;l--){const t=`formeo-controls-${c[l]}`;this.options.sortable||window.localStorage.removeItem(t),nc.create(c[l],{animation:150,forceFallback:!0,fallbackClass:"control-moving",fallbackOnBody:!0,group:{name:"controls",pull:"clone",put:!1},onRemove:this.applyControlEvents,onStart:({item:t})=>{const{controlData:e}=this.get(t.id);this.options.ghostPreview&&(t.innerHTML="",t.appendChild(new Wc(e).preview))},sort:this.options.sortable,store:{get:()=>{const e=window.localStorage.getItem(t);return e?e.split("|"):[]},set:e=>{const n=e.toArray();window.localStorage.setItem(t,n.join("|"))}}})}return a}};class ad extends ya{constructor(){super(...arguments),n(this,"load",((t=Object.create(null))=>(this.empty(),"string"==typeof t&&(t=JSON.parse(t)),Object.entries(t).forEach((([t,e])=>this.add(t,e))),this.data))),n(this,"get",(t=>t?kr(this.data,t):this.add())),n(this,"add",((t,e=Object.create(null))=>{const n=t||zi(),o=this.Component({...e,id:n});return this.set(n,o),this.active=o,o})),n(this,"remove",(t=>(Array.isArray(t)?t.forEach((t=>{this.get(t).remove()})):this.get(t).remove(),this.data))),n(this,"delete",(t=>(delete this.data[t],t))),n(this,"clearAll",((t=!0)=>{const e=Object.values(this.data).map((e=>e.empty(t)));return Promise.all(e)})),n(this,"conditionMap",new Map)}set config(t){this.configVal=$i(this.configVal,Hi(t))}get config(){return this.configVal}}class ld extends Bc{constructor(t,e){super("stage",{...Object.freeze({children:[]}),...t},e);const n=this.createChildWrap();this.dom=kd.create({attrs:{className:[u,"empty"],id:this.id},children:n}),this.sortable=nc.create(n,{animation:150,fallbackClass:"row-moving",forceFallback:!0,group:{name:"stage",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onAdd:this.onAdd.bind(this),onRemove:this.onRemove.bind(this),onStart:()=>{cd.active=this},onSort:this.onSort.bind(this),draggable:`.${p}`,handle:".item-move"})}empty(t=!0){return new Promise((e=>{t?(this.dom.classList.add("removing-all-fields"),Xr.slideUp(this.dom,L,(()=>{e(super.empty(t)),this.dom.classList.remove("removing-all-fields"),Xr.slideDown(this.dom,L)}))):e(super.empty())}))}onAdd(...t){const e=super.onAdd(...t);e&&"column"===e.name&&e.parent.autoColumnWidths()}}const cd=new class extends ad{constructor(t){super("stages",t)}Component(t){return new ld(t)}};class dd extends Bc{constructor(t){super("row",{...Object.freeze({config:{fieldset:!1,legend:"",inputGroup:!1},children:[],className:[p]}),...t}),n(this,"autoColumnWidths",(()=>{const t=this.children;if(!t.length)return;const e=Number.parseFloat((100/t.length).toFixed(1))/1;for(const n of t){n.removeClasses(q);const t=n.dom,o=Ii(e);n.set("config.width",o),t.style.width=o,t.dataset.colWidth=o;const i=setTimeout((()=>{clearTimeout(i),n.refreshFieldPanels()}),z);document.dispatchEvent(Kr.columnResized)}this.updateColumnPreset()})),n(this,"updateColumnPreset",(()=>{this.columnPresetControl.innerHTML="";const t=this.getColumnPresetOptions.map((({label:t,...e})=>kd.create({tag:"option",content:t,attrs:e})));this.columnPresetControl.append(...t)})),n(this,"setColumnWidths",(t=>{"string"==typeof t&&(t=t.split(",")),this.children.forEach(((e,n)=>{e.setWidth(`${t[n]}%`),e.refreshFieldPanels()}))}));const e=this.createChildWrap();this.dom=kd.create({tag:"li",className:[p,"empty"],dataset:{hoverTag:l.get("row"),editingHoverTag:l.get("editing.row")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),this.editWindow,e]}),this.sortable=nc.create(e,{animation:150,fallbackClass:"column-moving",forceFallback:!0,group:{name:"row",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onRemove:this.onRemove.bind(this),onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),draggable:`.${m}`,handle:".item-move"})}get editWindow(){const t={tag:"input",id:`${this.id}-fieldset`,attrs:{type:"checkbox",checked:this.get("config.fieldset"),ariaLabel:l.get("row.settings.fieldsetWrap.aria")},action:{click:({target:{checked:t}})=>{this.set("config.fieldset",Boolean(t))}},config:{label:l.get("row.settings.fieldsetWrap")}},e={tag:"input",id:`${this.id}-inputGroup`,attrs:{type:"checkbox",checked:this.get("config.inputGroup"),ariaLabel:l.get("row.settings.inputGroup.aria")},action:{click:({target:{checked:t}})=>this.set("config.inputGroup",t)},config:{label:l.get("row.makeInputGroup"),description:l.get("row.makeInputGroupDesc")}},n={className:"input-group",content:{tag:"input",attrs:{type:"text",ariaLabel:"Legend for fieldset",value:this.get("config.legend"),placeholder:"Legend"},action:{input:({target:{value:t}})=>this.set("config.legend",t)},className:""}},o=kd.formGroup([t,n]),i={tag:"label",content:l.get("defineColumnWidths"),className:"col-sm-4 form-control-label"};this.columnPresetControl=kd.create(this.columnPresetControlConfig);const r={className:"col-sm-8",content:this.columnPresetControl,action:{onRender:()=>{this.updateColumnPreset()}}},s=[e,"hr",o,"hr",kd.formGroup([i,r],"row")];return kd.create({className:`${this.name}-edit group-config`,action:{onRender:t=>{const e=s.map((t=>kd.create(t)));t.append(...e)}}})}onAdd(...t){super.onAdd(...t),this.autoColumnWidths()}onRemove(...t){super.onRemove(...t),this.autoColumnWidths()}get getColumnPresetOptions(){const t=this.children,e=k.get(t.length-1)||[],n=t.map((t=>{const e=t.get("config.width")||"";return Number(e.replace("%","")).toFixed(1)})).join(",");if(e.length){const t=e.slice();return!t.find((t=>t.value===n))&&t.push({value:n,label:n.replace(/,/g," | "),className:f}),t.map((t=>{const e={...t};return e.selected=t.value===n,e}))}return[]}get columnPresetControlConfig(){return{tag:"select",attrs:{ariaLabel:l.get("defineColumnLayout"),className:v},action:{change:({target:t})=>{const{value:e}=t;this.setColumnWidths(e)}},options:this.getColumnPresetOptions}}}const hd={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]}};const ud=new class extends ad{constructor(t){super("rows",t),this.config={all:hd}}Component(t){return new dd(t)}};class pd{constructor(){this.onMove=this.onMove.bind(this),this.onStop=this.onStop.bind(this),this.cleanup=this.cleanup.bind(this)}getRowWidth(t){const e=t.querySelector(".children");if(!e)return 0;const n=e.children.length,o=kd.getStyle(e,"gap")||"0px",i=parseFloat(o,10)||0;return this.totalGapWidth=i*(n-1),e.offsetWidth-this.totalGapWidth}validateResizeTarget(t,e){return t&&e&&t.offsetWidth&&e.offsetWidth}onStart(t){if(t.preventDefault(),this.resized=!1,0!==t.button)return;const e=t.target.parentElement,n=e.nextSibling||e.previousSibling,o=e.closest(`.${p}`);if(this.validateResizeTarget(e,n))if(this.startX="touchstart"===t.type?t.touches[0].clientX:t.clientX,o.classList.add(b),this.columnPreset=o.querySelector(`.${v}`),this.originalColumnClass=e.className,this.originalSiblingClass=n.className,e.className=e.className.replace(q,""),n.className=n.className.replace(q,""),this.colStartWidth=e.offsetWidth,this.sibStartWidth=n.offsetWidth,this.rowWidth=this.getRowWidth(o),this.rowWidth<=0)this.cleanup();else{this.column=e,this.sibling=n,this.row=o;try{window.addEventListener("pointermove",this.onMove,!1),window.addEventListener("pointerup",this.onStop,!1)}catch(i){this.cleanup()}}else this.cleanup()}calculateNewWidths(t){const e=this.colStartWidth+t-this.startX,n=this.sibStartWidth-t+this.startX,o=parseFloat(Vi(e,this.rowWidth)),i=parseFloat(Vi(n,this.rowWidth));return o<10||i<10?null:{colWidth:Ii(o.toFixed(1)),siblingColWidth:Ii(i.toFixed(1))}}onMove(t){t.preventDefault();const{column:e,sibling:n}=this,o="touchmove"===t.type?t.touches[0].clientX:t.clientX,i=this.calculateNewWidths(o);if(!i)return;const{colWidth:r,siblingColWidth:s}=i;e.dataset.colWidth=r,n.dataset.colWidth=s,e.style.width=r,n.style.width=s,this.resized=!0}onStop(){const{column:t,sibling:e}=this;window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop),this.resized&&(this.setCustomWidthValue(),Dd.setAddress(`columns.${t.id}.config.width`,t.dataset.colWidth),Dd.setAddress(`columns.${e.id}.config.width`,e.dataset.colWidth),this.row.classList.remove(b),this.resized=!1,this.cleanup())}cleanup(){this.column&&this.originalColumnClass&&(this.column.className=this.originalColumnClass),this.sibling&&this.originalSiblingClass&&(this.sibling.className=this.originalSiblingClass),this.row&&this.row.classList.remove(b),window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop)}setCustomWidthValue(){const t=this.columnPreset;let e=t.querySelector(`.${f}`);const n=this.row.querySelector(".children").children,o=Br(n,(t=>Vi(t.clientWidth,this.rowWidth).toFixed(1))),i=o.join(","),r=o.join(" | ");return e||(e=kd.create({tag:"option",attrs:{className:f,value:i,selected:!0},content:r}),t.append(e)),e.value=i,e.textContent=r,i}}const md=t=>({className:"resize-x-handle",action:{pointerdown:t.onStart.bind(t)},content:[kd.icon("triangle-down"),kd.icon("triangle-up")]}),gd=()=>({className:"column-edit group-config"});class fd extends Bc{constructor(t){super("column",{...Object.freeze({config:{width:"100%"},children:[],className:[m]}),...t}),n(this,"refreshFieldPanels",(()=>{this.children.forEach((t=>t.panels.nav.refresh()))})),n(this,"setWidth",(t=>(this.dom.dataset.colWidth=t,this.dom.style.width=t,this.set("config.width",t))));const e=this.createChildWrap();this.dom=kd.create({tag:"li",className:[m,"empty"],dataset:{hoverTag:l.get("column")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),gd(),md(new pd),e]}),this.processConfig(this.dom),Kr.columnResized=new window.CustomEvent("columnResized",{detail:{column:this.dom,instance:this}}),this.sortable=nc.create(e,{animation:150,fallbackClass:"field-moving",forceFallback:!0,group:{name:"column",pull:!0,put:["column","controls"]},sort:!0,disabled:!1,onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),onRemove:this.onRemove.bind(this),onMove:t=>{t.from!==t.to&&t.from.classList.remove("hovering-column")},draggable:`.${g}`,handle:".item-move"})}processConfig(t){const e=Gr.get(this.data,"config.width");e&&(t.dataset.colWidth=e,t.style.width=e)}}const vd={actionButtons:{buttons:["clone","move","remove"],disabled:[]}};const bd=new class extends ad{constructor(t){super("columns",t),this.config={all:vd}}Component(t){return new fd(t)}},yd={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]},panels:{disabled:[],attrs:{disabled:["type"],hideDisabled:!0,locked:[]},order:["attrs","options","conditions"]},label:{disableHTML:!1}};const wd=new class extends ad{constructor(t){super("fields",t),n(this,"get",(t=>{let e=t&&kr(this.data,t);if(!e){const n=sd.get(t);n&&(e=this.add(null,n.controlData))}return e})),this.config={all:yd}}Component(t){return new Wc(t)}};const xd=new class extends ad{constructor(t){super("externals",t)}Component(t){return new Bc("external",t)}},Cd=cd,Sd=ud,Ed=bd,Od=wd,Md=sd,Nd=xd,_d={id:zi()};const Dd=new class extends ya{constructor(t){super("components"),n(this,"sessionFormData",(()=>{var t;if(null==(t=this.opts)?void 0:t.sessionStorage)return Fi.get(T)})),n(this,"load",((t,e=this.opts||Object.create(null))=>{this.empty(),"string"==typeof t&&(t=JSON.parse(t)),this.opts=e;const{stages:n={[zi()]:{}},rows:o,columns:i,fields:r,id:s=zi()}={...this.sessionFormData(),...t};return this.set("id",s),this.add("stages",Cd.load(n)),this.add("rows",Sd.load(o)),this.add("columns",Ed.load(i)),this.add("fields",Od.load(r)),this.add("externals",Nd.load(e.external)),Object.values(this.get("stages")).forEach((t=>t.loadChildren())),this.data})),this.opts=t,this.data=_d,this.disableEvents=!0,this.stages=Cd,this.rows=Sd,this.columns=Ed,this.fields=Od,this.controls=Md,this.externals=Nd}flatList(t=this.data,e=Object.create(null)){return Object.entries(t).reduce(((t,[e,n])=>("object"==typeof n&&Object.entries(n).forEach((([n,o])=>{t[`${e}.${n}`]=o})),t)),e)}get json(){return window.JSON.stringify(this.formData)}get formData(){return{id:this.get("id"),stages:cd.getData(),rows:ud.getData(),columns:bd.getData(),fields:wd.getData()}}set config(t){const{stages:e,rows:n,columns:o,fields:i}=t;Cd.config=e,Sd.config=n,Ed.config=o,Od.config=i}setAddress(t,e){const[n,o,...i]=Array.isArray(t)?t:t.split("."),r=this[n.replace(/s?$/,"s")].get(o);return null==r||r.set(i,e),r}getAddress(t){if(!Ri(t))return;const[e,n,...o]=Array.isArray(t)?t:t.split("."),i=this[e.replace(/s?$/,"s")].get(n);return o.length?i.get(o):i}getConditionMap(t){if(Ri(t)){const e=t.split(".");return e.every((t=>Boolean(t)))&&this[e[0]].conditionMap.get(e[1])}}setConditionMap(t,e){if(Ri(t)){const n=t.split(".");return n.every((t=>Boolean(t)))&&this[n[0]].conditionMap.set(n[1],e)}}removeConditionMap(t){if(Ri(t)){const e=t.split(".");return e.every((t=>Boolean(t)))&&this[e[0]].conditionMap.delete(e[1])}}},Ad={glyphicons:t=>`<span class="glyphicon glyphicon-${t}" aria-hidden="true"></span>`,"font-awesome":t=>{const[e,n]=t.split(" ");return`<i class="${e} fa-${n}"></i>`},fontello:t=>`<i class="${U}${t}">${t}</i>`};const kd=new class{constructor(){n(this,"render",(t=>(t.id=`f-${t.id||zi()}`,this.create(t)))),n(this,"create",((t,e=!1)=>{if(!t)return;t=this.processTagName(t);const n=this;let o;const{tag:i}=t,r=["children","content"];let s;const a={attrs:{},className:[Gr.get(t,"config.inputWrap")||"f-field-group"],children:[],config:{}};let l=document.createElement(i);const c={string:t=>{l.innerHTML+=t},object:t=>t&&l.appendChild(n.create(t,e)),node:t=>l.appendChild(t),component:t=>l.appendChild(t.dom),array:t=>{for(const e of t)o=n.childType(e),c[o](e)},function:t=>{t=t(),o=n.childType(t),c[o](t)},undefined:()=>null,boolean:()=>null};if(r.push("tag"),t.className){const{className:e}=t;t.attrs=Object.assign({},t.attrs,{className:e}),delete t.className}if(t.options){let{options:o}=t;if(o=this.processOptions(o,t,e),!this.holdsContent(l)||"button"===i)return Gr.forEach(o,(t=>{a.children.push(n.create(t,e))})),t.attrs.className&&(a.className=t.attrs.className),a.config=Object.assign({},t.config),this.create(a,e);c.array.call(this,o),delete t.content,r.push("options")}if("OPTION"===l.tagName){const t=setTimeout((()=>{l.selected=!1,clearTimeout(t)}),0)}if(t.attrs&&(n.processAttrs(t,l,e),r.push("attrs")),t.config){if(t.config.label&&(t.config.label&&"button"!==i||["radio","checkbox"].includes(Gr.get(t,"attrs.type")))&&!e){const e=n.label(t);if(!t.config.hideLabel){const o=[...n.labelAfter(t)?[l,e]:[e,l]];a.children.push(o)}}r.push("config")}if(t.content||t.children){const e=t.content||t.children;o=n.childType(e),c[o],c[o].call(this,e)}if(t.dataset){for(const e in t.dataset)t.dataset.hasOwnProperty(e)&&(l.dataset[e]="function"==typeof t.dataset[e]?t.dataset[e]():t.dataset[e]);r.push("dataset")}t.action&&(this.actionHandler(l,t.action),r.push("action"));const d=Gr.subtract(r,Object.keys(t));for(s=d.length-1;s>=0;s--)l[d[s]]=t[d[s]];return a.children.length&&(l=this.create(a)),l})),n(this,"onRender",((t,e)=>{t.parentElement?e(t):window.requestAnimationFrame((()=>this.onRender(t,e)))})),n(this,"toggleElementsByStr",((t,e)=>{const n=[];return kd.elementsContainText(t,e,((t,e)=>{e?(t.style.display="block",n.push(t)):t.style.display="none"})),n})),n(this,"elementsContainText",((t,e,n)=>{const o=[];return Rr(t,(t=>{const i=-1!==t.textContent.toLowerCase().indexOf(e.toLowerCase());null==n||n(t,i),i&&o.push(t)})),o})),n(this,"generateOption",(({type:t="option",label:e,value:n,i:o=0,selected:i})=>({tag:"option"===t?"option":"input",attrs:{type:t,value:n||`${t}-${o}`,["option"===t?"selected":"checked"]:i||!o},config:{label:e||l.get("labelCount",{label:l.get("option"),count:o})}}))),n(this,"makeOption",(([t,e],n,o)=>{const i={value:t,label:l.get(`${o}.${e}`)||e};return t===n&&(i.selected=!0),i})),n(this,"requiredMark",(()=>({tag:"span",className:"text-error",children:"*"}))),n(this,"removeEmpty",(t=>{const e=t.parentElement,n=Pi(t),o=e.getElementsByClassName(`formeo-${n}`);if(this.remove(t),!o.length){if(!this.isStage(e))return this.removeEmpty(e);this.emptyClass(e)}})),n(this,"btnTemplate",(({title:t="",...e})=>({tag:"button",attrs:{type:"button",title:t},...e}))),n(this,"isControls",(t=>Pi(t)===h)),n(this,"isStage",(t=>Pi(t)===u)),n(this,"isRow",(t=>Pi(t)===p)),n(this,"isColumn",(t=>Pi(t)===m)),n(this,"isField",(t=>Pi(t)===g)),n(this,"asComponent",(t=>Dd[`${Pi(t)}s`].get(t.id))),this.options=Object.create(null),this.styleSheet=(()=>{const t=document.createElement("style");return t.setAttribute("media","screen"),t.setAttribute("type","text/css"),t.appendChild(document.createTextNode("")),document.head.appendChild(t),t.sheet})()}set setOptions(t){this.options=$i(Object.assign({},this.options,t))}processTagName(t){let e;if("string"==typeof t&&(e=t,t={tag:e}),t.attrs){const{tag:n,...o}=t.attrs;if(n)if("string"==typeof n)e=n;else{e=(n.find((t=>!0===t.selected))||n[0]).value}t.attrs=o}return t.tag=e||t.tag||"div",t}actionHandler(t,e){const n={onRender:kd.onRender},o=["focus","blur"];return Object.entries(e).map((([e,i])=>{const r=n[e]||(s=e,(t,e)=>t.addEventListener(s,e,o.includes(s)));var s;return r(t,i)}))}get icons(){if(this.iconSymbols)return this.iconSymbols;const t=document.querySelectorAll("#formeo-sprite svg symbol");return this.iconSymbols=Array.from(t).reduce(((t,e)=>{var n;return t[e.id.replace(U,"")]=kd.create({tag:"svg",attrs:{className:`svg-icon ${n=e.id}`},children:[{tag:"use",attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":`#${n}`}}]}),t}),{}),this.iconSymbols}icon(t=null,e=[]){var n;if(!t)return;const o=this.icons[t];if(o){const t=o.cloneNode(!0);return t.classList.add(...e),t.outerHTML}return(null==(n=Ad[kd.options.iconFont])?void 0:n.call(Ad,t))||t}processAttrs(t,e,n){const{attrs:o={}}=t;n||!o.name&&this.isInput(t.tag)&&e.setAttribute("name",zi(t)),Object.keys(o).forEach((t=>{const n=Gr.safeAttrName(t);let i=o[t]||"";if(Array.isArray(i))if("object"==typeof i[0]){const t=i.filter((t=>!0===t.selected));i=t.length?t[0].value:i[0].value}else i=i.join(" ");if(i)if("OPTION"===e.tagName&&"selected"===n){const t=setTimeout((()=>{e.setAttribute(n,i),clearTimeout(t)}),0)}else e.setAttribute(n,i)}))}processOptions(t,e,n){const{action:o,attrs:i}=e,r=i.type||e.tag,s=i.id||e.id;return t.map(((t,i)=>{var a;const{label:l,...c}=t,d=()=>{const a={tag:"input",attrs:{name:s,type:r,value:t.value||"",id:`${s}-${i}`,...c},action:o},l={tag:"label",attrs:{for:`${s}-${i}`},config:{inputWrap:"form-check"},children:t.label},d={children:[a,l],className:[`f-${r}`]};return e.attrs.className&&(e.config.inputWrap=e.attrs.className),e.config.inline&&d.className.push(`f-${r}-inline`),t.selected&&(a.attrs.checked=!0),n&&(l.attrs.contenteditable=!0),d},h={select:()=>({tag:"option",attrs:t,children:t.label}),button:t=>{const{type:n,label:o,className:i,id:r}=t;return{...e,attrs:{type:n},className:i,id:r||zi(),options:void 0,children:o,action:e.action}},checkbox:d,radio:d};return null==(a=h[r])?void 0:a.call(h,t)}))}holdsContent(t){return-1!==t.outerHTML.indexOf("/")}isBlockInput(t){return!this.isInput(t)&&this.holdsContent(t)}isInput(t){return"string"!=typeof t&&(t=t.tagName),-1!==["input","textarea","select"].indexOf(t)}parsedHtml(t){const e=document.createElement("textarea");return e.innerHTML=t,e.textContent}labelAfter(t){const e=Gr.get(t,"attrs.type"),n=Gr.get(t,"config.labelAfter");return void 0!==n?n:"checkbox"===e||"radio"===e}label(t,e){const n=Gr.get(t,"attrs.required");let{config:{label:o=""}}=t;const{id:i,attrs:r}=t;"function"==typeof o&&(o=o());const s={tag:"label",attrs:{for:i||(null==r?void 0:r.id)},className:[],children:[o,n&&this.requiredMark()],action:{}};return e&&(delete s.attrs.for,s.attrs.contenteditable=!0,s.fMap=e),s}childType(t){return void 0===t?t:[["array",t=>Array.isArray(t)],["node",t=>t instanceof window.Node||t instanceof window.HTMLElement],["component",()=>null==t?void 0:t.dom],[typeof t,()=>!0]].find((e=>e[1](t)))[0]}getStyle(t,e=!1){let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n}getElement(t){return{node:()=>t,object:()=>document.getElementById(t.id),string:()=>document.getElementById(t)}[this.childType(t)]()}empty(t){for(;t.firstChild;)this.remove(t.firstChild);return t}remove(t){const e=Pi(t);return e?Dd.remove(`${e}s.${t.id}`):t.parentElement.removeChild(t)}removeClasses(t,e){const n={string:t=>t.classList.remove(e),array:t=>e.forEach((e=>t.classList.remove(e)))};n.object=n.string,Gr.forEach(t,n[this.childType(e)])}addClasses(t,e){const n={string:t=>t.classList.add(e),array:t=>e.forEach((e=>t.classList.add(e)))};Gr.forEach(t,n[this.childType(e)])}formGroup(t,e=""){return{className:["f-field-group",e],children:t}}coords(t){const e=t.getBoundingClientRect(),n=document.body.getBoundingClientRect();return{pageX:e.left+e.width/2,pageY:e.top-n.top-e.height/2}}clearStage(t){t.classList.add("removing-all-fields");Xr.slideUp(t,600,(()=>{kd.empty(t),t.classList.remove("removing-all-fields"),kd.emptyClass(t),Xr.slideDown(t,300)}))}toggleSortable(t,e){const n=Pi(t);if(!n)return;const o=Pi(t.parentElement),i=kd[n].get(t.id).sortable;e||(e=!i.option("disabled")),i.option("disabled",e),o&&["rows","columns","stages"].includes(o)&&this.toggleSortable(t.parentElement,e)}emptyClass(t){const e=t.getElementsByClassName(y.get(t.classList.item(0)));t.classList.toggle("empty",!e.length)}};l.addLanguage("en-US",'en-US = English\ndir = ltr\n\naction.add.attrs.attr = What attribute would you like to add?\naction.add.attrs.value = Default Value\naddOption = Add Option\nallFieldsRemoved = All fields were removed.\nallowSelect = Allow Select\nattribute = Attribute\nattributes = Attributes\nattrs.class = Class\nattrs.className = Class\nattrs.dir = Direction\nattrs.id = Id\nattrs.required = Required\nattrs.style = Style\nattrs.title = Title\nattrs.type = Type\nattrs.value = Value\nautocomplete = Autocomplete\nbutton = Button\ncannotBeEmpty = This field cannot be empty\ncheckbox = Checkbox\ncheckboxes = Checkboxes\nclass = Class\nclear = Clear\nclearAllMessage = Are you sure you want to clear all fields?\nclose = Close\ncolumn = Column\nconfirmClearAll = Are you sure you want to remove all fields?\ncontent = Content\ncontrol = Control\ncontrolGroups.nextGroup = Next Group\ncontrolGroups.prevGroup = Previous Group\ncontrols.form.button = Button\ncontrols.form.checkbox-group = Checkbox Group\ncontrols.form.input.date = Date\ncontrols.form.input.email = Email\ncontrols.form.input.file = File Upload\ncontrols.form.input.hidden = Hidden Input\ncontrols.form.input.number = Number\ncontrols.form.input.text = Text Input\ncontrols.form.radio-group = Radio Group\ncontrols.form.select = Select\ncontrols.form.textarea = TextArea\ncontrols.groups.form = Form Fields\ncontrols.groups.html = HTML Elements\ncontrols.groups.layout = Layout\ncontrols.html.divider = Divider\ncontrols.html.header = Header\ncontrols.html.paragraph = Paragraph\ncontrols.layout.column = Column\ncontrols.layout.row = Row\ncontrols.filteringTerm = Filtering "{term}"\ncopy = Copy To Clipboard\ndanger = Danger\ndescription = Help Text\ndescriptionField = Description\ndefineColumnLayout = Define a column layout\ndefineColumnWidths = Define column widths\nediting.row = Editing Row\neditorTitle = Form Elements\nfield = Field\nfieldNonEditable = This field cannot be edited.\nfieldRemoveWarning = Are you sure you want to remove this field?\nfileUpload = File Upload\nformUpdated = Form Updated\ngetStarted = Drag a field from the right to get started.\ngroup = Group\ngrouped = Grouped\nhidden = Hidden Input\nhide = Edit\nhtmlElements = HTML Elements\nif = If\ninfo = Info\ninput.date = Date\ninput.text = Text\nlabel = Label\nlabelCount = {label} {count}\nlabelEmpty = Field Label cannot be empty\nlayout = Layout\nlimitRole = Limit access to one or more of the following roles:\nmandatory = Mandatory\nmaxlength = Max Length\nmeta.group = Group\nmeta.icon = Ico\nmeta.label = Label\nminOptionMessage = This field requires a minimum of 2 options\nname = Name\nno = No\nnumber = Number\noff = Off\non = On\noption = Option\noptional = optional\noptionEmpty = Option value required\noptionLabel = Option {count}\noptions = Options\norder = Order\npanel.label.attrs = Attributes\npanel.label.conditions = Conditions\npanel.label.config = Configuration\npanel.label.meta = Meta\npanel.label.options = Options\npanelEditButtons.attrs = + Attribute\npanelEditButtons.options = + Option\npanelEditButtons.conditions = + Condition\nplaceholder = Placeholder\nplaceholder.className = space separated classes\nplaceholder.email = Enter you email\nplaceholder.label = Label\nplaceholder.password = Enter your password\nplaceholder.placeholder = Placeholder\nplaceholder.text = Enter some Text\nplaceholder.textarea = Enter a lot of text\nplaceholder.value = Value\npreview = Preview\nprimary = Primary\nremove = Remove\nremoveType = Remove {type}\nremoveMessage = Remove Element\nrequired = Required\nreset = Reset\nrichText = Rich Text Editor\nroles = Access\nrow = Row\nrow.makeInputGroup = Make this row an input group.\nrow.makeInputGroupDesc = Input Groups enable users to add sets of inputs at a time.\nrow.settings.fieldsetWrap = Wrap row in a <fieldset> tag\nrow.settings.fieldsetWrap.aria = Wrap Row in Fieldset\ncannotClearFields = There are no fields to clear\nsave = Save\nsecondary = Secondary\nselect = Select\nselectColor = Select Color\nselectionsMessage = Allow Multiple Selections\nselectOptions = Options\nseparator = Separator\nsettings = Settings\nsize = Size\nsizes = Sizes\nsizes.lg = Large\nsizes.m = Default\nsizes.sm = Small\nsizes.xs = Extra Small\nstyle = Style\nstyles = Styles\nstyles.btn = Button Style\nstyles.btn.danger = Danger\nstyles.btn.default = Default\nstyles.btn.info = Info\nstyles.btn.primary = Primary\nstyles.btn.success = Success\nstyles.btn.warning = Warning\nsubtype = Type\nsuccess = Success\ntext = Text Field\nthen = Then\ntoggle = Toggle\nungrouped = Un-Grouped\nwarning = Warning\nyes = Yes\nand = and\nor = or\nfield.property.value = value\nfield.property.label = label\nfield.property.valid = valid\nfield.property.invalid = not valid\nfield.property.isVisible = is visible\nfield.property.isNotVisible = is not visible\nnewOptionLabel = New {type}\noperator.visible = visible\noperator.notVisible = not visible\noperator.equals = equals\noperator.notEquals = not equal\noperator.contains = contains\noperator.notContains = not contains\ncondition.target.placeholder = target\nif.condition.target.placeholder = target / value\nif.condition.source.placeholder = source\nthen.condition.target.placeholder = target\ncondition.value.placeholder = value\nattributeNotPermitted = Attribute "{attribute}" is not permitted, please choose another.\n');const jd={get editor(){return{stickyControls:!1,allowEdit:!0,dataType:"json",debug:!1,sessionStorage:!1,editorContainer:null,external:{},svgSprite:null,iconFont:null,config:{},events:{},actions:{},controls:{},polyfills:Ur(),i18n:{location:"https://draggable.github.io/formeo/assets/lang/"}}}};let Td=class{constructor({formData:t,...e},n){const o=this,i=$i(jd.editor,e),{actions:r,events:s,debug:a,config:l,editorContainer:c,...d}=i;c&&(this.editorContainer="string"==typeof c?document.querySelector(c):c),this.opts=d,kd.setOptions=d,Dd.config=l,this.userFormData=n||t,this.Components=Dd,this.dom=kd,Kr.init({debug:a,...s}),Ec.init({debug:a,sessionStorage:d.sessionStorage,...r}),o.loadResources().then((()=>{d.allowEdit&&(o.edit=o.init.bind(o),o.init())}))}get formData(){return this.Components.formData}set formData(t={}){this.load({...this.userFormData,...t},this.opts)}get json(){return this.Components.json}loadResources(){const t=[];return this.opts.polyfills&&(t=>{const e=Array.isArray(t)?d.filter((({name:e})=>-1!==t.indexOf(e))):d;Promise.all(e.map((({src:t})=>Uc(t))))})(this.opts.polyfills),this.opts.style&&t.push(Gc(this.opts.style)),this.opts.svgSprite?t.push(Yc(this.opts.svgSprite,Xc,(()=>Yc("https://draggable.github.io/formeo/assets/img/formeo-sprite.svg",Xc)))):t.push(Xc('<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="f-i-autocomplete" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-bin" xmlns="http://www.w3.org/2000/svg"><path d="M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z"/></symbol><symbol id="f-i-button" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><metadata id="acmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="acrect4140" d="M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z"/><g id="aclayer1"><g id="actext4203"><g id="acg4212" transform="translate(0.10112835,0.1001358)"><path id="acpath4208" d="m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z"/><path id="acpath4210" d="m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z"/></g></g></g></symbol><symbol viewBox="0 0 32 32" id="f-i-calendar" xmlns="http://www.w3.org/2000/svg"><path d="M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z"/></symbol><symbol id="f-i-checkbox" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z"/></symbol><symbol id="f-i-checkbox-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-columns" xmlns="http://www.w3.org/2000/svg"><metadata id="agmetadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="agrect4860-3-5" d="M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z"/></symbol><symbol viewBox="0 0 2.1166668 2.1167197" id="f-i-component-corner" xmlns="http://www.w3.org/2000/svg"><g id="ahg2" transform="translate(-0.52916668)"><path class="ahcorner-fill" stroke="none" fill="inherit" d="M 0.52916668,5.3011818e-5 V 2.1167198 H 2.6458337 V 1.9849449 C 1.5496647,1.9849298 0.66092868,1.0962219 0.66094168,5.3011818e-5 Z m 0.131775,0 L 2.6458337,1.9849449 Z"/><path class="ahcorner-stroke" stroke-width="0.250546px" fill="none" stroke="inherit" d="m 2.645783,1.9848683 v 0 C 1.5496137,1.9848532 0.66100516,1.0962232 0.66101817,5.4327518e-5 v 0"/></g></symbol><symbol viewBox="0 0 32 32" id="f-i-copy" xmlns="http://www.w3.org/2000/svg"><path d="M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z"/></symbol><symbol id="f-i-divider" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><metadata id="ajmetadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><rect y="7" x="0" height="1" width="15" id="ajrect4182"/></symbol><symbol viewBox="0 0 28 32" id="f-i-edit" xmlns="http://www.w3.org/2000/svg"><path d="M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z"/></symbol><symbol fill="#000000" viewBox="0 0 24 24" id="f-i-email" xmlns="http://www.w3.org/2000/svg"><path d="M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-floppy-disk" xmlns="http://www.w3.org/2000/svg"><path d="M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle" xmlns="http://www.w3.org/2000/svg"><metadata id="aqmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="translate(0,-2)" id="aqg4220"><rect id="aqrect4191" width="2" height="2" x="2" y="7"/><rect id="aqrect4191-2" width="2" height="2" x="7" y="7"/><rect id="aqrect4191-4" width="2" height="2" x="12" y="7"/></g><g transform="translate(0,2)" id="aqg4220-6"><rect id="aqrect4191-40" width="2" height="2" x="2" y="7"/><rect id="aqrect4191-2-3" width="2" height="2" x="7" y="7"/><rect id="aqrect4191-4-9" width="2" height="2" x="12" y="7"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-column" xmlns="http://www.w3.org/2000/svg"><metadata id="anmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g id="ang1" transform="rotate(90,9.25,9.25)"><rect id="anrect4191-27" width="2" height="2" x="2" y="7"/><rect id="anrect4191-2-0" width="2" height="2" x="7" y="7"/><rect id="anrect4191-2-9-9" width="2" height="2" x="12" y="7"/><rect id="anrect4191-27-6" width="2" height="2" x="2" y="12"/><rect id="anrect4191-2-0-0" width="2" height="2" x="7" y="12"/><rect id="anrect4191-2-9-9-6" width="2" height="2" x="12" y="12"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-field" xmlns="http://www.w3.org/2000/svg"><metadata id="aometadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g id="aog1" transform="translate(0,-2.5)"><rect id="aorect4191-2-0" width="2" height="2" x="7" y="-11.5" transform="rotate(90)"/><rect id="aorect4191-2-9-9" width="2" height="2" x="12" y="-11.5" transform="rotate(90)"/><rect id="aorect4191-2-0-0" width="2" height="2" x="7" y="-6.5" transform="rotate(90)"/><rect id="aorect4191-2-9-9-6" width="2" height="2" x="12" y="-6.5" transform="rotate(90)"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-row" xmlns="http://www.w3.org/2000/svg"><metadata id="apmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g id="apg1" transform="translate(0,-2.5)"><rect id="aprect4191-27" width="2" height="2" x="2" y="7"/><rect id="aprect4191-2-0" width="2" height="2" x="7" y="7"/><rect id="aprect4191-2-9-9" width="2" height="2" x="12" y="7"/><rect id="aprect4191-27-6" width="2" height="2" x="2" y="12"/><rect id="aprect4191-2-0-0" width="2" height="2" x="7" y="12"/><rect id="aprect4191-2-9-9-6" width="2" height="2" x="12" y="12"/></g></symbol><symbol viewBox="0 0 448 512" id="f-i-hash" xmlns="http://www.w3.org/2000/svg"><g id="aricomoon-ignore"/><path fill="#000" d="M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z"/></symbol><symbol viewBox="0 0 28 28" id="f-i-header" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-hidden" xmlns="http://www.w3.org/2000/svg"><metadata id="atmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="atpath5816" d="M 1,5 2,5 2,4 1,4 Z"/><path id="atpath5814" d="M 3,5 4,5 4,4 3,4 Z"/><path id="atpath5812" d="M 5,5 6,5 6,4 5,4 Z"/><path id="atpath5810" d="M 7,5 8,5 8,4 7,4 Z"/><path id="atpath5808" d="M 9,5 10,5 10,4 9,4 Z"/><path id="atpath5806" d="m 11,5 1,0 0,-1 -1,0 z"/><path id="atpath5804" d="m 13,5 1,0 0,-1 -1,0 z"/><path id="atpath5800" d="M 0,6 1,6 1,5 0,5 Z"/><path id="atpath5798" d="m 15,6.9997352 1,0 0,-1 -1,0 z"/><path id="atpath5796" d="M 0,8 1,8 1,7 0,7 Z"/><path id="atpath5794" d="m 15,8.9997352 1,0 0,-1 -1,0 z"/><path id="atpath5792" d="m 0,10 1,0 0,-1.0000001 -1,0 z"/><path id="atpath5790" d="m 15,10.999735 1,0 0,-0.9999998 -1,0 z"/><path id="atpath5786" d="m 2,12 1,0 0,-1 -1,0 z"/><path id="atpath5784" d="m 4,12 1,0 0,-1 -1,0 z"/><path id="atpath5782" d="m 6,12 1,0 0,-1 -1,0 z"/><path id="atpath5780" d="m 8,12 1,0 0,-1 -1,0 z"/><path id="atpath5778" d="m 10,12 1,0 0,-1 -1,0 z"/><path id="atpath5776" d="m 12,12 1,0 0,-1 -1,0 z"/><path id="atrect5768" d="m 14,12 1,0 0,-1 -1,0 z"/><path d="m 15,5 1,0 0,-1 -1,0 z" id="atpath5827"/><path d="m 0,12 1,0 0,-1 -1,0 z" id="atpath5829"/></symbol><symbol viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="auicomoon-ignore"/><path d="M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z"/></symbol><symbol viewBox="0 0 16 32" id="f-i-minus" xmlns="http://www.w3.org/2000/svg"><path d="M0 14v4h16v-4h-16z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move" xmlns="http://www.w3.org/2000/svg"><path d="M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move-vertical" xmlns="http://www.w3.org/2000/svg"><metadata id="awmetadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="3440" inkscape:window-height="1416" id="awnamedview6" showgrid="false" inkscape:zoom="1.84375" inkscape:cx="421.4312" inkscape:cy="218.56484" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"/><path d="m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z" id="awpath4" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:connector-curvature="0" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:nodetypes="ccccccccccc"/></symbol><symbol viewBox="0 0 20 28" id="f-i-paragraph" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z"/></symbol><symbol id="f-i-phone-receiver" viewBox="0 0 578.106 578.106" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g><g><path d="M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol id="f-i-radio-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-remove" xmlns="http://www.w3.org/2000/svg"><metadata id="bbmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g id="bblayer1"><g transform="translate(170.37199,5.9577983)" id="bbg4172"><path id="bbrect4155" d="m -159.9194,-18.102955 87.322034,0 0,510.915285 -87.322034,0 z" transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)"/><path id="bbrect4155-5" d="m 193.69366,-139.19925 87.32204,0 0,510.91528 -87.32204,0 z" transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)"/></g></g></symbol><symbol id="f-i-rich-text" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-rows" xmlns="http://www.w3.org/2000/svg"><metadata id="bdmetadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="matrix(0,1,-1,0,3.0984025,11.835155)" id="bdg7209"><path id="bdrect4860-3-5" d="m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z"/></g></symbol><symbol id="f-i-select" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="beXMLID_1_" d="M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z"/></symbol><symbol viewBox="0 0 448 512" id="f-i-settings" xmlns="http://www.w3.org/2000/svg"><g id="bficomoon-ignore"/><path d="M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z"/></symbol><symbol id="f-i-text-input" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bgXMLID_10_" d="M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z"/></symbol><symbol id="f-i-textarea" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bhXMLID_1_" d="M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-down" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 12l11.992 11.992 11.992-11.992h-23.984z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-left" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 15.996l11.992 11.992v-23.984l-11.992 11.992z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-right" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-up" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M11.992 8l-11.992 11.992h23.984l-11.992-11.992z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-upload" xmlns="http://www.w3.org/2000/svg"><g id="bmicomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>')),t.push(l.init({...this.opts.i18n,locale:Fi.get(P)})),Promise.all(t)}init(){const t=this;this.load(this.userFormData,t.opts),this.controls=sd.init(t.opts.controls,t.opts.stickyControls),t.formId=Dd.get("id"),this.i18n={setLang:e=>{Fi.set(P,e);l.setCurrent(e).then((()=>{this.controls=sd.init(t.opts.controls),t.render()}),console.error)}},t.render()}load(t=this.userFormData,e=this.opts){return this.Components.load(t,e)}render(){const t=document.createElement("script");t.src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js",document.head.appendChild(t),this.stages=Object.values(Dd.get("stages")),this.opts.controlOnLeft&&this.stages.forEach((t=>{t.dom.style.order=1}));const e={attrs:{className:"formeo formeo-editor",id:this.formId},content:[this.stages.map((({dom:t})=>t))]};l.current.dir&&(e.attrs.dir=l.current.dir,kd.dir=l.current.dir),this.editor=kd.create(e);(this.controls.container||this.editor).appendChild(this.controls.dom),this.editorContainer&&(kd.empty(this.editorContainer),this.editorContainer.appendChild(this.editor)),Kr.formeoLoaded=new window.CustomEvent("formeoLoaded",{detail:{formeo:this}}),document.dispatchEvent(Kr.formeoLoaded)}};const Pd=t=>{const e=t.match(W);return(null==e?void 0:e[0])||t},Ld=t=>t.replace(W,zi());let zd=class{constructor(t,e={}){n(this,"render",((t=this.form)=>{this.form=t;const e=document.getElementsByClassName("formeo-render").length,n={id:this.form.id,className:`formeo-render formeo formeo-rendered-${e}`,children:this.processedData};this.renderedForm=kd.render(n),this.applyConditions();const o=this.container.querySelector(".formeo-render");o?o.replaceWith(this.renderedForm):this.container.appendChild(this.renderedForm)})),n(this,"orderChildren",((t,e)=>e.reduce(((e,n)=>[...e,this.form[t][n]]),[]))),n(this,"prefixId",(t=>"f-"+t)),n(this,"processColumn",(({id:t,...e})=>({...e,id:this.prefixId(t),children:this.processFields(e.children),style:`width: ${e.config.width||"100%"}`}))),n(this,"processRows",(t=>this.orderChildren("rows",this.form.stages[t].children).reduce(((t,e)=>e?[...t,this.processRow(e)]:t),[]))),n(this,"cacheComponent",(t=>(this.components[Pd(t.id)]=t,t))),n(this,"processRow",((t,e="row")=>{const{config:n,id:o}=t,i=[`formeo-${e}-wrap`],r={...t,children:this.processColumns(t.id),id:this.prefixId(o)};this.cacheComponent(r);const s=[{condition:n.legend,result:()=>({tag:n.fieldset?"legend":"h3",children:n.legend})},{condition:!0,result:()=>r},{condition:n.inputGroup,result:()=>this.addButton(o)}].reduce(((t,{condition:e,result:n})=>e?[...t,n()]:t),[]);return n.inputGroup&&i.push("f-input-group-wrap"),{tag:n.fieldset?"fieldset":"div",id:zi(),className:i,children:s}})),n(this,"cloneComponentData",(t=>{const{children:e=[],id:n,...o}=this.components[t];return Object.assign({},o,{id:Ld(n),children:e.length&&e.map((({id:t})=>this.cloneComponentData(Pd(t))))})})),n(this,"addButton",(t=>kd.render({tag:"button",attrs:{className:"add-input-group btn pull-right",type:"button"},children:"Add +",action:{click:e=>{const n=e.target.parentElement,o=kd.render(this.cloneComponentData(t));n.insertBefore(o,n.lastChild),o.appendChild(kd.render(kd.btnTemplate({className:"remove-input-group",children:kd.icon("remove"),action:{mouseover:({target:t})=>t.parentElement.classList.add("will-remove"),mouseleave:({target:t})=>t.parentElement.classList.remove("will-remove"),click:({target:t})=>t.parentElement.remove()}})))}}}))),n(this,"processColumns",(t=>this.orderChildren("columns",this.form.rows[t].children).map((t=>this.cacheComponent(this.processColumn(t)))))),n(this,"processFields",(t=>this.orderChildren("fields",t).map((({id:t,...e})=>this.cacheComponent(Object.assign({},e,{id:this.prefixId(t)})))))),n(this,"applyConditions",(()=>{Object.values(this.components).forEach((({conditions:t})=>{t&&t.forEach(((t,e)=>{const{if:n,then:o}=t;n.forEach((t=>{const{source:e,...n}=t;if(Ri(e)){this.getComponents(e).forEach((t=>{const e=$d(t);e&&t.addEventListener(e,(t=>this.evaluateCondition(n,t)&&o.forEach((e=>this.execResult(e,t)))),!1);const i={target:t};this.evaluateCondition(n,i)&&o.forEach((t=>this.execResult(t,i)))}))}}))}))}))})),n(this,"evaluateCondition",(({sourceProperty:t,targetProperty:e,comparison:n,target:o},i)=>{const r={equals:ba,notEquals:(t,e)=>!ba(t,e),contains:(t,e)=>t.includes(e),notContains:(t,e)=>!t.includes(e)},s=String(i.target[t]),a=String(Ri(o)?this.getComponent(o)[e]:o);return r[n]&&r[n](s,a)})),n(this,"execResult",(({assignment:t,target:e,targetProperty:n,value:o})=>{const i={equals:t=>{const e={value:()=>{t[n]=o},isNotVisible:()=>{t.parentElement.setAttribute("hidden",!0),t.required=!1},isVisible:()=>{t.parentElement.removeAttribute("hidden"),t.required=t._required}};e[n]&&e[n]()}};if(Ri(e)){const n=this.getComponent(e);n&&void 0===n._required&&(n._required=n.required),i[t]&&i[t](n)}})),n(this,"getComponent",(t=>{const e=t.slice(t.indexOf(".")+1);return Bi(t)?this.external[e]:this.renderedForm.querySelector(`#f-${e}`)})),n(this,"getComponents",(t=>{const e=[],n=t.slice(t.indexOf(".")+1);return Bi(t)?e.push(this.external[n]):e.push(...this.renderedForm.querySelectorAll(`[name=f-${n}]`)),e}));const{renderContainer:o,external:i}=(({editorContainer:t,renderContainer:e,...n})=>{const o=t=>"string"==typeof t?document.querySelector(t):t;return{...n,renderContainer:o(e),editorContainer:o(t)}})(t);this.container=o,this.form=e,this.external=i,this.dom=kd,this.components=Object.create(null)}get processedData(){return Object.values(this.form.stages).map((t=>(t.children=this.processRows(t.id),t.className=u,kd.render(t))))}};const $d=t=>{const[e]=[["input",t=>["textarea","text"].includes(t.type)],["change",t=>["select"].includes(t.tagName.toLowerCase())||["checkbox","radio"].includes(t.type)]].find((e=>e[1](t)))||[!1];return e};void 0!==window&&(window.FormeoEditor=Td,window.FormeoRenderer=zd);const Hd=Td,Vd=zd;t.FormeoEditor=Hd,t.FormeoRenderer=Vd,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|
|
14
|
+
*/function wa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function xa(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wa(Object(n),!0).forEach((function(e){Sa(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wa(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ca(t){return(Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Sa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ea(){return Ea=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ea.apply(this,arguments)}function Oa(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Ma(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Na=Ma(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_a=Ma(/Edge/i),Aa=Ma(/firefox/i),Da=Ma(/safari/i)&&!Ma(/chrome/i)&&!Ma(/android/i),ja=Ma(/iP(ad|od|hone)/i),ka=Ma(/chrome/i)&&Ma(/android/i),Ta={capture:!1,passive:!1};function Pa(t,e,n){t.addEventListener(e,n,!Na&&Ta)}function La(t,e,n){t.removeEventListener(e,n,!Na&&Ta)}function za(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function $a(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Ha(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&za(t,e):za(t,e))||o&&t===n)return t;if(t===n)break}while(t=$a(t))}return null}var Va,Ia=/\s+/g;function Fa(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(Ia," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(Ia," ")}}function Ba(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Ra(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Ba(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Wa(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function qa(){var t=document.scrollingElement;return t||document.documentElement}function Ua(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,s,a,l,c,d,h;if(t!==window&&t.parentNode&&t!==qa()?(s=(r=t.getBoundingClientRect()).top,a=r.left,l=r.bottom,c=r.right,d=r.height,h=r.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Na))do{if(i&&i.getBoundingClientRect&&("none"!==Ba(i,"transform")||n&&"static"!==Ba(i,"position"))){var u=i.getBoundingClientRect();s-=u.top+parseInt(Ba(i,"border-top-width")),a-=u.left+parseInt(Ba(i,"border-left-width")),l=s+r.height,c=a+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=Ra(i||t),m=p&&p.a,g=p&&p.d;p&&(l=(s/=g)+(d/=g),c=(a/=m)+(h/=m))}return{top:s,left:a,bottom:l,right:c,width:h,height:d}}}function Ga(t,e,n){for(var o=Ka(t,!0),i=Ua(t)[e];o;){if(!(i>=Ua(o)[n]))return o;if(o===qa())break;o=Ka(o,!1)}return!1}function Xa(t,e,n,o){for(var i=0,r=0,s=t.children;r<s.length;){if("none"!==s[r].style.display&&s[r]!==nc.ghost&&(o||s[r]!==nc.dragged)&&Ha(s[r],n.draggable,t,!1)){if(i===e)return s[r];i++}r++}return null}function Ya(t,e){for(var n=t.lastElementChild;n&&(n===nc.ghost||"none"===Ba(n,"display")||e&&!za(n,e));)n=n.previousElementSibling;return n||null}function Za(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===nc.clone||e&&!za(t,e)||n++;return n}function Ja(t){var e=0,n=0,o=qa();if(t)do{var i=Ra(t),r=i.a,s=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*s}while(t!==o&&(t=t.parentNode));return[e,n]}function Ka(t,e){if(!t||!t.getBoundingClientRect)return qa();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=Ba(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return qa();if(o||e)return n;o=!0}}}while(n=n.parentNode);return qa()}function Qa(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function tl(t,e){return function(){if(!Va){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),Va=setTimeout((function(){Va=void 0}),e)}}}function el(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function nl(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function ol(t,e,n){var o={};return Array.from(t.children).forEach((function(i){var r,s,a,l;if(Ha(i,e.draggable,t,!1)&&!i.animated&&i!==n){var c=Ua(i);o.left=Math.min(null!==(r=o.left)&&void 0!==r?r:1/0,c.left),o.top=Math.min(null!==(s=o.top)&&void 0!==s?s:1/0,c.top),o.right=Math.max(null!==(a=o.right)&&void 0!==a?a:-1/0,c.right),o.bottom=Math.max(null!==(l=o.bottom)&&void 0!==l?l:-1/0,c.bottom)}})),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var il="Sortable"+(new Date).getTime();function rl(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Ba(t,"display")&&t!==nc.ghost){e.push({target:t,rect:Ua(t)});var n=xa({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=Ra(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,s=n.fromRect,a=Ua(n),l=n.prevFromRect,c=n.prevToRect,d=t.rect,h=Ra(n,!0);h&&(a.top-=h.f,a.left-=h.e),n.toRect=a,n.thisAnimationDuration&&Qa(l,a)&&!Qa(s,a)&&(d.top-a.top)/(d.left-a.left)==(s.top-a.top)/(s.left-a.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(d,l,c,o.options)),Qa(a,s)||(n.prevFromRect=s,n.prevToRect=a,e||(e=o.options.animation),o.animate(n,d,a,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){Ba(t,"transition",""),Ba(t,"transform","");var i=Ra(this.el),r=i&&i.a,s=i&&i.d,a=(e.left-n.left)/(r||1),l=(e.top-n.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,Ba(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),Ba(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Ba(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Ba(t,"transition",""),Ba(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var sl=[],al={initializeByDefault:!0},ll={mount:function(t){for(var e in al)al.hasOwnProperty(e)&&!(e in t)&&(t[e]=al[e]);sl.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),sl.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";sl.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](xa({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](xa({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in sl.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var r=new o(t,e,t.options);r.sortable=t,r.options=t.options,t[i]=r,Ea(n,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);void 0!==r&&(t.options[i]=r)}},getEventProperties:function(t,e){var n={};return sl.forEach((function(o){"function"==typeof o.eventProperties&&Ea(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return sl.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};var cl=["evt"],dl=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=Oa(n,cl);ll.pluginEvent.bind(nc)(t,e,xa({dragEl:ul,parentEl:pl,ghostEl:ml,rootEl:gl,nextEl:fl,lastDownEl:vl,cloneEl:bl,cloneHidden:yl,dragStarted:kl,putSortable:Ol,activeSortable:nc.active,originalEvent:o,oldIndex:wl,oldDraggableIndex:Cl,newIndex:xl,newDraggableIndex:Sl,hideGhostForTarget:Kl,unhideGhostForTarget:Ql,cloneNowHidden:function(){yl=!0},cloneNowShown:function(){yl=!1},dispatchSortableEvent:function(t){hl({sortable:e,name:t,originalEvent:o})}},i))};function hl(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,c=t.newIndex,d=t.oldDraggableIndex,h=t.newDraggableIndex,u=t.originalEvent,p=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[il]){var g,f=e.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Na||_a?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=s||n,g.from=a||n,g.item=i||n,g.clone=r,g.oldIndex=l,g.newIndex=c,g.oldDraggableIndex=d,g.newDraggableIndex=h,g.originalEvent=u,g.pullMode=p?p.lastPutMode:void 0;var b=xa(xa({},m),ll.getEventProperties(o,e));for(var y in b)g[y]=b[y];n&&n.dispatchEvent(g),f[v]&&f[v].call(e,g)}}(xa({putSortable:Ol,cloneEl:bl,targetEl:ul,rootEl:gl,oldIndex:wl,oldDraggableIndex:Cl,newIndex:xl,newDraggableIndex:Sl},t))}var ul,pl,ml,gl,fl,vl,bl,yl,wl,xl,Cl,Sl,El,Ol,Ml,Nl,_l,Al,Dl,jl,kl,Tl,Pl,Ll,zl,$l=!1,Hl=!1,Vl=[],Il=!1,Fl=!1,Bl=[],Rl=!1,Wl=[],ql="undefined"!=typeof document,Ul=ja,Gl=_a||Na?"cssFloat":"float",Xl=ql&&!ka&&!ja&&"draggable"in document.createElement("div"),Yl=function(){if(ql){if(Na)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Zl=function(t,e){var n=Ba(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=Xa(t,0,e),r=Xa(t,1,e),s=i&&Ba(i),a=r&&Ba(r),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Ua(i).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Ua(r).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(i&&s.float&&"none"!==s.float){var d="left"===s.float?"left":"right";return!r||"both"!==a.clear&&a.clear!==d?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=o&&"none"===n[Gl]||r&&"none"===n[Gl]&&l+c>o)?"vertical":"horizontal"},Jl=function(t){function e(t,n){return function(o,i,r,s){var a=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||a))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,s),n)(o,i,r,s);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==Ca(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},Kl=function(){!Yl&&ml&&Ba(ml,"display","none")},Ql=function(){!Yl&&ml&&Ba(ml,"display","")};ql&&!ka&&document.addEventListener("click",(function(t){if(Hl)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Hl=!1,!1}),!0);var tc=function(t){if(ul){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,Vl.some((function(t){var e=t[il].options.emptyInsertThreshold;if(e&&!Ya(t)){var n=Ua(t),o=i>=n.left-e&&i<=n.right+e,a=r>=n.top-e&&r<=n.bottom+e;return o&&a?s=t:void 0}})),s);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[il]._onDragOver(n)}}var i,r,s},ec=function(t){ul&&ul.parentNode[il]._isOutsideThisEl(t.target)};function nc(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Ea({},e),t[il]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Zl(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==nc.supportPointer&&"PointerEvent"in window&&!Da,emptyInsertThreshold:5};for(var o in ll.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in Jl(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Xl,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Pa(t,"pointerdown",this._onTapStart):(Pa(t,"mousedown",this._onTapStart),Pa(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Pa(t,"dragover",this),Pa(t,"dragenter",this)),Vl.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ea(this,rl())}function oc(t,e,n,o,i,r,s,a){var l,c,d=t[il],h=d.options.onMove;return!window.CustomEvent||Na||_a?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=i||e,l.relatedRect=r||Ua(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),h&&(c=h.call(d,l,s)),c}function ic(t){t.draggable=!1}function rc(){Rl=!1}function sc(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function ac(t){return setTimeout(t,0)}function lc(t){return clearTimeout(t)}nc.prototype={constructor:nc,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Tl=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,ul):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=o.filter;if(function(t){Wl.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Wl.push(o)}}(n),!ul&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Da||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=Ha(a,o.draggable,n,!1))&&a.animated||vl===a)){if(wl=Za(a),Cl=Za(a,o.draggable),"function"==typeof c){if(c.call(this,t,a,this))return hl({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),dl("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=Ha(l,o.trim(),n,!1))return hl({sortable:e,rootEl:o,name:"filter",targetEl:a,fromEl:n,toEl:n}),dl("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!Ha(l,o.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,s=i.options,a=r.ownerDocument;if(n&&!ul&&n.parentNode===r){var l=Ua(n);if(gl=r,pl=(ul=n).parentNode,fl=ul.nextSibling,vl=n,El=s.group,nc.dragged=ul,Ml={target:ul,clientX:(e||t).clientX,clientY:(e||t).clientY},Dl=Ml.clientX-l.left,jl=Ml.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,ul.style["will-change"]="all",o=function(){dl("delayEnded",i,{evt:t}),nc.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!Aa&&i.nativeDraggable&&(ul.draggable=!0),i._triggerDragStart(t,e),hl({sortable:i,name:"choose",originalEvent:t}),Fa(ul,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){Wa(ul,t.trim(),ic)})),Pa(a,"dragover",tc),Pa(a,"mousemove",tc),Pa(a,"touchmove",tc),Pa(a,"mouseup",i._onDrop),Pa(a,"touchend",i._onDrop),Pa(a,"touchcancel",i._onDrop),Aa&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ul.draggable=!0),dl("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(_a||Na))o();else{if(nc.eventCanceled)return void this._onDrop();Pa(a,"mouseup",i._disableDelayedDrag),Pa(a,"touchend",i._disableDelayedDrag),Pa(a,"touchcancel",i._disableDelayedDrag),Pa(a,"mousemove",i._delayedDragTouchMoveHandler),Pa(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&Pa(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ul&&ic(ul),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;La(t,"mouseup",this._disableDelayedDrag),La(t,"touchend",this._disableDelayedDrag),La(t,"touchcancel",this._disableDelayedDrag),La(t,"mousemove",this._delayedDragTouchMoveHandler),La(t,"touchmove",this._delayedDragTouchMoveHandler),La(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Pa(document,"pointermove",this._onTouchMove):Pa(document,e?"touchmove":"mousemove",this._onTouchMove):(Pa(ul,"dragend",this),Pa(gl,"dragstart",this._onDragStart));try{document.selection?ac((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if($l=!1,gl&&ul){dl("dragStarted",this,{evt:e}),this.nativeDraggable&&Pa(document,"dragover",ec);var n=this.options;!t&&Fa(ul,n.dragClass,!1),Fa(ul,n.ghostClass,!0),nc.active=this,t&&this._appendGhost(),hl({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Nl){this._lastX=Nl.clientX,this._lastY=Nl.clientY,Kl();for(var t=document.elementFromPoint(Nl.clientX,Nl.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Nl.clientX,Nl.clientY))!==e;)e=t;if(ul.parentNode[il]._isOutsideThisEl(t),e)do{if(e[il]){if(e[il]._onDragOver({clientX:Nl.clientX,clientY:Nl.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=$a(e));Ql()}},_onTouchMove:function(t){if(Ml){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=ml&&Ra(ml,!0),s=ml&&r&&r.a,a=ml&&r&&r.d,l=Ul&&zl&&Ja(zl),c=(i.clientX-Ml.clientX+o.x)/(s||1)+(l?l[0]-Bl[0]:0)/(s||1),d=(i.clientY-Ml.clientY+o.y)/(a||1)+(l?l[1]-Bl[1]:0)/(a||1);if(!nc.active&&!$l){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(ml){r?(r.e+=c-(_l||0),r.f+=d-(Al||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Ba(ml,"webkitTransform",h),Ba(ml,"mozTransform",h),Ba(ml,"msTransform",h),Ba(ml,"transform",h),_l=c,Al=d,Nl=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!ml){var t=this.options.fallbackOnBody?document.body:gl,e=Ua(ul,!0,Ul,!0,t),n=this.options;if(Ul){for(zl=t;"static"===Ba(zl,"position")&&"none"===Ba(zl,"transform")&&zl!==document;)zl=zl.parentNode;zl!==document.body&&zl!==document.documentElement?(zl===document&&(zl=qa()),e.top+=zl.scrollTop,e.left+=zl.scrollLeft):zl=qa(),Bl=Ja(zl)}Fa(ml=ul.cloneNode(!0),n.ghostClass,!1),Fa(ml,n.fallbackClass,!0),Fa(ml,n.dragClass,!0),Ba(ml,"transition",""),Ba(ml,"transform",""),Ba(ml,"box-sizing","border-box"),Ba(ml,"margin",0),Ba(ml,"top",e.top),Ba(ml,"left",e.left),Ba(ml,"width",e.width),Ba(ml,"height",e.height),Ba(ml,"opacity","0.8"),Ba(ml,"position",Ul?"absolute":"fixed"),Ba(ml,"zIndex","100000"),Ba(ml,"pointerEvents","none"),nc.ghost=ml,t.appendChild(ml),Ba(ml,"transform-origin",Dl/parseInt(ml.style.width)*100+"% "+jl/parseInt(ml.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;dl("dragStart",this,{evt:t}),nc.eventCanceled?this._onDrop():(dl("setupClone",this),nc.eventCanceled||((bl=nl(ul)).removeAttribute("id"),bl.draggable=!1,bl.style["will-change"]="",this._hideClone(),Fa(bl,this.options.chosenClass,!1),nc.clone=bl),n.cloneId=ac((function(){dl("clone",n),nc.eventCanceled||(n.options.removeCloneOnHide||gl.insertBefore(bl,ul),n._hideClone(),hl({sortable:n,name:"clone"}))})),!e&&Fa(ul,i.dragClass,!0),e?(Hl=!0,n._loopId=setInterval(n._emulateDragOver,50)):(La(document,"mouseup",n._onDrop),La(document,"touchend",n._onDrop),La(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,ul)),Pa(document,"drop",n),Ba(ul,"transform","translateZ(0)")),$l=!0,n._dragStartId=ac(n._dragStarted.bind(n,e,t)),Pa(document,"selectstart",n),kl=!0,Da&&Ba(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,r=this.el,s=t.target,a=this.options,l=a.group,c=nc.active,d=El===l,h=a.sort,u=Ol||c,p=this,m=!1;if(!Rl){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=Ha(s,a.draggable,r,!0),A("dragOver"),nc.eventCanceled)return m;if(ul.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return j(!1);if(Hl=!1,c&&!a.disabled&&(d?h||(o=pl!==gl):Ol===this||(this.lastPutMode=El.checkPull(this,c,ul,t))&&l.checkPut(this,c,ul,t))){if(i="vertical"===this._getDirection(t,s),e=Ua(ul),A("dragOverValid"),nc.eventCanceled)return m;if(o)return pl=gl,D(),this._hideClone(),A("revert"),nc.eventCanceled||(fl?gl.insertBefore(ul,fl):gl.appendChild(ul)),j(!0);var g=Ya(r,a.draggable);if(!g||function(t,e,n){var o=Ua(Ya(n.el,n.options.draggable)),i=ol(n.el,n.options,ml),r=10;return e?t.clientX>i.right+r||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>i.bottom+r||t.clientX>o.right&&t.clientY>o.top}(t,i,this)&&!g.animated){if(g===ul)return j(!1);if(g&&r===t.target&&(s=g),s&&(n=Ua(s)),!1!==oc(gl,r,ul,e,s,n,t,!!s))return D(),g&&g.nextSibling?r.insertBefore(ul,g.nextSibling):r.appendChild(ul),pl=r,k(),j(!0)}else if(g&&function(t,e,n){var o=Ua(Xa(n.el,0,n.options,!0)),i=ol(n.el,n.options,ml),r=10;return e?t.clientX<i.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<i.top-r||t.clientY<o.bottom&&t.clientX<o.left}(t,i,this)){var f=Xa(r,0,a,!0);if(f===ul)return j(!1);if(n=Ua(s=f),!1!==oc(gl,r,ul,e,s,n,t,!1))return D(),r.insertBefore(ul,f),pl=r,k(),j(!0)}else if(s.parentNode===r){n=Ua(s);var v,b,y,w=ul.parentNode!==r,x=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return o===s||i===a||o+r/2===s+l/2}(ul.animated&&ul.toRect||e,s.animated&&s.toRect||n,i),C=i?"top":"left",S=Ga(s,"top","top")||Ga(ul,"top","top"),E=S?S.scrollTop:void 0;if(Tl!==s&&(b=n[C],Il=!1,Fl=!x&&a.invertSwap||w),v=function(t,e,n,o,i,r,s,a){var l=o?t.clientY:t.clientX,c=o?n.height:n.width,d=o?n.top:n.left,h=o?n.bottom:n.right,u=!1;if(!s)if(a&&Ll<c*i){if(!Il&&(1===Pl?l>d+c*r/2:l<h-c*r/2)&&(Il=!0),Il)u=!0;else if(1===Pl?l<d+Ll:l>h-Ll)return-Pl}else if(l>d+c*(1-i)/2&&l<h-c*(1-i)/2)return function(t){return Za(ul)<Za(t)?1:-1}(e);if((u=u||s)&&(l<d+c*r/2||l>h-c*r/2))return l>d+c/2?1:-1;return 0}(t,s,n,i,x?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,Fl,Tl===s),0!==v){var O=Za(ul);do{O-=v,y=pl.children[O]}while(y&&("none"===Ba(y,"display")||y===ml))}if(0===v||y===s)return j(!1);Tl=s,Pl=v;var M=s.nextElementSibling,N=!1,_=oc(gl,r,ul,e,s,n,t,N=1===v);if(!1!==_)return 1!==_&&-1!==_||(N=1===_),Rl=!0,setTimeout(rc,30),D(),N&&!M?r.appendChild(ul):s.parentNode.insertBefore(ul,N?M:s),S&&el(S,0,E-S.scrollTop),pl=ul.parentNode,void 0===b||Fl||(Ll=Math.abs(b-Ua(s)[C])),k(),j(!0)}if(r.contains(ul))return j(!1)}return!1}function A(a,l){dl(a,p,xa({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:u,target:s,completed:j,onMove:function(n,o){return oc(gl,r,ul,e,n,Ua(n),t,o)},changed:k},l))}function D(){A("dragOverAnimationCapture"),p.captureAnimationState(),p!==u&&u.captureAnimationState()}function j(e){return A("dragOverCompleted",{insertion:e}),e&&(d?c._hideClone():c._showClone(p),p!==u&&(Fa(ul,Ol?Ol.options.ghostClass:c.options.ghostClass,!1),Fa(ul,a.ghostClass,!0)),Ol!==p&&p!==nc.active?Ol=p:p===nc.active&&Ol&&(Ol=null),u===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){A("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==u&&(u.animateAll(),u._ignoreWhileAnimating=null)),(s===ul&&!ul.animated||s===r&&!s.animated)&&(Tl=null),a.dragoverBubble||t.rootEl||s===document||(ul.parentNode[il]._isOutsideThisEl(t.target),!e&&tc(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function k(){xl=Za(ul),Sl=Za(ul,a.draggable),hl({sortable:p,name:"change",toEl:r,newIndex:xl,newDraggableIndex:Sl,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){La(document,"mousemove",this._onTouchMove),La(document,"touchmove",this._onTouchMove),La(document,"pointermove",this._onTouchMove),La(document,"dragover",tc),La(document,"mousemove",tc),La(document,"touchmove",tc)},_offUpEvents:function(){var t=this.el.ownerDocument;La(t,"mouseup",this._onDrop),La(t,"touchend",this._onDrop),La(t,"pointerup",this._onDrop),La(t,"touchcancel",this._onDrop),La(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;xl=Za(ul),Sl=Za(ul,n.draggable),dl("drop",this,{evt:t}),pl=ul&&ul.parentNode,xl=Za(ul),Sl=Za(ul,n.draggable),nc.eventCanceled||($l=!1,Fl=!1,Il=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),lc(this.cloneId),lc(this._dragStartId),this.nativeDraggable&&(La(document,"drop",this),La(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Da&&Ba(document.body,"user-select",""),Ba(ul,"transform",""),t&&(kl&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),ml&&ml.parentNode&&ml.parentNode.removeChild(ml),(gl===pl||Ol&&"clone"!==Ol.lastPutMode)&&bl&&bl.parentNode&&bl.parentNode.removeChild(bl),ul&&(this.nativeDraggable&&La(ul,"dragend",this),ic(ul),ul.style["will-change"]="",kl&&!$l&&Fa(ul,Ol?Ol.options.ghostClass:this.options.ghostClass,!1),Fa(ul,this.options.chosenClass,!1),hl({sortable:this,name:"unchoose",toEl:pl,newIndex:null,newDraggableIndex:null,originalEvent:t}),gl!==pl?(xl>=0&&(hl({rootEl:pl,name:"add",toEl:pl,fromEl:gl,originalEvent:t}),hl({sortable:this,name:"remove",toEl:pl,originalEvent:t}),hl({rootEl:pl,name:"sort",toEl:pl,fromEl:gl,originalEvent:t}),hl({sortable:this,name:"sort",toEl:pl,originalEvent:t})),Ol&&Ol.save()):xl!==wl&&xl>=0&&(hl({sortable:this,name:"update",toEl:pl,originalEvent:t}),hl({sortable:this,name:"sort",toEl:pl,originalEvent:t})),nc.active&&(null!=xl&&-1!==xl||(xl=wl,Sl=Cl),hl({sortable:this,name:"end",toEl:pl,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){dl("nulling",this),gl=ul=pl=ml=fl=bl=vl=yl=Ml=Nl=kl=xl=Sl=wl=Cl=Tl=Pl=Ol=El=nc.dragged=nc.ghost=nc.clone=nc.active=null,Wl.forEach((function(t){t.checked=!0})),Wl.length=_l=Al=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ul&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)Ha(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||sc(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];Ha(i,this.options.draggable,o,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Ha(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=ll.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Jl(n)},destroy:function(){dl("destroy",this);var t=this.el;t[il]=null,La(t,"mousedown",this._onTapStart),La(t,"touchstart",this._onTapStart),La(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(La(t,"dragover",this),La(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Vl.splice(Vl.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!yl){if(dl("hideClone",this),nc.eventCanceled)return;Ba(bl,"display","none"),this.options.removeCloneOnHide&&bl.parentNode&&bl.parentNode.removeChild(bl),yl=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(yl){if(dl("showClone",this),nc.eventCanceled)return;ul.parentNode!=gl||this.options.group.revertClone?fl?gl.insertBefore(bl,fl):gl.appendChild(bl):gl.insertBefore(bl,ul),this.options.group.revertClone&&this.animate(ul,bl),Ba(bl,"display",""),yl=!1}}else this._hideClone()}},ql&&Pa(document,"touchmove",(function(t){(nc.active||$l)&&t.cancelable&&t.preventDefault()})),nc.utils={on:Pa,off:La,css:Ba,find:Wa,is:function(t,e){return!!Ha(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:tl,closest:Ha,toggleClass:Fa,clone:nl,index:Za,nextTick:ac,cancelNextTick:lc,detectDirection:Zl,getChild:Xa,expando:il},nc.get=function(t){return t[il]},nc.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(nc.utils=xa(xa({},nc.utils),t.utils)),ll.mount(t)}))},nc.create=function(t,e){return new nc(t,e)},nc.version="1.15.3";var cc,dc,hc,uc,pc,mc,gc=[],fc=!1;function vc(){gc.forEach((function(t){clearInterval(t.pid)})),gc=[]}function bc(){clearInterval(mc)}var yc=tl((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,c=qa(),d=!1;dc!==n&&(dc=n,vc(),cc=e.scroll,i=e.scrollFn,!0===cc&&(cc=Ka(n,!0)));var h=0,u=cc;do{var p=u,m=Ua(p),g=m.top,f=m.bottom,v=m.left,b=m.right,y=m.width,w=m.height,x=void 0,C=void 0,S=p.scrollWidth,E=p.scrollHeight,O=Ba(p),M=p.scrollLeft,N=p.scrollTop;p===c?(x=y<S&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),C=w<E&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(x=y<S&&("auto"===O.overflowX||"scroll"===O.overflowX),C=w<E&&("auto"===O.overflowY||"scroll"===O.overflowY));var _=x&&(Math.abs(b-r)<=a&&M+y<S)-(Math.abs(v-r)<=a&&!!M),A=C&&(Math.abs(f-s)<=a&&N+w<E)-(Math.abs(g-s)<=a&&!!N);if(!gc[h])for(var D=0;D<=h;D++)gc[D]||(gc[D]={});gc[h].vx==_&&gc[h].vy==A&&gc[h].el===p||(gc[h].el=p,gc[h].vx=_,gc[h].vy=A,clearInterval(gc[h].pid),0==_&&0==A||(d=!0,gc[h].pid=setInterval(function(){o&&0===this.layer&&nc.active._onTouchMove(pc);var e=gc[this.layer].vy?gc[this.layer].vy*l:0,n=gc[this.layer].vx?gc[this.layer].vx*l:0;"function"==typeof i&&"continue"!==i.call(nc.dragged.parentNode[il],n,e,t,pc,gc[this.layer].el)||el(gc[this.layer].el,n,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&u!==c&&(u=Ka(u,!1)));fc=d}}),30),wc=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||i;s();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function xc(){}function Cc(){}xc.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=Xa(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:wc},Ea(xc,{pluginName:"revertOnSpill"}),Cc.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:wc},Ea(Cc,{pluginName:"removeOnSpill"}),nc.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?Pa(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Pa(document,"pointermove",this._handleFallbackAutoScroll):e.touches?Pa(document,"touchmove",this._handleFallbackAutoScroll):Pa(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?La(document,"dragover",this._handleAutoScroll):(La(document,"pointermove",this._handleFallbackAutoScroll),La(document,"touchmove",this._handleFallbackAutoScroll),La(document,"mousemove",this._handleFallbackAutoScroll)),bc(),vc(),clearTimeout(Va),Va=void 0},nulling:function(){pc=dc=cc=fc=mc=hc=uc=null,gc.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(pc=t,e||this.options.forceAutoScrollFallback||_a||Na||Da){yc(t,this.options,r,e);var s=Ka(r,!0);!fc||mc&&o===hc&&i===uc||(mc&&bc(),mc=setInterval((function(){var r=Ka(document.elementFromPoint(o,i),!0);r!==s&&(s=r,vc()),yc(t,n.options,r,e)}),10),hc=o,uc=i)}else{if(!this.options.bubbleScroll||Ka(r,!0)===qa())return void vc();yc(t,this.options,Ka(r,!1),!1)}}},Ea(t,{pluginName:"scroll",initializeByDefault:!0})}),nc.mount(Cc,xc);const Sc={add:{attr:t=>{const e=window.prompt(t.message.attr);if(e&&t.isDisabled(e))return window.alert(l.get("attributeNotPermitted",e||"")),Ec.add.attrs(t);let n;e&&(n=String(window.prompt(t.message.value,"")),t.addAction(e,n))},option:t=>{t.addAction()},condition:t=>{t.addAction(t)}},click:{btn:t=>{t.action()}},save:{form:qi}},Ec={init:function(t){const e=Object.keys(Sc);return this.opts=e.reduce(((e,n)=>(e[n]={...Sc[n],...t[n]},e)),t),this},add:{attrs:t=>Ec.opts.add.attr(t),options:t=>Ec.opts.add.option(t),conditions:t=>(t.template={if:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],then:[{target:"",targetProperty:"",assignment:"",value:""}]},Ec.opts.add.condition(t))},click:{btn:t=>Ec.opts.click.btn(t)},save:{form:t=>(Ec.opts.sessionStorage&&Fi.set(T,t),Kr.formeoSaved({formData:t}),Ec.opts.save.form(t))}},Oc=Object.freeze({type:"field",displayType:"slider"}),Mc=t=>({transform:`translateX(${t?`${t}px`:0})`});class Nc{constructor(t){n(this,"toggleTabbedLayout",(()=>{this.getPanelDisplay();const t=this.isTabbed;return this.panelsWrap.parentElement.classList.toggle("tabbed-panels",t),t&&this.panelNav.removeAttribute("style"),t})),n(this,"resizePanels",(()=>{this.toggleTabbedLayout();const t=this.panelsWrap.style,e=jd.getStyle(this.currentPanel,"height");return t.height=e,e})),this.opts=$i(Oc,t),this.panelDisplay=this.opts.displayType,this.activePanelIndex=0,this.panelNav=this.createPanelNav();const e=this.createPanelsWrap();this.nav=this.navActions();const o=new window.ResizeObserver((([{contentRect:{width:t}}])=>{this.currentWidth!==t&&(this.toggleTabbedLayout(),this.currentWidth=t,this.nav.setTranslateX(this.activePanelIndex,!1))})),i=window.setTimeout((()=>{o.observe(e),window.clearTimeout(i)}),$)}getPanelDisplay(){const t=this.panelsWrap,e=parseInt(jd.getStyle(t,"width"))>390?"tabbed":"slider",n="auto"===this.opts.displayType;return this.panelDisplay=n?e:this.opts.displayType||Oc.displayType,this.panelDisplay}createPanelsWrap(){const t=jd.create({className:"panels",content:this.opts.panels.map((({config:{label:t},...e})=>e))});return"field"===this.opts.type&&this.sortableProperties(t),this.panelsWrap=t,this.panels=t.children,this.currentPanel=this.panels[this.activePanelIndex],t}sortableProperties(t){const e=this,n=t.getElementsByClassName("field-edit-group");return Gr.forEach(n,((t,n)=>{t.fieldId=e.opts.id,t.isSortable&&nc.create(t,{animation:150,group:{name:"edit-"+t.editGroup,pull:!0,put:["properties"]},sort:!0,handle:".prop-order",onSort:t=>{e.propertySave(t.to),e.resizePanels()}})}))}createPanelNavLabels(){const t=this.opts.panels.map((t=>({tag:"h5",action:{click:t=>{const e=Ir(t.target,t.target.parentElement);this.currentPanel=this.panels[e];const n=t.target.parentElement.childNodes;this.nav.refresh(e),jd.removeClasses(n,"active-tab"),t.target.classList.add("active-tab")}},content:t.config.label}))),e={className:"panel-labels",content:{content:t}},[n]=t;return n.className="active-tab",jd.create(e)}createPanelNav(){this.labels=this.createPanelNavLabels();const t={tag:"button",attrs:{className:"next-group",title:l.get("controlGroups.nextGroup"),type:"button"},dataset:{toggle:"tooltip",placement:"top"},action:{click:t=>this.nav.nextGroup(t)},content:jd.icon("triangle-right")},e={tag:"button",attrs:{className:"prev-group",title:l.get("controlGroups.prevGroup"),type:"button"},dataset:{toggle:"tooltip",placement:"top"},action:{click:t=>this.nav.prevGroup(t)},content:jd.icon("triangle-left")};return jd.create({tag:"nav",attrs:{className:"panel-nav"},content:[e,this.labels,t]})}get isTabbed(){return"tabbed"===this.panelDisplay}navActions(){const t={},e=this.currentPanel.parentElement,n=this.labels.firstChild,o=this.currentPanel.parentElement.childNodes;this.activePanelIndex=Ir(this.currentPanel,e);let i={nav:0,panel:0},r={...i};const s=t=>{const e=n.children;return jd.removeClasses(o,"active-panel"),jd.removeClasses(e,"active-tab"),this.currentPanel=o[t],this.currentPanel.classList.add("active-panel"),e[t].classList.add("active-tab"),this.currentPanel},a=({offset:t,reset:o,duration:i=z,animate:s=!this.isTabbed})=>{const a=[Mc(r.panel),Mc(t.panel)],l=[Mc(r.nav),Mc(this.isTabbed?0:t.nav)];if(o){const[t]=a,[e]=l;a.push(t),l.push(e)}const c={easing:"ease-in-out",duration:s?i:0,fill:"forwards"},d=e.animate(a,c);n.animate(l,c);const h=()=>{this.panelsWrap.style.height=jd.getStyle(this.currentPanel,"height"),d.removeEventListener("finish",h),o||(r=t)};d.addEventListener("finish",h)};return t.setTranslateX=(t,o=!0)=>{var r;r=t||this.activePanelIndex,i={nav:-n.offsetWidth*r,panel:-e.offsetWidth*r},a({offset:i,animate:o})},t.refresh=e=>{void 0!==e&&(this.activePanelIndex=e,s(e)),this.resizePanels(),t.setTranslateX(this.activePanelIndex,!1)},t.nextGroup=()=>{const t=this.activePanelIndex+1;if(t!==o.length){const e=s(t);i={nav:-n.offsetWidth*t,panel:-e.offsetLeft},a({offset:i}),this.activePanelIndex++}else i={nav:r.nav-8,panel:r.panel-8},a({offset:i,reset:!0});return this.currentPanel},t.prevGroup=()=>{if(0!==this.activePanelIndex){const t=this.activePanelIndex-1,e=s(t);i={nav:-n.offsetWidth*t,panel:-e.offsetLeft},a({offset:i}),this.activePanelIndex--}else i={nav:8,panel:8},a({offset:i,reset:!0})},t}}const _c="f-autocomplete",Ac="highlight-component";let Dc,jc=Date.now();const kc=({name:t,id:e,...n})=>["config.label","attrs.id","meta.id"].reduce(((t,e)=>(t||(t=n.get(e)),t)),null)||"external"===t&&((...t)=>l.get(t.join("."))||$r(t.join(" ")))(t,e);class Tc{constructor(t,e,n){this.key=t,this.className=t.replace(/\./g,"-"),this.value=e,this.events=[],this.i18nKey=n,this.build()}build(){const t=t=>{const e=this.list,n=this.getActiveOption();let o=new Map([[38,()=>{const t=this.getPreviousOption(n);t&&this.selectOption(t)}],[40,()=>{const t=this.getNextOption(n);t&&this.selectOption(t)}],[13,()=>{n&&(this.selectOption(n),this.setValue(n),"none"===e.style.display?this.showList(n):this.hideList()),t.preventDefault()}],[27,()=>{this.hideList()}]]).get(t.keyCode);return o||(o=()=>!1),o()},e={focus:({target:e})=>{this.updateOptions(),e.parentElement.classList.add(`${this.className}-focused`);const n=jd.toggleElementsByStr(this.list.querySelectorAll("li"),e.value);e.addEventListener("keydown",t);const o=this.list.querySelector(".active-option")||n[0];this.showList(o)},blur:({target:e})=>{e.parentElement.classList.remove(`${this.className}-focused`),e.removeEventListener("keydown",t),this.hideList()},input:t=>{const e=jd.toggleElementsByStr(this.list.querySelectorAll("li"),t.target.value);if(0===t.target.value.length&&this.clearValue(),0===e.length)this.hideList();else{const t=this.getActiveOption()||e[0];this.showList(t)}this.hiddenField.value=t.target.value,this.value=t.target.value,this.runEvent("onChange",{target:this.hiddenField})}};return this.displayField=jd.create({tag:"input",autocomplete:"off",action:e,attrs:{type:"text",className:`${_c}-display-field`,value:this.label||this.value,placeholder:l.get(`${this.i18nKey}.${this.key}.placeholder`)}}),this.hiddenField=jd.create({tag:"input",attrs:{type:"hidden",className:this.className,value:this.value}}),this.list=jd.create({tag:"ul",attrs:{className:`${_c}-list`}}),this.dom=jd.create({children:[this.displayField,this.hiddenField,this.list],className:this.className,action:{onRender:()=>{const t=this.value&&Ad.getAddress(this.value);this.label=t&&kc(t),this.label&&(this.displayField.value=this.label),this.updateOptions()}}}),this.dom}updateOptions(){const t=Date.now();t-jc>$&&(jd.empty(this.list),this.generateOptions(),jc=t);(Dc||this.generateOptions()).forEach((t=>this.list.appendChild(t)))}generateOptions(){const t=(t=>{const e=[],n=Ad.flatList();return Object.entries(n).map((([n,o])=>{const i=kc(o);if(i){const r={tag:"span",content:` ${$r(o.name)}`,className:"component-type"},s=`${o.name}.${i}`;e.push(s);const a=((t,e)=>t.reduce(((t,n)=>t+(n===e)),0))(e,s),l={tag:"span",content:a>1&&`(${a})`,className:"component-label-count"};return jd.makeOption([n,[`${i} `,l,r]],t)}})).filter(Boolean)})(),e=t=>{const e=`${_c}-list-item`;return t.classList.contains(e)||(t=t.parentElement),t};return Dc=t.map((t=>{const n=t.value;let[o]=t.label;o=o.trim();const i={tag:"li",children:t.label,dataset:{value:n,label:o},className:`${_c}-list-item`,action:{mousedown:({target:t})=>{t=e(t),this.setValue(t),this.selectOption(t),this.hideList()},mouseover:({target:t})=>{t=e(t),this.removeHighlight(),this.highlightComponent(t)}}};return jd.create(i)})),Dc}hideList(t=this.list){Xr.slideUp(t,z),this.removeHighlight()}showList(t,e=this.list){this.selectOption(t),Xr.slideDown(e,z)}getActiveOption(t=this.list){const e=t.getElementsByClassName("active-option")[0];return e&&"none"!==e.style.display?e:null}getPreviousOption(t){let e=t;do{e=e?e.previousSibling:null}while(null!=e&&"none"===e.style.display);return e}getNextOption(t){let e=t;do{e=e?e.nextSibling:null}while(null!=e&&"none"===e.style.display);return e}selectOption(t,e=this.list){const n=e.querySelectorAll("li");for(let o=0;o<n.length;o++){const{dataset:{value:t}}=n[o];if(n[o].classList.remove("active-option"),t){const e=Ad.getAddress(t);e.dom&&e.dom.classList.remove(Ac)}}t&&(t.classList.add("active-option"),this.highlightComponent(t))}removeHighlight(){const t=document.getElementsByClassName(Ac);for(let e=0;e<t.length;e++)t[e].classList.remove(Ac)}highlightComponent(t){const{dataset:{value:e}}=t;if(e){const t=Ad.getAddress(e);t.dom&&t.dom.classList.add(Ac)}}clearValue(){this.selectOption(null),this.displayField.value="",this.hiddenField.value="",this.value="",this.runEvent("onChange",{target:this.hiddenField})}setValue(t){const{label:e,value:n}=t.dataset;this.displayField.value=e,this.hiddenField.value=n,this.value=n,this.runEvent("onChange",{target:this.hiddenField})}addEvent(t,e){this.events.push([t,e])}runEvent(t,e){this.events.forEach((([n,o])=>{n===t&&o(e)}))}}const Pc=(t,e)=>{const n=(t=>{const e=Ri(t),n={"field.property":B,...R},o=e?(i=t,Ad.getAddress(i).getData()):n[t];var i;return Object.keys(o).reduce(((t,e)=>(t[e]=e,t)),{})})(t);return Object.entries(n).reduce(((n,[o,i])=>{if("id"!==o){const r={tag:"option",content:l.get(`${t}.${o}`)||o.toLowerCase(),attrs:{value:i}};e===i&&(r.attrs.selected=!0),n.push(jd.create(r))}return n}),[])},Lc=(t,e)=>{jd.empty(t),e.forEach((e=>t.add(e)))},zc=({key:t,value:e,type:n="text",checked:o})=>{const i={tag:"input",attrs:{type:n,value:e,placeholder:l.get(`${t}.placeholder`)||$r(t)},className:t.replace(/\./g,"-"),config:{}};return o&&(i.attrs.checked=!0),i},$c=t=>{const e=l.get(t);if(e)return e;const n=t.split(".");return l.get(n[n.length-1])},Hc={autocomplete:(t,e,n)=>new Tc(t,e,n),string:(t,e)=>zc({key:t,value:e}),boolean:(t,e)=>zc({key:t,value:e,type:"selected"===t?"radio":"checkbox",checked:e}),number:(t,e)=>zc({key:t,value:e,type:"number"}),array:(t,e=[])=>({tag:"select",attrs:{placeholder:$c(`placeholder.${t}`)},className:t.replace(/\./g,"-"),options:e}),object:t=>Object.entries(t).map((([t,e])=>Hc[jd.childType(e)](t,e)))},Vc=["selected","checked"],Ic={boolean:(t,e)=>({click:({target:{checked:n}})=>{var o,i;"radio"===(null==(i=null==(o=e.data)?void 0:o.attrs)?void 0:i.type)&&e.set("options",e.data.options.map((t=>({...t,selected:!1})))),e.set(t,n),e.updatePreview()}}),string:(t,e)=>({input:({target:{value:n}})=>{e.set(t,n)}}),number:(t,e)=>({input:({target:{value:n}})=>{e.set(t,Number(n)),e.updatePreview()}}),array:(t,e)=>({change:({target:{value:n}})=>{e.set(t,n),e.updatePreview()}}),object:()=>({})};class Fc{constructor({key:t,data:e,index:o,field:i}){n(this,"generateConditionFields",((t,e)=>{const n={tag:"label",className:`condition-label ${t}-condition-label`,content:l.get(t)||t};return e.map(((e,o)=>{const i=[],r=Object.entries(e).map((([e,n])=>{const r=this.conditionInput(e,n,t,o);return r&&i.push([r.className,n.trim()].filter(Boolean).join("-")),r})).filter(Boolean),s=Fr(r,F.map((t=>`condition-${t}`)),"className||dom.className");return this.processConditionUIState(s),o||s.unshift(n),this.itemFieldGroups.push(s),{children:s,className:`f-condition-row ${t}-condition-row ${i.join(" ")}`}}))})),n(this,"processConditionUIState",(t=>{const e=e=>(e=e.split("|"),t.filter((t=>e.includes(t.className)))),n=t=>{t=Array.isArray(t)?t:[t];const e=setTimeout((()=>{t.forEach((t=>{t.dom&&(t=t.dom),t.style.display="none"})),clearTimeout(e)}),L)},o=t=>{t=Array.isArray(t)?t:[t];const e=setTimeout((()=>{t.forEach((t=>{t.dom&&(t=t.dom),t.removeAttribute("style")})),clearTimeout(e)}),L)},i=new Map([["condition-source",t=>{const i=e("condition-sourceProperty"),r=i[0],s=Ri(t.value)?t.value:"field.property",a=Pc(s,r.value);return Lc(r,a),t.value?o(i):n(i)}],["condition-target",t=>{const i=e("condition-targetProperty");return Bi(t.value)&&t.value?o(i):n(i)}],["condition-sourceProperty",t=>{const i=e("condition-comparison|condition-targetProperty|condition-target"),r=t.value;return(t=>/^is|^has/.test(t))(r.substring(r.lastIndexOf(".")+1,r.length))?n(i):o(i)}]]);t.forEach((t=>{const e=i.get(t.className);e&&e(t)}))})),n(this,"conditionInput",((t,e,n,o)=>{const i=this.field,r=`${this.itemKey}.${n}.${o}`,s=`${this.field.id}.${r}`,a=`${i.name}s.${s}.${t}`,l=(t,e,n)=>{const o=Pc(n||t,e),i=Hc.array(`condition.${t}`);i.action={change:c,onRender:t=>c({target:t})};const r=jd.create(i);return Lc(r,o),r},c=({target:t})=>{const e=t.closest(".f-condition-row"),n=new RegExp(`${t.className}(?:\\S?)+`,"gm");e.className=e.className.replace(n,""),e.classList.add([t.className,t.value].filter(Boolean).join("-"));const o={dataPath:a,value:t.value,src:t};Kr.formeoUpdated(o),Ad.setAddress(a,t.value);const i=t.closest(".f-condition-row"),r=Ir(i);this.processConditionUIState(this.itemFieldGroups[r])},d={comparison:t=>l("comparison",t),logical:t=>l("logical",t),source:(t,e="source")=>{const o=Hc.autocomplete(`condition.${e}`,t,n);return Ad.setConditionMap(t,i),o.addEvent("onChange",(t=>{Ad.removeConditionMap(Ad.getAddress(a)),c(t),Ad.setConditionMap(t.target.value,i)})),o},sourceProperty:t=>l("sourceProperty",t,"field.property"),targetProperty:t=>l("targetProperty",t,"field.property"),target:t=>d.source(t,"target"),value:t=>{const e=Hc.string("condition.value",t);return e.action={input:c},jd.create(e)},assignment:t=>l("assignment",t)};if(d[t])return d[t](e)})),this.itemValues=Fr(Object.entries(e),Vc,"0");const[r,s]=t.split(".");this.field=i,this.itemKey=t,this.itemIndex=o,this.panelName=r,this.isDisabled=i.isDisabledProp(s,r),this.isHidden=this.isDisabled&&i.config.panels[r].hideDisabled,this.isLocked=i.isLockedProp(s,r),this.dom=jd.create({tag:"li",className:[`field-${t.replace(/\./g,"-")}`,"prop-wrap",this.isHidden&&"hidden-property"],children:{className:"field-prop",children:[this.itemInputs,this.itemControls]}})}get itemInputs(){this.itemFieldGroups=[];return{className:`${this.panelName}-prop-inputs prop-inputs f-input-group`,children:this.itemValues.map((([t,e])=>{let n="conditions"===this.panelName?this.generateConditionFields(t,e):this.itemInput(t,e);return["selected","checked"].includes(t)&&(n={className:"f-addon",children:n}),n}))}}get itemControls(){if(this.isLocked){return{className:`${this.panelName}-prop-controls prop-controls`,content:[]}}const t={tag:"button",attrs:{type:"button",className:"prop-remove prop-control"},action:{click:()=>{Xr.slideUp(this.dom,250,(t=>{this.field.remove(this.itemKey),jd.remove(t),this.field.resizePanelWrap()}))}},content:jd.icon("remove")};return{className:`${this.panelName}-prop-controls prop-controls`,content:[t]}}itemInput(t,e){const n=jd.childType(e)||"string",o=Object.assign({},{config:{},attrs:{}},Hc[n](t,e)),i=this.itemKey.replace(/.\d+$/,(e=>`${e}.${t}`)),r=i.split(".").filter(isNaN).join("."),[s,a]=[[...this.itemKey.split("."),t],[t]].map((t=>[this.field.id,...t].filter(Boolean).join("-")));return o.config=Object.assign({},o.config,{label:"options"!==this.panelName&&$c(r),labelAfter:!1}),o.attrs=Object.assign({},o.attrs,{name:"checkbox"===o.attrs.type?`${a}[]`:a,id:s,disabled:this.isDisabled,locked:this.isLocked}),o.action={...Ic[n](i,this.field)},o}}class Bc{constructor(t,e,o){n(this,"addAttribute",((t,e)=>{const n=Hr(t),o=`attrs.${n}`;l.current[o]||l.put(o,qr(t)),"string"==typeof e&&["true","false"].includes(e)&&(e=JSON.parse(e)),this.field.set(`attrs.${t}`,e);const i=this.props.querySelector(`.field-attrs-${n}`),r=new Fc({key:o,data:{[n]:e},field:this.field});i?this.props.replaceChild(r.dom,i):this.props.appendChild(r.dom),this.field.resizePanelWrap()})),n(this,"addOption",(()=>{const t=this.field.data.meta.id,e=this.field.get("options"),n="select"===t?"option":t,o=l.get("newOptionLabel",{type:n})||"New Option",i=`options.${this.data.length}`,r={...e.length?Tr(e[e.length-1]):{},label:o,value:Hr(o)},s=new Fc({key:i,data:r,field:this.field,index:this.props.children.length});this.editPanelItems.push(s),this.props.appendChild(s.dom),this.field.set(i,r),this.field.resizePanelWrap()})),n(this,"addCondition",(t=>{const e=`conditions.${this.field.get("conditions").length}`,n=this.props.querySelector(`.field-${e.replace(".","-")}`),o=new Fc({key:e,data:t.template,field:this.field});n?this.props.replaceChild(o.dom,n):this.props.appendChild(o.dom),this.field.set(e,t.template),this.field.resizePanelWrap()})),this.type=jd.childType(t),this.data="object"===this.type?Object.entries(t):t,this.name=e,this.field=o,this.panelConfig=this.getPanelConfig(this.data)}getPanelConfig(t){return this.props=this.createProps(t),this.editButtons=this.createEditButtons(),{id:`${this.field.id}-${this.name}-panel`,config:{label:l.get(`panel.label.${this.name}`)},attrs:{className:`f-panel ${this.name}-panel`},children:[this.props,this.editButtons]}}createProps(t){this.editPanelItems=Array.from(t).map(((t,e)=>{const n="array"===this.type,o=[this.name,n?String(e):t[0]].join("."),i=n?t:{[t[0]]:t[1]};return new Fc({key:o,data:i,field:this.field})}));const e={tag:"ul",attrs:{className:["field-edit-group",`field-edit-${this.name}`]},editGroup:this.name,isSortable:"options"===this.name,content:this.editPanelItems};return jd.create(e)}createEditButtons(){const t=this,e=this.name,n=l.get(`panelEditButtons.${e}`),o={attrs:t.addAttribute,options:t.addOption,conditions:t.addCondition};return{className:"panel-action-buttons",content:[{...jd.btnTemplate({content:n,title:n}),className:`add-${e}`,action:{click:n=>{const i={btnCoords:jd.coords(n.target),addAction:o[e]};"attrs"===e&&(i.isDisabled=t.field.isDisabledProp,i.isLocked=t.field.isLockedProp,i.message={attr:l.get(`action.add.${e}.attr`),value:l.get(`action.add.${e}.value`)});const r=$r(e),s=new window.CustomEvent(`onAdd${r}`,{detail:i});Ec.add[e](i),document.dispatchEvent(s)}}}]}}}class Rc extends ya{constructor(t,e={},o){super(t,{...e,id:e.id||zi()}),n(this,"mutationHandler",(t=>t.map((t=>{})))),n(this,"remove",(t=>{if(t){const e=t.split("."),n=e.pop(),o=this.get(e);return Array.isArray(o)?Vr(n)?o.splice(Number(n),1):this.set(e,o.filter((t=>t!==n))):delete o[n],o}if("stage"===this.name)return null;const e=this.parent,n=this.children;return Br(n,(t=>t.remove())),this.dom.parentElement.removeChild(this.dom),((t,e)=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)})(Ad.getAddress(`${e.name}s.${e.id}.children`),this.id),e.children.length||e.emptyClass(),"row"===e.name&&e.autoColumnWidths(),Ad[`${this.name}s`].delete(this.id)})),n(this,"emptyClass",(()=>this.dom.classList.toggle("empty",!this.children.length))),n(this,"getComponentTag",(()=>jd.create({tag:"span",className:["component-tag",`${this.name}-tag`],children:[(this.isColumn||this.isField)&&jd.icon("component-corner",["bottom-left"]),jd.icon(`handle-${this.name}`),$r(this.name),(this.isColumn||this.isRow)&&jd.icon("component-corner",["bottom-right"])].filter(Boolean)}))),n(this,"removeClasses",(t=>{const e={string:()=>this.dom.classList.remove(t),array:()=>t.map((t=>this.dom.classList.remove(t)))};return e.object=e.string,e[jd.childType(t)](this.dom)})),n(this,"loadChildren",((t=this.data.children)=>t.map((t=>this.addChild({id:t}))))),n(this,"saveChildOrder",(()=>{if(this.render)return;const t=this.children.map((({id:t})=>t));return this.set("children",t),t})),n(this,"onSort",(()=>this.saveChildOrder())),n(this,"onEnd",(({to:{parentElement:t},from:{parentElement:e}})=>{null==t||t.classList.remove(`hovering-${Pi(t)}`),null==e||e.classList.remove(`hovering-${Pi(e)}`)})),n(this,"runConditions",(()=>{const t=this.get("conditions");if(!(null==t?void 0:t.length))return null;return t.map((t=>{const e=this.processConditions(t.if),n=this.processResults(t.then);return e.map((t=>this.evaluateConditions(t)&&this.execResults(n)))}))})),n(this,"value",((t,e)=>{const n=t.split("."),o=this.getComponent(t),i=o&&n.slice(2,n.length).join(".");return[!o,!i,!B[i]].some(Boolean)?t:e?o.set(B[i],e):o.get(B[i])})),n(this,"getResult",(t=>({"=":(t,e,n)=>t.set(e,n)}[t]))),n(this,"processResults",(t=>t.map((({operator:t,target:e,value:n})=>{const o=this.getComponent(e);return{target:o,propertyPath:o&&e.split(".").slice(2,e.length).join("."),action:this.getResult(t),value:this.value(n)}})))),n(this,"execResults",(t=>{const e=t.map((t=>this.execResult(t)));return Promise.all(e)})),n(this,"execResult",(({target:t,action:e,value:n,propertyPath:o})=>new Promise(((o,i)=>{try{return o(e(t,n))}catch(r){return i(r)}})))),n(this,"cloneData",(()=>{const t={...Hi(this.data),id:zi()};return"field"!==this.name&&(t.children=[]),t})),n(this,"clone",((t=this.parent)=>{const e=t.addChild(this.cloneData(),this.index+1);return"field"!==this.name&&this.cloneChildren(e),e})),n(this,"createChildWrap",(t=>jd.create({tag:"ul",attrs:{className:"children"},children:t}))),this.id=this.data.id,this.name=t,this.config=Ad[`${this.name}s`].config,$i(this.config,e.config),this.dataPath=`${this.name}s.${this.id}.`,this.observer=new MutationObserver(this.mutationHandler),this.render=o}observe(t){this.observer.disconnect(),this.observer.observe(t,{childList:!0})}get js(){return this.data}get json(){return this.data}empty(){const t=this.children.map((t=>t.remove()));return this.data.children=this.data.children.filter((e=>-1===t.indexOf(e))),this.dom.classList.add("empty"),t}getActionButtons(){const t=[`hovering-${this.name}`,"hovering"];return{className:[`${this.name}-actions`,"group-actions"],action:{mouseenter:({target:e})=>{Ad.stages.active.dom.classList.add(`active-hover-${this.name}`),this.dom.classList.add(...t)},mouseleave:({target:e})=>{this.dom.classList.remove(...t),Ad.stages.active.dom.classList.remove(`active-hover-${this.name}`),e.removeAttribute("style")}},children:[{...jd.btnTemplate({content:jd.icon(`handle-${this.name}`)}),className:["component-handle",`${this.name}-handle`]},{className:["action-btn-wrap",`${this.name}-action-btn-wrap`],children:this.buttons}]}}toggleEdit(t=!this.isEditing){this.isEditing=t;const e=this.dom,n="editing",o=`${n}-${this.name}`,i=this.dom.querySelector(`.${this.name}-edit`);Xr.slideToggle(i,L,t),"field"===this.name&&(Xr.slideToggle(this.preview,L,!t),e.parentElement.classList.toggle(`column-${o}`,t)),e.classList.toggle(n,t),e.classList.toggle(o,t)}get buttons(){const t=this;if(this.actionButtons)return this.actionButtons;const e={handle:(t=`handle-${this.name}`)=>({...jd.btnTemplate({content:jd.icon(t)}),className:["component-handle"]}),move:(t="move")=>({...jd.btnTemplate({content:jd.icon(t)}),className:["item-move"],meta:{id:"move"}}),edit:(e="edit")=>({...jd.btnTemplate({content:jd.icon(e)}),className:["item-edit-toggle"],meta:{id:"edit"},action:{click:e=>{t.toggleEdit()}}}),remove:(e="remove")=>({...jd.btnTemplate({content:jd.icon(e)}),className:["item-remove"],meta:{id:"remove"},action:{click:(e,n)=>{Xr.slideUp(t.dom,L,(()=>{if("column"===t.name){t.parent.autoColumnWidths(),t.remove()}else t.remove()}))}}}),clone:(t="copy")=>({...jd.btnTemplate({content:jd.icon(t)}),className:["item-clone"],meta:{id:"clone"},action:{click:()=>{this.clone(this.parent),"column"===this.name&&this.parent.autoColumnWidths()}}})},{buttons:n,disabled:o}=this.config.actionButtons,i=n.filter((t=>!o.includes(t))).map((t=>{var n;return(null==(n=e[t])?void 0:n.call(e))||t}));return this.actionButtons=i,this.actionButtons}get index(){return Ir(this.dom)}get parentType(){return D.get(this.name)}get parent(){const t=this.parentType;if(!this.dom||!t)return null;const e=this.dom.closest(`.${S[t]}`);return e&&jd.asComponent(e)}get children(){if(!this.dom)return[];const t=this.domChildren,e=A.get(this.name);return Rr(t,(t=>Ad.getAddress(`${e}s.${t.id}`))).filter(Boolean)}get domChildren(){const t=this.dom.querySelector(".children");return t?t.children:[]}addChild(t={},e=this.domChildren.length){var n,o;let i=t;"object"!=typeof t&&(i={id:i});const r=this.dom.querySelector(".children"),{id:s=zi()}=i,a=A.get(this.name);if(!a)return null;const l=`${a}s`,c=Ad.getAddress(`${l}.${s}`)||Ad[l].add(s,i);r.insertBefore(c.dom,r.children[e]),null==(o=null==(n=this.config.events)?void 0:n.onAddChild)||o.call(n,{parent:this,child:c});const d=c.get("children");return(null==d?void 0:d.length)&&c.loadChildren(d),this.removeClasses("empty"),this.saveChildOrder(),c}onAdd({from:t,to:e,item:n,newIndex:o}){var i;t.classList.contains(h)||(t=t.parentElement);const r=Pi(t),s=Pi(e.parentElement),a=new Map([[-2,()=>{const t=this.addChild({},o).addChild();return t.addChild.bind(t)}],[-1,()=>{const t=this.addChild({},o);return t.addChild.bind(t)}],[0,()=>this.addChild.bind(this)],[1,t=>{const e=Ir(this.dom);return()=>this.parent.addChild(t,e+1)}],[2,t=>()=>this.parent.parent.addChild(t)]]),l={controls:()=>{const{controlData:t}=sd.get(n.id),{meta:{id:e}}=t,i=e.startsWith("layout-")?e.replace(/^layout-/,""):"field",r=jr({stage:{row:0,column:-1,field:-2},row:{row:1,column:0,field:-1},column:{row:2,column:1,field:0},field:1},`${this.name}.${i}`),s=a.get(r)();jd.remove(n);return s(t,o)},row:()=>{const t=(a.get({stage:-1,row:0,column:1}[s])||qi)();return null==t?void 0:t({id:n.id},o)},column:()=>{const t=(a.get({stage:-2,row:-1}[s])||qi)();return null==t?void 0:t(n.id)}},c=null==(i=l[r])?void 0:i.call(l,n,o);return(()=>{this.saveChildOrder(),this.removeClasses("empty")})(),c}onRemove({from:{parentElement:t}}){return t.classList.contains(m)&&t.classList.remove("column-editing-field"),"stage"===this.name||this.children.length?(this.emptyClass(),this.saveChildOrder()):this.remove()}onRender(){const{events:t}=this.config;if(!t)return null;t.onRender&&jd.onRender(this.dom,t.onRender)}set config(t){const e=jr(this.data,"meta.id"),n=[jr(t,"all"),e&&jr(t,e),jr(t,this.id)].reduce(((t,e)=>e?$i(t,e):t),this.configVal);this.configVal=n}get config(){return this.configVal}getComponent(t){const[e,n]=t.split("."),o=Ad[e];return n===this.id?this:null==o?void 0:o.get(n)}cloneChildren(t){for(const e of this.children)null==e||e.clone(t)}get isRow(){return this.name===x.row}get isColumn(){return this.name===x.column}get isField(){return this.name===x.field}}class Wc extends Rc{constructor(t=Object.create(null)){super("field",{conditions:[{if:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],then:[{target:"",targetProperty:"",assignment:"",value:""}]}],...t}),n(this,"updateConditionsPanel",(()=>{const t=setTimeout((()=>{const e=this.editPanels.find((({name:t})=>"conditions"===t));if(!e)return null;const n=e.createProps(),o=this.dom.querySelector(".field-edit-conditions");o.parentElement.replaceChild(n,o),clearTimeout(t)}),L)})),n(this,"updatePreview",Wi((()=>{if(!this.preview.parentElement)return null;this.updateLabel();const t=jd.create(this.fieldPreview(),!0);this.preview.parentElement.replaceChild(t,this.preview),this.preview=t}),L)),n(this,"isDisabledProp",((t,e="attrs")=>{const n=this.config.panels[e];if(!n)return!1;return n.disabled.concat(this.get(`config.disabled${$r(e)}`)).includes(t)})),n(this,"isLockedProp",((t,e="attrs")=>{const n=this.config.panels[e];if(!n)return!1;return n.locked.concat(this.get(`config.locked${$r(e)}`)).includes(t)})),this.label=jd.create(this.labelConfig),this.preview=jd.create(this.fieldPreview()),this.editPanels=[];const e=this.getActionButtons(),o=this.actionButtons.some((t=>{var e;return"edit"===(null==(e=t.meta)?void 0:e.id)}));let i={tag:"li",attrs:{className:g},id:this.id,children:[this.label,this.getComponentTag(),e,o&&this.fieldEdit,this.preview].filter(Boolean),panelNav:this.panelNav,dataset:{hoverTag:l.get("field")}};i=jd.create(i),this.observe(i),this.dom=i,this.isEditing=!1,this.onRender(i)}get labelConfig(){if(!!this.get("config.hideLabel"))return;const t=this.get("config.editorLabel")||this.get("config.label"),e=this.get("attrs.required"),n=this.config.label.disableHTML;return{className:"prev-label",children:[{...(()=>{const e={tag:"label",attrs:{}};return n?(e.tag="input",e.attrs.value=t,e):(e.attrs.contenteditable=!0,e.children=t,e)})(),action:{input:({target:{innerHTML:t,innerText:e,value:o}})=>{super.set("config.label",n?o:t);const i=Ad.getConditionMap(`fields.${this.id}`);if(i)return i.updateConditionSourceLabel(`${this.name}s.${this.id}`,n?o:e)}}},e&&jd.requiredMark()]}}updateConditionSourceLabel(t,e){const n=this.editPanels.find((({name:t})=>"conditions"===t));if(!n)return null;for(const{itemFieldGroups:o}of n.editPanelItems)for(const n of o){const o=n.find((e=>e.value===t));o&&(o.displayField.value=e)}}set(...t){const[e,n]=t,o=super.set(e,n);return this.updatePreview(),o}updateLabel(){if(!this.label)return null;const t=jd.create(this.labelConfig);this.label.parentElement.replaceChild(t,this.label),this.label=t}get fieldEdit(){this.editPanels=[];const t=["object","array"],e=["config","meta","action","events",...this.config.panels.disabled],n={className:["field-edit","slide-toggle","formeo-panels-wrap"]};Li([...this.config.panels.order,...Object.keys(this.data)]).filter((t=>!e.includes(t))).forEach((e=>{const n=this.get(e),o=jd.childType(n);if(t.includes(o)){const t=new Bc(n,e,this);this.editPanels.push(t)}}));const o={panels:this.editPanels.map((({panelConfig:t})=>t)),id:this.id,displayType:"auto"},i=this.editPanels.length;return i&&(this.panels=new Nc(o),n.className.push(`panel-count-${i}`),n.content=[this.panels.panelNav,this.panels.panelsWrap],this.panelNav=this.panels.nav,this.resizePanelWrap=this.panels.nav.refresh,n.action={onRender:()=>{if(this.resizePanelWrap(),!i){const t=this.dom,e=t.querySelector(".item-edit-toggle"),n=t.querySelector(".field-actions"),o=n.getElementsByTagName("button");n.style.maxWidth=o.length*o[0].clientWidth+"px",jd.remove(e)}}}),n}fieldPreview(){var t;const e=Hi(this.data);e.id=`prev-${this.id}`,(null==(t=this.data)?void 0:t.config.editableContent)&&(e.attrs={...e.attrs,contenteditable:!0});return{attrs:{className:"field-preview",style:this.isEditing&&"display: none;"},content:jd.create(e,!0),action:{change:t=>{const{target:e}=t,{checked:n,type:o}=e;if(["checkbox","radio"].includes(o)){const t=+e.id.split("-").pop();"radio"===o&&this.set("options",this.get("options").map((t=>({...t,selected:!1}))));const i="checkbox"===o?"checked":"selected";this.set(`options.${t}.${i}`,n)}},click:t=>{"true"===t.target.contentEditable&&t.preventDefault()},input:t=>{["input","meter","progress","button"].includes(this.data.tag)&&super.set("attrs.value",t.target.value),t.target.contentEditable&&super.set("content",t.target.innerHTML)}}}}}const qc={js:[],css:[]},Uc=t=>new Promise(((e,n)=>{if(qc.js.includes(t))return e(t);const o=jd.create({tag:"script",attrs:{type:"text/javascript",async:!0,src:`//${(void 0).src}`},action:{load:()=>{qc.js.push(t),e(t)},error:()=>n(new Error(`${(void 0).src} failed to load.`))}}),i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(o,i)})),Gc=t=>{const e=(t=Array.isArray(t)?t:[t]).map((t=>new Promise(((e,n)=>{if(qc.css.includes(t))return e(t);const o=jd.create({tag:"link",attrs:{rel:"preload",href:t,as:"style"},action:{load:function n(){this.removeEventListener("load",n),this.rel="stylesheet",qc.css.push(t),e(t)},error:()=>n(new Error(`${(void 0).src} failed to load.`))}});document.head.appendChild(o)}))));return Promise.all(e)},Xc=t=>("string"==typeof t?Promise.resolve(t):t.text()).then((t=>{const e="formeo-sprite";let n=document.getElementById(e);return n||(n=jd.create({id:e,children:t,attrs:{hidden:!0,style:"display: none;"}}),document.body.insertBefore(n,document.body.childNodes[0])),n})),Yc=(t,e,n=Ui)=>new Promise(((o,i)=>fetch(t).then((t=>o(e?e(t):t))).catch((t=>i(new Error(n(t))))))),Zc={js:Uc,css:Gc};class Jc{constructor({events:t={},dependencies:e={},...o}={}){n(this,"parsedHtml",(t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.textContent})),this.events=t,this.controlData=o,this.depsLoaded=this.fetchDependencies(e)}onRenderPreview(){}fetchDependencies(t,e=!0){const n=Object.entries(t).map((([t,e])=>Zc[t](e)));return Promise.all(n)}on(t){const e={prerender:qi,renderComponent:qi,render:t=>{const e=()=>{this.onRender&&this.onRender(t)};this.depsLoaded.then((()=>{e()}))}};return t?e[t]:e}static i18n(t,e){const n=this.definition;let o=n.i18n||{};o=o[o.locale]||o.default||o;const i="object"==typeof o?o[t]:o;if(i)return i;let r=n.i18n;return"object"==typeof r&&(r=r[t]),o.get(r,e)}}const Kc=[{config:{label:"row"},meta:{group:"layout",icon:"rows",id:"layout-row"}},{config:{label:"column"},meta:{group:"layout",icon:"columns",id:"layout-column"}}];const Qc=(t,e=3)=>Array.from({length:e},((t,e)=>e+1)).map((e=>{const n="checkbox"===t?"checked":"selected";return{label:l.get("labelCount",{label:$r(t),count:e}),value:`${t}-${e}`,[n]:!e}}));const td=[class extends Jc{constructor(){super({tag:"button",attrs:{className:[{label:"grouped",value:"f-btn-group"},{label:"ungrouped",value:"f-field-group"}]},config:{label:l.get("controls.form.button"),hideLabel:!0},meta:{group:"common",icon:"button",id:"button"},options:[{label:l.get("button"),type:["button","submit","reset"].map(((t,e)=>({label:t,type:t}))),className:[{label:"default",value:"",selected:!0},{label:"primary",value:"primary"},{label:"danger",value:"error"},{label:"success",value:"success"},{label:"warning",value:"warning"}]}]})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"date",required:!1,className:""},config:{label:l.get("controls.form.input.date")},meta:{group:"common",icon:"calendar",id:"date-input"}})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"hidden",value:""},config:{label:l.get("hidden"),hideLabel:!0},meta:{group:"common",icon:"hidden",id:"hidden"}})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"number",required:!1,className:""},config:{label:l.get("number")},meta:{group:"common",icon:"hash",id:"number"}})}},class extends Jc{constructor(){super({tag:"textarea",config:{label:l.get("controls.form.textarea")},meta:{group:"common",icon:"textarea",id:"textarea"},attrs:{required:!1}})}},class extends Jc{constructor(){super({tag:"input",attrs:{required:!1,type:"text",className:""},config:{label:l.get("controls.form.input.text")},meta:{group:"common",icon:"text-input",id:"text-input"}})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"file",required:!1},config:{label:l.get("fileUpload")},meta:{group:"common",icon:"upload",id:"upload"}})}},class extends Jc{constructor(){super({tag:"select",config:{label:l.get("controls.form.select")},attrs:{required:!1,className:""},meta:{group:"common",icon:"select",id:"select"},options:Qc("option")})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"checkbox",required:!1},config:{label:l.get("controls.form.checkbox-group"),disabledAttrs:["type"]},meta:{group:"common",icon:"checkbox",id:"checkbox"},options:Qc("checkbox",1)})}},class extends Jc{constructor(){super({tag:"input",attrs:{type:"radio",required:!1},config:{label:l.get("controls.form.radio-group"),disabledAttrs:["type"]},meta:{group:"common",icon:"radio-group",id:"radio"},options:Qc("radio")})}}],ed=Array.from(Array(5).keys()).slice(1).map((t=>`h${t}`)),nd="controls.html.header";const od=[class extends Jc{constructor(){super({tag:ed[0],attrs:{tag:ed.map(((t,e)=>({label:t.toUpperCase(),value:t,selected:!e}))),className:""},config:{label:l.get(nd),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"header",id:"html.header"},content:l.get(nd)})}static get definition(){return{i18n:{header:"Header222"}}}get content(){return super.i18n(nd)}},class extends Jc{constructor(){super({tag:"p",attrs:{className:""},config:{label:l.get("controls.html.paragraph"),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"paragraph",id:"paragraph"},content:"Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment."})}},class extends Jc{constructor(){super({tag:"hr",config:{label:l.get("controls.html.divider"),hideLabel:!0},meta:{group:"html",icon:"divider",id:"divider"}})}},class extends Jc{constructor(){super({tag:"textarea",config:{label:"WYSIWYG",editableContent:!0},meta:{group:"html",icon:"rich-text",id:"tinymce"},attrs:{required:!1},action:{onRender:t=>{t.id&&(this.textareaID=t.id,window.tinymce.remove("textarea#"+t.id),window.tinymce.init({selector:"textarea#"+t.id}))}}})}}],id=Object.freeze({sortable:!0,elementOrder:{},groupOrder:[],groups:[{id:"layout",label:"controls.groups.layout",elementOrder:["row","column"]},{id:"common",label:"controls.groups.form",elementOrder:["button","checkbox"]},{id:"html",label:"controls.groups.html",elementOrder:["header","block-text"]}],disable:{groups:[],elements:[],formActions:[]},elements:[],container:null,panels:{displayType:"slider"}}),rd=[...td,...od,...Kc];const sd=new class{constructor(){n(this,"groupLabel",(t=>l.get(t)||t||"")),n(this,"addElement",(t=>{const e=jr(this.get(t),"controlData"),{meta:{group:n,id:o}}=e,i={row:()=>Cd.active.addChild(),column:()=>i.row().addChild(),field:t=>i.column().addChild(t)};return"layout"!==n?i.field(e):i[o.replace("layout-","")]()})),n(this,"applyOptions",((t={})=>{const{container:e,elements:n,groupOrder:o,...i}=$i(id,t);this.container=e,this.groupOrder=Li(o.concat(["common","html","layout"])),this.elements=n.concat(rd),this.options=i})),this.data=new Map,this.controlEvents={focus:({target:t})=>{const e=t.closest(`.${h}`);return e&&this.panels.nav.refresh(Ir(e))},click:({target:t})=>this.addElement(t.parentElement.id)}}init(t,e=!1){return this.applyOptions(t),this.registerControls(),this.buildDOM(e),this}registerControls(){return this.controls=this.elements.map((t=>{const e="function"==typeof t,n=e?new t:new Jc(t),{controlData:{meta:o,config:i}}=n,r=e?i.label:l.get(i.label)||i.label,{id:s}=this.add(n),a={tag:"button",attrs:{type:"button"},content:[{tag:"span",className:"control-icon",children:jd.icon(o.icon)},r],action:this.controlEvents};return n.dom=jd.create({tag:"li",id:s,className:["field-control",`${o.group}-control`,`${o.id}-control`],content:a,meta:o}),n.dom})),this.controls}groupElements(){let t=this.options.groups.slice(),e=this.controls.slice(),n=[];const o=[];return t=Fr(t,this.groupOrder,"id"),t=t.filter((t=>Ti(t.id,this.options.disable.groups))),n=t.map((t=>{const n={tag:"ul",attrs:{className:h,id:`${t.id}-${h}`},config:{label:this.groupLabel(t.label)}};if(this.options.elementOrder[t.id]){const e=this.options.elementOrder[t.id],n=Li(e.concat(t.elementOrder));t.elementOrder=n}return e=Fr(e,t.elementOrder,"meta.id"),n.content=e.filter((e=>{const{controlData:n}=this.get(e.id),i=n.meta.id||"";let r=!0;return r=[Ti(i,this.options.disable.elements),n.meta.group===t.id,!o.includes(n.meta.id)].every((t=>!0===t)),r&&o.push(i),r})),n})),n}add(t=Object.create(null)){const{id:e,...n}=t,o=e||zi(),i=Hi(n);return this.data.set(o,i),{id:o,...i}}get(t){return this.data.get(t)}formActions(){if(!0===this.options.disable.formActions)return null;const t={...jd.btnTemplate({content:[jd.icon("bin"),l.get("clear")],title:l.get("clearAll")}),className:["clear-form"],action:{click:t=>{Sd.size?(Kr.confirmClearAll=new window.CustomEvent("confirmClearAll",{detail:{confirmationMessage:l.get("confirmClearAll"),clearAllAction:()=>{Cd.clearAll().then((()=>{const e={src:t.target};Kr.formeoCleared(e)}))},btnCoords:jd.coords(t.target)}}),document.dispatchEvent(Kr.confirmClearAll)):window.alert(l.get("cannotClearFields"))}}},e={...jd.btnTemplate({content:[jd.icon("floppy-disk"),l.get("save")],title:l.get("save")}),className:["save-form"],action:{click:({target:t})=>{const{formData:e}=Ad,n={action:()=>{},coords:jd.coords(t),message:"",button:t};return Ec.click.btn(n),Ec.save.form(e)}}};return{className:"form-actions f-btn-group",content:Object.entries({clearBtn:t,saveBtn:e}).reduce(((t,[e,n])=>(this.options.disable.formActions.includes(e)||t.push(n),t)),[])}}buildDOM(t){const e=this.groupElements(),n=this.formActions(),{displayType:o}=this.options.panels;this.panels=new Nc({panels:e,type:"controls",displayType:o});const i=["control-groups","formeo-panels-wrap",`panel-count-${e.length}`],r=jd.create({className:i,content:[this.panels.panelNav,this.panels.panelsWrap]}),s=["formeo-controls"];t&&s.push("formeo-sticky");const a=jd.create({className:s,content:[r,n]}),c=a.getElementsByClassName("control-group");this.dom=a,this.groups=c;const[d]=c;this.currentGroup=d,this.actions={filter:t=>{const e=""!==t,n=this.controls;let o=r.querySelector(".filtered-term");if(jd.toggleElementsByStr(n,t),e){const e=l.get("controls.filteringTerm",t);a.classList.add("filtered"),o?o.textContent=e:(o=jd.create({tag:"h5",className:"filtered-term",content:e}),r.insertBefore(o,r.firstChild))}else o&&(a.classList.remove("filtered"),o.remove())},addElement:this.addElement,addGroup:t=>{}};for(let l=c.length-1;l>=0;l--){const t=`formeo-controls-${c[l]}`;this.options.sortable||window.localStorage.removeItem(t),nc.create(c[l],{animation:150,forceFallback:!0,fallbackClass:"control-moving",fallbackOnBody:!0,group:{name:"controls",pull:"clone",put:!1},onStart:({item:t})=>{const{controlData:e}=this.get(t.id);this.options.ghostPreview&&(t.innerHTML="",t.appendChild(new Wc(e).preview))},onEnd:({from:t,item:e,clone:n})=>{t.contains(n)&&t.replaceChild(e,n)},sort:this.options.sortable,store:{get:()=>{const e=window.localStorage.getItem(t);return e?e.split("|"):[]},set:e=>{const n=e.toArray();window.localStorage.setItem(t,n.join("|"))}}})}return a}};class ad extends ya{constructor(){super(...arguments),n(this,"load",((t=Object.create(null))=>(this.empty(),"string"==typeof t&&(t=JSON.parse(t)),Object.entries(t).forEach((([t,e])=>this.add(t,e))),this.data))),n(this,"get",(t=>t?jr(this.data,t):this.add())),n(this,"add",((t,e=Object.create(null))=>{const n=t||zi(),o=this.Component({...e,id:n});return this.set(n,o),this.active=o,o})),n(this,"remove",(t=>(Array.isArray(t)?t.forEach((t=>{this.get(t).remove()})):this.get(t).remove(),this.data))),n(this,"delete",(t=>(delete this.data[t],t))),n(this,"clearAll",((t=!0)=>{const e=Object.values(this.data).map((e=>e.empty(t)));return Promise.all(e)})),n(this,"conditionMap",new Map)}set config(t){this.configVal=$i(this.configVal,Hi(t))}get config(){return this.configVal}}class ld extends Rc{constructor(t,e){super("stage",{...Object.freeze({children:[]}),...t},e);const n=this.createChildWrap();this.dom=jd.create({attrs:{className:[u,"empty"],id:this.id},children:n}),this.sortable=nc.create(n,{animation:150,fallbackClass:"row-moving",forceFallback:!0,group:{name:"stage",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onAdd:this.onAdd.bind(this),onRemove:this.onRemove.bind(this),onStart:()=>{cd.active=this},onSort:this.onSort.bind(this),draggable:`.${p}`,handle:".item-move"})}empty(t=!0){return new Promise((e=>{t?(this.dom.classList.add("removing-all-fields"),Xr.slideUp(this.dom,L,(()=>{e(super.empty(t)),this.dom.classList.remove("removing-all-fields"),Xr.slideDown(this.dom,L)}))):e(super.empty())}))}onAdd(...t){const e=super.onAdd(...t);e&&"column"===e.name&&e.parent.autoColumnWidths()}}const cd=new class extends ad{constructor(t){super("stages",t)}Component(t){return new ld(t)}};class dd extends Rc{constructor(t){super("row",{...Object.freeze({config:{fieldset:!1,legend:"",inputGroup:!1},children:[],className:[p]}),...t}),n(this,"autoColumnWidths",(()=>{const t=this.children;if(!t.length)return;const e=Number.parseFloat((100/t.length).toFixed(1))/1;for(const n of t){n.removeClasses(q);const t=n.dom,o=Ii(e);n.set("config.width",o),t.style.width=o,t.dataset.colWidth=o;const i=setTimeout((()=>{clearTimeout(i),n.refreshFieldPanels()}),z);document.dispatchEvent(Kr.columnResized)}this.updateColumnPreset()})),n(this,"updateColumnPreset",(()=>{this.columnPresetControl.innerHTML="";const t=this.getColumnPresetOptions.map((({label:t,...e})=>jd.create({tag:"option",content:t,attrs:e})));this.columnPresetControl.append(...t)})),n(this,"setColumnWidths",(t=>{"string"==typeof t&&(t=t.split(",")),this.children.forEach(((e,n)=>{e.setWidth(`${t[n]}%`),e.refreshFieldPanels()}))}));const e=this.createChildWrap();this.dom=jd.create({tag:"li",className:[p,"empty"],dataset:{hoverTag:l.get("row"),editingHoverTag:l.get("editing.row")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),this.editWindow,e]}),this.sortable=nc.create(e,{animation:150,fallbackClass:"column-moving",forceFallback:!0,group:{name:"row",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onRemove:this.onRemove.bind(this),onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),draggable:`.${m}`,handle:".item-move"})}get editWindow(){const t={tag:"input",id:`${this.id}-fieldset`,attrs:{type:"checkbox",checked:this.get("config.fieldset"),ariaLabel:l.get("row.settings.fieldsetWrap.aria")},action:{click:({target:{checked:t}})=>{this.set("config.fieldset",Boolean(t))}},config:{label:l.get("row.settings.fieldsetWrap")}},e={tag:"input",id:`${this.id}-inputGroup`,attrs:{type:"checkbox",checked:this.get("config.inputGroup"),ariaLabel:l.get("row.settings.inputGroup.aria")},action:{click:({target:{checked:t}})=>this.set("config.inputGroup",t)},config:{label:l.get("row.makeInputGroup"),description:l.get("row.makeInputGroupDesc")}},n={className:"input-group",content:{tag:"input",attrs:{type:"text",ariaLabel:"Legend for fieldset",value:this.get("config.legend"),placeholder:"Legend"},action:{input:({target:{value:t}})=>this.set("config.legend",t)},className:""}},o=jd.formGroup([t,n]),i={tag:"label",content:l.get("defineColumnWidths"),className:"col-sm-4 form-control-label"};this.columnPresetControl=jd.create(this.columnPresetControlConfig);const r={className:"col-sm-8",content:this.columnPresetControl,action:{onRender:()=>{this.updateColumnPreset()}}},s=[e,"hr",o,"hr",jd.formGroup([i,r],"row")];return jd.create({className:`${this.name}-edit group-config`,action:{onRender:t=>{const e=s.map((t=>jd.create(t)));t.append(...e)}}})}onAdd(...t){super.onAdd(...t),this.autoColumnWidths()}onRemove(...t){super.onRemove(...t),this.autoColumnWidths()}get getColumnPresetOptions(){const t=this.children,e=j.get(t.length-1)||[],n=t.map((t=>{const e=t.get("config.width")||"";return Number(e.replace("%","")).toFixed(1)})).join(",");if(e.length){const t=e.slice();return!t.find((t=>t.value===n))&&t.push({value:n,label:n.replace(/,/g," | "),className:f}),t.map((t=>{const e={...t};return e.selected=t.value===n,e}))}return[]}get columnPresetControlConfig(){return{tag:"select",attrs:{ariaLabel:l.get("defineColumnLayout"),className:v},action:{change:({target:t})=>{const{value:e}=t;this.setColumnWidths(e)}},options:this.getColumnPresetOptions}}}const hd={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]}};const ud=new class extends ad{constructor(t){super("rows",t),this.config={all:hd}}Component(t){return new dd(t)}};class pd{constructor(){this.onMove=this.onMove.bind(this),this.onStop=this.onStop.bind(this),this.cleanup=this.cleanup.bind(this)}getRowWidth(t){const e=t.querySelector(".children");if(!e)return 0;const n=e.children.length,o=jd.getStyle(e,"gap")||"0px",i=parseFloat(o,10)||0;return this.totalGapWidth=i*(n-1),e.offsetWidth-this.totalGapWidth}validateResizeTarget(t,e){return t&&e&&t.offsetWidth&&e.offsetWidth}onStart(t){if(t.preventDefault(),this.resized=!1,0!==t.button)return;const e=t.target.parentElement,n=e.nextSibling||e.previousSibling,o=e.closest(`.${p}`);if(this.validateResizeTarget(e,n))if(this.startX="touchstart"===t.type?t.touches[0].clientX:t.clientX,o.classList.add(b),this.columnPreset=o.querySelector(`.${v}`),this.originalColumnClass=e.className,this.originalSiblingClass=n.className,e.className=e.className.replace(q,""),n.className=n.className.replace(q,""),this.colStartWidth=e.offsetWidth,this.sibStartWidth=n.offsetWidth,this.rowWidth=this.getRowWidth(o),this.rowWidth<=0)this.cleanup();else{this.column=e,this.sibling=n,this.row=o;try{window.addEventListener("pointermove",this.onMove,!1),window.addEventListener("pointerup",this.onStop,!1)}catch(i){this.cleanup()}}else this.cleanup()}calculateNewWidths(t){const e=this.colStartWidth+t-this.startX,n=this.sibStartWidth-t+this.startX,o=parseFloat(Vi(e,this.rowWidth)),i=parseFloat(Vi(n,this.rowWidth));return o<10||i<10?null:{colWidth:Ii(o.toFixed(1)),siblingColWidth:Ii(i.toFixed(1))}}onMove(t){t.preventDefault();const{column:e,sibling:n}=this,o="touchmove"===t.type?t.touches[0].clientX:t.clientX,i=this.calculateNewWidths(o);if(!i)return;const{colWidth:r,siblingColWidth:s}=i;e.dataset.colWidth=r,n.dataset.colWidth=s,e.style.width=r,n.style.width=s,this.resized=!0}onStop(){const{column:t,sibling:e}=this;window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop),this.resized&&(this.setCustomWidthValue(),Ad.setAddress(`columns.${t.id}.config.width`,t.dataset.colWidth),Ad.setAddress(`columns.${e.id}.config.width`,e.dataset.colWidth),this.row.classList.remove(b),this.resized=!1,this.cleanup())}cleanup(){this.column&&this.originalColumnClass&&(this.column.className=this.originalColumnClass),this.sibling&&this.originalSiblingClass&&(this.sibling.className=this.originalSiblingClass),this.row&&this.row.classList.remove(b),window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop)}setCustomWidthValue(){const t=this.columnPreset;let e=t.querySelector(`.${f}`);const n=this.row.querySelector(".children").children,o=Rr(n,(t=>Vi(t.clientWidth,this.rowWidth).toFixed(1))),i=o.join(","),r=o.join(" | ");return e||(e=jd.create({tag:"option",attrs:{className:f,value:i,selected:!0},content:r}),t.append(e)),e.value=i,e.textContent=r,i}}const md=t=>({className:"resize-x-handle",action:{pointerdown:t.onStart.bind(t)},content:[jd.icon("triangle-down"),jd.icon("triangle-up")]}),gd=()=>({className:"column-edit group-config"});class fd extends Rc{constructor(t){super("column",{...Object.freeze({config:{width:"100%"},children:[],className:[m]}),...t}),n(this,"refreshFieldPanels",(()=>{this.children.forEach((t=>t.panels.nav.refresh()))})),n(this,"setWidth",(t=>(this.dom.dataset.colWidth=t,this.dom.style.width=t,this.set("config.width",t))));const e=this.createChildWrap();this.dom=jd.create({tag:"li",className:[m,"empty"],dataset:{hoverTag:l.get("column")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),gd(),md(new pd),e]}),this.processConfig(this.dom),Kr.columnResized=new window.CustomEvent("columnResized",{detail:{column:this.dom,instance:this}}),this.sortable=nc.create(e,{animation:150,fallbackClass:"field-moving",forceFallback:!0,group:{name:"column",pull:!0,put:["column","controls"]},sort:!0,disabled:!1,onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),onRemove:this.onRemove.bind(this),onMove:t=>{t.from!==t.to&&t.from.classList.remove("hovering-column")},draggable:`.${g}`,handle:".item-move"})}processConfig(t){const e=Gr.get(this.data,"config.width");e&&(t.dataset.colWidth=e,t.style.width=e)}}const vd={actionButtons:{buttons:["clone","move","remove"],disabled:[]}};const bd=new class extends ad{constructor(t){super("columns",t),this.config={all:vd}}Component(t){return new fd(t)}},yd={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]},panels:{disabled:[],attrs:{disabled:["type"],hideDisabled:!0,locked:[]},order:["attrs","options","conditions"]},label:{disableHTML:!1}};const wd=new class extends ad{constructor(t){super("fields",t),n(this,"get",(t=>{let e=t&&jr(this.data,t);if(!e){const n=sd.get(t);n&&(e=this.add(null,n.controlData))}return e})),this.config={all:yd}}Component(t){return new Wc(t)}};const xd=new class extends ad{constructor(t){super("externals",t)}Component(t){return new Rc("external",t)}},Cd=cd,Sd=ud,Ed=bd,Od=wd,Md=sd,Nd=xd,_d={id:zi()};const Ad=new class extends ya{constructor(t){super("components"),n(this,"sessionFormData",(()=>{var t;if(null==(t=this.opts)?void 0:t.sessionStorage)return Fi.get(T)})),n(this,"load",((t,e=this.opts||Object.create(null))=>{this.empty(),"string"==typeof t&&(t=JSON.parse(t)),this.opts=e;const{stages:n={[zi()]:{}},rows:o,columns:i,fields:r,id:s=zi()}={...this.sessionFormData(),...t};return this.set("id",s),this.add("stages",Cd.load(n)),this.add("rows",Sd.load(o)),this.add("columns",Ed.load(i)),this.add("fields",Od.load(r)),this.add("externals",Nd.load(e.external)),Object.values(this.get("stages")).forEach((t=>t.loadChildren())),this.data})),this.opts=t,this.data=_d,this.disableEvents=!0,this.stages=Cd,this.rows=Sd,this.columns=Ed,this.fields=Od,this.controls=Md,this.externals=Nd}flatList(t=this.data,e=Object.create(null)){return Object.entries(t).reduce(((t,[e,n])=>("object"==typeof n&&Object.entries(n).forEach((([n,o])=>{t[`${e}.${n}`]=o})),t)),e)}get json(){return window.JSON.stringify(this.formData)}get formData(){return{id:this.get("id"),stages:cd.getData(),rows:ud.getData(),columns:bd.getData(),fields:wd.getData()}}set config(t){const{stages:e,rows:n,columns:o,fields:i}=t;Cd.config=e,Sd.config=n,Ed.config=o,Od.config=i}setAddress(t,e){const[n,o,...i]=Array.isArray(t)?t:t.split("."),r=this[n.replace(/s?$/,"s")].get(o);return null==r||r.set(i,e),r}getAddress(t){if(!Bi(t))return;const[e,n,...o]=Array.isArray(t)?t:t.split("."),i=this[e.replace(/s?$/,"s")].get(n);return o.length?i.get(o):i}getConditionMap(t){if(Bi(t)){const e=t.split(".");return e.every((t=>Boolean(t)))&&this[e[0]].conditionMap.get(e[1])}}setConditionMap(t,e){if(Bi(t)){const n=t.split(".");return n.every((t=>Boolean(t)))&&this[n[0]].conditionMap.set(n[1],e)}}removeConditionMap(t){if(Bi(t)){const e=t.split(".");return e.every((t=>Boolean(t)))&&this[e[0]].conditionMap.delete(e[1])}}},Dd={glyphicons:t=>`<span class="glyphicon glyphicon-${t}" aria-hidden="true"></span>`,"font-awesome":t=>{const[e,n]=t.split(" ");return`<i class="${e} fa-${n}"></i>`},fontello:t=>`<i class="${U}${t}">${t}</i>`};const jd=new class{constructor(){n(this,"render",(t=>(t.id=`f-${t.id||zi()}`,this.create(t)))),n(this,"create",((t,e=!1)=>{if(!t)return;t=this.processTagName(t);const n=this;let o;const{tag:i}=t,r=["children","content"];let s;const a={attrs:{},className:[Gr.get(t,"config.inputWrap")||"f-field-group"],children:[],config:{}};let l=document.createElement(i);const c={string:t=>{l.innerHTML+=t},object:t=>t&&l.appendChild(n.create(t,e)),node:t=>l.appendChild(t),component:t=>l.appendChild(t.dom),array:t=>{for(const e of t)o=n.childType(e),c[o](e)},function:t=>{t=t(),o=n.childType(t),c[o](t)},undefined:()=>null,boolean:()=>null};if(r.push("tag"),t.className){const{className:e}=t;t.attrs=Object.assign({},t.attrs,{className:e}),delete t.className}if(t.options){let{options:o}=t;if(o=this.processOptions(o,t,e),!this.holdsContent(l)||"button"===i)return Gr.forEach(o,(t=>{a.children.push(n.create(t,e))})),t.attrs.className&&(a.className=t.attrs.className),a.config=Object.assign({},t.config),this.create(a,e);c.array.call(this,o),delete t.content,r.push("options")}if("OPTION"===l.tagName){const t=setTimeout((()=>{l.selected=!1,clearTimeout(t)}),0)}if(t.attrs&&(n.processAttrs(t,l,e),r.push("attrs")),t.config){if(t.config.label&&(t.config.label&&"button"!==i||["radio","checkbox"].includes(Gr.get(t,"attrs.type")))&&!e){const e=n.label(t);if(!t.config.hideLabel){const o=[...n.labelAfter(t)?[l,e]:[e,l]];a.children.push(o)}}r.push("config")}if(t.content||t.children){const e=t.content||t.children;o=n.childType(e),c[o],c[o].call(this,e)}if(t.dataset){for(const e in t.dataset)t.dataset.hasOwnProperty(e)&&(l.dataset[e]="function"==typeof t.dataset[e]?t.dataset[e]():t.dataset[e]);r.push("dataset")}t.action&&(this.actionHandler(l,t.action),r.push("action"));const d=Gr.subtract(r,Object.keys(t));for(s=d.length-1;s>=0;s--)l[d[s]]=t[d[s]];return a.children.length&&(l=this.create(a)),l})),n(this,"onRender",((t,e)=>{t.parentElement?e(t):window.requestAnimationFrame((()=>this.onRender(t,e)))})),n(this,"toggleElementsByStr",((t,e)=>{const n=[];return jd.elementsContainText(t,e,((t,e)=>{e?(t.style.display="block",n.push(t)):t.style.display="none"})),n})),n(this,"elementsContainText",((t,e,n)=>{const o=[];return Br(t,(t=>{const i=-1!==t.textContent.toLowerCase().indexOf(e.toLowerCase());null==n||n(t,i),i&&o.push(t)})),o})),n(this,"generateOption",(({type:t="option",label:e,value:n,i:o=0,selected:i})=>({tag:"option"===t?"option":"input",attrs:{type:t,value:n||`${t}-${o}`,["option"===t?"selected":"checked"]:i||!o},config:{label:e||l.get("labelCount",{label:l.get("option"),count:o})}}))),n(this,"makeOption",(([t,e],n,o)=>{const i={value:t,label:l.get(`${o}.${e}`)||e};return t===n&&(i.selected=!0),i})),n(this,"requiredMark",(()=>({tag:"span",className:"text-error",children:"*"}))),n(this,"removeEmpty",(t=>{const e=t.parentElement,n=Pi(t),o=e.getElementsByClassName(`formeo-${n}`);if(this.remove(t),!o.length){if(!this.isStage(e))return this.removeEmpty(e);this.emptyClass(e)}})),n(this,"btnTemplate",(({title:t="",...e})=>({tag:"button",attrs:{type:"button",title:t},...e}))),n(this,"isControls",(t=>Pi(t)===h)),n(this,"isStage",(t=>Pi(t)===u)),n(this,"isRow",(t=>Pi(t)===p)),n(this,"isColumn",(t=>Pi(t)===m)),n(this,"isField",(t=>Pi(t)===g)),n(this,"asComponent",(t=>Ad[`${Pi(t)}s`].get(t.id))),this.options=Object.create(null),this.styleSheet=(()=>{const t=document.createElement("style");return t.setAttribute("media","screen"),t.setAttribute("type","text/css"),t.appendChild(document.createTextNode("")),document.head.appendChild(t),t.sheet})()}set setOptions(t){this.options=$i(Object.assign({},this.options,t))}processTagName(t){let e;if("string"==typeof t&&(e=t,t={tag:e}),t.attrs){const{tag:n,...o}=t.attrs;if(n)if("string"==typeof n)e=n;else{e=(n.find((t=>!0===t.selected))||n[0]).value}t.attrs=o}return t.tag=e||t.tag||"div",t}actionHandler(t,e){const n={onRender:jd.onRender},o=["focus","blur"];return Object.entries(e).map((([e,i])=>{const r=n[e]||(s=e,(t,e)=>t.addEventListener(s,e,o.includes(s)));var s;return r(t,i)}))}get icons(){if(this.iconSymbols)return this.iconSymbols;const t=document.querySelectorAll("#formeo-sprite svg symbol");return this.iconSymbols=Array.from(t).reduce(((t,e)=>{var n;return t[e.id.replace(U,"")]=jd.create({tag:"svg",attrs:{className:`svg-icon ${n=e.id}`},children:[{tag:"use",attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":`#${n}`}}]}),t}),{}),this.iconSymbols}icon(t=null,e=[]){var n;if(!t)return;const o=this.icons[t];if(o){const t=o.cloneNode(!0);return t.classList.add(...e),t.outerHTML}return(null==(n=Dd[jd.options.iconFont])?void 0:n.call(Dd,t))||t}processAttrs(t,e,n){const{attrs:o={}}=t;n||!o.name&&this.isInput(t.tag)&&e.setAttribute("name",zi(t)),Object.keys(o).forEach((t=>{const n=Gr.safeAttrName(t);let i=o[t]||"";if(Array.isArray(i))if("object"==typeof i[0]){const t=i.filter((t=>!0===t.selected));i=t.length?t[0].value:i[0].value}else i=i.join(" ");if(i)if("OPTION"===e.tagName&&"selected"===n){const t=setTimeout((()=>{e.setAttribute(n,i),clearTimeout(t)}),0)}else e.setAttribute(n,i)}))}processOptions(t,e,n){const{action:o,attrs:i}=e,r=i.type||e.tag,s=i.id||e.id;return t.map(((t,i)=>{var a;const{label:l,...c}=t,d=()=>{const a={tag:"input",attrs:{name:s,type:r,value:t.value||"",id:`${s}-${i}`,...c},action:o},l={tag:"label",attrs:{for:`${s}-${i}`},config:{inputWrap:"form-check"},children:t.label},d={children:[a,l],className:[`f-${r}`]};return e.attrs.className&&(e.config.inputWrap=e.attrs.className),e.config.inline&&d.className.push(`f-${r}-inline`),t.selected&&(a.attrs.checked=!0),n&&(l.attrs.contenteditable=!0),d},h={select:()=>({tag:"option",attrs:t,children:t.label}),button:t=>{const{type:n,label:o,className:i,id:r}=t;return{...e,attrs:{type:n},className:i,id:r||zi(),options:void 0,children:o,action:e.action}},checkbox:d,radio:d};return null==(a=h[r])?void 0:a.call(h,t)}))}holdsContent(t){return-1!==t.outerHTML.indexOf("/")}isBlockInput(t){return!this.isInput(t)&&this.holdsContent(t)}isInput(t){return"string"!=typeof t&&(t=t.tagName),-1!==["input","textarea","select"].indexOf(t)}parsedHtml(t){const e=document.createElement("textarea");return e.innerHTML=t,e.textContent}labelAfter(t){const e=Gr.get(t,"attrs.type"),n=Gr.get(t,"config.labelAfter");return void 0!==n?n:"checkbox"===e||"radio"===e}label(t,e){const n=Gr.get(t,"attrs.required");let{config:{label:o=""}}=t;const{id:i,attrs:r}=t;"function"==typeof o&&(o=o());const s={tag:"label",attrs:{for:i||(null==r?void 0:r.id)},className:[],children:[o,n&&this.requiredMark()],action:{}};return e&&(delete s.attrs.for,s.attrs.contenteditable=!0,s.fMap=e),s}childType(t){return void 0===t?t:[["array",t=>Array.isArray(t)],["node",t=>t instanceof window.Node||t instanceof window.HTMLElement],["component",()=>null==t?void 0:t.dom],[typeof t,()=>!0]].find((e=>e[1](t)))[0]}getStyle(t,e=!1){let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n}getElement(t){return{node:()=>t,object:()=>document.getElementById(t.id),string:()=>document.getElementById(t)}[this.childType(t)]()}empty(t){for(;t.firstChild;)this.remove(t.firstChild);return t}remove(t){const e=Pi(t);return e?Ad.remove(`${e}s.${t.id}`):t.parentElement.removeChild(t)}removeClasses(t,e){const n={string:t=>t.classList.remove(e),array:t=>e.forEach((e=>t.classList.remove(e)))};n.object=n.string,Gr.forEach(t,n[this.childType(e)])}addClasses(t,e){const n={string:t=>t.classList.add(e),array:t=>e.forEach((e=>t.classList.add(e)))};Gr.forEach(t,n[this.childType(e)])}formGroup(t,e=""){return{className:["f-field-group",e],children:t}}coords(t){const e=t.getBoundingClientRect(),n=document.body.getBoundingClientRect();return{pageX:e.left+e.width/2,pageY:e.top-n.top-e.height/2}}clearStage(t){t.classList.add("removing-all-fields");Xr.slideUp(t,600,(()=>{jd.empty(t),t.classList.remove("removing-all-fields"),jd.emptyClass(t),Xr.slideDown(t,300)}))}toggleSortable(t,e){const n=Pi(t);if(!n)return;const o=Pi(t.parentElement),i=jd[n].get(t.id).sortable;e||(e=!i.option("disabled")),i.option("disabled",e),o&&["rows","columns","stages"].includes(o)&&this.toggleSortable(t.parentElement,e)}emptyClass(t){const e=t.getElementsByClassName(y.get(t.classList.item(0)));t.classList.toggle("empty",!e.length)}};l.addLanguage("en-US",'en-US = English\ndir = ltr\n\naction.add.attrs.attr = What attribute would you like to add?\naction.add.attrs.value = Default Value\naddOption = Add Option\nallFieldsRemoved = All fields were removed.\nallowSelect = Allow Select\nattribute = Attribute\nattributes = Attributes\nattrs.class = Class\nattrs.className = Class\nattrs.dir = Direction\nattrs.id = Id\nattrs.required = Required\nattrs.style = Style\nattrs.title = Title\nattrs.type = Type\nattrs.value = Value\nautocomplete = Autocomplete\nbutton = Button\ncannotBeEmpty = This field cannot be empty\ncheckbox = Checkbox\ncheckboxes = Checkboxes\nclass = Class\nclear = Clear\nclearAllMessage = Are you sure you want to clear all fields?\nclose = Close\ncolumn = Column\nconfirmClearAll = Are you sure you want to remove all fields?\ncontent = Content\ncontrol = Control\ncontrolGroups.nextGroup = Next Group\ncontrolGroups.prevGroup = Previous Group\ncontrols.form.button = Button\ncontrols.form.checkbox-group = Checkbox Group\ncontrols.form.input.date = Date\ncontrols.form.input.email = Email\ncontrols.form.input.file = File Upload\ncontrols.form.input.hidden = Hidden Input\ncontrols.form.input.number = Number\ncontrols.form.input.text = Text Input\ncontrols.form.radio-group = Radio Group\ncontrols.form.select = Select\ncontrols.form.textarea = TextArea\ncontrols.groups.form = Form Fields\ncontrols.groups.html = HTML Elements\ncontrols.groups.layout = Layout\ncontrols.html.divider = Divider\ncontrols.html.header = Header\ncontrols.html.paragraph = Paragraph\ncontrols.layout.column = Column\ncontrols.layout.row = Row\ncontrols.filteringTerm = Filtering "{term}"\ncopy = Copy To Clipboard\ndanger = Danger\ndescription = Help Text\ndescriptionField = Description\ndefineColumnLayout = Define a column layout\ndefineColumnWidths = Define column widths\nediting.row = Editing Row\neditorTitle = Form Elements\nfield = Field\nfieldNonEditable = This field cannot be edited.\nfieldRemoveWarning = Are you sure you want to remove this field?\nfileUpload = File Upload\nformUpdated = Form Updated\ngetStarted = Drag a field from the right to get started.\ngroup = Group\ngrouped = Grouped\nhidden = Hidden Input\nhide = Edit\nhtmlElements = HTML Elements\nif = If\ninfo = Info\ninput.date = Date\ninput.text = Text\nlabel = Label\nlabelCount = {label} {count}\nlabelEmpty = Field Label cannot be empty\nlayout = Layout\nlimitRole = Limit access to one or more of the following roles:\nmandatory = Mandatory\nmaxlength = Max Length\nmeta.group = Group\nmeta.icon = Ico\nmeta.label = Label\nminOptionMessage = This field requires a minimum of 2 options\nname = Name\nno = No\nnumber = Number\noff = Off\non = On\noption = Option\noptional = optional\noptionEmpty = Option value required\noptionLabel = Option {count}\noptions = Options\norder = Order\npanel.label.attrs = Attributes\npanel.label.conditions = Conditions\npanel.label.config = Configuration\npanel.label.meta = Meta\npanel.label.options = Options\npanelEditButtons.attrs = + Attribute\npanelEditButtons.options = + Option\npanelEditButtons.conditions = + Condition\nplaceholder = Placeholder\nplaceholder.className = space separated classes\nplaceholder.email = Enter you email\nplaceholder.label = Label\nplaceholder.password = Enter your password\nplaceholder.placeholder = Placeholder\nplaceholder.text = Enter some Text\nplaceholder.textarea = Enter a lot of text\nplaceholder.value = Value\npreview = Preview\nprimary = Primary\nremove = Remove\nremoveType = Remove {type}\nremoveMessage = Remove Element\nrequired = Required\nreset = Reset\nrichText = Rich Text Editor\nroles = Access\nrow = Row\nrow.makeInputGroup = Make this row an input group.\nrow.makeInputGroupDesc = Input Groups enable users to add sets of inputs at a time.\nrow.settings.fieldsetWrap = Wrap row in a <fieldset> tag\nrow.settings.fieldsetWrap.aria = Wrap Row in Fieldset\ncannotClearFields = There are no fields to clear\nsave = Save\nsecondary = Secondary\nselect = Select\nselectColor = Select Color\nselectionsMessage = Allow Multiple Selections\nselectOptions = Options\nseparator = Separator\nsettings = Settings\nsize = Size\nsizes = Sizes\nsizes.lg = Large\nsizes.m = Default\nsizes.sm = Small\nsizes.xs = Extra Small\nstyle = Style\nstyles = Styles\nstyles.btn = Button Style\nstyles.btn.danger = Danger\nstyles.btn.default = Default\nstyles.btn.info = Info\nstyles.btn.primary = Primary\nstyles.btn.success = Success\nstyles.btn.warning = Warning\nsubtype = Type\nsuccess = Success\ntext = Text Field\nthen = Then\ntoggle = Toggle\nungrouped = Un-Grouped\nwarning = Warning\nyes = Yes\nand = and\nor = or\nfield.property.value = value\nfield.property.label = label\nfield.property.valid = valid\nfield.property.invalid = not valid\nfield.property.isVisible = is visible\nfield.property.isNotVisible = is not visible\nnewOptionLabel = New {type}\noperator.visible = visible\noperator.notVisible = not visible\noperator.equals = equals\noperator.notEquals = not equal\noperator.contains = contains\noperator.notContains = not contains\ncondition.target.placeholder = target\nif.condition.target.placeholder = target / value\nif.condition.source.placeholder = source\nthen.condition.target.placeholder = target\ncondition.value.placeholder = value\nattributeNotPermitted = Attribute "{attribute}" is not permitted, please choose another.\n');const kd={get editor(){return{stickyControls:!1,allowEdit:!0,dataType:"json",debug:!1,sessionStorage:!1,editorContainer:null,external:{},svgSprite:null,iconFont:null,config:{},events:{},actions:{},controls:{},polyfills:Ur(),i18n:{location:"https://draggable.github.io/formeo/assets/lang/"}}}};let Td=class{constructor({formData:t,...e},n){const o=this,i=$i(kd.editor,e),{actions:r,events:s,debug:a,config:l,editorContainer:c,...d}=i;c&&(this.editorContainer="string"==typeof c?document.querySelector(c):c),this.opts=d,jd.setOptions=d,Ad.config=l,this.userFormData=n||t,this.Components=Ad,this.dom=jd,Kr.init({debug:a,...s}),Ec.init({debug:a,sessionStorage:d.sessionStorage,...r}),o.loadResources().then((()=>{d.allowEdit&&(o.edit=o.init.bind(o),o.init())}))}get formData(){return this.Components.formData}set formData(t={}){this.load({...this.userFormData,...t},this.opts)}get json(){return this.Components.json}loadResources(){const t=[];return this.opts.polyfills&&(t=>{const e=Array.isArray(t)?d.filter((({name:e})=>-1!==t.indexOf(e))):d;Promise.all(e.map((({src:t})=>Uc(t))))})(this.opts.polyfills),this.opts.style&&t.push(Gc(this.opts.style)),this.opts.svgSprite?t.push(Yc(this.opts.svgSprite,Xc,(()=>Yc("https://draggable.github.io/formeo/assets/img/formeo-sprite.svg",Xc)))):t.push(Xc('<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="f-i-autocomplete" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-bin" xmlns="http://www.w3.org/2000/svg"><path d="M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z"/></symbol><symbol id="f-i-button" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><metadata id="acmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="acrect4140" d="M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z"/><g id="aclayer1"><g id="actext4203"><g id="acg4212" transform="translate(0.10112835,0.1001358)"><path id="acpath4208" d="m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z"/><path id="acpath4210" d="m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z"/></g></g></g></symbol><symbol viewBox="0 0 32 32" id="f-i-calendar" xmlns="http://www.w3.org/2000/svg"><path d="M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z"/></symbol><symbol id="f-i-checkbox" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z"/></symbol><symbol id="f-i-checkbox-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-columns" xmlns="http://www.w3.org/2000/svg"><metadata id="agmetadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="agrect4860-3-5" d="M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z"/></symbol><symbol viewBox="0 0 2.1166668 2.1167197" id="f-i-component-corner" xmlns="http://www.w3.org/2000/svg"><g id="ahg2" transform="translate(-0.52916668)"><path class="ahcorner-fill" stroke="none" fill="inherit" d="M 0.52916668,5.3011818e-5 V 2.1167198 H 2.6458337 V 1.9849449 C 1.5496647,1.9849298 0.66092868,1.0962219 0.66094168,5.3011818e-5 Z m 0.131775,0 L 2.6458337,1.9849449 Z"/><path class="ahcorner-stroke" stroke-width="0.250546px" fill="none" stroke="inherit" d="m 2.645783,1.9848683 v 0 C 1.5496137,1.9848532 0.66100516,1.0962232 0.66101817,5.4327518e-5 v 0"/></g></symbol><symbol viewBox="0 0 32 32" id="f-i-copy" xmlns="http://www.w3.org/2000/svg"><path d="M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z"/></symbol><symbol id="f-i-divider" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><metadata id="ajmetadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><rect y="7" x="0" height="1" width="15" id="ajrect4182"/></symbol><symbol viewBox="0 0 28 32" id="f-i-edit" xmlns="http://www.w3.org/2000/svg"><path d="M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z"/></symbol><symbol fill="#000000" viewBox="0 0 24 24" id="f-i-email" xmlns="http://www.w3.org/2000/svg"><path d="M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-floppy-disk" xmlns="http://www.w3.org/2000/svg"><path d="M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle" xmlns="http://www.w3.org/2000/svg"><metadata id="aqmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="translate(0,-2)" id="aqg4220"><rect id="aqrect4191" width="2" height="2" x="2" y="7"/><rect id="aqrect4191-2" width="2" height="2" x="7" y="7"/><rect id="aqrect4191-4" width="2" height="2" x="12" y="7"/></g><g transform="translate(0,2)" id="aqg4220-6"><rect id="aqrect4191-40" width="2" height="2" x="2" y="7"/><rect id="aqrect4191-2-3" width="2" height="2" x="7" y="7"/><rect id="aqrect4191-4-9" width="2" height="2" x="12" y="7"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-column" xmlns="http://www.w3.org/2000/svg"><metadata id="anmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g id="ang1" transform="rotate(90,9.25,9.25)"><rect id="anrect4191-27" width="2" height="2" x="2" y="7"/><rect id="anrect4191-2-0" width="2" height="2" x="7" y="7"/><rect id="anrect4191-2-9-9" width="2" height="2" x="12" y="7"/><rect id="anrect4191-27-6" width="2" height="2" x="2" y="12"/><rect id="anrect4191-2-0-0" width="2" height="2" x="7" y="12"/><rect id="anrect4191-2-9-9-6" width="2" height="2" x="12" y="12"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-field" xmlns="http://www.w3.org/2000/svg"><metadata id="aometadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g id="aog1" transform="translate(0,-2.5)"><rect id="aorect4191-2-0" width="2" height="2" x="7" y="-11.5" transform="rotate(90)"/><rect id="aorect4191-2-9-9" width="2" height="2" x="12" y="-11.5" transform="rotate(90)"/><rect id="aorect4191-2-0-0" width="2" height="2" x="7" y="-6.5" transform="rotate(90)"/><rect id="aorect4191-2-9-9-6" width="2" height="2" x="12" y="-6.5" transform="rotate(90)"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-row" xmlns="http://www.w3.org/2000/svg"><metadata id="apmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g id="apg1" transform="translate(0,-2.5)"><rect id="aprect4191-27" width="2" height="2" x="2" y="7"/><rect id="aprect4191-2-0" width="2" height="2" x="7" y="7"/><rect id="aprect4191-2-9-9" width="2" height="2" x="12" y="7"/><rect id="aprect4191-27-6" width="2" height="2" x="2" y="12"/><rect id="aprect4191-2-0-0" width="2" height="2" x="7" y="12"/><rect id="aprect4191-2-9-9-6" width="2" height="2" x="12" y="12"/></g></symbol><symbol viewBox="0 0 448 512" id="f-i-hash" xmlns="http://www.w3.org/2000/svg"><g id="aricomoon-ignore"/><path fill="#000" d="M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z"/></symbol><symbol viewBox="0 0 28 28" id="f-i-header" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-hidden" xmlns="http://www.w3.org/2000/svg"><metadata id="atmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="atpath5816" d="M 1,5 2,5 2,4 1,4 Z"/><path id="atpath5814" d="M 3,5 4,5 4,4 3,4 Z"/><path id="atpath5812" d="M 5,5 6,5 6,4 5,4 Z"/><path id="atpath5810" d="M 7,5 8,5 8,4 7,4 Z"/><path id="atpath5808" d="M 9,5 10,5 10,4 9,4 Z"/><path id="atpath5806" d="m 11,5 1,0 0,-1 -1,0 z"/><path id="atpath5804" d="m 13,5 1,0 0,-1 -1,0 z"/><path id="atpath5800" d="M 0,6 1,6 1,5 0,5 Z"/><path id="atpath5798" d="m 15,6.9997352 1,0 0,-1 -1,0 z"/><path id="atpath5796" d="M 0,8 1,8 1,7 0,7 Z"/><path id="atpath5794" d="m 15,8.9997352 1,0 0,-1 -1,0 z"/><path id="atpath5792" d="m 0,10 1,0 0,-1.0000001 -1,0 z"/><path id="atpath5790" d="m 15,10.999735 1,0 0,-0.9999998 -1,0 z"/><path id="atpath5786" d="m 2,12 1,0 0,-1 -1,0 z"/><path id="atpath5784" d="m 4,12 1,0 0,-1 -1,0 z"/><path id="atpath5782" d="m 6,12 1,0 0,-1 -1,0 z"/><path id="atpath5780" d="m 8,12 1,0 0,-1 -1,0 z"/><path id="atpath5778" d="m 10,12 1,0 0,-1 -1,0 z"/><path id="atpath5776" d="m 12,12 1,0 0,-1 -1,0 z"/><path id="atrect5768" d="m 14,12 1,0 0,-1 -1,0 z"/><path d="m 15,5 1,0 0,-1 -1,0 z" id="atpath5827"/><path d="m 0,12 1,0 0,-1 -1,0 z" id="atpath5829"/></symbol><symbol viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="auicomoon-ignore"/><path d="M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z"/></symbol><symbol viewBox="0 0 16 32" id="f-i-minus" xmlns="http://www.w3.org/2000/svg"><path d="M0 14v4h16v-4h-16z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move" xmlns="http://www.w3.org/2000/svg"><path d="M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move-vertical" xmlns="http://www.w3.org/2000/svg"><metadata id="awmetadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="3440" inkscape:window-height="1416" id="awnamedview6" showgrid="false" inkscape:zoom="1.84375" inkscape:cx="421.4312" inkscape:cy="218.56484" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"/><path d="m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z" id="awpath4" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:connector-curvature="0" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:nodetypes="ccccccccccc"/></symbol><symbol viewBox="0 0 20 28" id="f-i-paragraph" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z"/></symbol><symbol id="f-i-phone-receiver" viewBox="0 0 578.106 578.106" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g><g><path d="M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol id="f-i-radio-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-remove" xmlns="http://www.w3.org/2000/svg"><metadata id="bbmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g id="bblayer1"><g transform="translate(170.37199,5.9577983)" id="bbg4172"><path id="bbrect4155" d="m -159.9194,-18.102955 87.322034,0 0,510.915285 -87.322034,0 z" transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)"/><path id="bbrect4155-5" d="m 193.69366,-139.19925 87.32204,0 0,510.91528 -87.32204,0 z" transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)"/></g></g></symbol><symbol id="f-i-rich-text" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-rows" xmlns="http://www.w3.org/2000/svg"><metadata id="bdmetadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="matrix(0,1,-1,0,3.0984025,11.835155)" id="bdg7209"><path id="bdrect4860-3-5" d="m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z"/></g></symbol><symbol id="f-i-select" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="beXMLID_1_" d="M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z"/></symbol><symbol viewBox="0 0 448 512" id="f-i-settings" xmlns="http://www.w3.org/2000/svg"><g id="bficomoon-ignore"/><path d="M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z"/></symbol><symbol id="f-i-text-input" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bgXMLID_10_" d="M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z"/></symbol><symbol id="f-i-textarea" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bhXMLID_1_" d="M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-down" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 12l11.992 11.992 11.992-11.992h-23.984z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-left" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 15.996l11.992 11.992v-23.984l-11.992 11.992z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-right" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-up" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M11.992 8l-11.992 11.992h23.984l-11.992-11.992z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-upload" xmlns="http://www.w3.org/2000/svg"><g id="bmicomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>')),t.push(l.init({...this.opts.i18n,locale:Fi.get(P)})),Promise.all(t)}init(){const t=this;this.load(this.userFormData,t.opts),this.controls=sd.init(t.opts.controls,t.opts.stickyControls),t.formId=Ad.get("id"),this.i18n={setLang:e=>{Fi.set(P,e);l.setCurrent(e).then((()=>{this.controls=sd.init(t.opts.controls),t.render()}),console.error)}},t.render()}load(t=this.userFormData,e=this.opts){return this.Components.load(t,e)}render(){const t=document.createElement("script");t.src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js",document.head.appendChild(t),this.stages=Object.values(Ad.get("stages")),this.opts.controlOnLeft&&this.stages.forEach((t=>{t.dom.style.order=1}));const e={attrs:{className:"formeo formeo-editor",id:this.formId},content:[this.stages.map((({dom:t})=>t))]};l.current.dir&&(e.attrs.dir=l.current.dir,jd.dir=l.current.dir),this.editor=jd.create(e);(this.controls.container||this.editor).appendChild(this.controls.dom),this.editorContainer&&(jd.empty(this.editorContainer),this.editorContainer.appendChild(this.editor)),Kr.formeoLoaded=new window.CustomEvent("formeoLoaded",{detail:{formeo:this}}),document.dispatchEvent(Kr.formeoLoaded)}};const Pd=t=>{const e=t.match(W);return(null==e?void 0:e[0])||t},Ld=t=>t.replace(W,zi());let zd=class{constructor(t,e={}){n(this,"render",((t=this.form)=>{this.form=t;const e=document.getElementsByClassName("formeo-render").length,n={id:this.form.id,className:`formeo-render formeo formeo-rendered-${e}`,children:this.processedData};this.renderedForm=jd.render(n),this.applyConditions();const o=this.container.querySelector(".formeo-render");o?o.replaceWith(this.renderedForm):this.container.appendChild(this.renderedForm)})),n(this,"orderChildren",((t,e)=>e.reduce(((e,n)=>[...e,this.form[t][n]]),[]))),n(this,"prefixId",(t=>"f-"+t)),n(this,"processColumn",(({id:t,...e})=>({...e,id:this.prefixId(t),children:this.processFields(e.children),style:`width: ${e.config.width||"100%"}`}))),n(this,"processRows",(t=>this.orderChildren("rows",this.form.stages[t].children).reduce(((t,e)=>e?[...t,this.processRow(e)]:t),[]))),n(this,"cacheComponent",(t=>(this.components[Pd(t.id)]=t,t))),n(this,"processRow",((t,e="row")=>{const{config:n,id:o}=t,i=[`formeo-${e}-wrap`],r={...t,children:this.processColumns(t.id),id:this.prefixId(o)};this.cacheComponent(r);const s=[{condition:n.legend,result:()=>({tag:n.fieldset?"legend":"h3",children:n.legend})},{condition:!0,result:()=>r},{condition:n.inputGroup,result:()=>this.addButton(o)}].reduce(((t,{condition:e,result:n})=>e?[...t,n()]:t),[]);return n.inputGroup&&i.push("f-input-group-wrap"),{tag:n.fieldset?"fieldset":"div",id:zi(),className:i,children:s}})),n(this,"cloneComponentData",(t=>{const{children:e=[],id:n,...o}=this.components[t];return Object.assign({},o,{id:Ld(n),children:e.length&&e.map((({id:t})=>this.cloneComponentData(Pd(t))))})})),n(this,"addButton",(t=>jd.render({tag:"button",attrs:{className:"add-input-group btn pull-right",type:"button"},children:"Add +",action:{click:e=>{const n=e.target.parentElement,o=jd.render(this.cloneComponentData(t));n.insertBefore(o,n.lastChild),o.appendChild(jd.render(jd.btnTemplate({className:"remove-input-group",children:jd.icon("remove"),action:{mouseover:({target:t})=>t.parentElement.classList.add("will-remove"),mouseleave:({target:t})=>t.parentElement.classList.remove("will-remove"),click:({target:t})=>t.parentElement.remove()}})))}}}))),n(this,"processColumns",(t=>this.orderChildren("columns",this.form.rows[t].children).map((t=>this.cacheComponent(this.processColumn(t)))))),n(this,"processFields",(t=>this.orderChildren("fields",t).map((({id:t,...e})=>this.cacheComponent(Object.assign({},e,{id:this.prefixId(t)})))))),n(this,"applyConditions",(()=>{Object.values(this.components).forEach((({conditions:t})=>{t&&t.forEach(((t,e)=>{const{if:n,then:o}=t;n.forEach((t=>{const{source:e,...n}=t;if(Bi(e)){this.getComponents(e).forEach((t=>{const e=$d(t);e&&t.addEventListener(e,(t=>this.evaluateCondition(n,t)&&o.forEach((e=>this.execResult(e,t)))),!1);const i={target:t};this.evaluateCondition(n,i)&&o.forEach((t=>this.execResult(t,i)))}))}}))}))}))})),n(this,"evaluateCondition",(({sourceProperty:t,targetProperty:e,comparison:n,target:o},i)=>{const r={equals:ba,notEquals:(t,e)=>!ba(t,e),contains:(t,e)=>t.includes(e),notContains:(t,e)=>!t.includes(e)},s=String(i.target[t]),a=String(Bi(o)?this.getComponent(o)[e]:o);return r[n]&&r[n](s,a)})),n(this,"execResult",(({assignment:t,target:e,targetProperty:n,value:o})=>{const i={equals:t=>{const e={value:()=>{t[n]=o},isNotVisible:()=>{t.parentElement.setAttribute("hidden",!0),t.required=!1},isVisible:()=>{t.parentElement.removeAttribute("hidden"),t.required=t._required}};e[n]&&e[n]()}};if(Bi(e)){const n=this.getComponent(e);n&&void 0===n._required&&(n._required=n.required),i[t]&&i[t](n)}})),n(this,"getComponent",(t=>{const e=t.slice(t.indexOf(".")+1);return Ri(t)?this.external[e]:this.renderedForm.querySelector(`#f-${e}`)})),n(this,"getComponents",(t=>{const e=[],n=t.slice(t.indexOf(".")+1);return Ri(t)?e.push(this.external[n]):e.push(...this.renderedForm.querySelectorAll(`[name=f-${n}]`)),e}));const{renderContainer:o,external:i}=(({editorContainer:t,renderContainer:e,...n})=>{const o=t=>"string"==typeof t?document.querySelector(t):t;return{...n,renderContainer:o(e),editorContainer:o(t)}})(t);this.container=o,this.form=e,this.external=i,this.dom=jd,this.components=Object.create(null)}get processedData(){return Object.values(this.form.stages).map((t=>(t.children=this.processRows(t.id),t.className=u,jd.render(t))))}};const $d=t=>{const[e]=[["input",t=>["textarea","text"].includes(t.type)],["change",t=>["select"].includes(t.tagName.toLowerCase())||["checkbox","radio"].includes(t.type)]].find((e=>e[1](t)))||[!1];return e};void 0!==window&&(window.FormeoEditor=Td,window.FormeoRenderer=zd);const Hd=Td,Vd=zd;t.FormeoEditor=Hd,t.FormeoRenderer=Vd,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|