-`;var yt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Pt=t=>(...o)=>({_$litDirective$:t,values:o}),At=class{constructor(o){}get _$AU(){return this._$AM._$AU}_$AT(o,e,r){this._$Ct=o,this._$AM=e,this._$Ci=r;}_$AS(o,e){return this.update(o,e)}update(o,e){return this.render(...e)}};var{I:Rc}=en;var Hn=(t,o)=>t?._$litType$!==void 0;var qr=t=>t.strings===void 0,Fn=()=>document.createComment(""),xo=(t,o,e)=>{let r=t._$AA.parentNode,i=o===void 0?t._$AB:o._$AA;if(e===void 0){let s=r.insertBefore(Fn(),i),n=r.insertBefore(Fn(),i);e=new Rc(s,n,t,t.options);}else {let s=e._$AB.nextSibling,n=e._$AM,c=n!==t;if(c){let a;e._$AQ?.(t),e._$AM=t,e._$AP!==void 0&&(a=t._$AU)!==n._$AU&&e._$AP(a);}if(s!==i||c){let a=e._$AA;for(;a!==s;){let h=a.nextSibling;r.insertBefore(a,i),a=h;}}}return e},Ee=(t,o,e=t)=>(t._$AI(o,e),t),zc={},Kr=(t,o=zc)=>t._$AH=o,Bn=t=>t._$AH,Gr=t=>{t._$AR(),t._$AA.remove();};var Wn=(t,o,e)=>{let r=new Map;for(let i=o;i<=e;i++)r.set(t[i],i);return r},tt=Pt(class extends At{constructor(t){if(super(t),t.type!==yt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,o,e){let r;e===void 0?e=o:o!==void 0&&(r=o);let i=[],s=[],n=0;for(let c of t)i[n]=r?r(c,n):n,s[n]=e(c,n),n++;return {values:s,keys:i}}render(t,o,e){return this.dt(t,o,e).values}update(t,[o,e,r]){let i=Bn(t),{values:s,keys:n}=this.dt(o,e,r);if(!Array.isArray(i))return this.ut=n,s;let c=this.ut??=[],a=[],h,m,d=0,f=i.length-1,g=0,b=s.length-1;for(;d<=f&&g<=b;)if(i[d]===null)d++;else if(i[f]===null)f--;else if(c[d]===n[g])a[g]=Ee(i[d],s[g]),d++,g++;else if(c[f]===n[b])a[b]=Ee(i[f],s[b]),f--,b--;else if(c[d]===n[b])a[b]=Ee(i[d],s[b]),xo(t,a[b+1],i[d]),d++,b--;else if(c[f]===n[g])a[g]=Ee(i[f],s[g]),xo(t,i[d],i[f]),f--,g++;else if(h===void 0&&(h=Wn(n,g,b),m=Wn(c,d,f)),h.has(c[d]))if(h.has(c[f])){let x=m.get(n[g]),I=x!==void 0?i[x]:null;if(I===null){let E=xo(t,i[d]);Ee(E,s[g]),a[g]=E;}else a[g]=Ee(I,s[g]),xo(t,i[d],I),i[x]=null;g++;}else Gr(i[f]),f--;else Gr(i[d]),d++;for(;g<=b;){let x=xo(t,a[b+1]);Ee(x,s[g]),a[g++]=x;}for(;d<=f;){let x=i[d++];x!==null&&Gr(x);}return this.ut=n,Kr(t,a),at}});var _o=class{constructor(o){this.host=o,o.addController(this);}updateContext(){Object.assign(this.host.context,{labelPos:this.host.labelPos,labelWidth:this.host.labelWidth,readonly:this.host.readonly,viewonly:this.host.viewonly,viewAlign:this.host.viewAlign,compact:this.host.compact,border:this.host.border,group:this.host.group,layout:this.host.layout,advanced:this.host.advanced,validAt:this.host.validAt,size:this.host.size});}hostUpdate(){this.host.tagName==="AUTO-FORM"&&this.updateContext();}};var jn="important",Lc=" !"+jn,J=Pt(class extends At{constructor(t){if(super(t),t.type!==yt.ATTRIBUTE||t.name!=="style"||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((o,e)=>{let r=t[e];return r==null?o:o+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[o]){let{style:e}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(o)),this.render(o);for(let r of this.ft)o[r]==null&&(this.ft.delete(r),r.includes("-")?e.removeProperty(r):e[r]=null);for(let r in o){let i=o[r];if(i!=null){this.ft.add(r);let s=typeof i=="string"&&i.endsWith(Lc);r.includes("-")||s?e.setProperty(r,s?i.slice(0,-11):i,s?jn:""):e[r]=i;}}return at}});function B(t,o,e){return t?o(t):e?.(t)}var Ae=class{constructor(o,...e){this.initialClasses=[];this.host=o,o.addController(this),this.initialClasses=e;}_forEachClasss(o,e){o&&o.forEach(r=>{typeof r=="string"?(e(r,true),this.host.classList.add(r)):Object.entries(r).forEach(([i,s])=>{e(i,s);});});}add(...o){this.host&&o&&this._forEachClasss(o,e=>{this.host.classList.add(e);});}remove(...o){this.host&&o&&this._forEachClasss(o,e=>{this.host.classList.remove(e);});}toggle(...o){this.host&&this._forEachClasss(o,e=>{this.host.classList.toggle(e);});}use(...o){this.host&&this._forEachClasss(o,(e,r)=>{r?this.host.classList.add(e):this.host.classList.remove(e);});}has(o){return this.host.classList.contains(o)}hostConnected(){this.add(...this.initialClasses);}hostDisconnected(){this.remove(...this.initialClasses);}hostUpdate(){}};var Yo=class extends At{constructor(o){if(super(o),this.it=Y,o.type!==yt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(o){if(o===Y||o==null)return this._t=void 0,this.it=o;if(o===at)return o;if(typeof o!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(o===this.it)return this._t;this.it=o;let e=[o];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Yo.directiveName="unsafeHTML",Yo.resultType=1;var Ot=Pt(Yo);function Nn(t,o){o&&Object.entries(o).forEach(([e,r])=>{(e==="root"?[t]:Array.from(t.querySelectorAll(e))).forEach(s=>{typeof r=="string"?s.style.cssText=r:typeof r=="object"&&Object.assign(s.style,r);});});}function wo(t,o,e){e?t.classList.add(o):t.classList.remove(o);}function Un(){return {widget:"input",name:"",path:[],visible:true,enable:true,required:false,order:0,advanced:false,actions:[]}}var R=class extends lt{constructor(){super(...arguments);this.theme=new _o(this);this.classs=new Ae(this);this.options=Un();this.value="";this.name="";this.path="";this.labelPos="top";this.dirty=false;this.noreactive=false;this.beforeActions=[];this.afterActions=[];this._subscribers=[];this.onFieldChange=()=>this._updateFieldValue();this.onFieldInput=()=>this._updateFieldValue();}static{this.styles=Mn;}get shadow(){return this.shadowRoot}getFieldOptions(){return Object.entries(this.schema||{}).reduce((e,[r,i])=>(ke(i)?e[r]=i.value:e[r]=i,e),Object.assign({},Un(),this.getInitialOptions()))}getPrefix(){}getSuffix(){}renderActions(e=true){return u`${this.renderBeforeActions(e)} ${this.renderAfterActions(e)}`}_onClickAction(e,r){return i=>{typeof r=="function"&&r(i),e.onClick&&typeof e.onClick=="function"&&e.onClick?.call(this,this.getInputValue(),{action:e,options:this.options,event:i,update:s=>{Hr(this.context.store.state,this.options.path,s);}});}}renderBeforeActions(e){if(Array.isArray(this.beforeActions)&&this.beforeActions.length>0)return u`<div
0 commit comments