@budibase/server 2.7.34-alpha.2 → 2.7.34-alpha.3
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.
|
@@ -893,7 +893,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
893
893
|
Save`),z(e,"class","save-button-content svelte-1uav9tr")},m(a,o){k(a,e,o),i&&i.m(e,null),R(e,t),r=!0},p(a,o){a[7]?i?o&128&&g(i,1):(i=tte(a),i.c(),g(i,1),i.m(e,t)):i&&(pe(),_(i,1,1,()=>{i=null}),he())},i(a){r||(g(i),r=!0)},o(a){_(i),r=!1},d(a){a&&$(e),i&&i.d()}}}function nte(n){let e,t,r;function i(o){n[17](o)}let a={save:n[11]};return n[0]!==void 0&&(a.datasource=n[0]),e=new qvt({props:a}),Ae.push(()=>je(e,"datasource",i)),{c(){T(e.$$.fragment)},m(o,s){M(e,o,s),r=!0},p(o,s){const l={};!t&&s&1&&(t=!0,l.datasource=o[0],qe(()=>t=!1)),e.$set(l)},i(o){r||(g(e.$$.fragment,o),r=!0)},o(o){_(e.$$.fragment,o),r=!1},d(o){E(e,o)}}}function _bt(n){let e;return{c(){e=te("Queries")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function rte(n){let e,t;return e=new nn({props:{secondary:!0,$$slots:{default:[bbt]},$$scope:{ctx:n}}}),e.$on("click",n[18]),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i&33554432&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function bbt(n){let e;return{c(){e=te("Import")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function ybt(n){let e;return{c(){e=te("Add query")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function wbt(n){let e;return{c(){e=te(`To build an app using a datasource, you must first query the data. A
|
|
894
894
|
query is a request for data or information from a datasource, for
|
|
895
895
|
example a database table.`)},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function ite(n){let e,t,r;return t=new jo({props:{schema:n[9],data:n[6],allowEditColumns:!1,allowEditRows:!1,allowSelectRows:!1,customRenderers:[{column:"queryVerb",component:X_t}]}}),t.$on("click",n[20]),{c(){e=U("div"),T(t.$$.fragment),z(e,"class","query-list svelte-1uav9tr")},m(i,a){k(i,e,a),M(t,e,null),r=!0},p(i,a){const o={};a&64&&(o.data=i[6]),t.$set(o)},i(i){r||(g(t.$$.fragment,i),r=!0)},o(i){_(t.$$.fragment,i),r=!1},d(i){i&&$(e),E(t)}}}function ate(n){let e,t,r;function i(o){n[21](o)}let a={queries:n[6]};return n[0]!==void 0&&(a.datasource=n[0]),e=new j9t({props:a}),Ae.push(()=>je(e,"datasource",i)),e.$on("change",n[10]),{c(){T(e.$$.fragment)},m(o,s){M(e,o,s),r=!0},p(o,s){const l={};s&64&&(l.queries=o[6]),!t&&s&1&&(t=!0,l.datasource=o[0],qe(()=>t=!1)),e.$set(l)},i(o){r||(g(e.$$.fragment,o),r=!0)},o(o){_(e.$$.fragment,o),r=!1},d(o){E(e,o)}}}function $bt(n){var re,ue;let e,t,r,i,a,o,s,l,u,c,f,d,p,h,m,v,b,w,O,C,L,D,P,V,H,Q,J;e=new zt({props:{gap:"XS",noPadding:!0,$$slots:{default:[hbt]},$$scope:{ctx:n}}}),r=new Tr({}),o=new mn({props:{size:"S",$$slots:{default:[mbt]},$$scope:{ctx:n}}}),l=new nn({props:{disabled:!n[3]||!n[4]||n[7],cta:!0,$$slots:{default:[vbt]},$$scope:{ctx:n}}}),l.$on("click",n[11]);function ee(ie){n[15](ie)}let Z={schema:n[5].datasource};n[0]!==void 0&&(Z.datasource=n[0]),c=new GH({props:Z}),Ae.push(()=>je(c,"datasource",ee)),c.$on("change",n[10]),c.$on("valid",n[16]);let W=n[0].plus&&nte(n);h=new Tr({}),b=new mn({props:{size:"S",$$slots:{default:[_bt]},$$scope:{ctx:n}}});let x=((re=n[0])==null?void 0:re.source)===Ra.REST&&rte(n);L=new nn({props:{cta:!0,icon:"Add",$$slots:{default:[ybt]},$$scope:{ctx:n}}}),L.$on("click",n[19]),P=new Tt({props:{size:"S",$$slots:{default:[wbt]},$$scope:{ctx:n}}});let X=n[6]&&n[6].length>0&&ite(n),K=((ue=n[0])==null?void 0:ue.source)===Ra.REST&&ate(n);return{c(){T(e.$$.fragment),t=B(),T(r.$$.fragment),i=B(),a=U("div"),T(o.$$.fragment),s=B(),T(l.$$.fragment),u=B(),T(c.$$.fragment),d=B(),W&&W.c(),p=B(),T(h.$$.fragment),m=B(),v=U("div"),T(b.$$.fragment),w=B(),O=U("div"),x&&x.c(),C=B(),T(L.$$.fragment),D=B(),T(P.$$.fragment),V=B(),X&&X.c(),H=B(),K&&K.c(),Q=st(),z(a,"class","config-header svelte-1uav9tr"),z(O,"class","query-buttons svelte-1uav9tr"),z(v,"class","query-header svelte-1uav9tr")},m(ie,le){M(e,ie,le),k(ie,t,le),M(r,ie,le),k(ie,i,le),k(ie,a,le),M(o,a,null),R(a,s),M(l,a,null),k(ie,u,le),M(c,ie,le),k(ie,d,le),W&&W.m(ie,le),k(ie,p,le),M(h,ie,le),k(ie,m,le),k(ie,v,le),M(b,v,null),R(v,w),R(v,O),x&&x.m(O,null),R(O,C),M(L,O,null),k(ie,D,le),M(P,ie,le),k(ie,V,le),X&&X.m(ie,le),k(ie,H,le),K&&K.m(ie,le),k(ie,Q,le),J=!0},p(ie,le){var De,ot;const se={};le&33554467&&(se.$$scope={dirty:le,ctx:ie}),e.$set(se);const ae={};le&33554432&&(ae.$$scope={dirty:le,ctx:ie}),o.$set(ae);const ge={};le&152&&(ge.disabled=!ie[3]||!ie[4]||ie[7]),le&33554560&&(ge.$$scope={dirty:le,ctx:ie}),l.$set(ge);const Le={};le&32&&(Le.schema=ie[5].datasource),!f&&le&1&&(f=!0,Le.datasource=ie[0],qe(()=>f=!1)),c.$set(Le),ie[0].plus?W?(W.p(ie,le),le&1&&g(W,1)):(W=nte(ie),W.c(),g(W,1),W.m(p.parentNode,p)):W&&(pe(),_(W,1,1,()=>{W=null}),he());const ve={};le&33554432&&(ve.$$scope={dirty:le,ctx:ie}),b.$set(ve),((De=ie[0])==null?void 0:De.source)===Ra.REST?x?(x.p(ie,le),le&1&&g(x,1)):(x=rte(ie),x.c(),g(x,1),x.m(O,C)):x&&(pe(),_(x,1,1,()=>{x=null}),he());const ze={};le&33554432&&(ze.$$scope={dirty:le,ctx:ie}),L.$set(ze);const de={};le&33554432&&(de.$$scope={dirty:le,ctx:ie}),P.$set(de),ie[6]&&ie[6].length>0?X?(X.p(ie,le),le&64&&g(X,1)):(X=ite(ie),X.c(),g(X,1),X.m(H.parentNode,H)):X&&(pe(),_(X,1,1,()=>{X=null}),he()),((ot=ie[0])==null?void 0:ot.source)===Ra.REST?K?(K.p(ie,le),le&1&&g(K,1)):(K=ate(ie),K.c(),g(K,1),K.m(Q.parentNode,Q)):K&&(pe(),_(K,1,1,()=>{K=null}),he())},i(ie){J||(g(e.$$.fragment,ie),g(r.$$.fragment,ie),g(o.$$.fragment,ie),g(l.$$.fragment,ie),g(c.$$.fragment,ie),g(W),g(h.$$.fragment,ie),g(b.$$.fragment,ie),g(x),g(L.$$.fragment,ie),g(P.$$.fragment,ie),g(X),g(K),J=!0)},o(ie){_(e.$$.fragment,ie),_(r.$$.fragment,ie),_(o.$$.fragment,ie),_(l.$$.fragment,ie),_(c.$$.fragment,ie),_(W),_(h.$$.fragment,ie),_(b.$$.fragment,ie),_(x),_(L.$$.fragment,ie),_(P.$$.fragment,ie),_(X),_(K),J=!1},d(ie){E(e,ie),ie&&$(t),E(r,ie),ie&&$(i),ie&&$(a),E(o),E(l),ie&&$(u),E(c,ie),ie&&$(d),W&&W.d(ie),ie&&$(p),E(h,ie),ie&&$(m),ie&&$(v),E(b),x&&x.d(),E(L),ie&&$(D),E(P,ie),ie&&$(V),X&&X.d(ie),ie&&$(H),K&&K.d(ie),ie&&$(Q)}}}function kbt(n){let e,t,r,i,a={$$slots:{default:[fbt]},$$scope:{ctx:n}};e=new Vn({props:a}),n[14](e);let o=n[0]&&n[5]&&ete(n);return{c(){T(e.$$.fragment),t=B(),o&&o.c(),r=st()},m(s,l){M(e,s,l),k(s,t,l),o&&o.m(s,l),k(s,r,l),i=!0},p(s,[l]){const u={};l&33554433&&(u.$$scope={dirty:l,ctx:s}),e.$set(u),s[0]&&s[5]?o?(o.p(s,l),l&33&&g(o,1)):(o=ete(s),o.c(),g(o,1),o.m(r.parentNode,r)):o&&(pe(),_(o,1,1,()=>{o=null}),he())},i(s){i||(g(e.$$.fragment,s),g(o),i=!0)},o(s){_(e.$$.fragment,s),_(o),i=!1},d(s){n[14](null),E(e,s),s&&$(t),o&&o.d(s),s&&$(r)}}}function Obt(n,e,t){let r,i,a,o;me(n,cm,ee=>t(22,r=ee)),me(n,No,ee=>t(13,i=ee)),me(n,ri,ee=>t(1,a=ee)),me(n,zr,ee=>t(8,o=ee));const s={name:{},queryVerb:{displayName:"Method"}};let l,u=!1,c=!0,f,d,p,h,m=!1;const v=(ee,Z)=>{ee&&Z&&t(3,u=!X3.exports.isEqual(ee,Z))};async function b(){const ee=W=>lt.error(W!=null?W:"Error validating datasource");let Z=!1;try{const W=await Bt.validateDatasource(p);W.connected||ee(`Unable to connect - ${W.error}`),Z=W.connected}catch(W){ee(W==null?void 0:W.message)}return Z}const w=async()=>{var ee;if(t(7,m=!0),(ee=f.features)!=null&&ee[z6.CONNECTION_CHECKING]&&!await b())return t(7,m=!1),!1;try{await ri.save(p),p!=null&&p.plus&&await Sr.fetch(),await ri.fetch(),lt.success(`Datasource ${name} updated successfully.`),t(12,d=Xr.cloneDeep(p))}catch(Z){lt.error(`Error saving datasource: ${Z}`)}finally{t(7,m=!1)}},O=ee=>{ee&&(t(0,p=Xr.cloneDeep(ee)),t(5,f=r[p.source]))};function C(ee){Ae[ee?"unshift":"push"](()=>{l=ee,t(2,l)})}function L(ee){p=ee,t(0,p)}const D=ee=>t(4,c=ee.detail);function P(ee){p=ee,t(0,p)}const V=()=>l.show(),H=()=>o(`../../query/new/${p._id}`),Q=({detail:ee})=>o(`../../query/${ee._id}`);function J(ee){p=ee,t(0,p)}return n.$$.update=()=>{n.$$.dirty&2&&t(12,d=a.selected),n.$$.dirty&8193&&t(6,h=i.list.filter(ee=>ee.datasourceId===(p==null?void 0:p._id))),n.$$.dirty&4097&&v(d,p),n.$$.dirty&4096&&O(d)},[p,a,l,u,c,f,h,m,o,s,v,w,d,i,C,L,D,P,V,H,Q,J]}class Abt extends Oe{constructor(e){super(),ke(this,e,Obt,kbt,ye,{})}}const mm=n=>{var Q,J,ee,Z;const{urlParam:e,stateKey:t,validate:r,update:i,baseUrl:a="..",fallbackUrl:o,store:s,routify:l,beforeNavigate:u,decode:c}=n||{};if(!e||!t||!a||!e||!(s!=null&&s.subscribe)||!l||!((Q=l.params)!=null&&Q.subscribe)||!((J=l.goto)!=null&&J.subscribe)||!((ee=l.redirect)!=null&&ee.subscribe)||!((Z=l.page)!=null&&Z.subscribe)){console.warn("syncURLToState invoked with missing parameters");return}const f=W=>{if(!c)return W;let x={};return Object.keys(W||{}).forEach(X=>{x[X]=c(W[X])}),x};let d=f(St(l.params)),p=St(l.goto),h=St(l.redirect),m=St(l.page),v=null;const b=(W,x)=>{if(u){const X=u(W,x);X!=null&&X.url&&(W=X.url),X!=null&&X.params&&(x=X.params)}p(W,x)},w=W=>{h(W)},O=W=>{var ue;const x=JSON.stringify(W),X=x!==v;v=x;const K=W==null?void 0:W[e],re=(ue=St(s))==null?void 0:ue[t];if(!(!X||!K)){if(r&&o&&!r(K)){w(o);return}K!==re&&(i?i(K):s.update(ie=>({...ie,[t]:K})))}},C=W=>{let x=!1;const X=d==null?void 0:d[e],K=W==null?void 0:W[t];if(K!==X&&(x=!0,r&&o&&!r(K))){w(o);return}if(!!x&&!St(MA)){const re={...d,[e]:K};b(m.path,re)}};O(d);const L=l.params.subscribe(W=>{W=f(W),d=W,O(W)}),D=l.goto.subscribe(W=>{p=W}),P=l.redirect.subscribe(W=>{h=W}),V=l.page.subscribe(W=>{m=W}),H=s.subscribe(C);return()=>{L(),D(),P(),V(),H()}};function ote(n){let e;const t=n[2].default,r=bn(t,n,n[1],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&2)&&wn(r,t,i,i[1],e?yn(t,i[1],a,null):$n(i[1]),null)},i(i){e||(g(r,i),e=!0)},o(i){_(r,i),e=!1},d(i){r&&r.d(i)}}}function Sbt(n){let e=n[0].datasourceId,t,r,i=ote(n);return{c(){i.c(),t=st()},m(a,o){i.m(a,o),k(a,t,o),r=!0},p(a,[o]){o&1&&ye(e,e=a[0].datasourceId)?(pe(),_(i,1,1,We),he(),i=ote(a),i.c(),g(i,1),i.m(t.parentNode,t)):i.p(a,o)},i(a){r||(g(i),r=!0)},o(a){_(i),r=!1},d(a){a&&$(t),i.d(a)}}}function zbt(n,e,t){let r,i;me(n,ri,l=>t(3,r=l)),me(n,Dc,l=>t(0,i=l));let{$$slots:a={},$$scope:o}=e;const s=mm({urlParam:"datasourceId",stateKey:"selectedDatasourceId",validate:l=>{var u;return(u=r.list)==null?void 0:u.some(c=>c._id===l)},update:ri.select,fallbackUrl:"../",store:ri,routify:Hh});return L1(s),n.$$set=l=>{"$$scope"in l&&t(1,o=l.$$scope)},[i,o,a]}class Cbt extends Oe{constructor(e){super(),ke(this,e,zbt,Sbt,ye,{})}}const Mbt=1e6,Ebt=Mbt*5,Tbt=n=>{const e={};return n.forEach(t=>{Object.keys(t).forEach(r=>{e[r]={name:r,type:"string",constraints:dr.STRING.constraints}})}),e},O7e=n=>new Promise((e,t)=>{const r=Array.from(n.target.files)[0];if(r.size>=Ebt){t("file too large");return}let i=new FileReader;const a=(o,s=null)=>{e({rows:o,schema:s!=null?s:Tbt(o),fileName:r.name,fileType:r.type})};i.addEventListener("load",function(o){var l;const s=o.target.result;if((l=r.type)!=null&&l.includes("json")){const u=JSON.parse(s);Array.isArray(u)?a(u):typeof u=="object"?a(u.rows,u.schema):t("invalid json format")}else Bt.csvToJson(s).then(u=>{a(u)}).catch(()=>{t("cannot parse csv")})}),i.readAsText(r)});function ste(n,e,t){const r=n.slice();return r[22]=e[t][0],r[23]=e[t][1],r[24]=e,r[25]=t,r}function Lbt(n){let e;return{c(){e=te("Upload")},m(t,r){k(t,e,r)},p:We,d(t){t&&$(e)}}}function Pbt(n){let e;return{c(){e=te(n[5])},m(t,r){k(t,e,r)},p(t,r){r&32&&Ye(e,t[5])},d(t){t&&$(e)}}}function Dbt(n){let e,t;return{c(){e=te("error: "),t=te(n[4])},m(r,i){k(r,e,i),k(r,t,i)},p(r,i){i&16&&Ye(t,r[4])},d(r){r&&$(e),r&&$(t)}}}function Ibt(n){let e;return{c(){e=te("loading...")},m(t,r){k(t,e,r)},p:We,d(t){t&&$(e)}}}function lte(n){let e,t,r,i,a,o,s=Object.entries(n[1]),l=[];for(let d=0;d<s.length;d+=1)l[d]=ute(ste(n,s,d));const u=d=>_(l[d],1,1,()=>{l[d]=null});function c(d){n[18](d)}let f={label:"Display Column",options:Object.keys(n[1]),sort:!0};return n[2]!==void 0&&(f.value=n[2]),i=new sn({props:f}),Ae.push(()=>je(i,"value",c)),{c(){e=U("div");for(let d=0;d<l.length;d+=1)l[d].c();t=B(),r=U("div"),T(i.$$.fragment),z(e,"class","schema-fields svelte-91n53y"),z(r,"class","display-column svelte-91n53y")},m(d,p){k(d,e,p);for(let h=0;h<l.length;h+=1)l[h].m(e,null);k(d,t,p),k(d,r,p),M(i,r,null),o=!0},p(d,p){if(p&1474){s=Object.entries(d[1]);let m;for(m=0;m<s.length;m+=1){const v=ste(d,s,m);l[m]?(l[m].p(v,p),g(l[m],1)):(l[m]=ute(v),l[m].c(),g(l[m],1),l[m].m(e,null))}for(pe(),m=s.length;m<l.length;m+=1)u(m);he()}const h={};p&2&&(h.options=Object.keys(d[1])),!a&&p&4&&(a=!0,h.value=d[2],qe(()=>a=!1)),i.$set(h)},i(d){if(!o){for(let p=0;p<s.length;p+=1)g(l[p]);g(i.$$.fragment,d),o=!0}},o(d){l=l.filter(Boolean);for(let p=0;p<l.length;p+=1)_(l[p]);_(i.$$.fragment,d),o=!1},d(d){d&&$(e),an(l,d),d&&$(t),d&&$(r),E(i)}}}function ute(n){let e,t,r=n[23].name+"",i,a,o,s,l,u,c=n[7][n[23].name]?"Success":"Failure",f,d,p,h,m,v,b,w,O;function C(V){n[15](V,n[23])}function L(...V){return n[16](n[22],...V)}let D={options:n[8],placeholder:null,getOptionLabel:Bbt,getOptionValue:Hbt,disabled:n[6]};n[23].type!==void 0&&(D.value=n[23].type),o=new sn({props:D}),Ae.push(()=>je(o,"value",C)),o.$on("change",L);function P(){return n[17](n[23])}return{c(){e=U("div"),t=U("span"),i=te(r),a=B(),T(o.$$.fragment),l=B(),u=U("span"),f=te(c),p=B(),h=U("i"),v=B(),z(u,"class",d=Ji(n[6]||n[7][n[23].name]?"fieldStatusSuccess":"fieldStatusFailure")+" svelte-91n53y"),z(h,"class",m=Ji(`omit-button ri-close-circle-fill ${n[6]?"omit-button-disabled":""}`)+" svelte-91n53y"),z(e,"class","field svelte-91n53y")},m(V,H){k(V,e,H),R(e,t),R(t,i),R(e,a),M(o,e,null),R(e,l),R(e,u),R(u,f),R(e,p),R(e,h),R(e,v),b=!0,w||(O=at(h,"click",P),w=!0)},p(V,H){n=V,(!b||H&2)&&r!==(r=n[23].name+"")&&Ye(i,r);const Q={};H&64&&(Q.disabled=n[6]),!s&&H&2&&(s=!0,Q.value=n[23].type,qe(()=>s=!1)),o.$set(Q),(!b||H&130)&&c!==(c=n[7][n[23].name]?"Success":"Failure")&&Ye(f,c),(!b||H&194&&d!==(d=Ji(n[6]||n[7][n[23].name]?"fieldStatusSuccess":"fieldStatusFailure")+" svelte-91n53y"))&&z(u,"class",d),(!b||H&64&&m!==(m=Ji(`omit-button ri-close-circle-fill ${n[6]?"omit-button-disabled":""}`)+" svelte-91n53y"))&&z(h,"class",m)},i(V){b||(g(o.$$.fragment,V),b=!0)},o(V){_(o.$$.fragment,V),b=!1},d(V){V&&$(e),E(o),w=!1,O()}}}function Rbt(n){let e,t,r,i,a,o,s,l,u;function c(h,m){return h[6]?Ibt:h[4]?Dbt:h[5]?Pbt:Lbt}let f=c(n),d=f(n),p=n[0].length>0&&!n[4]&<e(n);return{c(){e=U("div"),t=U("input"),r=B(),i=U("label"),d.c(),a=B(),p&&p.c(),o=st(),t.disabled=n[6],z(t,"id","file-upload"),z(t,"accept","text/csv,application/json"),z(t,"type","file"),z(t,"class","svelte-91n53y"),z(i,"for","file-upload"),z(i,"class","svelte-91n53y"),_e(i,"uploaded",n[0].length>0),z(e,"class","dropzone svelte-91n53y")},m(h,m){k(h,e,m),R(e,t),n[14](t),R(e,r),R(e,i),d.m(i,null),k(h,a,m),p&&p.m(h,m),k(h,o,m),s=!0,l||(u=at(t,"change",n[9]),l=!0)},p(h,[m]){(!s||m&64)&&(t.disabled=h[6]),f===(f=c(h))&&d?d.p(h,m):(d.d(1),d=f(h),d&&(d.c(),d.m(i,null))),(!s||m&1)&&_e(i,"uploaded",h[0].length>0),h[0].length>0&&!h[4]?p?(p.p(h,m),m&17&&g(p,1)):(p=lte(h),p.c(),g(p,1),p.m(o.parentNode,o)):p&&(pe(),_(p,1,1,()=>{p=null}),he())},i(h){s||(g(p),s=!0)},o(h){_(p),s=!1},d(h){h&&$(e),n[14](null),d.d(),h&&$(a),p&&p.d(h),h&&$(o),l=!1,u()}}}const Bbt=n=>n.label,Hbt=n=>n.value;function Vbt(n,e,t){let r,i=null,a=null,o=null,s=!1,l={},u="",{rows:c=[]}=e,{schema:f={}}=e,{allValid:d=!0}=e,{displayColumn:p=null}=e,{promptUpload:h=!1}=e;const m=[{label:"Text",value:dr.STRING.type},{label:"Number",value:dr.NUMBER.type},{label:"Date",value:dr.DATETIME.type},{label:"Options",value:dr.OPTIONS.type},{label:"Multi-select",value:dr.ARRAY.type},{label:"Barcode/QR",value:dr.BARCODEQR.type},{label:"Long Form Text",value:dr.LONGFORM.type}];async function v(H){t(6,s=!0),t(4,i=null),t(7,l={});try{const Q=await O7e(H);t(0,c=Q.rows),t(1,f=Q.schema),t(5,a=Q.fileName),o=Q.fileType}catch(Q){t(6,s=!1),t(4,i=Q)}}async function b(H,Q){t(6,s=!0),t(4,i=null),t(7,l={}),t(11,d=!1);try{if(H.length>0){const J=await Bt.validateNewTableImport({rows:H,schema:Q});t(7,l=J.schemaValidation),t(11,d=J.allValid)}}catch(J){t(4,i=J.message)}t(6,s=!1)}const w=(H,Q)=>{t(1,f[H].type=Q.detail,f),t(1,f[H].constraints=dr[Q.detail.toUpperCase()].constraints,f)},O=(H,Q)=>{H&&Q&&Q.click()};function C(H){Ae[H?"unshift":"push"](()=>{r=H,t(3,r)})}function L(H,Q){n.$$.not_equal(Q.type,H)&&(Q.type=H)}const D=(H,Q)=>w(H,Q),P=H=>{delete f[H.name],t(1,f)};function V(H){p=H,t(2,p)}return n.$$set=H=>{"rows"in H&&t(0,c=H.rows),"schema"in H&&t(1,f=H.schema),"allValid"in H&&t(11,d=H.allValid),"displayColumn"in H&&t(2,p=H.displayColumn),"promptUpload"in H&&t(12,h=H.promptUpload)},n.$$.update=()=>{if(n.$$.dirty&8195){const H=JSON.stringify(c)+JSON.stringify(f);H!==u&&b(c,f),t(13,u=H)}n.$$.dirty&4104&&O(h,r)},[c,f,p,r,i,a,s,l,m,v,w,d,h,u,C,L,D,P,V]}class Nbt extends Oe{constructor(e){super(),ke(this,e,Vbt,Rbt,ye,{rows:0,schema:1,allValid:11,displayColumn:2,promptUpload:12})}}const G4={ROW_SAVED:"ROW_SAVED",ROW_UPDATED:"ROW_UPDATED",ROW_DELETED:"ROW_DELETED",WEBHOOK:"WEBHOOK",APP:"APP",CRON:"CRON"},Du={SEND_EMAIL_SMTP:"SEND_EMAIL_SMTP",CREATE_ROW:"CREATE_ROW",UPDATE_ROW:"UPDATE_ROW",DELETE_ROW:"DELETE_ROW",OUTGOING_WEBHOOK:"OUTGOING_WEBHOOK",EXECUTE_SCRIPT:"EXECUTE_SCRIPT",EXECUTE_QUERY:"EXECUTE_QUERY",SERVER_LOG:"SERVER_LOG",DELAY:"DELAY",FILTER:"FILTER",QUERY_ROWS:"QUERY_ROWS",LOOP:"LOOP",COLLECT:"COLLECT",discord:"discord",slack:"slack",zapier:"zapier",integromat:"integromat"},cte={LOOPING:"LOOPING"};function A7e(n=!0){let e={};for(let[t,r]of Object.entries(L3))e[r]={enabled:n,name:CVe[t]};return e}function S7e(n,e,t){let r,i;switch(t){case L3.UPDATED_BY:case L3.CREATED_BY:r=dr.LINK.type,i=dr.LINK.constraints;break;case L3.AUTO_ID:r=dr.NUMBER.type,i=dr.NUMBER.constraints;break;case L3.UPDATED_AT:case L3.CREATED_AT:r=dr.DATETIME.type,i=dr.DATETIME.constraints;break;default:r=dr.STRING.type,i=dr.STRING.constraints;break}if(Object.values(L3).indexOf(t)===-1)throw"Cannot build auto column with supplied subtype";const a={name:e,type:r,subtype:t,icon:"ri-magic-line",autocolumn:!0,constraints:i};return MVe(t)&&(a.tableId=Fh.USERS,a.fieldName=`${n}-${e}`),a}function Fbt(n){return n.definition.steps.some(e=>e.stepId===Du.COLLECT)}function Ubt(n){let e;return{c(){e=te("Auto Columns")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function jbt(n){let e;return{c(){e=te("Create a Table from a CSV or JSON file (Optional)")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function qbt(n){let e,t,r,i,a,o,s,l;e=new Ft({props:{grey:!0,extraSmall:!0,$$slots:{default:[jbt]},$$scope:{ctx:n}}});function u(h){n[22](h)}function c(h){n[23](h)}function f(h){n[24](h)}function d(h){n[25](h)}let p={promptUpload:n[1]};return n[5]!==void 0&&(p.rows=n[5]),n[4]!==void 0&&(p.schema=n[4]),n[6]!==void 0&&(p.allValid=n[6]),n[7]!==void 0&&(p.displayColumn=n[7]),r=new Nbt({props:p}),Ae.push(()=>je(r,"rows",u)),Ae.push(()=>je(r,"schema",c)),Ae.push(()=>je(r,"allValid",f)),Ae.push(()=>je(r,"displayColumn",d)),{c(){T(e.$$.fragment),t=B(),T(r.$$.fragment)},m(h,m){M(e,h,m),k(h,t,m),M(r,h,m),l=!0},p(h,m){const v={};m[1]&1&&(v.$$scope={dirty:m,ctx:h}),e.$set(v);const b={};m[0]&2&&(b.promptUpload=h[1]),!i&&m[0]&32&&(i=!0,b.rows=h[5],qe(()=>i=!1)),!a&&m[0]&16&&(a=!0,b.schema=h[4],qe(()=>a=!1)),!o&&m[0]&64&&(o=!0,b.allValid=h[6],qe(()=>o=!1)),!s&&m[0]&128&&(s=!0,b.displayColumn=h[7],qe(()=>s=!1)),r.$set(b)},i(h){l||(g(e.$$.fragment,h),g(r.$$.fragment,h),l=!0)},o(h){_(e.$$.fragment,h),_(r.$$.fragment,h),l=!1},d(h){E(e,h),h&&$(t),E(r,h)}}}function xbt(n){let e,t,r,i,a,o,s,l,u,c,f,d,p,h,m,v,b,w,O,C,L,D,P,V,H,Q,J,ee,Z;function W(ve){n[16](ve)}let x={thin:!0,label:"Table Name",error:n[2]};n[0]!==void 0&&(x.value=n[0]),e=new cn({props:x}),Ae.push(()=>je(e,"value",W)),e.$on("input",n[8]),a=new Ft({props:{extraSmall:!0,grey:!0,$$slots:{default:[Ubt]},$$scope:{ctx:n}}});function X(ve){n[17](ve)}let K={text:"Created by"};n[3].createdBy.enabled!==void 0&&(K.value=n[3].createdBy.enabled),u=new Ho({props:K}),Ae.push(()=>je(u,"value",X));function re(ve){n[18](ve)}let ue={text:"Created at"};n[3].createdAt.enabled!==void 0&&(ue.value=n[3].createdAt.enabled),d=new Ho({props:ue}),Ae.push(()=>je(d,"value",re));function ie(ve){n[19](ve)}let le={text:"Auto ID"};n[3].autoID.enabled!==void 0&&(le.value=n[3].autoID.enabled),m=new Ho({props:le}),Ae.push(()=>je(m,"value",ie));function se(ve){n[20](ve)}let ae={text:"Updated by"};n[3].updatedBy.enabled!==void 0&&(ae.value=n[3].updatedBy.enabled),O=new Ho({props:ae}),Ae.push(()=>je(O,"value",se));function ge(ve){n[21](ve)}let Le={text:"Updated at"};return n[3].updatedAt.enabled!==void 0&&(Le.value=n[3].updatedAt.enabled),D=new Ho({props:Le}),Ae.push(()=>je(D,"value",ge)),H=new Tr({}),ee=new zt({props:{gap:"XS",noPadding:!0,$$slots:{default:[qbt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment),r=B(),i=U("div"),T(a.$$.fragment),o=B(),s=U("div"),l=U("div"),T(u.$$.fragment),f=B(),T(d.$$.fragment),h=B(),T(m.$$.fragment),b=B(),w=U("div"),T(O.$$.fragment),L=B(),T(D.$$.fragment),V=B(),T(H.$$.fragment),Q=B(),J=U("div"),T(ee.$$.fragment),z(l,"class","toggle-1 svelte-19e3t83"),z(w,"class","toggle-2 svelte-19e3t83"),z(s,"class","toggles svelte-19e3t83"),z(i,"class","autocolumns svelte-19e3t83")},m(ve,ze){M(e,ve,ze),k(ve,r,ze),k(ve,i,ze),M(a,i,null),R(i,o),R(i,s),R(s,l),M(u,l,null),R(l,f),M(d,l,null),R(l,h),M(m,l,null),R(s,b),R(s,w),M(O,w,null),R(w,L),M(D,w,null),R(i,V),M(H,i,null),k(ve,Q,ze),k(ve,J,ze),M(ee,J,null),Z=!0},p(ve,ze){const de={};ze[0]&4&&(de.error=ve[2]),!t&&ze[0]&1&&(t=!0,de.value=ve[0],qe(()=>t=!1)),e.$set(de);const De={};ze[1]&1&&(De.$$scope={dirty:ze,ctx:ve}),a.$set(De);const ot={};!c&&ze[0]&8&&(c=!0,ot.value=ve[3].createdBy.enabled,qe(()=>c=!1)),u.$set(ot);const Me={};!p&&ze[0]&8&&(p=!0,Me.value=ve[3].createdAt.enabled,qe(()=>p=!1)),d.$set(Me);const Xe={};!v&&ze[0]&8&&(v=!0,Xe.value=ve[3].autoID.enabled,qe(()=>v=!1)),m.$set(Xe);const _t={};!C&&ze[0]&8&&(C=!0,_t.value=ve[3].updatedBy.enabled,qe(()=>C=!1)),O.$set(_t);const mt={};!P&&ze[0]&8&&(P=!0,mt.value=ve[3].updatedAt.enabled,qe(()=>P=!1)),D.$set(mt);const gt={};ze[0]&242|ze[1]&1&&(gt.$$scope={dirty:ze,ctx:ve}),ee.$set(gt)},i(ve){Z||(g(e.$$.fragment,ve),g(a.$$.fragment,ve),g(u.$$.fragment,ve),g(d.$$.fragment,ve),g(m.$$.fragment,ve),g(O.$$.fragment,ve),g(D.$$.fragment,ve),g(H.$$.fragment,ve),g(ee.$$.fragment,ve),Z=!0)},o(ve){_(e.$$.fragment,ve),_(a.$$.fragment,ve),_(u.$$.fragment,ve),_(d.$$.fragment,ve),_(m.$$.fragment,ve),_(O.$$.fragment,ve),_(D.$$.fragment,ve),_(H.$$.fragment,ve),_(ee.$$.fragment,ve),Z=!1},d(ve){E(e,ve),ve&&$(r),ve&&$(i),E(a),E(u),E(d),E(m),E(O),E(D),E(H),ve&&$(Q),ve&&$(J),E(ee)}}}function Qbt(n){let e,t;return e=new rr({props:{title:"Create Table",confirmText:"Create",onConfirm:n[9],disabled:n[2]||!n[0]||n[5].length&&(!n[6]||n[7]==null),$$slots:{default:[xbt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i[0]&229&&(a.disabled=r[2]||!r[0]||r[5].length&&(!r[6]||r[7]==null)),i[0]&255|i[1]&1&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function Wbt(n,e,t){let r,i,a,o,s,l,u,c;me(n,zr,re=>t(28,s=re)),me(n,U2,re=>t(29,l=re)),me(n,ri,re=>t(14,u=re)),me(n,Sr,re=>t(15,c=re));let{promptUpload:f=!1}=e,{name:d}=e,{beforeSave:p=async()=>{}}=e,{afterSave:h=async re=>{lt.success(`Table ${d} created successfully.`);const ie=l().endsWith("data")?`./table/${re._id}`:`../../table/${re._id}`;s(ie)}}=e,m="",v=A7e(),b={},w=[],O=!0,C=null;function L(){const re={};return Object.entries(v).forEach(([ue,ie])=>{ie.enabled&&(re[ie.name]=S7e(d,ie.name,ue))}),re}function D(re){const ue=re.target.value;if(r.includes(ue)){t(2,m=`Table with name ${ue} already exists. Please choose another name.`);return}t(2,m="")}async function P(){let re={name:d,schema:{...b,...L()},rows:w,type:"internal",sourceId:o};C&&C.length&&(re.primaryDisplay=C);let ue;try{await p(),ue=await Sr.save(re),await ri.fetch(),await h(ue)}catch(ie){lt.error(ie),await Sr.fetch()}}function V(re){d=re,t(0,d)}function H(re){n.$$.not_equal(v.createdBy.enabled,re)&&(v.createdBy.enabled=re,t(3,v))}function Q(re){n.$$.not_equal(v.createdAt.enabled,re)&&(v.createdAt.enabled=re,t(3,v))}function J(re){n.$$.not_equal(v.autoID.enabled,re)&&(v.autoID.enabled=re,t(3,v))}function ee(re){n.$$.not_equal(v.updatedBy.enabled,re)&&(v.updatedBy.enabled=re,t(3,v))}function Z(re){n.$$.not_equal(v.updatedAt.enabled,re)&&(v.updatedAt.enabled=re,t(3,v))}function W(re){w=re,t(5,w)}function x(re){b=re,t(4,b)}function X(re){O=re,t(6,O)}function K(re){C=re,t(7,C)}return n.$$set=re=>{"promptUpload"in re&&t(1,f=re.promptUpload),"name"in re&&t(0,d=re.name),"beforeSave"in re&&t(10,p=re.beforeSave),"afterSave"in re&&t(11,h=re.afterSave)},n.$$.update=()=>{n.$$.dirty[0]&32768&&(r=c.list.map(re=>re.name)),n.$$.dirty[0]&16384&&t(12,i=u.list.find(re=>re._id===u.selected)),n.$$.dirty[0]&4096&&t(13,a=(i==null?void 0:i.type)===nO),n.$$.dirty[0]&12288&&(o=a?i._id:D4)},[d,f,m,v,b,w,O,C,D,P,p,h,i,a,u,c,V,H,Q,J,ee,Z,W,x,X,K]}class eV extends Oe{constructor(e){super(),ke(this,e,Wbt,Qbt,ye,{promptUpload:1,name:0,beforeSave:10,afterSave:11},null,[-1,-1])}}function fte(n,e,t){const r=n.slice();return r[5]=e[t],r}function Gbt(n){let e,t;return e=new eV({}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function Xbt(n){let e;return{c(){e=te("Budibase Internal")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function Ybt(n){let e;return{c(){e=te(`Budibase internal tables are part of your app, so the data will be
|
|
896
|
-
stored in your
|
|
896
|
+
stored in your app's context.`)},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function Zbt(n){let e,t,r,i,a,o,s;var l=u0.BUDIBASE;function u(c){return{props:{height:"26",width:"26"}}}return l&&(t=pi(l,u())),i=new mn({props:{size:"M",$$slots:{default:[Xbt]},$$scope:{ctx:n}}}),o=new Tt({props:{size:"M",$$slots:{default:[Ybt]},$$scope:{ctx:n}}}),{c(){e=U("header"),t&&T(t.$$.fragment),r=B(),T(i.$$.fragment),a=B(),T(o.$$.fragment),z(e,"class","svelte-1u3qhi1")},m(c,f){k(c,e,f),t&&M(t,e,null),R(e,r),M(i,e,null),k(c,a,f),M(o,c,f),s=!0},p(c,f){if(l!==(l=u0.BUDIBASE)){if(t){pe();const h=t;_(h.$$.fragment,1,0,()=>{E(h,1)}),he()}l?(t=pi(l,u()),T(t.$$.fragment),g(t.$$.fragment,1),M(t,e,r)):t=null}const d={};f&256&&(d.$$scope={dirty:f,ctx:c}),i.$set(d);const p={};f&256&&(p.$$scope={dirty:f,ctx:c}),o.$set(p)},i(c){s||(t&&g(t.$$.fragment,c),g(i.$$.fragment,c),g(o.$$.fragment,c),s=!0)},o(c){t&&_(t.$$.fragment,c),_(i.$$.fragment,c),_(o.$$.fragment,c),s=!1},d(c){c&&$(e),t&&E(t),E(i),c&&$(a),E(o,c)}}}function Kbt(n){let e;return{c(){e=te("Tables")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function Jbt(n){let e=n[5].name+"",t;return{c(){t=te(e)},m(r,i){k(r,t,i)},p(r,i){i&2&&e!==(e=r[5].name+"")&&Ye(t,e)},d(r){r&&$(t)}}}function dte(n){let e,t;return e=new Tt({props:{size:"S",$$slots:{default:[eyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i&258&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function eyt(n){let e,t=n[5].primaryDisplay+"",r;return{c(){e=te("Display column: "),r=te(t)},m(i,a){k(i,e,a),k(i,r,a)},p(i,a){a&2&&t!==(t=i[5].primaryDisplay+"")&&Ye(r,t)},d(i){i&&$(e),i&&$(r)}}}function pte(n){let e,t,r,i,a,o,s;t=new Tt({props:{size:"S",$$slots:{default:[Jbt]},$$scope:{ctx:n}}});let l=n[5].primaryDisplay&&dte(n);return{c(){e=U("div"),T(t.$$.fragment),r=B(),l&&l.c(),i=B(),z(e,"class","table-list-item svelte-1u3qhi1")},m(u,c){k(u,e,c),M(t,e,null),R(e,r),l&&l.m(e,null),R(e,i),a=!0,o||(s=at(e,"click",function(){tn(n[2](`../../table/${n[5]._id}`))&&n[2](`../../table/${n[5]._id}`).apply(this,arguments)}),o=!0)},p(u,c){n=u;const f={};c&258&&(f.$$scope={dirty:c,ctx:n}),t.$set(f),n[5].primaryDisplay?l?(l.p(n,c),c&2&&g(l,1)):(l=dte(n),l.c(),g(l,1),l.m(e,i)):l&&(pe(),_(l,1,1,()=>{l=null}),he())},i(u){a||(g(t.$$.fragment,u),g(l),a=!0)},o(u){_(t.$$.fragment,u),_(l),a=!1},d(u){u&&$(e),E(t),l&&l.d(),o=!1,s()}}}function tyt(n){let e;return{c(){e=te("Create new table")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function nyt(n){let e,t,r,i,a,o,s,l,u,c,f;e=new zt({props:{gap:"XS",noPadding:!0,$$slots:{default:[Zbt]},$$scope:{ctx:n}}}),r=new Tr({}),a=new mn({props:{size:"S",$$slots:{default:[Kbt]},$$scope:{ctx:n}}});let d=n[1],p=[];for(let m=0;m<d.length;m+=1)p[m]=pte(fte(n,d,m));const h=m=>_(p[m],1,1,()=>{p[m]=null});return c=new nn({props:{cta:!0,$$slots:{default:[tyt]},$$scope:{ctx:n}}}),c.$on("click",function(){tn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){T(e.$$.fragment),t=B(),T(r.$$.fragment),i=B(),T(a.$$.fragment),o=B(),s=U("div");for(let m=0;m<p.length;m+=1)p[m].c();l=B(),u=U("div"),T(c.$$.fragment),z(s,"class","table-list svelte-1u3qhi1")},m(m,v){M(e,m,v),k(m,t,v),M(r,m,v),k(m,i,v),M(a,m,v),k(m,o,v),k(m,s,v);for(let b=0;b<p.length;b+=1)p[b].m(s,null);k(m,l,v),k(m,u,v),M(c,u,null),f=!0},p(m,v){n=m;const b={};v&256&&(b.$$scope={dirty:v,ctx:n}),e.$set(b);const w={};if(v&256&&(w.$$scope={dirty:v,ctx:n}),a.$set(w),v&6){d=n[1];let C;for(C=0;C<d.length;C+=1){const L=fte(n,d,C);p[C]?(p[C].p(L,v),g(p[C],1)):(p[C]=pte(L),p[C].c(),g(p[C],1),p[C].m(s,null))}for(pe(),C=d.length;C<p.length;C+=1)h(C);he()}const O={};v&256&&(O.$$scope={dirty:v,ctx:n}),c.$set(O)},i(m){if(!f){g(e.$$.fragment,m),g(r.$$.fragment,m),g(a.$$.fragment,m);for(let v=0;v<d.length;v+=1)g(p[v]);g(c.$$.fragment,m),f=!0}},o(m){_(e.$$.fragment,m),_(r.$$.fragment,m),_(a.$$.fragment,m),p=p.filter(Boolean);for(let v=0;v<p.length;v+=1)_(p[v]);_(c.$$.fragment,m),f=!1},d(m){E(e,m),m&&$(t),E(r,m),m&&$(i),E(a,m),m&&$(o),m&&$(s),an(p,m),m&&$(l),m&&$(u),E(c)}}}function ryt(n){let e,t,r,i,a,o={$$slots:{default:[Gbt]},$$scope:{ctx:n}};return e=new Vn({props:o}),n[4](e),i=new zt({props:{$$slots:{default:[nyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment),t=B(),r=U("section"),T(i.$$.fragment),z(r,"class","svelte-1u3qhi1")},m(s,l){M(e,s,l),k(s,t,l),k(s,r,l),M(i,r,null),a=!0},p(s,[l]){const u={};l&256&&(u.$$scope={dirty:l,ctx:s}),e.$set(u);const c={};l&263&&(c.$$scope={dirty:l,ctx:s}),i.$set(c)},i(s){a||(g(e.$$.fragment,s),g(i.$$.fragment,s),a=!0)},o(s){_(e.$$.fragment,s),_(i.$$.fragment,s),a=!1},d(s){n[4](null),E(e,s),s&&$(t),s&&$(r),E(i)}}}function iyt(n,e,t){let r,i,a;me(n,Sr,l=>t(3,i=l)),me(n,zr,l=>t(2,a=l));let o;vn(()=>{ri.select(D4)});function s(l){Ae[l?"unshift":"push"](()=>{o=l,t(0,o)})}return n.$$.update=()=>{n.$$.dirty&8&&t(1,r=i.list.filter(l=>l.type!=="external"&&l.sourceId===D4))},[o,r,a,i,s]}class ayt extends Oe{constructor(e){super(),ke(this,e,iyt,ryt,ye,{})}}function hte(n,e,t){const r=n.slice();return r[5]=e[t],r}function oyt(n){let e,t;return e=new eV({}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function syt(n){let e;return{c(){e=te("Sample Data")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function lyt(n){let e,t,r;return{c(){e=te(`A little something to get you up and running!
|
|
897
897
|
`),t=U("br"),r=te(`
|
|
898
898
|
If you have no need for this datasource, feel free to delete it.`)},m(i,a){k(i,e,a),k(i,t,a),k(i,r,a)},p:We,d(i){i&&$(e),i&&$(t),i&&$(r)}}}function uyt(n){let e,t,r,i,a,o,s;var l=u0.BUDIBASE;function u(c){return{props:{height:"26",width:"26"}}}return l&&(t=pi(l,u())),i=new mn({props:{size:"M",$$slots:{default:[syt]},$$scope:{ctx:n}}}),o=new Tt({props:{size:"M",$$slots:{default:[lyt]},$$scope:{ctx:n}}}),{c(){e=U("header"),t&&T(t.$$.fragment),r=B(),T(i.$$.fragment),a=B(),T(o.$$.fragment),z(e,"class","svelte-1u3qhi1")},m(c,f){k(c,e,f),t&&M(t,e,null),R(e,r),M(i,e,null),k(c,a,f),M(o,c,f),s=!0},p(c,f){if(l!==(l=u0.BUDIBASE)){if(t){pe();const h=t;_(h.$$.fragment,1,0,()=>{E(h,1)}),he()}l?(t=pi(l,u()),T(t.$$.fragment),g(t.$$.fragment,1),M(t,e,r)):t=null}const d={};f&256&&(d.$$scope={dirty:f,ctx:c}),i.$set(d);const p={};f&256&&(p.$$scope={dirty:f,ctx:c}),o.$set(p)},i(c){s||(t&&g(t.$$.fragment,c),g(i.$$.fragment,c),g(o.$$.fragment,c),s=!0)},o(c){t&&_(t.$$.fragment,c),_(i.$$.fragment,c),_(o.$$.fragment,c),s=!1},d(c){c&&$(e),t&&E(t),E(i),c&&$(a),E(o,c)}}}function cyt(n){let e;return{c(){e=te("Tables")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function fyt(n){let e=n[5].name+"",t;return{c(){t=te(e)},m(r,i){k(r,t,i)},p(r,i){i&2&&e!==(e=r[5].name+"")&&Ye(t,e)},d(r){r&&$(t)}}}function mte(n){let e,t;return e=new Tt({props:{size:"S",$$slots:{default:[dyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i&258&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function dyt(n){let e,t=n[5].primaryDisplay+"",r;return{c(){e=te("Display column: "),r=te(t)},m(i,a){k(i,e,a),k(i,r,a)},p(i,a){a&2&&t!==(t=i[5].primaryDisplay+"")&&Ye(r,t)},d(i){i&&$(e),i&&$(r)}}}function gte(n){let e,t,r,i,a,o,s;t=new Tt({props:{size:"S",$$slots:{default:[fyt]},$$scope:{ctx:n}}});let l=n[5].primaryDisplay&&mte(n);return{c(){e=U("div"),T(t.$$.fragment),r=B(),l&&l.c(),i=B(),z(e,"class","table-list-item svelte-1u3qhi1")},m(u,c){k(u,e,c),M(t,e,null),R(e,r),l&&l.m(e,null),R(e,i),a=!0,o||(s=at(e,"click",function(){tn(n[2](`../../table/${n[5]._id}`))&&n[2](`../../table/${n[5]._id}`).apply(this,arguments)}),o=!0)},p(u,c){n=u;const f={};c&258&&(f.$$scope={dirty:c,ctx:n}),t.$set(f),n[5].primaryDisplay?l?(l.p(n,c),c&2&&g(l,1)):(l=mte(n),l.c(),g(l,1),l.m(e,i)):l&&(pe(),_(l,1,1,()=>{l=null}),he())},i(u){a||(g(t.$$.fragment,u),g(l),a=!0)},o(u){_(t.$$.fragment,u),_(l),a=!1},d(u){u&&$(e),E(t),l&&l.d(),o=!1,s()}}}function pyt(n){let e;return{c(){e=te("Create new table")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function hyt(n){let e,t,r,i,a,o,s,l,u,c,f;e=new zt({props:{gap:"XS",noPadding:!0,$$slots:{default:[uyt]},$$scope:{ctx:n}}}),r=new Tr({}),a=new mn({props:{size:"S",$$slots:{default:[cyt]},$$scope:{ctx:n}}});let d=n[1],p=[];for(let m=0;m<d.length;m+=1)p[m]=gte(hte(n,d,m));const h=m=>_(p[m],1,1,()=>{p[m]=null});return c=new nn({props:{cta:!0,$$slots:{default:[pyt]},$$scope:{ctx:n}}}),c.$on("click",function(){tn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){T(e.$$.fragment),t=B(),T(r.$$.fragment),i=B(),T(a.$$.fragment),o=B(),s=U("div");for(let m=0;m<p.length;m+=1)p[m].c();l=B(),u=U("div"),T(c.$$.fragment),z(s,"class","table-list svelte-1u3qhi1")},m(m,v){M(e,m,v),k(m,t,v),M(r,m,v),k(m,i,v),M(a,m,v),k(m,o,v),k(m,s,v);for(let b=0;b<p.length;b+=1)p[b].m(s,null);k(m,l,v),k(m,u,v),M(c,u,null),f=!0},p(m,v){n=m;const b={};v&256&&(b.$$scope={dirty:v,ctx:n}),e.$set(b);const w={};if(v&256&&(w.$$scope={dirty:v,ctx:n}),a.$set(w),v&6){d=n[1];let C;for(C=0;C<d.length;C+=1){const L=hte(n,d,C);p[C]?(p[C].p(L,v),g(p[C],1)):(p[C]=gte(L),p[C].c(),g(p[C],1),p[C].m(s,null))}for(pe(),C=d.length;C<p.length;C+=1)h(C);he()}const O={};v&256&&(O.$$scope={dirty:v,ctx:n}),c.$set(O)},i(m){if(!f){g(e.$$.fragment,m),g(r.$$.fragment,m),g(a.$$.fragment,m);for(let v=0;v<d.length;v+=1)g(p[v]);g(c.$$.fragment,m),f=!0}},o(m){_(e.$$.fragment,m),_(r.$$.fragment,m),_(a.$$.fragment,m),p=p.filter(Boolean);for(let v=0;v<p.length;v+=1)_(p[v]);_(c.$$.fragment,m),f=!1},d(m){E(e,m),m&&$(t),E(r,m),m&&$(i),E(a,m),m&&$(o),m&&$(s),an(p,m),m&&$(l),m&&$(u),E(c)}}}function myt(n){let e,t,r,i,a,o={$$slots:{default:[oyt]},$$scope:{ctx:n}};return e=new Vn({props:o}),n[4](e),i=new zt({props:{$$slots:{default:[hyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment),t=B(),r=U("section"),T(i.$$.fragment),z(r,"class","svelte-1u3qhi1")},m(s,l){M(e,s,l),k(s,t,l),k(s,r,l),M(i,r,null),a=!0},p(s,[l]){const u={};l&256&&(u.$$scope={dirty:l,ctx:s}),e.$set(u);const c={};l&263&&(c.$$scope={dirty:l,ctx:s}),i.$set(c)},i(s){a||(g(e.$$.fragment,s),g(i.$$.fragment,s),a=!0)},o(s){_(e.$$.fragment,s),_(i.$$.fragment,s),a=!1},d(s){n[4](null),E(e,s),s&&$(t),s&&$(r),E(i)}}}function gyt(n,e,t){let r,i,a;me(n,Sr,l=>t(3,i=l)),me(n,zr,l=>t(2,a=l));let o;vn(()=>{ri.select(WL)});function s(l){Ae[l?"unshift":"push"](()=>{o=l,t(0,o)})}return n.$$.update=()=>{n.$$.dirty&8&&t(1,r=i.list.filter(l=>l.type!=="external"&&l.sourceId===WL))},[o,r,a,i,s]}class vyt extends Oe{constructor(e){super(),ke(this,e,gyt,myt,ye,{})}}function _yt(n){let e;return{c(){e=U("i"),e.textContent="Select a datasource to edit",z(e,"class","svelte-o5phob")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function byt(n){let e;return{c(){e=U("i"),e.textContent="Connect your first datasource to start building.",z(e,"class","svelte-o5phob")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function yyt(n){let e;function t(a,o){var s;return(s=a[0].list)!=null&&s.length?_yt:byt}let r=t(n),i=r(n);return{c(){i.c(),e=st()},m(a,o){i.m(a,o),k(a,e,o)},p(a,[o]){r!==(r=t(a))&&(i.d(1),i=r(a),i&&(i.c(),i.m(e.parentNode,e)))},i:We,o:We,d(a){i.d(a),a&&$(e)}}}function wyt(n,e,t){let r,i;return me(n,Ai,a=>t(1,r=a)),me(n,ri,a=>t(0,i=a)),vn(async()=>{const{list:a,selected:o}=i;r(o?`./${o==null?void 0:o._id}`:`./${a[0]._id}`)}),[i]}class $yt extends Oe{constructor(e){super(),ke(this,e,wyt,yyt,ye,{})}}function kyt(n){let e;const t=n[1].default,r=bn(t,n,n[0],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,[a]){r&&r.p&&(!e||a&1)&&wn(r,t,i,i[0],e?yn(t,i[0],a,null):$n(i[0]),null)},i(i){e||(g(r,i),e=!0)},o(i){_(r,i),e=!1},d(i){r&&r.d(i)}}}function Oyt(n,e,t){let{$$slots:r={},$$scope:i}=e;return n.$$set=a=>{"$$scope"in a&&t(0,i=a.$$scope)},[i,r]}class Ayt extends Oe{constructor(e){super(),ke(this,e,Oyt,kyt,ye,{})}}function Syt(n,e,t){let r,i,a;return me(n,Ai,o=>t(2,i=o)),me(n,ri,o=>t(0,a=o)),vn(()=>{i(r?"./table":"./new")}),n.$$.update=()=>{var o,s;n.$$.dirty&1&&(r=((s=(o=a.list.find(l=>l._id="bb_internal"))==null?void 0:o.entities)==null?void 0:s.length)>1||a.list.length>1)},[a]}class zyt extends Oe{constructor(e){super(),ke(this,e,Syt,null,ye,{})}}function Cyt(n){let e;return{c(){e=te("Choose what tables you want to sync with Budibase")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function Myt(n){let e;return{c(){e=te("Connect your database to Budibase using the config below")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function Eyt(n){let e;function t(a,o){return a[1]?Cyt:Myt}let r=t(n),i=r(n);return{c(){i.c(),e=st()},m(a,o){i.m(a,o),k(a,e,o)},p(a,o){r!==(r=t(a))&&(i.d(1),i=r(a),i&&(i.c(),i.m(e.parentNode,e)))},d(a){i.d(a),a&&$(e)}}}function Tyt(n){let e,t;return e=new Tt({props:{size:"XS",$$slots:{default:[Eyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i&262146&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function Lyt(n){let e,t,r,i;function a(s){n[13](s)}let o={options:n[5]};return n[4]!==void 0&&(o.selected=n[4]),t=new ER({props:o}),Ae.push(()=>je(t,"selected",a)),{c(){e=U("div"),T(t.$$.fragment),z(e,"class","table-checkboxes svelte-1i1wkha")},m(s,l){k(s,e,l),M(t,e,null),i=!0},p(s,l){const u={};l&32&&(u.options=s[5]),!r&&l&16&&(r=!0,u.selected=s[4],qe(()=>r=!1)),t.$set(u)},i(s){i||(g(t.$$.fragment,s),i=!0)},o(s){_(t.$$.fragment,s),i=!1},d(s){s&&$(e),E(t)}}}function Pyt(n){var o;let e,t,r;function i(s){n[11](s)}let a={schema:(o=n[0])==null?void 0:o.schema,creating:!0};return n[0]!==void 0&&(a.datasource=n[0]),e=new GH({props:a}),Ae.push(()=>je(e,"datasource",i)),e.$on("valid",n[12]),{c(){T(e.$$.fragment)},m(s,l){M(e,s,l),r=!0},p(s,l){var c;const u={};l&1&&(u.schema=(c=s[0])==null?void 0:c.schema),!t&&l&1&&(t=!0,u.datasource=s[0],qe(()=>t=!1)),e.$set(u)},i(s){r||(g(e.$$.fragment,s),r=!0)},o(s){_(e.$$.fragment,s),r=!1},d(s){E(e,s)}}}function Dyt(n){let e,t,r,i,a,o;e=new zt({props:{noPadding:!0,$$slots:{default:[Tyt]},$$scope:{ctx:n}}});const s=[Pyt,Lyt],l=[];function u(c,f){return c[1]?1:0}return r=u(n),i=l[r]=s[r](n),{c(){T(e.$$.fragment),t=B(),i.c(),a=st()},m(c,f){M(e,c,f),k(c,t,f),l[r].m(c,f),k(c,a,f),o=!0},p(c,f){const d={};f&262146&&(d.$$scope={dirty:f,ctx:c}),e.$set(d);let p=r;r=u(c),r===p?l[r].p(c,f):(pe(),_(l[p],1,1,()=>{l[p]=null}),he(),i=l[r],i?i.p(c,f):(i=l[r]=s[r](c),i.c()),g(i,1),i.m(a.parentNode,a))},i(c){o||(g(e.$$.fragment,c),g(i),o=!0)},o(c){_(e.$$.fragment,c),_(i),o=!1},d(c){E(e,c),c&&$(t),l[r].d(c),c&&$(a)}}}function Iyt(n){let e,t;return e=new rr({props:{title:n[7],onConfirm:n[14],confirmText:n[6],cancelText:n[1]?"Cancel":"Back",showSecondaryButton:n[2],size:"L",disabled:!n[3],$$slots:{default:[Dyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,[i]){const a={};i&128&&(a.title=r[7]),i&64&&(a.confirmText=r[6]),i&2&&(a.cancelText=r[1]?"Cancel":"Back"),i&4&&(a.showSecondaryButton=r[2]),i&8&&(a.disabled=!r[3]),i&262203&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function Ryt(n,e,t){let r,i,a,o,s;me(n,zr,L=>t(15,s=L));let{integration:l}=e,u=XH(l),c=!1,f=!1,d=[],p=[];async function h(){var P;if(!((P=l.features)!=null&&P[z6.CONNECTION_CHECKING]))return!0;const L=V=>lt.error(V!=null?V:"Error validating datasource");let D=!1;try{const V=await k7e(u);V.connected||L(`Unable to connect - ${V.error}`),D=V.connected}catch(V){L(V==null?void 0:V.message)}return D}async function m(){var L,D;if((L=l.features)!=null&&L[z6.CONNECTION_CHECKING]&&!await h())return!1;try{u.name||t(0,u.name=r,u);const P={};i&&d&&(P.tablesFilter=d);const V=await ZH(u,P);s(`./datasource/${V._id}`),lt.success("Datasource created successfully.")}catch(P){return lt.error((D=P==null?void 0:P.message)!=null?D:"Error saving datasource"),!1}}async function v(){let L=!0;if(i&&(L=await h()),!L)return!1;if(i&&!f){lt.success("Connected to datasource successfully.");const D=await KH(u);return t(5,p=D.tableNames),t(1,f=!0),!1}else return await m(),!0}function b(L){u=L,t(0,u)}const w=L=>t(3,c=L.detail);function O(L){d=L,t(4,d)}const C=()=>v();return n.$$set=L=>{"integration"in L&&t(9,l=L.integration)},n.$$.update=()=>{n.$$.dirty&1&&t(10,r=BR[u==null?void 0:u.type]||(u==null?void 0:u.name)||(u==null?void 0:u.type)),n.$$.dirty&1&&t(2,i=u==null?void 0:u.plus),n.$$.dirty&1026&&t(7,a=f?"Fetch your tables":`Connect to ${r}`),n.$$.dirty&6&&t(6,o=f?"Continue":i?"Connect":"Save and continue to query")},[u,f,i,c,d,p,o,a,v,l,r,b,w,O,C]}class Byt extends Oe{constructor(e){super(),ke(this,e,Ryt,Iyt,ye,{integration:9})}}const z7e="/builder/assets/google-logo.c16467b8.png";function Hyt(n){let e,t,r,i,a,o,s;return{c(){e=U("button"),t=U("img"),i=B(),a=U("p"),a.textContent="Sign in with Google",Yr(t.src,r=z7e)||z(t,"src",r),z(t,"alt","google icon"),z(t,"class","svelte-e5bv50"),e.disabled=n[0],z(e,"class","svelte-e5bv50"),_e(e,"disabled",n[0])},m(l,u){k(l,e,u),R(e,t),R(e,i),R(e,a),o||(s=at(e,"click",n[5]),o=!0)},p(l,[u]){u&1&&(e.disabled=l[0]),u&1&&_e(e,"disabled",l[0])},i:We,o:We,d(l){l&&$(e),o=!1,s()}}}function Vyt(n,e,t){let r,i,a;me(n,In,u=>t(4,i=u)),me(n,Pt,u=>t(3,a=u));let{disabled:o}=e,{samePage:s}=e;const l=async()=>{let u=a.appId;const c=`/api/global/auth/${r}/datasource/google?appId=${u}`;s?window.location=c:window.open(c,"_blank")};return n.$$set=u=>{"disabled"in u&&t(0,o=u.disabled),"samePage"in u&&t(1,s=u.samePage)},n.$$.update=()=>{n.$$.dirty&16&&t(2,r=i.tenantId)},[o,s,r,a,i,l]}class Nyt extends Oe{constructor(e){super(),ke(this,e,Vyt,Hyt,ye,{disabled:0,samePage:1})}}function vte(n){let e,t,r,i;const a=[Uyt,Fyt],o=[];function s(l,u){return l[9]===!0?0:l[9]===!1?1:-1}return~(e=s(n))&&(t=o[e]=a[e](n)),{c(){t&&t.c(),r=st()},m(l,u){~e&&o[e].m(l,u),k(l,r,u),i=!0},p(l,u){let c=e;e=s(l),e===c?~e&&o[e].p(l,u):(t&&(pe(),_(o[c],1,1,()=>{o[c]=null}),he()),~e?(t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),g(t,1),t.m(r.parentNode,r)):t=null)},i(l){i||(g(t),i=!0)},o(l){_(t),i=!1},d(l){~e&&o[e].d(l),l&&$(r)}}}function Fyt(n){let e,t,r,i;return e=new Tt({props:{size:"S",$$slots:{default:[jyt]},$$scope:{ctx:n}}}),r=new Nu({props:{href:"/builder/portal/settings/auth",$$slots:{default:[qyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment),t=B(),T(r.$$.fragment)},m(a,o){M(e,a,o),k(a,t,o),M(r,a,o),i=!0},p(a,o){const s={};o&524288&&(s.$$scope={dirty:o,ctx:a}),e.$set(s);const l={};o&524288&&(l.$$scope={dirty:o,ctx:a}),r.$set(l)},i(a){i||(g(e.$$.fragment,a),g(r.$$.fragment,a),i=!0)},o(a){_(e.$$.fragment,a),_(r.$$.fragment,a),i=!1},d(a){E(e,a),a&&$(t),E(r,a)}}}function Uyt(n){let e,t,r,i;return e=new zt({props:{noPadding:!0,$$slots:{default:[Qyt]},$$scope:{ctx:n}}}),r=new Nyt({props:{samePage:!0}}),{c(){T(e.$$.fragment),t=B(),T(r.$$.fragment)},m(a,o){M(e,a,o),k(a,t,o),M(r,a,o),i=!0},p(a,o){const s={};o&524288&&(s.$$scope={dirty:o,ctx:a}),e.$set(s)},i(a){i||(g(e.$$.fragment,a),g(r.$$.fragment,a),i=!0)},o(a){_(e.$$.fragment,a),_(r.$$.fragment,a),i=!1},d(a){E(e,a),a&&$(t),E(r,a)}}}function jyt(n){let e;return{c(){e=te(`Google authentication is not enabled, please complete Google SSO
|
|
899
899
|
configuration.`)},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function qyt(n){let e;return{c(){e=te("Configure Google SSO")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function xyt(n){let e,t,r;return{c(){e=te("Authenticate with your google account to use the "),t=te(n[11]),r=te(" integration.")},m(i,a){k(i,e,a),k(i,t,a),k(i,r,a)},p:We,d(i){i&&$(e),i&&$(t),i&&$(r)}}}function Qyt(n){let e,t;return e=new Tt({props:{size:"S",$$slots:{default:[xyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i&524288&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function _te(n){let e,t;return e=new zt({props:{noPadding:!0,no:!0,$$slots:{default:[Gyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i&524306&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function Wyt(n){let e;return{c(){e=te("Add the URL of the sheet you want to connect.")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function Gyt(n){let e,t,r,i,a;e=new Tt({props:{size:"S",$$slots:{default:[Wyt]},$$scope:{ctx:n}}});function o(l){n[15](l)}let s={schema:n[10],creating:!0};return n[1]!==void 0&&(s.datasource=n[1]),r=new GH({props:s}),Ae.push(()=>je(r,"datasource",o)),r.$on("valid",n[16]),{c(){T(e.$$.fragment),t=B(),T(r.$$.fragment)},m(l,u){M(e,l,u),k(l,t,u),M(r,l,u),a=!0},p(l,u){const c={};u&524288&&(c.$$scope={dirty:u,ctx:l}),e.$set(c);const f={};!i&&u&2&&(i=!0,f.datasource=l[1],qe(()=>i=!1)),r.$set(f)},i(l){a||(g(e.$$.fragment,l),g(r.$$.fragment,l),a=!0)},o(l){_(e.$$.fragment,l),_(r.$$.fragment,l),a=!1},d(l){E(e,l),l&&$(t),E(r,l)}}}function bte(n){let e,t;return e=new zt({props:{noPadding:!0,no:!0,$$slots:{default:[Yyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i&524516&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function Xyt(n){let e;return{c(){e=te("Select which spreadsheets you want to connect.")},m(t,r){k(t,e,r)},d(t){t&&$(e)}}}function yte(n){let e,t;return e=new n8({props:{type:"error",header:n[6],message:n[7]}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i&64&&(a.header=r[6]),i&128&&(a.message=r[7]),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function Yyt(n){let e,t,r,i,a,o,s;e=new Tt({props:{size:"S",$$slots:{default:[Xyt]},$$scope:{ctx:n}}});function l(f){n[17](f)}let u={options:n[5],selectAllText:"Select all sheets"};n[2]!==void 0&&(u.selected=n[2]),r=new ER({props:u}),Ae.push(()=>je(r,"selected",l));let c=(n[6]||n[7])&&yte(n);return{c(){T(e.$$.fragment),t=B(),T(r.$$.fragment),a=B(),c&&c.c(),o=st()},m(f,d){M(e,f,d),k(f,t,d),M(r,f,d),k(f,a,d),c&&c.m(f,d),k(f,o,d),s=!0},p(f,d){const p={};d&524288&&(p.$$scope={dirty:d,ctx:f}),e.$set(p);const h={};d&32&&(h.options=f[5]),!i&&d&4&&(i=!0,h.selected=f[2],qe(()=>i=!1)),r.$set(h),f[6]||f[7]?c?(c.p(f,d),d&192&&g(c,1)):(c=yte(f),c.c(),g(c,1),c.m(o.parentNode,o)):c&&(pe(),_(c,1,1,()=>{c=null}),he())},i(f){s||(g(e.$$.fragment,f),g(r.$$.fragment,f),g(c),s=!0)},o(f){_(e.$$.fragment,f),_(r.$$.fragment,f),_(c),s=!1},d(f){E(e,f),f&&$(t),E(r,f),f&&$(a),c&&c.d(f),f&&$(o)}}}function Zyt(n){let e,t,r,i,a=n[3]===n[0].AUTH&&vte(n),o=n[3]===n[0].SET_URL&&_te(n),s=n[3]===n[0].SET_SHEETS&&bte(n);return{c(){a&&a.c(),e=B(),o&&o.c(),t=B(),s&&s.c(),r=st()},m(l,u){a&&a.m(l,u),k(l,e,u),o&&o.m(l,u),k(l,t,u),s&&s.m(l,u),k(l,r,u),i=!0},p(l,u){l[3]===l[0].AUTH?a?(a.p(l,u),u&8&&g(a,1)):(a=vte(l),a.c(),g(a,1),a.m(e.parentNode,e)):a&&(pe(),_(a,1,1,()=>{a=null}),he()),l[3]===l[0].SET_URL?o?(o.p(l,u),u&8&&g(o,1)):(o=_te(l),o.c(),g(o,1),o.m(t.parentNode,t)):o&&(pe(),_(o,1,1,()=>{o=null}),he()),l[3]===l[0].SET_SHEETS?s?(s.p(l,u),u&8&&g(s,1)):(s=bte(l),s.c(),g(s,1),s.m(r.parentNode,r)):s&&(pe(),_(s,1,1,()=>{s=null}),he())},i(l){i||(g(a),g(o),g(s),i=!0)},o(l){_(a),_(o),_(s),i=!1},d(l){a&&a.d(l),l&&$(e),o&&o.d(l),l&&$(t),s&&s.d(l),l&&$(r)}}}function Kyt(n){let e,t;return e=new rr({props:{title:n[8][n[3]].title,cancelText:"Cancel",size:"L",confirmText:n[8][n[3]].confirmButtonText,showConfirmButton:!!n[8][n[3]].onConfirm,onConfirm:n[8][n[3]].onConfirm,disabled:!n[4],$$slots:{default:[Zyt]},$$scope:{ctx:n}}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,[i]){const a={};i&264&&(a.title=r[8][r[3]].title),i&264&&(a.confirmText=r[8][r[3]].confirmButtonText),i&264&&(a.showConfirmButton=!!r[8][r[3]].onConfirm),i&264&&(a.onConfirm=r[8][r[3]].onConfirm),i&16&&(a.disabled=!r[4]),i&525054&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function Jyt(n,e,t){let r,i,a,o;me(n,zr,D=>t(18,a=D)),me(n,Ha,D=>t(14,o=D));let{integration:s}=e,{continueSetupId:l=!1}=e,u=XH(s);u.config.continueSetupId=l;let{schema:c}=u;vn(async()=>{await Ha.init()});const f=BR[Ra.GOOGLE_SHEETS],d={AUTH:"auth",SET_URL:"set_url",SET_SHEETS:"set_sheets"};let p=l?d.SET_URL:d.AUTH,h=!1,m,v,b,w;L1(()=>{p===d.SET_SHEETS&&a(`./datasource/${u._id}`)});function O(D){u=D,t(1,u),t(12,s),t(2,v)}const C=D=>t(4,h=D.detail);function L(D){v=D,t(2,v)}return n.$$set=D=>{"integration"in D&&t(12,s=D.integration),"continueSetupId"in D&&t(13,l=D.continueSetupId)},n.$$.update=()=>{n.$$.dirty&16384&&t(9,r=!!o.googleDatasourceConfigured),n.$$.dirty&4102&&t(8,i={[d.AUTH]:{title:`Connect to ${f}`},[d.SET_URL]:{title:"Connect your spreadsheet",confirmButtonText:"Connect",onConfirm:async()=>{var V;const D=s.features[z6.CONNECTION_CHECKING];if(D){const H=await k7e(u);if(!H.connected)return lt.error(`Unable to connect - ${H.error}`),!1}try{t(1,u=await ZH(u,{tablesFilter:v,skipFetch:!0}))}catch(H){return lt.error((V=H==null?void 0:H.message)!=null?V:"Error saving datasource"),!1}if(!s.features[z6.FETCH_TABLE_NAMES]){lt.success("Datasource created successfully.");return}const P=await KH(u);return t(5,m=P.tableNames),t(3,p=d.SET_SHEETS),lt.success(D?"Connection Successful":"Datasource created successfully."),!1}},[d.SET_SHEETS]:{title:"Choose your sheets",confirmButtonText:v!=null&&v.length?"Fetch sheets":"Continue without fetching",onConfirm:async()=>{var D;try{v.length&&await Bt.buildDatasourceSchema({datasourceId:u._id,tablesFilter:v});return}catch(P){const V=(D=P==null?void 0:P.message)!=null?D:"Error fetching the sheets",H=V.indexOf(" - ");return H>=0?(t(6,b=V.substr(0,H)),t(7,w=V[H+3].toUpperCase()+V.substr(H+4))):(t(6,b=null),t(7,w=V)),!1}}}})},[d,u,v,p,h,m,b,w,i,r,c,f,s,l,o,O,C,L]}class ewt extends Oe{constructor(e){super(),ke(this,e,Jyt,Kyt,ye,{integration:12,continueSetupId:13,GoogleDatasouceConfigStep:0})}get GoogleDatasouceConfigStep(){return this.$$.ctx[0]}}function twt(n){let e;return{c(){e=te(n[0])},m(t,r){k(t,e,r)},p(t,r){r&1&&Ye(e,t[0])},d(t){t&&$(e)}}}function nwt(n){let e;return{c(){e=te(n[1])},m(t,r){k(t,e,r)},p(t,r){r&2&&Ye(e,t[1])},d(t){t&&$(e)}}}function rwt(n){let e,t,r,i,a,o,s,l,u,c;const f=n[3].default,d=bn(f,n,n[5],null);return a=new Tt({props:{$$slots:{default:[twt]},$$scope:{ctx:n}}}),s=new Ft({props:{$$slots:{default:[nwt]},$$scope:{ctx:n}}}),{c(){e=U("div"),t=U("div"),r=U("div"),d&&d.c(),i=B(),T(a.$$.fragment),o=B(),T(s.$$.fragment),z(r,"class","icon svelte-16hdnry"),z(t,"class","header svelte-16hdnry"),z(e,"class","option svelte-16hdnry"),_e(e,"disabled",n[2])},m(p,h){k(p,e,h),R(e,t),R(t,r),d&&d.m(r,null),R(t,i),M(a,t,null),R(e,o),M(s,e,null),l=!0,u||(c=at(e,"click",n[4]),u=!0)},p(p,[h]){d&&d.p&&(!l||h&32)&&wn(d,f,p,p[5],l?yn(f,p[5],h,null):$n(p[5]),null);const m={};h&33&&(m.$$scope={dirty:h,ctx:p}),a.$set(m);const v={};h&34&&(v.$$scope={dirty:h,ctx:p}),s.$set(v),(!l||h&4)&&_e(e,"disabled",p[2])},i(p){l||(g(d,p),g(a.$$.fragment,p),g(s.$$.fragment,p),l=!0)},o(p){_(d,p),_(a.$$.fragment,p),_(s.$$.fragment,p),l=!1},d(p){p&&$(e),d&&d.d(p),E(a),E(s),u=!1,c()}}}function iwt(n,e,t){let{$$slots:r={},$$scope:i}=e,{title:a}=e,{description:o}=e,{disabled:s}=e;function l(u){un.call(this,n,u)}return n.$$set=u=>{"title"in u&&t(0,a=u.title),"description"in u&&t(1,o=u.description),"disabled"in u&&t(2,s=u.disabled),"$$scope"in u&&t(5,i=u.$$scope)},[a,o,s,r,l,i]}class _k extends Oe{constructor(e){super(),ke(this,e,iwt,rwt,ye,{title:0,description:1,disabled:2})}}function awt(n){let e,t=n[1](n[0])+"",r;return{c(){e=new Dfe(!1),r=st(),e.a=r},m(i,a){e.m(t,i,a),k(i,r,a)},p(i,[a]){a&1&&t!==(t=i[1](i[0])+"")&&e.p(t)},i:We,o:We,d(i){i&&$(r),i&&e.d()}}}function owt(n,e,t){let{size:r}=e,{svgHtml:i}=e;function a(o){if(o.includes("height=")&&(o=o.replace(/height="[^"]+"/,`height="${r}"`)),o.includes("width=")&&(o=o.replace(/width="[^"]+"/,`width="${r}"`)),o.includes("id=")){const s=o.match(/id="([^"]+)"/g);for(let l of s)o=o.replace(new RegExp(l,"g"),q2())}return o}return n.$$set=o=>{"size"in o&&t(2,r=o.size),"svgHtml"in o&&t(0,i=o.svgHtml)},[i,a,r]}class swt extends Oe{constructor(e){super(),ke(this,e,owt,awt,ye,{size:2,svgHtml:0})}}function lwt(n){let e,t,r,i={ctx:n,current:null,token:null,hasCatch:!1,pending:dwt,then:fwt,catch:cwt,value:4,blocks:[,,,]};return GT(t=wte(n[1]),i),{c(){e=st(),i.block.c()},m(a,o){k(a,e,o),i.block.m(a,i.anchor=o),i.mount=()=>e.parentNode,i.anchor=e,r=!0},p(a,o){n=a,i.ctx=n,o&2&&t!==(t=wte(n[1]))&>(t,i)||Hfe(i,n,o)},i(a){r||(g(i.block),r=!0)},o(a){for(let o=0;o<3;o+=1){const s=i.blocks[o];_(s)}r=!1},d(a){a&&$(e),i.block.d(a),i.token=null,i=null}}}function uwt(n){let e,t,r;var i=n[1].icon;function a(o){return{props:{height:o[0],width:o[0]}}}return i&&(e=pi(i,a(n))),{c(){e&&T(e.$$.fragment),t=st()},m(o,s){e&&M(e,o,s),k(o,t,s),r=!0},p(o,s){const l={};if(s&1&&(l.height=o[0]),s&1&&(l.width=o[0]),i!==(i=o[1].icon)){if(e){pe();const u=e;_(u.$$.fragment,1,0,()=>{E(u,1)}),he()}i?(e=pi(i,a(o)),T(e.$$.fragment),g(e.$$.fragment,1),M(e,t.parentNode,t)):e=null}else i&&e.$set(l)},i(o){r||(e&&g(e.$$.fragment,o),r=!0)},o(o){e&&_(e.$$.fragment,o),r=!1},d(o){o&&$(t),e&&E(e,o)}}}function cwt(n){return{c:We,m:We,p:We,i:We,o:We,d:We}}function fwt(n){let e,t;return e=new swt({props:{size:n[0],svgHtml:n[4]}}),{c(){T(e.$$.fragment)},m(r,i){M(e,r,i),t=!0},p(r,i){const a={};i&1&&(a.size=r[0]),i&2&&(a.svgHtml=r[4]),e.$set(a)},i(r){t||(g(e.$$.fragment,r),t=!0)},o(r){_(e.$$.fragment,r),t=!1},d(r){E(e,r)}}}function dwt(n){return{c:We,m:We,p:We,i:We,o:We,d:We}}function pwt(n){let e,t,r,i;const a=[uwt,lwt],o=[];function s(l,u){return l[1].icon?0:l[1].url?1:-1}return~(e=s(n))&&(t=o[e]=a[e](n)),{c(){t&&t.c(),r=st()},m(l,u){~e&&o[e].m(l,u),k(l,r,u),i=!0},p(l,[u]){let c=e;e=s(l),e===c?~e&&o[e].p(l,u):(t&&(pe(),_(o[c],1,1,()=>{o[c]=null}),he()),~e?(t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),g(t,1),t.m(r.parentNode,r)):t=null)},i(l){i||(g(t),i=!0)},o(l){_(t),i=!1},d(l){~e&&o[e].d(l),l&&$(r)}}}async function wte(n){const e=`${n.url}`;return(await fetch(e,{headers:{pragma:"no-cache",["cache-control"]:"no-cache"}})).text()}function hwt(n,e,t){let r,{integrationType:i}=e,{schema:a}=e,{size:o="18"}=e;return n.$$set=s=>{"integrationType"in s&&t(2,i=s.integrationType),"schema"in s&&t(3,a=s.schema),"size"in s&&t(0,o=s.size)},n.$$.update=()=>{n.$$.dirty&12&&t(1,r=Q_t(i,a))},[o,r,i,a]}class C7e extends Oe{constructor(e){super(),ke(this,e,hwt,pwt,ye,{integrationType:2,schema:3,size:0})}}var mwt={prefix:"fab",iconName:"discord",icon:[640,512,[],"f392","M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"]},gwt={prefix:"fab",iconName:"github",icon:[496,512,[],"f09b","M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"]},vwt={prefix:"fas",iconName:"heading",icon:[448,512,["header"],"f1dc","M0 64C0 46.3 14.3 32 32 32H80h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H112V208H336V96H320c-17.7 0-32-14.3-32-32s14.3-32 32-32h48 48c17.7 0 32 14.3 32 32s-14.3 32-32 32H400V240 416h16c17.7 0 32 14.3 32 32s-14.3 32-32 32H368 320c-17.7 0-32-14.3-32-32s14.3-32 32-32h16V272H112V416h16c17.7 0 32 14.3 32 32s-14.3 32-32 32H80 32c-17.7 0-32-14.3-32-32s14.3-32 32-32H48V240 96H32C14.3 96 0 81.7 0 64z"]},_wt={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"]},bwt={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24V305.9l-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31V408z"]},ywt={prefix:"fas",iconName:"bold",icon:[384,512,[],"f032","M0 64C0 46.3 14.3 32 32 32H80 96 224c70.7 0 128 57.3 128 128c0 31.3-11.3 60.1-30 82.3c37.1 22.4 62 63.1 62 109.7c0 70.7-57.3 128-128 128H96 80 32c-17.7 0-32-14.3-32-32s14.3-32 32-32H48V256 96H32C14.3 96 0 81.7 0 64zM224 224c35.3 0 64-28.7 64-64s-28.7-64-64-64H112V224H224zM112 288V416H256c35.3 0 64-28.7 64-64s-28.7-64-64-64H224 112z"]},wwt={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h96 32H424c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},$wt={prefix:"fas",iconName:"table-columns",icon:[512,512,["columns"],"f0db","M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zm64 64V416H224V160H64zm384 0H288V416H448V160z"]},kwt=$wt,Owt={prefix:"fas",iconName:"italic",icon:[384,512,[],"f033","M128 64c0-17.7 14.3-32 32-32H352c17.7 0 32 14.3 32 32s-14.3 32-32 32H293.3L160 416h64c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H90.7L224 96H160c-17.7 0-32-14.3-32-32z"]},Awt={prefix:"fas",iconName:"list-ol",icon:[512,512,["list-1-2","list-numeric"],"f0cb","M24 56c0-13.3 10.7-24 24-24H80c13.3 0 24 10.7 24 24V176h16c13.3 0 24 10.7 24 24s-10.7 24-24 24H40c-13.3 0-24-10.7-24-24s10.7-24 24-24H56V80H48C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432H120c13.3 0 24 10.7 24 24s-10.7 24-24 24H32c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]},Swt={prefix:"fas",iconName:"up-down-left-right",icon:[512,512,["arrows-alt"],"f0b2","M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8h32v96H128V192c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V288h96v96H192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8H288V288h96v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6v32H288V128h32c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z"]},zwt=Swt,Cwt={prefix:"fas",iconName:"circle-question",icon:[512,512,[62108,"question-circle"],"f059","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},Mwt=Cwt,Ewt={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},Twt={prefix:"fas",iconName:"envelope",icon:[512,512,[128386,9993,61443],"f0e0","M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"]},Lwt={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},Pwt={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M562.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L405.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C189.5 251.2 196 330 246 380c56.5 56.5 148 56.5 204.5 0L562.8 267.7zM43.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C57 372 57 321 88.5 289.5L200.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C416.5 260.8 410 182 360 132c-56.5-56.5-148-56.5-204.5 0L43.2 244.3z"]},Dwt={prefix:"fas",iconName:"play",icon:[384,512,[9654],"f04b","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"]},Iwt={prefix:"fas",iconName:"list-ul",icon:[512,512,["list-dots"],"f0ca","M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM64 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48-208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z"]},Rwt={prefix:"fas",iconName:"xmark",icon:[320,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z"]},Bwt={prefix:"fas",iconName:"quote-left",icon:[448,512,[8220,"quote-left-alt"],"f10d","M0 216C0 149.7 53.7 96 120 96h8c17.7 0 32 14.3 32 32s-14.3 32-32 32h-8c-30.9 0-56 25.1-56 56v8h64c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V320 288 216zm256 0c0-66.3 53.7-120 120-120h8c17.7 0 32 14.3 32 32s-14.3 32-32 32h-8c-30.9 0-56 25.1-56 56v8h64c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H320c-35.3 0-64-28.7-64-64V320 288 216z"]},Hwt={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},Vwt={prefix:"fas",iconName:"book",icon:[448,512,[128212],"f02d","M96 0C43 0 0 43 0 96V416c0 53 43 96 96 96H384h32c17.7 0 32-14.3 32-32s-14.3-32-32-32V384c17.7 0 32-14.3 32-32V32c0-17.7-14.3-32-32-32H384 96zm0 384H352v64H96c-17.7 0-32-14.3-32-32s14.3-32 32-32zm32-240c0-8.8 7.2-16 16-16H336c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16zm16 48H336c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]};function $te(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function mr(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?$te(Object(t),!0).forEach(function(r){a1(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):$te(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function uA(n){return uA=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uA(n)}function Nwt(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function kte(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function Fwt(n,e,t){return e&&kte(n.prototype,e),t&&kte(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function a1(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function tV(n,e){return jwt(n)||xwt(n,e)||M7e(n,e)||Wwt()}function uy(n){return Uwt(n)||qwt(n)||M7e(n)||Qwt()}function Uwt(n){if(Array.isArray(n))return rI(n)}function jwt(n){if(Array.isArray(n))return n}function qwt(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function xwt(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r=[],i=!0,a=!1,o,s;try{for(t=t.call(n);!(i=(o=t.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&t.return!=null&&t.return()}finally{if(a)throw s}}return r}}function M7e(n,e){if(!!n){if(typeof n=="string")return rI(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rI(n,e)}}function rI(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function Qwt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
package/builder/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link href="/builder/fonts/source-sans-pro/600.css" rel="stylesheet" />
|
|
10
10
|
<link href="/builder/fonts/source-sans-pro/700.css" rel="stylesheet" />
|
|
11
11
|
<link href="/builder/fonts/remixicon.css" rel="stylesheet" />
|
|
12
|
-
<script type="module" crossorigin src="/builder/assets/index.
|
|
12
|
+
<script type="module" crossorigin src="/builder/assets/index.a911532c.js"></script>
|
|
13
13
|
<link rel="stylesheet" href="/builder/assets/index.cdf47ed0.css">
|
|
14
14
|
</head>
|
|
15
15
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.7.34-alpha.
|
|
4
|
+
"version": "2.7.34-alpha.3",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"license": "GPL-3.0",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
49
|
-
"@budibase/backend-core": "2.7.34-alpha.
|
|
50
|
-
"@budibase/client": "2.7.34-alpha.
|
|
51
|
-
"@budibase/pro": "2.7.34-alpha.
|
|
52
|
-
"@budibase/shared-core": "2.7.34-alpha.
|
|
53
|
-
"@budibase/string-templates": "2.7.34-alpha.
|
|
54
|
-
"@budibase/types": "2.7.34-alpha.
|
|
49
|
+
"@budibase/backend-core": "2.7.34-alpha.3",
|
|
50
|
+
"@budibase/client": "2.7.34-alpha.3",
|
|
51
|
+
"@budibase/pro": "2.7.34-alpha.3",
|
|
52
|
+
"@budibase/shared-core": "2.7.34-alpha.3",
|
|
53
|
+
"@budibase/string-templates": "2.7.34-alpha.3",
|
|
54
|
+
"@budibase/types": "2.7.34-alpha.3",
|
|
55
55
|
"@bull-board/api": "3.7.0",
|
|
56
56
|
"@bull-board/koa": "3.9.4",
|
|
57
57
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -196,5 +196,5 @@
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
|
-
"gitHead": "
|
|
199
|
+
"gitHead": "71f85eaa63ed9d2d70d8c787a8491619e4acca69"
|
|
200
200
|
}
|