@wsxjs/wsx-base-components 0.0.28 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("@wsxjs/wsx-core"),mt=':host{position:relative;display:inline-flex;padding:.25em .625em;box-sizing:border-box;vertical-align:middle;line-height:1.8;overflow:hidden;align-items:center;justify-content:center;font-size:14px;color:var(--fontColor, #333);border-radius:var(--borderRadius, .25em);background:var(--fontColor, #333);transition:background .3s,box-shadow .3s,border-color .3s,color .3s}:host([size="xxxs"]){padding:.03125em .0625em;font-size:6px;line-height:1;min-width:10px;min-height:8px;border-radius:1px}:host([size="xxs"]){padding:.0625em .125em;font-size:8px;line-height:1.1;min-width:14px;min-height:12px;border-radius:2px}:host([size="xs"]){padding:.125em .25em;font-size:10px;line-height:1.2;min-width:18px;min-height:16px;border-radius:3px}:host([size="sm"]){padding:.25em .5em;font-size:12px;line-height:1.4;min-width:24px;min-height:20px;border-radius:4px}:host([size="md"]){padding:.375em .75em;font-size:14px;line-height:1.5;min-width:32px;min-height:28px;border-radius:6px}:host([size="lg"]){padding:.5em 1em;font-size:14px;line-height:1.6;min-width:40px;min-height:32px;border-radius:6px}:host([size="xl"]){padding:.625em 1.25em;font-size:16px;line-height:1.6;min-width:48px;min-height:40px;border-radius:8px}:host([shape="circle"]){border-radius:50%}:host([disabled]),:host([loading]){pointer-events:none;opacity:.6}:host([block]){display:flex}:host([disabled]:not([variant])){background:#0000001a}:host([disabled]) .btn,:host([loading]) .btn{cursor:not-allowed;pointer-events:all}:host(:not([variant="primary"]):not([variant="danger"]):not([disabled]):hover),:host(:not([variant="primary"]):not([variant="danger"]):focus-within),:host([variant="flat"][focus]){color:var(--themeColor, #42b983);border-color:var(--themeColor, #42b983)}:host(:not([variant="primary"]):not([variant="danger"])) .btn:after{background-image:radial-gradient(circle,var(--themeColor, #42b983) 10%,transparent 10.01%)}:host([variant="primary"]){color:#fff;background:var(--themeBackground, var(--themeColor, #42b983))}:host([variant="danger"]){color:#fff;background:var(--themeBackground, var(--dangerColor, #ff7875))}:host([variant="dashed"]){border-style:dashed}:host([variant="flat"]),:host([variant="primary"]),:host([variant="danger"]){border:0;padding:calc(.25em + 1px) calc(.625em + 1px)}:host([variant="flat"]) .btn:before{content:"";position:absolute;background:var(--themeColor, #42b983);pointer-events:none;left:0;right:0;top:0;bottom:0;opacity:0;transition:.3s}:host([variant="flat"]:not([disabled]):hover) .btn:before{opacity:.1}:host(:not([disabled]):hover){z-index:1}:host([variant="flat"]:focus-within) .btn:before,:host([variant="flat"][focus]) .btn:before{opacity:.2}.btn{background:none;outline:0;border:0;position:absolute;left:0;top:0;width:100%;height:100%;padding:0;-webkit-user-select:none;user-select:none;cursor:unset}.loading{margin-right:.35em}::-moz-focus-inner{border:0}.btn:before{content:"";display:block;position:absolute;width:100%;height:100%;left:0;top:0;transition:.2s;background:#fff;opacity:0}:host(:not([disabled]):active) .btn:before{opacity:.2}.btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--x, 0);top:var(--y, 0);pointer-events:none;background-image:radial-gradient(circle,#fff 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}.btn:not([disabled]):active:after{transform:translate(-50%,-50%) scale(0);opacity:.3;transition:0s}.icon{margin-right:.35em;transition:none}:host(:empty) .icon{margin:auto}:host(:empty){padding:.65em}:host([type="flat"]:empty),:host([type="primary"]:empty){padding:calc(.65em + 1px)}::slotted(.icon){transition:none}:host([href]){cursor:pointer}';var Te;let Oe,_e;function K(t,e,r){return(e=Ie(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:ue(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||ue(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return kt(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Ie(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Ie(t){var e=yt(t,"string");return typeof e=="symbol"?e:e+""}function yt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function ue(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function kt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}_e=[O.autoRegister({tagName:"wsx-button"})];exports.Button=void 0;class xt extends O.WebComponent{static get observedAttributes(){return["disabled","icon","loading","href","type","target","rel","download","toggle","checked","variant","shape","block","size"]}constructor(e={}){super({styleName:"wsx-button",...e}),K(this,"_autoStyles",mt),K(this,"disabled",!1),K(this,"loading",!1),K(this,"toggle",!1),K(this,"checked",!1),K(this,"icon",null),K(this,"href",null),K(this,"type",null),K(this,"target","_blank"),K(this,"rel",null),K(this,"download",null),K(this,"variant","flat"),K(this,"size","md"),K(this,"btnElement",void 0),K(this,"iconElement",void 0),K(this,"loadingElement",void 0),K(this,"handleMouseDown",r=>{if(this.disabled)return;const o=this.getBoundingClientRect(),S=r.clientX-o.left,C=r.clientY-o.top;this.style.setProperty("--x",`${S}px`),this.style.setProperty("--y",`${C}px`)}),K(this,"handleKeyDown",r=>{(r.code==="Enter"||r.code==="Space")&&r.stopPropagation()}),K(this,"handleClick",()=>{this.toggle&&!this.disabled&&(this.checked=!this.checked,this.checked?this.setAttr("checked",""):this.removeAttr("checked"))}),this.disabled=e.disabled||!1,this.loading=e.loading||!1,this.toggle=e.toggle||!1,this.checked=e.checked||!1,this.icon=e.icon||null,this.href=e.href||null,this.type=e.type||null,this.target=e.target||"_blank",this.rel=e.rel||null,this.download=e.download||null,this.variant=e.variant||"flat",this.size=e.size||"md"}render(){const e=!!this.href,r=O.jsx("a",{href:this.disabled||this.loading?null:this.href||void 0,target:this.target,rel:this.rel||void 0,download:this.download||void 0,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:S=>{this.btnElement=S,S&&setTimeout(()=>this.updateButtonState(),0)}},this.renderContent()),o=O.jsx("button",{type:this.type||"button",disabled:this.disabled,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:S=>{this.btnElement=S,S&&setTimeout(()=>this.updateButtonState(),0)},"data-wsx-key":"Button-button-text-0"},this.renderContent());return O.jsx("div",{className:"wsx-button-container"},e?r:o)}renderContent(){const e=[];return this.loading&&e.push(O.jsx("div",{className:"loading",ref:r=>{this.loadingElement=r}},"Loading...")),!this.loading&&this.icon&&this.icon!=="null"&&e.push(O.jsx("div",{className:"icon","data-icon":this.icon,ref:r=>{this.iconElement=r}},this.icon)),e.push(O.jsx("slot",null)),e}onConnected(){var e;(e=super.onConnected)==null||e.call(this),this.addEventListener("click",this.handleClick)}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),this.removeEventListener("click",this.handleClick)}onAttributeChanged(e,r,o){switch(e){case"disabled":this.disabled=o!==null,this.rerender();break;case"loading":this.loading=o!==null,this.updateButtonState(),this.rerender();break;case"icon":this.icon=o,this.rerender();break;case"href":this.href=o,this.rerender();break;case"type":this.type=o,this.updateButtonState();break;case"target":this.target=o||"_blank";break;case"rel":this.rel=o;break;case"download":this.download=o;break;case"toggle":this.toggle=o!==null;break;case"checked":this.checked=o!==null;break;case"variant":this.variant=o||"flat";break;case"size":this.size=o||"md";break}}updateButtonState(){this.btnElement&&(this.disabled||this.loading?(this.btnElement.setAttribute("disabled","disabled"),this.href&&this.btnElement instanceof HTMLAnchorElement&&this.btnElement.removeAttribute("href")):(this.btnElement.removeAttribute("disabled"),this.href&&this.btnElement instanceof HTMLAnchorElement&&(this.btnElement.href=this.href)),this.type&&this.btnElement instanceof HTMLButtonElement&&(this.btnElement.type=this.type))}focus(){var e;(e=this.btnElement)==null||e.focus()}get isDisabled(){return this.disabled}set isDisabled(e){e?this.setAttr("disabled",""):this.removeAttr("disabled")}get isLoading(){return this.loading}set isLoading(e){e?this.setAttr("loading",""):this.removeAttr("loading")}get isChecked(){return this.checked}set isChecked(e){e?this.setAttr("checked",""):this.removeAttr("checked")}get buttonIcon(){return this.icon}set buttonIcon(e){e?this.setAttr("icon",e):this.removeAttr("icon")}}Te=xt;[exports.Button,Oe]=vt(Te,[],_e,0,void 0,O.WebComponent).c;Oe();const wt=':host{display:inline-flex}::slotted(wsx-button:not(:first-of-type):not(:last-of-type)){border-radius:0}::slotted(wsx-button){margin:0!important}::slotted(wsx-button:not(:first-of-type)){margin-left:-1px!important}::slotted(wsx-button[type]:not([type="dashed"]):not(:first-of-type)){margin-left:1px!important}::slotted(wsx-button:first-of-type){border-top-right-radius:0;border-bottom-right-radius:0}::slotted(wsx-button:last-of-type){border-top-left-radius:0;border-bottom-left-radius:0}';var Fe;let Re,Le;function he(t,e,r){return(e=Ne(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Et(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:pe(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||pe(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return At(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Ne(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Ne(t){var e=St(t,"string");return typeof e=="symbol"?e:e+""}function St(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function pe(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function At(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}Le=[O.autoRegister({tagName:"wsx-button-group"})];exports.ButtonGroup=void 0;class Ct extends O.WebComponent{static get observedAttributes(){return["disabled"]}constructor(e={}){super({styleName:"wsx-button-group",...e}),he(this,"_autoStyles",wt),he(this,"disabled",!1),this.disabled=e.disabled||!1}render(){return O.jsx("div",{class:"button-group-container"},O.jsx("slot",null))}onAttributeChanged(e,r,o){switch(e){case"disabled":this.disabled=o!==null,setTimeout(()=>{this.updateChildrenDisabledState()},0);break}}onConnected(){var e;(e=super.onConnected)==null||e.call(this),this.updateChildrenDisabledState()}updateChildrenDisabledState(){Array.from(this.children).filter(r=>r.tagName==="WSX-BUTTON").forEach(r=>{this.disabled?r.setAttribute("disabled",""):r.removeAttribute("disabled")})}get isDisabled(){return this.disabled}set isDisabled(e){e?this.setAttr("disabled",""):this.removeAttr("disabled")}getButtons(){const e=this.querySelectorAll("wsx-button");return e.length>0?Array.from(e):Array.from(this.children).filter(r=>r.tagName==="WSX-BUTTON")}enableAll(){this.getButtons().forEach(r=>{r.removeAttribute("disabled")})}disableAll(){this.getButtons().forEach(r=>{r.setAttribute("disabled","")})}}Fe=Ct;[exports.ButtonGroup,Re]=Et(Fe,[],Le,0,void 0,O.WebComponent).c;Re();const se={trace:0,debug:1,info:2,warn:3,error:4,silent:5};function ce(){var t,e;if(typeof process<"u")return process.env.NODE_ENV==="production"||process.env.MODE==="production";try{const r=globalThis;if((e=(t=r.import)==null?void 0:t.meta)!=null&&e.env){const o=r.import.meta.env;return o.MODE==="production"||o.PROD===!0}}catch{}return!1}const ge={name:"WSX",level:ce()?"info":"debug",pretty:!ce()};function te(t,e){return t?`[${t}] ${e}`:e}class Tt{constructor(e,r){this.name=e,this.level=r,this.levelValue=se[r],this.isProd=ce()}shouldLog(e){return this.level==="silent"?!1:se[e]>=this.levelValue}trace(e,...r){if(!this.isProd||this.shouldLog("trace")){const o=te(this.name,e);r.length>0?console.debug(o,...r):console.debug(o)}}debug(e,...r){if(!this.isProd||this.shouldLog("debug")){const o=te(this.name,e);r.length>0?console.debug(o,...r):console.debug(o)}}info(e,...r){if(this.shouldLog("info")){const o=te(this.name,e);r.length>0?console.info(o,...r):console.info(o)}}warn(e,...r){if(this.shouldLog("warn")){const o=te(this.name,e);r.length>0?console.warn(o,...r):console.warn(o)}}error(e,...r){if(this.shouldLog("error")){const o=te(this.name,e);r.length>0?console.error(o,...r):console.error(o)}}setLevel(e){this.level=e,this.levelValue=se[e]}getLevel(){return this.level}}class $e{constructor(e={}){this.name=e.name||ge.name,this.currentLevel=e.level||ge.level,this.nativeLogger=new Tt(this.name,this.currentLevel)}debug(e,...r){this.nativeLogger.debug(e,...r)}info(e,...r){this.nativeLogger.info(e,...r)}warn(e,...r){this.nativeLogger.warn(e,...r)}error(e,...r){this.nativeLogger.error(e,...r)}fatal(e,...r){const o=te(this.name,`[FATAL] ${e}`);r.length>0?console.error(o,...r):console.error(o)}trace(e,...r){this.nativeLogger.trace(e,...r)}setLevel(e){this.currentLevel=e,this.nativeLogger.setLevel(e)}getLevel(){return this.nativeLogger.getLevel()}}new $e;function De(t,e={}){return new $e({...e,name:e.name||`WSX:${t}`})}const ie="editor-js-text-color-cache";function Ot(t){return t.startsWith("var(")&&t.endsWith(")")}function _t(t){return t.slice(4,-1).trim()}function It(t){return getComputedStyle(document.documentElement).getPropertyValue(t).trim()||t}function ne(t){if(Ot(t)){const e=_t(t);return It(e)}return t}function je(t,e){return sessionStorage.setItem(`${ie}-${e}`,JSON.stringify(t)),t}function Me(t,e){sessionStorage.setItem(`${ie}-${e}-custom`,JSON.stringify(t))}function ze(t){const e=sessionStorage.getItem(`${ie}-${t}-custom`);return e?JSON.parse(e):null}function Pe(t,e){let r=null;return(...o)=>{r||(r=setTimeout(()=>{t(...o),r=null},e))}}function Ft(t,e){const r=sessionStorage.getItem(`${ie}-${e}`);return r?JSON.parse(r):t}const Rt="ce-inline-toolbar__dropdown",Lt="ce-conversion-toolbar--showed",Nt='.color-section{display:inline-block;position:relative}.color-popover{display:inline-block;position:relative;overflow:visible}.color-btn{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid #e1e5e9;border-radius:3px;background:var(--theme-color, #000);color:transparent;cursor:pointer;transition:all .2s ease;box-sizing:border-box}.color-btn:hover:not(.disabled){border-color:#3f51b5;box-shadow:0 2px 8px #3f51b54d}.color-btn.disabled{opacity:.5;cursor:not-allowed}.color-indicator{font-size:12px;line-height:1;-webkit-user-select:none;user-select:none}.color-panel{position:absolute;top:100%;left:0;z-index:10000;background:#fff;border:1px solid #e1e5e9;border-radius:6px;box-shadow:0 4px 20px #00000026;padding:8px;margin-top:4px;box-sizing:border-box;transform-origin:top left;animation:colorPanelShow .2s ease-out}@keyframes colorPanelShow{0%{opacity:0;transform:scale(.9) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;min-width:160px}.color-cube{width:20px;height:20px;border:1px solid #e1e5e9;border-radius:3px;cursor:pointer;transition:all .2s ease;box-sizing:border-box;background-color:var(--cube-color, #000)}.color-cube:hover{border-color:#3f51b5;transform:scale(1.1);box-shadow:0 2px 8px #3f51b566;z-index:1}.color-cube:active{transform:scale(.95)}.color-cube.custom-picker{background:linear-gradient(45deg,red,#ff8000,#ff0,#80ff00 42%,#0f0 57%,#00ff80,#0ff 85%,#0080ff);position:relative}.color-cube.custom-picker:after{content:"+";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:12px;font-weight:700;text-shadow:0 0 2px rgba(0,0,0,.8);pointer-events:none}:host([disabled]) .color-btn{opacity:.5;cursor:not-allowed}:host([open]) .color-panel{display:block}:host(:not([open])) .color-panel{display:none}@media (max-width: 768px){.color-panel{position:fixed;top:auto;left:50%;bottom:10px;transform:translate(-50%);width:90vw;max-width:300px}.color-grid{grid-template-columns:repeat(8,1fr);gap:6px}.color-cube{width:24px;height:24px}}@media (prefers-color-scheme: dark){.color-panel{background:#2d2d2d;border-color:#404040;color:#fff}.color-btn,.color-cube{border-color:#404040}}';var Be;let He,Ue;function q(t,e,r){return(e=Ge(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $t(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:be(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||be(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return jt(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Ge(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Ge(t){var e=Dt(t,"string");return typeof e=="symbol"?e:e+""}function Dt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function be(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function jt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}const re=De("ColorPicker"),Mt=["#ff1300","#EC7878","#9C27B0","#673AB7","#3F51B5","#0070FF","#03A9F4","#00BCD4","#4CAF50","#8BC34A","#CDDC39","#FFE500","#FFBF00","#FF9800","#795548","#9E9E9E","#5A5A5A","#FFF"];Ue=[O.autoRegister({tagName:"wsx-color-picker"})];exports.ColorPicker=void 0;class zt extends O.WebComponent{static get observedAttributes(){return["disabled","selected-color","open"]}constructor(e={}){super({styleName:"base-color-picker",...e}),q(this,"_autoStyles",Nt),q(this,"colorCollections",void 0),q(this,"onColorPicked",void 0),q(this,"hasCustomPicker",void 0),q(this,"defaultColor",void 0),q(this,"pluginType",void 0),q(this,"disabled",void 0),q(this,"selectedColor",void 0),q(this,"customColor",void 0),q(this,"isOpen",void 0),q(this,"colorBtn",void 0),q(this,"colorPanel",void 0),q(this,"handleButtonClick",r=>{r.stopPropagation(),this.togglePanel()}),q(this,"handlePanelClick",r=>{r.stopPropagation()}),q(this,"handleColorSelect",r=>{var S;const o=ne(r);this.setSelectedColor(o),this.closePanel(),je(o,this.pluginType),(S=this.onColorPicked)==null||S.call(this,o),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:o},bubbles:!0,composed:!0})),re.debug("Color selected",{color:o})}),q(this,"handleCustomPickerClick",()=>{const r=document.createElement("input");r.type="color",r.value=this.customColor,r.style.cssText=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("@wsxjs/wsx-core"),mt=':host{position:relative;display:inline-flex;padding:.25em .625em;box-sizing:border-box;vertical-align:middle;line-height:1.8;overflow:hidden;align-items:center;justify-content:center;font-size:14px;color:var(--fontColor, #333);border-radius:var(--borderRadius, .25em);background:var(--fontColor, #333);transition:background .3s,box-shadow .3s,border-color .3s,color .3s}:host([size="xxxs"]){padding:.03125em .0625em;font-size:6px;line-height:1;min-width:10px;min-height:8px;border-radius:1px}:host([size="xxs"]){padding:.0625em .125em;font-size:8px;line-height:1.1;min-width:14px;min-height:12px;border-radius:2px}:host([size="xs"]){padding:.125em .25em;font-size:10px;line-height:1.2;min-width:18px;min-height:16px;border-radius:3px}:host([size="sm"]){padding:.25em .5em;font-size:12px;line-height:1.4;min-width:24px;min-height:20px;border-radius:4px}:host([size="md"]){padding:.375em .75em;font-size:14px;line-height:1.5;min-width:32px;min-height:28px;border-radius:6px}:host([size="lg"]){padding:.5em 1em;font-size:14px;line-height:1.6;min-width:40px;min-height:32px;border-radius:6px}:host([size="xl"]){padding:.625em 1.25em;font-size:16px;line-height:1.6;min-width:48px;min-height:40px;border-radius:8px}:host([shape="circle"]){border-radius:50%}:host([disabled]),:host([loading]){pointer-events:none;opacity:.6}:host([block]){display:flex}:host([disabled]:not([variant])){background:#0000001a}:host([disabled]) .btn,:host([loading]) .btn{cursor:not-allowed;pointer-events:all}:host(:not([variant="primary"]):not([variant="danger"]):not([disabled]):hover),:host(:not([variant="primary"]):not([variant="danger"]):focus-within),:host([variant="flat"][focus]){color:var(--themeColor, #42b983);border-color:var(--themeColor, #42b983)}:host(:not([variant="primary"]):not([variant="danger"])) .btn:after{background-image:radial-gradient(circle,var(--themeColor, #42b983) 10%,transparent 10.01%)}:host([variant="primary"]){color:#fff;background:var(--themeBackground, var(--themeColor, #42b983))}:host([variant="danger"]){color:#fff;background:var(--themeBackground, var(--dangerColor, #ff7875))}:host([variant="dashed"]){border-style:dashed}:host([variant="flat"]),:host([variant="primary"]),:host([variant="danger"]){border:0;padding:calc(.25em + 1px) calc(.625em + 1px)}:host([variant="flat"]) .btn:before{content:"";position:absolute;background:var(--themeColor, #42b983);pointer-events:none;left:0;right:0;top:0;bottom:0;opacity:0;transition:.3s}:host([variant="flat"]:not([disabled]):hover) .btn:before{opacity:.1}:host(:not([disabled]):hover){z-index:1}:host([variant="flat"]:focus-within) .btn:before,:host([variant="flat"][focus]) .btn:before{opacity:.2}.btn{background:none;outline:0;border:0;position:absolute;left:0;top:0;width:100%;height:100%;padding:0;-webkit-user-select:none;user-select:none;cursor:unset}.loading{margin-right:.35em}::-moz-focus-inner{border:0}.btn:before{content:"";display:block;position:absolute;width:100%;height:100%;left:0;top:0;transition:.2s;background:#fff;opacity:0}:host(:not([disabled]):active) .btn:before{opacity:.2}.btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--x, 0);top:var(--y, 0);pointer-events:none;background-image:radial-gradient(circle,#fff 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}.btn:not([disabled]):active:after{transform:translate(-50%,-50%) scale(0);opacity:.3;transition:0s}.icon{margin-right:.35em;transition:none}:host(:empty) .icon{margin:auto}:host(:empty){padding:.65em}:host([type="flat"]:empty),:host([type="primary"]:empty){padding:calc(.65em + 1px)}::slotted(.icon){transition:none}:host([href]){cursor:pointer}';var Te;let Oe,_e;function K(t,e,r){return(e=Ie(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:ue(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||ue(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return kt(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Ie(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Ie(t){var e=yt(t,"string");return typeof e=="symbol"?e:e+""}function yt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function ue(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function kt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}_e=[O.autoRegister({tagName:"wsx-button"})];exports.Button=void 0;class xt extends O.WebComponent{static get observedAttributes(){return["disabled","icon","loading","href","type","target","rel","download","toggle","checked","variant","shape","block","size"]}constructor(e={}){super({styleName:"wsx-button",...e}),K(this,"_autoStyles",mt),K(this,"disabled",!1),K(this,"loading",!1),K(this,"toggle",!1),K(this,"checked",!1),K(this,"icon",null),K(this,"href",null),K(this,"type",null),K(this,"target","_blank"),K(this,"rel",null),K(this,"download",null),K(this,"variant","flat"),K(this,"size","md"),K(this,"btnElement",void 0),K(this,"iconElement",void 0),K(this,"loadingElement",void 0),K(this,"handleMouseDown",r=>{if(this.disabled)return;const o=this.getBoundingClientRect(),S=r.clientX-o.left,C=r.clientY-o.top;this.style.setProperty("--x",`${S}px`),this.style.setProperty("--y",`${C}px`)}),K(this,"handleKeyDown",r=>{(r.code==="Enter"||r.code==="Space")&&r.stopPropagation()}),K(this,"handleClick",()=>{this.toggle&&!this.disabled&&(this.checked=!this.checked,this.checked?this.setAttr("checked",""):this.removeAttr("checked"))}),this.disabled=e.disabled||!1,this.loading=e.loading||!1,this.toggle=e.toggle||!1,this.checked=e.checked||!1,this.icon=e.icon||null,this.href=e.href||null,this.type=e.type||null,this.target=e.target||"_blank",this.rel=e.rel||null,this.download=e.download||null,this.variant=e.variant||"flat",this.size=e.size||"md"}render(){const e=!!this.href,r=O.jsx("a",{href:this.disabled||this.loading?null:this.href||void 0,target:this.target,rel:this.rel||void 0,download:this.download||void 0,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:S=>{this.btnElement=S,S&&setTimeout(()=>this.updateButtonState(),0)}},this.renderContent()),o=O.jsx("button",{type:this.type||"button",disabled:this.disabled,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:S=>{this.btnElement=S,S&&setTimeout(()=>this.updateButtonState(),0)}},this.renderContent());return O.jsx("div",{className:"wsx-button-container"},e?r:o)}renderContent(){const e=[];return this.loading&&e.push(O.jsx("div",{className:"loading",ref:r=>{this.loadingElement=r}},"Loading...")),!this.loading&&this.icon&&this.icon!=="null"&&e.push(O.jsx("div",{className:"icon","data-icon":this.icon,ref:r=>{this.iconElement=r}},this.icon)),e.push(O.jsx("slot",null)),e}onConnected(){var e;(e=super.onConnected)==null||e.call(this),this.addEventListener("click",this.handleClick)}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),this.removeEventListener("click",this.handleClick)}onAttributeChanged(e,r,o){switch(e){case"disabled":this.disabled=o!==null,this.rerender();break;case"loading":this.loading=o!==null,this.updateButtonState(),this.rerender();break;case"icon":this.icon=o,this.rerender();break;case"href":this.href=o,this.rerender();break;case"type":this.type=o,this.updateButtonState();break;case"target":this.target=o||"_blank";break;case"rel":this.rel=o;break;case"download":this.download=o;break;case"toggle":this.toggle=o!==null;break;case"checked":this.checked=o!==null;break;case"variant":this.variant=o||"flat";break;case"size":this.size=o||"md";break}}updateButtonState(){this.btnElement&&(this.disabled||this.loading?(this.btnElement.setAttribute("disabled","disabled"),this.href&&this.btnElement instanceof HTMLAnchorElement&&this.btnElement.removeAttribute("href")):(this.btnElement.removeAttribute("disabled"),this.href&&this.btnElement instanceof HTMLAnchorElement&&(this.btnElement.href=this.href)),this.type&&this.btnElement instanceof HTMLButtonElement&&(this.btnElement.type=this.type))}focus(){var e;(e=this.btnElement)==null||e.focus()}get isDisabled(){return this.disabled}set isDisabled(e){e?this.setAttr("disabled",""):this.removeAttr("disabled")}get isLoading(){return this.loading}set isLoading(e){e?this.setAttr("loading",""):this.removeAttr("loading")}get isChecked(){return this.checked}set isChecked(e){e?this.setAttr("checked",""):this.removeAttr("checked")}get buttonIcon(){return this.icon}set buttonIcon(e){e?this.setAttr("icon",e):this.removeAttr("icon")}}Te=xt;[exports.Button,Oe]=vt(Te,[],_e,0,void 0,O.WebComponent).c;Oe();const wt=':host{display:inline-flex}::slotted(wsx-button:not(:first-of-type):not(:last-of-type)){border-radius:0}::slotted(wsx-button){margin:0!important}::slotted(wsx-button:not(:first-of-type)){margin-left:-1px!important}::slotted(wsx-button[type]:not([type="dashed"]):not(:first-of-type)){margin-left:1px!important}::slotted(wsx-button:first-of-type){border-top-right-radius:0;border-bottom-right-radius:0}::slotted(wsx-button:last-of-type){border-top-left-radius:0;border-bottom-left-radius:0}';var Fe;let Re,Le;function he(t,e,r){return(e=Ne(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Et(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:pe(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||pe(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return At(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Ne(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Ne(t){var e=St(t,"string");return typeof e=="symbol"?e:e+""}function St(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function pe(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function At(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}Le=[O.autoRegister({tagName:"wsx-button-group"})];exports.ButtonGroup=void 0;class Ct extends O.WebComponent{static get observedAttributes(){return["disabled"]}constructor(e={}){super({styleName:"wsx-button-group",...e}),he(this,"_autoStyles",wt),he(this,"disabled",!1),this.disabled=e.disabled||!1}render(){return O.jsx("div",{class:"button-group-container"},O.jsx("slot",null))}onAttributeChanged(e,r,o){switch(e){case"disabled":this.disabled=o!==null,setTimeout(()=>{this.updateChildrenDisabledState()},0);break}}onConnected(){var e;(e=super.onConnected)==null||e.call(this),this.updateChildrenDisabledState()}updateChildrenDisabledState(){Array.from(this.children).filter(r=>r.tagName==="WSX-BUTTON").forEach(r=>{this.disabled?r.setAttribute("disabled",""):r.removeAttribute("disabled")})}get isDisabled(){return this.disabled}set isDisabled(e){e?this.setAttr("disabled",""):this.removeAttr("disabled")}getButtons(){const e=this.querySelectorAll("wsx-button");return e.length>0?Array.from(e):Array.from(this.children).filter(r=>r.tagName==="WSX-BUTTON")}enableAll(){this.getButtons().forEach(r=>{r.removeAttribute("disabled")})}disableAll(){this.getButtons().forEach(r=>{r.setAttribute("disabled","")})}}Fe=Ct;[exports.ButtonGroup,Re]=Et(Fe,[],Le,0,void 0,O.WebComponent).c;Re();const se={trace:0,debug:1,info:2,warn:3,error:4,silent:5};function ce(){var t,e;if(typeof process<"u")return process.env.NODE_ENV==="production"||process.env.MODE==="production";try{const r=globalThis;if((e=(t=r.import)==null?void 0:t.meta)!=null&&e.env){const o=r.import.meta.env;return o.MODE==="production"||o.PROD===!0}}catch{}return!1}const ge={name:"WSX",level:ce()?"info":"debug",pretty:!ce()};function te(t,e){return t?`[${t}] ${e}`:e}class Tt{constructor(e,r){this.name=e,this.level=r,this.levelValue=se[r],this.isProd=ce()}shouldLog(e){return this.level==="silent"?!1:se[e]>=this.levelValue}trace(e,...r){if(!this.isProd||this.shouldLog("trace")){const o=te(this.name,e);r.length>0?console.debug(o,...r):console.debug(o)}}debug(e,...r){if(!this.isProd||this.shouldLog("debug")){const o=te(this.name,e);r.length>0?console.debug(o,...r):console.debug(o)}}info(e,...r){if(this.shouldLog("info")){const o=te(this.name,e);r.length>0?console.info(o,...r):console.info(o)}}warn(e,...r){if(this.shouldLog("warn")){const o=te(this.name,e);r.length>0?console.warn(o,...r):console.warn(o)}}error(e,...r){if(this.shouldLog("error")){const o=te(this.name,e);r.length>0?console.error(o,...r):console.error(o)}}setLevel(e){this.level=e,this.levelValue=se[e]}getLevel(){return this.level}}class $e{constructor(e={}){this.name=e.name||ge.name,this.currentLevel=e.level||ge.level,this.nativeLogger=new Tt(this.name,this.currentLevel)}debug(e,...r){this.nativeLogger.debug(e,...r)}info(e,...r){this.nativeLogger.info(e,...r)}warn(e,...r){this.nativeLogger.warn(e,...r)}error(e,...r){this.nativeLogger.error(e,...r)}fatal(e,...r){const o=te(this.name,`[FATAL] ${e}`);r.length>0?console.error(o,...r):console.error(o)}trace(e,...r){this.nativeLogger.trace(e,...r)}setLevel(e){this.currentLevel=e,this.nativeLogger.setLevel(e)}getLevel(){return this.nativeLogger.getLevel()}}new $e;function De(t,e={}){return new $e({...e,name:e.name||`WSX:${t}`})}const ie="editor-js-text-color-cache";function Ot(t){return t.startsWith("var(")&&t.endsWith(")")}function _t(t){return t.slice(4,-1).trim()}function It(t){return getComputedStyle(document.documentElement).getPropertyValue(t).trim()||t}function ne(t){if(Ot(t)){const e=_t(t);return It(e)}return t}function je(t,e){return sessionStorage.setItem(`${ie}-${e}`,JSON.stringify(t)),t}function Me(t,e){sessionStorage.setItem(`${ie}-${e}-custom`,JSON.stringify(t))}function ze(t){const e=sessionStorage.getItem(`${ie}-${t}-custom`);return e?JSON.parse(e):null}function Pe(t,e){let r=null;return(...o)=>{r||(r=setTimeout(()=>{t(...o),r=null},e))}}function Ft(t,e){const r=sessionStorage.getItem(`${ie}-${e}`);return r?JSON.parse(r):t}const Rt="ce-inline-toolbar__dropdown",Lt="ce-conversion-toolbar--showed",Nt='.color-section{display:inline-block;position:relative}.color-popover{display:inline-block;position:relative;overflow:visible}.color-btn{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid #e1e5e9;border-radius:3px;background:var(--theme-color, #000);color:transparent;cursor:pointer;transition:all .2s ease;box-sizing:border-box}.color-btn:hover:not(.disabled){border-color:#3f51b5;box-shadow:0 2px 8px #3f51b54d}.color-btn.disabled{opacity:.5;cursor:not-allowed}.color-indicator{font-size:12px;line-height:1;-webkit-user-select:none;user-select:none}.color-panel{position:absolute;top:100%;left:0;z-index:10000;background:#fff;border:1px solid #e1e5e9;border-radius:6px;box-shadow:0 4px 20px #00000026;padding:8px;margin-top:4px;box-sizing:border-box;transform-origin:top left;animation:colorPanelShow .2s ease-out}@keyframes colorPanelShow{0%{opacity:0;transform:scale(.9) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;min-width:160px}.color-cube{width:20px;height:20px;border:1px solid #e1e5e9;border-radius:3px;cursor:pointer;transition:all .2s ease;box-sizing:border-box;background-color:var(--cube-color, #000)}.color-cube:hover{border-color:#3f51b5;transform:scale(1.1);box-shadow:0 2px 8px #3f51b566;z-index:1}.color-cube:active{transform:scale(.95)}.color-cube.custom-picker{background:linear-gradient(45deg,red,#ff8000,#ff0,#80ff00 42%,#0f0 57%,#00ff80,#0ff 85%,#0080ff);position:relative}.color-cube.custom-picker:after{content:"+";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:12px;font-weight:700;text-shadow:0 0 2px rgba(0,0,0,.8);pointer-events:none}:host([disabled]) .color-btn{opacity:.5;cursor:not-allowed}:host([open]) .color-panel{display:block}:host(:not([open])) .color-panel{display:none}@media (max-width: 768px){.color-panel{position:fixed;top:auto;left:50%;bottom:10px;transform:translate(-50%);width:90vw;max-width:300px}.color-grid{grid-template-columns:repeat(8,1fr);gap:6px}.color-cube{width:24px;height:24px}}@media (prefers-color-scheme: dark){.color-panel{background:#2d2d2d;border-color:#404040;color:#fff}.color-btn,.color-cube{border-color:#404040}}';var Be;let He,Ue;function q(t,e,r){return(e=Ge(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $t(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:be(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||be(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return jt(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Ge(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Ge(t){var e=Dt(t,"string");return typeof e=="symbol"?e:e+""}function Dt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function be(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function jt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}const re=De("ColorPicker"),Mt=["#ff1300","#EC7878","#9C27B0","#673AB7","#3F51B5","#0070FF","#03A9F4","#00BCD4","#4CAF50","#8BC34A","#CDDC39","#FFE500","#FFBF00","#FF9800","#795548","#9E9E9E","#5A5A5A","#FFF"];Ue=[O.autoRegister({tagName:"wsx-color-picker"})];exports.ColorPicker=void 0;class zt extends O.WebComponent{static get observedAttributes(){return["disabled","selected-color","open"]}constructor(e={}){super({styleName:"base-color-picker",...e}),q(this,"_autoStyles",Nt),q(this,"colorCollections",void 0),q(this,"onColorPicked",void 0),q(this,"hasCustomPicker",void 0),q(this,"defaultColor",void 0),q(this,"pluginType",void 0),q(this,"disabled",void 0),q(this,"selectedColor",void 0),q(this,"customColor",void 0),q(this,"isOpen",void 0),q(this,"colorBtn",void 0),q(this,"colorPanel",void 0),q(this,"handleButtonClick",r=>{r.stopPropagation(),this.togglePanel()}),q(this,"handlePanelClick",r=>{r.stopPropagation()}),q(this,"handleColorSelect",r=>{var S;const o=ne(r);this.setSelectedColor(o),this.closePanel(),je(o,this.pluginType),(S=this.onColorPicked)==null||S.call(this,o),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:o},bubbles:!0,composed:!0})),re.debug("Color selected",{color:o})}),q(this,"handleCustomPickerClick",()=>{const r=document.createElement("input");r.type="color",r.value=this.customColor,r.style.cssText=`
2
2
  position: fixed;
3
3
  left: -9999px;
4
4
  opacity: 0;
5
5
  pointer-events: none;
6
- `;const o=Pe(S=>{var A;const C=S.target,E=ne(C.value);this.setSelectedColor(E),this.setCustomColor(E),document.body.removeChild(r),(A=this.onColorPicked)==null||A.call(this,E),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:E},bubbles:!0,composed:!0})),re.debug("Custom color selected",{color:E})},30);r.addEventListener("input",o),document.body.appendChild(r),requestAnimationFrame(()=>{r.focus(),r.click()})}),q(this,"handleDocumentClick",r=>{this.isOpen&&!this.contains(r.target)&&this.closePanel()}),this.colorCollections=e.colorCollections||Mt,this.onColorPicked=e.onColorPicked,this.hasCustomPicker=e.hasCustomPicker||!1,this.pluginType=e.pluginType||"text",this.disabled=e.disabled||!1,this.defaultColor=ne(e.defaultColor||this.colorCollections[0]),this.selectedColor=this.defaultColor,this.customColor=ze(this.pluginType)||"",this.isOpen=!1,re.debug("ColorPicker initialized",{colorCollections:this.colorCollections.length,hasCustomPicker:this.hasCustomPicker,pluginType:this.pluginType})}render(){const e=this.renderColorButton(),r=this.isOpen?this.renderColorPanel():null;return O.jsx("section",{class:"color-section"},O.jsx("div",{class:"color-popover"},e,r))}renderColorButton(){return O.jsx("wsx-button",{type:"button",class:`color-btn ${this.disabled?"disabled":""}`,style:`--theme-color: ${this.selectedColor}`,disabled:this.disabled,onClick:this.handleButtonClick,ref:e=>{this.colorBtn=e}},O.jsx("span",{class:"color-indicator"},"_"))}renderColorPanel(){return O.jsx("div",{class:"color-panel",onClick:this.handlePanelClick,ref:e=>{this.colorPanel=e}},O.jsx("div",{class:"color-grid"},this.hasCustomPicker?this.renderCustomPicker():null,this.renderColorButtons()))}renderCustomPicker(){return O.jsx("wsx-button",{type:"button",class:"color-cube custom-picker",style:{backgroundColor:this.customColor},onClick:this.handleCustomPickerClick,title:"自定义颜色"})}renderColorButtons(){return this.colorCollections.map(e=>O.jsx("wsx-button",{key:e,type:"button",class:"color-cube",style:`background-color: ${e}`,"data-color":e,title:e,onClick:()=>this.handleColorSelect(e)}))}togglePanel(){this.setOpen(!this.isOpen)}closePanel(){this.setOpen(!1)}setSelectedColor(e){this.selectedColor=e,this.setAttr("selected-color",e),this.updateColorButton()}setCustomColor(e){this.customColor=e,Me(e,this.pluginType)}setOpen(e){this.isOpen=e,e?this.setAttr("open",""):this.removeAttr("open"),this.rerender()}updateColorButton(){this.colorBtn&&this.colorBtn.style.setProperty("--theme-color",this.selectedColor)}onConnected(){var e;(e=super.onConnected)==null||e.call(this),document.addEventListener("click",this.handleDocumentClick),re.info("ColorPicker connected to DOM")}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),document.removeEventListener("click",this.handleDocumentClick),re.info("ColorPicker disconnected from DOM")}onAttributeChanged(e,r,o){switch(e){case"disabled":this.disabled=o!==null,this.rerender();break;case"selected-color":o&&o!==this.selectedColor&&(this.selectedColor=o,this.updateColorButton());break;case"open":this.isOpen=o!==null;break}}getSelectedColor(){return this.selectedColor}setColor(e){this.setSelectedColor(ne(e))}focus(){var e;(e=this.colorBtn)==null||e.focus()}}Be=zt;[exports.ColorPicker,He]=$t(Be,[],Ue,0,void 0,O.WebComponent).c;He();const Pt=":host{display:block}.theme-switcher-container{position:relative;display:flex;align-items:center}.theme-switcher-btn{width:var(--theme-switcher-width, 2.5rem);height:var(--theme-switcher-height, 2.5rem);padding:var(--theme-switcher-padding, .5rem);border-radius:var(--theme-switcher-border-radius, 8px);background:var(--theme-switcher-bg, #dc2626);border:var(--theme-switcher-border, none);color:var(--theme-switcher-color, white);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--theme-switcher-transition, .3s ease);box-shadow:var(--theme-switcher-shadow, 0 4px 15px rgba(220, 38, 38, .4));font-weight:var(--theme-switcher-font-weight, 600);font-family:var(--theme-switcher-font-family, inherit)}.theme-switcher-btn:hover{background:var(--theme-switcher-hover-bg, #b91c1c);transform:var(--theme-switcher-hover-transform, translateY(-2px));box-shadow:var(--theme-switcher-hover-shadow, 0 8px 25px rgba(220, 38, 38, .5))}.theme-switcher-btn:active{transform:var(--theme-switcher-active-transform, translateY(0))}.theme-switcher-icon{font-size:var(--theme-switcher-icon-size, 1rem);line-height:1;transition:transform var(--theme-switcher-icon-transition, .3s ease)}.theme-switcher-btn:hover .theme-switcher-icon{transform:var(--theme-switcher-icon-hover-transform, rotate(360deg))}.theme-switcher-btn[data-theme=light]{background:var(--theme-switcher-light-bg, #dc2626);color:var(--theme-switcher-light-color, white)}.theme-switcher-btn[data-theme=light]:hover{background:var(--theme-switcher-light-hover-bg, #b91c1c)}.theme-switcher-btn[data-theme=dark]{background:var(--theme-switcher-dark-bg, #dc2626);color:var(--theme-switcher-dark-color, white)}.theme-switcher-btn[data-theme=dark]:hover{background:var(--theme-switcher-dark-hover-bg, #b91c1c)}.theme-switcher-btn[data-theme=auto]{background:var(--theme-switcher-auto-bg, linear-gradient(135deg, #dc2626, #b91c1c));color:var(--theme-switcher-auto-color, white)}.theme-switcher-btn[data-theme=auto]:hover{background:var(--theme-switcher-auto-hover-bg, linear-gradient(135deg, #b91c1c, #991b1b))}@media (max-width: 768px){.theme-switcher-btn{width:var(--theme-switcher-mobile-width, 2rem);height:var(--theme-switcher-mobile-height, 2rem)}.theme-switcher-icon{font-size:var(--theme-switcher-mobile-icon-size, .9rem)}}";var We;let Ve,Ye;function le(t,e,r){return(e=Ke(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:fe(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||fe(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return Ut(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Ke(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Ke(t){var e=Ht(t,"string");return typeof e=="symbol"?e:e+""}function Ht(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function fe(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function Ut(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}Ye=[O.autoRegister({tagName:"wsx-theme-switcher"})];exports.ThemeSwitcher=void 0;class Gt extends O.WebComponent{constructor(){super({styleName:"theme-switcher"}),le(this,"_autoStyles",Pt),le(this,"currentTheme","auto"),le(this,"toggleTheme",()=>{const e=["auto","light","dark"],o=(e.indexOf(this.currentTheme)+1)%e.length;this.setTheme(e[o])}),this.initTheme()}render(){return O.jsx("div",{class:"theme-switcher-container"},O.jsx("button",{class:"theme-switcher-btn","data-theme":this.currentTheme,onClick:this.toggleTheme,title:`当前主题: ${this.getThemeLabel()}`,"data-wsx-key":"ThemeSwitcher-button-text-1"},O.jsx("span",{class:"theme-switcher-icon"},this.getThemeIcon())))}getThemeIcon(){const r=document.documentElement.classList.contains("dark");return this.currentTheme==="auto"?r?"🌙":"☀️":this.currentTheme==="light"?"☀️":"🌙"}getThemeLabel(){return{light:"浅色",dark:"深色",auto:"自动"}[this.currentTheme]}setTheme(e){this.currentTheme=e;const r=document.documentElement;e==="auto"?(r.removeAttribute("class"),this.checkSystemTheme()):r.className=e,localStorage.setItem("wsx-theme",e),this.rerender()}checkSystemTheme(){const e=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.className=e?"dark":""}initTheme(){const e=localStorage.getItem("wsx-theme")||"auto";this.setTheme(e),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r=>{this.currentTheme==="auto"&&(document.documentElement.className=r.matches?"dark":"")})}}We=Gt;[exports.ThemeSwitcher,Ve]=Bt(We,[],Ye,0,void 0,O.WebComponent).c;Ve();const me=":host{display:inline-block;position:relative}.dropdown-container{position:relative;display:inline-block}.dropdown-button{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem .75rem;min-width:120px;background:var(--dropdown-bg, rgba(255, 255, 255, .1));border:1px solid var(--dropdown-border, rgba(255, 255, 255, .2));border-radius:var(--dropdown-border-radius, .5rem);color:var(--dropdown-color, currentColor);cursor:pointer;font-size:.875rem;font-weight:500;transition:all .2s ease;text-align:left}.dropdown-button:hover:not(.disabled){background:var(--dropdown-hover-bg, rgba(255, 255, 255, .15));border-color:var(--dropdown-hover-border, rgba(255, 255, 255, .3))}.dropdown-button:focus:not(.disabled){outline:2px solid var(--dropdown-focus-color, var(--focus-color, #dc2626));outline-offset:2px}.dropdown-button.open{background:var(--dropdown-open-bg, rgba(255, 255, 255, .2))}.dropdown-button.disabled{opacity:.5;cursor:not-allowed}.dropdown-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-arrow{font-size:.625rem;opacity:.7;transition:transform .2s ease;flex-shrink:0}.dropdown-button.open .dropdown-arrow{transform:rotate(180deg)}.dropdown-menu{position:absolute;z-index:1000;min-width:160px;max-width:300px;max-height:300px;overflow-y:auto;background:var(--dropdown-menu-bg, #ffffff);border:1px solid var(--dropdown-menu-border, #e5e7eb);border-radius:var(--dropdown-border-radius, .5rem);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;padding:.25rem;margin:.25rem 0 0}[data-theme=dark] .dropdown-menu{background:var(--dropdown-menu-bg-dark, #1f2937);border-color:var(--dropdown-menu-border-dark, #374151)}.dropdown-menu.dropdown-top{bottom:100%;margin:0 0 .25rem}.dropdown-menu.dropdown-bottom{top:100%;margin:.25rem 0 0}.dropdown-menu.dropdown-left{left:0}.dropdown-menu.dropdown-right{right:0}.dropdown-menu.dropdown-center{left:50%;transform:translate(-50%)}.dropdown-menu.dropdown-top.dropdown-center{transform:translate(-50%) translateY(-100%)}.dropdown-option{display:flex;align-items:center;width:100%;padding:.5rem .75rem;background:transparent;border:none;border-radius:.375rem;color:var(--dropdown-option-color, #1f2937);cursor:pointer;font-size:.875rem;text-align:left;transition:background-color .15s ease}[data-theme=dark] .dropdown-option{color:var(--dropdown-option-color-dark, #f3f4f6)}.dropdown-option:hover:not(.disabled){background:var(--dropdown-option-hover-bg, #f3f4f6)}[data-theme=dark] .dropdown-option:hover:not(.disabled){background:var(--dropdown-option-hover-bg-dark, #374151)}.dropdown-option.selected{background:var(--dropdown-option-selected-bg, #dc2626);color:var(--dropdown-option-selected-color, #ffffff);font-weight:600}.dropdown-option.selected:hover{background:var(--dropdown-option-selected-hover-bg, #b91c1c)}.dropdown-option.disabled{opacity:.5;cursor:not-allowed}.dropdown-empty{padding:.5rem .75rem;color:var(--dropdown-empty-color, #9ca3af);font-size:.875rem;text-align:center}@media (max-width: 768px){.dropdown-button{min-width:100px;padding:.375rem .5rem;font-size:.8125rem}.dropdown-menu{min-width:140px;max-width:200px}}";var Ze;let Xe,qe;function J(t,e,r){return(e=Qe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:ve(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||ve(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return Yt(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Qe(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Qe(t){var e=Vt(t,"string");return typeof e=="symbol"?e:e+""}function Vt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function ve(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function Yt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}qe=[O.autoRegister({tagName:"wsx-dropdown"})];exports.Dropdown=void 0;class Kt extends O.WebComponent{constructor(e={}){super({styles:me,styleName:"wsx-dropdown"}),J(this,"_autoStyles",me),J(this,"options",[]),J(this,"selectedValue",void 0),J(this,"isOpen",void 0),J(this,"config",{}),J(this,"buttonElement",void 0),J(this,"dropdownElement",void 0),J(this,"outsideClickHandler",void 0),J(this,"toggleDropdown",()=>{this.config.disabled||(this.isOpen=!this.isOpen,this.rerender(),this.isOpen?setTimeout(()=>{this.attachOutsideClickHandler()},0):this.detachOutsideClickHandler())}),J(this,"openDropdown",()=>{this.config.disabled||this.isOpen||(this.isOpen=!0,this.rerender())}),J(this,"closeDropdown",()=>{this.isOpen&&(this.isOpen=!1,this.rerender(),this.detachOutsideClickHandler())}),J(this,"selectOption",E=>{this.setValue(E),this.config.trigger==="click"&&this.closeDropdown()}),J(this,"attachOutsideClickHandler",()=>{this.config.trigger!=="hover"&&(this.outsideClickHandler=E=>{const A=E.target;this.dropdownElement&&this.buttonElement&&!this.dropdownElement.contains(A)&&!this.buttonElement.contains(A)&&this.closeDropdown()},document.addEventListener("click",this.outsideClickHandler,!0))}),J(this,"detachOutsideClickHandler",()=>{this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,!0),this.outsideClickHandler=void 0)}),this.config={placeholder:"Select...",align:"left",position:"bottom",trigger:"click",...e};const[r,o]=this.useState("selectedValue","");Object.defineProperty(this,"selectedValue",{get:r,set:o,enumerable:!0,configurable:!0});const[S,C]=this.useState("isOpen",!1);Object.defineProperty(this,"isOpen",{get:S,set:C,enumerable:!0,configurable:!0})}setOptions(e){this.options=e,this.rerender()}setValue(e){this.selectedValue=e,this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0}))}getValue(){return this.selectedValue||void 0}render(){const e=this.options.find(o=>o.value===this.selectedValue&&this.selectedValue!==""),r=(e==null?void 0:e.label)||this.config.placeholder||"Select...";return O.jsx("div",{class:"dropdown-container"},O.jsx("button",{ref:o=>this.buttonElement=o,class:`dropdown-button ${this.isOpen?"open":""} ${this.config.disabled?"disabled":""}`,onClick:this.config.trigger==="click"?this.toggleDropdown:void 0,onMouseEnter:this.config.trigger==="hover"?this.openDropdown:void 0,onMouseLeave:this.config.trigger==="hover"?this.closeDropdown:void 0,disabled:this.config.disabled,"aria-expanded":this.isOpen,"aria-haspopup":"listbox","data-wsx-key":"Dropdown-button-text-1"},O.jsx("span",{class:"dropdown-text"},r),O.jsx("span",{class:"dropdown-arrow"},this.isOpen?"▲":"▼")),this.isOpen&&O.jsx("div",{ref:o=>this.dropdownElement=o,class:`dropdown-menu dropdown-${this.config.position} dropdown-${this.config.align}`,role:"listbox",onMouseEnter:this.config.trigger==="hover"?this.openDropdown:void 0,onMouseLeave:this.config.trigger==="hover"?this.closeDropdown:void 0},this.options.length===0?O.jsx("div",{class:"dropdown-empty"},"No options"):this.options.map(o=>O.jsx("button",{key:o.value,class:`dropdown-option ${o.value===this.selectedValue&&this.selectedValue!==""?"selected":""} ${o.disabled?"disabled":""}`,onClick:()=>!o.disabled&&this.selectOption(o.value),role:"option","aria-selected":o.value===this.selectedValue&&this.selectedValue!=="",disabled:o.disabled,"data-wsx-key":"Dropdown-button-text-0"},o.render?o.render():O.jsx("span",null,o.label)))))}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),this.detachOutsideClickHandler()}}Ze=Kt;[exports.Dropdown,Xe]=Wt(Ze,[],qe,0,void 0,O.WebComponent).c;Xe();const ye=":host{display:inline-block;position:relative}.combobox-container{position:relative;display:inline-block;width:100%}.combobox-input-wrapper{position:relative;display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;min-width:200px;background:var(--combobox-bg, rgba(255, 255, 255, .1));border:1px solid var(--combobox-border, rgba(255, 255, 255, .2));border-radius:var(--combobox-border-radius, .5rem);transition:all .2s ease}.combobox-input-wrapper:focus-within{background:var(--combobox-focus-bg, rgba(255, 255, 255, .15));border-color:var(--combobox-focus-border, var(--focus-color, #dc2626));outline:2px solid var(--combobox-focus-outline, rgba(220, 38, 38, .2));outline-offset:2px}.combobox-tags{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap;flex:1}.combobox-tag{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .5rem;background:var(--combobox-tag-bg, #dc2626);color:var(--combobox-tag-color, #ffffff);border-radius:.25rem;font-size:.75rem;font-weight:500}.combobox-tag-remove{background:none;border:none;color:var(--combobox-tag-color, #ffffff);cursor:pointer;font-size:1rem;line-height:1;padding:0;width:16px;height:16px;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color .15s ease}.combobox-tag-remove:hover{background:#fff3}.combobox-tag-more{padding:.25rem .5rem;color:var(--combobox-tag-color, #ffffff);font-size:.75rem;font-weight:500}.combobox-input{flex:1;border:none;background:transparent;color:var(--combobox-color, currentColor);font-size:.875rem;font-weight:500;outline:none;min-width:0}.combobox-input::placeholder{color:var(--combobox-placeholder-color, rgba(255, 255, 255, .5))}.combobox-input:disabled{opacity:.5;cursor:not-allowed}.combobox-arrow{background:none;border:none;color:var(--combobox-arrow-color, currentColor);cursor:pointer;font-size:.625rem;opacity:.7;transition:transform .2s ease;flex-shrink:0;padding:.25rem;display:flex;align-items:center;justify-content:center}.combobox-arrow:hover{opacity:1}.combobox-arrow.open{transform:rotate(180deg)}.combobox-arrow:disabled{opacity:.5;cursor:not-allowed}.combobox-menu{position:absolute;z-index:1000;min-width:100%;max-width:300px;max-height:300px;overflow-y:auto;background:var(--combobox-menu-bg, #ffffff);border:1px solid var(--combobox-menu-border, #e5e7eb);border-radius:var(--combobox-border-radius, .5rem);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;padding:.25rem;margin:.25rem 0 0}[data-theme=dark] .combobox-menu{background:var(--combobox-menu-bg-dark, #1f2937);border-color:var(--combobox-menu-border-dark, #374151)}.combobox-menu.combobox-top{bottom:100%;margin:0 0 .25rem}.combobox-menu.combobox-bottom{top:100%;margin:.25rem 0 0}.combobox-menu.combobox-left{left:0}.combobox-menu.combobox-right{right:0}.combobox-menu.combobox-center{left:50%;transform:translate(-50%)}.combobox-menu.combobox-top.combobox-center{transform:translate(-50%) translateY(-100%)}.combobox-option{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem;background:transparent;border:none;border-radius:.375rem;color:var(--combobox-option-color, #1f2937);cursor:pointer;font-size:.875rem;text-align:left;transition:background-color .15s ease}[data-theme=dark] .combobox-option{color:var(--combobox-option-color-dark, #f3f4f6)}.combobox-option:hover:not(.disabled){background:var(--combobox-option-hover-bg, #f3f4f6)}[data-theme=dark] .combobox-option:hover:not(.disabled){background:var(--combobox-option-hover-bg-dark, #374151)}.combobox-option.selected{background:var(--combobox-option-selected-bg, #dc2626);color:var(--combobox-option-selected-color, #ffffff);font-weight:600}.combobox-option.selected:hover{background:var(--combobox-option-selected-hover-bg, #b91c1c)}.combobox-option.disabled{opacity:.5;cursor:not-allowed}.combobox-checkbox{width:16px;height:16px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.75rem;font-weight:700}.combobox-empty{padding:.5rem .75rem;color:var(--combobox-empty-color, #9ca3af);font-size:.875rem;text-align:center}@media (max-width: 768px){.combobox-input-wrapper{min-width:150px;padding:.375rem .5rem}.combobox-input{font-size:.8125rem}.combobox-menu{max-width:200px}}";var Je;let et,tt;function Q(t,e,r){return(e=rt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:ke(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||ke(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return qt(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:rt(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function rt(t){var e=Xt(t,"string");return typeof e=="symbol"?e:e+""}function Xt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function ke(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function qt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}tt=[O.autoRegister({tagName:"wsx-combobox"})];exports.Combobox=void 0;class Qt extends O.WebComponent{constructor(e={}){super({styles:ye,styleName:"wsx-combobox"}),Q(this,"_autoStyles",ye),Q(this,"options",[]),Q(this,"selectedValue",void 0),Q(this,"searchQuery",void 0),Q(this,"isOpen",void 0),Q(this,"config",{}),Q(this,"inputElement",void 0),Q(this,"dropdownElement",void 0),Q(this,"outsideClickHandler",void 0),Q(this,"handleInput",m=>{if(!this.config.searchable)return;const D=m.target;this.searchQuery=D.value,this.rerender()}),Q(this,"toggleDropdown",()=>{this.config.disabled||(this.isOpen=!this.isOpen,this.isOpen&&this.config.searchable&&this.inputElement&&this.inputElement.focus(),this.rerender(),this.isOpen?setTimeout(()=>{this.attachOutsideClickHandler()},0):(this.detachOutsideClickHandler(),this.searchQuery=""))}),Q(this,"openDropdown",()=>{this.config.disabled||this.isOpen||(this.isOpen=!0,this.config.searchable&&this.inputElement&&this.inputElement.focus(),this.rerender(),setTimeout(()=>{this.attachOutsideClickHandler()},0))}),Q(this,"closeDropdown",()=>{this.isOpen&&(this.isOpen=!1,this.searchQuery="",this.rerender(),this.detachOutsideClickHandler())}),Q(this,"selectOption",m=>{if(this.config.multiple){const D=Array.isArray(this.selectedValue)?this.selectedValue:[],$=D.includes(m)?D.filter(T=>T!==m):[...D,m];this.selectedValue=$}else this.selectedValue=m,this.closeDropdown();this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.selectedValue},bubbles:!0}))}),Q(this,"removeValue",m=>{if(!this.config.multiple)return;const D=Array.isArray(this.selectedValue)?this.selectedValue:[];this.selectedValue=D.filter($=>$!==m),this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.selectedValue},bubbles:!0}))}),Q(this,"attachOutsideClickHandler",()=>{this.outsideClickHandler=m=>{const D=m.target;this.dropdownElement&&this.inputElement&&!this.dropdownElement.contains(D)&&!this.inputElement.contains(D)&&this.closeDropdown()},document.addEventListener("click",this.outsideClickHandler,!0)}),Q(this,"detachOutsideClickHandler",()=>{this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,!0),this.outsideClickHandler=void 0)}),this.config={placeholder:"Select or search...",searchable:!0,multiple:!1,align:"left",position:"bottom",...e};const[r,o]=this.useState("selectedValue","");Object.defineProperty(this,"selectedValue",{get:r,set:o,enumerable:!0,configurable:!0});const[S,C]=this.useState("searchQuery","");Object.defineProperty(this,"searchQuery",{get:S,set:C,enumerable:!0,configurable:!0});const[E,A]=this.useState("isOpen",!1);Object.defineProperty(this,"isOpen",{get:E,set:A,enumerable:!0,configurable:!0})}setOptions(e){this.options=e,this.rerender()}setValue(e){if(this.selectedValue=e,this.inputElement&&!this.config.multiple){const r=this.options.find(o=>o.value===(Array.isArray(e)?e[0]:e));this.inputElement.value=(r==null?void 0:r.label)||""}this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0}))}getValue(){return this.selectedValue}getFilteredOptions(){if(!this.config.searchable||!this.searchQuery.trim())return this.options;const e=this.searchQuery.toLowerCase();return this.options.filter(r=>r.label.toLowerCase().includes(e)||r.value.toLowerCase().includes(e))}render(){const e=this.getFilteredOptions(),r=this.config.multiple,o=Array.isArray(this.selectedValue)?this.selectedValue:this.selectedValue?[this.selectedValue]:[];let S="";if(r)if(o.length===0)S=this.config.placeholder||"Select...";else if(o.length===1){const C=this.options.find(E=>E.value===o[0]);S=(C==null?void 0:C.label)||o[0]}else S=`${o.length} selected`;else{const C=this.options.find(E=>E.value===this.selectedValue);S=(C==null?void 0:C.label)||this.config.placeholder||"Select..."}return O.jsx("div",{class:"combobox-container"},O.jsx("div",{class:"combobox-input-wrapper"},r&&o.length>0&&O.jsx("div",{class:"combobox-tags"},o.slice(0,2).map(C=>{const E=this.options.find(A=>A.value===C);return O.jsx("span",{key:C,class:"combobox-tag"},(E==null?void 0:E.label)||C,O.jsx("button",{class:"combobox-tag-remove",onClick:A=>{A.stopPropagation(),this.removeValue(C)},"data-wsx-key":"Combobox-button-text-3"},"×"))}),o.length>2&&O.jsx("span",{class:"combobox-tag-more"},"+",o.length-2)),O.jsx("input",{ref:C=>this.inputElement=C,type:"text",class:"combobox-input",placeholder:S,value:this.config.searchable&&this.isOpen?this.searchQuery:"",onInput:this.handleInput,onFocus:this.openDropdown,onClick:this.openDropdown,disabled:this.config.disabled,readonly:!this.config.searchable,"data-wsx-key":"Combobox-input-text-1-3"}),O.jsx("button",{class:`combobox-arrow ${this.isOpen?"open":""}`,onClick:this.toggleDropdown,disabled:this.config.disabled,"data-wsx-key":"Combobox-button-text-1-5"},this.isOpen?"▲":"▼")),this.isOpen&&O.jsx("div",{ref:C=>this.dropdownElement=C,class:`combobox-menu combobox-${this.config.position} combobox-${this.config.align}`,role:"listbox"},e.length===0?O.jsx("div",{class:"combobox-empty"},this.config.searchable&&this.searchQuery?"No results found":"No options"):e.map(C=>{const E=r?o.includes(C.value):C.value===this.selectedValue;return O.jsx("button",{key:C.value,class:`combobox-option ${E?"selected":""} ${C.disabled?"disabled":""}`,onClick:()=>!C.disabled&&this.selectOption(C.value),role:"option","aria-selected":E,disabled:C.disabled,"data-wsx-key":"Combobox-button-text-0"},r&&O.jsx("span",{class:"combobox-checkbox"},E?"✓":""),C.render?C.render():O.jsx("span",null,C.label))})))}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),this.detachOutsideClickHandler()}}Je=Qt;[exports.Combobox,et]=Zt(Je,[],tt,0,void 0,O.WebComponent).c;et();class de{static detect(e){const{container:r,items:o,gap:S=16,reservedWidth:C=0,overflowButtonWidth:E=0,padding:A=0,minVisibleItems:m=1}=e;if(!r||o.length===0)return{visibleIndices:[],hiddenIndices:[],needsOverflow:!1};const $=r.offsetWidth-C-A*2;let T=0;const N=[],P=[];for(let a=0;a<o.length;a++){const n=o[a];if(!n||n.offsetWidth===0){N.push(a);continue}const c=n.offsetWidth+(a>0?S:0);T+c<=$?(T+=c,N.push(a)):P.push(a)}if(P.length===0)return{visibleIndices:N,hiddenIndices:[],needsOverflow:!1};const i=$-E-S;T=0;const l=[],d=[];for(let a=0;a<o.length;a++){const n=o[a];if(!n||n.offsetWidth===0){l.length<m?l.push(a):d.push(a);continue}const c=n.offsetWidth+(l.length>0?S:0);T+c<=i?(T+=c,l.push(a)):d.push(a)}if(l.length<m&&o.length>0){const a=m-l.length,n=d.splice(0,a);l.push(...n),l.sort((c,h)=>c-h)}return{visibleIndices:l,hiddenIndices:d,needsOverflow:d.length>0}}static calculateTotalWidth(e,r=16){return e.length===0?0:e.reduce((o,S,C)=>{const E=S.offsetWidth||0;return o+E+(C>0?r:0)},0)}static getElementTotalWidth(e){if(!e)return 0;const r=window.getComputedStyle(e),o=e.offsetWidth,S=parseFloat(r.marginLeft)||0,C=parseFloat(r.marginRight)||0;return o+S+C}}const xe=':host{display:block}.responsive-nav{position:fixed;top:0;left:0;right:0;z-index:1000;background:var(--nav-bg, var(--bg-primary));-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);border-bottom:1px solid var(--nav-border, var(--border-color));transition:all .3s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 3px #0000000d}.responsive-nav.nav-scrolled{background:var(--nav-bg-scrolled, var(--bg-primary));box-shadow:0 4px 24px var(--nav-shadow, var(--card-shadow));border-bottom-color:var(--nav-border, var(--border-color))}.nav-container{max-width:1280px;margin:0 auto;padding:0 2rem;display:flex;align-items:center;justify-content:space-between;height:72px;gap:1.5rem}.nav-brand{display:flex;align-items:center;gap:.75rem;font-weight:800;font-size:1.5rem;color:var(--nav-brand-color, var(--text-primary));flex-shrink:0;transition:transform .2s ease;cursor:pointer}.nav-brand:hover{transform:scale(1.05)}.nav-brand-icon{display:flex;align-items:center;font-size:1.8rem;transition:transform .3s ease}.nav-brand:hover .nav-brand-icon{transform:rotate(5deg) scale(1.1)}.nav-brand-text{background:linear-gradient(135deg,var(--hero-gradient-start, var(--primary-red)),var(--hero-gradient-end, var(--accent-orange)));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;letter-spacing:-.02em;position:relative}.nav-menu{display:flex;align-items:center;gap:.5rem;flex:1;justify-content:flex-end;overflow:visible;padding-right:.5rem}wsx-link.nav-link{display:inline-flex;align-items:center;flex-shrink:0}wsx-link.nav-link::part(link){color:var(--nav-link-color, var(--text-secondary));text-decoration:none!important;font-weight:500;font-size:.95rem;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;white-space:nowrap;padding:.5rem .75rem;border-radius:.5rem;display:inline-flex;align-items:center}wsx-link.nav-link::part(link):hover{color:var(--nav-link-hover-color, var(--text-primary));background:var(--nav-link-hover-bg, var(--bg-secondary));text-decoration:none!important;transform:translateY(-1px)}wsx-link.nav-link::part(link):after{content:none!important;display:none!important;width:0!important;height:0!important;background:none!important}wsx-link.nav-link::part(link):hover:after{content:none!important;display:none!important;width:0!important;height:0!important;background:none!important}wsx-link.nav-link::part(link):before{display:none}wsx-link.nav-link[active]::part(link),wsx-link.nav-link.nav-link-active::part(link){color:var(--nav-link-active-color, var(--primary-red))!important;font-weight:600;background:var(--nav-link-active-bg, var(--bg-secondary));text-decoration:none!important}wsx-link.nav-link[active]::part(link):after,wsx-link.nav-link.nav-link-active::part(link):after{content:none!important;display:none!important;width:0!important;height:0!important;background:none!important}wsx-link.nav-link[active]::part(link):before,wsx-link.nav-link.nav-link-active::part(link):before{content:"";display:block;position:absolute;bottom:.125rem;left:50%;transform:translate(-50%);width:calc(100% - 1.5rem);height:3px;background:linear-gradient(135deg,var(--hero-gradient-start, var(--primary-red)),var(--hero-gradient-end, var(--accent-orange)));border-radius:2px;z-index:1}.nav-link{color:var(--nav-link-color, var(--text-secondary));text-decoration:none;font-weight:500;font-size:.95rem;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;white-space:nowrap;flex-shrink:0;padding:.5rem .75rem;border-radius:.5rem;display:inline-flex;align-items:center}.nav-link:hover{color:var(--nav-link-hover-color, var(--text-primary));background:var(--nav-link-hover-bg, var(--bg-secondary));transform:translateY(-1px)}.nav-link:after{content:"";position:absolute;bottom:.25rem;left:50%;transform:translate(-50%);width:0;height:2px;background:linear-gradient(135deg,var(--hero-gradient-start, var(--primary-red)),var(--hero-gradient-end, var(--accent-orange)));border-radius:2px;transition:width .3s cubic-bezier(.4,0,.2,1)}.nav-link:hover:after{width:calc(100% - 1.5rem)}.nav-link-active{color:var(--nav-link-active-color, var(--primary-red))!important;font-weight:600;background:var(--nav-link-active-bg, var(--bg-secondary))}.nav-link-active:after{width:calc(100% - 1.5rem)!important;height:3px!important;bottom:.125rem!important}.nav-overflow{position:relative;flex-shrink:0}.nav-overflow-button{padding:.5rem .875rem;background:var(--nav-overflow-bg, transparent);border:1px solid var(--nav-overflow-border, var(--border-color));border-radius:.5rem;color:var(--nav-link-color, var(--text-secondary));cursor:pointer;font-size:.875rem;font-weight:500;transition:all .25s cubic-bezier(.4,0,.2,1);display:inline-flex;align-items:center;gap:.25rem}.nav-overflow-button:hover{background:var(--nav-overflow-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));border-color:var(--nav-overflow-hover-border, var(--border-color));transform:translateY(-1px);box-shadow:0 2px 8px var(--card-shadow)}.nav-overflow-menu{position:absolute;top:calc(100% + .75rem);right:0;min-width:180px;background:var(--nav-overflow-menu-bg, var(--bg-primary));border:1px solid var(--nav-overflow-menu-border, var(--border-color));border-radius:.75rem;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a;padding:.5rem;z-index:1001;-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);animation:slideDown .2s cubic-bezier(.4,0,.2,1)}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}wsx-link.nav-overflow-link::part(link){display:block;padding:.625rem .875rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none!important;font-weight:500;font-size:.9rem;border-radius:.5rem;transition:all .2s cubic-bezier(.4,0,.2,1);margin-bottom:.25rem;border-left:3px solid transparent}wsx-link.nav-overflow-link::part(link):hover{background:var(--nav-overflow-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));text-decoration:none!important;transform:translate(4px)}wsx-link.nav-overflow-link[active]::part(link),wsx-link.nav-overflow-link.nav-link-active::part(link){background:var(--nav-overflow-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);padding-left:.625rem}.nav-overflow-link{display:block;padding:.625rem .875rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none;font-weight:500;font-size:.9rem;border-radius:.5rem;transition:all .2s cubic-bezier(.4,0,.2,1);margin-bottom:.25rem;border-left:3px solid transparent}.nav-overflow-link:hover{background:var(--nav-overflow-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));transform:translate(4px)}.nav-overflow-link.nav-link-active{background:var(--nav-overflow-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);padding-left:.625rem}.nav-actions{display:flex;align-items:center;gap:.75rem;flex-shrink:0;margin-left:.5rem;z-index:1002;padding-left:.75rem;border-left:1px solid var(--nav-actions-border, var(--border-color))}.nav-action{display:flex;align-items:center;transition:transform .2s ease}.nav-action:hover{transform:scale(1.05)}.nav-toggle{display:none;flex-direction:column;gap:5px;background:var(--nav-toggle-bg, transparent);border:1px solid var(--nav-toggle-border, var(--border-color));border-radius:.5rem;cursor:pointer;padding:.625rem .5rem;z-index:1001;transition:all .25s ease}.nav-toggle:hover{background:var(--nav-toggle-hover-bg, var(--bg-secondary));border-color:var(--nav-toggle-hover-border, var(--border-color))}.nav-toggle-line{width:24px;height:3px;background:var(--nav-toggle-color, var(--text-primary));border-radius:3px;transition:all .3s cubic-bezier(.4,0,.2,1);transform-origin:center}.nav-toggle-line.open:nth-child(1){transform:rotate(45deg) translate(8px,8px)}.nav-toggle-line.open:nth-child(2){opacity:0}.nav-toggle-line.open:nth-child(3){transform:rotate(-45deg) translate(7px,-7px)}.nav-mobile-menu{position:fixed;top:72px;left:0;right:0;background:var(--nav-mobile-bg, var(--bg-primary));-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);flex-direction:column;padding:1.5rem;gap:.5rem;transform:translateY(-100%);opacity:0;visibility:hidden;transition:all .3s cubic-bezier(.4,0,.2,1);border-bottom:1px solid var(--nav-border, var(--border-color));max-height:calc(100vh - 72px);overflow-y:auto;z-index:999;box-shadow:0 4px 24px #0000001a}.nav-mobile-menu.open{transform:translateY(0);opacity:1;visibility:visible}wsx-link.nav-mobile-link::part(link){display:block;padding:.875rem 1.25rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none!important;font-weight:500;font-size:1rem;border-radius:.625rem;transition:all .25s cubic-bezier(.4,0,.2,1);border-left:3px solid transparent}wsx-link.nav-mobile-link::part(link):hover{background:var(--nav-mobile-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));text-decoration:none!important;transform:translate(4px);border-left-color:var(--primary-red)}wsx-link.nav-mobile-link[active]::part(link),wsx-link.nav-mobile-link.nav-link-active::part(link){background:var(--nav-mobile-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);box-shadow:0 2px 8px var(--card-shadow)}.nav-mobile-link{display:block;padding:.875rem 1.25rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none;font-weight:500;font-size:1rem;border-radius:.625rem;transition:all .25s cubic-bezier(.4,0,.2,1);border-left:3px solid transparent}.nav-mobile-link:hover{background:var(--nav-mobile-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));transform:translate(4px);border-left-color:var(--primary-red)}.nav-mobile-link.nav-link-active{background:var(--nav-mobile-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);box-shadow:0 2px 8px var(--card-shadow)}@media (max-width: 768px){.nav-container{padding:0 1.25rem;height:68px}.nav-brand{font-size:1.35rem}.nav-menu{display:none}.nav-actions{margin-left:0;gap:.5rem;padding-left:.5rem;border-left:none}.nav-toggle{display:flex;margin-left:.5rem}.nav-mobile-menu{display:flex;top:68px;max-height:calc(100vh - 68px)}}@media (min-width: 769px){.nav-mobile-menu{display:none!important}}@media (prefers-reduced-motion: no-preference){.responsive-nav,.nav-link,.nav-overflow-button,.nav-toggle{transition-duration:.25s}}@media (prefers-reduced-motion: reduce){.responsive-nav,.nav-link,.nav-overflow-button,.nav-toggle,.nav-mobile-menu{transition:none;animation:none}}';var nt;let ot,it;function Z(t,e,r){return(e=at(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:we(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||we(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return tr(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:at(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function at(t){var e=er(t,"string");return typeof e=="symbol"?e:e+""}function er(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function we(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function tr(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}it=[O.autoRegister({tagName:"wsx-responsive-nav"})];exports.ResponsiveNav=void 0;class rr extends O.WebComponent{constructor(e){super({styles:xe,styleName:"wsx-responsive-nav"}),Z(this,"_autoStyles",xe),Z(this,"navigation",void 0),Z(this,"isMobileMenuOpen",void 0),Z(this,"visibleItemIndices",void 0),Z(this,"hiddenItemIndices",void 0),Z(this,"isMobile",void 0),Z(this,"isOverflowOpen",void 0),Z(this,"navMenuElement",void 0),Z(this,"navItemsElements",[]),Z(this,"resizeObserver",void 0),Z(this,"resizeHandler",void 0),Z(this,"toggleMobileMenu",()=>{this.isMobileMenuOpen=!this.isMobileMenuOpen,this.rerender()}),Z(this,"closeMobileMenu",()=>{this.isMobileMenuOpen=!1,this.rerender()}),Z(this,"toggleOverflow",()=>{this.isOverflowOpen=!this.isOverflowOpen,this.rerender(),this.isOverflowOpen?setTimeout(()=>{document.addEventListener("click",this.handleOverflowOutsideClick,!0)},0):document.removeEventListener("click",this.handleOverflowOutsideClick,!0)}),Z(this,"closeOverflow",()=>{this.isOverflowOpen=!1,this.rerender(),document.removeEventListener("click",this.handleOverflowOutsideClick,!0)}),Z(this,"handleOverflowOutsideClick",T=>{const N=T.target,P=this.querySelector(".nav-overflow"),i=P==null?void 0:P.querySelector(".nav-overflow-menu"),l=P==null?void 0:P.querySelector(".nav-overflow-button");i&&l&&!i.contains(N)&&!l.contains(N)&&this.closeOverflow()}),Z(this,"updateVisibleItems",()=>{var c;if(!this.navigation.autoOverflow||this.isMobile||!this.navMenuElement){if(!this.isMobile){const h=this.navigation.items.map((p,y)=>y);JSON.stringify(h.sort())!==JSON.stringify(this.visibleItemIndices.sort())&&(this.visibleItemIndices=h,this.hiddenItemIndices=[],this.rerender())}return}const T=[];for(let h=0;h<this.navigation.items.length;h++){let p=this.navItemsElements[h];if(!p){const y=Array.from(this.navMenuElement.querySelectorAll(".nav-link"));y[h]&&(p=y[h],this.navItemsElements[h]=p)}if(p)T.push(p);else{const y=document.createElement("wsx-link");y.textContent=this.navigation.items[h].label,y.style.visibility="hidden",y.style.position="absolute",document.body.appendChild(y),T.push(y),setTimeout(()=>{y.parentElement&&y.parentElement.removeChild(y)},0)}}const N=(c=this.navMenuElement.parentElement)==null?void 0:c.querySelector(".nav-actions"),P=N?Array.from(N.children).reduce((h,p)=>h+de.getElementTotalWidth(p),0)+8:0,d=de.detect({container:this.navMenuElement,items:T,gap:16,reservedWidth:P,overflowButtonWidth:90,padding:0,minVisibleItems:1}),a=d.visibleIndices,n=d.hiddenIndices;T.forEach(h=>{h.parentElement===document.body&&document.body.removeChild(h)}),(JSON.stringify(a.sort())!==JSON.stringify(this.visibleItemIndices.sort())||JSON.stringify(n.sort())!==JSON.stringify(this.hiddenItemIndices.sort()))&&(this.visibleItemIndices=a,this.hiddenItemIndices=n,this.rerender())}),Z(this,"checkMobile",()=>{var N;const T=window.innerWidth<=(((N=this.navigation)==null?void 0:N.mobileBreakpoint)||768);T!==this.isMobile&&(this.isMobile=T,this.rerender())}),e&&(this.navigation={mobileBreakpoint:768,autoOverflow:!0,...e},this.visibleItemIndices=e.items.map((T,N)=>N));let r=this.reactive({items:[]});Object.defineProperty(this,"navigation",{get:()=>r,set:T=>{r=T!==null&&typeof T<"u"&&(Array.isArray(T)||typeof T=="object")?this.reactive(T):T,this.scheduleRerender()},enumerable:!0,configurable:!0});const[o,S]=this.useState("isMobileMenuOpen",!1);Object.defineProperty(this,"isMobileMenuOpen",{get:o,set:S,enumerable:!0,configurable:!0});let C=this.reactive([]);Object.defineProperty(this,"visibleItemIndices",{get:()=>C,set:T=>{C=T!==null&&typeof T<"u"&&(Array.isArray(T)||typeof T=="object")?this.reactive(T):T,this.scheduleRerender()},enumerable:!0,configurable:!0});let E=this.reactive([]);Object.defineProperty(this,"hiddenItemIndices",{get:()=>E,set:T=>{E=T!==null&&typeof T<"u"&&(Array.isArray(T)||typeof T=="object")?this.reactive(T):T,this.scheduleRerender()},enumerable:!0,configurable:!0});const[A,m]=this.useState("isMobile",!1);Object.defineProperty(this,"isMobile",{get:A,set:m,enumerable:!0,configurable:!0});const[D,$]=this.useState("isOverflowOpen",!1);Object.defineProperty(this,"isOverflowOpen",{get:D,set:$,enumerable:!0,configurable:!0})}render(){var r,o;if(!((r=this.navigation)!=null&&r.items)||((o=this.navigation)==null?void 0:o.items.length)===0)return O.jsx("nav",{class:"responsive-nav"});const e=this.hiddenItemIndices.map(S=>this.navigation.items[S]);return O.jsx("nav",{class:"responsive-nav"},O.jsx("div",{class:"nav-container"},O.jsx("div",{class:"nav-brand"},O.jsx("slot",{name:"brand-icon"},this.navigation.brandIcon&&typeof this.navigation.brandIcon=="string"&&O.jsx("span",{class:"nav-brand-icon"},this.navigation.brandIcon)),this.navigation.brand&&O.jsx("span",{class:"nav-brand-text"},this.navigation.brand)),!this.isMobile&&O.jsx("div",{ref:S=>this.navMenuElement=S,class:"nav-menu"},this.navigation.items.map((S,C)=>{const E=this.visibleItemIndices.includes(C);return O.jsx("wsx-link",{key:`nav-${C}`,ref:A=>{A&&(this.navItemsElements[C]=A)},to:S.to,class:`nav-link ${E?"":"hidden-item"}`,"active-class":"nav-link-active",exact:S.exact,style:E?"":"position: absolute; visibility: hidden; pointer-events: none;"},S.label)}),this.navigation.autoOverflow&&e.length>0&&!this.isMobile&&O.jsx("div",{class:"nav-overflow"},O.jsx("button",{class:"nav-overflow-button",onClick:this.toggleOverflow,"data-wsx-key":"ResponsiveNav-button-text-1-1"},"More ▼"),this.isOverflowOpen&&O.jsx("div",{class:"nav-overflow-menu"},e.map((S,C)=>{const E=this.hiddenItemIndices[C];return O.jsx("wsx-link",{key:`overflow-${E}`,to:S.to,class:"nav-overflow-link","active-class":"nav-link-active",exact:S.exact,onClick:this.closeOverflow},S.label)})))),this.navigation.actionTags&&O.jsx("div",{class:"nav-actions"},this.navigation.actionTags.map((S,C)=>{const E=S;return O.jsx("div",{key:C,class:"nav-action"},O.jsx(E,null))})),this.isMobile&&O.jsx("button",{class:"nav-toggle",onClick:this.toggleMobileMenu,"data-wsx-key":"ResponsiveNav-button-text-1"},O.jsx("span",{class:`nav-toggle-line ${this.isMobileMenuOpen?"open":""}`}),O.jsx("span",{class:`nav-toggle-line ${this.isMobileMenuOpen?"open":""}`}),O.jsx("span",{class:`nav-toggle-line ${this.isMobileMenuOpen?"open":""}`}))),this.isMobile&&O.jsx("div",{class:`nav-mobile-menu ${this.isMobileMenuOpen?"open":""}`},this.navigation.items.filter(S=>!S.hideOnMobile).map((S,C)=>O.jsx("wsx-link",{key:C,to:S.to,class:"nav-mobile-link","active-class":"nav-link-active",exact:S.exact,onClick:this.closeMobileMenu},S.label))))}onConnected(){var r,o,S;if((r=super.onConnected)==null||r.call(this),!((o=this.navigation)!=null&&o.items)||((S=this.navigation)==null?void 0:S.items.length)===0)try{this.visibleItemIndices=this.navigation.items.map((C,E)=>E),this.rerender()}catch(C){console.error("Failed to parse ResponsiveNav config:",C)}this.checkMobile();const e=(C=0)=>{C>10||setTimeout(()=>{this.navMenuElement&&(this.navigation.items.every((A,m)=>this.navItemsElements[m])||C>5?this.updateVisibleItems():e(C+1))},50)};e(),this.resizeHandler=()=>{this.checkMobile(),setTimeout(()=>{this.updateVisibleItems()},100)},window.addEventListener("resize",this.resizeHandler),setTimeout(()=>{this.navMenuElement&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{setTimeout(()=>{this.updateVisibleItems()},0)}),this.resizeObserver.observe(this.navMenuElement))},0)}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.resizeObserver&&this.resizeObserver.disconnect()}}nt=rr;[exports.ResponsiveNav,ot]=Jt(nt,[],it,0,void 0,O.WebComponent).c;ot();var st;let lt,ct;function ee(t,e,r){return(e=dt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nr(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:Ee(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||Ee(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return ir(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:dt(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function dt(t){var e=or(t,"string");return typeof e=="symbol"?e:e+""}function or(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Ee(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function ir(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}const ar=De("SvgIcon");ct=[O.autoRegister({tagName:"wsx-svg-icon"})];exports.SvgIcon=void 0;class sr extends O.WebComponent{constructor(){super(),ee(this,"size",void 0),ee(this,"color",void 0),ee(this,"name",void 0),ee(this,"handleClick",A=>{ar.debug("SVG icon clicked",{name:this.name}),this.dispatchEvent(new CustomEvent("icon-click",{detail:{name:this.name,originalEvent:A},bubbles:!0}))}),ee(this,"handleMouseEnter",A=>{const m=A.target;m.style.transform="scale(1.1)"}),ee(this,"handleMouseLeave",A=>{const m=A.target;m.style.transform="scale(1)"});const[e,r]=this.useState("size",24);Object.defineProperty(this,"size",{get:e,set:r,enumerable:!0,configurable:!0});const[o,S]=this.useState("color","currentColor");Object.defineProperty(this,"color",{get:o,set:S,enumerable:!0,configurable:!0});const[C,E]=this.useState("name","star");Object.defineProperty(this,"name",{get:C,set:E,enumerable:!0,configurable:!0})}render(){const e=this.size||"24",r=this.color||"currentColor",o=this.name||"star",S={star:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",heart:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z",check:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",close:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",github:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22",play:"M8 5v14l11-7z",settings:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},C=S[o]||S.star;return O.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"svg-icon",onClick:this.handleClick,style:"cursor: pointer; transition: transform 0.2s ease; display: inline-block;",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},O.jsx("path",{d:C,fill:r}))}}st=sr;[exports.SvgIcon,lt]=nr(st,[],ct,0,void 0,O.WebComponent).c;lt();var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ut={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
6
+ `;const o=Pe(S=>{var A;const C=S.target,E=ne(C.value);this.setSelectedColor(E),this.setCustomColor(E),document.body.removeChild(r),(A=this.onColorPicked)==null||A.call(this,E),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:E},bubbles:!0,composed:!0})),re.debug("Custom color selected",{color:E})},30);r.addEventListener("input",o),document.body.appendChild(r),requestAnimationFrame(()=>{r.focus(),r.click()})}),q(this,"handleDocumentClick",r=>{this.isOpen&&!this.contains(r.target)&&this.closePanel()}),this.colorCollections=e.colorCollections||Mt,this.onColorPicked=e.onColorPicked,this.hasCustomPicker=e.hasCustomPicker||!1,this.pluginType=e.pluginType||"text",this.disabled=e.disabled||!1,this.defaultColor=ne(e.defaultColor||this.colorCollections[0]),this.selectedColor=this.defaultColor,this.customColor=ze(this.pluginType)||"",this.isOpen=!1,re.debug("ColorPicker initialized",{colorCollections:this.colorCollections.length,hasCustomPicker:this.hasCustomPicker,pluginType:this.pluginType})}render(){const e=this.renderColorButton(),r=this.isOpen?this.renderColorPanel():null;return O.jsx("section",{class:"color-section"},O.jsx("div",{class:"color-popover"},e,r))}renderColorButton(){return O.jsx("wsx-button",{type:"button",class:`color-btn ${this.disabled?"disabled":""}`,style:`--theme-color: ${this.selectedColor}`,disabled:this.disabled,onClick:this.handleButtonClick,ref:e=>{this.colorBtn=e}},O.jsx("span",{class:"color-indicator"},"_"))}renderColorPanel(){return O.jsx("div",{class:"color-panel",onClick:this.handlePanelClick,ref:e=>{this.colorPanel=e}},O.jsx("div",{class:"color-grid"},this.hasCustomPicker?this.renderCustomPicker():null,this.renderColorButtons()))}renderCustomPicker(){return O.jsx("wsx-button",{type:"button",class:"color-cube custom-picker",style:{backgroundColor:this.customColor},onClick:this.handleCustomPickerClick,title:"自定义颜色"})}renderColorButtons(){return this.colorCollections.map(e=>O.jsx("wsx-button",{key:e,type:"button",class:"color-cube",style:`background-color: ${e}`,"data-color":e,title:e,onClick:()=>this.handleColorSelect(e)}))}togglePanel(){this.setOpen(!this.isOpen)}closePanel(){this.setOpen(!1)}setSelectedColor(e){this.selectedColor=e,this.setAttr("selected-color",e),this.updateColorButton()}setCustomColor(e){this.customColor=e,Me(e,this.pluginType)}setOpen(e){this.isOpen=e,e?this.setAttr("open",""):this.removeAttr("open"),this.rerender()}updateColorButton(){this.colorBtn&&this.colorBtn.style.setProperty("--theme-color",this.selectedColor)}onConnected(){var e;(e=super.onConnected)==null||e.call(this),document.addEventListener("click",this.handleDocumentClick),re.info("ColorPicker connected to DOM")}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),document.removeEventListener("click",this.handleDocumentClick),re.info("ColorPicker disconnected from DOM")}onAttributeChanged(e,r,o){switch(e){case"disabled":this.disabled=o!==null,this.rerender();break;case"selected-color":o&&o!==this.selectedColor&&(this.selectedColor=o,this.updateColorButton());break;case"open":this.isOpen=o!==null;break}}getSelectedColor(){return this.selectedColor}setColor(e){this.setSelectedColor(ne(e))}focus(){var e;(e=this.colorBtn)==null||e.focus()}}Be=zt;[exports.ColorPicker,He]=$t(Be,[],Ue,0,void 0,O.WebComponent).c;He();const Pt=":host{display:block}.theme-switcher-container{position:relative;display:flex;align-items:center}.theme-switcher-btn{width:var(--theme-switcher-width, 2.5rem);height:var(--theme-switcher-height, 2.5rem);padding:var(--theme-switcher-padding, .5rem);border-radius:var(--theme-switcher-border-radius, 8px);background:var(--theme-switcher-bg, #dc2626);border:var(--theme-switcher-border, none);color:var(--theme-switcher-color, white);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--theme-switcher-transition, .3s ease);box-shadow:var(--theme-switcher-shadow, 0 4px 15px rgba(220, 38, 38, .4));font-weight:var(--theme-switcher-font-weight, 600);font-family:var(--theme-switcher-font-family, inherit)}.theme-switcher-btn:hover{background:var(--theme-switcher-hover-bg, #b91c1c);transform:var(--theme-switcher-hover-transform, translateY(-2px));box-shadow:var(--theme-switcher-hover-shadow, 0 8px 25px rgba(220, 38, 38, .5))}.theme-switcher-btn:active{transform:var(--theme-switcher-active-transform, translateY(0))}.theme-switcher-icon{font-size:var(--theme-switcher-icon-size, 1rem);line-height:1;transition:transform var(--theme-switcher-icon-transition, .3s ease)}.theme-switcher-btn:hover .theme-switcher-icon{transform:var(--theme-switcher-icon-hover-transform, rotate(360deg))}.theme-switcher-btn[data-theme=light]{background:var(--theme-switcher-light-bg, #dc2626);color:var(--theme-switcher-light-color, white)}.theme-switcher-btn[data-theme=light]:hover{background:var(--theme-switcher-light-hover-bg, #b91c1c)}.theme-switcher-btn[data-theme=dark]{background:var(--theme-switcher-dark-bg, #dc2626);color:var(--theme-switcher-dark-color, white)}.theme-switcher-btn[data-theme=dark]:hover{background:var(--theme-switcher-dark-hover-bg, #b91c1c)}.theme-switcher-btn[data-theme=auto]{background:var(--theme-switcher-auto-bg, linear-gradient(135deg, #dc2626, #b91c1c));color:var(--theme-switcher-auto-color, white)}.theme-switcher-btn[data-theme=auto]:hover{background:var(--theme-switcher-auto-hover-bg, linear-gradient(135deg, #b91c1c, #991b1b))}@media (max-width: 768px){.theme-switcher-btn{width:var(--theme-switcher-mobile-width, 2rem);height:var(--theme-switcher-mobile-height, 2rem)}.theme-switcher-icon{font-size:var(--theme-switcher-mobile-icon-size, .9rem)}}";var We;let Ve,Ye;function le(t,e,r){return(e=Ke(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:fe(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||fe(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return Ut(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Ke(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Ke(t){var e=Ht(t,"string");return typeof e=="symbol"?e:e+""}function Ht(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function fe(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function Ut(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}Ye=[O.autoRegister({tagName:"wsx-theme-switcher"})];exports.ThemeSwitcher=void 0;class Gt extends O.WebComponent{constructor(){super({styleName:"theme-switcher"}),le(this,"_autoStyles",Pt),le(this,"currentTheme","auto"),le(this,"toggleTheme",()=>{const e=["auto","light","dark"],o=(e.indexOf(this.currentTheme)+1)%e.length;this.setTheme(e[o])}),this.initTheme()}render(){return O.jsx("div",{class:"theme-switcher-container"},O.jsx("button",{class:"theme-switcher-btn","data-theme":this.currentTheme,onClick:this.toggleTheme,title:`当前主题: ${this.getThemeLabel()}`},O.jsx("span",{class:"theme-switcher-icon"},this.getThemeIcon())))}getThemeIcon(){const r=document.documentElement.classList.contains("dark");return this.currentTheme==="auto"?r?"🌙":"☀️":this.currentTheme==="light"?"☀️":"🌙"}getThemeLabel(){return{light:"浅色",dark:"深色",auto:"自动"}[this.currentTheme]}setTheme(e){this.currentTheme=e;const r=document.documentElement;e==="auto"?(r.removeAttribute("class"),this.checkSystemTheme()):r.className=e,localStorage.setItem("wsx-theme",e),this.rerender()}checkSystemTheme(){const e=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.className=e?"dark":""}initTheme(){const e=localStorage.getItem("wsx-theme")||"auto";this.setTheme(e),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r=>{this.currentTheme==="auto"&&(document.documentElement.className=r.matches?"dark":"")})}}We=Gt;[exports.ThemeSwitcher,Ve]=Bt(We,[],Ye,0,void 0,O.WebComponent).c;Ve();const me=":host{display:inline-block;position:relative}.dropdown-container{position:relative;display:inline-block}.dropdown-button{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem .75rem;min-width:120px;background:var(--dropdown-bg, rgba(255, 255, 255, .1));border:1px solid var(--dropdown-border, rgba(255, 255, 255, .2));border-radius:var(--dropdown-border-radius, .5rem);color:var(--dropdown-color, currentColor);cursor:pointer;font-size:.875rem;font-weight:500;transition:all .2s ease;text-align:left}.dropdown-button:hover:not(.disabled){background:var(--dropdown-hover-bg, rgba(255, 255, 255, .15));border-color:var(--dropdown-hover-border, rgba(255, 255, 255, .3))}.dropdown-button:focus:not(.disabled){outline:2px solid var(--dropdown-focus-color, var(--focus-color, #dc2626));outline-offset:2px}.dropdown-button.open{background:var(--dropdown-open-bg, rgba(255, 255, 255, .2))}.dropdown-button.disabled{opacity:.5;cursor:not-allowed}.dropdown-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-arrow{font-size:.625rem;opacity:.7;transition:transform .2s ease;flex-shrink:0}.dropdown-button.open .dropdown-arrow{transform:rotate(180deg)}.dropdown-menu{position:absolute;z-index:1000;min-width:160px;max-width:300px;max-height:300px;overflow-y:auto;background:var(--dropdown-menu-bg, #ffffff);border:1px solid var(--dropdown-menu-border, #e5e7eb);border-radius:var(--dropdown-border-radius, .5rem);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;padding:.25rem;margin:.25rem 0 0}[data-theme=dark] .dropdown-menu{background:var(--dropdown-menu-bg-dark, #1f2937);border-color:var(--dropdown-menu-border-dark, #374151)}.dropdown-menu.dropdown-top{bottom:100%;margin:0 0 .25rem}.dropdown-menu.dropdown-bottom{top:100%;margin:.25rem 0 0}.dropdown-menu.dropdown-left{left:0}.dropdown-menu.dropdown-right{right:0}.dropdown-menu.dropdown-center{left:50%;transform:translate(-50%)}.dropdown-menu.dropdown-top.dropdown-center{transform:translate(-50%) translateY(-100%)}.dropdown-option{display:flex;align-items:center;width:100%;padding:.5rem .75rem;background:transparent;border:none;border-radius:.375rem;color:var(--dropdown-option-color, #1f2937);cursor:pointer;font-size:.875rem;text-align:left;transition:background-color .15s ease}[data-theme=dark] .dropdown-option{color:var(--dropdown-option-color-dark, #f3f4f6)}.dropdown-option:hover:not(.disabled){background:var(--dropdown-option-hover-bg, #f3f4f6)}[data-theme=dark] .dropdown-option:hover:not(.disabled){background:var(--dropdown-option-hover-bg-dark, #374151)}.dropdown-option.selected{background:var(--dropdown-option-selected-bg, #dc2626);color:var(--dropdown-option-selected-color, #ffffff);font-weight:600}.dropdown-option.selected:hover{background:var(--dropdown-option-selected-hover-bg, #b91c1c)}.dropdown-option.disabled{opacity:.5;cursor:not-allowed}.dropdown-empty{padding:.5rem .75rem;color:var(--dropdown-empty-color, #9ca3af);font-size:.875rem;text-align:center}@media (max-width: 768px){.dropdown-button{min-width:100px;padding:.375rem .5rem;font-size:.8125rem}.dropdown-menu{min-width:140px;max-width:200px}}";var Ze;let Xe,qe;function J(t,e,r){return(e=Qe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:ve(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||ve(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return Yt(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:Qe(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function Qe(t){var e=Vt(t,"string");return typeof e=="symbol"?e:e+""}function Vt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function ve(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function Yt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}qe=[O.autoRegister({tagName:"wsx-dropdown"})];exports.Dropdown=void 0;class Kt extends O.WebComponent{constructor(e={}){super({styles:me,styleName:"wsx-dropdown"}),J(this,"_autoStyles",me),J(this,"options",[]),J(this,"selectedValue",void 0),J(this,"isOpen",void 0),J(this,"config",{}),J(this,"buttonElement",void 0),J(this,"dropdownElement",void 0),J(this,"outsideClickHandler",void 0),J(this,"toggleDropdown",()=>{this.config.disabled||(this.isOpen=!this.isOpen,this.rerender(),this.isOpen?setTimeout(()=>{this.attachOutsideClickHandler()},0):this.detachOutsideClickHandler())}),J(this,"openDropdown",()=>{this.config.disabled||this.isOpen||(this.isOpen=!0,this.rerender())}),J(this,"closeDropdown",()=>{this.isOpen&&(this.isOpen=!1,this.rerender(),this.detachOutsideClickHandler())}),J(this,"selectOption",E=>{this.setValue(E),this.config.trigger==="click"&&this.closeDropdown()}),J(this,"attachOutsideClickHandler",()=>{this.config.trigger!=="hover"&&(this.outsideClickHandler=E=>{const A=E.target;this.dropdownElement&&this.buttonElement&&!this.dropdownElement.contains(A)&&!this.buttonElement.contains(A)&&this.closeDropdown()},document.addEventListener("click",this.outsideClickHandler,!0))}),J(this,"detachOutsideClickHandler",()=>{this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,!0),this.outsideClickHandler=void 0)}),this.config={placeholder:"Select...",align:"left",position:"bottom",trigger:"click",...e};const[r,o]=this.useState("selectedValue","");Object.defineProperty(this,"selectedValue",{get:r,set:o,enumerable:!0,configurable:!0});const[S,C]=this.useState("isOpen",!1);Object.defineProperty(this,"isOpen",{get:S,set:C,enumerable:!0,configurable:!0})}setOptions(e){this.options=e,this.rerender()}setValue(e){this.selectedValue=e,this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0}))}getValue(){return this.selectedValue||void 0}render(){const e=this.options.find(o=>o.value===this.selectedValue&&this.selectedValue!==""),r=(e==null?void 0:e.label)||this.config.placeholder||"Select...";return O.jsx("div",{class:"dropdown-container"},O.jsx("button",{ref:o=>this.buttonElement=o,class:`dropdown-button ${this.isOpen?"open":""} ${this.config.disabled?"disabled":""}`,onClick:this.config.trigger==="click"?this.toggleDropdown:void 0,onMouseEnter:this.config.trigger==="hover"?this.openDropdown:void 0,onMouseLeave:this.config.trigger==="hover"?this.closeDropdown:void 0,disabled:this.config.disabled,"aria-expanded":this.isOpen,"aria-haspopup":"listbox"},O.jsx("span",{class:"dropdown-text"},r),O.jsx("span",{class:"dropdown-arrow"},this.isOpen?"▲":"▼")),this.isOpen&&O.jsx("div",{ref:o=>this.dropdownElement=o,class:`dropdown-menu dropdown-${this.config.position} dropdown-${this.config.align}`,role:"listbox",onMouseEnter:this.config.trigger==="hover"?this.openDropdown:void 0,onMouseLeave:this.config.trigger==="hover"?this.closeDropdown:void 0},this.options.length===0?O.jsx("div",{class:"dropdown-empty"},"No options"):this.options.map(o=>O.jsx("button",{key:o.value,class:`dropdown-option ${o.value===this.selectedValue&&this.selectedValue!==""?"selected":""} ${o.disabled?"disabled":""}`,onClick:()=>!o.disabled&&this.selectOption(o.value),role:"option","aria-selected":o.value===this.selectedValue&&this.selectedValue!=="",disabled:o.disabled},o.render?o.render():O.jsx("span",null,o.label)))))}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),this.detachOutsideClickHandler()}}Ze=Kt;[exports.Dropdown,Xe]=Wt(Ze,[],qe,0,void 0,O.WebComponent).c;Xe();const ye=":host{display:inline-block;position:relative}.combobox-container{position:relative;display:inline-block;width:100%}.combobox-input-wrapper{position:relative;display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;min-width:200px;background:var(--combobox-bg, rgba(255, 255, 255, .1));border:1px solid var(--combobox-border, rgba(255, 255, 255, .2));border-radius:var(--combobox-border-radius, .5rem);transition:all .2s ease}.combobox-input-wrapper:focus-within{background:var(--combobox-focus-bg, rgba(255, 255, 255, .15));border-color:var(--combobox-focus-border, var(--focus-color, #dc2626));outline:2px solid var(--combobox-focus-outline, rgba(220, 38, 38, .2));outline-offset:2px}.combobox-tags{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap;flex:1}.combobox-tag{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .5rem;background:var(--combobox-tag-bg, #dc2626);color:var(--combobox-tag-color, #ffffff);border-radius:.25rem;font-size:.75rem;font-weight:500}.combobox-tag-remove{background:none;border:none;color:var(--combobox-tag-color, #ffffff);cursor:pointer;font-size:1rem;line-height:1;padding:0;width:16px;height:16px;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color .15s ease}.combobox-tag-remove:hover{background:#fff3}.combobox-tag-more{padding:.25rem .5rem;color:var(--combobox-tag-color, #ffffff);font-size:.75rem;font-weight:500}.combobox-input{flex:1;border:none;background:transparent;color:var(--combobox-color, currentColor);font-size:.875rem;font-weight:500;outline:none;min-width:0}.combobox-input::placeholder{color:var(--combobox-placeholder-color, rgba(255, 255, 255, .5))}.combobox-input:disabled{opacity:.5;cursor:not-allowed}.combobox-arrow{background:none;border:none;color:var(--combobox-arrow-color, currentColor);cursor:pointer;font-size:.625rem;opacity:.7;transition:transform .2s ease;flex-shrink:0;padding:.25rem;display:flex;align-items:center;justify-content:center}.combobox-arrow:hover{opacity:1}.combobox-arrow.open{transform:rotate(180deg)}.combobox-arrow:disabled{opacity:.5;cursor:not-allowed}.combobox-menu{position:absolute;z-index:1000;min-width:100%;max-width:300px;max-height:300px;overflow-y:auto;background:var(--combobox-menu-bg, #ffffff);border:1px solid var(--combobox-menu-border, #e5e7eb);border-radius:var(--combobox-border-radius, .5rem);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;padding:.25rem;margin:.25rem 0 0}[data-theme=dark] .combobox-menu{background:var(--combobox-menu-bg-dark, #1f2937);border-color:var(--combobox-menu-border-dark, #374151)}.combobox-menu.combobox-top{bottom:100%;margin:0 0 .25rem}.combobox-menu.combobox-bottom{top:100%;margin:.25rem 0 0}.combobox-menu.combobox-left{left:0}.combobox-menu.combobox-right{right:0}.combobox-menu.combobox-center{left:50%;transform:translate(-50%)}.combobox-menu.combobox-top.combobox-center{transform:translate(-50%) translateY(-100%)}.combobox-option{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem;background:transparent;border:none;border-radius:.375rem;color:var(--combobox-option-color, #1f2937);cursor:pointer;font-size:.875rem;text-align:left;transition:background-color .15s ease}[data-theme=dark] .combobox-option{color:var(--combobox-option-color-dark, #f3f4f6)}.combobox-option:hover:not(.disabled){background:var(--combobox-option-hover-bg, #f3f4f6)}[data-theme=dark] .combobox-option:hover:not(.disabled){background:var(--combobox-option-hover-bg-dark, #374151)}.combobox-option.selected{background:var(--combobox-option-selected-bg, #dc2626);color:var(--combobox-option-selected-color, #ffffff);font-weight:600}.combobox-option.selected:hover{background:var(--combobox-option-selected-hover-bg, #b91c1c)}.combobox-option.disabled{opacity:.5;cursor:not-allowed}.combobox-checkbox{width:16px;height:16px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.75rem;font-weight:700}.combobox-empty{padding:.5rem .75rem;color:var(--combobox-empty-color, #9ca3af);font-size:.875rem;text-align:center}@media (max-width: 768px){.combobox-input-wrapper{min-width:150px;padding:.375rem .5rem}.combobox-input{font-size:.8125rem}.combobox-menu{max-width:200px}}";var Je;let et,tt;function Q(t,e,r){return(e=rt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:ke(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||ke(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return qt(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:rt(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function rt(t){var e=Xt(t,"string");return typeof e=="symbol"?e:e+""}function Xt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function ke(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function qt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}tt=[O.autoRegister({tagName:"wsx-combobox"})];exports.Combobox=void 0;class Qt extends O.WebComponent{constructor(e={}){super({styles:ye,styleName:"wsx-combobox"}),Q(this,"_autoStyles",ye),Q(this,"options",[]),Q(this,"selectedValue",void 0),Q(this,"searchQuery",void 0),Q(this,"isOpen",void 0),Q(this,"config",{}),Q(this,"inputElement",void 0),Q(this,"dropdownElement",void 0),Q(this,"outsideClickHandler",void 0),Q(this,"handleInput",m=>{if(!this.config.searchable)return;const D=m.target;this.searchQuery=D.value,this.rerender()}),Q(this,"toggleDropdown",()=>{this.config.disabled||(this.isOpen=!this.isOpen,this.isOpen&&this.config.searchable&&this.inputElement&&this.inputElement.focus(),this.rerender(),this.isOpen?setTimeout(()=>{this.attachOutsideClickHandler()},0):(this.detachOutsideClickHandler(),this.searchQuery=""))}),Q(this,"openDropdown",()=>{this.config.disabled||this.isOpen||(this.isOpen=!0,this.config.searchable&&this.inputElement&&this.inputElement.focus(),this.rerender(),setTimeout(()=>{this.attachOutsideClickHandler()},0))}),Q(this,"closeDropdown",()=>{this.isOpen&&(this.isOpen=!1,this.searchQuery="",this.rerender(),this.detachOutsideClickHandler())}),Q(this,"selectOption",m=>{if(this.config.multiple){const D=Array.isArray(this.selectedValue)?this.selectedValue:[],$=D.includes(m)?D.filter(T=>T!==m):[...D,m];this.selectedValue=$}else this.selectedValue=m,this.closeDropdown();this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.selectedValue},bubbles:!0}))}),Q(this,"removeValue",m=>{if(!this.config.multiple)return;const D=Array.isArray(this.selectedValue)?this.selectedValue:[];this.selectedValue=D.filter($=>$!==m),this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.selectedValue},bubbles:!0}))}),Q(this,"attachOutsideClickHandler",()=>{this.outsideClickHandler=m=>{const D=m.target;this.dropdownElement&&this.inputElement&&!this.dropdownElement.contains(D)&&!this.inputElement.contains(D)&&this.closeDropdown()},document.addEventListener("click",this.outsideClickHandler,!0)}),Q(this,"detachOutsideClickHandler",()=>{this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,!0),this.outsideClickHandler=void 0)}),this.config={placeholder:"Select or search...",searchable:!0,multiple:!1,align:"left",position:"bottom",...e};const[r,o]=this.useState("selectedValue","");Object.defineProperty(this,"selectedValue",{get:r,set:o,enumerable:!0,configurable:!0});const[S,C]=this.useState("searchQuery","");Object.defineProperty(this,"searchQuery",{get:S,set:C,enumerable:!0,configurable:!0});const[E,A]=this.useState("isOpen",!1);Object.defineProperty(this,"isOpen",{get:E,set:A,enumerable:!0,configurable:!0})}setOptions(e){this.options=e,this.rerender()}setValue(e){if(this.selectedValue=e,this.inputElement&&!this.config.multiple){const r=this.options.find(o=>o.value===(Array.isArray(e)?e[0]:e));this.inputElement.value=(r==null?void 0:r.label)||""}this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0}))}getValue(){return this.selectedValue}getFilteredOptions(){if(!this.config.searchable||!this.searchQuery.trim())return this.options;const e=this.searchQuery.toLowerCase();return this.options.filter(r=>r.label.toLowerCase().includes(e)||r.value.toLowerCase().includes(e))}render(){const e=this.getFilteredOptions(),r=this.config.multiple,o=Array.isArray(this.selectedValue)?this.selectedValue:this.selectedValue?[this.selectedValue]:[];let S="";if(r)if(o.length===0)S=this.config.placeholder||"Select...";else if(o.length===1){const C=this.options.find(E=>E.value===o[0]);S=(C==null?void 0:C.label)||o[0]}else S=`${o.length} selected`;else{const C=this.options.find(E=>E.value===this.selectedValue);S=(C==null?void 0:C.label)||this.config.placeholder||"Select..."}return O.jsx("div",{class:"combobox-container"},O.jsx("div",{class:"combobox-input-wrapper"},r&&o.length>0&&O.jsx("div",{class:"combobox-tags"},o.slice(0,2).map(C=>{const E=this.options.find(A=>A.value===C);return O.jsx("span",{key:C,class:"combobox-tag"},(E==null?void 0:E.label)||C,O.jsx("button",{class:"combobox-tag-remove",onClick:A=>{A.stopPropagation(),this.removeValue(C)}},"×"))}),o.length>2&&O.jsx("span",{class:"combobox-tag-more"},"+",o.length-2)),O.jsx("input",{ref:C=>this.inputElement=C,type:"text",class:"combobox-input",placeholder:S,value:this.config.searchable&&this.isOpen?this.searchQuery:"",onInput:this.handleInput,onFocus:this.openDropdown,onClick:this.openDropdown,disabled:this.config.disabled,readonly:!this.config.searchable}),O.jsx("button",{class:`combobox-arrow ${this.isOpen?"open":""}`,onClick:this.toggleDropdown,disabled:this.config.disabled},this.isOpen?"▲":"▼")),this.isOpen&&O.jsx("div",{ref:C=>this.dropdownElement=C,class:`combobox-menu combobox-${this.config.position} combobox-${this.config.align}`,role:"listbox"},e.length===0?O.jsx("div",{class:"combobox-empty"},this.config.searchable&&this.searchQuery?"No results found":"No options"):e.map(C=>{const E=r?o.includes(C.value):C.value===this.selectedValue;return O.jsx("button",{key:C.value,class:`combobox-option ${E?"selected":""} ${C.disabled?"disabled":""}`,onClick:()=>!C.disabled&&this.selectOption(C.value),role:"option","aria-selected":E,disabled:C.disabled},r&&O.jsx("span",{class:"combobox-checkbox"},E?"✓":""),C.render?C.render():O.jsx("span",null,C.label))})))}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),this.detachOutsideClickHandler()}}Je=Qt;[exports.Combobox,et]=Zt(Je,[],tt,0,void 0,O.WebComponent).c;et();class de{static detect(e){const{container:r,items:o,gap:S=16,reservedWidth:C=0,overflowButtonWidth:E=0,padding:A=0,minVisibleItems:m=1}=e;if(!r||o.length===0)return{visibleIndices:[],hiddenIndices:[],needsOverflow:!1};const $=r.offsetWidth-C-A*2;let T=0;const N=[],P=[];for(let a=0;a<o.length;a++){const n=o[a];if(!n||n.offsetWidth===0){N.push(a);continue}const c=n.offsetWidth+(a>0?S:0);T+c<=$?(T+=c,N.push(a)):P.push(a)}if(P.length===0)return{visibleIndices:N,hiddenIndices:[],needsOverflow:!1};const i=$-E-S;T=0;const l=[],d=[];for(let a=0;a<o.length;a++){const n=o[a];if(!n||n.offsetWidth===0){l.length<m?l.push(a):d.push(a);continue}const c=n.offsetWidth+(l.length>0?S:0);T+c<=i?(T+=c,l.push(a)):d.push(a)}if(l.length<m&&o.length>0){const a=m-l.length,n=d.splice(0,a);l.push(...n),l.sort((c,h)=>c-h)}return{visibleIndices:l,hiddenIndices:d,needsOverflow:d.length>0}}static calculateTotalWidth(e,r=16){return e.length===0?0:e.reduce((o,S,C)=>{const E=S.offsetWidth||0;return o+E+(C>0?r:0)},0)}static getElementTotalWidth(e){if(!e)return 0;const r=window.getComputedStyle(e),o=e.offsetWidth,S=parseFloat(r.marginLeft)||0,C=parseFloat(r.marginRight)||0;return o+S+C}}const xe=':host{display:block}.responsive-nav{position:fixed;top:0;left:0;right:0;z-index:1000;background:var(--nav-bg, var(--bg-primary));-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);border-bottom:1px solid var(--nav-border, var(--border-color));transition:all .3s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 3px #0000000d}.responsive-nav.nav-scrolled{background:var(--nav-bg-scrolled, var(--bg-primary));box-shadow:0 4px 24px var(--nav-shadow, var(--card-shadow));border-bottom-color:var(--nav-border, var(--border-color))}.nav-container{max-width:1280px;margin:0 auto;padding:0 2rem;display:flex;align-items:center;justify-content:space-between;height:72px;gap:1.5rem}.nav-brand{display:flex;align-items:center;gap:.75rem;font-weight:800;font-size:1.5rem;color:var(--nav-brand-color, var(--text-primary));flex-shrink:0;transition:transform .2s ease;cursor:pointer}.nav-brand:hover{transform:scale(1.05)}.nav-brand-icon{display:flex;align-items:center;font-size:1.8rem;transition:transform .3s ease}.nav-brand:hover .nav-brand-icon{transform:rotate(5deg) scale(1.1)}.nav-brand-text{background:linear-gradient(135deg,var(--hero-gradient-start, var(--primary-red)),var(--hero-gradient-end, var(--accent-orange)));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;letter-spacing:-.02em;position:relative}.nav-menu{display:flex;align-items:center;gap:.5rem;flex:1;justify-content:flex-end;overflow:visible;padding-right:.5rem}wsx-link.nav-link{display:inline-flex;align-items:center;flex-shrink:0}wsx-link.nav-link::part(link){color:var(--nav-link-color, var(--text-secondary));text-decoration:none!important;font-weight:500;font-size:.95rem;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;white-space:nowrap;padding:.5rem .75rem;border-radius:.5rem;display:inline-flex;align-items:center}wsx-link.nav-link::part(link):hover{color:var(--nav-link-hover-color, var(--text-primary));background:var(--nav-link-hover-bg, var(--bg-secondary));text-decoration:none!important;transform:translateY(-1px)}wsx-link.nav-link::part(link):after{content:none!important;display:none!important;width:0!important;height:0!important;background:none!important}wsx-link.nav-link::part(link):hover:after{content:none!important;display:none!important;width:0!important;height:0!important;background:none!important}wsx-link.nav-link::part(link):before{display:none}wsx-link.nav-link[active]::part(link),wsx-link.nav-link.nav-link-active::part(link){color:var(--nav-link-active-color, var(--primary-red))!important;font-weight:600;background:var(--nav-link-active-bg, var(--bg-secondary));text-decoration:none!important}wsx-link.nav-link[active]::part(link):after,wsx-link.nav-link.nav-link-active::part(link):after{content:none!important;display:none!important;width:0!important;height:0!important;background:none!important}wsx-link.nav-link[active]::part(link):before,wsx-link.nav-link.nav-link-active::part(link):before{content:"";display:block;position:absolute;bottom:.125rem;left:50%;transform:translate(-50%);width:calc(100% - 1.5rem);height:3px;background:linear-gradient(135deg,var(--hero-gradient-start, var(--primary-red)),var(--hero-gradient-end, var(--accent-orange)));border-radius:2px;z-index:1}.nav-link{color:var(--nav-link-color, var(--text-secondary));text-decoration:none;font-weight:500;font-size:.95rem;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;white-space:nowrap;flex-shrink:0;padding:.5rem .75rem;border-radius:.5rem;display:inline-flex;align-items:center}.nav-link:hover{color:var(--nav-link-hover-color, var(--text-primary));background:var(--nav-link-hover-bg, var(--bg-secondary));transform:translateY(-1px)}.nav-link:after{content:"";position:absolute;bottom:.25rem;left:50%;transform:translate(-50%);width:0;height:2px;background:linear-gradient(135deg,var(--hero-gradient-start, var(--primary-red)),var(--hero-gradient-end, var(--accent-orange)));border-radius:2px;transition:width .3s cubic-bezier(.4,0,.2,1)}.nav-link:hover:after{width:calc(100% - 1.5rem)}.nav-link-active{color:var(--nav-link-active-color, var(--primary-red))!important;font-weight:600;background:var(--nav-link-active-bg, var(--bg-secondary))}.nav-link-active:after{width:calc(100% - 1.5rem)!important;height:3px!important;bottom:.125rem!important}.nav-overflow{position:relative;flex-shrink:0}.nav-overflow-button{padding:.5rem .875rem;background:var(--nav-overflow-bg, transparent);border:1px solid var(--nav-overflow-border, var(--border-color));border-radius:.5rem;color:var(--nav-link-color, var(--text-secondary));cursor:pointer;font-size:.875rem;font-weight:500;transition:all .25s cubic-bezier(.4,0,.2,1);display:inline-flex;align-items:center;gap:.25rem}.nav-overflow-button:hover{background:var(--nav-overflow-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));border-color:var(--nav-overflow-hover-border, var(--border-color));transform:translateY(-1px);box-shadow:0 2px 8px var(--card-shadow)}.nav-overflow-menu{position:absolute;top:calc(100% + .75rem);right:0;min-width:180px;background:var(--nav-overflow-menu-bg, var(--bg-primary));border:1px solid var(--nav-overflow-menu-border, var(--border-color));border-radius:.75rem;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a;padding:.5rem;z-index:1001;-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);animation:slideDown .2s cubic-bezier(.4,0,.2,1)}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}wsx-link.nav-overflow-link::part(link){display:block;padding:.625rem .875rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none!important;font-weight:500;font-size:.9rem;border-radius:.5rem;transition:all .2s cubic-bezier(.4,0,.2,1);margin-bottom:.25rem;border-left:3px solid transparent}wsx-link.nav-overflow-link::part(link):hover{background:var(--nav-overflow-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));text-decoration:none!important;transform:translate(4px)}wsx-link.nav-overflow-link[active]::part(link),wsx-link.nav-overflow-link.nav-link-active::part(link){background:var(--nav-overflow-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);padding-left:.625rem}.nav-overflow-link{display:block;padding:.625rem .875rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none;font-weight:500;font-size:.9rem;border-radius:.5rem;transition:all .2s cubic-bezier(.4,0,.2,1);margin-bottom:.25rem;border-left:3px solid transparent}.nav-overflow-link:hover{background:var(--nav-overflow-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));transform:translate(4px)}.nav-overflow-link.nav-link-active{background:var(--nav-overflow-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);padding-left:.625rem}.nav-actions{display:flex;align-items:center;gap:.75rem;flex-shrink:0;margin-left:.5rem;z-index:1002;padding-left:.75rem;border-left:1px solid var(--nav-actions-border, var(--border-color))}.nav-action{display:flex;align-items:center;transition:transform .2s ease}.nav-action:hover{transform:scale(1.05)}.nav-toggle{display:none;flex-direction:column;gap:5px;background:var(--nav-toggle-bg, transparent);border:1px solid var(--nav-toggle-border, var(--border-color));border-radius:.5rem;cursor:pointer;padding:.625rem .5rem;z-index:1001;transition:all .25s ease}.nav-toggle:hover{background:var(--nav-toggle-hover-bg, var(--bg-secondary));border-color:var(--nav-toggle-hover-border, var(--border-color))}.nav-toggle-line{width:24px;height:3px;background:var(--nav-toggle-color, var(--text-primary));border-radius:3px;transition:all .3s cubic-bezier(.4,0,.2,1);transform-origin:center}.nav-toggle-line.open:nth-child(1){transform:rotate(45deg) translate(8px,8px)}.nav-toggle-line.open:nth-child(2){opacity:0}.nav-toggle-line.open:nth-child(3){transform:rotate(-45deg) translate(7px,-7px)}.nav-mobile-menu{position:fixed;top:72px;left:0;right:0;background:var(--nav-mobile-bg, var(--bg-primary));-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);flex-direction:column;padding:1.5rem;gap:.5rem;transform:translateY(-100%);opacity:0;visibility:hidden;transition:all .3s cubic-bezier(.4,0,.2,1);border-bottom:1px solid var(--nav-border, var(--border-color));max-height:calc(100vh - 72px);overflow-y:auto;z-index:999;box-shadow:0 4px 24px #0000001a}.nav-mobile-menu.open{transform:translateY(0);opacity:1;visibility:visible}wsx-link.nav-mobile-link::part(link){display:block;padding:.875rem 1.25rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none!important;font-weight:500;font-size:1rem;border-radius:.625rem;transition:all .25s cubic-bezier(.4,0,.2,1);border-left:3px solid transparent}wsx-link.nav-mobile-link::part(link):hover{background:var(--nav-mobile-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));text-decoration:none!important;transform:translate(4px);border-left-color:var(--primary-red)}wsx-link.nav-mobile-link[active]::part(link),wsx-link.nav-mobile-link.nav-link-active::part(link){background:var(--nav-mobile-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);box-shadow:0 2px 8px var(--card-shadow)}.nav-mobile-link{display:block;padding:.875rem 1.25rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none;font-weight:500;font-size:1rem;border-radius:.625rem;transition:all .25s cubic-bezier(.4,0,.2,1);border-left:3px solid transparent}.nav-mobile-link:hover{background:var(--nav-mobile-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));transform:translate(4px);border-left-color:var(--primary-red)}.nav-mobile-link.nav-link-active{background:var(--nav-mobile-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);box-shadow:0 2px 8px var(--card-shadow)}@media (max-width: 768px){.nav-container{padding:0 1.25rem;height:68px}.nav-brand{font-size:1.35rem}.nav-menu{display:none}.nav-actions{margin-left:0;gap:.5rem;padding-left:.5rem;border-left:none}.nav-toggle{display:flex;margin-left:.5rem}.nav-mobile-menu{display:flex;top:68px;max-height:calc(100vh - 68px)}}@media (min-width: 769px){.nav-mobile-menu{display:none!important}}@media (prefers-reduced-motion: no-preference){.responsive-nav,.nav-link,.nav-overflow-button,.nav-toggle{transition-duration:.25s}}@media (prefers-reduced-motion: reduce){.responsive-nav,.nav-link,.nav-overflow-button,.nav-toggle,.nav-mobile-menu{transition:none;animation:none}}';var nt;let ot,it;function Z(t,e,r){return(e=at(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jt(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:we(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||we(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return tr(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:at(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function at(t){var e=er(t,"string");return typeof e=="symbol"?e:e+""}function er(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function we(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function tr(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}it=[O.autoRegister({tagName:"wsx-responsive-nav"})];exports.ResponsiveNav=void 0;class rr extends O.WebComponent{constructor(e){super({styles:xe,styleName:"wsx-responsive-nav"}),Z(this,"_autoStyles",xe),Z(this,"navigation",void 0),Z(this,"isMobileMenuOpen",void 0),Z(this,"visibleItemIndices",void 0),Z(this,"hiddenItemIndices",void 0),Z(this,"isMobile",void 0),Z(this,"isOverflowOpen",void 0),Z(this,"navMenuElement",void 0),Z(this,"navItemsElements",[]),Z(this,"resizeObserver",void 0),Z(this,"resizeHandler",void 0),Z(this,"toggleMobileMenu",()=>{this.isMobileMenuOpen=!this.isMobileMenuOpen,this.rerender()}),Z(this,"closeMobileMenu",()=>{this.isMobileMenuOpen=!1,this.rerender()}),Z(this,"toggleOverflow",()=>{this.isOverflowOpen=!this.isOverflowOpen,this.rerender(),this.isOverflowOpen?setTimeout(()=>{document.addEventListener("click",this.handleOverflowOutsideClick,!0)},0):document.removeEventListener("click",this.handleOverflowOutsideClick,!0)}),Z(this,"closeOverflow",()=>{this.isOverflowOpen=!1,this.rerender(),document.removeEventListener("click",this.handleOverflowOutsideClick,!0)}),Z(this,"handleOverflowOutsideClick",T=>{const N=T.target,P=this.querySelector(".nav-overflow"),i=P==null?void 0:P.querySelector(".nav-overflow-menu"),l=P==null?void 0:P.querySelector(".nav-overflow-button");i&&l&&!i.contains(N)&&!l.contains(N)&&this.closeOverflow()}),Z(this,"updateVisibleItems",()=>{var c;if(!this.navigation.autoOverflow||this.isMobile||!this.navMenuElement){if(!this.isMobile){const h=this.navigation.items.map((p,y)=>y);JSON.stringify(h.sort())!==JSON.stringify(this.visibleItemIndices.sort())&&(this.visibleItemIndices=h,this.hiddenItemIndices=[],this.rerender())}return}const T=[];for(let h=0;h<this.navigation.items.length;h++){let p=this.navItemsElements[h];if(!p){const y=Array.from(this.navMenuElement.querySelectorAll(".nav-link"));y[h]&&(p=y[h],this.navItemsElements[h]=p)}if(p)T.push(p);else{const y=document.createElement("wsx-link");y.textContent=this.navigation.items[h].label,y.style.visibility="hidden",y.style.position="absolute",document.body.appendChild(y),T.push(y),setTimeout(()=>{y.parentElement&&y.parentElement.removeChild(y)},0)}}const N=(c=this.navMenuElement.parentElement)==null?void 0:c.querySelector(".nav-actions"),P=N?Array.from(N.children).reduce((h,p)=>h+de.getElementTotalWidth(p),0)+8:0,d=de.detect({container:this.navMenuElement,items:T,gap:16,reservedWidth:P,overflowButtonWidth:90,padding:0,minVisibleItems:1}),a=d.visibleIndices,n=d.hiddenIndices;T.forEach(h=>{h.parentElement===document.body&&document.body.removeChild(h)}),(JSON.stringify(a.sort())!==JSON.stringify(this.visibleItemIndices.sort())||JSON.stringify(n.sort())!==JSON.stringify(this.hiddenItemIndices.sort()))&&(this.visibleItemIndices=a,this.hiddenItemIndices=n,this.rerender())}),Z(this,"checkMobile",()=>{var N;const T=window.innerWidth<=(((N=this.navigation)==null?void 0:N.mobileBreakpoint)||768);T!==this.isMobile&&(this.isMobile=T,this.rerender())}),e&&(this.navigation={mobileBreakpoint:768,autoOverflow:!0,...e},this.visibleItemIndices=e.items.map((T,N)=>N));let r=this.reactive({items:[]});Object.defineProperty(this,"navigation",{get:()=>r,set:T=>{r=T!==null&&typeof T<"u"&&(Array.isArray(T)||typeof T=="object")?this.reactive(T):T,this.scheduleRerender()},enumerable:!0,configurable:!0});const[o,S]=this.useState("isMobileMenuOpen",!1);Object.defineProperty(this,"isMobileMenuOpen",{get:o,set:S,enumerable:!0,configurable:!0});let C=this.reactive([]);Object.defineProperty(this,"visibleItemIndices",{get:()=>C,set:T=>{C=T!==null&&typeof T<"u"&&(Array.isArray(T)||typeof T=="object")?this.reactive(T):T,this.scheduleRerender()},enumerable:!0,configurable:!0});let E=this.reactive([]);Object.defineProperty(this,"hiddenItemIndices",{get:()=>E,set:T=>{E=T!==null&&typeof T<"u"&&(Array.isArray(T)||typeof T=="object")?this.reactive(T):T,this.scheduleRerender()},enumerable:!0,configurable:!0});const[A,m]=this.useState("isMobile",!1);Object.defineProperty(this,"isMobile",{get:A,set:m,enumerable:!0,configurable:!0});const[D,$]=this.useState("isOverflowOpen",!1);Object.defineProperty(this,"isOverflowOpen",{get:D,set:$,enumerable:!0,configurable:!0})}render(){var r,o;if(!((r=this.navigation)!=null&&r.items)||((o=this.navigation)==null?void 0:o.items.length)===0)return O.jsx("nav",{class:"responsive-nav"});const e=this.hiddenItemIndices.map(S=>this.navigation.items[S]);return O.jsx("nav",{class:"responsive-nav"},O.jsx("div",{class:"nav-container"},O.jsx("div",{class:"nav-brand"},O.jsx("slot",{name:"brand-icon"},this.navigation.brandIcon&&typeof this.navigation.brandIcon=="string"&&O.jsx("span",{class:"nav-brand-icon"},this.navigation.brandIcon)),this.navigation.brand&&O.jsx("span",{class:"nav-brand-text"},this.navigation.brand)),!this.isMobile&&O.jsx("div",{ref:S=>this.navMenuElement=S,class:"nav-menu"},this.navigation.items.map((S,C)=>{const E=this.visibleItemIndices.includes(C);return O.jsx("wsx-link",{key:`nav-${C}`,ref:A=>{A&&(this.navItemsElements[C]=A)},to:S.to,class:`nav-link ${E?"":"hidden-item"}`,"active-class":"nav-link-active",exact:S.exact,style:E?"":"position: absolute; visibility: hidden; pointer-events: none;"},S.label)}),this.navigation.autoOverflow&&e.length>0&&!this.isMobile&&O.jsx("div",{class:"nav-overflow"},O.jsx("button",{class:"nav-overflow-button",onClick:this.toggleOverflow},"More ▼"),this.isOverflowOpen&&O.jsx("div",{class:"nav-overflow-menu"},e.map((S,C)=>{const E=this.hiddenItemIndices[C];return O.jsx("wsx-link",{key:`overflow-${E}`,to:S.to,class:"nav-overflow-link","active-class":"nav-link-active",exact:S.exact,onClick:this.closeOverflow},S.label)})))),this.navigation.actionTags&&O.jsx("div",{class:"nav-actions"},this.navigation.actionTags.map((S,C)=>{const E=S;return O.jsx("div",{key:C,class:"nav-action"},O.jsx(E,null))})),this.isMobile&&O.jsx("button",{class:"nav-toggle",onClick:this.toggleMobileMenu},O.jsx("span",{class:`nav-toggle-line ${this.isMobileMenuOpen?"open":""}`}),O.jsx("span",{class:`nav-toggle-line ${this.isMobileMenuOpen?"open":""}`}),O.jsx("span",{class:`nav-toggle-line ${this.isMobileMenuOpen?"open":""}`}))),this.isMobile&&O.jsx("div",{class:`nav-mobile-menu ${this.isMobileMenuOpen?"open":""}`},this.navigation.items.filter(S=>!S.hideOnMobile).map((S,C)=>O.jsx("wsx-link",{key:C,to:S.to,class:"nav-mobile-link","active-class":"nav-link-active",exact:S.exact,onClick:this.closeMobileMenu},S.label))))}onConnected(){var r,o,S;if((r=super.onConnected)==null||r.call(this),!((o=this.navigation)!=null&&o.items)||((S=this.navigation)==null?void 0:S.items.length)===0)try{this.visibleItemIndices=this.navigation.items.map((C,E)=>E),this.rerender()}catch(C){console.error("Failed to parse ResponsiveNav config:",C)}this.checkMobile();const e=(C=0)=>{C>10||setTimeout(()=>{this.navMenuElement&&(this.navigation.items.every((A,m)=>this.navItemsElements[m])||C>5?this.updateVisibleItems():e(C+1))},50)};e(),this.resizeHandler=()=>{this.checkMobile(),setTimeout(()=>{this.updateVisibleItems()},100)},window.addEventListener("resize",this.resizeHandler),setTimeout(()=>{this.navMenuElement&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{setTimeout(()=>{this.updateVisibleItems()},0)}),this.resizeObserver.observe(this.navMenuElement))},0)}onDisconnected(){var e;(e=super.onDisconnected)==null||e.call(this),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.resizeObserver&&this.resizeObserver.disconnect()}}nt=rr;[exports.ResponsiveNav,ot]=Jt(nt,[],it,0,void 0,O.WebComponent).c;ot();var st;let lt,ct;function ee(t,e,r){return(e=dt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nr(t,e,r,o,S,C){function E(i,l,d){return function(a,n){return d&&d(a),i[l].call(a,n)}}function A(i,l){for(var d=0;d<i.length;d++)i[d].call(l);return l}function m(i,l,d,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(l+" must "+(d||"be")+" a function"+(a?"":" or undefined"));return i}function D(i,l,d,a,n,c,h,p,y,w,b,u,f){function _(g){if(!f(g))throw new TypeError("Attempted to access private element on non-instance")}var k,I=l[0],F=l[3],j=!p;if(!j){d||Array.isArray(I)||(I=[I]);var s={},R=[],x=n===3?"get":n===4||u?"set":"value";w?(b||u?s={get:Ee(function(){return F(this)},a,"get"),set:function(g){l[4](this,g)}}:s[x]=F,b||Ee(s[x],a,n===2?"":x)):b||(s=Object.getOwnPropertyDescriptor(i,a))}for(var v=i,B=I.length-1;B>=0;B-=d?2:1){var W=I[B],G=d?I[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(g,L){if(g.v)throw Error("attempted to call addInitializer after decoration was finished");m(L,"An initializer","be",!0),h.push(L)}).bind(null,Y)};try{if(j)(k=m(W.call(G,v,M),"class decorators","return"))&&(v=k);else{var z,H;M.static=y,M.private=w,w?n===2?z=function(g){return _(g),s.value}:(n<4&&(z=E(s,"get",_)),n!==3&&(H=E(s,"set",_))):(z=function(g){return g[a]},(n<2||n===4)&&(H=function(g,L){g[a]=L}));var V=M.access={has:w?f.bind():function(g){return a in g}};if(z&&(V.get=z),H&&(V.set=H),v=W.call(G,u?{get:s.get,set:s.set}:s[x],M),u){if(typeof v=="object"&&v)(k=m(v.get,"accessor.get"))&&(s.get=k),(k=m(v.set,"accessor.set"))&&(s.set=k),(k=m(v.init,"accessor.init"))&&R.push(k);else if(v!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else m(v,(b?"field":"method")+" decorators","return")&&(b?R.push(v):s[x]=v)}}finally{Y.v=!0}}return(b||u)&&p.push(function(g,L){for(var U=R.length-1;U>=0;U--)L=R[U].call(g,L);return L}),b||j||(w?u?p.push(E(s,"get"),E(s,"set")):p.push(n===2?s[x]:E.call.bind(s[x])):Object.defineProperty(i,a,s)),v}function $(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var T=C[Symbol.metadata||Symbol.for("Symbol.metadata")];var N=Object.create(T??null),P=function(i,l,d,a){var n,c,h=[],p=function(x){return ir(x)===i},y=new Map;function w(x){x&&h.push(A.bind(null,x))}for(var b=0;b<l.length;b++){var u=l[b];if(Array.isArray(u)){var f=u[1],_=u[2],k=u.length>3,I=16&f,F=!!(8&f),j=(f&=7)==0,s=_+"/"+F;if(!j&&!k){var R=y.get(s);if(R===!0||R===3&&f!==4||R===4&&f!==3)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+_);y.set(s,!(f>2)||f)}D(F?i:i.prototype,u,I,k?"#"+_:dt(_),f,a,F?c=c||[]:n=n||[],h,F,k,j,f===1,F&&k?p:d)}}return w(n),w(c),h}(t,e,S,N);return r.length||$(t,N),{e:P,get c(){var i=[];return r.length&&[$(D(t,[r],o,t.name,5,N,i),N),A.bind(null,i,t)]}}}function dt(t){var e=or(t,"string");return typeof e=="symbol"?e:e+""}function or(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Ee(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function ir(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}const ar=De("SvgIcon");ct=[O.autoRegister({tagName:"wsx-svg-icon"})];exports.SvgIcon=void 0;class sr extends O.WebComponent{constructor(){super(),ee(this,"size",void 0),ee(this,"color",void 0),ee(this,"name",void 0),ee(this,"handleClick",A=>{ar.debug("SVG icon clicked",{name:this.name}),this.dispatchEvent(new CustomEvent("icon-click",{detail:{name:this.name,originalEvent:A},bubbles:!0}))}),ee(this,"handleMouseEnter",A=>{const m=A.target;m.style.transform="scale(1.1)"}),ee(this,"handleMouseLeave",A=>{const m=A.target;m.style.transform="scale(1)"});const[e,r]=this.useState("size",24);Object.defineProperty(this,"size",{get:e,set:r,enumerable:!0,configurable:!0});const[o,S]=this.useState("color","currentColor");Object.defineProperty(this,"color",{get:o,set:S,enumerable:!0,configurable:!0});const[C,E]=this.useState("name","star");Object.defineProperty(this,"name",{get:C,set:E,enumerable:!0,configurable:!0})}render(){const e=this.size||"24",r=this.color||"currentColor",o=this.name||"star",S={star:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",heart:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z",check:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",close:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",github:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22",play:"M8 5v14l11-7z",settings:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},C=S[o]||S.star;return O.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"svg-icon",onClick:this.handleClick,style:"cursor: pointer; transition: transform 0.2s ease; display: inline-block;",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},O.jsx("path",{d:C,fill:r}))}}st=sr;[exports.SvgIcon,lt]=nr(st,[],ct,0,void 0,O.WebComponent).c;lt();var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ut={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
7
7
  * Prism: Lightweight, robust, elegant syntax highlighting
8
8
  *
9
9
  * @license MIT <https://opensource.org/licenses/MIT>
@@ -15,4 +15,4 @@
15
15
 
16
16
  `);try{await navigator.clipboard.writeText(c),this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)}catch(h){console.error("Failed to copy code:",h);const p=document.createElement("textarea");p.value=c,p.style.position="fixed",p.style.opacity="0",document.body.appendChild(p),p.select();try{document.execCommand("copy"),this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)}catch(y){console.error("Fallback copy failed:",y)}document.body.removeChild(p)}}),X(this,"openPlayground",()=>{this.onTryOnlineCallback?this.onTryOnlineCallback():this.tryOnlineUrl?window.location.href=this.tryOnlineUrl:window.location.href="/playground"});const[e,r]=this.useState("copied",!1);Object.defineProperty(this,"copied",{get:e,set:r,enumerable:!0,configurable:!0});const[o,S]=this.useState("highlighted",!1);Object.defineProperty(this,"highlighted",{get:o,set:S,enumerable:!0,configurable:!0});const[C,E]=this.useState("code","");Object.defineProperty(this,"code",{get:C,set:E,enumerable:!0,configurable:!0});let A=this.reactive([]);Object.defineProperty(this,"segments",{get:()=>A,set:n=>{A=n!==null&&typeof n<"u"&&(Array.isArray(n)||typeof n=="object")?this.reactive(n):n,this.scheduleRerender()},enumerable:!0,configurable:!0});const[m,D]=this.useState("codeTitle","");Object.defineProperty(this,"codeTitle",{get:m,set:D,enumerable:!0,configurable:!0});const[$,T]=this.useState("language","typescript");Object.defineProperty(this,"language",{get:$,set:T,enumerable:!0,configurable:!0});const[N,P]=this.useState("showCopy",!0);Object.defineProperty(this,"showCopy",{get:N,set:P,enumerable:!0,configurable:!0});const[i,l]=this.useState("showTryOnline",!1);Object.defineProperty(this,"showTryOnline",{get:i,set:l,enumerable:!0,configurable:!0});const[d,a]=this.useState("tryOnlineUrl","");Object.defineProperty(this,"tryOnlineUrl",{get:d,set:a,enumerable:!0,configurable:!0})}static get observedAttributes(){return["code","title","language","show-copy","show-try-online","try-online-url"]}detectTheme(){var o;const e=document.documentElement,r=e.getAttribute("data-theme");return r==="light"||r==="dark"?r:e.classList.contains("dark")?"dark":e.classList.contains("light")?"light":(o=window.matchMedia)!=null&&o.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}updateThemeClass(e){this.codeBlockElement&&(this.codeBlockElement.classList.remove("light","dark"),this.codeBlockElement.classList.add(e))}setupThemeObserver(){var e,r;(e=this.themeObserver)==null||e.disconnect(),this.themeObserver=new MutationObserver(()=>{const o=this.detectTheme();o!==this.currentTheme&&(this.currentTheme=o,this.updateThemeClass(o))}),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),(r=window.matchMedia)==null||r.call(window,"(prefers-color-scheme: dark)").addEventListener("change",()=>{const o=this.detectTheme();o!==this.currentTheme&&(this.currentTheme=o,this.updateThemeClass(o))})}onConnected(){var e;(e=super.onConnected)==null||e.call(this),this.currentTheme=this.detectTheme(),this.setupThemeObserver()}onDisconnected(){var e,r;(e=super.onDisconnected)==null||e.call(this),(r=this.themeObserver)==null||r.disconnect(),this.themeObserver=null}onRendered(){var e;(e=super.onRendered)==null||e.call(this),this.isHighlighting||this.highlightCode()}updateConfig(e){e.segments&&e.segments.length>0?(this.segments=e.segments,this.code=""):e.code&&(this.code=e.code,this.segments=[]),this.highlighted=!1,this.codeElements=[],this.connected&&this.querySelectorAll("code[data-prism-highlighted]").forEach(r=>{r.removeAttribute("data-prism-highlighted")}),this.codeTitle=e.title||"",this.language=e.language||"typescript",this.showCopy=e.showCopy!==!1,this.showTryOnline=e.showTryOnline===!0,this.tryOnlineUrl=e.tryOnlineUrl||"",this.onTryOnlineCallback=e.onTryOnline}render(){const e=this.segments.length>0?this.segments:this.code?[{code:this.code,language:this.language}]:[];if(e.length===0)return O.jsx("div",{class:`code-block ${this.currentTheme}`});const r=e.map(o=>o.code).join(`
17
17
 
18
- `);return O.jsx("div",{class:`code-block ${this.currentTheme}`,ref:o=>{o&&(this.codeBlockElement=o)}},(this.codeTitle||this.showCopy||this.showTryOnline)&&O.jsx("div",{class:"code-header"},this.codeTitle&&O.jsx("span",{class:"code-title"},this.codeTitle),O.jsx("div",{class:"code-actions"},this.showCopy&&O.jsx("button",{onClick:()=>this.copyCode(r),class:`btn-copy ${this.copied?"copied":""}`,"data-wsx-key":"CodeBlock-button-text-3"},this.copied?"✓ Copied!":"Copy"),this.showTryOnline&&O.jsx("button",{onClick:this.openPlayground,class:"btn-try","data-wsx-key":"CodeBlock-button-text-3"},"Try Online"))),O.jsx("div",{class:"code-content"},e.map((o,S)=>O.jsx("pre",{key:S,class:"code-segment"},O.jsx("code",{class:`language-${o.language}`,ref:C=>{C&&(this.codeElements[S]=C)}},o.code)))))}highlightCode(){if(!this.isHighlighting){this.isHighlighting=!0;try{requestAnimationFrame(()=>{try{if(this.segments.length>0)this.segments.forEach((e,r)=>{const o=this.codeElements[r]||this.querySelectorAll("code")[r];if(o&&!o.hasAttribute("data-prism-highlighted")){const S=e.language.toLowerCase();o.className=`language-${S}`,Ae.highlightElement(o),o.setAttribute("data-prism-highlighted","true")}});else if(this.code){const e=this.codeElements[0]||this.querySelector("code");if(e&&!e.hasAttribute("data-prism-highlighted")){const r=this.language.toLowerCase();e.className=`language-${r}`,Ae.highlightElement(e),e.setAttribute("data-prism-highlighted","true")}}this.highlighted=!0}catch(e){console.error("Failed to highlight code:",e)}finally{this.isHighlighting=!1}})}catch(e){console.error("Failed to schedule highlight:",e),this.isHighlighting=!1}}}}ht=gr;[exports.CodeBlock,pt]=ur(ht,[],gt,0,void 0,O.LightComponent).c;pt();exports.CONVERTER_BTN=Rt;exports.CONVERTER_PANEL=Lt;exports.OverflowDetector=de;exports.getCustomColorCache=ze;exports.getDefaultColorCache=Ft;exports.handleCSSVariables=ne;exports.setCustomColorCache=Me;exports.setDefaultColorCache=je;exports.throttle=Pe;
18
+ `);return O.jsx("div",{class:`code-block ${this.currentTheme}`,ref:o=>{o&&(this.codeBlockElement=o)}},(this.codeTitle||this.showCopy||this.showTryOnline)&&O.jsx("div",{class:"code-header"},this.codeTitle&&O.jsx("span",{class:"code-title"},this.codeTitle),O.jsx("div",{class:"code-actions"},this.showCopy&&O.jsx("button",{onClick:()=>this.copyCode(r),class:`btn-copy ${this.copied?"copied":""}`},this.copied?"✓ Copied!":"Copy"),this.showTryOnline&&O.jsx("button",{onClick:this.openPlayground,class:"btn-try"},"Try Online"))),O.jsx("div",{class:"code-content"},e.map((o,S)=>O.jsx("pre",{key:S,class:"code-segment"},O.jsx("code",{class:`language-${o.language}`,ref:C=>{C&&(this.codeElements[S]=C)}},o.code)))))}highlightCode(){if(!this.isHighlighting){this.isHighlighting=!0;try{requestAnimationFrame(()=>{try{if(this.segments.length>0)this.segments.forEach((e,r)=>{const o=this.codeElements[r]||this.querySelectorAll("code")[r];if(o&&!o.hasAttribute("data-prism-highlighted")){const S=e.language.toLowerCase();o.className=`language-${S}`,Ae.highlightElement(o),o.setAttribute("data-prism-highlighted","true")}});else if(this.code){const e=this.codeElements[0]||this.querySelector("code");if(e&&!e.hasAttribute("data-prism-highlighted")){const r=this.language.toLowerCase();e.className=`language-${r}`,Ae.highlightElement(e),e.setAttribute("data-prism-highlighted","true")}}this.highlighted=!0}catch(e){console.error("Failed to highlight code:",e)}finally{this.isHighlighting=!1}})}catch(e){console.error("Failed to schedule highlight:",e),this.isHighlighting=!1}}}}ht=gr;[exports.CodeBlock,pt]=ur(ht,[],gt,0,void 0,O.LightComponent).c;pt();exports.CONVERTER_BTN=Rt;exports.CONVERTER_PANEL=Lt;exports.OverflowDetector=de;exports.getCustomColorCache=ze;exports.getDefaultColorCache=Ft;exports.handleCSSVariables=ne;exports.setCustomColorCache=Me;exports.setDefaultColorCache=je;exports.throttle=Pe;