@jsswift/ui 1.0.41
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/css/animation.css +121 -0
- package/dist/css/base.css +621 -0
- package/dist/css/docs.css +216 -0
- package/dist/css/min-ui.css +1 -0
- package/dist/css/responsive.css +3259 -0
- package/dist/css/ui-components.css +8757 -0
- package/dist/css/ui.css +12765 -0
- package/dist/css/ui.min.css +1 -0
- package/dist/fonts/Nunito-Black.ttf +0 -0
- package/dist/fonts/Nunito-BlackItalic.ttf +0 -0
- package/dist/fonts/Nunito-Bold.ttf +0 -0
- package/dist/fonts/Nunito-BoldItalic.ttf +0 -0
- package/dist/fonts/Nunito-ExtraBold.ttf +0 -0
- package/dist/fonts/Nunito-ExtraBoldItalic.ttf +0 -0
- package/dist/fonts/Nunito-ExtraLight.ttf +0 -0
- package/dist/fonts/Nunito-ExtraLightItalic.ttf +0 -0
- package/dist/fonts/Nunito-Italic.ttf +0 -0
- package/dist/fonts/Nunito-Light.ttf +0 -0
- package/dist/fonts/Nunito-LightItalic.ttf +0 -0
- package/dist/fonts/Nunito-Medium.ttf +0 -0
- package/dist/fonts/Nunito-MediumItalic.ttf +0 -0
- package/dist/fonts/Nunito-Regular.ttf +0 -0
- package/dist/fonts/Nunito-SemiBold.ttf +0 -0
- package/dist/fonts/Nunito-SemiBoldItalic.ttf +0 -0
- package/dist/img/logo.svg +131 -0
- package/dist/img/svg/tabler-icons-sprite.svg +39534 -0
- package/dist/min-ui.js +34 -0
- package/dist/ui.js +21027 -0
- package/dist/ui.min.js +34 -0
- package/package.json +40 -0
- package/src/00-bootstrap.js +330 -0
- package/src/01-foundation-helpers.js +1208 -0
- package/src/10-primitives-layout.js +5972 -0
- package/src/20-display-content.js +1014 -0
- package/src/21-list-content.js +341 -0
- package/src/22-banner-content.js +489 -0
- package/src/23-tooltip.js +326 -0
- package/src/31-form-advanced.js +3149 -0
- package/src/40-navigation.js +1454 -0
- package/src/41-tab-panel.js +1090 -0
- package/src/50-feedback.js +1209 -0
- package/src/51-feedback-service.js +166 -0
- package/src/60-shell-app.js +1483 -0
- package/src/61-form-service.js +450 -0
- package/src/70-dialog.js +401 -0
- package/src/71-menu-overlays.js +1442 -0
- package/src/80-data.js +503 -0
- package/src/README.md +159 -0
- package/src/css/README.md +17 -0
- package/src/css/animation.css +121 -0
- package/src/css/base.css +621 -0
- package/src/css/docs.css +216 -0
- package/src/css/responsive.css +3259 -0
- package/src/css/ui-components.css +8757 -0
- package/src/modules.json +176 -0
package/dist/min-ui.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
(function(je){var Io,zo,To,Po,Eo,Mo,Ro,Jo,Oo,Do,Ho,jo,Vo,$o,Bo,Uo,Wo,Go,Ko,qo,Yo,Xo,Qo,Zo,ei,ti,ni,si,oi,ii,li,ri,ai,ci,di,ui,fi,mi,gi,pi,hi,bi,yi,wi,vi,Si,Ci,xi,Ni,Ai,ki,Fi,_i,Li,Ii,zi,Ti,Pi,Ei,Mi;je.ui=je.ui||{},je.services=je.services||{},je.services.notify=je.services.notify||{};const ns=Symbol("cms.ui.rodPathRaw"),On=Symbol("cms.ui.rodPathEnhanced"),Ls=Symbol("cms.ui.rodPathPatchedH"),Dn=Symbol("cms.ui.rodPathWrappedUI"),Nn=new WeakMap,Is=new WeakMap,zs=new WeakMap,Bt=[],Ts=t=>{if(typeof t=="number")return Number.isInteger(t)&&t>=0;if(typeof t!="string"||t===""||t[0]==="-"||t.includes("."))return!1;const e=Number(t);return Number.isInteger(e)&&e>=0&&String(e)===t},ss=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"},ln=t=>{if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};let os=!1;const al=()=>{os||(os=!0,queueMicrotask(()=>{os=!1,Bt.length=0}))},cl=t=>{Bt.push(t),Bt.length>128&&Bt.splice(0,Bt.length-128),al()},Ps=()=>{if(!Bt.length)return null;const t=Bt.slice();return Bt.length=0,{items:t,index:0}},Es=(t,e)=>{if(!t)return null;const n=t.items[t.index];return!n||!Object.is(n.value,e)?null:(t.index+=1,n)},is=t=>t&&typeof t=="object"&&t[ns]?t[ns]:t,ls=(t,e)=>{const n=Nn.get(t);if(!n)return;let s=n.rawGet();for(const i of e){if(s==null)return;s=s[i]}return s},dl=(t,e,n)=>{const s=Nn.get(t);if(!s)return;const i=is(n);if(!e.length){if(Object.is(s.rawGet(),i))return;s.rawSet(i);return}let c=s.rawGet();(!c||typeof c!="object")&&(c=Ts(e[0])?[]:{});let y=c;for(let a=0;a<e.length-1;a++){const l=e[a];let b=y[l];if(!b||typeof b!="object"){const R=e[a+1];b=Ts(R)?[]:{},y[l]=b}y=b}Object.is(y[e[e.length-1]],i)||(y[e[e.length-1]]=i,s.rawSet(c))},Ms=(t,e)=>[()=>ls(t,e),n=>dl(t,e,n)],Rs=(t,e,n=[])=>{if(!e||typeof e!="object")return e;let s=Is.get(t);s||(s=new WeakMap,Is.set(t,s));const i=s.get(e);if(i)return i;const c=new Proxy(e,{get(y,a,l){if(a===ns)return y;const b=Reflect.get(y,a,l);if(typeof a=="symbol")return b;const R=n.concat(a);return b&&typeof b=="object"?Rs(t,b,R):typeof b=="function"?b.bind(l):(ss(b)&&cl({rod:t,path:R,value:b}),b)},set(y,a,l,b){const R=is(l),C=Reflect.get(y,a,b);if(Object.is(C,R))return!0;const w=Reflect.set(y,a,R,b);if(w){const T=Nn.get(t);T==null||T.rawSet(T.rawGet())}return w},deleteProperty(y,a){const l=Reflect.has(y,a),b=Reflect.deleteProperty(y,a);if(b&&l){const R=Nn.get(t);R==null||R.rawSet(R.rawGet())}return b}});return s.set(e,c),c},Js=t=>{if(!t||typeof t!="object"||t.type!=="rod"||t[On])return t;const e=Object.getOwnPropertyDescriptor(t,"value");if(!e||typeof e.get!="function"||typeof e.set!="function")return t;const n=()=>e.get.call(t),s=i=>e.set.call(t,is(i));return Nn.set(t,{rawGet:n,rawSet:s}),Object.defineProperty(t,"value",{get(){const i=n();return!i||typeof i!="object"?i:Rs(t,i,[])},set(i){s(i)},configurable:!0}),Object.defineProperty(t,On,{value:!0,configurable:!1}),t},ul=()=>{if(typeof window._.rod!="function"||window._.rod[On])return;const t=window._.rod,e=function(...s){return Js(t(...s))};Object.defineProperty(e,On,{value:!0,configurable:!1}),window._.rod=e};je.ui.withoutRodPathCapture=t=>{const e=Bt.length;try{return t()}finally{Bt.length=e}};const rs=(t,e,n="")=>{if(Array.isArray(t)){let c=!1;const y=t.map(a=>{const l=rs(a,e,"");return l!==a&&(c=!0),l});return c?y:t}if(ss(t)){const c=Es(e,t);return c?n==="model"?Ms(c.rod,c.path):()=>ls(c.rod,c.path):t}if(!ln(t))return t;let s=!1;const i={};for(const c of Object.keys(t)){const y=rs(t[c],e,c);i[c]=y,y!==t[c]&&(s=!0)}return s?i:t},as=(t,e,n="")=>{if(Array.isArray(t)){let c=!1;const y=t.map(a=>{const l=as(a,e,"");return l!==a&&(c=!0),l});return c?y:t}if(ss(t)){const c=Es(e,t);return c?n==="model"?Ms(c.rod,c.path):()=>ls(c.rod,c.path):t}if(!ln(t))return t;let s=!1;const i={};for(const c of Object.keys(t)){const a=c==="model"||c==="children"?as(t[c],e,c):t[c];i[c]=a,a!==t[c]&&(s=!0)}return s?i:t},Os=t=>{if(typeof t!="function"||t[Dn])return t;const e=zs.get(t);if(e)return e;const n=function(...i){const c=Ps();if(!c)return t.apply(this,i);let y=!1;const a=i.map(l=>{const b=as(l,c,"");return b!==l&&(y=!0),b});return t.apply(this,y?a:i)};return Object.defineProperty(n,Dn,{value:!0,configurable:!1}),zs.set(t,n),n},fl=()=>{const t=je.ui;if(!(!t||t[Dn])){Object.defineProperty(t,Dn,{value:!0,configurable:!1});for(const e of Object.keys(t))typeof t[e]=="function"&&(t[e]=Os(t[e]));je.ui=new Proxy(t,{get(e,n,s){return Reflect.get(e,n,s)},set(e,n,s,i){const c=typeof s=="function"?Os(s):s;return Reflect.set(e,n,c,i)}})}},ml=()=>{if(!window._||window._[Ls])return;Object.defineProperty(window._,Ls,{value:!0,configurable:!1});const t=new Set(["rod","rodBind","rodFromSignal"]);for(const e of Object.keys(window._)){if(t.has(e))continue;const n=window._[e];typeof n=="function"&&(window._[e]=function(...i){const c=Ps();if(!c)return n.apply(this,i);let y=!1;const a=i.map(l=>{const b=rs(l,c,"");return b!==l&&(y=!0),b});return n.apply(this,y?a:i)})}};ul(),((Io=JSswift.rod)==null?void 0:Io._all)instanceof Set&&JSswift.rod._all.forEach(t=>Js(t)),ml(),fl();const Ds={error:"danger",danger:"danger",warn:"warning",warning:"warning",success:"success",info:"info",primary:"primary",secondary:"secondary",light:"light",dark:"dark"},kr=new Set(Object.values(Ds)),gl=new Set(["none","xxs","xs","sm","md","lg","xl","xxl","xxxl","full"]),pl=new Set(["none","sm","md","lg"]),An={xxs:{font:"9px",pad:"2px 5px"},xs:{font:"10px",pad:"2px 6px"},sm:{font:"11px",pad:"2px 7px"},md:{font:"12px",pad:"2px 8px"},lg:{font:"13px",pad:"3px 10px"},xl:{font:"14px",pad:"4px 12px"},xxl:{font:"15px",pad:"5px 14px"},xxxl:{font:"16px",pad:"6px 16px"}},Zt=t=>{if(t.indexOf("-")>-1)return!0},mt=t=>{if(!t)return"";const e=String(t).toLowerCase();return Ds[e]||""},hl=t=>{if(t==null)return null;const e=String(t).toLowerCase();return e==="full"?"xxxl":gl.has(e)?e:null},Hn=t=>{if(t===!0)return"sm";if(t==null||t===!1)return null;const e=String(t).toLowerCase();return pl.has(e)?e:null},kn=t=>t&&typeof t=="object"&&!t.nodeType&&!Array.isArray(t)&&!(t instanceof Function),cs=t=>t&&t.nodeType===1&&String(t.tagName||"").toLowerCase()==="li",en=t=>t==null||t===!1||t===""?[]:Array.isArray(t)?t:[t];JSswift.isUIPlainObject=kn,JSswift.isListItemNode=cs,JSswift.asNodeArray=en;const gn=[{key:"mobile",aliases:["mobile","mobil"],prefix:"cms-"},{key:"tablet",aliases:["tablet"],prefix:"cms-tablet-"},{key:"pc",aliases:["pc","desktop"],prefix:"cms-pc-"}],ds=gn.flatMap(t=>t.aliases),jn=(t,e)=>Object.prototype.hasOwnProperty.call(t||{},e),Fn=(t={},e)=>{if(!e)return null;for(const n of e.aliases){if(!jn(t,n))continue;const s=o(t[n]);if(kn(s))return s}return null},Hs=(t={},e)=>{const n=Array.isArray(e)?e:[e];return gn.some(s=>{const i=Fn(t,s);return!!i&&n.some(c=>jn(i,c))})},bl=t=>String(t).trim().toLowerCase().replace(/\s+/g,"-"),yl=(t={},e=[])=>{const n=[];for(const s of gn){const i=Fn(t,s);if(i)for(const c of e){const y=Array.isArray(c.prop)?c.prop:[c.prop];let a=!1,l,b="";for(const w of y)if(jn(i,w)){l=o(i[w]),b=w,a=!0;break}if(!a||l==null||l===""||l===!1&&!c.allowFalse)continue;const R=typeof c.map=="function"?c.map(l,{propName:b,props:i,device:s,rule:c}):`${c.class}-${bl(l)}`,C=Array.isArray(R)?R:[R];for(const w of C)w&&n.push(String(w).startsWith("cms-")?w:`${s.prefix}${w}`)}}return n},js=(t={})=>gn.some(e=>!!Fn(t,e)),wl=(t={},e=[])=>{for(const n of e){if(!jn(t,n))continue;const s=o(t[n]);if(!(s==null||s===""))return s}},vl=(t,e={})=>{var n;return t==null||t===""||t===!1&&!e.allowFalse?"":typeof e.mapValue=="function"?e.mapValue(t,e):typeof t=="number"?e.number==="raw"?String(t):`${t}px`:e.token&&typeof t=="string"&&((n=JSswift.uiSizes)!=null&&n.includes(t))?`var(--cms-${e.token}-${t})`:String(t)},Sl=(t,e,n)=>{!t||n==null||n===""||(typeof t.setProperty=="function"?t.setProperty(e,n):t[e]=n)},Cl=(t,e)=>t==="mobile"?`cms-rsp-${e}`:`cms-rsp-${t}-${e}`,Vs=(t,e)=>{var n;if(!(!t||!e)){if((n=t.classList)!=null&&n.add){t.classList.add(e);return}t.class=ae([t.class,e])}},$s=(t,e={},n=[])=>{if(!t||!e||!js(e))return t;const s=t.style||{};let i=!1;for(const c of n){const y=Array.isArray(c.prop)?c.prop:[c.prop],a=(l,b)=>{const R=wl(b,y),C=vl(R,c);if(!C)return;const w=c.var||c.css,T=l==="mobile"?"--cms-rsp-":`--cms-rsp-${l}-`;Sl(s,`${T}${w}`,C),Vs(t,Cl(l,w)),i=!0};a("mobile",e);for(const l of gn){const b=Fn(e,l);b&&a(l.key,b)}}return i&&(t.nodeType||(t.style=s),Vs(t,"cms-rsp")),t};JSswift.uiResponsiveDevices=gn,JSswift.uiResponsiveOmitProps=ds,JSswift.uiResponsivePropsFor=Fn,JSswift.uiResponsiveHasConfig=js,JSswift.uiResponsiveHasProp=Hs,JSswift.uiResponsiveClasses=yl,JSswift.uiApplyResponsiveProps=$s;const xl=JSswift.omit;JSswift.omit=(t,e=[])=>{const n=Array.isArray(e)?e.concat(ds):ds;return xl(t,n)};const Yt=(t={})=>{var s;const e=[],n={};if(e.push(me(t.clickable,"cms-clickable"),me(t.dense,"cms-dense"),me(t.flat,"cms-flat"),me(t.border,"cms-border"),me(t.glossy,"cms-glossy"),me(t.glow,"cms-glow"),me(t.glass,"cms-glass"),me(t.shadow,"cms-shadow"),me(t.outline,"cms-outline"),me(t.rounded,"cms-rounded"),me(t.gradient,"cms-gradient"),me(t.textGradient,"cms-text-gradient"),me(t.lightShadow,"cms-light-shadow")),rt(t.color))e.push(()=>{const i=o(t.color),c=mt(i);return c?`cms-state-${c}`:""}),n.backgroundColor=()=>{const i=o(t.color);return mt(i)?"":i&&Zt(String(i))?`var(--cms-${i})`:i||""};else{const i=mt(t.color);i?e.push(`cms-state-${i}`):t.color&&Zt(t.color)?n.backgroundColor=`var(--cms-${t.color})`:t.color&&(n.backgroundColor=t.color)}if(rt(t.textColor)?n.color=()=>{const i=o(t.textColor);return i&&Zt(String(i))?`var(--cms-${i})`:i||""}:t.textColor&&Zt(t.textColor)?n.color=`var(--cms-${t.textColor})`:t.textColor&&(n.color=t.textColor),rt(t.size))e.push(()=>{var c;const i=o(t.size);return typeof i=="string"&&((c=JSswift.uiSizes)!=null&&c.includes(i))?`cms-size-${i}`:""});else{const i=t.size;typeof i=="string"&&((s=JSswift.uiSizes)!=null&&s.includes(i))&&e.push(`cms-size-${i}`)}if(rt(t.shadow))e.push(()=>{const i=o(t.shadow),c=Hn(i);return c?`cms-shadow-${c}`:""}),n.boxShadow=()=>{const i=o(t.shadow);return Hn(i)||i==null||i===!1?"":typeof i=="string"?i:""};else{const i=Hn(t.shadow);i?e.push(`cms-shadow-${i}`):t.shadow&&typeof t.shadow=="string"&&(n.boxShadow=t.shadow)}e.length&&(t.class=ae([t.class,...e])),Object.keys(n).length&&(t.style={...n,...t.style||{}})},Nl=JSswift.uiNormalizeArgs;JSswift.uiNormalizeArgs=function(t){const e=Nl(t),n=e.props||{};if(n&&Object.prototype.hasOwnProperty.call(n,"children")){const s=n.children;(!e.children||e.children.length===0)&&(e.children=Array.isArray(s)?s:[s]),delete n.children}return Yt(n),e};const v=window._,Al={actions:"Content rendered in the action area, typically in a footer or trailing region.",active:"Marks the item as active/selected and applies active styling/ARIA when relevant.",align:"Alignment of content along the cross axis (e.g. left/center/right).",allowCustom:"Allows values not present in the options list.",allowCustomValue:"Accepts free-form values in addition to predefined options.",aside:"Content or configuration for the aside/secondary region.",auto:"Enables automatic sizing or layout behavior instead of fixed sizing.",autocomplete:"Native autocomplete attribute for input elements.",backdrop:"Whether to render a backdrop overlay behind the component.",bgClass:"Additional CSS classes applied to the background layer.",bgPosition:"CSS background-position value for the background image/layer.",bgSize:"CSS background-size value for the background image/layer.",cardClass:"Additional CSS classes applied to the card container.",checked:"Checked state for toggleable controls (controlled).",class:"Additional CSS classes applied to the component root element.",clearable:"Shows a clear action to reset the current value.",clickable:"Enables pointer/hover styles and click handling on the component.",closeOnEsc:"Closes the component when the Escape key is pressed.",closeOnOutside:"Closes the component when clicking outside its bounds.",closeOnSelect:"Closes the menu/popover after selecting an item.",color:"Semantic color name used to style the component.",cols:"Number of columns for grid layouts.",columns:"Column definitions for table-like components.",content:"Main content node(s) or render function for the component body.",contentClass:"Additional CSS classes applied to the content container.",control:"Custom control element or render function for the input area.",children:"Default child content (nodes, arrays, or render function).",delay:"Delay in milliseconds before showing or hiding.",dense:"Uses compact spacing and sizing.",disabled:"Disables interaction and applies disabled styling/ARIA.",divider:"Shows dividers between items or sections.",drawer:"Content or configuration for the drawer region.",drawerBreakpoint:"Viewport width where the drawer switches behavior (overlay vs persistent).",drawerCloseIcon:"Icon used for the drawer close control.",drawerOpen:"Controls whether the drawer is open (controlled).",drawerOpenIcon:"Icon used for the drawer open control.",drawerStateKey:"Storage key used to persist drawer open state.",drawerWidth:"Drawer width (number interpreted as px or CSS length).",elevated:"Applies elevated shadow/raised styling.",emptyText:"Text shown when there is no data to display.",error:"Error state or message displayed with the component.",escClose:"Alias for close-on-escape behavior.",filterPlaceholder:"Placeholder text for the filter/search input.",filterable:"Enables filtering UI for option lists.",flat:"Removes elevation/border for a flat look.",footer:"Footer content node(s) or render function.",form:"HTML form attribute to associate controls with a form.",gap:"Gap/spacing between child elements.",getValue:"Function to extract a value from an item object.",groupCloseIcon:"Icon used to collapse grouped items.",groupOpenIcon:"Icon used to expand grouped items.",header:"Header content node(s) or render function.",height:"Explicit height (number interpreted as px or CSS length).",hint:"Helper text shown near the control.",icon:"Icon name or node rendered with the component.",iconRight:"Icon name or node rendered on the right side of the component.",iconAlign:"Position of the icon relative to the label.",initialSort:"Initial sort configuration for table data.",inputmode:"Native inputmode attribute hint for virtual keyboards.",items:"Array of items or nodes to render.",justify:"Justification of items along the main axis.",label:"Label text or node for the component.",left:"Content or configuration for the left region.",lg:"Column span at large breakpoint.",loading:"Shows loading state and disables interactions where appropriate.",loadingText:"Text displayed while loading.",lockScroll:"Prevents body scroll while an overlay is open.",max:"Maximum value for range-based controls.",md:"Column span at medium breakpoint.",message:"Message text shown in banners/alerts.",min:"Minimum value for range-based controls.",mobile:"Responsive overrides applied at the base/mobile viewport.",model:"Two-way bound value (alias to value in some components).",multi:"Enables multi-selection behavior.",multiple:"Allows selecting multiple values.",name:"HTML name attribute for form submission.",noDrawer:"Disables rendering of the drawer region.",note:"Secondary note text.",number:"Forces numeric input/formatting where supported.",offset:"General offset for positioning.",offsetX:"Horizontal offset for overlay placement in pixels.",offsetY:"Vertical offset for overlay placement in pixels.",onBlur:"Callback fired when the control loses focus.",onChange:"Callback fired when the value or selection changes.",onClear:"Callback fired when the clear action is used.",onClose:"Callback fired when the component closes.",onFocus:"Callback fired when the control gains focus.",onInput:"Callback fired on input events or while typing.",onOpen:"Callback fired when the component opens.",onRemove:"Callback fired when an item is removed.",onSubmit:"Callback fired when a form is submitted.",open:"Controls open/visible state (controlled).",options:"Array of selectable options or option groups.",outline:"Uses outlined visual style.",overlay:"Renders content in an overlay layer or portal.",overlayClose:"Closes the overlay when the backdrop is clicked.",page:"Current page index (1-based unless documented otherwise).",pageSize:"Number of items per page.",padding:"Padding applied to the component root element.",persistent:"Prevents closing via outside click or Escape.",pc:"Responsive overrides applied from the desktop breakpoint upward.",placeholder:"Placeholder text for inputs.",placement:"Overlay placement relative to the target/anchor.",prefix:"Content rendered before the main control.",readonly:"Prevents editing while keeping focus and selection.",removable:"Shows a remove affordance for chips/items.",right:"Content or configuration for the right region.",rowKey:"Key or function used to derive unique row IDs.",rows:"Row data array for table-like components.",margin:"Margin applied to the component root element.",maxHeight:"Maximum height constraint (number interpreted as px or CSS length).",maxWidth:"Maximum width constraint (number interpreted as px or CSS length).",minHeight:"Minimum height constraint (number interpreted as px or CSS length).",minWidth:"Minimum width constraint (number interpreted as px or CSS length).",radius:"Border radius token or CSS length applied to the component.",borderRadius:"Border radius token or CSS length applied to the component.",separator:"Separator string/node between items.",shortcode:"Keyboard shortcut string, object, or array bound to the component action.",showShortcode:"Displays the configured keyboard shortcut badge when the component supports it.",showLabel:"Whether to render the label text.",size:"Size token, number, or CSS length for sizing.",slots:"Named slots map for render overrides.",sm:"Column span at small breakpoint.",span:"Column span within a grid.",speed:"Animation speed or duration in milliseconds.",square:"Use square corners instead of rounded.",src:"Image source URL.",startTop:"Starting scroll offset for parallax effects.",stateKey:"Storage key used to persist component state.",step:"Step increment for numeric controls.",sticky:"Makes the component sticky within its container.",stickyAside:"Keeps the aside region sticky during scroll.",stickyFooter:"Keeps the footer region sticky during scroll.",stickyHeader:"Keeps the header region sticky during scroll.",striped:"Applies striped row styling.",style:"Inline styles applied to the component root element.",subtitle:"Subtitle text or node.",success:"Marks the component with success state styling.",suffix:"Content rendered after the main control.",tableClass:"Additional CSS classes applied to the table element.",tablet:"Responsive overrides applied from the tablet breakpoint upward.",tabs:"Tab definitions array.",tagPage:"Query parameter name used to read/write the current page.",target:"Target element or anchor used for positioning.",text:"Text content for simple components.",thickness:"Stroke/line thickness for progress indicators.",title:"Title text or node.",to:"Navigation target/route to open on click.",topLabel:"Label displayed above the control.",trapFocus:"Keeps focus trapped inside the dialog/popover.",type:"Variant or native input type.",value:"Current value (controlled).",vertical:"Vertical orientation instead of horizontal.",warning:"Marks the component with warning state styling.",width:"Explicit width (number interpreted as px or CSS length).",wrap:"Allows children to wrap to new lines.",wrapClass:"Additional CSS classes applied to the outer wrapper.",zIndex:"z-index for overlay stacking.",shadow:"Shadow token or CSS box-shadow string applied to the component."},kl={actions:"Slot for action buttons or links.",arrow:"Slot for the tooltip/popover arrow element.",aside:"Slot for aside/secondary content.",center:"Slot for centered content within a toolbar/row.",clear:"Slot for the clear control/content.",content:"Slot for the main body content.",control:"Slot for custom control/input rendering.",default:"Primary content for the component.",drawer:"Slot for drawer content.",empty:"Slot for empty-state content.",errorMessage:"Slot for custom error message rendering.",filter:"Slot for custom filter/search UI.",footer:"Slot for footer content.",group:"Slot for grouped content container.",groupLabel:"Slot for group label content.",header:"Slot for header content.",hint:"Slot for helper/hint text.",icon:"Slot for icon content.",iconRight:"Slot for right-aligned icon content.",input:"Slot for custom input element/content.",item:"Slot for custom item rendering.",itemLabel:"Slot for item label rendering.",label:"Slot for label content.",left:"Slot for left-aligned content.",loading:"Slot for loading state content.",message:"Slot for message/alert content.",next:"Slot for the next-page control.",note:"Slot for note/secondary text.",option:"Slot for custom option rendering.",page:"Slot for page indicator/content.",prefix:"Slot for prefix content.",prev:"Slot for the previous-page control.",right:"Slot for right-aligned content.",separator:"Slot for separator rendering between items.",star:"Slot for custom star icon/content in rating.",subtitle:"Slot for subtitle content.",success:"Slot for success message/content.",suffix:"Slot for suffix content.",tab:"Slot for custom tab label/content.",target:"Slot for custom target/anchor element.",title:"Slot for title content.",topLabel:"Slot for top label content.",warning:"Slot for warning message/content."},Bs={dense:!1,disabled:!1,readonly:!1,outline:!1,clickable:!1,flat:!1,elevated:!1},It=[...JSswift.uiSizes],Us=[...JSswift.uiColors],Ws={size:["number","CSS units",...It],color:Us,padding:["number","CSS units",...It],margin:["number","CSS units",...It],width:["number","CSS units",...It],minWidth:["number","CSS units",...It],maxWidth:["number","CSS units",...It],height:["number","CSS units",...It],minHeight:["number","CSS units",...It],maxHeight:["number","CSS units",...It],iconAlign:["left","right","before","after"],align:["left","center","right"],justify:["start","center","end","space-between","space-around","space-evenly"],placement:["top","bottom","left","right","top-start","top-end","bottom-start","bottom-end"],type:Us,shadow:["none",...It],outline:["number","CSS units",...It],borderRadius:["number","CSS units",...It],radius:["number","CSS units",...It],icon:["#name_tabler","name_material","class"],iconRight:["#name_tabler","name_material","class"]},Gs={class:"style",style:"style",size:"style",color:"style",outline:"style",shadow:"style",borderRadius:"style",radius:"style",padding:"layout",margin:"layout",width:"layout",minWidth:"layout",maxWidth:"layout",height:"layout",minHeight:"layout",maxHeight:"layout",mobile:"layout",tablet:"layout",pc:"layout",dense:"layout",flat:"style",elevated:"style",clickable:"behavior",disabled:"state",readonly:"state",loading:"state",active:"state",error:"state",success:"state",warning:"state",note:"state",hint:"state",value:"data",model:"data",items:"data",options:"data",rows:"data",columns:"data",onClick:"events",onChange:"events",onInput:"events",onFocus:"events",onBlur:"events",onSubmit:"events"},Ks=t=>typeof t=="string"?t:!t||typeof t!="object"||Array.isArray(t)?"unknown":t.type||t.signature||t.value||"unknown",Fl=(t,e)=>e==="slot"?`Slot content for "${t}". Accepts nodes, arrays, or render functions.`:`Component configuration for "${t}". When not handled internally, it is forwarded to the root element.`,qs=(t,e,n)=>{var i,c;if(!t||typeof t!="object")return t;const s={};for(const[y,a]of Object.entries(t)){const l=e[y]||Fl(y,n);if(a&&typeof a=="object"&&!Array.isArray(a)){const b=Ks(a);s[y]={...a,type:b,description:a.description||l,default:Object.prototype.hasOwnProperty.call(a,"default")?a.default:(i=Bs[y])!=null?i:null,values:a.values||Ws[y]||null,category:a.category||Gs[y]||(n==="slot"?"slot":"general")}}else{const b=Ks(a);s[y]={type:b,description:l,default:(c=Bs[y])!=null?c:null,values:Ws[y]||null,category:Gs[y]||(n==="slot"?"slot":"general")}}}return s},Ys=(t,e)=>{var s;if(!e||typeof e!="object")return e;(!e.props||typeof e.props!="object"||Array.isArray(e.props))&&(e.props=e.props&&typeof e.props=="object"&&!Array.isArray(e.props)?e.props:{}),Object.prototype.hasOwnProperty.call(e.props,"children")||(e.props.children="Node|Array|Function");const n={size:e.props.size||"string|number",color:e.props.color||"string",outline:e.props.outline||"boolean",clickable:e.props.clickable||"boolean",padding:e.props.padding||"string|number",margin:e.props.margin||"string|number",width:e.props.width||"string|number",minWidth:e.props.minWidth||"string|number",maxWidth:e.props.maxWidth||"string|number",height:e.props.height||"string|number",minHeight:e.props.minHeight||"string|number",maxHeight:e.props.maxHeight||"string|number",radius:e.props.radius||"string|number",borderRadius:e.props.borderRadius||"string|number",shadow:e.props.shadow||"string|boolean",mobile:e.props.mobile||"object",tablet:e.props.tablet||"object",pc:e.props.pc||"object",class:e.props.class||"string",style:e.props.style||"object"};return e.props={...n,...e.props},e.props.icon&&!e.props.iconRight&&(e.props.iconRight=e.props.icon),e.props&&(e.props=qs(e.props,Al,"prop")),e.slots&&(e.slots=qs(e.slots,kl,"slot")),e.slots&&e.slots.icon&&!e.slots.iconRight&&(e.slots.iconRight={type:((s=e.slots.icon)==null?void 0:s.type)||"Node|Array|Function",description:"Slot for right-aligned icon content."}),e.description||(e.description=`${t} component meta definition.`),e},_l=()=>{if(je.ui._metaProxyInstalled)return;je.ui._metaProxyInstalled=!0;const t=je.ui.meta||{};for(const n of Object.keys(t))Ys(n,t[n]);const e=new Proxy(t,{set(n,s,i){return typeof s=="symbol"?(n[s]=i,!0):(n[s]=Ys(s,i),!0)}});je.ui.meta=e,v.meta=e};(zo=je.isDev)!=null&&zo.call(je)&&_l();function rn(t){if(!t)return null;if(!Array.isArray(t))return t;const e=[],n=t.slice();for(;n.length;){const s=n.shift();s&&(Array.isArray(s)?n.unshift(...s):e.push(s))}return e.length?e:null}const Xs={padding:"p",paddingTop:"p",paddingRight:"p",paddingBottom:"p",paddingLeft:"p",paddingInline:"p",paddingInlineStart:"p",paddingInlineEnd:"p",paddingBlock:"p",paddingBlockStart:"p",paddingBlockEnd:"p",margin:"m",marginTop:"m",marginRight:"m",marginBottom:"m",marginLeft:"m",marginInline:"m",marginInlineStart:"m",marginInlineEnd:"m",marginBlock:"m",marginBlockStart:"m",marginBlockEnd:"m",width:"w",minWidth:"w",maxWidth:"w",height:"h",minHeight:"h",maxHeight:"h"},Ll=t=>t===!0?"wrap":t===!1?"nowrap":String(t),Qs=t=>typeof t=="number"?`repeat(${Math.max(1,Math.round(t))}, minmax(0, 1fr))`:String(t),Zs=[{prop:"display",css:"display",var:"display"},{prop:"direction",css:"flex-direction",var:"flex-direction"},{prop:"wrap",css:"flex-wrap",var:"flex-wrap",allowFalse:!0,mapValue:Ll},{prop:"align",css:"align-items",var:"align-items"},{prop:"justify",css:"justify-content",var:"justify-content"},{prop:"self",css:"align-self",var:"align-self"},{prop:"justifySelf",css:"justify-self",var:"justify-self"},{prop:"place",css:"place-items",var:"place-items"},{prop:"placeSelf",css:"place-self",var:"place-self"},{prop:["cols","columns"],css:"grid-template-columns",var:"grid-template-columns",mapValue:Qs},{prop:"rows",css:"grid-template-rows",var:"grid-template-rows",mapValue:Qs},{prop:"flow",css:"grid-auto-flow",var:"grid-auto-flow",mapValue:t=>String(t).trim().toLowerCase().replace("-"," ")},{prop:"autoRows",css:"grid-auto-rows",var:"grid-auto-rows"},{prop:["span","gridColumn"],css:"grid-column",var:"grid-column",number:"raw"},{prop:["row","rowSpan"],css:"grid-row",var:"grid-row",number:"raw"},{prop:"area",css:"grid-area",var:"grid-area"},{prop:"gap",css:"gap",var:"gap",token:"gap"},{prop:"rowGap",css:"row-gap",var:"row-gap",token:"gap"},{prop:["columnGap","colGap"],css:"column-gap",var:"column-gap",token:"gap"},{prop:"width",css:"width",var:"width",token:"w"},{prop:"minWidth",css:"min-width",var:"min-width",token:"min-w"},{prop:"maxWidth",css:"max-width",var:"max-width",token:"max-w"},{prop:"height",css:"height",var:"height",token:"h"},{prop:"minHeight",css:"min-height",var:"min-height",token:"min-h"},{prop:"maxHeight",css:"max-height",var:"max-height",token:"max-h"},{prop:"padding",css:"padding",var:"padding",token:"p"},{prop:"paddingLeft",css:"padding-left",var:"padding-left",token:"p"},{prop:"paddingRight",css:"padding-right",var:"padding-right",token:"p"},{prop:"paddingTop",css:"padding-top",var:"padding-top",token:"p"},{prop:"paddingBottom",css:"padding-bottom",var:"padding-bottom",token:"p"},{prop:"margin",css:"margin",var:"margin",token:"m"},{prop:"marginLeft",css:"margin-left",var:"margin-left",token:"m"},{prop:"marginRight",css:"margin-right",var:"margin-right",token:"m"},{prop:"marginTop",css:"margin-top",var:"margin-top",token:"m"},{prop:"marginBottom",css:"margin-bottom",var:"margin-bottom",token:"m"},{prop:"fontSize",css:"font-size",var:"font-size",token:"f"},{prop:"fontWeight",css:"font-weight",var:"font-weight",token:"fw",number:"raw"},{prop:"lineHeight",css:"line-height",var:"line-height",token:"lh",number:"raw"},{prop:"letterSpacing",css:"letter-spacing",var:"letter-spacing",token:"ls"},{prop:["borderRadius","radius"],css:"border-radius",var:"border-radius",token:"r"},{prop:"overflow",css:"overflow",var:"overflow"},{prop:"order",css:"order",var:"order",number:"raw"}],eo=Zs.filter(t=>{const e=Array.isArray(t.prop)?t.prop:[t.prop];return e.some(n=>Object.prototype.hasOwnProperty.call(Xs,n))||e.includes("fontSize")||e.includes("fontWeight")||e.includes("lineHeight")||e.includes("letterSpacing")||e.includes("borderRadius")||e.includes("radius")});JSswift.uiResponsiveStyleRules=Zs,JSswift.uiResponsiveCommonStyleRules=eo;const Il=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),zl=(t,e,n,s)=>{e==null||e===!1||e===""||t.style.setProperty(Il(n),gs(e,s))};function Ke(t,e){e.size&&(typeof e.size=="number"?t.style.setProperty("--cms-font-size",`${e.size}px`):JSswift.uiSizes.includes(e.size)&&t.style.setProperty("--cms-font-size",`var(--cms-font-size-${e.size})`)),Object.entries(Xs).forEach(([n,s])=>{Hs(e,n)||zl(t,e[n],n,s)}),$s(t,e,eo),e.gradient&&typeof e.gradient=="number"&&t.style.setProperty("--set-gradient-deg",`${e.gradient}deg`),e.radius&&(typeof e.radius=="number"?t.style.setProperty("--set-border-radius",`${e.radius}px`):JSswift.uiSizes.includes(e.radius)?t.style.setProperty("--set-border-radius",`var(--cms-r-${e.radius})`):t.style.setProperty("--set-border-radius",`${e.radius}`))}function us(t={},...e){const n=document.createElement("option");t&&typeof t=="object"&&(t.value!=null&&(n.value=String(t.value)),t.label!=null&&(n.label=String(t.label)),t.disabled!=null&&(n.disabled=!!t.disabled),t.selected!=null&&(n.selected=!!t.selected),t.class!=null&&(n.className=String(t.class)));const s=e.flat?e.flat(1/0):e;return s.length?s.forEach(i=>{i==null||i===!1||(i instanceof Node?n.appendChild(i):n.appendChild(document.createTextNode(String(i))))}):t&&t.text!=null&&(n.textContent=String(t.text)),n}JSswift.ui.getSlot=(t,e)=>t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:null,JSswift.ui.renderSlot=(t,e,n,s)=>{const i=JSswift.ui.getSlot(t,e),y=i!=null?typeof i=="function"?i(n||{}):i:s;return y==null?null:rn(JSswift.ui.slot(y))};const E=(t,e,n,s)=>{const i=JSswift.ui.renderSlot(t,e,n,s);return i?Array.isArray(i)?i:[i]:[]},pn=new Set;let Vn=!1;const Tl=new Set(["ctrl","alt","shift","meta"]),Pl={control:"ctrl",ctl:"ctrl",option:"alt",opt:"alt",command:"meta",cmd:"meta","\u2318":"meta","\u2303":"ctrl","\u2325":"alt","\u21E7":"shift",esc:"escape",return:"enter",plus:"+",spacebar:"space",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete"},El={ctrl:"Ctrl",alt:"Alt",shift:"Shift",meta:"Meta",escape:"Esc",enter:"Enter",tab:"Tab",space:"Space",backspace:"Backspace",delete:"Del",arrowup:"Up",arrowdown:"Down",arrowleft:"Left",arrowright:"Right",pageup:"PgUp",pagedown:"PgDn"},to=()=>{if(typeof navigator=="undefined")return!1;const t=String(navigator.platform||navigator.userAgent||"");return/(mac|iphone|ipad|ipod)/i.test(t)},fs=t=>{if(t==null)return"";const e=String(t).trim().toLowerCase();return e?Pl[e]||e:""},no=t=>{if(t==null||t===!1)return null;const e=String(t).trim();if(!e)return null;const n=e.split("+").map(fs).filter(Boolean);if(!n.length)return null;const s={raw:e,key:"",ctrl:!1,alt:!1,shift:!1,meta:!1};return n.forEach(i=>{if(i==="mod"){to()?s.meta=!0:s.ctrl=!0;return}if(Tl.has(i)){s[i]=!0;return}s.key=i}),s.key?s:null},Ml=t=>t==null||t===!1?[]:(Array.isArray(t)?t:[t]).map(n=>{var i,c,y;if(n==null||n===!1)return null;if(typeof n=="object"&&!Array.isArray(n)){const a=no((y=(c=(i=n.shortcode)!=null?i:n.shortcut)!=null?c:n.keys)!=null?y:n.key);return a?{...n,...a}:null}const s=no(n);return s?{...s}:null}).filter(Boolean),so=(t={})=>{var e,n,s;return Ml((s=(n=(e=t.shortcode)!=null?e:t.shortcut)!=null?n:t.hotkey)!=null?s:t.keys)},Rl=(t={})=>t.showShortcode===!0||t.showShortcut===!0,_n=t=>{const e=fs(t);if(!e)return"";const n={...El};return to()&&(n.alt="Option",n.meta="Cmd"),n[e]?n[e]:e.length===1?e.toUpperCase():e.replace(/(^|[-_ ])(\w)/g,(s,i,c)=>`${i}${c.toUpperCase()}`)},Jl=t=>{if(!t)return"";const e=[];return t.ctrl&&e.push(_n("ctrl")),t.alt&&e.push(_n("alt")),t.shift&&e.push(_n("shift")),t.meta&&e.push(_n("meta")),e.push(_n(t.key)),e.filter(Boolean).join("+")},Ol=t=>(Array.isArray(t)?t:[]).map(Jl).filter(Boolean).join(" / "),ms=(t={},e={})=>{const n=so(t);if(!Rl(t)||!n.length||typeof document=="undefined")return null;const s=document.createElement("span");return s.className=e.className||"cms-shortcode",s.setAttribute("aria-hidden","true"),s.textContent=Ol(n),s},Dl=t=>{const e=(t==null?void 0:t.nodeType)===1?t:t==null?void 0:t.parentElement;if(!e||typeof e.closest!="function")return!1;if(e.isContentEditable)return!0;const n=e.closest("input, textarea, select, [contenteditable], [contenteditable='true'], [contenteditable='plaintext-only']");return!(!n||"disabled"in n&&n.disabled)},Hl=(t,e)=>!t||!e||!!t.ctrlKey!=!!e.ctrl||!!t.altKey!=!!e.alt||!!t.shiftKey!=!!e.shift||!!t.metaKey!=!!e.meta?!1:fs(t.key)===e.key,oo=()=>{pn.size||!Vn||typeof document=="undefined"||(document.removeEventListener("keydown",io,!0),Vn=!1)};function io(t){var s,i,c,y,a,l;if(!pn.size||!t||t.defaultPrevented||t.isComposing)return;const e=Dl(t.target),n=Array.from(pn);for(let b=n.length-1;b>=0;b-=1){const R=n[b],C=R==null?void 0:R.anchor;if(!C||!C.isConnected){pn.delete(R);continue}if(((s=R.isEnabled)==null?void 0:s.call(R))===!1)continue;const w=R.specs.find(re=>{var j,Y;const H=(Y=(j=re.allowInEditable)!=null?j:R.allowInEditable)!=null?Y:!1;return e&&!H?!1:Hl(t,re)});if(!w)continue;const T=(c=(i=w.preventDefault)!=null?i:R.preventDefault)!=null?c:!0,ee=(a=(y=w.stopPropagation)!=null?y:R.stopPropagation)!=null?a:!0;if(T&&t.preventDefault(),ee&&t.stopPropagation(),((l=R.action)==null?void 0:l.call(R,t,w,C))!==!1)break}oo()}const an=(t,e={},n={})=>{var y,a;const s=so(e);if(!t||!s.length||typeof document=="undefined")return null;const i={anchor:t,specs:s,action:typeof n.action=="function"?n.action:()=>{var l;return(l=t.click)==null?void 0:l.call(t)},isEnabled:typeof n.isEnabled=="function"?n.isEnabled:null,allowInEditable:!!n.allowInEditable,preventDefault:(y=n.preventDefault)!=null?y:!0,stopPropagation:(a=n.stopPropagation)!=null?a:!0};pn.add(i),Vn||(document.addEventListener("keydown",io,!0),Vn=!0);const c=()=>{pn.delete(i),oo()};return JSswift._registerCleanup(t,c),c},hn=(t,e={})=>{var n;if(!t||typeof t.focus!="function")return!1;try{t.focus({preventScroll:(n=e.preventScroll)!=null?n:!0})}catch(s){t.focus()}if(e.selectText&&typeof t.select=="function")try{t.select()}catch(s){}return!0},gs=(t,e="size")=>typeof t=="number"?t+"px":JSswift.uiSizes.includes(t)?`var(--cms-${e}-${t})`:t,Dt=(t,e=JSswift.uiSizes)=>n=>{const s=String(n).trim();return e!=null&&e.includes(s)?`${t}-${s}`:""},Ut=t=>e=>`${t}-${String(e).trim().toLowerCase().replace(/\s+/g,"-")}`,jl=t=>{if(t===!0)return"wrap-wrap";if(t===!1)return"wrap-nowrap";const e=String(t).trim().toLowerCase();return e==="false"||e==="no"||e==="none"?"wrap-nowrap":e==="reverse"?"wrap-reverse":`wrap-${e}`},ps=(t,e,n)=>t?e:n,Vl=t=>{const e=o(t);if(e==null||e==="")return"";if(e==="auto")return"col-auto";if(e===!0)return"col-24";const n=Number(e);if(Number.isFinite(n)&&n>0)return`col-${Math.max(1,Math.min(24,Math.round(n)))}`;if(typeof e=="string"){const s=e.trim();if(/^\d+$/.test(s))return`col-${Math.max(1,Math.min(24,Number(s)))}`}return""},$l=t=>{const e=Number(t);return Number.isFinite(e)&&e>0?`grid-cols-${Math.max(1,Math.min(24,Math.round(e)))}`:""},Ue=(t,e)=>{const n=Array.isArray(e)?e:[e];return JSswift.uiResponsiveDevices.some(s=>{const i=JSswift.uiResponsivePropsFor(t,s);return!!i&&n.some(c=>Object.prototype.hasOwnProperty.call(i,c))})},bn=t=>JSswift.uiResponsiveDevices.find(e=>e.key===t),cn=[{prop:"gap",class:"gap",map:Dt("gap")},{prop:"rowGap",class:"gap-y",map:Dt("gap-y")},{prop:["columnGap","colGap"],class:"gap-x",map:Dt("gap-x")},{prop:"direction",class:"dir",map:Ut("dir")},{prop:"wrap",class:"wrap",allowFalse:!0,map:jl},{prop:"align",class:"align",map:Ut("align")},{prop:"justify",class:"justify",map:Ut("justify")},{prop:"width",class:"w",map:Dt("w")},{prop:"minWidth",class:"min-w",map:Dt("min-w")},{prop:"maxWidth",class:"max-w",map:Dt("max-w")},{prop:"height",class:"h",map:Dt("h")},{prop:"minHeight",class:"min-h",map:Dt("min-h")},{prop:"maxHeight",class:"max-h",map:Dt("max-h")},{prop:"padding",class:"p",map:Dt("p")},{prop:"margin",class:"m",map:Dt("m")}],Bl=cn.filter(t=>{const e=Array.isArray(t.prop)?t.prop:[t.prop];return!e.includes("align")&&!e.includes("justify")}),lo=[{prop:["col","span"],class:"col",map:Vl},{prop:"auto",class:"col",map:t=>t?"col-auto":""},{prop:"inline",class:"display",allowFalse:!0,map:t=>ps(t,"display-inline-flex","display-flex")},{prop:"self",class:"self",map:Ut("self")},...cn],ro=[{prop:["cols","columns"],class:"grid-cols",map:$l},{prop:"inline",class:"display",allowFalse:!0,map:t=>ps(t,"display-inline-grid","display-grid")},{prop:"flow",class:"grid-flow",map:t=>`grid-flow-${String(t).trim().toLowerCase().replace(/\s+/g,"-")}`},...cn],ao=[{prop:"inline",class:"display",allowFalse:!0,map:t=>ps(t,"display-inline-flex","display-flex")},{prop:"direction",class:"dir",map:Ut("dir")},{prop:"contentAlign",class:"align",map:Ut("align")},{prop:"contentJustify",class:"justify",map:Ut("justify")},{prop:"align",class:"self",map:Ut("self")},{prop:"justify",class:"justify-self",map:Ut("justify-self")},{prop:"place",class:"place-self",map:Ut("place-self")},...Bl],Ul=(JSswift.uiResponsiveStyleRules||[]).filter(t=>{const e=Array.isArray(t.prop)?t.prop:[t.prop];return!e.includes("span")&&!e.includes("gridColumn")});v.Row=(...t)=>{var f,m,g,O,Q;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=(r,x,p={})=>{const P=Array.isArray(r)?r:[r];for(const U of P)if(JSswift.ui.getSlot(s,U)!=null)return E(s,U,p,x);return x==null?[]:E(null,"default",p,x)},c=r=>{var x;return r==null||r===!1||r===""?"":typeof r=="number"?`${r}px`:typeof r=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(r))?`var(--cms-s-${r})`:String(r)},y=r=>{var x;return r==null||r===!1||r===""?"":typeof r=="number"?`${r}px`:typeof r=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(r))?`var(--cms-w-${r})`:String(r)},a=JSswift.omit(e,["slots","start","left","startClass","body","center","bodyClass","centerClass","end","right","endClass","align","justify","wrap","gap","rowGap","columnGap","direction","reverse","inline","full","width","minWidth","maxWidth",...JSswift.uiResponsiveOmitProps]);a.class=ae(["cms-row",JSswift.uiResponsiveClasses({mobile:e},cn),JSswift.uiResponsiveClasses(e,cn),e.class]);const l={...e.style||{}},b=Ye([e.direction,e.reverse],()=>{const r=o(e.direction);return r!=null&&r!==""?String(r):o(e.reverse)?"row-reverse":""}),R=Ie(e.align),C=Ie(e.justify),w=Ie(e.wrap,r=>typeof r=="boolean"?r?"wrap":"nowrap":String(r)),T=Ie(e.gap,c),ee=Ie(e.rowGap,c),K=Ie(e.columnGap,c),re=Ie(e.inline,r=>r?"inline-flex":"flex"),H=Ie(e.width,y),j=Ie(e.minWidth,y),Y=Ie(e.maxWidth,y),W=Ie(e.full,r=>r?"100%":"",""),ie=Ye([e.inline,e.full,e.width],()=>{const r=!!o(e.inline),x=!!o(e.full),p=o(e.width)!=null&&o(e.width)!==!1&&o(e.width)!=="";return!r||x||p?"":"max-content"});b!=null&&!Ue(e,"direction")&&(l.flexDirection=b),R!=null&&!Ue(e,"align")&&(l.alignItems=R),C!=null&&!Ue(e,"justify")&&(l.justifyContent=C),w!=null&&!Ue(e,"wrap")&&(l.flexWrap=w),T!=null&&!Ue(e,"gap")&&(l.gap=T),ee!=null&&!Ue(e,"rowGap")&&(l.rowGap=ee),K!=null&&!Ue(e,"columnGap")&&(l.columnGap=K),re!=null&&(l.display=re),ie!=null&&(l.width=ie),H!=null&&!Ue(e,"width")&&(l.width=H),j!=null&&!Ue(e,"minWidth")&&(l.minWidth=j),Y!=null&&!Ue(e,"maxWidth")&&(l.maxWidth=Y),W!=null&&(l.width=W),Object.keys(l).length&&(a.style=l),JSswift.uiApplyResponsiveProps(a,e,JSswift.uiResponsiveStyleRules);const ge={props:e},ce=i(["start","left"],(f=e.start)!=null?f:e.left,ge),le=i(["body","center","default"],(g=(m=e.body)!=null?m:e.center)!=null?g:n,ge),oe=i(["end","right"],(O=e.end)!=null?O:e.right,ge);if(!(ce.length||oe.length||e.body!=null||e.center!=null||e.startClass||e.bodyClass||e.centerClass||e.endClass||JSswift.ui.getSlot(s,"start")!=null||JSswift.ui.getSlot(s,"left")!=null||JSswift.ui.getSlot(s,"body")!=null||JSswift.ui.getSlot(s,"center")!=null||JSswift.ui.getSlot(s,"end")!=null||JSswift.ui.getSlot(s,"right")!=null)){const r=E(s,"default",ge,n),x=_.div(a,...r);return Ke(x,e),x}const J={display:"flex",alignItems:"inherit",gap:"inherit",flexWrap:"inherit",minWidth:0},Z=(Q=e.bodyClass)!=null?Q:e.centerClass,X=Ye([e.direction,e.reverse],()=>(o(e.direction)||(o(e.reverse)?"row-reverse":"row"))==="row"?"auto":""),ue=[ce.length?_.div({class:ae(["cms-row-start",e.startClass]),style:{...J}},...ce):null,le.length?_.div({class:ae(["cms-row-body",Z]),style:{...J,flex:"1 1 auto"}},...le):null,oe.length?_.div({class:ae(["cms-row-end",e.endClass]),style:{...J,justifyContent:"flex-end",marginInlineStart:X}},...oe):null].filter(Boolean),F=_.div(a,...ue);return Ke(F,e),F},(To=JSswift.isDev)!=null&&To.call(JSswift)&&(v.meta=v.meta||{},v.meta.Row={signature:"UI.Row(...children) | UI.Row(props, ...children)",props:{start:"Node|Function|Array",left:"Alias of start",body:"Node|Function|Array",center:"Alias of body",end:"Node|Function|Array",right:"Alias of end",align:"stretch|flex-start|center|flex-end|baseline",justify:"flex-start|center|flex-end|space-between|space-around|space-evenly",wrap:"boolean|string",direction:"row|row-reverse|column|column-reverse",reverse:"boolean",gap:"string|number",rowGap:"string|number",columnGap:"string|number",inline:"boolean",full:"boolean",width:"string|number",minWidth:"string|number",maxWidth:"string|number",mobile:"{ gap?, direction?, wrap?, align?, justify?, width?, minWidth?, maxWidth? }",tablet:"{ gap?, direction?, wrap?, align?, justify?, width?, minWidth?, maxWidth? }",pc:"{ gap?, direction?, wrap?, align?, justify?, width?, minWidth?, maxWidth? }",startClass:"string",bodyClass:"string",centerClass:"Alias of bodyClass",endClass:"string",slots:"{ start?, left?, body?, center?, end?, right?, default? }",class:"string",style:"object"},slots:{start:"Leading content area",left:"Alias of start",body:"Main content area",center:"Alias of body",end:"Trailing content area",right:"Alias of end",default:"Fallback content / children"},returns:"HTMLDivElement",description:"Wrapper flex in riga con children, slot strutturati e props di layout per gap, allineamento, wrap e direction."});function _t(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="function"&&typeof t[1]=="function"}function Pt(t){return!!t&&t.type==="rod"}function rt(t){return typeof t=="function"||Pt(t)||_t(t)}function o(t){return typeof t=="function"?t():Pt(t)?t.value:_t(t)?t[0]():t}function Wl(t){const e=Array.isArray(t)?[...t]:[t];for(;e.length;){const n=e.pop();if(rt(n))return!0;Array.isArray(n)&&e.push(...n)}return!1}function ae(t){const e=Wl(t),n=()=>{const s=[],i=Array.isArray(t)?[...t]:[t];for(;i.length;){const c=i.shift();if(c==null||c===!1)continue;const y=o(c);if(!(y==null||y===!1||y==="")){if(Array.isArray(y)){i.unshift(...y);continue}s.push(y)}}return s.join(" ")};return e?n:n()}function Ht(t){const e=ae(t);return typeof e=="function"?e():e}function me(t,e,n=""){return rt(t)?()=>o(t)?e:n:t?e:n}function co(t,e,n=""){return rt(t)?()=>{const s=o(t);return s==null||s===""?"":`${e}${s}${n}`}:t==null||t===""?"":`${e}${t}${n}`}function Ye(t,e){return(Array.isArray(t)?t:[t]).some(rt)?()=>e():e()}function Ie(t,e,n=""){return rt(t)?()=>{const s=o(t);return s==null||s===!1?n:e?e(s):s}:t==null||t===!1?null:e?e(t):t}JSswift.uiIsReactive=rt,JSswift.uiUnwrap=o,JSswift.uiClass=ae,JSswift.uiClassStatic=Ht,JSswift.uiWhen=me,JSswift.uiClassValue=co,JSswift.uiComputed=Ye,JSswift.uiStyleValue=Ie,v.Col=(...t)=>{var P,U,G,de,A,u;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=k=>Object.prototype.hasOwnProperty.call(e,k),c=(k,I,B={})=>{const pe=Array.isArray(k)?k:[k];for(const Se of pe)if(JSswift.ui.getSlot(s,Se)!=null)return E(s,Se,B,I);return I==null?[]:E(null,"default",B,I)},y=k=>{var I;return k==null||k===!1||k===""?"":typeof k=="number"?`${k}px`:typeof k=="string"&&((I=JSswift.uiSizes)!=null&&I.includes(k))?`var(--cms-s-${k})`:String(k)},a=k=>{var I;return k==null||k===!1||k===""?"":typeof k=="string"&&((I=JSswift.uiSizes)!=null&&I.includes(k))?gs(k,"size"):$e(k)},l=(k,I)=>{const B=o(k);if(B==null||B===!1||B==="")return"";if(B==="auto")return I==="cms-col-"?"cms-col-auto":"";if(B===!0)return`${I}24`;const pe=Number(B);if(Number.isFinite(pe)&&pe>0)return`${I}${Math.max(1,Math.min(24,Math.round(pe)))}`;if(typeof B=="string"){const Se=B.trim();if(!Se)return"";if(Se.startsWith(I))return Se;if(/^\d+$/.test(Se))return`${I}${Math.max(1,Math.min(24,Number(Se)))}`}return""},b=()=>{const k=o(e.flex);if(k!=null&&k!==!1&&k!=="")return String(k);if(o(e.fill))return"1 1 auto";const I=i("grow"),B=i("shrink"),pe=i("basis");if(!I&&!B&&!pe)return"";const Se=I?o(e.grow):0,ye=B?o(e.shrink):1,V=pe?a(o(e.basis)):"auto";return`${Se} ${ye} ${V||"auto"}`},R=Ye([e.auto,e.col,e.span],()=>{if(o(e.auto))return"cms-col-auto";const k=i("span")?e.span:e.col;return l(k,"cms-col-")||"cms-col"}),C=JSswift.omit(e,["slots","col","span","sm","md","lg","auto","size","width","minWidth","maxWidth","height","minHeight","maxHeight","gap","rowGap","columnGap","align","justify","inline","center","stack","flex","fill","grow","shrink","basis","self","order","scroll","start","top","header","before","startClass","topClass","headerClass","body","content","bodyClass","contentClass","end","bottom","footer","after","endClass","bottomClass","footerClass",...JSswift.uiResponsiveOmitProps]),w={...e.style||{}};!Ue(e,"minWidth")&&w.minWidth==null&&(w.minWidth=0);const T=Ie(e.gap,y),ee=Ie(e.rowGap,y),K=Ie(e.columnGap,y),re=Ie(e.align),H=Ie(e.justify),j=i("width")?e.width:e.size,Y=Ie(j,a),W=Ie(e.minWidth,a),ie=Ie(e.maxWidth,a),ge=Ie(e.height,a),ce=Ie(e.minHeight,a),le=Ie(e.maxHeight,a),oe=Ie(e.self),ne=Ie(e.order,k=>String(k)),J=Ie(e.scroll,k=>k?"auto":"",""),Z=Ye([e.flex,e.fill,e.grow,e.shrink,e.basis],b),X=Ye([e.center,e.align,e.justify],()=>!!o(e.center)&&(o(e.align)==null||o(e.align)==="")&&(o(e.justify)==null||o(e.justify)===""));Z!=null&&Z!==""&&(w.flex=Z),oe!=null&&!Ue(e,"self")&&(w.alignSelf=oe),ne!=null&&(w.order=ne),J!=null&&J!==""&&(w.overflow=J),Y!=null&&Y!==""&&!Ue(e,["width","size"])&&(w.width=Y,!i("flex")&&!i("fill")&&!i("grow")&&!i("shrink")&&!i("basis")&&(w.flex="0 0 auto")),W!=null&&!Ue(e,"minWidth")&&(w.minWidth=W),ie!=null&&!Ue(e,"maxWidth")&&(w.maxWidth=ie),ge!=null&&!Ue(e,"height")&&(w.height=ge),ce!=null&&!Ue(e,"minHeight")&&(w.minHeight=ce),le!=null&&!Ue(e,"maxHeight")&&(w.maxHeight=le),Object.keys(w).length&&(C.style=w);const ue={props:e},F=c(["start","top","header","before"],(G=(U=(P=e.start)!=null?P:e.top)!=null?U:e.header)!=null?G:e.before,ue),f=i("body")?e.body:i("content")?e.content:n,m=c(["body","content","default"],f,ue),g=c(["end","bottom","footer","after"],(u=(A=(de=e.end)!=null?de:e.bottom)!=null?A:e.footer)!=null?u:e.after,ue),O=F.length||g.length||i("start")||i("top")||i("header")||i("before")||i("body")||i("content")||i("end")||i("bottom")||i("footer")||i("after")||e.startClass||e.bodyClass||e.contentClass||e.endClass||e.topClass||e.headerClass||e.bottomClass||e.footerClass||JSswift.ui.getSlot(s,"start")!=null||JSswift.ui.getSlot(s,"top")!=null||JSswift.ui.getSlot(s,"header")!=null||JSswift.ui.getSlot(s,"before")!=null||JSswift.ui.getSlot(s,"body")!=null||JSswift.ui.getSlot(s,"content")!=null||JSswift.ui.getSlot(s,"end")!=null||JSswift.ui.getSlot(s,"bottom")!=null||JSswift.ui.getSlot(s,"footer")!=null||JSswift.ui.getSlot(s,"after")!=null,Q=Ye([e.stack,e.gap,e.rowGap,e.columnGap,e.align,e.justify,e.center],()=>o(e.stack)||O||[o(e.gap),o(e.rowGap),o(e.columnGap),o(e.align),o(e.justify)].some(I=>I!=null&&I!==!1&&I!=="")?!0:!!o(e.center));if(C.class=ae(["cms-col",R,Ye(e.sm,()=>l(e.sm,"cms-sm-col-")),Ye(e.md,()=>l(e.md,"cms-md-col-")),Ye(e.lg,()=>l(e.lg,"cms-lg-col-")),JSswift.uiResponsiveClasses({mobile:e},lo),JSswift.uiResponsiveClasses(e,lo),me(Q,"cms-col-flex"),me(e.inline,"cms-col-inline"),e.class]),T!=null&&!Ue(e,"gap")&&(w.gap=T),ee!=null&&!Ue(e,"rowGap")&&(w.rowGap=ee),K!=null&&!Ue(e,"columnGap")&&(w.columnGap=K),re!=null&&!Ue(e,"align")?w.alignItems=re:X!=null&&X!==""&&(w.alignItems=X?"center":""),H!=null&&!Ue(e,"justify")?w.justifyContent=H:X!=null&&X!==""&&(w.justifyContent=X?"center":""),Object.keys(w).length&&(C.style=w),JSswift.uiApplyResponsiveProps(C,e,JSswift.uiResponsiveStyleRules),!O){const k=_.div(C,...E(s,"default",ue,n));return Ke(k,e),k}const r={display:"flex",flexDirection:"column",gap:"inherit",minWidth:0},x=[F.length?_.div({class:ae(["cms-col-start",e.startClass,e.topClass,e.headerClass]),style:{...r}},...F):null,m.length?_.div({class:ae(["cms-col-body",e.bodyClass,e.contentClass]),style:{...r,flex:"1 1 auto"}},...m):null,g.length?_.div({class:ae(["cms-col-end",e.endClass,e.bottomClass,e.footerClass]),style:{...r}},...g):null].filter(Boolean),p=_.div(C,...x);return Ke(p,e),p},(Po=JSswift.isDev)!=null&&Po.call(JSswift)&&(v.meta=v.meta||{},v.meta.Col={signature:"UI.Col(...children) | UI.Col(props, ...children)",props:{col:"number|string",span:"Alias of col",sm:"number|string",md:"number|string",lg:"number|string",auto:"boolean",gap:"number|string",rowGap:"number|string",columnGap:"number|string",align:"string",justify:"string",inline:"boolean",stack:"boolean",center:"boolean",width:"number|string",size:"Alias of width",minWidth:"number|string",maxWidth:"number|string",height:"number|string",minHeight:"number|string",maxHeight:"number|string",flex:"string",fill:"boolean",grow:"number",shrink:"number",basis:"number|string",self:"string",order:"number|string",scroll:"boolean",mobile:"{ col?, span?, gap?, direction?, align?, justify?, width?, height? }",tablet:"{ col?, span?, gap?, direction?, align?, justify?, width?, height? }",pc:"{ col?, span?, gap?, direction?, align?, justify?, width?, height? }",start:"Node|Function|Array",top:"Alias of start",header:"Alias of start",body:"Node|Function|Array",content:"Alias of body",end:"Node|Function|Array",bottom:"Alias of end",footer:"Alias of end",startClass:"string",bodyClass:"string",endClass:"string",slots:"{ start?, top?, header?, body?, content?, end?, bottom?, footer?, default? }",class:"string",style:"object"},slots:{start:"Column leading area",top:"Alias of start",header:"Alias of start",body:"Column main area",content:"Alias of body",end:"Column trailing area",bottom:"Alias of end",footer:"Alias of end",default:"Column fallback content"},returns:"HTMLDivElement",description:"Responsive 24-column wrapper. By default it behaves like a regular container and enables vertical flex layout when using gap/alignment, structured regions, or `stack`."}),v.Spacer=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=JSswift.omit(e,["slots"]);i.class=ae(["cms-spacer",e.class]);const c=E(s,"default",{},n);return _.div(i,...c)},(Eo=JSswift.isDev)!=null&&Eo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Spacer={signature:"UI.Spacer() | UI.Spacer(props)",props:{slots:"{ default?: Slot }",class:"string",style:"object"},slots:{default:"Optional spacer content"},returns:"HTMLDivElement",description:"Flex spacer."}),v.Container=(...t)=>{var g,O,Q,r;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i={...e},c=x=>Object.prototype.hasOwnProperty.call(e,x),y={xxs:"360px",xs:"480px",sm:"640px",md:"820px",lg:"1100px",xl:"1280px",xxl:"1440px",narrow:"760px",prose:"760px",wide:"1360px"},a=x=>{if(x==null||x===!1||x==="")return"";if(typeof x=="number")return`${x}px`;const p=String(x).trim().toLowerCase();return p?p==="full"||p==="fluid"?"100%":y[p]||String(x):""},l=x=>{var p;return x==null||x===!1||x===""?"":typeof x=="number"?`${x}px`:typeof x=="string"&&((p=JSswift.uiSizes)!=null&&p.includes(x))?`var(--cms-s-${x})`:String(x)},b=x=>{if(x==null||x===!1||x==="")return"";if(typeof x=="number"&&Number.isFinite(x))return`repeat(${Math.max(1,Math.floor(x))}, minmax(0, 1fr))`;const p=String(x).trim();return p?/^\d+$/.test(p)?`repeat(${Math.max(1,Number(p))}, minmax(0, 1fr))`:p:""},R=x=>x==null||x===""?"":x===!0?"wrap":x===!1?"nowrap":String(x),C={props:e},w=(x,p)=>{if(!(p==null||p===!1)){if(Array.isArray(p)){p.forEach(P=>w(x,P));return}if(p!=null&&p.nodeType){x.appendChild(p);return}x.appendChild(document.createTextNode(String(p)))}},T=(x,p)=>{const P=JSswift.ui.getSlot(s,x);if(P!=null)return E(s,x,C,null);if(typeof p=="function"){const U=_.div({class:`cms-container-slot-${x}`});return JSswift.reactive.effect(()=>{const G=rn(JSswift.ui.slot(p(C)));U.replaceChildren(),Array.isArray(G)?G.forEach(de=>w(U,de)):w(U,G)},`UI.Container:${x}`),[U]}return E(s,x,C,p)},ee=c("content")?e.content:n!=null&&n.length?n:null,K=T("before",(g=e.before)!=null?g:e.top),re=T("header",e.header),H=[...T("left",e.left),...T("start",e.start)],j=T("body",c("body")?e.body:null),Y=(()=>{const x=T("content",c("content")?e.content:null);return x.length?x:T("default",ee)})(),W=[...T("right",e.right),...T("end",e.end)],ie=T("footer",e.footer),ge=T("after",(O=e.after)!=null?O:e.bottom),ce=K.length||re.length||H.length||W.length||ie.length||ge.length||JSswift.ui.getSlot(s,"before")!=null||JSswift.ui.getSlot(s,"header")!=null||JSswift.ui.getSlot(s,"left")!=null||JSswift.ui.getSlot(s,"start")!=null||JSswift.ui.getSlot(s,"right")!=null||JSswift.ui.getSlot(s,"end")!=null||JSswift.ui.getSlot(s,"footer")!=null||JSswift.ui.getSlot(s,"after")!=null,le=!!ce||j.length>0&&(JSswift.ui.getSlot(s,"body")!=null||ce),oe=()=>{var p;const x=String(o((p=e.layout)!=null?p:e.display)||"").trim().toLowerCase();return["flex","grid","stack"].includes(x)?x:["inline","inline-flex","inlineflex"].includes(x)||o(e.inline)?"inline":o(e.grid)||o(e.cols)!=null?"grid":x==="block"?"block":o(e.direction)!=null||o(e.wrap)!=null||o(e.align)!=null||o(e.justify)!=null||o(e.gap)!=null||H.length||W.length?"flex":"block"},ne=Ye([e.layout,e.display,e.inline,e.grid,e.cols,e.direction,e.wrap,e.align,e.justify,e.gap],()=>{const x=oe();return x==="block"?"":`is-${x}`}),J={...i.style||{}},Z=(x,p)=>{p!=null&&(J[x]=p)};Z("maxWidth",Ye([e.maxWidth,e.fluid],()=>o(e.fluid)?"none":a(o(e.maxWidth))||"")),Z("width",Ie(e.width,a)),Z("minWidth",Ie(e.minWidth,a)),Z("--cms-container-padding",Ie(e.padding,l)),Z("--cms-container-padding-x",Ie((Q=e.paddingX)!=null?Q:e.gutter,l)),Z("--cms-container-padding-y",Ie(e.paddingY,l)),Z("--cms-container-gap",Ie(e.gap,l)),Z("--cms-container-section-gap",Ie((r=e.sectionGap)!=null?r:e.gap,l)),Z("--cms-container-cols",Ie(e.cols,b)),Z("--cms-container-align",Ie(e.align,x=>String(x))),Z("--cms-container-justify",Ie(e.justify,x=>String(x))),Z("--cms-container-direction",Ie(e.direction,x=>String(x))),Z("--cms-container-wrap",Ie(e.wrap,R));const X=JSswift.omit(i,["after","afterClass","align","as","before","beforeClass","body","bodyClass","bottom","cols","content","contentClass","direction","display","end","endClass","fluid","footer","footerClass","gap","grid","gutter","header","headerClass","inline","justify","layout","left","mainClass","maxWidth","minWidth","padding","paddingX","paddingY","right","sectionGap","slots","start","startClass","tag","top","width","wrap"]);X.class=ae(["cms-container",me(e.fluid,"is-fluid"),me(le,"has-structure"),le?"":ne,i.class]),X.style=J,JSswift.uiApplyResponsiveProps(X,e,JSswift.uiResponsiveStyleRules);const ue=(x,p,P)=>p.length?_.div({class:ae(["cms-container-section",`cms-container-${x}`,P])},...p):null,F=j.length?_.div({class:ae(["cms-container-body",le?ne:"",e.bodyClass])},...j):H.length||Y.length||W.length?_.div({class:ae(["cms-container-body",le?ne:"",e.bodyClass])},ue("start",H,e.startClass),Y.length?_.div({class:ae(["cms-container-main",e.mainClass,e.contentClass])},...Y):null,ue("end",W,e.endClass)):null,f=(()=>{var p;const x=String(o((p=e.tag)!=null?p:e.as)||"div").toLowerCase();return typeof _[x]=="function"?_[x]:_.div})(),m=le?f(X,ue("before",K,e.beforeClass),ue("header",re,e.headerClass),F,ue("footer",ie,e.footerClass),ue("after",ge,e.afterClass)):f(X,...j.length?j:Y);return Ke(m,e),m},(Mo=JSswift.isDev)!=null&&Mo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Container={signature:"UI.Container(...children) | UI.Container(props, ...children)",props:{tag:"string",fluid:"boolean",maxWidth:"number|string",minWidth:"number|string",width:"number|string",padding:"number|string",paddingX:"number|string",paddingY:"number|string",gap:"number|string",sectionGap:"number|string",layout:'"block|flex|grid|stack|inline"',direction:'"row|column"',wrap:"boolean|string",align:"string",justify:"string",cols:"number|string",before:"String|Node|Function|Array",header:"String|Node|Function|Array",start:"String|Node|Function|Array",body:"String|Node|Function|Array",content:"String|Node|Function|Array",end:"String|Node|Function|Array",footer:"String|Node|Function|Array",after:"String|Node|Function|Array",slots:"{ before?, header?, left?, start?, body?, content?, default?, right?, end?, footer?, after? }",class:"string",style:"object"},slots:{before:"Top content before the main container body",header:"Structured header area",left:"Alias for start",start:"Leading area inside the main body",body:"Custom body renderer overriding start/content/end wrappers",content:"Explicit main content",default:"Fallback content from children",right:"Alias for end",end:"Trailing area inside the main body",footer:"Structured footer area",after:"Bottom content after the main container body"},returns:"HTMLDivElement",description:"Composable container with max-width, spacing, layout props, and optional sections."}),v.Card=(...t)=>{var de,A;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i={...e};Yt(i);const c=(u,k)=>{var I;return!!(u&&u.nodeType===1&&((I=u.classList)!=null&&I.contains(`cms-card-${k}`)))},a=(u=>u==null?null:typeof u=="string"?v.Icon({name:u,size:e.iconSize||e.size||"lg"}):JSswift.ui.slot(u,{as:"icon"}))(e.icon),l=e.image?_.img({src:e.image,alt:e.imageAlt||"",class:ae(["cms-card-cover-media",e.imageClass]),style:e.imageStyle}):e.cover,b={dense:!!o(e.dense),flat:!!o(e.flat),clickable:!!o(e.clickable),to:o(e.to)||null},R=E(s,"default",b,n!=null&&n.length?n:[]),C={identifier:[],cover:[],media:[],header:[],body:[],footer:[],actions:[]},w=[];R.forEach(u=>{c(u,"identifier")?C.identifier.push(u):c(u,"cover")?C.cover.push(u):c(u,"media")?C.media.push(u):c(u,"header")?C.header.push(u):c(u,"body")?C.body.push(u):c(u,"footer")?C.footer.push(u):c(u,"actions")?C.actions.push(u):w.push(u)});const T=E(s,"identifier",b,e.identifier),ee=E(s,"cover",b,l),K=E(s,"media",b,e.media),re=E(s,"eyebrow",b,(de=e.eyebrow)!=null?de:e.kicker),H=E(s,"title",b,e.title),j=E(s,"subtitle",b,e.subtitle),Y=E(s,"header",b,e.header),W=E(s,"icon",b,a),ie=E(s,"aside",b,(A=e.aside)!=null?A:e.headerAside),ge=E(s,"body",b,e.body),ce=E(s,"footer",b,e.footer),le=E(s,"actions",b,e.actions),oe=T.length?_.div({class:ae(["cms-card-identifier",e.identifierClass])},...T):null,ne=ee.length?_.div({class:ae(["cms-card-cover",e.coverClass])},...ee):null,J=K.length?_.div({class:ae(["cms-card-media",e.mediaClass])},...K):null,X=W.length||re.length||H.length||j.length||Y.length||ie.length?_.div({class:ae(["cms-card-header",e.headerClass])},_.div({class:"cms-card-head"},W.length?_.div({class:"cms-card-icon"},...W):null,_.div({class:"cms-card-head-main"},re.length?_.div({class:ae(["cms-card-eyebrow",e.eyebrowClass])},...re):null,H.length?_.div({class:ae(["cms-card-title",e.titleClass])},...H):null,j.length?_.div({class:ae(["cms-card-subtitle",e.subtitleClass])},...j):null,Y.length?_.div({class:ae(["cms-card-header-content",e.headerContentClass])},...Y):null),ie.length?_.div({class:ae(["cms-card-aside",e.asideClass])},...ie):null)):null,ue=[...ge,...w],F=ue.length?_.div({class:ae(["cms-card-body",e.bodyClass])},...ue):null,f=[...le,...C.actions],m=ce.length||f.length?_.div({class:ae(["cms-card-footer",e.footerClass])},...ce,f.length?_.div({class:"cms-card-actions"},...f):null):null,g=Ye([e.clickable,e.to],()=>o(e.clickable)||o(e.to)?"cms-card-clickable":""),O=T.length||C.identifier.length,Q=ee.length||C.cover.length||K.length||C.media.length,r=JSswift.omit(i,["actions","aside","asideClass","body","bodyClass","clickable","cover","coverClass","coverHeight","dense","eyebrow","eyebrowClass","flat","footer","footerClass","header","headerAside","headerClass","headerContentClass","icon","iconSize","identifier","identifierClass","image","imageAlt","imageClass","imageStyle","kicker","media","mediaClass","slots","subtitle","subtitleClass","title","titleClass","to","display","direction","wrap","align","justify","gap","rowGap","columnGap","cols","columns"]);r.class=ae(["cms-panel","cms-card","cms-clear-set","cms-singularity",me(e.flat,"cms-card-flat"),me(e.dense,"cms-card-dense"),me(O,"cms-card-has-identifier"),me(Q,"cms-card-has-top-visual"),g,i.class]),r.style={...i.style||{}},e.coverHeight!=null&&(r.style["--cms-card-cover-height"]=$e(o(e.coverHeight))),JSswift.uiApplyResponsiveProps(r,e,JSswift.uiResponsiveStyleRules);const x=e.onClick,p=e.onKeydown,P=u=>{var I;if(x==null||x(u),u.defaultPrevented)return;const k=o(e.to);k&&((I=JSswift.router)!=null&&I.navigate)&&(u.preventDefault(),JSswift.router.navigate(k))},U=u=>{p==null||p(u),!u.defaultPrevented&&(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),P(u))};(o(e.clickable)||o(e.to))&&(r.onClick=P,r.onKeydown=U,r.tabIndex==null&&(r.tabIndex=0),r.role==null&&(r.role="button"));const G=_.div(r,oe,...C.identifier,ne,...C.cover,J,...C.media,X,...C.header,F,...C.body,m,...C.footer);return Ke(G,e),G},(Ro=JSswift.isDev)!=null&&Ro.call(JSswift)&&(v.meta=v.meta||{},v.meta.Card={signature:"UI.Card(...children) | UI.Card(props, ...children)",description:"Sectioned card with structured header, cover/media, body, and footer/actions.",props:{title:"String|Node|Function|Array",subtitle:"String|Node|Function|Array",eyebrow:"String|Node|Function|Array",header:"String|Node|Function|Array",body:"String|Node|Function|Array",footer:"String|Node|Function|Array",actions:"Node|Function|Array",icon:"String|Node|Function|Array",aside:"Node|Function|Array",identifier:"String|Node|Function|Array",media:"Node|Function|Array",cover:"Node|Function|Array",image:"string",imageAlt:"string",coverHeight:"string|number",clickable:"boolean",to:"string",dense:"boolean",flat:"boolean",display:"string",direction:"row|column|string",gap:"string|number",cols:"number|string",mobile:"{ display?, direction?, gap?, cols? }",tablet:"{ display?, direction?, gap?, cols? }",pc:"{ display?, direction?, gap?, cols? }",headerClass:"string",bodyClass:"string",footerClass:"string",slots:"{ identifier?, cover?, media?, icon?, eyebrow?, title?, subtitle?, header?, aside?, body?, footer?, actions?, default? }",class:"string",style:"object"},slots:{identifier:"Badge/top identifier content",cover:"Top visual/cover content",media:"Media section above header/body",icon:"Header icon content",eyebrow:"Eyebrow/kicker content",title:"Card title content",subtitle:"Card subtitle content",header:"Header support content",aside:"Right side header content",body:"Body content",footer:"Footer content",actions:"Footer actions slot",default:"Fallback body content or raw card sections"},returns:"HTMLDivElement"}),v.Btn=(...t)=>{var ne;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=Ye([e.color,e.state],()=>{const J=o(e.color)||o(e.state)||"";return["primary","secondary","warning","danger","success","info","light","dark"].includes(J)?J:o(e.state)||""}),c=ae(["cms-clear-set","cms-btn","cms-singularity","cms-clickable",i,me(e.outline,"outline"),e.class]),y=JSswift.omit(e,["icon","iconRight","label","loading","loadingText","disabled","outline","iconAlign","slots","shortcode","shortcut","hotkey","showShortcode","showShortcut"]);y.class=c;const a=()=>!!o(e.loading),l=()=>!!o(e.disabled)||a(),b=e.icon!=null?typeof e.icon=="string"?v.Icon({name:e.icon}):e.icon:null,R=e.iconRight!=null?typeof e.iconRight=="string"?v.Icon({name:e.iconRight}):e.iconRight:null,C=JSswift.ui.renderSlot(s,"icon",{},b),w=JSswift.ui.renderSlot(s,"iconRight",{},R),T=JSswift.ui.renderSlot(s,"label",{},e.label),ee=E(s,"default",{},n),K=[],re=J=>{J&&(Array.isArray(J)?K.push(...J):K.push(J))},H=e.iconAlign;(H==="after"||H==="right")&&!R?(re(T),ee.length&&K.push(...ee),re(C)):(re(C),re(T),ee.length&&K.push(...ee)),re(w),re(ms(e,{className:"cms-shortcode cms-btn-shortcode"})),K.length===0&&K.push(_.span("Button"));const Y=_.span({class:"cms-btn-loading",hidden:!0}),W=_.span({class:"cms-btn-content"},...K);let ie=!1;const ge=()=>{const J=v.Spinner?v.Spinner({size:e.loadingSize||e.spinnerSize||16,thickness:e.loadingThickness||2,color:e.loadingColor||"currentColor",label:e.loadingText||null,"aria-label":e.loadingText?null:"Loading"}):_.span({class:"cms-muted",style:{marginRight:"8px"}},e.loadingText||"Loading");return E(null,"default",{},JSswift.ui.renderSlot(s,"loading",{},J))},ce=J=>{var f;if((f=e.onPointerDown)==null||f.call(e,J),l()||!(J!=null&&J.currentTarget))return;const Z=J.currentTarget,X=Z.getBoundingClientRect(),ue=typeof J.clientX=="number"?J.clientX-X.left:X.width/2,F=typeof J.clientY=="number"?J.clientY-X.top:X.height/2;Z.style.setProperty("--cms-burst-x",`${ue}px`),Z.style.setProperty("--cms-burst-y",`${F}px`),Z.classList.remove("cms-btn-burst"),Z.offsetWidth,Z.classList.add("cms-btn-burst")},le=_.button({...y,disabled:l(),onClick:J=>{var Z,X;return l()?((Z=J==null?void 0:J.preventDefault)==null||Z.call(J),!1):(X=e.onClick)==null?void 0:X.call(e,J)},onPointerDown:ce,"aria-disabled":l()?"true":null,"aria-busy":a()?"true":null},Y,W),oe=JSswift.reactive.effect(()=>{const J=a(),Z=l();le.disabled=Z,le.classList.toggle("is-loading",J),le.setAttribute("aria-disabled",Z?"true":"false"),J?le.setAttribute("aria-busy","true"):le.removeAttribute("aria-busy"),Y.hidden=!J,J!==ie&&(Y.replaceChildren(...J?ge():[]),ie=J)},"UI.Btn:state");return(ne=JSswift._registerCleanup)==null||ne.call(JSswift,le,oe),Ke(le,e),an(le,e,{isEnabled:()=>!l(),action:()=>{if(l())return!1;le.click()}}),le},v.Button=v.Btn,JSswift.ui.Btn=v.Btn,JSswift.ui.Button=v.Button,(Jo=JSswift.isDev)!=null&&Jo.call(JSswift)&&(v.meta.Btn={signature:"UI.Btn(...children) | UI.Btn(props, ...children)",props:{label:"String|Node|Function|Array",icon:"String|Node|Function|Array",iconRight:"String|Node|Function|Array",iconAlign:"before|after|left|right",color:"primary|secondary|warning|danger|success|info|light|dark",outline:"boolean",loading:"boolean",loadingText:"string|Node|Function|Array",loadingSize:"number|string",loadingColor:"string",loadingThickness:"number|string",disabled:"boolean",shortcode:"string|Array<string>|object",showShortcode:"boolean",slots:"{ icon?, iconRight?, label?, loading?, default? }",class:"string",style:"object"},slots:{icon:"Icon slot",iconRight:"Right icon slot",label:"Label slot",default:"Button content"},events:["click","pointerdown","focus","blur"],returns:"HTMLButtonElement"},v.meta.Button=v.meta.Btn),v.FormField=(t={})=>{var le,oe,ne,J,Z,X,ue;Yt(t);const e=t.slots||{},n=Ye([t.color,t.state],()=>{const F=o(t.color)||o(t.state)||"";return["primary","secondary","warning","danger","success","info","light","dark"].includes(F)?F:o(t.state)||""}),s=_.div({class:ae(["cms-clear-field-set","cms-field","cms-singularity-field",n,me(t.fill,"cms-field-fill"),me(t.outline,"outline"),t.wrapClass,t.class])}),i=E(e,"topLabel",{},t.topLabel);i.length&&s.appendChild(_.div({class:"cms-field-label"},...i));const c=t.multi||t.multiple,y=typeof t.control=="function"?t.control():t.control,a=()=>{if(typeof t.hasValue=="function")return!!t.hasValue();if(t.hasValue!=null)return!!o(t.hasValue);const F=t.getValue?t.getValue():null;return!(F==null||F==="")},l=()=>JSswift.reactive.untracked(a),b=()=>{var F,f;t.disabled||t.readonly||((F=t.onClear)==null||F.call(t),(f=t.onFocus)==null||f.call(t))},R=JSswift.ui.renderSlot(e,"control",{control:y,clear:b,disabled:!!t.disabled,readonly:!!t.readonly,hasValue:l()},null);let C=null,w=null;if(R)C=Array.isArray(R)?_.div({class:"cms-control"},...R):R;else{C=_.div({class:"cms-control"});const F=_.div({class:"cms-addon cms-addon-left"}),f=t.icon!=null?typeof t.icon=="string"?v.Icon({name:t.icon}):t.icon:null,m=JSswift.ui.renderSlot(e,"icon",{},f),g=JSswift.ui.renderSlot(e,"prefix",{},t.prefix);E(null,"default",{},m).forEach(A=>F.appendChild(A)),E(null,"default",{},g).forEach(A=>F.appendChild(A)),F.childNodes.length&&C.appendChild(F);const O=_.div({class:"cms-mid"+(F.childNodes.length>0?" cms-with-left":""),style:{position:"relative",flex:"1",minWidth:"0"}});y&&O.appendChild(y);const Q=E(e,"label",{},t.label);if(Q.length){const A=_.div({class:ae(["cms-float-label",me(c,"cms-multiselect")])},...Q);O.appendChild(A)}C.appendChild(O);const r=t.clearable?_.div({class:"cms-clear",title:"Clear",onClick:b},v.Icon({name:"close"})):null,x=JSswift.ui.renderSlot(e,"clear",{disabled:!!t.disabled,readonly:!!t.readonly,hasValue:l()},r);x&&(x.onclick=A=>{A.stopPropagation(),b()},E(null,"default",{},x).forEach(A=>C.appendChild(A))),w=r,w&&((le=t.clearable)!=null&&le.action)&&t.clearable.action(A=>A?w.classList.remove("cms-d-none"):w.classList.add("cms-d-none"));const p=_.div({class:"cms-addon cms-addon-right"}),P=t.iconRight!=null?typeof t.iconRight=="string"?v.Icon({name:t.iconRight}):t.iconRight:null,U=JSswift.ui.renderSlot(e,"iconRight",{},P),G=JSswift.ui.renderSlot(e,"suffix",{},t.suffix),de=JSswift.ui.renderSlot(e,"shortcode",{props:t},ms(t,{className:"cms-shortcode cms-field-shortcode"}));E(null,"default",{},G).forEach(A=>p.appendChild(A)),E(null,"default",{},U).forEach(A=>p.appendChild(A)),E(null,"default",{},de).forEach(A=>p.appendChild(A)),p.childNodes.length&&(C.appendChild(p),O.classList.add("cms-with-right"))}const T=F=>F&&(F&&typeof F.action=="function"?F.value:Array.isArray(F)&&typeof F[0]=="function"?F[0]():typeof F=="function"?F():F),ee=F=>F==null||F===!1||F===""?!1:Array.isArray(F)?F.length>0:!0;let K=null;const re=()=>{const F=[{key:"error",value:T(t.error),slot:"errorMessage",className:"cms-error"},{key:"warning",value:T(t.warning),slot:"warning",className:"cms-warning"},{key:"success",value:T(t.success),slot:"success",className:"cms-success"},{key:"note",value:T(t.note),slot:"note",className:"cms-note"},{key:"hint",value:T(t.hint),slot:"hint",className:"cms-hint"}];let f=null;for(const r of F)if(ee(r.value)){f=r;break}const m={error:F[0].value,warning:F[1].value,success:F[2].value,note:F[3].value,hint:F[4].value,props:t},g=f?E(e,f.slot,m,f.value):[],O=g.length?_.div({class:f==null?void 0:f.className},...g):null;["error","warning","success","note"].forEach(r=>{var x;return(x=C==null?void 0:C.classList)==null?void 0:x.toggle(r,(f==null?void 0:f.key)===r)}),K?O?K.replaceWith(O):K.remove():O&&s.appendChild(O),K=O},H=()=>{var f;const F=a();(f=C==null?void 0:C.classList)==null||f.toggle("has-value",F),w&&(w.style.display=F?"":"none")};JSswift.reactive.untracked(H),(oe=C==null?void 0:C.classList)==null||oe.toggle("disabled",!!t.disabled),s.appendChild(C);const j=JSswift.ui.getSlot(e,"errorMessage"),Y=JSswift.ui.getSlot(e,"warning"),W=JSswift.ui.getSlot(e,"success"),ie=JSswift.ui.getSlot(e,"note"),ge=JSswift.ui.getSlot(e,"hint");return!!((ne=t.error)!=null&&ne.action||(J=t.warning)!=null&&J.action||(Z=t.success)!=null&&Z.action||(X=t.note)!=null&&X.action||(ue=t.hint)!=null&&ue.action)||Array.isArray(t.error)&&typeof t.error[0]=="function"||Array.isArray(t.warning)&&typeof t.warning[0]=="function"||Array.isArray(t.success)&&typeof t.success[0]=="function"||Array.isArray(t.note)&&typeof t.note[0]=="function"||Array.isArray(t.hint)&&typeof t.hint[0]=="function"||typeof t.error=="function"||typeof t.warning=="function"||typeof t.success=="function"||typeof t.note=="function"||typeof t.hint=="function"||typeof j=="function"||typeof Y=="function"||typeof W=="function"||typeof ie=="function"||typeof ge=="function"?JSswift.reactive.effect(()=>{re()},"UI.FormField:message"):re(),s._refresh=H,s._control=C,s._el=y,s},(Oo=JSswift.isDev)!=null&&Oo.call(JSswift)&&(v.meta=v.meta||{},v.meta.FormField={signature:"UI.FormField(props)",description:"Wrapper field con label floating, hint/error/success/warning/note, clear e addons slot-based.",props:{label:"String|Node|Function",topLabel:"String|Node|Function",hint:"String|Node|Function",error:"String|Node|Function",success:"String|Node|Function",warning:"String|Node|Function",note:"String|Node|Function",icon:"String|Node|Function",iconRight:"String|Node|Function",prefix:"String|Node|Function",suffix:"String|Node|Function",clearable:"boolean",shortcode:"string|Array<string>|object",showShortcode:"boolean",disabled:"boolean",readonly:"boolean",control:"Node|Function",getValue:"() => any",onClear:"() => void",onFocus:"() => void",wrapClass:"string",slots:"{ label?, topLabel?, prefix?, suffix?, shortcode?, icon?, iconRight?, clear?, hint?, error?, control? }"},slots:{label:"Floating label content",topLabel:"Top label content",prefix:"Left addon content",suffix:"Right addon content",icon:"Left icon content",iconRight:"Right icon content",shortcode:"Shortcut badge content",clear:"Clear button slot (ctx: { clear, disabled, readonly, hasValue })",hint:"Hint content",errorMessage:"Error content",success:"Success content",warning:"Warning content",note:"Note content",control:"Override control wrapper (ctx: { control, clear, disabled, readonly, hasValue })"},returns:"HTMLDivElement (wrapper) con ._refresh()"}),v.InputRaw=(t={})=>{var R;const e=_.input({class:ae(["cms-input-raw",t.class]),type:t.type||"text",name:t.name,placeholder:t.placeholder,autocomplete:t.autocomplete,value:t.value});let n=(R=e.value)!=null?R:"";const s=()=>{var w;const C=(w=e.value)!=null?w:"";C!==n&&(n=C,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})))};let i=null,c=!1;const y=()=>{if(c)return;c=!0;let C=0;const w=()=>{if(s(),C+=1,C>=10){c=!1;return}setTimeout(w,120)};setTimeout(w,40)},a=()=>{i||(i=setInterval(()=>{if(document.activeElement!==e){clearInterval(i),i=null;return}s()},250))},l=()=>{i&&(clearInterval(i),i=null)};e.addEventListener("input",()=>{var C;n=(C=e.value)!=null?C:""}),e.addEventListener("change",()=>{var C;n=(C=e.value)!=null?C:""}),e.addEventListener("animationstart",C=>{C.animationName==="cms-autofill"&&(s(),a(),y())}),e.addEventListener("focus",()=>{a(),y(),setTimeout(s,50)}),e.addEventListener("blur",()=>{l(),setTimeout(s,0)}),setTimeout(s,0),y();const b=t.model;if(b){if(typeof b=="object"&&typeof b._bind=="function")je.rodModel(e,b);else if(Array.isArray(b)&&typeof b[0]=="function"&&typeof b[1]=="function"){const C=je.rodFromSignal(b[0],b[1]);je.rodModel(e,C)}}return an(e,t,{isEnabled:()=>!e.disabled,action:()=>hn(e,{selectText:!!t.selectOnShortcode})}),e},v.Input=(t={})=>{var K,re,H;const e=t.slots||{},n={...t,label:(K=t.label)!=null?K:t.placeholder},s=_.input({class:ae(["cms-input",t.class]),type:t.type||"text",name:t.name,autocomplete:t.autocomplete,inputmode:t.inputmode,value:(re=t.value)!=null?re:"",disabled:!!t.disabled,readOnly:!!t.readonly});let i=(H=s.value)!=null?H:"";const c=()=>{var Y;const j=(Y=s.value)!=null?Y:"";j!==i&&(i=j,s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})))};let y=null,a=!1;const l=()=>{if(a)return;a=!0;let j=0;const Y=()=>{if(c(),j+=1,j>=10){a=!1;return}setTimeout(Y,120)};setTimeout(Y,40)},b=()=>{y||(y=setInterval(()=>{if(document.activeElement!==s){clearInterval(y),y=null;return}c()},250))},R=()=>{y&&(clearInterval(y),y=null)};s.addEventListener("input",()=>{var j,Y;i=(j=s.value)!=null?j:"",(Y=t.onInput)==null||Y.call(t,s.value)}),s.addEventListener("change",()=>{var j,Y;i=(j=s.value)!=null?j:"",(Y=t.onChange)==null||Y.call(t,s.value)}),s.addEventListener("focus",j=>{var Y;(Y=t.onFocus)==null||Y.call(t,j),b(),l(),setTimeout(c,50)}),s.addEventListener("blur",j=>{var Y;(Y=t.onBlur)==null||Y.call(t,j),R(),setTimeout(c,0)}),s.addEventListener("animationstart",j=>{j.animationName==="cms-autofill"&&(c(),b(),l())}),setTimeout(c,0),l();const C=t.model;if(C){const j=Y=>{let W=!1;const ie=ce=>{const le=ce!=null?ce:"";s.value!==le&&(s.value=le,i=le)};Y.action(ce=>{if(!W){W=!0;try{ie(ce)}finally{W=!1}}}),JSswift.reactive.untracked(()=>ie(Y.value));const ge=ce=>{if(W||ce!=null&&ce.isComposing)return;const le=s.value;if(Y.value!==le){W=!0;try{Y.value=le}finally{W=!1}}};s.addEventListener("input",ge),s.addEventListener("compositionend",ge),typeof Y.onDispose=="function"&&Y.onDispose(()=>{s.removeEventListener("input",ge),s.removeEventListener("compositionend",ge)})};if(typeof C=="object"&&typeof C._bind=="function")j(C);else if(Array.isArray(C)&&typeof C[0]=="function"&&typeof C[1]=="function"){const Y=JSswift.reactive.untracked(()=>JSswift.rodFromSignal(C[0],C[1]));j(Y)}}const w=JSswift.ui.renderSlot(e,"input",{input:s,props:t},s),T=Array.isArray(w)?_.div({style:{display:"contents"}},...w):w,ee=v.FormField({...n,control:T,getValue:()=>s.value,onClear:()=>{s.disabled||s.readOnly||(s.value="",s.dispatchEvent(new Event("input",{bubbles:!0})))},onFocus:()=>s.focus()});return s.addEventListener("input",()=>{var j;return(j=ee._refresh)==null?void 0:j.call(ee)}),s.addEventListener("change",()=>{var j;return(j=ee._refresh)==null?void 0:j.call(ee)}),ee._input=s,an(s,t,{isEnabled:()=>!s.disabled,action:()=>hn(s,{selectText:!!t.selectOnShortcode})}),ee},(Do=JSswift.isDev)!=null&&Do.call(JSswift)&&(v.meta=v.meta||{},v.meta.Input={signature:"UI.Input(props)",description:"Input field with floating label, hint/error/success/warning/note, clearable control, icon, prefix/suffix, and reactive support (rod/signal).",props:{model:"rod | [get,set] signal",value:"string",type:"string (default: 'text')",name:"string",autocomplete:"string",inputmode:"string",disabled:"boolean",readonly:"boolean",shortcode:"string|Array<string>|object",showShortcode:"boolean",label:"String|Node|Function (floating label)",topLabel:"String|Node|Function (label above, not floating)",placeholder:"String|Node|Function (alias of label when label is not set)",hint:"String|Node|Function",error:"String|Node|Function",success:"String|Node|Function",warning:"String|Node|Function",note:"String|Node|Function",clearable:"boolean",icon:"String|Node|Function",iconRight:"String|Node|Function",prefix:"String|Node|Function",suffix:"String|Node|Function",class:"string (applicata all'input)",wrapClass:"string (applicata al field wrapper)",style:"object",onInput:"(value:string) => void",onChange:"(value:string) => void",onFocus:"(event) => void",onBlur:"(event) => void"},slots:{label:"Floating label (via FormField slots.label)",topLabel:"Top label (via FormField slots.topLabel)",prefix:"Left addon (via FormField slots.prefix)",suffix:"Right addon (via FormField slots.suffix)",shortcode:"Shortcut badge (via FormField slots.shortcode)",icon:"Left icon (via FormField slots.icon)",iconRight:"Right icon (via FormField slots.iconRight)",clear:"Clear button (via FormField slots.clear)",hint:"Hint content (via FormField slots.hint)",errorMessage:"Error content (via FormField slots.errorMessage)",success:"Success content (via FormField slots.success)",warning:"Warning content (via FormField slots.warning)",note:"Note content (via FormField slots.note)",input:"Custom input node (ctx: { input, props })"},returns:"HTMLDivElement (field wrapper) con ._input = HTMLInputElement"}),v.Textarea=(t={})=>{var b,R,C,w;const e=t.slots||{},n={...t,label:(b=t.label)!=null?b:t.placeholder,wrapClass:ae(["cms-textarea-field",t.wrapClass])},s=_.textarea({class:ae(["cms-input","cms-textarea",t.class]),name:t.name,autocomplete:t.autocomplete,inputmode:t.inputmode,rows:t.rows,cols:t.cols,maxLength:(R=t.maxLength)!=null?R:t.maxlength,minLength:(C=t.minLength)!=null?C:t.minlength,wrap:t.wrap,value:(w=t.value)!=null?w:"",disabled:!!t.disabled,readOnly:!!t.readonly});s.addEventListener("input",()=>{var T;(T=t.onInput)==null||T.call(t,s.value)}),s.addEventListener("change",()=>{var T;(T=t.onChange)==null||T.call(t,s.value)}),s.addEventListener("focus",T=>{var ee;(ee=t.onFocus)==null||ee.call(t,T)}),s.addEventListener("blur",T=>{var ee;(ee=t.onBlur)==null||ee.call(t,T)});const i=t.model;if(i){const T=ee=>{let K=!1;const re=j=>{const Y=j!=null?j:"";s.value!==Y&&(s.value=Y)};ee.action(j=>{if(!K){K=!0;try{re(j)}finally{K=!1}}}),JSswift.reactive.untracked(()=>re(ee.value));const H=j=>{if(K||j!=null&&j.isComposing)return;const Y=s.value;if(ee.value!==Y){K=!0;try{ee.value=Y}finally{K=!1}}};s.addEventListener("input",H),s.addEventListener("compositionend",H),typeof ee.onDispose=="function"&&ee.onDispose(()=>{s.removeEventListener("input",H),s.removeEventListener("compositionend",H)})};if(typeof i=="object"&&typeof i._bind=="function")T(i);else if(Array.isArray(i)&&typeof i[0]=="function"&&typeof i[1]=="function"){const ee=JSswift.reactive.untracked(()=>JSswift.rodFromSignal(i[0],i[1]));T(ee)}}const c=JSswift.ui.getSlot(e,"textarea")!=null?"textarea":"input",y=JSswift.ui.renderSlot(e,c,{textarea:s,input:s,props:t},s),a=Array.isArray(y)?_.div({style:{display:"contents"}},...y):y,l=v.FormField({...n,control:a,getValue:()=>s.value,onClear:()=>{s.disabled||s.readOnly||(s.value="",s.dispatchEvent(new Event("input",{bubbles:!0})))},onFocus:()=>s.focus()});return s.addEventListener("input",()=>{var T;return(T=l._refresh)==null?void 0:T.call(l)}),s.addEventListener("change",()=>{var T;return(T=l._refresh)==null?void 0:T.call(l)}),l._input=s,l._textarea=s,an(s,t,{isEnabled:()=>!s.disabled,action:()=>hn(s,{selectText:!!t.selectOnShortcode})}),l},(Ho=JSswift.isDev)!=null&&Ho.call(JSswift)&&(v.meta=v.meta||{},v.meta.Textarea={signature:"UI.Textarea(props)",description:"Textarea field with floating label, hint/error/success/warning/note, clearable control, icon, prefix/suffix, and reactive support (rod/signal).",props:{model:"rod | [get,set] signal",value:"string",name:"string",autocomplete:"string",inputmode:"string",rows:"number|string",cols:"number|string",maxLength:"number|string",minLength:"number|string",wrap:"string",disabled:"boolean",readonly:"boolean",shortcode:"string|Array<string>|object",showShortcode:"boolean",label:"String|Node|Function (floating label)",topLabel:"String|Node|Function (label above, not floating)",placeholder:"String|Node|Function (alias of label when label is not set)",hint:"String|Node|Function",error:"String|Node|Function",success:"String|Node|Function",warning:"String|Node|Function",note:"String|Node|Function",clearable:"boolean",icon:"String|Node|Function",iconRight:"String|Node|Function",prefix:"String|Node|Function",suffix:"String|Node|Function",class:"string (applicata alla textarea)",wrapClass:"string (applicata al field wrapper)",style:"object",onInput:"(value:string) => void",onChange:"(value:string) => void",onFocus:"(event) => void",onBlur:"(event) => void"},slots:{label:"Floating label (via FormField slots.label)",topLabel:"Top label (via FormField slots.topLabel)",prefix:"Left addon (via FormField slots.prefix)",suffix:"Right addon (via FormField slots.suffix)",shortcode:"Shortcut badge (via FormField slots.shortcode)",icon:"Left icon (via FormField slots.icon)",iconRight:"Right icon (via FormField slots.iconRight)",clear:"Clear button (via FormField slots.clear)",hint:"Hint content (via FormField slots.hint)",errorMessage:"Error content (via FormField slots.errorMessage)",success:"Success content (via FormField slots.success)",warning:"Warning content (via FormField slots.warning)",note:"Note content (via FormField slots.note)",textarea:"Custom textarea node (ctx: { textarea, input, props })",input:"Alias slot for custom textarea node (ctx: { textarea, input, props })"},returns:"HTMLDivElement (field wrapper) con ._textarea = HTMLTextAreaElement"}),v.Search=(t={})=>{var z,we;const e=t.slots||{},n=M=>!!M&&(typeof M=="object"&&typeof M._bind=="function"||_t(M)),s=n(t.model)?t.model:n(t.value)?t.value:null,i=s?typeof s=="object"&&typeof s._bind=="function"?s.value:s[0]():o(t.value),[c,y]=JSswift.reactive.signal(i==null?"":String(i)),[a,l]=JSswift.reactive.signal(!1),[b,R]=JSswift.reactive.signal(!1),[C,w]=JSswift.reactive.signal(null),[T,ee]=JSswift.reactive.signal([]),[K,re]=JSswift.reactive.signal(-1),H=`cms-search-${Math.random().toString(36).slice(2,10)}`,j=new Map;let Y=null,W=null,ie=null,ge=0,ce=0,le=!1,oe=-1,ne=[];const J=(M,N)=>{const S=Number(o(M));return Number.isFinite(S)?S:N},Z=(M,N=!1)=>{const S=o(M);return S==null?N:!!S},X=()=>Z(t.disabled,!1),ue=()=>Z(t.readonly,!1),F=()=>Math.max(0,J(t.minLength,t.endpoint?1:0)),f=()=>Math.max(0,J(t.debounce,250)),m=M=>{var S,d,L,fe,Fe;const N=t.getLabel||t.labelOf;return typeof N=="function"?N(M):M==null?"":typeof M=="string"||typeof M=="number"?String(M):(Fe=(fe=(L=(d=(S=M.label)!=null?S:M.title)!=null?d:M.name)!=null?L:M.text)!=null?fe:M.value)!=null?Fe:""},g=M=>{var S,d,L;const N=t.getValue||t.valueOf;return typeof N=="function"?N(M):M==null?"":typeof M=="string"||typeof M=="number"?M:(L=(d=(S=M.value)!=null?S:M.id)!=null?d:M.key)!=null?L:m(M)},O=M=>Array.isArray(M)?M:!M||typeof M!="object"?[]:Array.isArray(M.items)?M.items:Array.isArray(M.results)?M.results:Array.isArray(M.data)?M.data:[],Q=async(M,N)=>{const S=typeof M=="function"?M(N,{props:t}):o(M);return S&&typeof S.then=="function"?await S:S},r=(M,N)=>{const S=typeof M=="function"?M(N,{props:t}):o(M);if(!S)return"";const d=String(S),L=new URL(d,window.location.href),fe=o(t.queryParam)||"q";fe&&L.searchParams.set(fe,N);const Fe=typeof t.params=="function"?t.params(N,{props:t}):o(t.params);return Fe&&typeof Fe=="object"&&Object.keys(Fe).forEach(Te=>{const $=o(Fe[Te]);$==null||$===!1||L.searchParams.set(Te,String($))}),L.toString()},x=(M,N={})=>{var d,L;const S=M==null?"":String(M);c()!==S&&y(S),te.value!==S&&(te.value=S),Y&&!N.fromModel&&Y(S),N.fromModel||(d=t.onInput)==null||d.call(t,S,N.event),(L=he==null?void 0:he._refresh)==null||L.call(he)},p=()=>{l(!1),re(-1)},P=()=>b()||C()||T().length?!0:c().trim().length>=F()?!!(t.emptyText||JSswift.ui.getSlot(e,"empty")!=null):!!(t.startText||JSswift.ui.getSlot(e,"empty")!=null),U=()=>{X()||P()&&(l(!0),Se())},G=()=>{ee([]),w(null),re(-1)},de=async(M,N={})=>{var $,_e,Re,Pe,De,We;const S=M==null?"":String(M).trim(),d=++ge,L=o(($=t.endpoint)!=null?$:t.url),fe=(Re=(_e=t.items)!=null?_e:t.options)!=null?Re:t.suggestions;if(ie&&(ie.abort(),ie=null),S.length<F()){R(!1),G(),N.open&&P()?U():P()||p();return}const Fe=t.cache!==!1,Te=`${L||"local"}::${S}`;if(Fe&&j.has(Te)){ee(j.get(Te)),w(null),R(!1),re(j.get(Te).length?0:-1),N.open!==!1&&U();return}R(!0),w(null),N.open!==!1&&U(),(Pe=t.onSearch)==null||Pe.call(t,S);try{let qe;if(L){ie=new AbortController;const Ee=r(L,S),Be=await fetch(Ee,{method:"GET",headers:t.headers,credentials:t.credentials,signal:ie.signal});if(!Be.ok)throw new Error(`Search request failed (${Be.status})`);qe=await(t.parseResponse||(nt=>nt.json()))(Be)}else if(fe!=null){const Ee=O(await Q(fe,S)),Be=t.filter||((tt,nt)=>String(m(tt)).toLowerCase().includes(nt.toLowerCase()));qe=Ee.filter(tt=>Be(tt,S))}else qe=[];if(d!==ge)return;const Ze=typeof t.mapResponse=="function"?t.mapResponse(qe,S):O(qe),Qe=O(Ze);Fe&&j.set(Te,Qe),ee(Qe),re(Qe.length?0:-1),(De=t.onResults)==null||De.call(t,Qe,S)}catch(qe){if((qe==null?void 0:qe.name)==="AbortError"||d!==ge)return;w(qe),ee([]),re(-1),(We=t.onError)==null||We.call(t,qe,S)}finally{d===ge&&(R(!1),ie=null,Se())}},A=(M,N={})=>{W&&clearTimeout(W);const S=N.immediate?0:f();W=setTimeout(()=>{W=null,de(M,N)},S)},u=M=>{var S;const N=c();(S=t.onSubmit)==null||S.call(t,N,M),t.submitOnEnter!==!1&&A(N,{immediate:!0,open:!0})},k=(M,N)=>{var L;if(!M)return;const S=g(M),d=m(M);t.commitValue==="value"?x(S,{event:N}):t.commitValue!==!1&&x(d,{event:N}),(L=t.onSelect)==null||L.call(t,M,{value:S,label:d,query:c(),event:N}),t.closeOnSelect!==!1&&p()},I=M=>{const N=T();if(!N.length)return;const S=K(),d=S<0?M>0?0:N.length-1:Math.max(0,Math.min(N.length-1,S+M));re(d)},B=M=>{const N=M==null?"":String(M),S=c().trim();if(!S||t.highlight===!1)return[document.createTextNode(N)];const d=N.toLowerCase().indexOf(S.toLowerCase());return d<0?[document.createTextNode(N)]:[document.createTextNode(N.slice(0,d)),_.mark({class:"cms-search-highlight"},N.slice(d,d+S.length)),document.createTextNode(N.slice(d+S.length))]},pe=M=>{var d,L;const N=m(M),S=M&&typeof M=="object"?(L=(d=M.description)!=null?d:M.subtitle)!=null?L:M.note:null;return _.div({class:"cms-search-result-content"},_.div({class:"cms-search-result-label"},...B(N)),S?_.div({class:"cms-search-result-description"},String(S)):null)},Se=()=>{!a()||be.parentNode!==document.body||ce||(ce=requestAnimationFrame(()=>{if(ce=0,!a()||!Ce.isConnected||be.parentNode!==document.body)return;const M=Ce.getBoundingClientRect(),N=6,S=8,d=Math.max(180,window.innerWidth-S*2),L=Math.min(Math.max(M.width,J(t.minMenuWidth,260)),d),fe=Math.max(S,Math.min(M.left,window.innerWidth-L-S));be.style.width=`${L}px`,be.style.left=`${fe}px`,be.style.right="auto";const Fe=be.getBoundingClientRect().height||0,Te=window.innerHeight-M.bottom-N-S,$=M.top-N-S;let Re=Te<180&&$>Te?M.top-N-Fe:M.bottom+N;Re=Math.max(S,Math.min(Re,window.innerHeight-Fe-S)),be.style.top=`${Re}px`}))},ye=()=>{le||(le=!0,window.addEventListener("resize",Se),window.addEventListener("scroll",Se,!0))},V=()=>{le&&(le=!1,window.removeEventListener("resize",Se),window.removeEventListener("scroll",Se,!0))},D=()=>{be.parentNode!==document.body&&(ce&&(cancelAnimationFrame(ce),ce=0),be.classList.add("portal"),be.style.display="block",document.body.appendChild(be),ye(),Se())},q=()=>{ce&&(cancelAnimationFrame(ce),ce=0),V(),be.parentNode!==Ce&&Ce.appendChild(be),be.classList.remove("portal"),be.style.display="",be.style.position="",be.style.top="",be.style.left="",be.style.right="",be.style.width=""},Ne=t.label!=null||JSswift.ui.getSlot(e,"label")!=null,ke=()=>{if(!Ne){te.placeholder=o(t.placeholder)||"";return}te.placeholder=document.activeElement===te&&o(t.placeholder)||""},te=_.input({id:t.id,class:ae(["cms-input","cms-search-input",t.inputClass]),type:"search",name:t.name,placeholder:Ne?"":t.placeholder,autocomplete:t.autocomplete||"off",inputmode:t.inputmode,value:c(),disabled:X(),readOnly:ue(),role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-controls":`${H}-list`}),xe=_.div({id:`${H}-list`,class:"cms-search-results",role:"listbox"}),be=_.div({class:ae(["cms-search-menu","cms-singularity-menu-select",t.menuClass,me(t.fill,"cms-select-menu-fill")]),"data-cms-overlay-portal":"true",onClick:M=>M.stopPropagation()},xe),Ce=_.div({class:ae(["cms-search",t.class]),role:"presentation"},te,be);let he=null;if(s){if(typeof s=="object"&&typeof s._bind=="function")s.action(M=>x(M,{fromModel:!0})),Y=M=>{s.value!==M&&(s.value=M)};else if(Array.isArray(s)&&typeof s[0]=="function"&&typeof s[1]=="function"){const M=s[0],N=s[1];JSswift.reactive.effect(()=>{x(M(),{fromModel:!0})},"UI.Search:model"),Y=S=>N(S)}}else rt(t.value)&&JSswift.reactive.effect(()=>{x(o(t.value),{fromModel:!0})},"UI.Search:value");te.addEventListener("input",M=>{x(te.value,{event:M}),t.searchOnInput!==!1&&A(te.value,{open:!0})}),te.addEventListener("change",M=>{var N;return(N=t.onChange)==null?void 0:N.call(t,te.value,M)}),te.addEventListener("focus",M=>{var N;ke(),(N=t.onFocus)==null||N.call(t,M),t.openOnFocus!==!1&&(t.searchOnFocus&&!T().length?A(te.value,{immediate:!0,open:!0}):U())}),te.addEventListener("blur",M=>{var N;ke(),(N=t.onBlur)==null||N.call(t,M)}),te.addEventListener("keydown",M=>{if(X()||ue())return;const N=a(),S=T(),d=K();if(M.key==="Escape"){N&&(M.preventDefault(),p());return}if(M.key==="ArrowDown"){M.preventDefault(),N?I(1):(U(),S.length||A(te.value,{immediate:!0,open:!0}));return}if(M.key==="ArrowUp"){M.preventDefault(),N?I(-1):U();return}if(M.key==="Home"&&N&&S.length&&(M.metaKey||M.ctrlKey)){M.preventDefault(),re(0);return}if(M.key==="End"&&N&&S.length&&(M.metaKey||M.ctrlKey)){M.preventDefault(),re(S.length-1);return}M.key==="Enter"&&(N&&d>=0&&S[d]?(M.preventDefault(),k(S[d],M)):u(M))});const Le=M=>{if(!Ce.isConnected)return;const N=M.target;Ce.contains(N)||be.contains(N)||p()};document.addEventListener("click",Le,!0),JSswift.reactive.effect(()=>{const M=a();Ce.classList.toggle("open",M),te.setAttribute("aria-expanded",M?"true":"false"),M?D():q()},"UI.Search:open"),JSswift.reactive.effect(()=>{const M=X(),N=ue();Ce.classList.toggle("disabled",M),Ce.classList.toggle("readonly",N),te.disabled=M,te.readOnly=N},"UI.Search:disabled"),JSswift.reactive.effect(()=>{const M=b(),N=C(),S=T(),d=c();if(xe.innerHTML="",ne=[],oe=-1,M){const L=JSswift.ui.renderSlot(e,"loading",{query:d},t.loadingText||"Caricamento...");xe.appendChild(_.div({class:"cms-search-empty is-loading"},...E(null,"default",{},L)))}else if(N){const L=JSswift.ui.renderSlot(e,"error",{error:N,query:d},t.errorText||"Errore ricerca");xe.appendChild(_.div({class:"cms-search-empty is-error"},...E(null,"default",{},L)))}else if(S.length)S.forEach((L,fe)=>{const Te=m(L),$=g(L),_e=De=>k(L,De),Re=JSswift.ui.renderSlot(e,"result",{item:L,index:fe,active:!1,label:Te,value:$,query:d,select:_e},pe(L)),Pe=_.div({id:`${H}-result-${fe}`,class:ae(["cms-search-result",""]),role:"option","aria-selected":"false",onMouseEnter:()=>re(fe),onMouseDown:De=>De.preventDefault(),onClick:_e},...E(null,"default",{},Re));xe.appendChild(Pe),ne[fe]=Pe});else{const fe=d.trim().length>=F()?t.emptyText||"Nessun risultato":t.startText||"",Fe=JSswift.ui.renderSlot(e,"empty",{query:d},fe);(fe||JSswift.ui.getSlot(e,"empty")!=null)&&xe.appendChild(_.div({class:"cms-search-empty"},...E(null,"default",{},Fe)))}P()||p(),Se()},"UI.Search:render"),JSswift.reactive.effect(()=>{const M=K();M!==oe&&(ne[oe]&&(ne[oe].classList.remove("active"),ne[oe].setAttribute("aria-selected","false")),ne[M]?(ne[M].classList.add("active"),ne[M].setAttribute("aria-selected","true"),ne[M].scrollIntoView({block:"nearest"}),te.setAttribute("aria-activedescendant",`${H}-result-${M}`)):te.removeAttribute("aria-activedescendant"),oe=M)},"UI.Search:active"),he=v.FormField({...t,icon:(z=t.icon)!=null?z:"search",wrapClass:ae(["cms-search-field",t.wrapClass]),control:Ce,getValue:()=>c(),onClear:()=>{var M;X()||ue()||(x("",{}),G(),(M=t.onClear)==null||M.call(t))},onFocus:()=>te.focus()}),te.addEventListener("input",()=>{var M;return(M=he._refresh)==null?void 0:M.call(he)}),te.addEventListener("change",()=>{var M;return(M=he._refresh)==null?void 0:M.call(he)}),he._input=te,he._search=Ce,he._open=U,he._close=p,he._searchNow=()=>de(c(),{immediate:!0,open:!0}),he._getResults=T,he._setValue=M=>x(M,{});let Ae=!1;return he._dispose=()=>{Ae||(Ae=!0,document.removeEventListener("click",Le,!0),W&&clearTimeout(W),ie&&ie.abort(),q())},(we=JSswift._registerCleanup)==null||we.call(JSswift,he,he._dispose),an(te,t,{isEnabled:()=>!te.disabled,action:()=>hn(te,{selectText:!!t.selectOnShortcode})}),(t.autoSearch||t.searchOnMount)&&A(c(),{immediate:!0,open:!1}),he},(jo=JSswift.isDev)!=null&&jo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Search={signature:"UI.Search(props)",description:"Professional search with FormField, GET fetch, debounce, AbortController, overlay results, optional cache, reactive binding, and keyboard navigation.",props:{model:"rod | [get,set] signal",value:"string | rod | [get,set] signal",endpoint:"string | (query, ctx) => string",url:"Alias of endpoint",method:"'GET' (internal)",queryParam:"string (default: 'q')",params:"object | (query, ctx) => object",headers:"object",credentials:"RequestCredentials",parseResponse:"(Response) => Promise<any>",mapResponse:"(payload, query) => Array",items:"Array | (query, ctx) => Array|Promise<Array>",options:"Local alias of items",suggestions:"Local alias of items",filter:"(item, query) => boolean",getLabel:"(item) => string",getValue:"(item) => any",minLength:"number (default: endpoint ? 1 : 0)",debounce:"number ms (default: 250)",cache:"boolean (default: true)",highlight:"boolean (default: true)",clearable:"boolean",label:"String|Node|Function",topLabel:"String|Node|Function",placeholder:"string",icon:"String|Node|Function (default: 'search')",iconRight:"String|Node|Function",shortcode:"string|Array<string>|object",showShortcode:"boolean",openOnFocus:"boolean",searchOnFocus:"boolean",searchOnInput:"boolean",searchOnMount:"boolean",autoSearch:"Alias of searchOnMount",closeOnSelect:"boolean",commitValue:"'label'|'value'|false",disabled:"boolean|Function|rod",readonly:"boolean|Function|rod",loadingText:"string",emptyText:"string",errorText:"string",startText:"string",class:"string",inputClass:"string",menuClass:"string",wrapClass:"string",style:"object"},slots:{result:"Result renderer ({ item, index, active, label, value, query, select })",empty:"Empty state ({ query })",loading:"Loading state ({ query })",error:"Error state ({ error, query })",label:"Floating label",topLabel:"Top label",prefix:"Left addon",suffix:"Right addon",icon:"Left icon",iconRight:"Right icon",shortcode:"Shortcut badge",clear:"Clear button"},events:{onInput:"(query, event)",onChange:"(query, event)",onSearch:"(query)",onResults:"(results, query)",onSelect:"(item, { value, label, query, event })",onSubmit:"(query, event)",onClear:"()",onError:"(error, query)",onFocus:"(event)",onBlur:"(event)"},keyboard:{ArrowDown:"Opens/moves to the next result",ArrowUp:"Moves to the previous result",Enter:"Selects the active result or submits the query",Escape:"Closes the overlay","Cmd/Ctrl+Home":"First result","Cmd/Ctrl+End":"Last result"},returns:"HTMLDivElement (field wrapper) with ._input, ._open(), ._close(), ._searchNow(), ._getResults(), ._setValue(value), ._dispose()"}),v.Select=(t={})=>{var we,M;const e={...t,label:(we=t.label)!=null?we:t.placeholder},n=t.filterable,s=!!t.multiple||!!t.multi,i=!!t.allowCustom||!!t.allowCustomValue,c=t.slots||{},y=N=>!!N&&(typeof N=="object"&&typeof N._bind=="function"||_t(N)),a=y(t.model)?t.model:y(t.value)?t.value:null,l=N=>Array.isArray(N)?N.slice():N==null||N===""?[]:[N],b=N=>s?l(N):N,R=a?JSswift.reactive.untracked(()=>typeof a=="object"&&typeof a._bind=="function"?a.value:a[0]()):t.value,[C,w]=JSswift.reactive.signal(!1),[T,ee]=JSswift.reactive.signal(""),[K,re]=JSswift.reactive.signal(s?l(R):R!=null?R:""),[H,j]=JSswift.reactive.signal(!1),[Y,W]=JSswift.reactive.signal([]),[ie,ge]=JSswift.reactive.signal([]),[ce,le]=JSswift.reactive.signal(-1);let oe=null;if(a){if(typeof a=="object"&&typeof a._bind=="function")JSswift.reactive.untracked(()=>re(b(a.value))),a.action(N=>re(b(N))),oe=N=>{const S=b(N);a.value!==S&&(a.value=S)};else if(Array.isArray(a)&&typeof a[0]=="function"&&typeof a[1]=="function"){const N=a[0],S=a[1];JSswift.reactive.untracked(()=>{JSswift.reactive.effect(()=>{re(b(N()))},"UI.Select:model")}),oe=d=>S(b(d))}}function ne(){var N;return typeof t.disabled=="function"?t.disabled():typeof t.disabled=="boolean"?t.disabled:(N=t==null?void 0:t.disabled)!=null&&N.action?t.disabled.value:!1}function J(N){var S,d,L,fe;if(N==null)return null;if(typeof N=="string"||typeof N=="number")return{type:"option",label:String(N),value:N,disabled:!1};if(typeof N=="object"){if(Array.isArray(N.options))return{type:"group",label:String((S=N.label)!=null?S:""),options:N.options};const Fe=(d=N.label)!=null?d:N.value!=null?String(N.value):"";return{type:"option",label:String(Fe),value:(fe=(L=N.value)!=null?L:N.label)!=null?fe:"",disabled:!!N.disabled}}return{type:"option",label:String(N),value:N,disabled:!1}}function Z(N){const d=(Array.isArray(N)?N:[]).map(J).filter(Boolean),L=[],fe=[];for(const Fe of d)if(Fe.type==="group"){L.push({type:"group",label:Fe.label});const Te=(Fe.options||[]).map(J).filter(Boolean).filter($=>$.type==="option");for(const $ of Te)L.push($),fe.push($)}else L.push(Fe),fe.push(Fe);W(L),ge(fe)}async function X(){const N=t.options;let S;try{const d=typeof N=="function"?JSswift.ui.withoutRodPathCapture(()=>N()):N;d&&typeof d.then=="function"?(j(!0),S=await d):S=d,Z(S)}catch(d){console.error("[UI.Select] options load error:",d),Z([])}finally{j(!1)}}function ue(N){var d;const S=b(N);re(S),oe&&oe(S),(d=t.onChange)==null||d.call(t,S)}function F(N){const S=l(K()),L=S.some(fe=>fe==N)?S.filter(fe=>fe!=N):[...S,N];ue(L)}function f(N,S=!1){s?(F(N),S&&m()):(ue(N),g())}function m(){ee(""),de&&(de.value="")}function g(){w(!1),m(),le(-1)}async function O(){if(ne())return;w(!0),await X();const N=K(),S=ie();let d=-1;if(s){const L=l(N);for(const fe of L)if(d=S.findIndex(Fe=>Fe.value==fe&&!Fe.disabled),d>=0)break}else d=S.findIndex(L=>L.value==N&&!L.disabled);d<0&&(d=S.findIndex(L=>!L.disabled)),le(d),de&&setTimeout(()=>de.focus(),0)}function Q(){C()?g():O()}const r=_.div({class:ae(["cms-select",s?"multiple":"",t.class]),tabIndex:ne()?-1:0,role:"combobox","aria-expanded":"false","aria-disabled":ne()?"true":"false"}),x=_.div({class:ae(["cms-select-value",s?"cms-select-value-multi":""])});JSswift.reactive.effect(()=>{const N=ie();if(x.innerHTML="",s){const S=l(K());for(const d of S){const L=N.find($=>$.value==d),fe=L?L.label:d==null?"":String(d);let Fe=!1;const Te=v.Chip({label:fe,dense:!0,color:t.chipColor||t.color,icon:t.chipIcon||null,iconRight:t.chipIconRight||null,glossy:t.glossy,glow:t.glow,glass:t.chipGlass||t.glass,class:t.chipClass,flat:t.flat,rounded:t.rounded,outline:t.outline,shadow:t.chipShadow,lightShadow:t.lightShadow,gloss:t.gloss,border:t.border,size:t.chipSize,removable:!0,onRemove:$=>{var _e,Re,Pe;(_e=$==null?void 0:$.preventDefault)==null||_e.call($),(Re=$==null?void 0:$.stopPropagation)==null||Re.call($),(Pe=$==null?void 0:$.stopImmediatePropagation)==null||Pe.call($),!Fe&&(Fe=!0,F(d))}});x.appendChild(Te)}}else{const S=K(),d=N.find(L=>L.value==S);x.textContent=d?d.label:S==null||S===""?"":String(S)}},"UI.Select:value");const p=_.div({class:"cms-select-arrow"});JSswift.reactive.effect(()=>{const N=JSswift.ui.renderSlot(c,"arrow",{open:C()},v.Icon("#chevron-down"));p.innerHTML="",E(null,"default",{},N).forEach(S=>p.appendChild(S))},"UI.Select:arrow");const P=_.div({class:"cms-select-control",onClick:Q},x,p),U=_.div({class:"cms-select-options",role:"listbox","aria-multiselectable":s?"true":"false"}),G=_.div({class:"cms-select-filter cms-d-none"});let de=null;const A=_.input({class:"cms-input",type:"text",placeholder:t.filterPlaceholder||"Cerca...",onInput:N=>ee(N.target.value||"")}),u=()=>{const N=JSswift.ui.renderSlot(c,"filter",{value:T(),setValue:d=>{const L=d==null?"":String(d);ee(L),de&&"value"in de&&(de.value=L)},close:g},A);G.innerHTML="";const S=E(null,"default",{},N);S.forEach(d=>G.appendChild(d)),de=S.length===1&&S[0]&&S[0].tagName==="INPUT"?S[0]:null,de&&(de.value=T()||"")};JSswift.reactive.untracked(u),JSswift.reactive.effect(()=>{const N=T()||"";de&&"value"in de&&de.value!==N&&(de.value=N)},"UI.Select:filterValue"),typeof n=="boolean"?n?G.classList.remove("cms-d-none"):G.classList.add("cms-d-none"):n!=null&&n.action&&(n.action(N=>{N?G.classList.remove("cms-d-none"):G.classList.add("cms-d-none")}),n.value?G.classList.remove("cms-d-none"):G.classList.add("cms-d-none"));const k={...t};Yt(k);const I=Ye([k.color,k.state],()=>{const N=o(k.color)||o(k.state)||"";return["primary","secondary","warning","danger","success","info","light","dark"].includes(N)?N:o(k.state)||""}),B=_.div({class:ae(["cms-select-menu","cms-singularity-menu-select",I,k.class,me(t.fill,"cms-select-menu-fill")]),"data-cms-overlay-portal":"true",onClick:N=>N.stopPropagation()},G,U);let pe=0,Se=!1;const ye=()=>{!C()||B.parentNode!==document.body||pe||(pe=requestAnimationFrame(()=>{if(pe=0,!C()||!r.isConnected||B.parentNode!==document.body)return;const N=r.getBoundingClientRect(),S=6,d=8,L=Math.max(160,window.innerWidth-d*2),fe=Math.min(Math.max(N.width,180),L),Fe=Math.max(d,Math.min(N.left,window.innerWidth-fe-d));B.style.width=`${fe}px`,B.style.left=`${Fe}px`,B.style.right="auto",B.style.marginTop="0";const Te=B.getBoundingClientRect().height||0,$=window.innerHeight-N.bottom-S-d,_e=N.top-S-d;let Pe=$<180&&_e>$?N.top-S-Te:N.bottom+S;Pe=Math.max(d,Math.min(Pe,window.innerHeight-Te-d)),B.style.top=`${Pe}px`}))},V=()=>{Se||(Se=!0,window.addEventListener("resize",ye),window.addEventListener("scroll",ye,!0))},D=()=>{Se&&(Se=!1,window.removeEventListener("resize",ye),window.removeEventListener("scroll",ye,!0))},q=()=>{B.parentNode!==document.body&&(pe&&(cancelAnimationFrame(pe),pe=0),B.classList.add("portal"),B.style.display="block",document.body.appendChild(B),V(),ye())},Ne=()=>{pe&&(cancelAnimationFrame(pe),pe=0),D(),B.parentNode!==r&&r.appendChild(B),B.classList.remove("portal"),B.style.display="",B.style.position="",B.style.top="",B.style.left="",B.style.right="",B.style.width="",B.style.marginTop=""};r.appendChild(P),r.appendChild(B),JSswift.reactive.effect(()=>{const N=C();r.classList.toggle("open",N),r.setAttribute("aria-expanded",N?"true":"false"),N?q():Ne()},"UI.Select:open"),JSswift.reactive.effect(()=>{const N=ne();r.classList.toggle("disabled",N),r.tabIndex=N?-1:0,r.setAttribute("aria-disabled",N?"true":"false")},"UI.Select:disabled");let ke=[],te=-1,xe=-1;function be(){var S;const N=ce();xe=N,N!==te&&(ke[te]&&ke[te].classList.remove("active"),ke[N]&&ke[N].classList.add("active"),te=N,N>=0&&((S=ke[N])==null||S.scrollIntoView({block:"nearest"})))}JSswift.reactive.effect(()=>{const N=Y(),S=ie(),d=(T()||"").toLowerCase().trim(),L=K(),fe=s?l(L):[L],Fe=H(),Te=xe;U.innerHTML="",ke=[],te=-1;const $=[];let _e=0;const Re=Pe=>{const De=fe.some(tt=>tt==Pe.value),We=!!Pe.disabled,qe=["cms-select-option",De?"selected":"",We?"disabled":""].filter(Boolean).join(" "),Ze=()=>{s?F(Pe.value):(ue(Pe.value),g())},Qe=JSswift.ui.renderSlot(c,"option",{opt:Pe,selected:De,active:_e===Te,disabled:We,select:Ze},Pe.label),Ee=E(null,"default",{},Qe),Be=_.div({class:qe,"data-flat-index":String(_e),onClick:We?null:Ze},...Ee);$.push(Be),ke[_e]=Be,_e++};if(d){const Pe=S.filter(De=>De.label.toLowerCase().includes(d));if(Pe.length===0){const De=JSswift.ui.renderSlot(c,"empty",{filter:d},t.emptyText||"Nessuna opzione");U.appendChild(_.div({class:"cms-select-empty"},...E(null,"default",{},De))),C()&&ye();return}for(const De of Pe)Re(De)}else{let Pe=!1;for(const De of N)if(De.type==="group"){const We=JSswift.ui.renderSlot(c,"group",{label:De.label},De.label);$.push(_.div({class:"cms-select-group"},...E(null,"default",{},We)))}else Pe=!0,Re(De);if(!Pe){const De=JSswift.ui.renderSlot(c,"empty",{filter:d},t.emptyText||"Nessuna opzione");U.appendChild(_.div({class:"cms-select-empty"},...E(null,"default",{},De))),C()&&ye();return}}if(Fe){const Pe=JSswift.ui.renderSlot(c,"loading",{},"Caricamento...");U.appendChild(_.div({class:"cms-select-empty"},...E(null,"default",{},Pe))),C()&&ye();return}for(const Pe of $)U.appendChild(Pe);be(),C()&&ye()},"UI.Select:render"),JSswift.reactive.effect(()=>{be()},"UI.Select:paintActive");const Ce=N=>{if(!r.isConnected)return;const S=N.target;r.contains(S)||B.contains(S)||g()};document.addEventListener("click",Ce,!0);const he=N=>{if(ne())return;const S=C(),d=ie(),L=ce(),fe=de&&N.target===de,Fe=($,_e)=>{let Re=$;for(;Re>=0&&Re<d.length;){if(!d[Re].disabled)return Re;Re+=_e}return-1},Te=$=>{if(!$)return null;const _e=$.toLowerCase();let Re=d.find(Pe=>String(Pe.label).toLowerCase()===_e||String(Pe.value).toLowerCase()===_e);return Re||(Re=d.find(Pe=>String(Pe.label).toLowerCase().includes(_e))),Re&&!Re.disabled?Re:null};if(N.key==="Escape"){S&&(N.preventDefault(),g());return}if(fe&&(N.key==="Enter"||N.key===" ")){const $=(T()||"").trim();if($){const _e=Te($);if(_e){N.preventDefault(),f(_e.value,!0);return}if(i&&N.key==="Enter"){N.preventDefault(),f($,!0);return}if(N.key==="Enter"){N.preventDefault();return}}if(N.key===" ")return}if(N.key==="Enter"||N.key===" "){if(N.preventDefault(),!S){O();return}L>=0&&d[L]&&!d[L].disabled&&(s?F(d[L].value):(ue(d[L].value),g()));return}if(N.key==="ArrowDown"){if(N.preventDefault(),!S){O();return}const $=Fe(L<0?0:L+1,1);$>=0&&le($);return}if(N.key==="ArrowUp"){if(N.preventDefault(),!S){O();return}const $=Fe(L<0?d.length-1:L-1,-1);$>=0&&le($);return}if(N.key==="Home"){if(!S)return;N.preventDefault();const $=Fe(0,1);$>=0&&le($);return}if(N.key==="End"){if(!S)return;N.preventDefault();const $=Fe(d.length-1,-1);$>=0&&le($);return}};r.addEventListener("keydown",he),G.addEventListener("keydown",he);let Le=!1;r._dispose=()=>{Le||(Le=!0,document.removeEventListener("click",Ce,!0),r.removeEventListener("keydown",he),G.removeEventListener("keydown",he),Ne())};const Ae=()=>{const N=K();return s?Array.isArray(N)&&N.length>0:N==null?!1:N!==""?!0:ie().some(S=>S.value==="")},z=v.FormField({...e,control:r,clearable:t.clearable,disabled:ne(),readonly:!1,hasValue:Ae,getValue:()=>{const N=K();return s?Array.isArray(N)&&N.length?N:"":N},onClear:()=>{ne()||(ue(s?[]:null),g())},onFocus:()=>{O()}});return JSswift.reactive.effect(()=>{var N;(N=z._refresh)==null||N.call(z)},"UI.Select:fieldRefresh"),z._select=r,z._dispose=r._dispose,(M=JSswift._registerCleanup)==null||M.call(JSswift,z,z._dispose),an(z,t,{isEnabled:()=>!ne(),action:()=>{if(ne())return!1;hn(r),O()}}),X(),z},(Vo=JSswift.isDev)!=null&&Vo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Select={signature:"UI.Select(props)",description:"Select premium: keyboard nav, option groups, async options, filter, clearable, multi select, valori custom da filtro. Wrappato in UI.FormField.",props:{options:"Array<option|group> | () => Array<option|group> | async () => Promise<Array<option|group>>",value:"any",model:"rod | [get,set] signal",label:"String|Node|Function (floating)",placeholder:"String|Node|Function (alias of label when label is not set)",topLabel:"String|Node|Function",hint:"String|Node|Function",error:"String|Node|Function",success:"String|Node|Function",warning:"String|Node|Function",note:"String|Node|Function",clearable:"boolean",filterable:"boolean",multiple:"boolean",multi:"boolean (alias multiple)",allowCustom:"boolean (consenti valori custom dal filtro)",allowCustomValue:"boolean (alias allowCustom)",filterPlaceholder:"string",emptyText:"string",shortcode:"string|Array<string>|object",showShortcode:"boolean",icon:"String|Node|Function",iconRight:"String|Node|Function",prefix:"String|Node|Function",suffix:"String|Node|Function",disabled:"boolean | () => boolean",dense:"boolean",class:"string",wrapClass:"string",slots:"{ clear?, arrow?, filter?, option?, group?, empty?, loading? }",onChange:"(value:any) => void"},slots:{clear:"Clear button (via FormField slots.clear)",arrow:"Arrow slot (ctx: { open })",filter:"Filter input slot (ctx: { value, setValue, close })",option:"Option renderer (ctx: { opt, selected, active, disabled, select })",group:"Group header (ctx: { label })",empty:"Empty state (ctx: { filter })",loading:"Loading state (ctx: {})",label:"Floating label (via FormField slots.label)",topLabel:"Top label (via FormField slots.topLabel)",prefix:"Left addon (via FormField slots.prefix)",suffix:"Right addon (via FormField slots.suffix)",shortcode:"Shortcut badge (via FormField slots.shortcode)",icon:"Left icon (via FormField slots.icon)",iconRight:"Right icon (via FormField slots.iconRight)",hint:"Hint content (via FormField slots.hint)",errorMessage:"Error content (via FormField slots.errorMessage)",success:"Success content (via FormField slots.success)",warning:"Warning content (via FormField slots.warning)",note:"Note content (via FormField slots.note)"},keyboard:["Enter/Space","ArrowUp","ArrowDown","Home","End","Escape"],returns:"HTMLDivElement (wrapper field) con ._select, ._dispose()"}),v.Upload=(t={})=>{var Ae;Yt(t);const e=t.slots||{},[n,s]=JSswift.reactive.signal([]),[i,c]=JSswift.reactive.signal(!1),[y,a]=JSswift.reactive.signal(!1),[l,b]=JSswift.reactive.signal(null);let R=0,C=!1;const w=()=>!!o(t.disabled)||!!o(t.readonly),T=()=>t.multiple!==!1&&t.single!==!0,ee=()=>{var z,we;return["form","native","submit","external"].includes(String(o((we=(z=t.submitMode)!=null?z:t.modeSubmit)!=null?we:t.uploadMode)||"").toLowerCase())},K=()=>{var z;return o((z=t.showBrowse)!=null?z:t.browseButton)!==!1},re=()=>{var z;return!ee()&&o((z=t.showUpload)!=null?z:t.uploadButton)!==!1},H=()=>{var z;return o((z=t.showClear)!=null?z:t.clearButton)!==!1},j=()=>{var z;return o((z=t.showFiles)!=null?z:t.files)!==!1},Y=()=>{const z=mt(o(t.state)||o(t.status));return z?`cms-state-${z}`:""},W=()=>t.fieldName||t.paramName||t.name||"file",ie=()=>{var z;return Math.max(1,Number(o((z=t.parallelUploads)!=null?z:t.parallel)||1))},ge=()=>{var we,M,N,S;const z=o(t.retry);return z===!0?{attempts:2,delay:350,factor:2}:z?{attempts:Math.max(0,Number((M=(we=z.attempts)!=null?we:z.retries)!=null?M:0)),delay:Math.max(0,Number((N=z.delay)!=null?N:350)),factor:Math.max(1,Number((S=z.factor)!=null?S:2))}:{attempts:0,delay:350,factor:2}},ce=z=>z?Array.isArray(z)?z:Array.from(z):[],le=z=>{const we=Number(z||0);return we<1024?`${we} B`:we<1024*1024?`${(we/1024).toFixed(1)} KB`:we<1024*1024*1024?`${(we/1024/1024).toFixed(1)} MB`:`${(we/1024/1024/1024).toFixed(1)} GB`},oe=()=>{var z;return String(o((z=t.acceptedFiles)!=null?z:t.accept)||"").trim()},ne=z=>{const we=oe();if(!we)return!0;const M=String(z.name||"").toLowerCase(),N=String(z.type||"").toLowerCase();return we.split(",").map(S=>S.trim().toLowerCase()).filter(Boolean).some(S=>S.startsWith(".")?M.endsWith(S):S.endsWith("/*")?N.startsWith(S.slice(0,-1)):N===S)},J=()=>n().filter(z=>z.status!=="rejected"&&z.status!=="removed"),Z=(z=0)=>J().reduce((we,M)=>we+Number(M.size||0),z),X=()=>{var z;s(n().slice()),D.classList.toggle("is-busy",n().some(we=>we.status==="uploading")),D.classList.toggle("has-files",n().some(we=>we.status!=="removed")),(z=t.onChange)==null||z.call(t,n().slice(),q)},ue=(z,we,M=null)=>{var S;const N={id:`upload_${Date.now()}_${++R}`,file:z,name:(z==null?void 0:z.name)||"file",size:Number((z==null?void 0:z.size)||0),type:(z==null?void 0:z.type)||"",status:"rejected",progress:0,error:we,detail:M,attempts:0,response:null,xhr:null};return n().push(N),(S=t.onRejected)==null||S.call(t,N,{reason:we,detail:M,api:q}),N},F=async(z,we)=>{const M=t.maxFiles==null?null:Number(o(t.maxFiles)),N=t.maxFileSize==null?null:Number(o(t.maxFileSize)),S=t.minFileSize==null?null:Number(o(t.minFileSize)),d=t.maxTotalSize==null?null:Number(o(t.maxTotalSize));if(M!=null&&we>M)return"max-files";if(N!=null&&Number(z.size||0)>N)return"max-file-size";if(S!=null&&Number(z.size||0)<S)return"min-file-size";if(d!=null&&Z(Number(z.size||0))>d)return"max-total-size";if(!ne(z))return"accept";const L=t.filter||t.acceptFile||t.validate;if(typeof L=="function"){const fe=await L(z,{files:n().slice(),api:q});if(fe===!1)return"filter";if(typeof fe=="string")return fe}return null},f=async()=>{for(const z of n()){if(z.status!=="rejected"||z.error!=="max-files")continue;const we=await F(z.file,J().length+1);if(we){z.error=we;continue}z.status="queued",z.progress=0,z.error=null,z.detail=null}},m=z=>({id:`upload_${Date.now()}_${++R}`,file:z,name:(z==null?void 0:z.name)||"file",size:Number((z==null?void 0:z.size)||0),type:(z==null?void 0:z.type)||"",status:"queued",progress:0,bytesUploaded:0,error:null,detail:null,attempts:0,response:null,xhr:null}),g=async(z,we={})=>{var S;if(w())return[];b(null);const M=ce(z),N=[];!T()&&M.length&&O({silent:!0});for(const d of M){const L=await F(d,J().length+1);if(L){ue(d,L);continue}const fe=m(d);if(n().push(fe),N.push(fe),(S=t.onAdded)==null||S.call(t,fe,{file:d,meta:we,api:q}),!T())break}return X(),N.length&&t.autoUpload&&!ee()&&u(),N},O=(z={})=>{var we;for(const M of n())M.status==="uploading"&&r(M),M.status="removed";s([]),b(null),X(),z.silent||(we=t.onClear)==null||we.call(t,q)},Q=async z=>{var N;const we=typeof z=="string"?n().find(S=>S.id===z):z;if(!we)return;we.status==="uploading"&&r(we);const M=n().filter(S=>S!==we);s(M),await f(),X(),(N=t.onRemove)==null||N.call(t,we,{api:q})},r=z=>{var M,N,S;const we=typeof z=="string"?n().find(d=>d.id===z):z;!we||we.status!=="uploading"||(we.status="canceled",we.error="canceled",(N=(M=we.xhr)==null?void 0:M.abort)==null||N.call(M),(S=t.onCancel)==null||S.call(t,we,{api:q}),X())},x=()=>n().filter(z=>z.status==="uploading").forEach(r),p=async z=>{var M,N;const we={url:o(t.url),method:o(t.method||"POST"),headers:t.headers,formFields:t.formFields||t.fields,fieldName:W(),withCredentials:!!o((M=t.withCredentials)!=null?M:t.credentials),sendRaw:!!o(t.sendRaw)};if(typeof t.factory=="function")try{const S=await t.factory(z.file,{item:z,files:n().slice(),api:q});if(S&&typeof S=="object")Object.assign(we,S);else if(S!=null)throw new Error("factory must return an object")}catch(S){throw(N=t.onFactoryFailed)==null||N.call(t,S,{item:z,api:q}),S}return we},P=(z,we,M)=>{const N=typeof we=="function"?we(M.file,{item:M,api:q}):we;N&&(N instanceof Headers?N.forEach((S,d)=>z.setRequestHeader(d,S)):Array.isArray(N)?N.forEach(S=>{Array.isArray(S)?z.setRequestHeader(S[0],S[1]):S!=null&&S.name&&z.setRequestHeader(S.name,S.value)}):typeof N=="object"&&Object.keys(N).forEach(S=>z.setRequestHeader(S,N[S])))},U=(z,we,M)=>{const N=typeof we=="function"?we(M.file,{item:M,api:q}):we;N&&(Array.isArray(N)?N.forEach(S=>{Array.isArray(S)?z.append(S[0],S[1]):S!=null&&S.name&&z.append(S.name,S.value)}):typeof N=="object"&&Object.keys(N).forEach(S=>z.append(S,N[S])))},G=(z,we)=>new Promise((M,N)=>{if(!we.url){N(new Error("UI.Upload: url is required"));return}if(typeof XMLHttpRequest!="function"){N(new Error("UI.Upload: XMLHttpRequest is not available"));return}const S=new XMLHttpRequest;z.xhr=S,S.open(String(we.method||"POST").toUpperCase(),we.url,!0),S.withCredentials=!!we.withCredentials,P(S,we.headers,z),S.upload.onprogress=L=>{var fe;L.lengthComputable&&(z.bytesUploaded=L.loaded,z.progress=Math.max(0,Math.min(100,Math.round(L.loaded/L.total*100))),(fe=t.onProgress)==null||fe.call(t,z,{event:L,api:q}),X())},S.onload=()=>{const L=S.status>=200&&S.status<300,fe={status:S.status,text:S.responseText,xhr:S};L?M(fe):N(Object.assign(new Error(`HTTP error ${S.status}`),{response:fe}))},S.onerror=()=>N(new Error("network-error")),S.onabort=()=>N(new Error("canceled"));const d=we.sendRaw?z.file:(()=>{const L=new FormData;return U(L,we.formFields,z),L.append(we.fieldName||"file",z.file,z.name),L})();S.send(d)}),de=async z=>{var N,S,d,L,fe,Fe;const we=ge();let M=we.delay;z.status="uploading",z.error=null,z.progress=Math.max(0,z.progress||0),(N=t.onStart)==null||N.call(t,z,{api:q}),X();for(let Te=0;Te<=we.attempts;Te++){z.attempts=Te+1;try{const $=await p(z),_e=typeof t.upload=="function"||typeof t.uploader=="function"?await(t.upload||t.uploader)(z.file,{item:z,options:$,progress:Re=>{var Pe;z.progress=Math.max(0,Math.min(100,Number(Re)||0)),(Pe=t.onProgress)==null||Pe.call(t,z,{api:q}),X()},api:q}):await G(z,$);return z.status="done",z.progress=100,z.response=_e,z.xhr=null,(S=t.onSuccess)==null||S.call(t,z,{response:_e,api:q}),(d=t.onComplete)==null||d.call(t,z,{response:_e,api:q}),X(),z}catch($){if(String(($==null?void 0:$.message)||$)==="canceled"||z.status==="canceled")return z.status="canceled",z.error="canceled",z.xhr=null,(L=t.onComplete)==null||L.call(t,z,{error:$,api:q}),X(),z;if(Te<we.attempts){await new Promise(_e=>setTimeout(_e,M)),M=Math.round(M*we.factor);continue}return z.status="error",z.error=$,z.xhr=null,b($),(fe=t.onError)==null||fe.call(t,z,{error:$,api:q}),(Fe=t.onComplete)==null||Fe.call(t,z,{error:$,api:q}),X(),z}}return z},A=()=>{var N;if(C||w())return;const z=n().filter(S=>S.status==="uploading").length,we=Math.max(0,ie()-z),M=n().filter(S=>S.status==="queued").slice(0,we);if(!M.length){const S=n().some(d=>d.status==="uploading");a(S),S||(N=t.onFinish)==null||N.call(t,n().slice(),{api:q});return}a(!0),M.forEach(S=>{de(S).finally(()=>A())})},u=(z=null)=>{(z?ce(z):n().filter(M=>["queued","error","canceled"].includes(M.status))).forEach(M=>{const N=typeof M=="string"?n().find(S=>S.id===M):M;N&&N.status!=="uploading"&&N.status!=="done"&&N.status!=="rejected"&&(N.status="queued",N.progress=0,N.error=null)}),X(),A()},k=z=>u([z]),I=()=>{w()||B.click()},B=_.input({type:"file",class:"cms-upload-input",name:W(),accept:oe()||null,multiple:T(),capture:t.capture||null,disabled:w(),onChange:z=>{g(z.target.files,{event:z,source:"browse"}),z.target.value=""}}),pe=_.div({class:"cms-upload-list"}),Se=_.div({class:"cms-upload-summary"}),ye=_.div({class:"cms-upload-actions"});let V=Y();const D=_.div({class:ae(["cms-upload","cms-singularity",V,me(t.box||t.variant==="box","cms-upload-box"),me(t.compact,"is-compact"),me(ee(),"is-form-mode"),me(!j(),"is-files-hidden"),t.class]),tabindex:w()?"-1":"0",role:"group","aria-disabled":w()?"true":"false"}),q={addFiles:g,browse:I,upload:u,retry:k,retryAll:()=>u(n().filter(z=>z.status==="error"||z.status==="canceled")),remove:Q,clear:O,abort:r,abortAll:x,files:()=>n().slice(),state:()=>({files:n().slice(),busy:y(),dragging:i(),error:l()}),reset:O},Ne=()=>{const z={api:q,files:n().slice(),busy:y(),disabled:w(),submitMode:ee()?"form":"upload"},we=[];return K()&&we.push(JSswift.ui.renderSlot(e,"browse",z,v.Btn({size:"sm",icon:"folder_open",label:t.browseText||"Browse",onClick:I}))),re()&&we.push(JSswift.ui.renderSlot(e,"upload",z,v.Btn({size:"sm",color:"primary",icon:"upload",label:t.uploadText||"Upload",loading:y(),disabled:w()||!n().some(M=>["queued","error","canceled"].includes(M.status)),onClick:()=>u()}))),H()&&we.push(JSswift.ui.renderSlot(e,"clear",z,v.Btn({size:"sm",color:"secondary",outline:!0,icon:"delete",label:t.clearText||"Clear",disabled:w()||!n().length,onClick:()=>O()}))),E(e,"actions",z,we)},ke=(z,we)=>{var d;const M={item:z,file:z.file,index:we,api:q,remove:()=>Q(z),retry:()=>k(z),abort:()=>r(z)},N=_.div({class:ae(["cms-upload-file",`is-${z.status}`])},_.div({class:"cms-upload-file-icon"},v.Icon({name:z.status==="done"?"check_circle":z.status==="error"||z.status==="rejected"?"error":"description"})),_.div({class:"cms-upload-file-main"},_.div({class:"cms-upload-file-name"},...E(e,"fileName",M,z.name)),_.div({class:"cms-upload-file-meta"},...E(e,"fileMeta",M,z.error?String(((d=z.error)==null?void 0:d.message)||z.error):z.status==="queued"?"Queued":z.status)),_.div({class:"cms-upload-progress",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":String(z.progress||0)},_.div({class:"cms-upload-progress-bar",style:{width:`${z.progress||0}%`}}))),_.div({class:"cms-upload-file-trailing"},_.div({class:"cms-upload-file-size"},le(z.size)),_.div({class:"cms-upload-file-actions"},...E(e,"fileActions",M,[z.status==="uploading"?v.Btn({size:"sm",outline:!0,icon:"close","aria-label":"Cancel",onClick:()=>r(z)}):null,z.status==="error"||z.status==="canceled"?v.Btn({size:"sm",outline:!0,icon:"refresh","aria-label":"Retry",onClick:()=>k(z)}):null,v.Btn({size:"sm",dense:!0,outline:!0,icon:"delete","aria-label":"Remove",onClick:()=>Q(z)})])))),S=JSswift.ui.renderSlot(e,"file",M,N);return _.div({class:"cms-upload-file-wrap","data-status":z.status,"data-id":z.id},...E(null,"default",{},S))},te=()=>{const z=n();if(ye.replaceChildren(...Ne()),pe.replaceChildren(),Se.hidden=!j(),pe.hidden=!j(),z.length)z.forEach((M,N)=>pe.appendChild(ke(M,N)));else{const M=JSswift.ui.renderSlot(e,"empty",{api:q},t.emptyText||"No files selected");pe.appendChild(_.div({class:"cms-upload-empty"},...E(null,"default",{},M)))}const we=z.filter(M=>M.status!=="rejected"&&M.status!=="removed");Se.textContent=`${we.length} file \u2022 ${le(we.reduce((M,N)=>M+Number(N.size||0),0))}`},xe=JSswift.ui.renderSlot(e,"icon",{api:q},v.Icon({name:t.icon||"cloud_upload"})),be=JSswift.ui.renderSlot(e,"title",{api:q},t.title||"Upload files"),Ce=JSswift.ui.renderSlot(e,"subtitle",{api:q},t.subtitle||(oe()?`Accepted: ${oe()}`:"Drag files here or browse from your device")),he=_.div({class:"cms-upload-dropzone",onClick:z=>{var we,M;(M=(we=z.target)==null?void 0:we.closest)!=null&&M.call(we,".cms-upload-actions, .cms-upload-list")||t.clickable!==!1&&I()},onDragenter:z=>{t.drag===!1||w()||(z.preventDefault(),c(!0),D.classList.add("is-dragging"))},onDragover:z=>{t.drag===!1||w()||z.preventDefault()},onDragleave:z=>{z.currentTarget===z.target&&(c(!1),D.classList.remove("is-dragging"))},onDrop:z=>{var we,M;t.drag===!1||w()||(z.preventDefault(),c(!1),D.classList.remove("is-dragging"),(we=t.onDrop)==null||we.call(t,z,{api:q}),g(((M=z.dataTransfer)==null?void 0:M.files)||[],{event:z,source:"drop"}))}},_.div({class:"cms-upload-head"},_.div({class:"cms-upload-icon"},...E(null,"default",{},xe)),_.div({class:"cms-upload-copy"},_.div({class:"cms-upload-title"},...E(null,"default",{},be)),_.div({class:"cms-upload-subtitle"},...E(null,"default",{},Ce))),ye),Se,pe),Le=JSswift.ui.renderSlot(e,"header",{api:q},null);return E(null,"default",{},Le).forEach(z=>D.appendChild(z)),D.appendChild(B),E(e,"default",{api:q,dropzone:he},he).forEach(z=>D.appendChild(z)),JSswift.reactive.effect(()=>{te()},"UI.Upload:render"),JSswift.reactive.effect(()=>{D.classList.toggle("is-disabled",w()),D.classList.toggle("is-form-mode",ee()),D.classList.toggle("is-files-hidden",!j());const z=Y();z!==V&&(V&&D.classList.remove(V),z&&D.classList.add(z),V=z),D.setAttribute("aria-disabled",w()?"true":"false"),B.disabled=w(),B.multiple=T(),B.name=W()},"UI.Upload:disabled"),D._upload=q,D._addFiles=g,D._browse=I,D._uploadFiles=u,D._input=B,D._dispose=()=>{C||(C=!0,x())},(Ae=JSswift._registerCleanup)==null||Ae.call(JSswift,D,D._dispose),D},v.BoxUpload=(t={})=>v.Upload({...t,box:!0}),v.boxUpload=(t={})=>v.BoxUpload(t),JSswift.ui.Upload=v.Upload,JSswift.ui.BoxUpload=v.BoxUpload,JSswift.ui.boxUpload=v.boxUpload,($o=JSswift.isDev)!=null&&$o.call(JSswift)&&(v.meta=v.meta||{},v.meta.Upload={signature:"UI.Upload(props)",description:"Professional uploader with drag/drop, validation, queue, retry, factory options, XHR progress, custom upload and slot-based rendering.",props:{url:"string",method:"POST|PUT|PATCH|string",fieldName:"string",paramName:"Alias of fieldName",headers:"object|Array|Headers|(file, ctx)=>headers",formFields:"object|Array|(file, ctx)=>fields",factory:"(file, ctx)=>object|Promise<object>",upload:"(file, ctx)=>Promise<any> custom uploader",multiple:"boolean",accept:"string",acceptedFiles:"Alias of accept",maxFiles:"number",maxFileSize:"number bytes",maxTotalSize:"number bytes",autoUpload:"boolean",parallelUploads:"number",retry:"boolean|{ attempts, delay, factor }",withCredentials:"boolean",sendRaw:"boolean",submitMode:'"upload"|"form"',uploadMode:"Alias of submitMode",showBrowse:"boolean",showUpload:"boolean",showClear:"boolean",showFiles:"boolean",browseButton:"Alias of showBrowse",uploadButton:"Alias of showUpload",clearButton:"Alias of showClear",drag:"boolean",clickable:"boolean",box:"boolean",compact:"boolean",color:"semantic state or CSS color",status:"semantic state alias",state:"semantic state alias",title:"String|Node|Function",subtitle:"String|Node|Function",emptyText:"string",slots:"{ header?, default?, icon?, title?, subtitle?, actions?, browse?, upload?, clear?, file?, fileName?, fileMeta?, fileActions?, empty? }"},slots:{header:"Content before the uploader",default:"Dropzone override (ctx: { api, dropzone })",icon:"Main icon",title:"Title content",subtitle:"Subtitle content",actions:"Actions area",browse:"Browse button",upload:"Upload button",clear:"Clear button",file:"Full file row renderer",fileName:"File name slot",fileMeta:"Status/error slot",fileActions:"Per-file actions",empty:"Empty list state"},events:["change","added","rejected","remove","start","progress","success","error","complete","finish","cancel","drop","factoryFailed"],returns:"HTMLDivElement with ._upload API, ._addFiles(files), ._uploadFiles(), ._browse(), ._dispose()"},v.meta.BoxUpload={...v.meta.Upload,signature:"UI.BoxUpload(props)",description:"Box-styled variant of UI.Upload."},v.meta.boxUpload=v.meta.BoxUpload);function kt(t,e){if(!t)return null;if(typeof t=="object"&&typeof t._bind=="function")return{get:()=>t.value,set:n=>{t.value!==n&&(t.value=n)},watch:n=>{typeof t.action=="function"&&t.action(n)}};if(Array.isArray(t)&&typeof t[0]=="function"&&typeof t[1]=="function"){const n=t[0],s=t[1];return{get:n,set:s,watch:i=>je.reactive.effect(()=>{i(n())},e||"UI:model")}}return null}const uo={classic:{side:"left",nav:"top",rows:["header","nav","body","footer"]},classicright:{side:"right",nav:"top",rows:["header","nav","body","footer"]},sidebarfullleft:{side:"left",fullSide:!0,nav:"top",rows:["header","nav","body","footer"]},sidebarfullright:{side:"right",fullSide:!0,nav:"top",rows:["header","nav","body","footer"]},appshell:{side:"left",nav:"top",rows:["header","nav","body","footer"]},dashboard:{side:"left",nav:"top",rows:["header","nav","body","footer"]},website:{side:null,nav:"top",rows:["header","nav","body","footer"]},documentation:{side:"right",nav:"left",rows:["header","body","footer"]},landing:{side:null,nav:null,rows:["header","body","footer"]}},Gl=t=>{const e=o(t);return e==null||e===!1||e===""?"":String(e).trim().toLowerCase().replace(/[\s_-]+/g,"")},Kl=(t,e)=>{if(!t||!e.main)return null;const n=t.side||(e.aside?"left":null),s=t.nav||(e.nav?"top":null),i=!!e.aside&&!!n,c=!!e.nav&&!!s,l=[c&&s==="left"?"nav":i&&n==="left"?"aside":".","main",c&&s==="right"?"nav":i&&n==="right"?"aside":"."],b=[],R=[...t.rows||[]];if(c&&s==="top"&&!R.includes("nav")){const C=R.indexOf("body");R.splice(C>=0?C:R.length,0,"nav")}for(const C of R)C==="header"&&e.header?b.push(t.fullSide&&i&&n==="left"?["aside","header","header"]:t.fullSide&&i&&n==="right"?["header","header","aside"]:["header","header","header"]):C==="nav"&&c&&s==="top"?b.push(t.fullSide&&i&&n==="left"?["aside","nav","nav"]:t.fullSide&&i&&n==="right"?["nav","nav","aside"]:["nav","nav","nav"]):C==="body"?b.push(l):C==="footer"&&e.footer&&b.push(t.fullSide&&i&&n==="left"?["aside","footer","footer"]:t.fullSide&&i&&n==="right"?["footer","footer","aside"]:["footer","footer","footer"]);return b.length?b.map(C=>`"${C.join(" ")}"`).join(" "):null};v.Layout=(...t)=>{var un,nn,sn;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=(ze,Ve)=>!!ze&&Object.prototype.hasOwnProperty.call(ze,Ve),c=()=>typeof window=="undefined"?1024:window.innerWidth,y=()=>{const ze=c(),Ve=JSswift.uiResponsivePropsFor(e,bn("mobile"))||{},et=ze>=768?JSswift.uiResponsivePropsFor(e,bn("tablet"))||{}:{},ct=ze>=1024?JSswift.uiResponsivePropsFor(e,bn("pc"))||{}:{};return{...Ve,...et,...ct}},a=(...ze)=>{for(const Ve of ze)if(i(e,Ve))return e[Ve]},l=(...ze)=>{const Ve=y();for(const et of ze)if(i(Ve,et))return Ve[et];return a(...ze)},b=(...ze)=>{const Ve=JSswift.uiResponsivePropsFor(e,bn(V()))||{};for(const et of ze)if(i(Ve,et))return Ve[et];return a(...ze)},R=()=>Gl(b("disposition","layoutDisposition","layout")),C=()=>{const ze=o(l("mode","layoutMode"));if(ze==null||ze===!1||ze==="")return"";const Ve=String(ze).trim().toLowerCase();return Ve==="global"||Ve==="local"?Ve:""},w=(ze,Ve=null)=>ze==null||ze===!1||ze===""?Ve:typeof ze=="number"?`${ze}px`:String(ze),T=(ze,Ve=null)=>{if(ze==null||ze===!1||ze==="")return Ve;if(typeof ze=="number"&&Number.isFinite(ze))return ze;const et=Number.parseFloat(String(ze));return Number.isFinite(et)?et:Ve},ee=ze=>{const Ve=o(ze);return Ve==null||Ve===!1||Ve===""?null:Array.isArray(Ve)?Ve.map(et=>`"${Array.isArray(et)?et.join(" "):String(et)}"`).join(" "):String(Ve)},K=(ze,Ve=null,et=null)=>{let ct=Number.isFinite(ze)?ze:0;return Number.isFinite(Ve)&&(ct=Math.max(Ve,ct)),Number.isFinite(et)&&(ct=Math.min(et,ct)),ct},re=a("header","headerContent"),H=a("aside","drawer"),j=a("nav","asideRight","drawerRight"),Y=a("page","main","content","body"),W=a("footer","footerContent"),ie=()=>o(l("drawerEnabled","asideEnabled")),ge=()=>o(l("navEnabled","asideRightEnabled","rightAsideEnabled")),ce=()=>ie()!==!1,le=()=>ge()===!0||o(l("noNav"))===!1,oe=()=>o(l("noDrawer"))===!0||ie()===!1||H===!1,ne=()=>o(l("noNav"))===!0||ge()===!1||j===!1,J=()=>o(l("drawerFloating"))===!0,Z=()=>o(l("navFloating"))===!0,X=()=>o(l("drawerResizable"))===!0,ue=()=>o(l("navResizable"))===!0,F=()=>T(o(l("drawerMinWidth")),180),f=()=>T(o(l("drawerMaxWidth")),null),m=()=>T(o(l("navMinWidth")),180),g=()=>T(o(l("navMaxWidth")),null),O=T(o(l("drawerWidth")),280),Q=T((un=o(l("navWidth")))!=null?un:o(l("asideRightWidth")),280),[r,x]=JSswift.reactive.signal(K(O,F(),f())),[p,P]=JSswift.reactive.signal(K(Q,m(),g())),U=kt(e.drawerOpen,"UI.Layout:drawerOpen"),G=U?!!U.get():typeof e.drawerOpen=="boolean"?!!e.drawerOpen:!0,[de,A]=JSswift.reactive.signal(G),u=ze=>{const Ve=!!ze;de()!==Ve&&A(Ve),U==null||U.set(Ve)};(nn=U==null?void 0:U.watch)==null||nn.call(U,()=>{const ze=!!U.get();de()!==ze&&A(ze)});const k=kt(e.navOpen,"UI.Layout:navOpen"),I=k?!!k.get():typeof e.navOpen=="boolean"?!!e.navOpen:!0,[B,pe]=JSswift.reactive.signal(I),Se=ze=>{const Ve=!!ze;B()!==Ve&&pe(Ve),k==null||k.set(Ve)};(sn=k==null?void 0:k.watch)==null||sn.call(k,()=>{const ze=!!k.get();B()!==ze&&pe(ze)});const ye=()=>{var ct,gt,pt;const ze=Number((ct=o(l("layoutBreakpoint")))!=null?ct:0),Ve=Number((gt=o(l("drawerBreakpoint")))!=null?gt:ze||1024),et=Number((pt=o(l("navBreakpoint")))!=null?pt:ze||Ve);return Math.max(Ve,et,0)},V=()=>{const ze=c();return ze>=1024?"pc":ze>=768?"tablet":"mobile"},[D,q]=JSswift.reactive.signal(!1),[Ne,ke]=JSswift.reactive.signal(V()),te=()=>{typeof window!="undefined"&&(ke(V()),q(window.innerWidth<ye()))};typeof window!="undefined"&&(te(),window.addEventListener("resize",te));const xe=()=>({props:e,openAside:()=>u(!0),closeAside:()=>u(!1),toggleAside:()=>u(!de()),openNav:()=>Se(!0),closeNav:()=>Se(!1),toggleNav:()=>Se(!B()),isDrawerOpen:()=>!!de(),isNavOpen:()=>!!B(),isMobile:()=>!!D(),isDrawerFloating:()=>J(),isNavFloating:()=>Z()}),be=(ze,Ve)=>{const et=xe();for(const gt of ze){if(!i(s,gt))continue;const pt=typeof s[gt]=="function"?s[gt](et):s[gt];return E(null,"default",et,pt)}const ct=typeof Ve=="function"?Ve(et):Ve;return E(null,"default",et,ct)},Ce=Y!==void 0?Y:n,he=ae(["cms-app","cms-layout",JSswift.uiResponsiveClasses({mobile:e},cn),JSswift.uiResponsiveClasses(e,cn),e.class]),Le=JSswift.omit(e,["header","headerContent","aside","drawer","nav","asideRight","drawerRight","page","main","content","body","footer","footerContent","noDrawer","drawerEnabled","asideEnabled","noNav","navEnabled","asideRightEnabled","rightAsideEnabled","drawerOpen","navOpen","layoutBreakpoint","drawerBreakpoint","navBreakpoint","drawerWidth","navWidth","asideRightWidth","drawerResizable","drawerMinWidth","drawerMaxWidth","navResizable","navMinWidth","navMaxWidth","drawerPeek","navPeek","asideRightPeek","drawerFloating","navFloating","overlayClose","escClose","stickyHeader","stickyFooter","stickyAside","stickyNav","tagPage","mode","layoutMode","disposition","layoutDisposition","layout","shellClass","headerClass","asideClass","navClass","pageClass","footerClass","overlayClass","gap","headerOffset","minHeight","areas","gridTemplateAreas","templateAreas","slots"]);Le.class=he,Le.style={...e.style||{}},JSswift.uiApplyResponsiveProps(Le,e,JSswift.uiResponsiveStyleRules);const Ae=_.div(Le),we=o(l("tagPage"))===!0?{header:"header",aside:"aside",nav:"nav",page:"main",footer:"footer"}:{header:"div",aside:"div",nav:"div",page:"div",footer:"div"},M=_.div({class:ae(["cms-layout-shell-grid",e.shellClass])}),N=_[we.header]({class:ae(["cms-layout-section","cms-layout-header","header",me(e.stickyHeader,"sticky"),e.headerClass])}),S=_[we.aside]({class:ae(["cms-layout-section","cms-layout-aside","aside",me(e.stickyAside!==!1,"sticky"),e.asideClass]),role:"navigation","aria-hidden":"true"}),d=_.div({class:"cms-layout-panel-body cms-layout-aside-body"}),L=_.div({class:"cms-layout-resize-handle cms-layout-resize-handle-drawer","aria-hidden":"true"});S.appendChild(d),S.appendChild(L);const fe=_[we.nav]({class:ae(["cms-layout-section","cms-layout-nav","nav",me(e.stickyNav,"sticky"),e.navClass]),role:we.nav==="nav"?null:"complementary","aria-hidden":"true"}),Fe=_.div({class:"cms-layout-panel-body cms-layout-nav-body"}),Te=_.div({class:"cms-layout-resize-handle cms-layout-resize-handle-nav","aria-hidden":"true"});fe.appendChild(Fe),fe.appendChild(Te);const $=_[we.page]({class:ae(["cms-layout-section","cms-layout-main","main",e.pageClass]),role:we.page==="main"?null:"main"}),_e=_[we.footer]({class:ae(["cms-layout-section","cms-layout-footer","footer",me(e.stickyFooter,"sticky"),e.footerClass])});M.appendChild(N),M.appendChild(S),M.appendChild($),M.appendChild(fe),M.appendChild(_e),Ae.appendChild(M);const Re=_.div({class:ae(["cms-aside-overlay",e.overlayClass]),onClick:()=>{o(l("overlayClose"))!==!1&&(de()&&u(!1),B()&&Se(!1))}});Ae.appendChild(Re);let Pe=!1,De=!1,We=!1,qe=!1,Ze=!1,Qe=null,Ee=null;const Be=ze=>{!ze||typeof ze!="object"||(typeof ze._dispose=="function"&&ze._dispose(),!(!ze.childNodes||!ze.childNodes.length)&&Array.from(ze.childNodes).forEach(Be))},tt=ze=>{ze&&Array.from(ze.childNodes).forEach(Ve=>{Be(Ve),Ve.remove()})},nt=ze=>{const Ve=xe(),et=typeof ze=="function"?ze(Ve):ze;return E(null,"default",Ve,et)},dt=()=>{const ze=Pe?N.getBoundingClientRect().height:0;Ae.style.setProperty("--layout-header-height",`${ze}px`)},ut=(ze,Ve)=>(tt(ze),Ve.forEach(et=>ze.appendChild(et)),Ve.length>0),bt=()=>{var ct,gt,pt,Ct,yt,h;Ae.style.setProperty("--cms-layout-drawer-width",w((ct=o(l("drawerWidth")))!=null?ct:280,"280px")),Ae.style.setProperty("--cms-layout-nav-width",w((pt=(gt=o(l("navWidth")))!=null?gt:o(l("asideRightWidth")))!=null?pt:280,"280px")),Ae.style.setProperty("--cms-layout-drawer-peek",w((Ct=o(l("drawerPeek")))!=null?Ct:20,"20px")),Ae.style.setProperty("--cms-layout-nav-peek",w((h=(yt=o(l("navPeek")))!=null?yt:o(l("asideRightPeek")))!=null?h:20,"20px"));const ze=w(o(l("gap")),null);ze!=null?Ae.style.setProperty("--cms-layout-gap",ze):Ae.style.removeProperty("--cms-layout-gap");const Ve=w(o(l("headerOffset")),null);Ve!=null&&Ae.style.setProperty("--layout-header-height",Ve);const et=w(o(l("minHeight")),null);et!=null?Ae.style.setProperty("--cms-layout-min-height",et):Ae.style.removeProperty("--cms-layout-min-height")},ot=()=>{if(X()){const ze=K(r(),F(),f());ze!==r()&&x(ze),Ae.style.setProperty("--cms-layout-drawer-width",`${ze}px`)}if(ue()){const ze=K(p(),m(),g());ze!==p()&&P(ze),Ae.style.setProperty("--cms-layout-nav-width",`${ze}px`)}},ft=(ze,Ve)=>{if(Ve.button!==0)return;const et=ze==="drawer"?S:fe;if(et.hidden)return;const ct=ze==="drawer"?r:p,gt=ze==="drawer"?x:P,pt=ze==="drawer"?F:m,Ct=ze==="drawer"?f:g,yt=et.getBoundingClientRect(),h=yt.width||ct(),se=Me=>{const Je=ze==="drawer"?Me.clientX-yt.left:yt.right-Me.clientX;gt(K(Je||h,pt(),Ct())),ot(),at()},ve=()=>{Ae.classList.remove("is-resizing-layout"),document.removeEventListener("pointermove",se,!0),document.removeEventListener("pointerup",ve,!0),Ee=null};Ae.classList.add("is-resizing-layout"),document.addEventListener("pointermove",se,!0),document.addEventListener("pointerup",ve,!0),Ee=ve,Ve.preventDefault()},vt=ze=>ft("drawer",ze),At=ze=>ft("nav",ze);L.addEventListener("pointerdown",vt),Te.addEventListener("pointerdown",At);const at=()=>{const ze=!!D(),Ve=!!de(),et=!!B(),ct=!oe()&&ce()&&De,gt=!ne()&&le()&&We,pt=ct&&(ze||J()),Ct=gt&&(ze||Z()),yt=ct&&Ve,h=gt&&et,se=yt&&!pt,ve=h&&!Ct,Me=se&&X(),Je=ve&&ue(),Oe=yt&&pt||h&&Ct;bt(),ot(),Ae.classList.toggle("is-mobile",ze),Ae.classList.toggle("drawer-open",yt),Ae.classList.toggle("nav-open",h),Ae.classList.toggle("no-drawer",!ct),Ae.classList.toggle("no-nav",!gt),Ae.classList.toggle("has-header",Pe),Ae.classList.toggle("has-drawer",ct),Ae.classList.toggle("has-nav",gt),Ae.classList.toggle("has-footer",Ze),Ae.classList.toggle("drawer-floating",pt),Ae.classList.toggle("nav-floating",Ct);const He=R(),Xe=He?C():"";Ae.dataset.disposition=He||"",Ae.dataset.layoutMode=Xe||"",Ae.classList.toggle("has-disposition",!!He),Ae.classList.toggle("mode-local",Xe==="local"),Ae.classList.toggle("mode-global",Xe==="global"),N.classList.toggle("sticky",o(l("stickyHeader"))===!0),_e.classList.toggle("sticky",o(l("stickyFooter"))===!0),S.classList.toggle("sticky",o(l("stickyAside"))!==!1),fe.classList.toggle("sticky",o(l("stickyNav"))===!0),N.hidden=!Pe,_e.hidden=!Ze,$.hidden=!qe,Re.hidden=!(pt||Ct),Re.classList.toggle("show",Oe),S.hidden=!ct||!yt&&!pt,S.classList.toggle("open",yt),S.classList.toggle("is-floating",pt),S.classList.toggle("is-resizable",Me),S.setAttribute("aria-hidden",yt?"false":"true"),L.hidden=!Me,fe.hidden=!gt||!h&&!Ct,fe.classList.toggle("open",h),fe.classList.toggle("is-floating",Ct),fe.classList.toggle("is-resizable",Je),fe.setAttribute("aria-hidden",h?"false":"true"),Te.hidden=!Je;const it=uo[He]||null,ht=(it==null?void 0:it.side)||(se&&it?"left":null),xt=(it==null?void 0:it.nav)||(ve&&it?"top":null),$t=se?it?ht:"left":"",zt=ve?it?xt==="left"||xt==="right"?xt:"":"right":"";Ae.classList.toggle("drawer-left",ct&&ht==="left"),Ae.classList.toggle("drawer-right",ct&&ht==="right"),Ae.classList.toggle("nav-top",ve&&xt==="top"),Ae.classList.toggle("nav-side",ve&&(zt==="left"||zt==="right")),M.style.gridTemplateColumns=[$t==="left"?"minmax(0, var(--cms-layout-drawer-width))":zt==="left"?"minmax(0, var(--cms-layout-nav-width))":"0px","minmax(0, 1fr)",$t==="right"?"minmax(0, var(--cms-layout-drawer-width))":zt==="right"?"minmax(0, var(--cms-layout-nav-width))":"0px"].join(" ");const Ft=['"header header header"',`"${se?"aside":"."} main ${ve?"nav":"."}"`,'"footer footer footer"'].join(" "),on=Kl(uo[He],{header:Pe,aside:se,nav:ve,main:qe,footer:Ze});M.style.gridTemplateAreas=ee(b("areas","gridTemplateAreas","templateAreas"))||on||Ft},Vt=(ze,Ve)=>(Pe=ut(N,nt(ze)),dt(),at(),Ve&&JSswift.router.setURLOnly(Ve),N),Jt=(ze,Ve)=>(De=ut(d,nt(ze)),De||u(!1),at(),Ve&&JSswift.router.setURLOnly(Ve),S),wt=(ze,Ve)=>(We=ut(Fe,nt(ze)),We||Se(!1),at(),Ve&&JSswift.router.setURLOnly(Ve),fe),qt=(ze,Ve)=>(qe=ut($,nt(ze)),at(),Ve&&JSswift.router.setURLOnly(Ve),$),St=(ze,Ve)=>(Ze=ut(_e,nt(ze)),at(),Ve&&JSswift.router.setURLOnly(Ve),_e);Pe=ut(N,be(["header"],re)),De=ut(d,H===!1?[]:be(["aside","drawer"],H)),We=ut(Fe,j===!1?[]:be(["nav","asideRight","drawerRight"],j)),qe=ut($,be(["page","main","default"],Ce)),Ze=ut(_e,be(["footer"],W)),typeof ResizeObserver!="undefined"&&(Qe=new ResizeObserver(()=>dt()),Qe.observe(N)),dt(),JSswift.reactive.effect(()=>{Ne(),D(),de(),B(),at()},"UI.Layout:state");const dn=ze=>{o(l("escClose"))!==!1&&(!D()&&!J()&&!Z()||!de()&&!B()||ze.key==="Escape"&&(ze.preventDefault(),de()&&u(!1),B()&&Se(!1)))};return typeof document!="undefined"&&document.addEventListener("keydown",dn,!0),Ae.openAside=()=>u(!0),Ae.closeAside=()=>u(!1),Ae.toggleAside=()=>u(!de()),Ae.openNav=()=>Se(!0),Ae.closeNav=()=>Se(!1),Ae.toggleNav=()=>Se(!B()),Ae.isDrawerOpen=()=>!!de(),Ae.isNavOpen=()=>!!B(),Ae.isMobile=()=>!!D(),Ae.header=()=>N,Ae.aside=()=>S,Ae.drawer=()=>S,Ae.nav=()=>fe,Ae.page=()=>$,Ae.main=()=>$,Ae.footer=()=>_e,Ae.headerUpdate=Vt,Ae.asideUpdate=Jt,Ae.drawerUpdate=Jt,Ae.navUpdate=wt,Ae.pageUpdate=qt,Ae.mainUpdate=qt,Ae.footerUpdate=St,Ae.reflow=at,Ae._dispose=()=>{var ze;typeof window!="undefined"&&window.removeEventListener("resize",te),typeof document!="undefined"&&document.removeEventListener("keydown",dn,!0),L.removeEventListener("pointerdown",vt),Te.removeEventListener("pointerdown",At),Ee==null||Ee(),(ze=Qe==null?void 0:Qe.disconnect)==null||ze.call(Qe)},Ke(Ae,e),at(),Ae},(Bo=JSswift.isDev)!=null&&Bo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Layout={signature:"UI.Layout(...children) | UI.Layout(props, ...children)",props:{header:"Node|Function|Array",headerContent:"Node|Function|Array",aside:"Node|Function|Array|false",drawer:"Node|Function|Array|false",nav:"Node|Function|Array|false",asideRight:"Node|Function|Array|false",drawerRight:"Node|Function|Array|false",page:"Node|Function|Array",main:"Node|Function|Array",content:"Node|Function|Array",body:"Node|Function|Array",footer:"Node|Function|Array",footerContent:"Node|Function|Array",noDrawer:"boolean",drawerEnabled:"boolean",asideEnabled:"boolean",noNav:"boolean",navEnabled:"boolean",asideRightEnabled:"boolean",drawerOpen:"rod | [get,set] signal | boolean",navOpen:"rod | [get,set] signal | boolean",layoutBreakpoint:"number(px)",drawerBreakpoint:"number(px)",navBreakpoint:"number(px)",drawerWidth:"number|string",drawerResizable:"boolean",drawerMinWidth:"number|string",drawerMaxWidth:"number|string",navWidth:"number|string",navResizable:"boolean",navMinWidth:"number|string",navMaxWidth:"number|string",asideRightWidth:"number|string",drawerPeek:"number|string",navPeek:"number|string",asideRightPeek:"number|string",drawerFloating:"boolean",navFloating:"boolean",overlayClose:"boolean",escClose:"boolean",stickyHeader:"boolean",stickyFooter:"boolean",stickyAside:"boolean",stickyNav:"boolean",tagPage:"boolean",mode:"local|global",layoutMode:"alias di mode",disposition:"classic|classicRight|sidebarFullLeft|sidebarFullRight|appShell|dashboard|website|documentation|landing",layoutDisposition:"alias di disposition",layout:"alias di disposition",gap:"number|string",headerOffset:"number|string",minHeight:"number|string",areas:"string|array",gridTemplateAreas:"string|array",templateAreas:"string|array",mobile:"{ disposition?, mode?, gap?, minHeight?, areas?, gridTemplateAreas?, drawerWidth?, navWidth?, drawerFloating?, navFloating?, noDrawer?, noNav? }",tablet:"{ disposition?, mode?, gap?, minHeight?, areas?, gridTemplateAreas?, drawerWidth?, navWidth?, drawerFloating?, navFloating?, noDrawer?, noNav? }",pc:"{ disposition?, mode?, gap?, minHeight?, areas?, gridTemplateAreas?, drawerWidth?, navWidth?, drawerFloating?, navFloating?, noDrawer?, noNav? }",shellClass:"string",headerClass:"string",asideClass:"string",navClass:"string",pageClass:"string",footerClass:"string",overlayClass:"string",slots:"{ header?, aside?, drawer?, nav?, asideRight?, drawerRight?, page?, main?, footer?, default? }",class:"string",style:"object"},slots:{header:"Header content",aside:"Aside / drawer content",drawer:"Alias of aside",nav:"Right-side panel content",asideRight:"Alias of nav",drawerRight:"Alias of nav",page:"Page content",main:"Alias of page",footer:"Footer content",default:"Fallback page content"},returns:"HTMLDivElement with openAside/closeAside/toggleAside/openNav/closeNav/toggleNav methods, isDrawerOpen/isNavOpen/isMobile/reflow, header()/aside()/nav()/page()/footer(), headerUpdate/asideUpdate/navUpdate/pageUpdate/mainUpdate/footerUpdate and _dispose()",description:"Composable shell layout with independent left drawer and right nav, configurable widths, optional resize with min/max, optional floating mode, and runtime section updates."}),v.Footer=(...t)=>{var ue,F,f;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=m=>Object.prototype.hasOwnProperty.call(e,m),c={props:e},y=(m,g)=>{if(!(g==null||g===!1)){if(Array.isArray(g)){g.forEach(O=>y(m,O));return}if(g!=null&&g.nodeType){m.appendChild(g);return}m.appendChild(document.createTextNode(String(g)))}},a=(m,g,O=Q=>Q)=>{const Q=JSswift.ui.getSlot(s,m);if(Q!=null)return E(s,m,c,null);if(typeof g=="function"){const r=new Set(["eyebrow","title","subtitle"]),x=_[r.has(m)?"span":"div"]({class:`cms-footer-slot-${m}`});return JSswift.reactive.effect(()=>{const p=O(g(c)),P=rn(JSswift.ui.slot(p));x.replaceChildren(),Array.isArray(P)?P.forEach(U=>y(x,U)):y(x,P)},`UI.Footer:${m}`),[x]}return E(s,m,c,O(g))},l=(m,g="icon",O=e.iconSize||e.size||"md")=>m==null||m===!1?null:typeof m=="string"?v.Icon({name:m,size:O}):JSswift.ui.slot(m,{as:g}),b=i("left")?e.left:e.start,R=i("right")?e.right:e.end,C=i("title")?e.title:e.label,w=(F=(ue=e.subtitle)!=null?ue:e.description)!=null?F:e.note,T=i("content")?e.content:i("body")?e.body:n!=null&&n.length?n:null,ee=[...a("left",b),...a("start",null)],K=a("icon",e.icon,l),re=a("eyebrow",(f=e.eyebrow)!=null?f:e.kicker),H=a("title",C),j=a("subtitle",w),Y=a("meta",e.meta),W=(()=>{const m=a("content",null);return m.length?m:a("default",T)})(),ie=[...a("center",null),...a("body",null)],ge=[...a("right",R),...a("end",null)],ce=a("actions",e.actions),le=_.div({class:ae(["cms-footer-body",e.bodyClass,e.centerClass])},_.div({class:"cms-footer-heading"},K.length?_.div({class:"cms-footer-icon"},...K):null,_.div({class:"cms-footer-copy"},re.length?_.div({class:ae(["cms-footer-eyebrow",e.eyebrowClass])},...re):null,H.length?_.div({class:ae(["cms-footer-title",e.titleClass])},...H):null,j.length?_.div({class:ae(["cms-footer-subtitle",e.subtitleClass])},...j):null,W.length?_.div({class:ae(["cms-footer-content",e.contentClass])},...W):null),Y.length?_.div({class:ae(["cms-footer-meta",e.metaClass])},...Y):null)),oe=[];ie.length?oe.push(_.div({class:ae(["cms-footer-body",e.bodyClass,e.centerClass])},...ie)):(K.length||re.length||H.length||j.length||W.length||Y.length)&&oe.push(le),(ge.length||ce.length)&&oe.push(_.div({class:ae(["cms-footer-end",e.endClass])},...ge,...ce.length?[_.div({class:ae(["cms-footer-actions",e.actionsClass])},...ce)]:[]));const ne=JSswift.omit(e,["actions","actionsClass","align","body","bodyClass","center","centerClass","content","contentClass","dense","description","divider","elevated","end","endClass","eyebrow","eyebrowClass","gap","icon","iconSize","kicker","label","left","meta","metaClass","minHeight","note","right","slots","stack","start","startClass","sticky","subtitle","subtitleClass","title","titleClass","wrap","justify"]);ne.class=ae(["cms-panel","cms-footer","cms-singularity",me(e.sticky,"sticky"),me(e.dense,"dense"),me(e.elevated,"elevated"),me(e.divider!==!1,"divider"),me(e.stack,"stack"),co(e.align,"align-"),e.class]),ne.style={...e.style||{}};const J=Ie(e.justify);J!=null&&(ne.style.justifyContent=J);const Z=Ie(e.wrap,m=>m?"wrap":"nowrap");Z!=null&&(ne.style.flexWrap=Z),e.gap!=null&&(ne.style["--cms-footer-gap"]=$e(o(e.gap))),e.minHeight!=null&&(ne.style.minHeight=$e(o(e.minHeight))),JSswift.uiApplyResponsiveProps(ne,e,JSswift.uiResponsiveStyleRules);const X=_.footer(ne,...ee.length?[_.div({class:ae(["cms-footer-start",e.startClass])},...ee)]:[],...oe.length?[_.div({class:"cms-footer-main"},...oe)]:[]);return Ke(X,e),X},(Uo=JSswift.isDev)!=null&&Uo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Footer={signature:"UI.Footer(...children) | UI.Footer(props, ...children)",props:{title:"String|Node|Function|Array",subtitle:"String|Node|Function|Array",eyebrow:"String|Node|Function|Array",content:"Node|Function|Array",meta:"Node|Function|Array",icon:"String|Node|Function|Array",left:"Node|Function|Array",start:"Alias of left",right:"Node|Function|Array",end:"Alias of right",body:"Alias of content",actions:"Node|Function|Array",sticky:"boolean",dense:"boolean",elevated:"boolean",divider:"boolean",align:"left|center|right",justify:"flex-start|center|flex-end|space-between|space-around|space-evenly",wrap:"boolean",stack:"boolean",gap:"string|number",minHeight:"string|number",slots:"{ left?, start?, right?, end?, center?, body?, icon?, eyebrow?, title?, subtitle?, meta?, content?, actions?, default? }",class:"string",style:"object"},slots:{left:"Footer leading area",start:"Alias/addon for the leading area",right:"Footer trailing area",end:"Alias/addon for the trailing area",center:"Full override for the central body",body:"Alias of center",icon:"Leading icon",eyebrow:"Eyebrow / kicker",title:"Main title",subtitle:"Subtitle or note",meta:"Meta info next to the central content",content:"Extra content or children fallback",actions:"Actions grouped in the trailing area",default:"Fallback content for the body area"},returns:"HTMLElement <footer>",description:"Structured footer with start/body/end regions, optional copy, actions, and composable slots."});const _r=t=>{const e=[];for(const n of t||[]){const s=rn(JSswift.ui.slot(n));s&&(Array.isArray(s)?e.push(...s):e.push(s))}return e},Ln=(t,e)=>{const n=rn(JSswift.ui.slot(t,e));return n?Array.isArray(n)?n:[n]:[]},$e=t=>{var e;return typeof t=="number"?`${t}px`:typeof t=="string"&&((e=JSswift.uiSizes)!=null&&e.includes(t))?`var(--cms-size-${t})`:String(t)};v.Toolbar=(...t)=>{var g,O,Q,r,x,p,P,U;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=(G,de,A={})=>{const u=Array.isArray(G)?G:[G];for(const k of u)if(JSswift.ui.getSlot(s,k)!=null)return E(s,k,A,de);return de==null?[]:E(null,"default",A,de)},c=G=>(Array.isArray(G)?G:[G]).some(A=>JSswift.ui.getSlot(s,A)!=null),y={props:e},a=i(["before"],e.before,y),l=i(["start","left"],(g=e.start)!=null?g:e.left,y),b=i(["center","body","content","default"],(r=(Q=(O=e.center)!=null?O:e.body)!=null?Q:e.content)!=null?r:n,y),R=i(["end","right","actions"],(p=(x=e.end)!=null?x:e.right)!=null?p:e.actions,y),C=i(["after"],e.after,y),w=i(["title"],e.title,y),T=i(["subtitle"],e.subtitle,y),ee=i(["meta"],e.meta,y),K=!!(a.length||l.length||R.length||C.length||w.length||T.length||ee.length||e.before!=null||e.start!=null||e.left!=null||e.end!=null||e.right!=null||e.actions!=null||e.after!=null||e.title!=null||e.subtitle!=null||e.meta!=null||e.body!=null||e.center!=null||e.content!=null||e.beforeClass||e.startClass||e.bodyClass||e.centerClass||e.contentClass||e.endClass||e.afterClass||e.titleClass||e.subtitleClass||e.metaClass||e.copyClass||c(["before","start","left","center","body","content","end","right","actions","after","title","subtitle","meta"])),re=ae(["cms-toolbar",me(K,"structured"),me(e.dense,"dense"),me(e.divider,"divider"),me(e.elevated,"elevated"),me(e.sticky,"sticky"),e.class]),H=JSswift.omit(e,["actions","after","afterClass","align","before","beforeClass","body","bodyClass","center","centerClass","content","contentClass","copyClass","dense","divider","elevated","end","endClass","gap","justify","left","meta","metaClass","right","size","slots","start","startClass","sticky","subtitle","subtitleClass","title","titleClass","wrap"]);H.class=re;const j={...e.style||{}};j.display=j.display||"flex";const Y=Ie(e.align),W=Ie(e.justify),ie=Ie(e.wrap,G=>typeof G=="boolean"?G?"wrap":"nowrap":String(G),"wrap"),ge=Ie(e.gap,$e,"var(--cms-s-md)"),ce=Ue(e,"gap");j["--cms-toolbar-gap"]=ge!=null?ge:"var(--cms-s-md)",ce||(j.gap=j.gap||"var(--cms-toolbar-gap)");const le={xxs:"4px 6px",xs:"6px 8px",sm:"6px 10px",md:"10px 12px",lg:"12px 16px",xl:"14px 18px",xxl:"16px 20px"},oe=Ie(e.size,G=>le[G]||"");if(oe!=null&&(j.padding=oe),K?(j.flexDirection=j.flexDirection||"column",j.alignItems=j.alignItems||"stretch"):(Y!=null&&(j.alignItems=Y),W!=null&&(j.justifyContent=W),ie!=null&&(j.flexWrap=ie)),Object.keys(j).length&&(H.style=j),JSswift.uiApplyResponsiveProps(H,e,JSswift.uiResponsiveStyleRules),!K){const G=E(s,"default",y,n),de=_.div(H,...G);return Ke(de,e),de}const ne=(U=(P=e.bodyClass)!=null?P:e.centerClass)!=null?U:e.contentClass,J=Ye([e.justify],()=>{const G=o(e.justify);return!G||G==="flex-start"?"auto":""}),Z={display:"flex",alignItems:"inherit",gap:"var(--cms-toolbar-gap)",flexWrap:"inherit",minWidth:0},X={};Y!=null&&(X.alignItems=Y),W!=null&&(X.justifyContent=W),ie!=null&&(X.flexWrap=ie);const ue=ee.length||w.length||T.length?_.div({class:ae(["cms-toolbar-copy",e.copyClass])},ee.length?_.div({class:ae(["cms-toolbar-meta",e.metaClass])},...ee):null,w.length?_.div({class:ae(["cms-toolbar-title",e.titleClass])},...w):null,T.length?_.div({class:ae(["cms-toolbar-subtitle",e.subtitleClass])},...T):null):null,F=!!(l.length||ue||b.length||R.length),f=[a.length?_.div({class:ae(["cms-toolbar-before",e.beforeClass]),style:{...Z}},...a):null,F?_.div({class:"cms-toolbar-main",style:X},l.length?_.div({class:ae(["cms-toolbar-start",e.startClass]),style:{...Z}},...l):null,ue||b.length?_.div({class:ae(["cms-toolbar-center",ne]),style:{...Z,flex:"1 1 240px"}},ue,...b):null,R.length?_.div({class:ae(["cms-toolbar-end",e.endClass]),style:{...Z,justifyContent:"flex-end",marginInlineStart:J}},...R):null):null,C.length?_.div({class:ae(["cms-toolbar-after",e.afterClass]),style:{...Z}},...C):null].filter(Boolean),m=_.div(H,...f);return Ke(m,e),m},(Wo=JSswift.isDev)!=null&&Wo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Toolbar={signature:"UI.Toolbar(...children) | UI.Toolbar(props, ...children)",props:{before:"Node|Function|Array",start:"Node|Function|Array",left:"Alias of start",center:"Node|Function|Array",body:"Alias of center",content:"Alias of center",title:"String|Node|Function|Array",subtitle:"String|Node|Function|Array",meta:"String|Node|Function|Array",end:"Node|Function|Array",right:"Alias of end",actions:"Alias of end",after:"Node|Function|Array",dense:"boolean",divider:"boolean",elevated:"boolean",sticky:"boolean",wrap:"boolean|string",align:"stretch|flex-start|center|flex-end|baseline",justify:"flex-start|center|flex-end|space-between|space-around|space-evenly",gap:"string|number (e.g. '8px' or 'var(--cms-s-md)')",size:"xxs|xs|sm|md|lg|xl|xxl",beforeClass:"string",startClass:"string",bodyClass:"string",centerClass:"Alias of bodyClass",contentClass:"Alias of bodyClass",copyClass:"string",titleClass:"string",subtitleClass:"string",metaClass:"string",endClass:"string",afterClass:"string",slots:"{ before?, start?, left?, center?, body?, content?, title?, subtitle?, meta?, end?, right?, actions?, after?, default? }",class:"string",style:"object"},slots:{before:"Optional top row",start:"Leading content area",left:"Alias of start",center:"Main content area",body:"Alias of center",content:"Alias of center",title:"Toolbar main title",subtitle:"Subtitle or operational note",meta:"Meta info/chips above or next to the title",end:"Trailing actions area",right:"Alias of end",actions:"Alias of end",after:"Optional bottom row",default:"Fallback content / children"},events:{onClick:"MouseEvent"},description:"Composable toolbar with before/start/center/end/after regions, optional copy, and fallback compatible with simple flex usage.",returns:"HTMLDivElement"});const ql=t=>{var e;return t&&t.nodeType===1&&((e=t.classList)==null?void 0:e.contains("cms-grid-col"))};v.Grid=(...t)=>{var m,g,O,Q;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=o(e.items),c=Array.isArray(i)?i:i==null?[]:[i],y=(r={})=>{const x=e.itemProps||{},p={...x,...r};return p.class=ae([x.class,e.itemClass,r.class]),p.style={...x.style||{},...e.itemStyle||{},...r.style||{}},p},a=(r,x={})=>{if(r==null||r===!1)return[];if(ql(r))return[r];if(kn(r)){const p=r.children!=null?en(r.children):r.content!=null?en(r.content):r.node!=null?en(r.node):r.label!=null?en(r.label):[];return[v.GridCol(y(r),...p)]}return Array.isArray(r)?[v.GridCol(y(x),...r)]:[v.GridCol(y(x),r)]},l=(r,x,p,P=!0)=>{if(r==null||r===!1)return[];const U=kn(r)?r:{};if(P){const G={item:r,index:x,count:p,first:x===0,last:x===p-1},de=E(s,"item",G,null);if(de.length)return de.flatMap(A=>a(A,U))}return a(r,U)},b=[];c.forEach((r,x)=>{b.push(...l(r,x,c.length))}),E(s,"default",{items:c,count:c.length},n).forEach(r=>{b.push(...a(r))}),b.length||E(s,"empty",{items:c,count:0},e.empty).forEach(x=>{const p=a(x,{style:{gridColumn:"1 / -1"}});b.push(...p)});const C=ae(["cms-grid",JSswift.uiResponsiveClasses({mobile:e},ro),JSswift.uiResponsiveClasses(e,ro),me(e.dense,"dense"),me(e.inline,"cms-grid-inline"),me(e.debug,"cms-grid-debug"),e.class]),w=JSswift.omit(e,["gap","rowGap","columnGap","colGap","cols","columns","rows","areas","align","justify","alignItems","justifyItems","placeItems","placeContent","dense","flow","inline","debug","autoFit","autoFill","min","max","autoRows","items","itemClass","itemStyle","itemProps","empty","slots","full","width","minWidth","maxWidth","padding",...JSswift.uiResponsiveOmitProps]);w.class=C;const T={...e.style||{}};(m=JSswift.uiResponsiveHasConfig)!=null&&m.call(JSswift,e)&&e.display==null&&!Ue(e,"display")&&T.display==null&&(T.display=e.inline?"inline-grid":"grid");const ee=Ie(e.gap,$e);ee!=null&&!Ue(e,"gap")&&(T["--cms-grid-gap"]=ee,T.gap=ee);const K=Ie(e.rowGap,$e);K!=null&&!Ue(e,"rowGap")&&(T.rowGap=K);const re=Ie((g=e.columnGap)!=null?g:e.colGap,$e);re!=null&&!Ue(e,["columnGap","colGap"])&&(T.columnGap=re);const H=Ie(e.max,$e,"1fr"),j=Ie(e.min,$e);if(j!=null){const r=o(e.autoFill)?"auto-fill":"auto-fit";T.gridTemplateColumns=`repeat(${r}, minmax(${j}, ${H||"1fr"}))`}else{const r=Ie((O=e.columns)!=null?O:e.cols,x=>typeof x=="number"?`repeat(${x}, minmax(0, 1fr))`:String(x));r!=null&&!Ue(e,["cols","columns"])&&(T.gridTemplateColumns=r)}const Y=Ie(e.rows,r=>typeof r=="number"?`repeat(${r}, minmax(0, auto))`:String(r));Y!=null&&(T.gridTemplateRows=Y);const W=Ie(e.autoRows,$e);W!=null&&(T.gridAutoRows=W);const ie=Ie(e.flow,r=>{const x=String(r);return e.dense&&!x.includes("dense")?`${x} dense`:x});ie!=null&&!Ue(e,"flow")&&(T.gridAutoFlow=ie);const ge=Ie(e.areas,r=>Array.isArray(r)?r.map(x=>`"${Array.isArray(x)?x.join(" "):String(x)}"`).join(" "):String(r));ge!=null&&(T.gridTemplateAreas=ge);const ce=Ie((Q=e.align)!=null?Q:e.alignItems);ce!=null&&!Ue(e,["align","alignItems"])&&(T.alignItems=ce);const le=Ie(e.justify);le!=null&&!Ue(e,"justify")&&(T.justifyContent=le);const oe=Ie(e.justifyItems);oe!=null&&(T.justifyItems=oe);const ne=Ie(e.placeItems);ne!=null&&(T.placeItems=ne);const J=Ie(e.placeContent);J!=null&&(T.placeContent=J);const Z=Ie(e.width,$e);Z!=null&&!Ue(e,"width")&&(T.width=Z),o(e.full)===!0&&(T.width="100%");const X=Ie(e.minWidth,$e);X!=null&&!Ue(e,"minWidth")&&(T.minWidth=X);const ue=Ie(e.maxWidth,$e);ue!=null&&!Ue(e,"maxWidth")&&(T.maxWidth=ue);const F=Ie(e.padding,$e);F!=null&&!Ue(e,"padding")&&(T.padding=F),Object.keys(T).length&&(w.style=T),JSswift.uiApplyResponsiveProps(w,e,JSswift.uiResponsiveStyleRules);const f=_.div(w,...b);return Ke(f,e),f},(Go=JSswift.isDev)!=null&&Go.call(JSswift)&&(v.meta=v.meta||{},v.meta.Grid={signature:"UI.Grid(...children) | UI.Grid(props, ...children)",props:{cols:"number|string",columns:"alias di cols",min:"string|number (auto-fit/auto-fill min width)",max:"string|number (max track size, default 1fr)",gap:"string|number",rowGap:"string|number",columnGap:"string|number",colGap:"alias di columnGap",rows:"number|string",autoRows:"string|number",areas:"string|array",flow:"row|column|dense|row dense|column dense",align:"stretch|start|center|end",alignItems:"alias di align",justify:"start|center|end|space-between|space-around|space-evenly",justifyItems:"stretch|start|center|end",placeItems:"string",placeContent:"string",dense:"boolean",inline:"boolean",debug:"boolean",autoFit:"boolean",autoFill:"boolean",full:"boolean",width:"string|number",minWidth:"string|number",maxWidth:"string|number",padding:"string|number",mobile:"{ cols?, gap?, flow?, width?, padding? }",tablet:"{ cols?, gap?, flow?, width?, padding? }",pc:"{ cols?, gap?, flow?, width?, padding? }",items:"Array<Node|Object|string>",itemClass:"string",itemStyle:"object",itemProps:"object",empty:"String|Node|Function|Array",slots:"{ default?, item?, empty? }",class:"string",style:"object"},slots:{default:"Grid content fallback",item:"Render custom di ogni item ({ item, index, count, first, last })",empty:"Empty state della griglia"},returns:"HTMLDivElement",description:"Griglia dichiarativa per layout responsive: supporta children, items/slot item, auto-fit, template custom e empty state."}),v.GridCol=(...t)=>{var Ce,he,Le,Ae,z,we,M,N;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=S=>Object.prototype.hasOwnProperty.call(e,S),c=(S,d,L={})=>{const fe=Array.isArray(S)?S:[S];for(const Fe of fe)if(JSswift.ui.getSlot(s,Fe)!=null)return E(s,Fe,L,d);return d==null?[]:E(null,"default",L,d)},y=S=>{var d;return S==null||S===!1||S===""?"":typeof S=="string"&&((d=JSswift.uiSizes)!=null&&d.includes(S))?`var(--cms-s-${S})`:$e(S)},a=S=>{var d;return S==null||S===!1||S===""?"":typeof S=="string"&&((d=JSswift.uiSizes)!=null&&d.includes(S))?gs(S,"size"):$e(S)},l={...e.style||{}},b=S=>{if(S==null||S==="")return null;if(S==="auto")return"auto";if(S==="full"||S===!0)return"1 / -1";const d=Number(S);if(Number.isFinite(d)&&d>0){const L=Math.max(1,Math.round(d));return`span ${L} / span ${L}`}return String(S)},R=S=>{if(S==null||S==="")return null;if(S==="full"||S===!0)return"1 / -1";const d=Number(S);if(Number.isFinite(d)&&d>0){const L=Math.max(1,Math.round(d));return`span ${L} / span ${L}`}return String(S)},C=i("span")?e.span:e.col,w=Ie(C,b),T=Ie(e.sm,b),ee=Ie(e.md,b),K=Ie(e.lg,b),re=JSswift.uiResponsivePropsFor(e,bn("tablet"))||{},H=JSswift.uiResponsivePropsFor(e,bn("pc"))||{},j=(Ce=re.span)!=null?Ce:re.col,Y=(he=H.span)!=null?he:H.col,W=Ie(j,b),ie=Ie(Y,b),ge=Ie(e.rowSpan,R),ce=Ie(e.row,R),le=Ie(e.area),oe=Ie(e.align),ne=Ie(e.justify),J=Ie(e.place),Z=Ie(e.gap,y),X=Ie(e.rowGap,y),ue=Ie(e.columnGap,y),F=Ie(e.padding,y),f=Ie(e.width,a),m=Ie(e.minHeight,a),g=Ie(e.height,a),O=Ie(e.maxHeight,a),Q=Ie(e.contentAlign),r=Ie(e.contentJustify),x=Ie(e.direction),p=Ie(e.scroll,S=>S===!0?"auto":String(S),""),P=Ie(e.fullHeight,S=>S?"100%":"",""),U=Ye([e.center,e.contentAlign,e.contentJustify],()=>!!o(e.center)&&(o(e.contentAlign)==null||o(e.contentAlign)==="")&&(o(e.contentJustify)==null||o(e.contentJustify)==="")),G={props:e},de=c(["start","top","header","before"],(z=(Ae=(Le=e.start)!=null?Le:e.top)!=null?Ae:e.header)!=null?z:e.before,G),A=i("body")?e.body:i("content")?e.content:n,u=c(["body","content","default"],A,G),k=c(["end","bottom","footer","after"],(N=(M=(we=e.end)!=null?we:e.bottom)!=null?M:e.footer)!=null?N:e.after,G),I=de.length||k.length||i("start")||i("top")||i("header")||i("before")||i("body")||i("content")||i("end")||i("bottom")||i("footer")||i("after")||e.startClass||e.bodyClass||e.contentClass||e.endClass||e.topClass||e.headerClass||e.bottomClass||e.footerClass||JSswift.ui.getSlot(s,"start")!=null||JSswift.ui.getSlot(s,"top")!=null||JSswift.ui.getSlot(s,"header")!=null||JSswift.ui.getSlot(s,"before")!=null||JSswift.ui.getSlot(s,"body")!=null||JSswift.ui.getSlot(s,"content")!=null||JSswift.ui.getSlot(s,"end")!=null||JSswift.ui.getSlot(s,"bottom")!=null||JSswift.ui.getSlot(s,"footer")!=null||JSswift.ui.getSlot(s,"after")!=null,B=Ye([e.stack,e.gap,e.rowGap,e.columnGap,e.contentAlign,e.contentJustify,e.direction,e.center],()=>I||o(e.stack)||[o(e.gap),o(e.rowGap),o(e.columnGap),o(e.contentAlign),o(e.contentJustify),o(e.direction)].some(d=>d!=null&&d!==!1&&d!=="")?!0:!!o(e.center)),pe=Ye([e.panel,e.color,e.clickable,e.border,e.glossy,e.glow,e.glass,e.shadow,e.outline,e.gradient,e.textGradient,e.lightShadow,e.radius],()=>!!(o(e.panel)||o(e.color)||o(e.clickable)||o(e.border)||o(e.glossy)||o(e.glow)||o(e.glass)||o(e.shadow)||o(e.outline)||o(e.gradient)||o(e.textGradient)||o(e.lightShadow)||o(e.radius))?["cms-clear-set","cms-singularity","cms-grid-col-surface"]:[]),Se=ae(["cms-grid-col",pe,JSswift.uiResponsiveClasses({mobile:e},ao),JSswift.uiResponsiveClasses(e,ao),me(e.panel,"cms-grid-col-panel"),me(e.auto,"is-auto"),me(B,"cms-grid-col-stack"),me(e.inline,"cms-grid-col-inline"),me(U,"cms-grid-col-center"),e.class]),ye=JSswift.omit(e,["span","col","sm","md","lg","auto","row","rowSpan","area","align","justify","place","gap","rowGap","columnGap","padding","width","height","minHeight","maxHeight","fullHeight","stack","inline","direction","contentAlign","contentJustify","center","scroll","panel","to","start","top","header","before","startClass","topClass","headerClass","body","content","bodyClass","contentClass","end","bottom","footer","after","endClass","bottomClass","footerClass","slots","style","clickable","dense","flat","border","glossy","glow","glass","shadow","outline","rounded","gradient","textGradient","lightShadow","color","textColor","size","radius",...JSswift.uiResponsiveOmitProps]);ye.class=Se,l["--cms-grid-col-base"]==null&&(l["--cms-grid-col-base"]="auto"),l["--cms-grid-col-tablet"]==null&&(l["--cms-grid-col-tablet"]="var(--cms-grid-col-base, auto)"),l["--cms-grid-col-pc"]==null&&(l["--cms-grid-col-pc"]="var(--cms-grid-col-tablet, var(--cms-grid-col-base, auto))"),o(e.auto)===!0?l["--cms-grid-col-base"]="auto":w!=null&&(l["--cms-grid-col-base"]=w),T!=null&&(l["--cms-grid-col-sm"]=T),ee!=null&&(l["--cms-grid-col-md"]=ee),K!=null&&(l["--cms-grid-col-lg"]=K),W!=null&&(l["--cms-grid-col-tablet"]=W),ie!=null&&(l["--cms-grid-col-pc"]=ie),ge!=null?l.gridRow=ge:ce!=null&&(l.gridRow=ce),le!=null&&(l.gridArea=le),oe!=null&&!Ue(e,"align")&&(l.alignSelf=oe),ne!=null&&!Ue(e,"justify")&&(l.justifySelf=ne),J!=null&&!Ue(e,"place")&&(l.placeSelf=J),Z!=null&&!Ue(e,"gap")&&(l.gap=Z),X!=null&&!Ue(e,"rowGap")&&(l.rowGap=X),ue!=null&&!Ue(e,"columnGap")&&(l.columnGap=ue),F!=null&&!Ue(e,"padding")&&(l.padding=F),f!=null&&!Ue(e,"width")&&(l.width=f),P!=null&&P!==""?l.height=P:g!=null&&!Ue(e,"height")&&(l.height=g),m!=null&&!Ue(e,"minHeight")&&(l.minHeight=m),O!=null&&!Ue(e,"maxHeight")&&(l.maxHeight=O),x!=null&&!Ue(e,"direction")&&(l.flexDirection=x),Q!=null&&!Ue(e,"contentAlign")?l.alignItems=Q:U!=null&&U!==""&&(l.alignItems=U?"center":""),r!=null&&!Ue(e,"contentJustify")?l.justifyContent=r:U!=null&&U!==""&&(l.justifyContent=U?"center":""),p!=null&&p!==""&&(l.overflow=p),Object.keys(l).length&&(ye.style=l),JSswift.uiApplyResponsiveProps(ye,e,Ul);const V=e.onClick,D=e.onKeydown,q=!!(o(e.clickable)||o(e.to)),Ne=S=>{var L;if(V==null||V(S),S.defaultPrevented)return;const d=o(e.to);d&&((L=JSswift.router)!=null&&L.navigate)&&(S.preventDefault(),JSswift.router.navigate(d))},ke=S=>{D==null||D(S),!S.defaultPrevented&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),Ne(S))};if(q&&(ye.onClick=Ne,ye.onKeydown=ke,ye.tabIndex==null&&(ye.tabIndex=0),ye.role==null&&(ye.role="button")),!I){const S=_.div(ye,...E(s,"default",G,n));return Ke(S,e),S}const te={display:"flex",flexDirection:"column",gap:"inherit",minWidth:0},xe=[de.length?_.div({class:ae(["cms-grid-col-start",e.startClass,e.topClass,e.headerClass]),style:{...te}},...de):null,u.length?_.div({class:ae(["cms-grid-col-body",e.bodyClass,e.contentClass]),style:{...te,flex:"1 1 auto"}},...u):null,k.length?_.div({class:ae(["cms-grid-col-end",e.endClass,e.bottomClass,e.footerClass]),style:{...te}},...k):null].filter(Boolean),be=_.div(ye,...xe);return Ke(be,e),be},(Ko=JSswift.isDev)!=null&&Ko.call(JSswift)&&(v.meta=v.meta||{},v.meta.GridCol={signature:"UI.GridCol(...children) | UI.GridCol(props, ...children)",props:{span:"number|string",col:"alias di span",sm:"number|string",md:"number|string",lg:"number|string",auto:"boolean",row:"number|string",rowSpan:"number|string",area:"string",align:"string (align-self)",justify:"string (justify-self)",place:"string (place-self)",gap:"string|number",rowGap:"string|number",columnGap:"string|number",padding:"string|number",width:"string|number",height:"string|number",minHeight:"string|number",maxHeight:"string|number",fullHeight:"boolean",stack:"boolean",inline:"boolean",direction:"column|row|string",contentAlign:"string",contentJustify:"string",center:"boolean",scroll:"boolean|string",panel:"boolean",clickable:"boolean",to:"string",mobile:"{ span?, col?, gap?, direction?, contentAlign?, contentJustify? }",tablet:"{ span?, col?, gap?, direction?, contentAlign?, contentJustify? }",pc:"{ span?, col?, gap?, direction?, contentAlign?, contentJustify? }",start:"Node|Function|Array",body:"Node|Function|Array",end:"Node|Function|Array",color:"string",outline:"boolean",shadow:"boolean|string",radius:"number|string",slots:"{ start?, body?, end?, default? }",class:"string",style:"object"},slots:{start:"Top/header region",body:"Main body region",end:"Bottom/footer region",default:"Fallback content"},events:{onClick:"MouseEvent",onKeydown:"KeyboardEvent"},returns:"HTMLDivElement",description:"CSS Grid item with responsive spans, optional internal stack layout, start/body/end regions, and lightweight visual variants."}),v.Icon=(...t)=>{var ce,le;let e={},n=[],s="home",i=!1;const c=t[0],y=t[1],a=oe=>oe&&typeof oe=="object"&&!oe.nodeType&&!Array.isArray(oe)&&!(oe instanceof Function);typeof c=="string"?(s=c,i=!0,a(y)?(e=y,t.length>2&&(n=t.slice(2))):t.length>1&&(n=t.slice(1))):a(c)?(e=c,c.name!=null&&(s=c.name,i=!0),t.length>1&&(n=t.slice(1))):t.length&&(n=t),!i&&n.length&&(s=n.length===1?n[0]:n),Yt(e);const l=e.slots||{},b=o(e.size),R=o(e.color),C=String(s).endsWith("-fill"),w={...e.style||{}},T=Ye(e.size,()=>{const oe=o(e.size);return typeof oe=="string"&&An[oe]?oe:""}),ee=!!(e.color||e.clickable||e.border||e.glossy||e.glow||e.glass||e.shadow||e.outline||e.gradient||e.textGradient||e.lightShadow||e.radius),K={"chevron-down":{viewBox:"0 0 24 24",paths:[{d:"M6 9l6 6l6 -6",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}]}},re=oe=>{const ne=K[oe];return ne?_.svg({width:"100%",height:"100%",viewBox:ne.viewBox,fill:"none","aria-hidden":"true",focusable:"false"},...ne.paths.map(J=>_.path(J))):null},H=oe=>{const ne=o(e.tooltip);if(ne==null||ne===!1||!v.Tooltip)return oe;const J=a(ne)?{...ne}:{text:ne};return a(e.tooltipProps)&&Object.assign(J,e.tooltipProps),v.Tooltip({...J,target:oe})},j=ae(["cms-icon","material-icons",...ee?["cms-clear-set","cms-singularity"]:[],T,e.class]),Y=JSswift.omit(e,["name","size","class","style","label","border","color","icon","iconRight","removable","onRemove","dense","flat","glossy","outline","slots","spriteUrl","tooltip","tooltipProps"]);if(Y.class=j,Object.keys(w).length&&(Y.style=w),typeof s=="function"||s&&typeof s=="object"){const oe=JSswift.ui.renderSlot(l,"default",{},s),ne=E(null,"default",{},oe),J=_.span({...Y,"data-icon":"custom"},...ne);return Ke(J,e),H(J)}const W=String(s),ie=W.includes("#")?W:"";let ge=null;if(ie){const oe=e.spriteUrl||((ce=JSswift.config)==null?void 0:ce.iconSpriteUrl)||(typeof globalThis!="undefined"?(le=globalThis.JSswift_setting)==null?void 0:le.iconSpriteUrl:null),ne=ie.slice(ie.indexOf("#")+1),J=oe?_.svg({width:"100%",height:"100%"},_.use({href:oe+ie})):re(ne)||_.svg({width:"100%",height:"100%"},_.use({href:ie}));C&&(J.style.fill="currentColor"),ge=_.span({...Y,"data-icon":W},J,...n)}else ge=_.span({...Y,"data-icon":W},W,...n);if(b!=null){let oe=b;JSswift.uiSizes.includes(b)&&(oe=`var(--cms-icon-size-${b})`),oe=typeof oe=="number"?oe+"px":String(oe),ge.style.setProperty("--set-icon-size",oe)}return Ke(ge,e),H(ge)},(qo=JSswift.isDev)!=null&&qo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Icon={signature:"UI.Icon(name) | UI.Icon(props) | UI.Icon(props, ...children)",props:{name:"string|Node|Function",size:"number|string",color:"string",shadow:"boolean|string",lightShadow:"boolean",clickable:"boolean",border:"boolean",glossy:"boolean",glow:"boolean",glass:"boolean",gradient:"boolean|number",outline:"boolean",textGradient:"boolean",radius:"number|string",spriteUrl:"string",tooltip:"String|Node|Function|Object",tooltipProps:"object",slots:"{ default? }",class:"string",style:"object"},slots:{default:"Custom icon content"},returns:"HTMLSpanElement",description:"Sprite- or text-based icon with configurable size/color."}),v.Badge=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=Ye(e.size,()=>{const K=o(e.size);return typeof K=="string"&&An[K]?`cms-size-${K}`:""}),c=ae(["cms-clear-set","cms-badge","cms-singularity",i,me(e.outline,"outline"),e.class]),y=JSswift.omit(e,["label","color","outline","size","slots","notification","iconSize","topLeft","topRight","bottomLeft","bottomRight","left","right"]);y.class=c;const a={...e.style||{}};if(e.size){const K=o(e.size);typeof K=="string"&&An[K]||(a.fontSize=$e(e.size))}y.style=a;const l=(K,re,H)=>{const j=Array.isArray(K)?K:[K];for(const Y of j)if(JSswift.ui.getSlot(s,Y)!=null)return E(s,Y,re,H);return H==null||H===!1||H===""?[]:E(null,"default",re,H)},b=()=>{var re;const K=o((re=e.iconSize)!=null?re:e.size);return typeof K=="number"?Math.max(10,Math.round(K*.85)):typeof K=="string"&&{xxs:10,xs:11,sm:12,md:13,lg:14,xl:16,xxl:18,xxxl:20}[K]||14},R=(K,re)=>{const H=o(K);return H==null||H===!1||H===""?null:typeof H=="string"?v.Icon({name:H,size:b()}):JSswift.ui.slot(H,{as:re})},C=(K,re,H)=>_.dynamic(()=>{const j=R(e[re],H),Y=l(K,{position:H},j);return Y.length?_.span({class:`cms-badge-anchor cms-badge-anchor-${H}`,"data-badge-slot":H},...Y):null}),w=_.dynamic(()=>{const K=o(e.label);let re=l(["label"],{},K);return re.length||(re=l(["default"],{},n)),_.span({class:"cms-badge-content"},_.span({class:"cms-badge-label"},...re.length?re:[""]))}),T=_.dynamic(()=>{const K=o(e.notification),re=K==null||K===!1||K===""?null:K,H=l(["notification"],{notification:K},re);return H.length?_.span({class:"cms-badge-notification","data-badge-slot":"notification","aria-label":typeof K=="number"?`${K} notifications`:null},...H):null}),ee=_.span(C(["left"],"left","left"),C(["centerLeft","center-left"],"centerLeft","center-left"),y,w,C(["topLeft","top-left"],"topLeft","top-left"),C(["topRight","top-right"],"topRight","top-right"),C(["bottomLeft","bottom-left"],"bottomLeft","bottom-left"),C(["bottomRight","bottom-right"],"bottomRight","bottom-right"),C(["centerRight","center-right"],"centerRight","center-right"),C(["right"],"right","right"),T);return(e.topLeft||e.centerLeft||e.bottomLeft)&&ee.style.setProperty("padding-left","15px"),(e.topRight||e.centerRight||e.bottomRight)&&ee.style.setProperty("padding-right","15px"),Ke(ee,e),ee},(Yo=JSswift.isDev)!=null&&Yo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Badge={signature:"UI.Badge(...children) | UI.Badge(props, ...children)",props:{label:"String|Node|Function|Array",color:"string",size:"string|number",outline:"boolean",notification:"string|number|Node|Function|[get,set] signal",iconSize:"string|number",topLeft:"String|Node|Function|Array",topRight:"String|Node|Function|Array",bottomLeft:"String|Node|Function|Array",bottomRight:"String|Node|Function|Array",centerLeft:"String|Node|Function|Array",centerRight:"String|Node|Function|Array",left:"String|Node|Function|Array",right:"String|Node|Function|Array",slots:"{ label?, default?, notification?, topLeft?, topRight?, bottomLeft?, bottomRight?, left?, right? }",class:"string",style:"object"},slots:{label:"Badge label content",default:"Fallback content",notification:"Notification badge content",topLeft:"Icon anchored top-left",topRight:"Icon anchored top-right",bottomLeft:"Icon anchored bottom-left",bottomRight:"Icon anchored bottom-right",centerLeft:"Icon anchored center-left",centerRight:"Icon anchored center-right",left:"Icon anchored left",right:"Icon anchored right"},returns:"HTMLSpanElement",description:"Inline badge with reactive notification and 6 positionable icon slots."});const Yl=t=>{if(t==null||t===!1)return"";const e=String(t).replace(/[._-]+/g," ").replace(/\s+/g," ").trim();if(!e)return"";const n=e.split(" ").filter(Boolean);return n.length?n.length===1?n[0].replace(/[^a-z0-9]/gi,"").slice(0,2).toUpperCase():n.slice(0,2).map(s=>s.charAt(0).toUpperCase()).join(""):""},fo=(t,e)=>{const n=t==null||t===!0?e:t;if(n==null||n===!1)return mt(e);const s=String(n).toLowerCase();return s==="online"||s==="available"||s==="active"?"success":s==="away"||s==="pending"?"warning":s==="busy"||s==="dnd"||s==="blocked"?"danger":s==="offline"||s==="idle"?"secondary":mt(s)||mt(e)},mo=(t,e="cms-avatar-badge")=>t==null||t===!1?null:t instanceof Node||Array.isArray(t)||typeof t=="function"?t:t===!0?_.span({class:e}):_.span({class:e},String(t)),Xl=(t,e)=>{if(t==null||t===!1){if(!e)return null;const s=fo(null,e);return _.span({class:ae(["cms-avatar-status",s?`cms-state-${s}`:""])})}if(t instanceof Node||Array.isArray(t)||typeof t=="function")return t;const n=fo(t,e);return t===!0||n?_.span({class:ae(["cms-avatar-status",n?`cms-state-${n}`:""])}):mo(t,"cms-avatar-badge")},$n=(t,e)=>!e||!e.length?null:_.span({class:ae(["cms-avatar-anchor",t])},...e);v.Avatar=(...t)=>{var g,O,Q;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=Ye(e.size,()=>{var x;const r=o(e.size);return typeof r=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(r))?`cms-size-${r}`:""}),c=Ye([e.color,e.state],()=>{const r=o(e.color)||o(e.state)||"",x=mt(r);return x?`cms-state-${x}`:""}),y=ae(["cms-clear-set","cms-avatar","cms-singularity",i,c,me(e.square,"cms-avatar-square"),me(e.elevated,"elevated"),e.class]),a=JSswift.omit(e,["src","srcset","srcSet","sizes","alt","label","name","initials","text","size","fontSize","textSize","radius","rounded","square","elevated","icon","iconSize","media","fit","badge","notification","status","statusColor","presence","topLeft","topRight","bottomLeft","bottomRight","slots"]);a.class=y;const l={...e.style||{}},b=Ie(e.size,r=>{var x;return typeof r=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(r))?"":$e(r)},"");b!=null&&(l.width=b,l.height=b);const R=(g=e.fontSize)!=null?g:e.textSize,C=R!=null?Ie(R,$e):Ie(e.size,r=>{var x;return typeof r=="string"&&((x=JSswift.uiSizes)!=null&&x.includes(r))?"":`clamp(11px, calc(${$e(r)} * 0.34), 28px)`},"");C!=null&&(l.fontSize=C);const w=Ie(e.radius,r=>{const x=hl(r);return x==="xxxl"?"999px":x?`var(--cms-r-${x})`:typeof r=="number"?`${r}px`:String(r)});w!=null&&(l["--set-border-radius"]=w),a.style=l;const T={props:e},ee=Ye([e.alt,e.label,e.name,e.text],()=>{const r=o(e.alt)||o(e.label)||o(e.name)||o(e.text)||"avatar";return String(r)}),K=e.icon!=null?typeof e.icon=="string"?v.Icon({name:e.icon,size:e.iconSize||e.size||"sm"}):JSswift.ui.slot(e.icon,{as:"icon"}):null,re=Ye([e.initials,e.text,e.label,e.name],()=>{var p,P;const r=(p=o(e.initials))!=null?p:o(e.text);if(r!=null)return r;const x=(P=o(e.label))!=null?P:o(e.name);return typeof x=="string"?Yl(x):x}),H=mo(o((O=e.badge)!=null?O:e.notification)),j=Xl(o((Q=e.status)!=null?Q:e.presence),o(e.statusColor));let Y=E(s,"media",T,e.media);if(!Y.length&&e.src){const r={class:"cms-avatar-img",src:e.src,alt:ee,sizes:e.sizes,style:{}};e.srcset!=null&&(r.srcset=e.srcset),e.srcSet!=null&&(r.srcset=e.srcSet);const x=Ie(e.fit);x!=null&&(r.style.objectFit=x),Y=[_.img(r)]}const W=E(s,"default",T,n),ie=E(s,"fallback",T,null),ge=E(s,"label",T,re),ce=E(s,"icon",T,K),le=Y.length?Y:W.length?W:ie.length?ie:ge.length?ge:ce.length?ce:["?"],oe=Y.length?"cms-avatar-media":"cms-avatar-fallback",ne=_.span({class:"cms-avatar-body"},_.span({class:oe},...le));let J=E(s,"topLeft",T,e.topLeft),Z=E(s,"topRight",T,e.topRight),X=E(s,"bottomLeft",T,e.bottomLeft),ue=E(s,"bottomRight",T,e.bottomRight);const F=E(s,"badge",T,H),f=E(s,"status",T,j);!Z.length&&F.length&&(Z=F),!ue.length&&f.length&&(ue=f);const m=_.div(a,ne,$n("cms-avatar-anchor-top-left",J),$n("cms-avatar-anchor-top-right",Z),$n("cms-avatar-anchor-bottom-left",X),$n("cms-avatar-anchor-bottom-right",ue));return Ke(m,e),m},(Xo=JSswift.isDev)!=null&&Xo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Avatar={signature:"UI.Avatar(...children) | UI.Avatar(props, ...children)",props:{src:"string",srcset:"string",sizes:"string",alt:"string",label:"String|Node|Function|Array",name:"string",initials:"string|Node|Function|Array",text:"string|Node|Function|Array",size:"number|string",fontSize:"number|string",radius:"number|string",square:"boolean",elevated:"boolean",color:"string",state:"string",icon:"string|Node|Function|Array",iconSize:"number|string",media:"Node|Function|Array",fit:"cover|contain|fill|scale-down|none",badge:"string|number|Node|Function|Array",notification:"string|number|Node|Function|Array",status:"boolean|string|number|Node|Function|Array",statusColor:"success|warning|danger|info|primary|secondary|dark|light|string",topLeft:"Node|Function|Array",topRight:"Node|Function|Array",bottomLeft:"Node|Function|Array",bottomRight:"Node|Function|Array",slots:"{ media?, default?, fallback?, label?, icon?, badge?, status?, topLeft?, topRight?, bottomLeft?, bottomRight? }",mobile:"{ width?, height?, minWidth?, maxWidth?, padding?, margin?, radius? }",tablet:"{ width?, height?, minWidth?, maxWidth?, padding?, margin?, radius? }",pc:"{ width?, height?, minWidth?, maxWidth?, padding?, margin?, radius? }",class:"string",style:"object"},slots:{media:"Custom main media",default:"Custom main content instead of image or fallback",fallback:"Fallback custom quando non c'e immagine",label:"Fallback testuale / initials",icon:"Fallback icon",badge:"Badge overlay, di default top-right",status:"Presence dot or overlay content, bottom-right by default",topLeft:"Top-left overlay content",topRight:"Top-right overlay content",bottomLeft:"Bottom-left overlay content",bottomRight:"Bottom-right overlay content"},returns:"HTMLDivElement",description:"Flexible avatar with image, smart fallbacks, states, badge, and overlay slots."}),v.Chip=(...t)=>{var re,H,j,Y;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=Ye(e.size,()=>{const W=o(e.size);return typeof W=="string"&&An[W]?W:""}),c=ae(["cms-clear-set","cms-chip","cms-singularity",i,e.class]),y=JSswift.omit(e,["label","border","color","icon","iconRight","removable","onRemove","dense","flat","glossy","outline","slots"]);y.class=c,y.style={...e.style||{}};const a=e.icon?typeof e.icon=="string"?v.Icon({name:e.icon,size:(re=e==null?void 0:e.size)!=null?re:null}):JSswift.ui.slot(e.icon,{as:"icon"}):null,l=e.iconRight?typeof e.iconRight=="string"?v.Icon({name:e.iconRight,size:(H=e==null?void 0:e.size)!=null?H:null}):JSswift.ui.slot(e.iconRight,{as:"iconRight"}):null,b=JSswift.ui.renderSlot(s,"icon",{},a),R=JSswift.ui.renderSlot(s,"iconRight",{},l),C=E(s,"label",{},e.label),w=C.length?C:E(s,"default",{},n),T=E(null,"default",{},b),ee=E(null,"default",{},R),K=_.span(y,...T,...w.length?w:[""],...ee);if(e.removable){const W=v.Btn({class:"cms-chip-remove",onClick:e.onRemove,size:(j=e==null?void 0:e.size)!=null?j:null},v.Icon({size:(Y=e==null?void 0:e.size)!=null?Y:null,name:"close"}));K.appendChild(W),W.onclick=()=>{e.onRemove&&e.onRemove(),K.remove()}}return Ke(K,e),K},(Qo=JSswift.isDev)!=null&&Qo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Chip={signature:"UI.Chip(...children) | UI.Chip(props, ...children)",props:{label:"String|Node|Function|Array",icon:"String|Node|Function|Array",iconRight:"String|Node|Function|Array",removable:"boolean",onRemove:"function",dense:"boolean",outline:"boolean|string|number",slots:"{ icon?, label?, default? }",class:"string",style:"object"},slots:{icon:"Chip icon content",iconRight:"Chip right icon content",label:"Chip label content",default:"Fallback content"},events:{onRemove:"MouseEvent"},returns:"HTMLSpanElement",description:"Chip with optional icon and removal."}),v.Stat=(...t)=>{var ce,le;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=()=>mt(o(e.state)||o(e.color)||""),c=Ye([e.state,e.color],()=>{const oe=i();return oe?`cms-state-${oe}`:""}),y=Ye(e.trend,()=>{const oe=String(o(e.trend)||"").toLowerCase();return["up","positive","success","gain","increase"].includes(oe)?"is-positive":["down","negative","danger","loss","decrease"].includes(oe)?"is-negative":["flat","neutral","steady","stable"].includes(oe)?"is-neutral":""}),a={...e},l=JSswift.omit(a,["actions","aside","delta","eyebrow","footer","icon","iconSize","label","meta","note","slots","state","subtitle","title","trend","value"]);l.class=ae(["cms-clear-set","cms-stat","cms-singularity",c,y,a.class]),l.style={...a.style||{}};const b=(oe,ne,J={})=>E(s,oe,J,ne),R=e.icon==null?null:typeof e.icon=="string"?v.Icon({name:e.icon,size:e.iconSize||"md"}):JSswift.ui.slot(e.icon,{as:"icon"}),C=b("eyebrow",e.eyebrow),w=b("label",(ce=e.label)!=null?ce:e.title),T=b("value",e.value),ee=b("note",(le=e.note)!=null?le:e.subtitle),K=b("meta",e.meta),re=b("delta",e.delta,{trend:e.trend}),H=b("icon",R),j=b("aside",e.aside),Y=b("footer",e.footer),W=b("actions",e.actions),ie=b("default",n),ge=_.article(l,_.div({class:"cms-stat-head"},_.div({class:"cms-stat-lead"},H.length?_.div({class:"cms-stat-icon"},...H):null,_.div({class:"cms-stat-copy"},C.length?_.div({class:"cms-stat-eyebrow"},...C):null,w.length?_.div({class:"cms-stat-label"},...w):null)),j.length?_.div({class:"cms-stat-aside"},...j):null),_.div({class:"cms-stat-body"},T.length?_.div({class:"cms-stat-value"},...T):null,re.length?_.div({class:"cms-stat-delta"},...re):null,ee.length?_.div({class:"cms-stat-note"},...ee):null,K.length?_.div({class:"cms-stat-meta"},...K):null,ie.length?_.div({class:"cms-stat-extra"},...ie):null),Y.length||W.length?_.div({class:"cms-stat-footer"},Y.length?_.div({class:"cms-stat-footer-copy"},...Y):null,W.length?_.div({class:"cms-stat-actions"},...W):null):null);return Ke(ge,e),ge},(Zo=JSswift.isDev)!=null&&Zo.call(JSswift)&&(v.meta=v.meta||{},v.meta.Stat={signature:"UI.Stat(...children) | UI.Stat(props, ...children)",props:{eyebrow:"String|Node|Function|Array",label:"String|Node|Function|Array",title:"Alias of label",value:"String|Number|Node|Function|Array",delta:"String|Node|Function|Array",trend:"up|down|flat|positive|negative|neutral",note:"String|Node|Function|Array",subtitle:"Alias of note",meta:"Node|Function|Array",icon:"String|Node|Function|Array",aside:"Node|Function|Array",footer:"Node|Function|Array",actions:"Node|Function|Array",state:"primary|secondary|success|warning|danger|info|light|dark",slots:"{ eyebrow?, label?, value?, delta?, note?, meta?, icon?, aside?, footer?, actions?, default? }",class:"string",style:"object"},slots:{eyebrow:"Small kicker above the stat label",label:"Main stat label",value:"Primary metric value",delta:"Trend / delta content",note:"Supporting note",meta:"Extra meta badges or info",icon:"Leading icon or avatar",aside:"Right-side support content",footer:"Footer/supporting bottom content",actions:"Footer actions cluster",default:"Extra body content"},returns:"HTMLElement",description:"Compact surface for single metrics, trends, and operational metadata."}),v.Kpi=(...t)=>{var ce,le;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=()=>mt(o(e.state)||o(e.color)||""),c=Ye([e.state,e.color],()=>{const oe=i();return oe?`cms-state-${oe}`:""}),y={...e},a=JSswift.omit(y,["actions","aside","delta","eyebrow","footer","icon","iconSize","label","media","meta","note","slots","state","subtitle","title","trend","value"]);a.class=ae(["cms-clear-set","cms-kpi","cms-singularity",c,y.class]),a.style={...y.style||{}};const l=(oe,ne,J={})=>E(s,oe,J,ne),b=e.icon==null?null:typeof e.icon=="string"?v.Icon({name:e.icon,size:e.iconSize||"lg"}):JSswift.ui.slot(e.icon,{as:"icon"}),R=l("eyebrow",e.eyebrow),C=l("title",(ce=e.title)!=null?ce:e.label),w=l("value",e.value),T=l("delta",e.delta,{trend:e.trend}),ee=l("note",(le=e.note)!=null?le:e.subtitle),K=l("meta",e.meta),re=l("icon",b),H=l("aside",e.aside),j=l("media",e.media),Y=l("footer",e.footer),W=l("actions",e.actions),ie=l("default",n),ge=_.section(a,_.div({class:"cms-kpi-head"},_.div({class:"cms-kpi-title-wrap"},re.length?_.div({class:"cms-kpi-icon"},...re):null,_.div({class:"cms-kpi-copy"},R.length?_.div({class:"cms-kpi-eyebrow"},...R):null,C.length?_.div({class:"cms-kpi-title"},...C):null)),H.length?_.div({class:"cms-kpi-aside"},...H):null),_.div({class:"cms-kpi-core"},_.div({class:"cms-kpi-value-wrap"},w.length?_.div({class:"cms-kpi-value"},...w):null,T.length?_.div({class:"cms-kpi-delta"},...T):null),ee.length?_.div({class:"cms-kpi-note"},...ee):null,K.length?_.div({class:"cms-kpi-meta"},...K):null,j.length?_.div({class:"cms-kpi-media"},...j):null,ie.length?_.div({class:"cms-kpi-extra"},...ie):null),Y.length||W.length?_.div({class:"cms-kpi-footer"},Y.length?_.div({class:"cms-kpi-footer-copy"},...Y):null,W.length?_.div({class:"cms-kpi-actions"},...W):null):null);return Ke(ge,e),ge},(ei=JSswift.isDev)!=null&&ei.call(JSswift)&&(v.meta=v.meta||{},v.meta.Kpi={signature:"UI.Kpi(...children) | UI.Kpi(props, ...children)",props:{eyebrow:"String|Node|Function|Array",title:"String|Node|Function|Array",label:"Alias of title",value:"String|Number|Node|Function|Array",delta:"String|Node|Function|Array",trend:"up|down|flat|positive|negative|neutral",note:"String|Node|Function|Array",subtitle:"Alias of note",meta:"Node|Function|Array",media:"Node|Function|Array",icon:"String|Node|Function|Array",aside:"Node|Function|Array",footer:"Node|Function|Array",actions:"Node|Function|Array",state:"primary|secondary|success|warning|danger|info|light|dark",slots:"{ eyebrow?, title?, value?, delta?, note?, meta?, media?, icon?, aside?, footer?, actions?, default? }",class:"string",style:"object"},slots:{eyebrow:"Kicker content",title:"KPI title content",value:"Primary KPI value",delta:"Delta/trend content",note:"Supporting note",meta:"Extra meta badges or inline info",media:"Secondary data view or mini-visual content",icon:"Leading icon or avatar",aside:"Top-right support content",footer:"Bottom support content",actions:"Footer actions cluster",default:"Extra body content"},returns:"HTMLElement",description:"Richer surface for KPIs, headline metrics, and mini dashboard summaries."});const Ql=(t,e=180)=>{const n=getComputedStyle(t).transitionDuration;if(!n)return e;const s=n.split(",")[0].trim();if(!s)return e;const i=s.includes("ms")?parseFloat(s):parseFloat(s)*1e3;return Number.isFinite(i)?i:e},yn=t=>{!(t!=null&&t.overlay)||!(t!=null&&t.panel)||(t.overlay.classList.add("enter"),t.panel.classList.add("enter"),requestAnimationFrame(()=>{!(t!=null&&t.overlay)||!(t!=null&&t.panel)||(t.overlay.classList.add("entered"),t.panel.classList.add("entered"),t.overlay.classList.remove("enter"),t.panel.classList.remove("enter"))}))},wn=(t,e)=>{if(!(t!=null&&t.overlay)||!(t!=null&&t.panel)){e==null||e();return}if(t._closing)return;t._closing=!0,t.overlay.classList.add("leave"),t.panel.classList.add("leave");const n=()=>{t._closed||(t._closed=!0,e==null||e())},s=c=>{c.target===t.panel&&(t.panel.removeEventListener("transitionend",s),n())};t.panel.addEventListener("transitionend",s);const i=Ql(t.panel,180);setTimeout(n,i+40)};v.List=(...t)=>{var H;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=!!o((H=e.number)!=null?H:e.ordered),c=o(e.marker),y=o(e.items),a=Array.isArray(y)?y:y==null?[]:[y],l=(j={})=>{const Y=e.itemProps||{},W={...Y,...j};return e.divider!=null&&W.divider==null&&(W.divider=e.divider),W.class=ae([Y.class,e.itemClass,j.class]),W.style={...Y.style||{},...e.itemStyle||{},...j.style||{}},W},b=j=>{if(j==null||j===!1)return[];if(cs(j))return[j];if(kn(j)){const Y=j.children!=null?en(j.children):j.content!=null?en(j.content):en(j.node);return[v.Item(l(j),...Y)]}return Array.isArray(j)?[v.Item(l(),...j)]:j!=null&&j.nodeType?[v.Item(l(),j)]:[v.Item(l(),j)]},R=(j,Y,W,ie=!0)=>{if(j==null||j===!1)return[];if(ie){const ge={item:j,index:Y,count:W,first:Y===0,last:Y===W-1},ce=E(s,"item",ge,null);if(ce.length)return ce.flatMap(le=>b(le))}return b(j)},C=[];a.forEach((j,Y)=>{C.push(...R(j,Y,a.length))});const w=E(s,"default",{items:a,count:a.length},n);if(w.forEach((j,Y)=>{C.push(...R(j,a.length+Y,a.length+w.length,!1))}),!C.length){const j=E(s,"empty",{items:a,count:0},e.empty);j.length&&(j.length===1&&cs(j[0])?C.push(j[0]):C.push(v.Item({class:"cms-item-empty",flat:!0},...j)))}const T=ae(["cms-list",me(e.dense,"dense"),me(e.divider,"divider"),me(c===!1||c==="none","cms-list-no-marker"),e.class]),ee=JSswift.omit(e,["dense","divider","slots","number","ordered","items","itemClass","itemStyle","itemProps","empty","marker","gap"]);ee.class=T,ee.style={...e.style||{}};const K=Ie(e.gap,$e);return K!=null&&(ee.style["--cms-list-gap"]=K),c!=null&&c!==!1&&c!==!0&&c!=="none"&&(ee.style.listStyleType=String(c)),_[i?"ol":"ul"](ee,...C)},(ti=JSswift.isDev)!=null&&ti.call(JSswift)&&(v.meta=v.meta||{},v.meta.List={signature:"UI.List(...children) | UI.List(props, ...children)",props:{items:"Array<Node|Object|string>",ordered:"boolean",number:"boolean",marker:"boolean|string",dense:"boolean",divider:"boolean",gap:"string|number",empty:"String|Node|Function|Array",itemClass:"string",itemStyle:"object",itemProps:"object",slots:"{ default?, item?, empty? }",class:"string",style:"object"},slots:{default:"List content fallback",item:"Render custom di ogni item ({ item, index, count, first, last })",empty:"Empty state content"},returns:"HTMLUListElement|HTMLOListElement",description:"Lista dichiarativa con supporto items, slot item, ordered/marker ed empty state."}),v.Item=(...t)=>{var F,f,m,g,O,Q,r,x;const{props:e,children:n}=JSswift.uiNormalizeArgs(t);e.state!=null&&e.color==null&&(e.color=e.state),Yt(e);const s=e.slots||{},i=Ye([e.clickable,e.to],()=>!!(o(e.clickable)||o(e.to))),c=Ye([e.active,e.selected],()=>!!(o(e.active)||o(e.selected))),y=!!(e.color!=null||e.outline||e.border||e.glossy||e.glow||e.glass||e.shadow||e.gradient||e.textGradient||e.lightShadow||e.radius||e.rounded||e.flat),a=(p,P,U)=>{const G=o(p);return G==null||G===!1||G===""?null:typeof G=="string"?v.Icon({name:G,size:P||"sm"}):JSswift.ui.slot(G,{as:U})},l=E(s,"icon",{},a(e.icon,e.iconSize||e.size,"icon")),b=E(s,"title",{},(F=e.title)!=null?F:e.label),R=E(s,"subtitle",{},(m=(f=e.subtitle)!=null?f:e.caption)!=null?m:e.description),C=E(s,"meta",{},(g=e.meta)!=null?g:e.eyebrow),w=E(s,"body",{},(O=e.body)!=null?O:e.content),T=E(s,"default",{},n),ee=E(s,"actions",{},(Q=e.actions)!=null?Q:e.footer),K=(x=(r=e.aside)!=null?r:e.trailing)!=null?x:a(e.iconRight,e.iconSize||e.size,"iconRight"),re=E(s,"aside",{},K),H=[...w,...T],j=!(y||e.clickable||e.to||l.length||b.length||R.length||C.length||ee.length||re.length||w.length),Y=ae(["cms-item",me(e.divider,"divider"),me(y,"cms-clear-set"),me(y,"cms-singularity"),me(y,"cms-item-surface"),me(j,"cms-item-inline"),me(i,"cms-item-clickable"),me(c,"is-active"),me(e.disabled,"is-disabled"),e.class]),W=JSswift.omit(e,["divider","slots","label","title","subtitle","caption","description","meta","eyebrow","body","content","children","node","icon","iconRight","iconSize","aside","trailing","actions","footer","clickable","to","active","selected","disabled","state","color","size","outline","flat","border","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","dense"]);W.class=Y,W.style={...e.style||{}};const ie=e.onClick,ge=e.onKeydown,ce=p=>{var U;if(ie==null||ie(p),p.defaultPrevented||o(e.disabled))return;const P=o(e.to);P&&((U=JSswift.router)!=null&&U.navigate)&&(p.preventDefault(),JSswift.router.navigate(P))},le=p=>{ge==null||ge(p),!(p.defaultPrevented||o(e.disabled))&&(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),ce(p))};o(e.disabled)&&(W["aria-disabled"]="true"),(o(e.clickable)||o(e.to))&&(W.onClick=ce,W.onKeydown=le,W.tabIndex==null&&(W.tabIndex=o(e.disabled)?-1:0),W.role==null&&(W.role="button"));const oe=b.length?_.div({class:"cms-item-title"},...b):null,ne=R.length?_.div({class:"cms-item-subtitle"},...R):null,J=C.length?_.div({class:"cms-item-meta"},...C):null,Z=H.length?_.div({class:ae(["cms-item-body",me(!(b.length||R.length||C.length),"is-standalone")])},...H):null,X=ee.length?_.div({class:"cms-item-actions"},...ee):null,ue=_.li(W,_.div({class:"cms-item-row"},l.length?_.div({class:"cms-item-icon"},...l):null,_.div({class:"cms-item-main"},J,oe,ne,Z,X),re.length?_.div({class:"cms-item-aside"},...re):null));return Ke(ue,e),ue},(ni=JSswift.isDev)!=null&&ni.call(JSswift)&&(v.meta=v.meta||{},v.meta.Item={signature:"UI.Item(...children) | UI.Item(props, ...children)",props:{label:"String|Node|Function|Array",title:"String|Node|Function|Array",subtitle:"String|Node|Function|Array",meta:"String|Node|Function|Array",body:"String|Node|Function|Array",icon:"String|Node|Function|Array",iconRight:"String|Node|Function|Array",aside:"Node|Function|Array",actions:"Node|Function|Array",clickable:"boolean",to:"string",active:"boolean",selected:"boolean",disabled:"boolean",color:"string",state:"Alias of color",size:"string|number",outline:"boolean",shadow:"boolean|string",lightShadow:"boolean",border:"boolean",glossy:"boolean",glow:"boolean",glass:"boolean",gradient:"boolean|number",textGradient:"boolean",radius:"string|number",divider:"boolean",slots:"{ icon?, title?, subtitle?, meta?, body?, aside?, actions?, default? }",class:"string",style:"object"},slots:{icon:"Leading visual/icon",title:"Main title content",subtitle:"Secondary text",meta:"Top meta content",body:"Body content",aside:"Trailing content",actions:"Actions row",default:"Fallback body content"},returns:"HTMLLIElement",description:"Structured item for simple lists, feeds, task lists, and clickable rows."}),v.Separator=(...t)=>{const{props:e}=JSswift.uiNormalizeArgs(t),n=ae(["cms-separator",me(e.vertical,"vertical"),e.class]),s=JSswift.omit(e,["vertical","size","slots"]);s.class=n;const i={borderColor:"var(--cms-border)",...e.style||{}},c=o(e.size),y=o(e.vertical);if(c!=null){const a=$e(c);y?i.width=a:i.height=a}return s.style=i,_.hr(s)},(si=JSswift.isDev)!=null&&si.call(JSswift)&&(v.meta=v.meta||{},v.meta.Separator={signature:"UI.Separator() | UI.Separator(props)",props:{vertical:"boolean",size:"string|number",slots:"{ default? }",class:"string",style:"object"},slots:{default:"Unused (separator has no content)"},returns:"HTMLHRElement",description:"Separatore orizzontale o verticale."}),v.Banner=(...t)=>{var ue;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=()=>mt(o(e.type)||o(e.state)||""),c={state:i,dismissible:()=>!!o(e.dismissible)},y=Ye([e.type,e.state],()=>i()),a=Ye(e.variant,()=>{const F=String(o(e.variant)||"").toLowerCase();return["solid","outline","ghost"].includes(F)?`cms-banner-${F}`:""}),l=Ye([e.actionsPlacement,e.stack],()=>String(o(e.actionsPlacement)||"").toLowerCase()==="bottom"||o(e.stack)?"cms-banner-actions-bottom":""),b=Ye(e.stack,()=>o(e.stack)?"cms-banner-stack":""),R={...e},C=JSswift.omit(R,["actions","actionsPlacement","accent","aside","body","closeLabel","description","dismiss","dismissible","icon","iconSize","message","meta","onDismiss","slots","stack","state","subtitle","title","type","variant"]);C.class=ae(["cms-clear-set","cms-banner","cms-singularity",y,a,l,b,R.class]),C.style={...R.style||{}};const w=F=>{if(F==null||F==="")return"";const f=o(F);if(f==null||f==="")return"";const m=String(f);return Zt(m)?`var(--cms-${m})`:m};(e.accent!=null||rt(e.accent))&&(C.style["--cms-banner-accent"]=()=>w(e.accent),C.style["--cms-banner-border"]=()=>{const F=w(e.accent);return F?`color-mix(in srgb, ${F} 38%, var(--cms-border-color))`:""},C.style["--cms-banner-bg"]=()=>{const F=w(e.accent);return F?`color-mix(in srgb, ${F} 14%, var(--cms-panel))`:""},C.style["--cms-banner-color"]=()=>{const F=w(e.accent);return F?`color-mix(in srgb, ${F} 78%, white)`:""});const T={success:"check_circle",warning:"warning",danger:"error",info:"info",primary:"bolt",secondary:"campaign",dark:"shield",light:"notifications"},ee=(()=>{if(e.icon===!1||e.icon===null)return null;if(e.icon!=null)return typeof e.icon=="string"?v.Icon({name:e.icon,size:e.iconSize||e.size||"md"}):JSswift.ui.slot(e.icon,{as:"icon"});const F=i(),f=F?T[F]:null;return f?v.Icon({name:f,size:e.iconSize||e.size||"md"}):null})(),K=E(s,"title",c,e.title),re=E(s,"message",c,e.message!=null?e.message:n),H=E(s,"description",c,(ue=e.description)!=null?ue:e.subtitle),j=E(s,"meta",c,e.meta),Y=E(s,"default",c,e.body!=null?[e.body,...n||[]]:e.message!=null?n:null),W=E(s,"icon",c,ee),ie=E(s,"aside",c,e.aside),ge=E(s,"actions",c,e.actions),ce=E(s,"dismiss",c,e.dismiss),le=String(o(e.actionsPlacement)||"").toLowerCase()==="bottom"||!!o(e.stack),oe=!!o(e.dismissible)||!!e.onDismiss;let ne=null;const J=oe?v.Btn({class:"cms-banner-close",outline:!0,size:e.size||"sm","aria-label":e.closeLabel||"Chiudi banner",onClick:F=>{var f;(f=e.onDismiss)==null||f.call(e,F),!F.defaultPrevented&&(ne==null||ne.remove())}},v.Icon({name:"close",size:e.size||"sm"})):null,Z=[...ie,...le?[]:ge,...ce.length?ce:J?[J]:[]];ne=_.div(C,W.length?_.div({class:"cms-banner-icon"},...W):null,_.div({class:"cms-banner-body"},_.div({class:"cms-banner-copy"},K.length?_.div({class:"cms-banner-title"},...K):null,re.length?_.div({class:"cms-banner-message"},...re):null,H.length?_.div({class:"cms-banner-description"},...H):null,Y.length?_.div({class:"cms-banner-extra"},...Y):null,j.length?_.div({class:"cms-banner-meta"},...j):null),le&&ge.length?_.div({class:"cms-banner-actions"},...ge):null),Z.length?_.div({class:"cms-banner-side"},...Z):null);const X=C.role||(()=>{const F=i();return F==="danger"||F==="warning"?"alert":"status"})();return ne.setAttribute("role",X),Ke(ne,e),ne},(oi=JSswift.isDev)!=null&&oi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Banner={signature:"UI.Banner(...children) | UI.Banner(props, ...children)",props:{title:"String|Node|Function|Array",message:"String|Node|Function|Array",description:"String|Node|Function|Array",meta:"String|Node|Function|Array",icon:"String|Node|Function|Array|false",actions:"Node|Function|Array",aside:"Node|Function|Array",body:"Node|Function|Array",dismissible:"boolean",dismiss:"Node|Function|Array",onDismiss:"function",closeLabel:"string",type:"success|warning|danger|error|info|primary|secondary|light|dark",state:"success|warning|danger|error|info|primary|secondary|light|dark",accent:"string",variant:"soft|solid|outline|ghost",actionsPlacement:"end|bottom",dense:"boolean",stack:"boolean",slots:"{ icon?, title?, message?, description?, meta?, actions?, aside?, dismiss?, default? }",class:"string",style:"object"},slots:{icon:"Leading visual/icon content",title:"Banner title content",message:"Primary message content",description:"Secondary/supporting text",meta:"Meta information content",actions:"Actions area content",aside:"Right side support content",dismiss:"Custom dismiss control",default:"Extra banner body content"},returns:"HTMLDivElement",description:"Structured banner with tone, actions, dismiss, and composable slots."}),v.Alert=(...t)=>{var W;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=()=>mt(o(e.type)||o(e.state)||o(e.color)||"warning"),c=Ye([e.type,e.state,e.color],()=>{const ie=i();return ie?`cms-state-${ie}`:""}),y={...e},a=JSswift.omit(y,["actions","aside","closeLabel","description","dismiss","dismissible","icon","iconSize","message","meta","onDismiss","slots","state","subtitle","title","type","variant"]);a.class=ae(["cms-clear-set","cms-alert","cms-singularity",c,me(e.dismissible,"is-dismissible"),y.class]),a.style={...y.style||{}};const l={success:"check_circle",warning:"warning",danger:"error",info:"info",primary:"bolt",secondary:"campaign",dark:"shield",light:"notifications"},b=(()=>{if(e.icon===!1||e.icon===null)return null;if(e.icon!=null)return typeof e.icon=="string"?v.Icon({name:e.icon,size:e.iconSize||"sm"}):JSswift.ui.slot(e.icon,{as:"icon"});const ie=l[i()]||l.warning;return v.Icon({name:ie,size:e.iconSize||"sm"})})(),R=E(s,"title",{},e.title),C=E(s,"message",{},e.message!=null?e.message:n),w=E(s,"description",{},(W=e.description)!=null?W:e.subtitle),T=E(s,"meta",{},e.meta),ee=E(s,"actions",{},e.actions),K=E(s,"aside",{},e.aside),re=E(s,"icon",{},b),H=E(s,"dismiss",{},e.dismiss);let j=null;const Y=e.dismissible||e.onDismiss?v.Btn({class:"cms-alert-close",outline:!0,size:"sm","aria-label":e.closeLabel||"Chiudi alert",onClick:ie=>{var ge;(ge=e.onDismiss)==null||ge.call(e,ie),!ie.defaultPrevented&&(j==null||j.remove())}},v.Icon({name:"close",size:"sm"})):null;return j=_.div(a,re.length?_.div({class:"cms-alert-icon"},...re):null,_.div({class:"cms-alert-body"},R.length?_.div({class:"cms-alert-title"},...R):null,C.length?_.div({class:"cms-alert-message"},...C):null,w.length?_.div({class:"cms-alert-description"},...w):null,T.length?_.div({class:"cms-alert-meta"},...T):null,ee.length?_.div({class:"cms-alert-actions"},...ee):null),K.length||H.length||Y?_.div({class:"cms-alert-side"},...K,...H.length?H:Y?[Y]:[]):null),j.setAttribute("role",i()==="danger"||i()==="warning"?"alert":"status"),Ke(j,e),j},(ii=JSswift.isDev)!=null&&ii.call(JSswift)&&(v.meta=v.meta||{},v.meta.Alert={signature:"UI.Alert(...children) | UI.Alert(props, ...children)",props:{title:"String|Node|Function|Array",message:"String|Node|Function|Array",description:"String|Node|Function|Array",meta:"Node|Function|Array",icon:"String|Node|Function|Array|false",actions:"Node|Function|Array",aside:"Node|Function|Array",dismissible:"boolean",dismiss:"Node|Function|Array",onDismiss:"function",closeLabel:"string",type:"success|warning|danger|error|info|primary|secondary|light|dark",state:"success|warning|danger|error|info|primary|secondary|light|dark",slots:"{ icon?, title?, message?, description?, meta?, actions?, aside?, dismiss?, default? }",class:"string",style:"object"},slots:{icon:"Leading alert icon content",title:"Alert title content",message:"Primary alert copy",description:"Secondary/supporting text",meta:"Inline meta content",actions:"Alert actions cluster",aside:"Right side support content",dismiss:"Custom dismiss control",default:"Fallback alert message content"},returns:"HTMLDivElement",description:"Alert compatto per warning inline, policy note e feedback persistente dentro page o card."}),v.EmptyState=(...t)=>{var Y;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=()=>mt(o(e.state)||o(e.color)||""),c=Ye([e.state,e.color],()=>{const W=i();return W?`cms-state-${W}`:""}),y={...e},a=JSswift.omit(y,["actions","description","eyebrow","icon","iconSize","illustration","media","message","meta","slots","state","title"]);a.class=ae(["cms-clear-set","cms-empty-state","cms-singularity",c,me(e.compact,"compact"),me(e.inline,"inline"),y.class]),a.style={...y.style||{}};const l=e.icon===!1?null:e.icon!=null?typeof e.icon=="string"?v.Icon({name:e.icon,size:e.iconSize||"xl"}):JSswift.ui.slot(e.icon,{as:"icon"}):v.Icon({name:"inbox",size:e.iconSize||"xl"}),b=E(s,"illustration",{},(Y=e.illustration)!=null?Y:e.media),R=E(s,"icon",{},l),C=E(s,"eyebrow",{},e.eyebrow),w=E(s,"title",{},e.title),T=E(s,"message",{},e.message!=null?e.message:n),ee=E(s,"description",{},e.description),K=E(s,"meta",{},e.meta),re=E(s,"actions",{},e.actions),H=E(s,"default",{},e.message!=null?n:null),j=_.section(a,b.length?_.div({class:"cms-empty-state-illustration"},...b):null,R.length?_.div({class:"cms-empty-state-icon"},...R):null,C.length?_.div({class:"cms-empty-state-eyebrow"},...C):null,w.length?_.div({class:"cms-empty-state-title"},...w):null,T.length?_.div({class:"cms-empty-state-message"},...T):null,ee.length?_.div({class:"cms-empty-state-description"},...ee):null,K.length?_.div({class:"cms-empty-state-meta"},...K):null,H.length?_.div({class:"cms-empty-state-extra"},...H):null,re.length?_.div({class:"cms-empty-state-actions"},...re):null);return Ke(j,e),j},(li=JSswift.isDev)!=null&&li.call(JSswift)&&(v.meta=v.meta||{},v.meta.EmptyState={signature:"UI.EmptyState(...children) | UI.EmptyState(props, ...children)",props:{eyebrow:"String|Node|Function|Array",title:"String|Node|Function|Array",message:"String|Node|Function|Array",description:"String|Node|Function|Array",meta:"Node|Function|Array",icon:"String|Node|Function|Array|false",illustration:"Node|Function|Array",media:"Alias of illustration",actions:"Node|Function|Array",compact:"boolean",inline:"boolean",state:"primary|secondary|success|warning|danger|info|light|dark",slots:"{ illustration?, icon?, eyebrow?, title?, message?, description?, meta?, actions?, default? }",class:"string",style:"object"},slots:{illustration:"Top visual / illustration content",icon:"Leading empty-state icon",eyebrow:"Small kicker content",title:"Primary empty-state heading",message:"Primary message content",description:"Secondary supporting text",meta:"Meta badges or summary content",actions:"Actions cluster",default:"Extra empty-state body content"},returns:"HTMLElement",description:"Surface per zero-results, onboarding vuoti e pannelli senza dati con CTA di recupero."});let Xt="jsswift:drawer-open";const go=new Set,hs=new Map,tn=(t=Xt)=>{const e=JSswift==null?void 0:JSswift.store;if(e!=null&&e.get){const n=e.get(t,void 0);if(typeof n=="boolean")return n}try{return localStorage.getItem(t)==="1"}catch(n){return!1}},Zl=(t,e=Xt)=>{const n=JSswift==null?void 0:JSswift.store;if(n!=null&&n.set){n.set(e,!!t);return}try{localStorage.setItem(e,t?"1":"0")}catch(s){}};let Et=tn();const Wt=(t,e=Xt)=>{Et=!!t;const n=hs.get(e);if(n&&n.size)n.forEach(s=>s==null?void 0:s.classList.toggle("open",Et));else{const s=document.querySelector(".cms-drawer");s&&s.classList.toggle("open",Et)}return go.forEach(s=>{if(!s)return;if(typeof s.update=="function"){s.update(Et);return}const{el:i,openIcon:c,closeIcon:y}=s;i&&(i.textContent=Et?c:y)}),Zl(Et,e),Et};v.Tooltip=(...t)=>{var X,ue;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{};let i=null,c=null,y=null,a=null;const l=F=>Object.prototype.hasOwnProperty.call(e,F),b=l("target")||l("anchorEl")||l("triggerEl"),R=e.target||e.anchorEl||e.triggerEl||(n&&n.length?n[0]:null),C=(F,f)=>{const m=o(F);if(m==null||m==="")return f;const g=Number(m);return Number.isFinite(g)?g:f},w=()=>{clearTimeout(c),clearTimeout(y),c=null,y=null},T=()=>C(e.delay,350),ee=()=>C(e.hideDelay,o(e.interactive)?120:0),K=()=>{if(w(),!i)return;const F=i;i=null,wn(F,()=>JSswift.overlay.close(F.id))},H=(F=>{if(F==null||F===!0)return new Set(["hover","focus"]);if(F===!1)return new Set(["manual"]);const f=Array.isArray(F)?F:String(F).split(/[\s,|/]+/),m=new Set;return f.forEach(g=>{const O=String(g||"").trim().toLowerCase();O&&(O==="mouseenter"||O==="mouseover"?m.add("hover"):O==="blur"||O==="focusin"?m.add("focus"):O==="tap"?m.add("click"):m.add(O))}),m.size?m:new Set(["manual"])})((ue=(X=e.trigger)!=null?X:e.triggers)!=null?ue:l("open")?"manual":null),j=H.has("hover"),Y=H.has("focus"),W=H.has("click"),ie=H.has("manual")||!j&&!Y&&!W,ge=()=>{var U,G,de,A,u,k;const F={anchorEl:a||R||null,close:()=>K(),hide:()=>K(),isOpen:()=>!!i},f=e.icon?typeof e.icon=="string"?v.Icon({name:e.icon,size:e.iconSize||e.size||"sm"}):JSswift.ui.slot(e.icon,{as:"icon"}):null,m=E(s,"title",F,(U=e.title)!=null?U:e.heading),g=E(s,"icon",F,f),O=E(s,"footer",F,(G=e.footer)!=null?G:e.actions);let Q=(k=(u=(A=(de=e.content)!=null?de:e.text)!=null?A:e.body)!=null?u:e.description)!=null?k:e.label;Q==null&&(b?Q=n:R&&n&&n.length>1?Q=n.slice(1):R||(Q=n));let r=E(s,"content",F,Q);r.length||(r=E(s,"default",F,Q));const x=r.length?_.div({class:"cms-tooltip-body"},...r):null,p=g.length||m.length?_.div({class:"cms-tooltip-head"},g.length?_.div({class:"cms-tooltip-icon"},...g):null,_.div({class:"cms-tooltip-head-main"},m.length?_.div({class:"cms-tooltip-title"},...m):null,x)):x,P=O.length?_.div({class:"cms-tooltip-footer"},...O):null;return _.div({class:"cms-tooltip-content"},...[p,P].filter(Boolean))},ce=F=>{var r,x,p,P,U,G;const f=F||a;if(!f||o(e.disabled))return null;if(i&&i._anchorEl===f)return i;i&&K();const m=(r=e.closeOnOutside)!=null?r:W||o(e.interactive),g=(x=e.closeOnEsc)!=null?x:W||o(e.interactive);let O=null;if(i=JSswift.overlay.open(()=>ge(),{type:"tooltip",anchorEl:f,placement:e.placement||"top",offsetX:(p=e.offsetX)!=null?p:0,offsetY:(U=(P=e.offsetY)!=null?P:e.offset)!=null?U:8,backdrop:!1,lockScroll:!1,trapFocus:!1,closeOnOutside:m,closeOnBackdrop:!1,closeOnEsc:g,autoFocus:!1,className:Ht(["cms-tooltip",me(e.interactive,"interactive"),e.class,e.panelClass]),onClose:()=>{var de,A;(de=O==null?void 0:O._tooltipCleanup)==null||de.call(O),i===O&&(i=null),(A=e.onClose)==null||A.call(e)}}),!(i!=null&&i.panel))return i;const Q=i;if(O=Q,Q._anchorEl=f,Q.panel.dataset.placement=String(o(e.placement||"top")),e.maxWidth!=null&&(Q.panel.style.maxWidth=$e(o(e.maxWidth))),e.minWidth!=null&&(Q.panel.style.minWidth=$e(o(e.minWidth))),e.width!=null&&(Q.panel.style.width=$e(o(e.width))),e.style&&Object.assign(Q.panel.style,e.style),Ke(Q.panel,e),o(e.interactive)){const de=()=>{clearTimeout(y),y=null},A=()=>oe(),u=k=>{const I=k.target;I&&I.closest&&I.closest("[data-tooltip-close]")&&K()};Q.panel.addEventListener("mouseenter",de),Q.panel.addEventListener("mouseleave",A),Q.panel.addEventListener("focusin",de),Q.panel.addEventListener("focusout",A),Q.panel.addEventListener("click",u),Q._tooltipCleanup=()=>{var k,I,B,pe,Se;(k=Q.panel)==null||k.removeEventListener("mouseenter",de),(I=Q.panel)==null||I.removeEventListener("mouseleave",A),(B=Q.panel)==null||B.removeEventListener("focusin",de),(pe=Q.panel)==null||pe.removeEventListener("focusout",A),(Se=Q.panel)==null||Se.removeEventListener("click",u)}}return yn(Q),(G=e.onOpen)==null||G.call(e,Q),Q},le=F=>{clearTimeout(y),y=null,clearTimeout(c),c=setTimeout(()=>ce(F),T())},oe=(F=!1)=>{if(clearTimeout(c),c=null,!!i){if(clearTimeout(y),F){K();return}y=setTimeout(()=>K(),ee())}},ne=F=>{i?oe(!0):ce(F)},J=()=>!!i,Z=F=>{if(!F)return()=>{};a=F;const f=[],m=()=>{w(),f.forEach(g=>g())};if(l("open"))return rt(e.open)?JSswift.reactive.effect(()=>{a&&(o(e.open)?ce(a):oe(!0))},"UI.Tooltip:open"):e.open===!0?ce(F):e.open===!1&&oe(!0),m;if(ie||o(e.disabled))return m;if(j){const g=()=>le(F),O=()=>oe();F.addEventListener("mouseenter",g),F.addEventListener("mouseleave",O),f.push(()=>{F.removeEventListener("mouseenter",g),F.removeEventListener("mouseleave",O)})}if(Y){const g=()=>le(F),O=()=>oe();F.addEventListener("focus",g),F.addEventListener("blur",O),f.push(()=>{F.removeEventListener("focus",g),F.removeEventListener("blur",O)})}if(W){const g=O=>{var Q;(Q=e.onTriggerClick)==null||Q.call(e,O),!O.defaultPrevented&&ne(F)};F.addEventListener("click",g),f.push(()=>F.removeEventListener("click",g))}return m};if(R){const F=ae(["cms-tooltip-wrap",e.wrapClass,e.targetClass]),f=JSswift.omit(e,["actions","anchorEl","body","closeOnEsc","closeOnOutside","content","delay","description","disabled","footer","heading","hideDelay","icon","iconSize","interactive","label","maxWidth","minWidth","offset","offsetX","offsetY","onClose","onOpen","onTriggerClick","open","panelClass","placement","slots","style","target","targetClass","targetStyle","text","title","trigger","triggerEl","triggers","width","wrapClass","wrapStyle"]);f.class=F,f.style={display:"inline-flex",alignItems:"center",...e.wrapStyle||e.targetStyle||{}};const m=JSswift.ui.renderSlot(s,"target",{open:()=>ce(a),show:()=>le(a),hide:()=>oe(!0),toggle:()=>ne(a),isOpen:J},R),g=_.span(f,...E(null,"default",{},m));return Z(g),g._tooltip={bind:Z,open:ce,show:le,hide:oe,close:K,toggle:ne,isOpen:J},g}return{bind:Z,open:ce,show:le,hide:oe,close:K,toggle:ne,isOpen:J}},(ri=JSswift.isDev)!=null&&ri.call(JSswift)&&(v.meta=v.meta||{},v.meta.Tooltip={signature:"UI.Tooltip(props, target?) | UI.Tooltip(target, content)",props:{title:"String|Node|Function|Array",content:"String|Node|Function|Array",text:"String|Node|Function|Array",body:"String|Node|Function|Array",footer:"String|Node|Function|Array",icon:"String|Node|Function|Array",target:"Node|Function|Array",trigger:'"hover focus" | "click" | "manual" | Array',interactive:"boolean",disabled:"boolean",open:"boolean | reactive",placement:"string",delay:"number",hideDelay:"number",offset:"number (legacy)",offsetX:"number",offsetY:"number",closeOnOutside:"boolean",closeOnEsc:"boolean",maxWidth:"string|number",minWidth:"string|number",width:"string|number",slots:"{ target?, icon?, title?, content?, footer?, default? }",class:"string",panelClass:"string",wrapClass:"string",style:"object",targetStyle:"object"},slots:{target:"Tooltip trigger content ({ open, show, hide, toggle, isOpen })",icon:"Tooltip icon content",title:"Tooltip title content",content:"Tooltip body content ({ close, hide, isOpen, anchorEl })",footer:"Tooltip footer content ({ close, hide, isOpen, anchorEl })",default:"Fallback tooltip body content"},events:{onOpen:"(entry) => void",onClose:"() => void",onTriggerClick:"(event) => void"},returns:"Object { bind(), open(), show(), hide(), close(), toggle(), isOpen() } | HTMLSpanElement",description:"Anchored tooltip with hover/focus/click triggers, rich content, and imperative API."});const bs=(t,e,n={})=>{var F;const{props:s,children:i}=JSswift.uiNormalizeArgs(e),c=s.slots||{},y=t==="radio",a=n.appearance==="toggle",l=!y,b=s.id||`cms-${t}-`+Math.random().toString(36).slice(2),R=kt(s.model,n.modelName||(y?"UI.Radio:model":"UI.Checkbox:model")),C=JSswift.omit(s,["model","label","checked","class","style","dense","onChange","onInput","slots","icon","iconOn","iconOff","iconStandby","checkedIcon","uncheckedIcon","standbyIcon","indeterminateIcon","inputClass","iconSize","color","size","outline","behavior","mode","flat","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","clickable","border","shortcode","shortcut","hotkey","showShortcode","showShortcut"]);C.type=t,C.id=b,y&&s.name!=null&&(C.name=s.name),C.class=ae([`cms-${t}`,"cms-choice-input",s.inputClass]);const w=_.input(C),T=E(c,"label",{},s.label),ee=T.length?T:E(c,"default",{},i),K=ms(s,{className:"cms-shortcode cms-choice-shortcode"}),re=K?[...ee,K]:ee,H=JSswift.omit(s,["model","label","checked","onChange","onInput","value","name","id","type","dense","inputClass","slots","icon","iconOn","iconOff","iconStandby","checkedIcon","uncheckedIcon","standbyIcon","indeterminateIcon","iconSize","color","size","behavior","mode","outline","flat","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","clickable","border","shortcode","shortcut","hotkey","showShortcode","showShortcut"]);H.class=ae(["cms-clear-set","cms-singularity-check","cms-choice-wrap",`cms-${t}-wrap`,me(a,"cms-toggle-wrap"),me(a&&y,"cms-toggle-radio-wrap"),me(a&&!y,"cms-toggle-checkbox-wrap"),me(s.dense,"dense"),s.class]),H.style={...s.style||{}};const j=o(s.size);j!=null&&!(typeof j=="string"&&((F=JSswift.uiSizes)!=null&&F.includes(j)))&&(H.style["--cms-choice-size"]=$e(j));const Y=_.span({class:ae(["cms-choice-mark",y?"cms-choice-radio-mark":"cms-choice-checkbox-mark",me(a,"cms-toggle-mark")])}),W=a?_.span({class:"cms-toggle-thumb"}):Y;a&&Y.appendChild(W);const ie=re.length?_.span({class:"cms-choice-label"},...re):null,ge=_.label(H,w,Y,ie);Ke(ge,s);const ce=s.iconSize?s.iconSize:s.size,le=a?null:y?"radio_button_checked":"check",oe=a?null:y?"radio_button_unchecked":null,ne=a||y?null:"indeterminate_check_box",J=f=>{if(y)return w.checked=f==s.value,w.checked;const m=f==null?null:!!f;return w.checked=m===!0,w.indeterminate=l&&m==null,m},Z=()=>!y&&l&&w.indeterminate?null:!!w.checked,X=f=>f===!0?s.checkedIcon!=null?s.checkedIcon:s.icon!=null?s.icon:le:f===!1?s.uncheckedIcon!=null?s.uncheckedIcon:oe:s.indeterminateIcon!=null?s.indeterminateIcon:s.standbyIcon!=null?s.standbyIcon:s.iconStandby!=null?s.iconStandby:ne,ue=()=>{const f=Z(),m=f===!0;for(;W.firstChild;)W.removeChild(W.firstChild);ge.classList.toggle("is-checked",m),ge.classList.toggle("is-indeterminate",f==null),ge.classList.toggle("is-disabled",!!w.disabled),m&&(s.checkedIcon||s.icon)?ge.classList.toggle("toggle-default",!1):m&&!s.checkedIcon||f==null&&!s.standbyIcon?ge.classList.toggle("toggle-default",!0):f==null&&s.standbyIcon?ge.classList.toggle("toggle-default",!1):w.disabled===!1&&!s.uncheckedIcon?ge.classList.toggle("toggle-default",!0):ge.classList.toggle("toggle-default",!1),a&&(f==null?W.style.transform="translateX(calc((var(--cms-toggle-width) - var(--cms-toggle-thumb-size) - 1px) / 2))":W.style.removeProperty("transform"));const g={checked:m,state:f,indeterminate:f==null,value:s.value,id:b,type:t};let O=null;if(f===!0?(O=JSswift.ui.renderSlot(c,"checkedIcon",g,null),O==null&&(O=JSswift.ui.renderSlot(c,"iconOn",g,null))):f===!1?(O=JSswift.ui.renderSlot(c,"uncheckedIcon",g,null),O==null&&(O=JSswift.ui.renderSlot(c,"iconOff",g,null))):(O=JSswift.ui.renderSlot(c,"indeterminateIcon",g,null),O==null&&(O=JSswift.ui.renderSlot(c,"standbyIcon",g,null)),O==null&&(O=JSswift.ui.renderSlot(c,"iconStandby",g,null))),O==null&&(O=JSswift.ui.renderSlot(c,"icon",g,null)),O==null){const Q=X(f);typeof Q=="string"?O=v.Icon({name:Q,size:ce,...a?{textColor:s.color,outline:!0}:{}}):Q!=null&&(O=JSswift.ui.slot(Q,{checked:m,state:f,indeterminate:f==null,as:f===!0?"checkedIcon":f===!1?"uncheckedIcon":"indeterminateIcon"}))}E(null,"default",{},O).forEach(Q=>W.appendChild(Q))};return R?(J(R.get()),R.watch(f=>{J(f),ue()},y?"UI.Radio:watch":"UI.Checkbox:watch"),w.addEventListener("change",f=>{var m,g;if(y)w.checked&&(R.set(s.value),(m=s.onChange)==null||m.call(s,s.value,f));else{const O=Z();R.set(O),(g=s.onChange)==null||g.call(s,O,f)}ue()})):(J(y?s.checked===!0?s.value:void 0:s.checked),w.addEventListener("change",f=>{var m,g;y?(m=s.onChange)==null||m.call(s,s.value,f):(g=s.onChange)==null||g.call(s,Z(),f),ue()})),s.onInput&&w.addEventListener("input",f=>{var m,g;y?(m=s.onInput)==null||m.call(s,s.value,f):(g=s.onInput)==null||g.call(s,Z(),f)}),ue(),an(ge,s,{isEnabled:()=>!w.disabled,action:()=>{if(w.disabled)return!1;hn(w),w.click()}}),ge};v.Checkbox=(...t)=>bs("checkbox",t),(ai=JSswift.isDev)!=null&&ai.call(JSswift)&&(v.meta=v.meta||{},v.meta.Checkbox={signature:"UI.Checkbox(...children) | UI.Checkbox(props, ...children)",props:{label:"String|Node|Function|Array",checked:"boolean|null",model:"[get,set] signal",icon:"String|Node|Function|Array",iconOn:"Alias of icon/checkedIcon",iconOff:"Alias of uncheckedIcon",iconStandby:"Icon for null/indeterminate state",checkedIcon:"String|Node|Function|Array",uncheckedIcon:"String|Node|Function|Array",color:"string",size:"string|number",outline:"boolean",dense:"boolean",shortcode:"string|Array<string>|object",showShortcode:"boolean",slots:"{ label?, default? }",class:"string",style:"object"},slots:{label:"Checkbox label",icon:"Base icon content",iconStandby:"Slot for null/indeterminate icon",checkedIcon:"Icon when checked",uncheckedIcon:"Icon when unchecked",default:"Fallback label content"},events:{onChange:"(checked|null, event)",onInput:"(checked|null, event)"},returns:"HTMLLabelElement",description:"Checkbox con label e supporto model."}),v.Radio=(...t)=>bs("radio",t),(ci=JSswift.isDev)!=null&&ci.call(JSswift)&&(v.meta=v.meta||{},v.meta.Radio={signature:"UI.Radio(...children) | UI.Radio(props, ...children)",props:{label:"String|Node|Function|Array",value:"any",name:"string",checked:"boolean|null",model:"[get,set] signal",icon:"String|Node|Function|Array",iconOn:"Alias of icon/checkedIcon",iconOff:"Alias of uncheckedIcon",checkedIcon:"String|Node|Function|Array",uncheckedIcon:"String|Node|Function|Array",color:"string",size:"string|number",outline:"boolean",dense:"boolean",shortcode:"string|Array<string>|object",showShortcode:"boolean",slots:"{ label?, default? }",class:"string",style:"object"},slots:{label:"Radio label",icon:"Base icon content",iconOn:"Alias slot for checked icon",iconOff:"Alias slot for unchecked icon",checkedIcon:"Icon when checked",uncheckedIcon:"Icon when unchecked",default:"Fallback label content"},events:{onChange:"(value, event)",onInput:"(value, event)"},returns:"HTMLLabelElement",description:"Radio con label e supporto model."}),v.Toggle=(...t)=>{var s,i,c;const{props:e}=JSswift.uiNormalizeArgs(t),n=String((c=(i=(s=e.behavior)!=null?s:e.mode)!=null?i:e.type)!=null?c:"checkbox").toLowerCase()==="radio"?"radio":"checkbox";return bs(n,t,{appearance:"toggle",modelName:"UI.Toggle:model"})},(di=JSswift.isDev)!=null&&di.call(JSswift)&&(v.meta=v.meta||{},v.meta.Toggle={signature:"UI.Toggle(...children) | UI.Toggle(props, ...children)",props:{label:"String|Node|Function|Array",behavior:'"checkbox"|"radio"',mode:"Alias of behavior",value:"any",name:"string",checked:"boolean",model:"[get,set] signal",icon:"String|Node|Function|Array",iconOn:"Alias of icon/checkedIcon",iconOff:"Alias of uncheckedIcon",iconStandby:"Icon for null/indeterminate state",checkedIcon:"String|Node|Function|Array",uncheckedIcon:"String|Node|Function|Array",color:"string",size:"string|number",dense:"boolean",shortcode:"string|Array<string>|object",showShortcode:"boolean",slots:"{ label?, default? }",class:"string",style:"object"},slots:{label:"Toggle label",icon:"Base icon content",iconOn:"Alias slot for checked icon",iconOff:"Alias slot for unchecked icon",iconStandby:"Slot for null/indeterminate icon",checkedIcon:"Icon when checked",uncheckedIcon:"Icon when unchecked",default:"Fallback label content"},events:{onChange:"(checked|value, event)",onInput:"(checked|value, event)"},returns:"HTMLLabelElement",description:"Toggle switch con supporto model e comportamento checkbox/radio."}),v.Slider=(...t)=>{var B,pe,Se,ye,V;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=e.model||(_t(e.value)||Pt(e.value)?e.value:null),c=kt(i,"UI.Slider:model"),y=JSswift.omit(e,["model","value","class","style","onChange","onInput","slots","label","icon","iconRight","thumbIcon","iconThumb","pointIcon","markers","markerLabels","labelMarks","leftLabel","rightLabel","startLabel","endLabel","minLabel","maxLabel","withQItem","qitem","item","itemClass","itemStyle","showValue","thumbLabel","labelValue","selectionColor","trackColor","thumbColor","inputClass","readonly","size"]);y.type="range",y.class=ae(["cms-slider-input",e.inputClass]);const a=_.input(y),l={...e.style||{}},b=o(e.size);if(b!=null){const D=typeof b=="string"&&((B=JSswift.uiSizes)!=null&&B.includes(b))?`var(--cms-size-${b})`:$e(b);l["--cms-slider-size"]=D,l["--cms-slider-track-size"]=`max(4px, calc(${D} / 4))`,l["--cms-slider-box-height"]=`calc(${D} * 1.5)`,l["--cms-slider-marker-size"]=`max(6px, calc(${D} / 3))`}const R=_.label({class:ae(["cms-clear-set","cms-singularity-check","cms-slider-wrap",me(e.dense,"dense"),e.class]),style:l});Ke(R,e);const C=_.div({class:"cms-slider-header"}),w=_.span({class:"cms-slider-label"}),T=_.span({class:"cms-slider-value"});C.append(w,T);const ee=_.div({class:"cms-slider-body"}),K=_.span({class:"cms-slider-icon cms-slider-icon-left"}),re=_.span({class:"cms-slider-edge-label cms-slider-edge-label-left"}),H=_.div({class:"cms-slider-main"}),j=_.div({class:"cms-slider-box",style:{minHeight:"var(--cms-slider-box-height, 36px)"}}),Y=_.span({class:"cms-slider-rail",style:{height:"var(--cms-slider-track-size, 6px)"}}),W=_.span({class:"cms-slider-selection",style:{height:"var(--cms-slider-track-size, 6px)"}}),ie=_.span({class:"cms-slider-thumb",style:{width:"var(--cms-slider-size, 24px)",height:"var(--cms-slider-size, 24px)"}}),ge=_.span({class:"cms-slider-thumb-icon"}),ce=_.span({class:"cms-slider-thumb-label"});ie.append(ce,ge);const le=_.div({class:"cms-slider-markers"}),oe=_.span({class:"cms-slider-edge-label cms-slider-edge-label-right"}),ne=_.span({class:"cms-slider-icon cms-slider-icon-right"});j.append(Y,W,ie,a),H.append(j,le),ee.append(K,re,H,oe,ne),R.append(C,ee);const J=D=>{for(;D.firstChild;)D.removeChild(D.firstChild)},Z=(D,q,Ne="")=>{J(D),(q||[]).forEach(ke=>D.appendChild(ke)),D.style.display=D.childNodes.length?Ne:"none"},X=D=>_t(D)||Pt(D)?o(D):D,ue=(D,q={})=>Ln(X(D),q),F=(D,q,Ne={})=>{var te,xe;const ke=X(D);return ke==null?[]:typeof ke=="string"?[v.Icon({name:ke,size:(xe=(te=e.iconSize)!=null?te:e.size)!=null?xe:16})]:ue(ke,{...Ne,as:q})},f=(D,q)=>{const Ne=Number(D);return Number.isFinite(Ne)?Ne:q},m=()=>f(o(e.min),0),g=()=>{const D=m(),q=f(o(e.max),100);return q<D?D:q},O=()=>{const D=o(e.step);if(D==="any")return"any";const q=f(D,1);return q>0?q:1},Q=D=>{if(D==="any")return 0;const q=String(D);if(q.includes("e-"))return Number(q.split("e-")[1]||0);const Ne=q.indexOf(".");return Ne===-1?0:q.length-Ne-1},r=D=>{const q=m(),Ne=g(),ke=O();let te=f(D,q);if(ke!=="any"){te=q+Math.round((te-q)/ke)*ke;const xe=Q(ke);xe>0&&(te=Number(te.toFixed(xe)))}return Math.min(Ne,Math.max(q,te))},x=D=>{const q=m(),ke=g()-q;if(!ke)return 0;const te=(r(D)-q)/ke,xe=o(e.reverse)?1-te:te;return Math.max(0,Math.min(1,xe))},[p,P]=JSswift.reactive.signal(r(c?c.get():(Se=(pe=o(e.value))!=null?pe:o(e.min))!=null?Se:0)),U=(D,q={})=>{const Ne=r(D);return p()!==Ne&&P(Ne),String(a.value)!==String(Ne)&&(a.value=String(Ne)),c&&q.fromModel!==!0&&c.set(Ne),Ne},G=()=>{var xe;const D=o(e.markers),q=!!o((xe=e.markerLabels)!=null?xe:e.labelMarks);if(!D)return[];const Ne=m(),ke=g(),te=(be,Ce)=>{var Le,Ae,z,we,M,N,S,d;if(be==null)return null;if(typeof be=="object"&&!Array.isArray(be)){const L=r((z=(Ae=(Le=be.value)!=null?Le:be.position)!=null?Ae:be.at)!=null?z:Ne);return{key:(we=be.key)!=null?we:`marker-${Ce}-${L}`,value:L,label:(M=be.label)!=null?M:q?String(L):null,icon:(N=be.icon)!=null?N:null,className:(d=(S=be.class)!=null?S:be.className)!=null?d:""}}const he=r(be);return{key:`marker-${Ce}-${he}`,value:he,label:q?String(be):null,icon:null,className:""}};if(Array.isArray(D))return D.map((be,Ce)=>te(be,Ce)).filter(Boolean);if(typeof D=="number"&&D>1){const be=Math.floor(D),Ce=be>1?(ke-Ne)/(be-1):0;return Array.from({length:be},(he,Le)=>te(Ne+Ce*Le,Le)).filter(Boolean)}if(D===!0){const be=O();if(be==="any")return[te(Ne,0),te(ke,1)].filter(Boolean);const Ce=Math.floor((ke-Ne)/be)+1;return Ce>24?[te(Ne,0),te((Ne+ke)/2,1),te(ke,2)].filter(Boolean):Array.from({length:Ce},(he,Le)=>te(Ne+be*Le,Le)).filter(Boolean)}return typeof D=="object"?Object.keys(D).map((be,Ce)=>te({value:Number(be),label:D[be]},Ce)).filter(Boolean):[]},de=()=>{J(le);const D=G();le.style.display=D.length?"block":"none",le.style.minHeight=D.some(q=>q.label!=null&&q.label!=="")?"30px":"10px",D.forEach(q=>{const Ne=x(q.value),ke=o(e.reverse)?p()<=q.value:p()>=q.value,te=_.button({type:"button",class:ae(["cms-slider-marker",q.className,me(()=>ke,"active")]),style:{left:`${Ne*100}%`,color:ke?o(e.color)||"var(--cms-primary)":"var(--cms-muted)",cursor:o(e.disabled)||o(e.readonly)?"default":"pointer"},disabled:!!o(e.disabled)||!!o(e.readonly),onClick:()=>{var z,we;if(o(e.disabled)||o(e.readonly))return;const Ae=U(q.value);(z=e.onInput)==null||z.call(e,Ae),(we=e.onChange)==null||we.call(e,Ae)}}),xe={marker:q,active:ke,value:q.value,current:p(),input:a};let be=JSswift.ui.renderSlot(s,"marker",xe,null);be==null&&q.icon!=null&&(be=typeof q.icon=="string"?v.Icon({name:q.icon,size:12}):JSswift.ui.slot(q.icon,{...xe,as:"marker"}));const Ce=_.span({class:"cms-slider-marker-tick",style:{width:"var(--cms-slider-marker-size, 8px)",height:"var(--cms-slider-marker-size, 8px)",background:ke?o(e.color)||"var(--cms-primary)":"var(--cms-border-color)"}}),he=be==null?[Ce]:E(null,"default",xe,be),Le=q.label==null?E(s,"markerLabel",xe,null):E(s,"markerLabel",xe,q.label);he.forEach(Ae=>te.appendChild(Ae)),Le.length&&te.appendChild(_.span({class:"cms-slider-marker-label"},...Le)),le.appendChild(te)})},A=()=>{var xe;const D={value:p(),input:a,props:e};let q=E(s,"label",D,X(e.label));q.length||(q=E(s,"default",D,n)),Z(w,q,"inline-flex");const Ne=o(e.showValue),ke=Ne===!1?null:(xe=X(e.labelValue))!=null?xe:p(),te=Ne||X(e.labelValue)!=null?E(s,"value",D,ke):[];Z(T,te,"inline-flex"),C.style.display=w.childNodes.length||T.childNodes.length?"flex":"none"},u=()=>{var Ce,he,Le,Ae;const D={value:p(),input:a,props:e},q=E(s,"icon",D,null),Ne=q.length?q:F(e.icon,"icon",D);Z(K,Ne,"inline-flex");const ke=E(s,"iconRight",D,null),te=ke.length?ke:F(e.iconRight,"iconRight",D);Z(ne,te,"inline-flex");const xe=X((he=(Ce=e.startLabel)!=null?Ce:e.leftLabel)!=null?he:e.minLabel),be=X((Ae=(Le=e.endLabel)!=null?Le:e.rightLabel)!=null?Ae:e.maxLabel);Z(re,E(s,"startLabel",D,xe),"inline-flex"),Z(oe,E(s,"endLabel",D,be),"inline-flex")},k=()=>{var xe,be,Ce,he;const D={value:p(),input:a,props:e},q=E(s,"thumbIcon",D,null),Ne=(be=(xe=e.thumbIcon)!=null?xe:e.iconThumb)!=null?be:e.pointIcon;Z(ge,q.length?q:F(Ne,"thumbIcon",D),"inline-flex");const ke=(he=(Ce=X(e.thumbLabel))!=null?Ce:X(e.labelValue))!=null?he:o(e.showValue)?String(p()):null,te=E(s,"thumbLabel",D,ke);Z(ce,te,"inline-flex")},I=()=>{const D=r(p()),q=m(),Ne=g(),ke=O(),xe=`${x(D)*100}%`,be=o(e.color)||o(e.selectionColor)||"var(--cms-primary)",Ce=o(e.trackColor)||"var(--cms-border-color)",he=o(e.thumbColor)||be,Le=!!o(e.readonly),Ae=!!o(e.disabled);a.min=String(q),a.max=String(Ne),a.step=ke==="any"?"any":String(ke),a.disabled=Ae,a.value=String(D),Y.style.background=Ce,W.style.background=be,W.style.width=xe,ie.style.left=xe,ie.style.borderColor=he,ie.style.color=he,ce.style.background=be,R.classList.toggle("is-disabled",Ae),R.classList.toggle("is-readonly",Le),R.classList.toggle("has-markers",le.childNodes.length>0)};if(c?(U(c.get(),{fromModel:!0}),c.watch(D=>{U(D,{fromModel:!0})},"UI.Slider:watch")):rt(e.value)?JSswift.reactive.effect(()=>{U(o(e.value),{fromModel:!0})},"UI.Slider:value"):U((V=(ye=e.value)!=null?ye:e.min)!=null?V:0,{fromModel:!0}),a.addEventListener("input",D=>{var Ne;if(o(e.disabled)||o(e.readonly)){a.value=String(p());return}const q=U(a.value);(Ne=e.onInput)==null||Ne.call(e,q,D)}),a.addEventListener("change",D=>{var Ne;if(o(e.disabled)||o(e.readonly)){a.value=String(p());return}const q=U(a.value);(Ne=e.onChange)==null||Ne.call(e,q,D)}),JSswift.reactive.effect(()=>{A(),u(),k(),de(),I()},"UI.Slider:render"),R._input=a,R._getValue=p,R._setValue=D=>U(D),e.withQItem||e.qitem||e.item===!0){const D=v.Item({class:ae(["cms-slider-item",e.itemClass]),style:e.itemStyle},R);return D._input=a,D._slider=R,D._getValue=p,D._setValue=R._setValue,D}return R},(ui=JSswift.isDev)!=null&&ui.call(JSswift)&&(v.meta=v.meta||{},v.meta.Slider={signature:"UI.Slider(...children) | UI.Slider(props, ...children)",props:{min:"number",max:"number",step:'number|"any"',value:"number | rod | [get,set] signal",model:"rod | [get,set] signal",label:"String|Node|Function|Array",icon:"String|Node|Function|Array",iconRight:"String|Node|Function|Array",thumbIcon:"String|Node|Function|Array",iconThumb:"Alias of thumbIcon",pointIcon:"Alias of thumbIcon",thumbLabel:"String|Node|Function|Array",showValue:"boolean",labelValue:"String|Node|Function|Array",markers:"boolean|number|Array|Object",markerLabels:"boolean",labelMarks:"Alias of markerLabels",startLabel:"String|Node|Function|Array",endLabel:"String|Node|Function|Array",leftLabel:"Alias of startLabel",rightLabel:"Alias of endLabel",minLabel:"Alias of startLabel",maxLabel:"Alias of endLabel",withQItem:"boolean",qitem:"Alias of withQItem",item:"boolean",itemClass:"string",itemStyle:"object",selectionColor:"string",trackColor:"string",thumbColor:"string",size:"string|number",readonly:"boolean",inputClass:"string",slots:"{ label?, default?, value?, icon?, iconRight?, thumbIcon?, thumbLabel?, marker?, markerLabel?, startLabel?, endLabel? }",class:"string",style:"object"},slots:{label:"Label content",default:"Fallback label content",value:"Header value content",icon:"Left icon content",iconRight:"Right icon content",thumbIcon:"Thumb icon content",thumbLabel:"Thumb label content",marker:"Marker content",markerLabel:"Marker label content",startLabel:"Label on the left/start of the track",endLabel:"Label on the right/end of the track"},events:{onChange:"(value, event)",onInput:"(value, event)"},returns:"HTMLLabelElement | HTMLLIElement (with ._input = HTMLInputElement)",description:"Reactive slider with label, icons, custom thumb, markers, and model/QItem support."}),v.Rating=(...t)=>{var p;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=e.model||(_t(e.value)||Pt(e.value)?e.value:null),c=kt(i,"UI.Rating:model"),y=e.id||"cms-rating-"+Math.random().toString(36).slice(2),a=JSswift.omit(e,["model","value","max","class","style","dense","readonly","disabled","clearable","half","allowHalf","noDimming","label","slots","onChange","onInput","onHover","icon","checkedIcon","uncheckedIcon","halfIcon","hoveredIcon","iconSelected","iconHalf","iconHovered","iconOn","iconOff","iconSize","color","colorSelected","colorHalf","colorHovered","colorInactive","activeColor","halfColor","hoverColor","size","gap","tabindex","tabIndex","inputClass"]);a.type="hidden",a.id=y,e.name!=null&&(a.name=e.name),a.class=ae(["cms-rating-input","cms-choice-input",e.inputClass]);const l=_.input(a),b=JSswift.omit(e,["model","value","max","id","name","type","class","style","dense","readonly","disabled","clearable","half","allowHalf","noDimming","label","slots","onChange","onInput","onHover","icon","checkedIcon","uncheckedIcon","halfIcon","hoveredIcon","iconSelected","iconHalf","iconHovered","iconOn","iconOff","iconSize","color","colorSelected","colorHalf","colorHovered","colorInactive","activeColor","halfColor","hoverColor","size","gap","tabindex","tabIndex","inputClass"]);b.class=ae(["cms-clear-set","cms-singularity-check","cms-choice-wrap","cms-rating","cms-rating-wrap",me(e.dense,"dense"),e.class]),b.style={...e.style||{}};const R=o(e.size);R!=null&&!(typeof R=="string"&&((p=JSswift.uiSizes)!=null&&p.includes(R)))&&(b.style["--cms-rating-size"]=$e(R));const C=o(e.gap);C!=null&&(b.style["--cms-rating-gap"]=$e(C));const w=_.span({class:"cms-rating-control",onMouseleave:P=>{var U;X!=null&&(X=null,r(),(U=e.onHover)==null||U.call(e,ne(),P))},onKeydown:P=>{if(!oe())return;const U=ie()?.5:1,G=ne();let de=G;switch(P.key){case"ArrowRight":case"ArrowUp":de=G+U;break;case"ArrowLeft":case"ArrowDown":de=G-U;break;case"Home":de=o(e.clearable)?0:U;break;case"End":de=W();break;case"Delete":case"Backspace":case"0":if(!o(e.clearable))return;de=0;break;case" ":case"Enter":de=G||(o(e.clearable)?U:Math.max(U,1));break;default:return}P.preventDefault(),x(de,P,{emit:!0})}}),T=_.span({class:"cms-choice-label cms-rating-label"}),ee=_.label(b,l,w,T);Ke(ee,e);const K=P=>{for(;P.firstChild;)P.removeChild(P.firstChild)},re=(P,U,G="")=>{K(P),(U||[]).forEach(de=>P.appendChild(de)),P.style.display=P.childNodes.length?G:"none"},H=P=>_t(P)||Pt(P)?o(P):P,j=(P,U={})=>Ln(H(P),U),Y=(P,U,G={})=>{var A,u;const de=H(P);return de==null?[]:typeof de=="string"?[v.Icon({name:de,color:e.color,size:(u=(A=e.iconSize)!=null?A:e.size)!=null?u:16})]:j(de,{...G,as:U})},W=()=>{var U;const P=Number((U=o(e.max))!=null?U:5);return Number.isFinite(P)&&P>0?Math.max(1,Math.round(P)):5},ie=()=>{var P;return!!o((P=e.half)!=null?P:e.allowHalf)},ge=(P,U=W())=>{let G=Number(o(P));Number.isFinite(G)||(G=0),G=Math.min(U,Math.max(0,G));const de=ie()?.5:1;return Math.round(G/de)*de},ce=()=>!!o(e.disabled),le=()=>!!o(e.readonly),oe=()=>!ce()&&!le(),ne=()=>ge(c?c.get():Z),J=P=>{const U=P>0?String(P):"";l.value=U,l.setAttribute("value",U),l.disabled=ce()};let Z=ge(c?c.get():o(e.value)),X=null,ue=0,F=[];const f=(P,U)=>{if(!ie())return ge(P);const G=U.currentTarget.getBoundingClientRect(),de=U.clientX-G.left<=G.width/2;return ge(de?P-.5:P)},m=(P,U)=>P>=U?"full":ie()&&P>=U-.5?"half":"empty",g=(P,U)=>{var k,I,B,pe,Se,ye,V,D,q,Ne,ke,te,xe,be,Ce;const G=o((B=(I=(k=e.colorSelected)!=null?k:e.activeColor)!=null?I:e.color)!=null?B:e.textColor)||"var(--cms-warning, #f0b429)",de=o((D=(V=(ye=(Se=(pe=e.colorHalf)!=null?pe:e.halfColor)!=null?Se:e.colorSelected)!=null?ye:e.activeColor)!=null?V:e.color)!=null?D:e.textColor)||G,A=o((xe=(te=(ke=(Ne=(q=e.colorHovered)!=null?q:e.hoverColor)!=null?Ne:e.colorSelected)!=null?ke:e.activeColor)!=null?te:e.color)!=null?xe:e.textColor)||G,u=o((Ce=(be=e.colorInactive)!=null?be:e.colorOff)!=null?Ce:e.color)||"var(--cms-muted)";return U?A:P==="full"?G:P==="half"?de:u},O=P=>{var A,u,k,I,B,pe,Se,ye,V,D,q,Ne,ke,te,xe;const U=[];P.hovered&&P.state!=="empty"&&U.push("hoveredIcon","iconHovered"),P.state==="full"?U.push("checkedIcon","selectedIcon","iconSelected","iconOn"):P.state==="half"?U.push("halfIcon","iconHalf"):U.push("uncheckedIcon","iconOff"),U.push("icon","item","star");for(const be of U){const Ce=E(s,be,P,null);if(Ce.length)return Ce}let G=null,de="icon";return P.hovered&&P.state!=="empty"&&(G=(A=e.hoveredIcon)!=null?A:e.iconHovered,de="hoveredIcon"),G==null&&P.state==="full"?(G=(B=(I=(k=(u=e.checkedIcon)!=null?u:e.iconSelected)!=null?k:e.iconOn)!=null?I:e.icon)!=null?B:"star",de="checkedIcon"):G==null&&P.state==="half"?(G=(D=(V=(ye=(Se=(pe=e.halfIcon)!=null?pe:e.iconHalf)!=null?Se:e.checkedIcon)!=null?ye:e.iconSelected)!=null?V:e.icon)!=null?D:"star_half",de="halfIcon"):G==null&&(G=(xe=(q=e.uncheckedIcon)!=null?q:e.iconOff)!=null?xe:o(e.noDimming)?(te=(ke=(Ne=e.icon)!=null?Ne:e.checkedIcon)!=null?ke:e.iconSelected)!=null?te:"star":"star_border",de="uncheckedIcon"),Y(G,de,P)},Q=()=>{const P=W();if(ue!==P){ue=P,F=[],K(w);for(let U=1;U<=P;U++){const G=_.span({class:"cms-rating-item-icon"}),de=_.span({class:"cms-rating-item",role:"radio",tabIndex:-1,onMousemove:A=>{var k;if(!oe())return;const u=f(U,A);X!==u&&(X=u,r(),(k=e.onHover)==null||k.call(e,u,A))},onClick:A=>{if(!oe())return;let u=f(U,A);o(e.clearable)&&u===ne()&&(u=0),x(u,A,{emit:!0})}},G);F.push({item:de,iconHost:G,index:U}),w.appendChild(de)}}},r=()=>{var pe,Se;Q();const P=W(),U=ne(),G=X==null?U:ge(X,P),de=ce(),A=le(),u=!!o(e.clearable),k=!!o(e.noDimming);ee.classList.toggle("is-disabled",de),ee.classList.toggle("is-readonly",A),ee.classList.toggle("is-hovering",X!=null),ee.classList.toggle("is-clearable",u),ee.classList.toggle("is-half",ie()),ee.classList.toggle("no-dimming",k);const I=Number((Se=o((pe=e.tabindex)!=null?pe:e.tabIndex))!=null?Se:0);w.tabIndex=de?-1:I,w.setAttribute("role","slider"),w.setAttribute("aria-valuemin","0"),w.setAttribute("aria-valuemax",String(P)),w.setAttribute("aria-valuenow",String(U)),w.setAttribute("aria-disabled",de?"true":"false"),w.setAttribute("aria-readonly",A?"true":"false"),J(U);const B=E(s,"label",{value:U,max:P,disabled:de,readonly:A,clearable:u},e.label!=null?H(e.label):n);re(T,B,"inline-flex"),F.forEach(({item:ye,iconHost:V,index:D})=>{const q=m(G,D),Ne=X!=null&&q!=="empty",ke={index:D,max:P,value:U,displayValue:G,state:q,active:q!=="empty",checked:q==="full",half:q==="half",hovered:Ne,disabled:de,readonly:A,clearable:u,setValue:te=>x(te,null,{emit:!1})};ye.className=Ht(["cms-rating-item",`is-${q}`,me(Ne,"is-hovered")]),ye.style.color=g(q,Ne),ye.style.opacity=q==="empty"&&!k?"0.48":"1",ye.setAttribute("aria-checked",String(U===D)),re(V,O(ke),"inline-flex")})},x=(P,U,G={})=>{var u,k;const de=ge(P),A=ne();return Z=de,X=null,c&&G.fromModel!==!0&&c.set(de),J(de),r(),G.emit!==!1&&de!==A&&((u=e.onInput)==null||u.call(e,de,U),(k=e.onChange)==null||k.call(e,de,U)),de};return ee._input=l,ee._rating=w,ee._getValue=ne,ee._setValue=P=>x(P,null,{emit:!1}),c&&c.watch(P=>{const U=ge(P);serializeValue(U)!==serializeValue(Z)&&(Z=U,X=null,J(Z),r())},"UI.Rating:watch"),JSswift.reactive.effect(()=>{!c&&e.value!=null&&(Z=ge(o(e.value))),r()},"UI.Rating:render"),ee},(fi=JSswift.isDev)!=null&&fi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Rating={signature:"UI.Rating(...children) | UI.Rating(props, ...children)",props:{max:"number",value:"number | rod | [get,set] signal",model:"rod | [get,set] signal",name:"string",label:"String|Node|Function|Array",clearable:"boolean",half:"boolean",allowHalf:"Alias of half",noDimming:"boolean",readonly:"boolean",disabled:"boolean",icon:"String|Node|Function|Array",iconSelected:"Alias of checkedIcon",checkedIcon:"String|Node|Function|Array",uncheckedIcon:"String|Node|Function|Array",iconHalf:"Alias of halfIcon",halfIcon:"String|Node|Function|Array",iconHovered:"Alias of hoveredIcon",hoveredIcon:"String|Node|Function|Array",color:"string",colorSelected:"string",colorHalf:"string",colorHovered:"string",colorInactive:"string",iconSize:"string|number",size:"string|number",gap:"string|number",slots:"{ label?, icon?, checkedIcon?, uncheckedIcon?, halfIcon?, hoveredIcon?, item?, star? }",class:"string",style:"object"},slots:{label:"Label content",icon:"Base icon content per item",checkedIcon:"Icon when item is selected",uncheckedIcon:"Icon when item is empty",halfIcon:"Icon when item is half-selected",hoveredIcon:"Icon while hovering selected items",item:"Custom item renderer",star:"Alias of item/icon"},events:{onChange:"(value, event)",onInput:"(value, event)",onHover:"(value, event)"},keyboard:["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","Enter","Space","Delete","Backspace","0"],returns:"HTMLLabelElement (with ._input, ._rating, ._getValue(), ._setValue(value))",description:"Reactive rating with label, custom icons, half rating, clearable behavior, and model support."});const lt=t=>t?{hour:Number(t.hour)||0,minute:Number(t.minute)||0,second:Number(t.second)||0}:null,Gt=t=>String(Math.max(0,Number(t)||0)).padStart(2,"0"),jt=(t,e={})=>{var a,l,b,R,C,w,T,ee,K,re,H,j,Y,W,ie;if(t==null||t==="")return null;let n=null,s=null,i=0,c=null;if(t instanceof Date&&!Number.isNaN(t.getTime()))n=t.getHours(),s=t.getMinutes(),i=t.getSeconds();else if(typeof t=="number"&&Number.isFinite(t)){const ge=Math.max(0,Math.floor(t));n=Math.floor(ge/3600)%24,s=Math.floor(ge/60)%60,i=ge%60}else if(typeof t=="object"){if(t.time!=null||t.value!=null)return jt((a=t.time)!=null?a:t.value,e);n=Number((R=(b=(l=t.hour)!=null?l:t.hours)!=null?b:t.h)!=null?R:t.hh),s=Number((ee=(T=(w=(C=t.minute)!=null?C:t.minutes)!=null?w:t.min)!=null?T:t.mm)!=null?ee:0),i=Number((j=(H=(re=(K=t.second)!=null?K:t.seconds)!=null?re:t.sec)!=null?H:t.ss)!=null?j:0),c=(ie=(W=(Y=t.meridiem)!=null?Y:t.ampm)!=null?W:t.period)!=null?ie:null}else if(typeof t=="string"){const ge=t.trim();if(!ge)return null;const ce=ge.match(/^(\d{1,2})(\d{2})(\d{2})?$/),le=ge.match(/(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?\s*([ap]m)?/i);if(le)n=Number(le[1]),s=Number(le[2]),i=le[3]!=null?Number(le[3]):0,c=le[4]||null;else if(ce)n=Number(ce[1]),s=Number(ce[2]),i=ce[3]!=null?Number(ce[3]):0;else return null}else return null;if(!Number.isFinite(n)||!Number.isFinite(s)||!Number.isFinite(i))return null;if(c){const ge=String(c).toLowerCase();ge==="pm"&&n<12&&(n+=12),ge==="am"&&n===12&&(n=0)}if(n<0||n>23||s<0||s>59||i<0||i>59)return null;const y={hour:Math.floor(n),minute:Math.floor(s),second:Math.floor(i)};return po(y,e)},Qt=(t,e={})=>{const n=t&&typeof t=="object"&&t.hour!=null?lt(t):jt(t,e);if(!n)return"";const s=e.withSeconds===!0||Number(n.second||0)>0;return`${Gt(n.hour)}:${Gt(n.minute)}${s?`:${Gt(n.second)}`:""}`},Bn=(t,e)=>{const n=Qt(t,{withSeconds:!0}),s=Qt(e,{withSeconds:!0});return!n&&!s?0:n?s?n<s?-1:n>s?1:0:1:-1};function po(t,e={}){if(!t)return null;const n=lt(t),s=e.min!=null?jt(e.min,{withSeconds:!0}):null,i=e.max!=null?jt(e.max,{withSeconds:!0}):null;return s&&Bn(n,s)<0?lt(s):i&&Bn(n,i)>0?lt(i):n}const Mt=(t,e={})=>t==null||t===""?null:t instanceof Date?jt(t,e):typeof t=="object"?jt(t.time!=null?t.time:t,e):typeof t=="string"||typeof t=="number"?jt(t,e):null,Un=(t,e={})=>{var a;const n=jt(t,e);if(!n)return"";const s=e.withSeconds===!0||Number(n.second||0)>0;if(!!!o((a=e.use12h)!=null?a:e.ampm))return`${Gt(n.hour)}:${Gt(n.minute)}${s?`:${Gt(n.second)}`:""}`;const c=n.hour>=12?"PM":"AM",y=n.hour%12||12;return`${Gt(y)}:${Gt(n.minute)}${s?`:${Gt(n.second)}`:""} ${c}`},er=(t,e,n={})=>{if(!t)return"";const s=Qt(e,n);return s?`${t}T${s}`:t},ys=(t,e)=>{const n=Math.max(1,Math.min(e+1,Math.round(Number(t)||1))),s=[];for(let i=0;i<=e;i+=n)s.push(i);return s},ho=(t={})=>{const{props:e={},slots:n={},value:s=null,withSeconds:i=!1,minuteStep:c=5,secondStep:y=5,disabled:a=!1,readonly:l=!1,embedded:b=!1,className:R="",slotPrefix:C="",shortcuts:w=null,onSelect:T=null}=t,ee=jt(s,{withSeconds:i,min:e.min,max:e.max}),K=ee||jt(new Date,{withSeconds:i,min:e.min,max:e.max})||{hour:0,minute:0,second:0},re=ee?lt(ee):null,H=oe=>C?`${C}${oe[0].toUpperCase()}${oe.slice(1)}`:null,j=(oe,ne,J)=>{const Z=[H(oe),oe].filter(Boolean);for(const X of Z){if(JSswift.ui.getSlot(n,X)==null)continue;const F=JSswift.ui.renderSlot(n,X,ne,J);if(F!=null)return F}return JSswift.ui.slot(J,ne)},Y=oe=>{let ne=j("point",oe,null);return ne==null&&t.pointIcon!=null&&oe.selected&&(ne=typeof t.pointIcon=="string"?v.Icon({name:t.pointIcon,size:b?10:12}):JSswift.ui.slot(t.pointIcon,oe)),E(null,"default",oe,ne)},W=(oe,ne)=>{const J={hour:K.hour,minute:K.minute,second:i?K.second:0};return J[oe]=ne,J},ie=_.div({class:ae(["cms-time-section",me(b,"is-embedded"),me(i,"has-seconds"),R])}),ge=o(w)||[];if(Array.isArray(ge)&&ge.length){const oe=_.div({class:"cms-time-shortcuts"});ge.forEach((ne,J)=>{var f,m,g;if(!ne)return;const Z=typeof ne.value=="function"?ne.value({now:Qt(new Date,{withSeconds:i})}):ne.value,X=jt(Z,{withSeconds:i,min:e.min,max:e.max});if(!X)return;const ue={item:ne,index:J,value:Qt(X,{withSeconds:i}),displayValue:Un(X,{withSeconds:i,use12h:(f=e.use12h)!=null?f:e.ampm})},F=j("shortcut",ue,(g=(m=ne.label)!=null?m:ne.text)!=null?g:ue.displayValue);oe.appendChild(_.button({type:"button",class:ae(["cms-time-shortcut",me(!!re&&Bn(X,re)===0,"is-selected")]),disabled:a||l,onClick:()=>T==null?void 0:T(X,{shortcut:ne,index:J})},...E(null,"default",ue,F)))}),oe.childNodes.length&&ie.appendChild(oe)}const ce=_.div({class:"cms-time-columns"}),le=(oe,ne,J)=>{const Z=_.div({class:"cms-time-column","data-time-part":ne}),X=_.div({class:"cms-time-options"});return J.forEach(ue=>{var x;const F=W(ne,ue),f=po(F,{withSeconds:i,min:e.min,max:e.max}),m=a||l||Bn(f,F)!==0,g=!!re&&re[ne]===ue,O={part:ne,selected:g,disabled:m,value:ue,label:Gt(ue),timeValue:Qt(f,{withSeconds:i}),displayValue:Un(f,{withSeconds:i,use12h:(x=e.use12h)!=null?x:e.ampm})},Q=j("option",O,O.label),r=g?Y(O):[];X.appendChild(_.button({type:"button",class:ae(["cms-time-option",me(g,"is-selected"),me(m,"is-disabled")]),disabled:m,onClick:()=>T==null?void 0:T(f,{part:ne,optionValue:ue})},_.span({class:"cms-time-option-label"},...E(null,"default",O,Q)),r.length?_.span({class:"cms-time-option-point"},...r):null))}),Z.appendChild(X),Z};return ce.appendChild(le(o(e.hoursLabel)||"Ore","hour",ys(1,23))),ce.appendChild(le(o(e.minutesLabel)||"Min","minute",ys(c,59))),i&&ce.appendChild(le(o(e.secondsLabel)||"Sec","second",ys(y,59))),ie.appendChild(ce),ie},Wn=t=>{if(!t)return null;const e={};return t.querySelectorAll(".cms-time-column").forEach((n,s)=>{const i=n.getAttribute("data-time-part")||String(s);e[i]=n.scrollTop}),e},bo=(t,e={})=>{var i;if(!t)return;const n=e.scrollState||null,s=(i=e.behavior)!=null?i:"smooth";t.querySelectorAll(".cms-time-column").forEach((c,y)=>{const a=c.getAttribute("data-time-part")||String(y),l=n&&Number.isFinite(n[a])?n[a]:null;l!=null&&(c.scrollTop=l);const b=c.querySelector(".cms-time-option.is-selected");if(!b)return;const R=Math.max(0,c.scrollHeight-c.clientHeight),C=b.offsetTop-(c.clientHeight-b.offsetHeight)/2,w=Math.max(0,Math.min(R,C));if(Math.abs(c.scrollTop-w)<1){c.scrollTop=w;return}if(s&&typeof c.scrollTo=="function"){c.scrollTo({top:w,behavior:s});return}c.scrollTop=w})},yo=(t,e={})=>{var dn,un,nn,sn,ze,Ve,et,ct,gt,pt,Ct,yt;const{props:n,children:s}=JSswift.uiNormalizeArgs(t),i=e.calendar===!0,c=n.slots||{},y=Ye(n.size,()=>{const h=String(o(n.size)||"").toLowerCase();return["xs","sm","md","lg","xl"].includes(h)?`cms-size-${h}`:""}),a=String(o((sn=(nn=n.mode)!=null?nn:o((un=(dn=n.rangeMultiple)!=null?dn:n.multipleRange)!=null?un:n.multiRange)?"range-multiple":null)!=null?sn:n.range&&n.multiple?"range-multiple":n.range?"range":n.multiple?"multiple":"single")).toLowerCase(),l=["range-multiple","multiple-range","rangemultiple","multiplerange","range_multiple","multiple_range","multi-range","multi_range","ranges"].includes(a)?"range-multiple":a==="range"?"range":a==="multiple"?"multiple":"single",b=n.model||(_t(n.value)||Pt(n.value)?n.value:null),R=kt(b,i?"UI.Calendar:model":"UI.Datepicker:model"),C=R?R.get():o(n.value),w=o((ze=n.rangeAs)!=null?ze:n.rangeModel)==="array"||Array.isArray(C),T=o((Ve=n.rangeMultipleAs)!=null?Ve:n.multipleRangeAs)==="array"||Array.isArray(C)&&Array.isArray(C[0]),ee=()=>{var h,se,ve;return l==="single"&&!!o((ve=(se=(h=n.withTime)!=null?h:n.time)!=null?se:n.timePicker)!=null?ve:n.enableTime)},K=()=>{var se,ve,Me,Je,Oe,He,Xe,it;const h=Qt(Mt((ve=(se=o(n.timeValue))!=null?se:R?R.get():o(n.value))!=null?ve:C,{withSeconds:!0}),{withSeconds:!0});return{withSeconds:!!o((Je=(Me=n.timeWithSeconds)!=null?Me:n.withSeconds)!=null?Je:n.showSeconds)||/:\d{2}:\d{2}$/.test(h)||/:\d{2}:\d{2}$/.test(o(n.timeFormat)||""),min:o((Oe=n.timeMin)!=null?Oe:n.minTime),max:o((He=n.timeMax)!=null?He:n.maxTime),use12h:o((it=(Xe=n.time12h)!=null?Xe:n.use12h)!=null?it:n.ampm)}},re=()=>{var se,ve;const h=Number(o((ve=(se=n.timeMinuteStep)!=null?se:n.minuteStep)!=null?ve:5));return Math.max(1,Math.min(30,Number.isFinite(h)?h:5))},H=()=>{var se,ve;const h=Number(o((ve=(se=n.timeSecondStep)!=null?se:n.secondStep)!=null?ve:5));return Math.max(1,Math.min(30,Number.isFinite(h)?h:5))},j=h=>String(h).padStart(2,"0"),Y=(h,se,ve)=>{const Me=new Date(h,se,ve);return Me.getFullYear()!==h||Me.getMonth()!==se||Me.getDate()!==ve?null:Me},W=h=>!(h instanceof Date)||Number.isNaN(h.getTime())?null:`${h.getFullYear()}-${j(h.getMonth()+1)}-${j(h.getDate())}`,ie=h=>{if(typeof h!="string")return null;const se=h.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!se)return null;const ve=Number(se[1]),Me=Number(se[2])-1,Je=Number(se[3]),Oe=new Date(ve,Me,Je);return Oe.getFullYear()!==ve||Oe.getMonth()!==Me||Oe.getDate()!==Je?null:Oe},ge=(h,se)=>{const ve=ie(h);return ve?(ve.setDate(ve.getDate()+se),W(ve)):null},ce=(h,se)=>new Date(h.getFullYear(),h.getMonth()+se,1),le=h=>{if(h instanceof Date&&!Number.isNaN(h.getTime()))return new Date(h.getFullYear(),h.getMonth(),1);const se=r(h),ve=ie(se);return ve?new Date(ve.getFullYear(),ve.getMonth(),1):new Date},oe=()=>W(new Date),ne=(h,se)=>!!h&&!!se&&h===se,J=(h,se)=>h==null&&se==null?0:h==null?-1:se==null?1:h<se?-1:h>se?1:0,Z=(h,se)=>{const ve=ie(h),Me=ie(se);return!ve||!Me?0:Math.round((Me.getTime()-ve.getTime())/864e5)},X=h=>Array.isArray(h)?h.slice():h==null||h===""?[]:[h],ue=h=>({from:(h==null?void 0:h.from)||null,to:(h==null?void 0:h.to)||null}),F=h=>Array.isArray(h)?h.map(ue):[],f=h=>{const se=ue(h);return w?[se.from,se.to]:se},m=h=>F(h).map(se=>T?[se.from,se.to]:se),g=h=>l==="multiple"?Array.isArray(h)?h.slice():[]:l==="range"?ue(h):l==="range-multiple"?F(h):h||null,O=h=>l==="multiple"?Array.isArray(h)?h.slice():[]:l==="range"?f(h):l==="range-multiple"?m(h):h||"",Q=h=>JSON.stringify(O(h)),r=h=>{if(h==null||h==="")return null;if(h instanceof Date)return W(h);if(typeof h=="number")return W(new Date(h));if(typeof h!="string")return typeof h=="object"&&h.date!=null?r(h.date):null;const se=h.trim();if(!se)return null;const ve=se.match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:$|[T\s])/);if(ve){const He=Y(Number(ve[1]),Number(ve[2])-1,Number(ve[3]));return W(He)}const Me=se.match(/^(\d{1,2})[\/.\-](\d{1,2})[\/.\-](\d{2,4})$/);if(Me){const He=Me[3].length===2?2e3+Number(Me[3]):Number(Me[3]),Xe=Y(He,Number(Me[2])-1,Number(Me[1]));return W(Xe)}if(/^\d{1,4}$/.test(se))return null;const Je=new Date(se);if(Number.isNaN(Je.getTime()))return null;const Oe=se.match(/(?:^|[^\d])(\d{4})(?!\d)/);return Oe&&Je.getFullYear()!==Number(Oe[1])?null:W(Je)},x=h=>{var Me,Je,Oe,He,Xe,it;if(h==null||h==="")return{from:null,to:null};let se=null,ve=null;if(Array.isArray(h))se=r(h[0]),ve=r(h[1]);else if(typeof h=="object")se=r((Oe=(Je=(Me=h.from)!=null?Me:h.start)!=null?Je:h.dateFrom)!=null?Oe:h.departure),ve=r((it=(Xe=(He=h.to)!=null?He:h.end)!=null?Xe:h.dateTo)!=null?it:h.return);else{const ht=String(h).match(/\d{4}-\d{1,2}-\d{1,2}|\d{1,2}[\/.\-]\d{1,2}[\/.\-]\d{2,4}/g)||[];se=r(ht[0]),ve=r(ht[1])}return se&&ve&&se>ve&&([se,ve]=[ve,se]),{from:se,to:ve}},p=h=>{const se=[],ve=new Set,Me=Je=>{const Oe=x(Je);if(!Oe.from)return;const He=`${Oe.from||""}|${Oe.to||""}`;ve.has(He)||(ve.add(He),se.push(Oe))};if(h==null||h==="")return se;if(Array.isArray(h))if(h.every(Oe=>Oe==null||typeof Oe=="string"||typeof Oe=="number"||Oe instanceof Date)){const Oe=h.map(r).filter(Boolean);for(let He=0;He<Oe.length;He+=2)Me({from:Oe[He],to:Oe[He+1]||null})}else h.forEach(Oe=>Me(Oe));else if(typeof h=="object"&&Array.isArray(h.ranges))h.ranges.forEach(Je=>Me(Je));else if(typeof h=="object")Me(h);else{const Oe=(String(h).match(/\d{4}-\d{1,2}-\d{1,2}|\d{1,2}[\/.\-]\d{1,2}[\/.\-]\d{2,4}/g)||[]).map(r).filter(Boolean);for(let He=0;He<Oe.length;He+=2)Me({from:Oe[He],to:Oe[He+1]||null})}return se.sort((Je,Oe)=>J(Je.from,Oe.from)||J(Je.to,Oe.to))},P=h=>{const se=[];return X(h).forEach(ve=>{const Me=r(ve);Me&&!se.includes(Me)&&se.push(Me)}),se.sort()},U=h=>l==="range"?x(h):l==="range-multiple"?p(h):l==="multiple"?P(h):r(h),G=()=>{var h;return r(o((h=n.min)!=null?h:n.minDate))},de=()=>{var h;return r(o((h=n.max)!=null?h:n.maxDate))},A=()=>o(n.locale)||void 0,u=()=>{var se,ve;const h=Number(o((ve=(se=n.firstDayOfWeek)!=null?se:n.weekStart)!=null?ve:1));return Number.isFinite(h)?(h%7+7)%7:1},k=()=>{var ve;const h=l==="range"||l==="range-multiple"?2:1,se=Number((ve=o(n.monthsToShow))!=null?ve:h);return Math.max(1,Math.min(4,Number.isFinite(se)?se:h))},I=()=>{const h=G(),se=de();let ve=r(o(n.defaultMonth))||oe();return h&&ve<h&&(ve=h),se&&ve>se&&(ve=se),ve||h||se||oe()},B=()=>o(n.confirm)?Ae:Le,pe=h=>{const se=ie(h);return se?{date:h,value:h,year:se.getFullYear(),month:se.getMonth()+1,day:se.getDate(),weekday:se.getDay(),today:ne(h,oe())}:{date:h,value:h}},Se=(h,se)=>h==null?!1:Array.isArray(h)?h.some(ve=>r(ve)===se):h instanceof Set?h.has(se):typeof h=="function"?!!h(se,pe(se)):typeof h=="string"||h instanceof Date||typeof h=="number"?r(h)===se:!1,ye=h=>{var it,ht,xt,$t,zt,Ft,on,fn,mn,Sn,zn,Tn,Pn;if(!h)return!1;const se=G(),ve=de();if(se&&h<se||ve&&h>ve)return!1;const Me=o((ht=(it=n.options)!=null?it:n.enableDates)!=null?ht:n.allowedDates);if(Me!=null&&!Se(Me,h))return!1;const Je=o(($t=(xt=n.disableDates)!=null?xt:n.disabledDates)!=null?$t:n.notAllowedDates);if(Je!=null&&Se(Je,h))return!1;const Oe=(zt=ie(h))==null?void 0:zt.getDay();if(Array.isArray(o((Ft=n.allowedWeekdays)!=null?Ft:n.weekdays))&&Oe!=null&&!o((on=n.allowedWeekdays)!=null?on:n.weekdays).map(xn=>Number(xn)).includes(Oe)||o(n.weekdaysOnly)&&(Oe===0||Oe===6)||o(n.weekendsOnly)&&Oe!=null&&Oe!==0&&Oe!==6)return!1;const He=B(),Xe=l==="range"?He!=null&&He.from&&!(He!=null&&He.to)?He:null:l==="range-multiple"&&Array.isArray(He)&&He.length&&(fn=He[He.length-1])!=null&&fn.from&&!((mn=He[He.length-1])!=null&&mn.to)?He[He.length-1]:null;if(Xe!=null&&Xe.from){const Cn=Math.abs(Z(Xe.from,h)),xn=Number(o((zn=(Sn=n.minRange)!=null?Sn:n.minDays)!=null?zn:n.minNights)),En=Number(o((Pn=(Tn=n.maxRange)!=null?Tn:n.maxDays)!=null?Pn:n.maxNights));if(Number.isFinite(xn)&&Cn<xn||Number.isFinite(En)&&Cn>En)return!1}return!0},V=h=>{var Me,Je;if(!h)return"";const se=ie(h);return!se||String(o((Je=(Me=n.displayMask)!=null?Me:n.mask)!=null?Je:"")||"").toLowerCase()==="iso"||o(n.isoDisplay)===!0?h:new Intl.DateTimeFormat(A(),{year:"numeric",month:"short",day:"2-digit"}).format(se)},D=(h,se=z)=>{if(l==="range-multiple")return!Array.isArray(h)||!h.length?"":h.length>2&&o(n.compactMultiple)!==!1?`${h.length} ${o(n.multipleRangeLabel)||"intervalli selezionati"}`:h.map(Je=>{const Oe=Je!=null&&Je.from?V(Je.from):"",He=Je!=null&&Je.to?V(Je.to):"";return Oe&&He?`${Oe} -> ${He}`:Oe||He||""}).filter(Boolean).join("; ");if(l==="multiple")return!Array.isArray(h)||!h.length?"":h.length>3&&o(n.compactMultiple)!==!1?`${h.length} ${o(n.multipleLabel)||"date selezionate"}`:h.map(V).join(", ");if(l==="range"){const Je=h!=null&&h.from?V(h.from):"",Oe=h!=null&&h.to?V(h.to):"";return Je&&Oe?`${Je} -> ${Oe}`:Je||Oe||""}const ve=V(h);if(!ee())return ve;const Me=he(se);return[ve,Me].filter(Boolean).join(" \u2022 ")},q=h=>(String(h||"").match(/\d{4}-\d{1,2}-\d{1,2}|\d{1,2}[\/.\-]\d{1,2}[\/.\-]\d{2,4}/g)||[]).map(r).filter(Boolean),Ne=h=>{if(h==null||h==="")return l==="multiple"||l==="range-multiple"?[]:l==="range"?{from:null,to:null}:null;const se=q(h);if(l==="range-multiple"){const ve=[];for(let Me=0;Me<se.length;Me+=2)se[Me]&&ve.push({from:se[Me],to:se[Me+1]||null});return ve}return l==="multiple"?se:l==="range"?{from:se[0]||null,to:se[1]||null}:se[0]||r(h)},ke=()=>l==="multiple"||l==="range-multiple"?[]:l==="range"?{from:null,to:null}:null,te=(h,se=null)=>{var He;if(!ee())return null;const ve=K(),Me=o(n.timeValue),Je=h!=null?h:Me,Oe=Mt(Je,ve);return lt((He=Oe!=null?Oe:se)!=null?He:null)},xe=()=>o(n.confirm)?we:z,be=(h=Le,se=z)=>l==="single"&&ee()?er(h||null,se,K()):O(h),Ce=(h=Le,se=z)=>JSON.stringify(be(h,se)),he=h=>Un(h,K());let Le=U(C),Ae=g(Le),z=te(C,Mt(o(n.timeValue),K())),we=lt(z),M=null,N=null,S=le(l==="range"?(Le==null?void 0:Le.from)||(Le==null?void 0:Le.to)||I():l==="range-multiple"?((et=Le==null?void 0:Le[Le.length-1])==null?void 0:et.from)||((ct=Le==null?void 0:Le[Le.length-1])==null?void 0:ct.to)||I():l==="multiple"?Le[0]||I():Le||I()),d=null,L=null;const fe=h=>{const se=h instanceof Date?h:ie(r(h));if(!se)return-1;const ve=se.getFullYear(),Me=se.getMonth();for(let Je=0;Je<k();Je+=1){const Oe=ce(S,Je);if(Oe.getFullYear()===ve&&Oe.getMonth()===Me)return Je}return-1},Fe={...n,label:(gt=n.label)!=null?gt:n.placeholder},Te=Fe.label!=null||JSswift.ui.getSlot(c,"label")!=null,$=l==="range"?"Seleziona andata e ritorno":l==="range-multiple"?"Seleziona intervalli":l==="multiple"?"Seleziona date":"Seleziona data",_e=i?null:_.input({class:ae(["cms-input","cms-date-display",y,me(n.manualInput,"is-manual"),n.inputClass]),type:"text",autocomplete:"off",placeholder:Te?"":(pt=n.placeholder)!=null?pt:$,readOnly:!o(n.manualInput),disabled:!!o(n.disabled),value:D(Le,z)}),Re=_.div({style:{display:"contents"}}),Pe=i?null:_.div({class:"cms-date-control",style:{display:"contents"}},_e,Re),De=i?null:v.FormField({...Fe,iconRight:(Ct=n.iconRight)!=null?Ct:"calendar_month",control:Pe,getValue:()=>_e.value,onClear:()=>{o(n.disabled)||o(n.readonly)||(Qe(ke(),null),d&&St())},onFocus:()=>_e.focus()}),We=(h,se={})=>{var Je,Oe;const ve=se.focusIso||(l==="range"?(h==null?void 0:h.from)||(h==null?void 0:h.to)||I():l==="range-multiple"?((Je=h==null?void 0:h[h.length-1])==null?void 0:Je.from)||((Oe=h==null?void 0:h[h.length-1])==null?void 0:Oe.to)||I():l==="multiple"?(h==null?void 0:h[0])||I():h||I());let Me=le(ve);if(se.preserveMonthOffset){const He=Number.isInteger(se.visibleMonthOffset)?se.visibleMonthOffset:fe(se.anchorIso||se.focusIso||ve);He>0&&(Me=ce(Me,-He))}S=Me},qe=()=>{Re.replaceChildren();const h=o(n.name);if(!h)return;const se=(Je,Oe)=>{Re.appendChild(_.input({type:"hidden",name:Je,value:Oe!=null?Oe:""}))},ve=Le;if(l==="single"){se(h,be(ve,z));return}if(l==="range"){se(o(n.nameFrom)||`${h}_from`,(ve==null?void 0:ve.from)||""),se(o(n.nameTo)||`${h}_to`,(ve==null?void 0:ve.to)||"");return}if(l==="range-multiple"){const Je=Array.isArray(ve)?ve:[],Oe=/\[\]$/.test(o(n.nameFrom)||"")?o(n.nameFrom):`${o(n.nameFrom)||`${h}_from`}[]`,He=/\[\]$/.test(o(n.nameTo)||"")?o(n.nameTo):`${o(n.nameTo)||`${h}_to`}[]`;Je.forEach(Xe=>{se(Oe,(Xe==null?void 0:Xe.from)||""),se(He,(Xe==null?void 0:Xe.to)||"")});return}const Me=/\[\]$/.test(h)?h:`${h}[]`;(Array.isArray(ve)?ve:[]).forEach(Je=>se(Me,Je))},Ze=()=>{var h;i||(_e.readOnly=!o(n.manualInput),_e.disabled=!!o(n.disabled),_e.setAttribute("aria-expanded",d?"true":"false"),_e.value=D(Le,z),qe(),(h=De==null?void 0:De._refresh)==null||h.call(De))},Qe=(h,se,ve={})=>{var Xe,it,ht;const Me=U(h),Je=ee()?lt((Xe=Mt(ve.timeValue!=null?ve.timeValue:ve.preserveTime?xe():h,K()))!=null?Xe:ve.preserveTime?xe():null):null,Oe=Ce(Le,z);Le=g(Me),Ae=g(Me),ee()&&(z=lt(Je),we=lt(Je)),M=null,We(Me,ve),Ze(),wt(),R&&ve.fromModel!==!0&&R.set(be(Me,Je));const He=Ce(Me,Je);if(ve.emit!==!1&&He!==Oe){const xt=be(Me,Je);(it=n.onInput)==null||it.call(n,xt,se),(ht=n.onChange)==null||ht.call(n,xt,se)}return Me},Ee=(h,se,ve={})=>{var He,Xe;if(!ee())return null;const Me=lt(Mt(h,K()));if(o(n.confirm)&&ve.commit!==!0)return we=Me,wt(),Me;const Je=Ce(Le,z);z=lt(Me),we=lt(Me),Ze(),wt(),R&&ve.fromModel!==!0&&R.set(be(Le,Me));const Oe=Ce(Le,Me);if(ve.emit!==!1&&Oe!==Je){const it=be(Le,Me);(He=n.onInput)==null||He.call(n,it,se),(Xe=n.onChange)==null||Xe.call(n,it,se)}return Me},Be=(h,se,ve={})=>{if(o(n.confirm)){Ae=g(U(h)),ee()&&(ve.timeValue!=null||ve.preserveTime)&&(we=lt(Mt(ve.timeValue!=null?ve.timeValue:xe(),K()))),M=null,We(Ae,ve),wt();return}Qe(h,se,ve)},tt=()=>{const h=B();if(l==="range")return!(h!=null&&h.from)||h!=null&&h.to||!M?h:J(h.from,M)<=0?{from:h.from,to:M}:{from:M,to:h.from};if(l==="range-multiple"){const se=Array.isArray(h)&&h.length?h[h.length-1]:null;return!(se!=null&&se.from)||se!=null&&se.to||!M?se:J(se.from,M)<=0?{from:se.from,to:M}:{from:M,to:se.from}}return h},nt=()=>{if(l==="range"){const h=tt();return h!=null&&h.from?[h]:[]}if(l==="range-multiple"){const h=Array.isArray(B())?B():[];if(!h.length)return[];const se=tt();return se!=null&&se.from?[...h.slice(0,-1),se]:h}return[]},dt=h=>{const se=B();return l==="multiple"?se.includes(h):l==="range-multiple"?Array.isArray(se)&&se.some(ve=>ne(ve==null?void 0:ve.from,h)||ne(ve==null?void 0:ve.to,h)):l==="range"?ne(se==null?void 0:se.from,h)||ne(se==null?void 0:se.to,h):ne(se,h)},ut=h=>l!=="range"&&l!=="range-multiple"?!1:nt().some(se=>(se==null?void 0:se.from)&&(se==null?void 0:se.to)&&h>=se.from&&h<=se.to),bt=(h,se={})=>{const ve=B(),Me=l==="range"?ve:l==="range-multiple"&&Array.isArray(ve)&&ve.length?ve[ve.length-1]:null;!(Me!=null&&Me.from)||Me!=null&&Me.to||M===h||(M=h,se.render!==!1&&wt())},ot=()=>i||o(n.confirm)||n.closeOnSelect===!1?!1:l==="multiple"||l==="range-multiple"?!!n.closeOnSelect:!0,ft=(h,se,ve={})=>{var Je;if(!ye(h)||o(n.disabled)||o(n.readonly))return;const Me={focusIso:h,anchorIso:h,preserveTime:ee(),timeValue:xe(),preserveMonthOffset:!!d&&k()>1,visibleMonthOffset:Number.isInteger(ve.visibleMonthOffset)?ve.visibleMonthOffset:null};if(l==="multiple"){const Oe=P(B()),He=Oe.includes(h)?Oe.filter(Xe=>Xe!==h):[...Oe,h];Be(He.sort(),se,Me),ot()&&St();return}if(l==="range"){const Oe=g(B());let He;!Oe.from||Oe.from&&Oe.to?He={from:h,to:null}:J(h,Oe.from)<0?He={from:h,to:Oe.from}:He={from:Oe.from,to:h},Be(He,se,Me),He.to&&ot()&&St();return}if(l==="range-multiple"){const Oe=p(B()),He=Oe.length?Oe[Oe.length-1]:null;let Xe;!(He!=null&&He.from)||He!=null&&He.to?Xe=[...Oe,{from:h,to:null}]:J(h,He.from)<0?Xe=[...Oe.slice(0,-1),{from:h,to:He.from}]:Xe=[...Oe.slice(0,-1),{from:He.from,to:h}],Be(Xe,se,Me),(Je=Xe[Xe.length-1])!=null&&Je.to&&ot()&&St();return}Be(h,se,Me),ot()&&St()},vt=()=>{N=null,Qe(ke(),null,{timeValue:null})},At=()=>{const h=oe();if(!ye(h)){We(h),wt();return}if(l==="range"){const se=ge(h,1),ve=se&&ye(se)?{from:h,to:se}:{from:h,to:null};Be(ve,null);return}if(l==="range-multiple"){const se=ge(h,1),ve=se&&ye(se)?[{from:h,to:se}]:[{from:h,to:null}];Be(ve,null);return}if(l==="multiple"){Be([h],null);return}Be(h,null,{preserveTime:ee(),timeValue:xe()})},at=(h={})=>{bo(L,h)},Vt=()=>{if(!ee())return;const h=Wn(L);Ee(new Date,null,{commit:!o(n.confirm)}),at({scrollState:h}),!o(n.confirm)&&n.closeOnSelect===!0&&St()},Jt=()=>{o(n.confirm)&&(Qe(Ae,null,{timeValue:we,preserveTime:!0}),n.closeOnSelect!==!1&&St())},wt=()=>{var Ri,Ji,Oi,Di,Hi,ji,Vi,$i,Bi,Ui,Wi,Gi,Ki,qi,Yi,Xi,Qi,Zi,el;if(!L)return;const h=A(),se=new Intl.DateTimeFormat(h,{month:"long",year:"numeric"}),ve=new Intl.DateTimeFormat(h,{weekday:"short"}),Me=Array.from({length:7},(Ge,st)=>{const Ot=(u()+st)%7;return ve.format(new Date(2024,0,7+Ot))}),Je=B(),Oe=Ge=>{let st=JSswift.ui.renderSlot(c,"point",Ge,null);return st==null&&(st=JSswift.ui.renderSlot(c,"dayPoint",Ge,null)),st==null&&n.pointIcon!=null&&(Ge.selected||Ge.inRange||Ge.today)&&(st=typeof n.pointIcon=="string"?v.Icon({name:n.pointIcon,size:10}):JSswift.ui.slot(n.pointIcon,Ge)),E(null,"default",Ge,st)},He=(Ge,st)=>{const Ot=Ge.getFullYear(),Mn=Ge.getMonth(),Rn=new Date(Ot,Mn,1),es=(Rn.getDay()-u()+7)%7,Ns=new Date(Ot,Mn,1-es),ts=_.div({class:"cms-date-month"});ts.appendChild(_.div({class:"cms-date-month-title"},se.format(Rn)));const tl=_.div({class:"cms-date-weekdays"});Me.forEach(Jn=>tl.appendChild(_.div({class:"cms-date-weekday"},Jn))),ts.appendChild(tl);const nl=_.div({class:"cms-date-grid"});for(let Jn=0;Jn<42;Jn+=1){const As=new Date(Ns.getFullYear(),Ns.getMonth(),Ns.getDate()+Jn),Tt=W(As),sl=As.getMonth()===Mn,ol=dt(Tt),il=ut(Tt),ll=(l==="range"||l==="range-multiple")&&nt().some(Lt=>ne(Lt==null?void 0:Lt.from,Tt)),rl=(l==="range"||l==="range-multiple")&&nt().some(Lt=>ne(Lt==null?void 0:Lt.to,Tt)),ks=!ye(Tt),Fs={...pe(Tt),selected:ol,inRange:il,rangeStart:ll,rangeEnd:rl,disabled:ks,outside:!sl,value:Je,select:()=>ft(Tt,null,{visibleMonthOffset:st})},_s=Oe(Fs),Cr=JSswift.ui.renderSlot(c,"day",Fs,String(As.getDate())),xr=E(null,"default",Fs,Cr),Nr=_.button({type:"button",class:ae(["cms-date-day",me(!sl,"is-outside"),me(ol,"is-selected"),me(il,"is-in-range"),me(ll,"is-range-start"),me(rl,"is-range-end"),me(ks,"is-disabled"),me(ne(Tt,oe()),"is-today"),me(_s.length,"has-point")]),disabled:ks,onMouseDown:Lt=>{Lt.button===0&&(N=Tt,Lt.preventDefault(),ft(Tt,Lt,{visibleMonthOffset:st}))},onClick:Lt=>{if(N!=null&&Lt.detail!==0){N=null;return}N=null,ft(Tt,Lt,{visibleMonthOffset:st})},onMouseEnter:()=>bt(Tt),onFocus:()=>bt(Tt,{render:!1})},_.span({class:"cms-date-day-label"},...xr),_s.length?_.span({class:"cms-date-day-point"},..._s):null);nl.appendChild(Nr)}return ts.appendChild(nl),ts},Xe=G(),it=de(),ht=[S.getFullYear(),(Ri=ie(oe()))==null?void 0:Ri.getFullYear(),(Ji=ie(Xe))==null?void 0:Ji.getFullYear(),(Oi=ie(it))==null?void 0:Oi.getFullYear(),(Di=ie(o(n.defaultMonth)))==null?void 0:Di.getFullYear()];l==="range"?ht.push((Hi=ie(Je==null?void 0:Je.from))==null?void 0:Hi.getFullYear(),(ji=ie(Je==null?void 0:Je.to))==null?void 0:ji.getFullYear()):l==="range-multiple"?Je.forEach(Ge=>{var st,Ot;ht.push((st=ie(Ge==null?void 0:Ge.from))==null?void 0:st.getFullYear(),(Ot=ie(Ge==null?void 0:Ge.to))==null?void 0:Ot.getFullYear())}):l==="multiple"?Je.forEach(Ge=>{var st;return ht.push((st=ie(Ge))==null?void 0:st.getFullYear())}):ht.push((Vi=ie(Je))==null?void 0:Vi.getFullYear());const xt=ht.filter(Ge=>Number.isFinite(Ge)),$t=(xt.length?Math.min(...xt):S.getFullYear())-100,zt=(xt.length?Math.max(...xt):S.getFullYear())+50,Ft=Number(o((Ui=(Bi=n.yearStart)!=null?Bi:Xe?($i=ie(Xe))==null?void 0:$i.getFullYear():null)!=null?Ui:$t)),on=Number(o((Ki=(Gi=n.yearEnd)!=null?Gi:it?(Wi=ie(it))==null?void 0:Wi.getFullYear():null)!=null?Ki:zt)),fn=_.select({class:"cms-date-select",value:String(S.getMonth()),onChange:Ge=>{var st;S=new Date(S.getFullYear(),Number(Ge.currentTarget.value),1),(st=n.onNavigate)==null||st.call(n,{month:S.getMonth()+1,year:S.getFullYear()}),wt()}},...Array.from({length:12},(Ge,st)=>us({value:String(st)},new Intl.DateTimeFormat(h,{month:"long"}).format(new Date(2024,st,1))))),mn=_.select({class:"cms-date-select cms-date-select-year",value:String(S.getFullYear()),onChange:Ge=>{var st;S=new Date(Number(Ge.currentTarget.value),S.getMonth(),1),(st=n.onNavigate)==null||st.call(n,{month:S.getMonth()+1,year:S.getFullYear()}),wt()}},...Array.from({length:Math.max(1,on-Ft+1)},(Ge,st)=>{const Ot=Ft+st;return us({value:String(Ot)},String(Ot))})),Sn=_.div({class:"cms-date-header"},_.button({type:"button",class:"cms-date-nav",onClick:()=>{var Ge;S=ce(S,-1),(Ge=n.onNavigate)==null||Ge.call(n,{month:S.getMonth()+1,year:S.getFullYear()}),wt()}},v.Icon({name:"chevron_left",size:16})),_.div({class:"cms-date-header-center"},fn,mn),_.button({type:"button",class:"cms-date-nav",onClick:()=>{var Ge;S=ce(S,1),(Ge=n.onNavigate)==null||Ge.call(n,{month:S.getMonth()+1,year:S.getFullYear()}),wt()}},v.Icon({name:"chevron_right",size:16}))),zn=_.div({class:"cms-date-shortcuts"}),Tn=o((qi=n.shortcuts)!=null?qi:n.presets)||[];Tn.forEach((Ge,st)=>{var Rn,es;if(!Ge)return;const Ot=typeof Ge.value=="function"?Ge.value({today:oe()}):Ge.value,Mn=(es=(Rn=Ge.label)!=null?Rn:Ge.text)!=null?es:`Preset ${st+1}`;zn.appendChild(_.button({type:"button",class:"cms-date-shortcut",onClick:()=>Be(Ot,null,{preserveTime:ee(),timeValue:xe()})},Mn))});const Pn=_.div({class:"cms-date-months"});for(let Ge=0;Ge<k();Ge+=1)Pn.appendChild(He(ce(S,Ge),Ge));const Cn=D(Je,xe()),xn=_.div({class:"cms-date-value"},...E(c,"value",{value:Je,displayValue:Cn,mode:l,timeValue:xe()},Cn||E(c,"default",{},s))),En=_.div({class:"cms-time-header"}),hr=_.div({class:"cms-time-columns-2"},_.div({class:"cms-time-column-title"},o(n.hoursLabel)||"Ore"),_.div({class:"cms-time-column-title"},o(n.minutesLabel)||"Min"));En.appendChild(hr);const br=ee()?ho({props:{min:o((Yi=n.timeMin)!=null?Yi:n.minTime),max:o((Xi=n.timeMax)!=null?Xi:n.maxTime),use12h:o((Zi=(Qi=n.time12h)!=null?Qi:n.use12h)!=null?Zi:n.ampm),hoursLabel:o(n.timeHoursLabel)||"Ore",minutesLabel:o(n.timeMinutesLabel)||"Min",secondsLabel:o(n.timeSecondsLabel)||"Sec"},slots:c,slotPrefix:"time",value:xe(),withSeconds:!1,minuteStep:1,secondStep:H(),disabled:!!o(n.disabled),readonly:!!o(n.readonly),embedded:!0,pointIcon:o(n.timePointIcon),shortcuts:o((el=n.timeShortcuts)!=null?el:n.timePresets),onSelect:Ge=>{const st=Wn(L);Ee(Ge,null),at({scrollState:st})}}):null,yr=_.div({class:"cms-date-footer-info"},xn),wr=_.div({class:ae(["cms-date-footer",me(ee(),"has-time")])},yr,_.div({class:"cms-date-actions"},_.button({type:"button",class:"cms-date-action",onClick:At},o(n.todayLabel)||"Oggi"),o(n.clearable)!==!1?_.button({type:"button",class:"cms-date-action",onClick:vt},o(n.clearLabel)||"Reset"):null,o(n.confirm)?_.button({type:"button",class:"cms-date-action is-primary",onClick:Jt},o(n.applyLabel)||"Applica"):null)),vr=_.div(_.button({type:"button",class:"cms-date-action cms-w-lg",onClick:Vt},o(n.nowLabel)||"Ora")),Sr=ee()?_.div({class:"cms-date-time"},En,br,vr):null;L.replaceChildren(_.div({class:"cms-date-panel-root",onKeydown:Ge=>{var st;Ge.key==="Escape"&&(Ge.preventDefault(),i?(st=n.onEscape)==null||st.call(n,Ge):St())}},Sn,Tn.length?zn:null,_.div({class:"cms-data-time"},Pn,Sr),wr))};function qt(){var h,se,ve,Me;return d||o(n.disabled)||o(n.readonly)||(Ae=g(Le),we=lt(z),M=null,N=null,We(Ae),d=JSswift.overlay.open(({close:Je})=>{var Xe;const Oe=l==="range"||l==="range-multiple"?2:1,He=Number((Xe=o(n.monthsToShow))!=null?Xe:Oe);return L=_.div({class:Ht(["cms-date-panel",o(y),me(He>1,"multi-month"),n.panelClass])}),wt(),L},{type:"date",anchorEl:De._control||_e,placement:n.placement||"bottom-start",offsetX:(h=n.offsetX)!=null?h:0,offsetY:(ve=(se=n.offsetY)!=null?se:n.offset)!=null?ve:8,backdrop:!1,lockScroll:!1,trapFocus:!1,closeOnOutside:n.closeOnOutside!==!1,closeOnBackdrop:!1,closeOnEsc:!0,autoFocus:!1,className:Ht(["cms-date-overlay",n.panelClass,me(ee(),"has-time")]),onClose:()=>{var Je;d=null,L=null,M=null,Ze(),(Je=n.onClose)==null||Je.call(n)}}),n.panelStyle&&Object.assign(d.panel.style,n.panelStyle),yn(d),Ze(),(Me=n.onOpen)==null||Me.call(n)),d}function St(){if(!d)return;N=null;const h=d;wn(h,()=>JSswift.overlay.close(h.id))}if(i){const h=l==="range"||l==="range-multiple"?2:1,se=Number((yt=o(n.monthsToShow))!=null?yt:h);L=_.div({class:Ht(["cms-date-panel","cms-date-calendar",o(y),me(se>1,"multi-month"),n.panelClass,n.class]),style:n.style})}return i||_e.addEventListener("focus",h=>{var se;(se=n.onFocus)==null||se.call(n,h),n.openOnFocus!==!1&&qt()}),i||_e.addEventListener("click",h=>{var se;(se=n.onClick)==null||se.call(n,h),qt()}),i||_e.addEventListener("keydown",h=>{if(h.key==="Escape"){d&&(h.preventDefault(),St());return}(h.key==="ArrowDown"||h.key==="Enter"||h.key===" ")&&(h.preventDefault(),qt()),(h.key==="Backspace"||h.key==="Delete")&&!o(n.manualInput)&&o(n.clearable)!==!1&&(h.preventDefault(),vt())}),!i&&o(n.manualInput)?(_e.addEventListener("input",h=>{var se;(se=n.onTyping)==null||se.call(n,_e.value,h)}),_e.addEventListener("change",h=>{const se=Ne(_e.value);Qe(se,h,{timeValue:Mt(_e.value,K()),preserveTime:!Mt(_e.value,K())})}),_e.addEventListener("blur",h=>{var ve;(ve=n.onBlur)==null||ve.call(n,h);const se=Ne(_e.value);_e.value===""?vt():Qe(se,h,{timeValue:Mt(_e.value,K()),preserveTime:!Mt(_e.value,K())})})):i||_e.addEventListener("blur",h=>{var se;return(se=n.onBlur)==null?void 0:se.call(n,h)}),R&&R.watch(h=>{const se=U(h),ve=te(h);Ce(se,ve)!==Ce(Le,z)&&(Le=se,Ae=g(Le),z=lt(ve),we=lt(ve),M=null,We(Le),Ze(),wt())},i?"UI.Calendar:watch":"UI.Datepicker:watch"),JSswift.reactive.effect(()=>{!R&&n.value!=null?(Le=U(o(n.value)),Ae=g(Le),z=te(o(n.value)),we=lt(z)):ee()&&n.timeValue!=null&&(z=te(o(n.timeValue)),we=lt(z)),Ze(),wt(),d&&o(n.disabled)&&St()},i?"UI.Calendar:render":"UI.Datepicker:render"),i?(L._calendar=L,L._date=L,L._getValue=()=>be(Le,z),L._setValue=h=>Qe(h,null,{emit:!1,timeValue:te(h)}),L._clear=vt,L._select=h=>{const se=r(h);se&&ft(se,null)},L._time=()=>lt(z),L):(De._input=_e,De._date=_e,De._open=qt,De._close=St,De._getValue=()=>be(Le,z),De._setValue=h=>Qe(h,null,{emit:!1,timeValue:te(h)}),De._time=()=>lt(z),De._panel=()=>(d==null?void 0:d.panel)||null,De)};v.Datepicker=(...t)=>yo(t),v.Calendar=(...t)=>yo(t,{calendar:!0}),v.Date=v.Datepicker,JSswift.ui.Datepicker=v.Datepicker,JSswift.ui.Calendar=v.Calendar,JSswift.ui.Date=v.Date,(mi=JSswift.isDev)!=null&&mi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Datepicker={signature:"UI.Datepicker(props)",props:{value:"string | { from, to } | string[] | Array<{ from, to }> | Array<[from, to]>",model:"rod | [get,set] signal",mode:'"single"|"range"|"multiple"|"range-multiple"',range:"boolean",multiple:"boolean",rangeMultiple:"boolean",multipleRange:"Alias of rangeMultiple",min:"string",max:"string",minDate:"Alias of min",maxDate:"Alias of max",minRange:"number",maxRange:"number",manualInput:"boolean",firstDayOfWeek:"number",monthsToShow:"number",locale:"string",shortcuts:"Array<{ label, value }>",options:"Array|string|Function",enableDates:"Alias of options",disableDates:"Array|string|Function",label:"String|Node|Function|Array",icon:"String|Node|Function|Array",iconRight:"String|Node|Function|Array",pointIcon:"String|Node|Function|Array",withTime:"boolean",timeValue:"string|Date",timeMin:"string",timeMax:"string",timeMinuteStep:"number",timeSecondStep:"number",timeWithSeconds:"boolean",timeShortcuts:"Array<{ label, value }>",timePointIcon:"String|Node|Function|Array",clearable:"boolean",confirm:"boolean",name:"string",nameFrom:"string",nameTo:"string",size:'"xs"|"sm"|"md"|"lg"|"xl"',class:"string",style:"object"},slots:{day:"Day content ({ date, selected, inRange, disabled, outside })",point:"Point/icon in the day",dayPoint:"Alias of point",value:"Footer value renderer ({ value, displayValue, mode })",timeOption:"Renderer for a time option in the integrated footer",timePoint:"Point/icon in the footer time option",timeShortcut:"Integrated time shortcut renderer",label:"Floating label",topLabel:"Top label",icon:"Left icon",iconRight:"Right icon",default:"Fallback value content"},events:{onChange:"(value, event)",onInput:"(value, event)",onOpen:"void",onClose:"void",onNavigate:"({ month, year })"},returns:"HTMLDivElement (field wrapper) con ._input, ._open(), ._close(), ._getValue(), ._setValue(value)",description:"Reactive datepicker input with fixed overlay, single/range/multiple/multi-range modes, model, min/max, presets, xs-xl sizes, and optional time support in a unified interface."},v.meta.Calendar={...v.meta.Datepicker,signature:"UI.Calendar(props)",returns:"HTMLDivElement calendar panel con ._getValue(), ._setValue(value), ._clear(), ._select(value)",description:"Standalone interactive calendar panel using the same engine and styling as UI.Datepicker, with direct model persistence."},v.meta.Date=v.meta.Datepicker),v.Time=(...t)=>{var Q,r,x;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=Ye(e.size,()=>{const p=String(o(e.size)||"").toLowerCase();return["xs","sm","md","lg","xl"].includes(p)?`cms-size-${p}`:""}),c=()=>{var P,U,G,de,A;const p=Qt(Mt(b?b.get():(P=o(e.value))!=null?P:R,{withSeconds:!0}),{withSeconds:!0});return{withSeconds:!!o((U=e.withSeconds)!=null?U:e.showSeconds)||/:\d{2}:\d{2}$/.test(p),min:o((G=e.min)!=null?G:e.minTime),max:o((de=e.max)!=null?de:e.maxTime),use12h:o((A=e.use12h)!=null?A:e.ampm)}},y=()=>{var P;const p=Number(o((P=e.minuteStep)!=null?P:1));return Math.max(1,Math.min(30,Number.isFinite(p)?p:5))},a=()=>{var P;const p=Number(o((P=e.secondStep)!=null?P:1));return Math.max(1,Math.min(30,Number.isFinite(p)?p:5))},l=e.model||(_t(e.value)||Pt(e.value)?e.value:null),b=kt(l,"UI.Time:model"),R=b?b.get():o(e.value),C=p=>Mt(p,c()),w=p=>Un(p,c()),T=p=>Qt(p,c()),ee=p=>JSON.stringify(T(p));let K=lt(C(R)),re=lt(K),H=null,j=null;const Y={...e,label:(Q=e.label)!=null?Q:e.placeholder},W=Y.label!=null||JSswift.ui.getSlot(s,"label")!=null,ie=_.input({class:ae(["cms-input","cms-time-display",i,me(e.manualInput,"is-manual"),e.inputClass]),type:"text",autocomplete:"off",placeholder:W?"":(r=e.placeholder)!=null?r:"Seleziona orario",readOnly:!o(e.manualInput),disabled:!!o(e.disabled),value:w(K)});ie.setAttribute("aria-haspopup","dialog");const ge=_.div({style:{display:"contents"}}),ce=_.div({class:"cms-time-control",style:{display:"contents"}},ie,ge),le=v.FormField({...Y,iconRight:(x=e.iconRight)!=null?x:"schedule",control:ce,getValue:()=>ie.value,onClear:()=>{o(e.disabled)||o(e.readonly)||(Z(null,null,{commit:!0}),H&&O())},onFocus:()=>ie.focus()}),oe=()=>o(e.confirm)?re:K,ne=()=>{ge.replaceChildren();const p=o(e.name);p&&ge.appendChild(_.input({type:"hidden",name:p,value:T(K)}))},J=()=>{var p;ie.readOnly=!o(e.manualInput),ie.disabled=!!o(e.disabled),ie.setAttribute("aria-expanded",H?"true":"false"),ie.value=w(K),ne(),(p=le._refresh)==null||p.call(le)},Z=(p,P,U={})=>{var u,k;const G=lt(C(p));if(o(e.confirm)&&U.commit!==!0)return re=lt(G),m(),G;const de=ee(K);K=lt(G),re=lt(G),J(),m(),b&&U.fromModel!==!0&&b.set(T(G));const A=ee(G);if(U.emit!==!1&&A!==de){const I=T(G);(u=e.onInput)==null||u.call(e,I,P),(k=e.onChange)==null||k.call(e,I,P)}return G},X=p=>o(e.confirm)||e.closeOnSelect!==!0?!1:c().withSeconds?(p==null?void 0:p.part)==="second":(p==null?void 0:p.part)==="minute",ue=(p={})=>{bo(j,p)},F=()=>{const p=Wn(j);Z(new Date,null,{commit:!o(e.confirm)}),ue({scrollState:p}),!o(e.confirm)&&e.closeOnSelect===!0&&O()},f=()=>{o(e.confirm)&&(Z(re,null,{commit:!0}),e.closeOnSelect!==!1&&O())},m=()=>{var k,I,B,pe;if(!j)return;const p=oe(),P=w(p),U=_.div({class:"cms-time-header"}),G=_.div({class:"cms-time-columns"},_.div({class:"cms-time-column-title"},o(e.hoursLabel)||"Ore"),_.div({class:"cms-time-column-title"},o(e.minutesLabel)||"Min")),de=c().withSeconds;de&&G.appendChild(_.div({class:"cms-time-column-title"},o(e.secondsLabel)||"Sec")),U.appendChild(G);const A=ho({props:{min:o((k=e.min)!=null?k:e.minTime),max:o((I=e.max)!=null?I:e.maxTime),use12h:o((B=e.use12h)!=null?B:e.ampm),hoursLabel:o(e.hoursLabel)||"Ore",minutesLabel:o(e.minutesLabel)||"Min",secondsLabel:o(e.secondsLabel)||"Sec"},slots:s,value:p,withSeconds:de,minuteStep:y(),secondStep:a(),disabled:!!o(e.disabled),readonly:!!o(e.readonly),pointIcon:o(e.pointIcon),shortcuts:o((pe=e.shortcuts)!=null?pe:e.presets),onSelect:(Se,ye)=>{const V=Wn(j);Z(Se,null),ue({scrollState:V}),X(ye)&&O()}}),u=_.div({class:"cms-time-footer"},_.div({class:"cms-time-value"},...E(s,"value",{value:p,displayValue:P},P||E(s,"default",{},n))),_.div({class:"cms-time-actions"},_.button({type:"button",class:"cms-time-action",onClick:F},o(e.nowLabel)||"Ora"),o(e.clearable)!==!1?_.button({type:"button",class:"cms-time-action",onClick:()=>Z(null,null,{commit:!o(e.confirm)})},o(e.clearLabel)||"Reset"):null,o(e.confirm)?_.button({type:"button",class:"cms-time-action is-primary",onClick:f},o(e.applyLabel)||"Applica"):null));j.replaceChildren(_.div({class:"cms-time-panel-root",onKeydown:Se=>{Se.key==="Escape"&&(Se.preventDefault(),O())}},U,A,u))};function g(){var p,P,U,G;return H||o(e.disabled)||o(e.readonly)||(re=lt(K),H=JSswift.overlay.open(()=>(j=_.div({class:Ht(["cms-time-panel",o(i),e.panelClass])}),m(),j),{type:"time",anchorEl:le._control||ie,placement:e.placement||"bottom-start",offsetX:(p=e.offsetX)!=null?p:0,offsetY:(U=(P=e.offsetY)!=null?P:e.offset)!=null?U:8,backdrop:!1,lockScroll:!1,trapFocus:!1,closeOnOutside:e.closeOnOutside!==!1,closeOnBackdrop:!1,closeOnEsc:!0,autoFocus:!1,className:Ht(["cms-time-overlay",e.panelClass]),onClose:()=>{var de;H=null,j=null,J(),(de=e.onClose)==null||de.call(e)}}),e.panelStyle&&Object.assign(H.panel.style,e.panelStyle),yn(H),ue(),J(),(G=e.onOpen)==null||G.call(e)),H}function O(){if(!H)return;const p=H;wn(p,()=>JSswift.overlay.close(p.id))}return ie.addEventListener("focus",p=>{var P;(P=e.onFocus)==null||P.call(e,p),e.openOnFocus!==!1&&g()}),ie.addEventListener("click",p=>{var P;(P=e.onClick)==null||P.call(e,p),g()}),ie.addEventListener("keydown",p=>{if(p.key==="Escape"){H&&(p.preventDefault(),O());return}(p.key==="ArrowDown"||p.key==="Enter"||p.key===" ")&&(p.preventDefault(),g()),(p.key==="Backspace"||p.key==="Delete")&&!o(e.manualInput)&&o(e.clearable)!==!1&&(p.preventDefault(),Z(null,p,{commit:!0}))}),o(e.manualInput)?(ie.addEventListener("input",p=>{var P;return(P=e.onTyping)==null?void 0:P.call(e,ie.value,p)}),ie.addEventListener("change",p=>Z(ie.value,p)),ie.addEventListener("blur",p=>{var P;(P=e.onBlur)==null||P.call(e,p),ie.value===""?Z(null,p):Z(ie.value,p)})):ie.addEventListener("blur",p=>{var P;return(P=e.onBlur)==null?void 0:P.call(e,p)}),b&&b.watch(p=>{const P=lt(C(p));ee(P)!==ee(K)&&(K=lt(P),re=lt(P),J(),m())},"UI.Time:watch"),JSswift.reactive.effect(()=>{!b&&e.value!=null&&(K=lt(C(o(e.value))),re=lt(K)),J(),m(),H&&o(e.disabled)&&O()},"UI.Time:render"),le._input=ie,le._time=ie,le._open=g,le._close=O,le._getValue=()=>T(K),le._setValue=p=>Z(p,null,{emit:!1,commit:!0}),le._panel=()=>(H==null?void 0:H.panel)||null,le},(gi=JSswift.isDev)!=null&&gi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Time={signature:"UI.Time(props)",props:{value:"string|Date",model:"rod | [get,set] signal",min:"string",max:"string",minuteStep:"number",secondStep:"number",withSeconds:"boolean",manualInput:"boolean",clearable:"boolean",confirm:"boolean",label:"String|Node|Function|Array",icon:"String|Node|Function|Array",iconRight:"String|Node|Function|Array",pointIcon:"String|Node|Function|Array",shortcuts:"Array<{ label, value }>",name:"string",class:"string",style:"object"},slots:{option:"Renderer for a time option ({ part, value, label, selected, timeValue })",point:"Point/icon in the selected time option",shortcut:"Shortcut renderer",value:"Footer value renderer ({ value, displayValue })",label:"Floating label",topLabel:"Top label",icon:"Left icon",iconRight:"Right icon",default:"Fallback value content"},events:{onChange:"(value, event)",onInput:"(value, event)",onOpen:"void",onClose:"void"},returns:"HTMLDivElement (field wrapper) con ._input, ._open(), ._close(), ._getValue(), ._setValue(value)",description:"Reactive time picker with fixed overlay, label/icon slots, point icon, shortcuts, confirm, and model."}),v.Tabs=(...t)=>{var k,I,B,pe,Se,ye;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=(V,D)=>!!V&&Object.prototype.hasOwnProperty.call(V,D),c=V=>String(o(V)||"horizontal").toLowerCase()==="vertical"?"vertical":"horizontal",y=V=>{const D=String(o(V)||"").toLowerCase();return D==="pills"||D==="pill"?"pills":D==="soft"||D==="card"?"soft":"line"},a=V=>{var q;const D=o(V);return D==null||D===""?null:(q=JSswift.uiColors)!=null&&q.includes(D)?`var(--cms-${D})`:String(D)},l=(V,D)=>Object.is(V,D)||V!=null&&D!=null&&V==D,b=kt(e.model,"UI.Tabs:model"),R=c(e.orientation||e.orient||e.direction),C=y(e.variant||(e.pills?"pills":e.soft?"soft":"line")),w=!!o((I=(k=e.fill)!=null?k:e.navFill)!=null?I:e.stretch),T=!!o(e.wrap),ee=!!o(e.disabled),K=e.id||"cms-tabs-"+Math.random().toString(36).slice(2,9),re=o((B=e.tabs)!=null?B:e.items)||[],H=(Array.isArray(re)?re:[re]).map((V,D)=>{var te,xe,be,Ce,he,Le,Ae,z,we,M,N,S,d,L;if(V==null)return null;if(typeof V!="object")return{raw:V,index:D,value:V,labelFallback:V,noteFallback:null,iconFallback:null,badgeFallback:null,disabled:!1,hidden:!1};const q=(Le=(he=(Ce=(be=(xe=(te=V.value)!=null?te:V.name)!=null?xe:V.id)!=null?be:V.key)!=null?Ce:V.label)!=null?he:V.title)!=null?Le:`tab-${D}`,Ne=(M=(we=(z=(Ae=V.label)!=null?Ae:V.title)!=null?z:V.name)!=null?we:V.value)!=null?M:`Tab ${D+1}`,ke=i(V,"badge")?V.badge:i(V,"counter")?V.counter:null;return{...V,raw:V,index:D,value:q,labelFallback:Ne,noteFallback:(d=(S=(N=V.note)!=null?N:V.subtitle)!=null?S:V.description)!=null?d:null,iconFallback:(L=V.icon)!=null?L:null,badgeFallback:ke}}).filter(Boolean).filter(V=>V.hidden!==!0&&V.visible!==!1),j=H.find(V=>!V.disabled)||null,Y=V=>H.findIndex(D=>l(D.value,V)),W=(V,D)=>{var Ne;if(!H.length)return-1;let q=V;for(let ke=0;ke<H.length;ke+=1)if(q+=D,q<0?q=H.length-1:q>=H.length&&(q=0),!((Ne=H[q])!=null&&Ne.disabled))return q;return-1},ie=(V,D=!1)=>{var Ne,ke;const q=Y(V);return q>=0&&!((Ne=H[q])!=null&&Ne.disabled)?H[q].value:D?(ke=j==null?void 0:j.value)!=null?ke:null:V!=null?V:null},ge=ie(b?b.get():i(e,"value")?o(e.value):(pe=e.defaultValue)!=null?pe:e.default,!0),[ce,le]=JSswift.reactive.signal(ge),oe=ae(["cms-clear-set","cms-tabs","cms-singularity",R,`variant-${C}`,me(e.dense,"dense"),me(w,"fill"),me(T,"wrap"),me(ee,"disabled"),e.class]),ne=JSswift.omit(e,["tabs","items","value","defaultValue","default","model","orientation","orient","direction","variant","pills","soft","fill","navFill","stretch","wrap","dense","disabled","slots","empty","gap","tabGap","align","justify","color","state","navClass","navStyle","barClass","barStyle","tabClass","tabStyle","itemClass","itemStyle","class","style"]);ne.class=oe,ne.style={...e.style||{}},e.gap!=null&&(ne.style["--cms-tabs-gap"]=$e(e.gap)),e.tabGap!=null&&(ne.style["--cms-tabs-tab-gap"]=$e(e.tabGap));const J=a((Se=e.color)!=null?Se:e.state);J&&(ne.style["--cms-tabs-accent"]=J);const Z=_.div(ne),X=_.div({class:ae(["cms-tabs-bar",e.barClass]),style:{alignItems:e.align||(R==="vertical"?"stretch":"center"),justifyContent:e.justify||"flex-start",...e.barStyle||{}}}),ue=_.div({class:ae(["cms-tabs-nav",e.navClass]),style:e.navStyle||null,role:"tablist","aria-orientation":R}),F=[],f=()=>Y(ce()),m=()=>{const V=f();return V>=0?H[V]:null},g=()=>({tabs:H,value:ce(),active:ce(),activeIndex:f(),activeTab:m(),orientation:R,variant:C,select:(V,D)=>p(V,{event:D,emit:!0}),next:()=>U(),prev:()=>G()}),O=(V,D,q)=>({...g(),tab:V,index:D,active:q,disabled:!!V.disabled,select:Ne=>P(D,{event:Ne,emit:!0})}),Q=V=>{var q;const D=(q=F[V])==null?void 0:q.btn;!D||typeof D.focus!="function"||requestAnimationFrame(()=>D.focus())},r=V=>{const D=Y(V);Z.dataset.value=V==null?"":String(V),Z.dataset.activeIndex=D>=0?String(D):"",F.forEach(({btn:q,item:Ne,tab:ke,index:te})=>{const xe=te===D;Ne.classList.toggle("active",xe),Ne.classList.toggle("disabled",!!(ke.disabled||ee)),q.classList.toggle("active",xe),q.setAttribute("aria-selected",xe?"true":"false"),q.setAttribute("tabindex",xe?"0":"-1")})},x=V=>{le(V),r(V)},p=(V,D={})=>{if(ee)return null;const q=Y(V);return q<0?null:P(q,D)},P=(V,D={})=>{var xe,be;const q=H[V];if(!q||q.disabled||ee)return null;const Ne=q.value,ke=ce(),te=!l(ke,Ne);return x(Ne),b&&!l(b.get(),Ne)&&b.set(Ne),D.focus&&Q(V),D.event&&((xe=q.onClick)==null||xe.call(q,Ne,D.event,q,V)),te&&D.emit!==!1&&((be=e.onChange)==null||be.call(e,Ne,q,D.event||null,V)),q},U=()=>{const V=W(f()<0?-1:f(),1);V>=0&&P(V,{emit:!0,focus:!0})},G=()=>{const V=f()<0?0:f(),D=W(V,-1);D>=0&&P(D,{emit:!0,focus:!0})},de=(V,D)=>{var S,d,L,fe,Fe,Te;const q=D===f(),Ne=O(V,D,q),ke=`${K}-tab-${D}`,te=V.iconFallback!=null?typeof V.iconFallback=="string"?v.Icon({name:V.iconFallback,size:(L=(d=(S=V.iconSize)!=null?S:V.size)!=null?d:e.size)!=null?L:null}):V.iconFallback:null,xe=E(s,"icon",Ne,te),be=E(null,"default",{},JSswift.ui.renderSlot(s,"label",Ne,V.labelFallback)),Ce=E(s,"note",Ne,V.noteFallback),he=E(s,"badge",Ne,V.badgeFallback),Le=_.span({class:"cms-tabs-tab-inner"},xe.length?_.span({class:"cms-tabs-tab-icon"},...xe):null,_.span({class:"cms-tabs-tab-copy"},_.span({class:"cms-tabs-tab-label"},...be.length?be:[""]),Ce.length?_.span({class:"cms-tabs-tab-note"},...Ce):null),he.length?_.span({class:"cms-tabs-tab-badge"},...he):null),Ae=E(s,"tab",{...Ne,tabId:ke,label:be,icon:xe,note:Ce,badge:he},Le),z=$=>{var De;if(V.disabled||ee)return;const _e=$.key;if(_e==="Enter"||_e===" "){$.preventDefault(),P(D,{event:$,emit:!0});return}if(_e==="Home"){$.preventDefault();const We=H.findIndex(qe=>!qe.disabled);We>=0&&P(We,{event:$,emit:!0,focus:!0});return}if(_e==="End"){$.preventDefault();let We=-1;for(let qe=H.length-1;qe>=0;qe-=1)if(!((De=H[qe])!=null&&De.disabled)){We=qe;break}We>=0&&P(We,{event:$,emit:!0,focus:!0});return}const Re=R==="vertical"?["ArrowUp"]:["ArrowLeft"],Pe=R==="vertical"?["ArrowDown"]:["ArrowRight"];if(Re.includes(_e)){$.preventDefault();const We=W(D,-1);We>=0&&P(We,{event:$,emit:!0,focus:!0});return}if(Pe.includes(_e)){$.preventDefault();const We=W(D,1);We>=0&&P(We,{event:$,emit:!0,focus:!0})}},we=a((fe=V.color)!=null?fe:V.state),M=_.div({class:ae(["cms-tabs-item",me(q,"active"),me(V.disabled||ee,"disabled"),e.itemClass,V.itemClass]),style:{...we?{"--cms-tabs-item-accent":we}:{},...e.itemStyle||{},...V.itemStyle||{}},"data-name":String(V.value)}),N=v.Btn({class:ae(["cms-tabs-tab",me(q,"active"),me(V.disabled||ee,"disabled"),e.tabClass,V.tabClass||V.class]),type:"button",id:ke,role:"tab",disabled:!!(V.disabled||ee),"aria-selected":q?"true":"false",tabindex:q?"0":"-1",size:(Te=(Fe=V.size)!=null?Fe:e.size)!=null?Te:null,style:{...e.tabStyle||{},...V.tabStyle||{}},onClick:$=>{P(D,{event:$,emit:!0})},onKeydown:z},...Ae);return M.appendChild(N),M.appendChild(_.span({class:"tab-indicator"})),F[D]={tab:V,index:D,item:M,btn:N},M};if(H.length){const V=H.map((q,Ne)=>de(q,Ne)),D=JSswift.ui.renderSlot(s,"nav",{...g(),nodes:V},V);E(null,"default",{},D).forEach(q=>ue.appendChild(q))}else E(s,"empty",g(),(ye=e.empty)!=null?ye:_.div({class:"cms-tabs-empty"},"Nessuna tab disponibile.")).forEach(V=>ue.appendChild(V));const A=g(),u=[...E(null,"default",{},JSswift.ui.renderSlot(s,"extra",A,null)),...E(s,"default",A,n)];return X.appendChild(ue),u.length&&X.appendChild(_.div({class:"cms-tabs-extra"},...u)),Z.appendChild(X),x(ge),b?b.watch(V=>{x(ie(V,!0))},"UI.Tabs:watch"):rt(e.value)&&je.reactive.effect(()=>{x(ie(o(e.value),!0))},"UI.Tabs:value"),Z._getValue=()=>ce(),Z._setValue=V=>p(V,{emit:!0}),Z._select=V=>p(V,{emit:!0}),Z._next=()=>U(),Z._prev=()=>G(),Z._getTabs=()=>H.slice(),Ke(Z,e),Z},(pi=JSswift.isDev)!=null&&pi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Tabs={signature:"UI.Tabs(props) | UI.Tabs(props, ...children)",props:{tabs:"Array<{ value|name|id|key, label|title, note|subtitle|description, icon, badge|counter, disabled, hidden, onClick }>",items:"Alias of tabs",value:"any",defaultValue:"any",default:"Alias of defaultValue",model:"[get,set] signal",orientation:"horizontal|vertical",variant:"line|pills|soft",fill:"boolean",wrap:"boolean",disabled:"boolean",color:"string",state:"string",gap:"string|number",tabGap:"string|number",align:"string",justify:"string",size:"string|number",dense:"boolean",navClass:"string",tabClass:"string",itemClass:"string",slots:"{ nav?, tab?, label?, icon?, note?, badge?, extra?, empty?, default? }",class:"string",style:"object"},slots:{nav:"Full nav renderer",tab:"Single tab renderer",label:"Label renderer",icon:"Icon renderer",note:"Note renderer",badge:"Badge/counter renderer",extra:"Extra area next to the nav",empty:"Fallback when tabs/items are empty",default:"Children / extra content fallback"},events:{onChange:"(value, tab, event, index)"},keyboard:["Enter/Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"],returns:"HTMLDivElement con ._getValue(), ._setValue(value), ._select(value), ._next(), ._prev(), ._getTabs()",description:"Standardized tab bar with controlled/uncontrolled support, structured slots, badge/note/icon, and keyboard navigation."}),v.RouteTab=(...t)=>{var Q,r,x,p,P,U,G,de,A,u,k,I,B,pe,Se;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=JSswift.router||(je==null?void 0:je.router)||null,c=ye=>Object.prototype.hasOwnProperty.call(e,ye),y=c("active")||c("selected"),a=ye=>{const V=String(o(ye)||"").toLowerCase();return V==="pill"||V==="pills"?"pills":V==="soft"||V==="card"?"soft":"line"},l=ye=>{var D;const V=o(ye);return V==null||V===""?null:(D=JSswift.uiColors)!=null&&D.includes(V)?`var(--cms-${V})`:String(V)},b=ye=>{if(ye==null||ye==="")return"";try{return new URL(String(ye),window.location.origin).pathname||""}catch(V){return String(ye).split(/[?#]/)[0]||""}},R=ye=>o(e.external)===!0?!0:ye?/^(mailto:|tel:|https?:\/\/|\/\/)/i.test(String(ye)):!1,C=()=>{var ye;return o((ye=e.href)!=null?ye:e.to)||"#"},w=()=>{var ye;return o((ye=e.to)!=null?ye:e.href)||""},T=()=>{try{if(i!=null&&i.current)return i.current().pathname||window.location.pathname||""}catch(ye){}return window.location.pathname||""},ee=()=>{var te,xe,be;const ye=w();if(!ye)return!1;const V=o((xe=(te=e.match)!=null?te:e.activeMatch)!=null?xe:e.routeMatch),D=String(o((be=e.matchMode)!=null?be:e.startsWith?"startsWith":e.exact?"exact":"")||"").toLowerCase(),q=T();if(typeof V=="function")return!!V({currentPath:q,to:ye,href:C(),router:i,props:e});if(V instanceof RegExp)return V.test(q);const Ne=b(typeof V=="string"&&!["exact","startsWith","prefix","section"].includes(V.toLowerCase())?V:ye);if(!Ne)return!1;const ke=D||(typeof V=="string"&&["startsWith","prefix","section"].includes(V.toLowerCase())?"startsWith":"exact");return ke==="startswith"||ke==="prefix"||ke==="section"?q===Ne||q.startsWith(`${Ne}/`):i!=null&&i.isActive?!!i.isActive(ye):q===Ne},K=()=>!!o(e.disabled);let re=null;const H=()=>{var ye;return re!=null?!!re:y?!!o((ye=e.active)!=null?ye:e.selected):ee()},j=a(e.variant||(e.pills?"pills":e.soft?"soft":"line")),Y=!o(e.color)&&o(e.state)?mt(o(e.state)):"",W=Y?`cms-state-${Y}`:"",ie=JSswift.omit(e,["active","selected","label","title","text","to","icon","iconRight","iconSize","note","subtitle","caption","description","badge","counter","count","aside","trailing","slots","state","color","dense","outline","flat","glossy","glow","glass","gradient","textGradient","lightShadow","shadow","rounded","radius","textColor","variant","pills","soft","block","fill","match","matchMode","activeMatch","routeMatch","exact","startsWith","external","onNavigate"]);ie.href=C(),ie.class=ae(["cms-route-tab","cms-clear-set","cms-singularity",`variant-${j}`,me((Q=e.block)!=null?Q:e.fill,"block"),me(e.dense,"dense"),W,e.class]),ie.style={...e.style||{}};const ge=l((r=e.color)!=null?r:e.state);ge&&(ie.style["--cms-route-tab-accent"]=ge);const ce=(p=(x=e.iconSize)!=null?x:e.size)!=null?p:null,le=(ye,V)=>{const D=o(ye);return D==null||D===!1||D===""?null:typeof D=="string"?v.Icon({name:D,size:ce}):JSswift.ui.slot(D,{as:V})},oe=()=>({active:H(),disabled:K(),href:C(),to:w(),external:R(C()),navigate:ye=>{var q,Ne;if(K())return!1;const V=w();return!R(C())&&V&&(i!=null&&i.navigate)?(ye!=null&&ye.preventDefault&&ye.preventDefault(),i.navigate(V),(q=e.onNavigate)==null||q.call(e,V,ye||null),!0):((Ne=e.onNavigate)==null||Ne.call(e,V||C(),ye||null),!1)}}),ne=E(s,"icon",oe(),le(e.icon,"icon")),J=E(s,"label",oe(),(G=(U=(P=e.label)!=null?P:e.title)!=null?U:e.text)!=null?G:n),Z=E(s,"note",oe(),(u=(A=(de=e.note)!=null?de:e.subtitle)!=null?A:e.caption)!=null?u:e.description),X=E(s,"badge",oe(),(I=(k=e.badge)!=null?k:e.counter)!=null?I:e.count),ue=E(s,"aside",oe(),(pe=(B=e.aside)!=null?B:e.trailing)!=null?pe:le(e.iconRight,"iconRight")),F=E(s,"default",oe(),(Se=e.content)!=null?Se:e.body),f=_.span({class:"cms-route-tab-inner"},ne.length?_.span({class:"cms-route-tab-icon"},...ne):null,_.span({class:"cms-route-tab-copy"},_.span({class:"cms-route-tab-label"},...J.length?J:[w()||C()||""]),Z.length?_.span({class:"cms-route-tab-note"},...Z):null,F.length?_.span({class:"cms-route-tab-extra"},...F):null),X.length?_.span({class:"cms-route-tab-badge"},...X):null,ue.length?_.span({class:"cms-route-tab-aside"},...ue):null),m=_.a(ie,f);Ke(m,e);const g=()=>{const ye=H(),V=K(),D=C(),q=R(D);m.classList.toggle("active",ye),m.classList.toggle("is-disabled",V),m.classList.toggle("is-external",q),ye?m.setAttribute("aria-current",String(o(e.ariaCurrent)||"page")):m.removeAttribute("aria-current"),m.setAttribute("href",D||"#"),V?(m.setAttribute("aria-disabled","true"),m.tabIndex=-1):(m.removeAttribute("aria-disabled"),!c("tabIndex")&&!c("tabindex")&&m.removeAttribute("tabindex")),w()?m.dataset.to=String(w()):delete m.dataset.to,q&&m.target==="_blank"&&!m.rel&&(m.rel="noopener noreferrer")},O=e.onClick;return m.onclick=ye=>{if(O==null||O(ye),!ye.defaultPrevented){if(K()){ye.preventDefault();return}oe().navigate(ye)}},!y&&w()&&(i!=null&&i.subscribe)&&i.subscribe(()=>g()),JSswift.reactive.effect(()=>{g()},"UI.RouteTab:render"),m._isActive=()=>H(),m._setActive=ye=>(re=ye==null?null:!!ye,g(),m),m._navigate=ye=>oe().navigate(ye),m},(hi=JSswift.isDev)!=null&&hi.call(JSswift)&&(v.meta=v.meta||{},v.meta.RouteTab={signature:"UI.RouteTab(...children) | UI.RouteTab(props, ...children)",props:{label:"String|Node|Function|Array",to:"string",href:"string",active:"boolean",selected:"Alias of active",match:'"exact"|"startsWith"|RegExp|Function|string',matchMode:'"exact"|"startsWith"',exact:"boolean",startsWith:"boolean",note:"String|Node|Function|Array",badge:"String|Node|Function|Array",icon:"String|Node|Function|Array",iconRight:"String|Node|Function|Array",aside:"Node|Function|Array",variant:'"line"|"pills"|"soft"',disabled:"boolean",block:"boolean",state:"string",color:"string",slots:"{ icon?, label?, note?, badge?, aside?, default? }",class:"string",style:"object"},slots:{icon:"Leading icon content",label:"Main label content",note:"Secondary note/caption",badge:"Badge / counter area",aside:"Trailing visual/action area",default:"Extra content under the note"},events:{onClick:"MouseEvent",onNavigate:"(to, event)"},returns:"HTMLAnchorElement con ._isActive(), ._setActive(boolean|null), ._navigate(event?)",description:"Standardized tab/link for router or href navigation, with structured slots, states, and badges."}),v.Breadcrumbs=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=JSswift.router||(je==null?void 0:je.router)||null,c=kt(e.model,"UI.Breadcrumbs:model"),y=Ye(e.size,()=>{var Z;const J=o(e.size);return typeof J=="string"&&((Z=JSswift.uiSizes)!=null&&Z.includes(J))?`cms-size-${J}`:""}),a=Ye(e.variant,()=>{const J=String(o(e.variant||(e.pills?"pills":e.soft?"soft":"line"))||"").toLowerCase();return J==="pill"||J==="pills"?"variant-pills":J==="soft"||J==="card"?"variant-soft":"variant-line"}),l=Ye([e.wrap,e.nowrap],()=>o(e.wrap)===!1||o(e.nowrap)?"no-wrap":""),b=_.nav({class:ae(["cms-breadcrumbs","cms-clear-set",y,a,l,me(e.dense,"dense"),e.class]),style:{...e.style||{}},role:"navigation","aria-label":e.ariaLabel||"Breadcrumb"}),R=_.div({class:"cms-breadcrumbs-before"}),C=_.ol({class:"cms-breadcrumbs-list"}),w=_.div({class:"cms-breadcrumbs-after"});b.appendChild(R),b.appendChild(C),b.appendChild(w);const T=J=>{var X;const Z=o(J);return Z==null||Z===""?null:(X=JSswift.uiColors)!=null&&X.includes(Z)?`var(--cms-${Z})`:String(Z)},ee=J=>{var X;if(!J)return!1;if(o(J.external)===!0)return!0;const Z=o((X=J.href)!=null?X:J.to);return Z?/^(mailto:|tel:|https?:\/\/|\/\/)/i.test(String(Z)):!1},K=J=>J!=null&&J.nodeType&&J.cloneNode?J.cloneNode(!0):J,re=(J,Z)=>{J.innerHTML="",Z.forEach(X=>J.appendChild(X))},H=(J,Z,X,ue,F=null)=>{const f=JSswift.ui.getSlot(J,Z)!=null?E(J,Z,X,ue):[];return f.length?f:F&&JSswift.ui.getSlot(J,F)!=null?E(J,F,X,ue):E(null,"default",X,ue)},j=(J,Z,X)=>{const ue=o(J);return ue==null||ue===!1||ue===""?null:typeof ue=="string"?v.Icon({name:ue,size:Z}):JSswift.ui.slot(ue,{as:X})},Y=()=>{var F,f;const J=c?c.get():o((f=(F=e.items)!=null?F:e.value)!=null?f:e.breadcrumbs),Z=[],X=m=>{if(!(m==null||m===!1)){if(Array.isArray(m)){m.forEach(X);return}if(typeof m=="string"||typeof m=="number"){Z.push({label:String(m)});return}if(m!=null&&m.nodeType||typeof m=="function"){Z.push({label:m});return}Z.push(m)}},ue=o(e.home);return ue&&X(ue===!0?{label:"Home",to:"/",icon:"home"}:ue),X(J),!Z.length&&(n!=null&&n.length)&&n.forEach(m=>X(m)),Z.filter(m=>!o(m==null?void 0:m.hidden))},W=J=>{const Z=J.findIndex(X=>{var ue,F;return!!o((F=(ue=X==null?void 0:X.current)!=null?ue:X==null?void 0:X.active)!=null?F:X==null?void 0:X.selected)});return Z>-1?Z:o(e.autoCurrent)===!1?-1:J.length?J.length-1:-1},ie=J=>{var g,O,Q,r,x,p,P;const Z=Number(o((Q=(O=(g=e.max)!=null?g:e.maxItems)!=null?O:e.collapseAfter)!=null?Q:e.collapse)),X=Number.isFinite(Z)?Math.max(0,Math.trunc(Z)):0;if(!X||X<3||J.length<=X)return J.map((U,G)=>({type:"item",item:U,index:G,key:`item-${G}`}));let ue=Number(o((x=(r=e.leadingCount)!=null?r:e.keepStart)!=null?x:1)),F=Number(o((P=(p=e.trailingCount)!=null?p:e.keepEnd)!=null?P:Math.max(1,X-2)));if(ue=Number.isFinite(ue)?Math.max(1,Math.trunc(ue)):1,F=Number.isFinite(F)?Math.max(1,Math.trunc(F)):Math.max(1,X-2),ue+F+1>X&&(F=Math.max(1,X-ue-1),ue+F+1>X&&(ue=Math.max(1,X-F-1))),ue+F>=J.length)return J.map((U,G)=>({type:"item",item:U,index:G,key:`item-${G}`}));const f=[];for(let U=0;U<ue;U++)f.push({type:"item",item:J[U],index:U,key:`item-${U}`});const m=J.slice(ue,J.length-F);f.push({type:"collapsed",key:`collapsed-${ue}-${J.length-F}`,items:m,from:ue,to:J.length-F-1});for(let U=J.length-F;U<J.length;U++)f.push({type:"item",item:J[U],index:U,key:`item-${U}`});return f},ge=(J,Z=null)=>{var F,f,m,g,O;if(!J)return!1;const X=o((F=J.href)!=null?F:J.to)||"",ue=o(J.to)||"";return!ee(J)&&ue&&(i!=null&&i.navigate)?(Z!=null&&Z.preventDefault&&Z.preventDefault(),i.navigate(ue),(f=J.onNavigate)==null||f.call(J,ue,Z||null),(m=e.onNavigate)==null||m.call(e,ue,J,Z||null),!0):((g=J.onNavigate)==null||g.call(J,ue||X,Z||null),(O=e.onNavigate)==null||O.call(e,ue||X,J,Z||null),!1)},ce=(J,Z,X)=>{var O,Q,r;const ue=J,F=X[Z+1]||null,f={index:Z,entry:J,previous:ue,next:F},m=K(o((r=(Q=(J==null?void 0:J.type)==="item"?(O=J.item)==null?void 0:O.separator:null)!=null?Q:e.separator)!=null?r:"/")),g=H(s,"separator",f,m);return _.li({class:"cms-breadcrumbs-separator-item","aria-hidden":"true"},_.span({class:"cms-breadcrumbs-separator"},...g))},le=(J,Z,X)=>{const ue={type:"collapsed",collapsed:!0,items:Z,hiddenItems:J.items,currentIndex:X,from:J.from,to:J.to},F=_.span({class:"cms-breadcrumb cms-breadcrumb-collapsed"},_.span({class:"cms-breadcrumb-inner"},_.span({class:"cms-breadcrumb-copy"},_.span({class:"cms-breadcrumb-label"},String(o(e.collapsedLabel)||"\u2026"))))),f=H(s,"collapsed",ue,F,"item");return _.li({class:"cms-breadcrumbs-entry is-collapsed"},...f)},oe=(J,Z,X,ue)=>{var te,xe,be,Ce,he,Le,Ae,z,we,M,N,S,d,L,fe,Fe,Te,$,_e,Re,Pe,De,We,qe,Ze,Qe;const F=J.item||{},f=F.slots?{...s,...F.slots}:s,m=o((te=F.href)!=null?te:F.to)||"",g=!!o(F.disabled),O=J.index===X,Q=(Ce=(be=(xe=F.iconSize)!=null?xe:e.itemSize)!=null?be:e.size)!=null?Ce:null,r=T((Ae=(Le=(he=F.color)!=null?he:F.state)!=null?Le:e.color)!=null?Ae:e.state),x=!o(F.color)&&o(F.state)?mt(o(F.state)):"",p=(S=(N=(M=(we=(z=F.label)!=null?z:F.title)!=null?we:F.text)!=null?M:F.to)!=null?N:F.href)!=null?S:"",P=(fe=(L=(d=F.note)!=null?d:F.subtitle)!=null?L:F.caption)!=null?fe:F.description,U=(Te=(Fe=F.badge)!=null?Fe:F.counter)!=null?Te:F.count,G=(_e=($=F.aside)!=null?$:F.trailing)!=null?_e:j(F.iconRight,Q,"iconRight"),de=(Re=F.content)!=null?Re:F.body,A={item:F,index:J.index,visibleIndex:ue,total:Z.length,current:O,active:O,disabled:g,href:m,to:o(F.to)||"",external:ee(F),isFirst:J.index===0,isLast:J.index===Z.length-1,navigate:Ee=>ge(F,Ee)},u=H(f,"icon",A,j(F.icon,Q,"icon")),k=H(f,"label",A,p),I=H(f,"note",A,P),B=H(f,"badge",A,U),pe=H(f,"aside",A,G),Se=H(f,"default",A,de),ye=_.span({class:"cms-breadcrumb-inner"},u.length?_.span({class:"cms-breadcrumb-icon"},...u):null,_.span({class:"cms-breadcrumb-copy"},_.span({class:"cms-breadcrumb-label"},...k.length?k:[m||""]),I.length?_.span({class:"cms-breadcrumb-note"},...I):null,Se.length?_.span({class:"cms-breadcrumb-extra"},...Se):null),B.length?_.span({class:"cms-breadcrumb-badge"},...B):null,pe.length?_.span({class:"cms-breadcrumb-aside"},...pe):null),V=!g&&(!O||!!o((Pe=F.linkCurrent)!=null?Pe:e.linkCurrent)),D={class:ae(["cms-breadcrumb","cms-clear-set","cms-singularity",me(O,"is-current"),me(O,"active"),me(g,"is-disabled"),x?`cms-state-${x}`:"",F.class]),style:{...F.style||{}},"aria-current":O?String(o((De=F.ariaCurrent)!=null?De:e.ariaCurrent)||"page"):null};r&&(D.style["--cms-breadcrumb-accent"]=r);let q=null;V&&m?(q=_.a({...D,href:m,target:F.target,rel:F.rel,onClick:Ee=>{var Be,tt;(Be=F.onClick)==null||Be.call(F,Ee,A),(tt=e.onItemClick)==null||tt.call(e,F,A,Ee),!Ee.defaultPrevented&&A.navigate(Ee)}},ye),A.external&&q.target==="_blank"&&!q.rel&&(q.rel="noopener noreferrer")):V&&typeof F.onClick=="function"?q=_.button({...D,type:F.type||"button",onClick:Ee=>{var Be,tt;(Be=F.onClick)==null||Be.call(F,Ee,A),(tt=e.onItemClick)==null||tt.call(e,F,A,Ee)}},ye):q=_.span({...D,"aria-disabled":g?"true":null},ye),Ke(q,{size:(qe=(We=F.size)!=null?We:e.itemSize)!=null?qe:e.size,radius:(Ze=F.radius)!=null?Ze:e.radius,gradient:(Qe=F.gradient)!=null?Qe:e.gradient});const ke=H(f,"item",A,q);return _.li({class:ae(["cms-breadcrumbs-entry",me(O,"is-current"),me(g,"is-disabled")])},...ke)},ne=()=>{var f;const J=Y(),Z=W(J),X=ie(J),ue=T((f=e.color)!=null?f:e.state);b.classList.toggle("is-empty",J.length===0),ue?b.style.setProperty("--cms-breadcrumb-accent",ue):b.style.removeProperty("--cms-breadcrumb-accent");const F={items:J,visibleItems:X,currentIndex:Z,count:J.length,collapsed:X.some(m=>m.type==="collapsed")};if(re(R,H(s,"before",F,e.before)),re(w,H(s,"after",F,e.after)),C.innerHTML="",!J.length){const m=H(s,"empty",F,e.empty);m.length&&C.appendChild(_.li({class:"cms-breadcrumbs-entry is-empty"},...m));return}X.forEach((m,g)=>{g>0&&C.appendChild(ce(X[g-1],g-1,X)),C.appendChild(m.type==="collapsed"?le(m,J,Z):oe(m,J,Z,g))})};return je.reactive.effect(()=>{ne()},"UI.Breadcrumbs:render"),b.getItems=()=>Y(),b.getVisibleItems=()=>ie(Y()),b.refresh=()=>(ne(),b),b.setItems=J=>(c?c.set(J):e.items=J,ne(),b),Ke(b,e),b},(bi=JSswift.isDev)!=null&&bi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Breadcrumbs={signature:"UI.Breadcrumbs(props)",props:{items:"Array<string|number|Node|Function|{ label?, to?, href?, icon?, note?, badge?, current?, disabled?, hidden?, slots? }>",model:"[get,set] signal|Array",home:"boolean|Object",separator:"string|Node|Function",before:"Node|Function|Array",after:"Node|Function|Array",empty:"Node|Function|Array",variant:'"line"|"pills"|"soft"',max:"number",leadingCount:"number",trailingCount:"number",dense:"boolean",wrap:"boolean",nowrap:"boolean",linkCurrent:"boolean",color:"string",state:"string",itemSize:"string|number",ariaLabel:"string",class:"string",style:"object"},slots:{before:"Content before breadcrumb list",after:"Content after breadcrumb list",item:"Full renderer for a breadcrumb entry",icon:"Leading icon for each breadcrumb",label:"Main breadcrumb label",note:"Secondary line for the breadcrumb",badge:"Badge/counter area",aside:"Trailing area",default:"Extra content under note",separator:"Separator renderer",collapsed:"Renderer for collapsed middle items",empty:"Renderer for empty state"},events:{onItemClick:"(item, ctx, event)",onNavigate:"(toOrHref, item, event)"},returns:"HTMLElement <nav> con .getItems(), .getVisibleItems(), .refresh(), .setItems(items)",description:"Breadcrumbs standardizzati con item strutturati, slot completi, collapse automatico e supporto a link/router."}),v.Pagination=(...t)=>{const{props:e}=JSswift.uiNormalizeArgs(t),n=e.slots||{},s=kt(e.model,"UI.Pagination:model"),i=Ye(e.size,()=>{const r=o(e.size);return typeof r=="string"&&An[r]?`cms-size-${r}`:""}),c=_.nav({class:ae(["cms-pagination","cms-clear-set",i,me(e.dense,"dense"),me(e.simple,"is-simple"),me(e.disabled,"is-disabled"),e.class]),style:{...e.style||{}},role:"navigation","aria-label":e.ariaLabel||"Pagination"}),y=_.div({class:"cms-pagination-controls"}),a=_.div({class:"cms-pagination-start"}),l=_.div({class:"cms-pagination-pages"}),b=_.div({class:"cms-pagination-end"}),R=_.div({class:"cms-pagination-summary"});y.appendChild(a),y.appendChild(l),y.appendChild(b),c.appendChild(y),c.appendChild(R);let C=1,w=1;const T=(r,x=0)=>{const p=o(r);if(p==null||p==="")return x;const P=Number(p);return Number.isFinite(P)?Math.trunc(P):x},ee=(r,x=K())=>{const p=Number(r),P=Number.isFinite(p)?Math.trunc(p):1;return Math.min(Math.max(P||1,1),Math.max(1,x||1))},K=()=>{var P,U,G,de,A,u,k;const r=T((G=(U=(P=e.max)!=null?P:e.pages)!=null?U:e.pageCount)!=null?G:e.totalPages,0);if(r>0)return r;const x=T((A=(de=e.total)!=null?de:e.totalItems)!=null?A:e.count,0),p=T((k=(u=e.pageSize)!=null?u:e.perPage)!=null?k:e.limit,0);return x>=0&&p>0?Math.max(1,Math.ceil(x/p)):1},re=()=>{var r,x,p;return T(s?s.get():(p=(x=(r=e.page)!=null?r:e.value)!=null?x:e.current)!=null?p:e.currentPage,1)},H=()=>{var r,x;return Math.max(0,T((x=(r=e.siblings)!=null?r:e.siblingCount)!=null?x:e.window,1))},j=()=>{var r,x;return Math.max(0,T((x=(r=e.boundaryCount)!=null?r:e.boundaries)!=null?x:e.edges,1))},Y=()=>!!o(e.disabled),W=()=>{var r;return o((r=e.showSummary)!=null?r:e.showLabel)!==!1},ie=()=>o(e.showPages)!==!1&&!o(e.simple),ge=()=>o(e.showPrev)!==!1,ce=()=>o(e.showNext)!==!1,le=()=>!!o(e.showEdges),oe=()=>{const r=o(e.showFirst);return r==null?le():!!r},ne=()=>{const r=o(e.showLast);return r==null?le():!!r},J=()=>!!o(e.hideOnSinglePage),Z=()=>{var p,P;const r=o((P=(p=e.total)!=null?p:e.totalItems)!=null?P:e.count);if(r==null||r==="")return null;const x=Number(r);return Number.isFinite(x)?Math.max(0,Math.trunc(x)):null},X=()=>{var p,P;const r=o((P=(p=e.pageSize)!=null?p:e.perPage)!=null?P:e.limit);if(r==null||r==="")return null;const x=Number(r);return Number.isFinite(x)&&x>0?Math.trunc(x):null},ue=(r=C,x=w)=>{const p=Z(),P=X(),U=p!=null&&P?p===0?0:(r-1)*P+1:null,G=p!=null&&P?Math.min(p,r*P):null;return{page:r,value:r,current:r,currentPage:r,pages:x,max:x,total:p,pageSize:P,from:U,to:G,disabled:Y(),isFirst:r<=1,isLast:r>=x,canPrev:r>1,canNext:r<x,setPage:(de,A)=>Q(de,A),prev:de=>Q(r-1,de),next:de=>Q(r+1,de),first:de=>Q(1,de),last:de=>Q(x,de)}},F=(r,x)=>{if(x<=0)return[];const p=[],P=new Set,U=j(),G=H();for(let A=1;A<=Math.min(U,x);A++)P.add(A);for(let A=Math.max(1,r-G);A<=Math.min(x,r+G);A++)P.add(A);for(let A=Math.max(1,x-U+1);A<=x;A++)P.add(A);let de=0;for(let A=1;A<=x;A++)P.has(A)&&(de&&A-de>1&&p.push({type:"ellipsis",key:`ellipsis-${de}-${A}`}),p.push({type:"page",page:A,key:`page-${A}`}),de=A);return p.length||p.push({type:"page",page:1,key:"page-1"}),p},f=(r,x,p,P=null)=>{const U=JSswift.ui.getSlot(n,r)!=null?E(n,r,p,x):[];return U.length?U:P&&JSswift.ui.getSlot(n,P)!=null?E(n,P,p,x):E(null,"default",p,x)},m=(r,x)=>{r.innerHTML="",x.forEach(p=>r.appendChild(p))},g=(r,x,p,P={})=>{var G;const U={...ue(),kind:r,active:!!P.active};return v.Btn({class:ae(["cms-pagination-btn",`cms-pagination-${r}`,me(P.active,"active"),P.class]),size:e.itemSize||e.size||(e.dense?"sm":"md"),color:P.active?e.color||e.state||"primary":P.color||null,outline:P.active?!1:(G=P.outline)!=null?G:!0,disabled:Y()||!!P.disabled,"aria-current":P.active?"page":null,onClick:de=>{Y()||P.disabled||p==null||p(de)}},...f(r,x,U,r==="summary"?"label":r==="page"?"item":null))},O=(r,x)=>{C=ee(r,x),w=Math.max(1,x||1);const p=ue(C,w);c.style.display=J()&&w<=1?"none":"",R.style.display=W()?"":"none",l.style.display=ie()?"":"none",a.innerHTML="",l.innerHTML="",b.innerHTML="";const P=f("start",e.start,p);P.length&&a.appendChild(_.div({class:"cms-pagination-extra cms-pagination-extra-start"},...P)),oe()&&a.appendChild(g("first","\xAB",de=>Q(1,de),{disabled:C<=1})),ge()&&a.appendChild(g("prev","Prev",de=>Q(C-1,de),{disabled:C<=1})),ie()&&F(C,w).forEach(de=>{if(de.type==="ellipsis"){const k={...p,kind:"ellipsis"},I=f("ellipsis","\u2026",k);l.appendChild(_.span({class:"cms-pagination-ellipsis","aria-hidden":"true"},...I));return}const A=de.page,u={...p,page:A,value:A,item:de,active:A===C};l.appendChild(v.Btn({class:ae(["cms-pagination-btn","cms-pagination-page-btn",me(A===C,"active")]),size:e.itemSize||e.size||(e.dense?"sm":"md"),color:A===C?e.color||e.state||"primary":null,outline:A!==C,disabled:Y(),"aria-current":A===C?"page":null,onClick:k=>Q(A,k)},...f("page",String(A),u,"item")))}),ce()&&b.appendChild(g("next","Next",de=>Q(C+1,de),{disabled:C>=w})),ne()&&b.appendChild(g("last","\xBB",de=>Q(w,de),{disabled:C>=w}));const U=f("end",e.end,p);U.length&&b.appendChild(_.div({class:"cms-pagination-extra cms-pagination-extra-end"},...U));let G=`Pagina ${C} di ${w}`;p.total!=null&&p.pageSize&&(G=p.total===0?"0 risultati":`${p.from}-${p.to} di ${p.total}`),m(R,f("summary",G,p,"label"))},Q=(r,x=null)=>{var U,G;const p=K(),P=ee(r,p);return P===C&&p===w||(O(P,p),s&&s.get()!==P&&s.set(P),(U=e.onChange)==null||U.call(e,P,ue(P,p),x),(G=e.onPageChange)==null||G.call(e,P,ue(P,p),x)),P};return je.reactive.effect(()=>{const r=K(),x=re(),p=ee(x,r);O(p,r),s&&x!==p&&s.set(p)},"UI.Pagination:sync"),c.getPage=()=>C,c.getPages=()=>w,c.setPage=r=>Q(r),c.prev=()=>Q(C-1),c.next=()=>Q(C+1),c.first=()=>Q(1),c.last=()=>Q(w),Ke(c,e),c},(yi=JSswift.isDev)!=null&&yi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Pagination={signature:"UI.Pagination(props)",props:{max:"number",pages:"number",total:"number",pageSize:"number",value:"number",page:"number",model:"[get,set] signal",showPages:"boolean",showSummary:"boolean",showLabel:"boolean",showPrev:"boolean",showNext:"boolean",showFirst:"boolean",showLast:"boolean",showEdges:"boolean",siblings:"number",boundaryCount:"number",hideOnSinglePage:"boolean",size:"xxs|xs|sm|md|lg|xl|xxl|xxxl",dense:"boolean",simple:"boolean",color:"primary|secondary|warning|danger|success|info|light|dark",state:"primary|secondary|warning|danger|success|info|light|dark",slots:"{ start?, end?, first?, prev?, page?, item?, ellipsis?, next?, last?, summary?, label? }",class:"string",style:"object"},slots:{start:"Content before the controls",end:"Content after the controls",first:"First button content",prev:"Prev button content",page:"Page item content (ctx: { page, active, pages })",item:"Alias of page",ellipsis:"Ellipsis content",next:"Next button content",last:"Last button content",summary:"Summary content",label:"Alias legacy di summary"},events:{onChange:"(page, ctx, event)",onPageChange:"(page, ctx, event)"},returns:"HTMLElement <nav>",description:"Paginazione standard con controlli edge, numeri, ellissi, summary e supporto total/pageSize."}),v.Spinner=(...t)=>{var Y;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=(W,ie,ge)=>{if(rt(W))return()=>{const le=o(W);if(le==null||le===!1||le==="")return ge;const oe=ie?ie(le):le;return oe==null||oe===""?ge:oe};if(W==null||W===!1||W==="")return ge;const ce=ie?ie(W):W;return ce==null||ce===""?ge:ce},c=W=>{if(W==null||W===!1||W===""||mt(W))return"";const ge=String(W).trim();return ge?ge.startsWith("#")||ge.startsWith("rgb(")||ge.startsWith("rgba(")||ge.startsWith("hsl(")||ge.startsWith("hsla(")||ge.startsWith("var(")?ge:Zt(ge)?`var(--cms-${ge})`:ge:""},y=Ye(e.state,()=>{const W=mt(o(e.state));return W?`cms-state-${W}`:""}),a=ae(["cms-spinner",y,me(e.vertical,"vertical"),me(e.reverse,"reverse"),me(e.center,"center"),me(e.block,"block"),me(e.pause||e.paused,"paused"),e.class]),l=JSswift.omit(e,["ariaLabel","block","center","color","indicatorClass","indicatorStyle","label","note","pause","paused","reverse","size","slots","speed","state","thickness","trackColor","vertical"]);l.class=a;const b={...e.style||{}};e.color!=null&&Object.prototype.hasOwnProperty.call(b,"backgroundColor")&&delete b.backgroundColor,l.style=b,l.role==null&&(l.role="status"),l["aria-live"]==null&&(l["aria-live"]="polite"),l["aria-busy"]==null&&(l["aria-busy"]="true");const R={props:e},C=E(s,"label",R,e.label),w=E(s,"default",R,n),T=E(s,"note",R,e.note),ee=C.length||w.length||T.length;if(!ee){const W=o((Y=e.ariaLabel)!=null?Y:e["aria-label"]);W?l["aria-label"]=W:l["aria-label"]==null&&(l["aria-label"]="Loading")}const K=_.span({class:ae(["cms-spinner-indicator",e.indicatorClass]),style:{"--cms-spinner-size":i(e.size,$e,"18px"),"--cms-spinner-thickness":i(e.thickness,$e,"2px"),"--cms-spinner-speed":i(e.speed,W=>typeof W=="number"?`${W}ms`:String(W),"900ms"),"--cms-spinner-color":i(e.color,c,"var(--set-border-color, var(--cms-primary))"),"--cms-spinner-track":i(e.trackColor,c,"color-mix(in srgb, var(--cms-spinner-color) 18%, transparent)"),...e.indicatorStyle||{}},"aria-hidden":"true"}),re=E(s,"indicator",R,K),H=[];re.length&&H.push(...re),ee&&H.push(_.div({class:"cms-spinner-content"},C.length?_.div({class:"cms-spinner-label"},...C):null,w.length?_.div({class:"cms-spinner-copy"},...w):null,T.length?_.div({class:"cms-spinner-note"},...T):null));const j=_.div(l,...H);return Ke(j,e),j},(wi=JSswift.isDev)!=null&&wi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Spinner={signature:"UI.Spinner(...children) | UI.Spinner(props, ...children)",props:{size:"number|string",color:"string",thickness:"number|string",trackColor:"string",speed:"number|string",state:"primary|secondary|success|warning|danger|info|light|dark",label:"String|Node|Function|Array",note:"String|Node|Function|Array",vertical:"boolean",reverse:"boolean",center:"boolean",block:"boolean",pause:"boolean",paused:"boolean",ariaLabel:"string",indicatorClass:"string",indicatorStyle:"object",slots:"{ indicator?, label?, note?, default? }",class:"string",style:"object"},slots:{indicator:"Custom spinner indicator",label:"Primary label/content near the spinner",note:"Secondary supporting text",default:"Extra content rendered near the spinner"},returns:"HTMLDivElement",description:"Animated spinner with flexible layout, optional content, and controls for size, speed, and track."}),v.Progress=(...t)=>{var I,B,pe,Se,ye,V,D,q,Ne,ke;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=e.model||(_t(e.value)||Pt(e.value)?e.value:null),c=kt(i,"UI.Progress:model"),y=Ye([e.state,e.color],()=>{const te=mt(o(e.state)||o(e.color));return te?`cms-state-${te}`:""}),a=(te,xe)=>{const be=Number(te);return Number.isFinite(be)?be:xe},l=()=>a(o(e.min),0),b=()=>{const te=l(),xe=a(o(e.max),100);return xe<te?te:xe},R=()=>{var xe,be;const te=o((be=(xe=e.height)!=null?xe:e.thickness)!=null?be:e.size);return te==null||te===""?"8px":typeof te=="number"?`${te}px`:typeof te=="string"?{xxs:"4px",xs:"6px",sm:"8px",md:"10px",lg:"12px",xl:"14px",xxl:"16px",xxxl:"18px"}[te]||te:"8px"},C=(te,xe="")=>{const be=o(te);if(be==null||be===!1||be==="")return xe;const Ce=mt(be);return Ce?`var(--cms-${Ce})`:typeof be=="string"&&Zt(be)?`var(--cms-${be})`:String(be)},w=te=>{const xe=l(),be=b(),Ce=a(te,xe);return Math.min(be,Math.max(xe,Ce))},T=te=>{const xe=l(),Ce=b()-xe;if(!Ce)return 0;const he=(w(te)-xe)/Ce,Le=o(e.reverse)?1-he:he;return Math.max(0,Math.min(1,Le))},ee=te=>{const xe=w(te);return xe<ie()?ie():xe},K=(te,xe,be)=>{const Ce=e.formatValue;if(typeof Ce=="function"){const he=Ce(te,xe,be);if(he!=null)return he}return`${Math.round(xe)}%`},re=te=>{for(;te.firstChild;)te.removeChild(te.firstChild)},H=(te,xe,be="flex")=>{re(te),(xe||[]).forEach(Ce=>{if(!(Ce==null||Ce===!1)){if(Ce instanceof Node){te.appendChild(Ce);return}te.appendChild(document.createTextNode(String(Ce)))}}),te.style.display=te.childNodes.length?be:"none"},j=(te,xe={})=>Ln(o(te),xe),Y=(te,xe,be={})=>{var he;const Ce=o(te);return Ce==null||Ce===!1||Ce===""?[]:typeof Ce=="string"?[v.Icon({name:Ce,size:(he=e.iconSize)!=null?he:16})]:j(Ce,{...be,as:xe})},W=te=>Pt(te)||_t(te)?o(te):typeof te=="function"&&te.length===0?te():te,[ie,ge]=JSswift.reactive.signal(w(c?c.get():(B=(I=o(e.value))!=null?I:o(e.min))!=null?B:0)),[ce,le]=JSswift.reactive.signal(ee((ye=o(e.buffer))!=null?ye:c?c.get():(Se=(pe=o(e.value))!=null?pe:o(e.min))!=null?Se:0)),oe=(te,xe={})=>{const be=w(te);return ie()!==be&&ge(be),ce()<be&&le(be),c&&xe.fromModel!==!0&&c.set(be),be},ne=te=>{const xe=ee(te);return ce()!==xe&&le(xe),xe},J=JSswift.omit(e,["model","value","min","max","buffer","class","style","slots","label","note","showValue","valueLabel","insideLabel","formatValue","icon","iconRight","iconSize","startLabel","endLabel","leftLabel","rightLabel","trackColor","bufferColor","height","thickness","size","state","color","reverse","striped","animated","indeterminate","ariaLabel","ariaValueText","width","dense","outline","flat","border","glossy","glow","glass","shadow","gradient","textGradient","lightShadow","radius","rounded","textColor"]),Z={width:o(e.width)||"100%",...e.style||{}},X=o(e.color);(X!=null||rt(e.color))&&!mt(X||"")&&delete Z.backgroundColor,J.class=ae(["cms-progress-wrap",me(e.dense,"dense"),me(e.reverse,"is-reverse"),me(e.indeterminate,"is-indeterminate"),y,e.class]),J.style=Z;const ue=_.div({class:"cms-progress-header"}),F=_.div({class:"cms-progress-heading"}),f=_.div({class:"cms-progress-label"}),m=_.div({class:"cms-progress-note"}),g=_.div({class:"cms-progress-value"});F.append(f,m),ue.append(F,g);const O=_.div({class:"cms-progress-body"}),Q=_.span({class:"cms-progress-edge-label cms-progress-edge-label-left"}),r=_.div({class:"cms-progress",role:"progressbar"}),x=_.span({class:"cms-progress-buffer"}),p=_.span({class:ae(["cms-progress-bar","cms-singularity",y,me(e.outline,"cms-outline"),me(e.flat,"cms-flat"),me(e.border,"cms-border"),me(e.glossy,"cms-glossy"),me(e.glow,"cms-glow"),me(e.glass,"cms-glass"),me(e.shadow,"cms-shadow"),Ye(e.shadow,()=>{const te=Hn(o(e.shadow));return te?`cms-shadow-${te}`:""}),me(e.gradient,"cms-gradient"),me(e.textGradient,"cms-text-gradient"),me(e.lightShadow,"cms-light-shadow"),me(e.striped,"is-striped"),me(e.animated||e.indeterminate,"is-animated")])}),P=_.span({class:"cms-progress-bar-label"});p.appendChild(P),r.append(x,p);const U=_.span({class:"cms-progress-edge-label cms-progress-edge-label-right"});O.append(Q,r,U);const G=_.div(J,ue,O);Ke(p,e);const de=()=>{const te=ie(),xe=T(te)*100,be={value:te,percent:xe,min:l(),max:b(),buffer:ce(),progress:G,track:r,bar:p,props:e},Ce=E(s,"icon",be,null),he=Ce.length?[]:Y(e.icon,"icon",be),Le=E(s,"label",be,W(e.label)),Ae=Le.length?Le:E(s,"default",be,n),z=E(s,"iconRight",be,null),we=z.length?[]:Y(e.iconRight,"iconRight",be),M=E(s,"note",be,W(e.note)),N=e.valueLabel!=null?W(e.valueLabel):K(te,xe,be),S=o(e.showValue),d=S===!0||e.valueLabel!=null||JSswift.ui.getSlot(s,"value")!=null?E(s,"value",be,N):[];H(f,[...he,...Ce,...Ae,...we,...z],"inline-flex"),H(m,M,"block"),H(g,S==="inside"?[]:d,"inline-flex"),ue.style.display=f.childNodes.length||m.childNodes.length||g.childNodes.length?"flex":"none"},A=()=>{var Le,Ae;const te=ie(),xe=T(te)*100,be={value:te,percent:xe,min:l(),max:b(),buffer:ce(),progress:G,track:r,bar:p,props:e},Ce=W((Le=e.startLabel)!=null?Le:e.leftLabel),he=W((Ae=e.endLabel)!=null?Ae:e.rightLabel);H(Q,E(s,"startLabel",be,Ce),"inline-flex"),H(U,E(s,"endLabel",be,he),"inline-flex")},u=()=>{const te=ie(),xe=T(te)*100,be={value:te,percent:xe,min:l(),max:b(),buffer:ce(),progress:G,track:r,bar:p,props:e},Ce=o(e.showValue),he=e.insideLabel!=null?W(e.insideLabel):K(te,xe,be),Le=Ce==="inside"||e.insideLabel!=null||JSswift.ui.getSlot(s,"inside")!=null?E(s,"inside",be,he):[];H(P,Le,"inline-flex")},k=()=>{const te=ie(),xe=ce(),be=l(),Ce=b(),he=T(te)*100,Le=T(xe)*100,Ae=C(e.color,""),z=C(e.trackColor,Ae?`color-mix(in srgb, ${Ae} 14%, transparent)`:"rgba(255,255,255,0.08)"),we=C(e.bufferColor,Ae?`color-mix(in srgb, ${Ae} 30%, transparent)`:"rgba(255,255,255,0.16)"),M=o(e.ariaLabel),N=o(e.ariaValueText),S=!!o(e.indeterminate),d=o(e.radius);G.style.width=o(e.width)||"100%",G.style.setProperty("--cms-progress-height",R()),d!=null?typeof d=="number"?G.style.setProperty("--cms-progress-radius",`${d}px`):typeof d=="string"&&JSswift.uiSizes.includes(d)?G.style.setProperty("--cms-progress-radius",`var(--cms-r-${d})`):G.style.setProperty("--cms-progress-radius",String(d)):G.style.removeProperty("--cms-progress-radius"),r.style.background=z,x.style.background=we,x.style.width=`${Le}%`,Ae&&!mt(o(e.state)||o(e.color))?(p.style.setProperty("--set-background-color",Ae),p.style.setProperty("--set-border-color",Ae),p.style.setProperty("--set-color",o(e.textColor)||"var(--cms-on-primary, #fff)")):mt(o(e.state)||o(e.color))?(p.style.removeProperty("--set-background-color"),p.style.removeProperty("--set-border-color"),p.style.removeProperty("--set-color")):(p.style.setProperty("--set-background-color","var(--cms-primary)"),p.style.setProperty("--set-border-color","var(--cms-primary)"),p.style.setProperty("--set-color",o(e.textColor)||"var(--cms-on-primary, #fff)")),S?(p.style.width="",r.removeAttribute("aria-valuenow"),r.removeAttribute("aria-valuemin"),r.removeAttribute("aria-valuemax")):(p.style.width=`${he}%`,r.setAttribute("aria-valuemin",String(be)),r.setAttribute("aria-valuemax",String(Ce)),r.setAttribute("aria-valuenow",String(te))),M!=null?r.setAttribute("aria-label",String(M)):typeof o(e.label)=="string"?r.setAttribute("aria-label",String(o(e.label))):r.removeAttribute("aria-label"),N!=null?r.setAttribute("aria-valuetext",String(N)):S?r.removeAttribute("aria-valuetext"):r.setAttribute("aria-valuetext",K(te,he,{value:te,percent:he,min:be,max:Ce,buffer:xe,progress:G,track:r,bar:p,props:e})),G.classList.toggle("has-start-label",Q.childNodes.length>0),G.classList.toggle("has-end-label",U.childNodes.length>0),G.classList.toggle("has-inside-label",P.childNodes.length>0)};return c?(oe(c.get(),{fromModel:!0}),c.watch(te=>{oe(te,{fromModel:!0})},"UI.Progress:watch")):rt(e.value)?JSswift.reactive.effect(()=>{oe(o(e.value),{fromModel:!0})},"UI.Progress:value"):oe((D=(V=e.value)!=null?V:e.min)!=null?D:0,{fromModel:!0}),rt(e.buffer)?JSswift.reactive.effect(()=>{ne(o(e.buffer))},"UI.Progress:buffer"):ne((ke=(Ne=(q=e.buffer)!=null?q:e.value)!=null?Ne:e.min)!=null?ke:0),JSswift.reactive.effect(()=>{de(),A(),u(),k()},"UI.Progress:render"),G._track=r,G._bar=p,G._buffer=x,G._getValue=ie,G._getBuffer=ce,G._setValue=te=>oe(te),G._setBuffer=te=>ne(te),G},(vi=JSswift.isDev)!=null&&vi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Progress={signature:"UI.Progress(...children) | UI.Progress(props, ...children)",props:{value:"number|rod|[get,set] signal",model:"rod|[get,set] signal",min:"number",max:"number",buffer:"number|rod|[get,set] signal",label:"String|Node|Function|Array",note:"String|Node|Function|Array",showValue:'boolean|"inside"',valueLabel:"String|Node|Function|Array",insideLabel:"String|Node|Function|Array",formatValue:"function(value, percent, ctx)",icon:"String|Node|Function|Array",iconRight:"String|Node|Function|Array",startLabel:"String|Node|Function|Array",endLabel:"String|Node|Function|Array",leftLabel:"Alias of startLabel",rightLabel:"Alias of endLabel",width:"string|number",size:"string|number",height:"string|number",thickness:"Alias of height",color:"string",state:"primary|secondary|success|warning|danger|info|light|dark",trackColor:"string",bufferColor:"string",striped:"boolean",animated:"boolean",indeterminate:"boolean",reverse:"boolean",slots:"{ icon?, label?, note?, value?, inside?, startLabel?, endLabel?, default? }",class:"string",style:"object"},slots:{icon:"Icon before the label",label:"Main progress content",note:"Secondary content below the label",value:"External value on the right",inside:"Content inside the bar",startLabel:"Label on the left of the bar",endLabel:"Label on the right of the bar",default:"Fallback label content"},returns:"HTMLDivElement",description:"Standardized progress bar with optional header, buffer, semantic state, and reactive support."}),v.LoadingBar=function(...e){var u,k;const{props:n,children:s}=JSswift.uiNormalizeArgs(e),i=(I,B)=>{const pe=Number(I);return Number.isFinite(pe)?pe:B},c=()=>i(o(n.min),0),y=()=>{const I=c(),B=i(o(n.max),100);return B<I?I:B},a=I=>{const B=c(),pe=y(),Se=i(I,B);return Math.min(pe,Math.max(B,Se))},l=(I,B="")=>I==null||I===!1||I===""?B:typeof I=="number"?`${I}px`:String(I),b=I=>{const B=o(I);return!B||B===document?document.body:typeof B=="string"?document.querySelector(B)||document.body:B&&B.body instanceof HTMLElement?B.body:B instanceof HTMLElement?B:document.body},R=n.model||(_t(n.value)||Pt(n.value)?n.value:null),C=kt(R,"UI.LoadingBar:model"),w=_t(n.buffer)||Pt(n.buffer)?n.buffer:null,T=kt(w,"UI.LoadingBar:buffer"),ee=C?C.get():(u=o(n.value))!=null?u:c(),K=T?T.get():(k=o(n.buffer))!=null?k:ee,[re,H]=JSswift.reactive.signal(a(ee)),[j,Y]=JSswift.reactive.signal(Math.max(a(K),a(ee))),[W,ie]=JSswift.reactive.signal(n.visible!=null?!!o(n.visible):a(ee)>c()||!!o(n.indeterminate));let ge=null,ce=null;const le=()=>{ge&&(clearInterval(ge),ge=null)},oe=()=>{ce&&(clearTimeout(ce),ce=null)},ne=(I,B={})=>{const pe=!!I;return W()!==pe&&ie(pe),B.fromExternal!==!0&&typeof n.onVisibleChange=="function"&&n.onVisibleChange(pe),pe},J=(I,B={})=>{const pe=a(I);return re()!==pe&&H(pe),j()<pe&&(Y(pe),T&&B.fromExternal!==!0&&T.set(pe)),C&&B.fromExternal!==!0&&C.set(pe),pe},Z=(I,B={})=>{const pe=Math.max(J(re(),{fromExternal:!0}),a(I));return j()!==pe&&Y(pe),T&&B.fromExternal!==!0&&T.set(pe),pe},X=(I=re())=>{n.visible==null&&(o(n.indeterminate)||I>c()?ne(!0):o(n.hideOnZero)!==!1&&ne(!1))},ue=()=>{if(le(),o(n.trickle)===!1||o(n.indeterminate))return;const I=i(o(n.trickleInterval),280);I<=0||(ge=setInterval(()=>{var ye,V;const B=re(),pe=a((V=(ye=o(n.trickleTo))!=null?ye:o(n.trickleMax))!=null?V:92);if(B>=pe)return;const Se=i(o(n.trickleStep),B<45?12:B<75?7:3);J(Math.min(pe,B+Se))},I))},F=JSswift.omit(n,["model","value","min","max","buffer","class","style","slots","label","note","showValue","valueLabel","insideLabel","formatValue","icon","iconRight","iconSize","startLabel","endLabel","leftLabel","rightLabel","trackColor","bufferColor","height","thickness","size","state","color","reverse","striped","animated","indeterminate","ariaLabel","ariaValueText","width","dense","outline","flat","border","glossy","glow","glass","shadow","gradient","textGradient","lightShadow","radius","rounded","textColor","target","mount","position","top","right","bottom","left","inset","zIndex","visible","autoStart","hideOnZero","startValue","step","trickle","trickleStep","trickleInterval","trickleMax","trickleTo","doneValue","doneDelay","hideDelay","resetValue","progressClass","progressStyle","onVisibleChange"]);F.class=ae(["cms-loading-bar",n.class]),F.style={...n.style||{}};const f=JSswift.omit(n,["target","mount","position","top","right","bottom","left","inset","zIndex","visible","autoStart","hideOnZero","startValue","step","trickle","trickleStep","trickleInterval","trickleMax","trickleTo","doneValue","doneDelay","hideDelay","resetValue","progressClass","progressStyle","onVisibleChange"]);f.class=ae(["cms-loading-bar-progress",n.progressClass,f.class]),f.style={...n.progressStyle||{}},f.value=[re,H],f.buffer=[j,Y],f.dense==null&&(f.dense=!0),f.height==null&&f.thickness==null&&f.size==null&&(f.height=3),f.width==null&&(f.width="100%");const m=_.div(F),g=v.Progress(f,...s);m.appendChild(g);const O=I=>{oe();const B=J(I);return X(B),m},Q=I=>{oe();const B=Z(I);return X(B),m},r=(I=(B=>(B=o(n.step))!=null?B:8)())=>{oe();const pe=re(),Se=J(pe+i(I,0));return X(Se),m},x=(I=(B=>(B=o(n.startValue))!=null?B:12)())=>{oe();const pe=Math.max(re(),a(I));return J(pe),Z(Math.max(j(),pe)),X(pe),ue(),m},p=(I=(B=>(B=o(n.resetValue))!=null?B:c())())=>{oe(),le();const pe=a(I);return Z(pe),J(pe),X(pe),m},P=(I=(B=>(B=o(n.doneValue))!=null?B:y())())=>{var ye;oe(),le();const pe=a(I);Z(pe),J(pe),X(pe);const Se=Math.max(0,i((ye=o(n.hideDelay))!=null?ye:o(n.doneDelay),220));return ce=setTimeout(()=>{p()},Se),m},U=(...I)=>P(...I),G=()=>(ne(!0),m),de=()=>(oe(),le(),ne(!1),m),A=()=>(oe(),le(),m.remove(),null);return m.el=m,m._progress=g,m.get=()=>re(),m.getBuffer=()=>j(),m.set=O,m.setBuffer=Q,m.inc=r,m.start=x,m.done=P,m.complete=P,m.stop=U,m.reset=p,m.show=G,m.hide=de,m.destroy=A,m._dispose=A,C?C.watch(I=>{J(I,{fromExternal:!0}),X(a(I))},"UI.LoadingBar:watch"):rt(n.value)&&JSswift.reactive.effect(()=>{const I=a(o(n.value));J(I,{fromExternal:!0}),X(I)},"UI.LoadingBar:value"),T?T.watch(I=>{Z(I,{fromExternal:!0})},"UI.LoadingBar:bufferWatch"):rt(n.buffer)&&JSswift.reactive.effect(()=>{Z(o(n.buffer),{fromExternal:!0})},"UI.LoadingBar:buffer"),JSswift.reactive.effect(()=>{const I=c(),B=y(),pe=Math.min(B,Math.max(I,re())),Se=Math.max(pe,Math.min(B,Math.max(I,j())));pe!==re()&&H(pe),Se!==j()&&Y(Se)},"UI.LoadingBar:range"),JSswift.reactive.effect(()=>{n.visible!=null&&ne(o(n.visible),{fromExternal:!0})},"UI.LoadingBar:visible"),JSswift.reactive.effect(()=>{var ke;const I=o(n.position)||"fixed",B=o(n.inset),pe=o(n.top),Se=o(n.right),ye=o(n.bottom),V=o(n.left),D=o(n.width),q=n.visible!=null?!!o(n.visible):W(),Ne=I==="static"||I==="relative";m.classList.toggle("is-visible",q),m.classList.toggle("is-inline",Ne),m.classList.toggle("has-track",!!o(n.trackColor)),m.style.position=I,m.style.zIndex=String((ke=o(n.zIndex))!=null?ke:10002),m.style.width=l(D,Ne?"100%":""),B!=null&&B!==""?(m.style.inset=l(B),m.style.removeProperty("top"),m.style.removeProperty("right"),m.style.removeProperty("bottom"),m.style.removeProperty("left")):(m.style.removeProperty("inset"),!Ne&&I!=="sticky"?(m.style.top=l(pe,"0px"),m.style.right=l(Se,D==null||D===""?"0px":""),m.style.bottom=l(ye,""),m.style.left=l(V,"0px")):(m.style.top=l(pe,""),m.style.right=l(Se,""),m.style.bottom=l(ye,""),m.style.left=l(V,"")))},"UI.LoadingBar:layout"),Ke(m,n),o(n.mount)!==!1&&b(n.target).appendChild(m),o(n.autoStart)&&x(),m},(Si=JSswift.isDev)!=null&&Si.call(JSswift)&&(v.meta=v.meta||{},v.meta.LoadingBar={signature:"UI.LoadingBar(...children) | UI.LoadingBar(props, ...children)",props:{value:"number|rod|[get,set] signal",model:"rod|[get,set] signal",buffer:"number|rod|[get,set] signal",min:"number",max:"number",height:"string|number",thickness:"Alias of height",size:"string|number",color:"string",state:"primary|secondary|success|warning|danger|info|light|dark",trackColor:"string",bufferColor:"string",striped:"boolean",animated:"boolean",indeterminate:"boolean",reverse:"boolean",width:"string|number",target:"HTMLElement|string",mount:"boolean",position:"fixed|absolute|relative|static|sticky",inset:"string|number",top:"string|number",right:"string|number",bottom:"string|number",left:"string|number",zIndex:"number",visible:"boolean",autoStart:"boolean",startValue:"number",step:"number",trickle:"boolean",trickleStep:"number",trickleInterval:"number",trickleMax:"number",trickleTo:"Alias of trickleMax",doneValue:"number",doneDelay:"Alias of hideDelay",hideDelay:"number",resetValue:"number",label:"String|Node|Function|Array",note:"String|Node|Function|Array",showValue:'boolean|"inside"',valueLabel:"String|Node|Function|Array",insideLabel:"String|Node|Function|Array",startLabel:"String|Node|Function|Array",endLabel:"String|Node|Function|Array",progressClass:"string",progressStyle:"object",slots:"{ icon?, label?, note?, value?, inside?, startLabel?, endLabel?, default? }",class:"string",style:"object"},slots:{icon:"Icon before the label",label:"Main content",note:"Secondary content",value:"External value on the right",inside:"Content inside the bar",startLabel:"Label on the left of the bar",endLabel:"Label on the right of the bar",default:"Fallback content"},returns:"HTMLDivElement with imperative API: .set(), .setBuffer(), .inc(), .start(), .done(), .stop(), .reset(), .show(), .hide(), .destroy()",description:"Loading bar based on UI.Progress, mountable on body or a custom container, controllable via model or imperative API."});const wo=new Set(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]),tr=new Set(["soft","solid","outline"]),nr={success:"Success",warning:"Warning",danger:"Error",info:"Info",primary:"Notice",secondary:"Notice",light:"Notice",dark:"Notice"},sr={success:"check_circle",warning:"warning",danger:"error",info:"info",primary:"bolt",secondary:"notifications",light:"notifications",dark:"shield"},vo=t=>{const e=String(o(t)||"").trim().toLowerCase();return e?wo.has(e)?e:e==="top"?"top-right":e==="bottom"?"bottom-right":e==="left"?"bottom-left":e==="right"?"bottom-right":e==="center"?"bottom-center":"bottom-right":"bottom-right"},or=t=>{const e=String(o(t)||"").trim().toLowerCase();return tr.has(e)?e:"soft"},ir=(t,e)=>{const n=o(t);if(n===!1||n===null)return 0;if(n===!0||n===""||n===void 0)return e==="danger"?3500:2500;const s=Number(n);return Number.isFinite(s)&&s>=0?s:e==="danger"?3500:2500},Kt=(t={},e="")=>{var a,l,b,R,C,w,T,ee,K,re,H,j,Y,W;const n=ln(t)?{...t}:{message:t},s=mt(o(e)||o(n.type)||o(n.state)||o(n.color)||"info")||"info",i=ir((l=(a=n.timeout)!=null?a:n.duration)!=null?l:n.delay,s),c=(C=(R=(b=n.closable)!=null?b:n.dismissible)!=null?R:n.dismiss!=null)!=null?C:i===0,y=n.title===void 0?n.label===void 0?nr[s]:n.label:n.title;return{...n,type:s,state:s,title:y,message:(ee=(T=(w=n.message)!=null?w:n.content)!=null?T:n.text)!=null?ee:null,description:(H=(re=(K=n.description)!=null?K:n.subtitle)!=null?re:n.note)!=null?H:null,meta:(Y=(j=n.meta)!=null?j:n.caption)!=null?Y:null,body:(W=n.body)!=null?W:null,timeout:i,closable:!!c,dismissLabel:n.dismissLabel||n.closeLabel||"Chiudi notifica",position:vo(n.position),variant:or(n.variant),slots:n.slots||{},role:n.role||(s==="danger"||s==="warning"?"alert":"status")}},So=(t,e="",n="")=>{if(!t.length)return Kt(n?{type:e,title:n}:{type:e});if(ln(t[0])){const{props:a,children:l}=JSswift.uiNormalizeArgs(t),b={...a};return!b.type&&!b.state&&!b.color&&e&&(b.type=e),b.title==null&&n&&(b.title=n),l.length&&(b.message==null&&b.description==null&&b.body==null&&l.length===1?b.message=l[0]:b.body==null&&(b.body=l.length===1?l[0]:l)),Kt(b,e)}const[s,i,c]=t;let y={};return ln(i)?y={...i,message:s}:ln(c)?y={...c,message:s,title:i}:y={message:s,title:i},e&&!y.type&&!y.state&&!y.color&&(y.type=e),y.title==null&&n&&(y.title=n),Kt(y,e)},Rt=(t,e)=>(...n)=>{var s,i;return(i=(s=je.services.notify)==null?void 0:s.show)==null?void 0:i.call(s,So(n,t,e))},Gn=(t,e,n)=>{if(t===!1)return!1;if(typeof t=="function"){const s=t();return Gn(s,e,n)}return ln(t)?t:t!=null?{message:t,title:n}:{message:e,title:n}};v.Notify=(...t)=>{var e,n;return(n=(e=je.services.notify)==null?void 0:e.show)==null?void 0:n.call(e,So(t))},v.Notify.show=v.Notify,v.Notify.success=Rt("success","Success"),v.Notify.error=Rt("danger","Error"),v.Notify.warning=Rt("warning","Warning"),v.Notify.info=Rt("info","Info"),v.Notify.primary=Rt("primary","Notice"),v.Notify.secondary=Rt("secondary","Notice"),v.Notify.remove=t=>{var e,n;return(n=(e=je.services.notify)==null?void 0:e.remove)==null?void 0:n.call(e,t)},v.Notify.clear=()=>{var t,e;return(e=(t=je.services.notify)==null?void 0:t.clear)==null?void 0:e.call(t)},v.Notify.update=(t,e={})=>{var n,s;return(s=(n=je.services.notify)==null?void 0:n.update)==null?void 0:s.call(n,t,e)},v.Notify.promise=async(t,e={})=>{var i,c,y,a,l,b,R,C,w,T,ee,K,re,H;const n=e.loading===!1?!1:Gn(typeof e.loading=="function"?()=>e.loading():e.loading,"Operazione in corso...","In corso"),s=n===!1?null:(c=(i=je.services.notify)==null?void 0:i.show)==null?void 0:c.call(i,Kt({type:"info",timeout:0,closable:!1,...n},"info"));try{const Y=await(typeof t=="function"?t():t),W=Gn(typeof e.success=="function"?()=>e.success(Y):e.success,"Operazione completata con successo.","Completato");return W!==!1?s!=null?(a=(y=je.services.notify)==null?void 0:y.update)==null||a.call(y,s,Kt(W,"success")):(b=(l=je.services.notify)==null?void 0:l.show)==null||b.call(l,Kt(W,"success")):s!=null&&((C=(R=je.services.notify)==null?void 0:R.remove)==null||C.call(R,s)),Y}catch(j){const Y=Gn(typeof e.error=="function"?()=>e.error(j):e.error,(j==null?void 0:j.message)||"Operazione fallita.","Errore");throw Y!==!1?s!=null?(T=(w=je.services.notify)==null?void 0:w.update)==null||T.call(w,s,Kt(Y,"danger")):(K=(ee=je.services.notify)==null?void 0:ee.show)==null||K.call(ee,Kt(Y,"danger")):s!=null&&((H=(re=je.services.notify)==null?void 0:re.remove)==null||H.call(re,s)),j}},(Ci=JSswift.isDev)!=null&&Ci.call(JSswift)&&(v.meta=v.meta||{},v.meta.Notify={signature:"UI.Notify(message, title?, opts?) | UI.Notify(opts, ...children)",props:{id:"string",type:"success|warning|danger|error|info|primary|secondary|light|dark",state:"Alias of type",color:"Alias of type",title:"String|Node|Function|Array|false",message:"String|Node|Function|Array",description:"String|Node|Function|Array",meta:"String|Node|Function|Array",body:"Node|Function|Array",icon:"String|Node|Function|Array|false",actions:"Node|Function|Array",dismiss:"Node|Function|Array",timeout:"number|false",duration:"Alias of timeout",closable:"boolean",dismissLabel:"string",position:"top-left|top-center|top-right|bottom-left|bottom-center|bottom-right",variant:"soft|solid|outline",slots:"{ icon?, title?, message?, description?, meta?, actions?, dismiss?, default? }",class:"string",style:"object"},slots:{icon:"Leading visual/icon content",title:"Toast title content",message:"Primary message content",description:"Secondary/supporting text",meta:"Meta info or badges",actions:"Actions area content",dismiss:"Custom dismiss control",default:"Extra body content under the message"},methods:{show:"Alias of UI.Notify(...)",success:"UI.Notify.success(message|opts, title?)",error:"UI.Notify.error(message|opts, title?)",warning:"UI.Notify.warning(message|opts, title?)",info:"UI.Notify.info(message|opts, title?)",update:"UI.Notify.update(id, patch)",remove:"UI.Notify.remove(id)",clear:"UI.Notify.clear()",promise:"UI.Notify.promise(promise|fn, { loading?, success?, error? })"},returns:"string|null (toast id)",description:"Standardized notify service with structured payloads, semantic shortcuts, update/remove/clear, and promise support."}),v.Header=(...t)=>{var x,p,P,U,G,de,A;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i={...e};Yt(i);const c=u=>Object.prototype.hasOwnProperty.call(e,u),y=(x=e.drawerStateKey)!=null?x:Xt;y&&(Xt=y,Et=tn(y));const a=()=>tn(y),l=()=>Wt(!0,y),b=()=>Wt(!1,y),R=()=>Wt(!a(),y),C={props:e,stateKey:y,isDrawerOpen:a,openDrawer:l,closeDrawer:b,toggleDrawer:R,toggleAside:R},w=(u,k)=>{if(!(k==null||k===!1)){if(Array.isArray(k)){k.forEach(I=>w(u,I));return}if(k!=null&&k.nodeType){u.appendChild(k);return}u.appendChild(document.createTextNode(String(k)))}},T=(u,k,I=B=>B)=>{const B=JSswift.ui.getSlot(s,u);if(B!=null)return E(s,u,C,null);if(typeof k=="function"){const pe=new Set(["eyebrow","title","subtitle"]),Se=_[pe.has(u)?"span":"div"]({class:`cms-header-slot-${u}`});return JSswift.reactive.effect(()=>{const ye=I(k(C)),V=rn(JSswift.ui.slot(ye));Se.replaceChildren(),Array.isArray(V)?V.forEach(D=>w(Se,D)):w(Se,V)},`UI.Header:${u}`),[Se]}return E(s,u,C,I(k))},ee=(u,k="icon",I=e.iconSize||e.size||"md")=>u==null||u===!1?null:typeof u=="string"?v.Icon({name:u,size:I}):JSswift.ui.slot(u,{as:k}),K=u=>{var I,B;const k=u?(I=e.drawerOpenIcon)!=null?I:"\u2715":(B=e.drawerCloseIcon)!=null?B:"\u2630";return k==null||k===!1?null:typeof k=="string"?k:JSswift.ui.slot(k,{as:u?"drawerOpenIcon":"drawerCloseIcon"})},re=_.span({class:"cms-header-toggle-icon"}),H=u=>{const k=E(null,"default",C,K(u));re.replaceChildren(...k.length?k:[""])};H(a());const j=v.Btn({class:"cms-header-toggle",outline:!0,size:(P=(p=e.toggleSize)!=null?p:e.size)!=null?P:"sm",onClick:R,"aria-label":e.toggleLabel||"Toggle navigation"},re);e.left==null&&e.left!==!1&&!JSswift.ui.getSlot(s,"left")&&go.add({update:H});const Y=e.left===!1?null:e.left!=null?e.left:j,W=c("title")?e.title:(U=e.label)!=null?U:"App",ie=(de=(G=e.subtitle)!=null?G:e.description)!=null?de:"",ge=c("right")?e.right:e.end,ce=c("content")?e.content:c("body")?e.body:n!=null&&n.length?n:null,le=[...T("left",Y),...T("start",null)],oe=T("icon",e.icon,ee),ne=T("eyebrow",(A=e.eyebrow)!=null?A:e.kicker),J=T("title",W),Z=T("subtitle",ie),X=T("meta",e.meta),ue=(()=>{const u=T("content",null);return u.length?u:T("default",ce)})(),F=[...T("center",null),...T("body",null)],f=[...T("right",ge),...T("end",null)],m=T("actions",e.actions),g=_.div({class:ae(["cms-header-body",e.bodyClass,e.centerClass])},_.div({class:"cms-header-heading"},oe.length?_.div({class:"cms-header-icon"},...oe):null,_.div({class:"cms-header-copy"},ne.length?_.div({class:ae(["cms-header-eyebrow",e.eyebrowClass])},...ne):null,J.length?_.div({class:ae(["cms-header-title",e.titleClass])},...J):null,Z.length?_.div({class:ae(["cms-header-subtitle",e.subtitleClass])},...Z):null,ue.length?_.div({class:ae(["cms-header-content",e.contentClass])},...ue):null),X.length?_.div({class:ae(["cms-header-meta",e.metaClass])},...X):null)),O=[...f,...m.length?[_.div({class:ae(["cms-header-actions",e.actionsClass])},...m)]:[]],Q=JSswift.omit(i,["actions","actionsClass","body","bodyClass","centerClass","content","contentClass","description","divider","drawerCloseIcon","drawerOpenIcon","drawerStateKey","elevated","end","eyebrow","eyebrowClass","icon","iconSize","kicker","label","left","meta","metaClass","right","slots","stack","sticky","subtitle","subtitleClass","title","titleClass","toggleLabel","toggleSize","gap","minHeight","startClass","endClass"]);Q.class=ae(["cms-panel","cms-header","cms-singularity",me(e.sticky!==!1,"sticky"),me(e.stack,"stack"),me(e.elevated,"elevated"),me(e.divider!==!1,"divider"),i.class]),Q.style={...i.style||{}},e.gap!=null&&(Q.style["--cms-header-gap"]=$e(o(e.gap))),e.minHeight!=null&&(Q.style.minHeight=$e(o(e.minHeight)));const r=_.div(Q,...le.length?[_.div({class:ae(["cms-header-start",e.startClass])},...le)]:[],_.div({class:"cms-header-main"},...F.length?[_.div({class:ae(["cms-header-body",e.bodyClass,e.centerClass])},...F)]:[g],...O.length?[_.div({class:ae(["cms-header-end",e.endClass])},...O)]:[]));return Ke(r,e),r},(xi=JSswift.isDev)!=null&&xi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Header={signature:"UI.Header(...children) | UI.Header(props, ...children)",props:{title:"String|Node|Function|Array",subtitle:"String|Node|Function|Array",eyebrow:"String|Node|Function|Array",content:"Node|Function|Array",meta:"Node|Function|Array",icon:"String|Node|Function|Array",left:"Node|Function|Array|false",right:"Node|Function|Array",actions:"Node|Function|Array",drawerOpenIcon:"string|Node",drawerCloseIcon:"string|Node",drawerStateKey:"string",sticky:"boolean",stack:"boolean",dense:"boolean",elevated:"boolean",divider:"boolean",gap:"string|number",minHeight:"string|number",slots:"{ left?, start?, right?, end?, center?, body?, icon?, eyebrow?, title?, subtitle?, meta?, content?, actions? }",class:"string",style:"object"},slots:{left:"Left area, falls back to the drawer toggle",start:"Alias/addon for the left area",right:"Main right area",end:"Alias/addon for the right area",center:"Full override for the central body",body:"Alias of center",icon:"Leading icon",eyebrow:"Eyebrow / kicker",title:"Title",subtitle:"Subtitle",meta:"Meta info next to the central content",content:"Extra content below the subtitle",actions:"Actions grouped in the right area"},returns:"HTMLDivElement",description:"Structured header with start/body/end regions, integrated drawer toggle, metadata, and composable slots."}),v.Drawer=(...t)=>{var be,Ce,he,Le,Ae,z,we,M,N,S;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i={...e},c=d=>Object.prototype.hasOwnProperty.call(e,d),y=(be=e.stateKey)!=null?be:Xt;y&&(Xt=y,Et=tn(y));const a=()=>tn(y),l=()=>Wt(!0,y),b=()=>Wt(!1,y),R=()=>Wt(!a(),y),C={props:e,stateKey:y,isDrawerOpen:a,openDrawer:l,closeDrawer:b,toggleDrawer:R,toggleAside:R},w=JSswift==null?void 0:JSswift.store,T=!!(w!=null&&w.get&&(w!=null&&w.set)),ee=`${y}:groups`,K=`${y}:active`;let re=T?w.get(ee,{})||{}:{},H=T&&(Ce=w.get(K,null))!=null?Ce:null;const j=new Map,Y=new Map,W=d=>{const L=o(d);return L==null||L===!1?[]:Array.isArray(L)?L.flat(1/0):[L]},ie=(d,L,fe=C)=>{const Fe=Array.isArray(d)?d:[d];for(const Te of Fe)if(JSswift.ui.getSlot(s,Te)!=null)return E(s,Te,fe,L);return L==null?[]:E(null,"default",fe,o(L))},ge=d=>(Array.isArray(d)?d:[d]).some(fe=>JSswift.ui.getSlot(s,fe)!=null),ce=d=>{if(typeof o(d.external)=="boolean")return!!o(d.external);const L=o(d.href||d.to||d.link||"");return/^(https?:)?\/\//.test(L)},le=(he=e.closeOnSelect)!=null?he:!0,oe=d=>!!le&&o(d.keepOpen)!==!0,ne=(Ae=(Le=e.itemIconSize)!=null?Le:e.size)!=null?Ae:"md",J=(z=e.groupOpenIcon)!=null?z:"arrow_drop_up",Z=(we=e.groupCloseIcon)!=null?we:"arrow_drop_down",X=d=>!!d&&H===d,ue=d=>!!d&&!!H&&(H===d||H.startsWith(`${d}::`)),F=()=>{j.forEach(({el:d,baseActive:L},fe)=>{const Fe=!!L||X(fe);d.classList.toggle("active",Fe),Fe?d.setAttribute("aria-current","page"):d.removeAttribute("aria-current")}),Y.forEach(({wrap:d,toggle:L,baseActive:fe},Fe)=>{const Te=!!fe||ue(Fe);d.classList.toggle("active",Te),L.classList.toggle("active",Te)})},f=d=>{H=d||null,T&&w.set(K,H),F()},m=(d,L)=>{if(o(d.active)!=null)return!!o(d.active);if(o(d.current)!=null)return!!o(d.current);if(!L||ce(d))return!1;try{if(L.startsWith("#"))return window.location.hash===L;const fe=`${window.location.pathname}${window.location.search}${window.location.hash}`;return L===fe||L===window.location.pathname}catch(fe){return!1}},g=(d,L,fe)=>m(d,L)||X(fe),O=(d=[],L=0,fe=[])=>W(d).some((Fe,Te)=>{var qe,Ze,Qe,Ee,Be;const $=o(Fe);if(!$||typeof $!="object"||$.nodeType)return!1;const _e=o($.href||$.to||$.link||""),Re=(Be=o((Ee=(Qe=(Ze=(qe=$.label)!=null?qe:$.title)!=null?Ze:$.text)!=null?Qe:_e)!=null?Ee:null))!=null?Be:`item-${L}-${Te}`,Pe=p($,Re,L,Te),De=fe.concat(Pe).join("::");if(g($,_e,De))return!0;const We=$.items||$.children||$.sub;return O(We,L+1,fe.concat(Pe))}),Q=(d,L={})=>{var Te;const fe=o(d);if(fe==null||fe===!1)return[];const Fe=typeof fe=="string"?v.Icon({name:fe,size:(Te=L.iconSize)!=null?Te:ne}):JSswift.ui.slot(fe,{...L,as:"icon"});return E(null,"default",L,Fe)},r=(d,L,fe={})=>{const Fe=Q(d,fe);return Fe.length?[_.span({class:ae(["cms-drawer-item-icon",L])},...Fe)]:[]},x=d=>{const L=o(d.iconPosition)||"left",fe=Object.prototype.hasOwnProperty.call(d,"iconLeft")?d.iconLeft:L!=="right"?d.icon:null,Fe=Object.prototype.hasOwnProperty.call(d,"iconRight")?d.iconRight:L==="right"?d.icon:null;return{left:fe,right:Fe}},p=(d,L,fe,Fe)=>o(d.key||d.id||d.to||d.href||L||`item-${fe}-${Fe}`),P=(d,L)=>T&&Object.prototype.hasOwnProperty.call(re,d)?!!re[d]:L,U=(d,L)=>{T&&(re={...re,[d]:!!L},w.set(ee,re))},G=()=>{const d={...C,area:"header"},L=ie(["headerIcon","icon"],e.icon,d),fe=ie(["eyebrow"],e.eyebrow,d),Fe=ie(["title"],e.title,d),Te=ie(["subtitle"],e.subtitle,d),$=ie(["meta"],e.meta,d),_e=ie(["content"],e.content,d),Re=ie(["actions"],e.actions,d),Pe=c("header")?E(null,"default",d,o(e.header)):[],De=L.length||fe.length||Fe.length||Te.length||$.length||_e.length||Re.length;return!De&&!Pe.length?[]:De?[_.div({class:ae(["cms-drawer-header",e.headerClass])},...L.length?[_.div({class:"cms-drawer-header-icon"},...L)]:[],_.div({class:"cms-drawer-header-body"},...fe.length?[_.div({class:"cms-drawer-header-eyebrow"},...fe)]:[],...Fe.length?[_.div({class:"cms-drawer-header-title"},...Fe)]:[],...Te.length?[_.div({class:"cms-drawer-header-subtitle"},...Te)]:[],...$.length?[_.div({class:"cms-drawer-header-meta"},...$)]:[],..._e.length?[_.div({class:"cms-drawer-header-content"},..._e)]:[],...Pe.length?[_.div({class:"cms-drawer-header-extra"},...Pe)]:[]),...Re.length?[_.div({class:"cms-drawer-header-actions"},...Re)]:[])]:Pe},de=(d,L,fe)=>{var $,_e;return!((($=d.onClick)==null?void 0:$.call(d,fe,L))===!1||fe!=null&&fe.defaultPrevented||((_e=e.onSelect)==null?void 0:_e.call(e,d,L,fe))===!1||fe!=null&&fe.defaultPrevented)},A=(d,L,fe={})=>{const Fe=L.hasChildren?"group":"item",Te=E(s,`${Fe}Label`,L,L.label),$=E(s,`${Fe}Note`,L,L.note),_e=E(s,`${Fe}Badge`,L,L.badge),Re=E(s,`${Fe}Aside`,L,L.aside),Pe=E(s,`${Fe}Content`,L,L.content),De=[];return(Te.length||$.length||_e.length||Re.length)&&De.push(_.div({class:"cms-drawer-item-top"},_.div({class:"cms-drawer-item-copy"},...Te.length?[_.div({class:"cms-drawer-item-label"},...Te)]:[],...$.length?[_.div({class:"cms-drawer-item-note"},...$)]:[]),..._e.length||Re.length?[_.div({class:"cms-drawer-item-meta"},..._e.length?[_.div({class:"cms-drawer-item-badge"},..._e)]:[],...Re.length?[_.div({class:"cms-drawer-item-aside"},...Re)]:[])]:[])),Pe.length&&De.push(_.div({class:"cms-drawer-item-content"},...Pe)),[...fe.start||[],...r(L.iconLeft,"left",L),...De.length?[_.div({class:"cms-drawer-item-main"},...De)]:[],...r(L.iconRight,"right",L),...fe.end||[]]},u=(d=[],L=0,fe=[])=>W(d).map((Fe,Te)=>{var sn,ze,Ve,et,ct,gt,pt,Ct,yt,h,se;const $=o(Fe);if($==null||$===!1)return null;if($.nodeType||typeof $!="object"||Array.isArray($))return _.div({class:"cms-drawer-custom","data-level":String(L)},...E(null,"default",{...C,item:$,level:L,index:Te,path:fe},$));if(o($.hidden)===!0||o($.visible)===!1)return null;const _e=W($.items||$.children||$.sub),Re=o($.href||$.to||$.link||null),Pe=o((et=(Ve=(ze=(sn=$.label)!=null?sn:$.title)!=null?ze:$.text)!=null?Ve:Re)!=null?et:null),De=Pe!=null?Pe:`item-${L}-${Te}`,We=o((pt=(gt=(ct=$.note)!=null?ct:$.subtitle)!=null?gt:$.description)!=null?pt:null),qe=o((Ct=$.badge)!=null?Ct:null),Ze=o((h=(yt=$.aside)!=null?yt:$.meta)!=null?h:null),Qe=o((se=$.content)!=null?se:null),Ee=p($,De,L,Te),Be=fe.concat(Ee).join("::"),{left:tt,right:nt}=x($),dt=mt(o($.state)||o($.color)||""),ut=m($,Re),bt=ut||X(Be),ot=!!o($.disabled),ft={...C,item:$,index:Te,level:L,path:fe,label:De,note:We,badge:qe,aside:Ze,content:Qe,itemStateKey:Be,iconLeft:tt,iconRight:nt,iconSize:o($.iconSize)||ne,active:bt,disabled:ot,hasChildren:!1},vt=o($.divider)===!0||$.type==="divider"||$.type==="separator",At=o($.section)===!0||$.type==="section"||$.type==="heading"||$.type==="label",at=$.type==="content"||$.type==="custom"||!Re&&!_e.length&&!o($.button)&&$.type!=="button"&&Pe==null&&Qe!=null;if(vt)return _.div({class:ae(["cms-drawer-separator",$.class]),"data-level":String(L)});if(At){const ve=E(s,"sectionLabel",ft,De||Qe);return _.div({class:ae(["cms-drawer-section-label",$.class]),"data-level":String(L)},...ve)}if(at){const ve=E(s,"item",ft,Qe!=null?Qe:De);return _.div({class:ae(["cms-drawer-custom",dt?`cms-drawer-tone-${dt}`:"",$.class]),style:$.style,"data-level":String(L)},...ve)}if(_e.length){const ve=ut||O(_e,L+1,fe.concat(Ee)),Me=ve||ue(Be);let Je=P(Be,!!o($.expanded)||!!o($.open)||Me);const Oe=_.span({class:"cms-drawer-group-icon"}),He={...ft,active:Me,hasChildren:!0,isOpen:()=>Je,setOpen:Ft=>zt(Ft),toggle:()=>zt(!Je)},Xe=()=>{var fn,mn;const Ft=Je?(fn=$.openIcon)!=null?fn:J:(mn=$.closeIcon)!=null?mn:Z,on=o(Je?$.iconSidePosition||$.openIconSide||$.openIconPosition||"right":$.iconSidePosition||$.closeIconSide||$.closeIconPosition||"right")==="left"?"left":"right";Oe.innerHTML="",Oe.className=`cms-drawer-group-icon ${on}`,Q(Ft,{...He,as:"toggleIcon"}).forEach(Sn=>Oe.appendChild(Sn))},it=_.button({type:"button",class:ae(["cms-drawer-group-toggle","cms-drawer-entry",Je?"open":"",Me?"active":"",ot?"is-disabled":"",dt?`cms-drawer-tone-${dt}`:"",$.class]),style:$.style,"data-level":String(L),"aria-expanded":String(Je),"aria-disabled":ot?"true":null,onClick:Ft=>{if(ot){Ft.preventDefault();return}f(Be),zt(!Je)}},...A($,He,{start:o($.iconSidePosition||$.openIconSide||$.closeIconSide||$.openIconPosition||$.closeIconPosition||"right")==="left"?[Oe]:[],end:o($.iconSidePosition||$.openIconSide||$.closeIconSide||$.openIconPosition||$.closeIconPosition||"right")==="right"?[Oe]:[]})),ht=E(s,"group",He,null),xt=_.div({class:"cms-drawer-group-items"},...u(_e,L+1,fe.concat(Ee))),$t=_.div({class:ae(["cms-drawer-group",Je?"open":"",Me?"active":"",dt?`cms-drawer-tone-${dt}`:""]),"data-level":String(L)},...ht.length?ht:[it],xt),zt=Ft=>{Je=!!Ft,$t.classList.toggle("open",Je),it.classList.toggle("open",Je),it.setAttribute("aria-expanded",String(Je)),Xe(),U(Be,Je)};return Y.set(Be,{wrap:$t,toggle:it,baseActive:ve}),Xe(),$t}const Vt=E(s,"item",ft,null),Jt=o($.button)===!0||$.type==="button"||!Re&&typeof $.onClick=="function",wt={class:ae(["cms-drawer-entry",Jt?"cms-drawer-btn":"cms-drawer-link",bt?"active":"",ot?"is-disabled":"",dt?`cms-drawer-tone-${dt}`:"",$.class]),style:$.style,"data-level":String(L),"aria-current":bt?"page":null,"aria-disabled":ot?"true":null},qt=Vt.length?Vt:A($,ft);if(Jt){const ve=_.button({...wt,type:$.buttonType||"button",disabled:ot,onClick:Me=>{if(ot){Me.preventDefault();return}de($,ft,Me)&&(f(Be),oe($)&&b())}},...qt);return j.set(Be,{el:ve,baseActive:ut}),ve}const St=ce($),dn=St?o($.target)||"_blank":o($.target),un=St?o($.rel)||"noopener noreferrer":o($.rel),nn=_.a({...wt,href:Re||"#",target:dn||null,rel:un||null,tabIndex:ot?-1:null,onClick:ve=>{var Me;if(ot){ve.preventDefault();return}de($,ft,ve)&&(!St&&$.to&&((Me=je.router)!=null&&Me.navigate)&&(ve.preventDefault(),je.router.navigate($.to)),oe($)&&b())}},...qt);return j.set(Be,{el:nn,baseActive:ut}),nn}).filter(Boolean),k=ie(["before","beforeItems"],(M=e.before)!=null?M:e.beforeItems),I=ge(["body"])?ie(["body"],null):[],B=u(e.items||[]),pe=ie(["default"],n),Se=ie(["after","afterItems"],(N=e.after)!=null?N:e.afterItems),ye=I.length?I:[...k,...B,...pe,...Se],V=c("empty")||c("emptyText")?(S=e.empty)!=null?S:_.div({class:ae(["cms-drawer-empty",e.emptyClass])},e.emptyText||"Nessun contenuto"):_.div({class:ae(["cms-drawer-empty",e.emptyClass])},"Nessun contenuto"),D=ie(["header"],G()),q=ie(["footer"],e.footer),Ne=ye.length?ye:ie(["empty"],V),ke=JSswift.omit(i,["items","header","footer","before","beforeItems","after","afterItems","title","subtitle","eyebrow","icon","content","meta","actions","empty","emptyText","closeOnSelect","groupOpenIcon","groupCloseIcon","stateKey","sticky","slots","headerClass","bodyClass","footerClass","emptyClass","itemIconSize","gap","indent","padding","minHeight","maxHeight","width","onSelect"]);ke.class=ae(["cms-panel","cms-drawer",Et?"open":"",me(e.sticky,"sticky"),i.class]),ke.style={...i.style||{}},e.gap!=null&&(ke.style["--cms-drawer-gap"]=$e(o(e.gap))),e.indent!=null&&(ke.style["--cms-drawer-indent"]=$e(o(e.indent))),e.padding!=null&&(ke.style["--cms-drawer-padding"]=$e(o(e.padding))),e.width!=null&&(ke.style.width=$e(o(e.width))),e.minHeight!=null&&(ke.style.minHeight=$e(o(e.minHeight))),e.maxHeight!=null&&(ke.style.maxHeight=$e(o(e.maxHeight)));const te=_.div(ke,...D.length?D:[],_.div({class:ae(["cms-drawer-body",e.bodyClass])},...Ne),...q.length?[_.div({class:ae(["cms-drawer-footer",e.footerClass])},...q)]:[]),xe=hs.get(y)||new Set;return xe.add(te),hs.set(y,xe),Wt(Et,y),te.isDrawerOpen=a,te.openDrawer=l,te.closeDrawer=b,te.toggleDrawer=R,te.setActiveItem=f,Ke(te,e),F(),te},(Ni=JSswift.isDev)!=null&&Ni.call(JSswift)&&(v.meta=v.meta||{},v.meta.Drawer={signature:"UI.Drawer(props)",props:{items:"Array",header:"Node|Function|Array",footer:"Node|Function|Array",before:"Node|Function|Array",after:"Node|Function|Array",title:"String|Node|Function|Array",subtitle:"String|Node|Function|Array",eyebrow:"String|Node|Function|Array",icon:"String|Node|Function|Array",content:"Node|Function|Array",meta:"Node|Function|Array",actions:"Node|Function|Array",empty:"Node|Function|Array",emptyText:"string",stateKey:"string",closeOnSelect:"boolean",groupOpenIcon:"String|Node|Function|Array",groupCloseIcon:"String|Node|Function|Array",itemIconSize:"string|number",gap:"string|number",indent:"string|number",padding:"string|number",width:"string|number",minHeight:"string|number",maxHeight:"string|number",onSelect:"function(item, ctx, event)",sticky:"boolean",slots:"{ header?, body?, footer?, before?, after?, empty?, item?, itemLabel?, itemNote?, itemBadge?, itemAside?, itemContent?, group?, groupLabel?, groupNote?, groupBadge?, groupAside?, groupContent?, sectionLabel? }",class:"string",style:"object"},slots:{header:"Drawer header, full override",body:"Full body override",footer:"Drawer footer",before:"Content before the item list",after:"Content after the item list",empty:"Empty state when there is no content",item:"Full override for a simple item",itemLabel:"Item label (ctx: { item, label, note, badge, aside, content })",itemNote:"Item note/subtitle",itemBadge:"Item badge",itemAside:"Item aside/meta",itemContent:"Extra item content",group:"Full override for a group header (ctx includes toggle/isOpen)",groupLabel:"Group label",groupNote:"Group note",groupBadge:"Group badge",groupAside:"Group aside/meta",groupContent:"Extra group content",sectionLabel:"Label for section/heading items"},returns:"HTMLDivElement with openDrawer/closeDrawer/toggleDrawer/isDrawerOpen methods",description:"Structured, backward-compatible drawer with header/footer, groups, extended slots, empty state, and persistent state."}),v.Page=(...t)=>{var g,O,Q,r;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i={...e},c=(x,p)=>{var P;return!!(x&&x.nodeType===1&&((P=x.classList)!=null&&P.contains(`cms-page-${p}`)))},y=x=>x==null?null:typeof x=="string"?v.Icon({name:x,size:e.iconSize||e.size||"xl"}):JSswift.ui.slot(x,{as:"icon"}),a={dense:!!o(e.dense),flat:!!o(e.flat),centered:!!o(e.centered),narrow:!!o(e.narrow)},l=(x,p)=>{if(!(p==null||p===!1)){if(Array.isArray(p)){p.forEach(P=>l(x,P));return}if(p!=null&&p.nodeType){x.appendChild(p);return}x.appendChild(document.createTextNode(String(p)))}},b=(x,p,P=U=>U)=>{const U=JSswift.ui.getSlot(s,x);if(U!=null)return E(s,x,a,null);if(typeof p=="function"){const G=new Set(["eyebrow","title","subtitle"]),de=_[G.has(x)?"span":"div"]({class:`cms-page-slot-${x}`});return JSswift.reactive.effect(()=>{const A=P(p(a)),u=rn(JSswift.ui.slot(A));de.replaceChildren(),Array.isArray(u)?u.forEach(k=>l(de,k)):l(de,u)},`UI.Page:${x}`),[de]}return E(s,x,a,P(p))},R=E(s,"default",a,n!=null&&n.length?n:[]),C={hero:[],header:[],body:[],footer:[],actions:[]},w=[];R.forEach(x=>{c(x,"hero")?C.hero.push(x):c(x,"header")?C.header.push(x):c(x,"body")?C.body.push(x):c(x,"footer")?C.footer.push(x):c(x,"actions")?C.actions.push(x):w.push(x)});const T=b("icon",e.icon,y),ee=b("hero",(g=e.hero)!=null?g:e.banner),K=b("eyebrow",(O=e.eyebrow)!=null?O:e.kicker),re=b("title",e.title),H=b("subtitle",(Q=e.subtitle)!=null?Q:e.description),j=b("header",e.header),Y=b("aside",e.aside),W=b("body",(r=e.body)!=null?r:e.content),ie=b("footer",e.footer),ge=b("actions",e.actions),ce=ee.length?_.div({class:ae(["cms-page-hero",e.heroClass])},...ee):null,le=T.length||K.length||re.length||H.length||j.length||Y.length,oe=le?_.div({class:ae(["cms-page-header",e.headerClass])},_.div({class:"cms-page-head"},T.length?_.div({class:ae(["cms-page-icon",e.iconClass])},...T):null,_.div({class:"cms-page-head-main"},K.length?_.div({class:ae(["cms-page-eyebrow",e.eyebrowClass])},...K):null,re.length?_.div({class:ae(["cms-page-title",e.titleClass])},...re):null,H.length?_.div({class:ae(["cms-page-subtitle",e.subtitleClass])},...H):null,j.length?_.div({class:ae(["cms-page-header-content",e.headerContentClass])},...j):null),Y.length?_.div({class:ae(["cms-page-aside",e.asideClass])},...Y):null)):null,ne=[...W,...w],J=ne.length?_.div({class:ae(["cms-page-body",e.bodyClass])},...ne):null,Z=[...ge,...C.actions],X=ie.length||Z.length?_.div({class:ae(["cms-page-footer",e.footerClass])},...ie,Z.length?_.div({class:"cms-page-actions"},...Z):null):null,ue=!!(ee.length||C.hero.length),F=!!(le||C.header.length),f=JSswift.omit(i,["actions","aside","asideClass","banner","body","bodyClass","centered","content","dense","description","eyebrow","eyebrowClass","flat","footer","footerClass","gap","header","headerClass","headerContentClass","headerGap","hero","heroClass","heroPadding","icon","iconClass","iconSize","kicker","maxWidth","minHeight","narrow","padding","size","slots","subtitle","subtitleClass","title","titleClass"]);f.class=ae(["cms-panel","cms-page",me(e.dense,"dense"),me(e.flat,"cms-page-flat"),me(e.centered,"cms-page-centered"),me(e.narrow,"cms-page-narrow"),me(ue,"cms-page-has-hero"),me(F,"cms-page-has-header"),i.class]),f.style={...i.style||{}},(e.gap!=null||rt(e.gap))&&(f.style["--cms-page-gap"]=Ie(e.gap,$e)),(e.padding!=null||rt(e.padding))&&(f.style["--cms-page-padding"]=Ie(e.padding,$e)),(e.maxWidth!=null||rt(e.maxWidth))&&(f.style["--cms-page-max-width"]=Ie(e.maxWidth,$e)),(e.minHeight!=null||rt(e.minHeight))&&(f.style["--cms-page-min-height"]=Ie(e.minHeight,$e)),(e.headerGap!=null||rt(e.headerGap))&&(f.style["--cms-page-header-gap"]=Ie(e.headerGap,$e)),(e.heroPadding!=null||rt(e.heroPadding))&&(f.style["--cms-page-hero-padding"]=Ie(e.heroPadding,$e));const m=_.div(f,ce,...C.hero,oe,...C.header,J,...C.body,X,...C.footer);return Ke(m,e),m},(Ai=JSswift.isDev)!=null&&Ai.call(JSswift)&&(v.meta=v.meta||{},v.meta.Page={signature:"UI.Page(...children) | UI.Page(props, ...children)",props:{hero:"Node|Function|Array",icon:"String|Node|Function|Array",eyebrow:"String|Node|Function|Array",title:"String|Node|Function|Array",subtitle:"String|Node|Function|Array",header:"String|Node|Function|Array",aside:"Node|Function|Array",body:"Node|Function|Array",footer:"Node|Function|Array",actions:"Node|Function|Array",dense:"boolean",flat:"boolean",centered:"boolean",narrow:"boolean",gap:"string|number",padding:"string|number",maxWidth:"string|number",minHeight:"string|number",heroPadding:"string|number",headerGap:"string|number",slots:"{ hero?, icon?, eyebrow?, title?, subtitle?, header?, aside?, body?, footer?, actions?, default? }",class:"string",style:"object"},slots:{hero:"Top hero/banner area",icon:"Page icon/visual",eyebrow:"Eyebrow/kicker content",title:"Page title content",subtitle:"Page subtitle/description content",header:"Header support content under title",aside:"Top-right header content",body:"Structured body content",footer:"Footer meta/content",actions:"Footer actions content",default:"Fallback body content"},returns:"HTMLDivElement",description:"Structured page container with hero, header, body, footer, and configurable layout."}),v.AppShell=(...t)=>{var x,p;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=(P,U)=>!!P&&Object.prototype.hasOwnProperty.call(P,U),c=o(e.noDrawer)===!0||e.drawer===!1,y=o(e.reverse)===!0,a=o(e.stack)===!0,l=(p=(x=e.drawerStateKey)!=null?x:e.stateKey)!=null?p:Xt;l&&(Xt=l,Et=tn(l));const b={props:e,noDrawer:c,stateKey:l,isDrawerOpen:()=>tn(l),openDrawer:()=>Wt(!0,l),closeDrawer:()=>Wt(!1,l),toggleDrawer:()=>Wt(!tn(l),l)},R=e.headerProps&&typeof e.headerProps=="object"?{...e.headerProps}:{};let C=e.header;!i(e,"header")&&(Object.keys(R).length||i(e,"title")||i(e,"subtitle")||i(e,"left")||i(e,"right"))&&(!i(R,"title")&&i(e,"title")&&(R.title=e.title),!i(R,"subtitle")&&i(e,"subtitle")&&(R.subtitle=e.subtitle),!i(R,"left")&&i(e,"left")&&(R.left=e.left),!i(R,"right")&&i(e,"right")&&(R.right=e.right),i(R,"drawerStateKey")||(R.drawerStateKey=l),c&&!i(R,"left")&&(R.left=!1),C=v.Header(R));const w=e.drawerProps&&typeof e.drawerProps=="object"?{...e.drawerProps}:{},T=i(e,"drawerItems")?e.drawerItems:e.items,ee=i(e,"drawerHeader")?e.drawerHeader:void 0;let K=e.drawer;!i(e,"drawer")&&!c&&(Object.keys(w).length||T!=null||ee!=null)&&(!i(w,"items")&&T!=null&&(w.items=T),!i(w,"header")&&ee!=null&&(w.header=ee),i(w,"stateKey")||(w.stateKey=l),K=v.Drawer(w));const re=e.pageProps&&typeof e.pageProps=="object"?{...e.pageProps}:{},H=i(e,"content")?e.content:n,j=E(s,"default",b,H);let Y=e.page;!i(e,"page")&&(Object.keys(re).length||j.length)&&(Y=v.Page(re,...j));const W=e.footerProps&&typeof e.footerProps=="object"?{...e.footerProps}:{},ie=i(e,"footerContent")?e.footerContent:void 0;let ge=e.footer;!i(e,"footer")&&(Object.keys(W).length||ie!=null)&&(ge=v.Footer(W,...E(null,"default",b,ie)));const ce=E(s,"header",b,C),le=c?[]:E(s,"drawer",b,K),oe=E(s,"page",b,Y),ne=E(s,"footer",b,ge),J=ae(["cms-app","cms-app-shell",me(c,"no-drawer"),me(y,"is-reverse"),me(a,"is-stack"),me(e.flush,"is-flush"),me(e.divider,"is-divider"),e.class]),Z=JSswift.omit(e,["header","drawer","page","footer","content","title","subtitle","left","right","items","drawerItems","drawerHeader","headerProps","drawerProps","pageProps","footerProps","footerContent","noDrawer","reverse","stack","flush","divider","drawerStateKey","stateKey","drawerWidth","gap","padding","slots"]);Z.class=J,Z.style={...e.style||{}};const X=Ie(e.drawerWidth,$e);X!=null&&(Z.style["--cms-app-shell-drawer-width"]=X);const ue=Ie(e.gap,$e);ue!=null&&(Z.style["--cms-app-shell-gap"]=ue);const F=Ie(e.padding,$e);F!=null&&(Z.style["--cms-app-shell-padding"]=F);const f=ce.length?_.div({class:"cms-app-shell-header-slot"},...ce):null,m=le.length?_.div({class:"cms-app-shell-drawer-slot"},...le):null,g=oe.length?_.div({class:"cms-app-shell-page-slot"},...oe):null,O=ne.length?_.div({class:"cms-app-shell-footer-slot"},...ne):null,Q=y?[g,m]:[m,g],r=_.div(Z,...f?[f]:[],_.div({class:"cms-app-shell-body"},...Q.filter(Boolean)),...O?[O]:[]);return r.openDrawer=b.openDrawer,r.closeDrawer=b.closeDrawer,r.toggleDrawer=b.toggleDrawer,r.isDrawerOpen=b.isDrawerOpen,r.header=f,r.drawer=m,r.page=g,r.footer=O,Ke(r,e),r},(ki=JSswift.isDev)!=null&&ki.call(JSswift)&&(v.meta=v.meta||{},v.meta.AppShell={signature:"UI.AppShell(...children) | UI.AppShell(props, ...children)",props:{header:"Node|Function|Array|false",drawer:"Node|Function|Array|false",page:"Node|Function|Array|false",footer:"Node|Function|Array|false",title:"string|Node|Function|Array",subtitle:"string|Node|Function|Array",left:"Node|Function|Array|false",right:"Node|Function|Array",items:"Array",drawerItems:"Array",drawerHeader:"Node|Function|Array",content:"Node|Function|Array",headerProps:"object",drawerProps:"object",pageProps:"object",footerProps:"object",footerContent:"Node|Function|Array",noDrawer:"boolean",reverse:"boolean",stack:"boolean",flush:"boolean",divider:"boolean",drawerStateKey:"string",stateKey:"string",drawerWidth:"number|string",gap:"number|string",padding:"number|string",slots:"{ header?, drawer?, page?, footer?, default? }",class:"string",style:"object"},slots:{header:"Header content",drawer:"Drawer content",page:"Page content",footer:"Footer content",default:"Fallback page content"},returns:"HTMLDivElement con methods openDrawer/closeDrawer/toggleDrawer/isDrawerOpen",description:"Shell applicazione composabile con shortcut per Header/Drawer/Page/Footer e gestione drawer."}),v.Parallax=function(...e){var P,U;const{props:n,children:s}=JSswift.uiNormalizeArgs(e),i=n.slots||{},c={...n};c.color!=null&&c.textColor==null&&(c.textColor=c.color),delete c.color,Yt(c);const y=Ye(n.state,()=>{const G=mt(o(n.state));return G?`cms-state-${G}`:""}),a=G=>{if(G==null||G===!1||G==="")return"";const de=String(G);return Zt(de)?`var(--cms-${de})`:de},l=()=>{const G=o(n.background);if(G)return String(G);const de=o(n.image)||o(n.src)||"";if(!de)return"linear-gradient(120deg, #1b2c5a, #2f6d8f, #2a8f5c)";const A=String(de);return/^url\(/i.test(A)||/gradient\(/i.test(A)||/^var\(/i.test(A)?A:`url(${A})`},b=(G,de)=>{const A=Number(o(G));return Number.isFinite(A)?A:de},R={speed:()=>{var G;return(G=o(n.speed))!=null?G:.18},state:()=>o(n.state)||"",disabled:()=>!!o(n.disabled)},C=E(i,"badge",R,n.badge),w=E(i,"background",R,n.backgroundContent),T=E(i,"eyebrow",R,(P=n.eyebrow)!=null?P:n.kicker),ee=E(i,"title",R,n.title),K=E(i,"subtitle",R,n.subtitle),re=E(i,"header",R,n.header),H=E(i,"aside",R,n.aside),j=E(i,"media",R,n.media),Y=E(i,"content",R,(U=n.content)!=null?U:n.body),W=E(i,"default",R,s!=null&&s.length?s:[]),ie=E(i,"footer",R,n.footer),ge=E(i,"actions",R,n.actions),ce=[...Y,...W],le=C.length?_.div({class:ae(["cms-parallax-badge",n.badgeClass])},...C):null,oe=T.length||ee.length||K.length||re.length||H.length,ne=oe?_.div({class:ae(["cms-parallax-header",n.headerClass])},_.div({class:"cms-parallax-head"},_.div({class:"cms-parallax-head-main"},T.length?_.div({class:ae(["cms-parallax-eyebrow",n.eyebrowClass])},...T):null,ee.length?_.div({class:ae(["cms-parallax-title",n.titleClass])},...ee):null,K.length?_.div({class:ae(["cms-parallax-subtitle",n.subtitleClass])},...K):null,re.length?_.div({class:ae(["cms-parallax-header-content",n.headerContentClass])},...re):null),H.length?_.div({class:ae(["cms-parallax-aside",n.asideClass])},...H):null)):null,J=j.length?_.div({class:ae(["cms-parallax-media",n.mediaClass])},...j):null,Z=ce.length?_.div({class:ae(["cms-parallax-body",n.bodyClass])},...ce):null,X=ie.length||ge.length?_.div({class:ae(["cms-parallax-footer",n.footerClass])},ie.length?_.div({class:"cms-parallax-footer-content"},...ie):null,ge.length?_.div({class:"cms-parallax-actions"},...ge):null):null,ue=JSswift.omit(c,["actions","align","aside","asideClass","background","backgroundContent","backgroundContentClass","badge","badgeClass","bgClass","bgPosition","bgRepeat","bgSize","body","bodyClass","color","content","contentClass","contentMaxWidth","disabled","eyebrow","eyebrowClass","footer","footerClass","gap","header","headerClass","headerContentClass","height","image","imageAlt","imageClass","innerClass","justify","kicker","maxOffset","media","mediaClass","minHeight","overlay","padding","slots","speed","src","startTop","state","subtitle","subtitleClass","textColor","title","titleClass"]);ue.class=ae(["cms-parallax","cms-singularity",y,me(n.disabled,"cms-parallax-static"),me(le,"cms-parallax-has-badge"),me(oe,"cms-parallax-has-header"),c.class]),ue.style={...c.style||{}},n.height!=null&&(ue.style["--cms-parallax-height"]=Ie(n.height,$e)),n.minHeight!=null&&(ue.style["--cms-parallax-min-height"]=Ie(n.minHeight,$e)),n.padding!=null&&(ue.style["--cms-parallax-padding"]=Ie(n.padding,$e)),n.gap!=null&&(ue.style["--cms-parallax-gap"]=Ie(n.gap,$e)),n.contentMaxWidth!=null&&(ue.style["--cms-parallax-content-max-width"]=Ie(n.contentMaxWidth,$e)),n.justify!=null&&(ue.style["--cms-parallax-justify"]=Ie(n.justify)),n.align!=null&&(ue.style["--cms-parallax-align"]=Ie(n.align)),n.color!=null&&(ue.style["--cms-parallax-color"]=Ie(n.color,a)),n.overlay!=null&&(ue.style["--cms-parallax-overlay"]=Ie(n.overlay)),n.bgPosition!=null&&(ue.style["--cms-parallax-position"]=Ie(n.bgPosition)),n.bgSize!=null&&(ue.style["--cms-parallax-size"]=Ie(n.bgSize)),n.bgRepeat!=null&&(ue.style["--cms-parallax-repeat"]=Ie(n.bgRepeat)),ue.style["--cms-parallax-image"]=rt(n.background)||rt(n.image)||rt(n.src)?()=>l():l();const F=_.div({class:ae(["cms-parallax-bg",n.bgClass])},w.length?_.div({class:ae(["cms-parallax-bg-content",n.backgroundContentClass])},...w):null),f=_.div({class:ae(["cms-parallax-content",n.contentClass,n.innerClass])},le,ne,J,Z,X),m=_.div(ue,F,f);let g=!1,O=!1,Q=null;const r=()=>{var G;g||(g=!0,typeof window!="undefined"&&(window.removeEventListener("scroll",p),window.removeEventListener("resize",p)),(G=Q==null?void 0:Q.disconnect)==null||G.call(Q),Q=null)},x=()=>{if(g)return;if(!m.isConnected){r();return}if(o(n.disabled)){F.style.transform="translate3d(0, 0, 0)",m.style.setProperty("--cms-parallax-offset","0px");return}const G=m.getBoundingClientRect(),de=b(n.speed,.18),A=Math.abs(b(n.maxOffset,96)),u=o(n.startTop),k=u!=null&&u!==""?(G.top-b(n.startTop,0))*de:((typeof window!="undefined"&&(window.innerHeight||document.documentElement.clientHeight)||0)/2-(G.top+G.height/2))*de,B=`${(A>0?Math.max(-A,Math.min(A,k)):k).toFixed(2)}px`;F.style.transform=`translate3d(0, ${B}, 0)`,m.style.setProperty("--cms-parallax-offset",B)};function p(){g||O||(O=!0,requestAnimationFrame(()=>{O=!1,x()}))}return typeof window!="undefined"&&(window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p),typeof ResizeObserver!="undefined"&&(Q=new ResizeObserver(()=>{p()}),Q.observe(m)),requestAnimationFrame(()=>{p()}),setTimeout(()=>{p()},90)),m.refresh=()=>(p(),m),m.update=m.refresh,m.destroy=()=>(r(),m.remove(),null),m._dispose=r,Ke(m,n),m},(Fi=JSswift.isDev)!=null&&Fi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Parallax={signature:"UI.Parallax(...children) | UI.Parallax(props, ...children)",props:{src:"string",image:"string",background:"string",backgroundContent:"Node|Function|Array",height:"string|number",minHeight:"string|number",speed:"number",maxOffset:"number",startTop:"number",state:"success|warning|danger|info|primary|secondary|dark|light|string",overlay:"string",color:"string",bgPosition:"string",bgSize:"string",bgRepeat:"string",padding:"string|number",gap:"string|number",justify:"string",align:"string",contentMaxWidth:"string|number",disabled:"boolean",badge:"Node|Function|Array",eyebrow:"String|Node|Function|Array",title:"String|Node|Function|Array",subtitle:"String|Node|Function|Array",header:"Node|Function|Array",aside:"Node|Function|Array",media:"Node|Function|Array",content:"Node|Function|Array",footer:"Node|Function|Array",actions:"Node|Function|Array",bgClass:"string",badgeClass:"string",headerClass:"string",bodyClass:"string",footerClass:"string",contentClass:"string",slots:"{ background?, badge?, eyebrow?, title?, subtitle?, header?, aside?, media?, content?, footer?, actions?, default? }",class:"string",style:"object"},slots:{background:"Decorative content inside the background layer",badge:"Meta badge/chip above the main content",eyebrow:"Eyebrow/kicker",title:"Main title",subtitle:"Subtitle or supporting text",header:"Additional header content",aside:"Header side area",media:"Media content or foreground card",content:"Main body",footer:"Informational footer",actions:"Actions area",default:"Fallback body content"},returns:"HTMLDivElement with refresh/update/destroy methods",description:"Standardized parallax hero/section with structured header, body, actions, slots, and minimal refresh API."});const[Kn,qn]=je.reactive.signal([]),Yn=new Map;function ws(t){const e=Yn.get(t);e&&(clearTimeout(e),Yn.delete(t))}function vs(t){return t?(ws(t),qn(Kn().filter(e=>e.id!==t)),t):null}function lr(){for(const t of Yn.keys())ws(t);qn([])}function Co(t){t!=null&&t.id&&(ws(t.id),t.timeout>0&&Yn.set(t.id,setTimeout(()=>{vs(t.id)},t.timeout)))}function xo(t,e={}){if(!t)return null;let n=null;return qn(Kn().map(s=>s.id!==t?s:(n=Kt({...s,...e,id:s.id},e.type||e.state||e.color||s.type),n))),n&&Co(n),(n==null?void 0:n.id)||null}function rr(t){const e=()=>vs(t.id),n=(re={})=>xo(t.id,re),s={toast:t,id:t.id,close:e,update:n},i=re=>typeof re=="function"?re(s):re,c=(()=>{if(t.icon===!1||t.icon===null)return null;if(t.icon!=null){const H=i(t.icon);return typeof H=="string"?v.Icon({name:H,size:"sm"}):JSswift.ui.slot(H,{as:"icon"})}const re=sr[t.type];return re?v.Icon({name:re,size:"sm"}):null})(),y=E(t.slots,"icon",s,c),a=E(t.slots,"title",s,i(t.title)),l=E(t.slots,"message",s,i(t.message)),b=E(t.slots,"description",s,i(t.description)),R=E(t.slots,"meta",s,i(t.meta)),C=E(t.slots,"actions",s,i(t.actions)),w=E(t.slots,"default",s,i(t.body)),T=E(t.slots,"dismiss",s,i(t.dismiss)),ee=T.length?T:t.closable?[v.Btn({class:"cms-toast-close",outline:!0,size:"xs","aria-label":t.dismissLabel,onClick:e},v.Icon({name:"close",size:"xs"}))]:[],K=_.div({class:ae(["cms-toast",`cms-toast-${t.type}`,`cms-toast-${t.variant}`,me(t.closable,"is-closable"),t.class]),style:t.style||{},role:t.role},y.length?_.div({class:"cms-toast-icon"},...y):null,_.div({class:"cms-toast-main"},_.div({class:"cms-toast-copy"},a.length?_.div({class:"cms-toast-title"},...a):null,l.length?_.div({class:"cms-toast-message"},...l):null,b.length?_.div({class:"cms-toast-description"},...b):null,w.length?_.div({class:"cms-toast-body"},...w):null,R.length?_.div({class:"cms-toast-meta"},...R):null),C.length?_.div({class:"cms-toast-actions"},...C):null),ee.length?_.div({class:"cms-toast-dismiss"},...ee):null);return Ke(K,t),K}function ar(){let t=document.querySelector(".cms-toast-layer");return t||(t=document.createElement("div"),t.className="cms-toast-layer",document.body.appendChild(t),je.reactive.effect(()=>{const e=Kn();t.innerHTML="";const n=new Map;for(const s of e){const i=vo(s.position);n.has(i)||n.set(i,[]),n.get(i).push(s)}for(const s of wo){const i=n.get(s);if(!(i!=null&&i.length))continue;const c=_.div({class:ae(["cms-toast-wrap",`is-${s}`])},...i.map(y=>rr(y)));t.appendChild(c)}},"JSswiftUI:toasts"),t)}function cr(t={}){ar();const e=Kt(t);return e.id=e.id||Math.random().toString(36).slice(2),qn([...Kn().filter(n=>n.id!==e.id),e]),Co(e),e.id}je.services.notify.show=cr,je.services.notify.success=Rt("success","Success"),je.services.notify.error=Rt("danger","Error"),je.services.notify.warning=Rt("warning","Warning"),je.services.notify.info=Rt("info","Info"),je.services.notify.primary=Rt("primary","Notice"),je.services.notify.secondary=Rt("secondary","Notice"),je.services.notify.update=xo,je.services.notify.remove=vs,je.services.notify.clear=lr,je.services.notify.promise=v.Notify.promise,je.notify=je.services.notify,JSswift.form=JSswift.form||{},JSswift.form._isPromise=t=>t&&typeof t.then=="function",JSswift.form._normalizeRules=t=>{const e={};for(const n in t||{}){const s=t[n];e[n]=Array.isArray(s)?s:[s]}return e},JSswift.form._runRule=async(t,e,n)=>{let s=t,i=null;t&&typeof t=="object"&&typeof t.rule=="function"&&(s=t.rule,i=t.message||null);const c=s?s(e,n):!0,y=JSswift.form._isPromise(c)?await c:c;return y===!0?null:typeof y=="string"?y:y===!1?i||"Valore non valido":y?null:i||"Valore non valido"},JSswift.useForm=(t={})=>{const e=t.model||{},n=JSswift.form._normalizeRules(t.rules||{}),s=t.validateOn||"submit",i=t.initial||null,c=_.rod({}),y=_.rod({}),a=_.rod(!1),l=_.rod(null),b=()=>e&&typeof e=="object"&&"value"in e?e.value||{}:e,R=ce=>{if(e&&typeof e=="object"&&"value"in e)e.value=ce;else{const le=e||{};for(const oe in le)delete le[oe];Object.assign(le,ce)}},C=ce=>{const le=b();return le?le[ce]:void 0},w=(ce,le)=>{const oe={...b()||{}};oe[ce]=le,R(oe)},T=(ce,le)=>{const oe={...c.value||{}};le?oe[ce]=le:delete oe[ce],c.value=oe},ee=ce=>(c.value||{})[ce]||null,K=ce=>{y.value={...y.value||{},[ce]:!0}},re=ce=>!!(y.value||{})[ce],H=async ce=>{const le=n[ce]||[];if(!le.length)return T(ce,null),!0;const oe=C(ce),ne={name:ce,value:oe,model:b(),form:ge};for(const J of le){if(!J)continue;const Z=await JSswift.form._runRule(J,oe,ne);if(Z)return T(ce,Z),!1}return T(ce,null),!0},j=async()=>{l.value=null;const ce=Object.keys(n);let le=!0;for(const oe of ce)await H(oe)||(le=!1);return le},ge={model:e,errors:c,touched:y,submitting:a,submitError:l,getValue:C,setValue:w,getError:ee,setError:T,touch:K,isTouched:re,field:(ce,le={})=>{var O;const oe=_.rod("");(O=oe.action)==null||O.call(oe,Q=>{w(ce,Q)});const ne=()=>s==="submit"||s==="input"||s==="blur"?!0:re(ce);let J=null,Z=!1,X=!1;const ue=async()=>{Z||(Z=!0,K(ce),(s==="blur"||s==="input")&&await H(ce),setTimeout(()=>{Z=!1},0))},F=Q=>{J&&(J===Q.target||J.contains&&J.contains(Q.target)||(ue(),J=null,X&&(X=!1,document.removeEventListener("pointerdown",F,!0))))},f=()=>{X||(X=!0,document.addEventListener("pointerdown",F,!0))},m=async()=>{J=document.activeElement,Z=!1,f(),s==="input"&&await H(ce)},g=async()=>{await ue(),J=null,X&&(X=!1,document.removeEventListener("pointerdown",F,!0))};return{name:ce,model:oe,get value(){return oe.value},set value(Q){oe.value=Q},error:()=>ne()?ee(ce):null,success:le.success||null,warning:le.warning||null,note:le.note||null,touch:()=>K(ce),validate:()=>H(ce),onInput:m,onBlur:g,hint:le.hint||null}},validateField:H,validate:j,reset:()=>{l.value=null,c.value={},y.value={},i&&R({...i||{}})},submit:async ce=>{a.value=!0,l.value=null;try{return await j()?{ok:!0,result:await(ce==null?void 0:ce(b(),ge))}:{ok:!1,reason:"validation"}}catch(le){return console.error("[useForm] submit error:",le),l.value=le&&le.message?le.message:String(le),{ok:!1,reason:"exception",error:le}}finally{a.value=!1}}};return ge},v.Form=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.form,i=e.onSubmit,c=ae(["cms-form",e.class]),y=JSswift.omit(e,["form","onSubmit"]);y.class=c;const a=_.form({...y,onSubmit:async b=>{b.preventDefault(),s&&await s.submit(i||(async()=>{}))}}),l=[];for(const b of n||[]){const R=typeof b=="function"?b(s):b,C=JSswift.ui.slot(R);C&&(Array.isArray(C)?l.push(...C):l.push(C))}return l.forEach(b=>a.appendChild(b)),s&&s.submitting&&JSswift.reactive.effect(()=>{a.classList.toggle("is-submitting",!!s.submitting.value)},"UI.Form:submitting"),a},(_i=JSswift.isDev)!=null&&_i.call(JSswift)&&(v.meta=v.meta||{},v.meta.Form={signature:"UI.Form({ form, onSubmit, ...props }, ...children)",props:{form:"useForm() instance",onSubmit:"async (model, form) => any",class:"string",style:"object"},slots:{default:"(form) => Node|Array|Node"},returns:"HTMLFormElement"}),je.services=je.services||{},je.services.dialog=je.services.dialog||{},je.dialog=je.services.dialog;let vn=null;function No(){return vn||(vn=document.createElement("div"),vn.setAttribute("data-cms-modal-root","true"),document.body.appendChild(vn),vn)}v.cardHeader=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=ae(["cms-card-header",me(e.divider,"divider"),e.class]),c=JSswift.omit(e,["divider","align","justify","gap","wrap","direction","slots"]);c.class=i;const y={...e.style||{}},a=Ie(e.align);a!=null&&!Ue(e,"align")&&(y.alignItems=a);const l=Ie(e.justify);l!=null&&!Ue(e,"justify")&&(y.justifyContent=l);const b=Ie(e.wrap,T=>T?"wrap":"nowrap");b!=null&&!Ue(e,"wrap")&&(y.flexWrap=b);const R=Ie(e.direction);R!=null&&!Ue(e,"direction")&&(y.flexDirection=R);const C=Ie(e.gap,$e);C!=null&&!Ue(e,"gap")&&(y.gap=C),Object.keys(y).length&&(c.style=y),JSswift.uiApplyResponsiveProps(c,e,JSswift.uiResponsiveStyleRules);const w=_.div(c,...E(s,"default",{},n));return Ke(w,e),w},v.cardBody=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=ae(["cms-card-body",e.class]),c=JSswift.omit(e,["slots","display","direction","wrap","align","justify","gap","rowGap","columnGap","padding","width"]);c.class=i,JSswift.uiApplyResponsiveProps(c,e,JSswift.uiResponsiveStyleRules);const y=_.div(c,...E(s,"default",{},n));return Ke(y,e),y},v.cardFooter=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=ae(["cms-card-footer",me(e.divider,"divider"),e.class]),c=JSswift.omit(e,["divider","align","justify","gap","wrap","direction","slots"]);c.class=i;const y={...e.style||{}},a=Ie(e.align);a!=null&&!Ue(e,"align")&&(y.alignItems=a);const l=Ie(e.justify);l!=null&&!Ue(e,"justify")&&(y.justifyContent=l);const b=Ie(e.wrap,T=>T?"wrap":"nowrap");b!=null&&!Ue(e,"wrap")&&(y.flexWrap=b);const R=Ie(e.direction);R!=null&&!Ue(e,"direction")&&(y.flexDirection=R);const C=Ie(e.gap,$e);C!=null&&!Ue(e,"gap")&&(y.gap=C),Object.keys(y).length&&(c.style=y),JSswift.uiApplyResponsiveProps(c,e,JSswift.uiResponsiveStyleRules);const w=_.div(c,...E(s,"default",{},n));return Ke(w,e),w},(Li=JSswift.isDev)!=null&&Li.call(JSswift)&&(v.meta=v.meta||{},v.meta.cardHeader={signature:"UI.cardHeader(...children) | UI.cardHeader(props, ...children)",props:{divider:"boolean",align:"stretch|flex-start|center|flex-end|baseline",justify:"flex-start|center|flex-end|space-between|space-around|space-evenly",wrap:"boolean",direction:"row|column|string",gap:"string|number",mobile:"{ gap?, align?, justify?, wrap?, direction? }",tablet:"{ gap?, align?, justify?, wrap?, direction? }",pc:"{ gap?, align?, justify?, wrap?, direction? }",slots:"{ default? }",class:"string",style:"object"},slots:{default:"Card header content"},returns:"HTMLDivElement",description:"Header della card con supporto layout flex."},v.meta.cardBody={signature:"UI.cardBody(...children) | UI.cardBody(props, ...children)",props:{padding:"string|number",gap:"string|number",direction:"row|column|string",mobile:"{ padding?, gap?, direction?, width? }",tablet:"{ padding?, gap?, direction?, width? }",pc:"{ padding?, gap?, direction?, width? }",slots:"{ default? }",class:"string",style:"object"},slots:{default:"Card body content"},returns:"HTMLDivElement",description:"Body della card."},v.meta.cardFooter={signature:"UI.cardFooter(...children) | UI.cardFooter(props, ...children)",props:{divider:"boolean",align:"stretch|flex-start|center|flex-end|baseline",justify:"flex-start|center|flex-end|space-between|space-around|space-evenly",wrap:"boolean",direction:"row|column|string",gap:"string|number",mobile:"{ gap?, align?, justify?, wrap?, direction? }",tablet:"{ gap?, align?, justify?, wrap?, direction? }",pc:"{ gap?, align?, justify?, wrap?, direction? }",slots:"{ default? }",class:"string",style:"object"},slots:{default:"Card footer content"},returns:"HTMLDivElement",description:"Footer della card con supporto layout flex."}),v.Dialog=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=["primary","secondary","warning","danger","success","info","light","dark"],c=["xs","sm","md","lg","xl","full"];let y={...e},a=null,l=null;const b=(f,m)=>typeof f=="function"?f(m):f,R=f=>String(f||"").split(/\s+/).filter(Boolean),C=(f,m,g)=>{if(!f)return;const O=f[m]||[];O.length&&f.classList.remove(...O);const Q=(g||[]).filter(Boolean);Q.length&&f.classList.add(...Q),f[m]=Q},w=(f,m,g,O=Q=>Q)=>{if(f){if(g==null||g===""){f.style.removeProperty(m);return}f.style.setProperty(m,O(g))}},T=()=>{var r,x,p,P,U,G;const f=window.visualViewport,m=Math.max(0,Math.round((r=f==null?void 0:f.offsetLeft)!=null?r:0)),g=Math.max(0,Math.round((x=f==null?void 0:f.offsetTop)!=null?x:0)),O=Math.max(0,Math.round((P=(p=f==null?void 0:f.width)!=null?p:window.innerWidth)!=null?P:0)),Q=Math.max(0,Math.round((G=(U=f==null?void 0:f.height)!=null?U:window.innerHeight)!=null?G:0));return{left:m,top:g,width:O,height:Q}},ee=f=>{if(!(f!=null&&f.panel))return;const{left:m,top:g,width:O,height:Q}=T();w(f.panel,"position","fixed"),w(f.panel,"inset",0,r=>`${r}px`),w(f.panel,"top",g,r=>`${r}px`),w(f.panel,"left",m,r=>`${r}px`),w(f.panel,"right","auto"),w(f.panel,"bottom","auto"),w(f.panel,"width",O,r=>`${r}px`),w(f.panel,"height",Q,r=>`${r}px`),w(f.panel,"min-height",Q,r=>`${r}px`),w(f.panel,"max-width",O,r=>`${r}px`),w(f.panel,"max-height",Q,r=>`${r}px`),w(f.panel,"min-width",0,r=>`${r}px`),w(f.panel,"margin",0,r=>`${r}px`),w(f.panel,"box-sizing","border-box"),w(f.panel,"border-width",0,r=>`${r}px`),w(f.panel,"border-radius",0,r=>`${r}px`),w(f.panel,"transform","none"),w(f.panel,"overflow","hidden"),w(f.panel,"--cms-dialog-fullscreen-left",m,r=>`${r}px`),w(f.panel,"--cms-dialog-fullscreen-top",g,r=>`${r}px`),w(f.panel,"--cms-dialog-fullscreen-width",O,r=>`${r}px`),w(f.panel,"--cms-dialog-fullscreen-height",Q,r=>`${r}px`)},K=f=>{f!=null&&f.panel&&(w(f.panel,"position",null),w(f.panel,"inset",null),w(f.panel,"top",null),w(f.panel,"left",null),w(f.panel,"right",null),w(f.panel,"bottom",null),w(f.panel,"width",null),w(f.panel,"height",null),w(f.panel,"min-height",null),w(f.panel,"max-width",null),w(f.panel,"max-height",null),w(f.panel,"min-width",null),w(f.panel,"margin",null),w(f.panel,"box-sizing",null),w(f.panel,"border-width",null),w(f.panel,"border-radius",null),w(f.panel,"transform",null),w(f.panel,"overflow",null),w(f.panel,"--cms-dialog-fullscreen-left",null),w(f.panel,"--cms-dialog-fullscreen-top",null),w(f.panel,"--cms-dialog-fullscreen-width",null),w(f.panel,"--cms-dialog-fullscreen-height",null))},re=(f,m)=>{var p,P,U,G,de;if(!f)return;if((p=f._dialogViewportCleanup)==null||p.call(f),f._dialogViewportCleanup=null,!m){K(f);return}let g=null;const O=globalThis.requestAnimationFrame||(A=>setTimeout(()=>A(Date.now()),0)),Q=globalThis.cancelAnimationFrame||clearTimeout,r=()=>ee(f),x=()=>{g!=null&&Q(g),g=O(()=>{g=null,r()})};r(),x(),window.addEventListener("resize",r),window.addEventListener("orientationchange",x),(U=(P=window.visualViewport)==null?void 0:P.addEventListener)==null||U.call(P,"resize",r),(de=(G=window.visualViewport)==null?void 0:G.addEventListener)==null||de.call(G,"scroll",x),f._dialogViewportCleanup=()=>{var A,u,k,I;g!=null&&(Q(g),g=null),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",x),(u=(A=window.visualViewport)==null?void 0:A.removeEventListener)==null||u.call(A,"resize",r),(I=(k=window.visualViewport)==null?void 0:k.removeEventListener)==null||I.call(k,"scroll",x)}},H=()=>y,j=f=>{var g;const m=o((g=f.state)!=null?g:f.color);return m?i.includes(m)?m:String(m):""},Y=f=>{const m=o(f.size);return typeof m=="string"&&c.includes(m)?m:""},W=f=>{var g,O,Q;const m=String(o((Q=(O=(g=f.actionsAlign)!=null?g:f.footerAlign)!=null?O:f.alignActions)!=null?Q:"end")).toLowerCase();return["start","left"].includes(m)?"start":["center","middle"].includes(m)?"center":["between","space-between"].includes(m)?"between":["stretch","full"].includes(m)?"stretch":"end"},ie=f=>{var g,O,Q;const m=String(o((Q=(O=(g=f.align)!=null?g:f.verticalAlign)!=null?O:f.position)!=null?Q:"center")).toLowerCase();return["top","start","flex-start"].includes(m)?"cms-dialog-align-top":["bottom","end","flex-end"].includes(m)?"cms-dialog-align-bottom":""},ge=f=>{var g,O;return((O=(g=f.closable)!=null?g:f.dismissible)!=null?O:f.closeButton)!==!1},ce=()=>{var B,pe,Se,ye,V,D,q,Ne;const f=H(),m={close:Z,dismiss:Z,open:J,toggle:ue,update:ne,isOpen:X,entry:()=>a,props:f},g=f.icon!=null?typeof f.icon=="string"?v.Icon({name:f.icon,size:f.iconSize||"md"}):JSswift.ui.slot(f.icon,{as:"icon"}):null,O=E(s,"eyebrow",m,b(f.eyebrow,m)),Q=E(s,"title",m,b((pe=(B=f.title)!=null?B:f.heading)!=null?pe:f.header,m)),r=E(s,"subtitle",m,b((Se=f.subtitle)!=null?Se:f.description,m)),x=E(s,"icon",m,g),p=E(s,"header",m,b((ye=f.headerContent)!=null?ye:f.head,m)),P=ge(f)?E(s,"close",m,v.Btn({class:"cms-dialog-close",size:"sm",outline:!0,"aria-label":f.closeLabel||"Chiudi dialog","data-dialog-close":!0},v.Icon({name:f.closeIcon||"close",size:"sm"}))):[],U=(q=(D=(V=f.content)!=null?V:f.body)!=null?D:f.message)!=null?q:n&&n.length?n:null;let G=E(s,"content",m,b(U,m));G.length||(G=E(s,"body",m,b(U,m))),G.length||(G=E(s,"default",m,b(U,m)));const de=b((Ne=f.footer)!=null?Ne:f.actions,m);let A=E(s,"footer",m,de);A.length||(A=E(s,"actions",m,de));let u=null;p.length?u=_.div({class:"cms-dialog-head cms-dialog-head-custom"},...p):(O.length||Q.length||r.length||x.length||P.length)&&(u=_.div({class:"cms-dialog-head"},x.length?_.div({class:"cms-dialog-icon"},...x):null,_.div({class:"cms-dialog-head-main"},O.length?_.div({class:"cms-dialog-eyebrow"},...O):null,Q.length?_.div({class:"cms-dialog-title"},...Q):null,r.length?_.div({class:"cms-dialog-subtitle"},...r):null),P.length?_.div({class:"cms-dialog-close-wrap"},...P):null));const k=_.div({class:ae(["cms-dialog-body",f.bodyClass])},...G),I=A.length?_.div({class:ae(["cms-dialog-actions",`is-${W(f)}`,me(f.stackActions,"is-stacked"),f.actionsClass,f.footerClass])},...A):null;return _.div({class:ae(["cms-dialog-shell",me(!!u,"has-head"),me(!!I,"has-footer"),me(f.divider!==!1,"with-divider")])},...[u,k,I].filter(Boolean))},le=f=>{var Q;if(!(f!=null&&f.panel))return;const m=H(),g=j(m),O=Y(m);C(f.panel,"_dialogClassTokens",["cms-dialog","cms-singularity","cms-clear-set",O?`cms-dialog-${O}`:"",g,g?`cms-state-${g}`:"",o(m.fullscreen)?"fullscreen":"",o(m.scrollable)?"scrollable":"",o(m.stickyHeader)?"sticky-head":"",o(m.stickyActions)?"sticky-actions":"",o(m.borderless)?"borderless":"",...R(m.class),...R(m.panelClass)]),C(f.overlay,"_dialogOverlayClassTokens",[ie(m),o(m.backdropBlur)?"cms-dialog-overlay-blur":"",...R(m.overlayClass)]),w(f.panel,"--cms-dialog-width",o(m.width),$e),w(f.panel,"--cms-dialog-min-width",o(m.minWidth),$e),w(f.panel,"--cms-dialog-max-width",o(m.maxWidth),$e),w(f.panel,"--cms-dialog-max-height",o(m.maxHeight),$e),w(f.panel,"--cms-dialog-body-max-height",o((Q=m.bodyMaxHeight)!=null?Q:m.contentMaxHeight),$e),m.style&&Object.assign(f.panel.style,m.style),Ke(f.panel,m),re(f,o(m.fullscreen)),f.panel.setAttribute("role",m.role||"dialog"),f.panel.setAttribute("aria-modal",m.modal===!1?"false":"true"),m.ariaLabel?f.panel.setAttribute("aria-label",m.ariaLabel):f.panel.removeAttribute("aria-label")},oe=()=>{a!=null&&a.panel&&a.panel.replaceChildren(ce())},ne=(f={})=>(f&&typeof f=="object"&&(y={...y,...f}),a&&(le(a),oe()),F),J=(f=null)=>{var Q,r,x,p,P;if(f&&typeof f=="object"&&(y={...y,...f}),a)return le(a),oe(),a;l=document.activeElement;const m=H(),g=m.persistent===!0;a=JSswift.overlay.open(()=>ce(),{type:"dialog",backdrop:m.backdrop!==!1,lockScroll:m.lockScroll!==!1,trapFocus:m.trapFocus!==!1,autoFocus:m.autoFocus!==!1,closeOnOutside:(Q=m.closeOnOutside)!=null?Q:!g,closeOnBackdrop:(r=m.closeOnBackdrop)!=null?r:!g,closeOnEsc:(x=m.closeOnEsc)!=null?x:!g,className:Ht(["cms-dialog"]),onClose:()=>{var U,G,de,A;(U=a==null?void 0:a._dialogViewportCleanup)==null||U.call(a),(G=a==null?void 0:a.panel)==null||G.removeEventListener("click",O),a=null,(A=(de=H()).onClose)==null||A.call(de),l&&typeof l.focus=="function"&&setTimeout(()=>l.focus(),0)}});const O=U=>{const G=U.target;G&&G.closest&&G.closest("[data-dialog-close]")&&Z()};return a.panel.addEventListener("click",O),le(a),yn(a),(P=(p=H()).onOpen)==null||P.call(p,a),a},Z=()=>{if(!a)return;const f=a;wn(f,()=>JSswift.overlay.close(f.id))},X=()=>!!a,ue=(f=null)=>X()?(Z(),null):J(f),F={open:J,close:Z,toggle:ue,update:ne,isOpen:X,entry:()=>a,props:()=>({...y})};return F},(Ii=JSswift.isDev)!=null&&Ii.call(JSswift)&&(v.meta=v.meta||{},v.meta.Dialog={signature:"UI.Dialog(props) | UI.Dialog(props, ...children) -> { open, close, toggle, update, isOpen }",props:{title:"String|Node|Function|Array|({ close })=>Node",subtitle:"String|Node|Function|Array|({ close })=>Node",eyebrow:"String|Node|Function|Array|({ close })=>Node",icon:"String|Node|Function|Array",content:"Node|Function|Array|({ close })=>Node",body:"Alias of content",actions:"Node|Function|Array|({ close })=>Node",footer:"Alias of actions",size:"xs|sm|md|lg|xl|full",state:"primary|secondary|warning|danger|success|info|light|dark",color:"Alias of state",width:"string|number",minWidth:"string|number",maxWidth:"string|number",maxHeight:"string|number",bodyMaxHeight:"string|number",persistent:"boolean",closable:"boolean",closeButton:"boolean",closeIcon:"string",align:"top|center|bottom",actionsAlign:"start|center|end|between|stretch",stickyHeader:"boolean",stickyActions:"boolean",scrollable:"boolean",stackActions:"boolean",fullscreen:"boolean",backdrop:"boolean",backdropBlur:"boolean",lockScroll:"boolean",trapFocus:"boolean",autoFocus:"boolean",closeOnOutside:"boolean",closeOnBackdrop:"boolean",closeOnEsc:"boolean",slots:"{ icon?, eyebrow?, title?, subtitle?, header?, content?, body?, footer?, actions?, close?, default? }",class:"string",panelClass:"string",overlayClass:"string",style:"object"},events:{onOpen:"(entry)",onClose:"void"},slots:{icon:"Dialog icon ({ close })",eyebrow:"Eyebrow above the title ({ close })",title:"Dialog title ({ close })",subtitle:"Dialog subtitle ({ close })",header:"Custom header ({ close })",content:"Dialog body ({ close })",body:"Alias of content ({ close })",footer:"Custom footer ({ close })",actions:"Dialog actions ({ close })",close:"Close action ({ close })",default:"Fallback body content ({ close })"},description:"Standardized dialog overlay with variants, animations, structured slots, and imperative API.",returns:"Object { open(overrides?), close(), toggle(overrides?), update(props), isOpen(), entry(), props() }"}),v.TabPanel=(...t)=>{var ke,te,xe,be,Ce,he,Le,Ae,z,we,M,N,S;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=Array.isArray(e.tabs)?e.tabs:Array.isArray(e.items)?e.items:[],c=kt(e.model,"UI.TabPanel:model"),y=e.id||"cms-tabpanel-"+Math.random().toString(36).slice(2,9),a=d=>String(o(d)||"vertical").toLowerCase()==="horizontal"?"horizontal":"vertical",l=d=>String(o(d)||"before").toLowerCase()==="after"?"after":"before",b=d=>{const L=String(o(d)||"").toLowerCase();return L==="pills"||L==="pill"?"pills":L==="soft"||L==="card"?"soft":"line"},R=d=>{const L=o(d);return L==null||L===""?null:JSswift.uiColors.includes(L)?`var(--cms-${L})`:String(L)},C=a(e.orientation||e.orient||e.direction),w=l(e.navPosition||e.barPosition||e.position),T=b(e.variant||(e.pills?"pills":e.soft?"soft":"line")),ee=!!e.wrap,K=!!e.swipeable,re=!!e.infinite,H=!!e.animated,j=!!((te=(ke=e.navFill)!=null?ke:e.fill)!=null?te:e.stretch),Y=!!e.disabled,W=o((xe=e.transitionDuration)!=null?xe:e["transition-duration"]),ie=(()=>{if(W==null)return 220;if(typeof W=="number")return W;const d=parseFloat(W);return Number.isFinite(d)?d:220})(),ge=o((be=e.transitionEasing)!=null?be:e["transition-easing"])||"ease",ce=(he=(Ce=e.transitionPrev)!=null?Ce:e["transition-prev"])!=null?he:null,le=(Ae=(Le=e.transitionNext)!=null?Le:e["transition-next"])!=null?Ae:null,oe=R((z=e.color)!=null?z:e.state),ne=i.map((d,L)=>{var De,We,qe,Ze,Qe,Ee,Be,tt,nt,dt,ut,bt,ot,ft,vt,At;if(d==null)return null;if(typeof d!="object")return{name:d,labelFallback:d,panelFallback:null,noteFallback:null,iconFallback:null,badgeFallback:null,hidden:!1,raw:d,index:L};const fe=(Ee=(Qe=(Ze=(qe=(We=(De=d.name)!=null?De:d.value)!=null?We:d.id)!=null?qe:d.key)!=null?Ze:d.label)!=null?Qe:d.title)!=null?Ee:`tab-${L}`,Fe=d.label!=null||d.title!=null,Te=Fe?(Be=d.label)!=null?Be:d.title:d.children!=null&&d.content==null&&d.panel==null?d.children:(nt=(tt=d.name)!=null?tt:d.value)!=null?nt:`Tab ${L+1}`,$=(bt=(ut=(dt=d.content)!=null?dt:d.panel)!=null?ut:d.body)!=null?bt:Fe?d.children:null,_e=(vt=(ft=(ot=d.note)!=null?ot:d.subtitle)!=null?ft:d.description)!=null?vt:null,Re=(At=d.icon)!=null?At:null,Pe=Object.prototype.hasOwnProperty.call(d,"badge")?d.badge:Object.prototype.hasOwnProperty.call(d,"counter")?d.counter:null;return{...d,name:fe,labelFallback:Te,panelFallback:$,noteFallback:_e,iconFallback:Re,badgeFallback:Pe,index:L}}).filter(Boolean).filter(d=>d.hidden!==!0&&d.visible!==!1),J=ae(["cms-clear-set","cms-tabpanel","cms-singularity",C,`variant-${T}`,me(ee,"wrap"),me(H,"animated"),me(j,"nav-fill"),me(Y,"disabled"),me(w==="after","nav-after"),e.class]),Z=JSswift.omit(e,["tabs","items","value","default","defaultValue","model","orientation","orient","direction","navPosition","barPosition","position","variant","pills","soft","navFill","fill","stretch","wrap","swipeable","infinite","animated","transitionDuration","transition-duration","transitionEasing","transition-easing","transitionPrev","transition-prev","transitionNext","transition-next","slots","empty","tabClass","tabStyle","panelClass","panelStyle","navClass","panelsClass","class","style"]);Z.class=J,Z.style=e.style;const X=_.div(Z);H&&(X.style.setProperty("--cms-tabpanel-duration",`${ie}ms`),X.style.setProperty("--cms-tabpanel-easing",ge)),oe&&X.style.setProperty("--cms-tabpanel-accent",oe);const ue=_.div({class:ae(["cms-tabpanel-nav",e.navClass]),role:"tablist","aria-orientation":C}),F=_.div({class:ae(["cms-tabpanel-panels",e.panelsClass])}),f=[],m=[];let g=-1;const O=()=>C==="horizontal",Q=(d,L,fe)=>({tab:d,name:d.name,index:L,active:fe,value:d.name,select:()=>Se(L),next:()=>V(),prev:()=>D()}),r=(d,L,fe=!1)=>{var Te;if(!ne.length)return-1;let Fe=d;for(let $=0;$<ne.length;$+=1){if(Fe+=L,Fe>=ne.length){if(!fe)return-1;Fe=0}else if(Fe<0){if(!fe)return-1;Fe=ne.length-1}if(!((Te=ne[Fe])!=null&&Te.disabled))return Fe}return-1},x=d=>{var fe;const L=(fe=f[d])==null?void 0:fe.btn;!L||typeof L.focus!="function"||requestAnimationFrame(()=>L.focus())},p=(d,L,fe)=>{const Fe=Q(d,L,fe),Te=JSswift.ui.renderSlot(s,"label",Fe,d.labelFallback);return E(null,"default",{},Te)},P=(d,L)=>{var tt,nt,dt,ut,bt;const fe=L===g,Fe=`${y}-tab-${L}`,Te=`${y}-panel-${L}`,$=Q(d,L,fe),_e=p(d,L,fe),Re=d.iconFallback!=null?typeof d.iconFallback=="string"?v.Icon({name:d.iconFallback,size:(dt=(nt=(tt=d.iconSize)!=null?tt:d.size)!=null?nt:e.size)!=null?dt:null}):d.iconFallback:null,Pe=E(s,"icon",$,Re),De=E(s,"note",$,d.noteFallback),We=E(s,"badge",$,d.badgeFallback),qe=_.span({class:"cms-tabpanel-tab-inner"},Pe.length?_.span({class:"cms-tabpanel-tab-icon"},...Pe):null,_.span({class:"cms-tabpanel-tab-copy"},_.span({class:"cms-tabpanel-tab-label"},..._e.length?_e:[""]),De.length?_.span({class:"cms-tabpanel-tab-note"},...De):null),We.length?_.span({class:"cms-tabpanel-tab-badge"},...We):null),Ze=E(s,"tab",{...$,label:_e,icon:Pe,note:De,badge:We,tabId:Fe,panelId:Te},qe),Qe=ot=>{if(Y||d.disabled)return;const ft=ot.key;if(ft==="Enter"||ft===" "){ot.preventDefault(),Se(L);return}if(ft==="Home"){ot.preventDefault();const at=ne.findIndex(Vt=>!Vt.disabled);at>=0&&(Se(at),x(at));return}if(ft==="End"){ot.preventDefault();const at=(()=>{var Vt;for(let Jt=ne.length-1;Jt>=0;Jt-=1)if(!((Vt=ne[Jt])!=null&&Vt.disabled))return Jt;return-1})();at>=0&&(Se(at),x(at));return}const vt=O()?["ArrowLeft"]:["ArrowUp"],At=O()?["ArrowRight"]:["ArrowDown"];if(vt.includes(ft)){ot.preventDefault();const at=r(L,-1,re);at>=0&&(Se(at,{dir:"prev"}),x(at));return}if(At.includes(ft)){ot.preventDefault();const at=r(L,1,re);at>=0&&(Se(at,{dir:"next"}),x(at))}},Ee=v.Btn({class:ae(["cms-tabpanel-tab",me(fe,"active"),me(d.disabled||Y,"disabled"),e.tabClass,d.tabClass||d.class]),type:"button",id:Fe,role:"tab",disabled:!!(d.disabled||Y),"aria-selected":fe?"true":"false","aria-controls":Te,tabindex:fe?"0":"-1",outline:T==="pills"&&!fe,color:T==="pills"&&fe?d.color||e.color||e.state||"primary":null,size:(bt=(ut=d.size)!=null?ut:e.size)!=null?bt:null,style:{...e.tabStyle||{},...d.tabStyle||{}},onClick:()=>{d.disabled||Y||Se(L)},onKeydown:Qe},...Ze),Be=_.div({class:ae(["cms-tabpanel-nav-btn",me(fe,"active"),d.navClass]),"data-name":d.name},Ee,_.span({class:"tab-indicator"}));return f[L]={btn:Ee,wrap:Be,index:L},Be},U=(d,L)=>{const fe=L===g,Fe=`${y}-tab-${L}`,Te=`${y}-panel-${L}`,$=Q(d,L,fe),_e=JSswift.ui.renderSlot(s,"panel",$,d.panelFallback),Re=_.div({class:ae(["cms-tabpanel-panel",me(fe,"active"),e.panelClass,d.panelClass]),style:{...e.panelStyle||{},...d.panelStyle||{}},"data-name":d.name,role:"tabpanel",id:Te,tabindex:0,"aria-labelledby":Fe,"aria-hidden":fe?"false":"true"},...E(null,"default",{},_e));return m[L]=Re,Re},G=ne.map((d,L)=>P(d,L)),de=JSswift.ui.renderSlot(s,"nav",{tabs:ne,active:()=>{var d;return g>=0?(d=ne[g])==null?void 0:d.name:null},activeIndex:()=>g,activeTab:()=>g>=0?ne[g]:null,select:d=>{typeof d=="number"?Se(d):ye(d)},next:()=>V(),prev:()=>D(),nodes:G,orientation:C,position:w,variant:T},G);E(null,"default",{},de).forEach(d=>ue.appendChild(d)),ne.length?ne.forEach((d,L)=>F.appendChild(U(d,L))):E(s,"empty",{tabs:ne},(we=e.empty)!=null?we:_.div({class:"cms-tabpanel-empty"},"Nessun contenuto disponibile.")).forEach(L=>F.appendChild(L));const A=d=>{if(!H)return;const L=d==="next"?"18px":"-18px",fe=d==="next"?"-18px":"18px";X.style.setProperty("--cms-tabpanel-enter",L),X.style.setProperty("--cms-tabpanel-leave",fe)},u=()=>{const d=[];ce&&d.push(...String(ce).split(/\s+/)),le&&d.push(...String(le).split(/\s+/)),d.length&&F.classList.remove(...d.filter(Boolean))},k=d=>{u();const L=d==="prev"?ce:le;if(!L)return;const fe=String(L).split(/\s+/).filter(Boolean);fe.length&&(F.classList.add(...fe),setTimeout(()=>F.classList.remove(...fe),ie+40))},I=d=>{var Fe;const L=f.find(({btn:Te})=>Te.classList.contains("active")),fe=(Fe=L==null?void 0:L.btn.parentNode)==null?void 0:Fe.getBoundingClientRect();f.forEach(({btn:Te,index:$})=>{const _e=$===d,Re=Te.parentNode;if(!Re)return;const Pe=Re.getBoundingClientRect();Re.isConnected&&fe&&(Re.style.setProperty("--nav-pos-x",fe.left-Pe.left+"px"),Re.style.setProperty("--nav-pos-y",fe.top-Pe.top+"px")),Re.classList.toggle("active",_e),Te.classList.toggle("active",_e),Te.setAttribute("aria-selected",_e?"true":"false"),Te.setAttribute("tabindex",_e?"0":"-1")})},B=(d,L,fe)=>{A(fe),m.forEach((Fe,Te)=>{if(!Fe)return;const $=Te===L,_e=Te===d;$?(Fe.classList.add("active"),Fe.classList.remove("leaving"),Fe.setAttribute("aria-hidden","false")):(Fe.classList.remove("active"),Fe.setAttribute("aria-hidden","true"),H&&_e?(Fe.classList.add("leaving"),setTimeout(()=>Fe.classList.remove("leaving"),ie+40)):Fe.classList.remove("leaving"))})},pe=(d,L)=>d<0||d===L||re&&d===ne.length-1&&L===0?"next":re&&d===0&&L===ne.length-1?"prev":L>d?"next":"prev",Se=(d,L={})=>{var $,_e;if(d==null||d<0||d>=ne.length||($=ne[d])!=null&&$.disabled)return;const fe=g;if(fe===d)return;g=d;const Fe=ne[d],Te=L.dir||pe(fe,d);c&&!L.fromModel&&c.set(Fe.name),I(d),B(fe,d,Te),k(Te),X.dataset.active=String(Fe.name),(_e=e.onChange)==null||_e.call(e,Fe.name,Fe,d)},ye=(d,L={})=>{if(!ne.length)return;const fe=ne.findIndex(Fe=>Fe.name==d);fe!==-1&&Se(fe,L)},V=()=>{if(!ne.length)return;const d=g<0?ne.findIndex(L=>!L.disabled):r(g,1,re);d<0||Se(d,{dir:"next"})},D=()=>{if(!ne.length)return;const d=g<0?(()=>{var L;for(let fe=ne.length-1;fe>=0;fe-=1)if(!((L=ne[fe])!=null&&L.disabled))return fe;return-1})():r(g,-1,re);d<0||Se(d,{dir:"prev"})};if(K){let d=0,L=0,fe=!1;const Fe=42;F.addEventListener("pointerdown",Te=>{Te.button!=null&&Te.button!==0||(fe=!0,d=Te.clientX,L=Te.clientY)}),F.addEventListener("pointerup",Te=>{if(!fe)return;fe=!1;const $=Te.clientX-d,_e=Te.clientY-L;Math.abs($)<Fe||Math.abs($)<Math.abs(_e)||($<0?V():D())}),F.addEventListener("pointercancel",()=>{fe=!1}),F.addEventListener("pointerleave",()=>{fe=!1})}const q=c?c.get():(S=(N=(M=e.value)!=null?M:e.defaultValue)!=null?N:e.default)!=null?S:null;if(ne.length){const d=ne.findIndex(L=>L.name==q);if(d>=0)Se(d,{fromModel:!0});else{const L=ne.findIndex(fe=>!fe.disabled);L>=0&&(Se(L,{fromModel:!0}),c&&c.set(ne[L].name))}}return c&&c.watch(d=>ye(d,{fromModel:!0}),"UI.TabPanel:watch"),w==="after"?(X.appendChild(F),X.appendChild(ue)):(X.appendChild(ue),X.appendChild(F)),E(s,"default",{},n).forEach(d=>X.appendChild(d)),Ke(X,e),X._tabs=()=>ne.slice(),X._active=()=>g>=0?ne[g]:null,X._getValue=()=>{var d;return g>=0?(d=ne[g])==null?void 0:d.name:null},X._setValue=d=>ye(d),X._select=d=>{typeof d=="number"?Se(d):ye(d)},X._next=V,X._prev=D,X},(zi=JSswift.isDev)!=null&&zi.call(JSswift)&&(v.meta=v.meta||{},v.meta.TabPanel={signature:"UI.TabPanel(props) | UI.TabPanel(props, ...children)",props:{tabs:{type:"Array<{ name?, value?, label?, title?, note?, subtitle?, icon?, badge?, content?, panel?, body?, children?, disabled?, hidden?, tabClass?, panelClass? }>",description:"Tab definition. Supports multiple aliases for label and content.",category:"data"},items:{type:"Array",description:"Alias of `tabs`.",category:"data"},value:{type:"any",description:"Initial or controlled value of the active tab.",category:"data"},defaultValue:{type:"any",description:"Explicit alias for the initial tab when `model` is not used.",category:"data"},model:{type:"[get,set] signal",description:"Reactive binding for the active tab.",category:"data"},orientation:{type:"vertical|horizontal",description:"Navigation orientation.",values:["vertical","horizontal"],default:"vertical",category:"layout"},navPosition:{type:"before|after",description:"Tab bar position relative to the panels.",values:["before","after"],default:"before",category:"layout"},variant:{type:"line|pills|soft",description:"Visual style of the tab navigation.",values:["line","pills","soft"],default:"line",category:"style"},wrap:{type:"boolean",description:"Allows the nav to wrap when space is limited.",default:!1,category:"layout"},navFill:{type:"boolean",description:"Distributes tabs across the available width.",default:!1,category:"layout"},swipeable:{type:"boolean",description:"Enables swipe gestures on panels.",default:!1,category:"behavior"},infinite:{type:"boolean",description:"When enabled, next/prev cycles from the first to the last tab.",default:!1,category:"behavior"},animated:{type:"boolean",description:"Enables the transition between panels.",default:!1,category:"behavior"},transitionDuration:{type:"number",description:"Animation duration in milliseconds.",default:220,category:"behavior"},transitionEasing:{type:"string",description:"CSS timing function for the animation.",default:"ease",category:"behavior"},transitionPrev:{type:"string",description:"Custom classes applied during the transition to the previous tab.",category:"behavior"},transitionNext:{type:"string",description:"Custom classes applied during the transition to the next tab.",category:"behavior"},tabClass:{type:"string",description:"Additional classes for all tab buttons.",category:"style"},tabStyle:{type:"object",description:"Inline style applied to all tab buttons.",category:"style"},navClass:{type:"string",description:"Additional classes for the nav wrapper.",category:"style"},panelsClass:{type:"string",description:"Additional classes for the panels wrapper.",category:"style"},panelClass:{type:"string",description:"Common additional classes for each panel.",category:"style"},panelStyle:{type:"object",description:"Common inline style for each panel.",category:"style"},empty:{type:"Node|Function|Array",description:"Visual fallback when `tabs` and `items` are empty.",category:"state"},disabled:{type:"boolean",description:"Disables the entire component.",default:!1,category:"state"},slots:{type:"{ nav?, tab?, label?, icon?, note?, badge?, panel?, empty?, default? }",description:"Structured slots for customizing nav, label, badge, and content.",category:"general"}},slots:{nav:{type:"Function|Node|Array",description:"Full navigation renderer. Receives `tabs`, `active()`, `activeTab()`, `select()`, `next()`, `prev()`, `nodes`, `orientation`, `position`, `variant`."},tab:{type:"Function|Node|Array",description:"Inner content of the tab button. Receives `tab`, `name`, `index`, `active`, `label`, `icon`, `note`, `badge`, `select()`."},label:{type:"Function|Node|Array",description:"Tab label."},icon:{type:"Function|Node|Array",description:"Tab icon."},note:{type:"Function|Node|Array",description:"Note, subtitle, or short description below the label."},badge:{type:"Function|Node|Array",description:"Badge or counter aligned to the right of the tab."},panel:{type:"Function|Node|Array",description:"Active/inactive panel renderer. Receives `tab`, `name`, `index`, `active`, `select()`, `next()`, `prev()`."},empty:{type:"Function|Node|Array",description:"Fallback when there are no tabs."},default:{type:"Node|Array|Function",description:"Extra content appended after the component."}},events:{onChange:"(name, tab, index)"},returns:"HTMLDivElement with API `_getValue()`, `_setValue(value)`, `_select(value)`, `_next()`, `_prev()`, `_active()`, `_tabs()`",description:"Standardized tab panel with accessible nav, structured slots, reactive model, swipe, and animations."});function dr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Ss({title:t,message:e,contentNode:n,okText:s,cancelText:i,showCancel:c,onOk:y,onCancel:a,persistent:l}){No();const b=_.div({class:"cms-dialog-backdrop",onClick:K=>{K.target===b&&l!==!0&&(a==null||a())}}),R=E(null,"default",{},t),C=E(null,"default",{},e),w=E(null,"default",{},n),T=_.div({class:"cms-dialog cms-panel"},R.length?_.h3(...R):null,C.length?_.p(...C):null,...w,_.div({class:"cms-dialog-actions"},c?JSswift.ui.Btn({onClick:a},i||"Annulla"):null,JSswift.ui.Btn({color:"primary",onClick:y},s||"OK")));b.appendChild(T),No().appendChild(b);const ee=K=>{K.key==="Escape"&&(a==null||a())};return document.addEventListener("keydown",ee,{once:!0}),{backdrop:b,close:()=>dr(b)}}je.dialog.alert=function(t,e={}){return new Promise(n=>{const{backdrop:s,close:i}=Ss({title:e.title||"Info",message:t,okText:e.okText||"OK",showCancel:!1,persistent:e.persistent,onOk:()=>{i(),n(!0)},onCancel:()=>{i(),n(!0)}})})},je.dialog.confirm=function(t={}){return new Promise(e=>{const{close:n}=Ss({title:t.title||"Conferma",message:t.message||"",okText:t.okText||"Conferma",cancelText:t.cancelText||"Annulla",showCancel:!0,persistent:t.persistent,onOk:()=>{n(),e(!0)},onCancel:()=>{n(),e(!1)}})})},je.dialog.prompt=function(t={}){return new Promise(e=>{const n=JSswift.ui.Input({class:"cms-dialog-input",type:t.type||"text",placeholder:t.placeholder||""});t.value!=null&&(n.value=String(t.value));const{close:s}=Ss({title:t.title||"Inserisci valore",message:t.message||"",okText:t.okText||"OK",cancelText:t.cancelText||"Annulla",showCancel:!0,contentNode:_.div(n),persistent:t.persistent,onOk:()=>{const i=n.value;s(),e(i)},onCancel:()=>{s(),e(null)}});setTimeout(()=>n.focus(),0)})},je.services=je.services||{},je.services.loading=je.services.loading||{},je.loading=je.services.loading;let Nt=null,In=0;function Ao(){if(Nt)return Nt;Nt=document.createElement("div"),Nt.className="cms-loading-backdrop",Nt.style.cssText=`
|
|
2
|
+
position: fixed; inset: 0;
|
|
3
|
+
background: rgba(0,0,0,0.45);
|
|
4
|
+
display: none;
|
|
5
|
+
align-items: center; justify-content: center;
|
|
6
|
+
z-index: 10001;
|
|
7
|
+
padding: 14px;
|
|
8
|
+
`;const t=document.createElement("div");t.className="cms-panel cms-loading-card",t.style.cssText=`
|
|
9
|
+
padding: 14px 16px;
|
|
10
|
+
border-radius: var(--cms-r-lg);
|
|
11
|
+
min-width: 260px;
|
|
12
|
+
display:flex; gap: 12px; align-items:center;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
`;const e=document.createElement("div");e.className="cms-loading-spinner",e.style.cssText=`
|
|
15
|
+
width: 18px; height: 18px;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
border: 2px solid rgba(255,255,255,0.25);
|
|
18
|
+
border-top-color: var(--cms-primary);
|
|
19
|
+
animation: cmsSpin 0.9s linear infinite;
|
|
20
|
+
`;const n=document.createElement("div");n.className="cms-muted cms-loading-text",n.textContent="Loading...";const s=document.createElement("div");s.className="cms-loading-progress",s.style.cssText=`
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 6px;
|
|
23
|
+
border-radius: 999px;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
background: rgba(255,255,255,0.08);
|
|
26
|
+
display: none;
|
|
27
|
+
`;const i=document.createElement("div");i.className="cms-loading-progress-bar",i.style.cssText=`
|
|
28
|
+
height: 100%;
|
|
29
|
+
width: 0%;
|
|
30
|
+
background: var(--cms-primary);
|
|
31
|
+
transition: width 200ms ease;
|
|
32
|
+
`,s.appendChild(i);const c=document.createElement("div");c.style.cssText="display:flex; gap: 12px; align-items:center; width: 100%;",c.appendChild(e),c.appendChild(n),t.appendChild(c),t.appendChild(s),Nt.appendChild(t),document.body.appendChild(Nt);const y=document.createElement("style");return y.textContent=`
|
|
33
|
+
@keyframes cmsSpin { to { transform: rotate(360deg); } }
|
|
34
|
+
`,document.head.appendChild(y),Nt._textNode=n,Nt._spinner=e,Nt._progressWrap=s,Nt._progressBar=i,Nt._progressActive=!1,Nt}function ko(t,e){if(typeof t=="object"&&t!==null)return{...t};const n=e&&typeof e=="object"?e:{};return typeof e=="string"&&(t==null||typeof t=="number")?{...n,message:e}:{...n,message:t}}function Fo(t,e){const n=e==="progress";t._spinner.style.display=n?"none":"",t._progressWrap.style.display=n?"block":"none",t._mode=e}je.loading.show=function(t="Loading...",e={}){const n=Ao(),s=ko(t,e);In++,n._progressActive=!1,n._textNode.textContent=s.message||"Loading...",Fo(n,"spinner"),s.spinner===!1&&(n._spinner.style.display="none"),n.style.display="flex"},je.loading.hide=function(){Nt&&(In=Math.max(0,In-1),In===0&&(Nt.style.display="none",Nt._progressActive=!1))},je.loading.progress=function(t=0,e={}){var c;const n=Ao();typeof t=="object"&&t!==null&&(e=t,t=(c=t.value)!=null?c:0);const s=ko(null,e);n._progressActive||(In++,n._progressActive=!0);const i=Math.max(0,Math.min(100,Number(t!=null?t:0)));n._textNode.textContent=s.message||"Loading...",n._progressBar.style.width=i+"%",Fo(n,"progress"),n.style.display="flex"},je.loading.wrap=async function(t,e){je.loading.show(t);try{return await e()}finally{je.loading.hide()}};function ur(t){return typeof t=="function"?t():t||[]}function Cs(t,e){if(!(t==null||e==null))return typeof e!="string"||e.indexOf(".")<0?t==null?void 0:t[e]:e.split(".").reduce((n,s)=>n==null?n:n[s],t)}function fr(t,e){return t==null&&e==null?0:t==null?-1:e==null?1:typeof t=="number"&&typeof e=="number"?t-e:String(t).localeCompare(String(e),void 0,{numeric:!0,sensitivity:"base"})}function mr(t){const e=ur(t);return Array.isArray(e)?e:[]}function _o(t){var e,n,s,i;return(i=(s=(n=(e=t==null?void 0:t.label)!=null?e:t==null?void 0:t.title)!=null?n:t==null?void 0:t.header)!=null?s:t==null?void 0:t.key)!=null?i:""}function xs(t,e){var n,s;return(s=(n=t==null?void 0:t.sortKey)!=null?n:t==null?void 0:t.key)!=null?s:`__col_${e}`}function Lo(t,e){return t.find((n,s)=>xs(n,s)===e||(n==null?void 0:n.key)===e)||null}function Xn(t,e,n){return t?typeof t.get=="function"?t.get(e,{row:e,rowIndex:n,col:t}):typeof t.value=="function"?t.value(e,{row:e,rowIndex:n,col:t}):typeof t.key=="string"?Cs(e,t.key):t.key!=null?e==null?void 0:e[t.key]:e:e}function Qn(t,e){return typeof t=="function"?t(e)||{}:t||{}}function Zn(t){if(t==null)return"";if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return t.map(Zn).filter(Boolean).join(" ");if(typeof Node!="undefined"&&t instanceof Node)return t.textContent||"";if(typeof t=="object"){if(typeof t.textContent=="string")return t.textContent;try{return JSON.stringify(t)}catch(e){return""}}return String(t)}function gr(t,e){const s=(Array.isArray(t)?t:e).map(i=>Number(i)).filter(i=>Number.isFinite(i)&&i>0);return s.length?Array.from(new Set(s)):e}function pr(t,e,n,s){const i=s.searchBy||s.searchPredicate;if(typeof i=="function")return!!i(t,{query:n,columns:e});const c=String(n||"").trim().toLowerCase().split(/\s+/).filter(Boolean);if(!c.length)return!0;const y=Array.isArray(s.searchKeys)&&s.searchKeys.length?s.searchKeys:e.filter(b=>(b==null?void 0:b.searchable)!==!1).map(b=>{var R;return(R=b==null?void 0:b.searchKey)!=null?R:b==null?void 0:b.key}).filter(Boolean),a=[];if(y.length)for(const b of y)if(typeof b=="function")a.push(Zn(b(t)));else{const R=e.find(C=>(C==null?void 0:C.key)===b||(C==null?void 0:C.searchKey)===b);a.push(Zn(R?Xn(R,t,-1):Cs(t,b)))}else a.push(Zn(t));const l=a.join(" ").toLowerCase();return c.every(b=>l.includes(b))}v.Table=(...t)=>{var ke,te,xe,be;const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=Array.isArray(e.columns)?e.columns:[],c=gr(e.pageSizeOptions,[5,10,20,50]),y=Number((te=(ke=e.pageSize)!=null?ke:c[0])!=null?te:10)||10,a=Array.from(new Set([...c,y])).sort((Ce,he)=>Ce-he),l=e.initialSort||(e.sortBy?{key:e.sortBy,dir:e.sortDir==="desc"?"desc":"asc"}:null),b=e.searchable===!0||typeof e.searchable=="string"||e.searchPlaceholder!=null||e.search!=null||e.query!=null||!!e.searchModel||!!e.queryModel||Array.isArray(e.searchKeys)||typeof e.searchBy=="function"||typeof e.searchPredicate=="function",R=kt(e.searchModel||e.queryModel,"UI.Table:query"),[C,w]=je.reactive.signal(Math.max(1,Number(e.page||1)||1)),[T,ee]=je.reactive.signal(y),[K,re]=je.reactive.signal(l),[H,j]=je.reactive.signal(String((be=R?R.get():(xe=e.search)!=null?xe:e.query)!=null?be:"")),Y=Ce=>{const he=String(Ce!=null?Ce:"");j(he),R&&R.set(he),w(1)},W=Ce=>{const he=Number(Ce)||y;ee(he),w(1)},ie=(Ce,he)=>{const Le=xs(Ce,he),Ae=K();!Ae||Ae.key!==Le&&Ae.key!==(Ce==null?void 0:Ce.key)?re({key:Le,dir:"asc"}):Ae.dir==="asc"?re({key:Le,dir:"desc"}):re(null),w(1)};let ge=null;R&&R.watch(Ce=>{const he=String(Ce!=null?Ce:"");j(he),ge&&ge.value!==he&&(ge.value=he),w(1)},"UI.Table:queryWatch");const ce=JSswift.omit(e,["columns","rows","rowKey","loading","page","pageSize","pageSizeOptions","pagination","initialSort","sortBy","sortDir","search","query","searchable","searchPlaceholder","searchKeys","searchBy","searchPredicate","searchModel","queryModel","filter","actions","actionsLabel","emptyText","loadingText","onRowClick","onRowDblClick","tableClass","tableStyle","cardClass","dense","striped","hover","stickyHeader","toolbar","toolbarStart","toolbarEnd","caption","footer","status","rowClass","rowAttrs","minTableWidth","hideHeader","hideFooter","slots","body"]);ce.class=ae(["cms-table-card",e.class,e.cardClass]),e.dense!=null&&(ce.dense=e.dense);const le=_.div({class:"cms-table-shell"}),oe=E(s,"default",{},n);oe.length&&le.appendChild(_.div({class:"cms-table-lead"},...oe));const ne=E(s,"toolbarStart",{},e.toolbarStart),J=E(s,"toolbar",{},e.toolbar),Z=E(s,"toolbarEnd",{},e.toolbarEnd),X=_.div({class:"cms-table-toolbar"}),ue=_.div({class:"cms-table-toolbar-main"}),F=_.div({class:"cms-table-toolbar-side"});ne.forEach(Ce=>ue.appendChild(Ce)),J.forEach(Ce=>ue.appendChild(Ce));const f=E(s,"search",{query:H(),getQuery:H,setQuery:Y},null);if(f.length)f.forEach(Ce=>F.appendChild(Ce));else if(b){ge=_.input({type:"search",class:"cms-input",placeholder:typeof e.searchable=="string"?e.searchable:e.searchPlaceholder||"Cerca nella tabella",value:String(H()||"")}),ge.addEventListener("input",()=>Y(ge.value));const Ce=v.Btn({class:"cms-table-search-clear",outline:!0,onClick:()=>{ge&&(ge.value=""),Y("")}},"Reset");F.appendChild(_.div({class:"cms-singularity cms-table-search"},_.span({class:"cms-table-search-icon","aria-hidden":"true"},"\u2315"),ge,Ce))}Z.forEach(Ce=>F.appendChild(Ce)),(ue.childNodes.length||F.childNodes.length)&&(X.appendChild(ue),X.appendChild(F),le.appendChild(X));const m=_.div({class:"cms-singularity cms-table-chip"},""),g=_.div({class:"cms-singularity cms-table-chip"},""),O=_.div({class:"cms-singularity cms-table-chip"},""),Q=E(s,"status",{},e.status),r=_.div({class:"cms-table-status"},m,g,O,...Q);le.appendChild(r);const x=E(s,"caption",{},e.caption);x.length&&le.appendChild(_.div({class:"cms-table-caption"},...x));const p=_.thead(),P=_.tbody(),U=!!e.actions||!!s.actions,G=ae(["cms-table",me(e.dense,"dense"),me(e.striped,"striped"),me(e.hover!==!1,"hover"),me(e.stickyHeader!==!1,"sticky-head"),e.tableClass]),de={...e.tableStyle||{}};e.minTableWidth!=null&&(de["--cms-table-min-width"]=$e(e.minTableWidth));const A=_.table({class:G,style:de},p,P),u=_.div({class:"cms-singularity cms-table-wrap"},A);le.appendChild(u);const k=_.div({class:"cms-singularity cms-table-chip"},""),I=_.div({class:"cms-singularity cms-table-chip"},""),B=v.Btn({outline:!0,onClick:()=>w(Math.max(1,C()-1))},"\u2039"),pe=v.Btn({outline:!0,onClick:()=>w(C()+1)},"\u203A"),Se=_.div({class:"cms-singularity cms-table-chip"},""),ye=_.select({class:"cms-input cms-table-size-select"},...a.map(Ce=>us({value:String(Ce)},String(Ce))));ye.value=String(T()),ye.addEventListener("change",()=>W(ye.value));const V=E(s,"footer",{},e.footer),D=_.div({class:"cms-table-foot"},_.div({class:"cms-table-foot-main"},k,I,_.label({class:"cms-table-size"},_.span("Righe"),ye)),_.div({class:"cms-table-foot-extra"},...V,_.div({class:"cms-table-pager"},B,Se,pe)));e.hideFooter!==!0&&le.appendChild(D);const q=()=>{if(p.innerHTML="",e.hideHeader)return;const Ce=_.tr();if(i.forEach((he,Le)=>{var fe,Fe;const Ae={col:he,colIndex:Le,sort:K()},z={...Qn(he==null?void 0:he.style,{...Ae,header:!0}),...Qn((fe=he==null?void 0:he.headerStyle)!=null?fe:he==null?void 0:he.thStyle,{...Ae,header:!0})};(he==null?void 0:he.width)!=null&&(z.width=$e(he.width)),(he==null?void 0:he.minWidth)!=null&&(z.minWidth=$e(he.minWidth)),(he==null?void 0:he.maxWidth)!=null&&(z.maxWidth=$e(he.maxWidth)),he!=null&&he.align&&(z.textAlign=he.align);let we=E(he==null?void 0:he.slots,"header",Ae,null);if(!we.length){const Te=typeof(he==null?void 0:he.header)=="function"?he.header(Ae):(Fe=he==null?void 0:he.header)!=null?Fe:_o(he);we=E(s,"header",Ae,Te)}const M=K(),N=xs(he,Le),S=(he==null?void 0:he.sortable)!==!1&&((he==null?void 0:he.key)!=null||typeof(he==null?void 0:he.get)=="function"||typeof(he==null?void 0:he.compare)=="function"),d=!!M&&(M.key===N||M.key===(he==null?void 0:he.key)),L=_.th({class:ae(["cms-table-head-cell",me(he==null?void 0:he.nowrap,"is-nowrap"),me(S,"cms-table-sortable"),me(d,"is-sorted"),he==null?void 0:he.headerClass]),style:z});S?L.appendChild(_.button({type:"button",class:"cms-table-head-button",onClick:()=>ie(he,Le)},_.span({class:"cms-table-head-label"},...we),_.span({class:"cms-table-head-arrow","aria-hidden":"true"},d?M.dir==="asc"?"\u2191":"\u2193":"\u2195"))):we.forEach(Te=>L.appendChild(Te)),Ce.appendChild(L)}),U){const he=E(s,"actionsHeader",{},e.actionsLabel||"Azioni");Ce.appendChild(_.th({class:"cms-table-head-cell cms-table-head-actions",style:{textAlign:"right"}},...he))}p.appendChild(Ce)},Ne=(Ce,he)=>{const Le={columns:i,count:i.length},Ae=E(s,Ce,Le,he),z=String(i.length+(U?1:0));P.appendChild(_.tr(_.td({colSpan:z,class:"cms-table-state"},...Ae)))};return je.reactive.effect(()=>{const Ce=mr(e.rows),he=String(H()||"").trim(),Le=K(),Ae=typeof e.loading=="function"?!!e.loading():!!e.loading,z=e.pagination!==!1;if(q(),P.innerHTML="",ge&&ge.value!==H()&&(ge.value=H()),ye.value!==String(T())&&(ye.value=String(T())),Ae){m.textContent="Caricamento in corso",g.style.display="none",O.style.display="none",k.textContent="Loading\u2026",I.textContent="",Se.textContent="Pagina 1",B.disabled=!0,pe.disabled=!0,Ne("loading",e.loadingText||"Loading...");return}let we=Ce.slice();const M=we.length;if(typeof e.filter=="function"&&(we=we.filter(($,_e)=>e.filter($,{row:$,index:_e,query:he,rows:Ce,columns:i}))),he&&(we=we.filter($=>pr($,i,he,e))),Le){const $=Lo(i,Le.key);$&&we.sort((_e,Re)=>{const Pe=Xn($,_e,-1),De=Xn($,Re,-1),We=typeof $.compare=="function"?$.compare(Pe,De,_e,Re):fr(Pe,De);return Le.dir==="asc"?We:-We})}const N=we.length,S=Math.max(1,Number(T())||y),d=z?Math.max(1,Math.ceil(N/S)):1,L=z?Math.min(C(),d):1;L!==C()&&w(L);const fe=z?(L-1)*S:0,Fe=z?fe+S:N,Te=we.slice(fe,Fe);if(m.textContent=N===M?`${N} righe`:`${N} di ${M} righe`,g.textContent=he?`Ricerca: ${he}`:"",g.style.display=he?"":"none",Le){const $=Lo(i,Le.key);O.textContent=$?`Ordine: ${_o($)} ${Le.dir==="asc"?"\u2191":"\u2193"}`:"",O.style.display=$?"":"none"}else O.style.display="none";if(k.textContent=N?`${fe+1}-${Math.min(Fe,N)} di ${N}`:"0 risultati",I.textContent=N!==M?`Dataset totale ${M}`:`Page size ${S}`,Se.textContent=z?`Pagina ${L} / ${d}`:"Tutte le righe",B.disabled=!z||L<=1,pe.disabled=!z||L>=d,ye.disabled=!z,ye.parentNode.style.display=z?"":"none",Te.length===0){Ne("empty",e.emptyText||"Nessun dato");return}for(let $=0;$<Te.length;$++){const _e=Te[$],Re=fe+$,Pe={row:_e,rowIndex:Re,pageIndex:$},De=typeof e.rowAttrs=="function"?e.rowAttrs(_e,Pe)||{}:e.rowAttrs||{},We=typeof e.rowClass=="function"?e.rowClass(_e,Pe):e.rowClass,qe=!!(e.onRowClick||e.onRowDblClick),Ze=_.tr({...De,class:ae(["cms-table-row",We,De.class,me(qe,"is-clickable")])});if(e.rowKey){const Ee=typeof e.rowKey=="function"?e.rowKey(_e,Pe):Cs(_e,e.rowKey);Ee!=null&&(Ze.dataset.key=String(Ee))}const Qe=Ee=>{const Be=Ee==null?void 0:Ee.target;return!!(Be&&Be.closest&&Be.closest("button, a, input, select, textarea, label, [data-table-action]"))};if(e.onRowClick&&Ze.addEventListener("click",Ee=>{Qe(Ee)||e.onRowClick(_e,Pe,Ee)}),e.onRowDblClick&&Ze.addEventListener("dblclick",Ee=>{Qe(Ee)||e.onRowDblClick(_e,Pe,Ee)}),i.forEach((Ee,Be)=>{var ft,vt;const tt=Xn(Ee,_e,Re),nt={...Pe,col:Ee,colIndex:Be,value:tt},dt={...Qn(Ee==null?void 0:Ee.style,nt),...Qn((ft=Ee==null?void 0:Ee.cellStyle)!=null?ft:Ee==null?void 0:Ee.tdStyle,nt)};Ee!=null&&Ee.align&&(dt.textAlign=Ee.align),(Ee==null?void 0:Ee.width)!=null&&(dt.width=$e(Ee.width)),(Ee==null?void 0:Ee.minWidth)!=null&&(dt.minWidth=$e(Ee.minWidth)),(Ee==null?void 0:Ee.maxWidth)!=null&&(dt.maxWidth=$e(Ee.maxWidth));const ut=typeof(Ee==null?void 0:Ee.cellClass)=="function"?Ee.cellClass(_e,nt):(Ee==null?void 0:Ee.cellClass)||(Ee==null?void 0:Ee.class),bt=_.td({class:ae(["cms-table-cell",ut,me(Ee==null?void 0:Ee.nowrap,"is-nowrap")]),style:dt});let ot=E(Ee==null?void 0:Ee.slots,"cell",nt,null);if(!ot.length){const At=typeof(Ee==null?void 0:Ee.render)=="function"?Ee.render(_e,nt):typeof(Ee==null?void 0:Ee.format)=="function"?Ee.format(tt,_e,nt):tt,at=At==null?(vt=Ee==null?void 0:Ee.emptyText)!=null?vt:"":At;ot=E(s,"cell",nt,at)}ot.length||(ot=[""]),ot.forEach(At=>bt.appendChild(At)),Ze.appendChild(bt)}),U){const Ee={...Pe},Be=typeof e.actions=="function"?e.actions(_e,Pe):e.actions;let tt=E(s,"actions",Ee,Be);tt.length||(tt=E(null,"default",Ee,Be)),Ze.appendChild(_.td({class:"cms-table-cell cms-table-cell-actions",style:{textAlign:"right"}},_.div({class:"cms-table-actions"},...tt)))}P.appendChild(Ze)}},"UI.Table:render"),ce.body=le,v.Card(ce)},(Ti=JSswift.isDev)!=null&&Ti.call(JSswift)&&(v.meta=v.meta||{},v.meta.Table={signature:"UI.Table(props)",props:{columns:"Array<{ key, label?, sortable?, get?, value?, render?, format?, width?, minWidth?, maxWidth?, align?, compare?, style?, headerStyle?, thStyle?, cellStyle?, tdStyle?, cellClass?, headerClass?, nowrap?, searchable? }>",rows:"Array|() => Array",rowKey:"string|((row)=>string)",loading:"boolean|() => boolean",page:"number",pageSize:"number",pageSizeOptions:"number[]",pagination:"boolean",initialSort:"{ key, dir: 'asc'|'desc' }",search:"string",query:"string",searchable:"boolean|string",searchPlaceholder:"string",searchKeys:"Array<string|function>",searchModel:"[get,set] signal",filter:"(row, ctx)=>boolean",actions:"(row, ctx)=>Node|Array",actionsLabel:"string|Node|Function|Array",emptyText:"string|Node|Function|Array",loadingText:"string|Node|Function|Array",toolbar:"Node|Function|Array",toolbarStart:"Node|Function|Array",toolbarEnd:"Node|Function|Array",caption:"string|Node|Function|Array",footer:"Node|Function|Array",status:"string|Node|Function|Array",rowClass:"string|((row,ctx)=>string)",rowAttrs:"object|((row,ctx)=>object)",minTableWidth:"string|number",stickyHeader:"boolean",hideHeader:"boolean",hideFooter:"boolean",dense:"boolean",striped:"boolean",hover:"boolean",tableClass:"string",cardClass:"string",class:"string",style:"object"},slots:{default:"Introductory content above the table",toolbarStart:"Toolbar left area",toolbar:"Central/custom toolbar",toolbarEnd:"Toolbar right area",search:"Replaces the built-in search box",header:"Custom column header",cell:"Global cell renderer",actions:"Global row actions renderer",actionsHeader:"Actions column header",caption:"Caption above the table",status:"Extra content in the status row",loading:"Loading state",empty:"Empty state",footer:"Extra content in the footer"},events:{onRowClick:"(row, ctx, event) => void",onRowDblClick:"(row, ctx, event) => void"},returns:"HTMLDivElement",description:"Standardized table with toolbar, search, sorting, pagination, states, and flexible rendering."}),v.Menu=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=["primary","secondary","warning","danger","success","info","light","dark"],c=["xs","sm","md","lg","xl"];let y={...e},a=null,l=null,b=null,R=null,C=null;const w=(u,k)=>Object.prototype.hasOwnProperty.call(u||{},k),T=(u,k)=>typeof u=="function"?u(k):u,ee=u=>String(u||"").split(/\s+/).filter(Boolean),K=u=>u&&typeof u=="object"&&!u.nodeType&&!Array.isArray(u)&&!(u instanceof Function),re=u=>!!u&&typeof u=="object"&&(u.nodeType===1||typeof u.getBoundingClientRect=="function"),H=()=>{clearTimeout(R),clearTimeout(C),R=null,C=null},j=(u,k,I)=>{if(!u)return;const B=u[k]||[];B.length&&u.classList.remove(...B);const pe=(I||[]).filter(Boolean);pe.length&&u.classList.add(...pe),u[k]=pe},Y=(u,k,I,B=pe=>pe)=>{if(u){if(I==null||I===""){u.style.removeProperty(k);return}u.style.setProperty(k,B(I))}},W=()=>y||{},ie=u=>{var I;const k=String(o((I=u.state)!=null?I:u.color)||"").toLowerCase();return i.includes(k)?k:""},ge=u=>{const k=String(o(u.size)||"").toLowerCase();return c.includes(k)?k:""},ce=u=>{var k,I;return String(o((I=(k=u.placement)!=null?k:u.position)!=null?I:"bottom-start"))},le=()=>{var I;const u=o((I=W().delay)!=null?I:W().showDelay),k=Number(u);return Number.isFinite(k)?Math.max(0,k):0},oe=()=>{const u=o(W().hideDelay),k=Number(u);return Number.isFinite(k)?Math.max(0,k):80},ne=(u=null)=>{var I,B,pe;if(u)return u;const k=W();return l||o((pe=(B=(I=k.anchorEl)!=null?I:k.triggerEl)!=null?B:k.target)!=null?pe:k.anchor)||null},J=u=>{if(u==null||u===!0)return new Set(["click"]);if(u===!1)return new Set(["manual"]);const k=Array.isArray(u)?u:String(u).split(/[\s,|/]+/),I=new Set;return k.forEach(B=>{const pe=String(B||"").trim().toLowerCase();pe&&(pe==="mouseenter"||pe==="mouseover"?I.add("hover"):pe==="blur"||pe==="focusin"?I.add("focus"):pe==="tap"?I.add("click"):I.add(pe))}),I.size?I:new Set(["manual"])},Z=(u,k)=>{var pe,Se,ye;let I=null,B=null;if(re(u))I=u,K(k)&&(B=k);else if(K(u)){B=u;const V=(ye=(Se=(pe=u.anchorEl)!=null?pe:u.triggerEl)!=null?Se:u.target)!=null?ye:u.anchor;re(V)&&(I=V)}else u!=null&&(I=u);return{anchorEl:I,nextProps:B}},X=(u=a==null?void 0:a.panel)=>{var k;return Array.from(((k=u==null?void 0:u.querySelectorAll)==null?void 0:k.call(u,"[data-menu-item]:not([disabled]):not([tabindex='-1']), .cms-menu-item:not([disabled]):not([tabindex='-1']), [role='menuitem']:not([disabled]):not([tabindex='-1']), a[href]:not([tabindex='-1']), button:not([disabled]):not([tabindex='-1'])"))||[]).filter(I=>I.offsetParent!==null&&I.getAttribute("aria-hidden")!=="true")},ue=()=>{o(W().autoFocus)!==!1&&setTimeout(()=>{const u=X();if(!u.length)return;(u.find(I=>I.classList.contains("is-active")||I.classList.contains("is-selected")||I.classList.contains("is-checked"))||u[0]).focus()},0)},F=(u,k,I="sm")=>{const B=T(u,k);return B==null?[]:typeof B=="string"?[v.Icon({name:B,size:I})]:Ln(B,{...k,as:"icon"})},f=(u,k)=>{var fe,Fe,Te,$,_e,Re,Pe,De,We,qe,Ze,Qe,Ee;const I=T(u,k);if(I==null||I===!1)return[];if(Array.isArray(I))return I.flatMap((Be,tt)=>f(Be,{...k,index:tt}));if(typeof I=="function")return f(I(k),k);if(I!=null&&I.nodeType)return[I];if(typeof I=="string"||typeof I=="number")return f({label:I},k);if(!K(I))return Ln(I,{...k,as:"item"});const B=String((Fe=(fe=I.type)!=null?fe:I.kind)!=null?Fe:"").toLowerCase();if(B==="separator"||B==="divider"||I.separator===!0||I.divider===!0)return[_.div({class:"cms-menu-divider",role:"separator"})];const pe=(Te=I.items)!=null?Te:I.children;if((B==="group"||B==="section"||Array.isArray(pe))&&pe!=null){const Be={...k,item:I},tt=E(s,"groupLabel",Be,T(($=I.label)!=null?$:I.title,Be)),nt=f(pe,Be);return nt.length?[_.div({class:ae(["cms-menu-group",I.class])},tt.length?_.div({class:"cms-menu-group-label"},...tt):null,_.div({class:"cms-menu-group-items"},...nt))]:[]}const Se={...k,item:I,close:Q,dismiss:Q,open:x,toggle:U,update:r,isOpen:G,entry:()=>a,anchorEl:ne(),props:W()},ye=!!o(I.disabled),V=I.checked==null?null:!!o(I.checked),D=!!o((_e=I.active)!=null?_e:I.selected),q=ie(I),Ne=o(I.href),ke=o(I.to),te=w(I,"closeOnSelect")?!!o(I.closeOnSelect):I.keepOpen===!0?!1:W().closeOnSelect!==!1,xe=I.role||(V!=null?"menuitemcheckbox":"menuitem"),be=F(I.icon,Se),Ce=F((Re=I.iconRight)!=null?Re:I.endIcon,Se),he=E(s,"itemTitle",Se,T((Pe=I.title)!=null?Pe:I.label,Se)),Le=E(s,"itemSubtitle",Se,T((De=I.subtitle)!=null?De:I.description,Se)),Ae=E(s,"itemShortcut",Se,T(I.shortcut,Se)),z=E(s,"itemBadge",Se,T(I.badge,Se)),we=E(s,"item",Se,T((qe=(We=I.content)!=null?We:I.body)!=null?qe:I.render,Se)),M=[...z,...Ae,...V===!0&&!Ce.length&&!z.length?[_.span({class:"cms-menu-entry-check"},v.Icon({name:I.checkedIcon||"check",size:"sm"}))]:[],...Ce],S={class:ae(["cms-menu-entry","cms-menu-item",q?`cms-state-${q}`:"",me(D,"is-active"),me(V===!0,"is-checked"),me(ye,"is-disabled"),I.class]),role:xe,tabIndex:ye?-1:(Ze=I.tabIndex)!=null?Ze:-1,"data-menu-item":!0,"data-menu-select":te?"true":"false","data-menu-close":I.close===!0?"true":null,"data-menu-keep-open":te?null:"true","aria-disabled":ye?"true":null,"aria-checked":V==null?null:String(V),title:(Ee=(Qe=I.titleAttr)!=null?Qe:I.tooltip)!=null?Ee:null,type:Ne?null:"button",href:Ne||null,target:I.target||null,rel:I.rel||(I.target==="_blank"?"noopener noreferrer":null),onClick:Be=>{var nt,dt,ut,bt;if(ye){Be.preventDefault(),Be.stopPropagation();return}(dt=(nt=W()).onItemClick)==null||dt.call(nt,I,Se,Be);const tt=(ut=I.onClick)==null?void 0:ut.call(I,Se,Be);Be.defaultPrevented||(ke&&((bt=JSswift.router)!=null&&bt.navigate)&&(Be.preventDefault(),JSswift.router.navigate(ke)),tt!==!1&&te&&Q())}};I.attrs&&typeof I.attrs=="object"&&Object.assign(S,I.attrs);const d=Ne?_.a:_.button,L=we.length?we:[he.length?_.div({class:"cms-menu-entry-title"},...he):null,Le.length?_.div({class:"cms-menu-entry-subtitle"},...Le):null].filter(Boolean);return[d(S,be.length?_.span({class:"cms-menu-entry-icon"},...be):null,_.span({class:"cms-menu-entry-main"},...L),M.length?_.span({class:"cms-menu-entry-aside"},...M):null)]},m=()=>{var he,Le,Ae,z,we,M,N;const u=W(),k={close:Q,dismiss:Q,open:x,toggle:U,update:r,isOpen:G,entry:()=>a,anchorEl:ne(),props:u},I=F(u.icon,k,u.iconSize||"md"),B=E(s,"eyebrow",k,T(u.eyebrow,k)),pe=E(s,"title",k,T((Le=(he=u.title)!=null?he:u.heading)!=null?Le:u.label,k)),Se=E(s,"subtitle",k,T((Ae=u.subtitle)!=null?Ae:u.description,k)),ye=E(s,"before",k,T(u.before,k)),V=E(s,"header",k,T(u.header,k)),D=E(s,"after",k,T(u.after,k)),q=E(s,"footer",k,T(u.footer,k)),Ne=E(s,"status",k,T(u.status,k));let ke=(z=u.content)!=null?z:u.body;ke==null&&n&&n.length&&(ke=n);let te=E(s,"content",k,T(ke,k));te.length||(te=E(s,"body",k,T(ke,k))),te.length||(te=E(s,"default",k,T(ke,k)));const xe=f((M=(we=u.items)!=null?we:u.actionsList)!=null?M:u.entries,k),be=xe.length?[]:E(s,"empty",k,T((N=u.empty)!=null?N:u.emptyText,k));let Ce=null;return V.length?Ce=_.div({class:ae(["cms-menu-head","cms-menu-head-custom",u.headerClass])},...V):(I.length||B.length||pe.length||Se.length)&&(Ce=_.div({class:ae(["cms-menu-head",u.headerClass])},I.length?_.div({class:"cms-menu-head-icon"},...I):null,_.div({class:"cms-menu-head-main"},B.length?_.div({class:"cms-menu-eyebrow"},...B):null,pe.length?_.div({class:"cms-menu-title"},...pe):null,Se.length?_.div({class:"cms-menu-subtitle"},...Se):null))),_.div({class:ae(["cms-menu","cms-menu-shell",me(u.dense,"dense"),me(xe.length>0,"has-items"),me(q.length>0||Ne.length>0,"has-footer"),u.class]),style:u.style||{},role:u.role||"menu","aria-label":u.ariaLabel||null},ye.length?_.div({class:"cms-menu-before"},...ye):null,Ce,te.length?_.div({class:ae(["cms-menu-content",u.contentClass])},...te):null,xe.length?_.div({class:ae(["cms-menu-items",u.itemsClass])},...xe):null,!xe.length&&be.length?_.div({class:"cms-menu-empty"},...be):null,D.length?_.div({class:"cms-menu-after"},...D):null,Ne.length||q.length?_.div({class:ae(["cms-menu-footer",u.footerClass])},Ne.length?_.div({class:"cms-menu-status"},...Ne):null,q.length?_.div({class:"cms-menu-footer-actions"},...q):null):null)},g=u=>{var pe;if(!(u!=null&&u.panel))return;const k=W(),I=ie(k),B=ge(k);j(u.panel,"_menuClassTokens",["cms-menu-panel","cms-clear-set","cms-singularity",B?`cms-menu-${B}`:"",I?`cms-state-${I}`:"",o(k.outline)?"outline":"",...ee(k.panelClass)]),j(u.overlay,"_menuOverlayClassTokens",[...ee(k.overlayClass)]),u.panel.dataset.placement=ce(k),Y(u.panel,"--cms-menu-width",o(k.width),$e),Y(u.panel,"--cms-menu-min-width",o(k.minWidth),$e),Y(u.panel,"--cms-menu-max-width",o(k.maxWidth),$e),Y(u.panel,"--cms-menu-max-height",o(k.maxHeight),$e),Y(u.panel,"--cms-menu-body-max-height",o((pe=k.bodyMaxHeight)!=null?pe:k.contentMaxHeight),$e),k.panelStyle&&Object.assign(u.panel.style,k.panelStyle),Ke(u.panel,k)},O=()=>{a!=null&&a.panel&&a.panel.replaceChildren(m())},Q=()=>{if(H(),!a)return;const u=a;a=null,wn(u,()=>JSswift.overlay.close(u.id))},r=(u={})=>{var k,I,B,pe;if(u&&typeof u=="object"&&(y={...y,...u}),a){const Se=W();g(a),O(),(pe=a.reposition)==null||pe.call(a,{anchorEl:a._anchorEl,placement:ce(Se),offsetX:(k=Se.offsetX)!=null?k:0,offsetY:(B=(I=Se.offsetY)!=null?I:Se.offset)!=null?B:8}),ue()}return A},x=(u=null,k=null)=>{var Ce,he,Le,Ae,z,we,M,N,S,d,L,fe,Fe,Te,$,_e;H();const{anchorEl:I,nextProps:B}=Z(u,k);B&&(y={...y,...B});const pe=W(),Se=ne(I);if(!Se||o(pe.disabled))return null;if(a&&a._anchorEl===Se){const Re=W();return g(a),O(),(Ae=a.reposition)==null||Ae.call(a,{anchorEl:a._anchorEl,placement:ce(Re),offsetX:(Ce=Re.offsetX)!=null?Ce:0,offsetY:(Le=(he=Re.offsetY)!=null?he:Re.offset)!=null?Le:8}),ue(),a}a&&Q(),b=document.activeElement;let ye=null;if(a=JSswift.overlay.open(()=>m(),{type:"menu",anchorEl:Se,placement:ce(pe),offsetX:(z=pe.offsetX)!=null?z:0,offsetY:(M=(we=pe.offsetY)!=null?we:pe.offset)!=null?M:8,backdrop:pe.backdrop===!0,lockScroll:pe.lockScroll===!0,trapFocus:pe.trapFocus===!0,autoFocus:!1,closeOnOutside:pe.closeOnOutside!==!1,closeOnBackdrop:(N=pe.closeOnBackdrop)!=null?N:pe.backdrop===!0,closeOnEsc:pe.closeOnEsc!==!1,className:Ht(["cms-menu-panel"]),onClose:()=>{var Re,Pe,De;(Re=ye==null?void 0:ye._menuCleanup)==null||Re.call(ye),(De=(Pe=W()).onClose)==null||De.call(Pe,ye),W().returnFocus!==!1&&b&&typeof b.focus=="function"&&setTimeout(()=>b.focus(),0)}}),!(a!=null&&a.panel))return a;const V=a;ye=V,V._anchorEl=Se;const D=()=>{clearTimeout(C),C=null},q=()=>{P()},Ne=Re=>{const Pe=Re.target;if(!Pe||!Pe.closest)return;if(Pe.closest("[data-menu-close]")){Q();return}if(W().closeOnSelect===!1)return;const De=Pe.closest("[data-menu-item], [data-menu-select], .cms-menu-item, [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'], a[href], button:not([disabled])");De&&(De.closest("[data-menu-keep-open]")||De.getAttribute("data-menu-select")!=="false"&&Q())},ke=Re=>{if(Re.key==="Escape"){Re.preventDefault(),Q();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(Re.key))return;const Pe=X(V.panel);if(!Pe.length)return;Re.preventDefault();const De=Pe.indexOf(document.activeElement);if(Re.key==="Home"){Pe[0].focus();return}if(Re.key==="End"){Pe[Pe.length-1].focus();return}const We=Re.key==="ArrowDown"?1:-1,qe=De<0?We>0?0:Pe.length-1:(De+We+Pe.length)%Pe.length;Pe[qe].focus()};V.panel.addEventListener("click",Ne),V.panel.addEventListener("keydown",ke);const te=J((d=(S=pe.trigger)!=null?S:pe.triggers)!=null?d:w(pe,"open")?"manual":null),xe=te.has("hover"),be=te.has("focus");return(xe||be)&&(V.panel.addEventListener("mouseenter",D),V.panel.addEventListener("mouseleave",q),V.panel.addEventListener("focusin",D),V.panel.addEventListener("focusout",q)),V._menuCleanup=()=>{var Re,Pe,De,We,qe,Ze;(Re=V.panel)==null||Re.removeEventListener("click",Ne),(Pe=V.panel)==null||Pe.removeEventListener("keydown",ke),(De=V.panel)==null||De.removeEventListener("mouseenter",D),(We=V.panel)==null||We.removeEventListener("mouseleave",q),(qe=V.panel)==null||qe.removeEventListener("focusin",D),(Ze=V.panel)==null||Ze.removeEventListener("focusout",q)},g(V),(Te=V.reposition)==null||Te.call(V,{anchorEl:Se,placement:ce(pe),offsetX:(L=pe.offsetX)!=null?L:0,offsetY:(Fe=(fe=pe.offsetY)!=null?fe:pe.offset)!=null?Fe:8}),yn(V),(_e=($=W()).onOpen)==null||_e.call($,V),ue(),V},p=(u,k=null)=>{clearTimeout(C),C=null,clearTimeout(R),R=setTimeout(()=>x(u,k),le())},P=(u=!1)=>{if(clearTimeout(R),R=null,!!a){if(clearTimeout(C),u){Q();return}C=setTimeout(()=>Q(),oe())}},U=(u=null,k=null)=>G()?(Q(),null):x(u,k),G=()=>!!a,A={open:x,close:Q,show:p,hide:P,toggle:U,update:r,bind:u=>{var q,Ne;if(!u)return()=>{};l=u;const k=W(),I=J((Ne=(q=k.trigger)!=null?q:k.triggers)!=null?Ne:w(k,"open")?"manual":null),B=I.has("hover"),pe=I.has("focus"),Se=I.has("click"),ye=I.has("manual")||!B&&!pe&&!Se,V=[],D=()=>{H(),V.forEach(ke=>ke()),l===u&&(l=null)};if(w(k,"open"))return rt(k.open)?JSswift.reactive.effect(()=>{l&&(o(W().open)?x(l):P(!0))},"UI.Menu:open"):k.open===!0?x(u):k.open===!1&&P(!0),D;if(ye||o(k.disabled))return D;if(B){const ke=()=>p(u),te=()=>P();u.addEventListener("mouseenter",ke),u.addEventListener("mouseleave",te),V.push(()=>{u.removeEventListener("mouseenter",ke),u.removeEventListener("mouseleave",te)})}if(pe){const ke=()=>p(u),te=()=>P();u.addEventListener("focus",ke),u.addEventListener("blur",te),V.push(()=>{u.removeEventListener("focus",ke),u.removeEventListener("blur",te)})}if(Se){const ke=te=>{var xe,be;(be=(xe=W()).onTriggerClick)==null||be.call(xe,te),!te.defaultPrevented&&U(u)};u.addEventListener("click",ke),V.push(()=>u.removeEventListener("click",ke))}return D},isOpen:G,entry:()=>a,props:()=>({...y})};return A},(Pi=JSswift.isDev)!=null&&Pi.call(JSswift)&&(v.meta=v.meta||{},v.meta.Menu={signature:"UI.Menu(props) | UI.Menu(props, ...children) -> { open, close, show, hide, toggle, update, bind, isOpen }",props:{title:"String|Node|Function|Array|({ close })=>Node",subtitle:"String|Node|Function|Array|({ close })=>Node",eyebrow:"String|Node|Function|Array|({ close })=>Node",icon:"String|Node|Function|Array",content:"Node|Function|Array|({ close })=>Node",body:"Alias of content",items:"Array<string|object>|Function|Array",before:"Node|Function|Array",after:"Node|Function|Array",footer:"Node|Function|Array",status:"Node|Function|Array",empty:"Node|Function|Array",size:"xs|sm|md|lg|xl",state:"primary|secondary|warning|danger|success|info|light|dark",color:"Alias of state",trigger:"click|hover|focus|manual|Array",placement:"string",offsetX:"number",offsetY:"number",offset:"Alias of offsetY",width:"string|number",minWidth:"string|number",maxWidth:"string|number",maxHeight:"string|number",bodyMaxHeight:"string|number",contentMaxHeight:"Alias of bodyMaxHeight",closeOnSelect:"boolean",closeOnOutside:"boolean",closeOnEsc:"boolean",autoFocus:"boolean",anchorEl:"HTMLElement|VirtualAnchor",triggerEl:"Alias of anchorEl",target:"Alias of anchorEl",slots:"{ before?, icon?, eyebrow?, title?, subtitle?, header?, content?, body?, item?, itemTitle?, itemSubtitle?, itemBadge?, itemShortcut?, groupLabel?, empty?, status?, footer?, after?, default? }",class:"string",panelClass:"string",overlayClass:"string",style:"object",panelStyle:"object",onOpen:"function",onClose:"function",onItemClick:"(item, ctx, event) => void",onTriggerClick:"function"},slots:{before:"Region above header/body ({ close })",icon:"Menu icon",eyebrow:"Menu eyebrow ({ close })",title:"Menu title ({ close })",subtitle:"Menu subtitle ({ close })",header:"Header custom ({ close })",content:"Custom content ({ close })",body:"Alias of content ({ close })",item:"Custom item body ({ item, close })",itemTitle:"Item title ({ item, close })",itemSubtitle:"Item subtitle ({ item, close })",itemBadge:"Item badge ({ item, close })",itemShortcut:"Item shortcut ({ item, close })",groupLabel:"Group label ({ item, close })",empty:"Empty state ({ close })",status:"Status row ({ close })",footer:"Footer actions ({ close })",after:"Region below body/footer ({ close })",default:"Fallback content ({ close })"},events:{onOpen:"void",onClose:"void",onItemClick:"item click"},returns:"Object { open(), close(), show(), hide(), toggle(), update(), bind(), isOpen() }",description:"Standardized menu overlay with item model, rich slots, bindable triggers, header/footer, and imperative API."}),v.Popover=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t),s=e.slots||{},i=["primary","secondary","warning","danger","success","info","light","dark"],c=["xs","sm","md","lg","xl"];let y={...e},a=null,l=null,b=null,R=null,C=null;const w=(A,u)=>Object.prototype.hasOwnProperty.call(A||{},u),T=(A,u)=>typeof A=="function"?A(u):A,ee=A=>String(A||"").split(/\s+/).filter(Boolean),K=A=>A&&typeof A=="object"&&!A.nodeType&&!Array.isArray(A)&&!(A instanceof Function),re=A=>!!A&&typeof A=="object"&&(A.nodeType===1||typeof A.getBoundingClientRect=="function"),H=()=>{clearTimeout(R),clearTimeout(C),R=null,C=null},j=(A,u,k)=>{if(!A)return;const I=A[u]||[];I.length&&A.classList.remove(...I);const B=(k||[]).filter(Boolean);B.length&&A.classList.add(...B),A[u]=B},Y=(A,u,k,I=B=>B)=>{if(A){if(k==null||k===""){A.style.removeProperty(u);return}A.style.setProperty(u,I(k))}},W=()=>y,ie=A=>{var k;const u=o((k=A.state)!=null?k:A.color);return u?i.includes(u)?u:String(u):""},ge=A=>{const u=o(A.size);return typeof u=="string"&&c.includes(u)?u:""},ce=A=>{var k,I,B;const u=String(o((B=(I=(k=A.actionsAlign)!=null?k:A.footerAlign)!=null?I:A.alignActions)!=null?B:"end")).toLowerCase();return["start","left"].includes(u)?"start":["center","middle"].includes(u)?"center":["between","space-between"].includes(u)?"between":["stretch","full"].includes(u)?"stretch":"end"},le=A=>{var u,k;return String(o((k=(u=A.placement)!=null?u:A.position)!=null?k:"bottom-start"))},oe=(A,u)=>{const k=o(A);if(k==null||k==="")return u;const I=Number(k);return Number.isFinite(I)?I:u},ne=()=>oe(W().delay,0),J=()=>oe(W().hideDelay,120),Z=A=>{var k,I;return((I=(k=A.closable)!=null?k:A.dismissible)!=null?I:A.closeButton)===!0},X=(A=null)=>{var k,I,B;if(A)return A;const u=W();return l||o((B=(I=(k=u.anchorEl)!=null?k:u.triggerEl)!=null?I:u.target)!=null?B:u.anchor)||null},ue=A=>{if(A==null||A===!0)return new Set(["click"]);if(A===!1)return new Set(["manual"]);const u=Array.isArray(A)?A:String(A).split(/[\s,|/]+/),k=new Set;return u.forEach(I=>{const B=String(I||"").trim().toLowerCase();B&&(B==="mouseenter"||B==="mouseover"?k.add("hover"):B==="blur"||B==="focusin"?k.add("focus"):B==="tap"?k.add("click"):k.add(B))}),k.size?k:new Set(["manual"])},F=(A,u)=>{var B,pe,Se;let k=null,I=null;if(re(A))k=A,K(u)&&(I=u);else if(K(A)){I=A;const ye=(Se=(pe=(B=A.anchorEl)!=null?B:A.triggerEl)!=null?pe:A.target)!=null?Se:A.anchor;re(ye)&&(k=ye)}else A!=null&&(k=A);return{anchorEl:k,nextProps:I}},f=()=>{var be,Ce,he,Le,Ae,z,we,M,N;const A=W(),u={close:O,dismiss:O,open:r,toggle:P,update:Q,isOpen:U,entry:()=>a,anchorEl:X(),props:A},k=A.icon!=null?typeof A.icon=="string"?v.Icon({name:A.icon,size:A.iconSize||"md"}):JSswift.ui.slot(A.icon,{as:"icon"}):null,I=E(s,"eyebrow",u,T(A.eyebrow,u)),B=E(s,"title",u,T((Ce=(be=A.title)!=null?be:A.heading)!=null?Ce:A.label,u)),pe=E(s,"subtitle",u,T((he=A.subtitle)!=null?he:A.description,u)),Se=E(s,"icon",u,k),ye=E(s,"header",u,T((Ae=(Le=A.headerContent)!=null?Le:A.head)!=null?Ae:A.header,u)),V=Z(A)?E(s,"close",u,v.Btn({class:"cms-dialog-close",size:"sm",outline:!0,"aria-label":A.closeLabel||"Chiudi popover","data-popover-close":!0},v.Icon({name:A.closeIcon||"close",size:"sm"}))):[];let D=(M=(we=(z=A.content)!=null?z:A.body)!=null?we:A.message)!=null?M:A.text;D==null&&n&&n.length&&(D=n);let q=E(s,"content",u,T(D,u));q.length||(q=E(s,"body",u,T(D,u))),q.length||(q=E(s,"default",u,T(D,u)));const Ne=T((N=A.footer)!=null?N:A.actions,u);let ke=E(s,"footer",u,Ne);ke.length||(ke=E(s,"actions",u,Ne));let te=null;ye.length?te=_.div({class:"cms-dialog-head cms-dialog-head-custom"},...ye):(I.length||B.length||pe.length||Se.length||V.length)&&(te=_.div({class:"cms-dialog-head"},Se.length?_.div({class:"cms-dialog-icon"},...Se):null,_.div({class:"cms-dialog-head-main"},I.length?_.div({class:"cms-dialog-eyebrow"},...I):null,B.length?_.div({class:"cms-dialog-title"},...B):null,pe.length?_.div({class:"cms-dialog-subtitle"},...pe):null),V.length?_.div({class:"cms-dialog-close-wrap"},...V):null));const xe=[];return te&&xe.push(te),q.length&&xe.push(_.div({class:ae(["cms-dialog-body",A.bodyClass])},...q)),ke.length&&xe.push(_.div({class:ae(["cms-dialog-actions",`is-${ce(A)}`,me(A.stackActions,"is-stacked"),A.actionsClass,A.footerClass])},...ke)),xe.length||xe.push(_.div({class:ae(["cms-dialog-body",A.bodyClass])})),_.div({class:ae(["cms-dialog-shell","cms-popover-shell",me(!!te,"has-head"),me(ke.length>0,"has-footer"),me(A.divider!==!1,"with-divider")])},...xe)},m=A=>{var B;if(!(A!=null&&A.panel))return;const u=W(),k=ie(u),I=ge(u);j(A.panel,"_popoverClassTokens",["cms-dialog","cms-popover","cms-singularity","cms-clear-set",I?`cms-dialog-${I}`:"",k,k?`cms-state-${k}`:"",o(u.scrollable)?"scrollable":"",o(u.stickyHeader)?"sticky-head":"",o(u.stickyActions)?"sticky-actions":"",o(u.borderless)?"borderless":"",...ee(u.class),...ee(u.panelClass)]),j(A.overlay,"_popoverOverlayClassTokens",[...ee(u.overlayClass)]),A.panel.dataset.placement=le(u),Y(A.panel,"--cms-dialog-width",o(u.width),$e),Y(A.panel,"--cms-dialog-min-width",o(u.minWidth),$e),Y(A.panel,"--cms-dialog-max-width",o(u.maxWidth),$e),Y(A.panel,"--cms-dialog-max-height",o(u.maxHeight),$e),Y(A.panel,"--cms-dialog-body-max-height",o((B=u.bodyMaxHeight)!=null?B:u.contentMaxHeight),$e),u.style&&Object.assign(A.panel.style,u.style),Ke(A.panel,u),A.panel.setAttribute("role",u.role||"dialog"),A.panel.setAttribute("aria-modal",u.modal===!0?"true":"false"),u.ariaLabel?A.panel.setAttribute("aria-label",u.ariaLabel):A.panel.removeAttribute("aria-label")},g=()=>{a!=null&&a.panel&&a.panel.replaceChildren(f())},O=()=>{if(H(),!a)return;const A=a;a=null,wn(A,()=>JSswift.overlay.close(A.id))},Q=(A={})=>(A&&typeof A=="object"&&(y={...y,...A}),a&&(m(a),g()),de),r=(A=null,u=null)=>{var xe,be,Ce,he,Le,Ae,z,we;H();const{anchorEl:k,nextProps:I}=F(A,u);I&&(y={...y,...I});const B=W(),pe=X(k);if(!pe||o(B.disabled))return null;if(a&&a._anchorEl===pe)return m(a),g(),a;a&&O(),b=document.activeElement;const Se=ue((be=(xe=B.trigger)!=null?xe:B.triggers)!=null?be:w(B,"open")?"manual":null),ye=Se.has("hover"),V=Se.has("focus");let D=null;if(a=JSswift.overlay.open(()=>f(),{type:"popover",anchorEl:pe,placement:le(B),offsetX:(Ce=B.offsetX)!=null?Ce:0,offsetY:(Le=(he=B.offsetY)!=null?he:B.offset)!=null?Le:10,backdrop:B.backdrop===!0,lockScroll:B.lockScroll===!0,trapFocus:B.trapFocus===!0,autoFocus:B.autoFocus===!0,closeOnOutside:B.closeOnOutside!==!1,closeOnBackdrop:(Ae=B.closeOnBackdrop)!=null?Ae:B.backdrop===!0,closeOnEsc:B.closeOnEsc!==!1,className:Ht(["cms-dialog","cms-popover"]),onClose:()=>{var M,N,S;(M=D==null?void 0:D._popoverCleanup)==null||M.call(D),(S=(N=W()).onClose)==null||S.call(N,D),W().returnFocus!==!1&&b&&typeof b.focus=="function"&&setTimeout(()=>b.focus(),0)}}),!(a!=null&&a.panel))return a;const q=a;D=q,q._anchorEl=pe;const Ne=()=>{clearTimeout(C),C=null},ke=()=>{!ye&&!V||p()},te=M=>{const N=M.target;if(!(!N||!N.closest)){if(N.closest("[data-popover-close]")||N.closest("[data-dialog-close]")){O();return}W().closeOnSelect===!0&&N.closest("[data-popover-select]")&&O()}};return q.panel.addEventListener("click",te),(ye||V)&&(q.panel.addEventListener("mouseenter",Ne),q.panel.addEventListener("mouseleave",ke),q.panel.addEventListener("focusin",Ne),q.panel.addEventListener("focusout",ke)),q._popoverCleanup=()=>{var M,N,S,d,L;(M=q.panel)==null||M.removeEventListener("click",te),(N=q.panel)==null||N.removeEventListener("mouseenter",Ne),(S=q.panel)==null||S.removeEventListener("mouseleave",ke),(d=q.panel)==null||d.removeEventListener("focusin",Ne),(L=q.panel)==null||L.removeEventListener("focusout",ke)},m(q),yn(q),(we=(z=W()).onOpen)==null||we.call(z,q),q},x=(A,u=null)=>{clearTimeout(C),C=null,clearTimeout(R),R=setTimeout(()=>r(A,u),ne())},p=(A=!1)=>{if(clearTimeout(R),R=null,!!a){if(clearTimeout(C),A){O();return}C=setTimeout(()=>O(),J())}},P=(A=null,u=null)=>U()?(O(),null):r(A,u),U=()=>!!a,de={open:r,close:O,show:x,hide:p,toggle:P,update:Q,bind:A=>{var D,q;if(!A)return()=>{};l=A;const u=W(),k=ue((q=(D=u.trigger)!=null?D:u.triggers)!=null?q:w(u,"open")?"manual":null),I=k.has("hover"),B=k.has("focus"),pe=k.has("click"),Se=k.has("manual")||!I&&!B&&!pe,ye=[],V=()=>{H(),ye.forEach(Ne=>Ne()),l===A&&(l=null)};if(w(u,"open"))return rt(u.open)?JSswift.reactive.effect(()=>{l&&(o(W().open)?r(l):p(!0))},"UI.Popover:open"):u.open===!0?r(A):u.open===!1&&p(!0),V;if(Se||o(u.disabled))return V;if(I){const Ne=()=>x(A),ke=()=>p();A.addEventListener("mouseenter",Ne),A.addEventListener("mouseleave",ke),ye.push(()=>{A.removeEventListener("mouseenter",Ne),A.removeEventListener("mouseleave",ke)})}if(B){const Ne=()=>x(A),ke=()=>p();A.addEventListener("focus",Ne),A.addEventListener("blur",ke),ye.push(()=>{A.removeEventListener("focus",Ne),A.removeEventListener("blur",ke)})}if(pe){const Ne=ke=>{var te,xe;(xe=(te=W()).onTriggerClick)==null||xe.call(te,ke),!ke.defaultPrevented&&P(A)};A.addEventListener("click",Ne),ye.push(()=>A.removeEventListener("click",Ne))}return V},isOpen:U,entry:()=>a,props:()=>({...y})};return de},(Ei=JSswift.isDev)!=null&&Ei.call(JSswift)&&(v.meta=v.meta||{},v.meta.Popover={signature:"UI.Popover(props) | UI.Popover(props, ...children) -> { open, close, show, hide, toggle, update, bind, isOpen }",props:{title:"String|Node|Function|Array|({ close })=>Node",subtitle:"String|Node|Function|Array|({ close })=>Node",eyebrow:"String|Node|Function|Array|({ close })=>Node",icon:"String|Node|Function|Array",content:"Node|Function|Array|({ close })=>Node",body:"Alias of content",actions:"Node|Function|Array|({ close })=>Node",footer:"Alias of actions",size:"xs|sm|md|lg|xl",state:"primary|secondary|warning|danger|success|info|light|dark",color:"Alias of state",trigger:"click|hover|focus|manual|Array",placement:"string",offsetX:"number",offsetY:"number",offset:"Alias of offsetY",width:"string|number",minWidth:"string|number",maxWidth:"string|number",maxHeight:"string|number",bodyMaxHeight:"string|number",contentMaxHeight:"Alias of bodyMaxHeight",backdrop:"boolean",lockScroll:"boolean",trapFocus:"boolean",autoFocus:"boolean",closeButton:"boolean",closable:"boolean",closeOnSelect:"boolean",closeOnOutside:"boolean",closeOnBackdrop:"boolean",closeOnEsc:"boolean",open:"boolean|rod|signal",anchorEl:"HTMLElement|VirtualAnchor",triggerEl:"Alias of anchorEl",target:"Alias of anchorEl",slots:"{ icon?, eyebrow?, title?, subtitle?, header?, content?, body?, footer?, actions?, close?, default? }",class:"string",panelClass:"string",overlayClass:"string",style:"object",onOpen:"function",onClose:"function",onTriggerClick:"function"},slots:{icon:"Popover icon",eyebrow:"Popover eyebrow ({ close })",title:"Popover title ({ close })",subtitle:"Popover subtitle ({ close })",header:"Header custom ({ close })",content:"Popover body ({ close })",body:"Alias of content ({ close })",footer:"Popover footer ({ close })",actions:"Alias of footer ({ close })",close:"Close button slot ({ close })",default:"Fallback body ({ close })"},events:{onOpen:"void",onClose:"void"},returns:"Object { open(), close(), show(), hide(), toggle(), update(), bind(), isOpen() }",description:"Standardized anchored popover with rich layout, complete slots, bindable triggers, and imperative API."}),v.ContextMenu=(...t)=>{const{props:e,children:n}=JSswift.uiNormalizeArgs(t);let s={...e},i=null,c=null,y=null;const a=g=>g&&typeof g=="object"&&!g.nodeType&&!Array.isArray(g)&&!(g instanceof Function),l=g=>!!g&&typeof g=="object"&&(g.nodeType===1||typeof g.getBoundingClientRect=="function"),b=g=>!!g&&typeof g=="object"&&("clientX"in g||"type"in g||"target"in g||"currentTarget"in g),R=g=>!!g&&Number.isFinite(Number(g.x))&&Number.isFinite(Number(g.y)),C=()=>s,w=(g,O)=>{const Q=Number(g),r=Number(O);return!Number.isFinite(Q)||!Number.isFinite(r)?null:{x:Q,y:r}},T=g=>g?{_cmsContextPoint:g,getBoundingClientRect:()=>({top:g.y,bottom:g.y,left:g.x,right:g.x,width:0,height:0})}:null,ee=g=>{if(!l(g))return null;const O=g.getBoundingClientRect();return w(O.left+Math.min(O.width/2,24),O.top+Math.min(O.height/2,24))},K=g=>{var O,Q,r,x;return o((x=(r=(Q=(O=g==null?void 0:g.anchorEl)!=null?O:g==null?void 0:g.triggerEl)!=null?Q:g==null?void 0:g.target)!=null?r:g==null?void 0:g.anchor)!=null?x:null)},re=(g,O=null)=>{if(!g)return ee(O||y);const Q=w(g.clientX,g.clientY);if(Q)return Q;const r=K({anchorEl:O||g.currentTarget||g.target||y});return ee(r)},H=(g={})=>{if(!a(g))return{};const O={...g};return delete O.event,delete O.point,delete O.x,delete O.y,O},j=()=>{var O,Q,r;const g=C();return{...g,trigger:"manual",placement:g.placement||"bottom-start",offsetX:(O=g.offsetX)!=null?O:0,offsetY:(r=(Q=g.offsetY)!=null?Q:g.offset)!=null?r:4,closeOnOutside:g.closeOnOutside!==!1,closeOnEsc:g.closeOnEsc!==!1,role:g.role||"menu",ariaLabel:g.ariaLabel||g.title||"Context menu",class:ae(["cms-context-menu-shell",g.class]),panelClass:ae(["cms-context-menu-panel",g.panelClass])}},Y=v.Menu(j(),...n),W=(g=null,O=null,Q=null)=>{let r=null,x=null,p=null;if(b(g))r=re(g,y),p=a(O)?H(O):null;else if(typeof g=="number"||typeof O=="number")r=w(g,O),p=a(Q)?H(Q):null;else if(R(g))r=w(g.x,g.y),p=a(O)?H(O):null;else if(l(g))x=g,p=a(O)?H(O):null;else if(a(g)){const P=R(g.point)?g.point:R(g)?g:null,U=K(g),G=g.event;r=P?w(P.x,P.y):re(G,U||y),x=U&&l(U)?U:null,p={...H(g),...a(O)?H(O):{}}}else i&&(r={...i});return{point:r,anchor:x,nextProps:p}},ie=(g,O=null)=>{c=g||c,i=O||g&&g._cmsContextPoint||i},ge=(g=null)=>{a(g)&&Object.keys(g).length&&(s={...s,...g})},ce=(g=null,O=null)=>{if(O)return T(O);if(g&&l(g))return g;const Q=K(C());return l(Q)?Q:i?T(i):l(c)?c:l(y)?y:null},le=(g=null,O=null,Q=null)=>{const{point:r,anchor:x,nextProps:p}=W(g,O,Q);ge(p);const P=ce(x,r);return P?(ie(P,r),Y.open(P,j())):null},oe=(g,O,Q=null)=>le(g,O,Q),ne=(g,O=null)=>le(g,O),J=()=>(Y.close(),m),Z=(g=!0)=>(g===!1?Y.hide(!1):Y.close(),m),X=(g=null,O=null,Q=null)=>le(g,O,Q),ue=(g=null,O=null,Q=null)=>Y.isOpen()?(J(),null):le(g,O,Q),F=(g={})=>(ge(H(g)),Y.update(j()),m),m={open:le,openAt:oe,openFromEvent:ne,show:X,hide:Z,close:J,toggle:ue,update:F,bind:(g,O=null)=>{if(!g)return()=>{};const Q=a(O)?H(O):null,r=p=>{var U,G;y=g,p.preventDefault(),!(((G=(U=C()).onTrigger)==null?void 0:G.call(U,p,{element:g,open:le,close:J,update:F}))===!1||o(C().disabled))&&le({event:p,anchorEl:g},Q)},x=p=>{var U,G;p.key!=="ContextMenu"&&!(p.shiftKey&&p.key==="F10")||(y=g,p.preventDefault(),((G=(U=C()).onTrigger)==null?void 0:G.call(U,p,{element:g,open:le,close:J,update:F}))===!1||o(C().disabled))||le({event:p,anchorEl:g},Q)};return g.addEventListener("contextmenu",r),g.addEventListener("keydown",x),()=>{g.removeEventListener("contextmenu",r),g.removeEventListener("keydown",x)}},isOpen:Y.isOpen,entry:Y.entry,props:()=>({...s})};return m},(Mi=JSswift.isDev)!=null&&Mi.call(JSswift)&&(v.meta=v.meta||{},v.meta.ContextMenu={signature:"UI.ContextMenu(props) | UI.ContextMenu(props, ...children) -> { open, openAt, openFromEvent, show, hide, close, toggle, update, bind, isOpen }",props:{title:"String|Node|Function|Array|({ close })=>Node",subtitle:"String|Node|Function|Array|({ close })=>Node",eyebrow:"String|Node|Function|Array|({ close })=>Node",icon:"String|Node|Function|Array",content:"Node|Function|Array|({ close })=>Node",body:"Alias of content",items:"Array<string|object>|Function|Array",before:"Node|Function|Array",after:"Node|Function|Array",footer:"Node|Function|Array",status:"Node|Function|Array",empty:"Node|Function|Array",size:"xs|sm|md|lg|xl",state:"primary|secondary|warning|danger|success|info|light|dark",color:"Alias of state",placement:"string",offsetX:"number",offsetY:"number",offset:"Alias of offsetY",width:"string|number",minWidth:"string|number",maxWidth:"string|number",maxHeight:"string|number",bodyMaxHeight:"string|number",contentMaxHeight:"Alias of bodyMaxHeight",closeOnSelect:"boolean",closeOnOutside:"boolean",closeOnEsc:"boolean",anchorEl:"HTMLElement|VirtualAnchor",triggerEl:"Alias of anchorEl",target:"Alias of anchorEl",slots:"{ before?, icon?, eyebrow?, title?, subtitle?, header?, content?, body?, item?, itemTitle?, itemSubtitle?, itemBadge?, itemShortcut?, groupLabel?, empty?, status?, footer?, after?, default? }",class:"string",panelClass:"string",overlayClass:"string",style:"object",panelStyle:"object",onOpen:"function",onClose:"function",onItemClick:"(item, ctx, event) => void",onTrigger:"(event, ctx) => boolean|void"},slots:{before:"Region above header/body ({ close })",icon:"Context icon",eyebrow:"Context eyebrow ({ close })",title:"Context title ({ close })",subtitle:"Context subtitle ({ close })",header:"Header custom ({ close })",content:"Context menu content ({ close })",body:"Alias of content ({ close })",item:"Custom item body ({ item, close })",itemTitle:"Item title ({ item, close })",itemSubtitle:"Item subtitle ({ item, close })",itemBadge:"Item badge ({ item, close })",itemShortcut:"Item shortcut ({ item, close })",groupLabel:"Group label ({ item, close })",empty:"Empty state ({ close })",status:"Status row ({ close })",footer:"Footer actions ({ close })",after:"Region below body/footer ({ close })",default:"Fallback content ({ close })"},events:{onOpen:"void",onClose:"void",onItemClick:"item click",onTrigger:"contextmenu / keyboard trigger"},returns:"Object { open(), openAt(), openFromEvent(), show(), hide(), close(), toggle(), update(), bind(), isOpen() }",description:"Menu specialization for right-click and context-menu key interactions, with items, rich slots, runtime overrides, and coordinate-based positioning."})})(JSswift);
|