@kizenapps/cli 0.12.0 → 0.14.0
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/LICENSE.md +674 -0
- package/README.md +42 -0
- package/dist/index.js +89 -1986
- package/dist/index.js.map +1 -1
- package/dist/viewer/assets/AppDetailPage-D4r3W5v5.js +1 -0
- package/dist/viewer/assets/BootstrapContext-D5ZnMrOp.js +1 -0
- package/dist/viewer/assets/Card-BpDJPrPZ.js +1 -0
- package/dist/viewer/assets/CodeStepsPage-BzaaN9Kb.js +1 -0
- package/dist/viewer/assets/CodeViewer-Ce2qKSWi.js +4 -0
- package/dist/viewer/assets/ConfigurationPage-DyGQQTe-.js +1 -0
- package/dist/viewer/assets/DevSidebar-h9gYdctz.js +1 -0
- package/dist/viewer/assets/IconReferencePage-BLciUKH9.js +1 -0
- package/dist/viewer/assets/SandboxPage-IYn-KIbv.js +1 -0
- package/dist/viewer/assets/SidebarContext-Cn8QRb77.js +1 -0
- package/dist/viewer/assets/SourceBrowserPage-BOlm36Dg.js +1 -0
- package/dist/viewer/assets/Tooltip-tpqNw0op.js +1 -0
- package/dist/viewer/assets/VersionsPage-C02dpN3Y.js +1 -0
- package/dist/viewer/assets/WhenBadge-GxhTQKsq.js +1 -0
- package/dist/viewer/assets/api-C5Iu-4AS.js +1 -0
- package/dist/viewer/assets/bundleQuery-CjbA01rb.js +1 -0
- package/dist/viewer/assets/configStorage-BnMh081m.js +10 -0
- package/dist/viewer/assets/{fa-core-wsCxaNB7.js → fa-core-BoBqCOD3.js} +1 -1
- package/dist/viewer/assets/index-CjU7OUke.js +5 -0
- package/dist/viewer/assets/index-dW-Omils.css +2 -0
- package/dist/viewer/assets/{react-CkuOm_dq.js → react-csXWLXSE.js} +1 -1
- package/dist/viewer/assets/{recordDetail.worker-BIHPFt8Y.js → recordDetail.worker-C0-mQTaj.js} +1 -1
- package/dist/viewer/assets/storageKeys-ClzdCxlg.js +1 -0
- package/dist/viewer/assets/useCriticalExceptionDialog-DK8ufamu.js +5 -0
- package/dist/viewer/assets/{useLocalStorage-BWwvt0nG.js → useLocalStorage-B73GyZbK.js} +1 -1
- package/dist/viewer/assets/{useNavigate-9J1ZzN1J.js → useNavigate-BblEmQ3O.js} +1 -1
- package/dist/viewer/assets/useQuery-5OkVbV1s.js +1 -0
- package/dist/viewer/assets/{validIcons-UmfwFGTT.js → validIcons-BzGQ4tWD.js} +1 -1
- package/dist/viewer/index.html +12 -10
- package/package.json +5 -7
- package/dist/chunk-4Z6S6LWP.js +0 -6134
- package/dist/chunk-4Z6S6LWP.js.map +0 -1
- package/dist/chunk-HJPLDI45.js +0 -6134
- package/dist/chunk-HJPLDI45.js.map +0 -1
- package/dist/chunk-LSHHXCC6.js +0 -3639
- package/dist/chunk-LSHHXCC6.js.map +0 -1
- package/dist/chunk-SEGVTWSK.js +0 -44
- package/dist/chunk-SEGVTWSK.js.map +0 -1
- package/dist/chunk-ZWE3DS7E.js +0 -39
- package/dist/chunk-ZWE3DS7E.js.map +0 -1
- package/dist/devtools-LZRAH4XS.js +0 -90
- package/dist/devtools-LZRAH4XS.js.map +0 -1
- package/dist/dist-C3F6UOWF.js +0 -8472
- package/dist/dist-C3F6UOWF.js.map +0 -1
- package/dist/dist-NUJOSN7W.js +0 -8472
- package/dist/dist-NUJOSN7W.js.map +0 -1
- package/dist/dist-QHDMIBVE.js +0 -135
- package/dist/dist-QHDMIBVE.js.map +0 -1
- package/dist/dist-ZIZQOSY3.js +0 -135
- package/dist/dist-ZIZQOSY3.js.map +0 -1
- package/dist/gzip-size-K37OQCQ2.js +0 -137
- package/dist/gzip-size-K37OQCQ2.js.map +0 -1
- package/dist/gzip-size-QRGIYYEQ.js +0 -137
- package/dist/gzip-size-QRGIYYEQ.js.map +0 -1
- package/dist/viewer/assets/AppDetailPage-BPvWscWJ.js +0 -1
- package/dist/viewer/assets/AppDetailPage-DIuYKCTQ.js +0 -1
- package/dist/viewer/assets/AppDetailPage-r3jzO9Kf.js +0 -1
- package/dist/viewer/assets/BootstrapContext-CExPp3R2.js +0 -1
- package/dist/viewer/assets/BootstrapContext-CTQMWXf-.js +0 -1
- package/dist/viewer/assets/BootstrapContext-DbnbWmQT.js +0 -1
- package/dist/viewer/assets/Card-Bmn1HMWl.js +0 -1
- package/dist/viewer/assets/Card-DMz6T3VL.js +0 -1
- package/dist/viewer/assets/Card-DsqKctyM.js +0 -1
- package/dist/viewer/assets/CodeStepsPage-BHqLfCdV.js +0 -4
- package/dist/viewer/assets/CodeStepsPage-BymhEfzO.js +0 -4
- package/dist/viewer/assets/CodeStepsPage-CD_MhDwY.js +0 -4
- package/dist/viewer/assets/CodeStepsPage-CgI-LqEx.js +0 -4
- package/dist/viewer/assets/CodeStepsPage-Dak3saZE.js +0 -5
- package/dist/viewer/assets/CodeStepsPage-Zj6DscGd.js +0 -4
- package/dist/viewer/assets/ConfigurationPage-Cjy9TH3N.js +0 -1
- package/dist/viewer/assets/ConfigurationPage-DmX-6MM-.js +0 -1
- package/dist/viewer/assets/ConfigurationPage-J56kCD_e.js +0 -1
- package/dist/viewer/assets/CredentialsContext-Xbse1T0q.js +0 -1
- package/dist/viewer/assets/CredentialsContext-zl2e9kpM.js +0 -1
- package/dist/viewer/assets/DevSidebar-B30mgxSn.js +0 -1
- package/dist/viewer/assets/DevSidebar-BhTD2bBO.js +0 -1
- package/dist/viewer/assets/DevSidebar-CsEdCTej.js +0 -1
- package/dist/viewer/assets/IconReferencePage-B6j9wlte.js +0 -1
- package/dist/viewer/assets/IconReferencePage-CJa9yg9Z.js +0 -1
- package/dist/viewer/assets/IconReferencePage-Q5I-lMFQ.js +0 -1
- package/dist/viewer/assets/SandboxPage-C0h7GUkw.js +0 -1
- package/dist/viewer/assets/SandboxPage-GDcydJnJ.js +0 -1
- package/dist/viewer/assets/SandboxPage-JREBQ4id.js +0 -1
- package/dist/viewer/assets/SidebarContext-BPkYyxET.js +0 -1
- package/dist/viewer/assets/SidebarContext-DVDXFWJI.js +0 -1
- package/dist/viewer/assets/SidebarContext-HucmR353.js +0 -1
- package/dist/viewer/assets/VersionsPage-B76eugMm.js +0 -1
- package/dist/viewer/assets/VersionsPage-BIpB0iBz.js +0 -1
- package/dist/viewer/assets/VersionsPage-D0qenxK5.js +0 -1
- package/dist/viewer/assets/api-BOqcXygX.js +0 -1
- package/dist/viewer/assets/api-DqAiw0w9.js +0 -1
- package/dist/viewer/assets/bundleQuery-206rQR6g.js +0 -1
- package/dist/viewer/assets/bundleQuery-L4H4wq5q.js +0 -1
- package/dist/viewer/assets/fa-core-DaD7O-yO.js +0 -558
- package/dist/viewer/assets/fa-pro-icons-Dzkwxnip.js +0 -1
- package/dist/viewer/assets/index-BPiwld5D.js +0 -5
- package/dist/viewer/assets/index-BiyeMU_r.css +0 -2
- package/dist/viewer/assets/index-BlJv_543.js +0 -5
- package/dist/viewer/assets/index-CAYNux5J.js +0 -5
- package/dist/viewer/assets/index-D4AnoAXz.js +0 -5
- package/dist/viewer/assets/index-D8Koqlb-.js +0 -5
- package/dist/viewer/assets/index-DKrC0qkC.js +0 -5
- package/dist/viewer/assets/react-CyWK9rg5.js +0 -9
- package/dist/viewer/assets/useLocalStorage-BlZWItfY.js +0 -1
- package/dist/viewer/assets/useLocalStorage-CQO0VGQ6.js +0 -1
- package/dist/viewer/assets/useNavigate-V8wjv5GQ.js +0 -1
- package/dist/viewer/assets/useObjectLookups-BAqe9wvu.js +0 -14
- package/dist/viewer/assets/useObjectLookups-C65zm-bM.js +0 -14
- package/dist/viewer/assets/useObjectLookups-CslM2vSA.js +0 -14
- package/dist/viewer/assets/validIcons-Dqgxgpv-.js +0 -1
- /package/dist/viewer/assets/{CodeStepsPage-DdKuH37F.css → CodeViewer-DdKuH37F.css} +0 -0
- /package/dist/viewer/assets/{fa-pro-icons-CiTC899m.js → fa-pro-icons-j8-_MCQ7.js} +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{A as t,j as n,k as r,y as i}from"./fa-core-BoBqCOD3.js";import{n as a}from"./react-csXWLXSE.js";import{A as o,I as s,M as c,O as l,a as u,c as d,d as f,f as p,i as m,l as h,n as g,o as _,p as v,r as y,s as b,u as x,v as S}from"./useQuery-5OkVbV1s.js";import{a as C,i as w,n as T,o as E,r as D}from"./BootstrapContext-D5ZnMrOp.js";import{r as O}from"./api-C5Iu-4AS.js";import{C as k,E as A,S as j,T as M,_ as N,b as P,d as F,f as I,g as L,h as R,m as ee,p as te,v as z,w as B,x as ne,y as re}from"./configStorage-BnMh081m.js";function ie(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function ae(e,t,n){let r=e.slice(0);return r[t]=n,r}var V=class extends s{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,S.batch(()=>{let e=this.#i,t=this.#f(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!c(e,n)});!o&&!s||(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(ie(e,n).forEach(e=>{e.destroy()}),ie(n,e).forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})),this.#m()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#f(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=o(this.#a,t(e))),this.#a}return e}#f(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new v(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#p(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=ae(this.#t,n,t),this.#m())}#m(){if(this.hasListeners()){let e=this.#a,t=this.#u(this.#t,this.#l);e!==this.#d(t,this.#r?.combine)&&S.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},H=e(n(),1);function U({queries:e,...t},n){let r=p(n),i=h(),a=d(),o=H.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{g(e),u(e,a,r.getQueryCache().get(e.queryHash))}),b(a);let[s]=H.useState(()=>new V(r,o,t)),[c,f,x]=s.getOptimisticResult(o,t.combine),C=!i&&t.subscribed!==!1;H.useSyncExternalStore(H.useCallback(e=>C?s.subscribe(S.batchCalls(e)):l,[s,C]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),H.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let w=c.some((e,t)=>m(o[t],e))?c.flatMap((e,t)=>{let n=o[t];return n&&m(n,e)?y(n,new v(r,n),a):[]}):[];if(w.length>0)throw Promise.all(w);let T=c.find((e,t)=>{let n=o[t];return n&&_({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(T?.error)throw T.error;return f(x())}var oe=`integration:${j.RUN_FRAME_SCRIPT}`,se={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},ce=(e,t,n)=>{let r,i=se[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function le(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var ue={date:le({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:le({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:le({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},de={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},fe=(e,t,n,r)=>de[e];function pe(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var me={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:pe({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:pe({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:pe({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:pe({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:pe({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function W(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ge(s,e=>e.test(o)):he(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function he(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ge(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function _e(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var ve={code:`en-US`,formatDistance:ce,formatLong:ue,formatRelative:fe,localize:me,match:{ordinalNumber:_e({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:W({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:W({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:W({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:W({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:W({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}},ye={};function be(){return ye}var xe=365.2425,Se=6048e5,Ce=864e5,we=3600*24;we*7,we*xe/12*3;var Te=Symbol.for(`constructDateFrom`);function G(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&Te in e?e[Te](t):e instanceof Date?new e.constructor(t):new Date(t)}function K(e,t){return G(t||e,e)}function Ee(e){let t=K(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function De(e,...t){let n=G.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function Oe(e,t){let n=K(e,t?.in);return n.setHours(0,0,0,0),n}function ke(e,t,n){let[r,i]=De(n?.in,e,t),a=Oe(r),o=Oe(i),s=+a-Ee(a),c=+o-Ee(o);return Math.round((s-c)/Ce)}function Ae(e,t){let n=K(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function je(e,t){let n=K(e,t?.in);return ke(n,Ae(n))+1}function Me(e,t){let n=be(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=K(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Ne(e,t){return Me(e,{...t,weekStartsOn:1})}function Pe(e,t){let n=K(e,t?.in),r=n.getFullYear(),i=G(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=Ne(i),o=G(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=Ne(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Fe(e,t){let n=Pe(e,t),r=G(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ne(r)}function Ie(e,t){let n=K(e,t?.in),r=Ne(n)-+Fe(n);return Math.round(r/Se)+1}function Le(e,t){let n=K(e,t?.in),r=n.getFullYear(),i=be(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=G(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=Me(o,t),c=G(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=Me(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function Re(e,t){let n=be(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Le(e,t),a=G(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Me(a,t)}function ze(e,t){let n=K(e,t?.in),r=Me(n,t)-+Re(n,t);return Math.round(r/Se)+1}function q(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var J={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return q(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):q(n+1,2)},d(e,t){return q(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return q(e.getHours()%12||12,t.length)},H(e,t){return q(e.getHours(),t.length)},m(e,t){return q(e.getMinutes(),t.length)},s(e,t){return q(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return q(Math.trunc(r*10**(n-3)),t.length)}},Be={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},Ve={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return J.y(e,t)},Y:function(e,t,n,r){let i=Le(e,r),a=i>0?i:1-i;return t===`YY`?q(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):q(a,t.length)},R:function(e,t){return q(Pe(e),t.length)},u:function(e,t){return q(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return q(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return q(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return J.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return q(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=ze(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):q(i,t.length)},I:function(e,t,n){let r=Ie(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):q(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):J.d(e,t)},D:function(e,t,n){let r=je(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):q(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return q(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return q(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return q(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?Be.noon:r===0?Be.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?Be.evening:r>=12?Be.afternoon:r>=4?Be.morning:Be.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return J.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):J.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):q(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):q(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):J.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):J.s(e,t)},S:function(e,t){return J.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return Ue(r);case`XXXX`:case`XX`:return We(r);default:return We(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return Ue(r);case`xxxx`:case`xx`:return We(r);default:return We(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+He(r,`:`);default:return`GMT`+We(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+He(r,`:`);default:return`GMT`+We(r,`:`)}},t:function(e,t,n){return q(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return q(+e,t.length)}};function He(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+q(a,2)}function Ue(e,t){return e%60==0?(e>0?`-`:`+`)+q(Math.abs(e)/60,2):We(e,t)}function We(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=q(Math.trunc(r/60),2),a=q(r%60,2);return n+i+t+a}var Ge=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},Ke=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},qe={p:Ke,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Ge(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,Ge(r,t)).replace(`{{time}}`,Ke(i,t))}},Je=/^D+$/,Ye=/^Y+$/,Xe=[`D`,`DD`,`YY`,`YYYY`];function Ze(e){return Je.test(e)}function Qe(e){return Ye.test(e)}function $e(e,t,n){let r=et(e,t,n);if(console.warn(r),Xe.includes(e))throw RangeError(r)}function et(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function tt(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function nt(e){return!(!tt(e)&&typeof e!=`number`||isNaN(+K(e)))}var rt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,it=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,at=/^'([^]*?)'?$/,ot=/''/g,st=/[a-zA-Z]/;function ct(e,t,n){let r=be(),i=n?.locale??r.locale??ve,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=K(e,n?.in);if(!nt(s))throw RangeError(`Invalid time value`);let c=t.match(it).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=qe[t];return n(e,i.formatLong)}return e}).join(``).match(rt).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:lt(e)};if(Ve[t])return{isToken:!0,value:e};if(t.match(st))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&Qe(a)||!n?.useAdditionalDayOfYearTokens&&Ze(a))&&$e(a,t,String(e));let o=Ve[a[0]];return o(s,a,i.localize,l)}).join(``)}function lt(e){let t=e.match(at);return t?t[1].replace(ot,`'`):e}function ut(e,t){let n=K(e,t?.in);return n.setHours(23,59,59,999),n}function dt(){return Object.assign({},be())}function ft(e,t,n){let r=dt(),i=ht(e,n.timeZone,n.locale??r.locale);return`formatToParts`in i?pt(i,t):mt(i,t)}function pt(e,t){let n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if(n[e].type===`timeZoneName`)return n[e].value}function mt(e,t){let n=e.format(t).replace(/\u200E/g,``),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):``}function ht(e,t,n){return new Intl.DateTimeFormat(n?[n.code,`en-US`]:void 0,{timeZone:t,timeZoneName:e})}function gt(e,t){let n=Ct(t);return`formatToParts`in n?vt(n,e):yt(n,e)}var _t={year:0,month:1,day:2,hour:3,minute:4,second:5};function vt(e,t){try{let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let t=_t[n[e].type];t!==void 0&&(r[t]=parseInt(n[e].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function yt(e,t){let n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}var bt={},xt=new Intl.DateTimeFormat(`en-US`,{hourCycle:`h23`,timeZone:`America/New_York`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}).format(new Date(`2014-06-25T04:00:00.123Z`)),St=xt===`06/25/2014, 00:00:00`||xt===`06/25/2014 00:00:00`;function Ct(e){return bt[e]||(bt[e]=St?new Intl.DateTimeFormat(`en-US`,{hourCycle:`h23`,timeZone:e,year:`numeric`,month:`numeric`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`numeric`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`})),bt[e]}function wt(e,t,n,r,i,a,o){let s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(r,i,a,o),s}var Tt=36e5,Et=6e4,Dt={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Ot(e,t,n){if(!e)return 0;let r=Dt.timezoneZ.exec(e);if(r)return 0;let i,a;if(r=Dt.timezoneHH.exec(e),r)return i=parseInt(r[1],10),Mt(i)?-(i*Tt):NaN;if(r=Dt.timezoneHHMM.exec(e),r){i=parseInt(r[2],10);let e=parseInt(r[3],10);return Mt(i,e)?(a=Math.abs(i)*Tt+e*Et,r[1]===`+`?-a:a):NaN}if(Pt(e)){t=new Date(t||Date.now());let r=At(n?t:kt(t),e);return-(n?r:jt(t,r,e))}return NaN}function kt(e){return wt(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function At(e,t){let n=gt(e,t),r=wt(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),i=e.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function jt(e,t,n){let r=e.getTime()-t,i=At(new Date(r),n);if(t===i)return t;r-=i-t;let a=At(new Date(r),n);return i===a?i:Math.max(i,a)}function Mt(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var Nt={};function Pt(e){if(Nt[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Nt[e]=!0,!0}catch{return!1}}var Ft=60*1e3,It={X:function(e,t,n){let r=Lt(n.timeZone,e);if(r===0)return`Z`;switch(t){case`X`:return Bt(r);case`XXXX`:case`XX`:return zt(r);default:return zt(r,`:`)}},x:function(e,t,n){let r=Lt(n.timeZone,e);switch(t){case`x`:return Bt(r);case`xxxx`:case`xx`:return zt(r);default:return zt(r,`:`)}},O:function(e,t,n){let r=Lt(n.timeZone,e);switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+Vt(r,`:`);default:return`GMT`+zt(r,`:`)}},z:function(e,t,n){switch(t){case`z`:case`zz`:case`zzz`:return ft(`short`,e,n);default:return ft(`long`,e,n)}}};function Lt(e,t){let n=e?Ot(e,t,!0)/Ft:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw RangeError(`Invalid time zone specified: `+e);return n}function Rt(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString();for(;r.length<t;)r=`0`+r;return n+r}function zt(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Rt(Math.floor(r/60),2),a=Rt(Math.floor(r%60),2);return n+i+t+a}function Bt(e,t){return e%60==0?(e>0?`-`:`+`)+Rt(Math.abs(e)/60,2):zt(e,t)}function Vt(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+Rt(a,2)}function Ht(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e-+t}var Ut=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Wt=36e5,Gt=6e4,Kt=2,Y={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Ut};function qt(e,t={}){if(arguments.length<1)throw TypeError(`1 argument required, but only `+arguments.length+` present`);if(e===null)return new Date(NaN);let n=t.additionalDigits==null?Kt:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw RangeError(`additionalDigits must be 0, 1 or 2`);if(e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`)return new Date(e.getTime());if(typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`)return new Date(e);if(Object.prototype.toString.call(e)!==`[object String]`)return new Date(NaN);let r=Jt(e),{year:i,restDateString:a}=Yt(r.date,n),o=Xt(a,i);if(o===null||isNaN(o.getTime()))return new Date(NaN);if(o){let e=o.getTime(),n=0,i;if(r.time&&(n=Zt(r.time),n===null||isNaN(n)))return new Date(NaN);if(r.timeZone||t.timeZone){if(i=Ot(r.timeZone||t.timeZone,new Date(e+n)),isNaN(i))return new Date(NaN)}else i=Ht(new Date(e+n)),i=Ht(new Date(e+n+i));return new Date(e+n+i)}else return new Date(NaN)}function Jt(e){let t={},n=Y.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=Y.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){let e=Y.timeZone.exec(r);e?(t.time=r.replace(e[1],``),t.timeZone=e[1].trim()):t.time=r}return t}function Yt(e,t){if(e){let n=Y.YYY[t],r=Y.YYYYY[t],i=Y.YYYY.exec(e)||r.exec(e);if(i){let t=i[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(i=Y.YY.exec(e)||n.exec(e),i){let t=i[1];return{year:parseInt(t,10)*100,restDateString:e.slice(t.length)}}}return{year:null}}function Xt(e,t){if(t===null)return null;let n,r,i;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=Y.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,nn(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=Y.DDD.exec(e),a){n=new Date(0);let e=parseInt(a[1],10);return rn(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(a=Y.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;let e=parseInt(a[2],10);return nn(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(a=Y.Www.exec(e),a)return i=parseInt(a[1],10)-1,an(i)?Qt(t,i):new Date(NaN);if(a=Y.WwwD.exec(e),a){i=parseInt(a[1],10)-1;let e=parseInt(a[2],10)-1;return an(i,e)?Qt(t,i,e):new Date(NaN)}return null}function Zt(e){let t,n,r=Y.HH.exec(e);if(r)return t=parseFloat(r[1].replace(`,`,`.`)),on(t)?t%24*Wt:NaN;if(r=Y.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(`,`,`.`)),on(t,n)?t%24*Wt+n*Gt:NaN;if(r=Y.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);let e=parseFloat(r[3].replace(`,`,`.`));return on(t,n,e)?t%24*Wt+n*Gt+e*1e3:NaN}return null}function Qt(e,t,n){t||=0,n||=0;let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=t*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var $t=[31,28,31,30,31,30,31,31,30,31,30,31],en=[31,29,31,30,31,30,31,31,30,31,30,31];function tn(e){return e%400==0||e%4==0&&e%100!=0}function nn(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;let r=tn(e);if(r&&n>en[t]||!r&&n>$t[t])return!1}return!0}function rn(e,t){if(t<1)return!1;let n=tn(e);return!(n&&t>366||!n&&t>365)}function an(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function on(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}var sn=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function cn(e,t,n={}){t=String(t);let r=t.match(sn);if(r){let i=qt(n.originalDate||e,n);t=r.reduce(function(e,t){if(t[0]===`'`)return e;let r=e.indexOf(t),a=e[r-1]===`'`,o=e.replace(t,`'`+It[t[0]](i,t,n)+`'`);return a?o.substring(0,r-1)+o.substring(r+1):o},t)}return ct(e,t,n)}function ln(e,t,n){e=qt(e,n);let r=Ot(t,e,!0),i=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}function un(e,t,n,r){return r={...r,timeZone:t,originalDate:e},cn(ln(e,t,{timeZone:r.timeZone}),n,r)}var X=t(),dn=a(),fn=(0,H.createContext)(null),pn=({children:e})=>{let t=(0,H.useRef)({}),n=(0,H.useCallback)(()=>{Object.keys(t.current).forEach(e=>{t.current[e]?.forEach(e=>{e()}),t.current[e]=[]})},[]);return(0,H.useEffect)(()=>()=>{n()},[n]),(0,X.jsx)(fn.Provider,{value:{terminators:t,cleanupWorkers:n},children:e})},mn=()=>{let e=(0,H.useContext)(fn);if(!e)throw Error(`useTerminators must be used within a TerminatorsWrapper`);return e},hn=(0,H.createContext)(null),gn=({children:e})=>{let[t,n]=(0,H.useState)({}),r=(0,H.useCallback)((e,t)=>{n(n=>({...n,[e]:{...n[e],...t}}))},[]);return(0,X.jsx)(hn.Provider,{value:{sessionData:t,setSessionData:r},children:e})},_n=()=>{let e=(0,H.useContext)(hn);if(!e)throw Error(`useSessionData must be used within a SessionDataWrapper`);return e},vn=(0,H.createContext)(null),yn=({children:e,bootstrapPlugins:t=[],userConfigs:n=[],user:r,teamMember:i,business:a,clientObject:o,appPath:s})=>{let[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)({}),f=(0,H.useMemo)(()=>Object.values(u).some(e=>e.waitingOnRouteScript),[u]),p=(0,H.useMemo)(()=>t.reduce((e,t)=>({...e,[t.api_name]:t.id}),{}),[t]),m=(0,H.useMemo)(()=>n.reduce((e,t)=>({...e,[t.api_name]:t.config}),{}),[n]),h=(0,H.useCallback)(()=>{l(!0)},[]);return(0,X.jsx)(vn.Provider,{value:{installedPluginAPINamesToIds:p,userConfigsByApiName:m,user:r,teamMember:i,business:a,clientObject:o,appPath:s,onInitialBootstrap:h,setRouteScriptRunState:d},children:e({waitingOnRouteScript:f,hasFinishedBootstrapping:c})})},bn=()=>{let e=(0,H.useContext)(vn);if(!e)throw Error(`useAppState must be used within an AppStateWrapper`);return e},xn=(0,H.createContext)(null),Sn=({children:e})=>{let[t,n]=(0,H.useState)({}),r=(0,H.useCallback)(e=>t=>{n(n=>({...n,[e]:t(n[e]??{indicator:`none`,hidden:!1,pending:!1})}))},[]),i=(0,H.useCallback)(e=>!e||!t[e]?{indicator:`none`,hidden:!1,pending:!1}:{...t[e]},[t]),a=(0,H.useMemo)(()=>{let e=Object.keys(t);return e.length>0&&e.some(e=>t[e]?.indicator===`block`)},[t]);return(0,X.jsx)(xn.Provider,{value:{getRunnerStateUpdater:r,getRunnerState:i},children:e(a)})},Cn=()=>{let e=(0,H.useContext)(xn);if(!e)throw Error(`useRunnerState must be used within a RunnerStateWrapper`);return e},wn=(0,H.createContext)(null),Tn=({children:e,showing:t,showPrompt:n,show:r,onConfirm:i,onHide:a})=>{let[o,s]=(0,H.useState)([]),[c,l]=(0,H.useState)([]),[u,d]=(0,H.useState)([]),f=(0,H.useRef)(void 0),p=(0,H.useRef)(void 0),m=(0,H.useCallback)((e,t)=>{s(n=>[...n,{config:e,cb:t}])},[]),h=(0,H.useCallback)((e,t)=>{l(n=>[...n,{objectId:e,cb:t}])},[]),g=(0,H.useCallback)((e,t,n)=>{d(r=>[...r,{objectId:e,relatedEntityId:t,cb:n}])},[]),_=(0,H.useCallback)(e=>{c[0]?.cb(e),l(e=>e.slice(1))},[c]),v=(0,H.useCallback)(e=>{u[0]?.cb(e),d(e=>e.slice(1))},[u]);(0,H.useEffect)(()=>{o.length>0&&!t&&(f.current=o[0]?.config,p.current=o[0]?.cb,n())},[o,t,n]);let y=(0,H.useCallback)(()=>{f.current=void 0,p.current=void 0,s(e=>e.slice(1))},[]),b=(0,H.useMemo)(()=>({props:{show:r,onConfirm:e=>{i(),p.current&&p.current({canceled:!1,values:e}),y()},onHide:(e,...t)=>{a(...t),p.current&&p.current({canceled:!0,values:{},eventSource:e}),y()}},config:f.current??{}}),[i,a,r,y]);return(0,X.jsx)(wn.Provider,{value:{modalState:b,showModal:m,showCreateRecordModal:h,showCreateRelatedRecordModal:g,onCreateRecordComplete:_,onCreateRelatedRecordComplete:v},children:e({showPluginModal:b.props.show,pluginApiName:b.config.pluginApiName??``,handleShowModal:m,handleShowCreateRecordModal:h,handleShowCreateRelatedRecordModal:g,derivedModalState:b,handleCreateRecordComplete:_,handleCreateRelatedRecordComplete:v,showCreateRecordModal:c.length>0,createRecordModalObjectId:c[0]?.objectId??``,showCreateRelatedRecordModal:u.length>0,createRelatedRecordModalObjectId:u[0]?.objectId??``,createRelatedRecordModalRelatedEntityId:u[0]?.relatedEntityId??``})})},En=()=>{let e=(0,H.useContext)(wn);if(!e)throw Error(`useModals must be used within a ModalsWrapper`);return e},Dn=(0,H.createContext)(null),On=({children:e,monitoringExceptionHelper:t})=>{let n=(0,H.useCallback)((e,n)=>{t(e,{extra:n})},[t]);return(0,X.jsx)(Dn.Provider,{value:{sendException:n},children:e})},kn=()=>{let e=(0,H.useContext)(Dn);if(!e)throw Error(`useMonitoring must be used within an MonitoringWrapper`);return e},An=(0,H.createContext)(null),jn=({children:e,onNavigate:t})=>{let n=(0,H.useCallback)(e=>{t(e,{replace:!1})},[t]),r=(0,H.useCallback)(e=>{t(e,{replace:!0})},[t]);return(0,X.jsx)(An.Provider,{value:{push:n,replace:r},children:e})},Mn=()=>{let e=(0,H.useContext)(An);if(!e)throw Error(`useHistory must be used within an HistoryWrapper`);return e},Nn=(0,H.createContext)(null),Pn=({children:e,performRequest:t,createFileId:n,performFileUpload:r,getPendingCacheCount:i,invalidateCache:a})=>(0,X.jsx)(Nn.Provider,{value:{performRequest:t,createFileId:n,performFileUpload:r,getPendingCacheCount:i,invalidateCache:a},children:e}),Fn=()=>{let e=(0,H.useContext)(Nn);if(!e)throw Error(`useNetwork must be used within a NetworkWrapper`);return e},In=e=>e,Ln=(0,H.createContext)({t:In}),Rn=e=>{let{children:t,t:n=In}=e;return(0,X.jsx)(Ln.Provider,{value:{t:n},children:t})},Z=()=>(0,H.useContext)(Ln),zn=(e,t)=>{if(!Array.isArray(e))throw Error(`Return value must be an array`);t.required.forEach(t=>{e.forEach((e,n)=>{if(!(t.key in e))throw Error(`Missing required field: ${t.key} in result row ${String(n)}`);let r=typeof e[t.key];if(r!==t.type)throw Error(`Invalid type for field: ${t.key} in result row ${String(n)}. Expected ${t.type}, got ${r}`)})}),t.optional.forEach(t=>{e.forEach((e,n)=>{if(t.key in e){let r=typeof e[t.key];if(r!==t.type)throw Error(`Invalid type for field: ${t.key} in result row ${String(n)}. Expected ${t.type}, got ${r}`)}})})},Bn=({onError:e,showToast:t,clearToasts:n})=>{let{t:r}=Z(),[i,a]=(0,H.useState)(!1),[o,s]=(0,H.useState)(void 0),{terminators:c}=mn(),{sessionData:l,setSessionData:u}=_n(),{installedPluginAPINamesToIds:d,userConfigsByApiName:f,user:p,teamMember:m,business:h,clientObject:g,appPath:_}=bn(),{getRunnerState:v,getRunnerStateUpdater:y}=Cn(),{showModal:b,showCreateRecordModal:x}=En(),{sendException:S}=kn(),C=Mn(),{performRequest:w,createFileId:T,performFileUpload:E,getPendingCacheCount:D,invalidateCache:O}=Fn(),k=(0,H.useCallback)(t=>n=>{e?.(n);let r=n?.message??`Unknown plugin error`;S(Error(r),{error:n,workerName:`calendarSource`,pluginApiName:t?.plugin_api_name??``})},[e,S]);return[(0,H.useCallback)(async(i,o,v,S)=>{let A=``,j=ne(o);s(j);try{let e=d[o.plugin_api_name];A=JSON.stringify({...v,pluginId:e,__kizen_user_config:f[o.plugin_api_name]})}catch{k(o)({message:r(`Arguments passed to the script are invalid`)})}let M=!1,N=await z({user:p,teamMember:m,business:h,onError:k(o),setLoadingState:a,scriptBody:i,clientObject:g,onStateChange:e=>{y(j)(t=>({...t,...e}))},workerName:`calendarSource`,args:A,pushHistory:C.push,onShowToast:t,onClearToasts:n,terminators:c,plugin:o,sessionData:l,setSessionData:u,onShowModal:b,onShowCreateRecordModal:x,onShowCreateRelatedRecordModal:()=>{},onNetworkError:e=>{e?.status===503&&(M=!0)},appPath:_,onNetworkRequest:w,createFileId:T,performFileUpload:E,getPendingCacheCount:D,invalidateCache:O});try{S&&zn(N,S)}catch(t){e?.(t)}return{result:N,authError:M}},[p,m,d,h,g,C,t,n,c,l,u,b,x,k,y,f,e,w,T,_,E,D,O,r]),{...v(o),pending:i}]},Vn=(0,H.createContext)(null),Hn=({children:e,showToast:t,clearToasts:n})=>(0,X.jsx)(Vn.Provider,{value:{showToast:t,clearToasts:n},children:e}),Q=()=>{let e=(0,H.useContext)(Vn);if(!e)throw Error(`useToast must be used within a ToastWrapper`);return e},Un=async(e,t,n,r)=>{let{result:i,authError:a}=await n(e,t,r,{required:[{key:`id`,type:`string`},{key:`name`,type:`string`}],optional:[{key:`description`,type:`string`}]});return Array.isArray(i)?{result:i,authError:a}:(console.warn(`Expected calendar source script to return an array, but got:`,i),{result:[],authError:a})},Wn=async(e,t,n,r)=>{let{result:i,authError:a}=await n(e,t,r,{required:[{key:`id`,type:`string`},{key:`calendar_id`,type:`string`},{key:`title`,type:`string`},{key:`start_time`,type:`number`},{key:`end_time`,type:`number`}],optional:[{key:`description`,type:`string`},{key:`url`,type:`string`},{key:`activity_id`,type:`string`},{key:`all_day`,type:`boolean`},{key:`busy`,type:`boolean`}]});return Array.isArray(i)?{result:i,authError:a}:(console.warn(`Expected calendar event script to return an array, but got:`,i),{result:[],authError:a})},Gn=(e,t,n={})=>{let{showToast:r,clearToasts:i}=Q(),{t:a}=Z(),[o]=Bn({onError:e=>{r({message:`${a(`Error fetching calendar options.`)} ${e?.message??``}`,variant:`failure`})},showToast:r,clearToasts:i}),s=U({queries:t.map(t=>({queryKey:B.CALENDAR_SOURCE_CALENDAR_LIST(t.plugin_api_name,t.api_name),queryFn:async()=>{let e=n[t.plugin_api_name]?.business_config??{},{result:r,authError:i}=await Un(t.calendars_script,t,o,e);return{source:t,calendars:r,authError:i}},enabled:e&&!!t.calendars_script}))}),c=s.some(e=>e.isLoading);return{calendars:(0,H.useMemo)(()=>c||!e?{}:s.reduce((e,t)=>{if(!t.data?.source.plugin_api_name||typeof t.data.source.plugin_api_name!=`string`)return e;let n=t.data.source.plugin_api_name;return e[n]??=[],e[n].push(...t.data.calendars.map(e=>({calendar:e,source:t.data.source}))),e},{}),[s,c,e]),errorServices:(0,H.useMemo)(()=>s.filter(e=>e.data?.authError).map(e=>e.data?.source.plugin_api_name),[s]),isLoading:c}},Kn=`yyyy-MM-dd'T'HH:mm:ssXXX`,qn=e=>{if(!/^\d{4}-\d{2}-\d{2}$/.test(e))throw Error(`Invalid date string: ${e}. Expected format: YYYY-MM-DD`);let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r)},Jn=(e,t)=>un(e,t,Kn),Yn=(e,t,n={})=>{let r=Intl.DateTimeFormat().resolvedOptions().timeZone,i=Jn(Oe(qn(t.rangeStart)),r),a=Jn(ut(qn(t.rangeEnd)),r),{showToast:o,clearToasts:s}=Q(),{t:c}=Z(),[l]=Bn({onError:e=>{o({message:`${c(`Error fetching calendar events.`)} ${e?.message??``}`,variant:`failure`})},showToast:o,clearToasts:s}),u=U({queries:e.map(({calendar:e,source:r})=>({queryKey:B.CALENDAR_SOURCE_EVENTS(r.plugin_api_name,r.api_name,e.id,t),queryFn:async()=>{let t=n[r.plugin_api_name]?.business_config??{},{result:o,authError:s}=await Wn(r.events_script,r,l,{...t,calendar:{calendar_id:e.id,range_start:i,range_end:a}});return{calendarId:e.id,events:o,authError:s}}}))}),d=u.some(e=>e.isLoading),f=(0,H.useMemo)(()=>e.reduce((e,{calendar:t,source:n})=>(e[t.id]={source:n,calendar:t},e),{}),[e]);return{events:(0,H.useMemo)(()=>d?{}:u.reduce((e,t)=>(t.data?.calendarId&&(e[t.data.calendarId]=t.data.events),e),{}),[u,d]),sources:f,isLoading:d}},Xn=({onError:e,scriptUIRef:t,plugin:n,onChangeMinimized:r})=>{let{terminators:i}=mn(),{sessionData:a,setSessionData:o}=_n(),{installedPluginAPINamesToIds:s,userConfigsByApiName:c,user:l,teamMember:u,business:d,clientObject:f,appPath:p}=bn(),{showModal:m,showCreateRecordModal:h,showCreateRelatedRecordModal:g}=En(),{sendException:_}=kn(),{showToast:v,clearToasts:y}=Q(),b=Mn(),{performRequest:x,createFileId:S,performFileUpload:C,getPendingCacheCount:w,invalidateCache:T}=Fn(),{t:E}=Z(),[D,O]=(0,H.useState)(!1),[k,A]=(0,H.useState)({indicator:`none`,hidden:!0,triggerHidden:!1,hideHeader:!1}),j=(0,H.useRef)(!1),[M,N]=(0,H.useState)(!1);D&&!j.current&&(j.current=!0),!D&&j.current&&!M&&N(!0);let P=(0,H.useCallback)(t=>{e?.(t);let r=t?.message??`Unknown plugin error`;_(Error(r),{error:t,workerName:`floatingFrame`,pluginApiName:n.plugin_api_name})},[e,n,_]);return[(0,H.useCallback)((e,_)=>{let D=``;try{let e=s[n.plugin_api_name];D=JSON.stringify({..._,pluginId:e,__kizen_user_config:c[n.plugin_api_name]})}catch{P({message:E(`Arguments passed to the script are invalid`)})}return z({user:l,teamMember:u,business:d,onError:P,setLoadingState:(...e)=>{(0,dn.flushSync)(()=>{O(...e)})},scriptBody:e,clientObject:f,scriptUIRef:t,onStateChange:e=>{let{minimized:t,...n}=e;typeof t==`boolean`&&r?.(t),A(e=>({...e,...n}))},workerName:`floatingFramePlugin`,args:D,pushHistory:b.push,plugin:n,onShowToast:v,onClearToasts:y,terminators:i,sessionData:a,setSessionData:o,onShowModal:m,onShowCreateRecordModal:h,onShowCreateRelatedRecordModal:g,appPath:p,onNetworkRequest:x,createFileId:S,performFileUpload:C,getPendingCacheCount:w,invalidateCache:T})},[l,u,d,s,f,t,b,n,r,v,y,i,a,o,P,A,c,m,h,g,x,p,S,C,w,T,E]),{...k,pending:M?!1:D}]},Zn=({onError:e,scriptUIRef:t,plugin:n})=>{let{terminators:r}=mn(),{sessionData:i,setSessionData:a}=_n(),{installedPluginAPINamesToIds:o,userConfigsByApiName:s,user:c,teamMember:l,business:u,clientObject:d,appPath:f}=bn(),{getRunnerState:p,getRunnerStateUpdater:m}=Cn(),{showModal:h,showCreateRecordModal:g}=En(),{sendException:_}=kn(),{showToast:v,clearToasts:y}=Q(),b=Mn(),{performRequest:x,createFileId:S,performFileUpload:C,getPendingCacheCount:w,invalidateCache:T}=Fn(),{t:E}=Z(),[D,O]=(0,H.useState)(!1),[k,A]=(0,H.useState)(void 0),j=(0,H.useCallback)((t,r)=>{e?.(t);let i=t?.message??`Unknown plugin error`;_(Error(i),{error:t,workerName:`genericPlugin`,pluginApiName:n?.plugin_api_name??r?.plugin_api_name??``})},[e,n,_]);return[(0,H.useCallback)((e,p,_)=>{let D=``,k=ne(_);A(k);try{let e=o[n?.plugin_api_name??_?.plugin_api_name??``];D=JSON.stringify({...p,pluginId:e,__kizen_user_config:s[n?.plugin_api_name??_?.plugin_api_name??``]})}catch{j({message:E(`Arguments passed to the script are invalid`)})}return z({user:c,teamMember:l,business:u,onError:j,setLoadingState:O,scriptBody:e,clientObject:d,scriptUIRef:t,onStateChange:e=>{m(k)(t=>({...t,...e}))},workerName:`genericPlugin`,args:D,pushHistory:b.push,onShowToast:v,onClearToasts:y,terminators:r,plugin:n,executionPlugin:_,sessionData:i,setSessionData:a,onShowModal:h,onShowCreateRecordModal:g,onShowCreateRelatedRecordModal:()=>{},appPath:f,onNetworkRequest:x,createFileId:S,performFileUpload:C,getPendingCacheCount:w,invalidateCache:T})},[c,l,o,u,d,t,b,v,y,r,n,i,a,j,m,s,h,g,x,f,S,C,w,T,E]),{...p(k),pending:D}]},Qn=({entityId:e,objectId:t,onError:n,scriptUIRef:r,onReleaseBlockingScript:i})=>{let{terminators:a}=mn(),{sessionData:o,setSessionData:s}=_n(),{installedPluginAPINamesToIds:c,userConfigsByApiName:l,user:u,teamMember:d,business:f,clientObject:p,appPath:m}=bn(),{getRunnerState:h,getRunnerStateUpdater:g}=Cn(),{showModal:_,showCreateRecordModal:v,showCreateRelatedRecordModal:y}=En(),{sendException:b}=kn(),{showToast:x,clearToasts:S}=Q(),C=Mn(),{performRequest:w,createFileId:T,performFileUpload:E,getPendingCacheCount:D,invalidateCache:O}=Fn(),{t:k}=Z(),[A,j]=(0,H.useState)(!1),[M,N]=(0,H.useState)(void 0),P=(0,H.useCallback)((r,i)=>{n?.(r);let a=r?.message??`Unknown plugin error`;b(Error(a),{error:r,workerName:`recordDetail`,pluginApiName:i?.plugin_api_name??``,objectId:t,entityId:e})},[n,t,e,b]);return[(0,H.useCallback)((n,h,b,A)=>{let M=``;try{let e=c[b?.plugin_api_name??``];M=JSON.stringify({...h,pluginId:e,__kizen_user_config:l[b?.plugin_api_name??``]})}catch{P({message:k(`Arguments passed to the script are invalid`)},b)}let F=ne(b);return N(F),z({user:u,teamMember:d,business:f,onReleaseBlockingScript:i,onError:e=>{P(e,b)},setLoadingState:j,scriptBody:n,clientObject:p,scriptUIRef:r,onStateChange:e=>{g(F)(t=>({...t,...e}))},workerName:`recordDetail`,args:M,context:A??{entityId:e,objectId:t},pushHistory:C.push,onShowToast:x,onClearToasts:S,terminators:a,executionPlugin:b,sessionData:o,setSessionData:s,onShowModal:_,onShowCreateRecordModal:v,onShowCreateRelatedRecordModal:y,appPath:m,onNetworkRequest:w,createFileId:T,performFileUpload:E,getPendingCacheCount:D,invalidateCache:O})},[u,d,c,f,e,t,p,r,C,x,S,a,o,s,_,v,y,i,P,g,l,w,m,T,E,D,O,k]),{...h(M),pending:A}]},$n=(e,t)=>{let{showToast:n}=Q(),{t:r}=Z(),i=(0,H.useRef)(null),a=(0,H.useRef)(null),o=e?.css,s=(0,H.useMemo)(()=>{let t=e?.html;return t?P.sanitize(t):null},[e]),c=(0,H.useMemo)(()=>e?.event_scripts??{},[e]),[l,{pending:u}]=Zn({onError:e=>{n({message:`${r(`Script could not be executed:`)} ${e?.message??`Unknown Error`}`,variant:`failure`})},scriptUIRef:i,plugin:e}),d=(0,H.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),!u){let n=e.target.getAttribute(`data-script`);n&&c[n]&&l(c[n],t)}},[u,l,c,t]);return(0,H.useEffect)(()=>{let e=a.current;return e&&e.addEventListener(`click`,d),()=>{e&&e.removeEventListener(`click`,d)}},[d,e]),{scopedCss:`
|
|
2
|
+
@scope {
|
|
3
|
+
${o??``}
|
|
4
|
+
}
|
|
5
|
+
`,sanitizedHtml:s,outputUIRef:i,interactableScriptRef:a}},er=(e,t,n,r,i={})=>{let a=(0,H.useMemo)(()=>t?.event_scripts??{},[t]),o=(0,H.useCallback)(t=>{if(t.preventDefault(),t.stopPropagation(),!r){let n=t.target.getAttribute(`data-script`);n&&a[n]&&e(a[n],{...i})}},[r,e,a,i]);(0,H.useEffect)(()=>{let e=n?.current;return e&&e.addEventListener(`click`,o),()=>{e&&e.removeEventListener(`click`,o)}},[o,t,n])},tr=(e,t,n)=>{let r=e?.iframe_url,i=e?.script,a=e?.callback,o=e?.args,{showToast:s}=Q(),{t:c}=Z(),l=(0,H.useRef)(null),[u,{pending:d}]=Zn({onError:e=>{s({message:`${c(`Plugin error:`)} ${e?.message??``}`,variant:`failure`})},scriptUIRef:l,plugin:e}),f=(0,H.useMemo)(()=>{let e=new URLSearchParams(t);return{...Object.fromEntries(e),...o}},[t,o]),{outputUIRef:p,scopedCss:m,sanitizedHtml:h,interactableScriptRef:g}=$n(e,f);er(u,e,l,d);let _=(0,H.useRef)(!1);(0,H.useEffect)(()=>{!r&&!_.current&&i&&!n&&(_.current=!0,u(i,f))},[r,u,i,f,n]);let v=(0,H.useCallback)(e=>{let t=e.data;if(t?.type===`kizen:plugin_callback`){let e=t.query;a&&u(a,e)}},[u,a]);return(0,H.useEffect)(()=>(window.addEventListener(`message`,v),()=>{window.removeEventListener(`message`,v)}),[v]),{scriptUIRef:l,outputUIRef:p,scopedCss:m,sanitizedHtml:h,interactableScriptRef:g,iframeURL:r,pending:d}},nr=(0,H.createContext)(null),rr=({children:e})=>{let[t,n]=(0,H.useState)([]),[r,i]=(0,H.useState)(!1),a=(0,H.useCallback)((e,t)=>{n(n=>{let r=[e,...n.filter(t=>t!==e)];return t?.(r),r})},[]),o=(0,H.useMemo)(()=>[...t].reverse().reduce((e,t,n)=>({...e,[t]:n}),{}),[t]);return(0,H.useEffect)(()=>{let e=new MutationObserver(()=>{document.querySelector(`div[role="dialog"]`)?i(!0):i(!1)});return e.observe(document.body,{childList:!0}),()=>{e.disconnect()}},[]),(0,X.jsx)(nr.Provider,{value:{touchFloatingFrame:a,floatingFrameOffset:o},children:e(r)})},ir=()=>{let e=(0,H.useContext)(nr);if(!e)throw Error(`useFloatingFrame must be used within a FloatingFrameWrapper`);return e},ar=[`^/$`,`^/login*`,`/settings/mine$`,`/settings/others$`,`/create-new-business$`,`^/choose-business*`,`^/inactive-business$`,`^/reset$`,`/welcome$`,`/embed/*`,`/create-new-business$`,`/businessbuilder`],or=[`https://js.stripe.com`],sr=(e,t,n,r)=>e<n?t<r?`top-left`:`top-right`:t<r?`bottom-left`:`bottom-right`,cr=e=>{let{currentWindow:t,pathname:n,id:r,frameHeaderSize:i,defaultPositionGap:a=0,viewportHeight:o=window.innerHeight,hiddenByModal:s,updateEmployeeConfig:c}=e,l=(0,H.useRef)(null),u=(0,H.useRef)(!1),{showToast:d}=Q(),{t:f}=Z(),{installedPluginAPINamesToIds:p,clientObject:m}=bn(),{touchFloatingFrame:h,floatingFrameOffset:g}=ir(),_=g[r]??-1,v=t.minimized_style===`none`,y=t.minimized_style===`circle`||v,b=t.default_position===`bottom-right-fixed`,x=t.default_position===`bottom-left-fixed`,S=b||x,C=t.minimized_config?.icon??`action-drag-handle`,w=t.minimized_config?.color??`blue`,T=(0,H.useMemo)(()=>{let e=n.split(`/`),t=e[1],r=e[2];if(t===`client`)return{objectId:m?.id,entityId:r};if(t===`custom-objects`)return{objectId:r,entityId:e[3]}},[m,n]),E=(0,H.useMemo)(()=>{let e=t.match,r=t.ignore;return!!(e?.length&&!e.some(e=>new RegExp(e).test(n))||ar.concat(r??[]).filter(Boolean).some(e=>{try{return new RegExp(e).test(n)}catch{return!1}}))},[t,n]),D=t.plugin_api_name?p[t.plugin_api_name]:``,[O,k]=(0,H.useState)(()=>t.employee_config?.[r]?.minimized??!1),A=t.script,j=t.type,M=t.args,N=t.message_handler,P=t.width??0,[F,I]=(0,H.useState)(()=>{let e=window.innerHeight;return Math.min(t.height??0,e-i)}),[L,R]=(0,H.useState)(null),ee=t.default_position,te=(0,H.useCallback)(e=>{let n=t.employee_config?.[r]?.position;if(!n?.quadrant){let t=window.innerWidth-P,r=window.innerHeight-F-i;if(O&&!e&&(r=window.innerHeight-i),n)try{let e=n;return e.left>t&&(e.left=t),e.top>r&&(e.top=r),e.left<0&&(e.left=a),e.top<0&&(e.top=a),e}catch{}let o=t;return ee===`bottom-left`&&(o=a),{left:o,top:r-a}}else if(n.quadrant===`top-left`){let e=n.deltas?.left??0,t=n.deltas?.top??0;return{...n,left:e,top:t}}else if(n.quadrant===`top-right`){let e=window.innerWidth-P-(n.deltas?.right??0),t=n.deltas?.top??0;return{...n,left:e,top:t}}else if(n.quadrant===`bottom-left`){let e=n.deltas?.left??0,t=window.innerHeight-(O?0:F)-(n.deltas?.bottom??0)-i;return{...n,left:e,top:t}}else{let e=window.innerWidth-P-(n.deltas?.right??0),t=window.innerHeight-(O?0:F)-(n.deltas?.bottom??0)-i;return{...n,left:e,top:t}}},[t,r,ee,O,P,F,i,a]),z=(0,H.useCallback)(e=>{let t=te(e),n=[`bottom-right`,`bottom-left`].includes(t.quadrant??``)&&O?0:F;return t.left<0?t.left=0:t.left>window.innerWidth-P&&(t.left=window.innerWidth-P),t.top<0?t.top=0:t.top>window.innerHeight-n&&(t.top=window.innerHeight-n),t},[te,P,F,O]);(0,H.useEffect)(()=>{let e=t.height??0;if(e>o){I(o-i);let e=te(!0);e.top=0,R(e)}else I(e)},[t.height,te,o,i]);let[B,ne]=(0,H.useState)(O),[re,ie]=(0,H.useState)(O&&y),ae=F*5e-4*1e3,V=e=>{k(e),e&&y?setTimeout(()=>{ie(e)},ae):y&&ie(e),s?setTimeout(()=>{ne(e)},ae):ne(e),(L?.quadrant===`bottom-left`||L?.quadrant===`bottom-right`)&&R(e?e=>e?{...e,top:e.top+F}:null:e=>{if(!e)return null;let t=window.innerHeight,n=e.top>=0&&e.top+F<=t;return{...e,top:n?e.top:e.top-F}}),c?.(r,O,L)({minimized:e})},[U,{pending:se,hidden:ce,indicator:le,triggerHidden:ue,hideHeader:de}]=Xn({onError:e=>{d({message:`${f(`Plugin error:`)} ${e?.message??``}`,variant:`failure`})},scriptUIRef:l,plugin:t,onChangeMinimized:e=>{V(e)}}),fe=(0,H.useMemo)(()=>de&&S,[de,S]),pe=(0,H.useMemo)(()=>{if(!L)return`top`;let{left:e,top:t}=L;return window.innerWidth-(e+P)<40?`left`:t<40?`bottom`:`top`},[L,P]),me=(0,H.useCallback)(()=>{let e=x?`left`:`right`,n=`${t.plugin_api_name}-${t.api_name}-trigger-${e}`;return document.getElementById(n)},[x,t]),W=(0,H.useCallback)(()=>{if(!S)return;let e=me();if(!e)return;let t=e.getBoundingClientRect(),n=O?0:F,r=fe?0:i,o=t.top-(n+r)-a,s=x?t.left:t.right-P,c=n+r,l=Math.max(0,window.innerWidth-P),u=Math.max(0,window.innerHeight-c);s=Math.min(Math.max(0,s),l),o=Math.min(Math.max(0,o),u),R({left:s,top:o,quadrant:x?`bottom-left`:`bottom-right`,deltas:{top:o,left:s,right:window.innerWidth-(s+P),bottom:window.innerHeight-(o+c)}})},[S,x,F,O,P,fe,me,i,a]);(0,H.useEffect)(()=>{S&&W()},[S,F,O,W]),(0,H.useEffect)(()=>{if(!S)return;W();let e=new ResizeObserver(()=>{W()});return e.observe(document.body),()=>{e.disconnect()}},[S,W]),(0,H.useEffect)(()=>{!u.current&&A&&j===`script`&&!E&&(u.current=!0,U(A,{...M}))},[U,A,j,M,E]),(0,H.useEffect)(()=>{let e=e=>{let n=e;if(n?.detail?.recipient?.frame===t.api_name){let e=n.detail;if(e.recipient?.plugin!==t.plugin_api_name)return;e.recipient.script&&t.event_scripts?.[e.recipient.script]&&U(t.event_scripts[e.recipient.script]??``,{...e.args,...M,...T})}};return window.addEventListener(oe,e),()=>{window.removeEventListener(oe,e)}},[t,U,M,T]);let[he,ge]=(0,H.useState)(!1),_e=(e,t)=>{ge(!1),h(r);let n=window.innerWidth,i=window.innerHeight;if(t.node){let e=t.node.getBoundingClientRect(),a=e.left,o=e.top,s=o+e.height,l=a+e.width,u=o,d=i-s,f=a,p=n-l,m={left:a,right:l,top:o,quadrant:sr(u,f,d,p),deltas:{top:u,bottom:d,left:f,right:p}};R(m),c?.(r,O,L)({position:m})}};(0,H.useEffect)(()=>{let e=()=>{S?W():R(z(!1))};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[S,W,z]),er(U,t,l,se,M),(0,H.useEffect)(()=>{let e=e=>{e.source!==window&&N&&!or.includes(e.origin)&&U(N,{...M,eventData:e.data})};return window.addEventListener(`message`,e),()=>{window.removeEventListener(`message`,e)}},[U,M,N]);let{outputUIRef:ve,scopedCss:ye,sanitizedHtml:be,interactableScriptRef:xe}=$n(t,{}),Se=B?ce||E||s:ce||E,Ce=`floating-window-parent--${r}`,we=`floating-drag-handle--${r}`,Te=`floating-window-content--${r}`,G=t.employee_config?.[r]?.position?.quadrant?.split(`-`)[1]===`right`?`right`:`left`;x?G=`left`:b&&(G=`right`);let K=t.minimized_config?.customIcon,Ee=null;return K?.startsWith(`data:image/`)&&(Ee=({className:e=``})=>(0,X.jsx)(`img`,{src:K,alt:t.title||`Open Frame`,className:`object-cover select-none pointer-events-none ${e}`})),L||R(z(!1)),{circleProps:{id:r,side:G,circleIcon:C,CustomIcon:Ee,circleColor:w,onClick:()=>{V(!O)},hidden:!!(Se||E||v||ue)},parentProps:{className:Ce,dragging:he,hidden:Se||re||E||v},draggableProps:{onStop:_e,onStart:()=>{ge(!0)},bounds:`.${Ce}`,handle:`.${we}`,defaultPosition:{x:L?.left??0,y:L?.top??0},position:{x:L?.left??0,y:L?.top??0},disabled:S},floatProps:{pending:se,width:P,dragging:he,height:F,isCircle:y&&O},contentProps:{className:Te,dragging:he,solid:!0},minimized:O,pending:se,indicator:le,hideHeader:fe,isFixed:S,isCircle:y,outputUIRef:ve,scopedCss:ye,sanitizedHtml:be,interactableScriptRef:xe,tooltipPosition:pe,currentPluginId:D,setMinimized:V,dragHandleClassName:we,height:F,script:A,dragging:he,frameOffset:_,scriptUIRef:l}},lr=()=>{(0,H.useEffect)(()=>{let e=null,t=t=>{if(!t.detail?.location)return;let n=te(t.detail.location);n!==e&&(e=n,document.querySelectorAll(`iframe[id^=${k}-]`).forEach(e=>{let n=null;try{n=new URL(e.src,window.location.href).origin}catch(e){ee(`script-runner-logging`)&&console.warn(`Failed to parse iframe src for location change message target origin:`,e),n=null}n&&e.contentWindow?.postMessage({action:M,location:t.detail?.location},n)}))};return window.addEventListener(A,t),()=>{window.removeEventListener(A,t)}},[])},ur=new E,dr=({children:e})=>(0,H.useContext)(x)?(0,X.jsx)(X.Fragment,{children:e}):(0,X.jsx)(f,{client:ur,children:e}),fr=e=>{let{children:t,bootstrapPlugins:n=[],userConfigs:r=[],user:i,teamMember:a,business:o,clientObject:s,onNavigate:c,modal:l,monitoringExceptionHelper:u,showToast:d,clearToasts:f,performRequest:p,appPath:m,hideFramesOnModal:h=!0,createFileId:g,performFileUpload:_,t:v}=e;return lr(),(0,X.jsx)(dr,{children:(0,X.jsx)(yn,{bootstrapPlugins:n,userConfigs:r,user:i,teamMember:a,business:o,clientObject:s,appPath:m,children:({hasFinishedBootstrapping:e,waitingOnRouteScript:n})=>(0,X.jsx)(Rn,{t:v,children:(0,X.jsx)(Sn,{children:r=>(0,X.jsx)(jn,{onNavigate:c,children:(0,X.jsx)(Tn,{...l,children:i=>(0,X.jsx)(On,{monitoringExceptionHelper:u,children:(0,X.jsx)(gn,{children:(0,X.jsx)(pn,{children:(0,X.jsx)(Hn,{showToast:d,clearToasts:f,children:(0,X.jsx)(rr,{children:a=>(0,X.jsx)(Pn,{performRequest:p,createFileId:g,performFileUpload:_,children:t({...i,showLoadingIndicator:r,hasFinishedBootstrapping:e,waitingOnRouteScript:n,hiddenByModal:h?a:!1})})})})})})})})})})})})})},pr=(0,H.createContext)(null),mr=pr.Provider,hr=(e,t)=>{if(e===`custom_object`)return t?.id},gr=(e,t)=>{if(e.type===`custom_object`)return e.allow_multiple?(t?.value??[]).length>0:!!t?.value?.id;if(e.type===`field`)return e.allow_multiple?(t?.value??[]).length>0:!!t?.value?.value;if(e.type===`text`)return!!(t?.value??``).trim();if(e.type===`number`){let e=Number(t?.value);return!!t?.value&&!isNaN(e)}else if(e.type===`select`)return e.allow_multiple?(t?.value??[]).length>0:!!t?.value?.value;else if(e.type===`boolean`)return!!t?.value;return!1},_r=e=>{let t=(e.fields??[]).filter(e=>e.type===`custom_object`),n=(e.fields??[]).filter(e=>e.type===`container`).flatMap(e=>_r(e)),r=e.actions?.filter(e=>e.hint_object_name)??[];return[...t,...n,...r.map(e=>({...I(e),match_hint:e.hint_object_name??``}))]},vr=e=>{let t=(e.fields??[]).filter(e=>e.type===`field`),n=(e.fields??[]).filter(e=>e.type===`container`).flatMap(e=>vr(e));return[...t,...n]},yr=({children:e,config:t,value:n,onStateChange:r,disabledKeys:i,templateAssociationsByActionApiName:a,getObjectByAPIName:o,getCustomObjectDetails:s})=>{let[c,l]=(0,H.useState)(n??{}),u=(0,H.useMemo)(()=>F(t),[t]),d=(0,H.useMemo)(()=>u.reduce((e,t)=>({...e,[t.key]:{type:t.type,value:t.default}}),{}),[u]),f=(0,H.useMemo)(()=>{let e={...Object.entries(a??{}).reduce((e,[t,n])=>{let r=`action__${t}`,i=n.map(e=>({id:e.custom_object.id??``,objectName:e.custom_object.object_name??`Unknown Object`}));return i.length>0&&n.length>0&&n[0]&&(e[r]={type:`custom_object`,value:i,config:I(n[0].browser_js_action_template)}),e},{}),...c};return i?.forEach(t=>{e[t]&&(e[t]=void 0)}),e},[c,a,i]),p=(0,H.useRef)(!!n),m=(0,H.useRef)({}),[h,g]=(0,H.useState)(!n),[_,v]=(0,H.useState)({}),[y,b]=(0,H.useState)({}),[x,S]=(0,H.useState)(!1),C=(0,H.useRef)(null),[w,T]=(0,H.useState)({}),[E,D]=(0,H.useState)(!1),[O,k]=(0,H.useState)(!0),A=(0,H.useRef)({}),j=(0,H.useCallback)((e,t)=>{A.current[e]=t},[]),M=(0,H.useCallback)(e=>{typeof e==`function`?l(t=>{let n=e(t);return m.current=n,r?.(n),n}):(m.current=e,l(e),r?.(e)),T({})},[r]),N=(0,H.useCallback)((e,t)=>{if(e.startsWith(`{{`)&&e.endsWith(`}}`)){let n=e.slice(2,-2).trim();return hr(t[n]?.type,t[n]?.value)}return e},[]),P=(0,H.useCallback)(e=>N(e,f),[f,N]),{clientObject:L}=bn(),ee=(0,H.useCallback)(async e=>e===`client_client`&&L?[{id:L.id,object_name:L.objectName}]:await o(e),[L,o]),te=(0,H.useCallback)(async()=>{let e=_r(t);for(let t of e){if(!t.match_hint)continue;let e=await ee(t.match_hint);if(e?.[0]){let n={id:e[0].id,objectName:e[0].object_name};M(e=>({...e,[t.key]:{type:`custom_object`,value:t.allow_multiple?[n]:n}}))}}},[t,M,ee]),z=(0,H.useCallback)(()=>vr(t),[t]),B=(0,H.useCallback)(async(e,t)=>{let n=z(),r={};for(let i of n){if(!i.object_id)continue;let n=t??N(i.object_id,m.current);if(e&&!i.object_id.includes(e))continue;if(!r[n]&&n)try{r[n]=await s(n)}catch{}let a=r[n];if(a){let e=a.fields.find(e=>e.name===i.match_hint);e&&M(t=>({...t,[i.key]:{type:`field`,value:{value:e.id,label:e.displayName},associatedObject:{id:n,name:a.objectName}}}))}}},[N,z,M,s]),ne=(0,H.useCallback)(async e=>{let n=_r(t).find(t=>t.key===e);if(n?.match_hint){let t=``,r=(await ee(n.match_hint))?.[0];r&&(t=r.id,M(t=>({...t,[e]:{type:`custom_object`,value:{id:r.id,objectName:r.object_name}}})),t&&B(void 0,t))}},[t,M,B,ee]),re=(0,H.useCallback)(async()=>{await te(),await B(),g(!1)},[te,B]),ie=(0,H.useCallback)(()=>vr(t),[t]),ae=(0,H.useCallback)(e=>B(e),[B]),V=(0,H.useCallback)(()=>{C.current&&=(clearTimeout(C.current),null),C.current=setTimeout(()=>{S(!0)},500)},[]),U=(0,H.useCallback)(async(e,t)=>{V(),v(e=>({...e,[t]:!0})),D(!0);let n=await R(e,{...d,...f});return b(e=>(e[t]===!1&&typeof n==`boolean`&&n&&(f[t]||ne(t)),{...e,[t]:n})),v(e=>({...e,[t]:!1})),n},[f,V,ne,d]);p.current||(p.current=!0,re());let oe=(0,H.useCallback)(e=>y[e]===!1,[y]),se=(0,H.useCallback)(e=>_[e]===!0,[_]),ce=(0,H.useCallback)(e=>{if(w[e])return{message:w[e],showMessage:!0,error:!0}},[w]),le=(0,H.useMemo)(()=>{let e=(t.fields??[]).filter(e=>e.type===`container`).map(e=>e.when),n=u.map(e=>e.when);return[...e,...n].filter(Boolean)},[t,u]),ue=(0,H.useMemo)(()=>u.reduce((e,t)=>(e[t.key]=t,e),{}),[u]),de=(0,H.useCallback)((e,t,n)=>{t.add(e);let r=ue[e];r?.dependencies?.length&&r.dependencies.forEach(e=>{n.has(e)||(n.add(e),de(e,t,n))})},[ue]),fe=(0,H.useMemo)(()=>u.map(e=>{let t=new Set,n=e.dependencies??[],r=new Set;return n.forEach(e=>{de(e,t,r)}),{...e,dependencies:Array.from(t)}}),[u,de]),pe=(0,H.useCallback)(e=>{fe.filter(t=>t.dependencies.length===0?!1:t.dependencies.includes(e)&&t.key!==e).forEach(e=>{A.current[e.key]?.()})},[fe]),me=(0,H.useCallback)(async()=>{let e=(await Promise.all(u.map(async e=>e.when?await R(e.when,{...d,...f})?e:null:e))).filter(Boolean),t=0;for(let n of e)n&&n.required&&!gr(n,f[n.key])?(T(e=>({...e,[n.key]:`This field is required`})),t++):n?.validation_pattern?new RegExp(n.validation_pattern).test(f[n.key]?.value??n.default??``)||(T(e=>({...e,[n.key]:`Value must match the pattern ${n.validation_pattern??``}`})),t++):n&&T(e=>({...e,[n.key]:void 0}));return{isValid:t===0,includedKeys:e.map(e=>e?.key).filter(e=>!!e)}},[f,u,d]);(0,H.useEffect)(()=>{V()},[V]);let W=Object.values(_).filter(Boolean).length;return!E&&le.length===0&&D(!0),E&&O&&W===0&&k(!1),(0,X.jsx)(mr,{value:{state:f,setState:M,interpolateValue:P,getNestedFields:ie,reInferFieldsForObject:ae,inferencePending:h,evaluateExpression:U,shouldHideField:oe,shouldDisableField:se,expressionsIdle:x,getFieldErrorState:ce,validateForm:me,waitingExpressionCount:W,initialExpressionsPending:O,flattenedFields:u,flattenedFieldsByKey:ue,afterFieldChange:pe,registerFieldResetter:j,disabledKeys:i??[]},children:e})},br=()=>{let e=(0,H.useContext)(pr);if(!e)throw Error(`useSetupAssistant must be used within a SetupAssistantController`);return e};function xr(e,t=!1){let n=br(),{evaluateExpression:r,shouldHideField:i,getFieldErrorState:a,disabledKeys:o}=n;(0,H.useEffect)(()=>{e.when&&r(e.when,e.key)},[e.when,e.key,r]);let s=i(e.key),c=o.includes(e.key)||t,l=a(e.key);return{...n,shouldHide:s,isDisabled:c,errorState:l}}var Sr=({field:e,disabled:t=!1})=>{let{state:n,setState:r,afterFieldChange:i,registerFieldResetter:a,isDisabled:o,shouldHide:s,errorState:c}=xr(e,t),l=n[e.key]?.value??e.default??!1,u=l===!0||l===`true`,d=(0,H.useCallback)(t=>{r(n=>({...n,[e.key]:{type:`boolean`,value:t}})),i(e.key)},[e.key,r,i]);return(0,H.useEffect)(()=>{a(e.key,()=>{d(void 0)})},[e.key,a,d]),s?null:(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,X.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>{d(e.target.checked)},disabled:o,className:`h-3.5 w-3.5 cursor-pointer accent-blue-600`}),(0,X.jsxs)(`span`,{className:`text-[13px] ${o?`text-neutral-400`:`text-neutral-700`}`,children:[e.label,e.required&&(0,X.jsx)(`span`,{className:`text-red-500 ml-0.5`,children:`*`})]}),e.tooltip&&(0,X.jsx)(`span`,{className:`text-[11px] text-neutral-400`,title:e.tooltip,children:`?`})]}),c?.showMessage&&c.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:c.message})]})},Cr=({field:e,pluginApiName:t,disabled:n=!1})=>{let{shouldHide:r}=xr(e,n),i=e.columns??1;return r?null:(0,X.jsxs)(`div`,{children:[e.label&&(0,X.jsx)(`h3`,{className:`text-[14px] font-semibold text-neutral-800 mb-3 mt-4`,children:e.label}),(0,X.jsx)(`div`,{className:`gap-4`,style:{display:`grid`,gridTemplateColumns:`repeat(${String(i)}, 1fr)`},children:e.fields?.map(e=>(0,X.jsx)(Er,{field:e,pluginApiName:t,disabled:n},e.key))})]})},$=({field:e})=>e.label?(0,X.jsxs)(`label`,{className:`text-[12px] font-medium text-neutral-600`,children:[e.label,e.required&&(0,X.jsx)(`span`,{className:`text-red-500 ml-0.5`,children:`*`}),e.tooltip&&(0,X.jsx)(`span`,{className:`ml-1 text-neutral-400 cursor-help`,title:e.tooltip,children:`?`})]}):null,wr=({label:e,value:t,onChange:n,onSelect:a,options:o,loading:s,placeholder:c,disabled:l,keepOpenOnSelect:u})=>{let[d,f]=(0,H.useState)(!1),p=(0,H.useRef)(null);return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e&&(0,X.jsx)(`label`,{className:`text-[11px] font-semibold uppercase tracking-widest text-neutral-500`,children:e}),(0,X.jsxs)(`div`,{ref:p,className:`relative`,children:[(0,X.jsx)(r,{icon:i,className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-[10px] text-neutral-400`}),(0,X.jsx)(`input`,{type:`text`,className:`w-full rounded border border-black/10 bg-white py-1.5 pl-7 pr-2.5 font-mono text-[12px] text-neutral-800 focus:border-neutral-400 focus:outline-none disabled:opacity-50`,value:t,placeholder:c,disabled:l,onChange:e=>{n(e.target.value)},onFocus:()=>{f(!0)},onBlur:()=>{f(!1)}})]}),(0,X.jsxs)(D,{anchorRef:p,open:d,children:[s&&(0,X.jsx)(`div`,{className:`px-3 py-2 text-[12px] text-neutral-400`,children:`Loading…`}),!s&&o.length===0&&t.length===0&&(0,X.jsx)(`div`,{className:`px-3 py-2 text-[12px] text-neutral-400`,children:`Start typing to search…`}),!s&&o.length===0&&t.length>0&&(0,X.jsx)(`div`,{className:`px-3 py-2 text-[12px] text-neutral-400`,children:`No results`}),!s&&o.map(e=>(0,X.jsx)(`div`,{className:`cursor-pointer px-3 py-2 text-[12px] text-neutral-800 hover:bg-neutral-100`,onClick:()=>{a(e.id,e.label),u||f(!1)},children:e.label},e.id))]})]})},Tr={container:Cr,custom_object:({field:e,disabled:t=!1})=>{let{state:n,setState:r,getNestedFields:i,reInferFieldsForObject:a,shouldDisableField:o,registerFieldResetter:s,afterFieldChange:c,isDisabled:l,shouldHide:u,errorState:d}=xr(e,t),f=o(e.key)||l,[p,m]=(0,H.useState)(``),[h,g]=(0,H.useState)([]),[_,v]=(0,H.useState)(!1),y=(0,H.useRef)(null),b=O(),x=T(),S=(0,H.useCallback)(async e=>{v(!0);try{let t=new URLSearchParams({page_size:`20`});e&&t.set(`search`,e);let n=await(await b(`/custom-objects?${t.toString()}`)).json(),r=(Array.isArray(n)?n:n.results??[]).map(e=>({id:e.id,label:e.object_name})),i=x?.business.client_object;i?.access&&(!e||i.object_name.toLowerCase().includes(e.toLowerCase()))&&r.unshift({id:i.id,label:i.object_name}),g(r)}catch{g([])}finally{v(!1)}},[b,x]),C=e.allow_multiple?n[e.key]?.value??[]:[],w=(0,H.useCallback)((t,i)=>{let a=n[e.key]?.value??[];a.some(e=>e.id===t)||(r(n=>({...n,[e.key]:{type:`custom_object`,value:[...a,{id:t,objectName:i}]}})),c(e.key),m(``))},[n,e.key,r,c]),E=(0,H.useCallback)(t=>{let i=n[e.key]?.value??[];r(n=>({...n,[e.key]:{type:`custom_object`,value:i.filter(e=>e.id!==t)}})),c(e.key)},[n,e.key,r,c]),D=e.allow_multiple?void 0:n[e.key]?.value,k=(0,H.useRef)(!1);(0,H.useEffect)(()=>{!e.allow_multiple&&D?.objectName&&!k.current&&(m(D.objectName),k.current=!0)},[e.allow_multiple,D]);let A=(0,H.useCallback)(t=>{m(t),D&&(r(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.key))),c(e.key)),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{S(t)},300)},[D,e.key,r,c,S]),j=(0,H.useCallback)((t,n)=>{m(n),r(r=>({...r,[e.key]:{type:`custom_object`,value:{id:t,objectName:n}}}));let o=i().filter(t=>t.object_id?.includes(e.key));for(let e of o)r(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.key)));a(e.key),c(e.key)},[e.key,r,i,a,c]),M=(0,H.useCallback)(t=>{e.allow_multiple?(m(t),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{S(t)},300)):A(t)},[e.allow_multiple,A,S]),N=(0,H.useCallback)((t,n)=>{e.allow_multiple?w(t,n):j(t,n)},[e.allow_multiple,w,j]);if((0,H.useEffect)(()=>{s(e.key,()=>{r(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.key))),m(``),k.current=!1})},[e.key,s,r]),u)return null;if(e.allow_multiple){let t=h.filter(e=>!C.some(t=>t.id===e.id));return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)($,{field:e}),C.length>0&&(0,X.jsx)(`div`,{className:`flex flex-wrap gap-1 mb-1`,children:C.map(e=>(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded bg-neutral-100 px-2 py-0.5 text-[11px] text-neutral-700`,children:[e.objectName,(0,X.jsx)(`button`,{type:`button`,onClick:()=>{E(e.id)},disabled:f,className:`text-neutral-400 hover:text-neutral-600`,"aria-label":`Remove ${e.objectName}`,children:`×`})]},e.id))}),(0,X.jsx)(wr,{value:p,onChange:M,onSelect:N,options:t,loading:_,placeholder:e.placeholder??`Search for objects...`,disabled:f,keepOpenOnSelect:!0}),d?.showMessage&&d.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:d.message})]})}return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)($,{field:e}),(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(wr,{value:p,onChange:M,onSelect:N,options:h,loading:_,placeholder:e.placeholder??`Search for an object...`,disabled:f}),D&&(0,X.jsx)(`button`,{type:`button`,onClick:()=>{r(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.key))),m(``),k.current=!1,c(e.key)},disabled:f,className:`absolute right-2 top-1/2 -translate-y-1/2 text-[11px] text-neutral-400 hover:text-neutral-600`,"aria-label":`Clear selection`,children:`×`})]}),d?.showMessage&&d.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:d.message})]})},field:({field:e,disabled:t=!1})=>{let{interpolateValue:n,state:r,setState:i,registerFieldResetter:a,afterFieldChange:o,isDisabled:s,shouldHide:c,errorState:l}=xr(e,t),u=n(e.object_id??``),[d,f]=(0,H.useState)([]),[p,m]=(0,H.useState)(``),[h,g]=(0,H.useState)(!1),[_,v]=(0,H.useState)(null),y=O();(0,H.useEffect)(()=>{!u||u===_||c||(async()=>{g(!0);try{m((await(await y(`/custom-objects/${u}`)).json()).object_name??``);let e=await(await y(`/custom-objects/${u}/fields`)).json();f((Array.isArray(e)?e:e.results??[]).map(e=>({label:e.display_name,value:e.id}))),v(u)}catch{f([])}finally{g(!1)}})()},[u,_,y,e.key,c]);let b=r[e.key]?.value,x=(0,H.useCallback)(t=>{i(n=>({...n,[e.key]:{type:`field`,value:t,associatedObject:{id:u,name:p}}})),o(e.key)},[e.key,i,u,p,o]);if((0,H.useEffect)(()=>{a(e.key,()=>{i(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.key)))})},[e.key,a,i]),c)return null;let S=!u||s;if(e.allow_multiple){let t=Array.isArray(b)?b:[];return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)($,{field:e}),(0,X.jsx)(`div`,{className:`rounded border p-2 text-[13px] ${l?.error?`border-red-300`:`border-black/10`} ${S?`bg-neutral-50`:`bg-white`}`,children:h?(0,X.jsx)(`span`,{className:`text-neutral-400 text-[12px]`,children:`Loading fields...`}):u?d.length===0?(0,X.jsx)(`span`,{className:`text-neutral-400 text-[12px]`,children:`No fields available`}):(0,X.jsx)(`div`,{className:`flex flex-col gap-1 max-h-48 overflow-y-auto`,children:d.map(e=>{let n=t.some(t=>t.value===e.value);return(0,X.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,X.jsx)(`input`,{type:`checkbox`,checked:n,disabled:S,onChange:()=>{x(n?t.filter(t=>t.value!==e.value):[...t,e])},className:`h-3 w-3 accent-blue-600`}),(0,X.jsx)(`span`,{className:`text-[12px]`,children:e.label})]},e.value)})}):(0,X.jsx)(`span`,{className:`text-neutral-400 text-[12px]`,children:`Select an object first`})}),l?.showMessage&&l.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:l.message})]})}let C=b&&!Array.isArray(b)?b.value:``;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)($,{field:e}),h?(0,X.jsx)(`div`,{className:`w-full rounded border border-black/10 px-2 py-1.5 text-[12px] text-neutral-400 bg-neutral-50`,children:`Loading fields...`}):(0,X.jsxs)(`select`,{value:C,onChange:e=>{let t=d.find(t=>t.value===e.target.value);t&&x(t)},disabled:S,className:`w-full rounded border px-2 py-1.5 text-[13px] font-mono focus:outline-none focus:ring-1 ${l?.error?`border-red-300 focus:ring-red-400`:`border-black/10 focus:ring-blue-400`} ${S?`bg-neutral-50 text-neutral-400`:`bg-white`}`,children:[(0,X.jsx)(`option`,{value:``,children:u?`Choose a field`:`Select an object first`}),d.map(e=>(0,X.jsx)(`option`,{value:e.value,children:e.label},e.value))]}),l?.showMessage&&l.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:l.message})]})},text:({field:e,disabled:t=!1})=>{let{state:n,setState:r,afterFieldChange:i,registerFieldResetter:a,isDisabled:o,shouldHide:s,errorState:c}=xr(e,t),[l,u]=(0,H.useState)(n[e.key]?.value??e.default??``),d=(0,H.useCallback)(t=>{r(n=>({...n,[e.key]:{type:`text`,value:t}})),i(e.key)},[e.key,r,i]);return(0,H.useEffect)(()=>{a(e.key,()=>{u(``),d(``)})},[e.key,a,d]),(0,H.useEffect)(()=>{let e=setTimeout(()=>{d(l)},300);return()=>{clearTimeout(e)}},[l,d]),s?null:(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)($,{field:e}),(0,X.jsx)(`input`,{type:`text`,value:l,onChange:e=>{u(e.target.value)},placeholder:e.placeholder??e.default??`Enter text`,disabled:o,className:`rounded border px-2 py-1.5 text-[13px] font-mono focus:outline-none focus:ring-1 ${c?.error?`border-red-300 focus:ring-red-400`:`border-black/10 focus:ring-blue-400`} ${o?`bg-neutral-50 text-neutral-400`:`bg-white`}`}),c?.showMessage&&c.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:c.message})]})},description:({field:e})=>{let{shouldHide:t}=xr(e);return t?null:(0,X.jsx)(`div`,{className:`text-[13px] text-neutral-500 leading-relaxed`,children:e.content})},number:({field:e,disabled:t=!1})=>{let{state:n,setState:r,afterFieldChange:i,registerFieldResetter:a,isDisabled:o,shouldHide:s,errorState:c}=xr(e,t),l=n[e.key]?.value??e.default??``,[u,d]=(0,H.useState)(String(l)),f=(0,H.useCallback)(t=>{r(n=>({...n,[e.key]:{type:`number`,value:t}})),i(e.key)},[e.key,r,i]);return(0,H.useEffect)(()=>{a(e.key,()=>{d(``),f(``)})},[e.key,a,f]),(0,H.useEffect)(()=>{let e=setTimeout(()=>{f(u)},300);return()=>{clearTimeout(e)}},[u,f]),s?null:(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)($,{field:e}),(0,X.jsx)(`input`,{type:`number`,value:u,onChange:e=>{d(e.target.value)},placeholder:e.placeholder??e.default??`Enter a number`,disabled:o,className:`rounded border px-2 py-1.5 text-[13px] font-mono focus:outline-none focus:ring-1 ${c?.error?`border-red-300 focus:ring-red-400`:`border-black/10 focus:ring-blue-400`} ${o?`bg-neutral-50 text-neutral-400`:`bg-white`}`}),c?.showMessage&&c.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:c.message})]})},select:({field:e,pluginApiName:t,disabled:n=!1})=>{let{state:r,setState:i,inferencePending:a,initialExpressionsPending:o,expressionsIdle:s,afterFieldChange:c,registerFieldResetter:l,isDisabled:u,shouldHide:d,errorState:f}=xr(e,n),p=!a&&!o&&s,[m,h]=(0,H.useState)([]),[g,_]=(0,H.useState)(!1),v=(0,H.useRef)(null),[y,b]=(0,H.useState)(``),[x,S]=(0,H.useState)(``),[C,w]=(0,H.useState)(!1),T=(0,H.useRef)(null),E=!!(e.getFetchUrl||e.optionMapper),k=r[e.key]?.value,A=O(),j=(0,H.useCallback)(t=>{i(n=>({...n,[e.key]:{type:`select`,value:t}})),c(e.key)},[c,e.key,i]);(0,H.useEffect)(()=>{l(e.key,()=>{i(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.key))),b(``),S(``)})},[e.key,l,i]),(0,H.useEffect)(()=>{if(!e.typeahead)return;let t=setTimeout(()=>{S(y)},300);return()=>{clearTimeout(t)}},[y,e.typeahead]);let M=(0,H.useMemo)(()=>e.typeahead?{...r,search:x}:r,[r,x,e.typeahead]),P=(0,H.useMemo)(()=>JSON.stringify(M),[M]),F=(0,H.useCallback)(async n=>{_(!0);try{let r={__kizen_state:{value:{...n,pluginApiName:t}}},i;if(e.getFetchUrl){let t=await re(e.getFetchUrl,r);if(t){let n=e.fetchMethod??`GET`,a={"Content-Type":`application/json`},o=null;if(e.getHeaders&&(a=await L(e.getHeaders,r)),n===`POST`&&e.getBody){let t=await L(e.getBody,r);o=JSON.stringify(t)}if(t.startsWith(`/`))i={data:await(await A(t,{method:n,headers:a,...o!=null&&{body:o}})).json()};else{let e=await fetch(t,{method:n,headers:a,...o!=null&&{body:o}});e.ok&&(i=await e.json())}}}if(e.optionMapper){let r=await N(e.optionMapper,{__kizen_state:{value:{...n,result:i,pluginApiName:t}}});h(structuredClone(r))}else Array.isArray(i)&&h(i)}catch{h([])}finally{_(!1)}},[e,t,A]);if((0,H.useEffect)(()=>{!E||!p||d||e.typeahead||v.current!==P&&(v.current=P,F(M))},[E,p,P,M,e.typeahead,d,F]),(0,H.useEffect)(()=>{!E||!p||d||!e.typeahead||C&&v.current!==P&&(v.current=P,F(M))},[E,p,P,M,e.typeahead,C,d,F]),(0,H.useEffect)(()=>{!E||!e.autoSelect||e.typeahead||u||d||k||m.length===1&&m[0]&&(e.allow_multiple?j([m[0]]):j(m[0]))},[E,e.autoSelect,e.typeahead,e.allow_multiple,u,d,k,m,j]),d)return null;let I=E?m:e.options??[];if(e.allow_multiple){let t=Array.isArray(k)?k:[];return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)($,{field:e}),(0,X.jsx)(`div`,{className:`rounded border p-2 text-[13px] ${f?.error?`border-red-300`:`border-black/10`} ${u?`bg-neutral-50`:`bg-white`}`,children:g?(0,X.jsx)(`span`,{className:`text-neutral-400 text-[12px]`,children:`Loading options...`}):I.length===0?(0,X.jsx)(`span`,{className:`text-neutral-400 text-[12px]`,children:`No options available`}):(0,X.jsx)(`div`,{className:`flex flex-col gap-1 max-h-48 overflow-y-auto`,children:I.map(e=>{let n=t.some(t=>t.value===e.value);return(0,X.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,X.jsx)(`input`,{type:`checkbox`,checked:n,disabled:u,onChange:()=>{j(n?t.filter(t=>t.value!==e.value):[...t,e])},className:`h-3 w-3 accent-blue-600`}),(0,X.jsx)(`span`,{className:`text-[12px]`,children:e.label})]},e.value)})})}),f?.showMessage&&f.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:f.message})]})}if(e.typeahead){let t=k&&!Array.isArray(k)?k.label:``;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)($,{field:e}),(0,X.jsxs)(`div`,{ref:T,className:`relative`,children:[(0,X.jsx)(`input`,{type:`text`,value:t&&!C?t:y,placeholder:e.placeholder??`Search...`,disabled:u,onChange:t=>{b(t.target.value),k&&(i(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.key))),c(e.key))},onFocus:()=>{w(!0),t&&b(t)},onBlur:()=>{w(!1)},className:`w-full rounded border px-2 py-1.5 text-[13px] font-mono focus:outline-none focus:ring-1 ${f?.error?`border-red-300 focus:ring-red-400`:`border-black/10 focus:ring-blue-400`} ${u?`bg-neutral-50 text-neutral-400`:`bg-white`}`}),t&&!C&&(0,X.jsx)(`button`,{type:`button`,onClick:()=>{i(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.key))),b(``),S(``),c(e.key)},disabled:u,className:`absolute right-2 top-1/2 -translate-y-1/2 text-[11px] text-neutral-400 hover:text-neutral-600`,"aria-label":`Clear selection`,children:`×`})]}),(0,X.jsxs)(D,{anchorRef:T,open:C,children:[g&&(0,X.jsx)(`div`,{className:`px-3 py-2 text-[12px] text-neutral-400`,children:`Loading...`}),!g&&I.length===0&&y.length===0&&(0,X.jsx)(`div`,{className:`px-3 py-2 text-[12px] text-neutral-400`,children:`Start typing to search...`}),!g&&I.length===0&&y.length>0&&(0,X.jsx)(`div`,{className:`px-3 py-2 text-[12px] text-neutral-400`,children:`No results`}),!g&&I.map(e=>(0,X.jsx)(`div`,{className:`cursor-pointer px-3 py-2 text-[12px] text-neutral-800 hover:bg-neutral-100`,onClick:()=>{j(e),b(e.label),w(!1)},children:e.label},e.value))]}),f?.showMessage&&f.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:f.message})]})}let R=k&&!Array.isArray(k)?I.findIndex(e=>JSON.stringify(e.value)===JSON.stringify(k.value)):-1;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)($,{field:e}),g?(0,X.jsx)(`div`,{className:`w-full rounded border border-black/10 px-2 py-1.5 text-[12px] text-neutral-400 bg-neutral-50`,children:`Loading options...`}):(0,X.jsxs)(`select`,{value:R>=0?String(R):``,onChange:e=>{let t=I[Number(e.target.value)];t&&j(t)},disabled:u,className:`w-full rounded border px-2 py-1.5 text-[13px] font-mono focus:outline-none focus:ring-1 ${f?.error?`border-red-300 focus:ring-red-400`:`border-black/10 focus:ring-blue-400`} ${u?`bg-neutral-50 text-neutral-400`:`bg-white`}`,children:[(0,X.jsx)(`option`,{value:``,children:e.placeholder??`Choose an option`}),I.map((e,t)=>(0,X.jsx)(`option`,{value:String(t),children:e.label},e.label))]}),f?.showMessage&&f.message&&(0,X.jsx)(`span`,{className:`text-[11px] text-red-500`,children:f.message})]})},boolean:Sr},Er=({field:e,pluginApiName:t,disabled:n=!1})=>{let r=Tr[e.type];return(0,X.jsx)(r,{field:e,pluginApiName:t,disabled:n})},Dr=new Set([`get`,`delete`,`head`]),Or=async(e,t,n,r,i)=>{let a=r!=null,o=r instanceof FormData||r instanceof Blob,s=a&&!o?{"Content-Type":`application/json`,...i?.headers}:i?.headers,c=await e(n,{method:t,...a&&{body:o?r:JSON.stringify(r)},...s&&{headers:s}});return c.status===204||c.headers.get(`content-length`)===`0`?{}:await c.json()};function kr(e){return{get:(t,n)=>Or(e,`GET`,t,void 0,n),delete:(t,n)=>Or(e,`DELETE`,t,void 0,n),head:(t,n)=>Or(e,`HEAD`,t,void 0,n),post:(t,n,r)=>Or(e,`POST`,t,n,r),put:(t,n,r)=>Or(e,`PUT`,t,n,r),patch:(t,n,r)=>Or(e,`PATCH`,t,n,r),request:(t,n,r,i)=>{let a=t.toLowerCase(),o=Dr.has(a)?r:i,s=Dr.has(a)?void 0:r;return Or(e,t.toUpperCase(),n,s,o)}}}var Ar=()=>{let e=O(),t=T();return{getObjectByAPIName:(0,H.useCallback)(async n=>{try{let t=await(await e(`/api/custom-objects?filters=${encodeURIComponent(JSON.stringify({api_name:n}))}`)).json(),r=Array.isArray(t)?t:t.results;if(r&&r.length>0)return r}catch{}let r=t?.business.client_object;if(r?.access&&r.name===n)return[{id:r.id,object_name:r.object_name}]},[e,t]),getCustomObjectDetails:(0,H.useCallback)(async t=>{try{let[n,r]=await Promise.all([e(`/api/custom-objects/${t}`),e(`/api/custom-objects/${t}/fields`)]),i=await n.json(),a=await r.json(),o=Array.isArray(a)?a:a.results??[];return{id:t,objectName:i.object_name??``,fields:o.map(e=>({id:e.id,name:e.name,displayName:e.display_name}))}}catch{return{id:t,objectName:``,fields:[]}}},[e])}},jr=({state:e,onDismiss:t})=>{let n=e.error?.message??`Unknown error`,r=e.context?.workerName,i=e.context?.pluginApiName;return(0,X.jsx)(w,{open:e.visible,size:`xl`,ariaModal:!0,fontMono:!1,onBackdropClick:t,header:(0,X.jsx)(C,{title:`Critical Exception`,statusDot:`red`}),footer:(0,X.jsx)(`button`,{onClick:t,className:`rounded bg-neutral-900 px-3 py-1.5 text-[12px] text-white transition-colors hover:bg-neutral-700`,children:`Dismiss`}),children:(0,X.jsxs)(`div`,{className:`px-5 py-4`,children:[(0,X.jsx)(`p`,{className:`m-0 mb-3 text-[12px] leading-relaxed text-neutral-700`,children:`This error will be logged in Kizen's monitoring stack. Did you mean to throw it, or would you prefer to handle the error in your application code with a toast or other messaging?`}),(r??i)&&(0,X.jsxs)(`div`,{className:`mb-3 flex flex-wrap gap-2 text-[11px] text-neutral-600`,children:[r&&(0,X.jsxs)(`span`,{className:`rounded bg-neutral-100 px-2 py-0.5 font-mono`,children:[`worker: `,r]}),i&&(0,X.jsxs)(`span`,{className:`rounded bg-neutral-100 px-2 py-0.5 font-mono`,children:[`plugin: `,i]})]}),(0,X.jsx)(`div`,{className:`mb-2 text-[11px] font-semibold uppercase tracking-wide text-neutral-500`,children:`Error`}),(0,X.jsx)(`div`,{className:`whitespace-pre-wrap break-words rounded border border-black/10 bg-neutral-950 px-3 py-2 font-mono text-[11px] leading-relaxed text-amber-300`,children:n})]})})};function Mr(){let[e,t]=(0,H.useState)({visible:!1});return{onMonitoringException:(0,H.useCallback)((e,n)=>{let r={};n.extra.workerName!==void 0&&(r.workerName=n.extra.workerName),n.extra.pluginApiName!==void 0&&(r.pluginApiName=n.extra.pluginApiName),t({visible:!0,error:e,context:r})},[]),dialog:(0,X.jsx)(jr,{state:e,onDismiss:(0,H.useCallback)(()=>{t(e=>({...e,visible:!1}))},[])})}}export{wr as a,tr as c,cr as d,Zn as f,Er as i,Yn as l,br as m,Ar as n,fr as o,Qn as p,kr as r,yr as s,Mr as t,Gn as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{j as t}from"./fa-core-BoBqCOD3.js";var n=e(t(),1);function r(e,t){let[r,i]=(0,n.useState)(()=>{try{let n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}});return[r,(0,n.useCallback)(t=>{i(t),t==null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))},[e])]}export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{j as t}from"./fa-core-BoBqCOD3.js";import{o as n}from"./bundleQuery-CjbA01rb.js";var r=e(t(),1);r.use;var i=typeof window<`u`?r.useLayoutEffect:r.useEffect;function a(e){let t=r.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function o(e,t,n={},i={}){r.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!=`function`)return;let r=new IntersectionObserver(([e])=>{t(e)},n);return r.observe(e.current),()=>{r.disconnect()}},[t,n,i.disabled,e])}function s(e){let t=r.useRef(null);return r.useImperativeHandle(e,()=>t.current,[]),t}function c(e){let t=n();return r.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}export{a,i,s as n,o as r,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{A as t,j as n}from"./fa-core-BoBqCOD3.js";var r=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},i=new class extends r{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},a={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},o=new class{#e=a;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function s(e){setTimeout(e,0)}var c=typeof window>`u`||`Deno`in globalThis;function l(){}function u(e,t){return typeof e==`function`?e(t):e}function d(e){return typeof e==`number`&&e>=0&&e!==1/0}function f(e,t){return Math.max(e+(t||0)-Date.now(),0)}function p(e,t){return typeof e==`function`?e(t):e}function m(e,t){return typeof e==`function`?e(t):e}function h(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==_(o,t.options))return!1}else if(!y(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function g(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(v(t.options.mutationKey)!==v(a))return!1}else if(!y(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function _(e,t){return(t?.queryKeyHashFn||v)(e)}function v(e){return JSON.stringify(e,(e,t)=>w(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function y(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>y(e[n],t[n])):!1}var b=Object.prototype.hasOwnProperty;function x(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=C(e)&&C(t);if(!r&&!(w(e)&&w(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:b.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=x(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function S(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function C(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w(e){if(!ee(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ee(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ee(e){return Object.prototype.toString.call(e)===`[object Object]`}function te(e){return new Promise(t=>{o.setTimeout(t,e)})}function T(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:x(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var E=Symbol();function D(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===E?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function O(e,t){return typeof e==`function`?e(...t):!!e}function ie(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var k=(()=>{let e=()=>c;return{isServer(){return e()},setIsServer(t){e=t}}})();function A(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ae=s;function oe(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ae,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var j=oe(),M=new class extends r{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function se(e){return Math.min(1e3*2**e,3e4)}function N(e){return(e??`online`)===`online`?M.isOnline():!0}var P=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function F(e){let t=!1,n=0,r,a=A(),o=()=>a.status!==`pending`,s=t=>{if(!o()){let n=new P(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>i.isFocused()&&(e.networkMode===`always`||M.isOnline())&&e.canRun(),d=()=>N(e.networkMode)&&e.canRun(),f=e=>{o()||(r?.(),a.resolve(e))},p=e=>{o()||(r?.(),a.reject(e))},m=()=>new Promise(t=>{r=e=>{(o()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),h=()=>{if(o())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(o())return;let i=e.retry??(k.isServer()?0:3),a=e.retryDelay??se,s=typeof a==`function`?a(n,r):a,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),te(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r?.(),a),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),a)}}var I=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),d(this.gcTime)&&(this.#e=o.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(k.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(o.clearTimeout(this.#e),this.#e=void 0)}},ce=class extends I{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=R(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=R(this.options);e.data!==void 0&&(this.setState(L(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=T(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(l).catch(l):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>m(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===E||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>p(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!f(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=D(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=F({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof P&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof P){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...le(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...L(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),j.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function le(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function L(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function R(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var z=class extends r{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=A(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),B(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return V(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return V(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof m(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!S(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&H(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||m(this.options.enabled,this.#t)!==m(t.enabled,this.#t)||p(this.options.staleTime,this.#t)!==p(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||m(this.options.enabled,this.#t)!==m(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return de(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(l)),t}#g(){this.#b();let e=p(this.options.staleTime,this.#t);if(k.isServer()||this.#r.isStale||!d(e))return;let t=f(this.#r.dataUpdatedAt,e)+1;this.#d=o.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(k.isServer()||m(this.options.enabled,this.#t)===!1||!d(this.#p)||this.#p===0)&&(this.#f=o.setInterval(()=>{(this.options.refetchIntervalInBackground||i.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(o.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(o.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&B(e,t),o=i&&H(e,n,t,r);(a||o)&&(l={...l,...le(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:h}=l;d=l.data;let g=!1;if(t.placeholderData!==void 0&&d===void 0&&h===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(h=`success`,d=T(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!g)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=T(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),h=`error`);let _=l.fetchStatus===`fetching`,v=h===`pending`,y=h===`error`,b=v&&_,x=d!==void 0,S={status:h,fetchStatus:l.fetchStatus,isPending:v,isSuccess:h===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:U(e,t),refetch:this.refetch,promise:this.#o,isEnabled:m(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#o=S.promise=A())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!S(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){j.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ue(e,t){return m(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function B(e,t){return ue(e,t)||e.state.data!==void 0&&V(e,t,t.refetchOnMount)}function V(e,t,n){if(m(t.enabled,e)!==!1&&p(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&U(e,t)}return!1}function H(e,t,n,r){return(e!==t||m(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&U(e,n)}function U(e,t){return m(t.enabled,e)!==!1&&e.isStaleByTime(p(t.staleTime,e))}function de(e,t){return!S(e.getCurrentResult(),t)}var W=e(n(),1),fe=t(),G=W.createContext(void 0),K=e=>{let t=W.useContext(G);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},pe=({client:e,children:t})=>(W.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,fe.jsx)(G.Provider,{value:e,children:t})),q=W.createContext(!1),J=()=>W.useContext(q);q.Provider;function me(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var he=W.createContext(me()),Y=()=>W.useContext(he),X=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?O(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Z=e=>{W.useEffect(()=>{e.clearReset()},[e])},Q=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||O(n,[e.error,r])),ge=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},_e=(e,t)=>e.isLoading&&e.isFetching&&!t,ve=(e,t)=>e?.suspense&&t.isPending,$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ye(e,t,n){let r=J(),i=Y(),a=K(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,ge(o),X(o,i,s),Z(i);let c=!a.getQueryCache().get(o.queryHash),[u]=W.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(W.useSyncExternalStore(W.useCallback(e=>{let t=f?u.subscribe(j.batchCalls(e)):l;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),W.useEffect(()=>{u.setOptions(o)},[o,u]),ve(o,d))throw $(o,u,i);if(Q({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!k.isServer()&&_e(d,r)&&(c?$(o,u,i):s?.promise)?.catch(l).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function be(e,t){return ye(e,z,t)}export{x as A,u as C,h as D,g as E,i as F,r as I,S as M,O as N,l as O,E as P,D as S,_ as T,M as _,X as a,ne as b,Y as c,pe as d,K as f,F as g,I as h,ve as i,p as j,y as k,J as l,ce as m,ge as n,Q as o,z as p,$ as r,Z as s,be as t,G as u,j as v,v as w,re as x,ie as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as ee,$i as te,$n as ne,$r as e,$t as t,A as n,Ai as r,An as i,Ar as a,At as o,B as s,Bi as c,Bn as l,Br as u,Bt as d,C as f,Ci as p,Cn as m,Cr as h,Ct as g,D as _,Di as v,Dn as y,Dr as b,Dt as x,E as S,Ei as C,En as w,Er as T,Et as E,F as D,Fi as O,Fn as k,Fr as A,Ft as j,G as M,Gi as N,Gn as P,Gr as F,Gt as I,H as L,Hi as R,Hn as z,Hr as B,Ht as V,I as H,Ii as U,In as W,Ir as G,It as K,J as q,Ji as J,Jn as Y,Jr as X,Jt as Z,K as re,Ki as ie,Kn as ae,Kr as oe,Kt as se,L as ce,Li as le,Ln as ue,Lr as de,Lt as fe,M as pe,Mi as me,Mn as he,Mr as ge,Mt as _e,N as ve,Ni as ye,Nn as be,Nr as xe,Nt as Se,O as Ce,Oi as we,On as Te,Or as Ee,Ot as De,P as Oe,Pi as ke,Pn as Ae,Pr as je,Pt as Me,Q as Ne,Qi as Pe,Qn as Fe,Qr as Ie,Qt as Le,R as Re,Ri as ze,Rn as Be,Rr as Ve,Rt as He,S as Ue,Sa as We,Si as Ge,Sn as Ke,Sr as qe,St as Je,T as Ye,Ti as Xe,Tn as Ze,Tr as Qe,Tt as $e,U as et,Ui as tt,Un as nt,Ur as rt,Ut as it,V as at,Vi as ot,Vn as st,Vr as ct,Vt as lt,W as ut,Wi as dt,Wn as ft,Wr as pt,Wt as mt,X as ht,Xi as gt,Xn as _t,Xr as vt,Xt as yt,Y as bt,Yi as xt,Yn as St,Yr as Ct,Yt as wt,Z as Tt,Zi as Et,Zn as Dt,Zr as Ot,Zt as kt,_ as At,_a as jt,_i as Mt,_n as Nt,_r as Pt,_t as Ft,a as It,aa as Lt,ai as Rt,an as zt,ar as Bt,at as Vt,b as Ht,ba as Ut,bi as Wt,bn as Gt,br as Kt,bt as qt,c as Jt,ca as Yt,ci as Xt,cn as Zt,cr as Qt,ct as $t,d as en,da as tn,di as nn,dn as rn,dr as an,dt as on,ea as sn,ei as cn,en as ln,er as un,et as dn,f as fn,fa as pn,fi as mn,fn as hn,fr as gn,ft as _n,g as vn,ga as yn,gi as bn,gn as xn,gr as Sn,gt as Cn,h as wn,ha as Tn,hi as En,hn as Dn,hr as On,ht as kn,i as An,ia as jn,ii as Mn,in as Nn,ir as Pn,it as Fn,j as In,ji as Ln,jn as Rn,jr as zn,jt as Bn,k as Vn,ki as Hn,kn as Un,kr as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,lt as Zn,m as Qn,ma as $n,mi as er,mn as tr,mr as nr,mt as rr,n as ir,na as ar,ni as or,nn as sr,nr as cr,nt as lr,o as ur,oa as dr,oi as fr,on as pr,or as mr,ot as hr,p as gr,pa as _r,pi as vr,pn as yr,pr as br,pt as xr,q as Sr,qi as Cr,qn as wr,qr as Tr,qt as Er,r as Dr,ra as Or,ri as kr,rn as Ar,rr as jr,rt as Mr,s as Nr,sa as Pr,si as Fr,sn as Ir,sr as Lr,st as Rr,t as zr,ta as Br,ti as Vr,tn as Hr,tr as Ur,tt as Wr,u as Gr,ua as Kr,ui as qr,un as Jr,ur as Yr,ut as Xr,v as Zr,va as Qr,vi as $r,vn as ei,vr as ti,vt as ni,w as ri,wi as ii,wn as ai,wr as oi,wt as si,x as ci,xa as li,xi as ui,xn as di,xr as fi,xt as pi,y as mi,ya as hi,yi as gi,yn as _i,yr as vi,yt as yi,z as bi,zi as xi,zn as Si,zr as Ci,zt as wi}from"./fa-pro-icons-Dzkwxnip.js";var Ti=We(),Ei=li(),Di=Ut(),Oi=hi(),ki=Qr(),Ai=jt(),ji=yn(),Mi=Tn(),Ni=$n(),Pi=_r(),Fi=pn(),Ii=tn(),Li=Kr(),Ri=qn(),zi=Yt(),Bi=Pr(),Vi=dr(),Hi=Lt(),Ui=jn(),Wi=Or(),Gi=ar(),Ki=Br(),qi=sn(),Ji=te(),Yi=Pe(),Xi=Et(),Zi=gt(),Qi=xt(),$i=J(),ea=Cr(),ta=ie(),na=N(),ra=dt(),ia=tt(),aa=R(),oa=ot(),sa=c(),ca=xi(),la=ze(),ua=le(),Q=U(),da=O(),fa=ke(),pa=ye(),ma=me(),ha=Ln(),ga=r(),_a=Hn(),va=we(),ya=v(),ba=C(),xa=Xe(),Sa=ii(),Ca=p(),wa=Ge(),Ta=ui(),Ea=Wt(),Da=gi(),Oa=$r(),ka=Mt(),Aa=bn(),ja=En(),Ma=er(),Na=vr(),Pa=mn(),Fa=nn(),Ia=qr(),La=Jn(),Ra=Xt(),za=Fr(),Ba=fr(),Va=Rt(),Ha=Mn(),Ua=kr(),Wa=or(),Ga=Vr(),Ka=cn(),qa=e(),Ja=Ie(),Ya=Ot(),Xa=vt(),Za=Ct(),Qa=X(),$a=Tr(),eo=oe(),to=F(),no=pt(),ro=rt(),io=B(),ao=ct(),oo=u(),so=Ci(),co=Ve(),lo=de(),uo=G(),fo=A(),po=je(),mo=xe(),ho=ge(),go=zn(),_o=a(),vo=Wn(),yo=Ee(),bo=b(),xo=T(),So=Qe(),Co=oi(),wo=h(),To=qe(),Eo=fi(),Do=Kt(),Oo=vi(),ko=ti(),Ao=Pt(),jo=Sn(),Mo=On(),No=nr(),Po=br(),Fo=gn(),Io=an(),Lo=Yr(),Ro=Xn(),zo=Qt(),Bo=Lr(),Vo=mr(),Ho=Bt(),Uo=Pn(),Wo=jr(),Go=cr(),Ko=Ur(),qo=un(),Jo=ne(),Yo=Fe(),Xo=Dt(),Zo=_t(),Qo=St(),$o=Y(),es=wr(),ts=ae(),ns=P(),rs=ft(),is=nt(),as=z(),os=st(),ss=l(),cs=Si(),ls=Be(),us=ue(),ds=W(),fs=k(),ps=Ae(),ms=be(),hs=he(),gs=Rn(),_s=i(),vs=Un(),ys=Te(),bs=y(),xs=w(),Ss=Ze(),Cs=ai(),ws=m(),Ts=Ke(),Es=di(),Ds=Gt(),Os=_i(),ks=ei(),As=Nt(),js=xn(),Ms=Dn(),Ns=tr(),Ps=yr(),Fs=hn(),Is=rn(),Ls=Jr(),Rs=Yn(),zs=Zt(),Bs=Ir(),Vs=pr(),Hs=zt(),Us=Nn(),Ws=Ar(),Gs=sr(),Ks=Hr(),qs=ln(),Js=t(),Ys=Le(),Xs=kt(),Zs=yt(),Qs=wt(),$s=Z(),ec=Er(),tc=se(),nc=I(),rc=mt(),ic=it(),ac=V(),oc=lt(),sc=d(),cc=wi(),lc=He(),uc=fe(),dc=K(),fc=j(),pc=Me(),mc=Se(),hc=_e(),gc=Bn(),_c=o(),vc=Gn(),yc=De(),bc=x(),xc=E(),Sc=$e(),Cc=si(),wc=g(),Tc=Je(),Ec=pi(),Dc=qt(),Oc=yi(),kc=ni(),Ac=Ft(),jc=Cn(),Mc=kn(),Nc=rr(),Pc=xr(),Fc=_n(),Ic=on(),Lc=Xr(),Rc=Zn(),zc=$t(),Bc=Rr(),Vc=hr(),Hc=Vt(),Uc=Fn(),Wc=Mr(),Gc=lr(),Kc=Wr(),qc=dn(),Jc=ee(),Yc=Ne(),Xc=Tt(),Zc=ht(),Qc=bt(),$c=q(),el=Sr(),tl=re(),nl=M(),rl=ut(),il=et(),al=at(),ol=L(),sl=s(),cl=bi(),ll=Re(),ul=ce(),dl=H(),fl=D(),pl=Oe(),ml=ve(),hl=pe(),gl=In(),_l=n(),vl=Vn(),yl=Ce(),bl=_(),xl=S(),Sl=Ye(),Cl=ri(),wl=f(),Tl=Ue(),El=ci(),Dl=Ht(),Ol=mi(),kl=Zr(),Al=At(),jl=vn(),Ml=wn(),Nl=Qn(),Pl=gr(),Fl=fn(),Il=en(),Ll=Gr(),Rl=Kn(),zl=Jt(),Bl=Nr(),Vl=ur(),Hl=It(),Ul=An(),Wl=Dr(),Gl=ir(),Kl=zr(),ql=new Set([`kizen-k`,`form-entity`]),Jl={phone:Ti.faPhone,envelope:Ei.faEnvelope,"pen-nib":Di.faPenNib,"calendar-days":Oi.faCalendarDays,paperclip:ki.faPaperclip,file:Ai.faFile,clipboard:ji.faClipboard,pen:Mi.faPen,tag:Ni.faTag,book:Pi.faBook,print:Fi.faPrint,"pen-to-square":Ii.faPenToSquare,folder:Li.faFolder,"folder-open":Ri.faFolderOpen,thumbtack:zi.faThumbtack,globe:Bi.faGlobe,city:Vi.faCity,briefcase:Hi.faBriefcase,compass:Ui.faCompass,"address-book":Wi.faAddressBook,"business-time":Gi.faBusinessTime,"computer-classic":Ki.faComputerClassic,"pen-fancy":qi.faPenFancy,"badge-check":Ji.faBadgeCheck,"mug-saucer":Yi.faMugSaucer,landmark:Xi.faLandmark,"chart-simple":Zi.faChartSimple,envelopes:Qi.faEnvelopes,"diagram-venn":$i.faDiagramVenn,calendar:ea.faCalendar,pencil:ta.faPencil,"phone-volume":na.faPhoneVolume,copy:ra.faCopy,table:ia.faTable,building:aa.faBuilding,"network-wired":oa.faNetworkWired,"address-card":sa.faAddressCard,tags:ca.faTags,registered:la.faRegistered,signature:ua.faSignature,"phone-office":Q.faPhoneOffice,projector:da.faProjector,sitemap:fa.faSitemap,marker:pa.faMarker,badge:ma.faBadge,wallet:ha.faWallet,copyright:ga.faCopyright,bullseye:_a.faBullseye,calculator:va.faCalculator,certificate:ya.faCertificate,percent:ba.faPercent,eraser:xa.faEraser,"file-spreadsheet":Sa.faFileSpreadsheet,glasses:Ca.faGlasses,industry:wa.faIndustry,vault:Ta.faVault,"user-tie-hair-long":Ea.faUserTieHairLong,"user-tie-hair":Da.faUserTieHair,"user-hair-mullet":Oa.faUserHairMullet,trademark:ka.faTrademark,"timeline-arrow":Aa.faTimelineArrow,timeline:ja.faTimeline,"table-tree":Ma.faTableTree,"table-rows":Na.faTableRows,"table-pivot":Pa.faTablePivot,"table-layout":Fa.faTableLayout,"table-columns":Ia.faTableColumns,stapler:La.faStapler,"square-poll-vertical":Ra.faSquarePollVertical,"square-poll-horizontal":za.faSquarePollHorizontal,"square-phone-flip":Ba.faSquarePhoneFlip,"square-phone":Va.faSquarePhone,"square-pen":Ha.faSquarePen,"square-kanban":Ua.faSquareKanban,"square-envelope":Wa.faSquareEnvelope,socks:Ga.faSocks,"slot-machine":Ka.faSlotMachine,"signature-slash":qa.faSignatureSlash,"signature-lock":Ja.faSignatureLock,shredder:Ya.faShredder,scissors:Xa.faScissors,"scanner-image":Za.faScannerImage,"scale-unbalanced-flip":Qa.faScaleUnbalancedFlip,"scale-unbalanced":$a.faScaleUnbalanced,"scale-balanced":eo.faScaleBalanced,router:to.faRouter,"rectangle-pro":no.faRectanglePro,"print-slash":ro.faPrintSlash,"print-magnifying-glass":io.faPrintMagnifyingGlass,"presentation-screen":ao.faPresentationScreen,podium:oo.faPodium,"phone-slash":so.faPhoneSlash,"phone-intercom":co.faPhoneIntercom,"phone-flip":lo.faPhoneFlip,"person-chalkboard":uo.faPersonChalkboard,"pen-nib-slash":fo.faPenNibSlash,"pen-clip":po.faPenClip,paste:mo.faPaste,"paperclip-vertical":ho.faPaperclipVertical,notebook:go.faNotebook,"note-sticky":_o.faNoteSticky,"money-check-pen":vo.faMoneyCheckPen,"money-check-dollar-pen":yo.faMoneyCheckDollarPen,"magnifying-glass-chart":bo.faMagnifyingGlassChart,"magnifying-glass-arrow-right":xo.faMagnifyingGlassArrowRight,"list-tree":So.faListTree,"list-timeline":Co.faListTimeline,"list-radio":wo.faListRadio,"list-dropdown":To.faListDropdown,"list-check":Eo.faListCheck,"laptop-file":Do.faLaptopFile,"lamp-desk":Oo.faLampDesk,keynote:ko.faKeynote,"industry-windows":Ao.faIndustryWindows,inboxes:jo.faInboxes,"inbox-full":Mo.faInboxFull,"house-laptop":No.faHouseLaptop,highlighter:Po.faHighlighter,folders:Fo.faFolders,"folder-xmark":Io.faFolderXmark,"folder-tree":Lo.faFolderTree,"folder-plus":Ro.faFolderPlus,"folder-minus":zo.faFolderMinus,"folder-arrow-up":Bo.faFolderArrowUp,"folder-arrow-down":Vo.faFolderArrowDown,"floppy-disk-circle-xmark":Ho.faFloppyDiskCircleXmark,"floppy-disk-circle-arrow-right":Uo.faFloppyDiskCircleArrowRight,"floppy-disk":Wo.faFloppyDisk,"file-user":Go.faFileUser,"file-lines":Ko.faFileLines,"file-circle-plus":qo.faFileCirclePlus,"file-circle-info":Jo.faFileCircleInfo,"file-chart-pie":Yo.faFileChartPie,"file-chart-column":Xo.faFileChartColumn,fax:Zo.faFax,"envelope-open":Qo.faEnvelopeOpen,"envelope-dot":$o.faEnvelopeDot,"envelope-circle-check":es.faEnvelopeCircleCheck,"coffee-pot":ts.faCoffeePot,"cloud-word":ns.faCloudWord,"clipboard-question":rs.faClipboardQuestion,"chart-user":is.faChartUser,"chart-tree-map":as.faChartTreeMap,"chart-simple-horizontal":os.faChartSimpleHorizontal,"chart-pyramid":ss.faChartPyramid,"chart-pie-simple":cs.faChartPieSimple,"chart-pie":ls.faChartPie,"chart-line-up":us.faChartLineUp,"chart-line-down":ds.faChartLineDown,"chart-line":fs.faChartLine,"cake-candles":ps.faCakeCandles,"cabinet-filing":ms.faCabinetFiling,bullhorn:hs.faBullhorn,"briefcase-blank":gs.faBriefcaseBlank,"briefcase-arrow-right":_s.faBriefcaseArrowRight,"brain-arrow-curved-right":vs.faBrainArrowCurvedRight,"boxes-packing":ys.faBoxesPacking,"box-archive":bs.faBoxArchive,"book-section":xs.faBookSection,"bars-staggered":Ss.faBarsStaggered,"bars-progress":Cs.faBarsProgress,"badge-percent":ws.faBadgePercent,"badge-dollar":Ts.faBadgeDollar,"arrows-to-eye":Es.faArrowsToEye,"arrows-to-dot":Ds.faArrowsToDot,"arrows-spin":Os.faArrowsSpin,sparkles:ks.faSparkles,megaphone:As.faMegaphone,"block-question":js.faBlockQuestion,"lightbulb-slash":Ms.faLightbulbSlash,"comments-dollar":Ns.faCommentsDollar,comments:Bl.faComments,"bullseye-pointer":Ps.faBullseyePointer,lightbulb:Fs.faLightbulb,"user-group-crown":Is.faUserGroupCrown,"user-crown":Ls.faUserCrown,"signal-stream-slash":Rs.faSignalStreamSlash,"signal-stream":zs.faSignalStream,"rectangle-ad":Bs.faRectangleAd,"ranking-star":Vs.faRankingStar,"person-rays":Hs.faPersonRays,"people-group":Us.faPeopleGroup,"messages-dollar":Ws.faMessagesDollar,"message-dollar":Gs.faMessageDollar,"magnifying-glass-location":Ks.faMagnifyingGlassLocation,"magnifying-glass-dollar":qs.faMagnifyingGlassDollar,"lightbulb-on":Js.faLightbulbOn,"lightbulb-exclamation":Ys.faLightbulbExclamation,"lightbulb-dollar":Xs.faLightbulbDollar,"lightbulb-cfl-on":Zs.faLightbulbCflOn,"lightbulb-cfl":Qs.faLightbulbCfl,"hundred-points":$s.faHundredPoints,"group-arrows-rotate":ec.faGroupArrowsRotate,"gift-card":tc.faGiftCard,"filter-circle-dollar":nc.faFilterCircleDollar,"envelopes-bulk":rc.faEnvelopesBulk,"envelope-open-text":ic.faEnvelopeOpenText,"envelope-open-dollar":ac.faEnvelopeOpenDollar,"comment-dollar":oc.faCommentDollar,"chart-mixed":sc.faChartMixed,"bullseye-arrow":cc.faBullseyeArrow,star:lc.faStar,heart:uc.faHeart,"camera-retro":dc.faCameraRetro,"truck-fast":fc.faTruckFast,bell:pc.faBell,"cart-shopping":mc.faCartShopping,gift:hc.faGift,barcode:gc.faBarcode,bookmark:_c.faBookmark,camera:vc.faCamera,"thumbs-up":yc.faThumbsUp,"thumbs-down":bc.faThumbsDown,key:xc.faKey,truck:Sc.faTruck,balloons:Cc.faBalloons,handshake:wc.faHandshake,shop:Tc.faShop,shirt:Ec.faShirt,"bag-shopping":Dc.faBagShopping,moped:Oc.faMoped,"cart-plus":kc.faCartPlus,"credit-card":Ac.faCreditCard,store:jc.faStore,"cash-register":Mc.faCashRegister,"booth-curtain":Nc.faBoothCurtain,trophy:Pc.faTrophy,receipt:Fc.faReceipt,"truck-container":Ic.faTruckContainer,"truck-clock":Lc.faTruckClock,"truck-bolt":Rc.faTruckBolt,"trophy-star":zc.faTrophyStar,"store-slash":Bc.faStoreSlash,"store-lock":Vc.faStoreLock,"star-exclamation":Hc.faStarExclamation,"shop-slash":Uc.faShopSlash,"shop-lock":Wc.faShopLock,"rectangle-barcode":Gc.faRectangleBarcode,"person-booth":Kc.faPersonBooth,"nfc-trash":qc.faNfcTrash,"nfc-symbol":Jc.faNfcSymbol,"nfc-slash":Yc.faNfcSlash,"nfc-signal":Xc.faNfcSignal,"nfc-pen":Zc.faNfcPen,"nfc-magnifying-glass":Qc.faNfcMagnifyingGlass,"nfc-lock":$c.faNfcLock,nfc:el.faNfc,"money-check-dollar":tl.faMoneyCheckDollar,"money-check":nl.faMoneyCheck,"mobile-signal-out":rl.faMobileSignalOut,"mobile-signal":il.faMobileSignal,"hexagon-vertical-nft-slanted":al.faHexagonVerticalNftSlanted,"hexagon-vertical-nft":ol.faHexagonVerticalNft,"hexagon-image":sl.faHexagonImage,"hand-holding-box":cl.faHandHoldingBox,gifts:ll.faGifts,gem:ul.faGem,"credit-card-front":dl.faCreditCardFront,"credit-card-blank":fl.faCreditCardBlank,"cart-xmark":pl.faCartXmark,"cart-shopping-fast":ml.faCartShoppingFast,"cart-minus":hl.faCartMinus,"cart-circle-xmark":gl.faCartCircleXmark,"cart-circle-plus":_l.faCartCirclePlus,"cart-circle-exclamation":vl.faCartCircleExclamation,"cart-circle-check":yl.faCartCircleCheck,"cart-circle-arrow-up":bl.faCartCircleArrowUp,"cart-circle-arrow-down":xl.faCartCircleArrowDown,"cart-arrow-up":Sl.faCartArrowUp,"cart-arrow-down":Cl.faCartArrowDown,"box-open-full":wl.faBoxOpenFull,"basket-shopping-simple":Tl.faBasketShoppingSimple,"basket-shopping":El.faBasketShopping,"barcode-scan":Dl.faBarcodeScan,"barcode-read":Ol.faBarcodeRead,balloon:kl.faBalloon,"bags-shopping":Al.faBagsShopping,bars:jl.faBars,browser:Ml.faBrowser,"chart-bar":Nl.faChartBar,cog:Pl.faCog,database:Ll.faDatabase,"calendar-alt":Fl.faCalendarAlt,play:Il.faPlay,add:Rl.faAdd,"book-alt":zl.faBookAlt,"arrows-to-circle":Vl.faArrowsToCircle,"question-circle":Hl.faQuestionCircle,"chevron-down":Ul.faChevronDown,"chevron-up":Wl.faChevronUp,"window-restore":Gl.faWindowRestore,forward:Kl.faForward},$=new Set(`phone.envelope.pen-nib.calendar-days.paperclip.file.clipboard.pen.tag.book.print.pen-to-square.folder.folder-open.thumbtack.globe.city.briefcase.compass.address-book.business-time.computer-classic.pen-fancy.badge-check.mug-saucer.landmark.chart-simple.envelopes.diagram-venn.calendar.pencil.phone-volume.copy.table.building.network-wired.address-card.tags.registered.signature.phone-office.projector.sitemap.marker.badge.wallet.copyright.bullseye.calculator.certificate.percent.eraser.file-spreadsheet.glasses.industry.vault.user-tie-hair-long.user-tie-hair.user-hair-mullet.trademark.timeline-arrow.timeline.table-tree.table-rows.table-pivot.table-layout.table-columns.stapler.square-poll-vertical.square-poll-horizontal.square-phone-flip.square-phone.square-pen.square-kanban.square-envelope.socks.slot-machine.signature-slash.signature-lock.shredder.scissors.scanner-image.scale-unbalanced-flip.scale-unbalanced.scale-balanced.router.rectangle-pro.print-slash.print-magnifying-glass.presentation-screen.podium.phone-slash.phone-intercom.phone-flip.person-chalkboard.pen-nib-slash.pen-clip.paste.paperclip-vertical.notebook.note-sticky.money-check-pen.money-check-dollar-pen.magnifying-glass-chart.magnifying-glass-arrow-right.list-tree.list-timeline.list-radio.list-dropdown.list-check.laptop-file.lamp-desk.keynote.industry-windows.inboxes.inbox-full.house-laptop.highlighter.folders.folder-xmark.folder-tree.folder-plus.folder-minus.folder-arrow-up.folder-arrow-down.floppy-disk-circle-xmark.floppy-disk-circle-arrow-right.floppy-disk.file-user.file-lines.file-circle-plus.file-circle-info.file-chart-pie.file-chart-column.fax.envelope-open.envelope-dot.envelope-circle-check.coffee-pot.cloud-word.clipboard-question.chart-user.chart-tree-map.chart-simple-horizontal.chart-pyramid.chart-pie-simple.chart-pie.chart-line-up.chart-line-down.chart-line.cake-candles.cabinet-filing.bullhorn.briefcase-blank.briefcase-arrow-right.brain-arrow-curved-right.boxes-packing.box-archive.book-section.bars-staggered.bars-progress.badge-percent.badge-dollar.arrows-to-eye.arrows-to-dot.arrows-spin.sparkles.megaphone.block-question.lightbulb-slash.comments-dollar.comments.bullseye-pointer.lightbulb.user-group-crown.user-crown.signal-stream-slash.signal-stream.rectangle-ad.ranking-star.person-rays.people-group.messages-dollar.message-dollar.magnifying-glass-location.magnifying-glass-dollar.lightbulb-on.lightbulb-exclamation.lightbulb-dollar.lightbulb-cfl-on.lightbulb-cfl.hundred-points.group-arrows-rotate.gift-card.filter-circle-dollar.envelopes-bulk.envelope-open-text.envelope-open-dollar.comment-dollar.chart-mixed.bullseye-arrow.star.heart.camera-retro.truck-fast.bell.cart-shopping.gift.barcode.bookmark.camera.thumbs-up.thumbs-down.key.truck.balloons.handshake.shop.shirt.bag-shopping.moped.cart-plus.credit-card.store.cash-register.booth-curtain.trophy.receipt.truck-container.truck-clock.truck-bolt.trophy-star.store-slash.store-lock.star-exclamation.shop-slash.shop-lock.rectangle-barcode.person-booth.nfc-trash.nfc-symbol.nfc-slash.nfc-signal.nfc-pen.nfc-magnifying-glass.nfc-lock.nfc.money-check-dollar.money-check.mobile-signal-out.mobile-signal.hexagon-vertical-nft-slanted.hexagon-vertical-nft.hexagon-image.hand-holding-box.gifts.gem.credit-card-front.credit-card-blank.cart-xmark.cart-shopping-fast.cart-minus.cart-circle-xmark.cart-circle-plus.cart-circle-exclamation.cart-circle-check.cart-circle-arrow-up.cart-circle-arrow-down.cart-arrow-up.cart-arrow-down.box-open-full.basket-shopping-simple.basket-shopping.barcode-scan.barcode-read.balloon.bags-shopping.bars.browser.chart-bar.cog.database.calendar-alt.play.kizen-k.add.book-alt.form-entity.arrows-to-circle.question-circle.chevron-down.chevron-up.window-restore.forward`.split(`.`)),Yl=[...$].sort();export{Jl as i,Yl as n,ql as r,$ as t};
|
|
1
|
+
import{$ as ee,$i as te,$n as ne,$r as e,$t as t,A as n,Ai as r,An as i,Ar as a,At as o,B as s,Bi as c,Bn as l,Br as u,Bt as d,C as f,Ci as p,Cn as m,Cr as h,Ct as g,D as _,Di as v,Dn as y,Dr as b,Dt as x,E as S,Ei as C,En as w,Er as T,Et as E,F as D,Fi as O,Fn as k,Fr as A,Ft as j,G as M,Gi as N,Gn as P,Gr as F,Gt as I,H as L,Hi as R,Hn as z,Hr as B,Ht as V,I as H,Ii as U,In as W,Ir as G,It as K,J as q,Ji as J,Jn as Y,Jr as X,Jt as Z,K as re,Ki as ie,Kn as ae,Kr as oe,Kt as se,L as ce,Li as le,Ln as ue,Lr as de,Lt as fe,M as pe,Mi as me,Mn as he,Mr as ge,Mt as _e,N as ve,Ni as ye,Nn as be,Nr as xe,Nt as Se,O as Ce,Oi as we,On as Te,Or as Ee,Ot as De,P as Oe,Pi as ke,Pn as Ae,Pr as je,Pt as Me,Q as Ne,Qi as Pe,Qn as Fe,Qr as Ie,Qt as Le,R as Re,Ri as ze,Rn as Be,Rr as Ve,Rt as He,S as Ue,Sa as We,Si as Ge,Sn as Ke,Sr as qe,St as Je,T as Ye,Ti as Xe,Tn as Ze,Tr as Qe,Tt as $e,U as et,Ui as tt,Un as nt,Ur as rt,Ut as it,V as at,Vi as ot,Vn as st,Vr as ct,Vt as lt,W as ut,Wi as dt,Wn as ft,Wr as pt,Wt as mt,X as ht,Xi as gt,Xn as _t,Xr as vt,Xt as yt,Y as bt,Yi as xt,Yn as St,Yr as Ct,Yt as wt,Z as Tt,Zi as Et,Zn as Dt,Zr as Ot,Zt as kt,_ as At,_a as jt,_i as Mt,_n as Nt,_r as Pt,_t as Ft,a as It,aa as Lt,ai as Rt,an as zt,ar as Bt,at as Vt,b as Ht,ba as Ut,bi as Wt,bn as Gt,br as Kt,bt as qt,c as Jt,ca as Yt,ci as Xt,cn as Zt,cr as Qt,ct as $t,d as en,da as tn,di as nn,dn as rn,dr as an,dt as on,ea as sn,ei as cn,en as ln,er as un,et as dn,f as fn,fa as pn,fi as mn,fn as hn,fr as gn,ft as _n,g as vn,ga as yn,gi as bn,gn as xn,gr as Sn,gt as Cn,h as wn,ha as Tn,hi as En,hn as Dn,hr as On,ht as kn,i as An,ia as jn,ii as Mn,in as Nn,ir as Pn,it as Fn,j as In,ji as Ln,jn as Rn,jr as zn,jt as Bn,k as Vn,ki as Hn,kn as Un,kr as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,lt as Zn,m as Qn,ma as $n,mi as er,mn as tr,mr as nr,mt as rr,n as ir,na as ar,ni as or,nn as sr,nr as cr,nt as lr,o as ur,oa as dr,oi as fr,on as pr,or as mr,ot as hr,p as gr,pa as _r,pi as vr,pn as yr,pr as br,pt as xr,q as Sr,qi as Cr,qn as wr,qr as Tr,qt as Er,r as Dr,ra as Or,ri as kr,rn as Ar,rr as jr,rt as Mr,s as Nr,sa as Pr,si as Fr,sn as Ir,sr as Lr,st as Rr,t as zr,ta as Br,ti as Vr,tn as Hr,tr as Ur,tt as Wr,u as Gr,ua as Kr,ui as qr,un as Jr,ur as Yr,ut as Xr,v as Zr,va as Qr,vi as $r,vn as ei,vr as ti,vt as ni,w as ri,wi as ii,wn as ai,wr as oi,wt as si,x as ci,xa as li,xi as ui,xn as di,xr as fi,xt as pi,y as mi,ya as hi,yi as gi,yn as _i,yr as vi,yt as yi,z as bi,zi as xi,zn as Si,zr as Ci,zt as wi}from"./fa-pro-icons-j8-_MCQ7.js";var Ti=We(),Ei=li(),Di=Ut(),Oi=hi(),ki=Qr(),Ai=jt(),ji=yn(),Mi=Tn(),Ni=$n(),Pi=_r(),Fi=pn(),Ii=tn(),Li=Kr(),Ri=qn(),zi=Yt(),Bi=Pr(),Vi=dr(),Hi=Lt(),Ui=jn(),Wi=Or(),Gi=ar(),Ki=Br(),qi=sn(),Ji=te(),Yi=Pe(),Xi=Et(),Zi=gt(),Qi=xt(),$i=J(),ea=Cr(),ta=ie(),na=N(),ra=dt(),ia=tt(),aa=R(),oa=ot(),sa=c(),ca=xi(),la=ze(),ua=le(),Q=U(),da=O(),fa=ke(),pa=ye(),ma=me(),ha=Ln(),ga=r(),_a=Hn(),va=we(),ya=v(),ba=C(),xa=Xe(),Sa=ii(),Ca=p(),wa=Ge(),Ta=ui(),Ea=Wt(),Da=gi(),Oa=$r(),ka=Mt(),Aa=bn(),ja=En(),Ma=er(),Na=vr(),Pa=mn(),Fa=nn(),Ia=qr(),La=Jn(),Ra=Xt(),za=Fr(),Ba=fr(),Va=Rt(),Ha=Mn(),Ua=kr(),Wa=or(),Ga=Vr(),Ka=cn(),qa=e(),Ja=Ie(),Ya=Ot(),Xa=vt(),Za=Ct(),Qa=X(),$a=Tr(),eo=oe(),to=F(),no=pt(),ro=rt(),io=B(),ao=ct(),oo=u(),so=Ci(),co=Ve(),lo=de(),uo=G(),fo=A(),po=je(),mo=xe(),ho=ge(),go=zn(),_o=a(),vo=Wn(),yo=Ee(),bo=b(),xo=T(),So=Qe(),Co=oi(),wo=h(),To=qe(),Eo=fi(),Do=Kt(),Oo=vi(),ko=ti(),Ao=Pt(),jo=Sn(),Mo=On(),No=nr(),Po=br(),Fo=gn(),Io=an(),Lo=Yr(),Ro=Xn(),zo=Qt(),Bo=Lr(),Vo=mr(),Ho=Bt(),Uo=Pn(),Wo=jr(),Go=cr(),Ko=Ur(),qo=un(),Jo=ne(),Yo=Fe(),Xo=Dt(),Zo=_t(),Qo=St(),$o=Y(),es=wr(),ts=ae(),ns=P(),rs=ft(),is=nt(),as=z(),os=st(),ss=l(),cs=Si(),ls=Be(),us=ue(),ds=W(),fs=k(),ps=Ae(),ms=be(),hs=he(),gs=Rn(),_s=i(),vs=Un(),ys=Te(),bs=y(),xs=w(),Ss=Ze(),Cs=ai(),ws=m(),Ts=Ke(),Es=di(),Ds=Gt(),Os=_i(),ks=ei(),As=Nt(),js=xn(),Ms=Dn(),Ns=tr(),Ps=yr(),Fs=hn(),Is=rn(),Ls=Jr(),Rs=Yn(),zs=Zt(),Bs=Ir(),Vs=pr(),Hs=zt(),Us=Nn(),Ws=Ar(),Gs=sr(),Ks=Hr(),qs=ln(),Js=t(),Ys=Le(),Xs=kt(),Zs=yt(),Qs=wt(),$s=Z(),ec=Er(),tc=se(),nc=I(),rc=mt(),ic=it(),ac=V(),oc=lt(),sc=d(),cc=wi(),lc=He(),uc=fe(),dc=K(),fc=j(),pc=Me(),mc=Se(),hc=_e(),gc=Bn(),_c=o(),vc=Gn(),yc=De(),bc=x(),xc=E(),Sc=$e(),Cc=si(),wc=g(),Tc=Je(),Ec=pi(),Dc=qt(),Oc=yi(),kc=ni(),Ac=Ft(),jc=Cn(),Mc=kn(),Nc=rr(),Pc=xr(),Fc=_n(),Ic=on(),Lc=Xr(),Rc=Zn(),zc=$t(),Bc=Rr(),Vc=hr(),Hc=Vt(),Uc=Fn(),Wc=Mr(),Gc=lr(),Kc=Wr(),qc=dn(),Jc=ee(),Yc=Ne(),Xc=Tt(),Zc=ht(),Qc=bt(),$c=q(),el=Sr(),tl=re(),nl=M(),rl=ut(),il=et(),al=at(),ol=L(),sl=s(),cl=bi(),ll=Re(),ul=ce(),dl=H(),fl=D(),pl=Oe(),ml=ve(),hl=pe(),gl=In(),_l=n(),vl=Vn(),yl=Ce(),bl=_(),xl=S(),Sl=Ye(),Cl=ri(),wl=f(),Tl=Ue(),El=ci(),Dl=Ht(),Ol=mi(),kl=Zr(),Al=At(),jl=vn(),Ml=wn(),Nl=Qn(),Pl=gr(),Fl=fn(),Il=en(),Ll=Gr(),Rl=Kn(),zl=Jt(),Bl=Nr(),Vl=ur(),Hl=It(),Ul=An(),Wl=Dr(),Gl=ir(),Kl=zr(),ql=new Set([`kizen-k`,`form-entity`]),Jl={phone:Ti.faPhone,envelope:Ei.faEnvelope,"pen-nib":Di.faPenNib,"calendar-days":Oi.faCalendarDays,paperclip:ki.faPaperclip,file:Ai.faFile,clipboard:ji.faClipboard,pen:Mi.faPen,tag:Ni.faTag,book:Pi.faBook,print:Fi.faPrint,"pen-to-square":Ii.faPenToSquare,folder:Li.faFolder,"folder-open":Ri.faFolderOpen,thumbtack:zi.faThumbtack,globe:Bi.faGlobe,city:Vi.faCity,briefcase:Hi.faBriefcase,compass:Ui.faCompass,"address-book":Wi.faAddressBook,"business-time":Gi.faBusinessTime,"computer-classic":Ki.faComputerClassic,"pen-fancy":qi.faPenFancy,"badge-check":Ji.faBadgeCheck,"mug-saucer":Yi.faMugSaucer,landmark:Xi.faLandmark,"chart-simple":Zi.faChartSimple,envelopes:Qi.faEnvelopes,"diagram-venn":$i.faDiagramVenn,calendar:ea.faCalendar,pencil:ta.faPencil,"phone-volume":na.faPhoneVolume,copy:ra.faCopy,table:ia.faTable,building:aa.faBuilding,"network-wired":oa.faNetworkWired,"address-card":sa.faAddressCard,tags:ca.faTags,registered:la.faRegistered,signature:ua.faSignature,"phone-office":Q.faPhoneOffice,projector:da.faProjector,sitemap:fa.faSitemap,marker:pa.faMarker,badge:ma.faBadge,wallet:ha.faWallet,copyright:ga.faCopyright,bullseye:_a.faBullseye,calculator:va.faCalculator,certificate:ya.faCertificate,percent:ba.faPercent,eraser:xa.faEraser,"file-spreadsheet":Sa.faFileSpreadsheet,glasses:Ca.faGlasses,industry:wa.faIndustry,vault:Ta.faVault,"user-tie-hair-long":Ea.faUserTieHairLong,"user-tie-hair":Da.faUserTieHair,"user-hair-mullet":Oa.faUserHairMullet,trademark:ka.faTrademark,"timeline-arrow":Aa.faTimelineArrow,timeline:ja.faTimeline,"table-tree":Ma.faTableTree,"table-rows":Na.faTableRows,"table-pivot":Pa.faTablePivot,"table-layout":Fa.faTableLayout,"table-columns":Ia.faTableColumns,stapler:La.faStapler,"square-poll-vertical":Ra.faSquarePollVertical,"square-poll-horizontal":za.faSquarePollHorizontal,"square-phone-flip":Ba.faSquarePhoneFlip,"square-phone":Va.faSquarePhone,"square-pen":Ha.faSquarePen,"square-kanban":Ua.faSquareKanban,"square-envelope":Wa.faSquareEnvelope,socks:Ga.faSocks,"slot-machine":Ka.faSlotMachine,"signature-slash":qa.faSignatureSlash,"signature-lock":Ja.faSignatureLock,shredder:Ya.faShredder,scissors:Xa.faScissors,"scanner-image":Za.faScannerImage,"scale-unbalanced-flip":Qa.faScaleUnbalancedFlip,"scale-unbalanced":$a.faScaleUnbalanced,"scale-balanced":eo.faScaleBalanced,router:to.faRouter,"rectangle-pro":no.faRectanglePro,"print-slash":ro.faPrintSlash,"print-magnifying-glass":io.faPrintMagnifyingGlass,"presentation-screen":ao.faPresentationScreen,podium:oo.faPodium,"phone-slash":so.faPhoneSlash,"phone-intercom":co.faPhoneIntercom,"phone-flip":lo.faPhoneFlip,"person-chalkboard":uo.faPersonChalkboard,"pen-nib-slash":fo.faPenNibSlash,"pen-clip":po.faPenClip,paste:mo.faPaste,"paperclip-vertical":ho.faPaperclipVertical,notebook:go.faNotebook,"note-sticky":_o.faNoteSticky,"money-check-pen":vo.faMoneyCheckPen,"money-check-dollar-pen":yo.faMoneyCheckDollarPen,"magnifying-glass-chart":bo.faMagnifyingGlassChart,"magnifying-glass-arrow-right":xo.faMagnifyingGlassArrowRight,"list-tree":So.faListTree,"list-timeline":Co.faListTimeline,"list-radio":wo.faListRadio,"list-dropdown":To.faListDropdown,"list-check":Eo.faListCheck,"laptop-file":Do.faLaptopFile,"lamp-desk":Oo.faLampDesk,keynote:ko.faKeynote,"industry-windows":Ao.faIndustryWindows,inboxes:jo.faInboxes,"inbox-full":Mo.faInboxFull,"house-laptop":No.faHouseLaptop,highlighter:Po.faHighlighter,folders:Fo.faFolders,"folder-xmark":Io.faFolderXmark,"folder-tree":Lo.faFolderTree,"folder-plus":Ro.faFolderPlus,"folder-minus":zo.faFolderMinus,"folder-arrow-up":Bo.faFolderArrowUp,"folder-arrow-down":Vo.faFolderArrowDown,"floppy-disk-circle-xmark":Ho.faFloppyDiskCircleXmark,"floppy-disk-circle-arrow-right":Uo.faFloppyDiskCircleArrowRight,"floppy-disk":Wo.faFloppyDisk,"file-user":Go.faFileUser,"file-lines":Ko.faFileLines,"file-circle-plus":qo.faFileCirclePlus,"file-circle-info":Jo.faFileCircleInfo,"file-chart-pie":Yo.faFileChartPie,"file-chart-column":Xo.faFileChartColumn,fax:Zo.faFax,"envelope-open":Qo.faEnvelopeOpen,"envelope-dot":$o.faEnvelopeDot,"envelope-circle-check":es.faEnvelopeCircleCheck,"coffee-pot":ts.faCoffeePot,"cloud-word":ns.faCloudWord,"clipboard-question":rs.faClipboardQuestion,"chart-user":is.faChartUser,"chart-tree-map":as.faChartTreeMap,"chart-simple-horizontal":os.faChartSimpleHorizontal,"chart-pyramid":ss.faChartPyramid,"chart-pie-simple":cs.faChartPieSimple,"chart-pie":ls.faChartPie,"chart-line-up":us.faChartLineUp,"chart-line-down":ds.faChartLineDown,"chart-line":fs.faChartLine,"cake-candles":ps.faCakeCandles,"cabinet-filing":ms.faCabinetFiling,bullhorn:hs.faBullhorn,"briefcase-blank":gs.faBriefcaseBlank,"briefcase-arrow-right":_s.faBriefcaseArrowRight,"brain-arrow-curved-right":vs.faBrainArrowCurvedRight,"boxes-packing":ys.faBoxesPacking,"box-archive":bs.faBoxArchive,"book-section":xs.faBookSection,"bars-staggered":Ss.faBarsStaggered,"bars-progress":Cs.faBarsProgress,"badge-percent":ws.faBadgePercent,"badge-dollar":Ts.faBadgeDollar,"arrows-to-eye":Es.faArrowsToEye,"arrows-to-dot":Ds.faArrowsToDot,"arrows-spin":Os.faArrowsSpin,sparkles:ks.faSparkles,megaphone:As.faMegaphone,"block-question":js.faBlockQuestion,"lightbulb-slash":Ms.faLightbulbSlash,"comments-dollar":Ns.faCommentsDollar,comments:Bl.faComments,"bullseye-pointer":Ps.faBullseyePointer,lightbulb:Fs.faLightbulb,"user-group-crown":Is.faUserGroupCrown,"user-crown":Ls.faUserCrown,"signal-stream-slash":Rs.faSignalStreamSlash,"signal-stream":zs.faSignalStream,"rectangle-ad":Bs.faRectangleAd,"ranking-star":Vs.faRankingStar,"person-rays":Hs.faPersonRays,"people-group":Us.faPeopleGroup,"messages-dollar":Ws.faMessagesDollar,"message-dollar":Gs.faMessageDollar,"magnifying-glass-location":Ks.faMagnifyingGlassLocation,"magnifying-glass-dollar":qs.faMagnifyingGlassDollar,"lightbulb-on":Js.faLightbulbOn,"lightbulb-exclamation":Ys.faLightbulbExclamation,"lightbulb-dollar":Xs.faLightbulbDollar,"lightbulb-cfl-on":Zs.faLightbulbCflOn,"lightbulb-cfl":Qs.faLightbulbCfl,"hundred-points":$s.faHundredPoints,"group-arrows-rotate":ec.faGroupArrowsRotate,"gift-card":tc.faGiftCard,"filter-circle-dollar":nc.faFilterCircleDollar,"envelopes-bulk":rc.faEnvelopesBulk,"envelope-open-text":ic.faEnvelopeOpenText,"envelope-open-dollar":ac.faEnvelopeOpenDollar,"comment-dollar":oc.faCommentDollar,"chart-mixed":sc.faChartMixed,"bullseye-arrow":cc.faBullseyeArrow,star:lc.faStar,heart:uc.faHeart,"camera-retro":dc.faCameraRetro,"truck-fast":fc.faTruckFast,bell:pc.faBell,"cart-shopping":mc.faCartShopping,gift:hc.faGift,barcode:gc.faBarcode,bookmark:_c.faBookmark,camera:vc.faCamera,"thumbs-up":yc.faThumbsUp,"thumbs-down":bc.faThumbsDown,key:xc.faKey,truck:Sc.faTruck,balloons:Cc.faBalloons,handshake:wc.faHandshake,shop:Tc.faShop,shirt:Ec.faShirt,"bag-shopping":Dc.faBagShopping,moped:Oc.faMoped,"cart-plus":kc.faCartPlus,"credit-card":Ac.faCreditCard,store:jc.faStore,"cash-register":Mc.faCashRegister,"booth-curtain":Nc.faBoothCurtain,trophy:Pc.faTrophy,receipt:Fc.faReceipt,"truck-container":Ic.faTruckContainer,"truck-clock":Lc.faTruckClock,"truck-bolt":Rc.faTruckBolt,"trophy-star":zc.faTrophyStar,"store-slash":Bc.faStoreSlash,"store-lock":Vc.faStoreLock,"star-exclamation":Hc.faStarExclamation,"shop-slash":Uc.faShopSlash,"shop-lock":Wc.faShopLock,"rectangle-barcode":Gc.faRectangleBarcode,"person-booth":Kc.faPersonBooth,"nfc-trash":qc.faNfcTrash,"nfc-symbol":Jc.faNfcSymbol,"nfc-slash":Yc.faNfcSlash,"nfc-signal":Xc.faNfcSignal,"nfc-pen":Zc.faNfcPen,"nfc-magnifying-glass":Qc.faNfcMagnifyingGlass,"nfc-lock":$c.faNfcLock,nfc:el.faNfc,"money-check-dollar":tl.faMoneyCheckDollar,"money-check":nl.faMoneyCheck,"mobile-signal-out":rl.faMobileSignalOut,"mobile-signal":il.faMobileSignal,"hexagon-vertical-nft-slanted":al.faHexagonVerticalNftSlanted,"hexagon-vertical-nft":ol.faHexagonVerticalNft,"hexagon-image":sl.faHexagonImage,"hand-holding-box":cl.faHandHoldingBox,gifts:ll.faGifts,gem:ul.faGem,"credit-card-front":dl.faCreditCardFront,"credit-card-blank":fl.faCreditCardBlank,"cart-xmark":pl.faCartXmark,"cart-shopping-fast":ml.faCartShoppingFast,"cart-minus":hl.faCartMinus,"cart-circle-xmark":gl.faCartCircleXmark,"cart-circle-plus":_l.faCartCirclePlus,"cart-circle-exclamation":vl.faCartCircleExclamation,"cart-circle-check":yl.faCartCircleCheck,"cart-circle-arrow-up":bl.faCartCircleArrowUp,"cart-circle-arrow-down":xl.faCartCircleArrowDown,"cart-arrow-up":Sl.faCartArrowUp,"cart-arrow-down":Cl.faCartArrowDown,"box-open-full":wl.faBoxOpenFull,"basket-shopping-simple":Tl.faBasketShoppingSimple,"basket-shopping":El.faBasketShopping,"barcode-scan":Dl.faBarcodeScan,"barcode-read":Ol.faBarcodeRead,balloon:kl.faBalloon,"bags-shopping":Al.faBagsShopping,bars:jl.faBars,browser:Ml.faBrowser,"chart-bar":Nl.faChartBar,cog:Pl.faCog,database:Ll.faDatabase,"calendar-alt":Fl.faCalendarAlt,play:Il.faPlay,add:Rl.faAdd,"book-alt":zl.faBookAlt,"arrows-to-circle":Vl.faArrowsToCircle,"question-circle":Hl.faQuestionCircle,"chevron-down":Ul.faChevronDown,"chevron-up":Wl.faChevronUp,"window-restore":Gl.faWindowRestore,forward:Kl.faForward},$=new Set(`phone.envelope.pen-nib.calendar-days.paperclip.file.clipboard.pen.tag.book.print.pen-to-square.folder.folder-open.thumbtack.globe.city.briefcase.compass.address-book.business-time.computer-classic.pen-fancy.badge-check.mug-saucer.landmark.chart-simple.envelopes.diagram-venn.calendar.pencil.phone-volume.copy.table.building.network-wired.address-card.tags.registered.signature.phone-office.projector.sitemap.marker.badge.wallet.copyright.bullseye.calculator.certificate.percent.eraser.file-spreadsheet.glasses.industry.vault.user-tie-hair-long.user-tie-hair.user-hair-mullet.trademark.timeline-arrow.timeline.table-tree.table-rows.table-pivot.table-layout.table-columns.stapler.square-poll-vertical.square-poll-horizontal.square-phone-flip.square-phone.square-pen.square-kanban.square-envelope.socks.slot-machine.signature-slash.signature-lock.shredder.scissors.scanner-image.scale-unbalanced-flip.scale-unbalanced.scale-balanced.router.rectangle-pro.print-slash.print-magnifying-glass.presentation-screen.podium.phone-slash.phone-intercom.phone-flip.person-chalkboard.pen-nib-slash.pen-clip.paste.paperclip-vertical.notebook.note-sticky.money-check-pen.money-check-dollar-pen.magnifying-glass-chart.magnifying-glass-arrow-right.list-tree.list-timeline.list-radio.list-dropdown.list-check.laptop-file.lamp-desk.keynote.industry-windows.inboxes.inbox-full.house-laptop.highlighter.folders.folder-xmark.folder-tree.folder-plus.folder-minus.folder-arrow-up.folder-arrow-down.floppy-disk-circle-xmark.floppy-disk-circle-arrow-right.floppy-disk.file-user.file-lines.file-circle-plus.file-circle-info.file-chart-pie.file-chart-column.fax.envelope-open.envelope-dot.envelope-circle-check.coffee-pot.cloud-word.clipboard-question.chart-user.chart-tree-map.chart-simple-horizontal.chart-pyramid.chart-pie-simple.chart-pie.chart-line-up.chart-line-down.chart-line.cake-candles.cabinet-filing.bullhorn.briefcase-blank.briefcase-arrow-right.brain-arrow-curved-right.boxes-packing.box-archive.book-section.bars-staggered.bars-progress.badge-percent.badge-dollar.arrows-to-eye.arrows-to-dot.arrows-spin.sparkles.megaphone.block-question.lightbulb-slash.comments-dollar.comments.bullseye-pointer.lightbulb.user-group-crown.user-crown.signal-stream-slash.signal-stream.rectangle-ad.ranking-star.person-rays.people-group.messages-dollar.message-dollar.magnifying-glass-location.magnifying-glass-dollar.lightbulb-on.lightbulb-exclamation.lightbulb-dollar.lightbulb-cfl-on.lightbulb-cfl.hundred-points.group-arrows-rotate.gift-card.filter-circle-dollar.envelopes-bulk.envelope-open-text.envelope-open-dollar.comment-dollar.chart-mixed.bullseye-arrow.star.heart.camera-retro.truck-fast.bell.cart-shopping.gift.barcode.bookmark.camera.thumbs-up.thumbs-down.key.truck.balloons.handshake.shop.shirt.bag-shopping.moped.cart-plus.credit-card.store.cash-register.booth-curtain.trophy.receipt.truck-container.truck-clock.truck-bolt.trophy-star.store-slash.store-lock.star-exclamation.shop-slash.shop-lock.rectangle-barcode.person-booth.nfc-trash.nfc-symbol.nfc-slash.nfc-signal.nfc-pen.nfc-magnifying-glass.nfc-lock.nfc.money-check-dollar.money-check.mobile-signal-out.mobile-signal.hexagon-vertical-nft-slanted.hexagon-vertical-nft.hexagon-image.hand-holding-box.gifts.gem.credit-card-front.credit-card-blank.cart-xmark.cart-shopping-fast.cart-minus.cart-circle-xmark.cart-circle-plus.cart-circle-exclamation.cart-circle-check.cart-circle-arrow-up.cart-circle-arrow-down.cart-arrow-up.cart-arrow-down.box-open-full.basket-shopping-simple.basket-shopping.barcode-scan.barcode-read.balloon.bags-shopping.bars.browser.chart-bar.cog.database.calendar-alt.play.kizen-k.add.book-alt.form-entity.arrows-to-circle.question-circle.chevron-down.chevron-up.window-restore.forward`.split(`.`)),Yl=[...$].sort();export{Jl as i,Yl as n,ql as r,$ as t};
|
package/dist/viewer/index.html
CHANGED
|
@@ -6,17 +6,19 @@
|
|
|
6
6
|
<title>Kizen App Development Toolkit</title>
|
|
7
7
|
<link rel="icon" href="/favicon.png" type="image/png" />
|
|
8
8
|
<link rel="manifest" href="/manifest.json" />
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-CjU7OUke.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-DF2fYuay.js">
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/fa-core-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/BootstrapContext-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
19
|
-
<link rel="
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/fa-core-BoBqCOD3.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/useQuery-5OkVbV1s.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/react-csXWLXSE.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/BootstrapContext-D5ZnMrOp.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/bundleQuery-CjbA01rb.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/useNavigate-BblEmQ3O.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/storageKeys-ClzdCxlg.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/SidebarContext-Cn8QRb77.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/assets/api-C5Iu-4AS.js">
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/Card-BpDJPrPZ.js">
|
|
21
|
+
<link rel="stylesheet" crossorigin href="/assets/index-dW-Omils.css">
|
|
20
22
|
</head>
|
|
21
23
|
<body>
|
|
22
24
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kizenapps/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "CLI tool for running Kizen plugin apps locally",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"type": "module",
|
|
@@ -23,10 +23,11 @@
|
|
|
23
23
|
"lint:fix": "eslint src viewer/src --fix",
|
|
24
24
|
"format": "prettier --write .",
|
|
25
25
|
"format:check": "prettier --check .",
|
|
26
|
-
"start": "appbuilder"
|
|
26
|
+
"start": "appbuilder",
|
|
27
|
+
"prepublishOnly": "pnpm run typecheck && pnpm run lint && pnpm run build"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@kizenapps/engine": "
|
|
30
|
+
"@kizenapps/engine": "0.3.1-91391f3",
|
|
30
31
|
"@kizenapps/packager": "^0.1.0",
|
|
31
32
|
"chrome-launcher": "^1.2.1",
|
|
32
33
|
"chrome-remote-interface": "^0.34.0",
|
|
@@ -39,10 +40,7 @@
|
|
|
39
40
|
"pnpm": {
|
|
40
41
|
"onlyBuiltDependencies": [
|
|
41
42
|
"esbuild"
|
|
42
|
-
]
|
|
43
|
-
"allowedDeprecatedVersions": {
|
|
44
|
-
"boolean": "3.2.0"
|
|
45
|
-
}
|
|
43
|
+
]
|
|
46
44
|
},
|
|
47
45
|
"devDependencies": {
|
|
48
46
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|