@wsxjs/wsx-base-components 0.0.16 → 0.0.18

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 (42) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +28 -28
  3. package/dist/index.cjs +14 -2
  4. package/dist/index.js +4971 -2032
  5. package/dist/style.css +1 -1
  6. package/package.json +16 -7
  7. package/src/{XyButton.css → Button.css} +1 -1
  8. package/src/{XyButton.wsx → Button.wsx} +18 -9
  9. package/src/ButtonGroup.css +30 -0
  10. package/src/{XyButtonGroup.wsx → ButtonGroup.wsx} +26 -14
  11. package/src/CodeBlock.css +275 -0
  12. package/src/CodeBlock.types.ts +25 -0
  13. package/src/CodeBlock.wsx +296 -0
  14. package/src/ColorPicker.wsx +6 -5
  15. package/src/Combobox.css +254 -0
  16. package/src/Combobox.types.ts +32 -0
  17. package/src/Combobox.wsx +352 -0
  18. package/src/Dropdown.css +178 -0
  19. package/src/Dropdown.types.ts +28 -0
  20. package/src/Dropdown.wsx +221 -0
  21. package/src/LanguageSwitcher.css +148 -0
  22. package/src/LanguageSwitcher.wsx +190 -0
  23. package/src/OverflowDetector.ts +169 -0
  24. package/src/ResponsiveNav.css +555 -0
  25. package/src/ResponsiveNav.types.ts +30 -0
  26. package/src/ResponsiveNav.wsx +450 -0
  27. package/src/SvgIcon.wsx +2 -2
  28. package/src/index.ts +17 -9
  29. package/src/types/wsx.d.ts +4 -3
  30. package/src/ReactiveCounter.css +0 -304
  31. package/src/ReactiveCounter.wsx +0 -231
  32. package/src/SimpleReactiveDemo.wsx +0 -59
  33. package/src/SvgDemo.wsx +0 -241
  34. package/src/TodoList.css +0 -197
  35. package/src/TodoList.wsx +0 -264
  36. package/src/TodoListLight.css +0 -198
  37. package/src/TodoListLight.wsx +0 -263
  38. package/src/UserProfile.css +0 -146
  39. package/src/UserProfile.wsx +0 -247
  40. package/src/UserProfileLight.css +0 -146
  41. package/src/UserProfileLight.wsx +0 -256
  42. package/src/XyButtonGroup.css +0 -30
