@budibase/server 1.3.11 → 1.3.12
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/builder/assets/{index.504401fd.js → index.a4ba55ba.js} +2 -2
- package/builder/index.html +1 -1
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/dist/api/routes/static.js +1 -1
- package/dist/package.json +6 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/api/routes/static.ts +1 -1
- package/src/api/routes/tests/static.spec.js +2 -2
|
@@ -801,7 +801,7 @@ ${r.map(i=>{let s=l[i];return s=typeof s=="object"&&!(s instanceof Date)?`"${JSO
|
|
|
801
801
|
</g>
|
|
802
802
|
</g>
|
|
803
803
|
</svg>
|
|
804
|
-
`;function d_e(r){let e,t,n;return t=new je({props:{justifyItems:"center",gap:"S",$$slots:{default:[h_e]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","center error svelte-ogzj7")},m(l,i){b(l,e,i),C(t,e,null),n=!0},p(l,i){const s={};i&268435472&&(s.$$scope={dirty:i,ctx:l}),t.$set(s)},i(l){n||(m(t.$$.fragment,l),n=!0)},o(l){_(t.$$.fragment,l),n=!1},d(l){l&&v(e),S(t)}}}function m_e(r){let e,t,n;return t=new as({}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","center svelte-ogzj7")},m(l,i){b(l,e,i),C(t,e,null),n=!0},p:Se,i(l){n||(m(t.$$.fragment,l),n=!0)},o(l){_(t.$$.fragment,l),n=!1},d(l){l&&v(e),S(t)}}}function g_e(r){let e;return{c(){e=U("App preview failed to load")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function __e(r){let e;return{c(){e=U(r[4])},m(t,n){b(t,e,n)},p(t,n){n&16&&ke(e,t[4])},d(t){t&&v(e)}}}function h_e(r){let e,t,n,l,i,s;return n=new mt({props:{size:"L",$$slots:{default:[g_e]},$$scope:{ctx:r}}}),i=new Ue({props:{size:"S",$$slots:{default:[__e]},$$scope:{ctx:r}}}),{c(){e=new nh(!1),t=N(),k(n.$$.fragment),l=N(),k(i.$$.fragment),e.a=t},m(o,a){e.m(p_e,o,a),b(o,t,a),C(n,o,a),b(o,l,a),C(i,o,a),s=!0},p(o,a){const u={};a&268435456&&(u.$$scope={dirty:a,ctx:o}),n.$set(u);const f={};a&268435472&&(f.$$scope={dirty:a,ctx:o}),i.$set(f)},i(o){s||(m(n.$$.fragment,o),m(i.$$.fragment,o),s=!0)},o(o){_(n.$$.fragment,o),_(i.$$.fragment,o),s=!1},d(o){o&&e.d(),o&&v(t),S(n,o),o&&v(l),S(i,o)}}}function $_e(r){let e;return{c(){e=U("Component")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function b_e(r){let e,t,n,l,i,s,o,a,u,f,c,p,d,g;const h=[m_e,d_e],$=[];function w(O,T){return O[3]?0:O[4]?1:-1}~(t=w(r))&&(n=$[t]=h[t](r)),u=new Je({props:{size:"XL",name:"Add",$$slots:{default:[$_e]},$$scope:{ctx:r}}});let A={title:"Confirm Deletion",body:"Are you sure you want to delete this component?",okText:"Delete component",onOk:r[6],onCancel:r[7]};return c=new Tr({props:A}),r[19](c),{c(){e=D("div"),n&&n.c(),l=N(),i=D("iframe"),o=N(),a=D("div"),k(u.$$.fragment),f=N(),k(c.$$.fragment),y(i,"title","componentPreview"),_n(i.src,s="/preview")||y(i,"src",s),y(i,"class","svelte-ogzj7"),ee(i,"hidden",r[3]||r[4]),ee(i,"tablet",r[0].previewDevice==="tablet"),ee(i,"mobile",r[0].previewDevice==="mobile"),y(a,"class","add-component svelte-ogzj7"),ee(a,"active",r[5]),y(e,"class","component-container svelte-ogzj7")},m(O,T){b(O,e,T),~t&&$[t].m(e,null),P(e,l),P(e,i),r[18](i),P(e,o),P(e,a),C(u,a,null),b(O,f,T),C(c,O,T),p=!0,d||(g=Ee(a,"click",r[8]),d=!0)},p(O,[T]){let I=t;t=w(O),t===I?~t&&$[t].p(O,T):(n&&(Z(),_($[I],1,1,()=>{$[I]=null}),x()),~t?(n=$[t],n?n.p(O,T):(n=$[t]=h[t](O),n.c()),m(n,1),n.m(e,l)):n=null),T&24&&ee(i,"hidden",O[3]||O[4]),T&1&&ee(i,"tablet",O[0].previewDevice==="tablet"),T&1&&ee(i,"mobile",O[0].previewDevice==="mobile");const L={};T&268435456&&(L.$$scope={dirty:T,ctx:O}),u.$set(L),T&32&&ee(a,"active",O[5]);const R={};c.$set(R)},i(O){p||(m(n),m(u.$$.fragment,O),m(c.$$.fragment,O),p=!0)},o(O){_(n),_(u.$$.fragment,O),_(c.$$.fragment,O),p=!1},d(O){O&&v(e),~t&&$[t].d(),r[18](null),S(u),O&&v(f),r[19](null),S(c,O),d=!1,g()}}}function v_e(r,e,t){let n,l,i,s,o,a,u,f,c;ue(r,He,F=>t(0,s=F)),ue(r,jn,F=>t(14,o=F)),ue(r,Yt,F=>t(21,a=F)),ue(r,Ql,F=>t(15,u=F)),ue(r,wa,F=>t(16,f=F)),ue(r,u4,F=>t(17,c=F));let p,d,g,h,$,w,A=!0,O;const T={READY:"ready",ERROR:"error",BUDIBASE:"type"},I=new $u().name("Screen Placeholder").route("/").component("@budibase/standard-components/screenslot").instanceName("Content Placeholder").normalStyle({flex:"1 1 auto"}).json(),L=F=>{p&&p.contentWindow.postMessage(F)},R=F=>{({[T.READY]:()=>{s.clientFeatures.messagePassing&&!A||(s.clientFeatures.intelligentLoading||t(3,A=!1),L(l))},[T.ERROR]:le=>{t(3,A=!1),t(4,O=le.error||"An unknown error occurred")}}[F.data.type]||j)(F)},j=async F=>{var le;const{type:W,data:X}=F.data||F.detail;if(!!W)try{if(W==="select-component"&&X.id)wn(He,s.selectedComponentId=X.id,s),f("./components")||a("./components");else if(W==="update-prop")await He.actions.components.updateSetting(X.prop,X.value);else if(W==="delete-component"&&X.id)B(X.id);else if(W==="key-down"){const{key:K,ctrlKey:J}=X;document.dispatchEvent(new KeyboardEvent("keydown",{key:K,ctrlKey:J}))}else if(W==="duplicate-component"&&X.id){const K=ut(tr).props,J=Br(K,X.id);He.actions.components.copy(J),await He.actions.components.paste(J)}else if(W==="preview-loaded")t(3,A=!1);else if(W==="move-component"){const{componentId:K,destinationComponentId:J}=X,ne=ut(tr).props,we=Br(ne,K),Be=Br(ne,J);if(Wi(we,J).map(be=>be._id).includes(X.destinationComponentId))return;we&&Be&&(He.actions.components.copy(we,!0),await He.actions.components.paste(Be,X.mode))}else if(W==="click-nav")f("./navigation")||a("./navigation");else if(W==="request-add-component")Y();else if(W==="highlight-setting"){He.actions.settings.highlight(X.setting);const K=`[data-cy="${X.setting}-prop-control"`,J=(le=document.querySelector(K))==null?void 0:le.parentElement;J&&J.scrollIntoView({behavior:"smooth",block:"center"})}else console.warn(`Client sent unknown event type: ${W}`)}catch(K){console.warn(K),ye.error("Error handling event from app preview")}},B=F=>{w=F,$.show()},z=async()=>{try{await He.actions.components.delete({_id:w})}catch{ye.error("Error deleting component")}w=null},V=()=>{w=null},Y=()=>{var F;if(i)a(`../${o._id}/components/${u==null?void 0:u._id}`);else{const W=(u==null?void 0:u._id)||((F=o==null?void 0:o.props)==null?void 0:F._id);a(`../${o._id}/components/${W}/new`)}};At(()=>{window.addEventListener("message",R),s.clientFeatures.messagePassing||(p.contentWindow.addEventListener("ready",()=>{R({data:{type:T.READY}})},{once:!0}),p.contentWindow.addEventListener("error",F=>{R({data:{type:T.ERROR,error:F.detail}})},{once:!0}),p.contentWindow.addEventListener("bb-event",j))}),ls(()=>{window.removeEventListener("message",R),p.contentWindow&&(s.clientFeatures.messagePassing||p.contentWindow.removeEventListener("bb-event",j))});function G(F){te[F?"unshift":"push"](()=>{p=F,t(1,p)})}function q(F){te[F?"unshift":"push"](()=>{$=F,t(2,$)})}return r.$$.update=()=>{var F,W,X;r.$$.dirty&214017&&(f("./layouts")?(t(10,g=I),t(9,d=c)):(t(10,g=o),t(9,d=s.layouts.find(le=>le._id===(g==null?void 0:g.layoutId))))),r.$$.dirty&65537&&(f("./components")?t(11,h=s.selectedComponentId):f("./navigation")?t(11,h="navigation"):t(11,h=null)),r.$$.dirty&3585&&t(13,n={appId:s.appId,layout:d,screen:g,selectedComponentId:h,theme:s.theme,customTheme:s.customTheme,previewDevice:s.previewDevice,messagePassing:s.clientFeatures.messagePassing,navigation:s.navigation,hiddenComponentIds:((F=s.componentToPaste)==null?void 0:F._id)&&((W=s.componentToPaste)==null?void 0:W.isCut)?[(X=s.componentToPaste)==null?void 0:X._id]:[],isBudibaseEvent:!0}),r.$$.dirty&8192&&t(12,l=JSON.stringify(n)),r.$$.dirty&4096&&L(l),r.$$.dirty&98304&&t(5,i=f(`./components/${u==null?void 0:u._id}/new`))},[s,p,$,A,O,i,z,V,Y,d,g,h,l,n,o,u,f,c,G,q]}class w_e extends oe{constructor(e){super();ae(this,e,v_e,b_e,re,{})}}function a7(r){let e,t;return e=new c_e({}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function u7(r){let e,t;return e=new w_e({}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p:Se,i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function y_e(r){let e,t,n,l,i,s,o,a,u=r[1].version,f;l=new Ke({props:{placeholder:null,options:r[0],getOptionLabel:k_e,getOptionValue:C_e,getOptionColour:r[2],value:r[1].selectedScreenId,quiet:!0,autoWidth:!0}}),l.$on("change",r[3]);let c=r[1].clientFeatures.devicePreview&&a7(),p=u7();return{c(){e=D("div"),t=D("div"),n=D("div"),k(l.$$.fragment),i=N(),s=D("div"),c&&c.c(),o=N(),a=D("div"),p.c(),y(n,"class","header-left svelte-wbewjv"),y(s,"class","header-right svelte-wbewjv"),y(t,"class","header svelte-wbewjv"),y(a,"class","content svelte-wbewjv"),y(e,"class","app-panel svelte-wbewjv")},m(d,g){b(d,e,g),P(e,t),P(t,n),C(l,n,null),P(t,i),P(t,s),c&&c.m(s,null),P(e,o),P(e,a),p.m(a,null),f=!0},p(d,[g]){const h={};g&1&&(h.options=d[0]),g&2&&(h.value=d[1].selectedScreenId),l.$set(h),d[1].clientFeatures.devicePreview?c?g&2&&m(c,1):(c=a7(),c.c(),m(c,1),c.m(s,null)):c&&(Z(),_(c,1,1,()=>{c=null}),x()),g&2&&re(u,u=d[1].version)?(Z(),_(p,1,1,Se),x(),p=u7(),p.c(),m(p,1),p.m(a,null)):p.p(d,g)},i(d){f||(m(l.$$.fragment,d),m(c),m(p),f=!0)},o(d){_(l.$$.fragment,d),_(c),_(p),f=!1},d(d){d&&v(e),S(l),c&&c.d(),p.d(d)}}}const k_e=r=>r.routing.route,C_e=r=>r._id;function S_e(r,e,t){let n,l;return ue(r,f4,o=>t(0,n=o)),ue(r,He,o=>t(1,l=o)),[n,l,o=>Xl(o.routing.roleId),o=>He.actions.screens.select(o.detail)]}class A_e extends oe{constructor(e){super();ae(this,e,S_e,y_e,re,{})}}function f7(r){let e,t;return e=new su({props:{icon:"Experience",tooltip:"Layouts",active:r[1]("./layouts")}}),e.$on("click",r[11]),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&2&&(i.active=n[1]("./layouts")),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function O_e(r){var p;let e,t,n,l,i,s,o,a,u,f;e=new su({props:{icon:"WebPage",tooltip:"Screens",active:r[1]("./screens")}}),e.$on("click",r[7]),n=new su({props:{icon:"ViewList",tooltip:"Components",active:r[1]("./components")}}),n.$on("click",r[8]),i=new su({props:{icon:"Brush",tooltip:"Theme",active:r[1]("./theme")}}),i.$on("click",r[9]),o=new su({props:{icon:"Link",tooltip:"Navigation",active:r[1]("./navigation")}}),o.$on("click",r[10]);let c=((p=r[0].layouts)==null?void 0:p.length)&&f7(r);return{c(){k(e.$$.fragment),t=N(),k(n.$$.fragment),l=N(),k(i.$$.fragment),s=N(),k(o.$$.fragment),a=N(),c&&c.c(),u=Te()},m(d,g){C(e,d,g),b(d,t,g),C(n,d,g),b(d,l,g),C(i,d,g),b(d,s,g),C(o,d,g),b(d,a,g),c&&c.m(d,g),b(d,u,g),f=!0},p(d,g){var O;const h={};g&2&&(h.active=d[1]("./screens")),e.$set(h);const $={};g&2&&($.active=d[1]("./components")),n.$set($);const w={};g&2&&(w.active=d[1]("./theme")),i.$set(w);const A={};g&2&&(A.active=d[1]("./navigation")),o.$set(A),((O=d[0].layouts)==null?void 0:O.length)?c?(c.p(d,g),g&1&&m(c,1)):(c=f7(d),c.c(),m(c,1),c.m(u.parentNode,u)):c&&(Z(),_(c,1,1,()=>{c=null}),x())},i(d){f||(m(e.$$.fragment,d),m(n.$$.fragment,d),m(i.$$.fragment,d),m(o.$$.fragment,d),m(c),f=!0)},o(d){_(e.$$.fragment,d),_(n.$$.fragment,d),_(i.$$.fragment,d),_(o.$$.fragment,d),_(c),f=!1},d(d){S(e,d),d&&v(t),S(n,d),d&&v(l),S(i,d),d&&v(s),S(o,d),d&&v(a),c&&c.d(d),d&&v(u)}}}function c7(r){let e,t,n;const l=r[6].default,i=bt(l,r,r[12],null);return t=new A_e({}),{c(){i&&i.c(),e=N(),k(t.$$.fragment)},m(s,o){i&&i.m(s,o),b(s,e,o),C(t,s,o),n=!0},p(s,o){i&&i.p&&(!n||o&4096)&&vt(i,l,s,s[12],n?yt(l,s[12],o,null):wt(s[12]),null)},i(s){n||(m(i,s),m(t.$$.fragment,s),n=!0)},o(s){_(i,s),_(t.$$.fragment,s),n=!1},d(s){i&&i.d(s),s&&v(e),S(t,s)}}}function I_e(r){let e,t,n,l,i,s;n=new zU({props:{$$slots:{default:[O_e]},$$scope:{ctx:r}}});let o=r[3]&&c7(r);return{c(){e=D("div"),t=D("div"),k(n.$$.fragment),l=N(),i=D("div"),o&&o.c(),y(t,"class","icon-nav svelte-4lszbe"),y(i,"class","content svelte-4lszbe"),y(e,"class","design svelte-4lszbe")},m(a,u){b(a,e,u),P(e,t),C(n,t,null),P(e,l),P(e,i),o&&o.m(i,null),s=!0},p(a,[u]){const f={};u&4103&&(f.$$scope={dirty:u,ctx:a}),n.$set(f),a[3]?o?(o.p(a,u),u&8&&m(o,1)):(o=c7(a),o.c(),m(o,1),o.m(i,null)):o&&(Z(),_(o,1,1,()=>{o=null}),x())},i(a){s||(m(n.$$.fragment,a),m(o),s=!0)},o(a){_(n.$$.fragment,a),_(o),s=!1},d(a){a&&v(e),S(n),o&&o.d()}}}function T_e(r,e,t){let n,l,i,s;ue(r,He,w=>t(0,n=w)),ue(r,jn,w=>t(3,s=w));let{$$slots:o={},$$scope:a}=e;const{isActive:u,goto:f}=Of;ue(r,u,w=>t(1,l=w)),ue(r,f,w=>t(2,i=w));const c=p1({urlParam:"screenId",stateKey:"selectedScreenId",validate:w=>n.screens.some(A=>A._id===w),fallbackUrl:"../../design",store:He,routify:Of});ls(c);const p=()=>i("./screens"),d=()=>i("./components"),g=()=>i("./theme"),h=()=>i("./navigation"),$=()=>i("./layouts");return r.$$set=w=>{"$$scope"in w&&t(12,a=w.$$scope)},[n,l,i,s,u,f,o,p,d,g,h,$,a]}class E_e extends oe{constructor(e){super();ae(this,e,T_e,I_e,re,{})}}var p7="/builder/assets/bb-space-man.5be51a45.svg";function d7(r){let e,t,n;return t=new je({props:{gap:"S",justifyItems:"center",$$slots:{default:[N_e]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","centered svelte-2q1gxp")},m(l,i){b(l,e,i),C(t,e,null),n=!0},p(l,i){const s={};i&32&&(s.$$scope={dirty:i,ctx:l}),t.$set(s)},i(l){n||(m(t.$$.fragment,l),n=!0)},o(l){_(t.$$.fragment,l),n=!1},d(l){l&&v(e),S(t)}}}function P_e(r){let e;return{c(){e=U("LET\u2019S BRING THIS APP TO LIFE")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function L_e(r){let e;return{c(){e=U("Create first screen")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function N_e(r){let e,t,n,l,i,s,o,a;return i=new Rr({props:{size:"L",$$slots:{default:[P_e]},$$scope:{ctx:r}}}),o=new rt({props:{size:"M",cta:!0,icon:"Add",$$slots:{default:[L_e]},$$scope:{ctx:r}}}),o.$on("click",r[1]),{c(){e=D("img"),n=N(),l=D("div"),k(i.$$.fragment),s=N(),k(o.$$.fragment),y(e,"class","img-size svelte-2q1gxp"),y(e,"alt","logo"),_n(e.src,t=p7)||y(e,"src",t),y(l,"class","new-screen-text svelte-2q1gxp")},m(u,f){b(u,e,f),b(u,n,f),b(u,l,f),C(i,l,null),b(u,s,f),C(o,u,f),a=!0},p(u,f){const c={};f&32&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const p={};f&32&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(m(i.$$.fragment,u),m(o.$$.fragment,u),a=!0)},o(u){_(i.$$.fragment,u),_(o.$$.fragment,u),a=!1},d(u){u&&v(e),u&&v(n),u&&v(l),S(i),u&&v(s),S(o,u)}}}function R_e(r){let e,t,n=r[0]&&d7(r);return{c(){n&&n.c(),e=Te()},m(l,i){n&&n.m(l,i),b(l,e,i),t=!0},p(l,[i]){l[0]?n?(n.p(l,i),i&1&&m(n,1)):(n=d7(l),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(Z(),_(n,1,1,()=>{n=null}),x())},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&v(e)}}}function M_e(r,e,t){let n,l,i;ue(r,He,a=>t(2,n=a)),ue(r,On,a=>t(3,l=a)),ue(r,jn,a=>t(4,i=a));let s=!1;const o=async()=>{let a=C1.create();a.routing.route="/home",a.routing.roldId=cu.BASIC,a.routing.homeScreen=!0;try{const u=await He.actions.screens.save(a);ye.success("Screen created successfully"),l(`./${u._id}`)}catch(u){console.error("Could not create screen",u),ye.error("Error creating screen")}};return At(()=>{var a;i?l(`./${i._id}`):((a=n.screens)==null?void 0:a.length)?l(`./${n.screens[0]._id}`):t(0,s=!0)}),[s,o]}class D_e extends oe{constructor(e){super();ae(this,e,M_e,R_e,re,{})}}function B_e(r){let e;const t=r[1].default,n=bt(t,r,r[0],null);return{c(){n&&n.c()},m(l,i){n&&n.m(l,i),e=!0},p(l,[i]){n&&n.p&&(!e||i&1)&&vt(n,t,l,l[0],e?yt(t,l[0],i,null):wt(l[0]),null)},i(l){e||(m(n,l),e=!0)},o(l){_(n,l),e=!1},d(l){n&&n.d(l)}}}function j_e(r,e,t){let{$$slots:n={},$$scope:l}=e;return r.$$set=i=>{"$$scope"in i&&t(0,l=i.$$scope)},[l,n]}class z_e extends oe{constructor(e){super();ae(this,e,j_e,B_e,re,{})}}function q_e(r){let e,t,n;function l(s){r[5](s)}let i={options:r[1],getOptionLabel:U_e,getOptionValue:F_e};return r[0]!==void 0&&(i.value=r[0]),e=new Ke({props:i}),te.push(()=>ce(e,"value",l)),e.$on("change",r[2]),{c(){k(e.$$.fragment)},m(s,o){C(e,s,o),n=!0},p(s,[o]){const a={};o&2&&(a.options=s[1]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){S(e,s)}}}const U_e=r=>r.name,F_e=r=>r._id;function V_e(r,e,t){let n,l;ue(r,Nt,f=>t(4,l=f));const i=ht();let{value:s}=e,{isTrigger:o}=e;const a=f=>{t(0,s=f.detail),i("change",f.detail)};function u(f){s=f,t(0,s)}return r.$$set=f=>{"value"in f&&t(0,s=f.value),"isTrigger"in f&&t(3,o=f.isTrigger)},r.$$.update=()=>{r.$$.dirty&24&&t(1,n=l.list.filter(f=>!o||f._id!==_i.USERS))},[s,n,a,o,l,u]}class H_e extends oe{constructor(e){super();ae(this,e,V_e,q_e,re,{value:0,isTrigger:3})}}function W_e(r){let e,t,n;var l=r[5]?to:Bn;function i(s){return{props:{panel:Gi,value:s[0][s[2]],label:s[2],type:"string",bindings:s[4],fillWidth:!0,allowJS:!0,updateOnChange:!1}}}return l&&(e=new l(i(r)),e.$on("change",r[12])),{c(){e&&k(e.$$.fragment),t=Te()},m(s,o){e&&C(e,s,o),b(s,t,o),n=!0},p(s,o){const a={};if(o&5&&(a.value=s[0][s[2]]),o&4&&(a.label=s[2]),o&16&&(a.bindings=s[4]),l!==(l=s[5]?to:Bn)){if(e){Z();const u=e;_(u.$$.fragment,1,0,()=>{S(u,1)}),x()}l?(e=new l(i(s)),e.$on("change",s[12]),k(e.$$.fragment),m(e.$$.fragment,1),C(e,t.parentNode,t)):e=null}else l&&e.$set(a)},i(s){n||(e&&m(e.$$.fragment,s),n=!0)},o(s){e&&_(e.$$.fragment,s),n=!1},d(s){s&&v(t),e&&S(e,s)}}}function G_e(r){let e,t,n;function l(s){r[11](s)}let i={schema:r[3]};return r[0][r[2]]!==void 0&&(i.linkedRows=r[0][r[2]]),e=new $w({props:i}),te.push(()=>ce(e,"linkedRows",l)),{c(){k(e.$$.fragment)},m(s,o){C(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.schema=s[3]),!t&&o&5&&(t=!0,a.linkedRows=s[0][s[2]],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){S(e,s)}}}function Y_e(r){let e,t,n;function l(s){r[10](s)}let i={label:r[2]};return r[0][r[2]]!==void 0&&(i.value=r[0][r[2]]),e=new Sl({props:i}),te.push(()=>ce(e,"value",l)),{c(){k(e.$$.fragment)},m(s,o){C(e,s,o),n=!0},p(s,o){const a={};o&4&&(a.label=s[2]),!t&&o&5&&(t=!0,a.value=s[0][s[2]],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){S(e,s)}}}function X_e(r){let e,t,n;function l(s){r[9](s)}let i={label:r[2],options:r[3].constraints.inclusion};return r[0][r[2]]!==void 0&&(i.value=r[0][r[2]]),e=new Li({props:i}),te.push(()=>ce(e,"value",l)),{c(){k(e.$$.fragment)},m(s,o){C(e,s,o),n=!0},p(s,o){const a={};o&4&&(a.label=s[2]),o&8&&(a.options=s[3].constraints.inclusion),!t&&o&5&&(t=!0,a.value=s[0][s[2]],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){S(e,s)}}}function J_e(r){let e,t;return e=new or({props:{text:r[2],value:r[0][r[2]]}}),e.$on("change",r[8]),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.text=n[2]),l&5&&(i.value=n[0][n[2]]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Q_e(r){let e,t;return e=new fs({props:{label:r[2],value:r[0][r[2]]}}),e.$on("change",r[7]),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.label=n[2]),l&5&&(i.value=n[0][n[2]]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function K_e(r){let e,t;return e=new Ke({props:{label:r[2],value:r[0][r[2]],options:r[3].constraints.inclusion}}),e.$on("change",r[6]),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.label=n[2]),l&5&&(i.value=n[0][n[2]]),l&8&&(i.options=n[3].constraints.inclusion),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Z_e(r){let e,t,n,l,i;const s=[K_e,Q_e,J_e,X_e,Y_e,G_e,W_e],o=[];function a(u,f){return f&8&&(e=null),e==null&&(e=!!(x_e(u[3])&&u[3].type!=="array")),e?0:u[3].type==="datetime"?1:u[3].type==="boolean"?2:u[3].type==="array"?3:u[3].type==="longform"?4:u[3].type==="link"?5:u[3].type==="string"||u[3].type==="number"?6:-1}return~(t=a(r,-1))&&(n=o[t]=s[t](r)),{c(){n&&n.c(),l=Te()},m(u,f){~t&&o[t].m(u,f),b(u,l,f),i=!0},p(u,[f]){let c=t;t=a(u,f),t===c?~t&&o[t].p(u,f):(n&&(Z(),_(o[c],1,1,()=>{o[c]=null}),x()),~t?(n=o[t],n?n.p(u,f):(n=o[t]=s[t](u),n.c()),m(n,1),n.m(l.parentNode,l)):n=null)},i(u){i||(m(n),i=!0)},o(u){_(n),i=!1},d(u){~t&&o[t].d(u),u&&v(l)}}}function x_e(r){var e,t;return!!((t=(e=r.constraints)==null?void 0:e.inclusion)==null?void 0:t.length)}function ehe(r,e,t){let{onChange:n}=e,{field:l}=e,{schema:i}=e,{value:s}=e,{bindings:o}=e,{isTestModal:a}=e;const u=$=>n($,l),f=$=>n($,l),c=$=>n($,l);function p($){r.$$.not_equal(s[l],$)&&(s[l]=$,t(0,s))}function d($){r.$$.not_equal(s[l],$)&&(s[l]=$,t(0,s))}function g($){r.$$.not_equal(s[l],$)&&(s[l]=$,t(0,s))}const h=$=>n($,l);return r.$$set=$=>{"onChange"in $&&t(1,n=$.onChange),"field"in $&&t(2,l=$.field),"schema"in $&&t(3,i=$.schema),"value"in $&&t(0,s=$.value),"bindings"in $&&t(4,o=$.bindings),"isTestModal"in $&&t(5,a=$.isTestModal)},[s,n,l,i,o,a,u,f,c,p,d,g,h]}class m7 extends oe{constructor(e){super();ae(this,e,ehe,Z_e,re,{onChange:1,field:2,schema:3,value:0,bindings:4,isTestModal:5})}}function g7(r,e,t){const n=r.slice();return n[14]=e[t][0],n[15]=e[t][1],n}function _7(r){let e,t,n=r[3],l=[];for(let s=0;s<n.length;s+=1)l[s]=b7(g7(r,n,s));const i=s=>_(l[s],1,1,()=>{l[s]=null});return{c(){e=D("div");for(let s=0;s<l.length;s+=1)l[s].c();y(e,"class","schema-fields svelte-qnw5bo")},m(s,o){b(s,e,o);for(let a=0;a<l.length;a+=1)l[a].m(e,null);t=!0},p(s,o){if(o&367){n=s[3];let a;for(a=0;a<n.length;a+=1){const u=g7(s,n,a);l[a]?(l[a].p(u,o),m(l[a],1)):(l[a]=b7(u),l[a].c(),m(l[a],1),l[a].m(e,null))}for(Z(),a=n.length;a<l.length;a+=1)i(a);x()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(l[o]);t=!0}},o(s){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)_(l[o]);t=!1},d(s){s&&v(e),st(l,s)}}}function h7(r){let e,t,n=r[15].type!=="attachment"&&$7(r);return{c(){n&&n.c(),e=Te()},m(l,i){n&&n.m(l,i),b(l,e,i),t=!0},p(l,i){l[15].type!=="attachment"?n?(n.p(l,i),i&8&&m(n,1)):(n=$7(l),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(Z(),_(n,1,1,()=>{n=null}),x())},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&v(e)}}}function $7(r){let e,t,n,l;const i=[nhe,the],s=[];function o(a,u){return a[5]?1:0}return e=o(r),t=s[e]=i[e](r),{c(){t.c(),n=Te()},m(a,u){s[e].m(a,u),b(a,n,u),l=!0},p(a,u){let f=e;e=o(a),e===f?s[e].p(a,u):(Z(),_(s[f],1,1,()=>{s[f]=null}),x(),t=s[e],t?t.p(a,u):(t=s[e]=i[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){l||(m(t),l=!0)},o(a){_(t),l=!1},d(a){s[e].d(a),a&&v(n)}}}function the(r){let e,t,n;function l(...o){return r[11](r[14],r[15],...o)}var i=r[2]?to:Bn;function s(o){return{props:{placeholder:o[6][o[15].type],panel:Gi,value:Array.isArray(o[0][o[14]])?o[0][o[14]].join(" "):o[0][o[14]],label:o[14],type:"string",bindings:o[1],fillWidth:!0,allowJS:!0,updateOnChange:!1}}}return i&&(e=new i(s(r)),e.$on("change",l)),{c(){e&&k(e.$$.fragment),t=Te()},m(o,a){e&&C(e,o,a),b(o,t,a),n=!0},p(o,a){r=o;const u={};if(a&8&&(u.placeholder=r[6][r[15].type]),a&9&&(u.value=Array.isArray(r[0][r[14]])?r[0][r[14]].join(" "):r[0][r[14]]),a&8&&(u.label=r[14]),a&2&&(u.bindings=r[1]),i!==(i=r[2]?to:Bn)){if(e){Z();const f=e;_(f.$$.fragment,1,0,()=>{S(f,1)}),x()}i?(e=new i(s(r)),e.$on("change",l),k(e.$$.fragment),m(e.$$.fragment,1),C(e,t.parentNode,t)):e=null}else i&&e.$set(u)},i(o){n||(e&&m(e.$$.fragment,o),n=!0)},o(o){e&&_(e.$$.fragment,o),n=!1},d(o){o&&v(t),e&&S(e,o)}}}function nhe(r){let e,t;return e=new m7({props:{isTestModal:r[2],field:r[14],schema:r[15],bindings:r[1],value:r[0],onChange:r[8]}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.isTestModal=n[2]),l&8&&(i.field=n[14]),l&8&&(i.schema=n[15]),l&2&&(i.bindings=n[1]),l&1&&(i.value=n[0]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function b7(r){let e,t,n=!r[15].autocolumn&&h7(r);return{c(){n&&n.c(),e=Te()},m(l,i){n&&n.m(l,i),b(l,e,i),t=!0},p(l,i){l[15].autocolumn?n&&(Z(),_(n,1,1,()=>{n=null}),x()):n?(n.p(l,i),i&8&&m(n,1)):(n=h7(l),n.c(),m(n,1),n.m(e.parentNode,e))},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&v(e)}}}function rhe(r){let e,t,n,l;e=new Ke({props:{value:r[0].tableId,options:r[4].list,getOptionLabel:lhe,getOptionValue:ihe}}),e.$on("change",r[7]);let i=r[3].length&&_7(r);return{c(){k(e.$$.fragment),t=N(),i&&i.c(),n=Te()},m(s,o){C(e,s,o),b(s,t,o),i&&i.m(s,o),b(s,n,o),l=!0},p(s,[o]){const a={};o&1&&(a.value=s[0].tableId),o&16&&(a.options=s[4].list),e.$set(a),s[3].length?i?(i.p(s,o),o&8&&m(i,1)):(i=_7(s),i.c(),m(i,1),i.m(n.parentNode,n)):i&&(Z(),_(i,1,1,()=>{i=null}),x())},i(s){l||(m(e.$$.fragment,s),m(i),l=!0)},o(s){_(e.$$.fragment,s),_(i),l=!1},d(s){S(e,s),s&&v(t),i&&i.d(s),s&&v(n)}}}const lhe=r=>r.name,ihe=r=>r._id;function she(r,e,t){let n,l;ue(r,Nt,w=>t(4,l=w));const i=ht();let{value:s}=e,{bindings:o}=e,{block:a}=e,{isTestModal:u}=e,f,c,p={number:10,boolean:"true",datetime:"2022-02-16T12:00:00.000Z ",options:"1",array:"1 2 3 4",link:"ro_ta_123_456",longform:"long form text"};const d=w=>{t(0,s.tableId=w.detail,s),i("change",s)},g=(w,A)=>new RegExp(/{{([^{].*?)}}/g).test(w)?w:A==="boolean"?typeof w=="boolean"?w:w==="true":A==="number"?typeof w=="number"?w:Number(w):A==="options"?[w]:A==="array"?Array.isArray(w)?w:w.split(",").map(T=>T.trim()):A==="link"?Array.isArray(w)?w:[w]:w,h=(w,A,O)=>{t(0,s[A]=g(w.detail,O),s),i("change",s)},$=(w,A,O)=>h(O,w,A.type);return r.$$set=w=>{"value"in w&&t(0,s=w.value),"bindings"in w&&t(1,o=w.bindings),"block"in w&&t(9,a=w.block),"isTestModal"in w&&t(2,u=w.isTestModal)},r.$$.update=()=>{var w;r.$$.dirty&512&&t(5,n=a.rowControl),r.$$.dirty&1049&&(t(10,f=l.list.find(A=>A._id===(s==null?void 0:s.tableId))),t(3,c=Object.entries((w=f==null?void 0:f.schema)!=null?w:{})),c.map(([,A])=>{!A.autocolumn&&!s[A.name]&&t(0,s[A.name]="",s)})),r.$$.dirty&1&&(s==null?void 0:s.tableId)==null&&t(0,s={tableId:""})},[s,o,u,c,l,n,p,d,h,a,f,$]}class ohe extends oe{constructor(e){super();ae(this,e,she,rhe,re,{value:0,bindings:1,block:9,isTestModal:2})}}function v7(r,e,t){const n=r.slice();return n[9]=e[t][0],n[10]=e[t][1],n}function w7(r){let e,t,n=r[3],l=[];for(let s=0;s<n.length;s+=1)l[s]=y7(v7(r,n,s));const i=s=>_(l[s],1,1,()=>{l[s]=null});return{c(){e=D("div");for(let s=0;s<l.length;s+=1)l[s].c();y(e,"class","schema-fields svelte-qnw5bo")},m(s,o){b(s,e,o);for(let a=0;a<l.length;a+=1)l[a].m(e,null);t=!0},p(s,o){if(o&31){n=s[3];let a;for(a=0;a<n.length;a+=1){const u=v7(s,n,a);l[a]?(l[a].p(u,o),m(l[a],1)):(l[a]=y7(u),l[a].c(),m(l[a],1),l[a].m(e,null))}for(Z(),a=n.length;a<l.length;a+=1)i(a);x()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(l[o]);t=!0}},o(s){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)_(l[o]);t=!1},d(s){s&&v(e),st(l,s)}}}function y7(r){let e,t;return e=new m7({props:{isTestModal:r[2],field:r[9],schema:r[10],bindings:r[1],value:r[0],onChange:r[4]}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.isTestModal=n[2]),l&8&&(i.field=n[9]),l&8&&(i.schema=n[10]),l&2&&(i.bindings=n[1]),l&1&&(i.value=n[0]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function ahe(r){let e,t,n=r[3].length&&r[2]&&w7(r);return{c(){n&&n.c(),e=Te()},m(l,i){n&&n.m(l,i),b(l,e,i),t=!0},p(l,[i]){l[3].length&&l[2]?n?(n.p(l,i),i&12&&m(n,1)):(n=w7(l),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(Z(),_(n,1,1,()=>{n=null}),x())},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&v(e)}}}function uhe(r,e,t){const n=ht();let{value:l}=e,{bindings:i}=e,{block:s}=e,{isTestModal:o}=e,a;const u={BOOLEAN:null,NUMBER:null,DATETIME:null,STRING:"",OPTIONS:[],ARRAY:[]},f=(p,d)=>new RegExp(/{{([^{].*?)}}/g).test(p)?p:d==="boolean"?typeof p=="boolean"?p:p==="true":d==="number"?typeof p=="number"?p:Number(p):d==="options"?[p]:d==="array"?Array.isArray(p)?p:p.split(",").map(h=>h.trim()):d==="link"?Array.isArray(p)?p:[p]:p,c=(p,d,g)=>{t(0,l[d]=f(p.detail,g),l),n("change",l)};return r.$$set=p=>{"value"in p&&t(0,l=p.value),"bindings"in p&&t(1,i=p.bindings),"block"in p&&t(5,s=p.block),"isTestModal"in p&&t(2,o=p.isTestModal)},r.$$.update=()=>{var p,d;if(r.$$.dirty&33){let g={};for(const[h,$]of Object.entries((d=(p=s==null?void 0:s.inputs)==null?void 0:p.fields)!=null?d:{}))g=nt(Le({},g),{[h]:{type:$,name:h,fieldName:h,constraints:{type:$}}}),l[h]===$&&t(0,l[h]=u[$.toUpperCase()],l);t(3,a=Object.entries(g))}},[l,i,o,a,c,s]}class fhe extends oe{constructor(e){super();ae(this,e,uhe,ahe,re,{value:0,bindings:1,block:5,isTestModal:2})}}function k7(r,e,t){const n=r.slice();return n[9]=e[t],n}function C7(r){let e,t,n,l,i,s,o,a,u;t=new ot({props:{value:r[9].name,secondary:!0,placeholder:"Enter field name",updateOnChange:!1}}),t.$on("change",function(){pt(r[6](r[9].name))&&r[6](r[9].name).apply(this,arguments)});function f(...p){return r[7](r[9],...p)}l=new Ke({props:{value:r[9].type,options:r[3]}}),l.$on("change",f);function c(){return r[8](r[9])}return{c(){e=D("div"),k(t.$$.fragment),n=N(),k(l.$$.fragment),i=N(),s=D("i"),y(s,"class","remove-field ri-delete-bin-line"),y(e,"class","field svelte-12q6c1o")},m(p,d){b(p,e,d),C(t,e,null),P(e,n),C(l,e,null),P(e,i),P(e,s),o=!0,a||(u=Ee(s,"click",c),a=!0)},p(p,d){r=p;const g={};d&2&&(g.value=r[9].name),t.$set(g);const h={};d&2&&(h.value=r[9].type),l.$set(h)},i(p){o||(m(t.$$.fragment,p),m(l.$$.fragment,p),o=!0)},o(p){_(t.$$.fragment,p),_(l.$$.fragment,p),o=!1},d(p){p&&v(e),S(t),S(l),a=!1,u()}}}function che(r){let e;return{c(){e=U("Add field")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function phe(r){let e,t,n,l,i,s,o=r[1],a=[];for(let f=0;f<o.length;f+=1)a[f]=C7(k7(r,o,f));const u=f=>_(a[f],1,1,()=>{a[f]=null});return i=new rt({props:{quiet:!0,secondary:!0,icon:"Add",$$slots:{default:[che]},$$scope:{ctx:r}}}),i.$on("click",r[4]),{c(){e=D("div"),t=D("div"),n=N();for(let f=0;f<a.length;f+=1)a[f].c();l=N(),k(i.$$.fragment),y(t,"class","spacer svelte-12q6c1o"),y(e,"class","root svelte-12q6c1o")},m(f,c){b(f,e,c),P(e,t),P(e,n);for(let p=0;p<a.length;p+=1)a[p].m(e,null);P(e,l),C(i,e,null),s=!0},p(f,[c]){if(c&111){o=f[1];let d;for(d=0;d<o.length;d+=1){const g=k7(f,o,d);a[d]?(a[d].p(g,c),m(a[d],1)):(a[d]=C7(g),a[d].c(),m(a[d],1),a[d].m(e,l))}for(Z(),d=o.length;d<a.length;d+=1)u(d);x()}const p={};c&4096&&(p.$$scope={dirty:c,ctx:f}),i.$set(p)},i(f){if(!s){for(let c=0;c<o.length;c+=1)m(a[c]);m(i.$$.fragment,f),s=!0}},o(f){a=a.filter(Boolean);for(let c=0;c<a.length;c+=1)_(a[c]);_(i.$$.fragment,f),s=!1},d(f){f&&v(e),st(a,f),S(i)}}}function dhe(r,e,t){let n;const l=ht();let{value:i={}}=e;const s=[{label:"Text",value:"string"},{label:"Number",value:"number"},{label:"Boolean",value:"boolean"},{label:"DateTime",value:"datetime"},{label:"Array",value:"array"}];function o(){const p=Le({},i);p[""]="string",l("change",p)}function a(p){const d=Le({},i);delete d[p],l("change",d)}const u=p=>d=>{let g=[...n];const h=d.detail;h?g.find($=>$.name===p).name=h:g=g.filter($=>$.name!==p),t(0,i=g.reduce(($,w)=>($[w.name]=w.type,$),{})),l("change",i)},f=(p,d)=>{t(0,i[p.name]=d.detail,i),l("change",i)},c=p=>a(p.name);return r.$$set=p=>{"value"in p&&t(0,i=p.value)},r.$$.update=()=>{r.$$.dirty&1&&t(1,n=i?Object.entries(i).map(([p,d])=>({name:p,type:d})):[])},[i,n,l,s,o,a,u,f,c]}class mhe extends oe{constructor(e){super();ae(this,e,dhe,phe,re,{value:0})}}function ghe(r){let e,t,n,l,i,s,o,a;return t=new ot({props:{readonly:!0,value:r[1],label:r[0]}}),i=new Je({props:{size:"S",name:"Copy"}}),{c(){e=D("div"),k(t.$$.fragment),n=N(),l=D("div"),k(i.$$.fragment),y(l,"class","icon svelte-bmyadj"),y(e,"data-cy",r[2]),y(e,"class","svelte-bmyadj")},m(u,f){b(u,e,f),C(t,e,null),P(e,n),P(e,l),C(i,l,null),s=!0,o||(a=Ee(l,"click",r[4]),o=!0)},p(u,[f]){const c={};f&2&&(c.value=u[1]),f&1&&(c.label=u[0]),t.$set(c),(!s||f&4)&&y(e,"data-cy",u[2])},i(u){s||(m(t.$$.fragment,u),m(i.$$.fragment,u),s=!0)},o(u){_(t.$$.fragment,u),_(i.$$.fragment,u),s=!1},d(u){u&&v(e),S(t),S(i),o=!1,a()}}}function _he(r,e,t){let{label:n=null}=e,{value:l}=e,{dataCy:i=null}=e;const s=a=>{const u=document.createElement("textarea");document.body.appendChild(u),u.value=a,u.select(),document.execCommand("copy"),document.body.removeChild(u),ye.success("URL copied to clipboard")},o=()=>s(l);return r.$$set=a=>{"label"in a&&t(0,n=a.label),"value"in a&&t(1,l=a.value),"dataCy"in a&&t(2,i=a.dataCy)},[n,l,i,s,o]}class S1 extends oe{constructor(e){super();ae(this,e,_he,ghe,re,{label:0,value:1,dataCy:2})}}function hhe(r){let e,t;return e=new S1({props:{value:S7(r[0])}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,[l]){const i={};l&1&&(i.value=S7(n[0])),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function S7(r){return r?`${window.location.origin}/${r}`:""}function $he(r,e,t){let{value:n}=e;return r.$$set=l=>{"value"in l&&t(0,n=l.value)},[n]}class A7 extends oe{constructor(e){super();ae(this,e,$he,hhe,re,{value:0})}}function O7(r){let e,t,n,l,i=(r[2]>1?"s":"")+"",s,o;return{c(){e=D("p"),t=U(`Request received! We found
|
|
804
|
+
`;function d_e(r){let e,t,n;return t=new je({props:{justifyItems:"center",gap:"S",$$slots:{default:[h_e]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","center error svelte-ogzj7")},m(l,i){b(l,e,i),C(t,e,null),n=!0},p(l,i){const s={};i&268435472&&(s.$$scope={dirty:i,ctx:l}),t.$set(s)},i(l){n||(m(t.$$.fragment,l),n=!0)},o(l){_(t.$$.fragment,l),n=!1},d(l){l&&v(e),S(t)}}}function m_e(r){let e,t,n;return t=new as({}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","center svelte-ogzj7")},m(l,i){b(l,e,i),C(t,e,null),n=!0},p:Se,i(l){n||(m(t.$$.fragment,l),n=!0)},o(l){_(t.$$.fragment,l),n=!1},d(l){l&&v(e),S(t)}}}function g_e(r){let e;return{c(){e=U("App preview failed to load")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function __e(r){let e;return{c(){e=U(r[4])},m(t,n){b(t,e,n)},p(t,n){n&16&&ke(e,t[4])},d(t){t&&v(e)}}}function h_e(r){let e,t,n,l,i,s;return n=new mt({props:{size:"L",$$slots:{default:[g_e]},$$scope:{ctx:r}}}),i=new Ue({props:{size:"S",$$slots:{default:[__e]},$$scope:{ctx:r}}}),{c(){e=new nh(!1),t=N(),k(n.$$.fragment),l=N(),k(i.$$.fragment),e.a=t},m(o,a){e.m(p_e,o,a),b(o,t,a),C(n,o,a),b(o,l,a),C(i,o,a),s=!0},p(o,a){const u={};a&268435456&&(u.$$scope={dirty:a,ctx:o}),n.$set(u);const f={};a&268435472&&(f.$$scope={dirty:a,ctx:o}),i.$set(f)},i(o){s||(m(n.$$.fragment,o),m(i.$$.fragment,o),s=!0)},o(o){_(n.$$.fragment,o),_(i.$$.fragment,o),s=!1},d(o){o&&e.d(),o&&v(t),S(n,o),o&&v(l),S(i,o)}}}function $_e(r){let e;return{c(){e=U("Component")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function b_e(r){let e,t,n,l,i,s,o,a,u,f,c,p,d,g;const h=[m_e,d_e],$=[];function w(O,T){return O[3]?0:O[4]?1:-1}~(t=w(r))&&(n=$[t]=h[t](r)),u=new Je({props:{size:"XL",name:"Add",$$slots:{default:[$_e]},$$scope:{ctx:r}}});let A={title:"Confirm Deletion",body:"Are you sure you want to delete this component?",okText:"Delete component",onOk:r[6],onCancel:r[7]};return c=new Tr({props:A}),r[19](c),{c(){e=D("div"),n&&n.c(),l=N(),i=D("iframe"),o=N(),a=D("div"),k(u.$$.fragment),f=N(),k(c.$$.fragment),y(i,"title","componentPreview"),_n(i.src,s="/app/preview")||y(i,"src",s),y(i,"class","svelte-ogzj7"),ee(i,"hidden",r[3]||r[4]),ee(i,"tablet",r[0].previewDevice==="tablet"),ee(i,"mobile",r[0].previewDevice==="mobile"),y(a,"class","add-component svelte-ogzj7"),ee(a,"active",r[5]),y(e,"class","component-container svelte-ogzj7")},m(O,T){b(O,e,T),~t&&$[t].m(e,null),P(e,l),P(e,i),r[18](i),P(e,o),P(e,a),C(u,a,null),b(O,f,T),C(c,O,T),p=!0,d||(g=Ee(a,"click",r[8]),d=!0)},p(O,[T]){let I=t;t=w(O),t===I?~t&&$[t].p(O,T):(n&&(Z(),_($[I],1,1,()=>{$[I]=null}),x()),~t?(n=$[t],n?n.p(O,T):(n=$[t]=h[t](O),n.c()),m(n,1),n.m(e,l)):n=null),T&24&&ee(i,"hidden",O[3]||O[4]),T&1&&ee(i,"tablet",O[0].previewDevice==="tablet"),T&1&&ee(i,"mobile",O[0].previewDevice==="mobile");const L={};T&268435456&&(L.$$scope={dirty:T,ctx:O}),u.$set(L),T&32&&ee(a,"active",O[5]);const R={};c.$set(R)},i(O){p||(m(n),m(u.$$.fragment,O),m(c.$$.fragment,O),p=!0)},o(O){_(n),_(u.$$.fragment,O),_(c.$$.fragment,O),p=!1},d(O){O&&v(e),~t&&$[t].d(),r[18](null),S(u),O&&v(f),r[19](null),S(c,O),d=!1,g()}}}function v_e(r,e,t){let n,l,i,s,o,a,u,f,c;ue(r,He,F=>t(0,s=F)),ue(r,jn,F=>t(14,o=F)),ue(r,Yt,F=>t(21,a=F)),ue(r,Ql,F=>t(15,u=F)),ue(r,wa,F=>t(16,f=F)),ue(r,u4,F=>t(17,c=F));let p,d,g,h,$,w,A=!0,O;const T={READY:"ready",ERROR:"error",BUDIBASE:"type"},I=new $u().name("Screen Placeholder").route("/").component("@budibase/standard-components/screenslot").instanceName("Content Placeholder").normalStyle({flex:"1 1 auto"}).json(),L=F=>{p&&p.contentWindow.postMessage(F)},R=F=>{({[T.READY]:()=>{s.clientFeatures.messagePassing&&!A||(s.clientFeatures.intelligentLoading||t(3,A=!1),L(l))},[T.ERROR]:le=>{t(3,A=!1),t(4,O=le.error||"An unknown error occurred")}}[F.data.type]||j)(F)},j=async F=>{var le;const{type:W,data:X}=F.data||F.detail;if(!!W)try{if(W==="select-component"&&X.id)wn(He,s.selectedComponentId=X.id,s),f("./components")||a("./components");else if(W==="update-prop")await He.actions.components.updateSetting(X.prop,X.value);else if(W==="delete-component"&&X.id)B(X.id);else if(W==="key-down"){const{key:K,ctrlKey:J}=X;document.dispatchEvent(new KeyboardEvent("keydown",{key:K,ctrlKey:J}))}else if(W==="duplicate-component"&&X.id){const K=ut(tr).props,J=Br(K,X.id);He.actions.components.copy(J),await He.actions.components.paste(J)}else if(W==="preview-loaded")t(3,A=!1);else if(W==="move-component"){const{componentId:K,destinationComponentId:J}=X,ne=ut(tr).props,we=Br(ne,K),Be=Br(ne,J);if(Wi(we,J).map(be=>be._id).includes(X.destinationComponentId))return;we&&Be&&(He.actions.components.copy(we,!0),await He.actions.components.paste(Be,X.mode))}else if(W==="click-nav")f("./navigation")||a("./navigation");else if(W==="request-add-component")Y();else if(W==="highlight-setting"){He.actions.settings.highlight(X.setting);const K=`[data-cy="${X.setting}-prop-control"`,J=(le=document.querySelector(K))==null?void 0:le.parentElement;J&&J.scrollIntoView({behavior:"smooth",block:"center"})}else console.warn(`Client sent unknown event type: ${W}`)}catch(K){console.warn(K),ye.error("Error handling event from app preview")}},B=F=>{w=F,$.show()},z=async()=>{try{await He.actions.components.delete({_id:w})}catch{ye.error("Error deleting component")}w=null},V=()=>{w=null},Y=()=>{var F;if(i)a(`../${o._id}/components/${u==null?void 0:u._id}`);else{const W=(u==null?void 0:u._id)||((F=o==null?void 0:o.props)==null?void 0:F._id);a(`../${o._id}/components/${W}/new`)}};At(()=>{window.addEventListener("message",R),s.clientFeatures.messagePassing||(p.contentWindow.addEventListener("ready",()=>{R({data:{type:T.READY}})},{once:!0}),p.contentWindow.addEventListener("error",F=>{R({data:{type:T.ERROR,error:F.detail}})},{once:!0}),p.contentWindow.addEventListener("bb-event",j))}),ls(()=>{window.removeEventListener("message",R),p.contentWindow&&(s.clientFeatures.messagePassing||p.contentWindow.removeEventListener("bb-event",j))});function G(F){te[F?"unshift":"push"](()=>{p=F,t(1,p)})}function q(F){te[F?"unshift":"push"](()=>{$=F,t(2,$)})}return r.$$.update=()=>{var F,W,X;r.$$.dirty&214017&&(f("./layouts")?(t(10,g=I),t(9,d=c)):(t(10,g=o),t(9,d=s.layouts.find(le=>le._id===(g==null?void 0:g.layoutId))))),r.$$.dirty&65537&&(f("./components")?t(11,h=s.selectedComponentId):f("./navigation")?t(11,h="navigation"):t(11,h=null)),r.$$.dirty&3585&&t(13,n={appId:s.appId,layout:d,screen:g,selectedComponentId:h,theme:s.theme,customTheme:s.customTheme,previewDevice:s.previewDevice,messagePassing:s.clientFeatures.messagePassing,navigation:s.navigation,hiddenComponentIds:((F=s.componentToPaste)==null?void 0:F._id)&&((W=s.componentToPaste)==null?void 0:W.isCut)?[(X=s.componentToPaste)==null?void 0:X._id]:[],isBudibaseEvent:!0}),r.$$.dirty&8192&&t(12,l=JSON.stringify(n)),r.$$.dirty&4096&&L(l),r.$$.dirty&98304&&t(5,i=f(`./components/${u==null?void 0:u._id}/new`))},[s,p,$,A,O,i,z,V,Y,d,g,h,l,n,o,u,f,c,G,q]}class w_e extends oe{constructor(e){super();ae(this,e,v_e,b_e,re,{})}}function a7(r){let e,t;return e=new c_e({}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function u7(r){let e,t;return e=new w_e({}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p:Se,i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function y_e(r){let e,t,n,l,i,s,o,a,u=r[1].version,f;l=new Ke({props:{placeholder:null,options:r[0],getOptionLabel:k_e,getOptionValue:C_e,getOptionColour:r[2],value:r[1].selectedScreenId,quiet:!0,autoWidth:!0}}),l.$on("change",r[3]);let c=r[1].clientFeatures.devicePreview&&a7(),p=u7();return{c(){e=D("div"),t=D("div"),n=D("div"),k(l.$$.fragment),i=N(),s=D("div"),c&&c.c(),o=N(),a=D("div"),p.c(),y(n,"class","header-left svelte-wbewjv"),y(s,"class","header-right svelte-wbewjv"),y(t,"class","header svelte-wbewjv"),y(a,"class","content svelte-wbewjv"),y(e,"class","app-panel svelte-wbewjv")},m(d,g){b(d,e,g),P(e,t),P(t,n),C(l,n,null),P(t,i),P(t,s),c&&c.m(s,null),P(e,o),P(e,a),p.m(a,null),f=!0},p(d,[g]){const h={};g&1&&(h.options=d[0]),g&2&&(h.value=d[1].selectedScreenId),l.$set(h),d[1].clientFeatures.devicePreview?c?g&2&&m(c,1):(c=a7(),c.c(),m(c,1),c.m(s,null)):c&&(Z(),_(c,1,1,()=>{c=null}),x()),g&2&&re(u,u=d[1].version)?(Z(),_(p,1,1,Se),x(),p=u7(),p.c(),m(p,1),p.m(a,null)):p.p(d,g)},i(d){f||(m(l.$$.fragment,d),m(c),m(p),f=!0)},o(d){_(l.$$.fragment,d),_(c),_(p),f=!1},d(d){d&&v(e),S(l),c&&c.d(),p.d(d)}}}const k_e=r=>r.routing.route,C_e=r=>r._id;function S_e(r,e,t){let n,l;return ue(r,f4,o=>t(0,n=o)),ue(r,He,o=>t(1,l=o)),[n,l,o=>Xl(o.routing.roleId),o=>He.actions.screens.select(o.detail)]}class A_e extends oe{constructor(e){super();ae(this,e,S_e,y_e,re,{})}}function f7(r){let e,t;return e=new su({props:{icon:"Experience",tooltip:"Layouts",active:r[1]("./layouts")}}),e.$on("click",r[11]),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&2&&(i.active=n[1]("./layouts")),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function O_e(r){var p;let e,t,n,l,i,s,o,a,u,f;e=new su({props:{icon:"WebPage",tooltip:"Screens",active:r[1]("./screens")}}),e.$on("click",r[7]),n=new su({props:{icon:"ViewList",tooltip:"Components",active:r[1]("./components")}}),n.$on("click",r[8]),i=new su({props:{icon:"Brush",tooltip:"Theme",active:r[1]("./theme")}}),i.$on("click",r[9]),o=new su({props:{icon:"Link",tooltip:"Navigation",active:r[1]("./navigation")}}),o.$on("click",r[10]);let c=((p=r[0].layouts)==null?void 0:p.length)&&f7(r);return{c(){k(e.$$.fragment),t=N(),k(n.$$.fragment),l=N(),k(i.$$.fragment),s=N(),k(o.$$.fragment),a=N(),c&&c.c(),u=Te()},m(d,g){C(e,d,g),b(d,t,g),C(n,d,g),b(d,l,g),C(i,d,g),b(d,s,g),C(o,d,g),b(d,a,g),c&&c.m(d,g),b(d,u,g),f=!0},p(d,g){var O;const h={};g&2&&(h.active=d[1]("./screens")),e.$set(h);const $={};g&2&&($.active=d[1]("./components")),n.$set($);const w={};g&2&&(w.active=d[1]("./theme")),i.$set(w);const A={};g&2&&(A.active=d[1]("./navigation")),o.$set(A),((O=d[0].layouts)==null?void 0:O.length)?c?(c.p(d,g),g&1&&m(c,1)):(c=f7(d),c.c(),m(c,1),c.m(u.parentNode,u)):c&&(Z(),_(c,1,1,()=>{c=null}),x())},i(d){f||(m(e.$$.fragment,d),m(n.$$.fragment,d),m(i.$$.fragment,d),m(o.$$.fragment,d),m(c),f=!0)},o(d){_(e.$$.fragment,d),_(n.$$.fragment,d),_(i.$$.fragment,d),_(o.$$.fragment,d),_(c),f=!1},d(d){S(e,d),d&&v(t),S(n,d),d&&v(l),S(i,d),d&&v(s),S(o,d),d&&v(a),c&&c.d(d),d&&v(u)}}}function c7(r){let e,t,n;const l=r[6].default,i=bt(l,r,r[12],null);return t=new A_e({}),{c(){i&&i.c(),e=N(),k(t.$$.fragment)},m(s,o){i&&i.m(s,o),b(s,e,o),C(t,s,o),n=!0},p(s,o){i&&i.p&&(!n||o&4096)&&vt(i,l,s,s[12],n?yt(l,s[12],o,null):wt(s[12]),null)},i(s){n||(m(i,s),m(t.$$.fragment,s),n=!0)},o(s){_(i,s),_(t.$$.fragment,s),n=!1},d(s){i&&i.d(s),s&&v(e),S(t,s)}}}function I_e(r){let e,t,n,l,i,s;n=new zU({props:{$$slots:{default:[O_e]},$$scope:{ctx:r}}});let o=r[3]&&c7(r);return{c(){e=D("div"),t=D("div"),k(n.$$.fragment),l=N(),i=D("div"),o&&o.c(),y(t,"class","icon-nav svelte-4lszbe"),y(i,"class","content svelte-4lszbe"),y(e,"class","design svelte-4lszbe")},m(a,u){b(a,e,u),P(e,t),C(n,t,null),P(e,l),P(e,i),o&&o.m(i,null),s=!0},p(a,[u]){const f={};u&4103&&(f.$$scope={dirty:u,ctx:a}),n.$set(f),a[3]?o?(o.p(a,u),u&8&&m(o,1)):(o=c7(a),o.c(),m(o,1),o.m(i,null)):o&&(Z(),_(o,1,1,()=>{o=null}),x())},i(a){s||(m(n.$$.fragment,a),m(o),s=!0)},o(a){_(n.$$.fragment,a),_(o),s=!1},d(a){a&&v(e),S(n),o&&o.d()}}}function T_e(r,e,t){let n,l,i,s;ue(r,He,w=>t(0,n=w)),ue(r,jn,w=>t(3,s=w));let{$$slots:o={},$$scope:a}=e;const{isActive:u,goto:f}=Of;ue(r,u,w=>t(1,l=w)),ue(r,f,w=>t(2,i=w));const c=p1({urlParam:"screenId",stateKey:"selectedScreenId",validate:w=>n.screens.some(A=>A._id===w),fallbackUrl:"../../design",store:He,routify:Of});ls(c);const p=()=>i("./screens"),d=()=>i("./components"),g=()=>i("./theme"),h=()=>i("./navigation"),$=()=>i("./layouts");return r.$$set=w=>{"$$scope"in w&&t(12,a=w.$$scope)},[n,l,i,s,u,f,o,p,d,g,h,$,a]}class E_e extends oe{constructor(e){super();ae(this,e,T_e,I_e,re,{})}}var p7="/builder/assets/bb-space-man.5be51a45.svg";function d7(r){let e,t,n;return t=new je({props:{gap:"S",justifyItems:"center",$$slots:{default:[N_e]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","centered svelte-2q1gxp")},m(l,i){b(l,e,i),C(t,e,null),n=!0},p(l,i){const s={};i&32&&(s.$$scope={dirty:i,ctx:l}),t.$set(s)},i(l){n||(m(t.$$.fragment,l),n=!0)},o(l){_(t.$$.fragment,l),n=!1},d(l){l&&v(e),S(t)}}}function P_e(r){let e;return{c(){e=U("LET\u2019S BRING THIS APP TO LIFE")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function L_e(r){let e;return{c(){e=U("Create first screen")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function N_e(r){let e,t,n,l,i,s,o,a;return i=new Rr({props:{size:"L",$$slots:{default:[P_e]},$$scope:{ctx:r}}}),o=new rt({props:{size:"M",cta:!0,icon:"Add",$$slots:{default:[L_e]},$$scope:{ctx:r}}}),o.$on("click",r[1]),{c(){e=D("img"),n=N(),l=D("div"),k(i.$$.fragment),s=N(),k(o.$$.fragment),y(e,"class","img-size svelte-2q1gxp"),y(e,"alt","logo"),_n(e.src,t=p7)||y(e,"src",t),y(l,"class","new-screen-text svelte-2q1gxp")},m(u,f){b(u,e,f),b(u,n,f),b(u,l,f),C(i,l,null),b(u,s,f),C(o,u,f),a=!0},p(u,f){const c={};f&32&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const p={};f&32&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(m(i.$$.fragment,u),m(o.$$.fragment,u),a=!0)},o(u){_(i.$$.fragment,u),_(o.$$.fragment,u),a=!1},d(u){u&&v(e),u&&v(n),u&&v(l),S(i),u&&v(s),S(o,u)}}}function R_e(r){let e,t,n=r[0]&&d7(r);return{c(){n&&n.c(),e=Te()},m(l,i){n&&n.m(l,i),b(l,e,i),t=!0},p(l,[i]){l[0]?n?(n.p(l,i),i&1&&m(n,1)):(n=d7(l),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(Z(),_(n,1,1,()=>{n=null}),x())},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&v(e)}}}function M_e(r,e,t){let n,l,i;ue(r,He,a=>t(2,n=a)),ue(r,On,a=>t(3,l=a)),ue(r,jn,a=>t(4,i=a));let s=!1;const o=async()=>{let a=C1.create();a.routing.route="/home",a.routing.roldId=cu.BASIC,a.routing.homeScreen=!0;try{const u=await He.actions.screens.save(a);ye.success("Screen created successfully"),l(`./${u._id}`)}catch(u){console.error("Could not create screen",u),ye.error("Error creating screen")}};return At(()=>{var a;i?l(`./${i._id}`):((a=n.screens)==null?void 0:a.length)?l(`./${n.screens[0]._id}`):t(0,s=!0)}),[s,o]}class D_e extends oe{constructor(e){super();ae(this,e,M_e,R_e,re,{})}}function B_e(r){let e;const t=r[1].default,n=bt(t,r,r[0],null);return{c(){n&&n.c()},m(l,i){n&&n.m(l,i),e=!0},p(l,[i]){n&&n.p&&(!e||i&1)&&vt(n,t,l,l[0],e?yt(t,l[0],i,null):wt(l[0]),null)},i(l){e||(m(n,l),e=!0)},o(l){_(n,l),e=!1},d(l){n&&n.d(l)}}}function j_e(r,e,t){let{$$slots:n={},$$scope:l}=e;return r.$$set=i=>{"$$scope"in i&&t(0,l=i.$$scope)},[l,n]}class z_e extends oe{constructor(e){super();ae(this,e,j_e,B_e,re,{})}}function q_e(r){let e,t,n;function l(s){r[5](s)}let i={options:r[1],getOptionLabel:U_e,getOptionValue:F_e};return r[0]!==void 0&&(i.value=r[0]),e=new Ke({props:i}),te.push(()=>ce(e,"value",l)),e.$on("change",r[2]),{c(){k(e.$$.fragment)},m(s,o){C(e,s,o),n=!0},p(s,[o]){const a={};o&2&&(a.options=s[1]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){S(e,s)}}}const U_e=r=>r.name,F_e=r=>r._id;function V_e(r,e,t){let n,l;ue(r,Nt,f=>t(4,l=f));const i=ht();let{value:s}=e,{isTrigger:o}=e;const a=f=>{t(0,s=f.detail),i("change",f.detail)};function u(f){s=f,t(0,s)}return r.$$set=f=>{"value"in f&&t(0,s=f.value),"isTrigger"in f&&t(3,o=f.isTrigger)},r.$$.update=()=>{r.$$.dirty&24&&t(1,n=l.list.filter(f=>!o||f._id!==_i.USERS))},[s,n,a,o,l,u]}class H_e extends oe{constructor(e){super();ae(this,e,V_e,q_e,re,{value:0,isTrigger:3})}}function W_e(r){let e,t,n;var l=r[5]?to:Bn;function i(s){return{props:{panel:Gi,value:s[0][s[2]],label:s[2],type:"string",bindings:s[4],fillWidth:!0,allowJS:!0,updateOnChange:!1}}}return l&&(e=new l(i(r)),e.$on("change",r[12])),{c(){e&&k(e.$$.fragment),t=Te()},m(s,o){e&&C(e,s,o),b(s,t,o),n=!0},p(s,o){const a={};if(o&5&&(a.value=s[0][s[2]]),o&4&&(a.label=s[2]),o&16&&(a.bindings=s[4]),l!==(l=s[5]?to:Bn)){if(e){Z();const u=e;_(u.$$.fragment,1,0,()=>{S(u,1)}),x()}l?(e=new l(i(s)),e.$on("change",s[12]),k(e.$$.fragment),m(e.$$.fragment,1),C(e,t.parentNode,t)):e=null}else l&&e.$set(a)},i(s){n||(e&&m(e.$$.fragment,s),n=!0)},o(s){e&&_(e.$$.fragment,s),n=!1},d(s){s&&v(t),e&&S(e,s)}}}function G_e(r){let e,t,n;function l(s){r[11](s)}let i={schema:r[3]};return r[0][r[2]]!==void 0&&(i.linkedRows=r[0][r[2]]),e=new $w({props:i}),te.push(()=>ce(e,"linkedRows",l)),{c(){k(e.$$.fragment)},m(s,o){C(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.schema=s[3]),!t&&o&5&&(t=!0,a.linkedRows=s[0][s[2]],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){S(e,s)}}}function Y_e(r){let e,t,n;function l(s){r[10](s)}let i={label:r[2]};return r[0][r[2]]!==void 0&&(i.value=r[0][r[2]]),e=new Sl({props:i}),te.push(()=>ce(e,"value",l)),{c(){k(e.$$.fragment)},m(s,o){C(e,s,o),n=!0},p(s,o){const a={};o&4&&(a.label=s[2]),!t&&o&5&&(t=!0,a.value=s[0][s[2]],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){S(e,s)}}}function X_e(r){let e,t,n;function l(s){r[9](s)}let i={label:r[2],options:r[3].constraints.inclusion};return r[0][r[2]]!==void 0&&(i.value=r[0][r[2]]),e=new Li({props:i}),te.push(()=>ce(e,"value",l)),{c(){k(e.$$.fragment)},m(s,o){C(e,s,o),n=!0},p(s,o){const a={};o&4&&(a.label=s[2]),o&8&&(a.options=s[3].constraints.inclusion),!t&&o&5&&(t=!0,a.value=s[0][s[2]],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){S(e,s)}}}function J_e(r){let e,t;return e=new or({props:{text:r[2],value:r[0][r[2]]}}),e.$on("change",r[8]),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.text=n[2]),l&5&&(i.value=n[0][n[2]]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Q_e(r){let e,t;return e=new fs({props:{label:r[2],value:r[0][r[2]]}}),e.$on("change",r[7]),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.label=n[2]),l&5&&(i.value=n[0][n[2]]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function K_e(r){let e,t;return e=new Ke({props:{label:r[2],value:r[0][r[2]],options:r[3].constraints.inclusion}}),e.$on("change",r[6]),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.label=n[2]),l&5&&(i.value=n[0][n[2]]),l&8&&(i.options=n[3].constraints.inclusion),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Z_e(r){let e,t,n,l,i;const s=[K_e,Q_e,J_e,X_e,Y_e,G_e,W_e],o=[];function a(u,f){return f&8&&(e=null),e==null&&(e=!!(x_e(u[3])&&u[3].type!=="array")),e?0:u[3].type==="datetime"?1:u[3].type==="boolean"?2:u[3].type==="array"?3:u[3].type==="longform"?4:u[3].type==="link"?5:u[3].type==="string"||u[3].type==="number"?6:-1}return~(t=a(r,-1))&&(n=o[t]=s[t](r)),{c(){n&&n.c(),l=Te()},m(u,f){~t&&o[t].m(u,f),b(u,l,f),i=!0},p(u,[f]){let c=t;t=a(u,f),t===c?~t&&o[t].p(u,f):(n&&(Z(),_(o[c],1,1,()=>{o[c]=null}),x()),~t?(n=o[t],n?n.p(u,f):(n=o[t]=s[t](u),n.c()),m(n,1),n.m(l.parentNode,l)):n=null)},i(u){i||(m(n),i=!0)},o(u){_(n),i=!1},d(u){~t&&o[t].d(u),u&&v(l)}}}function x_e(r){var e,t;return!!((t=(e=r.constraints)==null?void 0:e.inclusion)==null?void 0:t.length)}function ehe(r,e,t){let{onChange:n}=e,{field:l}=e,{schema:i}=e,{value:s}=e,{bindings:o}=e,{isTestModal:a}=e;const u=$=>n($,l),f=$=>n($,l),c=$=>n($,l);function p($){r.$$.not_equal(s[l],$)&&(s[l]=$,t(0,s))}function d($){r.$$.not_equal(s[l],$)&&(s[l]=$,t(0,s))}function g($){r.$$.not_equal(s[l],$)&&(s[l]=$,t(0,s))}const h=$=>n($,l);return r.$$set=$=>{"onChange"in $&&t(1,n=$.onChange),"field"in $&&t(2,l=$.field),"schema"in $&&t(3,i=$.schema),"value"in $&&t(0,s=$.value),"bindings"in $&&t(4,o=$.bindings),"isTestModal"in $&&t(5,a=$.isTestModal)},[s,n,l,i,o,a,u,f,c,p,d,g,h]}class m7 extends oe{constructor(e){super();ae(this,e,ehe,Z_e,re,{onChange:1,field:2,schema:3,value:0,bindings:4,isTestModal:5})}}function g7(r,e,t){const n=r.slice();return n[14]=e[t][0],n[15]=e[t][1],n}function _7(r){let e,t,n=r[3],l=[];for(let s=0;s<n.length;s+=1)l[s]=b7(g7(r,n,s));const i=s=>_(l[s],1,1,()=>{l[s]=null});return{c(){e=D("div");for(let s=0;s<l.length;s+=1)l[s].c();y(e,"class","schema-fields svelte-qnw5bo")},m(s,o){b(s,e,o);for(let a=0;a<l.length;a+=1)l[a].m(e,null);t=!0},p(s,o){if(o&367){n=s[3];let a;for(a=0;a<n.length;a+=1){const u=g7(s,n,a);l[a]?(l[a].p(u,o),m(l[a],1)):(l[a]=b7(u),l[a].c(),m(l[a],1),l[a].m(e,null))}for(Z(),a=n.length;a<l.length;a+=1)i(a);x()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(l[o]);t=!0}},o(s){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)_(l[o]);t=!1},d(s){s&&v(e),st(l,s)}}}function h7(r){let e,t,n=r[15].type!=="attachment"&&$7(r);return{c(){n&&n.c(),e=Te()},m(l,i){n&&n.m(l,i),b(l,e,i),t=!0},p(l,i){l[15].type!=="attachment"?n?(n.p(l,i),i&8&&m(n,1)):(n=$7(l),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(Z(),_(n,1,1,()=>{n=null}),x())},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&v(e)}}}function $7(r){let e,t,n,l;const i=[nhe,the],s=[];function o(a,u){return a[5]?1:0}return e=o(r),t=s[e]=i[e](r),{c(){t.c(),n=Te()},m(a,u){s[e].m(a,u),b(a,n,u),l=!0},p(a,u){let f=e;e=o(a),e===f?s[e].p(a,u):(Z(),_(s[f],1,1,()=>{s[f]=null}),x(),t=s[e],t?t.p(a,u):(t=s[e]=i[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){l||(m(t),l=!0)},o(a){_(t),l=!1},d(a){s[e].d(a),a&&v(n)}}}function the(r){let e,t,n;function l(...o){return r[11](r[14],r[15],...o)}var i=r[2]?to:Bn;function s(o){return{props:{placeholder:o[6][o[15].type],panel:Gi,value:Array.isArray(o[0][o[14]])?o[0][o[14]].join(" "):o[0][o[14]],label:o[14],type:"string",bindings:o[1],fillWidth:!0,allowJS:!0,updateOnChange:!1}}}return i&&(e=new i(s(r)),e.$on("change",l)),{c(){e&&k(e.$$.fragment),t=Te()},m(o,a){e&&C(e,o,a),b(o,t,a),n=!0},p(o,a){r=o;const u={};if(a&8&&(u.placeholder=r[6][r[15].type]),a&9&&(u.value=Array.isArray(r[0][r[14]])?r[0][r[14]].join(" "):r[0][r[14]]),a&8&&(u.label=r[14]),a&2&&(u.bindings=r[1]),i!==(i=r[2]?to:Bn)){if(e){Z();const f=e;_(f.$$.fragment,1,0,()=>{S(f,1)}),x()}i?(e=new i(s(r)),e.$on("change",l),k(e.$$.fragment),m(e.$$.fragment,1),C(e,t.parentNode,t)):e=null}else i&&e.$set(u)},i(o){n||(e&&m(e.$$.fragment,o),n=!0)},o(o){e&&_(e.$$.fragment,o),n=!1},d(o){o&&v(t),e&&S(e,o)}}}function nhe(r){let e,t;return e=new m7({props:{isTestModal:r[2],field:r[14],schema:r[15],bindings:r[1],value:r[0],onChange:r[8]}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.isTestModal=n[2]),l&8&&(i.field=n[14]),l&8&&(i.schema=n[15]),l&2&&(i.bindings=n[1]),l&1&&(i.value=n[0]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function b7(r){let e,t,n=!r[15].autocolumn&&h7(r);return{c(){n&&n.c(),e=Te()},m(l,i){n&&n.m(l,i),b(l,e,i),t=!0},p(l,i){l[15].autocolumn?n&&(Z(),_(n,1,1,()=>{n=null}),x()):n?(n.p(l,i),i&8&&m(n,1)):(n=h7(l),n.c(),m(n,1),n.m(e.parentNode,e))},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&v(e)}}}function rhe(r){let e,t,n,l;e=new Ke({props:{value:r[0].tableId,options:r[4].list,getOptionLabel:lhe,getOptionValue:ihe}}),e.$on("change",r[7]);let i=r[3].length&&_7(r);return{c(){k(e.$$.fragment),t=N(),i&&i.c(),n=Te()},m(s,o){C(e,s,o),b(s,t,o),i&&i.m(s,o),b(s,n,o),l=!0},p(s,[o]){const a={};o&1&&(a.value=s[0].tableId),o&16&&(a.options=s[4].list),e.$set(a),s[3].length?i?(i.p(s,o),o&8&&m(i,1)):(i=_7(s),i.c(),m(i,1),i.m(n.parentNode,n)):i&&(Z(),_(i,1,1,()=>{i=null}),x())},i(s){l||(m(e.$$.fragment,s),m(i),l=!0)},o(s){_(e.$$.fragment,s),_(i),l=!1},d(s){S(e,s),s&&v(t),i&&i.d(s),s&&v(n)}}}const lhe=r=>r.name,ihe=r=>r._id;function she(r,e,t){let n,l;ue(r,Nt,w=>t(4,l=w));const i=ht();let{value:s}=e,{bindings:o}=e,{block:a}=e,{isTestModal:u}=e,f,c,p={number:10,boolean:"true",datetime:"2022-02-16T12:00:00.000Z ",options:"1",array:"1 2 3 4",link:"ro_ta_123_456",longform:"long form text"};const d=w=>{t(0,s.tableId=w.detail,s),i("change",s)},g=(w,A)=>new RegExp(/{{([^{].*?)}}/g).test(w)?w:A==="boolean"?typeof w=="boolean"?w:w==="true":A==="number"?typeof w=="number"?w:Number(w):A==="options"?[w]:A==="array"?Array.isArray(w)?w:w.split(",").map(T=>T.trim()):A==="link"?Array.isArray(w)?w:[w]:w,h=(w,A,O)=>{t(0,s[A]=g(w.detail,O),s),i("change",s)},$=(w,A,O)=>h(O,w,A.type);return r.$$set=w=>{"value"in w&&t(0,s=w.value),"bindings"in w&&t(1,o=w.bindings),"block"in w&&t(9,a=w.block),"isTestModal"in w&&t(2,u=w.isTestModal)},r.$$.update=()=>{var w;r.$$.dirty&512&&t(5,n=a.rowControl),r.$$.dirty&1049&&(t(10,f=l.list.find(A=>A._id===(s==null?void 0:s.tableId))),t(3,c=Object.entries((w=f==null?void 0:f.schema)!=null?w:{})),c.map(([,A])=>{!A.autocolumn&&!s[A.name]&&t(0,s[A.name]="",s)})),r.$$.dirty&1&&(s==null?void 0:s.tableId)==null&&t(0,s={tableId:""})},[s,o,u,c,l,n,p,d,h,a,f,$]}class ohe extends oe{constructor(e){super();ae(this,e,she,rhe,re,{value:0,bindings:1,block:9,isTestModal:2})}}function v7(r,e,t){const n=r.slice();return n[9]=e[t][0],n[10]=e[t][1],n}function w7(r){let e,t,n=r[3],l=[];for(let s=0;s<n.length;s+=1)l[s]=y7(v7(r,n,s));const i=s=>_(l[s],1,1,()=>{l[s]=null});return{c(){e=D("div");for(let s=0;s<l.length;s+=1)l[s].c();y(e,"class","schema-fields svelte-qnw5bo")},m(s,o){b(s,e,o);for(let a=0;a<l.length;a+=1)l[a].m(e,null);t=!0},p(s,o){if(o&31){n=s[3];let a;for(a=0;a<n.length;a+=1){const u=v7(s,n,a);l[a]?(l[a].p(u,o),m(l[a],1)):(l[a]=y7(u),l[a].c(),m(l[a],1),l[a].m(e,null))}for(Z(),a=n.length;a<l.length;a+=1)i(a);x()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(l[o]);t=!0}},o(s){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)_(l[o]);t=!1},d(s){s&&v(e),st(l,s)}}}function y7(r){let e,t;return e=new m7({props:{isTestModal:r[2],field:r[9],schema:r[10],bindings:r[1],value:r[0],onChange:r[4]}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.isTestModal=n[2]),l&8&&(i.field=n[9]),l&8&&(i.schema=n[10]),l&2&&(i.bindings=n[1]),l&1&&(i.value=n[0]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function ahe(r){let e,t,n=r[3].length&&r[2]&&w7(r);return{c(){n&&n.c(),e=Te()},m(l,i){n&&n.m(l,i),b(l,e,i),t=!0},p(l,[i]){l[3].length&&l[2]?n?(n.p(l,i),i&12&&m(n,1)):(n=w7(l),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(Z(),_(n,1,1,()=>{n=null}),x())},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&v(e)}}}function uhe(r,e,t){const n=ht();let{value:l}=e,{bindings:i}=e,{block:s}=e,{isTestModal:o}=e,a;const u={BOOLEAN:null,NUMBER:null,DATETIME:null,STRING:"",OPTIONS:[],ARRAY:[]},f=(p,d)=>new RegExp(/{{([^{].*?)}}/g).test(p)?p:d==="boolean"?typeof p=="boolean"?p:p==="true":d==="number"?typeof p=="number"?p:Number(p):d==="options"?[p]:d==="array"?Array.isArray(p)?p:p.split(",").map(h=>h.trim()):d==="link"?Array.isArray(p)?p:[p]:p,c=(p,d,g)=>{t(0,l[d]=f(p.detail,g),l),n("change",l)};return r.$$set=p=>{"value"in p&&t(0,l=p.value),"bindings"in p&&t(1,i=p.bindings),"block"in p&&t(5,s=p.block),"isTestModal"in p&&t(2,o=p.isTestModal)},r.$$.update=()=>{var p,d;if(r.$$.dirty&33){let g={};for(const[h,$]of Object.entries((d=(p=s==null?void 0:s.inputs)==null?void 0:p.fields)!=null?d:{}))g=nt(Le({},g),{[h]:{type:$,name:h,fieldName:h,constraints:{type:$}}}),l[h]===$&&t(0,l[h]=u[$.toUpperCase()],l);t(3,a=Object.entries(g))}},[l,i,o,a,c,s]}class fhe extends oe{constructor(e){super();ae(this,e,uhe,ahe,re,{value:0,bindings:1,block:5,isTestModal:2})}}function k7(r,e,t){const n=r.slice();return n[9]=e[t],n}function C7(r){let e,t,n,l,i,s,o,a,u;t=new ot({props:{value:r[9].name,secondary:!0,placeholder:"Enter field name",updateOnChange:!1}}),t.$on("change",function(){pt(r[6](r[9].name))&&r[6](r[9].name).apply(this,arguments)});function f(...p){return r[7](r[9],...p)}l=new Ke({props:{value:r[9].type,options:r[3]}}),l.$on("change",f);function c(){return r[8](r[9])}return{c(){e=D("div"),k(t.$$.fragment),n=N(),k(l.$$.fragment),i=N(),s=D("i"),y(s,"class","remove-field ri-delete-bin-line"),y(e,"class","field svelte-12q6c1o")},m(p,d){b(p,e,d),C(t,e,null),P(e,n),C(l,e,null),P(e,i),P(e,s),o=!0,a||(u=Ee(s,"click",c),a=!0)},p(p,d){r=p;const g={};d&2&&(g.value=r[9].name),t.$set(g);const h={};d&2&&(h.value=r[9].type),l.$set(h)},i(p){o||(m(t.$$.fragment,p),m(l.$$.fragment,p),o=!0)},o(p){_(t.$$.fragment,p),_(l.$$.fragment,p),o=!1},d(p){p&&v(e),S(t),S(l),a=!1,u()}}}function che(r){let e;return{c(){e=U("Add field")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function phe(r){let e,t,n,l,i,s,o=r[1],a=[];for(let f=0;f<o.length;f+=1)a[f]=C7(k7(r,o,f));const u=f=>_(a[f],1,1,()=>{a[f]=null});return i=new rt({props:{quiet:!0,secondary:!0,icon:"Add",$$slots:{default:[che]},$$scope:{ctx:r}}}),i.$on("click",r[4]),{c(){e=D("div"),t=D("div"),n=N();for(let f=0;f<a.length;f+=1)a[f].c();l=N(),k(i.$$.fragment),y(t,"class","spacer svelte-12q6c1o"),y(e,"class","root svelte-12q6c1o")},m(f,c){b(f,e,c),P(e,t),P(e,n);for(let p=0;p<a.length;p+=1)a[p].m(e,null);P(e,l),C(i,e,null),s=!0},p(f,[c]){if(c&111){o=f[1];let d;for(d=0;d<o.length;d+=1){const g=k7(f,o,d);a[d]?(a[d].p(g,c),m(a[d],1)):(a[d]=C7(g),a[d].c(),m(a[d],1),a[d].m(e,l))}for(Z(),d=o.length;d<a.length;d+=1)u(d);x()}const p={};c&4096&&(p.$$scope={dirty:c,ctx:f}),i.$set(p)},i(f){if(!s){for(let c=0;c<o.length;c+=1)m(a[c]);m(i.$$.fragment,f),s=!0}},o(f){a=a.filter(Boolean);for(let c=0;c<a.length;c+=1)_(a[c]);_(i.$$.fragment,f),s=!1},d(f){f&&v(e),st(a,f),S(i)}}}function dhe(r,e,t){let n;const l=ht();let{value:i={}}=e;const s=[{label:"Text",value:"string"},{label:"Number",value:"number"},{label:"Boolean",value:"boolean"},{label:"DateTime",value:"datetime"},{label:"Array",value:"array"}];function o(){const p=Le({},i);p[""]="string",l("change",p)}function a(p){const d=Le({},i);delete d[p],l("change",d)}const u=p=>d=>{let g=[...n];const h=d.detail;h?g.find($=>$.name===p).name=h:g=g.filter($=>$.name!==p),t(0,i=g.reduce(($,w)=>($[w.name]=w.type,$),{})),l("change",i)},f=(p,d)=>{t(0,i[p.name]=d.detail,i),l("change",i)},c=p=>a(p.name);return r.$$set=p=>{"value"in p&&t(0,i=p.value)},r.$$.update=()=>{r.$$.dirty&1&&t(1,n=i?Object.entries(i).map(([p,d])=>({name:p,type:d})):[])},[i,n,l,s,o,a,u,f,c]}class mhe extends oe{constructor(e){super();ae(this,e,dhe,phe,re,{value:0})}}function ghe(r){let e,t,n,l,i,s,o,a;return t=new ot({props:{readonly:!0,value:r[1],label:r[0]}}),i=new Je({props:{size:"S",name:"Copy"}}),{c(){e=D("div"),k(t.$$.fragment),n=N(),l=D("div"),k(i.$$.fragment),y(l,"class","icon svelte-bmyadj"),y(e,"data-cy",r[2]),y(e,"class","svelte-bmyadj")},m(u,f){b(u,e,f),C(t,e,null),P(e,n),P(e,l),C(i,l,null),s=!0,o||(a=Ee(l,"click",r[4]),o=!0)},p(u,[f]){const c={};f&2&&(c.value=u[1]),f&1&&(c.label=u[0]),t.$set(c),(!s||f&4)&&y(e,"data-cy",u[2])},i(u){s||(m(t.$$.fragment,u),m(i.$$.fragment,u),s=!0)},o(u){_(t.$$.fragment,u),_(i.$$.fragment,u),s=!1},d(u){u&&v(e),S(t),S(i),o=!1,a()}}}function _he(r,e,t){let{label:n=null}=e,{value:l}=e,{dataCy:i=null}=e;const s=a=>{const u=document.createElement("textarea");document.body.appendChild(u),u.value=a,u.select(),document.execCommand("copy"),document.body.removeChild(u),ye.success("URL copied to clipboard")},o=()=>s(l);return r.$$set=a=>{"label"in a&&t(0,n=a.label),"value"in a&&t(1,l=a.value),"dataCy"in a&&t(2,i=a.dataCy)},[n,l,i,s,o]}class S1 extends oe{constructor(e){super();ae(this,e,_he,ghe,re,{label:0,value:1,dataCy:2})}}function hhe(r){let e,t;return e=new S1({props:{value:S7(r[0])}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,[l]){const i={};l&1&&(i.value=S7(n[0])),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function S7(r){return r?`${window.location.origin}/${r}`:""}function $he(r,e,t){let{value:n}=e;return r.$$set=l=>{"value"in l&&t(0,n=l.value)},[n]}class A7 extends oe{constructor(e){super();ae(this,e,$he,hhe,re,{value:0})}}function O7(r){let e,t,n,l,i=(r[2]>1?"s":"")+"",s,o;return{c(){e=D("p"),t=U(`Request received! We found
|
|
805
805
|
`),n=U(r[2]),l=U(`
|
|
806
806
|
bindable value`),s=U(i),o=U("."),y(e,"class","finished-text svelte-12gur68")},m(a,u){b(a,e,u),P(e,t),P(e,n),P(e,l),P(e,s),P(e,o)},p(a,u){u&4&&ke(n,a[2]),u&4&&i!==(i=(a[2]>1?"s":"")+"")&&ke(s,i)},d(a){a&&v(e)}}}function bhe(r){let e,t,n,l,i,s;n=new A7({props:{value:r[1]}});let o=r[0]&&O7(r);return{c(){e=D("p"),e.innerHTML=`Webhooks are for receiving data. To make them easier please use the URL
|
|
807
807
|
shown below and send a
|
|
@@ -814,7 +814,7 @@ ${r.map(i=>{let s=l[i];return s=typeof s=="object"&&!(s instanceof Date)?`"${JSO
|
|
|
814
814
|
`),t=D("i"),l=U(n),i=U("?"),s=U(`
|
|
815
815
|
This action cannot be undone.`)},m(o,a){b(o,e,a),b(o,t,a),P(t,l),P(t,i),b(o,s,a)},p(o,a){a&1&&n!==(n=o[0].name+"")&&ke(l,n)},d(o){o&&v(e),o&&v(t),o&&v(s)}}}function X$e(r){let e,t,n,l,i,s;e=new Nr({props:{$$slots:{control:[G$e],default:[W$e]},$$scope:{ctx:r}}});let o={okText:"Delete Automation",onOk:r[3],title:"Confirm Deletion",$$slots:{default:[Y$e]},$$scope:{ctx:r}};n=new Tr({props:o}),r[5](n);let a={automation:r[0]};return i=new U$e({props:a}),r[6](i),{c(){k(e.$$.fragment),t=N(),k(n.$$.fragment),l=N(),k(i.$$.fragment)},m(u,f){C(e,u,f),b(u,t,f),C(n,u,f),b(u,l,f),C(i,u,f),s=!0},p(u,[f]){const c={};f&518&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};f&513&&(p.$$scope={dirty:f,ctx:u}),n.$set(p);const d={};f&1&&(d.automation=u[0]),i.$set(d)},i(u){s||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(i.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(i.$$.fragment,u),s=!1},d(u){S(e,u),u&&v(t),r[5](null),S(n,u),u&&v(l),r[6](null),S(i,u)}}}function J$e(r,e,t){let n,l;ue(r,Dt,p=>t(7,n=p)),ue(r,Yt,p=>t(8,l=p));let{automation:i}=e,s,o;async function a(){try{await Dt.actions.delete(i),ye.success("Automation deleted successfully"),l("../automate")}catch{ye.error("Error deleting automation")}}async function u(){try{await Dt.actions.duplicate(i),ye.success("Automation has been duplicated successfully"),l(`./${n.selectedAutomation.automation._id}`)}catch{ye.error("Error duplicating automation")}}function f(p){te[p?"unshift":"push"](()=>{s=p,t(1,s)})}function c(p){te[p?"unshift":"push"](()=>{o=p,t(2,o)})}return r.$$set=p=>{"automation"in p&&t(0,i=p.automation)},[i,s,o,a,u,f,c]}class Q$e extends oe{constructor(e){super();ae(this,e,J$e,X$e,re,{automation:0})}}function i9(r,e,t){const n=r.slice();return n[5]=e[t],n[7]=t,n}function K$e(r){let e,t,n;return e=new Q$e({props:{automation:r[5]}}),{c(){k(e.$$.fragment),t=N()},m(l,i){C(e,l,i),b(l,t,i),n=!0},p(l,i){const s={};i&1&&(s.automation=l[5]),e.$set(s)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){S(e,l),l&&v(t)}}}function s9(r){let e,t;function n(){return r[3](r[5])}return e=new Xi({props:{border:r[7]>0,icon:"ShareAndroid",text:r[5].name,selected:r[5]._id===r[1],$$slots:{default:[K$e]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){k(e.$$.fragment)},m(l,i){C(e,l,i),t=!0},p(l,i){r=l;const s={};i&1&&(s.text=r[5].name),i&3&&(s.selected=r[5]._id===r[1]),i&257&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(l){t||(m(e.$$.fragment,l),t=!0)},o(l){_(e.$$.fragment,l),t=!1},d(l){S(e,l)}}}function Z$e(r){let e,t,n=r[0].automations.sort(o9),l=[];for(let s=0;s<n.length;s+=1)l[s]=s9(i9(r,n,s));const i=s=>_(l[s],1,1,()=>{l[s]=null});return{c(){e=D("div");for(let s=0;s<l.length;s+=1)l[s].c();y(e,"class","automations-list svelte-g64vb")},m(s,o){b(s,e,o);for(let a=0;a<l.length;a+=1)l[a].m(e,null);t=!0},p(s,[o]){if(o&7){n=s[0].automations.sort(o9);let a;for(a=0;a<n.length;a+=1){const u=i9(s,n,a);l[a]?(l[a].p(u,o),m(l[a],1)):(l[a]=s9(u),l[a].c(),m(l[a],1),l[a].m(e,null))}for(Z(),a=n.length;a<l.length;a+=1)i(a);x()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(l[o]);t=!0}},o(s){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)_(l[o]);t=!1},d(s){s&&v(e),st(l,s)}}}const o9=r=>r.name;function x$e(r,e,t){let n,l,i;ue(r,Yt,a=>t(4,l=a)),ue(r,Dt,a=>t(0,i=a)),At(async()=>{try{await Dt.actions.fetch()}catch{ye.error("Error getting automations list")}});function s(a){Dt.actions.select(a),l(`./${a._id}`)}const o=a=>s(a);return r.$$.update=()=>{var a,u;r.$$.dirty&1&&t(1,n=(u=(a=i.selectedAutomation)==null?void 0:a.automation)==null?void 0:u._id)},[i,n,s,o]}class ebe extends oe{constructor(e){super();ae(this,e,x$e,Z$e,re,{})}}function a9(r,e,t){const n=r.slice();return n[17]=e[t][0],n[18]=e[t][1],n}function tbe(r){let e;return{c(){e=U(`Please name your automation, then select a trigger. Every automation must
|
|
816
816
|
start with a trigger.`)},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function nbe(r){let e;return{c(){e=U("Triggers")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function rbe(r){let e=r[18].name+"",t;return{c(){t=U(e)},m(n,l){b(n,t,l)},p(n,l){l&8&&e!==(e=n[18].name+"")&&ke(t,e)},d(n){n&&v(t)}}}function u9(r){let e,t,n,l,i,s,o,a,u,f;n=new Je({props:{name:r[18].icon}}),s=new Ue({props:{size:"S",$$slots:{default:[rbe]},$$scope:{ctx:r}}});function c(){return r[13](r[18])}return{c(){e=D("div"),t=D("div"),k(n.$$.fragment),l=N(),i=D("span"),k(s.$$.fragment),o=N(),y(i,"class","icon-spacing svelte-d3iboa"),y(t,"class","item-body svelte-d3iboa"),y(e,"class","item svelte-d3iboa"),ee(e,"selected",r[2]===r[18].name)},m(p,d){b(p,e,d),P(e,t),C(n,t,null),P(t,l),P(t,i),C(s,i,null),P(e,o),a=!0,u||(f=Ee(e,"click",c),u=!0)},p(p,d){r=p;const g={};d&8&&(g.name=r[18].icon),n.$set(g);const h={};d&2097160&&(h.$$scope={dirty:d,ctx:r}),s.$set(h),d&12&&ee(e,"selected",r[2]===r[18].name)},i(p){a||(m(n.$$.fragment,p),m(s.$$.fragment,p),a=!0)},o(p){_(n.$$.fragment,p),_(s.$$.fragment,p),a=!1},d(p){p&&v(e),S(n),S(s),u=!1,f()}}}function lbe(r){let e,t,n,l;e=new Ue({props:{size:"S",$$slots:{default:[nbe]},$$scope:{ctx:r}}});let i=r[3],s=[];for(let a=0;a<i.length;a+=1)s[a]=u9(a9(r,i,a));const o=a=>_(s[a],1,1,()=>{s[a]=null});return{c(){k(e.$$.fragment),t=N(),n=D("div");for(let a=0;a<s.length;a+=1)s[a].c();y(n,"class","item-list svelte-d3iboa")},m(a,u){C(e,a,u),b(a,t,u),b(a,n,u);for(let f=0;f<s.length;f+=1)s[f].m(n,null);l=!0},p(a,u){const f={};if(u&2097152&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),u&76){i=a[3];let c;for(c=0;c<i.length;c+=1){const p=a9(a,i,c);s[c]?(s[c].p(p,u),m(s[c],1)):(s[c]=u9(p),s[c].c(),m(s[c],1),s[c].m(n,null))}for(Z(),c=i.length;c<s.length;c+=1)o(c);x()}},i(a){if(!l){m(e.$$.fragment,a);for(let u=0;u<i.length;u+=1)m(s[u]);l=!0}},o(a){_(e.$$.fragment,a),s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)_(s[u]);l=!1},d(a){S(e,a),a&&v(t),a&&v(n),st(s,a)}}}function ibe(r){let e,t,n,l,i,s,o,a,u,f;e=new Pc({props:{header:"You must publish your app to activate your automations.",message:"To test your automation before publishing, you can use the 'Run Test' functionality on the next screen."}}),n=new Ue({props:{size:"XS",$$slots:{default:[tbe]},$$scope:{ctx:r}}});function c(g){r[10](g)}function p(g){r[11](g)}let d={label:"Name"};return r[0]!==void 0&&(d.value=r[0]),r[4]!==void 0&&(d.error=r[4]),i=new ot({props:d}),te.push(()=>ce(i,"value",c)),te.push(()=>ce(i,"error",p)),i.$on("change",r[12]),u=new je({props:{noPadding:!0,$$slots:{default:[lbe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=N(),k(n.$$.fragment),l=N(),k(i.$$.fragment),a=N(),k(u.$$.fragment)},m(g,h){C(e,g,h),b(g,t,h),C(n,g,h),b(g,l,h),C(i,g,h),b(g,a,h),C(u,g,h),f=!0},p(g,h){const $={};h&2097152&&($.$$scope={dirty:h,ctx:g}),n.$set($);const w={};!s&&h&1&&(s=!0,w.value=g[0],pe(()=>s=!1)),!o&&h&16&&(o=!0,w.error=g[4],pe(()=>o=!1)),i.$set(w);const A={};h&2097164&&(A.$$scope={dirty:h,ctx:g}),u.$set(A)},i(g){f||(m(e.$$.fragment,g),m(n.$$.fragment,g),m(i.$$.fragment,g),m(u.$$.fragment,g),f=!0)},o(g){_(e.$$.fragment,g),_(n.$$.fragment,g),_(i.$$.fragment,g),_(u.$$.fragment,g),f=!1},d(g){S(e,g),g&&v(t),S(n,g),g&&v(l),S(i,g),g&&v(a),S(u,g)}}}function sbe(r){let e,t;return e=new Mt({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:r[5],disabled:!r[2]||!r[0],$$slots:{default:[ibe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,[l]){const i={};l&5&&(i.disabled=!n[2]||!n[0]),l&2097183&&(i.$$scope={dirty:l,ctx:n}),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function obe(r,e,t){let n,l,i,s,o,a;ue(r,Dt,T=>t(8,s=T)),ue(r,Yt,T=>t(16,o=T)),ue(r,eo,T=>t(9,a=T));let u,f,c=!1,p,{webhookModal:d}=e;async function g(){var T;try{await Dt.actions.create({name:u,instanceId:n});const I=s.selectedAutomation.constructBlock("TRIGGER",p.stepId,p);Dt.actions.addBlockToAutomation(I),p.stepId===ta.WEBHOOK&&d.show,await Dt.actions.save((T=s.selectedAutomation)==null?void 0:T.automation),ye.success(`Automation ${u} created`),o(`./${s.selectedAutomation.automation._id}`)}catch{ye.error("Error creating automation")}}const h=T=>{p=T,t(2,f=T.name)};function $(T){u=T,t(0,u)}function w(T){l=T,t(4,l),t(1,c),t(0,u)}const A=()=>t(1,c=!0),O=T=>h(T);return r.$$set=T=>{"webhookModal"in T&&t(7,d=T.webhookModal)},r.$$.update=()=>{r.$$.dirty&512&&(n=a._id),r.$$.dirty&3&&t(4,l=c&&!u?"Please specify a name for the automation.":null),r.$$.dirty&256&&t(3,i=Object.entries(s.blockDefinitions.TRIGGER))},[u,c,f,i,l,g,h,d,s,a,$,w,A,O]}class f9 extends oe{constructor(e){super();ae(this,e,obe,sbe,re,{webhookModal:7})}}function abe(r){let e,t;return e=new f9({props:{webhookModal:r[1]}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&2&&(i.webhookModal=n[1]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function ube(r){let e,t,n,l;e=new ebe({});let i={$$slots:{default:[abe]},$$scope:{ctx:r}};return n=new It({props:i}),r[2](n),{c(){k(e.$$.fragment),t=N(),k(n.$$.fragment)},m(s,o){C(e,s,o),b(s,t,o),C(n,s,o),l=!0},p(s,o){const a={};o&10&&(a.$$scope={dirty:o,ctx:s}),n.$set(a)},i(s){l||(m(e.$$.fragment,s),m(n.$$.fragment,s),l=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),l=!1},d(s){S(e,s),s&&v(t),r[2](null),S(n,s)}}}function fbe(r){let e,t;return e=new $n({props:{title:"Automations",$$slots:{default:[ube]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&11&&(i.$$scope={dirty:l,ctx:n}),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function cbe(r){let e,t,n,l,i,s;return t=new ll({props:{selected:"Automations",$$slots:{default:[fbe]},$$scope:{ctx:r}}}),i=new Je({props:{hoverable:!0,name:"AddCircle"}}),i.$on("click",function(){pt(r[0].show)&&r[0].show.apply(this,arguments)}),{c(){e=D("div"),k(t.$$.fragment),n=N(),l=D("div"),k(i.$$.fragment),y(l,"class","add-button svelte-mcmub4"),y(e,"class","title svelte-mcmub4")},m(o,a){b(o,e,a),C(t,e,null),P(e,n),P(e,l),C(i,l,null),s=!0},p(o,[a]){r=o;const u={};a&11&&(u.$$scope={dirty:a,ctx:r}),t.$set(u)},i(o){s||(m(t.$$.fragment,o),m(i.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(i.$$.fragment,o),s=!1},d(o){o&&v(e),S(t),S(i)}}}function pbe(r,e,t){let{modal:n}=e,{webhookModal:l}=e;function i(s){te[s?"unshift":"push"](()=>{n=s,t(0,n)})}return r.$$set=s=>{"modal"in s&&t(0,n=s.modal),"webhookModal"in s&&t(1,l=s.webhookModal)},[n,l,i]}class dbe extends oe{constructor(e){super();ae(this,e,pbe,cbe,re,{modal:0,webhookModal:1})}}function c9(r,e,t){const n=r.slice();return n[8]=e[t],n[10]=t,n}function p9(r){var u;let e,t,n,l,i;function s(f){r[6](f)}let o={showTestStatus:!0,block:r[8],isTrigger:r[10]===0,testResult:(u=r[2])==null?void 0:u[r[10]]};r[3]!==void 0&&(o.showParameters=r[3]),e=new W7({props:o}),te.push(()=>ce(e,"showParameters",s));let a=r[3]&&r[3][r[8].id]&&d9(r);return{c(){k(e.$$.fragment),n=N(),a&&a.c(),l=Te()},m(f,c){C(e,f,c),b(f,n,c),a&&a.m(f,c),b(f,l,c),i=!0},p(f,c){var d;const p={};c&2&&(p.block=f[8]),c&4&&(p.testResult=(d=f[2])==null?void 0:d[f[10]]),!t&&c&8&&(t=!0,p.showParameters=f[3],pe(()=>t=!1)),e.$set(p),f[3]&&f[3][f[8].id]?a?(a.p(f,c),c&10&&m(a,1)):(a=d9(f),a.c(),m(a,1),a.m(l.parentNode,l)):a&&(Z(),_(a,1,1,()=>{a=null}),x())},i(f){i||(m(e.$$.fragment,f),m(a),i=!0)},o(f){_(e.$$.fragment,f),_(a),i=!1},d(f){S(e,f),f&&v(n),a&&a.d(f),f&&v(l)}}}function d9(r){var a,u;let e,t,n,l,i,s;e=new Jt({props:{noMargin:!0}});let o=((u=(a=r[2])==null?void 0:a[r[10]])==null?void 0:u.outputs.iterations)&&m9(r);return i=new ll({props:{noHorizPadding:!0,selected:"Input",$$slots:{default:[hbe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=N(),o&&o.c(),n=N(),l=D("div"),k(i.$$.fragment),y(l,"class","tabs svelte-1iblsnb")},m(f,c){C(e,f,c),b(f,t,c),o&&o.m(f,c),b(f,n,c),b(f,l,c),C(i,l,null),s=!0},p(f,c){var d,g;((g=(d=f[2])==null?void 0:d[f[10]])==null?void 0:g.outputs.iterations)?o?(o.p(f,c),c&4&&m(o,1)):(o=m9(f),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(Z(),_(o,1,1,()=>{o=null}),x());const p={};c&2052&&(p.$$scope={dirty:c,ctx:f}),i.$set(p)},i(f){s||(m(e.$$.fragment,f),m(o),m(i.$$.fragment,f),s=!0)},o(f){_(e.$$.fragment,f),_(o),_(i.$$.fragment,f),s=!1},d(f){S(e,f),f&&v(t),o&&o.d(f),f&&v(n),f&&v(l),S(i)}}}function m9(r){let e,t,n,l,i,s;return t=new Je({props:{name:"Reuse"}}),i=new Qe({props:{$$slots:{default:[mbe]},$$scope:{ctx:r}}}),{c(){e=D("div"),k(t.$$.fragment),n=N(),l=D("div"),k(i.$$.fragment),Xe(l,"margin-left","10px"),Xe(e,"display","flex"),Xe(e,"padding","10px 10px 0px 12px")},m(o,a){b(o,e,a),C(t,e,null),P(e,n),P(e,l),C(i,l,null),s=!0},p(o,a){const u={};a&2052&&(u.$$scope={dirty:a,ctx:o}),i.$set(u)},i(o){s||(m(t.$$.fragment,o),m(i.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(i.$$.fragment,o),s=!1},d(o){o&&v(e),S(t),S(i)}}}function mbe(r){var i,s;let e,t=((s=(i=r[2])==null?void 0:i[r[10]])==null?void 0:s.outputs.iterations)+"",n,l;return{c(){e=U("This loop ran "),n=U(t),l=U(" times.")},m(o,a){b(o,e,a),b(o,n,a),b(o,l,a)},p(o,a){var u,f;a&4&&t!==(t=((f=(u=o[2])==null?void 0:u[o[10]])==null?void 0:f.outputs.iterations)+"")&&ke(n,t)},d(o){o&&v(e),o&&v(n),o&&v(l)}}}function gbe(r){var n,l;let e,t;return e=new Sl({props:{minHeight:"80px",disabled:!0,value:Jc((l=(n=r[2])==null?void 0:n[r[10]])==null?void 0:l.inputs,"No input")}}),{c(){k(e.$$.fragment)},m(i,s){C(e,i,s),t=!0},p(i,s){var a,u;const o={};s&4&&(o.value=Jc((u=(a=i[2])==null?void 0:a[i[10]])==null?void 0:u.inputs,"No input")),e.$set(o)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){S(e,i)}}}function _be(r){var n,l;let e,t;return e=new Sl({props:{minHeight:"100px",disabled:!0,value:Jc((l=(n=r[2])==null?void 0:n[r[10]])==null?void 0:l.outputs,"No output")}}),{c(){k(e.$$.fragment)},m(i,s){C(e,i,s),t=!0},p(i,s){var a,u;const o={};s&4&&(o.value=Jc((u=(a=i[2])==null?void 0:a[i[10]])==null?void 0:u.outputs,"No output")),e.$set(o)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){S(e,i)}}}function hbe(r){let e,t,n,l;return e=new $n({props:{title:"Input",$$slots:{default:[gbe]},$$scope:{ctx:r}}}),n=new $n({props:{title:"Output",$$slots:{default:[_be]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment),t=N(),k(n.$$.fragment)},m(i,s){C(e,i,s),b(i,t,s),C(n,i,s),l=!0},p(i,s){const o={};s&2052&&(o.$$scope={dirty:s,ctx:i}),e.$set(o);const a={};s&2052&&(a.$$scope={dirty:s,ctx:i}),n.$set(a)},i(i){l||(m(e.$$.fragment,i),m(n.$$.fragment,i),l=!0)},o(i){_(e.$$.fragment,i),_(n.$$.fragment,i),l=!1},d(i){S(e,i),i&&v(t),S(n,i)}}}function g9(r){let e;return{c(){e=D("div"),y(e,"class","separator svelte-1iblsnb")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function _9(r){let e,t,n,l,i,s=r[8].stepId!==Zl.LOOP&&p9(r),o=r[1].length-1!==r[10]&&g9();return{c(){e=D("div"),s&&s.c(),n=N(),o&&o.c(),l=Te(),y(e,"class","block svelte-1iblsnb"),y(e,"style",t=r[0]?`width: ${r[0]}`:"")},m(a,u){b(a,e,u),s&&s.m(e,null),b(a,n,u),o&&o.m(a,u),b(a,l,u),i=!0},p(a,u){a[8].stepId!==Zl.LOOP?s?(s.p(a,u),u&2&&m(s,1)):(s=p9(a),s.c(),m(s,1),s.m(e,null)):s&&(Z(),_(s,1,1,()=>{s=null}),x()),(!i||u&1&&t!==(t=a[0]?`width: ${a[0]}`:""))&&y(e,"style",t),a[1].length-1!==a[10]?o||(o=g9(),o.c(),o.m(l.parentNode,l)):o&&(o.d(1),o=null)},i(a){i||(m(s),i=!0)},o(a){_(s),i=!1},d(a){a&&v(e),s&&s.d(),a&&v(n),o&&o.d(a),a&&v(l)}}}function $be(r){let e,t,n=r[1],l=[];for(let s=0;s<n.length;s+=1)l[s]=_9(c9(r,n,s));const i=s=>_(l[s],1,1,()=>{l[s]=null});return{c(){e=D("div");for(let s=0;s<l.length;s+=1)l[s].c();y(e,"class","container svelte-1iblsnb")},m(s,o){b(s,e,o);for(let a=0;a<l.length;a+=1)l[a].m(e,null);t=!0},p(s,[o]){if(o&15){n=s[1];let a;for(a=0;a<n.length;a+=1){const u=c9(s,n,a);l[a]?(l[a].p(u,o),m(l[a],1)):(l[a]=_9(u),l[a].c(),m(l[a],1),l[a].m(e,null))}for(Z(),a=n.length;a<l.length;a+=1)i(a);x()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(l[o]);t=!0}},o(s){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)_(l[o]);t=!1},d(s){s&&v(e),st(l,s)}}}function Jc(r,e){return r?JSON.stringify(r,null,2):e}function bbe(r,e,t){let n,{automation:l}=e,{testResults:i}=e,{width:s="400px"}=e,o,a;function u(c){return c==null?void 0:c.steps.filter(p=>p.stepId!==Zl.LOOP||[])}function f(c){o=c,t(3,o)}return r.$$set=c=>{"automation"in c&&t(4,l=c.automation),"testResults"in c&&t(5,i=c.testResults),"width"in c&&t(0,s=c.width)},r.$$.update=()=>{if(r.$$.dirty&32&&t(2,n=u(i)),r.$$.dirty&22){if(t(1,a=[]),l)l.definition.trigger&&a.push(l.definition.trigger),t(1,a=a.concat(l.definition.steps||[]).filter(c=>c.stepId!==Zl.LOOP));else if(n){t(1,a=n||[]);let c=0;for(let p of a)p.id=c++}}},[s,a,n,o,l,i,f]}class h9 extends oe{constructor(e){super();ae(this,e,bbe,$be,re,{automation:4,testResults:5,width:0})}}function vbe(r){let e,t,n,l,i,s,o,a,u,f,c,p,d;return n=new Je({props:{name:"MultipleCheck"}}),a=new Je({props:{hoverable:!0,name:"Close"}}),a.$on("click",r[4]),f=new Jt({}),p=new h9({props:{automation:r[0],testResults:r[2]}}),{c(){e=D("div"),t=D("div"),k(n.$$.fragment),l=N(),i=D("div"),i.textContent="Test Details",s=N(),o=D("div"),k(a.$$.fragment),u=N(),k(f.$$.fragment),c=N(),k(p.$$.fragment),Xe(i,"padding-left","var(--spacing-l)"),y(t,"class","title-text svelte-nwwj95"),Xe(o,"padding-right","var(--spacing-xl)"),y(e,"class","title svelte-nwwj95")},m(g,h){b(g,e,h),P(e,t),C(n,t,null),P(t,l),P(t,i),P(e,s),P(e,o),C(a,o,null),b(g,u,h),C(f,g,h),b(g,c,h),C(p,g,h),d=!0},p(g,[h]){const $={};h&1&&($.automation=g[0]),h&4&&($.testResults=g[2]),p.$set($)},i(g){d||(m(n.$$.fragment,g),m(a.$$.fragment,g),m(f.$$.fragment,g),m(p.$$.fragment,g),d=!0)},o(g){_(n.$$.fragment,g),_(a.$$.fragment,g),_(f.$$.fragment,g),_(p.$$.fragment,g),d=!1},d(g){g&&v(e),S(n),S(a),g&&v(u),S(f,g),g&&v(c),S(p,g)}}}function wbe(r,e,t){let n;ue(r,Dt,a=>t(1,n=a));let{automation:l}=e,i,s;const o=async()=>{wn(Dt,n.showTestPanel=!1,n)};return r.$$set=a=>{"automation"in a&&t(0,l=a.automation)},r.$$.update=()=>{var a;r.$$.dirty&11&&(t(3,i=[]),l?(l.definition.trigger&&i.push(l.definition.trigger),t(3,i=i.concat(l.definition.steps||[]).filter(u=>u.stepId!==Zl.LOOP))):n.selectedAutomation&&t(0,l=n.selectedAutomation)),r.$$.dirty&2&&t(2,s=(a=n.selectedAutomation)==null?void 0:a.testResults)},[l,n,s,i,o]}class ybe extends oe{constructor(e){super();ae(this,e,wbe,vbe,re,{automation:0})}}function kbe(r){let e,t,n,l;return n=new je({props:{gap:"S",justifyItems:"center",$$slots:{default:[Ibe]},$$scope:{ctx:r}}}),{c(){e=D("div"),t=D("div"),k(n.$$.fragment),y(t,"class","main svelte-374m3f"),y(e,"class","centered svelte-374m3f")},m(i,s){b(i,e,s),P(e,t),C(n,t,null),l=!0},p(i,s){const o={};s&258&&(o.$$scope={dirty:s,ctx:i}),n.$set(o)},i(i){l||(m(n.$$.fragment,i),l=!0)},o(i){_(n.$$.fragment,i),l=!1},d(i){i&&v(e),S(n)}}}function Cbe(r){let e;const t=r[4].default,n=bt(t,r,r[8],null);return{c(){n&&n.c()},m(l,i){n&&n.m(l,i),e=!0},p(l,i){n&&n.p&&(!e||i&256)&&vt(n,t,l,l[8],e?yt(t,l[8],i,null):wt(l[8]),null)},i(l){e||(m(n,l),e=!0)},o(l){_(n,l),e=!1},d(l){n&&n.d(l)}}}function Sbe(r){let e;return{c(){e=U("You have no automations")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function Abe(r){let e;return{c(){e=U("Let's fix that. Call the bots!")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function Obe(r){let e;return{c(){e=U("Create automation")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function Ibe(r){let e,t,n,l,i,s,o,a,u;return l=new mt({props:{size:"M",$$slots:{default:[Sbe]},$$scope:{ctx:r}}}),s=new Ue({props:{size:"M",$$slots:{default:[Abe]},$$scope:{ctx:r}}}),a=new rt({props:{size:"M",cta:!0,$$slots:{default:[Obe]},$$scope:{ctx:r}}}),a.$on("click",r[5]),{c(){e=de("svg"),t=de("use"),n=N(),k(l.$$.fragment),i=N(),k(s.$$.fragment),o=N(),k(a.$$.fragment),zt(t,"xlink:href","#spectrum-icon-18-WorkflowAdd"),y(e,"width","60px"),y(e,"height","60px"),y(e,"class","spectrum-Icon"),y(e,"focusable","false")},m(f,c){b(f,e,c),P(e,t),b(f,n,c),C(l,f,c),b(f,i,c),C(s,f,c),b(f,o,c),C(a,f,c),u=!0},p(f,c){const p={};c&256&&(p.$$scope={dirty:c,ctx:f}),l.$set(p);const d={};c&256&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const g={};c&256&&(g.$$scope={dirty:c,ctx:f}),a.$set(g)},i(f){u||(m(l.$$.fragment,f),m(s.$$.fragment,f),m(a.$$.fragment,f),u=!0)},o(f){_(l.$$.fragment,f),_(s.$$.fragment,f),_(a.$$.fragment,f),u=!1},d(f){f&&v(e),f&&v(n),S(l,f),f&&v(i),S(s,f),f&&v(o),S(a,f)}}}function $9(r){let e,t,n;return t=new ybe({props:{automation:r[3]}}),{c(){e=D("div"),k(t.$$.fragment),y(e,"class","setup svelte-374m3f")},m(l,i){b(l,e,i),C(t,e,null),n=!0},p(l,i){const s={};i&8&&(s.automation=l[3]),t.$set(s)},i(l){n||(m(t.$$.fragment,l),n=!0)},o(l){_(t.$$.fragment,l),n=!1},d(l){l&&v(e),S(t)}}}function Tbe(r){let e,t;return e=new f9({props:{webhookModal:r[2]}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4&&(i.webhookModal=n[2]),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Ebe(r){let e,t;return e=new A1({}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Pbe(r){let e,t,n,l,i,s,o,a,u,f,c,p,d;n=new dbe({props:{modal:r[1],webhookModal:r[2]}});const g=[Cbe,kbe],h=[];function $(T,I){return T[3]?0:1}s=$(r),o=h[s]=g[s](r);let w=r[0].showTestPanel&&$9(r),A={$$slots:{default:[Tbe]},$$scope:{ctx:r}};f=new It({props:A}),r[6](f);let O={width:"30%",$$slots:{default:[Ebe]},$$scope:{ctx:r}};return p=new It({props:O}),r[7](p),{c(){e=D("div"),t=D("div"),k(n.$$.fragment),l=N(),i=D("div"),o.c(),a=N(),w&&w.c(),u=N(),k(f.$$.fragment),c=N(),k(p.$$.fragment),y(t,"class","nav svelte-374m3f"),y(i,"class","content svelte-374m3f"),y(e,"class","root svelte-374m3f")},m(T,I){b(T,e,I),P(e,t),C(n,t,null),P(e,l),P(e,i),h[s].m(i,null),P(e,a),w&&w.m(e,null),P(e,u),C(f,e,null),P(e,c),C(p,e,null),d=!0},p(T,[I]){const L={};I&2&&(L.modal=T[1]),I&4&&(L.webhookModal=T[2]),n.$set(L);let R=s;s=$(T),s===R?h[s].p(T,I):(Z(),_(h[R],1,1,()=>{h[R]=null}),x(),o=h[s],o?o.p(T,I):(o=h[s]=g[s](T),o.c()),m(o,1),o.m(i,null)),T[0].showTestPanel?w?(w.p(T,I),I&1&&m(w,1)):(w=$9(T),w.c(),m(w,1),w.m(e,u)):w&&(Z(),_(w,1,1,()=>{w=null}),x());const j={};I&260&&(j.$$scope={dirty:I,ctx:T}),f.$set(j);const B={};I&256&&(B.$$scope={dirty:I,ctx:T}),p.$set(B)},i(T){d||(m(n.$$.fragment,T),m(o),m(w),m(f.$$.fragment,T),m(p.$$.fragment,T),d=!0)},o(T){_(n.$$.fragment,T),_(o),_(w),_(f.$$.fragment,T),_(p.$$.fragment,T),d=!1},d(T){T&&v(e),S(n),h[s].d(),w&&w.d(),r[6](null),S(f),r[7](null),S(p)}}}function Lbe(r,e,t){let n,l;ue(r,Dt,p=>t(0,l=p));let{$$slots:i={},$$scope:s}=e,o,a;At(()=>{wn(Dt,l.showTestPanel=!1,l)});const u=()=>o.show();function f(p){te[p?"unshift":"push"](()=>{o=p,t(1,o)})}function c(p){te[p?"unshift":"push"](()=>{a=p,t(2,a)})}return r.$$set=p=>{"$$scope"in p&&t(8,s=p.$$scope)},r.$$.update=()=>{var p;r.$$.dirty&1&&t(3,n=((p=l.selectedAutomation)==null?void 0:p.automation)||l.automations[0])},[l,o,a,n,i,u,f,c,s]}class Nbe extends oe{constructor(e){super();ae(this,e,Lbe,Pbe,re,{})}}function Rbe(r){let e,t,n,l,i,s,o;function a(f){r[4](f)}let u={};return r[2]!==void 0&&(u.value=r[2]),i=new ot({props:u}),te.push(()=>ce(i,"value",a)),{c(){e=D("span"),e.textContent=`The changes you have made will be deleted and the application reverted
|
|
817
|
-
back to its production state.`,t=N(),n=D("span"),n.textContent="Please enter your app name to continue.",l=N(),k(i.$$.fragment)},m(f,c){b(f,e,c),b(f,t,c),b(f,n,c),b(f,l,c),C(i,f,c),o=!0},p(f,c){const p={};!s&&c&4&&(s=!0,p.value=f[2],pe(()=>s=!1)),i.$set(p)},i(f){o||(m(i.$$.fragment,f),o=!0)},o(f){_(i.$$.fragment,f),o=!1},d(f){f&&v(e),f&&v(t),f&&v(n),f&&v(l),S(i,f)}}}function Mbe(r){let e,t;return e=new Mt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[Rbe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&5&&(i.disabled=n[2]!==n[0].name),l&132&&(i.$$scope={dirty:l,ctx:n}),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Dbe(r){let e,t,n,l;e=new Je({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){pt(r[1].show)&&r[1].show.apply(this,arguments)});let i={$$slots:{default:[Mbe]},$$scope:{ctx:r}};return n=new It({props:i}),r[5](n),{c(){k(e.$$.fragment),t=N(),k(n.$$.fragment)},m(s,o){C(e,s,o),b(s,t,o),C(n,s,o),l=!0},p(s,[o]){r=s;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(s){l||(m(e.$$.fragment,s),m(n.$$.fragment,s),l=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),l=!1},d(s){S(e,s),s&&v(t),r[5](null),S(n,s)}}}function Bbe(r,e,t){let n,l;ue(r,He,f=>t(0,l=f));let i,s;const o=async()=>{try{await Ge.revertAppChanges(n);const f=await Ge.fetchAppPackage(n);await He.actions.initialise(f),ye.info("Changes reverted successfully")}catch(f){ye.error(`Error reverting changes: ${f}`)}};function a(f){s=f,t(2,s)}function u(f){te[f?"unshift":"push"](()=>{i=f,t(1,i)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=l.appId)},[l,i,s,o,a,u]}class jbe extends oe{constructor(e){super();ae(this,e,Bbe,Dbe,re,{})}}const zbe="@budibase/client",qbe="1.3.
|
|
817
|
+
back to its production state.`,t=N(),n=D("span"),n.textContent="Please enter your app name to continue.",l=N(),k(i.$$.fragment)},m(f,c){b(f,e,c),b(f,t,c),b(f,n,c),b(f,l,c),C(i,f,c),o=!0},p(f,c){const p={};!s&&c&4&&(s=!0,p.value=f[2],pe(()=>s=!1)),i.$set(p)},i(f){o||(m(i.$$.fragment,f),o=!0)},o(f){_(i.$$.fragment,f),o=!1},d(f){f&&v(e),f&&v(t),f&&v(n),f&&v(l),S(i,f)}}}function Mbe(r){let e,t;return e=new Mt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[Rbe]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&5&&(i.disabled=n[2]!==n[0].name),l&132&&(i.$$scope={dirty:l,ctx:n}),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Dbe(r){let e,t,n,l;e=new Je({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){pt(r[1].show)&&r[1].show.apply(this,arguments)});let i={$$slots:{default:[Mbe]},$$scope:{ctx:r}};return n=new It({props:i}),r[5](n),{c(){k(e.$$.fragment),t=N(),k(n.$$.fragment)},m(s,o){C(e,s,o),b(s,t,o),C(n,s,o),l=!0},p(s,[o]){r=s;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(s){l||(m(e.$$.fragment,s),m(n.$$.fragment,s),l=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),l=!1},d(s){S(e,s),s&&v(t),r[5](null),S(n,s)}}}function Bbe(r,e,t){let n,l;ue(r,He,f=>t(0,l=f));let i,s;const o=async()=>{try{await Ge.revertAppChanges(n);const f=await Ge.fetchAppPackage(n);await He.actions.initialise(f),ye.info("Changes reverted successfully")}catch(f){ye.error(`Error reverting changes: ${f}`)}};function a(f){s=f,t(2,s)}function u(f){te[f?"unshift":"push"](()=>{i=f,t(1,i)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=l.appId)},[l,i,s,o,a,u]}class jbe extends oe{constructor(e){super();ae(this,e,Bbe,Dbe,re,{})}}const zbe="@budibase/client",qbe="1.3.11",Ube="MPL-2.0",Fbe="dist/budibase-client.js",Vbe="dist/budibase-client.js",Hbe="module",Wbe="src/index.js",Gbe={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},Ybe={build:"rollup -c","dev:builder":"rollup -cw"},Xbe={"@budibase/bbui":"^1.3.11","@budibase/frontend-core":"^1.3.11","@budibase/string-templates":"^1.3.11","@spectrum-css/button":"^3.0.3","@spectrum-css/card":"^3.0.3","@spectrum-css/divider":"^1.0.3","@spectrum-css/link":"^3.1.3","@spectrum-css/page":"^3.0.1","@spectrum-css/tag":"^3.1.4","@spectrum-css/typography":"^3.0.2","@spectrum-css/vars":"^3.0.1",apexcharts:"^3.22.1",dayjs:"^1.10.5",downloadjs:"1.4.7",leaflet:"^1.7.1",regexparam:"^1.3.0","rollup-plugin-polyfill-node":"^0.8.0","sanitize-html":"^2.7.0",screenfull:"^6.0.1",shortid:"^2.2.15",svelte:"^3.49.0","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},Jbe={"@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-node-resolve":"^11.2.1",postcss:"^8.2.10",rollup:"^2.44.0","rollup-plugin-json":"^4.0.0","rollup-plugin-postcss":"^4.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-svg":"^2.0.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-visualizer":"^5.5.4"},Qbe="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc";var lo={name:zbe,version:qbe,license:Ube,module:Fbe,main:Vbe,type:Hbe,svelte:Wbe,exports:Gbe,scripts:Ybe,dependencies:Xbe,devDependencies:Jbe,gitHead:Qbe};function b9(r){let e,t;return e=new ql({props:{hoverable:!0,notice:!0,$$slots:{default:[Kbe]},$$scope:{ctx:r}}}),e.$on("click",function(){pt(r[2].show)&&r[2].show.apply(this,arguments)}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){r=n;const i={};l&4096&&(i.$$scope={dirty:l,ctx:r}),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function Kbe(r){let e;return{c(){e=U("Update available")},m(t,n){b(t,e,n)},d(t){t&&v(e)}}}function Zbe(r){let e,t;return e=new Ue({props:{size:"S",$$slots:{default:[e2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4098&&(i.$$scope={dirty:l,ctx:n}),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function xbe(r){let e,t;return e=new Ue({props:{size:"S",$$slots:{default:[t2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4098&&(i.$$scope={dirty:l,ctx:n}),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function e2e(r){let e,t,n=r[1].version+"",l,i;return{c(){e=U("This app is currently using version "),t=D("b"),l=U(n),i=U(` which is the
|
|
818
818
|
latest version available.`)},m(s,o){b(s,e,o),b(s,t,o),P(t,l),b(s,i,o)},p(s,o){o&2&&n!==(n=s[1].version+"")&&ke(l,n)},d(s){s&&v(e),s&&v(t),s&&v(i)}}}function t2e(r){let e,t,n=r[1].version+"",l,i,s,o;return{c(){e=U("This app is currently using version "),t=D("b"),l=U(n),i=U(`, but version
|
|
819
819
|
`),s=D("b"),s.textContent=`${lo.version}`,o=U(` is available. Updates can contain new features,
|
|
820
820
|
performance improvements and bug fixes.`)},m(a,u){b(a,e,u),b(a,t,u),P(t,l),b(a,i,u),b(a,s,u),b(a,o,u)},p(a,u){u&2&&n!==(n=a[1].version+"")&&ke(l,n)},d(a){a&&v(e),a&&v(t),a&&v(i),a&&v(s),a&&v(o)}}}function v9(r){let e,t;return e=new Ue({props:{size:"S",$$slots:{default:[n2e]},$$scope:{ctx:r}}}),{c(){k(e.$$.fragment)},m(n,l){C(e,n,l),t=!0},p(n,l){const i={};l&4098&&(i.$$scope={dirty:l,ctx:n}),e.$set(i)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){S(e,n)}}}function n2e(r){let e,t,n=r[1].revertableVersion+"",l,i;return{c(){e=U(`You can revert this app to version
|
package/builder/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
|
|
11
11
|
rel="stylesheet"
|
|
12
12
|
/>
|
|
13
|
-
<script type="module" crossorigin src="/builder/assets/index.
|
|
13
|
+
<script type="module" crossorigin src="/builder/assets/index.a4ba55ba.js"></script>
|
|
14
14
|
<link rel="modulepreload" href="/builder/assets/vendor.67dbd8fa.js">
|
|
15
15
|
<link rel="stylesheet" href="/builder/assets/vendor.5e1fe644.css">
|
|
16
16
|
<link rel="stylesheet" href="/builder/assets/index.e50bda9f.css">
|
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1662550361652" clover="3.2.0">
|
|
3
|
+
<project timestamp="1662550361652" name="All files">
|
|
4
4
|
<metrics statements="4140" coveredstatements="3035" conditionals="1744" coveredconditionals="963" methods="611" coveredmethods="432" elements="6495" coveredelements="4430" complexity="0" loc="4140" ncloc="4140" packages="22" files="126" classes="126"/>
|
|
5
5
|
<package name="api">
|
|
6
6
|
<metrics statements="35" coveredstatements="34" conditionals="5" coveredconditionals="2" methods="4" coveredmethods="4"/>
|
|
@@ -232,7 +232,7 @@ exports.update = async function (ctx) {
|
|
|
232
232
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
233
233
|
Code coverage generated by
|
|
234
234
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
235
|
-
at
|
|
235
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
236
236
|
</div>
|
|
237
237
|
<script src="../../prettify.js"></script>
|
|
238
238
|
<script>
|
|
@@ -244,7 +244,7 @@ exports.fetchSelf = async ctx => {
|
|
|
244
244
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
245
245
|
Code coverage generated by
|
|
246
246
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
247
|
-
at
|
|
247
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
248
248
|
</div>
|
|
249
249
|
<script src="../../prettify.js"></script>
|
|
250
250
|
<script>
|
|
@@ -925,7 +925,7 @@ exports.test = async function (ctx) {
|
|
|
925
925
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
926
926
|
Code coverage generated by
|
|
927
927
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
928
|
-
at
|
|
928
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
929
929
|
</div>
|
|
930
930
|
<script src="../../prettify.js"></script>
|
|
931
931
|
<script>
|
|
@@ -124,7 +124,7 @@ exports.exportAppDump = async function (ctx) {
|
|
|
124
124
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
125
125
|
Code coverage generated by
|
|
126
126
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
127
|
-
at
|
|
127
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
128
128
|
</div>
|
|
129
129
|
<script src="../../prettify.js"></script>
|
|
130
130
|
<script>
|
|
@@ -409,7 +409,7 @@ exports.importApps = <span class="fstat-no" title="function not covered" >as</sp
|
|
|
409
409
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
410
410
|
Code coverage generated by
|
|
411
411
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
412
|
-
at
|
|
412
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
413
413
|
</div>
|
|
414
414
|
<script src="../../prettify.js"></script>
|
|
415
415
|
<script>
|
|
@@ -184,7 +184,7 @@ exports.fetchAppComponentDefinitions = async function (ctx) {
|
|
|
184
184
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
185
185
|
Code coverage generated by
|
|
186
186
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
187
|
-
at
|
|
187
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
188
188
|
</div>
|
|
189
189
|
<script src="../../prettify.js"></script>
|
|
190
190
|
<script>
|
|
@@ -859,7 +859,7 @@ const buildSchemaHelper = <span class="fstat-no" title="function not covered" >a
|
|
|
859
859
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
860
860
|
Code coverage generated by
|
|
861
861
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
862
|
-
at
|
|
862
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
863
863
|
</div>
|
|
864
864
|
<script src="../../prettify.js"></script>
|
|
865
865
|
<script>
|
|
@@ -475,7 +475,7 @@ exports.getBudibaseVersion = async ctx => {
|
|
|
475
475
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
476
476
|
Code coverage generated by
|
|
477
477
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
478
|
-
at
|
|
478
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
479
479
|
</div>
|
|
480
480
|
<script src="../../prettify.js"></script>
|
|
481
481
|
<script>
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
387
387
|
Code coverage generated by
|
|
388
388
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
389
|
-
at
|
|
389
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
390
390
|
</div>
|
|
391
391
|
<script src="../../prettify.js"></script>
|
|
392
392
|
<script>
|
|
@@ -136,7 +136,7 @@ exports.find = async function (ctx) {
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
139
|
-
at
|
|
139
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
<script src="../../prettify.js"></script>
|
|
142
142
|
<script>
|
|
@@ -211,7 +211,7 @@ exports.destroy = async function (ctx) {
|
|
|
211
211
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
212
212
|
Code coverage generated by
|
|
213
213
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
214
|
-
at
|
|
214
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
215
215
|
</div>
|
|
216
216
|
<script src="../../prettify.js"></script>
|
|
217
217
|
<script>
|
|
@@ -193,7 +193,7 @@ exports.getMetadata = async ctx => {
|
|
|
193
193
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
194
194
|
Code coverage generated by
|
|
195
195
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
196
|
-
at
|
|
196
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
197
197
|
</div>
|
|
198
198
|
<script src="../../prettify.js"></script>
|
|
199
199
|
<script>
|
|
@@ -109,7 +109,7 @@ exports.fetchDefinitions = <span class="fstat-no" title="function not covered" >
|
|
|
109
109
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
110
110
|
Code coverage generated by
|
|
111
111
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
112
|
-
at
|
|
112
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
113
113
|
</div>
|
|
114
114
|
<script src="../../prettify.js"></script>
|
|
115
115
|
<script>
|
|
@@ -595,7 +595,7 @@ exports.removePermission = async function (ctx) {
|
|
|
595
595
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
596
596
|
Code coverage generated by
|
|
597
597
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
598
|
-
at
|
|
598
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
599
599
|
</div>
|
|
600
600
|
<script src="../../prettify.js"></script>
|
|
601
601
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -220,7 +220,7 @@ exports.generateQueryPreviewValidation = () => {
|
|
|
220
220
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
221
221
|
Code coverage generated by
|
|
222
222
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
223
|
-
at
|
|
223
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
224
224
|
</div>
|
|
225
225
|
<script src="../../../prettify.js"></script>
|
|
226
226
|
<script>
|
|
@@ -394,7 +394,7 @@ exports.destroy = async function (ctx) {
|
|
|
394
394
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
395
395
|
Code coverage generated by
|
|
396
396
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
397
|
-
at
|
|
397
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
398
398
|
</div>
|
|
399
399
|
<script src="../../prettify.js"></script>
|
|
400
400
|
<script>
|
|
@@ -346,7 +346,7 @@ exports.clientFetch = async ctx => {
|
|
|
346
346
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
347
347
|
Code coverage generated by
|
|
348
348
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
349
|
-
at
|
|
349
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
350
350
|
</div>
|
|
351
351
|
<script src="../../prettify.js"></script>
|
|
352
352
|
<script>
|
|
@@ -829,7 +829,7 @@ exports.fetchEnrichedRow = <span class="fstat-no" title="function not covered" >
|
|
|
829
829
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
830
830
|
Code coverage generated by
|
|
831
831
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
832
|
-
at
|
|
832
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
833
833
|
</div>
|
|
834
834
|
<script src="../../../prettify.js"></script>
|
|
835
835
|
<script>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
162
162
|
Code coverage generated by
|
|
163
163
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
164
|
-
at
|
|
164
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
165
165
|
</div>
|
|
166
166
|
<script src="../../../prettify.js"></script>
|
|
167
167
|
<script>
|
|
@@ -1477,7 +1477,7 @@ exports.fetchEnrichedRow = async ctx => {
|
|
|
1477
1477
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1478
1478
|
Code coverage generated by
|
|
1479
1479
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1480
|
-
at
|
|
1480
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
1481
1481
|
</div>
|
|
1482
1482
|
<script src="../../../prettify.js"></script>
|
|
1483
1483
|
<script>
|
|
@@ -1576,7 +1576,7 @@ exports.fullSearch = async (query, params) => {
|
|
|
1576
1576
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1577
1577
|
Code coverage generated by
|
|
1578
1578
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1579
|
-
at
|
|
1579
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
1580
1580
|
</div>
|
|
1581
1581
|
<script src="../../../prettify.js"></script>
|
|
1582
1582
|
<script>
|
|
@@ -538,7 +538,7 @@ exports.finaliseRow = async (
|
|
|
538
538
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
539
539
|
Code coverage generated by
|
|
540
540
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
541
|
-
at
|
|
541
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
542
542
|
</div>
|
|
543
543
|
<script src="../../../prettify.js"></script>
|
|
544
544
|
<script>
|
|
@@ -364,7 +364,7 @@ exports.validate = async ({ tableId, row, table }) => {
|
|
|
364
364
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
365
365
|
Code coverage generated by
|
|
366
366
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
367
|
-
at
|
|
367
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
368
368
|
</div>
|
|
369
369
|
<script src="../../../prettify.js"></script>
|
|
370
370
|
<script>
|
|
@@ -244,7 +244,7 @@ exports.destroy = async ctx => {
|
|
|
244
244
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
245
245
|
Code coverage generated by
|
|
246
246
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
247
|
-
at
|
|
247
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
248
248
|
</div>
|
|
249
249
|
<script src="../../prettify.js"></script>
|
|
250
250
|
<script>
|
|
@@ -103,7 +103,7 @@ exports.save = <span class="fstat-no" title="function not covered" >as</span>ync
|
|
|
103
103
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
104
104
|
Code coverage generated by
|
|
105
105
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
106
|
-
at
|
|
106
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
107
107
|
</div>
|
|
108
108
|
<script src="../../prettify.js"></script>
|
|
109
109
|
<script>
|
|
@@ -589,7 +589,7 @@ exports.runStaticFormulaChecks = async (table, { oldTable, deletion }) => {
|
|
|
589
589
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
590
590
|
Code coverage generated by
|
|
591
591
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
592
|
-
at
|
|
592
|
+
at Wed Sep 07 2022 11:32:41 GMT+0000 (Coordinated Universal Time)
|
|
593
593
|
</div>
|
|
594
594
|
<script src="../../../prettify.js"></script>
|
|
595
595
|
<script>
|