@enablerr-ui/form 0.2.92 → 0.2.93

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","@enablerr-ui/auth","@enablerr-ui/layout"],(function(t){"use strict";var e,n,a,o;return{setters:[function(t){e=t.default},function(t){n=t.user},function(t){a=t.getGridHelp,o=t.getAttractions}],execute:function(){function s(){}function i(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function c(){return Object.create(null)}function l(t){t.forEach(r)}function u(t){return"function"==typeof t}function d(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function p(t,...e){if(null==t)return s;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function f(t){let e;return p(t,(t=>e=t))(),e}function h(t,e,n,a){if(t){const o=m(t,e,n,a);return t[0](o)}}function m(t,e,n,a){return t[1]&&a?i(n.ctx.slice(),t[1](a(e))):n.ctx}function g(t,e,n,a,o,s,i){const r=function(t,e,n,a){if(t[2]&&a){const o=t[2](a(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let a=0;a<n;a+=1)t[a]=e.dirty[a]|o[a];return t}return e.dirty|o}return e.dirty}(e,a,o,s);if(r){const o=m(e,n,a,i);t.p(o,r)}}function $(t,e){const n={};e=new Set(e);for(const a in t)e.has(a)||"$"===a[0]||(n[a]=t[a]);return n}function y(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function v(){return t="",document.createTextNode(t);var t}function b(t,e,n,a){return t.addEventListener(e,n,a),()=>t.removeEventListener(e,n,a)}function k(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let _;function S(t){_=t}function D(){if(!_)throw new Error("Function called outside component initialization");return _}function T(){const t=D();return(e,n)=>{const a=t.$$.callbacks[e];if(a){const o=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);a.slice().forEach((e=>{e.call(t,o)}))}}}const I=[],E=[],j=[],N=[],C=Promise.resolve();let L=!1;function M(t){j.push(t)}let P=!1;const F=new Set;function A(){if(!P){P=!0;do{for(let t=0;t<I.length;t+=1){const e=I[t];S(e),O(e.$$)}for(S(null),I.length=0;E.length;)E.pop()();for(let t=0;t<j.length;t+=1){const e=j[t];F.has(e)||(F.add(e),e())}j.length=0}while(I.length);for(;N.length;)N.pop()();L=!1,P=!1,F.clear()}}function O(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(M)}}const B=new Set;let V;function q(){V={r:0,c:[],p:V}}function R(){V.r||l(V.c),V=V.p}function U(t,e){t&&t.i&&(B.delete(t),t.i(e))}function z(t,e,n,a){if(t&&t.o){if(B.has(t))return;B.add(t),V&&V.c.push((()=>{B.delete(t),a&&(n&&t.d(1),a())})),t.o(e)}}function H(t,e){const n=e.token={};function a(t,a,o,s){if(e.token!==n)return;e.resolved=s;let i=e.ctx;void 0!==o&&(i=i.slice(),i[o]=s);const r=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==a&&t&&(q(),z(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),R())})):e.block.d(1),r.c(),U(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[a]=r),c&&A()}if((o=t)&&"object"==typeof o&&"function"==typeof o.then){const n=D();if(t.then((t=>{S(n),a(e.then,1,e.value,t),S(null)}),(t=>{if(S(n),a(e.catch,2,e.error,t),S(null),!e.hasCatch)throw t})),e.current!==e.pending)return a(e.pending,0),!0}else{if(e.current!==e.then)return a(e.then,1,e.value,t),!0;e.resolved=t}var o}function W(t,e,n){const a=e.slice(),{resolved:o}=t;t.current===t.then&&(a[t.value]=o),t.current===t.catch&&(a[t.error]=o),t.block.p(a,n)}function K(t){t&&t.c()}function G(t,e,n,a){const{fragment:o,on_mount:s,on_destroy:i,after_update:c}=t.$$;o&&o.m(e,n),a||M((()=>{const e=s.map(r).filter(u);i?i.push(...e):l(e),t.$$.on_mount=[]})),c.forEach(M)}function J(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Q(t,e){-1===t.$$.dirty[0]&&(I.push(t),L||(L=!0,C.then(A)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function X(t,e,n,a,o,i,r=[-1]){const u=_;S(t);const d=t.$$={fragment:null,ctx:null,props:i,update:s,not_equal:o,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:c(),dirty:r,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...a)=>{const s=a.length?a[0]:n;return d.ctx&&o(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&Q(t,e)),n})):[],d.update(),p=!0,l(d.before_update),d.fragment=!!a&&a(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(w)}else d.fragment&&d.fragment.c();e.intro&&U(t.$$.fragment),G(t,e.target,e.anchor,e.customElement),A()}S(u)}class Y{$destroy(){J(this,1),this.$destroy=s}$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 Z(t){let e,n,a,o,s;const i=t[5].default,r=h(i,t,t[4],null);return{c(){e=x("span"),r&&r.c(),k(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),k(e,"title",t[0])},m(n,i){y(n,e,i),r&&r.m(e,null),a=!0,o||(s=b(e,"click",t[2]),o=!0)},p(t,[o]){r&&r.p&&(!a||16&o)&&g(r,i,t,t[4],o,null,null),(!a||2&o&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&k(e,"class",n),(!a||1&o)&&k(e,"title",t[0])},i(t){a||(U(r,t),a=!0)},o(t){z(r,t),a=!1},d(t){t&&w(e),r&&r.d(t),o=!1,s()}}}function tt(t,e,n){let{$$slots:a={},$$scope:o}=e,{title:s}=e,{link:i="/"}=e,{color:r}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,r=t.color),"$$scope"in t&&n(4,o=t.$$scope)},[s,r,()=>window.singleSpaNavigate(i),i,o,a]}const et=[];function nt(t,e){return{subscribe:at(t,e).subscribe}}function at(t,e=s){let n;const a=[];function o(e){if(d(t,e)&&(t=e,n)){const e=!et.length;for(let e=0;e<a.length;e+=1){const n=a[e];n[1](),et.push(n,t)}if(e){for(let t=0;t<et.length;t+=2)et[t][0](et[t+1]);et.length=0}}}return{set:o,update:function(e){o(e(t))},subscribe:function(i,r=s){const c=[i,r];return a.push(c),1===a.length&&(n=e(o)||s),i(t),()=>{const t=a.indexOf(c);-1!==t&&a.splice(t,1),0===a.length&&(n(),n=null)}}}}function ot(t,e,n){const a=!Array.isArray(t),o=a?[t]:t,i=e.length<2;return nt(n,(t=>{let n=!1;const r=[];let c=0,d=s;const f=()=>{if(c)return;d();const n=e(a?r[0]:r,t);i?t(n):d=u(n)?n:s},h=o.map(((t,e)=>p(t,(t=>{r[e]=t,c&=~(1<<e),n&&f()}),(()=>{c|=1<<e}))));return n=!0,f(),function(){l(h),d()}}))}const st=()=>[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}],it=()=>[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],{loggedIn:rt}=n,ct=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},lt=async(t,e)=>{const n=ct(t,e);return(await axios.get("/api/comm/chat"+n)).data.filter((e=>t?e.event&&e.event._id===t:!e.event)).filter((t=>e?t.task&&t.task._id===e:!t.task))},{loggedIn:ut}=n,dt=async(t,e)=>[],pt=t("notification",at(!1)),ft=t("notifications_local",at([])),ht=t("communication_notification",at(!1)),mt=t("task_notification",at(!1)),gt=t("approval_notification",at(!1)),$t=t("attachment_notification",at(!1)),yt=at(!1),wt=t("settings",at({})),xt=(t("currentRoles",at()),at(Date.now()+1e7)),vt=ot(nt(Date.now(),(function(t){const e=setInterval((()=>{t(Date.now())}),6e4);return function(){clearInterval(e)}})),(t=>t>f(xt)));vt.subscribe((t=>{if(t)if((()=>{let t=_t.filter((t=>t._valid>Date.now()));_t=t,ft.set(_t),pt.set(!0)})(),_t.length>0){const t=_t.reduce(((t,e)=>t.__valid<e.__valid?t:e));xt.set(t.__valid)}else xt.set(Date.now()+1e7)}));const bt=[{type:"communication",desc:"Kommunikation",obj:ht},{type:"task",desc:"Aufgabe",obj:mt},{type:"approval",desc:"Visum",obj:gt},{type:"attachment",desc:"Dokument",obj:$t},{type:"workflow",desc:"Worfklow",obj:yt}],kt=(t,e=!1)=>{const n=f(wt).setting,a=n?.notificationActivated,o=n?.typesOfNotification,s=bt.find((e=>e.type===t.type));if(a&&o.find((t=>t===s?.desc))){const e=_t.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?_t[_t.indexOf(e[0])]=t:(_t.unshift(t),t.__valid<xt&&xt.set(t.__valid)),ft.set(_t),pt.set(!1)}e&&s?.obj.set(t)};let _t=[];let St=[{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"}];const Dt=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:a.item({x:0,y:0,w:4,h:5,customDragger:!0}),5:a.item({x:0,y:0,w:4,h:5,customDragger:!0}),4:a.item({x:0,y:0,w:3,h:5,customDragger:!0}),3:a.item({x:0,y:0,w:2,h:5,customDragger:!0}),2:a.item({x:0,y:0,w:1,h:5,customDragger:!0}),1:a.item({x:0,y:0,w:1,h:5,customDragger:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:a.item({x:4,y:0,w:1,h:5,customDragger:!0}),5:a.item({x:4,y:0,w:1,h:5,customDragger:!0}),4:a.item({x:3,y:0,w:1,h:5,customDragger:!0}),3:a.item({x:2,y:0,w:1,h:5,customDragger:!0}),2:a.item({x:1,y:0,w:1,h:5,customDragger:!0}),1:a.item({x:1,y:0,w:1,h:5,customDragger:!0})},{id:4444,name:"Feedback Modul",text:"Feedback",status:!1,6:a.item({x:5,y:0,w:1,h:5}),5:a.item({x:5,y:0,w:1,h:5}),4:a.item({x:4,y:0,w:1,h:5}),3:a.item({x:3,y:0,w:1,h:5}),2:a.item({x:2,y:0,w:1,h:5}),1:a.item({x:2,y:0,w:1,h:5})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:a.item({x:4,y:0,w:1,h:2}),5:a.item({x:4,y:0,w:1,h:2}),4:a.item({x:3,y:0,w:1,h:2}),3:a.item({x:2,y:0,w:1,h:2}),2:a.item({x:1,y:0,w:1,h:2}),1:a.item({x:1,y:0,w:1,h:2})}],{cacheValidator:Tt,onLogout:It}=n;e.interceptors.request.use((t=>(t.headers.enablerr=window.location.hostname,t))),e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(window.singleSpaNavigate("/error"),Promise.reject(t)):t));let Et=new Map;const jt=(t,e)=>(...n)=>{const a=f(Tt),o=window.localStorage.getItem("enablerr-tenant");"invalid"===a.status&&(Et=new Map,Tt.set({tenant:o,status:""}));const s=[].concat(o,e,n).join("-");let i=Et.get(s);if(!i)try{i=t(...n),Et.set(s,i)}catch(t){throw t}return i};var Nt={getSchema:jt((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`}))),"getSchema"),getSchemas:async()=>(await axios.get("/api/schema")).data,getSchemaByClass:jt((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data),"getSchemaByClass"),getEvents:jt((()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"}))),"getEvents"),getEvent:jt((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`}))),"getEvent"),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),getTaskList:(t,e)=>axios.get(`/api/task/${t}:${e}?display=list`).then((t=>t.data)).catch((t=>{})),getTasksList:t=>axios.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTasks:t=>axios.get(`/api/tasks/${t}?display=form`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:t=>axios.post("/api/read/_task",{_id:t}).then((t=>t.data[0])).catch((t=>{})),getTaskByDocId:t=>axios.post("/api/read/_task",{docId:t}).then((t=>t.data[0])).catch((t=>{})),getTaskqueue:(t=!1,e)=>axios.post("/api/taskqueue",{id:t,task:e}).then((t=>t.data)).catch((t=>{throw"queue not found"})),createTaskByEventId:t=>axios.post("/api/workflow/task",{event:t}).then((t=>t.data)).catch((t=>{})),saveData:async(t,e)=>(await axios.post(`/api/${t}`,e)).data,saveTemplate:async(t,e)=>(await axios.post(`/api/template/${t}`,e)).data,getPlanning:async(t,e,n)=>(await axios.get(`/api/planning/${t}/${e}/${n}`)).data,savePlanning:async(t,e)=>(await axios.post(`/api/planning/${t}`,e)).data,deletePlanning:async(t,e)=>(await axios.patch(`/api/planning/${t}`,e)).data,deleteTask:t=>axios.delete(`/api/_task/${t}`).then((t=>t.data)).catch((t=>{})),setTaskVisum:(t,e)=>axios.post(`/api/task/visum/${t}`,{visum:e}).then((t=>t.data)).catch((t=>{})),deleteTaskVisum:(t,e)=>axios.delete(`/api/task/visum/${t}/${e}`).then((t=>t.data)).catch((t=>{})),getTaskOptions:(t,e,n=!1)=>axios.get(`/api/task/${t}/${e}${n?"/recursive":""}`).then((t=>t.data)).catch((t=>{throw"docs not found"})),getLastId:(t,e)=>axios.get(`/api/task/${t}/lastId/${e}`).then((t=>t.data)).catch((t=>{throw"docs not found"})),getCumulatedSection:(t,e,n,a)=>axios.get(`/api/task/${t}/${fieldName}/section/${n}/${a}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSection:(t,e,n,a=!1)=>axios.post("/api/read/"+t,{[e]:n,status:!0,_unique:a}).then((t=>a?t.data.map((t=>({[a]:t}))):t.data)).catch((t=>{throw"internal error"})),getSectionView:(t,e,n=!1)=>(n&&(e._display="list"),axios.post("/api/read/"+t,e).then((t=>t.data)).catch((t=>{throw"internal error"}))),getCountedSection:(t,e,n,a,o)=>axios.get(`/api/task/${t}/${e}/${n}/count/${a}/${o}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSolitaire:t=>axios.post("/api/read/"+t).then((t=>t.data)).catch((t=>null)),getTemplate:t=>axios.post("/api/read/_template",{_className:t}).then((t=>t.data[0])).catch((t=>{})),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,deletePluginAndData:()=>axios.delete("/api/plugin"),getAuthStatus:async t=>(await axios.post("/api/auth/status",{email:t})).data,getUserSettings:t=>t?axios.get("/api/user/"+t).then((t=>t.data)):axios.get("/api/user").then((t=>t.data)),saveUserSettings:t=>axios.post("/api/user",t).then((t=>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:!1,dashboardLayout:[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],notificationActivated:!0,showNotifications:!0,notificationToMail:!1,typesOfNotification:["Aufgabe","Visum","Dokument"]}};return axios.post("/api/user",n).then((t=>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"),setTenant:async t=>axios.post("/api/auth/tenant",{id:t}).then((t=>t.data)).catch((t=>({status:!1}))),getAllChats:async()=>axios.get("/api/comm/chat").then((({data:t})=>t)),getChat:lt,saveChat:async(t,e,n)=>{const{user:a}=f(rt);let o=await lt(t,e);o[0]||(n.sender=a);const s=o[0]?"patch":"post",i=ct(t,e);return(await axios[s]("/api/comm/chat"+i,n)).data.id},getFeedback:dt,saveFeedback:async(t,e,n,a,o)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let i=await dt();if(i[0]&&null!=o){let t=i.filter((t=>t._id===o));t={...t,...a};const{user:e}=f(ut);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}{i={...s},i={...i,...a};const{user:t}=f(ut);return n.sender=t,i.messages=(i.messages||[]).concat(n),console.log("new feedback",i),(await axios.post("/api/commFeedback",i)).data.id}},getUserReports:async t=>(await axios.get("/api/userreport/list/"+t)).data,uploadUserReport:async(t,e)=>(await axios.post("/api/userreport/"+t,e)).data,deleteUserReport:async t=>(await axios.delete("/api/userreport/"+t)).data,load:t=>axios.post("/api/neo4j",{taskId:t}).then((t=>t.data)).catch((t=>{throw"workflows not loaded"})),getDefaultModuleList:st,getDefaultLayout:it,getNotifications:t=>axios.get("/api/notification").then((async t=>{await new Promise((t=>setTimeout(t,2e3)));for(let e of t.data)kt(e,!1);return _t})),getNotificationsLocal:t=>_t,saveNotification:kt,updateNotification:t=>{let e=_t.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?(_t[_t.indexOf(e[0])]=t,ft.set(_t)):kt(t,!1)},getNotificationTypes:jt((()=>axios.get("/api/notification/type").then((t=>t.data))),"getNotificationTypes"),getRoles:t=>St.filter((e=>e.user===t)),getModules:t=>Dt.filter((e=>t.includes(e.id))),getModuleName:t=>{const e=Dt.find((e=>e.id===Number(t)));return e?e.name:"Unbekanntes Modul"},getAllModules:()=>Dt};const Ct=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",Lt=t=>"function"==typeof t,Mt=t=>t&&t.toString,Pt=(t,...e)=>e.includes(t),Ft=t=>Pt(t,void 0,null),At=t=>!Ft(t),Ot=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Bt=t=>(e,...n)=>Ot(Ot("",t.toString),e,...n),Vt=(t,e=2,n=0,a=t.toString(),o=n.toString())=>o.repeat(e-a.length)+a,qt=(t,e=window)=>({listen(n,a){e[`${n}EventListener`](t,a)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),Rt=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||Ht(console.error,n))).every(Boolean),Ut=t=>(e,n)=>(Promise.resolve(n).then(e),t),zt=Ut(!0),Ht=Ut(!1);var Wt=Object.freeze({__proto__:null,decimalSeparator:Ct,isFunction:Lt,isStringable:Mt,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:Pt,isNullish:Ft,isNotNullish:At,bestValue:(t,...e)=>e.concat(t).find(At),tryCatch:Ot,ensureStrValue:Bt,padLeft:(...t)=>Bt(t[0])(Vt,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:qt,isMissing:Rt,go:zt,stop:Ht});t("util",Wt);const Kt="single-spa:routing-event",Gt=qt(Kt);function Jt(t,{modulePath:e,update:n}){if(!1===n)return;if(Rt({value:n,check:Lt,text:"<update> should be a function (dataListener)"},{value:e,check:Mt,text:"<modulePath> should be a string (dataListener)"}))return;const a=e.toString()||"/",o=e=>{const o=e.currentTarget.location.pathname,[,s,...i]=o.split("/");a===(s||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Gt.start(o),{destroy:()=>Gt.stop(o)}}const Qt=()=>window.dispatchEvent(new CustomEvent(Kt)),Xt=t=>({prop:4&t,tenant:8&t,user:8&t}),Yt=t=>({prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user}),Zt=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),te=t=>({err:t[12],prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user}),ee=t=>({prop:4&t,tenant:8&t,user:8&t}),ne=t=>({prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user}),ae=t=>({prop:4&t,tenant:8&t,user:8&t}),oe=t=>({prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user});function se(t){let e;const n=t[8].init,a=h(n,t,t[7],Yt);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&g(a,n,t,t[7],o,Xt,Yt)},i(t){e||(U(a,t),e=!0)},o(t){z(a,t),e=!1},d(t){a&&a.d(t)}}}function ie(t){let e,n,a,o={ctx:t,current:null,token:null,hasCatch:!0,pending:le,then:ce,catch:re,value:11,error:12,blocks:[,,,]};return H(n=t[2],o),{c(){e=v(),o.block.c()},m(t,n){y(t,e,n),o.block.m(t,o.anchor=n),o.mount=()=>e.parentNode,o.anchor=e,a=!0},p(e,a){t=e,o.ctx=t,4&a&&n!==(n=t[2])&&H(n,o)||W(o,t,a)},i(t){a||(U(o.block),a=!0)},o(t){for(let t=0;t<3;t+=1){z(o.blocks[t])}a=!1},d(t){t&&w(e),o.block.d(t),o.token=null,o=null}}}function re(t){let e;const n=t[8].error,a=h(n,t,t[7],te);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&g(a,n,t,t[7],o,Zt,te)},i(t){e||(U(a,t),e=!0)},o(t){z(a,t),e=!1},d(t){a&&a.d(t)}}}function ce(t){let e;const n=t[8].default,a=h(n,t,t[7],ne);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&g(a,n,t,t[7],o,ee,ne)},i(t){e||(U(a,t),e=!0)},o(t){z(a,t),e=!1},d(t){a&&a.d(t)}}}function le(t){let e,n,a,o={ctx:t,current:null,token:null,hasCatch:!1,pending:pe,then:de,catch:ue,value:10,blocks:[,,,]};return H(n=t[5](t[1]),o),{c(){e=v(),o.block.c()},m(t,n){y(t,e,n),o.block.m(t,o.anchor=n),o.mount=()=>e.parentNode,o.anchor=e,a=!0},p(e,a){t=e,o.ctx=t,2&a&&n!==(n=t[5](t[1]))&&H(n,o)||W(o,t,a)},i(t){a||(U(o.block),a=!0)},o(t){for(let t=0;t<3;t+=1){z(o.blocks[t])}a=!1},d(t){t&&w(e),o.block.d(t),o.token=null,o=null}}}function ue(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function de(t){let e;const n=t[8].load,a=h(n,t,t[7],oe);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&g(a,n,t,t[7],o,ae,oe)},i(t){e||(U(a,t),e=!0)},o(t){z(a,t),e=!1},d(t){a&&a.d(t)}}}function pe(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function fe(t){let e,n,a,o,i,r,c;const d=[ie,se],p=[];function f(t,e){return t[2]?0:1}return n=f(t),a=p[n]=d[n](t),{c(){e=x("section"),a.c(),k(e,"class","data")},m(a,l){var d;y(a,e,l),p[n].m(e,null),i=!0,r||(c=[(d=o=Jt.call(null,e,t[0]),d&&u(d.destroy)?d.destroy:s),b(e,"data",t[9])],r=!0)},p(t,[s]){let i=n;n=f(t),n===i?p[n].p(t,s):(q(),z(p[i],1,1,(()=>{p[i]=null})),R(),a=p[n],a?a.p(t,s):(a=p[n]=d[n](t),a.c()),U(a,1),a.m(e,null)),o&&u(o.update)&&1&s&&o.update.call(null,t[0])},i(t){i||(U(a),i=!0)},o(t){z(a),i=!1},d(t){t&&w(e),p[n].d(),r=!1,l(c)}}}function he(t,e,a){let o,{$$slots:s={},$$scope:i}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>a(3,o=t),t.$$.on_destroy.push(p(c,l));let u,{options:d}=e,{update:f=!1}=e,{loadingDelay:h=250}=e;f&&(d={update:f,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&a(0,d=t.options),"update"in t&&a(6,f=t.update),"loadingDelay"in t&&a(1,h=t.loadingDelay),"$$scope"in t&&a(7,i=t.$$scope)},[d,h,u,o,r,t=>new Promise((e=>setTimeout(e,t))),f,i,s,({detail:t})=>a(2,u=t.data)]}function me(t){let e,n;const a=[{class:"full-width"},{style:t[0]},{inputClass:t[1]||t[5]},{multiline:!0},{readonly:t[6]},{id:t[2]},{value:t[3]},{rows:t[4]},t[10]];let o={};for(let t=0;t<a.length;t+=1)o=i(o,a[t]);return e=new t[7]({props:o}),e.$on("change",t[8]),e.$on("focus",t[9]),{c(){K(e.$$.fragment)},m(t,a){G(e,t,a),n=!0},p(t,[n]){const o=1151&n?function(t,e){const n={},a={},o={$$scope:1};let s=t.length;for(;s--;){const i=t[s],r=e[s];if(r){for(const t in i)t in r||(a[t]=1);for(const t in r)o[t]||(n[t]=r[t],o[t]=1);t[s]=r}else for(const t in i)o[t]=1}for(const t in a)t in n||(n[t]=void 0);return n}(a,[a[0],1&n&&{style:t[0]},34&n&&{inputClass:t[1]||t[5]},a[3],64&n&&{readonly:t[6]},4&n&&{id:t[2]},8&n&&{value:t[3]},16&n&&{rows:t[4]},1024&n&&(s=t[10],"object"==typeof s&&null!==s?s:{})]):{};var s;e.$set(o)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function ge(t,e,n){const a=["noForm","id","value","style","rows","classId","readonly"];let s=$(e,a);const r=T(),{TextField:c}=o;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:f=3}=e,{classId:h}=e,{readonly:m}=e;p+=" padding-bottom: .5em;";const g=5*(f>1),y=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+g}px`)};return t.$$set=t=>{e=i(i({},e),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),n(10,s=$(e,a)),"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,p=t.style),"rows"in t&&n(4,f=t.rows),"classId"in t&&n(5,h=t.classId),"readonly"in t&&n(6,m=t.readonly)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(y)},[p,l,u,d,f,h,m,c,({detail:{value:t}})=>r("blur",{value:t}),()=>r("onFocus"),s]}class $e extends Y{constructor(t){super(),X(this,t,ge,me,d,{noForm:1,id:2,value:3,style:0,rows:4,classId:5,readonly:6})}}function ye(t){let e,n;return e=new $e({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){K(e.$$.fragment)},m(t,a){G(e,t,a),n=!0},p(t,[n]){const a={};1&n&&(a.id=t[0]),2&n&&(a.value=t[1]),e.$set(a)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function we(t,e,n){let{id:a}=e,{value:o}=e;return t.$$set=t=>{"id"in t&&n(0,a=t.id),"value"in t&&n(1,o=t.value)},[a,o]}class xe extends Y{constructor(t){super(),X(this,t,we,ye,d,{id:0,value:1})}}function ve(t){let e,n,a;function o(e){t[8](e)}let s={id:t[6]};return void 0!==t[3]&&(s.value=t[3]),e=new xe({props:s}),E.push((()=>function(t,e,n){const a=t.$$.props[e];void 0!==a&&(t.$$.bound[a]=n,n(t.$$.ctx[a]))}(e,"value",o))),{c(){K(e.$$.fragment)},m(t,n){G(e,t,n),a=!0},p(t,a){const o={};var s;!n&&8&a&&(n=!0,o.value=t[3],s=()=>n=!1,N.push(s)),e.$set(o)},i(t){a||(U(e.$$.fragment,t),a=!0)},o(t){z(e.$$.fragment,t),a=!1},d(t){J(e,t)}}}function be(t){let e,n;return e=new t[5]({props:{title:t[2],closeCallback:t[7],$$slots:{default:[ve]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(t,a){G(e,t,a),n=!0},p(t,n){const a={};4&n&&(a.title=t[2]),1032&n&&(a.$$scope={dirty:n,ctx:t}),e.$set(a)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function ke(t){let e,n;return e=new t[4]({props:{open:t[1],messages:t[0],$$slots:{default:[be]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(t,a){G(e,t,a),n=!0},p(t,[n]){const a={};2&n&&(a.open=t[1]),1&n&&(a.messages=t[0]),1036&n&&(a.$$scope={dirty:n,ctx:t}),e.$set(a)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function _e(t,e,n){const a=T(),{Modal:s,Dialog:i}=o;let r,{title:c}=e,{messages:l=""}=e,{modalOpen:u=!1}=e;return t.$$set=t=>{"title"in t&&n(2,c=t.title),"messages"in t&&n(0,l=t.messages),"modalOpen"in t&&n(1,u=t.modalOpen)},t.$$.update=()=>{9&t.$$.dirty&&l&&(n(3,r=[].concat(l).join("\n")),r&&n(1,u=!0))},[l,u,c,r,s,i,"modalDialog",t=>{n(1,u=!1),n(3,r=""),n(0,l=""),a("change",u)},function(t){r=t,n(3,r),n(0,l)}]}t("version","0.2.92");const Se=window.sessionStorage;Se.clear();t("Storage",{getItem:t=>Se.getItem(t),setItem:(t,e)=>Se.setItem(t,e)});t("toasts",function(){const t=at([]);function e(e,n,a="default"){n||(n=3e3),t.update((t=>t.length>3?t:t=[...t,{id:"_"+Math.random().toString(36).substring(2,9),type:a,msg:e,timeout:n}]))}const n=ot(t,((e,n)=>{if(n(e),e&&e.length>0){const n=setTimeout((()=>{t.update((t=>(t.shift(),t)))}),e[0].timeout);return()=>{clearTimeout(n)}}})),{subscribe:a}=n;return{subscribe:a,send:e,default:(t,n)=>e(t,n,"default"),success:(t,n)=>e(t,n,"success"),failed:(t,n)=>e(t,n,"failed")}}()),t("LinkIcon",class extends Y{constructor(t){var e,n,a;super(),document.getElementById("svelte-1jng2dw-style")||((a=x("style")).id="svelte-1jng2dw-style",a.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=a,e.appendChild(n)),X(this,t,tt,Z,d,{title:0,link:3,color:1})}}),t("Page",class extends Y{constructor(t){super(),X(this,t,he,fe,d,{options:0,update:6,loadingDelay:1})}}),t("Request",Nt),t("TextArea",$e),t("ModalDialog",class extends Y{constructor(t){super(),X(this,t,_e,ke,d,{title:2,messages:0,modalOpen:1})}})}}}));
1
+ System.register(["axios","@enablerr-ui/auth","@enablerr-ui/layout"],(function(t){"use strict";var e,n,a,o;return{setters:[function(t){e=t.default},function(t){n=t.user},function(t){a=t.getGridHelp,o=t.getAttractions}],execute:function(){function s(){}function i(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function c(){return Object.create(null)}function l(t){t.forEach(r)}function u(t){return"function"==typeof t}function d(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function p(t,...e){if(null==t)return s;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function f(t){let e;return p(t,(t=>e=t))(),e}function h(t,e,n,a){if(t){const o=g(t,e,n,a);return t[0](o)}}function g(t,e,n,a){return t[1]&&a?i(n.ctx.slice(),t[1](a(e))):n.ctx}function m(t,e,n,a,o,s,i){const r=function(t,e,n,a){if(t[2]&&a){const o=t[2](a(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let a=0;a<n;a+=1)t[a]=e.dirty[a]|o[a];return t}return e.dirty|o}return e.dirty}(e,a,o,s);if(r){const o=g(e,n,a,i);t.p(o,r)}}function $(t,e){const n={};e=new Set(e);for(const a in t)e.has(a)||"$"===a[0]||(n[a]=t[a]);return n}function y(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function v(){return t="",document.createTextNode(t);var t}function b(t,e,n,a){return t.addEventListener(e,n,a),()=>t.removeEventListener(e,n,a)}function k(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let _;function S(t){_=t}function D(){if(!_)throw new Error("Function called outside component initialization");return _}function T(){const t=D();return(e,n)=>{const a=t.$$.callbacks[e];if(a){const o=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);a.slice().forEach((e=>{e.call(t,o)}))}}}const I=[],E=[],j=[],N=[],C=Promise.resolve();let L=!1;function M(t){j.push(t)}let P=!1;const F=new Set;function A(){if(!P){P=!0;do{for(let t=0;t<I.length;t+=1){const e=I[t];S(e),O(e.$$)}for(S(null),I.length=0;E.length;)E.pop()();for(let t=0;t<j.length;t+=1){const e=j[t];F.has(e)||(F.add(e),e())}j.length=0}while(I.length);for(;N.length;)N.pop()();L=!1,P=!1,F.clear()}}function O(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(M)}}const B=new Set;let R;function V(){R={r:0,c:[],p:R}}function q(){R.r||l(R.c),R=R.p}function U(t,e){t&&t.i&&(B.delete(t),t.i(e))}function z(t,e,n,a){if(t&&t.o){if(B.has(t))return;B.add(t),R&&R.c.push((()=>{B.delete(t),a&&(n&&t.d(1),a())})),t.o(e)}}function H(t,e){const n=e.token={};function a(t,a,o,s){if(e.token!==n)return;e.resolved=s;let i=e.ctx;void 0!==o&&(i=i.slice(),i[o]=s);const r=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==a&&t&&(V(),z(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),q())})):e.block.d(1),r.c(),U(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[a]=r),c&&A()}if((o=t)&&"object"==typeof o&&"function"==typeof o.then){const n=D();if(t.then((t=>{S(n),a(e.then,1,e.value,t),S(null)}),(t=>{if(S(n),a(e.catch,2,e.error,t),S(null),!e.hasCatch)throw t})),e.current!==e.pending)return a(e.pending,0),!0}else{if(e.current!==e.then)return a(e.then,1,e.value,t),!0;e.resolved=t}var o}function W(t,e,n){const a=e.slice(),{resolved:o}=t;t.current===t.then&&(a[t.value]=o),t.current===t.catch&&(a[t.error]=o),t.block.p(a,n)}function K(t){t&&t.c()}function G(t,e,n,a){const{fragment:o,on_mount:s,on_destroy:i,after_update:c}=t.$$;o&&o.m(e,n),a||M((()=>{const e=s.map(r).filter(u);i?i.push(...e):l(e),t.$$.on_mount=[]})),c.forEach(M)}function J(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Q(t,e){-1===t.$$.dirty[0]&&(I.push(t),L||(L=!0,C.then(A)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function X(t,e,n,a,o,i,r=[-1]){const u=_;S(t);const d=t.$$={fragment:null,ctx:null,props:i,update:s,not_equal:o,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:c(),dirty:r,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...a)=>{const s=a.length?a[0]:n;return d.ctx&&o(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&Q(t,e)),n})):[],d.update(),p=!0,l(d.before_update),d.fragment=!!a&&a(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(w)}else d.fragment&&d.fragment.c();e.intro&&U(t.$$.fragment),G(t,e.target,e.anchor,e.customElement),A()}S(u)}class Y{$destroy(){J(this,1),this.$destroy=s}$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 Z(t){let e,n,a,o,s;const i=t[5].default,r=h(i,t,t[4],null);return{c(){e=x("span"),r&&r.c(),k(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),k(e,"title",t[0])},m(n,i){y(n,e,i),r&&r.m(e,null),a=!0,o||(s=b(e,"click",t[2]),o=!0)},p(t,[o]){r&&r.p&&(!a||16&o)&&m(r,i,t,t[4],o,null,null),(!a||2&o&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&k(e,"class",n),(!a||1&o)&&k(e,"title",t[0])},i(t){a||(U(r,t),a=!0)},o(t){z(r,t),a=!1},d(t){t&&w(e),r&&r.d(t),o=!1,s()}}}function tt(t,e,n){let{$$slots:a={},$$scope:o}=e,{title:s}=e,{link:i="/"}=e,{color:r}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,r=t.color),"$$scope"in t&&n(4,o=t.$$scope)},[s,r,()=>window.singleSpaNavigate(i),i,o,a]}const et=[];function nt(t,e){return{subscribe:at(t,e).subscribe}}function at(t,e=s){let n;const a=[];function o(e){if(d(t,e)&&(t=e,n)){const e=!et.length;for(let e=0;e<a.length;e+=1){const n=a[e];n[1](),et.push(n,t)}if(e){for(let t=0;t<et.length;t+=2)et[t][0](et[t+1]);et.length=0}}}return{set:o,update:function(e){o(e(t))},subscribe:function(i,r=s){const c=[i,r];return a.push(c),1===a.length&&(n=e(o)||s),i(t),()=>{const t=a.indexOf(c);-1!==t&&a.splice(t,1),0===a.length&&(n(),n=null)}}}}function ot(t,e,n){const a=!Array.isArray(t),o=a?[t]:t,i=e.length<2;return nt(n,(t=>{let n=!1;const r=[];let c=0,d=s;const f=()=>{if(c)return;d();const n=e(a?r[0]:r,t);i?t(n):d=u(n)?n:s},h=o.map(((t,e)=>p(t,(t=>{r[e]=t,c&=~(1<<e),n&&f()}),(()=>{c|=1<<e}))));return n=!0,f(),function(){l(h),d()}}))}const st=()=>[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}],it=()=>[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],{loggedIn:rt}=n,ct=(t,e)=>{let n="";return t&&(n+=`/${t}`,e&&(n+=`/${e}`)),n},lt=async(t,e)=>{const n=ct(t,e);return(await axios.get("/api/comm/chat"+n)).data.filter((e=>t?e.event&&e.event._id===t:!e.event)).filter((t=>e?t.task&&t.task._id===e:!t.task))},{loggedIn:ut}=n,dt=async(t,e)=>[],pt=t("notification",at(!1)),ft=t("notifications_local",at([])),ht=t("communication_notification",at(!1)),gt=t("task_notification",at(!1)),mt=t("approval_notification",at(!1)),$t=t("attachment_notification",at(!1)),yt=at(!1),wt=t("settings",at({})),xt=(t("currentRoles",at()),at(Date.now()+1e7)),vt=ot(nt(Date.now(),(function(t){const e=setInterval((()=>{t(Date.now())}),6e4);return function(){clearInterval(e)}})),(t=>t>f(xt)));vt.subscribe((t=>{if(t)if((()=>{let t=_t.filter((t=>t._valid>Date.now()));_t=t,ft.set(_t),pt.set(!0)})(),_t.length>0){const t=_t.reduce(((t,e)=>t.__valid<e.__valid?t:e));xt.set(t.__valid)}else xt.set(Date.now()+1e7)}));const bt=[{type:"communication",desc:"Kommunikation",obj:ht},{type:"task",desc:"Aufgabe",obj:gt},{type:"approval",desc:"Visum",obj:mt},{type:"attachment",desc:"Dokument",obj:$t},{type:"workflow",desc:"Worfklow",obj:yt}],kt=(t,e=!1)=>{const n=f(wt).setting,a=n?.notificationActivated,o=n?.typesOfNotification,s=bt.find((e=>e.type===t.type));if(a&&o.find((t=>t===s?.desc))){const e=_t.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?_t[_t.indexOf(e[0])]=t:(_t.unshift(t),t.__valid<xt&&xt.set(t.__valid)),ft.set(_t),pt.set(!1)}e&&s?.obj.set(t)};let _t=[];let St=[{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"}];const Dt=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:a.item({x:0,y:0,w:4,h:5,customDragger:!0}),5:a.item({x:0,y:0,w:4,h:5,customDragger:!0}),4:a.item({x:0,y:0,w:3,h:5,customDragger:!0}),3:a.item({x:0,y:0,w:2,h:5,customDragger:!0}),2:a.item({x:0,y:0,w:1,h:5,customDragger:!0}),1:a.item({x:0,y:0,w:1,h:5,customDragger:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:a.item({x:4,y:0,w:1,h:5,customDragger:!0}),5:a.item({x:4,y:0,w:1,h:5,customDragger:!0}),4:a.item({x:3,y:0,w:1,h:5,customDragger:!0}),3:a.item({x:2,y:0,w:1,h:5,customDragger:!0}),2:a.item({x:1,y:0,w:1,h:5,customDragger:!0}),1:a.item({x:1,y:0,w:1,h:5,customDragger:!0})},{id:4444,name:"Feedback Modul",text:"Feedback",status:!1,6:a.item({x:5,y:0,w:1,h:5}),5:a.item({x:5,y:0,w:1,h:5}),4:a.item({x:4,y:0,w:1,h:5}),3:a.item({x:3,y:0,w:1,h:5}),2:a.item({x:2,y:0,w:1,h:5}),1:a.item({x:2,y:0,w:1,h:5})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:a.item({x:4,y:0,w:1,h:2}),5:a.item({x:4,y:0,w:1,h:2}),4:a.item({x:3,y:0,w:1,h:2}),3:a.item({x:2,y:0,w:1,h:2}),2:a.item({x:1,y:0,w:1,h:2}),1:a.item({x:1,y:0,w:1,h:2})}],{cacheValidator:Tt,onLogout:It}=n;e.interceptors.request.use((t=>(t.headers.enablerr=window.location.hostname,t))),e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(window.singleSpaNavigate("/error"),Promise.reject(t)):t));let Et=new Map;const jt=(t,e)=>(...n)=>{const a=f(Tt),o=window.localStorage.getItem("enablerr-tenant");"invalid"===a.status&&(Et=new Map,Tt.set({tenant:o,status:""}));const s=[].concat(o,e,n).join("-");let i=Et.get(s);if(!i)try{i=t(...n),Et.set(s,i)}catch(t){throw t}return i};var Nt={getSchema:jt((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`}))),"getSchema"),getSchemas:async()=>(await axios.get("/api/schema")).data,getSchemaByClass:jt((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data),"getSchemaByClass"),getEvents:jt((()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"}))),"getEvents"),getEvent:jt((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`}))),"getEvent"),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),getTaskList:(t,e)=>axios.get(`/api/task/${t}:${e}?display=list`).then((t=>t.data)).catch((t=>{})),getTasksList:t=>axios.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTasks:t=>axios.get(`/api/tasks/${t}?display=form`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:t=>axios.post("/api/read/_task",{_id:t}).then((t=>t.data[0])).catch((t=>{})),getTaskByDocId:t=>axios.post("/api/read/_task",{docId:t}).then((t=>t.data[0])).catch((t=>{})),getTaskqueue:(t=!1,e)=>axios.post("/api/taskqueue",{id:t,task:e}).then((t=>t.data)).catch((t=>{throw"queue not found"})),createTaskByEventId:t=>axios.post("/api/workflow/task",{event:t}).then((t=>t.data)).catch((t=>{})),saveData:async(t,e)=>(await axios.post(`/api/${t}`,e)).data,saveTemplate:async(t,e)=>(await axios.post(`/api/template/${t}`,e)).data,getPlanning:async(t,e,n)=>(await axios.get(`/api/planning/${t}/${e}/${n}`)).data,savePlanning:async(t,e)=>(await axios.post(`/api/planning/${t}`,e)).data,deletePlanning:async(t,e)=>(await axios.patch(`/api/planning/${t}`,e)).data,deleteTask:t=>axios.delete(`/api/_task/${t}`).then((t=>t.data)).catch((t=>{})),setTaskVisum:(t,e)=>axios.post(`/api/task/visum/${t}`,{visum:e}).then((t=>t.data)).catch((t=>{})),deleteTaskVisum:(t,e)=>axios.delete(`/api/task/visum/${t}/${e}`).then((t=>t.data)).catch((t=>{})),getTaskOptions:(t,e,n=!1)=>axios.get(`/api/task/${t}/${e}${n?"/recursive":""}`).then((t=>t.data)).catch((t=>{throw"docs not found"})),getLastId:(t,e)=>axios.get(`/api/task/${t}/lastId/${e}`).then((t=>t.data)).catch((t=>{throw"docs not found"})),getCumulatedSection:(t,e,n,a)=>axios.get(`/api/task/${t}/${fieldName}/section/${n}/${a}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSection:(t,e,n,a=!1)=>axios.post("/api/read/"+t,{[e]:n,status:!0,_unique:a}).then((t=>a?t.data.map((t=>({[a]:t}))):t.data)).catch((t=>{throw"internal error"})),getSectionView:(t,e,n=!1)=>(n&&(e._display="list"),axios.post("/api/read/"+t,e).then((t=>t.data)).catch((t=>{throw"internal error"}))),getCountedSection:(t,e,n,a,o)=>axios.get(`/api/task/${t}/${e}/${n}/count/${a}/${o}`).then((t=>t.data)).catch((t=>{throw"internal error"})),getSolitaire:t=>axios.post("/api/read/"+t).then((t=>t.data)).catch((t=>null)),getTemplate:t=>axios.post("/api/read/_template",{_className:t}).then((t=>t.data[0])).catch((t=>{})),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,deletePluginAndData:()=>axios.delete("/api/plugin"),getAuthStatus:async t=>(await axios.post("/api/auth/status",{email:t})).data,getUserSettings:t=>t?axios.get("/api/user/"+t).then((t=>t.data)):axios.get("/api/user").then((t=>t.data)),saveUserSettings:t=>axios.post("/api/user",t).then((t=>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:!1,dashboardLayout:[{id:"Standard",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"3333",position:""}]}],notificationActivated:!0,showNotifications:!0,notificationToMail:!1,typesOfNotification:["Aufgabe","Visum","Dokument"]}};return axios.post("/api/user",n).then((t=>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"),setTenant:async t=>axios.post("/api/auth/tenant",{id:t}).then((t=>t.data)).catch((t=>({status:!1}))),getAllChats:async()=>axios.get("/api/comm/chat").then((({data:t})=>t)),getChat:lt,saveChat:async(t,e,n)=>{const{user:a}=f(rt);let o=await lt(t,e);o[0]||(n.sender=a);const s=o[0]?"patch":"post",i=ct(t,e);return(await axios[s]("/api/comm/chat"+i,n)).data.id},getFeedback:dt,saveFeedback:async(t,e,n,a,o)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let i=await dt();if(i[0]&&null!=o){let t=i.filter((t=>t._id===o));t={...t,...a};const{user:e}=f(ut);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}{i={...s},i={...i,...a};const{user:t}=f(ut);return n.sender=t,i.messages=(i.messages||[]).concat(n),console.log("new feedback",i),(await axios.post("/api/commFeedback",i)).data.id}},getUserReports:async t=>(await axios.get("/api/userreport/list/"+t)).data,uploadUserReport:async(t,e)=>(await axios.post("/api/userreport/"+t,e)).data,deleteUserReport:async t=>(await axios.delete("/api/userreport/"+t)).data,getReport:async t=>(await axios.get(`/api/report/event/${t}`)).data,getReportDoc:async(t,e)=>(await axios.get(`/api/report/${t}/${e}`)).data,load:t=>axios.post("/api/neo4j",{taskId:t}).then((t=>t.data)).catch((t=>{throw"workflows not loaded"})),getDefaultModuleList:st,getDefaultLayout:it,getNotifications:t=>axios.get("/api/notification").then((async t=>{await new Promise((t=>setTimeout(t,2e3)));for(let e of t.data)kt(e,!1);return _t})),getNotificationsLocal:t=>_t,saveNotification:kt,updateNotification:t=>{let e=_t.filter((e=>e.id==t.id&&e.user==t.user));e.length>0?(_t[_t.indexOf(e[0])]=t,ft.set(_t)):kt(t,!1)},getNotificationTypes:jt((()=>axios.get("/api/notification/type").then((t=>t.data))),"getNotificationTypes"),getRoles:t=>St.filter((e=>e.user===t)),getModules:t=>Dt.filter((e=>t.includes(e.id))),getModuleName:t=>{const e=Dt.find((e=>e.id===Number(t)));return e?e.name:"Unbekanntes Modul"},getAllModules:()=>Dt};const Ct=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",Lt=t=>"function"==typeof t,Mt=t=>t&&t.toString,Pt=(t,...e)=>e.includes(t),Ft=t=>Pt(t,void 0,null),At=t=>!Ft(t),Ot=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Bt=t=>(e,...n)=>Ot(Ot("",t.toString),e,...n),Rt=(t,e=2,n=0,a=t.toString(),o=n.toString())=>o.repeat(e-a.length)+a,Vt=(t,e=window)=>({listen(n,a){e[`${n}EventListener`](t,a)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),qt=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||Ht(console.error,n))).every(Boolean),Ut=t=>(e,n)=>(Promise.resolve(n).then(e),t),zt=Ut(!0),Ht=Ut(!1);var Wt=Object.freeze({__proto__:null,decimalSeparator:Ct,isFunction:Lt,isStringable:Mt,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:Pt,isNullish:Ft,isNotNullish:At,bestValue:(t,...e)=>e.concat(t).find(At),tryCatch:Ot,ensureStrValue:Bt,padLeft:(...t)=>Bt(t[0])(Rt,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:Vt,isMissing:qt,go:zt,stop:Ht});t("util",Wt);const Kt="single-spa:routing-event",Gt=Vt(Kt);function Jt(t,{modulePath:e,update:n}){if(!1===n)return;if(qt({value:n,check:Lt,text:"<update> should be a function (dataListener)"},{value:e,check:Mt,text:"<modulePath> should be a string (dataListener)"}))return;const a=e.toString()||"/",o=e=>{const o=e.currentTarget.location.pathname,[,s,...i]=o.split("/");a===(s||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Gt.start(o),{destroy:()=>Gt.stop(o)}}const Qt=()=>window.dispatchEvent(new CustomEvent(Kt)),Xt=t=>({prop:4&t,tenant:8&t,user:8&t}),Yt=t=>({prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user}),Zt=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),te=t=>({err:t[12],prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user}),ee=t=>({prop:4&t,tenant:8&t,user:8&t}),ne=t=>({prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user}),ae=t=>({prop:4&t,tenant:8&t,user:8&t}),oe=t=>({prop:t[11],refresh:Qt,tenant:t[3].tenant,user:t[3].user});function se(t){let e;const n=t[8].init,a=h(n,t,t[7],Yt);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&m(a,n,t,t[7],o,Xt,Yt)},i(t){e||(U(a,t),e=!0)},o(t){z(a,t),e=!1},d(t){a&&a.d(t)}}}function ie(t){let e,n,a,o={ctx:t,current:null,token:null,hasCatch:!0,pending:le,then:ce,catch:re,value:11,error:12,blocks:[,,,]};return H(n=t[2],o),{c(){e=v(),o.block.c()},m(t,n){y(t,e,n),o.block.m(t,o.anchor=n),o.mount=()=>e.parentNode,o.anchor=e,a=!0},p(e,a){t=e,o.ctx=t,4&a&&n!==(n=t[2])&&H(n,o)||W(o,t,a)},i(t){a||(U(o.block),a=!0)},o(t){for(let t=0;t<3;t+=1){z(o.blocks[t])}a=!1},d(t){t&&w(e),o.block.d(t),o.token=null,o=null}}}function re(t){let e;const n=t[8].error,a=h(n,t,t[7],te);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&m(a,n,t,t[7],o,Zt,te)},i(t){e||(U(a,t),e=!0)},o(t){z(a,t),e=!1},d(t){a&&a.d(t)}}}function ce(t){let e;const n=t[8].default,a=h(n,t,t[7],ne);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&m(a,n,t,t[7],o,ee,ne)},i(t){e||(U(a,t),e=!0)},o(t){z(a,t),e=!1},d(t){a&&a.d(t)}}}function le(t){let e,n,a,o={ctx:t,current:null,token:null,hasCatch:!1,pending:pe,then:de,catch:ue,value:10,blocks:[,,,]};return H(n=t[5](t[1]),o),{c(){e=v(),o.block.c()},m(t,n){y(t,e,n),o.block.m(t,o.anchor=n),o.mount=()=>e.parentNode,o.anchor=e,a=!0},p(e,a){t=e,o.ctx=t,2&a&&n!==(n=t[5](t[1]))&&H(n,o)||W(o,t,a)},i(t){a||(U(o.block),a=!0)},o(t){for(let t=0;t<3;t+=1){z(o.blocks[t])}a=!1},d(t){t&&w(e),o.block.d(t),o.token=null,o=null}}}function ue(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function de(t){let e;const n=t[8].load,a=h(n,t,t[7],oe);return{c(){a&&a.c()},m(t,n){a&&a.m(t,n),e=!0},p(t,o){a&&a.p&&(!e||140&o)&&m(a,n,t,t[7],o,ae,oe)},i(t){e||(U(a,t),e=!0)},o(t){z(a,t),e=!1},d(t){a&&a.d(t)}}}function pe(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function fe(t){let e,n,a,o,i,r,c;const d=[ie,se],p=[];function f(t,e){return t[2]?0:1}return n=f(t),a=p[n]=d[n](t),{c(){e=x("section"),a.c(),k(e,"class","data")},m(a,l){var d;y(a,e,l),p[n].m(e,null),i=!0,r||(c=[(d=o=Jt.call(null,e,t[0]),d&&u(d.destroy)?d.destroy:s),b(e,"data",t[9])],r=!0)},p(t,[s]){let i=n;n=f(t),n===i?p[n].p(t,s):(V(),z(p[i],1,1,(()=>{p[i]=null})),q(),a=p[n],a?a.p(t,s):(a=p[n]=d[n](t),a.c()),U(a,1),a.m(e,null)),o&&u(o.update)&&1&s&&o.update.call(null,t[0])},i(t){i||(U(a),i=!0)},o(t){z(a),i=!1},d(t){t&&w(e),p[n].d(),r=!1,l(c)}}}function he(t,e,a){let o,{$$slots:s={},$$scope:i}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>a(3,o=t),t.$$.on_destroy.push(p(c,l));let u,{options:d}=e,{update:f=!1}=e,{loadingDelay:h=250}=e;f&&(d={update:f,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&a(0,d=t.options),"update"in t&&a(6,f=t.update),"loadingDelay"in t&&a(1,h=t.loadingDelay),"$$scope"in t&&a(7,i=t.$$scope)},[d,h,u,o,r,t=>new Promise((e=>setTimeout(e,t))),f,i,s,({detail:t})=>a(2,u=t.data)]}function ge(t){let e,n;const a=[{class:"full-width"},{style:t[0]},{inputClass:t[1]||t[5]},{multiline:!0},{readonly:t[6]},{id:t[2]},{value:t[3]},{rows:t[4]},t[10]];let o={};for(let t=0;t<a.length;t+=1)o=i(o,a[t]);return e=new t[7]({props:o}),e.$on("change",t[8]),e.$on("focus",t[9]),{c(){K(e.$$.fragment)},m(t,a){G(e,t,a),n=!0},p(t,[n]){const o=1151&n?function(t,e){const n={},a={},o={$$scope:1};let s=t.length;for(;s--;){const i=t[s],r=e[s];if(r){for(const t in i)t in r||(a[t]=1);for(const t in r)o[t]||(n[t]=r[t],o[t]=1);t[s]=r}else for(const t in i)o[t]=1}for(const t in a)t in n||(n[t]=void 0);return n}(a,[a[0],1&n&&{style:t[0]},34&n&&{inputClass:t[1]||t[5]},a[3],64&n&&{readonly:t[6]},4&n&&{id:t[2]},8&n&&{value:t[3]},16&n&&{rows:t[4]},1024&n&&(s=t[10],"object"==typeof s&&null!==s?s:{})]):{};var s;e.$set(o)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function me(t,e,n){const a=["noForm","id","value","style","rows","classId","readonly"];let s=$(e,a);const r=T(),{TextField:c}=o;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:p=""}=e,{rows:f=3}=e,{classId:h}=e,{readonly:g}=e;p+=" padding-bottom: .5em;";const m=5*(f>1),y=()=>{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=i(i({},e),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),n(10,s=$(e,a)),"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,p=t.style),"rows"in t&&n(4,f=t.rows),"classId"in t&&n(5,h=t.classId),"readonly"in t&&n(6,g=t.readonly)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(y)},[p,l,u,d,f,h,g,c,({detail:{value:t}})=>r("blur",{value:t}),()=>r("onFocus"),s]}class $e extends Y{constructor(t){super(),X(this,t,me,ge,d,{noForm:1,id:2,value:3,style:0,rows:4,classId:5,readonly:6})}}function ye(t){let e,n;return e=new $e({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){K(e.$$.fragment)},m(t,a){G(e,t,a),n=!0},p(t,[n]){const a={};1&n&&(a.id=t[0]),2&n&&(a.value=t[1]),e.$set(a)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function we(t,e,n){let{id:a}=e,{value:o}=e;return t.$$set=t=>{"id"in t&&n(0,a=t.id),"value"in t&&n(1,o=t.value)},[a,o]}class xe extends Y{constructor(t){super(),X(this,t,we,ye,d,{id:0,value:1})}}function ve(t){let e,n,a;function o(e){t[8](e)}let s={id:t[6]};return void 0!==t[3]&&(s.value=t[3]),e=new xe({props:s}),E.push((()=>function(t,e,n){const a=t.$$.props[e];void 0!==a&&(t.$$.bound[a]=n,n(t.$$.ctx[a]))}(e,"value",o))),{c(){K(e.$$.fragment)},m(t,n){G(e,t,n),a=!0},p(t,a){const o={};var s;!n&&8&a&&(n=!0,o.value=t[3],s=()=>n=!1,N.push(s)),e.$set(o)},i(t){a||(U(e.$$.fragment,t),a=!0)},o(t){z(e.$$.fragment,t),a=!1},d(t){J(e,t)}}}function be(t){let e,n;return e=new t[5]({props:{title:t[2],closeCallback:t[7],$$slots:{default:[ve]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(t,a){G(e,t,a),n=!0},p(t,n){const a={};4&n&&(a.title=t[2]),1032&n&&(a.$$scope={dirty:n,ctx:t}),e.$set(a)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function ke(t){let e,n;return e=new t[4]({props:{open:t[1],messages:t[0],$$slots:{default:[be]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(t,a){G(e,t,a),n=!0},p(t,[n]){const a={};2&n&&(a.open=t[1]),1&n&&(a.messages=t[0]),1036&n&&(a.$$scope={dirty:n,ctx:t}),e.$set(a)},i(t){n||(U(e.$$.fragment,t),n=!0)},o(t){z(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function _e(t,e,n){const a=T(),{Modal:s,Dialog:i}=o;let r,{title:c}=e,{messages:l=""}=e,{modalOpen:u=!1}=e;return t.$$set=t=>{"title"in t&&n(2,c=t.title),"messages"in t&&n(0,l=t.messages),"modalOpen"in t&&n(1,u=t.modalOpen)},t.$$.update=()=>{9&t.$$.dirty&&l&&(n(3,r=[].concat(l).join("\n")),r&&n(1,u=!0))},[l,u,c,r,s,i,"modalDialog",t=>{n(1,u=!1),n(3,r=""),n(0,l=""),a("change",u)},function(t){r=t,n(3,r),n(0,l)}]}t("version","0.2.93");const Se=window.sessionStorage;Se.clear();t("Storage",{getItem:t=>Se.getItem(t),setItem:(t,e)=>Se.setItem(t,e)});t("toasts",function(){const t=at([]);function e(e,n,a="default"){n||(n=3e3),t.update((t=>t.length>3?t:t=[...t,{id:"_"+Math.random().toString(36).substring(2,9),type:a,msg:e,timeout:n}]))}const n=ot(t,((e,n)=>{if(n(e),e&&e.length>0){const n=setTimeout((()=>{t.update((t=>(t.shift(),t)))}),e[0].timeout);return()=>{clearTimeout(n)}}})),{subscribe:a}=n;return{subscribe:a,send:e,default:(t,n)=>e(t,n,"default"),success:(t,n)=>e(t,n,"success"),failed:(t,n)=>e(t,n,"failed")}}()),t("LinkIcon",class extends Y{constructor(t){var e,n,a;super(),document.getElementById("svelte-1jng2dw-style")||((a=x("style")).id="svelte-1jng2dw-style",a.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=a,e.appendChild(n)),X(this,t,tt,Z,d,{title:0,link:3,color:1})}}),t("Page",class extends Y{constructor(t){super(),X(this,t,he,fe,d,{options:0,update:6,loadingDelay:1})}}),t("Request",Nt),t("TextArea",$e),t("ModalDialog",class extends Y{constructor(t){super(),X(this,t,_e,ke,d,{title:2,messages:0,modalOpen:1})}})}}}));
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.92",
4
+ "version": "0.2.93",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"