aiex-cli 0.0.1-beta.28 → 0.0.1-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +151 -26
- package/dist/core/schema-sqlite/migrate-helper.mjs +15 -28
- package/dist/{doctor-collector-D2q6iD_e.mjs → doctor-collector-j2dG7dG1.mjs} +41 -4
- package/dist/index.mjs +1 -1
- package/dist/web/assets/AISettings-Dn58ZHhM.js +339 -0
- package/dist/web/assets/DataBrowser-B6WECCZM.js +6 -0
- package/dist/web/assets/{ExtractionViewer-WMUdXeyU.js → ExtractionViewer-CTS1RXzc.js} +1 -1
- package/dist/web/assets/JsonSchemaEditor-Dpgu6HPz.js +570 -0
- package/dist/web/assets/api-client-CbQEkaKT.js +1 -0
- package/dist/web/assets/dialog-CUkPLPNP.js +109 -0
- package/dist/web/assets/{index-CuOQk7nB.js → index-g2pWXPQZ.js} +38 -38
- package/dist/web/assets/object-utils-DPPzLQjH.js +1 -0
- package/dist/web/assets/select-DyjIzt-v.js +439 -0
- package/dist/web/index.html +5 -5
- package/package.json +5 -1
- package/src/core/schema-sqlite/migrate-helper.ts +15 -40
- package/dist/web/assets/AISettings-DFi-nXIi.js +0 -334
- package/dist/web/assets/DataBrowser-BWSX8O2h.js +0 -5
- package/dist/web/assets/JsonSchemaEditor-B57coz1O.js +0 -929
- package/dist/web/assets/api-client-By2rWtpv.js +0 -1
- package/dist/web/assets/dialog-dMXSeJQQ.js +0 -108
- package/dist/web/assets/overlayeventbus-CRKW6UCj.js +0 -80
- package/dist/web/assets/table-schema-C90NJyfq.js +0 -2
- /package/dist/web/assets/{runtime-dom.esm-bundler-DmdkgxQM.js → runtime-dom.esm-bundler-ei_N7Xjw.js} +0 -0
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/editor.main-C2Q97Dkk.js","assets/preload-helper-DWTEM3RW.js","assets/editor.api-nsOUOZde.js","assets/chunk-DtRyYLXJ.js","assets/editor-BR-TvLsg.css","assets/monaco.contribution-BTr-G8hO.js","assets/editor-DPKWm9GW.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./chunk-DtRyYLXJ.js";import{$t as t,B as n,D as r,Fn as i,G as a,H as o,It as s,K as c,L as l,Lt as u,M as d,Mn as f,Pt as p,Q as m,R as h,S as g,Sn as _,Tn as v,U as y,V as b,W as ee,Y as x,Z as S,Zt as C,_ as w,a as te,b as ne,c as T,cn as re,d as E,dt as ie,et as D,g as O,h as k,ht as A,i as j,j as ae,jn as oe,k as se,lt as M,m as N,n as P,nt as F,on as ce,ot as I,pn as le,qt as ue,rn as de,rt as fe,st as pe,t as me,tn as he,v as L,w as R,wn as ge,x as z,yn as _e}from"./button-Cdgr9Igy.js";import{r as ve,t as ye}from"./dialog-CUkPLPNP.js";import{i as be,o as xe}from"./runtime-dom.esm-bundler-ei_N7Xjw.js";import{r as Se,t as Ce}from"./object-utils-DPPzLQjH.js";import{t as we}from"./preload-helper-DWTEM3RW.js";import{a as Te,i as Ee,r as De,t as Oe}from"./select-DyjIzt-v.js";var ke=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ae={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},je=({size:e,strokeWidth:t=2,absoluteStrokeWidth:n,color:i,iconNode:a,name:o,class:s,...c},{slots:l})=>r(`svg`,{...Ae,width:e||Ae.width,height:e||Ae.height,stroke:i||Ae.stroke,"stroke-width":n?Number(t)*24/Number(e):t,class:[`lucide`,`lucide-${ke(o??`icon`)}`],...c},[...a.map(e=>r(...e)),...l.default?[l.default()]:[]]),Me=(e,t)=>(n,{slots:i})=>r(je,{...n,iconNode:t,name:e},i),Ne=Me(`ChevronDownIcon`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Pe=Me(`ChevronRightIcon`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Fe=Me(`CircleHelpIcon`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Ie=Me(`CirclePlusIcon`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),Le=Me(`DownloadIcon`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),Re=Me(`FileJsonIcon`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),ze=Me(`InfoIcon`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Be=Me(`Maximize2Icon`,[[`polyline`,{points:`15 3 21 3 21 9`,key:`mznyad`}],[`polyline`,{points:`9 21 3 21 3 15`,key:`1avn1i`}],[`line`,{x1:`21`,x2:`14`,y1:`3`,y2:`10`,key:`ota7mn`}],[`line`,{x1:`3`,x2:`10`,y1:`21`,y2:`14`,key:`1atl0r`}]]),Ve=Me(`XIcon`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),He=T.extend({name:`tabpanel`,classes:{root:function(e){return[`p-tabpanel`,{"p-tabpanel-active":e.instance.active}]}}}),Ue={name:`TabPanel`,extends:{name:`BaseTabPanel`,extends:te,props:{value:{type:[String,Number],default:void 0},as:{type:[String,Object],default:`DIV`},asChild:{type:Boolean,default:!1},header:null,headerStyle:null,headerClass:null,headerProps:null,headerActionProps:null,contentStyle:null,contentClass:null,contentProps:null,disabled:Boolean},style:He,provide:function(){return{$pcTabPanel:this,$parentInstance:this}}},inheritAttrs:!1,inject:[`$pcTabs`],computed:{active:function(){return oe(this.$pcTabs?.d_value,this.value)},id:function(){return`${this.$pcTabs?.$id}_tabpanel_${this.value}`},ariaLabelledby:function(){return`${this.$pcTabs?.$id}_tab_${this.value}`},attrs:function(){return d(this.a11yAttrs,this.ptmi(`root`,this.ptParams))},a11yAttrs:function(){return{id:this.id,tabindex:this.$pcTabs?.tabindex,role:`tabpanel`,"aria-labelledby":this.ariaLabelledby,"data-pc-name":`tabpanel`,"data-p-active":this.active}},ptParams:function(){return{context:{active:this.active}}}}};function We(e,t,r,i,a,o){var s,l;return o.$pcTabs?(n(),L(E,{key:1},[e.asChild?y(e.$slots,`default`,{key:1,class:p(e.cx(`root`)),active:o.active,a11yAttrs:o.a11yAttrs}):(n(),L(E,{key:0},[!((s=o.$pcTabs)!=null&&s.lazy)||o.active?fe((n(),O(c(e.as),d({key:0,class:e.cx(`root`)},o.attrs),{default:F(function(){return[y(e.$slots,`default`)]}),_:3},16,[`class`])),[[xe,(l=o.$pcTabs)!=null&&l.lazy?!0:o.active]]):w(``,!0)],64))],64)):y(e.$slots,`default`,{key:0})}Ue.render=We;var Ge=T.extend({name:`tab`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-tab`,{"p-tab-active":t.active,"p-disabled":n.disabled}]}}}),Ke={name:`Tab`,extends:{name:`BaseTab`,extends:te,props:{value:{type:[String,Number],default:void 0},disabled:{type:Boolean,default:!1},as:{type:[String,Object],default:`BUTTON`},asChild:{type:Boolean,default:!1}},style:Ge,provide:function(){return{$pcTab:this,$parentInstance:this}}},inheritAttrs:!1,inject:[`$pcTabs`,`$pcTabList`],methods:{onFocus:function(){this.$pcTabs.selectOnFocus&&this.changeActiveValue()},onClick:function(){this.changeActiveValue()},onKeydown:function(e){switch(e.code){case`ArrowRight`:this.onArrowRightKey(e);break;case`ArrowLeft`:this.onArrowLeftKey(e);break;case`Home`:this.onHomeKey(e);break;case`End`:this.onEndKey(e);break;case`PageDown`:this.onPageDownKey(e);break;case`PageUp`:this.onPageUpKey(e);break;case`Enter`:case`NumpadEnter`:case`Space`:this.onEnterKey(e);break}},onArrowRightKey:function(e){var t=this.findNextTab(e.currentTarget);t?this.changeFocusedTab(e,t):this.onHomeKey(e),e.preventDefault()},onArrowLeftKey:function(e){var t=this.findPrevTab(e.currentTarget);t?this.changeFocusedTab(e,t):this.onEndKey(e),e.preventDefault()},onHomeKey:function(e){var t=this.findFirstTab();this.changeFocusedTab(e,t),e.preventDefault()},onEndKey:function(e){var t=this.findLastTab();this.changeFocusedTab(e,t),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.findLastTab()),e.preventDefault()},onPageUpKey:function(e){this.scrollInView(this.findFirstTab()),e.preventDefault()},onEnterKey:function(e){this.changeActiveValue()},findNextTab:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1]?e:e.nextElementSibling;return t?he(t,`data-p-disabled`)||he(t,`data-pc-section`)===`activebar`?this.findNextTab(t):ge(t,`[data-pc-name="tab"]`):null},findPrevTab:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1]?e:e.previousElementSibling;return t?he(t,`data-p-disabled`)||he(t,`data-pc-section`)===`activebar`?this.findPrevTab(t):ge(t,`[data-pc-name="tab"]`):null},findFirstTab:function(){return this.findNextTab(this.$pcTabList.$refs.tabs.firstElementChild,!0)},findLastTab:function(){return this.findPrevTab(this.$pcTabList.$refs.tabs.lastElementChild,!0)},changeActiveValue:function(){this.$pcTabs.updateValue(this.value)},changeFocusedTab:function(e,t){le(t),this.scrollInView(t)},scrollInView:function(e){var t;e==null||(t=e.scrollIntoView)==null||t.call(e,{block:`nearest`})}},computed:{active:function(){return oe(this.$pcTabs?.d_value,this.value)},id:function(){return`${this.$pcTabs?.$id}_tab_${this.value}`},ariaControls:function(){return`${this.$pcTabs?.$id}_tabpanel_${this.value}`},attrs:function(){return d(this.asAttrs,this.a11yAttrs,this.ptmi(`root`,this.ptParams))},asAttrs:function(){return this.as===`BUTTON`?{type:`button`,disabled:this.disabled}:void 0},a11yAttrs:function(){return{id:this.id,tabindex:this.active?this.$pcTabs.tabindex:-1,role:`tab`,"aria-selected":this.active,"aria-controls":this.ariaControls,"data-pc-name":`tab`,"data-p-disabled":this.disabled,"data-p-active":this.active,onFocus:this.onFocus,onKeydown:this.onKeydown}},ptParams:function(){return{context:{active:this.active}}},dataP:function(){return v({active:this.active})}},directives:{ripple:P}};function qe(e,t,r,i,o,s){var l=a(`ripple`);return e.asChild?y(e.$slots,`default`,{key:1,dataP:s.dataP,class:p(e.cx(`root`)),active:s.active,a11yAttrs:s.a11yAttrs,onClick:s.onClick}):fe((n(),O(c(e.as),d({key:0,class:e.cx(`root`),"data-p":s.dataP,onClick:s.onClick},s.attrs),{default:F(function(){return[y(e.$slots,`default`)]}),_:3},16,[`class`,`data-p`,`onClick`])),[[l]])}Ke.render=qe;var Je={name:`ChevronLeftIcon`,extends:j};function Ye(e){return $e(e)||Qe(e)||Ze(e)||Xe()}function Xe(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ze(e,t){if(e){if(typeof e==`string`)return et(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?et(e,t):void 0}}function Qe(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function $e(e){if(Array.isArray(e))return et(e)}function et(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tt(e,t,r,i,a,o){return n(),L(`svg`,d({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),Ye(t[0]||=[k(`path`,{d:`M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z`,fill:`currentColor`},null,-1)]),16)}Je.render=tt;var nt={name:`ChevronRightIcon`,extends:j};function rt(e){return st(e)||ot(e)||at(e)||it()}function it(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function at(e,t){if(e){if(typeof e==`string`)return ct(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(e,t):void 0}}function ot(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function st(e){if(Array.isArray(e))return ct(e)}function ct(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lt(e,t,r,i,a,o){return n(),L(`svg`,d({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),rt(t[0]||=[k(`path`,{d:`M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z`,fill:`currentColor`},null,-1)]),16)}nt.render=lt;var ut={name:`TabList`,extends:{name:`BaseTabList`,extends:te,props:{},style:T.extend({name:`tablist`,classes:{root:`p-tablist`,content:`p-tablist-content p-tablist-viewport`,tabList:`p-tablist-tab-list`,activeBar:`p-tablist-active-bar`,prevButton:`p-tablist-prev-button p-tablist-nav-button`,nextButton:`p-tablist-next-button p-tablist-nav-button`}}),provide:function(){return{$pcTabList:this,$parentInstance:this}}},inheritAttrs:!1,inject:[`$pcTabs`],data:function(){return{isPrevButtonEnabled:!1,isNextButtonEnabled:!0}},resizeObserver:void 0,inkBarObserver:void 0,watch:{showNavigators:function(e){e?this.bindResizeObserver():this.unbindResizeObserver()},activeValue:{flush:`post`,handler:function(){this.updateInkBar(),this.bindInkBarObserver()}}},mounted:function(){var e=this;setTimeout(function(){e.updateInkBar(),e.bindInkBarObserver()},150),this.showNavigators&&(this.updateButtonState(),this.bindResizeObserver())},updated:function(){this.showNavigators&&this.updateButtonState()},beforeUnmount:function(){this.unbindResizeObserver(),this.unbindInkBarObserver()},methods:{onScroll:function(e){this.showNavigators&&this.updateButtonState(),e.preventDefault()},onPrevButtonClick:function(){var e=this.$refs.content,t=this.getVisibleButtonWidths(),n=de(e)-t,r=Math.abs(e.scrollLeft)-n*.8,i=Math.max(r,0);e.scrollLeft=re(e)?-1*i:i},onNextButtonClick:function(){var e=this.$refs.content,t=this.getVisibleButtonWidths(),n=de(e)-t,r=Math.abs(e.scrollLeft)+n*.8,i=e.scrollWidth-n,a=Math.min(r,i);e.scrollLeft=re(e)?-1*a:a},bindResizeObserver:function(){var e=this;this.resizeObserver=new ResizeObserver(function(){return e.updateButtonState()}),this.resizeObserver.observe(this.$refs.list)},unbindResizeObserver:function(){var e;(e=this.resizeObserver)==null||e.unobserve(this.$refs.list),this.resizeObserver=void 0},bindInkBarObserver:function(){var e=this;this.unbindInkBarObserver();var t=this.$refs.content,n=ge(t,`[data-pc-name="tab"][data-p-active="true"]`);n&&(this.inkBarObserver=new ResizeObserver(function(){return e.updateInkBar()}),this.inkBarObserver.observe(n))},unbindInkBarObserver:function(){var e;(e=this.inkBarObserver)==null||e.disconnect(),this.inkBarObserver=void 0},updateInkBar:function(){var e=this.$refs,t=e.content,n=e.inkbar,r=e.tabs;if(n){var i=ge(t,`[data-pc-name="tab"][data-p-active="true"]`);this.$pcTabs.isVertical()?(n.style.height=ue(i)+`px`,n.style.top=C(i).top-C(r).top+`px`):(n.style.width=_(i)+`px`,n.style.left=C(i).left-C(r).left+`px`)}},updateButtonState:function(){var e=this.$refs,t=e.list,n=e.content,r=n.scrollTop,i=n.scrollWidth,a=n.scrollHeight,o=n.offsetWidth,s=n.offsetHeight,c=Math.abs(n.scrollLeft),l=[de(n),ce(n)],u=l[0],d=l[1];this.$pcTabs.isVertical()?(this.isPrevButtonEnabled=r!==0,this.isNextButtonEnabled=t.offsetHeight>=s&&parseInt(r)!==a-d):(this.isPrevButtonEnabled=c!==0,this.isNextButtonEnabled=t.offsetWidth>=o&&parseInt(c)!==i-u)},getVisibleButtonWidths:function(){var e=this.$refs,t=e.prevButton,n=e.nextButton,r=0;return this.showNavigators&&(r=(t?.offsetWidth||0)+(n?.offsetWidth||0)),r}},computed:{templates:function(){return this.$pcTabs.$slots},activeValue:function(){return this.$pcTabs.d_value},showNavigators:function(){return this.$pcTabs.showNavigators},prevButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.previous:void 0},nextButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.next:void 0},dataP:function(){return v({scrollable:this.$pcTabs.scrollable})}},components:{ChevronLeftIcon:Je,ChevronRightIcon:nt},directives:{ripple:P}},dt=[`data-p`],ft=[`aria-label`,`tabindex`],pt=[`data-p`],mt=[`aria-orientation`],ht=[`aria-label`,`tabindex`];function gt(e,t,r,i,o,s){var l=a(`ripple`);return n(),L(`div`,d({ref:`list`,class:e.cx(`root`),"data-p":s.dataP},e.ptmi(`root`)),[s.showNavigators&&o.isPrevButtonEnabled?fe((n(),L(`button`,d({key:0,ref:`prevButton`,type:`button`,class:e.cx(`prevButton`),"aria-label":s.prevButtonAriaLabel,tabindex:s.$pcTabs.tabindex,onClick:t[0]||=function(){return s.onPrevButtonClick&&s.onPrevButtonClick.apply(s,arguments)}},e.ptm(`prevButton`),{"data-pc-group-section":`navigator`}),[(n(),O(c(s.templates.previcon||`ChevronLeftIcon`),d({"aria-hidden":`true`},e.ptm(`prevIcon`)),null,16))],16,ft)),[[l]]):w(``,!0),k(`div`,d({ref:`content`,class:e.cx(`content`),onScroll:t[1]||=function(){return s.onScroll&&s.onScroll.apply(s,arguments)},"data-p":s.dataP},e.ptm(`content`)),[k(`div`,d({ref:`tabs`,class:e.cx(`tabList`),role:`tablist`,"aria-orientation":s.$pcTabs.orientation||`horizontal`},e.ptm(`tabList`)),[y(e.$slots,`default`),k(`span`,d({ref:`inkbar`,class:e.cx(`activeBar`),role:`presentation`,"aria-hidden":`true`},e.ptm(`activeBar`)),null,16)],16,mt)],16,pt),s.showNavigators&&o.isNextButtonEnabled?fe((n(),L(`button`,d({key:1,ref:`nextButton`,type:`button`,class:e.cx(`nextButton`),"aria-label":s.nextButtonAriaLabel,tabindex:s.$pcTabs.tabindex,onClick:t[2]||=function(){return s.onNextButtonClick&&s.onNextButtonClick.apply(s,arguments)}},e.ptm(`nextButton`),{"data-pc-group-section":`navigator`}),[(n(),O(c(s.templates.nexticon||`ChevronRightIcon`),d({"aria-hidden":`true`},e.ptm(`nextIcon`)),null,16))],16,ht)),[[l]]):w(``,!0)],16,dt)}ut.render=gt;var _t={name:`TabPanels`,extends:{name:`BaseTabPanels`,extends:te,props:{},style:T.extend({name:`tabpanels`,classes:{root:`p-tabpanels`}}),provide:function(){return{$pcTabPanels:this,$parentInstance:this}}},inheritAttrs:!1};function vt(e,t,r,i,a,o){return n(),L(`div`,d({class:e.cx(`root`),role:`presentation`},e.ptmi(`root`)),[y(e.$slots,`default`)],16)}_t.render=vt;var yt=T.extend({name:`tabs`,style:`
|
|
5
|
+
.p-tabs {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.p-tablist {
|
|
11
|
+
display: flex;
|
|
12
|
+
position: relative;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
background: dt('tabs.tablist.background');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.p-tablist-viewport {
|
|
18
|
+
overflow-x: auto;
|
|
19
|
+
overflow-y: hidden;
|
|
20
|
+
scroll-behavior: smooth;
|
|
21
|
+
scrollbar-width: none;
|
|
22
|
+
overscroll-behavior: contain auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.p-tablist-viewport::-webkit-scrollbar {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.p-tablist-tab-list {
|
|
30
|
+
position: relative;
|
|
31
|
+
display: flex;
|
|
32
|
+
border-style: solid;
|
|
33
|
+
border-color: dt('tabs.tablist.border.color');
|
|
34
|
+
border-width: dt('tabs.tablist.border.width');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.p-tablist-content {
|
|
38
|
+
flex-grow: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.p-tablist-nav-button {
|
|
42
|
+
all: unset;
|
|
43
|
+
position: absolute !important;
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
inset-block-start: 0;
|
|
46
|
+
z-index: 2;
|
|
47
|
+
height: 100%;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
background: dt('tabs.nav.button.background');
|
|
52
|
+
color: dt('tabs.nav.button.color');
|
|
53
|
+
width: dt('tabs.nav.button.width');
|
|
54
|
+
transition:
|
|
55
|
+
color dt('tabs.transition.duration'),
|
|
56
|
+
outline-color dt('tabs.transition.duration'),
|
|
57
|
+
box-shadow dt('tabs.transition.duration');
|
|
58
|
+
box-shadow: dt('tabs.nav.button.shadow');
|
|
59
|
+
outline-color: transparent;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.p-tablist-nav-button:focus-visible {
|
|
64
|
+
z-index: 1;
|
|
65
|
+
box-shadow: dt('tabs.nav.button.focus.ring.shadow');
|
|
66
|
+
outline: dt('tabs.nav.button.focus.ring.width') dt('tabs.nav.button.focus.ring.style') dt('tabs.nav.button.focus.ring.color');
|
|
67
|
+
outline-offset: dt('tabs.nav.button.focus.ring.offset');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.p-tablist-nav-button:hover {
|
|
71
|
+
color: dt('tabs.nav.button.hover.color');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.p-tablist-prev-button {
|
|
75
|
+
inset-inline-start: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.p-tablist-next-button {
|
|
79
|
+
inset-inline-end: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.p-tablist-prev-button:dir(rtl),
|
|
83
|
+
.p-tablist-next-button:dir(rtl) {
|
|
84
|
+
transform: rotate(180deg);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.p-tab {
|
|
88
|
+
flex-shrink: 0;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
user-select: none;
|
|
91
|
+
position: relative;
|
|
92
|
+
border-style: solid;
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
gap: dt('tabs.tab.gap');
|
|
95
|
+
background: dt('tabs.tab.background');
|
|
96
|
+
border-width: dt('tabs.tab.border.width');
|
|
97
|
+
border-color: dt('tabs.tab.border.color');
|
|
98
|
+
color: dt('tabs.tab.color');
|
|
99
|
+
padding: dt('tabs.tab.padding');
|
|
100
|
+
font-weight: dt('tabs.tab.font.weight');
|
|
101
|
+
transition:
|
|
102
|
+
background dt('tabs.transition.duration'),
|
|
103
|
+
border-color dt('tabs.transition.duration'),
|
|
104
|
+
color dt('tabs.transition.duration'),
|
|
105
|
+
outline-color dt('tabs.transition.duration'),
|
|
106
|
+
box-shadow dt('tabs.transition.duration');
|
|
107
|
+
margin: dt('tabs.tab.margin');
|
|
108
|
+
outline-color: transparent;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.p-tab:not(.p-disabled):focus-visible {
|
|
112
|
+
z-index: 1;
|
|
113
|
+
box-shadow: dt('tabs.tab.focus.ring.shadow');
|
|
114
|
+
outline: dt('tabs.tab.focus.ring.width') dt('tabs.tab.focus.ring.style') dt('tabs.tab.focus.ring.color');
|
|
115
|
+
outline-offset: dt('tabs.tab.focus.ring.offset');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.p-tab:not(.p-tab-active):not(.p-disabled):hover {
|
|
119
|
+
background: dt('tabs.tab.hover.background');
|
|
120
|
+
border-color: dt('tabs.tab.hover.border.color');
|
|
121
|
+
color: dt('tabs.tab.hover.color');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.p-tab-active {
|
|
125
|
+
background: dt('tabs.tab.active.background');
|
|
126
|
+
border-color: dt('tabs.tab.active.border.color');
|
|
127
|
+
color: dt('tabs.tab.active.color');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.p-tabpanels {
|
|
131
|
+
background: dt('tabs.tabpanel.background');
|
|
132
|
+
color: dt('tabs.tabpanel.color');
|
|
133
|
+
padding: dt('tabs.tabpanel.padding');
|
|
134
|
+
outline: 0 none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.p-tabpanel:focus-visible {
|
|
138
|
+
box-shadow: dt('tabs.tabpanel.focus.ring.shadow');
|
|
139
|
+
outline: dt('tabs.tabpanel.focus.ring.width') dt('tabs.tabpanel.focus.ring.style') dt('tabs.tabpanel.focus.ring.color');
|
|
140
|
+
outline-offset: dt('tabs.tabpanel.focus.ring.offset');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.p-tablist-active-bar {
|
|
144
|
+
z-index: 1;
|
|
145
|
+
display: block;
|
|
146
|
+
position: absolute;
|
|
147
|
+
inset-block-end: dt('tabs.active.bar.bottom');
|
|
148
|
+
height: dt('tabs.active.bar.height');
|
|
149
|
+
background: dt('tabs.active.bar.background');
|
|
150
|
+
transition: 250ms cubic-bezier(0.35, 0, 0.25, 1);
|
|
151
|
+
}
|
|
152
|
+
`,classes:{root:function(e){return[`p-tabs p-component`,{"p-tabs-scrollable":e.props.scrollable}]}}}),bt={name:`Tabs`,extends:{name:`BaseTabs`,extends:te,props:{value:{type:[String,Number],default:void 0},lazy:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},showNavigators:{type:Boolean,default:!0},tabindex:{type:Number,default:0},selectOnFocus:{type:Boolean,default:!1}},style:yt,provide:function(){return{$pcTabs:this,$parentInstance:this}}},inheritAttrs:!1,emits:[`update:value`],data:function(){return{d_value:this.value}},watch:{value:function(e){this.d_value=e}},methods:{updateValue:function(e){this.d_value!==e&&(this.d_value=e,this.$emit(`update:value`,e))},isVertical:function(){return this.orientation===`vertical`}}};function xt(e,t,r,i,a,o){return n(),L(`div`,d({class:e.cx(`root`)},e.ptmi(`root`)),[y(e.$slots,`default`)],16)}bt.render=xt;var St=R({__name:`Tabs`,props:ae({tabs:{},class:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,r=m(e,`modelValue`);D(()=>t.tabs,e=>{r.value===void 0&&e.length>0&&(r.value=e[0].value)},{immediate:!0});let i=N({get:()=>r.value??``,set:e=>{r.value=e}});return(t,r)=>(n(),O(A(bt),{value:i.value,"onUpdate:value":r[0]||=e=>i.value=e,class:p(t.$props.class)},{default:F(()=>[g(A(ut),{pt:{root:{class:`shrink-0`}}},{default:F(()=>[(n(!0),L(E,null,o(e.tabs,e=>(n(),O(A(Ke),{key:e.value,value:e.value},{default:F(()=>[z(u(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1}),g(A(_t),{pt:{root:{class:`flex flex-1 min-h-0 w-full flex-col`}}},{default:F(()=>[y(t.$slots,`default`)]),_:3})]),_:3},8,[`value`,`class`]))}}),Ct={collapse:`Collapse`,expand:`Expand`,fieldDescriptionPlaceholder:`Describe the purpose of this field`,fieldDelete:`Delete field`,fieldDescription:`Description`,fieldDescriptionTooltip:`Add context about what this field represents`,fieldNameLabel:`Field Name`,fieldNamePlaceholder:`e.g. firstName, age, isActive`,fieldNameTooltip:`Use camelCase for better readability (e.g., firstName)`,fieldRequiredLabel:`Required Field`,fieldType:`Field Type`,fieldTypeExample:`Example:`,fieldTypeTooltipString:`string: Text`,fieldTypeTooltipNumber:`number: Numeric`,fieldTypeTooltipBoolean:`boolean: True/false`,fieldTypeTooltipObject:`object: Nested JSON`,fieldTypeTooltipArray:`array: Lists of values`,fieldAddNewButton:`Add Field`,fieldAddNewBadge:`Schema Builder`,fieldAddNewCancel:`Cancel`,fieldAddNewConfirm:`Add Field`,fieldAddNewDescription:`Create a new field for your JSON schema`,fieldAddNewLabel:`Add New Field`,fieldTypeTextLabel:`Text`,fieldTypeTextDescription:`For text values like names, descriptions, etc.`,fieldTypeIntegerLabel:`Integer`,fieldTypeIntegerDescription:`For whole numbers, primary keys, auto increment`,fieldTypeNumberLabel:`Real`,fieldTypeNumberDescription:`For decimal/floating point numbers`,fieldTypeBooleanLabel:`Yes/No`,fieldTypeBooleanDescription:`For true/false values`,fieldTypeObjectLabel:`Group`,fieldTypeObjectDescription:`For grouping related fields together`,fieldTypeArrayLabel:`List`,fieldTypeArrayDescription:`For collections of items`,propertyDescriptionPlaceholder:`Add description...`,propertyDescriptionButton:`Add description...`,propertyRequired:`Required`,propertyOptional:`Optional`,propertyDelete:`Delete field`,schemaEditorTitle:`JSON Schema Editor`,schemaEditorToggleFullscreen:`Toggle fullscreen`,schemaEditorEditModeVisual:`Visual`,schemaEditorEditModeJson:`JSON`,schemaEditorLoading:`Loading editor...`,arrayNoConstraint:`No constraint`,arrayMinimumLabel:`Minimum Items`,arrayMinimumPlaceholder:`No minimum`,arrayMaximumLabel:`Maximum Items`,arrayMaximumPlaceholder:`No maximum`,arrayForceUniqueItemsLabel:`Force unique items`,arrayItemTypeLabel:`Item Type`,arrayValidationErrorMinMax:`'minItems' cannot be greater than 'maxItems'.`,arrayValidationErrorContainsMinMax:`'minContains' cannot be greater than 'maxContains'.`,booleanNoConstraint:`No constraint`,booleanAllowedValuesLabel:`Allowed Values`,booleanAllowFalseLabel:`Allow false value`,booleanAllowTrueLabel:`Allow true value`,booleanNeitherWarning:`Warning: You must allow at least one value.`,numberNoConstraint:`No constraint`,numberMinimumLabel:`Minimum Value`,numberMinimumPlaceholder:`No minimum`,numberMaximumLabel:`Maximum Value`,numberMaximumPlaceholder:`No maximum`,numberExclusiveMinimumLabel:`Exclusive Minimum`,numberExclusiveMinimumPlaceholder:`No exclusive min`,numberExclusiveMaximumLabel:`Exclusive Maximum`,numberExclusiveMaximumPlaceholder:`No exclusive max`,numberMultipleOfLabel:`Multiple Of`,numberMultipleOfPlaceholder:`Any`,numberAllowedValuesEnumLabel:`Allowed Values (enum)`,numberAllowedValuesEnumNone:`No restricted values set`,numberAllowedValuesEnumAddLabel:`Add`,numberAllowedValuesEnumAddPlaceholder:`Add allowed value...`,numberValidationErrorMinMax:`Minimum and maximum values must be consistent.`,numberValidationErrorBothExclusiveAndInclusiveMin:`Both 'exclusiveMinimum' and 'minimum' cannot be set at the same time.`,numberValidationErrorBothExclusiveAndInclusiveMax:`Both 'exclusiveMaximum' and 'maximum' cannot be set at the same time.`,numberValidationErrorEnumOutOfRange:`Enum values must be within the defined range.`,objectPropertiesNone:`No properties defined`,objectValidationErrorMinMax:`'minProperties' cannot be greater than 'maxProperties'.`,additionalPropertiesAllow:`Allow additional properties`,additionalPropertiesForbid:`Forbid additional properties`,additionalPropertiesTooltip:`Controls whether properties not defined in 'properties' or 'patternProperties' are allowed`,stringNoConstraint:`No constraint`,stringMinimumLengthLabel:`Minimum Length`,stringMinimumLengthPlaceholder:`No minimum`,stringMaximumLengthLabel:`Maximum Length`,stringMaximumLengthPlaceholder:`No maximum`,stringPatternLabel:`Pattern (regex)`,stringPatternPlaceholder:`^[a-zA-Z]+$`,stringFormatLabel:`Format`,stringFormatNone:`None`,stringFormatDateTime:`Date-Time`,stringFormatDate:`Date`,stringFormatTime:`Time`,stringFormatEmail:`Email`,stringFormatUri:`URI`,stringFormatUuid:`UUID`,stringFormatHostname:`Hostname`,stringFormatIpv4:`IPv4 Address`,stringFormatIpv6:`IPv6 Address`,stringAllowedValuesEnumLabel:`Allowed Values (enum)`,stringAllowedValuesEnumNone:`No restricted values set`,stringAllowedValuesEnumAddPlaceholder:`Add allowed value...`,stringAllowedValuesEnumAddLabel:`Add`,stringFormatSelectPlaceholder:`Select format`,stringValidationErrorLengthRange:`'Minimum Length' cannot be greater than 'Maximum Length'.`,schemaTypeArray:`List`,schemaTypeBoolean:`Yes/No`,schemaTypeInteger:`Integer`,schemaTypeNumber:`Real`,schemaTypeObject:`Object`,schemaTypeString:`Text`,schemaTypeNull:`Empty`,inferrerTitle:`Infer JSON Schema`,inferrerDescription:`Paste your JSON document below to generate a schema from it.`,inferrerCancel:`Cancel`,inferrerGenerate:`Generate Schema`,inferrerErrorInvalidJson:`Invalid JSON format. Please check your input.`,validatorTitle:`Validate JSON`,validatorDescription:`Paste your JSON document to validate against the current schema. Validation occurs automatically as you type.`,validatorCurrentSchema:`Current Schema:`,validatorContent:`Your JSON:`,validatorValid:`JSON is valid according to the schema!`,validatorErrorInvalidSyntax:`Invalid JSON syntax`,validatorErrorSchemaValidation:`Schema validation error`,validatorErrorCount:`{count} validation errors detected`,validatorErrorPathRoot:`Root`,validatorErrorLocationLineAndColumn:`Line {line}, Col {column}`,validatorErrorLocationLineOnly:`Line {line}`,visualizerDownloadTitle:`Download Schema`,visualizerDownloadFileName:`schema.json`,visualizerSource:`JSON Schema Source`,visualEditorNoFieldsHint1:`No fields defined yet`,visualEditorNoFieldsHint2:`Add your first field to get started`,typeValidationErrorNegativeLength:`Length values cannot be negative.`,typeValidationErrorIntValue:`Value must be an integer.`,typeValidationErrorPositive:`Value must be positive.`,schemaTitleLabel:`Schema Title`,schemaTitlePlaceholder:`Schema title (e.g., Users, Posts)`,tableNamePlaceholder:`Table name (snake_case), used as schema filename`,timestampsLabel:`Auto Timestamps`,softDeleteLabel:`Soft Delete`,primaryKeyLabel:`Primary Key`,autoIncrementLabel:`Auto Increment`,uniqueLabel:`Unique`,drizzleModeLabel:`Drizzle Mode`,drizzleModeNone:`None`,drizzleModeJson:`JSON`,drizzleModeTimestamp:`Timestamp`,drizzleModeTimestampMs:`Timestamp (ms)`,drizzleModeBoolean:`Boolean`,drizzleModeBigint:`Bigint`,customTypeLabel:`Custom Type`,customTypePlaceholder:`e.g., text, blob`,nestedEnabledLabel:`Enable Nested`,nestedRelationLabel:`Relation Type`,hasOneRelation:`Has One`,hasManyRelation:`Has Many`,defaultValueLabel:`Default Value`,defaultValuePlaceholder:`Enter default value`,saveLabel:`Save`,saveAndMigrateLabel:`Save & Migrate`,migrateSuccessToast:`Migration applied ({changes} changes)`,migrateNoChangesToast:`No changes detected`,migrateErrorToast:`Migration failed`,loadExampleLabel:`Load Example`},wt=Symbol(`TranslationContext`);function Tt(){let e=se(wt,void 0);if(!e)return pe({...Ct});if(I(e)){let t=pe({...e.value});return D(e,e=>{let n=Object.keys(e);for(let r of n)t[r]=e[r]},{immediate:!1}),t}return pe({...e})}var B;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(B||={});var Et;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Et||={});var V=B.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),Dt=e=>{switch(typeof e){case`undefined`:return V.undefined;case`string`:return V.string;case`number`:return Number.isNaN(e)?V.nan:V.number;case`boolean`:return V.boolean;case`function`:return V.function;case`bigint`:return V.bigint;case`symbol`:return V.symbol;case`object`:return Array.isArray(e)?V.array:e===null?V.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?V.promise:typeof Map<`u`&&e instanceof Map?V.map:typeof Set<`u`&&e instanceof Set?V.set:typeof Date<`u`&&e instanceof Date?V.date:V.object;default:return V.unknown}},H=B.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Ot=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,`$1:`),kt=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,B.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};kt.create=e=>new kt(e);var At=(e,t)=>{let n;switch(e.code){case H.invalid_type:n=e.received===V.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,B.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${B.joinValues(e.keys,`, `)}`;break;case H.invalid_union:n=`Invalid input`;break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${B.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${B.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n=`Invalid function arguments`;break;case H.invalid_return_type:n=`Invalid function return type`;break;case H.invalid_date:n=`Invalid date`;break;case H.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:B.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case H.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case H.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case H.custom:n=`Invalid input`;break;case H.invalid_intersection_types:n=`Intersection results could not be merged`;break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,B.assertNever(e)}return{message:n}},jt=At;function Mt(e){jt=e}function Nt(){return jt}var Pt=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},Ft=[];function U(e,t){let n=Nt(),r=Pt({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===At?void 0:At].filter(e=>!!e)});e.common.issues.push(r)}var It=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return W;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return W;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},W=Object.freeze({status:`aborted`}),Lt=e=>({status:`dirty`,value:e}),Rt=e=>({status:`valid`,value:e}),zt=e=>e.status===`aborted`,Bt=e=>e.status===`dirty`,Vt=e=>e.status===`valid`,Ht=e=>typeof Promise<`u`&&e instanceof Promise,G;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(G||={});var Ut=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Wt=(e,t)=>{if(Vt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){return this._error||=new kt(e.common.issues),this._error}}};function K(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var q=class{get description(){return this._def.description}_getType(e){return Dt(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Dt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new It,ctx:{common:e.parent.common,data:e.data,parsedType:Dt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Ht(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Dt(e)};return Wt(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Dt(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Vt(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Vt(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Dt(e)},r=this._parse({data:e,path:n.path,parent:n});return Wt(n,await(Ht(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:H.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new Jn({schema:this,typeName:J.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return Yn.create(this,this._def)}nullable(){return Xn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return kn.create(this)}promise(){return qn.create(this,this._def)}or(e){return Mn.create([this,e],this._def)}and(e){return In.create(this,e,this._def)}transform(e){return new Jn({...K(this._def),schema:this,typeName:J.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new Zn({...K(this._def),innerType:this,defaultValue:t,typeName:J.ZodDefault})}brand(){return new tr({typeName:J.ZodBranded,type:this,...K(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Qn({...K(this._def),innerType:this,catchValue:t,typeName:J.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return nr.create(this,e)}readonly(){return rr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Gt=/^c[^\s-]{8,}$/i,Kt=/^[0-9a-z]+$/,qt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Jt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Yt=/^[a-z0-9_-]{21}$/i,Xt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Zt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Qt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$t=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,en,tn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rn=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,an=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,on=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sn=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,cn=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,ln=RegExp(`^${cn}$`);function un(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function dn(e){return RegExp(`^${un(e)}$`)}function fn(e){let t=`${cn}T${un(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function pn(e,t){return!!((t===`v4`||!t)&&tn.test(e)||(t===`v6`||!t)&&rn.test(e))}function mn(e,t){if(!Xt.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function hn(e,t){return!!((t===`v4`||!t)&&nn.test(e)||(t===`v6`||!t)&&an.test(e))}var gn=class e extends q{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==V.string){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.string,received:t.parsedType}),W}let t=new It,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),U(n,{code:H.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),U(n,{code:H.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?U(n,{code:H.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&U(n,{code:H.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)Qt.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`email`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)en||=new RegExp($t,`u`),en.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`emoji`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)Jt.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`uuid`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)Yt.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`nanoid`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)Gt.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`cuid`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)Kt.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`cuid2`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)qt.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`ulid`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),U(n,{validation:`url`,code:H.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`regex`,code:H.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?fn(r).test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?ln.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?dn(r).test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?Zt.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`duration`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?pn(e.data,r.version)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`ip`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?mn(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`jwt`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?hn(e.data,r.version)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`cidr`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?on.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`base64`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?sn.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`base64url`,code:H.invalid_string,message:r.message}),t.dirty()):B.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:H.invalid_string,...G.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...G.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...G.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...G.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...G.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...G.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...G.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...G.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...G.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...G.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...G.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...G.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...G.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...G.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...G.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...G.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...G.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...G.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...G.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...G.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...G.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...G.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...G.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...G.errToObj(t)})}nonempty(e){return this.min(1,G.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};gn.create=e=>new gn({checks:[],typeName:J.ZodString,coerce:e?.coerce??!1,...K(e)});function _n(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var vn=class e extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==V.number){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.number,received:t.parsedType}),W}let t,n=new It;for(let r of this._def.checks)r.kind===`int`?B.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),U(t,{code:H.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),U(t,{code:H.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),U(t,{code:H.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?_n(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),U(t,{code:H.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),U(t,{code:H.not_finite,message:r.message}),n.dirty()):B.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,G.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,G.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,G.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,G.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:G.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:G.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:G.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:G.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:G.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:G.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:G.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:G.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:G.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:G.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&B.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};vn.create=e=>new vn({checks:[],typeName:J.ZodNumber,coerce:e?.coerce||!1,...K(e)});var yn=class e extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==V.bigint)return this._getInvalidInput(e);let t,n=new It;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),U(t,{code:H.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),U(t,{code:H.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),U(t,{code:H.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):B.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.bigint,received:t.parsedType}),W}gte(e,t){return this.setLimit(`min`,e,!0,G.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,G.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,G.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,G.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:G.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:G.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:G.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:G.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:G.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:G.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};yn.create=e=>new yn({checks:[],typeName:J.ZodBigInt,coerce:e?.coerce??!1,...K(e)});var bn=class extends q{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==V.boolean){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.boolean,received:t.parsedType}),W}return Rt(e.data)}};bn.create=e=>new bn({typeName:J.ZodBoolean,coerce:e?.coerce||!1,...K(e)});var xn=class e extends q{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==V.date){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.date,received:t.parsedType}),W}if(Number.isNaN(e.data.getTime()))return U(this._getOrReturnCtx(e),{code:H.invalid_date}),W;let t=new It,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),U(n,{code:H.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),U(n,{code:H.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):B.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:G.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:G.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};xn.create=e=>new xn({checks:[],coerce:e?.coerce||!1,typeName:J.ZodDate,...K(e)});var Sn=class extends q{_parse(e){if(this._getType(e)!==V.symbol){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.symbol,received:t.parsedType}),W}return Rt(e.data)}};Sn.create=e=>new Sn({typeName:J.ZodSymbol,...K(e)});var Cn=class extends q{_parse(e){if(this._getType(e)!==V.undefined){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.undefined,received:t.parsedType}),W}return Rt(e.data)}};Cn.create=e=>new Cn({typeName:J.ZodUndefined,...K(e)});var wn=class extends q{_parse(e){if(this._getType(e)!==V.null){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.null,received:t.parsedType}),W}return Rt(e.data)}};wn.create=e=>new wn({typeName:J.ZodNull,...K(e)});var Tn=class extends q{constructor(){super(...arguments),this._any=!0}_parse(e){return Rt(e.data)}};Tn.create=e=>new Tn({typeName:J.ZodAny,...K(e)});var En=class extends q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Rt(e.data)}};En.create=e=>new En({typeName:J.ZodUnknown,...K(e)});var Dn=class extends q{_parse(e){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.never,received:t.parsedType}),W}};Dn.create=e=>new Dn({typeName:J.ZodNever,...K(e)});var On=class extends q{_parse(e){if(this._getType(e)!==V.undefined){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.void,received:t.parsedType}),W}return Rt(e.data)}};On.create=e=>new On({typeName:J.ZodVoid,...K(e)});var kn=class e extends q{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==V.array)return U(t,{code:H.invalid_type,expected:V.array,received:t.parsedType}),W;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(U(t,{code:e?H.too_big:H.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(U(t,{code:H.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(U(t,{code:H.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new Ut(t,e,t.path,n)))).then(e=>It.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new Ut(t,e,t.path,n)));return It.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:G.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:G.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:G.toString(n)}})}nonempty(e){return this.min(1,e)}};kn.create=(e,t)=>new kn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:J.ZodArray,...K(t)});function An(e){if(e instanceof jn){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Yn.create(An(r))}return new jn({...e._def,shape:()=>t})}else if(e instanceof kn)return new kn({...e._def,type:An(e.element)});else if(e instanceof Yn)return Yn.create(An(e.unwrap()));else if(e instanceof Xn)return Xn.create(An(e.unwrap()));else if(e instanceof Ln)return Ln.create(e.items.map(e=>An(e)));else return e}var jn=class e extends q{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape();return this._cached={shape:e,keys:B.objectKeys(e)},this._cached}_parse(e){if(this._getType(e)!==V.object){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.object,received:t.parsedType}),W}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Dn&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new Ut(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Dn){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(U(n,{code:H.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new Ut(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>It.mergeObjectSync(t,e)):It.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return G.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:G.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:J.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of B.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of B.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return An(this)}partial(t){let n={};for(let e of B.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of B.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof Yn;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return Wn(B.objectKeys(this.shape))}};jn.create=(e,t)=>new jn({shape:()=>e,unknownKeys:`strip`,catchall:Dn.create(),typeName:J.ZodObject,...K(t)}),jn.strictCreate=(e,t)=>new jn({shape:()=>e,unknownKeys:`strict`,catchall:Dn.create(),typeName:J.ZodObject,...K(t)}),jn.lazycreate=(e,t)=>new jn({shape:e,unknownKeys:`strip`,catchall:Dn.create(),typeName:J.ZodObject,...K(t)});var Mn=class extends q{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new kt(e.ctx.common.issues));return U(t,{code:H.invalid_union,unionErrors:n}),W}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new kt(e));return U(t,{code:H.invalid_union,unionErrors:i}),W}}get options(){return this._def.options}};Mn.create=(e,t)=>new Mn({options:e,typeName:J.ZodUnion,...K(t)});var Nn=e=>e instanceof Hn?Nn(e.schema):e instanceof Jn?Nn(e.innerType()):e instanceof Un?[e.value]:e instanceof Gn?e.options:e instanceof Kn?B.objectValues(e.enum):e instanceof Zn?Nn(e._def.innerType):e instanceof Cn?[void 0]:e instanceof wn?[null]:e instanceof Yn?[void 0,...Nn(e.unwrap())]:e instanceof Xn?[null,...Nn(e.unwrap())]:e instanceof tr||e instanceof rr?Nn(e.unwrap()):e instanceof Qn?Nn(e._def.innerType):[],Pn=class e extends q{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.object)return U(t,{code:H.invalid_type,expected:V.object,received:t.parsedType}),W;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(U(t,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),W)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=Nn(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:J.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...K(r)})}};function Fn(e,t){let n=Dt(e),r=Dt(t);if(e===t)return{valid:!0,data:e};if(n===V.object&&r===V.object){let n=B.objectKeys(t),r=B.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Fn(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===V.array&&r===V.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Fn(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===V.date&&r===V.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var In=class extends q{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(zt(e)||zt(r))return W;let i=Fn(e.value,r.value);return i.valid?((Bt(e)||Bt(r))&&t.dirty(),{status:t.value,value:i.data}):(U(n,{code:H.invalid_intersection_types}),W)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};In.create=(e,t,n)=>new In({left:e,right:t,typeName:J.ZodIntersection,...K(n)});var Ln=class e extends q{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.array)return U(n,{code:H.invalid_type,expected:V.array,received:n.parsedType}),W;if(n.data.length<this._def.items.length)return U(n,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),W;!this._def.rest&&n.data.length>this._def.items.length&&(U(n,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new Ut(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>It.mergeArray(t,e)):It.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Ln.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new Ln({items:e,typeName:J.ZodTuple,rest:null,...K(t)})};var Rn=class e extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.object)return U(n,{code:H.invalid_type,expected:V.object,received:n.parsedType}),W;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new Ut(n,e,n.path,e)),value:a._parse(new Ut(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?It.mergeObjectAsync(t,r):It.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof q?new e({keyType:t,valueType:n,typeName:J.ZodRecord,...K(r)}):new e({keyType:gn.create(),valueType:t,typeName:J.ZodRecord,...K(n)})}},zn=class extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.map)return U(n,{code:H.invalid_type,expected:V.map,received:n.parsedType}),W;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new Ut(n,e,n.path,[a,`key`])),value:i._parse(new Ut(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return W;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return W;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};zn.create=(e,t,n)=>new zn({valueType:t,keyType:e,typeName:J.ZodMap,...K(n)});var Bn=class e extends q{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.set)return U(n,{code:H.invalid_type,expected:V.set,received:n.parsedType}),W;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(U(n,{code:H.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(U(n,{code:H.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return W;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new Ut(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:G.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:G.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Bn.create=(e,t)=>new Bn({valueType:e,minSize:null,maxSize:null,typeName:J.ZodSet,...K(t)});var Vn=class e extends q{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.function)return U(t,{code:H.invalid_type,expected:V.function,received:t.parsedType}),W;function n(e,n){return Pt({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Nt(),At].filter(e=>!!e),issueData:{code:H.invalid_arguments,argumentsError:n}})}function r(e,n){return Pt({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Nt(),At].filter(e=>!!e),issueData:{code:H.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof qn){let e=this;return Rt(async function(...t){let o=new kt([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return Rt(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new kt([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new kt([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Ln.create(t).rest(En.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||Ln.create([]).rest(En.create()),returns:n||En.create(),typeName:J.ZodFunction,...K(r)})}},Hn=class extends q{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Hn.create=(e,t)=>new Hn({getter:e,typeName:J.ZodLazy,...K(t)});var Un=class extends q{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return U(t,{received:t.data,code:H.invalid_literal,expected:this._def.value}),W}return{status:`valid`,value:e.data}}get value(){return this._def.value}};Un.create=(e,t)=>new Un({value:e,typeName:J.ZodLiteral,...K(t)});function Wn(e,t){return new Gn({values:e,typeName:J.ZodEnum,...K(t)})}var Gn=class e extends q{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return U(t,{expected:B.joinValues(n),received:t.parsedType,code:H.invalid_type}),W}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return U(t,{received:t.data,code:H.invalid_enum_value,options:n}),W}return Rt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};Gn.create=Wn;var Kn=class extends q{_parse(e){let t=B.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==V.string&&n.parsedType!==V.number){let e=B.objectValues(t);return U(n,{expected:B.joinValues(e),received:n.parsedType,code:H.invalid_type}),W}if(this._cache||=new Set(B.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=B.objectValues(t);return U(n,{received:n.data,code:H.invalid_enum_value,options:e}),W}return Rt(e.data)}get enum(){return this._def.values}};Kn.create=(e,t)=>new Kn({values:e,typeName:J.ZodNativeEnum,...K(t)});var qn=class extends q{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==V.promise&&t.common.async===!1?(U(t,{code:H.invalid_type,expected:V.promise,received:t.parsedType}),W):Rt((t.parsedType===V.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};qn.create=(e,t)=>new qn({type:e,typeName:J.ZodPromise,...K(t)});var Jn=class extends q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===J.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{U(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return W;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?W:r.status===`dirty`||t.value===`dirty`?Lt(r.value):r});{if(t.value===`aborted`)return W;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?W:r.status===`dirty`||t.value===`dirty`?Lt(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?W:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?W:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Vt(e))return W;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Vt(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):W);B.assertNever(r)}};Jn.create=(e,t,n)=>new Jn({schema:e,typeName:J.ZodEffects,effect:t,...K(n)}),Jn.createWithPreprocess=(e,t,n)=>new Jn({schema:t,effect:{type:`preprocess`,transform:e},typeName:J.ZodEffects,...K(n)});var Yn=class extends q{_parse(e){return this._getType(e)===V.undefined?Rt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Yn.create=(e,t)=>new Yn({innerType:e,typeName:J.ZodOptional,...K(t)});var Xn=class extends q{_parse(e){return this._getType(e)===V.null?Rt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Xn.create=(e,t)=>new Xn({innerType:e,typeName:J.ZodNullable,...K(t)});var Zn=class extends q{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===V.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Zn.create=(e,t)=>new Zn({innerType:e,typeName:J.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...K(t)});var Qn=class extends q{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ht(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new kt(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new kt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Qn.create=(e,t)=>new Qn({innerType:e,typeName:J.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...K(t)});var $n=class extends q{_parse(e){if(this._getType(e)!==V.nan){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.nan,received:t.parsedType}),W}return{status:`valid`,value:e.data}}};$n.create=e=>new $n({typeName:J.ZodNaN,...K(e)});var er=Symbol(`zod_brand`),tr=class extends q{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},nr=class e extends q{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?W:e.status===`dirty`?(t.dirty(),Lt(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?W:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:J.ZodPipeline})}},rr=class extends q{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Vt(e)&&(e.value=Object.freeze(e.value)),e);return Ht(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};rr.create=(e,t)=>new rr({innerType:e,typeName:J.ZodReadonly,...K(t)});function ir(e,t){let n=typeof e==`function`?e(t):typeof e==`string`?{message:e}:e;return typeof n==`string`?{message:n}:n}function ar(e,t={},n){return e?Tn.create().superRefine((r,i)=>{let a=e(r);if(a instanceof Promise)return a.then(e=>{if(!e){let e=ir(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}});if(!a){let e=ir(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}}):Tn.create()}var or={object:jn.lazycreate},J;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(J||={});var sr=(e,t={message:`Input not instance of ${e.name}`})=>ar(t=>t instanceof e,t),Y=gn.create,cr=vn.create,lr=$n.create,ur=yn.create,dr=bn.create,fr=xn.create,pr=Sn.create,mr=Cn.create,hr=wn.create,gr=Tn.create,_r=En.create,vr=Dn.create,yr=On.create,br=kn.create,xr=jn.create,Sr=jn.strictCreate,Cr=Mn.create,wr=Pn.create,Tr=In.create,Er=Ln.create,Dr=Rn.create,Or=zn.create,kr=Bn.create,Ar=Vn.create,jr=Hn.create,Mr=Un.create,Nr=Gn.create,Pr=Kn.create,Fr=qn.create,Ir=Jn.create,Lr=Yn.create,Rr=Xn.create,zr=Jn.createWithPreprocess,Br=nr.create,Vr=()=>Y().optional(),Hr=()=>cr().optional(),Ur=()=>dr().optional(),Wr={string:(e=>gn.create({...e,coerce:!0})),number:(e=>vn.create({...e,coerce:!0})),boolean:(e=>bn.create({...e,coerce:!0})),bigint:(e=>yn.create({...e,coerce:!0})),date:(e=>xn.create({...e,coerce:!0}))},Gr=W,Kr=e({BRAND:()=>er,DIRTY:()=>Lt,EMPTY_PATH:()=>Ft,INVALID:()=>W,NEVER:()=>Gr,OK:()=>Rt,ParseStatus:()=>It,Schema:()=>q,ZodAny:()=>Tn,ZodArray:()=>kn,ZodBigInt:()=>yn,ZodBoolean:()=>bn,ZodBranded:()=>tr,ZodCatch:()=>Qn,ZodDate:()=>xn,ZodDefault:()=>Zn,ZodDiscriminatedUnion:()=>Pn,ZodEffects:()=>Jn,ZodEnum:()=>Gn,ZodError:()=>kt,ZodFirstPartyTypeKind:()=>J,ZodFunction:()=>Vn,ZodIntersection:()=>In,ZodIssueCode:()=>H,ZodLazy:()=>Hn,ZodLiteral:()=>Un,ZodMap:()=>zn,ZodNaN:()=>$n,ZodNativeEnum:()=>Kn,ZodNever:()=>Dn,ZodNull:()=>wn,ZodNullable:()=>Xn,ZodNumber:()=>vn,ZodObject:()=>jn,ZodOptional:()=>Yn,ZodParsedType:()=>V,ZodPipeline:()=>nr,ZodPromise:()=>qn,ZodReadonly:()=>rr,ZodRecord:()=>Rn,ZodSchema:()=>q,ZodSet:()=>Bn,ZodString:()=>gn,ZodSymbol:()=>Sn,ZodTransformer:()=>Jn,ZodTuple:()=>Ln,ZodType:()=>q,ZodUndefined:()=>Cn,ZodUnion:()=>Mn,ZodUnknown:()=>En,ZodVoid:()=>On,addIssueToContext:()=>U,any:()=>gr,array:()=>br,bigint:()=>ur,boolean:()=>dr,coerce:()=>Wr,custom:()=>ar,date:()=>fr,datetimeRegex:()=>fn,defaultErrorMap:()=>At,discriminatedUnion:()=>wr,effect:()=>Ir,enum:()=>Nr,function:()=>Ar,getErrorMap:()=>Nt,getParsedType:()=>Dt,instanceof:()=>sr,intersection:()=>Tr,isAborted:()=>zt,isAsync:()=>Ht,isDirty:()=>Bt,isValid:()=>Vt,late:()=>or,lazy:()=>jr,literal:()=>Mr,makeIssue:()=>Pt,map:()=>Or,nan:()=>lr,nativeEnum:()=>Pr,never:()=>vr,null:()=>hr,nullable:()=>Rr,number:()=>cr,object:()=>xr,objectUtil:()=>Et,oboolean:()=>Ur,onumber:()=>Hr,optional:()=>Lr,ostring:()=>Vr,pipeline:()=>Br,preprocess:()=>zr,promise:()=>Fr,quotelessJson:()=>Ot,record:()=>Dr,set:()=>kr,setErrorMap:()=>Mt,strictObject:()=>Sr,string:()=>Y,symbol:()=>pr,transformer:()=>Ir,tuple:()=>Er,undefined:()=>mr,union:()=>Cr,unknown:()=>_r,util:()=>B,void:()=>yr}),qr=[`string`,`number`,`integer`,`boolean`,`object`,`array`,`null`],Jr=xr({name:Y().min(1),timestamps:dr().optional(),softDelete:dr().optional()}),Yr=xr({mode:Nr([`json`,`timestamp`,`timestamp_ms`,`boolean`,`bigint`]).optional(),customType:Y().optional()}).optional(),Xr=xr({enabled:Mr(!0),relation:Nr([`has-one`,`has-many`])}),Zr=xr({$id:Y().optional(),$schema:Y().optional(),$ref:Y().optional(),$anchor:Y().optional(),$dynamicRef:Y().optional(),$dynamicAnchor:Y().optional(),$vocabulary:Dr(Y(),dr()).optional(),$comment:Y().optional(),title:Y().optional(),description:Y().optional(),default:_r().optional(),deprecated:dr().optional(),readOnly:dr().optional(),writeOnly:dr().optional(),examples:br(_r()).optional(),type:Cr([Nr(qr),br(Nr(qr))]).optional(),minLength:cr().int().min(0).optional(),maxLength:cr().int().min(0).optional(),pattern:Y().optional(),format:Y().optional(),contentMediaType:Y().optional(),contentEncoding:Y().optional(),multipleOf:cr().positive().optional(),minimum:cr().optional(),maximum:cr().optional(),exclusiveMinimum:cr().optional(),exclusiveMaximum:cr().optional(),minItems:cr().int().min(0).optional(),maxItems:cr().int().min(0).optional(),uniqueItems:dr().optional(),minContains:cr().int().min(0).optional(),maxContains:cr().int().min(0).optional(),required:br(Y()).optional(),minProperties:cr().int().min(0).optional(),maxProperties:cr().int().min(0).optional(),dependentRequired:Dr(Y(),br(Y())).optional(),const:_r().optional(),enum:br(_r()).optional(),table:Jr.optional(),primary:dr().optional(),autoIncrement:dr().optional(),unique:dr().optional(),drizzle:Yr,nested:Xr.optional()}),Qr=jr(()=>Cr([Zr.extend({$defs:Dr(Y(),Qr).optional(),contentSchema:Qr.optional(),items:Qr.optional(),prefixItems:br(Qr).optional(),contains:Qr.optional(),unevaluatedItems:Qr.optional(),properties:Dr(Y(),Qr).optional(),patternProperties:Dr(Y(),Qr).optional(),additionalProperties:Cr([Qr,dr()]).optional(),propertyNames:Qr.optional(),dependentSchemas:Dr(Y(),Qr).optional(),unevaluatedProperties:Qr.optional(),allOf:br(Qr).optional(),anyOf:br(Qr).optional(),oneOf:br(Qr).optional(),not:Qr.optional(),if:Qr.optional(),then:Qr.optional(),else:Qr.optional()}),dr()]));function $r(e){return typeof e==`boolean`}function ei(e){return!$r(e)}function ti(e){return ei(e)&&e.description||``}function X(e,t,n){return ei(e)?t(e):n}var ni=Symbol(`SchemaStore`);function ri(e){return Ce(e)}function ii(e,t){let n=e;for(let e of t){if(!ei(n)||!n.properties)return;let t=n.properties[e];if(t===void 0)return;n=ei(t)&&t.type===`array`&&t.items&&ei(t.items)?t.items:t}return ei(n)?n:void 0}function ai(e,t){if(t.length===0)return e;let n=e;for(let e of t){if(!ei(n)||!n.properties)return;let t=n.properties[e];if(t===void 0)return;n=t}return n}function oi(e,t,n,r){let i=ri(e),a=t.length===0?i:ii(i,t);return!a||!ei(a)?i:(a.properties||={},a.properties[n]=r,i)}function si(e,t,n){let r=ri(e),i=t.length===0?r:ii(r,t);if(!i||!ei(i)||!i.properties)return r;let{[n]:a,...o}=i.properties;return i.properties=o,i.required&&=i.required.filter(e=>e!==n),r}function ci(e,t,n,r){let i=ri(e),a=t.length===0?i:ii(i,t);if(!a||!ei(a)||!a.properties)return i;let o={};for(let[e,t]of Object.entries(a.properties))o[e===n?r:e]=t;return a.properties=o,a.required&&=a.required.map(e=>e===n?r:e),i}function li(e,t,n,r){let i=ri(e),a=t.length===0?i:ii(i,t);return!a||!ei(a)?i:(a.required||=[],r?a.required.includes(n)||a.required.push(n):a.required=a.required.filter(e=>e!==n),i)}function ui(e,t){let n=ie(ri(e)),r=0,i=!1;function a(){r=0,i=!1}let o=!1;function s(e){if(!o){if(i||(i=!0,setTimeout(a,0)),r++,r>10){typeof console<`u`&&console.warn(`[SchemaStore] commit rate limit reached — dropping update to prevent loop`);return}o=!0;try{n.value=e,t?.(e)}finally{o=!1}}}return{schema:n,getAtPath(e){return ai(n.value,e)},updateProperty(e,t,r){s(oi(n.value,e,t,ri(r)))},deleteProperty(e,t){s(si(n.value,e,t))},renameProperty(e,t,r){s(ci(n.value,e,t,r))},setPropertyRequired(e,t,r){s(li(n.value,e,t,r))},addProperty(e,t){let{type:r,description:i,additionalProperties:a}=t,o={type:r,...i?{description:i}:{},...a===!1?{additionalProperties:a}:{}},c=oi(n.value,e,t.name,o);t.required&&(c=li(c,e,t.name,!0)),s(c)},replaceSchema(e){s(ri(e))}}}function di(e){b(ni,e)}function fi(){let e=se(ni);if(!e)throw Error(`useSchemaStore() was called without a parent providing SchemaStore. Wrap your component tree with JsonSchemaEditor or call provideSchemaStore().`);return e}function pi(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=pi(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function mi(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=pi(e))&&(r&&(r+=` `),r+=t);return r}var hi=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},gi=(e,t)=>({classGroupId:e,validator:t}),_i=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),vi=`-`,yi=[],bi=`arbitrary..`,xi=e=>{let t=wi(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Ci(e);let n=e.split(vi);return Si(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?hi(i,t):t:i||yi}return n[e]||yi}}},Si=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Si(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(vi):e.slice(t).join(vi),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Ci=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?bi+r:void 0})(),wi=e=>{let{theme:t,classGroups:n}=e;return Ti(n,t)},Ti=(e,t)=>{let n=_i();for(let r in e){let i=e[r];Ei(i,n,r,t)}return n},Ei=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Di(i,t,n,r)}},Di=(e,t,n,r)=>{if(typeof e==`string`){Oi(e,t,n);return}if(typeof e==`function`){ki(e,t,n,r);return}Ai(e,t,n,r)},Oi=(e,t,n)=>{let r=e===``?t:ji(t,e);r.classGroupId=n},ki=(e,t,n,r)=>{if(Mi(e)){Ei(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(gi(n,e))},Ai=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ei(o,ji(t,a),n,r)}},ji=(e,t)=>{let n=e,r=t.split(vi),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=_i(),n.nextPart.set(t,i)),n=i}return n},Mi=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ni=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Pi=`!`,Fi=`:`,Ii=[],Li=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ri=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Fi){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Pi)?(c=s.slice(0,-1),l=!0):s.startsWith(Pi)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Li(t,l,c,u)};if(t){let e=t+Fi,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Li(Ii,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},zi=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Bi=e=>({cache:Ni(e.cacheSize),parseClassName:Ri(e),sortModifiers:zi(e),postfixLookupClassGroupIds:Vi(e),...xi(e)}),Vi=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Hi=/\s+/,Ui=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Hi),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Pi:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Wi=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Gi(n))&&(i&&(i+=` `),i+=r);return i},Gi=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Gi(e[r]))&&(n&&(n+=` `),n+=t);return n},Ki=(e,...t)=>{let n,r,i,a,o=o=>(n=Bi(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Ui(e,n);return i(e,a),a};return a=o,(...e)=>a(Wi(...e))},qi=[],Ji=e=>{let t=t=>t[e]||qi;return t.isThemeGetter=!0,t},Yi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Zi=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Qi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$i=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ea=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ta=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,na=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ra=e=>Zi.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),ia=e=>!!e&&Number.isInteger(Number(e)),aa=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),oa=e=>Qi.test(e),sa=()=>!0,ca=e=>$i.test(e)&&!ea.test(e),la=()=>!1,ua=e=>ta.test(e),da=e=>na.test(e),fa=e=>!Q(e)&&!$(e),pa=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),ma=e=>ka(e,Na,la),Q=e=>Yi.test(e),ha=e=>ka(e,Pa,ca),ga=e=>ka(e,Fa,Z),_a=e=>ka(e,La,sa),va=e=>ka(e,Ia,la),ya=e=>ka(e,ja,la),ba=e=>ka(e,Ma,da),xa=e=>ka(e,Ra,ua),$=e=>Xi.test(e),Sa=e=>Aa(e,Pa),Ca=e=>Aa(e,Ia),wa=e=>Aa(e,ja),Ta=e=>Aa(e,Na),Ea=e=>Aa(e,Ma),Da=e=>Aa(e,Ra,!0),Oa=e=>Aa(e,La,!0),ka=(e,t,n)=>{let r=Yi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Aa=(e,t,n=!1)=>{let r=Xi.exec(e);return r?r[1]?t(r[1]):n:!1},ja=e=>e===`position`||e===`percentage`,Ma=e=>e===`image`||e===`url`,Na=e=>e===`length`||e===`size`||e===`bg-size`,Pa=e=>e===`length`,Fa=e=>e===`number`,Ia=e=>e===`family-name`,La=e=>e===`number`||e===`weight`,Ra=e=>e===`shadow`,za=Ki(()=>{let e=Ji(`color`),t=Ji(`font`),n=Ji(`text`),r=Ji(`font-weight`),i=Ji(`tracking`),a=Ji(`leading`),o=Ji(`breakpoint`),s=Ji(`container`),c=Ji(`spacing`),l=Ji(`radius`),u=Ji(`shadow`),d=Ji(`inset-shadow`),f=Ji(`text-shadow`),p=Ji(`drop-shadow`),m=Ji(`blur`),h=Ji(`perspective`),g=Ji(`aspect`),_=Ji(`ease`),v=Ji(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],ee=()=>[...b(),$,Q],x=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],S=()=>[`auto`,`contain`,`none`],C=()=>[$,Q,c],w=()=>[ra,`full`,`auto`,...C()],te=()=>[ia,`none`,`subgrid`,$,Q],ne=()=>[`auto`,{span:[`full`,ia,$,Q]},ia,$,Q],T=()=>[ia,`auto`,$,Q],re=()=>[`auto`,`min`,`max`,`fr`,$,Q],E=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ie=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],D=()=>[`auto`,...C()],O=()=>[ra,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...C()],k=()=>[ra,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...C()],A=()=>[ra,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...C()],j=()=>[e,$,Q],ae=()=>[...b(),wa,ya,{position:[$,Q]}],oe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],se=()=>[`auto`,`cover`,`contain`,Ta,ma,{size:[$,Q]}],M=()=>[aa,Sa,ha],N=()=>[``,`none`,`full`,l,$,Q],P=()=>[``,Z,Sa,ha],F=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],I=()=>[Z,aa,wa,ya],le=()=>[``,`none`,m,$,Q],ue=()=>[`none`,Z,$,Q],de=()=>[`none`,Z,$,Q],fe=()=>[Z,$,Q],pe=()=>[ra,`full`,...C()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[oa],breakpoint:[oa],color:[sa],container:[oa],"drop-shadow":[oa],ease:[`in`,`out`,`in-out`],font:[fa],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[oa],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[oa],shadow:[oa],spacing:[`px`,Z],text:[oa],"text-shadow":[oa],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ra,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[pa],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:ee()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ia,`auto`,$,Q]}],basis:[{basis:[ra,`full`,`auto`,s,...C()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,ra,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[ia,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...E(),`normal`]}],"justify-items":[{"justify-items":[...ie(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ie()]}],"align-content":[{content:[`normal`,...E()]}],"align-items":[{items:[...ie(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ie(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":E()}],"place-items":[{"place-items":[...ie(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ie()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":C()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":C()}],"space-y-reverse":[`space-y-reverse`],size:[{size:O()}],"inline-size":[{inline:[`auto`,...k()]}],"min-inline-size":[{"min-inline":[`auto`,...k()]}],"max-inline-size":[{"max-inline":[`none`,...k()]}],"block-size":[{block:[`auto`,...A()]}],"min-block-size":[{"min-block":[`auto`,...A()]}],"max-block-size":[{"max-block":[`none`,...A()]}],w:[{w:[s,`screen`,...O()]}],"min-w":[{"min-w":[s,`screen`,`none`,...O()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...O()]}],h:[{h:[`screen`,`lh`,...O()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...O()]}],"max-h":[{"max-h":[`screen`,`lh`,...O()]}],"font-size":[{text:[`base`,n,Sa,ha]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Oa,_a]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,aa,Q]}],"font-family":[{font:[Ca,va,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,ga]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...F(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,ha]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:C()}],"tab-size":[{tab:[ia,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:se()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ia,$,Q],radial:[``,$,Q],conic:[ia,$,Q]},Ea,ba]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-bs":[{"border-bs":P()}],"border-w-be":[{"border-be":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":P()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...F(),`hidden`,`none`]}],"divide-style":[{divide:[...F(),`hidden`,`none`]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...F(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,Sa,ha]}],"outline-color":[{outline:j()}],shadow:[{shadow:[``,`none`,u,Da,xa]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":[`none`,d,Da,xa]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:P()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Z,ha]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":[`none`,f,Da,xa]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:se()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:le()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Da,xa]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":ee()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:ee()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[ia,$,Q]}],accent:[{accent:j()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...j()]}],"stroke-w":[{stroke:[Z,Sa,ha,ga]}],stroke:[{stroke:[`none`,...j()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Ba(...e){return za(mi(e))}function Va(e){switch(e){case`string`:return`text-blue-500 bg-blue-500/10`;case`number`:case`integer`:return`text-purple-500 bg-purple-500/10`;case`boolean`:return`text-green-500 bg-green-500/10`;case`object`:return`text-orange-500 bg-orange-500/10`;case`array`:return`text-pink-500 bg-pink-500/10`;case`null`:return`text-gray-500 bg-gray-500/10`}}function Ha(e,t){switch(t){case`string`:return e.schemaTypeString;case`number`:return e.schemaTypeNumber;case`integer`:return e.schemaTypeInteger;case`boolean`:return e.schemaTypeBoolean;case`object`:return e.schemaTypeObject;case`array`:return e.schemaTypeArray;case`null`:return e.schemaTypeNull}}var Ua={minimap:{enabled:!1},fontSize:14,fontFamily:`var(--font-sans), 'SF Mono', Monaco, Menlo, Consolas, monospace`,lineNumbers:`on`,roundedSelection:!1,scrollBeyondLastLine:!1,readOnly:!1,automaticLayout:!0,formatOnPaste:!0,formatOnType:!0,tabSize:2,insertSpaces:!0,detectIndentation:!0,folding:!0,foldingStrategy:`indentation`,renderLineHighlight:`all`,matchBrackets:`always`,autoClosingBrackets:`always`,autoClosingQuotes:`always`,guides:{bracketPairs:!0,indentation:!0}};function Wa(){let e=M(!1),t=null,n=()=>{e.value=document.documentElement.classList.contains(`jscb-dark`)};return l(()=>{n(),t=new MutationObserver(n),t.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`style`]})}),h(()=>{t?.disconnect()}),{isDarkMode:e,currentTheme:()=>e.value?`appDarkTheme`:`appLightTheme`,defineMonacoThemes:e=>{e.editor.defineTheme(`appLightTheme`,{base:`vs`,inherit:!0,rules:[{token:`string`,foreground:`3B82F6`},{token:`number`,foreground:`A855F7`},{token:`keyword`,foreground:`3B82F6`},{token:`delimiter`,foreground:`0F172A`},{token:`keyword.json`,foreground:`A855F7`},{token:`string.key.json`,foreground:`2563EB`},{token:`string.value.json`,foreground:`3B82F6`},{token:`boolean`,foreground:`22C55E`},{token:`null`,foreground:`64748B`}],colors:{"editor.background":`#f8fafc`,"editor.foreground":`#0f172a`,"editorCursor.foreground":`#0f172a`,"editor.lineHighlightBackground":`#f1f5f9`,"editorLineNumber.foreground":`#64748b`,"editor.selectionBackground":`#e2e8f0`,"editor.inactiveSelectionBackground":`#e2e8f0`,"editorIndentGuide.background":`#e2e8f0`,"editor.findMatchBackground":`#cbd5e1`,"editor.findMatchHighlightBackground":`#cbd5e133`}}),e.editor.defineTheme(`appDarkTheme`,{base:`vs-dark`,inherit:!0,rules:[{token:`string`,foreground:`3B82F6`},{token:`number`,foreground:`A855F7`},{token:`keyword`,foreground:`3B82F6`},{token:`delimiter`,foreground:`F8FAFC`},{token:`keyword.json`,foreground:`A855F7`},{token:`string.key.json`,foreground:`60A5FA`},{token:`string.value.json`,foreground:`3B82F6`},{token:`boolean`,foreground:`22C55E`},{token:`null`,foreground:`94A3B8`}],colors:{"editor.background":`#0f172a`,"editor.foreground":`#f8fafc`,"editorCursor.foreground":`#f8fafc`,"editor.lineHighlightBackground":`#1e293b`,"editorLineNumber.foreground":`#64748b`,"editor.selectionBackground":`#334155`,"editor.inactiveSelectionBackground":`#334155`,"editorIndentGuide.background":`#1e293b`,"editor.findMatchBackground":`#475569`,"editor.findMatchHighlightBackground":`#47556933`}})},configureJsonDefaults:async(e,t)=>{let n=e?.languages?.json?.jsonDefaults;if(!n)return;let r={validate:!0,allowComments:!1,schemaValidation:`error`,enableSchemaRequest:!1,schemas:t?[{uri:typeof t==`object`&&t.$id?t.$id:`https://jsonjoy-builder/schema`,fileMatch:[`*`],schema:t}]:[{uri:Se.$id,fileMatch:[`*`],schema:Se}]};n.setDiagnosticsOptions(r)},defaultEditorOptions:Ua}}var Ga={key:0,class:`w-full h-full flex items-center justify-center text-muted-foreground text-sm p-4`},Ka=R({__name:`MonacoEditor`,props:{modelValue:{default:``},language:{default:`json`},readOnly:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{expose:t,emit:r}){let i=e,a=r,o=M(null),s=M(!1),{isDarkMode:c,currentTheme:u,defineMonacoThemes:d,configureJsonDefaults:f,defaultEditorOptions:p}=Wa(),m=null,g=null,_=!1,v=null,y=null,b=``;return l(async()=>{if(!o.value)return;let e;try{globalThis.MonacoEnvironment={getWorker(e,t){return t===`json`?new Worker(new URL(`/assets/json.worker-DhD1Scrm.js`,``+import.meta.url),{type:`module`}):new Worker(new URL(`/assets/editor.worker-DwXe4U6w.js`,``+import.meta.url),{type:`module`})}},e=await we(()=>import(`./editor.main-C2Q97Dkk.js`),__vite__mapDeps([0,1,2,3,4,5,6])),m=e}catch{console.warn(`[jsonschema-builder-vue] monaco-editor could not be loaded. Install it with: npm install monaco-editor`),s.value=!0;return}d(e),f(e),b=i.modelValue,g=e.editor.create(o.value,{value:i.modelValue,language:i.language,theme:u(),readOnly:i.readOnly,...p}),D(c,()=>{m&&m.editor.setTheme(u())}),g.onDidChangeModelContent(()=>{_||(g?.getValue()||``)!==b&&(y&&clearTimeout(y),y=setTimeout(()=>{y=null;let e=g?.getValue()||``;e!==b&&(b=e,a(`update:modelValue`,e))},150))})}),D(()=>i.modelValue,e=>{if(g&&e!==b){if(e===g.getValue()){b=e;return}b=e,v!==null&&cancelAnimationFrame(v),v=requestAnimationFrame(()=>{v=null,g&&(_=!0,g.setValue(e),_=!1)})}}),h(()=>{v!==null&&cancelAnimationFrame(v),y&&clearTimeout(y),g?.dispose(),g=null}),t({layout:()=>g?.layout()}),(e,t)=>s.value?(n(),L(`div`,Ga,[...t[0]||=[k(`p`,null,[z(`Monaco Editor not available. Install `),k(`code`,null,`monaco-editor`),z(` to enable the JSON editor.`)],-1)]])):(n(),L(`div`,{key:1,ref_key:`editorContainer`,ref:o,class:`w-full h-full`},null,512))}}),qa={class:`flex items-center justify-between bg-secondary/80 backdrop-blur-xs px-4 py-2 border-b shrink-0`},Ja={class:`flex items-center gap-2`},Ya={class:`font-medium text-sm`},Xa=[`title`],Za={class:`grow flex min-h-0 relative`},Qa=R({__name:`JsonSchemaVisualizer`,props:{class:{}},setup(e){let t=e,r=fi(),i=N(()=>r.schema.value),a=Tt(),o=JSON.stringify(i.value),s=M(JSON.stringify(i.value,null,2));D(i,e=>{let t=JSON.stringify(e);t!==o&&(o=t,s.value=JSON.stringify(e,null,2))});function c(e){try{let t=JSON.parse(e),n=JSON.stringify(t);if(n===o)return;o=n,r.replaceSchema(t)}catch{}}function l(){let e=JSON.stringify(i.value,null,2),t=new Blob([e],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=a.visualizerDownloadFileName,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}return(e,r)=>(n(),L(`div`,{class:p(A(Ba)(`relative overflow-hidden flex-1 min-h-0 flex flex-col`,t.class,`jscb`))},[k(`div`,qa,[k(`div`,Ja,[g(A(Re),{size:18}),k(`span`,Ya,u(A(a).visualizerSource),1)]),k(`button`,{type:`button`,onClick:l,class:`p-1.5 hover:bg-secondary rounded-md transition-colors`,title:A(a).visualizerDownloadTitle},[g(A(Le),{size:16})],8,Xa)]),k(`div`,Za,[g(Ka,{"model-value":s.value,"onUpdate:modelValue":c,language:`json`},null,8,[`model-value`])])],2))}}),$a=T.extend({name:`tag`,style:`
|
|
153
|
+
.p-tag {
|
|
154
|
+
display: inline-flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
background: dt('tag.primary.background');
|
|
158
|
+
color: dt('tag.primary.color');
|
|
159
|
+
font-size: dt('tag.font.size');
|
|
160
|
+
font-weight: dt('tag.font.weight');
|
|
161
|
+
padding: dt('tag.padding');
|
|
162
|
+
border-radius: dt('tag.border.radius');
|
|
163
|
+
gap: dt('tag.gap');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.p-tag-icon {
|
|
167
|
+
font-size: dt('tag.icon.size');
|
|
168
|
+
width: dt('tag.icon.size');
|
|
169
|
+
height: dt('tag.icon.size');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.p-tag-rounded {
|
|
173
|
+
border-radius: dt('tag.rounded.border.radius');
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.p-tag-success {
|
|
177
|
+
background: dt('tag.success.background');
|
|
178
|
+
color: dt('tag.success.color');
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.p-tag-info {
|
|
182
|
+
background: dt('tag.info.background');
|
|
183
|
+
color: dt('tag.info.color');
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.p-tag-warn {
|
|
187
|
+
background: dt('tag.warn.background');
|
|
188
|
+
color: dt('tag.warn.color');
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.p-tag-danger {
|
|
192
|
+
background: dt('tag.danger.background');
|
|
193
|
+
color: dt('tag.danger.color');
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.p-tag-secondary {
|
|
197
|
+
background: dt('tag.secondary.background');
|
|
198
|
+
color: dt('tag.secondary.color');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.p-tag-contrast {
|
|
202
|
+
background: dt('tag.contrast.background');
|
|
203
|
+
color: dt('tag.contrast.color');
|
|
204
|
+
}
|
|
205
|
+
`,classes:{root:function(e){var t=e.props;return[`p-tag p-component`,{"p-tag-info":t.severity===`info`,"p-tag-success":t.severity===`success`,"p-tag-warn":t.severity===`warn`,"p-tag-danger":t.severity===`danger`,"p-tag-secondary":t.severity===`secondary`,"p-tag-contrast":t.severity===`contrast`,"p-tag-rounded":t.rounded}]},icon:`p-tag-icon`,label:`p-tag-label`}}),eo={name:`BaseTag`,extends:te,props:{value:null,severity:null,rounded:Boolean,icon:String},style:$a,provide:function(){return{$pcTag:this,$parentInstance:this}}};function to(e){"@babel/helpers - typeof";return to=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},to(e)}function no(e,t,n){return(t=ro(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ro(e){var t=io(e,`string`);return to(t)==`symbol`?t:t+``}function io(e,t){if(to(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(to(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ao={name:`Tag`,extends:eo,inheritAttrs:!1,computed:{dataP:function(){return v(no({rounded:this.rounded},this.severity,this.severity))}}},oo=[`data-p`];function so(e,t,r,i,a,o){return n(),L(`span`,d({class:e.cx(`root`),"data-p":o.dataP},e.ptmi(`root`)),[e.$slots.icon?(n(),O(c(e.$slots.icon),d({key:0,class:e.cx(`icon`)},e.ptm(`icon`)),null,16,[`class`])):e.icon?(n(),L(`span`,d({key:1,class:[e.cx(`icon`),e.icon]},e.ptm(`icon`)),null,16)):w(``,!0),e.value!=null||e.$slots.default?y(e.$slots,`default`,{key:2},function(){return[k(`span`,d({class:e.cx(`label`)},e.ptm(`label`)),u(e.value),17)]}):w(``,!0)],16,oo)}ao.render=so;var co=R({__name:`Badge`,props:{variant:{default:`default`}},setup(e){let t=e,r=N(()=>{switch(t.variant){case`destructive`:return`danger`;case`secondary`:return`secondary`;case`outline`:return`info`;default:return}});return(e,t)=>(n(),O(A(ao),{severity:r.value,rounded:``},{default:F(()=>[y(e.$slots,`default`)]),_:3},8,[`severity`]))}}),lo=R({__name:`Button`,props:{variant:{default:`default`},size:{default:`default`},type:{default:`button`}},emits:[`click`],setup(e,{emit:t}){let r=t;return(t,i)=>(n(),O(A(me),{type:e.type,severity:e.variant===`destructive`?`danger`:e.variant===`secondary`?`secondary`:void 0,outlined:e.variant===`outline`,text:e.variant===`ghost`||e.variant===`link`,link:e.variant===`link`,size:e.size===`sm`?`small`:e.size===`lg`?`large`:void 0,onClick:i[0]||=e=>r(`click`,e)},{default:F(()=>[y(t.$slots,`default`)]),_:3},8,[`type`,`severity`,`outlined`,`text`,`link`,`size`]))}}),uo=R({__name:`Dialog`,props:{visible:{type:Boolean},header:{},modal:{type:Boolean,default:!0},class:{}},emits:[`update:visible`],setup(e,{emit:t}){let r=e,i=t;return(e,t)=>(n(),O(A(ye),{visible:r.visible,header:r.header,modal:r.modal,closable:!0,class:p(r.class),"append-to":`body`,pt:{mask:{class:`jscb`}},"onUpdate:visible":t[0]||=e=>i(`update:visible`,e)},ne({default:F(()=>[y(e.$slots,`default`)]),_:2},[e.$slots.header?{name:`header`,fn:F(()=>[y(e.$slots,`header`)]),key:`0`}:void 0,e.$slots.footer?{name:`footer`,fn:F(()=>[y(e.$slots,`footer`)]),key:`1`}:void 0]),1032,[`visible`,`header`,`modal`,`class`]))}}),fo=R({__name:`InputField`,props:ae({id:{},type:{},placeholder:{},disabled:{type:Boolean},class:{},min:{},step:{},required:{type:Boolean},autofocus:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:ae([`blur`,`keydown`,`focus`],[`update:modelValue`]),setup(e,{emit:t}){let r=t,i=m(e,`modelValue`);return(t,a)=>(n(),O(A(De),{modelValue:i.value,"onUpdate:modelValue":a[0]||=e=>i.value=e,id:e.id,type:e.type,placeholder:e.placeholder,disabled:e.disabled,class:p(t.$props.class),min:e.min,step:e.step,required:e.required,autofocus:e.autofocus,onBlur:a[1]||=e=>r(`blur`,e),onKeydown:a[2]||=e=>r(`keydown`,e),onFocus:a[3]||=e=>r(`focus`,e),fluid:``},null,8,[`modelValue`,`id`,`type`,`placeholder`,`disabled`,`class`,`min`,`step`,`required`,`autofocus`]))}}),po=[`id`],mo=[`title`,`onClick`],ho={class:`font-medium text-sm`},go={class:`text-xs text-muted-foreground line-clamp-1`},_o=R({__name:`SchemaTypeSelector`,props:{id:{},modelValue:{}},emits:[`update:modelValue`],setup(e,{emit:t}){let r=t,i=[{id:`integer`,label:`fieldTypeIntegerLabel`,description:`fieldTypeIntegerDescription`},{id:`number`,label:`fieldTypeNumberLabel`,description:`fieldTypeNumberDescription`},{id:`string`,label:`fieldTypeTextLabel`,description:`fieldTypeTextDescription`},{id:`boolean`,label:`fieldTypeBooleanLabel`,description:`fieldTypeBooleanDescription`},{id:`object`,label:`fieldTypeObjectLabel`,description:`fieldTypeObjectDescription`},{id:`array`,label:`fieldTypeArrayLabel`,description:`fieldTypeArrayDescription`}],a=Tt();return(t,s)=>(n(),L(`div`,{id:e.id,class:`grid grid-cols-1 xs:grid-cols-2 md:grid-cols-3 gap-2`},[(n(),L(E,null,o(i,t=>k(`button`,{key:t.id,type:`button`,title:A(a)[t.description],class:p(A(Ba)(`p-2.5 rounded-lg border-2 text-left transition-all duration-200`,e.modelValue===t.id?`border-primary bg-primary/5 shadow-xs`:`border-border hover:border-primary/30 hover:bg-secondary`)),onClick:e=>r(`update:modelValue`,t.id)},[k(`div`,ho,u(A(a)[t.label]),1),k(`div`,go,u(A(a)[t.description]),1)],10,mo)),64))],8,po))}}),vo={class:`mb-4`},yo={class:`text-xl flex flex-wrap items-center gap-2`},bo={class:`text-sm text-muted-foreground mt-1`},xo={class:`grid grid-cols-1 lg:grid-cols-2 gap-6`},So={class:`space-y-4 min-w-[280px]`},Co={class:`flex flex-wrap items-center gap-2 mb-1.5`},wo=[`for`],To={class:`flex flex-wrap items-center gap-2 mb-1.5`},Eo=[`for`],Do={class:`flex items-center gap-3 p-3 rounded-lg border border-border bg-secondary`},Oo=[`id`],ko=[`for`],Ao={key:0,class:`flex items-center gap-3 p-3 rounded-lg border border-border bg-secondary`},jo=[`id`],Mo=[`for`],No={class:`space-y-4 min-w-[280px]`},Po={class:`flex flex-wrap items-center gap-2 mb-1.5`},Fo=[`for`],Io={class:`rounded-lg border bg-muted/50 p-3 hidden md:block`},Lo={class:`text-xs font-medium mb-2`},Ro={class:`text-sm bg-background/80 p-2 rounded block overflow-x-auto`},zo={class:`mt-6 gap-2 flex-wrap flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`},Bo=R({__name:`AddFieldButton`,props:{path:{},variant:{default:`primary`}},setup(e){let t=e,r=fi(),i=M(!1),o=M(``),s=M(`string`),c=M(``),l=M(!1),d=M(!0),f=S(),p=S(),m=S(),h=S(),_=S(),v=Tt();function y(e){e.preventDefault(),o.value.trim()&&(r.addProperty(t.path,{name:o.value,type:s.value,description:c.value,required:l.value,additionalProperties:s.value===`object`?d.value:void 0}),o.value=``,s.value=`string`,c.value=``,l.value=!1,i.value=!1,d.value=!0)}return(t,r)=>{let b=a(`tooltip`);return n(),L(E,null,[g(lo,{type:`button`,onClick:r[0]||=e=>i.value=!0,variant:e.variant===`primary`?`default`:`outline`,size:`sm`,class:`flex items-center gap-1.5 group`},{default:F(()=>[g(A(Ie),{size:16,class:`group-hover:scale-110 transition-transform`}),k(`span`,null,u(A(v).fieldAddNewButton),1)]),_:1},8,[`variant`]),g(uo,{visible:i.value,"onUpdate:visible":r[7]||=e=>i.value=e,class:`md:max-w-[1200px] max-h-[85vh] w-[95vw] p-4 sm:p-6 jscb`},{header:F(()=>[k(`div`,vo,[k(`div`,yo,[z(u(A(v).fieldAddNewLabel)+` `,1),g(co,{variant:`secondary`,class:`text-xs`},{default:F(()=>[z(u(A(v).fieldAddNewBadge),1)]),_:1})]),k(`p`,bo,u(A(v).fieldAddNewDescription),1)])]),default:F(()=>[k(`form`,{onSubmit:y,class:`space-y-6`},[k(`div`,xo,[k(`div`,So,[k(`div`,null,[k(`div`,Co,[k(`label`,{for:A(f),class:`text-sm font-medium`},u(A(v).fieldNameLabel),9,wo),fe(g(A(ze),{class:`h-4 w-4 text-muted-foreground shrink-0`},null,512),[[b,A(v).fieldNameTooltip]])]),g(fo,{id:A(f),modelValue:o.value,"onUpdate:modelValue":r[1]||=e=>o.value=e,placeholder:A(v).fieldNamePlaceholder,class:`font-mono text-sm w-full`,required:!0},null,8,[`id`,`modelValue`,`placeholder`])]),k(`div`,null,[k(`div`,To,[k(`label`,{for:A(p),class:`text-sm font-medium`},u(A(v).fieldDescription),9,Eo),fe(g(A(ze),{class:`h-4 w-4 text-muted-foreground shrink-0`},null,512),[[b,A(v).fieldDescriptionTooltip]])]),g(fo,{id:A(p),modelValue:c.value,"onUpdate:modelValue":r[2]||=e=>c.value=e,placeholder:A(v).fieldDescriptionPlaceholder,class:`text-sm w-full`},null,8,[`id`,`modelValue`,`placeholder`])]),k(`div`,Do,[fe(k(`input`,{type:`checkbox`,id:A(m),"onUpdate:modelValue":r[3]||=e=>l.value=e,class:`rounded border-border accent-primary shrink-0`},null,8,Oo),[[be,l.value]]),k(`label`,{for:A(m),class:`text-sm text-foreground`},u(A(v).fieldRequiredLabel),9,ko)]),s.value===`object`?(n(),L(`div`,Ao,[fe(k(`input`,{type:`checkbox`,id:A(_),"onUpdate:modelValue":r[4]||=e=>d.value=e,class:`rounded border-border accent-primary shrink-0`},null,8,jo),[[be,d.value]]),k(`label`,{for:A(_),class:`text-sm`},u(A(v).additionalPropertiesAllow),9,Mo),fe(g(A(ze),{class:`h-4 w-4 text-muted-foreground shrink-0`},null,512),[[b,A(v).additionalPropertiesTooltip]])])):w(``,!0)]),k(`div`,No,[k(`div`,null,[k(`div`,Po,[k(`label`,{for:A(h),class:`text-sm font-medium`},u(A(v).fieldType),9,Fo),fe(g(A(Fe),{class:`h-4 w-4 text-muted-foreground shrink-0`},null,512),[[b,A(v).fieldTypeTooltipString]])]),g(_o,{id:A(h),modelValue:s.value,"onUpdate:modelValue":r[5]||=e=>s.value=e},null,8,[`id`,`modelValue`])]),k(`div`,Io,[k(`p`,Lo,u(A(v).fieldTypeExample),1),k(`code`,Ro,[s.value===`integer`?(n(),L(E,{key:0},[z(`42`)],64)):s.value===`number`?(n(),L(E,{key:1},[z(`3.14`)],64)):s.value===`string`?(n(),L(E,{key:2},[z(`"example"`)],64)):s.value===`boolean`?(n(),L(E,{key:3},[z(`true`)],64)):s.value===`object`?(n(),L(E,{key:4},[z(`{ "key": "value" }`)],64)):s.value===`array`?(n(),L(E,{key:5},[z(`["item1", "item2"]`)],64)):w(``,!0)])])])]),k(`div`,zo,[g(lo,{type:`button`,variant:`outline`,size:`sm`,onClick:r[6]||=e=>i.value=!1},{default:F(()=>[z(u(A(v).fieldAddNewCancel),1)]),_:1}),g(lo,{type:`submit`,size:`sm`},{default:F(()=>[z(u(A(v).fieldAddNewConfirm),1)]),_:1})])],32)]),_:1},8,[`visible`])],64)}}});function Vo(e){if(!ei(e)||!e.properties)return[];let t=e.required||[];return Object.entries(e.properties).map(([e,n])=>({name:e,schema:n,required:t.includes(e)}))}function Ho(e){return $r(e)||e.type!==`array`?null:e.items||null}function Uo(e,t,n,r){return!(e!==void 0&&n!==void 0&&e>n||t&&r&&n-e<2||(t||r)&&n-e<1)}function Wo(e){return Kr.object({minLength:Kr.number().int({message:e.typeValidationErrorIntValue}).min(0,{message:e.typeValidationErrorNegativeLength}).optional(),maxLength:Kr.number().int({message:e.typeValidationErrorIntValue}).min(0,{message:e.typeValidationErrorNegativeLength}).optional(),pattern:Zr.shape.pattern,format:Zr.shape.format,enum:Zr.shape.enum,contentMediaType:Zr.shape.contentMediaType,contentEncoding:Zr.shape.contentEncoding}).refine(({minLength:e,maxLength:t})=>Uo(e,!1,t,!1),{message:e.stringValidationErrorLengthRange,path:[`length`]})}function Go(e){return Kr.object({multipleOf:Kr.number().positive({message:e.typeValidationErrorPositive}).optional(),minimum:Zr.shape.minimum,maximum:Zr.shape.maximum,exclusiveMinimum:Zr.shape.exclusiveMinimum,exclusiveMaximum:Zr.shape.exclusiveMaximum,enum:Zr.shape.enum}).refine(({minimum:e,exclusiveMinimum:t,maximum:n,exclusiveMaximum:r})=>Uo(e,!1,n,!1)&&Uo(e,!1,r,!0)&&Uo(t,!0,n,!1)&&Uo(t,!0,r,!0),{message:e.numberValidationErrorMinMax,path:[`minMax`]}).refine(({minimum:e,exclusiveMinimum:t})=>t===void 0||e===void 0,{message:e.numberValidationErrorBothExclusiveAndInclusiveMin,path:[`redundantMinimum`]}).refine(({maximum:e,exclusiveMaximum:t})=>t===void 0||e===void 0,{message:e.numberValidationErrorBothExclusiveAndInclusiveMax,path:[`redundantMaximum`]}).refine(({enum:e,minimum:t,maximum:n,exclusiveMinimum:r,exclusiveMaximum:i})=>!e||e.length===0?!0:e.every(e=>!(typeof e!=`number`||t!==void 0&&e<t||n!==void 0&&e>n||r!==void 0&&e<=r||i!==void 0&&e>=i)),{message:e.numberValidationErrorEnumOutOfRange,path:[`enum`]})}function Ko(e){return Kr.object({minItems:Kr.number().int({message:e.typeValidationErrorIntValue}).min(0,{message:e.typeValidationErrorNegativeLength}).optional(),maxItems:Kr.number().int({message:e.typeValidationErrorIntValue}).min(0,{message:e.typeValidationErrorNegativeLength}).optional(),uniqueItems:Kr.boolean().optional(),minContains:Kr.number().int({message:e.typeValidationErrorIntValue}).min(0,{message:e.typeValidationErrorNegativeLength}).optional(),maxContains:Kr.number().int({message:e.typeValidationErrorIntValue}).min(0,{message:e.typeValidationErrorNegativeLength}).optional()}).refine(({minItems:e,maxItems:t})=>Uo(e,!1,t,!1),{message:e.arrayValidationErrorMinMax,path:[`minmax`]}).refine(({minContains:e,maxContains:t})=>Uo(e,!1,t,!1),{message:e.arrayValidationErrorContainsMinMax,path:[`minmaxContains`]})}function qo(e){return Kr.object({minProperties:Kr.number().int({message:e.typeValidationErrorIntValue}).min(0,{message:e.typeValidationErrorNegativeLength}).optional(),maxProperties:Kr.number().int({message:e.typeValidationErrorIntValue}).min(0,{message:e.typeValidationErrorNegativeLength}).optional()}).refine(({minProperties:e,maxProperties:t})=>Uo(e,!1,t,!1),{message:e.objectValidationErrorMinMax,path:[`minmax`]})}function Jo(e,t){return{string:Wo(t),number:Go(t),array:Ko(t),object:qo(t)}[e]||Kr.any()}function Yo(e,t,n){let r=Jo(t,n).safeParse(e);return r.success?{success:!0}:{success:!1,errors:r.error.issues}}function Xo(e,t){let n=e=>{if(!e||typeof e!=`object`)return;let t=e.type;if(typeof t==`string`)return t;if(Array.isArray(t)&&t.length>0&&typeof t[0]==`string`)return t[0]};if(typeof e==`boolean`){let n=e===!0?{success:!0}:{success:!1,errors:[{code:`custom`,message:t.validatorErrorSchemaValidation,path:[]}]};return{name:String(e),validation:n,children:{},cumulativeChildrenErrors:n.success?0:n.errors?.length??0}}let r=e,i=n(r),a=Yo(e,i??`object`,t),o={};if(i===`object`){let e=r.properties;if(e&&typeof e==`object`)for(let[n,r]of Object.entries(e))o[n]=Xo(r,t);if(r.patternProperties&&typeof r.patternProperties==`object`)for(let[e,n]of Object.entries(r.patternProperties))o[`pattern:${e}`]=Xo(n,t)}if(i===`array`){let e=r.items;Array.isArray(e)?e.forEach((e,n)=>{o[`items[${n}]`]=Xo(e,t)}):e&&(o.items=Xo(e,t)),Array.isArray(r.prefixItems)&&r.prefixItems.forEach((e,n)=>{o[`prefixItems[${n}]`]=Xo(e,t)})}for(let e of[`allOf`,`anyOf`,`oneOf`]){let n=r[e];Array.isArray(n)&&n.forEach((n,r)=>{o[[e,r].join(`:`)]=Xo(n,t)})}if(r.not&&(o.not=Xo(r.not,t)),r.$defs&&typeof r.$defs==`object`)for(let[e,n]of Object.entries(r.$defs))o[`$defs:${e}`]=Xo(n,t);let s=r.definitions;if(s&&typeof s==`object`)for(let[e,n]of Object.entries(s))o[`definitions:${e}`]=Xo(n,t);let c=a.success?0:a.errors?.length??0,l=Object.values(o).reduce((e,t)=>e+t.cumulativeChildrenErrors,0);return{name:i??`unknown`,validation:a,children:o,cumulativeChildrenErrors:c+l}}var Zo=R({__name:`ButtonToggle`,props:{class:{}},emits:[`click`],setup(e,{emit:t}){let r=t;return(e,t)=>(n(),O(A(me),{type:`button`,class:p(A(Ba)(`text-xs px-2 py-1 min-w-[80px] whitespace-nowrap`,e.$props.class)),size:`small`,text:``,onClick:t[0]||=e=>r(`click`,e)},{default:F(()=>[y(e.$slots,`default`)]),_:3},8,[`class`]))}}),Qo=R({__name:`TypeDropdown`,props:{modelValue:{},class:{},readOnly:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let r=e,i=t,a=Tt(),o=[`integer`,`number`,`string`,`boolean`,`object`,`array`],s=N(()=>o.map(e=>({value:e,label:Ha(a,e),color:Va(e)}))),c=N(()=>s.value.find(e=>e.value===r.modelValue));function l(e){i(`update:modelValue`,e.value)}return(t,r)=>(n(),O(A(Oe),{"model-value":e.modelValue,onChange:l,options:s.value,"option-label":`label`,"option-value":`value`,disabled:e.readOnly,"append-to":`body`,class:p([`text-xs`,[t.$props.class]]),pt:{root:{style:`min-width: 92px; padding: 0.25rem 0.5rem; font-size: 0.75rem;`},label:{style:`padding: 0.25rem 0; font-size: 0.75rem; font-weight: 500;`,class:c.value?.color},option:{style:`font-size: 0.75rem; padding: 0.375rem 0.75rem;`},overlay:{class:`jscb`}}},{option:F(({option:e})=>[k(`span`,{class:p([`px-2 py-0.5 rounded text-xs font-medium`,[e.color]])},u(e.label),3)]),value:F(({value:e})=>[e?(n(),L(`span`,{key:0,class:p([`text-xs font-medium`,[A(Va)(e)]])},u(A(Ha)(A(a),e)),3)):w(``,!0)]),_:1},8,[`model-value`,`options`,`disabled`,`class`,`pt`]))}}),$o={name:`AngleDownIcon`,extends:j};function es(e){return is(e)||rs(e)||ns(e)||ts()}function ts(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
206
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ns(e,t){if(e){if(typeof e==`string`)return as(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?as(e,t):void 0}}function rs(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function is(e){if(Array.isArray(e))return as(e)}function as(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function os(e,t,r,i,a,o){return n(),L(`svg`,d({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),es(t[0]||=[k(`path`,{d:`M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z`,fill:`currentColor`},null,-1)]),16)}$o.render=os;var ss={name:`AngleUpIcon`,extends:j};function cs(e){return fs(e)||ds(e)||us(e)||ls()}function ls(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
207
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function us(e,t){if(e){if(typeof e==`string`)return ps(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ps(e,t):void 0}}function ds(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function fs(e){if(Array.isArray(e))return ps(e)}function ps(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ms(e,t,r,i,a,o){return n(),L(`svg`,d({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),cs(t[0]||=[k(`path`,{d:`M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z`,fill:`currentColor`},null,-1)]),16)}ss.render=ms;var hs=T.extend({name:`inputnumber`,style:`
|
|
208
|
+
.p-inputnumber {
|
|
209
|
+
display: inline-flex;
|
|
210
|
+
position: relative;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.p-inputnumber-button {
|
|
214
|
+
display: flex;
|
|
215
|
+
align-items: center;
|
|
216
|
+
justify-content: center;
|
|
217
|
+
flex: 0 0 auto;
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
background: dt('inputnumber.button.background');
|
|
220
|
+
color: dt('inputnumber.button.color');
|
|
221
|
+
width: dt('inputnumber.button.width');
|
|
222
|
+
transition:
|
|
223
|
+
background dt('inputnumber.transition.duration'),
|
|
224
|
+
color dt('inputnumber.transition.duration'),
|
|
225
|
+
border-color dt('inputnumber.transition.duration'),
|
|
226
|
+
outline-color dt('inputnumber.transition.duration');
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.p-inputnumber-button:disabled {
|
|
230
|
+
cursor: auto;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.p-inputnumber-button:not(:disabled):hover {
|
|
234
|
+
background: dt('inputnumber.button.hover.background');
|
|
235
|
+
color: dt('inputnumber.button.hover.color');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.p-inputnumber-button:not(:disabled):active {
|
|
239
|
+
background: dt('inputnumber.button.active.background');
|
|
240
|
+
color: dt('inputnumber.button.active.color');
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.p-inputnumber-stacked .p-inputnumber-button {
|
|
244
|
+
position: relative;
|
|
245
|
+
flex: 1 1 auto;
|
|
246
|
+
border: 0 none;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.p-inputnumber-stacked .p-inputnumber-button-group {
|
|
250
|
+
display: flex;
|
|
251
|
+
flex-direction: column;
|
|
252
|
+
position: absolute;
|
|
253
|
+
inset-block-start: 1px;
|
|
254
|
+
inset-inline-end: 1px;
|
|
255
|
+
height: calc(100% - 2px);
|
|
256
|
+
z-index: 1;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.p-inputnumber-stacked .p-inputnumber-increment-button {
|
|
260
|
+
padding: 0;
|
|
261
|
+
border-start-end-radius: calc(dt('inputnumber.button.border.radius') - 1px);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.p-inputnumber-stacked .p-inputnumber-decrement-button {
|
|
265
|
+
padding: 0;
|
|
266
|
+
border-end-end-radius: calc(dt('inputnumber.button.border.radius') - 1px);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.p-inputnumber-stacked .p-inputnumber-input {
|
|
270
|
+
padding-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.p-inputnumber-horizontal .p-inputnumber-button {
|
|
274
|
+
border: 1px solid dt('inputnumber.button.border.color');
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.p-inputnumber-horizontal .p-inputnumber-button:hover {
|
|
278
|
+
border-color: dt('inputnumber.button.hover.border.color');
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.p-inputnumber-horizontal .p-inputnumber-button:active {
|
|
282
|
+
border-color: dt('inputnumber.button.active.border.color');
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.p-inputnumber-horizontal .p-inputnumber-increment-button {
|
|
286
|
+
order: 3;
|
|
287
|
+
border-start-end-radius: dt('inputnumber.button.border.radius');
|
|
288
|
+
border-end-end-radius: dt('inputnumber.button.border.radius');
|
|
289
|
+
border-inline-start: 0 none;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.p-inputnumber-horizontal .p-inputnumber-input {
|
|
293
|
+
order: 2;
|
|
294
|
+
border-radius: 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.p-inputnumber-horizontal .p-inputnumber-decrement-button {
|
|
298
|
+
order: 1;
|
|
299
|
+
border-start-start-radius: dt('inputnumber.button.border.radius');
|
|
300
|
+
border-end-start-radius: dt('inputnumber.button.border.radius');
|
|
301
|
+
border-inline-end: 0 none;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.p-floatlabel:has(.p-inputnumber-horizontal) label {
|
|
305
|
+
margin-inline-start: dt('inputnumber.button.width');
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.p-inputnumber-vertical {
|
|
309
|
+
flex-direction: column;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.p-inputnumber-vertical .p-inputnumber-button {
|
|
313
|
+
border: 1px solid dt('inputnumber.button.border.color');
|
|
314
|
+
padding: dt('inputnumber.button.vertical.padding');
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.p-inputnumber-vertical .p-inputnumber-button:hover {
|
|
318
|
+
border-color: dt('inputnumber.button.hover.border.color');
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.p-inputnumber-vertical .p-inputnumber-button:active {
|
|
322
|
+
border-color: dt('inputnumber.button.active.border.color');
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.p-inputnumber-vertical .p-inputnumber-increment-button {
|
|
326
|
+
order: 1;
|
|
327
|
+
border-start-start-radius: dt('inputnumber.button.border.radius');
|
|
328
|
+
border-start-end-radius: dt('inputnumber.button.border.radius');
|
|
329
|
+
width: 100%;
|
|
330
|
+
border-block-end: 0 none;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.p-inputnumber-vertical .p-inputnumber-input {
|
|
334
|
+
order: 2;
|
|
335
|
+
border-radius: 0;
|
|
336
|
+
text-align: center;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.p-inputnumber-vertical .p-inputnumber-decrement-button {
|
|
340
|
+
order: 3;
|
|
341
|
+
border-end-start-radius: dt('inputnumber.button.border.radius');
|
|
342
|
+
border-end-end-radius: dt('inputnumber.button.border.radius');
|
|
343
|
+
width: 100%;
|
|
344
|
+
border-block-start: 0 none;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.p-inputnumber-input {
|
|
348
|
+
flex: 1 1 auto;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.p-inputnumber-fluid {
|
|
352
|
+
width: 100%;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.p-inputnumber-fluid .p-inputnumber-input {
|
|
356
|
+
width: 1%;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.p-inputnumber-fluid.p-inputnumber-vertical .p-inputnumber-input {
|
|
360
|
+
width: 100%;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.p-inputnumber:has(.p-inputtext-sm) .p-inputnumber-button .p-icon {
|
|
364
|
+
font-size: dt('form.field.sm.font.size');
|
|
365
|
+
width: dt('form.field.sm.font.size');
|
|
366
|
+
height: dt('form.field.sm.font.size');
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.p-inputnumber:has(.p-inputtext-lg) .p-inputnumber-button .p-icon {
|
|
370
|
+
font-size: dt('form.field.lg.font.size');
|
|
371
|
+
width: dt('form.field.lg.font.size');
|
|
372
|
+
height: dt('form.field.lg.font.size');
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.p-inputnumber-clear-icon {
|
|
376
|
+
position: absolute;
|
|
377
|
+
top: 50%;
|
|
378
|
+
margin-top: -0.5rem;
|
|
379
|
+
cursor: pointer;
|
|
380
|
+
inset-inline-end: dt('form.field.padding.x');
|
|
381
|
+
color: dt('form.field.icon.color');
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.p-inputnumber:has(.p-inputnumber-clear-icon) .p-inputnumber-input {
|
|
385
|
+
padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.p-inputnumber-stacked .p-inputnumber-clear-icon {
|
|
389
|
+
inset-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.p-inputnumber-stacked:has(.p-inputnumber-clear-icon) .p-inputnumber-input {
|
|
393
|
+
padding-inline-end: calc(dt('inputnumber.button.width') + (dt('form.field.padding.x') * 2) + dt('icon.size'));
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.p-inputnumber-horizontal .p-inputnumber-clear-icon {
|
|
397
|
+
inset-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
|
|
398
|
+
}
|
|
399
|
+
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-inputnumber p-component p-inputwrapper`,{"p-invalid":t.$invalid,"p-inputwrapper-filled":t.$filled||n.allowEmpty===!1,"p-inputwrapper-focus":t.focused,"p-inputnumber-stacked":n.showButtons&&n.buttonLayout===`stacked`,"p-inputnumber-horizontal":n.showButtons&&n.buttonLayout===`horizontal`,"p-inputnumber-vertical":n.showButtons&&n.buttonLayout===`vertical`,"p-inputnumber-fluid":t.$fluid}]},pcInputText:`p-inputnumber-input`,clearIcon:`p-inputnumber-clear-icon`,buttonGroup:`p-inputnumber-button-group`,incrementButton:function(e){var t=e.instance,n=e.props;return[`p-inputnumber-button p-inputnumber-increment-button`,{"p-disabled":n.showButtons&&n.max!==null&&t.maxBoundry()}]},decrementButton:function(e){var t=e.instance,n=e.props;return[`p-inputnumber-button p-inputnumber-decrement-button`,{"p-disabled":n.showButtons&&n.min!==null&&t.minBoundry()}]}}}),gs={name:`BaseInputNumber`,extends:Ee,props:{format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:`stacked`},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:void 0},incrementIcon:{type:String,default:void 0},decrementButtonIcon:{type:String,default:void 0},decrementIcon:{type:String,default:void 0},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:`decimal`},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},roundingMode:{type:String,default:`halfExpand`,validator:function(e){return[`ceil`,`floor`,`expand`,`trunc`,`halfCeil`,`halfFloor`,`halfExpand`,`halfTrunc`,`halfEven`].includes(e)}},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},highlightOnFocus:{type:Boolean,default:!1},showClear:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},required:{type:Boolean,default:!1}},style:hs,provide:function(){return{$pcInputNumber:this,$parentInstance:this}}};function _s(e){"@babel/helpers - typeof";return _s=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_s(e)}function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ys(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vs(Object(n),!0).forEach(function(t){bs(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bs(e,t,n){return(t=xs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xs(e){var t=Ss(e,`string`);return _s(t)==`symbol`?t:t+``}function Ss(e,t){if(_s(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_s(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Cs(e){return Ds(e)||Es(e)||Ts(e)||ws()}function ws(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
400
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ts(e,t){if(e){if(typeof e==`string`)return Os(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Os(e,t):void 0}}function Es(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ds(e){if(Array.isArray(e))return Os(e)}function Os(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ks={name:`InputNumber`,extends:gs,inheritAttrs:!1,emits:[`input`,`focus`,`blur`],inject:{$pcFluid:{default:null}},numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:``,isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data:function(){return{d_modelValue:this.d_value,focused:!1}},watch:{d_value:{immediate:!0,handler:function(e){var t;this.d_modelValue=e,(t=this.$refs.clearIcon)!=null&&(t=t.$el)!=null&&t.style&&(this.$refs.clearIcon.$el.style.display=f(e)?`none`:`block`)}},locale:function(e,t){this.updateConstructParser(e,t)},localeMatcher:function(e,t){this.updateConstructParser(e,t)},mode:function(e,t){this.updateConstructParser(e,t)},currency:function(e,t){this.updateConstructParser(e,t)},currencyDisplay:function(e,t){this.updateConstructParser(e,t)},useGrouping:function(e,t){this.updateConstructParser(e,t)},minFractionDigits:function(e,t){this.updateConstructParser(e,t)},maxFractionDigits:function(e,t){this.updateConstructParser(e,t)},suffix:function(e,t){this.updateConstructParser(e,t)},prefix:function(e,t){this.updateConstructParser(e,t)}},created:function(){this.constructParser()},mounted:function(){var e;(e=this.$refs.clearIcon)!=null&&(e=e.$el)!=null&&e.style&&(this.$refs.clearIcon.$el.style.display=this.$filled?`block`:`none`)},methods:{getOptions:function(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits,roundingMode:this.roundingMode}},constructParser:function(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());var e=Cs(new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)).reverse(),t=new Map(e.map(function(e,t){return[e,t]}));this._numeral=RegExp(`[${e.join(``)}]`,`g`),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=function(e){return t.get(e)}},updateConstructParser:function(e,t){e!==t&&this.constructParser()},escapeRegExp:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)},getDecimalExpression:function(){var e=new Intl.NumberFormat(this.locale,ys(ys({},this.getOptions()),{},{useGrouping:!1})),t=e.format(1.1);return t===e.format(1)?RegExp(`[]`,`g`):RegExp(`[${t.replace(this._currency,``).trim().replace(this._numeral,``)}]`,`g`)},getGroupingExpression:function(){return this.groupChar=new Intl.NumberFormat(this.locale,{useGrouping:!0}).format(1e6).trim().replace(this._numeral,``).charAt(0),RegExp(`[${this.groupChar}]`,`g`)},getMinusSignExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return RegExp(`[${e.format(-1).trim().replace(this._numeral,``)}]`,`g`)},getCurrencyExpression:function(){if(this.currency){var e=new Intl.NumberFormat(this.locale,{style:`currency`,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});return RegExp(`[${e.format(1).replace(/\s/g,``).replace(this._numeral,``).replace(this._group,``)}]`,`g`)}return RegExp(`[]`,`g`)},getPrefixExpression:function(){return this.prefix?this.prefixChar=this.prefix:this.prefixChar=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay}).format(1).split(`1`)[0],RegExp(`${this.escapeRegExp(this.prefixChar||``)}`,`g`)},getSuffixExpression:function(){return this.suffix?this.suffixChar=this.suffix:this.suffixChar=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode}).format(1).split(`1`)[1],RegExp(`${this.escapeRegExp(this.suffixChar||``)}`,`g`)},formatValue:function(e){if(e!=null){if(e===`-`)return e;if(this.format){var t=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(t=this.prefix+t),this.suffix&&(t+=this.suffix),t}return e.toString()}return``},parseValue:function(e){var t=e.replace(this._suffix,``).replace(this._prefix,``).trim().replace(/\s/g,``).replace(this._currency,``).replace(this._group,``).replace(this._minusSign,`-`).replace(this._decimal,`.`).replace(this._numeral,this._index);if(t){if(t===`-`)return t;var n=+t;return isNaN(n)?null:n}return null},repeat:function(e,t,n){var r=this;if(!this.readonly){var i=t||500;this.clearTimer(),this.timer=setTimeout(function(){r.repeat(e,40,n)},i),this.spin(e,n)}},addWithPrecision:function(e,t){var n=e.toString(),r=t.toString(),i=n.includes(`.`)?n.split(`.`)[1].length:0,a=r.includes(`.`)?r.split(`.`)[1].length:0,o=10**Math.max(i,a);return Math.round((e+t)*o)/o},spin:function(e,t){if(this.$refs.input){var n=this.step*t,r=this.parseValue(this.$refs.input.$el.value)||0,i=this.validateValue(this.addWithPrecision(r,n));this.updateInput(i,null,`spin`),this.updateModel(e,i),this.handleOnInput(e,r,i)}},onUpButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp:function(){this.disabled||this.clearTimer()},onUpButtonMouseLeave:function(){this.disabled||this.clearTimer()},onUpButtonKeyUp:function(){this.disabled||this.clearTimer()},onUpButtonKeyDown:function(e){(e.code===`Space`||e.code===`Enter`||e.code===`NumpadEnter`)&&this.repeat(e,null,1)},onDownButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp:function(){this.disabled||this.clearTimer()},onDownButtonMouseLeave:function(){this.disabled||this.clearTimer()},onDownButtonKeyUp:function(){this.disabled||this.clearTimer()},onDownButtonKeyDown:function(e){(e.code===`Space`||e.code===`Enter`||e.code===`NumpadEnter`)&&this.repeat(e,null,-1)},onUserInput:function(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown:function(e){if(!this.readonly&&!e.isComposing){if(e.altKey||e.ctrlKey||e.metaKey){this.isSpecialChar=!0,this.lastValue=this.$refs.input.$el.value;return}this.lastValue=e.target.value;var t=e.target.selectionStart,n=e.target.selectionEnd,r=n-t,a=e.target.value,o=null;switch(e.code||e.key){case`ArrowUp`:this.spin(e,1),e.preventDefault();break;case`ArrowDown`:this.spin(e,-1),e.preventDefault();break;case`ArrowLeft`:if(r>1){var s=this.isNumeralChar(a.charAt(t))?t+1:t+2;this.$refs.input.$el.setSelectionRange(s,s)}else this.isNumeralChar(a.charAt(t-1))||e.preventDefault();break;case`ArrowRight`:if(r>1){var c=n-1;this.$refs.input.$el.setSelectionRange(c,c)}else this.isNumeralChar(a.charAt(t))||e.preventDefault();break;case`Tab`:case`Enter`:case`NumpadEnter`:o=this.validateValue(this.parseValue(a)),this.$refs.input.$el.value=this.formatValue(o),this.$refs.input.$el.setAttribute(`aria-valuenow`,o),this.updateModel(e,o);break;case`Backspace`:if(e.preventDefault(),t===n){t>=a.length&&this.suffixChar!==null&&(t=a.length-this.suffixChar.length,this.$refs.input.$el.setSelectionRange(t,t));var l=a.charAt(t-1),u=this.getDecimalCharIndexes(a),d=u.decimalCharIndex,f=u.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(l)){var p=this.getDecimalLength(a);if(this._group.test(l))this._group.lastIndex=0,o=a.slice(0,t-2)+a.slice(t-1);else if(this._decimal.test(l))this._decimal.lastIndex=0,p?this.$refs.input.$el.setSelectionRange(t-1,t-1):o=a.slice(0,t-1)+a.slice(t);else if(d>0&&t>d){var m=this.isDecimalMode()&&(this.minFractionDigits||0)<p?``:`0`;o=a.slice(0,t-1)+m+a.slice(t)}else f===1?(o=a.slice(0,t-1)+`0`+a.slice(t),o=this.parseValue(o)>0?o:``):o=a.slice(0,t-1)+a.slice(t)}this.updateValue(e,o,null,`delete-single`)}else o=this.deleteRange(a,t,n),this.updateValue(e,o,null,`delete-range`);break;case`Delete`:if(e.preventDefault(),t===n){var h=a.charAt(t),g=this.getDecimalCharIndexes(a),_=g.decimalCharIndex,v=g.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(h)){var y=this.getDecimalLength(a);if(this._group.test(h))this._group.lastIndex=0,o=a.slice(0,t)+a.slice(t+2);else if(this._decimal.test(h))this._decimal.lastIndex=0,y?this.$refs.input.$el.setSelectionRange(t+1,t+1):o=a.slice(0,t)+a.slice(t+1);else if(_>0&&t>_){var b=this.isDecimalMode()&&(this.minFractionDigits||0)<y?``:`0`;o=a.slice(0,t)+b+a.slice(t+1)}else v===1?(o=a.slice(0,t)+`0`+a.slice(t+1),o=this.parseValue(o)>0?o:``):o=a.slice(0,t)+a.slice(t+1)}this.updateValue(e,o,null,`delete-back-single`)}else o=this.deleteRange(a,t,n),this.updateValue(e,o,null,`delete-range`);break;case`Home`:e.preventDefault(),i(this.min)&&this.updateModel(e,this.min);break;case`End`:e.preventDefault(),i(this.max)&&this.updateModel(e,this.max);break}}},onInputKeyPress:function(e){if(!this.readonly){var t=e.key,n=this.isDecimalSign(t),r=this.isMinusSign(t);e.code!==`Enter`&&e.preventDefault(),(Number(t)>=0&&Number(t)<=9||r||n)&&this.insert(e,t,{isDecimalSign:n,isMinusSign:r})}},onPaste:function(e){if(!(this.readonly||this.disabled)){e.preventDefault();var t=(e.clipboardData||window.clipboardData).getData(`Text`);if(!(this.inputId===`integeronly`&&/[^\d-]/.test(t))&&t){var n=this.parseValue(t);n!=null&&this.insert(e,n.toString())}}},onClearClick:function(e){this.updateModel(e,null),this.$refs.input.$el.focus()},allowMinusSign:function(){return this.min===null||this.min<0},isMinusSign:function(e){return this._minusSign.test(e)||e===`-`?(this._minusSign.lastIndex=0,!0):!1},isDecimalSign:function(e){var t;return(t=this.locale)!=null&&t.includes(`fr`)&&[`.`,`,`].includes(e)||this._decimal.test(e)?(this._decimal.lastIndex=0,!0):!1},isDecimalMode:function(){return this.mode===`decimal`},getDecimalCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.replace(this._prefix,``).trim().replace(/\s/g,``).replace(this._currency,``).search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:t,decimalCharIndexWithoutPrefix:n}},getCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.search(this._minusSign);this._minusSign.lastIndex=0;var r=e.search(this._suffix);this._suffix.lastIndex=0;var i=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:t,minusCharIndex:n,suffixCharIndex:r,currencyCharIndex:i}},insert:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{isDecimalSign:!1,isMinusSign:!1},r=t.search(this._minusSign);if(this._minusSign.lastIndex=0,!(!this.allowMinusSign()&&r!==-1)){var i=this.$refs.input.$el.selectionStart,a=this.$refs.input.$el.selectionEnd,o=this.$refs.input.$el.value.trim(),s=this.getCharIndexes(o),c=s.decimalCharIndex,l=s.minusCharIndex,u=s.suffixCharIndex,d=s.currencyCharIndex,f;if(n.isMinusSign){var p=l===-1;(i===0||i===d+1)&&(f=o,(p||a!==0)&&(f=this.insertText(o,t,0,a)),this.updateValue(e,f,t,`insert`))}else if(n.isDecimalSign)c>0&&i===c?this.updateValue(e,o,t,`insert`):(c>i&&c<a||c===-1&&this.maxFractionDigits)&&(f=this.insertText(o,t,i,a),this.updateValue(e,f,t,`insert`));else{var m=this.numberFormat.resolvedOptions().maximumFractionDigits,h=i===a?`insert`:`range-insert`;if(c>0&&i>c){if(i+t.length-(c+1)<=m){var g=d>=i?d-1:u>=i?u:o.length;f=o.slice(0,i)+t+o.slice(i+t.length,g)+o.slice(g),this.updateValue(e,f,t,h)}}else f=this.insertText(o,t,i,a),this.updateValue(e,f,t,h)}}},insertText:function(e,t,n,r){if((t===`.`?t:t.split(`.`)).length===2){var i=e.slice(n,r).search(this._decimal);return this._decimal.lastIndex=0,i>0?e.slice(0,n)+this.formatValue(t)+e.slice(r):this.formatValue(t)||e}else if(r-n===e.length)return this.formatValue(t);else if(n===0)return t+e.slice(r);else if(r===e.length)return e.slice(0,n)+t;else return e.slice(0,n)+t+e.slice(r)},deleteRange:function(e,t,n){return n-t===e.length?``:t===0?e.slice(n):n===e.length?e.slice(0,t):e.slice(0,t)+e.slice(n)},initCursor:function(){var e=this.$refs.input.$el.selectionStart,t=this.$refs.input.$el.value,n=t.length,r=null,i=(this.prefixChar||``).length;t=t.replace(this._prefix,``),e-=i;var a=t.charAt(e);if(this.isNumeralChar(a))return e+i;for(var o=e-1;o>=0;)if(a=t.charAt(o),this.isNumeralChar(a)){r=o+i;break}else o--;if(r!==null)this.$refs.input.$el.setSelectionRange(r+1,r+1);else{for(o=e;o<n;)if(a=t.charAt(o),this.isNumeralChar(a)){r=o+i;break}else o++;r!==null&&this.$refs.input.$el.setSelectionRange(r,r)}return r||0},onInputClick:function(){var e=this.$refs.input.$el.value;!this.readonly&&e!==t()&&this.initCursor()},isNumeralChar:function(e){return e.length===1&&(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e))?(this.resetRegex(),!0):!1},resetRegex:function(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue:function(e,t,n,r){var i=this.$refs.input.$el.value,a=null;t!=null&&(a=this.parseValue(t),a=!a&&!this.allowEmpty?0:a,this.updateInput(a,n,r,t),this.handleOnInput(e,i,a))},handleOnInput:function(e,t,n){if(this.isValueChanged(t,n)){var r,i;this.$emit(`input`,{originalEvent:e,value:n,formattedValue:t}),(r=(i=this.formField).onInput)==null||r.call(i,{originalEvent:e,value:n})}},isValueChanged:function(e,t){return t===null&&e!==null?!0:t==null?!1:t!==(typeof e==`string`?this.parseValue(e):e)},validateValue:function(e){return e===`-`||e==null?null:this.min!=null&&e<this.min?this.min:this.max!=null&&e>this.max?this.max:e},updateInput:function(e,t,n,r){var i;t||=``;var a=this.$refs.input.$el.value,o=this.formatValue(e),s=a.length;if(o!==r&&(o=this.concatValues(o,r)),s===0){this.$refs.input.$el.value=o,this.$refs.input.$el.setSelectionRange(0,0);var c=this.initCursor()+t.length;this.$refs.input.$el.setSelectionRange(c,c)}else{var l=this.$refs.input.$el.selectionStart,u=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=o;var d=o.length;if(n===`range-insert`){var p=this.parseValue((a||``).slice(0,l)),m=(p===null?``:p.toString()).split(``).join(`(${this.groupChar})?`),h=new RegExp(m,`g`);h.test(o);var g=t.split(``).join(`(${this.groupChar})?`),_=new RegExp(g,`g`);_.test(o.slice(h.lastIndex)),u=h.lastIndex+_.lastIndex,this.$refs.input.$el.setSelectionRange(u,u)}else if(d===s)n===`insert`||n===`delete-back-single`?this.$refs.input.$el.setSelectionRange(u+1,u+1):n===`delete-single`?this.$refs.input.$el.setSelectionRange(u-1,u-1):(n===`delete-range`||n===`spin`)&&this.$refs.input.$el.setSelectionRange(u,u);else if(n===`delete-back-single`){var v=a.charAt(u-1),y=a.charAt(u),b=s-d,ee=this._group.test(y);ee&&b===1?u+=1:!ee&&this.isNumeralChar(v)&&(u+=-1*b+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(u,u)}else if(a===`-`&&n===`insert`){this.$refs.input.$el.setSelectionRange(0,0);var x=this.initCursor()+t.length+1;this.$refs.input.$el.setSelectionRange(x,x)}else u+=d-s,this.$refs.input.$el.setSelectionRange(u,u)}this.$refs.input.$el.setAttribute(`aria-valuenow`,e),(i=this.$refs.clearIcon)!=null&&(i=i.$el)!=null&&i.style&&(this.$refs.clearIcon.$el.style.display=f(o)?`none`:`block`)},concatValues:function(e,t){if(e&&t){var n=t.search(this._decimal);return this._decimal.lastIndex=0,this.suffixChar?n===-1?e:e.replace(this.suffixChar,``).split(this._decimal)[0]+t.replace(this.suffixChar,``).slice(n)+this.suffixChar:n===-1?e:e.split(this._decimal)[0]+t.slice(n)}return e},getDecimalLength:function(e){if(e){var t=e.split(this._decimal);if(t.length===2)return t[1].replace(this._suffix,``).trim().replace(/\s/g,``).replace(this._currency,``).length}return 0},updateModel:function(e,t){this.writeValue(t,e)},onInputFocus:function(e){this.focused=!0,!this.disabled&&!this.readonly&&this.$refs.input.$el.value!==t()&&this.highlightOnFocus&&e.target.select(),this.$emit(`focus`,e)},onInputBlur:function(e){var t,n;this.focused=!1;var r=e.target,i=this.validateValue(this.parseValue(r.value));this.$emit(`blur`,{originalEvent:e,value:r.value}),(t=(n=this.formField).onBlur)==null||t.call(n,e),r.value=this.formatValue(i),r.setAttribute(`aria-valuenow`,i),this.updateModel(e,i),!this.disabled&&!this.readonly&&this.highlightOnFocus&&_e()},clearTimer:function(){this.timer&&clearTimeout(this.timer)},maxBoundry:function(){return this.d_value>=this.max},minBoundry:function(){return this.d_value<=this.min}},computed:{upButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onUpButtonMouseDown(t)},mouseup:function(t){return e.onUpButtonMouseUp(t)},mouseleave:function(t){return e.onUpButtonMouseLeave(t)},keydown:function(t){return e.onUpButtonKeyDown(t)},keyup:function(t){return e.onUpButtonKeyUp(t)}}},downButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onDownButtonMouseDown(t)},mouseup:function(t){return e.onDownButtonMouseUp(t)},mouseleave:function(t){return e.onDownButtonMouseLeave(t)},keydown:function(t){return e.onDownButtonKeyDown(t)},keyup:function(t){return e.onDownButtonKeyUp(t)}}},formattedValue:function(){var e=!this.d_value&&!this.allowEmpty?0:this.d_value;return this.formatValue(e)},getFormatter:function(){return this.numberFormat},dataP:function(){return v(bs(bs({invalid:this.$invalid,fluid:this.$fluid,filled:this.$variant===`filled`},this.size,this.size),this.buttonLayout,this.showButtons&&this.buttonLayout))}},components:{InputText:De,AngleUpIcon:ss,AngleDownIcon:$o,TimesIcon:ve}},As=[`data-p`],js=[`data-p`],Ms=[`disabled`,`data-p`],Ns=[`disabled`,`data-p`],Ps=[`disabled`,`data-p`],Fs=[`disabled`,`data-p`];function Is(e,t,r,i,a,o){var l=ee(`InputText`),u=ee(`TimesIcon`);return n(),L(`span`,d({class:e.cx(`root`)},e.ptmi(`root`),{"data-p":o.dataP}),[g(l,{ref:`input`,id:e.inputId,name:e.$formName,role:`spinbutton`,class:p([e.cx(`pcInputText`),e.inputClass]),style:s(e.inputStyle),defaultValue:o.formattedValue,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":e.d_value,inputmode:e.mode===`decimal`&&!e.minFractionDigits?`numeric`:`decimal`,disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,required:e.required,size:e.size,invalid:e.invalid,variant:e.variant,onInput:o.onUserInput,onKeydown:o.onInputKeyDown,onKeypress:o.onInputKeyPress,onPaste:o.onPaste,onClick:o.onInputClick,onFocus:o.onInputFocus,onBlur:o.onInputBlur,pt:e.ptm(`pcInputText`),unstyled:e.unstyled,"data-p":o.dataP},null,8,`id.name.class.style.defaultValue.aria-valuemin.aria-valuemax.aria-valuenow.inputmode.disabled.readonly.placeholder.aria-labelledby.aria-label.required.size.invalid.variant.onInput.onKeydown.onKeypress.onPaste.onClick.onFocus.onBlur.pt.unstyled.data-p`.split(`.`)),e.showClear&&e.buttonLayout!==`vertical`?y(e.$slots,`clearicon`,{key:0,class:p(e.cx(`clearIcon`)),clearCallback:o.onClearClick},function(){return[g(u,d({ref:`clearIcon`,class:[e.cx(`clearIcon`)],onClick:o.onClearClick},e.ptm(`clearIcon`)),null,16,[`class`,`onClick`])]}):w(``,!0),e.showButtons&&e.buttonLayout===`stacked`?(n(),L(`span`,d({key:1,class:e.cx(`buttonGroup`)},e.ptm(`buttonGroup`),{"data-p":o.dataP}),[y(e.$slots,`incrementbutton`,{listeners:o.upButtonListeners},function(){return[k(`button`,d({class:[e.cx(`incrementButton`),e.incrementButtonClass]},x(o.upButtonListeners,!0),{disabled:e.disabled,tabindex:-1,"aria-hidden":`true`,type:`button`},e.ptm(`incrementButton`),{"data-p":o.dataP}),[y(e.$slots,e.$slots.incrementicon?`incrementicon`:`incrementbuttonicon`,{},function(){return[(n(),O(c(e.incrementIcon||e.incrementButtonIcon?`span`:`AngleUpIcon`),d({class:[e.incrementIcon,e.incrementButtonIcon]},e.ptm(`incrementIcon`),{"data-pc-section":`incrementicon`}),null,16,[`class`]))]})],16,Ms)]}),y(e.$slots,`decrementbutton`,{listeners:o.downButtonListeners},function(){return[k(`button`,d({class:[e.cx(`decrementButton`),e.decrementButtonClass]},x(o.downButtonListeners,!0),{disabled:e.disabled,tabindex:-1,"aria-hidden":`true`,type:`button`},e.ptm(`decrementButton`),{"data-p":o.dataP}),[y(e.$slots,e.$slots.decrementicon?`decrementicon`:`decrementbuttonicon`,{},function(){return[(n(),O(c(e.decrementIcon||e.decrementButtonIcon?`span`:`AngleDownIcon`),d({class:[e.decrementIcon,e.decrementButtonIcon]},e.ptm(`decrementIcon`),{"data-pc-section":`decrementicon`}),null,16,[`class`]))]})],16,Ns)]})],16,js)):w(``,!0),y(e.$slots,`incrementbutton`,{listeners:o.upButtonListeners},function(){return[e.showButtons&&e.buttonLayout!==`stacked`?(n(),L(`button`,d({key:0,class:[e.cx(`incrementButton`),e.incrementButtonClass]},x(o.upButtonListeners,!0),{disabled:e.disabled,tabindex:-1,"aria-hidden":`true`,type:`button`},e.ptm(`incrementButton`),{"data-p":o.dataP}),[y(e.$slots,e.$slots.incrementicon?`incrementicon`:`incrementbuttonicon`,{},function(){return[(n(),O(c(e.incrementIcon||e.incrementButtonIcon?`span`:`AngleUpIcon`),d({class:[e.incrementIcon,e.incrementButtonIcon]},e.ptm(`incrementIcon`),{"data-pc-section":`incrementicon`}),null,16,[`class`]))]})],16,Ps)):w(``,!0)]}),y(e.$slots,`decrementbutton`,{listeners:o.downButtonListeners},function(){return[e.showButtons&&e.buttonLayout!==`stacked`?(n(),L(`button`,d({key:0,class:[e.cx(`decrementButton`),e.decrementButtonClass]},x(o.downButtonListeners,!0),{disabled:e.disabled,tabindex:-1,"aria-hidden":`true`,type:`button`},e.ptm(`decrementButton`),{"data-p":o.dataP}),[y(e.$slots,e.$slots.decrementicon?`decrementicon`:`decrementbuttonicon`,{},function(){return[(n(),O(c(e.decrementIcon||e.decrementButtonIcon?`span`:`AngleDownIcon`),d({class:[e.decrementIcon,e.decrementButtonIcon]},e.ptm(`decrementIcon`),{"data-pc-section":`decrementicon`}),null,16,[`class`]))]})],16,Fs)):w(``,!0)]})],16,As)}ks.render=Is;var Ls=[`for`],Rs=R({__name:`Label`,props:{for:{},class:{}},setup(e){return(e,t)=>(n(),L(`label`,{for:e.$props.for,class:p([`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,[e.$props.class]])},[y(e.$slots,`default`)],10,Ls))}}),zs=T.extend({name:`toggleswitch`,style:`
|
|
401
|
+
.p-toggleswitch {
|
|
402
|
+
display: inline-block;
|
|
403
|
+
width: dt('toggleswitch.width');
|
|
404
|
+
height: dt('toggleswitch.height');
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.p-toggleswitch-input {
|
|
408
|
+
cursor: pointer;
|
|
409
|
+
appearance: none;
|
|
410
|
+
position: absolute;
|
|
411
|
+
top: 0;
|
|
412
|
+
inset-inline-start: 0;
|
|
413
|
+
width: 100%;
|
|
414
|
+
height: 100%;
|
|
415
|
+
padding: 0;
|
|
416
|
+
margin: 0;
|
|
417
|
+
opacity: 0;
|
|
418
|
+
z-index: 1;
|
|
419
|
+
outline: 0 none;
|
|
420
|
+
border-radius: dt('toggleswitch.border.radius');
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.p-toggleswitch-slider {
|
|
424
|
+
cursor: pointer;
|
|
425
|
+
width: 100%;
|
|
426
|
+
height: 100%;
|
|
427
|
+
border-width: dt('toggleswitch.border.width');
|
|
428
|
+
border-style: solid;
|
|
429
|
+
border-color: dt('toggleswitch.border.color');
|
|
430
|
+
background: dt('toggleswitch.background');
|
|
431
|
+
transition:
|
|
432
|
+
background dt('toggleswitch.transition.duration'),
|
|
433
|
+
color dt('toggleswitch.transition.duration'),
|
|
434
|
+
border-color dt('toggleswitch.transition.duration'),
|
|
435
|
+
outline-color dt('toggleswitch.transition.duration'),
|
|
436
|
+
box-shadow dt('toggleswitch.transition.duration');
|
|
437
|
+
border-radius: dt('toggleswitch.border.radius');
|
|
438
|
+
outline-color: transparent;
|
|
439
|
+
box-shadow: dt('toggleswitch.shadow');
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.p-toggleswitch-handle {
|
|
443
|
+
position: absolute;
|
|
444
|
+
top: 50%;
|
|
445
|
+
display: flex;
|
|
446
|
+
justify-content: center;
|
|
447
|
+
align-items: center;
|
|
448
|
+
background: dt('toggleswitch.handle.background');
|
|
449
|
+
color: dt('toggleswitch.handle.color');
|
|
450
|
+
width: dt('toggleswitch.handle.size');
|
|
451
|
+
height: dt('toggleswitch.handle.size');
|
|
452
|
+
inset-inline-start: dt('toggleswitch.gap');
|
|
453
|
+
margin-block-start: calc(-1 * calc(dt('toggleswitch.handle.size') / 2));
|
|
454
|
+
border-radius: dt('toggleswitch.handle.border.radius');
|
|
455
|
+
transition:
|
|
456
|
+
background dt('toggleswitch.transition.duration'),
|
|
457
|
+
color dt('toggleswitch.transition.duration'),
|
|
458
|
+
inset-inline-start dt('toggleswitch.slide.duration'),
|
|
459
|
+
box-shadow dt('toggleswitch.slide.duration');
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {
|
|
463
|
+
background: dt('toggleswitch.checked.background');
|
|
464
|
+
border-color: dt('toggleswitch.checked.border.color');
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-handle {
|
|
468
|
+
background: dt('toggleswitch.handle.checked.background');
|
|
469
|
+
color: dt('toggleswitch.handle.checked.color');
|
|
470
|
+
inset-inline-start: calc(dt('toggleswitch.width') - calc(dt('toggleswitch.handle.size') + dt('toggleswitch.gap')));
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {
|
|
474
|
+
background: dt('toggleswitch.hover.background');
|
|
475
|
+
border-color: dt('toggleswitch.hover.border.color');
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-handle {
|
|
479
|
+
background: dt('toggleswitch.handle.hover.background');
|
|
480
|
+
color: dt('toggleswitch.handle.hover.color');
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {
|
|
484
|
+
background: dt('toggleswitch.checked.hover.background');
|
|
485
|
+
border-color: dt('toggleswitch.checked.hover.border.color');
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-handle {
|
|
489
|
+
background: dt('toggleswitch.handle.checked.hover.background');
|
|
490
|
+
color: dt('toggleswitch.handle.checked.hover.color');
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {
|
|
494
|
+
box-shadow: dt('toggleswitch.focus.ring.shadow');
|
|
495
|
+
outline: dt('toggleswitch.focus.ring.width') dt('toggleswitch.focus.ring.style') dt('toggleswitch.focus.ring.color');
|
|
496
|
+
outline-offset: dt('toggleswitch.focus.ring.offset');
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.p-toggleswitch.p-invalid > .p-toggleswitch-slider {
|
|
500
|
+
border-color: dt('toggleswitch.invalid.border.color');
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.p-toggleswitch.p-disabled {
|
|
504
|
+
opacity: 1;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.p-toggleswitch.p-disabled .p-toggleswitch-slider {
|
|
508
|
+
background: dt('toggleswitch.disabled.background');
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.p-toggleswitch.p-disabled .p-toggleswitch-handle {
|
|
512
|
+
background: dt('toggleswitch.handle.disabled.background');
|
|
513
|
+
}
|
|
514
|
+
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-toggleswitch p-component`,{"p-toggleswitch-checked":t.checked,"p-disabled":n.disabled,"p-invalid":t.$invalid}]},input:`p-toggleswitch-input`,slider:`p-toggleswitch-slider`,handle:`p-toggleswitch-handle`},inlineStyles:{root:{position:`relative`}}}),Bs={name:`ToggleSwitch`,extends:{name:`BaseToggleSwitch`,extends:Te,props:{trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},readonly:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:zs,provide:function(){return{$pcToggleSwitch:this,$parentInstance:this}}},inheritAttrs:!1,emits:[`change`,`focus`,`blur`],methods:{getPTOptions:function(e){return(e===`root`?this.ptmi:this.ptm)(e,{context:{checked:this.checked,disabled:this.disabled}})},onChange:function(e){if(!this.disabled&&!this.readonly){var t=this.checked?this.falseValue:this.trueValue;this.writeValue(t,e),this.$emit(`change`,e)}},onFocus:function(e){this.$emit(`focus`,e)},onBlur:function(e){var t,n;this.$emit(`blur`,e),(t=(n=this.formField).onBlur)==null||t.call(n,e)}},computed:{checked:function(){return this.d_value===this.trueValue},dataP:function(){return v({checked:this.checked,disabled:this.disabled,invalid:this.$invalid})}}},Vs=[`data-p-checked`,`data-p-disabled`,`data-p`],Hs=[`id`,`checked`,`tabindex`,`disabled`,`readonly`,`aria-checked`,`aria-labelledby`,`aria-label`,`aria-invalid`],Us=[`data-p`],Ws=[`data-p`];function Gs(e,t,r,i,a,o){return n(),L(`div`,d({class:e.cx(`root`),style:e.sx(`root`)},o.getPTOptions(`root`),{"data-p-checked":o.checked,"data-p-disabled":e.disabled,"data-p":o.dataP}),[k(`input`,d({id:e.inputId,type:`checkbox`,role:`switch`,class:[e.cx(`input`),e.inputClass],style:e.inputStyle,checked:o.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,"aria-checked":o.checked,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-invalid":e.invalid||void 0,onFocus:t[0]||=function(){return o.onFocus&&o.onFocus.apply(o,arguments)},onBlur:t[1]||=function(){return o.onBlur&&o.onBlur.apply(o,arguments)},onChange:t[2]||=function(){return o.onChange&&o.onChange.apply(o,arguments)}},o.getPTOptions(`input`)),null,16,Hs),k(`div`,d({class:e.cx(`slider`)},o.getPTOptions(`slider`),{"data-p":o.dataP}),[k(`div`,d({class:e.cx(`handle`)},o.getPTOptions(`handle`),{"data-p":o.dataP}),[y(e.$slots,`handle`,{checked:o.checked})],16,Ws)],16,Us)],16,Vs)}Bs.render=Gs;var Ks=R({__name:`Switch`,props:ae({id:{},disabled:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=m(e,`modelValue`);return(r,i)=>(n(),O(A(Bs),{modelValue:t.value,"onUpdate:modelValue":i[0]||=e=>t.value=e,"input-id":e.id,disabled:e.disabled},null,8,[`modelValue`,`input-id`,`disabled`]))}}),qs={class:`space-y-6`},Js={key:0,class:`flex flex-wrap gap-4 p-3 rounded-lg border border-border bg-secondary`},Ys=[`checked`,`disabled`,`title`],Xs={key:0,class:`flex items-center gap-2`},Zs={class:`text-sm text-foreground`},Qs=[`value`,`disabled`],$s={value:`has-one`},ec={value:`has-many`},tc={key:1,class:`grid grid-cols-1 md:grid-cols-2 gap-4`},nc={key:0,class:`flex flex-col gap-2`},rc=[`for`],ic={key:1,class:`flex flex-col gap-2`},ac=[`for`],oc={key:2,class:`text-xs text-red-500 italic md:col-span-2 whitespace-pre-line`},sc={key:2,class:`flex items-center space-x-2`},cc={class:`flex items-center justify-between mb-4`},lc=R({__name:`ArrayEditor`,props:{schema:{type:[Boolean,Object]},path:{},readOnly:{type:Boolean,default:!1},validationNode:{},depth:{default:0},insideNested:{type:Boolean,default:!1}},emits:[`change`],setup(e,{emit:t}){let r=e,i=t,a=Tt(),o=M(X(r.schema,e=>e.minItems??null,null)),c=M(X(r.schema,e=>e.maxItems??null,null)),l=M(X(r.schema,e=>e.uniqueItems||!1,!1)),d=N(()=>Ho(r.schema)||{type:`string`}),f=M(X(d.value,e=>e.nested?.enabled===!0,!1)),m=M(X(d.value,e=>e.nested?.relation||`has-many`,`has-many`)),h=S(),_=S(),v=S(),y=N(()=>X(d.value,e=>e.type||`string`,`string`)),b=N(()=>y.value===`object`);function ee(e={}){let t={type:`array`,...$r(r.schema)?{}:Ce(r.schema),minItems:e.minItems??o.value??void 0,maxItems:e.maxItems??c.value??void 0,uniqueItems:(e.uniqueItems??l.value)||void 0};t.items===void 0&&d.value&&(t.items=d.value);let n={};for(let[e,r]of Object.entries(t))r!==void 0&&(n[e]=r);return n}function x(){i(`change`,ee())}function C(e){i(`change`,{type:`array`,...$r(r.schema)?{}:Ce(r.schema),items:e})}function te(e){let t=d.value,n=$r(t)?{type:e}:Ce(t);n.type=e,e!==`object`&&(delete n.nested,f.value=!1),C(n)}function ne(){f.value=!f.value,re()}function T(){re()}function re(){let e=d.value,t=$r(e)?{}:Ce(e);f.value?t.nested={enabled:!0,relation:m.value}:delete t.nested,C(t)}let E=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`minmax`)?.message),ie=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`minItems`)?.message),D=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`maxItems`)?.message);return(t,r)=>(n(),L(`div`,qs,[b.value?(n(),L(`div`,Js,[k(`label`,{class:p([`flex items-center gap-2 text-sm text-foreground`,{"opacity-50 cursor-not-allowed":e.insideNested}])},[k(`input`,{type:`checkbox`,checked:f.value,disabled:e.readOnly||e.insideNested,onChange:ne,class:`rounded border-border accent-primary`,title:e.insideNested?`Only one level of nesting is supported`:``},null,40,Ys),k(`span`,null,u(A(a).nestedEnabledLabel),1)],2),f.value?(n(),L(`div`,Xs,[k(`label`,Zs,u(A(a).nestedRelationLabel),1),k(`select`,{value:m.value,disabled:e.readOnly,onChange:r[0]||=e=>{m.value=e.target.value,T()},class:`text-sm border border-border rounded px-2 py-1 bg-background text-foreground`},[k(`option`,$s,u(A(a).hasOneRelation),1),k(`option`,ec,u(A(a).hasManyRelation),1)],40,Qs)])):w(``,!0)])):w(``,!0),!e.readOnly||c.value||o.value?(n(),L(`div`,tc,[!e.readOnly||o.value?(n(),L(`div`,nc,[k(`label`,{for:A(h),class:p([`text-sm font-medium`,[(!!E.value||!!ie.value)&&`text-red-500`]])},u(A(a).arrayMinimumLabel),11,rc),g(A(ks),{"input-id":A(h),"model-value":o.value,"onUpdate:modelValue":r[1]||=e=>{o.value=e},onBlur:r[2]||=e=>x(),placeholder:A(a).arrayMinimumPlaceholder,min:0,invalid:!!E.value||!!ie.value,disabled:e.readOnly,fluid:``,size:`small`,"show-buttons":``},null,8,[`input-id`,`model-value`,`placeholder`,`invalid`,`disabled`])])):w(``,!0),!e.readOnly||c.value?(n(),L(`div`,ic,[k(`label`,{for:A(_),class:p([`text-sm font-medium`,[(!!E.value||!!D.value)&&`text-red-500`]])},u(A(a).arrayMaximumLabel),11,ac),g(A(ks),{"input-id":A(_),"model-value":c.value,"onUpdate:modelValue":r[3]||=e=>{c.value=e},onBlur:r[4]||=e=>x(),placeholder:A(a).arrayMaximumPlaceholder,min:0,invalid:!!E.value||!!D.value,disabled:e.readOnly,fluid:``,size:`small`,"show-buttons":``},null,8,[`input-id`,`model-value`,`placeholder`,`invalid`,`disabled`])])):w(``,!0),E.value||ie.value||D.value?(n(),L(`div`,oc,u([E.value,ie.value??D.value].filter(Boolean).join(`
|
|
515
|
+
`)),1)):w(``,!0)])):w(``,!0),!e.readOnly||l.value?(n(),L(`div`,sc,[g(Ks,{id:A(v),"model-value":l.value,"onUpdate:modelValue":r[5]||=e=>{let t=e??!1;l.value=t,i(`change`,ee({uniqueItems:t}))}},null,8,[`id`,`model-value`]),g(Rs,{for:A(v),class:`cursor-pointer`},{default:F(()=>[z(u(A(a).arrayForceUniqueItemsLabel),1)]),_:1},8,[`for`])])):w(``,!0),k(`div`,{class:`space-y-2 pt-4`,style:s(!e.readOnly||o.value||c.value||l.value?`border-top: 1px solid var(--p-content-border-color)`:``)},[k(`div`,cc,[g(Rs,null,{default:F(()=>[z(u(A(a).arrayItemTypeLabel),1)]),_:1}),g(Qo,{"read-only":e.readOnly,"model-value":y.value,"onUpdate:modelValue":te},null,8,[`read-only`,`model-value`])]),g(eu,{"read-only":e.readOnly,schema:d.value,path:e.path,"validation-node":e.validationNode,depth:e.depth+1,onChange:C},null,8,[`read-only`,`schema`,`path`,`validation-node`,`depth`])],4)]))}}),uc={class:`space-y-4`},dc={key:0,class:`text-sm text-muted-foreground italic`},fc={key:1,class:`space-y-2 pt-2`},pc={class:`space-y-3`},mc={class:`flex items-center space-x-2`},hc={class:`flex items-center space-x-2`},gc={key:1,class:`text-xs text-amber-600 mt-2`},_c=R({__name:`BooleanEditor`,props:{schema:{type:[Boolean,Object]},path:{},readOnly:{type:Boolean,default:!1},validationNode:{},depth:{default:0}},emits:[`change`],setup(e,{emit:t}){let r=e,i=t,a=Tt(),o=S(),s=S();function c(){return X(r.schema,e=>e.enum,null)}let l=()=>Array.isArray(c());function d(){return!l()||c()?.includes(!0)||!1}function f(){return!l()||c()?.includes(!1)||!1}function p(e,t){let n;if(t){if(!l()||c()?.includes(e))return;n=c()?[...c(),e]:[e],n.includes(!0)&&n.includes(!1)&&(n=void 0)}else{if(l()&&!c()?.includes(e))return;n=[!e]}let r={type:`boolean`};if(n)r.enum=n;else{i(`change`,{type:`boolean`});return}i(`change`,r)}function m(){let e=c();return e&&e.length>0}return(t,r)=>(n(),L(`div`,uc,[e.readOnly&&!m()?(n(),L(`p`,dc,u(A(a).booleanNoConstraint),1)):w(``,!0),!e.readOnly||!d()||!f()?(n(),L(`div`,fc,[!e.readOnly||m()?(n(),L(E,{key:0},[g(Rs,null,{default:F(()=>[z(u(A(a).booleanAllowedValuesLabel),1)]),_:1}),k(`div`,pc,[k(`div`,mc,[g(Ks,{id:A(o),"model-value":d(),disabled:e.readOnly,"onUpdate:modelValue":r[0]||=e=>p(!0,e??!1)},null,8,[`id`,`model-value`,`disabled`]),g(Rs,{for:A(o),class:`cursor-pointer`},{default:F(()=>[z(u(A(a).booleanAllowTrueLabel),1)]),_:1},8,[`for`])]),k(`div`,hc,[g(Ks,{id:A(s),"model-value":f(),disabled:e.readOnly,"onUpdate:modelValue":r[1]||=e=>p(!1,e??!1)},null,8,[`id`,`model-value`,`disabled`]),g(Rs,{for:A(s),class:`cursor-pointer`},{default:F(()=>[z(u(A(a).booleanAllowFalseLabel),1)]),_:1},8,[`for`])])])],64)):w(``,!0),!d()&&!f()?(n(),L(`p`,gc,u(A(a).booleanNeitherWarning),1)):w(``,!0)])):w(``,!0)]))}}),vc={name:`TimesCircleIcon`,extends:j};function yc(e){return Cc(e)||Sc(e)||xc(e)||bc()}function bc(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
516
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xc(e,t){if(e){if(typeof e==`string`)return wc(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wc(e,t):void 0}}function Sc(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Cc(e){if(Array.isArray(e))return wc(e)}function wc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Tc(e,t,r,i,a,o){return n(),L(`svg`,d({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),yc(t[0]||=[k(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z`,fill:`currentColor`},null,-1)]),16)}vc.render=Tc;var Ec=T.extend({name:`chip`,style:`
|
|
517
|
+
.p-chip {
|
|
518
|
+
display: inline-flex;
|
|
519
|
+
align-items: center;
|
|
520
|
+
background: dt('chip.background');
|
|
521
|
+
color: dt('chip.color');
|
|
522
|
+
border-radius: dt('chip.border.radius');
|
|
523
|
+
padding-block: dt('chip.padding.y');
|
|
524
|
+
padding-inline: dt('chip.padding.x');
|
|
525
|
+
gap: dt('chip.gap');
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.p-chip-icon {
|
|
529
|
+
color: dt('chip.icon.color');
|
|
530
|
+
font-size: dt('chip.icon.size');
|
|
531
|
+
width: dt('chip.icon.size');
|
|
532
|
+
height: dt('chip.icon.size');
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.p-chip-image {
|
|
536
|
+
border-radius: 50%;
|
|
537
|
+
width: dt('chip.image.width');
|
|
538
|
+
height: dt('chip.image.height');
|
|
539
|
+
margin-inline-start: calc(-1 * dt('chip.padding.y'));
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.p-chip:has(.p-chip-remove-icon) {
|
|
543
|
+
padding-inline-end: dt('chip.padding.y');
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.p-chip:has(.p-chip-image) {
|
|
547
|
+
padding-block-start: calc(dt('chip.padding.y') / 2);
|
|
548
|
+
padding-block-end: calc(dt('chip.padding.y') / 2);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.p-chip-remove-icon {
|
|
552
|
+
cursor: pointer;
|
|
553
|
+
font-size: dt('chip.remove.icon.size');
|
|
554
|
+
width: dt('chip.remove.icon.size');
|
|
555
|
+
height: dt('chip.remove.icon.size');
|
|
556
|
+
color: dt('chip.remove.icon.color');
|
|
557
|
+
border-radius: 50%;
|
|
558
|
+
transition:
|
|
559
|
+
outline-color dt('chip.transition.duration'),
|
|
560
|
+
box-shadow dt('chip.transition.duration');
|
|
561
|
+
outline-color: transparent;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.p-chip-remove-icon:focus-visible {
|
|
565
|
+
box-shadow: dt('chip.remove.icon.focus.ring.shadow');
|
|
566
|
+
outline: dt('chip.remove.icon.focus.ring.width') dt('chip.remove.icon.focus.ring.style') dt('chip.remove.icon.focus.ring.color');
|
|
567
|
+
outline-offset: dt('chip.remove.icon.focus.ring.offset');
|
|
568
|
+
}
|
|
569
|
+
`,classes:{root:`p-chip p-component`,image:`p-chip-image`,icon:`p-chip-icon`,label:`p-chip-label`,removeIcon:`p-chip-remove-icon`}}),Dc={name:`Chip`,extends:{name:`BaseChip`,extends:te,props:{label:{type:[String,Number],default:null},icon:{type:String,default:null},image:{type:String,default:null},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:void 0}},style:Ec,provide:function(){return{$pcChip:this,$parentInstance:this}}},inheritAttrs:!1,emits:[`remove`],data:function(){return{visible:!0}},methods:{onKeydown:function(e){(e.key===`Enter`||e.key===`Backspace`)&&this.close(e)},close:function(e){this.visible=!1,this.$emit(`remove`,e)}},computed:{dataP:function(){return v({removable:this.removable})}},components:{TimesCircleIcon:vc}},Oc=[`aria-label`,`data-p`],kc=[`src`];function Ac(e,t,r,i,a,o){return a.visible?(n(),L(`div`,d({key:0,class:e.cx(`root`),"aria-label":e.label},e.ptmi(`root`),{"data-p":o.dataP}),[y(e.$slots,`default`,{},function(){return[e.image?(n(),L(`img`,d({key:0,src:e.image},e.ptm(`image`),{class:e.cx(`image`)}),null,16,kc)):e.$slots.icon?(n(),O(c(e.$slots.icon),d({key:1,class:e.cx(`icon`)},e.ptm(`icon`)),null,16,[`class`])):e.icon?(n(),L(`span`,d({key:2,class:[e.cx(`icon`),e.icon]},e.ptm(`icon`)),null,16)):w(``,!0),e.label===null?w(``,!0):(n(),L(`div`,d({key:3,class:e.cx(`label`)},e.ptm(`label`)),u(e.label),17))]}),e.removable?y(e.$slots,`removeicon`,{key:0,removeCallback:o.close,keydownCallback:o.onKeydown},function(){return[(n(),O(c(e.removeIcon?`span`:`TimesCircleIcon`),d({class:[e.cx(`removeIcon`),e.removeIcon],onClick:o.close,onKeydown:o.onKeydown},e.ptm(`removeIcon`)),null,16,[`class`,`onClick`,`onKeydown`]))]}):w(``,!0)],16,Oc)):w(``,!0)}Dc.render=Ac;var jc={class:`space-y-4`},Mc={key:0,class:`text-sm italic`,style:{color:`var(--p-text-muted-color)`}},Nc={key:1,class:`flex flex-wrap gap-4 p-3 rounded-lg border border-border bg-secondary`},Pc={class:`flex items-center gap-2 text-sm text-foreground`},Fc=[`checked`,`disabled`],Ic={class:`font-medium`},Lc={key:0,class:`flex items-center gap-2 text-sm text-foreground`},Rc=[`checked`,`disabled`],zc={key:1,class:`flex items-center gap-2`},Bc={class:`text-sm whitespace-nowrap text-foreground`},Vc=[`value`,`disabled`],Hc=[`value`],Uc={key:2,class:`flex items-center gap-2 p-3 rounded-lg border border-border bg-secondary`},Wc={class:`flex items-center gap-2 text-sm text-foreground`},Gc=[`checked`,`disabled`],Kc={key:0,class:`grid grid-cols-1 md:grid-cols-2 gap-4`},qc={class:`space-y-0 md:col-span-2`},Jc={key:0,class:`text-xs text-red-500 italic`},Yc={key:1,class:`text-xs text-red-500 italic`},Xc={key:2,class:`text-xs text-red-500 italic`},Zc={key:3,class:`text-xs text-red-500 italic`},Qc={key:0,class:`flex flex-col gap-2`},$c=[`for`],el={key:1,class:`flex flex-col gap-2`},tl=[`for`],nl={key:1,class:`grid grid-cols-1 md:grid-cols-2 gap-4`},rl={key:0,class:`flex flex-col gap-2`},il=[`for`],al={key:1,class:`flex flex-col gap-2`},ol=[`for`],sl={key:2,class:`flex flex-col gap-2`},cl=[`for`],ll={key:0,class:`text-xs text-red-500 italic whitespace-pre-line`},ul={key:4,class:`space-y-2 pt-2 border-t`,style:{"border-color":`var(--p-content-border-color)`}},dl={class:`flex flex-wrap gap-2 mb-4`},fl={key:1,class:`text-xs italic`,style:{color:`var(--p-text-muted-color)`}},pl={class:`flex items-center gap-2`},ml=R({__name:`NumberEditor`,props:{schema:{type:[Boolean,Object]},path:{},readOnly:{type:Boolean,default:!1},validationNode:{},depth:{default:0},integer:{type:Boolean,default:!1}},emits:[`change`],setup(e,{emit:t}){let r=e,i=t,a=M(``),s=Tt(),c=S(),l=S(),d=S(),f=S(),m=S(),h=N(()=>X(r.schema,e=>e.minimum,void 0)),_=N(()=>X(r.schema,e=>e.maximum,void 0)),v=N(()=>X(r.schema,e=>e.exclusiveMinimum,void 0)),y=N(()=>X(r.schema,e=>e.exclusiveMaximum,void 0)),b=N(()=>X(r.schema,e=>e.multipleOf,void 0)),ee=N(()=>X(r.schema,e=>e.enum||[],[])),x=N(()=>X(r.schema,e=>e.primary===!0,!1)),C=N(()=>X(r.schema,e=>e.autoIncrement===!0,!1)),te=N(()=>X(r.schema,e=>e.unique===!0,!1)),ne=N(()=>X(r.schema,e=>e.drizzle?.mode||`none`,`none`)),T=N(()=>ne.value===`boolean`||ne.value===`timestamp`),re=N(()=>!(r.integer&&T.value)),ie=N(()=>r.integer?[{label:s.drizzleModeNone,value:`none`},{label:s.drizzleModeBoolean,value:`boolean`},{label:s.drizzleModeTimestamp,value:`timestamp`}]:[]);function D(e,t){let n={type:r.integer?`integer`:`number`};if($r(r.schema)||(r.schema.minimum!==void 0&&(n.minimum=r.schema.minimum),r.schema.maximum!==void 0&&(n.maximum=r.schema.maximum),r.schema.exclusiveMinimum!==void 0&&(n.exclusiveMinimum=r.schema.exclusiveMinimum),r.schema.exclusiveMaximum!==void 0&&(n.exclusiveMaximum=r.schema.exclusiveMaximum),r.schema.multipleOf!==void 0&&(n.multipleOf=r.schema.multipleOf),r.schema.enum!==void 0&&(n.enum=[...r.schema.enum]),r.schema.primary!==void 0&&(n.primary=r.schema.primary),r.schema.autoIncrement!==void 0&&(n.autoIncrement=r.schema.autoIncrement),r.schema.unique!==void 0&&(n.unique=r.schema.unique),r.schema.drizzle!==void 0&&(n.drizzle=r.schema.drizzle)),e===`drizzle`){let e={...n};e.drizzle=t===`none`?void 0:{mode:t},t!==`none`&&(delete e.minimum,delete e.maximum,delete e.exclusiveMinimum,delete e.exclusiveMaximum,delete e.multipleOf),i(`change`,e);return}if(e===`primary`&&t===!0){let e={...n};e.primary=!0,delete e.drizzle,delete e.unique,i(`change`,e);return}if(e===`exclusiveMinimum`&&t!==void 0){let e={...n};e.exclusiveMinimum=t,delete e.minimum,i(`change`,e);return}if(e===`minimum`&&t!==void 0){let e={...n};e.minimum=t,delete e.exclusiveMinimum,i(`change`,e);return}if(e===`exclusiveMaximum`&&t!==void 0){let e={...n};e.exclusiveMaximum=t,delete e.maximum,i(`change`,e);return}if(e===`maximum`&&t!==void 0){let e={...n};e.maximum=t,delete e.exclusiveMaximum,i(`change`,e);return}if(t!==void 0){let r={...n};e===`multipleOf`?r.multipleOf=t:e===`enum`?r.enum=t:e===`primary`?r.primary=t:e===`autoIncrement`?r.autoIncrement=t:e===`unique`&&(r.unique=t),i(`change`,r);return}let a={...n};delete a[e],i(`change`,a)}function j(){if(!a.value.trim())return;let e=Number(a.value);if(Number.isNaN(e))return;let t=r.integer?Math.floor(e):e;ee.value.includes(t)||D(`enum`,[...ee.value,t]),a.value=``}function ae(e){let t=[...ee.value];t.splice(e,1),D(`enum`,t.length===0?void 0:t)}let oe=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`minMax`)?.message),se=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`redundantMinimum`)?.message),P=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`redundantMaximum`)?.message),ce=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`enum`)?.message),I=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`multipleOf`)?.message),le=N(()=>!!h.value||!!_.value||!!v.value||!!y.value||!!b.value||ee.value.length>0||x.value||C.value||te.value||ne.value!==`none`),ue=N(()=>h.value??null),de=N(()=>_.value??null),fe=N(()=>v.value??null),pe=N(()=>y.value??null),me=N(()=>b.value??null);return(t,r)=>(n(),L(`div`,jc,[e.readOnly&&!le.value?(n(),L(`p`,Mc,u(A(s).numberNoConstraint),1)):w(``,!0),e.integer?(n(),L(`div`,Nc,[k(`label`,Pc,[k(`input`,{type:`checkbox`,checked:x.value,disabled:e.readOnly,onChange:r[0]||=e=>D(`primary`,!x.value),class:`rounded border-border accent-primary`},null,40,Fc),k(`span`,Ic,u(A(s).primaryKeyLabel),1)]),x.value?(n(),L(`label`,Lc,[k(`input`,{type:`checkbox`,checked:C.value,disabled:e.readOnly,onChange:r[1]||=e=>D(`autoIncrement`,!C.value),class:`rounded border-border accent-primary`},null,40,Rc),k(`span`,null,u(A(s).autoIncrementLabel),1)])):w(``,!0),x.value?w(``,!0):(n(),L(`div`,zc,[k(`label`,Bc,u(A(s).drizzleModeLabel),1),k(`select`,{value:ne.value,disabled:e.readOnly,onChange:r[2]||=e=>D(`drizzle`,e.target.value),class:`text-sm border border-border rounded px-2 py-1 bg-background text-foreground`},[(n(!0),L(E,null,o(ie.value,e=>(n(),L(`option`,{key:e.value,value:e.value},u(e.label),9,Hc))),128))],40,Vc)]))])):w(``,!0),!e.integer&&(!e.readOnly||te.value)?(n(),L(`div`,Uc,[k(`label`,Wc,[k(`input`,{type:`checkbox`,checked:te.value,disabled:e.readOnly,onChange:r[3]||=e=>D(`unique`,!te.value),class:`rounded border-border accent-primary`},null,40,Gc),k(`span`,null,u(A(s).uniqueLabel),1)])])):w(``,!0),re.value?(n(),L(E,{key:3},[!e.readOnly||le.value?(n(),L(`div`,Kc,[k(`div`,qc,[oe.value?(n(),L(`div`,Jc,u(oe.value),1)):w(``,!0),se.value?(n(),L(`div`,Yc,u(se.value),1)):w(``,!0),P.value?(n(),L(`div`,Xc,u(P.value),1)):w(``,!0),ce.value?(n(),L(`div`,Zc,u(ce.value),1)):w(``,!0)]),(!e.readOnly||h.value)&&!v.value?(n(),L(`div`,Qc,[k(`label`,{for:A(l),class:p([`text-sm font-medium`,[h.value!==void 0&&(!!oe.value||!!se.value)&&`text-red-500`]])},u(A(s).numberMinimumLabel),11,$c),g(A(ks),{"input-id":A(l),"model-value":ue.value,"onUpdate:modelValue":r[4]||=e=>D(`minimum`,e??void 0),placeholder:A(s).numberMinimumPlaceholder,step:e.integer?1:void 0,invalid:h.value!==void 0&&(!!oe.value||!!se.value),disabled:e.readOnly,fluid:``,size:`small`,"show-buttons":``},null,8,[`input-id`,`model-value`,`placeholder`,`step`,`invalid`,`disabled`])])):w(``,!0),(!e.readOnly||_.value)&&!y.value?(n(),L(`div`,el,[k(`label`,{for:A(c),class:p([`text-sm font-medium`,[_.value!==void 0&&(!!oe.value||!!P.value)&&`text-red-500`]])},u(A(s).numberMaximumLabel),11,tl),g(A(ks),{"input-id":A(c),"model-value":de.value,"onUpdate:modelValue":r[5]||=e=>D(`maximum`,e??void 0),placeholder:A(s).numberMaximumPlaceholder,step:e.integer?1:void 0,invalid:_.value!==void 0&&(!!oe.value||!!P.value),disabled:e.readOnly,fluid:``,size:`small`,"show-buttons":``},null,8,[`input-id`,`model-value`,`placeholder`,`step`,`invalid`,`disabled`])])):w(``,!0)])):w(``,!0),!e.readOnly||y.value||v.value?(n(),L(`div`,nl,[(!e.readOnly||v.value)&&!h.value?(n(),L(`div`,rl,[k(`label`,{for:A(d),class:`text-sm font-medium`},u(A(s).numberExclusiveMinimumLabel),9,il),g(A(ks),{"input-id":A(d),"model-value":fe.value,"onUpdate:modelValue":r[6]||=e=>D(`exclusiveMinimum`,e??void 0),placeholder:A(s).numberExclusiveMinimumPlaceholder,step:e.integer?1:void 0,disabled:e.readOnly,fluid:``,size:`small`,"show-buttons":``},null,8,[`input-id`,`model-value`,`placeholder`,`step`,`disabled`])])):w(``,!0),(!e.readOnly||y.value)&&!_.value?(n(),L(`div`,al,[k(`label`,{for:A(f),class:`text-sm font-medium`},u(A(s).numberExclusiveMaximumLabel),9,ol),g(A(ks),{"input-id":A(f),"model-value":pe.value,"onUpdate:modelValue":r[7]||=e=>D(`exclusiveMaximum`,e??void 0),placeholder:A(s).numberExclusiveMaximumPlaceholder,step:e.integer?1:void 0,disabled:e.readOnly,fluid:``,size:`small`,"show-buttons":``},null,8,[`input-id`,`model-value`,`placeholder`,`step`,`disabled`])])):w(``,!0)])):w(``,!0),!e.readOnly||b.value?(n(),L(`div`,sl,[k(`label`,{for:A(m),class:p([`text-sm font-medium`,[!!I.value&&`text-red-500`]])},u(A(s).numberMultipleOfLabel),11,cl),g(A(ks),{"input-id":A(m),"model-value":me.value,"onUpdate:modelValue":r[8]||=e=>D(`multipleOf`,e??void 0),placeholder:A(s).numberMultipleOfPlaceholder,min:0,step:e.integer?1:void 0,invalid:!!I.value,disabled:e.readOnly,fluid:``,size:`small`,"show-buttons":``},null,8,[`input-id`,`model-value`,`placeholder`,`step`,`invalid`,`disabled`]),I.value?(n(),L(`div`,ll,u(I.value),1)):w(``,!0)])):w(``,!0)],64)):w(``,!0),!e.readOnly||ee.value.length>0?(n(),L(`div`,ul,[k(`label`,{class:p([`text-sm font-medium`,[!!ce.value&&`text-red-500`]])},u(A(s).numberAllowedValuesEnumLabel),3),k(`div`,dl,[ee.value.length>0?(n(!0),L(E,{key:0},o(ee.value,(e,t)=>(n(),O(A(Dc),{key:`enum-number-${e}`,label:String(e),removable:``,onRemove:e=>ae(t)},null,8,[`label`,`onRemove`]))),128)):(n(),L(`p`,fl,u(A(s).numberAllowedValuesEnumNone),1))]),k(`div`,pl,[g(A(ks),{"model-value":a.value?Number(a.value):null,"onUpdate:modelValue":r[9]||=e=>{a.value=e===null?``:String(e)},placeholder:A(s).numberAllowedValuesEnumAddPlaceholder,step:e.integer?1:void 0,fluid:``,size:`small`,"show-buttons":``,onKeydown:r[10]||=e=>e.key===`Enter`&&j()},null,8,[`model-value`,`placeholder`,`step`]),g(lo,{type:`button`,onClick:r[11]||=e=>j(),size:`sm`,severity:`secondary`},{default:F(()=>[z(u(A(s).numberAllowedValuesEnumAddLabel),1)]),_:1})])])):w(``,!0)]))}}),hl={class:`space-y-4`},gl={class:`flex flex-wrap gap-4 p-3 rounded-lg border border-border bg-secondary`},_l=[`checked`,`disabled`,`title`],vl={key:0,class:`flex items-center gap-2`},yl={class:`text-sm text-foreground`},bl=[`value`,`disabled`],xl={value:`has-one`},Sl={value:`has-many`},Cl={key:0,class:`space-y-2`},wl={key:1,class:`text-sm text-muted-foreground italic p-2 text-center border rounded-md`},Tl={key:2,class:`mt-4 flex flex-row gap-x-4`},El=R({__name:`ObjectEditor`,props:{schema:{type:[Boolean,Object]},path:{},readOnly:{type:Boolean,default:!1},validationNode:{},depth:{default:0},insideNested:{type:Boolean,default:!1}},emits:[`change`],setup(e,{emit:t}){let r=e,i=t,a=fi(),s=Tt(),c=N(()=>Vo(r.schema)),l=N(()=>$r(r.schema)?!1:r.schema.additionalProperties===!1),d=M(X(r.schema,e=>e.nested?.enabled===!0,!1)),f=M(X(r.schema,e=>e.nested?.relation||`has-one`,`has-one`));function m(){let e=a.getAtPath(r.path);if(!e||$r(e))return;let t=Ce(e);if(t.additionalProperties===!1?delete t.additionalProperties:t.additionalProperties=!1,r.path.length>0){let e=r.path.slice(0,-1),n=r.path[r.path.length-1];a.updateProperty(e,n,t)}else a.replaceSchema(t)}function h(){d.value=!d.value,v()}function _(){v()}function v(){if(i){let e={type:`object`,...$r(r.schema)?{}:Ce(r.schema),nested:d.value?{enabled:!0,relation:f.value}:void 0};d.value||delete e.nested,i(`change`,e)}}return(t,r)=>(n(),L(`div`,hl,[k(`div`,gl,[k(`label`,{class:p([`flex items-center gap-2 text-sm text-foreground`,{"opacity-50 cursor-not-allowed":e.insideNested}])},[k(`input`,{type:`checkbox`,checked:d.value,disabled:e.readOnly||e.insideNested,onChange:h,class:`rounded border-border accent-primary`,title:e.insideNested?`Only one level of nesting is supported`:``},null,40,_l),k(`span`,null,u(A(s).nestedEnabledLabel),1)],2),d.value?(n(),L(`div`,vl,[k(`label`,yl,u(A(s).nestedRelationLabel),1),k(`select`,{value:f.value,disabled:e.readOnly,onChange:r[0]||=e=>{f.value=e.target.value,_()},class:`text-sm border border-border rounded px-2 py-1 bg-background text-foreground`},[k(`option`,xl,u(A(s).hasOneRelation),1),k(`option`,Sl,u(A(s).hasManyRelation),1)],40,bl)])):w(``,!0)]),c.value.length>0?(n(),L(`div`,Cl,[(n(!0),L(E,null,o(c.value,t=>(n(),O(mu,{key:t.name,"read-only":e.readOnly,path:e.path,name:t.name,schema:t.schema,required:t.required,"validation-node":e.validationNode?.children[t.name],depth:e.depth,"inside-nested":e.insideNested||d.value},null,8,[`read-only`,`path`,`name`,`schema`,`required`,`validation-node`,`depth`,`inside-nested`]))),128))])):(n(),L(`div`,wl,u(A(s).objectPropertiesNone),1)),e.readOnly?w(``,!0):(n(),L(`div`,Tl,[g(Bo,{path:e.path,variant:`secondary`},null,8,[`path`]),g(Zo,{onClick:r[1]||=e=>m(),class:p(l.value?`bg-amber-50 text-amber-600`:`bg-lime-50 text-lime-600`)},{default:F(()=>[z(u(l.value?A(s).additionalPropertiesForbid:A(s).additionalPropertiesAllow),1)]),_:1},8,[`class`])]))]))}}),Dl={class:`space-y-4`},Ol={class:`flex flex-wrap gap-4 p-3 rounded-lg border border-border bg-secondary`},kl={class:`flex items-center gap-2 text-sm text-foreground`},Al=[`checked`,`disabled`],jl={key:0,class:`flex items-center gap-2`},Ml={class:`text-sm text-foreground`},Nl=[`value`,`disabled`],Pl=[`value`],Fl={key:1,class:`flex items-center gap-2`},Il={class:`text-sm text-foreground`},Ll=[`value`,`disabled`],Rl=[`value`],zl={class:`grid grid-cols-1 md:grid-cols-2 gap-4 items-start`},Bl={key:0,class:`text-sm text-muted-foreground italic`},Vl={key:1,class:`flex flex-col gap-2`},Hl=[`for`],Ul={key:2,class:`flex flex-col gap-2`},Wl=[`for`],Gl={key:3,class:`text-xs text-red-500 italic md:col-span-2 whitespace-pre-line`},Kl={key:0,class:`flex flex-col gap-2`},ql=[`for`],Jl={key:1,class:`space-y-2 pt-2 border-t`,style:{"border-color":`var(--p-content-border-color)`}},Yl={class:`text-sm font-medium`},Xl={class:`flex flex-wrap gap-2 mb-4`},Zl={key:1,class:`text-xs italic`,style:{color:`var(--p-text-muted-color)`}},Ql={class:`flex items-center gap-2`},$l=R({__name:`StringEditor`,props:{schema:{type:[Boolean,Object]},path:{},readOnly:{type:Boolean,default:!1},validationNode:{},depth:{default:0}},emits:[`change`],setup(e,{emit:t}){let r=e,i=t,a=Tt(),s=M(``),c=S(),l=S(),d=S(),f=N(()=>X(r.schema,e=>e.minLength,void 0)),m=N(()=>X(r.schema,e=>e.maxLength,void 0)),h=N(()=>X(r.schema,e=>e.pattern,void 0)),_=N(()=>X(r.schema,e=>e.format,void 0)),v=N(()=>X(r.schema,e=>e.enum||[],[])),y=N(()=>X(r.schema,e=>e.unique===!0,!1)),b=N(()=>X(r.schema,e=>e.drizzle?.mode||`none`,`none`)),ee=N(()=>b.value===`timestamp`||b.value===`json`||_.value===`date-time`||_.value===`json`),x=N(()=>!ee.value);function C(e,t){let{type:n,description:a,...o}=$r(r.schema)?{type:`string`}:Ce(r.schema);if(e===`drizzle`){let e=t,n={...o,type:`string`,drizzle:e===`none`?void 0:{mode:e}};e!==`none`&&(delete n.format,delete n.minLength,delete n.maxLength,delete n.pattern),i(`change`,n);return}if(e===`format`){let e=t===`none`?void 0:String(t),n={...o,type:`string`,format:e};(t===`date-time`||t===`json`)&&(delete n.drizzle,delete n.minLength,delete n.maxLength,delete n.pattern),i(`change`,n);return}i(`change`,{...o,type:`string`,[e]:t})}function te(){s.value.trim()&&(v.value.includes(s.value)||C(`enum`,[...v.value,s.value]),s.value=``)}function ne(e){let t=[...v.value];if(t.splice(e,1),t.length===0){let e=$r(r.schema)?{type:`string`}:Ce(r.schema);if(!$r(e)&&`enum`in e){let{enum:t,...n}=e;i(`change`,n)}else i(`change`,e)}else C(`enum`,t)}let T=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`length`)?.message),re=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`minLength`)?.message),ie=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`maxLength`)?.message),D=N(()=>r.validationNode?.validation.errors?.find(e=>e.path[0]===`pattern`)?.message),j=N(()=>f.value??null),ae=N(()=>m.value??null),oe=N(()=>h.value??``),se=N(()=>_.value||`none`),P=N(()=>[{label:a.stringFormatNone,value:`none`},{label:a.stringFormatDateTime,value:`date-time`},{label:a.stringFormatDate,value:`date`},{label:a.stringFormatTime,value:`time`},{label:a.stringFormatEmail,value:`email`},{label:a.stringFormatUri,value:`uri`},{label:a.stringFormatUuid,value:`uuid`},{label:a.stringFormatHostname,value:`hostname`},{label:a.stringFormatIpv4,value:`ipv4`},{label:a.stringFormatIpv6,value:`ipv6`}]),ce=N(()=>[{label:a.drizzleModeNone,value:`none`},{label:a.drizzleModeJson,value:`json`},{label:a.drizzleModeTimestamp,value:`timestamp`}]),I=N(()=>!r.readOnly||j.value!==null||ae.value!==null||oe.value!==``||se.value!==`none`||v.value.length>0||y.value||b.value!==`none`);return(t,r)=>(n(),L(`div`,Dl,[k(`div`,Ol,[k(`label`,kl,[k(`input`,{type:`checkbox`,checked:y.value,disabled:e.readOnly,onChange:r[0]||=e=>C(`unique`,!y.value),class:`rounded border-border accent-primary`},null,40,Al),k(`span`,null,u(A(a).uniqueLabel),1)]),_.value!==`date-time`&&_.value!==`json`?(n(),L(`div`,jl,[k(`label`,Ml,u(A(a).drizzleModeLabel),1),k(`select`,{value:b.value,disabled:e.readOnly,onChange:r[1]||=e=>C(`drizzle`,e.target.value),class:`text-sm border border-border rounded px-2 py-1 bg-background text-foreground`},[(n(!0),L(E,null,o(ce.value,e=>(n(),L(`option`,{key:e.value,value:e.value},u(e.label),9,Pl))),128))],40,Nl)])):w(``,!0),b.value===`none`?(n(),L(`div`,Fl,[k(`label`,Il,u(A(a).stringFormatLabel),1),k(`select`,{value:se.value,disabled:e.readOnly,onChange:r[2]||=e=>C(`format`,e.target.value),class:`text-sm border border-border rounded px-2 py-1 bg-background text-foreground`},[(n(!0),L(E,null,o(P.value,e=>(n(),L(`option`,{key:e.value,value:e.value},u(e.label),9,Rl))),128))],40,Ll)])):w(``,!0)]),x.value?(n(),L(E,{key:0},[k(`div`,zl,[e.readOnly&&!I.value?(n(),L(`p`,Bl,u(A(a).stringNoConstraint),1)):w(``,!0),!e.readOnly||j.value!==null?(n(),L(`div`,Vl,[k(`label`,{for:A(c),class:p([`text-sm font-medium`,[(!!T.value||!!re.value)&&`text-red-500`]])},u(A(a).stringMinimumLengthLabel),11,Hl),g(A(ks),{"input-id":A(c),"model-value":j.value,"onUpdate:modelValue":r[3]||=e=>C(`minLength`,e??void 0),placeholder:A(a).stringMinimumLengthPlaceholder,min:0,disabled:e.readOnly,invalid:!!T.value||!!re.value,fluid:``,size:`small`,"show-buttons":``},null,8,[`input-id`,`model-value`,`placeholder`,`disabled`,`invalid`])])):w(``,!0),!e.readOnly||ae.value!==null?(n(),L(`div`,Ul,[k(`label`,{for:A(l),class:p([`text-sm font-medium`,[(!!T.value||!!ie.value)&&`text-red-500`]])},u(A(a).stringMaximumLengthLabel),11,Wl),g(A(ks),{"input-id":A(l),"model-value":ae.value,"onUpdate:modelValue":r[4]||=e=>C(`maxLength`,e??void 0),placeholder:A(a).stringMaximumLengthPlaceholder,min:0,disabled:e.readOnly,invalid:!!T.value||!!ie.value,fluid:``,size:`small`,"show-buttons":``},null,8,[`input-id`,`model-value`,`placeholder`,`disabled`,`invalid`])])):w(``,!0),T.value||re.value||ie.value?(n(),L(`div`,Gl,u([T.value,re.value??ie.value].filter(Boolean).join(`
|
|
570
|
+
`)),1)):w(``,!0)]),!e.readOnly||oe.value!==``?(n(),L(`div`,Kl,[k(`label`,{for:A(d),class:p([`text-sm font-medium`,[!!D.value&&`text-red-500`]])},u(A(a).stringPatternLabel),11,ql),g(fo,{id:A(d),type:`text`,"model-value":String(oe.value),"onUpdate:modelValue":r[5]||=e=>C(`pattern`,e||void 0),placeholder:A(a).stringPatternPlaceholder,size:`sm`},null,8,[`id`,`model-value`,`placeholder`])])):w(``,!0)],64)):w(``,!0),!e.readOnly||v.value.length>0?(n(),L(`div`,Jl,[k(`label`,Yl,u(A(a).stringAllowedValuesEnumLabel),1),k(`div`,Xl,[v.value.length>0?(n(!0),L(E,{key:0},o(v.value,e=>(n(),O(A(Dc),{key:`enum-string-${e}`,label:String(e),removable:``,onRemove:t=>ne(v.value.indexOf(e))},null,8,[`label`,`onRemove`]))),128)):(n(),L(`p`,Zl,u(A(a).stringAllowedValuesEnumNone),1))]),k(`div`,Ql,[g(fo,{type:`text`,modelValue:s.value,"onUpdate:modelValue":r[6]||=e=>s.value=e,placeholder:A(a).stringAllowedValuesEnumAddPlaceholder,class:`flex-1`,size:`small`,onKeydown:r[7]||=e=>e.key===`Enter`&&te()},null,8,[`modelValue`,`placeholder`]),g(lo,{type:`button`,onClick:r[8]||=e=>te(),size:`sm`,severity:`secondary`},{default:F(()=>[z(u(A(a).stringAllowedValuesEnumAddLabel),1)]),_:1})])])):w(``,!0)]))}}),eu=R({__name:`TypeEditor`,props:{schema:{type:[Boolean,Object]},path:{},readOnly:{type:Boolean,default:!1},validationNode:{},depth:{default:0},insideNested:{type:Boolean,default:!1}},emits:[`change`],setup(e,{emit:t}){let r=e,i=t;function a(){return X(r.schema,e=>e.type||`object`,`string`)}return(t,r)=>a()===`string`?(n(),O($l,{key:0,schema:e.schema,path:e.path,"read-only":e.readOnly,"validation-node":e.validationNode,depth:e.depth,onChange:r[0]||=e=>i(`change`,e)},null,8,[`schema`,`path`,`read-only`,`validation-node`,`depth`])):a()===`number`?(n(),O(ml,{key:1,schema:e.schema,path:e.path,"read-only":e.readOnly,"validation-node":e.validationNode,depth:e.depth,onChange:r[1]||=e=>i(`change`,e)},null,8,[`schema`,`path`,`read-only`,`validation-node`,`depth`])):a()===`integer`?(n(),O(ml,{key:2,schema:e.schema,path:e.path,"read-only":e.readOnly,"validation-node":e.validationNode,depth:e.depth,integer:!0,onChange:r[2]||=e=>i(`change`,e)},null,8,[`schema`,`path`,`read-only`,`validation-node`,`depth`])):a()===`boolean`?(n(),O(_c,{key:3,schema:e.schema,path:e.path,"read-only":e.readOnly,"validation-node":e.validationNode,depth:e.depth,onChange:r[3]||=e=>i(`change`,e)},null,8,[`schema`,`path`,`read-only`,`validation-node`,`depth`])):a()===`object`?(n(),O(El,{key:4,schema:e.schema,path:e.path,"read-only":e.readOnly,"validation-node":e.validationNode,depth:e.depth,"inside-nested":e.insideNested,onChange:r[4]||=e=>i(`change`,e)},null,8,[`schema`,`path`,`read-only`,`validation-node`,`depth`,`inside-nested`])):a()===`array`?(n(),O(lc,{key:5,schema:e.schema,path:e.path,"read-only":e.readOnly,"validation-node":e.validationNode,depth:e.depth,"inside-nested":e.insideNested,onChange:r[5]||=e=>i(`change`,e)},null,8,[`schema`,`path`,`read-only`,`validation-node`,`depth`,`inside-nested`])):w(``,!0)}}),tu={class:`relative json-field-row justify-between group`},nu={class:`flex items-center gap-2 grow min-w-0`},ru=[`aria-label`],iu={class:`flex items-center gap-2 grow min-w-0 overflow-visible`},au={class:`flex items-center gap-2 min-w-0 grow overflow-visible`},ou={class:`flex items-center gap-2 justify-end shrink-0`},su={key:1,class:`flex items-center gap-1 text-muted-foreground`},cu=[`aria-label`],lu={key:0,class:`pt-1 pb-2 px-2 sm:px-3`},uu={key:0,class:`pb-2`},du={key:1,class:`flex items-center gap-2 mb-3 p-2 rounded border border-border bg-secondary`},fu={class:`text-sm font-medium shrink-0 text-foreground`},pu={key:2,class:`text-sm font-mono`},mu=R({__name:`SchemaPropertyEditor`,props:{path:{},name:{},schema:{type:[Boolean,Object]},required:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},validationNode:{},depth:{default:0},insideNested:{type:Boolean,default:!1}},setup(e){let t=e,r=fi(),i=Tt(),a=M(!1),o=M(!1),c=M(!1),l=M(!1),d=N(()=>t.name),f=N(()=>ti(t.schema)),m=N(()=>X(t.schema,e=>e.default,void 0)),h=M(``),_=M(``),v=M(``);function y(e){return Ce(e&&ei(e)?e:{type:`object`})}function b(){return X(t.schema,e=>e.type||`object`,`object`)}function ee(){h.value=t.name,o.value=!0}function x(){_.value=ti(t.schema),c.value=!0}function S(){let e=h.value.trim();e&&e!==t.name?r.renameProperty(t.path,t.name,e):h.value=t.name,o.value=!1}function C(){let e=_.value.trim();if(e!==ti(t.schema)){let n=y(r.getAtPath([...t.path,t.name]));n.description=e||void 0,r.updateProperty(t.path,t.name,n)}else _.value=ti(t.schema);c.value=!1}function te(){v.value=m.value===void 0?``:String(m.value),l.value=!0}function ne(){let e=y(r.getAtPath([...t.path,t.name])),n;try{n=JSON.parse(v.value)}catch{n=v.value||void 0}e.default=n,r.updateProperty(t.path,t.name,e),l.value=!1}function T(e){let n=ti(t.schema),i=X(t.schema,e=>e.default,void 0),a=Ce(e);a.description=n||void 0,i!==void 0&&(a.default=i),r.updateProperty(t.path,t.name,a)}function re(e){let n=y(r.getAtPath([...t.path,t.name]));n.type=e,r.updateProperty(t.path,t.name,n)}function E(){t.readOnly||r.setPropertyRequired(t.path,t.name,!t.required)}function ie(){r.deleteProperty(t.path,t.name)}return(t,r)=>(n(),L(`div`,{class:p(A(Ba)(`mb-2 rounded-lg transition-colors duration-200`,e.depth>0&&`ml-0 sm:ml-4`)),style:s({border:`1px solid var(--p-content-border-color)`,borderLeftColor:e.depth>0?`var(--p-content-border-color)`:void 0})},[k(`div`,tu,[k(`div`,nu,[k(`button`,{type:`button`,class:`text-muted-foreground hover:text-foreground transition-colors`,onClick:r[0]||=e=>a.value=!a.value,"aria-label":a.value?A(i).collapse:A(i).expand},[a.value?(n(),O(A(Ne),{key:0,size:18})):(n(),O(A(Pe),{key:1,size:18}))],8,ru),k(`div`,iu,[k(`div`,au,[!e.readOnly&&o.value?(n(),O(fo,{key:0,modelValue:h.value,"onUpdate:modelValue":r[1]||=e=>h.value=e,onBlur:r[2]||=e=>S(),onKeydown:r[3]||=e=>e.key===`Enter`&&S(),class:`h-8 text-sm font-medium min-w-[120px] max-w-full z-10`,autofocus:!0,onFocus:r[4]||=e=>e.target?.select()},null,8,[`modelValue`])):(n(),L(`button`,{key:1,type:`button`,onClick:r[5]||=e=>ee(),onKeydown:r[6]||=e=>e.key===`Enter`&&ee(),class:`json-field-label font-medium cursor-text px-2 py-0.5 -mx-0.5 rounded-sm hover:bg-secondary/30 hover:shadow-xs hover:ring-1 hover:ring-ring/20 transition-all text-left truncate min-w-[80px] max-w-[50%]`},u(d.value),33)),!e.readOnly&&c.value?(n(),O(fo,{key:2,modelValue:_.value,"onUpdate:modelValue":r[7]||=e=>_.value=e,onBlur:r[8]||=e=>C(),onKeydown:r[9]||=e=>e.key===`Enter`&&C(),placeholder:A(i).propertyDescriptionPlaceholder,class:`h-8 text-xs text-muted-foreground italic flex-1 min-w-[150px] z-10`,autofocus:!0,onFocus:r[10]||=e=>e.target?.select()},null,8,[`modelValue`,`placeholder`])):f.value?(n(),L(`button`,{key:3,type:`button`,onClick:r[11]||=e=>x(),onKeydown:r[12]||=e=>e.key===`Enter`&&x(),class:`text-xs text-muted-foreground italic cursor-text px-2 py-0.5 -mx-0.5 rounded-sm hover:bg-secondary/30 hover:shadow-xs hover:ring-1 hover:ring-ring/20 transition-all text-left truncate flex-1 max-w-[40%] mr-2`},u(f.value),33)):(n(),L(`button`,{key:4,type:`button`,onClick:r[13]||=e=>x(),onKeydown:r[14]||=e=>e.key===`Enter`&&x(),class:`text-xs text-muted-foreground/50 italic cursor-text px-2 py-0.5 -mx-0.5 rounded-sm hover:bg-secondary/30 hover:shadow-xs hover:ring-1 hover:ring-ring/20 transition-all opacity-0 group-hover:opacity-100 text-left truncate flex-1 max-w-[40%] mr-2`},u(A(i).propertyDescriptionButton),33))]),k(`div`,ou,[g(Qo,{"model-value":b(),"read-only":e.readOnly,"onUpdate:modelValue":re},null,8,[`model-value`,`read-only`]),g(Zo,{onClick:E,class:p(e.required?`bg-red-500/10 text-red-500`:`bg-secondary text-muted-foreground`)},{default:F(()=>[z(u(e.required?A(i).propertyRequired:A(i).propertyOptional),1)]),_:1},8,[`class`])])])]),(e.validationNode?.cumulativeChildrenErrors??0)>0?(n(),O(co,{key:0,class:`h-5 min-w-5 rounded-full px-1 font-mono tabular-nums justify-center`,variant:`destructive`},{default:F(()=>[z(u(e.validationNode?.cumulativeChildrenErrors??0),1)]),_:1})):w(``,!0),e.readOnly?w(``,!0):(n(),L(`div`,su,[k(`button`,{type:`button`,onClick:ie,class:`p-1 rounded-md hover:bg-secondary hover:text-destructive transition-colors opacity-0 group-hover:opacity-100`,"aria-label":A(i).propertyDelete},[g(A(Ve),{size:16})],8,cu)]))]),a.value?(n(),L(`div`,lu,[e.readOnly&&f.value?(n(),L(`p`,uu,u(f.value),1)):w(``,!0),!e.readOnly||m.value!==void 0?(n(),L(`div`,du,[k(`label`,fu,u(A(i).defaultValueLabel),1),!e.readOnly&&l.value?(n(),O(fo,{key:0,modelValue:v.value,"onUpdate:modelValue":r[15]||=e=>v.value=e,onBlur:r[16]||=e=>ne(),onKeydown:r[17]||=e=>e.key===`Enter`&&ne(),placeholder:A(i).defaultValuePlaceholder,class:`flex-1`,size:`small`,autofocus:!0,onFocus:r[18]||=e=>e.target?.select()},null,8,[`modelValue`,`placeholder`])):e.readOnly?(n(),L(`span`,pu,u(JSON.stringify(m.value)),1)):(n(),L(`button`,{key:1,type:`button`,onClick:r[19]||=e=>te(),class:`text-xs text-muted-foreground italic cursor-text px-2 py-0.5 rounded hover:bg-secondary/30 transition-all flex-1 text-left`},u(m.value===void 0?A(i).defaultValuePlaceholder:JSON.stringify(m.value)),1))])):w(``,!0),g(eu,{schema:e.schema,path:[...e.path,e.name],"read-only":e.readOnly,"validation-node":e.validationNode,depth:e.depth+1,"inside-nested":e.insideNested||A(X)(e.schema,e=>e.nested?.enabled===!0,!1),onChange:T},null,8,[`schema`,`path`,`read-only`,`validation-node`,`depth`,`inside-nested`])])):w(``,!0)],6))}}),hu={class:`space-y-2`},gu=R({__name:`SchemaFieldList`,props:{path:{},readOnly:{type:Boolean,default:!1}},setup(e){let t=e,r=fi(),i=Tt(),a=N(()=>t.path.length===0?r.schema.value:r.getAtPath(t.path)??{type:`object`,properties:{}}),s=N(()=>Vo(a.value)),c=N(()=>Xo(a.value,i));return(t,r)=>(n(),L(`div`,hu,[(n(!0),L(E,null,o(s.value,t=>(n(),O(mu,{key:t.name,path:e.path,name:t.name,schema:t.schema,required:t.required,"validation-node":c.value.children[t.name]??void 0,"read-only":e.readOnly},null,8,[`path`,`name`,`schema`,`required`,`validation-node`,`read-only`]))),128))]))}}),_u={class:`p-4 flex-1 min-h-0 flex flex-col overflow-auto jscb`},vu={key:0,class:`mb-6 shrink-0`},yu={class:`grow overflow-auto`},bu={key:0,class:`text-center py-10 text-muted-foreground`},xu={class:`mb-3`},Su={class:`text-sm`},Cu=R({__name:`SchemaVisualEditor`,props:{readOnly:{type:Boolean,default:!1}},setup(e){let t=Tt(),r=fi(),i=N(()=>r.schema.value);function a(){return!$r(i.value)&&ei(i.value)&&i.value.properties&&Object.keys(i.value.properties).length>0}return(r,i)=>(n(),L(`div`,_u,[e.readOnly?w(``,!0):(n(),L(`div`,vu,[g(Bo,{path:[]})])),k(`div`,yu,[a()?(n(),O(gu,{key:1,path:[],"read-only":e.readOnly},null,8,[`read-only`])):(n(),L(`div`,bu,[k(`p`,xu,u(A(t).visualEditorNoFieldsHint1),1),k(`p`,Su,u(A(t).visualEditorNoFieldsHint2),1)]))])]))}}),wu={class:`table-config p-4 border-b`,style:{"border-color":`var(--p-content-border-color)`}},Tu={class:`flex flex-wrap center gap-x-6 gap-y-3`},Eu={class:`flex flex-col gap-1 min-w-[200px]`},Du={key:0,class:`text-xs text-red-500`},Ou={class:`flex items-center gap-2`},ku=[`for`],Au={class:`flex items-center gap-2`},ju=[`for`],Mu={class:`flex items-center gap-2 ml-auto`},Nu=R({__name:`TableConfigEditor`,props:{loading:{type:Boolean,default:!1},migrating:{type:Boolean,default:!1}},emits:[`save`,`saveAndMigrate`],setup(e,{emit:t}){let r=t,i=fi(),a=Tt(),o=S(),s=S(),c=S(),l=/^[a-z][a-z0-9_]*$/,d=/^[a-z]/,f=N({get:()=>{let e=i.schema.value;return ei(e)?e.table?.name??e.title??``:``},set:e=>{let t=i.schema.value;ei(t)&&i.replaceSchema({...t,title:e,table:{...t.table,name:e}})}}),p=N(()=>f.value?l.test(f.value):!1),m=N(()=>f.value?d.test(f.value)?l.test(f.value)?``:`Only lowercase letters, digits, and underscores allowed`:`Must start with lowercase letter`:``),h=N({get:()=>{let e=i.schema.value;return ei(e)?e.table:void 0},set:e=>{if(!e)return;let t=i.schema.value;ei(t)&&i.replaceSchema({...t,table:e})}}),_=N({get:()=>h.value?.timestamps??!1,set:e=>{h.value={...h.value,timestamps:e}}}),v=N({get:()=>h.value?.softDelete??!1,set:e=>{h.value={...h.value,softDelete:e}}});return(t,i)=>(n(),L(`div`,wu,[k(`div`,Tu,[k(`div`,Eu,[g(A(De),{id:A(o),modelValue:f.value,"onUpdate:modelValue":i[0]||=e=>f.value=e,placeholder:A(a).tableNamePlaceholder,size:`small`,class:`font-mono`,invalid:!!f.value&&!p.value},null,8,[`id`,`modelValue`,`placeholder`,`invalid`]),m.value?(n(),L(`p`,Du,u(m.value),1)):w(``,!0)]),k(`div`,Ou,[g(A(Bs),{"input-id":A(s),modelValue:_.value,"onUpdate:modelValue":i[1]||=e=>_.value=e},null,8,[`input-id`,`modelValue`]),k(`label`,{for:A(s),class:`text-sm cursor-pointer`},u(A(a).timestampsLabel),9,ku)]),k(`div`,Au,[g(A(Bs),{"input-id":A(c),modelValue:v.value,"onUpdate:modelValue":i[2]||=e=>v.value=e},null,8,[`input-id`,`modelValue`]),k(`label`,{for:A(c),class:`text-sm cursor-pointer`},u(A(a).softDeleteLabel),9,ju)]),k(`div`,Mu,[g(A(me),{label:A(a).saveLabel,icon:`pi pi-save`,severity:`success`,size:`small`,loading:e.loading,disabled:!p.value||e.migrating,onClick:i[3]||=e=>r(`save`)},null,8,[`label`,`loading`,`disabled`]),g(A(me),{label:A(a).saveAndMigrateLabel,icon:`pi pi-database`,severity:`info`,size:`small`,loading:e.migrating,disabled:!p.value||e.loading,onClick:i[4]||=e=>r(`saveAndMigrate`)},null,8,[`label`,`loading`,`disabled`])])])]))}}),Pu={class:`flex items-center justify-between px-4 py-3 border-b w-full shrink-0`},Fu={class:`font-medium`},Iu=[`aria-label`],Lu={class:`grow min-h-0 flex flex-col`},Ru={class:`flex flex-col w-full flex-1 min-h-0 lg:hidden`},zu={class:`flex shrink-0 items-center justify-between border-b px-4 py-3 w-full`},Bu={class:`font-medium`},Vu=[`aria-label`],Hu={class:`flex items-center justify-between px-4 py-3 border-b w-full shrink-0`},Uu={class:`font-medium`},Wu=[`aria-label`],Gu={class:`flex flex-row w-full flex-1 min-h-0`},Ku=R({__name:`JsonSchemaEditor`,props:{schema:{type:[Boolean,Object],default:()=>({type:`object`})},readOnly:{type:Boolean,default:!1},showJsonEditor:{type:Boolean,default:!0},showFullscreen:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},migrating:{type:Boolean,default:!1},class:{}},emits:[`update:schema`,`save`,`saveAndMigrate`],setup(e,{emit:t}){let r=e,i=t,a=Tt(),o=!1,c=null,l=JSON.stringify(r.schema),d=ui(r.schema,e=>{let t=JSON.stringify(e);t!==l&&(l=t,c!==null&&clearTimeout(c),o=!0,c=setTimeout(()=>{c=null,i(`update:schema`,e),setTimeout(()=>{o=!1},0)},0))});di(d),D(()=>r.schema,e=>{if(o)return;let t=JSON.stringify(e);t!==l&&(l=t,d.replaceSchema(e))});let f=M(!1),m=M(50),h=M(null),_=M(!1),v=M(`visual`);function y(){f.value=!f.value}function b(){return f.value?`fixed inset-0 z-50 bg-background min-h-0`:``}function ee(e){e.preventDefault(),_.value=!0,document.addEventListener(`mousemove`,x),document.addEventListener(`mouseup`,S)}function x(e){if(!_.value||!h.value)return;let t=h.value.getBoundingClientRect(),n=(e.clientX-t.left)/t.width*100;n>=20&&n<=80&&(m.value=n)}function S(){_.value=!1,document.removeEventListener(`mousemove`,x),document.removeEventListener(`mouseup`,S)}return(t,o)=>(n(),L(`div`,{class:p(A(Ba)(`json-editor-container w-full h-full min-h-0 flex flex-col`,b(),r.class,`jscb`))},[e.showJsonEditor?(n(),L(E,{key:1},[k(`div`,Ru,[k(`div`,zu,[k(`h3`,Bu,u(A(a).schemaEditorTitle),1),e.showFullscreen?(n(),L(`button`,{key:0,type:`button`,onClick:y,class:`p-1.5 rounded-md hover:bg-secondary transition-colors`,"aria-label":A(a).schemaEditorToggleFullscreen},[g(A(Be),{size:16})],8,Vu)):w(``,!0)]),g(St,{modelValue:v.value,"onUpdate:modelValue":o[4]||=e=>v.value=e,tabs:[{value:`visual`,label:A(a).schemaEditorEditModeVisual},{value:`json`,label:A(a).schemaEditorEditModeJson}],class:`flex min-h-0 w-full flex-1 flex-col`},{default:F(()=>[g(A(Ue),{value:`visual`,class:p(A(Ba)(`focus:outline-hidden w-full min-h-0 flex flex-col`,f.value?`h-screen`:`flex-1`))},{default:F(()=>[e.readOnly?w(``,!0):(n(),O(Nu,{key:0,loading:e.loading,migrating:e.migrating,onSave:o[2]||=e=>i(`save`),onSaveAndMigrate:o[3]||=e=>i(`saveAndMigrate`)},null,8,[`loading`,`migrating`])),g(Cu,{"read-only":e.readOnly},null,8,[`read-only`])]),_:1},8,[`class`]),g(A(Ue),{value:`json`,class:p(A(Ba)(`focus:outline-hidden w-full min-h-0 flex flex-col`,f.value?`h-screen`:`flex-1`))},{default:F(()=>[g(Qa)]),_:1},8,[`class`])]),_:1},8,[`modelValue`,`tabs`])]),k(`div`,{ref_key:`containerRef`,ref:h,class:p(A(Ba)(`hidden lg:flex lg:flex-col w-full min-h-0`,f.value?`h-screen`:`flex-1`))},[k(`div`,Hu,[k(`h3`,Uu,u(A(a).schemaEditorTitle),1),e.showFullscreen?(n(),L(`button`,{key:0,type:`button`,onClick:y,class:`p-1.5 rounded-md hover:bg-secondary transition-colors`,"aria-label":A(a).schemaEditorToggleFullscreen},[g(A(Be),{size:16})],8,Wu)):w(``,!0)]),e.readOnly?w(``,!0):(n(),O(Nu,{key:0,loading:e.loading,migrating:e.migrating,onSave:o[5]||=e=>i(`save`),onSaveAndMigrate:o[6]||=e=>i(`saveAndMigrate`)},null,8,[`loading`,`migrating`])),k(`div`,Gu,[k(`div`,{class:`flex flex-col min-h-0 min-w-0`,style:s({width:`${m.value}%`})},[g(Cu,{"read-only":e.readOnly},null,8,[`read-only`])],4),k(`div`,{class:`w-0.5 bg-border hover:bg-primary cursor-col-resize shrink-0`,onMousedown:ee},null,32),k(`div`,{class:`flex flex-col min-h-0 min-w-0`,style:s({width:`${100-m.value}%`})},[g(Qa)],4)])],2)],64)):(n(),L(`div`,{key:0,class:p(A(Ba)(`w-full min-h-0 flex flex-col`,f.value?`h-screen`:`flex-1`))},[k(`div`,Pu,[k(`h3`,Fu,u(A(a).schemaEditorTitle),1),e.showFullscreen?(n(),L(`button`,{key:0,type:`button`,onClick:y,class:`p-1.5 rounded-md hover:bg-secondary transition-colors`,"aria-label":A(a).schemaEditorToggleFullscreen},[g(A(Be),{size:16})],8,Iu)):w(``,!0)]),e.readOnly?w(``,!0):(n(),O(Nu,{key:0,loading:e.loading,migrating:e.migrating,onSave:o[0]||=e=>i(`save`),onSaveAndMigrate:o[1]||=e=>i(`saveAndMigrate`)},null,8,[`loading`,`migrating`])),k(`div`,Lu,[g(Cu,{"read-only":e.readOnly},null,8,[`read-only`])])],2))],2))}});export{Ku as default};
|