@wsxjs/wsx-base-components 0.0.12 → 0.0.14

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.
Files changed (3) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.js +1051 -1117
  3. package/package.json +4 -4
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
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=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@wsxjs/wsx-core"),Ot=':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=De(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pt(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:me(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||me(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return Nt(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:De(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function De(t){var e=Bt(t,"string");return typeof e=="symbol"?e:e+""}function Bt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var b=r.call(t,e);if(typeof b!="object")return b;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 Nt(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 Mt 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",Ot),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 b=this.getBoundingClientRect(),P=r.clientX-b.left,U=r.clientY-b.top;this.style.setProperty("--x",`${P}px`),this.style.setProperty("--y",`${U}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:P=>{this.btnElement=P}},this.renderContent()),b=o.jsx("button",{type:this.type||"button",disabled:this.disabled,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:P=>{this.btnElement=P},"data-wsx-key":"XyButton-button-text-0"},this.renderContent());return o.jsx("div",{className:"xy-button-container"},e?r:b)}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,b){switch(e){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 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=Mt;[exports.XyButton,Le]=Pt(_e,[],ze,0,void 0,o.WebComponent).c;Le();const Ut=':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 $e;let Ae,Ie;function ge(t,e,r){return(e=Re(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wt(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:be(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||be(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return Ft(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:Re(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function Re(t){var e=Ht(t,"string");return typeof e=="symbol"?e:e+""}function Ht(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var b=r.call(t,e);if(typeof b!="object")return b;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 Ft(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}Ie=[o.autoRegister({tagName:"xy-button-group"})];exports.XyButtonGroup=void 0;class Kt extends o.WebComponent{static get observedAttributes(){return["disabled"]}constructor(e={}){super({styleName:"xy-button-group",...e}),ge(this,"_autoStyles",Ut),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,b){switch(e){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(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","")})}}$e=Kt;[exports.XyButtonGroup,Ae]=Wt($e,[],Ie,0,void 0,o.WebComponent).c;Ae();const ce="editor-js-text-color-cache";function Jt(t){return t.startsWith("var(")&&t.endsWith(")")}function Gt(t){return t.slice(4,-1).trim()}function qt(t){return getComputedStyle(document.documentElement).getPropertyValue(t).trim()||t}function ae(t){if(Jt(t)){const e=Gt(t);return qt(e)}return t}function Oe(t,e){return sessionStorage.setItem(`${ce}-${e}`,JSON.stringify(t)),t}function Pe(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(...b)=>{r||(r=setTimeout(()=>{t(...b),r=null},e))}}function Xt(t,e){const r=sessionStorage.getItem(`${ce}-${e}`);return r?JSON.parse(r):t}const Yt="ce-inline-toolbar__dropdown",Vt="ce-conversion-toolbar--showed",Qt='.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 Zt(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:ye(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||ye(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return tr(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:He(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function He(t){var e=er(t,"string");return typeof e=="symbol"?e:e+""}function er(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var b=r.call(t,e);if(typeof b!="object")return b;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 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 se=o.createLogger("ColorPicker"),rr=["#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 or extends o.WebComponent{static get observedAttributes(){return["disabled","selected-color","open"]}constructor(e={}){super({styleName:"base-color-picker",...e}),X(this,"_autoStyles",Qt),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 P;const b=ae(r);this.setSelectedColor(b),this.closePanel(),Oe(b,this.pluginType),(P=this.onColorPicked)==null||P.call(this,b),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:b},bubbles:!0,composed:!0})),se.debug("Color selected",{color:b})}),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 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;
6
+ `;const b=Ne(P=>{var B;const U=P.target,E=ae(U.value);this.setSelectedColor(E),this.setCustomColor(E),document.body.removeChild(r),(B=this.onColorPicked)==null||B.call(this,E),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:E},bubbles:!0,composed:!0})),se.debug("Custom color selected",{color:E})},30);r.addEventListener("input",b),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||rr,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,Pe(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,b){switch(e){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(e){this.setSelectedColor(ae(e))}focus(){var e;(e=this.colorBtn)==null||e.focus()}}Me=or;[exports.ColorPicker,Ue]=Zt(Me,[],We,0,void 0,o.WebComponent).c;Ue();const ir=".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,Ge,qe,Xe;function Q(t,e,r){return(e=Ye(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nr(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:ve(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||ve(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return ar(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:Ye(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function Ye(t){var e=sr(t,"string");return typeof e=="symbol"?e:e+""}function sr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var b=r.call(t,e);if(typeof b!="object")return b;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 ar(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 lr extends o.WebComponent{constructor(){super(),Q(this,"_autoStyles",ir),Q(this,"state",Ge(this,{count:0,step:1,message:"Hello WSX Reactive!",isRunning:!1})),Q(this,"theme",qe(this,"light")),Q(this,"history",Xe(this,[])),Q(this,"increment",()=>{this.state.count+=this.state.step,this.addToHistory(this.state.count)}),Q(this,"decrement",()=>{this.state.count-=this.state.step,this.addToHistory(this.state.count)}),Q(this,"reset",()=>{this.state.count=0,this.addToHistory(0)}),Q(this,"handleStepChange",e=>{const r=e.target;this.state.step=parseInt(r.value)}),Q(this,"handleThemeChange",e=>{const r=e.target;this.theme=r.value}),Q(this,"handleMessageChange",e=>{const r=e.target;this.state.message=r.value}),Q(this,"toggleAutoIncrement",()=>{this.state.isRunning=!this.state.isRunning,this.state.isRunning&&this.startAutoIncrement()}),Q(this,"clearHistory",()=>{this.history=[]}),ue.info("ReactiveCounter initialized")}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=lr;({e:[Ge,qe,Xe],c:[exports.ReactiveCounter,Ke]}=nr(Fe,[[o.state,0,"state"],[o.state,0,"theme"],[o.state,0,"history"]],Je,0,void 0,o.WebComponent));Ke();const cr=":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 Ve;let Qe,Ze;function de(t,e,r){return(e=et(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ur(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:xe(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||xe(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return hr(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:et(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function et(t){var e=dr(t,"string");return typeof e=="symbol"?e:e+""}function dr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var b=r.call(t,e);if(typeof b!="object")return b;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 hr(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:"theme-switcher"})];exports.ThemeSwitcher=void 0;class fr extends o.WebComponent{constructor(){super({styleName:"theme-switcher"}),de(this,"_autoStyles",cr),de(this,"currentTheme","auto"),de(this,"toggleTheme",()=>{const e=["auto","light","dark"],b=(e.indexOf(this.currentTheme)+1)%e.length;this.setTheme(e[b])}),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":"")})}}Ve=fr;[exports.ThemeSwitcher,Qe]=ur(Ve,[],Ze,0,void 0,o.WebComponent).c;Qe();var tt;let rt,ot;function he(t,e,r){return(e=it(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pr(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:je(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||je(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return gr(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:it(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function it(t){var e=mr(t,"string");return typeof e=="symbol"?e:e+""}function mr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var b=r.call(t,e);if(typeof b!="object")return b;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 gr(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");ot=[o.autoRegister({tagName:"svg-icon"})];exports.SvgIcon=void 0;class br 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",b=this.getAttribute("name")||"star",P={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"},U=P[b]||P.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:U,fill:r}))}static get observedAttributes(){return["name","size","color"]}onAttributeChanged(e,r,b){fe.debug(`Attribute ${e} changed from ${r} to ${b}`),this.connected&&this.rerender()}}tt=br;[exports.SvgIcon,rt]=pr(tt,[],ot,0,void 0,o.WebComponent).c;rt();var nt;let st,at;function ne(t,e,r){return(e=lt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yr(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:ke(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||ke(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return xr(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:lt(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function lt(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 b=r.call(t,e);if(typeof b!="object")return b;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 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 le=o.createLogger("SvgDemo");at=[o.autoRegister({tagName:"svg-demo"})];exports.SvgDemo=void 0;class jr 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),b=30,P=40,U=120,E=e.length*P+40;return o.jsx("svg",{width:E,height:U+40,style:"border: 1px solid #ddd; background: white;"},e.map((B,w)=>{const N=B/r*U,M=w*P+20,W=U-N+20;return o.jsx("g",{key:w},o.jsx("rect",{x:M,y:W,width:b,height:N,fill:"#3498db",stroke:"#2980b9",strokeWidth:"1",onMouseEnter:$=>this.showTooltip($,B),onMouseLeave:this.hideTooltip,style:"cursor: pointer; transition: fill 0.2s;"}),o.jsx("text",{x:M+b/2,y:U+35,textAnchor:"middle",fontSize:"12",fill:"#666"},w+1))}))}onConnected(){le.info("SvgDemo connected to DOM")}onDisconnected(){le.info("SvgDemo disconnected from DOM"),this.stopAnimation()}}nt=jr;[exports.SvgDemo,st]=yr(nt,[],at,0,void 0,o.WebComponent).c;st();var ct;let ut,dt,ht;function pe(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 kr(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:Ce(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||Ce(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return wr(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:ft(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function ft(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 b=r.call(t,e);if(typeof b!="object")return b;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 wr(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 Tr=o.createLogger("SimpleReactiveDemo");dt=[o.autoRegister({tagName:"simple-reactive-demo"})];exports.SimpleReactiveDemo=void 0;class Sr extends o.WebComponent{constructor(){super(),pe(this,"state",ht(this,{count:0,message:"Click the button!"})),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!"}),Tr.info("SimpleReactiveDemo initialized")}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!"))}}ct=Sr;({e:[ht],c:[exports.SimpleReactiveDemo,ut]}=kr(ct,[[o.state,0,"state"]],dt,0,void 0,o.WebComponent));ut();const Er=".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 pt;let mt,gt,bt,yt;function Z(t,e,r){return(e=vt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _r(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:we(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||we(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return zr(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:vt(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function vt(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 b=r.call(t,e);if(typeof b!="object")return b;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 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 oe=o.createLogger("TodoList");gt=[o.autoRegister({tagName:"todo-list"})];exports.TodoList=void 0;class Dr extends o.WebComponent{constructor(){super(),Z(this,"_autoStyles",Er),Z(this,"todos",bt(this,[])),Z(this,"_newTodoText",""),Z(this,"filter",yt(this,"all")),Z(this,"nextId",1),Z(this,"handleInputChange",e=>{var P;const r=e.target;this._newTodoText=r.value;const b=(P=this.shadowRoot)==null?void 0:P.querySelector(".todo-input-section .btn-primary");b&&(b.disabled=!this._newTodoText.trim())}),Z(this,"handleKeyDown",e=>{e.key==="Enter"&&this._newTodoText.trim()&&this.addTodo()}),Z(this,"addTodo",()=>{var b,P;const e=(b=this.shadowRoot)==null?void 0:b.querySelector(".todo-input"),r=(e==null?void 0:e.value.trim())||this._newTodoText.trim();if(r){if(this.todos=[...this.todos,{id:this.nextId++,text:r,completed:!1,createdAt:Date.now()}],this._newTodoText="",e){e.value="";const U=(P=this.shadowRoot)==null?void 0:P.querySelector(".todo-input-section .btn-primary");U&&(U.disabled=!0)}oe.debug("Todo added",{count:this.todos.length})}}),Z(this,"removeTodo",e=>{this.todos=this.todos.filter(r=>r.id!==e),oe.debug("Todo removed",{id:e,remaining:this.todos.length})}),Z(this,"toggleTodo",e=>{this.todos=this.todos.map(r=>r.id===e?{...r,completed:!r.completed}:r),oe.debug("Todo toggled",{id:e})}),Z(this,"clearCompleted",()=>{this.todos=this.todos.filter(e=>!e.completed),oe.debug("Completed todos cleared")}),Z(this,"clearAll",()=>{this.todos=[],oe.debug("All todos cleared")}),oe.info("TodoList initialized")}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")}}pt=Dr;({e:[bt,yt],c:[exports.TodoList,mt]}=_r(pt,[[o.state,0,"todos"],[o.state,0,"filter"]],gt,0,void 0,o.WebComponent));mt();const $r=".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 xt;let jt,kt,Ct,wt;function ee(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 Ar(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:Te(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||Te(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return Rr(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:Tt(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function Tt(t){var e=Ir(t,"string");return typeof e=="symbol"?e:e+""}function Ir(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var b=r.call(t,e);if(typeof b!="object")return b;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 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}const ie=o.createLogger("TodoListLight");kt=[o.autoRegister({tagName:"todo-list-light"})];exports.TodoListLight=void 0;class Or extends o.LightComponent{constructor(){super(),ee(this,"_autoStyles",$r),ee(this,"todos",Ct(this,[])),ee(this,"_newTodoText",""),ee(this,"filter",wt(this,"all")),ee(this,"nextId",1),ee(this,"handleInputChange",e=>{const r=e.target;this._newTodoText=r.value;const b=this.querySelector(".todo-input-section .btn-primary");b&&(b.disabled=!this._newTodoText.trim())}),ee(this,"handleKeyDown",e=>{e.key==="Enter"&&this._newTodoText.trim()&&this.addTodo()}),ee(this,"addTodo",()=>{const e=this.querySelector(".todo-input"),r=(e==null?void 0:e.value.trim())||this._newTodoText.trim();if(r){if(this.todos=[...this.todos,{id:this.nextId++,text:r,completed:!1,createdAt:Date.now()}],this._newTodoText="",e){e.value="";const b=this.querySelector(".todo-input-section .btn-primary");b&&(b.disabled=!0)}ie.debug("Todo added",{count:this.todos.length})}}),ee(this,"removeTodo",e=>{this.todos=this.todos.filter(r=>r.id!==e),ie.debug("Todo removed",{id:e,remaining:this.todos.length})}),ee(this,"toggleTodo",e=>{this.todos=this.todos.map(r=>r.id===e?{...r,completed:!r.completed}:r),ie.debug("Todo toggled",{id:e})}),ee(this,"clearCompleted",()=>{this.todos=this.todos.filter(e=>!e.completed),ie.debug("Completed todos cleared")}),ee(this,"clearAll",()=>{this.todos=[],ie.debug("All todos cleared")}),ie.info("TodoListLight initialized")}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")}}xt=Or;({e:[Ct,wt],c:[exports.TodoListLight,jt]}=Ar(xt,[[o.state,0,"todos"],[o.state,0,"filter"]],kt,0,void 0,o.LightComponent));jt();const Pr=".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 St;let Et,_t,Lt;function Y(t,e,r){return(e=zt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Br(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:Se(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||Se(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return Mr(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:zt(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function zt(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 b=r.call(t,e);if(typeof b!="object")return b;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 Mr(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");_t=[o.autoRegister({tagName:"user-profile"})];exports.UserProfile=void 0;class Ur extends o.WebComponent{constructor(){super(),Y(this,"_autoStyles",Pr),Y(this,"profile",Lt(this,{name:"John Doe",email:"john@example.com",age:30,preferences:{theme:"light",language:"en",notifications:!0},lastLogin:Date.now()})),Y(this,"handleNameChange",e=>{const r=e.target;this.profile.name=r.value}),Y(this,"handleNameBlur",()=>{this.profile={...this.profile,name:this.profile.name},te.debug("Name updated",{name:this.profile.name})}),Y(this,"handleEmailChange",e=>{const r=e.target;this.profile.email=r.value}),Y(this,"handleEmailBlur",()=>{this.profile={...this.profile,email:this.profile.email},te.debug("Email updated",{email:this.profile.email})}),Y(this,"handleAgeChange",e=>{const r=e.target;this.profile.age=parseInt(r.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",e=>{const r=e.target;this.profile.preferences.theme=r.value,te.debug("Theme updated",{theme:r.value})}),Y(this,"handleLanguageChange",e=>{const r=e.target;this.profile.preferences.language=r.value,te.debug("Language updated",{language:r.value})}),Y(this,"handleNotificationsChange",e=>{const r=e.target;this.profile.preferences.notifications=r.checked,te.debug("Notifications updated",{notifications:r.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")}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)))))}}St=Ur;({e:[Lt],c:[exports.UserProfile,Et]}=Br(St,[[o.state,0,"profile"]],_t,0,void 0,o.WebComponent));Et();const Wr=".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 Dt;let $t,At,It;function V(t,e,r){return(e=Rt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hr(t,e,r,b,P,U){function E(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 w(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 N(i,l,u,s,a,_,L,T,A,y,g,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],S=!T;if(!S){u||Array.isArray(x)||(x=[x]);var n={},k=[],m=a===3?"get":a===4||f?"set":"value";y?(g||f?n={get:Ee(function(){return j(this)},s,"get"),set:function(c){l[4](this,c)}}:n[m]=j,g||Ee(n[m],s,a===2?"":m)):g||(n=Object.getOwnPropertyDescriptor(i,s))}for(var h=i,I=x.length-1;I>=0;I-=u?2:1){var H=x[I],F=u?x[I-1]:void 0,K={},z={kind:["field","accessor","method","getter","setter","class"][a],name:s,metadata:_,addInitializer:(function(c,C){if(c.v)throw Error("attempted to call addInitializer after decoration was finished");w(C,"An initializer","be",!0),L.push(C)}).bind(null,K)};try{if(S)(d=w(H.call(F,h,z),"class decorators","return"))&&(h=d);else{var D,R;z.static=A,z.private=y,y?a===2?D=function(c){return v(c),n.value}:(a<4&&(D=E(n,"get",v)),a!==3&&(R=E(n,"set",v))):(D=function(c){return c[s]},(a<2||a===4)&&(R=function(c,C){c[s]=C}));var J=z.access={has:y?p.bind():function(c){return s in c}};if(D&&(J.get=D),R&&(J.set=R),h=H.call(F,f?{get:n.get,set:n.set}:n[m],z),f){if(typeof h=="object"&&h)(d=w(h.get,"accessor.get"))&&(n.get=d),(d=w(h.set,"accessor.set"))&&(n.set=d),(d=w(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 w(h,(g?"field":"method")+" decorators","return")&&(g?k.push(h):n[m]=h)}}finally{K.v=!0}}return(g||f)&&T.push(function(c,C){for(var O=k.length-1;O>=0;O--)C=k[O].call(c,C);return C}),g||S||(y?f?T.push(E(n,"get"),E(n,"set")):T.push(a===2?n[m]:E.call.bind(n[m])):Object.defineProperty(i,s,n)),h}function M(i,l){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:l})}if(arguments.length>=6)var W=U[Symbol.metadata||Symbol.for("Symbol.metadata")];var $=Object.create(W??null),G=function(i,l,u,s){var a,_,L=[],T=function(m){return Kr(m)===i},A=new Map;function y(m){m&&L.push(B.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],d=f.length>3,x=16&p,j=!!(8&p),S=(p&=7)==0,n=v+"/"+j;if(!S&&!d){var k=A.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);A.set(n,!(p>2)||p)}N(j?i:i.prototype,f,x,d?"#"+v:Rt(v),p,s,j?_=_||[]:a=a||[],L,j,d,S,p===1,j&&d?T:u)}}return y(a),y(_),L}(t,e,P,$);return r.length||M(t,$),{e:G,get c(){var i=[];return r.length&&[M(N(t,[r],b,t.name,5,$,i),$),B.bind(null,i,t)]}}}function Rt(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 b=r.call(t,e);if(typeof b!="object")return b;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 Kr(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");At=[o.autoRegister({tagName:"user-profile-light"})];exports.UserProfileLight=void 0;class Jr extends o.LightComponent{constructor(){super(),V(this,"_autoStyles",Wr),V(this,"profile",It(this,{name:"John Doe",email:"john@example.com",age:30,preferences:{theme:"light",language:"en",notifications:!0},lastLogin:Date.now()})),V(this,"handleNameChange",e=>{const r=e.target;this.profile.name=r.value}),V(this,"handleNameBlur",()=>{this.profile={...this.profile,name:this.profile.name},re.debug("Name updated",{name:this.profile.name})}),V(this,"handleEmailChange",e=>{const r=e.target;this.profile.email=r.value}),V(this,"handleEmailBlur",()=>{this.profile={...this.profile,email:this.profile.email},re.debug("Email updated",{email:this.profile.email})}),V(this,"handleAgeChange",e=>{const r=e.target;this.profile.age=parseInt(r.value,10)||0}),V(this,"handleAgeBlur",()=>{this.profile={...this.profile,age:this.profile.age},re.debug("Age updated",{age:this.profile.age})}),V(this,"handleThemeChange",e=>{const r=e.target;this.profile.preferences.theme=r.value,re.debug("Theme updated",{theme:r.value})}),V(this,"handleLanguageChange",e=>{const r=e.target;this.profile.preferences.language=r.value,re.debug("Language updated",{language:r.value})}),V(this,"handleNotificationsChange",e=>{const r=e.target;this.profile.preferences.notifications=r.checked,re.debug("Notifications updated",{notifications:r.checked})}),V(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")}),V(this,"updateLastLogin",()=>{this.profile={...this.profile,lastLogin:Date.now()},re.debug("Last login updated",{lastLogin:this.profile.lastLogin})}),V(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")}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)))))}}Dt=Jr;({e:[It],c:[exports.UserProfileLight,$t]}=Hr(Dt,[[o.state,0,"profile"]],At,0,void 0,o.LightComponent));$t();exports.CONVERTER_BTN=Yt;exports.CONVERTER_PANEL=Vt;exports.getCustomColorCache=Be;exports.getDefaultColorCache=Xt;exports.handleCSSVariables=ae;exports.setCustomColorCache=Pe;exports.setDefaultColorCache=Oe;exports.throttle=Ne;