@budibase/server 1.0.91-alpha.14 → 1.0.91-alpha.17
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.b7350ac1.js → index.16b92c9c.js} +2 -2
- package/builder/index.html +1 -1
- package/coverage/clover.xml +112 -112
- package/coverage/coverage-final.json +11 -11
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/application.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 +4 -4
- 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/index.js.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/index.js.html +20 -20
- package/coverage/lcov-report/api/controllers/row/internal.js.html +30 -30
- 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 +6 -6
- 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/table/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/utils.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/application.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/index.js.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/row.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/static.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/createRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/deleteRow.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/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 +3 -3
- package/coverage/lcov-report/automations/utils.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/client.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 +11 -11
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +7 -7
- package/coverage/lcov-report/db/newid.js.html +2 -2
- package/coverage/lcov-report/db/utils.js.html +3 -3
- 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/authorized.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/usageQuota.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.html +1 -1
- package/coverage/lcov-report/threads/index.js.html +1 -1
- package/coverage/lcov-report/threads/query.js.html +1 -1
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/bcrypt.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 +24 -24
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +8 -8
- 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/index.js.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/coverage/lcov.info +177 -177
- package/dist/api/controllers/public/rows.js +2 -2
- package/dist/package.json +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/api/controllers/public/rows.ts +2 -4
- package/src/definitions/openapi.ts +472 -472
|
@@ -1225,7 +1225,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
1225
1225
|
Please ensure you have enabled row selection in the table settings.`)},m(i,l){$(i,e,l),$(i,t,l),$(i,n,l)},d(i){i&&b(e),i&&b(t),i&&b(n)}}}function Nne(r){let e;return{c(){e=V("Table")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Rne(r){let e;return{c(){e=V("Export as")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Mne(r){let e,t,n,i,l,s,o,a,u,f,c,p,d,g;t=new Ke({props:{size:"S",$$slots:{default:[Pne]},$$scope:{ctx:r}}}),l=new Ze({props:{small:!0,$$slots:{default:[Nne]},$$scope:{ctx:r}}});function h(I){r[6](I)}let v={options:r[1]};r[0].tableComponentId!==void 0&&(v.value=r[0].tableComponentId),o=new Xe({props:v}),K.push(()=>ce(o,"value",h)),f=new Ze({props:{small:!0,$$slots:{default:[Rne]},$$scope:{ctx:r}}});function k(I){r[7](I)}let C={options:r[2]};return r[0].type!==void 0&&(C.value=r[0].type),p=new Xe({props:C}),K.push(()=>ce(p,"value",k)),{c(){e=D("div"),S(t.$$.fragment),n=R(),i=D("div"),S(l.$$.fragment),s=R(),S(o.$$.fragment),u=R(),S(f.$$.fragment),c=R(),S(p.$$.fragment),w(i,"class","params svelte-zlqv5b"),w(e,"class","root svelte-zlqv5b")},m(I,O){$(I,e,O),A(t,e,null),N(e,n),N(e,i),A(l,i,null),N(i,s),A(o,i,null),N(i,u),A(f,i,null),N(i,c),A(p,i,null),g=!0},p(I,[O]){const T={};O&256&&(T.$$scope={dirty:O,ctx:I}),t.$set(T);const P={};O&256&&(P.$$scope={dirty:O,ctx:I}),l.$set(P);const M={};O&2&&(M.options=I[1]),!a&&O&1&&(a=!0,M.value=I[0].tableComponentId,pe(()=>a=!1)),o.$set(M);const F={};O&256&&(F.$$scope={dirty:O,ctx:I}),f.$set(F);const j={};!d&&O&1&&(d=!0,j.value=I[0].type,pe(()=>d=!1)),p.$set(j)},i(I){g||(m(t.$$.fragment,I),m(l.$$.fragment,I),m(o.$$.fragment,I),m(f.$$.fragment,I),m(p.$$.fragment,I),g=!0)},o(I){_(t.$$.fragment,I),_(l.$$.fragment,I),_(o.$$.fragment,I),_(f.$$.fragment,I),_(p.$$.fragment,I),g=!1},d(I){I&&b(e),E(t),E(l),E(o),E(f),E(p)}}}function Dne(r,e,t){let n,i,l,s;ue(r,un,c=>t(5,s=c));let{parameters:o}=e;const a=[{label:"CSV",value:"csv"},{label:"JSON",value:"json"}];Gt(()=>{o.type||t(0,o.type="csv",o)});function u(c){r.$$.not_equal(o.tableComponentId,c)&&(o.tableComponentId=c,t(0,o))}function f(c){r.$$.not_equal(o.type,c)&&(o.type=c,t(0,o))}return r.$$set=c=>{"parameters"in c&&t(0,o=c.parameters)},r.$$.update=()=>{r.$$.dirty&32&&t(4,n=Kl(s==null?void 0:s.props,c=>c._component.endsWith("table")).map(c=>({label:c._instanceName,value:c._id}))),r.$$.dirty&32&&t(3,i=Kl(s==null?void 0:s.props,c=>c._component.endsWith("tableblock")).map(c=>({label:c._instanceName,value:`${c._id}-table`}))),r.$$.dirty&24&&t(1,l=n.concat(i))},[o,l,a,i,n,s,u,f]}class jne extends ie{constructor(e){super();le(this,e,Dne,Mne,re,{parameters:0})}}var Bne=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",NavigateTo:jee,SaveRow:xee,DeleteRow:ate,ExecuteQuery:_te,TriggerAutomation:Ete,ValidateForm:Nte,LogOut:zte,ClearForm:Wte,CloseScreenModal:Qte,ChangeFormStep:rne,UpdateState:fne,RefreshDataProvider:_ne,DuplicateRow:Sne,S3Upload:Lne,ExportData:jne});const zne=(r=!1)=>bv.actions.filter(e=>{var t;return r||!e.dependsOnFeature?!0:((t=it(He).clientFeatures)==null?void 0:t[e.dependsOnFeature])===!0}).map(e=>lt(Se({},e),{component:Bne[e.component]})).filter(e=>e.component!=null);function tw(r,e,t){const n=r.slice();return n[13]=e[t],n}function nw(r,e,t){const n=r.slice();return n[16]=e[t],n[18]=t,n}function rw(r){let e=r[1].id,t,n,i=iw(r);return{c(){i.c(),t=Ee()},m(l,s){i.m(l,s),$(l,t,s),n=!0},p(l,s){s&2&&re(e,e=l[1].id)?(te(),_(i,1,1,Oe),ne(),i=iw(l),i.c(),m(i),i.m(t.parentNode,t)):i.p(l,s)},i(l){n||(m(i),n=!0)},o(l){_(i),n=!1},d(l){l&&b(t),i.d(l)}}}function iw(r){let e,t,n;var i=r[2];function l(s){return{props:{parameters:s[1].parameters,bindings:s[3]}}}return i&&(t=new i(l(r))),{c(){e=D("div"),t&&S(t.$$.fragment),w(e,"class","selected-action-container")},m(s,o){$(s,e,o),t&&A(t,e,null),n=!0},p(s,o){const a={};if(o&2&&(a.parameters=s[1].parameters),o&8&&(a.bindings=s[3]),i!==(i=s[2])){if(t){te();const u=t;_(u.$$.fragment,1,0,()=>{E(u,1)}),ne()}i?(t=new i(l(s)),S(t.$$.fragment),m(t.$$.fragment,1),A(t,e,null)):t=null}else i&&t.$set(a)},i(s){n||(t&&m(t.$$.fragment,s),n=!0)},o(s){t&&_(t.$$.fragment,s),n=!1},d(s){s&&b(e),t&&E(t)}}}function qne(r){let e,t,n=r[2]&&rw(r);return{c(){n&&n.c(),e=Ee()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,l){i[2]?n?(n.p(i,l),l&4&&m(n,1)):(n=rw(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(te(),_(n,1,1,()=>{n=null}),ne())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function Une(r){let e,t;return e=new Qe({props:{noPadding:!0,$$slots:{default:[qne]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&524302&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function lw(r){let e,t=[],n=new Map,i,l,s,o,a=r[0];const u=f=>f[16].id;for(let f=0;f<a.length;f+=1){let c=nw(r,a,f),p=u(c);n.set(p,t[f]=sw(p,c))}return{c(){e=D("div");for(let f=0;f<t.length;f+=1)t[f].c();w(e,"class","actions svelte-1dgx8bt")},m(f,c){$(f,e,c);for(let p=0;p<t.length;p+=1)t[p].m(e,null);l=!0,s||(o=[wr(i=Iu.call(null,e,{items:r[0],flipDurationMs:E1,dropTargetStyle:{outline:"none"}})),Pe(e,"consider",r[8]),Pe(e,"finalize",r[9])],s=!0)},p(f,c){if(c&163){a=f[0],te();for(let p=0;p<t.length;p+=1)t[p].r();t=xn(t,c,u,1,f,a,n,e,Bo,sw,null,nw);for(let p=0;p<t.length;p+=1)t[p].a();ne()}i&&mt(i.update)&&c&1&&i.update.call(null,{items:f[0],flipDurationMs:E1,dropTargetStyle:{outline:"none"}})},i(f){if(!l){for(let c=0;c<a.length;c+=1)m(t[c]);l=!0}},o(f){for(let c=0;c<t.length;c+=1)_(t[c]);l=!1},d(f){f&&b(e);for(let c=0;c<t.length;c+=1)t[c].d();s=!1,Tn(o)}}}function sw(r,e){let t,n,i,l,s=e[18]+1+"",o,a,u=e[16][Zf]+"",f,c,p,d,g,h=Oe,v,k,C;n=new ct({props:{name:"DragHandle",size:"XL"}});function I(){return e[12](e[18])}return p=new ct({props:{name:"Close",hoverable:!0,size:"S"}}),p.$on("click",I),{key:r,first:null,c(){t=D("div"),S(n.$$.fragment),i=R(),l=D("div"),o=V(s),a=V(".\xA0"),f=V(u),c=R(),S(p.$$.fragment),d=R(),w(l,"class","action-header svelte-1dgx8bt"),w(t,"class","action-container svelte-1dgx8bt"),oe(t,"selected",e[16]===e[1]),this.first=t},m(O,T){$(O,t,T),A(n,t,null),N(t,i),N(t,l),N(l,o),N(l,a),N(l,f),N(t,c),A(p,t,null),N(t,d),v=!0,k||(C=Pe(t,"click",function(){mt(e[7](e[16]))&&e[7](e[16]).apply(this,arguments)}),k=!0)},p(O,T){e=O,(!v||T&1)&&s!==(s=e[18]+1+"")&&Te(o,s),(!v||T&1)&&u!==(u=e[16][Zf]+"")&&Te(f,u),T&3&&oe(t,"selected",e[16]===e[1])},r(){g=t.getBoundingClientRect()},f(){zo(t),h()},a(){h(),h=qo(t,g,Uo,{duration:E1})},i(O){v||(m(n.$$.fragment,O),m(p.$$.fragment,O),v=!0)},o(O){_(n.$$.fragment,O),_(p.$$.fragment,O),v=!1},d(O){O&&b(t),E(n),E(p),k=!1,C()}}}function Fne(r){let e=r[13].name+"",t,n;return{c(){t=V(e),n=R()},m(i,l){$(i,t,l),$(i,n,l)},p:Oe,d(i){i&&b(t),i&&b(n)}}}function ow(r){let e,t;return e=new Qt({props:{$$slots:{default:[Fne]},$$scope:{ctx:r}}}),e.$on("click",r[6](r[13])),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&524288&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Vne(r){let e,t,n=r[4],i=[];for(let s=0;s<n.length;s+=1)i[s]=ow(tw(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=Ee()},m(s,o){for(let a=0;a<i.length;a+=1)i[a].m(s,o);$(s,e,o),t=!0},p(s,o){if(o&80){n=s[4];let a;for(a=0;a<n.length;a+=1){const u=tw(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=ow(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){$t(i,s),s&&b(e)}}}function Hne(r){let e;return{c(){e=V("Add Action")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Wne(r){let e,t;return e=new gt({props:{slot:"control",secondary:!0,$$slots:{default:[Hne]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&524288&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Gne(r){let e,t,n,i=r[0]&&r[0].length>0&&lw(r);return t=new yr({props:{$$slots:{control:[Wne],default:[Vne]},$$scope:{ctx:r}}}),{c(){i&&i.c(),e=R(),S(t.$$.fragment)},m(l,s){i&&i.m(l,s),$(l,e,s),A(t,l,s),n=!0},p(l,s){l[0]&&l[0].length>0?i?(i.p(l,s),s&1&&m(i,1)):(i=lw(l),i.c(),m(i,1),i.m(e.parentNode,e)):i&&(te(),_(i,1,1,()=>{i=null}),ne());const o={};s&524288&&(o.$$scope={dirty:s,ctx:l}),t.$set(o)},i(l){n||(m(i),m(t.$$.fragment,l),n=!0)},o(l){_(i),_(t.$$.fragment,l),n=!1},d(l){i&&i.d(l),l&&b(e),E(t,l)}}}function Yne(r){let e,t;return e=new Qe({props:{noPadding:!0,gap:"S",slot:"sidebar",$$slots:{default:[Gne]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&524291&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Jne(r){let e,t;return e=new Ai({props:{$$slots:{sidebar:[Yne],default:[Une]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&524303&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}const E1=150,Zf="##eventHandlerType";function Qne(r,e,t){let n,i,l;const s=zne();let{actions:o}=e,{bindings:a=[]}=e,u=(o==null?void 0:o.length)?o[0]:null;const f=v=>{o.splice(v,1),t(0,o)},c=v=>()=>{const k={parameters:{},[Zf]:v.name,id:Br.generate()};o||t(0,o=[]),t(0,o=[...o,k]),t(1,u=k)},p=v=>()=>{t(1,u=v)};function d(v){t(0,o=v.detail.items)}function g(v){t(0,o=v.detail.items)}const h=v=>f(v);return r.$$set=v=>{"actions"in v&&t(0,o=v.actions),"bindings"in v&&t(10,a=v.bindings)},r.$$.update=()=>{var v;r.$$.dirty&3&&u&&!(o==null?void 0:o.includes(u))&&t(1,u=o==null?void 0:o[0]),r.$$.dirty&3&&t(11,n=_q(o,u==null?void 0:u.id)),r.$$.dirty&3072&&t(3,i=n.concat(a)),r.$$.dirty&1&&o&&o.forEach(k=>{k.id||(k.id=Br.generate())}),r.$$.dirty&2&&t(2,l=u&&((v=s.find(k=>k.name===u[Zf]))==null?void 0:v.component))},[o,u,l,i,s,f,c,p,d,g,a,n,h]}class Xne extends ie{constructor(e){super();le(this,e,Qne,Jne,re,{actions:0,bindings:10})}}function Kne(r){let e;return{c(){e=V("Define actions")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Zne(r){let e;return{c(){e=V("Define what actions to run.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function xne(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ere(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[xne]},$$scope:{ctx:r}}}),e.$on("click",r[5]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4096&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function tre(r){let e,t,n;function i(s){r[7](s)}let l={slot:"body",eventType:r[0],bindings:r[1]};return r[3]!==void 0&&(l.actions=r[3]),e=new Xne({props:l}),K.push(()=>ce(e,"actions",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};o&1&&(a.eventType=s[0]),o&2&&(a.bindings=s[1]),!t&&o&8&&(t=!0,a.actions=s[3],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function nre(r){let e,t,n,i;e=new Jt({props:{$$slots:{default:[Kne]},$$scope:{ctx:r}}}),e.$on("click",r[4]);let l={title:"Actions",$$slots:{body:[tre],buttons:[ere],description:[Zne]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[8](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){const a={};o&4096&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const u={};o&4107&&(u.$$scope={dirty:o,ctx:s}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[8](null),E(n,s)}}}function rre(r,e,t){let n;ue(r,Zt,h=>t(9,n=h));const i=ht();let{value:l=[]}=e,{name:s}=e,{bindings:o}=e,a,u;const f=()=>{t(3,u=vn.cloneDeep(l)),a.show()},c=async()=>{const h=u.filter(v=>v["##eventHandlerType"]==="Trigger Automation");for(let v of h)await p(v.parameters);i("change",u),we.success("Component actions saved."),a.hide()},p=async h=>{var v;if(!(h.automationId||!h.newAutomationName))try{await Zt.actions.create({name:h.newAutomationName});const k=n.blockDefinitions.TRIGGER.APP,C=n.selectedAutomation.constructBlock("TRIGGER","APP",k);C.inputs={fields:Object.keys(h.fields).reduce((I,O)=>(I[O]="string",I),{})},Zt.actions.addBlockToAutomation(C),await Zt.actions.save((v=n.selectedAutomation)==null?void 0:v.automation),h.automationId=n.selectedAutomation.automation._id,delete h.newAutomationName}catch{we.error("Error creating automation")}};function d(h){u=h,t(3,u)}function g(h){K[h?"unshift":"push"](()=>{a=h,t(2,a)})}return r.$$set=h=>{"value"in h&&t(6,l=h.value),"name"in h&&t(0,s=h.name),"bindings"in h&&t(1,o=h.bindings)},[s,o,a,u,f,c,l,d,g]}class ire extends ie{constructor(e){super();le(this,e,rre,nre,re,{value:6,name:0,bindings:1})}}function aw(r,e,t){const n=r.slice();return n[3]=e[t],n}function uw(r){let e,t=r[3].name+"",n,i;return{c(){e=D("option"),n=V(t),e.__value=i=r[3]._id,e.value=e.__value},m(l,s){$(l,e,s),N(e,n)},p(l,s){s&2&&t!==(t=l[3].name+"")&&Te(n,t),s&2&&i!==(i=l[3]._id)&&(e.__value=i,e.value=e.__value)},d(l){l&&b(e)}}}function lre(r){let e,t,n,i=r[1].list,l=[];for(let s=0;s<i.length;s+=1)l[s]=uw(aw(r,i,s));return{c(){e=D("option"),e.textContent="Choose a table",t=R();for(let s=0;s<l.length;s+=1)l[s].c();n=Ee(),e.__value="",e.value=e.__value},m(s,o){$(s,e,o),$(s,t,o);for(let a=0;a<l.length;a+=1)l[a].m(s,o);$(s,n,o)},p(s,o){if(o&2){i=s[1].list;let a;for(a=0;a<i.length;a+=1){const u=aw(s,i,a);l[a]?l[a].p(u,o):(l[a]=uw(u),l[a].c(),l[a].m(n.parentNode,n))}for(;a<l.length;a+=1)l[a].d(1);l.length=i.length}},d(s){s&&b(e),s&&b(t),$t(l,s),s&&b(n)}}}function sre(r){let e,t,n;return t=new Xe({props:{extraThin:!0,secondary:!0,wide:!0,value:r[0],$$slots:{default:[lre]},$$scope:{ctx:r}}}),t.$on("change",r[2]),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","svelte-16jzcsd")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,[l]){const s={};l&1&&(s.value=i[0]),l&66&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function ore(r,e,t){let n;ue(r,Ot,s=>t(1,n=s));let{value:i}=e;function l(s){ft.call(this,r,s)}return r.$$set=s=>{"value"in s&&t(0,i=s.value)},[i,n,l]}class are extends ie{constructor(e){super();le(this,e,ore,sre,re,{value:0})}}function ure(r){let e,t;return e=new Jl({props:{value:r[0],spectrumTheme:r[1].theme}}),e.$on("change",r[2]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&1&&(l.value=n[0]),i&2&&(l.spectrumTheme=n[1].theme),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function fre(r,e,t){let n;ue(r,He,s=>t(1,n=s));let{value:i}=e;function l(s){ft.call(this,r,s)}return r.$$set=s=>{"value"in s&&t(0,i=s.value)},[i,n,l]}class O1 extends ie{constructor(e){super();le(this,e,fre,ure,re,{value:0})}}var fw={Buildings:{home:["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-2":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-3":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-4":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-5":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-6":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-7":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-8":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-gear":["house","\u623F\u5B50","\u5DE5\u5382"],"home-wifi":["smart home","\u623F\u5B50","\u5BB6\u5177","\u667A\u80FD\u5BB6\u5C45"],"home-smile":["house","smart home","smile","\u623F\u5B50","\u667A\u80FD\u5BB6\u5C45","\u5FAE\u7B11"],"home-smile-2":["house","smart home","smile","\u623F\u5B50","\u667A\u80FD\u5BB6\u5C45","\u5FAE\u7B11"],"home-heart":["house","\u5FC3","\u623F\u5B50","\u5BB6","\u4E3B\u9875","\u5B64\u513F\u9662"],building:["city","office","enterprise","\u5EFA\u7B51","\u57CE\u5E02","\u697C","\u529E\u516C\u697C","\u5199\u5B57\u697C","\u4F01\u4E1A"],"building-2":["city","office","construction","enterprise","\u57CE\u5E02","\u5EFA\u7B51","\u697C","\u4F01\u4E1A"],"building-3":["factory","plant","enterprise","\u5DE5\u5382","\u5EFA\u7B51","\u697C","\u4F01\u4E1A"],"building-4":["city","office","enterprise","\u5EFA\u7B51","\u57CE\u5E02","\u697C","\u529E\u516C\u697C","\u5199\u5B57\u697C","\u4F01\u4E1A"],hotel:["building","hotel","office","enterprise","tavern","\u5EFA\u7B51","\u9152\u5E97","\u697C","\u529E\u516C\u697C","\u5199\u5B57\u697C","\u4F01\u4E1A"],community:["building","hotel","\u793E\u533A","\u5EFA\u7B51","\u9152\u5E97"],government:["building","\u653F\u5E9C","\u5EFA\u7B51","\u5927\u4F1A\u5802"],bank:["bank","finance","savings","banking","\u94F6\u884C","\u4EA4\u6613\u6240"],store:["shop","mall","supermarket","\u5546\u5E97","\u8D85\u5E02","\u5E97\u94FA","\u5546\u5BB6"],"store-2":["shop","mall","supermarket","\u5546\u5E97","\u8D85\u5E02","\u5E97\u94FA","\u5546\u5BB6"],"store-3":["shop","mall","supermarket","\u5546\u5E97","\u8D85\u5E02","\u5E97\u94FA","\u5546\u5BB6"],hospital:["medical","health","\u533B\u9662"],"ancient-gate":["historical","genre","scenic","trip","travel","\u65C5\u884C","\u65C5\u6E38","\u57CE\u95E8","\u53E4\u4EE3","\u5386\u53F2","\u666F\u533A"],"ancient-pavilion":["historical","genre","scenic","trip","travel","\u65C5\u884C","\u65C5\u6E38","\u51C9\u4EAD","\u53E4\u4EE3","\u5386\u53F2","\u666F\u533A"]},Business:{mail:["envelope","email","inbox","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u6536\u4EF6\u7BB1"],"mail-open":["envelope","email","inbox","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u6536\u4EF6\u7BB1"],"mail-send":["envelope","email","inbox","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u53D1\u9001","\u53D1\u4EF6\u7BB1"],"mail-unread":["envelope","email","inbox","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u672A\u8BFB"],"mail-add":["envelope","email","inbox","add","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u65B0\u589E","\u6DFB\u52A0"],"mail-check":["envelope","email","inbox","read","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u5DF2\u8BFB"],"mail-close":["envelope","email","inbox","failed","x","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u5931\u8D25"],"mail-download":["envelope","email","inbox","download","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u4E0B\u8F7D"],"mail-forbid":["envelope","email","inbox","privacy","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u7981\u6B62"],"mail-lock":["envelope","email","inbox","lock","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u52A0\u5BC6"],"mail-settings":["envelope","email","inbox","settings","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u8BBE\u7F6E"],"mail-star":["envelope","email","inbox","favorite","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u6536\u85CF","\u559C\u6B22"],"mail-volume":["envelope","email","inbox","promotional email","email campaign","subscription","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u6536\u4EF6\u7BB1","\u63A8\u5E7F","\u8BA2\u9605"],inbox:["\u6536\u4EF6\u7BB1"],"inbox-archive":["\u6536\u4EF6\u7BB1","\u5F52\u6863","\u6536\u7EB3"],"inbox-unarchive":["unzip","unpack","extract","\u6536\u4EF6\u7BB1","\u53D6\u6D88\u5F52\u6863","\u8FD8\u539F","\u89E3\u538B\u7F29"],cloud:["weather","\u4E91\u7AEF"],"cloud-off":["offline-mode","connection-fail","slash","weather","\u4E91\u7AEF","\u65AD\u7F51","\u65E0\u4FE1\u53F7","\u8FDE\u63A5\u5931\u8D25"],attachment:["annex","paperclip","\u9644\u4EF6","\u66F2\u522B\u9488"],profile:["id","\u6863\u6848","\u8D44\u6599","\u8EAB\u4EFD\u8BC1","\u8BC1\u4EF6"],archive:["box","\u6536\u7EB3","\u5F52\u6863","\u5B58\u6863","\u76D2\u5B50","\u7EB8\u7BB1"],"archive-drawer":["night table","\u6536\u7EB3","\u62BD\u5C49","\u5F52\u6863","\u5B58\u6863","\u5E8A\u5934\u67DC"],at:["@","mention","\u63D0\u5230","\u5728"],award:["medal","achievement","badge","\u6210\u5C31","\u5956\u724C","\u91D1\u724C","\u52CB\u7AE0"],medal:["award","achievement","badge","\u6210\u5C31","\u5956\u724C","\u91D1\u724C","\u52CB\u7AE0"],"medal-2":["award","achievement","badge","\u6210\u5C31","\u5956\u724C","\u91D1\u724C","\u52CB\u7AE0"],"bar-chart":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u97F5\u5F8B","\u8282\u594F"],"bar-chart-horizontal":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u97F5\u5F8B","\u8282\u594F"],"bar-chart-2":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u6392\u884C","\u8282\u594F"],"bar-chart-box":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u8282\u594F"],"bar-chart-grouped":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u5206\u7EC4"],"bubble-chart":["data","analysis","statistics","\u6C14\u6CE1\u56FE","\u7EDF\u8BA1"],"pie-chart":["data","analysis","\u997C\u56FE","\u997C\u72B6\u56FE","\u6570\u636E","\u5206\u6790"],"pie-chart-2":["data","analysis","\u997C\u56FE","\u997C\u72B6\u56FE","\u6570\u636E","\u5206\u6790"],"pie-chart-box":["data","analysis","\u997C\u56FE","\u997C\u72B6\u56FE","\u6570\u636E","\u5206\u6790"],"donut-chart":["data","analysis","\u73AF\u5F62\u56FE","\u6570\u636E","\u5206\u6790"],"line-chart":["data","analysis","stats","\u6298\u7EBF\u56FE","\u6570\u636E","\u5206\u6790"],bookmark:["tag","\u4E66\u7B7E","\u6807\u8BB0"],"bookmark-2":["tag","\u4E66\u7B7E","\u6807\u8BB0"],"bookmark-3":["tag","\u4E66\u7B7E","\u6807\u8BB0","\u8363\u8A89"],briefcase:["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],"briefcase-2":["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],"briefcase-3":["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],"briefcase-4":["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],"briefcase-5":["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],calculator:["\u8BA1\u7B97\u5668","\u8BA1\u7B97\u673A"],calendar:["date","plan","schedule","agenda","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868"],"calendar-2":["date","plan","schedule","agenda","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868"],"calendar-event":["date","plan","schedule","agenda","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868"],"calendar-todo":["date","plan","schedule","agenda","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868"],"calendar-check":["date","plan","schedule","agenda","check-in","punch","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868","\u7B7E\u5230","\u6253\u5361"],"customer-service":["headset","\u5BA2\u670D","\u552E\u540E","\u8033\u673A","\u8033\u9EA6"],"customer-service-2":["headset","\u5BA2\u670D","\u552E\u540E","\u8033\u673A","\u8033\u9EA6"],flag:["banner","pin","\u65D7\u5E1C","\u65D7\u5B50","\u56FD\u65D7","\u6807\u8BB0"],"flag-2":["banner","pin","\u65D7\u5E1C","\u65D7\u5B50","\u56FD\u65D7","\u6807\u8BB0"],global:["earth","union","world","language","\u5730\u7403","\u8054\u5408","\u4E16\u754C","\u5168\u7403","\u8BED\u8A00"],honour:["honor","glory","\u9526\u65D7","\u8363\u8A89","\u8363\u8000","\u519B\u8854"],links:["connection","address","\u8054\u7CFB","\u94FE\u63A5","\u5730\u5740"],printer:["\u6253\u5370\u673A"],"printer-cloud":["\u6253\u5370\u673A","\u4E91\u6253\u5370"],"record-mail":["voice mail","tape","\u5F55\u97F3","\u7559\u8A00","\u8BED\u97F3\u4FE1\u7BB1","\u78C1\u5E26"],reply:["forward","\u56DE\u590D\u5168\u90E8","\u56DE\u590D\u6240\u6709"],"reply-all":["forward","\u56DE\u590D","\u7B54\u590D","\u7559\u8A00","\u8F6C\u53D1"],"send-plane":["\u53D1\u9001","\u7EB8\u98DE\u673A"],"send-plane-2":["\u53D1\u9001","\u7EB8\u98DE\u673A"],projector:["projection","meeting","\u6295\u5F71\u4EEA","\u4F1A\u8BAE\u5BA4"],"projector-2":["projection","meeting","\u6295\u5F71\u4EEA","\u4F1A\u8BAE\u5BA4","\u6781\u7C73"],slideshow:["presentation","meeting","PPT","keynote","\u6295\u5F71","\u653E\u6620","\u6F14\u793A","\u6F14\u8BB2","\u5E7B\u706F\u7247","\u4F1A\u8BAE\u5BA4"],"slideshow-2":["presentation","meeting","\u6295\u5F71","\u653E\u6620","\u6F14\u793A","\u6F14\u8BB2","\u5E7B\u706F\u7247","\u4F1A\u8BAE\u5BA4"],"slideshow-3":["presentation","meeting","\u6295\u5F71","\u653E\u6620","\u6F14\u793A","\u6F14\u8BB2","\u89C6\u9891\u4F1A\u8BAE","\u5E7B\u706F\u7247","\u4F1A\u8BAE\u5BA4"],"slideshow-4":["presentation","meeting","\u6295\u5F71","\u653E\u6620","\u6F14\u793A","\u6F14\u8BB2","\u53EF\u89C6\u5BF9\u8BB2","\u5E7B\u706F\u7247","\u4F1A\u8BAE\u5BA4"],window:["browser","program","web","\u7A97\u53E3","\u6D4F\u89C8\u5668","\u7A0B\u5E8F","\u7F51\u7AD9"],"window-2":["browser","program","web","\u7A97\u53E3","\u6D4F\u89C8\u5668","\u7A0B\u5E8F","\u7F51\u7AD9"],stack:["layers","\u56FE\u5C42","\u53E0\u52A0","\u5806\u6808"],service:["heart","handshake","cooperation","\u670D\u52A1","\u63E1\u624B","\u5FC3","\u5408\u4F5C"],registered:["\u6CE8\u518C","\u5546\u6807"],trademark:["\u6CE8\u518C","\u5546\u6807"],advertisement:["ad","\u5E7F\u544A","\u63A8\u5E7F"],copyleft:["\u8457\u4F50\u6743"],copyright:["\u7248\u6743"],"creative-commons":["\u77E5\u8BC6\u5171\u4EAB"],"creative-commons-by":["attribution","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB","\u7F72\u540D"],"creative-commons-nc":["noncommercial","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB","\u975E\u5546\u4E1A\u7528\u9014"],"creative-commons-nd":["no derivative works","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB","\u7981\u6B62\u6F14\u7ECE"],"creative-commons-sa":["share alike","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB","\u76F8\u540C\u65B9\u5F0F\u5171\u4EAB"],"creative-commons-zero":["cc0","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB"]},Communication:{"chat-1":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-2":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-3":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-4":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],message:["chat","comment","reply","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"message-2":["chat","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"message-3":["chat","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-check":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u5DF2\u9605"],"chat-delete":["message","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u6E05\u9664","\u5220\u9664"],"chat-forward":["message","comment","\u6D88\u606F","\u804A\u5929","\u8F6C\u53D1"],"chat-upload":["message","comment","\u6D88\u606F","\u804A\u5929","\u4E0A\u4F20"],"chat-download":["message","comment","\u6D88\u606F","\u4E0B\u8F7D"],"chat-new":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-settings":["message","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u8BBE\u7F6E"],"chat-smile":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-smile-2":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-smile-3":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-heart":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u5FC3","\u70B9\u8D5E","\u6536\u85CF"],"chat-off":["message","reply","comment","slash","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u7981\u6B62","\u5173\u95ED"],feedback:["message","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u53CD\u9988"],discuss:["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u8BA8\u8BBA","\u7FA4\u804A"],"question-answer":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u8BA8\u8BBA","\u7FA4\u804A"],questionnaire:["message","comment","help","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u8BA8\u8BBA","\u8C03\u67E5\u95EE\u5377","\u5E2E\u52A9"],"video-chat":["message","comment","\u6D88\u606F","\u89C6\u9891\u804A\u5929"],"chat-voice":["message","comment","\u6D88\u606F","\u8BED\u97F3\u6D88\u606F"],"chat-quote":["message","reply","comment","\u6D88\u606F","\u5F15\u7528\u56DE\u590D"],"chat-follow-up":["message","reply","comment","\u6D88\u606F","+1","\u8DDF\u5E16"],"chat-poll":["message","vote","questionnaire","\u6D88\u606F","\u6295\u7968","\u95EE\u5377\u8C03\u67E5"],"chat-history":["message","\u5386\u53F2\u6D88\u606F","\u6D88\u606F\u8BB0\u5F55"],"chat-private":["message","\u79C1\u5BC6\u6D88\u606F","\u5BC6\u804A"]},Design:{pencil:["edit","\u94C5\u7B14","\u7F16\u8F91"],edit:["pencil","\u94C5\u7B14","\u7F16\u8F91"],"edit-2":["pencil","\u94C5\u7B14","\u7F16\u8F91"],"ball-pen":["\u5706\u73E0\u7B14"],"quill-pen":["\u7FBD\u6BDB\u7B14","\u94A2\u7B14","\u7F16\u8F91"],"pen-nib":["\u94A2\u7B14","\u7B14\u5C16"],"ink-bottle":["\u58A8\u6C34\u74F6"],"mark-pen":["\u9A6C\u514B\u7B14"],markup:["\u6807\u8BB0","\u9A6C\u514B"],"edit-box":["\u7F16\u8F91"],"edit-circle":["\u7F16\u8F91"],sip:["\u5438\u7BA1","\u53D6\u8272\u5668"],brush:["\u7B14\u5237","\u753B\u7B14","\u5237\u5B50"],"brush-2":["\u5237\u5B50"],"brush-3":["\u5237\u5B50"],"brush-4":["\u5237\u5B50"],"paint-brush":["\u586B\u8272","\u586B\u5145","\u5237\u5B50"],contrast:["brightness","tonalit","\u5BF9\u6BD4\u5EA6","\u4EAE\u5EA6","\u8272\u8C03"],"contrast-2":["moon","dark","brightness","tonalit","\u6708\u4EAE","\u591C\u95F4","\u5BF9\u6BD4\u5EA6","\u4EAE\u5EA6","\u8272\u8C03"],drop:["water","blur","\u6A21\u7CCA","\u6C34","\u6EF4"],"blur-off":["water","drop","slash","\u6A21\u7CCA","\u6C34","\u6EF4","\u7981\u6B62","\u5173\u95ED"],"contrast-drop":["water","brightness","tonalit","\u6C34","\u5BF9\u6BD4\u5EA6","\u4EAE\u5EA6","\u8272\u8C03","\u6EF4"],"contrast-drop-2":["water","brightness","tonalit","\u6C34","\u5BF9\u6BD4\u5EA6","\u4EAE\u5EA6","\u8272\u8C03","\u6EF4"],compasses:["\u5706\u89C4"],"compasses-2":["\u5706\u89C4"],scissors:["\u526A\u5200","\u88C1\u526A"],"scissors-cut":["\u526A\u5200","\u88C1\u526A"],"scissors-2":["\u526A\u5200","\u88C1\u526A","\u622A\u5C4F"],slice:["knife","\u5207\u56FE","\u5207\u7247","\u5200"],eraser:["remove formatting","\u6A61\u76AE","\u64E6\u9664","\u6E05\u9664\u683C\u5F0F"],ruler:["\u5C3A\u5B50"],"ruler-2":["\u5C3A\u5B50"],"pencil-ruler":["design","\u94C5\u7B14","\u5C3A\u5B50","\u6587\u5177","\u8BBE\u8BA1"],"pencil-ruler-2":["design","\u94C5\u7B14","\u5C3A\u5B50","\u6587\u5177","\u8BBE\u8BA1"],"t-box":["\u6587\u5B57","\u5B57\u4F53","\u5B57\u53F7"],"input-method":["\u8F93\u5165\u6CD5","\u6587\u5B57"],artboard:["grid","crop","\u753B\u677F","\u88C1\u5207"],"artboard-2":["\u753B\u677F"],crop:["\u88C1\u5207"],"crop-2":["\u88C1\u5207"],screenshot:["capture","\u5C4F\u5E55\u622A\u56FE","\u622A\u5C4F"],"screenshot-2":["capture","\u5C4F\u5E55\u622A\u56FE","\u622A\u5C4F"],"drag-move":["arrow","\u62D6\u62FD","\u79FB\u52A8","\u7BAD\u5934"],"drag-move-2":["arrow","\u62D6\u62FD","\u79FB\u52A8","\u7BAD\u5934"],focus:["aim","target","\u7126\u70B9","\u805A\u7126","\u76EE\u6807","\u9776\u5FC3"],"focus-2":["aim","target","bullseye","\u7126\u70B9","\u805A\u7126","\u76EE\u6807","\u9776\u5FC3"],"focus-3":["aim","target","bullseye","\u7126\u70B9","\u805A\u7126","\u76EE\u6807","\u9776\u5FC3"],paint:["\u586B\u8272","\u586B\u5145","\u6CB9\u6F06\u6876"],palette:["\u8C03\u8272\u76D8","\u8272\u677F"],pantone:["\u8272\u677F","\u6F58\u901A\u8272","\u8272\u53F7"],shape:["border","\u5F62\u72B6","\u63CF\u8FB9","\u8FB9\u6846"],"shape-2":["border","\u5F62\u72B6","\u63CF\u8FB9","\u8FB9\u6846"],magic:["fantasy","magic stick","beautify","\u9B54\u6CD5\u68D2","\u7F8E\u5316","\u5E7B\u60F3","\u9B54\u5E7B"],anticlockwise:["rotate","left","\u5DE6\u7FFB\u8F6C","\u5DE6\u65CB\u8F6C"],"anticlockwise-2":["rotate","left","\u5DE6\u7FFB\u8F6C","\u5DE6\u65CB\u8F6C"],clockwise:["rotate","right","\u53F3\u7FFB\u8F6C","\u53F3\u65CB\u8F6C"],"clockwise-2":["rotate","right","\u53F3\u7FFB\u8F6C","\u53F3\u65CB\u8F6C"],hammer:["\u9524\u5B50"],tools:["settings","\u5DE5\u5177","\u8BBE\u7F6E"],"drag-drop":["drag and drop","mouse","\u62D6\u62FD","\u9F20\u6807"],table:["\u8868\u683C"],"table-alt":["\u8868\u683C"],layout:["\u5E03\u5C40"],"layout-2":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-3":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-4":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-5":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-6":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-column":["\u5DE6\u53F3\u5E03\u5C40"],"layout-row":["\u4E0A\u4E0B\u5E03\u5C40"],"layout-top":["\u9876\u90E8\u5E03\u5C40","\u9876\u90E8\u5BFC\u822A"],"layout-right":["\u53F3\u4FA7\u5E03\u5C40","\u53F3\u4FA7\u5BFC\u822A"],"layout-bottom":["\u5E95\u90E8\u5E03\u5C40","\u5E95\u90E8\u5BFC\u822A"],"layout-left":["\u5DE6\u4FA7\u5E03\u5C40","\u5DE6\u4FA7\u5BFC\u822A"],"layout-top-2":["\u9876\u90E8\u5E03\u5C40","\u9876\u90E8\u5BFC\u822A"],"layout-right-2":["\u53F3\u4FA7\u5E03\u5C40","\u53F3\u4FA7\u5BFC\u822A"],"layout-bottom-2":["\u5E95\u90E8\u5E03\u5C40","\u5E95\u90E8\u5BFC\u822A"],"layout-left-2":["\u5DE6\u4FA7\u5E03\u5C40","\u5DE6\u4FA7\u5BFC\u822A"],"layout-grid":["\u5361\u7247\u5E03\u5C40","\u7F51\u683C"],"layout-masonry":["collage","\u7011\u5E03\u6D41\u5E03\u5C40","\u62FC\u8D34\u753B"],collage:["\u7011\u5E03\u6D41\u5E03\u5C40","\u62FC\u8D34\u753B"],grid:["table","\u7F51\u683C","\u8868\u683C"]},Development:{bug:["\u866B\u5B50"],"bug-2":["\u866B\u5B50"],code:["\u4EE3\u7801","\u7F16\u7A0B"],"code-s":["\u4EE3\u7801","\u7F16\u7A0B"],"code-s-slash":["\u4EE3\u7801","\u7F16\u7A0B"],"code-box":["\u4EE3\u7801","\u7F16\u7A0B"],"terminal-box":["code","command line","\u7EC8\u7AEF","\u4EE3\u7801","\u547D\u4EE4\u884C"],terminal:["code","command line","\u7EC8\u7AEF","\u4EE3\u7801","\u547D\u4EE4\u884C"],"terminal-window":["code","command line","\u7EC8\u7AEF","\u4EE3\u7801","\u547D\u4EE4\u884C"],parentheses:["code","math","\u5C0F\u62EC\u53F7"],brackets:["code","math","\u4E2D\u62EC\u53F7"],braces:["code","math","\u5927\u62EC\u53F7","\u82B1\u62EC\u53F7"],command:["apple key","\u82B1\u952E","\u82F9\u679C\u952E"],cursor:["mouse","\u6307\u9488","\u9F20\u6807"],"git-commit":["node","\u63D0\u4EA4"],"git-pull-request":["\u5408\u5E76\u7533\u8BF7"],"git-merge":["\u5408\u5E76"],"git-branch":["\u5206\u652F"],"git-repository":["\u4ED3\u5E93"],"git-repository-commits":["\u4ED3\u5E93","\u63D0\u4EA4"],"git-repository-private":["\u79C1\u5BC6\u4ED3\u5E93","\u79C1\u4EBA\u4ED3\u5E93"],html5:["html","h5"],css3:["css"]},Device:{tv:["\u7535\u89C6"],"tv-2":["monitor","\u7535\u89C6","\u663E\u793A\u5668"],computer:["monitor","\u7535\u8111","\u663E\u793A\u5668"],mac:["monitor","\u663E\u793A\u5668"],macbook:["laptop","\u7B14\u8BB0\u672C"],cellphone:["\u624B\u673A","\u7535\u8BDD"],smartphone:["mobile","\u624B\u673A"],tablet:["\u5E73\u677F\u7535\u8111"],device:["\u8BBE\u5907"],phone:["\u7535\u8BDD"],database:["storage","\u6570\u636E\u5E93","\u5B58\u50A8"],"database-2":["storage","\u6570\u636E\u5E93","\u5B58\u50A8"],server:["\u670D\u52A1\u5668"],"hard-drive":["disc","storage","\u786C\u76D8","\u5B58\u50A8"],"hard-drive-2":["disc","server","storage","\u786C\u76D8","\u670D\u52A1\u5668","\u5B58\u50A8"],install:["\u5B89\u88C5"],uninstall:["\u5378\u8F7D"],save:["floppy","\u4FDD\u5B58","\u8F6F\u76D8"],"save-2":["floppy","\u4FDD\u5B58","\u8F6F\u76D8"],"save-3":["floppy","\u4FDD\u5B58","\u8F6F\u76D8"],"sd-card":["\u5185\u5B58\u5361"],"sd-card-mini":["\u5185\u5B58\u5361"],"sim-card":["\u7535\u8BDD\u5361"],"sim-card-2":["\u7535\u8BDD\u5361"],"dual-sim-1":["sim card","\u7535\u8BDD\u5361","\u5361\u69FD","\u53CC\u5361\u53CC\u5F85"],"dual-sim-2":["sim card","\u7535\u8BDD\u5361","\u5361\u69FD","\u53CC\u5361\u53CC\u5F85"],"u-disk":["U\u76D8","\u4F18\u76D8"],battery:["\u7535\u6C60"],"battery-charge":["\u7535\u6C60","\u5145\u7535"],"battery-low":["\u7535\u6C60","\u4F4E\u7535\u91CF"],"battery-2":["\u7535\u6C60"],"battery-2-charge":["\u7535\u6C60","\u5145\u7535"],"battery-saver":["\u7535\u6C60","\u7701\u7535\u6A21\u5F0F"],"battery-share":["\u7535\u6C60\u5171\u4EAB","\u5171\u4EAB\u7535\u91CF"],cast:["mirroring","\u6295\u5C4F","\u65E0\u7EBF","\u5E7F\u64AD"],airplay:["mirroring","\u6295\u5C4F","\u65E0\u7EBF"],cpu:["\u4E2D\u592E\u5904\u7406\u5668"],gradienter:["\u6C34\u5E73\u4EEA"],keyboard:["input","\u952E\u76D8","\u8F93\u5165"],"keyboard-box":["input","\u952E\u76D8","\u8F93\u5165"],mouse:["\u9F20\u6807"],sensor:["capacitor","\u4F20\u611F\u5668","\u7535\u5BB9\u5668"],router:["wifi","signal tower","radio","station","\u8DEF\u7531\u5668","\u4FE1\u53F7\u5854","\u5E7F\u64AD","\u57FA\u7AD9","\u6D41\u91CF"],radar:["satellite receiver","\u96F7\u8FBE","\u536B\u661F\u63A5\u6536\u5668","\u9505"],gamepad:["consoles","controller","\u6E38\u620F\u624B\u67C4"],"remote-control":["controller","\u9065\u63A7\u5668"],"remote-control-2":["controller","\u9065\u63A7\u5668"],"device-recover":["\u6062\u590D\u51FA\u5382\u8BBE\u7F6E"],hotspot:["\u624B\u673A\u70ED\u70B9"],"phone-find":["\u627E\u56DE\u624B\u673A"],"phone-lock":["\u9501\u5B9A\u624B\u673A"],"rotate-lock":["\u9501\u5B9A\u65CB\u8F6C\u5C4F\u5E55"],restart:["reload","refresh","\u91CD\u542F"],"shut-down":["power off","\u5173\u673A"],fingerprint:["\u6307\u7EB9"],"fingerprint-2":["\u6307\u7EB9"],barcode:["scan","\u626B\u7801","\u6761\u5F62\u7801","\u6761\u7801"],"barcode-box":["scan","\u626B\u7801","\u6761\u5F62\u7801","\u6761\u7801"],"qr-code":["\u4E8C\u7EF4\u7801"],"qr-scan":["\u4E8C\u7EF4\u7801","\u626B\u63CF"],"qr-scan-2":["\u4E8C\u7EF4\u7801","\u626B\u63CF"],scan:["\u626B\u63CF"],"scan-2":["\u626B\u63CF"],rss:["feed","subscribe","\u8BA2\u9605"],gps:["signal","\u5B9A\u4F4D","\u4FE1\u53F7"],"base-station":["wifi","signal tower","router","cast","\u57FA\u7AD9","\u4FE1\u53F7\u5854","\u8DEF\u7531\u5668","\u5E7F\u64AD","\u6D41\u91CF"],bluetooth:["wireless","\u84DD\u7259","\u65E0\u7EBF"],"bluetooth-connect":["wireless","\u84DD\u7259","\u8FDE\u63A5","\u65E0\u7EBF"],wifi:["\u65E0\u7EBF\u7F51"],"wifi-off":["slash","offline","connection-fail","\u65E0\u7EBF\u7F51","\u5173\u95ED","\u65AD\u7F51","\u94FE\u63A5\u5931\u8D25"],"signal-wifi":["cellular","strength","\u65E0\u7EBF\u7F51","\u4FE1\u53F7"],"signal-wifi-1":["cellular","strength","\u65E0\u7EBF\u7F51","\u4FE1\u53F7"],"signal-wifi-2":["cellular","strength","\u65E0\u7EBF\u7F51","\u4FE1\u53F7"],"signal-wifi-3":["cellular","strength","\u65E0\u7EBF\u7F51","\u4FE1\u53F7"],"signal-wifi-error":["cellular","offline","connection-fail","\u65E0\u7EBF\u7F51","\u65AD\u7F51","\u94FE\u63A5\u5931\u8D25","\u65E0\u4FE1\u53F7"],"signal-wifi-off":["cellular","slash","offline","connection-fail","\u65E0\u7EBF\u7F51","\u5173\u95ED","\u65AD\u7F51","\u94FE\u63A5\u5931\u8D25"],"wireless-charging":["power","flash","\u65E0\u7EBF\u5145\u7535","\u95EA\u5145"],"dashboard-2":["\u4EEA\u8868\u76D8"],"dashboard-3":["\u4EEA\u8868\u76D8"],usb:["\u4F18\u76D8"]},Document:{file:["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"file-2":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"file-3":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"file-4":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"sticky-note":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA","\u4FBF\u7B7E\u7EB8","\u4FBF\u5229\u8D34"],"sticky-note-2":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA","\u4FBF\u7B7E\u7EB8","\u4FBF\u5229\u8D34"],"file-edit":["\u6587\u4EF6","\u6587\u6863","\u7F16\u8F91"],draft:["\u8349\u7A3F\u7BB1","\u6587\u4EF6","\u6587\u6863","\u7F16\u8F91"],"file-paper":["\u6587\u4EF6","\u6587\u6863","\u7EB8","\u8C31"],"file-paper-2":["\u6587\u4EF6","\u6587\u6863","\u7EB8","\u8C31"],"file-text":["\u6587\u4EF6","\u6587\u6863","\u6587\u672C"],"file-list":["\u6E05\u5355","\u5217\u8868"],"file-list-2":["\u6E05\u5355","\u5217\u8868"],"file-list-3":["newspaper","\u6E05\u5355","\u5217\u8868","\u62A5\u7EB8"],bill:["\u8D26\u5355"],"file-copy":["duplicate","clone","\u590D\u5236","\u514B\u9686"],"file-copy-2":["duplicate","clone","\u590D\u5236","\u514B\u9686"],clipboard:["copy","\u590D\u5236","\u526A\u5207\u677F"],survey:["research","questionnaire","\u8C03\u67E5","\u95EE\u5377","\u8C03\u7814"],article:["newspaper","\u6587\u7AE0","\u62A5\u7EB8"],newspaper:["\u62A5\u7EB8"],"file-zip":["7z","rar","\u538B\u7F29\u5305"],"file-mark":["\u6587\u4EF6","\u6587\u6863","\u6807\u8BB0"],task:["todo","\u4EFB\u52A1","\u5F85\u529E"],todo:["\u5F85\u529E"],book:["read","dictionary","booklet","\u4E66","\u9605\u8BFB","\u5B57\u5178","\u5C0F\u518C\u5B50"],"book-mark":["read","dictionary","booklet","\u4E66","\u9605\u8BFB","\u5B57\u5178","\u5C0F\u518C\u5B50","\u4E66\u7B7E"],"book-2":["read","dictionary","booklet","\u4E66","\u9605\u8BFB","\u5B57\u5178","\u5C0F\u518C\u5B50"],"book-3":["read","dictionary","booklet","\u4E66","\u9605\u8BFB","\u5B57\u5178","\u5C0F\u518C\u5B50"],"book-open":["read","booklet","magazine","\u4E66","\u9605\u8BFB","\u5C0F\u518C\u5B50","\u6742\u5FD7"],"book-read":["booklet","magazine","\u4E66","\u9605\u8BFB","\u5C0F\u518C\u5B50","\u6742\u5FD7"],"contacts-book":["\u901A\u8BAF\u5F55","\u8054\u7CFB\u4EBA"],"contacts-book-2":["\u901A\u8BAF\u5F55","\u8054\u7CFB\u4EBA"],"contacts-book-upload":["upload","\u901A\u8BAF\u5F55","\u8054\u7CFB\u4EBA","\u4E0A\u4F20"],booklet:["notebook","\u624B\u518C","\u7B14\u8BB0\u672C","\u5C0F\u518C\u5B50"],"file-code":["config","\u6587\u4EF6","\u6587\u6863","\u4EE3\u7801","\u811A\u672C","\u914D\u7F6E\u6587\u4EF6"],"file-pdf":["\u6587\u4EF6","\u6587\u6863"],"file-word":["\u6587\u6863"],"file-ppt":["\u6587\u4EF6","\u6587\u6863"],"file-excel":["\u6587\u6863","\u8868\u5355"],"file-word-2":["\u6587\u6863"],"file-ppt-2":["\u6587\u4EF6","\u6587\u6863"],"file-excel-2":["\u6587\u6863","\u8868\u5355"],"file-hwp":["\u6587\u4EF6","\u6587\u6863","hangul word processor"],keynote:["\u6F14\u793A\u6587\u7A3F","\u5E7B\u706F\u7247","\u8BB2\u6F14"],numbers:["\u8868\u683C"],pages:["\u6587\u7A3F"],"file-search":["\u6587\u4EF6","\u6587\u6863","\u641C\u7D22"],"file-add":["new","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"file-reduce":["\u6587\u4EF6","\u6587\u6863","\u51CF"],"file-settings":["\u6587\u4EF6","\u6587\u6863","\u8BBE\u7F6E"],"file-upload":["\u6587\u4EF6","\u6587\u6863","\u4E0A\u4F20"],"file-transfer":["\u6587\u4EF6","\u6587\u6863","\u4F20\u8F93"],"file-download":["\u6587\u4EF6","\u6587\u6863","\u4E0B\u8F7D"],"file-lock":["\u6587\u4EF6","\u6587\u6863","\u9501"],"file-chart":["report","\u6587\u4EF6","\u6587\u6863","\u67F1\u72B6\u56FE","\u62A5\u8868"],"file-chart-2":["report","\u6587\u4EF6","\u6587\u6863","\u997C\u56FE","\u62A5\u8868"],"file-music":["\u6587\u4EF6","\u6587\u6863","\u97F3\u4E50"],"file-gif":["\u6587\u4EF6","\u6587\u6863","\u52A8\u56FE"],"file-forbid":["\u6587\u4EF6","\u6587\u6863","\u7981\u7528"],"file-info":["\u6587\u4EF6","\u6587\u6863","\u4FE1\u606F"],"file-warning":["alert","\u6587\u4EF6","\u6587\u6863","\u8B66\u544A","\u63D0\u9192"],"file-unknow":["\u6587\u4EF6","\u6587\u6863","\u672A\u77E5","\u95EE\u53F7"],"file-user":["\u6587\u4EF6","\u6587\u6863","\u7528\u6237"],"file-shield":["protected","secured","\u6587\u4EF6","\u6587\u6863","\u76FE\u724C","\u4FDD\u62A4","\u5B89\u5168"],"file-shield-2":["protected","secured","\u6587\u4EF6","\u6587\u6863","\u76FE\u724C","\u4FDD\u62A4","\u5B89\u5168"],"file-damage":["breakdown","broken","\u6587\u4EF6","\u6587\u6863","\u635F\u574F","\u7834\u635F","\u7834\u88C2"],"file-history":["record","\u6587\u4EF6","\u6587\u6863","\u8BB0\u5F55","\u5386\u53F2"],"file-shred":["shredder","shred","destroy","cut","\u6587\u6863","\u9500\u6BC1","\u788E\u7EB8\u673A","\u7834\u88C2","\u7C89\u788E"],"file-cloud":["\u6587\u4EF6","\u6587\u6863","\u4E91"],folder:["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],"folder-2":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],"folder-3":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],"folder-4":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],"folder-5":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],folders:["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6279\u91CF"],"folder-add":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6DFB\u52A0"],"folder-reduce":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u51CF"],"folder-settings":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u8BBE\u7F6E"],"folder-upload":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4E0A\u4F20"],"folder-transfer":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4F20\u8F93"],"folder-download":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4E0B\u8F7D"],"folder-lock":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u9501"],"folder-chart":["report","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u67F1\u72B6\u56FE","\u62A5\u8868"],"folder-chart-2":["report","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u997C\u56FE","\u62A5\u8868"],"folder-music":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u97F3\u4E50"],"folder-forbid":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u7981\u7528"],"folder-info":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4FE1\u606F"],"folder-warning":["alert","directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u8B66\u544A","\u63D0\u9192"],"folder-unknow":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u672A\u77E5"],"folder-user":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u7528\u6237"],"folder-shield":["directory","file","protected","secured","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4FDD\u62A4","\u76FE\u724C","\u5B89\u5168"],"folder-shield-2":["directory","file","protected","secured","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4FDD\u62A4","\u76FE\u724C","\u5B89\u5168"],"folder-shared":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u5206\u4EAB"],"folder-received":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u63A5\u6536"],"folder-open":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6253\u5F00"],"folder-keyhole":["directory","encryption","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6253\u5F00","\u52A0\u5BC6\u6587\u6863"],"folder-zip":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6253\u5F00","\u538B\u7F29"],"folder-history":["directory","file","record","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u8BB0\u5F55","\u5386\u53F2"],markdown:["arrow","\u7BAD\u5934","\u4E0B"]},Editor:{bold:["\u52A0\u7C97"],italic:["\u659C\u4F53"],heading:["\u6807\u9898"],text:["\u5B57\u4F53"],"font-color":["\u6587\u5B57\u8272"],"font-size":["\u5B57\u53F7","\u5B57\u4F53\u5927\u5C0F"],"font-size-2":["\u5B57\u53F7","\u5B57\u4F53\u5927\u5C0F"],underline:["\u4E0B\u5212\u7EBF"],emphasis:["\u7740\u91CD\u53F7"],"emphasis-cn":["\u7740\u91CD\u53F7"],strikethrough:["remove formatting","\u5220\u9664\u7EBF"],"strikethrough-2":["remove formatting","\u5220\u9664\u7EBF"],"format-clear":["remove formatting","\u6E05\u9664\u683C\u5F0F"],"align-left":["\u5DE6\u5BF9\u9F50"],"align-center":["\u5C45\u4E2D\u5BF9\u9F50"],"align-right":["\u53F3\u5BF9\u9F50"],"align-justify":["\u6392\u5217\u5BF9\u9F50"],"align-top":["\u9876\u90E8\u5BF9\u9F50"],"align-vertically":["\u5782\u76F4\u5BF9\u9F50"],"align-bottom":["\u5E95\u90E8\u5BF9\u9F50"],"list-check":["check list","\u6E05\u5355\u5217\u8868"],"list-check-2":["check list","\u6E05\u5355\u5217\u8868"],"list-ordered":["number list","\u6709\u5E8F\u5217\u8868"],"list-unordered":["bullet list","\u65E0\u5E8F\u5217\u8868"],"indent-decrease":["indent more","\u7F29\u8FDB"],"indent-increase":["indent less","\u7F29\u8FDB"],"line-height":["\u884C\u9AD8"],"text-spacing":["\u5B57\u95F4\u8DDD"],"text-wrap":["\u6587\u672C\u6362\u884C"],"attachment-2":["annex","paperclip","\u9644\u4EF6","\u66F2\u522B\u9488"],link:["connection","address","\u8054\u7CFB","\u94FE\u63A5","\u5730\u5740"],"link-unlink":["connection","remove address","\u53BB\u9664\u94FE\u63A5"],"link-m":["connection","address","\u8054\u7CFB","\u94FE\u63A5","\u5730\u5740"],"link-unlink-m":["connection","remove address","\u53BB\u9664\u94FE\u63A5"],separator:["\u5206\u5272\u7EBF"],space:["\u7A7A\u683C"],"page-separator":["insert","\u5206\u9875\u7B26","\u63D2\u5165"],"code-view":["\u4EE3\u7801\u89C6\u56FE"],"double-quotes-l":["left","quotation marks","\u53CC\u5F15\u53F7"],"double-quotes-r":["right","quotation marks","\u53CC\u5F15\u53F7"],"single-quotes-l":["left","quotation marks","\u5355\u5F15\u53F7"],"single-quotes-r":["right","quotation marks","\u5355\u5F15\u53F7"],"table-2":["\u8868\u683C"],subscript:["\u89D2\u6807","\u4E0B\u6807","\u811A\u6CE8"],"subscript-2":["\u89D2\u6807","\u4E0B\u6807","\u811A\u6CE8"],superscript:["\u89D2\u6807","\u4E0A\u6807"],"superscript-2":["\u89D2\u6807","\u4E0A\u6807"],paragraph:["\u6BB5\u843D"],"text-direction-l":["\u6587\u672C\u5DE6\u5BF9\u9F50"],"text-direction-r":["\u6587\u672C\u5DE6\u5BF9\u9F50"],functions:["\u529F\u80FD"],omega:["\u03A9","\u7279\u6B8A\u7B26\u53F7"],hashtag:["#","\u4E95\u53F7"],asterisk:["*","\u661F\u53F7"],"question-mark":["\u95EE\u53F7"],translate:["translator","\u7FFB\u8BD1"],"translate-2":["translator","\u7FFB\u8BD1"],"a-b":["a/b testing","ab testing","ab\u6D4B\u8BD5"],"english-input":["\u82F1\u6587\u8F93\u5165\u6CD5"],"pinyin-input":["\u62FC\u97F3\u8F93\u5165\u6CD5"],"wubi-input":["\u4E94\u7B14\u8F93\u5165\u6CD5"],"input-cursor-move":["\u79FB\u52A8\u8F93\u5165\u5149\u6807"],"number-1":["1","\u4E00","\u6570\u5B57"],"number-2":["2","\u4E8C","\u6570\u5B57"],"number-3":["3","\u4E09","\u6570\u5B57"],"number-4":["4","\u56DB","\u6570\u5B57"],"number-5":["5","\u4E94","\u6570\u5B57"],"number-6":["6","\u516D","\u6570\u5B57"],"number-7":["7","\u4E03","\u6570\u5B57"],"number-8":["8","\u516B","\u6570\u5B57"],"number-9":["9","\u4E5D","\u6570\u5B57"],"number-0":["0","\u96F6","\u6570\u5B57"],"sort-asc":["ranking","ordering","sorting","ascending","descending","\u5347\u5E8F\u6392\u5217","\u6392\u5E8F"],"sort-desc":["ranking","ordering","\u964D\u5E8F\u6392\u5217","\u6392\u5E8F"],"bring-forward":["arrange","\u5C42\u7EA7","\u5411\u4E0A\u4E00\u5C42"],"send-backward":["arrange","\u5C42\u7EA7","\u5411\u4E0B\u4E00\u5C42"],"bring-to-front":["arrange","\u5C42\u7EA7","\u79FB\u5230\u6700\u524D\u9762"],"send-to-back":["arrange","\u5C42\u7EA7","\u79FB\u5230\u6700\u540E\u9762"],"h-1":["heading","\u4E00\u7EA7\u6807\u9898"],"h-2":["heading","\u4E00\u7EA7\u6807\u9898"],"h-3":["heading","\u4E00\u7EA7\u6807\u9898"],"h-4":["heading","\u4E00\u7EA7\u6807\u9898"],"h-5":["heading","\u4E00\u7EA7\u6807\u9898"],"h-6":["heading","\u4E00\u7EA7\u6807\u9898"],"insert-column-left":["\u6DFB\u52A0\u5217","\u5DE6\u4FA7"],"insert-column-right":["\u6DFB\u52A0\u5217","\u53F3\u4FA7"],"insert-row-top":["\u6DFB\u52A0\u884C","\u9876\u90E8"],"insert-row-bottom":["\u6DFB\u52A0\u884C","\u5E95\u90E8"],"delete-column":["\u5220\u9664\u5217","\u5E95\u90E8"],"delete-row":["\u6DFB\u52A0\u884C","\u5E95\u90E8"],"merge-cells-horizontal":["\u5408\u5E76\u5355\u5143\u683C"],"merge-cells-vertical":["\u5408\u5E76\u5355\u5143\u683C"],"split-cells-horizontal":["\u62C6\u5206\u5355\u5143\u683C"],"split-cells-vertical":["\u62C6\u5206\u5355\u5143\u683C"],"flow-chart":["\u6D41\u7A0B\u56FE"],"mind-map":["mindmap","\u8111\u56FE","\u601D\u7EF4\u5BFC\u56FE"],"node-tree":["\u8282\u70B9","\u5C42\u7EA7\u5173\u7CFB\u56FE"],"organization-chart":["\u7EC4\u7EC7\u67B6\u6784\u56FE","\u5C40\u57DF\u7F51"],"rounded-corner":["\u5706\u89D2"]},Finance:{wallet:["\u94B1\u5305","\u5361\u5305"],"wallet-2":["\u94B1\u5305","\u5361\u5305"],"wallet-3":["\u94B1\u5305","\u5361\u5305"],"bank-card":["credit","purchase","payment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361","\u8D2D\u4E70","\u6D88\u8D39","\u652F\u4ED8"],"bank-card-2":["credit","purchase","payment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361","\u8D2D\u4E70","\u6D88\u8D39","\u652F\u4ED8"],"secure-payment":["credit","purchase","payment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361","\u8D2D\u4E70","\u6D88\u8D39","\u652F\u4ED8","\u5B89\u5168"],refund:["credit card","repayment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361\u8FD8\u6B3E"],"refund-2":["credit card","repayment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361\u8FD8\u6B3E"],safe:["\u4FDD\u9669\u67DC","\u4FDD\u9669\u7BB1"],"safe-2":["\u4FDD\u9669\u67DC","\u4FDD\u9669\u7BB1"],"price-tag":["label","\u6807\u7B7E","\u4EF7\u7B7E"],"price-tag-2":["label","\u6807\u7B7E","\u4EF7\u7B7E"],"price-tag-3":["label","\u6807\u7B7E","\u4EF7\u7B7E"],ticket:["coupon","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"ticket-2":["coupon","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],coupon:["ticket","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"coupon-2":["ticket","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"coupon-3":["ticket","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"coupon-4":["\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"coupon-5":["\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"shopping-bag":["purse","\u8D2D\u7269\u888B","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-bag-2":["\u8D2D\u7269\u888B","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-bag-3":["\u8D2D\u7269\u888B","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-basket":["\u8D2D\u7269\u7BEE","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-basket-2":["\u8D2D\u7269\u7BEE","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-cart":["\u8D2D\u7269\u8F66","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-cart-2":["\u8D2D\u7269\u8F66","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],vip:["\u4F1A\u5458"],"vip-crown":["king","queen","\u7687\u51A0","\u4F1A\u5458","\u56FD\u738B","\u5973\u738B","\u738B\u540E"],"vip-crown-2":["king","queen","\u7687\u51A0","\u4F1A\u5458","\u56FD\u738B","\u5973\u738B","\u738B\u540E"],"vip-diamond":["\u94BB\u77F3","\u4F1A\u5458"],trophy:["\u5956\u54C1","\u5956\u676F","\u91D1\u676F"],exchange:["swap","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"exchange-box":["swap","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],swap:["exchange","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"swap-box":["exchange","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"exchange-dollar":["swap","transfer","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362","\u7F8E\u5143","\u8F6C\u8D26"],"exchange-cny":["swap","transfer","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362","\u4EBA\u6C11\u5E01","\u8F6C\u8D26"],"exchange-funds":["swap","transfer","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362","\u57FA\u91D1","\u80A1\u7968","\u8F6C\u8D26"],"increase-decrease":["\u8BA1\u7B97\u5668"],percent:["\u767E\u5206\u4E4B","\u767E\u5206\u6BD4"],"copper-coin":["currency","payment","\u94DC\u5E01","\u786C\u5E01","\u8D27\u5E01","\u94B1","\u652F\u4ED8"],"copper-diamond":["currency","coins","\u91D1\u5E01","\u94BB\u77F3","\u8D27\u5E01","\u94B1","\u652F\u4ED8"],"money-cny-box":["currency","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u4EBA\u6C11\u5E01"],"money-cny-circle":["currency","coins","\u91D1\u5E01","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u4EBA\u6C11\u5E01"],"money-dollar-box":["currency","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u7F8E\u5143"],"money-dollar-circle":["currency","coins","\u91D1\u5E01","payment","cent","penny","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u7F8E\u5143","\u7F8E\u5206","\u4FBF\u58EB"],"money-euro-box":["currency","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u6B27\u5143"],"money-euro-circle":["currency","coins","\u91D1\u5E01","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u6B27\u5143"],"money-pound-box":["currency","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u82F1\u9551"],"money-pound-circle":["currency","coins","\u91D1\u5E01","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u82F1\u9551"],"bit-coin":["currency","payment","\u8D27\u5E01","\u94B1","\u6BD4\u7279\u5E01"],coin:["\u91D1\u5E01","\u786C\u5E01"],coins:["\u91D1\u5E01","\u786C\u5E01"],currency:["cash","payment","\u8D27\u5E01","\u94B1"],funds:["foundation","stock","\u57FA\u91D1","\u80A1\u7968"],"funds-box":["foundation","stock","\u57FA\u91D1","\u80A1\u7968"],"red-packet":["\u7EA2\u5305"],"water-flash":["\u6C34\u7535\u8D39"],stock:["\u80A1\u7968"],auction:["hammer","\u62CD\u5356","\u9524\u5B50"],gift:["present","\u793C\u7269"],"gift-2":["present","\u793C\u7269"],"hand-coin":["donate","business","\u6350\u8D60"],"hand-heart":["help","donate","volunteer","welfare","\u5E2E\u52A9","\u7231\u5FC3","\u6350\u8D60","\u5FD7\u613F\u8005","\u516C\u76CA"],"24-hours":["last","24\u5C0F\u65F6\u8425\u4E1A"]},"Health & Medical":{heart:["like","love","favorite","\u5FC3","\u559C\u6B22","\u7231","\u6536\u85CF"],"heart-2":["like","love","favorite","\u5FC3","\u559C\u6B22","\u7231","\u6536\u85CF"],"heart-3":["like","love","favorite","\u5FC3","\u559C\u6B22","\u7231","\u6536\u85CF"],"heart-add":["like","love","favorite","\u5FC3","\u559C\u6B22","\u7231","\u6536\u85CF"],dislike:["like","love","remove favorite","\u5FC3","\u4E0D\u559C\u6B22","\u53D6\u6D88\u6536\u85CF"],hearts:["romance","\u7231\u60C5","\u6D6A\u6F2B","\u5FC3"],"heart-pulse":["heart rate","\u8109\u640F","\u5FC3\u7387"],pulse:["wave","heart rate","\u8109\u640F","\u5FC3\u7387","\u6CE2"],empathize:["care","heart","\u540C\u7406\u5FC3","\u5173\u7231","\u5FC3"],nurse:["doctors","\u533B\u751F","\u62A4\u58EB"],dossier:["\u75C5\u4F8B"],"health-book":["\u5065\u5EB7\u624B\u518C","\u533B\u7597\u624B\u518C"],"first-aid-kit":["case","\u6025\u6551\u7BB1"],capsule:["medicine"," \u80F6\u56CA","\u836F"],"medicine-bottle":["\u836F\u74F6"],flask:["testing","experimental","experiment","\u70E7\u74F6","\u5B9E\u9A8C","\u8BD5\u9A8C"],"test-tube":["testing","experimental","experiment","\u8BD5\u7BA1","\u5B9E\u9A8C","\u8BD5\u9A8C"],microscope:["testing","experimental","experiment","\u663E\u5FAE\u955C","\u5B9E\u9A8C","\u8BD5\u9A8C"],"hand-sanitizer":["alcohol","\u9152\u7CBE\u6D88\u6BD2\u6D17\u624B\u6DB2"],"mental-health":["\u5FC3\u7406\u5065\u5EB7"],psychotherapy:["\u5FC3\u7406\u6CBB\u7597"],stethoscope:["\u542C\u8BCA\u5668"],syringe:["\u6CE8\u5C04\u5668"],thermometer:["\u4F53\u6E29\u8BA1"],"infrared-thermometer":["\u7EA2\u5916\u7EBF\u4F53\u6E29\u8BA1","\u4F53\u6E29\u67AA"],"surgical-mask":["\u5916\u79D1\u533B\u7528\u53E3\u7F69"],virus:["\u75C5\u6BD2"],lungs:["\u80BA\u90E8"],"rest-time":["close","\u4F11\u606F\u65F6\u95F4","\u6253\u70CA"],zzz:["\u7761\u89C9"]},Logos:{alipay:["zhifubao","\u652F\u4ED8\u5B9D"],amazon:["\u4E9A\u9A6C\u900A"],android:["applications","\u5B89\u5353","\u5E94\u7528"],angularjs:["angular","programming framework"],"app-store":["applications","\u82F9\u679C\u5E94\u7528\u5546\u5E97"],apple:["\u82F9\u679C"],baidu:["du","claw","\u767E\u5EA6","\u722A"],behance:["behance"],bilibili:["\u54D4\u54E9\u54D4\u54E9"],centos:["linux","system","\u7CFB\u7EDF"],chrome:["\u8C37\u6B4C\u6D4F\u89C8\u5668"],codepen:["\u4EE3\u7801\u7B14"],coreos:["linux","system","\u7CFB\u7EDF"],dingding:["\u9489\u9489"],discord:["game","chat"],disqus:["comments"],douban:["\u8C46\u74E3"],dribbble:["\u8FFD\u6CE2"],drive:["google drive","\u8C37\u6B4C\u4E91\u7AEF\u786C\u76D8"],dropbox:["\u591A\u5B9D\u7BB1"],edge:["microsoft edge","edge\u6D4F\u89C8\u5668"],evernote:["\u5370\u8C61\u7B14\u8BB0"],facebook:["\u8138\u4E66"],"facebook-circle":["\u8138\u4E66"],"facebook-box":["\u8138\u4E66"],finder:["macintosh","\u4EFF\u8FBE"],firefox:["\u706B\u72D0\u6D4F\u89C8\u5668"],flutter:["google"],gatsby:["gatsby"],github:["github"],gitlab:["gitlab"],google:["\u8C37\u6B4C"],"google-play":["applications","\u8C37\u6B4C\u5E94\u7528\u5546\u5E97"],"honor-of-kings":["game","\u738B\u8005\u8363\u8000"],ie:["internet explorer","\u6D4F\u89C8\u5668"],instagram:["\u7167\u7247\u5899"],invision:["invision"],"kakao-talk":["kakao talk","chat"],line:["\u8FDE\u6211"],linkedin:["\u9886\u82F1"],"linkedin-box":["\u9886\u82F1"],mastercard:["bank card","\u94F6\u884C\u5361"],mastodon:["mastodon","\u957F\u6BDB\u8C61"],medium:["\u5A92\u4F53"],messenger:["facebook","\u8138\u4E66","\u4FE1\u4F7F"],microsoft:["windows","\u7A97\u6237","\u5FAE\u8F6F"],"mini-program":["\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F"],"netease-cloud-music":["netease cloud music","\u7F51\u6613\u4E91\u97F3\u4E50"],netflix:["\u7F51\u98DE"],npmjs:["npm","nodejs"],"open-source":["opensource","\u5F00\u6E90"],opera:["\u6B27\u670B\u6D4F\u89C8\u5668"],patreon:["donate","money","\u6350\u8D60","\u6253\u8D4F"],paypal:["\u8D1D\u5B9D"],pinterest:["\u62FC\u8DA3"],pixelfed:["photography","pixelfed"],playstation:["ps"],"product-hunt":["product hunt"],qq:["penguin","tencent","\u817E\u8BAF","\u4F01\u9E45"],reactjs:["react","programming framework","facebook"],reddit:["reddit"],remixicon:["remix icon","\u56FE\u6807"],safari:["safari\u6D4F\u89C8\u5668"],skype:["skype"],slack:["slack"],snapchat:["ghost","\u8272\u62C9\u5E03","\u5E7D\u7075"],soundcloud:["\u58F0\u4E91"],spectrum:["spectrum"],spotify:["music","\u97F3\u4E50"],"stack-overflow":["stack overflow"],stackshare:["share","\u5206\u4EAB","\u6280\u672F\u6808"],steam:["game","store"],switch:["nintendo","\u4EFB\u5929\u5802"],taobao:["\u6DD8\u5B9D"],telegram:["telegram"],trello:["trello"],tumblr:["\u6C64\u535A\u4E50"],twitch:["twitch"],twitter:["\u63A8\u7279"],ubuntu:["linux","system","\u7CFB\u7EDF"],unsplash:["photos"],vimeo:["\u89C6\u9891"],visa:["bank card","\u94F6\u884C\u5361"],vuejs:["vue","programming framework"],wechat:["\u5FAE\u4FE1"],"wechat-2":["\u5FAE\u4FE1"],"wechat-pay":["\u5FAE\u4FE1\u652F\u4ED8"],weibo:["\u65B0\u6D6A\u5FAE\u535A"],whatsapp:["\u74E6\u6B21\u827E\u666E"],windows:["microsoft","\u7A97\u6237","\u5FAE\u8F6F"],xbox:["xbox"],xing:["xing"],youtube:["\u4F18\u5154","\u6CB9\u7BA1"],zcool:["zcool","\u7AD9\u9177"],zhihu:["\u77E5\u4E4E"]},Map:{"map-pin":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-2":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-3":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-4":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-5":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-add":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E","\u65B0\u589E","\u6DFB\u52A0"],"map-pin-range":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E","\u8303\u56F4"],"map-pin-time":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E","\u65F6\u95F4"],"map-pin-user":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E","\u7528\u6237"],"pin-distance":["\u5750\u6807","\u8DDD\u79BB"],pushpin:["\u56FE\u9489"],"pushpin-2":["\u56FE\u9489"],compass:["navigation","safari","direction","discover","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],"compass-2":["navigation","direction","discover","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],"compass-3":["navigation","safari","direction","discover","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],"compass-4":["navigation","direction","discover","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],"compass-discover":["navigation","direction","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],anchor:["\u951A"],"china-railway":["\u4E2D\u94C1","\u94C1\u8DEF","\u706B\u8F66"],"space-ship":["\u592A\u7A7A\u98DE\u8239"],rocket:["\u706B\u7BAD"],"rocket-2":["space ship","\u706B\u7BAD","\u592A\u7A7A\u98DE\u8239"],map:["navigation","travel","\u5730\u56FE","\u5BFC\u822A","\u65C5\u884C"],"map-2":["location","navigation","travel","\u5730\u56FE","\u5B9A\u4F4D","\u5BFC\u822A","\u65C5\u884C"],"treasure-map":["thriller","adventure","\u5730\u56FE","\u85CF\u5B9D\u56FE"],"road-map":["navigation","travel","\u5730\u56FE","\u5BFC\u822A","\u65C5\u884C"],earth:["global","union","world","language","\u5730\u7403","\u5168\u7403","\u8054\u5408","\u4E16\u754C","\u8BED\u8A00"],globe:["earth","\u5730\u7403\u4EEA"],parking:["\u505C\u8F66\u573A"],"parking-box":["\u505C\u8F66\u573A"],route:["path","\u8DEF\u7EBF"],guide:["path","\u6307\u5F15","\u8DEF\u7EBF"],"gas-station":["\u52A0\u6C14\u7AD9","\u52A0\u6CB9\u7AD9"],"charging-pile":["\u5145\u7535\u6869"],"charging-pile-2":["\u5145\u7535\u6869"],car:["\u6C7D\u8F66"],"car-washing":["\u6C7D\u8F66","\u6D17\u8F66"],roadster:["car","\u6C7D\u8F66","\u8DD1\u8F66"],taxi:["car","\u51FA\u79DF\u8F66","\u6C7D\u8F66"],"taxi-wifi":["car","\u51FA\u79DF\u8F66","\u6C7D\u8F66"],"police-car":["\u6C7D\u8F66","\u8B66\u8F66"],bus:["\u5927\u5DF4","\u5DF4\u58EB"],"bus-2":["\u5927\u5DF4","\u5DF4\u58EB"],"bus-wifi":["\u5927\u5DF4","\u5DF4\u58EB"],truck:["van","delivery","\u5361\u8F66","\u8D27\u8F66","\u8FD0\u8F93"],train:["\u706B\u8F66"],"train-wifi":["\u706B\u8F66"],subway:["\u5730\u94C1"],"subway-wifi":["\u5730\u94C1"],"flight-takeoff":["airplane","plane","origin","\u8D77\u98DE","\u51FA\u53D1","\u59CB\u53D1","\u8D77\u70B9","\u98DE\u673A"],"flight-land":["airplane","plane","destination","\u7740\u9646","\u5230\u8FBE","\u62B5\u8FBE","\u7EC8\u70B9","\u98DE\u673A"],plane:["fight","\u98DE\u673A","\u822A\u73ED"],sailboat:["\u5E06\u8239"],ship:["\u8F6E\u8239","\u822A\u6D77","\u6D77\u8FD0"],"ship-2":["\u8F6E\u8239"],bike:["\u81EA\u884C\u8F66"],"e-bike":["take out","takeaway","\u7535\u52A8\u8F66","\u5916\u5356"],"e-bike-2":["take out","takeaway","\u7535\u52A8\u8F66","\u5916\u5356"],takeaway:["take out","takeaway","\u7535\u52A8\u8F66","\u5916\u5356"],motorbike:["\u6469\u6258\u8F66"],caravan:["\u623F\u8F66"],walk:["\u6B65\u884C"],run:["\u5954\u8DD1","\u8DD1\u6B65"],riding:["bike","\u9A91\u884C","\u81EA\u884C\u8F66"],barricade:["\u8DEF\u969C"],footprint:["\u811A\u5370","\u8DB3\u8FF9"],"traffic-light":["\u4EA4\u901A","\u4FE1\u53F7\u706F"],"signal-tower":["base station","antenna","\u4FE1\u53F7\u5854","\u57FA\u7AD9","\u5929\u7EBF"],restaurant:["\u9910\u5385","\u996D\u5E97"],"restaurant-2":["\u9910\u5385","\u996D\u5E97"],cup:["tea","coffee","\u676F\u5B50","\u5496\u5561","\u8336"],goblet:["cup","wine glass","\u9AD8\u811A\u676F","\u9152\u676F"],"hotel-bed":["\u9152\u5E97","\u5E8A"],navigation:["gps","\u5BFC\u822A"],oil:["\u6C7D\u6CB9","\u673A\u6CB9"],direction:["right","\u65B9\u5411","\u53F3\u8F6C"],steering:["drive","\u65B9\u5411\u76D8","\u9A7E\u8F66"],"steering-2":["drive","\u65B9\u5411\u76D8","\u9A7E\u8F66"],lifebuoy:["life ring","\u6551\u751F\u5708"],passport:["passports","\u62A4\u7167"],suitcase:["travel","\u65C5\u884C","\u884C\u674E\u7BB1"],"suitcase-2":["travel","\u65C5\u884C","\u884C\u674E\u7BB1","\u62C9\u6746\u7BB1"],"suitcase-3":["travel","\u65C5\u884C","boarding case","\u884C\u674E\u7BB1","\u62C9\u6746\u7BB1","\u767B\u673A\u7BB1"],"luggage-deposit":["consignment","\u884C\u674E\u7BB1","\u884C\u674E\u5BC4\u5B58","\u6258\u8FD0"],"luggage-cart":["\u884C\u674E\u8F66"]},Media:{image:["picture","photo","\u56FE\u7247","\u7167\u7247"],"image-2":["picture","photo","\u56FE\u7247","\u7167\u7247"],"image-add":["picture","photo","\u56FE\u7247","\u7167\u7247","\u6DFB\u52A0"],"image-edit":["picture","photo","\u56FE\u7247","\u7167\u7247","\u7F16\u8F91"],landscape:["picture","image","photo","\u56FE\u7247","\u7167\u7247"],gallery:["picture","image","\u56FE\u7247","\u76F8\u518C"],"gallery-upload":["picture","image","\u56FE\u7247","\u76F8\u518C","\u4E0A\u4F20"],video:["\u89C6\u9891"],movie:["film","video","\u7535\u5F71","\u786C\u76D8","\u89C6\u9891"],"movie-2":["film","video","\u7535\u5F71","\u786C\u76D8","\u89C6\u9891"],film:["movie","video","\u5F71\u7247","\u7535\u5F71","\u89C6\u9891"],clapperboard:["movie","film","\u573A\u8BB0\u677F","\u7535\u5F71"],vidicon:["video","camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891"],"vidicon-2":["camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A"],live:["video","camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891","\u76F4\u64AD"],"video-add":["camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891","\u6DFB\u52A0"],"video-upload":["camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891","\u4E0A\u4F20"],"video-download":["camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891","\u4E0B\u8F7D"],dv:["vidicon","camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A"],camera:["photo","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247"],"camera-off":["photo","slash","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247","\u7981\u6B62","\u5173\u95ED"],"camera-2":["photo","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247"],"camera-3":["photo","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247"],"camera-lens":["aperture","photo","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247","\u670B\u53CB\u5708"],"camera-switch":["\u7167\u76F8\u673A","\u62CD\u7167","\u7FFB\u8F6C"],polaroid:["camera","\u76F8\u673A","\u5B9D\u4E3D\u6765"],"polaroid-2":["camera","\u76F8\u673A","\u5B9D\u4E3D\u6765"],"phone-camera":["\u624B\u673A\u76F8\u673A","\u624B\u673A\u6444\u50CF\u5934"],webcam:["\u6444\u50CF\u5934"],mv:["music video","\u97F3\u4E50"],music:["\u97F3\u4E50"],"music-2":["\u97F3\u4E50"],disc:["music","album","\u97F3\u4E50","\u5531\u7247"],album:["music","\u5531\u7247","\u97F3\u4E50"],dvd:["cd","dvd","record","\u5149\u76D8","\u523B\u5F55"],headphone:["music","headset","\u8033\u673A","\u97F3\u4E50"],radio:["\u6536\u97F3\u673A","\u7535\u53F0"],"radio-2":["\u6536\u97F3\u673A","\u7535\u53F0"],tape:["\u5F55\u97F3","\u78C1\u5E26"],mic:["record","voice","\u8BDD\u7B52","\u8BED\u97F3","\u5F55\u97F3","\u58F0\u97F3"],"mic-2":["record","voice","\u8BDD\u7B52","\u8BED\u97F3","\u5F55\u97F3","\u58F0\u97F3"],"mic-off":["record","voice","slash","\u5173\u95ED\u8BDD\u7B52","\u5173\u95ED\u8BED\u97F3","\u5F55\u97F3","\u5173\u95ED\u58F0\u97F3","\u9759\u97F3","\u7981\u6B62"],"volume-down":["trumpet","sound","speaker","\u97F3\u91CF\u4F4E","\u5587\u53ED","\u58F0\u97F3","\u626C\u58F0\u5668"],"volume-mute":["trumpet","sound","off","\u97F3\u91CF\u4F4E","\u5587\u53ED","\u58F0\u97F3","\u9759\u97F3"],"volume-up":["trumpet","sound","speaker","\u97F3\u91CF\u9AD8","\u5587\u53ED","\u58F0\u97F3","\u626C\u58F0\u5668"],"volume-vibrate":["trumpet","sound","speaker","\u5587\u53ED","\u58F0\u97F3","\u626C\u58F0\u5668","\u9707\u52A8\u6A21\u5F0F"],"volume-off-vibrate":["trumpet","sound","speaker","\u9759\u97F3","\u5587\u53ED","\u58F0\u97F3","\u626C\u58F0\u5668","\u9759\u97F3\u6A21\u5F0F"],speaker:["\u97F3\u54CD"],"speaker-2":["\u97F3\u54CD"],"speaker-3":["\u97F3\u54CD"],"surround-sound":["\u73AF\u7ED5\u7ACB\u4F53\u58F0"],broadcast:["\u5E7F\u64AD"],notification:["bell","alarm","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192"],"notification-2":["bell","alarm","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192"],"notification-3":["bell","alarm","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192"],"notification-4":["bell","alarm","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192"],"notification-off":["bell","alarm","silent","slash","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192","\u514D\u6253\u6270","\u9759\u97F3","\u5173\u95ED","\u7981\u6B62"],"play-circle":["start","\u64AD\u653E","\u5F00\u59CB"],"pause-circle":["\u6682\u505C"],"record-circle":["\u5F55\u97F3"],"stop-circle":["\u505C\u6B62"],eject:["\u63A8\u51FA"],play:["start","\u64AD\u653E","\u5F00\u59CB"],pause:["\u6682\u505C"],stop:["\u505C\u6B62"],rewind:["fast","\u5FEB\u9000"],speed:["fast","\u5FEB\u8FDB"],"skip-back":["\u4E0A\u4E00\u66F2"],"skip-forward":["\u4E0B\u4E00\u66F2"],"play-mini":["\u64AD\u653E"],"pause-mini":["\u6682\u505C"],"stop-mini":["\u505C\u6B62"],"rewind-mini":["fast","\u5FEB\u9000"],"speed-mini":["fast","\u5FEB\u8FDB"],"skip-back-mini":["\u4E0A\u4E00\u66F2"],"skip-forward-mini":["\u4E0B\u4E00\u66F2"],repeat:["\u5FAA\u73AF\u64AD\u653E"],"repeat-2":["\u5FAA\u73AF\u64AD\u653E"],"repeat-one":["\u5355\u66F2\u5FAA\u73AF"],"order-play":["\u987A\u5E8F\u64AD\u653E"],shuffle:["\u968F\u673A\u64AD\u653E"],"play-list":["\u64AD\u653E\u5217\u8868"],"play-list-2":["\u64AD\u653E\u5217\u8868"],"play-list-add":["\u5217\u8868","\u6DFB\u52A0"],fullscreen:["maximize","\u5168\u5C4F","\u6700\u5927\u5316"],"fullscreen-exit":["minimize","\u9000\u51FA\u5168\u5C4F","\u6700\u5C0F\u5316"],equalizer:["sliders","controls","settings","filter","\u5747\u8861\u5668","\u63A7\u5236\u5668","\u8BBE\u7F6E","\u7B5B\u9009"],"sound-module":["sliders","controls","settings","filter","\u5747\u8861\u5668","\u63A7\u5236\u5668","\u8BBE\u7F6E","\u7B5B\u9009"],rhythm:["\u8282\u594F","\u97F5\u5F8B"],voiceprint:["\u58F0\u7EB9"],hq:["high quality","\u9AD8\u8D28\u91CF","\u9AD8\u54C1\u8D28"],hd:["high definition","\u9AD8\u6E05\u6670\u5EA6"],"4k":["high definition","high quality","\u9AD8\u6E05\u6670\u5EA6","\u9AD8\u54C1\u8D28","\u8D85\u6E05"],"closed-captioning":["\u9690\u85CF\u5B57\u5E55"],"aspect-ratio":["\u5BBD\u9AD8\u6BD4","\u6BD4\u4F8B"],"picture-in-picture":["\u753B\u4E2D\u753B","\u5C0F\u7A97"],"picture-in-picture-2":["\u753B\u4E2D\u753B","\u5C0F\u7A97"],"picture-in-picture-exit":["\u9000\u51FA\u753B\u4E2D\u753B","\u9000\u51FA\u5C0F\u7A97"]},System:{apps:["\u5E94\u7528"],"apps-2":["\u5E94\u7528"],function:["layout","\u529F\u80FD","\u5E94\u7528","\u5361\u7247\u5E03\u5C40"],dashboard:["\u4EEA\u8868\u76D8"],menu:["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-2":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-3":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-4":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-5":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-add":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305","\u6DFB\u52A0"],"menu-fold":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305","\u5C55\u5F00"],more:["ellipsis","\u66F4\u591A","\u7701\u7565"],"more-2":["ellipsis","\u66F4\u591A","\u7701\u7565"],star:["favorite","like","mark","\u661F\u661F","\u661F\u6807","\u559C\u6B22"],"star-s":["favorite","like","mark","\u661F\u661F","\u661F\u6807","\u559C\u6B22","\u534A\u661F"],"star-half":["favorite","like","mark","\u661F\u661F","\u661F\u6807","\u559C\u6B22"],"star-half-s":["favorite","like","mark","\u661F\u661F","\u661F\u6807","\u559C\u6B22","\u534A\u661F"],settings:["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-2":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-3":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-4":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-5":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-6":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"list-settings":["\u5217\u8868","\u8BBE\u7F6E"],forbid:["slash","ban","\u7981\u6B62","\u7981\u7528"],"forbid-2":["slash","ban","\u7981\u6B62","\u7981\u7528"],information:["\u4FE1\u606F"],"error-warning":["alert","\u8B66\u544A","\u9519\u8BEF"],question:["help","\u95EE\u53F7","\u5E2E\u52A9"],alert:["\u63D0\u9192","\u8B66\u544A"],spam:["alert","\u5783\u573E\u90AE\u4EF6","\u8B66\u544A"],"spam-2":["alert","\u5783\u573E\u90AE\u4EF6","\u8B66\u544A"],"spam-3":["alert","\u5783\u573E\u90AE\u4EF6","\u8B66\u544A"],"checkbox-blank":["\u590D\u9009\u6846","\u7A7A"],checkbox:["\u590D\u9009\u6846"],"checkbox-indeterminate":["\u590D\u9009\u6846"],"add-box":["plus","new","\u590D\u9009\u6846","\u6DFB\u52A0","\u52A0\u53F7","\u65B0\u589E"],"checkbox-blank-circle":["\u590D\u9009\u6846","\u7A7A"],"checkbox-circle":["\u590D\u9009\u6846"],"indeterminate-circle":["slash","ban","\u590D\u9009\u6846","\u7981"],"add-circle":["plus","new","\u590D\u9009\u6846","\u6DFB\u52A0","\u52A0\u53F7","\u65B0\u589E"],"close-circle":["cancel","remove","delete","empty","x","\u5173\u95ED","\u53D6\u6D88","\u79FB\u9664","\u5220\u9664","\u6E05\u7A7A"],"radio-button":["\u5355\u9009\u6846"],"checkbox-multiple-blank":["\u590D\u9009\u6846","\u7A7A"],"checkbox-multiple":["\u590D\u9009\u6846","\u7A7A"],check:["\u5BF9\u52FE"],"check-double":["read","done","double-tick","\u53CC\u5BF9\u52FE","\u5DF2\u8BFB"],close:["cancel","remove","delete","empty","x","\u5173\u95ED","\u53D6\u6D88","\u79FB\u9664","\u5220\u9664","\u6E05\u7A7A"],add:["plus","new","\u6DFB\u52A0","\u65B0\u589E","\u52A0\u53F7"],subtract:["\u51CF"],divide:["\u9664\u4EE5"],"arrow-left-up":["corner","\u5DE6\u4E0A"],"arrow-up":["\u7BAD\u5934","\u5411\u4E0A"],"arrow-right-up":["corner","\u53F3\u4E0A"],"arrow-right":["forward","\u7BAD\u5934","\u5411\u53F3"],"arrow-right-down":["corner","\u53F3\u4E0B"],"arrow-down":["\u7BAD\u5934","\u5411\u4E0B"],"arrow-left-down":["corner","\u7BAD\u5934","\u5DE6\u4E0B"],"arrow-left":["backward","\u7BAD\u5934","\u5411\u5DE6","\u8FD4\u56DE"],"arrow-up-circle":["\u7BAD\u5934","\u5411\u4E0A"],"arrow-right-circle":["forward","\u7BAD\u5934","\u5411\u53F3"],"arrow-down-circle":["\u7BAD\u5934","\u5411\u4E0B","\u4E0B\u8F7D"],"arrow-left-circle":["backward","\u7BAD\u5934","\u5411\u5DE6","\u8FD4\u56DE"],"arrow-up-s":["\u7BAD\u5934","\u5411\u4E0A"],"arrow-down-s":["\u7BAD\u5934","\u5411\u4E0B"],"arrow-right-s":["forward","\u7BAD\u5934","\u5411\u53F3"],"arrow-left-s":["backward","\u7BAD\u5934","\u5411\u5DE6","\u8FD4\u56DE"],"arrow-drop-up":["\u7BAD\u5934","\u5411\u4E0A"],"arrow-drop-right":["forward","\u7BAD\u5934","\u5411\u53F3"],"arrow-drop-down":["\u7BAD\u5934","\u5411\u4E0B"],"arrow-drop-left":["backward","\u7BAD\u5934","\u5411\u5DE6","\u8FD4\u56DE"],"arrow-left-right":["exchange","swap","\u7BAD\u5934","\u5DE6\u53F3","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"arrow-up-down":["exchange","swap","\u7BAD\u5934","\u4E0A\u4E0B","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"arrow-go-back":["undo","\u7BAD\u5934","\u8FD4\u56DE","\u64A4\u9500","\u64A4\u56DE"],"arrow-go-forward":["redo","\u7BAD\u5934","\u91CD\u505A","\u64A4\u56DE"],download:["\u4E0B\u8F7D"],upload:["\u4E0A\u4F20"],"download-2":["\u4E0B\u8F7D"],"upload-2":["\u4E0A\u4F20"],"download-cloud":["\u4E0B\u8F7D","\u4E91"],"download-cloud-2":["\u4E0B\u8F7D","\u4E91"],"upload-cloud":["\u4E0A\u4F20","\u4E91"],"upload-cloud-2":["\u4E0A\u4F20","\u4E91"],"login-box":["sign in","\u767B\u5F55"],"logout-box":["sign out","\u767B\u51FA","\u6CE8\u9500"],"logout-box-r":["sign out","\u767B\u51FA","\u6CE8\u9500"],"login-circle":["sign in","\u767B\u5F55"],"logout-circle":["sign out","\u767B\u51FA","\u6CE8\u9500"],"logout-circle-r":["sign out","\u767B\u51FA","\u6CE8\u9500"],refresh:["synchronization","reload","restart","spinner","loader","ajax","update","\u5237\u65B0","\u540C\u6B65"],shield:["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1"],"shield-cross":["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1","\u95EA\u7535"],"shield-flash":["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1"],"shield-star":["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1","\u661F\u661F"],"shield-user":["safety","protect","user protected","guarantor","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1","\u7528\u6237"],"shield-keyhole":["safety","protect","guarantor","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1","\u94A5\u5319\u5B54"],"shield-check":["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1"],"delete-back":["backspace","\u5220\u9664","\u9000\u683C"],"delete-back-2":["backspace","\u5220\u9664","\u9000\u683C"],"delete-bin":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-2":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-3":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-4":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-5":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-6":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-7":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],lock:["security","password","\u9501\u5B50","\u5B89\u5168","\u5BC6\u7801"],"lock-2":["security","password","\u9501\u5B50","\u5B89\u5168","\u5BC6\u7801"],"lock-password":["security","\u9501\u5B50","\u5B89\u5168","\u5BC6\u7801"],"lock-unlock":["security","password","\u9501\u5B50","\u5B89\u5168","\u5BC6\u7801"],eye:["watch","view","\u773C\u775B","\u67E5\u770B"],"eye-off":["slash","\u773C\u775B","\u4E0D\u53EF\u89C1","\u5173\u95ED","\u7981\u6B62"],"eye-2":["watch","view","\u773C\u775B","\u67E5\u770B"],"eye-close":["x","\u95ED\u773C"],search:["\u641C\u7D22","\u653E\u5927\u955C"],"search-2":["\u641C\u7D22","\u653E\u5927\u955C"],"search-eye":["\u641C\u7D22","\u653E\u5927\u955C","\u773C\u775B"],"zoom-in":["\u653E\u5927","\u653E\u5927\u955C"],"zoom-out":["\u7F29\u5C0F","\u653E\u5927\u955C"],"find-replace":["\u67E5\u627E","\u641C\u7D22","\u66FF\u6362"],share:["\u5206\u4EAB","\u8F6C\u53D1"],"share-box":["\u5206\u4EAB","\u8F6C\u53D1"],"share-circle":["\u5206\u4EAB","\u8F6C\u53D1"],"share-forward":["\u5206\u4EAB","\u8F6C\u53D1"],"share-forward-2":["\u5206\u4EAB","\u8F6C\u53D1"],"share-forward-box":["\u5206\u4EAB","\u8F6C\u53D1"],"side-bar":["\u4FA7\u8FB9\u680F"],time:["clock","\u65F6\u95F4","\u65F6\u949F","\u949F\u8868"],timer:["chronograph","stopwatch","\u79D2\u8868","\u8BA1\u65F6\u5668"],"timer-2":["chronograph","stopwatch","\u79D2\u8868","\u8BA1\u65F6\u5668"],"timer-flash":["chronograph","stopwatch","\u79D2\u8868","\u8BA1\u65F6\u5668","\u95EA\u7535"],alarm:["\u95F9\u949F"],history:["record","recent","time machine","\u5386\u53F2\u8BB0\u5F55","\u6700\u8FD1"],"thumb-down":["dislike","bad","\u4E0D\u559C\u6B22","\u4E0D\u597D"],"thumb-up":["like","good","\u559C\u6B22","\u597D"],"alarm-warning":["alert","report","police light","\u544A\u8B66","\u4E3E\u62A5","\u8B66\u706F"],"notification-badge":["red dot","\u901A\u77E5","\u5C0F\u7EA2\u70B9"],toggle:["switch","\u5F00\u5173","\u89E6\u53D1\u5668"],filter:["filtration","\u7B5B\u9009","\u8FC7\u6EE4"],"filter-2":["filtration","\u7B5B\u9009","\u8FC7\u6EE4"],"filter-3":["filtration","\u7B5B\u9009","\u8FC7\u6EE4"],"filter-off":["filtration","clear-filter","\u7B5B\u9009","\u8FC7\u6EE4"],loader:["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"loader-2":["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"loader-3":["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"loader-4":["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"loader-5":["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"external-link":["\u5916\u94FE"]},"User & Faces":{user:["\u7528\u6237"],"user-2":["\u7528\u6237"],"user-3":["\u7528\u6237"],"user-4":["\u7528\u6237"],"user-5":["\u7528\u6237"],"user-6":["\u7528\u6237"],"user-smile":["\u7528\u6237","\u5FAE\u7B11"],"account-box":["\u7528\u6237","\u8D26\u6237"],"account-circle":["\u7528\u6237","\u8D26\u6237"],"account-pin-box":["\u7528\u6237","\u8D26\u6237"],"account-pin-circle":["\u7528\u6237","\u8D26\u6237"],"user-add":["\u7528\u6237","\u6DFB\u52A0","\u65B0\u589E"],"user-follow":["\u5173\u6CE8"],"user-unfollow":["\u7528\u6237","\u53D6\u6D88\u5173\u6CE8"],"user-shared":["transfer","\u7528\u6237","\u6211\u5206\u4EAB\u7684","\u53D1\u9001"],"user-shared-2":["transfer","\u7528\u6237","\u6211\u5206\u4EAB\u7684","\u53D1\u9001"],"user-received":["\u7528\u6237","\u6211\u63A5\u6536\u7684","\u6536\u53D6"],"user-received-2":["\u7528\u6237","\u6211\u63A5\u6536\u7684","\u6536\u53D6"],"user-location":["\u7528\u6237","\u5B9A\u4F4D"],"user-search":["\u7528\u6237","\u67E5\u627E"],"user-settings":["admin","\u7528\u6237","\u8BBE\u7F6E","\u7BA1\u7406\u5458"],"user-star":["\u7528\u6237","\u5173\u6CE8"],"user-heart":["\u7528\u6237","\u5173\u6CE8"],admin:["admin","\u7528\u6237","\u7BA1\u7406\u5458"],contacts:["\u8054\u7CFB\u4EBA"],group:["team","\u56E2\u961F","\u7FA4\u7EC4"],"group-2":["team","\u56E2\u961F","\u7FA4\u7EC4"],team:["\u56E2\u961F","\u5C0F\u7EC4","\u7FA4\u4E3B"],"user-voice":["\u7528\u6237","\u5F55\u97F3","\u6F14\u8BB2"],emotion:["\u8868\u60C5","\u7B11\u8138"],"emotion-2":["\u8868\u60C5","\u7B11\u8138"],"emotion-happy":["\u8868\u60C5","\u5F00\u5FC3"],"emotion-normal":["\u8868\u60C5","\u4E00\u822C"],"emotion-unhappy":["\u8868\u60C5","\u4E0D\u5F00\u5FC3"],"emotion-laugh":["comedy","happy","\u8868\u60C5","\u5927\u7B11","\u7B11\u8138","\u5F00\u5FC3","\u559C\u5267"],"emotion-sad":["drama","tears","\u60B2\u5267","\u54ED\u6CE3","\u6CEA"],skull:["ghost","\u9AB7\u9AC5","\u9B3C\u602A"],"skull-2":["ghost","horror","thriller","\u9AB7\u9AC5","\u9B3C\u602A","\u6050\u60E7","\u6050\u6016"],men:["gender","man","male","\u7537\u4EBA","\u7537\u6027"],women:["gender","woman","female","\u5973\u4EBA","\u5973\u6027"],travesti:["\u5973\u4EBA","\u5973\u6027"],genderless:["\u5973\u4EBA","\u5973\u6027"],"open-arm":["\u5F20\u5F00\u53CC\u81C2"],"body-scan":["gesture recognition","body","\u626B\u63CF\u8EAB\u4F53","\u4F53\u6001\u8BC6\u522B","\u52A8\u4F5C\u4E4B\u522B","\u624B\u52BF\u8BC6\u522B"],parent:["patriarch","\u7236\u6BCD","\u4EB2\u5B50","\u5BB6\u957F"],robot:["mechanic","\u673A\u5668\u4EBA"],aliens:["science fiction","ET","\u5916\u661F\u4EBA","\u79D1\u5E7B\u5C0F\u8BF4"],"bear-smile":["cartoon","anime","cartoon","\u5C0F\u718A","\u5FAE\u7B11","\u513F\u7AE5","\u52A8\u753B\u7247","\u5361\u901A","\u52A8\u6F2B"],mickey:["cartoon","disney","\u8FEA\u58EB\u5C3C","\u7C73\u8001\u9F20","\u5FAE\u7B11","\u513F\u7AE5","\u52A8\u753B\u7247"],criminal:["horror","thriller","\u7F6A\u72AF","\u72AF\u7F6A","\u6050\u6016"],ghost:["horror","thriller","\u9B3C\u602A","\u6050\u6016","\u6050\u60E7"],"ghost-2":["horror","\u9B3C\u602A","\u6050\u6016","\u6050\u60E7"],"ghost-smile":["\u9B3C\u602A","\u7B11"],"star-smile":["animation","\u52A8\u753B","\u5FAE\u7B11","\u661F\u661F"],spy:["incognito mode","detective","secret","\u95F4\u8C0D","\u4FA6\u63A2","\u65E0\u75D5\u6A21\u5F0F","\u9690\u79C1\u6A21\u5F0F"]},Weather:{sun:["light mode","sunny","\u592A\u9633","\u767D\u5929\u6A21\u5F0F","\u6674\u5929"],moon:["dark mode","night","\u6708\u4EAE","\u591C\u95F4\u6A21\u5F0F","\u6708\u7259"],flashlight:["\u95EA\u7535"],cloudy:["\u591A\u4E91"],"cloudy-2":["\u591A\u4E91"],mist:["\u96FE\u6C14","\u96FE\u973E"],foggy:["\u5927\u96FE"],"cloud-windy":["\u98CE"],windy:["\u5927\u98CE","\u522E\u98CE"],rainy:["\u4E0B\u96E8","\u96E8\u5929"],drizzle:["\u5C0F\u96E8"],showers:["\u4E2D\u96E8"],"heavy-showers":["\u5927\u96E8"],thunderstorms:["\u96F7\u66B4","\u96F7\u9635\u96E8"],hail:["\u51B0\u96F9"],snowy:["\u4E0B\u96EA","\u96EA\u5929"],"sun-cloudy":["\u6674\u8F6C\u591A\u4E91"],"moon-cloudy":["\u591C\u95F4\u591A\u4E91"],tornado:["\u9F99\u5377\u98CE"],typhoon:["cyclone","tornado","\u9F99\u5377\u98CE","\u65CB\u98CE","\u53F0\u98CE"],haze:["\u9634\u973E","\u8584\u96FE"],"haze-2":["\u9634\u973E","\u8584\u96FE"],"sun-foggy":["\u8584\u96FE"],"moon-foggy":["\u8584\u96FE"],"moon-clear":["\u591C\u95F4\u6A21\u5F0F","\u591C\u95F4\u65E0\u4E91"],"temp-hot":["temperature","\u6E29\u5EA6","\u9AD8\u6E29","\u70ED"],"temp-cold":["temperature","\u6E29\u5EA6","\u4F4E\u6E29","\u51B7"],celsius:["temperature","\u6E29\u5EA6","\u6444\u6C0F\u5EA6"],fahrenheit:["temperature","\u6E29\u5EA6","\u534E\u6C0F\u5EA6"],fire:["hot","\u706B","\u70ED\u95E8"],blaze:["\u706B\u707E"],earthquake:["\u5730\u9707"],flood:["\u6D2A\u6C34"],meteor:["\u6D41\u661F","\u9668\u77F3"],rainbow:["\u5F69\u8679"]},Others:{basketball:["sports","\u8FD0\u52A8","\u7BEE\u7403"],bell:["cartoon","anime","doraemon","\u94C3\u94DB","\u54C6\u5566A\u68A6","\u5361\u901A","\u52A8\u6F2B"],billiards:["sports","\u8FD0\u52A8","\u53F0\u7403","8"],boxing:["sports","\u8FD0\u52A8","\u62F3\u51FB"],cake:["anniversary","\u86CB\u7CD5"],"cake-2":["anniversary","\u86CB\u7CD5"],"cake-3":["\u86CB\u7CD5"],"door-lock":["\u95E8\u9501"],"door-lock-box":["\u95E8\u9501"],football:["sports","\u8FD0\u52A8","\u8DB3\u7403"],game:["pac man","\u6E38\u620F","\u5403\u8C46\u4EBA"],handbag:["fashion","\u65F6\u5C1A","\u624B\u63D0\u5305","\u5973\u5305"],key:["password","\u94A5\u5319","\u5BC6\u7801"],"key-2":["password","\u94A5\u5319","\u5BC6\u7801"],knife:["\u5200"],"knife-blood":["crime","\u5200","\u72AF\u7F6A","\u8840","\u6740\u4EBA"],lightbulb:["energy","creativity","\u706F\u6CE1","\u80FD\u6E90"],"lightbulb-flash":["energy","creativity","\u706F\u6CE1","\u80FD\u6E90","\u95EA\u7535"],outlet:["\u63D2\u5EA7"],"outlet-2":["\u63D2\u5EA7"],"ping-pong":["sports","table tennis","\u8FD0\u52A8","\u4E52\u4E53\u7403"],plug:["\u4E8C\u811A\u63D2\u5934"],"plug-2":["\u4E09\u811A\u63D2\u5934"],reserved:["\u5DF2\u9884\u5B9A"],shirt:["clothes","\u886C\u886B","\u8863\u670D"],sword:["war","\u5200\u5251","\u6218\u4E89","\u6218\u6597","\u7384\u5E7B"],"t-shirt":["skin","theme","T\u6064","\u76AE\u80A4","\u4E3B\u9898"],"t-shirt-2":["skin","theme","T\u6064","\u76AE\u80A4","\u4E3B\u9898"],"t-shirt-air":["dry","T\u6064","\u98CE\u5E72","\u70D8\u5E72"],umbrella:["protect","\u96E8\u4F1E","\u4FDD\u62A4"],"character-recognition":["ocr","\u6587\u5B57\u8BC6\u522B"],"voice-recognition":["asr","\u8BED\u97F3\u8BC6\u522B"],leaf:["energy","ecology","\u6811\u53F6","\u8282\u80FD","\u73AF\u4FDD","\u8BED\u97F3\u8BC6\u522B"],plant:["\u690D\u7269"],seedling:["\u6811\u82D7","\u690D\u7269"],recycle:["recyclable","\u53EF\u56DE\u6536"],scales:["balance","\u79F0","\u5929\u5E73","\u5929\u79E4"],"scales-2":["\u53A8\u623F\u79F0"],"scales-3":["balance","\u79F0","\u5929\u5E73","\u5929\u79E4"],fridge:["refrigerator","\u7535\u51B0\u7BB1"],wheelchair:["accessbility","\u8F6E\u6905","\u53EF\u8BBF\u95EE\u6027","\u8F85\u52A9\u529F\u80FD"],cactus:["desertr","\u4ED9\u4EBA\u638C","\u6C99\u6F20"],door:["\u95E8"],"door-open":["\u5F00\u95E8"],"door-closed":["\u5173\u95E8"]}};function cw(r,e,t){const n=r.slice();return n[29]=e[t],n}function pw(r,e,t){const n=r.slice();return n[32]=e[t],n[34]=t,n}function cre(r){let e;return{c(){e=V(r[8])},m(t,n){$(t,e,n)},p(t,n){n[0]&256&&Te(e,t[8])},d(t){t&&b(e)}}}function pre(r){let e;return{c(){e=D("span"),e.textContent="-"},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function dw(r){let e,t=r[32]+"",n,i,l,s,o;function a(){return r[20](r[32])}let u=r[34]!==r[9].length-1&&pre();return{c(){e=D("span"),n=V(t),i=R(),u&&u.c(),l=Ee(),w(e,"class","letter svelte-vhpvzd"),oe(e,"letter-selected",r[32]===r[2])},m(f,c){$(f,e,c),N(e,n),$(f,i,c),u&&u.m(f,c),$(f,l,c),s||(o=Pe(e,"click",a),s=!0)},p(f,c){r=f,c[0]&516&&oe(e,"letter-selected",r[32]===r[2])},d(f){f&&b(e),f&&b(i),u&&u.d(f),f&&b(l),s=!1,o()}}}function dre(r){let e;return{c(){e=V("Search")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function mre(r){let e,t,n=`There is no icons for this ${r[1]?"search":"page"}`,i;return{c(){e=D("div"),t=D("h5"),i=V(n),w(e,"class","no-icons svelte-vhpvzd")},m(l,s){$(l,e,s),N(e,t),N(t,i)},p(l,s){s[0]&2&&n!==(n=`There is no icons for this ${l[1]?"search":"page"}`)&&Te(i,n)},d(l){l&&b(e)}}}function gre(r){let e,t=!r[5]&&mw(r);return{c(){e=D("div"),t&&t.c(),w(e,"class","icon-area svelte-vhpvzd")},m(n,i){$(n,e,i),t&&t.m(e,null)},p(n,i){n[5]?t&&(t.d(1),t=null):t?t.p(n,i):(t=mw(n),t.c(),t.m(e,null))},d(n){n&&b(e),t&&t.d()}}}function mw(r){let e,t=r[7],n=[];for(let i=0;i<t.length;i+=1)n[i]=gw(cw(r,t,i));return{c(){for(let i=0;i<n.length;i+=1)n[i].c();e=Ee()},m(i,l){for(let s=0;s<n.length;s+=1)n[s].m(i,l);$(i,e,l)},p(i,l){if(l[0]&129){t=i[7];let s;for(s=0;s<t.length;s+=1){const o=cw(i,t,s);n[s]?n[s].p(o,l):(n[s]=gw(o),n[s].c(),n[s].m(e.parentNode,e))}for(;s<n.length;s+=1)n[s].d(1);n.length=t.length}},d(i){$t(n,i),i&&b(e)}}}function gw(r){let e,t,n,i,l,s,o=r[29]+"",a,u,f,c,p,d,g,h,v,k=r[29]+"",C,I,O,T,P;function M(){return r[24](r[29])}function F(){return r[25](r[29])}return{c(){e=D("div"),t=D("div"),n=D("i"),l=R(),s=D("div"),a=V(o),u=V("-fill"),f=R(),c=D("div"),p=D("div"),d=D("i"),h=R(),v=D("div"),C=V(k),I=V("-line"),O=R(),w(n,"class",i=""+(sr(`ri-${r[29]}-fill ri-xl`)+" svelte-vhpvzd")),w(t,"class","icon-preview svelte-vhpvzd"),w(s,"class","icon-label svelte-vhpvzd"),w(e,"class","icon-container svelte-vhpvzd"),oe(e,"selected",r[0]===`ri-${r[29]}-fill`),w(d,"class",g=""+(sr(`ri-${r[29]}-line ri-xl`)+" svelte-vhpvzd")),w(p,"class","icon-preview svelte-vhpvzd"),w(v,"class","icon-label svelte-vhpvzd"),w(c,"class","icon-container svelte-vhpvzd"),oe(c,"selected",r[0]===`ri-${r[29]}-line`)},m(j,z){$(j,e,z),N(e,t),N(t,n),N(e,l),N(e,s),N(s,a),N(s,u),$(j,f,z),$(j,c,z),N(c,p),N(p,d),N(c,h),N(c,v),N(v,C),N(v,I),N(c,O),T||(P=[Pe(e,"click",M),Pe(c,"click",F)],T=!0)},p(j,z){r=j,z[0]&128&&i!==(i=""+(sr(`ri-${r[29]}-fill ri-xl`)+" svelte-vhpvzd"))&&w(n,"class",i),z[0]&128&&o!==(o=r[29]+"")&&Te(a,o),z[0]&129&&oe(e,"selected",r[0]===`ri-${r[29]}-fill`),z[0]&128&&g!==(g=""+(sr(`ri-${r[29]}-line ri-xl`)+" svelte-vhpvzd"))&&w(d,"class",g),z[0]&128&&k!==(k=r[29]+"")&&Te(C,k),z[0]&129&&oe(c,"selected",r[0]===`ri-${r[29]}-line`)},d(j){j&&b(e),j&&b(f),j&&b(c),T=!1,Tn(P)}}}function _re(r){let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C,I,O,T,P,M,F=r[9],j=[];for(let W=0;W<F.length;W+=1)j[W]=dw(pw(r,F,W));function z(W){r[21](W)}let q={thin:!0,placeholder:"Search Icon"};r[1]!==void 0&&(q.value=r[1]),o=new tt({props:q}),K.push(()=>ce(o,"value",z)),f=new gt({props:{secondary:!0,$$slots:{default:[dre]},$$scope:{ctx:r}}}),f.$on("click",r[13]);function H(W,G){return W[7].length>0?gre:mre}let Y=H(r),U=Y(r);return{c(){e=D("div"),t=D("div"),n=D("div");for(let W=0;W<j.length;W+=1)j[W].c();i=R(),l=D("div"),s=D("div"),S(o.$$.fragment),u=R(),S(f.$$.fragment),c=R(),p=D("div"),d=D("div"),g=D("span"),g.innerHTML='<i class="page-btn ri-arrow-left-line ri-sm svelte-vhpvzd"></i>',h=R(),v=D("span"),k=V(r[6]),C=R(),I=D("span"),I.innerHTML='<i class="page-btn ri-arrow-right-line ri-sm svelte-vhpvzd"></i>',O=R(),U.c(),w(n,"class","alphabet-area svelte-vhpvzd"),w(s,"class","input-wrapper svelte-vhpvzd"),w(l,"class","search-input svelte-vhpvzd"),w(d,"class","pager"),w(p,"class","page-area svelte-vhpvzd"),w(t,"class","search-area svelte-vhpvzd"),w(e,"class","container svelte-vhpvzd")},m(W,G){$(W,e,G),N(e,t),N(t,n);for(let Q=0;Q<j.length;Q+=1)j[Q].m(n,null);N(t,i),N(t,l),N(l,s),A(o,s,null),N(l,u),A(f,l,null),N(t,c),N(t,p),N(p,d),N(d,g),N(d,h),N(d,v),N(v,k),N(d,C),N(d,I),N(e,O),U.m(e,null),T=!0,P||(M=[Pe(g,"click",r[22]),Pe(I,"click",r[23])],P=!0)},p(W,G){if(G[0]&1540){F=W[9];let Z;for(Z=0;Z<F.length;Z+=1){const ee=pw(W,F,Z);j[Z]?j[Z].p(ee,G):(j[Z]=dw(ee),j[Z].c(),j[Z].m(n,null))}for(;Z<j.length;Z+=1)j[Z].d(1);j.length=F.length}const Q={};!a&&G[0]&2&&(a=!0,Q.value=W[1],pe(()=>a=!1)),o.$set(Q);const fe={};G[1]&16&&(fe.$$scope={dirty:G,ctx:W}),f.$set(fe),(!T||G[0]&64)&&Te(k,W[6]),Y===(Y=H(W))&&U?U.p(W,G):(U.d(1),U=Y(W),U&&(U.c(),U.m(e,null)))},i(W){T||(m(o.$$.fragment,W),m(f.$$.fragment,W),T=!0)},o(W){_(o.$$.fragment,W),_(f.$$.fragment,W),T=!1},d(W){W&&b(e),$t(j,W),E(o),E(f),U.d(),P=!1,Tn(M)}}}function hre(r){let e,t,n,i,l;t=new Jt({props:{$$slots:{default:[cre]},$$scope:{ctx:r}}}),t.$on("click",function(){mt(r[4].show)&&r[4].show.apply(this,arguments)});let s={anchor:r[3],$$slots:{default:[_re]},$$scope:{ctx:r}};return i=new wp({props:s}),r[26](i),i.$on("open",r[11]),{c(){e=D("div"),S(t.$$.fragment),n=R(),S(i.$$.fragment)},m(o,a){$(o,e,a),A(t,e,null),r[19](e),$(o,n,a),A(i,o,a),l=!0},p(o,a){r=o;const u={};a[0]&256|a[1]&16&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a[0]&8&&(f.anchor=r[3]),a[0]&231|a[1]&16&&(f.$$scope={dirty:a,ctx:r}),i.$set(f)},i(o){l||(m(t.$$.fragment,o),m(i.$$.fragment,o),l=!0)},o(o){_(t.$$.fragment,o),_(i.$$.fragment,o),l=!1},d(o){o&&b(e),E(t),r[19](null),o&&b(n),r[26](null),E(i,o)}}}const $re=Object.keys(fw).reduce((r,e)=>[...r,...Object.keys(fw[e])],[]);function T1(r){const e=new RegExp(`^${r}`,"i");return $re.filter(t=>e.test(t))}function bre(r,e,t){let n,i,l,s,o;const a=ht();let{value:u=""}=e,{maxIconsPerPage:f=30}=e,c="",p="A",d=1,g=T1(p);const h=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];let v,k,C=!1;async function I(G){t(15,d=1),t(1,c=""),t(5,C=!0),t(2,p=G),t(16,g=T1(G)),await Hs(),t(5,C=!1)}async function O(){t(5,C=!0);const G=g.findIndex(Q=>Q.value===u);G!==-1&&t(15,d=Math.ceil(G/f)),await Hs(),t(5,C=!1)}async function T(){if(u){const G=n.substring(0,1);await I(G),await O()}}async function P(G){t(5,C=!0),G&&d<i?t(15,d++,d):!G&&d>1&&t(15,d--,d),await Hs(),t(5,C=!1)}async function M(){t(15,d=1),t(5,C=!0),t(16,g=T1(c)),await Hs(),t(5,C=!1)}function F(G){K[G?"unshift":"push"](()=>{v=G,t(3,v)})}const j=G=>I(G);function z(G){c=G,t(1,c)}const q=()=>P(!1),H=()=>P(!0),Y=G=>t(0,u=`ri-${G}-fill`),U=G=>t(0,u=`ri-${G}-line`);function W(G){K[G?"unshift":"push"](()=>{k=G,t(4,k)})}return r.$$set=G=>{"value"in G&&t(0,u=G.value),"maxIconsPerPage"in G&&t(14,f=G.maxIconsPerPage)},r.$$.update=()=>{r.$$.dirty[0]&1&&a("change",u),r.$$.dirty[0]&1&&t(8,n=u?u.substring(3):"Pick icon"),r.$$.dirty[0]&81920&&t(17,i=Math.ceil(g.length/f)),r.$$.dirty[0]&49152&&t(18,l=f*d),r.$$.dirty[0]&344064&&t(7,s=g.slice(l-f,l)),r.$$.dirty[0]&163840&&t(6,o=`Page ${d} of ${i}`)},[u,c,p,v,k,C,o,s,n,h,I,T,P,M,f,d,g,i,l,F,j,z,q,H,Y,U,W]}class vre extends ie{constructor(e){super();le(this,e,bre,hre,re,{value:0,maxIconsPerPage:14},null,[-1,-1])}}function wre(r){let e,t;return e=new Xe({props:{placeholder:r[0],value:r[2],options:r[1]}}),e.$on("change",r[3]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&1&&(l.placeholder=n[0]),i&4&&(l.value=n[2]),i&2&&(l.options=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function yre(r,e,t){let n,i,l,s,o;ue(r,un,g=>t(8,o=g));let{componentInstance:a={}}=e,{value:u=""}=e,{placeholder:f}=e;const c=ht(),p=(g,h)=>!Array.isArray(h)||h.indexOf(g)===-1?null:g,d=g=>{t(2,s=p(g.detail,l)),c("change",s)};return r.$$set=g=>{"componentInstance"in g&&t(4,a=g.componentInstance),"value"in g&&t(5,u=g.value),"placeholder"in g&&t(0,f=g.placeholder)},r.$$.update=()=>{r.$$.dirty&272&&t(7,n=El(o,a)),r.$$.dirty&384&&t(6,i=Di(o,n).schema),r.$$.dirty&64&&t(1,l=Object.keys(i||{})),r.$$.dirty&34&&t(2,s=p(u,l))},[f,l,s,d,a,u,i,n,o]}class kre extends ie{constructor(e){super();le(this,e,yre,wre,re,{componentInstance:4,value:5,placeholder:0})}}function Cre(r){let e,t;return e=new Ho({props:{placeholder:r[0],value:r[2],options:r[1]}}),e.$on("change",r[3]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&1&&(l.placeholder=n[0]),i&4&&(l.value=n[2]),i&2&&(l.options=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Sre(r,e,t){let n,i,l,s,o;ue(r,un,g=>t(8,o=g));let{componentInstance:a={}}=e,{value:u=""}=e,{placeholder:f}=e;const c=ht(),p=(g,h)=>(Array.isArray(g)||(g=[]),g.filter(v=>h.indexOf(v)!==-1)),d=g=>{t(2,s=p(g.detail,l)),c("change",s)};return r.$$set=g=>{"componentInstance"in g&&t(4,a=g.componentInstance),"value"in g&&t(5,u=g.value),"placeholder"in g&&t(0,f=g.placeholder)},r.$$.update=()=>{r.$$.dirty&272&&t(7,n=El(o,a)),r.$$.dirty&384&&t(6,i=Di(o,n).schema),r.$$.dirty&64&&t(1,l=Object.keys(i||{})),r.$$.dirty&34&&t(2,s=p(u,l))},[f,l,s,d,a,u,i,n,o]}class Are extends ie{constructor(e){super();le(this,e,Sre,Cre,re,{componentInstance:4,value:5,placeholder:0})}}function Ere(r){let e,t;return e=new Ho({props:{placeholder:r[0],value:r[2],options:r[1]}}),e.$on("change",r[3]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&1&&(l.placeholder=n[0]),i&4&&(l.value=n[2]),i&2&&(l.options=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function _w(r,e){return Array.isArray(r)||(r=[]),r.filter(t=>e.indexOf(t)!==-1)}function Ore(r,e,t){let n,i,l,s,o,a;ue(r,Ot,h=>t(9,o=h)),ue(r,un,h=>t(8,a=h));let{componentInstance:u={}}=e,{value:f=""}=e,{placeholder:c}=e;const p=ht();function d(h,v){let k=Object.values(v);if(!(h==null?void 0:h.tableId))return k;const C=o.list.find(I=>I._id===h.tableId);return y1(k,{allowLinks:C==null?void 0:C.sql}).map(I=>I.name)}const g=h=>{t(2,s=_w(h.detail,l)),p("change",s)};return r.$$set=h=>{"componentInstance"in h&&t(4,u=h.componentInstance),"value"in h&&t(5,f=h.value),"placeholder"in h&&t(0,c=h.placeholder)},r.$$.update=()=>{r.$$.dirty&272&&t(7,n=El(a,u)),r.$$.dirty&384&&t(6,i=Di(a,n,{searchableSchema:!0}).schema),r.$$.dirty&192&&t(1,l=d(n,i||{})),r.$$.dirty&34&&t(2,s=_w(f,l))},[c,l,s,g,u,f,i,n,a]}class Tre extends ie{constructor(e){super();le(this,e,Ore,Ere,re,{componentInstance:4,value:5,placeholder:0})}}function Ire(r){let e,t;const n=[r[1],{showAllQueries:!0},{otherSources:r[0]}];let i={};for(let l=0;l<n.length;l+=1)i=Ui(i,n[l]);return e=new j6({props:i}),e.$on("change",r[2]),{c(){S(e.$$.fragment)},m(l,s){A(e,l,s),t=!0},p(l,[s]){const o=s&3?Su(n,[s&2&&Au(l[1]),n[1],s&1&&{otherSources:l[0]}]):{};e.$set(o)},i(l){t||(m(e.$$.fragment,l),t=!0)},o(l){_(e.$$.fragment,l),t=!1},d(l){E(e,l)}}}function Lre(r,e,t){const n=[{name:"Custom",label:"Custom"}];function i(l){ft.call(this,r,l)}return r.$$set=l=>{t(1,e=Ui(Ui({},e),Ou(l)))},e=Ou(e),[n,e,i]}class Pre extends ie{constructor(e){super();le(this,e,Lre,Ire,re,{})}}function hw(r,e,t){const n=r.slice();return n[8]=e[t][0],n[0]=e[t][1],n}function Nre(r){let e=r[4][r[0]].name+"",t;return{c(){t=V(e)},m(n,i){$(n,t,i)},p(n,i){i&1&&e!==(e=n[4][n[0]].name+"")&&Te(t,e)},d(n){n&&b(t)}}}function Rre(r){let e=r[0].name+"",t;return{c(){t=V(e)},m(n,i){$(n,t,i)},p:Oe,d(n){n&&b(t)}}}function $w(r){let e,t,n,i,l,s,o,a;t=new ct({props:{color:"white",size:"L",name:r[0].icon}}),i=new Ke({props:{size:"XS",$$slots:{default:[Rre]},$$scope:{ctx:r}}});function u(){return r[5](r[8])}return{c(){e=D("button"),S(t.$$.fragment),n=R(),S(i.$$.fragment),l=R(),w(e,"class","layout svelte-dl48fo"),oe(e,"selected",r[1]===r[8])},m(f,c){$(f,e,c),A(t,e,null),N(e,n),A(i,e,null),N(e,l),s=!0,o||(a=Pe(e,"click",u),o=!0)},p(f,c){r=f;const p={};c&2048&&(p.$$scope={dirty:c,ctx:r}),i.$set(p),c&18&&oe(e,"selected",r[1]===r[8])},i(f){s||(m(t.$$.fragment,f),m(i.$$.fragment,f),s=!0)},o(f){_(t.$$.fragment,f),_(i.$$.fragment,f),s=!1},d(f){f&&b(e),E(t),E(i),o=!1,a()}}}function Mre(r){let e,t,n=Object.entries(r[4]),i=[];for(let s=0;s<n.length;s+=1)i[s]=$w(hw(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){e=D("div");for(let s=0;s<i.length;s+=1)i[s].c();w(e,"class","container svelte-dl48fo")},m(s,o){$(s,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(s,o){if(o&18){n=Object.entries(s[4]);let a;for(a=0;a<n.length;a+=1){const u=hw(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=$w(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){s&&b(e),$t(i,s)}}}function Dre(r){let e,t;return e=new Dt({props:{onConfirm:r[6],size:"L",title:"Select layout",$$slots:{default:[Mre]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.onConfirm=n[6]),i&2050&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function jre(r){let e,t,n,i;e=new Jt({props:{$$slots:{default:[Nre]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[2].show)&&r[2].show.apply(this,arguments)});let l={$$slots:{default:[Dre]},$$scope:{ctx:r}};return n=new Et({props:l}),r[7](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&2049&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&2050&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[7](null),E(n,s)}}}function Bre(r,e,t){const n=ht();let{value:i=""}=e,l=i,s,o={mainSidebar:{name:"Main with Sidebar",icon:"ColumnTwoB"},sidebarMain:{name:"Sidebar with Main",icon:"ColumnTwoC"},twoColumns:{name:"Two columns",icon:"ColumnTwoA"},threeColumns:{name:"Three columns",icon:"ViewColumn"}};const a=c=>t(1,l=c),u=()=>n("change",l);function f(c){K[c?"unshift":"push"](()=>{s=c,t(2,s)})}return r.$$set=c=>{"value"in c&&t(0,i=c.value)},[i,l,s,n,o,a,u,f]}class zre extends ie{constructor(e){super();le(this,e,Bre,jre,re,{value:0})}}function bw(r,e,t){const n=r.slice();return n[12]=e[t],n[13]=e,n[14]=t,n}function vw(r){let e,t=[],n=new Map,i,l,s,o,a=r[0];const u=f=>f[12].id;for(let f=0;f<a.length;f+=1){let c=bw(r,a,f),p=u(c);n.set(p,t[f]=ww(p,c))}return{c(){e=D("div");for(let f=0;f<t.length;f+=1)t[f].c();w(e,"class","links svelte-1mnha07")},m(f,c){$(f,e,c);for(let p=0;p<t.length;p+=1)t[p].m(e,null);l=!0,s||(o=[wr(i=Iu.call(null,e,{items:r[0],flipDurationMs:I1,dropTargetStyle:{outline:"none"},dragDisabled:r[1]})),Pe(e,"finalize",r[6]),Pe(e,"consider",r[5])],s=!0)},p(f,c){if(c&23){a=f[0],te();for(let p=0;p<t.length;p+=1)t[p].r();t=xn(t,c,u,1,f,a,n,e,Bo,ww,null,bw);for(let p=0;p<t.length;p+=1)t[p].a();ne()}i&&mt(i.update)&&c&3&&i.update.call(null,{items:f[0],flipDurationMs:I1,dropTargetStyle:{outline:"none"},dragDisabled:f[1]})},i(f){if(!l){for(let c=0;c<a.length;c+=1)m(t[c]);l=!0}},o(f){for(let c=0;c<t.length;c+=1)_(t[c]);l=!1},d(f){f&&b(e);for(let c=0;c<t.length;c+=1)t[c].d();s=!1,Tn(o)}}}function ww(r,e){let t,n,i,l,s,o,a,u,f,c,p,d,g,h,v=Oe,k,C,I;i=new ct({props:{name:"DragHandle",size:"XL"}});function O(j){e[9](j,e[12])}let T={placeholder:"Text"};e[12].text!==void 0&&(T.value=e[12].text),o=new tt({props:T}),K.push(()=>ce(o,"value",O));function P(j){e[10](j,e[12])}let M={placeholder:"URL",options:e[2]};e[12].url!==void 0&&(M.value=e[12].url),f=new Ws({props:M}),K.push(()=>ce(f,"value",P));function F(){return e[11](e[12])}return d=new ct({props:{name:"Close",hoverable:!0,size:"S"}}),d.$on("click",F),{key:r,first:null,c(){t=D("div"),n=D("div"),S(i.$$.fragment),s=R(),S(o.$$.fragment),u=R(),S(f.$$.fragment),p=R(),S(d.$$.fragment),g=R(),w(n,"class","handle svelte-1mnha07"),w(n,"aria-label","drag-handle"),w(n,"style",l=e[1]?"cursor: grab":"cursor: grabbing"),w(t,"class","link svelte-1mnha07"),this.first=t},m(j,z){$(j,t,z),N(t,n),A(i,n,null),N(t,s),A(o,t,null),N(t,u),A(f,t,null),N(t,p),A(d,t,null),N(t,g),k=!0,C||(I=Pe(n,"mousedown",e[8]),C=!0)},p(j,z){e=j,(!k||z&2&&l!==(l=e[1]?"cursor: grab":"cursor: grabbing"))&&w(n,"style",l);const q={};!a&&z&1&&(a=!0,q.value=e[12].text,pe(()=>a=!1)),o.$set(q);const H={};z&4&&(H.options=e[2]),!c&&z&1&&(c=!0,H.value=e[12].url,pe(()=>c=!1)),f.$set(H)},r(){h=t.getBoundingClientRect()},f(){zo(t),v()},a(){v(),v=qo(t,h,Uo,{duration:I1})},i(j){k||(m(i.$$.fragment,j),m(o.$$.fragment,j),m(f.$$.fragment,j),m(d.$$.fragment,j),k=!0)},o(j){_(i.$$.fragment,j),_(o.$$.fragment,j),_(f.$$.fragment,j),_(d.$$.fragment,j),k=!1},d(j){j&&b(t),E(i),E(o),E(f),E(d),C=!1,I()}}}function qre(r){let e;return{c(){e=V("Add Link")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ure(r){var s;let e,t,n,i,l=((s=r[0])==null?void 0:s.length)&&vw(r);return n=new gt({props:{secondary:!0,icon:"Add",$$slots:{default:[qre]},$$scope:{ctx:r}}}),n.$on("click",r[3]),{c(){l&&l.c(),e=R(),t=D("div"),S(n.$$.fragment)},m(o,a){l&&l.m(o,a),$(o,e,a),$(o,t,a),A(n,t,null),i=!0},p(o,a){var f;((f=o[0])==null?void 0:f.length)?l?(l.p(o,a),a&1&&m(l,1)):(l=vw(o),l.c(),m(l,1),l.m(e.parentNode,e)):l&&(te(),_(l,1,1,()=>{l=null}),ne());const u={};a&32768&&(u.$$scope={dirty:a,ctx:o}),n.$set(u)},i(o){i||(m(l),m(n.$$.fragment,o),i=!0)},o(o){_(l),_(n.$$.fragment,o),i=!1},d(o){l&&l.d(o),o&&b(e),o&&b(t),E(n)}}}function Fre(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[Ure]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","container svelte-1mnha07")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&32775&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Vre(r){let e,t;return e=new Ai({props:{$$slots:{default:[Fre]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&32775&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}const I1=150;function Hre(r,e,t){let n,i;ue(r,He,h=>t(7,i=h));let{links:l=[]}=e,s=!0;const o=()=>{t(0,l=[...l,{}])},a=h=>{t(0,l=l.filter(v=>v.id!==h))},u=h=>{t(0,l=h.detail.items)},f=h=>{u(h),t(1,s=!0)},c=()=>t(1,s=!1);function p(h,v){r.$$.not_equal(v.text,h)&&(v.text=h,t(0,l))}function d(h,v){r.$$.not_equal(v.url,h)&&(v.url=h,t(0,l))}const g=h=>a(h.id);return r.$$set=h=>{"links"in h&&t(0,l=h.links)},r.$$.update=()=>{r.$$.dirty&1&&l.forEach(h=>{h.id||(h.id=Br.generate())}),r.$$.dirty&128&&t(2,n=i.screens.map(h=>{var v;return(v=h.routing)==null?void 0:v.route}).filter(h=>h!=null))},[l,s,n,o,a,u,f,i,c,p,d,g]}class Wre extends ie{constructor(e){super();le(this,e,Hre,Vre,re,{links:0})}}function Gre(r){let e;return{c(){e=V("Configure links")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Yre(r){let e;return{c(){e=V("Configure the links in your navigation bar.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Jre(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Qre(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[Jre]},$$scope:{ctx:r}}}),e.$on("click",r[2]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&128&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Xre(r){let e,t,n;function i(s){r[4](s)}let l={slot:"body"};return r[1]!==void 0&&(l.links=r[1]),e=new Wre({props:l}),K.push(()=>ce(e,"links",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};!t&&o&2&&(t=!0,a.links=s[1],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Kre(r){let e,t,n,i;e=new Jt({props:{$$slots:{default:[Gre]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[0].show)&&r[0].show.apply(this,arguments)});let l={title:"Navigation Links",$$slots:{body:[Xre],buttons:[Qre],description:[Yre]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[5](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&128&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&130&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[5](null),E(n,s)}}}function Zre(r,e,t){let{value:n=[]}=e,i,l=vn.cloneDeep(n||[]);const s=ht(),o=()=>{s("change",l),i.hide()};function a(f){l=f,t(1,l)}function u(f){K[f?"unshift":"push"](()=>{i=f,t(0,i)})}return r.$$set=f=>{"value"in f&&t(3,n=f.value)},[i,l,o,n,a,u]}class xre extends ie{constructor(e){super();le(this,e,Zre,Kre,re,{value:3})}}function eie(r){let e;return{c(){e=V("Define filters")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function tie(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function nie(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[tie]},$$scope:{ctx:r}}}),e.$on("click",r[4]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&8192&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function rie(r){let e,t,n;function i(s){r[10](s)}let l={slot:"body",bindings:r[0],schemaFields:r[3]};return r[2]!==void 0&&(l.filters=r[2]),e=new k1({props:l}),K.push(()=>ce(e,"filters",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};o&1&&(a.bindings=s[0]),o&8&&(a.schemaFields=s[3]),!t&&o&4&&(t=!0,a.filters=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){E(e,s)}}}function iie(r){let e,t,n,i;e=new Jt({props:{$$slots:{default:[eie]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)});let l={title:"Filtering",$$slots:{body:[rie],buttons:[nie]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[11](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&8192&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&8205&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[11](null),E(n,s)}}}function lie(r,e,t){let n,i,l,s;ue(r,un,v=>t(9,s=v));const o=ht();let{value:a=[]}=e,{componentInstance:u}=e,{bindings:f=[]}=e,c,p=a||[];const d=async()=>{o("change",p),we.success("Filters saved."),c.hide()};function g(v){p=v,t(2,p)}function h(v){K[v?"unshift":"push"](()=>{c=v,t(1,c)})}return r.$$set=v=>{"value"in v&&t(5,a=v.value),"componentInstance"in v&&t(6,u=v.componentInstance),"bindings"in v&&t(0,f=v.bindings)},r.$$.update=()=>{var v;r.$$.dirty&576&&t(8,n=El(s,u)),r.$$.dirty&768&&t(7,i=(v=Di(s,n))==null?void 0:v.schema),r.$$.dirty&128&&t(3,l=Object.values(i||{}))},[f,c,p,l,d,a,u,i,n,s,g,h]}class sie extends ie{constructor(e){super();le(this,e,lie,iie,re,{value:5,componentInstance:6,bindings:0})}}function yw(r){let e,t,n,i,l;return t=new ct({props:{size:"S",name:"FlashOn"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","icon svelte-1q3yltm"),w(e,"data-cy","text-binding-button")},m(s,o){$(s,e,o),A(t,e,null),n=!0,i||(l=Pe(e,"click",function(){mt(r[8].show)&&r[8].show.apply(this,arguments)}),i=!0)},p(s,o){r=s},i(s){n||(m(t.$$.fragment,s),n=!0)},o(s){_(t.$$.fragment,s),n=!1},d(s){s&&b(e),E(t),i=!1,l()}}}function oie(r){let e;return{c(){e=V("Add the objects on the left to enrich your text.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function aie(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function uie(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[aie]},$$scope:{ctx:r}}}),e.$on("click",r[12]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&8388608&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function fie(r){let e,t,n;var i=r[0];function l(s){return{props:{slot:"body",value:s[7],close:s[12],bindings:s[1],allowJS:s[6]}}}return i&&(e=new i(l(r)),e.$on("change",r[19])),{c(){e&&S(e.$$.fragment),t=Ee()},m(s,o){e&&A(e,s,o),$(s,t,o),n=!0},p(s,o){const a={};if(o&128&&(a.value=s[7]),o&2&&(a.bindings=s[1]),o&64&&(a.allowJS=s[6]),i!==(i=s[0])){if(e){te();const u=e;_(u.$$.fragment,1,0,()=>{E(u,1)}),ne()}i?(e=new i(l(s)),e.$on("change",s[19]),S(e.$$.fragment),m(e.$$.fragment,1),A(e,t.parentNode,t)):e=null}else i&&e.$set(a)},i(s){n||(e&&m(e.$$.fragment,s),n=!0)},o(s){e&&_(e.$$.fragment,s),n=!1},d(s){s&&b(t),e&&E(e,s)}}}function cie(r){let e,t,n,i,l,s;t=new Ws({props:{label:r[4],disabled:r[5],readonly:r[11],value:r[11]?"(JavaScript function)":r[7],placeholder:r[3],options:r[10]}}),t.$on("type",r[17]),t.$on("pick",r[18]);let o=!r[5]&&yw(r),a={title:r[2],$$slots:{body:[fie],buttons:[uie],description:[oie]},$$scope:{ctx:r}};return l=new Kr({props:a}),r[20](l),{c(){e=D("div"),S(t.$$.fragment),n=R(),o&&o.c(),i=R(),S(l.$$.fragment),w(e,"class","control svelte-1q3yltm")},m(u,f){$(u,e,f),A(t,e,null),N(e,n),o&&o.m(e,null),$(u,i,f),A(l,u,f),s=!0},p(u,[f]){const c={};f&16&&(c.label=u[4]),f&32&&(c.disabled=u[5]),f&2048&&(c.readonly=u[11]),f&2176&&(c.value=u[11]?"(JavaScript function)":u[7]),f&8&&(c.placeholder=u[3]),f&1024&&(c.options=u[10]),t.$set(c),u[5]?o&&(te(),_(o,1,1,()=>{o=null}),ne()):o?(o.p(u,f),f&32&&m(o,1)):(o=yw(u),o.c(),m(o,1),o.m(e,null));const p={};f&4&&(p.title=u[2]),f&8389315&&(p.$$scope={dirty:f,ctx:u}),l.$set(p)},i(u){s||(m(t.$$.fragment,u),m(o),m(l.$$.fragment,u),s=!0)},o(u){_(t.$$.fragment,u),_(o),_(l.$$.fragment,u),s=!1},d(u){u&&b(e),E(t),o&&o.d(),u&&b(i),r[20](null),E(l,u)}}}function pie(r,e,t){let n,i,l,s,{panel:o=b1}=e,{value:a=""}=e,{bindings:u=[]}=e,{title:f="Bindings"}=e,{placeholder:c}=e,{label:p}=e,{disabled:d=!1}=e,{options:g}=e,{allowJS:h=!0}=e,{appendBindingsAsOptions:v=!0}=e;const k=ht();let C;const I=()=>{O(i),C.hide()},O=(z,q)=>{q&&!(g==null?void 0:g.includes(z))&&(z=`{{ ${z} }}`),k("change",Ss(u,z))},T=(z,q,H)=>H?[].concat(z||[]).concat((q==null?void 0:q.map(Y=>Y.readableBinding))||[]):z,P=z=>O(z.detail,!1),M=z=>O(z.detail,!0),F=z=>t(9,i=z.detail);function j(z){K[z?"unshift":"push"](()=>{C=z,t(8,C)})}return r.$$set=z=>{"panel"in z&&t(0,o=z.panel),"value"in z&&t(14,a=z.value),"bindings"in z&&t(1,u=z.bindings),"title"in z&&t(2,f=z.title),"placeholder"in z&&t(3,c=z.placeholder),"label"in z&&t(4,p=z.label),"disabled"in z&&t(5,d=z.disabled),"options"in z&&t(15,g=z.options),"allowJS"in z&&t(6,h=z.allowJS),"appendBindingsAsOptions"in z&&t(16,v=z.appendBindingsAsOptions)},r.$$.update=()=>{r.$$.dirty&16386&&t(7,n=_o(u,a)),r.$$.dirty&128&&t(9,i=n),r.$$.dirty&16384&&t(11,l=Rf(a)),r.$$.dirty&98306&&t(10,s=T(g,u,v))},[o,u,f,c,p,d,h,n,C,i,s,l,I,O,a,g,v,P,M,F,j]}class kw extends ie{constructor(e){super();le(this,e,pie,cie,re,{panel:0,value:14,bindings:1,title:2,placeholder:3,label:4,disabled:5,options:15,allowJS:6,appendBindingsAsOptions:16})}}function die(r){let e,t;return e=new kw({props:{value:r[0],bindings:r[1],options:r[2],appendBindingsAsOptions:!1}}),e.$on("change",r[4]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&1&&(l.value=n[0]),i&2&&(l.bindings=n[1]),i&4&&(l.options=n[2]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function mie(r,e,t){let n,i;ue(r,He,a=>t(3,i=a));let{value:l}=e,{bindings:s}=e;function o(a){ft.call(this,r,a)}return r.$$set=a=>{"value"in a&&t(0,l=a.value),"bindings"in a&&t(1,s=a.bindings)},r.$$.update=()=>{r.$$.dirty&8&&t(2,n=i.screens.map(a=>{var u;return(u=a.routing)==null?void 0:u.route}).filter(a=>a!=null))},[l,s,n,i,o]}class gie extends ie{constructor(e){super();le(this,e,mie,die,re,{value:0,bindings:1})}}function Cw(r,e,t){const n=r.slice();return n[6]=e[t],n[7]=e,n[8]=t,n}function Sw(r){let e,t;return e=new Ke({props:{size:"S",$$slots:{default:[_ie]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function _ie(r){let e;return{c(){e=V("Add an option to get started.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Aw(r){let e,t=[],n=new Map,i,l=r[0];const s=o=>o[6].id;for(let o=0;o<l.length;o+=1){let a=Cw(r,l,o),u=s(a);n.set(u,t[o]=Ew(u,a))}return{c(){e=D("div");for(let o=0;o<t.length;o+=1)t[o].c();w(e,"class","options svelte-12ls1u")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,a){a&3&&(l=o[0],te(),t=xn(t,a,s,1,o,l,n,e,jr,Ew,null,Cw),ne())},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function Ew(r,e){let t,n,i,l,s,o,a,u,f;function c(v){e[3](v,e[6])}let p={placeholder:"Label",label:"Label",labelPosition:"left"};e[6].label!==void 0&&(p.value=e[6].label),n=new tt({props:p}),K.push(()=>ce(n,"value",c));function d(v){e[4](v,e[6])}let g={placeholder:"Value",label:"Value",labelPosition:"left"};e[6].value!==void 0&&(g.value=e[6].value),s=new tt({props:g}),K.push(()=>ce(s,"value",d));function h(){return e[5](e[6])}return u=new ct({props:{name:"Close",hoverable:!0,size:"S"}}),u.$on("click",h),{key:r,first:null,c(){t=Ee(),S(n.$$.fragment),l=R(),S(s.$$.fragment),a=R(),S(u.$$.fragment),this.first=t},m(v,k){$(v,t,k),A(n,v,k),$(v,l,k),A(s,v,k),$(v,a,k),A(u,v,k),f=!0},p(v,k){e=v;const C={};!i&&k&1&&(i=!0,C.value=e[6].label,pe(()=>i=!1)),n.$set(C);const I={};!o&&k&1&&(o=!0,I.value=e[6].value,pe(()=>o=!1)),s.$set(I)},i(v){f||(m(n.$$.fragment,v),m(s.$$.fragment,v),m(u.$$.fragment,v),f=!0)},o(v){_(n.$$.fragment,v),_(s.$$.fragment,v),_(u.$$.fragment,v),f=!1},d(v){v&&b(t),E(n,v),v&&b(l),E(s,v),v&&b(a),E(u,v)}}}function hie(r){let e;return{c(){e=V("Add Option")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function $ie(r){var a;let e,t,n,i,l,s=!r[0].length&&Sw(r),o=((a=r[0])==null?void 0:a.length)&&Aw(r);return i=new gt({props:{icon:"AddCircle",size:"M",secondary:!0,$$slots:{default:[hie]},$$scope:{ctx:r}}}),i.$on("click",r[2]),{c(){s&&s.c(),e=R(),o&&o.c(),t=R(),n=D("div"),S(i.$$.fragment)},m(u,f){s&&s.m(u,f),$(u,e,f),o&&o.m(u,f),$(u,t,f),$(u,n,f),A(i,n,null),l=!0},p(u,f){var p;u[0].length?s&&(te(),_(s,1,1,()=>{s=null}),ne()):s?f&1&&m(s,1):(s=Sw(u),s.c(),m(s,1),s.m(e.parentNode,e)),((p=u[0])==null?void 0:p.length)?o?(o.p(u,f),f&1&&m(o,1)):(o=Aw(u),o.c(),m(o,1),o.m(t.parentNode,t)):o&&(te(),_(o,1,1,()=>{o=null}),ne());const c={};f&512&&(c.$$scope={dirty:f,ctx:u}),i.$set(c)},i(u){l||(m(s),m(o),m(i.$$.fragment,u),l=!0)},o(u){_(s),_(o),_(i.$$.fragment,u),l=!1},d(u){s&&s.d(u),u&&b(e),o&&o.d(u),u&&b(t),u&&b(n),E(i)}}}function bie(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[$ie]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","container svelte-12ls1u")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&513&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function vie(r){let e,t;return e=new Ai({props:{$$slots:{default:[bie]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&513&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function wie(r,e,t){let{options:n=[]}=e;const i=u=>{t(0,n=n.filter(f=>f.id!==u))},l=()=>{t(0,n=[...n,{id:Br.generate(),label:null,value:null}])};function s(u,f){r.$$.not_equal(f.label,u)&&(f.label=u,t(0,n))}function o(u,f){r.$$.not_equal(f.value,u)&&(f.value=u,t(0,n))}const a=u=>i(u.id);return r.$$set=u=>{"options"in u&&t(0,n=u.options)},[n,i,l,s,o,a]}class yie extends ie{constructor(e){super();le(this,e,wie,vie,re,{options:0})}}function kie(r){let e;return{c(){e=V("Define Options")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Cie(r){let e;return{c(){e=V("Define the options for this picker.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Sie(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Aie(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[Sie]},$$scope:{ctx:r}}}),e.$on("click",r[2]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&128&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Eie(r){let e,t,n;function i(s){r[4](s)}let l={slot:"body"};return r[1]!==void 0&&(l.options=r[1]),e=new yie({props:l}),K.push(()=>ce(e,"options",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};!t&&o&2&&(t=!0,a.options=s[1],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Oie(r){let e,t,n,i;e=new Jt({props:{$$slots:{default:[kie]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[0].show)&&r[0].show.apply(this,arguments)});let l={title:"Options",$$slots:{body:[Eie],buttons:[Aie],description:[Cie]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[5](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&128&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&130&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[5](null),E(n,s)}}}function Tie(r,e,t){const n=ht();let{value:i}=e,l,s=i||[];const o=async()=>{t(1,s=s.filter(f=>f.value&&f.label)),n("change",s),l.hide()};function a(f){s=f,t(1,s)}function u(f){K[f?"unshift":"push"](()=>{l=f,t(0,l)})}return r.$$set=f=>{"value"in f&&t(3,i=f.value)},[l,s,o,i,a,u]}class Iie extends ie{constructor(e){super();le(this,e,Tie,Oie,re,{value:3})}}function Lie(r){let e,t;return e=new Ws({props:{value:r[0],options:r[1]}}),e.$on("change",r[8]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&1&&(l.value=n[0]),i&2&&(l.options=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Pie(r,e,t){let n,i,l,s,o;ue(r,un,d=>t(7,o=d));let{componentInstance:a}=e,{value:u}=e,{type:f}=e;const c=(d,g)=>{let h=Object.entries(d!=null?d:{}),v=[];return g==="field/options"?v=[g,"field/string"]:v=[g],v=v.map(k=>k.split("/")[1]),h=h.filter(k=>v.includes(k[1].type)),h.map(k=>k[0])};function p(d){ft.call(this,r,d)}return r.$$set=d=>{"componentInstance"in d&&t(2,a=d.componentInstance),"value"in d&&t(0,u=d.value),"type"in d&&t(3,f=d.type)},r.$$.update=()=>{r.$$.dirty&132&&t(6,n=qf(o==null?void 0:o.props,a._id,d=>d._component==="@budibase/standard-components/form")),r.$$.dirty&192&&t(5,i=El(o,n)),r.$$.dirty&160&&t(4,l=Di(o,i,{formSchema:!0}).schema),r.$$.dirty&24&&t(1,s=c(l,f))},[u,s,a,f,l,i,n,o,p]}class tl extends ie{constructor(e){super();le(this,e,Pie,Lie,re,{componentInstance:2,value:0,type:3})}}function Ow(r,e,t){const n=r.slice();return n[29]=e[t],n[30]=e,n[31]=t,n}function Tw(r,e,t){const n=r.slice();return n[29]=e[t],n}function Nie(r){let e;return{c(){e=V("Schema validation rules")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Rie(r){let e,t;return e=new Ke({props:{size:"S",$$slots:{default:[Die]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i[1]&8&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Mie(r){let e,t,n=r[5],i=[];for(let s=0;s<n.length;s+=1)i[s]=Iw(Tw(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){e=D("div");for(let s=0;s<i.length;s+=1)i[s].c();w(e,"class","links svelte-lcp0nr")},m(s,o){$(s,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(s,o){if(o[0]&50){n=s[5];let a;for(a=0;a<n.length;a+=1){const u=Tw(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=Iw(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){s&&b(e),$t(i,s)}}}function Die(r){let e;return{c(){e=V("There are no built-in validation rules from the schema.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Iw(r){let e,t,n,i,l,s,o,a,u,f,c,p;return t=new Xe({props:{placeholder:"Constraint",value:r[29].constraint,options:r[4],disabled:!0}}),i=new Xe({props:{placeholder:null,value:"Value",options:["Binding","Value"],disabled:!0}}),s=new Un({props:{placeholder:"Constraint value",value:r[29].value,bindings:r[1],disabled:!0}}),a=new Un({props:{placeholder:"Error message",value:r[29].error,bindings:r[1],disabled:!0}}),{c(){e=D("div"),S(t.$$.fragment),n=R(),S(i.$$.fragment),l=R(),S(s.$$.fragment),o=R(),S(a.$$.fragment),u=R(),f=D("div"),c=R(),w(e,"class","rule schema svelte-lcp0nr")},m(d,g){$(d,e,g),A(t,e,null),N(e,n),A(i,e,null),N(e,l),A(s,e,null),N(e,o),A(a,e,null),N(e,u),N(e,f),N(e,c),p=!0},p(d,g){const h={};g[0]&32&&(h.value=d[29].constraint),g[0]&16&&(h.options=d[4]),t.$set(h);const v={};g[0]&32&&(v.value=d[29].value),g[0]&2&&(v.bindings=d[1]),s.$set(v);const k={};g[0]&32&&(k.value=d[29].error),g[0]&2&&(k.bindings=d[1]),a.$set(k)},i(d){p||(m(t.$$.fragment,d),m(i.$$.fragment,d),m(s.$$.fragment,d),m(a.$$.fragment,d),p=!0)},o(d){_(t.$$.fragment,d),_(i.$$.fragment,d),_(s.$$.fragment,d),_(a.$$.fragment,d),p=!1},d(d){d&&b(e),E(t),E(i),E(s),E(a)}}}function jie(r){let e,t,n,i,l,s;e=new Ct({props:{size:"XS",$$slots:{default:[Nie]},$$scope:{ctx:r}}});const o=[Mie,Rie],a=[];function u(f,c){var p;return((p=f[5])==null?void 0:p.length)?0:1}return n=u(r),i=a[n]=o[n](r),{c(){S(e.$$.fragment),t=R(),i.c(),l=Ee()},m(f,c){A(e,f,c),$(f,t,c),a[n].m(f,c),$(f,l,c),s=!0},p(f,c){const p={};c[1]&8&&(p.$$scope={dirty:c,ctx:f}),e.$set(p);let d=n;n=u(f),n===d?a[n].p(f,c):(te(),_(a[d],1,1,()=>{a[d]=null}),ne(),i=a[n],i?i.p(f,c):(i=a[n]=o[n](f),i.c()),m(i,1),i.m(l.parentNode,l))},i(f){s||(m(e.$$.fragment,f),m(i),s=!0)},o(f){_(e.$$.fragment,f),_(i),s=!1},d(f){E(e,f),f&&b(t),a[n].d(f),f&&b(l)}}}function Bie(r){let e;return{c(){e=V("Custom validation rules")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Lw(r){let e,t=[],n=new Map,i,l=r[0];const s=o=>o[29].id;for(let o=0;o<l.length;o+=1){let a=Ow(r,l,o),u=s(a);n.set(u,t[o]=Pw(u,a))}return{c(){e=D("div");for(let o=0;o<t.length;o+=1)t[o].c();w(e,"class","links svelte-lcp0nr")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,a){a[0]&415&&(l=o[0],te(),t=xn(t,a,s,1,o,l,n,e,jr,Pw,null,Ow),ne())},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function zie(r){let e,t,n,i,l;const s=[Gie,Wie,Hie,Vie,Fie],o=[];function a(u,f){return(e==null||f[0]&1)&&(e=!!["string","number","options","longform"].includes(u[29].type)),e?0:u[29].type==="array"?1:u[29].type==="boolean"?2:u[29].type==="datetime"?3:4}return t=a(r,[-1,-1]),n=o[t]=s[t](r),{c(){n.c(),i=Ee()},m(u,f){o[t].m(u,f),$(u,i,f),l=!0},p(u,f){let c=t;t=a(u,f),t===c?o[t].p(u,f):(te(),_(o[c],1,1,()=>{o[c]=null}),ne(),n=o[t],n?n.p(u,f):(n=o[t]=s[t](u),n.c()),m(n,1),n.m(i.parentNode,i))},i(u){l||(m(n),l=!0)},o(u){_(n),l=!1},d(u){o[t].d(u),u&&b(i)}}}function qie(r){let e,t,n;function i(s){r[16](s,r[29])}let l={placeholder:"Constraint value"};return r[29].value!==void 0&&(l.value=r[29].value),e=new tt({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){r=s;const a={};!t&&o[0]&1&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Uie(r){let e,t;function n(...i){return r[15](r[29],r[30],r[31],...i)}return e=new Un({props:{placeholder:"Constraint value",value:r[29].value,bindings:r[1],disabled:r[29].constraint==="required"}}),e.$on("change",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l[0]&1&&(s.value=r[29].value),l[0]&2&&(s.bindings=r[1]),l[0]&1&&(s.disabled=r[29].constraint==="required"),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function Fie(r){let e,t;return e=new Un({props:{disabled:!0}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p:Oe,i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Vie(r){let e,t,n;function i(s){r[19](s,r[29])}let l={enableTime:!1,disabled:r[29].constraint==="required"};return r[29].value!==void 0&&(l.value=r[29].value),e=new Bl({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){r=s;const a={};o[0]&1&&(a.disabled=r[29].constraint==="required"),!t&&o[0]&1&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Hie(r){let e,t,n;function i(s){r[18](s,r[29])}let l={disabled:r[29].constraint==="required",options:[{label:"True",value:"true"},{label:"False",value:"false"}]};return r[29].value!==void 0&&(l.value=r[29].value),e=new Xe({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){r=s;const a={};o[0]&1&&(a.disabled=r[29].constraint==="required"),!t&&o[0]&1&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Wie(r){let e,t;return e=new Xe({props:{disabled:r[29].constraint==="required",options:r[2].schema[r[3]].constraints.inclusion,getOptionLabel:Zie,getOptionValue:xie,value:r[29].value}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i[0]&1&&(l.disabled=n[29].constraint==="required"),i[0]&12&&(l.options=n[2].schema[n[3]].constraints.inclusion),i[0]&1&&(l.value=n[29].value),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Gie(r){let e,t,n;function i(s){r[17](s,r[29])}let l={disabled:r[29].constraint==="required",placeholder:"Constraint value"};return r[29].value!==void 0&&(l.value=r[29].value),e=new tt({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){r=s;const a={};o[0]&1&&(a.disabled=r[29].constraint==="required"),!t&&o[0]&1&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Pw(r,e){let t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C,I;function O(U){e[13](U,e[29])}let T={options:e[4],placeholder:"Constraint"};e[29].constraint!==void 0&&(T.value=e[29].constraint),n=new Xe({props:T}),K.push(()=>ce(n,"value",O));function P(U){e[14](U,e[29])}let M={disabled:e[29].constraint==="required",placeholder:null,options:["Binding","Value"]};e[29].valueType!==void 0&&(M.value=e[29].valueType),s=new Xe({props:M}),K.push(()=>ce(s,"value",P));const F=[Uie,qie,zie],j=[];function z(U,W){return U[29].valueType==="Binding"?0:((u==null||W[0]&1)&&(u=!!(U[29].type!=="array"&&["maxLength","minLength","regex","notRegex","contains","notContains"].includes(U[29].constraint))),u?1:2)}f=z(e,[-1,-1]),c=j[f]=F[f](e);function q(...U){return e[20](e[29],e[30],e[31],...U)}d=new Un({props:{placeholder:"Error message",value:e[29].error,bindings:e[1]}}),d.$on("change",q);function H(){return e[21](e[29])}h=new ct({props:{name:"Duplicate",hoverable:!0,size:"S"}}),h.$on("click",H);function Y(){return e[22](e[29])}return k=new ct({props:{name:"Close",hoverable:!0,size:"S"}}),k.$on("click",Y),{key:r,first:null,c(){t=D("div"),S(n.$$.fragment),l=R(),S(s.$$.fragment),a=R(),c.c(),p=R(),S(d.$$.fragment),g=R(),S(h.$$.fragment),v=R(),S(k.$$.fragment),C=R(),w(t,"class","rule svelte-lcp0nr"),this.first=t},m(U,W){$(U,t,W),A(n,t,null),N(t,l),A(s,t,null),N(t,a),j[f].m(t,null),N(t,p),A(d,t,null),N(t,g),A(h,t,null),N(t,v),A(k,t,null),N(t,C),I=!0},p(U,W){e=U;const G={};W[0]&16&&(G.options=e[4]),!i&&W[0]&1&&(i=!0,G.value=e[29].constraint,pe(()=>i=!1)),n.$set(G);const Q={};W[0]&1&&(Q.disabled=e[29].constraint==="required"),!o&&W[0]&1&&(o=!0,Q.value=e[29].valueType,pe(()=>o=!1)),s.$set(Q);let fe=f;f=z(e,W),f===fe?j[f].p(e,W):(te(),_(j[fe],1,1,()=>{j[fe]=null}),ne(),c=j[f],c?c.p(e,W):(c=j[f]=F[f](e),c.c()),m(c,1),c.m(t,p));const Z={};W[0]&1&&(Z.value=e[29].error),W[0]&2&&(Z.bindings=e[1]),d.$set(Z)},i(U){I||(m(n.$$.fragment,U),m(s.$$.fragment,U),m(c),m(d.$$.fragment,U),m(h.$$.fragment,U),m(k.$$.fragment,U),I=!0)},o(U){_(n.$$.fragment,U),_(s.$$.fragment,U),_(c),_(d.$$.fragment,U),_(h.$$.fragment,U),_(k.$$.fragment,U),I=!1},d(U){U&&b(t),E(n),E(s),j[f].d(),E(d),E(h),E(k)}}}function Yie(r){let e;return{c(){e=V("Add Rule")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Jie(r){var a;let e,t,n,i,l,s;e=new Ct({props:{size:"XS",$$slots:{default:[Bie]},$$scope:{ctx:r}}});let o=((a=r[0])==null?void 0:a.length)&&Lw(r);return l=new gt({props:{secondary:!0,icon:"Add",$$slots:{default:[Yie]},$$scope:{ctx:r}}}),l.$on("click",r[6]),{c(){S(e.$$.fragment),t=R(),o&&o.c(),n=R(),i=D("div"),S(l.$$.fragment),w(i,"class","button")},m(u,f){A(e,u,f),$(u,t,f),o&&o.m(u,f),$(u,n,f),$(u,i,f),A(l,i,null),s=!0},p(u,f){var d;const c={};f[1]&8&&(c.$$scope={dirty:f,ctx:u}),e.$set(c),((d=u[0])==null?void 0:d.length)?o?(o.p(u,f),f[0]&1&&m(o,1)):(o=Lw(u),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(te(),_(o,1,1,()=>{o=null}),ne());const p={};f[1]&8&&(p.$$scope={dirty:f,ctx:u}),l.$set(p)},i(u){s||(m(e.$$.fragment,u),m(o),m(l.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(o),_(l.$$.fragment,u),s=!1},d(u){E(e,u),u&&b(t),o&&o.d(u),u&&b(n),u&&b(i),E(l)}}}function Qie(r){var l;let e,t,n,i;return e=new Qe({props:{noPadding:!0,gap:((l=r[5])==null?void 0:l.length)?"S":"XS",$$slots:{default:[jie]},$$scope:{ctx:r}}}),n=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[Jie]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,o){var f;const a={};o[0]&32&&(a.gap=((f=s[5])==null?void 0:f.length)?"S":"XS"),o[0]&50|o[1]&8&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const u={};o[0]&31|o[1]&8&&(u.$$scope={dirty:o,ctx:s}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),E(n,s)}}}function Xie(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"M",$$slots:{default:[Qie]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","container svelte-lcp0nr")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l[0]&63|l[1]&8&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Kie(r){let e,t;return e=new Ai({props:{$$slots:{default:[Xie]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i[0]&63|i[1]&8&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}const Zie=r=>r,xie=r=>r;function ele(r,e,t){let n,i,l,s,o,a,u;ue(r,ri,G=>t(11,a=G)),ue(r,un,G=>t(12,u=G));let{rules:f=[]}=e,{bindings:c=[]}=e,{type:p}=e;const d={Required:{label:"Required",value:"required"},MinLength:{label:"Min length",value:"minLength"},MaxLength:{label:"Max length",value:"maxLength"},MaxValue:{label:"Max value",value:"maxValue"},MinValue:{label:"Min value",value:"minValue"},Equal:{label:"Must equal",value:"equal"},NotEqual:{label:"Must not equal",value:"notEqual"},Regex:{label:"Must match regex",value:"regex"},NotRegex:{label:"Must not match regex",value:"notRegex"},Contains:{label:"Must contain",value:"contains"},NotContains:{label:"Must not contain",value:"notContains"}},g={string:[d.Required,d.MaxLength,d.Equal,d.NotEqual,d.Regex,d.NotRegex],number:[d.Required,d.MaxValue,d.MinValue,d.Equal,d.NotEqual],boolean:[d.Required,d.Equal,d.NotEqual],datetime:[d.Required,d.MaxValue,d.MinValue,d.Equal,d.NotEqual],attachment:[d.Required],link:[d.Required,d.Contains,d.NotContains,d.MinLength,d.MaxLength],array:[d.Required,d.MinLength,d.MaxLength,d.Contains,d.NotContains]},h=G=>g[G],v=(G,Q)=>{if(!G||!Q)return null;const fe=qf(G.props,Q._id,Z=>Z._component.endsWith("/form"));return Di(G,fe==null?void 0:fe.dataSource)},k=(G,Q)=>{var ae,_e,Re,$e,be,he;if(!G||!Q)return[];const fe=(ae=Q.schema)==null?void 0:ae[G],Z=fe==null?void 0:fe.constraints;if(!Z)return[];let ee=[];if((G===((_e=Q==null?void 0:Q.table)==null?void 0:_e.primaryDisplay)||((Re=Z.presence)==null?void 0:Re.allowEmpty)===!1)&&ee.push({constraint:"required",error:"Required field"}),C(($e=Z.length)==null?void 0:$e.maximum)){const Ne=Z.length.maximum;ee.push({constraint:"maxLength",value:Ne,error:`Maximum ${Ne} characters`})}if(C((be=Z.numericality)==null?void 0:be.greaterThanOrEqualTo)){const Ne=Z.numericality.greaterThanOrEqualTo;ee.push({constraint:"minValue",value:Ne,error:`Minimum value is ${Ne}`})}if(C((he=Z.numericality)==null?void 0:he.lessThanOrEqualTo)){const Ne=Z.numericality.lessThanOrEqualTo;ee.push({constraint:"maxValue",value:Ne,error:`Maximum value is ${Ne}`})}return ee},C=G=>G!=null&&G!=="",I=()=>{t(0,f=[...f||[],{valueType:"Binding",type:s,id:Br.generate(),value:s=="array"?[]:null}])},O=G=>{t(0,f=f.filter(Q=>Q.id!==G))},T=G=>{const Q=f.find(Z=>Z.id===G),fe=lt(Se({},Q),{id:Br.generate()});t(0,f=[...f,fe])};function P(G,Q){r.$$.not_equal(Q.constraint,G)&&(Q.constraint=G,t(0,f))}function M(G,Q){r.$$.not_equal(Q.valueType,G)&&(Q.valueType=G,t(0,f))}const F=(G,Q,fe,Z)=>t(0,Q[fe].value=Z.detail,f);function j(G,Q){r.$$.not_equal(Q.value,G)&&(Q.value=G,t(0,f))}function z(G,Q){r.$$.not_equal(Q.value,G)&&(Q.value=G,t(0,f))}function q(G,Q){r.$$.not_equal(Q.value,G)&&(Q.value=G,t(0,f))}function H(G,Q){r.$$.not_equal(Q.value,G)&&(Q.value=G,t(0,f))}const Y=(G,Q,fe,Z)=>t(0,Q[fe].error=Z.detail,f),U=G=>T(G.id),W=G=>O(G.id);return r.$$set=G=>{"rules"in G&&t(0,f=G.rules),"bindings"in G&&t(1,c=G.bindings),"type"in G&&t(9,p=G.type)},r.$$.update=()=>{r.$$.dirty[0]&6144&&t(2,n=v(u,a)),r.$$.dirty[0]&2048&&t(3,i=a==null?void 0:a.field),r.$$.dirty[0]&12&&t(5,l=k(i,n||{})),r.$$.dirty[0]&512&&t(10,s=(p==null?void 0:p.split("/")[1])||"string"),r.$$.dirty[0]&1024&&t(4,o=h(s))},[f,c,n,i,o,l,I,O,T,p,s,a,u,P,M,F,j,z,q,H,Y,U,W]}class tle extends ie{constructor(e){super();le(this,e,ele,Kie,re,{rules:0,bindings:1,type:9},null,[-1,-1])}}function nle(r){let e;return{c(){e=V("Configure validation")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function rle(r){let e;return{c(){e=V("Configure validation rules for this field.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ile(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function lle(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[ile]},$$scope:{ctx:r}}}),e.$on("click",r[5]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&512&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function sle(r){let e,t,n;function i(s){r[6](s)}let l={slot:"body",type:r[3],bindings:r[1],componentDefinition:r[2]};return r[0]!==void 0&&(l.rules=r[0]),e=new tle({props:l}),K.push(()=>ce(e,"rules",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.type=s[3]),o&2&&(a.bindings=s[1]),o&4&&(a.componentDefinition=s[2]),!t&&o&1&&(t=!0,a.rules=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){E(e,s)}}}function ole(r){let e,t,n,i;e=new Jt({props:{$$slots:{default:[nle]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[4].show)&&r[4].show.apply(this,arguments)});let l={title:"Validation Rules",$$slots:{body:[sle],buttons:[lle],description:[rle]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[7](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&512&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&527&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[7](null),E(n,s)}}}function ale(r,e,t){let{value:n=[]}=e,{bindings:i=[]}=e,{componentDefinition:l}=e,{type:s}=e,o;const a=ht(),u=()=>{a("change",n),o.hide()};function f(p){n=p,t(0,n)}function c(p){K[p?"unshift":"push"](()=>{o=p,t(4,o)})}return r.$$set=p=>{"value"in p&&t(0,n=p.value),"bindings"in p&&t(1,i=p.bindings),"componentDefinition"in p&&t(2,l=p.componentDefinition),"type"in p&&t(3,s=p.type)},[n,i,l,s,o,u,f,c]}class Es extends ie{constructor(e){super();le(this,e,ale,ole,re,{value:0,bindings:1,componentDefinition:2,type:3})}}function ule(r){let e;return{c(){e=V("Background color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function fle(r){let e,t,n,i;return e=new Ze({props:{$$slots:{default:[ule]},$$scope:{ctx:r}}}),n=new Jl({props:{value:r[0].background,alignRight:!0,spectrumTheme:r[1].theme}}),n.$on("change",r[5]),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(l,s){A(e,l,s),$(l,t,s),A(n,l,s),i=!0},p(l,s){const o={};s&128&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&1&&(a.value=l[0].background),s&2&&(a.spectrumTheme=l[1].theme),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){E(e,l),l&&b(t),E(n,l)}}}function cle(r){let e;return{c(){e=V("Text color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ple(r){let e,t,n,i;return e=new Ze({props:{$$slots:{default:[cle]},$$scope:{ctx:r}}}),n=new Jl({props:{value:r[0].color,alignRight:!0,spectrumTheme:r[1].theme}}),n.$on("change",r[6]),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(l,s){A(e,l,s),$(l,t,s),A(n,l,s),i=!0},p(l,s){const o={};s&128&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&1&&(a.value=l[0].color),s&2&&(a.spectrumTheme=l[1].theme),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){E(e,l),l&&b(t),E(n,l)}}}function dle(r){let e,t,n,i,l,s,o,a,u,f,c,p;function d(k){r[2](k)}let g={label:"Width",placeholder:"Auto"};r[0].width!==void 0&&(g.value=r[0].width),e=new tt({props:g}),K.push(()=>ce(e,"value",d));function h(k){r[3](k)}let v={label:"Alignment",options:["Left","Center","Right"],placeholder:"Default"};return r[0].align!==void 0&&(v.value=r[0].align),i=new Xe({props:v}),K.push(()=>ce(i,"value",h)),o=new Un({props:{label:"Value",value:r[0].template,placeholder:"{{ Value }}",bindings:[{readableBinding:"Value",runtimeBinding:"[value]"}]}}),o.$on("change",r[4]),u=new Qe({props:{noPadding:!0,gap:"XS",$$slots:{default:[fle]},$$scope:{ctx:r}}}),c=new Qe({props:{noPadding:!0,gap:"XS",$$slots:{default:[ple]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment),n=R(),S(i.$$.fragment),s=R(),S(o.$$.fragment),a=R(),S(u.$$.fragment),f=R(),S(c.$$.fragment)},m(k,C){A(e,k,C),$(k,n,C),A(i,k,C),$(k,s,C),A(o,k,C),$(k,a,C),A(u,k,C),$(k,f,C),A(c,k,C),p=!0},p(k,C){const I={};!t&&C&1&&(t=!0,I.value=k[0].width,pe(()=>t=!1)),e.$set(I);const O={};!l&&C&1&&(l=!0,O.value=k[0].align,pe(()=>l=!1)),i.$set(O);const T={};C&1&&(T.value=k[0].template),o.$set(T);const P={};C&131&&(P.$$scope={dirty:C,ctx:k}),u.$set(P);const M={};C&131&&(M.$$scope={dirty:C,ctx:k}),c.$set(M)},i(k){p||(m(e.$$.fragment,k),m(i.$$.fragment,k),m(o.$$.fragment,k),m(u.$$.fragment,k),m(c.$$.fragment,k),p=!0)},o(k){_(e.$$.fragment,k),_(i.$$.fragment,k),_(o.$$.fragment,k),_(u.$$.fragment,k),_(c.$$.fragment,k),p=!1},d(k){E(e,k),k&&b(n),E(i,k),k&&b(s),E(o,k),k&&b(a),E(u,k),k&&b(f),E(c,k)}}}function mle(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[dle]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","container svelte-4eq5in")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&131&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function gle(r){let e,t;return e=new Ai({props:{$$slots:{default:[mle]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&131&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function _le(r,e,t){let n;ue(r,He,f=>t(1,n=f));let{column:i}=e;function l(f){r.$$.not_equal(i.width,f)&&(i.width=f,t(0,i))}function s(f){r.$$.not_equal(i.align,f)&&(i.align=f,t(0,i))}const o=f=>t(0,i.template=f.detail,i),a=f=>t(0,i.background=f.detail,i),u=f=>t(0,i.color=f.detail,i);return r.$$set=f=>{"column"in f&&t(0,i=f.column)},[i,n,l,s,o,a,u]}class hle extends ie{constructor(e){super();le(this,e,_le,gle,re,{column:0})}}function $le(r){let e,t=r[0].name+"",n,i;return{c(){e=V('"'),n=V(t),i=V('" column settings')},m(l,s){$(l,e,s),$(l,n,s),$(l,i,s)},p(l,s){s&1&&t!==(t=l[0].name+"")&&Te(n,t)},d(l){l&&b(e),l&&b(n),l&&b(i)}}}function ble(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function vle(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[ble]},$$scope:{ctx:r}}}),e.$on("click",r[4]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&256&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function wle(r){let e,t,n;function i(s){r[5](s)}let l={slot:"body"};return r[1]!==void 0&&(l.column=r[1]),e=new hle({props:l}),K.push(()=>ce(e,"column",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};!t&&o&2&&(t=!0,a.column=s[1],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function yle(r){let e,t,n,i;e=new ct({props:{name:"Settings",hoverable:!0,size:"S"}}),e.$on("click",r[3]);let l={title:"Table Columns",$$slots:{body:[wle],buttons:[vle],description:[$le]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[6](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){const a={};o&259&&(a.$$scope={dirty:o,ctx:s}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[6](null),E(n,s)}}}function kle(r,e,t){let{column:n}=e,i,l;const s=c=>{t(1,i=Se({},c))},o=()=>{s(n),l.show()},a=()=>{t(0,n=i),l.hide()};function u(c){i=c,t(1,i)}function f(c){K[c?"unshift":"push"](()=>{l=c,t(2,l)})}return r.$$set=c=>{"column"in c&&t(0,n=c.column)},r.$$.update=()=>{r.$$.dirty&1&&s(n)},[n,i,l,o,a,u,f]}class Cle extends ie{constructor(e){super();le(this,e,kle,yle,re,{column:0})}}function Nw(r,e,t){const n=r.slice();return n[19]=e[t],n[20]=e,n[21]=t,n}function Sle(r){let e,t,n,i;return n=new Ke({props:{size:"S",$$slots:{default:[Ele]},$$scope:{ctx:r}}}),{c(){e=D("div"),t=D("div"),S(n.$$.fragment),w(t,"class","wide svelte-r88m8w"),w(e,"class","column svelte-r88m8w")},m(l,s){$(l,e,s),N(e,t),A(n,t,null),i=!0},p(l,s){const o={};s&4194304&&(o.$$scope={dirty:s,ctx:l}),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(e),E(n)}}}function Ale(r){let e,t;return e=new Qe({props:{noPadding:!0,gap:"XS",$$slots:{default:[Ile]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4194307&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Ele(r){let e,t,n;return{c(){e=V(`By default, all table columns will automatically be shown.
|
|
1226
1226
|
`),t=D("br"),n=V(`
|
|
1227
1227
|
You can manually control which columns are included in your table,
|
|
1228
|
-
and their appearance, by adding them below.`)},m(i,l){$(i,e,l),$(i,t,l),$(i,n,l)},d(i){i&&b(e),i&&b(t),i&&b(n)}}}function Ole(r){let e;return{c(){e=V("Column")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Tle(r){let e;return{c(){e=V("Label")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Rw(r,e){let t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C,I=Oe,O,T,P;i=new ct({props:{name:"DragHandle",size:"XL"}});function M(W){e[12](W,e[19])}function F(...W){return e[13](e[19],e[20],e[21],...W)}let j={placeholder:"Column",options:e[2](e[19].name)};e[19].name!==void 0&&(j.value=e[19].name),o=new Xe({props:j}),K.push(()=>ce(o,"value",M)),o.$on("change",F);function z(W){e[14](W,e[19])}let q={placeholder:"Label"};e[19].displayName!==void 0&&(q.value=e[19].displayName),f=new tt({props:q}),K.push(()=>ce(f,"value",z));function H(W){e[15](W,e[19],e[20],e[21])}let Y={};e[19]!==void 0&&(Y.column=e[19]),d=new Cle({props:Y}),K.push(()=>ce(d,"column",H));function U(){return e[16](e[19])}return v=new ct({props:{name:"Close",hoverable:!0,size:"S",disabled:e[0].length===1}}),v.$on("click",U),{key:r,first:null,c(){t=D("div"),n=D("div"),S(i.$$.fragment),s=R(),S(o.$$.fragment),u=R(),S(f.$$.fragment),p=R(),S(d.$$.fragment),h=R(),S(v.$$.fragment),k=R(),w(n,"class","handle svelte-r88m8w"),w(n,"aria-label","drag-handle"),w(n,"style",l=e[1]?"cursor: grab":"cursor: grabbing"),w(t,"class","column svelte-r88m8w"),this.first=t},m(W,G){$(W,t,G),N(t,n),A(i,n,null),N(t,s),A(o,t,null),N(t,u),A(f,t,null),N(t,p),A(d,t,null),N(t,h),A(v,t,null),N(t,k),O=!0,T||(P=Pe(n,"mousedown",e[11]),T=!0)},p(W,G){e=W,(!O||G&2&&l!==(l=e[1]?"cursor: grab":"cursor: grabbing"))&&w(n,"style",l);const Q={};G&1&&(Q.options=e[2](e[19].name)),!a&&G&1&&(a=!0,Q.value=e[19].name,pe(()=>a=!1)),o.$set(Q);const fe={};!c&&G&1&&(c=!0,fe.value=e[19].displayName,pe(()=>c=!1)),f.$set(fe);const Z={};!g&&G&1&&(g=!0,Z.column=e[19],pe(()=>g=!1)),d.$set(Z);const ee={};G&1&&(ee.disabled=e[0].length===1),v.$set(ee)},r(){C=t.getBoundingClientRect()},f(){zo(t),I()},a(){I(),I=qo(t,C,Uo,{duration:L1})},i(W){O||(m(i.$$.fragment,W),m(o.$$.fragment,W),m(f.$$.fragment,W),m(d.$$.fragment,W),m(v.$$.fragment,W),O=!0)},o(W){_(i.$$.fragment,W),_(o.$$.fragment,W),_(f.$$.fragment,W),_(d.$$.fragment,W),_(v.$$.fragment,W),O=!1},d(W){W&&b(t),E(i),E(o),E(f),E(d),E(v),T=!1,P()}}}function Ile(r){let e,t,n,i,l,s,o,a,u,f,c,p,d=[],g=new Map,h,v,k,C;i=new Ze({props:{size:"L",$$slots:{default:[Ole]},$$scope:{ctx:r}}}),s=new Ze({props:{size:"L",$$slots:{default:[Tle]},$$scope:{ctx:r}}});let I=r[0];const O=T=>T[19].id;for(let T=0;T<I.length;T+=1){let P=Nw(r,I,T),M=O(P);g.set(M,d[T]=Rw(M,P))}return{c(){e=D("div"),t=D("div"),n=R(),S(i.$$.fragment),l=R(),S(s.$$.fragment),o=R(),a=D("div"),u=R(),f=D("div"),c=R(),p=D("div");for(let T=0;T<d.length;T+=1)d[T].c();w(e,"class","column svelte-r88m8w"),w(p,"class","columns svelte-r88m8w")},m(T,P){$(T,e,P),N(e,t),N(e,n),A(i,e,null),N(e,l),A(s,e,null),N(e,o),N(e,a),N(e,u),N(e,f),$(T,c,P),$(T,p,P);for(let M=0;M<d.length;M+=1)d[M].m(p,null);v=!0,k||(C=[wr(h=Iu.call(null,p,{items:r[0],flipDurationMs:L1,dropTargetStyle:{outline:"none"},dragDisabled:r[1]})),Pe(p,"finalize",r[6]),Pe(p,"consider",r[5])],k=!0)},p(T,P){const M={};P&4194304&&(M.$$scope={dirty:P,ctx:T}),i.$set(M);const F={};if(P&4194304&&(F.$$scope={dirty:P,ctx:T}),s.$set(F),P&23){I=T[0],te();for(let j=0;j<d.length;j+=1)d[j].r();d=xn(d,P,O,1,T,I,g,p,Bo,Rw,null,Nw);for(let j=0;j<d.length;j+=1)d[j].a();ne()}h&&mt(h.update)&&P&3&&h.update.call(null,{items:T[0],flipDurationMs:L1,dropTargetStyle:{outline:"none"},dragDisabled:T[1]})},i(T){if(!v){m(i.$$.fragment,T),m(s.$$.fragment,T);for(let P=0;P<I.length;P+=1)m(d[P]);v=!0}},o(T){_(i.$$.fragment,T),_(s.$$.fragment,T);for(let P=0;P<d.length;P+=1)_(d[P]);v=!1},d(T){T&&b(e),E(i),E(s),T&&b(c),T&&b(p);for(let P=0;P<d.length;P+=1)d[P].d();k=!1,Tn(C)}}}function Lle(r){let e;return{c(){e=V("Add column")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ple(r){let e;return{c(){e=V("Add all columns")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Mw(r){let e,t;return e=new gt({props:{secondary:!0,quiet:!0,$$slots:{default:[Nle]},$$scope:{ctx:r}}}),e.$on("click",r[8]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4194304&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Nle(r){let e;return{c(){e=V("Reset columns")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Rle(r){var h;let e,t,n,i,l,s,o,a,u,f;const c=[Ale,Sle],p=[];function d(v,k){var C;return((C=v[0])==null?void 0:C.length)?0:1}e=d(r),t=p[e]=c[e](r),s=new gt({props:{secondary:!0,icon:"Add",$$slots:{default:[Lle]},$$scope:{ctx:r}}}),s.$on("click",r[3]),a=new gt({props:{secondary:!0,quiet:!0,$$slots:{default:[Ple]},$$scope:{ctx:r}}}),a.$on("click",r[7]);let g=((h=r[0])==null?void 0:h.length)&&Mw(r);return{c(){t.c(),n=R(),i=D("div"),l=D("div"),S(s.$$.fragment),o=R(),S(a.$$.fragment),u=R(),g&&g.c(),w(l,"class","buttons wide svelte-r88m8w"),w(i,"class","column svelte-r88m8w")},m(v,k){p[e].m(v,k),$(v,n,k),$(v,i,k),N(i,l),A(s,l,null),N(l,o),A(a,l,null),N(l,u),g&&g.m(l,null),f=!0},p(v,k){var T;let C=e;e=d(v),e===C?p[e].p(v,k):(te(),_(p[C],1,1,()=>{p[C]=null}),ne(),t=p[e],t?t.p(v,k):(t=p[e]=c[e](v),t.c()),m(t,1),t.m(n.parentNode,n));const I={};k&4194304&&(I.$$scope={dirty:k,ctx:v}),s.$set(I);const O={};k&4194304&&(O.$$scope={dirty:k,ctx:v}),a.$set(O),((T=v[0])==null?void 0:T.length)?g?(g.p(v,k),k&1&&m(g,1)):(g=Mw(v),g.c(),m(g,1),g.m(l,null)):g&&(te(),_(g,1,1,()=>{g=null}),ne())},i(v){f||(m(t),m(s.$$.fragment,v),m(a.$$.fragment,v),m(g),f=!0)},o(v){_(t),_(s.$$.fragment,v),_(a.$$.fragment,v),_(g),f=!1},d(v){p[e].d(v),v&&b(n),v&&b(i),E(s),E(a),g&&g.d()}}}function Mle(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[Rle]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","container svelte-r88m8w")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&4194307&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Dle(r){let e,t;return e=new Ai({props:{$$slots:{default:[Mle]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&4194307&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}const L1=150;function jle(r,e,t){let n,{columns:i=[]}=e,{options:l=[]}=e,{schema:s={}}=e,o=!0;const a=(P,M)=>{let F={};return P.forEach(j=>{F[j]=!0}),M==null||M.forEach(j=>{delete F[j.name]}),Object.keys(F)},u=P=>!P||n.includes(P)?n:[P,...n],f=()=>{t(0,i=[...i,{}])},c=P=>{t(0,i=i.filter(M=>M.id!==P))},p=P=>{t(0,i=P.detail.items)},d=P=>{p(P),t(1,o=!0)},g=()=>{let P=i||[];l.forEach(M=>{const F=s[M],j=i&&i.findIndex(z=>z.name===M)!==-1;!(F==null?void 0:F.autocolumn)&&!j&&P.push({name:M,displayName:M})}),t(0,i=P)},h=()=>{t(0,i=[])},v=()=>t(1,o=!1);function k(P,M){r.$$.not_equal(M.name,P)&&(M.name=P,t(0,i))}const C=(P,M,F,j)=>t(0,M[F].displayName=j.detail,i);function I(P,M){r.$$.not_equal(M.displayName,P)&&(M.displayName=P,t(0,i))}function O(P,M,F,j){F[j]=P,t(0,i)}const T=P=>c(P.id);return r.$$set=P=>{"columns"in P&&t(0,i=P.columns),"options"in P&&t(9,l=P.options),"schema"in P&&t(10,s=P.schema)},r.$$.update=()=>{r.$$.dirty&513&&(n=a(l,i)),r.$$.dirty&1&&i.forEach(P=>{P.id||(P.id=Br.generate())})},[i,o,u,f,c,p,d,g,h,l,s,v,k,C,I,O,T]}class Ble extends ie{constructor(e){super();le(this,e,jle,Dle,re,{columns:0,options:9,schema:10})}}function zle(r){let e;return{c(){e=V("Configure columns")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function qle(r){let e;return{c(){e=V("Configure the columns in your table.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ule(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Fle(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[Ule]},$$scope:{ctx:r}}}),e.$on("click",r[5]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&131072&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Vle(r){let e,t,n;function i(s){r[11](s)}let l={slot:"body",options:r[0],schema:r[1]};return r[3]!==void 0&&(l.columns=r[3]),e=new Ble({props:l}),K.push(()=>ce(e,"columns",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};o&1&&(a.options=s[0]),o&2&&(a.schema=s[1]),!t&&o&8&&(t=!0,a.columns=s[3],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Hle(r){let e,t,n,i;e=new Jt({props:{$$slots:{default:[zle]},$$scope:{ctx:r}}}),e.$on("click",r[4]);let l={title:"Table Columns",$$slots:{body:[Vle],buttons:[Fle],description:[qle]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[12](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){const a={};o&131072&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const u={};o&131083&&(u.$$scope={dirty:o,ctx:s}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[12](null),E(n,s)}}}function Wle(r,e,t){let n,i,l,s,o;ue(r,un,O=>t(10,o=O));let{componentInstance:a}=e,{value:u=[]}=e;const f=ht();let c,p;const d=(O,T)=>{const P=Di(O,T).schema;return P&&(delete P._id,delete P._rev),P},g=O=>{t(3,p=vn.cloneDeep(O))},h=(O,T)=>!Array.isArray(O)||!O.length?[]:(typeof O[0]=="string"&&(O=O.map(P=>({name:P,displayName:P}))),O.filter(P=>T.includes(P.name))),v=()=>{g(s),c.show()},k=()=>{f("change",h(p,l)),c.hide()};function C(O){p=O,t(3,p)}function I(O){K[O?"unshift":"push"](()=>{c=O,t(2,c)})}return r.$$set=O=>{"componentInstance"in O&&t(6,a=O.componentInstance),"value"in O&&t(7,u=O.value)},r.$$.update=()=>{r.$$.dirty&1088&&t(9,n=El(o,a)),r.$$.dirty&1536&&t(1,i=d(o,n)),r.$$.dirty&2&&t(0,l=Object.keys(i||{})),r.$$.dirty&129&&t(8,s=h(u,l)),r.$$.dirty&256&&g(s)},[l,i,c,p,v,k,a,u,s,n,o,C,I]}class Gle extends ie{constructor(e){super();le(this,e,Wle,Hle,re,{componentInstance:6,value:7})}}const Yle={text:kw,select:Xe,dataSource:j6,"dataSource/s3":Tee,dataProvider:Nee,boolean:Zr,number:k_,event:ire,table:are,color:O1,icon:vre,field:kre,multifield:Are,searchfield:Tre,options:Iie,schema:Pre,section:zre,navigation:xre,filter:sie,url:gie,columns:Gle,"field/string":tl,"field/number":tl,"field/options":tl,"field/boolean":tl,"field/longform":tl,"field/datetime":tl,"field/attachment":tl,"field/link":tl,"field/array":tl,"field/json":tl,"validation/string":Es,"validation/array":Es,"validation/number":Es,"validation/boolean":Es,"validation/datetime":Es,"validation/attachment":Es,"validation/link":Es},xf=r=>Yle[r];function Dw(r,e,t){const n=r.slice();return n[15]=e[t],n[17]=t,n}function jw(r,e,t){const n=r.slice();return n[18]=e[t],n}function Bw(r){let e,t;return e=new La({props:{control:tt,label:"Name",key:"_instanceName",value:r[1]._instanceName,onChange:r[9]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.value=n[1]._instanceName),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function zw(r){var i,l;let e,t;function n(...s){return r[10](r[18],...s)}return e=new La({props:{type:r[18].type,control:xf(r[18].type),label:r[18].label,key:r[18].key,value:(l=r[1][r[18].key])!=null?l:(i=r[1][r[18].key])==null?void 0:i.defaultValue,nested:r[18].nested,onChange:n,props:{options:r[18].options||[],placeholder:r[18].placeholder||null,min:r[18].min||null,max:r[18].max||null},bindings:r[2],componentBindings:r[3],componentInstance:r[1],componentDefinition:r[0]}}),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),t=!0},p(s,o){var u,f;r=s;const a={};o&16&&(a.type=r[18].type),o&16&&(a.control=xf(r[18].type)),o&16&&(a.label=r[18].label),o&16&&(a.key=r[18].key),o&18&&(a.value=(f=r[1][r[18].key])!=null?f:(u=r[1][r[18].key])==null?void 0:u.defaultValue),o&16&&(a.nested=r[18].nested),o&16&&(a.onChange=n),o&16&&(a.props={options:r[18].options||[],placeholder:r[18].placeholder||null,min:r[18].min||null,max:r[18].max||null}),o&4&&(a.bindings=r[2]),o&8&&(a.componentBindings=r[3]),o&2&&(a.componentInstance=r[1]),o&1&&(a.componentDefinition=r[0]),e.$set(a)},i(s){t||(m(e.$$.fragment,s),t=!0)},o(s){_(e.$$.fragment,s),t=!1},d(s){E(e,s)}}}function qw(r,e){let t,n=e[6](e[18]),i,l,s=n&&zw(e);return{key:r,first:null,c(){t=Ee(),s&&s.c(),i=Ee(),this.first=t},m(o,a){$(o,t,a),s&&s.m(o,a),$(o,i,a),l=!0},p(o,a){e=o,a&16&&(n=e[6](e[18])),n?s?(s.p(e,a),a&16&&m(s,1)):(s=zw(e),s.c(),m(s,1),s.m(i.parentNode,i)):s&&(te(),_(s,1,1,()=>{s=null}),ne())},i(o){l||(m(s),l=!0)},o(o){_(s),l=!1},d(o){o&&b(t),s&&s.d(o),o&&b(i)}}}function Uw(r){let e,t;return e=new fee({props:{componentInstance:r[1]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.componentInstance=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Fw(r){let e,t=r[15].info+"";return{c(){e=D("div"),w(e,"class","text svelte-1hyi8iv")},m(n,i){$(n,e,i),e.innerHTML=t},p(n,i){i&16&&t!==(t=n[15].info+"")&&(e.innerHTML=t)},d(n){n&&b(e)}}}function Jle(r){var h,v,k;let e=r[17]===0&&!r[1]._component.endsWith("/layout"),t,n=[],i=new Map,l,s=r[17]===0&&((v=(h=r[0])==null?void 0:h.component)==null?void 0:v.endsWith("/fieldgroup")),o,a,u,f=e&&Bw(r),c=r[15].settings;const p=C=>C[18].key;for(let C=0;C<c.length;C+=1){let I=jw(r,c,C),O=p(I);i.set(O,n[C]=qw(O,I))}let d=s&&Uw(r),g=((k=r[15])==null?void 0:k.info)&&Fw(r);return{c(){f&&f.c(),t=R();for(let C=0;C<n.length;C+=1)n[C].c();l=R(),d&&d.c(),o=R(),g&&g.c(),a=R()},m(C,I){f&&f.m(C,I),$(C,t,I);for(let O=0;O<n.length;O+=1)n[O].m(C,I);$(C,l,I),d&&d.m(C,I),$(C,o,I),g&&g.m(C,I),$(C,a,I),u=!0},p(C,I){var O,T,P;I&18&&(e=C[17]===0&&!C[1]._component.endsWith("/layout")),e?f?(f.p(C,I),I&18&&m(f,1)):(f=Bw(C),f.c(),m(f,1),f.m(t.parentNode,t)):f&&(te(),_(f,1,1,()=>{f=null}),ne()),I&127&&(c=C[15].settings,te(),n=xn(n,I,p,1,C,c,i,l.parentNode,jr,qw,l,jw),ne()),I&17&&(s=C[17]===0&&((T=(O=C[0])==null?void 0:O.component)==null?void 0:T.endsWith("/fieldgroup"))),s?d?(d.p(C,I),I&17&&m(d,1)):(d=Uw(C),d.c(),m(d,1),d.m(o.parentNode,o)):d&&(te(),_(d,1,1,()=>{d=null}),ne()),((P=C[15])==null?void 0:P.info)?g?g.p(C,I):(g=Fw(C),g.c(),g.m(a.parentNode,a)):g&&(g.d(1),g=null)},i(C){if(!u){m(f);for(let I=0;I<c.length;I+=1)m(n[I]);m(d),u=!0}},o(C){_(f);for(let I=0;I<n.length;I+=1)_(n[I]);_(d),u=!1},d(C){f&&f.d(C),C&&b(t);for(let I=0;I<n.length;I+=1)n[I].d(C);C&&b(l),d&&d.d(C),C&&b(o),g&&g.d(C),C&&b(a)}}}function Vw(r,e){let t,n,i;return n=new Vo({props:{name:e[15].name,collapsible:!1,$$slots:{default:[Jle]},$$scope:{ctx:e}}}),{key:r,first:null,c(){t=Ee(),S(n.$$.fragment),this.first=t},m(l,s){$(l,t,s),A(n,l,s),i=!0},p(l,s){e=l;const o={};s&16&&(o.name=e[15].name),s&2097183&&(o.$$scope={dirty:s,ctx:e}),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(t),E(n,l)}}}function Qle(r){let e=[],t=new Map,n,i,l=r[4];const s=o=>o[15].name;for(let o=0;o<l.length;o+=1){let a=Dw(r,l,o),u=s(a);t.set(u,e[o]=Vw(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=Ee()},m(o,a){for(let u=0;u<e.length;u+=1)e[u].m(o,a);$(o,n,a),i=!0},p(o,[a]){a&127&&(l=o[4],te(),e=xn(e,a,s,1,o,l,t,n.parentNode,jr,Vw,n,Dw),ne())},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(e[a]);i=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);i=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&b(n)}}}function Xle(r,e,t){let n,i,{componentDefinition:l}=e,{componentInstance:s}=e,{assetInstance:o}=e,{bindings:a}=e,{componentBindings:u}=e;const f=h=>{var I;const v=(I=h==null?void 0:h.settings)!=null?I:[],k=v.filter(O=>!O.section),C=v.filter(O=>O.section);return[{name:(l==null?void 0:l.name)||"General",info:l==null?void 0:l.info,settings:k},...C||[]]},c=dj(async(h,v)=>{try{await He.actions.components.updateProp(h,v)}catch{we.error("Error updating component prop")}}),p=h=>{if(!xf(h==null?void 0:h.type))return!1;if(h.dependsOn){let k=h.dependsOn,C=null;if(typeof h.dependsOn=="object"&&(k=h.dependsOn.setting,C=h.dependsOn.value),!k)return!1;if(C==null){const I=s[k];return I===!1?!1:I===!0?!0:!vn.isEmpty(I)}return s[k]===C}return!0},d=h=>c("_instanceName",h),g=(h,v)=>c(h.key,v);return r.$$set=h=>{"componentDefinition"in h&&t(0,l=h.componentDefinition),"componentInstance"in h&&t(1,s=h.componentInstance),"assetInstance"in h&&t(7,o=h.assetInstance),"bindings"in h&&t(2,a=h.bindings),"componentBindings"in h&&t(3,u=h.componentBindings)},r.$$.update=()=>{r.$$.dirty&1&&t(4,n=f(l)),r.$$.dirty&128&&t(8,i=o&&o.favicon),r.$$.dirty&256},[l,s,a,u,n,c,p,o,i,d,g]}class Kle extends ie{constructor(e){super();le(this,e,Xle,Qle,re,{componentDefinition:0,componentInstance:1,assetInstance:7,bindings:2,componentBindings:3})}}function Hw(r,e,t){const n=r.slice();return n[11]=e[t],n}function Ww(r,e){let t,n,i,l;function s(...o){return e[10](e[11],...o)}return n=new La({props:{label:`${e[11].label}${e[7](e[5],e[11])?" *":""}`,control:e[11].control,key:e[11].key,value:e[5][e[11].key],onChange:s,props:e[8](e[11]),bindings:e[4]}}),{key:r,first:null,c(){t=D("div"),S(n.$$.fragment),i=R(),zt(t,"grid-column",e[11].column||"auto"),this.first=t},m(o,a){$(o,t,a),A(n,t,null),N(t,i),l=!0},p(o,a){e=o;const u={};a&36&&(u.label=`${e[11].label}${e[7](e[5],e[11])?" *":""}`),a&4&&(u.control=e[11].control),a&4&&(u.key=e[11].key),a&36&&(u.value=e[5][e[11].key]),a&4&&(u.onChange=s),a&4&&(u.props=e[8](e[11])),a&16&&(u.bindings=e[4]),n.$set(u),(!l||a&4)&&zt(t,"grid-column",e[11].column||"auto")},i(o){l||(m(n.$$.fragment,o),l=!0)},o(o){_(n.$$.fragment,o),l=!1},d(o){o&&b(t),E(n)}}}function Zle(r){let e,t=[],n=new Map,i,l=r[2];const s=o=>`${o[3]._id}-${o[11].key}-${o[11].label}`;for(let o=0;o<l.length;o+=1){let a=Hw(r,l,o),u=s(a);n.set(u,t[o]=Ww(u,a))}return{c(){e=D("div");for(let o=0;o<t.length;o+=1)t[o].c();w(e,"class","group-content svelte-1u21n8y"),zt(e,"grid-template-columns",r[1]||"1fr")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,a){a&956&&(l=o[2],te(),t=xn(t,a,s,1,o,l,n,e,jr,Ww,null,Hw),ne()),(!i||a&2)&&zt(e,"grid-template-columns",o[1]||"1fr")},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function xle(r){let e,t;return e=new Vo({props:{collapsible:!1,name:`${r[0]}${r[6]?" *":""}`,$$slots:{default:[Zle]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&65&&(l.name=`${n[0]}${n[6]?" *":""}`),i&16438&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function ese(r,e,t){let n,i,{name:l}=e,{columns:s}=e,{properties:o}=e,{componentInstance:a}=e,{bindings:u=[]}=e;const f=(g,h)=>g[h.key]!=null&&g[h.key]!=="",c=g=>{let h=Se({},g||{});return delete h.label,delete h.key,delete h.control,h},p=async(g,h)=>{try{await He.actions.components.updateStyle(g,h)}catch{we.error("Error updating style")}},d=(g,h)=>p(g.key,h);return r.$$set=g=>{"name"in g&&t(0,l=g.name),"columns"in g&&t(1,s=g.columns),"properties"in g&&t(2,o=g.properties),"componentInstance"in g&&t(3,a=g.componentInstance),"bindings"in g&&t(4,u=g.bindings)},r.$$.update=()=>{var g;r.$$.dirty&8&&t(5,n=a._styles.normal||{}),r.$$.dirty&36&&t(6,i=(g=o==null?void 0:o.some(h=>f(n,h)))!=null?g:!1)},[l,s,o,a,u,n,i,f,c,p,d]}class tse extends ie{constructor(e){super();le(this,e,ese,xle,re,{name:0,columns:1,properties:2,componentInstance:3,bindings:4})}}const Gw={label:"Margin",columns:"1fr 1fr",settings:[{label:"Top",key:"margin-top",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Right",key:"margin-right",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Bottom",key:"margin-bottom",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Left",key:"margin-left",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]}]},nse={label:"Padding",columns:"1fr 1fr",settings:[{label:"Top",key:"padding-top",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Right",key:"padding-right",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Bottom",key:"padding-bottom",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Left",key:"padding-left",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]}]},rse={label:"Size",columns:"1fr 1fr",settings:[{label:"Width",key:"width",control:tt,placeholder:"Auto"},{label:"Height",key:"height",control:tt,placeholder:"Auto"}]},ise={label:"Background",columns:"auto 1fr",settings:[{label:"Color",key:"background",control:O1},{label:"Gradient",key:"background-image",control:Xe,options:[{label:"Warm Flame",value:"linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);"},{label:"Night Fade",value:"linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);"},{label:"Spring Warmth",value:"linear-gradient(to top, #fad0c4 0%, #ffd1ff 100%);"},{label:"Sunny Morning",value:"linear-gradient(120deg, #f6d365 0%, #fda085 100%);"},{label:"Winter Neva",value:"linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);"},{label:"Tempting Azure",value:"linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);"},{label:"Heavy Rain",value:"linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);"},{label:"Deep Blue",value:"linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);"},{label:"Near Moon",value:"linear-gradient(to top, #5ee7df 0%, #b490ca 100%);"},{label:"Wild Apple",value:"linear-gradient(to top, #d299c2 0%, #fef9d7 100%);"},{label:"Plum Plate",value:"linear-gradient(135deg, #667eea 0%, #764ba2 100%);"},{label:"Peach Kiss",value:"radial-gradient(circle farthest-corner at 50% 100%,rgba(255,173,138,.50), rgba(255,248,247,1) 100%);"},{label:"Flamingo Sunrise",value:"-webkit-radial-gradient(center top, rgb(255, 250, 245), rgb(255, 242, 242))"},{label:"Budi Mist",value:"radial-gradient(circle, rgba(252,215,212,1) 0%, rgba(255,227,214,1) 50%, rgba(207,218,255,1) 100%);"},{label:"Ballet Slipper",value:"linear-gradient(135deg, rgba(252,215,212,1) 20%, rgba(207,218,255,1) 100%);"},{label:"Black Noir",value:"linear-gradient(312deg, rgba(60,60,60,1) 0%, rgba(42,42,42,1) 100%);"}]}]},lse={label:"Border",columns:"1fr 1fr",settings:[{label:"Color",key:"border-color",control:O1},{label:"Width",key:"border-width",control:Xe,column:"1 / 2",placeholder:"None",options:[{label:"Small",value:"1px"},{label:"Medium",value:"2px"},{label:"Large",value:"4px"}]},{label:"Style",key:"border-style",control:Xe,column:"2 / 3",placeholder:"None",options:[{label:"Solid",value:"solid"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"}]},{label:"Radius",key:"border-radius",control:Xe,placeholder:"None",options:[{label:"Small",value:"0.25rem"},{label:"Medium",value:"0.5rem"},{label:"Large",value:"1rem"},{label:"Round",value:"100%"}]},{label:"Shadow",key:"box-shadow",control:Xe,placeholder:"None",options:[{label:"Small",value:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},{label:"Medium",value:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},{label:"Large",value:"0 8px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"}]}]},P1=[Gw];var Yw=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",margin:Gw,padding:nse,size:rse,background:ise,border:lse,all:P1});function Jw(r,e,t){const n=r.slice();return n[5]=e[t],n}function Qw(r){let e,t,n=r[2],i=[];for(let s=0;s<n.length;s+=1)i[s]=Xw(Jw(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=Ee()},m(s,o){for(let a=0;a<i.length;a+=1)i[a].m(s,o);$(s,e,o),t=!0},p(s,o){if(o&7){n=s[2];let a;for(a=0;a<n.length;a+=1){const u=Jw(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=Xw(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){$t(i,s),s&&b(e)}}}function Xw(r){let e,t;return e=new tse({props:{style:r[5],name:r[5].label,columns:r[5].columns,properties:r[5].settings,componentInstance:r[0],bindings:r[1]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.style=n[5]),i&4&&(l.name=n[5].label),i&4&&(l.columns=n[5].columns),i&4&&(l.properties=n[5].settings),i&1&&(l.componentInstance=n[0]),i&2&&(l.bindings=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function sse(r){var i;let e,t,n=((i=r[2])==null?void 0:i.length)>0&&Qw(r);return{c(){n&&n.c(),e=Ee()},m(l,s){n&&n.m(l,s),$(l,e,s),t=!0},p(l,[s]){var o;((o=l[2])==null?void 0:o.length)>0?n?(n.p(l,s),s&4&&m(n,1)):(n=Qw(l),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(te(),_(n,1,1,()=>{n=null}),ne())},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&b(e)}}}function ose(r,e,t){let n,{componentDefinition:i}=e,{componentInstance:l}=e,{bindings:s}=e;const o=a=>{var f;if(!((f=a==null?void 0:a.styles)==null?void 0:f.length))return[...P1];let u=[...P1];return a.styles.forEach(c=>{Yw[c]&&u.push(Yw[c])}),u};return r.$$set=a=>{"componentDefinition"in a&&t(3,i=a.componentDefinition),"componentInstance"in a&&t(0,l=a.componentInstance),"bindings"in a&&t(1,s=a.bindings)},r.$$.update=()=>{r.$$.dirty&8&&t(2,n=o(i))},[l,s,n,i]}class ase extends ie{constructor(e){super();le(this,e,ose,sse,re,{componentDefinition:3,componentInstance:0,bindings:1})}}function use(r){let e;return{c(){e=V("Edit custom CSS")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function fse(r){let e,t,n;return t=new Jt({props:{$$slots:{default:[use]},$$scope:{ctx:r}}}),t.$on("click",r[3]),{c(){e=D("div"),S(t.$$.fragment)},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&128&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function cse(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function pse(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[cse]},$$scope:{ctx:r}}}),e.$on("click",r[4]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&128&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function dse(r){let e;return{c(){e=V("Custom CSS overrides all other component styles.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function mse(r){let e,t,n,i,l;e=new Ke({props:{size:"S",$$slots:{default:[dse]},$$scope:{ctx:r}}});function s(a){r[5](a)}let o={placeholder:"Enter some CSS..."};return r[1]!==void 0&&(o.value=r[1]),n=new pi({props:o}),K.push(()=>ce(n,"value",s)),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(a,u){A(e,a,u),$(a,t,u),A(n,a,u),l=!0},p(a,u){const f={};u&128&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};!i&&u&2&&(i=!0,c.value=a[1],pe(()=>i=!1)),n.$set(c)},i(a){l||(m(e.$$.fragment,a),m(n.$$.fragment,a),l=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),l=!1},d(a){E(e,a),a&&b(t),E(n,a)}}}function gse(r){let e,t,n;return t=new Qe({props:{gap:"S",noPadding:!0,$$slots:{default:[mse]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","content svelte-ernmz2")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&130&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function _se(r){let e,t;return e=new Ai({props:{slot:"body",$$slots:{default:[gse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&130&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Kw(r){let e,t,n={title:"Custom CSS",$$slots:{body:[_se],buttons:[pse]},$$scope:{ctx:r}};return e=new Kr({props:n}),r[6](e),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){const s={};l&130&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){r[6](null),E(e,i)}}}function hse(r){var o,a,u;let e,t,n=(o=r[0])==null?void 0:o._id,i,l;e=new Vo({props:{name:`Custom CSS${((u=(a=r[0])==null?void 0:a._styles)==null?void 0:u.custom)?" *":""}`,collapsible:!1,$$slots:{default:[fse]},$$scope:{ctx:r}}});let s=Kw(r);return{c(){S(e.$$.fragment),t=R(),s.c(),i=Ee()},m(f,c){A(e,f,c),$(f,t,c),s.m(f,c),$(f,i,c),l=!0},p(f,[c]){var d,g,h;const p={};c&1&&(p.name=`Custom CSS${((g=(d=f[0])==null?void 0:d._styles)==null?void 0:g.custom)?" *":""}`),c&128&&(p.$$scope={dirty:c,ctx:f}),e.$set(p),c&1&&re(n,n=(h=f[0])==null?void 0:h._id)?(te(),_(s,1,1,Oe),ne(),s=Kw(f),s.c(),m(s),s.m(i.parentNode,i)):s.p(f,c)},i(f){l||(m(e.$$.fragment,f),m(s),l=!0)},o(f){_(e.$$.fragment,f),_(s),l=!1},d(f){E(e,f),f&&b(t),f&&b(i),s.d(f)}}}function $se(r,e,t){let{componentInstance:n}=e,i,l;const s=()=>{var f;t(1,i=(f=n==null?void 0:n._styles)==null?void 0:f.custom),l.show()},o=async()=>{try{await He.actions.components.updateCustomStyle(i)}catch{we.error("Error updating custom style")}l.hide()};function a(f){i=f,t(1,i)}function u(f){K[f?"unshift":"push"](()=>{l=f,t(2,l)})}return r.$$set=f=>{"componentInstance"in f&&t(0,n=f.componentInstance)},[n,i,l,s,o,a,u]}class bse extends ie{constructor(e){super();le(this,e,$se,hse,re,{componentInstance:0})}}function Zw(r,e,t){const n=r.slice();return n[32]=e[t],n[33]=e,n[34]=t,n}function vse(r){let e,t;return e=new Ke({props:{size:"S",$$slots:{default:[yse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i[1]&16&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function wse(r){let e,t=[],n=new Map,i,l,s,o,a=r[0];const u=f=>f[32].id;for(let f=0;f<a.length;f+=1){let c=Zw(r,a,f),p=u(c);n.set(p,t[f]=e8(p,c))}return{c(){e=D("div");for(let f=0;f<t.length;f+=1)t[f].c();w(e,"class","conditions svelte-1vod3ll")},m(f,c){$(f,e,c);for(let p=0;p<t.length;p+=1)t[p].m(e,null);l=!0,s||(o=[wr(i=Iu.call(null,e,{items:r[0],flipDurationMs:N1,dropTargetStyle:{outline:"none"},dragDisabled:r[3]})),Pe(e,"finalize",r[12]),Pe(e,"consider",r[13])],s=!0)},p(f,c){if(c[0]&118271){a=f[0],te();for(let p=0;p<t.length;p+=1)t[p].r();t=xn(t,c,u,1,f,a,n,e,Bo,e8,null,Zw);for(let p=0;p<t.length;p+=1)t[p].a();ne()}i&&mt(i.update)&&c[0]&9&&i.update.call(null,{items:f[0],flipDurationMs:N1,dropTargetStyle:{outline:"none"},dragDisabled:f[3]})},i(f){if(!l){for(let c=0;c<a.length;c+=1)m(t[c]);l=!0}},o(f){for(let c=0;c<t.length;c+=1)_(t[c]);l=!1},d(f){f&&b(e);for(let c=0;c<t.length;c+=1)t[c].d();s=!1,Tn(o)}}}function yse(r){let e;return{c(){e=V("Add your first condition to get started.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function xw(r){let e,t,n,i,l,s,o,a,u,f;function c(v){r[20](v,r[32])}let p={options:r[4]};r[32].setting!==void 0&&(p.value=r[32].setting),e=new Xe({props:p}),K.push(()=>ce(e,"value",c));const d=[Cse,kse],g=[];function h(v,k){return(s==null||k[0]&1)&&(s=!!v[7](v[32].setting)),s?0:1}return o=h(r,[-1,-1]),a=g[o]=d[o](r),{c(){S(e.$$.fragment),n=R(),i=D("div"),i.textContent="TO",l=R(),a.c(),u=Ee()},m(v,k){A(e,v,k),$(v,n,k),$(v,i,k),$(v,l,k),g[o].m(v,k),$(v,u,k),f=!0},p(v,k){r=v;const C={};k[0]&16&&(C.options=r[4]),!t&&k[0]&1&&(t=!0,C.value=r[32].setting,pe(()=>t=!1)),e.$set(C);let I=o;o=h(r,k),o===I?g[o].p(r,k):(te(),_(g[I],1,1,()=>{g[I]=null}),ne(),a=g[o],a?a.p(r,k):(a=g[o]=d[o](r),a.c()),m(a,1),a.m(u.parentNode,u))},i(v){f||(m(e.$$.fragment,v),m(a),f=!0)},o(v){_(e.$$.fragment,v),_(a),f=!1},d(v){E(e,v),v&&b(n),v&&b(i),v&&b(l),g[o].d(v),v&&b(u)}}}function kse(r){let e,t;return e=new Xe({props:{disabled:!0,placeholder:" "}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p:Oe,i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Cse(r){let e,t;function n(...i){return r[21](r[32],r[33],r[34],...i)}return e=new La({props:{type:r[7](r[32].setting).type,control:r[8](r[32].setting),key:r[7](r[32].setting).key,value:r[32].settingValue,componentInstance:r[2],onChange:n,props:{options:r[7](r[32].setting).options,placeholder:r[7](r[32].setting).placeholder},bindings:r[1]}}),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l[0]&1&&(s.type=r[7](r[32].setting).type),l[0]&1&&(s.control=r[8](r[32].setting)),l[0]&1&&(s.key=r[7](r[32].setting).key),l[0]&1&&(s.value=r[32].settingValue),l[0]&4&&(s.componentInstance=r[2]),l[0]&1&&(s.onChange=n),l[0]&1&&(s.props={options:r[7](r[32].setting).options,placeholder:r[7](r[32].setting).placeholder}),l[0]&2&&(s.bindings=r[1]),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function Sse(r){let e,t,n;function i(s){r[29](s,r[32])}let l={placeholder:"Value",disabled:r[32].noValue,options:["True","False"]};return r[32].referenceValue!==void 0&&(l.value=r[32].referenceValue),e=new Xe({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){r=s;const a={};o[0]&1&&(a.disabled=r[32].noValue),!t&&o[0]&1&&(t=!0,a.value=r[32].referenceValue,pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Ase(r){let e,t,n;function i(s){r[28](s,r[32])}let l={placeholder:"Value",disabled:r[32].noValue};return r[32].referenceValue!==void 0&&(l.value=r[32].referenceValue),e=new Bl({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){r=s;const a={};o[0]&1&&(a.disabled=r[32].noValue),!t&&o[0]&1&&(t=!0,a.value=r[32].referenceValue,pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Ese(r){let e,t;function n(...i){return r[27](r[32],r[33],r[34],...i)}return e=new Un({props:{disabled:r[32].noValue,bindings:r[1],placeholder:"Value",value:r[32].referenceValue}}),e.$on("change",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l[0]&1&&(s.disabled=r[32].noValue),l[0]&2&&(s.bindings=r[1]),l[0]&1&&(s.value=r[32].referenceValue),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function e8(r,e){let t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C,I,O,T,P,M,F,j,z,q,H,Y,U=Oe,W,G,Q;i=new ct({props:{name:"DragHandle",size:"XL"}});function fe(ze){e[19](ze,e[32])}let Z={placeholder:null,options:e[5]};e[32].action!==void 0&&(Z.value=e[32].action),o=new Xe({props:Z}),K.push(()=>ce(o,"value",fe));let ee=e[32].action==="update"&&xw(e);function ae(...ze){return e[22](e[32],e[33],e[34],...ze)}d=new Un({props:{bindings:e[1],placeholder:"Value",value:e[32].newValue}}),d.$on("change",ae);function _e(ze){e[23](ze,e[32])}function Re(...ze){return e[24](e[32],...ze)}let $e={placeholder:null,options:e[14](e[32])};e[32].operator!==void 0&&($e.value=e[32].operator),h=new Xe({props:$e}),K.push(()=>ce(h,"value",_e)),h.$on("change",Re);function be(ze){e[25](ze,e[32])}function he(...ze){return e[26](e[32],...ze)}let Ne={disabled:e[32].noValue,options:e[6],placeholder:null};e[32].valueType!==void 0&&(Ne.value=e[32].valueType),C=new Xe({props:Ne}),K.push(()=>ce(C,"value",be)),C.$on("change",he);const Fe=[Ese,Ase,Sse],se=[];function Ce(ze,ye){return(T==null||ye[0]&1)&&(T=!!["string","number"].includes(ze[32].valueType)),T?0:ze[32].valueType==="datetime"?1:ze[32].valueType==="boolean"?2:-1}~(P=Ce(e,[-1,-1]))&&(M=se[P]=Fe[P](e));function me(){return e[30](e[32])}j=new ct({props:{name:"Duplicate",hoverable:!0,size:"S"}}),j.$on("click",me);function ke(){return e[31](e[32])}return q=new ct({props:{name:"Close",hoverable:!0,size:"S"}}),q.$on("click",ke),{key:r,first:null,c(){t=D("div"),n=D("div"),S(i.$$.fragment),s=R(),S(o.$$.fragment),u=R(),ee&&ee.c(),f=R(),c=D("div"),c.textContent="IF",p=R(),S(d.$$.fragment),g=R(),S(h.$$.fragment),k=R(),S(C.$$.fragment),O=R(),M&&M.c(),F=R(),S(j.$$.fragment),z=R(),S(q.$$.fragment),H=R(),w(n,"class","handle svelte-1vod3ll"),w(n,"aria-label","drag-handle"),w(n,"style",l=e[3]?"cursor: grab":"cursor: grabbing"),w(t,"class","condition svelte-1vod3ll"),oe(t,"update",e[32].action==="update"),this.first=t},m(ze,ye){$(ze,t,ye),N(t,n),A(i,n,null),N(t,s),A(o,t,null),N(t,u),ee&&ee.m(t,null),N(t,f),N(t,c),N(t,p),A(d,t,null),N(t,g),A(h,t,null),N(t,k),A(C,t,null),N(t,O),~P&&se[P].m(t,null),N(t,F),A(j,t,null),N(t,z),A(q,t,null),N(t,H),W=!0,G||(Q=Pe(n,"mousedown",e[18]),G=!0)},p(ze,ye){e=ze,(!W||ye[0]&8&&l!==(l=e[3]?"cursor: grab":"cursor: grabbing"))&&w(n,"style",l);const Je={};!a&&ye[0]&1&&(a=!0,Je.value=e[32].action,pe(()=>a=!1)),o.$set(Je),e[32].action==="update"?ee?(ee.p(e,ye),ye[0]&1&&m(ee,1)):(ee=xw(e),ee.c(),m(ee,1),ee.m(t,f)):ee&&(te(),_(ee,1,1,()=>{ee=null}),ne());const Nt={};ye[0]&2&&(Nt.bindings=e[1]),ye[0]&1&&(Nt.value=e[32].newValue),d.$set(Nt);const qe={};ye[0]&1&&(qe.options=e[14](e[32])),!v&&ye[0]&1&&(v=!0,qe.value=e[32].operator,pe(()=>v=!1)),h.$set(qe);const pt={};ye[0]&1&&(pt.disabled=e[32].noValue),!I&&ye[0]&1&&(I=!0,pt.value=e[32].valueType,pe(()=>I=!1)),C.$set(pt);let Rt=P;P=Ce(e,ye),P===Rt?~P&&se[P].p(e,ye):(M&&(te(),_(se[Rt],1,1,()=>{se[Rt]=null}),ne()),~P?(M=se[P],M?M.p(e,ye):(M=se[P]=Fe[P](e),M.c()),m(M,1),M.m(t,F)):M=null),ye[0]&1&&oe(t,"update",e[32].action==="update")},r(){Y=t.getBoundingClientRect()},f(){zo(t),U()},a(){U(),U=qo(t,Y,Uo,{duration:N1})},i(ze){W||(m(i.$$.fragment,ze),m(o.$$.fragment,ze),m(ee),m(d.$$.fragment,ze),m(h.$$.fragment,ze),m(C.$$.fragment,ze),m(M),m(j.$$.fragment,ze),m(q.$$.fragment,ze),W=!0)},o(ze){_(i.$$.fragment,ze),_(o.$$.fragment,ze),_(ee),_(d.$$.fragment,ze),_(h.$$.fragment,ze),_(C.$$.fragment,ze),_(M),_(j.$$.fragment,ze),_(q.$$.fragment,ze),W=!1},d(ze){ze&&b(t),E(i),E(o),ee&&ee.d(),E(d),E(h),E(C),~P&&se[P].d(),E(j),E(q),G=!1,Q()}}}function Ose(r){let e;return{c(){e=V("Add condition")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Tse(r){let e,t,n,i,l,s;const o=[wse,vse],a=[];function u(f,c){var p;return((p=f[0])==null?void 0:p.length)?0:1}return e=u(r),t=a[e]=o[e](r),l=new gt({props:{secondary:!0,icon:"Add",$$slots:{default:[Ose]},$$scope:{ctx:r}}}),l.$on("click",r[9]),{c(){t.c(),n=R(),i=D("div"),S(l.$$.fragment)},m(f,c){a[e].m(f,c),$(f,n,c),$(f,i,c),A(l,i,null),s=!0},p(f,c){let p=e;e=u(f),e===p?a[e].p(f,c):(te(),_(a[p],1,1,()=>{a[p]=null}),ne(),t=a[e],t?t.p(f,c):(t=a[e]=o[e](f),t.c()),m(t,1),t.m(n.parentNode,n));const d={};c[1]&16&&(d.$$scope={dirty:c,ctx:f}),l.$set(d)},i(f){s||(m(t),m(l.$$.fragment,f),s=!0)},o(f){_(t),_(l.$$.fragment,f),s=!1},d(f){a[e].d(f),f&&b(n),f&&b(i),E(l)}}}function Ise(r){let e,t,n;return t=new Qe({props:{noPadding:!0,$$slots:{default:[Tse]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","container svelte-1vod3ll")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l[0]&31|l[1]&16&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Lse(r){let e,t;return e=new Ai({props:{$$slots:{default:[Ise]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i[0]&31|i[1]&16&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}const N1=150;function Pse(r,e,t){let n,i,l;ue(r,ri,Z=>t(2,l=Z));let{conditions:s=[]}=e,{bindings:o=[]}=e;const a=[{label:"Hide component",value:"hide"},{label:"Show component",value:"show"},{label:"Update setting",value:"update"}],u=[{value:"string",label:"Binding"},{value:"number",label:"Number"},{value:"datetime",label:"Date"},{value:"boolean",label:"Boolean"}];let f=!0;const c=Z=>n.find(ee=>ee.key===Z),p=Z=>{const ee=c(Z);return xf((ee==null?void 0:ee.type)||"text")},d=()=>{t(0,s=[...s,{valueType:"string",id:Br.generate(),action:"hide",operator:Ir.Equals.value}])},g=Z=>{t(0,s=s.filter(ee=>ee.id!==Z))},h=Z=>{const ee=s.find(_e=>_e.id===Z),ae=lt(Se({},ee),{id:Br.generate()});t(0,s=[...s,ae])},v=Z=>{k(Z),t(3,f=!0)},k=Z=>{t(0,s=Z.detail.items)},C=Z=>Ca(Z.valueType),I=(Z,ee)=>{const ae=[Ir.Empty.value,Ir.NotEmpty.value];Z.noValue=ae.includes(ee),Z.noValue&&(Z.referenceValue=null,Z.valueType="string")},O=(Z,ee)=>{var _e;Z.referenceValue=null;const ae=Ca(ee).map(Re=>Re.value);ae.includes(Z.operator)||(Z.operator=(_e=ae[0])!=null?_e:Ir.Equals.value,I(Z,Z.operator))},T=()=>t(3,f=!1);function P(Z,ee){r.$$.not_equal(ee.action,Z)&&(ee.action=Z,t(0,s))}function M(Z,ee){r.$$.not_equal(ee.setting,Z)&&(ee.setting=Z,t(0,s))}const F=(Z,ee,ae,_e)=>t(0,ee[ae].settingValue=_e,s),j=(Z,ee,ae,_e)=>t(0,ee[ae].newValue=_e.detail,s);function z(Z,ee){r.$$.not_equal(ee.operator,Z)&&(ee.operator=Z,t(0,s))}const q=(Z,ee)=>I(Z,ee.detail);function H(Z,ee){r.$$.not_equal(ee.valueType,Z)&&(ee.valueType=Z,t(0,s))}const Y=(Z,ee)=>O(Z,ee.detail),U=(Z,ee,ae,_e)=>t(0,ee[ae].referenceValue=_e.detail,s);function W(Z,ee){r.$$.not_equal(ee.referenceValue,Z)&&(ee.referenceValue=Z,t(0,s))}function G(Z,ee){r.$$.not_equal(ee.referenceValue,Z)&&(ee.referenceValue=Z,t(0,s))}const Q=Z=>h(Z.id),fe=Z=>g(Z.id);return r.$$set=Z=>{"conditions"in Z&&t(0,s=Z.conditions),"bindings"in Z&&t(1,o=Z.bindings)},r.$$.update=()=>{r.$$.dirty[0]&4&&t(17,n=Aa(l==null?void 0:l._component)),r.$$.dirty[0]&131072&&t(4,i=n.map(Z=>({label:Z.label,value:Z.key}))),r.$$.dirty[0]&1&&s.forEach(Z=>{Z.id||(Z.id=Br.generate())})},[s,o,l,f,i,a,u,c,p,d,g,h,v,k,C,I,O,n,T,P,M,F,j,z,q,H,Y,U,W,G,Q,fe]}class Nse extends ie{constructor(e){super();le(this,e,Pse,Lse,re,{conditions:0,bindings:1},null,[-1,-1])}}function Rse(r){let e;return{c(){e=V("Configure conditions")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Mse(r){let e,t,n;return t=new Jt({props:{$$slots:{default:[Rse]},$$scope:{ctx:r}}}),t.$on("click",r[4]),{c(){e=D("div"),S(t.$$.fragment)},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&512&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Dse(r){let e;return{c(){e=V("Show, hide and update components in response to conditions being met.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function jse(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Bse(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[jse]},$$scope:{ctx:r}}}),e.$on("click",r[7]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&512&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function zse(r){let e,t,n;function i(s){r[6](s)}let l={slot:"body",bindings:r[1]};return r[2]!==void 0&&(l.conditions=r[2]),e=new Nse({props:l}),K.push(()=>ce(e,"conditions",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};o&2&&(a.bindings=s[1]),!t&&o&4&&(t=!0,a.conditions=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){E(e,s)}}}function qse(r){var s;let e,t,n,i;e=new Vo({props:{name:`Conditions${((s=r[0])==null?void 0:s._conditions)?" *":""}`,collapsible:!1,$$slots:{default:[Mse]},$$scope:{ctx:r}}});let l={title:"Conditions",$$slots:{body:[zse],buttons:[Bse],description:[Dse]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[8](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(o,a){A(e,o,a),$(o,t,a),A(n,o,a),i=!0},p(o,[a]){var c;const u={};a&1&&(u.name=`Conditions${((c=o[0])==null?void 0:c._conditions)?" *":""}`),a&512&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&518&&(f.$$scope={dirty:a,ctx:o}),n.$set(f)},i(o){i||(m(e.$$.fragment,o),m(n.$$.fragment,o),i=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),i=!1},d(o){E(e,o),o&&b(t),r[8](null),E(n,o)}}}function Use(r,e,t){let{componentInstance:n}=e,{bindings:i}=e,l,s;const o=()=>{var p;t(2,l=JSON.parse(JSON.stringify((p=n==null?void 0:n._conditions)!=null?p:[]))),s.show()},a=async()=>{try{await He.actions.components.updateConditions(l)}catch{we.error("Error updating conditions")}s.hide()};function u(p){l=p,t(2,l)}const f=()=>a();function c(p){K[p?"unshift":"push"](()=>{s=p,t(3,s)})}return r.$$set=p=>{"componentInstance"in p&&t(0,n=p.componentInstance),"bindings"in p&&t(1,i=p.bindings)},[n,i,l,s,o,a,u,f,c]}class Fse extends ie{constructor(e){super();le(this,e,Use,qse,re,{componentInstance:0,bindings:1})}}function t8(r){let e,t,n,i,l,s,o,a,u,f;return e=new Xx({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),n=new Kle({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1],componentBindings:r[0]}}),l=new ase({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),o=new bse({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),u=new Fse({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment),s=R(),S(o.$$.fragment),a=R(),S(u.$$.fragment)},m(c,p){A(e,c,p),$(c,t,p),A(n,c,p),$(c,i,p),A(l,c,p),$(c,s,p),A(o,c,p),$(c,a,p),A(u,c,p),f=!0},p(c,p){const d={};p&8&&(d.componentInstance=c[3]),p&4&&(d.componentDefinition=c[2]),p&2&&(d.bindings=c[1]),e.$set(d);const g={};p&8&&(g.componentInstance=c[3]),p&4&&(g.componentDefinition=c[2]),p&2&&(g.bindings=c[1]),p&1&&(g.componentBindings=c[0]),n.$set(g);const h={};p&8&&(h.componentInstance=c[3]),p&4&&(h.componentDefinition=c[2]),p&2&&(h.bindings=c[1]),l.$set(h);const v={};p&8&&(v.componentInstance=c[3]),p&4&&(v.componentDefinition=c[2]),p&2&&(v.bindings=c[1]),o.$set(v);const k={};p&8&&(k.componentInstance=c[3]),p&4&&(k.componentDefinition=c[2]),p&2&&(k.bindings=c[1]),u.$set(k)},i(c){f||(m(e.$$.fragment,c),m(n.$$.fragment,c),m(l.$$.fragment,c),m(o.$$.fragment,c),m(u.$$.fragment,c),f=!0)},o(c){_(e.$$.fragment,c),_(n.$$.fragment,c),_(l.$$.fragment,c),_(o.$$.fragment,c),_(u.$$.fragment,c),f=!1},d(c){E(e,c),c&&b(t),E(n,c),c&&b(i),E(l,c),c&&b(s),E(o,c),c&&b(a),E(u,c)}}}function Vse(r){var l;let e,t=(l=r[3])==null?void 0:l._id,n,i=t8(r);return{c(){e=D("div"),i.c(),w(e,"class","container svelte-1n3t1jx")},m(s,o){$(s,e,o),i.m(e,null),n=!0},p(s,o){var a;o&8&&re(t,t=(a=s[3])==null?void 0:a._id)?(te(),_(i,1,1,Oe),ne(),i=t8(s),i.c(),m(i),i.m(e,null)):i.p(s,o)},i(s){n||(m(i),n=!0)},o(s){_(i),n=!1},d(s){s&&b(e),i.d(s)}}}function Hse(r){let e,t;return e=new bn({props:{title:"Settings",$$slots:{default:[Vse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&143&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Wse(r){let e,t;return e=new Vr({props:{selected:"Settings",noPadding:!0,$$slots:{default:[Hse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&143&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Gse(r,e,t){let n,i,l,s,o,a,u;return ue(r,He,f=>t(4,o=f)),ue(r,un,f=>t(5,a=f)),ue(r,ri,f=>t(6,u=f)),r.$$.update=()=>{r.$$.dirty&64&&t(3,n=u),r.$$.dirty&64&&t(2,i=He.actions.components.getDefinition(u==null?void 0:u._component)),r.$$.dirty&48&&t(1,l=aq(a,o.selectedComponentId)),r.$$.dirty&48&&t(0,s=uq(a,o.selectedComponentId))},[s,l,i,n,o,a,u]}class Yse extends ie{constructor(e){super();le(this,e,Gse,Wse,re,{})}}var Jse=[{name:"Blocks",icon:"Article",children:["tableblock","cardsblock","repeaterblock"]},{name:"Layout",icon:"ClassicGridView",children:["container","section"]},{name:"Data",icon:"Data",children:["dataprovider","repeater","table","dynamicfilter"]},{name:"Form",icon:"Form",children:["form","formstep","fieldgroup","stringfield","numberfield","passwordfield","optionsfield","booleanfield","longformfield","datetimefield","attachmentfield","relationshipfield","daterangepicker","multifieldselect","jsonfield","s3upload"]},{name:"Card",icon:"Card",children:["spectrumcard","cardstat"]},{name:"Chart",icon:"GraphBarVertical",children:["bar","line","area","pie","donut","candlestick"]},{name:"Elements",icon:"TextParagraph",children:["heading","text","button","tag","divider","image","backgroundimage","link","icon","embed","markdownviewer"]}];function n8(r,e,t){const n=r.slice();return n[9]=e[t],n}function r8(r,e,t){const n=r.slice();return n[9]=e[t],n}function i8(r){let e,t;function n(){return r[7](r[9])}return e=new Qt({props:{dataCy:`component-${r[9].name}`,icon:r[9].icon,disabled:r[3](r[9],r[1]),$$slots:{default:[Qse]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l&1&&(s.dataCy=`component-${r[9].name}`),l&1&&(s.icon=r[9].icon),l&3&&(s.disabled=r[3](r[9],r[1])),l&16385&&(s.$$scope={dirty:l,ctx:r}),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function Qse(r){let e=r[9].name+"",t;return{c(){t=V(e)},m(n,i){$(n,t,i)},p(n,i){i&1&&e!==(e=n[9].name+"")&&Te(t,e)},d(n){n&&b(t)}}}function l8(r){let e=!r[9].showOnAsset||r[9].showOnAsset.includes(r[2]),t,n,i=e&&i8(r);return{c(){i&&i.c(),t=Ee()},m(l,s){i&&i.m(l,s),$(l,t,s),n=!0},p(l,s){s&5&&(e=!l[9].showOnAsset||l[9].showOnAsset.includes(l[2])),e?i?(i.p(l,s),s&5&&m(i,1)):(i=i8(l),i.c(),m(i,1),i.m(t.parentNode,t)):i&&(te(),_(i,1,1,()=>{i=null}),ne())},i(l){n||(m(i),n=!0)},o(l){_(i),n=!1},d(l){i&&i.d(l),l&&b(t)}}}function Xse(r){let e,t,n=r[9].children||[],i=[];for(let s=0;s<n.length;s+=1)i[s]=l8(r8(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=R()},m(s,o){for(let a=0;a<i.length;a+=1)i[a].m(s,o);$(s,e,o),t=!0},p(s,o){if(o&31){n=s[9].children||[];let a;for(a=0;a<n.length;a+=1){const u=r8(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=l8(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){$t(i,s),s&&b(e)}}}function s8(r){let e,t;return e=new ct({props:{size:"S",name:"ChevronDown"}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Kse(r){let e,t=r[9].name+"",n,i,l,s,o=r[9].isCategory&&s8();return{c(){e=D("div"),n=V(t),i=R(),o&&o.c(),l=R(),w(e,"class","buttonContent svelte-15cdrfq")},m(a,u){$(a,e,u),N(e,n),N(e,i),o&&o.m(e,null),$(a,l,u),s=!0},p(a,u){(!s||u&1)&&t!==(t=a[9].name+"")&&Te(n,t),a[9].isCategory?o?u&1&&m(o,1):(o=s8(),o.c(),m(o,1),o.m(e,null)):o&&(te(),_(o,1,1,()=>{o=null}),ne())},i(a){s||(m(o),s=!0)},o(a){_(o),s=!1},d(a){a&&b(e),o&&o.d(),a&&b(l)}}}function Zse(r){let e,t;function n(){return r[6](r[9])}return e=new Jt({props:{icon:r[9].icon,disabled:!r[9].isCategory&&r[3](r[9],r[1]),quiet:!0,size:"S",slot:"control",dataCy:`category-${r[9].name}`,$$slots:{default:[Kse]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l&1&&(s.icon=r[9].icon),l&3&&(s.disabled=!r[9].isCategory&&r[3](r[9],r[1])),l&1&&(s.dataCy=`category-${r[9].name}`),l&16385&&(s.$$scope={dirty:l,ctx:r}),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function o8(r){let e,t;return e=new yr({props:{disabled:!r[9].isCategory,$$slots:{control:[Zse],default:[Xse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.disabled=!n[9].isCategory),i&16391&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function xse(r){let e,t,n=r[0],i=[];for(let s=0;s<n.length;s+=1)i[s]=o8(n8(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){e=D("div");for(let s=0;s<i.length;s+=1)i[s].c();w(e,"class","components svelte-15cdrfq")},m(s,o){$(s,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(s,[o]){if(o&31){n=s[0];let a;for(a=0;a<n.length;a+=1){const u=n8(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=o8(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){s&&b(e),$t(i,s)}}}function eoe(r,e,t){let n,i,l,s;ue(r,He,p=>t(5,i=p)),ue(r,ri,p=>t(1,l=p)),ue(r,Hj,p=>t(2,s=p));const o=({name:p},d)=>{var h;const g=He.actions.components.getDefinition(d==null?void 0:d._component);return(h=g==null?void 0:g.illegalChildren)==null?void 0:h.includes(p.toLowerCase())},a=(p,d)=>{let g=[];return p.forEach(h=>{if(typeof h=="string"){const v=d[`@budibase/standard-components/${h}`];v&&g.push(lt(Se({},v),{isCategory:!1}))}else g.push(lt(Se({},h),{isCategory:!0,children:a(h.children||[],d)}))}),g},u=async p=>{if(!p.isCategory)try{await He.actions.components.create(p.component)}catch{we.error("Error creating component")}},f=p=>u(p),c=p=>u(p);return r.$$.update=()=>{r.$$.dirty&32&&t(0,n=a(Jse,i.components))},[n,l,s,o,u,i,f,c]}class toe extends ie{constructor(e){super();le(this,e,eoe,xse,re,{})}}const a8={MOVE:"move",COPY:"copy"},Hr={ABOVE:"above",BELOW:"below",INSIDE:"inside"};function u8(){const r=cn({});return r.actions={dragstart:e=>{r.update(t=>(t.dragged=e,t))},dragover:({component:e,index:t,canHaveChildrenButIsEmpty:n,mousePosition:i})=>{r.update(l=>(l.targetComponent=e,n&&t===0?(i<.4&&(l.dropPosition=Hr.ABOVE),i>.8&&(l.dropPosition=Hr.BELOW),i>.4&&i<.8&&(l.dropPosition=Hr.INSIDE),l):(i>.5?l.dropPosition=Hr.BELOW:l.dropPosition=n?Hr.INSIDE:Hr.ABOVE,l)))},reset:()=>{r.update(e=>(e.dropPosition="",e.targetComponent=null,e.dragged=null,e))},drop:async()=>{const e=it(r);e.targetComponent===e.dragged||!e.targetComponent||!e.dragged||Sl(e.dragged,e.targetComponent._id).map(i=>i._id).includes(e.targetComponent._id)||(He.actions.components.copy(e.dragged,!0),await He.actions.components.paste(e.targetComponent,e.dropPosition),r.actions.reset())}},r}function f8(r){var s;let e,t,n,i;e=new yr({props:{$$slots:{control:[poe],default:[coe]},$$scope:{ctx:r}}});let l={title:"Confirm Deletion",body:`Are you sure you wish to delete this '${(s=r[0])==null?void 0:s.name}' component?`,okText:"Delete Component",onOk:r[8]};return n=new hr({props:l}),r[18](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(o,a){A(e,o,a),$(o,t,a),A(n,o,a),i=!0},p(o,a){var c;const u={};a&524314&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&1&&(f.body=`Are you sure you wish to delete this '${(c=o[0])==null?void 0:c.name}' component?`),n.$set(f)},i(o){i||(m(e.$$.fragment,o),m(n.$$.fragment,o),i=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),i=!1},d(o){E(e,o),o&&b(t),r[18](null),E(n,o)}}}function noe(r){let e;return{c(){e=V("Delete")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function roe(r){let e;return{c(){e=V("Move up")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ioe(r){let e;return{c(){e=V("Move down")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function loe(r){let e;return{c(){e=V("Duplicate")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function soe(r){let e;return{c(){e=V("Cut")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ooe(r){let e;return{c(){e=V("Copy")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function aoe(r){let e;return{c(){e=V("Paste above")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function uoe(r){let e;return{c(){e=V("Paste below")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function foe(r){let e;return{c(){e=V("Paste inside")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function coe(r){let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C;return e=new Qt({props:{icon:"Delete",$$slots:{default:[noe]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)}),n=new Qt({props:{noClose:!0,icon:"ChevronUp",$$slots:{default:[roe]},$$scope:{ctx:r}}}),n.$on("click",r[5]),l=new Qt({props:{noClose:!0,icon:"ChevronDown",$$slots:{default:[ioe]},$$scope:{ctx:r}}}),l.$on("click",r[6]),o=new Qt({props:{noClose:!0,icon:"Duplicate",$$slots:{default:[loe]},$$scope:{ctx:r}}}),o.$on("click",r[7]),u=new Qt({props:{icon:"Cut",$$slots:{default:[soe]},$$scope:{ctx:r}}}),u.$on("click",r[13]),c=new Qt({props:{icon:"Copy",$$slots:{default:[ooe]},$$scope:{ctx:r}}}),c.$on("click",r[14]),d=new Qt({props:{icon:"LayersBringToFront",disabled:r[3],$$slots:{default:[aoe]},$$scope:{ctx:r}}}),d.$on("click",r[15]),h=new Qt({props:{icon:"LayersSendToBack",disabled:r[3],$$slots:{default:[uoe]},$$scope:{ctx:r}}}),h.$on("click",r[16]),k=new Qt({props:{icon:"ShowOneLayer",disabled:r[3]||r[4],$$slots:{default:[foe]},$$scope:{ctx:r}}}),k.$on("click",r[17]),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment),s=R(),S(o.$$.fragment),a=R(),S(u.$$.fragment),f=R(),S(c.$$.fragment),p=R(),S(d.$$.fragment),g=R(),S(h.$$.fragment),v=R(),S(k.$$.fragment)},m(I,O){A(e,I,O),$(I,t,O),A(n,I,O),$(I,i,O),A(l,I,O),$(I,s,O),A(o,I,O),$(I,a,O),A(u,I,O),$(I,f,O),A(c,I,O),$(I,p,O),A(d,I,O),$(I,g,O),A(h,I,O),$(I,v,O),A(k,I,O),C=!0},p(I,O){r=I;const T={};O&524288&&(T.$$scope={dirty:O,ctx:r}),e.$set(T);const P={};O&524288&&(P.$$scope={dirty:O,ctx:r}),n.$set(P);const M={};O&524288&&(M.$$scope={dirty:O,ctx:r}),l.$set(M);const F={};O&524288&&(F.$$scope={dirty:O,ctx:r}),o.$set(F);const j={};O&524288&&(j.$$scope={dirty:O,ctx:r}),u.$set(j);const z={};O&524288&&(z.$$scope={dirty:O,ctx:r}),c.$set(z);const q={};O&8&&(q.disabled=r[3]),O&524288&&(q.$$scope={dirty:O,ctx:r}),d.$set(q);const H={};O&8&&(H.disabled=r[3]),O&524288&&(H.$$scope={dirty:O,ctx:r}),h.$set(H);const Y={};O&24&&(Y.disabled=r[3]||r[4]),O&524288&&(Y.$$scope={dirty:O,ctx:r}),k.$set(Y)},i(I){C||(m(e.$$.fragment,I),m(n.$$.fragment,I),m(l.$$.fragment,I),m(o.$$.fragment,I),m(u.$$.fragment,I),m(c.$$.fragment,I),m(d.$$.fragment,I),m(h.$$.fragment,I),m(k.$$.fragment,I),C=!0)},o(I){_(e.$$.fragment,I),_(n.$$.fragment,I),_(l.$$.fragment,I),_(o.$$.fragment,I),_(u.$$.fragment,I),_(c.$$.fragment,I),_(d.$$.fragment,I),_(h.$$.fragment,I),_(k.$$.fragment,I),C=!1},d(I){E(e,I),I&&b(t),E(n,I),I&&b(i),E(l,I),I&&b(s),E(o,I),I&&b(a),E(u,I),I&&b(f),E(c,I),I&&b(p),E(d,I),I&&b(g),E(h,I),I&&b(v),E(k,I)}}}function poe(r){let e,t,n;return t=new ct({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","control"),w(e,"class","icon svelte-u6s22l")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p:Oe,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function doe(r){let e,t,n=r[2]&&f8(r);return{c(){n&&n.c(),e=Ee()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,[l]){i[2]?n?(n.p(i,l),l&4&&m(n,1)):(n=f8(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(te(),_(n,1,1,()=>{n=null}),ne())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function moe(r,e,t){let n,i,l,s,o;ue(r,He,P=>t(12,o=P));let{component:a}=e,u;const f=()=>{const P=it(un),M=Xl(P==null?void 0:P.props,a._id);if(!M)return;const F=M._children.indexOf(a);if(F!==0)try{const j=M._children.filter(z=>z!==a);j.splice(F-1,0,a),M._children=j,He.actions.preview.saveSelected()}catch{we.error("Error saving screen")}},c=()=>{const P=it(un),M=Xl(P==null?void 0:P.props,a._id);if(!M)return;const F=M._children.indexOf(a);if(F!==M._children.length-1)try{const j=M._children.filter(z=>z!==a);j.splice(F+1,0,a),M._children=j,He.actions.preview.saveSelected()}catch{we.error("Error saving screen")}},p=()=>{g(!1),h("below")},d=async()=>{try{await He.actions.components.delete(a)}catch{we.error("Error deleting component")}},g=(P=!1)=>{He.actions.components.copy(a,P)},h=P=>{try{He.actions.components.paste(a,P)}catch{we.error("Error saving component")}},v=()=>g(!0),k=()=>g(!1),C=()=>h("above"),I=()=>h("below"),O=()=>h("inside");function T(P){K[P?"unshift":"push"](()=>{u=P,t(1,u)})}return r.$$set=P=>{"component"in P&&t(11,a=P.component)},r.$$.update=()=>{r.$$.dirty&2048&&t(0,n=He.actions.components.getDefinition(a==null?void 0:a._component)),r.$$.dirty&2049&&t(4,i=!a||!(n==null?void 0:n.hasChildren)),r.$$.dirty&4096&&t(3,l=!o.componentToPaste),r.$$.dirty&1&&t(2,s=(n==null?void 0:n.editable)!==!1&&(n==null?void 0:n.static)!==!0)},[n,u,s,l,i,f,c,p,d,g,h,a,o,v,k,C,I,O,T]}class goe extends ie{constructor(e){super();le(this,e,moe,doe,re,{component:11})}}function c8(r,e,t){const n=r.slice();return n[18]=e[t],n[20]=t,n}function p8(r){let e,t,n;return{c(){e=D("div"),w(e,"ondragover","return false"),w(e,"ondragenter","return false"),w(e,"class","drop-item svelte-1wboluz"),zt(e,"margin-left",(r[3]+1)*16+"px")},m(i,l){$(i,e,l),t||(n=Pe(e,"drop",r[14]),t=!0)},p(i,l){l&8&&zt(e,"margin-left",(i[3]+1)*16+"px")},d(i){i&&b(e),t=!1,n()}}}function _oe(r){let e,t;return e=new goe({props:{component:r[18]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.component=n[18]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function d8(r){let e,t;return e=new R1({props:{components:r[18]._children,currentComponent:r[1],onSelect:r[2],dragDropStore:r[4],level:r[3]+1}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.components=n[18]._children),i&2&&(l.currentComponent=n[1]),i&4&&(l.onSelect=n[2]),i&16&&(l.dragDropStore=n[4]),i&8&&(l.level=n[3]+1),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function m8(r){let e,t,n;return{c(){e=D("div"),w(e,"ondragover","return false"),w(e,"ondragenter","return false"),w(e,"class","drop-item svelte-1wboluz"),zt(e,"margin-left",(r[3]+(r[6].dropPosition===Hr.INSIDE?3:1))*16+"px")},m(i,l){$(i,e,l),t||(n=Pe(e,"drop",r[14]),t=!0)},p(i,l){l&72&&zt(e,"margin-left",(i[3]+(i[6].dropPosition===Hr.INSIDE?3:1))*16+"px")},d(i){i&&b(e),t=!1,n()}}}function g8(r,e){var k,C;let t,n,i,l,s=e[15](e[18],e[8],e[5]),o,a,u,f,c,p=((k=e[6])==null?void 0:k.targetComponent)===e[18]&&e[6].dropPosition===Hr.ABOVE&&p8(e);function d(){return e[16](e[18])}i=new Tl({props:{draggable:!0,text:e[12](e[18]),withArrow:!0,indentLevel:e[3]+1,selected:e[7].selectedComponentId===e[18]._id,opened:e[15](e[18],e[8],e[5]),$$slots:{default:[_oe]},$$scope:{ctx:e}}}),i.$on("dragend",function(){mt(e[4].actions.reset)&&e[4].actions.reset.apply(this,arguments)}),i.$on("dragstart",function(){mt(e[10](e[18]))&&e[10](e[18]).apply(this,arguments)}),i.$on("dragover",function(){mt(e[11](e[18],e[20]))&&e[11](e[18],e[20]).apply(this,arguments)}),i.$on("iconClick",d),i.$on("drop",e[14]);let g=s&&d8(e),h=((C=e[6])==null?void 0:C.targetComponent)===e[18]&&(e[6].dropPosition===Hr.INSIDE||e[6].dropPosition===Hr.BELOW)&&m8(e);function v(){return e[17](e[18])}return{key:r,first:null,c(){t=D("li"),p&&p.c(),n=R(),S(i.$$.fragment),l=R(),g&&g.c(),o=R(),h&&h.c(),a=R(),w(t,"class","svelte-1wboluz"),this.first=t},m(I,O){$(I,t,O),p&&p.m(t,null),N(t,n),A(i,t,null),N(t,l),g&&g.m(t,null),N(t,o),h&&h.m(t,null),N(t,a),u=!0,f||(c=Pe(t,"click",dp(v)),f=!0)},p(I,O){var P,M;e=I,((P=e[6])==null?void 0:P.targetComponent)===e[18]&&e[6].dropPosition===Hr.ABOVE?p?p.p(e,O):(p=p8(e),p.c(),p.m(t,n)):p&&(p.d(1),p=null);const T={};O&1&&(T.text=e[12](e[18])),O&8&&(T.indentLevel=e[3]+1),O&129&&(T.selected=e[7].selectedComponentId===e[18]._id),O&289&&(T.opened=e[15](e[18],e[8],e[5])),O&2097153&&(T.$$scope={dirty:O,ctx:e}),i.$set(T),O&289&&(s=e[15](e[18],e[8],e[5])),s?g?(g.p(e,O),O&289&&m(g,1)):(g=d8(e),g.c(),m(g,1),g.m(t,o)):g&&(te(),_(g,1,1,()=>{g=null}),ne()),((M=e[6])==null?void 0:M.targetComponent)===e[18]&&(e[6].dropPosition===Hr.INSIDE||e[6].dropPosition===Hr.BELOW)?h?h.p(e,O):(h=m8(e),h.c(),h.m(t,a)):h&&(h.d(1),h=null)},i(I){u||(m(i.$$.fragment,I),m(g),u=!0)},o(I){_(i.$$.fragment,I),_(g),u=!1},d(I){I&&b(t),p&&p.d(),E(i),g&&g.d(),h&&h.d(),f=!1,c()}}}function hoe(r){let e,t=[],n=new Map,i,l=r[0]||[];const s=o=>o[18]._id;for(let o=0;o<l.length;o+=1){let a=c8(r,l,o),u=s(a);n.set(u,t[o]=g8(u,a))}return{c(){e=D("ul");for(let o=0;o<t.length;o+=1)t[o].c();w(e,"class","svelte-1wboluz")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,[a]){a&65535&&(l=o[0]||[],te(),t=xn(t,a,s,1,o,l,n,e,jr,g8,null,c8),ne())},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function $oe(r,e,t){let n,i=Oe,l=()=>(i(),i=p_(p,M=>t(6,n=M)),p),s,o;ue(r,He,M=>t(7,s=M)),ue(r,Vj,M=>t(8,o=M)),r.$$.on_destroy.push(()=>i());let{components:a=[]}=e,{currentComponent:u}=e,{onSelect:f=()=>{}}=e,{level:c=0}=e,{dragDropStore:p}=e;l();let d={};const g=M=>{He.actions.components.select(M)},h=M=>F=>{F.dataTransfer.dropEffect=a8.MOVE,p.actions.dragstart(M)},v=(M,F)=>j=>{var Y;const z=He.actions.components.getDefinition(M._component),q=(z==null?void 0:z.hasChildren)&&!((Y=M._children)==null?void 0:Y.length);j.dataTransfer.dropEffect=a8.COPY;const H=j.offsetY/j.currentTarget.offsetHeight;return p.actions.dragover({component:M,index:F,canHaveChildrenButIsEmpty:q,mousePosition:H}),!1},k=M=>{if(M._instanceName)return M._instanceName;const F=M._component.replace("@budibase/standard-components/","")||"component";return Sr(F)};function C(M){d[M]?delete d[M]:t(5,d[M]=!0,d),t(5,d)}const I=async()=>{try{await p.actions.drop()}catch{we.error("Error saving component")}},O=(M,F,j)=>{var z;return((z=M==null?void 0:M._children)==null?void 0:z.length)?F.includes(M._id)?!0:!j[M._id]:!1},T=M=>C(M._id),P=M=>g(M);return r.$$set=M=>{"components"in M&&t(0,a=M.components),"currentComponent"in M&&t(1,u=M.currentComponent),"onSelect"in M&&t(2,f=M.onSelect),"level"in M&&t(3,c=M.level),"dragDropStore"in M&&l(t(4,p=M.dragDropStore))},[a,u,f,c,p,d,n,s,o,g,h,v,k,C,I,O,T,P]}class R1 extends ie{constructor(e){super();le(this,e,$oe,hoe,re,{components:0,currentComponent:1,onSelect:2,level:3,dragDropStore:4})}}function _8(r,e,t){const n=r.slice();return n[6]=e[t],n}function boe(r){let e;return{c(){e=V("Delete all screens")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function voe(r){let e,t;return e=new Qt({props:{icon:"Delete",$$slots:{default:[boe]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[2].show)&&r[2].show.apply(this,arguments)}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){r=n;const l={};i&512&&(l.$$scope={dirty:i,ctx:r}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function woe(r){let e,t,n;return t=new ct({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","control"),w(e,"class","icon svelte-xzl76s")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p:Oe,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function h8(r){let e,t=r[6].route+"",n;return{c(){e=D("div"),n=V(t)},m(i,l){$(i,e,l),N(e,n)},p(i,l){l&2&&t!==(t=i[6].route+"")&&Te(n,t)},d(i){i&&b(e)}}}function yoe(r){let e,t,n,i,l,s,o,a,u,f=r[1],c=[];for(let p=0;p<f.length;p+=1)c[p]=h8(_8(r,f,p));return{c(){e=D("div"),t=V("Are you sure you want to delete all screens under the "),n=D("b"),i=V(r[0]),l=V(" route?"),s=R(),o=D("div"),o.textContent="The following screens will be deleted:",a=R(),u=D("div");for(let p=0;p<c.length;p+=1)c[p].c();w(u,"class","to-delete svelte-xzl76s")},m(p,d){$(p,e,d),N(e,t),N(e,n),N(n,i),N(e,l),$(p,s,d),$(p,o,d),$(p,a,d),$(p,u,d);for(let g=0;g<c.length;g+=1)c[g].m(u,null)},p(p,d){if(d&1&&Te(i,p[0]),d&2){f=p[1];let g;for(g=0;g<f.length;g+=1){const h=_8(p,f,g);c[g]?c[g].p(h,d):(c[g]=h8(h),c[g].c(),c[g].m(u,null))}for(;g<c.length;g+=1)c[g].d(1);c.length=f.length}},d(p){p&&b(e),p&&b(s),p&&b(o),p&&b(a),p&&b(u),$t(c,p)}}}function koe(r){let e,t;return e=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[yoe]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&515&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Coe(r){let e,t,n,i;e=new yr({props:{$$slots:{control:[woe],default:[voe]},$$scope:{ctx:r}}});let l={title:"Confirm Deletion",okText:"Delete screens",onOk:r[3],$$slots:{default:[koe]},$$scope:{ctx:r}};return n=new hr({props:l}),r[4](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){const a={};o&516&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const u={};o&515&&(u.$$scope={dirty:o,ctx:s}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[4](null),E(n,s)}}}function Soe(r,e,t){let n;ue(r,qt,u=>t(5,n=u));let{path:i}=e,{screens:l}=e,s;const o=async()=>{if(!!(l==null?void 0:l.length))try{for(let{id:u}of l){const f=it(He).screens.find(c=>c._id===u);!f||await He.actions.screens.delete(f)}we.success("Screens deleted successfully"),n("../")}catch{we.error("Error deleting screens")}};function a(u){K[u?"unshift":"push"](()=>{s=u,t(2,s)})}return r.$$set=u=>{"path"in u&&t(0,i=u.path),"screens"in u&&t(1,l=u.screens)},[i,l,s,o,a]}class Aoe extends ie{constructor(e){super();le(this,e,Soe,Coe,re,{path:0,screens:1})}}function Eoe(r){let e,t,n,i,l,s;function o(c){r[10](c)}let a={label:"Name"};r[0]!==void 0&&(a.value=r[0]),e=new tt({props:a}),K.push(()=>ce(e,"value",o));function u(c){r[11](c)}let f={label:"URL",error:r[5]};return r[1]!==void 0&&(f.value=r[1]),i=new tt({props:f}),K.push(()=>ce(i,"value",u)),i.$on("change",r[7]),{c(){S(e.$$.fragment),n=R(),S(i.$$.fragment)},m(c,p){A(e,c,p),$(c,n,p),A(i,c,p),s=!0},p(c,p){const d={};!t&&p&1&&(t=!0,d.value=c[0],pe(()=>t=!1)),e.$set(d);const g={};p&32&&(g.error=c[5]),!l&&p&2&&(l=!0,g.value=c[1],pe(()=>l=!1)),i.$set(g)},i(c){s||(m(e.$$.fragment,c),m(i.$$.fragment,c),s=!0)},o(c){_(e.$$.fragment,c),_(i.$$.fragment,c),s=!1},d(c){E(e,c),c&&b(n),E(i,c)}}}function $8(r){let e,t,n;return t=new Gs({props:{size:"S"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","footer-progress svelte-19rzw36")},m(i,l){$(i,e,l),A(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Ooe(r){let e,t,n=r[3]&&$8();return{c(){e=D("div"),n&&n.c(),w(e,"slot","footer")},m(i,l){$(i,e,l),n&&n.m(e,null),t=!0},p(i,l){i[3]?n?l&8&&m(n,1):(n=$8(),n.c(),m(n,1),n.m(e,null)):n&&(te(),_(n,1,1,()=>{n=null}),ne())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){i&&b(e),n&&n.d()}}}function Toe(r){let e,t;return e=new Dt({props:{size:"M",title:"Enter details",confirmText:r[4],onConfirm:r[8],onCancel:r[2],cancelText:"Back",disabled:!r[0]||!r[1]||r[5]||!r[6],$$slots:{footer:[Ooe],default:[Eoe]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&16&&(l.confirmText=n[4]),i&4&&(l.onCancel=n[2]),i&99&&(l.disabled=!n[0]||!n[1]||n[5]||!n[6]),i&8235&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Ioe(r,e,t){let{onConfirm:n}=e,{onCancel:i}=e,{showProgressCircle:l=!1}=e,{screenName:s}=e,{screenUrl:o}=e,{confirmText:a="Continue"}=e,u,f=!1;const c=v=>{v.detail.startsWith("/")||t(1,o="/"+v.detail),t(6,f=!0),t(1,o=As(o)),p(o)?t(5,u="This URL is already taken for this access role"):t(5,u=null)},p=v=>{const k=it(Al)||"BASIC";return it(Cs).some(C=>C.routing.route.toLowerCase()===v.toLowerCase()&&C.routing.roleId===k)},d=async()=>{await n({screenName:s,screenUrl:o})};function g(v){s=v,t(0,s)}function h(v){o=v,t(1,o)}return r.$$set=v=>{"onConfirm"in v&&t(9,n=v.onConfirm),"onCancel"in v&&t(2,i=v.onCancel),"showProgressCircle"in v&&t(3,l=v.showProgressCircle),"screenName"in v&&t(0,s=v.screenName),"screenUrl"in v&&t(1,o=v.screenUrl),"confirmText"in v&&t(4,a=v.confirmText)},[s,o,i,l,a,u,f,c,d,n,g,h]}class b8 extends ie{constructor(e){super();le(this,e,Ioe,Toe,re,{onConfirm:9,onCancel:2,showProgressCircle:3,screenName:0,screenUrl:1,confirmText:4})}}function Loe(r){let e;return{c(){e=V("Duplicate")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Poe(r){let e;return{c(){e=V("Paste inside")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Noe(r){let e;return{c(){e=V("Delete")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Roe(r){let e,t,n,i,l,s;return e=new Qt({props:{icon:"Duplicate",$$slots:{default:[Loe]},$$scope:{ctx:r}}}),e.$on("click",r[4]),n=new Qt({props:{icon:"ShowOneLayer",disabled:!r[3].componentToPaste,$$slots:{default:[Poe]},$$scope:{ctx:r}}}),n.$on("click",r[10]),l=new Qt({props:{icon:"Delete",$$slots:{default:[Noe]},$$scope:{ctx:r}}}),l.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(o,a){A(e,o,a),$(o,t,a),A(n,o,a),$(o,i,a),A(l,o,a),s=!0},p(o,a){r=o;const u={};a&16384&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&8&&(f.disabled=!r[3].componentToPaste),a&16384&&(f.$$scope={dirty:a,ctx:r}),n.$set(f);const c={};a&16384&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(o){s||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){E(e,o),o&&b(t),E(n,o),o&&b(i),E(l,o)}}}function Moe(r){let e,t,n;return t=new ct({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","control"),w(e,"class","icon svelte-u6s22l")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p:Oe,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Doe(r){var n,i;let e,t;return e=new b8({props:{onConfirm:r[5],screenName:(n=r[0])==null?void 0:n.props._instanceName,screenUrl:(i=r[0])==null?void 0:i.routing.route,confirmText:"Duplicate"}}),{c(){S(e.$$.fragment)},m(l,s){A(e,l,s),t=!0},p(l,s){var a,u;const o={};s&1&&(o.screenName=(a=l[0])==null?void 0:a.props._instanceName),s&1&&(o.screenUrl=(u=l[0])==null?void 0:u.routing.route),e.$set(o)},i(l){t||(m(e.$$.fragment,l),t=!0)},o(l){_(e.$$.fragment,l),t=!1},d(l){E(e,l)}}}function joe(r){let e,t,n,i,l,s;e=new yr({props:{$$slots:{control:[Moe],default:[Roe]},$$scope:{ctx:r}}});let o={title:"Confirm Deletion",body:"Are you sure you wish to delete this screen?",okText:"Delete screen",onOk:r[6]};n=new hr({props:o}),r[11](n);let a={$$slots:{default:[Doe]},$$scope:{ctx:r}};return l=new Et({props:a}),r[12](l),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(u,f){A(e,u,f),$(u,t,f),A(n,u,f),$(u,i,f),A(l,u,f),s=!0},p(u,[f]){const c={};f&16394&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};n.$set(p);const d={};f&16385&&(d.$$scope={dirty:f,ctx:u}),l.$set(d)},i(u){s||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(l.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(l.$$.fragment,u),s=!1},d(u){E(e,u),u&&b(t),r[11](null),E(n,u),u&&b(i),r[12](null),E(l,u)}}}function Boe(r,e,t){let n,i,l,s;ue(r,qt,k=>t(13,i=k)),ue(r,Cs,k=>t(9,l=k)),ue(r,He,k=>t(3,s=k));let{screenId:o}=e,a,u;const f=()=>{u.show()},c=async({screenName:k,screenUrl:C})=>{let I=$p(n);delete I._id,delete I._rev,f1(I.props),I.routing.route=As(C),I.props._instanceName=k;try{await He.actions.screens.save(I),n.template&&qn.captureEvent(Yn.SCREEN.CREATED,{template:"createFromScratch"})}catch(O){we.error("Error duplicating screen"),console.log(O)}},p=async()=>{try{await He.actions.screens.delete(n),i("../"),we.success("Deleted screen successfully.")}catch{we.error("Error deleting screen")}},d=k=>{try{He.actions.components.paste(n==null?void 0:n.props,k)}catch{we.error("Error saving component")}},g=()=>d("inside");function h(k){K[k?"unshift":"push"](()=>{a=k,t(1,a)})}function v(k){K[k?"unshift":"push"](()=>{u=k,t(2,u)})}return r.$$set=k=>{"screenId"in k&&t(8,o=k.screenId)},r.$$.update=()=>{r.$$.dirty&768&&t(0,n=l.find(k=>k._id===o))},[n,a,u,s,f,c,p,d,o,l,g,h,v]}class zoe extends ie{constructor(e){super();le(this,e,Boe,joe,re,{screenId:8})}}function v8(r,e,t){const n=r.slice();return n[23]=e[t],n}function w8(r){let e,t,n,i;e=new Tl({props:{icon:"FolderOutline",text:r[1],opened:r[7],border:r[3],withArrow:r[0].subpaths,$$slots:{default:[qoe]},$$scope:{ctx:r}}}),e.$on("click",r[14]);let l=r[7]&&y8(r);return{c(){S(e.$$.fragment),t=R(),l&&l.c(),n=Ee()},m(s,o){A(e,s,o),$(s,t,o),l&&l.m(s,o),$(s,n,o),i=!0},p(s,o){const a={};o&2&&(a.text=s[1]),o&128&&(a.opened=s[7]),o&8&&(a.border=s[3]),o&1&&(a.withArrow=s[0].subpaths),o&67108930&&(a.$$scope={dirty:o,ctx:s}),e.$set(a),s[7]?l?(l.p(s,o),o&128&&m(l,1)):(l=y8(s),l.c(),m(l,1),l.m(n.parentNode,n)):l&&(te(),_(l,1,1,()=>{l=null}),ne())},i(s){i||(m(e.$$.fragment,s),m(l),i=!0)},o(s){_(e.$$.fragment,s),_(l),i=!1},d(s){E(e,s),s&&b(t),l&&l.d(s),s&&b(n)}}}function qoe(r){let e,t;return e=new Aoe({props:{screens:r[6],path:r[1]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&64&&(l.screens=n[6]),i&2&&(l.path=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function y8(r){let e=[],t=new Map,n,i,l=r[5];const s=o=>o[23].id;for(let o=0;o<l.length;o+=1){let a=v8(r,l,o),u=s(a);t.set(u,e[o]=C8(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=Ee()},m(o,a){for(let u=0;u<e.length;u+=1)e[u].m(o,a);$(o,n,a),i=!0},p(o,a){a&15925&&(l=o[5],te(),e=xn(e,a,s,1,o,l,t,n.parentNode,jr,C8,n,v8),ne())},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(e[a]);i=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);i=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&b(n)}}}function Uoe(r){let e,t;return e=new zoe({props:{screenId:r[23].id}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&32&&(l.screenId=n[23].id),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function k8(r){let e,t;return e=new R1({props:{level:1,components:r[4].props._children,currentComponent:r[10],dragDropStore:r[12]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&16&&(l.components=n[4].props._children),i&1024&&(l.currentComponent=n[10]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function C8(r,e){var u,f;let t,n,i,l,s;function o(){return e[20](e[23])}n=new Tl({props:{icon:"WebPage",indentLevel:e[2]||1,selected:e[9].selectedScreenId===e[23].id&&e[9].currentView==="detail",opened:e[9].selectedScreenId===e[23].id,text:((u=e[11][e[23].route])==null?void 0:u[e[23].role])||e[23].route,withArrow:e[0].subpaths,$$slots:{default:[Uoe]},$$scope:{ctx:e}}}),n.$on("click",o);let a=((f=e[4])==null?void 0:f._id)===e[23].id&&k8(e);return{key:r,first:null,c(){t=Ee(),S(n.$$.fragment),i=R(),a&&a.c(),l=Ee(),this.first=t},m(c,p){$(c,t,p),A(n,c,p),$(c,i,p),a&&a.m(c,p),$(c,l,p),s=!0},p(c,p){var g,h;e=c;const d={};p&4&&(d.indentLevel=e[2]||1),p&544&&(d.selected=e[9].selectedScreenId===e[23].id&&e[9].currentView==="detail"),p&544&&(d.opened=e[9].selectedScreenId===e[23].id),p&32&&(d.text=((g=e[11][e[23].route])==null?void 0:g[e[23].role])||e[23].route),p&1&&(d.withArrow=e[0].subpaths),p&67108896&&(d.$$scope={dirty:p,ctx:e}),n.$set(d),((h=e[4])==null?void 0:h._id)===e[23].id?a?(a.p(e,p),p&48&&m(a,1)):(a=k8(e),a.c(),m(a,1),a.m(l.parentNode,l)):a&&(te(),_(a,1,1,()=>{a=null}),ne())},i(c){s||(m(n.$$.fragment,c),m(a),s=!0)},o(c){_(n.$$.fragment,c),_(a),s=!1},d(c){c&&b(t),E(n,c),c&&b(i),a&&a.d(c),c&&b(l)}}}function Foe(r){let e,t,n=!r[8]&&w8(r);return{c(){n&&n.c(),e=Ee()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,[l]){i[8]?n&&(te(),_(n,1,1,()=>{n=null}),ne()):n?(n.p(i,l),l&256&&m(n,1)):(n=w8(i),n.c(),m(n,1),n.m(e.parentNode,e))},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function Voe(r,e,t){let n,i,l,s,o,a,u,f,c,p,d;ue(r,Vf,z=>t(18,f=z)),ue(r,un,z=>t(19,c=z)),ue(r,He,z=>t(9,p=z)),ue(r,ri,z=>t(10,d=z));const g={"/":{BASIC:"Home",PUBLIC:"Home",ADMIN:"Home",POWER:"Home"}},h=u8();let{route:v}=e,{path:k}=e,{indent:C}=e,{border:I}=e,O=!1;const T=z=>{He.actions.screens.select(z)},P=z=>{let q=[];return Object.entries(z.subpaths).forEach(([H,Y])=>{Object.entries(Y.screens).forEach(([U,W])=>{q.push({id:W,route:H,role:U})})}),q},M=(z,q)=>z.filter(H=>!q||H.route.includes(q)),F=()=>{it(Vf)||t(15,O=!O)},j=z=>T(z.id);return r.$$set=z=>{"route"in z&&t(0,v=z.route),"path"in z&&t(1,k=z.path),"indent"in z&&t(2,C=z.indent),"border"in z&&t(3,I=z.border)},r.$$.update=()=>{var z;r.$$.dirty&524288&&t(4,n=c),r.$$.dirty&1&&t(6,i=P(v)),r.$$.dirty&262208&&t(5,l=M(i,f)),r.$$.dirty&262176&&t(16,s=f&&l.length>0),r.$$.dirty&262176&&t(8,o=f&&!l.length),r.$$.dirty&17&&t(17,a=v.subpaths[(z=n==null?void 0:n.routing)==null?void 0:z.route]!==void 0),r.$$.dirty&229376&&t(7,u=O||a||s)},[v,k,C,I,n,l,i,u,o,p,d,g,h,T,F,O,s,a,f,c,j]}class Hoe extends ie{constructor(e){super();le(this,e,Voe,Foe,re,{route:0,path:1,indent:2,border:3})}}function S8(r,e,t){const n=r.slice();return n[4]=e[t],n[6]=t,n}function A8(r,e){let t,n,i;return n=new Hoe({props:{border:e[6]>0,path:e[4],route:e[0][e[4]]}}),{key:r,first:null,c(){t=Ee(),S(n.$$.fragment),this.first=t},m(l,s){$(l,t,s),A(n,l,s),i=!0},p(l,s){e=l;const o={};s&2&&(o.border=e[6]>0),s&2&&(o.path=e[4]),s&3&&(o.route=e[0][e[4]]),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(t),E(n,l)}}}function E8(r){let e;return{c(){e=D("div"),e.textContent="There aren't any screens configured with this access role.",w(e,"class","empty svelte-1xoqjkm")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Woe(r){let e,t=[],n=new Map,i,l,s=r[1];const o=u=>u[4];for(let u=0;u<s.length;u+=1){let f=S8(r,s,u),c=o(f);n.set(c,t[u]=A8(c,f))}let a=!r[1].length&&E8();return{c(){var u;e=D("div");for(let f=0;f<t.length;f+=1)t[f].c();i=R(),a&&a.c(),w(e,"class","root svelte-1xoqjkm"),oe(e,"has-screens",!!((u=r[1])==null?void 0:u.length))},m(u,f){$(u,e,f);for(let c=0;c<t.length;c+=1)t[c].m(e,null);N(e,i),a&&a.m(e,null),l=!0},p(u,[f]){var c;f&3&&(s=u[1],te(),t=xn(t,f,o,1,u,s,n,e,jr,A8,i,S8),ne()),u[1].length?a&&(a.d(1),a=null):a||(a=E8(),a.c(),a.m(e,null)),f&2&&oe(e,"has-screens",!!((c=u[1])==null?void 0:c.length))},i(u){if(!l){for(let f=0;f<s.length;f+=1)m(t[f]);l=!0}},o(u){for(let f=0;f<t.length;f+=1)_(t[f]);l=!1},d(u){u&&b(e);for(let f=0;f<t.length;f+=1)t[f].d();a&&a.d()}}}function Goe(r,e,t){let n,i,l;ue(r,He,o=>t(2,i=o)),ue(r,Al,o=>t(3,l=o));let s={};return r.$$.update=()=>{if(r.$$.dirty&12){const o=i.routes,a=Object.keys(o||{}).sort(),u=l,f=i.selectedScreenId;let c=!1,p,d={},g;a.forEach(h=>{const v=o[h];Object.entries(v.subpaths).forEach(([k,C])=>{Object.entries(C.screens).forEach(([I,O])=>{O===f&&(g=I,c=I===u),I===u&&(p||(p=O),d[h]||(d[h]={subpaths:{}}),d[h].subpaths[k]={screens:{[u]:O}})})})}),t(0,s=d),!c&&g?Al.set(g):!c&&p&&He.actions.screens.select(p)}r.$$.dirty&1&&t(1,n=Object.keys(s||{}).sort())},[s,n,i,l]}class Yoe extends ie{constructor(e){super();le(this,e,Goe,Woe,re,{})}}function Joe(r){let e;return{c(){e=V("Edit")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Qoe(r){let e;return{c(){e=V("Delete")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Xoe(r){let e,t,n,i;return e=new Qt({props:{icon:"Edit",$$slots:{default:[Joe]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)}),n=new Qt({props:{icon:"Delete",$$slots:{default:[Qoe]},$$scope:{ctx:r}}}),n.$on("click",function(){mt(r[0].show)&&r[0].show.apply(this,arguments)}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(l,s){A(e,l,s),$(l,t,s),A(n,l,s),i=!0},p(l,s){r=l;const o={};s&512&&(o.$$scope={dirty:s,ctx:r}),e.$set(o);const a={};s&512&&(a.$$scope={dirty:s,ctx:r}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){E(e,l),l&&b(t),E(n,l)}}}function Koe(r){let e,t,n;return t=new ct({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","control"),w(e,"class","icon svelte-u6s22l")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p:Oe,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Zoe(r){let e,t,n;function i(s){r[7](s)}let l={thin:!0,type:"text",label:"Name"};return r[2]!==void 0&&(l.value=r[2]),e=new tt({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};!t&&o&4&&(t=!0,a.value=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){E(e,s)}}}function xoe(r){let e,t;return e=new Dt({props:{title:"Edit Layout Name",confirmText:"Save",onConfirm:r[4],disabled:!r[2],$$slots:{default:[Zoe]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.disabled=!n[2]),i&516&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function eae(r){let e,t,n,i,l,s;e=new yr({props:{$$slots:{control:[Koe],default:[Xoe]},$$scope:{ctx:r}}});let o={title:"Confirm Deletion",body:"Are you sure you wish to delete this layout?",okText:"Delete layout",onOk:r[3]};n=new hr({props:o}),r[6](n);let a={$$slots:{default:[xoe]},$$scope:{ctx:r}};return l=new Et({props:a}),r[8](l),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(u,f){A(e,u,f),$(u,t,f),A(n,u,f),$(u,i,f),A(l,u,f),s=!0},p(u,[f]){const c={};f&515&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};n.$set(p);const d={};f&516&&(d.$$scope={dirty:f,ctx:u}),l.$set(d)},i(u){s||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(l.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(l.$$.fragment,u),s=!1},d(u){E(e,u),u&&b(t),r[6](null),E(n,u),u&&b(i),r[8](null),E(l,u)}}}function tae(r,e,t){let{layout:n}=e,i,l,s=n.name;const o=async()=>{try{await He.actions.layouts.delete(n),we.success("Layout deleted successfully")}catch{we.error("Error deleting layout")}},a=async()=>{try{const p=vn.cloneDeep(n);p.name=s,await He.actions.layouts.save(p),we.success("Layout saved successfully")}catch{we.error("Error saving layout")}};function u(p){K[p?"unshift":"push"](()=>{i=p,t(0,i)})}function f(p){s=p,t(2,s)}function c(p){K[p?"unshift":"push"](()=>{l=p,t(1,l)})}return r.$$set=p=>{"layout"in p&&t(5,n=p.layout)},[i,l,s,o,a,n,u,f,c]}class nae extends ie{constructor(e){super();le(this,e,tae,eae,re,{layout:5})}}function rae(r){let e,t;return e=new nae({props:{layout:r[0]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.layout=n[0]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function O8(r){let e,t;return e=new R1({props:{components:r[0].props._children,currentComponent:r[3],dragDropStore:r[4]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.components=n[0].props._children),i&8&&(l.currentComponent=n[3]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function iae(r){var s;let e,t,n,i;e=new Tl({props:{border:r[1],icon:"ClassicGridView",text:r[0].name,withArrow:!0,selected:r[2].selectedLayoutId===r[0]._id,opened:r[2].selectedLayoutId===r[0]._id,$$slots:{default:[rae]},$$scope:{ctx:r}}}),e.$on("click",r[5]);let l=r[2].selectedLayoutId===r[0]._id&&((s=r[0].props)==null?void 0:s._children)&&O8(r);return{c(){S(e.$$.fragment),t=R(),l&&l.c(),n=Ee()},m(o,a){A(e,o,a),$(o,t,a),l&&l.m(o,a),$(o,n,a),i=!0},p(o,[a]){var f;const u={};a&2&&(u.border=o[1]),a&1&&(u.text=o[0].name),a&5&&(u.selected=o[2].selectedLayoutId===o[0]._id),a&5&&(u.opened=o[2].selectedLayoutId===o[0]._id),a&65&&(u.$$scope={dirty:a,ctx:o}),e.$set(u),o[2].selectedLayoutId===o[0]._id&&((f=o[0].props)==null?void 0:f._children)?l?(l.p(o,a),a&5&&m(l,1)):(l=O8(o),l.c(),m(l,1),l.m(n.parentNode,n)):l&&(te(),_(l,1,1,()=>{l=null}),ne())},i(o){i||(m(e.$$.fragment,o),m(l),i=!0)},o(o){_(e.$$.fragment,o),_(l),i=!1},d(o){E(e,o),o&&b(t),l&&l.d(o),o&&b(n)}}}function lae(r,e,t){let n,i;ue(r,He,u=>t(2,n=u)),ue(r,ri,u=>t(3,i=u));let{layout:l}=e,{border:s}=e;const o=u8(),a=()=>{He.actions.layouts.select(l._id)};return r.$$set=u=>{"layout"in u&&t(0,l=u.layout),"border"in u&&t(1,s=u.border)},[l,s,n,i,o,a]}class sae extends ie{constructor(e){super();le(this,e,lae,iae,re,{layout:0,border:1})}}function oae(r){let e,t,n;function i(s){r[2](s)}let l={thin:!0,label:"Name"};return r[0]!==void 0&&(l.value=r[0]),e=new tt({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};!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){E(e,s)}}}function aae(r){let e,t;return e=new Dt({props:{title:"Create Layout",confirmText:"Create",onConfirm:r[1],$$slots:{default:[oae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&9&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function uae(r,e,t){let n="";async function i(){try{await He.actions.layouts.save({name:n}),we.success(`Layout ${n} created successfully`)}catch{we.error("Error creating layout")}}function l(s){n=s,t(0,n)}return[n,i,l]}class fae extends ie{constructor(e){super();le(this,e,uae,aae,re,{})}}function T8(r,e,t){const n=r.slice();return n[19]=e[t],n[21]=t,n}function cae(r){let e,t,n,i,l;e=new Xe({props:{value:r[4],label:"Filter by Access",getOptionLabel:hae,getOptionValue:$ae,options:r[5]}}),e.$on("change",r[9]);function s(a){r[11](a)}let o={placeholder:"Enter a route to search",label:"Search Screens"};return r[6]!==void 0&&(o.value=r[6]),n=new Df({props:o}),K.push(()=>ce(n,"value",s)),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(a,u){A(e,a,u),$(a,t,u),A(n,a,u),l=!0},p(a,u){const f={};u&16&&(f.value=a[4]),u&32&&(f.options=a[5]),e.$set(f);const c={};!i&&u&64&&(i=!0,c.value=a[6],pe(()=>i=!1)),n.$set(c)},i(a){l||(m(e.$$.fragment,a),m(n.$$.fragment,a),l=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),l=!1},d(a){E(e,a),a&&b(t),E(n,a)}}}function pae(r){let e,t,n,i,l,s;return t=new Qe({props:{noPadding:!0,gap:"XS",$$slots:{default:[cae]},$$scope:{ctx:r}}}),l=new Yoe({}),{c(){e=D("div"),S(t.$$.fragment),n=R(),i=D("div"),S(l.$$.fragment),w(i,"class","nav-items-container svelte-1laltek"),w(e,"class","tab-content-padding svelte-1laltek")},m(o,a){$(o,e,a),A(t,e,null),N(e,n),N(e,i),A(l,i,null),r[12](i),s=!0},p(o,a){const u={};a&4194416&&(u.$$scope={dirty:a,ctx:o}),t.$set(u)},i(o){s||(m(t.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){o&&b(e),E(t),E(l),r[12](null)}}}function I8(r,e){let t,n,i;return n=new sae({props:{layout:e[19],border:e[21]>0}}),{key:r,first:null,c(){t=Ee(),S(n.$$.fragment),this.first=t},m(l,s){$(l,t,s),A(n,l,s),i=!0},p(l,s){e=l;const o={};s&128&&(o.layout=e[19]),s&128&&(o.border=e[21]>0),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(t),E(n,l)}}}function dae(r){let e,t;return e=new fae({}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function mae(r){let e,t,n,i=[],l=new Map,s,o,a,u=r[7].layouts;const f=p=>p[19]._id;for(let p=0;p<u.length;p+=1){let d=T8(r,u,p),g=f(d);l.set(g,i[p]=I8(g,d))}let c={$$slots:{default:[dae]},$$scope:{ctx:r}};return o=new Et({props:c}),r[14](o),{c(){e=D("div"),t=D("div"),n=D("div");for(let p=0;p<i.length;p+=1)i[p].c();s=R(),S(o.$$.fragment),w(n,"class","layouts-container svelte-1laltek"),w(t,"class","nav-items-container nav-items-container--layouts svelte-1laltek"),w(e,"class","tab-content-padding svelte-1laltek")},m(p,d){$(p,e,d),N(e,t),N(t,n);for(let g=0;g<i.length;g+=1)i[g].m(n,null);r[13](t),N(e,s),A(o,e,null),a=!0},p(p,d){d&128&&(u=p[7].layouts,te(),i=xn(i,d,f,1,p,u,l,n,jr,I8,null,T8),ne());const g={};d&4194304&&(g.$$scope={dirty:d,ctx:p}),o.$set(g)},i(p){if(!a){for(let d=0;d<u.length;d+=1)m(i[d]);m(o.$$.fragment,p),a=!0}},o(p){for(let d=0;d<i.length;d+=1)_(i[d]);_(o.$$.fragment,p),a=!1},d(p){p&&b(e);for(let d=0;d<i.length;d+=1)i[d].d();r[13](null),r[14](null),E(o)}}}function gae(r){let e,t,n,i;return e=new bn({props:{title:"Screens",$$slots:{default:[pae]},$$scope:{ctx:r}}}),n=new bn({props:{title:"Layouts",$$slots:{default:[mae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(l,s){A(e,l,s),$(l,t,s),A(n,l,s),i=!0},p(l,s){const o={};s&4194418&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&4194438&&(a.$$scope={dirty:s,ctx:l}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){E(e,l),l&&b(t),E(n,l)}}}function _ae(r){let e,t,n,i,l,s;return t=new Vr({props:{selected:r[3],$$slots:{default:[gae]},$$scope:{ctx:r}}}),t.$on("select",r[8]),l=new ct({props:{hoverable:!0,name:"AddCircle"}}),l.$on("click",function(){mt(r[3]==="Layouts"?r[2].show():r[0]())&&(r[3]==="Layouts"?r[2].show():r[0]()).apply(this,arguments)}),{c(){e=D("div"),S(t.$$.fragment),n=R(),i=D("div"),S(l.$$.fragment),w(i,"class","add-button svelte-1laltek"),w(e,"class","title svelte-1laltek")},m(o,a){$(o,e,a),A(t,e,null),N(e,n),N(e,i),A(l,i,null),s=!0},p(o,[a]){r=o;const u={};a&8&&(u.selected=r[3]),a&4194550&&(u.$$scope={dirty:a,ctx:r}),t.$set(u)},i(o){s||(m(t.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){o&&b(e),E(t),E(l)}}}const hae=r=>r.name,$ae=r=>r._id;function bae(r,e,t){let n,i,l,s,o,a,u,f;ue(r,Cs,P=>t(15,i=P)),ue(r,qt,P=>t(16,l=P)),ue(r,er,P=>t(10,s=P)),ue(r,Al,P=>t(4,o=P)),ue(r,Zi,P=>t(5,a=P)),ue(r,Vf,P=>t(6,u=P)),ue(r,He,P=>t(7,f=P));let{showModal:c}=e,p;Do("scroll",{scrollTo:P=>{if(!P)return;const M=259,F=32,{scrollLeft:j,scrollTop:z,offsetHeight:q}=p;let H=p.getBoundingClientRect(),Y={};const U=P.left+P.width+j+20;U>M?Y.left=U-M:Y.left=0,Y.left===j&&delete Y.left;const W=P.top-(H==null?void 0:H.top)+z;W>z+q-2*F?Y.top=W-q+2*F:W<z+F?Y.top=W-F:delete Y.top,!(Y.left==null&&Y.top==null)&&p.scroll(lt(Se({},Y),{behavior:"smooth"}))}});const g=[{title:"Screens",key:"screen"},{title:"Layouts",key:"layout"}];let h;const v=({detail:P})=>{const{key:M}=g.find(F=>F.title===P);l(`../${M}`)},k=P=>{var j;const M=P.detail,F=(j=i.find(z=>z.routing.roleId===M))==null?void 0:j._id;F?He.actions.screens.select(F):He.update(z=>(z.selectedScreenId=null,z)),Al.set(M)};Gt(async()=>{try{await He.actions.routing.fetch()}catch{we.error("Error fetching routes")}});function C(P){u=P,Vf.set(u)}function I(P){K[P?"unshift":"push"](()=>{p=P,t(1,p)})}function O(P){K[P?"unshift":"push"](()=>{p=P,t(1,p)})}function T(P){K[P?"unshift":"push"](()=>{h=P,t(2,h)})}return r.$$set=P=>{"showModal"in P&&t(0,c=P.showModal)},r.$$.update=()=>{var P;r.$$.dirty&1024&&t(3,n=((P=g.find(M=>M.key===s.assetType))==null?void 0:P.title)||"Screens")},[c,p,h,n,o,a,u,f,v,k,s,C,I,O,T]}class vae extends ie{constructor(e){super();le(this,e,bae,_ae,re,{showModal:0})}}function wae(r){let e,t,n;return t=new Xe({props:{value:r[0].theme,options:r[1],placeholder:null}}),t.$on("change",r[3]),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","svelte-12k7lrs")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,[l]){const s={};l&1&&(s.value=i[0].theme),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function yae(r,e,t){let n;ue(r,He,o=>t(0,n=o));const i=[{label:"Lightest",value:"spectrum--lightest"},{label:"Light",value:"spectrum--light"},{label:"Dark",value:"spectrum--dark"},{label:"Darkest",value:"spectrum--darkest"}],l=async o=>{try{await He.actions.theme.save(o),await He.actions.customTheme.save(lt(Se({},it(He).customTheme),{navBackground:o==="spectrum--light"?"var(--spectrum-global-color-gray-50)":"var(--spectrum-global-color-gray-100)"}))}catch{we.error("Error updating theme")}};return[n,i,l,o=>l(o.detail)]}class L8 extends ie{constructor(e){super();le(this,e,yae,wae,re,{})}}function kae(r){let e;return{c(){e=V("Theme")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Cae(r){let e;return{c(){e=V("Theme")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Sae(r){let e;return{c(){e=V("Button roundness")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Aae(r){let e;return{c(){e=V("Accent color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Eae(r){let e;return{c(){e=V("Accent color (hover)")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Oae(r){let e;return{c(){e=V("Navigation bar background color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Tae(r){let e;return{c(){e=V("Navigation bar text color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Iae(r){var G,Q,fe,Z,ee;let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C,I,O,T,P,M,F,j,z,q,H,Y,U,W;return t=new Ze({props:{size:"L",$$slots:{default:[Cae]},$$scope:{ctx:r}}}),i=new L8({}),o=new Ze({props:{size:"L",$$slots:{default:[Sae]},$$scope:{ctx:r}}}),f=new Xe({props:{placeholder:null,value:((G=r[1].customTheme)==null?void 0:G.buttonBorderRadius)||r[2].buttonBorderRadius,options:r[3]}}),f.$on("change",r[4]("buttonBorderRadius")),d=new Ze({props:{size:"L",$$slots:{default:[Aae]},$$scope:{ctx:r}}}),h=new Jl({props:{spectrumTheme:r[1].theme,value:((Q=r[1].customTheme)==null?void 0:Q.primaryColor)||r[2].primaryColor}}),h.$on("change",r[4]("primaryColor")),C=new Ze({props:{size:"L",$$slots:{default:[Eae]},$$scope:{ctx:r}}}),O=new Jl({props:{spectrumTheme:r[1].theme,value:((fe=r[1].customTheme)==null?void 0:fe.primaryColorHover)||r[2].primaryColorHover}}),O.$on("change",r[4]("primaryColorHover")),M=new Ze({props:{size:"L",$$slots:{default:[Oae]},$$scope:{ctx:r}}}),j=new Jl({props:{spectrumTheme:r[1].theme,value:((Z=r[1].customTheme)==null?void 0:Z.navBackground)||r[2].navBackground}}),j.$on("change",r[4]("navBackground")),H=new Ze({props:{size:"L",$$slots:{default:[Tae]},$$scope:{ctx:r}}}),U=new Jl({props:{spectrumTheme:r[1].theme,value:((ee=r[1].customTheme)==null?void 0:ee.navTextColor)||r[2].navTextColor}}),U.$on("change",r[4]("navTextColor")),{c(){e=D("div"),S(t.$$.fragment),n=R(),S(i.$$.fragment),l=R(),s=D("div"),S(o.$$.fragment),a=R(),u=D("div"),S(f.$$.fragment),c=R(),p=D("div"),S(d.$$.fragment),g=R(),S(h.$$.fragment),v=R(),k=D("div"),S(C.$$.fragment),I=R(),S(O.$$.fragment),T=R(),P=D("div"),S(M.$$.fragment),F=R(),S(j.$$.fragment),z=R(),q=D("div"),S(H.$$.fragment),Y=R(),S(U.$$.fragment),w(e,"class","setting svelte-16s1p8l"),w(u,"class","select-wrapper svelte-16s1p8l"),w(s,"class","setting svelte-16s1p8l"),w(p,"class","setting svelte-16s1p8l"),w(k,"class","setting svelte-16s1p8l"),w(P,"class","setting svelte-16s1p8l"),w(q,"class","setting svelte-16s1p8l")},m(ae,_e){$(ae,e,_e),A(t,e,null),N(e,n),A(i,e,null),$(ae,l,_e),$(ae,s,_e),A(o,s,null),N(s,a),N(s,u),A(f,u,null),$(ae,c,_e),$(ae,p,_e),A(d,p,null),N(p,g),A(h,p,null),$(ae,v,_e),$(ae,k,_e),A(C,k,null),N(k,I),A(O,k,null),$(ae,T,_e),$(ae,P,_e),A(M,P,null),N(P,F),A(j,P,null),$(ae,z,_e),$(ae,q,_e),A(H,q,null),N(q,Y),A(U,q,null),W=!0},p(ae,_e){var ye,Je,Nt,qe,pt;const Re={};_e&128&&(Re.$$scope={dirty:_e,ctx:ae}),t.$set(Re);const $e={};_e&128&&($e.$$scope={dirty:_e,ctx:ae}),o.$set($e);const be={};_e&2&&(be.value=((ye=ae[1].customTheme)==null?void 0:ye.buttonBorderRadius)||ae[2].buttonBorderRadius),f.$set(be);const he={};_e&128&&(he.$$scope={dirty:_e,ctx:ae}),d.$set(he);const Ne={};_e&2&&(Ne.spectrumTheme=ae[1].theme),_e&2&&(Ne.value=((Je=ae[1].customTheme)==null?void 0:Je.primaryColor)||ae[2].primaryColor),h.$set(Ne);const Fe={};_e&128&&(Fe.$$scope={dirty:_e,ctx:ae}),C.$set(Fe);const se={};_e&2&&(se.spectrumTheme=ae[1].theme),_e&2&&(se.value=((Nt=ae[1].customTheme)==null?void 0:Nt.primaryColorHover)||ae[2].primaryColorHover),O.$set(se);const Ce={};_e&128&&(Ce.$$scope={dirty:_e,ctx:ae}),M.$set(Ce);const me={};_e&2&&(me.spectrumTheme=ae[1].theme),_e&2&&(me.value=((qe=ae[1].customTheme)==null?void 0:qe.navBackground)||ae[2].navBackground),j.$set(me);const ke={};_e&128&&(ke.$$scope={dirty:_e,ctx:ae}),H.$set(ke);const ze={};_e&2&&(ze.spectrumTheme=ae[1].theme),_e&2&&(ze.value=((pt=ae[1].customTheme)==null?void 0:pt.navTextColor)||ae[2].navTextColor),U.$set(ze)},i(ae){W||(m(t.$$.fragment,ae),m(i.$$.fragment,ae),m(o.$$.fragment,ae),m(f.$$.fragment,ae),m(d.$$.fragment,ae),m(h.$$.fragment,ae),m(C.$$.fragment,ae),m(O.$$.fragment,ae),m(M.$$.fragment,ae),m(j.$$.fragment,ae),m(H.$$.fragment,ae),m(U.$$.fragment,ae),W=!0)},o(ae){_(t.$$.fragment,ae),_(i.$$.fragment,ae),_(o.$$.fragment,ae),_(f.$$.fragment,ae),_(d.$$.fragment,ae),_(h.$$.fragment,ae),_(C.$$.fragment,ae),_(O.$$.fragment,ae),_(M.$$.fragment,ae),_(j.$$.fragment,ae),_(H.$$.fragment,ae),_(U.$$.fragment,ae),W=!1},d(ae){ae&&b(e),E(t),E(i),ae&&b(l),ae&&b(s),E(o),E(f),ae&&b(c),ae&&b(p),E(d),E(h),ae&&b(v),ae&&b(k),E(C),E(O),ae&&b(T),ae&&b(P),E(M),E(j),ae&&b(z),ae&&b(q),E(H),E(U)}}}function Lae(r){let e,t;return e=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[Iae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&130&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Pae(r){let e;return{c(){e=V("Reset")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Nae(r){let e,t,n;return t=new gt({props:{secondary:!0,quiet:!0,$$slots:{default:[Pae]},$$scope:{ctx:r}}}),t.$on("click",r[5]),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","footer")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&128&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Rae(r){let e,t;return e=new Dt({props:{showConfirmButton:!1,cancelText:"View changes",showCloseIcon:!1,title:"Theme settings",$$slots:{footer:[Nae],default:[Lae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&130&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Mae(r){let e,t,n,i,l;t=new Jt({props:{icon:"Brush",$$slots:{default:[kae]},$$scope:{ctx:r}}}),t.$on("click",function(){mt(r[0].show)&&r[0].show.apply(this,arguments)});let s={$$slots:{default:[Rae]},$$scope:{ctx:r}};return i=new Et({props:s}),r[6](i),{c(){e=D("div"),S(t.$$.fragment),n=R(),S(i.$$.fragment),w(e,"class","container svelte-16s1p8l")},m(o,a){$(o,e,a),A(t,e,null),$(o,n,a),A(i,o,a),l=!0},p(o,[a]){r=o;const u={};a&128&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a&130&&(f.$$scope={dirty:a,ctx:r}),i.$set(f)},i(o){l||(m(t.$$.fragment,o),m(i.$$.fragment,o),l=!0)},o(o){_(t.$$.fragment,o),_(i.$$.fragment,o),l=!1},d(o){o&&b(e),E(t),o&&b(n),r[6](null),E(i,o)}}}function Dae(r,e,t){let n;ue(r,He,f=>t(1,n=f));let i;const l={primaryColor:"var(--spectrum-global-color-blue-600)",primaryColorHover:"var(--spectrum-global-color-blue-500)",buttonBorderRadius:"16px",navBackground:"var(--spectrum-global-color-gray-50)",navTextColor:"var(--spectrum-global-color-gray-800)"},s=[{label:"None",value:"0"},{label:"Small",value:"4px"},{label:"Medium",value:"8px"},{label:"Large",value:"16px"}],o=f=>async c=>{try{He.actions.customTheme.save(lt(Se({},it(He).customTheme),{[f]:c.detail}))}catch{we.error("Error updating custom theme")}},a=()=>{try{const f=it(He).theme;He.actions.customTheme.save(lt(Se({},l),{navBackground:f==="spectrum--light"?"var(--spectrum-global-color-gray-50)":"var(--spectrum-global-color-gray-100)"}))}catch{we.error("Error saving custom theme")}};function u(f){K[f?"unshift":"push"](()=>{i=f,t(0,i)})}return[i,n,l,s,o,a,u]}class jae extends ie{constructor(e){super();le(this,e,Dae,Mae,re,{})}}function Bae(r){let e,t,n,i,l,s;return e=new Jt({props:{icon:"DeviceDesktop",selected:r[0].previewDevice==="desktop"}}),e.$on("click",r[1]),n=new Jt({props:{icon:"DeviceTablet",selected:r[0].previewDevice==="tablet"}}),n.$on("click",r[2]),l=new Jt({props:{icon:"DevicePhone",selected:r[0].previewDevice==="mobile"}}),l.$on("click",r[3]),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(o,a){A(e,o,a),$(o,t,a),A(n,o,a),$(o,i,a),A(l,o,a),s=!0},p(o,a){const u={};a&1&&(u.selected=o[0].previewDevice==="desktop"),e.$set(u);const f={};a&1&&(f.selected=o[0].previewDevice==="tablet"),n.$set(f);const c={};a&1&&(c.selected=o[0].previewDevice==="mobile"),l.$set(c)},i(o){s||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){E(e,o),o&&b(t),E(n,o),o&&b(i),E(l,o)}}}function zae(r){let e,t;return e=new gh({props:{compact:!0,$$slots:{default:[Bae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&17&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function qae(r,e,t){let n;return ue(r,He,o=>t(0,n=o)),[n,()=>He.actions.preview.setDevice("desktop"),()=>He.actions.preview.setDevice("tablet"),()=>He.actions.preview.setDevice("mobile")]}class Uae extends ie{constructor(e){super();le(this,e,qae,zae,re,{})}}var P8="/builder/assets/bb-space-man.5be51a45.svg";function Fae(r){return r.map(e=>({name:`${e.name} - Detail`,create:()=>Gae(e),id:Vae,table:e.name}))}const Vae="ROW_DETAIL_TEMPLATE",Hae=r=>As(`/${r.name}/:id`);function Wae(r,e,t,n){const i=f6(r,t),l=new Jn("@budibase/standard-components/button").text("Delete").customProps({type:"secondary",quiet:!0,size:"M",onClick:[{parameters:{tableId:r._id,rowId:`{{ ${$n(n)}.${$n("_id")} }}`,revId:`{{ ${$n(n)}.${$n("_rev")} }}`,confirm:!0},"##eventHandlerType":"Delete Row"},{parameters:{url:Kf(r)},"##eventHandlerType":"Navigate To"}]}).instanceName("Delete Button"),s=new Jn("@budibase/standard-components/container").instanceName("Button Container").customProps({direction:"row",hAlign:"right",vAlign:"middle",size:"shrink",gap:"M"}).addChild(l).addChild(i);return c6(e).addChild(s)}const Gae=r=>{const e=new Jn("@budibase/standard-components/dataprovider").instanceName("Data Provider").customProps({dataSource:{label:r.name,name:r._id,tableId:r._id,type:"table"},filter:[{field:"_id",operator:"equal",type:"string",value:`{{ ${$n("url")}.${$n("id")} }}`,valueType:"Binding"}],limit:1,paginate:!1}),t=new Jn("@budibase/standard-components/repeater").instanceName("Repeater").customProps({dataProvider:`{{ literal ${$n(e._json._id)} }}`,noRowsMessage:"We couldn't find a row to display"}),n=a6().instanceName("Form").customProps({actionType:"Update",size:"spectrum--medium",dataSource:{label:r.name,tableId:r._id,type:"table"}}),i=new Jn("@budibase/standard-components/fieldgroup").instanceName("Field Group").customProps({labelPosition:"left"}),l={type:"table",tableId:r._id};S1(l).forEach(u=>{i.addChild(u)});const s=n._json._id,o=t._json._id,a=r.primaryDisplay?`{{ ${$n(o)}.${$n(r.primaryDisplay)} }}`:null;return n.addChild(u6(r.name,a||"Edit")).addChild(Wae(r,a||"Edit Row",s,o)).addChild(i),t.addChild(n),e.addChild(t),new Ia().instanceName(`${r.name} - Detail`).route(Hae(r)).customProps({hAlign:"center"}).addChild(e).json()};var Yae={name:"Create from scratch",id:"createFromScratch",create:()=>Jae(),table:"Create from scratch"};const Jae=()=>new Ia().instanceName("New Screen").json(),Qae=r=>[...Kx(r),...Fae(r),...tee(r)],Xae=(r,e)=>()=>{const t=e.create();return t.name=t.props._id,t.routing.route=t.routing.route.toLowerCase(),t.template=e.id,t};var N8=(r,e)=>{const t=l=>lt(Se({},l),{create:Xae(r,l)}),n=t(Yae),i=Qae(e).map(t);return[n,...i.sort((l,s)=>l.name>s.name?1:-1)]};function R8(r,e,t){const n=r.slice();return n[17]=e[t],n}function Kae(r){let e;return{c(){e=V(`Please select the screens you would like to add to your application.
|
|
1228
|
+
and their appearance, by adding them below.`)},m(i,l){$(i,e,l),$(i,t,l),$(i,n,l)},d(i){i&&b(e),i&&b(t),i&&b(n)}}}function Ole(r){let e;return{c(){e=V("Column")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Tle(r){let e;return{c(){e=V("Label")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Rw(r,e){let t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C,I=Oe,O,T,P;i=new ct({props:{name:"DragHandle",size:"XL"}});function M(W){e[12](W,e[19])}function F(...W){return e[13](e[19],e[20],e[21],...W)}let j={placeholder:"Column",options:e[2](e[19].name)};e[19].name!==void 0&&(j.value=e[19].name),o=new Xe({props:j}),K.push(()=>ce(o,"value",M)),o.$on("change",F);function z(W){e[14](W,e[19])}let q={placeholder:"Label"};e[19].displayName!==void 0&&(q.value=e[19].displayName),f=new tt({props:q}),K.push(()=>ce(f,"value",z));function H(W){e[15](W,e[19],e[20],e[21])}let Y={};e[19]!==void 0&&(Y.column=e[19]),d=new Cle({props:Y}),K.push(()=>ce(d,"column",H));function U(){return e[16](e[19])}return v=new ct({props:{name:"Close",hoverable:!0,size:"S",disabled:e[0].length===1}}),v.$on("click",U),{key:r,first:null,c(){t=D("div"),n=D("div"),S(i.$$.fragment),s=R(),S(o.$$.fragment),u=R(),S(f.$$.fragment),p=R(),S(d.$$.fragment),h=R(),S(v.$$.fragment),k=R(),w(n,"class","handle svelte-r88m8w"),w(n,"aria-label","drag-handle"),w(n,"style",l=e[1]?"cursor: grab":"cursor: grabbing"),w(t,"class","column svelte-r88m8w"),this.first=t},m(W,G){$(W,t,G),N(t,n),A(i,n,null),N(t,s),A(o,t,null),N(t,u),A(f,t,null),N(t,p),A(d,t,null),N(t,h),A(v,t,null),N(t,k),O=!0,T||(P=Pe(n,"mousedown",e[11]),T=!0)},p(W,G){e=W,(!O||G&2&&l!==(l=e[1]?"cursor: grab":"cursor: grabbing"))&&w(n,"style",l);const Q={};G&1&&(Q.options=e[2](e[19].name)),!a&&G&1&&(a=!0,Q.value=e[19].name,pe(()=>a=!1)),o.$set(Q);const fe={};!c&&G&1&&(c=!0,fe.value=e[19].displayName,pe(()=>c=!1)),f.$set(fe);const Z={};!g&&G&1&&(g=!0,Z.column=e[19],pe(()=>g=!1)),d.$set(Z);const ee={};G&1&&(ee.disabled=e[0].length===1),v.$set(ee)},r(){C=t.getBoundingClientRect()},f(){zo(t),I()},a(){I(),I=qo(t,C,Uo,{duration:L1})},i(W){O||(m(i.$$.fragment,W),m(o.$$.fragment,W),m(f.$$.fragment,W),m(d.$$.fragment,W),m(v.$$.fragment,W),O=!0)},o(W){_(i.$$.fragment,W),_(o.$$.fragment,W),_(f.$$.fragment,W),_(d.$$.fragment,W),_(v.$$.fragment,W),O=!1},d(W){W&&b(t),E(i),E(o),E(f),E(d),E(v),T=!1,P()}}}function Ile(r){let e,t,n,i,l,s,o,a,u,f,c,p,d=[],g=new Map,h,v,k,C;i=new Ze({props:{size:"L",$$slots:{default:[Ole]},$$scope:{ctx:r}}}),s=new Ze({props:{size:"L",$$slots:{default:[Tle]},$$scope:{ctx:r}}});let I=r[0];const O=T=>T[19].id;for(let T=0;T<I.length;T+=1){let P=Nw(r,I,T),M=O(P);g.set(M,d[T]=Rw(M,P))}return{c(){e=D("div"),t=D("div"),n=R(),S(i.$$.fragment),l=R(),S(s.$$.fragment),o=R(),a=D("div"),u=R(),f=D("div"),c=R(),p=D("div");for(let T=0;T<d.length;T+=1)d[T].c();w(e,"class","column svelte-r88m8w"),w(p,"class","columns svelte-r88m8w")},m(T,P){$(T,e,P),N(e,t),N(e,n),A(i,e,null),N(e,l),A(s,e,null),N(e,o),N(e,a),N(e,u),N(e,f),$(T,c,P),$(T,p,P);for(let M=0;M<d.length;M+=1)d[M].m(p,null);v=!0,k||(C=[wr(h=Iu.call(null,p,{items:r[0],flipDurationMs:L1,dropTargetStyle:{outline:"none"},dragDisabled:r[1]})),Pe(p,"finalize",r[6]),Pe(p,"consider",r[5])],k=!0)},p(T,P){const M={};P&4194304&&(M.$$scope={dirty:P,ctx:T}),i.$set(M);const F={};if(P&4194304&&(F.$$scope={dirty:P,ctx:T}),s.$set(F),P&23){I=T[0],te();for(let j=0;j<d.length;j+=1)d[j].r();d=xn(d,P,O,1,T,I,g,p,Bo,Rw,null,Nw);for(let j=0;j<d.length;j+=1)d[j].a();ne()}h&&mt(h.update)&&P&3&&h.update.call(null,{items:T[0],flipDurationMs:L1,dropTargetStyle:{outline:"none"},dragDisabled:T[1]})},i(T){if(!v){m(i.$$.fragment,T),m(s.$$.fragment,T);for(let P=0;P<I.length;P+=1)m(d[P]);v=!0}},o(T){_(i.$$.fragment,T),_(s.$$.fragment,T);for(let P=0;P<d.length;P+=1)_(d[P]);v=!1},d(T){T&&b(e),E(i),E(s),T&&b(c),T&&b(p);for(let P=0;P<d.length;P+=1)d[P].d();k=!1,Tn(C)}}}function Lle(r){let e;return{c(){e=V("Add column")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ple(r){let e;return{c(){e=V("Add all columns")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Mw(r){let e,t;return e=new gt({props:{secondary:!0,quiet:!0,$$slots:{default:[Nle]},$$scope:{ctx:r}}}),e.$on("click",r[8]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4194304&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Nle(r){let e;return{c(){e=V("Reset columns")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Rle(r){var h;let e,t,n,i,l,s,o,a,u,f;const c=[Ale,Sle],p=[];function d(v,k){var C;return((C=v[0])==null?void 0:C.length)?0:1}e=d(r),t=p[e]=c[e](r),s=new gt({props:{secondary:!0,icon:"Add",$$slots:{default:[Lle]},$$scope:{ctx:r}}}),s.$on("click",r[3]),a=new gt({props:{secondary:!0,quiet:!0,$$slots:{default:[Ple]},$$scope:{ctx:r}}}),a.$on("click",r[7]);let g=((h=r[0])==null?void 0:h.length)&&Mw(r);return{c(){t.c(),n=R(),i=D("div"),l=D("div"),S(s.$$.fragment),o=R(),S(a.$$.fragment),u=R(),g&&g.c(),w(l,"class","buttons wide svelte-r88m8w"),w(i,"class","column svelte-r88m8w")},m(v,k){p[e].m(v,k),$(v,n,k),$(v,i,k),N(i,l),A(s,l,null),N(l,o),A(a,l,null),N(l,u),g&&g.m(l,null),f=!0},p(v,k){var T;let C=e;e=d(v),e===C?p[e].p(v,k):(te(),_(p[C],1,1,()=>{p[C]=null}),ne(),t=p[e],t?t.p(v,k):(t=p[e]=c[e](v),t.c()),m(t,1),t.m(n.parentNode,n));const I={};k&4194304&&(I.$$scope={dirty:k,ctx:v}),s.$set(I);const O={};k&4194304&&(O.$$scope={dirty:k,ctx:v}),a.$set(O),((T=v[0])==null?void 0:T.length)?g?(g.p(v,k),k&1&&m(g,1)):(g=Mw(v),g.c(),m(g,1),g.m(l,null)):g&&(te(),_(g,1,1,()=>{g=null}),ne())},i(v){f||(m(t),m(s.$$.fragment,v),m(a.$$.fragment,v),m(g),f=!0)},o(v){_(t),_(s.$$.fragment,v),_(a.$$.fragment,v),_(g),f=!1},d(v){p[e].d(v),v&&b(n),v&&b(i),E(s),E(a),g&&g.d()}}}function Mle(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[Rle]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","container svelte-r88m8w")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&4194307&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Dle(r){let e,t;return e=new Ai({props:{$$slots:{default:[Mle]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&4194307&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}const L1=150;function jle(r,e,t){let n,{columns:i=[]}=e,{options:l=[]}=e,{schema:s={}}=e,o=!0;const a=(P,M)=>{let F={};return P.forEach(j=>{F[j]=!0}),M==null||M.forEach(j=>{delete F[j.name]}),Object.keys(F)},u=P=>!P||n.includes(P)?n:[P,...n],f=()=>{t(0,i=[...i,{}])},c=P=>{t(0,i=i.filter(M=>M.id!==P))},p=P=>{t(0,i=P.detail.items)},d=P=>{p(P),t(1,o=!0)},g=()=>{let P=i||[];l.forEach(M=>{const F=s[M],j=i&&i.findIndex(z=>z.name===M)!==-1;!(F==null?void 0:F.autocolumn)&&!j&&P.push({name:M,displayName:M})}),t(0,i=P)},h=()=>{t(0,i=[])},v=()=>t(1,o=!1);function k(P,M){r.$$.not_equal(M.name,P)&&(M.name=P,t(0,i))}const C=(P,M,F,j)=>t(0,M[F].displayName=j.detail,i);function I(P,M){r.$$.not_equal(M.displayName,P)&&(M.displayName=P,t(0,i))}function O(P,M,F,j){F[j]=P,t(0,i)}const T=P=>c(P.id);return r.$$set=P=>{"columns"in P&&t(0,i=P.columns),"options"in P&&t(9,l=P.options),"schema"in P&&t(10,s=P.schema)},r.$$.update=()=>{r.$$.dirty&513&&(n=a(l,i)),r.$$.dirty&1&&i.forEach(P=>{P.id||(P.id=Br.generate())})},[i,o,u,f,c,p,d,g,h,l,s,v,k,C,I,O,T]}class Ble extends ie{constructor(e){super();le(this,e,jle,Dle,re,{columns:0,options:9,schema:10})}}function zle(r){let e;return{c(){e=V("Configure columns")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function qle(r){let e;return{c(){e=V("Configure the columns in your table.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ule(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Fle(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[Ule]},$$scope:{ctx:r}}}),e.$on("click",r[5]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&131072&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Vle(r){let e,t,n;function i(s){r[11](s)}let l={slot:"body",options:r[0],schema:r[1]};return r[3]!==void 0&&(l.columns=r[3]),e=new Ble({props:l}),K.push(()=>ce(e,"columns",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};o&1&&(a.options=s[0]),o&2&&(a.schema=s[1]),!t&&o&8&&(t=!0,a.columns=s[3],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Hle(r){let e,t,n,i;e=new Jt({props:{$$slots:{default:[zle]},$$scope:{ctx:r}}}),e.$on("click",r[4]);let l={title:"Table Columns",$$slots:{body:[Vle],buttons:[Fle],description:[qle]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[12](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){const a={};o&131072&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const u={};o&131083&&(u.$$scope={dirty:o,ctx:s}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[12](null),E(n,s)}}}function Wle(r,e,t){let n,i,l,s,o;ue(r,un,O=>t(10,o=O));let{componentInstance:a}=e,{value:u=[]}=e;const f=ht();let c,p;const d=(O,T)=>{const P=Di(O,T).schema;return P&&(delete P._id,delete P._rev),P},g=O=>{t(3,p=vn.cloneDeep(O))},h=(O,T)=>!Array.isArray(O)||!O.length?[]:(typeof O[0]=="string"&&(O=O.map(P=>({name:P,displayName:P}))),O.filter(P=>T.includes(P.name))),v=()=>{g(s),c.show()},k=()=>{f("change",h(p,l)),c.hide()};function C(O){p=O,t(3,p)}function I(O){K[O?"unshift":"push"](()=>{c=O,t(2,c)})}return r.$$set=O=>{"componentInstance"in O&&t(6,a=O.componentInstance),"value"in O&&t(7,u=O.value)},r.$$.update=()=>{r.$$.dirty&1088&&t(9,n=El(o,a)),r.$$.dirty&1536&&t(1,i=d(o,n)),r.$$.dirty&2&&t(0,l=Object.keys(i||{})),r.$$.dirty&129&&t(8,s=h(u,l)),r.$$.dirty&256&&g(s)},[l,i,c,p,v,k,a,u,s,n,o,C,I]}class Gle extends ie{constructor(e){super();le(this,e,Wle,Hle,re,{componentInstance:6,value:7})}}const Yle={text:kw,select:Xe,dataSource:j6,"dataSource/s3":Tee,dataProvider:Nee,boolean:Zr,number:k_,event:ire,table:are,color:O1,icon:vre,field:kre,multifield:Are,searchfield:Tre,options:Iie,schema:Pre,section:zre,navigation:xre,filter:sie,url:gie,columns:Gle,"field/string":tl,"field/number":tl,"field/options":tl,"field/boolean":tl,"field/longform":tl,"field/datetime":tl,"field/attachment":tl,"field/link":tl,"field/array":tl,"field/json":tl,"validation/string":Es,"validation/array":Es,"validation/number":Es,"validation/boolean":Es,"validation/datetime":Es,"validation/attachment":Es,"validation/link":Es},xf=r=>Yle[r];function Dw(r,e,t){const n=r.slice();return n[15]=e[t],n[17]=t,n}function jw(r,e,t){const n=r.slice();return n[18]=e[t],n}function Bw(r){let e,t;return e=new La({props:{control:tt,label:"Name",key:"_instanceName",value:r[1]._instanceName,onChange:r[9]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.value=n[1]._instanceName),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function zw(r){var i,l;let e,t;function n(...s){return r[10](r[18],...s)}return e=new La({props:{type:r[18].type,control:xf(r[18].type),label:r[18].label,key:r[18].key,value:(l=r[1][r[18].key])!=null?l:(i=r[1][r[18].key])==null?void 0:i.defaultValue,nested:r[18].nested,onChange:n,props:{options:r[18].options||[],placeholder:r[18].placeholder||null,min:r[18].min||null,max:r[18].max||null},bindings:r[2],componentBindings:r[3],componentInstance:r[1],componentDefinition:r[0]}}),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),t=!0},p(s,o){var u,f;r=s;const a={};o&16&&(a.type=r[18].type),o&16&&(a.control=xf(r[18].type)),o&16&&(a.label=r[18].label),o&16&&(a.key=r[18].key),o&18&&(a.value=(f=r[1][r[18].key])!=null?f:(u=r[1][r[18].key])==null?void 0:u.defaultValue),o&16&&(a.nested=r[18].nested),o&16&&(a.onChange=n),o&16&&(a.props={options:r[18].options||[],placeholder:r[18].placeholder||null,min:r[18].min||null,max:r[18].max||null}),o&4&&(a.bindings=r[2]),o&8&&(a.componentBindings=r[3]),o&2&&(a.componentInstance=r[1]),o&1&&(a.componentDefinition=r[0]),e.$set(a)},i(s){t||(m(e.$$.fragment,s),t=!0)},o(s){_(e.$$.fragment,s),t=!1},d(s){E(e,s)}}}function qw(r,e){let t,n=e[6](e[18]),i,l,s=n&&zw(e);return{key:r,first:null,c(){t=Ee(),s&&s.c(),i=Ee(),this.first=t},m(o,a){$(o,t,a),s&&s.m(o,a),$(o,i,a),l=!0},p(o,a){e=o,a&16&&(n=e[6](e[18])),n?s?(s.p(e,a),a&16&&m(s,1)):(s=zw(e),s.c(),m(s,1),s.m(i.parentNode,i)):s&&(te(),_(s,1,1,()=>{s=null}),ne())},i(o){l||(m(s),l=!0)},o(o){_(s),l=!1},d(o){o&&b(t),s&&s.d(o),o&&b(i)}}}function Uw(r){let e,t;return e=new fee({props:{componentInstance:r[1]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.componentInstance=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Fw(r){let e,t=r[15].info+"";return{c(){e=D("div"),w(e,"class","text svelte-1hyi8iv")},m(n,i){$(n,e,i),e.innerHTML=t},p(n,i){i&16&&t!==(t=n[15].info+"")&&(e.innerHTML=t)},d(n){n&&b(e)}}}function Jle(r){var h,v,k;let e=r[17]===0&&!r[1]._component.endsWith("/layout"),t,n=[],i=new Map,l,s=r[17]===0&&((v=(h=r[0])==null?void 0:h.component)==null?void 0:v.endsWith("/fieldgroup")),o,a,u,f=e&&Bw(r),c=r[15].settings;const p=C=>C[18].key;for(let C=0;C<c.length;C+=1){let I=jw(r,c,C),O=p(I);i.set(O,n[C]=qw(O,I))}let d=s&&Uw(r),g=((k=r[15])==null?void 0:k.info)&&Fw(r);return{c(){f&&f.c(),t=R();for(let C=0;C<n.length;C+=1)n[C].c();l=R(),d&&d.c(),o=R(),g&&g.c(),a=R()},m(C,I){f&&f.m(C,I),$(C,t,I);for(let O=0;O<n.length;O+=1)n[O].m(C,I);$(C,l,I),d&&d.m(C,I),$(C,o,I),g&&g.m(C,I),$(C,a,I),u=!0},p(C,I){var O,T,P;I&18&&(e=C[17]===0&&!C[1]._component.endsWith("/layout")),e?f?(f.p(C,I),I&18&&m(f,1)):(f=Bw(C),f.c(),m(f,1),f.m(t.parentNode,t)):f&&(te(),_(f,1,1,()=>{f=null}),ne()),I&127&&(c=C[15].settings,te(),n=xn(n,I,p,1,C,c,i,l.parentNode,jr,qw,l,jw),ne()),I&17&&(s=C[17]===0&&((T=(O=C[0])==null?void 0:O.component)==null?void 0:T.endsWith("/fieldgroup"))),s?d?(d.p(C,I),I&17&&m(d,1)):(d=Uw(C),d.c(),m(d,1),d.m(o.parentNode,o)):d&&(te(),_(d,1,1,()=>{d=null}),ne()),((P=C[15])==null?void 0:P.info)?g?g.p(C,I):(g=Fw(C),g.c(),g.m(a.parentNode,a)):g&&(g.d(1),g=null)},i(C){if(!u){m(f);for(let I=0;I<c.length;I+=1)m(n[I]);m(d),u=!0}},o(C){_(f);for(let I=0;I<n.length;I+=1)_(n[I]);_(d),u=!1},d(C){f&&f.d(C),C&&b(t);for(let I=0;I<n.length;I+=1)n[I].d(C);C&&b(l),d&&d.d(C),C&&b(o),g&&g.d(C),C&&b(a)}}}function Vw(r,e){let t,n,i;return n=new Vo({props:{name:e[15].name,collapsible:!1,$$slots:{default:[Jle]},$$scope:{ctx:e}}}),{key:r,first:null,c(){t=Ee(),S(n.$$.fragment),this.first=t},m(l,s){$(l,t,s),A(n,l,s),i=!0},p(l,s){e=l;const o={};s&16&&(o.name=e[15].name),s&2097183&&(o.$$scope={dirty:s,ctx:e}),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(t),E(n,l)}}}function Qle(r){let e=[],t=new Map,n,i,l=r[4];const s=o=>o[15].name;for(let o=0;o<l.length;o+=1){let a=Dw(r,l,o),u=s(a);t.set(u,e[o]=Vw(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=Ee()},m(o,a){for(let u=0;u<e.length;u+=1)e[u].m(o,a);$(o,n,a),i=!0},p(o,[a]){a&127&&(l=o[4],te(),e=xn(e,a,s,1,o,l,t,n.parentNode,jr,Vw,n,Dw),ne())},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(e[a]);i=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);i=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&b(n)}}}function Xle(r,e,t){let n,i,{componentDefinition:l}=e,{componentInstance:s}=e,{assetInstance:o}=e,{bindings:a}=e,{componentBindings:u}=e;const f=h=>{var I;const v=(I=h==null?void 0:h.settings)!=null?I:[],k=v.filter(O=>!O.section),C=v.filter(O=>O.section);return[{name:(l==null?void 0:l.name)||"General",info:l==null?void 0:l.info,settings:k},...C||[]]},c=dj(async(h,v)=>{try{await He.actions.components.updateProp(h,v)}catch{we.error("Error updating component prop")}}),p=h=>{if(!xf(h==null?void 0:h.type))return!1;if(h.dependsOn){let k=h.dependsOn,C=null;if(typeof h.dependsOn=="object"&&(k=h.dependsOn.setting,C=h.dependsOn.value),!k)return!1;if(C==null){const I=s[k];return I===!1?!1:I===!0?!0:!vn.isEmpty(I)}return s[k]===C}return!0},d=h=>c("_instanceName",h),g=(h,v)=>c(h.key,v);return r.$$set=h=>{"componentDefinition"in h&&t(0,l=h.componentDefinition),"componentInstance"in h&&t(1,s=h.componentInstance),"assetInstance"in h&&t(7,o=h.assetInstance),"bindings"in h&&t(2,a=h.bindings),"componentBindings"in h&&t(3,u=h.componentBindings)},r.$$.update=()=>{r.$$.dirty&1&&t(4,n=f(l)),r.$$.dirty&128&&t(8,i=o&&o.favicon),r.$$.dirty&256},[l,s,a,u,n,c,p,o,i,d,g]}class Kle extends ie{constructor(e){super();le(this,e,Xle,Qle,re,{componentDefinition:0,componentInstance:1,assetInstance:7,bindings:2,componentBindings:3})}}function Hw(r,e,t){const n=r.slice();return n[11]=e[t],n}function Ww(r,e){let t,n,i,l;function s(...o){return e[10](e[11],...o)}return n=new La({props:{label:`${e[11].label}${e[7](e[5],e[11])?" *":""}`,control:e[11].control,key:e[11].key,value:e[5][e[11].key],onChange:s,props:e[8](e[11]),bindings:e[4]}}),{key:r,first:null,c(){t=D("div"),S(n.$$.fragment),i=R(),zt(t,"grid-column",e[11].column||"auto"),this.first=t},m(o,a){$(o,t,a),A(n,t,null),N(t,i),l=!0},p(o,a){e=o;const u={};a&36&&(u.label=`${e[11].label}${e[7](e[5],e[11])?" *":""}`),a&4&&(u.control=e[11].control),a&4&&(u.key=e[11].key),a&36&&(u.value=e[5][e[11].key]),a&4&&(u.onChange=s),a&4&&(u.props=e[8](e[11])),a&16&&(u.bindings=e[4]),n.$set(u),(!l||a&4)&&zt(t,"grid-column",e[11].column||"auto")},i(o){l||(m(n.$$.fragment,o),l=!0)},o(o){_(n.$$.fragment,o),l=!1},d(o){o&&b(t),E(n)}}}function Zle(r){let e,t=[],n=new Map,i,l=r[2];const s=o=>`${o[3]._id}-${o[11].key}-${o[11].label}`;for(let o=0;o<l.length;o+=1){let a=Hw(r,l,o),u=s(a);n.set(u,t[o]=Ww(u,a))}return{c(){e=D("div");for(let o=0;o<t.length;o+=1)t[o].c();w(e,"class","group-content svelte-1u21n8y"),zt(e,"grid-template-columns",r[1]||"1fr")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,a){a&956&&(l=o[2],te(),t=xn(t,a,s,1,o,l,n,e,jr,Ww,null,Hw),ne()),(!i||a&2)&&zt(e,"grid-template-columns",o[1]||"1fr")},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function xle(r){let e,t;return e=new Vo({props:{collapsible:!1,name:`${r[0]}${r[6]?" *":""}`,$$slots:{default:[Zle]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&65&&(l.name=`${n[0]}${n[6]?" *":""}`),i&16438&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function ese(r,e,t){let n,i,{name:l}=e,{columns:s}=e,{properties:o}=e,{componentInstance:a}=e,{bindings:u=[]}=e;const f=(g,h)=>g[h.key]!=null&&g[h.key]!=="",c=g=>{let h=Se({},g||{});return delete h.label,delete h.key,delete h.control,h},p=async(g,h)=>{try{await He.actions.components.updateStyle(g,h)}catch{we.error("Error updating style")}},d=(g,h)=>p(g.key,h);return r.$$set=g=>{"name"in g&&t(0,l=g.name),"columns"in g&&t(1,s=g.columns),"properties"in g&&t(2,o=g.properties),"componentInstance"in g&&t(3,a=g.componentInstance),"bindings"in g&&t(4,u=g.bindings)},r.$$.update=()=>{var g;r.$$.dirty&8&&t(5,n=a._styles.normal||{}),r.$$.dirty&36&&t(6,i=(g=o==null?void 0:o.some(h=>f(n,h)))!=null?g:!1)},[l,s,o,a,u,n,i,f,c,p,d]}class tse extends ie{constructor(e){super();le(this,e,ese,xle,re,{name:0,columns:1,properties:2,componentInstance:3,bindings:4})}}const Gw={label:"Margin",columns:"1fr 1fr",settings:[{label:"Top",key:"margin-top",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Right",key:"margin-right",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Bottom",key:"margin-bottom",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Left",key:"margin-left",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]}]},nse={label:"Padding",columns:"1fr 1fr",settings:[{label:"Top",key:"padding-top",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Right",key:"padding-right",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Bottom",key:"padding-bottom",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Left",key:"padding-left",control:Xe,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]}]},rse={label:"Size",columns:"1fr 1fr",settings:[{label:"Width",key:"width",control:tt,placeholder:"Auto"},{label:"Height",key:"height",control:tt,placeholder:"Auto"}]},ise={label:"Background",columns:"auto 1fr",settings:[{label:"Color",key:"background",control:O1},{label:"Gradient",key:"background-image",control:Xe,options:[{label:"Warm Flame",value:"linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);"},{label:"Night Fade",value:"linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);"},{label:"Spring Warmth",value:"linear-gradient(to top, #fad0c4 0%, #ffd1ff 100%);"},{label:"Sunny Morning",value:"linear-gradient(120deg, #f6d365 0%, #fda085 100%);"},{label:"Winter Neva",value:"linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);"},{label:"Tempting Azure",value:"linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);"},{label:"Heavy Rain",value:"linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);"},{label:"Deep Blue",value:"linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);"},{label:"Near Moon",value:"linear-gradient(to top, #5ee7df 0%, #b490ca 100%);"},{label:"Wild Apple",value:"linear-gradient(to top, #d299c2 0%, #fef9d7 100%);"},{label:"Plum Plate",value:"linear-gradient(135deg, #667eea 0%, #764ba2 100%);"},{label:"Peach Kiss",value:"radial-gradient(circle farthest-corner at 50% 100%,rgba(255,173,138,.50), rgba(255,248,247,1) 100%);"},{label:"Flamingo Sunrise",value:"-webkit-radial-gradient(center top, rgb(255, 250, 245), rgb(255, 242, 242))"},{label:"Budi Mist",value:"radial-gradient(circle, rgba(252,215,212,1) 0%, rgba(255,227,214,1) 50%, rgba(207,218,255,1) 100%);"},{label:"Ballet Slipper",value:"linear-gradient(135deg, rgba(252,215,212,1) 20%, rgba(207,218,255,1) 100%);"},{label:"Black Noir",value:"linear-gradient(312deg, rgba(60,60,60,1) 0%, rgba(42,42,42,1) 100%);"}]}]},lse={label:"Border",columns:"1fr 1fr",settings:[{label:"Color",key:"border-color",control:O1},{label:"Width",key:"border-width",control:Xe,column:"1 / 2",placeholder:"None",options:[{label:"Small",value:"1px"},{label:"Medium",value:"2px"},{label:"Large",value:"4px"}]},{label:"Style",key:"border-style",control:Xe,column:"2 / 3",placeholder:"None",options:[{label:"Solid",value:"solid"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"}]},{label:"Radius",key:"border-radius",control:Xe,placeholder:"None",options:[{label:"Small",value:"0.25rem"},{label:"Medium",value:"0.5rem"},{label:"Large",value:"1rem"},{label:"Round",value:"100%"}]},{label:"Shadow",key:"box-shadow",control:Xe,placeholder:"None",options:[{label:"Small",value:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},{label:"Medium",value:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},{label:"Large",value:"0 8px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"}]}]},P1=[Gw];var Yw=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",margin:Gw,padding:nse,size:rse,background:ise,border:lse,all:P1});function Jw(r,e,t){const n=r.slice();return n[5]=e[t],n}function Qw(r){let e,t,n=r[2],i=[];for(let s=0;s<n.length;s+=1)i[s]=Xw(Jw(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=Ee()},m(s,o){for(let a=0;a<i.length;a+=1)i[a].m(s,o);$(s,e,o),t=!0},p(s,o){if(o&7){n=s[2];let a;for(a=0;a<n.length;a+=1){const u=Jw(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=Xw(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){$t(i,s),s&&b(e)}}}function Xw(r){let e,t;return e=new tse({props:{style:r[5],name:r[5].label,columns:r[5].columns,properties:r[5].settings,componentInstance:r[0],bindings:r[1]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.style=n[5]),i&4&&(l.name=n[5].label),i&4&&(l.columns=n[5].columns),i&4&&(l.properties=n[5].settings),i&1&&(l.componentInstance=n[0]),i&2&&(l.bindings=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function sse(r){var i;let e,t,n=((i=r[2])==null?void 0:i.length)>0&&Qw(r);return{c(){n&&n.c(),e=Ee()},m(l,s){n&&n.m(l,s),$(l,e,s),t=!0},p(l,[s]){var o;((o=l[2])==null?void 0:o.length)>0?n?(n.p(l,s),s&4&&m(n,1)):(n=Qw(l),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(te(),_(n,1,1,()=>{n=null}),ne())},i(l){t||(m(n),t=!0)},o(l){_(n),t=!1},d(l){n&&n.d(l),l&&b(e)}}}function ose(r,e,t){let n,{componentDefinition:i}=e,{componentInstance:l}=e,{bindings:s}=e;const o=a=>{var f;if(!((f=a==null?void 0:a.styles)==null?void 0:f.length))return[...P1];let u=[...P1];return a.styles.forEach(c=>{Yw[c]&&u.push(Yw[c])}),u};return r.$$set=a=>{"componentDefinition"in a&&t(3,i=a.componentDefinition),"componentInstance"in a&&t(0,l=a.componentInstance),"bindings"in a&&t(1,s=a.bindings)},r.$$.update=()=>{r.$$.dirty&8&&t(2,n=o(i))},[l,s,n,i]}class ase extends ie{constructor(e){super();le(this,e,ose,sse,re,{componentDefinition:3,componentInstance:0,bindings:1})}}function use(r){let e;return{c(){e=V("Edit custom CSS")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function fse(r){let e,t,n;return t=new Jt({props:{$$slots:{default:[use]},$$scope:{ctx:r}}}),t.$on("click",r[3]),{c(){e=D("div"),S(t.$$.fragment)},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&128&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function cse(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function pse(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[cse]},$$scope:{ctx:r}}}),e.$on("click",r[4]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&128&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function dse(r){let e;return{c(){e=V("Custom CSS overrides all other component styles.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function mse(r){let e,t,n,i,l;e=new Ke({props:{size:"S",$$slots:{default:[dse]},$$scope:{ctx:r}}});function s(a){r[5](a)}let o={placeholder:"Enter some CSS..."};return r[1]!==void 0&&(o.value=r[1]),n=new pi({props:o}),K.push(()=>ce(n,"value",s)),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(a,u){A(e,a,u),$(a,t,u),A(n,a,u),l=!0},p(a,u){const f={};u&128&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};!i&&u&2&&(i=!0,c.value=a[1],pe(()=>i=!1)),n.$set(c)},i(a){l||(m(e.$$.fragment,a),m(n.$$.fragment,a),l=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),l=!1},d(a){E(e,a),a&&b(t),E(n,a)}}}function gse(r){let e,t,n;return t=new Qe({props:{gap:"S",noPadding:!0,$$slots:{default:[mse]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","content svelte-ernmz2")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&130&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function _se(r){let e,t;return e=new Ai({props:{slot:"body",$$slots:{default:[gse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&130&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Kw(r){let e,t,n={title:"Custom CSS",$$slots:{body:[_se],buttons:[pse]},$$scope:{ctx:r}};return e=new Kr({props:n}),r[6](e),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){const s={};l&130&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){r[6](null),E(e,i)}}}function hse(r){var o,a,u;let e,t,n=(o=r[0])==null?void 0:o._id,i,l;e=new Vo({props:{name:`Custom CSS${((u=(a=r[0])==null?void 0:a._styles)==null?void 0:u.custom)?" *":""}`,collapsible:!1,$$slots:{default:[fse]},$$scope:{ctx:r}}});let s=Kw(r);return{c(){S(e.$$.fragment),t=R(),s.c(),i=Ee()},m(f,c){A(e,f,c),$(f,t,c),s.m(f,c),$(f,i,c),l=!0},p(f,[c]){var d,g,h;const p={};c&1&&(p.name=`Custom CSS${((g=(d=f[0])==null?void 0:d._styles)==null?void 0:g.custom)?" *":""}`),c&128&&(p.$$scope={dirty:c,ctx:f}),e.$set(p),c&1&&re(n,n=(h=f[0])==null?void 0:h._id)?(te(),_(s,1,1,Oe),ne(),s=Kw(f),s.c(),m(s),s.m(i.parentNode,i)):s.p(f,c)},i(f){l||(m(e.$$.fragment,f),m(s),l=!0)},o(f){_(e.$$.fragment,f),_(s),l=!1},d(f){E(e,f),f&&b(t),f&&b(i),s.d(f)}}}function $se(r,e,t){let{componentInstance:n}=e,i,l;const s=()=>{var f;t(1,i=(f=n==null?void 0:n._styles)==null?void 0:f.custom),l.show()},o=async()=>{try{await He.actions.components.updateCustomStyle(i)}catch{we.error("Error updating custom style")}l.hide()};function a(f){i=f,t(1,i)}function u(f){K[f?"unshift":"push"](()=>{l=f,t(2,l)})}return r.$$set=f=>{"componentInstance"in f&&t(0,n=f.componentInstance)},[n,i,l,s,o,a,u]}class bse extends ie{constructor(e){super();le(this,e,$se,hse,re,{componentInstance:0})}}function Zw(r,e,t){const n=r.slice();return n[32]=e[t],n[33]=e,n[34]=t,n}function vse(r){let e,t;return e=new Ke({props:{size:"S",$$slots:{default:[yse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i[1]&16&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function wse(r){let e,t=[],n=new Map,i,l,s,o,a=r[0];const u=f=>f[32].id;for(let f=0;f<a.length;f+=1){let c=Zw(r,a,f),p=u(c);n.set(p,t[f]=e8(p,c))}return{c(){e=D("div");for(let f=0;f<t.length;f+=1)t[f].c();w(e,"class","conditions svelte-1vod3ll")},m(f,c){$(f,e,c);for(let p=0;p<t.length;p+=1)t[p].m(e,null);l=!0,s||(o=[wr(i=Iu.call(null,e,{items:r[0],flipDurationMs:N1,dropTargetStyle:{outline:"none"},dragDisabled:r[3]})),Pe(e,"finalize",r[12]),Pe(e,"consider",r[13])],s=!0)},p(f,c){if(c[0]&118271){a=f[0],te();for(let p=0;p<t.length;p+=1)t[p].r();t=xn(t,c,u,1,f,a,n,e,Bo,e8,null,Zw);for(let p=0;p<t.length;p+=1)t[p].a();ne()}i&&mt(i.update)&&c[0]&9&&i.update.call(null,{items:f[0],flipDurationMs:N1,dropTargetStyle:{outline:"none"},dragDisabled:f[3]})},i(f){if(!l){for(let c=0;c<a.length;c+=1)m(t[c]);l=!0}},o(f){for(let c=0;c<t.length;c+=1)_(t[c]);l=!1},d(f){f&&b(e);for(let c=0;c<t.length;c+=1)t[c].d();s=!1,Tn(o)}}}function yse(r){let e;return{c(){e=V("Add your first condition to get started.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function xw(r){let e,t,n,i,l,s,o,a,u,f;function c(v){r[20](v,r[32])}let p={options:r[4]};r[32].setting!==void 0&&(p.value=r[32].setting),e=new Xe({props:p}),K.push(()=>ce(e,"value",c));const d=[Cse,kse],g=[];function h(v,k){return(s==null||k[0]&1)&&(s=!!v[7](v[32].setting)),s?0:1}return o=h(r,[-1,-1]),a=g[o]=d[o](r),{c(){S(e.$$.fragment),n=R(),i=D("div"),i.textContent="TO",l=R(),a.c(),u=Ee()},m(v,k){A(e,v,k),$(v,n,k),$(v,i,k),$(v,l,k),g[o].m(v,k),$(v,u,k),f=!0},p(v,k){r=v;const C={};k[0]&16&&(C.options=r[4]),!t&&k[0]&1&&(t=!0,C.value=r[32].setting,pe(()=>t=!1)),e.$set(C);let I=o;o=h(r,k),o===I?g[o].p(r,k):(te(),_(g[I],1,1,()=>{g[I]=null}),ne(),a=g[o],a?a.p(r,k):(a=g[o]=d[o](r),a.c()),m(a,1),a.m(u.parentNode,u))},i(v){f||(m(e.$$.fragment,v),m(a),f=!0)},o(v){_(e.$$.fragment,v),_(a),f=!1},d(v){E(e,v),v&&b(n),v&&b(i),v&&b(l),g[o].d(v),v&&b(u)}}}function kse(r){let e,t;return e=new Xe({props:{disabled:!0,placeholder:" "}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p:Oe,i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Cse(r){let e,t;function n(...i){return r[21](r[32],r[33],r[34],...i)}return e=new La({props:{type:r[7](r[32].setting).type,control:r[8](r[32].setting),key:r[7](r[32].setting).key,value:r[32].settingValue,componentInstance:r[2],onChange:n,props:{options:r[7](r[32].setting).options,placeholder:r[7](r[32].setting).placeholder},bindings:r[1]}}),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l[0]&1&&(s.type=r[7](r[32].setting).type),l[0]&1&&(s.control=r[8](r[32].setting)),l[0]&1&&(s.key=r[7](r[32].setting).key),l[0]&1&&(s.value=r[32].settingValue),l[0]&4&&(s.componentInstance=r[2]),l[0]&1&&(s.onChange=n),l[0]&1&&(s.props={options:r[7](r[32].setting).options,placeholder:r[7](r[32].setting).placeholder}),l[0]&2&&(s.bindings=r[1]),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function Sse(r){let e,t,n;function i(s){r[29](s,r[32])}let l={placeholder:"Value",disabled:r[32].noValue,options:["True","False"]};return r[32].referenceValue!==void 0&&(l.value=r[32].referenceValue),e=new Xe({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){r=s;const a={};o[0]&1&&(a.disabled=r[32].noValue),!t&&o[0]&1&&(t=!0,a.value=r[32].referenceValue,pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Ase(r){let e,t,n;function i(s){r[28](s,r[32])}let l={placeholder:"Value",disabled:r[32].noValue};return r[32].referenceValue!==void 0&&(l.value=r[32].referenceValue),e=new Bl({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){r=s;const a={};o[0]&1&&(a.disabled=r[32].noValue),!t&&o[0]&1&&(t=!0,a.value=r[32].referenceValue,pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){E(e,s)}}}function Ese(r){let e,t;function n(...i){return r[27](r[32],r[33],r[34],...i)}return e=new Un({props:{disabled:r[32].noValue,bindings:r[1],placeholder:"Value",value:r[32].referenceValue}}),e.$on("change",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l[0]&1&&(s.disabled=r[32].noValue),l[0]&2&&(s.bindings=r[1]),l[0]&1&&(s.value=r[32].referenceValue),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function e8(r,e){let t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C,I,O,T,P,M,F,j,z,q,H,Y,U=Oe,W,G,Q;i=new ct({props:{name:"DragHandle",size:"XL"}});function fe(ze){e[19](ze,e[32])}let Z={placeholder:null,options:e[5]};e[32].action!==void 0&&(Z.value=e[32].action),o=new Xe({props:Z}),K.push(()=>ce(o,"value",fe));let ee=e[32].action==="update"&&xw(e);function ae(...ze){return e[22](e[32],e[33],e[34],...ze)}d=new Un({props:{bindings:e[1],placeholder:"Value",value:e[32].newValue}}),d.$on("change",ae);function _e(ze){e[23](ze,e[32])}function Re(...ze){return e[24](e[32],...ze)}let $e={placeholder:null,options:e[14](e[32])};e[32].operator!==void 0&&($e.value=e[32].operator),h=new Xe({props:$e}),K.push(()=>ce(h,"value",_e)),h.$on("change",Re);function be(ze){e[25](ze,e[32])}function he(...ze){return e[26](e[32],...ze)}let Ne={disabled:e[32].noValue,options:e[6],placeholder:null};e[32].valueType!==void 0&&(Ne.value=e[32].valueType),C=new Xe({props:Ne}),K.push(()=>ce(C,"value",be)),C.$on("change",he);const Fe=[Ese,Ase,Sse],se=[];function Ce(ze,ye){return(T==null||ye[0]&1)&&(T=!!["string","number"].includes(ze[32].valueType)),T?0:ze[32].valueType==="datetime"?1:ze[32].valueType==="boolean"?2:-1}~(P=Ce(e,[-1,-1]))&&(M=se[P]=Fe[P](e));function me(){return e[30](e[32])}j=new ct({props:{name:"Duplicate",hoverable:!0,size:"S"}}),j.$on("click",me);function ke(){return e[31](e[32])}return q=new ct({props:{name:"Close",hoverable:!0,size:"S"}}),q.$on("click",ke),{key:r,first:null,c(){t=D("div"),n=D("div"),S(i.$$.fragment),s=R(),S(o.$$.fragment),u=R(),ee&&ee.c(),f=R(),c=D("div"),c.textContent="IF",p=R(),S(d.$$.fragment),g=R(),S(h.$$.fragment),k=R(),S(C.$$.fragment),O=R(),M&&M.c(),F=R(),S(j.$$.fragment),z=R(),S(q.$$.fragment),H=R(),w(n,"class","handle svelte-1vod3ll"),w(n,"aria-label","drag-handle"),w(n,"style",l=e[3]?"cursor: grab":"cursor: grabbing"),w(t,"class","condition svelte-1vod3ll"),oe(t,"update",e[32].action==="update"),this.first=t},m(ze,ye){$(ze,t,ye),N(t,n),A(i,n,null),N(t,s),A(o,t,null),N(t,u),ee&&ee.m(t,null),N(t,f),N(t,c),N(t,p),A(d,t,null),N(t,g),A(h,t,null),N(t,k),A(C,t,null),N(t,O),~P&&se[P].m(t,null),N(t,F),A(j,t,null),N(t,z),A(q,t,null),N(t,H),W=!0,G||(Q=Pe(n,"mousedown",e[18]),G=!0)},p(ze,ye){e=ze,(!W||ye[0]&8&&l!==(l=e[3]?"cursor: grab":"cursor: grabbing"))&&w(n,"style",l);const Je={};!a&&ye[0]&1&&(a=!0,Je.value=e[32].action,pe(()=>a=!1)),o.$set(Je),e[32].action==="update"?ee?(ee.p(e,ye),ye[0]&1&&m(ee,1)):(ee=xw(e),ee.c(),m(ee,1),ee.m(t,f)):ee&&(te(),_(ee,1,1,()=>{ee=null}),ne());const Nt={};ye[0]&2&&(Nt.bindings=e[1]),ye[0]&1&&(Nt.value=e[32].newValue),d.$set(Nt);const qe={};ye[0]&1&&(qe.options=e[14](e[32])),!v&&ye[0]&1&&(v=!0,qe.value=e[32].operator,pe(()=>v=!1)),h.$set(qe);const pt={};ye[0]&1&&(pt.disabled=e[32].noValue),!I&&ye[0]&1&&(I=!0,pt.value=e[32].valueType,pe(()=>I=!1)),C.$set(pt);let Rt=P;P=Ce(e,ye),P===Rt?~P&&se[P].p(e,ye):(M&&(te(),_(se[Rt],1,1,()=>{se[Rt]=null}),ne()),~P?(M=se[P],M?M.p(e,ye):(M=se[P]=Fe[P](e),M.c()),m(M,1),M.m(t,F)):M=null),ye[0]&1&&oe(t,"update",e[32].action==="update")},r(){Y=t.getBoundingClientRect()},f(){zo(t),U()},a(){U(),U=qo(t,Y,Uo,{duration:N1})},i(ze){W||(m(i.$$.fragment,ze),m(o.$$.fragment,ze),m(ee),m(d.$$.fragment,ze),m(h.$$.fragment,ze),m(C.$$.fragment,ze),m(M),m(j.$$.fragment,ze),m(q.$$.fragment,ze),W=!0)},o(ze){_(i.$$.fragment,ze),_(o.$$.fragment,ze),_(ee),_(d.$$.fragment,ze),_(h.$$.fragment,ze),_(C.$$.fragment,ze),_(M),_(j.$$.fragment,ze),_(q.$$.fragment,ze),W=!1},d(ze){ze&&b(t),E(i),E(o),ee&&ee.d(),E(d),E(h),E(C),~P&&se[P].d(),E(j),E(q),G=!1,Q()}}}function Ose(r){let e;return{c(){e=V("Add condition")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Tse(r){let e,t,n,i,l,s;const o=[wse,vse],a=[];function u(f,c){var p;return((p=f[0])==null?void 0:p.length)?0:1}return e=u(r),t=a[e]=o[e](r),l=new gt({props:{secondary:!0,icon:"Add",$$slots:{default:[Ose]},$$scope:{ctx:r}}}),l.$on("click",r[9]),{c(){t.c(),n=R(),i=D("div"),S(l.$$.fragment)},m(f,c){a[e].m(f,c),$(f,n,c),$(f,i,c),A(l,i,null),s=!0},p(f,c){let p=e;e=u(f),e===p?a[e].p(f,c):(te(),_(a[p],1,1,()=>{a[p]=null}),ne(),t=a[e],t?t.p(f,c):(t=a[e]=o[e](f),t.c()),m(t,1),t.m(n.parentNode,n));const d={};c[1]&16&&(d.$$scope={dirty:c,ctx:f}),l.$set(d)},i(f){s||(m(t),m(l.$$.fragment,f),s=!0)},o(f){_(t),_(l.$$.fragment,f),s=!1},d(f){a[e].d(f),f&&b(n),f&&b(i),E(l)}}}function Ise(r){let e,t,n;return t=new Qe({props:{noPadding:!0,$$slots:{default:[Tse]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","container svelte-1vod3ll")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l[0]&31|l[1]&16&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Lse(r){let e,t;return e=new Ai({props:{$$slots:{default:[Ise]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i[0]&31|i[1]&16&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}const N1=150;function Pse(r,e,t){let n,i,l;ue(r,ri,Z=>t(2,l=Z));let{conditions:s=[]}=e,{bindings:o=[]}=e;const a=[{label:"Hide component",value:"hide"},{label:"Show component",value:"show"},{label:"Update setting",value:"update"}],u=[{value:"string",label:"Binding"},{value:"number",label:"Number"},{value:"datetime",label:"Date"},{value:"boolean",label:"Boolean"}];let f=!0;const c=Z=>n.find(ee=>ee.key===Z),p=Z=>{const ee=c(Z);return xf((ee==null?void 0:ee.type)||"text")},d=()=>{t(0,s=[...s,{valueType:"string",id:Br.generate(),action:"hide",operator:Ir.Equals.value}])},g=Z=>{t(0,s=s.filter(ee=>ee.id!==Z))},h=Z=>{const ee=s.find(_e=>_e.id===Z),ae=lt(Se({},ee),{id:Br.generate()});t(0,s=[...s,ae])},v=Z=>{k(Z),t(3,f=!0)},k=Z=>{t(0,s=Z.detail.items)},C=Z=>Ca(Z.valueType),I=(Z,ee)=>{const ae=[Ir.Empty.value,Ir.NotEmpty.value];Z.noValue=ae.includes(ee),Z.noValue&&(Z.referenceValue=null,Z.valueType="string")},O=(Z,ee)=>{var _e;Z.referenceValue=null;const ae=Ca(ee).map(Re=>Re.value);ae.includes(Z.operator)||(Z.operator=(_e=ae[0])!=null?_e:Ir.Equals.value,I(Z,Z.operator))},T=()=>t(3,f=!1);function P(Z,ee){r.$$.not_equal(ee.action,Z)&&(ee.action=Z,t(0,s))}function M(Z,ee){r.$$.not_equal(ee.setting,Z)&&(ee.setting=Z,t(0,s))}const F=(Z,ee,ae,_e)=>t(0,ee[ae].settingValue=_e,s),j=(Z,ee,ae,_e)=>t(0,ee[ae].newValue=_e.detail,s);function z(Z,ee){r.$$.not_equal(ee.operator,Z)&&(ee.operator=Z,t(0,s))}const q=(Z,ee)=>I(Z,ee.detail);function H(Z,ee){r.$$.not_equal(ee.valueType,Z)&&(ee.valueType=Z,t(0,s))}const Y=(Z,ee)=>O(Z,ee.detail),U=(Z,ee,ae,_e)=>t(0,ee[ae].referenceValue=_e.detail,s);function W(Z,ee){r.$$.not_equal(ee.referenceValue,Z)&&(ee.referenceValue=Z,t(0,s))}function G(Z,ee){r.$$.not_equal(ee.referenceValue,Z)&&(ee.referenceValue=Z,t(0,s))}const Q=Z=>h(Z.id),fe=Z=>g(Z.id);return r.$$set=Z=>{"conditions"in Z&&t(0,s=Z.conditions),"bindings"in Z&&t(1,o=Z.bindings)},r.$$.update=()=>{r.$$.dirty[0]&4&&t(17,n=Aa(l==null?void 0:l._component)),r.$$.dirty[0]&131072&&t(4,i=n.map(Z=>({label:Z.label,value:Z.key}))),r.$$.dirty[0]&1&&s.forEach(Z=>{Z.id||(Z.id=Br.generate())})},[s,o,l,f,i,a,u,c,p,d,g,h,v,k,C,I,O,n,T,P,M,F,j,z,q,H,Y,U,W,G,Q,fe]}class Nse extends ie{constructor(e){super();le(this,e,Pse,Lse,re,{conditions:0,bindings:1},null,[-1,-1])}}function Rse(r){let e;return{c(){e=V("Configure conditions")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Mse(r){let e,t,n;return t=new Jt({props:{$$slots:{default:[Rse]},$$scope:{ctx:r}}}),t.$on("click",r[4]),{c(){e=D("div"),S(t.$$.fragment)},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&512&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Dse(r){let e;return{c(){e=V("Show, hide and update components in response to conditions being met.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function jse(r){let e;return{c(){e=V("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Bse(r){let e,t;return e=new gt({props:{cta:!0,slot:"buttons",$$slots:{default:[jse]},$$scope:{ctx:r}}}),e.$on("click",r[7]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&512&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function zse(r){let e,t,n;function i(s){r[6](s)}let l={slot:"body",bindings:r[1]};return r[2]!==void 0&&(l.conditions=r[2]),e=new Nse({props:l}),K.push(()=>ce(e,"conditions",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};o&2&&(a.bindings=s[1]),!t&&o&4&&(t=!0,a.conditions=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){E(e,s)}}}function qse(r){var s;let e,t,n,i;e=new Vo({props:{name:`Conditions${((s=r[0])==null?void 0:s._conditions)?" *":""}`,collapsible:!1,$$slots:{default:[Mse]},$$scope:{ctx:r}}});let l={title:"Conditions",$$slots:{body:[zse],buttons:[Bse],description:[Dse]},$$scope:{ctx:r}};return n=new Kr({props:l}),r[8](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(o,a){A(e,o,a),$(o,t,a),A(n,o,a),i=!0},p(o,[a]){var c;const u={};a&1&&(u.name=`Conditions${((c=o[0])==null?void 0:c._conditions)?" *":""}`),a&512&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&518&&(f.$$scope={dirty:a,ctx:o}),n.$set(f)},i(o){i||(m(e.$$.fragment,o),m(n.$$.fragment,o),i=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),i=!1},d(o){E(e,o),o&&b(t),r[8](null),E(n,o)}}}function Use(r,e,t){let{componentInstance:n}=e,{bindings:i}=e,l,s;const o=()=>{var p;t(2,l=JSON.parse(JSON.stringify((p=n==null?void 0:n._conditions)!=null?p:[]))),s.show()},a=async()=>{try{await He.actions.components.updateConditions(l)}catch{we.error("Error updating conditions")}s.hide()};function u(p){l=p,t(2,l)}const f=()=>a();function c(p){K[p?"unshift":"push"](()=>{s=p,t(3,s)})}return r.$$set=p=>{"componentInstance"in p&&t(0,n=p.componentInstance),"bindings"in p&&t(1,i=p.bindings)},[n,i,l,s,o,a,u,f,c]}class Fse extends ie{constructor(e){super();le(this,e,Use,qse,re,{componentInstance:0,bindings:1})}}function t8(r){let e,t,n,i,l,s,o,a,u,f;return e=new Xx({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),n=new Kle({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1],componentBindings:r[0]}}),l=new ase({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),o=new bse({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),u=new Fse({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment),s=R(),S(o.$$.fragment),a=R(),S(u.$$.fragment)},m(c,p){A(e,c,p),$(c,t,p),A(n,c,p),$(c,i,p),A(l,c,p),$(c,s,p),A(o,c,p),$(c,a,p),A(u,c,p),f=!0},p(c,p){const d={};p&8&&(d.componentInstance=c[3]),p&4&&(d.componentDefinition=c[2]),p&2&&(d.bindings=c[1]),e.$set(d);const g={};p&8&&(g.componentInstance=c[3]),p&4&&(g.componentDefinition=c[2]),p&2&&(g.bindings=c[1]),p&1&&(g.componentBindings=c[0]),n.$set(g);const h={};p&8&&(h.componentInstance=c[3]),p&4&&(h.componentDefinition=c[2]),p&2&&(h.bindings=c[1]),l.$set(h);const v={};p&8&&(v.componentInstance=c[3]),p&4&&(v.componentDefinition=c[2]),p&2&&(v.bindings=c[1]),o.$set(v);const k={};p&8&&(k.componentInstance=c[3]),p&4&&(k.componentDefinition=c[2]),p&2&&(k.bindings=c[1]),u.$set(k)},i(c){f||(m(e.$$.fragment,c),m(n.$$.fragment,c),m(l.$$.fragment,c),m(o.$$.fragment,c),m(u.$$.fragment,c),f=!0)},o(c){_(e.$$.fragment,c),_(n.$$.fragment,c),_(l.$$.fragment,c),_(o.$$.fragment,c),_(u.$$.fragment,c),f=!1},d(c){E(e,c),c&&b(t),E(n,c),c&&b(i),E(l,c),c&&b(s),E(o,c),c&&b(a),E(u,c)}}}function Vse(r){var l;let e,t=(l=r[3])==null?void 0:l._id,n,i=t8(r);return{c(){e=D("div"),i.c(),w(e,"class","container svelte-1n3t1jx")},m(s,o){$(s,e,o),i.m(e,null),n=!0},p(s,o){var a;o&8&&re(t,t=(a=s[3])==null?void 0:a._id)?(te(),_(i,1,1,Oe),ne(),i=t8(s),i.c(),m(i),i.m(e,null)):i.p(s,o)},i(s){n||(m(i),n=!0)},o(s){_(i),n=!1},d(s){s&&b(e),i.d(s)}}}function Hse(r){let e,t;return e=new bn({props:{title:"Settings",$$slots:{default:[Vse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&143&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Wse(r){let e,t;return e=new Vr({props:{selected:"Settings",noPadding:!0,$$slots:{default:[Hse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&143&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Gse(r,e,t){let n,i,l,s,o,a,u;return ue(r,He,f=>t(4,o=f)),ue(r,un,f=>t(5,a=f)),ue(r,ri,f=>t(6,u=f)),r.$$.update=()=>{r.$$.dirty&64&&t(3,n=u),r.$$.dirty&64&&t(2,i=He.actions.components.getDefinition(u==null?void 0:u._component)),r.$$.dirty&48&&t(1,l=aq(a,o.selectedComponentId)),r.$$.dirty&48&&t(0,s=uq(a,o.selectedComponentId))},[s,l,i,n,o,a,u]}class Yse extends ie{constructor(e){super();le(this,e,Gse,Wse,re,{})}}var Jse=[{name:"Blocks",icon:"Article",children:["tableblock","cardsblock","repeaterblock"]},{name:"Layout",icon:"ClassicGridView",children:["container","section"]},{name:"Data",icon:"Data",children:["dataprovider","repeater","table","dynamicfilter"]},{name:"Form",icon:"Form",children:["form","formstep","fieldgroup","stringfield","numberfield","passwordfield","optionsfield","booleanfield","longformfield","datetimefield","attachmentfield","relationshipfield","daterangepicker","multifieldselect","jsonfield","s3upload"]},{name:"Card",icon:"Card",children:["spectrumcard","cardstat"]},{name:"Chart",icon:"GraphBarVertical",children:["bar","line","area","pie","donut","candlestick"]},{name:"Elements",icon:"TextParagraph",children:["heading","text","button","tag","divider","image","backgroundimage","link","icon","embed","markdownviewer","embeddedmap"]}];function n8(r,e,t){const n=r.slice();return n[9]=e[t],n}function r8(r,e,t){const n=r.slice();return n[9]=e[t],n}function i8(r){let e,t;function n(){return r[7](r[9])}return e=new Qt({props:{dataCy:`component-${r[9].name}`,icon:r[9].icon,disabled:r[3](r[9],r[1]),$$slots:{default:[Qse]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l&1&&(s.dataCy=`component-${r[9].name}`),l&1&&(s.icon=r[9].icon),l&3&&(s.disabled=r[3](r[9],r[1])),l&16385&&(s.$$scope={dirty:l,ctx:r}),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function Qse(r){let e=r[9].name+"",t;return{c(){t=V(e)},m(n,i){$(n,t,i)},p(n,i){i&1&&e!==(e=n[9].name+"")&&Te(t,e)},d(n){n&&b(t)}}}function l8(r){let e=!r[9].showOnAsset||r[9].showOnAsset.includes(r[2]),t,n,i=e&&i8(r);return{c(){i&&i.c(),t=Ee()},m(l,s){i&&i.m(l,s),$(l,t,s),n=!0},p(l,s){s&5&&(e=!l[9].showOnAsset||l[9].showOnAsset.includes(l[2])),e?i?(i.p(l,s),s&5&&m(i,1)):(i=i8(l),i.c(),m(i,1),i.m(t.parentNode,t)):i&&(te(),_(i,1,1,()=>{i=null}),ne())},i(l){n||(m(i),n=!0)},o(l){_(i),n=!1},d(l){i&&i.d(l),l&&b(t)}}}function Xse(r){let e,t,n=r[9].children||[],i=[];for(let s=0;s<n.length;s+=1)i[s]=l8(r8(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=R()},m(s,o){for(let a=0;a<i.length;a+=1)i[a].m(s,o);$(s,e,o),t=!0},p(s,o){if(o&31){n=s[9].children||[];let a;for(a=0;a<n.length;a+=1){const u=r8(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=l8(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){$t(i,s),s&&b(e)}}}function s8(r){let e,t;return e=new ct({props:{size:"S",name:"ChevronDown"}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Kse(r){let e,t=r[9].name+"",n,i,l,s,o=r[9].isCategory&&s8();return{c(){e=D("div"),n=V(t),i=R(),o&&o.c(),l=R(),w(e,"class","buttonContent svelte-15cdrfq")},m(a,u){$(a,e,u),N(e,n),N(e,i),o&&o.m(e,null),$(a,l,u),s=!0},p(a,u){(!s||u&1)&&t!==(t=a[9].name+"")&&Te(n,t),a[9].isCategory?o?u&1&&m(o,1):(o=s8(),o.c(),m(o,1),o.m(e,null)):o&&(te(),_(o,1,1,()=>{o=null}),ne())},i(a){s||(m(o),s=!0)},o(a){_(o),s=!1},d(a){a&&b(e),o&&o.d(),a&&b(l)}}}function Zse(r){let e,t;function n(){return r[6](r[9])}return e=new Jt({props:{icon:r[9].icon,disabled:!r[9].isCategory&&r[3](r[9],r[1]),quiet:!0,size:"S",slot:"control",dataCy:`category-${r[9].name}`,$$slots:{default:[Kse]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l&1&&(s.icon=r[9].icon),l&3&&(s.disabled=!r[9].isCategory&&r[3](r[9],r[1])),l&1&&(s.dataCy=`category-${r[9].name}`),l&16385&&(s.$$scope={dirty:l,ctx:r}),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function o8(r){let e,t;return e=new yr({props:{disabled:!r[9].isCategory,$$slots:{control:[Zse],default:[Xse]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.disabled=!n[9].isCategory),i&16391&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function xse(r){let e,t,n=r[0],i=[];for(let s=0;s<n.length;s+=1)i[s]=o8(n8(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){e=D("div");for(let s=0;s<i.length;s+=1)i[s].c();w(e,"class","components svelte-15cdrfq")},m(s,o){$(s,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(s,[o]){if(o&31){n=s[0];let a;for(a=0;a<n.length;a+=1){const u=n8(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=o8(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){s&&b(e),$t(i,s)}}}function eoe(r,e,t){let n,i,l,s;ue(r,He,p=>t(5,i=p)),ue(r,ri,p=>t(1,l=p)),ue(r,Hj,p=>t(2,s=p));const o=({name:p},d)=>{var h;const g=He.actions.components.getDefinition(d==null?void 0:d._component);return(h=g==null?void 0:g.illegalChildren)==null?void 0:h.includes(p.toLowerCase())},a=(p,d)=>{let g=[];return p.forEach(h=>{if(typeof h=="string"){const v=d[`@budibase/standard-components/${h}`];v&&g.push(lt(Se({},v),{isCategory:!1}))}else g.push(lt(Se({},h),{isCategory:!0,children:a(h.children||[],d)}))}),g},u=async p=>{if(!p.isCategory)try{await He.actions.components.create(p.component)}catch{we.error("Error creating component")}},f=p=>u(p),c=p=>u(p);return r.$$.update=()=>{r.$$.dirty&32&&t(0,n=a(Jse,i.components))},[n,l,s,o,u,i,f,c]}class toe extends ie{constructor(e){super();le(this,e,eoe,xse,re,{})}}const a8={MOVE:"move",COPY:"copy"},Hr={ABOVE:"above",BELOW:"below",INSIDE:"inside"};function u8(){const r=cn({});return r.actions={dragstart:e=>{r.update(t=>(t.dragged=e,t))},dragover:({component:e,index:t,canHaveChildrenButIsEmpty:n,mousePosition:i})=>{r.update(l=>(l.targetComponent=e,n&&t===0?(i<.4&&(l.dropPosition=Hr.ABOVE),i>.8&&(l.dropPosition=Hr.BELOW),i>.4&&i<.8&&(l.dropPosition=Hr.INSIDE),l):(i>.5?l.dropPosition=Hr.BELOW:l.dropPosition=n?Hr.INSIDE:Hr.ABOVE,l)))},reset:()=>{r.update(e=>(e.dropPosition="",e.targetComponent=null,e.dragged=null,e))},drop:async()=>{const e=it(r);e.targetComponent===e.dragged||!e.targetComponent||!e.dragged||Sl(e.dragged,e.targetComponent._id).map(i=>i._id).includes(e.targetComponent._id)||(He.actions.components.copy(e.dragged,!0),await He.actions.components.paste(e.targetComponent,e.dropPosition),r.actions.reset())}},r}function f8(r){var s;let e,t,n,i;e=new yr({props:{$$slots:{control:[poe],default:[coe]},$$scope:{ctx:r}}});let l={title:"Confirm Deletion",body:`Are you sure you wish to delete this '${(s=r[0])==null?void 0:s.name}' component?`,okText:"Delete Component",onOk:r[8]};return n=new hr({props:l}),r[18](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(o,a){A(e,o,a),$(o,t,a),A(n,o,a),i=!0},p(o,a){var c;const u={};a&524314&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&1&&(f.body=`Are you sure you wish to delete this '${(c=o[0])==null?void 0:c.name}' component?`),n.$set(f)},i(o){i||(m(e.$$.fragment,o),m(n.$$.fragment,o),i=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),i=!1},d(o){E(e,o),o&&b(t),r[18](null),E(n,o)}}}function noe(r){let e;return{c(){e=V("Delete")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function roe(r){let e;return{c(){e=V("Move up")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ioe(r){let e;return{c(){e=V("Move down")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function loe(r){let e;return{c(){e=V("Duplicate")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function soe(r){let e;return{c(){e=V("Cut")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ooe(r){let e;return{c(){e=V("Copy")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function aoe(r){let e;return{c(){e=V("Paste above")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function uoe(r){let e;return{c(){e=V("Paste below")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function foe(r){let e;return{c(){e=V("Paste inside")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function coe(r){let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C;return e=new Qt({props:{icon:"Delete",$$slots:{default:[noe]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)}),n=new Qt({props:{noClose:!0,icon:"ChevronUp",$$slots:{default:[roe]},$$scope:{ctx:r}}}),n.$on("click",r[5]),l=new Qt({props:{noClose:!0,icon:"ChevronDown",$$slots:{default:[ioe]},$$scope:{ctx:r}}}),l.$on("click",r[6]),o=new Qt({props:{noClose:!0,icon:"Duplicate",$$slots:{default:[loe]},$$scope:{ctx:r}}}),o.$on("click",r[7]),u=new Qt({props:{icon:"Cut",$$slots:{default:[soe]},$$scope:{ctx:r}}}),u.$on("click",r[13]),c=new Qt({props:{icon:"Copy",$$slots:{default:[ooe]},$$scope:{ctx:r}}}),c.$on("click",r[14]),d=new Qt({props:{icon:"LayersBringToFront",disabled:r[3],$$slots:{default:[aoe]},$$scope:{ctx:r}}}),d.$on("click",r[15]),h=new Qt({props:{icon:"LayersSendToBack",disabled:r[3],$$slots:{default:[uoe]},$$scope:{ctx:r}}}),h.$on("click",r[16]),k=new Qt({props:{icon:"ShowOneLayer",disabled:r[3]||r[4],$$slots:{default:[foe]},$$scope:{ctx:r}}}),k.$on("click",r[17]),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment),s=R(),S(o.$$.fragment),a=R(),S(u.$$.fragment),f=R(),S(c.$$.fragment),p=R(),S(d.$$.fragment),g=R(),S(h.$$.fragment),v=R(),S(k.$$.fragment)},m(I,O){A(e,I,O),$(I,t,O),A(n,I,O),$(I,i,O),A(l,I,O),$(I,s,O),A(o,I,O),$(I,a,O),A(u,I,O),$(I,f,O),A(c,I,O),$(I,p,O),A(d,I,O),$(I,g,O),A(h,I,O),$(I,v,O),A(k,I,O),C=!0},p(I,O){r=I;const T={};O&524288&&(T.$$scope={dirty:O,ctx:r}),e.$set(T);const P={};O&524288&&(P.$$scope={dirty:O,ctx:r}),n.$set(P);const M={};O&524288&&(M.$$scope={dirty:O,ctx:r}),l.$set(M);const F={};O&524288&&(F.$$scope={dirty:O,ctx:r}),o.$set(F);const j={};O&524288&&(j.$$scope={dirty:O,ctx:r}),u.$set(j);const z={};O&524288&&(z.$$scope={dirty:O,ctx:r}),c.$set(z);const q={};O&8&&(q.disabled=r[3]),O&524288&&(q.$$scope={dirty:O,ctx:r}),d.$set(q);const H={};O&8&&(H.disabled=r[3]),O&524288&&(H.$$scope={dirty:O,ctx:r}),h.$set(H);const Y={};O&24&&(Y.disabled=r[3]||r[4]),O&524288&&(Y.$$scope={dirty:O,ctx:r}),k.$set(Y)},i(I){C||(m(e.$$.fragment,I),m(n.$$.fragment,I),m(l.$$.fragment,I),m(o.$$.fragment,I),m(u.$$.fragment,I),m(c.$$.fragment,I),m(d.$$.fragment,I),m(h.$$.fragment,I),m(k.$$.fragment,I),C=!0)},o(I){_(e.$$.fragment,I),_(n.$$.fragment,I),_(l.$$.fragment,I),_(o.$$.fragment,I),_(u.$$.fragment,I),_(c.$$.fragment,I),_(d.$$.fragment,I),_(h.$$.fragment,I),_(k.$$.fragment,I),C=!1},d(I){E(e,I),I&&b(t),E(n,I),I&&b(i),E(l,I),I&&b(s),E(o,I),I&&b(a),E(u,I),I&&b(f),E(c,I),I&&b(p),E(d,I),I&&b(g),E(h,I),I&&b(v),E(k,I)}}}function poe(r){let e,t,n;return t=new ct({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","control"),w(e,"class","icon svelte-u6s22l")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p:Oe,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function doe(r){let e,t,n=r[2]&&f8(r);return{c(){n&&n.c(),e=Ee()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,[l]){i[2]?n?(n.p(i,l),l&4&&m(n,1)):(n=f8(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(te(),_(n,1,1,()=>{n=null}),ne())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function moe(r,e,t){let n,i,l,s,o;ue(r,He,P=>t(12,o=P));let{component:a}=e,u;const f=()=>{const P=it(un),M=Xl(P==null?void 0:P.props,a._id);if(!M)return;const F=M._children.indexOf(a);if(F!==0)try{const j=M._children.filter(z=>z!==a);j.splice(F-1,0,a),M._children=j,He.actions.preview.saveSelected()}catch{we.error("Error saving screen")}},c=()=>{const P=it(un),M=Xl(P==null?void 0:P.props,a._id);if(!M)return;const F=M._children.indexOf(a);if(F!==M._children.length-1)try{const j=M._children.filter(z=>z!==a);j.splice(F+1,0,a),M._children=j,He.actions.preview.saveSelected()}catch{we.error("Error saving screen")}},p=()=>{g(!1),h("below")},d=async()=>{try{await He.actions.components.delete(a)}catch{we.error("Error deleting component")}},g=(P=!1)=>{He.actions.components.copy(a,P)},h=P=>{try{He.actions.components.paste(a,P)}catch{we.error("Error saving component")}},v=()=>g(!0),k=()=>g(!1),C=()=>h("above"),I=()=>h("below"),O=()=>h("inside");function T(P){K[P?"unshift":"push"](()=>{u=P,t(1,u)})}return r.$$set=P=>{"component"in P&&t(11,a=P.component)},r.$$.update=()=>{r.$$.dirty&2048&&t(0,n=He.actions.components.getDefinition(a==null?void 0:a._component)),r.$$.dirty&2049&&t(4,i=!a||!(n==null?void 0:n.hasChildren)),r.$$.dirty&4096&&t(3,l=!o.componentToPaste),r.$$.dirty&1&&t(2,s=(n==null?void 0:n.editable)!==!1&&(n==null?void 0:n.static)!==!0)},[n,u,s,l,i,f,c,p,d,g,h,a,o,v,k,C,I,O,T]}class goe extends ie{constructor(e){super();le(this,e,moe,doe,re,{component:11})}}function c8(r,e,t){const n=r.slice();return n[18]=e[t],n[20]=t,n}function p8(r){let e,t,n;return{c(){e=D("div"),w(e,"ondragover","return false"),w(e,"ondragenter","return false"),w(e,"class","drop-item svelte-1wboluz"),zt(e,"margin-left",(r[3]+1)*16+"px")},m(i,l){$(i,e,l),t||(n=Pe(e,"drop",r[14]),t=!0)},p(i,l){l&8&&zt(e,"margin-left",(i[3]+1)*16+"px")},d(i){i&&b(e),t=!1,n()}}}function _oe(r){let e,t;return e=new goe({props:{component:r[18]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.component=n[18]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function d8(r){let e,t;return e=new R1({props:{components:r[18]._children,currentComponent:r[1],onSelect:r[2],dragDropStore:r[4],level:r[3]+1}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.components=n[18]._children),i&2&&(l.currentComponent=n[1]),i&4&&(l.onSelect=n[2]),i&16&&(l.dragDropStore=n[4]),i&8&&(l.level=n[3]+1),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function m8(r){let e,t,n;return{c(){e=D("div"),w(e,"ondragover","return false"),w(e,"ondragenter","return false"),w(e,"class","drop-item svelte-1wboluz"),zt(e,"margin-left",(r[3]+(r[6].dropPosition===Hr.INSIDE?3:1))*16+"px")},m(i,l){$(i,e,l),t||(n=Pe(e,"drop",r[14]),t=!0)},p(i,l){l&72&&zt(e,"margin-left",(i[3]+(i[6].dropPosition===Hr.INSIDE?3:1))*16+"px")},d(i){i&&b(e),t=!1,n()}}}function g8(r,e){var k,C;let t,n,i,l,s=e[15](e[18],e[8],e[5]),o,a,u,f,c,p=((k=e[6])==null?void 0:k.targetComponent)===e[18]&&e[6].dropPosition===Hr.ABOVE&&p8(e);function d(){return e[16](e[18])}i=new Tl({props:{draggable:!0,text:e[12](e[18]),withArrow:!0,indentLevel:e[3]+1,selected:e[7].selectedComponentId===e[18]._id,opened:e[15](e[18],e[8],e[5]),$$slots:{default:[_oe]},$$scope:{ctx:e}}}),i.$on("dragend",function(){mt(e[4].actions.reset)&&e[4].actions.reset.apply(this,arguments)}),i.$on("dragstart",function(){mt(e[10](e[18]))&&e[10](e[18]).apply(this,arguments)}),i.$on("dragover",function(){mt(e[11](e[18],e[20]))&&e[11](e[18],e[20]).apply(this,arguments)}),i.$on("iconClick",d),i.$on("drop",e[14]);let g=s&&d8(e),h=((C=e[6])==null?void 0:C.targetComponent)===e[18]&&(e[6].dropPosition===Hr.INSIDE||e[6].dropPosition===Hr.BELOW)&&m8(e);function v(){return e[17](e[18])}return{key:r,first:null,c(){t=D("li"),p&&p.c(),n=R(),S(i.$$.fragment),l=R(),g&&g.c(),o=R(),h&&h.c(),a=R(),w(t,"class","svelte-1wboluz"),this.first=t},m(I,O){$(I,t,O),p&&p.m(t,null),N(t,n),A(i,t,null),N(t,l),g&&g.m(t,null),N(t,o),h&&h.m(t,null),N(t,a),u=!0,f||(c=Pe(t,"click",dp(v)),f=!0)},p(I,O){var P,M;e=I,((P=e[6])==null?void 0:P.targetComponent)===e[18]&&e[6].dropPosition===Hr.ABOVE?p?p.p(e,O):(p=p8(e),p.c(),p.m(t,n)):p&&(p.d(1),p=null);const T={};O&1&&(T.text=e[12](e[18])),O&8&&(T.indentLevel=e[3]+1),O&129&&(T.selected=e[7].selectedComponentId===e[18]._id),O&289&&(T.opened=e[15](e[18],e[8],e[5])),O&2097153&&(T.$$scope={dirty:O,ctx:e}),i.$set(T),O&289&&(s=e[15](e[18],e[8],e[5])),s?g?(g.p(e,O),O&289&&m(g,1)):(g=d8(e),g.c(),m(g,1),g.m(t,o)):g&&(te(),_(g,1,1,()=>{g=null}),ne()),((M=e[6])==null?void 0:M.targetComponent)===e[18]&&(e[6].dropPosition===Hr.INSIDE||e[6].dropPosition===Hr.BELOW)?h?h.p(e,O):(h=m8(e),h.c(),h.m(t,a)):h&&(h.d(1),h=null)},i(I){u||(m(i.$$.fragment,I),m(g),u=!0)},o(I){_(i.$$.fragment,I),_(g),u=!1},d(I){I&&b(t),p&&p.d(),E(i),g&&g.d(),h&&h.d(),f=!1,c()}}}function hoe(r){let e,t=[],n=new Map,i,l=r[0]||[];const s=o=>o[18]._id;for(let o=0;o<l.length;o+=1){let a=c8(r,l,o),u=s(a);n.set(u,t[o]=g8(u,a))}return{c(){e=D("ul");for(let o=0;o<t.length;o+=1)t[o].c();w(e,"class","svelte-1wboluz")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,[a]){a&65535&&(l=o[0]||[],te(),t=xn(t,a,s,1,o,l,n,e,jr,g8,null,c8),ne())},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function $oe(r,e,t){let n,i=Oe,l=()=>(i(),i=p_(p,M=>t(6,n=M)),p),s,o;ue(r,He,M=>t(7,s=M)),ue(r,Vj,M=>t(8,o=M)),r.$$.on_destroy.push(()=>i());let{components:a=[]}=e,{currentComponent:u}=e,{onSelect:f=()=>{}}=e,{level:c=0}=e,{dragDropStore:p}=e;l();let d={};const g=M=>{He.actions.components.select(M)},h=M=>F=>{F.dataTransfer.dropEffect=a8.MOVE,p.actions.dragstart(M)},v=(M,F)=>j=>{var Y;const z=He.actions.components.getDefinition(M._component),q=(z==null?void 0:z.hasChildren)&&!((Y=M._children)==null?void 0:Y.length);j.dataTransfer.dropEffect=a8.COPY;const H=j.offsetY/j.currentTarget.offsetHeight;return p.actions.dragover({component:M,index:F,canHaveChildrenButIsEmpty:q,mousePosition:H}),!1},k=M=>{if(M._instanceName)return M._instanceName;const F=M._component.replace("@budibase/standard-components/","")||"component";return Sr(F)};function C(M){d[M]?delete d[M]:t(5,d[M]=!0,d),t(5,d)}const I=async()=>{try{await p.actions.drop()}catch{we.error("Error saving component")}},O=(M,F,j)=>{var z;return((z=M==null?void 0:M._children)==null?void 0:z.length)?F.includes(M._id)?!0:!j[M._id]:!1},T=M=>C(M._id),P=M=>g(M);return r.$$set=M=>{"components"in M&&t(0,a=M.components),"currentComponent"in M&&t(1,u=M.currentComponent),"onSelect"in M&&t(2,f=M.onSelect),"level"in M&&t(3,c=M.level),"dragDropStore"in M&&l(t(4,p=M.dragDropStore))},[a,u,f,c,p,d,n,s,o,g,h,v,k,C,I,O,T,P]}class R1 extends ie{constructor(e){super();le(this,e,$oe,hoe,re,{components:0,currentComponent:1,onSelect:2,level:3,dragDropStore:4})}}function _8(r,e,t){const n=r.slice();return n[6]=e[t],n}function boe(r){let e;return{c(){e=V("Delete all screens")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function voe(r){let e,t;return e=new Qt({props:{icon:"Delete",$$slots:{default:[boe]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[2].show)&&r[2].show.apply(this,arguments)}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){r=n;const l={};i&512&&(l.$$scope={dirty:i,ctx:r}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function woe(r){let e,t,n;return t=new ct({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","control"),w(e,"class","icon svelte-xzl76s")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p:Oe,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function h8(r){let e,t=r[6].route+"",n;return{c(){e=D("div"),n=V(t)},m(i,l){$(i,e,l),N(e,n)},p(i,l){l&2&&t!==(t=i[6].route+"")&&Te(n,t)},d(i){i&&b(e)}}}function yoe(r){let e,t,n,i,l,s,o,a,u,f=r[1],c=[];for(let p=0;p<f.length;p+=1)c[p]=h8(_8(r,f,p));return{c(){e=D("div"),t=V("Are you sure you want to delete all screens under the "),n=D("b"),i=V(r[0]),l=V(" route?"),s=R(),o=D("div"),o.textContent="The following screens will be deleted:",a=R(),u=D("div");for(let p=0;p<c.length;p+=1)c[p].c();w(u,"class","to-delete svelte-xzl76s")},m(p,d){$(p,e,d),N(e,t),N(e,n),N(n,i),N(e,l),$(p,s,d),$(p,o,d),$(p,a,d),$(p,u,d);for(let g=0;g<c.length;g+=1)c[g].m(u,null)},p(p,d){if(d&1&&Te(i,p[0]),d&2){f=p[1];let g;for(g=0;g<f.length;g+=1){const h=_8(p,f,g);c[g]?c[g].p(h,d):(c[g]=h8(h),c[g].c(),c[g].m(u,null))}for(;g<c.length;g+=1)c[g].d(1);c.length=f.length}},d(p){p&&b(e),p&&b(s),p&&b(o),p&&b(a),p&&b(u),$t(c,p)}}}function koe(r){let e,t;return e=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[yoe]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&515&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Coe(r){let e,t,n,i;e=new yr({props:{$$slots:{control:[woe],default:[voe]},$$scope:{ctx:r}}});let l={title:"Confirm Deletion",okText:"Delete screens",onOk:r[3],$$slots:{default:[koe]},$$scope:{ctx:r}};return n=new hr({props:l}),r[4](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){const a={};o&516&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const u={};o&515&&(u.$$scope={dirty:o,ctx:s}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[4](null),E(n,s)}}}function Soe(r,e,t){let n;ue(r,qt,u=>t(5,n=u));let{path:i}=e,{screens:l}=e,s;const o=async()=>{if(!!(l==null?void 0:l.length))try{for(let{id:u}of l){const f=it(He).screens.find(c=>c._id===u);!f||await He.actions.screens.delete(f)}we.success("Screens deleted successfully"),n("../")}catch{we.error("Error deleting screens")}};function a(u){K[u?"unshift":"push"](()=>{s=u,t(2,s)})}return r.$$set=u=>{"path"in u&&t(0,i=u.path),"screens"in u&&t(1,l=u.screens)},[i,l,s,o,a]}class Aoe extends ie{constructor(e){super();le(this,e,Soe,Coe,re,{path:0,screens:1})}}function Eoe(r){let e,t,n,i,l,s;function o(c){r[10](c)}let a={label:"Name"};r[0]!==void 0&&(a.value=r[0]),e=new tt({props:a}),K.push(()=>ce(e,"value",o));function u(c){r[11](c)}let f={label:"URL",error:r[5]};return r[1]!==void 0&&(f.value=r[1]),i=new tt({props:f}),K.push(()=>ce(i,"value",u)),i.$on("change",r[7]),{c(){S(e.$$.fragment),n=R(),S(i.$$.fragment)},m(c,p){A(e,c,p),$(c,n,p),A(i,c,p),s=!0},p(c,p){const d={};!t&&p&1&&(t=!0,d.value=c[0],pe(()=>t=!1)),e.$set(d);const g={};p&32&&(g.error=c[5]),!l&&p&2&&(l=!0,g.value=c[1],pe(()=>l=!1)),i.$set(g)},i(c){s||(m(e.$$.fragment,c),m(i.$$.fragment,c),s=!0)},o(c){_(e.$$.fragment,c),_(i.$$.fragment,c),s=!1},d(c){E(e,c),c&&b(n),E(i,c)}}}function $8(r){let e,t,n;return t=new Gs({props:{size:"S"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","footer-progress svelte-19rzw36")},m(i,l){$(i,e,l),A(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Ooe(r){let e,t,n=r[3]&&$8();return{c(){e=D("div"),n&&n.c(),w(e,"slot","footer")},m(i,l){$(i,e,l),n&&n.m(e,null),t=!0},p(i,l){i[3]?n?l&8&&m(n,1):(n=$8(),n.c(),m(n,1),n.m(e,null)):n&&(te(),_(n,1,1,()=>{n=null}),ne())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){i&&b(e),n&&n.d()}}}function Toe(r){let e,t;return e=new Dt({props:{size:"M",title:"Enter details",confirmText:r[4],onConfirm:r[8],onCancel:r[2],cancelText:"Back",disabled:!r[0]||!r[1]||r[5]||!r[6],$$slots:{footer:[Ooe],default:[Eoe]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&16&&(l.confirmText=n[4]),i&4&&(l.onCancel=n[2]),i&99&&(l.disabled=!n[0]||!n[1]||n[5]||!n[6]),i&8235&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Ioe(r,e,t){let{onConfirm:n}=e,{onCancel:i}=e,{showProgressCircle:l=!1}=e,{screenName:s}=e,{screenUrl:o}=e,{confirmText:a="Continue"}=e,u,f=!1;const c=v=>{v.detail.startsWith("/")||t(1,o="/"+v.detail),t(6,f=!0),t(1,o=As(o)),p(o)?t(5,u="This URL is already taken for this access role"):t(5,u=null)},p=v=>{const k=it(Al)||"BASIC";return it(Cs).some(C=>C.routing.route.toLowerCase()===v.toLowerCase()&&C.routing.roleId===k)},d=async()=>{await n({screenName:s,screenUrl:o})};function g(v){s=v,t(0,s)}function h(v){o=v,t(1,o)}return r.$$set=v=>{"onConfirm"in v&&t(9,n=v.onConfirm),"onCancel"in v&&t(2,i=v.onCancel),"showProgressCircle"in v&&t(3,l=v.showProgressCircle),"screenName"in v&&t(0,s=v.screenName),"screenUrl"in v&&t(1,o=v.screenUrl),"confirmText"in v&&t(4,a=v.confirmText)},[s,o,i,l,a,u,f,c,d,n,g,h]}class b8 extends ie{constructor(e){super();le(this,e,Ioe,Toe,re,{onConfirm:9,onCancel:2,showProgressCircle:3,screenName:0,screenUrl:1,confirmText:4})}}function Loe(r){let e;return{c(){e=V("Duplicate")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Poe(r){let e;return{c(){e=V("Paste inside")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Noe(r){let e;return{c(){e=V("Delete")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Roe(r){let e,t,n,i,l,s;return e=new Qt({props:{icon:"Duplicate",$$slots:{default:[Loe]},$$scope:{ctx:r}}}),e.$on("click",r[4]),n=new Qt({props:{icon:"ShowOneLayer",disabled:!r[3].componentToPaste,$$slots:{default:[Poe]},$$scope:{ctx:r}}}),n.$on("click",r[10]),l=new Qt({props:{icon:"Delete",$$slots:{default:[Noe]},$$scope:{ctx:r}}}),l.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(o,a){A(e,o,a),$(o,t,a),A(n,o,a),$(o,i,a),A(l,o,a),s=!0},p(o,a){r=o;const u={};a&16384&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&8&&(f.disabled=!r[3].componentToPaste),a&16384&&(f.$$scope={dirty:a,ctx:r}),n.$set(f);const c={};a&16384&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(o){s||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){E(e,o),o&&b(t),E(n,o),o&&b(i),E(l,o)}}}function Moe(r){let e,t,n;return t=new ct({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","control"),w(e,"class","icon svelte-u6s22l")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p:Oe,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Doe(r){var n,i;let e,t;return e=new b8({props:{onConfirm:r[5],screenName:(n=r[0])==null?void 0:n.props._instanceName,screenUrl:(i=r[0])==null?void 0:i.routing.route,confirmText:"Duplicate"}}),{c(){S(e.$$.fragment)},m(l,s){A(e,l,s),t=!0},p(l,s){var a,u;const o={};s&1&&(o.screenName=(a=l[0])==null?void 0:a.props._instanceName),s&1&&(o.screenUrl=(u=l[0])==null?void 0:u.routing.route),e.$set(o)},i(l){t||(m(e.$$.fragment,l),t=!0)},o(l){_(e.$$.fragment,l),t=!1},d(l){E(e,l)}}}function joe(r){let e,t,n,i,l,s;e=new yr({props:{$$slots:{control:[Moe],default:[Roe]},$$scope:{ctx:r}}});let o={title:"Confirm Deletion",body:"Are you sure you wish to delete this screen?",okText:"Delete screen",onOk:r[6]};n=new hr({props:o}),r[11](n);let a={$$slots:{default:[Doe]},$$scope:{ctx:r}};return l=new Et({props:a}),r[12](l),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(u,f){A(e,u,f),$(u,t,f),A(n,u,f),$(u,i,f),A(l,u,f),s=!0},p(u,[f]){const c={};f&16394&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};n.$set(p);const d={};f&16385&&(d.$$scope={dirty:f,ctx:u}),l.$set(d)},i(u){s||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(l.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(l.$$.fragment,u),s=!1},d(u){E(e,u),u&&b(t),r[11](null),E(n,u),u&&b(i),r[12](null),E(l,u)}}}function Boe(r,e,t){let n,i,l,s;ue(r,qt,k=>t(13,i=k)),ue(r,Cs,k=>t(9,l=k)),ue(r,He,k=>t(3,s=k));let{screenId:o}=e,a,u;const f=()=>{u.show()},c=async({screenName:k,screenUrl:C})=>{let I=$p(n);delete I._id,delete I._rev,f1(I.props),I.routing.route=As(C),I.props._instanceName=k;try{await He.actions.screens.save(I),n.template&&qn.captureEvent(Yn.SCREEN.CREATED,{template:"createFromScratch"})}catch(O){we.error("Error duplicating screen"),console.log(O)}},p=async()=>{try{await He.actions.screens.delete(n),i("../"),we.success("Deleted screen successfully.")}catch{we.error("Error deleting screen")}},d=k=>{try{He.actions.components.paste(n==null?void 0:n.props,k)}catch{we.error("Error saving component")}},g=()=>d("inside");function h(k){K[k?"unshift":"push"](()=>{a=k,t(1,a)})}function v(k){K[k?"unshift":"push"](()=>{u=k,t(2,u)})}return r.$$set=k=>{"screenId"in k&&t(8,o=k.screenId)},r.$$.update=()=>{r.$$.dirty&768&&t(0,n=l.find(k=>k._id===o))},[n,a,u,s,f,c,p,d,o,l,g,h,v]}class zoe extends ie{constructor(e){super();le(this,e,Boe,joe,re,{screenId:8})}}function v8(r,e,t){const n=r.slice();return n[23]=e[t],n}function w8(r){let e,t,n,i;e=new Tl({props:{icon:"FolderOutline",text:r[1],opened:r[7],border:r[3],withArrow:r[0].subpaths,$$slots:{default:[qoe]},$$scope:{ctx:r}}}),e.$on("click",r[14]);let l=r[7]&&y8(r);return{c(){S(e.$$.fragment),t=R(),l&&l.c(),n=Ee()},m(s,o){A(e,s,o),$(s,t,o),l&&l.m(s,o),$(s,n,o),i=!0},p(s,o){const a={};o&2&&(a.text=s[1]),o&128&&(a.opened=s[7]),o&8&&(a.border=s[3]),o&1&&(a.withArrow=s[0].subpaths),o&67108930&&(a.$$scope={dirty:o,ctx:s}),e.$set(a),s[7]?l?(l.p(s,o),o&128&&m(l,1)):(l=y8(s),l.c(),m(l,1),l.m(n.parentNode,n)):l&&(te(),_(l,1,1,()=>{l=null}),ne())},i(s){i||(m(e.$$.fragment,s),m(l),i=!0)},o(s){_(e.$$.fragment,s),_(l),i=!1},d(s){E(e,s),s&&b(t),l&&l.d(s),s&&b(n)}}}function qoe(r){let e,t;return e=new Aoe({props:{screens:r[6],path:r[1]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&64&&(l.screens=n[6]),i&2&&(l.path=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function y8(r){let e=[],t=new Map,n,i,l=r[5];const s=o=>o[23].id;for(let o=0;o<l.length;o+=1){let a=v8(r,l,o),u=s(a);t.set(u,e[o]=C8(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=Ee()},m(o,a){for(let u=0;u<e.length;u+=1)e[u].m(o,a);$(o,n,a),i=!0},p(o,a){a&15925&&(l=o[5],te(),e=xn(e,a,s,1,o,l,t,n.parentNode,jr,C8,n,v8),ne())},i(o){if(!i){for(let a=0;a<l.length;a+=1)m(e[a]);i=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);i=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&b(n)}}}function Uoe(r){let e,t;return e=new zoe({props:{screenId:r[23].id}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&32&&(l.screenId=n[23].id),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function k8(r){let e,t;return e=new R1({props:{level:1,components:r[4].props._children,currentComponent:r[10],dragDropStore:r[12]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&16&&(l.components=n[4].props._children),i&1024&&(l.currentComponent=n[10]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function C8(r,e){var u,f;let t,n,i,l,s;function o(){return e[20](e[23])}n=new Tl({props:{icon:"WebPage",indentLevel:e[2]||1,selected:e[9].selectedScreenId===e[23].id&&e[9].currentView==="detail",opened:e[9].selectedScreenId===e[23].id,text:((u=e[11][e[23].route])==null?void 0:u[e[23].role])||e[23].route,withArrow:e[0].subpaths,$$slots:{default:[Uoe]},$$scope:{ctx:e}}}),n.$on("click",o);let a=((f=e[4])==null?void 0:f._id)===e[23].id&&k8(e);return{key:r,first:null,c(){t=Ee(),S(n.$$.fragment),i=R(),a&&a.c(),l=Ee(),this.first=t},m(c,p){$(c,t,p),A(n,c,p),$(c,i,p),a&&a.m(c,p),$(c,l,p),s=!0},p(c,p){var g,h;e=c;const d={};p&4&&(d.indentLevel=e[2]||1),p&544&&(d.selected=e[9].selectedScreenId===e[23].id&&e[9].currentView==="detail"),p&544&&(d.opened=e[9].selectedScreenId===e[23].id),p&32&&(d.text=((g=e[11][e[23].route])==null?void 0:g[e[23].role])||e[23].route),p&1&&(d.withArrow=e[0].subpaths),p&67108896&&(d.$$scope={dirty:p,ctx:e}),n.$set(d),((h=e[4])==null?void 0:h._id)===e[23].id?a?(a.p(e,p),p&48&&m(a,1)):(a=k8(e),a.c(),m(a,1),a.m(l.parentNode,l)):a&&(te(),_(a,1,1,()=>{a=null}),ne())},i(c){s||(m(n.$$.fragment,c),m(a),s=!0)},o(c){_(n.$$.fragment,c),_(a),s=!1},d(c){c&&b(t),E(n,c),c&&b(i),a&&a.d(c),c&&b(l)}}}function Foe(r){let e,t,n=!r[8]&&w8(r);return{c(){n&&n.c(),e=Ee()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,[l]){i[8]?n&&(te(),_(n,1,1,()=>{n=null}),ne()):n?(n.p(i,l),l&256&&m(n,1)):(n=w8(i),n.c(),m(n,1),n.m(e.parentNode,e))},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function Voe(r,e,t){let n,i,l,s,o,a,u,f,c,p,d;ue(r,Vf,z=>t(18,f=z)),ue(r,un,z=>t(19,c=z)),ue(r,He,z=>t(9,p=z)),ue(r,ri,z=>t(10,d=z));const g={"/":{BASIC:"Home",PUBLIC:"Home",ADMIN:"Home",POWER:"Home"}},h=u8();let{route:v}=e,{path:k}=e,{indent:C}=e,{border:I}=e,O=!1;const T=z=>{He.actions.screens.select(z)},P=z=>{let q=[];return Object.entries(z.subpaths).forEach(([H,Y])=>{Object.entries(Y.screens).forEach(([U,W])=>{q.push({id:W,route:H,role:U})})}),q},M=(z,q)=>z.filter(H=>!q||H.route.includes(q)),F=()=>{it(Vf)||t(15,O=!O)},j=z=>T(z.id);return r.$$set=z=>{"route"in z&&t(0,v=z.route),"path"in z&&t(1,k=z.path),"indent"in z&&t(2,C=z.indent),"border"in z&&t(3,I=z.border)},r.$$.update=()=>{var z;r.$$.dirty&524288&&t(4,n=c),r.$$.dirty&1&&t(6,i=P(v)),r.$$.dirty&262208&&t(5,l=M(i,f)),r.$$.dirty&262176&&t(16,s=f&&l.length>0),r.$$.dirty&262176&&t(8,o=f&&!l.length),r.$$.dirty&17&&t(17,a=v.subpaths[(z=n==null?void 0:n.routing)==null?void 0:z.route]!==void 0),r.$$.dirty&229376&&t(7,u=O||a||s)},[v,k,C,I,n,l,i,u,o,p,d,g,h,T,F,O,s,a,f,c,j]}class Hoe extends ie{constructor(e){super();le(this,e,Voe,Foe,re,{route:0,path:1,indent:2,border:3})}}function S8(r,e,t){const n=r.slice();return n[4]=e[t],n[6]=t,n}function A8(r,e){let t,n,i;return n=new Hoe({props:{border:e[6]>0,path:e[4],route:e[0][e[4]]}}),{key:r,first:null,c(){t=Ee(),S(n.$$.fragment),this.first=t},m(l,s){$(l,t,s),A(n,l,s),i=!0},p(l,s){e=l;const o={};s&2&&(o.border=e[6]>0),s&2&&(o.path=e[4]),s&3&&(o.route=e[0][e[4]]),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(t),E(n,l)}}}function E8(r){let e;return{c(){e=D("div"),e.textContent="There aren't any screens configured with this access role.",w(e,"class","empty svelte-1xoqjkm")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Woe(r){let e,t=[],n=new Map,i,l,s=r[1];const o=u=>u[4];for(let u=0;u<s.length;u+=1){let f=S8(r,s,u),c=o(f);n.set(c,t[u]=A8(c,f))}let a=!r[1].length&&E8();return{c(){var u;e=D("div");for(let f=0;f<t.length;f+=1)t[f].c();i=R(),a&&a.c(),w(e,"class","root svelte-1xoqjkm"),oe(e,"has-screens",!!((u=r[1])==null?void 0:u.length))},m(u,f){$(u,e,f);for(let c=0;c<t.length;c+=1)t[c].m(e,null);N(e,i),a&&a.m(e,null),l=!0},p(u,[f]){var c;f&3&&(s=u[1],te(),t=xn(t,f,o,1,u,s,n,e,jr,A8,i,S8),ne()),u[1].length?a&&(a.d(1),a=null):a||(a=E8(),a.c(),a.m(e,null)),f&2&&oe(e,"has-screens",!!((c=u[1])==null?void 0:c.length))},i(u){if(!l){for(let f=0;f<s.length;f+=1)m(t[f]);l=!0}},o(u){for(let f=0;f<t.length;f+=1)_(t[f]);l=!1},d(u){u&&b(e);for(let f=0;f<t.length;f+=1)t[f].d();a&&a.d()}}}function Goe(r,e,t){let n,i,l;ue(r,He,o=>t(2,i=o)),ue(r,Al,o=>t(3,l=o));let s={};return r.$$.update=()=>{if(r.$$.dirty&12){const o=i.routes,a=Object.keys(o||{}).sort(),u=l,f=i.selectedScreenId;let c=!1,p,d={},g;a.forEach(h=>{const v=o[h];Object.entries(v.subpaths).forEach(([k,C])=>{Object.entries(C.screens).forEach(([I,O])=>{O===f&&(g=I,c=I===u),I===u&&(p||(p=O),d[h]||(d[h]={subpaths:{}}),d[h].subpaths[k]={screens:{[u]:O}})})})}),t(0,s=d),!c&&g?Al.set(g):!c&&p&&He.actions.screens.select(p)}r.$$.dirty&1&&t(1,n=Object.keys(s||{}).sort())},[s,n,i,l]}class Yoe extends ie{constructor(e){super();le(this,e,Goe,Woe,re,{})}}function Joe(r){let e;return{c(){e=V("Edit")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Qoe(r){let e;return{c(){e=V("Delete")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Xoe(r){let e,t,n,i;return e=new Qt({props:{icon:"Edit",$$slots:{default:[Joe]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)}),n=new Qt({props:{icon:"Delete",$$slots:{default:[Qoe]},$$scope:{ctx:r}}}),n.$on("click",function(){mt(r[0].show)&&r[0].show.apply(this,arguments)}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(l,s){A(e,l,s),$(l,t,s),A(n,l,s),i=!0},p(l,s){r=l;const o={};s&512&&(o.$$scope={dirty:s,ctx:r}),e.$set(o);const a={};s&512&&(a.$$scope={dirty:s,ctx:r}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){E(e,l),l&&b(t),E(n,l)}}}function Koe(r){let e,t,n;return t=new ct({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","control"),w(e,"class","icon svelte-u6s22l")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p:Oe,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Zoe(r){let e,t,n;function i(s){r[7](s)}let l={thin:!0,type:"text",label:"Name"};return r[2]!==void 0&&(l.value=r[2]),e=new tt({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};!t&&o&4&&(t=!0,a.value=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){E(e,s)}}}function xoe(r){let e,t;return e=new Dt({props:{title:"Edit Layout Name",confirmText:"Save",onConfirm:r[4],disabled:!r[2],$$slots:{default:[Zoe]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.disabled=!n[2]),i&516&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function eae(r){let e,t,n,i,l,s;e=new yr({props:{$$slots:{control:[Koe],default:[Xoe]},$$scope:{ctx:r}}});let o={title:"Confirm Deletion",body:"Are you sure you wish to delete this layout?",okText:"Delete layout",onOk:r[3]};n=new hr({props:o}),r[6](n);let a={$$slots:{default:[xoe]},$$scope:{ctx:r}};return l=new Et({props:a}),r[8](l),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(u,f){A(e,u,f),$(u,t,f),A(n,u,f),$(u,i,f),A(l,u,f),s=!0},p(u,[f]){const c={};f&515&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};n.$set(p);const d={};f&516&&(d.$$scope={dirty:f,ctx:u}),l.$set(d)},i(u){s||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(l.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(l.$$.fragment,u),s=!1},d(u){E(e,u),u&&b(t),r[6](null),E(n,u),u&&b(i),r[8](null),E(l,u)}}}function tae(r,e,t){let{layout:n}=e,i,l,s=n.name;const o=async()=>{try{await He.actions.layouts.delete(n),we.success("Layout deleted successfully")}catch{we.error("Error deleting layout")}},a=async()=>{try{const p=vn.cloneDeep(n);p.name=s,await He.actions.layouts.save(p),we.success("Layout saved successfully")}catch{we.error("Error saving layout")}};function u(p){K[p?"unshift":"push"](()=>{i=p,t(0,i)})}function f(p){s=p,t(2,s)}function c(p){K[p?"unshift":"push"](()=>{l=p,t(1,l)})}return r.$$set=p=>{"layout"in p&&t(5,n=p.layout)},[i,l,s,o,a,n,u,f,c]}class nae extends ie{constructor(e){super();le(this,e,tae,eae,re,{layout:5})}}function rae(r){let e,t;return e=new nae({props:{layout:r[0]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.layout=n[0]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function O8(r){let e,t;return e=new R1({props:{components:r[0].props._children,currentComponent:r[3],dragDropStore:r[4]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.components=n[0].props._children),i&8&&(l.currentComponent=n[3]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function iae(r){var s;let e,t,n,i;e=new Tl({props:{border:r[1],icon:"ClassicGridView",text:r[0].name,withArrow:!0,selected:r[2].selectedLayoutId===r[0]._id,opened:r[2].selectedLayoutId===r[0]._id,$$slots:{default:[rae]},$$scope:{ctx:r}}}),e.$on("click",r[5]);let l=r[2].selectedLayoutId===r[0]._id&&((s=r[0].props)==null?void 0:s._children)&&O8(r);return{c(){S(e.$$.fragment),t=R(),l&&l.c(),n=Ee()},m(o,a){A(e,o,a),$(o,t,a),l&&l.m(o,a),$(o,n,a),i=!0},p(o,[a]){var f;const u={};a&2&&(u.border=o[1]),a&1&&(u.text=o[0].name),a&5&&(u.selected=o[2].selectedLayoutId===o[0]._id),a&5&&(u.opened=o[2].selectedLayoutId===o[0]._id),a&65&&(u.$$scope={dirty:a,ctx:o}),e.$set(u),o[2].selectedLayoutId===o[0]._id&&((f=o[0].props)==null?void 0:f._children)?l?(l.p(o,a),a&5&&m(l,1)):(l=O8(o),l.c(),m(l,1),l.m(n.parentNode,n)):l&&(te(),_(l,1,1,()=>{l=null}),ne())},i(o){i||(m(e.$$.fragment,o),m(l),i=!0)},o(o){_(e.$$.fragment,o),_(l),i=!1},d(o){E(e,o),o&&b(t),l&&l.d(o),o&&b(n)}}}function lae(r,e,t){let n,i;ue(r,He,u=>t(2,n=u)),ue(r,ri,u=>t(3,i=u));let{layout:l}=e,{border:s}=e;const o=u8(),a=()=>{He.actions.layouts.select(l._id)};return r.$$set=u=>{"layout"in u&&t(0,l=u.layout),"border"in u&&t(1,s=u.border)},[l,s,n,i,o,a]}class sae extends ie{constructor(e){super();le(this,e,lae,iae,re,{layout:0,border:1})}}function oae(r){let e,t,n;function i(s){r[2](s)}let l={thin:!0,label:"Name"};return r[0]!==void 0&&(l.value=r[0]),e=new tt({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,o){const a={};!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){E(e,s)}}}function aae(r){let e,t;return e=new Dt({props:{title:"Create Layout",confirmText:"Create",onConfirm:r[1],$$slots:{default:[oae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&9&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function uae(r,e,t){let n="";async function i(){try{await He.actions.layouts.save({name:n}),we.success(`Layout ${n} created successfully`)}catch{we.error("Error creating layout")}}function l(s){n=s,t(0,n)}return[n,i,l]}class fae extends ie{constructor(e){super();le(this,e,uae,aae,re,{})}}function T8(r,e,t){const n=r.slice();return n[19]=e[t],n[21]=t,n}function cae(r){let e,t,n,i,l;e=new Xe({props:{value:r[4],label:"Filter by Access",getOptionLabel:hae,getOptionValue:$ae,options:r[5]}}),e.$on("change",r[9]);function s(a){r[11](a)}let o={placeholder:"Enter a route to search",label:"Search Screens"};return r[6]!==void 0&&(o.value=r[6]),n=new Df({props:o}),K.push(()=>ce(n,"value",s)),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(a,u){A(e,a,u),$(a,t,u),A(n,a,u),l=!0},p(a,u){const f={};u&16&&(f.value=a[4]),u&32&&(f.options=a[5]),e.$set(f);const c={};!i&&u&64&&(i=!0,c.value=a[6],pe(()=>i=!1)),n.$set(c)},i(a){l||(m(e.$$.fragment,a),m(n.$$.fragment,a),l=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),l=!1},d(a){E(e,a),a&&b(t),E(n,a)}}}function pae(r){let e,t,n,i,l,s;return t=new Qe({props:{noPadding:!0,gap:"XS",$$slots:{default:[cae]},$$scope:{ctx:r}}}),l=new Yoe({}),{c(){e=D("div"),S(t.$$.fragment),n=R(),i=D("div"),S(l.$$.fragment),w(i,"class","nav-items-container svelte-1laltek"),w(e,"class","tab-content-padding svelte-1laltek")},m(o,a){$(o,e,a),A(t,e,null),N(e,n),N(e,i),A(l,i,null),r[12](i),s=!0},p(o,a){const u={};a&4194416&&(u.$$scope={dirty:a,ctx:o}),t.$set(u)},i(o){s||(m(t.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){o&&b(e),E(t),E(l),r[12](null)}}}function I8(r,e){let t,n,i;return n=new sae({props:{layout:e[19],border:e[21]>0}}),{key:r,first:null,c(){t=Ee(),S(n.$$.fragment),this.first=t},m(l,s){$(l,t,s),A(n,l,s),i=!0},p(l,s){e=l;const o={};s&128&&(o.layout=e[19]),s&128&&(o.border=e[21]>0),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(t),E(n,l)}}}function dae(r){let e,t;return e=new fae({}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function mae(r){let e,t,n,i=[],l=new Map,s,o,a,u=r[7].layouts;const f=p=>p[19]._id;for(let p=0;p<u.length;p+=1){let d=T8(r,u,p),g=f(d);l.set(g,i[p]=I8(g,d))}let c={$$slots:{default:[dae]},$$scope:{ctx:r}};return o=new Et({props:c}),r[14](o),{c(){e=D("div"),t=D("div"),n=D("div");for(let p=0;p<i.length;p+=1)i[p].c();s=R(),S(o.$$.fragment),w(n,"class","layouts-container svelte-1laltek"),w(t,"class","nav-items-container nav-items-container--layouts svelte-1laltek"),w(e,"class","tab-content-padding svelte-1laltek")},m(p,d){$(p,e,d),N(e,t),N(t,n);for(let g=0;g<i.length;g+=1)i[g].m(n,null);r[13](t),N(e,s),A(o,e,null),a=!0},p(p,d){d&128&&(u=p[7].layouts,te(),i=xn(i,d,f,1,p,u,l,n,jr,I8,null,T8),ne());const g={};d&4194304&&(g.$$scope={dirty:d,ctx:p}),o.$set(g)},i(p){if(!a){for(let d=0;d<u.length;d+=1)m(i[d]);m(o.$$.fragment,p),a=!0}},o(p){for(let d=0;d<i.length;d+=1)_(i[d]);_(o.$$.fragment,p),a=!1},d(p){p&&b(e);for(let d=0;d<i.length;d+=1)i[d].d();r[13](null),r[14](null),E(o)}}}function gae(r){let e,t,n,i;return e=new bn({props:{title:"Screens",$$slots:{default:[pae]},$$scope:{ctx:r}}}),n=new bn({props:{title:"Layouts",$$slots:{default:[mae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(l,s){A(e,l,s),$(l,t,s),A(n,l,s),i=!0},p(l,s){const o={};s&4194418&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&4194438&&(a.$$scope={dirty:s,ctx:l}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){E(e,l),l&&b(t),E(n,l)}}}function _ae(r){let e,t,n,i,l,s;return t=new Vr({props:{selected:r[3],$$slots:{default:[gae]},$$scope:{ctx:r}}}),t.$on("select",r[8]),l=new ct({props:{hoverable:!0,name:"AddCircle"}}),l.$on("click",function(){mt(r[3]==="Layouts"?r[2].show():r[0]())&&(r[3]==="Layouts"?r[2].show():r[0]()).apply(this,arguments)}),{c(){e=D("div"),S(t.$$.fragment),n=R(),i=D("div"),S(l.$$.fragment),w(i,"class","add-button svelte-1laltek"),w(e,"class","title svelte-1laltek")},m(o,a){$(o,e,a),A(t,e,null),N(e,n),N(e,i),A(l,i,null),s=!0},p(o,[a]){r=o;const u={};a&8&&(u.selected=r[3]),a&4194550&&(u.$$scope={dirty:a,ctx:r}),t.$set(u)},i(o){s||(m(t.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){o&&b(e),E(t),E(l)}}}const hae=r=>r.name,$ae=r=>r._id;function bae(r,e,t){let n,i,l,s,o,a,u,f;ue(r,Cs,P=>t(15,i=P)),ue(r,qt,P=>t(16,l=P)),ue(r,er,P=>t(10,s=P)),ue(r,Al,P=>t(4,o=P)),ue(r,Zi,P=>t(5,a=P)),ue(r,Vf,P=>t(6,u=P)),ue(r,He,P=>t(7,f=P));let{showModal:c}=e,p;Do("scroll",{scrollTo:P=>{if(!P)return;const M=259,F=32,{scrollLeft:j,scrollTop:z,offsetHeight:q}=p;let H=p.getBoundingClientRect(),Y={};const U=P.left+P.width+j+20;U>M?Y.left=U-M:Y.left=0,Y.left===j&&delete Y.left;const W=P.top-(H==null?void 0:H.top)+z;W>z+q-2*F?Y.top=W-q+2*F:W<z+F?Y.top=W-F:delete Y.top,!(Y.left==null&&Y.top==null)&&p.scroll(lt(Se({},Y),{behavior:"smooth"}))}});const g=[{title:"Screens",key:"screen"},{title:"Layouts",key:"layout"}];let h;const v=({detail:P})=>{const{key:M}=g.find(F=>F.title===P);l(`../${M}`)},k=P=>{var j;const M=P.detail,F=(j=i.find(z=>z.routing.roleId===M))==null?void 0:j._id;F?He.actions.screens.select(F):He.update(z=>(z.selectedScreenId=null,z)),Al.set(M)};Gt(async()=>{try{await He.actions.routing.fetch()}catch{we.error("Error fetching routes")}});function C(P){u=P,Vf.set(u)}function I(P){K[P?"unshift":"push"](()=>{p=P,t(1,p)})}function O(P){K[P?"unshift":"push"](()=>{p=P,t(1,p)})}function T(P){K[P?"unshift":"push"](()=>{h=P,t(2,h)})}return r.$$set=P=>{"showModal"in P&&t(0,c=P.showModal)},r.$$.update=()=>{var P;r.$$.dirty&1024&&t(3,n=((P=g.find(M=>M.key===s.assetType))==null?void 0:P.title)||"Screens")},[c,p,h,n,o,a,u,f,v,k,s,C,I,O,T]}class vae extends ie{constructor(e){super();le(this,e,bae,_ae,re,{showModal:0})}}function wae(r){let e,t,n;return t=new Xe({props:{value:r[0].theme,options:r[1],placeholder:null}}),t.$on("change",r[3]),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","svelte-12k7lrs")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,[l]){const s={};l&1&&(s.value=i[0].theme),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function yae(r,e,t){let n;ue(r,He,o=>t(0,n=o));const i=[{label:"Lightest",value:"spectrum--lightest"},{label:"Light",value:"spectrum--light"},{label:"Dark",value:"spectrum--dark"},{label:"Darkest",value:"spectrum--darkest"}],l=async o=>{try{await He.actions.theme.save(o),await He.actions.customTheme.save(lt(Se({},it(He).customTheme),{navBackground:o==="spectrum--light"?"var(--spectrum-global-color-gray-50)":"var(--spectrum-global-color-gray-100)"}))}catch{we.error("Error updating theme")}};return[n,i,l,o=>l(o.detail)]}class L8 extends ie{constructor(e){super();le(this,e,yae,wae,re,{})}}function kae(r){let e;return{c(){e=V("Theme")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Cae(r){let e;return{c(){e=V("Theme")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Sae(r){let e;return{c(){e=V("Button roundness")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Aae(r){let e;return{c(){e=V("Accent color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Eae(r){let e;return{c(){e=V("Accent color (hover)")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Oae(r){let e;return{c(){e=V("Navigation bar background color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Tae(r){let e;return{c(){e=V("Navigation bar text color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Iae(r){var G,Q,fe,Z,ee;let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h,v,k,C,I,O,T,P,M,F,j,z,q,H,Y,U,W;return t=new Ze({props:{size:"L",$$slots:{default:[Cae]},$$scope:{ctx:r}}}),i=new L8({}),o=new Ze({props:{size:"L",$$slots:{default:[Sae]},$$scope:{ctx:r}}}),f=new Xe({props:{placeholder:null,value:((G=r[1].customTheme)==null?void 0:G.buttonBorderRadius)||r[2].buttonBorderRadius,options:r[3]}}),f.$on("change",r[4]("buttonBorderRadius")),d=new Ze({props:{size:"L",$$slots:{default:[Aae]},$$scope:{ctx:r}}}),h=new Jl({props:{spectrumTheme:r[1].theme,value:((Q=r[1].customTheme)==null?void 0:Q.primaryColor)||r[2].primaryColor}}),h.$on("change",r[4]("primaryColor")),C=new Ze({props:{size:"L",$$slots:{default:[Eae]},$$scope:{ctx:r}}}),O=new Jl({props:{spectrumTheme:r[1].theme,value:((fe=r[1].customTheme)==null?void 0:fe.primaryColorHover)||r[2].primaryColorHover}}),O.$on("change",r[4]("primaryColorHover")),M=new Ze({props:{size:"L",$$slots:{default:[Oae]},$$scope:{ctx:r}}}),j=new Jl({props:{spectrumTheme:r[1].theme,value:((Z=r[1].customTheme)==null?void 0:Z.navBackground)||r[2].navBackground}}),j.$on("change",r[4]("navBackground")),H=new Ze({props:{size:"L",$$slots:{default:[Tae]},$$scope:{ctx:r}}}),U=new Jl({props:{spectrumTheme:r[1].theme,value:((ee=r[1].customTheme)==null?void 0:ee.navTextColor)||r[2].navTextColor}}),U.$on("change",r[4]("navTextColor")),{c(){e=D("div"),S(t.$$.fragment),n=R(),S(i.$$.fragment),l=R(),s=D("div"),S(o.$$.fragment),a=R(),u=D("div"),S(f.$$.fragment),c=R(),p=D("div"),S(d.$$.fragment),g=R(),S(h.$$.fragment),v=R(),k=D("div"),S(C.$$.fragment),I=R(),S(O.$$.fragment),T=R(),P=D("div"),S(M.$$.fragment),F=R(),S(j.$$.fragment),z=R(),q=D("div"),S(H.$$.fragment),Y=R(),S(U.$$.fragment),w(e,"class","setting svelte-16s1p8l"),w(u,"class","select-wrapper svelte-16s1p8l"),w(s,"class","setting svelte-16s1p8l"),w(p,"class","setting svelte-16s1p8l"),w(k,"class","setting svelte-16s1p8l"),w(P,"class","setting svelte-16s1p8l"),w(q,"class","setting svelte-16s1p8l")},m(ae,_e){$(ae,e,_e),A(t,e,null),N(e,n),A(i,e,null),$(ae,l,_e),$(ae,s,_e),A(o,s,null),N(s,a),N(s,u),A(f,u,null),$(ae,c,_e),$(ae,p,_e),A(d,p,null),N(p,g),A(h,p,null),$(ae,v,_e),$(ae,k,_e),A(C,k,null),N(k,I),A(O,k,null),$(ae,T,_e),$(ae,P,_e),A(M,P,null),N(P,F),A(j,P,null),$(ae,z,_e),$(ae,q,_e),A(H,q,null),N(q,Y),A(U,q,null),W=!0},p(ae,_e){var ye,Je,Nt,qe,pt;const Re={};_e&128&&(Re.$$scope={dirty:_e,ctx:ae}),t.$set(Re);const $e={};_e&128&&($e.$$scope={dirty:_e,ctx:ae}),o.$set($e);const be={};_e&2&&(be.value=((ye=ae[1].customTheme)==null?void 0:ye.buttonBorderRadius)||ae[2].buttonBorderRadius),f.$set(be);const he={};_e&128&&(he.$$scope={dirty:_e,ctx:ae}),d.$set(he);const Ne={};_e&2&&(Ne.spectrumTheme=ae[1].theme),_e&2&&(Ne.value=((Je=ae[1].customTheme)==null?void 0:Je.primaryColor)||ae[2].primaryColor),h.$set(Ne);const Fe={};_e&128&&(Fe.$$scope={dirty:_e,ctx:ae}),C.$set(Fe);const se={};_e&2&&(se.spectrumTheme=ae[1].theme),_e&2&&(se.value=((Nt=ae[1].customTheme)==null?void 0:Nt.primaryColorHover)||ae[2].primaryColorHover),O.$set(se);const Ce={};_e&128&&(Ce.$$scope={dirty:_e,ctx:ae}),M.$set(Ce);const me={};_e&2&&(me.spectrumTheme=ae[1].theme),_e&2&&(me.value=((qe=ae[1].customTheme)==null?void 0:qe.navBackground)||ae[2].navBackground),j.$set(me);const ke={};_e&128&&(ke.$$scope={dirty:_e,ctx:ae}),H.$set(ke);const ze={};_e&2&&(ze.spectrumTheme=ae[1].theme),_e&2&&(ze.value=((pt=ae[1].customTheme)==null?void 0:pt.navTextColor)||ae[2].navTextColor),U.$set(ze)},i(ae){W||(m(t.$$.fragment,ae),m(i.$$.fragment,ae),m(o.$$.fragment,ae),m(f.$$.fragment,ae),m(d.$$.fragment,ae),m(h.$$.fragment,ae),m(C.$$.fragment,ae),m(O.$$.fragment,ae),m(M.$$.fragment,ae),m(j.$$.fragment,ae),m(H.$$.fragment,ae),m(U.$$.fragment,ae),W=!0)},o(ae){_(t.$$.fragment,ae),_(i.$$.fragment,ae),_(o.$$.fragment,ae),_(f.$$.fragment,ae),_(d.$$.fragment,ae),_(h.$$.fragment,ae),_(C.$$.fragment,ae),_(O.$$.fragment,ae),_(M.$$.fragment,ae),_(j.$$.fragment,ae),_(H.$$.fragment,ae),_(U.$$.fragment,ae),W=!1},d(ae){ae&&b(e),E(t),E(i),ae&&b(l),ae&&b(s),E(o),E(f),ae&&b(c),ae&&b(p),E(d),E(h),ae&&b(v),ae&&b(k),E(C),E(O),ae&&b(T),ae&&b(P),E(M),E(j),ae&&b(z),ae&&b(q),E(H),E(U)}}}function Lae(r){let e,t;return e=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[Iae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&130&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Pae(r){let e;return{c(){e=V("Reset")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Nae(r){let e,t,n;return t=new gt({props:{secondary:!0,quiet:!0,$$slots:{default:[Pae]},$$scope:{ctx:r}}}),t.$on("click",r[5]),{c(){e=D("div"),S(t.$$.fragment),w(e,"slot","footer")},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,l){const s={};l&128&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function Rae(r){let e,t;return e=new Dt({props:{showConfirmButton:!1,cancelText:"View changes",showCloseIcon:!1,title:"Theme settings",$$slots:{footer:[Nae],default:[Lae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&130&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Mae(r){let e,t,n,i,l;t=new Jt({props:{icon:"Brush",$$slots:{default:[kae]},$$scope:{ctx:r}}}),t.$on("click",function(){mt(r[0].show)&&r[0].show.apply(this,arguments)});let s={$$slots:{default:[Rae]},$$scope:{ctx:r}};return i=new Et({props:s}),r[6](i),{c(){e=D("div"),S(t.$$.fragment),n=R(),S(i.$$.fragment),w(e,"class","container svelte-16s1p8l")},m(o,a){$(o,e,a),A(t,e,null),$(o,n,a),A(i,o,a),l=!0},p(o,[a]){r=o;const u={};a&128&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a&130&&(f.$$scope={dirty:a,ctx:r}),i.$set(f)},i(o){l||(m(t.$$.fragment,o),m(i.$$.fragment,o),l=!0)},o(o){_(t.$$.fragment,o),_(i.$$.fragment,o),l=!1},d(o){o&&b(e),E(t),o&&b(n),r[6](null),E(i,o)}}}function Dae(r,e,t){let n;ue(r,He,f=>t(1,n=f));let i;const l={primaryColor:"var(--spectrum-global-color-blue-600)",primaryColorHover:"var(--spectrum-global-color-blue-500)",buttonBorderRadius:"16px",navBackground:"var(--spectrum-global-color-gray-50)",navTextColor:"var(--spectrum-global-color-gray-800)"},s=[{label:"None",value:"0"},{label:"Small",value:"4px"},{label:"Medium",value:"8px"},{label:"Large",value:"16px"}],o=f=>async c=>{try{He.actions.customTheme.save(lt(Se({},it(He).customTheme),{[f]:c.detail}))}catch{we.error("Error updating custom theme")}},a=()=>{try{const f=it(He).theme;He.actions.customTheme.save(lt(Se({},l),{navBackground:f==="spectrum--light"?"var(--spectrum-global-color-gray-50)":"var(--spectrum-global-color-gray-100)"}))}catch{we.error("Error saving custom theme")}};function u(f){K[f?"unshift":"push"](()=>{i=f,t(0,i)})}return[i,n,l,s,o,a,u]}class jae extends ie{constructor(e){super();le(this,e,Dae,Mae,re,{})}}function Bae(r){let e,t,n,i,l,s;return e=new Jt({props:{icon:"DeviceDesktop",selected:r[0].previewDevice==="desktop"}}),e.$on("click",r[1]),n=new Jt({props:{icon:"DeviceTablet",selected:r[0].previewDevice==="tablet"}}),n.$on("click",r[2]),l=new Jt({props:{icon:"DevicePhone",selected:r[0].previewDevice==="mobile"}}),l.$on("click",r[3]),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(o,a){A(e,o,a),$(o,t,a),A(n,o,a),$(o,i,a),A(l,o,a),s=!0},p(o,a){const u={};a&1&&(u.selected=o[0].previewDevice==="desktop"),e.$set(u);const f={};a&1&&(f.selected=o[0].previewDevice==="tablet"),n.$set(f);const c={};a&1&&(c.selected=o[0].previewDevice==="mobile"),l.$set(c)},i(o){s||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){E(e,o),o&&b(t),E(n,o),o&&b(i),E(l,o)}}}function zae(r){let e,t;return e=new gh({props:{compact:!0,$$slots:{default:[Bae]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&17&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function qae(r,e,t){let n;return ue(r,He,o=>t(0,n=o)),[n,()=>He.actions.preview.setDevice("desktop"),()=>He.actions.preview.setDevice("tablet"),()=>He.actions.preview.setDevice("mobile")]}class Uae extends ie{constructor(e){super();le(this,e,qae,zae,re,{})}}var P8="/builder/assets/bb-space-man.5be51a45.svg";function Fae(r){return r.map(e=>({name:`${e.name} - Detail`,create:()=>Gae(e),id:Vae,table:e.name}))}const Vae="ROW_DETAIL_TEMPLATE",Hae=r=>As(`/${r.name}/:id`);function Wae(r,e,t,n){const i=f6(r,t),l=new Jn("@budibase/standard-components/button").text("Delete").customProps({type:"secondary",quiet:!0,size:"M",onClick:[{parameters:{tableId:r._id,rowId:`{{ ${$n(n)}.${$n("_id")} }}`,revId:`{{ ${$n(n)}.${$n("_rev")} }}`,confirm:!0},"##eventHandlerType":"Delete Row"},{parameters:{url:Kf(r)},"##eventHandlerType":"Navigate To"}]}).instanceName("Delete Button"),s=new Jn("@budibase/standard-components/container").instanceName("Button Container").customProps({direction:"row",hAlign:"right",vAlign:"middle",size:"shrink",gap:"M"}).addChild(l).addChild(i);return c6(e).addChild(s)}const Gae=r=>{const e=new Jn("@budibase/standard-components/dataprovider").instanceName("Data Provider").customProps({dataSource:{label:r.name,name:r._id,tableId:r._id,type:"table"},filter:[{field:"_id",operator:"equal",type:"string",value:`{{ ${$n("url")}.${$n("id")} }}`,valueType:"Binding"}],limit:1,paginate:!1}),t=new Jn("@budibase/standard-components/repeater").instanceName("Repeater").customProps({dataProvider:`{{ literal ${$n(e._json._id)} }}`,noRowsMessage:"We couldn't find a row to display"}),n=a6().instanceName("Form").customProps({actionType:"Update",size:"spectrum--medium",dataSource:{label:r.name,tableId:r._id,type:"table"}}),i=new Jn("@budibase/standard-components/fieldgroup").instanceName("Field Group").customProps({labelPosition:"left"}),l={type:"table",tableId:r._id};S1(l).forEach(u=>{i.addChild(u)});const s=n._json._id,o=t._json._id,a=r.primaryDisplay?`{{ ${$n(o)}.${$n(r.primaryDisplay)} }}`:null;return n.addChild(u6(r.name,a||"Edit")).addChild(Wae(r,a||"Edit Row",s,o)).addChild(i),t.addChild(n),e.addChild(t),new Ia().instanceName(`${r.name} - Detail`).route(Hae(r)).customProps({hAlign:"center"}).addChild(e).json()};var Yae={name:"Create from scratch",id:"createFromScratch",create:()=>Jae(),table:"Create from scratch"};const Jae=()=>new Ia().instanceName("New Screen").json(),Qae=r=>[...Kx(r),...Fae(r),...tee(r)],Xae=(r,e)=>()=>{const t=e.create();return t.name=t.props._id,t.routing.route=t.routing.route.toLowerCase(),t.template=e.id,t};var N8=(r,e)=>{const t=l=>lt(Se({},l),{create:Xae(r,l)}),n=t(Yae),i=Qae(e).map(t);return[n,...i.sort((l,s)=>l.name>s.name?1:-1)]};function R8(r,e,t){const n=r.slice();return n[17]=e[t],n}function Kae(r){let e;return{c(){e=V(`Please select the screens you would like to add to your application.
|
|
1229
1229
|
Autogenerated screens come with CRUD functionality.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Zae(r){let e;return{c(){e=V("Blank screen")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function M8(r){let e,t,n;return t=new ct({props:{size:"S",name:"CheckmarkCircleOutline"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","checkmark-spacing svelte-1t0fa8v")},m(i,l){$(i,e,l),A(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function D8(r){let e,t,n,i;e=new mr({props:{size:"S",$$slots:{default:[xae]},$$scope:{ctx:r}}});let l=r[5].list.filter(U8),s=[];for(let a=0;a<l.length;a+=1)s[a]=B8(R8(r,l,a));const o=a=>_(s[a],1,1,()=>{s[a]=null});return{c(){S(e.$$.fragment),t=R();for(let a=0;a<s.length;a+=1)s[a].c();n=Ee()},m(a,u){A(e,a,u),$(a,t,u);for(let f=0;f<s.length;f+=1)s[f].m(a,u);$(a,n,u),i=!0},p(a,u){const f={};if(u&1048576&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),u&172){l=a[5].list.filter(U8);let c;for(c=0;c<l.length;c+=1){const p=R8(a,l,c);s[c]?(s[c].p(p,u),m(s[c],1)):(s[c]=B8(p),s[c].c(),m(s[c],1),s[c].m(n.parentNode,n))}for(te(),c=l.length;c<s.length;c+=1)o(c);ne()}},i(a){if(!i){m(e.$$.fragment,a);for(let u=0;u<l.length;u+=1)m(s[u]);i=!0}},o(a){_(e.$$.fragment,a),s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)_(s[u]);i=!1},d(a){E(e,a),a&&b(t),$t(s,a),a&&b(n)}}}function xae(r){let e;return{c(){e=V("Autogenerated Screens")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function j8(r){let e,t,n;return t=new ct({props:{size:"S",name:"CheckmarkCircleOutline"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","checkmark-spacing svelte-1t0fa8v")},m(i,l){$(i,e,l),A(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function B8(r){let e,t,n,i=r[17].name+"",l,s,o,a=r[2].find(d),u,f,c,p;function d(...k){return r[10](r[17],...k)}let g=a&&j8();function h(){return r[14](r[17])}function v(...k){return r[15](r[17],...k)}return{c(){e=D("div"),t=D("div"),n=D("div"),l=V(i),s=R(),o=D("div"),g&&g.c(),u=R(),w(n,"class","text svelte-1t0fa8v"),w(t,"class","content svelte-1t0fa8v"),zt(o,"color","var(--spectrum-global-color-green-600)"),zt(o,"float","right"),w(e,"class","item svelte-1t0fa8v"),oe(e,"disabled",r[3]),oe(e,"selected",r[2].find(v))},m(k,C){$(k,e,C),N(e,t),N(t,n),N(n,l),N(e,s),N(e,o),g&&g.m(o,null),N(e,u),f=!0,c||(p=Pe(e,"click",h),c=!0)},p(k,C){r=k,(!f||C&32)&&i!==(i=r[17].name+"")&&Te(l,i),C&36&&(a=r[2].find(d)),a?g?C&36&&m(g,1):(g=j8(),g.c(),m(g,1),g.m(o,null)):g&&(te(),_(g,1,1,()=>{g=null}),ne()),C&8&&oe(e,"disabled",r[3]),C&36&&oe(e,"selected",r[2].find(v))},i(k){f||(m(g),f=!0)},o(k){_(g),f=!1},d(k){k&&b(e),g&&g.d(),c=!1,p()}}}function eue(r){let e,t,n,i,l,s,o=r[2].find(r[11]),a,u=r[5].list.filter(q8).length>0,f,c,p,d;e=new mr({props:{size:"S",$$slots:{default:[Zae]},$$scope:{ctx:r}}});let g=o&&M8(),h=u&&D8(r);return{c(){S(e.$$.fragment),t=R(),n=D("div"),i=D("div"),i.innerHTML='<div class="text svelte-1t0fa8v">Blank</div>',l=R(),s=D("div"),g&&g.c(),a=R(),h&&h.c(),f=Ee(),w(i,"data-cy","blank-screen"),w(i,"class","content svelte-1t0fa8v"),zt(s,"color","var(--spectrum-global-color-green-600)"),zt(s,"float","right"),w(n,"class","item svelte-1t0fa8v"),oe(n,"selected",r[2].find(r[13])),oe(n,"disabled",r[4])},m(v,k){A(e,v,k),$(v,t,k),$(v,n,k),N(n,i),N(n,l),N(n,s),g&&g.m(s,null),$(v,a,k),h&&h.m(v,k),$(v,f,k),c=!0,p||(d=Pe(n,"click",r[12]),p=!0)},p(v,k){const C={};k&1048576&&(C.$$scope={dirty:k,ctx:v}),e.$set(C),k&4&&(o=v[2].find(v[11])),o?g?k&4&&m(g,1):(g=M8(),g.c(),m(g,1),g.m(s,null)):g&&(te(),_(g,1,1,()=>{g=null}),ne()),k&4&&oe(n,"selected",v[2].find(v[13])),k&16&&oe(n,"disabled",v[4]),k&32&&(u=v[5].list.filter(q8).length>0),u?h?(h.p(v,k),k&32&&m(h,1)):(h=D8(v),h.c(),m(h,1),h.m(f.parentNode,f)):h&&(te(),_(h,1,1,()=>{h=null}),ne())},i(v){c||(m(e.$$.fragment,v),m(g),m(h),c=!0)},o(v){_(e.$$.fragment,v),_(g),_(h),c=!1},d(v){E(e,v),v&&b(t),v&&b(n),g&&g.d(),v&&b(a),h&&h.d(v),v&&b(f),p=!1,d()}}}function tue(r){let e,t,n,i;return e=new Ke({props:{size:"S",$$slots:{default:[Kae]},$$scope:{ctx:r}}}),n=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[eue]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(l,s){A(e,l,s),$(l,t,s),A(n,l,s),i=!0},p(l,s){const o={};s&1048576&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&1048636&&(a.$$scope={dirty:s,ctx:l}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){E(e,l),l&&b(t),E(n,l)}}}function z8(r){let e,t,n;return t=new Gs({props:{size:"S"}}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","footer-progress svelte-1t0fa8v")},m(i,l){$(i,e,l),A(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function nue(r){let e,t,n=r[1]&&z8();return{c(){e=D("div"),n&&n.c(),w(e,"slot","footer")},m(i,l){$(i,e,l),n&&n.m(e,null),t=!0},p(i,l){i[1]?n?l&2&&m(n,1):(n=z8(),n.c(),m(n,1),n.m(e,null)):n&&(te(),_(n,1,1,()=>{n=null}),ne())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){i&&b(e),n&&n.d()}}}function rue(r){let e,t,n;return t=new Dt({props:{title:"Add screens",confirmText:"Add screens",cancelText:"Cancel",onConfirm:r[8],onCancel:r[0],disabled:!r[2].length,size:"L",$$slots:{footer:[nue],default:[tue]},$$scope:{ctx:r}}}),{c(){e=D("div"),S(t.$$.fragment)},m(i,l){$(i,e,l),A(t,e,null),n=!0},p(i,[l]){const s={};l&1&&(s.onCancel=i[0]),l&4&&(s.disabled=!i[2].length),l&1048638&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}const M1="createFromScratch",q8=r=>r._id!=="ta_users",U8=r=>r._id!=="ta_users";function iue(r,e,t){let n,i,l,s;ue(r,Ot,O=>t(5,l=O)),ue(r,He,O=>t(16,s=O));let{onConfirm:o}=e,{onCancel:a}=e,{showProgressCircle:u=!1}=e,f=[],c=N8(s,l.list);const p=O=>{if(f.find(T=>T.table===O.name))t(2,f=f.filter(T=>T.table!==O.name));else{let T=N8(s,l.list).filter(P=>P.table===O.name);t(2,f=[...T,...f])}},d=async()=>{await o(f)},g=(O,T)=>T.table===O.name,h=O=>O.id===M1,v=()=>p(c.find(O=>O.id===M1)),k=O=>O.id.includes(M1),C=O=>p(O),I=(O,T)=>T.table===O.name;return r.$$set=O=>{"onConfirm"in O&&t(9,o=O.onConfirm),"onCancel"in O&&t(0,a=O.onCancel),"showProgressCircle"in O&&t(1,u=O.showProgressCircle)},r.$$.update=()=>{r.$$.dirty&4&&t(3,n=(f==null?void 0:f.length)===1),r.$$.dirty&12&&t(4,i=(f==null?void 0:f.length)>0&&!n)},[a,u,f,n,i,l,c,p,d,o,g,h,v,k,C,I]}class lue extends ie{constructor(e){super();le(this,e,iue,rue,re,{onConfirm:9,onCancel:0,showProgressCircle:1})}}function sue(r){let e,t;return e=new lue({props:{onConfirm:r[3],showProgressCircle:r[0]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.showProgressCircle=n[0]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function oue(r){let e,t;return e=new b8({props:{showProgressCircle:r[0],onConfirm:r[4],onCancel:r[7]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&1&&(l.showProgressCircle=n[0]),i&2&&(l.onCancel=n[7]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function aue(r){let e,t,n,i,l={$$slots:{default:[sue]},$$scope:{ctx:r}};e=new Et({props:l}),r[6](e);let s={$$slots:{default:[oue]},$$scope:{ctx:r}};return n=new Et({props:s}),r[8](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(o,a){A(e,o,a),$(o,t,a),A(n,o,a),i=!0},p(o,[a]){const u={};a&8193&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&8195&&(f.$$scope={dirty:a,ctx:o}),n.$set(f)},i(o){i||(m(e.$$.fragment,o),m(n.$$.fragment,o),i=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),i=!1},d(o){r[6](null),E(e,o),o&&b(t),r[8](null),E(n,o)}}}function uue(r,e,t){let n,i=!1,l,s;const o=()=>{l.show(),n=null,t(0,i=!1)},a=async v=>{if(!!(v==null?void 0:v.length)){t(0,i=!0);try{for(let k of v){if(u(k.routing.route)){let C=2,I=f(k,C);for(;u(I);)I=f(k,++C);k.routing.route=I}k.routing.route=As(k.routing.route),k.routing.roleId=it(Al)||"BASIC",await He.actions.screens.save(k),k.template&&qn.captureEvent(Yn.SCREEN.CREATED,{template:k.template}),k.props._instanceName.endsWith("List")&&await He.actions.components.links.save(k.routing.route,k.routing.route.split("/")[1])}}catch{we.error("Error creating screens")}t(0,i=!1)}},u=v=>{const k=it(Al)||"BASIC";return!!it(He).screens.filter(I=>I.routing.roleId===k).find(I=>{var O;return((O=I.routing)==null?void 0:O.route)===v})},f=(v,k)=>{var I;let C=((I=v.routing)==null?void 0:I.route)||"";if(C.startsWith("/")&&(C=C.slice(1)),C.includes("/")){const O=C.split("/");return`/${O[0]}-${k}/${O.slice(1).join("/")}`}else return`/${C}-${k}`},c=async v=>{if((v==null?void 0:v.length)>1){const k=v.map(C=>C.create());await a(k)}else n=v[0].create(),s.show()},p=async({screenName:v,screenUrl:k})=>{!n||(n.props._instanceName=v,n.routing.route=k,await a([n]))};function d(v){K[v?"unshift":"push"](()=>{l=v,t(1,l)})}const g=()=>l.show();function h(v){K[v?"unshift":"push"](()=>{s=v,t(2,s)})}return[i,l,s,c,p,o,d,g,h]}class fue extends ie{constructor(e){super();le(this,e,uue,aue,re,{showModal:5})}get showModal(){return this.$$.ctx[5]}}function cue(r){let e,t,n,i;return n=new Qe({props:{gap:"S",justifyItems:"center",$$slots:{default:[gue]},$$scope:{ctx:r}}}),{c(){e=D("div"),t=D("div"),S(n.$$.fragment),w(t,"class","main svelte-jf0zwc"),w(e,"class","centered svelte-jf0zwc")},m(l,s){$(l,e,s),N(e,t),A(n,t,null),i=!0},p(l,s){const o={};s&516&&(o.$$scope={dirty:s,ctx:l}),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(e),E(n)}}}function pue(r){let e,t,n,i,l,s,o,a,u=r[0].version,f;t=new toe({});let c=r[0].clientFeatures.devicePreview&&F8();const p=[hue,_ue],d=[];function g(v,k){return v[0].clientFeatures.customThemes?0:v[0].clientFeatures.spectrumThemes?1:-1}~(l=g(r))&&(s=d[l]=p[l](r));let h=V8();return{c(){e=D("div"),S(t.$$.fragment),n=R(),c&&c.c(),i=R(),s&&s.c(),o=R(),a=D("div"),h.c(),w(e,"class","preview-header svelte-jf0zwc"),w(a,"class","preview-content svelte-jf0zwc")},m(v,k){$(v,e,k),A(t,e,null),N(e,n),c&&c.m(e,null),N(e,i),~l&&d[l].m(e,null),$(v,o,k),$(v,a,k),h.m(a,null),f=!0},p(v,k){v[0].clientFeatures.devicePreview?c?k&1&&m(c,1):(c=F8(),c.c(),m(c,1),c.m(e,i)):c&&(te(),_(c,1,1,()=>{c=null}),ne());let C=l;l=g(v),l!==C&&(s&&(te(),_(d[C],1,1,()=>{d[C]=null}),ne()),~l?(s=d[l],s||(s=d[l]=p[l](v),s.c()),m(s,1),s.m(e,null)):s=null),k&1&&re(u,u=v[0].version)&&(te(),_(h,1,1,Oe),ne(),h=V8(),h.c(),m(h),h.m(a,null))},i(v){f||(m(t.$$.fragment,v),m(c),m(s),m(h),f=!0)},o(v){_(t.$$.fragment,v),_(c),_(s),_(h),f=!1},d(v){v&&b(e),E(t),c&&c.d(),~l&&d[l].d(),v&&b(o),v&&b(a),h.d(v)}}}function due(r){let e;return{c(){e=V("LET\u2019S BRING THIS APP TO LIFE")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function mue(r){let e,t,n,i,l;return n=new ct({props:{name:"Add"}}),{c(){e=D("div"),t=D("div"),S(n.$$.fragment),i=V(`
|
|
1230
1230
|
Add Screen`),w(t,"class","background-icon svelte-jf0zwc"),zt(t,"color","white"),w(e,"class","new-screen-button svelte-jf0zwc")},m(s,o){$(s,e,o),N(e,t),A(n,t,null),N(e,i),l=!0},p:Oe,i(s){l||(m(n.$$.fragment,s),l=!0)},o(s){_(n.$$.fragment,s),l=!1},d(s){s&&b(e),E(n)}}}function gue(r){let e,t,n,i,l,s,o,a;return l=new mr({props:{size:"M",$$slots:{default:[due]},$$scope:{ctx:r}}}),o=new gt({props:{size:"M",cta:!0,$$slots:{default:[mue]},$$scope:{ctx:r}}}),o.$on("click",r[7]),{c(){e=D("img"),n=R(),i=D("div"),S(l.$$.fragment),s=R(),S(o.$$.fragment),w(e,"class","img-size svelte-jf0zwc"),w(e,"alt","logo"),dn(e.src,t=P8)||w(e,"src",t),w(i,"class","new-screen-text svelte-jf0zwc")},m(u,f){$(u,e,f),$(u,n,f),$(u,i,f),A(l,i,null),$(u,s,f),A(o,u,f),a=!0},p(u,f){const c={};f&512&&(c.$$scope={dirty:f,ctx:u}),l.$set(c);const p={};f&512&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(m(l.$$.fragment,u),m(o.$$.fragment,u),a=!0)},o(u){_(l.$$.fragment,u),_(o.$$.fragment,u),a=!1},d(u){u&&b(e),u&&b(n),u&&b(i),E(l),u&&b(s),E(o,u)}}}function F8(r){let e,t;return e=new Uae({}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function _ue(r){let e,t;return e=new L8({}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function hue(r){let e,t;return e=new jae({}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function V8(r){let e,t;return e=new Nx({}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function H8(r){let e,t,n;return t=new Yse({}),{c(){e=D("div"),S(t.$$.fragment),w(e,"class","components-pane svelte-jf0zwc")},m(i,l){$(i,e,l),A(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),E(t)}}}function $ue(r){let e,t,n,i,l,s,o,a,u,f,c,p,d;n=new vae({props:{showModal:r[2]}});const g=[pue,cue],h=[];function v(P,M){return P[1]?0:1}s=v(r),o=h[s]=g[s](r);let k=r[3]!=null&&H8();const C=r[6].default,I=bt(C,r,r[9],null);function O(P){r[8](P)}let T={};return r[2]!==void 0&&(T.showModal=r[2]),c=new fue({props:T}),K.push(()=>ce(c,"showModal",O)),{c(){e=D("div"),t=D("div"),S(n.$$.fragment),i=R(),l=D("div"),o.c(),a=R(),k&&k.c(),u=R(),I&&I.c(),f=R(),S(c.$$.fragment),w(t,"class","ui-nav svelte-jf0zwc"),w(l,"class","preview-pane svelte-jf0zwc"),w(e,"class","root svelte-jf0zwc")},m(P,M){$(P,e,M),N(e,t),A(n,t,null),N(e,i),N(e,l),h[s].m(l,null),N(e,a),k&&k.m(e,null),$(P,u,M),I&&I.m(P,M),$(P,f,M),A(c,P,M),d=!0},p(P,[M]){const F={};M&4&&(F.showModal=P[2]),n.$set(F);let j=s;s=v(P),s===j?h[s].p(P,M):(te(),_(h[j],1,1,()=>{h[j]=null}),ne(),o=h[s],o?o.p(P,M):(o=h[s]=g[s](P),o.c()),m(o,1),o.m(l,null)),P[3]!=null?k?M&8&&m(k,1):(k=H8(),k.c(),m(k,1),k.m(e,null)):k&&(te(),_(k,1,1,()=>{k=null}),ne()),I&&I.p&&(!d||M&512)&&vt(I,C,P,P[9],d?yt(C,P[9],M,null):wt(P[9]),null);const z={};!p&&M&4&&(p=!0,z.showModal=P[2],pe(()=>p=!1)),c.$set(z)},i(P){d||(m(n.$$.fragment,P),m(o),m(k),m(I,P),m(c.$$.fragment,P),d=!0)},o(P){_(n.$$.fragment,P),_(o),_(k),_(I,P),_(c.$$.fragment,P),d=!1},d(P){P&&b(e),E(n),h[s].d(),k&&k.d(),P&&b(u),I&&I.d(P),P&&b(f),E(c,P)}}}function bue(r,e,t){let n,i,l,s,o,a;ue(r,qt,O=>t(14,n=O)),ue(r,He,O=>t(0,i=O)),ue(r,un,O=>t(1,l=O)),ue(r,Tu,O=>t(4,s=O)),ue(r,er,O=>t(5,o=O)),ue(r,ri,O=>t(3,a=O));let{$$slots:u={},$$scope:f}=e,c,p,d,g=!1,h;const v=(O,T)=>{if(g||(g=!0,!O.assetType))return;const P=it(He),M=it(un);let F=O.assetType;[Xn.LAYOUT,Xn.SCREEN].includes(F)||(F=Xn.SCREEN),F!==P.currentFrontEndType&&He.update(H=>(H.currentFrontEndType=F,H));const j=decodeURI(O.asset);let z;if(j){let H,Y;F===Xn.SCREEN?(H=it(Cs),Y=He.actions.screens):(H=P.layouts,Y=He.actions.layouts),z=H.find(U=>U._id===j),z&&z._id!==(M==null?void 0:M._id)&&Y.select(j)}const q=T.split("/").pop();if(z&&q){const H=Cl(z.props,q);H&&H._id!==P.selectedComponentId&&He.actions.components.select(H)}},k=(O,T,P)=>{if(O===c&&T===p&&P===d)return;c=O,p=T,d=P;const M=it(er),F=it(Tu),j=M.assetType,z=M.asset,q=F.split("/").pop();if(O!==j||(T==null?void 0:T._id)!==z||P!==q){let H="../";[Xn.SCREEN,Xn.LAYOUT].includes(O)&&(H+=`${O}`,(T==null?void 0:T._id)&&(H+=`/${T._id}`,P&&(H+=`/${Sl(T==null?void 0:T.props,P).slice(1).map(W=>W._id).join("/")}`))),n(H)}},C=()=>h();function I(O){h=O,t(2,h)}return r.$$set=O=>{"$$scope"in O&&t(9,f=O.$$scope)},r.$$.update=()=>{r.$$.dirty&48&&v(o,s),r.$$.dirty&3&&k(i.currentFrontEndType,l,i.selectedComponentId)},[i,l,h,a,s,o,u,C,I,f]}class vue extends ie{constructor(e){super();le(this,e,bue,$ue,re,{})}}function wue(r,e,t){let n;return ue(r,qt,i=>t(0,n=i)),n(`./${Xn.SCREEN}`),[]}class yue extends ie{constructor(e){super();le(this,e,wue,null,re,{})}}function kue(r){let e;const t=r[1].default,n=bt(t,r,r[0],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,[l]){n&&n.p&&(!e||l&1)&&vt(n,t,i,i[0],e?yt(t,i[0],l,null):wt(i[0]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function Cue(r,e,t){let{$$slots:n={},$$scope:i}=e;return r.$$set=l=>{"$$scope"in l&&t(0,i=l.$$scope)},[i,n]}class Sue extends ie{constructor(e){super();le(this,e,Cue,kue,re,{})}}function Aue(r){let e,t,n;function i(s){r[3](s)}let l={options:r[1].list,getOptionLabel:Eue,getOptionValue:Oue};return r[0]!==void 0&&(l.value=r[0]),e=new Xe({props:l}),K.push(()=>ce(e,"value",i)),e.$on("change",r[2]),{c(){S(e.$$.fragment)},m(s,o){A(e,s,o),n=!0},p(s,[o]){const a={};o&2&&(a.options=s[1].list),!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){E(e,s)}}}const Eue=r=>r.name,Oue=r=>r._id;function Tue(r,e,t){let n;ue(r,Ot,a=>t(1,n=a));const i=ht();let{value:l}=e;const s=a=>{t(0,l=a.detail),i("change",a.detail)};function o(a){l=a,t(0,l)}return r.$$set=a=>{"value"in a&&t(0,l=a.value)},[l,n,s,o]}class Iue extends ie{constructor(e){super();le(this,e,Tue,Aue,re,{value:0})}}function Lue(r){let e,t;return e=new Un({props:{panel:xi,value:r[0][r[2]],label:r[2],type:"string",bindings:r[4],fillWidth:!0,allowJS:!0}}),e.$on("change",r[11]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&5&&(l.value=n[0][n[2]]),i&4&&(l.label=n[2]),i&16&&(l.bindings=n[4]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Pue(r){let e,t,n;function i(s){r[10](s)}let l={schema:r[3]};return r[0][r[2]]!==void 0&&(l.linkedRows=r[0][r[2]]),e=new sv({props:l}),K.push(()=>ce(e,"linkedRows",i)),{c(){S(e.$$.fragment)},m(s,o){A(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){E(e,s)}}}function Nue(r){let e,t,n;function i(s){r[9](s)}let l={label:r[2]};return r[0][r[2]]!==void 0&&(l.value=r[0][r[2]]),e=new pi({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(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){E(e,s)}}}function Rue(r){let e,t,n;function i(s){r[8](s)}let l={label:r[2],options:r[3].constraints.inclusion};return r[0][r[2]]!==void 0&&(l.value=r[0][r[2]]),e=new Ho({props:l}),K.push(()=>ce(e,"value",i)),{c(){S(e.$$.fragment)},m(s,o){A(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){E(e,s)}}}function Mue(r){let e,t;return e=new Vn({props:{text:r[2],value:r[0][r[2]]}}),e.$on("change",r[7]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.text=n[2]),i&5&&(l.value=n[0][n[2]]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Due(r){let e,t;return e=new Bl({props:{label:r[2],value:r[0][r[2]]}}),e.$on("change",r[6]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.label=n[2]),i&5&&(l.value=n[0][n[2]]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function jue(r){let e,t;return e=new Xe({props:{label:r[2],value:r[0][r[2]],options:r[3].constraints.inclusion}}),e.$on("change",r[5]),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.label=n[2]),i&5&&(l.value=n[0][n[2]]),i&8&&(l.options=n[3].constraints.inclusion),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Bue(r){let e,t,n,i,l;const s=[jue,Due,Mue,Rue,Nue,Pue,Lue],o=[];function a(u,f){return(e==null||f&8)&&(e=!!(zue(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(),i=Ee()},m(u,f){~t&&o[t].m(u,f),$(u,i,f),l=!0},p(u,[f]){let c=t;t=a(u,f),t===c?~t&&o[t].p(u,f):(n&&(te(),_(o[c],1,1,()=>{o[c]=null}),ne()),~t?(n=o[t],n?n.p(u,f):(n=o[t]=s[t](u),n.c()),m(n,1),n.m(i.parentNode,i)):n=null)},i(u){l||(m(n),l=!0)},o(u){_(n),l=!1},d(u){~t&&o[t].d(u),u&&b(i)}}}function zue(r){var e,t;return!!((t=(e=r.constraints)==null?void 0:e.inclusion)==null?void 0:t.length)}function que(r,e,t){let{onChange:n}=e,{field:i}=e,{schema:l}=e,{value:s}=e,{bindings:o}=e;const a=h=>n(h,i),u=h=>n(h,i),f=h=>n(h,i);function c(h){r.$$.not_equal(s[i],h)&&(s[i]=h,t(0,s))}function p(h){r.$$.not_equal(s[i],h)&&(s[i]=h,t(0,s))}function d(h){r.$$.not_equal(s[i],h)&&(s[i]=h,t(0,s))}const g=h=>n(h,i);return r.$$set=h=>{"onChange"in h&&t(1,n=h.onChange),"field"in h&&t(2,i=h.field),"schema"in h&&t(3,l=h.schema),"value"in h&&t(0,s=h.value),"bindings"in h&&t(4,o=h.bindings)},[s,n,i,l,o,a,u,f,c,p,d,g]}class W8 extends ie{constructor(e){super();le(this,e,que,Bue,re,{onChange:1,field:2,schema:3,value:0,bindings:4})}}function G8(r,e,t){const n=r.slice();return n[15]=e[t][0],n[16]=e[t][1],n}function Y8(r){let e,t,n=r[2],i=[];for(let s=0;s<n.length;s+=1)i[s]=X8(G8(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){e=D("div");for(let s=0;s<i.length;s+=1)i[s].c();w(e,"class","schema-fields svelte-qnw5bo")},m(s,o){$(s,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(s,o){if(o&375){n=s[2];let a;for(a=0;a<n.length;a+=1){const u=G8(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=X8(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){s&&b(e),$t(i,s)}}}function J8(r){let e,t,n=r[16].type!=="attachment"&&Q8(r);return{c(){n&&n.c(),e=Ee()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,l){i[16].type!=="attachment"?n?(n.p(i,l),l&4&&m(n,1)):(n=Q8(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(te(),_(n,1,1,()=>{n=null}),ne())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function Q8(r){let e,t,n,i;const l=[Vue,Fue,Uue],s=[];function o(a,u){return a[5].selectedAutomation.automation.testData?0:a[4]?2:1}return e=o(r),t=s[e]=l[e](r),{c(){t.c(),n=Ee()},m(a,u){s[e].m(a,u),$(a,n,u),i=!0},p(a,u){let f=e;e=o(a),e===f?s[e].p(a,u):(te(),_(s[f],1,1,()=>{s[f]=null}),ne(),t=s[e],t?t.p(a,u):(t=s[e]=l[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){s[e].d(a),a&&b(n)}}}function Uue(r){let e,t;function n(...i){return r[12](r[15],r[16],...i)}return e=new Un({props:{placeholder:r[6][r[16].type],panel:xi,value:Array.isArray(r[0][r[15]])?r[0][r[15]].join(" "):r[0][r[15]],label:r[15],type:"string",bindings:r[1],fillWidth:!0,allowJS:!0}}),e.$on("change",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l&4&&(s.placeholder=r[6][r[16].type]),l&5&&(s.value=Array.isArray(r[0][r[15]])?r[0][r[15]].join(" "):r[0][r[15]]),l&4&&(s.label=r[15]),l&2&&(s.bindings=r[1]),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function Fue(r){let e,t;return e=new W8({props:{field:r[15],schema:r[16],bindings:r[1],value:r[0],onChange:r[8]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.field=n[15]),i&4&&(l.schema=n[16]),i&2&&(l.bindings=n[1]),i&1&&(l.value=n[0]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Vue(r){let e,t,n,i;const l=[Wue,Hue],s=[];function o(a,u){return a[4]?1:0}return e=o(r),t=s[e]=l[e](r),{c(){t.c(),n=Ee()},m(a,u){s[e].m(a,u),$(a,n,u),i=!0},p(a,u){let f=e;e=o(a),e===f?s[e].p(a,u):(te(),_(s[f],1,1,()=>{s[f]=null}),ne(),t=s[e],t?t.p(a,u):(t=s[e]=l[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){s[e].d(a),a&&b(n)}}}function Hue(r){let e,t;function n(...i){return r[11](r[15],r[16],...i)}return e=new Un({props:{placeholder:r[6][r[16].type],panel:xi,value:Array.isArray(r[0][r[15]])?r[0][r[15]].join(" "):r[0][r[15]],label:r[15],type:"string",bindings:r[1],fillWidth:!0,allowJS:!0}}),e.$on("change",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l&4&&(s.placeholder=r[6][r[16].type]),l&5&&(s.value=Array.isArray(r[0][r[15]])?r[0][r[15]].join(" "):r[0][r[15]]),l&4&&(s.label=r[15]),l&2&&(s.bindings=r[1]),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function Wue(r){let e,t;return e=new W8({props:{field:r[15],schema:r[16],bindings:r[1],value:r[0],onChange:r[8]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&4&&(l.field=n[15]),i&4&&(l.schema=n[16]),i&2&&(l.bindings=n[1]),i&1&&(l.value=n[0]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function X8(r){let e,t,n=!r[16].autocolumn&&J8(r);return{c(){n&&n.c(),e=Ee()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,l){i[16].autocolumn?n&&(te(),_(n,1,1,()=>{n=null}),ne()):n?(n.p(i,l),l&4&&m(n,1)):(n=J8(i),n.c(),m(n,1),n.m(e.parentNode,e))},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function Gue(r){let e,t,n,i;e=new Xe({props:{value:r[0].tableId,options:r[3].list,getOptionLabel:Yue,getOptionValue:Jue}}),e.$on("change",r[7]);let l=r[2].length&&Y8(r);return{c(){S(e.$$.fragment),t=R(),l&&l.c(),n=Ee()},m(s,o){A(e,s,o),$(s,t,o),l&&l.m(s,o),$(s,n,o),i=!0},p(s,[o]){const a={};o&1&&(a.value=s[0].tableId),o&8&&(a.options=s[3].list),e.$set(a),s[2].length?l?(l.p(s,o),o&4&&m(l,1)):(l=Y8(s),l.c(),m(l,1),l.m(n.parentNode,n)):l&&(te(),_(l,1,1,()=>{l=null}),ne())},i(s){i||(m(e.$$.fragment,s),m(l),i=!0)},o(s){_(e.$$.fragment,s),_(l),i=!1},d(s){E(e,s),s&&b(t),l&&l.d(s),s&&b(n)}}}const Yue=r=>r.name,Jue=r=>r._id;function Que(r,e,t){let n,i,l;ue(r,Ot,C=>t(3,i=C)),ue(r,Zt,C=>t(5,l=C));const s=ht();let{value:o}=e,{bindings:a}=e,{block: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=C=>{t(0,o.tableId=C.detail,o),s("change",o)},g=(C,I)=>I==="boolean"?typeof C=="boolean"?C:C==="true":I==="number"?typeof C=="number"?C:Number(C):I==="options"?[C]:I==="array"?Array.isArray(C)?C:C.split(",").map(O=>O.trim()):I==="link"?Array.isArray(C)?C:[C]:C,h=(C,I,O)=>{t(0,o[I]=g(C.detail,O),o),s("change",o)},v=(C,I,O)=>h(O,C,I.type),k=(C,I,O)=>h(O,C,I.type);return r.$$set=C=>{"value"in C&&t(0,o=C.value),"bindings"in C&&t(1,a=C.bindings),"block"in C&&t(9,u=C.block)},r.$$.update=()=>{var C;r.$$.dirty&512&&t(4,n=u.rowControl),r.$$.dirty&1037&&(t(10,f=i.list.find(I=>I._id===(o==null?void 0:o.tableId))),t(2,c=Object.entries((C=f==null?void 0:f.schema)!=null?C:{})),c.map(([,I])=>{!I.autocolumn&&!o[I.name]&&t(0,o[I.name]="",o)})),r.$$.dirty&1&&(o==null?void 0:o.tableId)==null&&t(0,o={tableId:""})},[o,a,c,i,n,l,p,d,h,u,f,v,k]}class Xue extends ie{constructor(e){super();le(this,e,Que,Gue,re,{value:0,bindings:1,block:9})}}function K8(r,e,t){const n=r.slice();return n[9]=e[t],n}function Z8(r){let e,t,n,i,l,s,o,a,u,f;t=new tt({props:{value:r[9].name,secondary:!0,placeholder:"Enter field name"}}),t.$on("change",function(){mt(r[6](r[9].name))&&r[6](r[9].name).apply(this,arguments)});function c(...d){return r[7](r[9],...d)}i=new Xe({props:{value:r[9].type,options:r[3]}}),i.$on("change",c);function p(){return r[8](r[9])}return{c(){e=D("div"),S(t.$$.fragment),n=R(),S(i.$$.fragment),l=R(),s=D("i"),o=R(),w(s,"class","remove-field ri-delete-bin-line svelte-qc7xvc"),w(e,"class","field svelte-qc7xvc")},m(d,g){$(d,e,g),A(t,e,null),N(e,n),A(i,e,null),N(e,l),N(e,s),N(e,o),a=!0,u||(f=Pe(s,"click",p),u=!0)},p(d,g){r=d;const h={};g&2&&(h.value=r[9].name),t.$set(h);const v={};g&2&&(v.value=r[9].type),i.$set(v)},i(d){a||(m(t.$$.fragment,d),m(i.$$.fragment,d),a=!0)},o(d){_(t.$$.fragment,d),_(i.$$.fragment,d),a=!1},d(d){d&&b(e),E(t),E(i),u=!1,f()}}}function Kue(r){let e,t,n,i,l,s,o,a,u,f=r[1],c=[];for(let d=0;d<f.length;d+=1)c[d]=Z8(K8(r,f,d));const p=d=>_(c[d],1,1,()=>{c[d]=null});return{c(){e=D("div"),t=D("div"),n=D("i"),i=R(),l=D("div"),s=R();for(let d=0;d<c.length;d+=1)c[d].c();w(n,"class","ri-add-line svelte-qc7xvc"),w(t,"class","add-field svelte-qc7xvc"),w(l,"class","spacer svelte-qc7xvc"),w(e,"class","root svelte-qc7xvc")},m(d,g){$(d,e,g),N(e,t),N(t,n),N(e,i),N(e,l),N(e,s);for(let h=0;h<c.length;h+=1)c[h].m(e,null);o=!0,a||(u=Pe(n,"click",r[4]),a=!0)},p(d,[g]){if(g&111){f=d[1];let h;for(h=0;h<f.length;h+=1){const v=K8(d,f,h);c[h]?(c[h].p(v,g),m(c[h],1)):(c[h]=Z8(v),c[h].c(),m(c[h],1),c[h].m(e,null))}for(te(),h=f.length;h<c.length;h+=1)p(h);ne()}},i(d){if(!o){for(let g=0;g<f.length;g+=1)m(c[g]);o=!0}},o(d){c=c.filter(Boolean);for(let g=0;g<c.length;g+=1)_(c[g]);o=!1},d(d){d&&b(e),$t(c,d),a=!1,u()}}}function Zue(r,e,t){let n;const i=ht();let{value:l={}}=e;const s=[{label:"Text",value:"string"},{label:"Number",value:"number"},{label:"Boolean",value:"boolean"},{label:"DateTime",value:"datetime"}];function o(){const p=Se({},l);p[""]="string",i("change",p)}function a(p){const d=Se({},l);delete d[p],i("change",d)}const u=p=>d=>{let g=[...n];const h=d.detail;h?g.find(v=>v.name===p).name=h:g=g.filter(v=>v.name!==p),t(0,l=g.reduce((v,k)=>(v[k.name]=k.type,v),{})),i("change",l)},f=(p,d)=>{t(0,l[p.name]=d.detail,l),i("change",l)},c=p=>a(p.name);return r.$$set=p=>{"value"in p&&t(0,l=p.value)},r.$$.update=()=>{r.$$.dirty&1&&t(1,n=l?Object.entries(l).map(([p,d])=>({name:p,type:d})):[])},[l,n,i,s,o,a,u,f,c]}class xue extends ie{constructor(e){super();le(this,e,Zue,Kue,re,{value:0})}}function efe(r){let e,t,n,i,l,s,o,a;return t=new tt({props:{readonly:!0,value:r[1],label:r[0]}}),l=new ct({props:{size:"S",name:"Copy"}}),{c(){e=D("div"),S(t.$$.fragment),n=R(),i=D("div"),S(l.$$.fragment),w(i,"class","icon svelte-bmyadj"),w(e,"class","svelte-bmyadj")},m(u,f){$(u,e,f),A(t,e,null),N(e,n),N(e,i),A(l,i,null),s=!0,o||(a=Pe(i,"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)},i(u){s||(m(t.$$.fragment,u),m(l.$$.fragment,u),s=!0)},o(u){_(t.$$.fragment,u),_(l.$$.fragment,u),s=!1},d(u){u&&b(e),E(t),E(l),o=!1,a()}}}function tfe(r,e,t){let{label:n=null}=e,{value:i}=e,{copyValue:l}=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),we.success("URL copied to clipboard")},o=()=>s(i||l);return r.$$set=a=>{"label"in a&&t(0,n=a.label),"value"in a&&t(1,i=a.value),"copyValue"in a&&t(2,l=a.copyValue)},[n,i,l,s,o]}class x8 extends ie{constructor(e){super();le(this,e,tfe,efe,re,{label:0,value:1,copyValue:2})}}function nfe(r){let e,t;return e=new x8({props:{value:r[0],copyValue:ey(r[0])}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&1&&(l.value=n[0]),i&1&&(l.copyValue=ey(n[0])),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function ey(r){return r?`${window.location.origin}/${r}`:""}function rfe(r,e,t){let{value:n}=e;return r.$$set=i=>{"value"in i&&t(0,n=i.value)},[n]}class ty extends ie{constructor(e){super();le(this,e,rfe,nfe,re,{value:0})}}function ny(r){let e,t,n,i,l=(r[2]>1?"s":"")+"",s,o;return{c(){e=D("p"),t=V(`Request received! We found
|
|
1231
1231
|
`),n=V(r[2]),i=V(`
|
|
@@ -1241,7 +1241,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
1241
1241
|
This action cannot be undone.`)},m(o,a){$(o,e,a),$(o,t,a),N(t,i),N(t,l),$(o,s,a)},p(o,a){a&1&&n!==(n=o[0].name+"")&&Te(i,n)},d(o){o&&b(e),o&&b(t),o&&b(s)}}}function jpe(r){let e,t,n,i,l,s;e=new yr({props:{$$slots:{control:[Mpe],default:[Rpe]},$$scope:{ctx:r}}});let o={okText:"Delete Automation",onOk:r[3],title:"Confirm Deletion",$$slots:{default:[Dpe]},$$scope:{ctx:r}};n=new hr({props:o}),r[4](n);let a={automation:r[0]};return l=new Lpe({props:a}),r[5](l),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(u,f){A(e,u,f),$(u,t,f),A(n,u,f),$(u,i,f),A(l,u,f),s=!0},p(u,[f]){const c={};f&134&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};f&129&&(p.$$scope={dirty:f,ctx:u}),n.$set(p);const d={};f&1&&(d.automation=u[0]),l.$set(d)},i(u){s||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(l.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(l.$$.fragment,u),s=!1},d(u){E(e,u),u&&b(t),r[4](null),E(n,u),u&&b(i),r[5](null),E(l,u)}}}function Bpe(r,e,t){let n;ue(r,qt,f=>t(6,n=f));let{automation:i}=e,l,s;async function o(){try{await Zt.actions.delete(i),we.success("Automation deleted successfully"),n("../automate")}catch{we.error("Error deleting automation")}}function a(f){K[f?"unshift":"push"](()=>{l=f,t(1,l)})}function u(f){K[f?"unshift":"push"](()=>{s=f,t(2,s)})}return r.$$set=f=>{"automation"in f&&t(0,i=f.automation)},[i,l,s,o,a,u]}class zpe extends ie{constructor(e){super();le(this,e,Bpe,jpe,re,{automation:0})}}function Iy(r,e,t){const n=r.slice();return n[5]=e[t],n[7]=t,n}function qpe(r){let e,t,n;return e=new zpe({props:{automation:r[5]}}),{c(){S(e.$$.fragment),t=R()},m(i,l){A(e,i,l),$(i,t,l),n=!0},p(i,l){const s={};l&1&&(s.automation=i[5]),e.$set(s)},i(i){n||(m(e.$$.fragment,i),n=!0)},o(i){_(e.$$.fragment,i),n=!1},d(i){E(e,i),i&&b(t)}}}function Ly(r){let e,t;function n(){return r[3](r[5])}return e=new Tl({props:{border:r[7]>0,icon:"ShareAndroid",text:r[5].name,selected:r[5]._id===r[1],$$slots:{default:[qpe]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){S(e.$$.fragment)},m(i,l){A(e,i,l),t=!0},p(i,l){r=i;const s={};l&1&&(s.text=r[5].name),l&3&&(s.selected=r[5]._id===r[1]),l&257&&(s.$$scope={dirty:l,ctx:r}),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){E(e,i)}}}function Upe(r){let e,t,n=r[0].automations,i=[];for(let s=0;s<n.length;s+=1)i[s]=Ly(Iy(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){e=D("div");for(let s=0;s<i.length;s+=1)i[s].c();w(e,"class","automations-list svelte-g64vb")},m(s,o){$(s,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(s,[o]){if(o&7){n=s[0].automations;let a;for(a=0;a<n.length;a+=1){const u=Iy(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=Ly(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(te(),a=n.length;a<i.length;a+=1)l(a);ne()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){s&&b(e),$t(i,s)}}}function Fpe(r,e,t){let n,i,l;ue(r,qt,a=>t(4,i=a)),ue(r,Zt,a=>t(0,l=a)),Gt(async()=>{try{await Zt.actions.fetch()}catch{we.error("Error getting automations list")}});function s(a){Zt.actions.select(a),i(`./${a._id}`)}const o=a=>s(a);return r.$$.update=()=>{var a,u;r.$$.dirty&1&&t(1,n=(u=(a=l.selectedAutomation)==null?void 0:a.automation)==null?void 0:u._id)},[l,n,s,o]}class Vpe extends ie{constructor(e){super();le(this,e,Fpe,Upe,re,{})}}function Py(r,e,t){const n=r.slice();return n[17]=e[t][0],n[18]=e[t][1],n}function Hpe(r){let e;return{c(){e=V(`Please name your automation, then select a trigger. Every automation must
|
|
1242
1242
|
start with a trigger.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Wpe(r){let e;return{c(){e=V("Triggers")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Gpe(r){let e=r[18].name+"",t;return{c(){t=V(e)},m(n,i){$(n,t,i)},p(n,i){i&8&&e!==(e=n[18].name+"")&&Te(t,e)},d(n){n&&b(t)}}}function Ny(r){let e,t,n,i,l,s,o,a,u,f;n=new ct({props:{name:r[18].icon}}),s=new Ke({props:{size:"S",$$slots:{default:[Gpe]},$$scope:{ctx:r}}});function c(){return r[13](r[18])}return{c(){e=D("div"),t=D("div"),S(n.$$.fragment),i=R(),l=D("span"),S(s.$$.fragment),o=R(),w(l,"class","icon-spacing svelte-d3iboa"),w(t,"class","item-body svelte-d3iboa"),w(e,"class","item svelte-d3iboa"),oe(e,"selected",r[2]===r[18].name)},m(p,d){$(p,e,d),N(e,t),A(n,t,null),N(t,i),N(t,l),A(s,l,null),N(e,o),a=!0,u||(f=Pe(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&&oe(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&&b(e),E(n),E(s),u=!1,f()}}}function Ype(r){let e,t,n,i;e=new Ke({props:{size:"S",$$slots:{default:[Wpe]},$$scope:{ctx:r}}});let l=r[3],s=[];for(let a=0;a<l.length;a+=1)s[a]=Ny(Py(r,l,a));const o=a=>_(s[a],1,1,()=>{s[a]=null});return{c(){S(e.$$.fragment),t=R(),n=D("div");for(let a=0;a<s.length;a+=1)s[a].c();w(n,"class","item-list svelte-d3iboa")},m(a,u){A(e,a,u),$(a,t,u),$(a,n,u);for(let f=0;f<s.length;f+=1)s[f].m(n,null);i=!0},p(a,u){const f={};if(u&2097152&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),u&76){l=a[3];let c;for(c=0;c<l.length;c+=1){const p=Py(a,l,c);s[c]?(s[c].p(p,u),m(s[c],1)):(s[c]=Ny(p),s[c].c(),m(s[c],1),s[c].m(n,null))}for(te(),c=l.length;c<s.length;c+=1)o(c);ne()}},i(a){if(!i){m(e.$$.fragment,a);for(let u=0;u<l.length;u+=1)m(s[u]);i=!0}},o(a){_(e.$$.fragment,a),s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)_(s[u]);i=!1},d(a){E(e,a),a&&b(t),a&&b(n),$t(s,a)}}}function Jpe(r){let e,t,n,i,l,s,o,a,u,f;e=new n1({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 Ke({props:{size:"XS",$$slots:{default:[Hpe]},$$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]),l=new tt({props:d}),K.push(()=>ce(l,"value",c)),K.push(()=>ce(l,"error",p)),l.$on("change",r[12]),u=new Qe({props:{noPadding:!0,$$slots:{default:[Ype]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment),a=R(),S(u.$$.fragment)},m(g,h){A(e,g,h),$(g,t,h),A(n,g,h),$(g,i,h),A(l,g,h),$(g,a,h),A(u,g,h),f=!0},p(g,h){const v={};h&2097152&&(v.$$scope={dirty:h,ctx:g}),n.$set(v);const k={};!s&&h&1&&(s=!0,k.value=g[0],pe(()=>s=!1)),!o&&h&16&&(o=!0,k.error=g[4],pe(()=>o=!1)),l.$set(k);const C={};h&2097164&&(C.$$scope={dirty:h,ctx:g}),u.$set(C)},i(g){f||(m(e.$$.fragment,g),m(n.$$.fragment,g),m(l.$$.fragment,g),m(u.$$.fragment,g),f=!0)},o(g){_(e.$$.fragment,g),_(n.$$.fragment,g),_(l.$$.fragment,g),_(u.$$.fragment,g),f=!1},d(g){E(e,g),g&&b(t),E(n,g),g&&b(i),E(l,g),g&&b(a),E(u,g)}}}function Qpe(r){let e,t;return e=new Dt({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:r[5],disabled:!r[2]||!r[0],$$slots:{default:[Jpe]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const l={};i&5&&(l.disabled=!n[2]||!n[0]),i&2097183&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Xpe(r,e,t){let n,i,l,s,o,a;ue(r,Zt,O=>t(8,s=O)),ue(r,qt,O=>t(16,o=O)),ue(r,ys,O=>t(9,a=O));let u,f,c=!1,p,{webhookModal:d}=e;async function g(){var O;try{await Zt.actions.create({name:u,instanceId:n});const T=s.selectedAutomation.constructBlock("TRIGGER",p.stepId,p);Zt.actions.addBlockToAutomation(T),p.stepId==="WEBHOOK"&&d.show,await Zt.actions.save((O=s.selectedAutomation)==null?void 0:O.automation),we.success(`Automation ${u} created`),o(`./${s.selectedAutomation.automation._id}`),qn.captureEvent(Yn.AUTOMATION.CREATED,{name:u})}catch{we.error("Error creating automation")}}const h=O=>{p=O,t(2,f=O.name)};function v(O){u=O,t(0,u)}function k(O){i=O,t(4,i),t(1,c),t(0,u)}const C=()=>t(1,c=!0),I=O=>h(O);return r.$$set=O=>{"webhookModal"in O&&t(7,d=O.webhookModal)},r.$$.update=()=>{r.$$.dirty&512&&(n=a._id),r.$$.dirty&3&&t(4,i=c&&!u?"Please specify a name for the automation.":null),r.$$.dirty&256&&t(3,l=Object.entries(s.blockDefinitions.TRIGGER))},[u,c,f,l,i,g,h,d,s,a,v,k,C,I]}class Ry extends ie{constructor(e){super();le(this,e,Xpe,Qpe,re,{webhookModal:7})}}function Kpe(r){let e,t;return e=new Ry({props:{webhookModal:r[1]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.webhookModal=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Zpe(r){let e,t,n,i;e=new Vpe({});let l={$$slots:{default:[Kpe]},$$scope:{ctx:r}};return n=new Et({props:l}),r[2](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,o){const a={};o&10&&(a.$$scope={dirty:o,ctx:s}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[2](null),E(n,s)}}}function xpe(r){let e,t;return e=new bn({props:{title:"Automations",$$slots:{default:[Zpe]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&11&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function ede(r){let e,t,n,i,l,s;return t=new Vr({props:{selected:"Automations",$$slots:{default:[xpe]},$$scope:{ctx:r}}}),l=new ct({props:{hoverable:!0,name:"AddCircle"}}),l.$on("click",function(){mt(r[0].show)&&r[0].show.apply(this,arguments)}),{c(){e=D("div"),S(t.$$.fragment),n=R(),i=D("div"),S(l.$$.fragment),w(i,"class","add-button svelte-mcmub4"),w(i,"data-cy","new-screen"),w(e,"class","title svelte-mcmub4")},m(o,a){$(o,e,a),A(t,e,null),N(e,n),N(e,i),A(l,i,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(l.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){o&&b(e),E(t),E(l)}}}function tde(r,e,t){let{modal:n}=e,{webhookModal:i}=e;function l(s){K[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,i=s.webhookModal)},[n,i,l]}class nde extends ie{constructor(e){super();le(this,e,tde,ede,re,{modal:0,webhookModal:1})}}function rde(r){let e,t,n,i;return n=new Qe({props:{gap:"S",justifyItems:"center",$$slots:{default:[ade]},$$scope:{ctx:r}}}),{c(){e=D("div"),t=D("div"),S(n.$$.fragment),w(t,"class","main svelte-16gumu0"),w(e,"class","centered svelte-16gumu0")},m(l,s){$(l,e,s),N(e,t),A(n,t,null),i=!0},p(l,s){const o={};s&257&&(o.$$scope={dirty:s,ctx:l}),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(e),E(n)}}}function ide(r){let e;const t=r[4].default,n=bt(t,r,r[8],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&256)&&vt(n,t,i,i[8],e?yt(t,i[8],l,null):wt(i[8]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function lde(r){let e;return{c(){e=V("You have no automations")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function sde(r){let e;return{c(){e=V("Let's fix that. Call the bots!")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ode(r){let e;return{c(){e=V("Create automation")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ade(r){let e,t,n,i,l,s,o,a,u;return i=new Ct({props:{size:"M",$$slots:{default:[lde]},$$scope:{ctx:r}}}),s=new Ke({props:{size:"M",$$slots:{default:[sde]},$$scope:{ctx:r}}}),a=new gt({props:{size:"M",cta:!0,$$slots:{default:[ode]},$$scope:{ctx:r}}}),a.$on("click",r[5]),{c(){e=ge("svg"),t=ge("use"),n=R(),S(i.$$.fragment),l=R(),S(s.$$.fragment),o=R(),S(a.$$.fragment),Wt(t,"xlink:href","#spectrum-icon-18-WorkflowAdd"),w(e,"width","60px"),w(e,"height","60px"),w(e,"class","spectrum-Icon"),w(e,"focusable","false")},m(f,c){$(f,e,c),N(e,t),$(f,n,c),A(i,f,c),$(f,l,c),A(s,f,c),$(f,o,c),A(a,f,c),u=!0},p(f,c){const p={};c&256&&(p.$$scope={dirty:c,ctx:f}),i.$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(i.$$.fragment,f),m(s.$$.fragment,f),m(a.$$.fragment,f),u=!0)},o(f){_(i.$$.fragment,f),_(s.$$.fragment,f),_(a.$$.fragment,f),u=!1},d(f){f&&b(e),f&&b(n),E(i,f),f&&b(l),E(s,f),f&&b(o),E(a,f)}}}function ude(r){let e,t;return e=new Ry({props:{webhookModal:r[1]}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.webhookModal=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function fde(r){let e,t;return e=new D1({}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function cde(r){let e,t,n,i,l,s,o,a,u,f,c,p;n=new nde({props:{modal:r[0],webhookModal:r[1]}});const d=[ide,rde],g=[];function h(C,I){return C[2]?0:1}s=h(r),o=g[s]=d[s](r);let v={$$slots:{default:[ude]},$$scope:{ctx:r}};u=new Et({props:v}),r[6](u);let k={width:"30%",$$slots:{default:[fde]},$$scope:{ctx:r}};return c=new Et({props:k}),r[7](c),{c(){e=D("div"),t=D("div"),S(n.$$.fragment),i=R(),l=D("div"),o.c(),a=R(),S(u.$$.fragment),f=R(),S(c.$$.fragment),w(t,"class","nav svelte-16gumu0"),w(l,"class","content svelte-16gumu0"),w(e,"class","root svelte-16gumu0")},m(C,I){$(C,e,I),N(e,t),A(n,t,null),N(e,i),N(e,l),g[s].m(l,null),N(e,a),A(u,e,null),N(e,f),A(c,e,null),p=!0},p(C,[I]){const O={};I&1&&(O.modal=C[0]),I&2&&(O.webhookModal=C[1]),n.$set(O);let T=s;s=h(C),s===T?g[s].p(C,I):(te(),_(g[T],1,1,()=>{g[T]=null}),ne(),o=g[s],o?o.p(C,I):(o=g[s]=d[s](C),o.c()),m(o,1),o.m(l,null));const P={};I&258&&(P.$$scope={dirty:I,ctx:C}),u.$set(P);const M={};I&256&&(M.$$scope={dirty:I,ctx:C}),c.$set(M)},i(C){p||(m(n.$$.fragment,C),m(o),m(u.$$.fragment,C),m(c.$$.fragment,C),p=!0)},o(C){_(n.$$.fragment,C),_(o),_(u.$$.fragment,C),_(c.$$.fragment,C),p=!1},d(C){C&&b(e),E(n),g[s].d(),r[6](null),E(u),r[7](null),E(c)}}}function pde(r,e,t){let n,i;ue(r,Zt,p=>t(3,i=p));let{$$slots:l={},$$scope:s}=e,o,a;const u=()=>o.show();function f(p){K[p?"unshift":"push"](()=>{o=p,t(0,o)})}function c(p){K[p?"unshift":"push"](()=>{a=p,t(1,a)})}return r.$$set=p=>{"$$scope"in p&&t(8,s=p.$$scope)},r.$$.update=()=>{r.$$.dirty&8&&t(2,n=i.automations[0])},[o,a,n,i,l,u,f,c,s]}class dde extends ie{constructor(e){super();le(this,e,pde,cde,re,{})}}function mde(r){let e;return{c(){e=V("Publish")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function gde(r){let e,t;return e=new Dt({props:{title:"Enjoying Budibase?",size:"L",showConfirmButton:!1,showCancelButton:!1}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p:Oe,i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function _de(r){let e;return{c(){e=D("span"),e.textContent=`The changes you have made will be published to the production version of
|
|
1243
1243
|
the application.`},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function hde(r){let e,t;return e=new Dt({props:{title:"Publish to Production",confirmText:"Publish",onConfirm:r[2],$$slots:{default:[_de]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&64&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function $de(r){let e,t,n,i,l,s;e=new gt({props:{secondary:!0,$$slots:{default:[mde]},$$scope:{ctx:r}}}),e.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)});let o={$$slots:{default:[gde]},$$scope:{ctx:r}};n=new Et({props:o}),r[3](n);let a={$$slots:{default:[hde]},$$scope:{ctx:r}};return l=new Et({props:a}),r[4](l),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment),i=R(),S(l.$$.fragment)},m(u,f){A(e,u,f),$(u,t,f),A(n,u,f),$(u,i,f),A(l,u,f),s=!0},p(u,[f]){r=u;const c={};f&64&&(c.$$scope={dirty:f,ctx:r}),e.$set(c);const p={};f&64&&(p.$$scope={dirty:f,ctx:r}),n.$set(p);const d={};f&64&&(d.$$scope={dirty:f,ctx:r}),l.$set(d)},i(u){s||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(l.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(l.$$.fragment,u),s=!1},d(u){E(e,u),u&&b(t),r[3](null),E(n,u),u&&b(i),r[4](null),E(l,u)}}}function bde(r,e,t){let n;ue(r,He,u=>t(5,n=u));let i,l;async function s(){try{await xe.deployAppChanges(),qn.captureEvent(Yn.APP.PUBLISHED,{appId:n.appId}),we.success("Application published successfully")}catch(u){qn.captureException(u),we.error("Error publishing app")}}function o(u){K[u?"unshift":"push"](()=>{i=u,t(0,i)})}function a(u){K[u?"unshift":"push"](()=>{l=u,t(1,l)})}return[i,l,s,o,a]}class vde extends ie{constructor(e){super();le(this,e,bde,$de,re,{})}}function wde(r){let e,t,n,i,l,s,o;function a(f){r[4](f)}let u={};return r[2]!==void 0&&(u.value=r[2]),l=new tt({props:u}),K.push(()=>ce(l,"value",a)),{c(){e=D("span"),e.textContent=`The changes you have made will be deleted and the application reverted
|
|
1244
|
-
back to its production state.`,t=R(),n=D("span"),n.textContent="Please enter your app name to continue.",i=R(),S(l.$$.fragment)},m(f,c){$(f,e,c),$(f,t,c),$(f,n,c),$(f,i,c),A(l,f,c),o=!0},p(f,c){const p={};!s&&c&4&&(s=!0,p.value=f[2],pe(()=>s=!1)),l.$set(p)},i(f){o||(m(l.$$.fragment,f),o=!0)},o(f){_(l.$$.fragment,f),o=!1},d(f){f&&b(e),f&&b(t),f&&b(n),f&&b(i),E(l,f)}}}function yde(r){let e,t;return e=new Dt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[wde]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&5&&(l.disabled=n[2]!==n[0].name),i&132&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function kde(r){let e,t,n,i;e=new ct({props:{name:"Revert",hoverable:!0}}),e.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)});let l={$$slots:{default:[yde]},$$scope:{ctx:r}};return n=new Et({props:l}),r[5](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[5](null),E(n,s)}}}function Cde(r,e,t){let n,i;ue(r,He,f=>t(0,i=f));let l,s;const o=async()=>{try{await xe.revertAppChanges(n);const f=await xe.fetchAppPackage(n);await He.actions.initialise(f),we.info("Changes reverted successfully")}catch(f){we.error(`Error reverting changes: ${f}`)}};function a(f){s=f,t(2,s)}function u(f){K[f?"unshift":"push"](()=>{l=f,t(1,l)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,l,s,o,a,u]}class Sde extends ie{constructor(e){super();le(this,e,Cde,kde,re,{})}}const Ade="@budibase/client",Ede="1.0.91-alpha.
|
|
1244
|
+
back to its production state.`,t=R(),n=D("span"),n.textContent="Please enter your app name to continue.",i=R(),S(l.$$.fragment)},m(f,c){$(f,e,c),$(f,t,c),$(f,n,c),$(f,i,c),A(l,f,c),o=!0},p(f,c){const p={};!s&&c&4&&(s=!0,p.value=f[2],pe(()=>s=!1)),l.$set(p)},i(f){o||(m(l.$$.fragment,f),o=!0)},o(f){_(l.$$.fragment,f),o=!1},d(f){f&&b(e),f&&b(t),f&&b(n),f&&b(i),E(l,f)}}}function yde(r){let e,t;return e=new Dt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[wde]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&5&&(l.disabled=n[2]!==n[0].name),i&132&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function kde(r){let e,t,n,i;e=new ct({props:{name:"Revert",hoverable:!0}}),e.$on("click",function(){mt(r[1].show)&&r[1].show.apply(this,arguments)});let l={$$slots:{default:[yde]},$$scope:{ctx:r}};return n=new Et({props:l}),r[5](n),{c(){S(e.$$.fragment),t=R(),S(n.$$.fragment)},m(s,o){A(e,s,o),$(s,t,o),A(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){E(e,s),s&&b(t),r[5](null),E(n,s)}}}function Cde(r,e,t){let n,i;ue(r,He,f=>t(0,i=f));let l,s;const o=async()=>{try{await xe.revertAppChanges(n);const f=await xe.fetchAppPackage(n);await He.actions.initialise(f),we.info("Changes reverted successfully")}catch(f){we.error(`Error reverting changes: ${f}`)}};function a(f){s=f,t(2,s)}function u(f){K[f?"unshift":"push"](()=>{l=f,t(1,l)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,l,s,o,a,u]}class Sde extends ie{constructor(e){super();le(this,e,Cde,kde,re,{})}}const Ade="@budibase/client",Ede="1.0.91-alpha.16",Ode="MPL-2.0",Tde="dist/budibase-client.js",Ide="dist/budibase-client.js",Lde="module",Pde="src/index.js",Nde={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},Rde={build:"rollup -c","dev:builder":"rollup -cw"},Mde={"@budibase/bbui":"^1.0.91-alpha.16","@budibase/frontend-core":"^1.0.91-alpha.16","@budibase/string-templates":"^1.0.91-alpha.16","@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.38.2","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},Dde={"@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"},jde="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc";var j1={name:Ade,version:Ede,license:Ode,module:Tde,main:Ide,type:Lde,svelte:Pde,exports:Nde,scripts:Rde,dependencies:Mde,devDependencies:Dde,gitHead:jde};function Bde(r){let e,t;return e=new Ke({props:{size:"S",$$slots:{default:[qde]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&513&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function zde(r){let e,t;return e=new Ke({props:{size:"S",$$slots:{default:[Ude]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&513&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function qde(r){let e,t,n=r[0].version+"",i,l;return{c(){e=V("This app is currently using version "),t=D("b"),i=V(n),l=V(` which is the
|
|
1245
1245
|
latest version available.`)},m(s,o){$(s,e,o),$(s,t,o),N(t,i),$(s,l,o)},p(s,o){o&1&&n!==(n=s[0].version+"")&&Te(i,n)},d(s){s&&b(e),s&&b(t),s&&b(l)}}}function Ude(r){let e,t,n=r[0].version+"",i,l,s,o;return{c(){e=V("This app is currently using version "),t=D("b"),i=V(n),l=V(`, but version
|
|
1246
1246
|
`),s=D("b"),s.textContent=`${j1.version}`,o=V(` is available. Updates can contain new features,
|
|
1247
1247
|
performance improvements and bug fixes.`)},m(a,u){$(a,e,u),$(a,t,u),N(t,i),$(a,l,u),$(a,s,u),$(a,o,u)},p(a,u){u&1&&n!==(n=a[0].version+"")&&Te(i,n)},d(a){a&&b(e),a&&b(t),a&&b(l),a&&b(s),a&&b(o)}}}function My(r){let e,t;return e=new Ke({props:{size:"S",$$slots:{default:[Fde]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(n,i){A(e,n,i),t=!0},p(n,i){const l={};i&513&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){E(e,n)}}}function Fde(r){let e,t,n=r[0].revertableVersion+"",i,l;return{c(){e=V(`You can revert this app to version
|