@shwfed/config 2.3.20 → 2.3.21
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/module.json +1 -1
- package/dist/preview/assets/{config-DzmdQg_R.js → config--_6I2ueu.js} +1 -1
- package/dist/preview/assets/{config-DqfJ6g2l.js → config-BH2Cgm6Z.js} +1 -1
- package/dist/preview/assets/{config-DRcqCBNE.js → config-BdEFFxuI.js} +1 -1
- package/dist/preview/assets/{config-DYoY63Mh.js → config-BkTFAoSA.js} +1 -1
- package/dist/preview/assets/{config-DWBLNB9W.js → config-Bo9NgVie.js} +1 -1
- package/dist/preview/assets/{config-RpiYusco.js → config-CIxAb4Oe.js} +1 -1
- package/dist/preview/assets/{config-BvTObql_.js → config-D-6Tgeq0.js} +1 -1
- package/dist/preview/assets/{config-BxK2md1E.js → config-MKO1-4J8.js} +1 -1
- package/dist/preview/assets/{config-C1OAS71Y.js → config-__RnmfhP.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C1rBrqyI.js → definition.vue_vue_type_script_setup_true_lang-DeVEbdbZ.js} +1 -1
- package/dist/preview/assets/{index--tX2oFUp.js → index-Bfdy_BZY.js} +4 -4
- package/dist/preview/assets/index-CzcHfDck.js +1 -0
- package/dist/preview/assets/{runtime-_bbVL50J.js → runtime-BKO8_nF6.js} +1 -1
- package/dist/preview/assets/{runtime-DOg6e_3A.js → runtime-Be9JgLOm.js} +1 -1
- package/dist/preview/assets/{runtime-BkoWPDvV.js → runtime-BrUg4LS5.js} +1 -1
- package/dist/preview/assets/{runtime-euPIe4uC.js → runtime-BsM6WFl4.js} +1 -1
- package/dist/preview/assets/{runtime-Hiqp76SC.js → runtime-C-k7G8_4.js} +1 -1
- package/dist/preview/assets/runtime-Cec8NzXu.js +1 -0
- package/dist/preview/assets/{runtime-Cr5yIEMV.js → runtime-Cqi_SqJY.js} +1 -1
- package/dist/preview/assets/runtime-H9vie18v.js +1 -0
- package/dist/preview/assets/{runtime-DTh936s0.js → runtime-w4O6Z5Ly.js} +1 -1
- package/dist/preview/index.html +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue +4 -1
- package/package.json +1 -1
- package/dist/preview/assets/index-De3_lDfy.js +0 -1
- package/dist/preview/assets/runtime-_Z4Jlev8.js +0 -1
- package/dist/preview/assets/runtime-m4H1rd-d.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./runtime-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./runtime-Cqi_SqJY.js","./definition.vue_vue_type_script_setup_true_lang-DeVEbdbZ.js","./runtime-BsM6WFl4.js","./runtime-Be9JgLOm.js","./runtime-BKO8_nF6.js","./runtime-H9vie18v.js","./runtime-w4O6Z5Ly.js","./runtime-C-k7G8_4.js","./runtime-Cec8NzXu.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();function pI(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const _o={},Rh=[],Au=()=>{},FU=()=>!1,GS=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),KS=e=>e.startsWith("onUpdate:"),Wa=Object.assign,mI=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},_le=Object.prototype.hasOwnProperty,Io=(e,t)=>_le.call(e,t),en=Array.isArray,Fh=e=>Rb(e)==="[object Map]",zU=e=>Rb(e)==="[object Set]",mF=e=>Rb(e)==="[object Date]",cn=e=>typeof e=="function",lr=e=>typeof e=="string",ys=e=>typeof e=="symbol",No=e=>e!==null&&typeof e=="object",VU=e=>(No(e)||cn(e))&&cn(e.then)&&cn(e.catch),NU=Object.prototype.toString,Rb=e=>NU.call(e),xle=e=>Rb(e).slice(8,-1),LU=e=>Rb(e)==="[object Object]",YS=e=>lr(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,iy=pI(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),JS=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},wle=/-\w/g,Kr=JS(e=>e.replace(wle,t=>t.slice(1).toUpperCase())),Sle=/\B([A-Z])/g,dd=JS(e=>e.replace(Sle,"-$1").toLowerCase()),XS=JS(e=>e.charAt(0).toUpperCase()+e.slice(1)),zh=JS(e=>e?`on${XS(e)}`:""),Qa=(e,t)=>!Object.is(e,t),Cx=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},BU=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},hI=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let hF;const ZS=()=>hF||(hF=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function mn(e){if(en(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=lr(o)?Tle(o):mn(o);if(r)for(const a in r)t[a]=r[a]}return t}else if(lr(e)||No(e))return e}const kle=/;(?![^(]*\))/g,Cle=/:([^]+)/,$le=/\/\*[^]*?\*\//g;function Tle(e){const t={};return e.replace($le,"").split(kle).forEach(n=>{if(n){const o=n.split(Cle);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function He(e){let t="";if(lr(e))t=e;else if(en(e))for(let n=0;n<e.length;n++){const o=He(e[n]);o&&(t+=o+" ")}else if(No(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function qt(e){if(!e)return null;let{class:t,style:n}=e;return t&&!lr(t)&&(e.class=He(t)),n&&(e.style=mn(n)),e}const Ele="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Dle=pI(Ele);function UU(e){return!!e||e===""}function Ole(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=gI(e[o],t[o]);return n}function gI(e,t){if(e===t)return!0;let n=mF(e),o=mF(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=ys(e),o=ys(t),n||o)return e===t;if(n=en(e),o=en(t),n||o)return n&&o?Ole(e,t):!1;if(n=No(e),o=No(t),n||o){if(!n||!o)return!1;const r=Object.keys(e).length,a=Object.keys(t).length;if(r!==a)return!1;for(const i in e){const l=e.hasOwnProperty(i),u=t.hasOwnProperty(i);if(l&&!u||!l&&u||!gI(e[i],t[i]))return!1}}return String(e)===String(t)}const qU=e=>!!(e&&e.__v_isRef===!0),O=e=>lr(e)?e:e==null?"":en(e)||No(e)&&(e.toString===NU||!cn(e.toString))?qU(e)?O(e.value):JSON.stringify(e,jU,2):String(e),jU=(e,t)=>qU(t)?jU(e,t.value):Fh(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],a)=>(n[oT(o,a)+" =>"]=r,n),{})}:zU(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>oT(n))}:ys(t)?oT(t):No(t)&&!en(t)&&!LU(t)?String(t):t,oT=(e,t="")=>{var n;return ys(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let ga;class HU{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ga&&(ga.active?(this.parent=ga,this.index=(ga.scopes||(ga.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ga;try{return ga=this,t()}finally{ga=n}}}on(){++this._on===1&&(this.prevScope=ga,ga=this)}off(){if(this._on>0&&--this._on===0){if(ga===this)ga=this.prevScope;else{let t=ga;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function tv(e){return new HU(e)}function Im(){return ga}function Pm(e,t=!1){ga&&ga.cleanups.push(e)}let nr;const rT=new WeakSet;class WU{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ga&&(ga.active?ga.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,rT.has(this)&&(rT.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||KU(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,gF(this),YU(this);const t=nr,n=Dl;nr=this,Dl=!0;try{return this.fn()}finally{JU(this),nr=t,Dl=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)bI(t);this.deps=this.depsTail=void 0,gF(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?rT.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){_3(this)&&this.run()}get dirty(){return _3(this)}}let GU=0,sy,ly;function KU(e,t=!1){if(e.flags|=8,t){e.next=ly,ly=e;return}e.next=sy,sy=e}function vI(){GU++}function yI(){if(--GU>0)return;if(ly){let t=ly;for(ly=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;sy;){let t=sy;for(sy=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function YU(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function JU(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),bI(o),Ale(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function _3(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(XU(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function XU(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Py)||(e.globalVersion=Py,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_3(e))))return;e.flags|=2;const t=e.dep,n=nr,o=Dl;nr=e,Dl=!0;try{YU(e);const r=e.fn(e._value);(t.version===0||Qa(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{nr=n,Dl=o,JU(e),e.flags&=-3}}function bI(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)bI(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ale(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Dl=!0;const ZU=[];function Hc(){ZU.push(Dl),Dl=!1}function Wc(){const e=ZU.pop();Dl=e===void 0?!0:e}function gF(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=nr;nr=void 0;try{t()}finally{nr=n}}}let Py=0;class Ile{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class QS{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!nr||!Dl||nr===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==nr)n=this.activeLink=new Ile(nr,this),nr.deps?(n.prevDep=nr.depsTail,nr.depsTail.nextDep=n,nr.depsTail=n):nr.deps=nr.depsTail=n,QU(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=nr.depsTail,n.nextDep=void 0,nr.depsTail.nextDep=n,nr.depsTail=n,nr.deps===n&&(nr.deps=o)}return n}trigger(t){this.version++,Py++,this.notify(t)}notify(t){vI();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{yI()}}}function QU(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)QU(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const kw=new WeakMap,Hp=Symbol(""),x3=Symbol(""),My=Symbol("");function vi(e,t,n){if(Dl&&nr){let o=kw.get(e);o||kw.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new QS),r.map=o,r.key=n),r.track()}}function _c(e,t,n,o,r,a){const i=kw.get(e);if(!i){Py++;return}const l=u=>{u&&u.trigger()};if(vI(),t==="clear")i.forEach(l);else{const u=en(e),d=u&&YS(n);if(u&&n==="length"){const p=Number(o);i.forEach((m,h)=>{(h==="length"||h===My||!ys(h)&&h>=p)&&l(m)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),d&&l(i.get(My)),t){case"add":u?d&&l(i.get("length")):(l(i.get(Hp)),Fh(e)&&l(i.get(x3)));break;case"delete":u||(l(i.get(Hp)),Fh(e)&&l(i.get(x3)));break;case"set":Fh(e)&&l(i.get(Hp));break}}yI()}function Ple(e,t){const n=kw.get(e);return n&&n.get(t)}function ah(e){const t=Un(e);return t===e?t:(vi(t,"iterate",My),ps(e)?t:t.map(Rl))}function ek(e){return vi(e=Un(e),"iterate",My),e}function pu(e,t){return Gc(e)?ug(Wp(e)?Rl(t):t):Rl(t)}const Mle={__proto__:null,[Symbol.iterator](){return aT(this,Symbol.iterator,e=>pu(this,e))},concat(...e){return ah(this).concat(...e.map(t=>en(t)?ah(t):t))},entries(){return aT(this,"entries",e=>(e[1]=pu(this,e[1]),e))},every(e,t){return uc(this,"every",e,t,void 0,arguments)},filter(e,t){return uc(this,"filter",e,t,n=>n.map(o=>pu(this,o)),arguments)},find(e,t){return uc(this,"find",e,t,n=>pu(this,n),arguments)},findIndex(e,t){return uc(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return uc(this,"findLast",e,t,n=>pu(this,n),arguments)},findLastIndex(e,t){return uc(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return uc(this,"forEach",e,t,void 0,arguments)},includes(...e){return iT(this,"includes",e)},indexOf(...e){return iT(this,"indexOf",e)},join(e){return ah(this).join(e)},lastIndexOf(...e){return iT(this,"lastIndexOf",e)},map(e,t){return uc(this,"map",e,t,void 0,arguments)},pop(){return a0(this,"pop")},push(...e){return a0(this,"push",e)},reduce(e,...t){return vF(this,"reduce",e,t)},reduceRight(e,...t){return vF(this,"reduceRight",e,t)},shift(){return a0(this,"shift")},some(e,t){return uc(this,"some",e,t,void 0,arguments)},splice(...e){return a0(this,"splice",e)},toReversed(){return ah(this).toReversed()},toSorted(e){return ah(this).toSorted(e)},toSpliced(...e){return ah(this).toSpliced(...e)},unshift(...e){return a0(this,"unshift",e)},values(){return aT(this,"values",e=>pu(this,e))}};function aT(e,t,n){const o=ek(e),r=o[t]();return o!==e&&!ps(e)&&(r._next=r.next,r.next=()=>{const a=r._next();return a.done||(a.value=n(a.value)),a}),r}const Rle=Array.prototype;function uc(e,t,n,o,r,a){const i=ek(e),l=i!==e&&!ps(e),u=i[t];if(u!==Rle[t]){const m=u.apply(e,a);return l?Rl(m):m}let d=n;i!==e&&(l?d=function(m,h){return n.call(this,pu(e,m),h,e)}:n.length>2&&(d=function(m,h){return n.call(this,m,h,e)}));const p=u.call(i,d,o);return l&&r?r(p):p}function vF(e,t,n,o){const r=ek(e),a=r!==e&&!ps(e);let i=n,l=!1;r!==e&&(a?(l=o.length===0,i=function(d,p,m){return l&&(l=!1,d=pu(e,d)),n.call(this,d,pu(e,p),m,e)}):n.length>3&&(i=function(d,p,m){return n.call(this,d,p,m,e)}));const u=r[t](i,...o);return l?pu(e,u):u}function iT(e,t,n){const o=Un(e);vi(o,"iterate",My);const r=o[t](...n);return(r===-1||r===!1)&&ok(n[0])?(n[0]=Un(n[0]),o[t](...n)):r}function a0(e,t,n=[]){Hc(),vI();const o=Un(e)[t].apply(e,n);return yI(),Wc(),o}const Fle=pI("__proto__,__v_isRef,__isVue"),eq=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ys));function zle(e){ys(e)||(e=String(e));const t=Un(this);return vi(t,"has",e),t.hasOwnProperty(e)}class tq{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return a;if(n==="__v_raw")return o===(r?a?sq:iq:a?aq:rq).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const i=en(t);if(!r){let u;if(i&&(u=Mle[n]))return u;if(n==="hasOwnProperty")return zle}const l=Reflect.get(t,n,jn(t)?t:o);if((ys(n)?eq.has(n):Fle(n))||(r||vi(t,"get",n),a))return l;if(jn(l)){const u=i&&YS(n)?l:l.value;return r&&No(u)?lg(u):u}return No(l)?r?lg(l):ti(l):l}}class nq extends tq{constructor(t=!1){super(!1,t)}set(t,n,o,r){let a=t[n];const i=en(t)&&YS(n);if(!this._isShallow){const d=Gc(a);if(!ps(o)&&!Gc(o)&&(a=Un(a),o=Un(o)),!i&&jn(a)&&!jn(o))return d||(a.value=o),!0}const l=i?Number(n)<t.length:Io(t,n),u=Reflect.set(t,n,o,jn(t)?t:r);return t===Un(r)&&(l?Qa(o,a)&&_c(t,"set",n,o):_c(t,"add",n,o)),u}deleteProperty(t,n){const o=Io(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&o&&_c(t,"delete",n,void 0),r}has(t,n){const o=Reflect.has(t,n);return(!ys(n)||!eq.has(n))&&vi(t,"has",n),o}ownKeys(t){return vi(t,"iterate",en(t)?"length":Hp),Reflect.ownKeys(t)}}class oq extends tq{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Vle=new nq,Nle=new oq,Lle=new nq(!0),Ble=new oq(!0),w3=e=>e,m_=e=>Reflect.getPrototypeOf(e);function Ule(e,t,n){return function(...o){const r=this.__v_raw,a=Un(r),i=Fh(a),l=e==="entries"||e===Symbol.iterator&&i,u=e==="keys"&&i,d=r[e](...o),p=n?w3:t?ug:Rl;return!t&&vi(a,"iterate",u?x3:Hp),Wa(Object.create(d),{next(){const{value:m,done:h}=d.next();return h?{value:m,done:h}:{value:l?[p(m[0]),p(m[1])]:p(m),done:h}}})}}function h_(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function qle(e,t){const n={get(r){const a=this.__v_raw,i=Un(a),l=Un(r);e||(Qa(r,l)&&vi(i,"get",r),vi(i,"get",l));const{has:u}=m_(i),d=t?w3:e?ug:Rl;if(u.call(i,r))return d(a.get(r));if(u.call(i,l))return d(a.get(l));a!==i&&a.get(r)},get size(){const r=this.__v_raw;return!e&&vi(Un(r),"iterate",Hp),r.size},has(r){const a=this.__v_raw,i=Un(a),l=Un(r);return e||(Qa(r,l)&&vi(i,"has",r),vi(i,"has",l)),r===l?a.has(r):a.has(r)||a.has(l)},forEach(r,a){const i=this,l=i.__v_raw,u=Un(l),d=t?w3:e?ug:Rl;return!e&&vi(u,"iterate",Hp),l.forEach((p,m)=>r.call(a,d(p),d(m),i))}};return Wa(n,e?{add:h_("add"),set:h_("set"),delete:h_("delete"),clear:h_("clear")}:{add(r){const a=Un(this),i=m_(a),l=Un(r),u=!t&&!ps(r)&&!Gc(r)?l:r;return i.has.call(a,u)||Qa(r,u)&&i.has.call(a,r)||Qa(l,u)&&i.has.call(a,l)||(a.add(u),_c(a,"add",u,u)),this},set(r,a){!t&&!ps(a)&&!Gc(a)&&(a=Un(a));const i=Un(this),{has:l,get:u}=m_(i);let d=l.call(i,r);d||(r=Un(r),d=l.call(i,r));const p=u.call(i,r);return i.set(r,a),d?Qa(a,p)&&_c(i,"set",r,a):_c(i,"add",r,a),this},delete(r){const a=Un(this),{has:i,get:l}=m_(a);let u=i.call(a,r);u||(r=Un(r),u=i.call(a,r)),l&&l.call(a,r);const d=a.delete(r);return u&&_c(a,"delete",r,void 0),d},clear(){const r=Un(this),a=r.size!==0,i=r.clear();return a&&_c(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Ule(r,e,t)}),n}function tk(e,t){const n=qle(e,t);return(o,r,a)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(Io(n,r)&&r in o?n:o,r,a)}const jle={get:tk(!1,!1)},Hle={get:tk(!1,!0)},Wle={get:tk(!0,!1)},Gle={get:tk(!0,!0)},rq=new WeakMap,aq=new WeakMap,iq=new WeakMap,sq=new WeakMap;function Kle(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yle(e){return e.__v_skip||!Object.isExtensible(e)?0:Kle(xle(e))}function ti(e){return Gc(e)?e:nk(e,!1,Vle,jle,rq)}function Jle(e){return nk(e,!1,Lle,Hle,aq)}function lg(e){return nk(e,!0,Nle,Wle,iq)}function Gd(e){return nk(e,!0,Ble,Gle,sq)}function nk(e,t,n,o,r){if(!No(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=Yle(e);if(a===0)return e;const i=r.get(e);if(i)return i;const l=new Proxy(e,a===2?o:n);return r.set(e,l),l}function Wp(e){return Gc(e)?Wp(e.__v_raw):!!(e&&e.__v_isReactive)}function Gc(e){return!!(e&&e.__v_isReadonly)}function ps(e){return!!(e&&e.__v_isShallow)}function ok(e){return e?!!e.__v_raw:!1}function Un(e){const t=e&&e.__v_raw;return t?Un(t):e}function _I(e){return!Io(e,"__v_skip")&&Object.isExtensible(e)&&BU(e,"__v_skip",!0),e}const Rl=e=>No(e)?ti(e):e,ug=e=>No(e)?lg(e):e;function jn(e){return e?e.__v_isRef===!0:!1}function re(e){return lq(e,!1)}function mo(e){return lq(e,!0)}function lq(e,t){return jn(e)?e:new Xle(e,t)}let Xle=class{constructor(t,n){this.dep=new QS,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Un(t),this._value=n?t:Rl(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||ps(t)||Gc(t);t=o?t:Un(t),Qa(t,n)&&(this._rawValue=t,this._value=o?t:Rl(t),this.dep.trigger())}};function Cw(e){e.dep&&e.dep.trigger()}function s(e){return jn(e)?e.value:e}function Mn(e){return cn(e)?e():s(e)}const Zle={get:(e,t,n)=>t==="__v_raw"?e:s(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return jn(r)&&!jn(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function uq(e){return Wp(e)?e:new Proxy(e,Zle)}class Qle{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new QS,{get:o,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Fb(e){return new Qle(e)}function Hn(e){const t=en(e)?new Array(e.length):{};for(const n in e)t[n]=cq(e,n);return t}class eue{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=ys(n)?n:String(n),this._raw=Un(t);let r=!0,a=t;if(!en(t)||ys(this._key)||!YS(this._key))do r=!ok(a)||ps(a);while(r&&(a=a.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=s(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&jn(this._raw[this._key])){const n=this._object[this._key];if(jn(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Ple(this._raw,this._key)}}class tue{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tf(e,t,n){return jn(e)?e:cn(e)?new tue(e):No(e)&&arguments.length>1?cq(e,t,n):re(e)}function cq(e,t,n){return new eue(e,t,n)}class nue{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new QS(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Py-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&nr!==this)return KU(this,!0),!0}get value(){const t=this.dep.track();return XU(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function oue(e,t,n=!1){let o,r;return cn(e)?o=e:(o=e.get,r=e.set),new nue(o,r,n)}const g_={},$w=new WeakMap;let Sp;function rue(e,t=!1,n=Sp){if(n){let o=$w.get(n);o||$w.set(n,o=[]),o.push(e)}}function aue(e,t,n=_o){const{immediate:o,deep:r,once:a,scheduler:i,augmentJob:l,call:u}=n,d=S=>r?S:ps(S)||r===!1||r===0?xc(S,1):xc(S);let p,m,h,g,v=!1,b=!1;if(jn(e)?(m=()=>e.value,v=ps(e)):Wp(e)?(m=()=>d(e),v=!0):en(e)?(b=!0,v=e.some(S=>Wp(S)||ps(S)),m=()=>e.map(S=>{if(jn(S))return S.value;if(Wp(S))return d(S);if(cn(S))return u?u(S,2):S()})):cn(e)?t?m=u?()=>u(e,2):e:m=()=>{if(h){Hc();try{h()}finally{Wc()}}const S=Sp;Sp=p;try{return u?u(e,3,[g]):e(g)}finally{Sp=S}}:m=Au,t&&r){const S=m,C=r===!0?1/0:r;m=()=>xc(S(),C)}const x=Im(),y=()=>{p.stop(),x&&x.active&&mI(x.effects,p)};if(a&&t){const S=t;t=(...C)=>{S(...C),y()}}let _=b?new Array(e.length).fill(g_):g_;const w=S=>{if(!(!(p.flags&1)||!p.dirty&&!S))if(t){const C=p.run();if(r||v||(b?C.some(($,T)=>Qa($,_[T])):Qa(C,_))){h&&h();const $=Sp;Sp=p;try{const T=[C,_===g_?void 0:b&&_[0]===g_?[]:_,g];_=C,u?u(t,3,T):t(...T)}finally{Sp=$}}}else p.run()};return l&&l(w),p=new WU(m),p.scheduler=i?()=>i(w,!1):w,g=S=>rue(S,!1,p),h=p.onStop=()=>{const S=$w.get(p);if(S){if(u)u(S,4);else for(const C of S)C();$w.delete(p)}},t?o?w(!0):_=p.run():i?i(w.bind(null,!0),!0):p.run(),y.pause=p.pause.bind(p),y.resume=p.resume.bind(p),y.stop=y,y}function xc(e,t=1/0,n){if(t<=0||!No(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,jn(e))xc(e.value,t,n);else if(en(e))for(let o=0;o<e.length;o++)xc(e[o],t,n);else if(zU(e)||Fh(e))e.forEach(o=>{xc(o,t,n)});else if(LU(e)){for(const o in e)xc(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&xc(e[o],t,n)}return e}function zb(e,t,n,o){try{return o?e(...o):e()}catch(r){Vb(r,t,n)}}function Lu(e,t,n,o){if(cn(e)){const r=zb(e,t,n,o);return r&&VU(r)&&r.catch(a=>{Vb(a,t,n)}),r}if(en(e)){const r=[];for(let a=0;a<e.length;a++)r.push(Lu(e[a],t,n,o));return r}}function Vb(e,t,n,o=!0){const r=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||_o;if(t){let l=t.parent;const u=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const p=l.ec;if(p){for(let m=0;m<p.length;m++)if(p[m](e,u,d)===!1)return}l=l.parent}if(a){Hc(),zb(a,null,10,[e,u,d]),Wc();return}}iue(e,n,r,o,i)}function iue(e,t,n,o=!0,r=!1){if(r)throw e;console.error(e)}const Ri=[];let cu=-1;const Vh=[];let Kd=null,_h=0;const dq=Promise.resolve();let Tw=null;function It(e){const t=Tw||dq;return e?t.then(this?e.bind(this):e):t}function sue(e){let t=cu+1,n=Ri.length;for(;t<n;){const o=t+n>>>1,r=Ri[o],a=Ry(r);a<e||a===e&&r.flags&2?t=o+1:n=o}return t}function xI(e){if(!(e.flags&1)){const t=Ry(e),n=Ri[Ri.length-1];!n||!(e.flags&2)&&t>=Ry(n)?Ri.push(e):Ri.splice(sue(t),0,e),e.flags|=1,fq()}}function fq(){Tw||(Tw=dq.then(mq))}function lue(e){en(e)?Vh.push(...e):Kd&&e.id===-1?Kd.splice(_h+1,0,e):e.flags&1||(Vh.push(e),e.flags|=1),fq()}function yF(e,t,n=cu+1){for(;n<Ri.length;n++){const o=Ri[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Ri.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function pq(e){if(Vh.length){const t=[...new Set(Vh)].sort((n,o)=>Ry(n)-Ry(o));if(Vh.length=0,Kd){Kd.push(...t);return}for(Kd=t,_h=0;_h<Kd.length;_h++){const n=Kd[_h];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Kd=null,_h=0}}const Ry=e=>e.id==null?e.flags&2?-1:1/0:e.id;function mq(e){try{for(cu=0;cu<Ri.length;cu++){const t=Ri[cu];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),zb(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;cu<Ri.length;cu++){const t=Ri[cu];t&&(t.flags&=-2)}cu=-1,Ri.length=0,pq(),Tw=null,(Ri.length||Vh.length)&&mq()}}let ni=null,hq=null;function Ew(e){const t=ni;return ni=e,hq=e&&e.type.__scopeId||null,t}function f(e,t=ni,n){if(!t||e._n)return e;const o=(...r)=>{o._d&&Aw(-1);const a=Ew(t);let i;try{i=e(...r)}finally{Ew(a),o._d&&Aw(1)}return i};return o._n=!0,o._c=!0,o._d=!0,o}function sm(e,t){if(ni===null)return e;const n=sk(ni),o=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[a,i,l,u=_o]=t[r];a&&(cn(a)&&(a={mounted:a,updated:a}),a.deep&&xc(i),o.push({dir:a,instance:n,value:i,oldValue:void 0,arg:l,modifiers:u}))}return e}function fp(e,t,n,o){const r=e.dirs,a=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];a&&(l.oldValue=a[i].value);let u=l.dir[o];u&&(Hc(),Lu(u,n,8,[e.el,l,e,t]),Wc())}}function fr(e,t){if(ei){let n=ei.provides;const o=ei.parent&&ei.parent.provides;o===n&&(n=ei.provides=Object.create(o)),n[e]=t}}function Fn(e,t,n=!1){const o=ur();if(o||Gp){let r=Gp?Gp._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&cn(t)?t.call(o&&o.proxy):t}}function gq(){return!!(ur()||Gp)}const uue=Symbol.for("v-scx"),cue=()=>Fn(uue);function hn(e,t){return Nb(e,null,t)}function vq(e,t){return Nb(e,null,{flush:"post"})}function yq(e,t){return Nb(e,null,{flush:"sync"})}function Xe(e,t,n){return Nb(e,t,n)}function Nb(e,t,n=_o){const{immediate:o,deep:r,flush:a,once:i}=n,l=Wa({},n),u=t&&o||!t&&a!=="post";let d;if(dg){if(a==="sync"){const g=cue();d=g.__watcherHandles||(g.__watcherHandles=[])}else if(!u){const g=()=>{};return g.stop=Au,g.resume=Au,g.pause=Au,g}}const p=ei;l.call=(g,v,b)=>Lu(g,p,v,b);let m=!1;a==="post"?l.scheduler=g=>{Pi(g,p&&p.suspense)}:a!=="sync"&&(m=!0,l.scheduler=(g,v)=>{v?g():xI(g)}),l.augmentJob=g=>{t&&(g.flags|=4),m&&(g.flags|=2,p&&(g.id=p.uid,g.i=p))};const h=aue(e,t,l);return dg&&(d?d.push(h):u&&h()),h}function due(e,t,n){const o=this.proxy,r=lr(e)?e.includes(".")?bq(o,e):()=>o[e]:e.bind(o,o);let a;cn(t)?a=t:(a=t.handler,n=t);const i=qb(this),l=Nb(r,a.bind(o),n);return i(),l}function bq(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;r<n.length&&o;r++)o=o[n[r]];return o}}const qd=new WeakMap,_q=Symbol("_vte"),fue=e=>e.__isTeleport,Pp=e=>e&&(e.disabled||e.disabled===""),pue=e=>e&&(e.defer||e.defer===""),bF=e=>typeof SVGElement<"u"&&e instanceof SVGElement,_F=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,S3=(e,t)=>{const n=e&&e.to;return lr(n)?t?t(n):null:n},mue={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,a,i,l,u,d){const{mc:p,pc:m,pbc:h,o:{insert:g,querySelector:v,createText:b,createComment:x,parentNode:y}}=d,_=Pp(t.props);let{dynamicChildren:w}=t;const S=(T,D,A)=>{T.shapeFlag&16&&p(T.children,D,A,r,a,i,l,u)},C=(T=t)=>{const D=Pp(T.props),A=T.target=S3(T.props,v),I=k3(A,T,b,g);A&&(i!=="svg"&&bF(A)?i="svg":i!=="mathml"&&_F(A)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(A),D||(S(T,A,I),F0(T,!1)))},$=T=>{const D=()=>{if(qd.get(T)===D){if(qd.delete(T),Pp(T.props)){const A=y(T.el)||n;S(T,A,T.anchor),F0(T,!0)}C(T)}};qd.set(T,D),Pi(D,a)};if(e==null){const T=t.el=b(""),D=t.anchor=b("");if(g(T,n,o),g(D,n,o),pue(t.props)||a&&a.pendingBranch){$(t);return}_&&(S(t,n,D),F0(t,!0)),C()}else{t.el=e.el;const T=t.anchor=e.anchor,D=qd.get(e);if(D){D.flags|=8,qd.delete(e),$(t);return}t.targetStart=e.targetStart;const A=t.target=e.target,I=t.targetAnchor=e.targetAnchor,U=Pp(e.props),j=U?n:A,Q=U?T:I;if(i==="svg"||bF(A)?i="svg":(i==="mathml"||_F(A))&&(i="mathml"),w?(h(e.dynamicChildren,w,j,r,a,i,l),DI(e,t,!0)):u||m(e,t,j,Q,r,a,i,l,!1),_)U?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):v_(t,n,T,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const F=t.target=S3(t.props,v);F&&v_(t,F,null,d,0)}else U&&v_(t,A,I,d,1);F0(t,_)}},remove(e,t,n,{um:o,o:{remove:r}},a){const{shapeFlag:i,children:l,anchor:u,targetStart:d,targetAnchor:p,target:m,props:h}=e;let g=a||!Pp(h);const v=qd.get(e);if(v&&(v.flags|=8,qd.delete(e),g=!1),m&&(r(d),r(p)),a&&r(u),i&16)for(let b=0;b<l.length;b++){const x=l[b];o(x,t,n,g,!!x.dynamicChildren)}},move:v_,hydrate:hue};function v_(e,t,n,{o:{insert:o},m:r},a=2){a===0&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:u,children:d,props:p}=e,m=a===2;if(m&&o(i,t,n),!qd.has(e)&&(!m||Pp(p))&&u&16)for(let h=0;h<d.length;h++)r(d[h],t,n,2);m&&o(l,t,n)}function hue(e,t,n,o,r,a,{o:{nextSibling:i,parentNode:l,querySelector:u,insert:d,createText:p}},m){function h(x,y){let _=y;for(;_;){if(_&&_.nodeType===8){if(_.data==="teleport start anchor")t.targetStart=_;else if(_.data==="teleport anchor"){t.targetAnchor=_,x._lpa=t.targetAnchor&&i(t.targetAnchor);break}}_=i(_)}}function g(x,y){y.anchor=m(i(x),y,l(x),n,o,r,a)}const v=t.target=S3(t.props,u),b=Pp(t.props);if(v){const x=v._lpa||v.firstChild;t.shapeFlag&16&&(b?(g(e,t),h(v,x),t.targetAnchor||k3(v,t,p,d,l(e)===v?e:null)):(t.anchor=i(e),h(v,x),t.targetAnchor||k3(v,t,p,d),m(x&&i(x),t,v,n,o,r,a))),F0(t,b)}else b&&t.shapeFlag&16&&(g(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const Lb=mue;function F0(e,t){const n=e.ctx;if(n&&n.ut){let o,r;for(t?(o=e.el,r=e.anchor):(o=e.targetStart,r=e.targetAnchor);o&&o!==r;)o.nodeType===1&&o.setAttribute("data-v-owner",n.uid),o=o.nextSibling;n.ut()}}function k3(e,t,n,o,r=null){const a=t.targetStart=n(""),i=t.targetAnchor=n("");return a[_q]=i,e&&(o(a,e,r),o(i,e,r)),i}const gue=Symbol("_leaveCb");function wI(e,t){e.shapeFlag&6&&e.component?(e.transition=t,wI(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function q(e,t){return cn(e)?Wa({name:e.name},t,{setup:e}):e}function xq(){const e=ur();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function SI(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Bb(e){const t=ur(),n=mo(null);if(t){const r=t.refs===_o?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:a=>n.value=a})}return n}function xF(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Dw=new WeakMap;function uy(e,t,n,o,r=!1){if(en(e)){e.forEach((b,x)=>uy(b,t&&(en(t)?t[x]:t),n,o,r));return}if(Nh(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&uy(e,t,n,o.component.subTree);return}const a=o.shapeFlag&4?sk(o.component):o.el,i=r?null:a,{i:l,r:u}=e,d=t&&t.r,p=l.refs===_o?l.refs={}:l.refs,m=l.setupState,h=Un(m),g=m===_o?FU:b=>xF(p,b)?!1:Io(h,b),v=(b,x)=>!(x&&xF(p,x));if(d!=null&&d!==u){if(wF(t),lr(d))p[d]=null,g(d)&&(m[d]=null);else if(jn(d)){const b=t;v(d,b.k)&&(d.value=null),b.k&&(p[b.k]=null)}}if(cn(u))zb(u,l,12,[i,p]);else{const b=lr(u),x=jn(u);if(b||x){const y=()=>{if(e.f){const _=b?g(u)?m[u]:p[u]:v()||!e.k?u.value:p[e.k];if(r)en(_)&&mI(_,a);else if(en(_))_.includes(a)||_.push(a);else if(b)p[u]=[a],g(u)&&(m[u]=p[u]);else{const w=[a];v(u,e.k)&&(u.value=w),e.k&&(p[e.k]=w)}}else b?(p[u]=i,g(u)&&(m[u]=i)):x&&(v(u,e.k)&&(u.value=i),e.k&&(p[e.k]=i))};if(i){const _=()=>{y(),Dw.delete(e)};_.id=-1,Dw.set(e,_),Pi(_,n)}else wF(e),y()}}}function wF(e){const t=Dw.get(e);t&&(t.flags|=8,Dw.delete(e))}const SF=e=>e.nodeType===8;ZS().requestIdleCallback;ZS().cancelIdleCallback;function vue(e,t){if(SF(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(SF(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const Nh=e=>!!e.type.__asyncLoader;function nv(e){cn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,hydrate:a,timeout:i,suspensible:l=!0,onError:u}=e;let d=null,p,m=0;const h=()=>(m++,d=null,g()),g=()=>{let v;return d||(v=d=t().catch(b=>{if(b=b instanceof Error?b:new Error(String(b)),u)return new Promise((x,y)=>{u(b,()=>x(h()),()=>y(b),m+1)});throw b}).then(b=>v!==d&&d?d:(b&&(b.__esModule||b[Symbol.toStringTag]==="Module")&&(b=b.default),p=b,b)))};return q({name:"AsyncComponentWrapper",__asyncLoader:g,__asyncHydrate(v,b,x){let y=!1;(b.bu||(b.bu=[])).push(()=>y=!0);const _=()=>{y||x()},w=a?()=>{const S=a(_,C=>vue(v,C));S&&(b.bum||(b.bum=[])).push(S)}:_;p?w():g().then(()=>!b.isUnmounted&&w())},get __asyncResolved(){return p},setup(){const v=ei;if(SI(v),p)return()=>y_(p,v);const b=w=>{d=null,Vb(w,v,13,!o)};if(l&&v.suspense||dg)return g().then(w=>()=>y_(w,v)).catch(w=>(b(w),()=>o?c(o,{error:w}):null));const x=re(!1),y=re(),_=re(!!r);return r&&setTimeout(()=>{_.value=!1},r),i!=null&&setTimeout(()=>{if(!x.value&&!y.value){const w=new Error(`Async component timed out after ${i}ms.`);b(w),y.value=w}},i),g().then(()=>{x.value=!0,v.parent&&kI(v.parent.vnode)&&v.parent.update()}).catch(w=>{b(w),y.value=w}),()=>{if(x.value&&p)return y_(p,v);if(y.value&&o)return c(o,{error:y.value});if(n&&!_.value)return y_(n,v)}}})}function y_(e,t){const{ref:n,props:o,children:r,ce:a}=t.vnode,i=c(e,o,r);return i.ref=n,i.ce=a,delete t.vnode.ce,i}const kI=e=>e.type.__isKeepAlive;function yue(e,t){wq(e,"a",t)}function bue(e,t){wq(e,"da",t)}function wq(e,t,n=ei){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(rk(t,o,n),n){let r=n.parent;for(;r&&r.parent;)kI(r.parent.vnode)&&_ue(o,t,n,r),r=r.parent}}function _ue(e,t,n,o){const r=rk(t,e,o,!0);Do(()=>{mI(o[t],r)},n)}function rk(e,t,n=ei,o=!1){if(n){const r=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...i)=>{Hc();const l=qb(n),u=Lu(t,n,e,i);return l(),Wc(),u});return o?r.unshift(a):r.push(a),a}}const fd=e=>(t,n=ei)=>{(!dg||e==="sp")&&rk(e,(...o)=>t(...o),n)},CI=fd("bm"),Pt=fd("m"),xue=fd("bu"),ak=fd("u"),tr=fd("bum"),Do=fd("um"),wue=fd("sp"),Sue=fd("rtg"),kue=fd("rtc");function Cue(e,t=ei){rk("ec",e,t)}const Sq="components";function Rf(e,t){return Cq(Sq,e,!0,t)||e}const kq=Symbol.for("v-ndc");function Mo(e){return lr(e)?Cq(Sq,e,!1)||e:e||kq}function Cq(e,t,n=!0,o=!1){const r=ni||ei;if(r){const a=r.type;{const l=ace(a,!1);if(l&&(l===t||l===Kr(t)||l===XS(Kr(t))))return a}const i=kF(r[e]||a[e],t)||kF(r.appContext[e],t);return!i&&o?a:i}}function kF(e,t){return e&&(e[t]||e[Kr(t)]||e[XS(Kr(t))])}function Ke(e,t,n,o){let r;const a=n&&n[o],i=en(e);if(i||lr(e)){const l=i&&Wp(e);let u=!1,d=!1;l&&(u=!ps(e),d=Gc(e),e=ek(e)),r=new Array(e.length);for(let p=0,m=e.length;p<m;p++)r[p]=t(u?d?ug(Rl(e[p])):Rl(e[p]):e[p],p,void 0,a&&a[p])}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,a&&a[l])}else if(No(e))if(e[Symbol.iterator])r=Array.from(e,(l,u)=>t(l,u,void 0,a&&a[u]));else{const l=Object.keys(e);r=new Array(l.length);for(let u=0,d=l.length;u<d;u++){const p=l[u];r[u]=t(e[p],p,u,a&&a[u])}}else r=[];return n&&(n[o]=r),r}function ee(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(en(o))for(let r=0;r<o.length;r++)e[o[r].name]=o[r].fn;else o&&(e[o.name]=o.key?(...r)=>{const a=o.fn(...r);return a&&(a.key=o.key),a}:o.fn)}return e}function se(e,t,n={},o,r){if(ni.ce||ni.parent&&Nh(ni.parent)&&ni.parent.ce){const d=Object.keys(n).length>0;return t!=="default"&&(n.name=t),k(),M(Me,null,[c("slot",n,o&&o())],d?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),k();const i=a&&$q(a(n)),l=n.key||i&&i.key,u=M(Me,{key:(l&&!ys(l)?l:`_${t}`)+(!i&&o?"_fb":"")},i||(o?o():[]),i&&e._===1?64:-2);return!r&&u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),a&&a._c&&(a._d=!0),u}function $q(e){return e.some(t=>vu(t)?!(t.type===Fl||t.type===Me&&!$q(t.children)):!0)?e:null}function Tq(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:zh(o)]=e[o];return n}const C3=e=>e?Jq(e)?sk(e):C3(e.parent):null,cy=Wa(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>C3(e.parent),$root:e=>C3(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Iq(e),$forceUpdate:e=>e.f||(e.f=()=>{xI(e.update)}),$nextTick:e=>e.n||(e.n=It.bind(e.proxy)),$watch:e=>due.bind(e)}),sT=(e,t)=>e!==_o&&!e.__isScriptSetup&&Io(e,t),$ue={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:a,accessCache:i,type:l,appContext:u}=e;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return a[t]}else{if(sT(o,t))return i[t]=1,o[t];if(r!==_o&&Io(r,t))return i[t]=2,r[t];if(Io(a,t))return i[t]=3,a[t];if(n!==_o&&Io(n,t))return i[t]=4,n[t];$3&&(i[t]=0)}}const d=cy[t];let p,m;if(d)return t==="$attrs"&&vi(e.attrs,"get",""),d(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==_o&&Io(n,t))return i[t]=4,n[t];if(m=u.config.globalProperties,Io(m,t))return m[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:a}=e;return sT(r,t)?(r[t]=n,!0):o!==_o&&Io(o,t)?(o[t]=n,!0):Io(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,props:a,type:i}},l){let u;return!!(n[l]||e!==_o&&l[0]!=="$"&&Io(e,l)||sT(t,l)||Io(a,l)||Io(o,l)||Io(cy,l)||Io(r.config.globalProperties,l)||(u=i.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Io(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function $I(){return Dq().slots}function Eq(){return Dq().attrs}function Dq(e){const t=ur();return t.setupContext||(t.setupContext=Zq(t))}function Fy(e){return en(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Oq(e,t){const n=Fy(e);for(const o in t){if(o.startsWith("__skip"))continue;let r=n[o];r?en(r)||cn(r)?r=n[o]={type:r,default:t[o]}:r.default=t[o]:r===null&&(r=n[o]={default:t[o]}),r&&t[`__skip_${o}`]&&(r.skipFactory=!0)}return n}function Ca(e,t){return!e||!t?e||t:en(e)&&en(t)?e.concat(t):Wa({},Fy(e),Fy(t))}let $3=!0;function Tue(e){const t=Iq(e),n=e.proxy,o=e.ctx;$3=!1,t.beforeCreate&&CF(t.beforeCreate,e,"bc");const{data:r,computed:a,methods:i,watch:l,provide:u,inject:d,created:p,beforeMount:m,mounted:h,beforeUpdate:g,updated:v,activated:b,deactivated:x,beforeDestroy:y,beforeUnmount:_,destroyed:w,unmounted:S,render:C,renderTracked:$,renderTriggered:T,errorCaptured:D,serverPrefetch:A,expose:I,inheritAttrs:U,components:j,directives:Q,filters:F}=t;if(d&&Eue(d,o,null),i)for(const Z in i){const Y=i[Z];cn(Y)&&(o[Z]=Y.bind(n))}if(r){const Z=r.call(n,n);No(Z)&&(e.data=ti(Z))}if($3=!0,a)for(const Z in a){const Y=a[Z],he=cn(Y)?Y.bind(n,n):cn(Y.get)?Y.get.bind(n,n):Au,ue=!cn(Y)&&cn(Y.set)?Y.set.bind(n):Au,pe=E({get:he,set:ue});Object.defineProperty(o,Z,{enumerable:!0,configurable:!0,get:()=>pe.value,set:ce=>pe.value=ce})}if(l)for(const Z in l)Aq(l[Z],o,n,Z);if(u){const Z=cn(u)?u.call(n):u;Reflect.ownKeys(Z).forEach(Y=>{fr(Y,Z[Y])})}p&&CF(p,e,"c");function G(Z,Y){en(Y)?Y.forEach(he=>Z(he.bind(n))):Y&&Z(Y.bind(n))}if(G(CI,m),G(Pt,h),G(xue,g),G(ak,v),G(yue,b),G(bue,x),G(Cue,D),G(kue,$),G(Sue,T),G(tr,_),G(Do,S),G(wue,A),en(I))if(I.length){const Z=e.exposed||(e.exposed={});I.forEach(Y=>{Object.defineProperty(Z,Y,{get:()=>n[Y],set:he=>n[Y]=he,enumerable:!0})})}else e.exposed||(e.exposed={});C&&e.render===Au&&(e.render=C),U!=null&&(e.inheritAttrs=U),j&&(e.components=j),Q&&(e.directives=Q),A&&SI(e)}function Eue(e,t,n=Au){en(e)&&(e=T3(e));for(const o in e){const r=e[o];let a;No(r)?"default"in r?a=Fn(r.from||o,r.default,!0):a=Fn(r.from||o):a=Fn(r),jn(a)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>a.value,set:i=>a.value=i}):t[o]=a}}function CF(e,t,n){Lu(en(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Aq(e,t,n,o){let r=o.includes(".")?bq(n,o):()=>n[o];if(lr(e)){const a=t[e];cn(a)&&Xe(r,a)}else if(cn(e))Xe(r,e.bind(n));else if(No(e))if(en(e))e.forEach(a=>Aq(a,t,n,o));else{const a=cn(e.handler)?e.handler.bind(n):t[e.handler];cn(a)&&Xe(r,a,e)}}function Iq(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:a,config:{optionMergeStrategies:i}}=e.appContext,l=a.get(t);let u;return l?u=l:!r.length&&!n&&!o?u=t:(u={},r.length&&r.forEach(d=>Ow(u,d,i,!0)),Ow(u,t,i)),No(t)&&a.set(t,u),u}function Ow(e,t,n,o=!1){const{mixins:r,extends:a}=t;a&&Ow(e,a,n,!0),r&&r.forEach(i=>Ow(e,i,n,!0));for(const i in t)if(!(o&&i==="expose")){const l=Due[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Due={data:$F,props:TF,emits:TF,methods:z0,computed:z0,beforeCreate:Ii,created:Ii,beforeMount:Ii,mounted:Ii,beforeUpdate:Ii,updated:Ii,beforeDestroy:Ii,beforeUnmount:Ii,destroyed:Ii,unmounted:Ii,activated:Ii,deactivated:Ii,errorCaptured:Ii,serverPrefetch:Ii,components:z0,directives:z0,watch:Aue,provide:$F,inject:Oue};function $F(e,t){return t?e?function(){return Wa(cn(e)?e.call(this,this):e,cn(t)?t.call(this,this):t)}:t:e}function Oue(e,t){return z0(T3(e),T3(t))}function T3(e){if(en(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ii(e,t){return e?[...new Set([].concat(e,t))]:t}function z0(e,t){return e?Wa(Object.create(null),e,t):t}function TF(e,t){return e?en(e)&&en(t)?[...new Set([...e,...t])]:Wa(Object.create(null),Fy(e),Fy(t??{})):t}function Aue(e,t){if(!e)return t;if(!t)return e;const n=Wa(Object.create(null),e);for(const o in t)n[o]=Ii(e[o],t[o]);return n}function Pq(){return{app:null,config:{isNativeTag:FU,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Iue=0;function Pue(e,t){return function(o,r=null){cn(o)||(o=Wa({},o)),r!=null&&!No(r)&&(r=null);const a=Pq(),i=new WeakSet,l=[];let u=!1;const d=a.app={_uid:Iue++,_component:o,_props:r,_container:null,_context:a,_instance:null,version:uce,get config(){return a.config},set config(p){},use(p,...m){return i.has(p)||(p&&cn(p.install)?(i.add(p),p.install(d,...m)):cn(p)&&(i.add(p),p(d,...m))),d},mixin(p){return a.mixins.includes(p)||a.mixins.push(p),d},component(p,m){return m?(a.components[p]=m,d):a.components[p]},directive(p,m){return m?(a.directives[p]=m,d):a.directives[p]},mount(p,m,h){if(!u){const g=d._ceVNode||c(o,r);return g.appContext=a,h===!0?h="svg":h===!1&&(h=void 0),e(g,p,h),u=!0,d._container=p,p.__vue_app__=d,sk(g.component)}},onUnmount(p){l.push(p)},unmount(){u&&(Lu(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(p,m){return a.provides[p]=m,d},runWithContext(p){const m=Gp;Gp=d;try{return p()}finally{Gp=m}}};return d}}let Gp=null;function Ot(e,t,n=_o){const o=ur(),r=Kr(t),a=dd(t),i=Mq(e,r),l=Fb((u,d)=>{let p,m=_o,h;return yq(()=>{const g=e[r];Qa(p,g)&&(p=g,d())}),{get(){return u(),n.get?n.get(p):p},set(g){const v=n.set?n.set(g):g;if(!Qa(v,p)&&!(m!==_o&&Qa(g,m)))return;const b=o.vnode.props;b&&(t in b||r in b||a in b)&&(`onUpdate:${t}`in b||`onUpdate:${r}`in b||`onUpdate:${a}`in b)||(p=g,d()),o.emit(`update:${t}`,v),Qa(g,v)&&Qa(g,m)&&!Qa(v,h)&&d(),m=g,h=v}}});return l[Symbol.iterator]=()=>{let u=0;return{next(){return u<2?{value:u++?i||_o:l,done:!1}:{done:!0}}}},l}const Mq=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Kr(t)}Modifiers`]||e[`${dd(t)}Modifiers`];function Mue(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||_o;let r=n;const a=t.startsWith("update:"),i=a&&Mq(o,t.slice(7));i&&(i.trim&&(r=n.map(p=>lr(p)?p.trim():p)),i.number&&(r=n.map(hI)));let l,u=o[l=zh(t)]||o[l=zh(Kr(t))];!u&&a&&(u=o[l=zh(dd(t))]),u&&Lu(u,e,6,r);const d=o[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Lu(d,e,6,r)}}const Rue=new WeakMap;function Rq(e,t,n=!1){const o=n?Rue:t.emitsCache,r=o.get(e);if(r!==void 0)return r;const a=e.emits;let i={},l=!1;if(!cn(e)){const u=d=>{const p=Rq(d,t,!0);p&&(l=!0,Wa(i,p))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!a&&!l?(No(e)&&o.set(e,null),null):(en(a)?a.forEach(u=>i[u]=null):Wa(i,a),No(e)&&o.set(e,i),i)}function ik(e,t){return!e||!GS(t)?!1:(t=t.slice(2).replace(/Once$/,""),Io(e,t[0].toLowerCase()+t.slice(1))||Io(e,dd(t))||Io(e,t))}function EF(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[a],slots:i,attrs:l,emit:u,render:d,renderCache:p,props:m,data:h,setupState:g,ctx:v,inheritAttrs:b}=e,x=Ew(e);let y,_;try{if(n.shapeFlag&4){const S=r||o,C=S;y=mu(d.call(C,S,p,m,g,h,v)),_=l}else{const S=t;y=mu(S.length>1?S(m,{attrs:l,slots:i,emit:u}):S(m,null)),_=t.props?l:Fue(l)}}catch(S){dy.length=0,Vb(S,e,1),y=c(Fl)}let w=y;if(_&&b!==!1){const S=Object.keys(_),{shapeFlag:C}=w;S.length&&C&7&&(a&&S.some(KS)&&(_=zue(_,a)),w=yf(w,_,!1,!0))}return n.dirs&&(w=yf(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&wI(w,n.transition),y=w,Ew(x),y}const Fue=e=>{let t;for(const n in e)(n==="class"||n==="style"||GS(n))&&((t||(t={}))[n]=e[n]);return t},zue=(e,t)=>{const n={};for(const o in e)(!KS(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Vue(e,t,n){const{props:o,children:r,component:a}=e,{props:i,children:l,patchFlag:u}=t,d=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return o?DF(o,i,d):!!i;if(u&8){const p=t.dynamicProps;for(let m=0;m<p.length;m++){const h=p[m];if(Fq(i,o,h)&&!ik(d,h))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:o===i?!1:o?i?DF(o,i,d):!0:!!i;return!1}function DF(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const a=o[r];if(Fq(t,e,a)&&!ik(n,a))return!0}return!1}function Fq(e,t,n){const o=e[n],r=t[n];return n==="style"&&No(o)&&No(r)?!gI(o,r):o!==r}function Nue({vnode:e,parent:t,suspense:n},o){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=o,e=r),r===e)(e=t.vnode).el=o,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=o)}const zq={},Vq=()=>Object.create(zq),Nq=e=>Object.getPrototypeOf(e)===zq;function Lue(e,t,n,o=!1){const r={},a=Vq();e.propsDefaults=Object.create(null),Lq(e,t,r,a);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=o?r:Jle(r):e.type.props?e.props=r:e.props=a,e.attrs=a}function Bue(e,t,n,o){const{props:r,attrs:a,vnode:{patchFlag:i}}=e,l=Un(r),[u]=e.propsOptions;let d=!1;if((o||i>0)&&!(i&16)){if(i&8){const p=e.vnode.dynamicProps;for(let m=0;m<p.length;m++){let h=p[m];if(ik(e.emitsOptions,h))continue;const g=t[h];if(u)if(Io(a,h))g!==a[h]&&(a[h]=g,d=!0);else{const v=Kr(h);r[v]=E3(u,l,v,g,e,!1)}else g!==a[h]&&(a[h]=g,d=!0)}}}else{Lq(e,t,r,a)&&(d=!0);let p;for(const m in l)(!t||!Io(t,m)&&((p=dd(m))===m||!Io(t,p)))&&(u?n&&(n[m]!==void 0||n[p]!==void 0)&&(r[m]=E3(u,l,m,void 0,e,!0)):delete r[m]);if(a!==l)for(const m in a)(!t||!Io(t,m))&&(delete a[m],d=!0)}d&&_c(e.attrs,"set","")}function Lq(e,t,n,o){const[r,a]=e.propsOptions;let i=!1,l;if(t)for(let u in t){if(iy(u))continue;const d=t[u];let p;r&&Io(r,p=Kr(u))?!a||!a.includes(p)?n[p]=d:(l||(l={}))[p]=d:ik(e.emitsOptions,u)||(!(u in o)||d!==o[u])&&(o[u]=d,i=!0)}if(a){const u=Un(n),d=l||_o;for(let p=0;p<a.length;p++){const m=a[p];n[m]=E3(r,u,m,d[m],e,!Io(d,m))}}return i}function E3(e,t,n,o,r,a){const i=e[n];if(i!=null){const l=Io(i,"default");if(l&&o===void 0){const u=i.default;if(i.type!==Function&&!i.skipFactory&&cn(u)){const{propsDefaults:d}=r;if(n in d)o=d[n];else{const p=qb(r);o=d[n]=u.call(null,t),p()}}else o=u;r.ce&&r.ce._setProp(n,o)}i[0]&&(a&&!l?o=!1:i[1]&&(o===""||o===dd(n))&&(o=!0))}return o}const Uue=new WeakMap;function Bq(e,t,n=!1){const o=n?Uue:t.propsCache,r=o.get(e);if(r)return r;const a=e.props,i={},l=[];let u=!1;if(!cn(e)){const p=m=>{u=!0;const[h,g]=Bq(m,t,!0);Wa(i,h),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!a&&!u)return No(e)&&o.set(e,Rh),Rh;if(en(a))for(let p=0;p<a.length;p++){const m=Kr(a[p]);OF(m)&&(i[m]=_o)}else if(a)for(const p in a){const m=Kr(p);if(OF(m)){const h=a[p],g=i[m]=en(h)||cn(h)?{type:h}:Wa({},h),v=g.type;let b=!1,x=!0;if(en(v))for(let y=0;y<v.length;++y){const _=v[y],w=cn(_)&&_.name;if(w==="Boolean"){b=!0;break}else w==="String"&&(x=!1)}else b=cn(v)&&v.name==="Boolean";g[0]=b,g[1]=x,(b||Io(g,"default"))&&l.push(m)}}const d=[i,l];return No(e)&&o.set(e,d),d}function OF(e){return e[0]!=="$"&&!iy(e)}const TI=e=>e==="_"||e==="_ctx"||e==="$stable",EI=e=>en(e)?e.map(mu):[mu(e)],que=(e,t,n)=>{if(t._n)return t;const o=f((...r)=>EI(t(...r)),n);return o._c=!1,o},Uq=(e,t,n)=>{const o=e._ctx;for(const r in e){if(TI(r))continue;const a=e[r];if(cn(a))t[r]=que(r,a,o);else if(a!=null){const i=EI(a);t[r]=()=>i}}},qq=(e,t)=>{const n=EI(t);e.slots.default=()=>n},jq=(e,t,n)=>{for(const o in t)(n||!TI(o))&&(e[o]=t[o])},jue=(e,t,n)=>{const o=e.slots=Vq();if(e.vnode.shapeFlag&32){const r=t._;r?(jq(o,t,n),n&&BU(o,"_",r,!0)):Uq(t,o)}else t&&qq(e,t)},Hue=(e,t,n)=>{const{vnode:o,slots:r}=e;let a=!0,i=_o;if(o.shapeFlag&32){const l=t._;l?n&&l===1?a=!1:jq(r,t,n):(a=!t.$stable,Uq(t,r)),i=t}else t&&(qq(e,t),i={default:1});if(a)for(const l in r)!TI(l)&&i[l]==null&&delete r[l]},Pi=Jue;function Wue(e){return Gue(e)}function Gue(e,t){const n=ZS();n.__VUE__=!0;const{insert:o,remove:r,patchProp:a,createElement:i,createText:l,createComment:u,setText:d,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=Au,insertStaticContent:v}=e,b=(oe,be,De,Se=null,Te=null,Ne=null,te=void 0,le=null,xe=!!be.dynamicChildren)=>{if(oe===be)return;oe&&!i0(oe,be)&&(Se=X(oe),ce(oe,Te,Ne,!0),oe=null),be.patchFlag===-2&&(xe=!1,be.dynamicChildren=null);const{type:me,ref:Je,shapeFlag:je}=be;switch(me){case Ub:x(oe,be,De,Se);break;case Fl:y(oe,be,De,Se);break;case uT:oe==null&&_(be,De,Se,te);break;case Me:j(oe,be,De,Se,Te,Ne,te,le,xe);break;default:je&1?C(oe,be,De,Se,Te,Ne,te,le,xe):je&6?Q(oe,be,De,Se,Te,Ne,te,le,xe):(je&64||je&128)&&me.process(oe,be,De,Se,Te,Ne,te,le,xe,ze)}Je!=null&&Te?uy(Je,oe&&oe.ref,Ne,be||oe,!be):Je==null&&oe&&oe.ref!=null&&uy(oe.ref,null,Ne,oe,!0)},x=(oe,be,De,Se)=>{if(oe==null)o(be.el=l(be.children),De,Se);else{const Te=be.el=oe.el;be.children!==oe.children&&d(Te,be.children)}},y=(oe,be,De,Se)=>{oe==null?o(be.el=u(be.children||""),De,Se):be.el=oe.el},_=(oe,be,De,Se)=>{[oe.el,oe.anchor]=v(oe.children,be,De,Se,oe.el,oe.anchor)},w=({el:oe,anchor:be},De,Se)=>{let Te;for(;oe&&oe!==be;)Te=h(oe),o(oe,De,Se),oe=Te;o(be,De,Se)},S=({el:oe,anchor:be})=>{let De;for(;oe&&oe!==be;)De=h(oe),r(oe),oe=De;r(be)},C=(oe,be,De,Se,Te,Ne,te,le,xe)=>{if(be.type==="svg"?te="svg":be.type==="math"&&(te="mathml"),oe==null)$(be,De,Se,Te,Ne,te,le,xe);else{const me=oe.el&&oe.el._isVueCE?oe.el:null;try{me&&me._beginPatch(),A(oe,be,Te,Ne,te,le,xe)}finally{me&&me._endPatch()}}},$=(oe,be,De,Se,Te,Ne,te,le)=>{let xe,me;const{props:Je,shapeFlag:je,transition:Pe,dirs:Ue}=oe;if(xe=oe.el=i(oe.type,Ne,Je&&Je.is,Je),je&8?p(xe,oe.children):je&16&&D(oe.children,xe,null,Se,Te,lT(oe,Ne),te,le),Ue&&fp(oe,null,Se,"created"),T(xe,oe,oe.scopeId,te,Se),Je){for(const Mt in Je)Mt!=="value"&&!iy(Mt)&&a(xe,Mt,null,Je[Mt],Ne,Se);"value"in Je&&a(xe,"value",null,Je.value,Ne),(me=Je.onVnodeBeforeMount)&&Ql(me,Se,oe)}Ue&&fp(oe,null,Se,"beforeMount");const $t=Kue(Te,Pe);$t&&Pe.beforeEnter(xe),o(xe,be,De),((me=Je&&Je.onVnodeMounted)||$t||Ue)&&Pi(()=>{me&&Ql(me,Se,oe),$t&&Pe.enter(xe),Ue&&fp(oe,null,Se,"mounted")},Te)},T=(oe,be,De,Se,Te)=>{if(De&&g(oe,De),Se)for(let Ne=0;Ne<Se.length;Ne++)g(oe,Se[Ne]);if(Te){let Ne=Te.subTree;if(be===Ne||Gq(Ne.type)&&(Ne.ssContent===be||Ne.ssFallback===be)){const te=Te.vnode;T(oe,te,te.scopeId,te.slotScopeIds,Te.parent)}}},D=(oe,be,De,Se,Te,Ne,te,le,xe=0)=>{for(let me=xe;me<oe.length;me++){const Je=oe[me]=le?vc(oe[me]):mu(oe[me]);b(null,Je,be,De,Se,Te,Ne,te,le)}},A=(oe,be,De,Se,Te,Ne,te)=>{const le=be.el=oe.el;let{patchFlag:xe,dynamicChildren:me,dirs:Je}=be;xe|=oe.patchFlag&16;const je=oe.props||_o,Pe=be.props||_o;let Ue;if(De&&pp(De,!1),(Ue=Pe.onVnodeBeforeUpdate)&&Ql(Ue,De,be,oe),Je&&fp(be,oe,De,"beforeUpdate"),De&&pp(De,!0),(je.innerHTML&&Pe.innerHTML==null||je.textContent&&Pe.textContent==null)&&p(le,""),me?I(oe.dynamicChildren,me,le,De,Se,lT(be,Te),Ne):te||Y(oe,be,le,null,De,Se,lT(be,Te),Ne,!1),xe>0){if(xe&16)U(le,je,Pe,De,Te);else if(xe&2&&je.class!==Pe.class&&a(le,"class",null,Pe.class,Te),xe&4&&a(le,"style",je.style,Pe.style,Te),xe&8){const $t=be.dynamicProps;for(let Mt=0;Mt<$t.length;Mt++){const Ae=$t[Mt],Le=je[Ae],gt=Pe[Ae];(gt!==Le||Ae==="value")&&a(le,Ae,Le,gt,Te,De)}}xe&1&&oe.children!==be.children&&p(le,be.children)}else!te&&me==null&&U(le,je,Pe,De,Te);((Ue=Pe.onVnodeUpdated)||Je)&&Pi(()=>{Ue&&Ql(Ue,De,be,oe),Je&&fp(be,oe,De,"updated")},Se)},I=(oe,be,De,Se,Te,Ne,te)=>{for(let le=0;le<be.length;le++){const xe=oe[le],me=be[le],Je=xe.el&&(xe.type===Me||!i0(xe,me)||xe.shapeFlag&198)?m(xe.el):De;b(xe,me,Je,null,Se,Te,Ne,te,!0)}},U=(oe,be,De,Se,Te)=>{if(be!==De){if(be!==_o)for(const Ne in be)!iy(Ne)&&!(Ne in De)&&a(oe,Ne,be[Ne],null,Te,Se);for(const Ne in De){if(iy(Ne))continue;const te=De[Ne],le=be[Ne];te!==le&&Ne!=="value"&&a(oe,Ne,le,te,Te,Se)}"value"in De&&a(oe,"value",be.value,De.value,Te)}},j=(oe,be,De,Se,Te,Ne,te,le,xe)=>{const me=be.el=oe?oe.el:l(""),Je=be.anchor=oe?oe.anchor:l("");let{patchFlag:je,dynamicChildren:Pe,slotScopeIds:Ue}=be;Ue&&(le=le?le.concat(Ue):Ue),oe==null?(o(me,De,Se),o(Je,De,Se),D(be.children||[],De,Je,Te,Ne,te,le,xe)):je>0&&je&64&&Pe&&oe.dynamicChildren&&oe.dynamicChildren.length===Pe.length?(I(oe.dynamicChildren,Pe,De,Te,Ne,te,le),(be.key!=null||Te&&be===Te.subTree)&&DI(oe,be,!0)):Y(oe,be,De,Je,Te,Ne,te,le,xe)},Q=(oe,be,De,Se,Te,Ne,te,le,xe)=>{be.slotScopeIds=le,oe==null?be.shapeFlag&512?Te.ctx.activate(be,De,Se,te,xe):F(be,De,Se,Te,Ne,te,xe):R(oe,be,xe)},F=(oe,be,De,Se,Te,Ne,te)=>{const le=oe.component=tce(oe,Se,Te);if(kI(oe)&&(le.ctx.renderer=ze),nce(le,!1,te),le.asyncDep){if(Te&&Te.registerDep(le,G,te),!oe.el){const xe=le.subTree=c(Fl);y(null,xe,be,De),oe.placeholder=xe.el}}else G(le,oe,be,De,Te,Ne,te)},R=(oe,be,De)=>{const Se=be.component=oe.component;if(Vue(oe,be,De))if(Se.asyncDep&&!Se.asyncResolved){Z(Se,be,De);return}else Se.next=be,Se.update();else be.el=oe.el,Se.vnode=be},G=(oe,be,De,Se,Te,Ne,te)=>{const le=()=>{if(oe.isMounted){let{next:je,bu:Pe,u:Ue,parent:$t,vnode:Mt}=oe;{const tt=Hq(oe);if(tt){je&&(je.el=Mt.el,Z(oe,je,te)),tt.asyncDep.then(()=>{Pi(()=>{oe.isUnmounted||me()},Te)});return}}let Ae=je,Le;pp(oe,!1),je?(je.el=Mt.el,Z(oe,je,te)):je=Mt,Pe&&Cx(Pe),(Le=je.props&&je.props.onVnodeBeforeUpdate)&&Ql(Le,$t,je,Mt),pp(oe,!0);const gt=EF(oe),ct=oe.subTree;oe.subTree=gt,b(ct,gt,m(ct.el),X(ct),oe,Te,Ne),je.el=gt.el,Ae===null&&Nue(oe,gt.el),Ue&&Pi(Ue,Te),(Le=je.props&&je.props.onVnodeUpdated)&&Pi(()=>Ql(Le,$t,je,Mt),Te)}else{let je;const{el:Pe,props:Ue}=be,{bm:$t,m:Mt,parent:Ae,root:Le,type:gt}=oe,ct=Nh(be);pp(oe,!1),$t&&Cx($t),!ct&&(je=Ue&&Ue.onVnodeBeforeMount)&&Ql(je,Ae,be),pp(oe,!0);{Le.ce&&Le.ce._hasShadowRoot()&&Le.ce._injectChildStyle(gt,oe.parent?oe.parent.type:void 0);const tt=oe.subTree=EF(oe);b(null,tt,De,Se,oe,Te,Ne),be.el=tt.el}if(Mt&&Pi(Mt,Te),!ct&&(je=Ue&&Ue.onVnodeMounted)){const tt=be;Pi(()=>Ql(je,Ae,tt),Te)}(be.shapeFlag&256||Ae&&Nh(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&oe.a&&Pi(oe.a,Te),oe.isMounted=!0,be=De=Se=null}};oe.scope.on();const xe=oe.effect=new WU(le);oe.scope.off();const me=oe.update=xe.run.bind(xe),Je=oe.job=xe.runIfDirty.bind(xe);Je.i=oe,Je.id=oe.uid,xe.scheduler=()=>xI(Je),pp(oe,!0),me()},Z=(oe,be,De)=>{be.component=oe;const Se=oe.vnode.props;oe.vnode=be,oe.next=null,Bue(oe,be.props,Se,De),Hue(oe,be.children,De),Hc(),yF(oe),Wc()},Y=(oe,be,De,Se,Te,Ne,te,le,xe=!1)=>{const me=oe&&oe.children,Je=oe?oe.shapeFlag:0,je=be.children,{patchFlag:Pe,shapeFlag:Ue}=be;if(Pe>0){if(Pe&128){ue(me,je,De,Se,Te,Ne,te,le,xe);return}else if(Pe&256){he(me,je,De,Se,Te,Ne,te,le,xe);return}}Ue&8?(Je&16&&K(me,Te,Ne),je!==me&&p(De,je)):Je&16?Ue&16?ue(me,je,De,Se,Te,Ne,te,le,xe):K(me,Te,Ne,!0):(Je&8&&p(De,""),Ue&16&&D(je,De,Se,Te,Ne,te,le,xe))},he=(oe,be,De,Se,Te,Ne,te,le,xe)=>{oe=oe||Rh,be=be||Rh;const me=oe.length,Je=be.length,je=Math.min(me,Je);let Pe;for(Pe=0;Pe<je;Pe++){const Ue=be[Pe]=xe?vc(be[Pe]):mu(be[Pe]);b(oe[Pe],Ue,De,null,Te,Ne,te,le,xe)}me>Je?K(oe,Te,Ne,!0,!1,je):D(be,De,Se,Te,Ne,te,le,xe,je)},ue=(oe,be,De,Se,Te,Ne,te,le,xe)=>{let me=0;const Je=be.length;let je=oe.length-1,Pe=Je-1;for(;me<=je&&me<=Pe;){const Ue=oe[me],$t=be[me]=xe?vc(be[me]):mu(be[me]);if(i0(Ue,$t))b(Ue,$t,De,null,Te,Ne,te,le,xe);else break;me++}for(;me<=je&&me<=Pe;){const Ue=oe[je],$t=be[Pe]=xe?vc(be[Pe]):mu(be[Pe]);if(i0(Ue,$t))b(Ue,$t,De,null,Te,Ne,te,le,xe);else break;je--,Pe--}if(me>je){if(me<=Pe){const Ue=Pe+1,$t=Ue<Je?be[Ue].el:Se;for(;me<=Pe;)b(null,be[me]=xe?vc(be[me]):mu(be[me]),De,$t,Te,Ne,te,le,xe),me++}}else if(me>Pe)for(;me<=je;)ce(oe[me],Te,Ne,!0),me++;else{const Ue=me,$t=me,Mt=new Map;for(me=$t;me<=Pe;me++){const $e=be[me]=xe?vc(be[me]):mu(be[me]);$e.key!=null&&Mt.set($e.key,me)}let Ae,Le=0;const gt=Pe-$t+1;let ct=!1,tt=0;const tn=new Array(gt);for(me=0;me<gt;me++)tn[me]=0;for(me=Ue;me<=je;me++){const $e=oe[me];if(Le>=gt){ce($e,Te,Ne,!0);continue}let ge;if($e.key!=null)ge=Mt.get($e.key);else for(Ae=$t;Ae<=Pe;Ae++)if(tn[Ae-$t]===0&&i0($e,be[Ae])){ge=Ae;break}ge===void 0?ce($e,Te,Ne,!0):(tn[ge-$t]=me+1,ge>=tt?tt=ge:ct=!0,b($e,be[ge],De,null,Te,Ne,te,le,xe),Le++)}const Bt=ct?Yue(tn):Rh;for(Ae=Bt.length-1,me=gt-1;me>=0;me--){const $e=$t+me,ge=be[$e],Fe=be[$e+1],Be=$e+1<Je?Fe.el||Wq(Fe):Se;tn[me]===0?b(null,ge,De,Be,Te,Ne,te,le,xe):ct&&(Ae<0||me!==Bt[Ae]?pe(ge,De,Be,2):Ae--)}}},pe=(oe,be,De,Se,Te=null)=>{const{el:Ne,type:te,transition:le,children:xe,shapeFlag:me}=oe;if(me&6){pe(oe.component.subTree,be,De,Se);return}if(me&128){oe.suspense.move(be,De,Se);return}if(me&64){te.move(oe,be,De,ze);return}if(te===Me){o(Ne,be,De);for(let je=0;je<xe.length;je++)pe(xe[je],be,De,Se);o(oe.anchor,be,De);return}if(te===uT){w(oe,be,De);return}if(Se!==2&&me&1&&le)if(Se===0)le.beforeEnter(Ne),o(Ne,be,De),Pi(()=>le.enter(Ne),Te);else{const{leave:je,delayLeave:Pe,afterLeave:Ue}=le,$t=()=>{oe.ctx.isUnmounted?r(Ne):o(Ne,be,De)},Mt=()=>{Ne._isLeaving&&Ne[gue](!0),je(Ne,()=>{$t(),Ue&&Ue()})};Pe?Pe(Ne,$t,Mt):Mt()}else o(Ne,be,De)},ce=(oe,be,De,Se=!1,Te=!1)=>{const{type:Ne,props:te,ref:le,children:xe,dynamicChildren:me,shapeFlag:Je,patchFlag:je,dirs:Pe,cacheIndex:Ue,memo:$t}=oe;if(je===-2&&(Te=!1),le!=null&&(Hc(),uy(le,null,De,oe,!0),Wc()),Ue!=null&&(be.renderCache[Ue]=void 0),Je&256){be.ctx.deactivate(oe);return}const Mt=Je&1&&Pe,Ae=!Nh(oe);let Le;if(Ae&&(Le=te&&te.onVnodeBeforeUnmount)&&Ql(Le,be,oe),Je&6)B(oe.component,De,Se);else{if(Je&128){oe.suspense.unmount(De,Se);return}Mt&&fp(oe,null,be,"beforeUnmount"),Je&64?oe.type.remove(oe,be,De,ze,Se):me&&!me.hasOnce&&(Ne!==Me||je>0&&je&64)?K(me,be,De,!1,!0):(Ne===Me&&je&384||!Te&&Je&16)&&K(xe,be,De),Se&&ae(oe)}const gt=$t!=null&&Ue==null;(Ae&&(Le=te&&te.onVnodeUnmounted)||Mt||gt)&&Pi(()=>{Le&&Ql(Le,be,oe),Mt&&fp(oe,null,be,"unmounted"),gt&&(oe.el=null)},De)},ae=oe=>{const{type:be,el:De,anchor:Se,transition:Te}=oe;if(be===Me){W(De,Se);return}if(be===uT){S(oe);return}const Ne=()=>{r(De),Te&&!Te.persisted&&Te.afterLeave&&Te.afterLeave()};if(oe.shapeFlag&1&&Te&&!Te.persisted){const{leave:te,delayLeave:le}=Te,xe=()=>te(De,Ne);le?le(oe.el,Ne,xe):xe()}else Ne()},W=(oe,be)=>{let De;for(;oe!==be;)De=h(oe),r(oe),oe=De;r(be)},B=(oe,be,De)=>{const{bum:Se,scope:Te,job:Ne,subTree:te,um:le,m:xe,a:me}=oe;AF(xe),AF(me),Se&&Cx(Se),Te.stop(),Ne&&(Ne.flags|=8,ce(te,oe,be,De)),le&&Pi(le,be),Pi(()=>{oe.isUnmounted=!0},be)},K=(oe,be,De,Se=!1,Te=!1,Ne=0)=>{for(let te=Ne;te<oe.length;te++)ce(oe[te],be,De,Se,Te)},X=oe=>{if(oe.shapeFlag&6)return X(oe.component.subTree);if(oe.shapeFlag&128)return oe.suspense.next();const be=h(oe.anchor||oe.el),De=be&&be[_q];return De?h(De):be};let Ee=!1;const _e=(oe,be,De)=>{let Se;oe==null?be._vnode&&(ce(be._vnode,null,null,!0),Se=be._vnode.component):b(be._vnode||null,oe,be,null,null,null,De),be._vnode=oe,Ee||(Ee=!0,yF(Se),pq(),Ee=!1)},ze={p:b,um:ce,m:pe,r:ae,mt:F,mc:D,pc:Y,pbc:I,n:X,o:e};return{render:_e,hydrate:void 0,createApp:Pue(_e)}}function lT({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function pp({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Kue(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function DI(e,t,n=!1){const o=e.children,r=t.children;if(en(o)&&en(r))for(let a=0;a<o.length;a++){const i=o[a];let l=r[a];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[a]=vc(r[a]),l.el=i.el),!n&&l.patchFlag!==-2&&DI(i,l)),l.type===Ub&&(l.patchFlag===-1&&(l=r[a]=vc(l)),l.el=i.el),l.type===Fl&&!l.el&&(l.el=i.el)}}function Yue(e){const t=e.slice(),n=[0];let o,r,a,i,l;const u=e.length;for(o=0;o<u;o++){const d=e[o];if(d!==0){if(r=n[n.length-1],e[r]<d){t[o]=r,n.push(o);continue}for(a=0,i=n.length-1;a<i;)l=a+i>>1,e[n[l]]<d?a=l+1:i=l;d<e[n[a]]&&(a>0&&(t[o]=n[a-1]),n[a]=o)}}for(a=n.length,i=n[a-1];a-- >0;)n[a]=i,i=t[i];return n}function Hq(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Hq(t)}function AF(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Wq(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Wq(t.subTree):null}const Gq=e=>e.__isSuspense;function Jue(e,t){t&&t.pendingBranch?en(e)?t.effects.push(...e):t.effects.push(e):lue(e)}const Me=Symbol.for("v-fgt"),Ub=Symbol.for("v-txt"),Fl=Symbol.for("v-cmt"),uT=Symbol.for("v-stc"),dy=[];let Fi=null;function k(e=!1){dy.push(Fi=e?null:[])}function Xue(){dy.pop(),Fi=dy[dy.length-1]||null}let cg=1;function Aw(e,t=!1){cg+=e,e<0&&Fi&&t&&(Fi.hasOnce=!0)}function Kq(e){return e.dynamicChildren=cg>0?Fi||Rh:null,Xue(),cg>0&&Fi&&Fi.push(e),e}function L(e,t,n,o,r,a){return Kq(H(e,t,n,o,r,a,!0))}function M(e,t,n,o,r){return Kq(c(e,t,n,o,r,!0))}function vu(e){return e?e.__v_isVNode===!0:!1}function i0(e,t){return e.type===t.type&&e.key===t.key}const Yq=({key:e})=>e??null,$x=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?lr(e)||jn(e)||cn(e)?{i:ni,r:e,k:t,f:!!n}:e:null);function H(e,t=null,n=null,o=0,r=null,a=e===Me?0:1,i=!1,l=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Yq(t),ref:t&&$x(t),scopeId:hq,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ni};return l?(OI(u,n),a&128&&e.normalize(u)):n&&(u.shapeFlag|=lr(n)?8:16),cg>0&&!i&&Fi&&(u.patchFlag>0||a&6)&&u.patchFlag!==32&&Fi.push(u),u}const c=Zue;function Zue(e,t=null,n=null,o=0,r=null,a=!1){if((!e||e===kq)&&(e=Fl),vu(e)){const l=yf(e,t,!0);return n&&OI(l,n),cg>0&&!a&&Fi&&(l.shapeFlag&6?Fi[Fi.indexOf(e)]=l:Fi.push(l)),l.patchFlag=-2,l}if(ice(e)&&(e=e.__vccOpts),t){t=Wt(t);let{class:l,style:u}=t;l&&!lr(l)&&(t.class=He(l)),No(u)&&(ok(u)&&!en(u)&&(u=Wa({},u)),t.style=mn(u))}const i=lr(e)?1:Gq(e)?128:fue(e)?64:No(e)?4:cn(e)?2:0;return H(e,t,n,o,r,i,a,!0)}function Wt(e){return e?ok(e)||Nq(e)?Wa({},e):e:null}function yf(e,t,n=!1,o=!1){const{props:r,ref:a,patchFlag:i,children:l,transition:u}=e,d=t?Oe(r||{},t):r,p={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Yq(d),ref:t&&t.ref?n&&a?en(a)?a.concat($x(t)):[a,$x(t)]:$x(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Me?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&yf(e.ssContent),ssFallback:e.ssFallback&&yf(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&o&&wI(p,u.clone(p)),p}function P(e=" ",t=0){return c(Ub,null,e,t)}function ke(e="",t=!1){return t?(k(),M(Fl,null,e)):c(Fl,null,e)}function mu(e){return e==null||typeof e=="boolean"?c(Fl):en(e)?c(Me,null,e.slice()):vu(e)?vc(e):c(Ub,null,String(e))}function vc(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:yf(e)}function OI(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(en(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),OI(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Nq(t)?t._ctx=ni:r===3&&ni&&(ni.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else cn(t)?(t={default:t,_ctx:ni},n=32):(t=String(t),o&64?(n=16,t=[P(t)]):n=8);e.children=t,e.shapeFlag|=n}function Oe(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const r in o)if(r==="class")t.class!==o.class&&(t.class=He([t.class,o.class]));else if(r==="style")t.style=mn([t.style,o.style]);else if(GS(r)){const a=t[r],i=o[r];i&&a!==i&&!(en(a)&&a.includes(i))?t[r]=a?[].concat(a,i):i:i==null&&a==null&&!KS(r)&&(t[r]=i)}else r!==""&&(t[r]=o[r])}return t}function Ql(e,t,n,o=null){Lu(e,t,7,[n,o])}const Que=Pq();let ece=0;function tce(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||Que,a={uid:ece++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new HU(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Bq(o,r),emitsOptions:Rq(o,r),emit:null,emitted:null,propsDefaults:_o,inheritAttrs:o.inheritAttrs,ctx:_o,data:_o,props:_o,attrs:_o,slots:_o,refs:_o,setupState:_o,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=Mue.bind(null,a),e.ce&&e.ce(a),a}let ei=null;const ur=()=>ei||ni;let Iw,D3;{const e=ZS(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),a=>{r.length>1?r.forEach(i=>i(a)):r[0](a)}};Iw=t("__VUE_INSTANCE_SETTERS__",n=>ei=n),D3=t("__VUE_SSR_SETTERS__",n=>dg=n)}const qb=e=>{const t=ei;return Iw(e),e.scope.on(),()=>{e.scope.off(),Iw(t)}},IF=()=>{ei&&ei.scope.off(),Iw(null)};function Jq(e){return e.vnode.shapeFlag&4}let dg=!1;function nce(e,t=!1,n=!1){t&&D3(t);const{props:o,children:r}=e.vnode,a=Jq(e);Lue(e,o,a,t),jue(e,r,n||t);const i=a?oce(e,t):void 0;return t&&D3(!1),i}function oce(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,$ue);const{setup:o}=n;if(o){Hc();const r=e.setupContext=o.length>1?Zq(e):null,a=qb(e),i=zb(o,e,0,[e.props,r]),l=VU(i);if(Wc(),a(),(l||e.sp)&&!Nh(e)&&SI(e),l){if(i.then(IF,IF),t)return i.then(u=>{PF(e,u)}).catch(u=>{Vb(u,e,0)});e.asyncDep=i}else PF(e,i)}else Xq(e)}function PF(e,t,n){cn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:No(t)&&(e.setupState=uq(t)),Xq(e)}function Xq(e,t,n){const o=e.type;e.render||(e.render=o.render||Au);{const r=qb(e);Hc();try{Tue(e)}finally{Wc(),r()}}}const rce={get(e,t){return vi(e,"get",""),e[t]}};function Zq(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,rce),slots:e.slots,emit:e.emit,expose:t}}function sk(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(uq(_I(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in cy)return cy[n](e)},has(t,n){return n in t||n in cy}})):e.proxy}function ace(e,t=!0){return cn(e)?e.displayName||e.name:e.name||t&&e.__name}function ice(e){return cn(e)&&"__vccOpts"in e}const E=(e,t)=>oue(e,t,dg);function xo(e,t,n){try{Aw(-1);const o=arguments.length;return o===2?No(t)&&!en(t)?vu(t)?c(e,null,[t]):c(e,t):c(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&vu(n)&&(n=[n]),c(e,t,n))}finally{Aw(1)}}function sce(e,t,n,o){const r=n[o];if(r&&lce(r,e))return r;const a=t();return a.memo=e.slice(),a.cacheIndex=o,n[o]=a}function lce(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(Qa(n[o],t[o]))return!1;return cg>0&&Fi&&Fi.push(e),!0}const uce="3.5.34";let O3;const MF=typeof window<"u"&&window.trustedTypes;if(MF)try{O3=MF.createPolicy("vue",{createHTML:e=>e})}catch{}const Qq=O3?e=>O3.createHTML(e):e=>e,cce="http://www.w3.org/2000/svg",dce="http://www.w3.org/1998/Math/MathML",hc=typeof document<"u"?document:null,RF=hc&&hc.createElement("template"),fce={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?hc.createElementNS(cce,e):t==="mathml"?hc.createElementNS(dce,e):n?hc.createElement(e,{is:n}):hc.createElement(e);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>hc.createTextNode(e),createComment:e=>hc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>hc.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,a){const i=n?n.previousSibling:t.lastChild;if(r&&(r===a||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===a||!(r=r.nextSibling)););else{RF.innerHTML=Qq(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=RF.content;if(o==="svg"||o==="mathml"){const u=l.firstChild;for(;u.firstChild;)l.appendChild(u.firstChild);l.removeChild(u)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pce=Symbol("_vtc");function mce(e,t,n){const o=e[pce];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Pw=Symbol("_vod"),e9=Symbol("_vsh"),AI={name:"show",beforeMount(e,{value:t},{transition:n}){e[Pw]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):s0(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),s0(e,!0),o.enter(e)):o.leave(e,()=>{s0(e,!1)}):s0(e,t))},beforeUnmount(e,{value:t}){s0(e,t)}};function s0(e,t){e.style.display=t?e[Pw]:"none",e[e9]=!t}const hce=Symbol(""),gce=/(?:^|;)\s*display\s*:/;function vce(e,t,n){const o=e.style,r=lr(n);let a=!1;if(n&&!r){if(t)if(lr(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&V0(o,l,"")}else for(const i in t)n[i]==null&&V0(o,i,"");for(const i in n){i==="display"&&(a=!0);const l=n[i];l!=null?bce(e,i,!lr(t)&&t?t[i]:void 0,l)||V0(o,i,l):V0(o,i,"")}}else if(r){if(t!==n){const i=o[hce];i&&(n+=";"+i),o.cssText=n,a=gce.test(n)}}else t&&e.removeAttribute("style");Pw in e&&(e[Pw]=a?o.display:"",e[e9]&&(o.display="none"))}const FF=/\s*!important$/;function V0(e,t,n){if(en(n))n.forEach(o=>V0(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=yce(e,t);FF.test(n)?e.setProperty(dd(o),n.replace(FF,""),"important"):e[o]=n}}const zF=["Webkit","Moz","ms"],cT={};function yce(e,t){const n=cT[t];if(n)return n;let o=Kr(t);if(o!=="filter"&&o in e)return cT[t]=o;o=XS(o);for(let r=0;r<zF.length;r++){const a=zF[r]+o;if(a in e)return cT[t]=a}return t}function bce(e,t,n,o){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&lr(o)&&n===o}const VF="http://www.w3.org/1999/xlink";function NF(e,t,n,o,r,a=Dle(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(VF,t.slice(6,t.length)):e.setAttributeNS(VF,t,n):n==null||a&&!UU(n)?e.removeAttribute(t):e.setAttribute(t,a?"":ys(n)?String(n):n)}function LF(e,t,n,o,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Qq(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const l=a==="OPTION"?e.getAttribute("value")||"":e.value,u=n==null?e.type==="checkbox"?"on":"":String(n);(l!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=UU(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(r||t)}function xh(e,t,n,o){e.addEventListener(t,n,o)}function _ce(e,t,n,o){e.removeEventListener(t,n,o)}const BF=Symbol("_vei");function xce(e,t,n,o,r=null){const a=e[BF]||(e[BF]={}),i=a[t];if(o&&i)i.value=o;else{const[l,u]=wce(t);if(o){const d=a[t]=Cce(o,r);xh(e,l,d,u)}else i&&(_ce(e,l,i,u),a[t]=void 0)}}const UF=/(?:Once|Passive|Capture)$/;function wce(e){let t;if(UF.test(e)){t={};let o;for(;o=e.match(UF);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):dd(e.slice(2)),t]}let dT=0;const Sce=Promise.resolve(),kce=()=>dT||(Sce.then(()=>dT=0),dT=Date.now());function Cce(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Lu($ce(o,n.value),t,5,[o])};return n.value=e,n.attached=kce(),n}function $ce(e,t){if(en(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>r=>!r._stopped&&o&&o(r))}else return t}const qF=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Tce=(e,t,n,o,r,a)=>{const i=r==="svg";t==="class"?mce(e,o,i):t==="style"?vce(e,n,o):GS(t)?KS(t)||xce(e,t,n,o,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ece(e,t,o,i))?(LF(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&NF(e,t,o,i,a,t!=="value")):e._isVueCE&&(Dce(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!lr(o)))?LF(e,Kr(t),o,a,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),NF(e,t,o,i))};function Ece(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&qF(t)&&cn(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return qF(t)&&lr(n)?!1:t in e}function Dce(e,t){const n=e._def.props;if(!n)return!1;const o=Kr(t);return Array.isArray(n)?n.some(r=>Kr(r)===o):Object.keys(n).some(r=>Kr(r)===o)}const jF=e=>{const t=e.props["onUpdate:modelValue"]||!1;return en(t)?n=>Cx(t,n):t};function Oce(e){e.target.composing=!0}function HF(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const fT=Symbol("_assign");function WF(e,t,n){return t&&(e=e.trim()),n&&(e=hI(e)),e}const Mw={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[fT]=jF(r);const a=o||r.props&&r.props.type==="number";xh(e,t?"change":"input",i=>{i.target.composing||e[fT](WF(e.value,n,a))}),(n||a)&&xh(e,"change",()=>{e.value=WF(e.value,n,a)}),t||(xh(e,"compositionstart",Oce),xh(e,"compositionend",HF),xh(e,"change",HF))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:a}},i){if(e[fT]=jF(i),e.composing)return;const l=(a||e.type==="number")&&!/^0\d/.test(e.value)?hI(e.value):e.value,u=t??"";if(l===u)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(o&&t===n||r&&e.value.trim()===u)||(e.value=u)}},Ace=["ctrl","shift","alt","meta"],Ice={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ace.some(n=>e[`${n}Key`]&&!t.includes(n))},at=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((r,...a)=>{for(let i=0;i<t.length;i++){const l=Ice[t[i]];if(l&&l(r,t))return}return e(r,...a)}))},Pce={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ro=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(r=>{if(!("key"in r))return;const a=dd(r.key);if(t.some(i=>i===a||Pce[i]===a))return e(r)}))},Mce=Wa({patchProp:Tce},fce);let GF;function Rce(){return GF||(GF=Wue(Mce))}const Fce=((...e)=>{const t=Rce().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=Vce(o);if(!r)return;const a=t._component;!cn(a)&&!a.render&&!a.template&&(a.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,zce(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function zce(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Vce(e){return lr(e)?document.querySelector(e):e}function Nce(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const Rw=typeof window<"u",Ff=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Lce=(e,t,n)=>Bce({l:e,k:t,s:n}),Bce=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),la=e=>typeof e=="number"&&isFinite(e),t9=e=>MI(e)==="[object Date]",Fw=e=>MI(e)==="[object RegExp]",lk=e=>To(e)&&Object.keys(e).length===0,Sa=Object.assign,Uce=Object.create,Go=(e=null)=>Uce(e);let KF;const II=()=>KF||(KF=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Go());function YF(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function qce(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}const jce=/^\s*javascript\s*(?::|�*58;?|�*3a;?|:?)/i,Hce=/^(?:href|src|action|formaction)$/i;function PI(e){return jce.test(e)}function Wce(e){const t=/url\s*\(/gi;let n="",o=0,r;for(;(r=t.exec(e))!==null;){const a=r.index,i=t.lastIndex-1;let l=i+1,u=1,d=null;for(;l<e.length;l++){const h=e[l];if(d){h===d&&(d=null);continue}if(h==='"'||h==="'")d=h;else if(h==="(")u++;else if(h===")"&&(u--,u===0))break}if(u!==0)break;const p=e.slice(i+1,l).trim(),m=p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")?p.slice(1,-1).trim():p;n+=e.slice(o,a),n+=PI(m)?"url(about:blank)":e.slice(a,l+1),o=l+1}return n+e.slice(o)}function JF(e,t){if(Hce.test(e)&&PI(t))return"about:blank";const n=e.toLowerCase()==="style"?Wce(t):t;return qce(n)}function Gce(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(n,o,r)=>`${o}="${JF(o,r)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(n,o,r)=>`${o}='${JF(o,r)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),e=e.replace(/(\s+(?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi,(n,o,r)=>PI(r)?`${o}about:blank`:n),e}const Kce=Object.prototype.hasOwnProperty;function Us(e,t){return Kce.call(e,t)}const Br=Array.isArray,Tr=e=>typeof e=="function",Vt=e=>typeof e=="string",_r=e=>typeof e=="boolean",wo=e=>e!==null&&typeof e=="object",Yce=e=>wo(e)&&Tr(e.then)&&Tr(e.catch),n9=Object.prototype.toString,MI=e=>n9.call(e),To=e=>MI(e)==="[object Object]",Jce=e=>e==null?"":Br(e)||To(e)&&e.toString===n9?JSON.stringify(e,null,2):String(e);function RI(e,t=""){return e.reduce((n,o,r)=>r===0?n+o:n+t+o,"")}const b_=e=>!wo(e)||Br(e);function Tx(e,t){if(b_(e)||b_(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:r}=n.pop();Object.keys(o).forEach(a=>{a!=="__proto__"&&(wo(o[a])&&!wo(r[a])&&(r[a]=Array.isArray(o[a])?[]:Go()),b_(r[a])||b_(o[a])?r[a]=o[a]:n.push({src:o[a],des:r[a]}))})}}function Xce(e,t,n){return{line:e,column:t,offset:n}}function A3(e,t,n){return{start:e,end:t}}const Ao={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},Zce=17;function uk(e,t,n={}){const{domain:o,messages:r,args:a}=n,i=e,l=new SyntaxError(String(i));return l.code=e,t&&(l.location=t),l.domain=o,l}function Qce(e){throw e}const eu=" ",ede="\r",mi=`
|
|
3
3
|
`,tde="\u2028",nde="\u2029";function ode(e){const t=e;let n=0,o=1,r=1,a=0;const i=T=>t[T]===ede&&t[T+1]===mi,l=T=>t[T]===mi,u=T=>t[T]===nde,d=T=>t[T]===tde,p=T=>i(T)||l(T)||u(T)||d(T),m=()=>n,h=()=>o,g=()=>r,v=()=>a,b=T=>i(T)||u(T)||d(T)?mi:t[T],x=()=>b(n),y=()=>b(n+a);function _(){return a=0,p(n)&&(o++,r=0),i(n)&&n++,n++,r++,t[n]}function w(){return i(n+a)&&a++,a++,t[n+a]}function S(){n=0,o=1,r=1,a=0}function C(T=0){a=T}function $(){const T=n+a;for(;T!==n;)_();a=0}return{index:m,line:h,column:g,peekOffset:v,charAt:b,currentChar:x,currentPeek:y,next:_,peek:w,reset:S,resetPeek:C,skipToPeek:$}}const cc=void 0,rde=".",XF="'",ade="tokenizer";function ide(e,t={}){const n=t.location!==!1,o=ode(e),r=()=>o.index(),a=()=>Xce(o.line(),o.column(),o.index()),i=a(),l=r(),u={currentType:13,offset:l,startLoc:i,endLoc:i,lastType:13,lastOffset:l,lastStartLoc:i,lastEndLoc:i,braceNest:0,inLinked:!1,text:""},d=()=>u,{onError:p}=t;function m(te,le,xe,...me){const Je=d();if(le.column+=xe,le.offset+=xe,p){const je=n?A3(Je.startLoc,le):null,Pe=uk(te,je,{domain:ade,args:me});p(Pe)}}function h(te,le,xe){te.endLoc=a(),te.currentType=le;const me={type:le};return n&&(me.loc=A3(te.startLoc,te.endLoc)),xe!=null&&(me.value=xe),me}const g=te=>h(te,13);function v(te,le){return te.currentChar()===le?(te.next(),le):(m(Ao.EXPECTED_TOKEN,a(),0,le),"")}function b(te){let le="";for(;te.currentPeek()===eu||te.currentPeek()===mi;)le+=te.currentPeek(),te.peek();return le}function x(te){const le=b(te);return te.skipToPeek(),le}function y(te){if(te===cc)return!1;const le=te.charCodeAt(0);return le>=97&&le<=122||le>=65&&le<=90||le===95}function _(te){if(te===cc)return!1;const le=te.charCodeAt(0);return le>=48&&le<=57}function w(te,le){const{currentType:xe}=le;if(xe!==2)return!1;b(te);const me=y(te.currentPeek());return te.resetPeek(),me}function S(te,le){const{currentType:xe}=le;if(xe!==2)return!1;b(te);const me=te.currentPeek()==="-"?te.peek():te.currentPeek(),Je=_(me);return te.resetPeek(),Je}function C(te,le){const{currentType:xe}=le;if(xe!==2)return!1;b(te);const me=te.currentPeek()===XF;return te.resetPeek(),me}function $(te,le){const{currentType:xe}=le;if(xe!==7)return!1;b(te);const me=te.currentPeek()===".";return te.resetPeek(),me}function T(te,le){const{currentType:xe}=le;if(xe!==8)return!1;b(te);const me=y(te.currentPeek());return te.resetPeek(),me}function D(te,le){const{currentType:xe}=le;if(!(xe===7||xe===11))return!1;b(te);const me=te.currentPeek()===":";return te.resetPeek(),me}function A(te,le){const{currentType:xe}=le;if(xe!==9)return!1;const me=()=>{const je=te.currentPeek();return je==="{"?y(te.peek()):je==="@"||je==="|"||je===":"||je==="."||je===eu||!je?!1:je===mi?(te.peek(),me()):U(te,!1)},Je=me();return te.resetPeek(),Je}function I(te){b(te);const le=te.currentPeek()==="|";return te.resetPeek(),le}function U(te,le=!0){const xe=(Je=!1,je="")=>{const Pe=te.currentPeek();return Pe==="{"||Pe==="@"||!Pe?Je:Pe==="|"?!(je===eu||je===mi):Pe===eu?(te.peek(),xe(!0,eu)):Pe===mi?(te.peek(),xe(!0,mi)):!0},me=xe();return le&&te.resetPeek(),me}function j(te,le){const xe=te.currentChar();return xe===cc?cc:le(xe)?(te.next(),xe):null}function Q(te){const le=te.charCodeAt(0);return le>=97&&le<=122||le>=65&&le<=90||le>=48&&le<=57||le===95||le===36}function F(te){return j(te,Q)}function R(te){const le=te.charCodeAt(0);return le>=97&&le<=122||le>=65&&le<=90||le>=48&&le<=57||le===95||le===36||le===45}function G(te){return j(te,R)}function Z(te){const le=te.charCodeAt(0);return le>=48&&le<=57}function Y(te){return j(te,Z)}function he(te){const le=te.charCodeAt(0);return le>=48&&le<=57||le>=65&&le<=70||le>=97&&le<=102}function ue(te){return j(te,he)}function pe(te){let le="",xe="";for(;le=Y(te);)xe+=le;return xe}function ce(te){let le="";for(;;){const xe=te.currentChar();if(xe==="\\"){const me=te.peek();me==="{"||me==="}"||me==="@"||me==="|"||me==="\\"?(le+=xe+me,te.next(),te.next()):(te.resetPeek(),le+=xe,te.next())}else{if(xe==="{"||xe==="}"||xe==="@"||xe==="|"||!xe)break;if(xe===eu||xe===mi)if(U(te))le+=xe,te.next();else{if(I(te))break;le+=xe,te.next()}else le+=xe,te.next()}}return le}function ae(te){x(te);let le="",xe="";for(;le=G(te);)xe+=le;const me=te.currentChar();if(me&&me!=="}"&&me!==cc&&me!==eu&&me!==mi&&me!==" "){const Je=ze(te);return m(Ao.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,xe+Je),xe+Je}return te.currentChar()===cc&&m(Ao.UNTERMINATED_CLOSING_BRACE,a(),0),xe}function W(te){x(te);let le="";return te.currentChar()==="-"?(te.next(),le+=`-${pe(te)}`):le+=pe(te),te.currentChar()===cc&&m(Ao.UNTERMINATED_CLOSING_BRACE,a(),0),le}function B(te){return te!==XF&&te!==mi}function K(te){x(te),v(te,"'");let le="",xe="";for(;le=j(te,B);)le==="\\"?xe+=X(te):xe+=le;const me=te.currentChar();return me===mi||me===cc?(m(Ao.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),me===mi&&(te.next(),v(te,"'")),xe):(v(te,"'"),xe)}function X(te){const le=te.currentChar();switch(le){case"\\":case"'":return te.next(),`\\${le}`;case"u":return Ee(te,le,4);case"U":return Ee(te,le,6);default:return m(Ao.UNKNOWN_ESCAPE_SEQUENCE,a(),0,le),""}}function Ee(te,le,xe){v(te,le);let me="";for(let Je=0;Je<xe;Je++){const je=ue(te);if(!je){m(Ao.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${le}${me}${te.currentChar()}`);break}me+=je}return`\\${le}${me}`}function _e(te){return te!=="{"&&te!=="}"&&te!==eu&&te!==mi}function ze(te){x(te);let le="",xe="";for(;le=j(te,_e);)xe+=le;return xe}function st(te){let le="",xe="";for(;le=F(te);)xe+=le;return xe}function oe(te){const le=xe=>{const me=te.currentChar();return me==="{"||me==="@"||me==="|"||me==="("||me===")"||!me||me===eu?xe:(xe+=me,te.next(),le(xe))};return le("")}function be(te){x(te);const le=v(te,"|");return x(te),le}function De(te,le){let xe=null;switch(te.currentChar()){case"{":return le.braceNest>=1&&m(Ao.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),te.next(),xe=h(le,2,"{"),x(te),le.braceNest++,xe;case"}":return le.braceNest>0&&le.currentType===2&&m(Ao.EMPTY_PLACEHOLDER,a(),0),te.next(),xe=h(le,3,"}"),le.braceNest--,le.braceNest>0&&x(te),le.inLinked&&le.braceNest===0&&(le.inLinked=!1),xe;case"@":return le.braceNest>0&&m(Ao.UNTERMINATED_CLOSING_BRACE,a(),0),xe=Se(te,le)||g(le),le.braceNest=0,xe;default:{let Je=!0,je=!0,Pe=!0;if(I(te))return le.braceNest>0&&m(Ao.UNTERMINATED_CLOSING_BRACE,a(),0),xe=h(le,1,be(te)),le.braceNest=0,le.inLinked=!1,xe;if(le.braceNest>0&&(le.currentType===4||le.currentType===5||le.currentType===6))return m(Ao.UNTERMINATED_CLOSING_BRACE,a(),0),le.braceNest=0,Te(te,le);if(Je=w(te,le))return xe=h(le,4,ae(te)),x(te),xe;if(je=S(te,le))return xe=h(le,5,W(te)),x(te),xe;if(Pe=C(te,le))return xe=h(le,6,K(te)),x(te),xe;if(!Je&&!je&&!Pe)return xe=h(le,12,ze(te)),m(Ao.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,xe.value),x(te),xe;break}}return xe}function Se(te,le){const{currentType:xe}=le;let me=null;const Je=te.currentChar();switch((xe===7||xe===8||xe===11||xe===9)&&(Je===mi||Je===eu)&&m(Ao.INVALID_LINKED_FORMAT,a(),0),Je){case"@":return te.next(),me=h(le,7,"@"),le.inLinked=!0,me;case".":return x(te),te.next(),h(le,8,".");case":":return x(te),te.next(),h(le,9,":");default:return I(te)?(me=h(le,1,be(te)),le.braceNest=0,le.inLinked=!1,me):$(te,le)||D(te,le)?(x(te),Se(te,le)):T(te,le)?(x(te),h(le,11,st(te))):A(te,le)?(x(te),Je==="{"?De(te,le)||me:h(le,10,oe(te))):(xe===7&&m(Ao.INVALID_LINKED_FORMAT,a(),0),le.braceNest=0,le.inLinked=!1,Te(te,le))}}function Te(te,le){let xe={type:13};if(le.braceNest>0)return De(te,le)||g(le);if(le.inLinked)return Se(te,le)||g(le);switch(te.currentChar()){case"{":return De(te,le)||g(le);case"}":return m(Ao.UNBALANCED_CLOSING_BRACE,a(),0),te.next(),h(le,3,"}");case"@":return Se(te,le)||g(le);default:{if(I(te))return xe=h(le,1,be(te)),le.braceNest=0,le.inLinked=!1,xe;if(U(te))return h(le,0,ce(te));break}}return xe}function Ne(){const{currentType:te,offset:le,startLoc:xe,endLoc:me}=u;return u.lastType=te,u.lastOffset=le,u.lastStartLoc=xe,u.lastEndLoc=me,u.offset=r(),u.startLoc=a(),o.currentChar()===cc?h(u,13):Te(o,u)}return{nextToken:Ne,currentOffset:r,currentPosition:a,context:d}}const sde="parser",lde=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,ude=/\\([\\@{}|])/g;function cde(e,t){return t}function dde(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function fde(e={}){const t=e.location!==!1,{onError:n}=e;function o(y,_,w,S,...C){const $=y.currentPosition();if($.offset+=S,$.column+=S,n){const T=t?A3(w,$):null,D=uk(_,T,{domain:sde,args:C});n(D)}}function r(y,_,w){const S={type:y};return t&&(S.start=_,S.end=_,S.loc={start:w,end:w}),S}function a(y,_,w,S){t&&(y.end=_,y.loc&&(y.loc.end=w))}function i(y,_){const w=y.context(),S=r(3,w.offset,w.startLoc);return S.value=_.replace(ude,cde),a(S,y.currentOffset(),y.currentPosition()),S}function l(y,_){const w=y.context(),{lastOffset:S,lastStartLoc:C}=w,$=r(5,S,C);return $.index=parseInt(_,10),y.nextToken(),a($,y.currentOffset(),y.currentPosition()),$}function u(y,_){const w=y.context(),{lastOffset:S,lastStartLoc:C}=w,$=r(4,S,C);return $.key=_,y.nextToken(),a($,y.currentOffset(),y.currentPosition()),$}function d(y,_){const w=y.context(),{lastOffset:S,lastStartLoc:C}=w,$=r(9,S,C);return $.value=_.replace(lde,dde),y.nextToken(),a($,y.currentOffset(),y.currentPosition()),$}function p(y){const _=y.nextToken(),w=y.context(),{lastOffset:S,lastStartLoc:C}=w,$=r(8,S,C);return _.type!==11?(o(y,Ao.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),$.value="",a($,S,C),{nextConsumeToken:_,node:$}):(_.value==null&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,tu(_)),$.value=_.value||"",a($,y.currentOffset(),y.currentPosition()),{node:$})}function m(y,_){const w=y.context(),S=r(7,w.offset,w.startLoc);return S.value=_,a(S,y.currentOffset(),y.currentPosition()),S}function h(y){const _=y.context(),w=r(6,_.offset,_.startLoc);let S=y.nextToken();if(S.type===8){const C=p(y);w.modifier=C.node,S=C.nextConsumeToken||y.nextToken()}switch(S.type!==9&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,tu(S)),S=y.nextToken(),S.type===2&&(S=y.nextToken()),S.type){case 10:S.value==null&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,tu(S)),w.key=m(y,S.value||"");break;case 4:S.value==null&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,tu(S)),w.key=u(y,S.value||"");break;case 5:S.value==null&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,tu(S)),w.key=l(y,S.value||"");break;case 6:S.value==null&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,tu(S)),w.key=d(y,S.value||"");break;default:{o(y,Ao.UNEXPECTED_EMPTY_LINKED_KEY,_.lastStartLoc,0);const C=y.context(),$=r(7,C.offset,C.startLoc);return $.value="",a($,C.offset,C.startLoc),w.key=$,a(w,C.offset,C.startLoc),{nextConsumeToken:S,node:w}}}return a(w,y.currentOffset(),y.currentPosition()),{node:w}}function g(y){const _=y.context(),w=_.currentType===1?y.currentOffset():_.offset,S=_.currentType===1?_.endLoc:_.startLoc,C=r(2,w,S);C.items=[];let $=null;do{const A=$||y.nextToken();switch($=null,A.type){case 0:A.value==null&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,tu(A)),C.items.push(i(y,A.value||""));break;case 5:A.value==null&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,tu(A)),C.items.push(l(y,A.value||""));break;case 4:A.value==null&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,tu(A)),C.items.push(u(y,A.value||""));break;case 6:A.value==null&&o(y,Ao.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,tu(A)),C.items.push(d(y,A.value||""));break;case 7:{const I=h(y);C.items.push(I.node),$=I.nextConsumeToken||null;break}}}while(_.currentType!==13&&_.currentType!==1);const T=_.currentType===1?_.lastOffset:y.currentOffset(),D=_.currentType===1?_.lastEndLoc:y.currentPosition();return a(C,T,D),C}function v(y,_,w,S){const C=y.context();let $=S.items.length===0;const T=r(1,_,w);T.cases=[],T.cases.push(S);do{const D=g(y);$||($=D.items.length===0),T.cases.push(D)}while(C.currentType!==13);return $&&o(y,Ao.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),a(T,y.currentOffset(),y.currentPosition()),T}function b(y){const _=y.context(),{offset:w,startLoc:S}=_,C=g(y);return _.currentType===13?C:v(y,w,S,C)}function x(y){const _=ide(y,Sa({},e)),w=_.context(),S=r(0,w.offset,w.startLoc);return t&&S.loc&&(S.loc.source=y),S.body=b(_),e.onCacheKey&&(S.cacheKey=e.onCacheKey(y)),w.currentType!==13&&o(_,Ao.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,y[w.offset]||""),a(S,_.currentOffset(),_.currentPosition()),S}return{parse:x}}function tu(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function pde(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:a=>(n.helpers.add(a),a)}}function ZF(e,t){for(let n=0;n<e.length;n++)FI(e[n],t)}function FI(e,t){switch(e.type){case 1:ZF(e.cases,t),t.helper("plural");break;case 2:ZF(e.items,t);break;case 6:{FI(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function mde(e,t={}){const n=pde(e);n.helper("normalize"),e.body&&FI(e.body,n);const o=n.context();e.helpers=Array.from(o.helpers)}function hde(e){const t=e.body;return t.type===2?QF(t):t.cases.forEach(n=>QF(n)),e}function QF(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const o=e.items[n];if(!(o.type===3||o.type===9)||o.value==null)break;t.push(o.value)}if(t.length===e.items.length){e.static=RI(t);for(let n=0;n<e.items.length;n++){const o=e.items[n];(o.type===3||o.type===9)&&delete o.value}}}}function wh(e){switch(e.t=e.type,e.type){case 0:{const t=e;wh(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let o=0;o<n.length;o++)wh(n[o]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let o=0;o<n.length;o++)wh(n[o]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;wh(t.key),t.k=t.key,delete t.key,t.modifier&&(wh(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function gde(e,t){const{filename:n,breakLineCode:o,needIndent:r}=t,a=t.location!==!1,i={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:r,indentLevel:0};a&&e.loc&&(i.source=e.loc.source);const l=()=>i;function u(b,x){i.code+=b}function d(b,x=!0){const y=x?o:"";u(r?y+" ".repeat(b):y)}function p(b=!0){const x=++i.indentLevel;b&&d(x)}function m(b=!0){const x=--i.indentLevel;b&&d(x)}function h(){d(i.indentLevel)}return{context:l,push:u,indent:p,deindent:m,newline:h,helper:b=>`_${b}`,needIndent:()=>i.needIndent}}function vde(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),fg(e,t.key),t.modifier?(e.push(", "),fg(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function yde(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const r=t.items.length;for(let a=0;a<r&&(fg(e,t.items[a]),a!==r-1);a++)e.push(", ");e.deindent(o()),e.push("])")}function bde(e,t){const{helper:n,needIndent:o}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(o());const r=t.cases.length;for(let a=0;a<r&&(fg(e,t.cases[a]),a!==r-1);a++)e.push(", ");e.deindent(o()),e.push("])")}}function _de(e,t){t.body?fg(e,t.body):e.push("null")}function fg(e,t){const{helper:n}=e;switch(t.type){case 0:_de(e,t);break;case 1:bde(e,t);break;case 2:yde(e,t);break;case 6:vde(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const xde=(e,t={})=>{const n=Vt(t.mode)?t.mode:"normal",o=Vt(t.filename)?t.filename:"message.intl";t.sourceMap;const r=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
|
|
4
4
|
`,a=t.needIndent?t.needIndent:n!=="arrow",i=e.helpers||[],l=gde(e,{filename:o,breakLineCode:r,needIndent:a});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(a),i.length>0&&(l.push(`const { ${RI(i.map(p=>`${p}: _${p}`),", ")} } = ctx`),l.newline()),l.push("return "),fg(l,e),l.deindent(a),l.push("}"),delete e.helpers;const{code:u,map:d}=l.context();return{ast:e,code:u,map:d?d.toJSON():void 0}};function wde(e,t={}){const n=Sa({},t),o=!!n.jit,r=!!n.minify,a=n.optimize==null?!0:n.optimize,l=fde(n).parse(e);return o?(a&&hde(l),r&&wh(l),{ast:l,code:""}):(mde(l,n),xde(l,n))}function Sde(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(II().__INTLIFY_PROD_DEVTOOLS__=!1)}function Iu(e){return wo(e)&&zI(e)===0&&(Us(e,"b")||Us(e,"body"))}const o9=["b","body"];function kde(e){return zf(e,o9)}const r9=["c","cases"];function Cde(e){return zf(e,r9,[])}const a9=["s","static"];function $de(e){return zf(e,a9)}const i9=["i","items"];function Tde(e){return zf(e,i9,[])}const s9=["t","type"];function zI(e){return zf(e,s9)}const l9=["v","value"];function __(e,t){const n=zf(e,l9);if(n!=null)return n;throw zy(t)}const u9=["m","modifier"];function Ede(e){return zf(e,u9)}const c9=["k","key"];function Dde(e){const t=zf(e,c9);if(t)return t;throw zy(6)}function zf(e,t,n){for(let o=0;o<t.length;o++){const r=t[o];if(Us(e,r)&&e[r]!=null)return e[r]}return n}const d9=[...o9,...r9,...a9,...i9,...c9,...u9,...l9,...s9];function zy(e){return new Error(`unhandled node type: ${e}`)}function pT(e){return n=>Ode(n,e)}function Ode(e,t){const n=kde(t);if(n==null)throw zy(0);if(zI(n)===1){const a=Cde(n);return e.plural(a.reduce((i,l)=>[...i,e6(e,l)],[]))}else return e6(e,n)}function e6(e,t){const n=$de(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=Tde(t).reduce((r,a)=>[...r,I3(e,a)],[]);return e.normalize(o)}}function I3(e,t){const n=zI(t);switch(n){case 3:return __(t,n);case 9:return __(t,n);case 4:{const o=t;if(Us(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Us(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw zy(n)}case 5:{const o=t;if(Us(o,"i")&&la(o.i))return e.interpolate(e.list(o.i));if(Us(o,"index")&&la(o.index))return e.interpolate(e.list(o.index));throw zy(n)}case 6:{const o=t,r=Ede(o),a=Dde(o);return e.linked(I3(e,a),r?I3(e,r):void 0,e.type)}case 7:return __(t,n);case 8:return __(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Ade=e=>e;let x_=Go();function Ide(e,t={}){let n=!1;const o=t.onError||Qce;return t.onError=r=>{n=!0,o(r)},{...wde(e,t),detectError:n}}function Pde(e,t){if(Vt(e)){_r(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||Ade)(e),r=x_[o];if(r)return r;const{ast:a,detectError:i}=Ide(e,{...t,location:!1,jit:!0}),l=pT(a);return i?l:x_[o]=l}else{const n=e.cacheKey;if(n){const o=x_[n];return o||(x_[n]=pT(e))}else return pT(e)}}let Vy=null;function Mde(e){Vy=e}function Rde(e,t,n){Vy&&Vy.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const Fde=zde("function:translate");function zde(e){return t=>Vy&&Vy.emit(e,t)}const Tc={INVALID_ARGUMENT:Zce,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Vde=24;function Ec(e){return uk(e,null,void 0)}function VI(e,t){return t.locale!=null?t6(t.locale):t6(e.locale)}let mT;function t6(e){if(Vt(e))return e;if(Tr(e)){if(e.resolvedOnce&&mT!=null)return mT;if(e.constructor.name==="Function"){const t=e();if(Yce(t))throw Ec(Tc.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return mT=t}else throw Ec(Tc.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Ec(Tc.NOT_SUPPORT_LOCALE_TYPE)}function Nde(e,t,n){return[...new Set([n,...Br(t)?t:wo(t)?Object.keys(t):Vt(t)?[t]:[n]])]}function P3(e,t,n){const o=Vt(n)?n:zw,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let a=r.__localeChainCache.get(o);if(!a){a=[];let i=[n];for(;Br(i);)i=n6(a,i,t);const l=Br(t)||!To(t)?t:t.default?t.default:null;i=Vt(l)?[l]:l,Br(i)&&n6(a,i,!1),r.__localeChainCache.set(o,a)}return a}function n6(e,t,n){let o=!0;for(let r=0;r<t.length&&_r(o);r++){const a=t[r];Vt(a)&&(o=Lde(e,t[r],n))}return o}function Lde(e,t,n){let o;const r=t.split("-");do{const a=r.join("-");o=Bde(e,a,n),r.splice(-1,1)}while(r.length&&o===!0);return o}function Bde(e,t,n){let o=!1;if(!e.includes(t)&&(o=!0,t)){o=t[t.length-1]!=="!";const r=t.replace(/!/g,"");e.push(r),(Br(n)||To(n))&&n[r]&&(o=n[r])}return o}const Vf=[];Vf[0]={w:[0],i:[3,0],"[":[4],o:[7]};Vf[1]={w:[1],".":[2],"[":[4],o:[7]};Vf[2]={w:[2],i:[3,0],0:[3,0]};Vf[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Vf[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Vf[5]={"'":[4,0],o:8,l:[5,0]};Vf[6]={'"':[4,0],o:8,l:[6,0]};const Ude=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function qde(e){return Ude.test(e)}function jde(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function Hde(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Wde(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:qde(t)?jde(t):"*"+t}function Gde(e){const t=[];let n=-1,o=0,r=0,a,i,l,u,d,p,m;const h=[];h[0]=()=>{i===void 0?i=l:i+=l},h[1]=()=>{i!==void 0&&(t.push(i),i=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,o=4,h[0]();else{if(r=0,i===void 0||(i=Wde(i),i===!1))return!1;h[1]()}};function g(){const v=e[n+1];if(o===5&&v==="'"||o===6&&v==='"')return n++,l="\\"+v,h[0](),!0}for(;o!==null;)if(n++,a=e[n],!(a==="\\"&&g())){if(u=Hde(a),m=Vf[o],d=m[u]||m.l||8,d===8||(o=d[0],d[1]!==void 0&&(p=h[d[1]],p&&(l=a,p()===!1))))return;if(o===7)return t}}const o6=new Map;function Kde(e,t){return wo(e)?e[t]:null}function Yde(e,t){if(!wo(e))return null;let n=o6.get(t);if(n||(n=Gde(t),n&&o6.set(t,n)),!n)return null;const o=n.length;let r=e,a=0;for(;a<o;){const i=n[a];if(d9.includes(i)&&Iu(r)||!wo(r)||!Us(r,i))return null;const l=r[i];if(l===void 0||Tr(r))return null;r=l,a++}return r}const Jde="11.4.4",ck=-1,zw="en-US",Vw="",r6=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Xde(){return{upper:(e,t)=>t==="text"&&Vt(e)?e.toUpperCase():t==="vnode"&&wo(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Vt(e)?e.toLowerCase():t==="vnode"&&wo(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Vt(e)?r6(e):t==="vnode"&&wo(e)&&"__v_isVNode"in e?r6(e.children):e}}let f9;function Zde(e){f9=e}let p9;function Qde(e){p9=e}let m9;function efe(e){m9=e}let h9=null;const tfe=e=>{h9=e},nfe=()=>h9;let g9=null;const a6=e=>{g9=e},ofe=()=>g9;let i6=0;function rfe(e={}){const t=Tr(e.onWarn)?e.onWarn:Nce,n=Vt(e.version)?e.version:Jde,o=Vt(e.locale)||Tr(e.locale)?e.locale:zw,r=Tr(o)?zw:o,a=Br(e.fallbackLocale)||To(e.fallbackLocale)||Vt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,i=To(e.messages)?e.messages:hT(r),l=To(e.datetimeFormats)?e.datetimeFormats:hT(r),u=To(e.numberFormats)?e.numberFormats:hT(r),d=Sa(Go(),e.modifiers,Xde()),p=e.pluralRules||Go(),m=Tr(e.missing)?e.missing:null,h=_r(e.missingWarn)||Fw(e.missingWarn)?e.missingWarn:!0,g=_r(e.fallbackWarn)||Fw(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,b=!!e.unresolving,x=Tr(e.postTranslation)?e.postTranslation:null,y=To(e.processor)?e.processor:null,_=_r(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter,S=Tr(e.messageCompiler)?e.messageCompiler:f9,C=Tr(e.messageResolver)?e.messageResolver:p9||Kde,$=Tr(e.localeFallbacker)?e.localeFallbacker:m9||Nde,T=wo(e.fallbackContext)?e.fallbackContext:void 0,D=e,A=wo(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,I=wo(D.__numberFormatters)?D.__numberFormatters:new Map,U=wo(D.__meta)?D.__meta:{};i6++;const j={version:n,cid:i6,locale:o,fallbackLocale:a,messages:i,modifiers:d,pluralRules:p,missing:m,missingWarn:h,fallbackWarn:g,fallbackFormat:v,unresolving:b,postTranslation:x,processor:y,warnHtmlMessage:_,escapeParameter:w,messageCompiler:S,messageResolver:C,localeFallbacker:$,fallbackContext:T,onWarn:t,__meta:U};return j.datetimeFormats=l,j.numberFormats=u,j.__datetimeFormatters=A,j.__numberFormatters=I,__INTLIFY_PROD_DEVTOOLS__&&Rde(j,n,U),j}const hT=e=>({[e]:Go()});function NI(e,t,n,o,r){const{missing:a,onWarn:i}=e;if(a!==null){const l=a(e,n,t,r);return Vt(l)?l:t}else return t}function l0(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function afe(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function ife(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o<t.length;o++)if(afe(e,t[o]))return!0;return!1}function s6(e,...t){const{datetimeFormats:n,unresolving:o,fallbackLocale:r,onWarn:a,localeFallbacker:i}=e,{__datetimeFormatters:l}=e;if(!Vt(t[0])&&!t9(t[0])&&!la(t[0]))return Vw;const[u,d,p,m]=M3(...t),h=_r(p.missingWarn)?p.missingWarn:e.missingWarn;_r(p.fallbackWarn)?p.fallbackWarn:e.fallbackWarn;const g=!!p.part,v=VI(e,p),b=i(e,r,v);if(!Vt(u)||u==="")return new Intl.DateTimeFormat(v.replace(/!/g,""),m).format(d);let x={},y,_=null;const w="datetime format";for(let $=0;$<b.length&&(y=b[$],x=n[y]||{},_=x[u],!To(_));$++)NI(e,u,y,h,w);if(!To(_)||!Vt(y))return o?ck:u;let S=`${y}__${u}`;lk(m)||(S=`${S}__${JSON.stringify(m)}`);let C=l.get(S);return C||(C=new Intl.DateTimeFormat(y,Sa({},_,m)),l.set(S,C)),g?C.formatToParts(d):C.format(d)}const v9=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function M3(...e){const[t,n,o,r]=e,a=Go();let i=Go(),l;if(Vt(t)){const u=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw Ec(Tc.INVALID_ISO_DATE_ARGUMENT);const d=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();l=new Date(d);try{l.toISOString()}catch{throw Ec(Tc.INVALID_ISO_DATE_ARGUMENT)}}else if(t9(t)){if(isNaN(t.getTime()))throw Ec(Tc.INVALID_DATE_ARGUMENT);l=t}else if(la(t))l=t;else throw Ec(Tc.INVALID_ARGUMENT);return Vt(n)?a.key=n:To(n)&&Object.keys(n).forEach(u=>{v9.includes(u)?i[u]=n[u]:a[u]=n[u]}),Vt(o)?a.locale=o:To(o)&&(i=o),To(r)&&(i=r),[a.key||"",l,a,i]}function l6(e,t,n){const o=e;for(const r in n){const a=`${t}__${r}`;o.__datetimeFormatters.has(a)&&o.__datetimeFormatters.delete(a)}}function u6(e,...t){const{numberFormats:n,unresolving:o,fallbackLocale:r,onWarn:a,localeFallbacker:i}=e,{__numberFormatters:l}=e;if(!la(t[0]))return Vw;const[u,d,p,m]=R3(...t),h=_r(p.missingWarn)?p.missingWarn:e.missingWarn;_r(p.fallbackWarn)?p.fallbackWarn:e.fallbackWarn;const g=!!p.part,v=VI(e,p),b=i(e,r,v);if(!Vt(u)||u==="")return new Intl.NumberFormat(v.replace(/!/g,""),m).format(d);let x={},y,_=null;const w="number format";for(let $=0;$<b.length&&(y=b[$],x=n[y]||{},_=x[u],!To(_));$++)NI(e,u,y,h,w);if(!To(_)||!Vt(y))return o?ck:u;let S=`${y}__${u}`;lk(m)||(S=`${S}__${JSON.stringify(m)}`);let C=l.get(S);return C||(C=new Intl.NumberFormat(y,Sa({},_,m)),l.set(S,C)),g?C.formatToParts(d):C.format(d)}const y9=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function R3(...e){const[t,n,o,r]=e,a=Go();let i=Go();if(!la(t))throw Ec(Tc.INVALID_ARGUMENT);const l=t;return Vt(n)?a.key=n:To(n)&&Object.keys(n).forEach(u=>{y9.includes(u)?i[u]=n[u]:a[u]=n[u]}),Vt(o)?a.locale=o:To(o)&&(i=o),To(r)&&(i=r),[a.key||"",l,a,i]}function c6(e,t,n){const o=e;for(const r in n){const a=`${t}__${r}`;o.__numberFormatters.has(a)&&o.__numberFormatters.delete(a)}}const sfe=e=>e,lfe=e=>"",ufe="text",cfe=e=>e.length===0?"":RI(e),dfe=Jce;function gT(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function ffe(e){const t=la(e.pluralIndex)?e.pluralIndex:-1;return la(e.named?.count)?e.named.count:la(e.named?.n)?e.named.n:t}function pfe(e={}){const t=e.locale,n=ffe(e),o=Vt(t)&&Tr(e.pluralRules?.[t])?e.pluralRules[t]:gT,r=o===gT?void 0:gT,a=y=>y[o(n,y.length,r)],i=e.list||[],l=y=>i[y],u=e.named||Go();la(e.pluralIndex)&&(u.count||=e.pluralIndex,u.n||=e.pluralIndex);const d=y=>u[y];function p(y,_){const w=Tr(e.messages)?e.messages(y,!!_):wo(e.messages)?e.messages[y]:!1;return w||(e.parent?e.parent.message(y):lfe)}const m=y=>e.modifiers?e.modifiers[y]:sfe,h=Tr(e.processor?.normalize)?e.processor.normalize:cfe,g=Tr(e.processor?.interpolate)?e.processor.interpolate:dfe,v=Vt(e.processor?.type)?e.processor.type:ufe,x={list:l,named:d,plural:a,linked:(y,..._)=>{const[w,S]=_;let C="text",$="";_.length===1?wo(w)?($=w.modifier||$,C=w.type||C):Vt(w)&&($=w||$):_.length===2&&(Vt(w)&&($=w||$),Vt(S)&&(C=S||C));const T=p(y,!0)(x),D=T===""||T===void 0?y:T,A=C==="vnode"&&Br(D)&&$?D[0]:D;return $?m($)(A,C):A},message:p,type:v,interpolate:g,normalize:h,values:Sa(Go(),i,u)};return x}const d6=()=>"",Vs=e=>Tr(e);function f6(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:r,messageCompiler:a,fallbackLocale:i,messages:l}=e,[u,d]=F3(...t),p=_r(d.missingWarn)?d.missingWarn:e.missingWarn,m=_r(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,h=_r(d.escapeParameter)?d.escapeParameter:e.escapeParameter,g=!!d.resolvedMessage,v=Vt(d.default)||_r(d.default)?_r(d.default)?a?u:()=>u:d.default:n?a?u:()=>u:null,b=n||v!=null&&(Vt(v)||Tr(v)),x=VI(e,d);h&&mfe(d);let[y,_,w]=g?[u,x,l[x]||Go()]:b9(e,u,x,i,m,p),S=y,C=u;if(!g&&!(Vt(S)||Iu(S)||Vs(S))&&b&&(S=v,C=S),!g&&(!(Vt(S)||Iu(S)||Vs(S))||!Vt(_)))return r?ck:u;let $=!1;const T=()=>{$=!0},D=Vs(S)?S:_9(e,u,_,S,C,T);if($)return S;const A=vfe(e,_,w,d),I=pfe(A),U=hfe(e,D,I);let j=o?o(U,u):U;if(h&&Vt(j)&&(j=Gce(j)),__INTLIFY_PROD_DEVTOOLS__){const Q={timestamp:Date.now(),key:Vt(u)?u:Vs(S)?S.key:"",locale:_||(Vs(S)?S.locale:""),format:Vt(S)?S:Vs(S)?S.source:"",message:j};Q.meta=Sa({},e.__meta,nfe()||{}),Fde(Q)}return j}function mfe(e){Br(e.list)?e.list=e.list.map(t=>Vt(t)?YF(t):t):wo(e.named)&&Object.keys(e.named).forEach(t=>{Vt(e.named[t])&&(e.named[t]=YF(e.named[t]))})}function b9(e,t,n,o,r,a){const{messages:i,onWarn:l,messageResolver:u,localeFallbacker:d}=e,p=d(e,o,n);let m=Go(),h,g=null;const v="translate";for(let b=0;b<p.length&&(h=p[b],m=i[h]||Go(),(g=u(m,t))===null&&(g=m[t]),!(Vt(g)||Iu(g)||Vs(g)));b++)if(!ife(h,p)){const x=NI(e,t,h,a,v);x!==t&&(g=x)}return[g,h,m]}function _9(e,t,n,o,r,a){const{messageCompiler:i,warnHtmlMessage:l}=e;if(Vs(o)){const d=o;return d.locale=d.locale||n,d.key=d.key||t,d}if(i==null){const d=(()=>o);return d.locale=n,d.key=t,d}const u=i(o,gfe(e,n,r,o,l,a));return u.locale=n,u.key=t,u.source=o,u}function hfe(e,t,n){return t(n)}function F3(...e){const[t,n,o]=e,r=Go();if(!Vt(t)&&!la(t)&&!Vs(t)&&!Iu(t))throw Ec(Tc.INVALID_ARGUMENT);const a=la(t)?String(t):(Vs(t),t);return la(n)?r.plural=n:Vt(n)?r.default=n:To(n)&&!lk(n)?r.named=n:Br(n)&&(r.list=n),la(o)?r.plural=o:Vt(o)?r.default=o:To(o)&&Sa(r,o),[a,r]}function gfe(e,t,n,o,r,a){return{locale:t,key:n,warnHtmlMessage:r,onError:i=>{throw a&&a(i),i},onCacheKey:i=>Lce(t,n,i)}}function vfe(e,t,n,o){const{modifiers:r,pluralRules:a,messageResolver:i,fallbackLocale:l,fallbackWarn:u,missingWarn:d,fallbackContext:p}=e,h={locale:t,modifiers:r,pluralRules:a,messages:(g,v)=>{let b=i(n,g);if(b==null&&(p||v)){const[x,,y]=b9(p||e,g,t,l,u,d);b=x??i(y,g)}if(Vt(b)||Iu(b)){let x=!1;const _=_9(e,g,t,b,g,()=>{x=!0});return x?d6:_}else return Vs(b)?b:d6}};return e.processor&&(h.processor=e.processor),o.list&&(h.list=o.list),o.named&&(h.named=o.named),la(o.plural)&&(h.pluralIndex=o.plural),h}Sde();const yfe="11.4.4";function bfe(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(II().__INTLIFY_PROD_DEVTOOLS__=!1)}const ms={UNEXPECTED_RETURN_TYPE:Vde,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Gs(e,...t){return uk(e,null,void 0)}const z3=Ff("__translateVNode"),V3=Ff("__datetimeParts"),N3=Ff("__numberParts"),_fe=Ff("__setPluralRules"),xfe=Ff("__injectWithOption"),Dh=Ff("__dispose");function Ny(e){if(!wo(e)||Iu(e))return e;for(const t in e)if(Us(e,t))if(!t.includes("."))wo(e[t])&&Ny(e[t]);else{const n=t.split("."),o=n.length-1;let r=e,a=!1;for(let i=0;i<o;i++){if(n[i]==="__proto__")throw new Error(`unsafe key: ${n[i]}`);if(n[i]in r||(r[n[i]]=Go()),!wo(r[n[i]])){a=!0;break}r=r[n[i]]}if(a||(Iu(r)?d9.includes(n[o])||delete e[t]:(r[n[o]]=e[t],delete e[t])),!Iu(r)){const i=r[n[o]];wo(i)&&Ny(i)}}return e}function x9(e,t){const{messages:n,__i18n:o,messageResolver:r,flatJson:a}=t,i=To(n)?n:Br(o)?Go():{[e]:Go()};if(Br(o)&&o.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:u,resource:d}=l;u?(i[u]=i[u]||Go(),Tx(d,i[u])):Tx(d,i)}else Vt(l)&&Tx(JSON.parse(l),i)}),r==null&&a)for(const l in i)Us(i,l)&&Ny(i[l]);return i}function w9(e){return e.type}function wfe(e,t,n){let o=wo(t.messages)?t.messages:Go();"__i18nGlobal"in n&&(o=x9(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const r=Object.keys(o);r.length&&r.forEach(a=>{e.mergeLocaleMessage(a,o[a])});{if(wo(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(wo(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function p6(e){return c(Ub,null,e,0)}function LI(){return ur()}const m6="__INTLIFY_META__",h6=()=>[],Sfe=()=>!1;let g6=0;function v6(e){return((t,n,o,r)=>e(n,o,LI()||void 0,r))}const kfe=()=>{const e=LI();let t=null;return e&&(t=w9(e)[m6])?{[m6]:t}:null};function L3(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,r=e.flatJson,a=Rw?re:mo;let i=_r(e.inheritLocale)?e.inheritLocale:!0;const l=a(t&&i?t.locale.value:Vt(e.locale)?e.locale:zw),u=a(t&&i?t.fallbackLocale.value:Vt(e.fallbackLocale)||Br(e.fallbackLocale)||To(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),d=a(x9(l.value,e)),p=a(To(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),m=a(To(e.numberFormats)?e.numberFormats:{[l.value]:{}});let h=t?t.missingWarn:_r(e.missingWarn)||Fw(e.missingWarn)?e.missingWarn:!0,g=t?t.fallbackWarn:_r(e.fallbackWarn)||Fw(e.fallbackWarn)?e.fallbackWarn:!0,v=t?t.fallbackRoot:_r(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,x=Tr(e.missing)?e.missing:null,y=Tr(e.missing)?v6(e.missing):null,_=Tr(e.postTranslation)?e.postTranslation:null,w=t?t.warnHtmlMessage:_r(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter;const C=t?t.modifiers:To(e.modifiers)?e.modifiers:{};let $=e.pluralRules||t&&t.pluralRules,T;T=(()=>{o&&a6(null);const Pe={version:yfe,locale:l.value,fallbackLocale:u.value,messages:d.value,modifiers:C,pluralRules:$,missing:y===null?void 0:y,missingWarn:h,fallbackWarn:g,fallbackFormat:b,unresolving:!0,postTranslation:_===null?void 0:_,warnHtmlMessage:w,escapeParameter:S,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Pe.datetimeFormats=p.value,Pe.numberFormats=m.value,Pe.__datetimeFormatters=To(T)?T.__datetimeFormatters:void 0,Pe.__numberFormatters=To(T)?T.__numberFormatters:void 0;const Ue=rfe(Pe);return o&&a6(Ue),Ue})(),l0(T,l.value,u.value);function A(){return[l.value,u.value,d.value,p.value,m.value]}const I=E({get:()=>l.value,set:Pe=>{T.locale=Pe,l.value=Pe}}),U=E({get:()=>u.value,set:Pe=>{T.fallbackLocale=Pe,u.value=Pe,l0(T,l.value,Pe)}}),j=E(()=>d.value),Q=E(()=>p.value),F=E(()=>m.value);function R(){return Tr(_)?_:null}function G(Pe){_=Pe,T.postTranslation=Pe}function Z(){return x}function Y(Pe){Pe!==null&&(y=v6(Pe)),x=Pe,T.missing=y}const he=(Pe,Ue,$t,Mt,Ae,Le)=>{A();let gt;try{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=t?ofe():void 0),gt=Pe(T)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(T.fallbackContext=void 0)}if($t!=="translate exists"&&la(gt)&>===ck||$t==="translate exists"&&!gt){const[ct,tt]=Ue();return t&&v?Mt(t):Ae(ct)}else{if(Le(gt))return gt;throw Gs(ms.UNEXPECTED_RETURN_TYPE)}};function ue(...Pe){return he(Ue=>Reflect.apply(f6,null,[Ue,...Pe]),()=>F3(...Pe),"translate",Ue=>Reflect.apply(Ue.t,Ue,[...Pe]),Ue=>Ue,Ue=>Vt(Ue))}function pe(...Pe){const[Ue,$t,Mt]=Pe;if(Mt&&!wo(Mt))throw Gs(ms.INVALID_ARGUMENT);return ue(Ue,$t,Sa({resolvedMessage:!0},Mt||{}))}function ce(...Pe){return he(Ue=>Reflect.apply(s6,null,[Ue,...Pe]),()=>M3(...Pe),"datetime format",Ue=>Reflect.apply(Ue.d,Ue,[...Pe]),()=>Vw,Ue=>Vt(Ue)||Br(Ue))}function ae(...Pe){return he(Ue=>Reflect.apply(u6,null,[Ue,...Pe]),()=>R3(...Pe),"number format",Ue=>Reflect.apply(Ue.n,Ue,[...Pe]),()=>Vw,Ue=>Vt(Ue)||Br(Ue))}function W(Pe){return Pe.map(Ue=>Vt(Ue)||la(Ue)||_r(Ue)?p6(String(Ue)):Ue)}const K={normalize:W,interpolate:Pe=>Pe,type:"vnode"};function X(...Pe){return he(Ue=>{let $t;const Mt=Ue;try{Mt.processor=K,$t=Reflect.apply(f6,null,[Mt,...Pe])}finally{Mt.processor=null}return $t},()=>F3(...Pe),"translate",Ue=>Ue[z3](...Pe),Ue=>[p6(Ue)],Ue=>Br(Ue))}function Ee(...Pe){return he(Ue=>Reflect.apply(u6,null,[Ue,...Pe]),()=>R3(...Pe),"number format",Ue=>Ue[N3](...Pe),h6,Ue=>Vt(Ue)||Br(Ue))}function _e(...Pe){return he(Ue=>Reflect.apply(s6,null,[Ue,...Pe]),()=>M3(...Pe),"datetime format",Ue=>Ue[V3](...Pe),h6,Ue=>Vt(Ue)||Br(Ue))}function ze(Pe){$=Pe,T.pluralRules=$}function st(Pe,Ue){return he(()=>{if(!Pe)return!1;const $t=Vt(Ue)?Ue:l.value,Mt=Vt(Ue)?[$t]:P3(T,u.value,$t);for(let Ae=0;Ae<Mt.length;Ae++){const Le=De(Mt[Ae]);let gt=T.messageResolver(Le,Pe);if(gt===null&&(gt=Le[Pe]),Iu(gt)||Vs(gt)||Vt(gt))return!0}return!1},()=>[Pe],"translate exists",$t=>Reflect.apply($t.te,$t,[Pe,Ue]),Sfe,$t=>_r($t))}function oe(Pe){let Ue=null;const $t=P3(T,u.value,l.value);for(let Mt=0;Mt<$t.length;Mt++){const Ae=d.value[$t[Mt]]||{},Le=T.messageResolver(Ae,Pe);if(Le!=null){Ue=Le;break}}return Ue}function be(Pe){const Ue=oe(Pe);return Ue??(t?t.tm(Pe)||{}:{})}function De(Pe){return d.value[Pe]||{}}function Se(Pe,Ue){if(r){const $t={[Pe]:Ue};for(const Mt in $t)Us($t,Mt)&&Ny($t[Mt]);Ue=$t[Pe]}d.value[Pe]=Ue,T.messages=d.value}function Te(Pe,Ue){d.value[Pe]=d.value[Pe]||{};const $t={[Pe]:Ue};if(r)for(const Mt in $t)Us($t,Mt)&&Ny($t[Mt]);Ue=$t[Pe],Tx(Ue,d.value[Pe]),T.messages=d.value}function Ne(Pe){return p.value[Pe]||{}}function te(Pe,Ue){p.value[Pe]=Ue,T.datetimeFormats=p.value,l6(T,Pe,Ue)}function le(Pe,Ue){p.value[Pe]=Sa(p.value[Pe]||{},Ue),T.datetimeFormats=p.value,l6(T,Pe,Ue)}function xe(Pe){return m.value[Pe]||{}}function me(Pe,Ue){m.value[Pe]=Ue,T.numberFormats=m.value,c6(T,Pe,Ue)}function Je(Pe,Ue){m.value[Pe]=Sa(m.value[Pe]||{},Ue),T.numberFormats=m.value,c6(T,Pe,Ue)}g6++,t&&Rw&&(Xe(t.locale,Pe=>{i&&(l.value=Pe,T.locale=Pe,l0(T,l.value,u.value))}),Xe(t.fallbackLocale,Pe=>{i&&(u.value=Pe,T.fallbackLocale=Pe,l0(T,l.value,u.value))}));const je={id:g6,locale:I,fallbackLocale:U,get inheritLocale(){return i},set inheritLocale(Pe){i=Pe,Pe&&t&&(l.value=t.locale.value,u.value=t.fallbackLocale.value,l0(T,l.value,u.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:j,get modifiers(){return C},get pluralRules(){return $||{}},get isGlobal(){return o},get missingWarn(){return h},set missingWarn(Pe){h=Pe,T.missingWarn=h},get fallbackWarn(){return g},set fallbackWarn(Pe){g=Pe,T.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(Pe){v=Pe},get fallbackFormat(){return b},set fallbackFormat(Pe){b=Pe,T.fallbackFormat=b},get warnHtmlMessage(){return w},set warnHtmlMessage(Pe){w=Pe,T.warnHtmlMessage=Pe},get escapeParameter(){return S},set escapeParameter(Pe){S=Pe,T.escapeParameter=Pe},t:ue,getLocaleMessage:De,setLocaleMessage:Se,mergeLocaleMessage:Te,getPostTranslationHandler:R,setPostTranslationHandler:G,getMissingHandler:Z,setMissingHandler:Y,[_fe]:ze};return je.datetimeFormats=Q,je.numberFormats=F,je.rt=pe,je.te=st,je.tm=be,je.d=ce,je.n=ae,je.getDateTimeFormat=Ne,je.setDateTimeFormat=te,je.mergeDateTimeFormat=le,je.getNumberFormat=xe,je.setNumberFormat=me,je.mergeNumberFormat=Je,je[xfe]=n,je[z3]=X,je[V3]=_e,je[N3]=Ee,je}const BI={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Cfe({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,r)=>[...o,...r.type===Me?r.children:[r]],[]):t.reduce((n,o)=>{const r=e[o];return r&&(n[o]=r()),n},Go())}function S9(){return Me}const $fe=q({name:"i18n-t",props:Sa({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>la(e)||!isNaN(e)}},BI),setup(e,t){const{slots:n,attrs:o}=t,r=e.i18n||un({useScope:e.scope,__useComponent:!0});return()=>{const a=()=>{const u=Object.keys(n).filter(m=>m[0]!=="_"),d=Go();e.locale&&(d.locale=e.locale),e.plural!==void 0&&(d.plural=Vt(e.plural)?+e.plural:e.plural);const p=Cfe(t,u);return r[z3](e.keypath,p,d)},i=Sa(Go(),o),l=Vt(e.tag)||wo(e.tag)?e.tag:S9();return wo(l)?xo(l,i,{default:a}):xo(l,i,a())}}}),y6=$fe;function Tfe(e){return Br(e)&&!Vt(e[0])}function k9(e,t,n,o){const{slots:r,attrs:a}=t;return()=>{const i=()=>{const d={part:!0};let p=Go();e.locale&&(d.locale=e.locale),Vt(e.format)?d.key=e.format:wo(e.format)&&(Vt(e.format.key)&&(d.key=e.format.key),p=Object.keys(e.format).reduce((g,v)=>n.includes(v)?Sa(Go(),g,{[v]:e.format[v]}):g,Go()));const m=o(e.value,d,p);let h=[d.key];return Br(m)?h=m.map((g,v)=>{const b=r[g.type],x=b?b({[g.type]:g.value,index:v,parts:m}):[g.value];return Tfe(x)&&(x[0].key=`${g.type}-${v}`),x}):Vt(m)&&(h=[m]),h},l=Sa(Go(),a),u=Vt(e.tag)||wo(e.tag)?e.tag:S9();return wo(u)?xo(u,l,{default:i}):xo(u,l,i())}}const Efe=q({name:"i18n-n",props:Sa({value:{type:Number,required:!0},format:{type:[String,Object]}},BI),setup(e,t){const n=e.i18n||un({useScope:e.scope,__useComponent:!0});return k9(e,t,y9,(...o)=>n[N3](...o))}}),b6=Efe;function Dfe(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function Ofe(e){const t=i=>{const{instance:l,value:u}=i;if(!l||!l.$)throw Gs(ms.UNEXPECTED_ERROR);const d=Dfe(e,l.$),p=_6(u);return[Reflect.apply(d.t,d,[...x6(p)]),d]};return{created:(i,l)=>{const[u,d]=t(l);Rw&&(i.__i18nWatcher=Xe(d.locale,()=>{l.instance&&l.instance.$forceUpdate()})),i.__composer=d,i.textContent=u},unmounted:i=>{Rw&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:l})=>{if(i.__composer){const u=i.__composer,d=_6(l);i.textContent=Reflect.apply(u.t,u,[...x6(d)])}},getSSRProps:i=>{const[l]=t(i);return{textContent:l}}}}function _6(e){if(Vt(e))return{path:e};if(To(e)){if(!("path"in e))throw Gs(ms.REQUIRED_VALUE,"path");return e}else throw Gs(ms.INVALID_VALUE)}function x6(e){const{path:t,locale:n,args:o,choice:r,plural:a}=e,i={},l=o||{};return Vt(n)&&(i.locale=n),la(r)&&(i.plural=r),la(a)&&(i.plural=a),[t,l,i]}function Afe(e,t,...n){const o=To(n[0])?n[0]:{};(!_r(o.globalInstall)||o.globalInstall)&&([y6.name,"I18nT"].forEach(a=>e.component(a,y6)),[b6.name,"I18nN"].forEach(a=>e.component(a,b6)),[k6.name,"I18nD"].forEach(a=>e.component(a,k6))),e.directive("t",Ofe(t))}const Ife=Ff("global-vue-i18n");function Pfe(e={}){const t=_r(e.globalInjection)?e.globalInjection:!0,n=new Map,[o,r]=Mfe(e),a=Ff("");function i(p){return n.get(p)||null}function l(p,m){n.set(p,m)}function u(p){n.delete(p)}const d={get mode(){return"composition"},async install(p,...m){if(p.__VUE_I18N_SYMBOL__=a,p.provide(p.__VUE_I18N_SYMBOL__,d),To(m[0])){const v=m[0];d.__composerExtend=v.__composerExtend,d.__vueI18nExtend=v.__vueI18nExtend}let h=null;t&&(h=Bfe(p,d.global)),Afe(p,d,...m);const g=p.unmount;p.unmount=()=>{h&&h(),d.dispose(),g()}},get global(){return r},dispose(){o.stop()},__instances:n,__getInstance:i,__setInstance:l,__deleteInstance:u};return d}function un(e={}){const t=LI();if(t==null)throw Gs(ms.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Gs(ms.NOT_INSTALLED);const n=Rfe(t),o=zfe(n),r=w9(t),a=Ffe(e,r);if(a==="global")return wfe(o,e,r),o;if(a==="parent"){let u=w6(n,t,e.__useComponent);return u==null&&(u=o),u}if(a==="isolated"){if(n.mode!=="composition")throw Gs(ms.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const u=n,d=Sa({},e),p=w6(n,t);d.__root=p||o;const m=L3(d);return u.__composerExtend&&(m[Dh]=u.__composerExtend(m)),Im()&&Pm(()=>{const g=m[Dh];g&&(g(),delete m[Dh])}),m}const i=n;let l=i.__getInstance(t);if(l==null){const u=Sa({},e);"__i18n"in r&&(u.__i18n=r.__i18n),o&&(u.__root=o),l=L3(u),i.__composerExtend&&(l[Dh]=i.__composerExtend(l)),Nfe(i,t,l),i.__setInstance(t,l)}return l}function Mfe(e,t){const n=tv(),o=n.run(()=>L3(e));if(o==null)throw Gs(ms.UNEXPECTED_ERROR);return[n,o]}function Rfe(e){const t=Fn(e.isCE?Ife:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Gs(e.isCE?ms.NOT_INSTALLED_WITH_PROVIDE:ms.UNEXPECTED_ERROR);return t}function Ffe(e,t){return lk(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function zfe(e){return e.mode==="composition"?e.global:e.global.__composer}function w6(e,t,n=!1){let o=null;const r=t.root;let a=Vfe(t,n);for(;a!=null;){const i=e;if(e.mode==="composition"&&(o=i.__getInstance(a)),o!=null||r===a)break;a=a.parent}return o}function Vfe(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Nfe(e,t,n){Pt(()=>{},t),Do(()=>{const o=n;e.__deleteInstance(t);const r=o[Dh];r&&(r(),delete o[Dh])},t)}const Lfe=["locale","fallbackLocale","availableLocales"],S6=["t","rt","d","n","tm","te"];function Bfe(e,t){const n=Object.create(null);return Lfe.forEach(r=>{const a=Object.getOwnPropertyDescriptor(t,r);if(!a)throw Gs(ms.UNEXPECTED_ERROR);const i=jn(a.value)?{get(){return a.value.value},set(l){a.value.value=l}}:{get(){return a.get&&a.get()}};Object.defineProperty(n,r,i)}),e.config.globalProperties.$i18n=n,S6.forEach(r=>{const a=Object.getOwnPropertyDescriptor(t,r);if(!a||!a.value)throw Gs(ms.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,a)}),()=>{delete e.config.globalProperties.$i18n,S6.forEach(r=>{delete e.config.globalProperties[`$${r}`]})}}const Ufe=q({name:"i18n-d",props:Sa({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},BI),setup(e,t){const n=e.i18n||un({useScope:e.scope,__useComponent:!0});return k9(e,t,v9,(...o)=>n[V3](...o))}}),k6=Ufe;bfe();Zde(Pde);Qde(Yde);efe(P3);if(__INTLIFY_PROD_DEVTOOLS__){const e=II();e.__INTLIFY__=!0,Mde(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const qfe=e=>typeof e=="function",J=function(e,t){if(typeof e=="function")return function(){return e(arguments)?t.apply(this,arguments):n=>t(n,...arguments)};switch(e){case 0:case 1:throw new RangeError(`Invalid arity ${e}`);case 2:return function(n,o){return arguments.length>=2?t(n,o):function(r){return t(r,n)}};case 3:return function(n,o,r){return arguments.length>=3?t(n,o,r):function(a){return t(a,n,o)}};case 4:return function(n,o,r,a){return arguments.length>=4?t(n,o,r,a):function(i){return t(i,n,o,r)}};case 5:return function(n,o,r,a,i){return arguments.length>=5?t(n,o,r,a,i):function(l){return t(l,n,o,r,a)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);const n=arguments;return function(o){return t(o,...n)}}}},ln=e=>e,dk=e=>()=>e,Nw=dk(!0),pg=dk(!1),C9=dk(void 0),Ly=C9,UI=e=>{throw new Error("Called `absurd` function which should be uncallable")};function ye(e,t,n,o,r,a,i,l,u){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return o(n(t(e)));case 5:return r(o(n(t(e))));case 6:return a(r(o(n(t(e)))));case 7:return i(a(r(o(n(t(e))))));case 8:return l(i(a(r(o(n(t(e)))))));case 9:return u(l(i(a(r(o(n(t(e))))))));default:{let d=arguments[0];for(let p=1;p<arguments.length;p++)d=arguments[p](d);return d}}}const fk=e=>(t,n)=>t===n||e(t,n),jfe=J(2,(e,t)=>fk((n,o)=>e(t(n),t(o)))),Hfe=e=>fk((t,n)=>{if(t.length!==n.length)return!1;for(let o=0;o<t.length;o++)if(!e(t[o],n[o]))return!1;return!0}),Wfe=e=>J(3,(t,n,o)=>e(t,r=>({...r,[n]:o(r)}))),Gfe=e=>J(2,(t,n)=>e(t,o=>({[n]:o}))),Kfe=(e,t)=>J(3,(n,o,r)=>t(n,a=>e(r(a),i=>({...a,[o]:i})))),C6="effect/GlobalValue";let u0;const En=(e,t)=>(u0||(globalThis[C6]??=new Map,u0=globalThis[C6]),u0.has(e)||u0.set(e,t()),u0.get(e)),Na=e=>typeof e=="string",Kc=e=>typeof e=="number",jb=e=>typeof e=="boolean",pk=e=>typeof e=="bigint",B3=e=>typeof e=="symbol",ov=qfe,Yfe=e=>e===void 0,Jfe=e=>e!==void 0,vT=e=>e!==null,Xfe=e=>!1,qI=e=>typeof e=="object"&&e!==null,ju=e=>qI(e)||ov(e),Yt=J(2,(e,t)=>ju(e)&&t in e),mk=J(2,(e,t)=>Yt(e,"_tag")&&e._tag===t),ih=e=>e==null,Zfe=e=>e!=null,Qfe=e=>e instanceof Date,pd=e=>typeof e=="string"||Yt(e,Symbol.iterator),By=e=>qI(e)&&!Array.isArray(e),$9=e=>Yt(e,"then")&&ov(e.then),hk=e=>`BUG: ${e} - please report an issue at https://github.com/Effect-TS/effect/issues`;let T9=class E9{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new E9(this.self)}};const epe=335903614,tpe=4150755663,npe=1481765933,ope=1284865837,rpe=9007199254740992,ape=134217728;class ipe{_state;constructor(t,n,o,r){return ih(n)&&ih(t)?(n=Math.random()*4294967295>>>0,t=0):ih(n)&&(n=t,t=0),ih(r)&&ih(o)?(r=this._state?this._state[3]:tpe,o=this._state?this._state[2]:epe):ih(r)&&(r=o,o=0),this._state=new Int32Array([0,0,o>>>0,((r||0)|1)>>>0]),this._next(),$6(this._state,this._state[0],this._state[1],t>>>0,n>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=t[3]|1}integer(t){return Math.round(this.number()*Number.MAX_SAFE_INTEGER)%t}number(){const t=(this._next()&67108863)*1,n=(this._next()&134217727)*1;return(t*ape+n)/rpe}_next(){const t=this._state[0]>>>0,n=this._state[1]>>>0;spe(this._state,t,n,npe,ope),$6(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let o=t>>>18,r=(n>>>18|t<<14)>>>0;o=(o^t)>>>0,r=(r^n)>>>0;const a=(r>>>27|o<<5)>>>0,i=t>>>27,l=(-i>>>0&31)>>>0;return(a>>>i|a<<l)>>>0}}function spe(e,t,n,o,r){let a=(n>>>16)*(r&65535)>>>0,i=(n&65535)*(r>>>16)>>>0,l=(n&65535)*(r&65535)>>>0,u=(n>>>16)*(r>>>16)+((i>>>16)+(a>>>16))>>>0;i=i<<16>>>0,l=l+i>>>0,l>>>0<i>>>0&&(u=u+1>>>0),a=a<<16>>>0,l=l+a>>>0,l>>>0<a>>>0&&(u=u+1>>>0),u=u+Math.imul(n,o)>>>0,u=u+Math.imul(t,r)>>>0,e[0]=u,e[1]=l}function $6(e,t,n,o,r){let a=t+o>>>0;const i=n+r>>>0;i>>>0<n>>>0&&(a=a+1|0),e[0]=a,e[1]=i}const U3=Symbol.for("effect/Utils/YieldWrap");class Hb{#e;constructor(t){this.#e=t}[U3](){return this.#e}}function lpe(e){if(typeof e=="object"&&e!==null&&U3 in e)return e[U3]();throw new Error(hk("yieldWrapGet"))}const Ms=En("effect/Utils/isStructuralRegion",()=>({enabled:!1,tester:void 0})),D9={effect_internal_function:e=>e()},upe={effect_internal_function:e=>e()},cpe=D9.effect_internal_function(()=>new Error().stack)?.includes("effect_internal_function")===!0,ia=cpe?D9.effect_internal_function:upe.effect_internal_function,dpe=function*(){}.constructor,fpe=e=>ju(e)&&e.constructor===dpe,yT=En(Symbol.for("effect/Hash/randomHashCache"),()=>new WeakMap),Sn=Symbol.for("effect/Hash"),Lt=e=>{if(Ms.enabled===!0)return 0;switch(typeof e){case"number":return HI(e);case"bigint":return Dr(e.toString(10));case"boolean":return Dr(String(e));case"symbol":return Dr(String(e));case"string":return Dr(e);case"undefined":return Dr("undefined");case"function":case"object":return e===null?Dr("null"):e instanceof Date?Number.isNaN(e.getTime())?Dr("Invalid Date"):Lt(e.toISOString()):e instanceof URL?Lt(e.href):ppe(e)?e[Sn]():jI(e);default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},jI=e=>(yT.has(e)||yT.set(e,HI(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),yT.get(e)),Nn=e=>t=>t*53^e,gk=e=>e&3221225471|e>>>1&1073741824,ppe=e=>Yt(e,Sn),HI=e=>{if(e!==e||e===1/0)return 0;let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return gk(t)},Dr=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return gk(t)},mpe=(e,t)=>{let n=12289;for(let o=0;o<t.length;o++)n^=ye(Dr(t[o]),Nn(Lt(e[t[o]])));return gk(n)},O9=e=>mpe(e,Object.keys(e)),Wb=e=>{let t=6151;for(let n=0;n<e.length;n++)t=ye(t,Nn(Lt(e[n])));return gk(t)},cr=function(){if(arguments.length===1){const n=arguments[0];return function(o){return Object.defineProperty(n,Sn,{value(){return o},enumerable:!1}),o}}const e=arguments[0],t=arguments[1];return Object.defineProperty(e,Sn,{value(){return t},enumerable:!1}),t},kn=Symbol.for("effect/Equal");function on(){return arguments.length===1?e=>Lw(e,arguments[0]):Lw(arguments[0],arguments[1])}function Lw(e,t){if(e===t)return!0;const n=typeof e;if(n!==typeof t)return!1;if(n==="object"||n==="function"){if(e!==null&&t!==null){if(Uy(e)&&Uy(t))return Lt(e)===Lt(t)&&e[kn](t)?!0:Ms.enabled&&Ms.tester?Ms.tester(e,t):!1;if(e instanceof Date&&t instanceof Date){const o=e.getTime(),r=t.getTime();return o===r||Number.isNaN(o)&&Number.isNaN(r)}else if(e instanceof URL&&t instanceof URL)return e.href===t.href}if(Ms.enabled){if(e===null||t===null)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((o,r)=>Lw(o,t[r]));if(Object.getPrototypeOf(e)===Object.prototype&&Object.getPrototypeOf(t)===Object.prototype){const o=Object.keys(e),r=Object.keys(t);if(o.length===r.length){for(const a of o)if(!(a in t&&Lw(e[a],t[a])))return Ms.tester?Ms.tester(e,t):!1;return!0}}return Ms.tester?Ms.tester(e,t):!1}}return Ms.enabled&&Ms.tester?Ms.tester(e,t):!1}const Uy=e=>Yt(e,kn),WI=()=>on,sr=Symbol.for("nodejs.util.inspect.custom"),Sr=e=>{try{if(Yt(e,"toJSON")&&ov(e.toJSON)&&e.toJSON.length===0)return e.toJSON();if(Array.isArray(e))return e.map(Sr)}catch{return{}}return ype(e)},bT="[Circular]";function hpe(e){try{return e.toISOString()}catch{return"Invalid Date"}}function gpe(e){try{const t=e.toString();return typeof t=="string"?t:String(t)}catch{return"[toString threw]"}}function GI(e){return Na(e)?JSON.stringify(e):String(e)}function Mm(e,t){const n=new WeakSet,o=(i,l)=>{const u=i?.constructor;return u&&u!==Object.prototype.constructor&&u.name?`${u.name}(${l})`:l},r=i=>{try{return Reflect.ownKeys(i)}catch{return["[ownKeys threw]"]}};function a(i,l=0){if(Array.isArray(i))return n.has(i)?bT:(n.add(i),`[${i.map(u=>a(u,l)).join(",")}]`);if(Qfe(i))return hpe(i);if(Yt(i,"toString")&&ov(i.toString)&&i.toString!==Object.prototype.toString&&i.toString!==Array.prototype.toString){const u=gpe(i);return i instanceof Error&&i.cause?`${u} (cause: ${a(i.cause,l)})`:u}if(Na(i))return JSON.stringify(i);if(Kc(i)||i==null||jb(i)||B3(i))return String(i);if(pk(i))return String(i)+"n";if(i instanceof Set||i instanceof Map)return n.has(i)?bT:(n.add(i),`${i.constructor.name}(${a(Array.from(i),l)})`);if(ju(i)){if(n.has(i))return bT;n.add(i);const u=r(i);{const d=`{${u.map(p=>`${GI(p)}:${a(i[p],l)}`).join(",")}}`;return o(i,d)}}return String(i)}return a(e,0)}const Xr=e=>JSON.stringify(e,null,2),mg=(e,t=2)=>{if(typeof e=="string")return e;try{return typeof e=="object"?A9(e,t):String(e)}catch{return String(e)}},A9=(e,t)=>{let n=[];const o=JSON.stringify(e,(r,a)=>typeof a=="object"&&a!==null?n.includes(a)?void 0:n.push(a)&&(Kp.fiberRefs!==void 0&&I9(a)?a[KI](Kp.fiberRefs):a):a,t);return n=void 0,o},KI=Symbol.for("effect/Inspectable/Redactable"),I9=e=>typeof e=="object"&&e!==null&&KI in e,Kp=En("effect/Inspectable/redactableState",()=>({fiberRefs:void 0})),vpe=(e,t)=>{const n=Kp.fiberRefs;Kp.fiberRefs=e;try{return t()}finally{Kp.fiberRefs=n}},ype=e=>I9(e)&&Kp.fiberRefs!==void 0?e[KI](Kp.fiberRefs):e,Jt=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let o=0,r=t.length;o<r;o++)n=t[o](n);return n}}},fy="Async",vk="Commit",ja="Failure",Ex="OnFailure",Bw="OnSuccess",Uw="OnSuccessAndFailure",Ha="Success",P9="Sync",bpe="Tag",Rm="UpdateRuntimeFlags",qw="While",py="Iterator",M9="WithRuntime",Dx="Yield",YI="RevertFlags";let _pe="3.21.2";const JI=()=>_pe,xpe=Symbol.for("effect/Effect"),wpe=Symbol.for("effect/Stream"),Spe=Symbol.for("effect/Sink"),kpe=Symbol.for("effect/Channel"),hg={_R:e=>e,_E:e=>e,_A:e=>e,_V:JI()},Cpe={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e},$pe={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},Gb={[xpe]:hg,[wpe]:hg,[Spe]:Cpe,[kpe]:$pe,[kn](e){return this===e},[Sn](){return cr(this,jI(this))},[Symbol.iterator](){return new T9(new Hb(this))},pipe(){return Jt(this,arguments)}},yk={[Sn](){return cr(this,O9(this))},[kn](e){const t=Object.keys(this),n=Object.keys(e);if(t.length!==n.length)return!1;for(const o of t)if(!(o in e&&on(this[o],e[o])))return!1;return!0}},rv={...Gb,_op:vk},Tpe={...rv,...yk},Epe=(function(){function e(){}return e.prototype=rv,e})(),R9=Symbol.for("effect/Option"),F9={...Gb,[R9]:{_A:e=>e},[sr](){return this.toJSON()},toString(){return Xr(this.toJSON())}},Dpe=Object.assign(Object.create(F9),{_tag:"Some",_op:"Some",[kn](e){return XI(e)&&z9(e)&&on(this.value,e.value)},[Sn](){return cr(this,Nn(Lt(this._tag))(Lt(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:Sr(this.value)}}}),Ope=Lt("None"),Ape=Object.assign(Object.create(F9),{_tag:"None",_op:"None",[kn](e){return XI(e)&&bk(e)},[Sn](){return Ope},toJSON(){return{_id:"Option",_tag:this._tag}}}),XI=e=>Yt(e,R9),bk=e=>e._tag==="None",z9=e=>e._tag==="Some",_k=Object.create(Ape),lm=e=>{const t=Object.create(Dpe);return t.value=e,t},V9=Symbol.for("effect/Either"),N9={...Gb,[V9]:{_R:e=>e},[sr](){return this.toJSON()},toString(){return Xr(this.toJSON())}},Ipe=Object.assign(Object.create(N9),{_tag:"Right",_op:"Right",[kn](e){return ZI(e)&&L9(e)&&on(this.right,e.right)},[Sn](){return Nn(Lt(this._tag))(Lt(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:Sr(this.right)}}}),Ppe=Object.assign(Object.create(N9),{_tag:"Left",_op:"Left",[kn](e){return ZI(e)&&QI(e)&&on(this.left,e.left)},[Sn](){return Nn(Lt(this._tag))(Lt(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:Sr(this.left)}}}),ZI=e=>Yt(e,V9),QI=e=>e._tag==="Left",L9=e=>e._tag==="Right",Mpe=e=>{const t=Object.create(Ppe);return t.left=e,t},Rpe=e=>{const t=Object.create(Ipe);return t.right=e,t},Fpe=e=>QI(e)?_k:lm(e.right),Gt=Rpe,jt=Mpe,zpe=ZI,po=QI,yi=L9,Vpe=J(2,(e,{onLeft:t,onRight:n})=>po(e)?jt(t(e.left)):Gt(n(e.right))),B9=J(2,(e,t)=>po(e)?jt(t(e.left)):Gt(e.right)),U9=J(2,(e,t)=>yi(e)?Gt(t(e.right)):jt(e.left)),ls=J(2,(e,{onLeft:t,onRight:n})=>po(e)?t(e.left):n(e.right)),q9=ls({onLeft:ln,onRight:ln}),eP=J(2,(e,t)=>{if(yi(e))return e.right;throw t(e.left)}),j9=eP(()=>new Error("getOrThrow called on a Left")),H9=e=>e.length>0,W9=e=>(t,n)=>t===n?0:e(t,n),Npe=W9((e,t)=>e<t?-1:1),G9=J(2,(e,t)=>W9((n,o)=>e(t(n),t(o)))),Lpe=e=>J(2,(t,n)=>e(t,n)===1),ot=()=>_k,ft=lm,Hu=XI,Jo=bk,gn=z9,zo=J(2,(e,{onNone:t,onSome:n})=>Jo(e)?t():n(e.value)),K9=Fpe,ar=J(2,(e,t)=>Jo(e)?t():e.value),Fc=J(2,(e,t)=>Jo(e)?t():e),Bpe=J(2,(e,t)=>Jo(e)?ft(t()):e),av=e=>e==null?ot():ft(e),Ur=ar(C9),Y9=e=>(...t)=>{try{return ft(e(...t))}catch{return ot()}},Upe=J(2,(e,t)=>{if(gn(e))return e.value;throw t()}),qpe=Upe(()=>new Error("getOrThrow called on a None")),Lh=J(2,(e,t)=>Jo(e)?ot():ft(t(e.value))),Fm=J(2,(e,t)=>Jo(e)?ot():t(e.value)),jpe=J(2,(e,t)=>Jo(e)?ot():av(t(e.value))),Hpe=Fm,Sh=J(2,(e,t)=>Hpe(e,n=>t(n)?lm(n):_k)),Wpe=e=>fk((t,n)=>Jo(t)?Jo(n):Jo(n)?!1:e(t.value,n.value)),Gpe=e=>J(2,(t,n)=>Jo(t)?!1:e(t.value,n)),Kpe=WI(),Ype=Gpe(Kpe),Jpe=J(2,(e,t)=>Jo(e)?!1:t(e.value)),jw=e=>(t,n)=>Jo(t)?n:Jo(n)?t:ft(e(t.value,n.value)),Xpe=(...e)=>e,Zpe=e=>eme(e).length===0,Qpe=J(2,(e,t)=>Object.prototype.hasOwnProperty.call(e,t)),eme=e=>Object.keys(e),xk=e=>new Array(e),tme=J(2,(e,t)=>{const n=Math.max(1,Math.floor(e)),o=new Array(n);for(let r=0;r<n;r++)o[r]=t(r);return o}),eo=e=>Array.isArray(e)?e:Array.from(e),nme=e=>Array.isArray(e)?e:[e],ome=J(2,(e,{onEmpty:t,onNonEmpty:n})=>Mr(e)?n(Ni(e),um(e)):t()),Hw=J(2,(e,t)=>[t,...e]),rme=J(2,(e,t)=>[...e,t]),J9=J(2,(e,t)=>eo(e).concat(eo(t))),ame=Array.isArray,ime=e=>e.length===0,sme=ime,my=H9,Mr=H9,X9=(e,t)=>e<0||e>=t.length,lme=(e,t)=>Math.floor(Math.min(Math.max(0,e),t.length)),ume=J(2,(e,t)=>{const n=Math.floor(t);return X9(n,e)?ot():ft(e[n])}),Z9=J(2,(e,t)=>{const n=Math.floor(t);if(X9(n,e))throw new Error(`Index ${n} out of bounds`);return e[n]}),hy=ume(0),Ni=Z9(0),cme=e=>Mr(e)?ft(Q9(e)):ot(),Q9=e=>e[e.length-1],um=e=>e.slice(1),dme=(e,t)=>{let n=0;for(const o of e){if(!t(o,n))break;n++}return n},fme=J(2,(e,t)=>e7(e,dme(e,t))),pme=J(2,(e,t)=>{const n=eo(e);return n.slice(lme(t,n),n.length)}),T6=e=>Array.from(e).reverse(),qy=J(2,(e,t)=>{const n=Array.from(e);return n.sort(t),n}),E6=J(2,(e,t)=>mme(e,t,Xpe)),mme=J(3,(e,t,n)=>{const o=eo(e),r=eo(t);if(Mr(o)&&Mr(r)){const a=[n(Ni(o),Ni(r))],i=Math.min(o.length,r.length);for(let l=1;l<i;l++)a[l]=n(o[l],r[l]);return a}return[]}),hme=WI(),e7=J(2,(e,t)=>{const n=Array.from(e),o=Math.floor(t);return Mr(n)?o>=1?gme(n,o):[[],n]:[n,[]]}),gme=J(2,(e,t)=>{const n=Math.max(1,Math.floor(t));return n>=e.length?[N0(e),[]]:[Hw(e.slice(1,n),Ni(e)),e.slice(n)]}),N0=e=>e.slice(),vme=J(3,(e,t,n)=>{const o=eo(e),r=eo(t);return Mr(o)?Mr(r)?n7(n)(J9(o,r)):o:r}),Bh=J(2,(e,t)=>vme(e,t,hme)),bf=()=>[],cl=e=>[e],Yp=J(2,(e,t)=>e.map(t)),t7=J(2,(e,t)=>{if(sme(e))return[];const n=[];for(let o=0;o<e.length;o++){const r=t(e[o],o);for(let a=0;a<r.length;a++)n.push(r[a])}return n}),tP=t7(ln),Kb=J(2,(e,t)=>{const n=eo(e),o=[];for(let r=0;r<n.length;r++){const a=t(n[r],r);gn(a)&&o.push(a.value)}return o}),yme=J(2,(e,t)=>{const n=[],o=[],r=eo(e);for(let a=0;a<r.length;a++){const i=t(r[a],a);po(i)?n.push(i.left):o.push(i.right)}return[n,o]}),bme=Kb(ln),_me=J(2,(e,t)=>{const n=eo(e),o=[];for(let r=0;r<n.length;r++)t(n[r],r)&&o.push(n[r]);return o}),wk=J(3,(e,t,n)=>eo(e).reduce((o,r,a)=>n(o,r,a),t)),xme=J(3,(e,t,n)=>eo(e).reduceRight((o,r,a)=>n(o,r,a),t)),D6=(e,t)=>{const n=[];let o=e,r;for(;gn(r=t(o));){const[a,i]=r.value;n.push(a),o=i}return n},nP=Hfe,n7=J(2,(e,t)=>{const n=eo(e);if(Mr(n)){const o=[Ni(n)],r=um(n);for(const a of r)o.every(i=>!t(a,i))&&o.push(a);return o}return[]}),wme=e=>n7(e,WI()),iv=J(2,(e,t)=>eo(e).join(t)),o7=(e,t)=>{switch(t._tag){case"StringKeyword":case"TemplateLiteral":return Object.keys(e);case"SymbolKeyword":return Object.getOwnPropertySymbols(e);case"Refinement":return o7(e,t.from)}},r7=e=>{let t=!1,n;return()=>(t||(n=e(),t=!0),n)},oP=e=>Array.isArray(e),Sme=e=>!Array.isArray(e),O6=e=>`[${GI(e)}]`,a7=e=>oP(e)?e.map(O6).join(""):O6(e),Wl=(e,t,n,o)=>{let r=e;return n&&Mr(n)&&(r+=`
|
|
@@ -115,7 +115,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
115
115
|
点击后求值,返回一个 \`map\`。其每个顶层键都会被写入到最近祖先的表单状态中:
|
|
116
116
|
对象值与当前值深合并(数组整体替换),其他类型直接替换。
|
|
117
117
|
返回 \`{}\` 表示不进行任何写入。
|
|
118
|
-
`}),onSuccess:ne(qa.annotations({title:"写入后",description:"写入完成后执行的操作"}))}).annotations({title:"StateWriteAction",description:"点击后将 CEL 表达式的结果写回最近祖先的表单状态"})}const Knt=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Xte,metadata:Wnt,schema:Gnt,type:Jte},Symbol.toStringTag,{value:"Module"})),Zte="com.shwfed.actions.item.markdown",Qte="2026-05-21",Ynt={name:"内联 Markdown",icon:"fluent:markdown-20-regular"};function Jnt(e){return rt({id:ro.annotations({description:"Markdown 项唯一标识"}),groupId:ne(ro.annotations({description:"所属按钮组标识"})),type:Ze(Zte),compatibilityDate:Ze(Qte),name:St.annotations({title:"内部名称",description:"仅用于编辑器内识别该 Markdown 项,不会展示给最终用户"}),content:lt.annotations({title:"内容",description:"内联 Markdown 内容,与按钮并排展示,支持本地化"})}).annotations({title:"MarkdownItem",description:"按钮组内的内联 Markdown 节点"})}const Xnt=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Qte,metadata:Ynt,schema:Jnt,type:Zte},Symbol.toStringTag,{value:"Module"}));function X1(e){const{hostName:t,dirSegment:n,schemaModules:o,configModules:r,runtimeModules:a,validateModule:i,deriveEntryExtras:l}=e,u=new RegExp(`/${n}/([^/]+)/([^/]+)/schema\\.(?:ts|js)$`),d=v=>{const b=u.exec(v);if(!b)throw new Error(`[${t}] unrecognized schema path: ${v}`);return{date:b[1],type:b[2]}},p=(v,b,x,y)=>{const _=`/${n}/${b}/${x}/${y}`;for(const[w,S]of Object.entries(v))if(w.endsWith(_))return S;throw new Error(`[${t}] missing ${y} for ${x}@${b}`)};let m=null;const h=()=>{if(m)return m;const v=[];for(const[x,y]of Object.entries(o)){const{date:_,type:w}=d(x);if(y.type!==w)throw new Error(`[${t}] type "${y.type}" does not match folder "${w}"`);if(y.compatibilityDate!==_)throw new Error(`[${t}] compatibilityDate "${y.compatibilityDate}" does not match folder "${_}"`);i?.(y,w,_),v.push({type:y.type,compatibilityDate:y.compatibilityDate,config:p(r,_,w,"config.vue"),runtime:p(a,_,w,"runtime.vue"),module:y})}const b=l?l(v):()=>({});return m=v.map(x=>({type:x.type,compatibilityDate:x.compatibilityDate,config:x.config,runtime:x.runtime,module:x.module,...b(x)})),m};return{get ENTRIES(){return h()},find:(v,b)=>h().find(x=>x.type===v&&x.compatibilityDate===b)}}const Znt=Object.assign({"../buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.ts":wnt,"../buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.ts":Cnt,"../buttons/2026-04-18/com.shwfed.actions.button.prototype/schema.ts":Ent,"../buttons/2026-04-21/com.shwfed.actions.button.navigation/schema.ts":Int,"../buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.ts":Nnt,"../buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.ts":Unt,"../buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.ts":Hnt,"../buttons/2026-05-24/com.shwfed.actions.button.state.write/schema.ts":Knt}),Qnt=Object.assign({"../buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue":()=>aa(()=>import("./config-
|
|
118
|
+
`}),onSuccess:ne(qa.annotations({title:"写入后",description:"写入完成后执行的操作"}))}).annotations({title:"StateWriteAction",description:"点击后将 CEL 表达式的结果写回最近祖先的表单状态"})}const Knt=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Xte,metadata:Wnt,schema:Gnt,type:Jte},Symbol.toStringTag,{value:"Module"})),Zte="com.shwfed.actions.item.markdown",Qte="2026-05-21",Ynt={name:"内联 Markdown",icon:"fluent:markdown-20-regular"};function Jnt(e){return rt({id:ro.annotations({description:"Markdown 项唯一标识"}),groupId:ne(ro.annotations({description:"所属按钮组标识"})),type:Ze(Zte),compatibilityDate:Ze(Qte),name:St.annotations({title:"内部名称",description:"仅用于编辑器内识别该 Markdown 项,不会展示给最终用户"}),content:lt.annotations({title:"内容",description:"内联 Markdown 内容,与按钮并排展示,支持本地化"})}).annotations({title:"MarkdownItem",description:"按钮组内的内联 Markdown 节点"})}const Xnt=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Qte,metadata:Ynt,schema:Jnt,type:Zte},Symbol.toStringTag,{value:"Module"}));function X1(e){const{hostName:t,dirSegment:n,schemaModules:o,configModules:r,runtimeModules:a,validateModule:i,deriveEntryExtras:l}=e,u=new RegExp(`/${n}/([^/]+)/([^/]+)/schema\\.(?:ts|js)$`),d=v=>{const b=u.exec(v);if(!b)throw new Error(`[${t}] unrecognized schema path: ${v}`);return{date:b[1],type:b[2]}},p=(v,b,x,y)=>{const _=`/${n}/${b}/${x}/${y}`;for(const[w,S]of Object.entries(v))if(w.endsWith(_))return S;throw new Error(`[${t}] missing ${y} for ${x}@${b}`)};let m=null;const h=()=>{if(m)return m;const v=[];for(const[x,y]of Object.entries(o)){const{date:_,type:w}=d(x);if(y.type!==w)throw new Error(`[${t}] type "${y.type}" does not match folder "${w}"`);if(y.compatibilityDate!==_)throw new Error(`[${t}] compatibilityDate "${y.compatibilityDate}" does not match folder "${_}"`);i?.(y,w,_),v.push({type:y.type,compatibilityDate:y.compatibilityDate,config:p(r,_,w,"config.vue"),runtime:p(a,_,w,"runtime.vue"),module:y})}const b=l?l(v):()=>({});return m=v.map(x=>({type:x.type,compatibilityDate:x.compatibilityDate,config:x.config,runtime:x.runtime,module:x.module,...b(x)})),m};return{get ENTRIES(){return h()},find:(v,b)=>h().find(x=>x.type===v&&x.compatibilityDate===b)}}const Znt=Object.assign({"../buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.ts":wnt,"../buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.ts":Cnt,"../buttons/2026-04-18/com.shwfed.actions.button.prototype/schema.ts":Ent,"../buttons/2026-04-21/com.shwfed.actions.button.navigation/schema.ts":Int,"../buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.ts":Nnt,"../buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.ts":Unt,"../buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.ts":Hnt,"../buttons/2026-05-24/com.shwfed.actions.button.state.write/schema.ts":Knt}),Qnt=Object.assign({"../buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue":()=>aa(()=>import("./config-CIxAb4Oe.js"),[],import.meta.url),"../buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue":()=>aa(()=>import("./config-BdEFFxuI.js"),[],import.meta.url),"../buttons/2026-04-18/com.shwfed.actions.button.prototype/config.vue":()=>aa(()=>import("./config-MKO1-4J8.js"),[],import.meta.url),"../buttons/2026-04-21/com.shwfed.actions.button.navigation/config.vue":()=>aa(()=>import("./config--_6I2ueu.js"),[],import.meta.url),"../buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue":()=>aa(()=>import("./config-BkTFAoSA.js"),[],import.meta.url),"../buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.vue":()=>aa(()=>import("./config-D-6Tgeq0.js"),[],import.meta.url),"../buttons/2026-05-21/com.shwfed.actions.button.http.download/config.vue":()=>aa(()=>import("./config-Bo9NgVie.js"),[],import.meta.url),"../buttons/2026-05-24/com.shwfed.actions.button.state.write/config.vue":()=>aa(()=>import("./config-__RnmfhP.js"),[],import.meta.url)}),eot=Object.assign({"../buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue":()=>aa(()=>import("./runtime-Cqi_SqJY.js"),__vite__mapDeps([0,1]),import.meta.url),"../buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue":()=>aa(()=>import("./runtime-BsM6WFl4.js"),__vite__mapDeps([2,1]),import.meta.url),"../buttons/2026-04-18/com.shwfed.actions.button.prototype/runtime.vue":()=>aa(()=>import("./runtime-Be9JgLOm.js"),__vite__mapDeps([3,1]),import.meta.url),"../buttons/2026-04-21/com.shwfed.actions.button.navigation/runtime.vue":()=>aa(()=>import("./runtime-BKO8_nF6.js"),__vite__mapDeps([4,1]),import.meta.url),"../buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue":()=>aa(()=>import("./runtime-H9vie18v.js"),__vite__mapDeps([5,1]),import.meta.url),"../buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/runtime.vue":()=>aa(()=>import("./runtime-w4O6Z5Ly.js"),__vite__mapDeps([6,1]),import.meta.url),"../buttons/2026-05-21/com.shwfed.actions.button.http.download/runtime.vue":()=>aa(()=>import("./runtime-C-k7G8_4.js"),__vite__mapDeps([7,1]),import.meta.url),"../buttons/2026-05-24/com.shwfed.actions.button.state.write/runtime.vue":()=>aa(()=>import("./runtime-Cec8NzXu.js"),__vite__mapDeps([8,1]),import.meta.url)}),tot=Object.fromEntries(Object.entries(Qnt).map(([e,t])=>[e,nv(t)])),not=Object.fromEntries(Object.entries(eot).map(([e,t])=>[e,nv(t)])),oot=X1({hostName:"shwfed-actions",dirSegment:"buttons",schemaModules:Znt,configModules:tot,runtimeModules:not,deriveEntryExtras:e=>{const t=new Map;for(const n of e){const o=t.get(n.type);(!o||n.compatibilityDate>o)&&t.set(n.type,n.compatibilityDate)}return n=>{const o=n.module.metadata.deprecated;return o?{deprecated:!0,deprecationNote:o}:n.compatibilityDate<t.get(n.type)?{deprecated:!0,deprecationNote:`已被更新版本 ${t.get(n.type)} 取代。`}:{deprecated:!1}}}}),HR=oot.ENTRIES.map(e=>({type:e.type,compatibilityDate:e.compatibilityDate,metadata:e.module.metadata,schema:e.module.schema,config:e.config,runtime:e.runtime,deprecated:e.deprecated,...e.deprecationNote!==void 0?{deprecationNote:e.deprecationNote}:{}}));function rot(e){return HR.map(t=>t.schema(e).annotations({identifier:`${t.type}@${t.compatibilityDate}`}))}function Zd(e,t){return HR.find(n=>n.type===e&&n.compatibilityDate===t)}const aot=Object.assign({"../items/2026-05-21/com.shwfed.actions.item.markdown/schema.ts":Xnt}),iot=Object.assign({"../items/2026-05-21/com.shwfed.actions.item.markdown/config.vue":()=>aa(()=>import("./config-BH2Cgm6Z.js"),[],import.meta.url)}),sot=Object.assign({"../items/2026-05-21/com.shwfed.actions.item.markdown/runtime.vue":()=>aa(()=>import("./runtime-BrUg4LS5.js"),[],import.meta.url)}),lot=Object.fromEntries(Object.entries(iot).map(([e,t])=>[e,nv(t)])),uot=Object.fromEntries(Object.entries(sot).map(([e,t])=>[e,nv(t)])),cot=X1({hostName:"shwfed-actions",dirSegment:"items",schemaModules:aot,configModules:lot,runtimeModules:uot}),WR=cot.ENTRIES.map(e=>({type:e.type,compatibilityDate:e.compatibilityDate,metadata:e.module.metadata,schema:e.module.schema,config:e.config,runtime:e.runtime}));function dot(e){return WR.map(t=>t.schema(e).annotations({identifier:`${t.type}@${t.compatibilityDate}`}))}function Op(e,t){return WR.find(n=>n.type===e&&n.compatibilityDate===t)}const fot=/\{\{(.*?)\}\}/gs;function LEt(e,t){return e.replace(fot,(n,o)=>{const r=o.trim();if(r.length===0)return"{{ }}";try{return pot(bt(t(r)))}catch{return`{{${o}}}`}})}function pot(e){return e==null?"":typeof e=="object"?JSON.stringify(e):String(e)}const mot=new Set(["success","error","warning","info"]);function BEt(e,t,n={}){const{messageExpression:o,resultExpression:r,channel:a,triggers:i}=n,l=Ut(t(e),u=>u.json());return Ut(l,u=>{const d={json:u},p=r===void 0?Qo("success"):_n(t(r,d),m=>mot.has(m)?m:"success");return Ut(p,m=>{const h=o===void 0?Gn:Ut(t(o,d),g=>Vn(()=>Si[m](g)));return YM(h,J1(a,i?.[m]))})})}const ene="shwfed.component.action",HE=Ze("default","primary","destructive","ghost","link").annotations({description:"按钮变体"}),hot=Ze("default","sm","xs").annotations({description:"按钮大小"});function Z1(e){const t=Dt({configure:e,resultType:"bool"}),n=rot(e);if(n.length===0)throw new Error("[shwfed-actions] no buttons registered under buttons/<date>/<type>/");const o=(n.length===1?n[0]:Jr(...n)).annotations({description:"按钮动作,由 type 字段区分类型"}),r=rt({id:ro.annotations({description:"Action 唯一标识"}),groupId:ro.annotations({description:"所属按钮组标识"}),title:lt.annotations({title:"名称",description:"按钮上的文字"}),tooltip:ne(lt.annotations({title:"提示",description:"当用户将鼠标移动至该按钮上,将展示的提示内容"})),icon:ne(St.annotations({title:"图标",description:"按钮上的文字左侧展示的图标"})),hidden:ne(t.annotations({title:"隐藏条件",description:"返回 `true` 时,按钮将不可见"})),disabled:ne(t.annotations({title:"禁用条件",description:"返回 `true` 时,按钮将依旧可见但被禁用"})),variant:ne(HE.annotations({title:"变体"})),hideTitle:ne(Ir.annotations({title:"仅显示图标",description:ua`
|
|
119
119
|
隐藏按钮文字内容,仅显示其图标。常见于有一定关联隐喻的按钮,如
|
|
120
120
|
|
|
121
121
|
- 异步下载与下载历史:下载历史仅展示历史图标
|
|
@@ -157,7 +157,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
157
157
|
`))p.startsWith("event:")?u=p.slice(6).trim():p.startsWith("data:")&&d.push(p.slice(5).replace(/^ /,""));d.length!==0&&(yield{event:u,data:d.join(`
|
|
158
158
|
`)})}}}function xre(e,t,n){return{model:Bat,messages:e,max_tokens:n.maxTokens??qat,...t!==void 0?{system:t}:{},...n.tools!==void 0?{tools:n.tools}:{},...n.toolChoice!==void 0?{tool_choice:n.toolChoice}:{}}}function wre(e,t){return{method:"POST",headers:{"content-type":"application/json","anthropic-version":Uat,"anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify(e),...t?{signal:t}:{}}}async function Sre(e,t,n,o){const r=await fetch(bre,wre(xre(e,t,n),o));if(!r.ok)throw new Error(`Anthropic ${r.status}: ${await _re(r)||r.statusText}`);return await r.json()}async function kre(e,t,n,o,r){const a={...xre(e,t,n),stream:!0},i=await fetch(bre,wre(a,o));if(!i.ok)throw new Error(`Anthropic ${i.status}: ${await _re(i)||i.statusText}`);const l=new Map;let u;for await(const p of Hat(i)){if(!p.event||!p.data)continue;let m;try{m=JSON.parse(p.data)}catch{continue}const h=m;if(h.type==="content_block_start"&&typeof h.index=="number"&&h.content_block){const g=h.content_block;l.set(h.index,{type:g.type==="tool_use"?"tool_use":"text",text:"",toolId:g.id,toolName:g.name,inputJson:""})}else if(h.type==="content_block_delta"&&typeof h.index=="number"&&h.delta){const g=l.get(h.index);if(!g)continue;h.delta.type==="text_delta"&&h.delta.text?(g.text+=h.delta.text,r()):h.delta.type==="input_json_delta"&&h.delta.partial_json&&(g.inputJson+=h.delta.partial_json,r())}else if(h.type==="message_delta"&&h.delta?.stop_reason)u=h.delta.stop_reason;else if(h.type==="message_stop")break}return{content:[...l.entries()].sort(([p],[m])=>p-m).map(([,p])=>{if(p.type==="tool_use"){let m={};if(p.inputJson)try{m=JSON.parse(p.inputJson)}catch{m={}}return{type:"tool_use",id:p.toolId??"",name:p.toolName??"",input:m}}return{type:"text",text:p.text}}),stop_reason:u}}const XL="retry_call_0";function Cre(e){return[{role:"user",content:e}]}function Wat(e,t,n){e.push({role:"assistant",content:[{type:"tool_use",id:XL,name:n,input:t.previousOutput}]}),e.push({role:"user",content:[{type:"tool_result",tool_use_id:XL,content:t.feedback}]})}async function Gat(e){const t=Cre(e.prompt),n=e.maxTokens!==void 0?{maxTokens:e.maxTokens}:{};return(e.onProgress?await kre(t,e.system,n,e.signal,e.onProgress):await Sre(t,e.system,n,e.signal)).content.filter(r=>r.type==="text").map(r=>r.text).join("")}async function Kat(e){const t=e.objectName??"structured_output",n=SPe(e.schema),o=e.tools??[],r=new Map(o.map(p=>[p.name,p])),a=[...o.map(p=>({name:p.name,description:p.description,input_schema:p.inputJsonSchema})),{name:t,description:"Return the structured output as the tool input.",input_schema:n}],i=o.length>0?{type:"any"}:{type:"tool",name:t},l=Cre(e.prompt);e.retry&&Wat(l,e.retry,t);const u={tools:a,toolChoice:i,...e.maxTokens!==void 0?{maxTokens:e.maxTokens}:{}},d=p=>{try{return iJ(e.schema)(p)}catch(m){throw new jat(p,m)}};for(;;){const p=e.onProgress?await kre(l,e.system,u,e.signal,e.onProgress):await Sre(l,e.system,u,e.signal),m=p.content.filter(v=>v.type==="tool_use"),h=m.find(v=>v.name===t);if(h)return d(h.input);if(m.length===0){if(p.stop_reason==="max_tokens")throw new Error("模型在产出结构化结果前用尽了 token 预算(stop_reason=max_tokens)。请提高 maxTokens,或换用非推理模型。");const v=p.content.filter(x=>x.type==="text").map(x=>x.text).join(""),b=p.stop_reason?`(stop_reason=${p.stop_reason})`:"";throw new Error(`模型未返回结构化输出${b}${v?`: ${v.slice(0,200)}`:""}`)}l.push({role:"assistant",content:m});const g=[];for(const v of m){const b=r.get(v.name);if(!b){g.push({type:"tool_result",tool_use_id:v.id,content:`Unknown tool: ${v.name}`});continue}try{const x=await b.execute(v.input??{});g.push({type:"tool_result",tool_use_id:v.id,content:typeof x=="string"?x:JSON.stringify(x)})}catch(x){g.push({type:"tool_result",tool_use_id:v.id,content:x instanceof Error?x.message:String(x)})}}l.push({role:"user",content:g})}}const ZL={available:E(()=>!0),generateText:Gat,generateObject:Kat},Yat=rt({message:St}).annotations({identifier:"LocaleSingleTranslation"}),Jat={ja:"Japanese",en:"English",ko:"Korean"};function Xat(e,t){const n=t??"a UI label";return["You are a UI string translator for an enterprise admin console.",`Translate the Chinese source into ${Jat[e]} for ${n}.`,"Output must be terse, idiomatic, and stylistically appropriate for the surface.","Preserve placeholders (e.g. {name}, %s), punctuation density, and casing conventions of the target language.","Never translate brand names, product names, or technical identifiers."].join(" ")}function Zat(e={}){const t=re(new Set);function n(a){return t.value.has(a)}function o(a,i){if(!ZL.available.value||!a)return!1;const l=a.find(d=>d.locale==="zh");if(!l||!l.message.trim())return!1;const u=a.find(d=>d.locale===i);return!(!u||u.message.trim().length>0)}async function r(a,i){const l=a.find(d=>d.locale==="zh");if(!l||!l.message.trim())throw new Error("需要先填写中文文本作为翻译来源");const u=new Set(t.value);u.add(i),t.value=u;try{const d=await ZL.generateObject({prompt:l.message,system:Xat(i,e.hint),schema:Yat,objectName:"translation"});return a.map(p=>p.locale!==i||p.message.trim().length>0?p:{locale:p.locale,message:d.message})}finally{const d=new Set(t.value);d.delete(i),t.value=d}}return{isTranslating:n,canTranslate:o,translate:r}}const Fr=q({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Dn(e,t);return(a,i)=>(k(),M(s(SBe),Oe({"data-slot":"dropdown-menu"},s(r)),{default:f(l=>[se(a.$slots,"default",qt(Wt(l)))]),_:3},16))}}),zr=q({inheritAttrs:!1,__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=At(n,"class"),a=Dn(r,o);return(i,l)=>(k(),M(s(DBe),null,{default:f(()=>[c(s(CBe),Oe({"data-slot":"dropdown-menu-content"},{...i.$attrs,...s(a)},{class:s(et)("bg-white text-zinc-700 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-32 origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-zinc-200 p-1 shadow-md",n.class)}),{default:f(()=>[se(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),Vo=q({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},inset:{type:Boolean},variant:{default:"default"}},emits:["select"],setup(e,{emit:t}){const n=e,o=At(n,"inset","variant","class"),a=Dn(o,t);return(i,l)=>(k(),M(s(TBe),Oe({"data-slot":"dropdown-menu-item","data-inset":e.inset?"":void 0,"data-variant":e.variant},s(a),{class:s(et)("focus:bg-[color-mix(in_srgb,var(--primary)_10%,white)] hover:bg-[color-mix(in_srgb,var(--primary)_10%,white)] focus:text-(--primary) hover:text-(--primary) data-[variant=destructive]:text-red-600 data-[variant=destructive]:focus:bg-red-200 data-[variant=destructive]:focus:text-red-600 data-[variant=destructive]:*:[svg]:text-red-600! [&_svg:not([class*='text-'])]:text-zinc-300 relative flex cursor-pointer items-center gap-2 rounded-sm p-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n.class)}),{default:f(()=>[se(i.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),Vr=q({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=yn(e);return(o,r)=>(k(),M(s(ABe),Oe({"data-slot":"dropdown-menu-trigger"},s(n)),{default:f(()=>[se(o.$slots,"default")]),_:3},16))}}),Qat={class:"flex w-full items-center justify-between gap-3"},eit=["aria-label"],tit={key:1,"data-slot":"locale-icon",class:"flex items-center gap-2 text-zinc-500"},nit={class:"flex items-center gap-2"},oit=["disabled","aria-label","onClick"],rit=["disabled","aria-label","onClick"],ait=["aria-label"],iit={key:1,"data-slot":"locale-icon",class:"-ml-[0.45rem] flex size-8 items-center justify-center text-zinc-500"},sit=["disabled","aria-label","onClick"],lit=["disabled","aria-label","onClick"],Ye=q({name:"UiLocaleEditor",inheritAttrs:!1,__name:"Locale",props:{modelValue:{},class:{type:[Boolean,null,String,Object,Array]},multiline:{type:Boolean},markdown:{type:Boolean},translateHint:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=["zh","ja","en","ko"],o=e,a=ao(o,"modelValue",t,{passive:!0,defaultValue:d()}),i=E(()=>[...a.value??d()].sort((T,D)=>T.locale==="zh"?-1:D.locale==="zh"?1:0)),l=E(()=>i.value.length<n.length),u={zh:"中文",ja:"日本語",en:"English",ko:"한국어"};function d(){return[{locale:"zh",message:""}]}function p(T){return`circle-flags:lang-${T}`}function m(T){return u[T]}function h(T){const D=i.value[T]?.locale;return n.filter(A=>A!==D&&!i.value.some(I=>I.locale===A))}function g(T,D){a.value=i.value.map((A,I)=>I!==T?A:{locale:A.locale,message:String(D)})}function v(T,D){const A=i.value[T];!A||A.locale==="zh"&&D!=="zh"||(a.value=i.value.map((I,U)=>U!==T?I:{locale:D,message:I.message}))}function b(T){const D=i.value[T];!D||D.locale==="zh"||(a.value=i.value.filter((A,I)=>I!==T))}function x(){const T=n.find(A=>!i.value.some(I=>I.locale===A));if(!T)return;const D=[...i.value];D.push({locale:T,message:""}),a.value=D}function y(T,D){g(T,D)}const _=Zat({hint:o.translateHint});function w(T){return T!=="zh"}function S(T){return w(T)?_.canTranslate(a.value,T):!1}function C(T){return w(T)?_.isTranslating(T):!1}async function $(T){if(!w(T))return;const D=a.value;if(D)try{const A=await _.translate(D,T);a.value=A}catch(A){const I=A instanceof Error?A.message:String(A);Si.error("翻译失败",{description:I})}}return(T,D)=>(k(),L("div",Oe(T.$attrs,{"data-slot":"locale",class:s(et)("flex flex-col gap-2",o.class)}),[(k(!0),L(Me,null,Ke(i.value,(A,I)=>(k(),M(s(Ge),{key:A.locale,"data-slot":"locale-row","data-locale":A.locale},{default:f(()=>[o.multiline?(k(),M(s(pt),{key:0,align:"block-start",class:"border-b border-zinc-200"},{default:f(()=>[H("div",Qat,[A.locale!=="zh"&&h(I).length>0?(k(),M(s(Fr),{key:0},{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"sm","as-child":""},{default:f(()=>[H("button",{type:"button","data-slot":"locale-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700","aria-label":`选择语言:${m(A.locale)}`},[c(s(fe),{icon:p(A.locale)},null,8,["icon"]),H("span",null,O(m(A.locale)),1)],8,eit)]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[(k(!0),L(Me,null,Ke(h(I),U=>(k(),M(s(Vo),{key:U,"data-slot":"locale-option","data-locale-option":U,onSelect:j=>v(I,U)},{default:f(()=>[c(s(fe),{icon:p(U)},null,8,["icon"]),H("span",null,O(m(U)),1)]),_:2},1032,["data-locale-option","onSelect"]))),128))]),_:2},1024)]),_:2},1024)):(k(),L("span",tit,[c(s(fe),{icon:p(A.locale)},null,8,["icon"]),H("span",null,O(m(A.locale)),1)])),H("div",nit,[o.markdown?(k(),M(s(fe),{key:0,"data-slot":"locale-markdown-indicator",icon:"fluent:markdown-20-regular",class:"text-purple-600","aria-label":"支持 Markdown"})):ke("",!0),S(A.locale)||C(A.locale)?(k(),M(s(Ct),{key:1,size:"icon-xs","as-child":""},{default:f(()=>[H("button",{type:"button","data-slot":"locale-translate",disabled:C(A.locale)||!S(A.locale),"aria-label":`AI 翻译:${m(A.locale)}`,onClick:U=>$(A.locale)},[c(s(fe),{icon:C(A.locale)?"fluent:arrow-sync-20-regular":"fluent:magic-wand-20-regular",class:He(C(A.locale)?"animate-spin":"")},null,8,["icon","class"])],8,oit)]),_:2},1024)):ke("",!0),c(s(Ct),{variant:"destructive",size:"icon-xs","as-child":""},{default:f(()=>[H("button",{type:"button","data-slot":"locale-delete",disabled:A.locale==="zh","aria-label":`删除语言:${m(A.locale)}`,onClick:U=>b(I)},[c(s(fe),{icon:"fluent:delete-20-regular"})],8,rit)]),_:2},1024)])])]),_:2},1024)):(k(),M(s(pt),{key:1},{default:f(()=>[A.locale!=="zh"&&h(I).length>0?(k(),M(s(Fr),{key:0},{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"icon-sm","as-child":""},{default:f(()=>[H("button",{type:"button","data-slot":"locale-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5","aria-label":`选择语言:${m(A.locale)}`},[c(s(fe),{icon:p(A.locale)},null,8,["icon"])],8,ait)]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[(k(!0),L(Me,null,Ke(h(I),U=>(k(),M(s(Vo),{key:U,"data-slot":"locale-option","data-locale-option":U,onSelect:j=>v(I,U)},{default:f(()=>[c(s(fe),{icon:p(U)},null,8,["icon"]),H("span",null,O(m(U)),1)]),_:2},1032,["data-locale-option","onSelect"]))),128))]),_:2},1024)]),_:2},1024)):(k(),L("span",iit,[c(s(fe),{icon:p(A.locale)},null,8,["icon"])]))]),_:2},1024)),o.multiline?(k(),M(s(BR),{key:3,"data-slot":"locale-textarea",class:"min-h-32","model-value":A.message,placeholder:m(A.locale),"onUpdate:modelValue":U=>y(I,U)},null,8,["model-value","placeholder","onUpdate:modelValue"])):(k(),M(s(mt),{key:2,"data-slot":"locale-input","model-value":A.message,placeholder:m(A.locale),"onUpdate:modelValue":U=>y(I,U)},null,8,["model-value","placeholder","onUpdate:modelValue"])),o.multiline?ke("",!0):(k(),M(s(pt),{key:4,align:"inline-end"},{default:f(()=>[o.markdown?(k(),M(s(fe),{key:0,"data-slot":"locale-markdown-indicator",icon:"fluent:markdown-20-regular",class:"text-purple-600","aria-label":"支持 Markdown"})):ke("",!0),S(A.locale)||C(A.locale)?(k(),M(s(Ct),{key:1,size:"icon-xs","as-child":""},{default:f(()=>[H("button",{type:"button","data-slot":"locale-translate",disabled:C(A.locale)||!S(A.locale),"aria-label":`AI 翻译:${m(A.locale)}`,onClick:U=>$(A.locale)},[c(s(fe),{icon:C(A.locale)?"fluent:arrow-sync-20-regular":"fluent:magic-wand-20-regular",class:He(C(A.locale)?"animate-spin":"")},null,8,["icon","class"])],8,sit)]),_:2},1024)):ke("",!0),c(s(Ct),{variant:"destructive",size:"icon-xs","as-child":""},{default:f(()=>[H("button",{type:"button","data-slot":"locale-delete",disabled:A.locale==="zh","aria-label":`删除语言:${m(A.locale)}`,onClick:U=>b(I)},[c(s(fe),{icon:"fluent:delete-20-regular"})],8,lit)]),_:2},1024)]),_:2},1024))]),_:2},1032,["data-locale"]))),128)),c(s(Rn),{type:"button","data-slot":"locale-add",class:"justify-center",disabled:!l.value,onClick:x},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),D[0]||(D[0]=H("span",null,"增加",-1))]),_:1},8,["disabled"])],16))}}),pA=Symbol("shwfed.sidebar-takeover"),Lo=q({name:"UiSwitch",__name:"Switch",props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},id:{},value:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]},size:{default:"default"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=At(n,"class","size"),a=Dn(r,o),i=E(()=>n.size==="sm"?"h-3.5 w-6":"h-[1.15rem] w-8"),l=E(()=>n.size==="sm"?"size-3":"size-4");return(u,d)=>(k(),M(s(S9e),Oe({"data-slot":"switch"},s(a),{class:s(et)("peer data-[state=checked]:bg-(--primary) data-[state=unchecked]:bg-zinc-200 focus-visible:border-(--primary) inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none disabled:cursor-not-allowed disabled:opacity-50",i.value,n.class)}),{default:f(p=>[c(s(C9e),{"data-slot":"switch-thumb",class:He(s(et)("bg-zinc-50 pointer-events-none block rounded-full transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0",l.value))},{default:f(()=>[se(u.$slots,"thumb",qt(Wt(p)))]),_:2},1032,["class"])]),_:3},16,["class"]))}}),uit="https://icones.js.org/collection/fluent?variant=Regular+20",qc=q({__name:"IconPicker",props:{modelValue:{},placeholder:{},browseUrl:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(a){o("update:modelValue",a==null?"":String(a))}return(a,i)=>(k(),M(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(fe),{icon:n.modelValue||"fluent:image-20-regular",class:He(n.modelValue?"text-zinc-600":"text-zinc-300")},null,8,["icon","class"])]),_:1}),c(s(mt),{"model-value":n.modelValue??"",placeholder:n.placeholder??"Iconify 图标标识符,如 fluent:add-20-regular",class:"font-mono text-xs","onUpdate:modelValue":r},null,8,["model-value","placeholder"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{as:"a",href:n.browseUrl??uit,target:"_blank",rel:"noopener noreferrer",size:"icon-xs","aria-label":"浏览图标"},{default:f(()=>[c(s(fe),{icon:"fluent:search-20-regular"})]),_:1},8,["href"])]),_:1})]),_:1}))}}),Yn=q({name:"UiSelect",__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=Dn(e,t);return(a,i)=>(k(),M(s(Iqe),Oe({"data-slot":"select"},s(r)),{default:f(l=>[se(a.$slots,"default",qt(Wt(l)))]),_:3},16))}}),cit=q({name:"UiSelectScrollDownButton",__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(s9e),Oe({"data-slot":"select-scroll-down-button"},s(o),{class:s(et)("flex cursor-default items-center justify-center py-1",t.class)}),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"lucide:chevron-down",class:"size-4"})])]),_:3},16,["class"]))}}),dit=q({name:"UiSelectScrollUpButton",__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(u9e),Oe({"data-slot":"select-scroll-up-button"},s(o),{class:s(et)("flex cursor-default items-center justify-center py-1",t.class)}),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"lucide:chevron-up",class:"size-4"})])]),_:3},16,["class"]))}}),Jn=q({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=At(n,"class"),a=Dn(r,o);return(i,l)=>(k(),M(s(r9e),null,{default:f(()=>[c(s(Gqe),Oe({"data-slot":"select-content"},{...i.$attrs,...s(a)},{class:s(et)("bg-white text-zinc-700 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[var(--reka-select-trigger-width,8rem)] overflow-x-hidden overflow-y-auto rounded-md border border-zinc-200 p-1 shadow-md",e.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1 w-(--reka-select-trigger-width)",n.class)}),{default:f(()=>[c(dit),c(s(h9e),{class:He(s(et)("p-1",e.position==="popper"&&"scroll-my-1"))},{default:f(()=>[se(i.$slots,"default")]),_:3},8,["class"]),c(cit)]),_:3},16,["class"])]),_:3}))}}),fit={class:"absolute right-2 flex size-3.5 items-center justify-center"},Xn=q({name:"UiSelectItem",__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(Zqe),Oe({"data-slot":"select-item"},s(o),{class:s(et)("focus:bg-[color-mix(in_srgb,var(--primary)_10%,white)] hover:bg-[color-mix(in_srgb,var(--primary)_10%,white)] focus:text-(--primary) hover:text-(--primary) [&_svg:not([class*='text-'])]:text-zinc-400 relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:f(()=>[H("span",fit,[c(s(e9e),null,{default:f(()=>[se(r.$slots,"indicator-icon",{},()=>[c(s(fe),{icon:"fluent:checkmark-20-filled",class:"size-4"})])]),_:3})]),c(s(n9e),null,{default:f(()=>[se(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),Zn=q({name:"UiSelectTrigger",inheritAttrs:!1,__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},size:{default:"default"}},setup(e){const t=e,n=At(t,"class","size"),o=yn(n);return(r,a)=>(k(),M(s(d9e),Oe({"data-slot":"select-trigger","data-size":e.size},{...r.$attrs,...s(o)},{class:s(et)("text-zinc-700 border-zinc-200 data-[placeholder]:text-zinc-300 [&_svg:not([class*='text-'])]:text-zinc-400 flex w-fit items-center justify-between gap-2 rounded border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-colors ease-out duration-180 outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","aria-invalid:border-red-400 hover:border-zinc-300 focus-visible:border-(--primary)",t.class)}),{default:f(()=>[se(r.$slots,"default"),c(s(Yqe),{"as-child":""},{default:f(()=>[c(s(fe),{icon:"lucide:chevron-down",class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),Qn=q({name:"UiSelectValue",__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(k(),M(s(p9e),Oe({"data-slot":"select-value"},t),{default:f(()=>[se(n.$slots,"default")]),_:3},16))}}),pit={class:"flex flex-col"},mit={class:"flex min-h-128 gap-6"},hit=["data-active"],git=["data-instruction","onClick"],vit={class:"flex-1 truncate"},yit=["onClick"],bit=["data-instruction"],_it=["onClick"],xit={class:"flex-1 truncate"},wit=["onClick"],Sit=["onClick"],kit=["data-instruction","onClick"],Cit={class:"flex-1 truncate"},$it=["onClick"],Tit=["data-active"],Eit={class:"border-t border-zinc-100 p-2"},Dit={class:"flex-1"},Oit={class:"ml-auto text-xs tabular-nums text-zinc-400"},Ait={class:"flex-1"},Iit={class:"ml-auto text-xs tabular-nums text-zinc-400"},Pit={class:"flex flex-1 flex-col"},Mit={key:0,class:"flex min-h-112 items-center justify-center p-8 text-sm text-zinc-400"},Rit={key:1,class:"flex flex-col gap-4 p-6"},Fit={class:"grid grid-cols-2 gap-4"},zit={key:2,class:"flex flex-col gap-4 p-6"},Vit={key:3,class:"flex flex-col gap-4 p-6"},Nit={key:1,class:"flex items-start gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800",role:"alert"},Lit={class:"flex-1"},Bit={key:4,class:"flex flex-col gap-4 p-6"},Uit={class:"flex items-end gap-4"},qit={class:"grid grid-cols-2 gap-4"},jit={class:"grid grid-cols-2 gap-4"},Hit={class:"flex items-end gap-4"},Wit={class:"flex w-1/2 items-end gap-4"},Git={class:"text-xs text-zinc-400"},Kit={key:0,class:"flex items-start gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800",role:"alert"},Yit={class:"flex-1"},Jit={class:"grid grid-cols-2 gap-4"},Xit={class:"grid grid-cols-2 gap-4"},Zit={class:"text-xs text-zinc-400"},Qit={key:0,class:"flex items-start gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800",role:"alert"},est={class:"flex-1"},tst={key:7,class:"flex flex-col gap-4 p-6"},nst={key:1,class:"flex items-start gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800",role:"alert"},ost={class:"flex-1"},os="group",wp="item",Bd="sub",rst=q({name:"ShwfedActionsConfig",__name:"config",props:Ca({configure:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=Ot(e,"modelValue"),o=t.configure??(()=>{}),r=tne(o),a=(()=>{const ie=new Il({unlistedVariablesAreDyn:!1}),ve=new Set(ie.getDefinitions().variables.map(Re=>Re.name));o(ie);const Ce={};for(const Re of ie.getDefinitions().variables)ve.has(Re.name)||(Ce[Re.name]={type:Re.type,label:Re.label??Re.name,description:Re.description??void 0,value:void 0});return Ce})();Wi(a);const{ActionGroup:i,ActionItem:l,DropdownAction:u,DropdownActionItem:d}=Z1(o),p=ie=>$0(i,ie)??ie,m=ie=>$0(l,ie)??ie,h=ie=>$0(d,ie)??ie,g=ie=>$0(u,ie)??ie,v=ie=>$0(r,ie)??ie,b=ie=>T0(i,ie),x=ie=>T0(l,ie),y=ie=>T0(d,ie),_=ie=>T0(u,ie),w=ie=>T0(r,ie);function S(ie){return"items"in ie}function C(ie){return"type"in ie&&"compatibilityDate"in ie}function $(ie){return"type"in ie&&"compatibilityDate"in ie}const T=[{value:"default",label:"默认"},{value:"primary",label:"主要"},{value:"destructive",label:"危险"},{value:"ghost",label:"透明"},{value:"link",label:"链接"}],D=[{value:"default",label:"默认"},{value:"sm",label:"小"},{value:"xs",label:"极小"}],A=WR.map(ie=>({type:ie.type,compatibilityDate:ie.compatibilityDate,name:ie.metadata.name,icon:ie.metadata.icon})).sort((ie,ve)=>ie.name.localeCompare(ve.name,"zh")),I=(()=>{const ie=new Map;for(const ve of HR){if(ve.deprecated)continue;const Ce=ie.get(ve.type);(!Ce||ve.compatibilityDate>Ce.compatibilityDate)&&ie.set(ve.type,{type:ve.type,compatibilityDate:ve.compatibilityDate,name:ve.metadata.name,icon:ve.metadata.icon})}return[...ie.values()].sort((ve,Ce)=>ve.name.localeCompare(Ce.name,"zh"))})(),U=E(()=>n.value.groups??[]),j=E(()=>n.value.items??[]);function Q(){return{groups:[...n.value.groups??[]],items:[...n.value.items??[]]}}function F(ie){n.value={...n.value,groups:ie.groups,items:ie.items}}const R=E({get:()=>n.value.size??"default",set:ie=>{n.value={...n.value,size:ie}}}),G=E({get:()=>n.value.gap??4,set:ie=>{n.value={...n.value,gap:ie}}}),Z=E({get:()=>n.value.style??"",set:ie=>{const ve=ie;if(ve.trim()===""){const{style:Ce,...Re}=n.value;n.value=Re}else n.value={...n.value,style:ve}}}),Y=re({kind:"general"});function he(ie){return j.value.filter(ve=>ve.groupId===ie)}function ue(ie){if(C(ie)){const Ce=Op(ie.type,ie.compatibilityDate),Re=ie.name;return typeof Re=="string"&&Re.trim().length>0?Re:Ce?`未命名${Ce.metadata.name}`:"未命名项"}const ve=S(ie)?"未命名下拉按钮":"未命名按钮";return ut(ie.title,"zh")??ve}function pe(ie){return C(ie)?Op(ie.type,ie.compatibilityDate)?.metadata.icon:ie.icon}function ce(ie){if($(ie)){const ve=Op(ie.type,ie.compatibilityDate),Ce=ie.name;return typeof Ce=="string"&&Ce.trim().length>0?Ce:ve?`未命名${ve.metadata.name}`:"未命名项"}return ut(ie.title,"zh")??"未命名按钮"}function ae(ie){return $(ie)?Op(ie.type,ie.compatibilityDate)?.metadata.icon:ie.icon}function W(ie){const ve=he(ie);if(ve.length===0)return"";const Ce=ue(ve[0]);return ve.length===1?Ce:ve.length===2?`${Ce}、${ue(ve[1])}`:`${Ce} 等 ${ve.length} 个按钮`}function B(ie){return j.value.find(ve=>ve.id===ie)??null}function K(ie){for(const ve of j.value){if(!S(ve))continue;const Ce=ve.items.find(Re=>Re.id===ie);if(Ce)return{parent:ve,sub:Ce}}return null}function X(ie){return U.value.find(ve=>ve.id===ie)??null}const Ee=E(()=>Y.value?.kind==="general"),_e=E(()=>Y.value?.kind!=="group"?null:X(Y.value.id)),ze=E(()=>{if(Y.value?.kind!=="item")return null;const ie=B(Y.value.id);return!ie||S(ie)||C(ie)?null:ie}),st=E(()=>{if(Y.value?.kind!=="item")return null;const ie=B(Y.value.id);return!ie||!S(ie)?null:ie}),oe=E(()=>{if(Y.value?.kind!=="item")return null;const ie=B(Y.value.id);return!ie||!C(ie)?null:ie}),be=E(()=>{const ie=oe.value;return ie?Op(ie.type,ie.compatibilityDate)??null:null}),De=E(()=>{if(Y.value?.kind!=="sub")return null;const ie=K(Y.value.id);return!ie||$(ie.sub)?null:ie.sub}),Se=E(()=>{if(Y.value?.kind!=="sub")return null;const ie=K(Y.value.id);return!ie||!$(ie.sub)?null:ie.sub}),Te=E(()=>{const ie=Se.value;return ie?Op(ie.type,ie.compatibilityDate)??null:null}),Ne=E(()=>Ee.value||_e.value!==null||ze.value!==null||st.value!==null||oe.value!==null||De.value!==null||Se.value!==null);function te(ie,ve,Ce){Ce.trim()===""?Reflect.deleteProperty(ie,ve):ie[ve]=Ce}function le(ie,ve,Ce){Ce?ie[ve]=!0:Reflect.deleteProperty(ie,ve)}function xe(ie,ve,Ce){!Ce||Ce.length===0||Ce.every(Re=>Re.message.trim().length===0)?Reflect.deleteProperty(ie,ve):ie[ve]=Ce}function me(){return[{locale:"zh",message:""}]}function Je(ie){return Zd(ie.type,ie.compatibilityDate)?.config}function je(ie){return Zd(ie.type,ie.compatibilityDate)?.metadata.name??ie.type}function Pe(ie){const ve=Zd(ie.type,ie.compatibilityDate);if(ve?.deprecated)return ve.deprecationNote??"此按钮类型已弃用。"}function Ue(ie){const ve=Y.value;if(ve?.kind!=="group")return;const Ce=ve.id,Re=Q();let yt=!1;Re.groups=Re.groups.map(Et=>{if(Et.id!==Ce)return Et;const An={...Et};return ie(An),yt=!0,An}),yt&&F(Re)}function $t(ie){const ve=Y.value;if(ve?.kind!=="item")return;const Ce=ve.id,Re=Q();let yt=!1;Re.items=Re.items.map(Et=>{if(Et.id!==Ce||S(Et))return Et;const An={...Et};return ie(An),yt=!0,An}),yt&&F(Re)}function Mt(ie){const ve=Y.value;if(ve?.kind!=="item")return;const Ce=ve.id;if(ie.id!==Ce)return;const Re=Q();let yt=!1;Re.items=Re.items.map(Et=>Et.id!==Ce||!C(Et)?Et:(yt=!0,ie)),yt&&F(Re)}function Ae(ie){const ve=Y.value;if(ve?.kind!=="item")return;const Ce=ve.id,Re=Q();let yt=!1;Re.items=Re.items.map(Et=>{if(Et.id!==Ce||!S(Et))return Et;const An={...Et};return ie(An),yt=!0,An}),yt&&F(Re)}function Le(ie){const ve=Y.value;if(ve?.kind!=="sub")return;const Ce=ve.id,Re=Q();let yt=!1;Re.items=Re.items.map(Et=>!S(Et)||!Et.items.some(An=>An.id===Ce)?Et:{...Et,items:Et.items.map(An=>{if(An.id!==Ce||$(An))return An;const yr={...An};return ie(yr),yt=!0,yr})}),yt&&F(Re)}function gt(ie){const ve=Y.value;if(ve?.kind!=="sub")return;const Ce=ve.id;if(ie.id!==Ce)return;const Re=Q();let yt=!1;Re.items=Re.items.map(Et=>!S(Et)||!Et.items.some(An=>An.id===Ce)?Et:{...Et,items:Et.items.map(An=>An.id!==Ce||!$(An)?An:(yt=!0,ie))}),yt&&F(Re)}function ct(ie){return ie?Zd(ie.type,ie.compatibilityDate)?.metadata.drillable===!0:!1}const tt=E(()=>{const ie=ze.value;if(ie?.action&&ct(ie.action))return ie.action;const ve=De.value;return ve?.action&&ct(ve.action)?ve.action:null}),tn=E(()=>{const ie=tt.value;if(!ie)return null;const ve=ze.value;if(ve&&ve.action===ie)return ve.title;const Ce=De.value;return Ce&&Ce.action===ie?Ce.title:null}),Bt=E(()=>{const ie=ze.value??De.value;if(!ie?.action)return null;const ve=Zd(ie.action.type,ie.action.compatibilityDate),Ce=ve?.metadata.operations;return!ve||!Ce||Ce.length===0?null:{instanceId:ie.id,name:ut(ie.title,"zh"),typeName:ve.metadata.name,typeIcon:ve.metadata.icon,operations:Ce}});Pte(Bt);const $e=Fn(pA,null),ge=E(()=>$e?.target.value??null),Fe=re(null),Be=re(!1);fr(pA,{target:Fe,drilled:Be});const vt=Fn(Y1,null);if(vt){const ie=vt.add();Xe([tt,tn],([ve,Ce])=>{if(!ve){ie.label.value=null,ie.back.value=null;return}const Re=Zd(ve.type,ve.compatibilityDate)?.metadata.name??ve.type;ie.label.value=ut(Ce??void 0,"zh")??Re,ie.back.value=()=>{Y.value=null}},{immediate:!0}),tr(()=>{ie.dispose()})}function Nt(){Y.value={kind:"general"}}function Kt(ie){Y.value={kind:"group",id:ie}}function nn(ie){Y.value={kind:"item",id:ie}}function io(ie){Y.value={kind:"sub",id:ie}}function lo(ie){if(ie.kind!==wp)return!1;const ve=j.value.find(Ce=>Ce.id===ie.id);return!!ve&&S(ve)}function so(ie,ve){for(const Ce of ie)if(S(Ce)&&Ce.items.some(Re=>Re.id===ve))return Ce;return null}function qo(ie){const ve={id:ie.id,title:ie.title};return ie.tooltip!==void 0&&(ve.tooltip=ie.tooltip),ie.icon!==void 0&&(ve.icon=ie.icon),ie.hidden!==void 0&&(ve.hidden=ie.hidden),ie.disabled!==void 0&&(ve.disabled=ie.disabled),ie.variant!==void 0&&(ve.variant=ie.variant),ie.action!==void 0&&(ve.action=ie.action),ve}function to(ie,ve){const Ce={id:ie.id,groupId:ve,title:ie.title},Re=ie;return Re.tooltip!==void 0&&(Ce.tooltip=Re.tooltip),Re.icon!==void 0&&(Ce.icon=Re.icon),Re.hidden!==void 0&&(Ce.hidden=Re.hidden),Re.disabled!==void 0&&(Ce.disabled=Re.disabled),Re.variant!==void 0&&(Ce.variant=Re.variant),Re.action!==void 0&&(Ce.action=Re.action),Ce}function ea(ie){const{groupId:ve,...Ce}=ie;return Ce}function kr(ie,ve){return{...ie,groupId:ve}}function pn(ie,ve,Ce){if(ve===wp){const Re=ie.find(yt=>yt.id===Ce);return!Re||S(Re)?[]:C(Re)?[ea(Re)]:[qo(Re)]}if(ve===Bd){const yt=so(ie,Ce)?.items.find(Et=>Et.id===Ce);return yt?[{...yt}]:[]}return[]}function On(ie,ve,Ce,Re){if(ve===wp){const yt=ie.find(Et=>Et.id===Ce);return yt?{...yt,groupId:Re}:null}if(ve===Bd){const Et=so(ie,Ce)?.items.find(An=>An.id===Ce);return Et?$(Et)?kr(Et,Re):to(Et,Re):null}return null}function ta(ie,ve,Ce){if(ve===wp){ie.items=ie.items.filter(Re=>Re.id!==Ce),Ia(ie);return}ie.items=ie.items.map(Re=>!S(Re)||!Re.items.some(yt=>yt.id===Ce)?Re:{...Re,items:Re.items.filter(yt=>yt.id!==Ce)}),vr(ie),Ia(ie)}function Ia(ie){const ve=new Set(ie.items.map(Ce=>Ce.groupId));ie.groups=ie.groups.filter(Ce=>ve.has(Ce.id))}function vr(ie){ie.items=ie.items.filter(ve=>!S(ve)||ve.items.length>0)}function Ds(ie,ve){const Ce=new Map(ie.map((Re,yt)=>[Re.id,yt]));return[...ve].sort((Re,yt)=>(Ce.get(Re.groupId)??0)-(Ce.get(yt.groupId)??0))}function cp(ie,ve,Ce){if(ie===ve)return;const Re=Q(),yt=Re.groups.findIndex(ui=>ui.id===ie),Et=Re.groups.findIndex(ui=>ui.id===ve);if(yt<0||Et<0)return;const[An]=Re.groups.splice(yt,1);let yr=Et>yt?Et-1:Et;Ce==="reorder-below"&&(yr+=1),Re.groups.splice(yr,0,An),F(Re)}function sc(ie,ve,Ce){if(ie===os||ve===Ce)return;const Re=Q(),yt=Re.items.findIndex(oa=>oa.id===Ce);if(yt<0)return;const Et=Re.items[yt];if(!S(Et)||ie===Bd&&Et.items.some(oa=>oa.id===ve))return;const An=pn(Re.items,ie,ve);if(An.length===0)return;ta(Re,ie,ve);const yr=Re.items.findIndex(oa=>oa.id===Ce);if(yr<0)return;const ui=Re.items[yr],Ad={...ui,items:[...ui.items,...An]};Re.items=Re.items.map((oa,p_)=>p_===yr?Ad:oa),F(Re)}function dp(ie,ve,Ce,Re){if(ie===os||ve===Ce)return;const yt=Q(),Et=yt.items.find(oa=>oa.id===Ce);if(!Et)return;const An=Et.groupId,yr=On(yt.items,ie,ve,An);if(!yr)return;ta(yt,ie,ve);const ui=[];let Ad=!1;for(const oa of yt.items)oa.id===Ce?(Re==="reorder-above"?ui.push(yr,oa):ui.push(oa,yr),Ad=!0):ui.push(oa);Ad||ui.push(yr),yt.items=Ds(yt.groups,ui),Ia(yt),vr(yt),F(yt)}function Ed(ie,ve,Ce,Re){if(ie===os||ve===Ce)return;const yt=Q(),Et=so(yt.items,Ce);if(!Et)return;const An=Et.id,yr=pn(yt.items,ie,ve);if(yr.length===0)return;ta(yt,ie,ve);const ui=yt.items.findIndex(Id=>Id.id===An);if(ui<0)return;const Ad=yt.items[ui];if(!S(Ad))return;const oa=[];let p_=!1;for(const Id of Ad.items)Id.id===Ce?(Re==="reorder-above"?oa.push(...yr,Id):oa.push(Id,...yr),p_=!0):oa.push(Id);p_||oa.push(...yr);const yle={...Ad,items:oa};yt.items=yt.items.map((Id,ble)=>ble===ui?yle:Id),vr(yt),Ia(yt),F(yt)}function lc(ie,ve){const Ce=crypto.randomUUID(),Re=crypto.randomUUID(),yt={id:Re,groupId:Ce,title:me(),action:{type:ie,compatibilityDate:ve}},Et=Q();Et.groups=[...Et.groups,{id:Ce}],Et.items=[...Et.items,yt],F(Et),Y.value={kind:"item",id:Re}}function Dd(ie){return ie==="com.shwfed.actions.item.markdown"?{name:"",content:me()}:{}}function Od(ie,ve){const Ce=crypto.randomUUID(),Re=crypto.randomUUID(),yt={id:Re,groupId:Ce,type:ie,compatibilityDate:ve,...Dd(ie)},Et=Q();Et.groups=[...Et.groups,{id:Ce}],Et.items=[...Et.items,yt],F(Et),Y.value={kind:"item",id:Re}}function il(ie,ve,Ce){if(ie===os)return;const Re=Q(),yt=On(Re.items,ie,ve,"");if(!yt)return;const Et={id:crypto.randomUUID()},An={...yt,groupId:Et.id};ta(Re,ie,ve);const yr=Math.max(0,Math.min(Ce,Re.groups.length));Re.groups.splice(yr,0,Et),Re.items=Ds(Re.groups,[...Re.items,An]),F(Re)}function c_(ie){const ve=Q(),Ce=ve.items.findIndex(An=>An.id===ie);if(Ce<0)return;const Re=ve.items[Ce];if(S(Re))return;const yt=qo(Re),Et={id:crypto.randomUUID(),groupId:Re.groupId,title:me(),items:[yt]};ve.items=ve.items.map((An,yr)=>yr===Ce?Et:An),F(ve),Y.value={kind:"item",id:Et.id}}function na(){const ie=Y.value;!ie||ie.kind==="general"||ie.kind==="group"&&X(ie.id)||ie.kind==="item"&&B(ie.id)||ie.kind==="sub"&&K(ie.id)||(Y.value={kind:"general"})}function d_(ie){const ve=Q();ve.items=ve.items.filter(Ce=>Ce.groupId!==ie),ve.groups=ve.groups.filter(Ce=>Ce.id!==ie),F(ve),na()}function f_(ie){const ve=Q();ve.items=ve.items.filter(Ce=>Ce.id!==ie),Ia(ve),F(ve),na()}function de(ie){const ve=Q();ve.items=ve.items.map(Ce=>!S(Ce)||!Ce.items.some(Re=>Re.id===ie)?Ce:{...Ce,items:Ce.items.filter(Re=>Re.id!==ie)}),vr(ve),Ia(ve),F(ve),na()}function we(ie){return ie===os||ie===wp||ie===Bd}function Ie({source:ie,target:ve,instruction:Ce}){if(we(ie.kind)){if(ve.kind==="group"){if(ie.kind!==os)return;(Ce==="reorder-above"||Ce==="reorder-below")&&cp(ie.id,ve.id,Ce);return}if(ve.kind==="item"){if(ie.kind===os)return;Ce==="make-child"?sc(ie.kind,ie.id,ve.id):(Ce==="reorder-above"||Ce==="reorder-below")&&dp(ie.kind,ie.id,ve.id,Ce);return}if(ve.kind==="sub"){if(ie.kind===os)return;(Ce==="reorder-above"||Ce==="reorder-below")&&Ed(ie.kind,ie.id,ve.id,Ce)}}}function We({source:ie,data:ve}){if(!we(ie.kind)||ie.kind===os)return;const Ce=ve.insertIndex;typeof Ce=="number"&&il(ie.kind,ie.id,Ce)}const ht=Zv({onRowDrop:Ie,onZoneDrop:We}),xt=ie=>ie.querySelector(".drag-handle");function Zt(ie){return{kind:os,canDrop:ve=>ve.kind===os,blockInstructions:ve=>{const Ce=["make-child","reparent"];return ve.id===ie&&Ce.push("reorder-above","reorder-below"),Ce},dragHandle:xt}}function sn(ie,ve,Ce){return{kind:wp,data:{groupId:ve},canDrop:Re=>Re.kind===os||Re.id===ie?!1:Ce?!(Re.kind===Bd&&so(j.value,Re.id)?.id===ie):!0,blockInstructions:Re=>{const yt=["reparent"];return Re.id===ie?(yt.push("reorder-above","reorder-below","make-child"),yt):Ce?(yt.push("reorder-above"),lo(Re)&&yt.push("make-child"),yt):(yt.push("make-child"),yt)},resolveInstruction:Ce?({input:Re,element:yt})=>{const Et=yt.getBoundingClientRect();return Re.clientY-Et.top<Et.height/2?"make-child":"reorder-below"}:void 0,dragHandle:xt}}function yo(ie,ve){return{kind:Bd,data:{parentDropdownId:ve},canDrop:Ce=>Ce.kind!==os&&!lo(Ce),blockInstructions:Ce=>{const Re=["make-child","reparent"];return Ce.id===ie?(Re.push("reorder-above","reorder-below"),Re):(Ce.kind===Bd&&so(j.value,Ce.id)?.id===ve||Re.push("reorder-above","reorder-below"),Re)},dragHandle:xt}}const $n=ie=>({data:{insertIndex:ie},canDrop:ve=>ve.kind===wp||ve.kind===Bd}),no=ie=>`new-group-${ie}`;return(ie,ve)=>(k(),L("div",pit,[H("div",mit,[Be.value?ke("",!0):(k(),M(Lb,{key:0,to:ge.value,disabled:!ge.value},[H("div",{class:He(ge.value?"flex flex-1 flex-col gap-2 min-h-0":"flex gap-2 w-72 shrink-0 flex-col")},[tt.value?(k(),L("div",{key:0,ref_key:"sidebarTakeoverTarget",ref:Fe,class:"flex flex-1 flex-col min-h-0"},null,512)):(k(),L(Me,{key:1},[c(s(js),{class:"flex-1"},{default:f(()=>[H("div",{class:He(["row general-row pl-2",[Y.value?.kind==="general"?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:ve[0]||(ve[0]=at(Ce=>Nt(),["stop"]))},[c(s(fe),{icon:"fluent:settings-20-regular",class:"size-4 shrink-0"}),ve[25]||(ve[25]=H("span",{class:"flex-1 truncate"},"通用",-1))],2),H("div",{ref:s(ht).zoneRef(no(0),$n(0)),class:"new-group-zone","data-active":s(ht).isZoneActive(no(0))?"true":void 0},[...ve[26]||(ve[26]=[H("span",{class:"new-group-zone-label"},"+ 新按钮组",-1)])],8,hit),(k(!0),L(Me,null,Ke(U.value,Ce=>(k(),L("div",{key:Ce.id,class:"space-y-1"},[H("div",{ref_for:!0,ref:s(ht).rowRef(Ce.id,Zt(Ce.id)),class:He(["row group group-row pl-2",[Y.value?.kind==="group"&&Y.value.id===Ce.id?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":""]]),"data-instruction":s(ht).instructionFor(Ce.id)??void 0,onClick:at(Re=>Kt(Ce.id),["stop"])},[c(s(fe),{icon:"fluent:re-order-dots-vertical-20-regular",class:"drag-handle size-4 shrink-0 cursor-grab text-zinc-400"}),H("span",vit,O(W(Ce.id)),1),c(s(uo),{"delay-duration":180},{default:f(()=>[c(s(fo),{"as-child":""},{default:f(()=>[H("button",{class:"shrink-0 text-zinc-300 opacity-0 transition-opacity hover:text-red-500 group-hover:opacity-100",onClick:at(Re=>d_(Ce.id),["stop"])},[c(s(fe),{icon:"fluent:delete-20-regular",class:"size-3.5"})],8,yit)]),_:2},1024),c(s(co),{side:"right"},{default:f(()=>[...ve[27]||(ve[27]=[P(" 删除该按钮组及其所有按钮 ",-1)])]),_:1})]),_:2},1024)],10,git),(k(!0),L(Me,null,Ke(he(Ce.id),Re=>(k(),L("div",{key:Re.id,ref_for:!0,ref:s(ht).rowRef(Re.id,sn(Re.id,Re.groupId,S(Re))),class:He(["item-wrap space-y-1",{"dropdown-wrap":S(Re)}]),"data-instruction":s(ht).instructionFor(Re.id)??void 0},[H("div",{class:He(["row group item-row pl-5",[Y.value?.kind==="item"&&Y.value.id===Re.id?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:at(yt=>nn(Re.id),["stop"])},[c(s(fe),{icon:"fluent:re-order-dots-vertical-20-regular",class:"drag-handle size-4 shrink-0 cursor-grab text-zinc-300"}),pe(Re)?(k(),M(s(fe),{key:0,icon:pe(Re),class:He(["size-4 shrink-0",C(Re)?"text-purple-500":void 0])},null,8,["icon","class"])):ke("",!0),H("span",xit,O(ue(Re)),1),!S(Re)&&!C(Re)?(k(),M(s(uo),{key:1,"delay-duration":180},{default:f(()=>[c(s(fo),{"as-child":""},{default:f(()=>[H("button",{class:"shrink-0 text-zinc-300 opacity-0 transition-opacity hover:text-zinc-600 group-hover:opacity-100",onClick:at(yt=>c_(Re.id),["stop"])},[c(s(fe),{icon:"fluent:folder-add-20-regular",class:"size-3.5"})],8,wit)]),_:2},1024),c(s(co),{side:"right"},{default:f(()=>[...ve[28]||(ve[28]=[P(" 将该按钮包裹为下拉按钮,之后可添加更多下拉项 ",-1)])]),_:1})]),_:2},1024)):ke("",!0),c(s(uo),{"delay-duration":180},{default:f(()=>[c(s(fo),{"as-child":""},{default:f(()=>[H("button",{class:"shrink-0 text-zinc-300 opacity-0 transition-opacity hover:text-red-500 group-hover:opacity-100",onClick:at(yt=>f_(Re.id),["stop"])},[c(s(fe),{icon:"fluent:delete-20-regular",class:"size-3.5"})],8,Sit)]),_:2},1024),c(s(co),{side:"right"},{default:f(()=>[P(O(S(Re)?"删除该下拉按钮及其所有下拉项":C(Re)?"删除该项":"删除该按钮"),1)]),_:2},1024)]),_:2},1024)],10,_it),S(Re)?(k(!0),L(Me,{key:0},Ke(Re.items,yt=>(k(),L("div",{key:yt.id,ref_for:!0,ref:s(ht).rowRef(yt.id,yo(yt.id,Re.id)),class:He(["row group sub-item-row pl-10",[Y.value?.kind==="sub"&&Y.value.id===yt.id?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-500 hover:bg-zinc-50"]]),"data-instruction":s(ht).instructionFor(yt.id)??void 0,onClick:at(Et=>io(yt.id),["stop"])},[c(s(fe),{icon:"fluent:re-order-dots-vertical-20-regular",class:"drag-handle size-4 shrink-0 cursor-grab text-zinc-300"}),ae(yt)?(k(),M(s(fe),{key:0,icon:ae(yt),class:He(["size-4 shrink-0",$(yt)?"text-purple-500":void 0])},null,8,["icon","class"])):ke("",!0),H("span",Cit,O(ce(yt)),1),c(s(uo),{"delay-duration":180},{default:f(()=>[c(s(fo),{"as-child":""},{default:f(()=>[H("button",{class:"shrink-0 text-zinc-300 opacity-0 transition-opacity hover:text-red-500 group-hover:opacity-100",onClick:at(Et=>de(yt.id),["stop"])},[c(s(fe),{icon:"fluent:delete-20-regular",class:"size-3.5"})],8,$it)]),_:2},1024),c(s(co),{side:"right"},{default:f(()=>[...ve[29]||(ve[29]=[P(" 从下拉菜单中移除该按钮 ",-1)])]),_:1})]),_:2},1024)],10,kit))),128)):ke("",!0)],10,bit))),128))]))),128)),H("div",{ref:s(ht).zoneRef(no(U.value.length),$n(U.value.length)),class:"new-group-zone","data-active":s(ht).isZoneActive(no(U.value.length))?"true":void 0},[...ve[30]||(ve[30]=[H("span",{class:"new-group-zone-label"},"+ 新按钮组",-1)])],8,Tit)]),_:1}),H("div",Eit,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"})]),_:1}),c(s(S$),null,{default:f(()=>[c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(I),Ce=>(k(),M(s(ws),{key:Ce.type,value:Ce.type,onSelect:Re=>lc(Ce.type,Ce.compatibilityDate)},{default:f(()=>[c(s(fe),{icon:Ce.icon,class:"size-4 shrink-0"},null,8,["icon"]),H("span",Dit,O(Ce.name),1),H("span",Oit,O(Ce.compatibilityDate),1)]),_:2},1032,["value","onSelect"]))),128)),(k(!0),L(Me,null,Ke(s(A),Ce=>(k(),M(s(ws),{key:Ce.type,value:Ce.type,onSelect:Re=>Od(Ce.type,Ce.compatibilityDate)},{default:f(()=>[c(s(fe),{icon:Ce.icon,class:"size-4 shrink-0 text-purple-500"},null,8,["icon"]),H("span",Ait,O(Ce.name),1),H("span",Iit,O(Ce.compatibilityDate),1)]),_:2},1032,["value","onSelect"]))),128))]),_:1})]),_:1})]),_:1})])],64))],2)],8,["to","disabled"])),H("div",Pit,[c(s(js),{class:"flex-1"},{default:f(()=>[Ne.value?Ee.value?(k(),L("div",Rit,[se(ie.$slots,"general-extra",{},void 0,!0),H("div",Fit,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(v("size")),1)]),_:2},[w("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:w("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":R.value,"onUpdate:modelValue":ve[1]||(ve[1]=Ce=>R.value=Ce)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(D,Ce=>c(s(Xn),{key:Ce.value,value:Ce.value},{default:f(()=>[P(O(Ce.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(v("gap")),1)]),_:2},[w("gap")?{name:"tooltip",fn:f(()=>[c(s(z),{source:w("gap"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":G.value,min:0,"onUpdate:modelValue":ve[2]||(ve[2]=Ce=>G.value=Ce)},null,8,["model-value"])]),_:1})]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(v("style")),1)]),_:2},[w("style")?{name:"tooltip",fn:f(()=>[c(s(z),{source:w("style"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(LR),{"model-value":Z.value,placeholder:"CSS 样式字符串",class:"min-h-20 font-mono text-xs","onUpdate:modelValue":ve[3]||(ve[3]=Ce=>Z.value=String(Ce))},null,8,["model-value"])]),_:1})])):_e.value?(k(),L("div",zit,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(p("variant")),1)]),_:2},[b("variant")?{name:"tooltip",fn:f(()=>[c(s(z),{source:b("variant"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":_e.value.variant??"default","onUpdate:modelValue":ve[4]||(ve[4]=Ce=>Ue(Re=>{Re.variant=Ce}))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(T,Ce=>c(s(Xn),{key:Ce.value,value:Ce.value},{default:f(()=>[P(O(Ce.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1})])):oe.value?(k(),L("div",Vit,[be.value?(k(),M(Mo(be.value?.config),{key:0,"model-value":oe.value,"onUpdate:modelValue":ve[5]||(ve[5]=Ce=>Mt(Ce))},null,8,["model-value"])):(k(),L("div",Nit,[c(s(fe),{icon:"fluent:warning-20-regular",class:"mt-px size-4 shrink-0"}),H("span",Lit,"未找到匹配的项目类型:"+O(oe.value.type)+"@"+O(oe.value.compatibilityDate),1)]))])):st.value?(k(),L("div",Bit,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(h("title")),1)]),_:2},[y("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:y("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":st.value.title,"onUpdate:modelValue":ve[6]||(ve[6]=Ce=>Ae(Re=>{Re.title=Ce}))},null,8,["model-value"])]),_:1}),H("div",Uit,[c(s(V),{orientation:"vertical",class:"flex-1"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(h("icon")),1)]),_:2},[y("icon")?{name:"tooltip",fn:f(()=>[c(s(z),{source:y("icon"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qc),{"model-value":st.value.icon??"","onUpdate:modelValue":ve[7]||(ve[7]=Ce=>Ae(Re=>te(Re,"icon",Ce)))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"horizontal",class:"h-9 w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":st.value.hideTitle??!1,"onUpdate:modelValue":ve[8]||(ve[8]=Ce=>Ae(Re=>le(Re,"hideTitle",Ce)))},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(h("hideTitle")),1)]),_:2},[y("hideTitle")?{name:"tooltip",fn:f(()=>[c(s(z),{source:y("hideTitle"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})]),ve[31]||(ve[31]=H("p",{class:"text-xs text-zinc-400"}," 下拉按钮的下拉项以独立行的形式编辑,选中任意下拉项即可修改其属性。 ",-1))])):ze.value?(k(),L("div",{key:5,class:He(Be.value&&ct(ze.value.action)?"flex flex-col":"flex flex-col gap-4 p-6")},[Be.value&&ct(ze.value.action)?ke("",!0):(k(),L(Me,{key:0},[H("div",qit,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(m("title")),1)]),_:2},[x("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:x("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":ze.value.title,"onUpdate:modelValue":ve[9]||(ve[9]=Ce=>$t(Re=>{Re.title=Ce}))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(m("tooltip")),1)]),_:2},[x("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:x("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":ze.value.tooltip??me(),"onUpdate:modelValue":ve[10]||(ve[10]=Ce=>$t(Re=>xe(Re,"tooltip",Ce)))},null,8,["model-value"])]),_:1})]),H("div",jit,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(m("hidden")),1)]),_:2},[x("hidden")?{name:"tooltip",fn:f(()=>[c(s(z),{source:x("hidden"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":ze.value.hidden??"",placeholder:"CEL 表达式,返回 true 时隐藏","result-type":"bool",class:"min-h-10","onUpdate:modelValue":ve[11]||(ve[11]=Ce=>$t(Re=>te(Re,"hidden",Ce)))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(m("disabled")),1)]),_:2},[x("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:x("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":ze.value.disabled??"",placeholder:"CEL 表达式,返回 true 时禁用","result-type":"bool",class:"min-h-10","onUpdate:modelValue":ve[12]||(ve[12]=Ce=>$t(Re=>te(Re,"disabled",Ce)))},null,8,["model-value"])]),_:1})]),H("div",Hit,[c(s(V),{orientation:"vertical",class:"w-1/2"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(m("variant")),1)]),_:2},[x("variant")?{name:"tooltip",fn:f(()=>[c(s(z),{source:x("variant"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":ze.value.variant??"default","onUpdate:modelValue":ve[13]||(ve[13]=Ce=>$t(Re=>{Re.variant=Ce}))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(T,Ce=>c(s(Xn),{key:Ce.value,value:Ce.value},{default:f(()=>[P(O(Ce.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1}),H("div",Wit,[c(s(V),{orientation:"vertical",class:"flex-1"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(m("icon")),1)]),_:2},[x("icon")?{name:"tooltip",fn:f(()=>[c(s(z),{source:x("icon"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qc),{"model-value":ze.value.icon??"","onUpdate:modelValue":ve[14]||(ve[14]=Ce=>$t(Re=>te(Re,"icon",Ce)))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"horizontal",class:"h-9 w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":ze.value.hideTitle??!1,"onUpdate:modelValue":ve[15]||(ve[15]=Ce=>$t(Re=>le(Re,"hideTitle",Ce)))},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(m("hideTitle")),1)]),_:2},[x("hideTitle")?{name:"tooltip",fn:f(()=>[c(s(z),{source:x("hideTitle"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])])],64)),ze.value.action?(k(),L(Me,{key:1},[ct(ze.value.action)?ke("",!0):(k(),L(Me,{key:0},[c(s(er)),H("div",Git,O(je(ze.value.action)),1),Pe(ze.value.action)?(k(),L("div",Kit,[c(s(fe),{icon:"fluent:warning-20-regular",class:"mt-px size-4 shrink-0"}),H("span",Yit,O(Pe(ze.value.action)),1)])):ke("",!0)],64)),Je(ze.value.action)?(k(),M(Mo(Je(ze.value.action)),{key:1,"model-value":ze.value.action,configure:s(o),"onUpdate:modelValue":ve[16]||(ve[16]=Ce=>$t(Re=>{Re.action=Ce}))},null,8,["model-value","configure"])):ke("",!0)],64)):ke("",!0)],2)):De.value?(k(),L("div",{key:6,class:He(Be.value&&ct(De.value.action)?"flex flex-col":"flex flex-col gap-4 p-6")},[Be.value&&ct(De.value.action)?ke("",!0):(k(),L(Me,{key:0},[H("div",Jit,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(g("title")),1)]),_:2},[_("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:_("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":De.value.title,"onUpdate:modelValue":ve[17]||(ve[17]=Ce=>Le(Re=>{Re.title=Ce}))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(g("tooltip")),1)]),_:2},[_("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:_("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":De.value.tooltip??me(),"onUpdate:modelValue":ve[18]||(ve[18]=Ce=>Le(Re=>xe(Re,"tooltip",Ce)))},null,8,["model-value"])]),_:1})]),H("div",Xit,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(g("hidden")),1)]),_:2},[_("hidden")?{name:"tooltip",fn:f(()=>[c(s(z),{source:_("hidden"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":De.value.hidden??"",placeholder:"CEL 表达式,返回 true 时隐藏","result-type":"bool",class:"min-h-10","onUpdate:modelValue":ve[19]||(ve[19]=Ce=>Le(Re=>te(Re,"hidden",Ce)))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(g("disabled")),1)]),_:2},[_("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:_("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":De.value.disabled??"",placeholder:"CEL 表达式,返回 true 时禁用","result-type":"bool",class:"min-h-10","onUpdate:modelValue":ve[20]||(ve[20]=Ce=>Le(Re=>te(Re,"disabled",Ce)))},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(g("icon")),1)]),_:2},[_("icon")?{name:"tooltip",fn:f(()=>[c(s(z),{source:_("icon"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qc),{"model-value":De.value.icon??"","onUpdate:modelValue":ve[21]||(ve[21]=Ce=>Le(Re=>te(Re,"icon",Ce)))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(g("variant")),1)]),_:2},[_("variant")?{name:"tooltip",fn:f(()=>[c(s(z),{source:_("variant"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":De.value.variant??"default","onUpdate:modelValue":ve[22]||(ve[22]=Ce=>Le(Re=>{Re.variant=Ce}))},{default:f(()=>[c(s(Zn),{class:"w-1/2"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(T,Ce=>c(s(Xn),{key:Ce.value,value:Ce.value},{default:f(()=>[P(O(Ce.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1})],64)),De.value.action?(k(),L(Me,{key:1},[ct(De.value.action)?ke("",!0):(k(),L(Me,{key:0},[c(s(er)),H("div",Zit,O(je(De.value.action)),1),Pe(De.value.action)?(k(),L("div",Qit,[c(s(fe),{icon:"fluent:warning-20-regular",class:"mt-px size-4 shrink-0"}),H("span",est,O(Pe(De.value.action)),1)])):ke("",!0)],64)),Je(De.value.action)?(k(),M(Mo(Je(De.value.action)),{key:1,"model-value":De.value.action,configure:s(o),"onUpdate:modelValue":ve[23]||(ve[23]=Ce=>Le(Re=>{Re.action=Ce}))},null,8,["model-value","configure"])):ke("",!0)],64)):ke("",!0)],2)):Se.value?(k(),L("div",tst,[Te.value?(k(),M(Mo(Te.value?.config),{key:0,"model-value":Se.value,"onUpdate:modelValue":ve[24]||(ve[24]=Ce=>gt(Ce))},null,8,["model-value"])):(k(),L("div",nst,[c(s(fe),{icon:"fluent:warning-20-regular",class:"mt-px size-4 shrink-0"}),H("span",ost,"未找到匹配的项目类型:"+O(Se.value.type)+"@"+O(Se.value.compatibilityDate),1)]))])):ke("",!0):(k(),L("div",Mit," 选择一项以编辑 "))]),_:3})])])]))}}),D$=sp(rst,[["__scopeId","data-v-d89126e3"]]);function ow(e){switch(e._tag){case"TypeLiteral":return e;case"Transformation":return ow(e.to);case"Refinement":return ow(e.from);case"Suspend":return ow(e.f());default:return null}}function ast(e,t){const n=ow(e.ast);return n?n.propertySignatures.find(o=>o.name===t)??null:null}function ist(e){const t=e.type;if(t._tag==="Union"&&e.isOptional){const n=t.types.find(o=>o._tag!=="UndefinedKeyword");if(n)return n}return t}function $re(e,t,n){const o=ast(e,t);if(!o)return;const r=n(o);if(gn(r))return r.value;const a=ist(o),i=n(a);if(gn(i))return i.value;if(a!==o.type){const l=n(o.type);if(gn(l))return l.value}}function Ko(e,t){return $re(e,t,lv)}function Yo(e,t){return $re(e,t,uv)}const Tre=Symbol("shwfed.table.column-layout"),sst=q({name:"ShwfedTableActionsRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=$oe(()=>{}),o=l=>Ko(n,l)??l,r=l=>Yo(n,l),a=Fn(Tre,null);Pt(()=>{a&&(a.fullPane.value=!0)}),tr(()=>{a&&(a.fullPane.value=!1)});const i=E({get:()=>({kind:"shwfed.component.action",size:"sm",gap:t.value.gap??4,style:t.value.style,groups:t.value.groups??[],items:t.value.items??[]}),set:l=>{const{gap:u,style:d,groups:p,items:m}=l,h={...t.value,gap:u,groups:p,items:m};d===void 0?Reflect.deleteProperty(h,"style"):h.style=d,t.value=h}});return(l,u)=>(k(),M(D$,{modelValue:i.value,"onUpdate:modelValue":u[3]||(u[3]=d=>i.value=d),configure:s($$)},{"general-extra":f(()=>[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":u[0]||(u[0]=d=>t.value.title=d)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":u[1]||(u[1]=d=>t.value.size=d)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:u[2]||(u[2]=d=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","configure"]))}}),lst={class:"space-y-5"},ust={class:"grid grid-cols-2 gap-x-6 gap-y-4"},cst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},dst={class:"flex flex-wrap gap-x-8 gap-y-3"},fst=q({name:"ShwfedTableDateRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Doe(()=>{}),o=u=>Ko(n,u)??u,r=u=>Yo(n,u),a=[{value:"left",label:"左对齐",icon:"fluent:text-align-left-20-regular"},{value:"center",label:"居中",icon:"fluent:text-align-center-20-regular"},{value:"right",label:"右对齐",icon:"fluent:text-align-right-20-regular"}],i=E(()=>(a.find(u=>u.value===(t.value.align??"left"))??a[0]).icon),l=E(()=>{const u=t.value?.format;if(!u)return"";try{return ir(new Date,u)}catch{return"(无效格式)"}});return(u,d)=>(k(),L("div",lst,[H("div",ust,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":d[0]||(d[0]=p=>t.value.title=p)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":d[1]||(d[1]=p=>t.value.tooltip=p),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",cst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accessor")),1)]),_:2},[r("accessor")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accessor"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(G1),{modelValue:t.value.accessor,"onUpdate:modelValue":d[2]||(d[2]=p=>t.value.accessor=p),placeholder:"如 row.joinDate",class:"font-mono text-xs"},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("format")),1)]),_:2},[r("format")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("format"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:t.value.format,"onUpdate:modelValue":d[3]||(d[3]=p=>t.value.format=p),placeholder:"yyyy-MM-dd",class:"font-mono text-xs"},null,8,["modelValue"]),l.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(l.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",size:"xs",title:o("align")},{default:f(()=>[c(s(fe),{icon:i.value},null,8,["icon"])]),_:1},8,["title"])]),_:1}),c(s(zr),{align:"start"},{default:f(()=>[(k(),L(Me,null,Ke(a,p=>c(s(Vo),{key:p.value,onSelect:m=>t.value.align=p.value},{default:f(()=>[c(s(fe),{icon:p.icon},null,8,["icon"]),P(" "+O(p.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1}),c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":d[4]||(d[4]=p=>t.value.size=p)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:d[5]||(d[5]=p=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1})]),c(s(er)),H("div",dst,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":d[6]||(d[6]=p=>t.value.enableSorting=p)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),pst={class:"space-y-5"},mst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},hst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},gst={class:"flex flex-wrap gap-x-8 gap-y-3"},vst=q({name:"ShwfedTableIconRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Ioe(()=>{}),o=d=>Ko(n,d)??d,r=d=>Yo(n,d),a=[{value:"left",label:"左对齐",icon:"fluent:text-align-left-20-regular"},{value:"center",label:"居中",icon:"fluent:text-align-center-20-regular"},{value:"right",label:"右对齐",icon:"fluent:text-align-right-20-regular"}],i=E(()=>(a.find(d=>d.value===(t.value.align??"center"))??a[1]).icon),l=E({get:()=>t.value.color??"",set:d=>{d===""?delete t.value.color:t.value.color=d}}),u={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}};return(d,p)=>(k(),L("div",pst,[H("div",mst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":p[0]||(p[0]=m=>t.value.title=m)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":p[1]||(p[1]=m=>t.value.tooltip=m),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",hst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accessor")),1)]),_:2},[r("accessor")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accessor"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:t.value.accessor,"onUpdate:modelValue":p[2]||(p[2]=m=>t.value.accessor=m),placeholder:'如 "fluent:checkmark-circle-20-regular"',"extra-vars":u},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",size:"xs",title:o("align")},{default:f(()=>[c(s(fe),{icon:i.value},null,8,["icon"])]),_:1},8,["title"])]),_:1}),c(s(zr),{align:"start"},{default:f(()=>[(k(),L(Me,null,Ke(a,m=>c(s(Vo),{key:m.value,onSelect:h=>t.value.align=m.value},{default:f(()=>[c(s(fe),{icon:m.icon},null,8,["icon"]),P(" "+O(m.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1}),c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":p[3]||(p[3]=m=>t.value.size=m)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:p[4]||(p[4]=m=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("color")),1)]),_:2},[r("color")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("color"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:l.value,"onUpdate:modelValue":p[5]||(p[5]=m=>l.value=m),placeholder:'如 "#ef4444"',"result-type":"string","extra-vars":u},null,8,["modelValue"])]),_:1})]),c(s(er)),H("div",gst,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":p[6]||(p[6]=m=>t.value.enableSorting=m)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),yst={class:"space-y-5"},bst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},_st={class:"grid grid-cols-2 gap-x-6 gap-y-4"},xst=q({name:"ShwfedTableMarkdownRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Roe(()=>{}),o=u=>Ko(n,u)??u,r=u=>Yo(n,u),a=[{value:"left",label:"左对齐",icon:"fluent:text-align-left-20-regular"},{value:"center",label:"居中",icon:"fluent:text-align-center-20-regular"},{value:"right",label:"右对齐",icon:"fluent:text-align-right-20-regular"}],i=E(()=>(a.find(u=>u.value===(t.value.align??"left"))??a[0]).icon),l=E({get:()=>t.value.copyExpression??"",set:u=>{u===""?delete t.value.copyExpression:t.value.copyExpression=u}});return(u,d)=>(k(),L("div",yst,[H("div",bst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":d[0]||(d[0]=p=>t.value.title=p)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":d[1]||(d[1]=p=>t.value.tooltip=p),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",_st,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",size:"xs",title:o("align")},{default:f(()=>[c(s(fe),{icon:i.value},null,8,["icon"])]),_:1},8,["title"])]),_:1}),c(s(zr),{align:"start"},{default:f(()=>[(k(),L(Me,null,Ke(a,p=>c(s(Vo),{key:p.value,onSelect:m=>t.value.align=p.value},{default:f(()=>[c(s(fe),{icon:p.icon},null,8,["icon"]),P(" "+O(p.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1}),c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":d[2]||(d[2]=p=>t.value.size=p)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:d[3]||(d[3]=p=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("copyExpression")),1)]),_:2},[r("copyExpression")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("copyExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:l.value,"onUpdate:modelValue":d[4]||(d[4]=p=>l.value=p),placeholder:"如 row.name 或 row.?name","result-type":["string","optional"],class:"min-h-10"},null,8,["modelValue"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("markdown")),1)]),_:2},[r("markdown")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("markdown"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.markdown,"onUpdate:modelValue":d[5]||(d[5]=p=>t.value.markdown=p)},null,8,["modelValue"])]),_:1})]))}}),wst={class:"space-y-5"},Sst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},kst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Cst={class:"flex flex-wrap gap-x-8 gap-y-3"},$st=q({name:"ShwfedTableNumberRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Voe(()=>{}),o=m=>Ko(n,m)??m,r=m=>Yo(n,m),a=[{value:"left",label:"左对齐",icon:"fluent:text-align-left-20-regular"},{value:"center",label:"居中",icon:"fluent:text-align-center-20-regular"},{value:"right",label:"右对齐",icon:"fluent:text-align-right-20-regular"}],i=E(()=>(a.find(m=>m.value===(t.value.align??"right"))??a[2]).icon),l=[{value:"round",label:"四舍五入"},{value:"floor",label:"向下取整"},{value:"ceil",label:"向上取整"}],u=[{value:"plain",label:"数值"},{value:"uppercaseChinese",label:"中文大写"},{value:"monoThousand",label:"等宽字体加千分位"}],d=E(()=>l.find(m=>m.value===(t.value.preserveMode??"round"))?.label);function p(m){t.value.preserveDigits=m,m===void 0?t.value.preserveMode=void 0:t.value.preserveMode===void 0&&(t.value.preserveMode="round")}return(m,h)=>(k(),L("div",wst,[H("div",Sst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":h[0]||(h[0]=g=>t.value.title=g)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":h[1]||(h[1]=g=>t.value.tooltip=g),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",kst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accessor")),1)]),_:2},[r("accessor")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accessor"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(G1),{modelValue:t.value.accessor,"onUpdate:modelValue":h[2]||(h[2]=g=>t.value.accessor=g),placeholder:"如 row.salary",class:"font-mono text-xs"},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",size:"xs",title:o("align")},{default:f(()=>[c(s(fe),{icon:i.value},null,8,["icon"])]),_:1},8,["title"])]),_:1}),c(s(zr),{align:"start"},{default:f(()=>[(k(),L(Me,null,Ke(a,g=>c(s(Vo),{key:g.value,onSelect:v=>t.value.align=g.value},{default:f(()=>[c(s(fe),{icon:g.icon},null,8,["icon"]),P(" "+O(g.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1}),c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":h[3]||(h[3]=g=>t.value.size=g)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:h[4]||(h[4]=g=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayMode")),1)]),_:2},[r("displayMode")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayMode"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.displayMode??"plain","onUpdate:modelValue":h[5]||(h[5]=g=>t.value.displayMode=g)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(u,g=>c(s(Xn),{key:g.value,value:g.value},{default:f(()=>[P(O(g.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("preserveDigits")),1)]),_:2},[r("preserveDigits")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("preserveDigits"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.preserveDigits,min:0,"onUpdate:modelValue":p},null,8,["model-value"]),t.value.preserveDigits!==void 0?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"!pr-1.5 text-xs"},{default:f(()=>[P(O(d.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[(k(),L(Me,null,Ke(l,g=>c(s(Vo),{key:g.value,onSelect:v=>t.value.preserveMode=g.value},{default:f(()=>[P(O(g.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),c(s(er)),H("div",Cst,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":h[6]||(h[6]=g=>t.value.enableSorting=g)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),Tst={class:"space-y-5"},Est={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Dst={class:"flex h-9 items-center"},Ost={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Ast=q({name:"ShwfedTableSelectRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Boe(()=>{}),o=l=>Ko(n,l)??l,r=l=>Yo(n,l),a=[{value:"checkbox",label:"多选"},{value:"radio",label:"单选"}];function i(l,u){if(u.trim()===""){const{[l]:d,...p}=t.value;t.value=p}else t.value={...t.value,[l]:u}}return(l,u)=>(k(),L("div",Tst,[H("div",Est,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("mode")),1)]),_:2},[r("mode")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("mode"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.mode??"checkbox","onUpdate:modelValue":u[0]||(u[0]=d=>t.value.mode=d)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(a,d=>c(s(Xn),{key:d.value,value:d.value},{default:f(()=>[P(O(d.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("crossPage")),1)]),_:2},[r("crossPage")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("crossPage"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",Dst,[c(s(Lo),{"model-value":t.value.crossPage??!1,"onUpdate:modelValue":u[1]||(u[1]=d=>t.value.crossPage=d)},null,8,["model-value"])])]),_:1})]),c(s(er)),H("div",Ost,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("enableRowSelection")),1)]),_:2},[r("enableRowSelection")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableRowSelection"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.enableRowSelection??"",placeholder:"如 row.id != 'foo'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[2]||(u[2]=d=>i("enableRowSelection",d))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("enableMultiRowSelection")),1)]),_:2},[r("enableMultiRowSelection")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableMultiRowSelection"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.enableMultiRowSelection??"",placeholder:"如 row.id != 'foo'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[3]||(u[3]=d=>i("enableMultiRowSelection",d))},null,8,["model-value"])]),_:1})])]))}}),Ist={class:"space-y-5"},Pst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Mst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Rst={class:"flex flex-wrap gap-x-8 gap-y-3"},Fst=q({name:"ShwfedTableTextRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=joe(()=>{}),o=d=>Ko(n,d)??d,r=d=>Yo(n,d),a=[{value:"left",label:"左对齐",icon:"fluent:text-align-left-20-regular"},{value:"center",label:"居中",icon:"fluent:text-align-center-20-regular"},{value:"right",label:"右对齐",icon:"fluent:text-align-right-20-regular"}],i=E(()=>(a.find(d=>d.value===(t.value.align??"left"))??a[0]).icon),l=[{value:"plain",label:"文本"},{value:"mono",label:"等宽"}],u=E({get:()=>t.value.copyExpression??"",set:d=>{d===""?delete t.value.copyExpression:t.value.copyExpression=d}});return(d,p)=>(k(),L("div",Ist,[H("div",Pst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":p[0]||(p[0]=m=>t.value.title=m)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":p[1]||(p[1]=m=>t.value.tooltip=m),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",Mst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accessor")),1)]),_:2},[r("accessor")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accessor"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(G1),{modelValue:t.value.accessor,"onUpdate:modelValue":p[2]||(p[2]=m=>t.value.accessor=m),placeholder:"如 row.user.name",class:"font-mono text-xs"},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",size:"xs",title:o("align")},{default:f(()=>[c(s(fe),{icon:i.value},null,8,["icon"])]),_:1},8,["title"])]),_:1}),c(s(zr),{align:"start"},{default:f(()=>[(k(),L(Me,null,Ke(a,m=>c(s(Vo),{key:m.value,onSelect:h=>t.value.align=m.value},{default:f(()=>[c(s(fe),{icon:m.icon},null,8,["icon"]),P(" "+O(m.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1}),c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":p[3]||(p[3]=m=>t.value.size=m)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:p[4]||(p[4]=m=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("copyExpression")),1)]),_:2},[r("copyExpression")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("copyExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:u.value,"onUpdate:modelValue":p[5]||(p[5]=m=>u.value=m),placeholder:"如 row.name 或 row.?name","result-type":["string","optional"],class:"min-h-10"},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayMode")),1)]),_:2},[r("displayMode")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayMode"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.displayMode??"plain","onUpdate:modelValue":p[6]||(p[6]=m=>t.value.displayMode=m)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(l,m=>c(s(Xn),{key:m.value,value:m.value},{default:f(()=>[P(O(m.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1})]),c(s(er)),H("div",Rst,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":p[7]||(p[7]=m=>t.value.enableSorting=m)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),zst={class:"flex flex-col gap-2"},Vst=["data-instruction"],Nst={class:"shrink-0 text-zinc-500"},Lst={key:1,class:"truncate font-medium text-zinc-700"},Bst={class:"truncate text-zinc-700"},Ust={class:"truncate text-xs tabular-nums text-zinc-400"},qst=["onClick"],jst={class:"text-zinc-500"},Hst={key:1,class:"font-medium"},Wst={class:"flex-1"},Gst={key:1,class:"text-xs text-zinc-400"},rx="shwfed-trigger-row",Kst=q({name:"ShwfedTriggersField",__name:"triggers-field",props:{triggers:{}},emits:["update:triggers"],setup(e,{emit:t}){const n=e,o=t;function r(_,w){return`${_}::${w}`}const a=bnt(),i=E(()=>a.value.flatMap(_=>_.operations.map(w=>({key:r(_.instanceId,w.id),target:_.instanceId,operation:w.id,typeName:_.typeName,typeIcon:_.typeIcon,instanceName:_.name,opName:w.name,opIcon:w.icon})))),l=E(()=>{const _=new Map;for(const w of i.value)_.set(w.key,w);return _}),u=E(()=>n.triggers.map(_=>({key:r(_.target,_.operation),trigger:_,option:l.value.get(r(_.target,_.operation))}))),d=E(()=>{const _=new Set(n.triggers.map(w=>r(w.target,w.operation)));return i.value.filter(w=>!_.has(w.key))});function p(_){return[_.typeName,_.instanceName,_.opName].filter(w=>!!w).join(" ")}function m(_){o("update:triggers",[...n.triggers,{target:_.target,operation:_.operation}])}function h(_){o("update:triggers",n.triggers.filter((w,S)=>S!==_))}function g(_,w){if(_===w||_<0||w<0||_>=n.triggers.length||w>=n.triggers.length)return;const S=[...n.triggers],[C]=S.splice(_,1);C&&(S.splice(w,0,C),o("update:triggers",S))}function v(_){if(_.source.kind!==rx||_.target.kind!==rx)return;const w=u.value.findIndex(C=>C.key===_.source.id),S=u.value.findIndex(C=>C.key===_.target.id);w<0||S<0||(_.instruction==="reorder-above"?g(w,w<S?S-1:S):_.instruction==="reorder-below"&&g(w,w<=S?S:S+1))}const b=Zv({onRowDrop:v}),x=_=>_.querySelector(".drag-handle");function y(_){return{kind:rx,canDrop:w=>w.kind===rx,blockInstructions:w=>{const S=["make-child","reparent"];return w.id===_&&S.push("reorder-above","reorder-below"),S},dragHandle:x}}return(_,w)=>(k(),L("div",zst,[(k(!0),L(Me,null,Ke(u.value,(S,C)=>(k(),L("div",{key:S.key,ref_for:!0,ref:s(b).rowRef(S.key,y(S.key)),class:"relative","data-instruction":s(b).instructionFor(S.key)??void 0},[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(fe),{icon:"fluent:re-order-dots-vertical-20-regular",class:"drag-handle size-4 shrink-0 cursor-grab text-zinc-400","aria-label":"拖动排序"})]),_:1}),c(s(rr),{class:"min-w-0 pl-1 flex-1"},{default:f(()=>[S.option?(k(),L(Me,{key:0},[S.option.typeIcon?(k(),M(s(fe),{key:0,icon:S.option.typeIcon,class:"size-4 shrink-0 text-zinc-500"},null,8,["icon"])):ke("",!0),H("span",Nst,O(S.option.typeName),1),S.option.instanceName?(k(),L("span",Lst,"「"+O(S.option.instanceName)+"」",1)):ke("",!0),c(s(fe),{icon:"fluent:arrow-step-in-right-20-regular"}),S.option.opIcon?(k(),M(s(fe),{key:2,icon:S.option.opIcon,class:"size-4 shrink-0 text-zinc-500"},null,8,["icon"])):ke("",!0),H("span",Bst,O(S.option.opName),1)],64)):(k(),L(Me,{key:1},[c(s(fe),{icon:"fluent:warning-20-regular",class:"size-4 shrink-0 text-amber-500"}),w[0]||(w[0]=H("span",{class:"shrink-0 text-amber-600"},"目标已失效",-1)),H("span",Ust,O(S.trigger.target.slice(0,8))+" · "+O(S.trigger.operation),1)],64))]),_:2},1024),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:"destructive",size:"icon-xs","as-child":""},{default:f(()=>[H("button",{type:"button","aria-label":"移除",onClick:$=>h(C)},[c(s(fe),{icon:"fluent:delete-20-regular"})],8,qst)]),_:2},1024)]),_:2},1024)]),_:2},1024)],8,Vst))),128)),d.value.length>0?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"})]),_:1}),c(s(S$),null,{default:f(()=>[c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(d.value,S=>(k(),M(s(ws),{key:S.key,value:p(S),onSelect:C=>m(S)},{default:f(()=>[S.typeIcon?(k(),M(s(fe),{key:0,icon:S.typeIcon,class:"size-4 shrink-0 text-zinc-500"},null,8,["icon"])):ke("",!0),H("span",jst,O(S.typeName),1),S.instanceName?(k(),L("span",Hst,"「"+O(S.instanceName)+"」",1)):ke("",!0),w[1]||(w[1]=H("span",{class:"text-zinc-400"},":",-1)),H("span",Wst,O(S.opName),1)]),_:2},1032,["value","onSelect"]))),128))]),_:1})]),_:1})]),_:1})):u.value.length===0?(k(),L("p",Gst," 当前位置没有可触发的祖先组件。 ")):ke("",!0)]))}}),O$=sp(Kst,[["__scopeId","data-v-26c6c33b"]]),Yst={class:"space-y-5"},Jst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Xst={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Zst={class:"flex flex-wrap gap-x-8 gap-y-3"},Qst=q({name:"ShwfedTableSwitchRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Hoe(()=>{}),o=b=>Ko(n,b)??b,r=b=>Yo(n,b),a=[{value:"left",label:"左对齐",icon:"fluent:text-align-left-20-regular"},{value:"center",label:"居中",icon:"fluent:text-align-center-20-regular"},{value:"right",label:"右对齐",icon:"fluent:text-align-right-20-regular"}],i=E(()=>(a.find(b=>b.value===(t.value.align??"center"))??a[1]).icon),l={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}},u={...l,value:{type:"bool",label:"切换后的新值"}},d={json:{type:"dyn",label:"HTTP 响应体"}},p=E({get:()=>t.value.disabled??"",set:b=>{b===""?delete t.value.disabled:t.value.disabled=b}}),m=E({get:()=>t.value.onChange??"",set:b=>{b===""?delete t.value.onChange:t.value.onChange=b}}),h=E({get:()=>t.value.successMessage??"",set:b=>{b===""?delete t.value.successMessage:t.value.successMessage=b}}),g=E(()=>t.value.triggers??[]);function v(b){b.length===0?delete t.value.triggers:t.value.triggers=b}return(b,x)=>(k(),L("div",Yst,[H("div",Jst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":x[0]||(x[0]=y=>t.value.title=y)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":x[1]||(x[1]=y=>t.value.tooltip=y),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",Xst,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accessor")),1)]),_:2},[r("accessor")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accessor"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:t.value.accessor,"onUpdate:modelValue":x[2]||(x[2]=y=>t.value.accessor=y),placeholder:"如 row.enabled","result-type":"bool","extra-vars":l},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",size:"xs",title:o("align")},{default:f(()=>[c(s(fe),{icon:i.value},null,8,["icon"])]),_:1},8,["title"])]),_:1}),c(s(zr),{align:"start"},{default:f(()=>[(k(),L(Me,null,Ke(a,y=>c(s(Vo),{key:y.value,onSelect:_=>t.value.align=y.value},{default:f(()=>[c(s(fe),{icon:y.icon},null,8,["icon"]),P(" "+O(y.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1}),c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":x[3]||(x[3]=y=>t.value.size=y)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:x[4]||(x[4]=y=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("disabled")),1)]),_:2},[r("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:p.value,"onUpdate:modelValue":x[5]||(x[5]=y=>p.value=y),placeholder:"如 row.locked","result-type":"bool","extra-vars":l},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("onChange")),1)]),_:2},[r("onChange")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("onChange"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:m.value,"onUpdate:modelValue":x[6]||(x[6]=y=>m.value=y),placeholder:"如 http.post('/api/items/' + row.id).body({ enabled: value })","result-type":"HttpRequest","extra-vars":u,multiline:""},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("successMessage")),1)]),_:2},[r("successMessage")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("successMessage"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:h.value,"onUpdate:modelValue":x[7]||(x[7]=y=>h.value=y),placeholder:"如 '已更新'","result-type":"string","extra-vars":d},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("triggers")),1)]),_:2},[r("triggers")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("triggers"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(O$,{triggers:g.value,"onUpdate:triggers":v},null,8,["triggers"])]),_:1})]),c(s(er)),H("div",Zst,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":x[8]||(x[8]=y=>t.value.enableSorting=y)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),elt={class:"space-y-5"},tlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},nlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},olt={class:"flex flex-wrap gap-x-8 gap-y-3"},rlt=q({name:"ShwfedTableSwitchRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Koe(()=>{}),o=b=>Ko(n,b)??b,r=b=>Yo(n,b),a=[{value:"left",label:"左对齐",icon:"fluent:text-align-left-20-regular"},{value:"center",label:"居中",icon:"fluent:text-align-center-20-regular"},{value:"right",label:"右对齐",icon:"fluent:text-align-right-20-regular"}],i=E(()=>(a.find(b=>b.value===(t.value.align??"center"))??a[1]).icon),l={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}},u={...l,value:{type:"bool",label:"切换后的新值"}},d={json:{type:"dyn",label:"HTTP 响应体"}},p=E({get:()=>t.value.disabled??"",set:b=>{b===""?delete t.value.disabled:t.value.disabled=b}}),m=E({get:()=>t.value.onChange??"",set:b=>{b===""?delete t.value.onChange:t.value.onChange=b}}),h=E({get:()=>t.value.successMessage??"",set:b=>{b===""?delete t.value.successMessage:t.value.successMessage=b}}),g=E(()=>t.value.triggers??[]);function v(b){b.length===0?delete t.value.triggers:t.value.triggers=b}return(b,x)=>(k(),L("div",elt,[H("div",tlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":x[0]||(x[0]=y=>t.value.title=y)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":x[1]||(x[1]=y=>t.value.tooltip=y),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",nlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accessor")),1)]),_:2},[r("accessor")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accessor"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:t.value.accessor,"onUpdate:modelValue":x[2]||(x[2]=y=>t.value.accessor=y),placeholder:"如 row.enabled","result-type":"bool","extra-vars":l},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",size:"xs",title:o("align")},{default:f(()=>[c(s(fe),{icon:i.value},null,8,["icon"])]),_:1},8,["title"])]),_:1}),c(s(zr),{align:"start"},{default:f(()=>[(k(),L(Me,null,Ke(a,y=>c(s(Vo),{key:y.value,onSelect:_=>t.value.align=y.value},{default:f(()=>[c(s(fe),{icon:y.icon},null,8,["icon"]),P(" "+O(y.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1}),c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":x[3]||(x[3]=y=>t.value.size=y)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:x[4]||(x[4]=y=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("disabled")),1)]),_:2},[r("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:p.value,"onUpdate:modelValue":x[5]||(x[5]=y=>p.value=y),placeholder:"如 row.locked","result-type":"bool","extra-vars":l},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("onChange")),1)]),_:2},[r("onChange")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("onChange"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:m.value,"onUpdate:modelValue":x[6]||(x[6]=y=>m.value=y),placeholder:"如 http.post('/api/items/' + row.id).body({ enabled: value })","result-type":"HttpRequest","extra-vars":u,multiline:""},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("successMessage")),1)]),_:2},[r("successMessage")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("successMessage"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:h.value,"onUpdate:modelValue":x[7]||(x[7]=y=>h.value=y),placeholder:"如 '已更新'","result-type":"string","extra-vars":d},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("triggers")),1)]),_:2},[r("triggers")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("triggers"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(O$,{triggers:g.value,"onUpdate:triggers":v},null,8,["triggers"])]),_:1})]),c(s(er)),H("div",olt,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":x[8]||(x[8]=y=>t.value.enableSorting=y)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),gr=q({name:"ShwfedDerivedValueEditor",__name:"DerivedValueEditor",props:{modelValue:{},resultType:{},placeholder:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r={formula:"fluent:calculator-20-regular",prefill:"fluent:sparkle-20-regular"},a=re(n.modelValue?.mode??"formula");Xe(()=>n.modelValue?.mode,p=>{p&&(a.value=p)});const i=E(()=>n.modelValue?.expression??"");function l(p,m){o("update:modelValue",m.length>0?{mode:p,expression:m}:void 0)}function u(p){l(a.value,p)}function d(p){a.value=p,l(p,i.value)}return(p,m)=>(k(),M(s(qe),{"model-value":i.value,"result-type":e.resultType,placeholder:e.placeholder,class:"min-h-10","onUpdate:modelValue":u},{leading:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"xs",class:"gap-1 text-zinc-600"},{default:f(()=>[c(s(fe),{icon:r[a.value]},null,8,["icon"]),P(" "+O(s(KL)[a.value])+" ",1),c(s(fe),{icon:"fluent:chevron-down-20-regular",class:"text-zinc-400"})]),_:1})]),_:1}),c(s(zr),{align:"start"},{default:f(()=>[(k(!0),L(Me,null,Ke(s(ine),h=>(k(),M(s(Vo),{key:h,onSelect:g=>d(h)},{default:f(()=>[c(s(fe),{icon:r[h]},null,8,["icon"]),P(" "+O(s(KL)[h]),1)]),_:2},1032,["onSelect"]))),128))]),_:1})]),_:1})]),_:1},8,["model-value","result-type","placeholder"]))}}),alt={class:"space-y-5"},ilt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},slt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},llt={class:"flex flex-col gap-3"},ult={type:"button","data-slot":"combobox-single-item-kind-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5","aria-label":"切换值类型"},clt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},dlt={class:"flex flex-wrap gap-x-8 gap-y-3"},flt=q({name:"ShwfedTableComboboxSingleRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=tre(()=>{}),o=A=>Ko(n,A)??A,r=A=>Yo(n,A),a=a4(()=>{}),i=A=>Ko(a,A)??A,l=A=>Yo(a,A),u={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}},d=E({get:()=>t.value.binding??"",set:A=>{const I=A.trim();if(I===""){const{binding:U,...j}=t.value;t.value=j}else t.value={...t.value,binding:I}}}),p=E({get:()=>t.value.hidden??"",set:A=>{if(A===""){const{hidden:I,...U}=t.value;t.value=U}else t.value={...t.value,hidden:A}}}),m=E({get:()=>t.value.disabled??"",set:A=>{if(A===""){const{disabled:I,...U}=t.value;t.value=U}else t.value={...t.value,disabled:A}}}),h=E({get:()=>t.value.readonly??"",set:A=>{if(A===""){const{readonly:I,...U}=t.value;t.value=U}else t.value={...t.value,readonly:A}}}),g=E({get:()=>t.value.derived,set:A=>{if(A==null){const{derived:I,...U}=t.value;t.value=U}else t.value={...t.value,derived:A}}}),v=E(()=>t.value.items??[]);function b(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,A=>{const I=Math.random()*16|0;return(A==="x"?I:I&3|8).toString(16)})}function x(){return{id:b(),label:[{locale:"zh",message:""}],value:{kind:"text",value:""}}}function y(A,I){const U=[...t.value.items??[]],j=U[A];j&&(U[A]={...j,...I},t.value={...t.value,items:U})}function _(){t.value={...t.value,items:[...t.value.items??[],x()]}}function w(A){const I=[...t.value.items??[]];I.splice(A,1),t.value={...t.value,items:I}}function S(A,I){const U=t.value.items?.[A];!U||U.value.kind===I||y(A,{value:I==="text"?{kind:"text",value:""}:{kind:"number",value:0}})}function C(A,I){y(A,{value:{kind:"text",value:I}})}function $(A,I){y(A,{value:{kind:"number",value:typeof I=="number"&&Number.isFinite(I)?I:0}})}function T(A,I){y(A,{label:I})}function D(A,I){if(!I||I.every(j=>j.message.trim().length===0)){const j=t.value.items?.[A];if(!j)return;const{tooltip:Q,...F}=j,R=[...t.value.items??[]];R[A]=F,t.value={...t.value,items:R}}else y(A,{tooltip:I})}return(A,I)=>(k(),L("div",alt,[H("div",ilt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":I[0]||(I[0]=U=>t.value.title=U)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":I[1]||(I[1]=U=>t.value.tooltip=U),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",slt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("binding")),1)]),_:2},[r("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:d.value,"onUpdate:modelValue":I[2]||(I[2]=U=>d.value=U),placeholder:"例:role",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.placeholder,"onUpdate:modelValue":I[3]||(I[3]=U=>t.value.placeholder=U)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":I[4]||(I[4]=U=>t.value={...t.value,size:U})},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:I[5]||(I[5]=U=>t.value={...t.value,grow:!t.value.grow})},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"下拉框可选项列表",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("items")),1)]),_:1}),H("div",llt,[(k(!0),L(Me,null,Ke(v.value,(U,j)=>(k(),L("div",{key:U.id,"data-slot":"combobox-single-item",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"combobox-single-item-delete","aria-label":"删除选项",class:"absolute right-2 top-2 z-10",onClick:Q=>w(j)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"combobox option label","model-value":U.label,"onUpdate:modelValue":Q=>T(j,Q)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"icon-sm","as-child":""},{default:f(()=>[H("button",ult,[c(s(fe),{icon:U.value.kind==="number"?"fluent:number-symbol-20-regular":"fluent:textbox-20-regular"},null,8,["icon"])])]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[c(s(Vo),{onSelect:Q=>S(j,"text")},{default:f(()=>[c(s(fe),{icon:"fluent:textbox-20-regular"}),I[11]||(I[11]=H("span",null,"文本",-1))]),_:1},8,["onSelect"]),c(s(Vo),{onSelect:Q=>S(j,"number")},{default:f(()=>[c(s(fe),{icon:"fluent:number-symbol-20-regular"}),I[12]||(I[12]=H("span",null,"数字",-1))]),_:1},8,["onSelect"])]),_:2},1024)]),_:2},1024)]),_:2},1024),U.value.kind==="text"?(k(),M(s(mt),{key:0,"model-value":U.value.value,placeholder:"例:admin","onUpdate:modelValue":Q=>C(j,String(Q??""))},null,8,["model-value","onUpdate:modelValue"])):(k(),M(s(wn),{key:1,"model-value":U.value.value,"onUpdate:modelValue":Q=>$(j,Q)},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1024)]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("tooltip")),1)]),_:2},[l("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"combobox option tooltip","model-value":U.tooltip,"onUpdate:modelValue":Q=>D(j,Q)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"combobox-single-add-item",class:"w-full justify-center",onClick:_},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),I[13]||(I[13]=H("span",null,"增加选项",-1))]),_:1})])]),_:1}),H("div",clt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("hidden")),1)]),_:2},[r("hidden")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("hidden"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:p.value,"onUpdate:modelValue":I[6]||(I[6]=U=>p.value=U),placeholder:"例:row.archived","result-type":"bool","extra-vars":u},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("disabled")),1)]),_:2},[r("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:m.value,"onUpdate:modelValue":I[7]||(I[7]=U=>m.value=U),placeholder:"例:row.locked","result-type":"bool","extra-vars":u},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("readonly")),1)]),_:2},[r("readonly")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("readonly"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:h.value,"onUpdate:modelValue":I[8]||(I[8]=U=>h.value=U),placeholder:"例:row.id != null","result-type":"bool","extra-vars":u},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical",class:"col-span-2"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("derived")),1)]),_:2},[r("derived")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(gr,{modelValue:g.value,"onUpdate:modelValue":I[9]||(I[9]=U=>g.value=U),"result-type":"dyn",placeholder:"例:form.defaults[row.kind]"},null,8,["modelValue"])]),_:1})]),c(s(er)),H("div",dlt,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":I[10]||(I[10]=U=>t.value={...t.value,enableSorting:U})},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),plt={class:"space-y-5"},mlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},hlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},glt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},vlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},ylt={class:"flex flex-wrap gap-x-8 gap-y-3"},blt=q({name:"ShwfedTableNumberInputRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=rre(()=>{}),o=y=>Ko(n,y)??y,r=y=>Yo(n,y),a={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}},i=[{value:"round",label:"四舍五入"},{value:"floor",label:"向下取整"},{value:"ceil",label:"向上取整"}],l=E({get:()=>t.value.binding??"",set:y=>{const _=y.trim();_===""?delete t.value.binding:t.value.binding=_}}),u=E({get:()=>t.value.hidden??"",set:y=>{y===""?delete t.value.hidden:t.value.hidden=y}}),d=E({get:()=>t.value.disabled??"",set:y=>{y===""?delete t.value.disabled:t.value.disabled=y}}),p=E({get:()=>t.value.readonly??"",set:y=>{y===""?delete t.value.readonly:t.value.readonly=y}}),m=E({get:()=>t.value.derived,set:y=>{y==null?delete t.value.derived:t.value.derived=y}}),h=E(()=>i.find(y=>y.value===(t.value.roundingMode??"round"))?.label);function g(y){y===void 0?(delete t.value.precision,delete t.value.roundingMode):(t.value.precision=y,t.value.roundingMode===void 0&&(t.value.roundingMode="round"))}function v(y){t.value.roundingMode=y}function b(y){y===void 0||!(y>0)?delete t.value.step:t.value.step=y}function x(y){y?t.value.valueAsString=!0:delete t.value.valueAsString}return(y,_)=>(k(),L("div",plt,[H("div",mlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":_[0]||(_[0]=w=>t.value.title=w)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":_[1]||(_[1]=w=>t.value.tooltip=w),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",hlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("binding")),1)]),_:2},[r("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:l.value,"onUpdate:modelValue":_[2]||(_[2]=w=>l.value=w),placeholder:"例:age",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.placeholder,"onUpdate:modelValue":_[3]||(_[3]=w=>t.value.placeholder=w)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":_[4]||(_[4]=w=>t.value.size=w)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:_[5]||(_[5]=w=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("precision")),1)]),_:2},[r("precision")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("precision"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.precision,min:0,"onUpdate:modelValue":g},null,8,["model-value"]),t.value.precision!==void 0?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"pr-1.5! text-xs"},{default:f(()=>[P(O(h.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[(k(),L(Me,null,Ke(i,w=>c(s(Vo),{key:w.value,onSelect:S=>v(w.value)},{default:f(()=>[P(O(w.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("step")),1)]),_:2},[r("step")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("step"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.step,min:0,"onUpdate:modelValue":b},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("valueAsString")),1)]),_:2},[r("valueAsString")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("valueAsString"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",null,[c(s(Lo),{"model-value":t.value.valueAsString??!1,"onUpdate:modelValue":x},null,8,["model-value"])])]),_:1})]),H("div",glt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("min")),1)]),_:2},[r("min")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("min"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.min??"",placeholder:"例:0","result-type":"number",class:"min-h-10","extra-vars":a,"onUpdate:modelValue":_[6]||(_[6]=w=>{w.length>0?t.value.min=w:delete t.value.min})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("max")),1)]),_:2},[r("max")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("max"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.max??"",placeholder:"例:100","result-type":"number",class:"min-h-10","extra-vars":a,"onUpdate:modelValue":_[7]||(_[7]=w=>{w.length>0?t.value.max=w:delete t.value.max})},null,8,["model-value"])]),_:1})]),H("div",vlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("hidden")),1)]),_:2},[r("hidden")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("hidden"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:u.value,"onUpdate:modelValue":_[8]||(_[8]=w=>u.value=w),placeholder:"例:row.archived","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("disabled")),1)]),_:2},[r("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:d.value,"onUpdate:modelValue":_[9]||(_[9]=w=>d.value=w),placeholder:"例:row.locked","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("readonly")),1)]),_:2},[r("readonly")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("readonly"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:p.value,"onUpdate:modelValue":_[10]||(_[10]=w=>p.value=w),placeholder:"例:row.id != null","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical",class:"col-span-2"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("derived")),1)]),_:2},[r("derived")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(gr,{modelValue:m.value,"onUpdate:modelValue":_[11]||(_[11]=w=>m.value=w),"result-type":"number",placeholder:"例:row.unitPrice * row.quantity"},null,8,["modelValue"])]),_:1})]),c(s(er)),H("div",ylt,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":_[12]||(_[12]=w=>t.value.enableSorting=w)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),_lt={class:"space-y-5"},xlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},wlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Slt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},klt={class:"flex flex-wrap gap-x-8 gap-y-3"},Clt=q({name:"ShwfedTableSwitchRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=are(()=>{}),o=m=>Ko(n,m)??m,r=m=>Yo(n,m),a={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}},i=E({get:()=>t.value.binding??"",set:m=>{const h=m.trim();h===""?delete t.value.binding:t.value.binding=h}}),l=E({get:()=>t.value.hidden??"",set:m=>{m===""?delete t.value.hidden:t.value.hidden=m}}),u=E({get:()=>t.value.disabled??"",set:m=>{m===""?delete t.value.disabled:t.value.disabled=m}}),d=E({get:()=>t.value.readonly??"",set:m=>{m===""?delete t.value.readonly:t.value.readonly=m}}),p=E({get:()=>t.value.derived,set:m=>{m==null?delete t.value.derived:t.value.derived=m}});return(m,h)=>(k(),L("div",_lt,[H("div",xlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":h[0]||(h[0]=g=>t.value.title=g)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":h[1]||(h[1]=g=>t.value.tooltip=g),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",wlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("binding")),1)]),_:2},[r("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":h[2]||(h[2]=g=>i.value=g),placeholder:"例:enabled",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":h[3]||(h[3]=g=>t.value.size=g)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:h[4]||(h[4]=g=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("trueLabel")),1)]),_:2},[r("trueLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("trueLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.trueLabel,"onUpdate:modelValue":h[5]||(h[5]=g=>t.value.trueLabel=g)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("falseLabel")),1)]),_:2},[r("falseLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("falseLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.falseLabel,"onUpdate:modelValue":h[6]||(h[6]=g=>t.value.falseLabel=g)},null,8,["modelValue"])]),_:1})]),H("div",Slt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("hidden")),1)]),_:2},[r("hidden")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("hidden"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:l.value,"onUpdate:modelValue":h[7]||(h[7]=g=>l.value=g),placeholder:"例:row.archived","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("disabled")),1)]),_:2},[r("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:u.value,"onUpdate:modelValue":h[8]||(h[8]=g=>u.value=g),placeholder:"例:row.locked","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("readonly")),1)]),_:2},[r("readonly")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("readonly"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:d.value,"onUpdate:modelValue":h[9]||(h[9]=g=>d.value=g),placeholder:"例:row.id != null","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical",class:"col-span-2"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("derived")),1)]),_:2},[r("derived")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(gr,{modelValue:p.value,"onUpdate:modelValue":h[10]||(h[10]=g=>p.value=g),"result-type":"bool",placeholder:"例:row.quantity > 0"},null,8,["modelValue"])]),_:1})]),c(s(er)),H("div",klt,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":h[11]||(h[11]=g=>t.value.enableSorting=g)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),$lt={class:"space-y-5"},Tlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Elt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Dlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Olt={class:"flex flex-wrap gap-x-8 gap-y-3"},Alt=q({name:"ShwfedTableSwitchRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=lre(()=>{}),o=m=>Ko(n,m)??m,r=m=>Yo(n,m),a={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}},i=E({get:()=>t.value.binding??"",set:m=>{const h=m.trim();h===""?delete t.value.binding:t.value.binding=h}}),l=E({get:()=>t.value.hidden??"",set:m=>{m===""?delete t.value.hidden:t.value.hidden=m}}),u=E({get:()=>t.value.disabled??"",set:m=>{m===""?delete t.value.disabled:t.value.disabled=m}}),d=E({get:()=>t.value.readonly??"",set:m=>{m===""?delete t.value.readonly:t.value.readonly=m}}),p=E({get:()=>t.value.derived,set:m=>{m==null?delete t.value.derived:t.value.derived=m}});return(m,h)=>(k(),L("div",$lt,[H("div",Tlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":h[0]||(h[0]=g=>t.value.title=g)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":h[1]||(h[1]=g=>t.value.tooltip=g),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",Elt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("binding")),1)]),_:2},[r("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":h[2]||(h[2]=g=>i.value=g),placeholder:"例:enabled",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":h[3]||(h[3]=g=>t.value.size=g)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:h[4]||(h[4]=g=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("trueLabel")),1)]),_:2},[r("trueLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("trueLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.trueLabel,"onUpdate:modelValue":h[5]||(h[5]=g=>t.value.trueLabel=g)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("falseLabel")),1)]),_:2},[r("falseLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("falseLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.falseLabel,"onUpdate:modelValue":h[6]||(h[6]=g=>t.value.falseLabel=g)},null,8,["modelValue"])]),_:1})]),H("div",Dlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("hidden")),1)]),_:2},[r("hidden")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("hidden"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:l.value,"onUpdate:modelValue":h[7]||(h[7]=g=>l.value=g),placeholder:"例:row.archived","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("disabled")),1)]),_:2},[r("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:u.value,"onUpdate:modelValue":h[8]||(h[8]=g=>u.value=g),placeholder:"例:row.locked","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("readonly")),1)]),_:2},[r("readonly")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("readonly"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:d.value,"onUpdate:modelValue":h[9]||(h[9]=g=>d.value=g),placeholder:"例:row.id != null","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical",class:"col-span-2"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("derived")),1)]),_:2},[r("derived")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(gr,{modelValue:p.value,"onUpdate:modelValue":h[10]||(h[10]=g=>p.value=g),"result-type":"bool",placeholder:"例:row.quantity > 0"},null,8,["modelValue"])]),_:1})]),c(s(er)),H("div",Olt,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":h[11]||(h[11]=g=>t.value.enableSorting=g)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),Ilt={class:"space-y-5"},Plt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Mlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Rlt={class:"flex flex-wrap gap-x-8 gap-y-3"},Flt=q({name:"ShwfedTableTextInputRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=dre(()=>{}),o=m=>Ko(n,m)??m,r=m=>Yo(n,m),a={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}},i=E({get:()=>t.value.binding??"",set:m=>{const h=m.trim();h===""?delete t.value.binding:t.value.binding=h}}),l=E({get:()=>t.value.hidden??"",set:m=>{m===""?delete t.value.hidden:t.value.hidden=m}}),u=E({get:()=>t.value.disabled??"",set:m=>{m===""?delete t.value.disabled:t.value.disabled=m}}),d=E({get:()=>t.value.readonly??"",set:m=>{m===""?delete t.value.readonly:t.value.readonly=m}}),p=E({get:()=>t.value.derived,set:m=>{m==null?delete t.value.derived:t.value.derived=m}});return(m,h)=>(k(),L("div",Ilt,[H("div",Plt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":h[0]||(h[0]=g=>t.value.title=g)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":h[1]||(h[1]=g=>t.value.tooltip=g),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",Mlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("binding")),1)]),_:2},[r("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":h[2]||(h[2]=g=>i.value=g),placeholder:"例:name",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.placeholder,"onUpdate:modelValue":h[3]||(h[3]=g=>t.value.placeholder=g)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":h[4]||(h[4]=g=>t.value.size=g)},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:h[5]||(h[5]=g=>t.value.grow=!t.value.grow)},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("hidden")),1)]),_:2},[r("hidden")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("hidden"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:l.value,"onUpdate:modelValue":h[6]||(h[6]=g=>l.value=g),placeholder:"例:row.archived","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("disabled")),1)]),_:2},[r("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:u.value,"onUpdate:modelValue":h[7]||(h[7]=g=>u.value=g),placeholder:"例:row.locked","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("readonly")),1)]),_:2},[r("readonly")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("readonly"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:d.value,"onUpdate:modelValue":h[8]||(h[8]=g=>d.value=g),placeholder:"例:row.id != null","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical",class:"col-span-2"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("derived")),1)]),_:2},[r("derived")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(gr,{modelValue:p.value,"onUpdate:modelValue":h[9]||(h[9]=g=>p.value=g),"result-type":"string",placeholder:"例:string(row.first) + ' ' + string(row.last)"},null,8,["modelValue"])]),_:1})]),c(s(er)),H("div",Rlt,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":h[10]||(h[10]=g=>t.value.enableSorting=g)},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),zlt={class:"text-xs text-zinc-500"},Vlt=q({name:"ShwfedTableDragHandleRendererConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){return Ot(e,"modelValue"),(t,n)=>(k(),L("p",zlt," 本列无可配置项。 "))}}),Nlt={class:"space-y-5"},Llt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Blt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Ult={class:"grid grid-cols-2 gap-x-6 gap-y-4"},qlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},jlt={class:"flex flex-wrap gap-x-8 gap-y-3"},Hlt=q({name:"ShwfedTableComboboxSingleRemoteOptionsRemoteConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=hre(()=>{}),o=_=>Ko(n,_)??_,r=_=>Yo(n,_),a={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}},i={...a,json:{type:"dyn",label:"HTTP 响应体(已解析 JSON)"}},l={...a,option:{type:"dyn",label:"当前选项"}},u={...a,value:{type:"dyn",label:"用户选中的新值(清空时为 null)"}},d={json:{type:"dyn",label:"HTTP 响应体"}};function p(_){return E({get:()=>t.value[_]??"",set:w=>{if(w===""){const{[_]:S,...C}=t.value;t.value=C}else t.value={...t.value,[_]:w}}})}const m=p("hidden"),h=p("disabled"),g=p("readonly"),v=p("onChange"),b=p("successMessage"),x=E(()=>t.value.triggers??[]);function y(_){if(_.length===0){const{triggers:w,...S}=t.value;t.value=S}else t.value={...t.value,triggers:[..._]}}return(_,w)=>(k(),L("div",Nlt,[H("div",Llt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":w[0]||(w[0]=S=>t.value.title=S)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":w[1]||(w[1]=S=>t.value.tooltip=S),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",Blt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accessor")),1)]),_:2},[r("accessor")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accessor"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:t.value.accessor,"onUpdate:modelValue":w[2]||(w[2]=S=>t.value.accessor=S),placeholder:"如 row.role","result-type":"dyn","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.placeholder,"onUpdate:modelValue":w[3]||(w[3]=S=>t.value.placeholder=S)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":w[4]||(w[4]=S=>t.value={...t.value,size:S})},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:w[5]||(w[5]=S=>t.value={...t.value,grow:!t.value.grow})},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1})]),H("div",Ult,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("request")),1)]),_:2},[r("request")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("request"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:t.value.request,"onUpdate:modelValue":w[6]||(w[6]=S=>t.value.request=S),placeholder:"如 http.get('/api/roles')","result-type":"HttpRequest","extra-vars":a,multiline:""},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("options")),1)]),_:2},[r("options")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("options"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:t.value.options,"onUpdate:modelValue":w[7]||(w[7]=S=>t.value.options=S),placeholder:"如 json.data","result-type":"dyn","extra-vars":i,multiline:""},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("optionValue")),1)]),_:2},[r("optionValue")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("optionValue"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:t.value.optionValue,"onUpdate:modelValue":w[8]||(w[8]=S=>t.value.optionValue=S),placeholder:"如 option.id","result-type":"dyn","extra-vars":l},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("optionLabel")),1)]),_:2},[r("optionLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("optionLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.optionLabel,"onUpdate:modelValue":w[9]||(w[9]=S=>t.value.optionLabel=S),markdown:"","translate-hint":"combobox option label"},null,8,["modelValue"])]),_:1})]),H("div",qlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("hidden")),1)]),_:2},[r("hidden")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("hidden"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:s(m),"onUpdate:modelValue":w[10]||(w[10]=S=>jn(m)?m.value=S:null),placeholder:"例:row.archived","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("disabled")),1)]),_:2},[r("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:s(h),"onUpdate:modelValue":w[11]||(w[11]=S=>jn(h)?h.value=S:null),placeholder:"例:row.locked","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("readonly")),1)]),_:2},[r("readonly")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("readonly"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:s(g),"onUpdate:modelValue":w[12]||(w[12]=S=>jn(g)?g.value=S:null),placeholder:"例:row.id == null","result-type":"bool","extra-vars":a},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("onChange")),1)]),_:2},[r("onChange")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("onChange"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:s(v),"onUpdate:modelValue":w[13]||(w[13]=S=>jn(v)?v.value=S:null),placeholder:"如 http.patch('/api/items/' + row.id).body({ role: value })","result-type":"HttpRequest","extra-vars":u,multiline:""},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("successMessage")),1)]),_:2},[r("successMessage")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("successMessage"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:s(b),"onUpdate:modelValue":w[14]||(w[14]=S=>jn(b)?b.value=S:null),placeholder:"如 '已更新'","result-type":"string","extra-vars":d},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("triggers")),1)]),_:2},[r("triggers")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("triggers"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(O$,{triggers:x.value,"onUpdate:triggers":y},null,8,["triggers"])]),_:1})]),c(s(er)),H("div",jlt,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":w[15]||(w[15]=S=>t.value={...t.value,enableSorting:S})},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),Wlt={class:"space-y-5"},Glt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Klt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Ylt={class:"flex flex-col gap-3"},Jlt={type:"button","data-slot":"combobox-single-item-kind-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5","aria-label":"切换值类型"},Xlt={class:"grid grid-cols-2 gap-x-6 gap-y-4"},Zlt={class:"flex flex-wrap gap-x-8 gap-y-3"},Qlt=q({name:"ShwfedTableComboboxSingleRemoteOptionsStaticConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=yre(()=>{}),o=Q=>Ko(n,Q)??Q,r=Q=>Yo(n,Q),a=l4(()=>{}),i=Q=>Ko(a,Q)??Q,l=Q=>Yo(a,Q),u={row:{type:"dyn",label:"当前行数据"},index:{type:"number",label:"行索引"}},d={...u,value:{type:"dyn",label:"用户选中的新值(清空时为 null)"}},p={json:{type:"dyn",label:"HTTP 响应体"}},m=E({get:()=>t.value.hidden??"",set:Q=>{if(Q===""){const{hidden:F,...R}=t.value;t.value=R}else t.value={...t.value,hidden:Q}}}),h=E({get:()=>t.value.disabled??"",set:Q=>{if(Q===""){const{disabled:F,...R}=t.value;t.value=R}else t.value={...t.value,disabled:Q}}}),g=E({get:()=>t.value.readonly??"",set:Q=>{if(Q===""){const{readonly:F,...R}=t.value;t.value=R}else t.value={...t.value,readonly:Q}}}),v=E({get:()=>t.value.onChange??"",set:Q=>{if(Q===""){const{onChange:F,...R}=t.value;t.value=R}else t.value={...t.value,onChange:Q}}}),b=E({get:()=>t.value.successMessage??"",set:Q=>{if(Q===""){const{successMessage:F,...R}=t.value;t.value=R}else t.value={...t.value,successMessage:Q}}}),x=E(()=>t.value.triggers??[]);function y(Q){if(Q.length===0){const{triggers:F,...R}=t.value;t.value=R}else t.value={...t.value,triggers:[...Q]}}const _=E(()=>t.value.items??[]);function w(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,Q=>{const F=Math.random()*16|0;return(Q==="x"?F:F&3|8).toString(16)})}function S(){return{id:w(),label:[{locale:"zh",message:""}],value:{kind:"text",value:""}}}function C(Q,F){const R=[...t.value.items??[]],G=R[Q];G&&(R[Q]={...G,...F},t.value={...t.value,items:R})}function $(){t.value={...t.value,items:[...t.value.items??[],S()]}}function T(Q){const F=[...t.value.items??[]];F.splice(Q,1),t.value={...t.value,items:F}}function D(Q,F){const R=t.value.items?.[Q];!R||R.value.kind===F||C(Q,{value:F==="text"?{kind:"text",value:""}:{kind:"number",value:0}})}function A(Q,F){C(Q,{value:{kind:"text",value:F}})}function I(Q,F){C(Q,{value:{kind:"number",value:typeof F=="number"&&Number.isFinite(F)?F:0}})}function U(Q,F){C(Q,{label:F})}function j(Q,F){if(!F||F.every(G=>G.message.trim().length===0)){const G=t.value.items?.[Q];if(!G)return;const{tooltip:Z,...Y}=G,he=[...t.value.items??[]];he[Q]=Y,t.value={...t.value,items:he}}else C(Q,{tooltip:F})}return(Q,F)=>(k(),L("div",Wlt,[H("div",Glt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("title")),1)]),_:2},[r("title")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("title"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.title,"onUpdate:modelValue":F[0]||(F[0]=R=>t.value.title=R)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.tooltip,"onUpdate:modelValue":F[1]||(F[1]=R=>t.value.tooltip=R),markdown:""},null,8,["modelValue"])]),_:1})]),H("div",Klt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accessor")),1)]),_:2},[r("accessor")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accessor"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:t.value.accessor,"onUpdate:modelValue":F[2]||(F[2]=R=>t.value.accessor=R),placeholder:"如 row.role","result-type":"dyn","extra-vars":u},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{modelValue:t.value.placeholder,"onUpdate:modelValue":F[3]||(F[3]=R=>t.value.placeholder=R)},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("size")),1)]),_:2},[r("size")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("size"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.size,disabled:t.value.grow,min:0,"onUpdate:modelValue":F[4]||(F[4]=R=>t.value={...t.value,size:R})},null,8,["model-value","disabled"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{variant:t.value.grow?"primary":"ghost",size:"xs",onClick:F[5]||(F[5]=R=>t.value={...t.value,grow:!t.value.grow})},{default:f(()=>[c(s(fe),{icon:t.value.grow?"fluent:lock-closed-20-regular":"fluent:arrow-autofit-width-20-regular"},null,8,["icon"]),P(" "+O(o("grow")),1)]),_:1},8,["variant"])]),_:1})]),_:1})]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"下拉框可选项列表",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("items")),1)]),_:1}),H("div",Ylt,[(k(!0),L(Me,null,Ke(_.value,(R,G)=>(k(),L("div",{key:R.id,"data-slot":"combobox-single-item",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"combobox-single-item-delete","aria-label":"删除选项",class:"absolute right-2 top-2 z-10",onClick:Z=>T(G)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"combobox option label","model-value":R.label,"onUpdate:modelValue":Z=>U(G,Z)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"icon-sm","as-child":""},{default:f(()=>[H("button",Jlt,[c(s(fe),{icon:R.value.kind==="number"?"fluent:number-symbol-20-regular":"fluent:textbox-20-regular"},null,8,["icon"])])]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[c(s(Vo),{onSelect:Z=>D(G,"text")},{default:f(()=>[c(s(fe),{icon:"fluent:textbox-20-regular"}),F[12]||(F[12]=H("span",null,"文本",-1))]),_:1},8,["onSelect"]),c(s(Vo),{onSelect:Z=>D(G,"number")},{default:f(()=>[c(s(fe),{icon:"fluent:number-symbol-20-regular"}),F[13]||(F[13]=H("span",null,"数字",-1))]),_:1},8,["onSelect"])]),_:2},1024)]),_:2},1024)]),_:2},1024),R.value.kind==="text"?(k(),M(s(mt),{key:0,"model-value":R.value.value,placeholder:"例:admin","onUpdate:modelValue":Z=>A(G,String(Z??""))},null,8,["model-value","onUpdate:modelValue"])):(k(),M(s(wn),{key:1,"model-value":R.value.value,"onUpdate:modelValue":Z=>I(G,Z)},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1024)]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("tooltip")),1)]),_:2},[l("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"combobox option tooltip","model-value":R.tooltip,"onUpdate:modelValue":Z=>j(G,Z)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"combobox-single-add-item",class:"w-full justify-center",onClick:$},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),F[14]||(F[14]=H("span",null,"增加选项",-1))]),_:1})])]),_:1}),H("div",Xlt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("hidden")),1)]),_:2},[r("hidden")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("hidden"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:m.value,"onUpdate:modelValue":F[6]||(F[6]=R=>m.value=R),placeholder:"例:row.archived","result-type":"bool","extra-vars":u},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("disabled")),1)]),_:2},[r("disabled")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("disabled"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:h.value,"onUpdate:modelValue":F[7]||(F[7]=R=>h.value=R),placeholder:"例:row.locked","result-type":"bool","extra-vars":u},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("readonly")),1)]),_:2},[r("readonly")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("readonly"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:g.value,"onUpdate:modelValue":F[8]||(F[8]=R=>g.value=R),placeholder:"例:row.id == null","result-type":"bool","extra-vars":u},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("onChange")),1)]),_:2},[r("onChange")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("onChange"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:v.value,"onUpdate:modelValue":F[9]||(F[9]=R=>v.value=R),placeholder:"如 http.patch('/api/items/' + row.id).body({ role: value })","result-type":"HttpRequest","extra-vars":d,multiline:""},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("successMessage")),1)]),_:2},[r("successMessage")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("successMessage"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{modelValue:b.value,"onUpdate:modelValue":F[10]||(F[10]=R=>b.value=R),placeholder:"如 '已更新'","result-type":"string","extra-vars":p},null,8,["modelValue"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("triggers")),1)]),_:2},[r("triggers")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("triggers"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(O$,{triggers:x.value,"onUpdate:triggers":y},null,8,["triggers"])]),_:1})]),c(s(er)),H("div",Zlt,[c(s(V),{orientation:"horizontal",class:"w-auto gap-2"},{default:f(()=>[c(s(Lo),{"model-value":t.value.enableSorting??!1,"onUpdate:modelValue":F[11]||(F[11]=R=>t.value={...t.value,enableSorting:R})},null,8,["model-value"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("enableSorting")),1)]),_:2},[r("enableSorting")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("enableSorting"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]))}}),eut=["data-orientation"],tut=q({__name:"ButtonGroup",props:{class:{type:[Boolean,null,String,Object,Array]},orientation:{}},setup(e){const t=e;return(n,o)=>(k(),L("div",{role:"group","data-slot":"button-group","data-orientation":t.orientation,class:He(s(et)(s(nut)({orientation:t.orientation}),t.class))},[se(n.$slots,"default")],10,eut))}}),nut=Gv("flex w-fit items-stretch [&>*]:hover:z-10 [&>*]:hover:relative [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:-ml-px [&>*[data-variant=primary]:not(:first-child)]:ml-px [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*[data-variant=primary]:not(:first-child)]:mt-px [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}}),out=Symbol("shwfed/button-registry"),rut={key:2},aut={key:2},iut={key:2},A$=q({name:"ShwfedActions",inheritAttrs:!1,__name:"group",props:Ca({configure:{type:Function}},{config:{required:!0},configModifiers:{}}),emits:["update:config"],setup(e){const t=Ot(e,"config"),n=import.meta.dev,o=new Set,r=new Set,a=new Set,{locale:i,t:l}=un({messages:{zh:{"untitled-button":"未命名按钮","untitled-dropdown":"未命名下拉按钮","action-network-error-title":"网络错误","action-network-error-description":"请检查网络连接后重试。","action-server-error-title":"请求失败","action-server-error-description":"服务器返回 {status},请稍后重试。","action-bad-response-title":"响应有点问题","action-bad-response-description":"没能读懂服务器返回的内容,请稍后重试。"},en:{"untitled-button":"Untitled button","untitled-dropdown":"Untitled dropdown","action-network-error-title":"Network error","action-network-error-description":"Please check your connection and try again.","action-server-error-title":"Request failed","action-server-error-description":"The server responded with {status}. Please try again later.","action-bad-response-title":"Something came back wrong","action-bad-response-description":"We couldn't read the server's reply. Please try again."},ja:{"untitled-button":"未命名ボタン","untitled-dropdown":"未命名ドロップダウン","action-network-error-title":"ネットワークエラー","action-network-error-description":"接続を確認して再試行してください。","action-server-error-title":"リクエストに失敗しました","action-server-error-description":"サーバーが {status} を返しました。しばらくしてから再試行してください。","action-bad-response-title":"応答がうまく読み取れませんでした","action-bad-response-description":"サーバーからの返答を処理できませんでした。しばらくしてから再試行してください。"},ko:{"untitled-button":"이름 없는 버튼","untitled-dropdown":"이름 없는 드롭다운","action-network-error-title":"네트워크 오류","action-network-error-description":"연결 상태를 확인한 후 다시 시도해 주세요.","action-server-error-title":"요청 실패","action-server-error-description":"서버가 {status}을(를) 반환했습니다. 잠시 후 다시 시도해 주세요.","action-bad-response-title":"응답이 조금 이상해요","action-bad-response-description":"서버의 응답을 읽지 못했습니다. 잠시 후 다시 시도해 주세요."}}}),u=vn(),d=(Se,Te)=>Ht(Se,{...dn(u),...Te}),p=Mee(),m=re([]),h=crypto.randomUUID(),g=ti({}),v=E(()=>{const Se=[];for(const Te of t.value.items){if(B(Te))continue;if(W(Te)){for(const te of Te.items){if(K(te)||!te.action)continue;const le=Zd(te.action.type,te.action.compatibilityDate);if(!le){y(te.action.type,te.action.compatibilityDate);continue}Se.push({buttonId:te.id,component:le.runtime,config:te.action,buttonTitle:te.title})}continue}if(!Te.action)continue;const Ne=Zd(Te.action.type,Te.action.compatibilityDate);if(!Ne){y(Te.action.type,Te.action.compatibilityDate);continue}Se.push({buttonId:Te.id,component:Ne.runtime,config:Te.action,buttonTitle:Te.title})}return Se}),b=E(()=>t.value.items.flatMap(Se=>B(Se)?[]:W(Se)?Se.items.filter(Te=>!K(Te)).map(Te=>Te.id):[Se.id])),x=E(()=>new Set(b.value));function y(Se,Te){const Ne=`${Se}@${Te}`;!n||a.has(Ne)||(a.add(Ne),console.warn(`[shwfed-actions] no runtime registered for action "${Se}" (${Te}).`))}function _(Se){!n||o.has(Se)||(o.add(Se),console.warn(`[shwfed-actions] duplicate action declaration for "${Se}". The latest declaration wins.`))}function w(Se){!n||r.has(Se)||(r.add(Se),console.warn(`[shwfed-action-definition] action "${Se}" is not present in the current button config.`))}function S(Se){const Te=g[Se.actionId];Te&&Te.ownerId!==Se.ownerId&&_(Se.actionId),g[Se.actionId]=Se}function C(Se,Te){const Ne=g[Se];Ne&&(Te!==void 0&&Ne.ownerId!==Te||Reflect.deleteProperty(g,Se))}fr(out,{registerAction:S,unregisterAction:C,hasAction:Se=>x.value.has(Se)});function T(){for(const Se of Object.keys(g))x.value.has(Se)||w(Se)}Xe(x,()=>{T()},{immediate:!0});const D=E(()=>{const Se=[];for(const Te of t.value.items){if(B(Te))continue;if(W(Te)){for(const te of Te.items){if(K(te))continue;const le=g[te.id];le?.render&&Se.push({definitionId:le.ownerId,ownerId:h,render:le.render})}continue}const Ne=g[Te.id];Ne?.render&&Se.push({definitionId:Ne.ownerId,ownerId:h,render:Ne.render})}return Se});Xe(D,Se=>{p.syncDefinitions(h,Se)},{immediate:!0}),tr(()=>{p.syncDefinitions(h,[])});const A=E(()=>t.value.groups.map(Se=>({...Se,items:t.value.items.filter(Te=>Te.groupId===Se.id)}))),I=E(()=>({gap:`calc(${t.value.gap??4} * 0.25rem)`}));function U(Se){return ut(Se.title,i.value)??l("untitled-button")}function j(Se){return ut(Se.title,i.value)??l("untitled-dropdown")}function Q(Se){return ut(Se.tooltip,i.value)}function F(Se){return DQe(Se.tooltip)}function R(Se){return g[Se]?.effect}function G(Se){return typeof Se=="object"&&Se!==null&&"_op"in Se}function Z(Se){return typeof Se=="function"}function Y(Se){return m.value.includes(Se)}function he(Se,Te){if(!Se)return Te;try{return bt(d(Se))}catch{return Te}}function ue(Se){return he(Se.hidden,!1)}function pe(Se){const Te=R(Se.id);return he(Se.disabled,!1)||Y(Se.id)||!(G(Te)||Z(Te))}function ce(Se){return Se.items.some(Te=>!K(Te)&&!ue(Te)&&Y(Te.id))}function ae(Se){return Se.items.some(Te=>K(Te)||!ue(Te))}function W(Se){return"items"in Se}function B(Se){return"type"in Se&&"compatibilityDate"in Se}function K(Se){return"type"in Se&&"compatibilityDate"in Se}function X(Se){return Op(Se.type,Se.compatibilityDate)?.runtime}function Ee(Se){return!K(Se)}function _e(Se,Te){return Te.variant??Se.variant??"default"}function ze(){return t.value.size??"default"}function st(Se){return Se.variant??"default"}function oe(Se,Te){if(Te===0)return!1;const Ne=Se.items[Te],te=Se.items[Te-1];return!Ne||!te||W(Ne)||W(te)||B(Ne)||B(te)?!1:_e(Se,Ne)==="primary"&&_e(Se,te)==="primary"}function be(Se){return Vn(()=>{Si.error(l("action-bad-response-title"),{description:l("action-bad-response-description")}),n&&console.warn("[shwfed-actions] bad response body",Se)})}async function De(Se){if(Y(Se))return;const Te=g[Se];if(Te?.effect){m.value=[...m.value,Se];try{await Te.effect.pipe(zK,LK(Ree,{definitionId:Te.ownerId}),li(bs),OK({FetchError:Ne=>Vn(()=>{Si.error(l("action-network-error-title"),{description:l("action-network-error-description")}),n&&console.warn("[shwfed-actions] network error",Ne)}),NotOkError:Ne=>Vn(()=>{Si.error(l("action-server-error-title"),{description:l("action-server-error-description",{status:Ne.response.status})}),n&&console.warn("[shwfed-actions] non-ok response",Ne)}),MalformedJsonError:be,MalformedTextError:be,MalformedBlobError:be,MalformedBytesError:be,MalformedArrayBufferError:be,MalformedFormDataError:be,MalformedReadableStreamError:be,BodyIsNotPresentError:be}),Yr)}catch(Ne){n&&console.error("[shwfed-actions] action failed",Ne)}finally{m.value=m.value.filter(Ne=>Ne!==Se)}}}return(Se,Te)=>{const Ne=Rf("ClientOnly");return k(),M(Ne,null,{default:f(()=>[H("div",{"data-slot":"buttons",class:He(s(et)("relative flex flex-wrap items-baseline")),style:mn([I.value,t.value.style])},[(k(!0),L(Me,null,Ke(v.value,te=>(k(),M(Mo(te.component),{key:te.buttonId,"button-id":te.buttonId,config:te.config,"button-title":te.buttonTitle},null,8,["button-id","config","button-title"]))),128)),(k(!0),L(Me,null,Ke(A.value,te=>(k(),M(s(tut),{key:te.id,"data-slot":"buttons-group",orientation:"horizontal"},{default:f(()=>[(k(!0),L(Me,null,Ke(te.items,(le,xe)=>(k(),L(Me,{key:le.id},[B(le)&&X(le)?(k(),M(Mo(X(le)),{key:0,config:le},null,8,["config"])):!B(le)&&!W(le)&&!ue(le)&&!F(le)?(k(),M(s(Rn),{key:1,"data-slot":"buttons-item",variant:_e(te,le),size:ze(),disabled:pe(le),class:He(oe(te,xe)?"ml-px":void 0),onClick:me=>{De(le.id)}},{default:f(()=>[Y(le.id)?(k(),M(s(fe),{key:0,icon:"line-md:loading-twotone-loop"})):le.icon?(k(),M(s(fe),{key:1,icon:le.icon},null,8,["icon"])):ke("",!0),le.hideTitle?ke("",!0):(k(),L("span",rut,O(U(le)),1))]),_:2},1032,["variant","size","disabled","class","onClick"])):!B(le)&&!W(le)&&!ue(le)?(k(),M(s(uo),{key:2,"delay-duration":180},{default:f(()=>[c(s(fo),{"as-child":""},{default:f(()=>[c(s(Rn),{"data-slot":"buttons-item",variant:_e(te,le),size:ze(),disabled:pe(le),class:He(oe(te,xe)?"ml-px":void 0),onClick:me=>{De(le.id)}},{default:f(()=>[Y(le.id)?(k(),M(s(fe),{key:0,icon:"line-md:loading-twotone-loop"})):le.icon?(k(),M(s(fe),{key:1,icon:le.icon},null,8,["icon"])):ke("",!0),le.hideTitle?ke("",!0):(k(),L("span",aut,O(U(le)),1))]),_:2},1032,["variant","size","disabled","class","onClick"])]),_:2},1024),c(s(co),{"data-slot":"buttons-tooltip-content",align:"center",side:"top"},{default:f(()=>[c(s(z),{source:Q(le)??"",class:"prose prose-xs prose-zinc"},null,8,["source"])]),_:2},1024)]),_:2},1024)):W(le)&&ae(le)?(k(),M(s(Fr),{key:3},{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Rn),{"data-slot":"buttons-dropdown-trigger",variant:st(te),size:ze(),disabled:ce(le)},{default:f(()=>[ce(le)?(k(),M(s(fe),{key:0,icon:"line-md:loading-twotone-loop"})):le.icon?(k(),M(s(fe),{key:1,icon:le.icon},null,8,["icon"])):ke("",!0),le.hideTitle?ke("",!0):(k(),L("span",iut,O(j(le)),1))]),_:2},1032,["variant","size","disabled"])]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[(k(!0),L(Me,null,Ke(le.items,me=>(k(),L(Me,{key:me.id},[K(me)&&X(me)?(k(),M(Mo(X(me)),{key:0,"data-slot":"buttons-dropdown-item-registry",config:me},null,8,["config"])):Ee(me)&&!ue(me)&&!F(me)?(k(),M(s(Vo),{key:1,"data-slot":"buttons-dropdown-item",disabled:pe(me),onSelect:Je=>{De(me.id)}},{default:f(()=>[Y(me.id)?(k(),M(s(fe),{key:0,icon:"line-md:loading-twotone-loop"})):me.icon?(k(),M(s(fe),{key:1,icon:me.icon},null,8,["icon"])):ke("",!0),H("span",null,O(U(me)),1)]),_:2},1032,["disabled","onSelect"])):Ee(me)&&!ue(me)?(k(),M(s(uo),{key:2,"delay-duration":180},{default:f(()=>[c(s(fo),{"as-child":""},{default:f(()=>[c(s(Vo),{"data-slot":"buttons-dropdown-item",disabled:pe(me),onSelect:Je=>{De(me.id)}},{default:f(()=>[Y(me.id)?(k(),M(s(fe),{key:0,icon:"line-md:loading-twotone-loop"})):me.icon?(k(),M(s(fe),{key:1,icon:me.icon},null,8,["icon"])):ke("",!0),H("span",null,O(U(me)),1)]),_:2},1032,["disabled","onSelect"])]),_:2},1024),c(s(co),{"data-slot":"buttons-tooltip-content",align:"center",side:"top"},{default:f(()=>[c(s(z),{source:Q(me)??"",class:"prose prose-xs prose-zinc"},null,8,["source"])]),_:2},1024)]),_:2},1024)):ke("",!0)],64))),128))]),_:2},1024)]),_:2},1024)):ke("",!0)],64))),128))]),_:2},1024))),128)),se(Se.$slots,"default")],6)]),_:3})}}}),sut=q({name:"ShwfedTableActionsRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,n=E(()=>({kind:"shwfed.component.action",size:"sm",gap:t.column.gap,style:t.column.style||"display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;",groups:t.column.groups.map(o=>({...o,variant:o.variant??"link"})),items:t.column.items}));return(o,r)=>(k(),M(A$,{config:n.value,configure:s($$)},null,8,["config","configure"]))}}),lut=q({name:"ShwfedTableDateRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,n=E(()=>{const r=t.ctx.cell.getValue();try{const a=typeof r=="string"||typeof r=="number"||r instanceof Date?zn(r):null;if(a&&Jv(a))return ir(a,t.column.format)}catch{}return"-"}),o=E(()=>n.value!=="-");return(r,a)=>(k(),L("div",{class:He(["relative w-full py-2 px-1 flex items-center justify-center text-xs",o.value?"text-zinc-600":"text-zinc-300 select-none"])},O(n.value),3))}}),uut=q({name:"ShwfedTableIconRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,n=vn(),o=E(()=>{const i=t.ctx.cell.getValue();return typeof i=="string"&&i.length>0?i:""}),r=E(()=>{if(t.column.color)try{const i=bt(Ht(t.column.color,{...dn(n),row:t.ctx.row?.original,index:t.ctx.row?.index}));return typeof i=="string"&&i.length>0?i:void 0}catch(i){console.error("[shwfed-table] icon color expression failed",i);return}}),a=E(()=>nl[t.column.align??"center"]??nl.center);return(i,l)=>(k(),L("div",{class:He(["w-full h-full py-2 px-1 flex items-center text-sm",a.value])},[o.value?(k(),M(s(fe),{key:0,icon:o.value,style:mn(r.value?{color:r.value}:void 0)},null,8,["icon","style"])):ke("",!0)],2))}}),cut=q({name:"ShwfedTableMarkdownRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,{locale:n}=un(),o=vn(),r=E(()=>{const m=ut(t.column.markdown,n.value)??"";return m?Ss(m,Ht,dn(o)):""}),a=E(()=>r.value.trim().length===0),i=E(()=>a.value?"center":t.column.align??"left"),l=E(()=>nl[i.value]??nl.left),u=E(()=>{const{copyExpression:m}=t.column;if(m)try{const h=bt(Ht(m,dn(o)));return h==null?void 0:String(h)}catch(h){console.error("[shwfed-table] markdown copy expression failed",h);return}}),d=E(()=>u.value!==void 0&&!a.value),p=async()=>{const m=u.value;if(m!==void 0)try{await navigator.clipboard.writeText(m)}catch(h){console.error("[shwfed-table] markdown copy failed",h)}};return(m,h)=>(k(),L("div",{class:He(["relative w-full py-2 px-1 flex items-center text-xs group",l.value,a.value?"text-zinc-300 select-none":"text-zinc-600"])},[a.value?(k(),L(Me,{key:0},[P(" - ")],64)):(k(),M(s(z),{key:1,source:r.value,block:"",class:"prose prose-zinc text-xs"},null,8,["source"])),d.value?(k(),M(s(Rn),{key:2,"aria-label":"Copy",class:"p-1 w-6 h-6 flex items-center justify-center right-1 top-1/2 -translate-y-1/2 transform-3d group-hover:opacity-100 opacity-0 absolute transition-opacity duration-180",size:"xs",onClick:p},{default:f(()=>[c(s(fe),{icon:"fluent:copy-20-regular"})]),_:1})):ke("",!0)],2))}}),dut=q({name:"ShwfedTableNumberRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,n=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],o=["","拾","佰","仟"],r=["","万","亿","兆"];function a(m){if(Number.isNaN(m))return"-";if(m===0)return"零";const h=m<0,g=Math.abs(m),[v,b]=String(g).split(".");let x="";const y=v.split("").reverse();let _=!1;for(let w=0;w<y.length;w++){const S=Number(y[w]),C=Math.floor(w/4),$=w%4;S===0?_=!0:(_&&(x=n[0]+x,_=!1),x=n[S]+o[$]+x),$===0&&C>0&&!_&&(x=(r[C]??"")+x)}if(b){x+="点";for(const w of b)x+=n[Number(w)]}return h?`负${x}`:x}function i(m,h){if(m==null)return"-";const g=Number(m);if(Number.isNaN(g))return"-";const v=h.displayMode??"plain";if(v==="uppercaseChinese")return a(g);let b;if(h.preserveDigits!==void 0){const x=h.preserveMode??"round",y=h.preserveDigits,_=10**y;let w;switch(x){case"floor":w=Math.floor(g*_)/_;break;case"ceil":w=Math.ceil(g*_)/_;break;default:w=Math.round(g*_)/_}b=w.toFixed(y)}else b=String(g);if(v==="monoThousand"){const[x,y]=b.split("."),_=x.replace(/\B(?=(\d{3})+(?!\d))/g,",");b=y!==void 0?`${_}.${y}`:_}return b}const l=E(()=>i(t.ctx.cell.getValue(),t.column)),u=E(()=>l.value==="-"),d=E(()=>u.value?"center":t.column.align??"right"),p=E(()=>nl[d.value]??nl.right);return(m,h)=>(k(),L("div",{class:He(["relative w-full py-2 px-1 flex items-center text-xs",p.value,e.column.displayMode==="monoThousand"&&"font-mono",u.value?"text-zinc-300 select-none":"text-zinc-600"])},O(l.value),3))}}),fut={class:"w-full h-full flex items-center justify-center"},put=["aria-checked","disabled"],mut={key:0,class:"size-1.5 rounded-full bg-white"},hut=["id","aria-checked","disabled","data-state"],gut={class:"grid h-full w-full place-content-center transition-none text-xs"},vut=q({name:"ShwfedTableSelectRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,n=vn();function o(i,l){try{return!!bt(Ht(i,dn(n)))}catch(u){return console.error("[shwfed-table] row-selection predicate failed",u),l}}const r=E(()=>!(t.column.enableRowSelection&&!o(t.column.enableRowSelection,!0)||t.column.mode==="checkbox"&&t.column.enableMultiRowSelection&&!o(t.column.enableMultiRowSelection,!0)));function a(i){if(!r.value)return;const{row:l,table:u}=t.ctx;if(i.shiftKey){const d=u.getRowModel().rows,p=d.findIndex(m=>m.id===l.id);if(p>=0){let m=-1;for(let h=1;h<d.length;h++){if(d[p-h]?.getIsSelected()){m=p-h;break}if(d[p+h]?.getIsSelected()){m=p+h;break}}if(m>=0){const[h,g]=m<=p?[m,p]:[p,m],v={};for(let b=h;b<=g;b++){const x=d[b];x&&x.getCanSelect()&&x.getCanMultiSelect()&&(v[x.id]=!0)}u.setRowSelection(b=>({...b,...v}));return}}}l.toggleSelected(!l.getIsSelected())}return(i,l)=>(k(),L("div",fut,[e.column.mode==="radio"?(k(),L("button",{key:0,type:"button",role:"radio","aria-checked":e.ctx.row.getIsSelected(),disabled:!r.value,class:He(["size-4 shrink-0 rounded-full border shadow-xs outline-none transition-shadow","flex items-center justify-center",e.ctx.row.getIsSelected()?"bg-(--primary) border-(--primary)":"border-zinc-200 hover:shadow",r.value?"cursor-pointer":"cursor-not-allowed opacity-50"]),onClick:l[0]||(l[0]=u=>e.ctx.table.setRowSelection({[e.ctx.row.id]:!0}))},[e.ctx.row.getIsSelected()?(k(),L("span",mut)):ke("",!0)],10,put)):(k(),L("button",{key:1,id:`${e.ctx.column.id}-${e.ctx.row.id}`,type:"button",role:"checkbox","aria-checked":e.ctx.row.getIsSelected(),disabled:!r.value,"data-state":e.ctx.row.getIsSelected()?"checked":"unchecked",class:He(s(et)("peer flex items-center justify-center border-zinc-200","data-[state=checked]:bg-(--primary) data-[state=checked]:text-white data-[state=checked]:border-(--primary)","aria-invalid:border-red-400","size-4 shrink-0 rounded border shadow-xs hover:shadow transition-shadow outline-none","disabled:cursor-not-allowed disabled:opacity-50",r.value?"cursor-pointer":"cursor-not-allowed")),onClick:a},[H("span",gut,[e.ctx.row.getIsSelected()?(k(),M(s(fe),{key:0,icon:"fluent:checkmark-20-filled"})):ke("",!0)])],10,hut))]))}}),yut={class:"min-w-0 truncate"},but=q({name:"ShwfedTableTextRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,n=vn(),o=E(()=>t.ctx.cell.getValue()),r=E(()=>o.value===void 0||o.value===null),a=E(()=>r.value?"center":t.column.align??"left"),i=E(()=>nl[a.value]??nl.left),l=E(()=>{const{copyExpression:p}=t.column;if(p)try{const m=bt(Ht(p,dn(n)));return m==null?void 0:String(m)}catch(m){console.error("[shwfed-table] text copy expression failed",m);return}}),u=E(()=>l.value!==void 0&&!r.value&&o.value!==""),d=async()=>{const p=l.value;if(p!==void 0)try{await navigator.clipboard.writeText(p)}catch(m){console.error("[shwfed-table] text copy failed",m)}};return(p,m)=>(k(),L("span",{class:He(["relative w-full py-2 px-1 flex items-center text-xs group",i.value,r.value?"font-mono text-zinc-300 select-none":[e.column.displayMode==="mono"&&"font-mono","text-zinc-600"]])},[H("span",yut,O(r.value?"-":String(o.value)),1),u.value?(k(),M(s(Rn),{key:0,"aria-label":"Copy",class:"p-1 w-6 h-6 flex items-center justify-center right-1 top-1/2 -translate-y-1/2 transform-3d group-hover:opacity-100 opacity-0 absolute transition-opacity duration-180",size:"xs",onClick:d},{default:f(()=>[c(s(fe),{icon:"fluent:copy-20-regular"})]),_:1})):ke("",!0)],2))}}),_ut={key:0,class:"font-mono text-zinc-300 select-none"},xut=q({name:"ShwfedTableSwitchRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,n=vn(),o=C$(),r=E(()=>t.ctx.cell.getValue()),a=E(()=>r.value===void 0||r.value===null),i=E(()=>r.value===!0),l=E(()=>nl[t.column.align??"center"]??nl.center),u=re(!1),d=E(()=>{if(!t.column.disabled)return!1;try{return bt(Ht(t.column.disabled,dn(n)))===!0}catch(g){return console.error("[shwfed-table] switch disabled failed",g),!1}}),p=E(()=>!!t.column.onChange),m=E(()=>!p.value||d.value||u.value);async function h(g){const{onChange:v,successMessage:b}=t.column;if(!v)return;u.value=!0;const x=Eo(function*(){return yield*(yield*Ht(v,{...dn(n),value:g})).json()});try{const y=await Yr(li(x,bs));if(b)try{const _=bt(Ht(b,{json:y}));_&&Si.success(_)}catch(_){console.error("[shwfed-table] switch successMessage failed",_)}await Yr(J1(o,t.column.triggers))}catch(y){console.error("[shwfed-table] switch onChange failed",y),Si.error("请求失败")}finally{u.value=!1}}return(g,v)=>(k(),L("span",{class:He(["w-full py-2 px-1 flex items-center text-xs",l.value])},[a.value?(k(),L("span",_ut,"-")):(k(),M(s(Lo),{key:1,size:"sm","model-value":i.value,disabled:m.value,"onUpdate:modelValue":v[0]||(v[0]=b=>h(b))},null,8,["model-value","disabled"]))],2))}}),wut={key:0,class:"font-mono text-zinc-300 select-none"},Sut=q({name:"ShwfedTableSwitchRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,n=vn(),o=C$(),r=E(()=>t.ctx.cell.getValue()),a=E(()=>r.value===void 0||r.value===null),i=E(()=>r.value===!0),l=E(()=>nl[t.column.align??"center"]??nl.center),u=re(!1),d=E(()=>{if(!t.column.disabled)return!1;try{return bt(Ht(t.column.disabled,dn(n)))===!0}catch(g){return console.error("[shwfed-table] switch disabled failed",g),!1}}),p=E(()=>!!t.column.onChange),m=E(()=>!p.value||d.value||u.value);async function h(g){const{onChange:v,successMessage:b}=t.column;if(!v)return;u.value=!0;const x=Eo(function*(){return yield*(yield*Ht(v,{...dn(n),value:g})).json()});try{const y=await Yr(li(x,bs));if(b)try{const _=bt(Ht(b,{json:y}));_&&Si.success(_)}catch(_){console.error("[shwfed-table] switch successMessage failed",_)}await Yr(J1(o,t.column.triggers))}catch(y){console.error("[shwfed-table] switch onChange failed",y),Si.error("请求失败")}finally{u.value=!1}}return(g,v)=>(k(),L("span",{class:He(["w-full py-2 px-1 flex items-center text-xs",l.value])},[a.value?(k(),L("span",wut,"-")):(k(),M(s(Lo),{key:1,size:"sm","model-value":i.value,disabled:m.value,"onUpdate:modelValue":v[0]||(v[0]=b=>h(b))},null,8,["model-value","disabled"]))],2))}}),mA=".",hA=Symbol("shwfed-form-state");function u4(e,t="form"){const n=Fn(hA,void 0),o=re(new Set);function r(l,u){const d=u===void 0?null:u;if(l===mA){e.value=d;return}const p=e.value;fat(p,l,d),e.value={...p}}function a(l){o.value.has(l)||(o.value=new Set(o.value).add(l))}const i={kind:t,parent:n,state:e,getAt:l=>l===mA?e.value:e0(e.value,l),setAt:(l,u)=>{r(l,u),a(l)},setAtSilent:r,dirty:o,isDirty:l=>o.value.has(l),markDirty:a};return fr(hA,i),i}function dr(){const e=Fn(hA);if(!e)throw new Error("[shwfed-form] useFormState() called outside a <Form> runtime host");return e}const kut={class:"p-[0.125rem] w-full"},Cut={key:0,class:"block h-7 w-full"},$ut={key:1,class:"flex items-center h-7 w-full px-2 text-[0.75rem] text-zinc-700 truncate"},Tut={key:0,class:"border-t border-zinc-200 px-2 py-1.5"},Eut=q({name:"ShwfedTableComboboxSingleRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"combobox-single-placeholder":"请选择","combobox-single-search-placeholder":"搜索…","combobox-single-empty":"无匹配项"},en:{"combobox-single-placeholder":"Select…","combobox-single-search-placeholder":"Search…","combobox-single-empty":"No matches"},ja:{"combobox-single-placeholder":"選択してください","combobox-single-search-placeholder":"検索…","combobox-single-empty":"一致なし"}}}),r=dr(),a=vn(),i=(j,Q)=>Ht(j,{...dn(a),...Q}),l=E(()=>t.column.placeholder?ut(t.column.placeholder,n.value):o("combobox-single-placeholder"));function u(j,Q){if(!j)return!1;try{return bt(i(j))===!0}catch(F){return console.error(`[shwfed-table] combobox-single ${Q} failed`,F),!1}}const d=E(()=>u(t.column.hidden,"hidden")),p=E(()=>u(t.column.disabled,"disabled")),m=E(()=>u(t.column.readonly,"readonly")),h=E(()=>m.value||t.column.derived?.mode==="formula");function g(j){try{return Ss(j,i,{})}catch(Q){return console.error("[shwfed-table] combobox-single label interpolation failed",Q),j}}const v=E(()=>(t.column.items??[]).map(j=>{const Q=ut(j.label,n.value)??"",F=j.tooltip?ut(j.tooltip,n.value):void 0;return{key:j.id,value:j.value.value,label:Q?g(Q):"",tooltip:F?g(F):void 0}})),b=E(()=>r.getAt(t.column.binding));function x(j,Q){if(j===Q)return!0;if(j==null||Q==null)return!1;if(typeof j=="object"&&typeof Q=="object")try{return JSON.stringify(j)===JSON.stringify(Q)}catch{return!1}return!1}const y=E(()=>v.value.find(j=>x(j.value,b.value))),_=E(()=>y.value?.key),w=E(()=>y.value?.label??""),S=re(!1);function C(j){if(typeof j!="string")return;const Q=v.value.find(F=>F.key===j);Q&&(r.setAt(t.column.binding,Q.value),It().then(()=>{S.value=!1}))}const $=E(()=>!p.value&&y.value!==void 0);function T(){r.setAt(t.column.binding,null),S.value=!1}const D=re(null);Xe(S,j=>{D.value=j?v.value[0]?.key??null:null});const A=E(()=>v.value.find(j=>j.key===D.value)),I=E(()=>A.value?.tooltip),U=E(()=>v.value.some(j=>j.tooltip!=null&&j.tooltip.length>0));return(j,Q)=>(k(),L("div",kut,[d.value?(k(),L("span",Cut)):h.value?(k(),L("span",$ut,O(w.value||"—"),1)):(k(),M(s(nc),{key:2,open:S.value,"onUpdate:open":Q[1]||(Q[1]=F=>S.value=F)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(s(Ge),{class:"group/combobox-single h-7 rounded border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180","data-disabled":p.value?"true":void 0},{default:f(()=>[c(s(ip),{"as-child":""},{default:f(()=>[c(s(mt),{"model-value":w.value,disabled:p.value,placeholder:l.value,class:"h-7 text-[0.75rem] md:text-[0.75rem] px-2 cursor-pointer text-left",readonly:""},null,8,["model-value","disabled","placeholder"])]),_:1}),$.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"combobox-single-clear",class:"size-4 text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:Q[0]||(Q[0]=at(()=>{},["prevent"])),onClick:at(T,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular",class:"size-3"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"])]),_:1}),c(s(oc),{class:"w-auto p-0 [&_[data-slot=command-input-wrapper]]:h-7 [&_[data-slot=command-input-wrapper]]:px-2 [&_[data-slot=command-input-wrapper]_svg]:size-3 [&_[data-slot=command-input]]:h-7 [&_[data-slot=command-input]]:py-0 [&_[data-slot=command-input]]:text-[0.75rem] [&_[data-slot=command-item]]:px-2 [&_[data-slot=command-item]]:py-1 [&_[data-slot=command-item]]:text-[0.75rem]",style:{width:"var(--reka-popover-trigger-width)"}},{default:f(()=>[c(s(np),{"model-value":_.value,disabled:p.value,"selection-behavior":"toggle","onUpdate:modelValue":C},{default:f(()=>[c(s(Zm),{placeholder:s(o)("combobox-single-search-placeholder")},null,8,["placeholder"]),c(s(rp),null,{default:f(()=>[c(s(op),{class:"py-3 text-center text-[0.75rem] text-zinc-500"},{default:f(()=>[P(O(s(o)("combobox-single-empty")),1)]),_:1}),c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(v.value,F=>(k(),M(s(ws),{key:F.key,value:F.key,onMouseenter:R=>D.value=F.key,onFocus:R=>D.value=F.key},{default:f(()=>[P(O(F.label),1)]),_:2},1032,["value","onMouseenter","onFocus"]))),128))]),_:1})]),_:1}),U.value&&I.value?(k(),L("div",Tut,[c(s(z),{source:I.value,block:"",class:"prose prose-xs prose-zinc"},null,8,["source"])])):ke("",!0)]),_:1},8,["model-value","disabled"])]),_:1})]),_:1},8,["open"]))]))}}),Ere=Symbol("shwfed-form-commit-bus");function Dut(){const e=new Set,t={register(n){return e.add(n),()=>{e.delete(n)}},flushAll(){for(const n of[...e])n()}};return fr(Ere,t),t}const Out={register:()=>()=>{},flushAll:()=>{}};function Dre(){return Fn(Ere,Out)}function t0(e){const{getAt:t,setAt:n}=dr(),o=e.equals??Object.is,r=re(void 0),a=E(()=>{const m=e.binding(),h=m==null?r.value:t(m);return e.fromState(h)}),i=re(a.value),l=re(!1),u=E({get:()=>i.value,set:m=>{i.value=m,l.value=!0}});function d(){if(!l.value||(l.value=!1,o(i.value,a.value)))return;const m=e.binding(),h=e.toState(i.value);m==null?r.value=h:n(m,h)}Xe(a,m=>{l.value||(i.value=m)});const p=Dre().register(d);return tr(()=>{p(),d()}),{draft:u,dirty:E(()=>l.value),commit:d}}const Aut={class:"p-[0.125rem] w-full"},Iut={key:0,class:"block h-7 w-full"},Put={key:1,class:"flex items-center h-7 w-full px-2 text-[0.75rem] text-zinc-700 truncate"},Mut=q({name:"ShwfedTableNumberInputRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,{locale:n}=un(),o=vn(),r=(C,$)=>Ht(C,{...dn(o),...$}),a=E(()=>t.column.placeholder?ut(t.column.placeholder,n.value):void 0);function i(C,$){if(!C)return!1;try{return bt(r(C))===!0}catch(T){return console.error(`[shwfed-table] number-input ${$} failed`,T),!1}}function l(C,$){if(C)try{const T=bt(r(C));return typeof T=="number"&&Number.isFinite(T)?T:void 0}catch(T){console.error(`[shwfed-table] number-input ${$} failed`,T);return}}const u=E(()=>i(t.column.hidden,"hidden")),d=E(()=>i(t.column.disabled,"disabled")),p=E(()=>i(t.column.readonly,"readonly")),m=E(()=>p.value||t.column.derived?.mode==="formula"),h=E(()=>l(t.column.min,"min")),g=E(()=>l(t.column.max,"max")),v=E(()=>({useGrouping:!1,maximumFractionDigits:20})),{draft:b,commit:x}=t0({binding:()=>t.column.binding,fromState:C=>{if(typeof C=="number"&&Number.isFinite(C))return C;if(typeof C=="string"&&C.length>0){const $=Number(C);return Number.isFinite($)?$:void 0}},toState:C=>typeof C!="number"||!Number.isFinite(C)?null:t.column.valueAsString?String(C):C});function y(C,$,T){const D=10**$;switch(T){case"floor":return Math.floor(C*D)/D;case"ceil":return Math.ceil(C*D)/D;default:return Math.round(C*D)/D}}const _=E(()=>!d.value&&b.value!==void 0);function w(){b.value=void 0,x()}async function S(){await It();const C=t.column.precision;if(C!==void 0){const $=b.value;if($!==void 0){const T=y($,C,t.column.roundingMode??"round");T!==$&&(b.value=T)}}x()}return(C,$)=>(k(),L("div",Aut,[u.value?(k(),L("span",Iut)):m.value?(k(),L("span",Put,O(s(b)??"—"),1)):(k(),M(s(Ge),{key:2,class:"group/number-input h-7 rounded border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180","data-disabled":d.value?"true":void 0},{default:f(()=>[c(s(wn),{"model-value":s(b),step:e.column.step,"step-snapping":e.column.step!==void 0,min:h.value,max:g.value,"format-options":v.value,disabled:d.value,placeholder:a.value,"input-class":"h-7 text-[0.75rem] md:text-[0.75rem] px-2 text-left","onUpdate:modelValue":$[0]||($[0]=T=>b.value=T),onBlur:S},null,8,["model-value","step","step-snapping","min","max","format-options","disabled","placeholder"]),_.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/number-input:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"number-input-clear",class:"size-4 text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:$[1]||($[1]=at(()=>{},["prevent"])),onClick:at(w,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular",class:"size-3"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"]))]))}}),Rut={class:"p-[0.125rem] w-full"},Fut={key:0,class:"block h-7 w-full"},zut={key:1,class:"flex items-center justify-center h-7 w-full px-2 text-[0.75rem] text-zinc-700 truncate"},Vut={key:2,class:"flex items-center justify-center h-7 w-full"},Nut=q({name:"ShwfedTableSwitchRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,{locale:n}=un(),o=vn(),r=(b,x)=>Ht(b,{...dn(o),...x});function a(b,x){if(!b)return!1;try{return bt(r(b))===!0}catch(y){return console.error(`[shwfed-table] switch ${x} failed`,y),!1}}const i=E(()=>a(t.column.hidden,"hidden")),l=E(()=>a(t.column.disabled,"disabled")),u=E(()=>a(t.column.readonly,"readonly")),d=E(()=>u.value||t.column.derived?.mode==="formula"),p=E(()=>ut(t.column.trueLabel,n.value)||"是"),m=E(()=>ut(t.column.falseLabel,n.value)||"否"),{draft:h,commit:g}=t0({binding:()=>t.column.binding,fromState:b=>b===!0,toState:b=>b===!0});function v(b){h.value=b,g()}return(b,x)=>(k(),L("div",Rut,[i.value?(k(),L("span",Fut)):d.value?(k(),L("span",zut,O(s(h)?p.value:m.value),1)):(k(),L("span",Vut,[c(s(Lo),{size:"sm","model-value":s(h),disabled:l.value,"onUpdate:modelValue":v},null,8,["model-value","disabled"])]))]))}}),Lut={class:"p-[0.125rem] w-full"},But={key:0,class:"block h-7 w-full"},Uut={key:1,class:"flex items-center justify-center h-7 w-full px-2 text-[0.75rem] text-zinc-700 truncate"},qut={key:2,class:"flex items-center justify-center h-7 w-full"},jut=q({name:"ShwfedTableSwitchRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,{locale:n}=un(),o=vn(),r=(b,x)=>Ht(b,{...dn(o),...x});function a(b,x){if(!b)return!1;try{return bt(r(b))===!0}catch(y){return console.error(`[shwfed-table] switch ${x} failed`,y),!1}}const i=E(()=>a(t.column.hidden,"hidden")),l=E(()=>a(t.column.disabled,"disabled")),u=E(()=>a(t.column.readonly,"readonly")),d=E(()=>u.value||t.column.derived?.mode==="formula"),p=E(()=>ut(t.column.trueLabel,n.value)||"是"),m=E(()=>ut(t.column.falseLabel,n.value)||"否"),{draft:h,commit:g}=t0({binding:()=>t.column.binding,fromState:b=>b===!0,toState:b=>b===!0});function v(b){h.value=b,g()}return(b,x)=>(k(),L("div",Lut,[i.value?(k(),L("span",But)):d.value?(k(),L("span",Uut,O(s(h)?p.value:m.value),1)):(k(),L("span",qut,[c(s(Lo),{size:"sm","model-value":s(h),disabled:l.value,"onUpdate:modelValue":v},null,8,["model-value","disabled"])]))]))}}),Hut={class:"p-[0.125rem] w-full"},Wut={key:0,class:"block h-7 w-full"},Gut={key:1,class:"flex items-center h-7 w-full px-2 text-[0.75rem] text-zinc-700 truncate"},Kut=q({name:"ShwfedTableTextInputRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,{locale:n}=un(),o=vn(),r=dr(),a=E(()=>t.column.placeholder?ut(t.column.placeholder,n.value):void 0);function i(w,S){if(!w)return!1;try{return bt(Ht(w,dn(o)))===!0}catch(C){return console.error(`[shwfed-table] text-input ${S} failed`,C),!1}}const l=E(()=>i(t.column.hidden,"hidden")),u=E(()=>i(t.column.disabled,"disabled")),d=E(()=>i(t.column.readonly,"readonly")),p=E(()=>d.value||t.column.derived?.mode==="formula"),m=E(()=>{const w=r.getAt(t.column.binding);return w==null?"":String(w)}),h=re(m.value),g=re(!1);Xe(m,w=>{!g.value&&w!==h.value&&(h.value=w)});function v(){const w=h.value===""?null:h.value;Object.is(w,r.getAt(t.column.binding))||r.setAt(t.column.binding,w)}function b(){g.value=!0}function x(){g.value=!1,v()}const y=E(()=>!u.value&&h.value.length>0);function _(){h.value="",v()}return(w,S)=>(k(),L("div",Hut,[l.value?(k(),L("span",Wut)):p.value?(k(),L("span",Gut,O(h.value||"—"),1)):(k(),M(s(Ge),{key:2,class:"group/text-input h-7 rounded border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180"},{default:f(()=>[c(s(mt),{modelValue:h.value,"onUpdate:modelValue":S[0]||(S[0]=C=>h.value=C),placeholder:a.value,disabled:u.value,class:"h-7 text-[0.75rem] md:text-[0.75rem] px-2",onFocus:b,onBlur:x,onKeydown:Ro(v,["enter"])},null,8,["modelValue","placeholder","disabled"]),y.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/text-input:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"text-input-clear",class:"size-4 text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:S[1]||(S[1]=at(()=>{},["prevent"])),onClick:at(_,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular",class:"size-3"})]),_:1})]),_:1})):ke("",!0)]),_:1}))]))}}),Ore=Symbol("shwfed-table-reorder");function Yut(e){fr(Ore,e)}function Jut(){return Fn(Ore,null)}const Xut={class:"flex items-center justify-center w-full h-full"},Zut={class:"inline-flex items-center justify-center size-6 text-zinc-300 cursor-not-allowed select-none","aria-disabled":"true"},Qut=["aria-disabled"],ect=q({name:"ShwfedTableDragHandleRendererRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,n=Jut(),o=E(()=>n?.enabled.value??!1),r=E(()=>n?.disabledReason.value??null),a=re(null);return Xe([()=>t.ctx.row.id,a,o],([i,l,u],[d])=>{n&&(d&&d!==i&&n.registerHandle(d,null),n.registerHandle(i,u?l:null))},{immediate:!0,flush:"post"}),tr(()=>{n&&n.registerHandle(t.ctx.row.id,null)}),(i,l)=>(k(),L("div",Xut,[!o.value&&r.value?(k(),M(s(uo),{key:0,"delay-duration":400},{default:f(()=>[c(s(fo),{"as-child":""},{default:f(()=>[H("span",Zut,[c(s(fe),{icon:"fluent:re-order-dots-vertical-20-regular",class:"size-4"})])]),_:1}),c(s(co),null,{default:f(()=>[P(O(r.value),1)]),_:1})]),_:1})):(k(),L("span",{key:1,ref_key:"gripRef",ref:a,class:He(["inline-flex items-center justify-center size-6 select-none",o.value?"text-zinc-400 hover:text-zinc-600 cursor-grab active:cursor-grabbing":"text-zinc-300 cursor-not-allowed"]),"aria-disabled":!o.value||void 0},[c(s(fe),{icon:"fluent:re-order-dots-vertical-20-regular",class:"size-4"})],10,Qut))]))}}),Are=Symbol("shwfed-table:shared-fetch-layer");function tct(e){const t=nRe(e),n=Object.keys(t).sort().map(o=>[o,t[o]]);return JSON.stringify({url:cX(G8e(e)),method:e.method,headers:n})}function nct(){const e=new Map;return nY(h8,n=>{if(n.method!=="GET")return iO(n);const o=tct(n),r=e.get(o);if(r)return r;let a;const i=DK(l=>{a||(a=Yr(xa(iO(n)))),a.then(u=>{l(u)})});return e.set(o,i),i})}function oct(){const e=nct();return fr(Are,e),Pm(()=>{}),e}function rct(){return Fn(Are,bs)}const act={class:"p-[0.125rem] w-full"},ict={key:0,class:"block h-7 w-full"},sct={key:1,class:"flex items-center h-7 w-full px-2 text-[0.75rem] text-zinc-700 truncate"},lct={key:0,"data-slot":"combobox-single-remote-empty",class:"py-3 text-center text-[0.75rem] text-zinc-500"},uct=q({name:"ShwfedTableComboboxSingleRemoteOptionsRemoteRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"combobox-single-placeholder":"请选择","combobox-single-search-placeholder":"搜索…","combobox-single-empty":"无匹配项","combobox-single-loading":"加载中…"},en:{"combobox-single-placeholder":"Select…","combobox-single-search-placeholder":"Search…","combobox-single-empty":"No matches","combobox-single-loading":"Loading…"},ja:{"combobox-single-placeholder":"選択してください","combobox-single-search-placeholder":"検索…","combobox-single-empty":"一致なし","combobox-single-loading":"読み込み中…"}}}),r=vn(),a=(pe,ce)=>Ht(pe,{...dn(r),...ce}),i=C$(),l=rct(),u=E(()=>t.ctx.row.original),d=E(()=>t.ctx.row.index),p=E(()=>t.column.placeholder?ut(t.column.placeholder,n.value):o("combobox-single-placeholder"));function m(pe,ce){if(!pe)return!1;try{return bt(a(pe,{row:u.value,index:d.value}))===!0}catch(ae){return console.error(`[shwfed-table] combobox-single.remote.options-remote ${ce} failed`,ae),!1}}const h=E(()=>m(t.column.hidden,"hidden")),g=E(()=>m(t.column.disabled,"disabled")),v=E(()=>m(t.column.readonly,"readonly")),b=E(()=>!!t.column.onChange),x=re(!1),y=re(null),_=re(!1),w=E(()=>{const pe=t.column.request;if(!pe)return null;try{const ce=bt(a(pe,{row:u.value,index:d.value}));return JSON.stringify(ce.describe())}catch{return null}});let S=0;async function C(){const pe=++S;if(w.value==null){y.value=null,_.value=!1;return}const ce=t.column.request;_.value=!0;const ae=Eo(function*(){return yield*(yield*a(ce,{row:u.value,index:d.value})).json()});try{const W=await Yr(li(ae,l));pe===S&&(y.value=W)}catch{pe===S&&(y.value=null)}finally{pe===S&&(_.value=!1)}}OX(w,()=>{C()},{debounce:200,immediate:!0});function $(pe){try{return bt(a(t.column.optionValue,{row:u.value,index:d.value,option:pe}))}catch(ce){console.error("[shwfed-table] combobox-single.remote.options-remote optionValue failed",ce);return}}function T(pe){const ce=ut(t.column.optionLabel,n.value)??"";if(!ce)return"";try{return Ss(ce,a,{row:u.value,index:d.value,option:pe})}catch(ae){return console.error("[shwfed-table] combobox-single.remote.options-remote optionLabel failed",ae),""}}const D=E(()=>{let pe;try{pe=bt(a(t.column.options,{row:u.value,index:d.value,json:y.value}))}catch(ce){return console.error("[shwfed-table] combobox-single.remote.options-remote options failed",ce),[]}return Array.isArray(pe)?pe.map((ce,ae)=>({key:String(ae),label:T(ce),value:$(ce)})):[]}),A=E(()=>t.ctx.cell.getValue());function I(pe,ce){if(pe===ce)return!0;if(pe==null||ce==null)return!1;if(typeof pe=="object"&&typeof ce=="object")try{return JSON.stringify(pe)===JSON.stringify(ce)}catch{return!1}return!1}const U=E(()=>D.value.find(pe=>I(pe.value,A.value))),j=E(()=>U.value?.key),Q=E(()=>U.value?.label??""),F=re(!1),R=E(()=>!b.value||g.value||x.value);async function G(pe){const{onChange:ce,successMessage:ae}=t.column;if(!ce)return;x.value=!0;const W=Eo(function*(){return yield*(yield*a(ce,{row:u.value,index:d.value,value:pe})).json()});try{const B=await Yr(li(W,bs));if(ae)try{const K=bt(a(ae,{json:B}));K&&Si.success(K)}catch(K){console.error("[shwfed-table] combobox-single.remote.options-remote successMessage failed",K)}await Yr(J1(i,t.column.triggers))}catch(B){console.error("[shwfed-table] combobox-single.remote.options-remote onChange failed",B),Si.error("请求失败")}finally{x.value=!1}}function Z(pe){if(typeof pe!="string")return;const ce=D.value.find(ae=>ae.key===pe);ce&&(It().then(()=>{F.value=!1}),G(ce.value))}const Y=E(()=>!R.value&&U.value!==void 0);function he(){F.value=!1,G(null)}const ue=re(null);return Xe(F,pe=>{ue.value=pe?D.value[0]?.key??null:null}),(pe,ce)=>(k(),L("div",act,[h.value?(k(),L("span",ict)):v.value||!b.value?(k(),L("span",sct,O(Q.value||"—"),1)):(k(),M(s(nc),{key:2,open:F.value,"onUpdate:open":ce[1]||(ce[1]=ae=>F.value=ae)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(s(Ge),{class:"group/combobox-single-remote h-7 rounded border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180","data-disabled":R.value?"true":void 0},{default:f(()=>[c(s(ip),{"as-child":""},{default:f(()=>[c(s(mt),{"model-value":Q.value,disabled:R.value,placeholder:p.value,class:"h-7 text-[0.75rem] md:text-[0.75rem] px-2 cursor-pointer text-left",readonly:""},null,8,["model-value","disabled","placeholder"])]),_:1}),x.value||_.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"text-zinc-400"},{default:f(()=>[c(s(fe),{icon:"fluent:spinner-ios-20-regular",class:"size-3 animate-spin"})]),_:1})):Y.value?(k(),M(s(pt),{key:1,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single-remote:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"combobox-single-remote-clear",class:"size-4 text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:ce[0]||(ce[0]=at(()=>{},["prevent"])),onClick:at(he,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular",class:"size-3"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"])]),_:1}),c(s(oc),{class:"w-auto p-0 [&_[data-slot=command-input-wrapper]]:h-7 [&_[data-slot=command-input-wrapper]]:px-2 [&_[data-slot=command-input-wrapper]_svg]:size-3 [&_[data-slot=command-input]]:h-7 [&_[data-slot=command-input]]:py-0 [&_[data-slot=command-input]]:text-[0.75rem] [&_[data-slot=command-item]]:px-2 [&_[data-slot=command-item]]:py-1 [&_[data-slot=command-item]]:text-[0.75rem]",style:{width:"var(--reka-popover-trigger-width)"}},{default:f(()=>[c(s(np),{"model-value":j.value,disabled:R.value,"selection-behavior":"toggle","onUpdate:modelValue":Z},{default:f(()=>[c(s(Zm),{placeholder:s(o)("combobox-single-search-placeholder")},null,8,["placeholder"]),c(s(rp),null,{default:f(()=>[D.value.length===0?(k(),L("div",lct,O(_.value?s(o)("combobox-single-loading"):s(o)("combobox-single-empty")),1)):(k(),L(Me,{key:1},[c(s(op),{class:"py-3 text-center text-[0.75rem] text-zinc-500"},{default:f(()=>[P(O(s(o)("combobox-single-empty")),1)]),_:1}),c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(D.value,ae=>(k(),M(s(ws),{key:ae.key,value:ae.key,onMouseenter:W=>ue.value=ae.key,onFocus:W=>ue.value=ae.key},{default:f(()=>[c(s(z),{source:ae.label},null,8,["source"])]),_:2},1032,["value","onMouseenter","onFocus"]))),128))]),_:1})],64))]),_:1})]),_:1},8,["model-value","disabled"])]),_:1})]),_:1},8,["open"]))]))}}),cct={class:"p-[0.125rem] w-full"},dct={key:0,class:"block h-7 w-full"},fct={key:1,class:"flex items-center h-7 w-full px-2 text-[0.75rem] text-zinc-700 truncate"},pct={key:0,class:"border-t border-zinc-200 px-2 py-1.5"},mct=q({name:"ShwfedTableComboboxSingleRemoteOptionsStaticRuntime",__name:"runtime",props:{column:{},ctx:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"combobox-single-placeholder":"请选择","combobox-single-search-placeholder":"搜索…","combobox-single-empty":"无匹配项"},en:{"combobox-single-placeholder":"Select…","combobox-single-search-placeholder":"Search…","combobox-single-empty":"No matches"},ja:{"combobox-single-placeholder":"選択してください","combobox-single-search-placeholder":"検索…","combobox-single-empty":"一致なし"}}}),r=vn(),a=(R,G)=>Ht(R,{...dn(r),...G}),i=C$(),l=E(()=>t.column.placeholder?ut(t.column.placeholder,n.value):o("combobox-single-placeholder"));function u(R,G){if(!R)return!1;try{return bt(a(R))===!0}catch(Z){return console.error(`[shwfed-table] combobox-single.remote.options-static ${G} failed`,Z),!1}}const d=E(()=>u(t.column.hidden,"hidden")),p=E(()=>u(t.column.disabled,"disabled")),m=E(()=>u(t.column.readonly,"readonly")),h=E(()=>!!t.column.onChange),g=re(!1);function v(R){try{return Ss(R,a,{})}catch(G){return console.error("[shwfed-table] combobox-single.remote.options-static label interpolation failed",G),R}}const b=E(()=>(t.column.items??[]).map(R=>{const G=ut(R.label,n.value)??"",Z=R.tooltip?ut(R.tooltip,n.value):void 0;return{key:R.id,value:R.value.value,label:G?v(G):"",tooltip:Z?v(Z):void 0}})),x=E(()=>t.ctx.cell.getValue());function y(R,G){if(R===G)return!0;if(R==null||G==null)return!1;if(typeof R=="object"&&typeof G=="object")try{return JSON.stringify(R)===JSON.stringify(G)}catch{return!1}return!1}const _=E(()=>b.value.find(R=>y(R.value,x.value))),w=E(()=>_.value?.key),S=E(()=>_.value?.label??""),C=re(!1),$=E(()=>!h.value||p.value||g.value);async function T(R){const{onChange:G,successMessage:Z}=t.column;if(!G)return;g.value=!0;const Y=Eo(function*(){return yield*(yield*a(G,{value:R})).json()});try{const he=await Yr(li(Y,bs));if(Z)try{const ue=bt(a(Z,{json:he}));ue&&Si.success(ue)}catch(ue){console.error("[shwfed-table] combobox-single.remote.options-static successMessage failed",ue)}await Yr(J1(i,t.column.triggers))}catch(he){console.error("[shwfed-table] combobox-single.remote.options-static onChange failed",he),Si.error("请求失败")}finally{g.value=!1}}function D(R){if(typeof R!="string")return;const G=b.value.find(Z=>Z.key===R);G&&(It().then(()=>{C.value=!1}),T(G.value))}const A=E(()=>!$.value&&_.value!==void 0);function I(){C.value=!1,T(null)}const U=re(null);Xe(C,R=>{U.value=R?b.value[0]?.key??null:null});const j=E(()=>b.value.find(R=>R.key===U.value)),Q=E(()=>j.value?.tooltip),F=E(()=>b.value.some(R=>R.tooltip!=null&&R.tooltip.length>0));return(R,G)=>(k(),L("div",cct,[d.value?(k(),L("span",dct)):m.value||!h.value?(k(),L("span",fct,O(S.value||"—"),1)):(k(),M(s(nc),{key:2,open:C.value,"onUpdate:open":G[1]||(G[1]=Z=>C.value=Z)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(s(Ge),{class:"group/combobox-single h-7 rounded border-zinc-200/30 hover:border-zinc-200 focus-within:border-zinc-200 transition-colors ease-out duration-180","data-disabled":$.value?"true":void 0},{default:f(()=>[c(s(ip),{"as-child":""},{default:f(()=>[c(s(mt),{"model-value":S.value,disabled:$.value,placeholder:l.value,class:"h-7 text-[0.75rem] md:text-[0.75rem] px-2 cursor-pointer text-left",readonly:""},null,8,["model-value","disabled","placeholder"])]),_:1}),g.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"text-zinc-400"},{default:f(()=>[c(s(fe),{icon:"fluent:spinner-ios-20-regular",class:"size-3 animate-spin"})]),_:1})):A.value?(k(),M(s(pt),{key:1,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"combobox-single-clear",class:"size-4 text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:G[0]||(G[0]=at(()=>{},["prevent"])),onClick:at(I,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular",class:"size-3"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"])]),_:1}),c(s(oc),{class:"w-auto p-0 [&_[data-slot=command-input-wrapper]]:h-7 [&_[data-slot=command-input-wrapper]]:px-2 [&_[data-slot=command-input-wrapper]_svg]:size-3 [&_[data-slot=command-input]]:h-7 [&_[data-slot=command-input]]:py-0 [&_[data-slot=command-input]]:text-[0.75rem] [&_[data-slot=command-item]]:px-2 [&_[data-slot=command-item]]:py-1 [&_[data-slot=command-item]]:text-[0.75rem]",style:{width:"var(--reka-popover-trigger-width)"}},{default:f(()=>[c(s(np),{"model-value":w.value,disabled:$.value,"selection-behavior":"toggle","onUpdate:modelValue":D},{default:f(()=>[c(s(Zm),{placeholder:s(o)("combobox-single-search-placeholder")},null,8,["placeholder"]),c(s(rp),null,{default:f(()=>[c(s(op),{class:"py-3 text-center text-[0.75rem] text-zinc-500"},{default:f(()=>[P(O(s(o)("combobox-single-empty")),1)]),_:1}),c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(b.value,Z=>(k(),M(s(ws),{key:Z.key,value:Z.key,onMouseenter:Y=>U.value=Z.key,onFocus:Y=>U.value=Z.key},{default:f(()=>[P(O(Z.label),1)]),_:2},1032,["value","onMouseenter","onFocus"]))),128))]),_:1})]),_:1}),F.value&&Q.value?(k(),L("div",pct,[c(s(z),{source:Q.value,block:"",class:"prose prose-xs prose-zinc"},null,8,["source"])])):ke("",!0)]),_:1},8,["model-value","disabled"])]),_:1})]),_:1},8,["open"]))]))}}),hct=Object.assign({"../columns/2026-04-14/com.shwfed.table.column.actions/schema.ts":Prt,"../columns/2026-04-14/com.shwfed.table.column.date/schema.ts":Frt,"../columns/2026-04-14/com.shwfed.table.column.icon/schema.ts":Nrt,"../columns/2026-04-14/com.shwfed.table.column.markdown/schema.ts":qrt,"../columns/2026-04-14/com.shwfed.table.column.number/schema.ts":Wrt,"../columns/2026-04-14/com.shwfed.table.column.select/schema.ts":Xrt,"../columns/2026-04-14/com.shwfed.table.column.text/schema.ts":tat,"../columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.ts":iat,"../columns/2026-05-13/com.shwfed.table.column.switch/schema.ts":uat,"../columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.ts":hat,"../columns/2026-05-20/com.shwfed.table.column.number-input/schema.ts":yat,"../columns/2026-05-20/com.shwfed.table.column.switch.local/schema.ts":Sat,"../columns/2026-05-20/com.shwfed.table.column.switch/schema.ts":$at,"../columns/2026-05-20/com.shwfed.table.column.text-input/schema.ts":Dat,"../columns/2026-05-21/com.shwfed.table.column.drag-handle/schema.ts":Pat,"../columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.ts":zat,"../columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.ts":Lat}),gct=Object.assign({"../columns/2026-04-14/com.shwfed.table.column.actions/config.vue":sst,"../columns/2026-04-14/com.shwfed.table.column.date/config.vue":fst,"../columns/2026-04-14/com.shwfed.table.column.icon/config.vue":vst,"../columns/2026-04-14/com.shwfed.table.column.markdown/config.vue":xst,"../columns/2026-04-14/com.shwfed.table.column.number/config.vue":$st,"../columns/2026-04-14/com.shwfed.table.column.select/config.vue":Ast,"../columns/2026-04-14/com.shwfed.table.column.text/config.vue":Fst,"../columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue":Qst,"../columns/2026-05-13/com.shwfed.table.column.switch/config.vue":rlt,"../columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue":flt,"../columns/2026-05-20/com.shwfed.table.column.number-input/config.vue":blt,"../columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue":Clt,"../columns/2026-05-20/com.shwfed.table.column.switch/config.vue":Alt,"../columns/2026-05-20/com.shwfed.table.column.text-input/config.vue":Flt,"../columns/2026-05-21/com.shwfed.table.column.drag-handle/config.vue":Vlt,"../columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue":Hlt,"../columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue":Qlt}),vct=Object.assign({"../columns/2026-04-14/com.shwfed.table.column.actions/runtime.vue":sut,"../columns/2026-04-14/com.shwfed.table.column.date/runtime.vue":lut,"../columns/2026-04-14/com.shwfed.table.column.icon/runtime.vue":uut,"../columns/2026-04-14/com.shwfed.table.column.markdown/runtime.vue":cut,"../columns/2026-04-14/com.shwfed.table.column.number/runtime.vue":dut,"../columns/2026-04-14/com.shwfed.table.column.select/runtime.vue":vut,"../columns/2026-04-14/com.shwfed.table.column.text/runtime.vue":but,"../columns/2026-05-13/com.shwfed.table.column.switch.remote/runtime.vue":xut,"../columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue":Sut,"../columns/2026-05-20/com.shwfed.table.column.combobox-single/runtime.vue":Eut,"../columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue":Mut,"../columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue":Nut,"../columns/2026-05-20/com.shwfed.table.column.switch/runtime.vue":jut,"../columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue":Kut,"../columns/2026-05-21/com.shwfed.table.column.drag-handle/runtime.vue":ect,"../columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/runtime.vue":uct,"../columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/runtime.vue":mct}),Q0=(e,t)=>`${e}@${t}`,yct=X1({hostName:"shwfed-table",dirSegment:"columns",schemaModules:hct,configModules:gct,runtimeModules:vct,validateModule:(e,t,n)=>{if(typeof e.toColumnDef!="function")throw new TypeError(`[shwfed-table] column "${t}@${n}" is missing toColumnDef export`)},deriveEntryExtras:e=>{const t=new Map;for(const o of e){const r=t.get(o.type);(!r||o.compatibilityDate>r)&&t.set(o.type,o.compatibilityDate)}const n=new Map;for(const o of e){const r=o.module.migrateFrom;if(!(!r||r.length===0))for(const a of r){const i=Q0(a.type,a.compatibilityDate),l=n.get(i);if(l)throw new Error(`[shwfed-table] migrateFrom collision: source "${i}" is claimed by both "${Q0(l.type,l.compatibilityDate)}" and "${Q0(o.type,o.compatibilityDate)}"`);n.set(i,{type:o.type,compatibilityDate:o.compatibilityDate})}}return o=>{const r=n.get(Q0(o.type,o.compatibilityDate));if(r)return{deprecated:!0,supersededBy:r};const a=t.get(o.type);return o.compatibilityDate<a?{deprecated:!0,supersededBy:{type:o.type,compatibilityDate:a}}:{deprecated:!1}}}}),I$=yct.ENTRIES.map(e=>({type:e.type,compatibilityDate:e.compatibilityDate,metadata:e.module.metadata,schema:e.module.schema,config:e.config,runtime:e.runtime,toColumnDef:e.module.toColumnDef,deprecated:e.deprecated,...e.supersededBy!==void 0?{supersededBy:e.supersededBy}:{},...e.module.migrate!==void 0?{migrate:e.module.migrate}:{},...e.module.migrateFrom!==void 0?{migrateFrom:e.module.migrateFrom}:{}}));(()=>{const e=new Map;for(const t of I$){const n=t.migrateFrom;if(!(!n||n.length===0))for(const o of n)e.set(Q0(o.type,o.compatibilityDate),{type:t.type,compatibilityDate:t.compatibilityDate})}return e})();function bct(e){return I$.map(t=>t.schema(e).annotations({identifier:`${t.type}@${t.compatibilityDate}`}))}function gA(e,t){return I$.find(n=>n.type===e&&n.compatibilityDate===t)}const c4="shwfed.component.table",KE={name:"表格",icon:"fluent:table-20-regular",operations:[{id:"reset-query",name:"重置搜索条件",icon:"fluent:arrow-reset-20-regular"},{id:"reset-pagination",name:"重置分页并执行搜索",icon:"fluent:arrow-previous-20-regular"},{id:"search",name:"执行搜索",icon:"fluent:search-20-regular"},{id:"clear-selection",name:"清空所有选中行",icon:"fluent:select-all-off-20-regular"},{id:"add-row",name:"新增一行",icon:"fluent:add-20-regular"},{id:"duplicate-selected",name:"复制选中行",icon:"fluent:copy-20-regular"},{id:"delete-selected",name:"删除选中行",icon:"fluent:delete-20-regular"}]},_ct=rt({id:St.annotations({description:"列 ID"}),desc:vo(Ir,{default:()=>!1}).annotations({description:"是否降序"})}).annotations({title:"SortItem",description:"排序规则"}),xct=rt({left:ne(go(St)).annotations({description:"固定在左侧的列 ID 列表"}),right:ne(go(St)).annotations({description:"固定在右侧的列 ID 列表"})}).annotations({title:"ColumnPinning",description:"列固定配置"}),wct=rt({top:ne(go(St)).annotations({description:"固定在顶部的行 ID 列表"}),bottom:ne(go(St)).annotations({description:"固定在底部的行 ID 列表"})}).annotations({title:"RowPinning",description:"行固定配置"}),Sct=rt({columnVisibility:ne(K0({key:St,value:Ir})).annotations({description:"列可见性映射,键为列 ID,值为是否可见"}),columnOrder:ne(go(St)).annotations({description:"列顺序,列 ID 数组"}),columnPinning:ne(xct),rowPinning:ne(wct),sorting:ne(go(_ct)).annotations({description:"初始排序状态"}),expanded:ne(Jr(Ir,K0({key:St,value:Ir}))).annotations({description:"初始展开状态,true 表示全部展开,或按行 ID 映射"}),grouping:ne(go(St)).annotations({description:"分组列 ID 列表"}),columnSizing:ne(K0({key:St,value:ho})).annotations({description:"列宽映射,键为列 ID,值为像素宽度"}),rowSelection:ne(K0({key:St,value:Ir})).annotations({description:"初始行选中状态映射"})}).annotations({title:"InitialState",description:"表格初始状态"}),vA=rt({pageSize:ho.pipe(wi(),ka()).annotations({title:"初始每页行数",description:"初始每页行数"}),pageSizes:ne(go(ho.pipe(wi(),ka()))).annotations({title:"可选分页大小",description:"可选分页大小列表;留空则不显示页大小选择器"}),pageIndex:ne(ho.pipe(wi(),Yf())).annotations({description:"初始页码(从 0 开始);留空视为 0"}),left:ne(lt).annotations({title:"分页栏左侧",description:"分页栏左侧本地化 Markdown 内容"}),right:ne(lt).annotations({title:"分页栏右侧",description:"分页栏右侧本地化 Markdown 内容"})}).annotations({title:"Pagination",description:"分页配置"}),yA=rt({id:ro.annotations({description:"列分组唯一标识"}),title:ne(lt).annotations({title:"分组标题",description:"列分组标题的本地化文本"}),tooltip:ne(lt).annotations({title:"分组提示",description:"列分组提示的本地化文本"})}).annotations({title:"ColumnGroup",description:"列分组定义"}),YE="搜索条件当前状态;未配置搜索条件时为空对象";function P$(e,t){const n=Dt({configure:r=>{e(r),t?.request?.(r)},resultType:"HttpRequest"}),o=Dt({configure:r=>{e(r),r.registerVariable("json","optional<dyn>",{description:"HTTP 响应体(已解析 JSON);未配置 request 时为 none"}),t?.data?.(r)},resultType:r=>r.startsWith("list")||r==="dyn"||r.startsWith("optional")});return rt({request:ne(n).annotations({title:"请求",description:"可选的 HTTP 请求表达式;未配置时数据从 `data` 表达式中读取(通常引用上下文变量)"}),data:o.annotations({title:"数据",description:"返回行数据列表(`list<dyn>`)的 CEL 表达式;在配置了 `request` 时可通过 `json` 引用响应体"})}).annotations({title:"DataSource",description:"数据源配置"})}function Ire(e){const t=P$(e,{request:o=>{o.registerVariable("pageIndex","number",{description:"当前页码(从 0 开始);未启用分页时为 0"}),o.registerVariable("pageSize","number",{description:"每页行数;未启用分页时为 0"}),o.registerVariable("query","dyn",{description:YE})},data:o=>{o.registerVariable("query","dyn",{description:YE})}}),n=Dt({configure:o=>{e(o),o.registerVariable("json","optional<dyn>",{description:"HTTP 响应体(已解析 JSON);未配置 request 时为 none"}),o.registerVariable("query","dyn",{description:YE})},resultType:o=>o==="number"||o==="dyn"||o.startsWith("optional")});return rt({...t.fields,total:ne(n).annotations({title:"总数",description:"返回总行数(`number`)的 CEL 表达式;配置后启用服务端分页,留空则走前端分页"})}).annotations({title:"DataSource",description:"数据源配置"})}function d4(e){const t=bct(e);if(t.length===0)throw new Error("[shwfed-table] no columns registered under columns/<date>/<id>/");const n=(t.length===1?t[0]:Jr(...t)).annotations({title:"Column",description:"列定义,由 `type` 字段区分类型"}),o=Dt({configure:d=>{e(d),Bs(d),d.registerVariable("id","string",{description:"列 ID"}),d.registerVariable("selected","bool",{description:"行是否选中"}),d.registerVariable("pinned","dyn",{description:"列固定状态"})},resultType:d=>d.startsWith("map")}),r=Ti(e,{resultType:d=>d==="string"||d==="number"||d==="dyn"}),a=Ire(e),{fields:i}=Z1(d=>{e(d),d.registerVariable("selected","list<dyn>",{description:"当前已勾选的所有行(`row` 的数组)"})}),l=rt(i).annotations({title:"TableActions",description:"表格级操作按钮"}),u=v4(e);return rt({kind:Ci(c4),id:ne(ro.annotations({description:"表格实例唯一标识;作为事件目标被 op-request 引用"})),displayName:ne(St.annotations({title:"内部名称",description:"仅在配置界面可见的表格名称,用于在事件目标等位置标识该表格;运行时不展示"})),columns:go(n).annotations({description:"列定义列表"}),groups:vo(go(yA),{default:()=>[]}).annotations({title:"列分组",description:"列分组列表"}),dataSource:ne(a.annotations({title:"数据源",description:"数据源配置"})),actions:ne(l).annotations({title:"操作",description:"表格顶部操作按钮"}),query:ne(u).annotations({title:"搜索条件",description:"渲染在表格上方的搜索条件表单;其当前值以 `query` 变量注入数据源表达式"}),rowKey:ne(r).annotations({title:"行唯一标识",description:"为每一行计算稳定唯一 ID 的 CEL 表达式,可访问 `row` / `index`,结果须为字符串或数字(例如 `row.id`)。配置后,跨刷新的勾选、展开等行级状态按该 ID 匹配;留空时行身份按对象引用兜底,远端数据刷新会丢"}),cellStyle:ne(o).annotations({title:"单元格样式",description:"单元格样式 CEL 表达式"}),style:ne(St).annotations({title:"容器样式",description:"应用在表格最外层容器上的 CSS 样式字符串"}),pagination:ne(vA).annotations({title:"分页"}),initialState:ne(Sct)}).pipe(pr(d=>d.dataSource?.total!==void 0&&d.pagination===void 0?"配置了 dataSource.total 时必须启用分页":!0)).annotations({title:"TableConfig",description:"表格组件完整配置"})}function UEt(e){return{kind:c4,...e}}function Pre(){return{kind:c4,id:crypto.randomUUID(),columns:[],groups:[],dataSource:{data:"[]"},pagination:{pageSizes:[100,200,500,1e3],pageIndex:0,pageSize:100},cellStyle:`selected
|
|
159
159
|
? { 'background-color': 'color-mix(in srgb, var(--primary) 10%, white) !important' }
|
|
160
|
-
: index % 2 == 1 ? { 'background-color': 'oklch(98.5% 0 0)' } : { 'background-color': 'white' }`}}function qEt(e){return e.id}const Mre="com.shwfed.form.field.table",Rre="2026-05-18",kct={name:"表格",icon:"fluent:table-20-regular",w:{initial:12,min:6,max:1/0},h:{initial:10,min:5,max:1/0,grow:!0}};function Fre(e){const t=NC(()=>d4(e));return rt({type:Ze(Mre),compatibilityDate:Ze(Rre),...hr(e),label:ne(lt.annotations({title:"标签",description:"表格上方展示的文本;留空则不渲染标签"})),tooltip:ne(lt.annotations({title:"提示",description:"鼠标悬停在标签上时展示的说明,支持 Markdown"})),binding:ne(St.pipe(xn(1)).annotations({title:"绑定路径",description:"表格数据在表单状态中的 `dot-prop` 路径,例如 `rows`;表格从 `form.<binding>` 读取行数据,本地增删改实时写回同一路径;留空时表格无数据,行编辑不持久化"})),table:t.annotations({identifier:"FormFieldTableConfig",title:"表格配置",description:"内嵌表格的完整配置;数据源自动绑定到 `form.<binding>`,无需单独配置"})}).annotations({title:"TableField",description:"把一个可本地编辑的表格嵌入表单,其实时数据写入绑定路径"})}function Cct(){const{dataSource:e,...t}=Pre();return{table:t}}const $ct=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Rre,defaults:Cct,metadata:kct,schema:Fre,type:Mre},Symbol.toStringTag,{value:"Module"})),zre="com.shwfed.form.field.collapsible",Vre="2026-05-20",Tct={name:"可折叠区域",icon:"fluent:chevron-down-20-regular",w:{initial:12,min:4,max:1/0},h:{initial:4,min:2,max:1/0,grow:!0}};function Nre(e){const t=NC(()=>iae(e));return rt({type:Ze(zre),compatibilityDate:Ze(Vre),id:ro.annotations({description:"字段唯一标识;布局通过该 id 引用字段"}),displayName:ne(St.annotations({title:"内部名称",description:"仅在编辑器内可见的区域名,用于在侧边栏和布局编辑器中识别该折叠区域;运行时不展示"})),header:lt.annotations({title:"标题",description:"折叠区域的标题,渲染为行内 Markdown。支持 `{{ 表达式 }}` 插值,表达式为 CEL,可访问 `form`(当前表单状态)以及当前作用域内的其他变量"}),defaultCollapsed:ne(Ir.annotations({title:"默认折叠",description:"挂载时是否默认折叠;用户点击展开/收起后即时生效,**不**持久化(卸载即丢弃)"})),unit:t.annotations({identifier:"FormFieldCollapsibleUnit",title:"区域内容",description:"折叠区域内的字段与布局;这些字段在表单状态中保持扁平,不会因为分组而引入新的状态层级"})}).annotations({title:"CollapsibleField",description:"带 Markdown 标题的可折叠区域,仅用于视觉分组,不影响字段在表单状态中的层级"})}function Ect(){return{header:[{locale:"zh",message:""}],unit:{fields:[],layouts:[{name:"默认",layout:{columns:1,placements:{}}}]}}}const Dct=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Vre,defaults:Ect,metadata:Tct,schema:Nre,type:zre},Symbol.toStringTag,{value:"Module"})),Lre="com.shwfed.form.field.tree.multi",Bre="2026-05-23",Oct={name:"树(多选)",icon:"fluent:tree-evergreen-20-regular",w:{initial:8,min:4,max:1/0},h:{initial:8,min:4,max:1/0,grow:!0}};function Ure(e){const t=Dt({configure:e,resultType:"bool"}),n=u=>{e(u),u.registerVariable("node","dyn",{description:"当前节点;由 `数据` 表达式返回的每一项"})},o=Dt({configure:n,resultType:u=>u==="string"||u==="number"||u==="dyn"}),r=Dt({configure:n,resultType:u=>u==="dyn"||u.startsWith("list")||u.startsWith("optional")}),a=Dt({configure:n,resultType:"bool"}),i=$d({configure:n}),l=Dt({configure:n,resultType:u=>u==="dyn"||u.startsWith("list")||u.startsWith("optional")});return rt({type:Ze(Lre),compatibilityDate:Ze(Bre),...hr(e),label:ne(lt.annotations({title:"标签",description:"字段前展示的文本;留空则不渲染标签"})),tooltip:ne(lt.annotations({title:"提示",description:"鼠标悬停在标签上时展示的说明"})),binding:ne(St.pipe(xn(1)).annotations({title:"绑定路径",description:"写入表单状态的 `dot-prop` 路径;写入值为已勾选节点 ID 的数组;留空则为非受控字段"})),disabled:ne(t.annotations({title:"禁用条件",description:"返回 `true` 时仍渲染但不可勾选"})),readonly:ne(t.annotations({title:"只读条件",description:"返回 `true` 时仅以纯文本展示当前已勾选节点的标签"})),derived:pa(e,"dyn"),dataSource:P$(e).annotations({title:"数据源",description:"返回完整树(根节点列表)的数据源;树通过 `节点子级` 表达式逐层向下读取子级"}),nodeKey:o.annotations({title:"节点 ID",description:"为每个节点计算稳定唯一 ID 的 CEL 表达式,可访问 `node`;运行时以字符串形式存储"}),nodeChildren:r.annotations({title:"节点子级",description:"返回当前节点的子级列表的 CEL 表达式;返回 `none` / `null` 视为叶子节点"}),nodeLabel:i.annotations({title:"节点标签",description:"节点展示的本地化文本,支持 Markdown 与 `{{ node.foo }}` / `{{ form.foo }}` 插值"}),nodeTooltip:ne(i.annotations({title:"节点提示",description:"鼠标悬停在节点上时展示的本地化提示,支持 Markdown 与插值"})),nodeSelectable:ne(a.annotations({title:"节点可选条件",description:"返回 `true` 表示该节点可被勾选;级联选择仍尊重该条件"})),cascade:vo(Ze("independent","cascade-down","cascade-both"),{default:()=>"cascade-both"}).annotations({title:"级联模式",description:"`独立`:仅勾选当前节点;`向下级联`:勾选父节点同时勾选所有可选后代;`双向级联`:在向下级联基础上,父节点反映后代勾选状态(部分选中显示为半选)"}),expandAll:vo(Ir,{default:()=>!1}).annotations({title:"默认全部展开",description:"开启后挂载时展开所有非叶子节点"}),filter:ne(rt({enabled:Ir.annotations({title:"启用",description:"是否在树上方显示搜索输入框"}),label:ne(lt.annotations({title:"标签",description:"搜索输入框的浮动标签;留空则使用默认值「搜索」"})),keywords:ne(l.annotations({title:"额外关键词",description:"返回字符串列表的 CEL 表达式,可访问 `node`;匹配规则为「节点标签 或 任一关键词」包含搜索词(不区分大小写)"}))}).annotations({title:"过滤",description:"客户端过滤;过滤不会影响已选中的节点 ID"}))}).annotations({title:"TreeMultiField",description:"基于树形数据的多选输入"})}function Act(){return{dataSource:{data:"[]"},nodeKey:"string(node.id)",nodeChildren:"has(node.children) ? node.children : null",nodeLabel:[{locale:"zh",message:"{{ node.label }}"}],cascade:"cascade-both",expandAll:!1}}const Ict=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Bre,defaults:Act,metadata:Oct,schema:Ure,type:Lre},Symbol.toStringTag,{value:"Module"})),qre="com.shwfed.form.field.month",jre="2026-05-24",Pct={name:"月份",icon:"fluent:calendar-month-20-regular",w:{initial:8,min:4,max:1/0},h:{initial:2,min:2,max:2}};function f4(e){const t=Dt({configure:e,resultType:"Date"});return rt({id:ro.annotations({description:"预设唯一标识,用于稳定的 v-for key"}),label:lt.annotations({title:"标签",description:"快捷选项展示的本地化文本"}),value:t.annotations({title:"值",description:'点击该预设时计算出的月份,例如 `now().offset(-1, "months")`'})}).annotations({title:"MonthFieldPreset"})}function Hre(e){const t=Dt({configure:e,resultType:"bool"}),n=f4(e);return rt({type:Ze(qre),compatibilityDate:Ze(jre),...hr(e),label:ne(lt.annotations({title:"标签",description:"字段前展示的文本;留空则不渲染标签"})),placeholder:ne(lt.annotations({title:"占位符",description:"未选中月份时输入框中的占位文本"})),tooltip:ne(lt.annotations({title:"提示",description:"鼠标悬停在标签上时展示的说明"})),orientation:ne(Oi),binding:ne(St.pipe(xn(1)).annotations({title:"绑定路径",description:"写入表单状态的 `dot-prop` 路径,例如 `user.joinMonth`;留空则为非受控字段"})),disabled:ne(t.annotations({title:"禁用条件",description:"返回 `true` 时输入框仍然渲染但不可编辑"})),readonly:ne(t.annotations({title:"只读条件",description:"返回 `true` 时仅以纯文本展示当前值"})),derived:pa(e,"string"),format:ne(St.pipe(xn(1)).annotations({title:"展示格式",description:"输入框中展示月份的 `date-fns` 格式串;留空时使用默认 `yyyy-MM`"})),valueFormat:ne(St.pipe(xn(1)).annotations({title:"存储格式",description:"写入表单状态的 `date-fns` 格式串;留空时使用默认 `yyyy-MM`"})),presets:ne(go(n).annotations({title:"快捷选项",description:"在选择器侧栏展示的快捷预设;留空则不渲染侧栏"}))}).annotations({title:"MonthField",description:"月份选择输入"})}const Mct=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:jre,metadata:Pct,presetSchema:f4,schema:Hre,type:qre},Symbol.toStringTag,{value:"Module"})),Wre="com.shwfed.form.field.monthrange",Gre="2026-05-24",bA=St.pipe(xn(1)),Rct=Kf(bA,bA).pipe(pr(([e,t])=>e!==t,{message:()=>"起始与结束绑定路径不能相同"})),Fct=Jr(bA,Rct).annotations({title:"绑定路径",description:"写入表单状态的 `dot-prop` 路径;填写单个路径时写入 `[start, end]` 字符串数组,例如 `event.months`;填写 `[起始路径, 结束路径]` 元组时分别写入两端;留空则为非受控字段"}),zct={name:"月份范围",icon:"fluent:calendar-arrow-right-20-regular",w:{initial:10,min:10,max:1/0},h:{initial:2,min:2,max:2}};function p4(e){const t=Dt({configure:e,resultType:"Date"});return rt({id:ro.annotations({description:"预设唯一标识,用于稳定的 v-for key"}),label:lt.annotations({title:"标签",description:"快捷选项展示的本地化文本"}),start:t.annotations({title:"起始值",description:'点击该预设时计算出的起始月份,例如 `now.offset(-3, "months")`'}),end:t.annotations({title:"结束值",description:"点击该预设时计算出的结束月份,例如 `now`"})}).annotations({title:"MonthRangeFieldPreset"})}function Kre(e){const t=Dt({configure:e,resultType:"bool"}),n=p4(e);return rt({type:Ze(Wre),compatibilityDate:Ze(Gre),...hr(e),label:ne(lt.annotations({title:"标签",description:"字段前展示的文本;留空则不渲染标签"})),startPlaceholder:ne(lt.annotations({title:"起始占位符",description:"未选中起始月份时输入框中的占位文本"})),endPlaceholder:ne(lt.annotations({title:"结束占位符",description:"未选中结束月份时输入框中的占位文本"})),tooltip:ne(lt.annotations({title:"提示",description:"鼠标悬停在标签上时展示的说明"})),orientation:ne(Oi),binding:ne(Fct),disabled:ne(t.annotations({title:"禁用条件",description:"返回 `true` 时输入框仍然渲染但不可编辑"})),readonly:ne(t.annotations({title:"只读条件",description:"返回 `true` 时仅以纯文本展示当前值"})),derived:pa(e,"dyn"),format:ne(St.pipe(xn(1)).annotations({title:"展示格式",description:"输入框中展示月份的 `date-fns` 格式串;留空时使用默认 `yyyy-MM`"})),valueFormat:ne(St.pipe(xn(1)).annotations({title:"存储格式",description:"写入表单状态的 `date-fns` 格式串;留空时使用默认 `yyyy-MM`"})),rangeSeparatorIcon:ne(St.pipe(xn(1)).annotations({title:"范围分隔图标",description:"范围两端之间分隔图标的 Iconify 名称"})),presets:ne(go(n).annotations({title:"快捷选项",description:"在选择器底部展示的快捷预设;留空则不渲染"}))}).annotations({title:"MonthRangeField",description:"月份范围选择输入"})}function Vct(){return{rangeSeparatorIcon:"fluent:arrow-right-20-regular"}}const Nct=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Gre,defaults:Vct,metadata:zct,presetSchema:p4,schema:Kre,type:Wre},Symbol.toStringTag,{value:"Module"})),Lct={class:"flex flex-col gap-3"},Bct=q({name:"ShwfedMarkdownFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=une(()=>{}),o=a=>Ln(n,a)??a,r=a=>Bn(n,a);return(a,i)=>(k(),L("div",Lct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户协议说明","onUpdate:modelValue":i[0]||(i[0]=l=>{const u=String(l??"");t.value={...t.value,displayName:u.length>0?u:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("content")),1)]),_:2},[r("content")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("content"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.content,multiline:"",markdown:"","onUpdate:modelValue":i[1]||(i[1]=l=>t.value={...t.value,content:l})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":i[2]||(i[2]=l=>t.value={...t.value,hidden:l.length>0?l:void 0})},null,8,["model-value"])]),_:1})]))}}),Uct={class:"flex flex-col gap-3"},qct={class:"grid grid-cols-2 gap-3"},jct={class:"grid grid-cols-3 gap-3"},Hct={class:"grid grid-cols-3 gap-3"},Wct={class:"grid grid-cols-3 gap-3"},Gct=q({name:"ShwfedTextFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=fne(()=>{}),o=i=>Ln(n,i)??i,r=i=>Bn(n,i),a=E({get:()=>t.value.binding??"",set:i=>{const l=i.trim();if(l.length===0){const{binding:u,...d}=t.value;t.value=d}else t.value={...t.value,binding:l}}});return(i,l)=>(k(),L("div",Uct,[H("div",qct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:登录用户名","onUpdate:modelValue":l[0]||(l[0]=u=>{const d=String(u??"");t.value={...t.value,displayName:d.length>0?d:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.name`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=u=>a.value=u),placeholder:"例:user.name",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",jct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":l[2]||(l[2]=u=>t.value={...t.value,label:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":l[3]||(l[3]=u=>t.value={...t.value,placeholder:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":l[4]||(l[4]=u=>t.value={...t.value,tooltip:u})},null,8,["model-value"])]),_:1})]),H("div",Hct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":l[5]||(l[5]=u=>t.value={...t.value,orientation:u})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),u=>(k(),M(s(Xn),{key:u.value,value:u.value},{default:f(()=>[P(O(u.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Wct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[6]||(l[6]=u=>t.value={...t.value,hidden:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[7]||(l[7]=u=>t.value={...t.value,disabled:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[8]||(l[8]=u=>t.value={...t.value,readonly:u.length>0?u:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.firstName + ' ' + form.lastName","onUpdate:modelValue":l[9]||(l[9]=u=>t.value={...t.value,derived:u})},null,8,["model-value"])]),_:1})]))}}),Kct={class:"flex flex-col gap-3"},Yct={class:"grid grid-cols-2 gap-3"},Jct={class:"grid grid-cols-3 gap-3"},Xct={class:"grid grid-cols-3 gap-3"},Zct={class:"grid grid-cols-3 gap-3"},Qct=q({name:"ShwfedTextareaFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=hne(()=>{}),o=l=>Ln(n,l)??l,r=l=>Bn(n,l),a=E({get:()=>t.value.binding??"",set:l=>{const u=l.trim();if(u.length===0){const{binding:d,...p}=t.value;t.value=p}else t.value={...t.value,binding:u}}}),i=E({get:()=>t.value.rows!=null?String(t.value.rows):"",set:l=>{const u=String(l??"").trim();if(u.length===0){t.value={...t.value,rows:void 0};return}const d=Number(u);if(!Number.isFinite(d)||!Number.isInteger(d)||d<=0){t.value={...t.value,rows:void 0};return}t.value={...t.value,rows:d}}});return(l,u)=>(k(),L("div",Kct,[H("div",Yct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:个人简介","onUpdate:modelValue":u[0]||(u[0]=d=>{const p=String(d??"");t.value={...t.value,displayName:p.length>0?p:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.bio`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":u[1]||(u[1]=d=>a.value=d),placeholder:"例:user.bio",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Jct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":u[2]||(u[2]=d=>t.value={...t.value,label:d})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":u[3]||(u[3]=d=>t.value={...t.value,placeholder:d})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":u[4]||(u[4]=d=>t.value={...t.value,tooltip:d})},null,8,["model-value"])]),_:1})]),H("div",Xct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":u[5]||(u[5]=d=>t.value={...t.value,orientation:d})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),d=>(k(),M(s(Xn),{key:d.value,value:d.value},{default:f(()=>[P(O(d.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("rows")),1)]),_:2},[r("rows")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("rows"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":u[6]||(u[6]=d=>i.value=d),type:"number",min:"1",step:"1",placeholder:"例:4"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Zct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[7]||(u[7]=d=>t.value={...t.value,hidden:d.length>0?d:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[8]||(u[8]=d=>t.value={...t.value,disabled:d.length>0?d:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[9]||(u[9]=d=>t.value={...t.value,readonly:d.length>0?d:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.summary","onUpdate:modelValue":u[10]||(u[10]=d=>t.value={...t.value,derived:d})},null,8,["model-value"])]),_:1})]))}}),n_=Symbol("shwfed.form.field-layout"),edt=q({name:"ShwfedActionsFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=yne(()=>{}),o=l=>Ln(n,l)??l,r=l=>Bn(n,l),a=Fn(n_,null);Pt(()=>{a&&(a.fullPane.value=!0)}),tr(()=>{a&&(a.fullPane.value=!1)});const i=E({get:()=>({kind:"shwfed.component.action",size:"default",gap:t.value.gap??4,style:t.value.style,groups:t.value.groups??[],items:t.value.items??[]}),set:l=>{const{gap:u,style:d,groups:p,items:m}=l,{style:h,...g}=t.value;t.value={...g,gap:u,groups:p,items:m,...d===void 0?{}:{style:d}}}});return(l,u)=>(k(),M(D$,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=d=>i.value=d)},{"general-extra":f(()=>[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:提交区按钮组","onUpdate:modelValue":u[0]||(u[0]=d=>{const p=String(d??"");t.value={...t.value,displayName:p.length>0?p:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[1]||(u[1]=d=>t.value={...t.value,hidden:d.length>0?d:void 0})},null,8,["model-value"])]),_:1})]),_:1},8,["modelValue"]))}}),tdt={class:"flex flex-col gap-3"},ndt={class:"grid grid-cols-2 gap-3"},odt={class:"grid grid-cols-3 gap-3"},rdt={class:"grid grid-cols-3 gap-3"},adt={class:"grid grid-cols-1 gap-3"},idt={class:"grid grid-cols-2 gap-3"},sdt={class:"grid grid-cols-3 gap-3"},ldt=q({name:"ShwfedComboboxSingleFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=xne(()=>{}),o=i=>Ln(n,i)??i,r=i=>Bn(n,i),a=E({get:()=>t.value.binding??"",set:i=>{const l=i.trim();if(l.length===0){const{binding:u,...d}=t.value;t.value=d}else t.value={...t.value,binding:l}}});return(i,l)=>(k(),L("div",tdt,[H("div",ndt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户角色","onUpdate:modelValue":l[0]||(l[0]=u=>{const d=String(u??"");t.value={...t.value,displayName:d.length>0?d:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.role`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=u=>a.value=u),placeholder:"例:user.role",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",odt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":l[2]||(l[2]=u=>t.value={...t.value,label:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":l[3]||(l[3]=u=>t.value={...t.value,placeholder:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":l[4]||(l[4]=u=>t.value={...t.value,tooltip:u})},null,8,["model-value"])]),_:1})]),H("div",rdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":l[5]||(l[5]=u=>t.value={...t.value,orientation:u})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),u=>(k(),M(s(Xn),{key:u.value,value:u.value},{default:f(()=>[P(O(u.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",adt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("options")??"返回选项数组的 CEL 表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("options")),1)]),_:1}),c(s(qe),{"model-value":t.value.options,placeholder:'例:[{"value": "a", "label": "A"}]',"result-type":"list",class:"min-h-10","onUpdate:modelValue":l[6]||(l[6]=u=>t.value={...t.value,options:u})},null,8,["model-value"])]),_:1})]),H("div",idt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("optionValue")??"从当前 `option` 提取写入绑定的值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("optionValue")),1)]),_:1}),c(s(qe),{"model-value":t.value.optionValue,placeholder:'例:option["value"]',"result-type":"dyn",class:"min-h-10","onUpdate:modelValue":l[7]||(l[7]=u=>t.value={...t.value,optionValue:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("optionLabel")??"每个选项展示的本地化文本,支持 `{{ string(option.foo) }}` 插值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("optionLabel")),1)]),_:1}),c(s(Ye),{"model-value":t.value.optionLabel,"onUpdate:modelValue":l[8]||(l[8]=u=>t.value={...t.value,optionLabel:u})},null,8,["model-value"])]),_:1})]),H("div",sdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[9]||(l[9]=u=>t.value={...t.value,hidden:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时下拉框仍然渲染但不可选择",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[10]||(l[10]=u=>t.value={...t.value,disabled:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[11]||(l[11]=u=>t.value={...t.value,readonly:u.length>0?u:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.category","onUpdate:modelValue":l[12]||(l[12]=u=>t.value={...t.value,derived:u})},null,8,["model-value"])]),_:1})]))}}),udt={class:"flex flex-col gap-3"},cdt={class:"grid grid-cols-2 gap-3"},ddt={class:"grid grid-cols-3 gap-3"},fdt={class:"grid grid-cols-3 gap-3"},pdt={class:"grid grid-cols-3 gap-3"},mdt={class:"flex flex-col gap-3"},hdt={class:"grid grid-cols-3 gap-3"},gdt=q({name:"ShwfedDateFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=kne(()=>{}),o=$=>Ln(n,$)??$,r=$=>Bn(n,$),a=GR(()=>{}),i=$=>Ln(a,$)??$,l=$=>Bn(a,$),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,$=>{const T=Math.random()*16|0;return($==="x"?T:T&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],value:""}}function m($,T){const D=[...t.value.presets??[]],A=D[$];A&&(D[$]={...A,...T},t.value={...t.value,presets:D})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g($){const T=[...t.value.presets??[]];T.splice($,1),t.value={...t.value,presets:T}}function v($,T){m($,{label:T})}function b($,T){m($,{value:T})}const x=E({get:()=>t.value.binding??"",set:$=>{const T=$.trim();if(T.length===0){const{binding:D,...A}=t.value;t.value=A}else t.value={...t.value,binding:T}}}),y=E({get:()=>t.value.format??"",set:$=>{const T=$.trim();if(T.length===0){const{format:D,...A}=t.value;t.value=A}else t.value={...t.value,format:T}}}),_=E({get:()=>t.value.valueFormat??"",set:$=>{const T=$.trim();if(T.length===0){const{valueFormat:D,...A}=t.value;t.value=A}else t.value={...t.value,valueFormat:T}}});function w($){if(!$)return"";try{return ir(new Date,$)}catch{return"(无效格式)"}}const S=E(()=>w(t.value.format??"")),C=E(()=>w(t.value.valueFormat??""));return($,T)=>(k(),L("div",udt,[H("div",cdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:生日","onUpdate:modelValue":T[0]||(T[0]=D=>{const A=String(D??"");t.value={...t.value,displayName:A.length>0?A:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.birthday`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:x.value,"onUpdate:modelValue":T[1]||(T[1]=D=>x.value=D),placeholder:"例:user.birthday",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",ddt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":T[2]||(T[2]=D=>t.value={...t.value,label:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":T[3]||(T[3]=D=>t.value={...t.value,placeholder:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":T[4]||(T[4]=D=>t.value={...t.value,tooltip:D})},null,8,["model-value"])]),_:1})]),H("div",fdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示日期的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:y.value,"onUpdate:modelValue":T[5]||(T[5]=D=>y.value=D),placeholder:"例:yyyy-MM-dd",class:"font-mono"},null,8,["modelValue"]),S.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(S.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":T[6]||(T[6]=D=>_.value=D),placeholder:"例:yyyy-MM-dd",class:"font-mono"},null,8,["modelValue"]),C.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(C.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),H("div",pdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":T[7]||(T[7]=D=>t.value={...t.value,orientation:D})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),D=>(k(),M(s(Xn),{key:D.value,value:D.value},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",mdt,[(k(!0),L(Me,null,Ke(u.value,(D,A)=>(k(),L("div",{key:D.id,"data-slot":"date-field-preset",class:"relative pt-8 grid grid-cols-2 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"date-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:I=>g(A)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"date field preset label","model-value":D.label,"onUpdate:modelValue":I=>v(A,I)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":D.value,placeholder:'例:now.offset(-7, "days")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":I=>b(A,I)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"date-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),T[12]||(T[12]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",hdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[8]||(T[8]=D=>t.value={...t.value,hidden:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[9]||(T[9]=D=>t.value={...t.value,disabled:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[10]||(T[10]=D=>t.value={...t.value,readonly:D.length>0?D:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.startDate","onUpdate:modelValue":T[11]||(T[11]=D=>t.value={...t.value,derived:D})},null,8,["model-value"])]),_:1})]))}}),vdt={class:"flex flex-col gap-3"},ydt={class:"grid grid-cols-2 gap-3"},bdt={key:1,class:"grid grid-cols-2 gap-2"},_dt={class:"grid grid-cols-2 gap-3"},xdt={class:"grid grid-cols-2 gap-3"},wdt={class:"grid grid-cols-3 gap-3"},Sdt={class:"grid grid-cols-3 gap-3"},kdt={class:"flex flex-col gap-3"},Cdt={class:"grid grid-cols-3 gap-3"},$dt=q({name:"ShwfedDateRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Tne(()=>{}),o=R=>Ln(n,R)??R,r=R=>Bn(n,R),a=KR(()=>{}),i=R=>Ln(a,R)??R,l=R=>Bn(a,R),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,R=>{const G=Math.random()*16|0;return(R==="x"?G:G&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],start:"",end:""}}function m(R,G){const Z=[...t.value.presets??[]],Y=Z[R];Y&&(Z[R]={...Y,...G},t.value={...t.value,presets:Z})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g(R){const G=[...t.value.presets??[]];G.splice(R,1),t.value={...t.value,presets:G}}function v(R,G){m(R,{label:G})}function b(R,G){m(R,{start:G})}function x(R,G){m(R,{end:G})}const y=E(()=>Array.isArray(t.value.binding)?"split":"single"),_=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:R=>{const G=R.trim();if(G.length===0){const{binding:Z,...Y}=t.value;t.value=Y}else t.value={...t.value,binding:G}}}),w=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),S=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function C(R){const G=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[R.trim(),G[1]]}}function $(R){const G=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[G[0],R.trim()]}}function T(){if(y.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:R,...G}=t.value;t.value=G}}const D=E({get:()=>t.value.format??"",set:R=>{const G=R.trim();if(G.length===0){const{format:Z,...Y}=t.value;t.value=Y}else t.value={...t.value,format:G}}}),A=E({get:()=>t.value.valueFormat??"",set:R=>{const G=R.trim();if(G.length===0){const{valueFormat:Z,...Y}=t.value;t.value=Y}else t.value={...t.value,valueFormat:G}}});function I(R){const G=R.trim();if(G.length===0){const{rangeSeparatorIcon:Z,...Y}=t.value;t.value=Y}else t.value={...t.value,rangeSeparatorIcon:G}}function U(R){if(R==null||!Number.isInteger(R)||R<=0){const{numberOfMonths:G,...Z}=t.value;t.value=Z;return}t.value={...t.value,numberOfMonths:R}}function j(R){if(!R)return"";try{return ir(new Date,R)}catch{return"(无效格式)"}}const Q=E(()=>j(t.value.format??"")),F=E(()=>j(t.value.valueFormat??""));return(R,G)=>(k(),L("div",vdt,[H("div",ydt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:日期范围","onUpdate:modelValue":G[0]||(G[0]=Z=>{const Y=String(Z??"");t.value={...t.value,displayName:Y.length>0?Y:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 字符串数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),y.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":G[1]||(G[1]=Z=>_.value=Z),placeholder:"例:event.range",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",bdt,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...G[15]||(G[15]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":w.value,placeholder:"例:event.start",class:"font-mono","onUpdate:modelValue":G[2]||(G[2]=Z=>C(String(Z??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...G[16]||(G[16]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":S.value,placeholder:"例:event.end",class:"font-mono","onUpdate:modelValue":G[3]||(G[3]=Z=>$(String(Z??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",_dt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":G[4]||(G[4]=Z=>t.value={...t.value,label:Z})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":G[5]||(G[5]=Z=>t.value={...t.value,tooltip:Z})},null,8,["model-value"])]),_:1})]),H("div",xdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("startPlaceholder")),1)]),_:2},[r("startPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("startPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.startPlaceholder,"onUpdate:modelValue":G[6]||(G[6]=Z=>t.value={...t.value,startPlaceholder:Z})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("endPlaceholder")),1)]),_:2},[r("endPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("endPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.endPlaceholder,"onUpdate:modelValue":G[7]||(G[7]=Z=>t.value={...t.value,endPlaceholder:Z})},null,8,["model-value"])]),_:1})]),H("div",wdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示日期的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:D.value,"onUpdate:modelValue":G[8]||(G[8]=Z=>D.value=Z),placeholder:"例:yyyy-MM-dd",class:"font-mono"},null,8,["modelValue"]),Q.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(Q.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:A.value,"onUpdate:modelValue":G[9]||(G[9]=Z=>A.value=Z),placeholder:"例:yyyy-MM-dd",class:"font-mono"},null,8,["modelValue"]),F.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(F.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),H("div",Sdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":G[10]||(G[10]=Z=>t.value={...t.value,orientation:Z})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),Z=>(k(),M(s(Xn),{key:Z.value,value:Z.value},{default:f(()=>[P(O(Z.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":I},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("numberOfMonths")??"日历面板中并排显示的月份数",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("numberOfMonths")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.numberOfMonths,min:1,step:1,"onUpdate:modelValue":U},null,8,["model-value"])]),_:1})]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",kdt,[(k(!0),L(Me,null,Ke(u.value,(Z,Y)=>(k(),L("div",{key:Z.id,"data-slot":"daterange-field-preset",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"daterange-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:he=>g(Y)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"date range field preset label","model-value":Z.label,"onUpdate:modelValue":he=>v(Y,he)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("start")),1)]),_:2},[l("start")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("start"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":Z.start,placeholder:'例:now.offset(-7, "days")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":he=>b(Y,he)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("end")),1)]),_:2},[l("end")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("end"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":Z.end,placeholder:"例:now","result-type":"Date",class:"min-h-10","onUpdate:modelValue":he=>x(Y,he)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"daterange-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),G[17]||(G[17]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",Cdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":G[11]||(G[11]=Z=>t.value={...t.value,hidden:Z.length>0?Z:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":G[12]||(G[12]=Z=>t.value={...t.value,disabled:Z.length>0?Z:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":G[13]||(G[13]=Z=>t.value={...t.value,readonly:Z.length>0?Z:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.from, form.to]","onUpdate:modelValue":G[14]||(G[14]=Z=>t.value={...t.value,derived:Z})},null,8,["model-value"])]),_:1})]))}}),Tdt={class:"flex flex-col gap-3"},Edt={class:"grid grid-cols-2 gap-3"},Ddt={class:"grid grid-cols-3 gap-3"},Odt={class:"grid grid-cols-3 gap-3"},Adt={class:"flex flex-col gap-3"},Idt={class:"grid grid-cols-3 gap-3"},Pdt={class:"grid grid-cols-3 gap-3"},Mdt=q({name:"ShwfedDateTimeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Pne(()=>{}),o=D=>Ln(n,D)??D,r=D=>Bn(n,D),a=YR(()=>{}),i=D=>Ln(a,D)??D,l=D=>Bn(a,D),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,D=>{const A=Math.random()*16|0;return(D==="x"?A:A&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],value:""}}function m(D,A){const I=[...t.value.presets??[]],U=I[D];U&&(I[D]={...U,...A},t.value={...t.value,presets:I})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g(D){const A=[...t.value.presets??[]];A.splice(D,1),t.value={...t.value,presets:A}}function v(D,A){m(D,{label:A})}function b(D,A){m(D,{value:A})}const x=E({get:()=>t.value.binding??"",set:D=>{const A=D.trim();if(A.length===0){const{binding:I,...U}=t.value;t.value=U}else t.value={...t.value,binding:A}}}),y=E({get:()=>t.value.format??"",set:D=>{const A=D.trim();if(A.length===0){const{format:I,...U}=t.value;t.value=U}else t.value={...t.value,format:A}}}),_=E({get:()=>t.value.valueFormat??"",set:D=>{const A=D.trim();if(A.length===0){const{valueFormat:I,...U}=t.value;t.value=U}else t.value={...t.value,valueFormat:A}}}),w=E({get:()=>t.value.timeGranularity??"second",set:D=>{if(D==="second"){const{timeGranularity:A,...I}=t.value;t.value=I}else t.value={...t.value,timeGranularity:D}}}),S=E({get:()=>t.value.hourCycle??24,set:D=>{if(D===24){const{hourCycle:A,...I}=t.value;t.value=I}else t.value={...t.value,hourCycle:D}}});function C(D){if(!D)return"";try{return ir(new Date,D)}catch{return"(无效格式)"}}const $=E(()=>C(t.value.format??"")),T=E(()=>C(t.value.valueFormat??""));return(D,A)=>(k(),L("div",Tdt,[H("div",Edt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:开始时间","onUpdate:modelValue":A[0]||(A[0]=I=>{const U=String(I??"");t.value={...t.value,displayName:U.length>0?U:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `event.startAt`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:x.value,"onUpdate:modelValue":A[1]||(A[1]=I=>x.value=I),placeholder:"例:event.startAt",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Ddt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":A[2]||(A[2]=I=>t.value={...t.value,label:I})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":A[3]||(A[3]=I=>t.value={...t.value,placeholder:I})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":A[4]||(A[4]=I=>t.value={...t.value,tooltip:I})},null,8,["model-value"])]),_:1})]),H("div",Odt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示日期时间的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:y.value,"onUpdate:modelValue":A[5]||(A[5]=I=>y.value=I),placeholder:"例:yyyy-MM-dd HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),$.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O($.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":A[6]||(A[6]=I=>_.value=I),placeholder:"例:yyyy-MM-dd HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),T.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(T.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",Adt,[(k(!0),L(Me,null,Ke(u.value,(I,U)=>(k(),L("div",{key:I.id,"data-slot":"datetime-field-preset",class:"relative pt-8 grid grid-cols-2 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"datetime-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:j=>g(U)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"datetime field preset label","model-value":I.label,"onUpdate:modelValue":j=>v(U,j)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":I.value,placeholder:'例:now.offset(-1, "hours")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":j=>b(U,j)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"datetime-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),A[14]||(A[14]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",Idt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":A[7]||(A[7]=I=>t.value={...t.value,orientation:I})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),I=>(k(),M(s(Xn),{key:I.value,value:I.value},{default:f(()=>[P(O(I.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("timeGranularity")??"可编辑到的最小时间单位",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("timeGranularity")),1)]),_:1}),c(s(Yn),{"model-value":w.value,"onUpdate:modelValue":A[8]||(A[8]=I=>w.value=I)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Ane),I=>(k(),M(s(Xn),{key:I.value,value:I.value},{default:f(()=>[P(O(I.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hourCycle")??"12 小时制或 24 小时制",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hourCycle")),1)]),_:1}),c(s(Yn),{"model-value":String(S.value),"onUpdate:modelValue":A[9]||(A[9]=I=>S.value=Number(I))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Ine),I=>(k(),M(s(Xn),{key:I.value,value:String(I.value)},{default:f(()=>[P(O(I.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Pdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":A[10]||(A[10]=I=>t.value={...t.value,hidden:I.length>0?I:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":A[11]||(A[11]=I=>t.value={...t.value,disabled:I.length>0?I:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":A[12]||(A[12]=I=>t.value={...t.value,readonly:I.length>0?I:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.createdAt","onUpdate:modelValue":A[13]||(A[13]=I=>t.value={...t.value,derived:I})},null,8,["model-value"])]),_:1})]))}}),Rdt={class:"flex flex-col gap-3"},Fdt={class:"grid grid-cols-2 gap-3"},zdt={key:1,class:"grid grid-cols-2 gap-2"},Vdt={class:"grid grid-cols-2 gap-3"},Ndt={class:"grid grid-cols-2 gap-3"},Ldt={class:"grid grid-cols-3 gap-3"},Bdt={class:"flex flex-col gap-3"},Udt={class:"grid grid-cols-3 gap-3"},qdt={class:"grid grid-cols-2 gap-3"},jdt={class:"grid grid-cols-3 gap-3"},Hdt=q({name:"ShwfedDateTimeRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Nne(()=>{}),o=Z=>Ln(n,Z)??Z,r=Z=>Bn(n,Z),a=JR(()=>{}),i=Z=>Ln(a,Z)??Z,l=Z=>Bn(a,Z),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,Z=>{const Y=Math.random()*16|0;return(Z==="x"?Y:Y&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],start:"",end:""}}function m(Z,Y){const he=[...t.value.presets??[]],ue=he[Z];ue&&(he[Z]={...ue,...Y},t.value={...t.value,presets:he})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g(Z){const Y=[...t.value.presets??[]];Y.splice(Z,1),t.value={...t.value,presets:Y}}function v(Z,Y){m(Z,{label:Y})}function b(Z,Y){m(Z,{start:Y})}function x(Z,Y){m(Z,{end:Y})}const y=E(()=>Array.isArray(t.value.binding)?"split":"single"),_=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:Z=>{const Y=Z.trim();if(Y.length===0){const{binding:he,...ue}=t.value;t.value=ue}else t.value={...t.value,binding:Y}}}),w=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),S=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function C(Z){const Y=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[Z.trim(),Y[1]]}}function $(Z){const Y=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[Y[0],Z.trim()]}}function T(){if(y.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:Z,...Y}=t.value;t.value=Y}}const D=E({get:()=>t.value.format??"",set:Z=>{const Y=Z.trim();if(Y.length===0){const{format:he,...ue}=t.value;t.value=ue}else t.value={...t.value,format:Y}}}),A=E({get:()=>t.value.valueFormat??"",set:Z=>{const Y=Z.trim();if(Y.length===0){const{valueFormat:he,...ue}=t.value;t.value=ue}else t.value={...t.value,valueFormat:Y}}});function I(Z){const Y=Z.trim();if(Y.length===0){const{rangeSeparatorIcon:he,...ue}=t.value;t.value=ue}else t.value={...t.value,rangeSeparatorIcon:Y}}function U(Z){if(Z==null||!Number.isInteger(Z)||Z<=0){const{numberOfMonths:Y,...he}=t.value;t.value=he;return}t.value={...t.value,numberOfMonths:Z}}const j=E({get:()=>t.value.timeGranularity??"second",set:Z=>{if(Z==="second"){const{timeGranularity:Y,...he}=t.value;t.value=he}else t.value={...t.value,timeGranularity:Z}}}),Q=E({get:()=>t.value.hourCycle??24,set:Z=>{if(Z===24){const{hourCycle:Y,...he}=t.value;t.value=he}else t.value={...t.value,hourCycle:Z}}});function F(Z){if(!Z)return"";try{return ir(new Date,Z)}catch{return"(无效格式)"}}const R=E(()=>F(t.value.format??"")),G=E(()=>F(t.value.valueFormat??""));return(Z,Y)=>(k(),L("div",Rdt,[H("div",Fdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:事件区间","onUpdate:modelValue":Y[0]||(Y[0]=he=>{const ue=String(he??"");t.value={...t.value,displayName:ue.length>0?ue:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 字符串数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),y.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":Y[1]||(Y[1]=he=>_.value=he),placeholder:"例:event.range",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",zdt,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...Y[17]||(Y[17]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":w.value,placeholder:"例:event.start",class:"font-mono","onUpdate:modelValue":Y[2]||(Y[2]=he=>C(String(he??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...Y[18]||(Y[18]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":S.value,placeholder:"例:event.end",class:"font-mono","onUpdate:modelValue":Y[3]||(Y[3]=he=>$(String(he??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",Vdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":Y[4]||(Y[4]=he=>t.value={...t.value,label:he})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":Y[5]||(Y[5]=he=>t.value={...t.value,tooltip:he})},null,8,["model-value"])]),_:1})]),H("div",Ndt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("startPlaceholder")),1)]),_:2},[r("startPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("startPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.startPlaceholder,"onUpdate:modelValue":Y[6]||(Y[6]=he=>t.value={...t.value,startPlaceholder:he})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("endPlaceholder")),1)]),_:2},[r("endPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("endPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.endPlaceholder,"onUpdate:modelValue":Y[7]||(Y[7]=he=>t.value={...t.value,endPlaceholder:he})},null,8,["model-value"])]),_:1})]),H("div",Ldt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示日期时间的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:D.value,"onUpdate:modelValue":Y[8]||(Y[8]=he=>D.value=he),placeholder:"例:yyyy-MM-dd HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),R.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(R.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:A.value,"onUpdate:modelValue":Y[9]||(Y[9]=he=>A.value=he),placeholder:"例:yyyy-MM-dd HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),G.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(G.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",Bdt,[(k(!0),L(Me,null,Ke(u.value,(he,ue)=>(k(),L("div",{key:he.id,"data-slot":"datetimerange-field-preset",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"datetimerange-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:pe=>g(ue)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"datetime range field preset label","model-value":he.label,"onUpdate:modelValue":pe=>v(ue,pe)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("start")),1)]),_:2},[l("start")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("start"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":he.start,placeholder:'例:now.offset(-1, "hours")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":pe=>b(ue,pe)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("end")),1)]),_:2},[l("end")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("end"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":he.end,placeholder:"例:now","result-type":"Date",class:"min-h-10","onUpdate:modelValue":pe=>x(ue,pe)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"datetimerange-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),Y[19]||(Y[19]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",Udt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":Y[10]||(Y[10]=he=>t.value={...t.value,orientation:he})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),he=>(k(),M(s(Xn),{key:he.value,value:he.value},{default:f(()=>[P(O(he.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":I},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("numberOfMonths")??"日历面板中并排显示的月份数",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("numberOfMonths")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.numberOfMonths,min:1,step:1,"onUpdate:modelValue":U},null,8,["model-value"])]),_:1})]),_:1})]),H("div",qdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("timeGranularity")??"可编辑到的最小时间单位",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("timeGranularity")),1)]),_:1}),c(s(Yn),{"model-value":j.value,"onUpdate:modelValue":Y[11]||(Y[11]=he=>j.value=he)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(zne),he=>(k(),M(s(Xn),{key:he.value,value:he.value},{default:f(()=>[P(O(he.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hourCycle")??"12 小时制或 24 小时制",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hourCycle")),1)]),_:1}),c(s(Yn),{"model-value":String(Q.value),"onUpdate:modelValue":Y[12]||(Y[12]=he=>Q.value=Number(he))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Vne),he=>(k(),M(s(Xn),{key:he.value,value:String(he.value)},{default:f(()=>[P(O(he.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",jdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":Y[13]||(Y[13]=he=>t.value={...t.value,hidden:he.length>0?he:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":Y[14]||(Y[14]=he=>t.value={...t.value,disabled:he.length>0?he:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":Y[15]||(Y[15]=he=>t.value={...t.value,readonly:he.length>0?he:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.from, form.to]","onUpdate:modelValue":Y[16]||(Y[16]=he=>t.value={...t.value,derived:he})},null,8,["model-value"])]),_:1})]))}}),Wdt={class:"flex flex-col gap-3"},Gdt={class:"grid grid-cols-2 gap-3"},Kdt={class:"grid grid-cols-2 gap-3"},Ydt={class:"grid grid-cols-3 gap-3"},Jdt={class:"grid grid-cols-2 gap-3"},Xdt={class:"grid grid-cols-3 gap-3"},Zdt=q({name:"ShwfedTimeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Hne(()=>{}),o=p=>Ln(n,p)??p,r=p=>Bn(n,p),a=E({get:()=>t.value.binding??"",set:p=>{const m=p.trim();if(m.length===0){const{binding:h,...g}=t.value;t.value=g}else t.value={...t.value,binding:m}}}),i=E({get:()=>t.value.valueFormat??"",set:p=>{const m=p.trim();if(m.length===0){const{valueFormat:h,...g}=t.value;t.value=g}else t.value={...t.value,valueFormat:m}}}),l=E({get:()=>t.value.timeGranularity??"second",set:p=>{if(p==="second"){const{timeGranularity:m,...h}=t.value;t.value=h}else t.value={...t.value,timeGranularity:p}}}),u=E({get:()=>t.value.hourCycle??24,set:p=>{if(p===24){const{hourCycle:m,...h}=t.value;t.value=h}else t.value={...t.value,hourCycle:p}}}),d=E(()=>{const p=t.value.valueFormat??"";if(!p)return"";try{return ir(new Date,p)}catch{return"(无效格式)"}});return(p,m)=>(k(),L("div",Wdt,[H("div",Gdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:开始时刻","onUpdate:modelValue":m[0]||(m[0]=h=>{const g=String(h??"");t.value={...t.value,displayName:g.length>0?g:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `meeting.startTime`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=h=>a.value=h),placeholder:"例:meeting.startTime",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Kdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":m[2]||(m[2]=h=>t.value={...t.value,label:h})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":m[3]||(m[3]=h=>t.value={...t.value,tooltip:h})},null,8,["model-value"])]),_:1})]),H("div",Ydt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":m[4]||(m[4]=h=>i.value=h),placeholder:"例:HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),d.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(d.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":m[5]||(m[5]=h=>t.value={...t.value,orientation:h})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),h=>(k(),M(s(Xn),{key:h.value,value:h.value},{default:f(()=>[P(O(h.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Jdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("timeGranularity")??"可编辑到的最小时间单位",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("timeGranularity")),1)]),_:1}),c(s(Yn),{"model-value":l.value,"onUpdate:modelValue":m[6]||(m[6]=h=>l.value=h)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(qne),h=>(k(),M(s(Xn),{key:h.value,value:h.value},{default:f(()=>[P(O(h.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hourCycle")??"12 小时制或 24 小时制",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hourCycle")),1)]),_:1}),c(s(Yn),{"model-value":String(u.value),"onUpdate:modelValue":m[7]||(m[7]=h=>u.value=Number(h))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(jne),h=>(k(),M(s(Xn),{key:h.value,value:String(h.value)},{default:f(()=>[P(O(h.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Xdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":m[8]||(m[8]=h=>t.value={...t.value,hidden:h.length>0?h:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":m[9]||(m[9]=h=>t.value={...t.value,disabled:h.length>0?h:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":m[10]||(m[10]=h=>t.value={...t.value,readonly:h.length>0?h:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.startTime","onUpdate:modelValue":m[11]||(m[11]=h=>t.value={...t.value,derived:h})},null,8,["model-value"])]),_:1})]))}}),Qdt={class:"flex flex-col gap-3"},eft={class:"grid grid-cols-2 gap-3"},tft={key:1,class:"grid grid-cols-2 gap-2"},nft={class:"grid grid-cols-2 gap-3"},oft={class:"grid grid-cols-3 gap-3"},rft={class:"grid grid-cols-3 gap-3"},aft={class:"grid grid-cols-3 gap-3"},ift=q({name:"ShwfedTimeRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Xne(()=>{}),o=y=>Ln(n,y)??y,r=y=>Bn(n,y),a=E(()=>Array.isArray(t.value.binding)?"split":"single"),i=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:y=>{const _=y.trim();if(_.length===0){const{binding:w,...S}=t.value;t.value=S}else t.value={...t.value,binding:_}}}),l=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),u=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function d(y){const _=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[y.trim(),_[1]]}}function p(y){const _=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[_[0],y.trim()]}}function m(){if(a.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:y,..._}=t.value;t.value=_}}const h=E({get:()=>t.value.valueFormat??"",set:y=>{const _=y.trim();if(_.length===0){const{valueFormat:w,...S}=t.value;t.value=S}else t.value={...t.value,valueFormat:_}}});function g(y){const _=y.trim();if(_.length===0){const{rangeSeparatorIcon:w,...S}=t.value;t.value=S}else t.value={...t.value,rangeSeparatorIcon:_}}const v=E({get:()=>t.value.timeGranularity??"second",set:y=>{if(y==="second"){const{timeGranularity:_,...w}=t.value;t.value=w}else t.value={...t.value,timeGranularity:y}}}),b=E({get:()=>t.value.hourCycle??24,set:y=>{if(y===24){const{hourCycle:_,...w}=t.value;t.value=w}else t.value={...t.value,hourCycle:y}}}),x=E(()=>{const y=t.value.valueFormat??"";if(!y)return"";try{return ir(new Date,y)}catch{return"(无效格式)"}});return(y,_)=>(k(),L("div",Qdt,[H("div",eft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:会议时段","onUpdate:modelValue":_[0]||(_[0]=w=>{const S=String(w??"");t.value={...t.value,displayName:S.length>0?S:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 字符串数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),a.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":_[1]||(_[1]=w=>i.value=w),placeholder:"例:meeting.timeRange",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:m},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",tft,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[..._[14]||(_[14]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":l.value,placeholder:"例:meeting.startTime",class:"font-mono","onUpdate:modelValue":_[2]||(_[2]=w=>d(String(w??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[..._[15]||(_[15]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":u.value,placeholder:"例:meeting.endTime",class:"font-mono","onUpdate:modelValue":_[3]||(_[3]=w=>p(String(w??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:m},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",nft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":_[4]||(_[4]=w=>t.value={...t.value,label:w})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":_[5]||(_[5]=w=>t.value={...t.value,tooltip:w})},null,8,["model-value"])]),_:1})]),H("div",oft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:h.value,"onUpdate:modelValue":_[6]||(_[6]=w=>h.value=w),placeholder:"例:HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),x.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(x.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":_[7]||(_[7]=w=>t.value={...t.value,orientation:w})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),w=>(k(),M(s(Xn),{key:w.value,value:w.value},{default:f(()=>[P(O(w.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",rft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":g},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("timeGranularity")??"可编辑到的最小时间单位",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("timeGranularity")),1)]),_:1}),c(s(Yn),{"model-value":v.value,"onUpdate:modelValue":_[8]||(_[8]=w=>v.value=w)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Yne),w=>(k(),M(s(Xn),{key:w.value,value:w.value},{default:f(()=>[P(O(w.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hourCycle")??"12 小时制或 24 小时制",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hourCycle")),1)]),_:1}),c(s(Yn),{"model-value":String(b.value),"onUpdate:modelValue":_[9]||(_[9]=w=>b.value=Number(w))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Jne),w=>(k(),M(s(Xn),{key:w.value,value:String(w.value)},{default:f(()=>[P(O(w.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",aft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":_[10]||(_[10]=w=>t.value={...t.value,hidden:w.length>0?w:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":_[11]||(_[11]=w=>t.value={...t.value,disabled:w.length>0?w:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":_[12]||(_[12]=w=>t.value={...t.value,readonly:w.length>0?w:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.from, form.to]","onUpdate:modelValue":_[13]||(_[13]=w=>t.value={...t.value,derived:w})},null,8,["model-value"])]),_:1})]))}}),sft={class:"flex flex-col gap-3"},lft={class:"grid grid-cols-2 gap-3"},uft={class:"grid grid-cols-3 gap-3"},cft={class:"grid grid-cols-3 gap-3"},dft={class:"grid grid-cols-2 gap-3"},fft={class:"grid grid-cols-3 gap-3"},pft=q({name:"ShwfedNumberFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=eoe(()=>{}),o=h=>Ln(n,h)??h,r=h=>Bn(n,h),a=[{value:"round",label:"四舍五入"},{value:"floor",label:"向下取整"},{value:"ceil",label:"向上取整"}],i=E({get:()=>t.value.binding??"",set:h=>{const g=h.trim();if(g.length===0){const{binding:v,...b}=t.value;t.value=b}else t.value={...t.value,binding:g}}}),l=E(()=>a.find(h=>h.value===(t.value.roundingMode??"round"))?.label);function u(h){if(h===void 0){const{precision:g,roundingMode:v,...b}=t.value;t.value=b}else t.value.roundingMode===void 0?t.value={...t.value,precision:h,roundingMode:"round"}:t.value={...t.value,precision:h}}function d(h){t.value={...t.value,roundingMode:h}}function p(h){if(h===void 0||!(h>0)){const{step:g,...v}=t.value;t.value=v}else t.value={...t.value,step:h}}function m(h){if(h)t.value={...t.value,valueAsString:!0};else{const{valueAsString:g,...v}=t.value;t.value=v}}return(h,g)=>(k(),L("div",sft,[H("div",lft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:年龄","onUpdate:modelValue":g[0]||(g[0]=v=>{const b=String(v??"");t.value={...t.value,displayName:b.length>0?b:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.age`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":g[1]||(g[1]=v=>i.value=v),placeholder:"例:user.age",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",uft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":g[2]||(g[2]=v=>t.value={...t.value,label:v})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":g[3]||(g[3]=v=>t.value={...t.value,placeholder:v})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":g[4]||(g[4]=v=>t.value={...t.value,tooltip:v})},null,8,["model-value"])]),_:1})]),H("div",cft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("precision")),1)]),_:2},[r("precision")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("precision"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.precision,min:0,"onUpdate:modelValue":u},null,8,["model-value"]),t.value.precision!==void 0?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"pr-1.5! text-xs"},{default:f(()=>[P(O(l.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[(k(),L(Me,null,Ke(a,v=>c(s(Vo),{key:v.value,onSelect:b=>d(v.value)},{default:f(()=>[P(O(v.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("step")),1)]),_:2},[r("step")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("step"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.step,min:0,"onUpdate:modelValue":p},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":g[5]||(g[5]=v=>t.value={...t.value,orientation:v})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),v=>(k(),M(s(Xn),{key:v.value,value:v.value},{default:f(()=>[P(O(v.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("valueAsString")),1)]),_:2},[r("valueAsString")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("valueAsString"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",null,[c(s(Lo),{"model-value":t.value.valueAsString??!1,"onUpdate:modelValue":m},null,8,["model-value"])])]),_:1}),H("div",dft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("min")??"允许输入的最小值表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("min")),1)]),_:1}),c(s(qe),{"model-value":t.value.min??"",placeholder:"例:0","result-type":"number",class:"min-h-10","onUpdate:modelValue":g[6]||(g[6]=v=>t.value={...t.value,min:v.length>0?v:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("max")??"允许输入的最大值表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("max")),1)]),_:1}),c(s(qe),{"model-value":t.value.max??"",placeholder:"例:100","result-type":"number",class:"min-h-10","onUpdate:modelValue":g[7]||(g[7]=v=>t.value={...t.value,max:v.length>0?v:void 0})},null,8,["model-value"])]),_:1})]),H("div",fft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":g[8]||(g[8]=v=>t.value={...t.value,hidden:v.length>0?v:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":g[9]||(g[9]=v=>t.value={...t.value,disabled:v.length>0?v:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":g[10]||(g[10]=v=>t.value={...t.value,readonly:v.length>0?v:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"number",placeholder:"例:form.price * form.qty","onUpdate:modelValue":g[11]||(g[11]=v=>t.value={...t.value,derived:v})},null,8,["model-value"])]),_:1})]))}}),mft={class:"flex flex-col gap-3"},hft={class:"grid grid-cols-2 gap-3"},gft={key:1,class:"grid grid-cols-2 gap-2"},vft={class:"grid grid-cols-2 gap-3"},yft={class:"grid grid-cols-2 gap-3"},bft={class:"grid grid-cols-3 gap-3"},_ft={class:"grid grid-cols-2 gap-3"},xft={class:"grid grid-cols-2 gap-3"},wft={class:"grid grid-cols-3 gap-3"},Sft=q({name:"ShwfedNumberRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=ooe(()=>{}),o=w=>Ln(n,w)??w,r=w=>Bn(n,w),a=[{value:"round",label:"四舍五入"},{value:"floor",label:"向下取整"},{value:"ceil",label:"向上取整"}],i=E(()=>Array.isArray(t.value.binding)?"split":"single"),l=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:w=>{const S=w.trim();if(S.length===0){const{binding:C,...$}=t.value;t.value=$}else t.value={...t.value,binding:S}}}),u=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),d=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function p(w){const S=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[w.trim(),S[1]]}}function m(w){const S=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[S[0],w.trim()]}}function h(){if(i.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:w,...S}=t.value;t.value=S}}const g=E(()=>a.find(w=>w.value===(t.value.roundingMode??"round"))?.label);function v(w){if(w===void 0){const{precision:S,roundingMode:C,...$}=t.value;t.value=$}else t.value.roundingMode===void 0?t.value={...t.value,precision:w,roundingMode:"round"}:t.value={...t.value,precision:w}}function b(w){t.value={...t.value,roundingMode:w}}function x(w){if(w===void 0||!(w>0)){const{step:S,...C}=t.value;t.value=C}else t.value={...t.value,step:w}}function y(w){const S=w.trim();if(S.length===0){const{rangeSeparatorIcon:C,...$}=t.value;t.value=$}else t.value={...t.value,rangeSeparatorIcon:S}}function _(w){if(w)t.value={...t.value,valueAsString:!0};else{const{valueAsString:S,...C}=t.value;t.value=C}}return(w,S)=>(k(),L("div",mft,[H("div",hft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:分数范围","onUpdate:modelValue":S[0]||(S[0]=C=>{const $=String(C??"");t.value={...t.value,displayName:$.length>0?$:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 数值数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),i.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:l.value,"onUpdate:modelValue":S[1]||(S[1]=C=>l.value=C),placeholder:"例:score.range",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",gft,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...S[15]||(S[15]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":u.value,placeholder:"例:score.start",class:"font-mono","onUpdate:modelValue":S[2]||(S[2]=C=>p(String(C??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...S[16]||(S[16]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":d.value,placeholder:"例:score.end",class:"font-mono","onUpdate:modelValue":S[3]||(S[3]=C=>m(String(C??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",vft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":S[4]||(S[4]=C=>t.value={...t.value,label:C})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":S[5]||(S[5]=C=>t.value={...t.value,tooltip:C})},null,8,["model-value"])]),_:1})]),H("div",yft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("startPlaceholder")),1)]),_:2},[r("startPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("startPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.startPlaceholder,"onUpdate:modelValue":S[6]||(S[6]=C=>t.value={...t.value,startPlaceholder:C})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("endPlaceholder")),1)]),_:2},[r("endPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("endPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.endPlaceholder,"onUpdate:modelValue":S[7]||(S[7]=C=>t.value={...t.value,endPlaceholder:C})},null,8,["model-value"])]),_:1})]),H("div",bft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("precision")),1)]),_:2},[r("precision")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("precision"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.precision,min:0,"onUpdate:modelValue":v},null,8,["model-value"]),t.value.precision!==void 0?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"pr-1.5! text-xs"},{default:f(()=>[P(O(g.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[(k(),L(Me,null,Ke(a,C=>c(s(Vo),{key:C.value,onSelect:$=>b(C.value)},{default:f(()=>[P(O(C.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("step")),1)]),_:2},[r("step")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("step"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.step,min:0,"onUpdate:modelValue":x},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":S[8]||(S[8]=C=>t.value={...t.value,orientation:C})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),C=>(k(),M(s(Xn),{key:C.value,value:C.value},{default:f(()=>[P(O(C.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",_ft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("min")??"允许输入的最小值表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("min")),1)]),_:1}),c(s(qe),{"model-value":t.value.min??"",placeholder:"例:0","result-type":"number",class:"min-h-10","onUpdate:modelValue":S[9]||(S[9]=C=>t.value={...t.value,min:C.length>0?C:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("max")??"允许输入的最大值表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("max")),1)]),_:1}),c(s(qe),{"model-value":t.value.max??"",placeholder:"例:100","result-type":"number",class:"min-h-10","onUpdate:modelValue":S[10]||(S[10]=C=>t.value={...t.value,max:C.length>0?C:void 0})},null,8,["model-value"])]),_:1})]),H("div",xft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":y},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("valueAsString")),1)]),_:2},[r("valueAsString")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("valueAsString"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",null,[c(s(Lo),{"model-value":t.value.valueAsString??!1,"onUpdate:modelValue":_},null,8,["model-value"])])]),_:1})]),H("div",wft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":S[11]||(S[11]=C=>t.value={...t.value,hidden:C.length>0?C:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":S[12]||(S[12]=C=>t.value={...t.value,disabled:C.length>0?C:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":S[13]||(S[13]=C=>t.value={...t.value,readonly:C.length>0?C:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.lo, form.hi]","onUpdate:modelValue":S[14]||(S[14]=C=>t.value={...t.value,derived:C})},null,8,["model-value"])]),_:1})]))}}),kft={class:"flex flex-col gap-3"},Cft={class:"grid grid-cols-2 gap-3"},$ft={class:"grid grid-cols-2 gap-3"},Tft={class:"grid grid-cols-2 gap-3"},Eft={class:"grid grid-cols-3 gap-3"},Dft=q({name:"ShwfedSwitchFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=ioe(()=>{}),o=i=>Ln(n,i)??i,r=i=>Bn(n,i),a=E({get:()=>t.value.binding??"",set:i=>{const l=i.trim();if(l.length===0){const{binding:u,...d}=t.value;t.value=d}else t.value={...t.value,binding:l}}});return(i,l)=>(k(),L("div",kft,[H("div",Cft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:是否启用","onUpdate:modelValue":l[0]||(l[0]=u=>{const d=String(u??"");t.value={...t.value,displayName:d.length>0?d:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.enabled`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=u=>a.value=u),placeholder:"例:user.enabled",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",$ft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":l[2]||(l[2]=u=>t.value={...t.value,label:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":l[3]||(l[3]=u=>t.value={...t.value,tooltip:u})},null,8,["model-value"])]),_:1})]),H("div",Tft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("trueLabel")),1)]),_:2},[r("trueLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("trueLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.trueLabel,"onUpdate:modelValue":l[4]||(l[4]=u=>t.value={...t.value,trueLabel:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("falseLabel")),1)]),_:2},[r("falseLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("falseLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.falseLabel,"onUpdate:modelValue":l[5]||(l[5]=u=>t.value={...t.value,falseLabel:u})},null,8,["model-value"])]),_:1})]),H("div",Eft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[6]||(l[6]=u=>t.value={...t.value,hidden:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时开关仍然渲染但不可切换",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[7]||(l[7]=u=>t.value={...t.value,disabled:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[8]||(l[8]=u=>t.value={...t.value,readonly:u.length>0?u:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"bool",placeholder:"例:form.total > 100","onUpdate:modelValue":l[9]||(l[9]=u=>t.value={...t.value,derived:u})},null,8,["model-value"])]),_:1})]))}}),Oft={class:"flex flex-col gap-3"},Aft={class:"grid grid-cols-2 gap-3"},Ift={class:"grid grid-cols-3 gap-3"},Pft={class:"grid grid-cols-3 gap-3"},Mft={class:"flex flex-col gap-3"},Rft={type:"button","data-slot":"combobox-single-item-kind-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5","aria-label":"切换值类型"},Fft={class:"grid grid-cols-3 gap-3"},zft=q({name:"ShwfedComboboxSingleFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=loe(()=>{}),o=S=>Ln(n,S)??S,r=S=>Bn(n,S),a=ZR(()=>{}),i=S=>Ln(a,S)??S,l=S=>Bn(a,S),u=E({get:()=>t.value.binding??"",set:S=>{const C=S.trim();if(C.length===0){const{binding:$,...T}=t.value;t.value=T}else t.value={...t.value,binding:C}}}),d=E(()=>t.value.items??[]);function p(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,S=>{const C=Math.random()*16|0;return(S==="x"?C:C&3|8).toString(16)})}function m(){return{id:p(),label:[{locale:"zh",message:""}],value:{kind:"text",value:""}}}function h(S,C){const $=[...t.value.items??[]],T=$[S];T&&($[S]={...T,...C},t.value={...t.value,items:$})}function g(){t.value={...t.value,items:[...t.value.items??[],m()]}}function v(S){const C=[...t.value.items??[]];C.splice(S,1),t.value={...t.value,items:C}}function b(S,C){const $=t.value.items?.[S];!$||$.value.kind===C||h(S,{value:C==="text"?{kind:"text",value:""}:{kind:"number",value:0}})}function x(S,C){h(S,{value:{kind:"text",value:C}})}function y(S,C){h(S,{value:{kind:"number",value:typeof C=="number"&&Number.isFinite(C)?C:0}})}function _(S,C){h(S,{label:C})}function w(S,C){if(!C||C.every(T=>T.message.trim().length===0)){const T=t.value.items?.[S];if(!T)return;const{tooltip:D,...A}=T,I=[...t.value.items??[]];I[S]=A,t.value={...t.value,items:I}}else h(S,{tooltip:C})}return(S,C)=>(k(),L("div",Oft,[H("div",Aft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户角色","onUpdate:modelValue":C[0]||(C[0]=$=>{const T=String($??"");t.value={...t.value,displayName:T.length>0?T:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.role`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:u.value,"onUpdate:modelValue":C[1]||(C[1]=$=>u.value=$),placeholder:"例:user.role",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Ift,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":C[2]||(C[2]=$=>t.value={...t.value,label:$})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field placeholder","model-value":t.value.placeholder,"onUpdate:modelValue":C[3]||(C[3]=$=>t.value={...t.value,placeholder:$})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":C[4]||(C[4]=$=>t.value={...t.value,tooltip:$})},null,8,["model-value"])]),_:1})]),H("div",Pft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":C[5]||(C[5]=$=>t.value={...t.value,orientation:$})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),$=>(k(),M(s(Xn),{key:$.value,value:$.value},{default:f(()=>[P(O($.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"下拉框可选项列表",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("items")),1)]),_:1}),H("div",Mft,[(k(!0),L(Me,null,Ke(d.value,($,T)=>(k(),L("div",{key:$.id,"data-slot":"combobox-single-item",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"combobox-single-item-delete","aria-label":"删除选项",class:"absolute right-2 top-2 z-10",onClick:D=>v(T)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"combobox option label","model-value":$.label,"onUpdate:modelValue":D=>_(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"icon-sm","as-child":""},{default:f(()=>[H("button",Rft,[c(s(fe),{icon:$.value.kind==="number"?"fluent:number-symbol-20-regular":"fluent:textbox-20-regular"},null,8,["icon"])])]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[c(s(Vo),{onSelect:D=>b(T,"text")},{default:f(()=>[c(s(fe),{icon:"fluent:textbox-20-regular"}),C[10]||(C[10]=H("span",null,"文本",-1))]),_:1},8,["onSelect"]),c(s(Vo),{onSelect:D=>b(T,"number")},{default:f(()=>[c(s(fe),{icon:"fluent:number-symbol-20-regular"}),C[11]||(C[11]=H("span",null,"数字",-1))]),_:1},8,["onSelect"])]),_:2},1024)]),_:2},1024)]),_:2},1024),$.value.kind==="text"?(k(),M(s(mt),{key:0,"model-value":$.value.value,placeholder:"例:admin","onUpdate:modelValue":D=>x(T,String(D??""))},null,8,["model-value","onUpdate:modelValue"])):(k(),M(s(wn),{key:1,"model-value":$.value.value,"onUpdate:modelValue":D=>y(T,D)},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1024)]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("tooltip")),1)]),_:2},[l("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"combobox option tooltip","model-value":$.tooltip,"onUpdate:modelValue":D=>w(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"combobox-single-add-item",class:"w-full justify-center",onClick:g},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),C[12]||(C[12]=H("span",null,"增加选项",-1))]),_:1})])]),_:1}),H("div",Fft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[6]||(C[6]=$=>t.value={...t.value,hidden:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时下拉框仍然渲染但不可选择",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[7]||(C[7]=$=>t.value={...t.value,disabled:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[8]||(C[8]=$=>t.value={...t.value,readonly:$.length>0?$:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.category","onUpdate:modelValue":C[9]||(C[9]=$=>t.value={...t.value,derived:$})},null,8,["model-value"])]),_:1})]))}}),Vft={class:"flex flex-col gap-3"},Nft={class:"grid grid-cols-2 gap-3"},Lft={class:"grid grid-cols-3 gap-3"},Bft={class:"grid grid-cols-3 gap-3"},Uft={class:"grid grid-cols-3 gap-3"},qft={key:0},jft={key:1,class:"text-zinc-400"},Hft={class:"grid grid-cols-2 gap-3"},Wft={class:"grid grid-cols-2 gap-3"},Gft={class:"grid grid-cols-3 gap-3"},Kft=q({name:"ShwfedUploadFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=doe(()=>{}),o=$=>Ln(n,$)??$,r=$=>Bn(n,$),a=E({get:()=>t.value.binding??"",set:$=>{const T=$.trim();if(T.length===0){const{binding:D,...A}=t.value;t.value=A}else t.value={...t.value,binding:T}}}),i=E({get:()=>t.value.template?.request??"",set:$=>{if($.length===0){const{template:T,...D}=t.value;t.value=D}else t.value={...t.value,template:{...t.value.template,request:$}}}}),l=E({get:()=>t.value.template?.download??"",set:$=>{const T=t.value.template;if(T)if($.length===0){const{download:D,...A}=T;t.value={...t.value,template:A}}else t.value={...t.value,template:{...T,download:$}}}}),u=E({get:()=>t.value.templateIcon??"",set:$=>{const T=$.trim();if(T.length===0){const{templateIcon:D,...A}=t.value;t.value=A}else t.value={...t.value,templateIcon:T}}}),d=[{id:"pdf",label:"PDF",mimes:["application/pdf"]},{id:"docx",label:"DOCX",mimes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},{id:"doc",label:"DOC",mimes:["application/msword"]},{id:"xlsx",label:"XLSX",mimes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},{id:"xls",label:"XLS",mimes:["application/vnd.ms-excel"]},{id:"pptx",label:"PPTX",mimes:["application/vnd.openxmlformats-officedocument.presentationml.presentation"]},{id:"ppt",label:"PPT",mimes:["application/vnd.ms-powerpoint"]},{id:"zip",label:"ZIP",mimes:["application/zip","application/x-zip-compressed"]},{id:"rar",label:"RAR",mimes:["application/vnd.rar","application/x-rar-compressed"]},{id:"ofd",label:"OFD",mimes:["application/ofd"]},{id:"xml",label:"XML",mimes:["application/xml"]},{id:"png",label:"PNG",mimes:["image/png"]},{id:"jpeg",label:"JPEG",mimes:["image/jpeg","image/jpg"]}],p=new Map(d.map($=>[$.id,$])),m=E(()=>t.value.accept??[]),h=E(()=>d.filter($=>$.mimes.every(T=>m.value.includes(T))).map($=>$.id)),g=E(()=>h.value.map($=>p.get($)?.label).filter(Boolean).join("、"));function v($){const D=(Array.isArray($)?$.filter(A=>typeof A=="string"):typeof $=="string"?[$]:[]).flatMap(A=>p.get(A)?.mimes??[]);if(D.length===0){const{accept:A,...I}=t.value;t.value=I}else t.value={...t.value,accept:D}}function b($){return $===void 0?"MB":$<1024*1024?"KB":"MB"}function x($){return $==="KB"?1024:1024*1024}function y($){const T=re(b(t.value[$])),D=E({get:()=>{const A=t.value[$];return A===void 0?void 0:A/x(T.value)},set:A=>{if(A===void 0||!(A>0)){const{[$]:I,...U}=t.value;t.value=U;return}t.value={...t.value,[$]:Math.round(A*x(T.value))}}});return{unit:T,amount:D}}const _=y("maxFileSize"),w=y("maxTotalSize");function S($){if($===void 0||!($>0)){const{maxFiles:T,...D}=t.value;t.value=D}else t.value={...t.value,maxFiles:Math.round($)}}function C($){if($)t.value={...t.value,multiple:!0};else{const{multiple:T,...D}=t.value;t.value=D}}return($,T)=>(k(),L("div",Vft,[H("div",Nft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:附件","onUpdate:modelValue":T[0]||(T[0]=D=>{const A=String(D??"");t.value={...t.value,displayName:A.length>0?A:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `attachments`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":T[1]||(T[1]=D=>a.value=D),placeholder:"例:attachments",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Lft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":T[2]||(T[2]=D=>t.value={...t.value,label:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":T[3]||(T[3]=D=>t.value={...t.value,tooltip:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("description")),1)]),_:2},[r("description")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("description"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"upload zone description","model-value":t.value.description,"onUpdate:modelValue":T[4]||(T[4]=D=>t.value={...t.value,description:D})},null,8,["model-value"])]),_:1})]),H("div",Bft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":T[5]||(T[5]=D=>t.value={...t.value,orientation:D})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),D=>(k(),M(s(Xn),{key:D.value,value:D.value},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("multiple")),1)]),_:2},[r("multiple")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("multiple"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",null,[c(s(Lo),{"model-value":t.value.multiple??!1,"onUpdate:modelValue":C},null,8,["model-value"])])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("maxFiles")),1)]),_:2},[r("maxFiles")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("maxFiles"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.maxFiles,min:1,"onUpdate:modelValue":S},null,8,["model-value"])]),_:1})]),_:1})]),H("div",Uft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accept")),1)]),_:2},[r("accept")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accept"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{multiple:"","model-value":h.value,"onUpdate:modelValue":v},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn),{placeholder:"不限制"},{default:f(()=>[g.value.length>0?(k(),L("span",qft,O(g.value),1)):(k(),L("span",jft,"不限制"))]),_:1})]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(d,D=>c(s(Xn),{key:D.id,value:D.id},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("maxFileSize")),1)]),_:2},[r("maxFileSize")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("maxFileSize"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":s(_).amount.value,min:0,"onUpdate:modelValue":T[6]||(T[6]=D=>s(_).amount.value=D)},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"pr-1.5! text-xs"},{default:f(()=>[P(O(s(_).unit.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[c(s(Vo),{onSelect:T[7]||(T[7]=D=>s(_).unit.value="KB")},{default:f(()=>[...T[19]||(T[19]=[P(" KB ",-1)])]),_:1}),c(s(Vo),{onSelect:T[8]||(T[8]=D=>s(_).unit.value="MB")},{default:f(()=>[...T[20]||(T[20]=[P(" MB ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("maxTotalSize")),1)]),_:2},[r("maxTotalSize")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("maxTotalSize"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":s(w).amount.value,min:0,"onUpdate:modelValue":T[9]||(T[9]=D=>s(w).amount.value=D)},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"pr-1.5! text-xs"},{default:f(()=>[P(O(s(w).unit.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[c(s(Vo),{onSelect:T[10]||(T[10]=D=>s(w).unit.value="KB")},{default:f(()=>[...T[21]||(T[21]=[P(" KB ",-1)])]),_:1}),c(s(Vo),{onSelect:T[11]||(T[11]=D=>s(w).unit.value="MB")},{default:f(()=>[...T[22]||(T[22]=[P(" MB ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),H("div",Hft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("template")??"返回 `HttpRequest` 的 CEL 表达式;设置后会渲染下载模板按钮",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[T[23]||(T[23]=P(" 请求 ",-1))]),_:1}),c(s(qe),{"model-value":i.value,placeholder:"例:http.get('https://api.example.com/template.xlsx')","result-type":"HttpRequest",class:"min-h-10","onUpdate:modelValue":T[12]||(T[12]=D=>i.value=D)},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"可选的第二步:用第一步响应 `json` 中的凭据构造真正的下载请求,例如 `json.data.key`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[T[24]||(T[24]=P(" 下载请求 ",-1))]),_:1}),c(s(qe),{"model-value":l.value,placeholder:"例:http.get('https://api.example.com/download').query('key', json.data.key)","result-type":"HttpRequest","extra-vars":{json:s(fS)},class:"min-h-10","onUpdate:modelValue":T[13]||(T[13]=D=>l.value=D)},null,8,["model-value","extra-vars"])]),_:1})]),H("div",Wft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("templateIcon")),1)]),_:2},[r("templateIcon")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("templateIcon"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qc),{"model-value":u.value,"onUpdate:modelValue":T[14]||(T[14]=D=>u.value=D)},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("templateLabel")),1)]),_:2},[r("templateLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("templateLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"download template button label","model-value":t.value.templateLabel,"onUpdate:modelValue":T[15]||(T[15]=D=>t.value={...t.value,templateLabel:D})},null,8,["model-value"])]),_:1})]),H("div",Gft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[16]||(T[16]=D=>t.value={...t.value,hidden:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时上传区域仍然渲染但不可操作",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[17]||(T[17]=D=>t.value={...t.value,disabled:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以文件列表展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[18]||(T[18]=D=>t.value={...t.value,readonly:D.length>0?D:void 0})},null,8,["model-value"])]),_:1})])]))}}),Yft={class:"flex flex-col gap-3"},Jft={class:"grid grid-cols-2 gap-3"},Xft={class:"grid grid-cols-3 gap-3"},Zft={class:"grid grid-cols-3 gap-3"},Qft={class:"grid grid-cols-1 gap-3"},ept={class:"grid grid-cols-1 gap-3"},tpt={class:"grid grid-cols-2 gap-3"},npt={class:"grid grid-cols-3 gap-3"},opt=q({name:"ShwfedComboboxSingleRemoteFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=moe(()=>{}),o=i=>Ln(n,i)??i,r=i=>Bn(n,i),a=E({get:()=>t.value.binding??"",set:i=>{const l=i.trim();if(l.length===0){const{binding:u,...d}=t.value;t.value=d}else t.value={...t.value,binding:l}}});return(i,l)=>(k(),L("div",Yft,[H("div",Jft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户角色","onUpdate:modelValue":l[0]||(l[0]=u=>{const d=String(u??"");t.value={...t.value,displayName:d.length>0?d:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.role`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=u=>a.value=u),placeholder:"例:user.role",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Xft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":l[2]||(l[2]=u=>t.value={...t.value,label:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":l[3]||(l[3]=u=>t.value={...t.value,placeholder:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":l[4]||(l[4]=u=>t.value={...t.value,tooltip:u})},null,8,["model-value"])]),_:1})]),H("div",Zft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":l[5]||(l[5]=u=>t.value={...t.value,orientation:u})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),u=>(k(),M(s(Xn),{key:u.value,value:u.value},{default:f(()=>[P(O(u.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Qft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("request")??"返回 `HttpRequest` 的 CEL 表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("request")),1)]),_:1}),c(s(qe),{"model-value":t.value.request,placeholder:"例:http.get('/api/roles').query('keyword', form.keyword)","result-type":"HttpRequest",class:"min-h-10","onUpdate:modelValue":l[6]||(l[6]=u=>t.value={...t.value,request:u})},null,8,["model-value"])]),_:1})]),H("div",ept,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("options")??"从响应体提取选项数组的 CEL 表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("options")),1)]),_:1}),c(s(qe),{"model-value":t.value.options,placeholder:"例:json.data","result-type":"list","extra-vars":{json:s(mS)},class:"min-h-10","onUpdate:modelValue":l[7]||(l[7]=u=>t.value={...t.value,options:u})},null,8,["model-value","extra-vars"])]),_:1})]),H("div",tpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("optionValue")??"从当前 `option` 提取写入绑定的值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("optionValue")),1)]),_:1}),c(s(qe),{"model-value":t.value.optionValue,placeholder:'例:option["value"]',"result-type":"dyn","extra-vars":{option:s(pS)},class:"min-h-10","onUpdate:modelValue":l[8]||(l[8]=u=>t.value={...t.value,optionValue:u})},null,8,["model-value","extra-vars"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("optionLabel")??"每个选项展示的本地化文本,支持 `{{ string(option.foo) }}` 插值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("optionLabel")),1)]),_:1}),c(s(Ye),{markdown:"","model-value":t.value.optionLabel,"onUpdate:modelValue":l[9]||(l[9]=u=>t.value={...t.value,optionLabel:u})},null,8,["model-value"])]),_:1})]),H("div",npt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[10]||(l[10]=u=>t.value={...t.value,hidden:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时下拉框仍然渲染但不可选择",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[11]||(l[11]=u=>t.value={...t.value,disabled:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[12]||(l[12]=u=>t.value={...t.value,readonly:u.length>0?u:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.category","onUpdate:modelValue":l[13]||(l[13]=u=>t.value={...t.value,derived:u})},null,8,["model-value"])]),_:1})]))}}),rpt=["onClick"],apt={class:"flex-1 truncate"},ipt={class:"flex flex-col gap-0.5"},spt=["onClick"],lpt={class:"flex-1 truncate"},upt={class:"flex gap-2 min-h-128"},cpt={key:0,class:"flex w-64 shrink-0 flex-col"},dpt=["onClick"],fpt={class:"flex-1 truncate"},ppt={class:"flex flex-col gap-0.5"},mpt=["onClick"],hpt={class:"flex-1 truncate"},gpt={class:"flex flex-1 flex-col"},vpt={key:0},ypt={key:1,class:"flex flex-1 flex-col gap-2"},bpt={class:"flex-1"},_pt={key:0},xpt={key:0,class:"mb-4 flex items-center gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800",role:"alert"},wpt={class:"flex-1"},Spt={class:"tabular-nums font-medium"},kpt={key:1,class:"text-sm text-red-500"},Cpt={key:3,class:"flex min-h-112 items-center justify-center p-8 text-sm text-zinc-400"},$pt=q({name:"ShwfedFormUnitConfig",__name:"unit-config",props:Ca({extras:{},configure:{type:Function},fieldCelScope:{}},{modelValue:{required:!0},modelModifiers:{},selection:{default:()=>({kind:"layout"})},selectionModifiers:{}}),emits:["update:modelValue","update:selection"],setup(e){const t=Ot(e,"modelValue"),n=Ot(e,"selection"),o=e,r=re(0),a=re([{kind:"top"}]),i=E(()=>a.value[a.value.length-1]),l=E(()=>a.value.length>1);function u(){a.value.length<=1||(a.value=a.value.slice(0,-1))}const d=Fn(Y1,null),p=re(!1);fr(n_,{fullPane:p}),Wi(o.fieldCelScope??{});const m=Fn(pA,null),h=E(()=>m?.target.value??null),g=E(()=>i.value.kind==="field-drill"?i.value.id:null),v=E(()=>{const W=g.value;return W?t.value.fields.find(B=>B.id===W)??null:null}),b=E(()=>{const W=v.value;return W?Ap(W.type,W.compatibilityDate)??null:null});function x(W){n.value={kind:"extras",id:W}}function y(){n.value={kind:"layout"}}function _(W){a.value=[...a.value,{kind:"field-drill",id:W}]}function w(W){a.value.length&&W!==g.value&&i.value.kind==="field-drill"&&(a.value=[...a.value.slice(0,-1),{kind:"field-drill",id:W}])}function S(W){return Ap(W.type,W.compatibilityDate)?.metadata?.icon??"fluent:square-20-regular"}const C=E({get:()=>[...t.value.layouts],set:W=>{t.value={...t.value,layouts:W}}}),$=Bb("sidebarRef");function T(){$.value?.addLayout()}const D=E(()=>{const W=new Map;for(const B of Avt){if(B.deprecated)continue;const K=W.get(B.type);(!K||B.compatibilityDate>K.compatibilityDate)&&W.set(B.type,{type:B.type,compatibilityDate:B.compatibilityDate,name:B.metadata.name,icon:B.metadata.icon})}return[...W.values()].sort((B,K)=>B.name.localeCompare(K.name,"zh"))});function A(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,W=>{const B=Math.random()*16|0;return(W==="x"?B:B&3|8).toString(16)})}function I(W){return{...Ap(W.type,W.compatibilityDate)?.defaults?.()??{},id:A(),type:W.type,compatibilityDate:W.compatibilityDate}}function U(W,B){const K=I(W),X=Ap(W.type,W.compatibilityDate)?.metadata,Ee=X?.w.initial??1,_e=X?.h.initial??1,ze=r.value,st=t.value.layouts.map((oe,be)=>{if(be!==ze)return oe;const De=VR(oe.layout.placements,Ee,_e),Se={...oe.layout.placements,[K.id]:De};let Te=0,Ne=0;for(const te of Object.values(Se)){const[,[le,xe]]=te.area;le-1>Te&&(Te=le-1),xe-1>Ne&&(Ne=xe-1)}return{...oe,layout:{...oe.layout,placements:Se,columns:Math.max(1,Te),rows:Math.max(1,Ne)}}});t.value={...t.value,fields:[...t.value.fields,K],layouts:st},B?.silent||_(K.id)}function j(W){Q([W])}function Q(W){if(W.length===0)return;const B=new Set(W);t.value={...t.value,fields:t.value.fields.filter(K=>!B.has(K.id)),layouts:t.value.layouts.map(K=>{const X=Object.entries(K.layout.placements).filter(([Ee])=>!B.has(Ee));return X.length===Object.keys(K.layout.placements).length?K:pte({...K,layout:{...K.layout,placements:Object.fromEntries(X)}})})},i.value.kind==="field-drill"&&B.has(i.value.id)&&(a.value=a.value.slice(0,-1))}function F(W){const B=g.value;if(!B)return;const K=t.value.fields.findIndex(Ee=>Ee.id===B);if(K<0)return;const X=[...t.value.fields];X[K]=W,t.value={...t.value,fields:X}}const R=vn();function G(W,B){return Ht(W,{...dn(R),...B})}const Z={$cel:G},Y=E(()=>{const W=b.value;return!W?.deprecated||!W.supersededBy?null:Ap(W.supersededBy.type,W.supersededBy.compatibilityDate)??null}),he=E(()=>!!Y.value?.migrate);async function ue(){const W=v.value,B=Y.value;if(!(!W||!B?.migrate))try{const K=await Yr(B.migrate(W,Z));F(K);const X=B.type===W.type;Si.success(X?`已迁移到 ${B.compatibilityDate} 版本`:`已迁移到 ${B.type}@${B.compatibilityDate}`)}catch(K){const X=K instanceof Error?K.message:String(K);Si.error("迁移失败",{description:X})}}function pe(W){const B=W;if(typeof B.displayName=="string"&&B.displayName.length>0)return B.displayName;const K=B.label;return ut(K,"zh")??"未命名字段"}function ce(W){return pe(W)}if(d){const W=d.add();Xe([l,v],([B,K])=>{B&&K?(W.label.value=`编辑${pe(K)}`,W.back.value=u):(W.label.value=null,W.back.value=null)},{immediate:!0}),tr(()=>{W.dispose()})}function ae(W){return n.value.kind==="extras"&&n.value.id===W}return(W,B)=>(k(),L(Me,null,[h.value&&!p.value?(k(),M(Lb,{key:0,to:h.value},[l.value?(k(),M(s(js),{key:1,class:"flex-1"},{default:f(()=>[H("div",ipt,[(k(!0),L(Me,null,Ke(t.value.fields,K=>(k(),L("button",{key:K.id,type:"button",class:He(["row w-full pl-2 text-left",[g.value===K.id?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:X=>w(K.id)},[c(s(fe),{icon:S(K),class:"size-4 shrink-0"},null,8,["icon"]),H("span",lpt,O(ce(K)),1)],10,spt))),128))])]),_:1})):(k(),L(Me,{key:0},[c(s(js),{class:"flex-1"},{default:f(()=>[e.extras&&e.extras.length>0?(k(),L(Me,{key:0},[(k(!0),L(Me,null,Ke(e.extras,K=>(k(),L("div",{key:K.id,class:He(["row general-row pl-2",[ae(K.id)?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:at(X=>x(K.id),["stop"])},[c(s(fe),{icon:K.icon,class:"size-4 shrink-0"},null,8,["icon"]),H("span",apt,O(K.label),1)],10,rpt))),128)),c(s(er),{class:"my-1"})],64)):ke("",!0),c(dS,{ref_key:"sidebarRef",ref:$,modelValue:C.value,"onUpdate:modelValue":B[0]||(B[0]=K=>C.value=K),"active-index":r.value,"onUpdate:activeIndex":B[1]||(B[1]=K=>r.value=K),active:n.value.kind==="layout",onSelect:B[2]||(B[2]=K=>y())},null,8,["modelValue","active-index","active"])]),_:1}),c(s(Rn),{variant:"ghost",size:"sm",onClick:B[3]||(B[3]=K=>T())},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular",class:"size-4"}),B[11]||(B[11]=H("span",null,"新增布局",-1))]),_:1})],64))],8,["to"])):ke("",!0),H("div",upt,[!p.value&&!h.value?(k(),L("div",cpt,[l.value?(k(),M(s(js),{key:1,class:"flex-1"},{default:f(()=>[H("div",ppt,[(k(!0),L(Me,null,Ke(t.value.fields,K=>(k(),L("button",{key:K.id,type:"button",class:He(["row w-full pl-2 text-left",[g.value===K.id?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:X=>w(K.id)},[c(s(fe),{icon:S(K),class:"size-4 shrink-0"},null,8,["icon"]),H("span",hpt,O(ce(K)),1)],10,mpt))),128))])]),_:1})):(k(),L(Me,{key:0},[c(s(js),{class:"flex-1"},{default:f(()=>[e.extras&&e.extras.length>0?(k(),L(Me,{key:0},[(k(!0),L(Me,null,Ke(e.extras,K=>(k(),L("div",{key:K.id,class:He(["row general-row pl-2",[ae(K.id)?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:at(X=>x(K.id),["stop"])},[c(s(fe),{icon:K.icon,class:"size-4 shrink-0"},null,8,["icon"]),H("span",fpt,O(K.label),1)],10,dpt))),128)),c(s(er),{class:"my-1"})],64)):ke("",!0),c(dS,{ref_key:"sidebarRef",ref:$,modelValue:C.value,"onUpdate:modelValue":B[4]||(B[4]=K=>C.value=K),"active-index":r.value,"onUpdate:activeIndex":B[5]||(B[5]=K=>r.value=K),active:n.value.kind==="layout",onSelect:B[6]||(B[6]=K=>y())},null,8,["modelValue","active-index","active"])]),_:1}),c(s(Rn),{variant:"ghost",size:"sm",onClick:B[7]||(B[7]=K=>T())},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular",class:"size-4"}),B[12]||(B[12]=H("span",null,"新增布局",-1))]),_:1})],64))])):ke("",!0),H("div",gpt,[!l.value&&n.value.kind==="extras"?(k(),L("div",vpt,[se(W.$slots,"extras-pane",{id:n.value.id},void 0,!0)])):!l.value&&n.value.kind==="layout"?(k(),L("div",ypt,[c(jR,{modelValue:C.value,"onUpdate:modelValue":B[8]||(B[8]=K=>C.value=K),index:r.value},null,8,["modelValue","index"]),H("div",bpt,[c(UR,{modelValue:C.value,"onUpdate:modelValue":B[9]||(B[9]=K=>C.value=K),"active-index":r.value,"onUpdate:activeIndex":B[10]||(B[10]=K=>r.value=K),items:t.value.fields,"find-entry":s(Ap),"get-item-label":ce,"picker-entries":D.value,"can-delete":!0,"item-noun":"字段",onAddNew:U,onDrillDown:_,onDeleteItem:j,onDeleteItems:Q},null,8,["modelValue","active-index","items","find-entry","picker-entries"])])])):v.value?(k(),L("div",{key:2,class:He(p.value?"":"p-6")},[b.value?(k(),L("div",_pt,[b.value.deprecated&&b.value.supersededBy?(k(),L("div",xpt,[c(s(fe),{icon:"fluent:warning-20-regular",class:"size-4 shrink-0"}),H("span",wpt,[B[13]||(B[13]=P(" 此字段类型已弃用,建议迁移至 ",-1)),H("span",Spt,O(b.value.supersededBy.type===b.value.type?b.value.supersededBy.compatibilityDate:`${b.value.supersededBy.type}@${b.value.supersededBy.compatibilityDate}`),1),B[14]||(B[14]=P("。 ",-1))]),he.value?(k(),M(s(Rn),{key:0,variant:"ghost",size:"sm",class:"text-amber-800 hover:bg-amber-100 hover:text-amber-900","data-slot":"field-migrate",onClick:ue},{default:f(()=>[c(s(fe),{icon:"fluent:arrow-sync-20-regular"}),B[15]||(B[15]=P(" 迁移 ",-1))]),_:1})):ke("",!0)])):ke("",!0),(k(),M(Mo(b.value.config),{"model-value":v.value,"onUpdate:modelValue":F},null,8,["model-value"]))])):(k(),L("div",kpt," 未注册的字段类型:"+O(v.value.type)+"@"+O(v.value.compatibilityDate),1))],2)):(k(),L("div",Cpt," 选择左侧项目以查看和编辑 "))])])],64))}}),m4=sp($pt,[["__scopeId","data-v-75ff2907"]]),Tpt={class:"flex flex-col gap-3"},Ept={class:"grid grid-cols-2 gap-3"},Dpt={class:"grid grid-cols-2 gap-3"},Opt={class:"grid grid-cols-2 gap-3"},Apt={class:"grid grid-cols-3 gap-3"},Ipt={class:"grid grid-cols-2 gap-3"},Ppt=q({name:"ShwfedListFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=voe(()=>{}),o=g=>Ln(n,g)??g,r=g=>Bn(n,g),a=Fn(n_,null);Pt(()=>{a&&(a.fullPane.value=!0)}),tr(()=>{a&&(a.fullPane.value=!1)});const i=E({get:()=>t.value.unit,set:g=>{t.value={...t.value,unit:g}}}),l=[{id:"general",label:"通用配置",icon:"fluent:settings-20-regular"}],u={item:{type:"dyn",label:"item",description:"当前列表项",value:void 0},index:{type:"number",label:"index",description:"当前列表项索引,从 0 开始",value:void 0}},d=re({kind:"extras",id:"general"}),p=E({get:()=>t.value.binding??"",set:g=>{const v=g.trim();if(v.length===0){const{binding:b,...x}=t.value;t.value=x}else t.value={...t.value,binding:v}}});function m(g,v){if(v==null){const{[g]:b,...x}=t.value;t.value=x}else t.value={...t.value,[g]:v}}const h=E({get:()=>t.value.reorderable??!0,set:g=>{if(g===!0){const{reorderable:v,...b}=t.value;t.value=b}else t.value={...t.value,reorderable:!1}}});return(g,v)=>(k(),M(m4,{modelValue:i.value,"onUpdate:modelValue":v[12]||(v[12]=b=>i.value=b),selection:d.value,"onUpdate:selection":v[13]||(v[13]=b=>d.value=b),extras:l,"field-cel-scope":u},{"extras-pane":f(()=>[H("div",Tpt,[H("div",Ept,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:成员列表","onUpdate:modelValue":v[0]||(v[0]=b=>{const x=String(b??"");t.value={...t.value,displayName:x.length>0?x:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("binding")),1)]),_:2},[r("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:p.value,"onUpdate:modelValue":v[1]||(v[1]=b=>p.value=b),placeholder:"例:members",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Dpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":v[2]||(v[2]=b=>t.value={...t.value,label:b})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":v[3]||(v[3]=b=>t.value={...t.value,tooltip:b})},null,8,["model-value"])]),_:1})]),H("div",Opt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("addLabel")),1)]),_:2},[r("addLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("addLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.addLabel,"onUpdate:modelValue":v[4]||(v[4]=b=>t.value={...t.value,addLabel:b})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("removeLabel")),1)]),_:2},[r("removeLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("removeLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.removeLabel,"onUpdate:modelValue":v[5]||(v[5]=b=>t.value={...t.value,removeLabel:b})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("locale")),1)]),_:2},[r("locale")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("locale"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"列表项折叠摘要,Markdown 文本,保留表达式插值占位符不要翻译","model-value":t.value.locale,"onUpdate:modelValue":v[6]||(v[6]=b=>t.value={...t.value,locale:b})},null,8,["model-value"])]),_:1}),H("div",Apt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("min")),1)]),_:2},[r("min")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("min"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.min,min:0,"onUpdate:modelValue":v[7]||(v[7]=b=>m("min",b))},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("max")),1)]),_:2},[r("max")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("max"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.max,min:1,"onUpdate:modelValue":v[8]||(v[8]=b=>m("max",b))},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"horizontal",class:"h-9 w-auto gap-2 self-end"},{default:f(()=>[c(s(Lo),{modelValue:h.value,"onUpdate:modelValue":v[9]||(v[9]=b=>h.value=b)},null,8,["modelValue"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("reorderable")),1)]),_:2},[r("reorderable")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("reorderable"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})]),H("div",Ipt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":v[10]||(v[10]=b=>t.value={...t.value,hidden:b.length>0?b:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时整个列表只读,不能新增/删除/重排",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":v[11]||(v[11]=b=>t.value={...t.value,disabled:b.length>0?b:void 0})},null,8,["model-value"])]),_:1})])])]),_:1},8,["modelValue","selection"]))}}),Mpt={class:"flex flex-col gap-3"},Rpt={class:"grid grid-cols-2 gap-3"},Fpt={class:"grid grid-cols-2 gap-3"},zpt={class:"flex flex-col gap-3"},Vpt={type:"button","data-slot":"checkbox-group-item-kind-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5","aria-label":"切换值类型"},Npt={class:"grid grid-cols-3 gap-3"},Lpt=q({name:"ShwfedCheckboxGroupFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=_oe(()=>{}),o=S=>Ln(n,S)??S,r=S=>Bn(n,S),a=QR(()=>{}),i=S=>Ln(a,S)??S,l=S=>Bn(a,S),u=E({get:()=>t.value.binding??"",set:S=>{const C=S.trim();if(C.length===0){const{binding:$,...T}=t.value;t.value=T}else t.value={...t.value,binding:C}}}),d=E(()=>t.value.items??[]);function p(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,S=>{const C=Math.random()*16|0;return(S==="x"?C:C&3|8).toString(16)})}function m(){return{id:p(),label:[{locale:"zh",message:""}],value:{kind:"text",value:""}}}function h(S,C){const $=[...t.value.items??[]],T=$[S];T&&($[S]={...T,...C},t.value={...t.value,items:$})}function g(){t.value={...t.value,items:[...t.value.items??[],m()]}}function v(S){const C=[...t.value.items??[]];C.splice(S,1),t.value={...t.value,items:C}}function b(S,C){const $=t.value.items?.[S];!$||$.value.kind===C||h(S,{value:C==="text"?{kind:"text",value:""}:{kind:"number",value:0}})}function x(S,C){h(S,{value:{kind:"text",value:C}})}function y(S,C){h(S,{value:{kind:"number",value:typeof C=="number"&&Number.isFinite(C)?C:0}})}function _(S,C){h(S,{label:C})}function w(S,C){if(!C||C.every(T=>T.message.trim().length===0)){const T=t.value.items?.[S];if(!T)return;const{tooltip:D,...A}=T,I=[...t.value.items??[]];I[S]=A,t.value={...t.value,items:I}}else h(S,{tooltip:C})}return(S,C)=>(k(),L("div",Mpt,[H("div",Rpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户标签","onUpdate:modelValue":C[0]||(C[0]=$=>{const T=String($??"");t.value={...t.value,displayName:T.length>0?T:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.tags`;写入值为已勾选选项值的数组",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:u.value,"onUpdate:modelValue":C[1]||(C[1]=$=>u.value=$),placeholder:"例:user.tags",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Fpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":C[2]||(C[2]=$=>t.value={...t.value,label:$})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":C[3]||(C[3]=$=>t.value={...t.value,tooltip:$})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("items")??"复选框组可选项列表",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("items")),1)]),_:1}),H("div",zpt,[(k(!0),L(Me,null,Ke(d.value,($,T)=>(k(),L("div",{key:$.id,"data-slot":"checkbox-group-item",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"checkbox-group-item-delete","aria-label":"删除选项",class:"absolute right-2 top-2 z-10",onClick:D=>v(T)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"checkbox option label","model-value":$.label,"onUpdate:modelValue":D=>_(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"icon-sm","as-child":""},{default:f(()=>[H("button",Vpt,[c(s(fe),{icon:$.value.kind==="number"?"fluent:number-symbol-20-regular":"fluent:textbox-20-regular"},null,8,["icon"])])]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[c(s(Vo),{onSelect:D=>b(T,"text")},{default:f(()=>[c(s(fe),{icon:"fluent:textbox-20-regular"}),C[8]||(C[8]=H("span",null,"文本",-1))]),_:1},8,["onSelect"]),c(s(Vo),{onSelect:D=>b(T,"number")},{default:f(()=>[c(s(fe),{icon:"fluent:number-symbol-20-regular"}),C[9]||(C[9]=H("span",null,"数字",-1))]),_:1},8,["onSelect"])]),_:2},1024)]),_:2},1024)]),_:2},1024),$.value.kind==="text"?(k(),M(s(mt),{key:0,"model-value":$.value.value,placeholder:"例:cny","onUpdate:modelValue":D=>x(T,String(D??""))},null,8,["model-value","onUpdate:modelValue"])):(k(),M(s(wn),{key:1,"model-value":$.value.value,"onUpdate:modelValue":D=>y(T,D)},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1024)]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("tooltip")),1)]),_:2},[l("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"checkbox option tooltip","model-value":$.tooltip,"onUpdate:modelValue":D=>w(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"checkbox-group-add-item",class:"w-full justify-center",onClick:g},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),C[10]||(C[10]=H("span",null,"增加选项",-1))]),_:1})])]),_:1}),H("div",Npt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[4]||(C[4]=$=>t.value={...t.value,hidden:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时复选框仍然渲染但不可勾选",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[5]||(C[5]=$=>t.value={...t.value,disabled:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前已勾选选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[6]||(C[6]=$=>t.value={...t.value,readonly:$.length>0?$:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.defaultTags","onUpdate:modelValue":C[7]||(C[7]=$=>t.value={...t.value,derived:$})},null,8,["model-value"])]),_:1})]))}}),Bpt={class:"flex flex-col gap-3"},Upt={class:"grid grid-cols-2 gap-3"},qpt={class:"grid grid-cols-2 gap-3"},jpt={class:"flex flex-col gap-3"},Hpt={type:"button","data-slot":"radio-group-item-kind-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5","aria-label":"切换值类型"},Wpt={class:"grid grid-cols-3 gap-3"},Gpt=q({name:"ShwfedRadioGroupFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Soe(()=>{}),o=S=>Ln(n,S)??S,r=S=>Bn(n,S),a=e4(()=>{}),i=S=>Ln(a,S)??S,l=S=>Bn(a,S),u=E({get:()=>t.value.binding??"",set:S=>{const C=S.trim();if(C.length===0){const{binding:$,...T}=t.value;t.value=T}else t.value={...t.value,binding:C}}}),d=E(()=>t.value.items??[]);function p(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,S=>{const C=Math.random()*16|0;return(S==="x"?C:C&3|8).toString(16)})}function m(){return{id:p(),label:[{locale:"zh",message:""}],value:{kind:"text",value:""}}}function h(S,C){const $=[...t.value.items??[]],T=$[S];T&&($[S]={...T,...C},t.value={...t.value,items:$})}function g(){t.value={...t.value,items:[...t.value.items??[],m()]}}function v(S){const C=[...t.value.items??[]];C.splice(S,1),t.value={...t.value,items:C}}function b(S,C){const $=t.value.items?.[S];!$||$.value.kind===C||h(S,{value:C==="text"?{kind:"text",value:""}:{kind:"number",value:0}})}function x(S,C){h(S,{value:{kind:"text",value:C}})}function y(S,C){h(S,{value:{kind:"number",value:typeof C=="number"&&Number.isFinite(C)?C:0}})}function _(S,C){h(S,{label:C})}function w(S,C){if(!C||C.every(T=>T.message.trim().length===0)){const T=t.value.items?.[S];if(!T)return;const{tooltip:D,...A}=T,I=[...t.value.items??[]];I[S]=A,t.value={...t.value,items:I}}else h(S,{tooltip:C})}return(S,C)=>(k(),L("div",Bpt,[H("div",Upt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户角色","onUpdate:modelValue":C[0]||(C[0]=$=>{const T=String($??"");t.value={...t.value,displayName:T.length>0?T:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.role`;写入值为选中选项的值",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:u.value,"onUpdate:modelValue":C[1]||(C[1]=$=>u.value=$),placeholder:"例:user.role",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",qpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":C[2]||(C[2]=$=>t.value={...t.value,label:$})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":C[3]||(C[3]=$=>t.value={...t.value,tooltip:$})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("items")??"单选框组可选项列表",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("items")),1)]),_:1}),H("div",jpt,[(k(!0),L(Me,null,Ke(d.value,($,T)=>(k(),L("div",{key:$.id,"data-slot":"radio-group-item",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"radio-group-item-delete","aria-label":"删除选项",class:"absolute right-2 top-2 z-10",onClick:D=>v(T)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"radio option label","model-value":$.label,"onUpdate:modelValue":D=>_(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"icon-sm","as-child":""},{default:f(()=>[H("button",Hpt,[c(s(fe),{icon:$.value.kind==="number"?"fluent:number-symbol-20-regular":"fluent:textbox-20-regular"},null,8,["icon"])])]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[c(s(Vo),{onSelect:D=>b(T,"text")},{default:f(()=>[c(s(fe),{icon:"fluent:textbox-20-regular"}),C[8]||(C[8]=H("span",null,"文本",-1))]),_:1},8,["onSelect"]),c(s(Vo),{onSelect:D=>b(T,"number")},{default:f(()=>[c(s(fe),{icon:"fluent:number-symbol-20-regular"}),C[9]||(C[9]=H("span",null,"数字",-1))]),_:1},8,["onSelect"])]),_:2},1024)]),_:2},1024)]),_:2},1024),$.value.kind==="text"?(k(),M(s(mt),{key:0,"model-value":$.value.value,placeholder:"例:cny","onUpdate:modelValue":D=>x(T,String(D??""))},null,8,["model-value","onUpdate:modelValue"])):(k(),M(s(wn),{key:1,"model-value":$.value.value,"onUpdate:modelValue":D=>y(T,D)},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1024)]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("tooltip")),1)]),_:2},[l("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"radio option tooltip","model-value":$.tooltip,"onUpdate:modelValue":D=>w(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"radio-group-add-item",class:"w-full justify-center",onClick:g},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),C[10]||(C[10]=H("span",null,"增加选项",-1))]),_:1})])]),_:1}),H("div",Wpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[4]||(C[4]=$=>t.value={...t.value,hidden:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时单选框仍然渲染但不可选择",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[5]||(C[5]=$=>t.value={...t.value,disabled:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前选中选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[6]||(C[6]=$=>t.value={...t.value,readonly:$.length>0?$:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.defaultRole","onUpdate:modelValue":C[7]||(C[7]=$=>t.value={...t.value,derived:$})},null,8,["model-value"])]),_:1})]))}}),Kpt={class:"grid grid-cols-2 gap-3"},Ypt=q({name:"ShwfedTableFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=nv(()=>aa(()=>Promise.resolve().then(()=>J0t),void 0,import.meta.url)),n=Ot(e,"modelValue"),o=Fre(()=>{}),r=p=>Ln(o,p)??p,a=p=>Bn(o,p),i=Fn(n_,null);Pt(()=>{i&&(i.fullPane.value=!0)}),tr(()=>{i&&(i.fullPane.value=!1)});function l(p){sae(p)}const u=E({get:()=>{const{dataSource:p,...m}=n.value.table;return m},set:p=>{const{dataSource:m,...h}=p;n.value={...n.value,table:h}}}),d=E({get:()=>n.value.binding??"",set:p=>{const m=p.trim();if(m.length===0){const{binding:h,...g}=n.value;n.value=g}else n.value={...n.value,binding:m}}});return(p,m)=>(k(),M(s(t),{modelValue:u.value,"onUpdate:modelValue":m[4]||(m[4]=h=>u.value=h),configure:l,"hide-display-name":"","hide-data-source":""},{"general-extra":f(()=>[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(r("binding")),1)]),_:2},[a("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:a("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:d.value,"onUpdate:modelValue":m[0]||(m[0]=h=>d.value=h),placeholder:"例:rows",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1}),H("div",Kpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(r("label")),1)]),_:2},[a("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:a("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":n.value.label,"onUpdate:modelValue":m[1]||(m[1]=h=>n.value={...n.value,label:h})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(r("tooltip")),1)]),_:2},[a("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:a("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":n.value.tooltip,"onUpdate:modelValue":m[2]||(m[2]=h=>n.value={...n.value,tooltip:h})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:a("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(r("hidden")),1)]),_:1}),c(s(qe),{"model-value":n.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":m[3]||(m[3]=h=>n.value={...n.value,hidden:h.length>0?h:void 0})},null,8,["model-value"])]),_:1})]),_:1},8,["modelValue"]))}}),Jpt={class:"flex flex-col gap-2"},Xpt=q({name:"ShwfedCollapsibleFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Nre(()=>{}),o=p=>Ln(n,p)??p,r=p=>Bn(n,p),a=Fn(n_,null);Pt(()=>{a&&(a.fullPane.value=!0)}),tr(()=>{a&&(a.fullPane.value=!1)});const i=E({get:()=>t.value.unit,set:p=>{t.value={...t.value,unit:p}}}),l=[{id:"general",label:"通用配置",icon:"fluent:settings-20-regular"}],u=re({kind:"extras",id:"general"}),d=E({get:()=>t.value.defaultCollapsed??!1,set:p=>{if(p===!0)t.value={...t.value,defaultCollapsed:!0};else{const{defaultCollapsed:m,...h}=t.value;t.value=h}}});return(p,m)=>(k(),M(m4,{modelValue:i.value,"onUpdate:modelValue":m[3]||(m[3]=h=>i.value=h),selection:u.value,"onUpdate:selection":m[4]||(m[4]=h=>u.value=h),extras:l},{"extras-pane":f(()=>[H("div",Jpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:基本信息","onUpdate:modelValue":m[0]||(m[0]=h=>{const g=String(h??"");t.value={...t.value,displayName:g.length>0?g:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("header")),1)]),_:2},[r("header")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("header"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"折叠区域标题,行内 Markdown 文本,保留表达式插值占位符不要翻译","model-value":t.value.header,"onUpdate:modelValue":m[1]||(m[1]=h=>t.value={...t.value,header:h})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"horizontal",class:"h-9 w-auto gap-2"},{default:f(()=>[c(s(Lo),{modelValue:d.value,"onUpdate:modelValue":m[2]||(m[2]=h=>d.value=h)},null,8,["modelValue"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("defaultCollapsed")),1)]),_:2},[r("defaultCollapsed")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("defaultCollapsed"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]),_:1},8,["modelValue","selection"]))}}),Zpt={class:"flex flex-col gap-3"},Qpt={class:"grid grid-cols-2 gap-3"},emt={class:"grid grid-cols-2 gap-3"},tmt={class:"text-xs font-medium text-zinc-500"},nmt={class:"grid grid-cols-2 gap-3"},omt={class:"grid grid-cols-2 gap-3"},rmt={class:"grid grid-cols-3 gap-3"},amt={class:"flex items-center gap-2"},imt={class:"text-xs font-medium text-zinc-500"},smt={key:0,class:"grid grid-cols-2 gap-3"},lmt={class:"grid grid-cols-3 gap-3"},umt=q({name:"ShwfedTreeMultiFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Ure(()=>{}),o=$=>Ln(n,$)??$,r=$=>Bn(n,$),a=P$(()=>{}),i=$=>Ln(a,$)??$,l=$=>Bn(a,$),u=n.fields.filter.from,d=$=>Ln(u,$)??$,p=$=>Bn(u,$),m={node:{type:"dyn",label:"当前节点",description:"由 `数据` 表达式返回的每一项;类型在配置时未知(`dyn`)"}},h={json:{type:"optional<dyn>",label:"HTTP 响应体",description:"已解析的 JSON 响应;未配置 `request` 时为 `none`"}},g=E({get:()=>t.value.binding??"",set:$=>{const T=$.trim();if(T.length===0){const{binding:D,...A}=t.value;t.value=A}else t.value={...t.value,binding:T}}}),v=[{value:"independent",label:"独立"},{value:"cascade-down",label:"向下级联"},{value:"cascade-both",label:"双向级联"}];function b($){t.value={...t.value,dataSource:{...t.value.dataSource,data:$}}}function x($){if($.trim().length===0){const{request:D,...A}=t.value.dataSource;t.value={...t.value,dataSource:A}}else t.value={...t.value,dataSource:{...t.value.dataSource,request:$}}}function y($,T){if(T.length===0){const{[$]:D,...A}=t.value;t.value=A}else t.value={...t.value,[$]:T}}const _=E(()=>t.value.filter);function w($){if($)t.value={...t.value,filter:{...t.value.filter??{},enabled:!0}};else{const{filter:T,...D}=t.value;t.value=D}}function S($){const T=t.value.filter;if(!T)return;if(!$||$.every(A=>A.message.trim().length===0)){const{label:A,...I}=T;t.value={...t.value,filter:I}}else t.value={...t.value,filter:{...T,label:$}}}function C($){const T=t.value.filter;if(T)if($.length===0){const{keywords:D,...A}=T;t.value={...t.value,filter:A}}else t.value={...t.value,filter:{...T,keywords:$}}}return($,T)=>(k(),L("div",Zpt,[H("div",Qpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:所属部门","onUpdate:modelValue":T[0]||(T[0]=D=>{const A=String(D??"");t.value={...t.value,displayName:A.length>0?A:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("binding")),1)]),_:2},[r("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:g.value,"onUpdate:modelValue":T[1]||(T[1]=D=>g.value=D),placeholder:"例:user.departmentIds",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",emt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":T[2]||(T[2]=D=>t.value={...t.value,label:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":T[3]||(T[3]=D=>t.value={...t.value,tooltip:D})},null,8,["model-value"])]),_:1})]),H("h3",tmt,O(o("dataSource")),1),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("request")),1)]),_:2},[l("request")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("request"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.dataSource.request??"",placeholder:"如 http.get('/api/departments/tree')","result-type":"HttpRequest",multiline:"",class:"min-h-20","onUpdate:modelValue":x},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("data")),1)]),_:2},[l("data")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("data"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.dataSource.data,placeholder:"如 json.?value.roots.orValue([])","result-type":"list","extra-vars":h,"onUpdate:modelValue":b},null,8,["model-value"])]),_:1}),T[15]||(T[15]=H("h3",{class:"text-xs font-medium text-zinc-500"}," 节点 ",-1)),H("div",nmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeKey")),1)]),_:2},[r("nodeKey")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeKey"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.nodeKey,placeholder:"例:string(node.id)","result-type":["string","number","dyn"],"extra-vars":m,class:"min-h-10","onUpdate:modelValue":T[4]||(T[4]=D=>t.value={...t.value,nodeKey:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeChildren")),1)]),_:2},[r("nodeChildren")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeChildren"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.nodeChildren,placeholder:"例:has(node.children) ? node.children : null","result-type":"list","extra-vars":m,class:"min-h-10","onUpdate:modelValue":T[5]||(T[5]=D=>t.value={...t.value,nodeChildren:D})},null,8,["model-value"])]),_:1})]),H("div",omt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeLabel")),1)]),_:2},[r("nodeLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"tree node label","model-value":t.value.nodeLabel,"onUpdate:modelValue":T[6]||(T[6]=D=>t.value={...t.value,nodeLabel:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeTooltip")),1)]),_:2},[r("nodeTooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeTooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"tree node tooltip","model-value":t.value.nodeTooltip,"onUpdate:modelValue":T[7]||(T[7]=D=>t.value={...t.value,nodeTooltip:D})},null,8,["model-value"])]),_:1})]),H("div",rmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeSelectable")),1)]),_:2},[r("nodeSelectable")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeSelectable"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.nodeSelectable??"",placeholder:"例:node.kind == 'leaf'","result-type":"bool","extra-vars":m,class:"min-h-10","onUpdate:modelValue":T[8]||(T[8]=D=>y("nodeSelectable",D))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("cascade")),1)]),_:2},[r("cascade")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("cascade"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.cascade??"cascade-both","onUpdate:modelValue":T[9]||(T[9]=D=>t.value={...t.value,cascade:D})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(v,D=>c(s(Xn),{key:D.value,value:D.value},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("expandAll")),1)]),_:2},[r("expandAll")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("expandAll"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",null,[c(s(Lo),{"model-value":t.value.expandAll??!1,"onUpdate:modelValue":T[10]||(T[10]=D=>t.value={...t.value,expandAll:D})},null,8,["model-value"])])]),_:1})]),H("div",amt,[H("h3",imt,O(o("filter")),1),c(s(Lo),{size:"sm","model-value":_.value?.enabled??!1,"aria-label":d("enabled"),"onUpdate:modelValue":w},null,8,["model-value","aria-label"])]),_.value?.enabled?(k(),L("div",smt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d("label")),1)]),_:2},[p("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:p("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"tree filter input label","model-value":_.value.label,"onUpdate:modelValue":S},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d("keywords")),1)]),_:2},[p("keywords")?{name:"tooltip",fn:f(()=>[c(s(z),{source:p("keywords"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":_.value.keywords??"",placeholder:"例:[node.code, node.alias]","result-type":"list","extra-vars":m,class:"min-h-10","onUpdate:modelValue":C},null,8,["model-value"])]),_:1})])):ke("",!0),H("div",lmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[11]||(T[11]=D=>y("hidden",D))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时仍渲染但不可勾选",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[12]||(T[12]=D=>y("disabled",D))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前已勾选节点的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[13]||(T[13]=D=>y("readonly",D))},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.defaultDepartmentIds","onUpdate:modelValue":T[14]||(T[14]=D=>t.value={...t.value,derived:D})},null,8,["model-value"])]),_:1})]))}}),cmt={class:"flex flex-col gap-3"},dmt={class:"grid grid-cols-2 gap-3"},fmt={class:"grid grid-cols-3 gap-3"},pmt={class:"grid grid-cols-3 gap-3"},mmt={class:"grid grid-cols-3 gap-3"},hmt={class:"flex flex-col gap-3"},gmt={class:"grid grid-cols-3 gap-3"},vmt=q({name:"ShwfedMonthFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Hre(()=>{}),o=$=>Ln(n,$)??$,r=$=>Bn(n,$),a=f4(()=>{}),i=$=>Ln(a,$)??$,l=$=>Bn(a,$),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,$=>{const T=Math.random()*16|0;return($==="x"?T:T&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],value:""}}function m($,T){const D=[...t.value.presets??[]],A=D[$];A&&(D[$]={...A,...T},t.value={...t.value,presets:D})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g($){const T=[...t.value.presets??[]];T.splice($,1),t.value={...t.value,presets:T}}function v($,T){m($,{label:T})}function b($,T){m($,{value:T})}const x=E({get:()=>t.value.binding??"",set:$=>{const T=$.trim();if(T.length===0){const{binding:D,...A}=t.value;t.value=A}else t.value={...t.value,binding:T}}}),y=E({get:()=>t.value.format??"",set:$=>{const T=$.trim();if(T.length===0){const{format:D,...A}=t.value;t.value=A}else t.value={...t.value,format:T}}}),_=E({get:()=>t.value.valueFormat??"",set:$=>{const T=$.trim();if(T.length===0){const{valueFormat:D,...A}=t.value;t.value=A}else t.value={...t.value,valueFormat:T}}});function w($){if(!$)return"";try{return ir(new Date,$)}catch{return"(无效格式)"}}const S=E(()=>w(t.value.format??"")),C=E(()=>w(t.value.valueFormat??""));return($,T)=>(k(),L("div",cmt,[H("div",dmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:入职月份","onUpdate:modelValue":T[0]||(T[0]=D=>{const A=String(D??"");t.value={...t.value,displayName:A.length>0?A:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.joinMonth`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:x.value,"onUpdate:modelValue":T[1]||(T[1]=D=>x.value=D),placeholder:"例:user.joinMonth",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",fmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":T[2]||(T[2]=D=>t.value={...t.value,label:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":T[3]||(T[3]=D=>t.value={...t.value,placeholder:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":T[4]||(T[4]=D=>t.value={...t.value,tooltip:D})},null,8,["model-value"])]),_:1})]),H("div",pmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示月份的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:y.value,"onUpdate:modelValue":T[5]||(T[5]=D=>y.value=D),placeholder:"例:yyyy-MM",class:"font-mono"},null,8,["modelValue"]),S.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(S.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":T[6]||(T[6]=D=>_.value=D),placeholder:"例:yyyy-MM",class:"font-mono"},null,8,["modelValue"]),C.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(C.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),H("div",mmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":T[7]||(T[7]=D=>t.value={...t.value,orientation:D})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),D=>(k(),M(s(Xn),{key:D.value,value:D.value},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",hmt,[(k(!0),L(Me,null,Ke(u.value,(D,A)=>(k(),L("div",{key:D.id,"data-slot":"month-field-preset",class:"relative pt-8 grid grid-cols-2 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"month-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:I=>g(A)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"month field preset label","model-value":D.label,"onUpdate:modelValue":I=>v(A,I)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":D.value,placeholder:'例:now.offset(-1, "months")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":I=>b(A,I)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"month-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),T[12]||(T[12]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",gmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[8]||(T[8]=D=>t.value={...t.value,hidden:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[9]||(T[9]=D=>t.value={...t.value,disabled:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[10]||(T[10]=D=>t.value={...t.value,readonly:D.length>0?D:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.startMonth","onUpdate:modelValue":T[11]||(T[11]=D=>t.value={...t.value,derived:D})},null,8,["model-value"])]),_:1})]))}}),ymt={class:"flex flex-col gap-3"},bmt={class:"grid grid-cols-2 gap-3"},_mt={key:1,class:"grid grid-cols-2 gap-2"},xmt={class:"grid grid-cols-2 gap-3"},wmt={class:"grid grid-cols-2 gap-3"},Smt={class:"grid grid-cols-3 gap-3"},kmt={class:"grid grid-cols-3 gap-3"},Cmt={class:"flex flex-col gap-3"},$mt={class:"grid grid-cols-3 gap-3"},Tmt=q({name:"ShwfedMonthRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Kre(()=>{}),o=F=>Ln(n,F)??F,r=F=>Bn(n,F),a=p4(()=>{}),i=F=>Ln(a,F)??F,l=F=>Bn(a,F),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,F=>{const R=Math.random()*16|0;return(F==="x"?R:R&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],start:"",end:""}}function m(F,R){const G=[...t.value.presets??[]],Z=G[F];Z&&(G[F]={...Z,...R},t.value={...t.value,presets:G})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g(F){const R=[...t.value.presets??[]];R.splice(F,1),t.value={...t.value,presets:R}}function v(F,R){m(F,{label:R})}function b(F,R){m(F,{start:R})}function x(F,R){m(F,{end:R})}const y=E(()=>Array.isArray(t.value.binding)?"split":"single"),_=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:F=>{const R=F.trim();if(R.length===0){const{binding:G,...Z}=t.value;t.value=Z}else t.value={...t.value,binding:R}}}),w=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),S=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function C(F){const R=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[F.trim(),R[1]]}}function $(F){const R=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[R[0],F.trim()]}}function T(){if(y.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:F,...R}=t.value;t.value=R}}const D=E({get:()=>t.value.format??"",set:F=>{const R=F.trim();if(R.length===0){const{format:G,...Z}=t.value;t.value=Z}else t.value={...t.value,format:R}}}),A=E({get:()=>t.value.valueFormat??"",set:F=>{const R=F.trim();if(R.length===0){const{valueFormat:G,...Z}=t.value;t.value=Z}else t.value={...t.value,valueFormat:R}}});function I(F){const R=F.trim();if(R.length===0){const{rangeSeparatorIcon:G,...Z}=t.value;t.value=Z}else t.value={...t.value,rangeSeparatorIcon:R}}function U(F){if(!F)return"";try{return ir(new Date,F)}catch{return"(无效格式)"}}const j=E(()=>U(t.value.format??"")),Q=E(()=>U(t.value.valueFormat??""));return(F,R)=>(k(),L("div",ymt,[H("div",bmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:月份范围","onUpdate:modelValue":R[0]||(R[0]=G=>{const Z=String(G??"");t.value={...t.value,displayName:Z.length>0?Z:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 字符串数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),y.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":R[1]||(R[1]=G=>_.value=G),placeholder:"例:event.months",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",_mt,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...R[15]||(R[15]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":w.value,placeholder:"例:event.startMonth",class:"font-mono","onUpdate:modelValue":R[2]||(R[2]=G=>C(String(G??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...R[16]||(R[16]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":S.value,placeholder:"例:event.endMonth",class:"font-mono","onUpdate:modelValue":R[3]||(R[3]=G=>$(String(G??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",xmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":R[4]||(R[4]=G=>t.value={...t.value,label:G})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":R[5]||(R[5]=G=>t.value={...t.value,tooltip:G})},null,8,["model-value"])]),_:1})]),H("div",wmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("startPlaceholder")),1)]),_:2},[r("startPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("startPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.startPlaceholder,"onUpdate:modelValue":R[6]||(R[6]=G=>t.value={...t.value,startPlaceholder:G})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("endPlaceholder")),1)]),_:2},[r("endPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("endPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.endPlaceholder,"onUpdate:modelValue":R[7]||(R[7]=G=>t.value={...t.value,endPlaceholder:G})},null,8,["model-value"])]),_:1})]),H("div",Smt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示月份的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:D.value,"onUpdate:modelValue":R[8]||(R[8]=G=>D.value=G),placeholder:"例:yyyy-MM",class:"font-mono"},null,8,["modelValue"]),j.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(j.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:A.value,"onUpdate:modelValue":R[9]||(R[9]=G=>A.value=G),placeholder:"例:yyyy-MM",class:"font-mono"},null,8,["modelValue"]),Q.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(Q.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),H("div",kmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":R[10]||(R[10]=G=>t.value={...t.value,orientation:G})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),G=>(k(),M(s(Xn),{key:G.value,value:G.value},{default:f(()=>[P(O(G.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":I},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",Cmt,[(k(!0),L(Me,null,Ke(u.value,(G,Z)=>(k(),L("div",{key:G.id,"data-slot":"monthrange-field-preset",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"monthrange-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:Y=>g(Z)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"month range field preset label","model-value":G.label,"onUpdate:modelValue":Y=>v(Z,Y)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("start")),1)]),_:2},[l("start")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("start"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":G.start,placeholder:'例:now.offset(-3, "months")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":Y=>b(Z,Y)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("end")),1)]),_:2},[l("end")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("end"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":G.end,placeholder:"例:now","result-type":"Date",class:"min-h-10","onUpdate:modelValue":Y=>x(Z,Y)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"monthrange-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),R[17]||(R[17]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",$mt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":R[11]||(R[11]=G=>t.value={...t.value,hidden:G.length>0?G:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":R[12]||(R[12]=G=>t.value={...t.value,disabled:G.length>0?G:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":R[13]||(R[13]=G=>t.value={...t.value,readonly:G.length>0?G:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.from, form.to]","onUpdate:modelValue":R[14]||(R[14]=G=>t.value={...t.value,derived:G})},null,8,["model-value"])]),_:1})]))}}),Emt=q({name:"ShwfedMarkdownFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),o=E(()=>ut(t.config.content,n.value)??"");return(r,a)=>o.value?(k(),M(s(z),{key:0,source:o.value,block:"",class:"prose prose-sm prose-zinc max-w-none"},null,8,["source"])):ke("",!0)}}),Yre=Symbol("shwfed-form-readonly"),Dmt=re(!1);function Omt(e){fr(Yre,e)}function ma(){return Fn(Yre,Dmt)}const Amt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Imt=q({name:"ShwfedTextFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o}=dr(),r=vn(),a=(_,w)=>Ht(_,{...dn(r),...w}),i=E(()=>ut(t.config.label,n.value)),l=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),u=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function d(_,w){if(!_)return!1;try{return bt(a(_,{form:o.value??{}}))}catch(S){return console.error(`[shwfed-form] failed to evaluate ${w} for ${t.fieldId}:`,S),!1}}const p=E(()=>d(t.config.disabled,"disabled")),m=ma(),h=E(()=>t.config.readonly!=null?d(t.config.readonly,"readonly"):m.value),g=E(()=>h.value||t.config.derived?.mode==="formula"),{draft:v,commit:b}=t0({binding:()=>t.config.binding,fromState:_=>_==null?"":String(_),toState:_=>_.length===0?null:_}),x=E(()=>!p.value&&v.value.length>0);function y(){v.value="",b()}return(_,w)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":p.value||void 0},{default:f(()=>[i.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i.value),1)]),_:2},[u.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:u.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),g.value?(k(),L("div",Amt,O(s(v)||"—"),1)):(k(),M(s(Ge),{key:2,class:"group/text-field"},{default:f(()=>[c(s(mt),{id:e.fieldId,modelValue:s(v),"onUpdate:modelValue":w[0]||(w[0]=S=>jn(v)?v.value=S:null),placeholder:l.value,disabled:p.value,onBlur:s(b),onKeydown:Ro(s(b),["enter"])},null,8,["id","modelValue","placeholder","disabled","onBlur","onKeydown"]),x.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/text-field:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"text-field-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:w[1]||(w[1]=at(()=>{},["prevent"])),onClick:at(y,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1}))]),_:1},8,["orientation","data-disabled"]))}}),Pmt={key:1,class:"min-h-9 py-1.5 text-sm whitespace-pre-wrap text-zinc-700"},Mmt=q({name:"ShwfedTextareaFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o}=dr(),r=vn(),a=(x,y)=>Ht(x,{...dn(r),...y}),i=E(()=>ut(t.config.label,n.value)),l=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),u=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function d(x,y){if(!x)return!1;try{return bt(a(x,{form:o.value??{}}))}catch(_){return console.error(`[shwfed-form] failed to evaluate ${y} for ${t.fieldId}:`,_),!1}}const p=E(()=>d(t.config.disabled,"disabled")),m=ma(),h=E(()=>t.config.readonly!=null?d(t.config.readonly,"readonly"):m.value),g=E(()=>h.value||t.config.derived?.mode==="formula"),{draft:v,commit:b}=t0({binding:()=>t.config.binding,fromState:x=>x==null?"":String(x),toState:x=>x});return(x,y)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":p.value||void 0},{default:f(()=>[i.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i.value),1)]),_:2},[u.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:u.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),g.value?(k(),L("div",Pmt,O(s(v)||"—"),1)):(k(),M(s(Ge),{key:2},{default:f(()=>[c(s(BR),{id:e.fieldId,modelValue:s(v),"onUpdate:modelValue":y[0]||(y[0]=_=>jn(v)?v.value=_:null),placeholder:l.value,disabled:p.value,rows:e.config.rows,onBlur:s(b)},null,8,["id","modelValue","placeholder","disabled","rows","onBlur"])]),_:1}))]),_:1},8,["orientation","data-disabled"]))}}),Rmt=q({name:"ShwfedActionsFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,n=E(()=>({kind:"shwfed.component.action",size:"default",gap:t.config.gap,style:t.config.style,groups:t.config.groups.map(o=>({...o,variant:o.variant??"default"})),items:t.config.items}));return(o,r)=>(k(),M(A$,{config:n.value},null,8,["config"]))}}),Fmt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},zmt=q({name:"ShwfedComboboxSingleFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"combobox-single-placeholder":"请选择","combobox-single-search-placeholder":"搜索…","combobox-single-empty":"无匹配项"},en:{"combobox-single-placeholder":"Select…","combobox-single-search-placeholder":"Search…","combobox-single-empty":"No matches"},ja:{"combobox-single-placeholder":"選択してください","combobox-single-search-placeholder":"検索…","combobox-single-empty":"一致なし"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=(F,R)=>Ht(F,{...dn(l),...R}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):o("combobox-single-placeholder")),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(F,R){if(!F)return!1;try{return bt(u(F,{form:r.value??{}}))}catch(G){return console.error(`[shwfed-form] failed to evaluate ${R} for ${t.fieldId}:`,G),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula");function y(F){try{return bt(u(t.config.optionValue,{form:r.value??{},option:F}))}catch(R){console.error(`[shwfed-form] failed to evaluate optionValue for ${t.fieldId}:`,R);return}}function _(F){const R=ut(t.config.optionLabel,n.value)??"";return R?Ss(R,u,{form:r.value??{},option:F}):""}const w=E(()=>{let F;try{F=bt(u(t.config.options,{form:r.value??{}}))}catch(R){return console.error(`[shwfed-form] failed to evaluate options for ${t.fieldId}:`,R),[]}return Array.isArray(F)?F.map((R,G)=>({key:String(G),label:_(R),value:y(R)})):[]}),S=re(void 0),C=E({get:()=>{const F=t.config.binding;return F==null?S.value:a(F)},set:F=>{const R=t.config.binding;if(R==null){S.value=F;return}i(R,F)}});function $(F,R){if(F===R)return!0;if(F==null||R==null)return!1;if(typeof F=="object"&&typeof R=="object")try{return JSON.stringify(F)===JSON.stringify(R)}catch{return!1}return!1}const T=E(()=>w.value.find(F=>$(F.value,C.value))),D=E(()=>T.value?.key),A=E(()=>T.value?.label??""),I=re(!1);function U(F){if(typeof F!="string")return;const R=w.value.find(G=>G.key===F);R&&(C.value=R.value,It().then(()=>{I.value=!1}))}const j=E(()=>!g.value&&T.value!==void 0);function Q(){C.value=void 0,I.value=!1}return(F,R)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":g.value||void 0},{default:f(()=>[d.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",Fmt,O(A.value||"—"),1)):(k(),M(s(nc),{key:2,open:I.value,"onUpdate:open":R[1]||(R[1]=G=>I.value=G)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(s(Ge),{class:"group/combobox-single","data-disabled":g.value?"true":void 0},{default:f(()=>[c(s(ip),{"as-child":""},{default:f(()=>[c(s(mt),{id:e.fieldId,"model-value":A.value,disabled:g.value,placeholder:p.value,class:"cursor-pointer text-left",readonly:""},null,8,["id","model-value","disabled","placeholder"])]),_:1}),j.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"combobox-single-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:R[0]||(R[0]=at(()=>{},["prevent"])),onClick:at(Q,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"])]),_:1}),c(s(oc),{class:"p-0",style:{width:"var(--reka-popover-trigger-width)"}},{default:f(()=>[c(s(np),{"model-value":D.value,disabled:g.value,"selection-behavior":"toggle","onUpdate:modelValue":U},{default:f(()=>[c(s(Zm),{placeholder:s(o)("combobox-single-search-placeholder")},null,8,["placeholder"]),c(s(rp),null,{default:f(()=>[c(s(op),{class:"py-6 text-center text-sm text-zinc-500"},{default:f(()=>[P(O(s(o)("combobox-single-empty")),1)]),_:1}),c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(w.value,G=>(k(),M(s(ws),{key:G.key,value:G.key},{default:f(()=>[P(O(G.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["model-value","disabled"])]),_:1})]),_:1},8,["open"]))]),_:1},8,["orientation","data-disabled"]))}}),Vmt={class:"w-full flex items-center gap-1 absolute top-1/2 -translate-y-1/2 transform-gpu inset-x-0 justify-between z-10"},Nmt={key:0,class:"text-sm font-medium",style:{"text-autospace":"normal"}},Lmt={key:0,class:"grid grid-cols-4 gap-1 mt-4 w-full"},Bmt=["disabled","onClick"],Umt={key:1,class:"grid grid-cols-4 gap-1 mt-4 w-full"},qmt=["disabled","onClick"],jmt={key:2,class:"flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0"},M$=q({name:"UiCalendar",__name:"Calendar",props:{defaultValue:{},defaultPlaceholder:{},placeholder:{},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},locale:{},numberOfMonths:{},disabled:{type:Boolean},readonly:{type:Boolean},initialFocus:{type:Boolean},isDateDisabled:{},isDateUnavailable:{},dir:{},nextPage:{},prevPage:{},modelValue:{default:void 0},multiple:{type:Boolean},disableDaysOutsideCurrentView:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},layout:{default:void 0}},emits:["update:modelValue","update:placeholder"],setup(e,{emit:t}){const n=e,o=t,r=At(n,"class","layout","placeholder"),a=ao(n,"placeholder",o,{passive:!0,defaultValue:n.defaultPlaceholder??nd(_s())}),i=$8(),{locale:l}=un({useScope:"global",inheritLocale:!0}),u=E(()=>n.locale??l.value??i.language.value??"en"),d=R1(u.value);Xe(u,v=>{d.setLocale(v)});const p=Dn(r,o),m=E(()=>{const v=i.language.value;if(!i.isSupported||!v)return;const b=new Intl.Locale(v);if("getWeekInfo"in b&&typeof b.getWeekInfo=="function")return b.getWeekInfo().firstDay}),h=E(()=>Math.floor(a.value.year/12)*12);function g(v){const b=n.isDateDisabled;return typeof b!="function"?!1:b(v)}return(v,b)=>(k(),M(s(eNe),Oe(s(p),{placeholder:s(a),"onUpdate:placeholder":b[0]||(b[0]=x=>jn(a)?a.value=x:null),"data-slot":"calendar","week-starts-on":m.value,"fixed-weeks":"",locale:u.value,class:s(et)("p-3",n.class)}),{default:f(({grid:x,weekDays:y,date:_})=>[c(s(Xmt),{class:He(e.layout==="year"?"pt-2 pb-2":"pt-0")},{default:f(()=>[H("nav",Vmt,[c(s(eht),{"prev-page":e.layout==="year"?w=>w.subtract({years:12}):e.layout==="month"?w=>w.subtract({years:1}):void 0},{default:f(()=>[se(v.$slots,"calendar-prev-icon")]),_:3},8,["prev-page"]),c(s(Qmt),{"next-page":e.layout==="year"?w=>w.add({years:12}):e.layout==="month"?w=>w.add({years:1}):void 0},{default:f(()=>[se(v.$slots,"calendar-next-icon")]),_:3},8,["next-page"])]),se(v.$slots,"calendar-heading",{date:_},()=>[e.layout==="month"?(k(),L("span",Nmt,O(s(d).custom(s(Ar)(_),{year:"numeric"})),1)):e.layout==="year"?(k(),L(Me,{key:1},[],64)):(k(),M(s(Zmt),{key:2}))])]),_:2},1032,["class"]),e.layout==="month"?(k(),L("div",Lmt,[(k(),L(Me,null,Ke(12,w=>H("button",{key:w,type:"button",disabled:g(new(s(Kn))(s(a).year,w,1)),class:He(s(et)(s(jl)({variant:"ghost"}),"h-9 w-full rounded-md font-normal",e.modelValue&&!Array.isArray(e.modelValue)&&e.modelValue.year===s(a).year&&e.modelValue.month===w?"bg-[color-mix(in_srgb,var(--primary)_20%,white)] text-(--primary)":"",g(new(s(Kn))(s(a).year,w,1))?"text-zinc-500 opacity-50 cursor-default":"cursor-pointer")),onClick:S=>o("update:modelValue",new(s(Kn))(s(a).year,w,1))},O(s(d).custom(s(Ar)(new(s(Kn))(s(a).year,w,1)),{month:"short"})),11,Bmt)),64))])):e.layout==="year"?(k(),L("div",Umt,[(k(),L(Me,null,Ke(12,w=>H("button",{key:w,type:"button",disabled:g(new(s(Kn))(h.value+w-1,1,1)),class:He(s(et)(s(jl)({variant:"ghost"}),"h-9 w-full rounded-md font-normal",e.modelValue&&!Array.isArray(e.modelValue)&&e.modelValue.year===h.value+w-1?"bg-[color-mix(in_srgb,var(--primary)_20%,white)] text-(--primary)":"",g(new(s(Kn))(h.value+w-1,1,1))?"text-zinc-500 opacity-50 cursor-default":"cursor-pointer")),onClick:S=>o("update:modelValue",new(s(Kn))(h.value+w-1,1,1))},O(h.value+w-1),11,qmt)),64))])):(k(),L("div",jmt,[(k(!0),L(Me,null,Ke(x,w=>(k(),M(s(Gmt),{key:w.value.toString()},{default:f(()=>[c(s(Ymt),null,{default:f(()=>[c(s(QL),null,{default:f(()=>[(k(!0),L(Me,null,Ke(y,S=>(k(),M(s(Jmt),{key:S},{default:f(()=>[P(O(S),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024),c(s(Kmt),null,{default:f(()=>[(k(!0),L(Me,null,Ke(w.rows,(S,C)=>(k(),M(s(QL),{key:`weekDate-${C}`,class:"mt-2 w-full"},{default:f(()=>[(k(!0),L(Me,null,Ke(S,$=>(k(),M(s(Hmt),{key:$.toString(),date:$},{default:f(()=>[c(s(Wmt),{day:$,month:w.value},null,8,["day","month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024))),128))]))]),_:3},16,["placeholder","week-starts-on","locale","class"]))}}),Hmt=q({__name:"CalendarCell",props:{date:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(nNe),Oe({"data-slot":"calendar-cell",class:s(et)("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 flex-1",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Wmt=q({__name:"CalendarCellTrigger",props:{day:{},month:{},asChild:{type:Boolean},as:{default:"button"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(rNe),Oe({"data-slot":"calendar-cell-trigger",class:s(et)(s(jl)({variant:"ghost"}),"size-8 rounded-full p-0 font-normal text-center transition-all duration-180 aria-selected:opacity-100 cursor-pointer","[&[data-today]:not([data-selected])]:font-semibold [&[data-today]:not([data-selected])]:text-(--primary)","data-selected:bg-(--primary) data-selected:opacity-100 data-selected:text-white data-selected:hover:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selected:hover:text-white","data-disabled:text-zinc-500 data-disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:hover:bg-transparent data-disabled:hover:text-zinc-500","data-unavailable:text-zinc-300 data-unavailable:line-through","data-outside-view:text-zinc-300",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Gmt=q({__name:"CalendarGrid",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(iNe),Oe({"data-slot":"calendar-grid",class:s(et)("w-full border-collapse space-x-1",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Kmt=q({__name:"CalendarGridBody",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(k(),M(s(lNe),Oe({"data-slot":"calendar-grid-body"},t),{default:f(()=>[se(n.$slots,"default")]),_:3},16))}}),Ymt=q({__name:"CalendarGridHead",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(k(),M(s(cNe),Oe({"data-slot":"calendar-grid-head"},t),{default:f(()=>[se(n.$slots,"default")]),_:3},16))}}),QL=q({__name:"CalendarGridRow",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(fNe),Oe({"data-slot":"calendar-grid-row",class:s(et)("flex",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Jmt=q({__name:"CalendarHeadCell",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(mNe),Oe({"data-slot":"calendar-head-cell",class:s(et)("text-zinc-700 rounded-md flex-1 font-normal text-[0.8rem]",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Xmt=q({__name:"CalendarHeader",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(gNe),Oe({"data-slot":"calendar-header",class:s(et)("flex justify-center pt-1 relative items-center w-full px-8",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Zmt=q({__name:"CalendarHeading",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(yNe),Oe({"data-slot":"calendar-heading",class:s(et)("text-sm font-medium",t.class),style:{textAutospace:"normal"}},s(o)),{default:f(({headingValue:i})=>[se(r.$slots,"default",{headingValue:i},()=>[P(O(i),1)])]),_:3},16,["class"]))}}),Qmt=q({__name:"CalendarNextButton",props:{nextPage:{type:Function},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(_Ne),Oe({"data-slot":"calendar-next-button",class:s(et)(s(jl)({variant:"ghost",size:"sm"}),"bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"fluent:chevron-right-20-regular"})])]),_:3},16,["class"]))}}),eht=q({__name:"CalendarPrevButton",props:{prevPage:{type:Function},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(wNe),Oe({"data-slot":"calendar-prev-button",class:s(et)(s(jl)({variant:"ghost",size:"sm"}),"bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"fluent:chevron-left-20-regular"})])]),_:3},16,["class"]))}}),tht=q({name:"UiDatePickerDatePanel",__name:"DatePickerDatePanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(a){if(Array.isArray(a)){o("update:modelValue",a[0]);return}o("update:modelValue",a)}return(a,i)=>(k(),M(s(M$),{"data-slot":"date-picker-date-panel",class:He(s(et)(n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue,"is-date-disabled":n.isDateDisabled,"onUpdate:modelValue":r},{"calendar-prev-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),"calendar-next-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1},8,["class","model-value","default-placeholder","is-date-disabled"]))}}),au={Root:LBe,Header:ZBe,Heading:eUe,Grid:WBe,Cell:UBe,Next:nUe,Prev:rUe,GridBody:KBe,GridRow:JBe,CellTrigger:jBe},Ud={Root:wUe,Ellipsis:bUe,First:kUe,Last:$Ue,List:OUe,ListItem:IUe,Next:MUe,Prev:FUe},Hs={Input:L9e,Root:V9e},iu={Root:c7e,Header:w7e,Heading:k7e,Grid:g7e,Cell:f7e,Next:$7e,Prev:E7e,GridBody:y7e,GridRow:_7e,CellTrigger:m7e},nht={class:"border-zinc-200 flex items-center gap-2 border-t p-3"},oht={key:1,class:"text-zinc-400 select-none"},rht=q({name:"UiDatePickerDateTimePanel",__name:"DatePickerDateTimePanel",props:{modelValue:{},isDateDisabled:{},granularity:{default:"second"},hourCycle:{default:24},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=E(()=>{const u=n.modelValue;if(u)return new Kn(u.year,u.month,u.day)}),a=E(()=>{const u=n.modelValue;if(u)return new Hi(u.hour,u.minute,u.second)});function i(u){const d=Array.isArray(u)?u[0]:u;if(!d){o("update:modelValue",void 0);return}const p=n.modelValue,m="day"in d?d.day:1;o("update:modelValue",new ds(d.year,d.month,m,p?.hour??0,p?.minute??0,p?.second??0))}function l(u){if(!u){n.modelValue&&o("update:modelValue",new ds(n.modelValue.year,n.modelValue.month,n.modelValue.day,0,0,0));return}const d=u,p=n.modelValue;if(p){o("update:modelValue",new ds(p.year,p.month,p.day,d.hour,d.minute,d.second));return}const m=nd(_s());o("update:modelValue",new ds(m.year,m.month,m.day,d.hour,d.minute,d.second))}return(u,d)=>(k(),L("div",{"data-slot":"date-picker-datetime-panel",class:He(s(et)("flex flex-col",n.class))},[c(s(M$),{"model-value":r.value,"default-placeholder":r.value,"is-date-disabled":n.isDateDisabled,"onUpdate:modelValue":i},{"calendar-prev-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),"calendar-next-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1},8,["model-value","default-placeholder","is-date-disabled"]),H("div",nht,[c(s(fe),{icon:"lucide:clock",class:"text-zinc-500 size-4 shrink-0"}),c(s(Hs).Root,{"model-value":a.value,granularity:n.granularity,"hour-cycle":n.hourCycle,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 text-sm outline-none","onUpdate:modelValue":l},{default:f(({segments:p})=>[Array.isArray(p)?(k(!0),L(Me,{key:0},Ke(p,(m,h)=>(k(),L(Me,{key:`${m.part}-${h}`},[m.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:m.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(m.value),1)]),_:2},1032,["part"])):(k(),L("span",oht,O(m.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle"])])],2))}}),aht=q({name:"UiDatePickerInput",inheritAttrs:!1,__name:"DatePickerInput",props:{modelValue:{},format:{},placeholder:{},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},open:{type:Boolean},prefixIcon:{},clearIcon:{default:"fluent:dismiss-20-regular"},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","focus","blur","clear"],setup(e,{emit:t}){const n=e,o=E(()=>({sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-10 text-base"})[n.size]),r=t,a=re(""),i=re(!1);function l(){a.value=n.modelValue?ir(n.modelValue,n.format):""}Xe(()=>[n.modelValue,n.format],()=>{i.value||l()},{immediate:!0});function u(){const g=a.value.trim();if(!g){n.modelValue!==void 0&&r("update:modelValue",void 0);return}const v=_$(g,n.format,n.modelValue??new Date);if(!Jv(v)){l();return}r("update:modelValue",v)}function d(g){i.value=!0,r("focus",g)}function p(g){i.value=!1,u(),r("blur",g)}function m(){a.value="",r("update:modelValue",void 0),r("clear")}const h=E(()=>n.clearable&&!n.disabled&&!n.readonly&&n.modelValue!==void 0);return(g,v)=>(k(),M(s(Ge),Oe(g.$attrs,{"data-slot":"date-picker-input","data-disabled":n.disabled?"true":void 0,"data-state":n.open?"open":void 0,class:s(et)("group/date-picker-input",o.value,n.class)}),{default:f(()=>[n.prefixIcon?(k(),M(s(pt),{key:0,align:"inline-start"},{default:f(()=>[c(s(fe),{icon:n.prefixIcon},null,8,["icon"])]),_:1})):ke("",!0),c(s(mt),{"model-value":a.value,placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,"onUpdate:modelValue":v[0]||(v[0]=b=>a.value=String(b)),onFocus:d,onBlur:p,onKeydown:Ro(at(u,["prevent"]),["enter"])},null,8,["model-value","placeholder","disabled","readonly","onKeydown"]),h.value?(k(),M(s(pt),{key:1,align:"inline-end",class:He(s(et)("[@media(hover:hover)]:opacity-0 transition-opacity","group-hover/date-picker-input:opacity-100 focus-within:opacity-100"))},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"date-picker-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:v[1]||(v[1]=at(()=>{},["prevent"])),onClick:at(m,["stop"])},{default:f(()=>[c(s(fe),{icon:n.clearIcon},null,8,["icon"])]),_:1})]),_:1},8,["class"])):ke("",!0)]),_:1},16,["data-disabled","data-state","class"]))}}),iht=q({name:"UiDatePickerMonthPanel",__name:"DatePickerMonthPanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(a){if(Array.isArray(a)){o("update:modelValue",a[0]);return}o("update:modelValue",a)}return(a,i)=>(k(),M(s(M$),{layout:"month","data-slot":"date-picker-month-panel",class:He(s(et)(n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue,"is-date-disabled":n.isDateDisabled,"onUpdate:modelValue":r},{"calendar-prev-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),"calendar-next-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1},8,["class","model-value","default-placeholder","is-date-disabled"]))}}),sht={key:1,class:"text-zinc-400 select-none"},lht=q({name:"UiDatePickerTimeInput",inheritAttrs:!1,__name:"DatePickerTimeInput",props:{modelValue:{},granularity:{default:"second"},hourCycle:{default:24},disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean,default:!0},prefixIcon:{},clearIcon:{default:"fluent:dismiss-20-regular"},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","clear"],setup(e,{emit:t}){const n=e,o=E(()=>({sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-10 text-base"})[n.size]),r=t,a=E(()=>n.clearable&&!n.disabled&&!n.readonly&&n.modelValue!==void 0);function i(u){r("update:modelValue",u??void 0)}function l(){r("update:modelValue",void 0),r("clear")}return(u,d)=>(k(),M(s(Ge),Oe(u.$attrs,{"data-slot":"date-picker-time-input","data-disabled":n.disabled?"true":void 0,class:s(et)("group/date-picker-input",o.value,n.class)}),{default:f(()=>[n.prefixIcon?(k(),M(s(pt),{key:0,align:"inline-start"},{default:f(()=>[c(s(fe),{icon:n.prefixIcon},null,8,["icon"])]),_:1})):ke("",!0),c(s(Hs).Root,{"data-slot":"input-group-control","model-value":n.modelValue,granularity:n.granularity,"hour-cycle":n.hourCycle,disabled:n.disabled,readonly:n.readonly,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50","onUpdate:modelValue":i},{default:f(({segments:p})=>[Array.isArray(p)?(k(!0),L(Me,{key:0},Ke(p,(m,h)=>(k(),L(Me,{key:`${m.part}-${h}`},[m.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:m.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(m.value),1)]),_:2},1032,["part"])):(k(),L("span",sht,O(m.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle","disabled","readonly"]),a.value?(k(),M(s(pt),{key:1,align:"inline-end",class:He(s(et)("[@media(hover:hover)]:opacity-0 transition-opacity","group-hover/date-picker-input:opacity-100 focus-within:opacity-100"))},{default:f(()=>[c(s(Ct),{size:"icon-xs","as-child":""},{default:f(()=>[H("button",{type:"button","data-slot":"date-picker-clear",class:"text-zinc-500 transition-colors hover:text-zinc-700",tabindex:"-1",onMousedown:d[0]||(d[0]=at(()=>{},["prevent"])),onClick:at(l,["stop"])},[c(s(fe),{icon:n.clearIcon},null,8,["icon"])],32)]),_:1})]),_:1},8,["class"])):ke("",!0)]),_:1},16,["data-disabled","class"]))}}),uht=q({name:"UiDatePickerYearPanel",__name:"DatePickerYearPanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(a){if(Array.isArray(a)){o("update:modelValue",a[0]);return}o("update:modelValue",a)}return(a,i)=>(k(),M(s(M$),{layout:"year","data-slot":"date-picker-year-panel",class:He(s(et)(n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue,"is-date-disabled":n.isDateDisabled,"onUpdate:modelValue":r},{"calendar-prev-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),"calendar-next-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1},8,["class","model-value","default-placeholder","is-date-disabled"]))}}),cht=["onClick"],Jre=q({name:"UiPickerShortcuts",__name:"PickerShortcuts",props:{items:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,r=$8(),a=E(()=>r.language.value?.split("-")[0]??"en");function i(l){return ut(l,a.value)??""}return(l,u)=>(k(),L("div",{"data-slot":"picker-shortcuts",class:He(s(et)("border-zinc-200 flex flex-wrap items-center gap-1 border-t px-2 py-2 text-xs",n.class))},[(k(!0),L(Me,null,Ke(n.items,(d,p)=>(k(),L("button",{key:p,type:"button",class:"text-zinc-700 hover:bg-zinc-100 hover:text-(--primary) cursor-pointer rounded px-2 py-1",onClick:m=>o("select",p)},O(i(d.name)),9,cht))),128))],2))}}),kb={date:{display:"yyyy-MM-dd",value:"yyyy-MM-dd"},datetime:{display:"yyyy-MM-dd HH:mm:ss",value:"yyyy-MM-dd HH:mm:ss"},year:{display:"yyyy",value:"yyyy"},month:{display:"yyyy-MM",value:"yyyy-MM"},time:{display:"HH:mm:ss",value:"HH:mm:ss"}},dht={class:"flex flex-col"},R$=q({name:"UiDatePicker",inheritAttrs:!1,__name:"DatePicker",props:{modelValue:{},defaultValue:{},type:{default:"date"},format:{},valueFormat:{},placeholder:{},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},disabledDate:{},timeGranularity:{default:"second"},hourCycle:{default:24},class:{type:[Boolean,null,String,Object,Array]},popoverClass:{type:[Boolean,null,String,Object,Array]},prefixIcon:{},clearIcon:{},shortcuts:{},size:{default:"md"}},emits:["update:modelValue","change","clear","focus","blur"],setup(e,{emit:t}){const n=e,o=t,r=ao(n,"modelValue",o,{passive:!0,defaultValue:n.defaultValue}),a=E(()=>n.valueFormat??kb[n.type].value),i=E(()=>n.format??kb[n.type].display);function l(I){if(I instanceof Hi){const U=new Date(2e3,0,1);return U.setHours(I.hour,I.minute,I.second,0),U}return new Date(I.year,I.month-1,"day"in I?I.day:1,"hour"in I?I.hour:0,"hour"in I?I.minute:0,"hour"in I?I.second:0)}function u(I,U){const j=I.getFullYear(),Q=I.getMonth()+1,F=I.getDate(),R=I.getHours(),G=I.getMinutes(),Z=I.getSeconds();switch(U){case"year":return new Kn(j,1,1);case"month":return new Kn(j,Q,1);case"datetime":return new ds(j,Q,F,R,G,Z);case"time":return new Hi(R,G,Z);default:return new Kn(j,Q,F)}}const d=E(()=>{const I=r.value;if(!I)return;const U=_$(I,a.value,new Date);if(Jv(U))return u(U,n.type)});function p(I){const U=I?ir(l(I),a.value):void 0;U!==r.value&&(r.value=U,o("change",U))}const m=E(()=>{const I=d.value;if(!(!I||I instanceof Hi))return l(I)}),h=E(()=>{const I=d.value;return I instanceof Hi?I:void 0}),g=E(()=>{const I=d.value;if(!(!I||I instanceof Hi))return I}),v=E(()=>{const I=d.value;if(!(!I||I instanceof Hi||!("hour"in I)))return I}),b=re(!1),x=Bb("anchor-el");function y(I){return I instanceof Node?x.value?.contains(I)??!1:!1}function _(I){const j=I.detail?.originalEvent?.target??null;y(j)&&I.preventDefault()}function w(I){!n.disabled&&!n.readonly&&(b.value=!0),o("focus",I)}function S(I){o("blur",I)}function C(){b.value=!1,o("clear")}function $(I){if(!I){p(void 0);return}p(u(I,n.type))}function T(I){p(I)}function D(I,U){p(I),U&&(b.value=!1)}function A(I){const U=n.shortcuts?.[I];if(!U)return;const j=typeof U.value=="function"?U.value():U.value;if(j===r.value){b.value=!1;return}r.value=j,o("change",j),b.value=!1}return(I,U)=>(k(),L("div",{ref:"anchor-el","data-slot":"date-picker",class:He(s(et)("w-full",n.class))},[n.type==="time"?(k(),M(lht,Oe({key:0},I.$attrs,{"model-value":h.value,granularity:n.timeGranularity,"hour-cycle":n.hourCycle,disabled:n.disabled,readonly:n.readonly,clearable:n.clearable,"prefix-icon":n.prefixIcon,"clear-icon":n.clearIcon,size:n.size,"onUpdate:modelValue":T,onClear:U[0]||(U[0]=j=>o("clear"))}),null,16,["model-value","granularity","hour-cycle","disabled","readonly","clearable","prefix-icon","clear-icon","size"])):(k(),M(s(nc),{key:1,open:b.value,"onUpdate:open":U[6]||(U[6]=j=>b.value=j)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(aht,Oe(I.$attrs,{"model-value":m.value,format:i.value,placeholder:n.placeholder,clearable:n.clearable,disabled:n.disabled,readonly:n.readonly,open:b.value,"prefix-icon":n.prefixIcon,"clear-icon":n.clearIcon,size:n.size,"onUpdate:modelValue":$,onFocus:w,onBlur:S,onClear:C}),null,16,["model-value","format","placeholder","clearable","disabled","readonly","open","prefix-icon","clear-icon","size"])]),_:1}),c(s(oc),{align:"start",class:He(s(et)("w-auto p-0",n.popoverClass)),onOpenAutoFocus:U[5]||(U[5]=j=>j.preventDefault()),onInteractOutside:_},{default:f(()=>[H("div",dht,[n.type==="date"?(k(),M(tht,{key:0,"model-value":g.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":U[1]||(U[1]=j=>D(j,!0))},null,8,["model-value","is-date-disabled"])):n.type==="month"?(k(),M(iht,{key:1,"model-value":g.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":U[2]||(U[2]=j=>D(j,!0))},null,8,["model-value","is-date-disabled"])):n.type==="year"?(k(),M(uht,{key:2,"model-value":g.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":U[3]||(U[3]=j=>D(j,!0))},null,8,["model-value","is-date-disabled"])):n.type==="datetime"?(k(),M(rht,{key:3,"model-value":v.value,"is-date-disabled":n.disabledDate,granularity:n.timeGranularity,"hour-cycle":n.hourCycle,"onUpdate:modelValue":U[4]||(U[4]=j=>D(j,!1))},null,8,["model-value","is-date-disabled","granularity","hour-cycle"])):ke("",!0),n.shortcuts&&n.shortcuts.length>0?(k(),M(Jre,{key:4,items:n.shortcuts,onSelect:A},null,8,["items"])):ke("",!0)])]),_:1},8,["class"])]),_:1},8,["open"]))],2))}}),fht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},pht=q({name:"ShwfedDateFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(S,C)=>Ht(S,{...dn(i),...C}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m(S,C){if(!S)return!1;try{return bt(l(S,{form:o.value??{}}))}catch($){return console.error(`[shwfed-form] failed to evaluate ${C} for ${t.fieldId}:`,$),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula"),x=E(()=>t.config.valueFormat??kb.date.value),y=E(()=>{const S=t.config.presets;if(!(!S||S.length===0))return S.map(C=>({name:C.label,value:()=>{try{const $=bt(l(C.value,{form:o.value??{}}));return ir($,x.value)}catch($){return console.error(`[shwfed-form] failed to evaluate preset "${C.value}" for ${t.fieldId}:`,$),""}}}))}),_=re(void 0),w=E({get:()=>{const S=t.config.binding;if(S==null)return _.value;const C=r(S);return typeof C=="string"&&C.length>0?C:void 0},set:S=>{const C=t.config.binding;if(C==null){_.value=S;return}a(C,S)}});return(S,C)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":h.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),b.value?(k(),L("div",fht,O(w.value||"—"),1)):(k(),M(s(R$),{key:2,id:e.fieldId,modelValue:w.value,"onUpdate:modelValue":C[0]||(C[0]=$=>w.value=$),type:"date",format:e.config.format,"value-format":e.config.valueFormat,placeholder:d.value,disabled:h.value,shortcuts:y.value},null,8,["id","modelValue","format","value-format","placeholder","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),mht={class:"flex items-center gap-1"},hht={class:"flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0"},Xre=q({__name:"RangeCalendar",props:{defaultPlaceholder:{},defaultValue:{},modelValue:{},placeholder:{},allowNonContiguousRanges:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},maximumDays:{},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},locale:{},numberOfMonths:{},disabled:{type:Boolean},readonly:{type:Boolean},initialFocus:{type:Boolean},isDateDisabled:{type:Function},isDateUnavailable:{type:Function},isDateHighlightable:{type:Function},dir:{},nextPage:{type:Function},prevPage:{type:Function},disableDaysOutsideCurrentView:{type:Boolean},fixedDate:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","update:validModelValue","update:placeholder","update:startValue"],setup(e,{emit:t}){const n=e,o=t,r=At(n,"class"),a=Dn(r,o),i=$8(),{locale:l}=un({useScope:"global",inheritLocale:!0}),u=E(()=>n.locale??l.value??i.language.value??"en");return(d,p)=>(k(),M(s(ZLe),Oe({"data-slot":"range-calendar",class:s(et)("p-3",n.class),"fixed-weeks":""},s(a),{locale:u.value}),{default:f(({grid:m,weekDays:h})=>[c(s(wht),null,{default:f(()=>[c(s(Sht)),H("div",mht,[c(s(Cht)),c(s(kht))])]),_:1}),H("div",hht,[(k(!0),L(Me,null,Ke(m,g=>(k(),M(s(yht),{key:g.value.toString()},{default:f(()=>[c(s(_ht),null,{default:f(()=>[c(s(eB),null,{default:f(()=>[(k(!0),L(Me,null,Ke(h,v=>(k(),M(s(xht),{key:v},{default:f(()=>[P(O(v),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024),c(s(bht),null,{default:f(()=>[(k(!0),L(Me,null,Ke(g.rows,(v,b)=>(k(),M(s(eB),{key:`weekDate-${b}`,class:"mt-2 w-full"},{default:f(()=>[(k(!0),L(Me,null,Ke(v,x=>(k(),M(s(ght),{key:x.toString(),date:x},{default:f(()=>[c(s(vht),{day:x,month:g.value},null,8,["day","month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024))),128))])]),_:1},16,["class","locale"]))}}),ght=q({__name:"RangeCalendarCell",props:{date:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(eBe),Oe({"data-slot":"range-calendar-cell",class:s(et)("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 flex-1","[--bar-left:0px] [--bar-right:0px]","[&:has([data-selection-start]):not(:has([data-highlighted]))]:[--bar-left:50%]","[&:has([data-selection-end]):not(:has([data-highlighted]))]:[--bar-right:50%]","[&:has([data-highlighted-start])]:[--bar-left:50%]","[&:has([data-highlighted-end])]:[--bar-right:50%]","before:pointer-events-none before:absolute before:top-1/2 before:-translate-y-1/2","before:h-8 before:z-0","before:left-[var(--bar-left)] before:right-[var(--bar-right)]","before:bg-[color-mix(in_srgb,var(--primary)_15%,white)]","before:hidden","[&:has([data-selected])]:before:block [&:has([data-highlighted])]:before:block","[&:has([data-selection-start][data-selection-end])]:before:hidden","[&:has([data-highlighted-start][data-highlighted-end])]:before:hidden",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),vht=q({__name:"RangeCalendarCellTrigger",props:{day:{},month:{},asChild:{type:Boolean},as:{default:"button"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(nBe),Oe({"data-slot":"range-calendar-trigger",class:s(et)(s(jl)({variant:"ghost"}),"relative z-10 size-8 rounded-full p-0 font-normal text-center cursor-pointer data-selected:opacity-100","[&[data-today]:not([data-selected])]:font-semibold [&[data-today]:not([data-selected])]:text-(--primary)","data-selection-start:bg-(--primary) data-selection-start:text-white data-selection-start:hover:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selection-start:hover:text-white data-selection-start:focus:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selection-start:focus:text-white","data-selection-end:bg-(--primary) data-selection-end:text-white data-selection-end:hover:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selection-end:hover:text-white data-selection-end:focus:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selection-end:focus:text-white","data-highlighted-start:bg-(--primary) data-highlighted-start:text-white","data-highlighted-end:bg-(--primary) data-highlighted-end:text-white","data-outside-view:text-zinc-300","data-disabled:text-zinc-300 data-disabled:opacity-50","data-unavailable:text-zinc-300 data-unavailable:line-through",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),yht=q({__name:"RangeCalendarGrid",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(rBe),Oe({"data-slot":"range-calendar-grid",class:s(et)("w-full border-collapse space-x-1",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),bht=q({__name:"RangeCalendarGridBody",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(k(),M(s(iBe),Oe({"data-slot":"range-calendar-grid-body"},t),{default:f(()=>[se(n.$slots,"default")]),_:3},16))}}),_ht=q({__name:"RangeCalendarGridHead",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(k(),M(s(lBe),Oe({"data-slot":"range-calendar-grid-head"},t),{default:f(()=>[se(n.$slots,"default")]),_:3},16))}}),eB=q({__name:"RangeCalendarGridRow",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(cBe),Oe({"data-slot":"range-calendar-grid-row",class:s(et)("flex w-full",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),xht=q({__name:"RangeCalendarHeadCell",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(fBe),Oe({"data-slot":"range-calendar-head-cell",class:s(et)("flex-1 rounded-md text-[0.8rem] font-normal text-zinc-300",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),wht=q({__name:"RangeCalendarHeader",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(mBe),Oe({"data-slot":"range-calendar-header",class:s(et)("flex justify-center pt-1 relative items-center w-full",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Sht=q({__name:"RangeCalendarHeading",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(gBe),Oe({"data-slot":"range-calendar-heading",class:s(et)("text-sm font-medium",t.class)},s(o)),{default:f(({headingValue:i})=>[se(r.$slots,"default",{headingValue:i},()=>[P(O(i),1)])]),_:3},16,["class"]))}}),kht=q({__name:"RangeCalendarNextButton",props:{nextPage:{type:Function},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(yBe),Oe({"data-slot":"range-calendar-next-button",class:s(et)(s(jl)({variant:"ghost"}),"absolute right-1","size-7 bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"fluent:chevron-right-20-regular"})])]),_:3},16,["class"]))}}),Cht=q({__name:"RangeCalendarPrevButton",props:{prevPage:{type:Function},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(_Be),Oe({"data-slot":"range-calendar-prev-button",class:s(et)(s(jl)({variant:"ghost"}),"absolute left-1","size-7 bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"fluent:chevron-left-20-regular"})])]),_:3},16,["class"]))}}),$ht=q({name:"UiDateRangePickerDatePanel",__name:"DateRangePickerDatePanel",props:{modelValue:{},isDateDisabled:{type:Function},numberOfMonths:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(a){o("update:modelValue",a)}return(a,i)=>(k(),M(s(Xre),{"data-slot":"date-range-picker-date-panel",class:He(s(et)(n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue?.start,"is-date-disabled":n.isDateDisabled,"number-of-months":n.numberOfMonths??2,"onUpdate:modelValue":r},null,8,["class","model-value","default-placeholder","is-date-disabled","number-of-months"]))}}),Tht={class:"border-zinc-200 flex items-center gap-2 border-t p-3"},Eht={key:1,class:"text-zinc-400 select-none"},Dht={key:1,class:"text-zinc-400 select-none"},Oht=q({name:"UiDateRangePickerDateTimePanel",__name:"DateRangePickerDateTimePanel",props:{modelValue:{},isDateDisabled:{},granularity:{default:"second"},hourCycle:{default:24},numberOfMonths:{default:2},rangeSeparatorIcon:{default:"lucide:arrow-right"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(g){if(g)return new Kn(g.year,g.month,"day"in g?g.day:1)}function a(g){if(!(!g||!("hour"in g)))return new Hi(g.hour,g.minute,g.second)}const i=E(()=>({start:r(n.modelValue?.start),end:r(n.modelValue?.end)})),l=E(()=>a(n.modelValue?.start)),u=E(()=>a(n.modelValue?.end));function d(g,v){if(g)return new ds(g.year,g.month,"day"in g?g.day:1,v?.hour??0,v?.minute??0,v?.second??0)}function p(g){if(!g){o("update:modelValue",void 0);return}o("update:modelValue",{start:d(g.start,l.value),end:d(g.end,u.value)})}function m(g){const v=g??void 0,b=n.modelValue?.start??r(nd(_s()));b&&o("update:modelValue",{start:d(b,v),end:n.modelValue?.end})}function h(g){const v=g??void 0,b=n.modelValue?.end??r(nd(_s()));b&&o("update:modelValue",{start:n.modelValue?.start,end:d(b,v)})}return(g,v)=>(k(),L("div",{"data-slot":"date-range-picker-datetime-panel",class:He(s(et)("flex flex-col",n.class))},[c(s(Xre),{"model-value":i.value,"default-placeholder":i.value.start,"is-date-disabled":n.isDateDisabled,"number-of-months":n.numberOfMonths,"onUpdate:modelValue":p},null,8,["model-value","default-placeholder","is-date-disabled","number-of-months"]),H("div",Tht,[c(s(fe),{icon:"lucide:clock",class:"text-zinc-500 size-4 shrink-0"}),c(s(Hs).Root,{"model-value":l.value,granularity:n.granularity,"hour-cycle":n.hourCycle,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 text-sm outline-none","onUpdate:modelValue":m},{default:f(({segments:b})=>[Array.isArray(b)?(k(!0),L(Me,{key:0},Ke(b,(x,y)=>(k(),L(Me,{key:`s-${x.part}-${y}`},[x.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:x.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(x.value),1)]),_:2},1032,["part"])):(k(),L("span",Eht,O(x.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle"]),c(s(fe),{icon:n.rangeSeparatorIcon,class:"text-zinc-400 size-3.5 shrink-0"},null,8,["icon"]),c(s(Hs).Root,{"model-value":u.value,granularity:n.granularity,"hour-cycle":n.hourCycle,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 text-sm outline-none","onUpdate:modelValue":h},{default:f(({segments:b})=>[Array.isArray(b)?(k(!0),L(Me,{key:0},Ke(b,(x,y)=>(k(),L(Me,{key:`e-${x.part}-${y}`},[x.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:x.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(x.value),1)]),_:2},1032,["part"])):(k(),L("span",Dht,O(x.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle"])])],2))}}),Aht=["data-disabled","data-value","data-state"],Iht=["placeholder","disabled","readonly"],Pht=["placeholder","disabled","readonly"],Mht=q({name:"UiDateRangePickerInput",inheritAttrs:!1,__name:"DateRangePickerInput",props:{startValue:{},endValue:{},format:{},startPlaceholder:{},endPlaceholder:{},rangeSeparatorIcon:{},prefixIcon:{},clearIcon:{default:"fluent:dismiss-20-regular"},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},open:{type:Boolean},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:startValue","update:endValue","focus","blur","clear"],setup(e,{emit:t}){const n=e,o=E(()=>({sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-10 text-base"})[n.size]),r=t,a=re(""),i=re(""),l=re(null);function u(){a.value=n.startValue?ir(n.startValue,n.format):""}function d(){i.value=n.endValue?ir(n.endValue,n.format):""}Xe(()=>[n.startValue,n.format],()=>{l.value!=="start"&&u()},{immediate:!0}),Xe(()=>[n.endValue,n.format],()=>{l.value!=="end"&&d()},{immediate:!0});function p(x){const y=x==="start"?a:i,_=x==="start"?n.startValue:n.endValue,w=x==="start"?u:d,S=y.value.trim();if(!S){_!==void 0&&r(x==="start"?"update:startValue":"update:endValue",void 0);return}const C=_$(S,n.format,_??new Date);if(!Jv(C)){w();return}r(x==="start"?"update:startValue":"update:endValue",C)}function m(x,y){l.value=y,r("focus",x,y)}function h(x,y){l.value=null,p(y),r("blur",x,y)}function g(){a.value="",i.value="",r("update:startValue",void 0),r("update:endValue",void 0),r("clear")}const v=E(()=>n.clearable&&!n.disabled&&!n.readonly&&(n.startValue!==void 0||n.endValue!==void 0)),b=E(()=>n.startValue!==void 0||n.endValue!==void 0);return(x,y)=>(k(),L("div",Oe(x.$attrs,{"data-slot":"date-range-picker-input","data-disabled":n.disabled?"true":void 0,"data-value":b.value?"true":void 0,"data-state":n.open?"open":void 0,class:s(et)("group/date-range-input","border-zinc-200 relative flex w-full min-w-0 items-center rounded-md border bg-transparent transition-[color,box-shadow] outline-none","data-[disabled=true]:bg-zinc-100","has-[input:focus-visible]:border-(--primary)","hover:border-zinc-300",o.value,n.class)}),[n.prefixIcon?(k(),M(s(fe),{key:0,icon:n.prefixIcon,class:"text-zinc-500 ml-3 mr-1 size-4 shrink-0"},null,8,["icon"])):ke("",!0),sm(H("input",{"onUpdate:modelValue":y[0]||(y[0]=_=>a.value=_),"data-slot":"input-group-control","data-side":"start",placeholder:n.startPlaceholder,disabled:n.disabled,readonly:n.readonly,class:He(s(et)("text-zinc-700 placeholder:text-zinc-300 min-w-0 flex-1 bg-transparent px-1 text-sm outline-none disabled:cursor-not-allowed text-center",!n.prefixIcon&&"pl-3")),onFocus:y[1]||(y[1]=_=>m(_,"start")),onBlur:y[2]||(y[2]=_=>h(_,"start")),onKeydown:y[3]||(y[3]=Ro(at(_=>p("start"),["prevent"]),["enter"]))},null,42,Iht),[[Mw,a.value]]),n.rangeSeparatorIcon?(k(),M(s(fe),{key:1,icon:n.rangeSeparatorIcon,"data-slot":"date-range-picker-input-separator",class:"text-zinc-400 mx-1 size-3.5 shrink-0"},null,8,["icon"])):ke("",!0),sm(H("input",{"onUpdate:modelValue":y[4]||(y[4]=_=>i.value=_),"data-slot":"input-group-control","data-side":"end",placeholder:n.endPlaceholder,disabled:n.disabled,readonly:n.readonly,class:He(s(et)("text-zinc-700 placeholder:text-zinc-300 min-w-0 flex-1 bg-transparent px-1 text-sm outline-none disabled:cursor-not-allowed text-center",!v.value&&"pr-3")),onFocus:y[5]||(y[5]=_=>m(_,"end")),onBlur:y[6]||(y[6]=_=>h(_,"end")),onKeydown:y[7]||(y[7]=Ro(at(_=>p("end"),["prevent"]),["enter"]))},null,42,Pht),[[Mw,i.value]]),v.value?(k(),M(s(Ct),{key:2,size:"icon-xs","data-slot":"date-range-picker-clear",tabindex:"-1",class:He(s(et)("mr-2 shrink-0 text-zinc-500 hover:text-zinc-700 transition-opacity","[@media(hover:hover)]:opacity-0","group-hover/date-range-input:opacity-100 focus-within:opacity-100")),onMousedown:y[8]||(y[8]=at(()=>{},["prevent"])),onClick:at(g,["stop"])},{default:f(()=>[c(s(fe),{icon:n.clearIcon},null,8,["icon"])]),_:1},8,["class"])):ke("",!0)],16,Aht))}}),Rht={class:"w-full flex items-center gap-1 absolute top-1/2 -translate-y-1/2 transform-gpu inset-x-0 justify-between z-10"},Fht=q({name:"UiDateRangePickerMonthPanel",__name:"DateRangePickerMonthPanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,{locale:r}=un({useScope:"global",inheritLocale:!0});function a(i){o("update:modelValue",i)}return(i,l)=>(k(),M(s(au).Root,{"data-slot":"date-range-picker-month-panel",class:He(s(et)("p-3",n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue?.start,"is-month-disabled":n.isDateDisabled,locale:s(r),"onUpdate:modelValue":a},{default:f(({grid:u})=>[c(s(au).Header,{class:"pt-2 pb-2 relative"},{default:f(()=>[H("nav",Rht,[c(s(au).Prev,null,{default:f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),_:1}),c(s(au).Next,null,{default:f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1})]),c(s(au).Heading,{class:"text-sm font-medium text-center w-full"})]),_:1}),c(s(au).Grid,{class:"mt-4 w-full"},{default:f(()=>[c(s(au).GridBody,null,{default:f(()=>[(k(!0),L(Me,null,Ke(u.rows,(d,p)=>(k(),M(s(au).GridRow,{key:`mrow-${p}`,class:"grid grid-cols-4 gap-1 mb-1 last:mb-0"},{default:f(()=>[(k(!0),L(Me,null,Ke(d,m=>(k(),M(s(au).Cell,{key:m.toString(),date:m},{default:f(()=>[c(s(au).CellTrigger,{month:m,class:"block w-full"},{default:f(({monthValue:h,disabled:g,selected:v,selectionStart:b,selectionEnd:x,highlighted:y})=>[H("span",{class:He(s(et)("flex h-9 w-full items-center justify-center rounded-md text-sm font-normal cursor-pointer","hover:bg-zinc-100",v||b||x?"bg-(--primary) text-white hover:bg-(--primary)":"",y&&!v?"bg-[color-mix(in_srgb,var(--primary)_20%,white)] text-(--primary) hover:bg-[color-mix(in_srgb,var(--primary)_25%,white)]":"",g?"text-zinc-400 opacity-50 cursor-default":""))},O(h),3)]),_:1},8,["month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:1},8,["class","model-value","default-placeholder","is-month-disabled","locale"]))}}),zht=["data-disabled"],Vht={key:1,class:"text-zinc-400 select-none"},Nht={key:1,class:"text-zinc-400 select-none"},Lht=q({name:"UiDateRangePickerTimeInput",inheritAttrs:!1,__name:"DateRangePickerTimeInput",props:{startValue:{},endValue:{},granularity:{default:"second"},hourCycle:{default:24},rangeSeparatorIcon:{default:"lucide:arrow-right"},prefixIcon:{},clearIcon:{default:"fluent:dismiss-20-regular"},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:startValue","update:endValue","clear"],setup(e,{emit:t}){const n=e,o=E(()=>({sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-10 text-base"})[n.size]),r=t;function a(d){r("update:startValue",d??void 0)}function i(d){r("update:endValue",d??void 0)}function l(){r("update:startValue",void 0),r("update:endValue",void 0),r("clear")}const u=E(()=>n.clearable&&!n.disabled&&!n.readonly&&(n.startValue!==void 0||n.endValue!==void 0));return(d,p)=>(k(),L("div",Oe(d.$attrs,{"data-slot":"date-range-picker-time-input","data-disabled":n.disabled?"true":void 0,class:s(et)("group/date-range-time-input","border-zinc-200 relative flex w-full min-w-0 items-center rounded-md border bg-transparent transition-[color,box-shadow] outline-none","data-[disabled=true]:bg-zinc-100","has-[[data-reka-time-field-input]:focus]:border-(--primary)","hover:border-zinc-300",o.value,n.class)}),[n.prefixIcon?(k(),M(s(fe),{key:0,icon:n.prefixIcon,class:"text-zinc-500 ml-3 mr-1 size-4 shrink-0"},null,8,["icon"])):ke("",!0),c(s(Hs).Root,{"data-slot":"date-range-picker-time-start","model-value":n.startValue,granularity:n.granularity,"hour-cycle":n.hourCycle,disabled:n.disabled,readonly:n.readonly,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50","onUpdate:modelValue":a},{default:f(({segments:m})=>[Array.isArray(m)?(k(!0),L(Me,{key:0},Ke(m,(h,g)=>(k(),L(Me,{key:`s-${h.part}-${g}`},[h.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:h.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(h.value),1)]),_:2},1032,["part"])):(k(),L("span",Vht,O(h.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle","disabled","readonly"]),c(s(fe),{icon:n.rangeSeparatorIcon,"data-slot":"date-range-picker-time-separator",class:"text-zinc-400 size-3.5 shrink-0"},null,8,["icon"]),c(s(Hs).Root,{"data-slot":"date-range-picker-time-end","model-value":n.endValue,granularity:n.granularity,"hour-cycle":n.hourCycle,disabled:n.disabled,readonly:n.readonly,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50","onUpdate:modelValue":i},{default:f(({segments:m})=>[Array.isArray(m)?(k(!0),L(Me,{key:0},Ke(m,(h,g)=>(k(),L(Me,{key:`e-${h.part}-${g}`},[h.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:h.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(h.value),1)]),_:2},1032,["part"])):(k(),L("span",Nht,O(h.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle","disabled","readonly"]),u.value?(k(),L("button",{key:1,type:"button","data-slot":"date-range-picker-clear",tabindex:"-1",class:He(s(et)("mr-2 size-5 shrink-0 rounded text-zinc-500 transition-opacity hover:text-zinc-700","[@media(hover:hover)]:opacity-0","group-hover/date-range-time-input:opacity-100 focus-within:opacity-100","flex items-center justify-center")),onMousedown:p[0]||(p[0]=at(()=>{},["prevent"])),onClick:at(l,["stop"])},[c(s(fe),{icon:n.clearIcon,class:"size-3.5"},null,8,["icon"])],34)):ke("",!0)],16,zht))}}),Bht={class:"w-full flex items-center gap-1 absolute top-1/2 -translate-y-1/2 transform-gpu inset-x-0 justify-between z-10"},Uht=q({name:"UiDateRangePickerYearPanel",__name:"DateRangePickerYearPanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,{locale:r}=un({useScope:"global",inheritLocale:!0});function a(i){o("update:modelValue",i)}return(i,l)=>(k(),M(s(iu).Root,{"data-slot":"date-range-picker-year-panel",class:He(s(et)("p-3",n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue?.start,"is-year-disabled":n.isDateDisabled,locale:s(r),"onUpdate:modelValue":a},{default:f(({grid:u})=>[c(s(iu).Header,{class:"pt-2 pb-2 relative"},{default:f(()=>[H("nav",Bht,[c(s(iu).Prev,null,{default:f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),_:1}),c(s(iu).Next,null,{default:f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1})]),c(s(iu).Heading,{class:"text-sm font-medium text-center w-full"})]),_:1}),c(s(iu).Grid,{class:"mt-4 w-full"},{default:f(()=>[c(s(iu).GridBody,null,{default:f(()=>[(k(!0),L(Me,null,Ke(u.rows,(d,p)=>(k(),M(s(iu).GridRow,{key:`yrow-${p}`,class:"grid grid-cols-4 gap-1 mb-1 last:mb-0"},{default:f(()=>[(k(!0),L(Me,null,Ke(d,m=>(k(),M(s(iu).Cell,{key:m.toString(),date:m},{default:f(()=>[c(s(iu).CellTrigger,{year:m,class:"block w-full"},{default:f(({yearValue:h,disabled:g,selected:v,selectionStart:b,selectionEnd:x,highlighted:y})=>[H("span",{class:He(s(et)("flex h-9 w-full items-center justify-center rounded-md text-sm font-normal cursor-pointer","hover:bg-zinc-100",v||b||x?"bg-(--primary) text-white hover:bg-(--primary)":"",y&&!v?"bg-[color-mix(in_srgb,var(--primary)_20%,white)] text-(--primary) hover:bg-[color-mix(in_srgb,var(--primary)_25%,white)]":"",g?"text-zinc-400 opacity-50 cursor-default":""))},O(h),3)]),_:1},8,["year"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:1},8,["class","model-value","default-placeholder","is-year-disabled","locale"]))}}),Cb={daterange:{display:"yyyy-MM-dd",value:"yyyy-MM-dd"},datetimerange:{display:"yyyy-MM-dd HH:mm:ss",value:"yyyy-MM-dd HH:mm:ss"},monthrange:{display:"yyyy-MM",value:"yyyy-MM"},yearrange:{display:"yyyy",value:"yyyy"},timerange:{display:"HH:mm:ss",value:"HH:mm:ss"}},qht={class:"flex flex-col"},F$=q({name:"UiDateRangePicker",inheritAttrs:!1,__name:"DateRangePicker",props:{modelValue:{},defaultValue:{},type:{default:"daterange"},format:{},valueFormat:{},startPlaceholder:{},endPlaceholder:{},rangeSeparatorIcon:{},prefixIcon:{},clearIcon:{},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},disabledDate:{},numberOfMonths:{default:2},timeGranularity:{default:"second"},hourCycle:{default:24},shortcuts:{},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]},popoverClass:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","change","clear","focus","blur"],setup(e,{emit:t}){const n=e,o=t,r=ao(n,"modelValue",o,{passive:!0,defaultValue:n.defaultValue}),a=E(()=>n.valueFormat??Cb[n.type].value),i=E(()=>n.format??Cb[n.type].display);function l(Y,he){const ue=Y.getFullYear(),pe=Y.getMonth()+1,ce=Y.getDate();switch(he){case"yearrange":return new Kn(ue,1,1);case"monthrange":return new Kn(ue,pe,1);case"datetimerange":return new ds(ue,pe,ce,Y.getHours(),Y.getMinutes(),Y.getSeconds());default:return new Kn(ue,pe,ce)}}function u(Y){return new Date(Y.year,Y.month-1,"day"in Y?Y.day:1,"hour"in Y?Y.hour:0,"hour"in Y?Y.minute:0,"hour"in Y?Y.second:0)}function d(Y){return new Hi(Y.getHours(),Y.getMinutes(),Y.getSeconds())}function p(Y){const he=new Date(2e3,0,1);return he.setHours(Y.hour,Y.minute,Y.second,0),he}function m(Y){if(!Y)return;const he=_$(Y,a.value,new Date);if(Jv(he))return he}const h=E(()=>m(r.value?.[0])),g=E(()=>m(r.value?.[1])),v=E(()=>h.value?d(h.value):void 0),b=E(()=>g.value?d(g.value):void 0),x=E(()=>{if(h.value)return l(h.value,n.type)}),y=E(()=>{if(g.value)return l(g.value,n.type)}),_=mo(void 0),w=E(()=>_.value?_.value:{start:x.value,end:y.value});function S(Y,he){if(!Y||!he){r.value!==void 0&&(r.value=void 0,o("change",void 0));return}const ue=ir(Y,a.value),pe=ir(he,a.value),ce=[ue,pe],ae=r.value;ae&&ae[0]===ce[0]&&ae[1]===ce[1]||(r.value=ce,o("change",ce))}function C(Y){S(Y,g.value)}function $(Y){S(h.value,Y)}function T(Y){S(Y?p(Y):void 0,g.value)}function D(Y){S(h.value,Y?p(Y):void 0)}function A(){r.value!==void 0&&(r.value=void 0,o("change",void 0)),o("clear")}function I(Y){const he=n.shortcuts?.[Y];if(!he)return;const ue=typeof he.value=="function"?he.value():he.value,pe=[ue[0],ue[1]],ce=r.value;if(ce&&ce[0]===pe[0]&&ce[1]===pe[1]){j.value=!1;return}r.value=pe,o("change",pe),j.value=!1}function U(Y,he){if(!Y||!Y.start&&!Y.end){_.value=void 0,S(void 0,void 0);return}if(!Y.start||!Y.end){_.value=Y;return}_.value=void 0;const ue=u(Y.start),pe=u(Y.end);S(ue,pe),he&&(j.value=!1)}const j=re(!1),Q=Bb("anchor-el");Xe(j,Y=>{Y||(_.value=void 0)});function F(Y){return Y instanceof Node?Q.value?.contains(Y)??!1:!1}function R(Y){const ue=Y.detail?.originalEvent?.target??null;F(ue)&&Y.preventDefault()}function G(Y,he){!n.disabled&&!n.readonly&&(j.value=!0),o("focus",Y,he)}function Z(Y,he){o("blur",Y,he)}return(Y,he)=>(k(),L("div",{ref:"anchor-el","data-slot":"date-range-picker",class:He(s(et)("w-full",n.class))},[n.type==="timerange"?(k(),M(Lht,Oe({key:0},Y.$attrs,{"start-value":v.value,"end-value":b.value,granularity:n.timeGranularity,"hour-cycle":n.hourCycle,"range-separator-icon":n.rangeSeparatorIcon,"prefix-icon":n.prefixIcon,"clear-icon":n.clearIcon,clearable:n.clearable,disabled:n.disabled,readonly:n.readonly,size:n.size,"onUpdate:startValue":T,"onUpdate:endValue":D,onClear:A}),null,16,["start-value","end-value","granularity","hour-cycle","range-separator-icon","prefix-icon","clear-icon","clearable","disabled","readonly","size"])):(k(),M(s(nc),{key:1,open:j.value,"onUpdate:open":he[5]||(he[5]=ue=>j.value=ue)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(Mht,Oe(Y.$attrs,{"start-value":h.value,"end-value":g.value,format:i.value,"start-placeholder":n.startPlaceholder,"end-placeholder":n.endPlaceholder,"range-separator-icon":n.rangeSeparatorIcon,"prefix-icon":n.prefixIcon,"clear-icon":n.clearIcon,clearable:n.clearable,disabled:n.disabled,readonly:n.readonly,open:j.value,size:n.size,"onUpdate:startValue":C,"onUpdate:endValue":$,onFocus:G,onBlur:Z,onClear:A}),null,16,["start-value","end-value","format","start-placeholder","end-placeholder","range-separator-icon","prefix-icon","clear-icon","clearable","disabled","readonly","open","size"])]),_:1}),c(s(oc),{align:"start",class:He(s(et)("w-auto p-0",n.popoverClass)),style:{minWidth:"var(--reka-popover-trigger-width)"},onOpenAutoFocus:he[4]||(he[4]=ue=>ue.preventDefault()),onInteractOutside:R},{default:f(()=>[H("div",qht,[n.type==="daterange"?(k(),M($ht,{key:0,"model-value":w.value,"is-date-disabled":n.disabledDate,"number-of-months":n.numberOfMonths,"onUpdate:modelValue":he[0]||(he[0]=ue=>U(ue,!0))},null,8,["model-value","is-date-disabled","number-of-months"])):n.type==="monthrange"?(k(),M(Fht,{key:1,"model-value":w.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":he[1]||(he[1]=ue=>U(ue,!0))},null,8,["model-value","is-date-disabled"])):n.type==="yearrange"?(k(),M(Uht,{key:2,"model-value":w.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":he[2]||(he[2]=ue=>U(ue,!0))},null,8,["model-value","is-date-disabled"])):n.type==="datetimerange"?(k(),M(Oht,{key:3,"model-value":w.value,"is-date-disabled":n.disabledDate,granularity:n.timeGranularity,"hour-cycle":n.hourCycle,"number-of-months":n.numberOfMonths,"range-separator-icon":n.rangeSeparatorIcon,"onUpdate:modelValue":he[3]||(he[3]=ue=>U(ue,!1))},null,8,["model-value","is-date-disabled","granularity","hour-cycle","number-of-months","range-separator-icon"])):ke("",!0),n.shortcuts&&n.shortcuts.length>0?(k(),M(Jre,{key:4,items:n.shortcuts,onSelect:I},null,8,["items"])):ke("",!0)])]),_:1},8,["class"])]),_:1},8,["open"]))],2))}}),jht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Hht=q({name:"ShwfedDateRangeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(D,A)=>Ht(D,{...dn(i),...A}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.startPlaceholder?ut(t.config.startPlaceholder,n.value):void 0),p=E(()=>t.config.endPlaceholder?ut(t.config.endPlaceholder,n.value):void 0),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(D,A){if(!D)return!1;try{return bt(l(D,{form:o.value??{}}))}catch(I){return console.error(`[shwfed-form] failed to evaluate ${A} for ${t.fieldId}:`,I),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula"),y=E(()=>t.config.valueFormat??Cb.daterange.value),_=E(()=>{const D=t.config.presets;if(!(!D||D.length===0))return D.map(A=>({name:A.label,value:()=>{try{const I=bt(l(A.start,{form:o.value??{}})),U=bt(l(A.end,{form:o.value??{}}));return[ir(I,y.value),ir(U,y.value)]}catch(I){return console.error(`[shwfed-form] failed to evaluate preset "${A.start}" .. "${A.end}" for ${t.fieldId}:`,I),["",""]}}}))});function w(D){if(!Array.isArray(D)||D.length!==2)return;const[A,I]=D;if(!(typeof A!="string"||typeof I!="string")&&!(A.length===0||I.length===0))return[A,I]}function S(D){return typeof D=="string"&&D.length>0?D:void 0}const C=re(void 0),$=E({get:()=>{const D=t.config.binding;if(D==null)return C.value;if(typeof D=="string")return w(r(D));const A=S(r(D[0])),I=S(r(D[1]));if(!(A==null||I==null))return[A,I]},set:D=>{const A=t.config.binding;if(A==null){C.value=D;return}if(typeof A=="string"){a(A,D);return}a(A[0],D?.[0]),a(A[1],D?.[1])}}),T=E(()=>{const D=$.value;return D?`${D[0]} ~ ${D[1]}`:"—"});return(D,A)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":g.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",jht,O(T.value),1)):(k(),M(s(F$),{key:2,id:e.fieldId,modelValue:$.value,"onUpdate:modelValue":A[0]||(A[0]=I=>$.value=I),type:"daterange",format:e.config.format,"value-format":e.config.valueFormat,"start-placeholder":d.value,"end-placeholder":p.value,"range-separator-icon":e.config.rangeSeparatorIcon,"number-of-months":e.config.numberOfMonths,disabled:g.value,shortcuts:_.value},null,8,["id","modelValue","format","value-format","start-placeholder","end-placeholder","range-separator-icon","number-of-months","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),Wht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Ght=q({name:"ShwfedDateTimeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(S,C)=>Ht(S,{...dn(i),...C}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m(S,C){if(!S)return!1;try{return bt(l(S,{form:o.value??{}}))}catch($){return console.error(`[shwfed-form] failed to evaluate ${C} for ${t.fieldId}:`,$),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula"),x=E(()=>t.config.valueFormat??kb.datetime.value),y=E(()=>{const S=t.config.presets;if(!(!S||S.length===0))return S.map(C=>({name:C.label,value:()=>{try{const $=bt(l(C.value,{form:o.value??{}}));return ir($,x.value)}catch($){return console.error(`[shwfed-form] failed to evaluate preset "${C.value}" for ${t.fieldId}:`,$),""}}}))}),_=re(void 0),w=E({get:()=>{const S=t.config.binding;if(S==null)return _.value;const C=r(S);return typeof C=="string"&&C.length>0?C:void 0},set:S=>{const C=t.config.binding;if(C==null){_.value=S;return}a(C,S)}});return(S,C)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":h.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),b.value?(k(),L("div",Wht,O(w.value||"—"),1)):(k(),M(s(R$),{key:2,id:e.fieldId,modelValue:w.value,"onUpdate:modelValue":C[0]||(C[0]=$=>w.value=$),type:"datetime",format:e.config.format,"value-format":e.config.valueFormat,placeholder:d.value,"time-granularity":e.config.timeGranularity,"hour-cycle":e.config.hourCycle,disabled:h.value,shortcuts:y.value},null,8,["id","modelValue","format","value-format","placeholder","time-granularity","hour-cycle","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),Kht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Yht=q({name:"ShwfedDateTimeRangeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(D,A)=>Ht(D,{...dn(i),...A}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.startPlaceholder?ut(t.config.startPlaceholder,n.value):void 0),p=E(()=>t.config.endPlaceholder?ut(t.config.endPlaceholder,n.value):void 0),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(D,A){if(!D)return!1;try{return bt(l(D,{form:o.value??{}}))}catch(I){return console.error(`[shwfed-form] failed to evaluate ${A} for ${t.fieldId}:`,I),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula"),y=E(()=>t.config.valueFormat??Cb.datetimerange.value),_=E(()=>{const D=t.config.presets;if(!(!D||D.length===0))return D.map(A=>({name:A.label,value:()=>{try{const I=bt(l(A.start,{form:o.value??{}})),U=bt(l(A.end,{form:o.value??{}}));return[ir(I,y.value),ir(U,y.value)]}catch(I){return console.error(`[shwfed-form] failed to evaluate preset "${A.start}" .. "${A.end}" for ${t.fieldId}:`,I),["",""]}}}))});function w(D){if(!Array.isArray(D)||D.length!==2)return;const[A,I]=D;if(!(typeof A!="string"||typeof I!="string")&&!(A.length===0||I.length===0))return[A,I]}function S(D){return typeof D=="string"&&D.length>0?D:void 0}const C=re(void 0),$=E({get:()=>{const D=t.config.binding;if(D==null)return C.value;if(typeof D=="string")return w(r(D));const A=S(r(D[0])),I=S(r(D[1]));if(!(A==null||I==null))return[A,I]},set:D=>{const A=t.config.binding;if(A==null){C.value=D;return}if(typeof A=="string"){a(A,D);return}a(A[0],D?.[0]),a(A[1],D?.[1])}}),T=E(()=>{const D=$.value;return D?`${D[0]} ~ ${D[1]}`:"—"});return(D,A)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":g.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",Kht,O(T.value),1)):(k(),M(s(F$),{key:2,id:e.fieldId,modelValue:$.value,"onUpdate:modelValue":A[0]||(A[0]=I=>$.value=I),type:"datetimerange",format:e.config.format,"value-format":e.config.valueFormat,"start-placeholder":d.value,"end-placeholder":p.value,"range-separator-icon":e.config.rangeSeparatorIcon,"number-of-months":e.config.numberOfMonths,"time-granularity":e.config.timeGranularity,"hour-cycle":e.config.hourCycle,disabled:g.value,shortcuts:_.value},null,8,["id","modelValue","format","value-format","start-placeholder","end-placeholder","range-separator-icon","number-of-months","time-granularity","hour-cycle","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),Jht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Xht=q({name:"ShwfedTimeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(y,_)=>Ht(y,{...dn(i),..._}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function p(y,_){if(!y)return!1;try{return bt(l(y,{form:o.value??{}}))}catch(w){return console.error(`[shwfed-form] failed to evaluate ${_} for ${t.fieldId}:`,w),!1}}const m=E(()=>p(t.config.disabled,"disabled")),h=ma(),g=E(()=>t.config.readonly!=null?p(t.config.readonly,"readonly"):h.value),v=E(()=>g.value||t.config.derived?.mode==="formula"),b=re(void 0),x=E({get:()=>{const y=t.config.binding;if(y==null)return b.value;const _=r(y);return typeof _=="string"&&_.length>0?_:void 0},set:y=>{const _=t.config.binding;if(_==null){b.value=y;return}a(_,y)}});return(y,_)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":m.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[d.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:d.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),v.value?(k(),L("div",Jht,O(x.value||"—"),1)):(k(),M(s(R$),{key:2,id:e.fieldId,modelValue:x.value,"onUpdate:modelValue":_[0]||(_[0]=w=>x.value=w),type:"time","value-format":e.config.valueFormat,"time-granularity":e.config.timeGranularity,"hour-cycle":e.config.hourCycle,disabled:m.value},null,8,["id","modelValue","value-format","time-granularity","hour-cycle","disabled"]))]),_:1},8,["orientation","data-disabled"]))}}),Zht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Qht=q({name:"ShwfedTimeRangeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(S,C)=>Ht(S,{...dn(i),...C}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function p(S,C){if(!S)return!1;try{return bt(l(S,{form:o.value??{}}))}catch($){return console.error(`[shwfed-form] failed to evaluate ${C} for ${t.fieldId}:`,$),!1}}const m=E(()=>p(t.config.disabled,"disabled")),h=ma(),g=E(()=>t.config.readonly!=null?p(t.config.readonly,"readonly"):h.value),v=E(()=>g.value||t.config.derived?.mode==="formula");function b(S){if(!Array.isArray(S)||S.length!==2)return;const[C,$]=S;if(!(typeof C!="string"||typeof $!="string")&&!(C.length===0||$.length===0))return[C,$]}function x(S){return typeof S=="string"&&S.length>0?S:void 0}const y=re(void 0),_=E({get:()=>{const S=t.config.binding;if(S==null)return y.value;if(typeof S=="string")return b(r(S));const C=x(r(S[0])),$=x(r(S[1]));if(!(C==null||$==null))return[C,$]},set:S=>{const C=t.config.binding;if(C==null){y.value=S;return}if(typeof C=="string"){a(C,S);return}a(C[0],S?.[0]),a(C[1],S?.[1])}}),w=E(()=>{const S=_.value;return S?`${S[0]} ~ ${S[1]}`:"—"});return(S,C)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":m.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[d.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:d.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),v.value?(k(),L("div",Zht,O(w.value),1)):(k(),M(s(F$),{key:2,id:e.fieldId,modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=$=>_.value=$),type:"timerange","value-format":e.config.valueFormat,"range-separator-icon":e.config.rangeSeparatorIcon,"time-granularity":e.config.timeGranularity,"hour-cycle":e.config.hourCycle,disabled:m.value},null,8,["id","modelValue","value-format","range-separator-icon","time-granularity","hour-cycle","disabled"]))]),_:1},8,["orientation","data-disabled"]))}}),egt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},tgt=q({name:"ShwfedNumberFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o}=dr(),r=vn(),a=(D,A)=>Ht(D,{...dn(r),...A}),i=E(()=>ut(t.config.label,n.value)),l=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),u=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function d(D,A){if(!D)return!1;try{return bt(a(D,{form:o.value??{}}))}catch(I){return console.error(`[shwfed-form] failed to evaluate ${A} for ${t.fieldId}:`,I),!1}}function p(D,A){if(D)try{const I=bt(a(D,{form:o.value??{}}));return typeof I=="number"&&Number.isFinite(I)?I:void 0}catch(I){console.error(`[shwfed-form] failed to evaluate ${A} for ${t.fieldId}:`,I);return}}const m=E(()=>d(t.config.disabled,"disabled")),h=ma(),g=E(()=>t.config.readonly!=null?d(t.config.readonly,"readonly"):h.value),v=E(()=>g.value||t.config.derived?.mode==="formula"),b=E(()=>p(t.config.min,"min")),x=E(()=>p(t.config.max,"max")),y=E(()=>({useGrouping:!1,maximumFractionDigits:20})),{draft:_,commit:w}=t0({binding:()=>t.config.binding,fromState:D=>{if(typeof D=="number"&&Number.isFinite(D))return D;if(typeof D=="string"&&D.length>0){const A=Number(D);return Number.isFinite(A)?A:void 0}},toState:D=>typeof D!="number"||!Number.isFinite(D)?null:t.config.valueAsString?String(D):D});function S(D,A,I){const U=10**A;switch(I){case"floor":return Math.floor(D*U)/U;case"ceil":return Math.ceil(D*U)/U;default:return Math.round(D*U)/U}}const C=E(()=>!m.value&&_.value!==void 0);function $(){_.value=void 0,w()}async function T(){await It();const D=t.config.precision;if(D!==void 0){const A=_.value;if(A!==void 0){const I=S(A,D,t.config.roundingMode??"round");I!==A&&(_.value=I)}}w()}return(D,A)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":m.value||void 0},{default:f(()=>[i.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i.value),1)]),_:2},[u.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:u.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),v.value?(k(),L("div",egt,O(s(_)??"—"),1)):(k(),M(s(Ge),{key:2,class:"group/number-field","data-disabled":m.value?"true":void 0},{default:f(()=>[c(s(wn),{id:e.fieldId,"model-value":s(_),step:e.config.step,"step-snapping":e.config.step!==void 0,min:b.value,max:x.value,"format-options":y.value,disabled:m.value,placeholder:l.value,"input-class":"text-left","onUpdate:modelValue":A[0]||(A[0]=I=>_.value=I),onBlur:T},null,8,["id","model-value","step","step-snapping","min","max","format-options","disabled","placeholder"]),C.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/number-field:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"number-field-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:A[1]||(A[1]=at(()=>{},["prevent"])),onClick:at($,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"]))]),_:1},8,["orientation","data-disabled"]))}}),ngt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},ogt=q({name:"ShwfedNumberRangeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(ae,W)=>Ht(ae,{...dn(i),...W}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.startPlaceholder?ut(t.config.startPlaceholder,n.value):void 0),p=E(()=>t.config.endPlaceholder?ut(t.config.endPlaceholder,n.value):void 0),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(ae,W){if(!ae)return!1;try{return bt(l(ae,{form:o.value??{}}))}catch(B){return console.error(`[shwfed-form] failed to evaluate ${W} for ${t.fieldId}:`,B),!1}}function g(ae,W){if(ae)try{const B=bt(l(ae,{form:o.value??{}}));return typeof B=="number"&&Number.isFinite(B)?B:void 0}catch(B){console.error(`[shwfed-form] failed to evaluate ${W} for ${t.fieldId}:`,B);return}}const v=E(()=>h(t.config.disabled,"disabled")),b=ma(),x=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):b.value),y=E(()=>x.value||t.config.derived?.mode==="formula"),_=E(()=>g(t.config.min,"min")),w=E(()=>g(t.config.max,"max")),S=E(()=>({useGrouping:!1,maximumFractionDigits:20}));function C(ae){if(typeof ae=="number"&&Number.isFinite(ae))return ae;if(typeof ae=="string"&&ae.length>0){const W=Number(ae);return Number.isFinite(W)?W:void 0}}function $(ae){if(!Array.isArray(ae)||ae.length!==2)return;const W=C(ae[0]),B=C(ae[1]);if(!(W==null||B==null))return[W,B]}function T(ae){return t.config.valueAsString?String(ae):ae}const D=re(void 0),A=E({get:()=>{const ae=t.config.binding;if(ae==null)return D.value;if(typeof ae=="string")return $(r(ae));const W=C(r(ae[0])),B=C(r(ae[1]));if(!(W==null||B==null))return[W,B]},set:ae=>{const W=t.config.binding;if(W==null){D.value=ae;return}if(typeof W=="string"){a(W,ae?[T(ae[0]),T(ae[1])]:null);return}a(W[0],ae?T(ae[0]):null),a(W[1],ae?T(ae[1]):null)}}),I=re(A.value?.[0]),U=re(A.value?.[1]);Xe(A,ae=>{I.value=ae?.[0],U.value=ae?.[1]});function j(){const ae=I.value,W=U.value;if(typeof ae=="number"&&Number.isFinite(ae)&&typeof W=="number"&&Number.isFinite(W)){const B=A.value;if(B&&B[0]===ae&&B[1]===W)return;A.value=[ae,W]}else A.value!==void 0&&(A.value=void 0)}const Q=Dre().register(j);tr(()=>{Q(),j()});function F(ae){I.value=typeof ae=="number"&&Number.isFinite(ae)?ae:void 0}function R(ae){U.value=typeof ae=="number"&&Number.isFinite(ae)?ae:void 0}const G=E(()=>{const ae=U.value,W=w.value;return typeof ae=="number"&&typeof W=="number"?Math.min(ae,W):typeof ae=="number"?ae:W}),Z=E(()=>{const ae=I.value,W=_.value;return typeof ae=="number"&&typeof W=="number"?Math.max(ae,W):typeof ae=="number"?ae:W});function Y(ae,W,B){const K=10**W;switch(B){case"floor":return Math.floor(ae*K)/K;case"ceil":return Math.ceil(ae*K)/K;default:return Math.round(ae*K)/K}}async function he(ae){await It();const W=t.config.precision;if(W!==void 0){const B=ae==="start"?I:U,K=B.value;if(K!==void 0){const X=Y(K,W,t.config.roundingMode??"round");X!==K&&(B.value=X)}}j()}const ue=E(()=>!v.value&&(I.value!==void 0||U.value!==void 0));function pe(){I.value=void 0,U.value=void 0,A.value!==void 0&&(A.value=void 0)}const ce=E(()=>{const ae=A.value;return ae?`${ae[0]} ~ ${ae[1]}`:"—"});return(ae,W)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":v.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),y.value?(k(),L("div",ngt,O(ce.value),1)):(k(),M(s(Ge),{key:2,class:"group/number-range-field","data-disabled":v.value?"true":void 0},{default:f(()=>[c(s(wn),{id:e.fieldId,"model-value":I.value,step:e.config.step,"step-snapping":e.config.step!==void 0,min:_.value,max:G.value,"format-options":S.value,disabled:v.value,placeholder:d.value,"onUpdate:modelValue":F,onBlur:W[0]||(W[0]=B=>he("start"))},null,8,["id","model-value","step","step-snapping","min","max","format-options","disabled","placeholder"]),c(s(fe),{icon:e.config.rangeSeparatorIcon??"lucide:arrow-right",class:"mx-1 size-3.5 shrink-0 text-zinc-400"},null,8,["icon"]),c(s(wn),{"model-value":U.value,step:e.config.step,"step-snapping":e.config.step!==void 0,min:Z.value,max:w.value,"format-options":S.value,disabled:v.value,placeholder:p.value,"onUpdate:modelValue":R,onBlur:W[1]||(W[1]=B=>he("end"))},null,8,["model-value","step","step-snapping","min","max","format-options","disabled","placeholder"]),ue.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/number-range-field:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"number-range-field-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:W[2]||(W[2]=at(()=>{},["prevent"])),onClick:at(pe,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"]))]),_:1},8,["orientation","data-disabled"]))}}),rgt={key:1,class:"text-sm text-zinc-700"},agt=q({name:"ShwfedSwitchFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(w,S)=>Ht(w,{...dn(i),...S}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0),p=E(()=>ut(t.config.trueLabel,n.value)||"是"),m=E(()=>ut(t.config.falseLabel,n.value)||"否");function h(w,S){if(!w)return!1;try{return bt(l(w,{form:o.value??{}}))}catch(C){return console.error(`[shwfed-form] failed to evaluate ${S} for ${t.fieldId}:`,C),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula"),y=re(!1),_=E({get:()=>{const w=t.config.binding;return w==null?y.value:r(w)===!0},set:w=>{const S=w===!0,C=t.config.binding;if(C==null){y.value=S;return}a(C,S)}});return(w,S)=>(k(),M(s(V),{orientation:"horizontal",class:"h-full","data-disabled":g.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[d.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:d.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",rgt,O(_.value?p.value:m.value),1)):(k(),M(s(Lo),{key:2,id:e.fieldId,modelValue:_.value,"onUpdate:modelValue":S[0]||(S[0]=C=>_.value=C),disabled:g.value},null,8,["id","modelValue","disabled"]))]),_:1},8,["data-disabled"]))}}),igt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},sgt={key:0,class:"border-t border-zinc-200 px-3 py-2"},lgt=q({name:"ShwfedComboboxSingleFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"combobox-single-placeholder":"请选择","combobox-single-search-placeholder":"搜索…","combobox-single-empty":"无匹配项"},en:{"combobox-single-placeholder":"Select…","combobox-single-search-placeholder":"Search…","combobox-single-empty":"No matches"},ja:{"combobox-single-placeholder":"選択してください","combobox-single-search-placeholder":"検索…","combobox-single-empty":"一致なし"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=(Z,Y)=>Ht(Z,{...dn(l),...Y}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):o("combobox-single-placeholder")),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(Z,Y){if(!Z)return!1;try{return bt(u(Z,{form:r.value??{}}))}catch(he){return console.error(`[shwfed-form] failed to evaluate ${Y} for ${t.fieldId}:`,he),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula");function y(Z,Y){try{return Ss(Z,u,Y)}catch(he){return console.error(`[shwfed-form] failed to interpolate option text for ${t.fieldId}:`,he),Z}}const _=E(()=>(t.config.items??[]).map(Z=>{const Y=ut(Z.label,n.value)??"",he=Z.tooltip?ut(Z.tooltip,n.value):void 0,ue={form:r.value??{}};return{key:Z.id,value:Z.value.value,label:Y?y(Y,ue):"",tooltip:he?y(he,ue):void 0}})),w=re(void 0),S=E({get:()=>{const Z=t.config.binding;return Z==null?w.value:a(Z)},set:Z=>{const Y=t.config.binding;if(Y==null){w.value=Z;return}i(Y,Z)}});function C(Z,Y){if(Z===Y)return!0;if(Z==null||Y==null)return!1;if(typeof Z=="object"&&typeof Y=="object")try{return JSON.stringify(Z)===JSON.stringify(Y)}catch{return!1}return!1}const $=E(()=>_.value.find(Z=>C(Z.value,S.value))),T=E(()=>$.value?.key),D=E(()=>$.value?.label??""),A=re(!1);function I(Z){if(typeof Z!="string")return;const Y=_.value.find(he=>he.key===Z);Y&&(S.value=Y.value,It().then(()=>{A.value=!1}))}const U=E(()=>!g.value&&$.value!==void 0);function j(){S.value=void 0,A.value=!1}const Q=re(null);Xe(A,Z=>{Q.value=Z?_.value[0]?.key??null:null});const F=E(()=>_.value.find(Z=>Z.key===Q.value)),R=E(()=>F.value?.tooltip),G=E(()=>_.value.some(Z=>Z.tooltip!=null&&Z.tooltip.length>0));return(Z,Y)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":g.value||void 0},{default:f(()=>[d.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",igt,O(D.value||"—"),1)):(k(),M(s(nc),{key:2,open:A.value,"onUpdate:open":Y[1]||(Y[1]=he=>A.value=he)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(s(Ge),{class:"group/combobox-single","data-disabled":g.value?"true":void 0},{default:f(()=>[c(s(ip),{"as-child":""},{default:f(()=>[c(s(mt),{id:e.fieldId,"model-value":D.value,disabled:g.value,placeholder:p.value,class:"cursor-pointer text-left",readonly:""},null,8,["id","model-value","disabled","placeholder"])]),_:1}),U.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"combobox-single-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:Y[0]||(Y[0]=at(()=>{},["prevent"])),onClick:at(j,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"])]),_:1}),c(s(oc),{class:"p-0",style:{width:"var(--reka-popover-trigger-width)"}},{default:f(()=>[c(s(np),{"model-value":T.value,disabled:g.value,"selection-behavior":"toggle","onUpdate:modelValue":I},{default:f(()=>[c(s(Zm),{placeholder:s(o)("combobox-single-search-placeholder")},null,8,["placeholder"]),c(s(rp),null,{default:f(()=>[c(s(op),{class:"py-6 text-center text-sm text-zinc-500"},{default:f(()=>[P(O(s(o)("combobox-single-empty")),1)]),_:1}),c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(_.value,he=>(k(),M(s(ws),{key:he.key,value:he.key,onMouseenter:ue=>Q.value=he.key,onFocus:ue=>Q.value=he.key},{default:f(()=>[P(O(he.label),1)]),_:2},1032,["value","onMouseenter","onFocus"]))),128))]),_:1})]),_:1}),G.value&&R.value?(k(),L("div",sgt,[c(s(z),{source:R.value,block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])])):ke("",!0)]),_:1},8,["model-value","disabled"])]),_:1})]),_:1},8,["open"]))]),_:1},8,["orientation","data-disabled"]))}}),ugt=["id","data-disabled","data-readonly"],cgt=["tabindex","data-disabled","data-readonly","aria-disabled"],dgt={class:"flex flex-1 flex-col items-center justify-center gap-2"},fgt={key:1,class:"text-xs text-zinc-500"},pgt={key:1,class:"flex w-full flex-col gap-2"},mgt={"data-slot":"upload-zone-list",class:"flex flex-col gap-1"},hgt={class:"flex min-w-0 items-center gap-2"},ggt={class:"truncate text-zinc-700"},vgt=["accept","multiple","disabled"],ygt={key:2,class:"flex justify-end"},bgt=q({name:"ShwfedUploadFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"vscode-icons:file-type-excel","application/vnd.ms-excel":"vscode-icons:file-type-excel","application/vnd.openxmlformats-officedocument.presentationml.presentation":"vscode-icons:file-type-powerpoint","application/vnd.ms-powerpoint":"vscode-icons:file-type-powerpoint","application/zip":"vscode-icons:file-type-zip","application/x-zip-compressed":"vscode-icons:file-type-zip","application/vnd.rar":"vscode-icons:file-type-zip","application/x-rar-compressed":"vscode-icons:file-type-zip","application/pdf":"vscode-icons:file-type-pdf2","application/ofd":"vscode-icons:file-type-ofd","application/xml":"vscode-icons:file-type-xml","image/png":"vscode-icons:file-type-image","image/jpg":"vscode-icons:file-type-image","image/jpeg":"vscode-icons:file-type-image","application/msword":"vscode-icons:file-type-word","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"vscode-icons:file-type-word"},n={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"XLSX","application/vnd.ms-excel":"XLS","application/vnd.openxmlformats-officedocument.presentationml.presentation":"PPTX","application/vnd.ms-powerpoint":"PPT","application/zip":"ZIP","application/x-zip-compressed":"ZIP","application/vnd.rar":"RAR","application/x-rar-compressed":"RAR","application/pdf":"PDF","application/ofd":"OFD","application/xml":"XML","image/png":"PNG","image/jpg":"JPG","image/jpeg":"JPEG","application/msword":"DOC","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"DOCX"},o=e,{locale:r,t:a}=un({inheritLocale:!0,messages:{zh:{"upload-add-file":"添加文件","upload-accept-hint":"仅接受 {types}","upload-rejected-mime":"「{name}」类型不被允许","upload-rejected-size":"「{name}」超出单文件大小限制","upload-rejected-total":"「{name}」加入后将超出总大小限制","upload-rejected-count":"已达到文件数量上限,「{name}」未添加"},en:{"upload-add-file":"Add file","upload-accept-hint":"Only {types} are accepted","upload-rejected-mime":"{name} is not an allowed file type","upload-rejected-size":"{name} exceeds the maximum file size","upload-rejected-total":"{name} would exceed the total size limit","upload-rejected-count":"File count limit reached; {name} was not added"},ja:{"upload-add-file":"ファイルを追加","upload-accept-hint":"{types} のみ受け付けます","upload-rejected-mime":"「{name}」は許可されたファイル形式ではありません","upload-rejected-size":"「{name}」はファイルサイズの上限を超えています","upload-rejected-total":"「{name}」を追加すると合計サイズの上限を超えます","upload-rejected-count":"ファイル数の上限に達したため「{name}」は追加されません"}}}),{state:i,getAt:l,setAt:u}=dr(),d=vn(),p=(ue,pe)=>Ht(ue,{...dn(d),...pe}),m=E(()=>o.config.label?ut(o.config.label,r.value):void 0),h=E(()=>o.config.description?ut(o.config.description,r.value):void 0),g=E(()=>o.config.tooltip?ut(o.config.tooltip,r.value):void 0),v=E(()=>(o.config.templateLabel?ut(o.config.templateLabel,r.value):void 0)??"下载模板");function b(ue,pe){if(!ue)return!1;try{return bt(p(ue,{form:i.value??{}}))}catch(ce){return console.error(`[shwfed-form] failed to evaluate ${pe} for ${o.fieldId}:`,ce),!1}}const x=E(()=>b(o.config.disabled,"disabled")),y=ma(),_=E(()=>o.config.readonly!=null?b(o.config.readonly,"readonly"):y.value),w=re([]),S=E({get:()=>{const ue=o.config.binding;if(ue==null)return w.value;const pe=l(ue);return Array.isArray(pe)?pe.filter(ce=>ce instanceof File):[]},set:ue=>{const pe=o.config.binding;if(pe==null){w.value=ue;return}u(pe,ue.length===0?null:ue)}}),C=re(),$=E(()=>{const ue=o.config.accept;return ue&&ue.length>0?ue.join(","):void 0}),T=E(()=>{const ue=o.config.accept;if(!(!ue||ue.length===0))return Array.from(new Set(ue.map(pe=>n[pe]??pe))).join("、")}),D=E(()=>o.config.maxFiles!==void 0&&S.value.length>=o.config.maxFiles),A=E(()=>!x.value&&!_.value&&!D.value);function I(ue){const pe=o.config.accept;return!pe||pe.length===0?!0:pe.includes(ue.type)}function U(ue){const pe=[],ce=[];let ae=S.value.reduce((B,K)=>B+K.size,0),W=S.value.length;for(const B of ue){if(!I(B)){ce.push({file:B,reason:"mime"});continue}if(o.config.maxFileSize!==void 0&&B.size>o.config.maxFileSize){ce.push({file:B,reason:"size"});continue}if(o.config.maxFiles!==void 0&&W>=o.config.maxFiles){ce.push({file:B,reason:"count"});continue}if(o.config.maxTotalSize!==void 0&&ae+B.size>o.config.maxTotalSize){ce.push({file:B,reason:"total"});continue}pe.push(B),ae+=B.size,W+=1}return{accepted:pe,rejected:ce}}function j(ue){if(!ue||ue.length===0)return;const pe=o.config.multiple??!1,ce=pe?Array.from(ue):Array.from(ue).slice(0,1),{accepted:ae,rejected:W}=U(ce);for(const B of W)Si.error(a(`upload-rejected-${B.reason}`,{name:B.file.name}));ae.length>0&&(S.value=pe?[...S.value,...ae]:ae),C.value&&(C.value.value="")}function Q(ue){j(ue.target.files)}function F(){A.value&&C.value?.click()}function R(ue){A.value&&(ue.key==="Enter"||ue.key===" ")&&(ue.preventDefault(),C.value?.click())}function G(ue){if(x.value||_.value)return;const pe=[...S.value];pe.splice(ue,1),S.value=pe}function Z(ue){return t[ue.type]??"fluent:document-20-regular"}const Y=E(()=>o.config.templateIcon??"fluent:arrow-download-20-regular");async function he(){const ue=o.config.template;if(!ue)return;const pe={form:i.value??{}},ce=Eo(function*(){const ae=yield*p(ue.request,pe);if(!ue.download)return yield*ae.file();const W=yield*ae.json();return yield*(yield*p(ue.download,{...pe,json:W})).file()});try{const ae=await Yr(li(ce,bs));if(!(ae instanceof File)){console.error(`[shwfed-form] template request for ${o.fieldId} did not produce a File`);return}const W=URL.createObjectURL(ae),B=document.createElement("a");B.href=W,B.download=ae.name,document.body.appendChild(B),B.click(),B.remove(),URL.revokeObjectURL(W)}catch(ae){console.error(`[shwfed-form] failed to download template for ${o.fieldId}:`,ae)}}return(ue,pe)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":x.value||void 0},{default:f(()=>[m.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(m.value),1)]),_:2},[g.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:g.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),H("div",{id:e.fieldId,class:"flex flex-col gap-2","data-disabled":x.value||void 0,"data-readonly":_.value||void 0},[S.value.length===0?(k(),L("div",{key:0,role:"button",tabindex:A.value?0:-1,"data-slot":"upload-zone","data-disabled":x.value||void 0,"data-readonly":_.value||void 0,"aria-disabled":x.value||void 0,class:He(["flex min-h-40 w-full flex-col gap-3 rounded border-2 border-dashed border-zinc-200 bg-zinc-50 p-4 outline-none transition-colors duration-180 ease-out focus-visible:border-(--primary) data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-60",[A.value&&"cursor-pointer hover:border-zinc-400 hover:bg-zinc-100",_.value&&"cursor-default"]]),onClick:F,onKeydown:R},[H("div",dgt,[c(s(fe),{icon:"fluent:cloud-arrow-up-20-regular",class:"size-8 text-zinc-400"}),h.value?(k(),M(s(z),{key:0,source:h.value,block:"",class:"prose prose-sm prose-zinc max-w-none text-center text-zinc-500"},null,8,["source"])):ke("",!0),T.value?(k(),L("p",fgt,O(s(a)("upload-accept-hint",{types:T.value})),1)):ke("",!0)])],42,cgt)):(k(),L("div",pgt,[H("ul",mgt,[(k(!0),L(Me,null,Ke(S.value,(ce,ae)=>(k(),L("li",{key:`${ce.name}-${ae}`,"data-slot":"upload-zone-item",class:"flex items-center justify-between gap-2 rounded px-2 py-1.5 text-sm leading-snug transition-[background-color] duration-180 ease-out hover:bg-zinc-50"},[H("span",hgt,[c(s(fe),{icon:Z(ce),class:"size-4 shrink-0"},null,8,["icon"]),H("span",ggt,O(ce.name),1)]),!x.value&&!_.value?(k(),M(s(Rn),{key:0,type:"button",variant:"ghost",size:"sm","data-slot":"upload-zone-delete",class:"size-6 p-0 text-zinc-500 hover:bg-red-50 hover:text-red-600","aria-label":`删除:${ce.name}`,onClick:W=>G(ae)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["aria-label","onClick"])):ke("",!0)]))),128))]),A.value?(k(),M(s(Rn),{key:0,type:"button",variant:"default","data-slot":"upload-zone-add",class:"w-full shrink-0",onClick:F},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),P(" "+O(s(a)("upload-add-file")),1)]),_:1})):ke("",!0)])),H("input",{ref_key:"inputRef",ref:C,type:"file",class:"hidden",accept:$.value,multiple:e.config.multiple,disabled:x.value||_.value,onChange:Q},null,40,vgt),e.config.template&&!_.value?(k(),L("div",ygt,[c(s(Rn),{type:"button",variant:"link",size:"sm","data-slot":"upload-zone-template",onClick:he},{default:f(()=>[c(s(fe),{icon:Y.value},null,8,["icon"]),P(" "+O(v.value),1)]),_:1})])):ke("",!0)],8,ugt)]),_:1},8,["orientation","data-disabled"]))}}),_gt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},xgt=["id","disabled","data-value"],wgt={key:1,class:"block truncate text-zinc-300"},Sgt={key:0,"data-slot":"combobox-single-remote-empty",class:"py-6 text-center text-sm text-zinc-500"},kgt=q({name:"ShwfedComboboxSingleRemoteFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"combobox-single-search-placeholder":"搜索…","combobox-single-empty":"无匹配项","combobox-single-loading":"加载中…"},en:{"combobox-single-search-placeholder":"Search…","combobox-single-empty":"No matches","combobox-single-loading":"Loading…"},ja:{"combobox-single-search-placeholder":"検索…","combobox-single-empty":"一致なし","combobox-single-loading":"読み込み中…"}}}),{state:r,getAt:a,setAt:i,setAtSilent:l}=dr(),u=vn(),d=(pe,ce)=>Ht(pe,{...dn(u),...ce}),p=E(()=>ut(t.config.label,n.value)),m=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),h=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function g(pe,ce){if(!pe)return!1;try{return bt(d(pe,{form:r.value??{}}))}catch(ae){return console.error(`[shwfed-form] failed to evaluate ${ce} for ${t.fieldId}:`,ae),!1}}const v=E(()=>g(t.config.disabled,"disabled")),b=ma(),x=E(()=>t.config.readonly!=null?g(t.config.readonly,"readonly"):b.value),y=E(()=>x.value||t.config.derived?.mode==="formula");function _(pe){try{return bt(d(t.config.optionValue,{form:r.value??{},option:pe}))}catch(ce){console.error(`[shwfed-form] failed to evaluate optionValue for ${t.fieldId}:`,ce);return}}function w(pe){const ce=ut(t.config.optionLabel,n.value)??"";return ce?Ss(ce,d,{form:r.value??{},option:pe}):""}const S=re(null),C=re(!1),$=E(()=>{const pe=t.config.request;if(!pe)return null;try{const ce=bt(d(pe,{form:r.value??{}}));return JSON.stringify(ce.describe())}catch{return null}});let T=0;async function D(){const pe=++T;if($.value==null){S.value=null,C.value=!1;return}const ce=t.config.request;C.value=!0;const ae=Eo(function*(){return yield*(yield*d(ce,{form:r.value??{}})).json()});try{const W=await Yr(li(ae,bs));pe===T&&(S.value=W)}catch{pe===T&&(S.value=null)}finally{pe===T&&(C.value=!1)}}const A=E(()=>{let pe;try{pe=bt(d(t.config.options,{form:r.value??{},json:S.value}))}catch(ce){return console.error(`[shwfed-form] failed to evaluate options for ${t.fieldId}:`,ce),[]}return Array.isArray(pe)?pe.map((ce,ae)=>({key:String(ae),label:w(ce),value:_(ce)})):[]}),I=re(void 0),U=E({get:()=>{const pe=t.config.binding;return pe==null?I.value:a(pe)},set:pe=>{const ce=t.config.binding;if(ce==null){I.value=pe;return}i(ce,pe)}});let j;OX($,()=>{if(j!=null){const pe=t.config.binding;pe==null?I.value=void 0:l(pe,void 0)}j=$.value,D()},{debounce:200,immediate:!0});function Q(pe,ce){if(pe===ce)return!0;if(pe==null||ce==null)return!1;if(typeof pe=="object"&&typeof ce=="object")try{return JSON.stringify(pe)===JSON.stringify(ce)}catch{return!1}return!1}const F=E(()=>A.value.find(pe=>Q(pe.value,U.value))),R=E(()=>F.value?.key),G=E(()=>F.value?.label??""),Z=re(!1);function Y(pe){if(typeof pe!="string")return;const ce=A.value.find(ae=>ae.key===pe);ce&&(U.value=ce.value,It().then(()=>{Z.value=!1}))}const he=E(()=>!v.value&&F.value!==void 0);function ue(){U.value=void 0,Z.value=!1}return(pe,ce)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":v.value||void 0},{default:f(()=>[p.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(p.value),1)]),_:2},[h.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:h.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),y.value?(k(),L("div",_gt,[G.value?(k(),M(s(z),{key:0,source:G.value},null,8,["source"])):(k(),L(Me,{key:1},[P(" — ")],64))])):(k(),M(s(nc),{key:2,open:Z.value,"onUpdate:open":ce[1]||(ce[1]=ae=>Z.value=ae)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(s(Ge),{class:"group/combobox-single-remote","data-disabled":v.value?"true":void 0},{default:f(()=>[c(s(ip),{"as-child":""},{default:f(()=>[H("button",{id:e.fieldId,type:"button",disabled:v.value,"data-value":!!G.value,"data-slot":"input-group-control",class:"peer flex h-9 min-w-0 flex-1 cursor-default items-center overflow-hidden rounded-none border-0 bg-transparent px-3 py-1 text-left text-sm text-zinc-700 outline-none disabled:cursor-not-allowed"},[G.value?(k(),M(s(z),{key:0,source:G.value,class:"block truncate"},null,8,["source"])):m.value?(k(),L("span",wgt,O(m.value),1)):ke("",!0)],8,xgt)]),_:1}),C.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"text-zinc-400"},{default:f(()=>[c(s(fe),{icon:"fluent:spinner-ios-20-regular",class:"animate-spin"})]),_:1})):he.value?(k(),M(s(pt),{key:1,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single-remote:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"combobox-single-remote-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:ce[0]||(ce[0]=at(()=>{},["prevent"])),onClick:at(ue,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"])]),_:1}),c(s(oc),{class:"p-0",style:{width:"var(--reka-popover-trigger-width)"}},{default:f(()=>[c(s(np),{"model-value":R.value,disabled:v.value,"selection-behavior":"toggle","onUpdate:modelValue":Y},{default:f(()=>[c(s(Zm),{placeholder:s(o)("combobox-single-search-placeholder")},null,8,["placeholder"]),c(s(rp),null,{default:f(()=>[A.value.length===0?(k(),L("div",Sgt,O(C.value?s(o)("combobox-single-loading"):s(o)("combobox-single-empty")),1)):(k(),L(Me,{key:1},[c(s(op),{class:"py-6 text-center text-sm text-zinc-500"},{default:f(()=>[P(O(s(o)("combobox-single-empty")),1)]),_:1}),c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(A.value,ae=>(k(),M(s(ws),{key:ae.key,value:ae.key},{default:f(()=>[c(s(z),{source:ae.label},null,8,["source"])]),_:2},1032,["value"]))),128))]),_:1})],64))]),_:1})]),_:1},8,["model-value","disabled"])]),_:1})]),_:1},8,["open"]))]),_:1},8,["orientation","data-disabled"]))}}),Cgt=/\{\{([\s\S]*?)\}\}/g;function Zre(e,t){return e.replace(Cgt,(n,o)=>{const r=o.trim();return r.length===0?"":t(r)})}const h4=q({name:"ShwfedFormUnitRenderer",__name:"FormUnitRenderer",props:{unit:{},evaluateMedia:{type:Function},isHidden:{type:Function}},setup(e){const t=e;function n(d){for(const p of d){if(!p.media)return p;try{if(t.evaluateMedia(p.media))return p}catch(m){console.error(`[shwfed-form] failed to evaluate layout media for ${p.name}:`,m)}}return d[d.length-1]}const o=re();Pt(()=>{o.value=n(t.unit.layouts)}),Xe(()=>t.unit.layouts,d=>{o.value=n(d)},{deep:!1});const r=new Set,a=E(()=>{const d=o.value?.layout;if(!d)return[];const p=[];for(const m of t.unit.fields){const h=d.placements[m.id];if(!h||t.isHidden?.(m))continue;const g=Ap(m.type,m.compatibilityDate);if(!g){const v=`${m.type}@${m.compatibilityDate}`;r.has(v)||(r.add(v),console.warn(`[shwfed-form] no registered field type for ${v}`));continue}p.push({field:m,placement:h,entry:g})}return p});function i(d){const[[p,m],[h,g]]=d.area,v=[`grid-column: ${p} / ${h}`,`grid-row: ${m} / ${g}`,"min-width: 0"],b=d.h&&d.h!=="stretch"?d.h:null,x=d.v&&d.v!=="stretch"?d.v:null;if(b||x){v.push("display: flex");const y=_=>_==="start"?"flex-start":_==="end"?"flex-end":"center";b&&v.push(`justify-content: ${y(b)}`),x&&v.push(`align-items: ${y(x)}`)}return v.join("; ")}const l=E(()=>{const d=o.value?.layout;if(!d)return"";const p=`repeat(${d.columns}, minmax(0, 1fr))`;let m="";if(d.rows){const b=Array.from({length:d.rows},()=>!1);for(const x of a.value){if(!x.entry.metadata.h.grow)continue;const[[,y],[,_]]=x.placement.area,w=Math.max(1,y),S=Math.min(d.rows,_-1);for(let C=w;C<=S;C++)b[C-1]=!0}m=b.map(x=>x?"auto":"minmax(auto, 1fr)").join(" ")}const h=`calc(${d.gap??zR} * 0.25rem)`,g=d.columns>1?`min(${h}, calc(100% / ${d.columns-1}))`:h;return["display: grid",`grid-template-columns: ${p}`,m?`grid-template-rows: ${m}`:"",`column-gap: ${g}`,`row-gap: ${h}`,d.style??""].filter(Boolean).join("; ")}),u=E(()=>a.value.map(d=>({key:d.field.id,style:i(d.placement),component:d.entry.runtime,fieldId:d.field.id,config:d.field})));return(d,p)=>(k(),L("div",{style:mn(l.value)},[(k(!0),L(Me,null,Ke(u.value,m=>(k(),L("div",{key:m.key,style:mn(m.style)},[(k(),M(Mo(m.component),{"field-id":m.fieldId,config:m.config},null,8,["field-id","config"]))],4))),128))],4))}});function hS(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object")return!1;if(e instanceof Date||t instanceof Date)return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime();if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((r,a)=>hS(r,t[a]));const n=Object.keys(e),o=Object.keys(t);return n.length!==o.length?!1:n.every(r=>Object.prototype.hasOwnProperty.call(t,r)&&hS(e[r],t[r]))}const Qre=Symbol("shwfed-form-derived-quiescence");function eae(){const e=re(0);return{inFlight:e,begin:()=>{e.value+=1},end:()=>{e.value-=1},async settled(){for(;;)if(e.value>0&&await new Promise(t=>{const n=Xe(e,o=>{o===0&&(n(),t())})}),await It(),e.value===0)return}}}function $gt(){const e=eae();return fr(Qre,e),e}function tae(){return Fn(Qre,null)??eae()}function g4(e){const{state:t,getAt:n,setAtSilent:o,isDirty:r,markDirty:a}=e.formState,i=e.quiescence,l=E(()=>e.fields().flatMap(v=>{const b=v.binding,x=v.derived;if(typeof b!="string"||!x||typeof x!="object")return[];const y=x.mode,_=x.expression;return y!=="formula"&&y!=="prefill"||typeof _!="string"?[]:[{binding:b,mode:y,expression:_}]}));let u=0,d=!1;function p(v,b){i.begin(),Yr(e.evaluate(v.expression)).then(x=>{b===u&&(v.mode==="prefill"&&r(v.binding)||hS(n(v.binding),x)||o(v.binding,x))},()=>{}).finally(()=>{i.end()})}function m(){const v=u+=1;for(const b of l.value)p(b,v)}Xe([t,l],()=>{d&&m()});function h(){for(const v of l.value)v.mode==="prefill"&&n(v.binding)!==void 0&&a(v.binding)}let g=!1;Pm(()=>{g=!0}),e.ready.then(()=>{g||(d=!0,h(),m())},()=>{g||(d=!0,h(),m())})}const tB=q({name:"ShwfedListFieldRow",__name:"row",props:Ca({unit:{},index:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=e,o=u4(t,"row");Wi({item:{type:"dyn",label:"item",description:"当前列表项",value:()=>t.value??{}},index:{type:"number",label:"index",description:"当前列表项索引,从 0 开始",value:()=>n.index}});const r=vn(),a=(l,u)=>Ht(l,{...dn(r),...u});g4({fields:()=>n.unit.fields,evaluate:l=>a(l),ready:Promise.resolve(),formState:o,quiescence:tae()});function i(l){return bt(a(l))}return(l,u)=>(k(),M(h4,{unit:e.unit,"evaluate-media":i},null,8,["unit"]))}}),Tgt={class:"flex flex-col gap-3"},Egt=["data-instruction"],Dgt={class:"flex items-center gap-2"},Ogt={key:2,class:"min-w-0 flex-1","data-slot":"list-row-summary"},Agt={key:3,class:"min-w-0 flex-1"},Igt={key:0,class:"mt-3 min-w-0","data-slot":"list-row-content"},ax="shwfed-list-row",Pgt=q({name:"ShwfedListFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(W,B)=>Ht(W,{...dn(i),...B}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0),p=E(()=>ut(t.config.addLabel,n.value)||"新增"),m=E(()=>ut(t.config.locale,n.value)),h=E(()=>!!m.value);function g(W,B){if(!W)return!1;try{return bt(l(W,{form:o.value??{}}))}catch(K){return console.error(`[shwfed-form] failed to evaluate ${B} for ${t.fieldId}:`,K),!1}}const v=E(()=>g(t.config.disabled,"disabled")),b=E(()=>t.config.reorderable??!0),x=E(()=>{const W=t.config.unit.fields;return W.length!==1?!1:W[0].binding===mA}),y=re([]),_=E(()=>{const W=t.config.binding;if(W==null)return y.value;const B=r(W);return Array.isArray(B)?B:[]}),w=E(()=>{const W=m.value;return W==null?[]:_.value.map((B,K)=>Zre(W,X=>{try{const Ee=bt(l(X,{form:o.value??{},item:B??{},index:K}));return Ee==null?"":String(Ee)}catch(Ee){return console.error(`[shwfed-form] list field: failed to evaluate summary expression \`${X}\` for ${t.fieldId}[${K}]:`,Ee),""}}))});function S(W){const B=t.config.binding;if(B==null){y.value=W;return}a(B,W)}function C(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,W=>{const B=Math.random()*16|0;return(W==="x"?B:B&3|8).toString(16)})}const $=re([]);Xe(()=>_.value.length,W=>{W!==$.value.length&&($.value=Array.from({length:W},()=>C()))},{immediate:!0});const T=re(new Set);function D(W){return T.value.has(W)}function A(W){const B=new Set(T.value);B.has(W)?B.delete(W):B.add(W),T.value=B}const I=E(()=>t.config.max!=null&&_.value.length>=t.config.max),U=E(()=>(t.config.min??0)>0&&_.value.length<=(t.config.min??0)),j=E(()=>!v.value&&!I.value),Q=E(()=>!v.value&&!U.value),F=E(()=>!v.value&&b.value);function R(){if(!j.value)return;const W=x.value?null:{};S([..._.value,W]);const B=C();$.value=[...$.value,B];const K=new Set(T.value);K.add(B),T.value=K}function G(W){if(!Q.value||W<0||W>=_.value.length)return;const B=$.value[W];if(S(_.value.filter((K,X)=>X!==W)),$.value=$.value.filter((K,X)=>X!==W),B!=null&&T.value.has(B)){const K=new Set(T.value);K.delete(B),T.value=K}}function Z(W,B){if(!F.value||W===B||W<0||B<0||W>=_.value.length||B>=_.value.length)return;const K=[..._.value],[X]=K.splice(W,1);if(!X)return;K.splice(B,0,X),S(K);const Ee=[...$.value],[_e]=Ee.splice(W,1);_e&&(Ee.splice(B,0,_e),$.value=Ee)}function Y(W,B){if(W<0||W>=_.value.length)return;const K=[..._.value];K[W]=B,S(K)}const he=W=>$.value[W]??`idx-${W}`;function ue(W){if(!F.value||W.source.kind!==ax||W.target.kind!==ax)return;const B=$.value.findIndex(X=>X===W.source.id),K=$.value.findIndex(X=>X===W.target.id);B<0||K<0||(W.instruction==="reorder-above"?Z(B,B<K?K-1:K):W.instruction==="reorder-below"&&Z(B,B<=K?K:K+1))}const pe=Zv({onRowDrop:ue}),ce=W=>W.querySelector(".drag-handle");function ae(W){return{kind:ax,canDrop:B=>B.kind===ax,blockInstructions:B=>{const K=["make-child","reparent"];return B.id===he(W)&&K.push("reorder-above","reorder-below"),K},dragHandle:ce}}return(W,B)=>(k(),M(s(V),{orientation:"vertical","data-disabled":v.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[d.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:d.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),H("div",Tgt,[(k(!0),L(Me,null,Ke(_.value,(K,X)=>(k(),L("div",{key:$.value[X],ref_for:!0,ref:s(pe).rowRef(he(X),ae(X)),class:"relative rounded border border-zinc-200 bg-zinc-50/40 p-3","data-slot":"list-row","data-instruction":s(pe).instructionFor(he(X))??void 0},[H("div",Dgt,[b.value?(k(),M(s(fe),{key:0,icon:"fluent:re-order-dots-vertical-20-regular",class:He(["drag-handle size-4 shrink-0 text-zinc-400",F.value?"cursor-grab":"cursor-not-allowed opacity-50"]),"data-slot":"list-row-drag-handle"},null,8,["class"])):ke("",!0),h.value?(k(),M(s(Ct),{key:1,size:"icon-xs",class:"shrink-0","data-slot":"list-row-collapse","aria-expanded":D(he(X)),"aria-label":D(he(X))?"折叠":"展开",onClick:Ee=>A(he(X))},{default:f(()=>[c(s(fe),{icon:D(he(X))?"fluent:chevron-down-20-regular":"fluent:chevron-right-20-regular"},null,8,["icon"])]),_:2},1032,["aria-expanded","aria-label","onClick"])):ke("",!0),h.value?(k(),L("div",Ogt,[c(s(z),{source:w.value[X]??"",class:"prose prose-xs prose-zinc"},null,8,["source"])])):(k(),L("div",Agt,[c(tB,{"model-value":K,unit:e.config.unit,index:X,"onUpdate:modelValue":Ee=>Y(X,Ee)},null,8,["model-value","unit","index","onUpdate:modelValue"])])),c(s(Ct),{variant:"destructive",size:"icon-xs",class:"shrink-0",disabled:!Q.value,"data-slot":"list-row-remove","aria-label":"删除",onClick:Ee=>G(X)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["disabled","onClick"])]),h.value?sm((k(),L("div",Igt,[c(tB,{"model-value":K,unit:e.config.unit,index:X,"onUpdate:modelValue":Ee=>Y(X,Ee)},null,8,["model-value","unit","index","onUpdate:modelValue"])],512)),[[AI,D(he(X))]]):ke("",!0)],8,Egt))),128)),c(s(Rn),{type:"button",disabled:!j.value,"data-slot":"list-add",class:"w-full justify-center",onClick:R},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),H("span",null,O(p.value),1)]),_:1},8,["disabled"])])]),_:1},8,["data-disabled"]))}}),Mgt=sp(Pgt,[["__scopeId","data-v-5cc27944"]]),Rgt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Fgt={key:2,class:"min-h-9 py-1.5 text-sm text-zinc-400"},zgt={key:3,class:"flex flex-wrap items-start gap-x-6 gap-y-2 py-1"},Vgt={class:"flex flex-col gap-0.5"},Ngt={class:"text-sm text-zinc-700"},Lgt=q({name:"ShwfedCheckboxGroupFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"checkbox-group-empty":"无可选项"},en:{"checkbox-group-empty":"No options"},ja:{"checkbox-group-empty":"選択肢なし"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=(A,I)=>Ht(A,{...dn(l),...I}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m(A,I){if(!A)return!1;try{return bt(u(A,{form:r.value??{}}))}catch(U){return console.error(`[shwfed-form] failed to evaluate ${I} for ${t.fieldId}:`,U),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula");function x(A,I){try{return Ss(A,u,I)}catch(U){return console.error(`[shwfed-form] failed to interpolate option text for ${t.fieldId}:`,U),A}}const y=E(()=>(t.config.items??[]).map(A=>{const I=ut(A.label,n.value)??"",U=A.tooltip?ut(A.tooltip,n.value):void 0,j={form:r.value??{}};return{key:A.id,value:A.value.value,label:I?x(I,j):"",tooltip:U?x(U,j):void 0}}));function _(A){return Array.isArray(A)?A:[]}const w=re([]),S=E({get:()=>{const A=t.config.binding;return A==null?w.value:_(a(A))},set:A=>{const I=t.config.binding;if(I==null){w.value=A;return}i(I,A)}});function C(A,I){if(A===I)return!0;if(A==null||I==null)return!1;if(typeof A=="object"&&typeof I=="object")try{return JSON.stringify(A)===JSON.stringify(I)}catch{return!1}return!1}function $(A){return S.value.some(I=>C(I,A.value))}function T(A){if(h.value)return;const I=S.value;S.value=$(A)?I.filter(U=>!C(U,A.value)):[...I,A.value]}const D=E(()=>y.value.filter($).map(I=>I.label).filter(I=>I.length>0).join("、")||"—");return(A,I)=>(k(),M(s(V),{orientation:"vertical","data-disabled":h.value||void 0},{default:f(()=>[d.value?(k(),M(s(N),{key:0,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)):ke("",!0),b.value?(k(),L("div",Rgt,O(D.value),1)):y.value.length===0?(k(),L("div",Fgt,O(s(o)("checkbox-group-empty")),1)):(k(),L("div",zgt,[(k(!0),L(Me,null,Ke(y.value,U=>(k(),L("label",{key:U.key,"data-slot":"checkbox-group-option",class:He(["flex items-start gap-2",h.value?"cursor-not-allowed opacity-60":"cursor-pointer"])},[c(s(o4),{"model-value":$(U),disabled:h.value,class:"mt-0.5","onUpdate:modelValue":()=>T(U)},null,8,["model-value","disabled","onUpdate:modelValue"]),H("span",Vgt,[H("span",Ngt,O(U.label),1),U.tooltip?(k(),M(s(z),{key:0,source:U.tooltip,block:"",class:"prose prose-xs prose-zinc text-zinc-400"},null,8,["source"])):ke("",!0)])],2))),128))]))]),_:1},8,["data-disabled"]))}}),Bgt=q({name:"UiRadioGroup",__name:"RadioGroup",props:{modelValue:{},defaultValue:{},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=At(n,"class"),a=Dn(r,o);return(i,l)=>(k(),M(s(jUe),Oe({"data-slot":"radio-group"},s(a),{class:s(et)("grid gap-3",n.class)}),{default:f(()=>[se(i.$slots,"default")]),_:3},16,["class"]))}}),Ugt=q({name:"UiRadioGroupItem",__name:"RadioGroupItem",props:{id:{},value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(KUe),Oe({"data-slot":"radio-group-item"},s(o),{class:s(et)("peer cursor-pointer flex items-center justify-center border-zinc-200 data-[state=checked]:border-(--primary) aria-invalid:border-red-400 size-4 shrink-0 rounded-full border shadow-xs hover:shadow transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50",t.class)}),{default:f(()=>[c(s(JUe),{"data-slot":"radio-group-indicator",class:"grid h-full w-full place-content-center"},{default:f(()=>[...a[0]||(a[0]=[H("span",{class:"size-2 rounded-full bg-(--primary)"},null,-1)])]),_:1})]),_:1},16,["class"]))}}),qgt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},jgt={key:2,class:"min-h-9 py-1.5 text-sm text-zinc-400"},Hgt={class:"flex flex-col gap-0.5"},Wgt={class:"text-sm text-zinc-700"},Ggt=q({name:"ShwfedRadioGroupFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"radio-group-empty":"无可选项"},en:{"radio-group-empty":"No options"},ja:{"radio-group-empty":"選択肢なし"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=($,T)=>Ht($,{...dn(l),...T}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m($,T){if(!$)return!1;try{return bt(u($,{form:r.value??{}}))}catch(D){return console.error(`[shwfed-form] failed to evaluate ${T} for ${t.fieldId}:`,D),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula");function x($,T){try{return Ss($,u,T)}catch(D){return console.error(`[shwfed-form] failed to interpolate option text for ${t.fieldId}:`,D),$}}const y=E(()=>(t.config.items??[]).map($=>{const T=ut($.label,n.value)??"",D=$.tooltip?ut($.tooltip,n.value):void 0,A={form:r.value??{}};return{key:$.id,value:$.value.value,label:T?x(T,A):"",tooltip:D?x(D,A):void 0}})),_=re(void 0),w=E({get:()=>{const $=t.config.binding,T=$==null?_.value:a($);return typeof T=="string"||typeof T=="number"?T:void 0},set:$=>{const T=t.config.binding;if(T==null){_.value=$;return}i(T,$)}});function S($){h.value||(w.value=typeof $=="string"||typeof $=="number"?$:void 0)}const C=E(()=>y.value.find(T=>T.value===w.value)?.label||"—");return($,T)=>(k(),M(s(V),{orientation:"vertical","data-disabled":h.value||void 0},{default:f(()=>[d.value?(k(),M(s(N),{key:0,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)):ke("",!0),b.value?(k(),L("div",qgt,O(C.value),1)):y.value.length===0?(k(),L("div",jgt,O(s(o)("radio-group-empty")),1)):(k(),M(s(Bgt),{key:3,"model-value":w.value,disabled:h.value,class:"flex flex-wrap items-start gap-x-6 gap-y-2 py-1","onUpdate:modelValue":S},{default:f(()=>[(k(!0),L(Me,null,Ke(y.value,D=>(k(),L("label",{key:D.key,"data-slot":"radio-group-option",class:He(["flex items-start gap-2",h.value?"cursor-not-allowed opacity-60":"cursor-pointer"])},[c(s(Ugt),{value:D.value,disabled:h.value,class:"mt-0.5"},null,8,["value","disabled"]),H("span",Hgt,[H("span",Wgt,O(D.label),1),D.tooltip?(k(),M(s(z),{key:0,source:D.tooltip,block:"",class:"prose prose-xs prose-zinc text-zinc-400"},null,8,["source"])):ke("",!0)])],2))),128))]),_:1},8,["model-value","disabled"]))]),_:1},8,["data-disabled"]))}}),Kgt=q({name:"ShwfedTableFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=nv(()=>aa(()=>import("./index-De3_lDfy.js"),[],import.meta.url)),n=e,{locale:o}=un(),r=dr(),a=E(()=>ut(n.config.label,o.value)),i=E(()=>n.config.tooltip?ut(n.config.tooltip,o.value):void 0),l=E(()=>{const{dataSource:d,...p}=n.config.table;return p}),u=E({get:()=>{const d=n.config.binding?.trim();if(!d)return[];const p=r.getAt(d);return Array.isArray(p)?p:[]},set:d=>{const p=n.config.binding?.trim();p&&r.setAtSilent(p,d)}});return(d,p)=>(k(),M(s(V),{orientation:"vertical"},{default:f(()=>[a.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(a.value),1)]),_:2},[i.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:i.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),c(s(t),{rows:u.value,"onUpdate:rows":p[0]||(p[0]=m=>u.value=m),config:l.value},null,8,["rows","config"])]),_:1}))}}),Ygt={"data-slot":"collapsible-section",class:"relative rounded border border-zinc-200 bg-zinc-50/40 p-3"},Jgt={class:"flex items-center gap-2"},Xgt={class:"min-w-0 flex-1","data-slot":"collapsible-header"},Zgt={"data-slot":"collapsible-body",class:"mt-3 min-w-0"},Qgt=q({name:"ShwfedCollapsibleFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),o=re(t.config.defaultCollapsed??!1);function r(){o.value=!o.value}const a=vn(),i=(p,m)=>Ht(p,{...dn(a),...m}),l=E(()=>{const p=ut(t.config.header,n.value)??"";return p?Zre(p,m=>{try{const h=bt(i(m));return h==null?"":String(h)}catch(h){return console.error(`[shwfed-form] collapsible: failed to evaluate header expression \`${m}\` for ${t.fieldId}:`,h),""}}):""});function u(p){return bt(i(p))}function d(p){const m=p.hidden;if(!m)return!1;try{return bt(i(m))}catch(h){return console.error(`[shwfed-form] collapsible: failed to evaluate hidden for ${p.id}:`,h),!1}}return(p,m)=>(k(),L("div",Ygt,[H("div",Jgt,[c(s(Ct),{size:"icon-xs",class:"shrink-0","data-slot":"collapsible-toggle","aria-expanded":!o.value,"aria-label":o.value?"展开":"折叠",onClick:r},{default:f(()=>[c(s(fe),{icon:o.value?"fluent:chevron-right-20-regular":"fluent:chevron-down-20-regular"},null,8,["icon"])]),_:1},8,["aria-expanded","aria-label"]),H("div",Xgt,[c(s(z),{source:l.value,class:"prose prose-sm prose-zinc max-w-none"},null,8,["source"])])]),sm(H("div",Zgt,[c(h4,{unit:e.config.unit,"evaluate-media":u,"is-hidden":d},null,8,["unit"])],512),[[AI,!o.value]])]))}}),ix=q({name:"UiSkeleton",__name:"Skeleton",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(k(),L("div",{"data-slot":"skeleton",class:He(s(et)("animate-pulse rounded-md bg-zinc-300/20",t.class))},null,2))}});function evt(e){const t=ti(new Set(e.initialExpanded())),n=ti(new Set(e.initialSelection())),o=ti(new Map),r=ti(new Set),a=re(null),i=mo(e.rootsRef.value);e.rootsRef;function l(){i.value=e.rootsRef.value}function u(ce){const ae=[{siblings:i.value,parent:null,depth:0}];for(;ae.length;){const W=ae.pop();for(let B=0;B<W.siblings.length;B++){const K=W.siblings[B];if(e.getKey(K)===ce)return{node:K,parent:W.parent,depth:W.depth,index:B,siblings:W.siblings};const X=d(K);X&&X.length&&ae.push({siblings:X,parent:K,depth:W.depth+1})}}return null}function d(ce){const ae=e.getKey(ce),W=o.get(ae);if(W?.status==="loaded")return W.children;const B=e.getChildren?.(ce);return B===void 0?e.loadChildren?null:void 0:B.length>0?B:e.loadChildren?null:B}function p(ce){const ae=o.get(e.getKey(ce));if(ae?.status==="loaded"&&ae.children.length>0)return!0;const W=e.getChildren?.(ce);return W===void 0?!1:W.length>0?!0:!!e.loadChildren}function m(ce){const ae=e.loadChildren;if(!ae)return;const W=e.getChildren?.(ce);if(!(W!==void 0&&W.length===0))return;const B=e.getKey(ce);r.has(B)||o.get(B)?.status==="loaded"||(r.add(B),o.set(B,{status:"loading"}),YK(ae(ce)).then(X=>{ku(X,{onSuccess:Ee=>{o.set(B,{status:"loaded",children:Ee})},onFailure:Ee=>{const _e=iCe(Ee),ze=_e._tag==="Some"?_e.value:Ee;o.set(B,{status:"error",error:ze})}})}))}function h(ce){r.delete(ce),o.delete(ce);const ae=u(ce);ae&&m(ae.node)}function g(ce){r.delete(ce),o.delete(ce)}function v(ce){const ae=u(ce);ae&&p(ae.node)&&(t.add(ce),m(ae.node))}function b(ce){t.delete(ce)}function x(ce){t.has(ce)?b(ce):v(ce)}function y(){e.onSelectionChange(Array.from(n))}function _(ce){n.clear(),n.add(ce),y()}function w(){n.size!==0&&(n.clear(),y())}function S(ce,ae,W=0){ae(ce,W);const B=d(ce);if(B&&B.length>0)for(const K of B)S(K,ae,W+1)}function C(ce,ae,W){S(ce,(B,K)=>{if(!e.selectable(B,ae+K))return;const X=e.getKey(B);W?n.add(X):n.delete(X)})}function $(ce){const ae=u(ce);if(!ae||!e.selectable(ae.node,ae.depth))return;const W=e.cascade(),B=!n.has(ce);W==="independent"?B?n.add(ce):n.delete(ce):C(ae.node,ae.depth,B),y()}function T(ce){const ae=e.selectionMode();if(ae!=="none"){if(ae==="single"){const W=u(ce);if(!W||!e.selectable(W.node,W.depth))return;_(ce);return}n.has(ce)||$(ce)}}function D(ce){const ae=e.selectionMode();if(ae!=="none"){if(ae==="single"){if(!n.has(ce))return;n.delete(ce),y();return}n.has(ce)&&$(ce)}}function A(ce,ae){let W=0,B=0;const K=d(ce);if(!K||K.length===0)return{total:W,selectedCount:B};for(const X of K)S(X,(Ee,_e)=>{e.selectable(Ee,ae+1+_e)&&(W++,n.has(e.getKey(Ee))&&B++)});return{selectedCount:B,total:W}}function I(ce,ae){if(e.selectionMode()!=="multi")return!1;const{selectedCount:W,total:B}=A(ce,ae);return B===0?!1:W>0&&W<B}function U(ce,ae){const W=e.getKey(ce);if(n.has(W))return!0;if(e.selectionMode()!=="multi")return!1;const{selectedCount:B,total:K}=A(ce,ae);return K>0&&B===K}function j(ce){e.setRoots(ce),i.value=ce}function Q(ce,ae){if(ce===null){const K=i.value.slice();return ae(K),j(K),!0}const W=u(ce);if(!W)return!1;const B=e.getChildren?.(W.node);if(B!==void 0)ae(B);else{const K=o.get(ce);if(K?.status==="loaded")ae(K.children);else{const X=[];ae(X),o.set(ce,{status:"loaded",children:X}),r.add(ce)}}return j(i.value.slice()),!0}function F(ce,ae,W){Q(ce,B=>{const K=W??B.length;B.splice(Math.max(0,Math.min(K,B.length)),0,ae)})}function R(ce){const ae=u(ce);ae&&(ae.siblings.splice(ae.index,1),n.delete(ce),t.delete(ce),o.delete(ce),r.delete(ce),j(i.value.slice()))}function G(ce,ae,W){const B=u(ce);if(!B)return;const[K]=B.siblings.splice(B.index,1);if(!K)return;if(ae===null){const _e=i.value.slice(),ze=Math.max(0,Math.min(W,_e.length));_e.splice(ze,0,K),j(_e);return}const X=u(ae);if(!X){B.siblings.splice(B.index,0,K);return}const Ee=e.getChildren?.(X.node);if(Ee!==void 0){const _e=Math.max(0,Math.min(W,Ee.length));Ee.splice(_e,0,K)}else{const _e=o.get(ae);if(_e?.status==="loaded"){const ze=Math.max(0,Math.min(W,_e.children.length));_e.children.splice(ze,0,K)}else{const ze=[K];o.set(ae,{status:"loaded",children:ze}),r.add(ae)}}j(i.value.slice())}function Z(ce,ae){const W=u(ce);W&&(Object.assign(W.node,ae),j(i.value.slice()))}function Y(ce){const ae=[];function W(B,K){for(const X of B){(!ce||ce(X))&&ae.push({node:X,depth:K,key:e.getKey(X)});const Ee=d(X);Ee&&Ee.length>0&&t.has(e.getKey(X))&&W(Ee,K+1)}}return W(i.value,0),ae}function he(ce){const ae=[];function W(B){for(const K of B){if(ae.push(K),e.getKey(K)===ce)return!0;const X=d(K);if(X&&X.length&&W(X))return!0;ae.pop()}return!1}return W(i.value)?ae.slice():null}function ue(){return{roots:i.value.slice(),selected:Array.from(n),expanded:Array.from(t)}}const pe=E(()=>{const ce=[];for(const ae of n){const W=u(ae);W&&ce.push(W.node)}return ce});return{expanded:t,selected:n,loadState:o,focusedKey:a,rootsView:i,locate:u,resolvedChildren:d,isExpandable:p,isIndeterminate:I,isVisuallySelected:U,flattenVisible:Y,selectedNodes:pe,syncRoots:l,expand:v,collapse:b,toggleExpand:x,selectKey:T,deselectKey:D,clearSelection:w,toggleMulti:$,insert:F,remove:R,move:G,update:Z,invalidate:g,retry:h,findPath:he,snapshot:ue}}const tvt=["aria-expanded","aria-selected","aria-level","aria-setsize","aria-posinset","data-tree-key","data-tree-focused"],nvt={class:"flex items-center gap-1 min-w-0 flex-1"},ovt=["aria-label"],rvt={key:1,"aria-hidden":"true",class:"inline-block size-4 shrink-0"},avt=["checked"],ivt={class:"min-w-0 flex-1"},svt={class:"text-sm"},lvt={key:0,class:"flex items-center gap-1 shrink-0"},uvt={key:1,role:"group",class:"m-0 list-none p-0"},cvt={class:"text-xs text-zinc-500 inline-flex items-center gap-1"},dvt=q({name:"UiTreeNode",inheritAttrs:!1,__name:"TreeNode",props:{node:{},depth:{},posInSet:{},setSize:{},parentKey:{},getKey:{type:Function},getChildren:{type:Function},hasLoader:{type:Boolean},selectionMode:{},cascade:{},selectable:{type:Function},draggable:{type:Function},isExpanded:{type:Function},isSelectedKey:{type:Function},isVisuallySelected:{type:Function},isIndeterminate:{type:Function},resolvedChildren:{type:Function},loadStateOf:{type:Function},filterPredicate:{type:Function},filterQuery:{},isExpandable:{type:Function},tree:{},focusedKey:{},showFocusedRow:{type:Boolean}},emits:["toggle-expand","toggle-select","focus-row"],setup(e,{emit:t}){const n=e,o=t,r=E(()=>n.getKey(n.node)),a=E(()=>n.isExpanded(r.value)),i=E(()=>n.isExpandable(n.node)),l=E(()=>n.loadStateOf(r.value)),u=E(()=>l.value?.status==="loading"),d=E(()=>l.value?.status==="error"?l.value.error:null),p=E(()=>n.isVisuallySelected(n.node,n.depth)),m=E(()=>n.isIndeterminate(n.node,n.depth)),h=E(()=>n.selectable(n.node,n.depth)),g=E(()=>{if(!n.filterPredicate||!n.filterQuery||n.filterPredicate(n.node,n.filterQuery))return!0;const T=n.resolvedChildren(n.node);return!T||T.length===0?!1:T.some(D=>v(D))});function v(T){if(!n.filterPredicate||!n.filterQuery||n.filterPredicate(T,n.filterQuery))return!0;const D=n.resolvedChildren(T);return!D||D.length===0?!1:D.some(A=>v(A))}const b=E(()=>!n.filterPredicate||!n.filterQuery?!0:n.filterPredicate(n.node,n.filterQuery)),x=E(()=>({node:n.node,depth:n.depth,expanded:a.value,loading:u.value,selected:p.value,indeterminate:m.value,tree:n.tree})),y=E(()=>({node:n.node,depth:n.depth,tree:n.tree}));function _(){i.value&&o("toggle-expand",r.value)}function w(){n.selectionMode!=="none"&&h.value&&o("toggle-select",r.value)}const S=E(()=>{if(n.selectionMode!=="none")return m.value?"mixed":p.value?"true":"false"}),C=E(()=>n.resolvedChildren(n.node)),$=E(()=>i.value&&(a.value||!b.value&&g.value));return(T,D)=>{const A=Rf("UiTreeNode");return g.value?(k(),L("li",{key:0,role:"treeitem","aria-expanded":i.value?a.value:void 0,"aria-selected":S.value,"aria-level":e.depth+1,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"data-tree-key":r.value,"data-tree-focused":e.focusedKey===r.value?"":void 0,class:"select-none"},[g.value?(k(),L("div",{key:0,class:He(s(et)("group flex items-center justify-between gap-2 rounded px-1 py-1 outline-none",e.showFocusedRow&&e.focusedKey===r.value&&"bg-(--primary)/10")),tabindex:"-1",onClick:D[1]||(D[1]=at(I=>o("focus-row",r.value),["stop"]))},[H("div",nvt,[H("span",{"aria-hidden":"true",class:"inline-block shrink-0",style:mn({width:`${e.depth*16}px`})},null,4),i.value?(k(),L("button",{key:0,type:"button",class:"inline-flex size-4 shrink-0 items-center justify-center rounded text-zinc-500 hover:text-zinc-900","aria-label":a.value?"Collapse":"Expand",onClick:at(_,["stop"])},[c(s(fe),{icon:a.value?"fluent:chevron-down-16-filled":"fluent:chevron-right-16-filled",class:"size-3"},null,8,["icon"])],8,ovt)):(k(),L("span",rvt)),e.selectionMode!=="none"&&h.value?(k(),L(Me,{key:2},[e.selectionMode==="multi"?(k(),M(s(o4),{key:0,"model-value":m.value?"indeterminate":p.value,"data-tree-toggle":"checkbox","onUpdate:modelValue":w,onClick:D[0]||(D[0]=at(()=>{},["stop"]))},null,8,["model-value"])):(k(),L("input",{key:1,type:"radio",class:"size-4 shrink-0 accent-(--primary) cursor-pointer",checked:p.value,"data-tree-toggle":"radio",onClick:at(w,["stop"])},null,8,avt))],64)):ke("",!0),H("div",ivt,[se(T.$slots,"node",qt(Wt(x.value)),()=>[H("span",svt,O(String(e.node)),1)])])]),T.$slots.actions?(k(),L("div",lvt,[se(T.$slots,"actions",qt(Wt(y.value)))])):ke("",!0)],2)):ke("",!0),$.value?(k(),L("ul",uvt,[u.value?(k(),L("li",{key:0,role:"treeitem","aria-busy":"true",class:"px-1 py-1",style:mn({paddingLeft:`${(e.depth+1)*16+16}px`})},[se(T.$slots,"loading-children",{node:e.node},()=>[H("span",cvt,[c(s(fe),{icon:"svg-spinners:90-ring-with-bg",class:"size-3"}),D[5]||(D[5]=P(" Loading… ",-1))])])],4)):d.value!==null?(k(),L("li",{key:1,role:"treeitem",class:"px-1 py-1",style:mn({paddingLeft:`${(e.depth+1)*16+16}px`})},[se(T.$slots,"error",{node:e.node,error:d.value,retry:()=>e.tree.retry(r.value)})],4)):C.value&&C.value.length?(k(!0),L(Me,{key:2},Ke(C.value,(I,U)=>(k(),M(A,{key:e.getKey(I),node:I,depth:e.depth+1,"pos-in-set":U+1,"set-size":C.value.length,"parent-key":r.value,"get-key":e.getKey,"get-children":e.getChildren,"has-loader":e.hasLoader,"selection-mode":e.selectionMode,cascade:e.cascade,selectable:e.selectable,draggable:e.draggable,"is-expanded":e.isExpanded,"is-selected-key":e.isSelectedKey,"is-visually-selected":e.isVisuallySelected,"is-indeterminate":e.isIndeterminate,"resolved-children":e.resolvedChildren,"load-state-of":e.loadStateOf,"filter-predicate":e.filterPredicate,"filter-query":e.filterQuery,"is-expandable":e.isExpandable,tree:e.tree,"focused-key":e.focusedKey,"show-focused-row":e.showFocusedRow,onToggleExpand:D[2]||(D[2]=j=>o("toggle-expand",j)),onToggleSelect:D[3]||(D[3]=j=>o("toggle-select",j)),onFocusRow:D[4]||(D[4]=j=>o("focus-row",j))},ee({_:2},[T.$slots.node?{name:"node",fn:f(j=>[se(T.$slots,"node",Oe({ref_for:!0},j))]),key:"0"}:void 0,T.$slots.actions?{name:"actions",fn:f(j=>[se(T.$slots,"actions",Oe({ref_for:!0},j))]),key:"1"}:void 0,T.$slots.error?{name:"error",fn:f(j=>[se(T.$slots,"error",Oe({ref_for:!0},j))]),key:"2"}:void 0,T.$slots["loading-children"]?{name:"loading-children",fn:f(j=>[se(T.$slots,"loading-children",Oe({ref_for:!0},j))]),key:"3"}:void 0]),1032,["node","depth","pos-in-set","set-size","parent-key","get-key","get-children","has-loader","selection-mode","cascade","selectable","draggable","is-expanded","is-selected-key","is-visually-selected","is-indeterminate","resolved-children","load-state-of","filter-predicate","filter-query","is-expandable","tree","focused-key","show-focused-row"]))),128)):ke("",!0)])):ke("",!0)],8,tvt)):ke("",!0)}}}),fvt=["aria-multiselectable"],pvt={key:0,"data-slot":"tree-selected-pane"},mvt={key:1,"data-slot":"tree-empty"},hvt={key:2,role:"group",class:"m-0 list-none p-0"},gvt=q({name:"UiTree",__name:"Tree",props:{roots:{},getKey:{},getChildren:{type:Function,default:void 0},loadChildren:{type:Function,default:void 0},selectionMode:{default:"none"},cascade:{default:"independent"},modelValue:{default:void 0},selectable:{type:Function,default:()=>!0},draggable:{type:[Function,Boolean],default:!1},canDrop:{type:Function,default:void 0},filterPredicate:{type:Function,default:void 0},filterQuery:{default:""},initialExpanded:{default:()=>[]},showFocusedRow:{type:Boolean,default:!0}},emits:["update:modelValue","update:roots","move"],setup(e,{expose:t,emit:n}){const o=e,r=n;function a(){if(o.selectionMode==="none")return[];if(o.selectionMode==="single"){const R=o.modelValue;return typeof R=="string"?[R]:[]}const F=o.modelValue;return Array.isArray(F)?F.slice():[]}const i=E(()=>o.roots);function l(F){r("update:roots",F)}let u=a();function d(F){if(u=F,o.selectionMode==="single"){r("update:modelValue",F[0]);return}r("update:modelValue",F)}const p=evt({rootsRef:i,setRoots:l,getKey:o.getKey,getChildren:o.getChildren,loadChildren:o.loadChildren,selectionMode:()=>o.selectionMode,cascade:()=>o.cascade,selectable:(F,R)=>o.selectable(F,R),initialSelection:a,initialExpanded:()=>o.initialExpanded??[],onSelectionChange:d});Xe(i,()=>p.syncRoots()),Xe(()=>o.modelValue,F=>{const R=o.selectionMode==="single"?typeof F=="string"?[F]:[]:Array.isArray(F)?F.slice():[];if(!m(R,u)){p.selected.clear();for(const G of R)p.selected.add(G);u=R}});function m(F,R){if(F.length!==R.length)return!1;const G=new Set(F);for(const Z of R)if(!G.has(Z))return!1;return!0}const h={insert:(F,R,G)=>p.insert(F,R,G),remove:F=>p.remove(F),move:(F,R,G)=>{const Z=p.locate(F);if(!Z)return;const Y={key:F,fromParentKey:Z.parent?o.getKey(Z.parent):null,fromIndex:Z.index,toParentKey:R,toIndex:G};p.move(F,R,G),r("move",Y)},update:(F,R)=>p.update(F,R),expand:F=>p.expand(F),collapse:F=>p.collapse(F),select:F=>p.selectKey(F),deselect:F=>p.deselectKey(F),invalidate:F=>p.invalidate(F),retry:F=>p.retry(F),findPath:F=>p.findPath(F),snapshot:()=>p.snapshot()};t(h);const g=F=>p.expanded.has(F),v=F=>p.selected.has(F),b=(F,R)=>p.isVisuallySelected(F,R),x=(F,R)=>p.isIndeterminate(F,R),y=F=>p.resolvedChildren(F),_=F=>p.loadState.get(F),w=F=>p.isExpandable(F),S=(F,R)=>typeof o.draggable=="function"?o.draggable(F,R):o.draggable;function C(F){p.toggleExpand(F)}function $(F){if(o.selectionMode!=="none"){if(o.selectionMode==="single"){const R=p.locate(F);if(!R||!o.selectable(R.node,R.depth))return;p.selectKey(F);return}p.toggleMulti(F)}}function T(F){p.focusedKey.value=F}function D(){return p.flattenVisible(o.filterPredicate&&o.filterQuery?F=>{if(o.filterPredicate(F,o.filterQuery))return!0;const R=y(F);if(!R||R.length===0)return!1;const G=[...R];for(;G.length;){const Z=G.pop();if(o.filterPredicate(Z,o.filterQuery))return!0;const Y=y(Z);Y&&Y.length&&G.push(...Y)}return!1}:void 0)}function A(F){const R=D();if(!R.length)return;const G=p.focusedKey.value;let Z=R.findIndex(he=>he.key===G);Z===-1&&(Z=F>0?-1:R.length);const Y=Math.max(0,Math.min(R.length-1,Z+F));p.focusedKey.value=R[Y].key}function I(F){const R=D();R.length&&(p.focusedKey.value=(F==="home"?R[0]:R[R.length-1]).key)}function U(F){switch(o.selectionMode==="none"&&["ArrowUp","ArrowDown","Home","End"].includes(F.key),F.key){case"ArrowDown":F.preventDefault(),A(1);break;case"ArrowUp":F.preventDefault(),A(-1);break;case"ArrowRight":{F.preventDefault();const R=p.focusedKey.value;if(!R)return;const G=p.locate(R);if(!G)return;p.isExpandable(G.node)&&!p.expanded.has(R)?p.expand(R):A(1);break}case"ArrowLeft":{F.preventDefault();const R=p.focusedKey.value;if(!R)return;if(p.expanded.has(R)){p.collapse(R);return}const G=p.locate(R);G?.parent&&(p.focusedKey.value=o.getKey(G.parent));break}case"Home":F.preventDefault(),I("home");break;case"End":F.preventDefault(),I("end");break;case" ":case"Enter":{F.preventDefault();const R=p.focusedKey.value;if(!R)return;$(R);break}}}const j=E(()=>!(p.rootsView.value.length>0)),Q=E(()=>({selected:p.selectedNodes.value,tree:h}));return(F,R)=>(k(),L("div",{role:"tree","aria-multiselectable":e.selectionMode==="multi"?"true":void 0,tabindex:"0","data-slot":"tree",class:"outline-none",onKeydown:U},[F.$slots["selected-pane"]?(k(),L("div",pvt,[se(F.$slots,"selected-pane",qt(Wt(Q.value)))])):ke("",!0),j.value?(k(),L("div",mvt,[se(F.$slots,"empty")])):(k(),L("ul",hvt,[(k(!0),L(Me,null,Ke(s(p).rootsView.value,(G,Z)=>(k(),M(dvt,{key:e.getKey(G),node:G,depth:0,"pos-in-set":Z+1,"set-size":s(p).rootsView.value.length,"parent-key":null,"get-key":e.getKey,"get-children":e.getChildren,"has-loader":!!e.loadChildren,"selection-mode":e.selectionMode,cascade:e.cascade,selectable:e.selectable,draggable:S,"is-expanded":g,"is-selected-key":v,"is-visually-selected":b,"is-indeterminate":x,"resolved-children":y,"load-state-of":_,"filter-predicate":e.filterPredicate,"filter-query":e.filterQuery,"is-expandable":w,tree:h,"focused-key":s(p).focusedKey.value,"show-focused-row":e.showFocusedRow,onToggleExpand:C,onToggleSelect:$,onFocusRow:T},ee({_:2},[F.$slots.node?{name:"node",fn:f(Y=>[se(F.$slots,"node",Oe({ref_for:!0},Y))]),key:"0"}:void 0,F.$slots.actions?{name:"actions",fn:f(Y=>[se(F.$slots,"actions",Oe({ref_for:!0},Y))]),key:"1"}:void 0,F.$slots.error?{name:"error",fn:f(Y=>[se(F.$slots,"error",Oe({ref_for:!0},Y))]),key:"2"}:void 0,F.$slots["loading-children"]?{name:"loading-children",fn:f(Y=>[se(F.$slots,"loading-children",Oe({ref_for:!0},Y))]),key:"3"}:void 0]),1032,["node","pos-in-set","set-size","get-key","get-children","has-loader","selection-mode","cascade","selectable","filter-predicate","filter-query","focused-key","show-focused-row"]))),128))]))],40,fvt))}}),vvt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},yvt={key:1,class:"min-h-9 py-1.5 text-sm text-red-500"},bvt={key:2,class:"flex flex-col gap-1.5 py-1","aria-busy":"true"},_vt={class:"flex flex-col gap-0.5"},xvt={class:"min-h-9 py-1.5 text-sm text-zinc-400"},wvt=q({name:"ShwfedTreeMultiFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"tree-multi-search-label":"搜索","tree-multi-search-clear":"清除搜索","tree-multi-load-error":"加载失败","tree-multi-empty":"无可选项","tree-multi-readonly-empty":"—","tree-multi-readonly-separator":"、"},en:{"tree-multi-search-label":"Search","tree-multi-search-clear":"Clear search","tree-multi-load-error":"Failed to load","tree-multi-empty":"No options","tree-multi-readonly-empty":"—","tree-multi-readonly-separator":", "},ja:{"tree-multi-search-label":"検索","tree-multi-search-clear":"検索をクリア","tree-multi-load-error":"読み込みに失敗しました","tree-multi-empty":"選択肢なし","tree-multi-readonly-empty":"—","tree-multi-readonly-separator":"、"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=(ue,pe)=>Ht(ue,{...dn(l),...pe}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m(ue,pe){if(!ue)return!1;try{return bt(u(ue,{form:r.value??{}}))}catch(ce){return console.error(`[shwfed-form] failed to evaluate ${pe} for ${t.fieldId}:`,ce),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula"),x=re([]),y=E({get:()=>{const ue=t.config.binding,pe=ue==null?x.value:a(ue);return Array.isArray(pe)?pe.map(ce=>String(ce)):[]},set:ue=>{const pe=ue.map(ae=>String(ae)),ce=t.config.binding;if(ce==null){x.value=pe;return}i(ce,pe)}}),_=re([]),w=re(!1),S=re(null);async function C(){const ue=t.config.dataSource;if(!ue){_.value=[];return}const pe=Eo(function*(){let ae=ot();if(ue.request){const K=yield*(yield*u(ue.request,{form:r.value??{}})).json();ae=ft(K)}const W=yield*u(ue.data,{form:r.value??{},json:ae});return Array.isArray(W)?W:[]}),ce=Eo(function*(){const ae=yield*GM(Vn(()=>{w.value=!0}).pipe(KM("30 millis")));return yield*$l(pe,Lc(ae))}).pipe($l(Vn(()=>{w.value=!1})));try{const ae=await Yr(li(ce,bs));_.value=ae,S.value=null}catch(ae){console.warn("[shwfed-form] tree dataSource fetch failed",ae),S.value=ae}}Xe(()=>[t.config.dataSource?.request,t.config.dataSource?.data],()=>{C()},{immediate:!0});function $(ue){return{form:r.value??{},node:ue}}function T(ue){try{const pe=bt(u(t.config.nodeKey,$(ue)));return String(pe)}catch(pe){return console.error(`[shwfed-form] failed to evaluate nodeKey for ${t.fieldId}:`,pe),""}}function D(ue){let pe;try{pe=bt(u(t.config.nodeChildren,$(ue)))}catch(ce){console.error(`[shwfed-form] failed to evaluate nodeChildren for ${t.fieldId}:`,ce);return}if(pe!=null&&Array.isArray(pe)&&pe.length!==0)return pe}function A(ue,pe){if(h.value)return!1;const ce=t.config.nodeSelectable;if(!ce)return!0;try{return bt(u(ce,$(ue)))}catch(ae){return console.error(`[shwfed-form] failed to evaluate nodeSelectable for ${t.fieldId}:`,ae),!1}}function I(ue,pe){try{return Ss(ue,u,{form:r.value??{},node:pe})}catch(ce){return console.error(`[shwfed-form] failed to interpolate node text for ${t.fieldId}:`,ce),ue}}function U(ue){const pe=ut(t.config.nodeLabel,n.value)??"";return pe?I(pe,ue):""}function j(ue){if(!t.config.nodeTooltip)return;const pe=ut(t.config.nodeTooltip,n.value);if(pe)return I(pe,ue)}const Q=E(()=>{if(!t.config.expandAll)return[];const ue=[],pe=[..._.value];for(;pe.length;){const ce=pe.pop(),ae=D(ce);ae&&ae.length&&(ue.push(T(ce)),pe.push(...ae))}return ue}),F=re("");function R(ue){const pe=t.config.filter?.keywords;if(!pe)return[];try{const ce=bt(u(pe,$(ue)));return Array.isArray(ce)?ce.map(ae=>String(ae)):[]}catch{return[]}}const G=mo(new Map);Xe(()=>[_.value,n.value,t.config.nodeLabel,t.config.filter?.keywords],()=>{const ue=new Map,pe=[..._.value];for(;pe.length;){const ce=pe.pop(),ae=U(ce).trim().toLowerCase(),W=R(ce).map(K=>K.trim().toLowerCase()).join(`
|
|
160
|
+
: index % 2 == 1 ? { 'background-color': 'oklch(98.5% 0 0)' } : { 'background-color': 'white' }`}}function qEt(e){return e.id}const Mre="com.shwfed.form.field.table",Rre="2026-05-18",kct={name:"表格",icon:"fluent:table-20-regular",w:{initial:12,min:6,max:1/0},h:{initial:10,min:5,max:1/0,grow:!0}};function Fre(e){const t=NC(()=>d4(e));return rt({type:Ze(Mre),compatibilityDate:Ze(Rre),...hr(e),label:ne(lt.annotations({title:"标签",description:"表格上方展示的文本;留空则不渲染标签"})),tooltip:ne(lt.annotations({title:"提示",description:"鼠标悬停在标签上时展示的说明,支持 Markdown"})),binding:ne(St.pipe(xn(1)).annotations({title:"绑定路径",description:"表格数据在表单状态中的 `dot-prop` 路径,例如 `rows`;表格从 `form.<binding>` 读取行数据,本地增删改实时写回同一路径;留空时表格无数据,行编辑不持久化"})),table:t.annotations({identifier:"FormFieldTableConfig",title:"表格配置",description:"内嵌表格的完整配置;数据源自动绑定到 `form.<binding>`,无需单独配置"})}).annotations({title:"TableField",description:"把一个可本地编辑的表格嵌入表单,其实时数据写入绑定路径"})}function Cct(){const{dataSource:e,...t}=Pre();return{table:t}}const $ct=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Rre,defaults:Cct,metadata:kct,schema:Fre,type:Mre},Symbol.toStringTag,{value:"Module"})),zre="com.shwfed.form.field.collapsible",Vre="2026-05-20",Tct={name:"可折叠区域",icon:"fluent:chevron-down-20-regular",w:{initial:12,min:4,max:1/0},h:{initial:4,min:2,max:1/0,grow:!0}};function Nre(e){const t=NC(()=>iae(e));return rt({type:Ze(zre),compatibilityDate:Ze(Vre),id:ro.annotations({description:"字段唯一标识;布局通过该 id 引用字段"}),displayName:ne(St.annotations({title:"内部名称",description:"仅在编辑器内可见的区域名,用于在侧边栏和布局编辑器中识别该折叠区域;运行时不展示"})),header:lt.annotations({title:"标题",description:"折叠区域的标题,渲染为行内 Markdown。支持 `{{ 表达式 }}` 插值,表达式为 CEL,可访问 `form`(当前表单状态)以及当前作用域内的其他变量"}),defaultCollapsed:ne(Ir.annotations({title:"默认折叠",description:"挂载时是否默认折叠;用户点击展开/收起后即时生效,**不**持久化(卸载即丢弃)"})),unit:t.annotations({identifier:"FormFieldCollapsibleUnit",title:"区域内容",description:"折叠区域内的字段与布局;这些字段在表单状态中保持扁平,不会因为分组而引入新的状态层级"})}).annotations({title:"CollapsibleField",description:"带 Markdown 标题的可折叠区域,仅用于视觉分组,不影响字段在表单状态中的层级"})}function Ect(){return{header:[{locale:"zh",message:""}],unit:{fields:[],layouts:[{name:"默认",layout:{columns:1,placements:{}}}]}}}const Dct=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Vre,defaults:Ect,metadata:Tct,schema:Nre,type:zre},Symbol.toStringTag,{value:"Module"})),Lre="com.shwfed.form.field.tree.multi",Bre="2026-05-23",Oct={name:"树(多选)",icon:"fluent:tree-evergreen-20-regular",w:{initial:8,min:4,max:1/0},h:{initial:8,min:4,max:1/0,grow:!0}};function Ure(e){const t=Dt({configure:e,resultType:"bool"}),n=u=>{e(u),u.registerVariable("node","dyn",{description:"当前节点;由 `数据` 表达式返回的每一项"})},o=Dt({configure:n,resultType:u=>u==="string"||u==="number"||u==="dyn"}),r=Dt({configure:n,resultType:u=>u==="dyn"||u.startsWith("list")||u.startsWith("optional")}),a=Dt({configure:n,resultType:"bool"}),i=$d({configure:n}),l=Dt({configure:n,resultType:u=>u==="dyn"||u.startsWith("list")||u.startsWith("optional")});return rt({type:Ze(Lre),compatibilityDate:Ze(Bre),...hr(e),label:ne(lt.annotations({title:"标签",description:"字段前展示的文本;留空则不渲染标签"})),tooltip:ne(lt.annotations({title:"提示",description:"鼠标悬停在标签上时展示的说明"})),binding:ne(St.pipe(xn(1)).annotations({title:"绑定路径",description:"写入表单状态的 `dot-prop` 路径;写入值为已勾选节点 ID 的数组;留空则为非受控字段"})),disabled:ne(t.annotations({title:"禁用条件",description:"返回 `true` 时仍渲染但不可勾选"})),readonly:ne(t.annotations({title:"只读条件",description:"返回 `true` 时仅以纯文本展示当前已勾选节点的标签"})),derived:pa(e,"dyn"),dataSource:P$(e).annotations({title:"数据源",description:"返回完整树(根节点列表)的数据源;树通过 `节点子级` 表达式逐层向下读取子级"}),nodeKey:o.annotations({title:"节点 ID",description:"为每个节点计算稳定唯一 ID 的 CEL 表达式,可访问 `node`;运行时以字符串形式存储"}),nodeChildren:r.annotations({title:"节点子级",description:"返回当前节点的子级列表的 CEL 表达式;返回 `none` / `null` 视为叶子节点"}),nodeLabel:i.annotations({title:"节点标签",description:"节点展示的本地化文本,支持 Markdown 与 `{{ node.foo }}` / `{{ form.foo }}` 插值"}),nodeTooltip:ne(i.annotations({title:"节点提示",description:"鼠标悬停在节点上时展示的本地化提示,支持 Markdown 与插值"})),nodeSelectable:ne(a.annotations({title:"节点可选条件",description:"返回 `true` 表示该节点可被勾选;级联选择仍尊重该条件"})),cascade:vo(Ze("independent","cascade-down","cascade-both"),{default:()=>"cascade-both"}).annotations({title:"级联模式",description:"`独立`:仅勾选当前节点;`向下级联`:勾选父节点同时勾选所有可选后代;`双向级联`:在向下级联基础上,父节点反映后代勾选状态(部分选中显示为半选)"}),expandAll:vo(Ir,{default:()=>!1}).annotations({title:"默认全部展开",description:"开启后挂载时展开所有非叶子节点"}),filter:ne(rt({enabled:Ir.annotations({title:"启用",description:"是否在树上方显示搜索输入框"}),label:ne(lt.annotations({title:"标签",description:"搜索输入框的浮动标签;留空则使用默认值「搜索」"})),keywords:ne(l.annotations({title:"额外关键词",description:"返回字符串列表的 CEL 表达式,可访问 `node`;匹配规则为「节点标签 或 任一关键词」包含搜索词(不区分大小写)"}))}).annotations({title:"过滤",description:"客户端过滤;过滤不会影响已选中的节点 ID"}))}).annotations({title:"TreeMultiField",description:"基于树形数据的多选输入"})}function Act(){return{dataSource:{data:"[]"},nodeKey:"string(node.id)",nodeChildren:"has(node.children) ? node.children : null",nodeLabel:[{locale:"zh",message:"{{ node.label }}"}],cascade:"cascade-both",expandAll:!1}}const Ict=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Bre,defaults:Act,metadata:Oct,schema:Ure,type:Lre},Symbol.toStringTag,{value:"Module"})),qre="com.shwfed.form.field.month",jre="2026-05-24",Pct={name:"月份",icon:"fluent:calendar-month-20-regular",w:{initial:8,min:4,max:1/0},h:{initial:2,min:2,max:2}};function f4(e){const t=Dt({configure:e,resultType:"Date"});return rt({id:ro.annotations({description:"预设唯一标识,用于稳定的 v-for key"}),label:lt.annotations({title:"标签",description:"快捷选项展示的本地化文本"}),value:t.annotations({title:"值",description:'点击该预设时计算出的月份,例如 `now().offset(-1, "months")`'})}).annotations({title:"MonthFieldPreset"})}function Hre(e){const t=Dt({configure:e,resultType:"bool"}),n=f4(e);return rt({type:Ze(qre),compatibilityDate:Ze(jre),...hr(e),label:ne(lt.annotations({title:"标签",description:"字段前展示的文本;留空则不渲染标签"})),placeholder:ne(lt.annotations({title:"占位符",description:"未选中月份时输入框中的占位文本"})),tooltip:ne(lt.annotations({title:"提示",description:"鼠标悬停在标签上时展示的说明"})),orientation:ne(Oi),binding:ne(St.pipe(xn(1)).annotations({title:"绑定路径",description:"写入表单状态的 `dot-prop` 路径,例如 `user.joinMonth`;留空则为非受控字段"})),disabled:ne(t.annotations({title:"禁用条件",description:"返回 `true` 时输入框仍然渲染但不可编辑"})),readonly:ne(t.annotations({title:"只读条件",description:"返回 `true` 时仅以纯文本展示当前值"})),derived:pa(e,"string"),format:ne(St.pipe(xn(1)).annotations({title:"展示格式",description:"输入框中展示月份的 `date-fns` 格式串;留空时使用默认 `yyyy-MM`"})),valueFormat:ne(St.pipe(xn(1)).annotations({title:"存储格式",description:"写入表单状态的 `date-fns` 格式串;留空时使用默认 `yyyy-MM`"})),presets:ne(go(n).annotations({title:"快捷选项",description:"在选择器侧栏展示的快捷预设;留空则不渲染侧栏"}))}).annotations({title:"MonthField",description:"月份选择输入"})}const Mct=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:jre,metadata:Pct,presetSchema:f4,schema:Hre,type:qre},Symbol.toStringTag,{value:"Module"})),Wre="com.shwfed.form.field.monthrange",Gre="2026-05-24",bA=St.pipe(xn(1)),Rct=Kf(bA,bA).pipe(pr(([e,t])=>e!==t,{message:()=>"起始与结束绑定路径不能相同"})),Fct=Jr(bA,Rct).annotations({title:"绑定路径",description:"写入表单状态的 `dot-prop` 路径;填写单个路径时写入 `[start, end]` 字符串数组,例如 `event.months`;填写 `[起始路径, 结束路径]` 元组时分别写入两端;留空则为非受控字段"}),zct={name:"月份范围",icon:"fluent:calendar-arrow-right-20-regular",w:{initial:10,min:10,max:1/0},h:{initial:2,min:2,max:2}};function p4(e){const t=Dt({configure:e,resultType:"Date"});return rt({id:ro.annotations({description:"预设唯一标识,用于稳定的 v-for key"}),label:lt.annotations({title:"标签",description:"快捷选项展示的本地化文本"}),start:t.annotations({title:"起始值",description:'点击该预设时计算出的起始月份,例如 `now.offset(-3, "months")`'}),end:t.annotations({title:"结束值",description:"点击该预设时计算出的结束月份,例如 `now`"})}).annotations({title:"MonthRangeFieldPreset"})}function Kre(e){const t=Dt({configure:e,resultType:"bool"}),n=p4(e);return rt({type:Ze(Wre),compatibilityDate:Ze(Gre),...hr(e),label:ne(lt.annotations({title:"标签",description:"字段前展示的文本;留空则不渲染标签"})),startPlaceholder:ne(lt.annotations({title:"起始占位符",description:"未选中起始月份时输入框中的占位文本"})),endPlaceholder:ne(lt.annotations({title:"结束占位符",description:"未选中结束月份时输入框中的占位文本"})),tooltip:ne(lt.annotations({title:"提示",description:"鼠标悬停在标签上时展示的说明"})),orientation:ne(Oi),binding:ne(Fct),disabled:ne(t.annotations({title:"禁用条件",description:"返回 `true` 时输入框仍然渲染但不可编辑"})),readonly:ne(t.annotations({title:"只读条件",description:"返回 `true` 时仅以纯文本展示当前值"})),derived:pa(e,"dyn"),format:ne(St.pipe(xn(1)).annotations({title:"展示格式",description:"输入框中展示月份的 `date-fns` 格式串;留空时使用默认 `yyyy-MM`"})),valueFormat:ne(St.pipe(xn(1)).annotations({title:"存储格式",description:"写入表单状态的 `date-fns` 格式串;留空时使用默认 `yyyy-MM`"})),rangeSeparatorIcon:ne(St.pipe(xn(1)).annotations({title:"范围分隔图标",description:"范围两端之间分隔图标的 Iconify 名称"})),presets:ne(go(n).annotations({title:"快捷选项",description:"在选择器底部展示的快捷预设;留空则不渲染"}))}).annotations({title:"MonthRangeField",description:"月份范围选择输入"})}function Vct(){return{rangeSeparatorIcon:"fluent:arrow-right-20-regular"}}const Nct=Object.freeze(Object.defineProperty({__proto__:null,compatibilityDate:Gre,defaults:Vct,metadata:zct,presetSchema:p4,schema:Kre,type:Wre},Symbol.toStringTag,{value:"Module"})),Lct={class:"flex flex-col gap-3"},Bct=q({name:"ShwfedMarkdownFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=une(()=>{}),o=a=>Ln(n,a)??a,r=a=>Bn(n,a);return(a,i)=>(k(),L("div",Lct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户协议说明","onUpdate:modelValue":i[0]||(i[0]=l=>{const u=String(l??"");t.value={...t.value,displayName:u.length>0?u:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("content")),1)]),_:2},[r("content")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("content"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.content,multiline:"",markdown:"","onUpdate:modelValue":i[1]||(i[1]=l=>t.value={...t.value,content:l})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":i[2]||(i[2]=l=>t.value={...t.value,hidden:l.length>0?l:void 0})},null,8,["model-value"])]),_:1})]))}}),Uct={class:"flex flex-col gap-3"},qct={class:"grid grid-cols-2 gap-3"},jct={class:"grid grid-cols-3 gap-3"},Hct={class:"grid grid-cols-3 gap-3"},Wct={class:"grid grid-cols-3 gap-3"},Gct=q({name:"ShwfedTextFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=fne(()=>{}),o=i=>Ln(n,i)??i,r=i=>Bn(n,i),a=E({get:()=>t.value.binding??"",set:i=>{const l=i.trim();if(l.length===0){const{binding:u,...d}=t.value;t.value=d}else t.value={...t.value,binding:l}}});return(i,l)=>(k(),L("div",Uct,[H("div",qct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:登录用户名","onUpdate:modelValue":l[0]||(l[0]=u=>{const d=String(u??"");t.value={...t.value,displayName:d.length>0?d:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.name`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=u=>a.value=u),placeholder:"例:user.name",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",jct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":l[2]||(l[2]=u=>t.value={...t.value,label:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":l[3]||(l[3]=u=>t.value={...t.value,placeholder:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":l[4]||(l[4]=u=>t.value={...t.value,tooltip:u})},null,8,["model-value"])]),_:1})]),H("div",Hct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":l[5]||(l[5]=u=>t.value={...t.value,orientation:u})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),u=>(k(),M(s(Xn),{key:u.value,value:u.value},{default:f(()=>[P(O(u.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Wct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[6]||(l[6]=u=>t.value={...t.value,hidden:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[7]||(l[7]=u=>t.value={...t.value,disabled:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[8]||(l[8]=u=>t.value={...t.value,readonly:u.length>0?u:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.firstName + ' ' + form.lastName","onUpdate:modelValue":l[9]||(l[9]=u=>t.value={...t.value,derived:u})},null,8,["model-value"])]),_:1})]))}}),Kct={class:"flex flex-col gap-3"},Yct={class:"grid grid-cols-2 gap-3"},Jct={class:"grid grid-cols-3 gap-3"},Xct={class:"grid grid-cols-3 gap-3"},Zct={class:"grid grid-cols-3 gap-3"},Qct=q({name:"ShwfedTextareaFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=hne(()=>{}),o=l=>Ln(n,l)??l,r=l=>Bn(n,l),a=E({get:()=>t.value.binding??"",set:l=>{const u=l.trim();if(u.length===0){const{binding:d,...p}=t.value;t.value=p}else t.value={...t.value,binding:u}}}),i=E({get:()=>t.value.rows!=null?String(t.value.rows):"",set:l=>{const u=String(l??"").trim();if(u.length===0){t.value={...t.value,rows:void 0};return}const d=Number(u);if(!Number.isFinite(d)||!Number.isInteger(d)||d<=0){t.value={...t.value,rows:void 0};return}t.value={...t.value,rows:d}}});return(l,u)=>(k(),L("div",Kct,[H("div",Yct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:个人简介","onUpdate:modelValue":u[0]||(u[0]=d=>{const p=String(d??"");t.value={...t.value,displayName:p.length>0?p:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.bio`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":u[1]||(u[1]=d=>a.value=d),placeholder:"例:user.bio",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Jct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":u[2]||(u[2]=d=>t.value={...t.value,label:d})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":u[3]||(u[3]=d=>t.value={...t.value,placeholder:d})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":u[4]||(u[4]=d=>t.value={...t.value,tooltip:d})},null,8,["model-value"])]),_:1})]),H("div",Xct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":u[5]||(u[5]=d=>t.value={...t.value,orientation:d})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),d=>(k(),M(s(Xn),{key:d.value,value:d.value},{default:f(()=>[P(O(d.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("rows")),1)]),_:2},[r("rows")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("rows"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":u[6]||(u[6]=d=>i.value=d),type:"number",min:"1",step:"1",placeholder:"例:4"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Zct,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[7]||(u[7]=d=>t.value={...t.value,hidden:d.length>0?d:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[8]||(u[8]=d=>t.value={...t.value,disabled:d.length>0?d:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[9]||(u[9]=d=>t.value={...t.value,readonly:d.length>0?d:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.summary","onUpdate:modelValue":u[10]||(u[10]=d=>t.value={...t.value,derived:d})},null,8,["model-value"])]),_:1})]))}}),n_=Symbol("shwfed.form.field-layout"),edt=q({name:"ShwfedActionsFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=yne(()=>{}),o=l=>Ln(n,l)??l,r=l=>Bn(n,l),a=Fn(n_,null);Pt(()=>{a&&(a.fullPane.value=!0)}),tr(()=>{a&&(a.fullPane.value=!1)});const i=E({get:()=>({kind:"shwfed.component.action",size:"default",gap:t.value.gap??4,style:t.value.style,groups:t.value.groups??[],items:t.value.items??[]}),set:l=>{const{gap:u,style:d,groups:p,items:m}=l,{style:h,...g}=t.value;t.value={...g,gap:u,groups:p,items:m,...d===void 0?{}:{style:d}}}});return(l,u)=>(k(),M(D$,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=d=>i.value=d)},{"general-extra":f(()=>[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:提交区按钮组","onUpdate:modelValue":u[0]||(u[0]=d=>{const p=String(d??"");t.value={...t.value,displayName:p.length>0?p:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":u[1]||(u[1]=d=>t.value={...t.value,hidden:d.length>0?d:void 0})},null,8,["model-value"])]),_:1})]),_:1},8,["modelValue"]))}}),tdt={class:"flex flex-col gap-3"},ndt={class:"grid grid-cols-2 gap-3"},odt={class:"grid grid-cols-3 gap-3"},rdt={class:"grid grid-cols-3 gap-3"},adt={class:"grid grid-cols-1 gap-3"},idt={class:"grid grid-cols-2 gap-3"},sdt={class:"grid grid-cols-3 gap-3"},ldt=q({name:"ShwfedComboboxSingleFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=xne(()=>{}),o=i=>Ln(n,i)??i,r=i=>Bn(n,i),a=E({get:()=>t.value.binding??"",set:i=>{const l=i.trim();if(l.length===0){const{binding:u,...d}=t.value;t.value=d}else t.value={...t.value,binding:l}}});return(i,l)=>(k(),L("div",tdt,[H("div",ndt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户角色","onUpdate:modelValue":l[0]||(l[0]=u=>{const d=String(u??"");t.value={...t.value,displayName:d.length>0?d:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.role`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=u=>a.value=u),placeholder:"例:user.role",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",odt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":l[2]||(l[2]=u=>t.value={...t.value,label:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":l[3]||(l[3]=u=>t.value={...t.value,placeholder:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":l[4]||(l[4]=u=>t.value={...t.value,tooltip:u})},null,8,["model-value"])]),_:1})]),H("div",rdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":l[5]||(l[5]=u=>t.value={...t.value,orientation:u})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),u=>(k(),M(s(Xn),{key:u.value,value:u.value},{default:f(()=>[P(O(u.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",adt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("options")??"返回选项数组的 CEL 表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("options")),1)]),_:1}),c(s(qe),{"model-value":t.value.options,placeholder:'例:[{"value": "a", "label": "A"}]',"result-type":"list",class:"min-h-10","onUpdate:modelValue":l[6]||(l[6]=u=>t.value={...t.value,options:u})},null,8,["model-value"])]),_:1})]),H("div",idt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("optionValue")??"从当前 `option` 提取写入绑定的值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("optionValue")),1)]),_:1}),c(s(qe),{"model-value":t.value.optionValue,placeholder:'例:option["value"]',"result-type":"dyn",class:"min-h-10","onUpdate:modelValue":l[7]||(l[7]=u=>t.value={...t.value,optionValue:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("optionLabel")??"每个选项展示的本地化文本,支持 `{{ string(option.foo) }}` 插值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("optionLabel")),1)]),_:1}),c(s(Ye),{"model-value":t.value.optionLabel,"onUpdate:modelValue":l[8]||(l[8]=u=>t.value={...t.value,optionLabel:u})},null,8,["model-value"])]),_:1})]),H("div",sdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[9]||(l[9]=u=>t.value={...t.value,hidden:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时下拉框仍然渲染但不可选择",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[10]||(l[10]=u=>t.value={...t.value,disabled:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[11]||(l[11]=u=>t.value={...t.value,readonly:u.length>0?u:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.category","onUpdate:modelValue":l[12]||(l[12]=u=>t.value={...t.value,derived:u})},null,8,["model-value"])]),_:1})]))}}),udt={class:"flex flex-col gap-3"},cdt={class:"grid grid-cols-2 gap-3"},ddt={class:"grid grid-cols-3 gap-3"},fdt={class:"grid grid-cols-3 gap-3"},pdt={class:"grid grid-cols-3 gap-3"},mdt={class:"flex flex-col gap-3"},hdt={class:"grid grid-cols-3 gap-3"},gdt=q({name:"ShwfedDateFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=kne(()=>{}),o=$=>Ln(n,$)??$,r=$=>Bn(n,$),a=GR(()=>{}),i=$=>Ln(a,$)??$,l=$=>Bn(a,$),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,$=>{const T=Math.random()*16|0;return($==="x"?T:T&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],value:""}}function m($,T){const D=[...t.value.presets??[]],A=D[$];A&&(D[$]={...A,...T},t.value={...t.value,presets:D})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g($){const T=[...t.value.presets??[]];T.splice($,1),t.value={...t.value,presets:T}}function v($,T){m($,{label:T})}function b($,T){m($,{value:T})}const x=E({get:()=>t.value.binding??"",set:$=>{const T=$.trim();if(T.length===0){const{binding:D,...A}=t.value;t.value=A}else t.value={...t.value,binding:T}}}),y=E({get:()=>t.value.format??"",set:$=>{const T=$.trim();if(T.length===0){const{format:D,...A}=t.value;t.value=A}else t.value={...t.value,format:T}}}),_=E({get:()=>t.value.valueFormat??"",set:$=>{const T=$.trim();if(T.length===0){const{valueFormat:D,...A}=t.value;t.value=A}else t.value={...t.value,valueFormat:T}}});function w($){if(!$)return"";try{return ir(new Date,$)}catch{return"(无效格式)"}}const S=E(()=>w(t.value.format??"")),C=E(()=>w(t.value.valueFormat??""));return($,T)=>(k(),L("div",udt,[H("div",cdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:生日","onUpdate:modelValue":T[0]||(T[0]=D=>{const A=String(D??"");t.value={...t.value,displayName:A.length>0?A:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.birthday`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:x.value,"onUpdate:modelValue":T[1]||(T[1]=D=>x.value=D),placeholder:"例:user.birthday",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",ddt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":T[2]||(T[2]=D=>t.value={...t.value,label:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":T[3]||(T[3]=D=>t.value={...t.value,placeholder:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":T[4]||(T[4]=D=>t.value={...t.value,tooltip:D})},null,8,["model-value"])]),_:1})]),H("div",fdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示日期的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:y.value,"onUpdate:modelValue":T[5]||(T[5]=D=>y.value=D),placeholder:"例:yyyy-MM-dd",class:"font-mono"},null,8,["modelValue"]),S.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(S.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":T[6]||(T[6]=D=>_.value=D),placeholder:"例:yyyy-MM-dd",class:"font-mono"},null,8,["modelValue"]),C.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(C.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),H("div",pdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":T[7]||(T[7]=D=>t.value={...t.value,orientation:D})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),D=>(k(),M(s(Xn),{key:D.value,value:D.value},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",mdt,[(k(!0),L(Me,null,Ke(u.value,(D,A)=>(k(),L("div",{key:D.id,"data-slot":"date-field-preset",class:"relative pt-8 grid grid-cols-2 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"date-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:I=>g(A)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"date field preset label","model-value":D.label,"onUpdate:modelValue":I=>v(A,I)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":D.value,placeholder:'例:now.offset(-7, "days")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":I=>b(A,I)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"date-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),T[12]||(T[12]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",hdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[8]||(T[8]=D=>t.value={...t.value,hidden:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[9]||(T[9]=D=>t.value={...t.value,disabled:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[10]||(T[10]=D=>t.value={...t.value,readonly:D.length>0?D:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.startDate","onUpdate:modelValue":T[11]||(T[11]=D=>t.value={...t.value,derived:D})},null,8,["model-value"])]),_:1})]))}}),vdt={class:"flex flex-col gap-3"},ydt={class:"grid grid-cols-2 gap-3"},bdt={key:1,class:"grid grid-cols-2 gap-2"},_dt={class:"grid grid-cols-2 gap-3"},xdt={class:"grid grid-cols-2 gap-3"},wdt={class:"grid grid-cols-3 gap-3"},Sdt={class:"grid grid-cols-3 gap-3"},kdt={class:"flex flex-col gap-3"},Cdt={class:"grid grid-cols-3 gap-3"},$dt=q({name:"ShwfedDateRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Tne(()=>{}),o=R=>Ln(n,R)??R,r=R=>Bn(n,R),a=KR(()=>{}),i=R=>Ln(a,R)??R,l=R=>Bn(a,R),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,R=>{const G=Math.random()*16|0;return(R==="x"?G:G&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],start:"",end:""}}function m(R,G){const Z=[...t.value.presets??[]],Y=Z[R];Y&&(Z[R]={...Y,...G},t.value={...t.value,presets:Z})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g(R){const G=[...t.value.presets??[]];G.splice(R,1),t.value={...t.value,presets:G}}function v(R,G){m(R,{label:G})}function b(R,G){m(R,{start:G})}function x(R,G){m(R,{end:G})}const y=E(()=>Array.isArray(t.value.binding)?"split":"single"),_=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:R=>{const G=R.trim();if(G.length===0){const{binding:Z,...Y}=t.value;t.value=Y}else t.value={...t.value,binding:G}}}),w=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),S=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function C(R){const G=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[R.trim(),G[1]]}}function $(R){const G=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[G[0],R.trim()]}}function T(){if(y.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:R,...G}=t.value;t.value=G}}const D=E({get:()=>t.value.format??"",set:R=>{const G=R.trim();if(G.length===0){const{format:Z,...Y}=t.value;t.value=Y}else t.value={...t.value,format:G}}}),A=E({get:()=>t.value.valueFormat??"",set:R=>{const G=R.trim();if(G.length===0){const{valueFormat:Z,...Y}=t.value;t.value=Y}else t.value={...t.value,valueFormat:G}}});function I(R){const G=R.trim();if(G.length===0){const{rangeSeparatorIcon:Z,...Y}=t.value;t.value=Y}else t.value={...t.value,rangeSeparatorIcon:G}}function U(R){if(R==null||!Number.isInteger(R)||R<=0){const{numberOfMonths:G,...Z}=t.value;t.value=Z;return}t.value={...t.value,numberOfMonths:R}}function j(R){if(!R)return"";try{return ir(new Date,R)}catch{return"(无效格式)"}}const Q=E(()=>j(t.value.format??"")),F=E(()=>j(t.value.valueFormat??""));return(R,G)=>(k(),L("div",vdt,[H("div",ydt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:日期范围","onUpdate:modelValue":G[0]||(G[0]=Z=>{const Y=String(Z??"");t.value={...t.value,displayName:Y.length>0?Y:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 字符串数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),y.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":G[1]||(G[1]=Z=>_.value=Z),placeholder:"例:event.range",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",bdt,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...G[15]||(G[15]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":w.value,placeholder:"例:event.start",class:"font-mono","onUpdate:modelValue":G[2]||(G[2]=Z=>C(String(Z??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...G[16]||(G[16]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":S.value,placeholder:"例:event.end",class:"font-mono","onUpdate:modelValue":G[3]||(G[3]=Z=>$(String(Z??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",_dt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":G[4]||(G[4]=Z=>t.value={...t.value,label:Z})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":G[5]||(G[5]=Z=>t.value={...t.value,tooltip:Z})},null,8,["model-value"])]),_:1})]),H("div",xdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("startPlaceholder")),1)]),_:2},[r("startPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("startPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.startPlaceholder,"onUpdate:modelValue":G[6]||(G[6]=Z=>t.value={...t.value,startPlaceholder:Z})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("endPlaceholder")),1)]),_:2},[r("endPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("endPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.endPlaceholder,"onUpdate:modelValue":G[7]||(G[7]=Z=>t.value={...t.value,endPlaceholder:Z})},null,8,["model-value"])]),_:1})]),H("div",wdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示日期的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:D.value,"onUpdate:modelValue":G[8]||(G[8]=Z=>D.value=Z),placeholder:"例:yyyy-MM-dd",class:"font-mono"},null,8,["modelValue"]),Q.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(Q.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:A.value,"onUpdate:modelValue":G[9]||(G[9]=Z=>A.value=Z),placeholder:"例:yyyy-MM-dd",class:"font-mono"},null,8,["modelValue"]),F.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(F.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),H("div",Sdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":G[10]||(G[10]=Z=>t.value={...t.value,orientation:Z})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),Z=>(k(),M(s(Xn),{key:Z.value,value:Z.value},{default:f(()=>[P(O(Z.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":I},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("numberOfMonths")??"日历面板中并排显示的月份数",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("numberOfMonths")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.numberOfMonths,min:1,step:1,"onUpdate:modelValue":U},null,8,["model-value"])]),_:1})]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",kdt,[(k(!0),L(Me,null,Ke(u.value,(Z,Y)=>(k(),L("div",{key:Z.id,"data-slot":"daterange-field-preset",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"daterange-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:he=>g(Y)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"date range field preset label","model-value":Z.label,"onUpdate:modelValue":he=>v(Y,he)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("start")),1)]),_:2},[l("start")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("start"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":Z.start,placeholder:'例:now.offset(-7, "days")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":he=>b(Y,he)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("end")),1)]),_:2},[l("end")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("end"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":Z.end,placeholder:"例:now","result-type":"Date",class:"min-h-10","onUpdate:modelValue":he=>x(Y,he)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"daterange-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),G[17]||(G[17]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",Cdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":G[11]||(G[11]=Z=>t.value={...t.value,hidden:Z.length>0?Z:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":G[12]||(G[12]=Z=>t.value={...t.value,disabled:Z.length>0?Z:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":G[13]||(G[13]=Z=>t.value={...t.value,readonly:Z.length>0?Z:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.from, form.to]","onUpdate:modelValue":G[14]||(G[14]=Z=>t.value={...t.value,derived:Z})},null,8,["model-value"])]),_:1})]))}}),Tdt={class:"flex flex-col gap-3"},Edt={class:"grid grid-cols-2 gap-3"},Ddt={class:"grid grid-cols-3 gap-3"},Odt={class:"grid grid-cols-3 gap-3"},Adt={class:"flex flex-col gap-3"},Idt={class:"grid grid-cols-3 gap-3"},Pdt={class:"grid grid-cols-3 gap-3"},Mdt=q({name:"ShwfedDateTimeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Pne(()=>{}),o=D=>Ln(n,D)??D,r=D=>Bn(n,D),a=YR(()=>{}),i=D=>Ln(a,D)??D,l=D=>Bn(a,D),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,D=>{const A=Math.random()*16|0;return(D==="x"?A:A&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],value:""}}function m(D,A){const I=[...t.value.presets??[]],U=I[D];U&&(I[D]={...U,...A},t.value={...t.value,presets:I})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g(D){const A=[...t.value.presets??[]];A.splice(D,1),t.value={...t.value,presets:A}}function v(D,A){m(D,{label:A})}function b(D,A){m(D,{value:A})}const x=E({get:()=>t.value.binding??"",set:D=>{const A=D.trim();if(A.length===0){const{binding:I,...U}=t.value;t.value=U}else t.value={...t.value,binding:A}}}),y=E({get:()=>t.value.format??"",set:D=>{const A=D.trim();if(A.length===0){const{format:I,...U}=t.value;t.value=U}else t.value={...t.value,format:A}}}),_=E({get:()=>t.value.valueFormat??"",set:D=>{const A=D.trim();if(A.length===0){const{valueFormat:I,...U}=t.value;t.value=U}else t.value={...t.value,valueFormat:A}}}),w=E({get:()=>t.value.timeGranularity??"second",set:D=>{if(D==="second"){const{timeGranularity:A,...I}=t.value;t.value=I}else t.value={...t.value,timeGranularity:D}}}),S=E({get:()=>t.value.hourCycle??24,set:D=>{if(D===24){const{hourCycle:A,...I}=t.value;t.value=I}else t.value={...t.value,hourCycle:D}}});function C(D){if(!D)return"";try{return ir(new Date,D)}catch{return"(无效格式)"}}const $=E(()=>C(t.value.format??"")),T=E(()=>C(t.value.valueFormat??""));return(D,A)=>(k(),L("div",Tdt,[H("div",Edt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:开始时间","onUpdate:modelValue":A[0]||(A[0]=I=>{const U=String(I??"");t.value={...t.value,displayName:U.length>0?U:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `event.startAt`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:x.value,"onUpdate:modelValue":A[1]||(A[1]=I=>x.value=I),placeholder:"例:event.startAt",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Ddt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":A[2]||(A[2]=I=>t.value={...t.value,label:I})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":A[3]||(A[3]=I=>t.value={...t.value,placeholder:I})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":A[4]||(A[4]=I=>t.value={...t.value,tooltip:I})},null,8,["model-value"])]),_:1})]),H("div",Odt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示日期时间的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:y.value,"onUpdate:modelValue":A[5]||(A[5]=I=>y.value=I),placeholder:"例:yyyy-MM-dd HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),$.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O($.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":A[6]||(A[6]=I=>_.value=I),placeholder:"例:yyyy-MM-dd HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),T.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(T.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",Adt,[(k(!0),L(Me,null,Ke(u.value,(I,U)=>(k(),L("div",{key:I.id,"data-slot":"datetime-field-preset",class:"relative pt-8 grid grid-cols-2 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"datetime-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:j=>g(U)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"datetime field preset label","model-value":I.label,"onUpdate:modelValue":j=>v(U,j)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":I.value,placeholder:'例:now.offset(-1, "hours")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":j=>b(U,j)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"datetime-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),A[14]||(A[14]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",Idt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":A[7]||(A[7]=I=>t.value={...t.value,orientation:I})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),I=>(k(),M(s(Xn),{key:I.value,value:I.value},{default:f(()=>[P(O(I.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("timeGranularity")??"可编辑到的最小时间单位",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("timeGranularity")),1)]),_:1}),c(s(Yn),{"model-value":w.value,"onUpdate:modelValue":A[8]||(A[8]=I=>w.value=I)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Ane),I=>(k(),M(s(Xn),{key:I.value,value:I.value},{default:f(()=>[P(O(I.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hourCycle")??"12 小时制或 24 小时制",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hourCycle")),1)]),_:1}),c(s(Yn),{"model-value":String(S.value),"onUpdate:modelValue":A[9]||(A[9]=I=>S.value=Number(I))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Ine),I=>(k(),M(s(Xn),{key:I.value,value:String(I.value)},{default:f(()=>[P(O(I.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Pdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":A[10]||(A[10]=I=>t.value={...t.value,hidden:I.length>0?I:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":A[11]||(A[11]=I=>t.value={...t.value,disabled:I.length>0?I:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":A[12]||(A[12]=I=>t.value={...t.value,readonly:I.length>0?I:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.createdAt","onUpdate:modelValue":A[13]||(A[13]=I=>t.value={...t.value,derived:I})},null,8,["model-value"])]),_:1})]))}}),Rdt={class:"flex flex-col gap-3"},Fdt={class:"grid grid-cols-2 gap-3"},zdt={key:1,class:"grid grid-cols-2 gap-2"},Vdt={class:"grid grid-cols-2 gap-3"},Ndt={class:"grid grid-cols-2 gap-3"},Ldt={class:"grid grid-cols-3 gap-3"},Bdt={class:"flex flex-col gap-3"},Udt={class:"grid grid-cols-3 gap-3"},qdt={class:"grid grid-cols-2 gap-3"},jdt={class:"grid grid-cols-3 gap-3"},Hdt=q({name:"ShwfedDateTimeRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Nne(()=>{}),o=Z=>Ln(n,Z)??Z,r=Z=>Bn(n,Z),a=JR(()=>{}),i=Z=>Ln(a,Z)??Z,l=Z=>Bn(a,Z),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,Z=>{const Y=Math.random()*16|0;return(Z==="x"?Y:Y&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],start:"",end:""}}function m(Z,Y){const he=[...t.value.presets??[]],ue=he[Z];ue&&(he[Z]={...ue,...Y},t.value={...t.value,presets:he})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g(Z){const Y=[...t.value.presets??[]];Y.splice(Z,1),t.value={...t.value,presets:Y}}function v(Z,Y){m(Z,{label:Y})}function b(Z,Y){m(Z,{start:Y})}function x(Z,Y){m(Z,{end:Y})}const y=E(()=>Array.isArray(t.value.binding)?"split":"single"),_=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:Z=>{const Y=Z.trim();if(Y.length===0){const{binding:he,...ue}=t.value;t.value=ue}else t.value={...t.value,binding:Y}}}),w=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),S=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function C(Z){const Y=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[Z.trim(),Y[1]]}}function $(Z){const Y=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[Y[0],Z.trim()]}}function T(){if(y.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:Z,...Y}=t.value;t.value=Y}}const D=E({get:()=>t.value.format??"",set:Z=>{const Y=Z.trim();if(Y.length===0){const{format:he,...ue}=t.value;t.value=ue}else t.value={...t.value,format:Y}}}),A=E({get:()=>t.value.valueFormat??"",set:Z=>{const Y=Z.trim();if(Y.length===0){const{valueFormat:he,...ue}=t.value;t.value=ue}else t.value={...t.value,valueFormat:Y}}});function I(Z){const Y=Z.trim();if(Y.length===0){const{rangeSeparatorIcon:he,...ue}=t.value;t.value=ue}else t.value={...t.value,rangeSeparatorIcon:Y}}function U(Z){if(Z==null||!Number.isInteger(Z)||Z<=0){const{numberOfMonths:Y,...he}=t.value;t.value=he;return}t.value={...t.value,numberOfMonths:Z}}const j=E({get:()=>t.value.timeGranularity??"second",set:Z=>{if(Z==="second"){const{timeGranularity:Y,...he}=t.value;t.value=he}else t.value={...t.value,timeGranularity:Z}}}),Q=E({get:()=>t.value.hourCycle??24,set:Z=>{if(Z===24){const{hourCycle:Y,...he}=t.value;t.value=he}else t.value={...t.value,hourCycle:Z}}});function F(Z){if(!Z)return"";try{return ir(new Date,Z)}catch{return"(无效格式)"}}const R=E(()=>F(t.value.format??"")),G=E(()=>F(t.value.valueFormat??""));return(Z,Y)=>(k(),L("div",Rdt,[H("div",Fdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:事件区间","onUpdate:modelValue":Y[0]||(Y[0]=he=>{const ue=String(he??"");t.value={...t.value,displayName:ue.length>0?ue:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 字符串数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),y.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":Y[1]||(Y[1]=he=>_.value=he),placeholder:"例:event.range",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",zdt,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...Y[17]||(Y[17]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":w.value,placeholder:"例:event.start",class:"font-mono","onUpdate:modelValue":Y[2]||(Y[2]=he=>C(String(he??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...Y[18]||(Y[18]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":S.value,placeholder:"例:event.end",class:"font-mono","onUpdate:modelValue":Y[3]||(Y[3]=he=>$(String(he??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",Vdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":Y[4]||(Y[4]=he=>t.value={...t.value,label:he})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":Y[5]||(Y[5]=he=>t.value={...t.value,tooltip:he})},null,8,["model-value"])]),_:1})]),H("div",Ndt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("startPlaceholder")),1)]),_:2},[r("startPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("startPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.startPlaceholder,"onUpdate:modelValue":Y[6]||(Y[6]=he=>t.value={...t.value,startPlaceholder:he})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("endPlaceholder")),1)]),_:2},[r("endPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("endPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.endPlaceholder,"onUpdate:modelValue":Y[7]||(Y[7]=he=>t.value={...t.value,endPlaceholder:he})},null,8,["model-value"])]),_:1})]),H("div",Ldt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示日期时间的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:D.value,"onUpdate:modelValue":Y[8]||(Y[8]=he=>D.value=he),placeholder:"例:yyyy-MM-dd HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),R.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(R.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:A.value,"onUpdate:modelValue":Y[9]||(Y[9]=he=>A.value=he),placeholder:"例:yyyy-MM-dd HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),G.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(G.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",Bdt,[(k(!0),L(Me,null,Ke(u.value,(he,ue)=>(k(),L("div",{key:he.id,"data-slot":"datetimerange-field-preset",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"datetimerange-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:pe=>g(ue)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"datetime range field preset label","model-value":he.label,"onUpdate:modelValue":pe=>v(ue,pe)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("start")),1)]),_:2},[l("start")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("start"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":he.start,placeholder:'例:now.offset(-1, "hours")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":pe=>b(ue,pe)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("end")),1)]),_:2},[l("end")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("end"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":he.end,placeholder:"例:now","result-type":"Date",class:"min-h-10","onUpdate:modelValue":pe=>x(ue,pe)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"datetimerange-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),Y[19]||(Y[19]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",Udt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":Y[10]||(Y[10]=he=>t.value={...t.value,orientation:he})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),he=>(k(),M(s(Xn),{key:he.value,value:he.value},{default:f(()=>[P(O(he.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":I},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("numberOfMonths")??"日历面板中并排显示的月份数",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("numberOfMonths")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.numberOfMonths,min:1,step:1,"onUpdate:modelValue":U},null,8,["model-value"])]),_:1})]),_:1})]),H("div",qdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("timeGranularity")??"可编辑到的最小时间单位",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("timeGranularity")),1)]),_:1}),c(s(Yn),{"model-value":j.value,"onUpdate:modelValue":Y[11]||(Y[11]=he=>j.value=he)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(zne),he=>(k(),M(s(Xn),{key:he.value,value:he.value},{default:f(()=>[P(O(he.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hourCycle")??"12 小时制或 24 小时制",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hourCycle")),1)]),_:1}),c(s(Yn),{"model-value":String(Q.value),"onUpdate:modelValue":Y[12]||(Y[12]=he=>Q.value=Number(he))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Vne),he=>(k(),M(s(Xn),{key:he.value,value:String(he.value)},{default:f(()=>[P(O(he.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",jdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":Y[13]||(Y[13]=he=>t.value={...t.value,hidden:he.length>0?he:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":Y[14]||(Y[14]=he=>t.value={...t.value,disabled:he.length>0?he:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":Y[15]||(Y[15]=he=>t.value={...t.value,readonly:he.length>0?he:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.from, form.to]","onUpdate:modelValue":Y[16]||(Y[16]=he=>t.value={...t.value,derived:he})},null,8,["model-value"])]),_:1})]))}}),Wdt={class:"flex flex-col gap-3"},Gdt={class:"grid grid-cols-2 gap-3"},Kdt={class:"grid grid-cols-2 gap-3"},Ydt={class:"grid grid-cols-3 gap-3"},Jdt={class:"grid grid-cols-2 gap-3"},Xdt={class:"grid grid-cols-3 gap-3"},Zdt=q({name:"ShwfedTimeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Hne(()=>{}),o=p=>Ln(n,p)??p,r=p=>Bn(n,p),a=E({get:()=>t.value.binding??"",set:p=>{const m=p.trim();if(m.length===0){const{binding:h,...g}=t.value;t.value=g}else t.value={...t.value,binding:m}}}),i=E({get:()=>t.value.valueFormat??"",set:p=>{const m=p.trim();if(m.length===0){const{valueFormat:h,...g}=t.value;t.value=g}else t.value={...t.value,valueFormat:m}}}),l=E({get:()=>t.value.timeGranularity??"second",set:p=>{if(p==="second"){const{timeGranularity:m,...h}=t.value;t.value=h}else t.value={...t.value,timeGranularity:p}}}),u=E({get:()=>t.value.hourCycle??24,set:p=>{if(p===24){const{hourCycle:m,...h}=t.value;t.value=h}else t.value={...t.value,hourCycle:p}}}),d=E(()=>{const p=t.value.valueFormat??"";if(!p)return"";try{return ir(new Date,p)}catch{return"(无效格式)"}});return(p,m)=>(k(),L("div",Wdt,[H("div",Gdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:开始时刻","onUpdate:modelValue":m[0]||(m[0]=h=>{const g=String(h??"");t.value={...t.value,displayName:g.length>0?g:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `meeting.startTime`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=h=>a.value=h),placeholder:"例:meeting.startTime",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Kdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":m[2]||(m[2]=h=>t.value={...t.value,label:h})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":m[3]||(m[3]=h=>t.value={...t.value,tooltip:h})},null,8,["model-value"])]),_:1})]),H("div",Ydt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":m[4]||(m[4]=h=>i.value=h),placeholder:"例:HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),d.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(d.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":m[5]||(m[5]=h=>t.value={...t.value,orientation:h})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),h=>(k(),M(s(Xn),{key:h.value,value:h.value},{default:f(()=>[P(O(h.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Jdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("timeGranularity")??"可编辑到的最小时间单位",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("timeGranularity")),1)]),_:1}),c(s(Yn),{"model-value":l.value,"onUpdate:modelValue":m[6]||(m[6]=h=>l.value=h)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(qne),h=>(k(),M(s(Xn),{key:h.value,value:h.value},{default:f(()=>[P(O(h.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hourCycle")??"12 小时制或 24 小时制",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hourCycle")),1)]),_:1}),c(s(Yn),{"model-value":String(u.value),"onUpdate:modelValue":m[7]||(m[7]=h=>u.value=Number(h))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(jne),h=>(k(),M(s(Xn),{key:h.value,value:String(h.value)},{default:f(()=>[P(O(h.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Xdt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":m[8]||(m[8]=h=>t.value={...t.value,hidden:h.length>0?h:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":m[9]||(m[9]=h=>t.value={...t.value,disabled:h.length>0?h:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":m[10]||(m[10]=h=>t.value={...t.value,readonly:h.length>0?h:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.startTime","onUpdate:modelValue":m[11]||(m[11]=h=>t.value={...t.value,derived:h})},null,8,["model-value"])]),_:1})]))}}),Qdt={class:"flex flex-col gap-3"},eft={class:"grid grid-cols-2 gap-3"},tft={key:1,class:"grid grid-cols-2 gap-2"},nft={class:"grid grid-cols-2 gap-3"},oft={class:"grid grid-cols-3 gap-3"},rft={class:"grid grid-cols-3 gap-3"},aft={class:"grid grid-cols-3 gap-3"},ift=q({name:"ShwfedTimeRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Xne(()=>{}),o=y=>Ln(n,y)??y,r=y=>Bn(n,y),a=E(()=>Array.isArray(t.value.binding)?"split":"single"),i=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:y=>{const _=y.trim();if(_.length===0){const{binding:w,...S}=t.value;t.value=S}else t.value={...t.value,binding:_}}}),l=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),u=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function d(y){const _=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[y.trim(),_[1]]}}function p(y){const _=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[_[0],y.trim()]}}function m(){if(a.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:y,..._}=t.value;t.value=_}}const h=E({get:()=>t.value.valueFormat??"",set:y=>{const _=y.trim();if(_.length===0){const{valueFormat:w,...S}=t.value;t.value=S}else t.value={...t.value,valueFormat:_}}});function g(y){const _=y.trim();if(_.length===0){const{rangeSeparatorIcon:w,...S}=t.value;t.value=S}else t.value={...t.value,rangeSeparatorIcon:_}}const v=E({get:()=>t.value.timeGranularity??"second",set:y=>{if(y==="second"){const{timeGranularity:_,...w}=t.value;t.value=w}else t.value={...t.value,timeGranularity:y}}}),b=E({get:()=>t.value.hourCycle??24,set:y=>{if(y===24){const{hourCycle:_,...w}=t.value;t.value=w}else t.value={...t.value,hourCycle:y}}}),x=E(()=>{const y=t.value.valueFormat??"";if(!y)return"";try{return ir(new Date,y)}catch{return"(无效格式)"}});return(y,_)=>(k(),L("div",Qdt,[H("div",eft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:会议时段","onUpdate:modelValue":_[0]||(_[0]=w=>{const S=String(w??"");t.value={...t.value,displayName:S.length>0?S:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 字符串数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),a.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":_[1]||(_[1]=w=>i.value=w),placeholder:"例:meeting.timeRange",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:m},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",tft,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[..._[14]||(_[14]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":l.value,placeholder:"例:meeting.startTime",class:"font-mono","onUpdate:modelValue":_[2]||(_[2]=w=>d(String(w??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[..._[15]||(_[15]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":u.value,placeholder:"例:meeting.endTime",class:"font-mono","onUpdate:modelValue":_[3]||(_[3]=w=>p(String(w??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:m},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",nft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":_[4]||(_[4]=w=>t.value={...t.value,label:w})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":_[5]||(_[5]=w=>t.value={...t.value,tooltip:w})},null,8,["model-value"])]),_:1})]),H("div",oft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:h.value,"onUpdate:modelValue":_[6]||(_[6]=w=>h.value=w),placeholder:"例:HH:mm:ss",class:"font-mono"},null,8,["modelValue"]),x.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(x.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":_[7]||(_[7]=w=>t.value={...t.value,orientation:w})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),w=>(k(),M(s(Xn),{key:w.value,value:w.value},{default:f(()=>[P(O(w.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",rft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":g},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("timeGranularity")??"可编辑到的最小时间单位",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("timeGranularity")),1)]),_:1}),c(s(Yn),{"model-value":v.value,"onUpdate:modelValue":_[8]||(_[8]=w=>v.value=w)},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Yne),w=>(k(),M(s(Xn),{key:w.value,value:w.value},{default:f(()=>[P(O(w.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hourCycle")??"12 小时制或 24 小时制",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hourCycle")),1)]),_:1}),c(s(Yn),{"model-value":String(b.value),"onUpdate:modelValue":_[9]||(_[9]=w=>b.value=Number(w))},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Jne),w=>(k(),M(s(Xn),{key:w.value,value:String(w.value)},{default:f(()=>[P(O(w.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",aft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":_[10]||(_[10]=w=>t.value={...t.value,hidden:w.length>0?w:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":_[11]||(_[11]=w=>t.value={...t.value,disabled:w.length>0?w:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":_[12]||(_[12]=w=>t.value={...t.value,readonly:w.length>0?w:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.from, form.to]","onUpdate:modelValue":_[13]||(_[13]=w=>t.value={...t.value,derived:w})},null,8,["model-value"])]),_:1})]))}}),sft={class:"flex flex-col gap-3"},lft={class:"grid grid-cols-2 gap-3"},uft={class:"grid grid-cols-3 gap-3"},cft={class:"grid grid-cols-3 gap-3"},dft={class:"grid grid-cols-2 gap-3"},fft={class:"grid grid-cols-3 gap-3"},pft=q({name:"ShwfedNumberFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=eoe(()=>{}),o=h=>Ln(n,h)??h,r=h=>Bn(n,h),a=[{value:"round",label:"四舍五入"},{value:"floor",label:"向下取整"},{value:"ceil",label:"向上取整"}],i=E({get:()=>t.value.binding??"",set:h=>{const g=h.trim();if(g.length===0){const{binding:v,...b}=t.value;t.value=b}else t.value={...t.value,binding:g}}}),l=E(()=>a.find(h=>h.value===(t.value.roundingMode??"round"))?.label);function u(h){if(h===void 0){const{precision:g,roundingMode:v,...b}=t.value;t.value=b}else t.value.roundingMode===void 0?t.value={...t.value,precision:h,roundingMode:"round"}:t.value={...t.value,precision:h}}function d(h){t.value={...t.value,roundingMode:h}}function p(h){if(h===void 0||!(h>0)){const{step:g,...v}=t.value;t.value=v}else t.value={...t.value,step:h}}function m(h){if(h)t.value={...t.value,valueAsString:!0};else{const{valueAsString:g,...v}=t.value;t.value=v}}return(h,g)=>(k(),L("div",sft,[H("div",lft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:年龄","onUpdate:modelValue":g[0]||(g[0]=v=>{const b=String(v??"");t.value={...t.value,displayName:b.length>0?b:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.age`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:i.value,"onUpdate:modelValue":g[1]||(g[1]=v=>i.value=v),placeholder:"例:user.age",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",uft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":g[2]||(g[2]=v=>t.value={...t.value,label:v})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":g[3]||(g[3]=v=>t.value={...t.value,placeholder:v})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":g[4]||(g[4]=v=>t.value={...t.value,tooltip:v})},null,8,["model-value"])]),_:1})]),H("div",cft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("precision")),1)]),_:2},[r("precision")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("precision"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.precision,min:0,"onUpdate:modelValue":u},null,8,["model-value"]),t.value.precision!==void 0?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"pr-1.5! text-xs"},{default:f(()=>[P(O(l.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[(k(),L(Me,null,Ke(a,v=>c(s(Vo),{key:v.value,onSelect:b=>d(v.value)},{default:f(()=>[P(O(v.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("step")),1)]),_:2},[r("step")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("step"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.step,min:0,"onUpdate:modelValue":p},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":g[5]||(g[5]=v=>t.value={...t.value,orientation:v})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),v=>(k(),M(s(Xn),{key:v.value,value:v.value},{default:f(()=>[P(O(v.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("valueAsString")),1)]),_:2},[r("valueAsString")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("valueAsString"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",null,[c(s(Lo),{"model-value":t.value.valueAsString??!1,"onUpdate:modelValue":m},null,8,["model-value"])])]),_:1}),H("div",dft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("min")??"允许输入的最小值表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("min")),1)]),_:1}),c(s(qe),{"model-value":t.value.min??"",placeholder:"例:0","result-type":"number",class:"min-h-10","onUpdate:modelValue":g[6]||(g[6]=v=>t.value={...t.value,min:v.length>0?v:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("max")??"允许输入的最大值表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("max")),1)]),_:1}),c(s(qe),{"model-value":t.value.max??"",placeholder:"例:100","result-type":"number",class:"min-h-10","onUpdate:modelValue":g[7]||(g[7]=v=>t.value={...t.value,max:v.length>0?v:void 0})},null,8,["model-value"])]),_:1})]),H("div",fft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":g[8]||(g[8]=v=>t.value={...t.value,hidden:v.length>0?v:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":g[9]||(g[9]=v=>t.value={...t.value,disabled:v.length>0?v:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":g[10]||(g[10]=v=>t.value={...t.value,readonly:v.length>0?v:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"number",placeholder:"例:form.price * form.qty","onUpdate:modelValue":g[11]||(g[11]=v=>t.value={...t.value,derived:v})},null,8,["model-value"])]),_:1})]))}}),mft={class:"flex flex-col gap-3"},hft={class:"grid grid-cols-2 gap-3"},gft={key:1,class:"grid grid-cols-2 gap-2"},vft={class:"grid grid-cols-2 gap-3"},yft={class:"grid grid-cols-2 gap-3"},bft={class:"grid grid-cols-3 gap-3"},_ft={class:"grid grid-cols-2 gap-3"},xft={class:"grid grid-cols-2 gap-3"},wft={class:"grid grid-cols-3 gap-3"},Sft=q({name:"ShwfedNumberRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=ooe(()=>{}),o=w=>Ln(n,w)??w,r=w=>Bn(n,w),a=[{value:"round",label:"四舍五入"},{value:"floor",label:"向下取整"},{value:"ceil",label:"向上取整"}],i=E(()=>Array.isArray(t.value.binding)?"split":"single"),l=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:w=>{const S=w.trim();if(S.length===0){const{binding:C,...$}=t.value;t.value=$}else t.value={...t.value,binding:S}}}),u=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),d=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function p(w){const S=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[w.trim(),S[1]]}}function m(w){const S=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[S[0],w.trim()]}}function h(){if(i.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:w,...S}=t.value;t.value=S}}const g=E(()=>a.find(w=>w.value===(t.value.roundingMode??"round"))?.label);function v(w){if(w===void 0){const{precision:S,roundingMode:C,...$}=t.value;t.value=$}else t.value.roundingMode===void 0?t.value={...t.value,precision:w,roundingMode:"round"}:t.value={...t.value,precision:w}}function b(w){t.value={...t.value,roundingMode:w}}function x(w){if(w===void 0||!(w>0)){const{step:S,...C}=t.value;t.value=C}else t.value={...t.value,step:w}}function y(w){const S=w.trim();if(S.length===0){const{rangeSeparatorIcon:C,...$}=t.value;t.value=$}else t.value={...t.value,rangeSeparatorIcon:S}}function _(w){if(w)t.value={...t.value,valueAsString:!0};else{const{valueAsString:S,...C}=t.value;t.value=C}}return(w,S)=>(k(),L("div",mft,[H("div",hft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:分数范围","onUpdate:modelValue":S[0]||(S[0]=C=>{const $=String(C??"");t.value={...t.value,displayName:$.length>0?$:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 数值数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),i.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:l.value,"onUpdate:modelValue":S[1]||(S[1]=C=>l.value=C),placeholder:"例:score.range",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",gft,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...S[15]||(S[15]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":u.value,placeholder:"例:score.start",class:"font-mono","onUpdate:modelValue":S[2]||(S[2]=C=>p(String(C??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...S[16]||(S[16]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":d.value,placeholder:"例:score.end",class:"font-mono","onUpdate:modelValue":S[3]||(S[3]=C=>m(String(C??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",vft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":S[4]||(S[4]=C=>t.value={...t.value,label:C})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":S[5]||(S[5]=C=>t.value={...t.value,tooltip:C})},null,8,["model-value"])]),_:1})]),H("div",yft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("startPlaceholder")),1)]),_:2},[r("startPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("startPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.startPlaceholder,"onUpdate:modelValue":S[6]||(S[6]=C=>t.value={...t.value,startPlaceholder:C})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("endPlaceholder")),1)]),_:2},[r("endPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("endPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.endPlaceholder,"onUpdate:modelValue":S[7]||(S[7]=C=>t.value={...t.value,endPlaceholder:C})},null,8,["model-value"])]),_:1})]),H("div",bft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("precision")),1)]),_:2},[r("precision")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("precision"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.precision,min:0,"onUpdate:modelValue":v},null,8,["model-value"]),t.value.precision!==void 0?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"pr-1.5! text-xs"},{default:f(()=>[P(O(g.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[(k(),L(Me,null,Ke(a,C=>c(s(Vo),{key:C.value,onSelect:$=>b(C.value)},{default:f(()=>[P(O(C.label),1)]),_:2},1032,["onSelect"])),64))]),_:1})]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("step")),1)]),_:2},[r("step")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("step"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.step,min:0,"onUpdate:modelValue":x},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":S[8]||(S[8]=C=>t.value={...t.value,orientation:C})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),C=>(k(),M(s(Xn),{key:C.value,value:C.value},{default:f(()=>[P(O(C.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",_ft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("min")??"允许输入的最小值表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("min")),1)]),_:1}),c(s(qe),{"model-value":t.value.min??"",placeholder:"例:0","result-type":"number",class:"min-h-10","onUpdate:modelValue":S[9]||(S[9]=C=>t.value={...t.value,min:C.length>0?C:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("max")??"允许输入的最大值表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("max")),1)]),_:1}),c(s(qe),{"model-value":t.value.max??"",placeholder:"例:100","result-type":"number",class:"min-h-10","onUpdate:modelValue":S[10]||(S[10]=C=>t.value={...t.value,max:C.length>0?C:void 0})},null,8,["model-value"])]),_:1})]),H("div",xft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":y},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("valueAsString")),1)]),_:2},[r("valueAsString")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("valueAsString"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",null,[c(s(Lo),{"model-value":t.value.valueAsString??!1,"onUpdate:modelValue":_},null,8,["model-value"])])]),_:1})]),H("div",wft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":S[11]||(S[11]=C=>t.value={...t.value,hidden:C.length>0?C:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":S[12]||(S[12]=C=>t.value={...t.value,disabled:C.length>0?C:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":S[13]||(S[13]=C=>t.value={...t.value,readonly:C.length>0?C:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.lo, form.hi]","onUpdate:modelValue":S[14]||(S[14]=C=>t.value={...t.value,derived:C})},null,8,["model-value"])]),_:1})]))}}),kft={class:"flex flex-col gap-3"},Cft={class:"grid grid-cols-2 gap-3"},$ft={class:"grid grid-cols-2 gap-3"},Tft={class:"grid grid-cols-2 gap-3"},Eft={class:"grid grid-cols-3 gap-3"},Dft=q({name:"ShwfedSwitchFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=ioe(()=>{}),o=i=>Ln(n,i)??i,r=i=>Bn(n,i),a=E({get:()=>t.value.binding??"",set:i=>{const l=i.trim();if(l.length===0){const{binding:u,...d}=t.value;t.value=d}else t.value={...t.value,binding:l}}});return(i,l)=>(k(),L("div",kft,[H("div",Cft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:是否启用","onUpdate:modelValue":l[0]||(l[0]=u=>{const d=String(u??"");t.value={...t.value,displayName:d.length>0?d:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.enabled`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=u=>a.value=u),placeholder:"例:user.enabled",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",$ft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":l[2]||(l[2]=u=>t.value={...t.value,label:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":l[3]||(l[3]=u=>t.value={...t.value,tooltip:u})},null,8,["model-value"])]),_:1})]),H("div",Tft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("trueLabel")),1)]),_:2},[r("trueLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("trueLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.trueLabel,"onUpdate:modelValue":l[4]||(l[4]=u=>t.value={...t.value,trueLabel:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("falseLabel")),1)]),_:2},[r("falseLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("falseLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.falseLabel,"onUpdate:modelValue":l[5]||(l[5]=u=>t.value={...t.value,falseLabel:u})},null,8,["model-value"])]),_:1})]),H("div",Eft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[6]||(l[6]=u=>t.value={...t.value,hidden:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时开关仍然渲染但不可切换",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[7]||(l[7]=u=>t.value={...t.value,disabled:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[8]||(l[8]=u=>t.value={...t.value,readonly:u.length>0?u:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"bool",placeholder:"例:form.total > 100","onUpdate:modelValue":l[9]||(l[9]=u=>t.value={...t.value,derived:u})},null,8,["model-value"])]),_:1})]))}}),Oft={class:"flex flex-col gap-3"},Aft={class:"grid grid-cols-2 gap-3"},Ift={class:"grid grid-cols-3 gap-3"},Pft={class:"grid grid-cols-3 gap-3"},Mft={class:"flex flex-col gap-3"},Rft={type:"button","data-slot":"combobox-single-item-kind-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5","aria-label":"切换值类型"},Fft={class:"grid grid-cols-3 gap-3"},zft=q({name:"ShwfedComboboxSingleFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=loe(()=>{}),o=S=>Ln(n,S)??S,r=S=>Bn(n,S),a=ZR(()=>{}),i=S=>Ln(a,S)??S,l=S=>Bn(a,S),u=E({get:()=>t.value.binding??"",set:S=>{const C=S.trim();if(C.length===0){const{binding:$,...T}=t.value;t.value=T}else t.value={...t.value,binding:C}}}),d=E(()=>t.value.items??[]);function p(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,S=>{const C=Math.random()*16|0;return(S==="x"?C:C&3|8).toString(16)})}function m(){return{id:p(),label:[{locale:"zh",message:""}],value:{kind:"text",value:""}}}function h(S,C){const $=[...t.value.items??[]],T=$[S];T&&($[S]={...T,...C},t.value={...t.value,items:$})}function g(){t.value={...t.value,items:[...t.value.items??[],m()]}}function v(S){const C=[...t.value.items??[]];C.splice(S,1),t.value={...t.value,items:C}}function b(S,C){const $=t.value.items?.[S];!$||$.value.kind===C||h(S,{value:C==="text"?{kind:"text",value:""}:{kind:"number",value:0}})}function x(S,C){h(S,{value:{kind:"text",value:C}})}function y(S,C){h(S,{value:{kind:"number",value:typeof C=="number"&&Number.isFinite(C)?C:0}})}function _(S,C){h(S,{label:C})}function w(S,C){if(!C||C.every(T=>T.message.trim().length===0)){const T=t.value.items?.[S];if(!T)return;const{tooltip:D,...A}=T,I=[...t.value.items??[]];I[S]=A,t.value={...t.value,items:I}}else h(S,{tooltip:C})}return(S,C)=>(k(),L("div",Oft,[H("div",Aft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户角色","onUpdate:modelValue":C[0]||(C[0]=$=>{const T=String($??"");t.value={...t.value,displayName:T.length>0?T:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.role`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:u.value,"onUpdate:modelValue":C[1]||(C[1]=$=>u.value=$),placeholder:"例:user.role",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Ift,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":C[2]||(C[2]=$=>t.value={...t.value,label:$})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field placeholder","model-value":t.value.placeholder,"onUpdate:modelValue":C[3]||(C[3]=$=>t.value={...t.value,placeholder:$})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":C[4]||(C[4]=$=>t.value={...t.value,tooltip:$})},null,8,["model-value"])]),_:1})]),H("div",Pft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":C[5]||(C[5]=$=>t.value={...t.value,orientation:$})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),$=>(k(),M(s(Xn),{key:$.value,value:$.value},{default:f(()=>[P(O($.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"下拉框可选项列表",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("items")),1)]),_:1}),H("div",Mft,[(k(!0),L(Me,null,Ke(d.value,($,T)=>(k(),L("div",{key:$.id,"data-slot":"combobox-single-item",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"combobox-single-item-delete","aria-label":"删除选项",class:"absolute right-2 top-2 z-10",onClick:D=>v(T)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"combobox option label","model-value":$.label,"onUpdate:modelValue":D=>_(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"icon-sm","as-child":""},{default:f(()=>[H("button",Rft,[c(s(fe),{icon:$.value.kind==="number"?"fluent:number-symbol-20-regular":"fluent:textbox-20-regular"},null,8,["icon"])])]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[c(s(Vo),{onSelect:D=>b(T,"text")},{default:f(()=>[c(s(fe),{icon:"fluent:textbox-20-regular"}),C[10]||(C[10]=H("span",null,"文本",-1))]),_:1},8,["onSelect"]),c(s(Vo),{onSelect:D=>b(T,"number")},{default:f(()=>[c(s(fe),{icon:"fluent:number-symbol-20-regular"}),C[11]||(C[11]=H("span",null,"数字",-1))]),_:1},8,["onSelect"])]),_:2},1024)]),_:2},1024)]),_:2},1024),$.value.kind==="text"?(k(),M(s(mt),{key:0,"model-value":$.value.value,placeholder:"例:admin","onUpdate:modelValue":D=>x(T,String(D??""))},null,8,["model-value","onUpdate:modelValue"])):(k(),M(s(wn),{key:1,"model-value":$.value.value,"onUpdate:modelValue":D=>y(T,D)},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1024)]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("tooltip")),1)]),_:2},[l("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"combobox option tooltip","model-value":$.tooltip,"onUpdate:modelValue":D=>w(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"combobox-single-add-item",class:"w-full justify-center",onClick:g},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),C[12]||(C[12]=H("span",null,"增加选项",-1))]),_:1})])]),_:1}),H("div",Fft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[6]||(C[6]=$=>t.value={...t.value,hidden:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时下拉框仍然渲染但不可选择",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[7]||(C[7]=$=>t.value={...t.value,disabled:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[8]||(C[8]=$=>t.value={...t.value,readonly:$.length>0?$:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.category","onUpdate:modelValue":C[9]||(C[9]=$=>t.value={...t.value,derived:$})},null,8,["model-value"])]),_:1})]))}}),Vft={class:"flex flex-col gap-3"},Nft={class:"grid grid-cols-2 gap-3"},Lft={class:"grid grid-cols-3 gap-3"},Bft={class:"grid grid-cols-3 gap-3"},Uft={class:"grid grid-cols-3 gap-3"},qft={key:0},jft={key:1,class:"text-zinc-400"},Hft={class:"grid grid-cols-2 gap-3"},Wft={class:"grid grid-cols-2 gap-3"},Gft={class:"grid grid-cols-3 gap-3"},Kft=q({name:"ShwfedUploadFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=doe(()=>{}),o=$=>Ln(n,$)??$,r=$=>Bn(n,$),a=E({get:()=>t.value.binding??"",set:$=>{const T=$.trim();if(T.length===0){const{binding:D,...A}=t.value;t.value=A}else t.value={...t.value,binding:T}}}),i=E({get:()=>t.value.template?.request??"",set:$=>{if($.length===0){const{template:T,...D}=t.value;t.value=D}else t.value={...t.value,template:{...t.value.template,request:$}}}}),l=E({get:()=>t.value.template?.download??"",set:$=>{const T=t.value.template;if(T)if($.length===0){const{download:D,...A}=T;t.value={...t.value,template:A}}else t.value={...t.value,template:{...T,download:$}}}}),u=E({get:()=>t.value.templateIcon??"",set:$=>{const T=$.trim();if(T.length===0){const{templateIcon:D,...A}=t.value;t.value=A}else t.value={...t.value,templateIcon:T}}}),d=[{id:"pdf",label:"PDF",mimes:["application/pdf"]},{id:"docx",label:"DOCX",mimes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},{id:"doc",label:"DOC",mimes:["application/msword"]},{id:"xlsx",label:"XLSX",mimes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},{id:"xls",label:"XLS",mimes:["application/vnd.ms-excel"]},{id:"pptx",label:"PPTX",mimes:["application/vnd.openxmlformats-officedocument.presentationml.presentation"]},{id:"ppt",label:"PPT",mimes:["application/vnd.ms-powerpoint"]},{id:"zip",label:"ZIP",mimes:["application/zip","application/x-zip-compressed"]},{id:"rar",label:"RAR",mimes:["application/vnd.rar","application/x-rar-compressed"]},{id:"ofd",label:"OFD",mimes:["application/ofd"]},{id:"xml",label:"XML",mimes:["application/xml"]},{id:"png",label:"PNG",mimes:["image/png"]},{id:"jpeg",label:"JPEG",mimes:["image/jpeg","image/jpg"]}],p=new Map(d.map($=>[$.id,$])),m=E(()=>t.value.accept??[]),h=E(()=>d.filter($=>$.mimes.every(T=>m.value.includes(T))).map($=>$.id)),g=E(()=>h.value.map($=>p.get($)?.label).filter(Boolean).join("、"));function v($){const D=(Array.isArray($)?$.filter(A=>typeof A=="string"):typeof $=="string"?[$]:[]).flatMap(A=>p.get(A)?.mimes??[]);if(D.length===0){const{accept:A,...I}=t.value;t.value=I}else t.value={...t.value,accept:D}}function b($){return $===void 0?"MB":$<1024*1024?"KB":"MB"}function x($){return $==="KB"?1024:1024*1024}function y($){const T=re(b(t.value[$])),D=E({get:()=>{const A=t.value[$];return A===void 0?void 0:A/x(T.value)},set:A=>{if(A===void 0||!(A>0)){const{[$]:I,...U}=t.value;t.value=U;return}t.value={...t.value,[$]:Math.round(A*x(T.value))}}});return{unit:T,amount:D}}const _=y("maxFileSize"),w=y("maxTotalSize");function S($){if($===void 0||!($>0)){const{maxFiles:T,...D}=t.value;t.value=D}else t.value={...t.value,maxFiles:Math.round($)}}function C($){if($)t.value={...t.value,multiple:!0};else{const{multiple:T,...D}=t.value;t.value=D}}return($,T)=>(k(),L("div",Vft,[H("div",Nft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:附件","onUpdate:modelValue":T[0]||(T[0]=D=>{const A=String(D??"");t.value={...t.value,displayName:A.length>0?A:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `attachments`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":T[1]||(T[1]=D=>a.value=D),placeholder:"例:attachments",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Lft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":T[2]||(T[2]=D=>t.value={...t.value,label:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":T[3]||(T[3]=D=>t.value={...t.value,tooltip:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("description")),1)]),_:2},[r("description")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("description"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"upload zone description","model-value":t.value.description,"onUpdate:modelValue":T[4]||(T[4]=D=>t.value={...t.value,description:D})},null,8,["model-value"])]),_:1})]),H("div",Bft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":T[5]||(T[5]=D=>t.value={...t.value,orientation:D})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),D=>(k(),M(s(Xn),{key:D.value,value:D.value},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("multiple")),1)]),_:2},[r("multiple")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("multiple"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",null,[c(s(Lo),{"model-value":t.value.multiple??!1,"onUpdate:modelValue":C},null,8,["model-value"])])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("maxFiles")),1)]),_:2},[r("maxFiles")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("maxFiles"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.maxFiles,min:1,"onUpdate:modelValue":S},null,8,["model-value"])]),_:1})]),_:1})]),H("div",Uft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("accept")),1)]),_:2},[r("accept")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("accept"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{multiple:"","model-value":h.value,"onUpdate:modelValue":v},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn),{placeholder:"不限制"},{default:f(()=>[g.value.length>0?(k(),L("span",qft,O(g.value),1)):(k(),L("span",jft,"不限制"))]),_:1})]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(d,D=>c(s(Xn),{key:D.id,value:D.id},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("maxFileSize")),1)]),_:2},[r("maxFileSize")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("maxFileSize"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":s(_).amount.value,min:0,"onUpdate:modelValue":T[6]||(T[6]=D=>s(_).amount.value=D)},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"pr-1.5! text-xs"},{default:f(()=>[P(O(s(_).unit.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[c(s(Vo),{onSelect:T[7]||(T[7]=D=>s(_).unit.value="KB")},{default:f(()=>[...T[19]||(T[19]=[P(" KB ",-1)])]),_:1}),c(s(Vo),{onSelect:T[8]||(T[8]=D=>s(_).unit.value="MB")},{default:f(()=>[...T[20]||(T[20]=[P(" MB ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("maxTotalSize")),1)]),_:2},[r("maxTotalSize")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("maxTotalSize"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":s(w).amount.value,min:0,"onUpdate:modelValue":T[9]||(T[9]=D=>s(w).amount.value=D)},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{variant:"ghost",class:"pr-1.5! text-xs"},{default:f(()=>[P(O(s(w).unit.value)+" ",1),c(s(fe),{icon:"lucide:chevron-down",class:"size-3"})]),_:1})]),_:1}),c(s(zr),{align:"end"},{default:f(()=>[c(s(Vo),{onSelect:T[10]||(T[10]=D=>s(w).unit.value="KB")},{default:f(()=>[...T[21]||(T[21]=[P(" KB ",-1)])]),_:1}),c(s(Vo),{onSelect:T[11]||(T[11]=D=>s(w).unit.value="MB")},{default:f(()=>[...T[22]||(T[22]=[P(" MB ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),H("div",Hft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("template")??"返回 `HttpRequest` 的 CEL 表达式;设置后会渲染下载模板按钮",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[T[23]||(T[23]=P(" 请求 ",-1))]),_:1}),c(s(qe),{"model-value":i.value,placeholder:"例:http.get('https://api.example.com/template.xlsx')","result-type":"HttpRequest",class:"min-h-10","onUpdate:modelValue":T[12]||(T[12]=D=>i.value=D)},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"可选的第二步:用第一步响应 `json` 中的凭据构造真正的下载请求,例如 `json.data.key`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[T[24]||(T[24]=P(" 下载请求 ",-1))]),_:1}),c(s(qe),{"model-value":l.value,placeholder:"例:http.get('https://api.example.com/download').query('key', json.data.key)","result-type":"HttpRequest","extra-vars":{json:s(fS)},class:"min-h-10","onUpdate:modelValue":T[13]||(T[13]=D=>l.value=D)},null,8,["model-value","extra-vars"])]),_:1})]),H("div",Wft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("templateIcon")),1)]),_:2},[r("templateIcon")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("templateIcon"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qc),{"model-value":u.value,"onUpdate:modelValue":T[14]||(T[14]=D=>u.value=D)},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("templateLabel")),1)]),_:2},[r("templateLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("templateLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"download template button label","model-value":t.value.templateLabel,"onUpdate:modelValue":T[15]||(T[15]=D=>t.value={...t.value,templateLabel:D})},null,8,["model-value"])]),_:1})]),H("div",Gft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[16]||(T[16]=D=>t.value={...t.value,hidden:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时上传区域仍然渲染但不可操作",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[17]||(T[17]=D=>t.value={...t.value,disabled:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以文件列表展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[18]||(T[18]=D=>t.value={...t.value,readonly:D.length>0?D:void 0})},null,8,["model-value"])]),_:1})])]))}}),Yft={class:"flex flex-col gap-3"},Jft={class:"grid grid-cols-2 gap-3"},Xft={class:"grid grid-cols-3 gap-3"},Zft={class:"grid grid-cols-3 gap-3"},Qft={class:"grid grid-cols-1 gap-3"},ept={class:"grid grid-cols-1 gap-3"},tpt={class:"grid grid-cols-2 gap-3"},npt={class:"grid grid-cols-3 gap-3"},opt=q({name:"ShwfedComboboxSingleRemoteFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=moe(()=>{}),o=i=>Ln(n,i)??i,r=i=>Bn(n,i),a=E({get:()=>t.value.binding??"",set:i=>{const l=i.trim();if(l.length===0){const{binding:u,...d}=t.value;t.value=d}else t.value={...t.value,binding:l}}});return(i,l)=>(k(),L("div",Yft,[H("div",Jft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户角色","onUpdate:modelValue":l[0]||(l[0]=u=>{const d=String(u??"");t.value={...t.value,displayName:d.length>0?d:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.role`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=u=>a.value=u),placeholder:"例:user.role",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Xft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":l[2]||(l[2]=u=>t.value={...t.value,label:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":l[3]||(l[3]=u=>t.value={...t.value,placeholder:u})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":l[4]||(l[4]=u=>t.value={...t.value,tooltip:u})},null,8,["model-value"])]),_:1})]),H("div",Zft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":l[5]||(l[5]=u=>t.value={...t.value,orientation:u})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),u=>(k(),M(s(Xn),{key:u.value,value:u.value},{default:f(()=>[P(O(u.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),H("div",Qft,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("request")??"返回 `HttpRequest` 的 CEL 表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("request")),1)]),_:1}),c(s(qe),{"model-value":t.value.request,placeholder:"例:http.get('/api/roles').query('keyword', form.keyword)","result-type":"HttpRequest",class:"min-h-10","onUpdate:modelValue":l[6]||(l[6]=u=>t.value={...t.value,request:u})},null,8,["model-value"])]),_:1})]),H("div",ept,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("options")??"从响应体提取选项数组的 CEL 表达式",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("options")),1)]),_:1}),c(s(qe),{"model-value":t.value.options,placeholder:"例:json.data","result-type":"list","extra-vars":{json:s(mS)},class:"min-h-10","onUpdate:modelValue":l[7]||(l[7]=u=>t.value={...t.value,options:u})},null,8,["model-value","extra-vars"])]),_:1})]),H("div",tpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("optionValue")??"从当前 `option` 提取写入绑定的值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("optionValue")),1)]),_:1}),c(s(qe),{"model-value":t.value.optionValue,placeholder:'例:option["value"]',"result-type":"dyn","extra-vars":{option:s(pS)},class:"min-h-10","onUpdate:modelValue":l[8]||(l[8]=u=>t.value={...t.value,optionValue:u})},null,8,["model-value","extra-vars"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("optionLabel")??"每个选项展示的本地化文本,支持 `{{ string(option.foo) }}` 插值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("optionLabel")),1)]),_:1}),c(s(Ye),{markdown:"","model-value":t.value.optionLabel,"onUpdate:modelValue":l[9]||(l[9]=u=>t.value={...t.value,optionLabel:u})},null,8,["model-value"])]),_:1})]),H("div",npt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[10]||(l[10]=u=>t.value={...t.value,hidden:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时下拉框仍然渲染但不可选择",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[11]||(l[11]=u=>t.value={...t.value,disabled:u.length>0?u:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":l[12]||(l[12]=u=>t.value={...t.value,readonly:u.length>0?u:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.category","onUpdate:modelValue":l[13]||(l[13]=u=>t.value={...t.value,derived:u})},null,8,["model-value"])]),_:1})]))}}),rpt=["onClick"],apt={class:"flex-1 truncate"},ipt={class:"flex flex-col gap-0.5"},spt=["onClick"],lpt={class:"flex-1 truncate"},upt={class:"flex gap-2 min-h-128"},cpt={key:0,class:"flex w-64 shrink-0 flex-col"},dpt=["onClick"],fpt={class:"flex-1 truncate"},ppt={class:"flex flex-col gap-0.5"},mpt=["onClick"],hpt={class:"flex-1 truncate"},gpt={class:"flex flex-1 flex-col"},vpt={key:0},ypt={key:1,class:"flex flex-1 flex-col gap-2"},bpt={class:"flex-1"},_pt={key:0},xpt={key:0,class:"mb-4 flex items-center gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800",role:"alert"},wpt={class:"flex-1"},Spt={class:"tabular-nums font-medium"},kpt={key:1,class:"text-sm text-red-500"},Cpt={key:3,class:"flex min-h-112 items-center justify-center p-8 text-sm text-zinc-400"},$pt=q({name:"ShwfedFormUnitConfig",__name:"unit-config",props:Ca({extras:{},configure:{type:Function},fieldCelScope:{}},{modelValue:{required:!0},modelModifiers:{},selection:{default:()=>({kind:"layout"})},selectionModifiers:{}}),emits:["update:modelValue","update:selection"],setup(e){const t=Ot(e,"modelValue"),n=Ot(e,"selection"),o=e,r=re(0),a=re([{kind:"top"}]),i=E(()=>a.value[a.value.length-1]),l=E(()=>a.value.length>1);function u(){a.value.length<=1||(a.value=a.value.slice(0,-1))}const d=Fn(Y1,null),p=re(!1);fr(n_,{fullPane:p}),Wi(o.fieldCelScope??{});const m=Fn(pA,null),h=E(()=>m?.target.value??null),g=E(()=>i.value.kind==="field-drill"?i.value.id:null),v=E(()=>{const W=g.value;return W?t.value.fields.find(B=>B.id===W)??null:null}),b=E(()=>{const W=v.value;return W?Ap(W.type,W.compatibilityDate)??null:null});function x(W){n.value={kind:"extras",id:W}}function y(){n.value={kind:"layout"}}function _(W){a.value=[...a.value,{kind:"field-drill",id:W}]}function w(W){a.value.length&&W!==g.value&&i.value.kind==="field-drill"&&(a.value=[...a.value.slice(0,-1),{kind:"field-drill",id:W}])}function S(W){return Ap(W.type,W.compatibilityDate)?.metadata?.icon??"fluent:square-20-regular"}const C=E({get:()=>[...t.value.layouts],set:W=>{t.value={...t.value,layouts:W}}}),$=Bb("sidebarRef");function T(){$.value?.addLayout()}const D=E(()=>{const W=new Map;for(const B of Avt){if(B.deprecated)continue;const K=W.get(B.type);(!K||B.compatibilityDate>K.compatibilityDate)&&W.set(B.type,{type:B.type,compatibilityDate:B.compatibilityDate,name:B.metadata.name,icon:B.metadata.icon})}return[...W.values()].sort((B,K)=>B.name.localeCompare(K.name,"zh"))});function A(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,W=>{const B=Math.random()*16|0;return(W==="x"?B:B&3|8).toString(16)})}function I(W){return{...Ap(W.type,W.compatibilityDate)?.defaults?.()??{},id:A(),type:W.type,compatibilityDate:W.compatibilityDate}}function U(W,B){const K=I(W),X=Ap(W.type,W.compatibilityDate)?.metadata,Ee=X?.w.initial??1,_e=X?.h.initial??1,ze=r.value,st=t.value.layouts.map((oe,be)=>{if(be!==ze)return oe;const De=VR(oe.layout.placements,Ee,_e),Se={...oe.layout.placements,[K.id]:De};let Te=0,Ne=0;for(const te of Object.values(Se)){const[,[le,xe]]=te.area;le-1>Te&&(Te=le-1),xe-1>Ne&&(Ne=xe-1)}return{...oe,layout:{...oe.layout,placements:Se,columns:Math.max(1,Te),rows:Math.max(1,Ne)}}});t.value={...t.value,fields:[...t.value.fields,K],layouts:st},B?.silent||_(K.id)}function j(W){Q([W])}function Q(W){if(W.length===0)return;const B=new Set(W);t.value={...t.value,fields:t.value.fields.filter(K=>!B.has(K.id)),layouts:t.value.layouts.map(K=>{const X=Object.entries(K.layout.placements).filter(([Ee])=>!B.has(Ee));return X.length===Object.keys(K.layout.placements).length?K:pte({...K,layout:{...K.layout,placements:Object.fromEntries(X)}})})},i.value.kind==="field-drill"&&B.has(i.value.id)&&(a.value=a.value.slice(0,-1))}function F(W){const B=g.value;if(!B)return;const K=t.value.fields.findIndex(Ee=>Ee.id===B);if(K<0)return;const X=[...t.value.fields];X[K]=W,t.value={...t.value,fields:X}}const R=vn();function G(W,B){return Ht(W,{...dn(R),...B})}const Z={$cel:G},Y=E(()=>{const W=b.value;return!W?.deprecated||!W.supersededBy?null:Ap(W.supersededBy.type,W.supersededBy.compatibilityDate)??null}),he=E(()=>!!Y.value?.migrate);async function ue(){const W=v.value,B=Y.value;if(!(!W||!B?.migrate))try{const K=await Yr(B.migrate(W,Z));F(K);const X=B.type===W.type;Si.success(X?`已迁移到 ${B.compatibilityDate} 版本`:`已迁移到 ${B.type}@${B.compatibilityDate}`)}catch(K){const X=K instanceof Error?K.message:String(K);Si.error("迁移失败",{description:X})}}function pe(W){const B=W;if(typeof B.displayName=="string"&&B.displayName.length>0)return B.displayName;const K=B.label;return ut(K,"zh")??"未命名字段"}function ce(W){return pe(W)}if(d){const W=d.add();Xe([l,v],([B,K])=>{B&&K?(W.label.value=`编辑${pe(K)}`,W.back.value=u):(W.label.value=null,W.back.value=null)},{immediate:!0}),tr(()=>{W.dispose()})}function ae(W){return n.value.kind==="extras"&&n.value.id===W}return(W,B)=>(k(),L(Me,null,[h.value&&!p.value?(k(),M(Lb,{key:0,to:h.value},[l.value?(k(),M(s(js),{key:1,class:"flex-1"},{default:f(()=>[H("div",ipt,[(k(!0),L(Me,null,Ke(t.value.fields,K=>(k(),L("button",{key:K.id,type:"button",class:He(["row w-full pl-2 text-left",[g.value===K.id?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:X=>w(K.id)},[c(s(fe),{icon:S(K),class:"size-4 shrink-0"},null,8,["icon"]),H("span",lpt,O(ce(K)),1)],10,spt))),128))])]),_:1})):(k(),L(Me,{key:0},[c(s(js),{class:"flex-1"},{default:f(()=>[e.extras&&e.extras.length>0?(k(),L(Me,{key:0},[(k(!0),L(Me,null,Ke(e.extras,K=>(k(),L("div",{key:K.id,class:He(["row general-row pl-2",[ae(K.id)?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:at(X=>x(K.id),["stop"])},[c(s(fe),{icon:K.icon,class:"size-4 shrink-0"},null,8,["icon"]),H("span",apt,O(K.label),1)],10,rpt))),128)),c(s(er),{class:"my-1"})],64)):ke("",!0),c(dS,{ref_key:"sidebarRef",ref:$,modelValue:C.value,"onUpdate:modelValue":B[0]||(B[0]=K=>C.value=K),"active-index":r.value,"onUpdate:activeIndex":B[1]||(B[1]=K=>r.value=K),active:n.value.kind==="layout",onSelect:B[2]||(B[2]=K=>y())},null,8,["modelValue","active-index","active"])]),_:1}),c(s(Rn),{variant:"ghost",size:"sm",onClick:B[3]||(B[3]=K=>T())},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular",class:"size-4"}),B[11]||(B[11]=H("span",null,"新增布局",-1))]),_:1})],64))],8,["to"])):ke("",!0),H("div",upt,[!p.value&&!h.value?(k(),L("div",cpt,[l.value?(k(),M(s(js),{key:1,class:"flex-1"},{default:f(()=>[H("div",ppt,[(k(!0),L(Me,null,Ke(t.value.fields,K=>(k(),L("button",{key:K.id,type:"button",class:He(["row w-full pl-2 text-left",[g.value===K.id?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:X=>w(K.id)},[c(s(fe),{icon:S(K),class:"size-4 shrink-0"},null,8,["icon"]),H("span",hpt,O(ce(K)),1)],10,mpt))),128))])]),_:1})):(k(),L(Me,{key:0},[c(s(js),{class:"flex-1"},{default:f(()=>[e.extras&&e.extras.length>0?(k(),L(Me,{key:0},[(k(!0),L(Me,null,Ke(e.extras,K=>(k(),L("div",{key:K.id,class:He(["row general-row pl-2",[ae(K.id)?"bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)":"text-zinc-600 hover:bg-zinc-50"]]),onClick:at(X=>x(K.id),["stop"])},[c(s(fe),{icon:K.icon,class:"size-4 shrink-0"},null,8,["icon"]),H("span",fpt,O(K.label),1)],10,dpt))),128)),c(s(er),{class:"my-1"})],64)):ke("",!0),c(dS,{ref_key:"sidebarRef",ref:$,modelValue:C.value,"onUpdate:modelValue":B[4]||(B[4]=K=>C.value=K),"active-index":r.value,"onUpdate:activeIndex":B[5]||(B[5]=K=>r.value=K),active:n.value.kind==="layout",onSelect:B[6]||(B[6]=K=>y())},null,8,["modelValue","active-index","active"])]),_:1}),c(s(Rn),{variant:"ghost",size:"sm",onClick:B[7]||(B[7]=K=>T())},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular",class:"size-4"}),B[12]||(B[12]=H("span",null,"新增布局",-1))]),_:1})],64))])):ke("",!0),H("div",gpt,[!l.value&&n.value.kind==="extras"?(k(),L("div",vpt,[se(W.$slots,"extras-pane",{id:n.value.id},void 0,!0)])):!l.value&&n.value.kind==="layout"?(k(),L("div",ypt,[c(jR,{modelValue:C.value,"onUpdate:modelValue":B[8]||(B[8]=K=>C.value=K),index:r.value},null,8,["modelValue","index"]),H("div",bpt,[c(UR,{modelValue:C.value,"onUpdate:modelValue":B[9]||(B[9]=K=>C.value=K),"active-index":r.value,"onUpdate:activeIndex":B[10]||(B[10]=K=>r.value=K),items:t.value.fields,"find-entry":s(Ap),"get-item-label":ce,"picker-entries":D.value,"can-delete":!0,"item-noun":"字段",onAddNew:U,onDrillDown:_,onDeleteItem:j,onDeleteItems:Q},null,8,["modelValue","active-index","items","find-entry","picker-entries"])])])):v.value?(k(),L("div",{key:2,class:He(p.value?"":"p-6")},[b.value?(k(),L("div",_pt,[b.value.deprecated&&b.value.supersededBy?(k(),L("div",xpt,[c(s(fe),{icon:"fluent:warning-20-regular",class:"size-4 shrink-0"}),H("span",wpt,[B[13]||(B[13]=P(" 此字段类型已弃用,建议迁移至 ",-1)),H("span",Spt,O(b.value.supersededBy.type===b.value.type?b.value.supersededBy.compatibilityDate:`${b.value.supersededBy.type}@${b.value.supersededBy.compatibilityDate}`),1),B[14]||(B[14]=P("。 ",-1))]),he.value?(k(),M(s(Rn),{key:0,variant:"ghost",size:"sm",class:"text-amber-800 hover:bg-amber-100 hover:text-amber-900","data-slot":"field-migrate",onClick:ue},{default:f(()=>[c(s(fe),{icon:"fluent:arrow-sync-20-regular"}),B[15]||(B[15]=P(" 迁移 ",-1))]),_:1})):ke("",!0)])):ke("",!0),(k(),M(Mo(b.value.config),{"model-value":v.value,"onUpdate:modelValue":F},null,8,["model-value"]))])):(k(),L("div",kpt," 未注册的字段类型:"+O(v.value.type)+"@"+O(v.value.compatibilityDate),1))],2)):(k(),L("div",Cpt," 选择左侧项目以查看和编辑 "))])])],64))}}),m4=sp($pt,[["__scopeId","data-v-75ff2907"]]),Tpt={class:"flex flex-col gap-3"},Ept={class:"grid grid-cols-2 gap-3"},Dpt={class:"grid grid-cols-2 gap-3"},Opt={class:"grid grid-cols-2 gap-3"},Apt={class:"grid grid-cols-3 gap-3"},Ipt={class:"grid grid-cols-2 gap-3"},Ppt=q({name:"ShwfedListFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=voe(()=>{}),o=g=>Ln(n,g)??g,r=g=>Bn(n,g),a=Fn(n_,null);Pt(()=>{a&&(a.fullPane.value=!0)}),tr(()=>{a&&(a.fullPane.value=!1)});const i=E({get:()=>t.value.unit,set:g=>{t.value={...t.value,unit:g}}}),l=[{id:"general",label:"通用配置",icon:"fluent:settings-20-regular"}],u={item:{type:"dyn",label:"item",description:"当前列表项",value:void 0},index:{type:"number",label:"index",description:"当前列表项索引,从 0 开始",value:void 0}},d=re({kind:"extras",id:"general"}),p=E({get:()=>t.value.binding??"",set:g=>{const v=g.trim();if(v.length===0){const{binding:b,...x}=t.value;t.value=x}else t.value={...t.value,binding:v}}});function m(g,v){if(v==null){const{[g]:b,...x}=t.value;t.value=x}else t.value={...t.value,[g]:v}}const h=E({get:()=>t.value.reorderable??!0,set:g=>{if(g===!0){const{reorderable:v,...b}=t.value;t.value=b}else t.value={...t.value,reorderable:!1}}});return(g,v)=>(k(),M(m4,{modelValue:i.value,"onUpdate:modelValue":v[12]||(v[12]=b=>i.value=b),selection:d.value,"onUpdate:selection":v[13]||(v[13]=b=>d.value=b),extras:l,"field-cel-scope":u},{"extras-pane":f(()=>[H("div",Tpt,[H("div",Ept,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:成员列表","onUpdate:modelValue":v[0]||(v[0]=b=>{const x=String(b??"");t.value={...t.value,displayName:x.length>0?x:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("binding")),1)]),_:2},[r("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:p.value,"onUpdate:modelValue":v[1]||(v[1]=b=>p.value=b),placeholder:"例:members",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Dpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":v[2]||(v[2]=b=>t.value={...t.value,label:b})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":v[3]||(v[3]=b=>t.value={...t.value,tooltip:b})},null,8,["model-value"])]),_:1})]),H("div",Opt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("addLabel")),1)]),_:2},[r("addLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("addLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.addLabel,"onUpdate:modelValue":v[4]||(v[4]=b=>t.value={...t.value,addLabel:b})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("removeLabel")),1)]),_:2},[r("removeLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("removeLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.removeLabel,"onUpdate:modelValue":v[5]||(v[5]=b=>t.value={...t.value,removeLabel:b})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("locale")),1)]),_:2},[r("locale")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("locale"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"列表项折叠摘要,Markdown 文本,保留表达式插值占位符不要翻译","model-value":t.value.locale,"onUpdate:modelValue":v[6]||(v[6]=b=>t.value={...t.value,locale:b})},null,8,["model-value"])]),_:1}),H("div",Apt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("min")),1)]),_:2},[r("min")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("min"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.min,min:0,"onUpdate:modelValue":v[7]||(v[7]=b=>m("min",b))},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("max")),1)]),_:2},[r("max")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("max"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(wn),{"model-value":t.value.max,min:1,"onUpdate:modelValue":v[8]||(v[8]=b=>m("max",b))},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"horizontal",class:"h-9 w-auto gap-2 self-end"},{default:f(()=>[c(s(Lo),{modelValue:h.value,"onUpdate:modelValue":v[9]||(v[9]=b=>h.value=b)},null,8,["modelValue"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("reorderable")),1)]),_:2},[r("reorderable")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("reorderable"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})]),H("div",Ipt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":v[10]||(v[10]=b=>t.value={...t.value,hidden:b.length>0?b:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时整个列表只读,不能新增/删除/重排",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":v[11]||(v[11]=b=>t.value={...t.value,disabled:b.length>0?b:void 0})},null,8,["model-value"])]),_:1})])])]),_:1},8,["modelValue","selection"]))}}),Mpt={class:"flex flex-col gap-3"},Rpt={class:"grid grid-cols-2 gap-3"},Fpt={class:"grid grid-cols-2 gap-3"},zpt={class:"flex flex-col gap-3"},Vpt={type:"button","data-slot":"checkbox-group-item-kind-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5","aria-label":"切换值类型"},Npt={class:"grid grid-cols-3 gap-3"},Lpt=q({name:"ShwfedCheckboxGroupFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=_oe(()=>{}),o=S=>Ln(n,S)??S,r=S=>Bn(n,S),a=QR(()=>{}),i=S=>Ln(a,S)??S,l=S=>Bn(a,S),u=E({get:()=>t.value.binding??"",set:S=>{const C=S.trim();if(C.length===0){const{binding:$,...T}=t.value;t.value=T}else t.value={...t.value,binding:C}}}),d=E(()=>t.value.items??[]);function p(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,S=>{const C=Math.random()*16|0;return(S==="x"?C:C&3|8).toString(16)})}function m(){return{id:p(),label:[{locale:"zh",message:""}],value:{kind:"text",value:""}}}function h(S,C){const $=[...t.value.items??[]],T=$[S];T&&($[S]={...T,...C},t.value={...t.value,items:$})}function g(){t.value={...t.value,items:[...t.value.items??[],m()]}}function v(S){const C=[...t.value.items??[]];C.splice(S,1),t.value={...t.value,items:C}}function b(S,C){const $=t.value.items?.[S];!$||$.value.kind===C||h(S,{value:C==="text"?{kind:"text",value:""}:{kind:"number",value:0}})}function x(S,C){h(S,{value:{kind:"text",value:C}})}function y(S,C){h(S,{value:{kind:"number",value:typeof C=="number"&&Number.isFinite(C)?C:0}})}function _(S,C){h(S,{label:C})}function w(S,C){if(!C||C.every(T=>T.message.trim().length===0)){const T=t.value.items?.[S];if(!T)return;const{tooltip:D,...A}=T,I=[...t.value.items??[]];I[S]=A,t.value={...t.value,items:I}}else h(S,{tooltip:C})}return(S,C)=>(k(),L("div",Mpt,[H("div",Rpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户标签","onUpdate:modelValue":C[0]||(C[0]=$=>{const T=String($??"");t.value={...t.value,displayName:T.length>0?T:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.tags`;写入值为已勾选选项值的数组",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:u.value,"onUpdate:modelValue":C[1]||(C[1]=$=>u.value=$),placeholder:"例:user.tags",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",Fpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":C[2]||(C[2]=$=>t.value={...t.value,label:$})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":C[3]||(C[3]=$=>t.value={...t.value,tooltip:$})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("items")??"复选框组可选项列表",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("items")),1)]),_:1}),H("div",zpt,[(k(!0),L(Me,null,Ke(d.value,($,T)=>(k(),L("div",{key:$.id,"data-slot":"checkbox-group-item",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"checkbox-group-item-delete","aria-label":"删除选项",class:"absolute right-2 top-2 z-10",onClick:D=>v(T)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"checkbox option label","model-value":$.label,"onUpdate:modelValue":D=>_(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"icon-sm","as-child":""},{default:f(()=>[H("button",Vpt,[c(s(fe),{icon:$.value.kind==="number"?"fluent:number-symbol-20-regular":"fluent:textbox-20-regular"},null,8,["icon"])])]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[c(s(Vo),{onSelect:D=>b(T,"text")},{default:f(()=>[c(s(fe),{icon:"fluent:textbox-20-regular"}),C[8]||(C[8]=H("span",null,"文本",-1))]),_:1},8,["onSelect"]),c(s(Vo),{onSelect:D=>b(T,"number")},{default:f(()=>[c(s(fe),{icon:"fluent:number-symbol-20-regular"}),C[9]||(C[9]=H("span",null,"数字",-1))]),_:1},8,["onSelect"])]),_:2},1024)]),_:2},1024)]),_:2},1024),$.value.kind==="text"?(k(),M(s(mt),{key:0,"model-value":$.value.value,placeholder:"例:cny","onUpdate:modelValue":D=>x(T,String(D??""))},null,8,["model-value","onUpdate:modelValue"])):(k(),M(s(wn),{key:1,"model-value":$.value.value,"onUpdate:modelValue":D=>y(T,D)},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1024)]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("tooltip")),1)]),_:2},[l("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"checkbox option tooltip","model-value":$.tooltip,"onUpdate:modelValue":D=>w(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"checkbox-group-add-item",class:"w-full justify-center",onClick:g},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),C[10]||(C[10]=H("span",null,"增加选项",-1))]),_:1})])]),_:1}),H("div",Npt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[4]||(C[4]=$=>t.value={...t.value,hidden:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时复选框仍然渲染但不可勾选",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[5]||(C[5]=$=>t.value={...t.value,disabled:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前已勾选选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[6]||(C[6]=$=>t.value={...t.value,readonly:$.length>0?$:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.defaultTags","onUpdate:modelValue":C[7]||(C[7]=$=>t.value={...t.value,derived:$})},null,8,["model-value"])]),_:1})]))}}),Bpt={class:"flex flex-col gap-3"},Upt={class:"grid grid-cols-2 gap-3"},qpt={class:"grid grid-cols-2 gap-3"},jpt={class:"flex flex-col gap-3"},Hpt={type:"button","data-slot":"radio-group-item-kind-trigger",class:"text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5","aria-label":"切换值类型"},Wpt={class:"grid grid-cols-3 gap-3"},Gpt=q({name:"ShwfedRadioGroupFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Soe(()=>{}),o=S=>Ln(n,S)??S,r=S=>Bn(n,S),a=e4(()=>{}),i=S=>Ln(a,S)??S,l=S=>Bn(a,S),u=E({get:()=>t.value.binding??"",set:S=>{const C=S.trim();if(C.length===0){const{binding:$,...T}=t.value;t.value=T}else t.value={...t.value,binding:C}}}),d=E(()=>t.value.items??[]);function p(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,S=>{const C=Math.random()*16|0;return(S==="x"?C:C&3|8).toString(16)})}function m(){return{id:p(),label:[{locale:"zh",message:""}],value:{kind:"text",value:""}}}function h(S,C){const $=[...t.value.items??[]],T=$[S];T&&($[S]={...T,...C},t.value={...t.value,items:$})}function g(){t.value={...t.value,items:[...t.value.items??[],m()]}}function v(S){const C=[...t.value.items??[]];C.splice(S,1),t.value={...t.value,items:C}}function b(S,C){const $=t.value.items?.[S];!$||$.value.kind===C||h(S,{value:C==="text"?{kind:"text",value:""}:{kind:"number",value:0}})}function x(S,C){h(S,{value:{kind:"text",value:C}})}function y(S,C){h(S,{value:{kind:"number",value:typeof C=="number"&&Number.isFinite(C)?C:0}})}function _(S,C){h(S,{label:C})}function w(S,C){if(!C||C.every(T=>T.message.trim().length===0)){const T=t.value.items?.[S];if(!T)return;const{tooltip:D,...A}=T,I=[...t.value.items??[]];I[S]=A,t.value={...t.value,items:I}}else h(S,{tooltip:C})}return(S,C)=>(k(),L("div",Bpt,[H("div",Upt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:用户角色","onUpdate:modelValue":C[0]||(C[0]=$=>{const T=String($??"");t.value={...t.value,displayName:T.length>0?T:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.role`;写入值为选中选项的值",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:u.value,"onUpdate:modelValue":C[1]||(C[1]=$=>u.value=$),placeholder:"例:user.role",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",qpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":C[2]||(C[2]=$=>t.value={...t.value,label:$})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":C[3]||(C[3]=$=>t.value={...t.value,tooltip:$})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("items")??"单选框组可选项列表",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("items")),1)]),_:1}),H("div",jpt,[(k(!0),L(Me,null,Ke(d.value,($,T)=>(k(),L("div",{key:$.id,"data-slot":"radio-group-item",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"radio-group-item-delete","aria-label":"删除选项",class:"absolute right-2 top-2 z-10",onClick:D=>v(T)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"radio option label","model-value":$.label,"onUpdate:modelValue":D=>_(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(Fr),null,{default:f(()=>[c(s(Vr),{"as-child":""},{default:f(()=>[c(s(Ct),{size:"icon-sm","as-child":""},{default:f(()=>[H("button",Hpt,[c(s(fe),{icon:$.value.kind==="number"?"fluent:number-symbol-20-regular":"fluent:textbox-20-regular"},null,8,["icon"])])]),_:2},1024)]),_:2},1024),c(s(zr),{align:"start"},{default:f(()=>[c(s(Vo),{onSelect:D=>b(T,"text")},{default:f(()=>[c(s(fe),{icon:"fluent:textbox-20-regular"}),C[8]||(C[8]=H("span",null,"文本",-1))]),_:1},8,["onSelect"]),c(s(Vo),{onSelect:D=>b(T,"number")},{default:f(()=>[c(s(fe),{icon:"fluent:number-symbol-20-regular"}),C[9]||(C[9]=H("span",null,"数字",-1))]),_:1},8,["onSelect"])]),_:2},1024)]),_:2},1024)]),_:2},1024),$.value.kind==="text"?(k(),M(s(mt),{key:0,"model-value":$.value.value,placeholder:"例:cny","onUpdate:modelValue":D=>x(T,String(D??""))},null,8,["model-value","onUpdate:modelValue"])):(k(),M(s(wn),{key:1,"model-value":$.value.value,"onUpdate:modelValue":D=>y(T,D)},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1024)]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("tooltip")),1)]),_:2},[l("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"radio option tooltip","model-value":$.tooltip,"onUpdate:modelValue":D=>w(T,D)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"radio-group-add-item",class:"w-full justify-center",onClick:g},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),C[10]||(C[10]=H("span",null,"增加选项",-1))]),_:1})])]),_:1}),H("div",Wpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[4]||(C[4]=$=>t.value={...t.value,hidden:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时单选框仍然渲染但不可选择",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[5]||(C[5]=$=>t.value={...t.value,disabled:$.length>0?$:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前选中选项的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":C[6]||(C[6]=$=>t.value={...t.value,readonly:$.length>0?$:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.defaultRole","onUpdate:modelValue":C[7]||(C[7]=$=>t.value={...t.value,derived:$})},null,8,["model-value"])]),_:1})]))}}),Kpt={class:"grid grid-cols-2 gap-3"},Ypt=q({name:"ShwfedTableFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=nv(()=>aa(()=>Promise.resolve().then(()=>J0t),void 0,import.meta.url)),n=Ot(e,"modelValue"),o=Fre(()=>{}),r=p=>Ln(o,p)??p,a=p=>Bn(o,p),i=Fn(n_,null);Pt(()=>{i&&(i.fullPane.value=!0)}),tr(()=>{i&&(i.fullPane.value=!1)});function l(p){sae(p)}const u=E({get:()=>{const{dataSource:p,...m}=n.value.table;return m},set:p=>{const{dataSource:m,...h}=p;n.value={...n.value,table:h}}}),d=E({get:()=>n.value.binding??"",set:p=>{const m=p.trim();if(m.length===0){const{binding:h,...g}=n.value;n.value=g}else n.value={...n.value,binding:m}}});return(p,m)=>(k(),M(s(t),{modelValue:u.value,"onUpdate:modelValue":m[4]||(m[4]=h=>u.value=h),configure:l,"hide-display-name":"","hide-data-source":""},{"general-extra":f(()=>[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(r("binding")),1)]),_:2},[a("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:a("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:d.value,"onUpdate:modelValue":m[0]||(m[0]=h=>d.value=h),placeholder:"例:rows",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1}),H("div",Kpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(r("label")),1)]),_:2},[a("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:a("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":n.value.label,"onUpdate:modelValue":m[1]||(m[1]=h=>n.value={...n.value,label:h})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(r("tooltip")),1)]),_:2},[a("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:a("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":n.value.tooltip,"onUpdate:modelValue":m[2]||(m[2]=h=>n.value={...n.value,tooltip:h})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:a("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(r("hidden")),1)]),_:1}),c(s(qe),{"model-value":n.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":m[3]||(m[3]=h=>n.value={...n.value,hidden:h.length>0?h:void 0})},null,8,["model-value"])]),_:1})]),_:1},8,["modelValue"]))}}),Jpt={class:"flex flex-col gap-2"},Xpt=q({name:"ShwfedCollapsibleFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Nre(()=>{}),o=p=>Ln(n,p)??p,r=p=>Bn(n,p),a=Fn(n_,null);Pt(()=>{a&&(a.fullPane.value=!0)}),tr(()=>{a&&(a.fullPane.value=!1)});const i=E({get:()=>t.value.unit,set:p=>{t.value={...t.value,unit:p}}}),l=[{id:"general",label:"通用配置",icon:"fluent:settings-20-regular"}],u=re({kind:"extras",id:"general"}),d=E({get:()=>t.value.defaultCollapsed??!1,set:p=>{if(p===!0)t.value={...t.value,defaultCollapsed:!0};else{const{defaultCollapsed:m,...h}=t.value;t.value=h}}});return(p,m)=>(k(),M(m4,{modelValue:i.value,"onUpdate:modelValue":m[3]||(m[3]=h=>i.value=h),selection:u.value,"onUpdate:selection":m[4]||(m[4]=h=>u.value=h),extras:l},{"extras-pane":f(()=>[H("div",Jpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:基本信息","onUpdate:modelValue":m[0]||(m[0]=h=>{const g=String(h??"");t.value={...t.value,displayName:g.length>0?g:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("header")),1)]),_:2},[r("header")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("header"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"折叠区域标题,行内 Markdown 文本,保留表达式插值占位符不要翻译","model-value":t.value.header,"onUpdate:modelValue":m[1]||(m[1]=h=>t.value={...t.value,header:h})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"horizontal",class:"h-9 w-auto gap-2"},{default:f(()=>[c(s(Lo),{modelValue:d.value,"onUpdate:modelValue":m[2]||(m[2]=h=>d.value=h)},null,8,["modelValue"]),c(s(N),{class:"text-sm text-zinc-600"},ee({default:f(()=>[P(" "+O(o("defaultCollapsed")),1)]),_:2},[r("defaultCollapsed")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("defaultCollapsed"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)]),_:1})])]),_:1},8,["modelValue","selection"]))}}),Zpt={class:"flex flex-col gap-3"},Qpt={class:"grid grid-cols-2 gap-3"},emt={class:"grid grid-cols-2 gap-3"},tmt={class:"text-xs font-medium text-zinc-500"},nmt={class:"grid grid-cols-2 gap-3"},omt={class:"grid grid-cols-2 gap-3"},rmt={class:"grid grid-cols-3 gap-3"},amt={class:"flex items-center gap-2"},imt={class:"text-xs font-medium text-zinc-500"},smt={key:0,class:"grid grid-cols-2 gap-3"},lmt={class:"grid grid-cols-3 gap-3"},umt=q({name:"ShwfedTreeMultiFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Ure(()=>{}),o=$=>Ln(n,$)??$,r=$=>Bn(n,$),a=P$(()=>{}),i=$=>Ln(a,$)??$,l=$=>Bn(a,$),u=n.fields.filter.from,d=$=>Ln(u,$)??$,p=$=>Bn(u,$),m={node:{type:"dyn",label:"当前节点",description:"由 `数据` 表达式返回的每一项;类型在配置时未知(`dyn`)"}},h={json:{type:"optional<dyn>",label:"HTTP 响应体",description:"已解析的 JSON 响应;未配置 `request` 时为 `none`"}},g=E({get:()=>t.value.binding??"",set:$=>{const T=$.trim();if(T.length===0){const{binding:D,...A}=t.value;t.value=A}else t.value={...t.value,binding:T}}}),v=[{value:"independent",label:"独立"},{value:"cascade-down",label:"向下级联"},{value:"cascade-both",label:"双向级联"}];function b($){t.value={...t.value,dataSource:{...t.value.dataSource,data:$}}}function x($){if($.trim().length===0){const{request:D,...A}=t.value.dataSource;t.value={...t.value,dataSource:A}}else t.value={...t.value,dataSource:{...t.value.dataSource,request:$}}}function y($,T){if(T.length===0){const{[$]:D,...A}=t.value;t.value=A}else t.value={...t.value,[$]:T}}const _=E(()=>t.value.filter);function w($){if($)t.value={...t.value,filter:{...t.value.filter??{},enabled:!0}};else{const{filter:T,...D}=t.value;t.value=D}}function S($){const T=t.value.filter;if(!T)return;if(!$||$.every(A=>A.message.trim().length===0)){const{label:A,...I}=T;t.value={...t.value,filter:I}}else t.value={...t.value,filter:{...T,label:$}}}function C($){const T=t.value.filter;if(T)if($.length===0){const{keywords:D,...A}=T;t.value={...t.value,filter:A}}else t.value={...t.value,filter:{...T,keywords:$}}}return($,T)=>(k(),L("div",Zpt,[H("div",Qpt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:所属部门","onUpdate:modelValue":T[0]||(T[0]=D=>{const A=String(D??"");t.value={...t.value,displayName:A.length>0?A:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("binding")),1)]),_:2},[r("binding")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("binding"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:g.value,"onUpdate:modelValue":T[1]||(T[1]=D=>g.value=D),placeholder:"例:user.departmentIds",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",emt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"form field label","model-value":t.value.label,"onUpdate:modelValue":T[2]||(T[2]=D=>t.value={...t.value,label:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"form field tooltip","model-value":t.value.tooltip,"onUpdate:modelValue":T[3]||(T[3]=D=>t.value={...t.value,tooltip:D})},null,8,["model-value"])]),_:1})]),H("h3",tmt,O(o("dataSource")),1),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("request")),1)]),_:2},[l("request")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("request"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.dataSource.request??"",placeholder:"如 http.get('/api/departments/tree')","result-type":"HttpRequest",multiline:"",class:"min-h-20","onUpdate:modelValue":x},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("data")),1)]),_:2},[l("data")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("data"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.dataSource.data,placeholder:"如 json.?value.roots.orValue([])","result-type":"list","extra-vars":h,"onUpdate:modelValue":b},null,8,["model-value"])]),_:1}),T[15]||(T[15]=H("h3",{class:"text-xs font-medium text-zinc-500"}," 节点 ",-1)),H("div",nmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeKey")),1)]),_:2},[r("nodeKey")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeKey"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.nodeKey,placeholder:"例:string(node.id)","result-type":["string","number","dyn"],"extra-vars":m,class:"min-h-10","onUpdate:modelValue":T[4]||(T[4]=D=>t.value={...t.value,nodeKey:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeChildren")),1)]),_:2},[r("nodeChildren")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeChildren"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.nodeChildren,placeholder:"例:has(node.children) ? node.children : null","result-type":"list","extra-vars":m,class:"min-h-10","onUpdate:modelValue":T[5]||(T[5]=D=>t.value={...t.value,nodeChildren:D})},null,8,["model-value"])]),_:1})]),H("div",omt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeLabel")),1)]),_:2},[r("nodeLabel")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeLabel"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"tree node label","model-value":t.value.nodeLabel,"onUpdate:modelValue":T[6]||(T[6]=D=>t.value={...t.value,nodeLabel:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeTooltip")),1)]),_:2},[r("nodeTooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeTooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","translate-hint":"tree node tooltip","model-value":t.value.nodeTooltip,"onUpdate:modelValue":T[7]||(T[7]=D=>t.value={...t.value,nodeTooltip:D})},null,8,["model-value"])]),_:1})]),H("div",rmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("nodeSelectable")),1)]),_:2},[r("nodeSelectable")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("nodeSelectable"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":t.value.nodeSelectable??"",placeholder:"例:node.kind == 'leaf'","result-type":"bool","extra-vars":m,class:"min-h-10","onUpdate:modelValue":T[8]||(T[8]=D=>y("nodeSelectable",D))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("cascade")),1)]),_:2},[r("cascade")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("cascade"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.cascade??"cascade-both","onUpdate:modelValue":T[9]||(T[9]=D=>t.value={...t.value,cascade:D})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(),L(Me,null,Ke(v,D=>c(s(Xn),{key:D.value,value:D.value},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("expandAll")),1)]),_:2},[r("expandAll")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("expandAll"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",null,[c(s(Lo),{"model-value":t.value.expandAll??!1,"onUpdate:modelValue":T[10]||(T[10]=D=>t.value={...t.value,expandAll:D})},null,8,["model-value"])])]),_:1})]),H("div",amt,[H("h3",imt,O(o("filter")),1),c(s(Lo),{size:"sm","model-value":_.value?.enabled??!1,"aria-label":d("enabled"),"onUpdate:modelValue":w},null,8,["model-value","aria-label"])]),_.value?.enabled?(k(),L("div",smt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d("label")),1)]),_:2},[p("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:p("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"tree filter input label","model-value":_.value.label,"onUpdate:modelValue":S},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d("keywords")),1)]),_:2},[p("keywords")?{name:"tooltip",fn:f(()=>[c(s(z),{source:p("keywords"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":_.value.keywords??"",placeholder:"例:[node.code, node.alias]","result-type":"list","extra-vars":m,class:"min-h-10","onUpdate:modelValue":C},null,8,["model-value"])]),_:1})])):ke("",!0),H("div",lmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[11]||(T[11]=D=>y("hidden",D))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时仍渲染但不可勾选",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[12]||(T[12]=D=>y("disabled",D))},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前已勾选节点的标签",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[13]||(T[13]=D=>y("readonly",D))},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:form.defaultDepartmentIds","onUpdate:modelValue":T[14]||(T[14]=D=>t.value={...t.value,derived:D})},null,8,["model-value"])]),_:1})]))}}),cmt={class:"flex flex-col gap-3"},dmt={class:"grid grid-cols-2 gap-3"},fmt={class:"grid grid-cols-3 gap-3"},pmt={class:"grid grid-cols-3 gap-3"},mmt={class:"grid grid-cols-3 gap-3"},hmt={class:"flex flex-col gap-3"},gmt={class:"grid grid-cols-3 gap-3"},vmt=q({name:"ShwfedMonthFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Hre(()=>{}),o=$=>Ln(n,$)??$,r=$=>Bn(n,$),a=f4(()=>{}),i=$=>Ln(a,$)??$,l=$=>Bn(a,$),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,$=>{const T=Math.random()*16|0;return($==="x"?T:T&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],value:""}}function m($,T){const D=[...t.value.presets??[]],A=D[$];A&&(D[$]={...A,...T},t.value={...t.value,presets:D})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g($){const T=[...t.value.presets??[]];T.splice($,1),t.value={...t.value,presets:T}}function v($,T){m($,{label:T})}function b($,T){m($,{value:T})}const x=E({get:()=>t.value.binding??"",set:$=>{const T=$.trim();if(T.length===0){const{binding:D,...A}=t.value;t.value=A}else t.value={...t.value,binding:T}}}),y=E({get:()=>t.value.format??"",set:$=>{const T=$.trim();if(T.length===0){const{format:D,...A}=t.value;t.value=A}else t.value={...t.value,format:T}}}),_=E({get:()=>t.value.valueFormat??"",set:$=>{const T=$.trim();if(T.length===0){const{valueFormat:D,...A}=t.value;t.value=A}else t.value={...t.value,valueFormat:T}}});function w($){if(!$)return"";try{return ir(new Date,$)}catch{return"(无效格式)"}}const S=E(()=>w(t.value.format??"")),C=E(()=>w(t.value.valueFormat??""));return($,T)=>(k(),L("div",cmt,[H("div",dmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:入职月份","onUpdate:modelValue":T[0]||(T[0]=D=>{const A=String(D??"");t.value={...t.value,displayName:A.length>0?A:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔,例如 `user.joinMonth`",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:x.value,"onUpdate:modelValue":T[1]||(T[1]=D=>x.value=D),placeholder:"例:user.joinMonth",class:"font-mono"},null,8,["modelValue"])]),_:1})]),_:1})]),H("div",fmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":T[2]||(T[2]=D=>t.value={...t.value,label:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("placeholder")),1)]),_:2},[r("placeholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("placeholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.placeholder,"onUpdate:modelValue":T[3]||(T[3]=D=>t.value={...t.value,placeholder:D})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":T[4]||(T[4]=D=>t.value={...t.value,tooltip:D})},null,8,["model-value"])]),_:1})]),H("div",pmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示月份的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:y.value,"onUpdate:modelValue":T[5]||(T[5]=D=>y.value=D),placeholder:"例:yyyy-MM",class:"font-mono"},null,8,["modelValue"]),S.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(S.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":T[6]||(T[6]=D=>_.value=D),placeholder:"例:yyyy-MM",class:"font-mono"},null,8,["modelValue"]),C.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(C.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),H("div",mmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":T[7]||(T[7]=D=>t.value={...t.value,orientation:D})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),D=>(k(),M(s(Xn),{key:D.value,value:D.value},{default:f(()=>[P(O(D.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",hmt,[(k(!0),L(Me,null,Ke(u.value,(D,A)=>(k(),L("div",{key:D.id,"data-slot":"month-field-preset",class:"relative pt-8 grid grid-cols-2 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"month-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:I=>g(A)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"month field preset label","model-value":D.label,"onUpdate:modelValue":I=>v(A,I)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("value")),1)]),_:2},[l("value")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("value"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":D.value,placeholder:'例:now.offset(-1, "months")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":I=>b(A,I)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"month-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),T[12]||(T[12]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",gmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[8]||(T[8]=D=>t.value={...t.value,hidden:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[9]||(T[9]=D=>t.value={...t.value,disabled:D.length>0?D:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":T[10]||(T[10]=D=>t.value={...t.value,readonly:D.length>0?D:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"string",placeholder:"例:form.startMonth","onUpdate:modelValue":T[11]||(T[11]=D=>t.value={...t.value,derived:D})},null,8,["model-value"])]),_:1})]))}}),ymt={class:"flex flex-col gap-3"},bmt={class:"grid grid-cols-2 gap-3"},_mt={key:1,class:"grid grid-cols-2 gap-2"},xmt={class:"grid grid-cols-2 gap-3"},wmt={class:"grid grid-cols-2 gap-3"},Smt={class:"grid grid-cols-3 gap-3"},kmt={class:"grid grid-cols-3 gap-3"},Cmt={class:"flex flex-col gap-3"},$mt={class:"grid grid-cols-3 gap-3"},Tmt=q({name:"ShwfedMonthRangeFieldConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=Kre(()=>{}),o=F=>Ln(n,F)??F,r=F=>Bn(n,F),a=p4(()=>{}),i=F=>Ln(a,F)??F,l=F=>Bn(a,F),u=E(()=>t.value.presets??[]);function d(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,F=>{const R=Math.random()*16|0;return(F==="x"?R:R&3|8).toString(16)})}function p(){return{id:d(),label:[{locale:"zh",message:""}],start:"",end:""}}function m(F,R){const G=[...t.value.presets??[]],Z=G[F];Z&&(G[F]={...Z,...R},t.value={...t.value,presets:G})}function h(){t.value={...t.value,presets:[...t.value.presets??[],p()]}}function g(F){const R=[...t.value.presets??[]];R.splice(F,1),t.value={...t.value,presets:R}}function v(F,R){m(F,{label:R})}function b(F,R){m(F,{start:R})}function x(F,R){m(F,{end:R})}const y=E(()=>Array.isArray(t.value.binding)?"split":"single"),_=E({get:()=>typeof t.value.binding=="string"?t.value.binding:"",set:F=>{const R=F.trim();if(R.length===0){const{binding:G,...Z}=t.value;t.value=Z}else t.value={...t.value,binding:R}}}),w=E(()=>Array.isArray(t.value.binding)?t.value.binding[0]:""),S=E(()=>Array.isArray(t.value.binding)?t.value.binding[1]:"");function C(F){const R=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[F.trim(),R[1]]}}function $(F){const R=Array.isArray(t.value.binding)?t.value.binding:["",""];t.value={...t.value,binding:[R[0],F.trim()]}}function T(){if(y.value==="single")t.value={...t.value,binding:["",""]};else{const{binding:F,...R}=t.value;t.value=R}}const D=E({get:()=>t.value.format??"",set:F=>{const R=F.trim();if(R.length===0){const{format:G,...Z}=t.value;t.value=Z}else t.value={...t.value,format:R}}}),A=E({get:()=>t.value.valueFormat??"",set:F=>{const R=F.trim();if(R.length===0){const{valueFormat:G,...Z}=t.value;t.value=Z}else t.value={...t.value,valueFormat:R}}});function I(F){const R=F.trim();if(R.length===0){const{rangeSeparatorIcon:G,...Z}=t.value;t.value=Z}else t.value={...t.value,rangeSeparatorIcon:R}}function U(F){if(!F)return"";try{return ir(new Date,F)}catch{return"(无效格式)"}}const j=E(()=>U(t.value.format??"")),Q=E(()=>U(t.value.valueFormat??""));return(F,R)=>(k(),L("div",ymt,[H("div",bmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("displayName")),1)]),_:2},[r("displayName")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("displayName"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ge),null,{default:f(()=>[c(s(mt),{"model-value":t.value.displayName??"",placeholder:"例:月份范围","onUpdate:modelValue":R[0]||(R[0]=G=>{const Z=String(G??"");t.value={...t.value,displayName:Z.length>0?Z:void 0}})},null,8,["model-value"])]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:"写入表单状态的嵌套键路径,使用 `.` 分隔。单路径模式写入 `[start, end]` 字符串数组;拆分模式分别写入起始与结束两端",block:"",class:"prose prose-sm prose-zinc"})]),default:f(()=>[P(" "+O(o("binding")),1)]),_:1}),y.value==="single"?(k(),M(s(Ge),{key:0},{default:f(()=>[c(s(mt),{modelValue:_.value,"onUpdate:modelValue":R[1]||(R[1]=G=>_.value=G),placeholder:"例:event.months",class:"font-mono"},null,8,["modelValue"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"拆分起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:split-horizontal-20-regular"})]),_:1})]),_:1})]),_:1})):(k(),L("div",_mt,[c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...R[15]||(R[15]=[P(" 起 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":w.value,placeholder:"例:event.startMonth",class:"font-mono","onUpdate:modelValue":R[2]||(R[2]=G=>C(String(G??"")))},null,8,["model-value"])]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[...R[16]||(R[16]=[P(" 止 ",-1)])]),_:1})]),_:1}),c(s(mt),{"model-value":S.value,placeholder:"例:event.endMonth",class:"font-mono","onUpdate:modelValue":R[3]||(R[3]=G=>$(String(G??"")))},null,8,["model-value"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"合并起止绑定路径",onClick:T},{default:f(()=>[c(s(fe),{icon:"fluent:merge-vertical-20-regular"})]),_:1})]),_:1})]),_:1})]))]),_:1})]),H("div",xmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("label")),1)]),_:2},[r("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.label,"onUpdate:modelValue":R[4]||(R[4]=G=>t.value={...t.value,label:G})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("tooltip")),1)]),_:2},[r("tooltip")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("tooltip"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{markdown:"","model-value":t.value.tooltip,"onUpdate:modelValue":R[5]||(R[5]=G=>t.value={...t.value,tooltip:G})},null,8,["model-value"])]),_:1})]),H("div",wmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("startPlaceholder")),1)]),_:2},[r("startPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("startPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.startPlaceholder,"onUpdate:modelValue":R[6]||(R[6]=G=>t.value={...t.value,startPlaceholder:G})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("endPlaceholder")),1)]),_:2},[r("endPlaceholder")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("endPlaceholder"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"model-value":t.value.endPlaceholder,"onUpdate:modelValue":R[7]||(R[7]=G=>t.value={...t.value,endPlaceholder:G})},null,8,["model-value"])]),_:1})]),H("div",Smt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("format")??"输入框中展示月份的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("format")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:D.value,"onUpdate:modelValue":R[8]||(R[8]=G=>D.value=G),placeholder:"例:yyyy-MM",class:"font-mono"},null,8,["modelValue"]),j.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(j.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("valueFormat")??"写入表单状态的 `date-fns` 格式串",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("valueFormat")),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:A.value,"onUpdate:modelValue":R[9]||(R[9]=G=>A.value=G),placeholder:"例:yyyy-MM",class:"font-mono"},null,8,["modelValue"]),Q.value?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(rr),{class:"text-xs text-zinc-400"},{default:f(()=>[P(O(Q.value),1)]),_:1})]),_:1})):ke("",!0)]),_:1})]),_:1})]),H("div",kmt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("orientation")),1)]),_:2},[r("orientation")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("orientation"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Yn),{"model-value":t.value.orientation??s(ko),"onUpdate:modelValue":R[10]||(R[10]=G=>t.value={...t.value,orientation:G})},{default:f(()=>[c(s(Zn),{class:"w-full"},{default:f(()=>[c(s(Qn))]),_:1}),c(s(Jn),null,{default:f(()=>[(k(!0),L(Me,null,Ke(s(Di),G=>(k(),M(s(Xn),{key:G.value,value:G.value},{default:f(()=>[P(O(G.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("rangeSeparatorIcon")??"范围两端之间分隔图标的 Iconify 名称",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("rangeSeparatorIcon")),1)]),_:1}),c(s(qc),{"model-value":t.value.rangeSeparatorIcon??"",placeholder:"例:lucide:arrow-right","onUpdate:modelValue":I},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(o("presets")),1)]),_:2},[r("presets")?{name:"tooltip",fn:f(()=>[c(s(z),{source:r("presets"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),H("div",Cmt,[(k(!0),L(Me,null,Ke(u.value,(G,Z)=>(k(),L("div",{key:G.id,"data-slot":"monthrange-field-preset",class:"relative pt-8 grid grid-cols-3 gap-3 rounded border border-zinc-200 bg-zinc-50/40 p-3"},[c(s(Ct),{variant:"destructive",size:"icon-xs","data-slot":"monthrange-field-preset-delete","aria-label":"删除预设",class:"absolute right-2 top-2 z-10",onClick:Y=>g(Z)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("label")),1)]),_:2},[l("label")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("label"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(Ye),{"translate-hint":"month range field preset label","model-value":G.label,"onUpdate:modelValue":Y=>v(Z,Y)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("start")),1)]),_:2},[l("start")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("start"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":G.start,placeholder:'例:now.offset(-3, "months")',"result-type":"Date",class:"min-h-10","onUpdate:modelValue":Y=>b(Z,Y)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i("end")),1)]),_:2},[l("end")?{name:"tooltip",fn:f(()=>[c(s(z),{source:l("end"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),c(s(qe),{"model-value":G.end,placeholder:"例:now","result-type":"Date",class:"min-h-10","onUpdate:modelValue":Y=>x(Z,Y)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)]))),128)),c(s(Rn),{type:"button","data-slot":"monthrange-field-add-preset",class:"w-full justify-center",onClick:h},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),R[17]||(R[17]=H("span",null,"增加快捷选项",-1))]),_:1})])]),_:1}),H("div",$mt,[c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("hidden")??"返回 `true` 时字段在所有布局中都不渲染",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("hidden")),1)]),_:1}),c(s(qe),{"model-value":t.value.hidden??"",placeholder:"例:form.role == 'guest'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":R[11]||(R[11]=G=>t.value={...t.value,hidden:G.length>0?G:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("disabled")??"返回 `true` 时输入框仍然渲染但不可编辑",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("disabled")),1)]),_:1}),c(s(qe),{"model-value":t.value.disabled??"",placeholder:"例:form.status == 'locked'","result-type":"bool",class:"min-h-10","onUpdate:modelValue":R[12]||(R[12]=G=>t.value={...t.value,disabled:G.length>0?G:void 0})},null,8,["model-value"])]),_:1}),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("readonly")??"返回 `true` 时仅以纯文本展示当前值",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("readonly")),1)]),_:1}),c(s(qe),{"model-value":t.value.readonly??"",placeholder:"例:form.id != null","result-type":"bool",class:"min-h-10","onUpdate:modelValue":R[13]||(R[13]=G=>t.value={...t.value,readonly:G.length>0?G:void 0})},null,8,["model-value"])]),_:1})]),c(s(V),{orientation:"vertical"},{default:f(()=>[c(s(N),{class:"text-xs text-zinc-500"},{tooltip:f(()=>[c(s(z),{source:r("derived"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:f(()=>[P(" "+O(o("derived")),1)]),_:1}),c(gr,{"model-value":t.value.derived,"result-type":"dyn",placeholder:"例:[form.from, form.to]","onUpdate:modelValue":R[14]||(R[14]=G=>t.value={...t.value,derived:G})},null,8,["model-value"])]),_:1})]))}}),Emt=q({name:"ShwfedMarkdownFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),o=E(()=>ut(t.config.content,n.value)??"");return(r,a)=>o.value?(k(),M(s(z),{key:0,source:o.value,block:"",class:"prose prose-sm prose-zinc max-w-none"},null,8,["source"])):ke("",!0)}}),Yre=Symbol("shwfed-form-readonly"),Dmt=re(!1);function Omt(e){fr(Yre,e)}function ma(){return Fn(Yre,Dmt)}const Amt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Imt=q({name:"ShwfedTextFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o}=dr(),r=vn(),a=(_,w)=>Ht(_,{...dn(r),...w}),i=E(()=>ut(t.config.label,n.value)),l=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),u=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function d(_,w){if(!_)return!1;try{return bt(a(_,{form:o.value??{}}))}catch(S){return console.error(`[shwfed-form] failed to evaluate ${w} for ${t.fieldId}:`,S),!1}}const p=E(()=>d(t.config.disabled,"disabled")),m=ma(),h=E(()=>t.config.readonly!=null?d(t.config.readonly,"readonly"):m.value),g=E(()=>h.value||t.config.derived?.mode==="formula"),{draft:v,commit:b}=t0({binding:()=>t.config.binding,fromState:_=>_==null?"":String(_),toState:_=>_.length===0?null:_}),x=E(()=>!p.value&&v.value.length>0);function y(){v.value="",b()}return(_,w)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":p.value||void 0},{default:f(()=>[i.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i.value),1)]),_:2},[u.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:u.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),g.value?(k(),L("div",Amt,O(s(v)||"—"),1)):(k(),M(s(Ge),{key:2,class:"group/text-field"},{default:f(()=>[c(s(mt),{id:e.fieldId,modelValue:s(v),"onUpdate:modelValue":w[0]||(w[0]=S=>jn(v)?v.value=S:null),placeholder:l.value,disabled:p.value,onBlur:s(b),onKeydown:Ro(s(b),["enter"])},null,8,["id","modelValue","placeholder","disabled","onBlur","onKeydown"]),x.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/text-field:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"text-field-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:w[1]||(w[1]=at(()=>{},["prevent"])),onClick:at(y,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1}))]),_:1},8,["orientation","data-disabled"]))}}),Pmt={key:1,class:"min-h-9 py-1.5 text-sm whitespace-pre-wrap text-zinc-700"},Mmt=q({name:"ShwfedTextareaFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o}=dr(),r=vn(),a=(x,y)=>Ht(x,{...dn(r),...y}),i=E(()=>ut(t.config.label,n.value)),l=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),u=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function d(x,y){if(!x)return!1;try{return bt(a(x,{form:o.value??{}}))}catch(_){return console.error(`[shwfed-form] failed to evaluate ${y} for ${t.fieldId}:`,_),!1}}const p=E(()=>d(t.config.disabled,"disabled")),m=ma(),h=E(()=>t.config.readonly!=null?d(t.config.readonly,"readonly"):m.value),g=E(()=>h.value||t.config.derived?.mode==="formula"),{draft:v,commit:b}=t0({binding:()=>t.config.binding,fromState:x=>x==null?"":String(x),toState:x=>x});return(x,y)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":p.value||void 0},{default:f(()=>[i.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i.value),1)]),_:2},[u.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:u.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),g.value?(k(),L("div",Pmt,O(s(v)||"—"),1)):(k(),M(s(Ge),{key:2},{default:f(()=>[c(s(BR),{id:e.fieldId,modelValue:s(v),"onUpdate:modelValue":y[0]||(y[0]=_=>jn(v)?v.value=_:null),placeholder:l.value,disabled:p.value,rows:e.config.rows,onBlur:s(b)},null,8,["id","modelValue","placeholder","disabled","rows","onBlur"])]),_:1}))]),_:1},8,["orientation","data-disabled"]))}}),Rmt=q({name:"ShwfedActionsFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,n=E(()=>({kind:"shwfed.component.action",size:"default",gap:t.config.gap,style:t.config.style,groups:t.config.groups.map(o=>({...o,variant:o.variant??"default"})),items:t.config.items}));return(o,r)=>(k(),M(A$,{config:n.value},null,8,["config"]))}}),Fmt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},zmt=q({name:"ShwfedComboboxSingleFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"combobox-single-placeholder":"请选择","combobox-single-search-placeholder":"搜索…","combobox-single-empty":"无匹配项"},en:{"combobox-single-placeholder":"Select…","combobox-single-search-placeholder":"Search…","combobox-single-empty":"No matches"},ja:{"combobox-single-placeholder":"選択してください","combobox-single-search-placeholder":"検索…","combobox-single-empty":"一致なし"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=(F,R)=>Ht(F,{...dn(l),...R}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):o("combobox-single-placeholder")),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(F,R){if(!F)return!1;try{return bt(u(F,{form:r.value??{}}))}catch(G){return console.error(`[shwfed-form] failed to evaluate ${R} for ${t.fieldId}:`,G),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula");function y(F){try{return bt(u(t.config.optionValue,{form:r.value??{},option:F}))}catch(R){console.error(`[shwfed-form] failed to evaluate optionValue for ${t.fieldId}:`,R);return}}function _(F){const R=ut(t.config.optionLabel,n.value)??"";return R?Ss(R,u,{form:r.value??{},option:F}):""}const w=E(()=>{let F;try{F=bt(u(t.config.options,{form:r.value??{}}))}catch(R){return console.error(`[shwfed-form] failed to evaluate options for ${t.fieldId}:`,R),[]}return Array.isArray(F)?F.map((R,G)=>({key:String(G),label:_(R),value:y(R)})):[]}),S=re(void 0),C=E({get:()=>{const F=t.config.binding;return F==null?S.value:a(F)},set:F=>{const R=t.config.binding;if(R==null){S.value=F;return}i(R,F)}});function $(F,R){if(F===R)return!0;if(F==null||R==null)return!1;if(typeof F=="object"&&typeof R=="object")try{return JSON.stringify(F)===JSON.stringify(R)}catch{return!1}return!1}const T=E(()=>w.value.find(F=>$(F.value,C.value))),D=E(()=>T.value?.key),A=E(()=>T.value?.label??""),I=re(!1);function U(F){if(typeof F!="string")return;const R=w.value.find(G=>G.key===F);R&&(C.value=R.value,It().then(()=>{I.value=!1}))}const j=E(()=>!g.value&&T.value!==void 0);function Q(){C.value=void 0,I.value=!1}return(F,R)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":g.value||void 0},{default:f(()=>[d.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",Fmt,O(A.value||"—"),1)):(k(),M(s(nc),{key:2,open:I.value,"onUpdate:open":R[1]||(R[1]=G=>I.value=G)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(s(Ge),{class:"group/combobox-single","data-disabled":g.value?"true":void 0},{default:f(()=>[c(s(ip),{"as-child":""},{default:f(()=>[c(s(mt),{id:e.fieldId,"model-value":A.value,disabled:g.value,placeholder:p.value,class:"cursor-pointer text-left",readonly:""},null,8,["id","model-value","disabled","placeholder"])]),_:1}),j.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"combobox-single-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:R[0]||(R[0]=at(()=>{},["prevent"])),onClick:at(Q,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"])]),_:1}),c(s(oc),{class:"p-0",style:{width:"var(--reka-popover-trigger-width)"}},{default:f(()=>[c(s(np),{"model-value":D.value,disabled:g.value,"selection-behavior":"toggle","onUpdate:modelValue":U},{default:f(()=>[c(s(Zm),{placeholder:s(o)("combobox-single-search-placeholder")},null,8,["placeholder"]),c(s(rp),null,{default:f(()=>[c(s(op),{class:"py-6 text-center text-sm text-zinc-500"},{default:f(()=>[P(O(s(o)("combobox-single-empty")),1)]),_:1}),c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(w.value,G=>(k(),M(s(ws),{key:G.key,value:G.key},{default:f(()=>[P(O(G.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["model-value","disabled"])]),_:1})]),_:1},8,["open"]))]),_:1},8,["orientation","data-disabled"]))}}),Vmt={class:"w-full flex items-center gap-1 absolute top-1/2 -translate-y-1/2 transform-gpu inset-x-0 justify-between z-10"},Nmt={key:0,class:"text-sm font-medium",style:{"text-autospace":"normal"}},Lmt={key:0,class:"grid grid-cols-4 gap-1 mt-4 w-full"},Bmt=["disabled","onClick"],Umt={key:1,class:"grid grid-cols-4 gap-1 mt-4 w-full"},qmt=["disabled","onClick"],jmt={key:2,class:"flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0"},M$=q({name:"UiCalendar",__name:"Calendar",props:{defaultValue:{},defaultPlaceholder:{},placeholder:{},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},locale:{},numberOfMonths:{},disabled:{type:Boolean},readonly:{type:Boolean},initialFocus:{type:Boolean},isDateDisabled:{},isDateUnavailable:{},dir:{},nextPage:{},prevPage:{},modelValue:{default:void 0},multiple:{type:Boolean},disableDaysOutsideCurrentView:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},layout:{default:void 0}},emits:["update:modelValue","update:placeholder"],setup(e,{emit:t}){const n=e,o=t,r=At(n,"class","layout","placeholder"),a=ao(n,"placeholder",o,{passive:!0,defaultValue:n.defaultPlaceholder??nd(_s())}),i=$8(),{locale:l}=un({useScope:"global",inheritLocale:!0}),u=E(()=>n.locale??l.value??i.language.value??"en"),d=R1(u.value);Xe(u,v=>{d.setLocale(v)});const p=Dn(r,o),m=E(()=>{const v=i.language.value;if(!i.isSupported||!v)return;const b=new Intl.Locale(v);if("getWeekInfo"in b&&typeof b.getWeekInfo=="function")return b.getWeekInfo().firstDay}),h=E(()=>Math.floor(a.value.year/12)*12);function g(v){const b=n.isDateDisabled;return typeof b!="function"?!1:b(v)}return(v,b)=>(k(),M(s(eNe),Oe(s(p),{placeholder:s(a),"onUpdate:placeholder":b[0]||(b[0]=x=>jn(a)?a.value=x:null),"data-slot":"calendar","week-starts-on":m.value,"fixed-weeks":"",locale:u.value,class:s(et)("p-3",n.class)}),{default:f(({grid:x,weekDays:y,date:_})=>[c(s(Xmt),{class:He(e.layout==="year"?"pt-2 pb-2":"pt-0")},{default:f(()=>[H("nav",Vmt,[c(s(eht),{"prev-page":e.layout==="year"?w=>w.subtract({years:12}):e.layout==="month"?w=>w.subtract({years:1}):void 0},{default:f(()=>[se(v.$slots,"calendar-prev-icon")]),_:3},8,["prev-page"]),c(s(Qmt),{"next-page":e.layout==="year"?w=>w.add({years:12}):e.layout==="month"?w=>w.add({years:1}):void 0},{default:f(()=>[se(v.$slots,"calendar-next-icon")]),_:3},8,["next-page"])]),se(v.$slots,"calendar-heading",{date:_},()=>[e.layout==="month"?(k(),L("span",Nmt,O(s(d).custom(s(Ar)(_),{year:"numeric"})),1)):e.layout==="year"?(k(),L(Me,{key:1},[],64)):(k(),M(s(Zmt),{key:2}))])]),_:2},1032,["class"]),e.layout==="month"?(k(),L("div",Lmt,[(k(),L(Me,null,Ke(12,w=>H("button",{key:w,type:"button",disabled:g(new(s(Kn))(s(a).year,w,1)),class:He(s(et)(s(jl)({variant:"ghost"}),"h-9 w-full rounded-md font-normal",e.modelValue&&!Array.isArray(e.modelValue)&&e.modelValue.year===s(a).year&&e.modelValue.month===w?"bg-[color-mix(in_srgb,var(--primary)_20%,white)] text-(--primary)":"",g(new(s(Kn))(s(a).year,w,1))?"text-zinc-500 opacity-50 cursor-default":"cursor-pointer")),onClick:S=>o("update:modelValue",new(s(Kn))(s(a).year,w,1))},O(s(d).custom(s(Ar)(new(s(Kn))(s(a).year,w,1)),{month:"short"})),11,Bmt)),64))])):e.layout==="year"?(k(),L("div",Umt,[(k(),L(Me,null,Ke(12,w=>H("button",{key:w,type:"button",disabled:g(new(s(Kn))(h.value+w-1,1,1)),class:He(s(et)(s(jl)({variant:"ghost"}),"h-9 w-full rounded-md font-normal",e.modelValue&&!Array.isArray(e.modelValue)&&e.modelValue.year===h.value+w-1?"bg-[color-mix(in_srgb,var(--primary)_20%,white)] text-(--primary)":"",g(new(s(Kn))(h.value+w-1,1,1))?"text-zinc-500 opacity-50 cursor-default":"cursor-pointer")),onClick:S=>o("update:modelValue",new(s(Kn))(h.value+w-1,1,1))},O(h.value+w-1),11,qmt)),64))])):(k(),L("div",jmt,[(k(!0),L(Me,null,Ke(x,w=>(k(),M(s(Gmt),{key:w.value.toString()},{default:f(()=>[c(s(Ymt),null,{default:f(()=>[c(s(QL),null,{default:f(()=>[(k(!0),L(Me,null,Ke(y,S=>(k(),M(s(Jmt),{key:S},{default:f(()=>[P(O(S),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024),c(s(Kmt),null,{default:f(()=>[(k(!0),L(Me,null,Ke(w.rows,(S,C)=>(k(),M(s(QL),{key:`weekDate-${C}`,class:"mt-2 w-full"},{default:f(()=>[(k(!0),L(Me,null,Ke(S,$=>(k(),M(s(Hmt),{key:$.toString(),date:$},{default:f(()=>[c(s(Wmt),{day:$,month:w.value},null,8,["day","month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024))),128))]))]),_:3},16,["placeholder","week-starts-on","locale","class"]))}}),Hmt=q({__name:"CalendarCell",props:{date:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(nNe),Oe({"data-slot":"calendar-cell",class:s(et)("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 flex-1",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Wmt=q({__name:"CalendarCellTrigger",props:{day:{},month:{},asChild:{type:Boolean},as:{default:"button"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(rNe),Oe({"data-slot":"calendar-cell-trigger",class:s(et)(s(jl)({variant:"ghost"}),"size-8 rounded-full p-0 font-normal text-center transition-all duration-180 aria-selected:opacity-100 cursor-pointer","[&[data-today]:not([data-selected])]:font-semibold [&[data-today]:not([data-selected])]:text-(--primary)","data-selected:bg-(--primary) data-selected:opacity-100 data-selected:text-white data-selected:hover:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selected:hover:text-white","data-disabled:text-zinc-500 data-disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:hover:bg-transparent data-disabled:hover:text-zinc-500","data-unavailable:text-zinc-300 data-unavailable:line-through","data-outside-view:text-zinc-300",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Gmt=q({__name:"CalendarGrid",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(iNe),Oe({"data-slot":"calendar-grid",class:s(et)("w-full border-collapse space-x-1",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Kmt=q({__name:"CalendarGridBody",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(k(),M(s(lNe),Oe({"data-slot":"calendar-grid-body"},t),{default:f(()=>[se(n.$slots,"default")]),_:3},16))}}),Ymt=q({__name:"CalendarGridHead",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(k(),M(s(cNe),Oe({"data-slot":"calendar-grid-head"},t),{default:f(()=>[se(n.$slots,"default")]),_:3},16))}}),QL=q({__name:"CalendarGridRow",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(fNe),Oe({"data-slot":"calendar-grid-row",class:s(et)("flex",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Jmt=q({__name:"CalendarHeadCell",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(mNe),Oe({"data-slot":"calendar-head-cell",class:s(et)("text-zinc-700 rounded-md flex-1 font-normal text-[0.8rem]",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Xmt=q({__name:"CalendarHeader",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(gNe),Oe({"data-slot":"calendar-header",class:s(et)("flex justify-center pt-1 relative items-center w-full px-8",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Zmt=q({__name:"CalendarHeading",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(yNe),Oe({"data-slot":"calendar-heading",class:s(et)("text-sm font-medium",t.class),style:{textAutospace:"normal"}},s(o)),{default:f(({headingValue:i})=>[se(r.$slots,"default",{headingValue:i},()=>[P(O(i),1)])]),_:3},16,["class"]))}}),Qmt=q({__name:"CalendarNextButton",props:{nextPage:{type:Function},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(_Ne),Oe({"data-slot":"calendar-next-button",class:s(et)(s(jl)({variant:"ghost",size:"sm"}),"bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"fluent:chevron-right-20-regular"})])]),_:3},16,["class"]))}}),eht=q({__name:"CalendarPrevButton",props:{prevPage:{type:Function},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(wNe),Oe({"data-slot":"calendar-prev-button",class:s(et)(s(jl)({variant:"ghost",size:"sm"}),"bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"fluent:chevron-left-20-regular"})])]),_:3},16,["class"]))}}),tht=q({name:"UiDatePickerDatePanel",__name:"DatePickerDatePanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(a){if(Array.isArray(a)){o("update:modelValue",a[0]);return}o("update:modelValue",a)}return(a,i)=>(k(),M(s(M$),{"data-slot":"date-picker-date-panel",class:He(s(et)(n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue,"is-date-disabled":n.isDateDisabled,"onUpdate:modelValue":r},{"calendar-prev-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),"calendar-next-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1},8,["class","model-value","default-placeholder","is-date-disabled"]))}}),au={Root:LBe,Header:ZBe,Heading:eUe,Grid:WBe,Cell:UBe,Next:nUe,Prev:rUe,GridBody:KBe,GridRow:JBe,CellTrigger:jBe},Ud={Root:wUe,Ellipsis:bUe,First:kUe,Last:$Ue,List:OUe,ListItem:IUe,Next:MUe,Prev:FUe},Hs={Input:L9e,Root:V9e},iu={Root:c7e,Header:w7e,Heading:k7e,Grid:g7e,Cell:f7e,Next:$7e,Prev:E7e,GridBody:y7e,GridRow:_7e,CellTrigger:m7e},nht={class:"border-zinc-200 flex items-center gap-2 border-t p-3"},oht={key:1,class:"text-zinc-400 select-none"},rht=q({name:"UiDatePickerDateTimePanel",__name:"DatePickerDateTimePanel",props:{modelValue:{},isDateDisabled:{},granularity:{default:"second"},hourCycle:{default:24},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=E(()=>{const u=n.modelValue;if(u)return new Kn(u.year,u.month,u.day)}),a=E(()=>{const u=n.modelValue;if(u)return new Hi(u.hour,u.minute,u.second)});function i(u){const d=Array.isArray(u)?u[0]:u;if(!d){o("update:modelValue",void 0);return}const p=n.modelValue,m="day"in d?d.day:1;o("update:modelValue",new ds(d.year,d.month,m,p?.hour??0,p?.minute??0,p?.second??0))}function l(u){if(!u){n.modelValue&&o("update:modelValue",new ds(n.modelValue.year,n.modelValue.month,n.modelValue.day,0,0,0));return}const d=u,p=n.modelValue;if(p){o("update:modelValue",new ds(p.year,p.month,p.day,d.hour,d.minute,d.second));return}const m=nd(_s());o("update:modelValue",new ds(m.year,m.month,m.day,d.hour,d.minute,d.second))}return(u,d)=>(k(),L("div",{"data-slot":"date-picker-datetime-panel",class:He(s(et)("flex flex-col",n.class))},[c(s(M$),{"model-value":r.value,"default-placeholder":r.value,"is-date-disabled":n.isDateDisabled,"onUpdate:modelValue":i},{"calendar-prev-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),"calendar-next-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1},8,["model-value","default-placeholder","is-date-disabled"]),H("div",nht,[c(s(fe),{icon:"lucide:clock",class:"text-zinc-500 size-4 shrink-0"}),c(s(Hs).Root,{"model-value":a.value,granularity:n.granularity,"hour-cycle":n.hourCycle,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 text-sm outline-none","onUpdate:modelValue":l},{default:f(({segments:p})=>[Array.isArray(p)?(k(!0),L(Me,{key:0},Ke(p,(m,h)=>(k(),L(Me,{key:`${m.part}-${h}`},[m.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:m.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(m.value),1)]),_:2},1032,["part"])):(k(),L("span",oht,O(m.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle"])])],2))}}),aht=q({name:"UiDatePickerInput",inheritAttrs:!1,__name:"DatePickerInput",props:{modelValue:{},format:{},placeholder:{},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},open:{type:Boolean},prefixIcon:{},clearIcon:{default:"fluent:dismiss-20-regular"},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","focus","blur","clear"],setup(e,{emit:t}){const n=e,o=E(()=>({sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-10 text-base"})[n.size]),r=t,a=re(""),i=re(!1);function l(){a.value=n.modelValue?ir(n.modelValue,n.format):""}Xe(()=>[n.modelValue,n.format],()=>{i.value||l()},{immediate:!0});function u(){const g=a.value.trim();if(!g){n.modelValue!==void 0&&r("update:modelValue",void 0);return}const v=_$(g,n.format,n.modelValue??new Date);if(!Jv(v)){l();return}r("update:modelValue",v)}function d(g){i.value=!0,r("focus",g)}function p(g){i.value=!1,u(),r("blur",g)}function m(){a.value="",r("update:modelValue",void 0),r("clear")}const h=E(()=>n.clearable&&!n.disabled&&!n.readonly&&n.modelValue!==void 0);return(g,v)=>(k(),M(s(Ge),Oe(g.$attrs,{"data-slot":"date-picker-input","data-disabled":n.disabled?"true":void 0,"data-state":n.open?"open":void 0,class:s(et)("group/date-picker-input",o.value,n.class)}),{default:f(()=>[n.prefixIcon?(k(),M(s(pt),{key:0,align:"inline-start"},{default:f(()=>[c(s(fe),{icon:n.prefixIcon},null,8,["icon"])]),_:1})):ke("",!0),c(s(mt),{"model-value":a.value,placeholder:n.placeholder,disabled:n.disabled,readonly:n.readonly,"onUpdate:modelValue":v[0]||(v[0]=b=>a.value=String(b)),onFocus:d,onBlur:p,onKeydown:Ro(at(u,["prevent"]),["enter"])},null,8,["model-value","placeholder","disabled","readonly","onKeydown"]),h.value?(k(),M(s(pt),{key:1,align:"inline-end",class:He(s(et)("[@media(hover:hover)]:opacity-0 transition-opacity","group-hover/date-picker-input:opacity-100 focus-within:opacity-100"))},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"date-picker-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:v[1]||(v[1]=at(()=>{},["prevent"])),onClick:at(m,["stop"])},{default:f(()=>[c(s(fe),{icon:n.clearIcon},null,8,["icon"])]),_:1})]),_:1},8,["class"])):ke("",!0)]),_:1},16,["data-disabled","data-state","class"]))}}),iht=q({name:"UiDatePickerMonthPanel",__name:"DatePickerMonthPanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(a){if(Array.isArray(a)){o("update:modelValue",a[0]);return}o("update:modelValue",a)}return(a,i)=>(k(),M(s(M$),{layout:"month","data-slot":"date-picker-month-panel",class:He(s(et)(n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue,"is-date-disabled":n.isDateDisabled,"onUpdate:modelValue":r},{"calendar-prev-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),"calendar-next-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1},8,["class","model-value","default-placeholder","is-date-disabled"]))}}),sht={key:1,class:"text-zinc-400 select-none"},lht=q({name:"UiDatePickerTimeInput",inheritAttrs:!1,__name:"DatePickerTimeInput",props:{modelValue:{},granularity:{default:"second"},hourCycle:{default:24},disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean,default:!0},prefixIcon:{},clearIcon:{default:"fluent:dismiss-20-regular"},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","clear"],setup(e,{emit:t}){const n=e,o=E(()=>({sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-10 text-base"})[n.size]),r=t,a=E(()=>n.clearable&&!n.disabled&&!n.readonly&&n.modelValue!==void 0);function i(u){r("update:modelValue",u??void 0)}function l(){r("update:modelValue",void 0),r("clear")}return(u,d)=>(k(),M(s(Ge),Oe(u.$attrs,{"data-slot":"date-picker-time-input","data-disabled":n.disabled?"true":void 0,class:s(et)("group/date-picker-input",o.value,n.class)}),{default:f(()=>[n.prefixIcon?(k(),M(s(pt),{key:0,align:"inline-start"},{default:f(()=>[c(s(fe),{icon:n.prefixIcon},null,8,["icon"])]),_:1})):ke("",!0),c(s(Hs).Root,{"data-slot":"input-group-control","model-value":n.modelValue,granularity:n.granularity,"hour-cycle":n.hourCycle,disabled:n.disabled,readonly:n.readonly,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50","onUpdate:modelValue":i},{default:f(({segments:p})=>[Array.isArray(p)?(k(!0),L(Me,{key:0},Ke(p,(m,h)=>(k(),L(Me,{key:`${m.part}-${h}`},[m.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:m.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(m.value),1)]),_:2},1032,["part"])):(k(),L("span",sht,O(m.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle","disabled","readonly"]),a.value?(k(),M(s(pt),{key:1,align:"inline-end",class:He(s(et)("[@media(hover:hover)]:opacity-0 transition-opacity","group-hover/date-picker-input:opacity-100 focus-within:opacity-100"))},{default:f(()=>[c(s(Ct),{size:"icon-xs","as-child":""},{default:f(()=>[H("button",{type:"button","data-slot":"date-picker-clear",class:"text-zinc-500 transition-colors hover:text-zinc-700",tabindex:"-1",onMousedown:d[0]||(d[0]=at(()=>{},["prevent"])),onClick:at(l,["stop"])},[c(s(fe),{icon:n.clearIcon},null,8,["icon"])],32)]),_:1})]),_:1},8,["class"])):ke("",!0)]),_:1},16,["data-disabled","class"]))}}),uht=q({name:"UiDatePickerYearPanel",__name:"DatePickerYearPanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(a){if(Array.isArray(a)){o("update:modelValue",a[0]);return}o("update:modelValue",a)}return(a,i)=>(k(),M(s(M$),{layout:"year","data-slot":"date-picker-year-panel",class:He(s(et)(n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue,"is-date-disabled":n.isDateDisabled,"onUpdate:modelValue":r},{"calendar-prev-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),"calendar-next-icon":f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1},8,["class","model-value","default-placeholder","is-date-disabled"]))}}),cht=["onClick"],Jre=q({name:"UiPickerShortcuts",__name:"PickerShortcuts",props:{items:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,r=$8(),a=E(()=>r.language.value?.split("-")[0]??"en");function i(l){return ut(l,a.value)??""}return(l,u)=>(k(),L("div",{"data-slot":"picker-shortcuts",class:He(s(et)("border-zinc-200 flex flex-wrap items-center gap-1 border-t px-2 py-2 text-xs",n.class))},[(k(!0),L(Me,null,Ke(n.items,(d,p)=>(k(),L("button",{key:p,type:"button",class:"text-zinc-700 hover:bg-zinc-100 hover:text-(--primary) cursor-pointer rounded px-2 py-1",onClick:m=>o("select",p)},O(i(d.name)),9,cht))),128))],2))}}),kb={date:{display:"yyyy-MM-dd",value:"yyyy-MM-dd"},datetime:{display:"yyyy-MM-dd HH:mm:ss",value:"yyyy-MM-dd HH:mm:ss"},year:{display:"yyyy",value:"yyyy"},month:{display:"yyyy-MM",value:"yyyy-MM"},time:{display:"HH:mm:ss",value:"HH:mm:ss"}},dht={class:"flex flex-col"},R$=q({name:"UiDatePicker",inheritAttrs:!1,__name:"DatePicker",props:{modelValue:{},defaultValue:{},type:{default:"date"},format:{},valueFormat:{},placeholder:{},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},disabledDate:{},timeGranularity:{default:"second"},hourCycle:{default:24},class:{type:[Boolean,null,String,Object,Array]},popoverClass:{type:[Boolean,null,String,Object,Array]},prefixIcon:{},clearIcon:{},shortcuts:{},size:{default:"md"}},emits:["update:modelValue","change","clear","focus","blur"],setup(e,{emit:t}){const n=e,o=t,r=ao(n,"modelValue",o,{passive:!0,defaultValue:n.defaultValue}),a=E(()=>n.valueFormat??kb[n.type].value),i=E(()=>n.format??kb[n.type].display);function l(I){if(I instanceof Hi){const U=new Date(2e3,0,1);return U.setHours(I.hour,I.minute,I.second,0),U}return new Date(I.year,I.month-1,"day"in I?I.day:1,"hour"in I?I.hour:0,"hour"in I?I.minute:0,"hour"in I?I.second:0)}function u(I,U){const j=I.getFullYear(),Q=I.getMonth()+1,F=I.getDate(),R=I.getHours(),G=I.getMinutes(),Z=I.getSeconds();switch(U){case"year":return new Kn(j,1,1);case"month":return new Kn(j,Q,1);case"datetime":return new ds(j,Q,F,R,G,Z);case"time":return new Hi(R,G,Z);default:return new Kn(j,Q,F)}}const d=E(()=>{const I=r.value;if(!I)return;const U=_$(I,a.value,new Date);if(Jv(U))return u(U,n.type)});function p(I){const U=I?ir(l(I),a.value):void 0;U!==r.value&&(r.value=U,o("change",U))}const m=E(()=>{const I=d.value;if(!(!I||I instanceof Hi))return l(I)}),h=E(()=>{const I=d.value;return I instanceof Hi?I:void 0}),g=E(()=>{const I=d.value;if(!(!I||I instanceof Hi))return I}),v=E(()=>{const I=d.value;if(!(!I||I instanceof Hi||!("hour"in I)))return I}),b=re(!1),x=Bb("anchor-el");function y(I){return I instanceof Node?x.value?.contains(I)??!1:!1}function _(I){const j=I.detail?.originalEvent?.target??null;y(j)&&I.preventDefault()}function w(I){!n.disabled&&!n.readonly&&(b.value=!0),o("focus",I)}function S(I){o("blur",I)}function C(){b.value=!1,o("clear")}function $(I){if(!I){p(void 0);return}p(u(I,n.type))}function T(I){p(I)}function D(I,U){p(I),U&&(b.value=!1)}function A(I){const U=n.shortcuts?.[I];if(!U)return;const j=typeof U.value=="function"?U.value():U.value;if(j===r.value){b.value=!1;return}r.value=j,o("change",j),b.value=!1}return(I,U)=>(k(),L("div",{ref:"anchor-el","data-slot":"date-picker",class:He(s(et)("w-full",n.class))},[n.type==="time"?(k(),M(lht,Oe({key:0},I.$attrs,{"model-value":h.value,granularity:n.timeGranularity,"hour-cycle":n.hourCycle,disabled:n.disabled,readonly:n.readonly,clearable:n.clearable,"prefix-icon":n.prefixIcon,"clear-icon":n.clearIcon,size:n.size,"onUpdate:modelValue":T,onClear:U[0]||(U[0]=j=>o("clear"))}),null,16,["model-value","granularity","hour-cycle","disabled","readonly","clearable","prefix-icon","clear-icon","size"])):(k(),M(s(nc),{key:1,open:b.value,"onUpdate:open":U[6]||(U[6]=j=>b.value=j)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(aht,Oe(I.$attrs,{"model-value":m.value,format:i.value,placeholder:n.placeholder,clearable:n.clearable,disabled:n.disabled,readonly:n.readonly,open:b.value,"prefix-icon":n.prefixIcon,"clear-icon":n.clearIcon,size:n.size,"onUpdate:modelValue":$,onFocus:w,onBlur:S,onClear:C}),null,16,["model-value","format","placeholder","clearable","disabled","readonly","open","prefix-icon","clear-icon","size"])]),_:1}),c(s(oc),{align:"start",class:He(s(et)("w-auto p-0",n.popoverClass)),onOpenAutoFocus:U[5]||(U[5]=j=>j.preventDefault()),onInteractOutside:_},{default:f(()=>[H("div",dht,[n.type==="date"?(k(),M(tht,{key:0,"model-value":g.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":U[1]||(U[1]=j=>D(j,!0))},null,8,["model-value","is-date-disabled"])):n.type==="month"?(k(),M(iht,{key:1,"model-value":g.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":U[2]||(U[2]=j=>D(j,!0))},null,8,["model-value","is-date-disabled"])):n.type==="year"?(k(),M(uht,{key:2,"model-value":g.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":U[3]||(U[3]=j=>D(j,!0))},null,8,["model-value","is-date-disabled"])):n.type==="datetime"?(k(),M(rht,{key:3,"model-value":v.value,"is-date-disabled":n.disabledDate,granularity:n.timeGranularity,"hour-cycle":n.hourCycle,"onUpdate:modelValue":U[4]||(U[4]=j=>D(j,!1))},null,8,["model-value","is-date-disabled","granularity","hour-cycle"])):ke("",!0),n.shortcuts&&n.shortcuts.length>0?(k(),M(Jre,{key:4,items:n.shortcuts,onSelect:A},null,8,["items"])):ke("",!0)])]),_:1},8,["class"])]),_:1},8,["open"]))],2))}}),fht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},pht=q({name:"ShwfedDateFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(S,C)=>Ht(S,{...dn(i),...C}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m(S,C){if(!S)return!1;try{return bt(l(S,{form:o.value??{}}))}catch($){return console.error(`[shwfed-form] failed to evaluate ${C} for ${t.fieldId}:`,$),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula"),x=E(()=>t.config.valueFormat??kb.date.value),y=E(()=>{const S=t.config.presets;if(!(!S||S.length===0))return S.map(C=>({name:C.label,value:()=>{try{const $=bt(l(C.value,{form:o.value??{}}));return ir($,x.value)}catch($){return console.error(`[shwfed-form] failed to evaluate preset "${C.value}" for ${t.fieldId}:`,$),""}}}))}),_=re(void 0),w=E({get:()=>{const S=t.config.binding;if(S==null)return _.value;const C=r(S);return typeof C=="string"&&C.length>0?C:void 0},set:S=>{const C=t.config.binding;if(C==null){_.value=S;return}a(C,S)}});return(S,C)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":h.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),b.value?(k(),L("div",fht,O(w.value||"—"),1)):(k(),M(s(R$),{key:2,id:e.fieldId,modelValue:w.value,"onUpdate:modelValue":C[0]||(C[0]=$=>w.value=$),type:"date",format:e.config.format,"value-format":e.config.valueFormat,placeholder:d.value,disabled:h.value,shortcuts:y.value},null,8,["id","modelValue","format","value-format","placeholder","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),mht={class:"flex items-center gap-1"},hht={class:"flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0"},Xre=q({__name:"RangeCalendar",props:{defaultPlaceholder:{},defaultValue:{},modelValue:{},placeholder:{},allowNonContiguousRanges:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},maximumDays:{},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},locale:{},numberOfMonths:{},disabled:{type:Boolean},readonly:{type:Boolean},initialFocus:{type:Boolean},isDateDisabled:{type:Function},isDateUnavailable:{type:Function},isDateHighlightable:{type:Function},dir:{},nextPage:{type:Function},prevPage:{type:Function},disableDaysOutsideCurrentView:{type:Boolean},fixedDate:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","update:validModelValue","update:placeholder","update:startValue"],setup(e,{emit:t}){const n=e,o=t,r=At(n,"class"),a=Dn(r,o),i=$8(),{locale:l}=un({useScope:"global",inheritLocale:!0}),u=E(()=>n.locale??l.value??i.language.value??"en");return(d,p)=>(k(),M(s(ZLe),Oe({"data-slot":"range-calendar",class:s(et)("p-3",n.class),"fixed-weeks":""},s(a),{locale:u.value}),{default:f(({grid:m,weekDays:h})=>[c(s(wht),null,{default:f(()=>[c(s(Sht)),H("div",mht,[c(s(Cht)),c(s(kht))])]),_:1}),H("div",hht,[(k(!0),L(Me,null,Ke(m,g=>(k(),M(s(yht),{key:g.value.toString()},{default:f(()=>[c(s(_ht),null,{default:f(()=>[c(s(eB),null,{default:f(()=>[(k(!0),L(Me,null,Ke(h,v=>(k(),M(s(xht),{key:v},{default:f(()=>[P(O(v),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024),c(s(bht),null,{default:f(()=>[(k(!0),L(Me,null,Ke(g.rows,(v,b)=>(k(),M(s(eB),{key:`weekDate-${b}`,class:"mt-2 w-full"},{default:f(()=>[(k(!0),L(Me,null,Ke(v,x=>(k(),M(s(ght),{key:x.toString(),date:x},{default:f(()=>[c(s(vht),{day:x,month:g.value},null,8,["day","month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024))),128))])]),_:1},16,["class","locale"]))}}),ght=q({__name:"RangeCalendarCell",props:{date:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(eBe),Oe({"data-slot":"range-calendar-cell",class:s(et)("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 flex-1","[--bar-left:0px] [--bar-right:0px]","[&:has([data-selection-start]):not(:has([data-highlighted]))]:[--bar-left:50%]","[&:has([data-selection-end]):not(:has([data-highlighted]))]:[--bar-right:50%]","[&:has([data-highlighted-start])]:[--bar-left:50%]","[&:has([data-highlighted-end])]:[--bar-right:50%]","before:pointer-events-none before:absolute before:top-1/2 before:-translate-y-1/2","before:h-8 before:z-0","before:left-[var(--bar-left)] before:right-[var(--bar-right)]","before:bg-[color-mix(in_srgb,var(--primary)_15%,white)]","before:hidden","[&:has([data-selected])]:before:block [&:has([data-highlighted])]:before:block","[&:has([data-selection-start][data-selection-end])]:before:hidden","[&:has([data-highlighted-start][data-highlighted-end])]:before:hidden",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),vht=q({__name:"RangeCalendarCellTrigger",props:{day:{},month:{},asChild:{type:Boolean},as:{default:"button"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(nBe),Oe({"data-slot":"range-calendar-trigger",class:s(et)(s(jl)({variant:"ghost"}),"relative z-10 size-8 rounded-full p-0 font-normal text-center cursor-pointer data-selected:opacity-100","[&[data-today]:not([data-selected])]:font-semibold [&[data-today]:not([data-selected])]:text-(--primary)","data-selection-start:bg-(--primary) data-selection-start:text-white data-selection-start:hover:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selection-start:hover:text-white data-selection-start:focus:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selection-start:focus:text-white","data-selection-end:bg-(--primary) data-selection-end:text-white data-selection-end:hover:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selection-end:hover:text-white data-selection-end:focus:bg-[color-mix(in_srgb,var(--primary)_80%,white)] data-selection-end:focus:text-white","data-highlighted-start:bg-(--primary) data-highlighted-start:text-white","data-highlighted-end:bg-(--primary) data-highlighted-end:text-white","data-outside-view:text-zinc-300","data-disabled:text-zinc-300 data-disabled:opacity-50","data-unavailable:text-zinc-300 data-unavailable:line-through",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),yht=q({__name:"RangeCalendarGrid",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(rBe),Oe({"data-slot":"range-calendar-grid",class:s(et)("w-full border-collapse space-x-1",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),bht=q({__name:"RangeCalendarGridBody",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(k(),M(s(iBe),Oe({"data-slot":"range-calendar-grid-body"},t),{default:f(()=>[se(n.$slots,"default")]),_:3},16))}}),_ht=q({__name:"RangeCalendarGridHead",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(k(),M(s(lBe),Oe({"data-slot":"range-calendar-grid-head"},t),{default:f(()=>[se(n.$slots,"default")]),_:3},16))}}),eB=q({__name:"RangeCalendarGridRow",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(cBe),Oe({"data-slot":"range-calendar-grid-row",class:s(et)("flex w-full",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),xht=q({__name:"RangeCalendarHeadCell",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(fBe),Oe({"data-slot":"range-calendar-head-cell",class:s(et)("flex-1 rounded-md text-[0.8rem] font-normal text-zinc-300",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),wht=q({__name:"RangeCalendarHeader",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(mBe),Oe({"data-slot":"range-calendar-header",class:s(et)("flex justify-center pt-1 relative items-center w-full",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default")]),_:3},16,["class"]))}}),Sht=q({__name:"RangeCalendarHeading",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(gBe),Oe({"data-slot":"range-calendar-heading",class:s(et)("text-sm font-medium",t.class)},s(o)),{default:f(({headingValue:i})=>[se(r.$slots,"default",{headingValue:i},()=>[P(O(i),1)])]),_:3},16,["class"]))}}),kht=q({__name:"RangeCalendarNextButton",props:{nextPage:{type:Function},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(yBe),Oe({"data-slot":"range-calendar-next-button",class:s(et)(s(jl)({variant:"ghost"}),"absolute right-1","size-7 bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"fluent:chevron-right-20-regular"})])]),_:3},16,["class"]))}}),Cht=q({__name:"RangeCalendarPrevButton",props:{prevPage:{type:Function},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(_Be),Oe({"data-slot":"range-calendar-prev-button",class:s(et)(s(jl)({variant:"ghost"}),"absolute left-1","size-7 bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},s(o)),{default:f(()=>[se(r.$slots,"default",{},()=>[c(s(fe),{icon:"fluent:chevron-left-20-regular"})])]),_:3},16,["class"]))}}),$ht=q({name:"UiDateRangePickerDatePanel",__name:"DateRangePickerDatePanel",props:{modelValue:{},isDateDisabled:{type:Function},numberOfMonths:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(a){o("update:modelValue",a)}return(a,i)=>(k(),M(s(Xre),{"data-slot":"date-range-picker-date-panel",class:He(s(et)(n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue?.start,"is-date-disabled":n.isDateDisabled,"number-of-months":n.numberOfMonths??2,"onUpdate:modelValue":r},null,8,["class","model-value","default-placeholder","is-date-disabled","number-of-months"]))}}),Tht={class:"border-zinc-200 flex items-center gap-2 border-t p-3"},Eht={key:1,class:"text-zinc-400 select-none"},Dht={key:1,class:"text-zinc-400 select-none"},Oht=q({name:"UiDateRangePickerDateTimePanel",__name:"DateRangePickerDateTimePanel",props:{modelValue:{},isDateDisabled:{},granularity:{default:"second"},hourCycle:{default:24},numberOfMonths:{default:2},rangeSeparatorIcon:{default:"lucide:arrow-right"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t;function r(g){if(g)return new Kn(g.year,g.month,"day"in g?g.day:1)}function a(g){if(!(!g||!("hour"in g)))return new Hi(g.hour,g.minute,g.second)}const i=E(()=>({start:r(n.modelValue?.start),end:r(n.modelValue?.end)})),l=E(()=>a(n.modelValue?.start)),u=E(()=>a(n.modelValue?.end));function d(g,v){if(g)return new ds(g.year,g.month,"day"in g?g.day:1,v?.hour??0,v?.minute??0,v?.second??0)}function p(g){if(!g){o("update:modelValue",void 0);return}o("update:modelValue",{start:d(g.start,l.value),end:d(g.end,u.value)})}function m(g){const v=g??void 0,b=n.modelValue?.start??r(nd(_s()));b&&o("update:modelValue",{start:d(b,v),end:n.modelValue?.end})}function h(g){const v=g??void 0,b=n.modelValue?.end??r(nd(_s()));b&&o("update:modelValue",{start:n.modelValue?.start,end:d(b,v)})}return(g,v)=>(k(),L("div",{"data-slot":"date-range-picker-datetime-panel",class:He(s(et)("flex flex-col",n.class))},[c(s(Xre),{"model-value":i.value,"default-placeholder":i.value.start,"is-date-disabled":n.isDateDisabled,"number-of-months":n.numberOfMonths,"onUpdate:modelValue":p},null,8,["model-value","default-placeholder","is-date-disabled","number-of-months"]),H("div",Tht,[c(s(fe),{icon:"lucide:clock",class:"text-zinc-500 size-4 shrink-0"}),c(s(Hs).Root,{"model-value":l.value,granularity:n.granularity,"hour-cycle":n.hourCycle,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 text-sm outline-none","onUpdate:modelValue":m},{default:f(({segments:b})=>[Array.isArray(b)?(k(!0),L(Me,{key:0},Ke(b,(x,y)=>(k(),L(Me,{key:`s-${x.part}-${y}`},[x.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:x.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(x.value),1)]),_:2},1032,["part"])):(k(),L("span",Eht,O(x.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle"]),c(s(fe),{icon:n.rangeSeparatorIcon,class:"text-zinc-400 size-3.5 shrink-0"},null,8,["icon"]),c(s(Hs).Root,{"model-value":u.value,granularity:n.granularity,"hour-cycle":n.hourCycle,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 text-sm outline-none","onUpdate:modelValue":h},{default:f(({segments:b})=>[Array.isArray(b)?(k(!0),L(Me,{key:0},Ke(b,(x,y)=>(k(),L(Me,{key:`e-${x.part}-${y}`},[x.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:x.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(x.value),1)]),_:2},1032,["part"])):(k(),L("span",Dht,O(x.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle"])])],2))}}),Aht=["data-disabled","data-value","data-state"],Iht=["placeholder","disabled","readonly"],Pht=["placeholder","disabled","readonly"],Mht=q({name:"UiDateRangePickerInput",inheritAttrs:!1,__name:"DateRangePickerInput",props:{startValue:{},endValue:{},format:{},startPlaceholder:{},endPlaceholder:{},rangeSeparatorIcon:{},prefixIcon:{},clearIcon:{default:"fluent:dismiss-20-regular"},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},open:{type:Boolean},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:startValue","update:endValue","focus","blur","clear"],setup(e,{emit:t}){const n=e,o=E(()=>({sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-10 text-base"})[n.size]),r=t,a=re(""),i=re(""),l=re(null);function u(){a.value=n.startValue?ir(n.startValue,n.format):""}function d(){i.value=n.endValue?ir(n.endValue,n.format):""}Xe(()=>[n.startValue,n.format],()=>{l.value!=="start"&&u()},{immediate:!0}),Xe(()=>[n.endValue,n.format],()=>{l.value!=="end"&&d()},{immediate:!0});function p(x){const y=x==="start"?a:i,_=x==="start"?n.startValue:n.endValue,w=x==="start"?u:d,S=y.value.trim();if(!S){_!==void 0&&r(x==="start"?"update:startValue":"update:endValue",void 0);return}const C=_$(S,n.format,_??new Date);if(!Jv(C)){w();return}r(x==="start"?"update:startValue":"update:endValue",C)}function m(x,y){l.value=y,r("focus",x,y)}function h(x,y){l.value=null,p(y),r("blur",x,y)}function g(){a.value="",i.value="",r("update:startValue",void 0),r("update:endValue",void 0),r("clear")}const v=E(()=>n.clearable&&!n.disabled&&!n.readonly&&(n.startValue!==void 0||n.endValue!==void 0)),b=E(()=>n.startValue!==void 0||n.endValue!==void 0);return(x,y)=>(k(),L("div",Oe(x.$attrs,{"data-slot":"date-range-picker-input","data-disabled":n.disabled?"true":void 0,"data-value":b.value?"true":void 0,"data-state":n.open?"open":void 0,class:s(et)("group/date-range-input","border-zinc-200 relative flex w-full min-w-0 items-center rounded-md border bg-transparent transition-[color,box-shadow] outline-none","data-[disabled=true]:bg-zinc-100","has-[input:focus-visible]:border-(--primary)","hover:border-zinc-300",o.value,n.class)}),[n.prefixIcon?(k(),M(s(fe),{key:0,icon:n.prefixIcon,class:"text-zinc-500 ml-3 mr-1 size-4 shrink-0"},null,8,["icon"])):ke("",!0),sm(H("input",{"onUpdate:modelValue":y[0]||(y[0]=_=>a.value=_),"data-slot":"input-group-control","data-side":"start",placeholder:n.startPlaceholder,disabled:n.disabled,readonly:n.readonly,class:He(s(et)("text-zinc-700 placeholder:text-zinc-300 min-w-0 flex-1 bg-transparent px-1 text-sm outline-none disabled:cursor-not-allowed text-center",!n.prefixIcon&&"pl-3")),onFocus:y[1]||(y[1]=_=>m(_,"start")),onBlur:y[2]||(y[2]=_=>h(_,"start")),onKeydown:y[3]||(y[3]=Ro(at(_=>p("start"),["prevent"]),["enter"]))},null,42,Iht),[[Mw,a.value]]),n.rangeSeparatorIcon?(k(),M(s(fe),{key:1,icon:n.rangeSeparatorIcon,"data-slot":"date-range-picker-input-separator",class:"text-zinc-400 mx-1 size-3.5 shrink-0"},null,8,["icon"])):ke("",!0),sm(H("input",{"onUpdate:modelValue":y[4]||(y[4]=_=>i.value=_),"data-slot":"input-group-control","data-side":"end",placeholder:n.endPlaceholder,disabled:n.disabled,readonly:n.readonly,class:He(s(et)("text-zinc-700 placeholder:text-zinc-300 min-w-0 flex-1 bg-transparent px-1 text-sm outline-none disabled:cursor-not-allowed text-center",!v.value&&"pr-3")),onFocus:y[5]||(y[5]=_=>m(_,"end")),onBlur:y[6]||(y[6]=_=>h(_,"end")),onKeydown:y[7]||(y[7]=Ro(at(_=>p("end"),["prevent"]),["enter"]))},null,42,Pht),[[Mw,i.value]]),v.value?(k(),M(s(Ct),{key:2,size:"icon-xs","data-slot":"date-range-picker-clear",tabindex:"-1",class:He(s(et)("mr-2 shrink-0 text-zinc-500 hover:text-zinc-700 transition-opacity","[@media(hover:hover)]:opacity-0","group-hover/date-range-input:opacity-100 focus-within:opacity-100")),onMousedown:y[8]||(y[8]=at(()=>{},["prevent"])),onClick:at(g,["stop"])},{default:f(()=>[c(s(fe),{icon:n.clearIcon},null,8,["icon"])]),_:1},8,["class"])):ke("",!0)],16,Aht))}}),Rht={class:"w-full flex items-center gap-1 absolute top-1/2 -translate-y-1/2 transform-gpu inset-x-0 justify-between z-10"},Fht=q({name:"UiDateRangePickerMonthPanel",__name:"DateRangePickerMonthPanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,{locale:r}=un({useScope:"global",inheritLocale:!0});function a(i){o("update:modelValue",i)}return(i,l)=>(k(),M(s(au).Root,{"data-slot":"date-range-picker-month-panel",class:He(s(et)("p-3",n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue?.start,"is-month-disabled":n.isDateDisabled,locale:s(r),"onUpdate:modelValue":a},{default:f(({grid:u})=>[c(s(au).Header,{class:"pt-2 pb-2 relative"},{default:f(()=>[H("nav",Rht,[c(s(au).Prev,null,{default:f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),_:1}),c(s(au).Next,null,{default:f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1})]),c(s(au).Heading,{class:"text-sm font-medium text-center w-full"})]),_:1}),c(s(au).Grid,{class:"mt-4 w-full"},{default:f(()=>[c(s(au).GridBody,null,{default:f(()=>[(k(!0),L(Me,null,Ke(u.rows,(d,p)=>(k(),M(s(au).GridRow,{key:`mrow-${p}`,class:"grid grid-cols-4 gap-1 mb-1 last:mb-0"},{default:f(()=>[(k(!0),L(Me,null,Ke(d,m=>(k(),M(s(au).Cell,{key:m.toString(),date:m},{default:f(()=>[c(s(au).CellTrigger,{month:m,class:"block w-full"},{default:f(({monthValue:h,disabled:g,selected:v,selectionStart:b,selectionEnd:x,highlighted:y})=>[H("span",{class:He(s(et)("flex h-9 w-full items-center justify-center rounded-md text-sm font-normal cursor-pointer","hover:bg-zinc-100",v||b||x?"bg-(--primary) text-white hover:bg-(--primary)":"",y&&!v?"bg-[color-mix(in_srgb,var(--primary)_20%,white)] text-(--primary) hover:bg-[color-mix(in_srgb,var(--primary)_25%,white)]":"",g?"text-zinc-400 opacity-50 cursor-default":""))},O(h),3)]),_:1},8,["month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:1},8,["class","model-value","default-placeholder","is-month-disabled","locale"]))}}),zht=["data-disabled"],Vht={key:1,class:"text-zinc-400 select-none"},Nht={key:1,class:"text-zinc-400 select-none"},Lht=q({name:"UiDateRangePickerTimeInput",inheritAttrs:!1,__name:"DateRangePickerTimeInput",props:{startValue:{},endValue:{},granularity:{default:"second"},hourCycle:{default:24},rangeSeparatorIcon:{default:"lucide:arrow-right"},prefixIcon:{},clearIcon:{default:"fluent:dismiss-20-regular"},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:startValue","update:endValue","clear"],setup(e,{emit:t}){const n=e,o=E(()=>({sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-10 text-base"})[n.size]),r=t;function a(d){r("update:startValue",d??void 0)}function i(d){r("update:endValue",d??void 0)}function l(){r("update:startValue",void 0),r("update:endValue",void 0),r("clear")}const u=E(()=>n.clearable&&!n.disabled&&!n.readonly&&(n.startValue!==void 0||n.endValue!==void 0));return(d,p)=>(k(),L("div",Oe(d.$attrs,{"data-slot":"date-range-picker-time-input","data-disabled":n.disabled?"true":void 0,class:s(et)("group/date-range-time-input","border-zinc-200 relative flex w-full min-w-0 items-center rounded-md border bg-transparent transition-[color,box-shadow] outline-none","data-[disabled=true]:bg-zinc-100","has-[[data-reka-time-field-input]:focus]:border-(--primary)","hover:border-zinc-300",o.value,n.class)}),[n.prefixIcon?(k(),M(s(fe),{key:0,icon:n.prefixIcon,class:"text-zinc-500 ml-3 mr-1 size-4 shrink-0"},null,8,["icon"])):ke("",!0),c(s(Hs).Root,{"data-slot":"date-range-picker-time-start","model-value":n.startValue,granularity:n.granularity,"hour-cycle":n.hourCycle,disabled:n.disabled,readonly:n.readonly,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50","onUpdate:modelValue":a},{default:f(({segments:m})=>[Array.isArray(m)?(k(!0),L(Me,{key:0},Ke(m,(h,g)=>(k(),L(Me,{key:`s-${h.part}-${g}`},[h.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:h.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(h.value),1)]),_:2},1032,["part"])):(k(),L("span",Vht,O(h.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle","disabled","readonly"]),c(s(fe),{icon:n.rangeSeparatorIcon,"data-slot":"date-range-picker-time-separator",class:"text-zinc-400 size-3.5 shrink-0"},null,8,["icon"]),c(s(Hs).Root,{"data-slot":"date-range-picker-time-end","model-value":n.endValue,granularity:n.granularity,"hour-cycle":n.hourCycle,disabled:n.disabled,readonly:n.readonly,class:"text-zinc-700 flex flex-1 items-center justify-center gap-1.5 px-4 outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50","onUpdate:modelValue":i},{default:f(({segments:m})=>[Array.isArray(m)?(k(!0),L(Me,{key:0},Ke(m,(h,g)=>(k(),L(Me,{key:`e-${h.part}-${g}`},[h.part!=="literal"?(k(),M(s(Hs).Input,{key:0,part:h.part,class:"rounded-sm px-1 outline-none focus:bg-zinc-100 data-[placeholder]:text-zinc-400"},{default:f(()=>[P(O(h.value),1)]),_:2},1032,["part"])):(k(),L("span",Nht,O(h.value),1))],64))),128)):ke("",!0)]),_:1},8,["model-value","granularity","hour-cycle","disabled","readonly"]),u.value?(k(),L("button",{key:1,type:"button","data-slot":"date-range-picker-clear",tabindex:"-1",class:He(s(et)("mr-2 size-5 shrink-0 rounded text-zinc-500 transition-opacity hover:text-zinc-700","[@media(hover:hover)]:opacity-0","group-hover/date-range-time-input:opacity-100 focus-within:opacity-100","flex items-center justify-center")),onMousedown:p[0]||(p[0]=at(()=>{},["prevent"])),onClick:at(l,["stop"])},[c(s(fe),{icon:n.clearIcon,class:"size-3.5"},null,8,["icon"])],34)):ke("",!0)],16,zht))}}),Bht={class:"w-full flex items-center gap-1 absolute top-1/2 -translate-y-1/2 transform-gpu inset-x-0 justify-between z-10"},Uht=q({name:"UiDateRangePickerYearPanel",__name:"DateRangePickerYearPanel",props:{modelValue:{},isDateDisabled:{type:Function},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,{locale:r}=un({useScope:"global",inheritLocale:!0});function a(i){o("update:modelValue",i)}return(i,l)=>(k(),M(s(iu).Root,{"data-slot":"date-range-picker-year-panel",class:He(s(et)("p-3",n.class)),"model-value":n.modelValue,"default-placeholder":n.modelValue?.start,"is-year-disabled":n.isDateDisabled,locale:s(r),"onUpdate:modelValue":a},{default:f(({grid:u})=>[c(s(iu).Header,{class:"pt-2 pb-2 relative"},{default:f(()=>[H("nav",Bht,[c(s(iu).Prev,null,{default:f(()=>[c(s(fe),{icon:"lucide:chevron-left"})]),_:1}),c(s(iu).Next,null,{default:f(()=>[c(s(fe),{icon:"lucide:chevron-right"})]),_:1})]),c(s(iu).Heading,{class:"text-sm font-medium text-center w-full"})]),_:1}),c(s(iu).Grid,{class:"mt-4 w-full"},{default:f(()=>[c(s(iu).GridBody,null,{default:f(()=>[(k(!0),L(Me,null,Ke(u.rows,(d,p)=>(k(),M(s(iu).GridRow,{key:`yrow-${p}`,class:"grid grid-cols-4 gap-1 mb-1 last:mb-0"},{default:f(()=>[(k(!0),L(Me,null,Ke(d,m=>(k(),M(s(iu).Cell,{key:m.toString(),date:m},{default:f(()=>[c(s(iu).CellTrigger,{year:m,class:"block w-full"},{default:f(({yearValue:h,disabled:g,selected:v,selectionStart:b,selectionEnd:x,highlighted:y})=>[H("span",{class:He(s(et)("flex h-9 w-full items-center justify-center rounded-md text-sm font-normal cursor-pointer","hover:bg-zinc-100",v||b||x?"bg-(--primary) text-white hover:bg-(--primary)":"",y&&!v?"bg-[color-mix(in_srgb,var(--primary)_20%,white)] text-(--primary) hover:bg-[color-mix(in_srgb,var(--primary)_25%,white)]":"",g?"text-zinc-400 opacity-50 cursor-default":""))},O(h),3)]),_:1},8,["year"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:1},8,["class","model-value","default-placeholder","is-year-disabled","locale"]))}}),Cb={daterange:{display:"yyyy-MM-dd",value:"yyyy-MM-dd"},datetimerange:{display:"yyyy-MM-dd HH:mm:ss",value:"yyyy-MM-dd HH:mm:ss"},monthrange:{display:"yyyy-MM",value:"yyyy-MM"},yearrange:{display:"yyyy",value:"yyyy"},timerange:{display:"HH:mm:ss",value:"HH:mm:ss"}},qht={class:"flex flex-col"},F$=q({name:"UiDateRangePicker",inheritAttrs:!1,__name:"DateRangePicker",props:{modelValue:{},defaultValue:{},type:{default:"daterange"},format:{},valueFormat:{},startPlaceholder:{},endPlaceholder:{},rangeSeparatorIcon:{},prefixIcon:{},clearIcon:{},clearable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},disabledDate:{},numberOfMonths:{default:2},timeGranularity:{default:"second"},hourCycle:{default:24},shortcuts:{},size:{default:"md"},class:{type:[Boolean,null,String,Object,Array]},popoverClass:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","change","clear","focus","blur"],setup(e,{emit:t}){const n=e,o=t,r=ao(n,"modelValue",o,{passive:!0,defaultValue:n.defaultValue}),a=E(()=>n.valueFormat??Cb[n.type].value),i=E(()=>n.format??Cb[n.type].display);function l(Y,he){const ue=Y.getFullYear(),pe=Y.getMonth()+1,ce=Y.getDate();switch(he){case"yearrange":return new Kn(ue,1,1);case"monthrange":return new Kn(ue,pe,1);case"datetimerange":return new ds(ue,pe,ce,Y.getHours(),Y.getMinutes(),Y.getSeconds());default:return new Kn(ue,pe,ce)}}function u(Y){return new Date(Y.year,Y.month-1,"day"in Y?Y.day:1,"hour"in Y?Y.hour:0,"hour"in Y?Y.minute:0,"hour"in Y?Y.second:0)}function d(Y){return new Hi(Y.getHours(),Y.getMinutes(),Y.getSeconds())}function p(Y){const he=new Date(2e3,0,1);return he.setHours(Y.hour,Y.minute,Y.second,0),he}function m(Y){if(!Y)return;const he=_$(Y,a.value,new Date);if(Jv(he))return he}const h=E(()=>m(r.value?.[0])),g=E(()=>m(r.value?.[1])),v=E(()=>h.value?d(h.value):void 0),b=E(()=>g.value?d(g.value):void 0),x=E(()=>{if(h.value)return l(h.value,n.type)}),y=E(()=>{if(g.value)return l(g.value,n.type)}),_=mo(void 0),w=E(()=>_.value?_.value:{start:x.value,end:y.value});function S(Y,he){if(!Y||!he){r.value!==void 0&&(r.value=void 0,o("change",void 0));return}const ue=ir(Y,a.value),pe=ir(he,a.value),ce=[ue,pe],ae=r.value;ae&&ae[0]===ce[0]&&ae[1]===ce[1]||(r.value=ce,o("change",ce))}function C(Y){S(Y,g.value)}function $(Y){S(h.value,Y)}function T(Y){S(Y?p(Y):void 0,g.value)}function D(Y){S(h.value,Y?p(Y):void 0)}function A(){r.value!==void 0&&(r.value=void 0,o("change",void 0)),o("clear")}function I(Y){const he=n.shortcuts?.[Y];if(!he)return;const ue=typeof he.value=="function"?he.value():he.value,pe=[ue[0],ue[1]],ce=r.value;if(ce&&ce[0]===pe[0]&&ce[1]===pe[1]){j.value=!1;return}r.value=pe,o("change",pe),j.value=!1}function U(Y,he){if(!Y||!Y.start&&!Y.end){_.value=void 0,S(void 0,void 0);return}if(!Y.start||!Y.end){_.value=Y;return}_.value=void 0;const ue=u(Y.start),pe=u(Y.end);S(ue,pe),he&&(j.value=!1)}const j=re(!1),Q=Bb("anchor-el");Xe(j,Y=>{Y||(_.value=void 0)});function F(Y){return Y instanceof Node?Q.value?.contains(Y)??!1:!1}function R(Y){const ue=Y.detail?.originalEvent?.target??null;F(ue)&&Y.preventDefault()}function G(Y,he){!n.disabled&&!n.readonly&&(j.value=!0),o("focus",Y,he)}function Z(Y,he){o("blur",Y,he)}return(Y,he)=>(k(),L("div",{ref:"anchor-el","data-slot":"date-range-picker",class:He(s(et)("w-full",n.class))},[n.type==="timerange"?(k(),M(Lht,Oe({key:0},Y.$attrs,{"start-value":v.value,"end-value":b.value,granularity:n.timeGranularity,"hour-cycle":n.hourCycle,"range-separator-icon":n.rangeSeparatorIcon,"prefix-icon":n.prefixIcon,"clear-icon":n.clearIcon,clearable:n.clearable,disabled:n.disabled,readonly:n.readonly,size:n.size,"onUpdate:startValue":T,"onUpdate:endValue":D,onClear:A}),null,16,["start-value","end-value","granularity","hour-cycle","range-separator-icon","prefix-icon","clear-icon","clearable","disabled","readonly","size"])):(k(),M(s(nc),{key:1,open:j.value,"onUpdate:open":he[5]||(he[5]=ue=>j.value=ue)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(Mht,Oe(Y.$attrs,{"start-value":h.value,"end-value":g.value,format:i.value,"start-placeholder":n.startPlaceholder,"end-placeholder":n.endPlaceholder,"range-separator-icon":n.rangeSeparatorIcon,"prefix-icon":n.prefixIcon,"clear-icon":n.clearIcon,clearable:n.clearable,disabled:n.disabled,readonly:n.readonly,open:j.value,size:n.size,"onUpdate:startValue":C,"onUpdate:endValue":$,onFocus:G,onBlur:Z,onClear:A}),null,16,["start-value","end-value","format","start-placeholder","end-placeholder","range-separator-icon","prefix-icon","clear-icon","clearable","disabled","readonly","open","size"])]),_:1}),c(s(oc),{align:"start",class:He(s(et)("w-auto p-0",n.popoverClass)),style:{minWidth:"var(--reka-popover-trigger-width)"},onOpenAutoFocus:he[4]||(he[4]=ue=>ue.preventDefault()),onInteractOutside:R},{default:f(()=>[H("div",qht,[n.type==="daterange"?(k(),M($ht,{key:0,"model-value":w.value,"is-date-disabled":n.disabledDate,"number-of-months":n.numberOfMonths,"onUpdate:modelValue":he[0]||(he[0]=ue=>U(ue,!0))},null,8,["model-value","is-date-disabled","number-of-months"])):n.type==="monthrange"?(k(),M(Fht,{key:1,"model-value":w.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":he[1]||(he[1]=ue=>U(ue,!0))},null,8,["model-value","is-date-disabled"])):n.type==="yearrange"?(k(),M(Uht,{key:2,"model-value":w.value,"is-date-disabled":n.disabledDate,"onUpdate:modelValue":he[2]||(he[2]=ue=>U(ue,!0))},null,8,["model-value","is-date-disabled"])):n.type==="datetimerange"?(k(),M(Oht,{key:3,"model-value":w.value,"is-date-disabled":n.disabledDate,granularity:n.timeGranularity,"hour-cycle":n.hourCycle,"number-of-months":n.numberOfMonths,"range-separator-icon":n.rangeSeparatorIcon,"onUpdate:modelValue":he[3]||(he[3]=ue=>U(ue,!1))},null,8,["model-value","is-date-disabled","granularity","hour-cycle","number-of-months","range-separator-icon"])):ke("",!0),n.shortcuts&&n.shortcuts.length>0?(k(),M(Jre,{key:4,items:n.shortcuts,onSelect:I},null,8,["items"])):ke("",!0)])]),_:1},8,["class"])]),_:1},8,["open"]))],2))}}),jht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Hht=q({name:"ShwfedDateRangeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(D,A)=>Ht(D,{...dn(i),...A}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.startPlaceholder?ut(t.config.startPlaceholder,n.value):void 0),p=E(()=>t.config.endPlaceholder?ut(t.config.endPlaceholder,n.value):void 0),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(D,A){if(!D)return!1;try{return bt(l(D,{form:o.value??{}}))}catch(I){return console.error(`[shwfed-form] failed to evaluate ${A} for ${t.fieldId}:`,I),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula"),y=E(()=>t.config.valueFormat??Cb.daterange.value),_=E(()=>{const D=t.config.presets;if(!(!D||D.length===0))return D.map(A=>({name:A.label,value:()=>{try{const I=bt(l(A.start,{form:o.value??{}})),U=bt(l(A.end,{form:o.value??{}}));return[ir(I,y.value),ir(U,y.value)]}catch(I){return console.error(`[shwfed-form] failed to evaluate preset "${A.start}" .. "${A.end}" for ${t.fieldId}:`,I),["",""]}}}))});function w(D){if(!Array.isArray(D)||D.length!==2)return;const[A,I]=D;if(!(typeof A!="string"||typeof I!="string")&&!(A.length===0||I.length===0))return[A,I]}function S(D){return typeof D=="string"&&D.length>0?D:void 0}const C=re(void 0),$=E({get:()=>{const D=t.config.binding;if(D==null)return C.value;if(typeof D=="string")return w(r(D));const A=S(r(D[0])),I=S(r(D[1]));if(!(A==null||I==null))return[A,I]},set:D=>{const A=t.config.binding;if(A==null){C.value=D;return}if(typeof A=="string"){a(A,D);return}a(A[0],D?.[0]),a(A[1],D?.[1])}}),T=E(()=>{const D=$.value;return D?`${D[0]} ~ ${D[1]}`:"—"});return(D,A)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":g.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",jht,O(T.value),1)):(k(),M(s(F$),{key:2,id:e.fieldId,modelValue:$.value,"onUpdate:modelValue":A[0]||(A[0]=I=>$.value=I),type:"daterange",format:e.config.format,"value-format":e.config.valueFormat,"start-placeholder":d.value,"end-placeholder":p.value,"range-separator-icon":e.config.rangeSeparatorIcon,"number-of-months":e.config.numberOfMonths,disabled:g.value,shortcuts:_.value},null,8,["id","modelValue","format","value-format","start-placeholder","end-placeholder","range-separator-icon","number-of-months","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),Wht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Ght=q({name:"ShwfedDateTimeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(S,C)=>Ht(S,{...dn(i),...C}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m(S,C){if(!S)return!1;try{return bt(l(S,{form:o.value??{}}))}catch($){return console.error(`[shwfed-form] failed to evaluate ${C} for ${t.fieldId}:`,$),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula"),x=E(()=>t.config.valueFormat??kb.datetime.value),y=E(()=>{const S=t.config.presets;if(!(!S||S.length===0))return S.map(C=>({name:C.label,value:()=>{try{const $=bt(l(C.value,{form:o.value??{}}));return ir($,x.value)}catch($){return console.error(`[shwfed-form] failed to evaluate preset "${C.value}" for ${t.fieldId}:`,$),""}}}))}),_=re(void 0),w=E({get:()=>{const S=t.config.binding;if(S==null)return _.value;const C=r(S);return typeof C=="string"&&C.length>0?C:void 0},set:S=>{const C=t.config.binding;if(C==null){_.value=S;return}a(C,S)}});return(S,C)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":h.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),b.value?(k(),L("div",Wht,O(w.value||"—"),1)):(k(),M(s(R$),{key:2,id:e.fieldId,modelValue:w.value,"onUpdate:modelValue":C[0]||(C[0]=$=>w.value=$),type:"datetime",format:e.config.format,"value-format":e.config.valueFormat,placeholder:d.value,"time-granularity":e.config.timeGranularity,"hour-cycle":e.config.hourCycle,disabled:h.value,shortcuts:y.value},null,8,["id","modelValue","format","value-format","placeholder","time-granularity","hour-cycle","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),Kht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Yht=q({name:"ShwfedDateTimeRangeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(D,A)=>Ht(D,{...dn(i),...A}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.startPlaceholder?ut(t.config.startPlaceholder,n.value):void 0),p=E(()=>t.config.endPlaceholder?ut(t.config.endPlaceholder,n.value):void 0),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(D,A){if(!D)return!1;try{return bt(l(D,{form:o.value??{}}))}catch(I){return console.error(`[shwfed-form] failed to evaluate ${A} for ${t.fieldId}:`,I),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula"),y=E(()=>t.config.valueFormat??Cb.datetimerange.value),_=E(()=>{const D=t.config.presets;if(!(!D||D.length===0))return D.map(A=>({name:A.label,value:()=>{try{const I=bt(l(A.start,{form:o.value??{}})),U=bt(l(A.end,{form:o.value??{}}));return[ir(I,y.value),ir(U,y.value)]}catch(I){return console.error(`[shwfed-form] failed to evaluate preset "${A.start}" .. "${A.end}" for ${t.fieldId}:`,I),["",""]}}}))});function w(D){if(!Array.isArray(D)||D.length!==2)return;const[A,I]=D;if(!(typeof A!="string"||typeof I!="string")&&!(A.length===0||I.length===0))return[A,I]}function S(D){return typeof D=="string"&&D.length>0?D:void 0}const C=re(void 0),$=E({get:()=>{const D=t.config.binding;if(D==null)return C.value;if(typeof D=="string")return w(r(D));const A=S(r(D[0])),I=S(r(D[1]));if(!(A==null||I==null))return[A,I]},set:D=>{const A=t.config.binding;if(A==null){C.value=D;return}if(typeof A=="string"){a(A,D);return}a(A[0],D?.[0]),a(A[1],D?.[1])}}),T=E(()=>{const D=$.value;return D?`${D[0]} ~ ${D[1]}`:"—"});return(D,A)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":g.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",Kht,O(T.value),1)):(k(),M(s(F$),{key:2,id:e.fieldId,modelValue:$.value,"onUpdate:modelValue":A[0]||(A[0]=I=>$.value=I),type:"datetimerange",format:e.config.format,"value-format":e.config.valueFormat,"start-placeholder":d.value,"end-placeholder":p.value,"range-separator-icon":e.config.rangeSeparatorIcon,"number-of-months":e.config.numberOfMonths,"time-granularity":e.config.timeGranularity,"hour-cycle":e.config.hourCycle,disabled:g.value,shortcuts:_.value},null,8,["id","modelValue","format","value-format","start-placeholder","end-placeholder","range-separator-icon","number-of-months","time-granularity","hour-cycle","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),Jht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Xht=q({name:"ShwfedTimeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(y,_)=>Ht(y,{...dn(i),..._}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function p(y,_){if(!y)return!1;try{return bt(l(y,{form:o.value??{}}))}catch(w){return console.error(`[shwfed-form] failed to evaluate ${_} for ${t.fieldId}:`,w),!1}}const m=E(()=>p(t.config.disabled,"disabled")),h=ma(),g=E(()=>t.config.readonly!=null?p(t.config.readonly,"readonly"):h.value),v=E(()=>g.value||t.config.derived?.mode==="formula"),b=re(void 0),x=E({get:()=>{const y=t.config.binding;if(y==null)return b.value;const _=r(y);return typeof _=="string"&&_.length>0?_:void 0},set:y=>{const _=t.config.binding;if(_==null){b.value=y;return}a(_,y)}});return(y,_)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":m.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[d.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:d.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),v.value?(k(),L("div",Jht,O(x.value||"—"),1)):(k(),M(s(R$),{key:2,id:e.fieldId,modelValue:x.value,"onUpdate:modelValue":_[0]||(_[0]=w=>x.value=w),type:"time","value-format":e.config.valueFormat,"time-granularity":e.config.timeGranularity,"hour-cycle":e.config.hourCycle,disabled:m.value},null,8,["id","modelValue","value-format","time-granularity","hour-cycle","disabled"]))]),_:1},8,["orientation","data-disabled"]))}}),Zht={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Qht=q({name:"ShwfedTimeRangeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(S,C)=>Ht(S,{...dn(i),...C}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function p(S,C){if(!S)return!1;try{return bt(l(S,{form:o.value??{}}))}catch($){return console.error(`[shwfed-form] failed to evaluate ${C} for ${t.fieldId}:`,$),!1}}const m=E(()=>p(t.config.disabled,"disabled")),h=ma(),g=E(()=>t.config.readonly!=null?p(t.config.readonly,"readonly"):h.value),v=E(()=>g.value||t.config.derived?.mode==="formula");function b(S){if(!Array.isArray(S)||S.length!==2)return;const[C,$]=S;if(!(typeof C!="string"||typeof $!="string")&&!(C.length===0||$.length===0))return[C,$]}function x(S){return typeof S=="string"&&S.length>0?S:void 0}const y=re(void 0),_=E({get:()=>{const S=t.config.binding;if(S==null)return y.value;if(typeof S=="string")return b(r(S));const C=x(r(S[0])),$=x(r(S[1]));if(!(C==null||$==null))return[C,$]},set:S=>{const C=t.config.binding;if(C==null){y.value=S;return}if(typeof C=="string"){a(C,S);return}a(C[0],S?.[0]),a(C[1],S?.[1])}}),w=E(()=>{const S=_.value;return S?`${S[0]} ~ ${S[1]}`:"—"});return(S,C)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":m.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[d.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:d.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),v.value?(k(),L("div",Zht,O(w.value),1)):(k(),M(s(F$),{key:2,id:e.fieldId,modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=$=>_.value=$),type:"timerange","value-format":e.config.valueFormat,"range-separator-icon":e.config.rangeSeparatorIcon,"time-granularity":e.config.timeGranularity,"hour-cycle":e.config.hourCycle,disabled:m.value},null,8,["id","modelValue","value-format","range-separator-icon","time-granularity","hour-cycle","disabled"]))]),_:1},8,["orientation","data-disabled"]))}}),egt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},tgt=q({name:"ShwfedNumberFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o}=dr(),r=vn(),a=(D,A)=>Ht(D,{...dn(r),...A}),i=E(()=>ut(t.config.label,n.value)),l=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),u=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function d(D,A){if(!D)return!1;try{return bt(a(D,{form:o.value??{}}))}catch(I){return console.error(`[shwfed-form] failed to evaluate ${A} for ${t.fieldId}:`,I),!1}}function p(D,A){if(D)try{const I=bt(a(D,{form:o.value??{}}));return typeof I=="number"&&Number.isFinite(I)?I:void 0}catch(I){console.error(`[shwfed-form] failed to evaluate ${A} for ${t.fieldId}:`,I);return}}const m=E(()=>d(t.config.disabled,"disabled")),h=ma(),g=E(()=>t.config.readonly!=null?d(t.config.readonly,"readonly"):h.value),v=E(()=>g.value||t.config.derived?.mode==="formula"),b=E(()=>p(t.config.min,"min")),x=E(()=>p(t.config.max,"max")),y=E(()=>({useGrouping:!1,maximumFractionDigits:20})),{draft:_,commit:w}=t0({binding:()=>t.config.binding,fromState:D=>{if(typeof D=="number"&&Number.isFinite(D))return D;if(typeof D=="string"&&D.length>0){const A=Number(D);return Number.isFinite(A)?A:void 0}},toState:D=>typeof D!="number"||!Number.isFinite(D)?null:t.config.valueAsString?String(D):D});function S(D,A,I){const U=10**A;switch(I){case"floor":return Math.floor(D*U)/U;case"ceil":return Math.ceil(D*U)/U;default:return Math.round(D*U)/U}}const C=E(()=>!m.value&&_.value!==void 0);function $(){_.value=void 0,w()}async function T(){await It();const D=t.config.precision;if(D!==void 0){const A=_.value;if(A!==void 0){const I=S(A,D,t.config.roundingMode??"round");I!==A&&(_.value=I)}}w()}return(D,A)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":m.value||void 0},{default:f(()=>[i.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(i.value),1)]),_:2},[u.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:u.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),v.value?(k(),L("div",egt,O(s(_)??"—"),1)):(k(),M(s(Ge),{key:2,class:"group/number-field","data-disabled":m.value?"true":void 0},{default:f(()=>[c(s(wn),{id:e.fieldId,"model-value":s(_),step:e.config.step,"step-snapping":e.config.step!==void 0,min:b.value,max:x.value,"format-options":y.value,disabled:m.value,placeholder:l.value,"input-class":"text-left","onUpdate:modelValue":A[0]||(A[0]=I=>_.value=I),onBlur:T},null,8,["id","model-value","step","step-snapping","min","max","format-options","disabled","placeholder"]),C.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/number-field:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"number-field-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:A[1]||(A[1]=at(()=>{},["prevent"])),onClick:at($,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"]))]),_:1},8,["orientation","data-disabled"]))}}),ngt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},ogt=q({name:"ShwfedNumberRangeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(ae,W)=>Ht(ae,{...dn(i),...W}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.startPlaceholder?ut(t.config.startPlaceholder,n.value):void 0),p=E(()=>t.config.endPlaceholder?ut(t.config.endPlaceholder,n.value):void 0),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(ae,W){if(!ae)return!1;try{return bt(l(ae,{form:o.value??{}}))}catch(B){return console.error(`[shwfed-form] failed to evaluate ${W} for ${t.fieldId}:`,B),!1}}function g(ae,W){if(ae)try{const B=bt(l(ae,{form:o.value??{}}));return typeof B=="number"&&Number.isFinite(B)?B:void 0}catch(B){console.error(`[shwfed-form] failed to evaluate ${W} for ${t.fieldId}:`,B);return}}const v=E(()=>h(t.config.disabled,"disabled")),b=ma(),x=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):b.value),y=E(()=>x.value||t.config.derived?.mode==="formula"),_=E(()=>g(t.config.min,"min")),w=E(()=>g(t.config.max,"max")),S=E(()=>({useGrouping:!1,maximumFractionDigits:20}));function C(ae){if(typeof ae=="number"&&Number.isFinite(ae))return ae;if(typeof ae=="string"&&ae.length>0){const W=Number(ae);return Number.isFinite(W)?W:void 0}}function $(ae){if(!Array.isArray(ae)||ae.length!==2)return;const W=C(ae[0]),B=C(ae[1]);if(!(W==null||B==null))return[W,B]}function T(ae){return t.config.valueAsString?String(ae):ae}const D=re(void 0),A=E({get:()=>{const ae=t.config.binding;if(ae==null)return D.value;if(typeof ae=="string")return $(r(ae));const W=C(r(ae[0])),B=C(r(ae[1]));if(!(W==null||B==null))return[W,B]},set:ae=>{const W=t.config.binding;if(W==null){D.value=ae;return}if(typeof W=="string"){a(W,ae?[T(ae[0]),T(ae[1])]:null);return}a(W[0],ae?T(ae[0]):null),a(W[1],ae?T(ae[1]):null)}}),I=re(A.value?.[0]),U=re(A.value?.[1]);Xe(A,ae=>{I.value=ae?.[0],U.value=ae?.[1]});function j(){const ae=I.value,W=U.value;if(typeof ae=="number"&&Number.isFinite(ae)&&typeof W=="number"&&Number.isFinite(W)){const B=A.value;if(B&&B[0]===ae&&B[1]===W)return;A.value=[ae,W]}else A.value!==void 0&&(A.value=void 0)}const Q=Dre().register(j);tr(()=>{Q(),j()});function F(ae){I.value=typeof ae=="number"&&Number.isFinite(ae)?ae:void 0}function R(ae){U.value=typeof ae=="number"&&Number.isFinite(ae)?ae:void 0}const G=E(()=>{const ae=U.value,W=w.value;return typeof ae=="number"&&typeof W=="number"?Math.min(ae,W):typeof ae=="number"?ae:W}),Z=E(()=>{const ae=I.value,W=_.value;return typeof ae=="number"&&typeof W=="number"?Math.max(ae,W):typeof ae=="number"?ae:W});function Y(ae,W,B){const K=10**W;switch(B){case"floor":return Math.floor(ae*K)/K;case"ceil":return Math.ceil(ae*K)/K;default:return Math.round(ae*K)/K}}async function he(ae){await It();const W=t.config.precision;if(W!==void 0){const B=ae==="start"?I:U,K=B.value;if(K!==void 0){const X=Y(K,W,t.config.roundingMode??"round");X!==K&&(B.value=X)}}j()}const ue=E(()=>!v.value&&(I.value!==void 0||U.value!==void 0));function pe(){I.value=void 0,U.value=void 0,A.value!==void 0&&(A.value=void 0)}const ce=E(()=>{const ae=A.value;return ae?`${ae[0]} ~ ${ae[1]}`:"—"});return(ae,W)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":v.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),y.value?(k(),L("div",ngt,O(ce.value),1)):(k(),M(s(Ge),{key:2,class:"group/number-range-field","data-disabled":v.value?"true":void 0},{default:f(()=>[c(s(wn),{id:e.fieldId,"model-value":I.value,step:e.config.step,"step-snapping":e.config.step!==void 0,min:_.value,max:G.value,"format-options":S.value,disabled:v.value,placeholder:d.value,"onUpdate:modelValue":F,onBlur:W[0]||(W[0]=B=>he("start"))},null,8,["id","model-value","step","step-snapping","min","max","format-options","disabled","placeholder"]),c(s(fe),{icon:e.config.rangeSeparatorIcon??"lucide:arrow-right",class:"mx-1 size-3.5 shrink-0 text-zinc-400"},null,8,["icon"]),c(s(wn),{"model-value":U.value,step:e.config.step,"step-snapping":e.config.step!==void 0,min:Z.value,max:w.value,"format-options":S.value,disabled:v.value,placeholder:p.value,"onUpdate:modelValue":R,onBlur:W[1]||(W[1]=B=>he("end"))},null,8,["model-value","step","step-snapping","min","max","format-options","disabled","placeholder"]),ue.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/number-range-field:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"number-range-field-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:W[2]||(W[2]=at(()=>{},["prevent"])),onClick:at(pe,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"]))]),_:1},8,["orientation","data-disabled"]))}}),rgt={key:1,class:"text-sm text-zinc-700"},agt=q({name:"ShwfedSwitchFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(w,S)=>Ht(w,{...dn(i),...S}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0),p=E(()=>ut(t.config.trueLabel,n.value)||"是"),m=E(()=>ut(t.config.falseLabel,n.value)||"否");function h(w,S){if(!w)return!1;try{return bt(l(w,{form:o.value??{}}))}catch(C){return console.error(`[shwfed-form] failed to evaluate ${S} for ${t.fieldId}:`,C),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula"),y=re(!1),_=E({get:()=>{const w=t.config.binding;return w==null?y.value:r(w)===!0},set:w=>{const S=w===!0,C=t.config.binding;if(C==null){y.value=S;return}a(C,S)}});return(w,S)=>(k(),M(s(V),{orientation:"horizontal",class:"h-full","data-disabled":g.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[d.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:d.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",rgt,O(_.value?p.value:m.value),1)):(k(),M(s(Lo),{key:2,id:e.fieldId,modelValue:_.value,"onUpdate:modelValue":S[0]||(S[0]=C=>_.value=C),disabled:g.value},null,8,["id","modelValue","disabled"]))]),_:1},8,["data-disabled"]))}}),igt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},sgt={key:0,class:"border-t border-zinc-200 px-3 py-2"},lgt=q({name:"ShwfedComboboxSingleFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"combobox-single-placeholder":"请选择","combobox-single-search-placeholder":"搜索…","combobox-single-empty":"无匹配项"},en:{"combobox-single-placeholder":"Select…","combobox-single-search-placeholder":"Search…","combobox-single-empty":"No matches"},ja:{"combobox-single-placeholder":"選択してください","combobox-single-search-placeholder":"検索…","combobox-single-empty":"一致なし"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=(Z,Y)=>Ht(Z,{...dn(l),...Y}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):o("combobox-single-placeholder")),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(Z,Y){if(!Z)return!1;try{return bt(u(Z,{form:r.value??{}}))}catch(he){return console.error(`[shwfed-form] failed to evaluate ${Y} for ${t.fieldId}:`,he),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula");function y(Z,Y){try{return Ss(Z,u,Y)}catch(he){return console.error(`[shwfed-form] failed to interpolate option text for ${t.fieldId}:`,he),Z}}const _=E(()=>(t.config.items??[]).map(Z=>{const Y=ut(Z.label,n.value)??"",he=Z.tooltip?ut(Z.tooltip,n.value):void 0,ue={form:r.value??{}};return{key:Z.id,value:Z.value.value,label:Y?y(Y,ue):"",tooltip:he?y(he,ue):void 0}})),w=re(void 0),S=E({get:()=>{const Z=t.config.binding;return Z==null?w.value:a(Z)},set:Z=>{const Y=t.config.binding;if(Y==null){w.value=Z;return}i(Y,Z)}});function C(Z,Y){if(Z===Y)return!0;if(Z==null||Y==null)return!1;if(typeof Z=="object"&&typeof Y=="object")try{return JSON.stringify(Z)===JSON.stringify(Y)}catch{return!1}return!1}const $=E(()=>_.value.find(Z=>C(Z.value,S.value))),T=E(()=>$.value?.key),D=E(()=>$.value?.label??""),A=re(!1);function I(Z){if(typeof Z!="string")return;const Y=_.value.find(he=>he.key===Z);Y&&(S.value=Y.value,It().then(()=>{A.value=!1}))}const U=E(()=>!g.value&&$.value!==void 0);function j(){S.value=void 0,A.value=!1}const Q=re(null);Xe(A,Z=>{Q.value=Z?_.value[0]?.key??null:null});const F=E(()=>_.value.find(Z=>Z.key===Q.value)),R=E(()=>F.value?.tooltip),G=E(()=>_.value.some(Z=>Z.tooltip!=null&&Z.tooltip.length>0));return(Z,Y)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":g.value||void 0},{default:f(()=>[d.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",igt,O(D.value||"—"),1)):(k(),M(s(nc),{key:2,open:A.value,"onUpdate:open":Y[1]||(Y[1]=he=>A.value=he)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(s(Ge),{class:"group/combobox-single","data-disabled":g.value?"true":void 0},{default:f(()=>[c(s(ip),{"as-child":""},{default:f(()=>[c(s(mt),{id:e.fieldId,"model-value":D.value,disabled:g.value,placeholder:p.value,class:"cursor-pointer text-left",readonly:""},null,8,["id","model-value","disabled","placeholder"])]),_:1}),U.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"combobox-single-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:Y[0]||(Y[0]=at(()=>{},["prevent"])),onClick:at(j,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"])]),_:1}),c(s(oc),{class:"p-0",style:{width:"var(--reka-popover-trigger-width)"}},{default:f(()=>[c(s(np),{"model-value":T.value,disabled:g.value,"selection-behavior":"toggle","onUpdate:modelValue":I},{default:f(()=>[c(s(Zm),{placeholder:s(o)("combobox-single-search-placeholder")},null,8,["placeholder"]),c(s(rp),null,{default:f(()=>[c(s(op),{class:"py-6 text-center text-sm text-zinc-500"},{default:f(()=>[P(O(s(o)("combobox-single-empty")),1)]),_:1}),c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(_.value,he=>(k(),M(s(ws),{key:he.key,value:he.key,onMouseenter:ue=>Q.value=he.key,onFocus:ue=>Q.value=he.key},{default:f(()=>[P(O(he.label),1)]),_:2},1032,["value","onMouseenter","onFocus"]))),128))]),_:1})]),_:1}),G.value&&R.value?(k(),L("div",sgt,[c(s(z),{source:R.value,block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])])):ke("",!0)]),_:1},8,["model-value","disabled"])]),_:1})]),_:1},8,["open"]))]),_:1},8,["orientation","data-disabled"]))}}),ugt=["id","data-disabled","data-readonly"],cgt=["tabindex","data-disabled","data-readonly","aria-disabled"],dgt={class:"flex flex-1 flex-col items-center justify-center gap-2"},fgt={key:1,class:"text-xs text-zinc-500"},pgt={key:1,class:"flex w-full flex-col gap-2"},mgt={"data-slot":"upload-zone-list",class:"flex flex-col gap-1"},hgt={class:"flex min-w-0 items-center gap-2"},ggt={class:"truncate text-zinc-700"},vgt=["accept","multiple","disabled"],ygt={key:2,class:"flex justify-end"},bgt=q({name:"ShwfedUploadFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"vscode-icons:file-type-excel","application/vnd.ms-excel":"vscode-icons:file-type-excel","application/vnd.openxmlformats-officedocument.presentationml.presentation":"vscode-icons:file-type-powerpoint","application/vnd.ms-powerpoint":"vscode-icons:file-type-powerpoint","application/zip":"vscode-icons:file-type-zip","application/x-zip-compressed":"vscode-icons:file-type-zip","application/vnd.rar":"vscode-icons:file-type-zip","application/x-rar-compressed":"vscode-icons:file-type-zip","application/pdf":"vscode-icons:file-type-pdf2","application/ofd":"vscode-icons:file-type-ofd","application/xml":"vscode-icons:file-type-xml","image/png":"vscode-icons:file-type-image","image/jpg":"vscode-icons:file-type-image","image/jpeg":"vscode-icons:file-type-image","application/msword":"vscode-icons:file-type-word","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"vscode-icons:file-type-word"},n={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"XLSX","application/vnd.ms-excel":"XLS","application/vnd.openxmlformats-officedocument.presentationml.presentation":"PPTX","application/vnd.ms-powerpoint":"PPT","application/zip":"ZIP","application/x-zip-compressed":"ZIP","application/vnd.rar":"RAR","application/x-rar-compressed":"RAR","application/pdf":"PDF","application/ofd":"OFD","application/xml":"XML","image/png":"PNG","image/jpg":"JPG","image/jpeg":"JPEG","application/msword":"DOC","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"DOCX"},o=e,{locale:r,t:a}=un({inheritLocale:!0,messages:{zh:{"upload-add-file":"添加文件","upload-accept-hint":"仅接受 {types}","upload-rejected-mime":"「{name}」类型不被允许","upload-rejected-size":"「{name}」超出单文件大小限制","upload-rejected-total":"「{name}」加入后将超出总大小限制","upload-rejected-count":"已达到文件数量上限,「{name}」未添加"},en:{"upload-add-file":"Add file","upload-accept-hint":"Only {types} are accepted","upload-rejected-mime":"{name} is not an allowed file type","upload-rejected-size":"{name} exceeds the maximum file size","upload-rejected-total":"{name} would exceed the total size limit","upload-rejected-count":"File count limit reached; {name} was not added"},ja:{"upload-add-file":"ファイルを追加","upload-accept-hint":"{types} のみ受け付けます","upload-rejected-mime":"「{name}」は許可されたファイル形式ではありません","upload-rejected-size":"「{name}」はファイルサイズの上限を超えています","upload-rejected-total":"「{name}」を追加すると合計サイズの上限を超えます","upload-rejected-count":"ファイル数の上限に達したため「{name}」は追加されません"}}}),{state:i,getAt:l,setAt:u}=dr(),d=vn(),p=(ue,pe)=>Ht(ue,{...dn(d),...pe}),m=E(()=>o.config.label?ut(o.config.label,r.value):void 0),h=E(()=>o.config.description?ut(o.config.description,r.value):void 0),g=E(()=>o.config.tooltip?ut(o.config.tooltip,r.value):void 0),v=E(()=>(o.config.templateLabel?ut(o.config.templateLabel,r.value):void 0)??"下载模板");function b(ue,pe){if(!ue)return!1;try{return bt(p(ue,{form:i.value??{}}))}catch(ce){return console.error(`[shwfed-form] failed to evaluate ${pe} for ${o.fieldId}:`,ce),!1}}const x=E(()=>b(o.config.disabled,"disabled")),y=ma(),_=E(()=>o.config.readonly!=null?b(o.config.readonly,"readonly"):y.value),w=re([]),S=E({get:()=>{const ue=o.config.binding;if(ue==null)return w.value;const pe=l(ue);return Array.isArray(pe)?pe.filter(ce=>ce instanceof File):[]},set:ue=>{const pe=o.config.binding;if(pe==null){w.value=ue;return}u(pe,ue.length===0?null:ue)}}),C=re(),$=E(()=>{const ue=o.config.accept;return ue&&ue.length>0?ue.join(","):void 0}),T=E(()=>{const ue=o.config.accept;if(!(!ue||ue.length===0))return Array.from(new Set(ue.map(pe=>n[pe]??pe))).join("、")}),D=E(()=>o.config.maxFiles!==void 0&&S.value.length>=o.config.maxFiles),A=E(()=>!x.value&&!_.value&&!D.value);function I(ue){const pe=o.config.accept;return!pe||pe.length===0?!0:pe.includes(ue.type)}function U(ue){const pe=[],ce=[];let ae=S.value.reduce((B,K)=>B+K.size,0),W=S.value.length;for(const B of ue){if(!I(B)){ce.push({file:B,reason:"mime"});continue}if(o.config.maxFileSize!==void 0&&B.size>o.config.maxFileSize){ce.push({file:B,reason:"size"});continue}if(o.config.maxFiles!==void 0&&W>=o.config.maxFiles){ce.push({file:B,reason:"count"});continue}if(o.config.maxTotalSize!==void 0&&ae+B.size>o.config.maxTotalSize){ce.push({file:B,reason:"total"});continue}pe.push(B),ae+=B.size,W+=1}return{accepted:pe,rejected:ce}}function j(ue){if(!ue||ue.length===0)return;const pe=o.config.multiple??!1,ce=pe?Array.from(ue):Array.from(ue).slice(0,1),{accepted:ae,rejected:W}=U(ce);for(const B of W)Si.error(a(`upload-rejected-${B.reason}`,{name:B.file.name}));ae.length>0&&(S.value=pe?[...S.value,...ae]:ae),C.value&&(C.value.value="")}function Q(ue){j(ue.target.files)}function F(){A.value&&C.value?.click()}function R(ue){A.value&&(ue.key==="Enter"||ue.key===" ")&&(ue.preventDefault(),C.value?.click())}function G(ue){if(x.value||_.value)return;const pe=[...S.value];pe.splice(ue,1),S.value=pe}function Z(ue){return t[ue.type]??"fluent:document-20-regular"}const Y=E(()=>o.config.templateIcon??"fluent:arrow-download-20-regular");async function he(){const ue=o.config.template;if(!ue)return;const pe={form:i.value??{}},ce=Eo(function*(){const ae=yield*p(ue.request,pe);if(!ue.download)return yield*ae.file();const W=yield*ae.json();return yield*(yield*p(ue.download,{...pe,json:W})).file()});try{const ae=await Yr(li(ce,bs));if(!(ae instanceof File)){console.error(`[shwfed-form] template request for ${o.fieldId} did not produce a File`);return}const W=URL.createObjectURL(ae),B=document.createElement("a");B.href=W,B.download=ae.name,document.body.appendChild(B),B.click(),B.remove(),URL.revokeObjectURL(W)}catch(ae){console.error(`[shwfed-form] failed to download template for ${o.fieldId}:`,ae)}}return(ue,pe)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":x.value||void 0},{default:f(()=>[m.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(m.value),1)]),_:2},[g.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:g.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),H("div",{id:e.fieldId,class:"flex flex-col gap-2","data-disabled":x.value||void 0,"data-readonly":_.value||void 0},[S.value.length===0?(k(),L("div",{key:0,role:"button",tabindex:A.value?0:-1,"data-slot":"upload-zone","data-disabled":x.value||void 0,"data-readonly":_.value||void 0,"aria-disabled":x.value||void 0,class:He(["flex min-h-40 w-full flex-col gap-3 rounded border-2 border-dashed border-zinc-200 bg-zinc-50 p-4 outline-none transition-colors duration-180 ease-out focus-visible:border-(--primary) data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-60",[A.value&&"cursor-pointer hover:border-zinc-400 hover:bg-zinc-100",_.value&&"cursor-default"]]),onClick:F,onKeydown:R},[H("div",dgt,[c(s(fe),{icon:"fluent:cloud-arrow-up-20-regular",class:"size-8 text-zinc-400"}),h.value?(k(),M(s(z),{key:0,source:h.value,block:"",class:"prose prose-sm prose-zinc max-w-none text-center text-zinc-500"},null,8,["source"])):ke("",!0),T.value?(k(),L("p",fgt,O(s(a)("upload-accept-hint",{types:T.value})),1)):ke("",!0)])],42,cgt)):(k(),L("div",pgt,[H("ul",mgt,[(k(!0),L(Me,null,Ke(S.value,(ce,ae)=>(k(),L("li",{key:`${ce.name}-${ae}`,"data-slot":"upload-zone-item",class:"flex items-center justify-between gap-2 rounded px-2 py-1.5 text-sm leading-snug transition-[background-color] duration-180 ease-out hover:bg-zinc-50"},[H("span",hgt,[c(s(fe),{icon:Z(ce),class:"size-4 shrink-0"},null,8,["icon"]),H("span",ggt,O(ce.name),1)]),!x.value&&!_.value?(k(),M(s(Rn),{key:0,type:"button",variant:"ghost",size:"sm","data-slot":"upload-zone-delete",class:"size-6 p-0 text-zinc-500 hover:bg-red-50 hover:text-red-600","aria-label":`删除:${ce.name}`,onClick:W=>G(ae)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["aria-label","onClick"])):ke("",!0)]))),128))]),A.value?(k(),M(s(Rn),{key:0,type:"button",variant:"default","data-slot":"upload-zone-add",class:"w-full shrink-0",onClick:F},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),P(" "+O(s(a)("upload-add-file")),1)]),_:1})):ke("",!0)])),H("input",{ref_key:"inputRef",ref:C,type:"file",class:"hidden",accept:$.value,multiple:e.config.multiple,disabled:x.value||_.value,onChange:Q},null,40,vgt),e.config.template&&!_.value?(k(),L("div",ygt,[c(s(Rn),{type:"button",variant:"link",size:"sm","data-slot":"upload-zone-template",onClick:he},{default:f(()=>[c(s(fe),{icon:Y.value},null,8,["icon"]),P(" "+O(v.value),1)]),_:1})])):ke("",!0)],8,ugt)]),_:1},8,["orientation","data-disabled"]))}}),_gt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},xgt=["id","disabled","data-value"],wgt={key:1,class:"block truncate text-zinc-300"},Sgt={key:0,"data-slot":"combobox-single-remote-empty",class:"py-6 text-center text-sm text-zinc-500"},kgt=q({name:"ShwfedComboboxSingleRemoteFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"combobox-single-search-placeholder":"搜索…","combobox-single-empty":"无匹配项","combobox-single-loading":"加载中…"},en:{"combobox-single-search-placeholder":"Search…","combobox-single-empty":"No matches","combobox-single-loading":"Loading…"},ja:{"combobox-single-search-placeholder":"検索…","combobox-single-empty":"一致なし","combobox-single-loading":"読み込み中…"}}}),{state:r,getAt:a,setAt:i,setAtSilent:l}=dr(),u=vn(),d=(pe,ce)=>Ht(pe,{...dn(u),...ce}),p=E(()=>ut(t.config.label,n.value)),m=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),h=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function g(pe,ce){if(!pe)return!1;try{return bt(d(pe,{form:r.value??{}}))}catch(ae){return console.error(`[shwfed-form] failed to evaluate ${ce} for ${t.fieldId}:`,ae),!1}}const v=E(()=>g(t.config.disabled,"disabled")),b=ma(),x=E(()=>t.config.readonly!=null?g(t.config.readonly,"readonly"):b.value),y=E(()=>x.value||t.config.derived?.mode==="formula");function _(pe){try{return bt(d(t.config.optionValue,{form:r.value??{},option:pe}))}catch(ce){console.error(`[shwfed-form] failed to evaluate optionValue for ${t.fieldId}:`,ce);return}}function w(pe){const ce=ut(t.config.optionLabel,n.value)??"";return ce?Ss(ce,d,{form:r.value??{},option:pe}):""}const S=re(null),C=re(!1),$=E(()=>{const pe=t.config.request;if(!pe)return null;try{const ce=bt(d(pe,{form:r.value??{}}));return JSON.stringify(ce.describe())}catch{return null}});let T=0;async function D(){const pe=++T;if($.value==null){S.value=null,C.value=!1;return}const ce=t.config.request;C.value=!0;const ae=Eo(function*(){return yield*(yield*d(ce,{form:r.value??{}})).json()});try{const W=await Yr(li(ae,bs));pe===T&&(S.value=W)}catch{pe===T&&(S.value=null)}finally{pe===T&&(C.value=!1)}}const A=E(()=>{let pe;try{pe=bt(d(t.config.options,{form:r.value??{},json:S.value}))}catch(ce){return console.error(`[shwfed-form] failed to evaluate options for ${t.fieldId}:`,ce),[]}return Array.isArray(pe)?pe.map((ce,ae)=>({key:String(ae),label:w(ce),value:_(ce)})):[]}),I=re(void 0),U=E({get:()=>{const pe=t.config.binding;return pe==null?I.value:a(pe)},set:pe=>{const ce=t.config.binding;if(ce==null){I.value=pe;return}i(ce,pe)}});let j;OX($,()=>{if(j!=null){const pe=t.config.binding;pe==null?I.value=void 0:l(pe,void 0)}j=$.value,D()},{debounce:200,immediate:!0});function Q(pe,ce){if(pe===ce)return!0;if(pe==null||ce==null)return!1;if(typeof pe=="object"&&typeof ce=="object")try{return JSON.stringify(pe)===JSON.stringify(ce)}catch{return!1}return!1}const F=E(()=>A.value.find(pe=>Q(pe.value,U.value))),R=E(()=>F.value?.key),G=E(()=>F.value?.label??""),Z=re(!1);function Y(pe){if(typeof pe!="string")return;const ce=A.value.find(ae=>ae.key===pe);ce&&(U.value=ce.value,It().then(()=>{Z.value=!1}))}const he=E(()=>!v.value&&F.value!==void 0);function ue(){U.value=void 0,Z.value=!1}return(pe,ce)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":v.value||void 0},{default:f(()=>[p.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(p.value),1)]),_:2},[h.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:h.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),y.value?(k(),L("div",_gt,[G.value?(k(),M(s(z),{key:0,source:G.value},null,8,["source"])):(k(),L(Me,{key:1},[P(" — ")],64))])):(k(),M(s(nc),{key:2,open:Z.value,"onUpdate:open":ce[1]||(ce[1]=ae=>Z.value=ae)},{default:f(()=>[c(s(ap),{"as-child":""},{default:f(()=>[c(s(Ge),{class:"group/combobox-single-remote","data-disabled":v.value?"true":void 0},{default:f(()=>[c(s(ip),{"as-child":""},{default:f(()=>[H("button",{id:e.fieldId,type:"button",disabled:v.value,"data-value":!!G.value,"data-slot":"input-group-control",class:"peer flex h-9 min-w-0 flex-1 cursor-default items-center overflow-hidden rounded-none border-0 bg-transparent px-3 py-1 text-left text-sm text-zinc-700 outline-none disabled:cursor-not-allowed"},[G.value?(k(),M(s(z),{key:0,source:G.value,class:"block truncate"},null,8,["source"])):m.value?(k(),L("span",wgt,O(m.value),1)):ke("",!0)],8,xgt)]),_:1}),C.value?(k(),M(s(pt),{key:0,align:"inline-end",class:"text-zinc-400"},{default:f(()=>[c(s(fe),{icon:"fluent:spinner-ios-20-regular",class:"animate-spin"})]),_:1})):he.value?(k(),M(s(pt),{key:1,align:"inline-end",class:"[@media(hover:hover)]:opacity-0 transition-opacity group-hover/combobox-single-remote:opacity-100 focus-within:opacity-100"},{default:f(()=>[c(s(Ct),{size:"icon-xs","data-slot":"combobox-single-remote-clear",class:"text-zinc-500 hover:text-zinc-700",tabindex:"-1",onMousedown:ce[0]||(ce[0]=at(()=>{},["prevent"])),onClick:at(ue,["stop"])},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"})]),_:1})]),_:1})):ke("",!0)]),_:1},8,["data-disabled"])]),_:1}),c(s(oc),{class:"p-0",style:{width:"var(--reka-popover-trigger-width)"}},{default:f(()=>[c(s(np),{"model-value":R.value,disabled:v.value,"selection-behavior":"toggle","onUpdate:modelValue":Y},{default:f(()=>[c(s(Zm),{placeholder:s(o)("combobox-single-search-placeholder")},null,8,["placeholder"]),c(s(rp),null,{default:f(()=>[A.value.length===0?(k(),L("div",Sgt,O(C.value?s(o)("combobox-single-loading"):s(o)("combobox-single-empty")),1)):(k(),L(Me,{key:1},[c(s(op),{class:"py-6 text-center text-sm text-zinc-500"},{default:f(()=>[P(O(s(o)("combobox-single-empty")),1)]),_:1}),c(s(tl),null,{default:f(()=>[(k(!0),L(Me,null,Ke(A.value,ae=>(k(),M(s(ws),{key:ae.key,value:ae.key},{default:f(()=>[c(s(z),{source:ae.label},null,8,["source"])]),_:2},1032,["value"]))),128))]),_:1})],64))]),_:1})]),_:1},8,["model-value","disabled"])]),_:1})]),_:1},8,["open"]))]),_:1},8,["orientation","data-disabled"]))}}),Cgt=/\{\{([\s\S]*?)\}\}/g;function Zre(e,t){return e.replace(Cgt,(n,o)=>{const r=o.trim();return r.length===0?"":t(r)})}const h4=q({name:"ShwfedFormUnitRenderer",__name:"FormUnitRenderer",props:{unit:{},evaluateMedia:{type:Function},isHidden:{type:Function}},setup(e){const t=e;function n(d){for(const p of d){if(!p.media)return p;try{if(t.evaluateMedia(p.media))return p}catch(m){console.error(`[shwfed-form] failed to evaluate layout media for ${p.name}:`,m)}}return d[d.length-1]}const o=re();Pt(()=>{o.value=n(t.unit.layouts)}),Xe(()=>t.unit.layouts,d=>{o.value=n(d)},{deep:!1});const r=new Set,a=E(()=>{const d=o.value?.layout;if(!d)return[];const p=[];for(const m of t.unit.fields){const h=d.placements[m.id];if(!h||t.isHidden?.(m))continue;const g=Ap(m.type,m.compatibilityDate);if(!g){const v=`${m.type}@${m.compatibilityDate}`;r.has(v)||(r.add(v),console.warn(`[shwfed-form] no registered field type for ${v}`));continue}p.push({field:m,placement:h,entry:g})}return p});function i(d){const[[p,m],[h,g]]=d.area,v=[`grid-column: ${p} / ${h}`,`grid-row: ${m} / ${g}`,"min-width: 0"],b=d.h&&d.h!=="stretch"?d.h:null,x=d.v&&d.v!=="stretch"?d.v:null;if(b||x){v.push("display: flex");const y=_=>_==="start"?"flex-start":_==="end"?"flex-end":"center";b&&v.push(`justify-content: ${y(b)}`),x&&v.push(`align-items: ${y(x)}`)}return v.join("; ")}const l=E(()=>{const d=o.value?.layout;if(!d)return"";const p=`repeat(${d.columns}, minmax(0, 1fr))`;let m="";if(d.rows){const b=Array.from({length:d.rows},()=>!1);for(const x of a.value){if(!x.entry.metadata.h.grow)continue;const[[,y],[,_]]=x.placement.area,w=Math.max(1,y),S=Math.min(d.rows,_-1);for(let C=w;C<=S;C++)b[C-1]=!0}m=b.map(x=>x?"auto":"minmax(auto, 1fr)").join(" ")}const h=`calc(${d.gap??zR} * 0.25rem)`,g=d.columns>1?`min(${h}, calc(100% / ${d.columns-1}))`:h;return["display: grid",`grid-template-columns: ${p}`,m?`grid-template-rows: ${m}`:"",`column-gap: ${g}`,`row-gap: ${h}`,d.style??""].filter(Boolean).join("; ")}),u=E(()=>a.value.map(d=>({key:d.field.id,style:i(d.placement),component:d.entry.runtime,fieldId:d.field.id,config:d.field})));return(d,p)=>(k(),L("div",{style:mn(l.value)},[(k(!0),L(Me,null,Ke(u.value,m=>(k(),L("div",{key:m.key,style:mn(m.style)},[(k(),M(Mo(m.component),{"field-id":m.fieldId,config:m.config},null,8,["field-id","config"]))],4))),128))],4))}});function hS(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object")return!1;if(e instanceof Date||t instanceof Date)return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime();if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((r,a)=>hS(r,t[a]));const n=Object.keys(e),o=Object.keys(t);return n.length!==o.length?!1:n.every(r=>Object.prototype.hasOwnProperty.call(t,r)&&hS(e[r],t[r]))}const Qre=Symbol("shwfed-form-derived-quiescence");function eae(){const e=re(0);return{inFlight:e,begin:()=>{e.value+=1},end:()=>{e.value-=1},async settled(){for(;;)if(e.value>0&&await new Promise(t=>{const n=Xe(e,o=>{o===0&&(n(),t())})}),await It(),e.value===0)return}}}function $gt(){const e=eae();return fr(Qre,e),e}function tae(){return Fn(Qre,null)??eae()}function g4(e){const{state:t,getAt:n,setAtSilent:o,isDirty:r,markDirty:a}=e.formState,i=e.quiescence,l=E(()=>e.fields().flatMap(v=>{const b=v.binding,x=v.derived;if(typeof b!="string"||!x||typeof x!="object")return[];const y=x.mode,_=x.expression;return y!=="formula"&&y!=="prefill"||typeof _!="string"?[]:[{binding:b,mode:y,expression:_}]}));let u=0,d=!1;function p(v,b){i.begin(),Yr(e.evaluate(v.expression)).then(x=>{b===u&&(v.mode==="prefill"&&r(v.binding)||hS(n(v.binding),x)||o(v.binding,x))},()=>{}).finally(()=>{i.end()})}function m(){const v=u+=1;for(const b of l.value)p(b,v)}Xe([t,l],()=>{d&&m()});function h(){for(const v of l.value)v.mode==="prefill"&&n(v.binding)!==void 0&&a(v.binding)}let g=!1;Pm(()=>{g=!0}),e.ready.then(()=>{g||(d=!0,h(),m())},()=>{g||(d=!0,h(),m())})}const tB=q({name:"ShwfedListFieldRow",__name:"row",props:Ca({unit:{},index:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue"),n=e,o=u4(t,"row");Wi({item:{type:"dyn",label:"item",description:"当前列表项",value:()=>t.value??{}},index:{type:"number",label:"index",description:"当前列表项索引,从 0 开始",value:()=>n.index}});const r=vn(),a=(l,u)=>Ht(l,{...dn(r),...u});g4({fields:()=>n.unit.fields,evaluate:l=>a(l),ready:Promise.resolve(),formState:o,quiescence:tae()});function i(l){return bt(a(l))}return(l,u)=>(k(),M(h4,{unit:e.unit,"evaluate-media":i},null,8,["unit"]))}}),Tgt={class:"flex flex-col gap-3"},Egt=["data-instruction"],Dgt={class:"flex items-center gap-2"},Ogt={key:2,class:"min-w-0 flex-1","data-slot":"list-row-summary"},Agt={key:3,class:"min-w-0 flex-1"},Igt={key:0,class:"mt-3 min-w-0","data-slot":"list-row-content"},ax="shwfed-list-row",Pgt=q({name:"ShwfedListFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(W,B)=>Ht(W,{...dn(i),...B}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0),p=E(()=>ut(t.config.addLabel,n.value)||"新增"),m=E(()=>ut(t.config.locale,n.value)),h=E(()=>!!m.value);function g(W,B){if(!W)return!1;try{return bt(l(W,{form:o.value??{}}))}catch(K){return console.error(`[shwfed-form] failed to evaluate ${B} for ${t.fieldId}:`,K),!1}}const v=E(()=>g(t.config.disabled,"disabled")),b=E(()=>t.config.reorderable??!0),x=E(()=>{const W=t.config.unit.fields;return W.length!==1?!1:W[0].binding===mA}),y=re([]),_=E(()=>{const W=t.config.binding;if(W==null)return y.value;const B=r(W);return Array.isArray(B)?B:[]}),w=E(()=>{const W=m.value;return W==null?[]:_.value.map((B,K)=>Zre(W,X=>{try{const Ee=bt(l(X,{form:o.value??{},item:B??{},index:K}));return Ee==null?"":String(Ee)}catch(Ee){return console.error(`[shwfed-form] list field: failed to evaluate summary expression \`${X}\` for ${t.fieldId}[${K}]:`,Ee),""}}))});function S(W){const B=t.config.binding;if(B==null){y.value=W;return}a(B,W)}function C(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,W=>{const B=Math.random()*16|0;return(W==="x"?B:B&3|8).toString(16)})}const $=re([]);Xe(()=>_.value.length,W=>{W!==$.value.length&&($.value=Array.from({length:W},()=>C()))},{immediate:!0});const T=re(new Set);function D(W){return T.value.has(W)}function A(W){const B=new Set(T.value);B.has(W)?B.delete(W):B.add(W),T.value=B}const I=E(()=>t.config.max!=null&&_.value.length>=t.config.max),U=E(()=>(t.config.min??0)>0&&_.value.length<=(t.config.min??0)),j=E(()=>!v.value&&!I.value),Q=E(()=>!v.value&&!U.value),F=E(()=>!v.value&&b.value);function R(){if(!j.value)return;const W=x.value?null:{};S([..._.value,W]);const B=C();$.value=[...$.value,B];const K=new Set(T.value);K.add(B),T.value=K}function G(W){if(!Q.value||W<0||W>=_.value.length)return;const B=$.value[W];if(S(_.value.filter((K,X)=>X!==W)),$.value=$.value.filter((K,X)=>X!==W),B!=null&&T.value.has(B)){const K=new Set(T.value);K.delete(B),T.value=K}}function Z(W,B){if(!F.value||W===B||W<0||B<0||W>=_.value.length||B>=_.value.length)return;const K=[..._.value],[X]=K.splice(W,1);if(!X)return;K.splice(B,0,X),S(K);const Ee=[...$.value],[_e]=Ee.splice(W,1);_e&&(Ee.splice(B,0,_e),$.value=Ee)}function Y(W,B){if(W<0||W>=_.value.length)return;const K=[..._.value];K[W]=B,S(K)}const he=W=>$.value[W]??`idx-${W}`;function ue(W){if(!F.value||W.source.kind!==ax||W.target.kind!==ax)return;const B=$.value.findIndex(X=>X===W.source.id),K=$.value.findIndex(X=>X===W.target.id);B<0||K<0||(W.instruction==="reorder-above"?Z(B,B<K?K-1:K):W.instruction==="reorder-below"&&Z(B,B<=K?K:K+1))}const pe=Zv({onRowDrop:ue}),ce=W=>W.querySelector(".drag-handle");function ae(W){return{kind:ax,canDrop:B=>B.kind===ax,blockInstructions:B=>{const K=["make-child","reparent"];return B.id===he(W)&&K.push("reorder-above","reorder-below"),K},dragHandle:ce}}return(W,B)=>(k(),M(s(V),{orientation:"vertical","data-disabled":v.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[d.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:d.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),H("div",Tgt,[(k(!0),L(Me,null,Ke(_.value,(K,X)=>(k(),L("div",{key:$.value[X],ref_for:!0,ref:s(pe).rowRef(he(X),ae(X)),class:"relative rounded border border-zinc-200 bg-zinc-50/40 p-3","data-slot":"list-row","data-instruction":s(pe).instructionFor(he(X))??void 0},[H("div",Dgt,[b.value?(k(),M(s(fe),{key:0,icon:"fluent:re-order-dots-vertical-20-regular",class:He(["drag-handle size-4 shrink-0 text-zinc-400",F.value?"cursor-grab":"cursor-not-allowed opacity-50"]),"data-slot":"list-row-drag-handle"},null,8,["class"])):ke("",!0),h.value?(k(),M(s(Ct),{key:1,size:"icon-xs",class:"shrink-0","data-slot":"list-row-collapse","aria-expanded":D(he(X)),"aria-label":D(he(X))?"折叠":"展开",onClick:Ee=>A(he(X))},{default:f(()=>[c(s(fe),{icon:D(he(X))?"fluent:chevron-down-20-regular":"fluent:chevron-right-20-regular"},null,8,["icon"])]),_:2},1032,["aria-expanded","aria-label","onClick"])):ke("",!0),h.value?(k(),L("div",Ogt,[c(s(z),{source:w.value[X]??"",class:"prose prose-xs prose-zinc"},null,8,["source"])])):(k(),L("div",Agt,[c(tB,{"model-value":K,unit:e.config.unit,index:X,"onUpdate:modelValue":Ee=>Y(X,Ee)},null,8,["model-value","unit","index","onUpdate:modelValue"])])),c(s(Ct),{variant:"destructive",size:"icon-xs",class:"shrink-0",disabled:!Q.value,"data-slot":"list-row-remove","aria-label":"删除",onClick:Ee=>G(X)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["disabled","onClick"])]),h.value?sm((k(),L("div",Igt,[c(tB,{"model-value":K,unit:e.config.unit,index:X,"onUpdate:modelValue":Ee=>Y(X,Ee)},null,8,["model-value","unit","index","onUpdate:modelValue"])],512)),[[AI,D(he(X))]]):ke("",!0)],8,Egt))),128)),c(s(Rn),{type:"button",disabled:!j.value,"data-slot":"list-add",class:"w-full justify-center",onClick:R},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),H("span",null,O(p.value),1)]),_:1},8,["disabled"])])]),_:1},8,["data-disabled"]))}}),Mgt=sp(Pgt,[["__scopeId","data-v-5cc27944"]]),Rgt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},Fgt={key:2,class:"min-h-9 py-1.5 text-sm text-zinc-400"},zgt={key:3,class:"flex flex-wrap items-start gap-x-6 gap-y-2 py-1"},Vgt={class:"flex flex-col gap-0.5"},Ngt={class:"text-sm text-zinc-700"},Lgt=q({name:"ShwfedCheckboxGroupFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"checkbox-group-empty":"无可选项"},en:{"checkbox-group-empty":"No options"},ja:{"checkbox-group-empty":"選択肢なし"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=(A,I)=>Ht(A,{...dn(l),...I}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m(A,I){if(!A)return!1;try{return bt(u(A,{form:r.value??{}}))}catch(U){return console.error(`[shwfed-form] failed to evaluate ${I} for ${t.fieldId}:`,U),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula");function x(A,I){try{return Ss(A,u,I)}catch(U){return console.error(`[shwfed-form] failed to interpolate option text for ${t.fieldId}:`,U),A}}const y=E(()=>(t.config.items??[]).map(A=>{const I=ut(A.label,n.value)??"",U=A.tooltip?ut(A.tooltip,n.value):void 0,j={form:r.value??{}};return{key:A.id,value:A.value.value,label:I?x(I,j):"",tooltip:U?x(U,j):void 0}}));function _(A){return Array.isArray(A)?A:[]}const w=re([]),S=E({get:()=>{const A=t.config.binding;return A==null?w.value:_(a(A))},set:A=>{const I=t.config.binding;if(I==null){w.value=A;return}i(I,A)}});function C(A,I){if(A===I)return!0;if(A==null||I==null)return!1;if(typeof A=="object"&&typeof I=="object")try{return JSON.stringify(A)===JSON.stringify(I)}catch{return!1}return!1}function $(A){return S.value.some(I=>C(I,A.value))}function T(A){if(h.value)return;const I=S.value;S.value=$(A)?I.filter(U=>!C(U,A.value)):[...I,A.value]}const D=E(()=>y.value.filter($).map(I=>I.label).filter(I=>I.length>0).join("、")||"—");return(A,I)=>(k(),M(s(V),{orientation:"vertical","data-disabled":h.value||void 0},{default:f(()=>[d.value?(k(),M(s(N),{key:0,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)):ke("",!0),b.value?(k(),L("div",Rgt,O(D.value),1)):y.value.length===0?(k(),L("div",Fgt,O(s(o)("checkbox-group-empty")),1)):(k(),L("div",zgt,[(k(!0),L(Me,null,Ke(y.value,U=>(k(),L("label",{key:U.key,"data-slot":"checkbox-group-option",class:He(["flex items-start gap-2",h.value?"cursor-not-allowed opacity-60":"cursor-pointer"])},[c(s(o4),{"model-value":$(U),disabled:h.value,class:"mt-0.5","onUpdate:modelValue":()=>T(U)},null,8,["model-value","disabled","onUpdate:modelValue"]),H("span",Vgt,[H("span",Ngt,O(U.label),1),U.tooltip?(k(),M(s(z),{key:0,source:U.tooltip,block:"",class:"prose prose-xs prose-zinc text-zinc-400"},null,8,["source"])):ke("",!0)])],2))),128))]))]),_:1},8,["data-disabled"]))}}),Bgt=q({name:"UiRadioGroup",__name:"RadioGroup",props:{modelValue:{},defaultValue:{},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=At(n,"class"),a=Dn(r,o);return(i,l)=>(k(),M(s(jUe),Oe({"data-slot":"radio-group"},s(a),{class:s(et)("grid gap-3",n.class)}),{default:f(()=>[se(i.$slots,"default")]),_:3},16,["class"]))}}),Ugt=q({name:"UiRadioGroupItem",__name:"RadioGroupItem",props:{id:{},value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,n=At(t,"class"),o=yn(n);return(r,a)=>(k(),M(s(KUe),Oe({"data-slot":"radio-group-item"},s(o),{class:s(et)("peer cursor-pointer flex items-center justify-center border-zinc-200 data-[state=checked]:border-(--primary) aria-invalid:border-red-400 size-4 shrink-0 rounded-full border shadow-xs hover:shadow transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50",t.class)}),{default:f(()=>[c(s(JUe),{"data-slot":"radio-group-indicator",class:"grid h-full w-full place-content-center"},{default:f(()=>[...a[0]||(a[0]=[H("span",{class:"size-2 rounded-full bg-(--primary)"},null,-1)])]),_:1})]),_:1},16,["class"]))}}),qgt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},jgt={key:2,class:"min-h-9 py-1.5 text-sm text-zinc-400"},Hgt={class:"flex flex-col gap-0.5"},Wgt={class:"text-sm text-zinc-700"},Ggt=q({name:"ShwfedRadioGroupFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"radio-group-empty":"无可选项"},en:{"radio-group-empty":"No options"},ja:{"radio-group-empty":"選択肢なし"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=($,T)=>Ht($,{...dn(l),...T}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m($,T){if(!$)return!1;try{return bt(u($,{form:r.value??{}}))}catch(D){return console.error(`[shwfed-form] failed to evaluate ${T} for ${t.fieldId}:`,D),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula");function x($,T){try{return Ss($,u,T)}catch(D){return console.error(`[shwfed-form] failed to interpolate option text for ${t.fieldId}:`,D),$}}const y=E(()=>(t.config.items??[]).map($=>{const T=ut($.label,n.value)??"",D=$.tooltip?ut($.tooltip,n.value):void 0,A={form:r.value??{}};return{key:$.id,value:$.value.value,label:T?x(T,A):"",tooltip:D?x(D,A):void 0}})),_=re(void 0),w=E({get:()=>{const $=t.config.binding,T=$==null?_.value:a($);return typeof T=="string"||typeof T=="number"?T:void 0},set:$=>{const T=t.config.binding;if(T==null){_.value=$;return}i(T,$)}});function S($){h.value||(w.value=typeof $=="string"||typeof $=="number"?$:void 0)}const C=E(()=>y.value.find(T=>T.value===w.value)?.label||"—");return($,T)=>(k(),M(s(V),{orientation:"vertical","data-disabled":h.value||void 0},{default:f(()=>[d.value?(k(),M(s(N),{key:0,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)):ke("",!0),b.value?(k(),L("div",qgt,O(C.value),1)):y.value.length===0?(k(),L("div",jgt,O(s(o)("radio-group-empty")),1)):(k(),M(s(Bgt),{key:3,"model-value":w.value,disabled:h.value,class:"flex flex-wrap items-start gap-x-6 gap-y-2 py-1","onUpdate:modelValue":S},{default:f(()=>[(k(!0),L(Me,null,Ke(y.value,D=>(k(),L("label",{key:D.key,"data-slot":"radio-group-option",class:He(["flex items-start gap-2",h.value?"cursor-not-allowed opacity-60":"cursor-pointer"])},[c(s(Ugt),{value:D.value,disabled:h.value,class:"mt-0.5"},null,8,["value","disabled"]),H("span",Hgt,[H("span",Wgt,O(D.label),1),D.tooltip?(k(),M(s(z),{key:0,source:D.tooltip,block:"",class:"prose prose-xs prose-zinc text-zinc-400"},null,8,["source"])):ke("",!0)])],2))),128))]),_:1},8,["model-value","disabled"]))]),_:1},8,["data-disabled"]))}}),Kgt=q({name:"ShwfedTableFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=nv(()=>aa(()=>import("./index-CzcHfDck.js"),[],import.meta.url)),n=e,{locale:o}=un(),r=dr(),a=E(()=>ut(n.config.label,o.value)),i=E(()=>n.config.tooltip?ut(n.config.tooltip,o.value):void 0),l=E(()=>{const{dataSource:d,...p}=n.config.table;return p}),u=E({get:()=>{const d=n.config.binding?.trim();if(!d)return[];const p=r.getAt(d);return Array.isArray(p)?p:[]},set:d=>{const p=n.config.binding?.trim();p&&r.setAtSilent(p,d)}});return(d,p)=>(k(),M(s(V),{orientation:"vertical"},{default:f(()=>[a.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(a.value),1)]),_:2},[i.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:i.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),c(s(t),{rows:u.value,"onUpdate:rows":p[0]||(p[0]=m=>u.value=m),config:l.value},null,8,["rows","config"])]),_:1}))}}),Ygt={"data-slot":"collapsible-section",class:"relative rounded border border-zinc-200 bg-zinc-50/40 p-3"},Jgt={class:"flex items-center gap-2"},Xgt={class:"min-w-0 flex-1","data-slot":"collapsible-header"},Zgt={"data-slot":"collapsible-body",class:"mt-3 min-w-0"},Qgt=q({name:"ShwfedCollapsibleFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),o=re(t.config.defaultCollapsed??!1);function r(){o.value=!o.value}const a=vn(),i=(p,m)=>Ht(p,{...dn(a),...m}),l=E(()=>{const p=ut(t.config.header,n.value)??"";return p?Zre(p,m=>{try{const h=bt(i(m));return h==null?"":String(h)}catch(h){return console.error(`[shwfed-form] collapsible: failed to evaluate header expression \`${m}\` for ${t.fieldId}:`,h),""}}):""});function u(p){return bt(i(p))}function d(p){const m=p.hidden;if(!m)return!1;try{return bt(i(m))}catch(h){return console.error(`[shwfed-form] collapsible: failed to evaluate hidden for ${p.id}:`,h),!1}}return(p,m)=>(k(),L("div",Ygt,[H("div",Jgt,[c(s(Ct),{size:"icon-xs",class:"shrink-0","data-slot":"collapsible-toggle","aria-expanded":!o.value,"aria-label":o.value?"展开":"折叠",onClick:r},{default:f(()=>[c(s(fe),{icon:o.value?"fluent:chevron-right-20-regular":"fluent:chevron-down-20-regular"},null,8,["icon"])]),_:1},8,["aria-expanded","aria-label"]),H("div",Xgt,[c(s(z),{source:l.value,class:"prose prose-sm prose-zinc max-w-none"},null,8,["source"])])]),sm(H("div",Zgt,[c(h4,{unit:e.config.unit,"evaluate-media":u,"is-hidden":d},null,8,["unit"])],512),[[AI,!o.value]])]))}}),ix=q({name:"UiSkeleton",__name:"Skeleton",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(n,o)=>(k(),L("div",{"data-slot":"skeleton",class:He(s(et)("animate-pulse rounded-md bg-zinc-300/20",t.class))},null,2))}});function evt(e){const t=ti(new Set(e.initialExpanded())),n=ti(new Set(e.initialSelection())),o=ti(new Map),r=ti(new Set),a=re(null),i=mo(e.rootsRef.value);e.rootsRef;function l(){i.value=e.rootsRef.value}function u(ce){const ae=[{siblings:i.value,parent:null,depth:0}];for(;ae.length;){const W=ae.pop();for(let B=0;B<W.siblings.length;B++){const K=W.siblings[B];if(e.getKey(K)===ce)return{node:K,parent:W.parent,depth:W.depth,index:B,siblings:W.siblings};const X=d(K);X&&X.length&&ae.push({siblings:X,parent:K,depth:W.depth+1})}}return null}function d(ce){const ae=e.getKey(ce),W=o.get(ae);if(W?.status==="loaded")return W.children;const B=e.getChildren?.(ce);return B===void 0?e.loadChildren?null:void 0:B.length>0?B:e.loadChildren?null:B}function p(ce){const ae=o.get(e.getKey(ce));if(ae?.status==="loaded"&&ae.children.length>0)return!0;const W=e.getChildren?.(ce);return W===void 0?!1:W.length>0?!0:!!e.loadChildren}function m(ce){const ae=e.loadChildren;if(!ae)return;const W=e.getChildren?.(ce);if(!(W!==void 0&&W.length===0))return;const B=e.getKey(ce);r.has(B)||o.get(B)?.status==="loaded"||(r.add(B),o.set(B,{status:"loading"}),YK(ae(ce)).then(X=>{ku(X,{onSuccess:Ee=>{o.set(B,{status:"loaded",children:Ee})},onFailure:Ee=>{const _e=iCe(Ee),ze=_e._tag==="Some"?_e.value:Ee;o.set(B,{status:"error",error:ze})}})}))}function h(ce){r.delete(ce),o.delete(ce);const ae=u(ce);ae&&m(ae.node)}function g(ce){r.delete(ce),o.delete(ce)}function v(ce){const ae=u(ce);ae&&p(ae.node)&&(t.add(ce),m(ae.node))}function b(ce){t.delete(ce)}function x(ce){t.has(ce)?b(ce):v(ce)}function y(){e.onSelectionChange(Array.from(n))}function _(ce){n.clear(),n.add(ce),y()}function w(){n.size!==0&&(n.clear(),y())}function S(ce,ae,W=0){ae(ce,W);const B=d(ce);if(B&&B.length>0)for(const K of B)S(K,ae,W+1)}function C(ce,ae,W){S(ce,(B,K)=>{if(!e.selectable(B,ae+K))return;const X=e.getKey(B);W?n.add(X):n.delete(X)})}function $(ce){const ae=u(ce);if(!ae||!e.selectable(ae.node,ae.depth))return;const W=e.cascade(),B=!n.has(ce);W==="independent"?B?n.add(ce):n.delete(ce):C(ae.node,ae.depth,B),y()}function T(ce){const ae=e.selectionMode();if(ae!=="none"){if(ae==="single"){const W=u(ce);if(!W||!e.selectable(W.node,W.depth))return;_(ce);return}n.has(ce)||$(ce)}}function D(ce){const ae=e.selectionMode();if(ae!=="none"){if(ae==="single"){if(!n.has(ce))return;n.delete(ce),y();return}n.has(ce)&&$(ce)}}function A(ce,ae){let W=0,B=0;const K=d(ce);if(!K||K.length===0)return{total:W,selectedCount:B};for(const X of K)S(X,(Ee,_e)=>{e.selectable(Ee,ae+1+_e)&&(W++,n.has(e.getKey(Ee))&&B++)});return{selectedCount:B,total:W}}function I(ce,ae){if(e.selectionMode()!=="multi")return!1;const{selectedCount:W,total:B}=A(ce,ae);return B===0?!1:W>0&&W<B}function U(ce,ae){const W=e.getKey(ce);if(n.has(W))return!0;if(e.selectionMode()!=="multi")return!1;const{selectedCount:B,total:K}=A(ce,ae);return K>0&&B===K}function j(ce){e.setRoots(ce),i.value=ce}function Q(ce,ae){if(ce===null){const K=i.value.slice();return ae(K),j(K),!0}const W=u(ce);if(!W)return!1;const B=e.getChildren?.(W.node);if(B!==void 0)ae(B);else{const K=o.get(ce);if(K?.status==="loaded")ae(K.children);else{const X=[];ae(X),o.set(ce,{status:"loaded",children:X}),r.add(ce)}}return j(i.value.slice()),!0}function F(ce,ae,W){Q(ce,B=>{const K=W??B.length;B.splice(Math.max(0,Math.min(K,B.length)),0,ae)})}function R(ce){const ae=u(ce);ae&&(ae.siblings.splice(ae.index,1),n.delete(ce),t.delete(ce),o.delete(ce),r.delete(ce),j(i.value.slice()))}function G(ce,ae,W){const B=u(ce);if(!B)return;const[K]=B.siblings.splice(B.index,1);if(!K)return;if(ae===null){const _e=i.value.slice(),ze=Math.max(0,Math.min(W,_e.length));_e.splice(ze,0,K),j(_e);return}const X=u(ae);if(!X){B.siblings.splice(B.index,0,K);return}const Ee=e.getChildren?.(X.node);if(Ee!==void 0){const _e=Math.max(0,Math.min(W,Ee.length));Ee.splice(_e,0,K)}else{const _e=o.get(ae);if(_e?.status==="loaded"){const ze=Math.max(0,Math.min(W,_e.children.length));_e.children.splice(ze,0,K)}else{const ze=[K];o.set(ae,{status:"loaded",children:ze}),r.add(ae)}}j(i.value.slice())}function Z(ce,ae){const W=u(ce);W&&(Object.assign(W.node,ae),j(i.value.slice()))}function Y(ce){const ae=[];function W(B,K){for(const X of B){(!ce||ce(X))&&ae.push({node:X,depth:K,key:e.getKey(X)});const Ee=d(X);Ee&&Ee.length>0&&t.has(e.getKey(X))&&W(Ee,K+1)}}return W(i.value,0),ae}function he(ce){const ae=[];function W(B){for(const K of B){if(ae.push(K),e.getKey(K)===ce)return!0;const X=d(K);if(X&&X.length&&W(X))return!0;ae.pop()}return!1}return W(i.value)?ae.slice():null}function ue(){return{roots:i.value.slice(),selected:Array.from(n),expanded:Array.from(t)}}const pe=E(()=>{const ce=[];for(const ae of n){const W=u(ae);W&&ce.push(W.node)}return ce});return{expanded:t,selected:n,loadState:o,focusedKey:a,rootsView:i,locate:u,resolvedChildren:d,isExpandable:p,isIndeterminate:I,isVisuallySelected:U,flattenVisible:Y,selectedNodes:pe,syncRoots:l,expand:v,collapse:b,toggleExpand:x,selectKey:T,deselectKey:D,clearSelection:w,toggleMulti:$,insert:F,remove:R,move:G,update:Z,invalidate:g,retry:h,findPath:he,snapshot:ue}}const tvt=["aria-expanded","aria-selected","aria-level","aria-setsize","aria-posinset","data-tree-key","data-tree-focused"],nvt={class:"flex items-center gap-1 min-w-0 flex-1"},ovt=["aria-label"],rvt={key:1,"aria-hidden":"true",class:"inline-block size-4 shrink-0"},avt=["checked"],ivt={class:"min-w-0 flex-1"},svt={class:"text-sm"},lvt={key:0,class:"flex items-center gap-1 shrink-0"},uvt={key:1,role:"group",class:"m-0 list-none p-0"},cvt={class:"text-xs text-zinc-500 inline-flex items-center gap-1"},dvt=q({name:"UiTreeNode",inheritAttrs:!1,__name:"TreeNode",props:{node:{},depth:{},posInSet:{},setSize:{},parentKey:{},getKey:{type:Function},getChildren:{type:Function},hasLoader:{type:Boolean},selectionMode:{},cascade:{},selectable:{type:Function},draggable:{type:Function},isExpanded:{type:Function},isSelectedKey:{type:Function},isVisuallySelected:{type:Function},isIndeterminate:{type:Function},resolvedChildren:{type:Function},loadStateOf:{type:Function},filterPredicate:{type:Function},filterQuery:{},isExpandable:{type:Function},tree:{},focusedKey:{},showFocusedRow:{type:Boolean}},emits:["toggle-expand","toggle-select","focus-row"],setup(e,{emit:t}){const n=e,o=t,r=E(()=>n.getKey(n.node)),a=E(()=>n.isExpanded(r.value)),i=E(()=>n.isExpandable(n.node)),l=E(()=>n.loadStateOf(r.value)),u=E(()=>l.value?.status==="loading"),d=E(()=>l.value?.status==="error"?l.value.error:null),p=E(()=>n.isVisuallySelected(n.node,n.depth)),m=E(()=>n.isIndeterminate(n.node,n.depth)),h=E(()=>n.selectable(n.node,n.depth)),g=E(()=>{if(!n.filterPredicate||!n.filterQuery||n.filterPredicate(n.node,n.filterQuery))return!0;const T=n.resolvedChildren(n.node);return!T||T.length===0?!1:T.some(D=>v(D))});function v(T){if(!n.filterPredicate||!n.filterQuery||n.filterPredicate(T,n.filterQuery))return!0;const D=n.resolvedChildren(T);return!D||D.length===0?!1:D.some(A=>v(A))}const b=E(()=>!n.filterPredicate||!n.filterQuery?!0:n.filterPredicate(n.node,n.filterQuery)),x=E(()=>({node:n.node,depth:n.depth,expanded:a.value,loading:u.value,selected:p.value,indeterminate:m.value,tree:n.tree})),y=E(()=>({node:n.node,depth:n.depth,tree:n.tree}));function _(){i.value&&o("toggle-expand",r.value)}function w(){n.selectionMode!=="none"&&h.value&&o("toggle-select",r.value)}const S=E(()=>{if(n.selectionMode!=="none")return m.value?"mixed":p.value?"true":"false"}),C=E(()=>n.resolvedChildren(n.node)),$=E(()=>i.value&&(a.value||!b.value&&g.value));return(T,D)=>{const A=Rf("UiTreeNode");return g.value?(k(),L("li",{key:0,role:"treeitem","aria-expanded":i.value?a.value:void 0,"aria-selected":S.value,"aria-level":e.depth+1,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"data-tree-key":r.value,"data-tree-focused":e.focusedKey===r.value?"":void 0,class:"select-none"},[g.value?(k(),L("div",{key:0,class:He(s(et)("group flex items-center justify-between gap-2 rounded px-1 py-1 outline-none",e.showFocusedRow&&e.focusedKey===r.value&&"bg-(--primary)/10")),tabindex:"-1",onClick:D[1]||(D[1]=at(I=>o("focus-row",r.value),["stop"]))},[H("div",nvt,[H("span",{"aria-hidden":"true",class:"inline-block shrink-0",style:mn({width:`${e.depth*16}px`})},null,4),i.value?(k(),L("button",{key:0,type:"button",class:"inline-flex size-4 shrink-0 items-center justify-center rounded text-zinc-500 hover:text-zinc-900","aria-label":a.value?"Collapse":"Expand",onClick:at(_,["stop"])},[c(s(fe),{icon:a.value?"fluent:chevron-down-16-filled":"fluent:chevron-right-16-filled",class:"size-3"},null,8,["icon"])],8,ovt)):(k(),L("span",rvt)),e.selectionMode!=="none"&&h.value?(k(),L(Me,{key:2},[e.selectionMode==="multi"?(k(),M(s(o4),{key:0,"model-value":m.value?"indeterminate":p.value,"data-tree-toggle":"checkbox","onUpdate:modelValue":w,onClick:D[0]||(D[0]=at(()=>{},["stop"]))},null,8,["model-value"])):(k(),L("input",{key:1,type:"radio",class:"size-4 shrink-0 accent-(--primary) cursor-pointer",checked:p.value,"data-tree-toggle":"radio",onClick:at(w,["stop"])},null,8,avt))],64)):ke("",!0),H("div",ivt,[se(T.$slots,"node",qt(Wt(x.value)),()=>[H("span",svt,O(String(e.node)),1)])])]),T.$slots.actions?(k(),L("div",lvt,[se(T.$slots,"actions",qt(Wt(y.value)))])):ke("",!0)],2)):ke("",!0),$.value?(k(),L("ul",uvt,[u.value?(k(),L("li",{key:0,role:"treeitem","aria-busy":"true",class:"px-1 py-1",style:mn({paddingLeft:`${(e.depth+1)*16+16}px`})},[se(T.$slots,"loading-children",{node:e.node},()=>[H("span",cvt,[c(s(fe),{icon:"svg-spinners:90-ring-with-bg",class:"size-3"}),D[5]||(D[5]=P(" Loading… ",-1))])])],4)):d.value!==null?(k(),L("li",{key:1,role:"treeitem",class:"px-1 py-1",style:mn({paddingLeft:`${(e.depth+1)*16+16}px`})},[se(T.$slots,"error",{node:e.node,error:d.value,retry:()=>e.tree.retry(r.value)})],4)):C.value&&C.value.length?(k(!0),L(Me,{key:2},Ke(C.value,(I,U)=>(k(),M(A,{key:e.getKey(I),node:I,depth:e.depth+1,"pos-in-set":U+1,"set-size":C.value.length,"parent-key":r.value,"get-key":e.getKey,"get-children":e.getChildren,"has-loader":e.hasLoader,"selection-mode":e.selectionMode,cascade:e.cascade,selectable:e.selectable,draggable:e.draggable,"is-expanded":e.isExpanded,"is-selected-key":e.isSelectedKey,"is-visually-selected":e.isVisuallySelected,"is-indeterminate":e.isIndeterminate,"resolved-children":e.resolvedChildren,"load-state-of":e.loadStateOf,"filter-predicate":e.filterPredicate,"filter-query":e.filterQuery,"is-expandable":e.isExpandable,tree:e.tree,"focused-key":e.focusedKey,"show-focused-row":e.showFocusedRow,onToggleExpand:D[2]||(D[2]=j=>o("toggle-expand",j)),onToggleSelect:D[3]||(D[3]=j=>o("toggle-select",j)),onFocusRow:D[4]||(D[4]=j=>o("focus-row",j))},ee({_:2},[T.$slots.node?{name:"node",fn:f(j=>[se(T.$slots,"node",Oe({ref_for:!0},j))]),key:"0"}:void 0,T.$slots.actions?{name:"actions",fn:f(j=>[se(T.$slots,"actions",Oe({ref_for:!0},j))]),key:"1"}:void 0,T.$slots.error?{name:"error",fn:f(j=>[se(T.$slots,"error",Oe({ref_for:!0},j))]),key:"2"}:void 0,T.$slots["loading-children"]?{name:"loading-children",fn:f(j=>[se(T.$slots,"loading-children",Oe({ref_for:!0},j))]),key:"3"}:void 0]),1032,["node","depth","pos-in-set","set-size","parent-key","get-key","get-children","has-loader","selection-mode","cascade","selectable","draggable","is-expanded","is-selected-key","is-visually-selected","is-indeterminate","resolved-children","load-state-of","filter-predicate","filter-query","is-expandable","tree","focused-key","show-focused-row"]))),128)):ke("",!0)])):ke("",!0)],8,tvt)):ke("",!0)}}}),fvt=["aria-multiselectable"],pvt={key:0,"data-slot":"tree-selected-pane"},mvt={key:1,"data-slot":"tree-empty"},hvt={key:2,role:"group",class:"m-0 list-none p-0"},gvt=q({name:"UiTree",__name:"Tree",props:{roots:{},getKey:{},getChildren:{type:Function,default:void 0},loadChildren:{type:Function,default:void 0},selectionMode:{default:"none"},cascade:{default:"independent"},modelValue:{default:void 0},selectable:{type:Function,default:()=>!0},draggable:{type:[Function,Boolean],default:!1},canDrop:{type:Function,default:void 0},filterPredicate:{type:Function,default:void 0},filterQuery:{default:""},initialExpanded:{default:()=>[]},showFocusedRow:{type:Boolean,default:!0}},emits:["update:modelValue","update:roots","move"],setup(e,{expose:t,emit:n}){const o=e,r=n;function a(){if(o.selectionMode==="none")return[];if(o.selectionMode==="single"){const R=o.modelValue;return typeof R=="string"?[R]:[]}const F=o.modelValue;return Array.isArray(F)?F.slice():[]}const i=E(()=>o.roots);function l(F){r("update:roots",F)}let u=a();function d(F){if(u=F,o.selectionMode==="single"){r("update:modelValue",F[0]);return}r("update:modelValue",F)}const p=evt({rootsRef:i,setRoots:l,getKey:o.getKey,getChildren:o.getChildren,loadChildren:o.loadChildren,selectionMode:()=>o.selectionMode,cascade:()=>o.cascade,selectable:(F,R)=>o.selectable(F,R),initialSelection:a,initialExpanded:()=>o.initialExpanded??[],onSelectionChange:d});Xe(i,()=>p.syncRoots()),Xe(()=>o.modelValue,F=>{const R=o.selectionMode==="single"?typeof F=="string"?[F]:[]:Array.isArray(F)?F.slice():[];if(!m(R,u)){p.selected.clear();for(const G of R)p.selected.add(G);u=R}});function m(F,R){if(F.length!==R.length)return!1;const G=new Set(F);for(const Z of R)if(!G.has(Z))return!1;return!0}const h={insert:(F,R,G)=>p.insert(F,R,G),remove:F=>p.remove(F),move:(F,R,G)=>{const Z=p.locate(F);if(!Z)return;const Y={key:F,fromParentKey:Z.parent?o.getKey(Z.parent):null,fromIndex:Z.index,toParentKey:R,toIndex:G};p.move(F,R,G),r("move",Y)},update:(F,R)=>p.update(F,R),expand:F=>p.expand(F),collapse:F=>p.collapse(F),select:F=>p.selectKey(F),deselect:F=>p.deselectKey(F),invalidate:F=>p.invalidate(F),retry:F=>p.retry(F),findPath:F=>p.findPath(F),snapshot:()=>p.snapshot()};t(h);const g=F=>p.expanded.has(F),v=F=>p.selected.has(F),b=(F,R)=>p.isVisuallySelected(F,R),x=(F,R)=>p.isIndeterminate(F,R),y=F=>p.resolvedChildren(F),_=F=>p.loadState.get(F),w=F=>p.isExpandable(F),S=(F,R)=>typeof o.draggable=="function"?o.draggable(F,R):o.draggable;function C(F){p.toggleExpand(F)}function $(F){if(o.selectionMode!=="none"){if(o.selectionMode==="single"){const R=p.locate(F);if(!R||!o.selectable(R.node,R.depth))return;p.selectKey(F);return}p.toggleMulti(F)}}function T(F){p.focusedKey.value=F}function D(){return p.flattenVisible(o.filterPredicate&&o.filterQuery?F=>{if(o.filterPredicate(F,o.filterQuery))return!0;const R=y(F);if(!R||R.length===0)return!1;const G=[...R];for(;G.length;){const Z=G.pop();if(o.filterPredicate(Z,o.filterQuery))return!0;const Y=y(Z);Y&&Y.length&&G.push(...Y)}return!1}:void 0)}function A(F){const R=D();if(!R.length)return;const G=p.focusedKey.value;let Z=R.findIndex(he=>he.key===G);Z===-1&&(Z=F>0?-1:R.length);const Y=Math.max(0,Math.min(R.length-1,Z+F));p.focusedKey.value=R[Y].key}function I(F){const R=D();R.length&&(p.focusedKey.value=(F==="home"?R[0]:R[R.length-1]).key)}function U(F){switch(o.selectionMode==="none"&&["ArrowUp","ArrowDown","Home","End"].includes(F.key),F.key){case"ArrowDown":F.preventDefault(),A(1);break;case"ArrowUp":F.preventDefault(),A(-1);break;case"ArrowRight":{F.preventDefault();const R=p.focusedKey.value;if(!R)return;const G=p.locate(R);if(!G)return;p.isExpandable(G.node)&&!p.expanded.has(R)?p.expand(R):A(1);break}case"ArrowLeft":{F.preventDefault();const R=p.focusedKey.value;if(!R)return;if(p.expanded.has(R)){p.collapse(R);return}const G=p.locate(R);G?.parent&&(p.focusedKey.value=o.getKey(G.parent));break}case"Home":F.preventDefault(),I("home");break;case"End":F.preventDefault(),I("end");break;case" ":case"Enter":{F.preventDefault();const R=p.focusedKey.value;if(!R)return;$(R);break}}}const j=E(()=>!(p.rootsView.value.length>0)),Q=E(()=>({selected:p.selectedNodes.value,tree:h}));return(F,R)=>(k(),L("div",{role:"tree","aria-multiselectable":e.selectionMode==="multi"?"true":void 0,tabindex:"0","data-slot":"tree",class:"outline-none",onKeydown:U},[F.$slots["selected-pane"]?(k(),L("div",pvt,[se(F.$slots,"selected-pane",qt(Wt(Q.value)))])):ke("",!0),j.value?(k(),L("div",mvt,[se(F.$slots,"empty")])):(k(),L("ul",hvt,[(k(!0),L(Me,null,Ke(s(p).rootsView.value,(G,Z)=>(k(),M(dvt,{key:e.getKey(G),node:G,depth:0,"pos-in-set":Z+1,"set-size":s(p).rootsView.value.length,"parent-key":null,"get-key":e.getKey,"get-children":e.getChildren,"has-loader":!!e.loadChildren,"selection-mode":e.selectionMode,cascade:e.cascade,selectable:e.selectable,draggable:S,"is-expanded":g,"is-selected-key":v,"is-visually-selected":b,"is-indeterminate":x,"resolved-children":y,"load-state-of":_,"filter-predicate":e.filterPredicate,"filter-query":e.filterQuery,"is-expandable":w,tree:h,"focused-key":s(p).focusedKey.value,"show-focused-row":e.showFocusedRow,onToggleExpand:C,onToggleSelect:$,onFocusRow:T},ee({_:2},[F.$slots.node?{name:"node",fn:f(Y=>[se(F.$slots,"node",Oe({ref_for:!0},Y))]),key:"0"}:void 0,F.$slots.actions?{name:"actions",fn:f(Y=>[se(F.$slots,"actions",Oe({ref_for:!0},Y))]),key:"1"}:void 0,F.$slots.error?{name:"error",fn:f(Y=>[se(F.$slots,"error",Oe({ref_for:!0},Y))]),key:"2"}:void 0,F.$slots["loading-children"]?{name:"loading-children",fn:f(Y=>[se(F.$slots,"loading-children",Oe({ref_for:!0},Y))]),key:"3"}:void 0]),1032,["node","pos-in-set","set-size","get-key","get-children","has-loader","selection-mode","cascade","selectable","filter-predicate","filter-query","focused-key","show-focused-row"]))),128))]))],40,fvt))}}),vvt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},yvt={key:1,class:"min-h-9 py-1.5 text-sm text-red-500"},bvt={key:2,class:"flex flex-col gap-1.5 py-1","aria-busy":"true"},_vt={class:"flex flex-col gap-0.5"},xvt={class:"min-h-9 py-1.5 text-sm text-zinc-400"},wvt=q({name:"ShwfedTreeMultiFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n,t:o}=un({inheritLocale:!0,messages:{zh:{"tree-multi-search-label":"搜索","tree-multi-search-clear":"清除搜索","tree-multi-load-error":"加载失败","tree-multi-empty":"无可选项","tree-multi-readonly-empty":"—","tree-multi-readonly-separator":"、"},en:{"tree-multi-search-label":"Search","tree-multi-search-clear":"Clear search","tree-multi-load-error":"Failed to load","tree-multi-empty":"No options","tree-multi-readonly-empty":"—","tree-multi-readonly-separator":", "},ja:{"tree-multi-search-label":"検索","tree-multi-search-clear":"検索をクリア","tree-multi-load-error":"読み込みに失敗しました","tree-multi-empty":"選択肢なし","tree-multi-readonly-empty":"—","tree-multi-readonly-separator":"、"}}}),{state:r,getAt:a,setAt:i}=dr(),l=vn(),u=(ue,pe)=>Ht(ue,{...dn(l),...pe}),d=E(()=>ut(t.config.label,n.value)),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m(ue,pe){if(!ue)return!1;try{return bt(u(ue,{form:r.value??{}}))}catch(ce){return console.error(`[shwfed-form] failed to evaluate ${pe} for ${t.fieldId}:`,ce),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula"),x=re([]),y=E({get:()=>{const ue=t.config.binding,pe=ue==null?x.value:a(ue);return Array.isArray(pe)?pe.map(ce=>String(ce)):[]},set:ue=>{const pe=ue.map(ae=>String(ae)),ce=t.config.binding;if(ce==null){x.value=pe;return}i(ce,pe)}}),_=re([]),w=re(!1),S=re(null);async function C(){const ue=t.config.dataSource;if(!ue){_.value=[];return}const pe=Eo(function*(){let ae=ot();if(ue.request){const K=yield*(yield*u(ue.request,{form:r.value??{}})).json();ae=ft(K)}const W=yield*u(ue.data,{form:r.value??{},json:ae});return Array.isArray(W)?W:[]}),ce=Eo(function*(){const ae=yield*GM(Vn(()=>{w.value=!0}).pipe(KM("30 millis")));return yield*$l(pe,Lc(ae))}).pipe($l(Vn(()=>{w.value=!1})));try{const ae=await Yr(li(ce,bs));_.value=ae,S.value=null}catch(ae){console.warn("[shwfed-form] tree dataSource fetch failed",ae),S.value=ae}}Xe(()=>[t.config.dataSource?.request,t.config.dataSource?.data],()=>{C()},{immediate:!0});function $(ue){return{form:r.value??{},node:ue}}function T(ue){try{const pe=bt(u(t.config.nodeKey,$(ue)));return String(pe)}catch(pe){return console.error(`[shwfed-form] failed to evaluate nodeKey for ${t.fieldId}:`,pe),""}}function D(ue){let pe;try{pe=bt(u(t.config.nodeChildren,$(ue)))}catch(ce){console.error(`[shwfed-form] failed to evaluate nodeChildren for ${t.fieldId}:`,ce);return}if(pe!=null&&Array.isArray(pe)&&pe.length!==0)return pe}function A(ue,pe){if(h.value)return!1;const ce=t.config.nodeSelectable;if(!ce)return!0;try{return bt(u(ce,$(ue)))}catch(ae){return console.error(`[shwfed-form] failed to evaluate nodeSelectable for ${t.fieldId}:`,ae),!1}}function I(ue,pe){try{return Ss(ue,u,{form:r.value??{},node:pe})}catch(ce){return console.error(`[shwfed-form] failed to interpolate node text for ${t.fieldId}:`,ce),ue}}function U(ue){const pe=ut(t.config.nodeLabel,n.value)??"";return pe?I(pe,ue):""}function j(ue){if(!t.config.nodeTooltip)return;const pe=ut(t.config.nodeTooltip,n.value);if(pe)return I(pe,ue)}const Q=E(()=>{if(!t.config.expandAll)return[];const ue=[],pe=[..._.value];for(;pe.length;){const ce=pe.pop(),ae=D(ce);ae&&ae.length&&(ue.push(T(ce)),pe.push(...ae))}return ue}),F=re("");function R(ue){const pe=t.config.filter?.keywords;if(!pe)return[];try{const ce=bt(u(pe,$(ue)));return Array.isArray(ce)?ce.map(ae=>String(ae)):[]}catch{return[]}}const G=mo(new Map);Xe(()=>[_.value,n.value,t.config.nodeLabel,t.config.filter?.keywords],()=>{const ue=new Map,pe=[..._.value];for(;pe.length;){const ce=pe.pop(),ae=U(ce).trim().toLowerCase(),W=R(ce).map(K=>K.trim().toLowerCase()).join(`
|
|
161
161
|
`);ue.set(T(ce),W?`${ae}
|
|
162
162
|
${W}`:ae);const B=D(ce);B&&B.length&&pe.push(...B)}G.value=ue},{immediate:!0});function Z(ue,pe){const ce=pe.trim().toLowerCase();if(!ce)return!0;const ae=G.value.get(T(ue));return ae!==void 0?ae.includes(ce):U(ue).trim().toLowerCase().includes(ce)}const Y=E(()=>{const ue=t.config.filter?.label?ut(t.config.filter.label,n.value):void 0;return ue&&ue.length>0?ue:o("tree-multi-search-label")}),he=E(()=>{const ue=new Set(y.value),pe=o("tree-multi-readonly-empty");if(ue.size===0)return pe;const ce=new Map,ae=[..._.value];for(;ae.length;){const B=ae.pop(),K=T(B);ue.has(K)&&ce.set(K,U(B));const X=D(B);X&&X.length&&ae.push(...X)}const W=y.value.map(B=>ce.get(B)??B).filter(B=>B.length>0);return W.length>0?W.join(o("tree-multi-readonly-separator")):pe});return(ue,pe)=>(k(),M(s(V),{orientation:"vertical","data-disabled":h.value||void 0},{default:f(()=>[d.value?(k(),M(s(N),{key:0,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(d.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024)):ke("",!0),b.value?(k(),L("div",vvt,O(he.value),1)):(k(),L(Me,{key:2},[e.config.filter?.enabled?(k(),M(s(V),{key:0,orientation:"floating"},{default:f(()=>[c(s(N),null,{default:f(()=>[P(O(Y.value),1)]),_:1}),c(s(Ge),null,{default:f(()=>[c(s(pt),{align:"inline-start"},{default:f(()=>[c(s(fe),{icon:"lucide:search"})]),_:1}),c(s(mt),{modelValue:F.value,"onUpdate:modelValue":pe[0]||(pe[0]=ce=>F.value=ce),disabled:h.value},null,8,["modelValue","disabled"]),F.value.length>0?(k(),M(s(pt),{key:0,align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":s(o)("tree-multi-search-clear"),onClick:pe[1]||(pe[1]=ce=>F.value="")},{default:f(()=>[c(s(fe),{icon:"lucide:x"})]),_:1},8,["aria-label"])]),_:1})):ke("",!0)]),_:1})]),_:1})):ke("",!0),S.value&&_.value.length===0?(k(),L("div",yvt,O(s(o)("tree-multi-load-error")),1)):w.value&&_.value.length===0?(k(),L("div",bvt,[c(s(ix),{class:"h-6 w-2/3"}),c(s(ix),{class:"h-6 w-1/2"}),c(s(ix),{class:"h-6 w-3/5"}),c(s(ix),{class:"h-6 w-2/5"})])):(k(),M(s(gvt),{key:3,modelValue:y.value,"onUpdate:modelValue":pe[2]||(pe[2]=ce=>y.value=ce),roots:_.value,"get-key":T,"get-children":D,"selection-mode":"multi",cascade:e.config.cascade??"cascade-both",selectable:A,"filter-predicate":Z,"filter-query":F.value,"initial-expanded":Q.value,"show-focused-row":!1,class:He(h.value?"pointer-events-none opacity-60":void 0)},{node:f(({node:ce})=>[H("span",_vt,[c(s(z),{source:U(ce),class:"prose prose-sm prose-zinc text-zinc-700"},null,8,["source"]),j(ce)?(k(),M(s(z),{key:0,source:j(ce),block:"",class:"prose prose-xs prose-zinc text-zinc-400"},null,8,["source"])):ke("",!0)])]),empty:f(()=>[H("div",xvt,O(s(o)("tree-multi-empty")),1)]),_:1},8,["modelValue","roots","cascade","filter-query","initial-expanded","class"]))],64))]),_:1},8,["data-disabled"]))}}),Svt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},kvt=q({name:"ShwfedMonthFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(S,C)=>Ht(S,{...dn(i),...C}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.placeholder?ut(t.config.placeholder,n.value):void 0),p=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function m(S,C){if(!S)return!1;try{return bt(l(S,{form:o.value??{}}))}catch($){return console.error(`[shwfed-form] failed to evaluate ${C} for ${t.fieldId}:`,$),!1}}const h=E(()=>m(t.config.disabled,"disabled")),g=ma(),v=E(()=>t.config.readonly!=null?m(t.config.readonly,"readonly"):g.value),b=E(()=>v.value||t.config.derived?.mode==="formula"),x=E(()=>t.config.valueFormat??kb.month.value),y=E(()=>{const S=t.config.presets;if(!(!S||S.length===0))return S.map(C=>({name:C.label,value:()=>{try{const $=bt(l(C.value,{form:o.value??{}}));return ir($,x.value)}catch($){return console.error(`[shwfed-form] failed to evaluate preset "${C.value}" for ${t.fieldId}:`,$),""}}}))}),_=re(void 0),w=E({get:()=>{const S=t.config.binding;if(S==null)return _.value;const C=r(S);return typeof C=="string"&&C.length>0?C:void 0},set:S=>{const C=t.config.binding;if(C==null){_.value=S;return}a(C,S)}});return(S,C)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":h.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[p.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:p.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),b.value?(k(),L("div",Svt,O(w.value||"—"),1)):(k(),M(s(R$),{key:2,id:e.fieldId,modelValue:w.value,"onUpdate:modelValue":C[0]||(C[0]=$=>w.value=$),type:"month",format:e.config.format,"value-format":e.config.valueFormat,placeholder:d.value,disabled:h.value,shortcuts:y.value},null,8,["id","modelValue","format","value-format","placeholder","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),Cvt={key:1,class:"min-h-9 py-1.5 text-sm text-zinc-700"},$vt=q({name:"ShwfedMonthRangeFieldRuntime",__name:"runtime",props:{fieldId:{},config:{}},setup(e){const t=e,{locale:n}=un(),{state:o,getAt:r,setAt:a}=dr(),i=vn(),l=(D,A)=>Ht(D,{...dn(i),...A}),u=E(()=>ut(t.config.label,n.value)),d=E(()=>t.config.startPlaceholder?ut(t.config.startPlaceholder,n.value):void 0),p=E(()=>t.config.endPlaceholder?ut(t.config.endPlaceholder,n.value):void 0),m=E(()=>t.config.tooltip?ut(t.config.tooltip,n.value):void 0);function h(D,A){if(!D)return!1;try{return bt(l(D,{form:o.value??{}}))}catch(I){return console.error(`[shwfed-form] failed to evaluate ${A} for ${t.fieldId}:`,I),!1}}const g=E(()=>h(t.config.disabled,"disabled")),v=ma(),b=E(()=>t.config.readonly!=null?h(t.config.readonly,"readonly"):v.value),x=E(()=>b.value||t.config.derived?.mode==="formula"),y=E(()=>t.config.valueFormat??Cb.monthrange.value),_=E(()=>{const D=t.config.presets;if(!(!D||D.length===0))return D.map(A=>({name:A.label,value:()=>{try{const I=bt(l(A.start,{form:o.value??{}})),U=bt(l(A.end,{form:o.value??{}}));return[ir(I,y.value),ir(U,y.value)]}catch(I){return console.error(`[shwfed-form] failed to evaluate preset "${A.start}" .. "${A.end}" for ${t.fieldId}:`,I),["",""]}}}))});function w(D){if(!Array.isArray(D)||D.length!==2)return;const[A,I]=D;if(!(typeof A!="string"||typeof I!="string")&&!(A.length===0||I.length===0))return[A,I]}function S(D){return typeof D=="string"&&D.length>0?D:void 0}const C=re(void 0),$=E({get:()=>{const D=t.config.binding;if(D==null)return C.value;if(typeof D=="string")return w(r(D));const A=S(r(D[0])),I=S(r(D[1]));if(!(A==null||I==null))return[A,I]},set:D=>{const A=t.config.binding;if(A==null){C.value=D;return}if(typeof A=="string"){a(A,D);return}a(A[0],D?.[0]),a(A[1],D?.[1])}}),T=E(()=>{const D=$.value;return D?`${D[0]} ~ ${D[1]}`:"—"});return(D,A)=>(k(),M(s(V),{orientation:e.config.orientation??s(ko),"data-disabled":g.value||void 0},{default:f(()=>[u.value?(k(),M(s(N),{key:0,for:e.fieldId,class:"text-xs text-zinc-500"},ee({default:f(()=>[P(" "+O(u.value),1)]),_:2},[m.value?{name:"tooltip",fn:f(()=>[c(s(z),{source:m.value,class:"prose prose-xs prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1032,["for"])):ke("",!0),x.value?(k(),L("div",Cvt,O(T.value),1)):(k(),M(s(F$),{key:2,id:e.fieldId,modelValue:$.value,"onUpdate:modelValue":A[0]||(A[0]=I=>$.value=I),type:"monthrange",format:e.config.format,"value-format":e.config.valueFormat,"start-placeholder":d.value,"end-placeholder":p.value,"range-separator-icon":e.config.rangeSeparatorIcon,disabled:g.value,shortcuts:_.value},null,8,["id","modelValue","format","value-format","start-placeholder","end-placeholder","range-separator-icon","disabled","shortcuts"]))]),_:1},8,["orientation","data-disabled"]))}}),Tvt=Object.assign({"../fields/2026-04-22/com.shwfed.form.field.markdown/schema.ts":Cot,"../fields/2026-04-22/com.shwfed.form.field.text/schema.ts":Tot,"../fields/2026-04-22/com.shwfed.form.field.textarea/schema.ts":Dot,"../fields/2026-04-24/com.shwfed.form.field.actions/schema.ts":Aot,"../fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.ts":Mot,"../fields/2026-04-27/com.shwfed.form.field.date/schema.ts":Fot,"../fields/2026-04-27/com.shwfed.form.field.daterange/schema.ts":Bot,"../fields/2026-04-27/com.shwfed.form.field.datetime/schema.ts":qot,"../fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.ts":Kot,"../fields/2026-04-27/com.shwfed.form.field.time/schema.ts":Jot,"../fields/2026-04-27/com.shwfed.form.field.timerange/schema.ts":trt,"../fields/2026-04-28/com.shwfed.form.field.number/schema.ts":ort,"../fields/2026-04-28/com.shwfed.form.field.numberrange/schema.ts":lrt,"../fields/2026-04-28/com.shwfed.form.field.switch/schema.ts":crt,"../fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.ts":grt,"../fields/2026-05-12/com.shwfed.form.field.upload/schema.ts":brt,"../fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.ts":Srt,"../fields/2026-05-13/com.shwfed.form.field.list/schema.ts":$rt,"../fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.ts":Ert,"../fields/2026-05-17/com.shwfed.form.field.radio.group/schema.ts":Ort,"../fields/2026-05-18/com.shwfed.form.field.table/schema.ts":$ct,"../fields/2026-05-20/com.shwfed.form.field.collapsible/schema.ts":Dct,"../fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.ts":Ict,"../fields/2026-05-24/com.shwfed.form.field.month/schema.ts":Mct,"../fields/2026-05-24/com.shwfed.form.field.monthrange/schema.ts":Nct}),Evt=Object.assign({"../fields/2026-04-22/com.shwfed.form.field.markdown/config.vue":Bct,"../fields/2026-04-22/com.shwfed.form.field.text/config.vue":Gct,"../fields/2026-04-22/com.shwfed.form.field.textarea/config.vue":Qct,"../fields/2026-04-24/com.shwfed.form.field.actions/config.vue":edt,"../fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue":ldt,"../fields/2026-04-27/com.shwfed.form.field.date/config.vue":gdt,"../fields/2026-04-27/com.shwfed.form.field.daterange/config.vue":$dt,"../fields/2026-04-27/com.shwfed.form.field.datetime/config.vue":Mdt,"../fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue":Hdt,"../fields/2026-04-27/com.shwfed.form.field.time/config.vue":Zdt,"../fields/2026-04-27/com.shwfed.form.field.timerange/config.vue":ift,"../fields/2026-04-28/com.shwfed.form.field.number/config.vue":pft,"../fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue":Sft,"../fields/2026-04-28/com.shwfed.form.field.switch/config.vue":Dft,"../fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue":zft,"../fields/2026-05-12/com.shwfed.form.field.upload/config.vue":Kft,"../fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue":opt,"../fields/2026-05-13/com.shwfed.form.field.list/config.vue":Ppt,"../fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue":Lpt,"../fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue":Gpt,"../fields/2026-05-18/com.shwfed.form.field.table/config.vue":Ypt,"../fields/2026-05-20/com.shwfed.form.field.collapsible/config.vue":Xpt,"../fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue":umt,"../fields/2026-05-24/com.shwfed.form.field.month/config.vue":vmt,"../fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue":Tmt}),Dvt=Object.assign({"../fields/2026-04-22/com.shwfed.form.field.markdown/runtime.vue":Emt,"../fields/2026-04-22/com.shwfed.form.field.text/runtime.vue":Imt,"../fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue":Mmt,"../fields/2026-04-24/com.shwfed.form.field.actions/runtime.vue":Rmt,"../fields/2026-04-24/com.shwfed.form.field.combobox.single/runtime.vue":zmt,"../fields/2026-04-27/com.shwfed.form.field.date/runtime.vue":pht,"../fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue":Hht,"../fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue":Ght,"../fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue":Yht,"../fields/2026-04-27/com.shwfed.form.field.time/runtime.vue":Xht,"../fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue":Qht,"../fields/2026-04-28/com.shwfed.form.field.number/runtime.vue":tgt,"../fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue":ogt,"../fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue":agt,"../fields/2026-04-29/com.shwfed.form.field.combobox.single/runtime.vue":lgt,"../fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue":bgt,"../fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue":kgt,"../fields/2026-05-13/com.shwfed.form.field.list/runtime.vue":Mgt,"../fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue":Lgt,"../fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue":Ggt,"../fields/2026-05-18/com.shwfed.form.field.table/runtime.vue":Kgt,"../fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue":Qgt,"../fields/2026-05-23/com.shwfed.form.field.tree.multi/runtime.vue":wvt,"../fields/2026-05-24/com.shwfed.form.field.month/runtime.vue":kvt,"../fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue":$vt}),sx=(e,t)=>`${e}@${t}`,Ovt=X1({hostName:"shwfed-form",dirSegment:"fields",schemaModules:Tvt,configModules:Evt,runtimeModules:Dvt,deriveEntryExtras:e=>{const t=new Map;for(const o of e){const r=t.get(o.type);(!r||o.compatibilityDate>r)&&t.set(o.type,o.compatibilityDate)}const n=new Map;for(const o of e){const r=o.module.migrateFrom;if(!(!r||r.length===0))for(const a of r){const i=sx(a.type,a.compatibilityDate),l=n.get(i);if(l)throw new Error(`[shwfed-form] migrateFrom collision: source "${i}" is claimed by both "${sx(l.type,l.compatibilityDate)}" and "${sx(o.type,o.compatibilityDate)}"`);n.set(i,{type:o.type,compatibilityDate:o.compatibilityDate})}}return o=>{const r=n.get(sx(o.type,o.compatibilityDate));if(r)return{deprecated:!0,supersededBy:r};const a=t.get(o.type);return o.compatibilityDate<a?{deprecated:!0,supersededBy:{type:o.type,compatibilityDate:a}}:{deprecated:!1}}}});let lx=null;function Mh(){return lx||(lx=Ovt.ENTRIES.map(e=>({type:e.type,compatibilityDate:e.compatibilityDate,metadata:e.module.metadata,schema:e.module.schema,config:e.config,runtime:e.runtime,deprecated:e.deprecated,...e.supersededBy!==void 0?{supersededBy:e.supersededBy}:{},migrate:e.module.migrate,...e.module.migrateFrom!==void 0?{migrateFrom:e.module.migrateFrom}:{},defaults:e.module.defaults})),lx)}const Avt=new Proxy([],{get(e,t){const n=Mh(),o=n[t];return typeof o=="function"?o.bind(n):o},has(e,t){return t in Mh()},ownKeys(){return Reflect.ownKeys(Mh())},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(Mh(),t)}});function Ivt(e){return Mh().map(t=>t.schema(e).annotations({identifier:`${t.type}@${t.compatibilityDate}`}))}function Ap(e,t){return Mh().find(n=>n.type===e&&n.compatibilityDate===t)}function rw(e){switch(e._tag){case"TypeLiteral":return e;case"Transformation":return rw(e.to);case"Refinement":return rw(e.from);case"Suspend":return rw(e.f());default:return null}}function Pvt(e,t){const n=rw(e.ast);return n?n.propertySignatures.find(o=>o.name===t)??null:null}function Mvt(e){const t=e.type;if(t._tag==="Union"&&e.isOptional){const n=t.types.find(o=>o._tag!=="UndefinedKeyword");if(n)return n}return t}function nae(e,t,n){const o=Pvt(e,t);if(!o)return;const r=n(o);if(gn(r))return r.value;const a=Mvt(o),i=n(a);if(gn(i))return i.value;if(a!==o.type){const l=n(o.type);if(gn(l))return l.value}}function Ln(e,t){return nae(e,t,lv)}function Bn(e,t){return nae(e,t,uv)}const oae="shwfed.component.form";function rae(e){const t=Ivt(e),o=(t.length===0?f8:t.length===1?t[0]:Jr(...t)).annotations({description:"表单字段,由 `type` 字段区分类型"});return{fields:go(o).annotations({title:"字段",description:"表单字段列表;未绑定到任何布局的字段不会被渲染"}),layouts:go(dte(e)).pipe(LC(1)).annotations({title:"布局",description:"按顺序排列的布局集合;挂载时按序求值各项 `media` CEL 表达式,使用第一个为 `true` 的布局(全部不匹配时回退到最后一项)"})}}function aae(e){const t=e.fields.map(n=>({id:n.id}));return fte(t,e.layouts,"字段")}function iae(e){return rt(rae(e)).pipe(pr(aae)).annotations({title:"FormUnit",description:"一组表单字段及其布局"})}function sae(e){const t=new Set(e.getDefinitions().variables.map(n=>n.name));t.has("now")||e.registerVariable("now","Date",{description:"当前日期/时间"}),t.has("form")||e.registerVariable("form","dyn",{description:"当前表单状态"})}function v4(e){const t=l=>{sae(l),e(l)},n=Dt({configure:t,resultType:"HttpRequest"}),o=Dt({configure:l=>{t(l),l.registerVariable("json","optional<dyn>",{description:"HTTP 响应体(已解析 JSON);未配置 request 时为 none,用 `json.?字段` 访问"})},resultType:"dyn"}),r=Dt({configure:t,resultType:"bool"}),a=rt({request:ne(n.annotations({title:"请求",description:ua`
|
|
163
163
|
可选的 HTTP 请求表达式:返回 \`HttpRequest\`,运行时由宿主发起,并把响应体作为 \`json\` 传给「数据」表达式。
|
|
@@ -640,4 +640,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
640
640
|
stroke-dasharray: var(--vis-line-stroke-dasharray);
|
|
641
641
|
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
|
|
642
642
|
`,vTt=Object.freeze(Object.defineProperty({__proto__:null,area:Sw,areaLinePath:fI,globalStyles:gTt,root:dle},Symbol.toStringTag,{value:"Module"}));class nT extends rh{constructor(t){super(),this._defaultConfig=hTt,this.config=this._defaultConfig,this.stacked=!0,this.events={[nT.selectors.area]:{}},t&&this.setConfig(t),this.stacked=Array.isArray(this.config.y)}get bleed(){const{config:{line:t,lineWidth:n}}=this;if(!t)return{top:0,bottom:0,left:0,right:0};const o=this.yScale.domain(),a=(this.yScale.range()[0]>this.yScale.range()[1]?Ji.North:Ji.South)===Ji.South,i=n>3,l=n>=10;return{top:!l&&(!a&&o[1]===0||a&&o[0]===0)?0:n/2,bottom:!l&&(!a&&o[0]===0||a&&o[1]===0)?0:n/2,left:i?n/2:0,right:i?n/2:0}}_render(t){super._render(t);const{config:n,datamodel:{data:o}}=this,r=Li(t)?t:n.duration,a=jS[n.curveType];this._areaGen=_Ct().x(x=>x.x).y0(x=>x.y0).y1(x=>x.y1).curve(a);const i=Hl(n.y)?n.y:[n.y],l=o.map((x,y)=>this.xScale(qn(x,n.x,y))),u=oie(o,n.baseline,i,this._prevNegative);this._prevNegative=u.map(x=>!!x.isMostlyNegative);const d=[],p=u.map(x=>x.map((y,_)=>{var w,S;const C=l[_],$=this.yScale(y[0]),T=this.yScale(y[1]),D=T>$,A=n.stackMinHeight&&d[_]||0,I=D?$+A:$-A,U=D?T+A:T-A;let j=0;return(n.minHeight||n.minHeight1Px)&&Math.abs(U-I)<((w=n.minHeight)!==null&&w!==void 0?w:1)&&(j=((S=n.minHeight)!==null&&S!==void 0?S:1)-Math.abs(U-I),n.stackMinHeight&&(d[_]=A+j)),{x:C,y0:I,y1:D?U+j:U-j}})),m=p.length-1,h=[...p].reverse(),g=this.g.selectAll(`.${Sw}`).data(h),v=g.enter().append("path").attr("class",Sw).attr("d",x=>this._areaGen(x)||this._emptyPath()).style("opacity",0).style("fill",(x,y)=>wa(o,n.color,m-y)),b=Fo(v.merge(g),r).style("opacity",(x,y)=>x.some(w=>w.y0-w.y1!==0)?qn(o,n.opacity,m-y):0).style("fill",(x,y)=>wa(o,n.color,m-y)).style("cursor",(x,y)=>fs(o,n.cursor,m-y));r?b.attrTween("d",(y,_,w)=>{const S=Pr(w[_]).attr("d"),C=this._areaGen(y)||this._emptyPath();return XA(S,C)}):b.attr("d",x=>this._areaGen(x)||this._emptyPath()),Fo(g.exit(),r).style("opacity",0).remove(),n.line&&this._renderLines(r,p)}_renderLines(t,n){var o;const{config:r,datamodel:{data:a}}=this,i=n.length-1,l=[...n].reverse(),u=(o=r.lineColor)!==null&&o!==void 0?o:r.color,d=this.g.selectAll(`.${fI}`).data(l),p=this.g.selectAll(`.${Sw}`).nodes(),m=d.enter().insert("path",(v,b)=>p[b+1]).attr("class",fI).attr("stroke",(v,b)=>wa(a,u,i-b)).attr("stroke-width",r.lineWidth).attr("stroke-opacity",0),h=Fo(m.merge(d),t).attr("stroke",(v,b)=>wa(a,u,i-b)).attr("stroke-width",r.lineWidth).attr("stroke-opacity",1).attr("cursor",(v,b)=>fs(a,r.cursor,i-b)).style("stroke-dasharray",(v,b)=>{var x,y;return(y=(x=Om(a,r.lineDashArray,b))===null||x===void 0?void 0:x.join(" "))!==null&&y!==void 0?y:null}),g=jS[r.curveType];this._lineGen=rF().x(v=>v.x).y(v=>v.y1).curve(g),t?h.attrTween("d",(b,x,y)=>{const _=Pr(y[x]).attr("d")||this._emptyLinePath(),w=this._lineGen(b)||this._emptyLinePath();return XA(_,w)}):h.attr("d",v=>this._lineGen(v)||this._emptyLinePath()),Fo(d.exit(),t).style("opacity",0).remove()}getYDataExtent(t){const{config:n,datamodel:o}=this,r=Hl(n.y)?n.y:[n.y],a=this.xScale.domain(),i=t?iie(o.data,a,n.x,!0):o.data;return nie(i,n.baseline,...r)}_emptyPath(){const t=this.xScale.range(),n=this.yScale.domain(),o=this.yScale((n[0]+n[1])/2),r=o;return this._areaGen([{y0:o,y1:r,x:t[0]},{y0:o,y1:r,x:t[1]}])}_emptyLinePath(){const t=this.xScale.range(),n=this.yScale.range();return`M${t[0]},${n[0]} L${t[1]},${n[0]}`}}nT.selectors=vTt;function Td(e,t){return Em(e,t)}function ic(e){const t=ur(),n=t.attrs;return E(()=>{const o={},r=t?.vnode.props??{};return Object.keys(r).forEach(a=>{o[Kr(a)]=e[Kr(a)]}),{...o,...n}})}const r0=Symbol("componentAccessorKey"),fle=Symbol("tooltipAccessorKey"),ple=Symbol("crosshairAccessorKey"),mle=Symbol("axisAccessorKey"),yTt=Symbol("annotationsAccessorKey"),bTt={"data-vis-component":""},_Tt=q({__name:"index",props:{color:{type:[Function,String,Array,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},line:{type:Boolean},lineColor:{type:[Function,String,Array,null]},lineWidth:{},lineDashArray:{type:[Function,Array,null]},minHeight1Px:{type:Boolean},minHeight:{},stackMinHeight:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(e,{expose:t}){const n=Fn(r0),o=e,r=E(()=>n.data.value??o.data),a=ic(o),i=re();return Pt(()=>{It(()=>{var l;i.value=new nT(a.value),(l=i.value)==null||l.setData(r.value),n.update(i.value)})}),Do(()=>{var l;(l=i.value)==null||l.destroy(),n.destroy()}),Xe(a,(l,u)=>{var d;Td(l,u)||(d=i.value)==null||d.setConfig(a.value)}),Xe(r,()=>{var l;(l=i.value)==null||l.setData(r.value)}),t({component:i}),(l,u)=>(k(),L("div",bTt))}}),xTt={"data-vis-axis":""},MU=q({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(e,{expose:t}){const n=Fn(mle),o=e,r=E(()=>n.data.value??o.data),a=ic(o),i=re();return Pt(()=>{It(()=>{var l;i.value=new Zse(a.value),(l=i.value)==null||l.setData(r.value),n.update(i.value)})}),Do(()=>{var l;(l=i.value)==null||l.destroy(),n.destroy(o.type)}),Xe(a,(l,u)=>{var d;Td(l,u)||(d=i.value)==null||d.setConfig(a.value)}),Xe(r,()=>{var l;(l=i.value)==null||l.setData(r.value)}),t({component:i}),(l,u)=>(k(),L("div",xTt))}}),wTt=q({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletSpacing:{},bulletShape:{type:[Function,null]},orientation:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(e,{expose:t}){const o=ic(e),r=re(),a=re();return Pt(()=>{It(()=>{a.value&&(r.value=new sle(a.value,{...o.value,renderIntoProvidedDomNode:!0}))})}),Do(()=>{var i;(i=r.value)==null||i.destroy()}),Xe(o,(i,l)=>{var u;Td(i,l)||(u=r.value)==null||u.setConfig(o.value)}),t({component:r}),(i,l)=>(k(),L("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:a},null,512))}}),STt={"data-vis-crosshair":""},kTt=q({__name:"index",setup(e,{expose:t}){const n=Fn(ple),o=e,r=E(()=>n.data.value??o.data),a=ic(o),i=re();return Pt(()=>{It(()=>{var l;i.value=new cle(a.value),(l=i.value)==null||l.setData(r.value),n.update(i.value)})}),Do(()=>{var l;(l=i.value)==null||l.destroy(),n.destroy()}),Xe(a,(l,u)=>{var d;Td(l,u)||(d=i.value)==null||d.setConfig(a.value)}),Xe(r,()=>{var l;(l=i.value)==null||l.setData(r.value)}),t({component:i}),(l,u)=>(k(),L("div",STt))}}),CTt={"data-vis-component":""},$Tt=q({__name:"index",props:{color:{type:[Function,String,Array,null]},groupWidth:{},groupMaxWidth:{},dataStep:{},groupPadding:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},barMinHeight:{},cursor:{type:[Function,String,null]},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(e,{expose:t}){const n=Fn(r0),o=e,r=E(()=>n.data.value??o.data),a=ic(o),i=re();return Pt(()=>{It(()=>{var l;i.value=new jse(a.value),(l=i.value)==null||l.setData(r.value),n.update(i.value)})}),Do(()=>{var l;(l=i.value)==null||l.destroy(),n.destroy()}),Xe(a,(l,u)=>{var d;Td(l,u)||(d=i.value)==null||d.setConfig(a.value)}),Xe(r,()=>{var l;(l=i.value)==null||l.setData(r.value)}),t({component:i}),(l,u)=>(k(),L("div",CTt))}}),TTt={"data-vis-component":""},ETt=q({__name:"index",props:{color:{type:[Function,String,Array,null]},curveType:{},lineWidth:{},lineDashArray:{type:[Function,Array,null]},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{type:[Function,String,null]},interpolateMissingData:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(e,{expose:t}){const n=Fn(r0),o=e,r=E(()=>n.data.value??o.data),a=ic(o),i=re();return Pt(()=>{It(()=>{var l;i.value=new Q$(a.value),(l=i.value)==null||l.setData(r.value),n.update(i.value)})}),Do(()=>{var l;(l=i.value)==null||l.destroy(),n.destroy()}),Xe(a,(l,u)=>{var d;Td(l,u)||(d=i.value)==null||d.setConfig(a.value)}),Xe(r,()=>{var l;(l=i.value)==null||l.setData(r.value)}),t({component:i}),(l,u)=>(k(),L("div",TTt))}}),DTt={"data-vis-component":""},OTt=q({__name:"index",props:{color:{type:[Function,String,Array,null]},size:{type:[Function,Number,null]},sizeScale:{type:[Object,Function]},sizeRange:{},shape:{type:[Function,String]},label:{type:[Function,String,null]},labelColor:{type:[Function,String,Array,null]},labelHideOverlapping:{type:Boolean},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},labelPosition:{type:[Function,String,null]},strokeColor:{type:[Function,String,Array,null]},strokeWidth:{type:[Function,Number,null]},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(e,{expose:t}){const n=Fn(r0),o=e,r=E(()=>n.data.value??o.data),a=ic(o),i=re();return Pt(()=>{It(()=>{var l;i.value=new tT(a.value),(l=i.value)==null||l.setData(r.value),n.update(i.value)})}),Do(()=>{var l;(l=i.value)==null||l.destroy(),n.destroy()}),Xe(a,(l,u)=>{var d;Td(l,u)||(d=i.value)==null||d.setConfig(a.value)}),Xe(r,()=>{var l;(l=i.value)==null||l.setData(r.value)}),t({component:i}),(l,u)=>(k(),L("div",DTt))}}),ATt={"data-vis-component":""},ITt=q({__name:"index",props:{color:{type:[Function,String,Array,null]},barWidth:{},barMaxWidth:{},dataStep:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},cursor:{type:[Function,String,null]},barMinHeight1Px:{type:Boolean},barMinHeightZeroValue:{},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(e,{expose:t}){const n=Fn(r0),o=e,r=E(()=>n.data.value??o.data),a=ic(o),i=re();return Pt(()=>{It(()=>{var l;i.value=new Bse(a.value),(l=i.value)==null||l.setData(r.value),n.update(i.value)})}),Do(()=>{var l;(l=i.value)==null||l.destroy(),n.destroy()}),Xe(a,(l,u)=>{var d;Td(l,u)||(d=i.value)==null||d.setConfig(a.value)}),Xe(r,()=>{var l;(l=i.value)==null||l.setData(r.value)}),t({component:i}),(l,u)=>(k(),L("div",ATt))}}),PTt={"data-vis-tooltip":""},MTt=q({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},hideDelay:{},showDelay:{},data:{}},setup(e,{expose:t}){const n=Fn(fle),o=ic(e),r=re();return Pt(()=>{It(()=>{r.value=new gse(o.value),n.update(r.value)})}),Do(()=>{var a;(a=r.value)==null||a.destroy(),n.destroy()}),Xe(o,(a,i)=>{var l;Td(a,i)||(l=r.value)==null||l.setConfig(o.value)}),t({component:r}),(a,i)=>(k(),L("div",PTt))}}),RTt=q({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},clipPathExtend:{},onRenderComplete:{type:Function},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(e,{expose:t}){const n=e,{data:o}=Hn(n),r=ic(n),a=re(),i=ti({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),l=re();return Xe(o,()=>{a.value&&a.value.setData(o.value,!0)}),hn(()=>{var u;i.components.map(d=>d.config),(u=a.value)==null||u.updateContainer({...Un(r.value),...Un(i)})}),Pt(()=>{l.value&&(a.value=new cCt(l.value,{...Un(i)},o.value))}),Do(()=>{var u;return(u=a.value)==null?void 0:u.destroy()}),fr(r0,{data:o,update:u=>i.components=[...i.components,u],destroy:()=>{var u;return i.components=(u=i.components)==null?void 0:u.filter(d=>!d.isDestroyed())}}),fr(mle,{data:o,update:u=>i[`${u.config.type}Axis`]=u,destroy:u=>{i[`${u}Axis`]=void 0}}),fr(ple,{data:o,update:u=>i.crosshair=u,destroy:()=>{i.crosshair=void 0}}),fr(fle,{data:o,update:u=>i.tooltip=u,destroy:()=>{i.tooltip=void 0}}),fr(yTt,{data:o,update:u=>i.annotations=u,destroy:()=>{i.annotations=void 0}}),t({component:a}),(u,d)=>(k(),L("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:l,class:"unovis-xy-container"},[se(u.$slots,"default")],512))}});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("[data-vis-bullet-legend],[data-vis-flow-legend]{display:block}[data-vis-leaflet-flow-map],[data-vis-leaflet-map]{display:block;position:relative}[data-vis-rolling-pin-legend]{display:block}.unovis-single-container,.unovis-xy-container{display:block;position:relative;width:100%}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const FTt={class:"flex h-full min-h-[200px] w-full flex-col gap-2"},zTt={key:0,class:"flex flex-1 items-center justify-center text-sm text-zinc-400"},VTt=q({name:"ShwfedBlockChartXyRuntime",__name:"runtime",props:{block:{required:!0},blockModifiers:{}},emits:["update:block"],setup(e){const t=Ot(e,"block"),{locale:n}=un(),o=vn(),r=re(!1),a=re({}),i=re(null),l={linear:bo.Linear,monotoneX:bo.MonotoneX,natural:bo.Natural,basis:bo.Basis,cardinal:bo.Cardinal,catmullRom:bo.CatmullRom,step:bo.Step,stepAfter:bo.StepAfter,stepBefore:bo.StepBefore},u=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7","#9c755f","#bab0ac"],d=E(()=>t.value.y.map((ae,W)=>ae.color&&ae.color.length>0?ae.color:u[W%u.length])),p=E(()=>ut(t.value.caption,n.value)||"");function m(ae){return ut(ae.label,n.value)||null}function h(){return dn(o)}async function g(){const ae=h(),W={},B=[];for(const K of t.value.dataSources){const X=Eo(function*(){let Ee=ot();if(K.request){const _e=yield*Ht(K.request,ae);Ee=ft(yield*_e.json())}return yield*Ht(K.data,{...ae,json:Ee})});try{W[K.name]=await Yr(li(X,bs))}catch(Ee){console.warn("[shwfed-chart-xy] data source failed",K.name,Ee),B.push(K.name),W[K.name]=[]}}a.value=W,i.value=B.length>0?`数据源加载失败:${B.join("、")}`:null}Pt(()=>{r.value=!0,g()}),Xe(()=>t.value.dataSources.map(ae=>`${ae.name}|${ae.request??""}|${ae.data}`).join(`
|
|
643
|
-
`),()=>{g()});function v(ae){return typeof ae=="number"&&Number.isFinite(ae)}function b(ae){if(v(ae))return ae;if(typeof ae=="string"&&ae.trim()!==""){const W=Number(ae);return Number.isFinite(W)?W:void 0}}function x(ae,W){try{const B=bt(Ht(ae,W));return Array.isArray(B)?B:[]}catch{return[]}}function y(ae,W){try{return b(bt(Ht(ae,W)))}catch{return}}const _=E(()=>({...h(),...a.value})),w=E(()=>{const ae=_.value,W=x(t.value.x,ae),B=t.value.y.map(ze=>x(ze.value,ae)),K=t.value.y.map(ze=>ze.size?x(ze.size,ae):null),X=W.length===0?"ordinal":W.every(ze=>ze instanceof Date)?"time":W.every(ze=>v(ze))?"number":"ordinal",Ee=new Map;return{records:W.map((ze,st)=>{const oe={__x:st};return X==="time"?oe.__x=ze.getTime():X==="number"?oe.__x=ze:Ee.set(st,ze==null?"":String(ze)),B.forEach((be,De)=>{oe[`y${De}`]=b(be[st])}),K.forEach((be,De)=>{be&&(oe[`sz${De}`]=b(be[st]))}),oe}),xMode:X,xLabels:Ee}}),S=E(()=>t.value.y.map(ae=>{if(!ae.dash)return;const W=x(ae.dash,_.value).filter(v);return W.length>0?W:void 0})),C=E(()=>t.value.y.map(ae=>ae.width?y(ae.width,_.value):void 0)),$=ae=>ae.__x,T=E(()=>t.value.y.map((ae,W)=>B=>B[`y${W}`])),D=E(()=>t.value.y.map((ae,W)=>ae.size?B=>B[`sz${W}`]:void 0)),A=E(()=>t.value.y.map((ae,W)=>({k:W,s:ae,color:d.value[W]}))),I=E(()=>A.value.filter(ae=>ae.s.chart==="line")),U=E(()=>A.value.filter(ae=>ae.s.chart==="area")),j=E(()=>A.value.filter(ae=>ae.s.chart==="scatter"));function Q(ae){const W=A.value.filter(B=>B.s.chart===ae);return{entries:W,accessors:W.map(B=>T.value[B.k]),colors:W.map(B=>B.color),width:W[0]?C.value[W[0].k]:void 0}}const F=E(()=>Q("groupedBar")),R=E(()=>Q("stackedBar")),G=E(()=>{const ae=[];return t.value.y.forEach((W,B)=>{const K=m(W);K&&ae.push({name:K,color:d.value[B]})}),ae}),Z=E(()=>{const ae=w.value.xMode;if(ae==="ordinal"){const W=w.value.xLabels;return B=>W.get(B)??""}if(ae==="time")return W=>new Date(W).toLocaleDateString()}),Y=E(()=>{if(w.value.xMode!=="ordinal")return;const ae=[...w.value.xLabels.keys()];if(ae.length<=12)return ae;const W=Math.ceil(ae.length/10);return ae.filter((B,K)=>K%W===0)});function he(ae){return Number.isInteger(ae)?String(ae):ae.toFixed(2)}function ue(ae){return ae.replace(/[&<>"]/g,W=>({"&":"&","<":"<",">":">",'"':"""})[W]??W)}function pe(ae){const W=w.value.xMode,B=W==="ordinal"?w.value.xLabels.get(ae.__x)??"":W==="time"?new Date(ae.__x).toLocaleDateString():String(ae.__x),K=[];t.value.y.forEach((Ee,_e)=>{const ze=m(Ee);if(!ze)return;const st=ae[`y${_e}`];K.push(`<div style="display:flex;align-items:center;gap:6px;padding:1px 0"><span style="width:8px;height:8px;border-radius:9999px;background:${d.value[_e]}"></span><span style="color:#3f3f46">${ue(ze)}</span><span style="margin-left:auto;font-variant-numeric:tabular-nums;color:#18181b">${st===void 0?"—":he(st)}</span></div>`)});const X=K.join("");return`<div style="font-size:12px;min-width:160px"><div style="font-weight:600;color:#18181b;margin-bottom:4px">${ue(B)}</div>${X}</div>`}const ce=E(()=>i.value?i.value:w.value.records.length===0?"暂无数据":null);return(ae,W)=>(k(),L("div",FTt,[ce.value?(k(),L("div",zTt,O(ce.value),1)):r.value?(k(),L(Me,{key:1},[c(s(RTt),{data:w.value.records,margin:{top:8,right:16,bottom:4,left:8},class:"min-h-0 flex-1"},{default:f(()=>[R.value.entries.length>0?(k(),M(s(ITt),{key:0,x:$,y:R.value.accessors,color:R.value.colors,"bar-width":R.value.width},null,8,["y","color","bar-width"])):ke("",!0),F.value.entries.length>0?(k(),M(s($Tt),{key:1,x:$,y:F.value.accessors,color:F.value.colors,"group-width":F.value.width},null,8,["y","color","group-width"])):ke("",!0),(k(!0),L(Me,null,Ke(U.value,B=>(k(),M(s(_Tt),{key:B.s.id,x:$,y:T.value[B.k],color:B.color,line:!0,"line-color":B.s.lineColor||B.color,"line-width":B.s.lineWidth},null,8,["y","color","line-color","line-width"]))),128)),(k(!0),L(Me,null,Ke(I.value,B=>(k(),M(s(ETt),{key:B.s.id,x:$,y:T.value[B.k],color:B.color,"curve-type":l[B.s.curveType],"line-width":B.s.lineWidth,"line-dash-array":S.value[B.k]},null,8,["y","color","curve-type","line-width","line-dash-array"]))),128)),(k(!0),L(Me,null,Ke(j.value,B=>(k(),M(s(OTt),{key:B.s.id,x:$,y:T.value[B.k],color:B.color,size:D.value[B.k]},null,8,["y","color","size"]))),128)),c(s(MU),{type:"x","tick-format":Z.value,"tick-values":Y.value,"tick-text-hide-overlapping":!0,"grid-line":!1},null,8,["tick-format","tick-values"]),c(s(MU),{type:"y"}),c(s(kTt),{x:$,y:T.value,color:d.value,template:pe},null,8,["y","color"]),c(s(MTt))]),_:1},8,["data"]),G.value.length>0?(k(),M(s(wTt),{key:0,items:G.value,class:"mx-auto w-fit shrink-0 text-xs"},null,8,["items"])):ke("",!0),p.value?(k(),M(s(z),{key:1,source:p.value,block:"",class:"prose prose-sm prose-zinc max-w-none shrink-0 text-center"},null,8,["source"])):ke("",!0)],64)):ke("",!0)]))}}),NTt=Object.assign({"../blocks/2026-05-06/com.shwfed.block.actions/schema.ts":wot,"../blocks/2026-05-06/com.shwfed.block.form/schema.ts":Vvt,"../blocks/2026-05-06/com.shwfed.block.markdown/schema.ts":Bvt,"../blocks/2026-05-06/com.shwfed.block.table/schema.ts":Hvt,"../blocks/2026-05-06/com.shwfed.block.tabs/schema.ts":Jvt,"../blocks/2026-05-17/com.shwfed.block.chart.xy/schema.ts":n0t}),LTt=Object.assign({"../blocks/2026-05-06/com.shwfed.block.actions/config.vue":o0t,"../blocks/2026-05-06/com.shwfed.block.form/config.vue":i0t,"../blocks/2026-05-06/com.shwfed.block.markdown/config.vue":l0t,"../blocks/2026-05-06/com.shwfed.block.table/config.vue":X0t,"../blocks/2026-05-06/com.shwfed.block.tabs/config.vue":gyt,"../blocks/2026-05-17/com.shwfed.block.chart.xy/config.vue":Iyt}),BTt=Object.assign({"../blocks/2026-05-06/com.shwfed.block.actions/runtime.vue":Pyt,"../blocks/2026-05-06/com.shwfed.block.form/runtime.vue":Fyt,"../blocks/2026-05-06/com.shwfed.block.markdown/runtime.vue":zyt,"../blocks/2026-05-06/com.shwfed.block.table/runtime.vue":u1t,"../blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue":v1t,"../blocks/2026-05-17/com.shwfed.block.chart.xy/runtime.vue":VTt}),UTt=X1({hostName:"shwfed-config",dirSegment:"blocks",schemaModules:NTt,configModules:LTt,runtimeModules:BTt}),pF=UTt.ENTRIES.map(e=>({type:e.type,compatibilityDate:e.compatibilityDate,metadata:e.module.metadata,schema:e.module.schema,defaultBody:e.module.defaultBody,config:e.config,runtime:e.runtime})),RU=new WeakMap;function qTt(e){const t=RU.get(e);if(t)return t;const n={blockRef:null,members:null,union:null};return n.blockRef=NC(()=>{if(!n.union)throw new Error("[shwfed-config] BlockRef resolved before union built — circular factory init");return n.union}).annotations({identifier:"PageBlock"}),RU.set(e,n),Pnt(e,n.blockRef),n.members=pF.map(o=>o.schema(e,n.blockRef).annotations({identifier:`${o.type}@${o.compatibilityDate}`})),n.union=n.members.length===1?n.members[0]:Jr(...n.members),n}function jTt(e){return qTt(e).blockRef}function vf(e,t){return pF.find(n=>n.type===e&&n.compatibilityDate===t)}Rnt(vf);const hle="shwfed.component.page";function HTt(e){const t=jTt(e).annotations({identifier:"PageBlock",description:"页面块,由 `type` 字段区分类型"}),n=NR(t,e);return rt({kind:Ci(hle),slot:n}).annotations({title:"PageConfig",description:"页面组件完整配置"})}function WTt(){return{slot:xb()}}function GTt(e){return{kind:hle,...WTt(),...e}}const KTt=q({name:"ShwfedConfig",__name:"index",props:Ca({configure:{type:Function},editable:{type:Boolean}},{config:{},configModifiers:{}}),emits:["update:config"],setup(e){const t=Ot(e,"config"),n=E({get:()=>t.value??GTt(),set:m=>{t.value=m}}),o=e,r=vn(),a=o.configure??(()=>{}),i=m=>{a(m);const h=new Set(m.getDefinitions().variables.map(g=>g.name));for(const[g,v]of Object.entries(r))h.has(g)||m.registerVariable(g,v.type,{description:v.description,label:v.label})},l=re(!1),u=eyt(n,{configure:i,onClose:()=>{l.value=!1}});Xe(l,(m,h)=>{m&&!h&&u.reset()});function d(m){o.editable&&(!m.metaKey&&!m.ctrlKey||(m.preventDefault(),m.stopPropagation(),l.value=!0))}function p(m){n.value={...n.value,slot:m}}return(m,h)=>{const g=Rf("ClientOnly");return k(),M(g,null,{default:f(()=>[H("div",{class:"contents",onClickCapture:d},[c(hte,{"slot-value":n.value.slot,configure:i,"find-entry":s(vf),"onUpdate:slotValue":p},ee({_:2},[e.editable?{name:"empty",fn:f(()=>[h[2]||(h[2]=P(" meta+click 进入编辑 ",-1))]),key:"0"}:void 0]),1032,["slot-value","find-entry"])],32),e.editable?(k(),M(aee,{key:0,open:l.value,"onUpdate:open":h[1]||(h[1]=v=>l.value=v),"content-width":"90vw",dismissible:!0},{title:f(()=>[c(unt,{state:s(u)},null,8,["state"])]),description:f(()=>[...h[3]||(h[3]=[H("span",{class:"sr-only"},"编辑页面布局与块配置",-1)])]),footer:f(()=>[c(pnt,{state:s(u),onClose:h[0]||(h[0]=v=>l.value=!1)},null,8,["state"])]),default:f(()=>[c(nnt,{state:s(u)},null,8,["state"])]),_:1},8,["open"])):ke("",!0)]),_:1})}}}),gle="shwfed:preview:cel-vars";function YTt(){try{const e=localStorage.getItem(gle);if(!e)return{};const t=JSON.parse(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}function JTt(e){try{localStorage.setItem(gle,JSON.stringify(e))}catch{}}const WS=re(YTt());function XTt(e){WS.value=e,JTt(e)}const ZTt=E(()=>{const e={};for(const[t,n]of Object.entries(WS.value))e[t]={type:QTt(n),label:t,value:n};return e});function QTt(e){if(e===null)return"null";if(Array.isArray(e))return"list";switch(typeof e){case"string":return"string";case"number":return Number.isInteger(e)?"int":"double";case"boolean":return"bool";case"object":return"map";default:return"dyn"}}const eEt={class:"fixed bottom-4 right-4 z-50 pointer-events-auto","data-slot":"cel-vars-affix"},tEt={key:0,class:"rounded bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] leading-none text-zinc-600"},nEt={class:"flex flex-col gap-2 max-h-[60vh] overflow-y-auto"},oEt={key:0,class:"mt-1 pl-28 text-xs text-red-500"},rEt={class:"flex justify-end gap-2 pt-2"},aEt=q({name:"CelVarsAffix",__name:"cel-vars-affix",setup(e){let t=0;function n(h="",g=void 0){return{id:t++,key:h,valueText:g===void 0?"":JSON.stringify(g),error:null}}const o=re(!1),r=re([]);Xe(o,h=>{h&&(r.value=Object.entries(WS.value).map(([g,v])=>n(g,v)))});const a=E(()=>{const h=new Map,g=new Set;for(const v of r.value){if(!v.key)continue;const b=(h.get(v.key)??0)+1;h.set(v.key,b),b>1&&g.add(v.key)}return g});function i(h){if(h.valueText.length===0){h.error=null;return}try{JSON.parse(h.valueText),h.error=null}catch(g){h.error=g instanceof Error?g.message:String(g)}}function l(){r.value.push(n())}function u(h){r.value=r.value.filter(g=>g.id!==h)}const d=E(()=>r.value.every(h=>!h.error));function p(){if(!d.value)return;const h={};for(const g of r.value)if(g.key&&g.valueText.length!==0)try{h[g.key]=JSON.parse(g.valueText)}catch{return}XTt(h),window.location.reload()}const m=E(()=>Object.keys(WS.value).length);return(h,g)=>(k(),L("div",eEt,[c(s(Rn),{variant:"default",size:"sm","aria-label":"Edit CEL variables",onClick:g[0]||(g[0]=v=>o.value=!0)},{default:f(()=>[c(s(fe),{icon:"fluent:braces-variable-20-regular"}),g[3]||(g[3]=P(" CEL 变量 ",-1)),m.value>0?(k(),L("span",tEt,O(m.value),1)):ke("",!0)]),_:1}),c(s(TQ),{open:o.value,"onUpdate:open":g[2]||(g[2]=v=>o.value=v)},{default:f(()=>[c(s(hHe),{class:"max-w-xl"},{default:f(()=>[c(s(HQ),null,{default:f(()=>[c(s(WQ),null,{default:f(()=>[...g[4]||(g[4]=[P("CEL 变量",-1)])]),_:1}),c(s(jQ),null,{default:f(()=>[...g[5]||(g[5]=[P(" 键名是 CEL 表达式中引用的变量名,值是合法的 JSON。仅在此浏览器本地保存。 ",-1)])]),_:1})]),_:1}),H("div",nEt,[(k(!0),L(Me,null,Ke(r.value,v=>(k(),L("div",{key:v.id},[c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:v.key,"onUpdate:modelValue":b=>v.key=b,placeholder:"token",class:"w-28 max-w-28 font-mono","aria-invalid":a.value.has(v.key)||void 0},null,8,["modelValue","onUpdate:modelValue","aria-invalid"]),g[6]||(g[6]=H("div",{"aria-hidden":"true",class:"self-stretch w-px my-1.5 bg-zinc-200"},null,-1)),c(s(mt),{modelValue:v.valueText,"onUpdate:modelValue":b=>v.valueText=b,placeholder:'"..." | 42 | { ... }',class:"font-mono text-xs","aria-invalid":!!v.error||void 0,onBlur:b=>i(v)},null,8,["modelValue","onUpdate:modelValue","aria-invalid","onBlur"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"Remove",onClick:b=>u(v.id)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024),v.error?(k(),L("div",oEt,O(v.error),1)):ke("",!0)]))),128)),c(s(Rn),{variant:"default",class:"w-full",onClick:l},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),g[7]||(g[7]=P(" 添加 ",-1))]),_:1})]),H("div",rEt,[c(s(Rn),{variant:"default",onClick:g[1]||(g[1]=v=>o.value=!1)},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"}),g[8]||(g[8]=P(" 取消 ",-1))]),_:1}),c(s(Rn),{variant:"primary",disabled:!d.value,onClick:p},{default:f(()=>[c(s(fe),{icon:"fluent:checkmark-20-regular"}),g[9]||(g[9]=P(" 应用 ",-1))]),_:1},8,["disabled"])])]),_:1})]),_:1},8,["open"])]))}}),iEt={class:"min-h-screen p-4"},sEt=q({__name:"App",setup(e){const t=GRe("shwfed:preview:page-config",null,{serializer:IX.object});return CI(()=>{const n=globalThis.__SHWFED_PREVIEW_CONFIG__;n!==void 0&&(t.value=n??null)}),Wi(ZTt.value),(n,o)=>(k(),M(aJe,null,{default:f(()=>[H("div",iEt,[c(KTt,{config:s(t),"onUpdate:config":o[0]||(o[0]=r=>jn(t)?t.value=r:null),editable:!0},null,8,["config"])]),c(aEt)]),_:1}))}}),vle=Pfe({locale:navigator?.language,fallbackWarn:!1,fallbackLocale:"zh",globalInjection:!1});pl.setDefaultHeader("Accept-Language",()=>vle.global.locale.value);Fce(sEt).use(vle).mount("#app");export{E as $,Vte as A,HR as B,pt as C,S$ as D,tl as E,Me as F,ws as G,Ge as H,fe as I,Ant as J,Yn as K,Zn as L,Qn as M,Jn as N,Xn as O,znt as P,kae as Q,Xe as R,tr as S,O$ as T,Lb as U,ke as V,Mo as W,jR as X,UR as Y,Ca as Z,V as _,et as a,re as a0,Fn as a1,dS as a2,js as a3,Rn as a4,G1 as a5,xb as a6,NEt as a7,Y1 as a8,pA as a9,J1 as aA,_n as aB,Si as aC,dr as aD,Z4e as aE,$I as aF,Pt as aG,ak as aH,out as aI,Jnt as aJ,l1t as aK,d4 as aL,UEt as aM,qEt as aN,Bnt as aa,jnt as ab,iA as ac,Gnt as ad,un as ae,Eo as af,ut as ag,LEt as ah,FEt as ai,BEt as aj,Ht as ak,dn as al,vn as am,C$ as an,jr as ao,Gn as ap,Ut as aq,Vn as ar,vnt as as,REt as at,bt as au,mn as av,hte as aw,Wi as ax,fr as ay,rA as az,Ot as b,L as c,q as d,M as e,H as f,c as g,N as h,ee as i,P as j,z as k,qe as l,Ye as m,He as n,k as o,qc as p,oB as q,se as r,xnt as s,O as t,s as u,Ke as v,f as w,$0 as x,T0 as y,knt as z};
|
|
643
|
+
`),()=>{g()});function v(ae){return typeof ae=="number"&&Number.isFinite(ae)}function b(ae){if(v(ae))return ae;if(typeof ae=="string"&&ae.trim()!==""){const W=Number(ae);return Number.isFinite(W)?W:void 0}}function x(ae,W){try{const B=bt(Ht(ae,W));return Array.isArray(B)?B:[]}catch{return[]}}function y(ae,W){try{return b(bt(Ht(ae,W)))}catch{return}}const _=E(()=>({...h(),...a.value})),w=E(()=>{const ae=_.value,W=x(t.value.x,ae),B=t.value.y.map(ze=>x(ze.value,ae)),K=t.value.y.map(ze=>ze.size?x(ze.size,ae):null),X=W.length===0?"ordinal":W.every(ze=>ze instanceof Date)?"time":W.every(ze=>v(ze))?"number":"ordinal",Ee=new Map;return{records:W.map((ze,st)=>{const oe={__x:st};return X==="time"?oe.__x=ze.getTime():X==="number"?oe.__x=ze:Ee.set(st,ze==null?"":String(ze)),B.forEach((be,De)=>{oe[`y${De}`]=b(be[st])}),K.forEach((be,De)=>{be&&(oe[`sz${De}`]=b(be[st]))}),oe}),xMode:X,xLabels:Ee}}),S=E(()=>t.value.y.map(ae=>{if(!ae.dash)return;const W=x(ae.dash,_.value).filter(v);return W.length>0?W:void 0})),C=E(()=>t.value.y.map(ae=>ae.width?y(ae.width,_.value):void 0)),$=ae=>ae.__x,T=E(()=>t.value.y.map((ae,W)=>B=>B[`y${W}`])),D=E(()=>t.value.y.map((ae,W)=>ae.size?B=>B[`sz${W}`]:void 0)),A=E(()=>t.value.y.map((ae,W)=>({k:W,s:ae,color:d.value[W]}))),I=E(()=>A.value.filter(ae=>ae.s.chart==="line")),U=E(()=>A.value.filter(ae=>ae.s.chart==="area")),j=E(()=>A.value.filter(ae=>ae.s.chart==="scatter"));function Q(ae){const W=A.value.filter(B=>B.s.chart===ae);return{entries:W,accessors:W.map(B=>T.value[B.k]),colors:W.map(B=>B.color),width:W[0]?C.value[W[0].k]:void 0}}const F=E(()=>Q("groupedBar")),R=E(()=>Q("stackedBar")),G=E(()=>{const ae=[];return t.value.y.forEach((W,B)=>{const K=m(W);K&&ae.push({name:K,color:d.value[B]})}),ae}),Z=E(()=>{const ae=w.value.xMode;if(ae==="ordinal"){const W=w.value.xLabels;return B=>W.get(B)??""}if(ae==="time")return W=>new Date(W).toLocaleDateString()}),Y=E(()=>{if(w.value.xMode!=="ordinal")return;const ae=[...w.value.xLabels.keys()];if(ae.length<=12)return ae;const W=Math.ceil(ae.length/10);return ae.filter((B,K)=>K%W===0)});function he(ae){return Number.isInteger(ae)?String(ae):ae.toFixed(2)}function ue(ae){return ae.replace(/[&<>"]/g,W=>({"&":"&","<":"<",">":">",'"':"""})[W]??W)}function pe(ae){const W=w.value.xMode,B=W==="ordinal"?w.value.xLabels.get(ae.__x)??"":W==="time"?new Date(ae.__x).toLocaleDateString():String(ae.__x),K=[];t.value.y.forEach((Ee,_e)=>{const ze=m(Ee);if(!ze)return;const st=ae[`y${_e}`];K.push(`<div style="display:flex;align-items:center;gap:6px;padding:1px 0"><span style="width:8px;height:8px;border-radius:9999px;background:${d.value[_e]}"></span><span style="color:#3f3f46">${ue(ze)}</span><span style="margin-left:auto;font-variant-numeric:tabular-nums;color:#18181b">${st===void 0?"—":he(st)}</span></div>`)});const X=K.join("");return`<div style="font-size:12px;min-width:160px"><div style="font-weight:600;color:#18181b;margin-bottom:4px">${ue(B)}</div>${X}</div>`}const ce=E(()=>i.value?i.value:w.value.records.length===0?"暂无数据":null);return(ae,W)=>(k(),L("div",FTt,[ce.value?(k(),L("div",zTt,O(ce.value),1)):r.value?(k(),L(Me,{key:1},[c(s(RTt),{data:w.value.records,margin:{top:8,right:16,bottom:4,left:8},class:"min-h-0 flex-1"},{default:f(()=>[R.value.entries.length>0?(k(),M(s(ITt),{key:0,x:$,y:R.value.accessors,color:R.value.colors,"bar-width":R.value.width},null,8,["y","color","bar-width"])):ke("",!0),F.value.entries.length>0?(k(),M(s($Tt),{key:1,x:$,y:F.value.accessors,color:F.value.colors,"group-width":F.value.width},null,8,["y","color","group-width"])):ke("",!0),(k(!0),L(Me,null,Ke(U.value,B=>(k(),M(s(_Tt),{key:B.s.id,x:$,y:T.value[B.k],color:B.color,line:!0,"line-color":B.s.lineColor||B.color,"line-width":B.s.lineWidth},null,8,["y","color","line-color","line-width"]))),128)),(k(!0),L(Me,null,Ke(I.value,B=>(k(),M(s(ETt),{key:B.s.id,x:$,y:T.value[B.k],color:B.color,"curve-type":l[B.s.curveType],"line-width":B.s.lineWidth,"line-dash-array":S.value[B.k]},null,8,["y","color","curve-type","line-width","line-dash-array"]))),128)),(k(!0),L(Me,null,Ke(j.value,B=>(k(),M(s(OTt),{key:B.s.id,x:$,y:T.value[B.k],color:B.color,size:D.value[B.k]},null,8,["y","color","size"]))),128)),c(s(MU),{type:"x","tick-format":Z.value,"tick-values":Y.value,"tick-text-hide-overlapping":!0,"grid-line":!1},null,8,["tick-format","tick-values"]),c(s(MU),{type:"y"}),c(s(kTt),{x:$,y:T.value,color:d.value,template:pe},null,8,["y","color"]),c(s(MTt))]),_:1},8,["data"]),G.value.length>0?(k(),M(s(wTt),{key:0,items:G.value,class:"mx-auto w-fit shrink-0 text-xs"},null,8,["items"])):ke("",!0),p.value?(k(),M(s(z),{key:1,source:p.value,block:"",class:"prose prose-sm prose-zinc max-w-none shrink-0 text-center"},null,8,["source"])):ke("",!0)],64)):ke("",!0)]))}}),NTt=Object.assign({"../blocks/2026-05-06/com.shwfed.block.actions/schema.ts":wot,"../blocks/2026-05-06/com.shwfed.block.form/schema.ts":Vvt,"../blocks/2026-05-06/com.shwfed.block.markdown/schema.ts":Bvt,"../blocks/2026-05-06/com.shwfed.block.table/schema.ts":Hvt,"../blocks/2026-05-06/com.shwfed.block.tabs/schema.ts":Jvt,"../blocks/2026-05-17/com.shwfed.block.chart.xy/schema.ts":n0t}),LTt=Object.assign({"../blocks/2026-05-06/com.shwfed.block.actions/config.vue":o0t,"../blocks/2026-05-06/com.shwfed.block.form/config.vue":i0t,"../blocks/2026-05-06/com.shwfed.block.markdown/config.vue":l0t,"../blocks/2026-05-06/com.shwfed.block.table/config.vue":X0t,"../blocks/2026-05-06/com.shwfed.block.tabs/config.vue":gyt,"../blocks/2026-05-17/com.shwfed.block.chart.xy/config.vue":Iyt}),BTt=Object.assign({"../blocks/2026-05-06/com.shwfed.block.actions/runtime.vue":Pyt,"../blocks/2026-05-06/com.shwfed.block.form/runtime.vue":Fyt,"../blocks/2026-05-06/com.shwfed.block.markdown/runtime.vue":zyt,"../blocks/2026-05-06/com.shwfed.block.table/runtime.vue":u1t,"../blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue":v1t,"../blocks/2026-05-17/com.shwfed.block.chart.xy/runtime.vue":VTt}),UTt=X1({hostName:"shwfed-config",dirSegment:"blocks",schemaModules:NTt,configModules:LTt,runtimeModules:BTt}),pF=UTt.ENTRIES.map(e=>({type:e.type,compatibilityDate:e.compatibilityDate,metadata:e.module.metadata,schema:e.module.schema,defaultBody:e.module.defaultBody,config:e.config,runtime:e.runtime})),RU=new WeakMap;function qTt(e){const t=RU.get(e);if(t)return t;const n={blockRef:null,members:null,union:null};return n.blockRef=NC(()=>{if(!n.union)throw new Error("[shwfed-config] BlockRef resolved before union built — circular factory init");return n.union}).annotations({identifier:"PageBlock"}),RU.set(e,n),Pnt(e,n.blockRef),n.members=pF.map(o=>o.schema(e,n.blockRef).annotations({identifier:`${o.type}@${o.compatibilityDate}`})),n.union=n.members.length===1?n.members[0]:Jr(...n.members),n}function jTt(e){return qTt(e).blockRef}function vf(e,t){return pF.find(n=>n.type===e&&n.compatibilityDate===t)}Rnt(vf);const hle="shwfed.component.page";function HTt(e){const t=jTt(e).annotations({identifier:"PageBlock",description:"页面块,由 `type` 字段区分类型"}),n=NR(t,e);return rt({kind:Ci(hle),slot:n}).annotations({title:"PageConfig",description:"页面组件完整配置"})}function WTt(){return{slot:xb()}}function GTt(e){return{kind:hle,...WTt(),...e}}const KTt=q({name:"ShwfedConfig",__name:"index",props:Ca({configure:{type:Function},editable:{type:Boolean}},{config:{},configModifiers:{}}),emits:["update:config"],setup(e){const t=Ot(e,"config"),n=E({get:()=>t.value??GTt(),set:m=>{t.value=m}}),o=e,r=vn(),a=o.configure??(()=>{}),i=m=>{a(m);const h=new Set(m.getDefinitions().variables.map(g=>g.name));for(const[g,v]of Object.entries(r))h.has(g)||m.registerVariable(g,v.type,{description:v.description,label:v.label})},l=re(!1),u=eyt(n,{configure:i,onClose:()=>{l.value=!1}});Xe(l,(m,h)=>{m&&!h&&u.reset()});function d(m){o.editable&&(!m.metaKey&&!m.ctrlKey||(m.preventDefault(),m.stopPropagation(),l.value=!0))}function p(m){n.value={...n.value,slot:m}}return(m,h)=>{const g=Rf("ClientOnly");return k(),M(g,null,{default:f(()=>[H("div",{class:"contents",onClickCapture:d},[c(hte,{"slot-value":n.value.slot,configure:i,"find-entry":s(vf),"onUpdate:slotValue":p},ee({_:2},[e.editable?{name:"empty",fn:f(()=>[h[2]||(h[2]=P(" meta+click 进入编辑 ",-1))]),key:"0"}:void 0]),1032,["slot-value","find-entry"])],32),e.editable?(k(),M(aee,{key:0,open:l.value,"onUpdate:open":h[1]||(h[1]=v=>l.value=v),"content-width":"90vw",dismissible:!0},{title:f(()=>[c(unt,{state:s(u)},null,8,["state"])]),description:f(()=>[...h[3]||(h[3]=[H("span",{class:"sr-only"},"编辑页面布局与块配置",-1)])]),footer:f(()=>[c(pnt,{state:s(u),onClose:h[0]||(h[0]=v=>l.value=!1)},null,8,["state"])]),default:f(()=>[c(nnt,{state:s(u)},null,8,["state"])]),_:1},8,["open"])):ke("",!0)]),_:1})}}}),gle="shwfed:preview:cel-vars";function YTt(){try{const e=localStorage.getItem(gle);if(!e)return{};const t=JSON.parse(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}function JTt(e){try{localStorage.setItem(gle,JSON.stringify(e))}catch{}}const WS=re(YTt());function XTt(e){WS.value=e,JTt(e)}const ZTt=E(()=>{const e={};for(const[t,n]of Object.entries(WS.value))e[t]={type:QTt(n),label:t,value:n};return e});function QTt(e){if(e===null)return"null";if(Array.isArray(e))return"list";switch(typeof e){case"string":return"string";case"number":return Number.isInteger(e)?"int":"double";case"boolean":return"bool";case"object":return"map";default:return"dyn"}}const eEt={class:"fixed bottom-4 right-4 z-50 pointer-events-auto","data-slot":"cel-vars-affix"},tEt={key:0,class:"rounded bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] leading-none text-zinc-600"},nEt={class:"flex flex-col gap-2 max-h-[60vh] overflow-y-auto"},oEt={key:0,class:"mt-1 pl-28 text-xs text-red-500"},rEt={class:"flex justify-end gap-2 pt-2"},aEt=q({name:"CelVarsAffix",__name:"cel-vars-affix",setup(e){let t=0;function n(h="",g=void 0){return{id:t++,key:h,valueText:g===void 0?"":JSON.stringify(g),error:null}}const o=re(!1),r=re([]);Xe(o,h=>{h&&(r.value=Object.entries(WS.value).map(([g,v])=>n(g,v)))});const a=E(()=>{const h=new Map,g=new Set;for(const v of r.value){if(!v.key)continue;const b=(h.get(v.key)??0)+1;h.set(v.key,b),b>1&&g.add(v.key)}return g});function i(h){if(h.valueText.length===0){h.error=null;return}try{JSON.parse(h.valueText),h.error=null}catch(g){h.error=g instanceof Error?g.message:String(g)}}function l(){r.value.push(n())}function u(h){r.value=r.value.filter(g=>g.id!==h)}const d=E(()=>r.value.every(h=>!h.error));function p(){if(!d.value)return;const h={};for(const g of r.value)if(g.key&&g.valueText.length!==0)try{h[g.key]=JSON.parse(g.valueText)}catch{return}XTt(h),window.location.reload()}const m=E(()=>Object.keys(WS.value).length);return(h,g)=>(k(),L("div",eEt,[c(s(Rn),{variant:"default",size:"sm","aria-label":"Edit CEL variables",onClick:g[0]||(g[0]=v=>o.value=!0)},{default:f(()=>[c(s(fe),{icon:"fluent:braces-variable-20-regular"}),g[3]||(g[3]=P(" CEL 变量 ",-1)),m.value>0?(k(),L("span",tEt,O(m.value),1)):ke("",!0)]),_:1}),c(s(TQ),{open:o.value,"onUpdate:open":g[2]||(g[2]=v=>o.value=v)},{default:f(()=>[c(s(hHe),{class:"max-w-xl"},{default:f(()=>[c(s(HQ),null,{default:f(()=>[c(s(WQ),null,{default:f(()=>[...g[4]||(g[4]=[P("CEL 变量",-1)])]),_:1}),c(s(jQ),null,{default:f(()=>[...g[5]||(g[5]=[P(" 键名是 CEL 表达式中引用的变量名,值是合法的 JSON。仅在此浏览器本地保存。 ",-1)])]),_:1})]),_:1}),H("div",nEt,[(k(!0),L(Me,null,Ke(r.value,v=>(k(),L("div",{key:v.id},[c(s(Ge),null,{default:f(()=>[c(s(mt),{modelValue:v.key,"onUpdate:modelValue":b=>v.key=b,placeholder:"token",class:"w-28 max-w-28 font-mono","aria-invalid":a.value.has(v.key)||void 0},null,8,["modelValue","onUpdate:modelValue","aria-invalid"]),g[6]||(g[6]=H("div",{"aria-hidden":"true",class:"self-stretch w-px my-1.5 bg-zinc-200"},null,-1)),c(s(mt),{modelValue:v.valueText,"onUpdate:modelValue":b=>v.valueText=b,placeholder:'"..." | 42 | { ... }',class:"font-mono text-xs","aria-invalid":!!v.error||void 0,onBlur:b=>i(v)},null,8,["modelValue","onUpdate:modelValue","aria-invalid","onBlur"]),c(s(pt),{align:"inline-end"},{default:f(()=>[c(s(Ct),{size:"icon-xs","aria-label":"Remove",onClick:b=>u(v.id)},{default:f(()=>[c(s(fe),{icon:"fluent:delete-20-regular"})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024),v.error?(k(),L("div",oEt,O(v.error),1)):ke("",!0)]))),128)),c(s(Rn),{variant:"default",class:"w-full",onClick:l},{default:f(()=>[c(s(fe),{icon:"fluent:add-20-regular"}),g[7]||(g[7]=P(" 添加 ",-1))]),_:1})]),H("div",rEt,[c(s(Rn),{variant:"default",onClick:g[1]||(g[1]=v=>o.value=!1)},{default:f(()=>[c(s(fe),{icon:"fluent:dismiss-20-regular"}),g[8]||(g[8]=P(" 取消 ",-1))]),_:1}),c(s(Rn),{variant:"primary",disabled:!d.value,onClick:p},{default:f(()=>[c(s(fe),{icon:"fluent:checkmark-20-regular"}),g[9]||(g[9]=P(" 应用 ",-1))]),_:1},8,["disabled"])])]),_:1})]),_:1},8,["open"])]))}}),iEt={class:"min-h-screen p-4"},sEt=q({__name:"App",setup(e){const t=GRe("shwfed:preview:page-config",null,{serializer:IX.object});return CI(()=>{const n=globalThis.__SHWFED_PREVIEW_CONFIG__;n!==void 0&&(t.value=n??null)}),Wi(ZTt.value),(n,o)=>(k(),M(aJe,null,{default:f(()=>[H("div",iEt,[c(KTt,{config:s(t),"onUpdate:config":o[0]||(o[0]=r=>jn(t)?t.value=r:null),editable:!0},null,8,["config"])]),c(aEt)]),_:1}))}}),vle=Pfe({locale:navigator?.language,fallbackWarn:!1,fallbackLocale:"zh",globalInjection:!1});pl.setDefaultHeader("Accept-Language",()=>vle.global.locale.value);Fce(sEt).use(vle).mount("#app");export{E as $,Vte as A,HR as B,pt as C,S$ as D,tl as E,Me as F,ws as G,Ge as H,fe as I,Ant as J,Yn as K,Zn as L,Qn as M,Jn as N,Xn as O,znt as P,kae as Q,Xe as R,tr as S,O$ as T,Lb as U,ke as V,Mo as W,jR as X,UR as Y,Ca as Z,V as _,et as a,re as a0,Fn as a1,dS as a2,js as a3,Rn as a4,G1 as a5,xb as a6,NEt as a7,Y1 as a8,pA as a9,rA as aA,J1 as aB,_n as aC,Si as aD,dr as aE,Z4e as aF,$I as aG,Pt as aH,ak as aI,out as aJ,Jnt as aK,l1t as aL,d4 as aM,UEt as aN,qEt as aO,Bnt as aa,jnt as ab,iA as ac,Gnt as ad,un as ae,Eo as af,ut as ag,LEt as ah,FEt as ai,BEt as aj,Ht as ak,dn as al,vn as am,C$ as an,jr as ao,Gn as ap,Ut as aq,Vn as ar,vnt as as,REt as at,bt as au,mn as av,hte as aw,Wi as ax,hA as ay,fr as az,Ot as b,L as c,q as d,M as e,H as f,c as g,N as h,ee as i,P as j,z as k,qe as l,Ye as m,He as n,k as o,qc as p,oB as q,se as r,xnt as s,O as t,s as u,Ke as v,f as w,$0 as x,T0 as y,knt as z};
|