@wsxjs/wsx-base-components 0.0.8 → 0.0.9

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,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@wsxjs/wsx-core"),Qt=':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 bt;let gt,yt;function Y(e,t,r){return(t=vt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zt(e,t,r,b,B,P){function S(o,l,u){return function(s,a){return u&&u(s),o[l].call(s,a)}}function L(o,l){for(var u=0;u<o.length;u++)o[u].call(l);return l}function w(o,l,u,s){if(typeof o!="function"&&(s||o!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return o}function N(o,l,u,s,a,z,A,E,O,y,g,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var h,x=l[0],C=l[3],T=!E;if(!T){u||Array.isArray(x)||(x=[x]);var i={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?i={get:at(function(){return C(this)},s,"get"),set:function(c){l[4](this,c)}}:i[m]=C,g||at(i[m],s,a===2?"":m)):g||(i=Object.getOwnPropertyDescriptor(o,s))}for(var d=o,R=x.length-1;R>=0;R-=u?2:1){var F=x[R],G=u?x[R-1]:void 0,K={},_={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,j){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(j,"An initializer","be",!0),A.push(j)}).bind(null,K)};try{if(T)(h=w(F.call(G,d,_),"class decorators","return"))&&(d=h);else{var $,I;_.static=O,_.private=y,y?a===2?$=function(c){return v(c),i.value}:(a<4&&($=S(i,"get",v)),a!==3&&(I=S(i,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,j){c[s]=j}));var X=_.access={has:y?p.bind():function(c){return s in c}};if($&&(X.get=$),I&&(X.set=I),d=F.call(G,f?{get:i.get,set:i.set}:i[m],_),f){if(typeof d=="object"&&d)(h=w(d.get,"accessor.get"))&&(i.get=h),(h=w(d.set,"accessor.set"))&&(i.set=h),(h=w(d.init,"accessor.init"))&&k.push(h);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else w(d,(g?"field":"method")+" decorators","return")&&(g?k.push(d):i[m]=d)}}finally{K.v=!0}}return(g||f)&&E.push(function(c,j){for(var M=k.length-1;M>=0;M--)j=k[M].call(c,j);return j}),g||T||(y?f?E.push(S(i,"get"),S(i,"set")):E.push(a===2?i[m]:S.call.bind(i[m])):Object.defineProperty(o,s,i)),d}function W(o,l){return Object.defineProperty(o,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var H=P[Symbol.metadata||Symbol.for("Symbol.metadata")];var D=Object.create(H??null),J=function(o,l,u,s){var a,z,A=[],E=function(m){return ee(m)===o},O=new Map;function y(m){m&&A.push(L.bind(null,m))}for(var g=0;g<l.length;g++){var f=l[g];if(Array.isArray(f)){var p=f[1],v=f[2],h=f.length>3,x=16&p,C=!!(8&p),T=(p&=7)==0,i=v+"/"+C;if(!T&&!h){var k=O.get(i);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(i,!(p>2)||p)}N(C?o:o.prototype,f,x,h?"#"+v:vt(v),p,s,C?z=z||[]:a=a||[],A,C,h,T,p===1,C&&h?E:u)}}return y(a),y(z),A}(e,t,B,D);return r.length||W(e,D),{e:J,get c(){var o=[];return r.length&&[W(N(e,[r],b,e.name,5,D,o),D),L.bind(null,o,e)]}}}function vt(e){var t=te(e,"string");return typeof t=="symbol"?t:t+""}function te(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var b=r.call(e,t);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function at(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function ee(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}yt=[n.autoRegister({tagName:"xy-button"})];exports.XyButton=void 0;class re extends n.WebComponent{static get observedAttributes(){return["disabled","icon","loading","href","type","target","rel","download","toggle","checked","variant","shape","block","size"]}constructor(t={}){super({styleName:"xy-button",...t}),Y(this,"_autoStyles",Qt),Y(this,"disabled",!1),Y(this,"loading",!1),Y(this,"toggle",!1),Y(this,"checked",!1),Y(this,"icon",null),Y(this,"href",null),Y(this,"type",null),Y(this,"target","_blank"),Y(this,"rel",null),Y(this,"download",null),Y(this,"variant","flat"),Y(this,"size","md"),Y(this,"btnElement",void 0),Y(this,"iconElement",void 0),Y(this,"loadingElement",void 0),Y(this,"handleMouseDown",r=>{if(this.disabled)return;const b=this.getBoundingClientRect(),B=r.clientX-b.left,P=r.clientY-b.top;this.style.setProperty("--x",`${B}px`),this.style.setProperty("--y",`${P}px`)}),Y(this,"handleKeyDown",r=>{(r.code==="Enter"||r.code==="Space")&&r.stopPropagation()}),Y(this,"handleClick",()=>{this.toggle&&!this.disabled&&(this.checked=!this.checked,this.checked?this.setAttr("checked",""):this.removeAttr("checked"))}),this.disabled=t.disabled||!1,this.loading=t.loading||!1,this.toggle=t.toggle||!1,this.checked=t.checked||!1,this.icon=t.icon||null,this.href=t.href||null,this.type=t.type||null,this.target=t.target||"_blank",this.rel=t.rel||null,this.download=t.download||null,this.variant=t.variant||"flat",this.size=t.size||"md"}render(){const t=!!this.href,r=n.jsx("a",{href:this.href,target:this.target,rel:this.rel||void 0,download:this.download||void 0,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:B=>{this.btnElement=B}},this.renderContent()),b=n.jsx("button",{type:this.type||"button",disabled:this.disabled,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:B=>{this.btnElement=B}},this.renderContent());return n.jsx("div",{className:"xy-button-container"},t?r:b)}renderContent(){const t=[];return this.loading&&t.push(n.jsx("div",{className:"loading",ref:r=>{this.loadingElement=r}},"Loading...")),!this.loading&&this.icon&&this.icon!=="null"&&t.push(n.jsx("div",{className:"icon","data-icon":this.icon,ref:r=>{this.iconElement=r}},this.icon)),t.push(n.jsx("slot",null)),t}onConnected(){this.addEventListener("click",this.handleClick)}onDisconnected(){this.removeEventListener("click",this.handleClick)}onAttributeChanged(t,r,b){switch(t){case"disabled":this.disabled=b!==null,this.updateButtonState();break;case"loading":this.loading=b!==null,this.updateButtonState(),this.rerender();break;case"icon":this.icon=b,this.rerender();break;case"href":this.href=b,this.rerender();break;case"type":this.type=b,this.updateButtonState();break;case"target":this.target=b||"_blank";break;case"rel":this.rel=b;break;case"download":this.download=b;break;case"toggle":this.toggle=b!==null;break;case"checked":this.checked=b!==null;break;case"variant":this.variant=b||"flat";break;case"size":this.size=b||"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 t;(t=this.btnElement)==null||t.focus()}get isDisabled(){return this.disabled}set isDisabled(t){t?this.setAttr("disabled",""):this.removeAttr("disabled")}get isLoading(){return this.loading}set isLoading(t){t?this.setAttr("loading",""):this.removeAttr("loading")}get isChecked(){return this.checked}set isChecked(t){t?this.setAttr("checked",""):this.removeAttr("checked")}get buttonIcon(){return this.icon}set buttonIcon(t){t?this.setAttr("icon",t):this.removeAttr("icon")}}bt=re;[exports.XyButton,gt]=Zt(bt,[],yt,0,void 0,n.WebComponent).c;gt();const oe=':host{display:inline-flex}::slotted(xy-button:not(:first-of-type):not(:last-of-type)){border-radius:0}::slotted(xy-button){margin:0!important}::slotted(xy-button:not(:first-of-type)){margin-left:-1px!important}::slotted(xy-button[type]:not([type="dashed"]):not(:first-of-type)){margin-left:1px!important}::slotted(xy-button:first-of-type){border-top-right-radius:0;border-bottom-right-radius:0}::slotted(xy-button:last-of-type){border-top-left-radius:0;border-bottom-left-radius:0}';var xt;let Ct,kt;function lt(e,t,r){return(t=jt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t,r,b,B,P){function S(o,l,u){return function(s,a){return u&&u(s),o[l].call(s,a)}}function L(o,l){for(var u=0;u<o.length;u++)o[u].call(l);return l}function w(o,l,u,s){if(typeof o!="function"&&(s||o!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return o}function N(o,l,u,s,a,z,A,E,O,y,g,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var h,x=l[0],C=l[3],T=!E;if(!T){u||Array.isArray(x)||(x=[x]);var i={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?i={get:ct(function(){return C(this)},s,"get"),set:function(c){l[4](this,c)}}:i[m]=C,g||ct(i[m],s,a===2?"":m)):g||(i=Object.getOwnPropertyDescriptor(o,s))}for(var d=o,R=x.length-1;R>=0;R-=u?2:1){var F=x[R],G=u?x[R-1]:void 0,K={},_={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,j){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(j,"An initializer","be",!0),A.push(j)}).bind(null,K)};try{if(T)(h=w(F.call(G,d,_),"class decorators","return"))&&(d=h);else{var $,I;_.static=O,_.private=y,y?a===2?$=function(c){return v(c),i.value}:(a<4&&($=S(i,"get",v)),a!==3&&(I=S(i,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,j){c[s]=j}));var X=_.access={has:y?p.bind():function(c){return s in c}};if($&&(X.get=$),I&&(X.set=I),d=F.call(G,f?{get:i.get,set:i.set}:i[m],_),f){if(typeof d=="object"&&d)(h=w(d.get,"accessor.get"))&&(i.get=h),(h=w(d.set,"accessor.set"))&&(i.set=h),(h=w(d.init,"accessor.init"))&&k.push(h);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else w(d,(g?"field":"method")+" decorators","return")&&(g?k.push(d):i[m]=d)}}finally{K.v=!0}}return(g||f)&&E.push(function(c,j){for(var M=k.length-1;M>=0;M--)j=k[M].call(c,j);return j}),g||T||(y?f?E.push(S(i,"get"),S(i,"set")):E.push(a===2?i[m]:S.call.bind(i[m])):Object.defineProperty(o,s,i)),d}function W(o,l){return Object.defineProperty(o,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var H=P[Symbol.metadata||Symbol.for("Symbol.metadata")];var D=Object.create(H??null),J=function(o,l,u,s){var a,z,A=[],E=function(m){return se(m)===o},O=new Map;function y(m){m&&A.push(L.bind(null,m))}for(var g=0;g<l.length;g++){var f=l[g];if(Array.isArray(f)){var p=f[1],v=f[2],h=f.length>3,x=16&p,C=!!(8&p),T=(p&=7)==0,i=v+"/"+C;if(!T&&!h){var k=O.get(i);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(i,!(p>2)||p)}N(C?o:o.prototype,f,x,h?"#"+v:jt(v),p,s,C?z=z||[]:a=a||[],A,C,h,T,p===1,C&&h?E:u)}}return y(a),y(z),A}(e,t,B,D);return r.length||W(e,D),{e:J,get c(){var o=[];return r.length&&[W(N(e,[r],b,e.name,5,D,o),D),L.bind(null,o,e)]}}}function jt(e){var t=ne(e,"string");return typeof t=="symbol"?t:t+""}function ne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var b=r.call(e,t);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ct(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function se(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}kt=[n.autoRegister({tagName:"xy-button-group"})];exports.XyButtonGroup=void 0;class ae extends n.WebComponent{static get observedAttributes(){return["disabled"]}constructor(t={}){super({styleName:"xy-button-group",...t}),lt(this,"_autoStyles",oe),lt(this,"disabled",!1),this.disabled=t.disabled||!1}render(){return n.jsx("div",{class:"button-group-container"},n.jsx("slot",null))}onAttributeChanged(t,r,b){switch(t){case"disabled":this.disabled=b!==null,this.updateChildrenDisabledState();break}}onConnected(){this.updateChildrenDisabledState()}updateChildrenDisabledState(){if(!this.disabled)return;this.querySelectorAll("xy-button").forEach(r=>{this.disabled?r.setAttribute("disabled",""):r.removeAttribute("disabled")})}get isDisabled(){return this.disabled}set isDisabled(t){t?this.setAttr("disabled",""):this.removeAttr("disabled")}getButtons(){return this.querySelectorAll("xy-button")}enableAll(){this.getButtons().forEach(r=>{r.removeAttribute("disabled")})}disableAll(){this.getButtons().forEach(r=>{r.setAttribute("disabled","")})}}xt=ae;[exports.XyButtonGroup,Ct]=ie(xt,[],kt,0,void 0,n.WebComponent).c;Ct();const et="editor-js-text-color-cache";function le(e){return e.startsWith("var(")&&e.endsWith(")")}function ce(e){return e.slice(4,-1).trim()}function ue(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()||e}function Z(e){if(le(e)){const t=ce(e);return ue(t)}return e}function wt(e,t){return sessionStorage.setItem(`${et}-${t}`,JSON.stringify(e)),e}function St(e,t){sessionStorage.setItem(`${et}-${t}-custom`,JSON.stringify(e))}function Et(e){const t=sessionStorage.getItem(`${et}-${e}-custom`);return t?JSON.parse(t):null}function Tt(e,t){let r=null;return(...b)=>{r||(r=setTimeout(()=>{e(...b),r=null},t))}}function he(e,t){const r=sessionStorage.getItem(`${et}-${t}`);return r?JSON.parse(r):e}const de="ce-inline-toolbar__dropdown",fe="ce-conversion-toolbar--showed",pe='.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 zt;let At,_t;function q(e,t,r){return(t=$t(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function me(e,t,r,b,B,P){function S(o,l,u){return function(s,a){return u&&u(s),o[l].call(s,a)}}function L(o,l){for(var u=0;u<o.length;u++)o[u].call(l);return l}function w(o,l,u,s){if(typeof o!="function"&&(s||o!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return o}function N(o,l,u,s,a,z,A,E,O,y,g,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var h,x=l[0],C=l[3],T=!E;if(!T){u||Array.isArray(x)||(x=[x]);var i={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?i={get:ut(function(){return C(this)},s,"get"),set:function(c){l[4](this,c)}}:i[m]=C,g||ut(i[m],s,a===2?"":m)):g||(i=Object.getOwnPropertyDescriptor(o,s))}for(var d=o,R=x.length-1;R>=0;R-=u?2:1){var F=x[R],G=u?x[R-1]:void 0,K={},_={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,j){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(j,"An initializer","be",!0),A.push(j)}).bind(null,K)};try{if(T)(h=w(F.call(G,d,_),"class decorators","return"))&&(d=h);else{var $,I;_.static=O,_.private=y,y?a===2?$=function(c){return v(c),i.value}:(a<4&&($=S(i,"get",v)),a!==3&&(I=S(i,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,j){c[s]=j}));var X=_.access={has:y?p.bind():function(c){return s in c}};if($&&(X.get=$),I&&(X.set=I),d=F.call(G,f?{get:i.get,set:i.set}:i[m],_),f){if(typeof d=="object"&&d)(h=w(d.get,"accessor.get"))&&(i.get=h),(h=w(d.set,"accessor.set"))&&(i.set=h),(h=w(d.init,"accessor.init"))&&k.push(h);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else w(d,(g?"field":"method")+" decorators","return")&&(g?k.push(d):i[m]=d)}}finally{K.v=!0}}return(g||f)&&E.push(function(c,j){for(var M=k.length-1;M>=0;M--)j=k[M].call(c,j);return j}),g||T||(y?f?E.push(S(i,"get"),S(i,"set")):E.push(a===2?i[m]:S.call.bind(i[m])):Object.defineProperty(o,s,i)),d}function W(o,l){return Object.defineProperty(o,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var H=P[Symbol.metadata||Symbol.for("Symbol.metadata")];var D=Object.create(H??null),J=function(o,l,u,s){var a,z,A=[],E=function(m){return ge(m)===o},O=new Map;function y(m){m&&A.push(L.bind(null,m))}for(var g=0;g<l.length;g++){var f=l[g];if(Array.isArray(f)){var p=f[1],v=f[2],h=f.length>3,x=16&p,C=!!(8&p),T=(p&=7)==0,i=v+"/"+C;if(!T&&!h){var k=O.get(i);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(i,!(p>2)||p)}N(C?o:o.prototype,f,x,h?"#"+v:$t(v),p,s,C?z=z||[]:a=a||[],A,C,h,T,p===1,C&&h?E:u)}}return y(a),y(z),A}(e,t,B,D);return r.length||W(e,D),{e:J,get c(){var o=[];return r.length&&[W(N(e,[r],b,e.name,5,D,o),D),L.bind(null,o,e)]}}}function $t(e){var t=be(e,"string");return typeof t=="symbol"?t:t+""}function be(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var b=r.call(e,t);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ut(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function ge(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}const Q=n.createLogger("ColorPicker"),ye=["#ff1300","#EC7878","#9C27B0","#673AB7","#3F51B5","#0070FF","#03A9F4","#00BCD4","#4CAF50","#8BC34A","#CDDC39","#FFE500","#FFBF00","#FF9800","#795548","#9E9E9E","#5A5A5A","#FFF"];_t=[n.autoRegister({tagName:"color-picker"})];exports.ColorPicker=void 0;class ve extends n.WebComponent{static get observedAttributes(){return["disabled","selected-color","open"]}constructor(t={}){super({styleName:"base-color-picker",...t}),q(this,"_autoStyles",pe),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 B;const b=Z(r);this.setSelectedColor(b),this.closePanel(),wt(b,this.pluginType),(B=this.onColorPicked)==null||B.call(this,b),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:b},bubbles:!0,composed:!0})),Q.debug("Color selected",{color:b})}),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"),St=':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 _e;let Le,ze;function q(t,e,r){return(e=Ae(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Et(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:me(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||me(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return Lt(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:Ae(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function Ae(t){var e=_t(t,"string");return typeof e=="symbol"?e:e+""}function _t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function me(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 Lt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}ze=[o.autoRegister({tagName:"xy-button"})];exports.XyButton=void 0;class zt 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:"xy-button",...e}),q(this,"_autoStyles",St),q(this,"disabled",!1),q(this,"loading",!1),q(this,"toggle",!1),q(this,"checked",!1),q(this,"icon",null),q(this,"href",null),q(this,"type",null),q(this,"target","_blank"),q(this,"rel",null),q(this,"download",null),q(this,"variant","flat"),q(this,"size","md"),q(this,"btnElement",void 0),q(this,"iconElement",void 0),q(this,"loadingElement",void 0),q(this,"handleMouseDown",r=>{if(this.disabled)return;const g=this.getBoundingClientRect(),T=r.clientX-g.left,L=r.clientY-g.top;this.style.setProperty("--x",`${T}px`),this.style.setProperty("--y",`${L}px`)}),q(this,"handleKeyDown",r=>{(r.code==="Enter"||r.code==="Space")&&r.stopPropagation()}),q(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.href,target:this.target,rel:this.rel||void 0,download:this.download||void 0,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:T=>{this.btnElement=T}},this.renderContent()),g=o.jsx("button",{type:this.type||"button",disabled:this.disabled,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:T=>{this.btnElement=T},"data-wsx-key":"XyButton-button-text-0"},this.renderContent());return o.jsx("div",{className:"xy-button-container"},e?r:g)}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(){this.addEventListener("click",this.handleClick)}onDisconnected(){this.removeEventListener("click",this.handleClick)}onAttributeChanged(e,r,g){switch(e){case"disabled":this.disabled=g!==null,this.updateButtonState();break;case"loading":this.loading=g!==null,this.updateButtonState(),this.rerender();break;case"icon":this.icon=g,this.rerender();break;case"href":this.href=g,this.rerender();break;case"type":this.type=g,this.updateButtonState();break;case"target":this.target=g||"_blank";break;case"rel":this.rel=g;break;case"download":this.download=g;break;case"toggle":this.toggle=g!==null;break;case"checked":this.checked=g!==null;break;case"variant":this.variant=g||"flat";break;case"size":this.size=g||"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")}}_e=zt;[exports.XyButton,Le]=Et(_e,[],ze,0,void 0,o.WebComponent).c;Le();const At=':host{display:inline-flex}::slotted(xy-button:not(:first-of-type):not(:last-of-type)){border-radius:0}::slotted(xy-button){margin:0!important}::slotted(xy-button:not(:first-of-type)){margin-left:-1px!important}::slotted(xy-button[type]:not([type="dashed"]):not(:first-of-type)){margin-left:1px!important}::slotted(xy-button:first-of-type){border-top-right-radius:0;border-bottom-right-radius:0}::slotted(xy-button:last-of-type){border-top-left-radius:0;border-bottom-left-radius:0}';var De;let $e,Re;function ge(t,e,r){return(e=Oe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dt(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:be(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||be(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return Rt(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:Oe(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function Oe(t){var e=$t(t,"string");return typeof e=="symbol"?e:e+""}function $t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;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 Rt(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}Re=[o.autoRegister({tagName:"xy-button-group"})];exports.XyButtonGroup=void 0;class Ot extends o.WebComponent{static get observedAttributes(){return["disabled"]}constructor(e={}){super({styleName:"xy-button-group",...e}),ge(this,"_autoStyles",At),ge(this,"disabled",!1),this.disabled=e.disabled||!1}render(){return o.jsx("div",{class:"button-group-container"},o.jsx("slot",null))}onAttributeChanged(e,r,g){switch(e){case"disabled":this.disabled=g!==null,this.updateChildrenDisabledState();break}}onConnected(){this.updateChildrenDisabledState()}updateChildrenDisabledState(){if(!this.disabled)return;this.querySelectorAll("xy-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(){return this.querySelectorAll("xy-button")}enableAll(){this.getButtons().forEach(r=>{r.removeAttribute("disabled")})}disableAll(){this.getButtons().forEach(r=>{r.setAttribute("disabled","")})}}De=Ot;[exports.XyButtonGroup,$e]=Dt(De,[],Re,0,void 0,o.WebComponent).c;$e();const ce="editor-js-text-color-cache";function Pt(t){return t.startsWith("var(")&&t.endsWith(")")}function It(t){return t.slice(4,-1).trim()}function Bt(t){return getComputedStyle(document.documentElement).getPropertyValue(t).trim()||t}function ae(t){if(Pt(t)){const e=It(t);return Bt(e)}return t}function Pe(t,e){return sessionStorage.setItem(`${ce}-${e}`,JSON.stringify(t)),t}function Ie(t,e){sessionStorage.setItem(`${ce}-${e}-custom`,JSON.stringify(t))}function Be(t){const e=sessionStorage.getItem(`${ce}-${t}-custom`);return e?JSON.parse(e):null}function Ne(t,e){let r=null;return(...g)=>{r||(r=setTimeout(()=>{t(...g),r=null},e))}}function Nt(t,e){const r=sessionStorage.getItem(`${ce}-${e}`);return r?JSON.parse(r):t}const Mt="ce-inline-toolbar__dropdown",Ut="ce-conversion-toolbar--showed",Wt='.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 Me;let Ue,We;function X(t,e,r){return(e=He(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ht(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:ye(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||ye(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return Kt(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:He(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function He(t){var e=Ft(t,"string");return typeof e=="symbol"?e:e+""}function Ft(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function ye(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}const se=o.createLogger("ColorPicker"),Jt=["#ff1300","#EC7878","#9C27B0","#673AB7","#3F51B5","#0070FF","#03A9F4","#00BCD4","#4CAF50","#8BC34A","#CDDC39","#FFE500","#FFBF00","#FF9800","#795548","#9E9E9E","#5A5A5A","#FFF"];We=[o.autoRegister({tagName:"color-picker"})];exports.ColorPicker=void 0;class Gt extends o.WebComponent{static get observedAttributes(){return["disabled","selected-color","open"]}constructor(e={}){super({styleName:"base-color-picker",...e}),X(this,"_autoStyles",Wt),X(this,"colorCollections",void 0),X(this,"onColorPicked",void 0),X(this,"hasCustomPicker",void 0),X(this,"defaultColor",void 0),X(this,"pluginType",void 0),X(this,"disabled",void 0),X(this,"selectedColor",void 0),X(this,"customColor",void 0),X(this,"isOpen",void 0),X(this,"colorBtn",void 0),X(this,"colorPanel",void 0),X(this,"handleButtonClick",r=>{r.stopPropagation(),this.togglePanel()}),X(this,"handlePanelClick",r=>{r.stopPropagation()}),X(this,"handleColorSelect",r=>{var T;const g=ae(r);this.setSelectedColor(g),this.closePanel(),Pe(g,this.pluginType),(T=this.onColorPicked)==null||T.call(this,g),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:g},bubbles:!0,composed:!0})),se.debug("Color selected",{color:g})}),X(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 b=Tt(B=>{var L;const P=B.target,S=Z(P.value);this.setSelectedColor(S),this.setCustomColor(S),document.body.removeChild(r),(L=this.onColorPicked)==null||L.call(this,S),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:S},bubbles:!0,composed:!0})),Q.debug("Custom color selected",{color:S})},30);r.addEventListener("input",b),document.body.appendChild(r),requestAnimationFrame(()=>{r.focus(),r.click()})}),q(this,"handleDocumentClick",r=>{this.isOpen&&!this.contains(r.target)&&this.closePanel()}),this.colorCollections=t.colorCollections||ye,this.onColorPicked=t.onColorPicked,this.hasCustomPicker=t.hasCustomPicker||!1,this.pluginType=t.pluginType||"text",this.disabled=t.disabled||!1,this.defaultColor=Z(t.defaultColor||this.colorCollections[0]),this.selectedColor=this.defaultColor,this.customColor=Et(this.pluginType)||"",this.isOpen=!1,Q.debug("ColorPicker initialized",{colorCollections:this.colorCollections.length,hasCustomPicker:this.hasCustomPicker,pluginType:this.pluginType})}render(){const t=this.renderColorButton(),r=this.isOpen?this.renderColorPanel():null;return n.jsx("section",{class:"color-section"},n.jsx("div",{class:"color-popover"},t,r))}renderColorButton(){return n.jsx("xy-button",{type:"button",class:`color-btn ${this.disabled?"disabled":""}`,style:`--theme-color: ${this.selectedColor}`,disabled:this.disabled,onClick:this.handleButtonClick,ref:t=>{this.colorBtn=t}},n.jsx("span",{class:"color-indicator"},"_"))}renderColorPanel(){return n.jsx("div",{class:"color-panel",onClick:this.handlePanelClick,ref:t=>{this.colorPanel=t}},n.jsx("div",{class:"color-grid"},this.hasCustomPicker?this.renderCustomPicker():null,this.renderColorButtons()))}renderCustomPicker(){return n.jsx("xy-button",{type:"button",class:"color-cube custom-picker",style:{backgroundColor:this.customColor},onClick:this.handleCustomPickerClick,title:"自定义颜色"})}renderColorButtons(){return this.colorCollections.map(t=>n.jsx("xy-button",{key:t,type:"button",class:"color-cube",style:`background-color: ${t}`,"data-color":t,title:t,onClick:()=>this.handleColorSelect(t)}))}togglePanel(){this.setOpen(!this.isOpen)}closePanel(){this.setOpen(!1)}setSelectedColor(t){this.selectedColor=t,this.setAttr("selected-color",t),this.updateColorButton()}setCustomColor(t){this.customColor=t,St(t,this.pluginType)}setOpen(t){this.isOpen=t,t?this.setAttr("open",""):this.removeAttr("open"),this.rerender()}updateColorButton(){this.colorBtn&&this.colorBtn.style.setProperty("--theme-color",this.selectedColor)}onConnected(){document.addEventListener("click",this.handleDocumentClick),Q.info("ColorPicker connected to DOM")}onDisconnected(){document.removeEventListener("click",this.handleDocumentClick),Q.info("ColorPicker disconnected from DOM")}onAttributeChanged(t,r,b){switch(t){case"disabled":this.disabled=b!==null,this.rerender();break;case"selected-color":b&&b!==this.selectedColor&&(this.selectedColor=b,this.updateColorButton());break;case"open":this.isOpen=b!==null;break}}getSelectedColor(){return this.selectedColor}setColor(t){this.setSelectedColor(Z(t))}focus(){var t;(t=this.colorBtn)==null||t.focus()}}zt=ve;[exports.ColorPicker,At]=me(zt,[],_t,0,void 0,n.WebComponent).c;At();const xe=".reactive-counter{max-width:500px;margin:20px auto;padding:24px;border-radius:12px;box-shadow:0 4px 12px #0000001a;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;transition:all .3s ease}.theme-light{background:#fff;color:#333;border:1px solid #e1e5e9}.theme-dark{background:#1a1a1a;color:#fff;border:1px solid #333333}.theme-blue{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:1px solid #5a67d8}.header{text-align:center;margin-bottom:24px}.header h3{margin:0 0 8px;font-size:24px;font-weight:600}.subtitle{margin:0;opacity:.8;font-size:14px}.counter-display{text-align:center;margin-bottom:32px}.count-value{font-size:48px;font-weight:700;line-height:1;margin-bottom:8px;font-variant-numeric:tabular-nums}.step-info{font-size:14px;opacity:.7}.controls{display:flex;gap:12px;justify-content:center;margin-bottom:24px;flex-wrap:wrap}.btn{padding:10px 20px;border:none;border-radius:8px;font-size:16px;font-weight:500;cursor:pointer;transition:all .2s ease;min-width:60px}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:#4299e1;color:#fff}.btn-primary:hover:not(:disabled){background:#3182ce;transform:translateY(-1px)}.btn-secondary{background:#718096;color:#fff}.btn-secondary:hover:not(:disabled){background:#4a5568;transform:translateY(-1px)}.btn-warning{background:#ed8936;color:#fff}.btn-warning:hover:not(:disabled){background:#dd6b20;transform:translateY(-1px)}.btn-success{background:#48bb78;color:#fff}.btn-success:hover:not(:disabled){background:#38a169;transform:translateY(-1px)}.btn-danger{background:#f56565;color:#fff}.btn-danger:hover:not(:disabled){background:#e53e3e;transform:translateY(-1px)}.btn-sm{padding:6px 12px;font-size:14px;min-width:auto}.step-controls,.auto-controls,.theme-controls,.message-controls{margin-bottom:20px;text-align:center}.step-controls label{display:flex;align-items:center;justify-content:center;gap:12px;font-size:14px}.step-controls input[type=range]{flex:0 0 150px}.step-controls span{font-weight:700;min-width:20px}.theme-controls select,.message-controls input{padding:8px 12px;border:1px solid #cbd5e0;border-radius:6px;font-size:14px;margin-left:8px}.theme-dark .theme-controls select,.theme-dark .message-controls input{background:#2d3748;border-color:#4a5568;color:#fff}.theme-blue .theme-controls select,.theme-blue .message-controls input{background:#ffffff1a;border-color:#fff3;color:#fff}.message-controls input{width:250px;max-width:100%}.history{margin-top:24px;padding:16px;background:#0000000d;border-radius:8px}.theme-dark .history{background:#ffffff0d}.theme-blue .history{background:#ffffff1a}.history h4{margin:0 0 12px;font-size:16px}.history-list{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.history-item{padding:4px 8px;background:#4299e11a;border:1px solid rgba(66,153,225,.2);border-radius:4px;font-size:12px;font-weight:500}.debug-info{margin-top:24px;font-size:12px}.debug-info details{border:1px solid #e2e8f0;border-radius:6px;padding:8px}.theme-dark .debug-info details{border-color:#4a5568}.theme-blue .debug-info details{border-color:#fff3}.debug-info summary{cursor:pointer;font-weight:500;margin-bottom:8px}.debug-info pre{margin:0;padding:8px;background:#0000000d;border-radius:4px;overflow-x:auto;font-size:11px;line-height:1.4}.theme-dark .debug-info pre{background:#ffffff0d}.theme-blue .debug-info pre{background:#ffffff1a}@media (max-width: 600px){.reactive-counter{margin:10px;padding:16px}.count-value{font-size:36px}.controls{flex-direction:column;align-items:center}.btn{width:200px}.step-controls label{flex-direction:column;gap:8px}.message-controls input{width:100%}}";var Dt;let Ot,Rt;function V(e,t,r){return(t=It(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ce(e,t,r,b,B,P){function S(o,l,u){return function(s,a){return u&&u(s),o[l].call(s,a)}}function L(o,l){for(var u=0;u<o.length;u++)o[u].call(l);return l}function w(o,l,u,s){if(typeof o!="function"&&(s||o!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return o}function N(o,l,u,s,a,z,A,E,O,y,g,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var h,x=l[0],C=l[3],T=!E;if(!T){u||Array.isArray(x)||(x=[x]);var i={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?i={get:ht(function(){return C(this)},s,"get"),set:function(c){l[4](this,c)}}:i[m]=C,g||ht(i[m],s,a===2?"":m)):g||(i=Object.getOwnPropertyDescriptor(o,s))}for(var d=o,R=x.length-1;R>=0;R-=u?2:1){var F=x[R],G=u?x[R-1]:void 0,K={},_={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,j){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(j,"An initializer","be",!0),A.push(j)}).bind(null,K)};try{if(T)(h=w(F.call(G,d,_),"class decorators","return"))&&(d=h);else{var $,I;_.static=O,_.private=y,y?a===2?$=function(c){return v(c),i.value}:(a<4&&($=S(i,"get",v)),a!==3&&(I=S(i,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,j){c[s]=j}));var X=_.access={has:y?p.bind():function(c){return s in c}};if($&&(X.get=$),I&&(X.set=I),d=F.call(G,f?{get:i.get,set:i.set}:i[m],_),f){if(typeof d=="object"&&d)(h=w(d.get,"accessor.get"))&&(i.get=h),(h=w(d.set,"accessor.set"))&&(i.set=h),(h=w(d.init,"accessor.init"))&&k.push(h);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else w(d,(g?"field":"method")+" decorators","return")&&(g?k.push(d):i[m]=d)}}finally{K.v=!0}}return(g||f)&&E.push(function(c,j){for(var M=k.length-1;M>=0;M--)j=k[M].call(c,j);return j}),g||T||(y?f?E.push(S(i,"get"),S(i,"set")):E.push(a===2?i[m]:S.call.bind(i[m])):Object.defineProperty(o,s,i)),d}function W(o,l){return Object.defineProperty(o,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var H=P[Symbol.metadata||Symbol.for("Symbol.metadata")];var D=Object.create(H??null),J=function(o,l,u,s){var a,z,A=[],E=function(m){return je(m)===o},O=new Map;function y(m){m&&A.push(L.bind(null,m))}for(var g=0;g<l.length;g++){var f=l[g];if(Array.isArray(f)){var p=f[1],v=f[2],h=f.length>3,x=16&p,C=!!(8&p),T=(p&=7)==0,i=v+"/"+C;if(!T&&!h){var k=O.get(i);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(i,!(p>2)||p)}N(C?o:o.prototype,f,x,h?"#"+v:It(v),p,s,C?z=z||[]:a=a||[],A,C,h,T,p===1,C&&h?E:u)}}return y(a),y(z),A}(e,t,B,D);return r.length||W(e,D),{e:J,get c(){var o=[];return r.length&&[W(N(e,[r],b,e.name,5,D,o),D),L.bind(null,o,e)]}}}function It(e){var t=ke(e,"string");return typeof t=="symbol"?t:t+""}function ke(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var b=r.call(e,t);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ht(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function je(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}const rt=n.createLogger("ReactiveCounter");Rt=[n.autoRegister({tagName:"reactive-counter"})];exports.ReactiveCounter=void 0;class we extends n.WebComponent{constructor(){super(),V(this,"_autoStyles",xe),V(this,"state",void 0),V(this,"theme",void 0),V(this,"history",void 0),V(this,"increment",()=>{this.state.count+=this.state.step,this.addToHistory(this.state.count)}),V(this,"decrement",()=>{this.state.count-=this.state.step,this.addToHistory(this.state.count)}),V(this,"reset",()=>{this.state.count=0,this.addToHistory(0)}),V(this,"handleStepChange",b=>{const B=b.target;this.state.step=parseInt(B.value)}),V(this,"handleThemeChange",b=>{const B=b.target;this.theme=B.value}),V(this,"handleMessageChange",b=>{const B=b.target;this.state.message=B.value}),V(this,"toggleAutoIncrement",()=>{this.state.isRunning=!this.state.isRunning,this.state.isRunning&&this.startAutoIncrement()}),V(this,"clearHistory",()=>{this.history=[]}),rt.info("ReactiveCounter initialized"),this.state=this.reactive({count:0,step:1,message:"Hello WSX Reactive!",isRunning:!1});const[t,r]=this.useState("theme","light");Object.defineProperty(this,"theme",{get:t,set:r,enumerable:!0,configurable:!0}),this.history=this.reactive([])}render(){return n.jsx("div",{class:`reactive-counter theme-${this.theme}`},n.jsx("div",{class:"header"},n.jsx("h3",null,"🔄 Reactive Counter"),n.jsx("p",{class:"subtitle"},this.state.message)),n.jsx("div",{class:"counter-display"},n.jsx("div",{class:"count-value"},this.state.count),n.jsx("div",{class:"step-info"},"Step: ",this.state.step)),n.jsx("div",{class:"controls"},n.jsx("button",{class:"btn btn-primary",onClick:this.increment,disabled:this.state.isRunning},"+",this.state.step),n.jsx("button",{class:"btn btn-secondary",onClick:this.decrement,disabled:this.state.isRunning},"-",this.state.step),n.jsx("button",{class:"btn btn-warning",onClick:this.reset,disabled:this.state.isRunning},"Reset")),n.jsx("div",{class:"step-controls"},n.jsx("label",null,"Step Size:",n.jsx("input",{type:"range",min:"1",max:"10",value:this.state.step,onInput:this.handleStepChange}),n.jsx("span",null,this.state.step))),n.jsx("div",{class:"auto-controls"},n.jsx("button",{class:`btn ${this.state.isRunning?"btn-danger":"btn-success"}`,onClick:this.toggleAutoIncrement},this.state.isRunning?"Stop":"Start"," Auto Increment")),n.jsx("div",{class:"theme-controls"},n.jsx("label",null,"Theme:",n.jsx("select",{value:this.theme,onChange:this.handleThemeChange},n.jsx("option",{value:"light"},"Light"),n.jsx("option",{value:"dark"},"Dark"),n.jsx("option",{value:"blue"},"Blue")))),n.jsx("div",{class:"message-controls"},n.jsx("input",{type:"text",value:this.state.message,onInput:this.handleMessageChange,placeholder:"Enter a message..."})),this.history.length>0&&n.jsx("div",{class:"history"},n.jsx("h4",null,"History (last 10):"),n.jsx("div",{class:"history-list"},this.history.slice(-10).map((t,r)=>n.jsx("span",{key:r,class:"history-item"},t))),n.jsx("button",{class:"btn btn-sm",onClick:this.clearHistory},"Clear History")),n.jsx("div",{class:"debug-info"},n.jsx("details",null,n.jsx("summary",null,"Debug Info"),n.jsx("pre",null,JSON.stringify({state:this.state,theme:this.theme,historyLength:this.history.length},null,2)))))}startAutoIncrement(){const t=setInterval(()=>{if(!this.state.isRunning){clearInterval(t);return}this.increment(),this.state.count%5===0&&(this.state.message=`Count reached ${this.state.count}!`)},200)}addToHistory(t){this.history=[...this.history,t]}onConnected(){rt.info("ReactiveCounter connected to DOM"),setTimeout(()=>{this.state.message="Ready to count! 🚀"},500)}onDisconnected(){rt.info("ReactiveCounter disconnected from DOM"),this.state.isRunning=!1}}Dt=we;[exports.ReactiveCounter,Ot]=Ce(Dt,[],Rt,0,void 0,n.WebComponent).c;Ot();const Se=":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 Bt;let Mt,Lt;function ot(e,t,r){return(t=Pt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ee(e,t,r,b,B,P){function S(o,l,u){return function(s,a){return u&&u(s),o[l].call(s,a)}}function L(o,l){for(var u=0;u<o.length;u++)o[u].call(l);return l}function w(o,l,u,s){if(typeof o!="function"&&(s||o!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return o}function N(o,l,u,s,a,z,A,E,O,y,g,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var h,x=l[0],C=l[3],T=!E;if(!T){u||Array.isArray(x)||(x=[x]);var i={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?i={get:dt(function(){return C(this)},s,"get"),set:function(c){l[4](this,c)}}:i[m]=C,g||dt(i[m],s,a===2?"":m)):g||(i=Object.getOwnPropertyDescriptor(o,s))}for(var d=o,R=x.length-1;R>=0;R-=u?2:1){var F=x[R],G=u?x[R-1]:void 0,K={},_={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,j){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(j,"An initializer","be",!0),A.push(j)}).bind(null,K)};try{if(T)(h=w(F.call(G,d,_),"class decorators","return"))&&(d=h);else{var $,I;_.static=O,_.private=y,y?a===2?$=function(c){return v(c),i.value}:(a<4&&($=S(i,"get",v)),a!==3&&(I=S(i,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,j){c[s]=j}));var X=_.access={has:y?p.bind():function(c){return s in c}};if($&&(X.get=$),I&&(X.set=I),d=F.call(G,f?{get:i.get,set:i.set}:i[m],_),f){if(typeof d=="object"&&d)(h=w(d.get,"accessor.get"))&&(i.get=h),(h=w(d.set,"accessor.set"))&&(i.set=h),(h=w(d.init,"accessor.init"))&&k.push(h);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else w(d,(g?"field":"method")+" decorators","return")&&(g?k.push(d):i[m]=d)}}finally{K.v=!0}}return(g||f)&&E.push(function(c,j){for(var M=k.length-1;M>=0;M--)j=k[M].call(c,j);return j}),g||T||(y?f?E.push(S(i,"get"),S(i,"set")):E.push(a===2?i[m]:S.call.bind(i[m])):Object.defineProperty(o,s,i)),d}function W(o,l){return Object.defineProperty(o,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var H=P[Symbol.metadata||Symbol.for("Symbol.metadata")];var D=Object.create(H??null),J=function(o,l,u,s){var a,z,A=[],E=function(m){return ze(m)===o},O=new Map;function y(m){m&&A.push(L.bind(null,m))}for(var g=0;g<l.length;g++){var f=l[g];if(Array.isArray(f)){var p=f[1],v=f[2],h=f.length>3,x=16&p,C=!!(8&p),T=(p&=7)==0,i=v+"/"+C;if(!T&&!h){var k=O.get(i);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(i,!(p>2)||p)}N(C?o:o.prototype,f,x,h?"#"+v:Pt(v),p,s,C?z=z||[]:a=a||[],A,C,h,T,p===1,C&&h?E:u)}}return y(a),y(z),A}(e,t,B,D);return r.length||W(e,D),{e:J,get c(){var o=[];return r.length&&[W(N(e,[r],b,e.name,5,D,o),D),L.bind(null,o,e)]}}}function Pt(e){var t=Te(e,"string");return typeof t=="symbol"?t:t+""}function Te(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var b=r.call(e,t);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function dt(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function ze(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}Lt=[n.autoRegister({tagName:"theme-switcher"})];exports.ThemeSwitcher=void 0;class Ae extends n.WebComponent{constructor(){super({styleName:"theme-switcher"}),ot(this,"_autoStyles",Se),ot(this,"currentTheme","auto"),ot(this,"toggleTheme",()=>{const t=["auto","light","dark"],b=(t.indexOf(this.currentTheme)+1)%t.length;this.setTheme(t[b])}),this.initTheme()}render(){return n.jsx("div",{class:"theme-switcher-container"},n.jsx("button",{class:"theme-switcher-btn","data-theme":this.currentTheme,onClick:this.toggleTheme,title:`当前主题: ${this.getThemeLabel()}`},n.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(t){this.currentTheme=t;const r=document.documentElement;t==="auto"?(r.removeAttribute("class"),this.checkSystemTheme()):r.className=t,localStorage.setItem("wsx-theme",t),this.rerender()}checkSystemTheme(){const t=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.className=t?"dark":""}initTheme(){const t=localStorage.getItem("wsx-theme")||"auto";this.setTheme(t),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r=>{this.currentTheme==="auto"&&(document.documentElement.className=r.matches?"dark":"")})}}Bt=Ae;[exports.ThemeSwitcher,Mt]=Ee(Bt,[],Lt,0,void 0,n.WebComponent).c;Mt();var Nt;let Wt,Ht;function it(e,t,r){return(t=Ft(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _e(e,t,r,b,B,P){function S(o,l,u){return function(s,a){return u&&u(s),o[l].call(s,a)}}function L(o,l){for(var u=0;u<o.length;u++)o[u].call(l);return l}function w(o,l,u,s){if(typeof o!="function"&&(s||o!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return o}function N(o,l,u,s,a,z,A,E,O,y,g,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var h,x=l[0],C=l[3],T=!E;if(!T){u||Array.isArray(x)||(x=[x]);var i={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?i={get:ft(function(){return C(this)},s,"get"),set:function(c){l[4](this,c)}}:i[m]=C,g||ft(i[m],s,a===2?"":m)):g||(i=Object.getOwnPropertyDescriptor(o,s))}for(var d=o,R=x.length-1;R>=0;R-=u?2:1){var F=x[R],G=u?x[R-1]:void 0,K={},_={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,j){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(j,"An initializer","be",!0),A.push(j)}).bind(null,K)};try{if(T)(h=w(F.call(G,d,_),"class decorators","return"))&&(d=h);else{var $,I;_.static=O,_.private=y,y?a===2?$=function(c){return v(c),i.value}:(a<4&&($=S(i,"get",v)),a!==3&&(I=S(i,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,j){c[s]=j}));var X=_.access={has:y?p.bind():function(c){return s in c}};if($&&(X.get=$),I&&(X.set=I),d=F.call(G,f?{get:i.get,set:i.set}:i[m],_),f){if(typeof d=="object"&&d)(h=w(d.get,"accessor.get"))&&(i.get=h),(h=w(d.set,"accessor.set"))&&(i.set=h),(h=w(d.init,"accessor.init"))&&k.push(h);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else w(d,(g?"field":"method")+" decorators","return")&&(g?k.push(d):i[m]=d)}}finally{K.v=!0}}return(g||f)&&E.push(function(c,j){for(var M=k.length-1;M>=0;M--)j=k[M].call(c,j);return j}),g||T||(y?f?E.push(S(i,"get"),S(i,"set")):E.push(a===2?i[m]:S.call.bind(i[m])):Object.defineProperty(o,s,i)),d}function W(o,l){return Object.defineProperty(o,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var H=P[Symbol.metadata||Symbol.for("Symbol.metadata")];var D=Object.create(H??null),J=function(o,l,u,s){var a,z,A=[],E=function(m){return De(m)===o},O=new Map;function y(m){m&&A.push(L.bind(null,m))}for(var g=0;g<l.length;g++){var f=l[g];if(Array.isArray(f)){var p=f[1],v=f[2],h=f.length>3,x=16&p,C=!!(8&p),T=(p&=7)==0,i=v+"/"+C;if(!T&&!h){var k=O.get(i);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(i,!(p>2)||p)}N(C?o:o.prototype,f,x,h?"#"+v:Ft(v),p,s,C?z=z||[]:a=a||[],A,C,h,T,p===1,C&&h?E:u)}}return y(a),y(z),A}(e,t,B,D);return r.length||W(e,D),{e:J,get c(){var o=[];return r.length&&[W(N(e,[r],b,e.name,5,D,o),D),L.bind(null,o,e)]}}}function Ft(e){var t=$e(e,"string");return typeof t=="symbol"?t:t+""}function $e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var b=r.call(e,t);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ft(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function De(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}const nt=n.createLogger("SvgIcon");Ht=[n.autoRegister({tagName:"svg-icon"})];exports.SvgIcon=void 0;class Oe extends n.WebComponent{constructor(){super(),it(this,"handleClick",t=>{nt.debug("SVG icon clicked",{name:this.getAttribute("name")}),this.dispatchEvent(new CustomEvent("icon-click",{detail:{name:this.getAttribute("name"),originalEvent:t},bubbles:!0}))}),it(this,"handleMouseEnter",t=>{const r=t.target;r.style.transform="scale(1.1)"}),it(this,"handleMouseLeave",t=>{const r=t.target;r.style.transform="scale(1)"}),nt.info("SvgIcon component initialized")}render(){const t=this.getAttribute("size")||"24",r=this.getAttribute("color")||"currentColor",b=this.getAttribute("name")||"star",B={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"},P=B[b]||B.star;return n.jsx("svg",{width:t,height:t,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},n.jsx("path",{d:P,fill:r}))}static get observedAttributes(){return["name","size","color"]}onAttributeChanged(t,r,b){nt.debug(`Attribute ${t} changed from ${r} to ${b}`),this.connected&&this.rerender()}}Nt=Oe;[exports.SvgIcon,Wt]=_e(Nt,[],Ht,0,void 0,n.WebComponent).c;Wt();var Gt;let Kt,Xt;function U(e,t,r){return(t=Yt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Re(e,t,r,b,B,P){function S(o,l,u){return function(s,a){return u&&u(s),o[l].call(s,a)}}function L(o,l){for(var u=0;u<o.length;u++)o[u].call(l);return l}function w(o,l,u,s){if(typeof o!="function"&&(s||o!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return o}function N(o,l,u,s,a,z,A,E,O,y,g,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var h,x=l[0],C=l[3],T=!E;if(!T){u||Array.isArray(x)||(x=[x]);var i={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?i={get:pt(function(){return C(this)},s,"get"),set:function(c){l[4](this,c)}}:i[m]=C,g||pt(i[m],s,a===2?"":m)):g||(i=Object.getOwnPropertyDescriptor(o,s))}for(var d=o,R=x.length-1;R>=0;R-=u?2:1){var F=x[R],G=u?x[R-1]:void 0,K={},_={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,j){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(j,"An initializer","be",!0),A.push(j)}).bind(null,K)};try{if(T)(h=w(F.call(G,d,_),"class decorators","return"))&&(d=h);else{var $,I;_.static=O,_.private=y,y?a===2?$=function(c){return v(c),i.value}:(a<4&&($=S(i,"get",v)),a!==3&&(I=S(i,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,j){c[s]=j}));var X=_.access={has:y?p.bind():function(c){return s in c}};if($&&(X.get=$),I&&(X.set=I),d=F.call(G,f?{get:i.get,set:i.set}:i[m],_),f){if(typeof d=="object"&&d)(h=w(d.get,"accessor.get"))&&(i.get=h),(h=w(d.set,"accessor.set"))&&(i.set=h),(h=w(d.init,"accessor.init"))&&k.push(h);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else w(d,(g?"field":"method")+" decorators","return")&&(g?k.push(d):i[m]=d)}}finally{K.v=!0}}return(g||f)&&E.push(function(c,j){for(var M=k.length-1;M>=0;M--)j=k[M].call(c,j);return j}),g||T||(y?f?E.push(S(i,"get"),S(i,"set")):E.push(a===2?i[m]:S.call.bind(i[m])):Object.defineProperty(o,s,i)),d}function W(o,l){return Object.defineProperty(o,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var H=P[Symbol.metadata||Symbol.for("Symbol.metadata")];var D=Object.create(H??null),J=function(o,l,u,s){var a,z,A=[],E=function(m){return Be(m)===o},O=new Map;function y(m){m&&A.push(L.bind(null,m))}for(var g=0;g<l.length;g++){var f=l[g];if(Array.isArray(f)){var p=f[1],v=f[2],h=f.length>3,x=16&p,C=!!(8&p),T=(p&=7)==0,i=v+"/"+C;if(!T&&!h){var k=O.get(i);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(i,!(p>2)||p)}N(C?o:o.prototype,f,x,h?"#"+v:Yt(v),p,s,C?z=z||[]:a=a||[],A,C,h,T,p===1,C&&h?E:u)}}return y(a),y(z),A}(e,t,B,D);return r.length||W(e,D),{e:J,get c(){var o=[];return r.length&&[W(N(e,[r],b,e.name,5,D,o),D),L.bind(null,o,e)]}}}function Yt(e){var t=Ie(e,"string");return typeof t=="symbol"?t:t+""}function Ie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var b=r.call(e,t);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function pt(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Be(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}const tt=n.createLogger("SvgDemo");Xt=[n.autoRegister({tagName:"svg-demo"})];exports.SvgDemo=void 0;class Me extends n.WebComponent{constructor(){super(),U(this,"animationId",null),U(this,"rotationAngle",0),U(this,"showTooltip",(t,r)=>{t.target.setAttribute("fill","#e74c3c"),tt.debug(`Tooltip value: ${r}`)}),U(this,"hideTooltip",t=>{t.target.setAttribute("fill","#3498db")}),U(this,"startAnimation",()=>{if(this.animationId)return;const t=()=>{this.rotationAngle+=2,this.rotationAngle>=360&&(this.rotationAngle=0),this.rerender(),this.animationId=requestAnimationFrame(t)};this.animationId=requestAnimationFrame(t)}),U(this,"stopAnimation",()=>{this.animationId&&(cancelAnimationFrame(this.animationId),this.animationId=null)}),tt.info("SvgDemo component initialized")}render(){return n.jsx("div",{style:"padding: 20px; background: #f5f5f5; border-radius: 8px; margin: 10px 0;"},n.jsx("h3",{style:"margin-top: 0; color: #333;"},"SVG Showcase"),n.jsx("div",{style:"margin-bottom: 20px;"},n.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Basic Shapes"),n.jsx("svg",{width:"300",height:"100",style:"border: 1px solid #ddd; background: white;"},n.jsx("circle",{cx:"50",cy:"50",r:"30",fill:"#e74c3c",stroke:"#c0392b",strokeWidth:"2"}),n.jsx("rect",{x:"100",y:"20",width:"60",height:"60",fill:"#3498db",stroke:"#2980b9",strokeWidth:"2",rx:"5"}),n.jsx("polygon",{points:"200,20 230,80 170,80",fill:"#2ecc71",stroke:"#27ae60",strokeWidth:"2"}),n.jsx("line",{x1:"250",y1:"20",x2:"290",y2:"80",stroke:"#9b59b6",strokeWidth:"3",strokeLinecap:"round"}))),n.jsx("div",{style:"margin-bottom: 20px;"},n.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Gradients & Effects"),n.jsx("svg",{width:"300",height:"100",style:"border: 1px solid #ddd; background: white;"},n.jsx("defs",null,n.jsx("linearGradient",{id:"blueGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%"},n.jsx("stop",{offset:"0%",stopColor:"#3498db"}),n.jsx("stop",{offset:"100%",stopColor:"#9b59b6"})),n.jsx("radialGradient",{id:"redGradient",cx:"50%",cy:"50%",r:"50%"},n.jsx("stop",{offset:"0%",stopColor:"#e74c3c"}),n.jsx("stop",{offset:"100%",stopColor:"#c0392b"}))),n.jsx("rect",{x:"20",y:"20",width:"120",height:"60",fill:"url(#blueGradient)",rx:"10"}),n.jsx("circle",{cx:"200",cy:"50",r:"35",fill:"url(#redGradient)"}))),n.jsx("div",{style:"margin-bottom: 20px;"},n.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Animation"),n.jsx("svg",{width:"300",height:"100",style:"border: 1px solid #ddd; background: white;"},n.jsx("g",{transform:`translate(150, 50) rotate(${this.rotationAngle})`},n.jsx("polygon",{points:"-30,0 0,-40 30,0 0,40",fill:"#f39c12",stroke:"#e67e22",strokeWidth:"2"}),n.jsx("circle",{cx:"0",cy:"0",r:"8",fill:"#2c3e50"}))),n.jsx("div",{style:"margin-top: 10px;"},n.jsx("button",{onClick:this.startAnimation,style:"margin-right: 10px; padding: 5px 10px;"},"Start Animation"),n.jsx("button",{onClick:this.stopAnimation,style:"padding: 5px 10px;"},"Stop Animation"))),n.jsx("div",{style:"margin-bottom: 20px;"},n.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Interactive Chart"),this.renderChart()),n.jsx("div",null,n.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Icon Components"),n.jsx("div",{style:"display: flex; gap: 15px; align-items: center;"},n.jsx("svg-icon",{name:"star",size:"32",color:"#f39c12"}),n.jsx("svg-icon",{name:"heart",size:"32",color:"#e74c3c"}),n.jsx("svg-icon",{name:"check",size:"32",color:"#27ae60"}),n.jsx("svg-icon",{name:"github",size:"32",color:"#333"}),n.jsx("svg-icon",{name:"play",size:"32",color:"#3498db"}),n.jsx("svg-icon",{name:"settings",size:"32",color:"#9b59b6"}))))}renderChart(){const t=[30,80,45,60,20,90,55],r=Math.max(...t),b=30,B=40,P=120,S=t.length*B+40;return n.jsx("svg",{width:S,height:P+40,style:"border: 1px solid #ddd; background: white;"},t.map((L,w)=>{const N=L/r*P,W=w*B+20,H=P-N+20;return n.jsx("g",{key:w},n.jsx("rect",{x:W,y:H,width:b,height:N,fill:"#3498db",stroke:"#2980b9",strokeWidth:"1",onMouseEnter:D=>this.showTooltip(D,L),onMouseLeave:this.hideTooltip,style:"cursor: pointer; transition: fill 0.2s;"}),n.jsx("text",{x:W+b/2,y:P+35,textAnchor:"middle",fontSize:"12",fill:"#666"},w+1))}))}onConnected(){tt.info("SvgDemo connected to DOM")}onDisconnected(){tt.info("SvgDemo disconnected from DOM"),this.stopAnimation()}}Gt=Me;[exports.SvgDemo,Kt]=Re(Gt,[],Xt,0,void 0,n.WebComponent).c;Kt();var qt;let Jt,Vt;function st(e,t,r){return(t=Ut(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e,t,r,b,B,P){function S(o,l,u){return function(s,a){return u&&u(s),o[l].call(s,a)}}function L(o,l){for(var u=0;u<o.length;u++)o[u].call(l);return l}function w(o,l,u,s){if(typeof o!="function"&&(s||o!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return o}function N(o,l,u,s,a,z,A,E,O,y,g,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var h,x=l[0],C=l[3],T=!E;if(!T){u||Array.isArray(x)||(x=[x]);var i={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?i={get:mt(function(){return C(this)},s,"get"),set:function(c){l[4](this,c)}}:i[m]=C,g||mt(i[m],s,a===2?"":m)):g||(i=Object.getOwnPropertyDescriptor(o,s))}for(var d=o,R=x.length-1;R>=0;R-=u?2:1){var F=x[R],G=u?x[R-1]:void 0,K={},_={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,j){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(j,"An initializer","be",!0),A.push(j)}).bind(null,K)};try{if(T)(h=w(F.call(G,d,_),"class decorators","return"))&&(d=h);else{var $,I;_.static=O,_.private=y,y?a===2?$=function(c){return v(c),i.value}:(a<4&&($=S(i,"get",v)),a!==3&&(I=S(i,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,j){c[s]=j}));var X=_.access={has:y?p.bind():function(c){return s in c}};if($&&(X.get=$),I&&(X.set=I),d=F.call(G,f?{get:i.get,set:i.set}:i[m],_),f){if(typeof d=="object"&&d)(h=w(d.get,"accessor.get"))&&(i.get=h),(h=w(d.set,"accessor.set"))&&(i.set=h),(h=w(d.init,"accessor.init"))&&k.push(h);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else w(d,(g?"field":"method")+" decorators","return")&&(g?k.push(d):i[m]=d)}}finally{K.v=!0}}return(g||f)&&E.push(function(c,j){for(var M=k.length-1;M>=0;M--)j=k[M].call(c,j);return j}),g||T||(y?f?E.push(S(i,"get"),S(i,"set")):E.push(a===2?i[m]:S.call.bind(i[m])):Object.defineProperty(o,s,i)),d}function W(o,l){return Object.defineProperty(o,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var H=P[Symbol.metadata||Symbol.for("Symbol.metadata")];var D=Object.create(H??null),J=function(o,l,u,s){var a,z,A=[],E=function(m){return Ne(m)===o},O=new Map;function y(m){m&&A.push(L.bind(null,m))}for(var g=0;g<l.length;g++){var f=l[g];if(Array.isArray(f)){var p=f[1],v=f[2],h=f.length>3,x=16&p,C=!!(8&p),T=(p&=7)==0,i=v+"/"+C;if(!T&&!h){var k=O.get(i);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(i,!(p>2)||p)}N(C?o:o.prototype,f,x,h?"#"+v:Ut(v),p,s,C?z=z||[]:a=a||[],A,C,h,T,p===1,C&&h?E:u)}}return y(a),y(z),A}(e,t,B,D);return r.length||W(e,D),{e:J,get c(){var o=[];return r.length&&[W(N(e,[r],b,e.name,5,D,o),D),L.bind(null,o,e)]}}}function Ut(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var b=r.call(e,t);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function mt(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Ne(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}const We=n.createLogger("SimpleReactiveDemo");Vt=[n.autoRegister({tagName:"simple-reactive-demo"})];exports.SimpleReactiveDemo=void 0;class He extends n.WebComponent{constructor(){super(),st(this,"state",void 0),st(this,"increment",()=>{this.state.count++,this.state.message=`Clicked ${this.state.count} time${this.state.count===1?"":"s"}!`}),st(this,"reset",()=>{this.state.count=0,this.state.message="Reset! Click again!"}),We.info("SimpleReactiveDemo initialized"),this.state=this.reactive({count:0,message:"Click the button!"})}render(){return n.jsx("div",{style:"padding: 20px; border: 1px solid #ccc; border-radius: 8px; margin: 20px;"},n.jsx("h3",null,"📱 Simple Reactive Demo"),n.jsx("p",null,this.state.message),n.jsx("div",{style:"font-size: 24px; margin: 16px 0;"},"Count: ",n.jsx("strong",null,this.state.count)),n.jsx("div",null,n.jsx("button",{onClick:this.increment,style:"margin-right: 8px; padding: 8px 16px;"},"+ Increment"),n.jsx("button",{onClick:this.reset,style:"padding: 8px 16px;"},"🔄 Reset")),n.jsx("div",{style:"margin-top: 16px; font-size: 12px; color: #666;"},"💡 State changes automatically trigger re-renders!"))}}qt=He;[exports.SimpleReactiveDemo,Jt]=Le(qt,[],Vt,0,void 0,n.WebComponent).c;Jt();exports.CONVERTER_BTN=de;exports.CONVERTER_PANEL=fe;exports.getCustomColorCache=Et;exports.getDefaultColorCache=he;exports.handleCSSVariables=Z;exports.setCustomColorCache=St;exports.setDefaultColorCache=wt;exports.throttle=Tt;
6
+ `;const g=Ne(T=>{var B;const L=T.target,w=ae(L.value);this.setSelectedColor(w),this.setCustomColor(w),document.body.removeChild(r),(B=this.onColorPicked)==null||B.call(this,w),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:w},bubbles:!0,composed:!0})),se.debug("Custom color selected",{color:w})},30);r.addEventListener("input",g),document.body.appendChild(r),requestAnimationFrame(()=>{r.focus(),r.click()})}),X(this,"handleDocumentClick",r=>{this.isOpen&&!this.contains(r.target)&&this.closePanel()}),this.colorCollections=e.colorCollections||Jt,this.onColorPicked=e.onColorPicked,this.hasCustomPicker=e.hasCustomPicker||!1,this.pluginType=e.pluginType||"text",this.disabled=e.disabled||!1,this.defaultColor=ae(e.defaultColor||this.colorCollections[0]),this.selectedColor=this.defaultColor,this.customColor=Be(this.pluginType)||"",this.isOpen=!1,se.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("xy-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("xy-button",{type:"button",class:"color-cube custom-picker",style:{backgroundColor:this.customColor},onClick:this.handleCustomPickerClick,title:"自定义颜色"})}renderColorButtons(){return this.colorCollections.map(e=>o.jsx("xy-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,Ie(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(){document.addEventListener("click",this.handleDocumentClick),se.info("ColorPicker connected to DOM")}onDisconnected(){document.removeEventListener("click",this.handleDocumentClick),se.info("ColorPicker disconnected from DOM")}onAttributeChanged(e,r,g){switch(e){case"disabled":this.disabled=g!==null,this.rerender();break;case"selected-color":g&&g!==this.selectedColor&&(this.selectedColor=g,this.updateColorButton());break;case"open":this.isOpen=g!==null;break}}getSelectedColor(){return this.selectedColor}setColor(e){this.setSelectedColor(ae(e))}focus(){var e;(e=this.colorBtn)==null||e.focus()}}Me=Gt;[exports.ColorPicker,Ue]=Ht(Me,[],We,0,void 0,o.WebComponent).c;Ue();const qt=".reactive-counter{max-width:500px;margin:20px auto;padding:24px;border-radius:12px;box-shadow:0 4px 12px #0000001a;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;transition:all .3s ease}.theme-light{background:#fff;color:#333;border:1px solid #e1e5e9}.theme-dark{background:#1a1a1a;color:#fff;border:1px solid #333333}.theme-blue{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:1px solid #5a67d8}.header{text-align:center;margin-bottom:24px}.header h3{margin:0 0 8px;font-size:24px;font-weight:600}.subtitle{margin:0;opacity:.8;font-size:14px}.counter-display{text-align:center;margin-bottom:32px}.count-value{font-size:48px;font-weight:700;line-height:1;margin-bottom:8px;font-variant-numeric:tabular-nums}.step-info{font-size:14px;opacity:.7}.controls{display:flex;gap:12px;justify-content:center;margin-bottom:24px;flex-wrap:wrap}.btn{padding:10px 20px;border:none;border-radius:8px;font-size:16px;font-weight:500;cursor:pointer;transition:all .2s ease;min-width:60px}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:#4299e1;color:#fff}.btn-primary:hover:not(:disabled){background:#3182ce;transform:translateY(-1px)}.btn-secondary{background:#718096;color:#fff}.btn-secondary:hover:not(:disabled){background:#4a5568;transform:translateY(-1px)}.btn-warning{background:#ed8936;color:#fff}.btn-warning:hover:not(:disabled){background:#dd6b20;transform:translateY(-1px)}.btn-success{background:#48bb78;color:#fff}.btn-success:hover:not(:disabled){background:#38a169;transform:translateY(-1px)}.btn-danger{background:#f56565;color:#fff}.btn-danger:hover:not(:disabled){background:#e53e3e;transform:translateY(-1px)}.btn-sm{padding:6px 12px;font-size:14px;min-width:auto}.step-controls,.auto-controls,.theme-controls,.message-controls{margin-bottom:20px;text-align:center}.step-controls label{display:flex;align-items:center;justify-content:center;gap:12px;font-size:14px}.step-controls input[type=range]{flex:0 0 150px}.step-controls span{font-weight:700;min-width:20px}.theme-controls select,.message-controls input{padding:8px 12px;border:1px solid #cbd5e0;border-radius:6px;font-size:14px;margin-left:8px}.theme-dark .theme-controls select,.theme-dark .message-controls input{background:#2d3748;border-color:#4a5568;color:#fff}.theme-blue .theme-controls select,.theme-blue .message-controls input{background:#ffffff1a;border-color:#fff3;color:#fff}.message-controls input{width:250px;max-width:100%}.history{margin-top:24px;padding:16px;background:#0000000d;border-radius:8px}.theme-dark .history{background:#ffffff0d}.theme-blue .history{background:#ffffff1a}.history h4{margin:0 0 12px;font-size:16px}.history-list{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.history-item{padding:4px 8px;background:#4299e11a;border:1px solid rgba(66,153,225,.2);border-radius:4px;font-size:12px;font-weight:500}.debug-info{margin-top:24px;font-size:12px}.debug-info details{border:1px solid #e2e8f0;border-radius:6px;padding:8px}.theme-dark .debug-info details{border-color:#4a5568}.theme-blue .debug-info details{border-color:#fff3}.debug-info summary{cursor:pointer;font-weight:500;margin-bottom:8px}.debug-info pre{margin:0;padding:8px;background:#0000000d;border-radius:4px;overflow-x:auto;font-size:11px;line-height:1.4}.theme-dark .debug-info pre{background:#ffffff0d}.theme-blue .debug-info pre{background:#ffffff1a}@media (max-width: 600px){.reactive-counter{margin:10px;padding:16px}.count-value{font-size:36px}.controls{flex-direction:column;align-items:center}.btn{width:200px}.step-controls label{flex-direction:column;gap:8px}.message-controls input{width:100%}}";var Fe;let Ke,Je;function Z(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 Xt(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:ve(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||ve(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return Qt(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:Ge(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function Ge(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 g=r.call(t,e);if(typeof g!="object")return g;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 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}const ue=o.createLogger("ReactiveCounter");Je=[o.autoRegister({tagName:"reactive-counter"})];exports.ReactiveCounter=void 0;class Zt extends o.WebComponent{constructor(){super(),Z(this,"_autoStyles",qt),Z(this,"state",void 0),Z(this,"theme",void 0),Z(this,"history",void 0),Z(this,"increment",()=>{this.state.count+=this.state.step,this.addToHistory(this.state.count)}),Z(this,"decrement",()=>{this.state.count-=this.state.step,this.addToHistory(this.state.count)}),Z(this,"reset",()=>{this.state.count=0,this.addToHistory(0)}),Z(this,"handleStepChange",L=>{const w=L.target;this.state.step=parseInt(w.value)}),Z(this,"handleThemeChange",L=>{const w=L.target;this.theme=w.value}),Z(this,"handleMessageChange",L=>{const w=L.target;this.state.message=w.value}),Z(this,"toggleAutoIncrement",()=>{this.state.isRunning=!this.state.isRunning,this.state.isRunning&&this.startAutoIncrement()}),Z(this,"clearHistory",()=>{this.history=[]}),ue.info("ReactiveCounter initialized");let e=this.reactive({count:0,step:1,message:"Hello WSX Reactive!",isRunning:!1});Object.defineProperty(this,"state",{get:()=>e,set:L=>{e=L!==null&&typeof L<"u"&&(Array.isArray(L)||typeof L=="object")?this.reactive(L):L,this.scheduleRerender()},enumerable:!0,configurable:!0});const[r,g]=this.useState("theme","light");Object.defineProperty(this,"theme",{get:r,set:g,enumerable:!0,configurable:!0});let T=this.reactive([]);Object.defineProperty(this,"history",{get:()=>T,set:L=>{T=L!==null&&typeof L<"u"&&(Array.isArray(L)||typeof L=="object")?this.reactive(L):L,this.scheduleRerender()},enumerable:!0,configurable:!0})}render(){return o.jsx("div",{class:`reactive-counter theme-${this.theme}`},o.jsx("div",{class:"header"},o.jsx("h3",null,"🔄 Reactive Counter"),o.jsx("p",{class:"subtitle"},this.state.message)),o.jsx("div",{class:"counter-display"},o.jsx("div",{class:"count-value"},this.state.count),o.jsx("div",{class:"step-info"},"Step: ",this.state.step)),o.jsx("div",{class:"controls"},o.jsx("button",{class:"btn btn-primary",onClick:this.increment,disabled:this.state.isRunning,"data-wsx-key":"ReactiveCounter-button-text-5-1"},"+",this.state.step),o.jsx("button",{class:"btn btn-secondary",onClick:this.decrement,disabled:this.state.isRunning,"data-wsx-key":"ReactiveCounter-button-text-5-3"},"-",this.state.step),o.jsx("button",{class:"btn btn-warning",onClick:this.reset,disabled:this.state.isRunning,"data-wsx-key":"ReactiveCounter-button-text-5-5"},"Reset")),o.jsx("div",{class:"step-controls"},o.jsx("label",null,"Step Size:",o.jsx("input",{type:"range",min:"1",max:"10",value:this.state.step,onInput:this.handleStepChange,"data-wsx-key":"ReactiveCounter-input-range-7-1-1"}),o.jsx("span",null,this.state.step))),o.jsx("div",{class:"auto-controls"},o.jsx("button",{class:`btn ${this.state.isRunning?"btn-danger":"btn-success"}`,onClick:this.toggleAutoIncrement,"data-wsx-key":"ReactiveCounter-button-text-9-1"},this.state.isRunning?"Stop":"Start"," Auto Increment")),o.jsx("div",{class:"theme-controls"},o.jsx("label",null,"Theme:",o.jsx("select",{value:this.theme,onChange:this.handleThemeChange,"data-wsx-key":"ReactiveCounter-select-text-11-1-1"},o.jsx("option",{value:"light"},"Light"),o.jsx("option",{value:"dark"},"Dark"),o.jsx("option",{value:"blue"},"Blue")))),o.jsx("div",{class:"message-controls"},o.jsx("input",{type:"text",value:this.state.message,onInput:this.handleMessageChange,placeholder:"Enter a message...","data-wsx-key":"ReactiveCounter-input-text-13-1"})),this.history.length>0&&o.jsx("div",{class:"history"},o.jsx("h4",null,"History (last 10):"),o.jsx("div",{class:"history-list"},this.history.slice(-10).map((e,r)=>o.jsx("span",{key:r,class:"history-item"},e))),o.jsx("button",{class:"btn btn-sm",onClick:this.clearHistory,"data-wsx-key":"ReactiveCounter-button-text-5"},"Clear History")),o.jsx("div",{class:"debug-info"},o.jsx("details",null,o.jsx("summary",null,"Debug Info"),o.jsx("pre",null,JSON.stringify({state:this.state,theme:this.theme,historyLength:this.history.length},null,2)))))}startAutoIncrement(){const e=setInterval(()=>{if(!this.state.isRunning){clearInterval(e);return}this.increment(),this.state.count%5===0&&(this.state.message=`Count reached ${this.state.count}!`)},200)}addToHistory(e){this.history=[...this.history,e]}onConnected(){ue.info("ReactiveCounter connected to DOM"),setTimeout(()=>{this.state.message="Ready to count! 🚀"},500)}onDisconnected(){ue.info("ReactiveCounter disconnected from DOM"),this.state.isRunning=!1}}Fe=Zt;[exports.ReactiveCounter,Ke]=Xt(Fe,[],Je,0,void 0,o.WebComponent).c;Ke();const Vt=":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 qe;let Xe,Ye;function de(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 er(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:xe(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||xe(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return rr(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:Qe(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function Qe(t){var e=tr(t,"string");return typeof e=="symbol"?e:e+""}function tr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function xe(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 rr(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:"theme-switcher"})];exports.ThemeSwitcher=void 0;class or extends o.WebComponent{constructor(){super({styleName:"theme-switcher"}),de(this,"_autoStyles",Vt),de(this,"currentTheme","auto"),de(this,"toggleTheme",()=>{const e=["auto","light","dark"],g=(e.indexOf(this.currentTheme)+1)%e.length;this.setTheme(e[g])}),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":"")})}}qe=or;[exports.ThemeSwitcher,Xe]=er(qe,[],Ye,0,void 0,o.WebComponent).c;Xe();var Ze;let Ve,et;function he(t,e,r){return(e=tt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ir(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:je(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||je(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return sr(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:tt(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function tt(t){var e=nr(t,"string");return typeof e=="symbol"?e:e+""}function nr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function je(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 sr(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 fe=o.createLogger("SvgIcon");et=[o.autoRegister({tagName:"svg-icon"})];exports.SvgIcon=void 0;class ar extends o.WebComponent{constructor(){super(),he(this,"handleClick",e=>{fe.debug("SVG icon clicked",{name:this.getAttribute("name")}),this.dispatchEvent(new CustomEvent("icon-click",{detail:{name:this.getAttribute("name"),originalEvent:e},bubbles:!0}))}),he(this,"handleMouseEnter",e=>{const r=e.target;r.style.transform="scale(1.1)"}),he(this,"handleMouseLeave",e=>{const r=e.target;r.style.transform="scale(1)"}),fe.info("SvgIcon component initialized")}render(){const e=this.getAttribute("size")||"24",r=this.getAttribute("color")||"currentColor",g=this.getAttribute("name")||"star",T={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"},L=T[g]||T.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:L,fill:r}))}static get observedAttributes(){return["name","size","color"]}onAttributeChanged(e,r,g){fe.debug(`Attribute ${e} changed from ${r} to ${g}`),this.connected&&this.rerender()}}Ze=ar;[exports.SvgIcon,Ve]=ir(Ze,[],et,0,void 0,o.WebComponent).c;Ve();var rt;let ot,it;function ne(t,e,r){return(e=nt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lr(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:ke(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||ke(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return ur(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:nt(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function nt(t){var e=cr(t,"string");return typeof e=="symbol"?e:e+""}function cr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;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 ur(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 le=o.createLogger("SvgDemo");it=[o.autoRegister({tagName:"svg-demo"})];exports.SvgDemo=void 0;class dr extends o.WebComponent{constructor(){super(),ne(this,"animationId",null),ne(this,"rotationAngle",0),ne(this,"showTooltip",(e,r)=>{e.target.setAttribute("fill","#e74c3c"),le.debug(`Tooltip value: ${r}`)}),ne(this,"hideTooltip",e=>{e.target.setAttribute("fill","#3498db")}),ne(this,"startAnimation",()=>{if(this.animationId)return;const e=()=>{this.rotationAngle+=2,this.rotationAngle>=360&&(this.rotationAngle=0),this.rerender(),this.animationId=requestAnimationFrame(e)};this.animationId=requestAnimationFrame(e)}),ne(this,"stopAnimation",()=>{this.animationId&&(cancelAnimationFrame(this.animationId),this.animationId=null)}),le.info("SvgDemo component initialized")}render(){return o.jsx("div",{style:"padding: 20px; background: #f5f5f5; border-radius: 8px; margin: 10px 0;"},o.jsx("h3",{style:"margin-top: 0; color: #333;"},"SVG Showcase"),o.jsx("div",{style:"margin-bottom: 20px;"},o.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Basic Shapes"),o.jsx("svg",{width:"300",height:"100",style:"border: 1px solid #ddd; background: white;"},o.jsx("circle",{cx:"50",cy:"50",r:"30",fill:"#e74c3c",stroke:"#c0392b",strokeWidth:"2"}),o.jsx("rect",{x:"100",y:"20",width:"60",height:"60",fill:"#3498db",stroke:"#2980b9",strokeWidth:"2",rx:"5"}),o.jsx("polygon",{points:"200,20 230,80 170,80",fill:"#2ecc71",stroke:"#27ae60",strokeWidth:"2"}),o.jsx("line",{x1:"250",y1:"20",x2:"290",y2:"80",stroke:"#9b59b6",strokeWidth:"3",strokeLinecap:"round"}))),o.jsx("div",{style:"margin-bottom: 20px;"},o.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Gradients & Effects"),o.jsx("svg",{width:"300",height:"100",style:"border: 1px solid #ddd; background: white;"},o.jsx("defs",null,o.jsx("linearGradient",{id:"blueGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%"},o.jsx("stop",{offset:"0%",stopColor:"#3498db"}),o.jsx("stop",{offset:"100%",stopColor:"#9b59b6"})),o.jsx("radialGradient",{id:"redGradient",cx:"50%",cy:"50%",r:"50%"},o.jsx("stop",{offset:"0%",stopColor:"#e74c3c"}),o.jsx("stop",{offset:"100%",stopColor:"#c0392b"}))),o.jsx("rect",{x:"20",y:"20",width:"120",height:"60",fill:"url(#blueGradient)",rx:"10"}),o.jsx("circle",{cx:"200",cy:"50",r:"35",fill:"url(#redGradient)"}))),o.jsx("div",{style:"margin-bottom: 20px;"},o.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Animation"),o.jsx("svg",{width:"300",height:"100",style:"border: 1px solid #ddd; background: white;"},o.jsx("g",{transform:`translate(150, 50) rotate(${this.rotationAngle})`},o.jsx("polygon",{points:"-30,0 0,-40 30,0 0,40",fill:"#f39c12",stroke:"#e67e22",strokeWidth:"2"}),o.jsx("circle",{cx:"0",cy:"0",r:"8",fill:"#2c3e50"}))),o.jsx("div",{style:"margin-top: 10px;"},o.jsx("button",{onClick:this.startAnimation,style:"margin-right: 10px; padding: 5px 10px;","data-wsx-key":"SvgDemo-button-text-13-5-1"},"Start Animation"),o.jsx("button",{onClick:this.stopAnimation,style:"padding: 5px 10px;","data-wsx-key":"SvgDemo-button-text-13-5-3"},"Stop Animation"))),o.jsx("div",{style:"margin-bottom: 20px;"},o.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Interactive Chart"),this.renderChart()),o.jsx("div",null,o.jsx("h4",{style:"margin: 10px 0; color: #666;"},"Icon Components"),o.jsx("div",{style:"display: flex; gap: 15px; align-items: center;"},o.jsx("svg-icon",{name:"star",size:"32",color:"#f39c12"}),o.jsx("svg-icon",{name:"heart",size:"32",color:"#e74c3c"}),o.jsx("svg-icon",{name:"check",size:"32",color:"#27ae60"}),o.jsx("svg-icon",{name:"github",size:"32",color:"#333"}),o.jsx("svg-icon",{name:"play",size:"32",color:"#3498db"}),o.jsx("svg-icon",{name:"settings",size:"32",color:"#9b59b6"}))))}renderChart(){const e=[30,80,45,60,20,90,55],r=Math.max(...e),g=30,T=40,L=120,w=e.length*T+40;return o.jsx("svg",{width:w,height:L+40,style:"border: 1px solid #ddd; background: white;"},e.map((B,S)=>{const M=B/r*L,U=S*T+20,W=L-M+20;return o.jsx("g",{key:S},o.jsx("rect",{x:U,y:W,width:g,height:M,fill:"#3498db",stroke:"#2980b9",strokeWidth:"1",onMouseEnter:R=>this.showTooltip(R,B),onMouseLeave:this.hideTooltip,style:"cursor: pointer; transition: fill 0.2s;"}),o.jsx("text",{x:U+g/2,y:L+35,textAnchor:"middle",fontSize:"12",fill:"#666"},S+1))}))}onConnected(){le.info("SvgDemo connected to DOM")}onDisconnected(){le.info("SvgDemo disconnected from DOM"),this.stopAnimation()}}rt=dr;[exports.SvgDemo,ot]=lr(rt,[],it,0,void 0,o.WebComponent).c;ot();var st;let at,lt;function pe(t,e,r){return(e=ct(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hr(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:Ce(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||Ce(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return pr(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:ct(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function ct(t){var e=fr(t,"string");return typeof e=="symbol"?e:e+""}function fr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Ce(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 pr(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 mr=o.createLogger("SimpleReactiveDemo");lt=[o.autoRegister({tagName:"simple-reactive-demo"})];exports.SimpleReactiveDemo=void 0;class gr extends o.WebComponent{constructor(){super(),pe(this,"state",void 0),pe(this,"increment",()=>{this.state.count++,this.state.message=`Clicked ${this.state.count} time${this.state.count===1?"":"s"}!`}),pe(this,"reset",()=>{this.state.count=0,this.state.message="Reset! Click again!"}),mr.info("SimpleReactiveDemo initialized");let e=this.reactive({count:0,message:"Click the button!"});Object.defineProperty(this,"state",{get:()=>e,set:r=>{e=r!==null&&typeof r<"u"&&(Array.isArray(r)||typeof r=="object")?this.reactive(r):r,this.scheduleRerender()},enumerable:!0,configurable:!0})}render(){return o.jsx("div",{style:"padding: 20px; border: 1px solid #ccc; border-radius: 8px; margin: 20px;"},o.jsx("h3",null,"📱 Simple Reactive Demo"),o.jsx("p",null,this.state.message),o.jsx("div",{style:"font-size: 24px; margin: 16px 0;"},"Count: ",o.jsx("strong",null,this.state.count)),o.jsx("div",null,o.jsx("button",{onClick:this.increment,style:"margin-right: 8px; padding: 8px 16px;","data-wsx-key":"SimpleReactiveDemo-button-text-7-1"},"+ Increment"),o.jsx("button",{onClick:this.reset,style:"padding: 8px 16px;","data-wsx-key":"SimpleReactiveDemo-button-text-7-3"},"🔄 Reset")),o.jsx("div",{style:"margin-top: 16px; font-size: 12px; color: #666;"},"💡 State changes automatically trigger re-renders!"))}}st=gr;[exports.SimpleReactiveDemo,at]=hr(st,[],lt,0,void 0,o.WebComponent).c;at();const br=".todo-list{padding:1.5rem;max-width:600px;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.todo-header{margin-bottom:1.5rem;text-align:center}.todo-header h2{margin:0 0 .5rem;color:#333;font-size:1.75rem}.subtitle{margin:0;color:#666;font-size:.9rem}.todo-input-section{display:flex;gap:.5rem;margin-bottom:1rem}.todo-input{flex:1;padding:.75rem;border:2px solid #ddd;border-radius:4px;font-size:1rem;transition:border-color .2s}.todo-input:focus{outline:none;border-color:#4caf50}.todo-filters{display:flex;gap:.5rem;margin-bottom:1rem;justify-content:center}.filter-btn{padding:.5rem 1rem;border:2px solid #ddd;background:#fff;border-radius:4px;cursor:pointer;transition:all .2s;font-size:.9rem}.filter-btn:hover{background:#f5f5f5}.filter-btn.active{background:#4caf50;color:#fff;border-color:#4caf50}.todo-list-container{min-height:200px;margin-bottom:1rem}.empty-state{text-align:center;padding:3rem 1rem;color:#999;font-style:italic}.todo-items{list-style:none;padding:0;margin:0}.todo-item{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.5rem;background:#f9f9f9;border-radius:4px;transition:background .2s}.todo-item:hover{background:#f0f0f0}.todo-item.completed{opacity:.6}.todo-checkbox{width:1.25rem;height:1.25rem;cursor:pointer}.todo-text{flex:1;font-size:1rem}.todo-item.completed .todo-text{text-decoration:line-through;color:#999}.todo-actions{display:flex;gap:.5rem;justify-content:center;margin-top:1rem}.btn{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.9rem;transition:all .2s}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:#4caf50;color:#fff}.btn-primary:hover:not(:disabled){background:#45a049}.btn-warning{background:#ff9800;color:#fff}.btn-warning:hover{background:#e68900}.btn-danger{background:#f44336;color:#fff}.btn-danger:hover{background:#da190b}.btn-sm{padding:.25rem .5rem;font-size:.8rem}.debug-info{margin-top:2rem;padding-top:1rem;border-top:1px solid #ddd}.debug-info summary{cursor:pointer;color:#666;font-size:.9rem}.debug-info pre{background:#f5f5f5;padding:1rem;border-radius:4px;overflow-x:auto;font-size:.85rem;margin-top:.5rem}";var ut;let dt,ht;function V(t,e,r){return(e=ft(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yr(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:we(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||we(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return xr(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:ft(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function ft(t){var e=vr(t,"string");return typeof e=="symbol"?e:e+""}function vr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;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 xr(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 oe=o.createLogger("TodoList");ht=[o.autoRegister({tagName:"todo-list"})];exports.TodoList=void 0;class jr extends o.WebComponent{constructor(){super(),V(this,"_autoStyles",br),V(this,"todos",void 0),V(this,"_newTodoText",""),V(this,"filter",void 0),V(this,"nextId",1),V(this,"handleInputChange",T=>{var B;const L=T.target;this._newTodoText=L.value;const w=(B=this.shadowRoot)==null?void 0:B.querySelector(".todo-input-section .btn-primary");w&&(w.disabled=!this._newTodoText.trim())}),V(this,"handleKeyDown",T=>{T.key==="Enter"&&this._newTodoText.trim()&&this.addTodo()}),V(this,"addTodo",()=>{var w,B;const T=(w=this.shadowRoot)==null?void 0:w.querySelector(".todo-input"),L=(T==null?void 0:T.value.trim())||this._newTodoText.trim();if(L){if(this.todos=[...this.todos,{id:this.nextId++,text:L,completed:!1,createdAt:Date.now()}],this._newTodoText="",T){T.value="";const S=(B=this.shadowRoot)==null?void 0:B.querySelector(".todo-input-section .btn-primary");S&&(S.disabled=!0)}oe.debug("Todo added",{count:this.todos.length})}}),V(this,"removeTodo",T=>{this.todos=this.todos.filter(L=>L.id!==T),oe.debug("Todo removed",{id:T,remaining:this.todos.length})}),V(this,"toggleTodo",T=>{this.todos=this.todos.map(L=>L.id===T?{...L,completed:!L.completed}:L),oe.debug("Todo toggled",{id:T})}),V(this,"clearCompleted",()=>{this.todos=this.todos.filter(T=>!T.completed),oe.debug("Completed todos cleared")}),V(this,"clearAll",()=>{this.todos=[],oe.debug("All todos cleared")}),oe.info("TodoList initialized");let e=this.reactive([]);Object.defineProperty(this,"todos",{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[r,g]=this.useState("filter","all");Object.defineProperty(this,"filter",{get:r,set:g,enumerable:!0,configurable:!0})}render(){const e=this.getFilteredTodos();return o.jsx("div",{class:"todo-list"},o.jsx("div",{class:"todo-header"},o.jsx("h2",null,"📝 Todo List (WebComponent)"),o.jsx("p",{class:"subtitle"},this.todos.length," total, ",this.getActiveCount()," active,"," ",this.getCompletedCount()," completed")),o.jsx("div",{class:"todo-input-section"},o.jsx("input",{type:"text",class:"todo-input",placeholder:"Add a new todo...",value:this._newTodoText,onInput:this.handleInputChange,onKeyDown:this.handleKeyDown,"data-wsx-key":"TodoList-input-text-3-1"}),o.jsx("button",{class:"btn btn-primary",onClick:this.addTodo,disabled:!this._newTodoText.trim(),"data-wsx-key":"TodoList-button-text-3-3"},"Add")),o.jsx("div",{class:"todo-filters"},o.jsx("button",{class:`filter-btn ${this.filter==="all"?"active":""}`,onClick:()=>this.filter="all","data-wsx-key":"TodoList-button-text-5-1"},"All (",this.todos.length,")"),o.jsx("button",{class:`filter-btn ${this.filter==="active"?"active":""}`,onClick:()=>this.filter="active","data-wsx-key":"TodoList-button-text-5-3"},"Active (",this.getActiveCount(),")"),o.jsx("button",{class:`filter-btn ${this.filter==="completed"?"active":""}`,onClick:()=>this.filter="completed","data-wsx-key":"TodoList-button-text-5-5"},"Completed (",this.getCompletedCount(),")")),o.jsx("div",{class:"todo-list-container"},e.length===0?o.jsx("div",{class:"empty-state"},this.filter==="all"?"No todos yet. Add one above! 🎉":`No ${this.filter} todos.`):o.jsx("ul",{class:"todo-items"},e.map(r=>o.jsx("li",{key:r.id,class:`todo-item ${r.completed?"completed":""}`},o.jsx("input",{type:"checkbox",checked:r.completed,onChange:()=>this.toggleTodo(r.id),class:"todo-checkbox","data-wsx-key":"TodoList-input-checkbox-7-1"}),o.jsx("span",{class:"todo-text"},r.text),o.jsx("button",{class:"btn btn-sm btn-danger",onClick:()=>this.removeTodo(r.id),"data-wsx-key":"TodoList-button-text-7-5"},"Delete"))))),this.todos.length>0&&o.jsx("div",{class:"todo-actions"},o.jsx("button",{class:"btn btn-warning",onClick:this.clearCompleted,"data-wsx-key":"TodoList-button-text-1"},"Clear Completed"),o.jsx("button",{class:"btn btn-danger",onClick:this.clearAll,"data-wsx-key":"TodoList-button-text-3"},"Clear All")),o.jsx("div",{class:"debug-info"},o.jsx("details",null,o.jsx("summary",null,"Debug Info"),o.jsx("pre",null,JSON.stringify({todosCount:this.todos.length,filter:this.filter,newTodoText:this._newTodoText,todos:this.todos},null,2)))))}getFilteredTodos(){switch(this.filter){case"active":return this.todos.filter(e=>!e.completed);case"completed":return this.todos.filter(e=>e.completed);default:return this.todos}}getActiveCount(){return this.todos.filter(e=>!e.completed).length}getCompletedCount(){return this.todos.filter(e=>e.completed).length}onConnected(){oe.info("TodoList connected to DOM")}onDisconnected(){oe.info("TodoList disconnected from DOM")}}ut=jr;[exports.TodoList,dt]=yr(ut,[],ht,0,void 0,o.WebComponent).c;dt();const kr=".todo-list-light{padding:1.5rem;max-width:600px;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.todo-header{margin-bottom:1.5rem;text-align:center}.todo-header h2{margin:0 0 .5rem;color:#2196f3;font-size:1.75rem}.subtitle{margin:0;color:#666;font-size:.9rem}.todo-input-section{display:flex;gap:.5rem;margin-bottom:1rem}.todo-input{flex:1;padding:.75rem;border:2px solid #ddd;border-radius:4px;font-size:1rem;transition:border-color .2s}.todo-input:focus{outline:none;border-color:#2196f3}.todo-filters{display:flex;gap:.5rem;margin-bottom:1rem;justify-content:center}.filter-btn{padding:.5rem 1rem;border:2px solid #ddd;background:#fff;border-radius:4px;cursor:pointer;transition:all .2s;font-size:.9rem}.filter-btn:hover{background:#f5f5f5}.filter-btn.active{background:#2196f3;color:#fff;border-color:#2196f3}.todo-list-container{min-height:200px;margin-bottom:1rem}.empty-state{text-align:center;padding:3rem 1rem;color:#999;font-style:italic}.todo-items{list-style:none;padding:0;margin:0}.todo-item{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.5rem;background:#f0f7ff;border-radius:4px;transition:background .2s}.todo-item:hover{background:#e3f2fd}.todo-item.completed{opacity:.6}.todo-checkbox{width:1.25rem;height:1.25rem;cursor:pointer}.todo-text{flex:1;font-size:1rem}.todo-item.completed .todo-text{text-decoration:line-through;color:#999}.todo-actions{display:flex;gap:.5rem;justify-content:center;margin-top:1rem}.btn{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.9rem;transition:all .2s}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:#2196f3;color:#fff}.btn-primary:hover:not(:disabled){background:#1976d2}.btn-warning{background:#ff9800;color:#fff}.btn-warning:hover{background:#e68900}.btn-danger{background:#f44336;color:#fff}.btn-danger:hover{background:#da190b}.btn-sm{padding:.25rem .5rem;font-size:.8rem}.debug-info{margin-top:2rem;padding-top:1rem;border-top:1px solid #ddd}.debug-info summary{cursor:pointer;color:#666;font-size:.9rem}.debug-info pre{background:#f5f5f5;padding:1rem;border-radius:4px;overflow-x:auto;font-size:.85rem;margin-top:.5rem}";var pt;let mt,gt;function ee(t,e,r){return(e=bt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cr(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:Te(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||Te(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return Tr(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:bt(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function bt(t){var e=wr(t,"string");return typeof e=="symbol"?e:e+""}function wr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Te(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}const ie=o.createLogger("TodoListLight");gt=[o.autoRegister({tagName:"todo-list-light"})];exports.TodoListLight=void 0;class Sr extends o.LightComponent{constructor(){super(),ee(this,"_autoStyles",kr),ee(this,"todos",void 0),ee(this,"_newTodoText",""),ee(this,"filter",void 0),ee(this,"nextId",1),ee(this,"handleInputChange",T=>{const L=T.target;this._newTodoText=L.value;const w=this.querySelector(".todo-input-section .btn-primary");w&&(w.disabled=!this._newTodoText.trim())}),ee(this,"handleKeyDown",T=>{T.key==="Enter"&&this._newTodoText.trim()&&this.addTodo()}),ee(this,"addTodo",()=>{const T=this.querySelector(".todo-input"),L=(T==null?void 0:T.value.trim())||this._newTodoText.trim();if(L){if(this.todos=[...this.todos,{id:this.nextId++,text:L,completed:!1,createdAt:Date.now()}],this._newTodoText="",T){T.value="";const w=this.querySelector(".todo-input-section .btn-primary");w&&(w.disabled=!0)}ie.debug("Todo added",{count:this.todos.length})}}),ee(this,"removeTodo",T=>{this.todos=this.todos.filter(L=>L.id!==T),ie.debug("Todo removed",{id:T,remaining:this.todos.length})}),ee(this,"toggleTodo",T=>{this.todos=this.todos.map(L=>L.id===T?{...L,completed:!L.completed}:L),ie.debug("Todo toggled",{id:T})}),ee(this,"clearCompleted",()=>{this.todos=this.todos.filter(T=>!T.completed),ie.debug("Completed todos cleared")}),ee(this,"clearAll",()=>{this.todos=[],ie.debug("All todos cleared")}),ie.info("TodoListLight initialized");let e=this.reactive([]);Object.defineProperty(this,"todos",{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[r,g]=this.useState("filter","all");Object.defineProperty(this,"filter",{get:r,set:g,enumerable:!0,configurable:!0})}render(){const e=this.getFilteredTodos();return o.jsx("div",{class:"todo-list-light"},o.jsx("div",{class:"todo-header"},o.jsx("h2",null,"📝 Todo List (LightComponent)"),o.jsx("p",{class:"subtitle"},this.todos.length," total, ",this.getActiveCount()," active,"," ",this.getCompletedCount()," completed")),o.jsx("div",{class:"todo-input-section"},o.jsx("input",{type:"text",class:"todo-input",placeholder:"Add a new todo...",value:this._newTodoText,onInput:this.handleInputChange,onKeyDown:this.handleKeyDown,"data-wsx-key":"TodoListLight-input-text-3-1"}),o.jsx("button",{class:"btn btn-primary",onClick:this.addTodo,disabled:!this._newTodoText.trim(),"data-wsx-key":"TodoListLight-button-text-3-3"},"Add")),o.jsx("div",{class:"todo-filters"},o.jsx("button",{class:`filter-btn ${this.filter==="all"?"active":""}`,onClick:()=>this.filter="all","data-wsx-key":"TodoListLight-button-text-5-1"},"All (",this.todos.length,")"),o.jsx("button",{class:`filter-btn ${this.filter==="active"?"active":""}`,onClick:()=>this.filter="active","data-wsx-key":"TodoListLight-button-text-5-3"},"Active (",this.getActiveCount(),")"),o.jsx("button",{class:`filter-btn ${this.filter==="completed"?"active":""}`,onClick:()=>this.filter="completed","data-wsx-key":"TodoListLight-button-text-5-5"},"Completed (",this.getCompletedCount(),")")),o.jsx("div",{class:"todo-list-container"},e.length===0?o.jsx("div",{class:"empty-state"},this.filter==="all"?"No todos yet. Add one above! 🎉":`No ${this.filter} todos.`):o.jsx("ul",{class:"todo-items"},e.map(r=>o.jsx("li",{key:r.id,class:`todo-item ${r.completed?"completed":""}`},o.jsx("input",{type:"checkbox",checked:r.completed,onChange:()=>this.toggleTodo(r.id),class:"todo-checkbox","data-wsx-key":"TodoListLight-input-checkbox-7-1"}),o.jsx("span",{class:"todo-text"},r.text),o.jsx("button",{class:"btn btn-sm btn-danger",onClick:()=>this.removeTodo(r.id),"data-wsx-key":"TodoListLight-button-text-7-5"},"Delete"))))),this.todos.length>0&&o.jsx("div",{class:"todo-actions"},o.jsx("button",{class:"btn btn-warning",onClick:this.clearCompleted,"data-wsx-key":"TodoListLight-button-text-1"},"Clear Completed"),o.jsx("button",{class:"btn btn-danger",onClick:this.clearAll,"data-wsx-key":"TodoListLight-button-text-3"},"Clear All")),o.jsx("div",{class:"debug-info"},o.jsx("details",null,o.jsx("summary",null,"Debug Info"),o.jsx("pre",null,JSON.stringify({todosCount:this.todos.length,filter:this.filter,newTodoText:this._newTodoText,todos:this.todos},null,2)))))}getFilteredTodos(){switch(this.filter){case"active":return this.todos.filter(e=>!e.completed);case"completed":return this.todos.filter(e=>e.completed);default:return this.todos}}getActiveCount(){return this.todos.filter(e=>!e.completed).length}getCompletedCount(){return this.todos.filter(e=>e.completed).length}onConnected(){ie.info("TodoListLight connected to DOM")}onDisconnected(){ie.info("TodoListLight disconnected from DOM")}}pt=Sr;[exports.TodoListLight,mt]=Cr(pt,[],gt,0,void 0,o.LightComponent).c;mt();const Er=".user-profile{padding:1.5rem;max-width:800px;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.profile-header{margin-bottom:2rem;text-align:center}.profile-header h2{margin:0 0 .5rem;color:#333;font-size:1.75rem}.profile-header .subtitle{color:#666;font-size:.9rem;margin:0}.profile-content{display:flex;flex-direction:column;gap:2rem}.profile-section{background:#f8f9fa;padding:1.5rem;border-radius:8px;border:1px solid #e0e0e0}.profile-section h3{margin:0 0 1rem;color:#333;font-size:1.25rem;border-bottom:2px solid #007bff;padding-bottom:.5rem}.form-group{margin-bottom:1rem}.form-group label{display:block;margin-bottom:.5rem;color:#555;font-weight:500;font-size:.9rem}.form-group input[type=checkbox]{margin-right:.5rem}.input-field{width:100%;padding:.75rem;border:1px solid #ddd;border-radius:4px;font-size:1rem;transition:border-color .2s;box-sizing:border-box}.input-field:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff1a}.profile-actions{display:flex;gap:1rem;flex-wrap:wrap}.btn{padding:.75rem 1.5rem;border:none;border-radius:4px;font-size:1rem;cursor:pointer;transition:all .2s;font-weight:500}.btn-primary{background:#007bff;color:#fff}.btn-primary:hover{background:#0056b3}.btn-secondary{background:#6c757d;color:#fff}.btn-secondary:hover{background:#545b62}.btn-warning{background:#ffc107;color:#212529}.btn-warning:hover{background:#e0a800}.profile-display{background:#f8f9fa;padding:1.5rem;border-radius:8px;border:1px solid #e0e0e0}.profile-display h3{margin:0 0 1rem;color:#333;font-size:1.25rem}.json-display{background:#2d2d2d;color:#f8f8f2;padding:1rem;border-radius:4px;overflow-x:auto;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;margin:0;white-space:pre-wrap;word-wrap:break-word}";var yt;let vt,xt;function Y(t,e,r){return(e=jt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _r(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:Se(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||Se(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return zr(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:jt(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function jt(t){var e=Lr(t,"string");return typeof e=="symbol"?e:e+""}function Lr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Se(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 zr(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 te=o.createLogger("UserProfile");xt=[o.autoRegister({tagName:"user-profile"})];exports.UserProfile=void 0;class Ar extends o.WebComponent{constructor(){super(),Y(this,"_autoStyles",Er),Y(this,"profile",void 0),Y(this,"handleNameChange",r=>{const g=r.target;this.profile.name=g.value}),Y(this,"handleNameBlur",()=>{this.profile={...this.profile,name:this.profile.name},te.debug("Name updated",{name:this.profile.name})}),Y(this,"handleEmailChange",r=>{const g=r.target;this.profile.email=g.value}),Y(this,"handleEmailBlur",()=>{this.profile={...this.profile,email:this.profile.email},te.debug("Email updated",{email:this.profile.email})}),Y(this,"handleAgeChange",r=>{const g=r.target;this.profile.age=parseInt(g.value,10)||0}),Y(this,"handleAgeBlur",()=>{this.profile={...this.profile,age:this.profile.age},te.debug("Age updated",{age:this.profile.age})}),Y(this,"handleThemeChange",r=>{const g=r.target;this.profile.preferences.theme=g.value,te.debug("Theme updated",{theme:g.value})}),Y(this,"handleLanguageChange",r=>{const g=r.target;this.profile.preferences.language=g.value,te.debug("Language updated",{language:g.value})}),Y(this,"handleNotificationsChange",r=>{const g=r.target;this.profile.preferences.notifications=g.checked,te.debug("Notifications updated",{notifications:g.checked})}),Y(this,"resetProfile",()=>{this.profile={name:"John Doe",email:"john@example.com",age:30,preferences:{theme:"light",language:"en",notifications:!0},lastLogin:Date.now()},te.debug("Profile reset to default")}),Y(this,"updateLastLogin",()=>{this.profile={...this.profile,lastLogin:Date.now()},te.debug("Last login updated",{lastLogin:this.profile.lastLogin})}),Y(this,"replaceEntireProfile",()=>{this.profile={name:"Jane Smith",email:"jane@example.com",age:25,preferences:{theme:"dark",language:"zh",notifications:!1},lastLogin:Date.now()},te.debug("Entire profile replaced")}),te.info("UserProfile initialized");let e=this.reactive({name:"John Doe",email:"john@example.com",age:30,preferences:{theme:"light",language:"en",notifications:!0},lastLogin:Date.now()});Object.defineProperty(this,"profile",{get:()=>e,set:r=>{e=r!==null&&typeof r<"u"&&(Array.isArray(r)||typeof r=="object")?this.reactive(r):r,this.scheduleRerender()},enumerable:!0,configurable:!0})}render(){return o.jsx("div",{class:"user-profile"},o.jsx("div",{class:"profile-header"},o.jsx("h2",null,"👤 User Profile (WebComponent)"),o.jsx("p",{class:"subtitle"},"Demonstrates @state decorator with objects")),o.jsx("div",{class:"profile-content"},o.jsx("div",{class:"profile-section"},o.jsx("h3",null,"Basic Information"),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Name:"),o.jsx("input",{type:"text",value:this.profile.name,onInput:this.handleNameChange,onBlur:this.handleNameBlur,class:"input-field","data-wsx-key":"UserProfile-input-text-3-1-3-3"})),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Email:"),o.jsx("input",{type:"email",value:this.profile.email,onInput:this.handleEmailChange,onBlur:this.handleEmailBlur,class:"input-field","data-wsx-key":"UserProfile-input-email-3-1-5-3"})),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Age:"),o.jsx("input",{type:"number",value:this.profile.age.toString(),onInput:this.handleAgeChange,onBlur:this.handleAgeBlur,class:"input-field","data-wsx-key":"UserProfile-input-number-3-1-7-3"}))),o.jsx("div",{class:"profile-section"},o.jsx("h3",null,"Preferences"),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Theme:"),o.jsx("select",{value:this.profile.preferences.theme,onChange:this.handleThemeChange,class:"input-field","data-wsx-key":"UserProfile-select-text-3-3-3-3"},o.jsx("option",{value:"light"},"Light"),o.jsx("option",{value:"dark"},"Dark"))),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Language:"),o.jsx("select",{value:this.profile.preferences.language,onChange:this.handleLanguageChange,class:"input-field","data-wsx-key":"UserProfile-select-text-3-3-5-3"},o.jsx("option",{value:"en"},"English"),o.jsx("option",{value:"zh"},"中文"),o.jsx("option",{value:"es"},"Español"),o.jsx("option",{value:"fr"},"Français"))),o.jsx("div",{class:"form-group"},o.jsx("label",null,o.jsx("input",{type:"checkbox",checked:this.profile.preferences.notifications,onChange:this.handleNotificationsChange,"data-wsx-key":"UserProfile-input-checkbox-3-3-7-1-1"}),"Enable Notifications"))),o.jsx("div",{class:"profile-actions"},o.jsx("button",{class:"btn btn-primary",onClick:this.resetProfile,"data-wsx-key":"UserProfile-button-text-3-5-1"},"Reset to Default"),o.jsx("button",{class:"btn btn-secondary",onClick:this.updateLastLogin,"data-wsx-key":"UserProfile-button-text-3-5-3"},"Update Last Login"),o.jsx("button",{class:"btn btn-warning",onClick:this.replaceEntireProfile,"data-wsx-key":"UserProfile-button-text-3-5-5"},"Replace Entire Profile")),o.jsx("div",{class:"profile-display"},o.jsx("h3",null,"Current Profile Data"),o.jsx("pre",{class:"json-display"},JSON.stringify(this.profile,null,2)))))}}yt=Ar;[exports.UserProfile,vt]=_r(yt,[],xt,0,void 0,o.WebComponent).c;vt();const Dr=".user-profile{padding:1.5rem;max-width:800px;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.profile-header{margin-bottom:2rem;text-align:center}.profile-header h2{margin:0 0 .5rem;color:#333;font-size:1.75rem}.profile-header .subtitle{color:#666;font-size:.9rem;margin:0}.profile-content{display:flex;flex-direction:column;gap:2rem}.profile-section{background:#f8f9fa;padding:1.5rem;border-radius:8px;border:1px solid #e0e0e0}.profile-section h3{margin:0 0 1rem;color:#333;font-size:1.25rem;border-bottom:2px solid #007bff;padding-bottom:.5rem}.form-group{margin-bottom:1rem}.form-group label{display:block;margin-bottom:.5rem;color:#555;font-weight:500;font-size:.9rem}.form-group input[type=checkbox]{margin-right:.5rem}.input-field{width:100%;padding:.75rem;border:1px solid #ddd;border-radius:4px;font-size:1rem;transition:border-color .2s;box-sizing:border-box}.input-field:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff1a}.profile-actions{display:flex;gap:1rem;flex-wrap:wrap}.btn{padding:.75rem 1.5rem;border:none;border-radius:4px;font-size:1rem;cursor:pointer;transition:all .2s;font-weight:500}.btn-primary{background:#007bff;color:#fff}.btn-primary:hover{background:#0056b3}.btn-secondary{background:#6c757d;color:#fff}.btn-secondary:hover{background:#545b62}.btn-warning{background:#ffc107;color:#212529}.btn-warning:hover{background:#e0a800}.profile-display{background:#f8f9fa;padding:1.5rem;border-radius:8px;border:1px solid #e0e0e0}.profile-display h3{margin:0 0 1rem;color:#333;font-size:1.25rem}.json-display{background:#2d2d2d;color:#f8f8f2;padding:1rem;border-radius:4px;overflow-x:auto;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;margin:0;white-space:pre-wrap;word-wrap:break-word}";var kt;let Ct,wt;function Q(t,e,r){return(e=Tt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $r(t,e,r,g,T,L){function w(i,l,u){return function(s,a){return u&&u(s),i[l].call(s,a)}}function B(i,l){for(var u=0;u<i.length;u++)i[u].call(l);return l}function S(i,l,u,s){if(typeof i!="function"&&(s||i!==void 0))throw new TypeError(l+" must "+(u||"be")+" a function"+(s?"":" or undefined"));return i}function M(i,l,u,s,a,z,A,E,O,y,b,f,p){function v(c){if(!p(c))throw new TypeError("Attempted to access private element on non-instance")}var d,x=l[0],j=l[3],_=!E;if(!_){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(b||f?n={get:Ee(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,b||Ee(n[m],s,a===2?"":m)):b||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,P=x.length-1;P>=0;P-=u?2:1){var H=x[P],F=u?x[P-1]:void 0,K={},D={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:z,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");S(C,"An initializer","be",!0),A.push(C)}).bind(null,K)};try{if(_)(d=S(H.call(F,h,D),"class decorators","return"))&&(h=d);else{var $,I;D.static=O,D.private=y,y?a===2?$=function(c){return v(c),n.value}:(a<4&&($=w(n,"get",v)),a!==3&&(I=w(n,"set",v))):($=function(c){return c[s]},(a<2||a===4)&&(I=function(c,C){c[s]=C}));var J=D.access={has:y?p.bind():function(c){return s in c}};if($&&(J.get=$),I&&(J.set=I),h=H.call(F,f?{get:n.get,set:n.set}:n[m],D),f){if(typeof h=="object"&&h)(d=S(h.get,"accessor.get"))&&(n.get=d),(d=S(h.set,"accessor.set"))&&(n.set=d),(d=S(h.init,"accessor.init"))&&k.push(d);else if(h!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else S(h,(b?"field":"method")+" decorators","return")&&(b?k.push(h):n[m]=h)}}finally{K.v=!0}}return(b||f)&&E.push(function(c,C){for(var N=k.length-1;N>=0;N--)C=k[N].call(c,C);return C}),b||_||(y?f?E.push(w(n,"get"),w(n,"set")):E.push(a===2?n[m]:w.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function U(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=L[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(W??null),G=function(i,l,u,s){var a,z,A=[],E=function(m){return Or(m)===i},O=new Map;function y(m){m&&A.push(B.bind(null,m))}for(var b=0;b<l.length;b++){var f=l[b];if(Array.isArray(f)){var p=f[1],v=f[2],d=f.length>3,x=16&p,j=!!(8&p),_=(p&=7)==0,n=v+"/"+j;if(!_&&!d){var k=O.get(n);if(k===!0||k===3&&p!==4||k===4&&p!==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: "+v);O.set(n,!(p>2)||p)}M(j?i:i.prototype,f,x,d?"#"+v:Tt(v),p,s,j?z=z||[]:a=a||[],A,j,d,_,p===1,j&&d?E:u)}}return y(a),y(z),A}(t,e,T,R);return r.length||U(t,R),{e:G,get c(){var i=[];return r.length&&[U(M(t,[r],g,t.name,5,R,i),R),B.bind(null,i,t)]}}}function Tt(t){var e=Rr(t,"string");return typeof e=="symbol"?e:e+""}function Rr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var g=r.call(t,e);if(typeof g!="object")return g;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 Or(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=o.createLogger("UserProfileLight");wt=[o.autoRegister({tagName:"user-profile-light"})];exports.UserProfileLight=void 0;class Pr extends o.LightComponent{constructor(){super(),Q(this,"_autoStyles",Dr),Q(this,"profile",void 0),Q(this,"handleNameChange",r=>{const g=r.target;this.profile.name=g.value}),Q(this,"handleNameBlur",()=>{this.profile={...this.profile,name:this.profile.name},re.debug("Name updated",{name:this.profile.name})}),Q(this,"handleEmailChange",r=>{const g=r.target;this.profile.email=g.value}),Q(this,"handleEmailBlur",()=>{this.profile={...this.profile,email:this.profile.email},re.debug("Email updated",{email:this.profile.email})}),Q(this,"handleAgeChange",r=>{const g=r.target;this.profile.age=parseInt(g.value,10)||0}),Q(this,"handleAgeBlur",()=>{this.profile={...this.profile,age:this.profile.age},re.debug("Age updated",{age:this.profile.age})}),Q(this,"handleThemeChange",r=>{const g=r.target;this.profile.preferences.theme=g.value,re.debug("Theme updated",{theme:g.value})}),Q(this,"handleLanguageChange",r=>{const g=r.target;this.profile.preferences.language=g.value,re.debug("Language updated",{language:g.value})}),Q(this,"handleNotificationsChange",r=>{const g=r.target;this.profile.preferences.notifications=g.checked,re.debug("Notifications updated",{notifications:g.checked})}),Q(this,"resetProfile",()=>{this.profile={name:"John Doe",email:"john@example.com",age:30,preferences:{theme:"light",language:"en",notifications:!0},lastLogin:Date.now()},this._name="John Doe",this._email="john@example.com",this._age=30,re.debug("Profile reset to default")}),Q(this,"updateLastLogin",()=>{this.profile={...this.profile,lastLogin:Date.now()},re.debug("Last login updated",{lastLogin:this.profile.lastLogin})}),Q(this,"replaceEntireProfile",()=>{this.profile={name:"Jane Smith",email:"jane@example.com",age:25,preferences:{theme:"dark",language:"zh",notifications:!1},lastLogin:Date.now()},this._name="Jane Smith",this._email="jane@example.com",this._age=25,re.debug("Entire profile replaced")}),re.info("UserProfileLight initialized");let e=this.reactive({name:"John Doe",email:"john@example.com",age:30,preferences:{theme:"light",language:"en",notifications:!0},lastLogin:Date.now()});Object.defineProperty(this,"profile",{get:()=>e,set:r=>{e=r!==null&&typeof r<"u"&&(Array.isArray(r)||typeof r=="object")?this.reactive(r):r,this.scheduleRerender()},enumerable:!0,configurable:!0})}render(){return o.jsx("div",{class:"user-profile"},o.jsx("div",{class:"profile-header"},o.jsx("h2",null,"👤 User Profile (LightComponent)"),o.jsx("p",{class:"subtitle"},"Demonstrates @state decorator with objects")),o.jsx("div",{class:"profile-content"},o.jsx("div",{class:"profile-section"},o.jsx("h3",null,"Basic Information"),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Name:"),o.jsx("input",{type:"text",value:this.profile.name,onInput:this.handleNameChange,onBlur:this.handleNameBlur,class:"input-field","data-wsx-key":"UserProfileLight-input-text-3-1-3-3"})),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Email:"),o.jsx("input",{type:"email",value:this.profile.email,onInput:this.handleEmailChange,onBlur:this.handleEmailBlur,class:"input-field","data-wsx-key":"UserProfileLight-input-email-3-1-5-3"})),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Age:"),o.jsx("input",{type:"number",value:this.profile.age.toString(),onInput:this.handleAgeChange,onBlur:this.handleAgeBlur,class:"input-field","data-wsx-key":"UserProfileLight-input-number-3-1-7-3"}))),o.jsx("div",{class:"profile-section"},o.jsx("h3",null,"Preferences"),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Theme:"),o.jsx("select",{value:this.profile.preferences.theme,onChange:this.handleThemeChange,class:"input-field","data-wsx-key":"UserProfileLight-select-text-3-3-3-3"},o.jsx("option",{value:"light"},"Light"),o.jsx("option",{value:"dark"},"Dark"))),o.jsx("div",{class:"form-group"},o.jsx("label",null,"Language:"),o.jsx("select",{value:this.profile.preferences.language,onChange:this.handleLanguageChange,class:"input-field","data-wsx-key":"UserProfileLight-select-text-3-3-5-3"},o.jsx("option",{value:"en"},"English"),o.jsx("option",{value:"zh"},"中文"),o.jsx("option",{value:"es"},"Español"),o.jsx("option",{value:"fr"},"Français"))),o.jsx("div",{class:"form-group"},o.jsx("label",null,o.jsx("input",{type:"checkbox",checked:this.profile.preferences.notifications,onChange:this.handleNotificationsChange,"data-wsx-key":"UserProfileLight-input-checkbox-3-3-7-1-1"}),"Enable Notifications"))),o.jsx("div",{class:"profile-actions"},o.jsx("button",{class:"btn btn-primary",onClick:this.resetProfile,"data-wsx-key":"UserProfileLight-button-text-3-5-1"},"Reset to Default"),o.jsx("button",{class:"btn btn-secondary",onClick:this.updateLastLogin,"data-wsx-key":"UserProfileLight-button-text-3-5-3"},"Update Last Login"),o.jsx("button",{class:"btn btn-warning",onClick:this.replaceEntireProfile,"data-wsx-key":"UserProfileLight-button-text-3-5-5"},"Replace Entire Profile")),o.jsx("div",{class:"profile-display"},o.jsx("h3",null,"Current Profile Data"),o.jsx("pre",{class:"json-display"},JSON.stringify(this.profile,null,2)))))}}kt=Pr;[exports.UserProfileLight,Ct]=$r(kt,[],wt,0,void 0,o.LightComponent).c;Ct();exports.CONVERTER_BTN=Mt;exports.CONVERTER_PANEL=Ut;exports.getCustomColorCache=Be;exports.getDefaultColorCache=Nt;exports.handleCSSVariables=ae;exports.setCustomColorCache=Ie;exports.setDefaultColorCache=Pe;exports.throttle=Ne;