import{g as t,S as e,i as r,a as i,b as o,v as n,s,f as l,n as a,j as d,d as u,o as c,t as h,h as p,k as f,w as m,m as v,r as b,p as g,q as w,x as y}from"./index-3cab5f92.js";import{px2rem as x,getTextWidth as $,getCanvasFont as k}from"../../../../../../js/libraries/miscTools.js";const{customElements:z}=t;function L(t,e,r){const i=t.slice();return i[26]=e[r],i[27]=e,i[28]=r,i}function j(t){let e,r,i,n,s,a,d=t[26]+"",c=t[28];const f=()=>t[14](e,c),m=()=>t[14](null,c);function w(){return t[15](t[28])}return{c(){e=l("button"),r=l("span"),i=h(d),n=p(),e.value=t[28]},m(t,l){o(t,e,l),v(e,r),v(r,i),v(e,n),f(),s||(a=b(e,"click",w),s=!0)},p(e,r){t=e,4&r&&d!==(d=t[26]+"")&&g(i,d),c!==t[28]&&(m(),c=t[28],f())},d(t){t&&u(e),m(),s=!1,a()}}}function M(t){let e,r,i,n,s,a,c,y,x,$,k,z=(null!=t[0]?t[0]:"")+"",M=t[2],T=[];for(let e=0;ee==t));r(6,n.innerHTML=t,n),r(5,p[i].style.display="none",p),r(11,u=i)}r(8,f+=1)}}function b(t,e){null!=t&&null!=e&&e[t]!=d&&(r(0,d=e[t]),r(8,f+=1))}function g(){"none"==o.style.display?r(4,o.style.display="initial",o):r(4,o.style.display="none",o)}function w(t,e){r(11,u=t),r(0,d=a[t]),null!=e&&null!=e&&e(t)}function z(){r(4,o.style.display="none",o)}function L(t,e){let r;if(null!=t&&null!=e){let i=getComputedStyle(t).getPropertyValue("--width");if(isNaN(i)||""==i){if(null==m)return m=new ResizeObserver((()=>L(t,e))),void m.observe(s);i=getComputedStyle(s).getPropertyValue("width"),r=x(parseFloat(i.slice(0,i.length-2)))}else r=parseFloat(i.slice(0,i.length-2));let o=[];for(let t=0;tr){let t=1.1*n+"rem";e.style.width=t;for(let r=0;r{n=t,r(6,n)}))}function M(t){y[t?"unshift":"push"]((()=>{s=t,r(7,s)}))}function T(t,e){y[t?"unshift":"push"]((()=>{p[e]=t,r(5,p)}))}c((()=>{h.addEventListener("focusout",z)}));const E=t=>w(t,l);function H(t){y[t?"unshift":"push"]((()=>{o=t,r(4,o)}))}function R(t){y[t?"unshift":"push"]((()=>{i=t,r(3,i)}))}return t.$$set=t=>{"callback"in t&&r(1,l=t.callback),"options"in t&&r(2,a=t.options),"value"in t&&r(0,d=t.value),"valueindex"in t&&r(11,u=t.valueindex)},t.$$.update=()=>{5&t.$$.dirty&&v(d,a),2052&t.$$.dirty&&b(u,a),24&t.$$.dirty&&L(i,o)},[d,l,a,i,o,p,n,s,f,g,w,u,j,M,T,E,H,R]}class H extends e{constructor(t){super(),this.shadowRoot.innerHTML="",r(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},E,T,s,{callback:1,options:2,value:0,valueindex:11},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["callback","options","value","valueindex"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),n()}get options(){return this.$$.ctx[2]}set options(t){this.$$set({options:t}),n()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),n()}get valueindex(){return this.$$.ctx[11]}set valueindex(t){this.$$set({valueindex:t}),n()}}z.define("select-component",H);export{H as default};