package/dist/index.cjs CHANGED
@@ -1,6 +1,18 @@
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 I=require("@wsxjs/wsx-core"),$t=':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 Ue;let Ge,We;function K(e,t,r){return(t=Ve(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dt(e,t,r,o,f,O){function S(i,s,u){return function(a,n){return u&&u(a),i[s].call(a,n)}}function m(i,s){for(var u=0;u<i.length;u++)i[u].call(s);return s}function h(i,s,u,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(s+" must "+(u||"be")+" a function"+(a?"":" or undefined"));return i}function v(i,s,u,a,n,c,g,p,T,k,y,d,x){function F(b){if(!x(b))throw new TypeError("Attempted to access private element on non-instance")}var A,N=s[0],j=s[3],z=!p;if(!z){u||Array.isArray(N)||(N=[N]);var l={},$=[],C=n===3?"get":n===4||d?"set":"value";k?(y||d?l={get:Ee(function(){return j(this)},a,"get"),set:function(b){s[4](this,b)}}:l[C]=j,y||Ee(l[C],a,n===2?"":C)):y||(l=Object.getOwnPropertyDescriptor(i,a))}for(var E=i,B=N.length-1;B>=0;B-=u?2:1){var W=N[B],G=u?N[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(b,D){if(b.v)throw Error("attempted to call addInitializer after decoration was finished");h(D,"An initializer","be",!0),g.push(D)}).bind(null,Y)};try{if(z)(A=h(W.call(G,E,M),"class decorators","return"))&&(E=A);else{var P,H;M.static=T,M.private=k,k?n===2?P=function(b){return F(b),l.value}:(n<4&&(P=S(l,"get",F)),n!==3&&(H=S(l,"set",F))):(P=function(b){return b[a]},(n<2||n===4)&&(H=function(b,D){b[a]=D}));var V=M.access={has:k?x.bind():function(b){return a in b}};if(P&&(V.get=P),H&&(V.set=H),E=W.call(G,d?{get:l.get,set:l.set}:l[C],M),d){if(typeof E=="object"&&E)(A=h(E.get,"accessor.get"))&&(l.get=A),(A=h(E.set,"accessor.set"))&&(l.set=A),(A=h(E.init,"accessor.init"))&&$.push(A);else if(E!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else h(E,(y?"field":"method")+" decorators","return")&&(y?$.push(E):l[C]=E)}}finally{Y.v=!0}}return(y||d)&&p.push(function(b,D){for(var U=$.length-1;U>=0;U--)D=$[U].call(b,D);return D}),y||z||(k?d?p.push(S(l,"get"),S(l,"set")):p.push(n===2?l[C]:S.call.bind(l[C])):Object.defineProperty(i,a,l)),E}function w(i,s){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:s})}if(arguments.length>=6)var _=O[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(_??null),L=function(i,s,u,a){var n,c,g=[],p=function(C){return Mt(C)===i},T=new Map;function k(C){C&&g.push(m.bind(null,C))}for(var y=0;y<s.length;y++){var d=s[y];if(Array.isArray(d)){var x=d[1],F=d[2],A=d.length>3,N=16&x,j=!!(8&x),z=(x&=7)==0,l=F+"/"+j;if(!z&&!A){var $=T.get(l);if($===!0||$===3&&x!==4||$===4&&x!==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: "+F);T.set(l,!(x>2)||x)}v(j?i:i.prototype,d,N,A?"#"+F:Ve(F),x,a,j?c=c||[]:n=n||[],g,j,A,z,x===1,j&&A?p:u)}}return k(n),k(c),g}(e,t,f,R);return r.length||w(e,R),{e:L,get c(){var i=[];return r.length&&[w(v(e,[r],o,e.name,5,R,i),R),m.bind(null,i,e)]}}}function Ve(e){var t=zt(e,"string");return typeof t=="symbol"?t:t+""}function zt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ee(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Mt(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}We=[I.autoRegister({tagName:"wsx-button"})];exports.Button=void 0;class Pt extends I.WebComponent{static get observedAttributes(){return["disabled","icon","loading","href","type","target","rel","download","toggle","checked","variant","shape","block","size"]}constructor(t={}){super({styleName:"wsx-button",...t}),K(this,"_autoStyles",$t),K(this,"disabled",!1),K(this,"loading",!1),K(this,"toggle",!1),K(this,"checked",!1),K(this,"icon",null),K(this,"href",null),K(this,"type",null),K(this,"target","_blank"),K(this,"rel",null),K(this,"download",null),K(this,"variant","flat"),K(this,"size","md"),K(this,"btnElement",void 0),K(this,"iconElement",void 0),K(this,"loadingElement",void 0),K(this,"handleMouseDown",r=>{if(this.disabled)return;const o=this.getBoundingClientRect(),f=r.clientX-o.left,O=r.clientY-o.top;this.style.setProperty("--x",`${f}px`),this.style.setProperty("--y",`${O}px`)}),K(this,"handleKeyDown",r=>{(r.code==="Enter"||r.code==="Space")&&r.stopPropagation()}),K(this,"handleClick",()=>{this.toggle&&!this.disabled&&(this.checked=!this.checked,this.checked?this.setAttr("checked",""):this.removeAttr("checked"))}),this.disabled=t.disabled||!1,this.loading=t.loading||!1,this.toggle=t.toggle||!1,this.checked=t.checked||!1,this.icon=t.icon||null,this.href=t.href||null,this.type=t.type||null,this.target=t.target||"_blank",this.rel=t.rel||null,this.download=t.download||null,this.variant=t.variant||"flat",this.size=t.size||"md"}render(){const t=!!this.href,r=I.jsx("a",{href:this.disabled||this.loading?void 0:this.href,target:this.target,rel:this.rel||void 0,download:this.download||void 0,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:f=>{this.btnElement=f,f&&setTimeout(()=>this.updateButtonState(),0)}},this.renderContent()),o=I.jsx("button",{type:this.type||"button",disabled:this.disabled,className:"btn",onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown,ref:f=>{this.btnElement=f,f&&setTimeout(()=>this.updateButtonState(),0)},"data-wsx-key":"Button-button-text-0"},this.renderContent());return I.jsx("div",{className:"wsx-button-container"},t?r:o)}renderContent(){const t=[];return this.loading&&t.push(I.jsx("div",{className:"loading",ref:r=>{this.loadingElement=r}},"Loading...")),!this.loading&&this.icon&&this.icon!=="null"&&t.push(I.jsx("div",{className:"icon","data-icon":this.icon,ref:r=>{this.iconElement=r}},this.icon)),t.push(I.jsx("slot",null)),t}onConnected(){this.addEventListener("click",this.handleClick)}onDisconnected(){this.removeEventListener("click",this.handleClick)}onAttributeChanged(t,r,o){switch(t){case"disabled":this.disabled=o!==null,this.rerender();break;case"loading":this.loading=o!==null,this.updateButtonState(),this.rerender();break;case"icon":this.icon=o,this.rerender();break;case"href":this.href=o,this.rerender();break;case"type":this.type=o,this.updateButtonState();break;case"target":this.target=o||"_blank";break;case"rel":this.rel=o;break;case"download":this.download=o;break;case"toggle":this.toggle=o!==null;break;case"checked":this.checked=o!==null;break;case"variant":this.variant=o||"flat";break;case"size":this.size=o||"md";break}}updateButtonState(){this.btnElement&&(this.disabled||this.loading?(this.btnElement.setAttribute("disabled","disabled"),this.href&&this.btnElement instanceof HTMLAnchorElement&&this.btnElement.removeAttribute("href")):(this.btnElement.removeAttribute("disabled"),this.href&&this.btnElement instanceof HTMLAnchorElement&&(this.btnElement.href=this.href)),this.type&&this.btnElement instanceof HTMLButtonElement&&(this.btnElement.type=this.type))}focus(){var t;(t=this.btnElement)==null||t.focus()}get isDisabled(){return this.disabled}set isDisabled(t){t?this.setAttr("disabled",""):this.removeAttr("disabled")}get isLoading(){return this.loading}set isLoading(t){t?this.setAttr("loading",""):this.removeAttr("loading")}get isChecked(){return this.checked}set isChecked(t){t?this.setAttr("checked",""):this.removeAttr("checked")}get buttonIcon(){return this.icon}set buttonIcon(t){t?this.setAttr("icon",t):this.removeAttr("icon")}}Ue=Pt;[exports.Button,Ge]=Dt(Ue,[],We,0,void 0,I.WebComponent).c;Ge();const Bt=':host{display:inline-flex}::slotted(wsx-button:not(:first-of-type):not(:last-of-type)){border-radius:0}::slotted(wsx-button){margin:0!important}::slotted(wsx-button:not(:first-of-type)){margin-left:-1px!important}::slotted(wsx-button[type]:not([type="dashed"]):not(:first-of-type)){margin-left:1px!important}::slotted(wsx-button:first-of-type){border-top-right-radius:0;border-bottom-right-radius:0}::slotted(wsx-button:last-of-type){border-top-left-radius:0;border-bottom-left-radius:0}';var Ye;let Ke,qe;function Se(e,t,r){return(t=Ze(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ht(e,t,r,o,f,O){function S(i,s,u){return function(a,n){return u&&u(a),i[s].call(a,n)}}function m(i,s){for(var u=0;u<i.length;u++)i[u].call(s);return s}function h(i,s,u,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(s+" must "+(u||"be")+" a function"+(a?"":" or undefined"));return i}function v(i,s,u,a,n,c,g,p,T,k,y,d,x){function F(b){if(!x(b))throw new TypeError("Attempted to access private element on non-instance")}var A,N=s[0],j=s[3],z=!p;if(!z){u||Array.isArray(N)||(N=[N]);var l={},$=[],C=n===3?"get":n===4||d?"set":"value";k?(y||d?l={get:Ae(function(){return j(this)},a,"get"),set:function(b){s[4](this,b)}}:l[C]=j,y||Ae(l[C],a,n===2?"":C)):y||(l=Object.getOwnPropertyDescriptor(i,a))}for(var E=i,B=N.length-1;B>=0;B-=u?2:1){var W=N[B],G=u?N[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(b,D){if(b.v)throw Error("attempted to call addInitializer after decoration was finished");h(D,"An initializer","be",!0),g.push(D)}).bind(null,Y)};try{if(z)(A=h(W.call(G,E,M),"class decorators","return"))&&(E=A);else{var P,H;M.static=T,M.private=k,k?n===2?P=function(b){return F(b),l.value}:(n<4&&(P=S(l,"get",F)),n!==3&&(H=S(l,"set",F))):(P=function(b){return b[a]},(n<2||n===4)&&(H=function(b,D){b[a]=D}));var V=M.access={has:k?x.bind():function(b){return a in b}};if(P&&(V.get=P),H&&(V.set=H),E=W.call(G,d?{get:l.get,set:l.set}:l[C],M),d){if(typeof E=="object"&&E)(A=h(E.get,"accessor.get"))&&(l.get=A),(A=h(E.set,"accessor.set"))&&(l.set=A),(A=h(E.init,"accessor.init"))&&$.push(A);else if(E!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else h(E,(y?"field":"method")+" decorators","return")&&(y?$.push(E):l[C]=E)}}finally{Y.v=!0}}return(y||d)&&p.push(function(b,D){for(var U=$.length-1;U>=0;U--)D=$[U].call(b,D);return D}),y||z||(k?d?p.push(S(l,"get"),S(l,"set")):p.push(n===2?l[C]:S.call.bind(l[C])):Object.defineProperty(i,a,l)),E}function w(i,s){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:s})}if(arguments.length>=6)var _=O[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(_??null),L=function(i,s,u,a){var n,c,g=[],p=function(C){return Gt(C)===i},T=new Map;function k(C){C&&g.push(m.bind(null,C))}for(var y=0;y<s.length;y++){var d=s[y];if(Array.isArray(d)){var x=d[1],F=d[2],A=d.length>3,N=16&x,j=!!(8&x),z=(x&=7)==0,l=F+"/"+j;if(!z&&!A){var $=T.get(l);if($===!0||$===3&&x!==4||$===4&&x!==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: "+F);T.set(l,!(x>2)||x)}v(j?i:i.prototype,d,N,A?"#"+F:Ze(F),x,a,j?c=c||[]:n=n||[],g,j,A,z,x===1,j&&A?p:u)}}return k(n),k(c),g}(e,t,f,R);return r.length||w(e,R),{e:L,get c(){var i=[];return r.length&&[w(v(e,[r],o,e.name,5,R,i),R),m.bind(null,i,e)]}}}function Ze(e){var t=Ut(e,"string");return typeof t=="symbol"?t:t+""}function Ut(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ae(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Gt(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}qe=[I.autoRegister({tagName:"wsx-button-group"})];exports.ButtonGroup=void 0;class Wt extends I.WebComponent{static get observedAttributes(){return["disabled"]}constructor(t={}){super({styleName:"wsx-button-group",...t}),Se(this,"_autoStyles",Bt),Se(this,"disabled",!1),this.disabled=t.disabled||!1}render(){return I.jsx("div",{class:"button-group-container"},I.jsx("slot",null))}onAttributeChanged(t,r,o){switch(t){case"disabled":this.disabled=o!==null,setTimeout(()=>{this.updateChildrenDisabledState()},0);break}}onConnected(){this.updateChildrenDisabledState()}updateChildrenDisabledState(){Array.from(this.children).filter(r=>r.tagName==="WSX-BUTTON").forEach(r=>{this.disabled?r.setAttribute("disabled",""):r.removeAttribute("disabled")})}get isDisabled(){return this.disabled}set isDisabled(t){t?this.setAttr("disabled",""):this.removeAttr("disabled")}getButtons(){const t=this.querySelectorAll("wsx-button");return t.length>0?Array.from(t):Array.from(this.children).filter(r=>r.tagName==="WSX-BUTTON")}enableAll(){this.getButtons().forEach(r=>{r.removeAttribute("disabled")})}disableAll(){this.getButtons().forEach(r=>{r.setAttribute("disabled","")})}}Ye=Wt;[exports.ButtonGroup,Ke]=Ht(Ye,[],qe,0,void 0,I.WebComponent).c;Ke();var Ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var de={exports:{}};function Vt(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var Yt=Kt;function Kt(e,t,r){var o=r&&r.stringify||Vt,f=1;if(typeof e=="object"&&e!==null){var O=t.length+f;if(O===1)return e;var S=new Array(O);S[0]=o(e);for(var m=1;m<O;m++)S[m]=o(t[m]);return S.join(" ")}if(typeof e!="string")return e;var h=t.length;if(h===0)return e;for(var v="",w=1-f,_=-1,R=e&&e.length||0,L=0;L<R;){if(e.charCodeAt(L)===37&&L+1<R){switch(_=_>-1?_:0,e.charCodeAt(L+1)){case 100:case 102:if(w>=h||t[w]==null)break;_<L&&(v+=e.slice(_,L)),v+=Number(t[w]),_=L+2,L++;break;case 105:if(w>=h||t[w]==null)break;_<L&&(v+=e.slice(_,L)),v+=Math.floor(Number(t[w])),_=L+2,L++;break;case 79:case 111:case 106:if(w>=h||t[w]===void 0)break;_<L&&(v+=e.slice(_,L));var i=typeof t[w];if(i==="string"){v+="'"+t[w]+"'",_=L+2,L++;break}if(i==="function"){v+=t[w].name||"<anonymous>",_=L+2,L++;break}v+=o(t[w]),_=L+2,L++;break;case 115:if(w>=h)break;_<L&&(v+=e.slice(_,L)),v+=String(t[w]),_=L+2,L++;break;case 37:_<L&&(v+=e.slice(_,L)),v+="%",_=L+2,L++,w--;break}++w}++L}return _===-1?e:(_<R&&(v+=e.slice(_)),v)}const Oe=Yt;de.exports=ee;const ae=cr().console||{},qt={mapHttpRequest:le,mapHttpResponse:le,wrapRequestSerializer:ge,wrapResponseSerializer:ge,wrapErrorSerializer:ge,req:le,res:le,err:_e,errWithCause:_e};function te(e,t){return e==="silent"?1/0:t.levels.values[e]}const we=Symbol("pino.logFuncs"),ve=Symbol("pino.hierarchy"),Zt={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Te(e,t){const r={logger:t,parent:e[ve]};t[ve]=r}function Xt(e,t,r){const o={};t.forEach(f=>{o[f]=r[f]?r[f]:ae[f]||ae[Zt[f]||"log"]||ne}),e[we]=o}function Qt(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function ee(e){e=e||{},e.browser=e.browser||{};const t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||ae;e.browser.write&&(e.browser.asObject=!0);const o=e.serializers||{},f=Qt(e.browser.serialize,o);let O=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(O=!1);const S=Object.keys(e.customLevels||{}),m=["error","fatal","warn","info","debug","trace"].concat(S);typeof r=="function"&&m.forEach(function(s){r[s]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");const h=e.level||"info",v=Object.create(r);v.log||(v.log=ne),Xt(v,m,r),Te({},v),Object.defineProperty(v,"levelVal",{get:_}),Object.defineProperty(v,"level",{get:R,set:L});const w={transmit:t,serialize:f,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:m,timestamp:ar(e),messageKey:e.messageKey||"msg",onChild:e.onChild||ne};v.levels=Jt(e),v.level=h,v.isLevelEnabled=function(s){return this.levels.values[s]?this.levels.values[s]>=this.levels.values[this.level]:!1},v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=ne,v.serializers=o,v._serialize=f,v._stdErrSerialize=O,v.child=function(...s){return i.call(this,w,...s)},t&&(v._logEvent=ye());function _(){return te(this.level,this)}function R(){return this._level}function L(s){if(s!=="silent"&&!this.levels.values[s])throw Error("unknown level "+s);this._level=s,re(this,w,v,"error"),re(this,w,v,"fatal"),re(this,w,v,"warn"),re(this,w,v,"info"),re(this,w,v,"debug"),re(this,w,v,"trace"),S.forEach(u=>{re(this,w,v,u)})}function i(s,u,a){if(!u)throw new Error("missing bindings for child Pino");a=a||{},f&&u.serializers&&(a.serializers=u.serializers);const n=a.serializers;if(f&&n){var c=Object.assign({},o,n),g=e.browser.serialize===!0?Object.keys(c):f;delete u.serializers,ke([u],g,c,this._stdErrSerialize)}function p(k){this._childLevel=(k._childLevel|0)+1,this.bindings=u,c&&(this.serializers=c,this._serialize=g),t&&(this._logEvent=ye([].concat(k._logEvent.bindings,u)))}p.prototype=this;const T=new p(this);return Te(this,T),T.child=function(...k){return i.call(this,s,...k)},T.level=a.level||this.level,s.onChild(T),T}return v}function Jt(e){const t=e.customLevels||{},r=Object.assign({},ee.levels.values,t),o=Object.assign({},ee.levels.labels,er(t));return{values:r,labels:o}}function er(e){const t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}ee.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};ee.stdSerializers=qt;ee.stdTimeFunctions=Object.assign({},{nullTime:Qe,epochTime:Je,unixTime:sr,isoTime:lr});function tr(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[ve];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function re(e,t,r,o){if(Object.defineProperty(e,o,{value:te(e.level,r)>te(o,r)?ne:r[we][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===ne){if(!t.transmit)return;const O=t.transmit.level||e.level,S=te(O,r);if(te(o,r)<S)return}e[o]=nr(e,t,r,o);const f=tr(e);f.length!==0&&(e[o]=rr(f,e[o]))}function rr(e,t){return function(){return t.apply(this,[...e,...arguments])}}function nr(e,t,r,o){return function(f){return function(){const S=t.timestamp(),m=new Array(arguments.length),h=Object.getPrototypeOf&&Object.getPrototypeOf(this)===ae?ae:this;for(var v=0;v<m.length;v++)m[v]=arguments[v];var w=!1;if(t.serialize&&(ke(m,this._serialize,this.serializers,this._stdErrSerialize),w=!0),t.asObject||t.formatters?f.call(h,...or(this,o,m,S,t)):f.apply(h,m),t.transmit){const _=t.transmit.level||e._level,R=te(_,r),L=te(o,r);if(L<R)return;ir(this,{ts:S,methodLevel:o,methodValue:L,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:te(e._level,r)},m,w)}}}(e[we][o])}function or(e,t,r,o,f){const{level:O,log:S=_=>_}=f.formatters||{},m=r.slice();let h=m[0];const v={};let w=(e._childLevel|0)+1;if(w<1&&(w=1),o&&(v.time=o),O){const _=O(t,e.levels.values[t]);Object.assign(v,_)}else v.level=e.levels.values[t];if(f.asObjectBindingsOnly){if(h!==null&&typeof h=="object")for(;w--&&typeof m[0]=="object";)Object.assign(v,m.shift());return[S(v),...m]}else{if(h!==null&&typeof h=="object"){for(;w--&&typeof m[0]=="object";)Object.assign(v,m.shift());h=m.length?Oe(m.shift(),m):void 0}else typeof h=="string"&&(h=Oe(m.shift(),m));return h!==void 0&&(v[f.messageKey]=h),[S(v)]}}function ke(e,t,r,o){for(const f in e)if(o&&e[f]instanceof Error)e[f]=ee.stdSerializers.err(e[f]);else if(typeof e[f]=="object"&&!Array.isArray(e[f])&&t)for(const O in e[f])t.indexOf(O)>-1&&O in r&&(e[f][O]=r[O](e[f][O]))}function ir(e,t,r,o=!1){const f=t.send,O=t.ts,S=t.methodLevel,m=t.methodValue,h=t.val,v=e._logEvent.bindings;o||ke(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=O,e._logEvent.messages=r.filter(function(w){return v.indexOf(w)===-1}),e._logEvent.level.label=S,e._logEvent.level.value=m,f(S,e._logEvent,h),e._logEvent=ye(v)}function ye(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function _e(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)t[r]===void 0&&(t[r]=e[r]);return t}function ar(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Qe:Je}function le(){return{}}function ge(e){return e}function ne(){}function Qe(){return!1}function Je(){return Date.now()}function sr(){return Math.round(Date.now()/1e3)}function lr(){return new Date(Date.now()).toISOString()}function cr(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}de.exports.default=ee;de.exports.pino=ee;var ur=de.exports;const ce=Xe(ur);function ue(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function dr(){var e;return typeof process<"u"&&((e=process.versions)==null?void 0:e.node)!==void 0}function pr(){return typeof window<"u"&&typeof document<"u"}const fe={name:"WSX",level:ue()?"info":"debug",pretty:!ue()};function hr(e={}){const{name:t,level:r,pretty:o,pinoOptions:f}={...fe,...e},O={name:t||fe.name,level:r||fe.level,...f};if(pr()&&(O.browser={asObject:!1,write:void 0,...(f==null?void 0:f.browser)||{}}),o&&dr()&&!ue())try{return ce(O,ce.transport({target:"pino-pretty",options:{colorize:!0,translateTime:"HH:MM:ss.l",ignore:"pid,hostname",singleLine:!1}}))}catch{return console.warn("[wsx-logger] pino-pretty not available, using default formatter"),ce(O)}return ce(O)}class et{constructor(t={}){this.isProd=ue(),this.pinoLogger=hr(t)}debug(t,...r){this.isProd||(r.length>0?this.pinoLogger.debug({args:r},t):this.pinoLogger.debug(t))}info(t,...r){this.isProd?r.length>0?this.pinoLogger.info({args:r},t):this.pinoLogger.info(t):r.length>0?this.pinoLogger.info({args:r},t):this.pinoLogger.info(t)}warn(t,...r){r.length>0?this.pinoLogger.warn({args:r},t):this.pinoLogger.warn(t)}error(t,...r){r.length>0?this.pinoLogger.error({args:r},t):this.pinoLogger.error(t)}fatal(t,...r){r.length>0?this.pinoLogger.fatal({args:r},t):this.pinoLogger.fatal(t)}trace(t,...r){this.isProd||(r.length>0?this.pinoLogger.trace({args:r},t):this.pinoLogger.trace(t))}getPinoLogger(){return this.pinoLogger}}new et;function tt(e,t={}){return new et({...t,name:t.name||`WSX:${e}`})}const pe="editor-js-text-color-cache";function gr(e){return e.startsWith("var(")&&e.endsWith(")")}function fr(e){return e.slice(4,-1).trim()}function br(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()||e}function ie(e){if(gr(e)){const t=fr(e);return br(t)}return e}function rt(e,t){return sessionStorage.setItem(`${pe}-${t}`,JSON.stringify(e)),e}function nt(e,t){sessionStorage.setItem(`${pe}-${t}-custom`,JSON.stringify(e))}function ot(e){const t=sessionStorage.getItem(`${pe}-${e}-custom`);return t?JSON.parse(t):null}function it(e,t){let r=null;return(...o)=>{r||(r=setTimeout(()=>{e(...o),r=null},t))}}function mr(e,t){const r=sessionStorage.getItem(`${pe}-${t}`);return r?JSON.parse(r):e}const vr="ce-inline-toolbar__dropdown",yr="ce-conversion-toolbar--showed",xr='.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 at;let st,lt;function Z(e,t,r){return(t=ct(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wr(e,t,r,o,f,O){function S(i,s,u){return function(a,n){return u&&u(a),i[s].call(a,n)}}function m(i,s){for(var u=0;u<i.length;u++)i[u].call(s);return s}function h(i,s,u,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(s+" must "+(u||"be")+" a function"+(a?"":" or undefined"));return i}function v(i,s,u,a,n,c,g,p,T,k,y,d,x){function F(b){if(!x(b))throw new TypeError("Attempted to access private element on non-instance")}var A,N=s[0],j=s[3],z=!p;if(!z){u||Array.isArray(N)||(N=[N]);var l={},$=[],C=n===3?"get":n===4||d?"set":"value";k?(y||d?l={get:Ie(function(){return j(this)},a,"get"),set:function(b){s[4](this,b)}}:l[C]=j,y||Ie(l[C],a,n===2?"":C)):y||(l=Object.getOwnPropertyDescriptor(i,a))}for(var E=i,B=N.length-1;B>=0;B-=u?2:1){var W=N[B],G=u?N[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(b,D){if(b.v)throw Error("attempted to call addInitializer after decoration was finished");h(D,"An initializer","be",!0),g.push(D)}).bind(null,Y)};try{if(z)(A=h(W.call(G,E,M),"class decorators","return"))&&(E=A);else{var P,H;M.static=T,M.private=k,k?n===2?P=function(b){return F(b),l.value}:(n<4&&(P=S(l,"get",F)),n!==3&&(H=S(l,"set",F))):(P=function(b){return b[a]},(n<2||n===4)&&(H=function(b,D){b[a]=D}));var V=M.access={has:k?x.bind():function(b){return a in b}};if(P&&(V.get=P),H&&(V.set=H),E=W.call(G,d?{get:l.get,set:l.set}:l[C],M),d){if(typeof E=="object"&&E)(A=h(E.get,"accessor.get"))&&(l.get=A),(A=h(E.set,"accessor.set"))&&(l.set=A),(A=h(E.init,"accessor.init"))&&$.push(A);else if(E!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else h(E,(y?"field":"method")+" decorators","return")&&(y?$.push(E):l[C]=E)}}finally{Y.v=!0}}return(y||d)&&p.push(function(b,D){for(var U=$.length-1;U>=0;U--)D=$[U].call(b,D);return D}),y||z||(k?d?p.push(S(l,"get"),S(l,"set")):p.push(n===2?l[C]:S.call.bind(l[C])):Object.defineProperty(i,a,l)),E}function w(i,s){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:s})}if(arguments.length>=6)var _=O[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(_??null),L=function(i,s,u,a){var n,c,g=[],p=function(C){return Er(C)===i},T=new Map;function k(C){C&&g.push(m.bind(null,C))}for(var y=0;y<s.length;y++){var d=s[y];if(Array.isArray(d)){var x=d[1],F=d[2],A=d.length>3,N=16&x,j=!!(8&x),z=(x&=7)==0,l=F+"/"+j;if(!z&&!A){var $=T.get(l);if($===!0||$===3&&x!==4||$===4&&x!==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: "+F);T.set(l,!(x>2)||x)}v(j?i:i.prototype,d,N,A?"#"+F:ct(F),x,a,j?c=c||[]:n=n||[],g,j,A,z,x===1,j&&A?p:u)}}return k(n),k(c),g}(e,t,f,R);return r.length||w(e,R),{e:L,get c(){var i=[];return r.length&&[w(v(e,[r],o,e.name,5,R,i),R),m.bind(null,i,e)]}}}function ct(e){var t=kr(e,"string");return typeof t=="symbol"?t:t+""}function kr(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ie(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Er(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}const oe=tt("ColorPicker"),Sr=["#ff1300","#EC7878","#9C27B0","#673AB7","#3F51B5","#0070FF","#03A9F4","#00BCD4","#4CAF50","#8BC34A","#CDDC39","#FFE500","#FFBF00","#FF9800","#795548","#9E9E9E","#5A5A5A","#FFF"];lt=[I.autoRegister({tagName:"color-picker"})];exports.ColorPicker=void 0;class Ar extends I.WebComponent{static get observedAttributes(){return["disabled","selected-color","open"]}constructor(t={}){super({styleName:"base-color-picker",...t}),Z(this,"_autoStyles",xr),Z(this,"colorCollections",void 0),Z(this,"onColorPicked",void 0),Z(this,"hasCustomPicker",void 0),Z(this,"defaultColor",void 0),Z(this,"pluginType",void 0),Z(this,"disabled",void 0),Z(this,"selectedColor",void 0),Z(this,"customColor",void 0),Z(this,"isOpen",void 0),Z(this,"colorBtn",void 0),Z(this,"colorPanel",void 0),Z(this,"handleButtonClick",r=>{r.stopPropagation(),this.togglePanel()}),Z(this,"handlePanelClick",r=>{r.stopPropagation()}),Z(this,"handleColorSelect",r=>{var f;const o=ie(r);this.setSelectedColor(o),this.closePanel(),rt(o,this.pluginType),(f=this.onColorPicked)==null||f.call(this,o),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:o},bubbles:!0,composed:!0})),oe.debug("Color selected",{color:o})}),Z(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 o=it(f=>{var m;const O=f.target,S=ie(O.value);this.setSelectedColor(S),this.setCustomColor(S),document.body.removeChild(r),(m=this.onColorPicked)==null||m.call(this,S),this.dispatchEvent(new CustomEvent("colorchange",{detail:{color:S},bubbles:!0,composed:!0})),oe.debug("Custom color selected",{color:S})},30);r.addEventListener("input",o),document.body.appendChild(r),requestAnimationFrame(()=>{r.focus(),r.click()})}),Z(this,"handleDocumentClick",r=>{this.isOpen&&!this.contains(r.target)&&this.closePanel()}),this.colorCollections=t.colorCollections||Sr,this.onColorPicked=t.onColorPicked,this.hasCustomPicker=t.hasCustomPicker||!1,this.pluginType=t.pluginType||"text",this.disabled=t.disabled||!1,this.defaultColor=ie(t.defaultColor||this.colorCollections[0]),this.selectedColor=this.defaultColor,this.customColor=ot(this.pluginType)||"",this.isOpen=!1,oe.debug("ColorPicker initialized",{colorCollections:this.colorCollections.length,hasCustomPicker:this.hasCustomPicker,pluginType:this.pluginType})}render(){const t=this.renderColorButton(),r=this.isOpen?this.renderColorPanel():null;return I.jsx("section",{class:"color-section"},I.jsx("div",{class:"color-popover"},t,r))}renderColorButton(){return I.jsx("wsx-button",{type:"button",class:`color-btn ${this.disabled?"disabled":""}`,style:`--theme-color: ${this.selectedColor}`,disabled:this.disabled,onClick:this.handleButtonClick,ref:t=>{this.colorBtn=t}},I.jsx("span",{class:"color-indicator"},"_"))}renderColorPanel(){return I.jsx("div",{class:"color-panel",onClick:this.handlePanelClick,ref:t=>{this.colorPanel=t}},I.jsx("div",{class:"color-grid"},this.hasCustomPicker?this.renderCustomPicker():null,this.renderColorButtons()))}renderCustomPicker(){return I.jsx("wsx-button",{type:"button",class:"color-cube custom-picker",style:{backgroundColor:this.customColor},onClick:this.handleCustomPickerClick,title:"自定义颜色"})}renderColorButtons(){return this.colorCollections.map(t=>I.jsx("wsx-button",{key:t,type:"button",class:"color-cube",style:`background-color: ${t}`,"data-color":t,title:t,onClick:()=>this.handleColorSelect(t)}))}togglePanel(){this.setOpen(!this.isOpen)}closePanel(){this.setOpen(!1)}setSelectedColor(t){this.selectedColor=t,this.setAttr("selected-color",t),this.updateColorButton()}setCustomColor(t){this.customColor=t,nt(t,this.pluginType)}setOpen(t){this.isOpen=t,t?this.setAttr("open",""):this.removeAttr("open"),this.rerender()}updateColorButton(){this.colorBtn&&this.colorBtn.style.setProperty("--theme-color",this.selectedColor)}onConnected(){document.addEventListener("click",this.handleDocumentClick),oe.info("ColorPicker connected to DOM")}onDisconnected(){document.removeEventListener("click",this.handleDocumentClick),oe.info("ColorPicker disconnected from DOM")}onAttributeChanged(t,r,o){switch(t){case"disabled":this.disabled=o!==null,this.rerender();break;case"selected-color":o&&o!==this.selectedColor&&(this.selectedColor=o,this.updateColorButton());break;case"open":this.isOpen=o!==null;break}}getSelectedColor(){return this.selectedColor}setColor(t){this.setSelectedColor(ie(t))}focus(){var t;(t=this.colorBtn)==null||t.focus()}}at=Ar;[exports.ColorPicker,st]=wr(at,[],lt,0,void 0,I.WebComponent).c;st();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 ut;let dt,pt;function be(e,t,r){return(t=ht(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Or(e,t,r,o,f,O){function S(i,s,u){return function(a,n){return u&&u(a),i[s].call(a,n)}}function m(i,s){for(var u=0;u<i.length;u++)i[u].call(s);return s}function h(i,s,u,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(s+" must "+(u||"be")+" a function"+(a?"":" or undefined"));return i}function v(i,s,u,a,n,c,g,p,T,k,y,d,x){function F(b){if(!x(b))throw new TypeError("Attempted to access private element on non-instance")}var A,N=s[0],j=s[3],z=!p;if(!z){u||Array.isArray(N)||(N=[N]);var l={},$=[],C=n===3?"get":n===4||d?"set":"value";k?(y||d?l={get:Fe(function(){return j(this)},a,"get"),set:function(b){s[4](this,b)}}:l[C]=j,y||Fe(l[C],a,n===2?"":C)):y||(l=Object.getOwnPropertyDescriptor(i,a))}for(var E=i,B=N.length-1;B>=0;B-=u?2:1){var W=N[B],G=u?N[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(b,D){if(b.v)throw Error("attempted to call addInitializer after decoration was finished");h(D,"An initializer","be",!0),g.push(D)}).bind(null,Y)};try{if(z)(A=h(W.call(G,E,M),"class decorators","return"))&&(E=A);else{var P,H;M.static=T,M.private=k,k?n===2?P=function(b){return F(b),l.value}:(n<4&&(P=S(l,"get",F)),n!==3&&(H=S(l,"set",F))):(P=function(b){return b[a]},(n<2||n===4)&&(H=function(b,D){b[a]=D}));var V=M.access={has:k?x.bind():function(b){return a in b}};if(P&&(V.get=P),H&&(V.set=H),E=W.call(G,d?{get:l.get,set:l.set}:l[C],M),d){if(typeof E=="object"&&E)(A=h(E.get,"accessor.get"))&&(l.get=A),(A=h(E.set,"accessor.set"))&&(l.set=A),(A=h(E.init,"accessor.init"))&&$.push(A);else if(E!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else h(E,(y?"field":"method")+" decorators","return")&&(y?$.push(E):l[C]=E)}}finally{Y.v=!0}}return(y||d)&&p.push(function(b,D){for(var U=$.length-1;U>=0;U--)D=$[U].call(b,D);return D}),y||z||(k?d?p.push(S(l,"get"),S(l,"set")):p.push(n===2?l[C]:S.call.bind(l[C])):Object.defineProperty(i,a,l)),E}function w(i,s){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:s})}if(arguments.length>=6)var _=O[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(_??null),L=function(i,s,u,a){var n,c,g=[],p=function(C){return _r(C)===i},T=new Map;function k(C){C&&g.push(m.bind(null,C))}for(var y=0;y<s.length;y++){var d=s[y];if(Array.isArray(d)){var x=d[1],F=d[2],A=d.length>3,N=16&x,j=!!(8&x),z=(x&=7)==0,l=F+"/"+j;if(!z&&!A){var $=T.get(l);if($===!0||$===3&&x!==4||$===4&&x!==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: "+F);T.set(l,!(x>2)||x)}v(j?i:i.prototype,d,N,A?"#"+F:ht(F),x,a,j?c=c||[]:n=n||[],g,j,A,z,x===1,j&&A?p:u)}}return k(n),k(c),g}(e,t,f,R);return r.length||w(e,R),{e:L,get c(){var i=[];return r.length&&[w(v(e,[r],o,e.name,5,R,i),R),m.bind(null,i,e)]}}}function ht(e){var t=Tr(e,"string");return typeof t=="symbol"?t:t+""}function Tr(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Fe(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function _r(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}pt=[I.autoRegister({tagName:"theme-switcher"})];exports.ThemeSwitcher=void 0;class Ir extends I.WebComponent{constructor(){super({styleName:"theme-switcher"}),be(this,"_autoStyles",Cr),be(this,"currentTheme","auto"),be(this,"toggleTheme",()=>{const t=["auto","light","dark"],o=(t.indexOf(this.currentTheme)+1)%t.length;this.setTheme(t[o])}),this.initTheme()}render(){return I.jsx("div",{class:"theme-switcher-container"},I.jsx("button",{class:"theme-switcher-btn","data-theme":this.currentTheme,onClick:this.toggleTheme,title:`当前主题: ${this.getThemeLabel()}`,"data-wsx-key":"ThemeSwitcher-button-text-1"},I.jsx("span",{class:"theme-switcher-icon"},this.getThemeIcon())))}getThemeIcon(){const r=document.documentElement.classList.contains("dark");return this.currentTheme==="auto"?r?"🌙":"☀️":this.currentTheme==="light"?"☀️":"🌙"}getThemeLabel(){return{light:"浅色",dark:"深色",auto:"自动"}[this.currentTheme]}setTheme(t){this.currentTheme=t;const r=document.documentElement;t==="auto"?(r.removeAttribute("class"),this.checkSystemTheme()):r.className=t,localStorage.setItem("wsx-theme",t),this.rerender()}checkSystemTheme(){const t=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.className=t?"dark":""}initTheme(){const t=localStorage.getItem("wsx-theme")||"auto";this.setTheme(t),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r=>{this.currentTheme==="auto"&&(document.documentElement.className=r.matches?"dark":"")})}}ut=Ir;[exports.ThemeSwitcher,dt]=Or(ut,[],pt,0,void 0,I.WebComponent).c;dt();const Re=":host{display:inline-block;position:relative}.dropdown-container{position:relative;display:inline-block}.dropdown-button{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem .75rem;min-width:120px;background:var(--dropdown-bg, rgba(255, 255, 255, .1));border:1px solid var(--dropdown-border, rgba(255, 255, 255, .2));border-radius:var(--dropdown-border-radius, .5rem);color:var(--dropdown-color, currentColor);cursor:pointer;font-size:.875rem;font-weight:500;transition:all .2s ease;text-align:left}.dropdown-button:hover:not(.disabled){background:var(--dropdown-hover-bg, rgba(255, 255, 255, .15));border-color:var(--dropdown-hover-border, rgba(255, 255, 255, .3))}.dropdown-button:focus:not(.disabled){outline:2px solid var(--dropdown-focus-color, var(--focus-color, #dc2626));outline-offset:2px}.dropdown-button.open{background:var(--dropdown-open-bg, rgba(255, 255, 255, .2))}.dropdown-button.disabled{opacity:.5;cursor:not-allowed}.dropdown-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-arrow{font-size:.625rem;opacity:.7;transition:transform .2s ease;flex-shrink:0}.dropdown-button.open .dropdown-arrow{transform:rotate(180deg)}.dropdown-menu{position:absolute;z-index:1000;min-width:160px;max-width:300px;max-height:300px;overflow-y:auto;background:var(--dropdown-menu-bg, #ffffff);border:1px solid var(--dropdown-menu-border, #e5e7eb);border-radius:var(--dropdown-border-radius, .5rem);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;padding:.25rem;margin:.25rem 0 0}[data-theme=dark] .dropdown-menu{background:var(--dropdown-menu-bg-dark, #1f2937);border-color:var(--dropdown-menu-border-dark, #374151)}.dropdown-menu.dropdown-top{bottom:100%;margin:0 0 .25rem}.dropdown-menu.dropdown-bottom{top:100%;margin:.25rem 0 0}.dropdown-menu.dropdown-left{left:0}.dropdown-menu.dropdown-right{right:0}.dropdown-menu.dropdown-center{left:50%;transform:translate(-50%)}.dropdown-menu.dropdown-top.dropdown-center{transform:translate(-50%) translateY(-100%)}.dropdown-option{display:flex;align-items:center;width:100%;padding:.5rem .75rem;background:transparent;border:none;border-radius:.375rem;color:var(--dropdown-option-color, #1f2937);cursor:pointer;font-size:.875rem;text-align:left;transition:background-color .15s ease}[data-theme=dark] .dropdown-option{color:var(--dropdown-option-color-dark, #f3f4f6)}.dropdown-option:hover:not(.disabled){background:var(--dropdown-option-hover-bg, #f3f4f6)}[data-theme=dark] .dropdown-option:hover:not(.disabled){background:var(--dropdown-option-hover-bg-dark, #374151)}.dropdown-option.selected{background:var(--dropdown-option-selected-bg, #dc2626);color:var(--dropdown-option-selected-color, #ffffff);font-weight:600}.dropdown-option.selected:hover{background:var(--dropdown-option-selected-hover-bg, #b91c1c)}.dropdown-option.disabled{opacity:.5;cursor:not-allowed}.dropdown-empty{padding:.5rem .75rem;color:var(--dropdown-empty-color, #9ca3af);font-size:.875rem;text-align:center}@media (max-width: 768px){.dropdown-button{min-width:100px;padding:.375rem .5rem;font-size:.8125rem}.dropdown-menu{min-width:140px;max-width:200px}}";var gt;let ft,bt;function J(e,t,r){return(t=mt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fr(e,t,r,o,f,O){function S(i,s,u){return function(a,n){return u&&u(a),i[s].call(a,n)}}function m(i,s){for(var u=0;u<i.length;u++)i[u].call(s);return s}function h(i,s,u,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(s+" must "+(u||"be")+" a function"+(a?"":" or undefined"));return i}function v(i,s,u,a,n,c,g,p,T,k,y,d,x){function F(b){if(!x(b))throw new TypeError("Attempted to access private element on non-instance")}var A,N=s[0],j=s[3],z=!p;if(!z){u||Array.isArray(N)||(N=[N]);var l={},$=[],C=n===3?"get":n===4||d?"set":"value";k?(y||d?l={get:Le(function(){return j(this)},a,"get"),set:function(b){s[4](this,b)}}:l[C]=j,y||Le(l[C],a,n===2?"":C)):y||(l=Object.getOwnPropertyDescriptor(i,a))}for(var E=i,B=N.length-1;B>=0;B-=u?2:1){var W=N[B],G=u?N[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(b,D){if(b.v)throw Error("attempted to call addInitializer after decoration was finished");h(D,"An initializer","be",!0),g.push(D)}).bind(null,Y)};try{if(z)(A=h(W.call(G,E,M),"class decorators","return"))&&(E=A);else{var P,H;M.static=T,M.private=k,k?n===2?P=function(b){return F(b),l.value}:(n<4&&(P=S(l,"get",F)),n!==3&&(H=S(l,"set",F))):(P=function(b){return b[a]},(n<2||n===4)&&(H=function(b,D){b[a]=D}));var V=M.access={has:k?x.bind():function(b){return a in b}};if(P&&(V.get=P),H&&(V.set=H),E=W.call(G,d?{get:l.get,set:l.set}:l[C],M),d){if(typeof E=="object"&&E)(A=h(E.get,"accessor.get"))&&(l.get=A),(A=h(E.set,"accessor.set"))&&(l.set=A),(A=h(E.init,"accessor.init"))&&$.push(A);else if(E!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else h(E,(y?"field":"method")+" decorators","return")&&(y?$.push(E):l[C]=E)}}finally{Y.v=!0}}return(y||d)&&p.push(function(b,D){for(var U=$.length-1;U>=0;U--)D=$[U].call(b,D);return D}),y||z||(k?d?p.push(S(l,"get"),S(l,"set")):p.push(n===2?l[C]:S.call.bind(l[C])):Object.defineProperty(i,a,l)),E}function w(i,s){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:s})}if(arguments.length>=6)var _=O[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(_??null),L=function(i,s,u,a){var n,c,g=[],p=function(C){return Lr(C)===i},T=new Map;function k(C){C&&g.push(m.bind(null,C))}for(var y=0;y<s.length;y++){var d=s[y];if(Array.isArray(d)){var x=d[1],F=d[2],A=d.length>3,N=16&x,j=!!(8&x),z=(x&=7)==0,l=F+"/"+j;if(!z&&!A){var $=T.get(l);if($===!0||$===3&&x!==4||$===4&&x!==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: "+F);T.set(l,!(x>2)||x)}v(j?i:i.prototype,d,N,A?"#"+F:mt(F),x,a,j?c=c||[]:n=n||[],g,j,A,z,x===1,j&&A?p:u)}}return k(n),k(c),g}(e,t,f,R);return r.length||w(e,R),{e:L,get c(){var i=[];return r.length&&[w(v(e,[r],o,e.name,5,R,i),R),m.bind(null,i,e)]}}}function mt(e){var t=Rr(e,"string");return typeof t=="symbol"?t:t+""}function Rr(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Le(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Lr(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}bt=[I.autoRegister({tagName:"wsx-dropdown"})];exports.Dropdown=void 0;class Nr extends I.WebComponent{constructor(t={}){super({styles:Re,styleName:"wsx-dropdown"}),J(this,"_autoStyles",Re),J(this,"options",[]),J(this,"selectedValue",void 0),J(this,"isOpen",void 0),J(this,"config",{}),J(this,"buttonElement",void 0),J(this,"dropdownElement",void 0),J(this,"outsideClickHandler",void 0),J(this,"toggleDropdown",()=>{this.config.disabled||(this.isOpen=!this.isOpen,this.rerender(),this.isOpen?setTimeout(()=>{this.attachOutsideClickHandler()},0):this.detachOutsideClickHandler())}),J(this,"openDropdown",()=>{this.config.disabled||this.isOpen||(this.isOpen=!0,this.rerender())}),J(this,"closeDropdown",()=>{this.isOpen&&(this.isOpen=!1,this.rerender(),this.detachOutsideClickHandler())}),J(this,"selectOption",S=>{this.setValue(S),this.config.trigger==="click"&&this.closeDropdown()}),J(this,"attachOutsideClickHandler",()=>{this.config.trigger!=="hover"&&(this.outsideClickHandler=S=>{const m=S.target;this.dropdownElement&&this.buttonElement&&!this.dropdownElement.contains(m)&&!this.buttonElement.contains(m)&&this.closeDropdown()},document.addEventListener("click",this.outsideClickHandler,!0))}),J(this,"detachOutsideClickHandler",()=>{this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,!0),this.outsideClickHandler=void 0)}),this.config={placeholder:"Select...",align:"left",position:"bottom",trigger:"click",...t};const[r,o]=this.useState("selectedValue","");Object.defineProperty(this,"selectedValue",{get:r,set:o,enumerable:!0,configurable:!0});const[f,O]=this.useState("isOpen",!1);Object.defineProperty(this,"isOpen",{get:f,set:O,enumerable:!0,configurable:!0})}setOptions(t){this.options=t,this.rerender()}setValue(t){this.selectedValue=t,this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0}))}getValue(){return this.selectedValue||void 0}render(){const t=this.options.find(o=>o.value===this.selectedValue&&this.selectedValue!==""),r=(t==null?void 0:t.label)||this.config.placeholder||"Select...";return I.jsx("div",{class:"dropdown-container"},I.jsx("button",{ref:o=>this.buttonElement=o,class:`dropdown-button ${this.isOpen?"open":""} ${this.config.disabled?"disabled":""}`,onClick:this.config.trigger==="click"?this.toggleDropdown:void 0,onMouseEnter:this.config.trigger==="hover"?this.openDropdown:void 0,onMouseLeave:this.config.trigger==="hover"?this.closeDropdown:void 0,disabled:this.config.disabled,"aria-expanded":this.isOpen,"aria-haspopup":"listbox","data-wsx-key":"Dropdown-button-text-1"},I.jsx("span",{class:"dropdown-text"},r),I.jsx("span",{class:"dropdown-arrow"},this.isOpen?"▲":"▼")),this.isOpen&&I.jsx("div",{ref:o=>this.dropdownElement=o,class:`dropdown-menu dropdown-${this.config.position} dropdown-${this.config.align}`,role:"listbox",onMouseEnter:this.config.trigger==="hover"?this.openDropdown:void 0,onMouseLeave:this.config.trigger==="hover"?this.closeDropdown:void 0},this.options.length===0?I.jsx("div",{class:"dropdown-empty"},"No options"):this.options.map(o=>I.jsx("button",{key:o.value,class:`dropdown-option ${o.value===this.selectedValue&&this.selectedValue!==""?"selected":""} ${o.disabled?"disabled":""}`,onClick:()=>!o.disabled&&this.selectOption(o.value),role:"option","aria-selected":o.value===this.selectedValue&&this.selectedValue!=="",disabled:o.disabled,"data-wsx-key":"Dropdown-button-text-0"},o.render?o.render():I.jsx("span",null,o.label)))))}onDisconnected(){this.detachOutsideClickHandler()}}gt=Nr;[exports.Dropdown,ft]=Fr(gt,[],bt,0,void 0,I.WebComponent).c;ft();const Ne=":host{display:inline-block;position:relative}.combobox-container{position:relative;display:inline-block;width:100%}.combobox-input-wrapper{position:relative;display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;min-width:200px;background:var(--combobox-bg, rgba(255, 255, 255, .1));border:1px solid var(--combobox-border, rgba(255, 255, 255, .2));border-radius:var(--combobox-border-radius, .5rem);transition:all .2s ease}.combobox-input-wrapper:focus-within{background:var(--combobox-focus-bg, rgba(255, 255, 255, .15));border-color:var(--combobox-focus-border, var(--focus-color, #dc2626));outline:2px solid var(--combobox-focus-outline, rgba(220, 38, 38, .2));outline-offset:2px}.combobox-tags{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap;flex:1}.combobox-tag{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .5rem;background:var(--combobox-tag-bg, #dc2626);color:var(--combobox-tag-color, #ffffff);border-radius:.25rem;font-size:.75rem;font-weight:500}.combobox-tag-remove{background:none;border:none;color:var(--combobox-tag-color, #ffffff);cursor:pointer;font-size:1rem;line-height:1;padding:0;width:16px;height:16px;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color .15s ease}.combobox-tag-remove:hover{background:#fff3}.combobox-tag-more{padding:.25rem .5rem;color:var(--combobox-tag-color, #ffffff);font-size:.75rem;font-weight:500}.combobox-input{flex:1;border:none;background:transparent;color:var(--combobox-color, currentColor);font-size:.875rem;font-weight:500;outline:none;min-width:0}.combobox-input::placeholder{color:var(--combobox-placeholder-color, rgba(255, 255, 255, .5))}.combobox-input:disabled{opacity:.5;cursor:not-allowed}.combobox-arrow{background:none;border:none;color:var(--combobox-arrow-color, currentColor);cursor:pointer;font-size:.625rem;opacity:.7;transition:transform .2s ease;flex-shrink:0;padding:.25rem;display:flex;align-items:center;justify-content:center}.combobox-arrow:hover{opacity:1}.combobox-arrow.open{transform:rotate(180deg)}.combobox-arrow:disabled{opacity:.5;cursor:not-allowed}.combobox-menu{position:absolute;z-index:1000;min-width:100%;max-width:300px;max-height:300px;overflow-y:auto;background:var(--combobox-menu-bg, #ffffff);border:1px solid var(--combobox-menu-border, #e5e7eb);border-radius:var(--combobox-border-radius, .5rem);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;padding:.25rem;margin:.25rem 0 0}[data-theme=dark] .combobox-menu{background:var(--combobox-menu-bg-dark, #1f2937);border-color:var(--combobox-menu-border-dark, #374151)}.combobox-menu.combobox-top{bottom:100%;margin:0 0 .25rem}.combobox-menu.combobox-bottom{top:100%;margin:.25rem 0 0}.combobox-menu.combobox-left{left:0}.combobox-menu.combobox-right{right:0}.combobox-menu.combobox-center{left:50%;transform:translate(-50%)}.combobox-menu.combobox-top.combobox-center{transform:translate(-50%) translateY(-100%)}.combobox-option{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem;background:transparent;border:none;border-radius:.375rem;color:var(--combobox-option-color, #1f2937);cursor:pointer;font-size:.875rem;text-align:left;transition:background-color .15s ease}[data-theme=dark] .combobox-option{color:var(--combobox-option-color-dark, #f3f4f6)}.combobox-option:hover:not(.disabled){background:var(--combobox-option-hover-bg, #f3f4f6)}[data-theme=dark] .combobox-option:hover:not(.disabled){background:var(--combobox-option-hover-bg-dark, #374151)}.combobox-option.selected{background:var(--combobox-option-selected-bg, #dc2626);color:var(--combobox-option-selected-color, #ffffff);font-weight:600}.combobox-option.selected:hover{background:var(--combobox-option-selected-hover-bg, #b91c1c)}.combobox-option.disabled{opacity:.5;cursor:not-allowed}.combobox-checkbox{width:16px;height:16px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.75rem;font-weight:700}.combobox-empty{padding:.5rem .75rem;color:var(--combobox-empty-color, #9ca3af);font-size:.875rem;text-align:center}@media (max-width: 768px){.combobox-input-wrapper{min-width:150px;padding:.375rem .5rem}.combobox-input{font-size:.8125rem}.combobox-menu{max-width:200px}}";var vt;let yt,xt;function X(e,t,r){return(t=wt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jr(e,t,r,o,f,O){function S(i,s,u){return function(a,n){return u&&u(a),i[s].call(a,n)}}function m(i,s){for(var u=0;u<i.length;u++)i[u].call(s);return s}function h(i,s,u,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(s+" must "+(u||"be")+" a function"+(a?"":" or undefined"));return i}function v(i,s,u,a,n,c,g,p,T,k,y,d,x){function F(b){if(!x(b))throw new TypeError("Attempted to access private element on non-instance")}var A,N=s[0],j=s[3],z=!p;if(!z){u||Array.isArray(N)||(N=[N]);var l={},$=[],C=n===3?"get":n===4||d?"set":"value";k?(y||d?l={get:je(function(){return j(this)},a,"get"),set:function(b){s[4](this,b)}}:l[C]=j,y||je(l[C],a,n===2?"":C)):y||(l=Object.getOwnPropertyDescriptor(i,a))}for(var E=i,B=N.length-1;B>=0;B-=u?2:1){var W=N[B],G=u?N[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(b,D){if(b.v)throw Error("attempted to call addInitializer after decoration was finished");h(D,"An initializer","be",!0),g.push(D)}).bind(null,Y)};try{if(z)(A=h(W.call(G,E,M),"class decorators","return"))&&(E=A);else{var P,H;M.static=T,M.private=k,k?n===2?P=function(b){return F(b),l.value}:(n<4&&(P=S(l,"get",F)),n!==3&&(H=S(l,"set",F))):(P=function(b){return b[a]},(n<2||n===4)&&(H=function(b,D){b[a]=D}));var V=M.access={has:k?x.bind():function(b){return a in b}};if(P&&(V.get=P),H&&(V.set=H),E=W.call(G,d?{get:l.get,set:l.set}:l[C],M),d){if(typeof E=="object"&&E)(A=h(E.get,"accessor.get"))&&(l.get=A),(A=h(E.set,"accessor.set"))&&(l.set=A),(A=h(E.init,"accessor.init"))&&$.push(A);else if(E!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else h(E,(y?"field":"method")+" decorators","return")&&(y?$.push(E):l[C]=E)}}finally{Y.v=!0}}return(y||d)&&p.push(function(b,D){for(var U=$.length-1;U>=0;U--)D=$[U].call(b,D);return D}),y||z||(k?d?p.push(S(l,"get"),S(l,"set")):p.push(n===2?l[C]:S.call.bind(l[C])):Object.defineProperty(i,a,l)),E}function w(i,s){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:s})}if(arguments.length>=6)var _=O[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(_??null),L=function(i,s,u,a){var n,c,g=[],p=function(C){return Dr(C)===i},T=new Map;function k(C){C&&g.push(m.bind(null,C))}for(var y=0;y<s.length;y++){var d=s[y];if(Array.isArray(d)){var x=d[1],F=d[2],A=d.length>3,N=16&x,j=!!(8&x),z=(x&=7)==0,l=F+"/"+j;if(!z&&!A){var $=T.get(l);if($===!0||$===3&&x!==4||$===4&&x!==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: "+F);T.set(l,!(x>2)||x)}v(j?i:i.prototype,d,N,A?"#"+F:wt(F),x,a,j?c=c||[]:n=n||[],g,j,A,z,x===1,j&&A?p:u)}}return k(n),k(c),g}(e,t,f,R);return r.length||w(e,R),{e:L,get c(){var i=[];return r.length&&[w(v(e,[r],o,e.name,5,R,i),R),m.bind(null,i,e)]}}}function wt(e){var t=$r(e,"string");return typeof t=="symbol"?t:t+""}function $r(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function je(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Dr(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}xt=[I.autoRegister({tagName:"wsx-combobox"})];exports.Combobox=void 0;class zr extends I.WebComponent{constructor(t={}){super({styles:Ne,styleName:"wsx-combobox"}),X(this,"_autoStyles",Ne),X(this,"options",[]),X(this,"selectedValue",void 0),X(this,"searchQuery",void 0),X(this,"isOpen",void 0),X(this,"config",{}),X(this,"inputElement",void 0),X(this,"dropdownElement",void 0),X(this,"outsideClickHandler",void 0),X(this,"handleInput",h=>{if(!this.config.searchable)return;const v=h.target;this.searchQuery=v.value,this.rerender()}),X(this,"toggleDropdown",()=>{this.config.disabled||(this.isOpen=!this.isOpen,this.isOpen&&this.config.searchable&&this.inputElement&&this.inputElement.focus(),this.rerender(),this.isOpen?setTimeout(()=>{this.attachOutsideClickHandler()},0):(this.detachOutsideClickHandler(),this.searchQuery=""))}),X(this,"openDropdown",()=>{this.config.disabled||this.isOpen||(this.isOpen=!0,this.config.searchable&&this.inputElement&&this.inputElement.focus(),this.rerender(),setTimeout(()=>{this.attachOutsideClickHandler()},0))}),X(this,"closeDropdown",()=>{this.isOpen&&(this.isOpen=!1,this.searchQuery="",this.rerender(),this.detachOutsideClickHandler())}),X(this,"selectOption",h=>{if(this.config.multiple){const v=Array.isArray(this.selectedValue)?this.selectedValue:[],w=v.includes(h)?v.filter(_=>_!==h):[...v,h];this.selectedValue=w}else this.selectedValue=h,this.closeDropdown();this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.selectedValue},bubbles:!0}))}),X(this,"removeValue",h=>{if(!this.config.multiple)return;const v=Array.isArray(this.selectedValue)?this.selectedValue:[];this.selectedValue=v.filter(w=>w!==h),this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.selectedValue},bubbles:!0}))}),X(this,"attachOutsideClickHandler",()=>{this.outsideClickHandler=h=>{const v=h.target;this.dropdownElement&&this.inputElement&&!this.dropdownElement.contains(v)&&!this.inputElement.contains(v)&&this.closeDropdown()},document.addEventListener("click",this.outsideClickHandler,!0)}),X(this,"detachOutsideClickHandler",()=>{this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,!0),this.outsideClickHandler=void 0)}),this.config={placeholder:"Select or search...",searchable:!0,multiple:!1,align:"left",position:"bottom",...t};const[r,o]=this.useState("selectedValue","");Object.defineProperty(this,"selectedValue",{get:r,set:o,enumerable:!0,configurable:!0});const[f,O]=this.useState("searchQuery","");Object.defineProperty(this,"searchQuery",{get:f,set:O,enumerable:!0,configurable:!0});const[S,m]=this.useState("isOpen",!1);Object.defineProperty(this,"isOpen",{get:S,set:m,enumerable:!0,configurable:!0})}setOptions(t){this.options=t,this.rerender()}setValue(t){if(this.selectedValue=t,this.inputElement&&!this.config.multiple){const r=this.options.find(o=>o.value===(Array.isArray(t)?t[0]:t));this.inputElement.value=(r==null?void 0:r.label)||""}this.rerender(),this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0}))}getValue(){return this.selectedValue}getFilteredOptions(){if(!this.config.searchable||!this.searchQuery.trim())return this.options;const t=this.searchQuery.toLowerCase();return this.options.filter(r=>r.label.toLowerCase().includes(t)||r.value.toLowerCase().includes(t))}render(){const t=this.getFilteredOptions(),r=this.config.multiple,o=Array.isArray(this.selectedValue)?this.selectedValue:this.selectedValue?[this.selectedValue]:[];let f="";if(r)if(o.length===0)f=this.config.placeholder||"Select...";else if(o.length===1){const O=this.options.find(S=>S.value===o[0]);f=(O==null?void 0:O.label)||o[0]}else f=`${o.length} selected`;else{const O=this.options.find(S=>S.value===this.selectedValue);f=(O==null?void 0:O.label)||this.config.placeholder||"Select..."}return I.jsx("div",{class:"combobox-container"},I.jsx("div",{class:"combobox-input-wrapper"},r&&o.length>0&&I.jsx("div",{class:"combobox-tags"},o.slice(0,2).map(O=>{const S=this.options.find(m=>m.value===O);return I.jsx("span",{key:O,class:"combobox-tag"},(S==null?void 0:S.label)||O,I.jsx("button",{class:"combobox-tag-remove",onClick:m=>{m.stopPropagation(),this.removeValue(O)},"data-wsx-key":"Combobox-button-text-3"},"×"))}),o.length>2&&I.jsx("span",{class:"combobox-tag-more"},"+",o.length-2)),I.jsx("input",{ref:O=>this.inputElement=O,type:"text",class:"combobox-input",placeholder:f,value:this.config.searchable&&this.isOpen?this.searchQuery:"",onInput:this.handleInput,onFocus:this.openDropdown,onClick:this.openDropdown,disabled:this.config.disabled,readonly:!this.config.searchable,"data-wsx-key":"Combobox-input-text-1-3"}),I.jsx("button",{class:`combobox-arrow ${this.isOpen?"open":""}`,onClick:this.toggleDropdown,disabled:this.config.disabled,"data-wsx-key":"Combobox-button-text-1-5"},this.isOpen?"▲":"▼")),this.isOpen&&I.jsx("div",{ref:O=>this.dropdownElement=O,class:`combobox-menu combobox-${this.config.position} combobox-${this.config.align}`,role:"listbox"},t.length===0?I.jsx("div",{class:"combobox-empty"},this.config.searchable&&this.searchQuery?"No results found":"No options"):t.map(O=>{const S=r?o.includes(O.value):O.value===this.selectedValue;return I.jsx("button",{key:O.value,class:`combobox-option ${S?"selected":""} ${O.disabled?"disabled":""}`,onClick:()=>!O.disabled&&this.selectOption(O.value),role:"option","aria-selected":S,disabled:O.disabled,"data-wsx-key":"Combobox-button-text-0"},r&&I.jsx("span",{class:"combobox-checkbox"},S?"✓":""),O.render?O.render():I.jsx("span",null,O.label))})))}onDisconnected(){this.detachOutsideClickHandler()}}vt=zr;[exports.Combobox,yt]=jr(vt,[],xt,0,void 0,I.WebComponent).c;yt();class xe{static detect(t){const{container:r,items:o,gap:f=16,reservedWidth:O=0,overflowButtonWidth:S=0,padding:m=0,minVisibleItems:h=1}=t;if(!r||o.length===0)return{visibleIndices:[],hiddenIndices:[],needsOverflow:!1};const w=r.offsetWidth-O-m*2;let _=0;const R=[],L=[];for(let a=0;a<o.length;a++){const n=o[a];if(!n||n.offsetWidth===0){R.push(a);continue}const c=n.offsetWidth+(a>0?f:0);_+c<=w?(_+=c,R.push(a)):L.push(a)}if(L.length===0)return{visibleIndices:R,hiddenIndices:[],needsOverflow:!1};const i=w-S-f;_=0;const s=[],u=[];for(let a=0;a<o.length;a++){const n=o[a];if(!n||n.offsetWidth===0){s.length<h?s.push(a):u.push(a);continue}const c=n.offsetWidth+(s.length>0?f:0);_+c<=i?(_+=c,s.push(a)):u.push(a)}if(s.length<h&&o.length>0){const a=h-s.length,n=u.splice(0,a);s.push(...n),s.sort((c,g)=>c-g)}return{visibleIndices:s,hiddenIndices:u,needsOverflow:u.length>0}}static calculateTotalWidth(t,r=16){return t.length===0?0:t.reduce((o,f,O)=>{const S=f.offsetWidth||0;return o+S+(O>0?r:0)},0)}static getElementTotalWidth(t){if(!t)return 0;const r=window.getComputedStyle(t),o=t.offsetWidth,f=parseFloat(r.marginLeft)||0,O=parseFloat(r.marginRight)||0;return o+f+O}}const $e=':host{display:block}.responsive-nav{position:fixed;top:0;left:0;right:0;z-index:1000;background:var(--nav-bg, var(--bg-primary));-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);border-bottom:1px solid var(--nav-border, var(--border-color));transition:all .3s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 3px #0000000d}.responsive-nav.nav-scrolled{background:var(--nav-bg-scrolled, var(--bg-primary));box-shadow:0 4px 24px var(--nav-shadow, var(--card-shadow));border-bottom-color:var(--nav-border, var(--border-color))}.nav-container{max-width:1280px;margin:0 auto;padding:0 2rem;display:flex;align-items:center;justify-content:space-between;height:72px;gap:1.5rem}.nav-brand{display:flex;align-items:center;gap:.75rem;font-weight:800;font-size:1.5rem;color:var(--nav-brand-color, var(--text-primary));flex-shrink:0;transition:transform .2s ease;cursor:pointer}.nav-brand:hover{transform:scale(1.05)}.nav-brand-icon{display:flex;align-items:center;font-size:1.8rem;transition:transform .3s ease}.nav-brand:hover .nav-brand-icon{transform:rotate(5deg) scale(1.1)}.nav-brand-text{background:linear-gradient(135deg,var(--hero-gradient-start, var(--primary-red)),var(--hero-gradient-end, var(--accent-orange)));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;letter-spacing:-.02em;position:relative}.nav-menu{display:flex;align-items:center;gap:.5rem;flex:1;justify-content:flex-end;overflow:visible;padding-right:.5rem}wsx-link.nav-link{display:inline-flex;align-items:center;flex-shrink:0}wsx-link.nav-link::part(link){color:var(--nav-link-color, var(--text-secondary));text-decoration:none!important;font-weight:500;font-size:.95rem;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;white-space:nowrap;padding:.5rem .75rem;border-radius:.5rem;display:inline-flex;align-items:center}wsx-link.nav-link::part(link):hover{color:var(--nav-link-hover-color, var(--text-primary));background:var(--nav-link-hover-bg, var(--bg-secondary));text-decoration:none!important;transform:translateY(-1px)}wsx-link.nav-link::part(link):after{content:none!important;display:none!important;width:0!important;height:0!important;background:none!important}wsx-link.nav-link::part(link):hover:after{content:none!important;display:none!important;width:0!important;height:0!important;background:none!important}wsx-link.nav-link::part(link):before{display:none}wsx-link.nav-link[active]::part(link),wsx-link.nav-link.nav-link-active::part(link){color:var(--nav-link-active-color, var(--primary-red))!important;font-weight:600;background:var(--nav-link-active-bg, var(--bg-secondary));text-decoration:none!important}wsx-link.nav-link[active]::part(link):after,wsx-link.nav-link.nav-link-active::part(link):after{content:none!important;display:none!important;width:0!important;height:0!important;background:none!important}wsx-link.nav-link[active]::part(link):before,wsx-link.nav-link.nav-link-active::part(link):before{content:"";display:block;position:absolute;bottom:.125rem;left:50%;transform:translate(-50%);width:calc(100% - 1.5rem);height:3px;background:linear-gradient(135deg,var(--hero-gradient-start, var(--primary-red)),var(--hero-gradient-end, var(--accent-orange)));border-radius:2px;z-index:1}.nav-link{color:var(--nav-link-color, var(--text-secondary));text-decoration:none;font-weight:500;font-size:.95rem;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;white-space:nowrap;flex-shrink:0;padding:.5rem .75rem;border-radius:.5rem;display:inline-flex;align-items:center}.nav-link:hover{color:var(--nav-link-hover-color, var(--text-primary));background:var(--nav-link-hover-bg, var(--bg-secondary));transform:translateY(-1px)}.nav-link:after{content:"";position:absolute;bottom:.25rem;left:50%;transform:translate(-50%);width:0;height:2px;background:linear-gradient(135deg,var(--hero-gradient-start, var(--primary-red)),var(--hero-gradient-end, var(--accent-orange)));border-radius:2px;transition:width .3s cubic-bezier(.4,0,.2,1)}.nav-link:hover:after{width:calc(100% - 1.5rem)}.nav-link-active{color:var(--nav-link-active-color, var(--primary-red))!important;font-weight:600;background:var(--nav-link-active-bg, var(--bg-secondary))}.nav-link-active:after{width:calc(100% - 1.5rem)!important;height:3px!important;bottom:.125rem!important}.nav-overflow{position:relative;flex-shrink:0}.nav-overflow-button{padding:.5rem .875rem;background:var(--nav-overflow-bg, transparent);border:1px solid var(--nav-overflow-border, var(--border-color));border-radius:.5rem;color:var(--nav-link-color, var(--text-secondary));cursor:pointer;font-size:.875rem;font-weight:500;transition:all .25s cubic-bezier(.4,0,.2,1);display:inline-flex;align-items:center;gap:.25rem}.nav-overflow-button:hover{background:var(--nav-overflow-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));border-color:var(--nav-overflow-hover-border, var(--border-color));transform:translateY(-1px);box-shadow:0 2px 8px var(--card-shadow)}.nav-overflow-menu{position:absolute;top:calc(100% + .75rem);right:0;min-width:180px;background:var(--nav-overflow-menu-bg, var(--bg-primary));border:1px solid var(--nav-overflow-menu-border, var(--border-color));border-radius:.75rem;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a;padding:.5rem;z-index:1001;-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);animation:slideDown .2s cubic-bezier(.4,0,.2,1)}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}wsx-link.nav-overflow-link::part(link){display:block;padding:.625rem .875rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none!important;font-weight:500;font-size:.9rem;border-radius:.5rem;transition:all .2s cubic-bezier(.4,0,.2,1);margin-bottom:.25rem;border-left:3px solid transparent}wsx-link.nav-overflow-link::part(link):hover{background:var(--nav-overflow-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));text-decoration:none!important;transform:translate(4px)}wsx-link.nav-overflow-link[active]::part(link),wsx-link.nav-overflow-link.nav-link-active::part(link){background:var(--nav-overflow-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);padding-left:.625rem}.nav-overflow-link{display:block;padding:.625rem .875rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none;font-weight:500;font-size:.9rem;border-radius:.5rem;transition:all .2s cubic-bezier(.4,0,.2,1);margin-bottom:.25rem;border-left:3px solid transparent}.nav-overflow-link:hover{background:var(--nav-overflow-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));transform:translate(4px)}.nav-overflow-link.nav-link-active{background:var(--nav-overflow-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);padding-left:.625rem}.nav-actions{display:flex;align-items:center;gap:.75rem;flex-shrink:0;margin-left:.5rem;z-index:1002;padding-left:.75rem;border-left:1px solid var(--nav-actions-border, var(--border-color))}.nav-action{display:flex;align-items:center;transition:transform .2s ease}.nav-action:hover{transform:scale(1.05)}.nav-toggle{display:none;flex-direction:column;gap:5px;background:var(--nav-toggle-bg, transparent);border:1px solid var(--nav-toggle-border, var(--border-color));border-radius:.5rem;cursor:pointer;padding:.625rem .5rem;z-index:1001;transition:all .25s ease}.nav-toggle:hover{background:var(--nav-toggle-hover-bg, var(--bg-secondary));border-color:var(--nav-toggle-hover-border, var(--border-color))}.nav-toggle-line{width:24px;height:3px;background:var(--nav-toggle-color, var(--text-primary));border-radius:3px;transition:all .3s cubic-bezier(.4,0,.2,1);transform-origin:center}.nav-toggle-line.open:nth-child(1){transform:rotate(45deg) translate(8px,8px)}.nav-toggle-line.open:nth-child(2){opacity:0}.nav-toggle-line.open:nth-child(3){transform:rotate(-45deg) translate(7px,-7px)}.nav-mobile-menu{position:fixed;top:72px;left:0;right:0;background:var(--nav-mobile-bg, var(--bg-primary));-webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);flex-direction:column;padding:1.5rem;gap:.5rem;transform:translateY(-100%);opacity:0;visibility:hidden;transition:all .3s cubic-bezier(.4,0,.2,1);border-bottom:1px solid var(--nav-border, var(--border-color));max-height:calc(100vh - 72px);overflow-y:auto;z-index:999;box-shadow:0 4px 24px #0000001a}.nav-mobile-menu.open{transform:translateY(0);opacity:1;visibility:visible}wsx-link.nav-mobile-link::part(link){display:block;padding:.875rem 1.25rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none!important;font-weight:500;font-size:1rem;border-radius:.625rem;transition:all .25s cubic-bezier(.4,0,.2,1);border-left:3px solid transparent}wsx-link.nav-mobile-link::part(link):hover{background:var(--nav-mobile-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));text-decoration:none!important;transform:translate(4px);border-left-color:var(--primary-red)}wsx-link.nav-mobile-link[active]::part(link),wsx-link.nav-mobile-link.nav-link-active::part(link){background:var(--nav-mobile-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);box-shadow:0 2px 8px var(--card-shadow)}.nav-mobile-link{display:block;padding:.875rem 1.25rem;color:var(--nav-link-color, var(--text-secondary));text-decoration:none;font-weight:500;font-size:1rem;border-radius:.625rem;transition:all .25s cubic-bezier(.4,0,.2,1);border-left:3px solid transparent}.nav-mobile-link:hover{background:var(--nav-mobile-link-hover-bg, var(--bg-secondary));color:var(--nav-link-hover-color, var(--text-primary));transform:translate(4px);border-left-color:var(--primary-red)}.nav-mobile-link.nav-link-active{background:var(--nav-mobile-link-active-bg, var(--bg-secondary));color:var(--nav-link-active-color, var(--primary-red));font-weight:600;border-left-color:var(--primary-red);box-shadow:0 2px 8px var(--card-shadow)}@media (max-width: 768px){.nav-container{padding:0 1.25rem;height:68px}.nav-brand{font-size:1.35rem}.nav-menu{display:none}.nav-actions{margin-left:0;gap:.5rem;padding-left:.5rem;border-left:none}.nav-toggle{display:flex;margin-left:.5rem}.nav-mobile-menu{display:flex;top:68px;max-height:calc(100vh - 68px)}}@media (min-width: 769px){.nav-mobile-menu{display:none!important}}@media (prefers-reduced-motion: no-preference){.responsive-nav,.nav-link,.nav-overflow-button,.nav-toggle{transition-duration:.25s}}@media (prefers-reduced-motion: reduce){.responsive-nav,.nav-link,.nav-overflow-button,.nav-toggle,.nav-mobile-menu{transition:none;animation:none}}';var kt;let Et,St;function q(e,t,r){return(t=At(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mr(e,t,r,o,f,O){function S(i,s,u){return function(a,n){return u&&u(a),i[s].call(a,n)}}function m(i,s){for(var u=0;u<i.length;u++)i[u].call(s);return s}function h(i,s,u,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(s+" must "+(u||"be")+" a function"+(a?"":" or undefined"));return i}function v(i,s,u,a,n,c,g,p,T,k,y,d,x){function F(b){if(!x(b))throw new TypeError("Attempted to access private element on non-instance")}var A,N=s[0],j=s[3],z=!p;if(!z){u||Array.isArray(N)||(N=[N]);var l={},$=[],C=n===3?"get":n===4||d?"set":"value";k?(y||d?l={get:De(function(){return j(this)},a,"get"),set:function(b){s[4](this,b)}}:l[C]=j,y||De(l[C],a,n===2?"":C)):y||(l=Object.getOwnPropertyDescriptor(i,a))}for(var E=i,B=N.length-1;B>=0;B-=u?2:1){var W=N[B],G=u?N[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(b,D){if(b.v)throw Error("attempted to call addInitializer after decoration was finished");h(D,"An initializer","be",!0),g.push(D)}).bind(null,Y)};try{if(z)(A=h(W.call(G,E,M),"class decorators","return"))&&(E=A);else{var P,H;M.static=T,M.private=k,k?n===2?P=function(b){return F(b),l.value}:(n<4&&(P=S(l,"get",F)),n!==3&&(H=S(l,"set",F))):(P=function(b){return b[a]},(n<2||n===4)&&(H=function(b,D){b[a]=D}));var V=M.access={has:k?x.bind():function(b){return a in b}};if(P&&(V.get=P),H&&(V.set=H),E=W.call(G,d?{get:l.get,set:l.set}:l[C],M),d){if(typeof E=="object"&&E)(A=h(E.get,"accessor.get"))&&(l.get=A),(A=h(E.set,"accessor.set"))&&(l.set=A),(A=h(E.init,"accessor.init"))&&$.push(A);else if(E!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else h(E,(y?"field":"method")+" decorators","return")&&(y?$.push(E):l[C]=E)}}finally{Y.v=!0}}return(y||d)&&p.push(function(b,D){for(var U=$.length-1;U>=0;U--)D=$[U].call(b,D);return D}),y||z||(k?d?p.push(S(l,"get"),S(l,"set")):p.push(n===2?l[C]:S.call.bind(l[C])):Object.defineProperty(i,a,l)),E}function w(i,s){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:s})}if(arguments.length>=6)var _=O[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(_??null),L=function(i,s,u,a){var n,c,g=[],p=function(C){return Br(C)===i},T=new Map;function k(C){C&&g.push(m.bind(null,C))}for(var y=0;y<s.length;y++){var d=s[y];if(Array.isArray(d)){var x=d[1],F=d[2],A=d.length>3,N=16&x,j=!!(8&x),z=(x&=7)==0,l=F+"/"+j;if(!z&&!A){var $=T.get(l);if($===!0||$===3&&x!==4||$===4&&x!==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: "+F);T.set(l,!(x>2)||x)}v(j?i:i.prototype,d,N,A?"#"+F:At(F),x,a,j?c=c||[]:n=n||[],g,j,A,z,x===1,j&&A?p:u)}}return k(n),k(c),g}(e,t,f,R);return r.length||w(e,R),{e:L,get c(){var i=[];return r.length&&[w(v(e,[r],o,e.name,5,R,i),R),m.bind(null,i,e)]}}}function At(e){var t=Pr(e,"string");return typeof t=="symbol"?t:t+""}function Pr(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function De(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Br(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}St=[I.autoRegister({tagName:"wsx-responsive-nav"})];exports.ResponsiveNav=void 0;class Hr extends I.WebComponent{constructor(t){super({styles:$e,styleName:"wsx-responsive-nav"}),q(this,"_autoStyles",$e),q(this,"navConfig",{items:[]}),q(this,"isMobileMenuOpen",void 0),q(this,"visibleItemIndices",void 0),q(this,"hiddenItemIndices",void 0),q(this,"isMobile",void 0),q(this,"isOverflowOpen",void 0),q(this,"navMenuElement",void 0),q(this,"navItemsElements",[]),q(this,"resizeObserver",void 0),q(this,"resizeHandler",void 0),q(this,"toggleMobileMenu",()=>{this.isMobileMenuOpen=!this.isMobileMenuOpen,this.rerender()}),q(this,"closeMobileMenu",()=>{this.isMobileMenuOpen=!1,this.rerender()}),q(this,"toggleOverflow",()=>{this.isOverflowOpen=!this.isOverflowOpen,this.rerender(),this.isOverflowOpen?setTimeout(()=>{document.addEventListener("click",this.handleOverflowOutsideClick,!0)},0):document.removeEventListener("click",this.handleOverflowOutsideClick,!0)}),q(this,"closeOverflow",()=>{this.isOverflowOpen=!1,this.rerender(),document.removeEventListener("click",this.handleOverflowOutsideClick,!0)}),q(this,"handleOverflowOutsideClick",w=>{const _=w.target,R=this.querySelector(".nav-overflow"),L=R==null?void 0:R.querySelector(".nav-overflow-menu"),i=R==null?void 0:R.querySelector(".nav-overflow-button");L&&i&&!L.contains(_)&&!i.contains(_)&&this.closeOverflow()}),q(this,"updateVisibleItems",()=>{var n;if(!this.navConfig.autoOverflow||this.isMobile||!this.navMenuElement){if(!this.isMobile){const c=this.navConfig.items.map((g,p)=>p);JSON.stringify(c.sort())!==JSON.stringify(this.visibleItemIndices.sort())&&(this.visibleItemIndices=c,this.hiddenItemIndices=[],this.rerender())}return}const w=[];for(let c=0;c<this.navConfig.items.length;c++){let g=this.navItemsElements[c];if(!g){const p=Array.from(this.navMenuElement.querySelectorAll(".nav-link"));p[c]&&(g=p[c],this.navItemsElements[c]=g)}if(g)w.push(g);else{const p=document.createElement("wsx-link");p.textContent=this.navConfig.items[c].label,p.style.visibility="hidden",p.style.position="absolute",document.body.appendChild(p),w.push(p),setTimeout(()=>{p.parentElement&&p.parentElement.removeChild(p)},0)}}const _=(n=this.navMenuElement.parentElement)==null?void 0:n.querySelector(".nav-actions"),R=_?Array.from(_.children).reduce((c,g)=>c+xe.getElementTotalWidth(g),0)+8:0,s=xe.detect({container:this.navMenuElement,items:w,gap:16,reservedWidth:R,overflowButtonWidth:90,padding:0,minVisibleItems:1}),u=s.visibleIndices,a=s.hiddenIndices;w.forEach(c=>{c.parentElement===document.body&&document.body.removeChild(c)}),(JSON.stringify(u.sort())!==JSON.stringify(this.visibleItemIndices.sort())||JSON.stringify(a.sort())!==JSON.stringify(this.hiddenItemIndices.sort()))&&(this.visibleItemIndices=u,this.hiddenItemIndices=a,this.rerender())}),q(this,"checkMobile",()=>{const w=window.innerWidth<=(this.navConfig.mobileBreakpoint||768);w!==this.isMobile&&(this.isMobile=w,this.rerender())}),t&&(this.navConfig={mobileBreakpoint:768,autoOverflow:!0,...t},this.visibleItemIndices=t.items.map((w,_)=>_));const[r,o]=this.useState("isMobileMenuOpen",!1);Object.defineProperty(this,"isMobileMenuOpen",{get:r,set:o,enumerable:!0,configurable:!0});let f=this.reactive([]);Object.defineProperty(this,"visibleItemIndices",{get:()=>f,set:w=>{f=w!==null&&typeof w<"u"&&(Array.isArray(w)||typeof w=="object")?this.reactive(w):w,this.scheduleRerender()},enumerable:!0,configurable:!0});let O=this.reactive([]);Object.defineProperty(this,"hiddenItemIndices",{get:()=>O,set:w=>{O=w!==null&&typeof w<"u"&&(Array.isArray(w)||typeof w=="object")?this.reactive(w):w,this.scheduleRerender()},enumerable:!0,configurable:!0});const[S,m]=this.useState("isMobile",!1);Object.defineProperty(this,"isMobile",{get:S,set:m,enumerable:!0,configurable:!0});const[h,v]=this.useState("isOverflowOpen",!1);Object.defineProperty(this,"isOverflowOpen",{get:h,set:v,enumerable:!0,configurable:!0})}render(){if(!this.navConfig.items||this.navConfig.items.length===0)return I.jsx("nav",{class:"responsive-nav"});const t=this.hiddenItemIndices.map(r=>this.navConfig.items[r]);return I.jsx("nav",{class:"responsive-nav"},I.jsx("div",{class:"nav-container"},I.jsx("div",{class:"nav-brand"},I.jsx("slot",{name:"brand-icon"},this.navConfig.brandIcon&&typeof this.navConfig.brandIcon=="string"&&I.jsx("span",{class:"nav-brand-icon"},this.navConfig.brandIcon)),this.navConfig.brand&&I.jsx("span",{class:"nav-brand-text"},this.navConfig.brand)),!this.isMobile&&I.jsx("div",{ref:r=>this.navMenuElement=r,class:"nav-menu"},this.navConfig.items.map((r,o)=>{const f=this.visibleItemIndices.includes(o);return I.jsx("wsx-link",{key:o,ref:O=>{O&&(this.navItemsElements[o]=O)},to:r.to,class:`nav-link ${f?"":"hidden-item"}`,"active-class":"nav-link-active",exact:r.exact,style:f?"":"position: absolute; visibility: hidden; pointer-events: none;"},r.label)}),this.navConfig.autoOverflow&&t.length>0&&!this.isMobile&&I.jsx("div",{class:"nav-overflow"},I.jsx("button",{class:"nav-overflow-button",onClick:this.toggleOverflow,"data-wsx-key":"ResponsiveNav-button-text-1-1"},"More ▼"),this.isOverflowOpen&&I.jsx("div",{class:"nav-overflow-menu"},t.map((r,o)=>{const f=this.hiddenItemIndices[o];return I.jsx("wsx-link",{key:f,to:r.to,class:"nav-overflow-link","active-class":"nav-link-active",exact:r.exact,onClick:this.closeOverflow},r.label)})))),this.navConfig.actionTags&&I.jsx("div",{class:"nav-actions"},this.navConfig.actionTags.map((r,o)=>{const f=r;return I.jsx("div",{key:o,class:"nav-action"},I.jsx(f,null))})),this.isMobile&&I.jsx("button",{class:"nav-toggle",onClick:this.toggleMobileMenu,"data-wsx-key":"ResponsiveNav-button-text-1"},I.jsx("span",{class:`nav-toggle-line ${this.isMobileMenuOpen?"open":""}`}),I.jsx("span",{class:`nav-toggle-line ${this.isMobileMenuOpen?"open":""}`}),I.jsx("span",{class:`nav-toggle-line ${this.isMobileMenuOpen?"open":""}`}))),this.isMobile&&I.jsx("div",{class:`nav-mobile-menu ${this.isMobileMenuOpen?"open":""}`},this.navConfig.items.filter(r=>!r.hideOnMobile).map((r,o)=>I.jsx("wsx-link",{key:o,to:r.to,class:"nav-mobile-link","active-class":"nav-link-active",exact:r.exact,onClick:this.closeMobileMenu},r.label))))}onConnected(){if(!this.navConfig.items||this.navConfig.items.length===0){const r=this.getAttribute("config");if(r)try{const o=JSON.parse(r);this.navConfig={mobileBreakpoint:768,autoOverflow:!0,...o},this.visibleItemIndices=o.items.map((f,O)=>O),this.rerender()}catch(o){console.error("Failed to parse ResponsiveNav config:",o)}}this.checkMobile();const t=(r=0)=>{r>10||setTimeout(()=>{this.navMenuElement&&(this.navConfig.items.every((f,O)=>this.navItemsElements[O])||r>5?this.updateVisibleItems():t(r+1))},50)};t(),this.resizeHandler=()=>{this.checkMobile(),setTimeout(()=>{this.updateVisibleItems()},100)},window.addEventListener("resize",this.resizeHandler),setTimeout(()=>{this.navMenuElement&&window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{setTimeout(()=>{this.updateVisibleItems()},0)}),this.resizeObserver.observe(this.navMenuElement))},0)}onDisconnected(){this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.resizeObserver&&this.resizeObserver.disconnect()}}kt=Hr;[exports.ResponsiveNav,Et]=Mr(kt,[],St,0,void 0,I.WebComponent).c;Et();var Ct;let Ot,Tt;function me(e,t,r){return(t=_t(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ur(e,t,r,o,f,O){function S(i,s,u){return function(a,n){return u&&u(a),i[s].call(a,n)}}function m(i,s){for(var u=0;u<i.length;u++)i[u].call(s);return s}function h(i,s,u,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(s+" must "+(u||"be")+" a function"+(a?"":" or undefined"));return i}function v(i,s,u,a,n,c,g,p,T,k,y,d,x){function F(b){if(!x(b))throw new TypeError("Attempted to access private element on non-instance")}var A,N=s[0],j=s[3],z=!p;if(!z){u||Array.isArray(N)||(N=[N]);var l={},$=[],C=n===3?"get":n===4||d?"set":"value";k?(y||d?l={get:ze(function(){return j(this)},a,"get"),set:function(b){s[4](this,b)}}:l[C]=j,y||ze(l[C],a,n===2?"":C)):y||(l=Object.getOwnPropertyDescriptor(i,a))}for(var E=i,B=N.length-1;B>=0;B-=u?2:1){var W=N[B],G=u?N[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(b,D){if(b.v)throw Error("attempted to call addInitializer after decoration was finished");h(D,"An initializer","be",!0),g.push(D)}).bind(null,Y)};try{if(z)(A=h(W.call(G,E,M),"class decorators","return"))&&(E=A);else{var P,H;M.static=T,M.private=k,k?n===2?P=function(b){return F(b),l.value}:(n<4&&(P=S(l,"get",F)),n!==3&&(H=S(l,"set",F))):(P=function(b){return b[a]},(n<2||n===4)&&(H=function(b,D){b[a]=D}));var V=M.access={has:k?x.bind():function(b){return a in b}};if(P&&(V.get=P),H&&(V.set=H),E=W.call(G,d?{get:l.get,set:l.set}:l[C],M),d){if(typeof E=="object"&&E)(A=h(E.get,"accessor.get"))&&(l.get=A),(A=h(E.set,"accessor.set"))&&(l.set=A),(A=h(E.init,"accessor.init"))&&$.push(A);else if(E!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else h(E,(y?"field":"method")+" decorators","return")&&(y?$.push(E):l[C]=E)}}finally{Y.v=!0}}return(y||d)&&p.push(function(b,D){for(var U=$.length-1;U>=0;U--)D=$[U].call(b,D);return D}),y||z||(k?d?p.push(S(l,"get"),S(l,"set")):p.push(n===2?l[C]:S.call.bind(l[C])):Object.defineProperty(i,a,l)),E}function w(i,s){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:s})}if(arguments.length>=6)var _=O[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(_??null),L=function(i,s,u,a){var n,c,g=[],p=function(C){return Wr(C)===i},T=new Map;function k(C){C&&g.push(m.bind(null,C))}for(var y=0;y<s.length;y++){var d=s[y];if(Array.isArray(d)){var x=d[1],F=d[2],A=d.length>3,N=16&x,j=!!(8&x),z=(x&=7)==0,l=F+"/"+j;if(!z&&!A){var $=T.get(l);if($===!0||$===3&&x!==4||$===4&&x!==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: "+F);T.set(l,!(x>2)||x)}v(j?i:i.prototype,d,N,A?"#"+F:_t(F),x,a,j?c=c||[]:n=n||[],g,j,A,z,x===1,j&&A?p:u)}}return k(n),k(c),g}(e,t,f,R);return r.length||w(e,R),{e:L,get c(){var i=[];return r.length&&[w(v(e,[r],o,e.name,5,R,i),R),m.bind(null,i,e)]}}}function _t(e){var t=Gr(e,"string");return typeof t=="symbol"?t:t+""}function Gr(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ze(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Wr(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}const Me=tt("SvgIcon");Tt=[I.autoRegister({tagName:"svg-icon"})];exports.SvgIcon=void 0;class Vr extends I.WebComponent{constructor(){super(),me(this,"handleClick",t=>{Me.debug("SVG icon clicked",{name:this.getAttribute("name")}),this.dispatchEvent(new CustomEvent("icon-click",{detail:{name:this.getAttribute("name"),originalEvent:t},bubbles:!0}))}),me(this,"handleMouseEnter",t=>{const r=t.target;r.style.transform="scale(1.1)"}),me(this,"handleMouseLeave",t=>{const r=t.target;r.style.transform="scale(1)"})}render(){const t=this.getAttribute("size")||"24",r=this.getAttribute("color")||"currentColor",o=this.getAttribute("name")||"star",f={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"},O=f[o]||f.star;return I.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"svg-icon",onClick:this.handleClick,style:"cursor: pointer; transition: transform 0.2s ease; display: inline-block;",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},I.jsx("path",{d:O,fill:r}))}static get observedAttributes(){return["name","size","color"]}onAttributeChanged(t,r,o){Me.debug(`Attribute ${t} changed from ${r} to ${o}`),this.connected&&this.rerender()}}Ct=Vr;[exports.SvgIcon,Ot]=Ur(Ct,[],Tt,0,void 0,I.WebComponent).c;Ot();const Pe=".code-block{background:var(--bg-secondary, #f9fafb);border-radius:12px;overflow:hidden;box-shadow:0 8px 30px #0000001a;border:1px solid var(--border-color, #e5e7eb)}.code-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:var(--bg-primary, #ffffff);border-bottom:1px solid var(--border-color, #e5e7eb)}.code-title{color:var(--text-primary, #111827);font-weight:600;font-size:.9rem}.code-actions{display:flex;gap:.75rem}.btn-copy,.btn-try{padding:.5rem 1rem;border-radius:6px;font-size:.875rem;font-weight:600;cursor:pointer;transition:all .2s ease;border:none;font-family:inherit}.btn-copy{background:var(--border-color, #e5e7eb);color:var(--text-primary, #111827)}.btn-copy:hover{background:var(--text-secondary, #6b7280);color:var(--bg-primary, #ffffff)}.btn-copy.copied{background:#10b981;color:#fff}.btn-try{background:linear-gradient(135deg,#ea580c,#f97316);color:#fff}.btn-try:hover{transform:translateY(-2px);box-shadow:0 4px 15px #ea580c4d}.code-content{padding:2rem;margin:0;background:#f8f9fa;color:#24292e;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:.9rem;line-height:1.6;overflow-x:auto;position:relative}@media (prefers-color-scheme: dark){.code-content{background:#2d2d2d;color:#f8f8f2}}.code-segment{margin:0;padding:0;background:transparent}.code-segment:not(:last-child){margin-bottom:1.5rem}.code-content code{display:block;white-space:pre;word-wrap:normal;word-break:normal;tab-size:4;-moz-tab-size:4;-o-tab-size:4}.code-content code[class*=language-]{background:transparent}.code-content .token.comment,.code-content .token.prolog,.code-content .token.doctype,.code-content .token.cdata{color:#5a6268!important;font-style:italic}.code-content .token.punctuation{color:#1a1a1a!important}.code-content .token.property,.code-content .token.tag,.code-content .token.boolean,.code-content .token.number,.code-content .token.constant,.code-content .token.symbol,.code-content .token.deleted{color:#c7254e!important}.code-content .token.selector,.code-content .token.attr-name,.code-content .token.string,.code-content .token.char,.code-content .token.builtin,.code-content .token.inserted{color:#005cc5!important}.code-content .token.operator,.code-content .token.entity,.code-content .token.url,.code-content .language-css .token.string,.code-content .style .token.string{color:#1a1a1a!important}.code-content .token.atrule,.code-content .token.attr-value,.code-content .token.keyword{color:#d73a49!important;font-weight:600}.code-content .token.function,.code-content .token.class-name{color:#6f42c1!important}.code-content .token.regex,.code-content .token.important,.code-content .token.variable{color:#e36209!important}.code-content code[class*=language-]{color:#24292e!important}@media (prefers-color-scheme: dark){.code-content code[class*=language-]{color:#f8f8f2!important}.code-content .token.comment,.code-content .token.prolog,.code-content .token.doctype,.code-content .token.cdata{color:#75715e!important;font-style:italic}.code-content .token.punctuation{color:#f8f8f2!important}.code-content .token.property,.code-content .token.tag,.code-content .token.boolean,.code-content .token.number,.code-content .token.constant,.code-content .token.symbol,.code-content .token.deleted{color:#f92672!important}.code-content .token.selector,.code-content .token.attr-name,.code-content .token.string,.code-content .token.char,.code-content .token.builtin,.code-content .token.inserted{color:#e6db74!important}.code-content .token.operator,.code-content .token.entity,.code-content .token.url,.code-content .language-css .token.string,.code-content .style .token.string{color:#f8f8f2!important}.code-content .token.atrule,.code-content .token.attr-value,.code-content .token.keyword{color:#66d9ef!important;font-weight:500}.code-content .token.function,.code-content .token.class-name{color:#a6e22e!important}.code-content .token.regex,.code-content .token.important,.code-content .token.variable{color:#fd971f!important}}.code-content .token.namespace{opacity:.7}.code-content .token.important,.code-content .token.bold{font-weight:700}.code-content .token.italic{font-style:italic}@media (max-width: 768px){.code-header{flex-direction:column;gap:1rem;align-items:flex-start}.code-actions{width:100%;justify-content:flex-end}.code-content{padding:1.5rem;font-size:.85rem}}";var It={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
7
+ * Prism: Lightweight, robust, elegant syntax highlighting
8
+ *
9
+ * @license MIT <https://opensource.org/licenses/MIT>
10
+ * @author Lea Verou <https://lea.verou.me>
11
+ * @namespace
12
+ * @public
13
+ */var r=function(o){var f=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,O=0,S={},m={manual:o.Prism&&o.Prism.manual,disableWorkerMessageHandler:o.Prism&&o.Prism.disableWorkerMessageHandler,util:{encode:function n(c){return c instanceof h?new h(c.type,n(c.content),c.alias):Array.isArray(c)?c.map(n):c.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(n){return Object.prototype.toString.call(n).slice(8,-1)},objId:function(n){return n.__id||Object.defineProperty(n,"__id",{value:++O}),n.__id},clone:function n(c,g){g=g||{};var p,T;switch(m.util.type(c)){case"Object":if(T=m.util.objId(c),g[T])return g[T];p={},g[T]=p;for(var k in c)c.hasOwnProperty(k)&&(p[k]=n(c[k],g));return p;case"Array":return T=m.util.objId(c),g[T]?g[T]:(p=[],g[T]=p,c.forEach(function(y,d){p[d]=n(y,g)}),p);default:return c}},getLanguage:function(n){for(;n;){var c=f.exec(n.className);if(c)return c[1].toLowerCase();n=n.parentElement}return"none"},setLanguage:function(n,c){n.className=n.className.replace(RegExp(f,"gi"),""),n.classList.add("language-"+c)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(p){var n=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(p.stack)||[])[1];if(n){var c=document.getElementsByTagName("script");for(var g in c)if(c[g].src==n)return c[g]}return null}},isActive:function(n,c,g){for(var p="no-"+c;n;){var T=n.classList;if(T.contains(c))return!0;if(T.contains(p))return!1;n=n.parentElement}return!!g}},languages:{plain:S,plaintext:S,text:S,txt:S,extend:function(n,c){var g=m.util.clone(m.languages[n]);for(var p in c)g[p]=c[p];return g},insertBefore:function(n,c,g,p){p=p||m.languages;var T=p[n],k={};for(var y in T)if(T.hasOwnProperty(y)){if(y==c)for(var d in g)g.hasOwnProperty(d)&&(k[d]=g[d]);g.hasOwnProperty(y)||(k[y]=T[y])}var x=p[n];return p[n]=k,m.languages.DFS(m.languages,function(F,A){A===x&&F!=n&&(this[F]=k)}),k},DFS:function n(c,g,p,T){T=T||{};var k=m.util.objId;for(var y in c)if(c.hasOwnProperty(y)){g.call(c,y,c[y],p||y);var d=c[y],x=m.util.type(d);x==="Object"&&!T[k(d)]?(T[k(d)]=!0,n(d,g,null,T)):x==="Array"&&!T[k(d)]&&(T[k(d)]=!0,n(d,g,y,T))}}},plugins:{},highlightAll:function(n,c){m.highlightAllUnder(document,n,c)},highlightAllUnder:function(n,c,g){var p={callback:g,container:n,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};m.hooks.run("before-highlightall",p),p.elements=Array.prototype.slice.apply(p.container.querySelectorAll(p.selector)),m.hooks.run("before-all-elements-highlight",p);for(var T=0,k;k=p.elements[T++];)m.highlightElement(k,c===!0,p.callback)},highlightElement:function(n,c,g){var p=m.util.getLanguage(n),T=m.languages[p];m.util.setLanguage(n,p);var k=n.parentElement;k&&k.nodeName.toLowerCase()==="pre"&&m.util.setLanguage(k,p);var y=n.textContent,d={element:n,language:p,grammar:T,code:y};function x(A){d.highlightedCode=A,m.hooks.run("before-insert",d),d.element.innerHTML=d.highlightedCode,m.hooks.run("after-highlight",d),m.hooks.run("complete",d),g&&g.call(d.element)}if(m.hooks.run("before-sanity-check",d),k=d.element.parentElement,k&&k.nodeName.toLowerCase()==="pre"&&!k.hasAttribute("tabindex")&&k.setAttribute("tabindex","0"),!d.code){m.hooks.run("complete",d),g&&g.call(d.element);return}if(m.hooks.run("before-highlight",d),!d.grammar){x(m.util.encode(d.code));return}if(c&&o.Worker){var F=new Worker(m.filename);F.onmessage=function(A){x(A.data)},F.postMessage(JSON.stringify({language:d.language,code:d.code,immediateClose:!0}))}else x(m.highlight(d.code,d.grammar,d.language))},highlight:function(n,c,g){var p={code:n,grammar:c,language:g};if(m.hooks.run("before-tokenize",p),!p.grammar)throw new Error('The language "'+p.language+'" has no grammar.');return p.tokens=m.tokenize(p.code,p.grammar),m.hooks.run("after-tokenize",p),h.stringify(m.util.encode(p.tokens),p.language)},tokenize:function(n,c){var g=c.rest;if(g){for(var p in g)c[p]=g[p];delete c.rest}var T=new _;return R(T,T.head,n),w(n,T,c,T.head,0),i(T)},hooks:{all:{},add:function(n,c){var g=m.hooks.all;g[n]=g[n]||[],g[n].push(c)},run:function(n,c){var g=m.hooks.all[n];if(!(!g||!g.length))for(var p=0,T;T=g[p++];)T(c)}},Token:h};o.Prism=m;function h(n,c,g,p){this.type=n,this.content=c,this.alias=g,this.length=(p||"").length|0}h.stringify=function n(c,g){if(typeof c=="string")return c;if(Array.isArray(c)){var p="";return c.forEach(function(x){p+=n(x,g)}),p}var T={type:c.type,content:n(c.content,g),tag:"span",classes:["token",c.type],attributes:{},language:g},k=c.alias;k&&(Array.isArray(k)?Array.prototype.push.apply(T.classes,k):T.classes.push(k)),m.hooks.run("wrap",T);var y="";for(var d in T.attributes)y+=" "+d+'="'+(T.attributes[d]||"").replace(/"/g,"&quot;")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+y+">"+T.content+"</"+T.tag+">"};function v(n,c,g,p){n.lastIndex=c;var T=n.exec(g);if(T&&p&&T[1]){var k=T[1].length;T.index+=k,T[0]=T[0].slice(k)}return T}function w(n,c,g,p,T,k){for(var y in g)if(!(!g.hasOwnProperty(y)||!g[y])){var d=g[y];d=Array.isArray(d)?d:[d];for(var x=0;x<d.length;++x){if(k&&k.cause==y+","+x)return;var F=d[x],A=F.inside,N=!!F.lookbehind,j=!!F.greedy,z=F.alias;if(j&&!F.pattern.global){var l=F.pattern.toString().match(/[imsuy]*$/)[0];F.pattern=RegExp(F.pattern.source,l+"g")}for(var $=F.pattern||F,C=p.next,E=T;C!==c.tail&&!(k&&E>=k.reach);E+=C.value.length,C=C.next){var B=C.value;if(c.length>n.length)return;if(!(B instanceof h)){var W=1,G;if(j){if(G=v($,E,n,N),!G||G.index>=n.length)break;var H=G.index,Y=G.index+G[0].length,M=E;for(M+=C.value.length;H>=M;)C=C.next,M+=C.value.length;if(M-=C.value.length,E=M,C.value instanceof h)continue;for(var P=C;P!==c.tail&&(M<Y||typeof P.value=="string");P=P.next)W++,M+=P.value.length;W--,B=n.slice(E,M),G.index-=E}else if(G=v($,0,B,N),!G)continue;var H=G.index,V=G[0],b=B.slice(0,H),D=B.slice(H+V.length),U=E+B.length;k&&U>k.reach&&(k.reach=U);var se=C.prev;b&&(se=R(c,se,b),E+=b.length),L(c,se,W);var jt=new h(y,A?m.tokenize(V,A):V,z,V);if(C=R(c,se,jt),D&&R(c,C,D),W>1){var he={cause:y+","+x,reach:U};w(n,c,g,C.prev,E,he),k&&he.reach>k.reach&&(k.reach=he.reach)}}}}}}function _(){var n={value:null,prev:null,next:null},c={value:null,prev:n,next:null};n.next=c,this.head=n,this.tail=c,this.length=0}function R(n,c,g){var p=c.next,T={value:g,prev:c,next:p};return c.next=T,p.prev=T,n.length++,T}function L(n,c,g){for(var p=c.next,T=0;T<g&&p!==n.tail;T++)p=p.next;c.next=p,p.prev=c,n.length-=T}function i(n){for(var c=[],g=n.head.next;g!==n.tail;)c.push(g.value),g=g.next;return c}if(!o.document)return o.addEventListener&&(m.disableWorkerMessageHandler||o.addEventListener("message",function(n){var c=JSON.parse(n.data),g=c.language,p=c.code,T=c.immediateClose;o.postMessage(m.highlight(p,m.languages[g],g)),T&&o.close()},!1)),m;var s=m.util.currentScript();s&&(m.filename=s.src,s.hasAttribute("data-manual")&&(m.manual=!0));function u(){m.manual||m.highlightAll()}if(!m.manual){var a=document.readyState;a==="loading"||a==="interactive"&&s&&s.defer?document.addEventListener("DOMContentLoaded",u):window.requestAnimationFrame?window.requestAnimationFrame(u):window.setTimeout(u,16)}return m}(t);e.exports&&(e.exports=r),typeof Ce<"u"&&(Ce.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(o){o.type==="entity"&&(o.attributes.title=o.content.replace(/&amp;/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(f,O){var S={};S["language-"+O]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[O]},S.cdata=/^<!\[CDATA\[|\]\]>$/i;var m={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:S}};m["language-"+O]={pattern:/[\s\S]+/,inside:r.languages[O]};var h={};h[f]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return f}),"i"),lookbehind:!0,greedy:!0,inside:m},r.languages.insertBefore("markup","cdata",h)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(o,f){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+o+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[f,"language-"+f],inside:r.languages[f]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(o){var f=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;o.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+f.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+f.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+f.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+f.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:f,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},o.languages.css.atrule.inside.rest=o.languages.css;var O=o.languages.markup;O&&(O.tag.addInlined("style","css"),O.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var o="Loading…",f=function(s,u){return"✖ Error "+s+" while fetching file: "+u},O="✖ Error: File does not exist or is empty",S={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},m="data-src-status",h="loading",v="loaded",w="failed",_="pre[data-src]:not(["+m+'="'+v+'"]):not(['+m+'="'+h+'"])';function R(s,u,a){var n=new XMLHttpRequest;n.open("GET",s,!0),n.onreadystatechange=function(){n.readyState==4&&(n.status<400&&n.responseText?u(n.responseText):n.status>=400?a(f(n.status,n.statusText)):a(O))},n.send(null)}function L(s){var u=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(s||"");if(u){var a=Number(u[1]),n=u[2],c=u[3];return n?c?[a,Number(c)]:[a,void 0]:[a,a]}}r.hooks.add("before-highlightall",function(s){s.selector+=", "+_}),r.hooks.add("before-sanity-check",function(s){var u=s.element;if(u.matches(_)){s.code="",u.setAttribute(m,h);var a=u.appendChild(document.createElement("CODE"));a.textContent=o;var n=u.getAttribute("data-src"),c=s.language;if(c==="none"){var g=(/\.(\w+)$/.exec(n)||[,"none"])[1];c=S[g]||g}r.util.setLanguage(a,c),r.util.setLanguage(u,c);var p=r.plugins.autoloader;p&&p.loadLanguages(c),R(n,function(T){u.setAttribute(m,v);var k=L(u.getAttribute("data-range"));if(k){var y=T.split(/\r\n?|\n/g),d=k[0],x=k[1]==null?y.length:k[1];d<0&&(d+=y.length),d=Math.max(0,Math.min(d-1,y.length)),x<0&&(x+=y.length),x=Math.max(0,Math.min(x,y.length)),T=y.slice(d,x).join(`
14
+ `),u.hasAttribute("data-start")||u.setAttribute("data-start",String(d+1))}a.textContent=T,r.highlightElement(a)},function(T){u.setAttribute(m,w),a.textContent=T})}}),r.plugins.fileHighlight={highlight:function(u){for(var a=(u||document).querySelectorAll(_),n=0,c;c=a[n++];)r.highlightElement(c)}};var i=!1;r.fileHighlight=function(){i||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),i=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(It);var Yr=It.exports;const Be=Xe(Yr);Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,r){var o={};o["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[r]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var f={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};f["language-"+r]={pattern:/[\s\S]+/,inside:Prism.languages[r]};var O={};O[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:f},Prism.languages.insertBefore("markup","cdata",O)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(Prism);Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},o={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:o},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:o},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:o.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:o.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var f=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],O=o.variable[1].inside,S=0;S<f.length;S++)O[f[S]]=e.languages.bash[f[S]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,o="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",f=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),O=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function S(m,h){h=(h||"").replace(/m/g,"")+"m";var v=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return o}).replace(/<<value>>/g,function(){return m});return RegExp(v,h)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return o})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return o}).replace(/<<key>>/g,function(){return"(?:"+f+"|"+O+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:S(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:S(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:S(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:S(O),lookbehind:!0,greedy:!0},number:{pattern:S(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(w){return w=w.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+w+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,f=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),O=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+f+O+"(?:"+f+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+f+O+")(?:"+f+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+f+")"+O+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+f+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(w){["url","bold","italic","strike","code-snippet"].forEach(function(_){w!==_&&(e.languages.markdown[w].inside.content.inside[_]=e.languages.markdown[_])})}),e.hooks.add("after-tokenize",function(w){if(w.language!=="markdown"&&w.language!=="md")return;function _(R){if(!(!R||typeof R=="string"))for(var L=0,i=R.length;L<i;L++){var s=R[L];if(s.type!=="code"){_(s.content);continue}var u=s.content[1],a=s.content[3];if(u&&a&&u.type==="code-language"&&a.type==="code-block"&&typeof u.content=="string"){var n=u.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");n=(/[a-z][\w-]*/i.exec(n)||[""])[0].toLowerCase();var c="language-"+n;a.alias?typeof a.alias=="string"?a.alias=[a.alias,c]:a.alias.push(c):a.alias=[c]}}}_(w.tokens)}),e.hooks.add("wrap",function(w){if(w.type==="code-block"){for(var _="",R=0,L=w.classes.length;R<L;R++){var i=w.classes[R],s=/language-(.+)/.exec(i);if(s){_=s[1];break}}var u=e.languages[_];if(u)w.content=e.highlight(v(w.content),u,_);else if(_&&_!=="none"&&e.plugins.autoloader){var a="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);w.attributes.id=a,e.plugins.autoloader.loadLanguages(_,function(){var n=document.getElementById(a);n&&(n.innerHTML=e.highlight(n.textContent,e.languages[_],_))})}}});var S=RegExp(e.languages.markup.tag.pattern.source,"gi"),m={amp:"&",lt:"<",gt:">",quot:'"'},h=String.fromCodePoint||String.fromCharCode;function v(w){var _=w.replace(S,"");return _=_.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(R,L){if(L=L.toLowerCase(),L[0]==="#"){var i;return L[1]==="x"?i=parseInt(L.slice(2),16):i=Number(L.slice(1)),h(i)}else{var s=m[L];return s||R}}),_}e.languages.md=e.languages.markdown})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,o={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[o,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:o.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:o.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":o,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:o.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:o.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,r=0;r<2;r++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism);(function(e){var t=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,o=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,f=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function O(h,v){return h=h.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return o}).replace(/<SPREAD>/g,function(){return f}),RegExp(h,v)}f=O(f).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=O(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:O(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:O(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var S=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(S).join(""):""},m=function(h){for(var v=[],w=0;w<h.length;w++){var _=h[w],R=!1;if(typeof _!="string"&&(_.type==="tag"&&_.content[0]&&_.content[0].type==="tag"?_.content[0].content[0].content==="</"?v.length>0&&v[v.length-1].tagName===S(_.content[0].content[1])&&v.pop():_.content[_.content.length-1].content==="/>"||v.push({tagName:S(_.content[0].content[1]),openedBraces:0}):v.length>0&&_.type==="punctuation"&&_.content==="{"?v[v.length-1].openedBraces++:v.length>0&&v[v.length-1].openedBraces>0&&_.type==="punctuation"&&_.content==="}"?v[v.length-1].openedBraces--:R=!0),(R||typeof _=="string")&&v.length>0&&v[v.length-1].openedBraces===0){var L=S(_);w<h.length-1&&(typeof h[w+1]=="string"||h[w+1].type==="plain-text")&&(L+=S(h[w+1]),h.splice(w+1,1)),w>0&&(typeof h[w-1]=="string"||h[w-1].type==="plain-text")&&(L=S(h[w-1])+L,h.splice(w-1,1),w--),h[w]=new e.Token("plain-text",L,null,L)}_.content&&typeof _.content!="string"&&m(_.content)}};e.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||m(h.tokens)})})(Prism);(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism);(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var r=e.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);var Ft;let Rt,Lt;function Q(e,t,r){return(t=Nt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kr(e,t,r,o,f,O){function S(i,s,u){return function(a,n){return u&&u(a),i[s].call(a,n)}}function m(i,s){for(var u=0;u<i.length;u++)i[u].call(s);return s}function h(i,s,u,a){if(typeof i!="function"&&(a||i!==void 0))throw new TypeError(s+" must "+(u||"be")+" a function"+(a?"":" or undefined"));return i}function v(i,s,u,a,n,c,g,p,T,k,y,d,x){function F(b){if(!x(b))throw new TypeError("Attempted to access private element on non-instance")}var A,N=s[0],j=s[3],z=!p;if(!z){u||Array.isArray(N)||(N=[N]);var l={},$=[],C=n===3?"get":n===4||d?"set":"value";k?(y||d?l={get:He(function(){return j(this)},a,"get"),set:function(b){s[4](this,b)}}:l[C]=j,y||He(l[C],a,n===2?"":C)):y||(l=Object.getOwnPropertyDescriptor(i,a))}for(var E=i,B=N.length-1;B>=0;B-=u?2:1){var W=N[B],G=u?N[B-1]:void 0,Y={},M={kind:["field","accessor","method","getter","setter","class"][n],name:a,metadata:c,addInitializer:(function(b,D){if(b.v)throw Error("attempted to call addInitializer after decoration was finished");h(D,"An initializer","be",!0),g.push(D)}).bind(null,Y)};try{if(z)(A=h(W.call(G,E,M),"class decorators","return"))&&(E=A);else{var P,H;M.static=T,M.private=k,k?n===2?P=function(b){return F(b),l.value}:(n<4&&(P=S(l,"get",F)),n!==3&&(H=S(l,"set",F))):(P=function(b){return b[a]},(n<2||n===4)&&(H=function(b,D){b[a]=D}));var V=M.access={has:k?x.bind():function(b){return a in b}};if(P&&(V.get=P),H&&(V.set=H),E=W.call(G,d?{get:l.get,set:l.set}:l[C],M),d){if(typeof E=="object"&&E)(A=h(E.get,"accessor.get"))&&(l.get=A),(A=h(E.set,"accessor.set"))&&(l.set=A),(A=h(E.init,"accessor.init"))&&$.push(A);else if(E!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else h(E,(y?"field":"method")+" decorators","return")&&(y?$.push(E):l[C]=E)}}finally{Y.v=!0}}return(y||d)&&p.push(function(b,D){for(var U=$.length-1;U>=0;U--)D=$[U].call(b,D);return D}),y||z||(k?d?p.push(S(l,"get"),S(l,"set")):p.push(n===2?l[C]:S.call.bind(l[C])):Object.defineProperty(i,a,l)),E}function w(i,s){return Object.defineProperty(i,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:s})}if(arguments.length>=6)var _=O[Symbol.metadata||Symbol.for("Symbol.metadata")];var R=Object.create(_??null),L=function(i,s,u,a){var n,c,g=[],p=function(C){return Zr(C)===i},T=new Map;function k(C){C&&g.push(m.bind(null,C))}for(var y=0;y<s.length;y++){var d=s[y];if(Array.isArray(d)){var x=d[1],F=d[2],A=d.length>3,N=16&x,j=!!(8&x),z=(x&=7)==0,l=F+"/"+j;if(!z&&!A){var $=T.get(l);if($===!0||$===3&&x!==4||$===4&&x!==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: "+F);T.set(l,!(x>2)||x)}v(j?i:i.prototype,d,N,A?"#"+F:Nt(F),x,a,j?c=c||[]:n=n||[],g,j,A,z,x===1,j&&A?p:u)}}return k(n),k(c),g}(e,t,f,R);return r.length||w(e,R),{e:L,get c(){var i=[];return r.length&&[w(v(e,[r],o,e.name,5,R,i),R),m.bind(null,i,e)]}}}function Nt(e){var t=qr(e,"string");return typeof t=="symbol"?t:t+""}function qr(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function He(e,t,r){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:r?r+" "+t:t})}catch{}return e}function Zr(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}Lt=[I.autoRegister({tagName:"code-block"})];exports.CodeBlock=void 0;class Xr extends I.LightComponent{static get observedAttributes(){return["code","title","language","show-copy","show-try-online","try-online-url"]}constructor(){super({styles:Pe}),Q(this,"_autoStyles",Pe),Q(this,"copied",void 0),Q(this,"highlighted",void 0),Q(this,"code",void 0),Q(this,"segments",void 0),Q(this,"codeTitle",void 0),Q(this,"language",void 0),Q(this,"showCopy",void 0),Q(this,"showTryOnline",void 0),Q(this,"tryOnlineUrl",void 0),Q(this,"onTryOnlineCallback",void 0),Q(this,"codeElements",[]),Q(this,"isHighlighting",!1),Q(this,"copyCode",async n=>{const c=n||this.code||this.segments.map(g=>g.code).join(`
15
+
16
+ `);try{await navigator.clipboard.writeText(c),this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)}catch(g){console.error("Failed to copy code:",g);const p=document.createElement("textarea");p.value=c,p.style.position="fixed",p.style.opacity="0",document.body.appendChild(p),p.select();try{document.execCommand("copy"),this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)}catch(T){console.error("Fallback copy failed:",T)}document.body.removeChild(p)}}),Q(this,"openPlayground",()=>{this.onTryOnlineCallback?this.onTryOnlineCallback():this.tryOnlineUrl?window.location.href=this.tryOnlineUrl:window.location.href="/playground"});const[t,r]=this.useState("copied",!1);Object.defineProperty(this,"copied",{get:t,set:r,enumerable:!0,configurable:!0});const[o,f]=this.useState("highlighted",!1);Object.defineProperty(this,"highlighted",{get:o,set:f,enumerable:!0,configurable:!0});const[O,S]=this.useState("code","");Object.defineProperty(this,"code",{get:O,set:S,enumerable:!0,configurable:!0});let m=this.reactive([]);Object.defineProperty(this,"segments",{get:()=>m,set:n=>{m=n!==null&&typeof n<"u"&&(Array.isArray(n)||typeof n=="object")?this.reactive(n):n,this.scheduleRerender()},enumerable:!0,configurable:!0});const[h,v]=this.useState("codeTitle","");Object.defineProperty(this,"codeTitle",{get:h,set:v,enumerable:!0,configurable:!0});const[w,_]=this.useState("language","typescript");Object.defineProperty(this,"language",{get:w,set:_,enumerable:!0,configurable:!0});const[R,L]=this.useState("showCopy",!0);Object.defineProperty(this,"showCopy",{get:R,set:L,enumerable:!0,configurable:!0});const[i,s]=this.useState("showTryOnline",!1);Object.defineProperty(this,"showTryOnline",{get:i,set:s,enumerable:!0,configurable:!0});const[u,a]=this.useState("tryOnlineUrl","");Object.defineProperty(this,"tryOnlineUrl",{get:u,set:a,enumerable:!0,configurable:!0})}onConnected(){this.code=this.getAttribute("code")||"",this.codeTitle=this.getAttribute("title")||"",this.language=this.getAttribute("language")||"typescript",this.showCopy=this.getAttribute("show-copy")!=="false",this.showTryOnline=this.getAttribute("show-try-online")==="true",this.tryOnlineUrl=this.getAttribute("try-online-url")||""}onRendered(){this.isHighlighting||this.highlightCode()}onAttributeChanged(t,r,o){if(this.connected)switch(t){case"code":this.code=o||"";break;case"title":this.codeTitle=o||"";break;case"language":this.language=o||"typescript";break;case"show-copy":this.showCopy=o!=="false";break;case"show-try-online":this.showTryOnline=o==="true";break;case"try-online-url":this.tryOnlineUrl=o||"";break}}updateConfig(t){t.segments&&t.segments.length>0?(this.segments=t.segments,this.code=""):t.code&&(this.code=t.code,this.segments=[]),this.highlighted=!1,this.codeElements=[],this.connected&&this.querySelectorAll("code[data-prism-highlighted]").forEach(r=>{r.removeAttribute("data-prism-highlighted")}),this.codeTitle=t.title||"",this.language=t.language||"typescript",this.showCopy=t.showCopy!==!1,this.showTryOnline=t.showTryOnline===!0,this.tryOnlineUrl=t.tryOnlineUrl||"",this.onTryOnlineCallback=t.onTryOnline}render(){const t=this.segments.length>0?this.segments:this.code?[{code:this.code,language:this.language}]:[];if(t.length===0)return I.jsx("div",{class:"code-block"});const r=t.map(o=>o.code).join(`
17
+
18
+ `);return I.jsx("div",{class:"code-block"},(this.codeTitle||this.showCopy||this.showTryOnline)&&I.jsx("div",{class:"code-header"},this.codeTitle&&I.jsx("span",{class:"code-title"},this.codeTitle),I.jsx("div",{class:"code-actions"},this.showCopy&&I.jsx("button",{onClick:()=>this.copyCode(r),class:`btn-copy ${this.copied?"copied":""}`,"data-wsx-key":"CodeBlock-button-text-3"},this.copied?"✓ Copied!":"Copy"),this.showTryOnline&&I.jsx("button",{onClick:this.openPlayground,class:"btn-try","data-wsx-key":"CodeBlock-button-text-3"},"Try Online"))),I.jsx("div",{class:"code-content"},t.map((o,f)=>I.jsx("pre",{key:f,class:"code-segment"},I.jsx("code",{class:`language-${o.language}`,ref:O=>{O&&(this.codeElements[f]=O)}},o.code)))))}highlightCode(){if(!this.isHighlighting){this.isHighlighting=!0;try{requestAnimationFrame(()=>{try{if(this.segments.length>0)this.segments.forEach((t,r)=>{const o=this.codeElements[r]||this.querySelectorAll("code")[r];if(o&&!o.hasAttribute("data-prism-highlighted")){const f=t.language.toLowerCase();o.className=`language-${f}`,Be.highlightElement(o),o.setAttribute("data-prism-highlighted","true")}});else if(this.code){const t=this.codeElements[0]||this.querySelector("code");if(t&&!t.hasAttribute("data-prism-highlighted")){const r=this.language.toLowerCase();t.className=`language-${r}`,Be.highlightElement(t),t.setAttribute("data-prism-highlighted","true")}}this.highlighted=!0}catch(t){console.error("Failed to highlight code:",t)}finally{this.isHighlighting=!1}})}catch(t){console.error("Failed to schedule highlight:",t),this.isHighlighting=!1}}}}Ft=Xr;[exports.CodeBlock,Rt]=Kr(Ft,[],Lt,0,void 0,I.LightComponent).c;Rt();exports.CONVERTER_BTN=vr;exports.CONVERTER_PANEL=yr;exports.OverflowDetector=xe;exports.getCustomColorCache=ot;exports.getDefaultColorCache=mr;exports.handleCSSVariables=ie;exports.setCustomColorCache=nt;exports.setDefaultColorCache=rt;exports.throttle=it;