@enablerr-ui/form 0.2.5 → 0.2.9

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/index.min.js CHANGED
@@ -1 +1 @@
1
- System.register(["axios"],(function(t){"use strict";var e;return{setters:[function(t){e=t.default}],execute:function(){function n(){}function o(t){return t()}function s(){return Object.create(null)}function r(t){t.forEach(o)}function i(t){return"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,...e){if(null==t)return n;const o=t.subscribe(...e);return o.unsubscribe?()=>o.unsubscribe():o}function a(t){let e;return c(t,(t=>e=t))(),e}function u(t,e,n){t.$$.on_destroy.push(c(e,n))}function d(t,e,n,o){if(t){const s=f(t,e,n,o);return t[0](s)}}function f(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function p(t,e,n,o,s,r,i){const l=function(t,e,n,o){if(t[2]&&o){const s=t[2](o(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|s[o];return t}return e.dirty|s}return e.dirty}(e,o,s,r);if(l){const s=f(e,n,o,i);t.p(s,l)}}function m(t,e){t.appendChild(e)}function h(t,e,n){t.insertBefore(e,n||null)}function g(t){t.parentNode.removeChild(t)}function v(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function $(t){return document.createElement(t)}function b(t){return document.createTextNode(t)}function y(){return b(" ")}function x(){return b("")}function w(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function k(t){return function(e){return e.preventDefault(),t.call(this,e)}}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function I(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:S(t,e,n)}function N(t){return""===t?null:+t}function q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function E(t,e){t.value=null==e?"":e}function T(t,e,n){t.classList[n?"add":"remove"](e)}let O;function _(t){O=t}function C(){const t=function(){if(!O)throw new Error("Function called outside component initialization");return O}();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const s=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,s)}))}}}function j(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}const A=[],D=[],F=[],V=[],B=Promise.resolve();let L=!1;function P(t){F.push(t)}function M(t){V.push(t)}let Y=!1;const z=new Set;function J(){if(!Y){Y=!0;do{for(let t=0;t<A.length;t+=1){const e=A[t];_(e),R(e.$$)}for(_(null),A.length=0;D.length;)D.pop()();for(let t=0;t<F.length;t+=1){const e=F[t];z.has(e)||(z.add(e),e())}F.length=0}while(A.length);for(;V.length;)V.pop()();L=!1,Y=!1,z.clear()}}function R(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(P)}}const U=new Set;let X;function H(){X={r:0,c:[],p:X}}function W(){X.r||r(X.c),X=X.p}function Z(t,e){t&&t.i&&(U.delete(t),t.i(e))}function G(t,e,n,o){if(t&&t.o){if(U.has(t))return;U.add(t),X&&X.c.push((()=>{U.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const K="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Q(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function tt(t){t&&t.c()}function et(t,e,n,s){const{fragment:l,on_mount:c,on_destroy:a,after_update:u}=t.$$;l&&l.m(e,n),s||P((()=>{const e=c.map(o).filter(i);a?a.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(P)}function nt(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ot(t,e){-1===t.$$.dirty[0]&&(A.push(t),L||(L=!0,B.then(J)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function st(t,e,o,i,l,c,a=[-1]){const u=O;_(t);const d=t.$$={fragment:null,ctx:null,props:c,update:n,not_equal:l,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:s(),dirty:a,skip_bound:!1};let f=!1;if(d.ctx=o?o(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&l(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),f&&ot(t,e)),n})):[],d.update(),f=!0,r(d.before_update),d.fragment=!!i&&i(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(g)}else d.fragment&&d.fragment.c();e.intro&&Z(t.$$.fragment),et(t,e.target,e.anchor,e.customElement),J()}_(u)}class rt{$destroy(){nt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const it=window.sessionStorage;it.clear();const lt={getItem:t=>it.getItem(t),setItem:(t,e)=>it.setItem(t,e)},ct=[];function at(t,e=n){let o;const s=[];function r(e){if(l(t,e)&&(t=e,o)){const e=!ct.length;for(let e=0;e<s.length;e+=1){const n=s[e];n[1](),ct.push(n,t)}if(e){for(let t=0;t<ct.length;t+=2)ct[t][0](ct[t+1]);ct.length=0}}}return{set:r,update:function(e){r(e(t))},subscribe:function(i,l=n){const c=[i,l];return s.push(c),1===s.length&&(o=e(r)||n),i(t),()=>{const t=s.indexOf(c);-1!==t&&s.splice(t,1),0===s.length&&(o(),o=null)}}}}function ut(t,e,o){const s=!Array.isArray(t),l=s?[t]:t,a=e.length<2;return{subscribe:at(o,(t=>{let o=!1;const u=[];let d=0,f=n;const p=()=>{if(d)return;f();const o=e(s?u[0]:u,t);a?t(o):f=i(o)?o:n},m=l.map(((t,e)=>c(t,(t=>{u[e]=t,d&=~(1<<e),o&&p()}),(()=>{d|=1<<e}))));return o=!0,p(),function(){r(m),f()}})).subscribe}}const dt=at(window.localStorage.getItem("lh-enablerr-user")?{user:window.localStorage.getItem("lh-enablerr-user"),gravatar:window.localStorage.getItem("lh-enablerr-gravatar"),tenant:window.localStorage.getItem("lh-enablerr-tenant"),tenants:JSON.parse(window.localStorage.getItem("lh-enablerr-tenants"))}:"");function ft(t){let e,n,o,s,r;const i=t[3].default,l=d(i,t,t[2],null);return{c(){e=$("fieldset"),n=$("legend"),o=b(t[0]),s=y(),l&&l.c(),T(n,"sr-only",!t[1])},m(t,i){h(t,e,i),m(e,n),m(n,o),m(e,s),l&&l.m(e,null),r=!0},p(t,[e]){(!r||1&e)&&q(o,t[0]),2&e&&T(n,"sr-only",!t[1]),l&&l.p&&(!r||4&e)&&p(l,i,t,t[2],e,null,null)},i(t){r||(Z(l,t),r=!0)},o(t){G(l,t),r=!1},d(t){t&&g(e),l&&l.d(t)}}}function pt(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:r=""}=e,{show:i=!0}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"show"in t&&n(1,i=t.show),"$$scope"in t&&n(2,s=t.$$scope)},[r,i,s,o]}class mt extends rt{constructor(t){super(),st(this,t,pt,ft,l,{title:0,show:1})}}const ht=t=>({}),gt=t=>({}),vt=t=>({}),$t=t=>({});function bt(t){let e,n,o,s,i,l,c,a,u,f;const m=t[16].head,v=d(m,t,t[15],$t),b=t[16].tail,x=d(b,t,t[15],gt);return{c(){v&&v.c(),e=y(),n=$("input"),s=y(),i=$("input"),c=y(),x&&x.c(),S(n,"type","number"),S(n,"class",o=t[1]+" form-input form-number hidden"),S(n,"id",t[5]),S(n,"name",t[5]),S(n,"placeholder",t[8]),S(n,"aria-label",t[7]),S(n,"title",t[7]),n.required=t[9],n.disabled=t[10],S(n,"pattern",t[11]),S(n,"min",t[2]),S(n,"max",t[12]),S(n,"step",t[3]),S(i,"type","text"),S(i,"id",t[6]),S(i,"name",t[6]),S(i,"class",l=t[1]+" form-input form-number form-shadow"),i.disabled=t[10],S(i,"aria-label",t[7]),S(i,"title",t[7])},m(o,r){v&&v.m(o,r),h(o,e,r),h(o,n,r),E(n,t[0]),h(o,s,r),h(o,i,r),E(i,t[4]),h(o,c,r),x&&x.m(o,r),a=!0,u||(f=[w(n,"input",t[18]),w(n,"blur",t[13]),w(i,"input",t[19]),w(i,"focus",t[17])],u=!0)},p(t,[e]){v&&v.p&&(!a||32768&e)&&p(v,m,t,t[15],e,vt,$t),(!a||2&e&&o!==(o=t[1]+" form-input form-number hidden"))&&S(n,"class",o),(!a||4&e)&&S(n,"min",t[2]),(!a||8&e)&&S(n,"step",t[3]),1&e&&N(n.value)!==t[0]&&E(n,t[0]),(!a||2&e&&l!==(l=t[1]+" form-input form-number form-shadow"))&&S(i,"class",l),16&e&&i.value!==t[4]&&E(i,t[4]),x&&x.p&&(!a||32768&e)&&p(x,b,t,t[15],e,ht,gt)},i(t){a||(Z(v,t),Z(x,t),a=!0)},o(t){G(v,t),G(x,t),a=!1},d(t){v&&v.d(t),t&&g(e),t&&g(n),t&&g(s),t&&g(i),t&&g(c),x&&x.d(t),u=!1,r(f)}}}function yt(t,e,n){let{$$slots:o={},$$scope:s}=e,{options:r}=e,{css:i}=e,{value:l}=e;const c=JSON.parse(window.sessionStorage.getItem("Locale")),{name:a,nameShadow:u,title:d,placeholder:f,required:p,disabled:m,pattern:h}=r;let{positive:g,min:v,max:$,decimal:b=0,step:y=1}=r;const x=C();let w;b>0&&(y="any"),g&&!v&&(v=0);const k=((t,e)=>{const n=Intl.NumberFormat?new Intl.NumberFormat(t,{minimumFractionDigits:e}):{format:t=>t};return{format:t=>{try{t=n.format(t||0)}catch{t="(ungültig)"}return t}}})(c.id,b),S=()=>{n(4,w=k.format(l))};return S(),t.$$set=t=>{"options"in t&&n(14,r=t.options),"css"in t&&n(1,i=t.css),"value"in t&&n(0,l=t.value),"$$scope"in t&&n(15,s=t.$$scope)},[l,i,v,y,w,a,u,d,f,p,m,h,$,()=>{S(),x("blur")},r,s,o,function(e){j(t,e)},function(){l=N(this.value),n(0,l)},function(){w=this.value,n(4,w)}]}class xt extends rt{constructor(t){super(),st(this,t,yt,bt,l,{options:14,css:1,value:0})}}function wt(t){let e;return{c(){e=$("span"),e.textContent="%",S(e,"slot","head"),S(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,n){h(t,e,n)},d(t){t&&g(e)}}}function kt(t){let e,n,o;function s(e){t[3](e)}let r={options:t[0],css:t[2],$$slots:{head:[wt]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.value=t[1]),e=new xt({props:r}),D.push((()=>Q(e,"value",s))),e.$on("focus",t[4]),e.$on("blur",t[5]),{c(){tt(e.$$.fragment)},m(t,n){et(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),4&o&&(s.css=t[2]),64&o&&(s.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,s.value=t[1],M((()=>n=!1))),e.$set(s)},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){G(e.$$.fragment,t),o=!1},d(t){nt(e,t)}}}function St(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;return o.positive=o.positive||!0,o.max=o.max||100,o.decimal=o.decimal||2,t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(1,r=t.value)},[o,r,s,function(t){r=t,n(1,r)},function(e){j(t,e)},function(e){j(t,e)}]}function It(t){let e,n;return{c(){e=$("span"),n=b(t[3]),S(e,"slot","head"),S(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,o){h(t,e,o),m(e,n)},p(t,e){8&e&&q(n,t[3])},d(t){t&&g(e)}}}function Nt(t){let e,n,o;function s(e){t[4](e)}let r={options:t[1],css:t[2],$$slots:{head:[It]},$$scope:{ctx:t}};return void 0!==t[0]&&(r.value=t[0]),e=new xt({props:r}),D.push((()=>Q(e,"value",s))),e.$on("focus",t[5]),e.$on("blur",t[6]),{c(){tt(e.$$.fragment)},m(t,n){et(e,t,n),o=!0},p(t,[o]){const s={};2&o&&(s.options=t[1]),4&o&&(s.css=t[2]),136&o&&(s.$$scope={dirty:o,ctx:t}),!n&&1&o&&(n=!0,s.value=t[0],M((()=>n=!1))),e.$set(s)},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){G(e.$$.fragment,t),o=!1},d(t){nt(e,t)}}}function qt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e,{currency:i="CHF"}=e;return t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,r=t.value),"currency"in t&&n(3,i=t.currency)},[r,o,s,i,function(t){r=t,n(0,r)},function(e){j(t,e)},function(e){j(t,e)}]}function Et(t){let e,o,s,r;return{c(){e=$("input"),S(e,"type","password"),S(e,"class",o=t[1]+" form-input"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"placeholder",t[4]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[5],e.disabled=t[6],S(e,"pattern",t[7]),S(e,"autocomplete","off")},m(n,o){h(n,e,o),E(e,t[0]),s||(r=w(e,"input",t[9]),s=!0)},p(t,[n]){2&n&&o!==(o=t[1]+" form-input")&&S(e,"class",o),1&n&&e.value!==t[0]&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),s=!1,r()}}}function Tt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:l,placeholder:c,required:a,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,l,c,a,u,d,o,function(){r=this.value,n(0,r)}]}Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value;const Ot=t=>((t,...e)=>e.includes(t))(t,void 0,null),_t=t=>!Ot(t),Ct=(t,...e)=>e.concat(t).find(_t),jt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},At=(t,e=2,n=0,o=t.toString(),s=n.toString())=>s.repeat(e-o.length)+o,Dt=(...t)=>{return(e=t[0],(t,...n)=>jt(jt("",e.toString),t,...n))(At,...t);var e};function Ft(t){let e,o,s,i;return{c(){e=$("input"),S(e,"type","date"),S(e,"class",o=t[1]+" form-input form-date"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"aria-label",t[3]),S(e,"title",t[3]),S(e,"pattern",Pt),S(e,"min",t[6]),S(e,"max",t[7]),e.required=t[4],e.disabled=t[5]},m(n,o){h(n,e,o),E(e,t[0]),s||(i=[w(e,"input",t[10]),w(e,"blur",t[9])],s=!0)},p(t,[n]){2&n&&o!==(o=t[1]+" form-input form-date")&&S(e,"class",o),1&n&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),s=!1,r(i)}}}const Vt={timeZone:"UTC",year:"numeric",month:"long",day:"numeric",weekday:"short"},Bt={year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",timeZoneName:"short"},Lt=(t,e=!1)=>{const n=e?Bt:Vt,o=Intl.DateTimeFormat?new Intl.DateTimeFormat(t,n):{format:t=>t};return{format:t=>{try{t=t?o.format(new Date(t)):""}catch{t="(ungültig)"}return t}}},Pt="\\d{4}(-|/)\\d{2}(-|/)\\d{2}";function Mt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:l,required:c,disabled:a,min:u,max:d}=o;return r=r.substr(0,10),t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,l,c,a,u,d,o,function(e){j(t,e)},function(){r=this.value,n(0,r)}]}class Yt extends rt{constructor(t){super(),st(this,t,Mt,Ft,l,{options:8,css:1,value:0})}}const{document:zt}=K;function Jt(t,e,n){const o=t.slice();return o[16]=e[n].lit,o[17]=e[n].ref,o[18]=e,o[19]=n,o}function Rt(t){let e,n,o;function s(){t[12].call(e,t[19])}return{c(){e=$("input"),S(e,"class","iw-m iw-n"+t[17].count+" svelte-u6cc6e"),S(e,"id",t[2]+"-"+t[19]),S(e,"type","text"),S(e,"data-step",t[19]),S(e,"size",t[17].count),S(e,"minlength",t[17].count),S(e,"maxlength",t[17].count),S(e,"pattern",t[5][t[19]]||t[17].pattern),e.required=t[3],e.disabled=t[4]},m(r,i){h(r,e,i),E(e,t[1][t[19]]),n||(o=[w(e,"input",s),w(e,"input",t[8]),w(e,"blur",t[11])],n=!0)},p(n,o){t=n,2&o&&e.value!==t[1][t[19]]&&E(e,t[1][t[19]])},d(t){t&&g(e),n=!1,r(o)}}}function Ut(t){let e,o,s=t[16]+"";return{c(){e=$("span"),o=b(s),S(e,"class","iw-m svelte-u6cc6e")},m(t,n){h(t,e,n),m(e,o)},p:n,d(t){t&&g(e)}}}function Xt(t){let e;let n=function(t,e){return t[16]?Ut:Rt}(t)(t);return{c(){n.c(),e=x()},m(t,o){n.m(t,o),h(t,e,o)},p(t,e){n.p(t,e)},d(t){n.d(t),t&&g(e)}}}function Ht(t){let e,o,s,r,i=t[6].obj,l=[];for(let e=0;e<i.length;e+=1)l[e]=Xt(Jt(t,i,e));return{c(){e=$("div");for(let t=0;t<l.length;t+=1)l[t].c();S(e,"class",o=t[0]+" form-input svelte-u6cc6e"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"tabindex","0")},m(n,o){h(n,e,o);for(let t=0;t<l.length;t+=1)l[t].m(e,null);s||(r=w(e,"focus",t[7]),s=!0)},p(t,[n]){if(382&n){let o;for(i=t[6].obj,o=0;o<i.length;o+=1){const s=Jt(t,i,o);l[o]?l[o].p(s,n):(l[o]=Xt(s),l[o].c(),l[o].m(e,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=i.length}1&n&&o!==(o=t[0]+" form-input svelte-u6cc6e")&&S(e,"class",o)},i:n,o:n,d(t){t&&g(e),v(l,t),s=!1,r()}}}function Wt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;r=r.toString();const{name:i,title:l,required:c,disabled:a,mask:u,pattern:d=[]}=o,f=(t=>{let e=[],n="",o=!1;if("string"!=typeof t)return e;const s=(t="")=>{n=t},r=t=>s(n.concat(t)),i=(t=!0)=>{o=t},l=t=>(e.push({lit:t}),void i(!1));for(const c of t)o?l(c):"\\"===c?i():"{"===c?s():"}"===c?e.push({ref:{count:parseInt(n),pattern:`\\d{${n}}`}}):" "===c?l(c):c>=0?r(c):l(c);const c=(t,n="",o=!0,s=0)=>t?e.reduce(((e,n)=>e.concat(n.ref&&n.ref.count?t.slice(s,s+=n.ref.count):o&&n.lit||"")),n):n;return{obj:e,getValues:t=>c(t,[],!1),format:t=>c(t)}})(u),p=f.getValues(r);return t.$$set=t=>{"options"in t&&n(10,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(9,r=t.value)},[s,p,i,c,a,d,f,({relatedTarget:t})=>{if(!t||"INPUT"===t.tagName)return!0;const e=`#${i} > input`;return document.querySelectorAll(e)[0].focus()},({target:t})=>{n(9,r=p.reduce(((t,e)=>t.concat(e))));const e=t.dataset.step;if(p[e].length<t.minLength)return!0;const o=`#${i}-${e} ~ input`,s=document.querySelectorAll(o);return s[0]&&s[0].focus&&s[0].focus()},r,o,function(e){j(t,e)},function(t){p[t]=this.value,n(1,p)}]}class Zt extends rt{constructor(t){var e;super(),zt.getElementById("svelte-u6cc6e-style")||((e=$("style")).id="svelte-u6cc6e-style",e.textContent="span.iw-m.svelte-u6cc6e{margin-right:1px;margin-left:1px}.iw-n1.svelte-u6cc6e{width:0.75rem}.iw-n2.svelte-u6cc6e{width:1.25rem}.iw-n3.svelte-u6cc6e{width:2rem}.iw-n4.svelte-u6cc6e{width:2.5rem}.iw-n5.svelte-u6cc6e{width:3.25rem}.iw-n6.svelte-u6cc6e{width:3.75rem}.iw-n7.svelte-u6cc6e{width:4.5rem}.iw-n8.svelte-u6cc6e{width:5rem}.iw-n9.svelte-u6cc6e{width:5.75rem}.iw-n10.svelte-u6cc6e{width:6.25rem}input.svelte-u6cc6e:invalid{background-color:#fff5f5}",m(zt.head,e)),st(this,t,Wt,Ht,l,{options:10,css:0,value:9})}}function Gt(t){let e,n,o;function s(e){t[3](e)}let r={options:t[0],css:t[1]};return void 0!==t[2]&&(r.value=t[2]),e=new Zt({props:r}),D.push((()=>Q(e,"value",s))),e.$on("blur",t[4]),{c(){tt(e.$$.fragment)},m(t,n){et(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),2&o&&(s.css=t[1]),!n&&4&o&&(n=!0,s.value=t[2],M((()=>n=!1))),e.$set(s)},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){G(e.$$.fragment,t),o=!1},d(t){nt(e,t)}}}function Kt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;return s=s.concat(" form-time"),o.mask="{2}:{2}",o.pattern=["(2[0-3]|[0-1][0-9])","","[0-5][0-9]"],t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(2,r=t.value)},[o,s,r,function(t){r=t,n(2,r)},function(e){j(t,e)}]}class Qt extends rt{constructor(t){super(),st(this,t,Kt,Gt,l,{options:0,css:1,value:2})}}function te(t){let e,n,o,s,i,l,c,a,u,d,f,p;function v(e){t[15](e)}let b={options:t[4],css:t[0]};function x(e){t[16](e)}void 0!==t[1]&&(b.value=t[1]),n=new Yt({props:b}),D.push((()=>Q(n,"value",v))),n.$on("blur",t[10]);let k={options:t[3],css:t[0]};return void 0!==t[2]&&(k.value=t[2]),i=new Qt({props:k}),D.push((()=>Q(i,"value",x))),i.$on("blur",t[10]),{c(){e=$("div"),tt(n.$$.fragment),s=y(),tt(i.$$.fragment),c=y(),a=$("input"),S(e,"id",t[6]),S(e,"tabindex","90"),S(e,"class","hidden"),S(a,"type","text"),S(a,"class",u=t[0]+" form-input form-shadow"),S(a,"id",t[7]),S(a,"name",t[7]),a.disabled=t[9],S(a,"aria-label",t[8]),S(a,"title",t[8])},m(o,r){h(o,e,r),et(n,e,null),m(e,s),et(i,e,null),h(o,c,r),h(o,a,r),E(a,t[5]),d=!0,f||(p=[w(e,"blur",t[10]),w(e,"focus",t[11]),w(a,"input",t[17]),w(a,"focus",t[14])],f=!0)},p(t,[e]){const s={};16&e&&(s.options=t[4]),1&e&&(s.css=t[0]),!o&&2&e&&(o=!0,s.value=t[1],M((()=>o=!1))),n.$set(s);const r={};8&e&&(r.options=t[3]),1&e&&(r.css=t[0]),!l&&4&e&&(l=!0,r.value=t[2],M((()=>l=!1))),i.$set(r),(!d||1&e&&u!==(u=t[0]+" form-input form-shadow"))&&S(a,"class",u),32&e&&a.value!==t[5]&&E(a,t[5])},i(t){d||(Z(n.$$.fragment,t),Z(i.$$.fragment,t),d=!0)},o(t){G(n.$$.fragment,t),G(i.$$.fragment,t),d=!1},d(t){t&&g(e),nt(n),nt(i),t&&g(c),t&&g(a),f=!1,r(p)}}}function ee(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale"));let{date:l,time:c}=(t=>{if(!t)return{date:"",time:""};const e=new Date(t),n=e.getFullYear().toString(),o=Dt(e.getMonth()+1),s=Dt(e.getDate()),r=Dt(e.getHours()),i=Dt(e.getMinutes());return{date:n.concat("-",o,"-",s),time:r.concat(i)}})(r);const{name:a,nameShadow:u,title:d,disabled:f}=o;let p,m=Object.assign({},o),h=Object.assign({},o);h.name=a+"-Date",m.name=a+"-Time";const g=Lt(i.id,!0),v=()=>{try{n(12,(t=c,r=new Date(l.substring(0,10).concat("T",t.substr(0,2),":",t.substr(2))).toISOString()))}catch(t){n(12,r=l||c?"invalid":"")}var t;n(5,p=g.format(r))},$=t=>t.startsWith(h.name),b=C();return v(),t.$$set=t=>{"options"in t&&n(13,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(12,r=t.value)},[s,l,c,m,h,p,a,u,d,f,({relatedTarget:t})=>{if(t){if(t.id.startsWith(m.name))return!0;if($(t.id))return!0}v(),b("blur")},({relatedTarget:t})=>!t||(!!$(t.id)||void document.getElementById(h.name).focus()),r,o,function(e){j(t,e)},function(t){l=t,n(1,l)},function(t){c=t,n(2,c)},function(){p=this.value,n(5,p)}]}function ne(t){let e,n,o,s,i,l,c,a;function u(e){t[10](e)}let d={options:t[1],css:t[2]+" hidden"};return void 0!==t[0]&&(d.value=t[0]),e=new Yt({props:d}),D.push((()=>Q(e,"value",u))),e.$on("blur",t[8]),{c(){tt(e.$$.fragment),o=y(),s=$("input"),S(s,"type","text"),S(s,"class",i=t[2]+" form-input form-shadow"),S(s,"id",t[4]),S(s,"name",t[4]),S(s,"placeholder",t[6]),s.disabled=t[7],S(s,"aria-label",t[5]),S(s,"title",t[5])},m(n,r){et(e,n,r),h(n,o,r),h(n,s,r),E(s,t[3]),l=!0,c||(a=[w(s,"input",t[11]),w(s,"focus",t[9])],c=!0)},p(t,[o]){const r={};2&o&&(r.options=t[1]),4&o&&(r.css=t[2]+" hidden"),!n&&1&o&&(n=!0,r.value=t[0],M((()=>n=!1))),e.$set(r),(!l||4&o&&i!==(i=t[2]+" form-input form-shadow"))&&S(s,"class",i),8&o&&s.value!==t[3]&&E(s,t[3])},i(t){l||(Z(e.$$.fragment,t),l=!0)},o(t){G(e.$$.fragment,t),l=!1},d(t){nt(e,t),t&&g(o),t&&g(s),c=!1,r(a)}}}function oe(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale")),{nameShadow:l,title:c,placeholder:a,disabled:u}=o;let d;const f=Lt(i.id),p=()=>{n(3,d=f.format(r))},m=C();return p(),t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,r=t.value)},[r,o,s,d,l,c,a,u,()=>{p(),m("blur")},function(e){j(t,e)},function(t){r=t,n(0,r)},function(){d=this.value,n(3,d)}]}function se(t){let e,o,s,r;return{c(){e=$("input"),S(e,"type","email"),S(e,"class",o=t[1]+" form-input"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"placeholder",t[4]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[5],e.disabled=t[6]},m(n,o){h(n,e,o),E(e,t[0]),s||(r=w(e,"input",t[8]),s=!0)},p(t,[n]){2&n&&o!==(o=t[1]+" form-input")&&S(e,"class",o),1&n&&e.value!==t[0]&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),s=!1,r()}}}function re(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:l,placeholder:c,required:a,disabled:u}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,l,c,a,u,o,function(){r=this.value,n(0,r)}]}function ie(t){let e,o,s,r;return{c(){e=$("textarea"),S(e,"rows",t[6]),S(e,"class",o=t[1]+" form-textarea block"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[4],e.disabled=t[5]},m(n,o){h(n,e,o),E(e,t[0]),s||(r=w(e,"input",t[8]),s=!0)},p(t,[n]){2&n&&o!==(o=t[1]+" form-textarea block")&&S(e,"class",o),1&n&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),s=!1,r()}}}function le(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:l,required:c,disabled:a,rows:u=3}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,l,c,a,u,o,function(){r=this.value,n(0,r)}]}function ce(t){let e,o,s,i,l,c,a,u;return{c(){e=$("div"),o=$("input"),s=y(),i=$("div"),l=y(),c=$("div"),S(o,"type","checkbox"),S(o,"id",t[1]),S(o,"name",t[1]),S(o,"aria-label",t[2]),S(o,"title",t[2]),o.disabled=t[3],S(o,"class","svelte-ke6ng1"),S(i,"class","track svelte-ke6ng1"),S(c,"class","thumb svelte-ke6ng1"),S(e,"class","switch svelte-ke6ng1")},m(n,r){h(n,e,r),m(e,o),o.checked=t[0],m(e,s),m(e,i),m(e,l),m(e,c),a||(u=[w(o,"change",t[7]),w(i,"click",t[4]),w(c,"click",t[4])],a=!0)},p(t,[e]){1&e&&(o.checked=t[0])},i:n,o:n,d(t){t&&g(e),a=!1,r(u)}}}function ae(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;s="";const{name:i,title:l,disabled:c}=o;return t.$$set=t=>{"options"in t&&n(6,o=t.options),"css"in t&&n(5,s=t.css),"value"in t&&n(0,r=t.value)},[r,i,l,c,()=>n(0,r=c?r:!r),s,o,function(){r=this.checked,n(0,r)}]}function ue(t){let e,o,s,r;return{c(){e=$("input"),S(e,"type","file"),S(e,"class",o=t[1]+" form-input"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"pattern",t[7]),S(e,"placeholder",t[4]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[5],e.disabled=t[6],e.multiple=!0},m(n,o){h(n,e,o),s||(r=w(e,"change",t[9]),s=!0)},p(t,[n]){2&n&&o!==(o=t[1]+" form-input")&&S(e,"class",o)},i:n,o:n,d(t){t&&g(e),s=!1,r()}}}function de(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:l,placeholder:c,required:a,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,l,c,a,u,d,o,function(){r=this.value,n(0,r)}]}function fe(t){let e,o,s,r;return{c(){e=$("input"),S(e,"type","text"),S(e,"class",o=t[1]+" form-input"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"placeholder",t[4]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[5],e.disabled=t[6],S(e,"pattern",t[7]),S(e,"autocomplete",t[8])},m(n,o){h(n,e,o),E(e,t[0]),s||(r=w(e,"input",t[10]),s=!0)},p(t,[n]){2&n&&o!==(o=t[1]+" form-input")&&S(e,"class",o),1&n&&e.value!==t[0]&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),s=!1,r()}}}function pe(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:l,placeholder:c,required:a,disabled:u,pattern:d,autocomplete:f="on"}=o;return t.$$set=t=>{"options"in t&&n(9,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,l,c,a,u,d,f,o,function(){r=this.value,n(0,r)}]}function me(t){let e,o,s;return{c(){e=$("input"),S(e,"type","hidden"),S(e,"id",t[1]),S(e,"name",t[1]),e.disabled=!0},m(n,r){h(n,e,r),E(e,t[0]),o||(s=w(e,"input",t[4]),o=!0)},p(t,[n]){1&n&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),o=!1,s()}}}function he(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;s="";const{name:i}=o;return t.$$set=t=>{"options"in t&&n(3,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,r=t.value)},[r,i,s,o,function(){r=this.value,n(0,r)}]}const{document:ge}=K;function ve(t){let e;return{c(){e=$("p"),e.textContent=`Unknow input type: ${t[4]}`,S(e,"class","svelte-166hp95")},m(t,n){h(t,e,n)},p:n,i:n,o:n,d(t){t&&g(e)}}}function $e(t){let e,n,o,s;function r(e){t[9](e)}var i=t[6];function l(t){let e={options:t[0],css:Te};return void 0!==t[1]&&(e.value=t[1]),{props:e}}return i&&(e=new i(l(t)),D.push((()=>Q(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8])),{c(){e&&tt(e.$$.fragment),o=x()},m(t,n){e&&et(e,t,n),h(t,o,n),s=!0},p(t,s){const c={};if(1&s&&(c.options=t[0]),!n&&2&s&&(n=!0,c.value=t[1],M((()=>n=!1))),i!==(i=t[6])){if(e){H();const t=e;G(t.$$.fragment,1,0,(()=>{nt(t,1)})),W()}i?(e=new i(l(t)),D.push((()=>Q(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8]),tt(e.$$.fragment),Z(e.$$.fragment,1),et(e,o.parentNode,o)):e=null}else i&&e.$set(c)},i(t){s||(e&&Z(e.$$.fragment,t),s=!0)},o(t){e&&G(e.$$.fragment,t),s=!1},d(t){t&&g(o),e&&nt(e,t)}}}function be(t){let e,o,s,r,i,l,c,a,u,d,f,p=t[2].title+"";const v=[$e,ve],x=[];l=function(t,e){return t[6]?0:1}(t),c=x[l]=v[l](t);let k=t[5]&&function(t){let e;return{c(){e=$("p"),e.textContent=`${t[5]}`,S(e,"class","form-hint hidden svelte-166hp95")},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t);return{c(){e=$("fieldset"),o=$("label"),s=b(p),i=y(),c.c(),a=y(),k&&k.c(),S(o,"for",r=t[2].id),S(o,"disabled",t[3])},m(n,r){h(n,e,r),m(e,o),m(o,s),m(e,i),x[l].m(e,null),m(e,a),k&&k.m(e,null),u=!0,d||(f=w(o,"click",t[7]),d=!0)},p(t,[e]){(!u||4&e)&&p!==(p=t[2].title+"")&&q(s,p),(!u||4&e&&r!==(r=t[2].id))&&S(o,"for",r),c.p(t,e),t[5]&&k.p(t,e)},i(t){u||(Z(c),u=!0)},o(t){G(c),u=!1},d(t){t&&g(e),x[l].d(),k&&k.d(),d=!1,f()}}}const ye={hidden:class extends rt{constructor(t){super(),st(this,t,he,me,l,{options:3,css:2,value:0})}},text:class extends rt{constructor(t){super(),st(this,t,pe,fe,l,{options:9,css:1,value:0})}},file:class extends rt{constructor(t){super(),st(this,t,de,ue,l,{options:8,css:1,value:0})}},checkbox:class extends rt{constructor(t){var e;super(),document.getElementById("svelte-ke6ng1-style")||((e=$("style")).id="svelte-ke6ng1-style",e.textContent=".switch.svelte-ke6ng1.svelte-ke6ng1{display:block;position:relative;vertical-align:middle;cursor:pointer;background-color:transparent;user-select:none}.track.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:3rem;height:1.5rem;background-color:#a0aec0;border-radius:9999px;box-shadow:inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)}.thumb.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:1.5rem;height:1.5rem;background-color:white;transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);border-radius:9999px;border-width:2px;border-color:#a0aec0}input[type='checkbox'].svelte-ke6ng1.svelte-ke6ng1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}input[type='checkbox'].svelte-ke6ng1:checked~.thumb.svelte-ke6ng1{border-color:#38b2ac;--transform-translate-x:100%;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;--border-opacity:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}input[type='checkbox'].svelte-ke6ng1:checked~.track.svelte-ke6ng1{background-color:#38b2ac;--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transition-property:background-color, border-color, color, fill, stroke}input[type='checkbox'].svelte-ke6ng1:disabled~.track.svelte-ke6ng1{background-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled~.thumb.svelte-ke6ng1{background-color:#f7fafc;border-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.thumb.svelte-ke6ng1{border-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.track.svelte-ke6ng1{background-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:focus+.track.svelte-ke6ng1,input[type='checkbox'].svelte-ke6ng1:active+.track.svelte-ke6ng1{box-shadow:0 0 0 3px rgba(66, 153, 225, 0.5)}",m(document.head,e)),st(this,t,ae,ce,l,{options:6,css:5,value:0})}},masked:Zt,textarea:class extends rt{constructor(t){super(),st(this,t,le,ie,l,{options:7,css:1,value:0})}},email:class extends rt{constructor(t){super(),st(this,t,re,se,l,{options:7,css:1,value:0})}},date:class extends rt{constructor(t){super(),st(this,t,oe,ne,l,{options:1,css:2,value:0})}},datetime:class extends rt{constructor(t){super(),st(this,t,ee,te,l,{options:13,css:0,value:12})}},number:xt,password:class extends rt{constructor(t){super(),st(this,t,Tt,Et,l,{options:8,css:1,value:0})}},currency:class extends rt{constructor(t){super(),st(this,t,qt,Nt,l,{options:1,css:2,value:0,currency:3})}},rate:class extends rt{constructor(t){super(),st(this,t,St,kt,l,{options:0,css:2,value:1})}}},xe={default:"",checkbox:!1,email:"@",number:0,currency:0,rate:0},we=t=>t+"-show",ke=t=>t&&document.getElementById(t),Se=(t,e,n="block")=>{t&&t.style&&(t.style.display=e?n:"none")},Ie=(t,e)=>{if(!t)return!0;const n=ke(t);if(!n)return!0;const o=ke(we(t));return!e&&!o||(o&&Se(o,!e),Se(n,e),e&&n.focus&&n.focus(),!1)},Ne=t=>Ie(t,!0),qe=(t,e=ke(t))=>e&&e.children&&e.children.length?Array.from(e.children).every((t=>qe(t.id,t))):!e||!e.validity||e.validity.valid,Ee=t=>void 0===xe[t]?xe.default:xe[t],Te="form-field";function Oe(t,e,n){let{options:o}=e,{value:s}=e;const{label:r={},disabled:i,type:l="text",hint:c=!1}=o;r.id=o.name,o.nameShadow=we(o.name),o.required=!i&&o.required,o.title=o.title||o.placeholder;const a=(t=>ye[t])(l);return t.$$set=t=>{"options"in t&&n(0,o=t.options),"value"in t&&n(1,s=t.value)},[o,s,r,i,l,c,a,t=>Ne(o.name),t=>{return e=o.name,Ie(e,!1);var e},function(t){s=t,n(1,s)}]}class _e extends rt{constructor(t){var e;super(),ge.getElementById("svelte-166hp95-style")||((e=$("style")).id="svelte-166hp95-style",e.textContent="p.svelte-166hp95,.form-hint.svelte-166hp95{padding-left:0.75rem;color:#38b2ac;font-size:0.875rem;font-style:italic}",m(ge.head,e)),st(this,t,Oe,be,l,{options:0,value:1})}}var Ce=Object.prototype.hasOwnProperty;function je(t){return null==t}function Ae(t){return je(t)||Object.keys(t).length<=0}function De(t,e,n){if(new Object(t)!==t)return t;Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]);return e.slice(0,-1).reduce(((t,n,o)=>new Object(t[n])===t[n]?t[n]:t[n]=Math.trunc(Math.abs(e[o+1]))===+e[o+1]?[]:{}),t)[e[e.length-1]]=n,t}const Fe={assignDeep:function t(e,n){if(Array.isArray(e))return e.map((e=>t(e,n)));const o={};for(const s in e)o[s]="object"==typeof e[s]?t(e[s],n):n;return o},cloneDeep:function(t){return JSON.parse(JSON.stringify(t))},deepEqual:function t(e,n){var o,s;if(e===n)return!0;if(e&&n&&(o=e.constructor)===n.constructor){if(o===Date)return e.getTime()===n.getTime();if(o===RegExp)return e.toString()===n.toString();if(o===Array){if((s=e.length)===n.length)for(;s--&&t(e[s],n[s]););return-1===s}if(!o||"object"==typeof e){for(o in s=0,e){if(Ce.call(e,o)&&++s&&!Ce.call(n,o))return!1;if(!(o in n)||!t(e[o],n[o]))return!1}return Object.keys(n).length===s}}return e!=e&&n!=n},getErrorsFromSchema:function t(e,n,o={}){for(const s in n)switch(!0){case"object"===n[s].type&&!Ae(n[s].fields):o[s]=t(e[s],n[s].fields,{...o[s]});break;case"array"===n[s].type:{const r=e&&e[s]?e[s]:[];o[s]=r.map((e=>{const r=t(e,n[s].innerType.fields,{...o[s]});return Object.keys(r).length>0?r:""}));break}default:o[s]=""}return o},getValues:function t(e){let n=[];for(const[,o]of Object.entries(e)){const e="object"==typeof o?t(o):[o];n=[...n,...e]}return n},isEmpty:Ae,isNullish:je,set:De,subscribeOnce:function(t){return new Promise((e=>{t.subscribe(e)()}))},update:function(t,e,n){t.update((t=>(De(t,e,n),t)))}};const Ve=t=>{let e=t.initialValues||{};const n=t.validationSchema,o=t.validate,s=t.onSubmit,r=()=>Fe.cloneDeep(e),i=()=>n?Fe.getErrorsFromSchema(e,n.fields):Fe.assignDeep(e,""),l=()=>Fe.assignDeep(e,!1),c=at(r()),u=at(i()),d=at(l()),f=at(!1),p=at(!1),m=ut(u,(t=>Fe.getValues(t).every((t=>""===t)))),h=ut(c,(t=>{const n=Fe.assignDeep(t,!1);for(let o in t)n[o]=!Fe.deepEqual(t[o],e[o]);return n})),g=ut(h,(t=>Fe.getValues(t).includes(!0)));function v(t,e){return w(t,!0),n?(p.set(!0),n.validateAt(t,a(c)).then((()=>Fe.update(u,t,""))).catch((e=>Fe.update(u,t,e.message))).finally((()=>{p.set(!1)}))):o?(p.set(!0),Promise.resolve().then((()=>o({[t]:e}))).then((e=>Fe.update(u,t,Fe.isNullish(e)?"":e[t]))).finally((()=>{p.set(!1)}))):Promise.resolve()}function $(t,e){return x(t,e),v(t,e)}function b(){c.set(r()),u.set(i()),d.set(l())}function y(t){return Promise.resolve().then((()=>u.set(i()))).then((()=>s(t,c,u))).finally((()=>f.set(!1)))}function x(t,e){Fe.update(c,t,e)}function w(t,e){Fe.update(d,t,e)}return{form:c,errors:u,touched:d,modified:h,isValid:m,isSubmitting:f,isValidating:p,isModified:g,handleChange:function(t){const e=t.target;return $(e.name||e.id,function(t){return t.getAttribute&&"checkbox"===t.getAttribute("type")}(e)?e.checked:e.value)},handleSubmit:function(t){return t&&t.preventDefault&&t.preventDefault(),f.set(!0),Fe.subscribeOnce(c).then((t=>"function"==typeof o?(p.set(!0),Promise.resolve().then((()=>o(t))).then((e=>{Fe.isNullish(e)||0===Fe.getValues(e).length?y(t):(u.set(e),f.set(!1))})).finally((()=>p.set(!1)))):n?(p.set(!0),n.validate(t,{abortEarly:!1}).then((()=>y(t))).catch((t=>{if(t&&t.inner){const e=i();t.inner.map((t=>Fe.set(e,t.path,t.message))),u.set(e)}f.set(!1)})).finally((()=>p.set(!1)))):void y(t)))},handleReset:b,updateField:x,updateValidateField:$,updateTouched:w,validateField:function(t){return Fe.subscribeOnce(c).then((e=>v(t,e[t])))},updateInitialValues:function(t){e=t,b()},state:ut([c,u,d,h,m,p,f,g],(([t,e,n,o,s,r,i,l])=>({form:t,errors:e,touched:n,modified:o,isValid:s,isSubmitting:i,isValidating:r,isModified:l})))}};function Be(t,e,n){const o=t.slice();return o[33]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function Le(t,e,n){const o=t.slice();return o[0]=e[n],o[36]=e,o[37]=n,o}function Pe(t){let e,n,o,s=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=$("p"),n=b(s),o=b(r),S(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){h(t,e,s),m(e,n),m(e,o)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&q(o,r)},d(t){t&&g(e)}}}function Me(t){let e;return{c(){e=$("p"),e.textContent=`${t[8].text}`,S(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}function Ye(t){let e,n,o;function s(e){t[18](e,t[0])}let r={options:t[0]};return void 0!==t[4][t[0].name]&&(r.value=t[4][t[0].name]),e=new _e({props:r}),D.push((()=>Q(e,"value",s))),{c(){tt(e.$$.fragment)},m(t,n){et(e,t,n),o=!0},p(o,s){t=o;const r={};!n&&80&s[0]&&(n=!0,r.value=t[4][t[0].name],M((()=>n=!1))),e.$set(r)},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){G(e.$$.fragment,t),o=!1},d(t){nt(e,t)}}}function ze(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=Ye(Le(t,o,e));const r=t=>G(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=x()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);h(t,e,o),n=!0},p(t,n){if(80&n[0]){let i;for(o=t[14],i=0;i<o.length;i+=1){const r=Le(t,o,i);s[i]?(s[i].p(r,n),Z(s[i],1)):(s[i]=Ye(r),s[i].c(),Z(s[i],1),s[i].m(e.parentNode,e))}for(H(),i=o.length;i<s.length;i+=1)r(i);W()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Z(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)G(s[t]);n=!1},d(t){v(s,t),t&&g(e)}}}function Je(t){let e,n;return e=new mt({props:{title:t[13],show:t[33],$$slots:{default:[ze]},$$scope:{ctx:t}}}),{c(){tt(e.$$.fragment)},m(t,o){et(e,t,o),n=!0},p(t,n){const o={};16&n[0]|128&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){nt(e,t)}}}function Re(t){let e,o,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,o;return{c(){e=$("m-icon"),I(e,"class","mar-r-md"),I(e,"name",o=t[9].icon)},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t);return{c(){e=$("button"),i&&i.c(),o=y(),s=b(r),S(e,"ord","primary"),S(e,"class","full-width"),S(e,"type","submit")},m(t,n){h(t,e,n),i&&i.m(e,null),m(e,o),m(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&g(e),i&&i.d()}}}function Ue(t){let e,o,s,r,i,l,c,a,u,d,f,p;document.title=e="enablerr - "+t[5];let b=t[13].text&&function(t){let e;return{c(){e=$("h2"),e.textContent=`${t[13].text}`},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t),x=t[1]&&t[7].text&&Pe(t),I=t[3]&&t[8].text&&Me(t),N=t[6],q=[];for(let e=0;e<N.length;e+=1)q[e]=Je(Be(t,N,e));const E=t=>G(q[t],1,1,(()=>{q[t]=null}));let T=t[9]&&Re(t);return{c(){o=y(),b&&b.c(),s=y(),x&&x.c(),r=y(),I&&I.c(),i=y(),l=$("p"),l.textContent=`${t[10].text}`,c=y(),a=$("form");for(let t=0;t<q.length;t+=1)q[t].c();u=y(),T&&T.c(),S(l,"id","er-invalid"),S(l,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),a.noValidate=!0},m(e,n){h(e,o,n),b&&b.m(e,n),h(e,s,n),x&&x.m(e,n),h(e,r,n),I&&I.m(e,n),h(e,i,n),h(e,l,n),h(e,c,n),h(e,a,n);for(let t=0;t<q.length;t+=1)q[t].m(a,null);m(a,u),T&&T.m(a,null),d=!0,f||(p=w(a,"submit",k(t[12])),f=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(document.title=e),t[13].text&&b.p(t,n),t[1]&&t[7].text?x?x.p(t,n):(x=Pe(t),x.c(),x.m(r.parentNode,r)):x&&(x.d(1),x=null),t[3]&&t[8].text?I?I.p(t,n):(I=Me(t),I.c(),I.m(i.parentNode,i)):I&&(I.d(1),I=null),80&n[0]){let e;for(N=t[6],e=0;e<N.length;e+=1){const o=Be(t,N,e);q[e]?(q[e].p(o,n),Z(q[e],1)):(q[e]=Je(o),q[e].c(),Z(q[e],1),q[e].m(a,u))}for(H(),e=N.length;e<q.length;e+=1)E(e);W()}t[9]&&T.p(t,n)},i(t){if(!d){for(let t=0;t<N.length;t+=1)Z(q[t]);d=!0}},o(t){q=q.filter(Boolean);for(let t=0;t<q.length;t+=1)G(q[t]);d=!1},d(t){t&&g(o),b&&b.d(t),t&&g(s),x&&x.d(t),t&&g(r),I&&I.d(t),t&&g(i),t&&g(l),t&&g(c),t&&g(a),v(q,t),T&&T.d(),f=!1,p()}}}function Xe(t,n,o){let s,r,{options:i={}}=n,{input:l}=n,{head:c=""}=n;const{title:a={},groups:d=[],submit:f=!1,failure:p={},success:m={},button:h=!1,links:g=[]}=i;l=l||{};const v={};let $=!1,b="",y=!1;const x=d.reduce(((t,e)=>t.concat(e.fields)),[]),w=(t,n)=>{let o={};for(const t in N)(Ot(l[t])||_t(n[t])&&N[t]!==n[t])&&(o[t]=n[t]);if(((t={})=>!Object.keys(t).length)(o))return!1;const{_id:s,id:r}=n;return e.post("/api/"+t,{...o,_id:s,id:r}).then((t=>t.data))},k=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+r[e]),"?"))(o)))),S=()=>{const t=x.find((t=>!qe(t.name)));return!t||(((t="",e=0,n=document.getElementById(t))=>{n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e))})("er-invalid",3e3),Ne(t.name),!1)},I={},N={};x.map((({name:t,type:e,value:n})=>{const s=Ee(e);let r=Ct(s,v[t],l[t],n);switch(e){case"date":r=r.substr(0,10);case"masked":r=r.toString()}o(17,I[t]=r,I),N[t]=r}));const{form:q,handleSubmit:E,handleReset:T}=Ve({initialValues:I,onSubmit:async t=>{if(!f)return;if(!S())return;const{path:e,func:n}=f,s=(t=>x.reduce(((e,n)=>(e[n.name]=t[n.name],e)),{}))(t);let r={};e&&!(r=await w(e,s))||n&&!(r=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(n,s,r))||((t,e)=>{const{action:n,url:s,query:r,reset:i}=t,{status:l=!0,data:c,message:a={}}=e;l?(o(3,y=!0),setTimeout((()=>{o(3,y=!1),k(n,c,s,r)}),m.text?1e3:10)):(i&&T(),o(1,$=!0),o(2,b=a.text),setTimeout((()=>{o(1,$=!1),o(2,b="")}),3e3))})(f,r)}});return u(t,q,(t=>o(4,r=t))),t.$$set=t=>{"options"in t&&o(0,i=t.options),"input"in t&&o(15,l=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=I.Title||a.text||c)},[i,$,b,y,r,s,d,p,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},q,E,a,x,l,c,I,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,q.set(r))}]}const{document:He}=K;function We(t,e,n){const o=t.slice();return o[32]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function Ze(t,e,n){const o=t.slice();return o[0]=e[n],o[35]=e,o[36]=n,o}function Ge(t){let e,n,o,s=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=$("p"),n=b(s),o=b(r),S(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){h(t,e,s),m(e,n),m(e,o)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&q(o,r)},d(t){t&&g(e)}}}function Ke(t){let e;return{c(){e=$("p"),e.textContent=`${t[8].text}`,S(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}function Qe(t){let e,n,o,s;function r(e){t[18](e,t[0])}let i={options:t[0]};return void 0!==t[4][t[0].name]&&(i.value=t[4][t[0].name]),e=new _e({props:i}),D.push((()=>Q(e,"value",r))),{c(){tt(e.$$.fragment),o=y()},m(t,n){et(e,t,n),h(t,o,n),s=!0},p(o,s){t=o;const r={};!n&&80&s[0]&&(n=!0,r.value=t[4][t[0].name],M((()=>n=!1))),e.$set(r)},i(t){s||(Z(e.$$.fragment,t),s=!0)},o(t){G(e.$$.fragment,t),s=!1},d(t){nt(e,t),t&&g(o)}}}function tn(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=Qe(Ze(t,o,e));const r=t=>G(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=x()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);h(t,e,o),n=!0},p(t,n){if(80&n[0]){let i;for(o=t[14],i=0;i<o.length;i+=1){const r=Ze(t,o,i);s[i]?(s[i].p(r,n),Z(s[i],1)):(s[i]=Qe(r),s[i].c(),Z(s[i],1),s[i].m(e.parentNode,e))}for(H(),i=o.length;i<s.length;i+=1)r(i);W()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Z(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)G(s[t]);n=!1},d(t){v(s,t),t&&g(e)}}}function en(t){let e,n;return e=new mt({props:{title:t[13],show:t[32],$$slots:{default:[tn]},$$scope:{ctx:t}}}),{c(){tt(e.$$.fragment)},m(t,o){et(e,t,o),n=!0},p(t,n){const o={};16&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){nt(e,t)}}}function nn(t){let e,o,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,o;return{c(){e=$("m-icon"),I(e,"class","mar-r-md"),I(e,"name",o=t[9].icon)},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t);return{c(){e=$("button"),i&&i.c(),o=y(),s=b(r),S(e,"ord","primary"),S(e,"class","full-width"),S(e,"type","submit")},m(t,n){h(t,e,n),i&&i.m(e,null),m(e,o),m(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&g(e),i&&i.d()}}}function on(t){let e,o,s,r,i,l,c,a,u,d,f,p;He.title=e="enablerr - "+t[5];let b=t[13].text&&function(t){let e;return{c(){e=$("h2"),e.textContent=`${t[13].text}`,S(e,"class","mt-6 text-center text-2xl leading-9 font-extrabold text-gray-900")},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t),x=t[1]&&t[7].text&&Ge(t),I=t[3]&&t[8].text&&Ke(t),N=t[6],q=[];for(let e=0;e<N.length;e+=1)q[e]=en(We(t,N,e));const E=t=>G(q[t],1,1,(()=>{q[t]=null}));let T=t[9]&&nn(t);return{c(){o=y(),b&&b.c(),s=y(),x&&x.c(),r=y(),I&&I.c(),i=y(),l=$("p"),l.textContent=`${t[10].text}`,c=y(),a=$("form");for(let t=0;t<q.length;t+=1)q[t].c();u=y(),T&&T.c(),S(l,"id","er-invalid"),S(l,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),S(a,"class","mt-4"),a.noValidate=!0,S(a,"enctype","multipart/form-data")},m(e,n){h(e,o,n),b&&b.m(e,n),h(e,s,n),x&&x.m(e,n),h(e,r,n),I&&I.m(e,n),h(e,i,n),h(e,l,n),h(e,c,n),h(e,a,n);for(let t=0;t<q.length;t+=1)q[t].m(a,null);m(a,u),T&&T.m(a,null),d=!0,f||(p=w(a,"submit",k(t[12])),f=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(He.title=e),t[13].text&&b.p(t,n),t[1]&&t[7].text?x?x.p(t,n):(x=Ge(t),x.c(),x.m(r.parentNode,r)):x&&(x.d(1),x=null),t[3]&&t[8].text?I?I.p(t,n):(I=Ke(t),I.c(),I.m(i.parentNode,i)):I&&(I.d(1),I=null),80&n[0]){let e;for(N=t[6],e=0;e<N.length;e+=1){const o=We(t,N,e);q[e]?(q[e].p(o,n),Z(q[e],1)):(q[e]=en(o),q[e].c(),Z(q[e],1),q[e].m(a,u))}for(H(),e=N.length;e<q.length;e+=1)E(e);W()}t[9]&&T.p(t,n)},i(t){if(!d){for(let t=0;t<N.length;t+=1)Z(q[t]);d=!0}},o(t){q=q.filter(Boolean);for(let t=0;t<q.length;t+=1)G(q[t]);d=!1},d(t){t&&g(o),b&&b.d(t),t&&g(s),x&&x.d(t),t&&g(r),I&&I.d(t),t&&g(i),t&&g(l),t&&g(c),t&&g(a),v(q,t),T&&T.d(),f=!1,p()}}}function sn(t,n,o){let s,r,{options:i={}}=n,{input:l}=n,{head:c=""}=n;const{title:a={},groups:d=[],submit:f=!1,failure:p={},success:m={},button:h=!1,links:g=[]}=i;l=l||{};const v={};let $=!1,b="",y=!1;const x=d.reduce(((t,e)=>t.concat(e.fields)),[]),w=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+r[e]),"?"))(o)))),k={},S={};x.map((({name:t,type:e,value:n})=>{const s=Ee(e);let r=Ct(s,v[t],l[t],n);o(17,k[t]=r,k),S[t]=r}));const{form:I,handleSubmit:N,handleReset:q}=Ve({initialValues:k,onSubmit:async t=>{if(!f)return;const{path:n,func:s}=f,r=(()=>{const t=new FormData,e=document.querySelector("#plugin").files;for(let n=0;n<e.length;n++)t.append(`upload_${n}`,e[n]);return t})();let i={};n&&!(i=await((t,n)=>e.post("/api/"+t,n,{headers:{"Content-Type":"multipart/form-data"}}).then((t=>t.data)))(n,r))||s&&!(i=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(s,r,i))||((t,e)=>{const{action:n,url:s,query:r,reset:i}=t,{status:l=!0,data:c,message:a={}}=e;l?(o(3,y=!0),setTimeout((()=>{o(3,y=!1),w(n,c,s,r)}),m.text?1e3:10)):(i&&q(),o(1,$=!0),o(2,b=a.text),setTimeout((()=>{o(1,$=!1),o(2,b="")}),3e3))})(f,i)}});return u(t,I,(t=>o(4,r=t))),t.$$set=t=>{"options"in t&&o(0,i=t.options),"input"in t&&o(15,l=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=k.Title||a.text||c)},[i,$,b,y,r,s,d,p,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},I,N,a,x,l,c,k,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,I.set(r))}]}function rn(t){let e,n,o,s;const r=t[3].default,i=d(r,t,t[2],null);return{c(){e=$("button"),i&&i.c(),S(e,"class","link-button txt-sm mar-r-sm"),e.disabled=t[1]},m(r,l){h(r,e,l),i&&i.m(e,null),n=!0,o||(s=w(e,"click",t[4]),o=!0)},p(t,[o]){i&&i.p&&(!n||4&o)&&p(i,r,t,t[2],o,null,null),(!n||2&o)&&(e.disabled=t[1])},i(t){n||(Z(i,t),n=!0)},o(t){G(i,t),n=!1},d(t){t&&g(e),i&&i.d(t),o=!1,s()}}}function ln(t,e,n){let{$$slots:o={},$$scope:s}=e,{path:r}=e,{disabled:i}=e;return t.$$set=t=>{"path"in t&&n(0,r=t.path),"disabled"in t&&n(1,i=t.disabled),"$$scope"in t&&n(2,s=t.$$scope)},[r,i,s,o,()=>window.singleSpaNavigate(r)]}function cn(t){let e,o,s,r;return{c(){e=$("m-icon"),I(e,"class",o="flex brd-radius-full brd-with-sm "+t[2]+" pointer svelte-g2tb44"),I(e,"name",t[0]),I(e,"title",t[1])},m(n,o){h(n,e,o),s||(r=w(e,"click",t[3]),s=!0)},p(t,[n]){4&n&&o!==(o="flex brd-radius-full brd-with-sm "+t[2]+" pointer svelte-g2tb44")&&I(e,"class",o),1&n&&I(e,"name",t[0]),2&n&&I(e,"title",t[1])},i:n,o:n,d(t){t&&g(e),s=!1,r()}}}function an(t,e,n){let{icon:o}=e,{title:s}=e,{link:r="/"}=e,{color:i}=e;return t.$$set=t=>{"icon"in t&&n(0,o=t.icon),"title"in t&&n(1,s=t.title),"link"in t&&n(4,r=t.link),"color"in t&&n(2,i=t.color)},[o,s,i,()=>window.singleSpaNavigate(r),r]}function un(t){let e,n,o=t[0](),s=o&&function(t){let e;const n=t[2].default,o=d(n,t,t[1],null);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||2&s)&&p(o,n,t,t[1],s,null,null)},i(t){e||(Z(o,t),e=!0)},o(t){G(o,t),e=!1},d(t){o&&o.d(t)}}}(t);return{c(){s&&s.c(),e=x()},m(t,o){s&&s.m(t,o),h(t,e,o),n=!0},p(t,[e]){o&&s.p(t,e)},i(t){n||(Z(s),n=!0)},o(t){G(s),n=!1},d(t){s&&s.d(t),t&&g(e)}}}function dn(t,e,n){let{$$slots:o={},$$scope:s}=e;const r=window.location.pathname;return t.$$set=t=>{"$$scope"in t&&n(1,s=t.$$scope)},[()=>!!a(dt)||window.singleSpaNavigate(`/?p=${r}`),s,o]}const fn=window.location.pathname;t("default",{version:"0.2.5",Storage:lt,getLoggedIn:()=>dt,Form:class extends rt{constructor(t){super(),st(this,t,Xe,Ue,l,{options:0,input:15,head:16},[-1,-1])}},FormUpload:class extends rt{constructor(t){super(),st(this,t,sn,on,l,{options:0,input:15,head:16},[-1,-1])}},LinkButton:class extends rt{constructor(t){super(),st(this,t,ln,rn,l,{path:0,disabled:1})}},LinkIcon:class extends rt{constructor(t){var e;super(),document.getElementById("svelte-g2tb44-style")||((e=$("style")).id="svelte-g2tb44-style",e.textContent=".red.svelte-g2tb44{background-color:var(--m-color-red-light)}.blue.svelte-g2tb44{background-color:var(--m-color-blue-light)}.green.svelte-g2tb44{background-color:var(--m-color-green-light)}m-icon.svelte-g2tb44{max-height:1.2em}",m(document.head,e)),st(this,t,an,cn,l,{icon:0,title:1,link:4,color:2})}},CheckLogin:class extends rt{constructor(t){super(),st(this,t,dn,un,l,{})}},checkLogin:()=>{a(dt)||window.singleSpaNavigate(`/?p=${fn}`)}})}}}));
1
+ System.register(["axios","@enablerr-ui/layout"],(function(t){"use strict";var e,n;return{setters:[function(t){e=t.default},function(t){n=t.getAttractions}],execute:function(){function o(){}function s(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(s)}function a(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,...e){if(null==t)return o;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function u(t){let e;return l(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(l(e,n))}function p(t,e,n,o){if(t){const s=f(t,e,n,o);return t[0](s)}}function f(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function m(t,e,n,o,s,i,r){const a=function(t,e,n,o){if(t[2]&&o){const s=t[2](o(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|s[o];return t}return e.dirty|s}return e.dirty}(e,o,s,i);if(a){const s=f(e,n,o,r);t.p(s,a)}}function h(t){return t&&a(t.destroy)?t.destroy:o}function $(t,e){t.appendChild(e)}function g(t,e,n){t.insertBefore(e,n||null)}function v(t){t.parentNode.removeChild(t)}function b(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function y(t){return document.createElement(t)}function x(t){return document.createTextNode(t)}function w(){return x(" ")}function k(){return x("")}function S(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function E(t){return function(e){return e.preventDefault(),t.call(this,e)}}function I(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function T(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:I(t,e,n)}function j(t){return""===t?null:+t}function q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function C(t,e){t.value=null==e?"":e}function N(t,e,n){t.classList[n?"add":"remove"](e)}let _;function O(t){_=t}function L(){if(!_)throw new Error("Function called outside component initialization");return _}function A(){const t=L();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const s=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,s)}))}}}function D(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}const B=[],F=[],P=[],V=[],M=Promise.resolve();let z=!1;function R(t){P.push(t)}function Y(t){V.push(t)}let J=!1;const U=new Set;function X(){if(!J){J=!0;do{for(let t=0;t<B.length;t+=1){const e=B[t];O(e),W(e.$$)}for(O(null),B.length=0;F.length;)F.pop()();for(let t=0;t<P.length;t+=1){const e=P[t];U.has(e)||(U.add(e),e())}P.length=0}while(B.length);for(;V.length;)V.pop()();z=!1,J=!1,U.clear()}}function W(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(R)}}const H=new Set;let Z;function G(){Z={r:0,c:[],p:Z}}function K(){Z.r||r(Z.c),Z=Z.p}function Q(t,e){t&&t.i&&(H.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(H.has(t))return;H.add(t),Z&&Z.c.push((()=>{H.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function et(t,e){const n=e.token={};function o(t,o,s,i){if(e.token!==n)return;e.resolved=i;let r=e.ctx;void 0!==s&&(r=r.slice(),r[s]=i);const a=t&&(e.current=t)(r);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(G(),tt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),K())})):e.block.d(1),a.c(),Q(a,1),a.m(e.mount(),e.anchor),c=!0),e.block=a,e.blocks&&(e.blocks[o]=a),c&&X()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=L();if(t.then((t=>{O(n),o(e.then,1,e.value,t),O(null)}),(t=>{if(O(n),o(e.catch,2,e.error,t),O(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var s}function nt(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}const ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function st(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function it(t){t&&t.c()}function rt(t,e,n,o){const{fragment:i,on_mount:c,on_destroy:l,after_update:u}=t.$$;i&&i.m(e,n),o||R((()=>{const e=c.map(s).filter(a);l?l.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(R)}function at(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ct(t,e){-1===t.$$.dirty[0]&&(B.push(t),z||(z=!0,M.then(X)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(t,e,n,s,a,c,l=[-1]){const u=_;O(t);const d=t.$$={fragment:null,ctx:null,props:c,update:o,not_equal:a,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:i(),dirty:l,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&ct(t,e)),n})):[],d.update(),p=!0,r(d.before_update),d.fragment=!!s&&s(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(v)}else d.fragment&&d.fragment.c();e.intro&&Q(t.$$.fragment),rt(t,e.target,e.anchor,e.customElement),X()}O(u)}class ut{$destroy(){at(this,1),this.$destroy=o}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const dt=window.sessionStorage;dt.clear();const pt={getItem:t=>dt.getItem(t),setItem:(t,e)=>dt.setItem(t,e)},ft=[];function mt(t,e=o){let n;const s=[];function i(e){if(c(t,e)&&(t=e,n)){const e=!ft.length;for(let e=0;e<s.length;e+=1){const n=s[e];n[1](),ft.push(n,t)}if(e){for(let t=0;t<ft.length;t+=2)ft[t][0](ft[t+1]);ft.length=0}}}return{set:i,update:function(e){i(e(t))},subscribe:function(r,a=o){const c=[r,a];return s.push(c),1===s.length&&(n=e(i)||o),r(t),()=>{const t=s.indexOf(c);-1!==t&&s.splice(t,1),0===s.length&&(n(),n=null)}}}}function ht(t,e,n){const s=!Array.isArray(t),i=s?[t]:t,c=e.length<2;return u=t=>{let n=!1;const u=[];let d=0,p=o;const f=()=>{if(d)return;p();const n=e(s?u[0]:u,t);c?t(n):p=a(n)?n:o},m=i.map(((t,e)=>l(t,(t=>{u[e]=t,d&=~(1<<e),n&&f()}),(()=>{d|=1<<e}))));return n=!0,f(),function(){r(m),p()}},{subscribe:mt(n,u).subscribe};var u}const $t=mt(window.localStorage.getItem("lh-enablerr-user")?{user:window.localStorage.getItem("lh-enablerr-user"),gravatar:window.localStorage.getItem("lh-enablerr-gravatar"),tenant:window.localStorage.getItem("lh-enablerr-tenant"),tenants:JSON.parse(window.localStorage.getItem("lh-enablerr-tenants"))}:""),gt=mt([]),vt=mt({tenant:"",status:""});function bt(t){let e,n,o,s,i;const r=t[3].default,a=p(r,t,t[2],null);return{c(){e=y("fieldset"),n=y("legend"),o=x(t[0]),s=w(),a&&a.c(),N(n,"sr-only",!t[1])},m(t,r){g(t,e,r),$(e,n),$(n,o),$(e,s),a&&a.m(e,null),i=!0},p(t,[e]){(!i||1&e)&&q(o,t[0]),2&e&&N(n,"sr-only",!t[1]),a&&a.p&&(!i||4&e)&&m(a,r,t,t[2],e,null,null)},i(t){i||(Q(a,t),i=!0)},o(t){tt(a,t),i=!1},d(t){t&&v(e),a&&a.d(t)}}}function yt(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:i=""}=e,{show:r=!0}=e;return t.$$set=t=>{"title"in t&&n(0,i=t.title),"show"in t&&n(1,r=t.show),"$$scope"in t&&n(2,s=t.$$scope)},[i,r,s,o]}class xt extends ut{constructor(t){super(),lt(this,t,yt,bt,c,{title:0,show:1})}}const wt=t=>({}),kt=t=>({}),St=t=>({}),Et=t=>({});function It(t){let e,n,o,s,i,a,c,l,u,d;const f=t[16].head,h=p(f,t,t[15],Et),$=t[16].tail,b=p($,t,t[15],kt);return{c(){h&&h.c(),e=w(),n=y("input"),s=w(),i=y("input"),c=w(),b&&b.c(),I(n,"type","number"),I(n,"class",o=t[1]+" form-input form-number hidden"),I(n,"id",t[5]),I(n,"name",t[5]),I(n,"placeholder",t[8]),I(n,"aria-label",t[7]),I(n,"title",t[7]),n.required=t[9],n.disabled=t[10],I(n,"pattern",t[11]),I(n,"min",t[2]),I(n,"max",t[12]),I(n,"step",t[3]),I(i,"type","text"),I(i,"id",t[6]),I(i,"name",t[6]),I(i,"class",a=t[1]+" form-input form-number form-shadow"),i.disabled=t[10],I(i,"aria-label",t[7]),I(i,"title",t[7])},m(o,r){h&&h.m(o,r),g(o,e,r),g(o,n,r),C(n,t[0]),g(o,s,r),g(o,i,r),C(i,t[4]),g(o,c,r),b&&b.m(o,r),l=!0,u||(d=[S(n,"input",t[18]),S(n,"blur",t[13]),S(i,"input",t[19]),S(i,"focus",t[17])],u=!0)},p(t,[e]){h&&h.p&&(!l||32768&e)&&m(h,f,t,t[15],e,St,Et),(!l||2&e&&o!==(o=t[1]+" form-input form-number hidden"))&&I(n,"class",o),(!l||4&e)&&I(n,"min",t[2]),(!l||8&e)&&I(n,"step",t[3]),1&e&&j(n.value)!==t[0]&&C(n,t[0]),(!l||2&e&&a!==(a=t[1]+" form-input form-number form-shadow"))&&I(i,"class",a),16&e&&i.value!==t[4]&&C(i,t[4]),b&&b.p&&(!l||32768&e)&&m(b,$,t,t[15],e,wt,kt)},i(t){l||(Q(h,t),Q(b,t),l=!0)},o(t){tt(h,t),tt(b,t),l=!1},d(t){h&&h.d(t),t&&v(e),t&&v(n),t&&v(s),t&&v(i),t&&v(c),b&&b.d(t),u=!1,r(d)}}}function Tt(t,e,n){let{$$slots:o={},$$scope:s}=e,{options:i}=e,{css:r}=e,{value:a}=e;const c=JSON.parse(window.sessionStorage.getItem("Locale")),{name:l,nameShadow:u,title:d,placeholder:p,required:f,disabled:m,pattern:h}=i;let{positive:$,min:g,max:v,decimal:b=0,step:y=1}=i;const x=A();let w;b>0&&(y="any"),$&&!g&&(g=0);const k=((t,e)=>{const n=Intl.NumberFormat?new Intl.NumberFormat(t,{minimumFractionDigits:e}):{format:t=>t};return{format:t=>{try{t=n.format(t||0)}catch{t="(ungültig)"}return t}}})(c.id,b),S=()=>{n(4,w=k.format(a))};return S(),t.$$set=t=>{"options"in t&&n(14,i=t.options),"css"in t&&n(1,r=t.css),"value"in t&&n(0,a=t.value),"$$scope"in t&&n(15,s=t.$$scope)},[a,r,g,y,w,l,u,d,p,f,m,h,v,()=>{S(),x("blur")},i,s,o,function(e){D(t,e)},function(){a=j(this.value),n(0,a)},function(){w=this.value,n(4,w)}]}class jt extends ut{constructor(t){super(),lt(this,t,Tt,It,c,{options:14,css:1,value:0})}}function qt(t){let e;return{c(){e=y("span"),e.textContent="%",I(e,"slot","head"),I(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function Ct(t){let e,n,o;function s(e){t[3](e)}let i={options:t[0],css:t[2],$$slots:{head:[qt]},$$scope:{ctx:t}};return void 0!==t[1]&&(i.value=t[1]),e=new jt({props:i}),F.push((()=>st(e,"value",s))),e.$on("focus",t[4]),e.$on("blur",t[5]),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),4&o&&(s.css=t[2]),64&o&&(s.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,s.value=t[1],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Nt(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;return o.positive=o.positive||!0,o.max=o.max||100,o.decimal=o.decimal||2,t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(1,i=t.value)},[o,i,s,function(t){i=t,n(1,i)},function(e){D(t,e)},function(e){D(t,e)}]}function _t(t){let e,n;return{c(){e=y("span"),n=x(t[3]),I(e,"slot","head"),I(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,o){g(t,e,o),$(e,n)},p(t,e){8&e&&q(n,t[3])},d(t){t&&v(e)}}}function Ot(t){let e,n,o;function s(e){t[4](e)}let i={options:t[1],css:t[2],$$slots:{head:[_t]},$$scope:{ctx:t}};return void 0!==t[0]&&(i.value=t[0]),e=new jt({props:i}),F.push((()=>st(e,"value",s))),e.$on("focus",t[5]),e.$on("blur",t[6]),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,[o]){const s={};2&o&&(s.options=t[1]),4&o&&(s.css=t[2]),136&o&&(s.$$scope={dirty:o,ctx:t}),!n&&1&o&&(n=!0,s.value=t[0],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Lt(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e,{currency:r="CHF"}=e;return t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,i=t.value),"currency"in t&&n(3,r=t.currency)},[i,o,s,r,function(t){i=t,n(0,i)},function(e){D(t,e)},function(e){D(t,e)}]}function At(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","password"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],I(e,"pattern",t[7]),I(e,"autocomplete","off")},m(n,o){g(n,e,o),C(e,t[0]),s||(i=S(e,"input",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function Dt(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,placeholder:c,required:l,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,d,o,function(){i=this.value,n(0,i)}]}Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value;const Bt=t=>((t,...e)=>e.includes(t))(t,void 0,null),Ft=t=>!Bt(t),Pt=(t,...e)=>e.concat(t).find(Ft),Vt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Mt=(t,e=2,n=0,o=t.toString(),s=n.toString())=>s.repeat(e-o.length)+o,zt=(...t)=>{return(e=t[0],(t,...n)=>Vt(Vt("",e.toString),t,...n))(Mt,...t);var e};function Rt(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","date"),I(e,"class",n=t[1]+" form-input form-date"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"aria-label",t[3]),I(e,"title",t[3]),I(e,"pattern",Xt),I(e,"min",t[6]),I(e,"max",t[7]),e.required=t[4],e.disabled=t[5]},m(n,o){g(n,e,o),C(e,t[0]),s||(i=[S(e,"input",t[10]),S(e,"blur",t[9])],s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input form-date")&&I(e,"class",n),1&o&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r(i)}}}const Yt={timeZone:"UTC",year:"numeric",month:"long",day:"numeric",weekday:"short"},Jt={year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",timeZoneName:"short"},Ut=(t,e=!1)=>{const n=e?Jt:Yt,o=Intl.DateTimeFormat?new Intl.DateTimeFormat(t,n):{format:t=>t};return{format:t=>{try{t=t?o.format(new Date(t)):""}catch{t="(ungültig)"}return t}}},Xt="\\d{4}(-|/)\\d{2}(-|/)\\d{2}";function Wt(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,required:c,disabled:l,min:u,max:d}=o;return i=i.substr(0,10),t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,d,o,function(e){D(t,e)},function(){i=this.value,n(0,i)}]}class Ht extends ut{constructor(t){super(),lt(this,t,Wt,Rt,c,{options:8,css:1,value:0})}}const{document:Zt}=ot;function Gt(t,e,n){const o=t.slice();return o[16]=e[n].lit,o[17]=e[n].ref,o[18]=e,o[19]=n,o}function Kt(t){let e,n,o;function s(){t[12].call(e,t[19])}return{c(){e=y("input"),I(e,"class","iw-m iw-n"+t[17].count+" svelte-u6cc6e"),I(e,"id",t[2]+"-"+t[19]),I(e,"type","text"),I(e,"data-step",t[19]),I(e,"size",t[17].count),I(e,"minlength",t[17].count),I(e,"maxlength",t[17].count),I(e,"pattern",t[5][t[19]]||t[17].pattern),e.required=t[3],e.disabled=t[4]},m(i,r){g(i,e,r),C(e,t[1][t[19]]),n||(o=[S(e,"input",s),S(e,"input",t[8]),S(e,"blur",t[11])],n=!0)},p(n,o){t=n,2&o&&e.value!==t[1][t[19]]&&C(e,t[1][t[19]])},d(t){t&&v(e),n=!1,r(o)}}}function Qt(t){let e,n,s=t[16]+"";return{c(){e=y("span"),n=x(s),I(e,"class","iw-m svelte-u6cc6e")},m(t,o){g(t,e,o),$(e,n)},p:o,d(t){t&&v(e)}}}function te(t){let e;let n=function(t,e){return t[16]?Qt:Kt}(t),o=n(t);return{c(){o.c(),e=k()},m(t,n){o.m(t,n),g(t,e,n)},p(t,e){o.p(t,e)},d(t){o.d(t),t&&v(e)}}}function ee(t){let e,n,s,i,r=t[6].obj,a=[];for(let e=0;e<r.length;e+=1)a[e]=te(Gt(t,r,e));return{c(){e=y("div");for(let t=0;t<a.length;t+=1)a[t].c();I(e,"class",n=t[0]+" form-input svelte-u6cc6e"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"tabindex","0")},m(n,o){g(n,e,o);for(let t=0;t<a.length;t+=1)a[t].m(e,null);s||(i=S(e,"focus",t[7]),s=!0)},p(t,[o]){if(382&o){let n;for(r=t[6].obj,n=0;n<r.length;n+=1){const s=Gt(t,r,n);a[n]?a[n].p(s,o):(a[n]=te(s),a[n].c(),a[n].m(e,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=r.length}1&o&&n!==(n=t[0]+" form-input svelte-u6cc6e")&&I(e,"class",n)},i:o,o:o,d(t){t&&v(e),b(a,t),s=!1,i()}}}function ne(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;i=i.toString();const{name:r,title:a,required:c,disabled:l,mask:u,pattern:d=[]}=o,p=(t=>{let e=[],n="",o=!1;if("string"!=typeof t)return e;const s=(t="")=>{n=t},i=t=>s(n.concat(t)),r=(t=!0)=>{o=t},a=t=>(e.push({lit:t}),void r(!1));for(const c of t)o?a(c):"\\"===c?r():"{"===c?s():"}"===c?e.push({ref:{count:parseInt(n),pattern:`\\d{${n}}`}}):" "===c?a(c):c>=0?i(c):a(c);const c=(t,n="",o=!0,s=0)=>t?e.reduce(((e,n)=>e.concat(n.ref&&n.ref.count?t.slice(s,s+=n.ref.count):o&&n.lit||"")),n):n;return{obj:e,getValues:t=>c(t,[],!1),format:t=>c(t)}})(u),f=p.getValues(i);return t.$$set=t=>{"options"in t&&n(10,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(9,i=t.value)},[s,f,r,c,l,d,p,({relatedTarget:t})=>{if(!t||"INPUT"===t.tagName)return!0;const e=`#${r} > input`;return document.querySelectorAll(e)[0].focus()},({target:t})=>{n(9,i=f.reduce(((t,e)=>t.concat(e))));const e=t.dataset.step;if(f[e].length<t.minLength)return!0;const o=`#${r}-${e} ~ input`,s=document.querySelectorAll(o);return s[0]&&s[0].focus&&s[0].focus()},i,o,function(e){D(t,e)},function(t){f[t]=this.value,n(1,f)}]}class oe extends ut{constructor(t){var e;super(),Zt.getElementById("svelte-u6cc6e-style")||((e=y("style")).id="svelte-u6cc6e-style",e.textContent="span.iw-m.svelte-u6cc6e{margin-right:1px;margin-left:1px}.iw-n1.svelte-u6cc6e{width:0.75rem}.iw-n2.svelte-u6cc6e{width:1.25rem}.iw-n3.svelte-u6cc6e{width:2rem}.iw-n4.svelte-u6cc6e{width:2.5rem}.iw-n5.svelte-u6cc6e{width:3.25rem}.iw-n6.svelte-u6cc6e{width:3.75rem}.iw-n7.svelte-u6cc6e{width:4.5rem}.iw-n8.svelte-u6cc6e{width:5rem}.iw-n9.svelte-u6cc6e{width:5.75rem}.iw-n10.svelte-u6cc6e{width:6.25rem}input.svelte-u6cc6e:invalid{background-color:#fff5f5}",$(Zt.head,e)),lt(this,t,ne,ee,c,{options:10,css:0,value:9})}}function se(t){let e,n,o;function s(e){t[3](e)}let i={options:t[0],css:t[1]};return void 0!==t[2]&&(i.value=t[2]),e=new oe({props:i}),F.push((()=>st(e,"value",s))),e.$on("blur",t[4]),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),2&o&&(s.css=t[1]),!n&&4&o&&(n=!0,s.value=t[2],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function ie(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;return s=s.concat(" form-time"),o.mask="{2}:{2}",o.pattern=["(2[0-3]|[0-1][0-9])","","[0-5][0-9]"],t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(2,i=t.value)},[o,s,i,function(t){i=t,n(2,i)},function(e){D(t,e)}]}class re extends ut{constructor(t){super(),lt(this,t,ie,se,c,{options:0,css:1,value:2})}}function ae(t){let e,n,o,s,i,a,c,l,u,d,p,f;function m(e){t[15](e)}let h={options:t[4],css:t[0]};function b(e){t[16](e)}void 0!==t[1]&&(h.value=t[1]),n=new Ht({props:h}),F.push((()=>st(n,"value",m))),n.$on("blur",t[10]);let x={options:t[3],css:t[0]};return void 0!==t[2]&&(x.value=t[2]),i=new re({props:x}),F.push((()=>st(i,"value",b))),i.$on("blur",t[10]),{c(){e=y("div"),it(n.$$.fragment),s=w(),it(i.$$.fragment),c=w(),l=y("input"),I(e,"id",t[6]),I(e,"tabindex","90"),I(e,"class","hidden"),I(l,"type","text"),I(l,"class",u=t[0]+" form-input form-shadow"),I(l,"id",t[7]),I(l,"name",t[7]),l.disabled=t[9],I(l,"aria-label",t[8]),I(l,"title",t[8])},m(o,r){g(o,e,r),rt(n,e,null),$(e,s),rt(i,e,null),g(o,c,r),g(o,l,r),C(l,t[5]),d=!0,p||(f=[S(e,"blur",t[10]),S(e,"focus",t[11]),S(l,"input",t[17]),S(l,"focus",t[14])],p=!0)},p(t,[e]){const s={};16&e&&(s.options=t[4]),1&e&&(s.css=t[0]),!o&&2&e&&(o=!0,s.value=t[1],Y((()=>o=!1))),n.$set(s);const r={};8&e&&(r.options=t[3]),1&e&&(r.css=t[0]),!a&&4&e&&(a=!0,r.value=t[2],Y((()=>a=!1))),i.$set(r),(!d||1&e&&u!==(u=t[0]+" form-input form-shadow"))&&I(l,"class",u),32&e&&l.value!==t[5]&&C(l,t[5])},i(t){d||(Q(n.$$.fragment,t),Q(i.$$.fragment,t),d=!0)},o(t){tt(n.$$.fragment,t),tt(i.$$.fragment,t),d=!1},d(t){t&&v(e),at(n),at(i),t&&v(c),t&&v(l),p=!1,r(f)}}}function ce(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const r=JSON.parse(window.sessionStorage.getItem("Locale"));let{date:a,time:c}=(t=>{if(!t)return{date:"",time:""};const e=new Date(t),n=e.getFullYear().toString(),o=zt(e.getMonth()+1),s=zt(e.getDate()),i=zt(e.getHours()),r=zt(e.getMinutes());return{date:n.concat("-",o,"-",s),time:i.concat(r)}})(i);const{name:l,nameShadow:u,title:d,disabled:p}=o;let f,m=Object.assign({},o),h=Object.assign({},o);h.name=l+"-Date",m.name=l+"-Time";const $=Ut(r.id,!0),g=()=>{try{n(12,(t=c,i=new Date(a.substring(0,10).concat("T",t.substr(0,2),":",t.substr(2))).toISOString()))}catch(t){n(12,i=a||c?"invalid":"")}var t;n(5,f=$.format(i))},v=t=>t.startsWith(h.name),b=A();return g(),t.$$set=t=>{"options"in t&&n(13,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(12,i=t.value)},[s,a,c,m,h,f,l,u,d,p,({relatedTarget:t})=>{if(t){if(t.id.startsWith(m.name))return!0;if(v(t.id))return!0}g(),b("blur")},({relatedTarget:t})=>!t||(!!v(t.id)||void document.getElementById(h.name).focus()),i,o,function(e){D(t,e)},function(t){a=t,n(1,a)},function(t){c=t,n(2,c)},function(){f=this.value,n(5,f)}]}function le(t){let e,n,o,s,i,a,c,l;function u(e){t[10](e)}let d={options:t[1],css:t[2]+" hidden"};return void 0!==t[0]&&(d.value=t[0]),e=new Ht({props:d}),F.push((()=>st(e,"value",u))),e.$on("blur",t[8]),{c(){it(e.$$.fragment),o=w(),s=y("input"),I(s,"type","text"),I(s,"class",i=t[2]+" form-input form-shadow"),I(s,"id",t[4]),I(s,"name",t[4]),I(s,"placeholder",t[6]),s.disabled=t[7],I(s,"aria-label",t[5]),I(s,"title",t[5])},m(n,i){rt(e,n,i),g(n,o,i),g(n,s,i),C(s,t[3]),a=!0,c||(l=[S(s,"input",t[11]),S(s,"focus",t[9])],c=!0)},p(t,[o]){const r={};2&o&&(r.options=t[1]),4&o&&(r.css=t[2]+" hidden"),!n&&1&o&&(n=!0,r.value=t[0],Y((()=>n=!1))),e.$set(r),(!a||4&o&&i!==(i=t[2]+" form-input form-shadow"))&&I(s,"class",i),8&o&&s.value!==t[3]&&C(s,t[3])},i(t){a||(Q(e.$$.fragment,t),a=!0)},o(t){tt(e.$$.fragment,t),a=!1},d(t){at(e,t),t&&v(o),t&&v(s),c=!1,r(l)}}}function ue(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const r=JSON.parse(window.sessionStorage.getItem("Locale")),{nameShadow:a,title:c,placeholder:l,disabled:u}=o;let d;const p=Ut(r.id),f=()=>{n(3,d=p.format(i))},m=A();return f(),t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,i=t.value)},[i,o,s,d,a,c,l,u,()=>{f(),m("blur")},function(e){D(t,e)},function(t){i=t,n(0,i)},function(){d=this.value,n(3,d)}]}function de(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","email"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6]},m(n,o){g(n,e,o),C(e,t[0]),s||(i=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function pe(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,placeholder:c,required:l,disabled:u}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,o,function(){i=this.value,n(0,i)}]}function fe(t){let e,n,s,i;return{c(){e=y("textarea"),I(e,"rows",t[6]),I(e,"class",n=t[1]+" form-textarea block"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[4],e.disabled=t[5]},m(n,o){g(n,e,o),C(e,t[0]),s||(i=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-textarea block")&&I(e,"class",n),1&o&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function me(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,required:c,disabled:l,rows:u=3}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,o,function(){i=this.value,n(0,i)}]}function he(t){let e,n,s,i,a,c,l,u;return{c(){e=y("div"),n=y("input"),s=w(),i=y("div"),a=w(),c=y("div"),I(n,"type","checkbox"),I(n,"id",t[1]),I(n,"name",t[1]),I(n,"aria-label",t[2]),I(n,"title",t[2]),n.disabled=t[3],I(n,"class","svelte-ke6ng1"),I(i,"class","track svelte-ke6ng1"),I(c,"class","thumb svelte-ke6ng1"),I(e,"class","switch svelte-ke6ng1")},m(o,r){g(o,e,r),$(e,n),n.checked=t[0],$(e,s),$(e,i),$(e,a),$(e,c),l||(u=[S(n,"change",t[7]),S(i,"click",t[4]),S(c,"click",t[4])],l=!0)},p(t,[e]){1&e&&(n.checked=t[0])},i:o,o:o,d(t){t&&v(e),l=!1,r(u)}}}function $e(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;s="";const{name:r,title:a,disabled:c}=o;return t.$$set=t=>{"options"in t&&n(6,o=t.options),"css"in t&&n(5,s=t.css),"value"in t&&n(0,i=t.value)},[i,r,a,c,()=>n(0,i=c?i:!i),s,o,function(){i=this.checked,n(0,i)}]}function ge(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","file"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"pattern",t[7]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],e.multiple=!0},m(n,o){g(n,e,o),s||(i=S(e,"change",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n)},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function ve(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,placeholder:c,required:l,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,d,o,function(){i=this.value,n(0,i)}]}function be(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","text"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],I(e,"pattern",t[7]),I(e,"autocomplete",t[8])},m(n,o){g(n,e,o),C(e,t[0]),s||(i=S(e,"input",t[10]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function ye(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,placeholder:c,required:l,disabled:u,pattern:d,autocomplete:p="on"}=o;return t.$$set=t=>{"options"in t&&n(9,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,d,p,o,function(){i=this.value,n(0,i)}]}function xe(t){let e,n,s;return{c(){e=y("input"),I(e,"type","hidden"),I(e,"id",t[1]),I(e,"name",t[1]),e.disabled=!0},m(o,i){g(o,e,i),C(e,t[0]),n||(s=S(e,"input",t[4]),n=!0)},p(t,[n]){1&n&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),n=!1,s()}}}function we(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;s="";const{name:r}=o;return t.$$set=t=>{"options"in t&&n(3,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,i=t.value)},[i,r,s,o,function(){i=this.value,n(0,i)}]}const{document:ke}=ot;function Se(t){let e;return{c(){e=y("p"),e.textContent=`Unknow input type: ${t[4]}`,I(e,"class","svelte-166hp95")},m(t,n){g(t,e,n)},p:o,i:o,o:o,d(t){t&&v(e)}}}function Ee(t){let e,n,o,s;function i(e){t[9](e)}var r=t[6];function a(t){let e={options:t[0],css:De};return void 0!==t[1]&&(e.value=t[1]),{props:e}}return r&&(e=new r(a(t)),F.push((()=>st(e,"value",i))),e.$on("focus",t[7]),e.$on("blur",t[8])),{c(){e&&it(e.$$.fragment),o=k()},m(t,n){e&&rt(e,t,n),g(t,o,n),s=!0},p(t,s){const c={};if(1&s&&(c.options=t[0]),!n&&2&s&&(n=!0,c.value=t[1],Y((()=>n=!1))),r!==(r=t[6])){if(e){G();const t=e;tt(t.$$.fragment,1,0,(()=>{at(t,1)})),K()}r?(e=new r(a(t)),F.push((()=>st(e,"value",i))),e.$on("focus",t[7]),e.$on("blur",t[8]),it(e.$$.fragment),Q(e.$$.fragment,1),rt(e,o.parentNode,o)):e=null}else r&&e.$set(c)},i(t){s||(e&&Q(e.$$.fragment,t),s=!0)},o(t){e&&tt(e.$$.fragment,t),s=!1},d(t){t&&v(o),e&&at(e,t)}}}function Ie(t){let e,n,s,i,r,a,c,l,u,d,p,f=t[2].title+"";const m=[Ee,Se],h=[];a=function(t,e){return t[6]?0:1}(t),c=h[a]=m[a](t);let b=t[5]&&function(t){let e;return{c(){e=y("p"),e.textContent=`${t[5]}`,I(e,"class","form-hint hidden svelte-166hp95")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=y("fieldset"),n=y("label"),s=x(f),r=w(),c.c(),l=w(),b&&b.c(),I(n,"for",i=t[2].id),I(n,"disabled",t[3])},m(o,i){g(o,e,i),$(e,n),$(n,s),$(e,r),h[a].m(e,null),$(e,l),b&&b.m(e,null),u=!0,d||(p=S(n,"click",t[7]),d=!0)},p(t,[e]){(!u||4&e)&&f!==(f=t[2].title+"")&&q(s,f),(!u||4&e&&i!==(i=t[2].id))&&I(n,"for",i),c.p(t,e),t[5]&&b.p(t,e)},i(t){u||(Q(c),u=!0)},o(t){tt(c),u=!1},d(t){t&&v(e),h[a].d(),b&&b.d(),d=!1,p()}}}const Te={hidden:class extends ut{constructor(t){super(),lt(this,t,we,xe,c,{options:3,css:2,value:0})}},text:class extends ut{constructor(t){super(),lt(this,t,ye,be,c,{options:9,css:1,value:0})}},file:class extends ut{constructor(t){super(),lt(this,t,ve,ge,c,{options:8,css:1,value:0})}},checkbox:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-ke6ng1-style")||((e=y("style")).id="svelte-ke6ng1-style",e.textContent=".switch.svelte-ke6ng1.svelte-ke6ng1{display:block;position:relative;vertical-align:middle;cursor:pointer;background-color:transparent;user-select:none}.track.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:3rem;height:1.5rem;background-color:#a0aec0;border-radius:9999px;box-shadow:inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)}.thumb.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:1.5rem;height:1.5rem;background-color:white;transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);border-radius:9999px;border-width:2px;border-color:#a0aec0}input[type='checkbox'].svelte-ke6ng1.svelte-ke6ng1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}input[type='checkbox'].svelte-ke6ng1:checked~.thumb.svelte-ke6ng1{border-color:#38b2ac;--transform-translate-x:100%;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;--border-opacity:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}input[type='checkbox'].svelte-ke6ng1:checked~.track.svelte-ke6ng1{background-color:#38b2ac;--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transition-property:background-color, border-color, color, fill, stroke}input[type='checkbox'].svelte-ke6ng1:disabled~.track.svelte-ke6ng1{background-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled~.thumb.svelte-ke6ng1{background-color:#f7fafc;border-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.thumb.svelte-ke6ng1{border-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.track.svelte-ke6ng1{background-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:focus+.track.svelte-ke6ng1,input[type='checkbox'].svelte-ke6ng1:active+.track.svelte-ke6ng1{box-shadow:0 0 0 3px rgba(66, 153, 225, 0.5)}",$(document.head,e)),lt(this,t,$e,he,c,{options:6,css:5,value:0})}},masked:oe,textarea:class extends ut{constructor(t){super(),lt(this,t,me,fe,c,{options:7,css:1,value:0})}},email:class extends ut{constructor(t){super(),lt(this,t,pe,de,c,{options:7,css:1,value:0})}},date:class extends ut{constructor(t){super(),lt(this,t,ue,le,c,{options:1,css:2,value:0})}},datetime:class extends ut{constructor(t){super(),lt(this,t,ce,ae,c,{options:13,css:0,value:12})}},number:jt,password:class extends ut{constructor(t){super(),lt(this,t,Dt,At,c,{options:8,css:1,value:0})}},currency:class extends ut{constructor(t){super(),lt(this,t,Lt,Ot,c,{options:1,css:2,value:0,currency:3})}},rate:class extends ut{constructor(t){super(),lt(this,t,Nt,Ct,c,{options:0,css:2,value:1})}}},je={default:"",checkbox:!1,email:"@",number:0,currency:0,rate:0},qe=t=>t+"-show",Ce=t=>t&&document.getElementById(t),Ne=(t,e,n="block")=>{t&&t.style&&(t.style.display=e?n:"none")},_e=(t,e)=>{if(!t)return!0;const n=Ce(t);if(!n)return!0;const o=Ce(qe(t));return!e&&!o||(o&&Ne(o,!e),Ne(n,e),e&&n.focus&&n.focus(),!1)},Oe=t=>_e(t,!0),Le=(t,e=Ce(t))=>e&&e.children&&e.children.length?Array.from(e.children).every((t=>Le(t.id,t))):!e||!e.validity||e.validity.valid,Ae=t=>void 0===je[t]?je.default:je[t],De="form-field";function Be(t,e,n){let{options:o}=e,{value:s}=e;const{label:i={},disabled:r,type:a="text",hint:c=!1}=o;i.id=o.name,o.nameShadow=qe(o.name),o.required=!r&&o.required,o.title=o.title||o.placeholder;const l=(t=>Te[t])(a);return t.$$set=t=>{"options"in t&&n(0,o=t.options),"value"in t&&n(1,s=t.value)},[o,s,i,r,a,c,l,t=>Oe(o.name),t=>{return e=o.name,_e(e,!1);var e},function(t){s=t,n(1,s)}]}class Fe extends ut{constructor(t){var e;super(),ke.getElementById("svelte-166hp95-style")||((e=y("style")).id="svelte-166hp95-style",e.textContent="p.svelte-166hp95,.form-hint.svelte-166hp95{padding-left:0.75rem;color:#38b2ac;font-size:0.875rem;font-style:italic}",$(ke.head,e)),lt(this,t,Be,Ie,c,{options:0,value:1})}}var Pe=Object.prototype.hasOwnProperty;function Ve(t){return null==t}function Me(t){return Ve(t)||Object.keys(t).length<=0}const ze=function t(e,n){var o,s;if(e===n)return!0;if(e&&n&&(o=e.constructor)===n.constructor){if(o===Date)return e.getTime()===n.getTime();if(o===RegExp)return e.toString()===n.toString();if(o===Array){if((s=e.length)===n.length)for(;s--&&t(e[s],n[s]););return-1===s}if(!o||"object"==typeof e){for(o in s=0,e){if(Pe.call(e,o)&&++s&&!Pe.call(n,o))return!1;if(!(o in n)||!t(e[o],n[o]))return!1}return Object.keys(n).length===s}}return e!=e&&n!=n};function Re(t,e,n){if(new Object(t)!==t)return t;Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]);const o=e.slice(0,-1).reduce(((t,n,o)=>new Object(t[n])===t[n]?t[n]:t[n]=Math.trunc(Math.abs(e[o+1]))===+e[o+1]?[]:{}),t);return o[e[e.length-1]]=n,t}const Ye={assignDeep:function t(e,n){if(Array.isArray(e))return e.map((e=>t(e,n)));const o={};for(const s in e)o[s]="object"==typeof e[s]?t(e[s],n):n;return o},cloneDeep:function(t){return JSON.parse(JSON.stringify(t))},deepEqual:ze,getErrorsFromSchema:function t(e,n,o={}){for(const s in n)switch(!0){case"object"===n[s].type&&!Me(n[s].fields):o[s]=t(e[s],n[s].fields,{...o[s]});break;case"array"===n[s].type:{const i=e&&e[s]?e[s]:[];o[s]=i.map((e=>{const i=t(e,n[s].innerType.fields,{...o[s]});return Object.keys(i).length>0?i:""}));break}default:o[s]=""}return o},getValues:function t(e){let n=[];for(const[,o]of Object.entries(e)){const e="object"==typeof o?t(o):[o];n=[...n,...e]}return n},isEmpty:Me,isNullish:Ve,set:Re,subscribeOnce:function(t){return new Promise((e=>{t.subscribe(e)()}))},update:function(t,e,n){t.update((t=>(Re(t,e,n),t)))}};const Je=t=>{let e=t.initialValues||{};const n=t.validationSchema,o=t.validate,s=t.onSubmit,i=()=>Ye.cloneDeep(e),r=()=>n?Ye.getErrorsFromSchema(e,n.fields):Ye.assignDeep(e,""),a=()=>Ye.assignDeep(e,!1),c=mt(i()),l=mt(r()),d=mt(a()),p=mt(!1),f=mt(!1),m=ht(l,(t=>Ye.getValues(t).every((t=>""===t)))),h=ht(c,(t=>{const n=Ye.assignDeep(t,!1);for(let o in t)n[o]=!Ye.deepEqual(t[o],e[o]);return n})),$=ht(h,(t=>Ye.getValues(t).includes(!0)));function g(t,e){return w(t,!0),n?(f.set(!0),n.validateAt(t,u(c)).then((()=>Ye.update(l,t,""))).catch((e=>Ye.update(l,t,e.message))).finally((()=>{f.set(!1)}))):o?(f.set(!0),Promise.resolve().then((()=>o({[t]:e}))).then((e=>Ye.update(l,t,Ye.isNullish(e)?"":e[t]))).finally((()=>{f.set(!1)}))):Promise.resolve()}function v(t,e){return x(t,e),g(t,e)}function b(){c.set(i()),l.set(r()),d.set(a())}function y(t){return Promise.resolve().then((()=>l.set(r()))).then((()=>s(t,c,l))).finally((()=>p.set(!1)))}function x(t,e){Ye.update(c,t,e)}function w(t,e){Ye.update(d,t,e)}return{form:c,errors:l,touched:d,modified:h,isValid:m,isSubmitting:p,isValidating:f,isModified:$,handleChange:function(t){const e=t.target,n=e.name||e.id,o=function(t){return t.getAttribute&&"checkbox"===t.getAttribute("type")}(e)?e.checked:e.value;return v(n,o)},handleSubmit:function(t){return t&&t.preventDefault&&t.preventDefault(),p.set(!0),Ye.subscribeOnce(c).then((t=>"function"==typeof o?(f.set(!0),Promise.resolve().then((()=>o(t))).then((e=>{Ye.isNullish(e)||0===Ye.getValues(e).length?y(t):(l.set(e),p.set(!1))})).finally((()=>f.set(!1)))):n?(f.set(!0),n.validate(t,{abortEarly:!1}).then((()=>y(t))).catch((t=>{if(t&&t.inner){const e=r();t.inner.map((t=>Ye.set(e,t.path,t.message))),l.set(e)}p.set(!1)})).finally((()=>f.set(!1)))):void y(t)))},handleReset:b,updateField:x,updateValidateField:v,updateTouched:w,validateField:function(t){return Ye.subscribeOnce(c).then((e=>g(t,e[t])))},updateInitialValues:function(t){e=t,b()},state:ht([c,l,d,h,m,f,p,$],(([t,e,n,o,s,i,r,a])=>({form:t,errors:e,touched:n,modified:o,isValid:s,isSubmitting:r,isValidating:i,isModified:a})))}};function Ue(t,e,n){const o=t.slice();return o[33]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function Xe(t,e,n){const o=t.slice();return o[0]=e[n],o[36]=e,o[37]=n,o}function We(t){let e,n,o,s=t[7].text+"",i=t[2]?": "+t[2]:"";return{c(){e=y("p"),n=x(s),o=x(i),I(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){g(t,e,s),$(e,n),$(e,o)},p(t,e){4&e[0]&&i!==(i=t[2]?": "+t[2]:"")&&q(o,i)},d(t){t&&v(e)}}}function He(t){let e;return{c(){e=y("p"),e.textContent=`${t[8].text}`,I(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}function Ze(t){let e,n,o;function s(e){t[18](e,t[0])}let i={options:t[0]};return void 0!==t[4][t[0].name]&&(i.value=t[4][t[0].name]),e=new Fe({props:i}),F.push((()=>st(e,"value",s))),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(o,s){t=o;const i={};!n&&80&s[0]&&(n=!0,i.value=t[4][t[0].name],Y((()=>n=!1))),e.$set(i)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Ge(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=Ze(Xe(t,o,e));const i=t=>tt(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=k()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);g(t,e,o),n=!0},p(t,n){if(80&n[0]){let r;for(o=t[14],r=0;r<o.length;r+=1){const i=Xe(t,o,r);s[r]?(s[r].p(i,n),Q(s[r],1)):(s[r]=Ze(i),s[r].c(),Q(s[r],1),s[r].m(e.parentNode,e))}for(G(),r=o.length;r<s.length;r+=1)i(r);K()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Q(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)tt(s[t]);n=!1},d(t){b(s,t),t&&v(e)}}}function Ke(t){let e,n;return e=new xt({props:{title:t[13],show:t[33],$$slots:{default:[Ge]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};16&n[0]|128&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Qe(t){let e,n,s,i=t[9].value+"",r=t[9].icon&&function(t){let e,n;return{c(){e=y("m-icon"),T(e,"class","mar-r-md"),T(e,"name",n=t[9].icon)},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=y("button"),r&&r.c(),n=w(),s=x(i),I(e,"ord","primary"),I(e,"class","full-width"),I(e,"type","submit")},m(t,o){g(t,e,o),r&&r.m(e,null),$(e,n),$(e,s)},p(t,e){t[9].icon&&r.p(t,e)},d(t){t&&v(e),r&&r.d()}}}function tn(t){let e,n,s,i,r,a,c,l,u,d,p,f;document.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=y("h2"),e.textContent=`${t[13].text}`},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&We(t),x=t[3]&&t[8].text&&He(t),k=t[6],T=[];for(let e=0;e<k.length;e+=1)T[e]=Ke(Ue(t,k,e));const j=t=>tt(T[t],1,1,(()=>{T[t]=null}));let q=t[9]&&Qe(t);return{c(){n=w(),m&&m.c(),s=w(),h&&h.c(),i=w(),x&&x.c(),r=w(),a=y("p"),a.textContent=`${t[10].text}`,c=w(),l=y("form");for(let t=0;t<T.length;t+=1)T[t].c();u=w(),q&&q.c(),I(a,"id","er-invalid"),I(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),l.noValidate=!0},m(e,o){g(e,n,o),m&&m.m(e,o),g(e,s,o),h&&h.m(e,o),g(e,i,o),x&&x.m(e,o),g(e,r,o),g(e,a,o),g(e,c,o),g(e,l,o);for(let t=0;t<T.length;t+=1)T[t].m(l,null);$(l,u),q&&q.m(l,null),d=!0,p||(f=S(l,"submit",E(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(document.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?h?h.p(t,n):(h=We(t),h.c(),h.m(i.parentNode,i)):h&&(h.d(1),h=null),t[3]&&t[8].text?x?x.p(t,n):(x=He(t),x.c(),x.m(r.parentNode,r)):x&&(x.d(1),x=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=Ue(t,k,e);T[e]?(T[e].p(o,n),Q(T[e],1)):(T[e]=Ke(o),T[e].c(),Q(T[e],1),T[e].m(l,u))}for(G(),e=k.length;e<T.length;e+=1)j(e);K()}t[9]&&q.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(T[t]);d=!0}},o(t){T=T.filter(Boolean);for(let t=0;t<T.length;t+=1)tt(T[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(i),x&&x.d(t),t&&v(r),t&&v(a),t&&v(c),t&&v(l),b(T,t),q&&q.d(),p=!1,f()}}}function en(t,n,o){let s,i,{options:r={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:$=[]}=r;a=a||{};const g={};let v=!1,b="",y=!1;const x=u.reduce(((t,e)=>t.concat(e.fields)),[]),w=(t,n)=>{let o={};for(const t in I)(Bt(a[t])||Ft(n[t])&&I[t]!==n[t])&&(o[t]=n[t]);if(((t={})=>!Object.keys(t).length)(o))return!1;const{_id:s,id:i}=n;return e.post("/api/"+t,{...o,_id:s,id:i}).then((t=>t.data))},k=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+i[e]),"?"))(o)))),S=()=>{const t=x.find((t=>!Le(t.name)));return!t||(((t="",e=0,n=document.getElementById(t))=>{n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e))})("er-invalid",3e3),Oe(t.name),!1)},E={},I={};x.map((({name:t,type:e,value:n})=>{const s=Ae(e);let i=Pt(s,g[t],a[t],n);switch(e){case"date":i=i.substr(0,10);case"masked":i=i.toString()}o(17,E[t]=i,E),I[t]=i}));const{form:T,handleSubmit:j,handleReset:q}=Je({initialValues:E,onSubmit:async t=>{if(!p)return;if(!S())return;const{path:e,func:n}=p,s=(t=>x.reduce(((e,n)=>(e[n.name]=t[n.name],e)),{}))(t);let i={};e&&!(i=await w(e,s))||n&&!(i=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(n,s,i))||((t,e)=>{const{action:n,url:s,query:i,reset:r}=t,{status:a=!0,data:c,message:l={}}=e;a?(o(3,y=!0),setTimeout((()=>{o(3,y=!1),k(n,c,s,i)}),m.text?1e3:10)):(r&&q(),o(1,v=!0),o(2,b=l.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,i)}});return d(t,T,(t=>o(4,i=t))),t.$$set=t=>{"options"in t&&o(0,r=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=E.Title||l.text||c)},[r,v,b,y,i,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},T,j,l,x,a,c,E,function(e,n){t.$$.not_equal(i[n.name],e)&&(i[n.name]=e,T.set(i))}]}const{document:nn}=ot;function on(t,e,n){const o=t.slice();return o[32]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function sn(t,e,n){const o=t.slice();return o[0]=e[n],o[35]=e,o[36]=n,o}function rn(t){let e,n,o,s=t[7].text+"",i=t[2]?": "+t[2]:"";return{c(){e=y("p"),n=x(s),o=x(i),I(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){g(t,e,s),$(e,n),$(e,o)},p(t,e){4&e[0]&&i!==(i=t[2]?": "+t[2]:"")&&q(o,i)},d(t){t&&v(e)}}}function an(t){let e;return{c(){e=y("p"),e.textContent=`${t[8].text}`,I(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}function cn(t){let e,n,o,s;function i(e){t[18](e,t[0])}let r={options:t[0]};return void 0!==t[4][t[0].name]&&(r.value=t[4][t[0].name]),e=new Fe({props:r}),F.push((()=>st(e,"value",i))),{c(){it(e.$$.fragment),o=w()},m(t,n){rt(e,t,n),g(t,o,n),s=!0},p(o,s){t=o;const i={};!n&&80&s[0]&&(n=!0,i.value=t[4][t[0].name],Y((()=>n=!1))),e.$set(i)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){at(e,t),t&&v(o)}}}function ln(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=cn(sn(t,o,e));const i=t=>tt(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=k()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);g(t,e,o),n=!0},p(t,n){if(80&n[0]){let r;for(o=t[14],r=0;r<o.length;r+=1){const i=sn(t,o,r);s[r]?(s[r].p(i,n),Q(s[r],1)):(s[r]=cn(i),s[r].c(),Q(s[r],1),s[r].m(e.parentNode,e))}for(G(),r=o.length;r<s.length;r+=1)i(r);K()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Q(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)tt(s[t]);n=!1},d(t){b(s,t),t&&v(e)}}}function un(t){let e,n;return e=new xt({props:{title:t[13],show:t[32],$$slots:{default:[ln]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};16&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function dn(t){let e,n,s,i=t[9].value+"",r=t[9].icon&&function(t){let e,n;return{c(){e=y("m-icon"),T(e,"class","mar-r-md"),T(e,"name",n=t[9].icon)},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=y("button"),r&&r.c(),n=w(),s=x(i),I(e,"ord","primary"),I(e,"class","full-width"),I(e,"type","submit")},m(t,o){g(t,e,o),r&&r.m(e,null),$(e,n),$(e,s)},p(t,e){t[9].icon&&r.p(t,e)},d(t){t&&v(e),r&&r.d()}}}function pn(t){let e,n,s,i,r,a,c,l,u,d,p,f;nn.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=y("h2"),e.textContent=`${t[13].text}`,I(e,"class","mt-6 text-center text-2xl leading-9 font-extrabold text-gray-900")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&rn(t),x=t[3]&&t[8].text&&an(t),k=t[6],T=[];for(let e=0;e<k.length;e+=1)T[e]=un(on(t,k,e));const j=t=>tt(T[t],1,1,(()=>{T[t]=null}));let q=t[9]&&dn(t);return{c(){n=w(),m&&m.c(),s=w(),h&&h.c(),i=w(),x&&x.c(),r=w(),a=y("p"),a.textContent=`${t[10].text}`,c=w(),l=y("form");for(let t=0;t<T.length;t+=1)T[t].c();u=w(),q&&q.c(),I(a,"id","er-invalid"),I(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),I(l,"class","mt-4"),l.noValidate=!0,I(l,"enctype","multipart/form-data")},m(e,o){g(e,n,o),m&&m.m(e,o),g(e,s,o),h&&h.m(e,o),g(e,i,o),x&&x.m(e,o),g(e,r,o),g(e,a,o),g(e,c,o),g(e,l,o);for(let t=0;t<T.length;t+=1)T[t].m(l,null);$(l,u),q&&q.m(l,null),d=!0,p||(f=S(l,"submit",E(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(nn.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?h?h.p(t,n):(h=rn(t),h.c(),h.m(i.parentNode,i)):h&&(h.d(1),h=null),t[3]&&t[8].text?x?x.p(t,n):(x=an(t),x.c(),x.m(r.parentNode,r)):x&&(x.d(1),x=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=on(t,k,e);T[e]?(T[e].p(o,n),Q(T[e],1)):(T[e]=un(o),T[e].c(),Q(T[e],1),T[e].m(l,u))}for(G(),e=k.length;e<T.length;e+=1)j(e);K()}t[9]&&q.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(T[t]);d=!0}},o(t){T=T.filter(Boolean);for(let t=0;t<T.length;t+=1)tt(T[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(i),x&&x.d(t),t&&v(r),t&&v(a),t&&v(c),t&&v(l),b(T,t),q&&q.d(),p=!1,f()}}}function fn(t,n,o){let s,i,{options:r={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:$=[]}=r;a=a||{};const g={};let v=!1,b="",y=!1;const x=u.reduce(((t,e)=>t.concat(e.fields)),[]),w=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+i[e]),"?"))(o)))),k={},S={};x.map((({name:t,type:e,value:n})=>{const s=Ae(e);let i=Pt(s,g[t],a[t],n);o(17,k[t]=i,k),S[t]=i}));const{form:E,handleSubmit:I,handleReset:T}=Je({initialValues:k,onSubmit:async t=>{if(!p)return;const{path:n,func:s}=p,i=(()=>{const t=new FormData,e=document.querySelector("#plugin").files;for(let n=0;n<e.length;n++)t.append(`upload_${n}`,e[n]);return t})();let r={};n&&!(r=await((t,n)=>e.post("/api/"+t,n,{headers:{"Content-Type":"multipart/form-data"}}).then((t=>t.data)))(n,i))||s&&!(r=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(s,i,r))||((t,e)=>{const{action:n,url:s,query:i,reset:r}=t,{status:a=!0,data:c,message:l={}}=e;a?(o(3,y=!0),setTimeout((()=>{o(3,y=!1),w(n,c,s,i)}),m.text?1e3:10)):(r&&T(),o(1,v=!0),o(2,b=l.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,r)}});return d(t,E,(t=>o(4,i=t))),t.$$set=t=>{"options"in t&&o(0,r=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=k.Title||l.text||c)},[r,v,b,y,i,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},E,I,l,x,a,c,k,function(e,n){t.$$.not_equal(i[n.name],e)&&(i[n.name]=e,E.set(i))}]}function mn(t){let e,n,o,s;const i=t[3].default,r=p(i,t,t[2],null);return{c(){e=y("button"),r&&r.c(),I(e,"class","link-button txt-sm mar-r-sm"),e.disabled=t[1]},m(i,a){g(i,e,a),r&&r.m(e,null),n=!0,o||(s=S(e,"click",t[4]),o=!0)},p(t,[o]){r&&r.p&&(!n||4&o)&&m(r,i,t,t[2],o,null,null),(!n||2&o)&&(e.disabled=t[1])},i(t){n||(Q(r,t),n=!0)},o(t){tt(r,t),n=!1},d(t){t&&v(e),r&&r.d(t),o=!1,s()}}}function hn(t,e,n){let{$$slots:o={},$$scope:s}=e,{path:i}=e,{disabled:r}=e;return t.$$set=t=>{"path"in t&&n(0,i=t.path),"disabled"in t&&n(1,r=t.disabled),"$$scope"in t&&n(2,s=t.$$scope)},[i,r,s,o,()=>window.singleSpaNavigate(i)]}function $n(t){let e,n,o,s,i;const r=t[5].default,a=p(r,t,t[4],null);return{c(){e=y("span"),a&&a.c(),I(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),I(e,"title",t[0])},m(n,r){g(n,e,r),a&&a.m(e,null),o=!0,s||(i=S(e,"click",t[2]),s=!0)},p(t,[s]){a&&a.p&&(!o||16&s)&&m(a,r,t,t[4],s,null,null),(!o||2&s&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&I(e,"class",n),(!o||1&s)&&I(e,"title",t[0])},i(t){o||(Q(a,t),o=!0)},o(t){tt(a,t),o=!1},d(t){t&&v(e),a&&a.d(t),s=!1,i()}}}function gn(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:i}=e,{link:r="/"}=e,{color:a}=e;return t.$$set=t=>{"title"in t&&n(0,i=t.title),"link"in t&&n(3,r=t.link),"color"in t&&n(1,a=t.color),"$$scope"in t&&n(4,s=t.$$scope)},[i,a,()=>window.singleSpaNavigate(r),r,s,o]}function vn(t){let e,n,o=t[0](),s=o&&function(t){let e;const n=t[2].default,o=p(n,t,t[1],null);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||2&s)&&m(o,n,t,t[1],s,null,null)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}(t);return{c(){s&&s.c(),e=k()},m(t,o){s&&s.m(t,o),g(t,e,o),n=!0},p(t,[e]){o&&s.p(t,e)},i(t){n||(Q(s),n=!0)},o(t){tt(s),n=!1},d(t){s&&s.d(t),t&&v(e)}}}function bn(t,e,n){let{$$slots:o={},$$scope:s}=e;const i=window.location.pathname;return t.$$set=t=>{"$$scope"in t&&n(1,s=t.$$scope)},[()=>!!u($t)||window.singleSpaNavigate(`/?p=${i}`),s,o]}function yn(t,e,n){let o;d(t,gt,(t=>n(1,o=t)));let{description:s}=e;return t.$$set=t=>{"description"in t&&n(0,s=t.description)},t.$$.update=()=>{if(3&t.$$.dirty&&s){const t=s;s.length>30&&n(0,s=s.substring(0,30)+"...");const e=window.location.pathname,i=o;i.find((t=>t.href===e))||gt.set(i.slice(Math.max(i.length-6+1,0)).concat({href:e,text:s,desc:t}))}},[s,o]}const xn={event:"single-spa:routing-event",listen:function(t,e){window[`${t}EventListener`](this.event,e)},start:function(t){this.listen("add",t)},stop:function(t){this.listen("remove",t)}};function wn(t,{modulePath:e,update:n}){if(!e)return console.error("modulePath missing in dataListener");if("function"!=typeof n)return console.error("update function missing in dataListener");const o=({currentTarget:o})=>{const[,s,...i]=o.location.pathname.split("/");e===s&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return xn.start(o),{destroy:()=>xn.stop(o)}}const kn=t=>({prop:2&t}),Sn=t=>({prop:t[5]});function En(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!1,pending:jn,then:Tn,catch:In,value:5,blocks:[,,,]};return et(n=t[1],s),{c(){e=k(),s.block.c()},m(t,n){g(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,2&o&&n!==(n=t[1])&&et(n,s)||nt(s,t,o)},i(t){o||(Q(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){tt(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function In(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function Tn(t){let e;const n=t[3].default,o=p(n,t,t[2],Sn);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||6&s)&&m(o,n,t,t[2],s,kn,Sn)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function jn(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function qn(t){let e,n,o,s,i,c=t[1]&&En(t);return{c(){e=y("div"),c&&c.c(),I(e,"class","data")},m(r,a){g(r,e,a),c&&c.m(e,null),o=!0,s||(i=[h(n=wn.call(null,e,t[0])),S(e,"data",t[4])],s=!0)},p(t,[o]){t[1]?c?(c.p(t,o),2&o&&Q(c,1)):(c=En(t),c.c(),Q(c,1),c.m(e,null)):c&&(G(),tt(c,1,1,(()=>{c=null})),K()),n&&a(n.update)&&1&o&&n.update.call(null,t[0])},i(t){o||(Q(c),o=!0)},o(t){tt(c),o=!1},d(t){t&&v(e),c&&c.d(),s=!1,r(i)}}}function Cn(t,e,n){let o,{$$slots:s={},$$scope:i}=e,{options:r}=e;return t.$$set=t=>{"options"in t&&n(0,r=t.options),"$$scope"in t&&n(2,i=t.$$scope)},[r,o,i,s,({detail:t})=>n(1,o=t.data)]}const Nn={event:"single-spa:routing-event",listen:function(t,e){window[`${t}EventListener`](this.event,e)},start:function(t){this.listen("add",t)},stop:function(t){this.listen("remove",t)}};function _n(t,{modulePath:e,update:n}){if(!e)return console.error("modulePath missing in dataListener");if("function"!=typeof n)return console.error("update function missing in dataListener");const o=({currentTarget:o})=>{const[,s,...i]=o.location.pathname.split("/");e===s&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Nn.start(o),{destroy:()=>Nn.stop(o)}}const On=t=>({prop:2&t}),Ln=t=>({prop:t[7]});function An(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[Fn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Dn(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!0,pending:Yn,then:zn,catch:Pn,value:7,error:8,blocks:[,,,]};return et(n=t[1],s),{c(){e=k(),s.block.c()},m(t,n){g(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,2&o&&n!==(n=t[1])&&et(n,s)||nt(s,t,o)},i(t){o||(Q(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){tt(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function Bn(t){let e;return{c(){e=x("... Initializing ...")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function Fn(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Bn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Pn(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Oops!",$$slots:{default:[Mn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Vn(t){let e,n,o,s=t[8]+"";return{c(){e=x("... "),n=x(s),o=x(" ...")},m(t,s){g(t,e,s),g(t,n,s),g(t,o,s)},p(t,e){2&e&&s!==(s=t[8]+"")&&q(n,s)},d(t){t&&v(e),t&&v(n),t&&v(o)}}}function Mn(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Vn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function zn(t){let e,n;return e=new t[2]({props:{class:"form",title:t[7].title,$$slots:{default:[Rn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.title=t[7].title),66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Rn(t){let e;const n=t[4].default,o=p(n,t,t[6],Ln);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||66&s)&&m(o,n,t,t[6],s,On,Ln)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function Yn(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[Un]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Jn(t){let e;return{c(){e=x("... Loading...")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function Un(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Jn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Xn(t){let e,n,o,s,i,c,l;const u=[Dn,An],d=[];function p(t,e){return t[1]?0:1}return n=p(t),o=d[n]=u[n](t),{c(){e=y("section"),o.c()},m(o,r){g(o,e,r),d[n].m(e,null),i=!0,c||(l=[h(s=_n.call(null,e,t[0])),S(e,"data",t[5])],c=!0)},p(t,[i]){let r=n;n=p(t),n===r?d[n].p(t,i):(G(),tt(d[r],1,1,(()=>{d[r]=null})),K(),o=d[n],o?o.p(t,i):(o=d[n]=u[n](t),o.c()),Q(o,1),o.m(e,null)),s&&a(s.update)&&1&i&&s.update.call(null,t[0])},i(t){i||(Q(o),i=!0)},o(t){tt(o),i=!1},d(t){t&&v(e),d[n].d(),c=!1,r(l)}}}function Wn(t,e,o){let{$$slots:s={},$$scope:i}=e;const{Dialog:r,Chip:a}=n;let c,{options:l}=e;return t.$$set=t=>{"options"in t&&o(0,l=t.options),"$$scope"in t&&o(6,i=t.$$scope)},[l,c,r,a,s,({detail:t})=>o(1,c=t.data),i]}let Hn=new Map;const Zn=t=>(...e)=>{const n=u(vt),o=n.tenant;"invalid"===n.status&&(Hn=new Map,vt.set({tenant:o,status:""}));const s=[].concat(t.name,e).join("-");let i=Hn.get(s);if(!i)try{i=t(...e),Hn.set(s,i)}catch(t){throw t}return i};var Gn={getSchema:Zn((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`})))),getSchemas:Zn((async()=>(await axios.get("/api/schema")).data)),getSchemaByClass:Zn((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data)),getEvents:Zn((async()=>(await axios.get("/api/read/_event")).data)),getTask:async(t,e)=>(await axios.get(`/api/task/${t}:${e}?display=form`)).data,getTaskList:async(t,e)=>(await axios.get(`/api/task/${t}:${e}?display=list`)).data,getTasksList:t=>axios.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:async t=>(await axios.post("/api/read/_task",{_id:t})).data[0],getTaskqueue:async t=>(await axios.post("/api/taskqueue",{id:t})).data,saveData:async(t,e)=>(await axios.post(`/api/${t}`,e)).data.id,deleteTask:async t=>(await axios.delete(`/api/_task/${t}`)).data,savePlugins:async(t,e)=>(await axios.post("/api/plugin",t,e)).data,savePlugin:async(t,e)=>(await axios.post(`/api/plugin/${t}`,e)).data,deletePlugin:async t=>(await axios.delete(`/api/plugin/${t}`)).data,getAuthStatus:async t=>(await axios.post("/api/auth/status",{email:t})).data,authEnroll:async t=>(await axios.post("/api/auth/enroll",t)).data,authLogin:async(t,e)=>(await axios.post("/api/auth/login",{username:t,passcode:e})).data,authLogout:async()=>await axios.post("/api/auth/logout")};const Kn=window.location.pathname;t("default",{version:"0.2.9",Storage:pt,getLoggedIn:()=>$t,getBreadcrumbs:()=>gt,getCacheValidator:()=>vt,Listener:class extends ut{constructor(t){super(),lt(this,t,Cn,qn,c,{options:0})}},Request:Gn,FormDialog:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-1ifpj2m-style")||((e=y("style")).id="svelte-1ifpj2m-style",e.textContent="section.data{position:relative;width:100%}.dialog.form{width:fit-content !important;min-width:32em !important;min-height:10em !important}@media screen and (max-width: 600px){.dialog.form{min-width:25em !important}}",$(document.head,e)),lt(this,t,Wn,Xn,c,{options:0})}},Form:class extends ut{constructor(t){super(),lt(this,t,en,tn,c,{options:0,input:15,head:16},[-1,-1])}},FormUpload:class extends ut{constructor(t){super(),lt(this,t,fn,pn,c,{options:0,input:15,head:16},[-1,-1])}},LinkButton:class extends ut{constructor(t){super(),lt(this,t,hn,mn,c,{path:0,disabled:1})}},LinkIcon:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-1jng2dw-style")||((e=y("style")).id="svelte-1jng2dw-style",e.textContent=".red.svelte-1jng2dw{background-color:var(--m-color-red-light)}.blue.svelte-1jng2dw{background-color:var(--m-color-blue-light)}.green.svelte-1jng2dw{background-color:var(--m-color-green-light)}.icon.svelte-1jng2dw{max-height:1.2em}",$(document.head,e)),lt(this,t,gn,$n,c,{title:0,link:3,color:1})}},Breadcrumb:class extends ut{constructor(t){super(),lt(this,t,yn,null,c,{description:0})}},CheckLogin:class extends ut{constructor(t){super(),lt(this,t,bn,vn,c,{})}},checkLogin:()=>{u($t)||window.singleSpaNavigate(`/?p=${Kn}`)}})}}}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/form",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.5",
4
+ "version": "0.2.9",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"
@@ -27,8 +27,5 @@
27
27
  "form"
28
28
  ],
29
29
  "author": "pier4all-jcs",
30
- "license": "ISC",
31
- "dependencies": {
32
- "svelte": "3.38.2"
33
- }
30
+ "license": "ISC"
34
31
  }