@enablerr-ui/form 0.2.19 → 0.2.22
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 +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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 r(){return Object.create(null)}function i(t){t.forEach(s)}function a(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 o;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function u(t){let e;return c(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(c(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,r,i){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,r);if(a){const s=f(e,n,o,i);t.p(s,a)}}function h(t){return t&&a(t.destroy)?t.destroy:o}function g(t,e){t.appendChild(e)}function $(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 w(t){return document.createElement(t)}function x(t){return document.createTextNode(t)}function y(){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 C(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:C(t,e,n)}function N(t){return""===t?null:+t}function T(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function j(t,e){t.value=null==e?"":e}function q(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 M=[],B=[],F=[],P=[],V=Promise.resolve();let z=!1;function Y(t){F.push(t)}function R(t){P.push(t)}let J=!1;const U=new Set;function X(){if(!J){J=!0;do{for(let t=0;t<M.length;t+=1){const e=M[t];O(e),W(e.$$)}for(O(null),M.length=0;B.length;)B.pop()();for(let t=0;t<F.length;t+=1){const e=F[t];U.has(e)||(U.add(e),e())}F.length=0}while(M.length);for(;P.length;)P.pop()();z=!1,J=!1,U.clear()}}function W(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Y)}}const H=new Set;let Z;function G(){Z={r:0,c:[],p:Z}}function K(){Z.r||i(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,r){if(e.token!==n)return;e.resolved=r;let i=e.ctx;void 0!==s&&(i=i.slice(),i[s]=r);const a=t&&(e.current=t)(i);let l=!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),l=!0),e.block=a,e.blocks&&(e.blocks[o]=a),l&&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 rt(t){t&&t.c()}function it(t,e,n,o){const{fragment:r,on_mount:l,on_destroy:c,after_update:u}=t.$$;r&&r.m(e,n),o||Y((()=>{const e=l.map(s).filter(a);c?c.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(Y)}function at(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function lt(t,e){-1===t.$$.dirty[0]&&(M.push(t),z||(z=!0,V.then(X)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ct(t,e,n,s,a,l,c=[-1]){const u=_;O(t);const d=t.$$={fragment:null,ctx:null,props:l,update:o,not_equal:a,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:r(),dirty:c,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&<(t,e)),n})):[],d.update(),p=!0,i(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),it(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 r(e){if(l(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:r,update:function(e){r(e(t))},subscribe:function(i,a=o){const l=[i,a];return s.push(l),1===s.length&&(n=e(r)||o),i(t),()=>{const t=s.indexOf(l);-1!==t&&s.splice(t,1),0===s.length&&(n(),n=null)}}}}function ht(t,e,n){const s=!Array.isArray(t),r=s?[t]:t,l=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);l?t(n):p=a(n)?n:o},m=r.map(((t,e)=>c(t,(t=>{u[e]=t,d&=~(1<<e),n&&f()}),(()=>{d|=1<<e}))));return n=!0,f(),function(){i(m),p()}},{subscribe:mt(n,u).subscribe};var u}const gt=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"))}:""),$t=mt([]),vt=mt({tenant:"",status:""}),bt=()=>{gt.set(""),window.localStorage.setItem("lh-enablerr-user",""),window.localStorage.setItem("lh-enablerr-gravatar",""),window.localStorage.setItem("lh-enablerr-tenant",""),window.localStorage.setItem("lh-enablerr-tenants",""),window.location.href="/"};function wt(t){let e,n,o,s,r;const i=t[3].default,a=p(i,t,t[2],null);return{c(){e=w("fieldset"),n=w("legend"),o=x(t[0]),s=y(),a&&a.c(),q(n,"sr-only",!t[1])},m(t,i){$(t,e,i),g(e,n),g(n,o),g(e,s),a&&a.m(e,null),r=!0},p(t,[e]){(!r||1&e)&&T(o,t[0]),2&e&&q(n,"sr-only",!t[1]),a&&a.p&&(!r||4&e)&&m(a,i,t,t[2],e,null,null)},i(t){r||(Q(a,t),r=!0)},o(t){tt(a,t),r=!1},d(t){t&&v(e),a&&a.d(t)}}}function xt(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 yt extends ut{constructor(t){super(),ct(this,t,xt,wt,l,{title:0,show:1})}}const kt=t=>({}),St=t=>({}),Et=t=>({}),Ct=t=>({});function It(t){let e,n,o,s,r,a,l,c,u,d;const f=t[16].head,h=p(f,t,t[15],Ct),g=t[16].tail,b=p(g,t,t[15],St);return{c(){h&&h.c(),e=y(),n=w("input"),s=y(),r=w("input"),l=y(),b&&b.c(),C(n,"type","number"),C(n,"class",o=t[1]+" form-input form-number hidden"),C(n,"id",t[5]),C(n,"name",t[5]),C(n,"placeholder",t[8]),C(n,"aria-label",t[7]),C(n,"title",t[7]),n.required=t[9],n.disabled=t[10],C(n,"pattern",t[11]),C(n,"min",t[2]),C(n,"max",t[12]),C(n,"step",t[3]),C(r,"type","text"),C(r,"id",t[6]),C(r,"name",t[6]),C(r,"class",a=t[1]+" form-input form-number form-shadow"),r.disabled=t[10],C(r,"aria-label",t[7]),C(r,"title",t[7])},m(o,i){h&&h.m(o,i),$(o,e,i),$(o,n,i),j(n,t[0]),$(o,s,i),$(o,r,i),j(r,t[4]),$(o,l,i),b&&b.m(o,i),c=!0,u||(d=[S(n,"input",t[18]),S(n,"blur",t[13]),S(r,"input",t[19]),S(r,"focus",t[17])],u=!0)},p(t,[e]){h&&h.p&&(!c||32768&e)&&m(h,f,t,t[15],e,Et,Ct),(!c||2&e&&o!==(o=t[1]+" form-input form-number hidden"))&&C(n,"class",o),(!c||4&e)&&C(n,"min",t[2]),(!c||8&e)&&C(n,"step",t[3]),1&e&&N(n.value)!==t[0]&&j(n,t[0]),(!c||2&e&&a!==(a=t[1]+" form-input form-number form-shadow"))&&C(r,"class",a),16&e&&r.value!==t[4]&&j(r,t[4]),b&&b.p&&(!c||32768&e)&&m(b,g,t,t[15],e,kt,St)},i(t){c||(Q(h,t),Q(b,t),c=!0)},o(t){tt(h,t),tt(b,t),c=!1},d(t){h&&h.d(t),t&&v(e),t&&v(n),t&&v(s),t&&v(r),t&&v(l),b&&b.d(t),u=!1,i(d)}}}function Nt(t,e,n){let{$$slots:o={},$$scope:s}=e,{options:r}=e,{css:i}=e,{value:a}=e;const l=JSON.parse(window.sessionStorage.getItem("Locale")),{name:c,nameShadow:u,title:d,placeholder:p,required:f,disabled:m,pattern:h}=r;let{positive:g,min:$,max:v,decimal:b=0,step:w=1}=r;const x=A();let y;b>0&&(w="any"),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}}})(l.id,b),S=()=>{n(4,y=k.format(a))};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,a=t.value),"$$scope"in t&&n(15,s=t.$$scope)},[a,i,$,w,y,c,u,d,p,f,m,h,v,()=>{S(),x("blur")},r,s,o,function(e){D(t,e)},function(){a=N(this.value),n(0,a)},function(){y=this.value,n(4,y)}]}class Tt extends ut{constructor(t){super(),ct(this,t,Nt,It,l,{options:14,css:1,value:0})}}function jt(t){let e;return{c(){e=w("span"),e.textContent="%",C(e,"slot","head"),C(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,n){$(t,e,n)},d(t){t&&v(e)}}}function qt(t){let e,n,o;function s(e){t[3](e)}let r={options:t[0],css:t[2],$$slots:{head:[jt]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.value=t[1]),e=new Tt({props:r}),B.push((()=>st(e,"value",s))),e.$on("focus",t[4]),e.$on("blur",t[5]),{c(){rt(e.$$.fragment)},m(t,n){it(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],R((()=>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 _t(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){D(t,e)},function(e){D(t,e)}]}function Ot(t){let e,n;return{c(){e=w("span"),n=x(t[3]),C(e,"slot","head"),C(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,o){$(t,e,o),g(e,n)},p(t,e){8&e&&T(n,t[3])},d(t){t&&v(e)}}}function Lt(t){let e,n,o;function s(e){t[4](e)}let r={options:t[1],css:t[2],$$slots:{head:[Ot]},$$scope:{ctx:t}};return void 0!==t[0]&&(r.value=t[0]),e=new Tt({props:r}),B.push((()=>st(e,"value",s))),e.$on("focus",t[5]),e.$on("blur",t[6]),{c(){rt(e.$$.fragment)},m(t,n){it(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],R((()=>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 At(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){D(t,e)},function(e){D(t,e)}]}function Dt(t){let e,n,s,r;return{c(){e=w("input"),C(e,"type","password"),C(e,"class",n=t[1]+" form-input"),C(e,"id",t[2]),C(e,"name",t[2]),C(e,"placeholder",t[4]),C(e,"aria-label",t[3]),C(e,"title",t[3]),e.required=t[5],e.disabled=t[6],C(e,"pattern",t[7]),C(e,"autocomplete","off")},m(n,o){$(n,e,o),j(e,t[0]),s||(r=S(e,"input",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&C(e,"class",n),1&o&&e.value!==t[0]&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Mt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:l,required:c,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,a,l,c,u,d,o,function(){r=this.value,n(0,r)}]}const Bt=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",Ft=t=>"function"==typeof t,Pt=t=>t&&t.toString,Vt=(t={})=>!Object.keys(t).length,zt=(t,...e)=>e.includes(t),Yt=t=>zt(t,void 0,null),Rt=t=>!Yt(t),Jt=(t,...e)=>e.concat(t).find(Rt),Ut=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Xt=t=>(e,...n)=>Ut(Ut("",t.toString),e,...n),Wt=(t,e=2,n=0,o=t.toString(),s=n.toString())=>s.repeat(e-o.length)+o,Ht=(...t)=>Xt(t[0])(Wt,...t),Zt=(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),Gt=(t,e=window)=>({listen(n,o){e[`${n}EventListener`](t,o)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),Kt=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||ee(console.error,n))).every(Boolean),Qt=t=>(e,n)=>(Promise.resolve(n).then(e),t),te=Qt(!0),ee=Qt(!1);var ne=Object.freeze({__proto__:null,decimalSeparator:Bt,isFunction:Ft,isStringable:Pt,isObjEmpty:Vt,hasValue:zt,isNullish:Yt,isNotNullish:Rt,bestValue:Jt,tryCatch:Ut,ensureStrValue:Xt,padLeft:Ht,showupElement:Zt,getListener:Gt,isMissing:Kt,go:te,stop:ee});function oe(t){let e,n,s,r;return{c(){e=w("input"),C(e,"type","date"),C(e,"class",n=t[1]+" form-input form-date"),C(e,"id",t[2]),C(e,"name",t[2]),C(e,"aria-label",t[3]),C(e,"title",t[3]),C(e,"pattern",ae),C(e,"min",t[6]),C(e,"max",t[7]),e.required=t[4],e.disabled=t[5]},m(n,o){$(n,e,o),j(e,t[0]),s||(r=[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")&&C(e,"class",n),1&o&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i(r)}}}const se={timeZone:"UTC",year:"numeric",month:"long",day:"numeric",weekday:"short"},re={year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",timeZoneName:"short"},ie=(t,e=!1)=>{const n=e?re:se,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}}},ae="\\d{4}(-|/)\\d{2}(-|/)\\d{2}";function le(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,required:l,disabled:c,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,a,l,c,u,d,o,function(e){D(t,e)},function(){r=this.value,n(0,r)}]}class ce extends ut{constructor(t){super(),ct(this,t,le,oe,l,{options:8,css:1,value:0})}}const{document:ue}=ot;function de(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 pe(t){let e,n,o;function s(){t[12].call(e,t[19])}return{c(){e=w("input"),C(e,"class","iw-m iw-n"+t[17].count+" svelte-u6cc6e"),C(e,"id",t[2]+"-"+t[19]),C(e,"type","text"),C(e,"data-step",t[19]),C(e,"size",t[17].count),C(e,"minlength",t[17].count),C(e,"maxlength",t[17].count),C(e,"pattern",t[5][t[19]]||t[17].pattern),e.required=t[3],e.disabled=t[4]},m(r,i){$(r,e,i),j(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]]&&j(e,t[1][t[19]])},d(t){t&&v(e),n=!1,i(o)}}}function fe(t){let e,n,s=t[16]+"";return{c(){e=w("span"),n=x(s),C(e,"class","iw-m svelte-u6cc6e")},m(t,o){$(t,e,o),g(e,n)},p:o,d(t){t&&v(e)}}}function me(t){let e;let n=function(t,e){return t[16]?fe:pe}(t),o=n(t);return{c(){o.c(),e=k()},m(t,n){o.m(t,n),$(t,e,n)},p(t,e){o.p(t,e)},d(t){o.d(t),t&&v(e)}}}function he(t){let e,n,s,r,i=t[6].obj,a=[];for(let e=0;e<i.length;e+=1)a[e]=me(de(t,i,e));return{c(){e=w("div");for(let t=0;t<a.length;t+=1)a[t].c();C(e,"class",n=t[0]+" form-input svelte-u6cc6e"),C(e,"id",t[2]),C(e,"name",t[2]),C(e,"tabindex","0")},m(n,o){$(n,e,o);for(let t=0;t<a.length;t+=1)a[t].m(e,null);s||(r=S(e,"focus",t[7]),s=!0)},p(t,[o]){if(382&o){let n;for(i=t[6].obj,n=0;n<i.length;n+=1){const s=de(t,i,n);a[n]?a[n].p(s,o):(a[n]=me(s),a[n].c(),a[n].m(e,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=i.length}1&o&&n!==(n=t[0]+" form-input svelte-u6cc6e")&&C(e,"class",n)},i:o,o:o,d(t){t&&v(e),b(a,t),s=!1,r()}}}function ge(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;r=r.toString();const{name:i,title:a,required:l,disabled:c,mask:u,pattern:d=[]}=o,p=(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},a=t=>(e.push({lit:t}),void i(!1));for(const l of t)o?a(l):"\\"===l?i():"{"===l?s():"}"===l?e.push({ref:{count:parseInt(n),pattern:`\\d{${n}}`}}):" "===l?a(l):l>=0?r(l):a(l);const l=(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=>l(t,[],!1),format:t=>l(t)}})(u),f=p.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,f,i,l,c,d,p,({relatedTarget:t})=>{if(!t||"INPUT"===t.tagName)return!0;const e=`#${i} > input`;return document.querySelectorAll(e)[0].focus()},({target:t})=>{n(9,r=f.reduce(((t,e)=>t.concat(e))));const e=t.dataset.step;if(f[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){D(t,e)},function(t){f[t]=this.value,n(1,f)}]}class $e extends ut{constructor(t){var e;super(),ue.getElementById("svelte-u6cc6e-style")||((e=w("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}",g(ue.head,e)),ct(this,t,ge,he,l,{options:10,css:0,value:9})}}function ve(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 $e({props:r}),B.push((()=>st(e,"value",s))),e.$on("blur",t[4]),{c(){rt(e.$$.fragment)},m(t,n){it(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],R((()=>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 be(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){D(t,e)}]}class we extends ut{constructor(t){super(),ct(this,t,be,ve,l,{options:0,css:1,value:2})}}function xe(t){let e,n,o,s,r,a,l,c,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 ce({props:h}),B.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]),r=new we({props:x}),B.push((()=>st(r,"value",b))),r.$on("blur",t[10]),{c(){e=w("div"),rt(n.$$.fragment),s=y(),rt(r.$$.fragment),l=y(),c=w("input"),C(e,"id",t[6]),C(e,"tabindex","90"),C(e,"class","hidden"),C(c,"type","text"),C(c,"class",u=t[0]+" form-input form-shadow"),C(c,"id",t[7]),C(c,"name",t[7]),c.disabled=t[9],C(c,"aria-label",t[8]),C(c,"title",t[8])},m(o,i){$(o,e,i),it(n,e,null),g(e,s),it(r,e,null),$(o,l,i),$(o,c,i),j(c,t[5]),d=!0,p||(f=[S(e,"blur",t[10]),S(e,"focus",t[11]),S(c,"input",t[17]),S(c,"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],R((()=>o=!1))),n.$set(s);const i={};8&e&&(i.options=t[3]),1&e&&(i.css=t[0]),!a&&4&e&&(a=!0,i.value=t[2],R((()=>a=!1))),r.$set(i),(!d||1&e&&u!==(u=t[0]+" form-input form-shadow"))&&C(c,"class",u),32&e&&c.value!==t[5]&&j(c,t[5])},i(t){d||(Q(n.$$.fragment,t),Q(r.$$.fragment,t),d=!0)},o(t){tt(n.$$.fragment,t),tt(r.$$.fragment,t),d=!1},d(t){t&&v(e),at(n),at(r),t&&v(l),t&&v(c),p=!1,i(f)}}}function ye(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale"));let{date:a,time:l}=(t=>{if(!t)return{date:"",time:""};const e=new Date(t),n=e.getFullYear().toString(),o=Ht(e.getMonth()+1),s=Ht(e.getDate()),r=Ht(e.getHours()),i=Ht(e.getMinutes());return{date:n.concat("-",o,"-",s),time:r.concat(i)}})(r);const{name:c,nameShadow:u,title:d,disabled:p}=o;let f,m=Object.assign({},o),h=Object.assign({},o);h.name=c+"-Date",m.name=c+"-Time";const g=ie(i.id,!0),$=()=>{try{n(12,(t=l,r=new Date(a.substring(0,10).concat("T",t.substr(0,2),":",t.substr(2))).toISOString()))}catch(t){n(12,r=a||l?"invalid":"")}var t;n(5,f=g.format(r))},v=t=>t.startsWith(h.name),b=A();return $(),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,a,l,m,h,f,c,u,d,p,({relatedTarget:t})=>{if(t){if(t.id.startsWith(m.name))return!0;if(v(t.id))return!0}$(),b("blur")},({relatedTarget:t})=>!t||(!!v(t.id)||void document.getElementById(h.name).focus()),r,o,function(e){D(t,e)},function(t){a=t,n(1,a)},function(t){l=t,n(2,l)},function(){f=this.value,n(5,f)}]}function ke(t){let e,n,o,s,r,a,l,c;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 ce({props:d}),B.push((()=>st(e,"value",u))),e.$on("blur",t[8]),{c(){rt(e.$$.fragment),o=y(),s=w("input"),C(s,"type","text"),C(s,"class",r=t[2]+" form-input form-shadow"),C(s,"id",t[4]),C(s,"name",t[4]),C(s,"placeholder",t[6]),s.disabled=t[7],C(s,"aria-label",t[5]),C(s,"title",t[5])},m(n,r){it(e,n,r),$(n,o,r),$(n,s,r),j(s,t[3]),a=!0,l||(c=[S(s,"input",t[11]),S(s,"focus",t[9])],l=!0)},p(t,[o]){const i={};2&o&&(i.options=t[1]),4&o&&(i.css=t[2]+" hidden"),!n&&1&o&&(n=!0,i.value=t[0],R((()=>n=!1))),e.$set(i),(!a||4&o&&r!==(r=t[2]+" form-input form-shadow"))&&C(s,"class",r),8&o&&s.value!==t[3]&&j(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),l=!1,i(c)}}}function Se(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale")),{nameShadow:a,title:l,placeholder:c,disabled:u}=o;let d;const p=ie(i.id),f=()=>{n(3,d=p.format(r))},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,r=t.value)},[r,o,s,d,a,l,c,u,()=>{f(),m("blur")},function(e){D(t,e)},function(t){r=t,n(0,r)},function(){d=this.value,n(3,d)}]}function Ee(t){let e,n,s,r;return{c(){e=w("input"),C(e,"type","email"),C(e,"class",n=t[1]+" form-input"),C(e,"id",t[2]),C(e,"name",t[2]),C(e,"placeholder",t[4]),C(e,"aria-label",t[3]),C(e,"title",t[3]),e.required=t[5],e.disabled=t[6]},m(n,o){$(n,e,o),j(e,t[0]),s||(r=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&C(e,"class",n),1&o&&e.value!==t[0]&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Ce(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:l,required:c,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,a,l,c,u,o,function(){r=this.value,n(0,r)}]}function Ie(t){let e,n,s,r;return{c(){e=w("textarea"),C(e,"rows",t[6]),C(e,"class",n=t[1]+" form-textarea block"),C(e,"id",t[2]),C(e,"name",t[2]),C(e,"aria-label",t[3]),C(e,"title",t[3]),e.required=t[4],e.disabled=t[5]},m(n,o){$(n,e,o),j(e,t[0]),s||(r=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-textarea block")&&C(e,"class",n),1&o&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Ne(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,required:l,disabled:c,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,a,l,c,u,o,function(){r=this.value,n(0,r)}]}function Te(t){let e,n,s,r,a,l,c,u;return{c(){e=w("div"),n=w("input"),s=y(),r=w("div"),a=y(),l=w("div"),C(n,"type","checkbox"),C(n,"id",t[1]),C(n,"name",t[1]),C(n,"aria-label",t[2]),C(n,"title",t[2]),n.disabled=t[3],C(n,"class","svelte-ke6ng1"),C(r,"class","track svelte-ke6ng1"),C(l,"class","thumb svelte-ke6ng1"),C(e,"class","switch svelte-ke6ng1")},m(o,i){$(o,e,i),g(e,n),n.checked=t[0],g(e,s),g(e,r),g(e,a),g(e,l),c||(u=[S(n,"change",t[7]),S(r,"click",t[4]),S(l,"click",t[4])],c=!0)},p(t,[e]){1&e&&(n.checked=t[0])},i:o,o:o,d(t){t&&v(e),c=!1,i(u)}}}function je(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;s="";const{name:i,title:a,disabled:l}=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,a,l,()=>n(0,r=l?r:!r),s,o,function(){r=this.checked,n(0,r)}]}function qe(t){let e,n,s,r;return{c(){e=w("input"),C(e,"type","file"),C(e,"class",n=t[1]+" form-input"),C(e,"id",t[2]),C(e,"name",t[2]),C(e,"pattern",t[7]),C(e,"placeholder",t[4]),C(e,"aria-label",t[3]),C(e,"title",t[3]),e.required=t[5],e.disabled=t[6],e.multiple=!0},m(n,o){$(n,e,o),s||(r=S(e,"change",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&C(e,"class",n)},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function _e(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:l,required:c,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,a,l,c,u,d,o,function(){r=this.value,n(0,r)}]}function Oe(t){let e,n,s,r;return{c(){e=w("input"),C(e,"type","text"),C(e,"class",n=t[1]+" form-input"),C(e,"id",t[2]),C(e,"name",t[2]),C(e,"placeholder",t[4]),C(e,"aria-label",t[3]),C(e,"title",t[3]),e.required=t[5],e.disabled=t[6],C(e,"pattern",t[7]),C(e,"autocomplete",t[8])},m(n,o){$(n,e,o),j(e,t[0]),s||(r=S(e,"input",t[10]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&C(e,"class",n),1&o&&e.value!==t[0]&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Le(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:l,required:c,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,r=t.value)},[r,s,i,a,l,c,u,d,p,o,function(){r=this.value,n(0,r)}]}function Ae(t){let e,n,s;return{c(){e=w("input"),C(e,"type","hidden"),C(e,"id",t[1]),C(e,"name",t[1]),e.disabled=!0},m(o,r){$(o,e,r),j(e,t[0]),n||(s=S(e,"input",t[4]),n=!0)},p(t,[n]){1&n&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),n=!1,s()}}}function De(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:Me}=ot;function Be(t){let e;return{c(){e=w("p"),e.textContent=`Unknow input type: ${t[4]}`,C(e,"class","svelte-166hp95")},m(t,n){$(t,e,n)},p:o,i:o,o:o,d(t){t&&v(e)}}}function Fe(t){let e,n,o,s;function r(e){t[9](e)}var i=t[6];function a(t){let e={options:t[0],css:Ze};return void 0!==t[1]&&(e.value=t[1]),{props:e}}return i&&(e=new i(a(t)),B.push((()=>st(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8])),{c(){e&&rt(e.$$.fragment),o=k()},m(t,n){e&&it(e,t,n),$(t,o,n),s=!0},p(t,s){const l={};if(1&s&&(l.options=t[0]),!n&&2&s&&(n=!0,l.value=t[1],R((()=>n=!1))),i!==(i=t[6])){if(e){G();const t=e;tt(t.$$.fragment,1,0,(()=>{at(t,1)})),K()}i?(e=new i(a(t)),B.push((()=>st(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8]),rt(e.$$.fragment),Q(e.$$.fragment,1),it(e,o.parentNode,o)):e=null}else i&&e.$set(l)},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 Pe(t){let e,n,s,r,i,a,l,c,u,d,p,f=t[2].title+"";const m=[Fe,Be],h=[];a=function(t,e){return t[6]?0:1}(t),l=h[a]=m[a](t);let b=t[5]&&function(t){let e;return{c(){e=w("p"),e.textContent=`${t[5]}`,C(e,"class","form-hint hidden svelte-166hp95")},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=w("fieldset"),n=w("label"),s=x(f),i=y(),l.c(),c=y(),b&&b.c(),C(n,"for",r=t[2].id),C(n,"disabled",t[3])},m(o,r){$(o,e,r),g(e,n),g(n,s),g(e,i),h[a].m(e,null),g(e,c),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+"")&&T(s,f),(!u||4&e&&r!==(r=t[2].id))&&C(n,"for",r),l.p(t,e),t[5]&&b.p(t,e)},i(t){u||(Q(l),u=!0)},o(t){tt(l),u=!1},d(t){t&&v(e),h[a].d(),b&&b.d(),d=!1,p()}}}const Ve={hidden:class extends ut{constructor(t){super(),ct(this,t,De,Ae,l,{options:3,css:2,value:0})}},text:class extends ut{constructor(t){super(),ct(this,t,Le,Oe,l,{options:9,css:1,value:0})}},file:class extends ut{constructor(t){super(),ct(this,t,_e,qe,l,{options:8,css:1,value:0})}},checkbox:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-ke6ng1-style")||((e=w("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)}",g(document.head,e)),ct(this,t,je,Te,l,{options:6,css:5,value:0})}},masked:$e,textarea:class extends ut{constructor(t){super(),ct(this,t,Ne,Ie,l,{options:7,css:1,value:0})}},email:class extends ut{constructor(t){super(),ct(this,t,Ce,Ee,l,{options:7,css:1,value:0})}},date:class extends ut{constructor(t){super(),ct(this,t,Se,ke,l,{options:1,css:2,value:0})}},datetime:class extends ut{constructor(t){super(),ct(this,t,ye,xe,l,{options:13,css:0,value:12})}},number:Tt,password:class extends ut{constructor(t){super(),ct(this,t,Mt,Dt,l,{options:8,css:1,value:0})}},currency:class extends ut{constructor(t){super(),ct(this,t,At,Lt,l,{options:1,css:2,value:0,currency:3})}},rate:class extends ut{constructor(t){super(),ct(this,t,_t,qt,l,{options:0,css:2,value:1})}}},ze={default:"",checkbox:!1,email:"@",number:0,currency:0,rate:0},Ye=t=>t+"-show",Re=t=>t&&document.getElementById(t),Je=(t,e,n="block")=>{t&&t.style&&(t.style.display=e?n:"none")},Ue=(t,e)=>{if(!t)return!0;const n=Re(t);if(!n)return!0;const o=Re(Ye(t));return!e&&!o||(o&&Je(o,!e),Je(n,e),e&&n.focus&&n.focus(),!1)},Xe=t=>Ue(t,!0),We=(t,e=Re(t))=>e&&e.children&&e.children.length?Array.from(e.children).every((t=>We(t.id,t))):!e||!e.validity||e.validity.valid,He=t=>void 0===ze[t]?ze.default:ze[t],Ze="form-field";function Ge(t,e,n){let{options:o}=e,{value:s}=e;const{label:r={},disabled:i,type:a="text",hint:l=!1}=o;r.id=o.name,o.nameShadow=Ye(o.name),o.required=!i&&o.required,o.title=o.title||o.placeholder;const c=(t=>Ve[t])(a);return t.$$set=t=>{"options"in t&&n(0,o=t.options),"value"in t&&n(1,s=t.value)},[o,s,r,i,a,l,c,t=>Xe(o.name),t=>{return e=o.name,Ue(e,!1);var e},function(t){s=t,n(1,s)}]}class Ke extends ut{constructor(t){var e;super(),Me.getElementById("svelte-166hp95-style")||((e=w("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}",g(Me.head,e)),ct(this,t,Ge,Pe,l,{options:0,value:1})}}var Qe=Object.prototype.hasOwnProperty;function tn(t){return null==t}function en(t){return tn(t)||Object.keys(t).length<=0}const nn=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(Qe.call(e,o)&&++s&&!Qe.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 on(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 sn={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:nn,getErrorsFromSchema:function t(e,n,o={}){for(const s in n)switch(!0){case"object"===n[s].type&&!en(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:en,isNullish:tn,set:on,subscribeOnce:function(t){return new Promise((e=>{t.subscribe(e)()}))},update:function(t,e,n){t.update((t=>(on(t,e,n),t)))}};const rn=t=>{let e=t.initialValues||{};const n=t.validationSchema,o=t.validate,s=t.onSubmit,r=()=>sn.cloneDeep(e),i=()=>n?sn.getErrorsFromSchema(e,n.fields):sn.assignDeep(e,""),a=()=>sn.assignDeep(e,!1),l=mt(r()),c=mt(i()),d=mt(a()),p=mt(!1),f=mt(!1),m=ht(c,(t=>sn.getValues(t).every((t=>""===t)))),h=ht(l,(t=>{const n=sn.assignDeep(t,!1);for(let o in t)n[o]=!sn.deepEqual(t[o],e[o]);return n})),g=ht(h,(t=>sn.getValues(t).includes(!0)));function $(t,e){return y(t,!0),n?(f.set(!0),n.validateAt(t,u(l)).then((()=>sn.update(c,t,""))).catch((e=>sn.update(c,t,e.message))).finally((()=>{f.set(!1)}))):o?(f.set(!0),Promise.resolve().then((()=>o({[t]:e}))).then((e=>sn.update(c,t,sn.isNullish(e)?"":e[t]))).finally((()=>{f.set(!1)}))):Promise.resolve()}function v(t,e){return x(t,e),$(t,e)}function b(){l.set(r()),c.set(i()),d.set(a())}function w(t){return Promise.resolve().then((()=>c.set(i()))).then((()=>s(t,l,c))).finally((()=>p.set(!1)))}function x(t,e){sn.update(l,t,e)}function y(t,e){sn.update(d,t,e)}return{form:l,errors:c,touched:d,modified:h,isValid:m,isSubmitting:p,isValidating:f,isModified:g,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),sn.subscribeOnce(l).then((t=>"function"==typeof o?(f.set(!0),Promise.resolve().then((()=>o(t))).then((e=>{sn.isNullish(e)||0===sn.getValues(e).length?w(t):(c.set(e),p.set(!1))})).finally((()=>f.set(!1)))):n?(f.set(!0),n.validate(t,{abortEarly:!1}).then((()=>w(t))).catch((t=>{if(t&&t.inner){const e=i();t.inner.map((t=>sn.set(e,t.path,t.message))),c.set(e)}p.set(!1)})).finally((()=>f.set(!1)))):void w(t)))},handleReset:b,updateField:x,updateValidateField:v,updateTouched:y,validateField:function(t){return sn.subscribeOnce(l).then((e=>$(t,e[t])))},updateInitialValues:function(t){e=t,b()},state:ht([l,c,d,h,m,f,p,g],(([t,e,n,o,s,r,i,a])=>({form:t,errors:e,touched:n,modified:o,isValid:s,isSubmitting:i,isValidating:r,isModified:a})))}};function an(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 ln(t,e,n){const o=t.slice();return o[0]=e[n],o[36]=e,o[37]=n,o}function cn(t){let e,n,o,s=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=w("p"),n=x(s),o=x(r),C(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){$(t,e,s),g(e,n),g(e,o)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&T(o,r)},d(t){t&&v(e)}}}function un(t){let e;return{c(){e=w("p"),e.textContent=`${t[8].text}`,C(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}function dn(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 Ke({props:r}),B.push((()=>st(e,"value",s))),{c(){rt(e.$$.fragment)},m(t,n){it(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],R((()=>n=!1))),e.$set(r)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function pn(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=dn(ln(t,o,e));const r=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);$(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=ln(t,o,i);s[i]?(s[i].p(r,n),Q(s[i],1)):(s[i]=dn(r),s[i].c(),Q(s[i],1),s[i].m(e.parentNode,e))}for(G(),i=o.length;i<s.length;i+=1)r(i);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 fn(t){let e,n;return e=new yt({props:{title:t[13],show:t[33],$$slots:{default:[pn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(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 mn(t){let e,n,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,n;return{c(){e=w("m-icon"),I(e,"class","mar-r-md"),I(e,"name",n=t[9].icon)},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=w("button"),i&&i.c(),n=y(),s=x(r),C(e,"ord","primary"),C(e,"class","full-width"),C(e,"type","submit")},m(t,o){$(t,e,o),i&&i.m(e,null),g(e,n),g(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&v(e),i&&i.d()}}}function hn(t){let e,n,s,r,i,a,l,c,u,d,p,f;document.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=w("h2"),e.textContent=`${t[13].text}`},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&cn(t),x=t[3]&&t[8].text&&un(t),k=t[6],I=[];for(let e=0;e<k.length;e+=1)I[e]=fn(an(t,k,e));const N=t=>tt(I[t],1,1,(()=>{I[t]=null}));let T=t[9]&&mn(t);return{c(){n=y(),m&&m.c(),s=y(),h&&h.c(),r=y(),x&&x.c(),i=y(),a=w("p"),a.textContent=`${t[10].text}`,l=y(),c=w("form");for(let t=0;t<I.length;t+=1)I[t].c();u=y(),T&&T.c(),C(a,"id","er-invalid"),C(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),c.noValidate=!0},m(e,o){$(e,n,o),m&&m.m(e,o),$(e,s,o),h&&h.m(e,o),$(e,r,o),x&&x.m(e,o),$(e,i,o),$(e,a,o),$(e,l,o),$(e,c,o);for(let t=0;t<I.length;t+=1)I[t].m(c,null);g(c,u),T&&T.m(c,null),d=!0,p||(f=S(c,"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=cn(t),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null),t[3]&&t[8].text?x?x.p(t,n):(x=un(t),x.c(),x.m(i.parentNode,i)):x&&(x.d(1),x=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=an(t,k,e);I[e]?(I[e].p(o,n),Q(I[e],1)):(I[e]=fn(o),I[e].c(),Q(I[e],1),I[e].m(c,u))}for(G(),e=k.length;e<I.length;e+=1)N(e);K()}t[9]&&T.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(I[t]);d=!0}},o(t){I=I.filter(Boolean);for(let t=0;t<I.length;t+=1)tt(I[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(r),x&&x.d(t),t&&v(i),t&&v(a),t&&v(l),t&&v(c),b(I,t),T&&T.d(),p=!1,f()}}}function gn(t,n,o){let s,r,{options:i={}}=n,{input:a}=n,{head:l=""}=n;const{title:c={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:g=[]}=i;a=a||{};const $={};let v=!1,b="",w=!1;const x=u.reduce(((t,e)=>t.concat(e.fields)),[]),y=(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=He(e);let r=Jt(s,$[t],a[t],n);switch(e){case"date":r=r.substr(0,10);case"masked":r=r.toString()}o(17,k[t]=r,k),S[t]=r}));const{form:E,handleSubmit:C,handleReset:I}=rn({initialValues:k,onSubmit:async t=>{if(!p)return;if(!(()=>{const t=x.find((t=>!We(t.name)));return!t||(Zt("er-invalid",3e3),Xe(t.name),!1)})())return;const{path:n,func:s}=p,r=(t=>x.reduce(((e,n)=>(e[n.name]=t[n.name],e)),{}))(t);let i={};n&&!(i=await((t,n)=>{let o={};for(const t in S)(Yt(a[t])||Rt(n[t])&&S[t]!==n[t])&&(o[t]=n[t]);if(Vt(o))return!1;const{_id:s,id:r}=n;return e.post("/api/"+t,{...o,_id:s,id:r}).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:a=!0,data:l,message:c={}}=e;a?(o(3,w=!0),setTimeout((()=>{o(3,w=!1),y(n,l,s,r)}),m.text?1e3:10)):(i&&I(),o(1,v=!0),o(2,b=c.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,i)}});return d(t,E,(t=>o(4,r=t))),t.$$set=t=>{"options"in t&&o(0,i=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,l=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=k.Title||c.text||l)},[i,v,b,w,r,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},E,C,c,x,a,l,k,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,E.set(r))}]}const{document:$n}=ot;function vn(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 bn(t,e,n){const o=t.slice();return o[0]=e[n],o[35]=e,o[36]=n,o}function wn(t){let e,n,o,s=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=w("p"),n=x(s),o=x(r),C(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){$(t,e,s),g(e,n),g(e,o)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&T(o,r)},d(t){t&&v(e)}}}function xn(t){let e;return{c(){e=w("p"),e.textContent=`${t[8].text}`,C(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}function yn(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 Ke({props:i}),B.push((()=>st(e,"value",r))),{c(){rt(e.$$.fragment),o=y()},m(t,n){it(e,t,n),$(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],R((()=>n=!1))),e.$set(r)},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 kn(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=yn(bn(t,o,e));const r=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);$(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=bn(t,o,i);s[i]?(s[i].p(r,n),Q(s[i],1)):(s[i]=yn(r),s[i].c(),Q(s[i],1),s[i].m(e.parentNode,e))}for(G(),i=o.length;i<s.length;i+=1)r(i);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 Sn(t){let e,n;return e=new yt({props:{title:t[13],show:t[32],$$slots:{default:[kn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(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 En(t){let e,n,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,n;return{c(){e=w("m-icon"),I(e,"class","mar-r-md"),I(e,"name",n=t[9].icon)},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=w("button"),i&&i.c(),n=y(),s=x(r),C(e,"ord","primary"),C(e,"class","full-width"),C(e,"type","submit")},m(t,o){$(t,e,o),i&&i.m(e,null),g(e,n),g(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&v(e),i&&i.d()}}}function Cn(t){let e,n,s,r,i,a,l,c,u,d,p,f;$n.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=w("h2"),e.textContent=`${t[13].text}`,C(e,"class","mt-6 text-center text-2xl leading-9 font-extrabold text-gray-900")},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&wn(t),x=t[3]&&t[8].text&&xn(t),k=t[6],I=[];for(let e=0;e<k.length;e+=1)I[e]=Sn(vn(t,k,e));const N=t=>tt(I[t],1,1,(()=>{I[t]=null}));let T=t[9]&&En(t);return{c(){n=y(),m&&m.c(),s=y(),h&&h.c(),r=y(),x&&x.c(),i=y(),a=w("p"),a.textContent=`${t[10].text}`,l=y(),c=w("form");for(let t=0;t<I.length;t+=1)I[t].c();u=y(),T&&T.c(),C(a,"id","er-invalid"),C(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),C(c,"class","mt-4"),c.noValidate=!0,C(c,"enctype","multipart/form-data")},m(e,o){$(e,n,o),m&&m.m(e,o),$(e,s,o),h&&h.m(e,o),$(e,r,o),x&&x.m(e,o),$(e,i,o),$(e,a,o),$(e,l,o),$(e,c,o);for(let t=0;t<I.length;t+=1)I[t].m(c,null);g(c,u),T&&T.m(c,null),d=!0,p||(f=S(c,"submit",E(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&($n.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?h?h.p(t,n):(h=wn(t),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null),t[3]&&t[8].text?x?x.p(t,n):(x=xn(t),x.c(),x.m(i.parentNode,i)):x&&(x.d(1),x=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=vn(t,k,e);I[e]?(I[e].p(o,n),Q(I[e],1)):(I[e]=Sn(o),I[e].c(),Q(I[e],1),I[e].m(c,u))}for(G(),e=k.length;e<I.length;e+=1)N(e);K()}t[9]&&T.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(I[t]);d=!0}},o(t){I=I.filter(Boolean);for(let t=0;t<I.length;t+=1)tt(I[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(r),x&&x.d(t),t&&v(i),t&&v(a),t&&v(l),t&&v(c),b(I,t),T&&T.d(),p=!1,f()}}}function In(t,n,o){let s,r,{options:i={}}=n,{input:a}=n,{head:l=""}=n;const{title:c={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:g=[]}=i;a=a||{};const $={};let v=!1,b="",w=!1;const x=u.reduce(((t,e)=>t.concat(e.fields)),[]),y=(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=He(e);let r=Jt(s,$[t],a[t],n);o(17,k[t]=r,k),S[t]=r}));const{form:E,handleSubmit:C,handleReset:I}=rn({initialValues:k,onSubmit:async t=>{if(!p)return;const{path:n,func:s}=p,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:a=!0,data:l,message:c={}}=e;a?(o(3,w=!0),setTimeout((()=>{o(3,w=!1),y(n,l,s,r)}),m.text?1e3:10)):(i&&I(),o(1,v=!0),o(2,b=c.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,i)}});return d(t,E,(t=>o(4,r=t))),t.$$set=t=>{"options"in t&&o(0,i=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,l=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=k.Title||c.text||l)},[i,v,b,w,r,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},E,C,c,x,a,l,k,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,E.set(r))}]}function Nn(t){let e,n,o,s;const r=t[3].default,i=p(r,t,t[2],null);return{c(){e=w("button"),i&&i.c(),C(e,"class","link-button txt-sm mar-r-sm"),e.disabled=t[1]},m(r,a){$(r,e,a),i&&i.m(e,null),n=!0,o||(s=S(e,"click",t[4]),o=!0)},p(t,[o]){i&&i.p&&(!n||4&o)&&m(i,r,t,t[2],o,null,null),(!n||2&o)&&(e.disabled=t[1])},i(t){n||(Q(i,t),n=!0)},o(t){tt(i,t),n=!1},d(t){t&&v(e),i&&i.d(t),o=!1,s()}}}function Tn(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 jn(t){let e,n,o,s,r;const i=t[5].default,a=p(i,t,t[4],null);return{c(){e=w("span"),a&&a.c(),C(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),C(e,"title",t[0])},m(n,i){$(n,e,i),a&&a.m(e,null),o=!0,s||(r=S(e,"click",t[2]),s=!0)},p(t,[s]){a&&a.p&&(!o||16&s)&&m(a,i,t,t[4],s,null,null),(!o||2&s&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&C(e,"class",n),(!o||1&s)&&C(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,r()}}}function qn(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:r}=e,{link:i="/"}=e,{color:a}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,a=t.color),"$$scope"in t&&n(4,s=t.$$scope)},[r,a,()=>window.singleSpaNavigate(i),i,s,o]}const _n=t=>({tenant:1&t}),On=t=>({tenant:t[0].tenant});function Ln(t){let e;return{c(){e=w("p"),e.textContent="You are being redirected to the Login page."},m(t,n){$(t,e,n)},p:o,i:o,o:o,d(t){t&&v(e)}}}function An(t){let e;const n=t[3].default,o=p(n,t,t[2],On);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||5&s)&&m(o,n,t,t[2],s,_n,On)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function Dn(t){let e,n,o,s;const r=[An,Ln],i=[];return e=function(t,e){return t[1]()?0:1}(t),n=i[e]=r[e](t),{c(){n.c(),o=k()},m(t,n){i[e].m(t,n),$(t,o,n),s=!0},p(t,[e]){n.p(t,e)},i(t){s||(Q(n),s=!0)},o(t){tt(n),s=!1},d(t){i[e].d(t),t&&v(o)}}}function Mn(t,e,n){let o;d(t,gt,(t=>n(0,o=t)));let{$$slots:s={},$$scope:r}=e;return t.$$set=t=>{"$$scope"in t&&n(2,r=t.$$scope)},[o,()=>o||ee(window.singleSpaNavigate,`/?p=${window.location.pathname}`),r,s]}function Bn(t,e,n){let o;d(t,$t,(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,r=o;r.find((t=>t.href===e))||$t.set(r.slice(Math.max(r.length-6+1,0)).concat({href:e,text:s,desc:t}))}},[s,o]}const Fn="single-spa:routing-event",Pn=Gt(Fn);function Vn(t,{modulePath:e,update:n}){if(Kt({value:n,check:Ft,text:"<update> should be a function (dataListener)"},{value:e,check:Pt,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString(),s=e=>{const s=e.currentTarget.location.pathname,[,r,...i]=s.split("/");o===r&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Pn.start(s),{destroy:()=>Pn.stop(s)}}const zn=()=>window.dispatchEvent(new CustomEvent(Fn)),Yn=t=>({prop:2&t}),Rn=t=>({prop:t[5],refresh:zn});function Jn(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!1,pending:Wn,then:Xn,catch:Un,value:5,blocks:[,,,]};return et(n=t[1],s),{c(){e=k(),s.block.c()},m(t,n){$(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 Un(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function Xn(t){let e;const n=t[3].default,o=p(n,t,t[2],Rn);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,Yn,Rn)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function Wn(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function Hn(t){let e,n,o,s,r,l=t[1]&&Jn(t);return{c(){e=w("div"),l&&l.c(),C(e,"class","data")},m(i,a){$(i,e,a),l&&l.m(e,null),o=!0,s||(r=[h(n=Vn.call(null,e,t[0])),S(e,"data",t[4])],s=!0)},p(t,[o]){t[1]?l?(l.p(t,o),2&o&&Q(l,1)):(l=Jn(t),l.c(),Q(l,1),l.m(e,null)):l&&(G(),tt(l,1,1,(()=>{l=null})),K()),n&&a(n.update)&&1&o&&n.update.call(null,t[0])},i(t){o||(Q(l),o=!0)},o(t){tt(l),o=!1},d(t){t&&v(e),l&&l.d(),s=!1,i(r)}}}function Zn(t,e,n){let o,{$$slots:s={},$$scope:r}=e,{options:i}=e;return t.$$set=t=>{"options"in t&&n(0,i=t.options),"$$scope"in t&&n(2,r=t.$$scope)},[i,o,r,s,({detail:t})=>n(1,o=t.data)]}function Gn(t,e,n){const o=t.slice();return o[9]=e[n],o}function Kn(t){let e,n,o=t[9]+"";return{c(){e=w("div"),n=x(o)},m(t,o){$(t,e,o),g(e,n)},p(t,e){4&e&&o!==(o=t[9]+"")&&T(n,o)},d(t){t&&v(e)}}}function Qn(t){let e,n=t[2],o=[];for(let e=0;e<n.length;e+=1)o[e]=Kn(Gn(t,n,e));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=k()},m(t,n){for(let e=0;e<o.length;e+=1)o[e].m(t,n);$(t,e,n)},p(t,s){if(4&s){let r;for(n=t[2],r=0;r<n.length;r+=1){const i=Gn(t,n,r);o[r]?o[r].p(i,s):(o[r]=Kn(i),o[r].c(),o[r].m(e.parentNode,e))}for(;r<o.length;r+=1)o[r].d(1);o.length=n.length}},d(t){b(o,t),t&&v(e)}}}function to(t){let e,n;return e=new t[4]({props:{title:t[0],closeCallback:t[8],$$slots:{default:[Qn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.title=t[0]),256&n&&(o.closeCallback=t[8]),4100&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 eo(t){let e,n,o;function s(e){t[6](e)}let r={$$slots:{default:[to,({closeCallback:t})=>({8:t}),({closeCallback:t})=>t?256:0]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.open=t[1]),e=new t[3]({props:r}),B.push((()=>st(e,"open",s))),e.$on("change",t[7]),{c(){rt(e.$$.fragment)},m(t,n){it(e,t,n),o=!0},p(t,[o]){const s={};4357&o&&(s.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,s.open=t[1],R((()=>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 no(t,e,o){const{Modal:s,Dialog:r}=n;let i,{title:a}=e,{showMessage:l}=e,c=[];return l=t=>{o(2,c=t),o(1,i=!0)},t.$$set=t=>{"title"in t&&o(0,a=t.title),"showMessage"in t&&o(5,l=t.showMessage)},[a,i,c,s,r,l,function(t){i=t,o(1,i)},function(e){D(t,e)}]}class oo extends ut{constructor(t){super(),ct(this,t,no,eo,l,{title:0,showMessage:5})}}const so="single-spa:routing-event",ro=Gt(so);function io(t,{modulePath:e,update:n}){if(Kt({value:n,check:Ft,text:"<update> should be a function (dataListener)"},{value:e,check:Pt,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString(),s=e=>{const s=e.currentTarget.location.pathname,[,r,...i]=s.split("/");o===r&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return ro.start(s),{destroy:()=>ro.stop(s)}}const ao=()=>window.dispatchEvent(new CustomEvent(so));const lo=t=>({prop:16&t,showMessage:32&t}),co=t=>({prop:t[13],refresh:ao,showMessage:t[5]});function uo(t){let e,n;return e=new t[6]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[mo]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};4096&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 po(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!0,pending:wo,then:vo,catch:ho,value:13,error:14,blocks:[,,,]};return et(n=t[4],s),{c(){e=k(),s.block.c()},m(t,n){$(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,16&o&&n!==(n=t[4])&&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 fo(t){let e;return{c(){e=x("... Initializing ...")},m(t,n){$(t,e,n)},d(t){t&&v(e)}}}function mo(t){let e,n;return e=new t[7]({props:{$$slots:{default:[fo]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};4096&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 ho(t){let e,n;return e=new t[6]({props:{constrainWidth:!0,title:"Oops!",$$slots:{default:[$o]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};4112&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 go(t){let e,n,o,s=t[14]+"";return{c(){e=x("... "),n=x(s),o=x(" ...")},m(t,s){$(t,e,s),$(t,n,s),$(t,o,s)},p(t,e){16&e&&s!==(s=t[14]+"")&&T(n,s)},d(t){t&&v(e),t&&v(n),t&&v(o)}}}function $o(t){let e,n;return e=new t[7]({props:{$$slots:{default:[go]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};4112&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 vo(t){let e,n;return e=new t[6]({props:{class:t[1],title:t[13].title,style:t[3],$$slots:{default:[bo]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.class=t[1]),16&n&&(o.title=t[13].title),8&n&&(o.style=t[3]),4144&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 bo(t){let e;const n=t[9].default,o=p(n,t,t[12],co);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||4144&s)&&m(o,n,t,t[12],s,lo,co)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function wo(t){let e,n;return e=new t[6]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[yo]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};4096&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 xo(t){let e;return{c(){e=x("... Loading...")},m(t,n){$(t,e,n)},d(t){t&&v(e)}}}function yo(t){let e,n;return e=new t[7]({props:{$$slots:{default:[xo]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};4096&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 ko(t){let e,n,o,s,r,l,c,u,d,p;const f=[po,uo],m=[];function b(t,e){return t[4]?0:1}function x(e){t[10](e)}n=b(t),o=m[n]=f[n](t);let k={title:t[2]};return void 0!==t[5]&&(k.showMessage=t[5]),r=new oo({props:k}),B.push((()=>st(r,"showMessage",x))),r.$on("change",t[8]),{c(){e=w("section"),o.c(),s=y(),rt(r.$$.fragment),C(e,"class","full-width pos-relative")},m(o,i){$(o,e,i),m[n].m(e,null),g(e,s),it(r,e,null),u=!0,d||(p=[h(c=io.call(null,e,t[0])),S(e,"data",t[11])],d=!0)},p(t,[i]){let u=n;n=b(t),n===u?m[n].p(t,i):(G(),tt(m[u],1,1,(()=>{m[u]=null})),K(),o=m[n],o?o.p(t,i):(o=m[n]=f[n](t),o.c()),Q(o,1),o.m(e,s));const d={};4&i&&(d.title=t[2]),!l&&32&i&&(l=!0,d.showMessage=t[5],R((()=>l=!1))),r.$set(d),c&&a(c.update)&&1&i&&c.update.call(null,t[0])},i(t){u||(Q(o),Q(r.$$.fragment,t),u=!0)},o(t){tt(o),tt(r.$$.fragment,t),u=!1},d(t){t&&v(e),m[n].d(),at(r),d=!1,i(p)}}}function So(t,e,o){let{$$slots:s={},$$scope:r}=e;const{Dialog:i,Chip:a}=n;let l,c,{options:u}=e,{className:d="form"}=e,{msgTitle:p="Error"}=e,{style:f}=e;return t.$$set=t=>{"options"in t&&o(0,u=t.options),"className"in t&&o(1,d=t.className),"msgTitle"in t&&o(2,p=t.msgTitle),"style"in t&&o(3,f=t.style),"$$scope"in t&&o(12,r=t.$$scope)},[u,d,p,f,l,c,i,a,({detail:t})=>!t.value&&ao(),s,function(t){c=t,o(5,c)},({detail:t})=>o(4,l=t.data),r]}e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(bt(),Promise.reject(t)):t));let Eo=new Map;const Co=t=>(...e)=>{const n=u(vt),o=n.tenant;"invalid"===n.status&&(Eo=new Map,vt.set({tenant:o,status:""}));const s=[].concat(t.name,e).join("-");let r=Eo.get(s);if(!r)try{r=t(...e),Eo.set(s,r)}catch(t){throw t}return r};var Io={getSchema:Co((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`})))),getSchemas:Co((async()=>(await axios.get("/api/schema")).data)),getSchemaByClass:Co((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data)),getEvents:()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"})),getEvent:Co((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`})))),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),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:t=>axios.post("/api/taskqueue",{id:t}).then((t=>t.data)).catch((t=>{throw"queue not found"})),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 No=window.location.pathname;t("default",{version:"0.2.19",Storage:pt,getLoggedIn:()=>gt,getBreadcrumbs:()=>$t,getCacheValidator:()=>vt,onLogout:bt,Listener:class extends ut{constructor(t){super(),ct(this,t,Zn,Hn,l,{options:0})}},Request:Io,FormDialog:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-1li00d6-style")||((e=w("style")).id="svelte-1li00d6-style",e.textContent=".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}}",g(document.head,e)),ct(this,t,So,ko,l,{options:0,className:1,msgTitle:2,style:3})}},Form:class extends ut{constructor(t){super(),ct(this,t,gn,hn,l,{options:0,input:15,head:16},[-1,-1])}},FormUpload:class extends ut{constructor(t){super(),ct(this,t,In,Cn,l,{options:0,input:15,head:16},[-1,-1])}},LinkButton:class extends ut{constructor(t){super(),ct(this,t,Tn,Nn,l,{path:0,disabled:1})}},LinkIcon:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-1jng2dw-style")||((e=w("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}",g(document.head,e)),ct(this,t,qn,jn,l,{title:0,link:3,color:1})}},Breadcrumb:class extends ut{constructor(t){super(),ct(this,t,Bn,null,l,{description:0})}},CheckLogin:class extends ut{constructor(t){super(),ct(this,t,Mn,Dn,l,{})}},checkLogin:()=>{u(gt)||window.singleSpaNavigate(`/?p=${No}`)},util:ne})}}}));
|
|
1
|
+
System.register(["axios","@enablerr-ui/auth","@enablerr-ui/layout","@enablerr-ui/form"],(function(t){"use strict";var e,n,o,i,s;return{setters:[function(t){e=t.default},function(t){n=t.user},function(t){o=t.getGridHelp,i=t.getAttractions},function(t){s=t.TextArea}],execute:function(){function a(){}function r(t,e){for(const n in e)t[n]=e[n];return t}function c(t){return t()}function l(){return Object.create(null)}function u(t){t.forEach(c)}function d(t){return"function"==typeof t}function f(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function p(t,...e){if(null==t)return a;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function m(t){let e;return p(t,(t=>e=t))(),e}function h(t,e,n,o){if(t){const i=g(t,e,n,o);return t[0](i)}}function g(t,e,n,o){return t[1]&&o?r(n.ctx.slice(),t[1](o(e))):n.ctx}function $(t,e,n,o,i,s,a){const r=function(t,e,n,o){if(t[2]&&o){const i=t[2](o(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|i[o];return t}return e.dirty|i}return e.dirty}(e,o,i,s);if(r){const i=g(e,n,o,a);t.p(i,r)}}function y(t,e){const n={};e=new Set(e);for(const o in t)e.has(o)||"$"===o[0]||(n[o]=t[o]);return n}function w(t,e,n){t.insertBefore(e,n||null)}function x(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function b(){return t="",document.createTextNode(t);var t}function k(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let I;function j(t){I=t}function E(){if(!I)throw new Error("Function called outside component initialization");return I}function N(){const t=E();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const i=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,i)}))}}}const _=[],C=[],M=[],T=[],D=Promise.resolve();let F=!1;function L(t){M.push(t)}function P(t){T.push(t)}let A=!1;const B=new Set;function O(){if(!A){A=!0;do{for(let t=0;t<_.length;t+=1){const e=_[t];j(e),z(e.$$)}for(j(null),_.length=0;C.length;)C.pop()();for(let t=0;t<M.length;t+=1){const e=M[t];B.has(e)||(B.add(e),e())}M.length=0}while(_.length);for(;T.length;)T.pop()();F=!1,A=!1,B.clear()}}function z(t){if(null!==t.fragment){t.update(),u(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const H=new Set;let q;function V(){q={r:0,c:[],p:q}}function R(){q.r||u(q.c),q=q.p}function G(t,e){t&&t.i&&(H.delete(t),t.i(e))}function J(t,e,n,o){if(t&&t.o){if(H.has(t))return;H.add(t),q&&q.c.push((()=>{H.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function U(t,e){const n=e.token={};function o(t,o,i,s){if(e.token!==n)return;e.resolved=s;let a=e.ctx;void 0!==i&&(a=a.slice(),a[i]=s);const r=t&&(e.current=t)(a);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(V(),J(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),R())})):e.block.d(1),r.c(),G(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[o]=r),c&&O()}if((i=t)&&"object"==typeof i&&"function"==typeof i.then){const n=E();if(t.then((t=>{j(n),o(e.then,1,e.value,t),j(null)}),(t=>{if(j(n),o(e.catch,2,e.error,t),j(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 i}function K(t,e,n){const o=e.slice(),{resolved:i}=t;t.current===t.then&&(o[t.value]=i),t.current===t.catch&&(o[t.error]=i),t.block.p(o,n)}function W(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function Z(t){t&&t.c()}function Q(t,e,n,o){const{fragment:i,on_mount:s,on_destroy:a,after_update:r}=t.$$;i&&i.m(e,n),o||L((()=>{const e=s.map(c).filter(d);a?a.push(...e):u(e),t.$$.on_mount=[]})),r.forEach(L)}function X(t,e){const n=t.$$;null!==n.fragment&&(u(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Y(t,e){-1===t.$$.dirty[0]&&(_.push(t),F||(F=!0,D.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function tt(t,e,n,o,i,s,r=[-1]){const c=I;j(t);const d=t.$$={fragment:null,ctx:null,props:s,update:a,not_equal:i,bound:l(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:e.context||[]),callbacks:l(),dirty:r,skip_bound:!1};let f=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&i(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),f&&Y(t,e)),n})):[],d.update(),f=!0,u(d.before_update),d.fragment=!!o&&o(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(x)}else d.fragment&&d.fragment.c();e.intro&&G(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),O()}j(c)}class et{$destroy(){X(this,1),this.$destroy=a}$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)}}function nt(t){let e,n,o,i,s;const a=t[5].default,r=h(a,t,t[4],null);return{c(){e=v("span"),r&&r.c(),S(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),S(e,"title",t[0])},m(n,a){w(n,e,a),r&&r.m(e,null),o=!0,i||(s=k(e,"click",t[2]),i=!0)},p(t,[i]){r&&r.p&&(!o||16&i)&&$(r,a,t,t[4],i,null,null),(!o||2&i&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&S(e,"class",n),(!o||1&i)&&S(e,"title",t[0])},i(t){o||(G(r,t),o=!0)},o(t){J(r,t),o=!1},d(t){t&&x(e),r&&r.d(t),i=!1,s()}}}function ot(t,e,n){let{$$slots:o={},$$scope:i}=e,{title:s}=e,{link:a="/"}=e,{color:r}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"link"in t&&n(3,a=t.link),"color"in t&&n(1,r=t.color),"$$scope"in t&&n(4,i=t.$$scope)},[s,r,()=>window.singleSpaNavigate(a),a,i,o]}const{loggedIn:it}=n,st=async(t,e)=>{const n={};return t&&(n.event={id:t}),e&&(n.task={id:e}),(await axios.post("/api/read/commChat",n)).data.filter((e=>t?e.event&&e.event.id===t:!e.event)).filter((t=>e?t.task&&t.task.id===e:!t.task))},at=(t,e)=>{if(e.id.c){for(let n in t)if(t[n].id.c[0]==e.id.c[0]&&t[n].id.c[1]==e.id.c[1])return n}else for(let n in t)if(t[n].id==e.id)return n;return-1},{loggedIn:rt}=n,ct=async(t,e)=>{const n={};return t&&(n.event={id:t}),e&&(n.task={id:e}),(await axios.post("/api/read/commFeedback",n)).data.filter((e=>t?e.event&&e.event.id===t:!e.event)).filter((t=>e?t.task&&t.task.id===e:!t.task))};let lt;lt=[{id:"0001",email:"andrea.zirn@fhnw.ch",firstName:"Andrea",lastName:"Zirn",jobDescription:"Softwaredeveloper, Design Guru",status:"busy"},{id:"0002",email:"cloe.huesser@fhnw.ch",firstName:"Cloe",lastName:"Hüsser",jobDescription:"Softwaredeveloper, Javascript Hacker",status:"online"},{id:"0003",email:"simone.beck@fhnw.ch",firstName:"Simone",lastName:"Beck",jobDescription:"HR Verantwortliche",status:"offline"},{id:"0004",email:"shenia.scherer@fhnw.ch",firstName:"Shenia",lastName:"Scherer",jobDescription:"IIT Praktikantin",status:"offline"},{id:"0005",email:"puijanjenny.tran@students.fhnw.ch",firstName:"Jenny",lastName:"Tran",jobDescription:"IP-6 Studentin",status:"offline"},{id:"0006",email:"sinead.ganz@students.fhnw.ch",firstName:"Sinead",lastName:"Ganz",jobDescription:"IP-6 Studentin",status:"offline"}];let ut=[{id:"001",userId:"001",type:"info",title:"Neuer Mitarbeiter",description:"Es wurde eine neue Mitarbeiterin Simone Beck in der Firma erfasst.",date:"01.01.2022",eventId:"609b5bf30071894811577c06",read:!1},{id:"001",userId:"002",type:"info",title:"Neuer Mitarbeiter",description:"Es wurde eine neue Mitarbeiterin Simone Beck in der Firma erfasst.",date:"01.01.2022",eventId:"609b5bf30071894811577c06",read:!1}];let dt=[{id:"0000",userId:"0000",moduleList:[{moduleId:1111,position:0},{moduleId:9999,position:1}]},{id:"0001",userId:"0001",moduleList:[{moduleId:1111,position:0},{moduleId:2222,position:1},{moduleId:3333,position:2},{moduleId:4444,position:3}]}];let ft=[{id:"001",role:"Kundenmanager",user:"002"},{id:"002",role:"HR",user:"003"},{id:"003",role:"Projektleiter",user:"001"},{id:"004",role:"Software Developer",user:"001"},{id:"005",role:"Software Developer",user:"002"}];let pt=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:o.item({x:0,y:0,w:2,h:5,fixed:!0}),5:o.item({x:0,y:0,w:2,h:5,fixed:!0}),4:o.item({x:0,y:0,w:2,h:5,fixed:!0}),3:o.item({x:0,y:0,w:2,h:5,fixed:!0}),2:o.item({x:0,y:0,w:1,h:5,fixed:!0}),1:o.item({x:0,y:0,w:1,h:5,fixed:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:o.item({x:2,y:0,w:1,h:5,fixed:!0}),5:o.item({x:2,y:0,w:1,h:5,fixed:!0}),4:o.item({x:2,y:0,w:1,h:5,fixed:!0}),3:o.item({x:2,y:0,w:1,h:5,fixed:!0}),2:o.item({x:2,y:0,w:1,h:5,fixed:!0}),1:o.item({x:2,y:0,w:1,h:5,fixed:!0})},{id:4444,name:"Feedback Modul",text:"Feedback",status:!1,6:o.item({x:3,y:0,w:1,h:5,fixed:!0}),5:o.item({x:3,y:0,w:1,h:5,fixed:!0}),4:o.item({x:3,y:0,w:1,h:5,fixed:!0}),3:o.item({x:3,y:0,w:1,h:5,fixed:!0}),2:o.item({x:3,y:0,w:1,h:5,fixed:!0}),1:o.item({x:3,y:0,w:1,h:5,fixed:!0})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:o.item({x:3,y:3,w:1,h:2}),5:o.item({x:3,y:3,w:1,h:2}),4:o.item({x:3,y:3,w:1,h:2}),3:o.item({x:3,y:3,w:1,h:2}),2:o.item({x:3,y:3,w:1,h:2}),1:o.item({x:3,y:3,w:1,h:2})}];const{cacheValidator:mt,onLogout:ht}=n;e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(ht(),Promise.reject(t)):t));let gt=new Map;const $t=t=>(...e)=>{const n=m(mt),o=n.tenant;"invalid"===n.status&&(gt=new Map,mt.set({tenant:o,status:""}));const i=[].concat(t.name,e).join("-");let s=gt.get(i);if(!s)try{s=t(...e),gt.set(i,s)}catch(t){throw t}return s};var yt={getSchema:$t((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`})))),getSchemas:$t((async()=>(await axios.get("/api/schema")).data)),getSchemaByClass:$t((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data)),getEvents:()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"})),getEvent:$t((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`})))),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),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:()=>axios.post("/api/taskqueue",{id:!1}).then((t=>t.data)).catch((t=>{throw"queue not found"})),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,getUserSettings:async()=>(await axios.get("/api/user")).data,saveUserSettings:async t=>(await axios.post("/api/user",t)).data,saveDefaultSettings:async(t,e)=>{let n={schema:"http://json-schema.org/draft-04/schema#",id:e,email:t,firstName:"",lastName:"",jobDescription:"",role:[],setting:{showJobDescription:!0,dashboardLayout:[{id:"0000",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"9999",position:"1"}]}],notificationActivated:!0,showNotifications:!0,notificationToMail:!1,typesOfNotification:[]}};return(await axios.post("/api/user",n)).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"),setTenant:async t=>(await axios.post("/api/auth/tenant",{id:t})).data,getChat:st,saveChat:async(t,e,n)=>{const o={};t&&(o.event={id:t}),e&&(o.task={id:e});let i=await st(t,e);i[0]||(i=[...i,{...o}]);const{user:s}=m(it);let a=at(i[0].messages,n);return i[0].messages&&a>=0?i[0].messages[a]=n:(n.sender=s,i[0].messages=(i[0].messages||[]).concat(n)),console.log("chat saved",i[0]),(await axios.post("/api/commChat",i[0])).data.id},getFeedback:ct,saveFeedback:async(t,e,n,o,i)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let a=await ct(t,e);if(a[0]&&null!=i){let t=a.filter((t=>t._id===i));t={...t,...o};const{user:e}=m(rt);return n.sender=e,t[0].messages=(t[0].messages||[]).concat(n),console.log("has id",t[0].messages),(await axios.post("/api/commFeedback",t[0])).data.id}{a={...s},a={...a,...o};const{user:t}=m(rt);return n.sender=t,a.messages=(a.messages||[]).concat(n),console.log("new feedback",a),(await axios.post("/api/commFeedback",a)).data.id}},getUser:t=>lt.filter((e=>e.email==t)),getSettings:t=>dt.filter((e=>e.userId===t))[0],getNotifications:t=>ut.filter((e=>e.userId===t)),getRoles:t=>ft.filter((e=>e.user===t)),getModules:t=>pt.filter((e=>t.includes(e.id))),getAllModules:()=>pt};const wt=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",xt=t=>"function"==typeof t,vt=t=>t&&t.toString,bt=(t,...e)=>e.includes(t),kt=t=>bt(t,void 0,null),St=t=>!kt(t),It=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},jt=t=>(e,...n)=>It(It("",t.toString),e,...n),Et=(t,e=2,n=0,o=t.toString(),i=n.toString())=>i.repeat(e-o.length)+o,Nt=(t,e=window)=>({listen(n,o){e[`${n}EventListener`](t,o)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),_t=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||Tt(console.error,n))).every(Boolean),Ct=t=>(e,n)=>(Promise.resolve(n).then(e),t),Mt=Ct(!0),Tt=Ct(!1);t("util",Object.freeze({__proto__:null,decimalSeparator:wt,isFunction:xt,isStringable:vt,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:bt,isNullish:kt,isNotNullish:St,bestValue:(t,...e)=>e.concat(t).find(St),tryCatch:It,ensureStrValue:jt,padLeft:(...t)=>jt(t[0])(Et,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:Nt,isMissing:_t,go:Mt,stop:Tt}));const Dt="single-spa:routing-event",Ft=Nt(Dt);function Lt(t,{modulePath:e,update:n}){if(!1===n)return;if(_t({value:n,check:xt,text:"<update> should be a function (dataListener)"},{value:e,check:vt,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString()||"/",i=e=>{const i=e.currentTarget.location.pathname,[,s,...a]=i.split("/");o===(s||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...a)}}))};return Ft.start(i),{destroy:()=>Ft.stop(i)}}const Pt=()=>window.dispatchEvent(new CustomEvent(Dt)),At=t=>({prop:4&t,tenant:8&t,user:8&t}),Bt=t=>({prop:t[11],refresh:Pt,tenant:t[3].tenant,user:t[3].user}),Ot=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),zt=t=>({err:t[12],prop:t[11],refresh:Pt,tenant:t[3].tenant,user:t[3].user}),Ht=t=>({prop:4&t,tenant:8&t,user:8&t}),qt=t=>({prop:t[11],refresh:Pt,tenant:t[3].tenant,user:t[3].user}),Vt=t=>({prop:4&t,tenant:8&t,user:8&t}),Rt=t=>({prop:t[11],refresh:Pt,tenant:t[3].tenant,user:t[3].user});function Gt(t){let e;const n=t[8].init,o=h(n,t,t[7],Bt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,i){o&&o.p&&(!e||140&i)&&$(o,n,t,t[7],i,At,Bt)},i(t){e||(G(o,t),e=!0)},o(t){J(o,t),e=!1},d(t){o&&o.d(t)}}}function Jt(t){let e,n,o,i={ctx:t,current:null,token:null,hasCatch:!0,pending:Wt,then:Kt,catch:Ut,value:11,error:12,blocks:[,,,]};return U(n=t[2],i),{c(){e=b(),i.block.c()},m(t,n){w(t,e,n),i.block.m(t,i.anchor=n),i.mount=()=>e.parentNode,i.anchor=e,o=!0},p(e,o){t=e,i.ctx=t,4&o&&n!==(n=t[2])&&U(n,i)||K(i,t,o)},i(t){o||(G(i.block),o=!0)},o(t){for(let t=0;t<3;t+=1){J(i.blocks[t])}o=!1},d(t){t&&x(e),i.block.d(t),i.token=null,i=null}}}function Ut(t){let e;const n=t[8].error,o=h(n,t,t[7],zt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,i){o&&o.p&&(!e||140&i)&&$(o,n,t,t[7],i,Ot,zt)},i(t){e||(G(o,t),e=!0)},o(t){J(o,t),e=!1},d(t){o&&o.d(t)}}}function Kt(t){let e;const n=t[8].default,o=h(n,t,t[7],qt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,i){o&&o.p&&(!e||140&i)&&$(o,n,t,t[7],i,Ht,qt)},i(t){e||(G(o,t),e=!0)},o(t){J(o,t),e=!1},d(t){o&&o.d(t)}}}function Wt(t){let e,n,o,i={ctx:t,current:null,token:null,hasCatch:!1,pending:Xt,then:Qt,catch:Zt,value:10,blocks:[,,,]};return U(n=t[5](t[1]),i),{c(){e=b(),i.block.c()},m(t,n){w(t,e,n),i.block.m(t,i.anchor=n),i.mount=()=>e.parentNode,i.anchor=e,o=!0},p(e,o){t=e,i.ctx=t,2&o&&n!==(n=t[5](t[1]))&&U(n,i)||K(i,t,o)},i(t){o||(G(i.block),o=!0)},o(t){for(let t=0;t<3;t+=1){J(i.blocks[t])}o=!1},d(t){t&&x(e),i.block.d(t),i.token=null,i=null}}}function Zt(t){return{c:a,m:a,p:a,i:a,o:a,d:a}}function Qt(t){let e;const n=t[8].load,o=h(n,t,t[7],Rt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,i){o&&o.p&&(!e||140&i)&&$(o,n,t,t[7],i,Vt,Rt)},i(t){e||(G(o,t),e=!0)},o(t){J(o,t),e=!1},d(t){o&&o.d(t)}}}function Xt(t){return{c:a,m:a,p:a,i:a,o:a,d:a}}function Yt(t){let e,n,o,i,s,r,c;const l=[Jt,Gt],f=[];function p(t,e){return t[2]?0:1}return n=p(t),o=f[n]=l[n](t),{c(){e=v("section"),o.c(),S(e,"class","data")},m(o,l){var u;w(o,e,l),f[n].m(e,null),s=!0,r||(c=[(u=i=Lt.call(null,e,t[0]),u&&d(u.destroy)?u.destroy:a),k(e,"data",t[9])],r=!0)},p(t,[s]){let a=n;n=p(t),n===a?f[n].p(t,s):(V(),J(f[a],1,1,(()=>{f[a]=null})),R(),o=f[n],o?o.p(t,s):(o=f[n]=l[n](t),o.c()),G(o,1),o.m(e,null)),i&&d(i.update)&&1&s&&i.update.call(null,t[0])},i(t){s||(G(o),s=!0)},o(t){J(o),s=!1},d(t){t&&x(e),f[n].d(),r=!1,u(c)}}}function te(t,e,o){let i,{$$slots:s={},$$scope:a}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>o(3,i=t),t.$$.on_destroy.push(p(c,l));let u,{options:d}=e,{update:f=!1}=e,{loadingDelay:m=250}=e;f&&(d={update:f,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&o(0,d=t.options),"update"in t&&o(6,f=t.update),"loadingDelay"in t&&o(1,m=t.loadingDelay),"$$scope"in t&&o(7,a=t.$$scope)},[d,m,u,i,r,t=>new Promise((e=>setTimeout(e,t))),f,a,s,({detail:t})=>o(2,u=t.data)]}function ee(t){let e,n;const o=[{class:"full-width"},{style:t[0]},{inputClass:t[1]||"form"},{multiline:!0},{id:t[2]},{value:t[3]},{rows:t[4]},t[7]];let i={};for(let t=0;t<o.length;t+=1)i=r(i,o[t]);return e=new t[5]({props:i}),e.$on("change",t[6]),{c(){Z(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,[n]){const i=159&n?function(t,e){const n={},o={},i={$$scope:1};let s=t.length;for(;s--;){const a=t[s],r=e[s];if(r){for(const t in a)t in r||(o[t]=1);for(const t in r)i[t]||(n[t]=r[t],i[t]=1);t[s]=r}else for(const t in a)i[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(o,[o[0],1&n&&{style:t[0]},2&n&&{inputClass:t[1]||"form"},o[3],4&n&&{id:t[2]},8&n&&{value:t[3]},16&n&&{rows:t[4]},128&n&&(s=t[7],"object"==typeof s&&null!==s?s:{})]):{};var s;e.$set(i)},i(t){n||(G(e.$$.fragment,t),n=!0)},o(t){J(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function ne(t,e,n){const o=["noForm","id","value","style","rows"];let s=y(e,o);const a=N(),{TextField:c}=i;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:f=""}=e,{rows:p=3}=e;f+=" padding-bottom: .5em;";const m=5*(p>1),h=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+m}px`)};return t.$$set=t=>{e=r(r({},e),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),n(7,s=y(e,o)),"noForm"in t&&n(1,l=t.noForm),"id"in t&&n(2,u=t.id),"value"in t&&n(3,d=t.value),"style"in t&&n(0,f=t.style),"rows"in t&&n(4,p=t.rows)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(h)},[f,l,u,d,p,c,({detail:{value:t}})=>a("blur",{value:t}),s]}function oe(t){let e,n;return e=new s({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){Z(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,[n]){const o={};1&n&&(o.id=t[0]),2&n&&(o.value=t[1]),e.$set(o)},i(t){n||(G(e.$$.fragment,t),n=!0)},o(t){J(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function ie(t,e,n){let{id:o}=e,{value:i}=e;return t.$$set=t=>{"id"in t&&n(0,o=t.id),"value"in t&&n(1,i=t.value)},[o,i]}class se extends et{constructor(t){super(),tt(this,t,ie,oe,f,{id:0,value:1})}}function ae(t){let e,n,o;function i(e){t[7](e)}let s={id:t[5]};return void 0!==t[2]&&(s.value=t[2]),e=new se({props:s}),C.push((()=>W(e,"value",i))),{c(){Z(e.$$.fragment)},m(t,n){Q(e,t,n),o=!0},p(t,o){const i={};!n&&4&o&&(n=!0,i.value=t[2],P((()=>n=!1))),e.$set(i)},i(t){o||(G(e.$$.fragment,t),o=!0)},o(t){J(e.$$.fragment,t),o=!1},d(t){X(e,t)}}}function re(t){let e,n;return e=new t[4]({props:{title:t[0],closeCallback:t[10],$$slots:{default:[ae]},$$scope:{ctx:t}}}),{c(){Z(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.title=t[0]),1024&n&&(o.closeCallback=t[10]),2052&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(G(e.$$.fragment,t),n=!0)},o(t){J(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function ce(t){let e,n,o;function i(e){t[8](e)}let s={$$slots:{default:[re,({closeCallback:t})=>({10:t}),({closeCallback:t})=>t?1024:0]},$$scope:{ctx:t}};return void 0!==t[1]&&(s.open=t[1]),e=new t[3]({props:s}),C.push((()=>W(e,"open",i))),e.$on("change",t[9]),{c(){Z(e.$$.fragment)},m(t,n){Q(e,t,n),o=!0},p(t,[o]){const i={};3077&o&&(i.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,i.open=t[1],P((()=>n=!1))),e.$set(i)},i(t){o||(G(e.$$.fragment,t),o=!0)},o(t){J(e.$$.fragment,t),o=!1},d(t){X(e,t)}}}function le(t,e,n){const{Modal:o,Dialog:s}=i;let a,{title:r}=e,{showMessage:c}=e,l="";return c=t=>{n(2,l=[].concat(t).join("\n")),n(1,a=!0)},t.$$set=t=>{"title"in t&&n(0,r=t.title),"showMessage"in t&&n(6,c=t.showMessage)},[r,a,l,o,s,"modalDialog",c,function(t){l=t,n(2,l)},function(t){a=t,n(1,a)},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)}]}t("version","0.2.22");const ue=window.sessionStorage;ue.clear();t("Storage",{getItem:t=>ue.getItem(t),setItem:(t,e)=>ue.setItem(t,e)}),t("LinkIcon",class extends et{constructor(t){var e,n,o;super(),document.getElementById("svelte-1jng2dw-style")||((o=v("style")).id="svelte-1jng2dw-style",o.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}",e=document.head,n=o,e.appendChild(n)),tt(this,t,ot,nt,f,{title:0,link:3,color:1})}}),t("Page",class extends et{constructor(t){super(),tt(this,t,te,Yt,f,{options:0,update:6,loadingDelay:1})}}),t("Request",yt),t("TextArea",class extends et{constructor(t){super(),tt(this,t,ne,ee,f,{noForm:1,id:2,value:3,style:0,rows:4})}}),t("ModalDialog",class extends et{constructor(t){super(),tt(this,t,le,ce,f,{title:0,showMessage:6})}})}}}));
|