rettangoli-ui 0.0.10 → 0.1.0-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -599
- package/dist/rettangoli-iife-layout.min.js +423 -391
- package/dist/rettangoli-iife-ui.min.js +500 -424
- package/package.json +12 -6
- package/LICENSE +0 -21
- package/dist/rettangoli-esm.min.js +0 -645
@@ -1,24 +1,25 @@
|
|
1
|
-
var rettangoli=(()=>{var{isArray:at}=Array,{getPrototypeOf:Rt,getOwnPropertyDescriptor:jt}=Object,S=[],lt=()=>document.createRange(),N=(e,t,o)=>(e.set(t,o),o),Mt=(e,t)=>t.reduceRight(Wt,e),Wt=(e,t)=>e.childNodes[t],{setPrototypeOf:Et}=Object,j,ht=(e,t,o)=>(j||(j=lt()),o?j.setStartAfter(e):j.setStartBefore(e),j.setEndAfter(t),j.deleteContents(),e),Y=({firstChild:e,lastChild:t},o)=>ht(e,t,o),ct=!1,Z=(e,t)=>ct&&e.nodeType===11?1/t<0?t?Y(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,rt=e=>document.createComment(e),tt=class extends(t=>{function o(n){return Et(n,new.target.prototype)}return o.prototype=t.prototype,o})(DocumentFragment){#e=rt("<>");#o=rt("</>");#t=S;constructor(t){super(t),this.replaceChildren(this.#e,...t.childNodes,this.#o),ct=!0}get firstChild(){return this.#e}get lastChild(){return this.#o}get parentNode(){return this.#e.parentNode}remove(){Y(this,!1)}replaceWith(t){Y(this,!0).replaceWith(t)}valueOf(){let{parentNode:t}=this;if(t===this)this.#t===S&&(this.#t=[...this.childNodes]);else{if(t){let{firstChild:o,lastChild:n}=this;for(this.#t=[o];o!==n;)this.#t.push(o=o.nextSibling)}this.replaceChildren(...this.#t)}return this}},dt=(e,t,o)=>e.setAttribute(t,o),D=(e,t)=>e.removeAttribute(t),L,Ot=(e,t,o)=>{o=o.slice(1),L||(L=new WeakMap);let n=L.get(e)||N(L,e,{}),s=n[o];return s&&s[0]&&e.removeEventListener(o,...s),s=at(t)?t:[t,!1],n[o]=s,s[0]&&e.addEventListener(o,...s),t},V=(e,t)=>{let{t:o,n}=e,s=!1;switch(typeof t){case"object":if(t!==null){(n||o).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:o.data=s?"":t,n&&(e.n=null,n.replaceWith(o))}return t},I=(e,t,o)=>e[o]=t,Tt=(e,t,o)=>I(e,t,o.slice(1)),et=(e,t,o)=>t==null?(D(e,o),t):I(e,t,o),gt=(e,t)=>(typeof t=="function"?t(e):t.current=e,t),q=(e,t,o)=>(t==null?D(e,o):dt(e,o,t),t),Nt=(e,t,o)=>(e.toggleAttribute(o.slice(1),t),t),B=(e,t,o)=>{let{length:n}=t;if(e.data=`[${n}]`,n)return((s,i,a,r,d)=>{let p=a.length,l=i.length,h=p,c=0,g=0,u=null;for(;c<l||g<h;)if(l===c){let b=h<p?g?r(a[g-1],-0).nextSibling:r(a[h],0):d;for(;g<h;)s.insertBefore(r(a[g++],1),b)}else if(h===g)for(;c<l;)u&&u.has(i[c])||s.removeChild(r(i[c],-1)),c++;else if(i[c]===a[g])c++,g++;else if(i[l-1]===a[h-1])l--,h--;else if(i[c]===a[h-1]&&a[g]===i[l-1]){let b=r(i[--l],-0).nextSibling;s.insertBefore(r(a[g++],1),r(i[c++],-0).nextSibling),s.insertBefore(r(a[--h],1),b),i[l]=a[h]}else{if(!u){u=new Map;let b=g;for(;b<h;)u.set(a[b],b++)}if(u.has(i[c])){let b=u.get(i[c]);if(g<b&&b<h){let w=c,k=1;for(;++w<l&&w<h&&u.get(i[w])===b+k;)k++;if(k>b-g){let Q=r(i[c],0);for(;g<b;)s.insertBefore(r(a[g++],1),Q)}else s.replaceChild(r(a[g++],1),r(i[c++],-1))}else c++}else s.removeChild(r(i[c++],-1))}return a})(e.parentNode,o,t,Z,e);switch(o.length){case 1:o[0].remove();case 0:break;default:ht(Z(o[0],0),Z(o.at(-1),-0),!1)}return S},Vt=new Map([["aria",(e,t)=>{for(let o in t){let n=t[o],s=o==="role"?o:`aria-${o}`;n==null?D(e,s):dt(e,s,n)}return t}],["class",(e,t)=>et(e,t,t==null?"class":"className")],["data",(e,t)=>{let{dataset:o}=e;for(let n in t)t[n]==null?delete o[n]:o[n]=t[n];return t}],["ref",gt],["style",(e,t)=>t==null?et(e,t,"style"):I(e.style,t,"cssText")]]),zt=(e,t,o)=>{switch(t[0]){case".":return Tt;case"?":return Nt;case"@":return Ot;default:return o||"ownerSVGElement"in e?t==="ref"?gt:q:Vt.get(t)||(t in e?t.startsWith("on")?I:((n,s)=>{let i;do i=jt(n,s);while(!i&&(n=Rt(n)));return i})(e,t)?.set?et:q:q)}},Lt=(e,t)=>(e.textContent=t??"",t),T=(e,t,o)=>({a:e,b:t,c:o}),M=()=>T(null,null,S),pt=e=>(t,o)=>{let{a:n,b:s,c:i}=e(t,o),a=document.importNode(n,!0),r=S;if(s!==S){r=[];for(let c,g,u=0;u<s.length;u++){let{a:b,b:w,c:k}=s[u],Q=b===g?c:c=Mt(a,g=b);r[u]=(d=w,p=Q,l=k,h=w===B?[]:w===V?M():null,{v:S,u:d,t:p,n:l,c:h})}}var d,p,l,h;return((c,g)=>({b:c,c:g}))(i?a.firstChild:new tt(a),r)},Ht=/^(?:plaintext|script|style|textarea|title|xmp)$/i,Bt=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,Dt=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,It=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,Pt=/[\x01\x02]/g,J,K,H=document.createElement("template"),Ut=(e,t)=>{if(t)return J||(J=document.createElementNS("http://www.w3.org/2000/svg","svg"),K=lt(),K.selectNodeContents(J)),K.createContextualFragment(e);H.innerHTML=e;let{content:o}=H;return H=H.cloneNode(!1),o},X=e=>{let t=[],o;for(;o=e.parentNode;)t.push(t.indexOf.call(o.childNodes,e)),e=o;return t},st=()=>document.createTextNode(""),Ft=(e,t,o)=>{let n=Ut(((d,p,l)=>{let h=0;return d.join("").trim().replace(Dt,(c,g,u,b)=>`<${g}${u.replace(It,"=$2$1").trimEnd()}${b?l||Bt.test(g)?" /":`></${g}`:""}>`).replace(Pt,c=>c===""?`<!--${p+h++}-->`:p+h++)})(e,O,o),o),{length:s}=e,i=S;if(s>1){let d=[],p=document.createTreeWalker(n,129),l=0,h=`${O}${l++}`;for(i=[];l<s;){let c=p.nextNode();if(c.nodeType===8){if(c.data===h){let g=at(t[l-1])?B:V;g===V&&d.push(c),i.push(T(X(c),g,null)),h=`${O}${l++}`}}else{let g;for(;c.hasAttribute(h);){g||(g=X(c));let u=c.getAttribute(h);i.push(T(g,zt(c,u,o),u)),D(c,h),h=`${O}${l++}`}!o&&Ht.test(c.localName)&&c.textContent.trim()===`<!--${h}-->`&&(i.push(T(g||X(c),Lt,null)),h=`${O}${l++}`)}}for(l=0;l<d.length;l++)d[l].replaceWith(st())}let{childNodes:a}=n,{length:r}=a;return r<1?(r=1,n.appendChild(st())):r===1&&s!==1&&a[0].nodeType!==1&&(r=0),N(ut,e,T(n,i,r===1))},ut=new WeakMap,O="is\xB5",ft=e=>(t,o)=>ut.get(t)||Ft(t,o,e),Gt=pt(ft(!1)),Qt=pt(ft(!0)),ot=(e,{s:t,t:o,v:n})=>{if(e.a!==o){let{b:s,c:i}=(t?Qt:Gt)(o,n);e.a=o,e.b=s,e.c=i}for(let{c:s}=e,i=0;i<s.length;i++){let a=n[i],r=s[i];switch(r.u){case B:r.v=B(r.t,Zt(r.c,a),r.v);break;case V:let d=a instanceof _?ot(r.c||(r.c=M()),a):(r.c=null,a);d!==r.v&&(r.v=V(r,d));break;default:a!==r.v&&(r.v=r.u(r.t,a,r.n,r.v))}}return e.b},Zt=(e,t)=>{let o=0,{length:n}=t;for(n<e.length&&e.splice(n);o<n;o++){let s=t[o];s instanceof _?t[o]=ot(e[o]||(e[o]=M()),s):e[o]=null}return t},_=class{constructor(t,o,n){this.s=t,this.t=o,this.v=n}toDOM(t=M()){return ot(t,this)}};var mt=e=>(t,...o)=>new _(e,t,o),A=mt(!1),ce=mt(!0),nt=new WeakMap,R=(e,t)=>((o,n)=>{let s=nt.get(o)||N(nt,o,M()),{b:i}=s,a=typeof n=="function"?n():n,r=a instanceof _?a.toDOM(s):a;return i!==r&&o.replaceChildren((s.b=r).valueOf()),o})(e,t),it=new WeakMap,bt=e=>(t,o)=>{let n=it.get(t)||N(it,t,new Map);return n.get(o)||N(n,o,function(s,...i){return new _(e,s,i).toDOM(this)}.bind(M()))},de=bt(!1),ge=bt(!0);function m(e,...t){let o="";return e.forEach((n,s)=>{o+=n+(t[s]||"")}),o}var vt={default:void 0,xl:"@media only screen and (max-width: 1280px)",lg:"@media only screen and (max-width: 1024px)",md:"@media only screen and (max-width: 768px)",sm:"@media only screen and (max-width: 640px)"},y=(e,t,o={})=>{let n="";for(let[s,i]of Object.entries(vt)){s!=="default"&&(n+=`${i} {`);for(let[a,r]of Object.entries(t)){let d=o[a]?` ${o[a]} `:" ";for(let[p,l]of Object.entries(r)){let h=e[a],c=l.startsWith("--")?`var(${l})`:l,g=s==="default"?a:`${s}-${a}`,u=s==="default"?`h-${a}`:`${s}-h-${a}`;if(h){let w=h.split(" ").map(k=>`${k}: ${c};`).join(" ");n+=`
|
2
|
-
:host([${g}="${p}"])${d}{
|
3
|
-
|
1
|
+
var rettangoli=(()=>{var Zn=Object.create;var ct=Object.defineProperty;var Bn=Object.getOwnPropertyDescriptor;var Vn=Object.getOwnPropertyNames;var Un=Object.getPrototypeOf,Wn=Object.prototype.hasOwnProperty;var Jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ie=(e,t)=>{for(var r in t)ct(e,r,{get:t[r],enumerable:!0})},Kn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Vn(t))!Wn.call(e,a)&&a!==r&&ct(e,a,{get:()=>t[a],enumerable:!(n=Bn(t,a))||n.enumerable});return e};var qn=(e,t,r)=>(r=e!=null?Zn(Un(e)):{},Kn(t||!e||!e.__esModule?ct(r,"default",{value:e,enumerable:!0}):r,e));var Vr=Jn((Ht,Rt)=>{(function(e,t){typeof Ht=="object"&&typeof Rt<"u"?Rt.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.jsone=t())})(Ht,function(){"use strict";var e={},t={};class r{constructor(i){this.token=i,this.constructorName="ASTNode"}}let n=r;class a extends r{constructor(i,s,o){super(i),this.constructorName="BinOp",this.left=s,this.right=o}}class c extends r{constructor(i,s){super(i),this.constructorName="UnaryOp",this.expr=s}}class h extends r{constructor(i,s,o){super(i),this.constructorName="FunctionCall",this.name=s,this.args=o}}class d{constructor(i){this.token=i,this.constructorName="ContextValue"}}class p extends r{constructor(i,s){super(i),this.constructorName="List",this.list=s}}class C extends r{constructor(i,s,o,u,m){super(i),this.constructorName="ValueAccess",this.isInterval=o,this.arr=s,this.left=u,this.right=m}}class D extends r{constructor(i,s){super(i),this.constructorName="Object",this.obj=s}}t.ASTNode=r,t.BinOp=a,t.UnaryOp=c,t.Primitive=n,t.FunctionCall=h,t.ContextValue=d,t.ValueAccess=C,t.List=p,t.Object=D;class T extends Error{constructor(i){super(i),this.location=[]}add_location(i){this.location.unshift(i)}toString(){return this.location.length?`${this.name} at template${this.location.join("")}: ${this.message}`:`${this.name}: ${this.message}`}}class R extends T{constructor(i){super(i),this.message=i,this.name="SyntaxError"}}class V extends T{constructor(i){super(i),this.message=i,this.name="BaseError"}}class f extends V{constructor(i){super(i),this.name="InterpreterError"}}class g extends V{constructor(i){super(i),this.name="TemplateError"}}class b extends V{constructor(i){super(i),this.name="BuiltinError"}}var y={JSONTemplateError:T,SyntaxError:R,InterpreterError:f,TemplateError:g,BuiltinError:b};let{UnaryOp:S,BinOp:I,Primitive:x,ContextValue:N,FunctionCall:E,ValueAccess:P,List:O,Object:F}=t,{SyntaxError:M}=y,$=(l,i)=>(i.sort(),new M(`Found: ${l.value} token, expected one of: ${i.join(", ")}`,l));class k{constructor(i,s,o=0){this._source=s,this._tokenizer=i,this.current_token=this._tokenizer.next(this._source,o),this.unaryOpTokens=["-","+","!"],this.primitivesTokens=["number","null","true","false","string"],this.operations=[["||"],["&&"],["in"],["==","!="],["<",">","<=",">="],["+","-"],["*","/"],["**"]],this.expectedTokens=["!","(","+","-","[","false","identifier","null","number","string","true","{"]}takeToken(...i){if(this.current_token==null)throw new M("Unexpected end of input");if(i.length>0&&i.indexOf(this.current_token.kind)===-1)throw $(this.current_token,i);try{this.current_token=this._tokenizer.next(this._source,this.current_token.end)}catch(s){throw s}}parse(i=0){let s;if(i==this.operations.length-1){s=this.parsePropertyAccessOrFunc();let o=this.current_token;for(;o!=null&&this.operations[i].indexOf(o.kind)!==-1;o=this.current_token)this.takeToken(o.kind),s=new I(o,this.parse(i),s)}else{s=this.parse(i+1);let o=this.current_token;for(;o!=null&&this.operations[i].indexOf(o.kind)!==-1;o=this.current_token)this.takeToken(o.kind),s=new I(o,s,this.parse(i+1))}return s}parsePropertyAccessOrFunc(){let i=this.parseUnit(),s=["[","(","."],o;for(let u=this.current_token;u!=null&&s.indexOf(u.kind)!==-1;u=this.current_token)u.kind=="["?i=this.parseAccessWithBrackets(i):u.kind=="."?(u=this.current_token,this.takeToken("."),o=new x(this.current_token),this.takeToken("identifier"),i=new I(u,i,o)):u.kind=="("&&(i=this.parseFunctionCall(i));return i}parseUnit(){let i=this.current_token,s,o=this.unaryOpTokens.indexOf(i.kind)!==-1,u=this.primitivesTokens.indexOf(i.kind)!==-1;if(this.current_token==null)throw new M("Unexpected end of input");if(o)this.takeToken(i.kind),s=new S(i,this.parseUnit());else if(u)this.takeToken(i.kind),s=new x(i);else if(i.kind=="identifier")this.takeToken(i.kind),s=new N(i);else if(i.kind=="("){if(this.takeToken("("),s=this.parse(),s==null)throw $(this.current_token,this.expectedTokens);this.takeToken(")")}else i.kind=="["?s=this.parseList():i.kind=="{"&&(s=this.parseObject());return s}parseFunctionCall(i){let s=this.current_token,o,u=[];if(this.takeToken("("),this.current_token.kind!=")")for(o=this.parse(),u.push(o);this.current_token!=null&&this.current_token.kind==",";){if(u[u.length-1]==null)throw $(this.current_token,this.expectedTokens);this.takeToken(","),o=this.parse(),u.push(o)}return this.takeToken(")"),o=new E(s,i,u),o}parseList(){let i,s=[],o=this.current_token;if(this.takeToken("["),this.current_token.kind!="]")for(i=this.parse(),s.push(i);this.current_token.kind==",";){if(s[s.length-1]==null)throw $(this.current_token,this.expectedTokens);this.takeToken(","),i=this.parse(),s.push(i)}return this.takeToken("]"),i=new O(o,s),i}parseAccessWithBrackets(i){let s=null,o=null,u=this.current_token,m=!1;if(this.takeToken("["),this.current_token.kind=="]")throw $(this.current_token,this.expectedTokens);if(this.current_token.kind!=":"&&(s=this.parse()),this.current_token.kind==":"&&(m=!0,this.takeToken(":")),this.current_token.kind!="]"&&(o=this.parse()),m&&o==null&&this.current_token.kind!="]")throw $(this.current_token,this.expectedTokens);return this.takeToken("]"),i=new P(u,i,m,s,o),i}parseObject(){let i,s={},o,u,m=this.current_token;this.takeToken("{");let v=this.current_token;for(;v!=null&&(v.kind=="string"||v.kind=="identifier");){if(o=v.value,v.kind=="string"&&(o=Z(o)),this.takeToken(v.kind),this.takeToken(":"),u=this.parse(),u==null)throw $(this.current_token,this.expectedTokens);if(s[o]=u,this.current_token!=null&&this.current_token.kind=="}")break;this.takeToken(","),v=this.current_token}return this.takeToken("}"),i=new F(m,s),i}}let Z=l=>l.slice(1,-1);e.Parser=k;var{SyntaxError:W}=y;let X=l=>l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),te=l=>{if(typeof l!="string")return!1;try{new RegExp(`^${l}$`)}catch{return!1}return!0},Gt=l=>te(l)&&new RegExp(`^(?:|${l})$`).exec("").length===1,dn=(l,i=0)=>{let s=l.length;for(let o=i;o<s;o++)if(l[o]!==void 0)return o;return-1},De=l=>{if(!l)throw new Error("Token configuration is invalid")};class fn{constructor(i={}){i=Object.assign({},{ignore:null,patterns:{},tokens:[]},i),De(i.ignore===null||Gt(i.ignore)),De(i.patterns instanceof Object);for(let s of Object.keys(i.patterns))De(Gt(i.patterns[s]));De(i.tokens instanceof Array),i.tokens.forEach(s=>De(typeof s=="string")),this._tokens=i.tokens,this._hasIgnore=i.ignore?1:0,this._regex=new RegExp("^(?:"+[this._hasIgnore?`(${i.ignore})`:null,...this._tokens.map(s=>`(${i.patterns[s]||X(s)})`)].filter(s=>s!==null).join("|")+")")}next(i,s=0){let o,u;do{if(o=this._regex.exec(i.slice(s)),o===null){if(i.slice(s)!=="")throw new W(`Unexpected input for '${i}' at '${i.slice(s)}'`,{start:s,end:i.length});return null}u=dn(o,1),s+=o[0].length}while(this._hasIgnore&&u===1);return{kind:this._tokens[u-1-this._hasIgnore],value:o[u],start:s-o[0].length,end:s}}tokenize(i,s=0){let o={end:s},u=[];for(;o=this.next(i,o.end);)u.push(o);return u}}var pn=fn,Xt={};let be={isString:l=>typeof l=="string",isNumber:l=>typeof l=="number",isInteger:l=>typeof l=="number"&&Number.isInteger(l),isBool:l=>typeof l=="boolean",isNull:l=>l===null,isArray:l=>l instanceof Array,isObject:l=>l instanceof Object&&!(l instanceof Array)&&!(l instanceof Function),isFunction:l=>l instanceof Function,isTruthy:l=>l!==null&&(be.isArray(l)&&l.length>0||be.isObject(l)&&Object.keys(l).length>0||be.isString(l)&&l.length>0||be.isNumber(l)&&l!==0||be.isBool(l)&&l||be.isFunction(l))};var ot=be;let{isFunction:Yt,isObject:Me,isString:fe,isArray:Fe,isNumber:ye,isInteger:at,isTruthy:Le}=ot,{InterpreterError:pe}=y,ce=(l,i)=>new pe(`${l} expects ${i}`);class mn{constructor(i){this.context=i}visit(i){let s="visit_"+i.constructorName;return this[s](i)}visit_ASTNode(i){let s;switch(i.token.kind){case"number":return+i.token.value;case"null":return null;case"string":return s=i.token.value.slice(1,-1),s;case"true":return!0;case"false":return!1;case"identifier":return i.token.value}}visit_UnaryOp(i){let s=this.visit(i.expr);switch(i.token.kind){case"+":if(!ye(s))throw ce("unary +","number");return+s;case"-":if(!ye(s))throw ce("unary -","number");return-s;case"!":return!Le(s)}}visit_BinOp(i){let s=this.visit(i.left),o;switch(i.token.kind){case"||":return Le(s)||Le(this.visit(i.right));case"&&":return Le(s)&&Le(this.visit(i.right));default:o=this.visit(i.right)}switch(i.token.kind){case"+":return He("+",s,o),s+o;case"-":return He("-",s,o),s-o;case"/":if(He("/",s,o),o==0)throw new pe("division by zero");return s/o;case"*":return He("*",s,o),s*o;case">":return Se(">",s,o),s>o;case"<":return Se("<",s,o),s<o;case">=":return Se(">=",s,o),s>=o;case"<=":return Se("<=",s,o),s<=o;case"!=":return Se("!=",s,o),!ke(s,o);case"==":return Se("==",s,o),ke(s,o);case"**":return He("**",s,o),Math.pow(o,s);case".":{if(Me(s)){if(s.hasOwnProperty(o))return s[o];throw new pe(`object has no property "${o}"`)}throw ce("infix: .","objects")}case"in":{if(Me(o)){if(!fe(s))throw ce("Infix: in-object","string on left side");o=Object.keys(o)}else if(fe(o)){if(!fe(s))throw ce("Infix: in-string","string on left side");return o.indexOf(s)!==-1}else if(!Fe(o))throw ce("Infix: in","Array, string, or object on right side");return o.some(u=>ke(s,u))}}}visit_List(i){let s=[];return i.list[0]!==void 0&&i.list.forEach(function(o){s.push(this.visit(o))},this),s}visit_ValueAccess(i){let s=this.visit(i.arr),o=0,u=null;i.left&&(o=this.visit(i.left)),i.right&&(u=this.visit(i.right));let m=(v,j,_,A)=>{if(_<0&&(_=j.length+_,_<0&&(_=0)),v){if(A=A===null?j.length:A,A<0&&(A=j.length+A,A<0&&(A=0)),_>A&&(_=A),!at(_)||!at(A))throw new pe("cannot perform interval access with non-integers");return j.slice(_,A)}if(!at(_))throw new pe("should only use integers to access arrays or strings");if(_>=j.length)throw new pe("index out of bounds");return j[_]};if(Fe(s))return m(i.isInterval,s,o,u);if(fe(s)){if(/^[\x00-\x7F]*$/.test(s))return m(i.isInterval,s,o,u);let v=m(i.isInterval,[...s],o,u);return Fe(v)&&(v=v.join("")),v}if(!Me(s))throw ce('infix: "[..]"',"object, array, or string");if(!fe(o))throw new pe("object keys must be strings");return s.hasOwnProperty(o)?s[o]:null}visit_ContextValue(i){if(this.context.hasOwnProperty(i.token.value))return this.context[i.token.value];throw new pe(`unknown context value ${i.token.value}`)}visit_FunctionCall(i){let s=[],o=this.visit(i.name);if(Yt(o))return i.args.forEach(function(u){s.push(this.visit(u))},this),o.hasOwnProperty("jsone_builtin")&&s.unshift(this.context),o.apply(null,s);throw new pe(`${o} is not callable`)}visit_Object(i){let s={};for(let o in i.obj)s[o]=this.visit(i.obj[o]);return s}interpret(i){return this.visit(i)}}let ke=(l,i)=>{if(Fe(l)&&Fe(i)&&l.length===i.length){for(let s=0;s<l.length;s++)if(!ke(l[s],i[s]))return!1;return!0}if(Yt(l))return l===i;if(Me(l)&&Me(i)){let s=Object.keys(l).sort();if(!ke(s,Object.keys(i).sort()))return!1;for(let o of s)if(!ke(l[o],i[o]))return!1;return!0}return l===i},He=(l,i,s)=>{if(l==="+"&&!(ye(i)&&ye(s)||fe(i)&&fe(s)))throw ce("infix: +","numbers/strings + numbers/strings");if(["-","*","/","**"].some(o=>o===l)&&!(ye(i)&&ye(s)))throw ce(`infix: ${l}`,`number ${l} number`)},Se=(l,i,s)=>{if(l==="=="||l==="!=")return null;if(!([">=","<=","<",">"].some(u=>u===l)&&(ye(i)&&ye(s)||fe(i)&&fe(s))))throw ce(`infix: ${l}`,`numbers/strings ${l} numbers/strings`)};Xt.Interpreter=mn;var gn=new RegExp(["^(\\s*(-|\\+))?","(\\s*(?<years>\\d+)\\s*(y|year|years|yr))?","(\\s*(?<months>\\d+)\\s*(months|month|mo))?","(\\s*(?<weeks>\\d+)\\s*(weeks|week|wk|w))?","(\\s*(?<days>\\d+)\\s*(days|day|d))?","(\\s*(?<hours>\\d+)\\s*(hours|hour|hr|h))?","(\\s*(?<minutes>\\d+)\\s*(minutes|minute|min|m))?","(\\s*(?<seconds>\\d+)\\s*(seconds|second|sec|s))?","\\s*$"].join(""),"i"),yn=function(l){var i=gn.exec(l||"");if(!i)throw new Error("String: '"+l+"' isn't a time expression");var s=i[2]==="-"?-1:1;let o=i.groups;return{years:parseInt(o.years||0,10)*s,months:parseInt(o.months||0,10)*s,weeks:parseInt(o.weeks||0,10)*s,days:parseInt(o.days||0,10)*s,hours:parseInt(o.hours||0,10)*s,minutes:parseInt(o.minutes||0,10)*s,seconds:parseInt(o.seconds||0,10)*s}},Qt=(l="",i)=>{let s=yn(l);s.days+=30*s.months,s.days+=365*s.years,i?i=new Date(i):i=new Date;var o=new Date(i.getTime()+s.weeks*7*24*60*60*1e3+s.days*24*60*60*1e3+s.hours*60*60*1e3+s.minutes*60*1e3+s.seconds*1e3);return o.toJSON()},bn=function(l,i){i||(i={}),typeof i=="function"&&(i={cmp:i});var s=i.space||"";typeof s=="number"&&(s=Array(s+1).join(" "));var o=typeof i.cycles=="boolean"?i.cycles:!1,u=i.replacer||function(j,_){return _},m=i.cmp&&function(j){return function(_){return function(A,w){var L={key:A,value:_[A]},J={key:w,value:_[w]};return j(L,J)}}}(i.cmp),v=[];return function j(_,A,w,L){var J=s?`
|
2
|
+
`+new Array(L+1).join(s):"",ue=s?": ":":";if(w&&w.toJSON&&typeof w.toJSON=="function"&&(w=w.toJSON()),w=u.call(_,A,w),w!==void 0){if(typeof w!="object"||w===null)return JSON.stringify(w);if(vn(w)){for(var me=[],ae=0;ae<w.length;ae++){var Hn=j(w,ae,w[ae],L+1)||JSON.stringify(null);me.push(J+s+Hn)}return"["+me.join(",")+J+"]"}else{if(v.indexOf(w)!==-1){if(o)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}else v.push(w);for(var cr=wn(w).sort(m&&m(w)),me=[],ae=0;ae<cr.length;ae++){var A=cr[ae],hr=j(w,A,w[A],L+1);if(hr){var Rn=JSON.stringify(A)+ue+hr;me.push(J+s+Rn)}}return v.splice(v.indexOf(w),1),"{"+me.join(",")+J+"}"}}}({"":l},"",l,0)},vn=Array.isArray||function(l){return{}.toString.call(l)==="[object Array]"},wn=Object.keys||function(l){var i=Object.prototype.hasOwnProperty||function(){return!0},s=[];for(var o in l)i.call(l,o)&&s.push(o);return s},{BuiltinError:_n}=y,xn=Qt,{isString:$n,isNumber:kn,isBool:Sn,isInteger:An,isArray:En,isObject:On,isNull:Cn,isFunction:jn}=ot;let lt={string:$n,number:kn,integer:An,boolean:Sn,array:En,object:On,null:Cn,function:jn},We=l=>new _n(`invalid arguments to ${l}`);var Tn=l=>{let i={},s=(o,u,{argumentTests:m=[],minArgs:v=!1,variadic:j=null,needsContext:_=!1,invoke:A})=>(u[o]=(...w)=>{let L=w.shift();if(!j&&w.length<m.length)throw We(`builtin: ${o}`,`${w.toString()}, too few arguments`);if(v&&w.length<v)throw We(`builtin: ${o}: expected at least ${v} arguments`);return j&&(m=w.map((J,ue)=>ue<m.length?m[ue]:j)),w.forEach((J,ue)=>{if(!m[ue].split("|").some(me=>lt[me](J)))throw We(`builtin: ${o}`,`argument ${ue+1} to be ${m[ue]} found ${typeof J}`)}),_?A(L,...w):A(...w)},u[o].jsone_builtin=!0,u[o]);return["max","min"].forEach(o=>{if(Math[o]==null)throw new Error(`${o} in Math undefined`);s(o,i,{minArgs:1,variadic:"number",invoke:(...u)=>Math[o](...u)})}),["sqrt","ceil","floor","abs"].forEach(o=>{if(Math[o]==null)throw new Error(`${o} in Math undefined`);s(o,i,{argumentTests:["number"],invoke:u=>Math[o](u)})}),s("range",i,{minArgs:2,argumentTests:["integer","integer","integer"],variadic:"number",invoke:(o,u,m=1)=>Array.from({length:Math.ceil((u-o)/m)},(v,j)=>o+j*m)}),s("lowercase",i,{argumentTests:["string"],invoke:o=>o.toLowerCase()}),s("uppercase",i,{argumentTests:["string"],invoke:o=>o.toUpperCase()}),s("str",i,{argumentTests:["string|number|boolean|null"],invoke:o=>o===null?"null":o.toString()}),s("number",i,{argumentTests:["string"],invoke:Number}),s("len",i,{argumentTests:["string|array"],invoke:o=>Array.from(o).length}),s("strip",i,{argumentTests:["string"],invoke:o=>o.trim()}),s("rstrip",i,{argumentTests:["string"],invoke:o=>o.replace(/\s+$/,"")}),s("lstrip",i,{argumentTests:["string"],invoke:o=>o.replace(/^\s+/,"")}),s("split",i,{minArgs:2,argumentTests:["string","string|number"],invoke:(o,u)=>o.split(u)}),s("join",i,{argumentTests:["array","string|number"],invoke:(o,u)=>o.join(u)}),s("fromNow",i,{variadic:"string",minArgs:1,needsContext:!0,invoke:(o,u,m)=>xn(u,m||o.now)}),s("typeof",i,{argumentTests:["string|number|boolean|array|object|null|function"],invoke:o=>{for(let u of["string","number","boolean","array","object","function"])if(lt[u](o))return u;if(lt.null(o))return"null";throw We("builtin: typeof")}}),s("defined",i,{argumentTests:["string"],needsContext:!0,invoke:(o,u)=>o.hasOwnProperty(u)}),Object.assign({},i,l)};let{Parser:er}=e,In=pn,{Interpreter:tr}=Xt;var rr=Qt,Nn=bn,{isString:Re,isNumber:zn,isBool:Pn,isArray:Y,isObject:Q,isTruthy:Je,isFunction:Dn}=ot,Mn=Tn,{JSONTemplateError:nr,TemplateError:z,SyntaxError:ir}=y;let sr=l=>new ir(`Found: ${l.value} token, expected one of: !=, &&, (, *, **, +, -, ., /, <, <=, ==, >, >=, [, in, ||`);function q(l,i){var s="",o=new RegExp(i.join("|")+"$");for(var u of Object.keys(l).sort())o.test(u)||(s+=" "+u);if(s)throw new z(i[0].replace("\\","")+" has undefined properties:"+s)}let or=l=>Array.isArray(l)?[].concat(...l.map(or)):l,ar=(l,i)=>{let s="",o=l,u;for(;(u=o.search(/\$?\${/g))!==-1;)if(s+=o.slice(0,u),o[u+1]!="$"){let m=Fn(o.slice(u+2),"}",i);if(Y(m.result)||Q(m.result)){let v=o.slice(u+2,u+m.offset);throw new z(`interpolation of '${v}' produced an array or object`)}m.result===null?s+="":s+=m.result.toString(),o=o.slice(u+m.offset+1)}else s+="${",o=o.slice(u+3);return s+=o,s},he={},K={};K.$eval=(l,i)=>{if(q(l,["\\$eval"]),!Re(l.$eval))throw new z("$eval must be given a string expression");return Ae(l.$eval,i)},K.$flatten=(l,i)=>{q(l,["\\$flatten"]);let s=B(l.$flatten,i);if(!Y(s))throw new z("$flatten value must evaluate to an array");return s.reduce((o,u)=>o.concat(u),[])},K.$flattenDeep=(l,i)=>{q(l,["\\$flattenDeep"]);let s=B(l.$flattenDeep,i);if(!Y(s))throw new z("$flattenDeep value must evaluate to an array");return or(s)},K.$fromNow=(l,i)=>{q(l,["\\$fromNow","from"]);let s=B(l.$fromNow,i),o=i.now;if(l.from&&(o=B(l.from,i)),!Re(s))throw new z("$fromNow expects a string");return rr(s,o)},K.$if=(l,i)=>{if(q(l,["\\$if","then","else"]),!Re(l.$if))throw new z("$if can evaluate string expressions only");if(Je(Ae(l.$if,i))){if(l.hasOwnProperty("$then"))throw new z("$if Syntax error: $then: should be spelled then: (no $)");return l.hasOwnProperty("then")?B(l.then,i):he}return l.hasOwnProperty("else")?B(l.else,i):he},K.$json=(l,i)=>{q(l,["\\$json"]);let s=B(l.$json,i);if(Ke(s))throw new z("evaluated template contained uncalled functions");return Nn(s)},K.$let=(l,i)=>{if(q(l,["\\$let","in"]),!Q(l.$let))throw new z("$let value must be an object");let s={},o=B(l.$let,i);if(!Q(o))throw new z("$let value must be an object");Object.keys(o).forEach(m=>{if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(m))s[m]=o[m];else throw new z("top level keys of $let must follow /[a-zA-Z_][a-zA-Z0-9_]*/")});var u=Object.assign({},i,s);if(l.in==null)throw new z("$let operator requires an `in` clause");return B(l.in,u)},K.$map=(l,i)=>{q(l,["\\$map","each\\(([a-zA-Z_][a-zA-Z0-9_]*)(,\\s*([a-zA-Z_][a-zA-Z0-9_]*))?\\)"]);let o=B(l.$map,i);if(!Y(o)&&!Q(o))throw new z("$map value must evaluate to an array or object");if(Object.keys(l).length!==2)throw new z("$map must have exactly two properties");let u=Object.keys(l).filter(w=>w!=="$map")[0],m=/^each\(([a-zA-Z_][a-zA-Z0-9_]*)(,\s*([a-zA-Z_][a-zA-Z0-9_]*))?\)$/.exec(u);if(!m)throw new z("$map requires each(identifier) syntax");let v=m[1],j=m[3],_=l[u];if(Q(o)){o=Object.keys(o).map(L=>({key:L,val:o[L]}));let w;return o=o.map(L=>{let J=typeof j<"u"?{[v]:L.val,[j]:L.key}:{[v]:L};if(w=B(_,Object.assign({},i,J)),!Q(w))throw new z(`$map on objects expects each(${v}) to evaluate to an object`);return w}).filter(L=>L!==he),Object.assign({},...o)}else return o.map((w,L)=>{let J=typeof j<"u"?{[v]:w,[j]:L}:{[v]:w};return B(_,Object.assign({},i,J))}).filter(w=>w!==he)},K.$reduce=(l,i)=>{q(l,["\\$reduce","initial","each\\(([a-zA-Z_][a-zA-Z0-9_]*),\\s*([a-zA-Z_][a-zA-Z0-9_]*)(,\\s*([a-zA-Z_][a-zA-Z0-9_]*))?\\)"]);let o=B(l.$reduce,i);if(!Y(o))throw new z("$reduce value must evaluate to an array");if(Object.keys(l).length!==3)throw new z("$reduce must have exactly three properties");let u=Object.keys(l).find(L=>L!=="$reduce"&&L!=="initial"),m=/^each\(([a-zA-Z_][a-zA-Z0-9_]*),\s*([a-zA-Z_][a-zA-Z0-9_]*)(,\s*([a-zA-Z_][a-zA-Z0-9_]*))?\)$/.exec(u);if(!m)throw new z("$reduce requires each(identifier) syntax");let v=m[1],j=m[2],_=m[4],A=l[u],w=l.initial;return o.reduce((L,J,ue)=>{let me=typeof _<"u"?{[v]:L,[j]:J,[_]:ue}:{[v]:L,[j]:J},ae=B(A,Object.assign({},i,me));return ae===he?L:ae},w)},K.$find=(l,i)=>{q(l,["\\$find","each\\(([a-zA-Z_][a-zA-Z0-9_]*)(,\\s*([a-zA-Z_][a-zA-Z0-9_]*))?\\)"]);let o=B(l.$find,i);if(!Y(o))throw new z("$find value must evaluate to an array");if(Object.keys(l).length!==2)throw new z("$find must have exactly two properties");let u=Object.keys(l).filter(w=>w!=="$find")[0],m=/^each\(([a-zA-Z_][a-zA-Z0-9_]*)(,\s*([a-zA-Z_][a-zA-Z0-9_]*))?\)$/.exec(u);if(!m)throw new z("$find requires each(identifier) syntax");if(!Re(l[u]))throw new z("each can evaluate string expressions only");let v=m[1],j=m[3],_=l[u],A=o.find((w,L)=>{let J=typeof j<"u"?{[v]:w,[j]:L}:{[v]:w};if(Je(Ae(_,Object.assign({},i,J))))return B(_,Object.assign({},i,J))});return A!==void 0?A:he},K.$match=(l,i)=>{if(q(l,["\\$match"]),!Q(l.$match))throw new z("$match can evaluate objects only");let s=[],o=l.$match;for(let u of Object.keys(o).sort())Je(Ae(u,i))&&s.push(B(o[u],i));return s},K.$switch=(l,i)=>{if(q(l,["\\$switch"]),!Q(l.$switch))throw new z("$switch can evaluate objects only");let s=[],o=l.$switch;for(let u of Object.keys(o).filter(m=>m!=="$default").sort())Je(Ae(u,i))&&s.push(B(o[u],i));if(s.length>1)throw new z("$switch can only have one truthy condition");return s.length===0&&o.$default&&s.push(B(o.$default,i)),s.length>0?s[0]:he},K.$merge=(l,i)=>{q(l,["\\$merge"]);let s=B(l.$merge,i);if(!Y(s)||s.some(o=>!Q(o)))throw new z("$merge value must evaluate to an array of objects");return Object.assign({},...s)},K.$mergeDeep=(l,i)=>{q(l,["\\$mergeDeep"]);let s=B(l.$mergeDeep,i);if(!Y(s)||s.some(u=>!Q(u)))throw new z("$mergeDeep value must evaluate to an array of objects");if(s.length===0)return{};let o=(u,m)=>{if(Y(u)&&Y(m))return u.concat(m);if(Q(u)&&Q(m)){let v=Object.assign({},u);for(let j in m)j in u?v[j]=o(u[j],m[j]):v[j]=m[j];return v}return m};return s.reduce(o,s.shift())},K.$reverse=(l,i)=>{q(l,["\\$reverse"]);let s=B(l.$reverse,i);if(!Y(s))throw new z("$reverse value must evaluate to an array of objects");return s.reverse()},K.$sort=(l,i)=>{q(l,["\\$sort","by\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)"]);let o=B(l.$sort,i);if(!Y(o))throw new z("$sorted values to be sorted must have the same type");let u=Object.keys(l).filter(_=>_!=="$sort")[0],m=/^by\(([a-zA-Z_][a-zA-Z0-9_]*)\)$/.exec(u),v;if(m){let _=Object.assign({},i),A=m[1],w=l[u];v=L=>(_[A]=L,Ae(w,_))}else{if(o.some(A=>Y(A)||Q(A)))throw new z("$sorted values to be sorted must have the same type");v=A=>A}let j=o.map(_=>[v(_),_]);if(j.length>0){let _=typeof j[0][0];if(_!=="number"&&_!=="string"||j.some(A=>_!==typeof A[0]))throw new z("$sorted values to be sorted must have the same type")}return j.sort((_,A)=>(_=_[0],A=A[0],_<A?-1:_>A?1:0)).map(_=>_[1])};let B=(l,i)=>{if(zn(l)||Pn(l)||l===null)return l;if(Re(l))return ar(l,i);if(Y(l))return l.map((u,m)=>{try{return B(u,i)}catch(v){throw v instanceof nr&&v.add_location(`[${m}]`),v}}).filter(u=>u!==he);let s=Object.keys(K).filter(u=>l.hasOwnProperty(u));if(s.length>1)throw new z("only one operator allowed");if(s.length===1)return K[s[0]](l,i);let o={};for(let u of Object.keys(l)){let m;try{m=B(l[u],i)}catch(v){throw v instanceof nr&&(/^[a-zA-Z][a-zA-Z0-9]*$/.test(u)?v.add_location(`.${u}`):v.add_location(`[${JSON.stringify(u)}]`)),v}if(m!==he){if(u.startsWith("$$"))u=u.substr(1);else{if(/^\$[a-zA-Z][a-zA-Z0-9]*$/.test(u))throw new z("$<identifier> is reserved; use $$<identifier>");u=ar(u,i)}o[u]=m}}return o},lr=new In({ignore:"\\s+",patterns:{number:"[0-9]+(?:\\.[0-9]+)?",identifier:"[a-zA-Z_][a-zA-Z_0-9]*",string:`'[^']*'|"[^"]*"`,true:"true(?![a-zA-Z_0-9])",false:"false(?![a-zA-Z_0-9])",in:"in(?![a-zA-Z_0-9])",null:"null(?![a-zA-Z_0-9])"},tokens:["**",..."+-*/[].(){}:,".split(""),">=","<=","<",">","==","!=","!","&&","||","true","false","in","null","number","identifier","string"]}),Ae=(l,i)=>{let s=new er(lr,l),o=s.parse();if(s.current_token!=null)throw sr(s.current_token);return new tr(i).interpret(o)},Fn=(l,i,s)=>{let o=new er(lr,l),u=o.parse(),m=o.current_token;if(m){if(m.kind!==i)throw sr(m)}else{let _=l.length;throw new ir("unterminated ${..} expression",{start:_,end:_})}return{result:new tr(s).interpret(u),offset:m.start+2}},Ke=l=>{if(Dn(l))return!0;if(Array.isArray(l))return l.some(Ke);if(typeof l=="object"&&l!==null){for(let i of Object.keys(l))if(Ke(l[i]))return!0;return!1}else return!1};var Ln=(l,i={})=>{if(!Q(i))throw new z("context must be an object");if(!Object.keys(i).every(u=>/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(u)))throw new z("top level keys of context must follow /[a-zA-Z_][a-zA-Z0-9_]*/");i=Mn(Object.assign({},{now:rr("0 seconds")},i));let o=B(l,i);if(o===he)return null;if(Ke(o))throw new z("evaluated template contained uncalled functions");return o};return Ln})});function U(e,...t){let r="";return e.forEach((n,a)=>{r+=n+(t[a]||"")}),r}var Gn=["xs","sm","md","lg","xl"],ur={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom",pt:"padding-top",pr:"padding-right",pb:"padding-bottom",pl:"padding-left",p:"padding",ph:"padding-left padding-right",pv:"padding-top padding-bottom",g:"gap",gv:"row-gap",gh:"column-gap",bw:"border-width",bwt:"border-top-width",bwr:"border-right-width",bwb:"border-bottom-width",bwl:"border-left-width",bc:"border-color",br:"border-radius",pos:"position",shadow:"box-shadow",ta:"text-align",c:"color",cur:"cursor"},Ee=Object.keys(ur),Oe=e=>e.concat(Gn.flatMap(t=>e.map(r=>`${t}-${r}`))),dr={default:void 0,xl:"@media only screen and (max-width: 1280px)",lg:"@media only screen and (max-width: 1024px)",md:"@media only screen and (max-width: 768px)",sm:"@media only screen and (max-width: 640px)"},se=(e,t={})=>{let r="";for(let[n,a]of Object.entries(dr)){n!=="default"&&(r+=`${a} {`);for(let[c,h]of Object.entries(e)){let d=t[c]?` ${t[c]} `:" ";for(let[p,C]of Object.entries(h)){let D=ur[c],T=C.startsWith("--")?`var(${C})`:C,R=n==="default"?c:`${n}-${c}`,V=n==="default"?`h-${c}`:`${n}-h-${c}`;if(D){let g=D.split(" ").map(b=>`${b}: ${T};`).join(" ");r+=`
|
3
|
+
:host([${R}="${p}"])${d}{
|
4
|
+
${g}
|
4
5
|
}
|
5
|
-
:host([${
|
6
|
-
${
|
6
|
+
:host([${V}="${p}"]:hover)${d}{
|
7
|
+
${g}
|
7
8
|
}
|
8
|
-
`}else
|
9
|
-
:host([${
|
10
|
-
${
|
9
|
+
`}else r+=`
|
10
|
+
:host([${R}="${p}"])${d}{
|
11
|
+
${C}
|
11
12
|
}
|
12
|
-
:host([${
|
13
|
-
${
|
13
|
+
:host([${V}="${p}"]:hover)${d}{
|
14
|
+
${C}
|
14
15
|
}
|
15
|
-
`}}
|
16
|
-
`);let
|
17
|
-
`);t
|
18
|
-
${
|
16
|
+
`}}n!=="default"&&(r+="}")}return r};function Xn(e){if(e===null||e.includes("/"))return!1;let t=String(e);return/[0-9]$/.test(t)}var Yn=e=>/%$/.test(e),G=e=>{if(e!==void 0)return Yn(e)?e:Xn(e)?`${e}px`:Object.keys(H).includes(e)?`var(${H[e]})`:e},H={xs:"--spacing-xs",sm:"--spacing-sm",md:"--spacing-md",lg:"--spacing-lg",xl:"--spacing-xl"};function Ce(e,t=":host"){let r="";for(let[n,a]of Object.entries(dr)){n!=="default"&&(r+=`${a} {
|
17
|
+
`);let c="";for(let[h,d]of Object.entries(e[n]))d!=null&&(c+=`${h}: ${d};
|
18
|
+
`);r+=`${t} {
|
19
|
+
${c.trim()}
|
19
20
|
}
|
20
|
-
`,
|
21
|
-
`)}return
|
21
|
+
`,n!=="default"&&(r+=`}
|
22
|
+
`)}return r}var je=U`
|
22
23
|
:host([flex="0"]) {
|
23
24
|
flex: 0;
|
24
25
|
}
|
@@ -58,169 +59,190 @@ var rettangoli=(()=>{var{isArray:at}=Array,{getPrototypeOf:Rt,getOwnPropertyDesc
|
|
58
59
|
:host([flex="12"]) {
|
59
60
|
flex: 12;
|
60
61
|
}
|
61
|
-
`;var
|
62
|
-
:
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
62
|
+
`;var Qn={mt:H,mr:H,mb:H,ml:H,m:H,mh:H,mv:H,s:{sm:`
|
63
|
+
height: 28px;
|
64
|
+
padding-left: 12px;
|
65
|
+
padding-right: 12px;
|
66
|
+
border-radius: 4px;
|
67
|
+
font-size: var(--xs-font-size);
|
68
|
+
font-weight: var(--xs-font-weight);
|
69
|
+
line-height: var(--xs-line-height);
|
70
|
+
letter-spacing: var(--xs-letter-spacing);
|
71
|
+
`,md:`
|
72
|
+
height: 32px;
|
73
|
+
padding-left: 16px;
|
74
|
+
padding-right: 16px;
|
75
|
+
border-radius: 4px;
|
76
|
+
font-size: var(--sm-font-size);
|
77
|
+
font-weight: var(--sm-font-weight);
|
78
|
+
line-height: var(--sm-line-height);
|
79
|
+
letter-spacing: var(--sm-letter-spacing);
|
80
|
+
`,lg:`
|
81
|
+
height: 40px;
|
82
|
+
padding-left: 20px;
|
83
|
+
padding-right: 20px;
|
84
|
+
border-radius: 4px;
|
85
|
+
font-size: var(--md-font-size);
|
86
|
+
font-weight: var(--md-font-weight);
|
87
|
+
line-height: var(--md-line-height);
|
88
|
+
letter-spacing: var(--md-letter-spacing);
|
89
|
+
`},v:{pr:`
|
90
|
+
background-color: var(--primary);
|
91
|
+
color: var(--primary-foreground);
|
92
|
+
`,se:`
|
93
|
+
background-color: var(--secondary);
|
94
|
+
color: var(--secondary-foreground);
|
95
|
+
`,de:`
|
96
|
+
background-color: var(--destructive);
|
97
|
+
color: var(--primary-foreground);
|
98
|
+
`,ol:`
|
99
|
+
background-color: transparent;
|
100
|
+
color: var(--foreground);
|
101
|
+
border-width: 1px;
|
102
|
+
`,gh:`
|
103
|
+
background-color: transparent;
|
104
|
+
color: var(--foreground);
|
105
|
+
`,lk:`
|
106
|
+
background-color: transparent;
|
107
|
+
color: var(--foreground);
|
108
|
+
`}},ei={mt:"button",mr:"button",mb:"button",ml:"button",m:"button",mh:"button",mv:"button",s:"button",v:"button"},fr=se(Qn,ei);var Te=U`
|
109
|
+
a, a:link, a:visited, a:hover, a:active {
|
110
|
+
color: inherit;
|
111
|
+
text-decoration: none;
|
112
|
+
background: none;
|
113
|
+
border: none;
|
114
|
+
padding: 0;
|
115
|
+
margin: 0;
|
116
|
+
font: inherit;
|
117
|
+
}
|
118
|
+
`;var ht=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(U`
|
119
|
+
:host {
|
120
|
+
display: contents;
|
121
|
+
}
|
122
|
+
slot {
|
123
|
+
display: contents;
|
124
|
+
}
|
68
125
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
126
|
+
button {
|
127
|
+
display: flex;
|
128
|
+
flex-direction: row;
|
129
|
+
align-items: center;
|
130
|
+
justify-content: center;
|
131
|
+
gap: var(--spacing-sm);
|
132
|
+
border-width: 0px;
|
133
|
+
border-style: solid;
|
134
|
+
border-color: var(--border);
|
135
|
+
padding: 0px;
|
136
|
+
height: 32px;
|
137
|
+
padding-left: 16px;
|
138
|
+
padding-right: 16px;
|
139
|
+
border-radius: 4px;
|
77
140
|
|
78
|
-
|
79
|
-
|
80
|
-
|
141
|
+
font-size: var(--sm-font-size);
|
142
|
+
font-weight: var(--sm-font-weight);
|
143
|
+
line-height: var(--sm-line-height);
|
144
|
+
letter-spacing: var(--sm-letter-spacing);
|
81
145
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
color: var(--color-on-primary);
|
86
|
-
border-color: var(--color-primary);
|
87
|
-
background-color: var(--color-primary);
|
88
|
-
}
|
146
|
+
background-color: var(--primary);
|
147
|
+
color: var(--primary-foreground);
|
148
|
+
}
|
89
149
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
150
|
+
button:hover {
|
151
|
+
cursor: pointer;
|
152
|
+
background-color: color-mix(
|
153
|
+
in srgb,
|
154
|
+
var(--primary) 85%,
|
155
|
+
white 15%
|
156
|
+
);
|
157
|
+
}
|
96
158
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
border-color: var(--color-primary-active);
|
101
|
-
background-color: var(--color-primary-active);
|
102
|
-
}
|
159
|
+
button:disabled {
|
160
|
+
cursor: not-allowed;
|
161
|
+
}
|
103
162
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
163
|
+
button:active {
|
164
|
+
cursor: pointer;
|
165
|
+
background-color: color-mix(
|
166
|
+
in srgb,
|
167
|
+
var(--primary) 80%,
|
168
|
+
white 20%
|
169
|
+
);
|
170
|
+
}
|
111
171
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
172
|
+
:host([v="pr"]) button:hover {
|
173
|
+
background-color: color-mix(
|
174
|
+
in srgb,
|
175
|
+
var(--primary) 85%,
|
176
|
+
white 15%
|
177
|
+
);
|
178
|
+
}
|
118
179
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
180
|
+
:host([v="pr"]) button:active {
|
181
|
+
background-color: color-mix(
|
182
|
+
in srgb,
|
183
|
+
var(--primary) 80%,
|
184
|
+
white 20%
|
185
|
+
);
|
186
|
+
}
|
125
187
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
188
|
+
:host([v="se"]) button:hover {
|
189
|
+
background-color: color-mix(
|
190
|
+
in srgb,
|
191
|
+
var(--secondary) 85%,
|
192
|
+
white 15%
|
193
|
+
);
|
194
|
+
}
|
133
195
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
196
|
+
:host([v="se"]) button:active {
|
197
|
+
background-color: color-mix(
|
198
|
+
in srgb,
|
199
|
+
var(--secondary) 80%,
|
200
|
+
white 20%
|
201
|
+
);
|
202
|
+
}
|
140
203
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
204
|
+
:host([v="de"]) button:hover {
|
205
|
+
background-color: color-mix(
|
206
|
+
in srgb,
|
207
|
+
var(--destructive) 85%,
|
208
|
+
white 15%
|
209
|
+
);
|
210
|
+
}
|
147
211
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
212
|
+
:host([v="de"]) button:active {
|
213
|
+
background-color: color-mix(
|
214
|
+
in srgb,
|
215
|
+
var(--destructive) 80%,
|
216
|
+
white 20%
|
217
|
+
);
|
218
|
+
}
|
155
219
|
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
background-color: var(--color-surface-container-high);
|
160
|
-
border-color: var(--color-surface-container-high);
|
161
|
-
}
|
220
|
+
:host([v="ol"]) button:hover {
|
221
|
+
background-color: var(--accent);
|
222
|
+
}
|
162
223
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
background-color: var(--color-surface-container-high);
|
167
|
-
border-color: var(--color-surface-container-high);
|
168
|
-
}
|
224
|
+
:host([v="gh"]) button:hover {
|
225
|
+
background-color: var(--accent);
|
226
|
+
}
|
169
227
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
:host([t="ns"]) button {
|
174
|
-
height: var(--button-height-s);
|
175
|
-
padding-left: var(--button-padding-horizontal-s);
|
176
|
-
padding-right: var(--button-padding-horizontal-s);
|
177
|
-
border-radius: var(--button-border-radius-s);
|
178
|
-
}
|
228
|
+
:host([v="lk"]) button:hover {
|
229
|
+
text-decoration: underline;
|
230
|
+
}
|
179
231
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
padding-left: var(--button-padding-horizontal-m);
|
186
|
-
padding-right: var(--button-padding-horizontal-m);
|
187
|
-
border-radius: var(--button-border-radius-m);
|
188
|
-
}
|
232
|
+
${Te}
|
233
|
+
|
234
|
+
a {
|
235
|
+
display: contents;
|
236
|
+
}
|
189
237
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
:host([t="nl"]) button {
|
194
|
-
height: var(--button-height-l);
|
195
|
-
padding-left: var(--button-padding-horizontal-l);
|
196
|
-
padding-right: var(--button-padding-horizontal-l);
|
197
|
-
border-radius: var(--button-border-radius-l);
|
198
|
-
font-size: var(--typography-label-l-font-size);
|
199
|
-
font-weight: var(--typography-label-l-font-weight);
|
200
|
-
line-height: var(--typography-label-l-line-height);
|
201
|
-
letter-spacing: var(--typography-label-l-letter-spacing);
|
202
|
-
}
|
203
|
-
${yt}
|
204
|
-
${$}
|
205
|
-
`),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[o],e(this.shadow,this.render)}static get observedAttributes(){return["key","href","target","w","t"]}_buttonRef={};_assingRef=s=>{this._buttonRef.current=s;let i=v(this.getAttribute("w"));i==="f"?this._buttonRef.current.style.width="100%":i!=null&&(this._buttonRef.current.style.width=i)};attributeChangedCallback(s,i,a){if(!this._buttonRef.current)return;let r=v(this.getAttribute("w"));r==="f"?this._buttonRef.current.style.width="100%":r!=null&&(this._buttonRef.current.style.width=r,this._buttonRef.current.style.minWidth=r,this._buttonRef.current.style.maxWidth=r),e(this.shadow,this.render)}render=()=>this.getAttribute("href")?t`
|
206
|
-
<a
|
207
|
-
href=${this.getAttribute("href")}
|
208
|
-
target=${this.getAttribute("target")}
|
209
|
-
>
|
210
|
-
<button>
|
211
|
-
<slot></slot>
|
212
|
-
</button>
|
213
|
-
</a>
|
214
|
-
`:t`
|
215
|
-
<button ref=${this._assingRef}>
|
216
|
-
<slot></slot>
|
217
|
-
</button>
|
218
|
-
`}};var P=m`
|
238
|
+
${fr}
|
239
|
+
${je}
|
240
|
+
`))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._containerElement=null,this._buttonElement=document.createElement("button"),this._slotElement=document.createElement("slot"),this._iconElement=null,this._buttonElement.appendChild(this._slotElement)}static get observedAttributes(){return["key","href","target","w","t","icon","disabled","v","s"]}connectedCallback(){this._updateButton()}attributeChangedCallback(t,r,n){this._updateButton()}_updateButton(){this.shadow.innerHTML="",this._updateIcon(),this._updateWidth(),this.hasAttribute("disabled")?this._buttonElement.setAttribute("disabled",""):this._buttonElement.removeAttribute("disabled");let r=this.getAttribute("href");if(r){let n=document.createElement("a");n.setAttribute("href",r);let a=this.getAttribute("target");a&&n.setAttribute("target",a),n.appendChild(this._buttonElement),this.shadow.appendChild(n),this._containerElement=n}else this.shadow.appendChild(this._buttonElement),this._containerElement=this._buttonElement}_updateIcon(){this._iconElement&&(this._iconElement.remove(),this._iconElement=null);let t=this.getAttribute("icon");if(t){let r={pr:"pr-fg",se:"ac-fg",de:"pr-fg",ol:"ac-fg",gh:"ac-fg",lk:"ac-fg"},n={sm:14,md:18,lg:22},a=r[this.getAttribute("v")]||"pr-fg",c=n[this.getAttribute("t")]||18;this._iconElement=document.createElement("rtgl-svg"),this._iconElement.setAttribute("svg",t),this._iconElement.setAttribute("c",a),this._iconElement.setAttribute("wh",c.toString()),this._buttonElement.insertBefore(this._iconElement,this._slotElement)}}_updateWidth(){let t=G(this.getAttribute("w"));t==="f"?this._buttonElement.style.width="var(--width-stretch)":t!=null?(this._buttonElement.style.width=t,this._buttonElement.style.minWidth=t,this._buttonElement.style.maxWidth=t):(this._buttonElement.style.width="",this._buttonElement.style.minWidth="",this._buttonElement.style.maxWidth="")}},pr=({render:e,html:t})=>ht;var mr=U`
|
219
241
|
|
220
242
|
:host([d="h"]) {
|
221
243
|
flex-direction: row;
|
222
244
|
}
|
223
|
-
:host(
|
245
|
+
:host([d="v"]) {
|
224
246
|
flex-direction: column;
|
225
247
|
}
|
226
248
|
:host([d="h"]:not([ah])) {
|
@@ -228,7 +250,6 @@ var rettangoli=(()=>{var{isArray:at}=Array,{getPrototypeOf:Rt,getOwnPropertyDesc
|
|
228
250
|
}
|
229
251
|
:host([d="h"][ah="c"]) {
|
230
252
|
justify-content: center;
|
231
|
-
/* align-content: center; */
|
232
253
|
}
|
233
254
|
:host([d="h"][ah="e"]) {
|
234
255
|
justify-content: flex-end;
|
@@ -244,26 +265,34 @@ var rettangoli=(()=>{var{isArray:at}=Array,{getPrototypeOf:Rt,getOwnPropertyDesc
|
|
244
265
|
align-items: flex-end;
|
245
266
|
align-content: flex-end;
|
246
267
|
}
|
247
|
-
|
268
|
+
|
269
|
+
/* Default/vertical direction - horizontal alignment */
|
270
|
+
:host(:not([d]):not([ah])),
|
271
|
+
:host([d="v"]:not([ah])) {
|
248
272
|
align-items: flex-start;
|
249
273
|
}
|
250
|
-
:host(:not([d])[ah="c"])
|
274
|
+
:host(:not([d])[ah="c"]),
|
275
|
+
:host([d="v"][ah="c"]) {
|
251
276
|
align-items: center;
|
252
|
-
align-content: center;
|
253
277
|
}
|
254
|
-
:host(:not([d])[ah="e"])
|
278
|
+
:host(:not([d])[ah="e"]),
|
279
|
+
:host([d="v"][ah="e"]) {
|
255
280
|
align-items: flex-end;
|
256
|
-
align-content: flex-end;
|
257
281
|
}
|
258
|
-
|
282
|
+
|
283
|
+
:host(:not([d]):not([av])),
|
284
|
+
:host([d="v"]:not([av])) {
|
259
285
|
justify-content: flex-start;
|
260
286
|
}
|
261
|
-
:host(:not([d])[av="c"])
|
287
|
+
:host(:not([d])[av="c"]),
|
288
|
+
:host([d="v"][av="c"]) {
|
262
289
|
justify-content: center;
|
263
290
|
}
|
264
|
-
:host(:not([d])[av="e"])
|
291
|
+
:host(:not([d])[av="e"]),
|
292
|
+
:host([d="v"][av="e"]) {
|
265
293
|
justify-content: flex-end;
|
266
294
|
}
|
295
|
+
|
267
296
|
@media screen and (max-width: 640px) {
|
268
297
|
:host([s-d="v"]) {
|
269
298
|
flex-direction: column;
|
@@ -279,7 +308,7 @@ var rettangoli=(()=>{var{isArray:at}=Array,{getPrototypeOf:Rt,getOwnPropertyDesc
|
|
279
308
|
justify-content: center;
|
280
309
|
}
|
281
310
|
}
|
282
|
-
`;var
|
311
|
+
`;var ti={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},oe=se(ti);var gr=U`
|
283
312
|
:host([sh]:not([sv])) {
|
284
313
|
overflow-x: scroll;
|
285
314
|
flex-wrap: nowrap;
|
@@ -297,43 +326,22 @@ var rettangoli=(()=>{var{isArray:at}=Array,{getPrototypeOf:Rt,getOwnPropertyDesc
|
|
297
326
|
flex-wrap: nowrap;
|
298
327
|
}
|
299
328
|
|
300
|
-
`;var
|
301
|
-
background-color: var(--
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
color: var(--
|
306
|
-
`,
|
307
|
-
background-color: var(--
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
color: var(--
|
312
|
-
`,
|
313
|
-
background-color: var(--
|
314
|
-
|
315
|
-
|
316
|
-
background-color: var(--color-error-container);
|
317
|
-
color: var(--color-on-error-container);
|
318
|
-
`,su:`
|
319
|
-
background-color: var(--color-surface);
|
320
|
-
color: var(--color-on-surface);
|
321
|
-
`,sucl:`
|
322
|
-
background-color: var(--color-surface-container-low);
|
323
|
-
color: var(--color-on-surface);
|
324
|
-
`,suc:`
|
325
|
-
background-color: var(--color-surface-container);
|
326
|
-
color: var(--color-on-surface);
|
327
|
-
`,such:`
|
328
|
-
background-color: var(--color-surface-container-high);
|
329
|
-
color: var(--color-on-surface);
|
330
|
-
`,isu:`
|
331
|
-
background-color: var(--color-inverse-surface);
|
332
|
-
color: var(--color-inverse-on-surface);
|
333
|
-
`,o:`
|
334
|
-
background-color: var(--color-outline);
|
335
|
-
`,ov:`
|
336
|
-
background-color: var(--color-outline-variant);
|
329
|
+
`;var Ze={xs:"--border-width-xs",sm:"--border-width-sm",md:"--border-width-md",lg:"--border-width-lg",xl:"--border-width-xl"},ri={bgc:{pr:`
|
330
|
+
background-color: var(--primary);
|
331
|
+
`,se:`
|
332
|
+
background-color: var(--secondary);
|
333
|
+
`,de:`
|
334
|
+
background-color: var(--destructive);
|
335
|
+
`,fg:`
|
336
|
+
background-color: var(--foreground);
|
337
|
+
`,bg:`
|
338
|
+
background-color: var(--background);
|
339
|
+
`,mu:`
|
340
|
+
background-color: var(--muted);
|
341
|
+
`,ac:`
|
342
|
+
background-color: var(--accent);
|
343
|
+
`,bo:`
|
344
|
+
background-color: var(--border);
|
337
345
|
`},pos:{rel:"relative",abs:"absolute",fix:"fixed"},cor:{full:`
|
338
346
|
top: 0;
|
339
347
|
right: 0;
|
@@ -358,149 +366,172 @@ var rettangoli=(()=>{var{isArray:at}=Array,{getPrototypeOf:Rt,getOwnPropertyDesc
|
|
358
366
|
left: 0;
|
359
367
|
top: 0;
|
360
368
|
height: 100%;
|
361
|
-
`},shadow:{
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
}
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
369
|
+
`},shadow:{sm:"--shadow-sm",md:"--shadow-md",lg:"--shadow-lg"},pt:H,pr:H,pb:H,pl:H,p:H,ph:H,pv:H,g:H,gv:H,gh:H,bw:Ze,bwt:Ze,bwr:Ze,bwb:Ze,bwl:Ze,bc:{p:"--color-primary",pc:"--color-primary-container",s:"--color-secondary",sc:"--color-secondary-container",e:"--color-error",ec:"--color-error-container",su:"--color-surface",sucl:"--color-surface-container-low",suc:"--color-surface-container",such:"--color-surface-container-high",isu:"--color-inverse-surface",o:"--color-outline",ov:"--color-outline-variant"},br:{xs:"--border-radius-xs",sm:"--border-radius-sm",md:"--border-radius-md",lg:"--border-radius-lg",xl:"--border-radius-xl",f:"--border-radius-f"}},qe=se(ri);var ni={mt:H,mr:H,mb:H,ml:H,m:H,mh:H,mv:H},de=se(ni);var ut=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(U`
|
370
|
+
slot {
|
371
|
+
display: contents;
|
372
|
+
}
|
373
|
+
:host {
|
374
|
+
display: flex;
|
375
|
+
flex-direction: column;
|
376
|
+
align-self: auto;
|
377
|
+
align-content: flex-start;
|
378
|
+
border-style: solid;
|
379
|
+
border-width: 0;
|
380
|
+
box-sizing: border-box;
|
381
|
+
border-color: var(--border);
|
382
|
+
}
|
383
|
+
|
384
|
+
:host([fw="w"]) {
|
385
|
+
flex-wrap: wrap;
|
386
|
+
}
|
387
|
+
|
388
|
+
${je}
|
389
|
+
${gr}
|
390
|
+
${mr}
|
391
|
+
${de}
|
392
|
+
${oe}
|
393
|
+
${qe}
|
394
|
+
${Te}
|
395
|
+
|
396
|
+
:host([href]) {
|
397
|
+
cursor: pointer;
|
398
|
+
position: relative;
|
399
|
+
}
|
400
|
+
|
401
|
+
:host([href]) a {
|
402
|
+
position: absolute;
|
403
|
+
top: 0;
|
404
|
+
left: 0;
|
405
|
+
right: 0;
|
406
|
+
bottom: 0;
|
407
|
+
z-index: 1;
|
408
|
+
}
|
409
|
+
`))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._styleElement=document.createElement("style"),this._slotElement=document.createElement("slot"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return["href","target",...Oe([...Ee,"wh","w","h","hidden","sh","sv"])]}_styles={default:{},sm:{},md:{},lg:{},xl:{}};_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),r=this.getAttribute("target");this._slotElement.parentNode!==this.shadow&&this.shadow.appendChild(this._slotElement),t?(this._linkElement||(this._linkElement=document.createElement("a"),this.shadow.appendChild(this._linkElement)),this._linkElement.href=t,r?this._linkElement.target=r:this._linkElement.removeAttribute("target")):this._linkElement&&(this.shadow.removeChild(this._linkElement),this._linkElement=null)}attributeChangedCallback(t,r,n){if(t==="href"||t==="target"){this._updateDOM();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(c=>{let h=R=>`${c==="default"?"":`${c}-`}${R}`,d=this.getAttribute(h("wh")),p=G(d===null?this.getAttribute(h("w")):d),C=G(d===null?this.getAttribute(h("h")):d),D=this.getAttribute(h("op")),T=this.getAttribute(h("z"));T!==null&&(this._styles[c]["z-index"]=T),D!==null&&(this._styles[c].opacity=D),p==="f"?this._styles[c].width="var(--width-stretch)":p!==void 0&&(this._styles[c].width=p,this._styles[c]["min-width"]=p,this._styles[c]["max-width"]=p),C==="f"?this._styles[c].height="100%":C!==void 0&&(this._styles[c].height=C,this._styles[c]["min-height"]=C,this._styles[c]["max-height"]=C),this.hasAttribute(h("hidden"))&&(this._styles[c].display="none !important"),this.hasAttribute(h("visible"))&&(this._styles[c].display="flex !important")});let a=Ce(this._styles);a!==this._lastStyleString&&(this._styleElement.textContent=a,this._lastStyleString=a)}},yr=({render:e,html:t})=>ut;var ii={ta:{s:"start",c:"center",e:"end",j:"justify"},s:{h1:`
|
410
|
+
font-size: var(--h1-font-size);
|
411
|
+
font-weight: var(--h1-font-weight);
|
412
|
+
line-height: var(--h1-line-height);
|
413
|
+
letter-spacing: var(--h1-letter-spacing);
|
414
|
+
`,h2:`
|
415
|
+
font-size: var(--h2-font-size);
|
416
|
+
font-weight: var(--h2-font-weight);
|
417
|
+
line-height: var(--h2-line-height);
|
418
|
+
letter-spacing: var(--h2-letter-spacing);
|
419
|
+
`,h3:`
|
420
|
+
font-size: var(--h3-font-size);
|
421
|
+
font-weight: var(--h3-font-weight);
|
422
|
+
line-height: var(--h3-line-height);
|
423
|
+
letter-spacing: var(--h3-letter-spacing);
|
424
|
+
`,h4:`
|
425
|
+
font-size: var(--h4-font-size);
|
426
|
+
font-weight: var(--h4-font-weight);
|
427
|
+
line-height: var(--h4-line-height);
|
428
|
+
letter-spacing: var(--h4-letter-spacing);
|
429
|
+
`,lg:`
|
430
|
+
font-size: var(--lg-font-size);
|
431
|
+
font-weight: var(--lg-font-weight);
|
432
|
+
line-height: var(--lg-line-height);
|
433
|
+
letter-spacing: var(--lg-letter-spacing);
|
434
|
+
`,md:`
|
435
|
+
font-size: var(--md-font-size);
|
436
|
+
font-weight: var(--md-font-weight);
|
437
|
+
line-height: var(--md-line-height);
|
438
|
+
letter-spacing: var(--md-letter-spacing);
|
439
|
+
`,sm:`
|
440
|
+
font-size: var(--sm-font-size);
|
441
|
+
font-weight: var(--sm-font-weight);
|
442
|
+
line-height: var(--sm-line-height);
|
443
|
+
letter-spacing: var(--sm-letter-spacing);
|
444
|
+
`,xs:`
|
445
|
+
font-size: var(--xs-font-size);
|
446
|
+
font-weight: var(--xs-font-weight);
|
447
|
+
line-height: var(--xs-line-height);
|
448
|
+
letter-spacing: var(--xs-letter-spacing);
|
449
|
+
`}},br=se(ii);var si={c:{fg:"--foreground",de:"--destructive","pr-fg":"--primary-foreground","se-fg":"--secondary-foreground","mu-fg":"--muted-foreground","ac-fg":"--accent-foreground"}},Ge=se(si);var dt=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(U`
|
450
|
+
:host {
|
451
|
+
display: block;
|
452
|
+
font-size: var(--md-font-size);
|
453
|
+
font-weight: var(--md-font-weight);
|
454
|
+
line-height: var(--md-line-height);
|
455
|
+
letter-spacing: var(--md-letter-spacing);
|
456
|
+
}
|
457
|
+
slot {
|
458
|
+
display: contents;
|
459
|
+
}
|
460
|
+
:host ::slotted(a) {
|
461
|
+
text-decoration: var(--anchor-text-decoration);
|
462
|
+
color: var(--anchor-color);
|
463
|
+
}
|
464
|
+
:host ::slotted(a:hover) {
|
465
|
+
text-decoration: var(--anchor-text-decoration-hover);
|
466
|
+
color: var(--anchor-color-hover);
|
467
|
+
}
|
468
|
+
:host([href]) {
|
469
|
+
cursor: pointer;
|
470
|
+
position: relative;
|
471
|
+
}
|
472
|
+
:host([href]) a {
|
473
|
+
position: absolute;
|
474
|
+
top: 0;
|
475
|
+
left: 0;
|
476
|
+
right: 0;
|
477
|
+
bottom: 0;
|
478
|
+
z-index: 1;
|
479
|
+
}
|
480
|
+
${br}
|
481
|
+
${Ge}
|
482
|
+
${de}
|
483
|
+
${oe}
|
484
|
+
`))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._slotElement=document.createElement("slot"),this._linkElement=null,this._updateDOM()}static get observedAttributes(){return["key","w","ellipsis","href","target"]}connectedCallback(){this._updateStyling(),this._updateDOM()}attributeChangedCallback(t,r,n){t==="href"||t==="target"?this._updateDOM():this._updateStyling()}_updateStyling(){let t=G(this.getAttribute("w"));this.hasAttribute("ellipsis")?(this.style.overflow="hidden",this.style.textOverflow="ellipsis",this.style.whiteSpace="nowrap"):(this.style.overflow="",this.style.textOverflow="",this.style.whiteSpace=""),t==="f"?this.style.width="var(--width-stretch)":t!==void 0?this.style.width=t:this.style.width=""}_updateDOM(){let t=this.getAttribute("href"),r=this.getAttribute("target");this._slotElement.parentNode!==this.shadow&&this.shadow.appendChild(this._slotElement),t?(this._linkElement||(this._linkElement=document.createElement("a"),this.shadow.appendChild(this._linkElement)),this._linkElement.href=t,r?this._linkElement.target=r:this._linkElement.removeAttribute("target")):this._linkElement&&(this.shadow.removeChild(this._linkElement),this._linkElement=null)}},vr=({render:e,html:t})=>dt;var ft=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(U`
|
485
|
+
:host {
|
486
|
+
border-style: solid;
|
487
|
+
box-sizing: border-box;
|
488
|
+
overflow: hidden;
|
489
|
+
border-width: 0;
|
490
|
+
}
|
491
|
+
slot {
|
492
|
+
display: contents;
|
493
|
+
}
|
494
|
+
:host([of="con"]) img {
|
495
|
+
object-fit: contain;
|
496
|
+
}
|
497
|
+
:host([of="cov"]) img {
|
498
|
+
object-fit: cover;
|
499
|
+
}
|
500
|
+
:host([of="none"]) img {
|
501
|
+
object-fit: none;
|
502
|
+
}
|
503
|
+
img {
|
504
|
+
height: 100%;
|
505
|
+
width: 100%;
|
506
|
+
}
|
507
|
+
|
508
|
+
${Te}
|
509
|
+
|
510
|
+
a {
|
511
|
+
display: block;
|
512
|
+
height: 100%;
|
513
|
+
width: 100%;
|
514
|
+
}
|
515
|
+
|
516
|
+
:host([href]) {
|
517
|
+
cursor: pointer;
|
518
|
+
}
|
519
|
+
|
520
|
+
${qe}
|
521
|
+
${de}
|
522
|
+
${oe}
|
523
|
+
`))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._styleElement=document.createElement("style"),this._imgElement=document.createElement("img"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return Oe([...Ee,"key","src","href","target","wh","w","h","hidden","height","width"])}_styles={default:{},sm:{},md:{},lg:{},xl:{}};_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),r=this.getAttribute("target");t?(this._linkElement||(this._linkElement=document.createElement("a")),this._linkElement.href=t,r?this._linkElement.target=r:this._linkElement.removeAttribute("target"),this._linkElement.appendChild(this._imgElement),this._linkElement.parentNode!==this.shadow&&this.shadow.appendChild(this._linkElement)):this._linkElement?(this._imgElement.parentNode===this._linkElement&&this.shadow.appendChild(this._imgElement),this._linkElement.parentNode===this.shadow&&this.shadow.removeChild(this._linkElement),this._linkElement=null):this._imgElement.parentNode!==this.shadow&&this.shadow.appendChild(this._imgElement)}attributeChangedCallback(t,r,n){if(t==="href"||t==="target"){this._updateDOM();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(c=>{let h=R=>`${c==="default"?"":`${c}-`}${R}`,d=this.getAttribute(h("wh")),p=G(d===null?this.getAttribute(h("w")):d),C=G(d===null?this.getAttribute(h("h")):d),D=this.getAttribute(h("o")),T=this.getAttribute(h("z"));T!==null&&(this._styles[c]["z-index"]=T),D!==null&&(this._styles[c].opacity=D),p==="f"?this._styles[c].width="var(--width-stretch)":p!==void 0&&(this._styles[c].width=p,this._styles[c]["min-width"]=p,this._styles[c]["max-width"]=p),C==="f"?this._styles[c].height="100%":C!==void 0&&(this._styles[c].height=C,this._styles[c]["min-height"]=C,this._styles[c]["max-height"]=C),this.hasAttribute(h("hidden"))&&(this._styles[c].display="none !important"),this.hasAttribute(h("visible"))&&(this._styles[c].display="block !important")});let a=Ce(this._styles);a!==this._lastStyleString&&(this._styleElement.textContent=a,this._lastStyleString=a),this._updateImageAttributes()}_updateImageAttributes(){let t=this.getAttribute("src"),r=this.getAttribute("width"),n=this.getAttribute("height");t!==null&&this._imgElement.setAttribute("src",t),r!==null&&this._imgElement.setAttribute("width",r),n!==null&&this._imgElement.setAttribute("height",n)}connectedCallback(){this._updateImageAttributes()}},wr=({render:e,html:t})=>ft;var _r=U`
|
493
524
|
:host([pt="xs"]) svg {
|
494
525
|
padding-top: var(--spacing-xs);
|
495
526
|
}
|
496
|
-
:host([pt="
|
497
|
-
padding-top: var(--spacing-
|
527
|
+
:host([pt="sm"]) svg {
|
528
|
+
padding-top: var(--spacing-sm);
|
498
529
|
}
|
499
|
-
:host([pt="
|
500
|
-
padding-top: var(--spacing-
|
530
|
+
:host([pt="md"]) svg {
|
531
|
+
padding-top: var(--spacing-md);
|
501
532
|
}
|
502
|
-
:host([pt="
|
503
|
-
padding-top: var(--spacing-
|
533
|
+
:host([pt="lg"]) svg {
|
534
|
+
padding-top: var(--spacing-lg);
|
504
535
|
}
|
505
536
|
:host([pt="xl"]) svg {
|
506
537
|
padding-top: var(--spacing-xl);
|
@@ -508,14 +539,14 @@ ${x}
|
|
508
539
|
:host([pr="xs"]) svg {
|
509
540
|
padding-right: var(--spacing-xs);
|
510
541
|
}
|
511
|
-
:host([pr="
|
512
|
-
padding-right: var(--spacing-
|
542
|
+
:host([pr="sm"]) svg {
|
543
|
+
padding-right: var(--spacing-sm);
|
513
544
|
}
|
514
|
-
:host([pr="
|
515
|
-
padding-right: var(--spacing-
|
545
|
+
:host([pr="md"]) svg {
|
546
|
+
padding-right: var(--spacing-md);
|
516
547
|
}
|
517
|
-
:host([pr="
|
518
|
-
padding-right: var(--spacing-
|
548
|
+
:host([pr="lg"]) svg {
|
549
|
+
padding-right: var(--spacing-lg);
|
519
550
|
}
|
520
551
|
:host([pr="xl"]) svg {
|
521
552
|
padding-right: var(--spacing-xl);
|
@@ -523,14 +554,14 @@ ${x}
|
|
523
554
|
:host([pb="xs"]) svg {
|
524
555
|
padding-bottom: var(--spacing-xs);
|
525
556
|
}
|
526
|
-
:host([pb="
|
527
|
-
padding-bottom: var(--spacing-
|
557
|
+
:host([pb="sm"]) svg {
|
558
|
+
padding-bottom: var(--spacing-sm);
|
528
559
|
}
|
529
|
-
:host([pb="
|
530
|
-
padding-bottom: var(--spacing-
|
560
|
+
:host([pb="md"]) svg {
|
561
|
+
padding-bottom: var(--spacing-md);
|
531
562
|
}
|
532
|
-
:host([pb="
|
533
|
-
padding-bottom: var(--spacing-
|
563
|
+
:host([pb="lg"]) svg {
|
564
|
+
padding-bottom: var(--spacing-lg);
|
534
565
|
}
|
535
566
|
:host([pb="xl"]) svg {
|
536
567
|
padding-bottom: var(--spacing-xl);
|
@@ -538,14 +569,14 @@ ${x}
|
|
538
569
|
:host([pl="xs"]) svg {
|
539
570
|
padding-left: var(--spacing-xs);
|
540
571
|
}
|
541
|
-
:host([pl="
|
542
|
-
padding-left: var(--spacing-
|
572
|
+
:host([pl="sm"]) svg {
|
573
|
+
padding-left: var(--spacing-sm);
|
543
574
|
}
|
544
|
-
:host([pl="
|
545
|
-
padding-left: var(--spacing-
|
575
|
+
:host([pl="md"]) svg {
|
576
|
+
padding-left: var(--spacing-md);
|
546
577
|
}
|
547
|
-
:host([pl="
|
548
|
-
padding-left: var(--spacing-
|
578
|
+
:host([pl="lg"]) svg {
|
579
|
+
padding-left: var(--spacing-lg);
|
549
580
|
}
|
550
581
|
:host([pl="xl"]) svg {
|
551
582
|
padding-left: var(--spacing-xl);
|
@@ -553,14 +584,14 @@ ${x}
|
|
553
584
|
:host([p="xs"]) svg {
|
554
585
|
padding: var(--spacing-xs);
|
555
586
|
}
|
556
|
-
:host([p="
|
557
|
-
padding: var(--spacing-
|
587
|
+
:host([p="sm"]) svg {
|
588
|
+
padding: var(--spacing-sm);
|
558
589
|
}
|
559
|
-
:host([p="
|
560
|
-
padding: var(--spacing-
|
590
|
+
:host([p="md"]) svg {
|
591
|
+
padding: var(--spacing-md);
|
561
592
|
}
|
562
|
-
:host([p="
|
563
|
-
padding: var(--spacing-
|
593
|
+
:host([p="lg"]) svg {
|
594
|
+
padding: var(--spacing-lg);
|
564
595
|
}
|
565
596
|
:host([p="xl"]) svg {
|
566
597
|
padding: var(--spacing-xl);
|
@@ -569,17 +600,17 @@ ${x}
|
|
569
600
|
padding-left: var(--spacing-xs);
|
570
601
|
padding-right: var(--spacing-xs);
|
571
602
|
}
|
572
|
-
:host([ph="
|
573
|
-
padding-left: var(--spacing-
|
574
|
-
padding-right: var(--spacing-
|
603
|
+
:host([ph="sm"]) svg {
|
604
|
+
padding-left: var(--spacing-sm);
|
605
|
+
padding-right: var(--spacing-sm);
|
575
606
|
}
|
576
|
-
:host([ph="
|
577
|
-
padding-left: var(--spacing-
|
578
|
-
padding-right: var(--spacing-
|
607
|
+
:host([ph="md"]) svg {
|
608
|
+
padding-left: var(--spacing-md);
|
609
|
+
padding-right: var(--spacing-md);
|
579
610
|
}
|
580
|
-
:host([ph="
|
581
|
-
padding-left: var(--spacing-
|
582
|
-
padding-right: var(--spacing-
|
611
|
+
:host([ph="lg"]) svg {
|
612
|
+
padding-left: var(--spacing-lg);
|
613
|
+
padding-right: var(--spacing-lg);
|
583
614
|
}
|
584
615
|
:host([ph="xl"]) svg {
|
585
616
|
padding-left: var(--spacing-xl);
|
@@ -589,58 +620,103 @@ ${x}
|
|
589
620
|
padding-top: var(--spacing-xs);
|
590
621
|
padding-bottom: var(--spacing-xs);
|
591
622
|
}
|
592
|
-
:host([pv="
|
593
|
-
padding-top: var(--spacing-
|
594
|
-
padding-bottom: var(--spacing-
|
623
|
+
:host([pv="sm"]) svg {
|
624
|
+
padding-top: var(--spacing-sm);
|
625
|
+
padding-bottom: var(--spacing-sm);
|
595
626
|
}
|
596
|
-
:host([pv="
|
597
|
-
padding-top: var(--spacing-
|
598
|
-
padding-bottom: var(--spacing-
|
627
|
+
:host([pv="md"]) svg {
|
628
|
+
padding-top: var(--spacing-md);
|
629
|
+
padding-bottom: var(--spacing-md);
|
599
630
|
}
|
600
|
-
:host([pv="
|
601
|
-
padding-top: var(--spacing-
|
602
|
-
padding-bottom: var(--spacing-
|
631
|
+
:host([pv="lg"]) svg {
|
632
|
+
padding-top: var(--spacing-lg);
|
633
|
+
padding-bottom: var(--spacing-lg);
|
603
634
|
}
|
604
635
|
:host([pv="xl"]) svg {
|
605
636
|
padding-top: var(--spacing-xl);
|
606
637
|
padding-bottom: var(--spacing-xl);
|
607
638
|
}
|
608
|
-
`;var
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
${
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
639
|
+
`;var pt=class e extends HTMLElement{static styleSheet=null;static _icons={};static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(U`
|
640
|
+
:host {
|
641
|
+
color: var(--foreground);
|
642
|
+
}
|
643
|
+
${Ge}
|
644
|
+
${_r}
|
645
|
+
${je}
|
646
|
+
${oe}
|
647
|
+
`))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet]}static get observedAttributes(){return["key","svg","w","h","wh"]}static get icons(){return e._icons}static addIcon(t,r){e._icons[t]=r}connectedCallback(){this._updateSizing(),this._render()}attributeChangedCallback(t,r,n){this._updateSizing(),this._render()}_updateSizing(){let t=this.getAttribute("wh"),r=G(t===null?this.getAttribute("w"):t),n=G(t===null?this.getAttribute("h"):t);r&&(this.style.width=r),n&&(this.style.height=n)}_render(){try{let t=this.getAttribute("svg"),r=e._icons[t]||(window.rtglIcons||{})[t];if(r){this.shadow.innerHTML=r;return}}catch(t){console.log("error in rtgl-svg render",t)}this.shadow.innerHTML=""}},xr=({render:e,html:t})=>pt;var mt=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(U`
|
648
|
+
:host {
|
649
|
+
display: contents;
|
650
|
+
}
|
651
|
+
input {
|
652
|
+
background-color: var(--background);
|
653
|
+
font-size: var(--sm-font-size);
|
654
|
+
font-weight: var(--sm-font-weight);
|
655
|
+
line-height: var(--sm-line-height);
|
656
|
+
letter-spacing: var(--sm-letter-spacing);
|
657
|
+
border: 1px solid var(--ring);
|
658
|
+
border-radius: var(--border-radius-lg);
|
659
|
+
padding-left: var(--spacing-md);
|
660
|
+
padding-right: var(--spacing-md);
|
661
|
+
height: 32px;
|
662
|
+
color: var(--foreground);
|
663
|
+
outline: none;
|
664
|
+
}
|
665
|
+
input:focus {
|
666
|
+
border-color: var(--foreground);
|
667
|
+
}
|
668
|
+
input:disabled {
|
669
|
+
cursor: not-allowed;
|
670
|
+
}
|
671
|
+
${de}
|
672
|
+
${oe}
|
673
|
+
`))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._styles={default:{},sm:{},md:{},lg:{},xl:{}},this._lastStyleString="",this._inputElement=document.createElement("input"),this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("keydown",this._onChange)}static get observedAttributes(){return["key","type","placeholder","disabled",...Oe([...Ee,"wh","w","h","hidden","visible","op","z"])]}get value(){return this._inputElement.value}_onChange=t=>{this.dispatchEvent(new CustomEvent("input-keydown",{detail:{value:this._inputElement.value}}))};attributeChangedCallback(t,r,n){if(["type","placeholder","disabled"].includes(t)){this._updateInputAttributes();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(c=>{let h=R=>`${c==="default"?"":`${c}-`}${R}`,d=this.getAttribute(h("wh")),p=G(d===null?this.getAttribute(h("w")):d),C=G(d===null?this.getAttribute(h("h")):d),D=this.getAttribute(h("op")),T=this.getAttribute(h("z"));T!==null&&(this._styles[c]["z-index"]=T),D!==null&&(this._styles[c].opacity=D),p==="f"?this._styles[c].width="var(--width-stretch)":p!==void 0&&(this._styles[c].width=p,this._styles[c]["min-width"]=p,this._styles[c]["max-width"]=p),C==="f"?this._styles[c].height="100%":C!==void 0&&(this._styles[c].height=C,this._styles[c]["min-height"]=C,this._styles[c]["max-height"]=C),this.hasAttribute(h("hidden"))&&(this._styles[c].display="none !important"),this.hasAttribute(h("visible"))&&(this._styles[c].display="block !important")});let a=Ce(this._styles,"input");a!==this._lastStyleString&&(this._styleElement.textContent=a,this._lastStyleString=a)}_updateInputAttributes(){let t=this.getAttribute("type")||"text",r=this.getAttribute("placeholder"),n=this.hasAttribute("disabled");this._inputElement.setAttribute("type",t),r!==null?this._inputElement.setAttribute("placeholder",r):this._inputElement.removeAttribute("placeholder"),n?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes()}},$r=({render:e,html:t})=>mt;var gt=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(U`
|
674
|
+
:host {
|
675
|
+
display: contents;
|
676
|
+
}
|
677
|
+
textarea {
|
678
|
+
font-family: inherit;
|
679
|
+
background-color: var(--background);
|
680
|
+
font-size: var(--sm-font-size);
|
681
|
+
font-weight: var(--sm-font-weight);
|
682
|
+
line-height: var(--sm-line-height);
|
683
|
+
letter-spacing: var(--sm-letter-spacing);
|
684
|
+
border: 1px solid var(--ring);
|
685
|
+
border-radius: var(--border-radius-lg);
|
686
|
+
padding-top: var(--spacing-md);
|
687
|
+
padding-bottom: var(--spacing-md);
|
688
|
+
padding-left: var(--spacing-md);
|
689
|
+
padding-right: var(--spacing-md);
|
690
|
+
color: var(--foreground);
|
691
|
+
outline: none;
|
692
|
+
}
|
693
|
+
textarea:focus {
|
694
|
+
border-color: var(--foreground);
|
695
|
+
}
|
696
|
+
${de}
|
697
|
+
${oe}
|
698
|
+
`))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._textareaElement=document.createElement("textarea"),this._textareaElement.setAttribute("type","text"),this.shadow.appendChild(this._textareaElement)}static get observedAttributes(){return["key","w","ellipsis","cols","rows","placeholder"]}get value(){return this._textareaElement.value}set value(t){this._textareaElement.value=t}connectedCallback(){this._updateTextareaAttributes()}attributeChangedCallback(t,r,n){this._updateTextareaAttributes()}_updateTextareaAttributes(){let t=this.getAttribute("cols"),r=this.getAttribute("rows"),n=this.getAttribute("placeholder");t!==null?this._textareaElement.setAttribute("cols",t):this._textareaElement.removeAttribute("cols"),r!==null?this._textareaElement.setAttribute("rows",r):this._textareaElement.removeAttribute("rows"),n!==null?this._textareaElement.setAttribute("placeholder",n):this._textareaElement.removeAttribute("placeholder")}},kr=({render:e,html:t})=>gt;var yt={};ie(yt,{INITIAL_STATE:()=>oi,selectState:()=>li,setOpen:()=>ci,setState:()=>hi,toViewData:()=>ai});var oi=Object.freeze({isOpen:!1}),ai=({state:e,props:t})=>({isOpen:e.isOpen,options:t.options||[]}),li=({state:e})=>e,ci=e=>{e.open=!0},hi=e=>{};var Sr={elementName:"rtgl-select",viewDataSchema:{type:"object"},propsSchema:{type:"object",properties:{options:null,items:{type:"array",items:{type:"object",properties:{id:{type:"string"},lalbel:{type:"string"},value:{type:"any"}}}}}},refs:{"select-button":{eventListeners:{click:{handler:"handleButtonClick"}}},popover:{}},events:{},template:[{"rtgl-button#select-button v=ol":"Placeholder"},{"rtgl-popover#popover":[{"rtgl-view wh=300 g=xs slot=content":[{$map:{$eval:"options"},"each(v,i)":[{"rtgl-view w=f h-bgc=mu ph=lg pv=md cur=p br=md":[{"rtgl-text":"${v.label}"}]}]}]}]}]};var bt={};ie(bt,{handleButtonClick:()=>di,handleOnMount:()=>ui});var ui=e=>{},di=(e,t)=>{let{store:r,render:n,getRefIds:a}=t;a().popover.elm.transformedHandlers.open({position:{x:e.clientX,y:e.clientY}})};var Ar={elementName:"rtgl-navbar",viewDataSchema:{type:"object",properties:{containerAttrString:{type:"string"},start:{type:"object",properties:{label:{type:"string"},href:{type:"string"},image:{type:"object",properties:{src:{type:"string"}}},hasImage:{type:"boolean"},hasHref:{type:"boolean"}}}}},propsSchema:{type:"object",properties:{start:{type:"object",properties:{label:{type:"string"},href:{type:"string"},image:{type:"object",properties:{src:{type:"string"}}}}}}},refs:{start:{eventListeners:{click:{handler:"handleClickStart"}}}},events:{clickStart:{type:"object",properties:{path:{type:"string"}}}},anchors:[[{"rtgl-text s=lg":"${start.label}"},{$switch:{'"image" in start':[{"rtgl-image w=${start.image.width} h=${start.image.height} src=${start.image.src} alt=${start.image.alt}":null}]}}]],template:[{"rtgl-view bgc=bg d=h h=48 av=c w=f ${containerAttrString}":[{$switch:{'"href" in start':[{"a href=${start.href}":[{"rtgl-view d=h av=c g=lg g=md":[[{"rtgl-text s=lg":"${start.label}"},{$switch:{'"image" in start':[{"rtgl-image w=${start.image.width} h=${start.image.height} src=${start.image.src} alt=${start.image.alt}":null}]}}]]}]}],'"path" in start':[{"rtgl-view#start d=h av=c g=lg g=md cur=p":[[{"rtgl-text s=lg":"${start.label}"},{$switch:{'"image" in start':[{"rtgl-image w=${start.image.width} h=${start.image.height} src=${start.image.src} alt=${start.image.alt}":null}]}}]]}],$default:[{"rtgl-view d=h av=c g=lg g=md":[[{"rtgl-text s=lg":"${start.label}"},{$switch:{'"image" in start':[{"rtgl-image w=${start.image.width} h=${start.image.height} src=${start.image.src} alt=${start.image.alt}":null}]}}]]}]}},{"rtgl-view flex=1":null},{"rtgl-view d=h av=c g=lg":[{"slot name=right":null}]}]}]};var vt={};ie(vt,{handleClickStart:()=>fi});var fi=(e,t)=>{let{dispatchEvent:r,store:n}=t;console.log("handle click start",n.selectPath()),r(new CustomEvent("clickStart",{detail:{path:n.selectPath()}}))};var wt={};ie(wt,{INITIAL_STATE:()=>pi,selectPath:()=>bi,setState:()=>vi,toViewData:()=>yi});var pi=Object.freeze({}),mi=["id","class","style","slot"],gi=e=>Object.entries(e).filter(([t])=>!mi.includes(t)).map(([t,r])=>`${t}=${r}`).join(" "),yi=({state:e,props:t,attrs:r})=>{console.log("attrs",{attrs:r,entries:Object.entries(r)});let n=r.start?JSON.parse(decodeURIComponent(r.start)):t.start;return{containerAttrString:gi(r),start:n||{label:"",image:{src:"",width:32,height:32,alt:""}}}},bi=({props:e})=>e.start.path,vi=e=>{};var _t={};ie(_t,{INITIAL_STATE:()=>wi,selectState:()=>xi,setClose:()=>ki,setOpen:()=>$i,toViewData:()=>_i});var wi=Object.freeze({isOpen:!1,position:{x:0,y:0}}),_i=({state:e,props:t})=>t.isOpen!==void 0?{isOpen:t.isOpen,position:{x:0,y:0}}:{isOpen:e.isOpen,position:e.position},xi=({state:e})=>e,$i=(e,t)=>{e.isOpen=!0,e.position=t},ki=e=>{e.isOpen=!1,e.position={x:0,y:0}};var xt={};ie(xt,{handleClickOverlay:()=>Si,open:()=>Ai});var Si=(e,t)=>{let{props:r,dispatchEvent:n,store:a,render:c}=t;if(r.isOpen!==void 0){n(new CustomEvent("closePopover"));return}a.setClose(),c()},Ai=(e,t)=>{let{position:r}=e,{store:n,render:a}=t;n.setOpen(r),a()};var Er={elementName:"rtgl-popover",viewDataSchema:{type:"object",properties:{isOpen:{type:"boolean"},position:{type:"object",properties:{x:{type:"number"},y:{type:"number"}}},placement:{type:"string"}}},propsSchema:{type:"object",properties:{placement:{type:"string",default:"bottom"},isOpen:{type:"boolean"}}},refs:{popoverOverlay:{eventListeners:{click:{handler:"handleClickOverlay"}}}},styles:{"@keyframes popover-in":{from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"}},"#popoverContainer":{animation:"popover-in 150ms cubic-bezier(0.16, 1, 0.3, 1)","transform-origin":"top"}},template:[{$if:"isOpen",then:[{"rtgl-view#popoverOverlay pos=fix cor=full":null},{'rtgl-view#popoverContainer pos=fix style="left: ${position.x}px; top: ${position.y}px;" id=floatingElement bw=xs p=md bgc=bg':[{"slot name=content":null}]}]}]};var $t={};ie($t,{INITIAL_STATE:()=>Ei,selectFormValues:()=>Ii,selectState:()=>Ti,setDefaultValues:()=>zi,setFormFieldValue:()=>Pi,setState:()=>Ni,toViewData:()=>ji});var Ei=Object.freeze({formValues:{}}),Oi=["id","class","style","slot"],Ci=e=>Object.entries(e).filter(([t])=>!Oi.includes(t)).map(([t,r])=>`${t}=${r}`).join(" "),ji=({state:e,props:t,attrs:r})=>({containerAttrString:Ci(r),title:t.form?.title||"",description:t?.form?.description||"",fields:t?.form?.fields||[],actions:t?.form?.actions||{buttons:[]},formValues:e.formValues}),Ti=({state:e})=>e,Ii=({state:e})=>e.formValues,Ni=e=>{},zi=(e,t)=>{e.formValues=t||{}},Pi=(e,{fieldName:t,value:r})=>{e.formValues[t]=r};var kt={};ie(kt,{handleActionClick:()=>Mi,handleInputChange:()=>Fi,handleOnMount:()=>Di});var Di=e=>{let{store:t,props:r}=e;t.setDefaultValues(r.defaultValues)},Mi=(e,t)=>{let{store:r,dispatchEvent:n}=t,a=e.currentTarget.id.replace("action-","");n(new CustomEvent("action-click",{detail:{actionId:a,formValues:r.selectFormValues()}}))},Fi=(e,t)=>{let{store:r}=t,n=e.currentTarget.id.replace("input-","");n&&e.detail.value!==void 0&&r.setFormFieldValue({fieldName:n,value:e.detail.value})};var Or={elementName:"rtgl-form",viewDataSchema:{type:"object"},propsSchema:{type:"object",properties:{defaultValues:{type:"object",properties:{}},form:{type:"object",properties:{title:{type:"string"},description:{type:"string"}}}}},refs:{"action-*":{eventListeners:{click:{handler:"handleActionClick"}}},"input-*":{eventListeners:{"input-keydown":{handler:"handleInputChange"}}}},events:{},template:[{"rtgl-view w=f h=f p=md g=lg ${containerAttrString}":[{"rtgl-view g=sm w=f":[{"rtgl-text s=lg":"${title}"},{"rtgl-text c=mu-fg":"${description}"}]},{"rtgl-view g=sm w=f":[{$map:{$eval:"fields"},"each(v,i)":[{"rtgl-view g=sm w=f":[{"rtgl-text":"${v.label}"},{"rtgl-text s=sm c=mu-fg":"${v.description}"},{$switch:{'v.inputType == "inputText"':{"rtgl-input#input-${v.id} w=f":null}}}]}]}]},{"rtgl-view g=sm w=f":[{$map:{$eval:"actions.buttons"},"each(v,i)":[{"rtgl-view d=h ah=e g=sm w=f":[{"rtgl-button#action-${v.id}":"${v.content}"}]}]}]}]}]};var At={};ie(At,{INITIAL_STATE:()=>Li,selectActiveItem:()=>Vi,selectHeader:()=>Bi,selectItem:()=>Ui,setState:()=>Wi,toViewData:()=>Zi});var Li=Object.freeze({}),Hi=["id","class","style","slot"],Ri=e=>Object.entries(e).filter(([t])=>!Hi.includes(t)).map(([t,r])=>`${t}=${r}`).join(" ");function St(e){let t=[];for(let r of e)if(t.push({id:r.id||r.href||r.path,title:r.title,href:r.href,type:r.type||"item",hrefAttr:r.href?`href=${r.href}`:""}),r.items&&Array.isArray(r.items))for(let n of r.items)t.push({id:n.id||n.href||n.path,title:n.title,href:n.href,type:n.type||"item",hrefAttr:n.href?`href=${n.href}`:""});return t}var Zi=({state:e,props:t,attrs:r})=>{let n=r.header?JSON.parse(decodeURIComponent(r.header)):t.header,a=r.items?JSON.parse(decodeURIComponent(r.items)):t.items,c=Ri(r),h=n||{label:"",path:"",image:{src:"",alt:"",width:0,height:0}},d=a?St(a):[];return{containerAttrString:c,header:h,items:d}},Bi=({state:e,props:t,attrs:r})=>r.header?JSON.parse(decodeURIComponent(r.header)):t.header,Vi=({state:e,props:t})=>(t.items?St(t.items):[]).find(n=>n.active),Ui=({state:e,props:t,attrs:r},n)=>{let a=r.items?JSON.parse(decodeURIComponent(r.items)):t.items;return(a?St(a):[]).find(h=>h.id===n)},Wi=e=>{};var Cr={elementName:"rtgl-sidebar",viewDataSchema:{type:"object",properties:{containerAttrString:{type:"string"},header:{type:"object",properties:{label:{type:"string"},href:{type:"string"},image:{type:"object",properties:{src:{type:"string"},width:{type:"number"},height:{type:"number"},alt:{type:"string"}}}}},items:{type:"array",items:{type:"object",properties:{title:{type:"string"},slug:{type:"string"},type:{type:"string"},active:{type:"boolean"}}}}}},propsSchema:{type:"object",properties:{header:{type:"object",properties:{label:{type:"string"},href:{type:"string"},image:{type:"object",properties:{src:{type:"string"},width:{type:"number"},height:{type:"number"},alt:{type:"string"}}}}},items:{type:"array",items:{type:"object",properties:{title:{type:"string"},slug:{type:"string"},type:{type:"string"},items:{type:"array"}}}}}},refs:{"header-image":{eventListeners:{click:{handler:"handleHeaderClick"}}},"header-label":{eventListeners:{click:{handler:"handleHeaderClick"}}},header:{eventListeners:{click:{handler:"handleHeaderClick"}}},"item-*":{eventListeners:{click:{handler:"handleItemClick"}}}},events:{headerClick:{type:"object",properties:{path:{type:"string"}}}},anchors:[[{$switch:{'"image" in header && "src" in header.image':[{$switch:{'"href" in header.image':[{"a href=${header.image.href}":[{'rtgl-image w=${header.image.width} h=${header.image.height} src=${header.image.src} alt="${header.image.alt}"':null}]}],'"path" in header.image':[{"rtgl-view#header-image cur=p":[{'rtgl-image w=${header.image.width} h=${header.image.height} src=${header.image.src} alt="${header.image.alt}"':null}]}],$default:[{'rtgl-image w=${header.image.width} h=${header.image.height} src=${header.image.src} alt="${header.image.alt}"':null}]}}]}},{$switch:{'"label" in header':[{$switch:{'"labelHref" in header':[{"rtgl-text href=${header.labelHref} s=lg":"${header.label}"}],'"labelPath" in header':[{"rtgl-view#header-label cur=p":[{"rtgl-text s=lg":"${header.label}"}]}],$default:[{"rtgl-text s=lg":"${header.label}"}]}}]}}]],template:[{"rtgl-view h=f w=272 bwr=xs ${containerAttrString}":[{"rtgl-view p=lg":[{$switch:{'"href" in header && header.href':[{"rtgl-view href=${header.href} d=h av=c g=lg":[[{$switch:{'"image" in header && "src" in header.image':[{$switch:{'"href" in header.image':[{"a href=${header.image.href}":[{'rtgl-image w=${header.image.width} h=${header.image.height} src=${header.image.src} alt="${header.image.alt}"':null}]}],'"path" in header.image':[{"rtgl-view#header-image cur=p":[{'rtgl-image w=${header.image.width} h=${header.image.height} src=${header.image.src} alt="${header.image.alt}"':null}]}],$default:[{'rtgl-image w=${header.image.width} h=${header.image.height} src=${header.image.src} alt="${header.image.alt}"':null}]}}]}},{$switch:{'"label" in header':[{$switch:{'"labelHref" in header':[{"rtgl-text href=${header.labelHref} s=lg":"${header.label}"}],'"labelPath" in header':[{"rtgl-view#header-label cur=p":[{"rtgl-text s=lg":"${header.label}"}]}],$default:[{"rtgl-text s=lg":"${header.label}"}]}}]}}]]}],$default:[{"rtgl-view#header d=h av=c g=lg cur=p":[[{$switch:{'"image" in header && "src" in header.image':[{$switch:{'"href" in header.image':[{"a href=${header.image.href}":[{'rtgl-image w=${header.image.width} h=${header.image.height} src=${header.image.src} alt="${header.image.alt}"':null}]}],'"path" in header.image':[{"rtgl-view#header-image cur=p":[{'rtgl-image w=${header.image.width} h=${header.image.height} src=${header.image.src} alt="${header.image.alt}"':null}]}],$default:[{'rtgl-image w=${header.image.width} h=${header.image.height} src=${header.image.src} alt="${header.image.alt}"':null}]}}]}},{$switch:{'"label" in header':[{$switch:{'"labelHref" in header':[{"rtgl-text href=${header.labelHref} s=lg":"${header.label}"}],'"labelPath" in header':[{"rtgl-view#header-label cur=p":[{"rtgl-text s=lg":"${header.label}"}]}],$default:[{"rtgl-text s=lg":"${header.label}"}]}}]}}]]}]}}]},{"rtgl-view w=f ph=lg pb=lg g=xs":[{$map:{$eval:"items"},"each(v,i)":[{$switch:{'v.type == "groupLabel"':[{"rtgl-view mt=md h=32 av=c ph=md":[{"rtgl-text s=xs c=mu-fg":"${v.title}"}]}],$default:[{"rtgl-view#item-${v.id} ${v.hrefAttr} h=32 av=c ph=md w=f h-bgc=mu br=lg bgc=bg cur=p":[{"rtgl-text s=sm":"${v.title}"}]}]}}]}]}]}]};var Et={};ie(Et,{handleHeaderClick:()=>Ji,handleItemClick:()=>Ki});var Ji=(e,t)=>{let{store:r,dispatchEvent:n}=t,a,c=r.selectHeader();e.currentTarget.id==="header-label"?a=c.labelPath:e.currentTarget.id==="header-image"?a=c.image.path:e.currentTarget.id==="header"&&(a=c.path),n(new CustomEvent("headerClick",{detail:{path:a},bubbles:!0,composed:!0}))},Ki=(e,t)=>{let{store:r,dispatchEvent:n}=t,a=e.currentTarget.id.replace("item-",""),c=r.selectItem(a);n(new CustomEvent("itemClick",{detail:{item:c},bubbles:!0,composed:!0}))};var Ot={};ie(Ot,{INITIAL_STATE:()=>qi,selectCurrentId:()=>Yi,selectState:()=>Xi,setContentContainer:()=>ts,setCurrentId:()=>es,setItems:()=>Qi,toViewData:()=>Gi});var qi=Object.freeze({items:[],currentId:null,contentContainer:null}),Gi=({state:e})=>({items:e.items.map(t=>({...t,c:t.id===e.currentId?"fg":"mu-fg"})),currentId:e.currentId}),Xi=({state:e})=>e,Yi=({state:e})=>e.currentId,Qi=(e,t)=>{e.items=t},es=(e,t)=>{e.currentId=t},ts=(e,t)=>{e.contentContainer=t};var jr={elementName:"rtgl-page-outline",viewDataSchema:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{slug:{type:"string"},title:{type:"string"}}}},selectedSlug:{type:"string",nullable:!0}}},propsSchema:{type:"object",properties:{}},refs:{},events:{onItemClick:{type:"object"}},template:[{"rtgl-view h=f w=272":[{"rtgl-view w=f g=sm mt=xl":[{$map:{$eval:"items"},"each(v,i)":[{"rtgl-view pv=xs av=c href=${v.href}":[{"rtgl-text s=sm c=${v.c} h-c=fg":"${v.title}"}]}]}]}]}]};var Ct={};ie(Ct,{handleOnMount:()=>ns});var Tr=(e,t)=>{let{store:r,render:n}=t,a,c=-1/0;e.forEach(h=>{let d=h.getBoundingClientRect();d.top<=20&&d.top>c&&(c=d.top,a=h.id)}),a&&a!==r.selectCurrentId()&&(r.setCurrentId(a),n())},rs=(e,t)=>{let{store:r,render:n}=t,a=e.querySelectorAll("rtgl-text[id]"),c=Array.from(a),h=c.map(p=>({id:p.id,href:`#${p.id}`,title:p.textContent}));r.setItems(h),Tr(c,t),n();let d=Tr.bind(void 0,c,t);return e.addEventListener("scroll",d,{passive:!0}),()=>{e.removeEventListener("scroll",d)}},ns=e=>{let{attrs:t}=e;requestAnimationFrame(()=>{let r=document.getElementById(t["target-id"]),n=rs(r,e);return()=>{n()}})};var Mr=Symbol.for("immer-nothing"),Ir=Symbol.for("immer-draftable"),re=Symbol.for("immer-state");function le(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ie=Object.getPrototypeOf;function Ne(e){return!!e&&!!e[re]}function we(e){return e?Fr(e)||Array.isArray(e)||!!e[Ir]||!!e.constructor?.[Ir]||tt(e)||rt(e):!1}var is=Object.prototype.constructor.toString();function Fr(e){if(!e||typeof e!="object")return!1;let t=Ie(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===is}function Xe(e,t){et(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function et(e){let t=e[re];return t?t.type_:Array.isArray(e)?1:tt(e)?2:rt(e)?3:0}function It(e,t){return et(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Lr(e,t,r){let n=et(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ss(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function tt(e){return e instanceof Map}function rt(e){return e instanceof Set}function ve(e){return e.copy_||e.base_}function Nt(e,t){if(tt(e))return new Map(e);if(rt(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Fr(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[re];let a=Reflect.ownKeys(n);for(let c=0;c<a.length;c++){let h=a[c],d=n[h];d.writable===!1&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(n[h]={configurable:!0,writable:!0,enumerable:d.enumerable,value:e[h]})}return Object.create(Ie(e),n)}else{let n=Ie(e);if(n!==null&&r)return{...e};let a=Object.create(n);return Object.assign(a,e)}}function Ft(e,t=!1){return nt(e)||Ne(e)||!we(e)||(et(e)>1&&(e.set=e.add=e.clear=e.delete=os),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Ft(n,!0))),e}function os(){le(2)}function nt(e){return Object.isFrozen(e)}var as={};function _e(e){let t=as[e];return t||le(0,e),t}var Be;function Hr(){return Be}function ls(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Nr(e,t){t&&(_e("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zt(e){Pt(e),e.drafts_.forEach(cs),e.drafts_=null}function Pt(e){e===Be&&(Be=e.parent_)}function zr(e){return Be=ls(Be,e)}function cs(e){let t=e[re];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Pr(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[re].modified_&&(zt(t),le(4)),we(e)&&(e=Ye(t,e),t.parent_||Qe(t,e)),t.patches_&&_e("Patches").generateReplacementPatches_(r[re].base_,e,t.patches_,t.inversePatches_)):e=Ye(t,r,[]),zt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Mr?e:void 0}function Ye(e,t,r){if(nt(t))return t;let n=t[re];if(!n)return Xe(t,(a,c)=>Dr(e,n,t,a,c,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Qe(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let a=n.copy_,c=a,h=!1;n.type_===3&&(c=new Set(a),a.clear(),h=!0),Xe(c,(d,p)=>Dr(e,n,a,d,p,r,h)),Qe(e,a,!1),r&&e.patches_&&_e("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Dr(e,t,r,n,a,c,h){if(Ne(a)){let d=c&&t&&t.type_!==3&&!It(t.assigned_,n)?c.concat(n):void 0,p=Ye(e,a,d);if(Lr(r,n,p),Ne(p))e.canAutoFreeze_=!1;else return}else h&&r.add(a);if(we(a)&&!nt(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ye(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Qe(e,a)}}function Qe(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ft(t,r)}function hs(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Hr(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},a=n,c=Lt;r&&(a=[n],c=Ve);let{revoke:h,proxy:d}=Proxy.revocable(a,c);return n.draft_=d,n.revoke_=h,d}var Lt={get(e,t){if(t===re)return e;let r=ve(e);if(!It(r,t))return us(e,r,t);let n=r[t];return e.finalized_||!we(n)?n:n===jt(e.base_,t)?(Tt(e),e.copy_[t]=Mt(n,e)):n},has(e,t){return t in ve(e)},ownKeys(e){return Reflect.ownKeys(ve(e))},set(e,t,r){let n=Rr(ve(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let a=jt(ve(e),t),c=a?.[re];if(c&&c.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ss(r,a)&&(r!==void 0||It(e.base_,t)))return!0;Tt(e),Dt(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return jt(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Tt(e),Dt(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=ve(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){le(11)},getPrototypeOf(e){return Ie(e.base_)},setPrototypeOf(){le(12)}},Ve={};Xe(Lt,(e,t)=>{Ve[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ve.deleteProperty=function(e,t){return Ve.set.call(this,e,t,void 0)};Ve.set=function(e,t,r){return Lt.set.call(this,e[0],t,r,e[0])};function jt(e,t){let r=e[re];return(r?ve(r):e)[t]}function us(e,t,r){let n=Rr(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Rr(e,t){if(!(t in e))return;let r=Ie(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ie(r)}}function Dt(e){e.modified_||(e.modified_=!0,e.parent_&&Dt(e.parent_))}function Tt(e){e.copy_||(e.copy_=Nt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ds=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let c=r;r=t;let h=this;return function(p=c,...C){return h.produce(p,D=>r.call(this,D,...C))}}typeof r!="function"&&le(6),n!==void 0&&typeof n!="function"&&le(7);let a;if(we(t)){let c=zr(this),h=Mt(t,void 0),d=!0;try{a=r(h),d=!1}finally{d?zt(c):Pt(c)}return Nr(c,n),Pr(a,c)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===Mr&&(a=void 0),this.autoFreeze_&&Ft(a,!0),n){let c=[],h=[];_e("Patches").generateReplacementPatches_(t,a,c,h),n(c,h)}return a}else le(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(h,...d)=>this.produceWithPatches(h,p=>t(p,...d));let n,a;return[this.produce(t,r,(h,d)=>{n=h,a=d}),n,a]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){we(e)||le(8),Ne(e)&&(e=fs(e));let t=zr(this),r=Mt(e,void 0);return r[re].isManual_=!0,Pt(t),r}finishDraft(e,t){let r=e&&e[re];(!r||!r.isManual_)&&le(9);let{scope_:n}=r;return Nr(n,t),Pr(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));let n=_e("Patches").applyPatches_;return Ne(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Mt(e,t){let r=tt(e)?_e("MapSet").proxyMap_(e,t):rt(e)?_e("MapSet").proxySet_(e,t):hs(e,t);return(t?t.scope_:Hr()).drafts_.push(r),r}function fs(e){return Ne(e)||le(10,e),Zr(e)}function Zr(e){if(!we(e)||nt(e))return e;let t=e[re],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Nt(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Nt(e,!0);return Xe(r,(n,a)=>{Lr(r,n,Zr(a))}),t&&(t.finalized_=!1),r}var ne=new ds,Br=ne.produce,ba=ne.produceWithPatches.bind(ne),va=ne.setAutoFreeze.bind(ne),wa=ne.setUseStrictShallowCopy.bind(ne),_a=ne.applyPatches.bind(ne),xa=ne.createDraft.bind(ne),$a=ne.finishDraft.bind(ne);var Ur=qn(Vr(),1),ps=(e,t)=>t.split(".").reduce((r,n)=>r&&r[n],e),Zt=e=>Array.isArray(e)?e.reduce((t,r)=>{if(Array.isArray(r))t.push(...Zt(r));else{if(r&&typeof r=="object"){let n=Object.entries(r);if(n.length>0){let[a,c]=n[0];Array.isArray(c)&&(r={[a]:Zt(c)})}}t.push(r)}return t},[]):e,Wr=({h:e,template:t,viewData:r,refs:n,handlers:a})=>{let c=(0,Ur.default)(t,r),h=Zt(c),d=ms({h:e,items:h,refs:n,handlers:a,viewData:r});return e("div",{style:{display:"contents"}},d)},ms=({h:e,items:t,refs:r={},handlers:n={},viewData:a={}})=>{if(!Array.isArray(t))return console.error("Input to createVirtualDom must be an array."),[e("div",{},[])];function c(h,d=""){return h.map((p,C)=>{if(typeof p=="string"||typeof p=="number")return String(p);if(typeof p!="object"||p===null)return console.warn("Skipping invalid item in DOM structure:",p),null;let D=Object.entries(p);if(D.length===0)return console.warn("Skipping empty object item:",p),null;let[T,R]=D[0];if(!isNaN(Number(T)))return Array.isArray(R)?c(R,`${d}.${T}`):typeof R=="object"&&R!==null&&Object.entries(R).length>0?c([R],`${d}.${T}`):String(R);D.length>1&&console.warn("Item has multiple keys, processing only the first:",T);let V,f,g=T.indexOf(" ");g===-1?(V=T,f=""):(V=T.substring(0,g),f=T.substring(g+1).trim());let b=V.split(/[.#]/)[0],y=b.includes("-"),S={},I={};if(f){let $=/(\S+?)=(?:\"([^\"]*)\"|\'([^\']*)\'|(\S+))/g,k;for(;(k=$.exec(f))!==null;)if(k[1].startsWith(".")){let Z=k[1].substring(1),W=k[4];I[Z]=ps(a,W)}else S[k[1]]=k[2]||k[3]||k[4]}let x=V.match(/#([^.#\s]+)/);x&&!Object.prototype.hasOwnProperty.call(S,"id")&&(S.id=x[1]);let N=null;S.id?N=S.id:y&&(N=b);let E=Object.create(null),P=null;if(y)P=b;else{let $=V.match(/\.([^.#]+)/g);$&&$.forEach(Z=>{let W=Z.substring(1);E[W]=!0});let k=V.match(/#([^.#\s]+)/);k&&(P=k[1])}let O;typeof R=="string"||typeof R=="number"?O=String(R):Array.isArray(R)?O=c(R,`${d}.${T}`):O=[],P&&!y&&(S.id=P);let F=Object.create(null);if(N&&r){let $=[];if(Object.keys(r).forEach(k=>{if(k.includes("*")){let Z="^"+k.replace(/[.*+?^${}()|[\\\]\\]/g,"\\$&").replace(/\\\*/g,".*")+"$";try{new RegExp(Z).test(N)&&$.push(k)}catch(W){console.warn(`[Parser] Invalid regex pattern created from refKey '${k}': ${Z}`,W)}}else N===k&&$.push(k)}),$.length>0){$.sort((Z,W)=>{let X=!Z.includes("*"),te=!W.includes("*");return X&&!te?-1:!X&&te?1:W.length-Z.length});let k=$[0];if(r[k]&&r[k].eventListeners){let Z=r[k].eventListeners;Object.entries(Z).forEach(([W,X])=>{X.handler&&n[X.handler]?F[W]=te=>{n[X.handler](te)}:X.handler&&console.warn(`[Parser] Handler '${X.handler}' for refKey '${k}' (matching elementId '${N}') is referenced but not found in available handlers.`)})}}}let M={};if(N)M.key=N;else if(V){let $=d?`${d}.${C}`:String(C);if(M.key=`${V}-${$}`,Object.keys(I).length>0){let k=JSON.stringify(I).substring(0,50);M.key+=`-${k}`}}Object.keys(S).length>0&&(M.attrs=S),Object.keys(E).length>0&&(M.class=E),Object.keys(F).length>0&&(M.on=F),Object.keys(I).length>0&&(M.props=I,y&&(M.hook={update:($,k)=>{let Z=$.data?.props||{},W=k.data?.props||{};if(JSON.stringify(Z)!==JSON.stringify(W)){let te=k.elm;te&&te.render&&typeof te.render=="function"&&(te.setAttribute("isDirty","true"),requestAnimationFrame(()=>{te.render(),te.removeAttribute("isDirty")}))}}}));try{return e(b,M,O)}catch($){return console.error("Error creating virtual node:",$,{tagName:b,snabbdomData:M,childrenOrText:O}),e("div",{},["Error creating element"])}}).filter(Boolean)}return c(t)};var gs=(e,t)=>{if(!t||typeof t!="object")return"";let r="",n=c=>Object.entries(c).map(([h,d])=>` ${h}: ${d};`).join(`
|
699
|
+
`),a=(c,h)=>{if(typeof h!="object"||h===null)return"";if(c.startsWith("@")){let d=Object.entries(h).map(([p,C])=>{let D=n(C);return` ${p} {
|
700
|
+
${D.split(`
|
701
|
+
`).map(T=>T?` ${T}`:"").join(`
|
702
|
+
`)}
|
703
|
+
}`}).join(`
|
704
|
+
`);return`${c} {
|
705
|
+
${d}
|
706
|
+
}`}else{let d=n(h);return`${c} {
|
707
|
+
${d}
|
708
|
+
}`}};return Object.entries(t).forEach(([c,h])=>{let d=a(c,h);d&&(r+=(r?`
|
709
|
+
|
710
|
+
`:"")+d)}),r},ys=e=>{let t=e.map(r=>r.subscribe());return()=>{for(let r of t)r&&typeof r.unsubscribe=="function"&&r.unsubscribe()}};function bs(e){return new Proxy({},{get(t,r){if(typeof r=="string")return e.getAttribute(r)},set(){throw new Error("Cannot assign to read-only proxy")},defineProperty(){throw new Error("Cannot define properties on read-only proxy")},deleteProperty(){throw new Error("Cannot delete properties from read-only proxy")},has(t,r){return typeof r=="string"&&e.hasAttribute(r)},ownKeys(){return e.getAttributeNames()},getOwnPropertyDescriptor(t,r){if(typeof r=="string"&&e.hasAttribute(r))return{configurable:!0,enumerable:!0,get:()=>e.getAttribute(r)}}})}function vs(e,t){let r=new Set(t);return new Proxy({},{get(n,a){if(typeof a=="string"&&r.has(a))return e[a]},set(){throw new Error("Cannot assign to read-only proxy")},defineProperty(){throw new Error("Cannot define properties on read-only proxy")},deleteProperty(){throw new Error("Cannot delete properties from read-only proxy")},has(n,a){return typeof a=="string"&&r.has(a)},ownKeys(){return[...r]},getOwnPropertyDescriptor(n,a){if(typeof a=="string"&&r.has(a))return{configurable:!0,enumerable:!0,get:()=>e[a]}}})}var Bt=class extends HTMLElement{elementName;styles;h;store;props;propsSchema;template;handlers;transformedHandlers={};refs;refIds={};patch;_unmountCallback;_oldVNode;deps;cssText;get viewData(){return this.store.toViewData()}connectedCallback(){this.shadow=this.attachShadow({mode:"open"});let t=new CSSStyleSheet;t.replaceSync(`
|
711
|
+
a, a:link, a:visited, a:hover, a:active {
|
712
|
+
display: contents;
|
713
|
+
color: inherit;
|
714
|
+
text-decoration: none;
|
715
|
+
background: none;
|
716
|
+
border: none;
|
717
|
+
padding: 0;
|
718
|
+
margin: 0;
|
719
|
+
font: inherit;
|
720
|
+
cursor: pointer;
|
721
|
+
}
|
722
|
+
`);let r=[t];if(this.cssText){let a=new CSSStyleSheet;a.replaceSync(this.cssText),r.push(a)}this.shadow.adoptedStyleSheets=r,this.renderTarget=document.createElement("div"),this.renderTarget.style.cssText="display: contents;",this.shadow.appendChild(this.renderTarget),this.transformedHandlers={},this.renderTarget.parentNode||this.appendChild(this.renderTarget),this.style.display="contents";let n={...this.deps,refIds:this.refIds,getRefIds:()=>this.refIds,dispatchEvent:this.dispatchEvent.bind(this)};Object.keys(this.handlers||{}).forEach(a=>{this.transformedHandlers[a]=c=>this.handlers[a](c,n)}),this.handlers?.subscriptions&&(this.unsubscribeAll=ys(this.handlers.subscriptions(n))),this.handlers?.handleOnMount&&(this._unmountCallback=this.handlers?.handleOnMount(n)),this.render()}disconnectedCallback(){this._unmountCallback&&this._unmountCallback(),this.unsubscribeAll&&this.unsubscribeAll()}render=()=>{if(!this.patch){console.error("Patch function is not defined!");return}if(!this.template){console.error("Template is not defined!");return}try{let t=Wr({h:this.h,template:this.template,viewData:this.viewData,refs:this.refs,handlers:this.transformedHandlers}),r={},n=a=>{a.data?.attrs&&a.data.attrs.id&&(r[a.data.attrs.id]=a),a.children&&a.children.forEach(n)};n(t),this.refIds=r,this._oldVNode?this._oldVNode=this.patch(this._oldVNode,t):this._oldVNode=this.patch(this.renderTarget,t)}catch(t){console.error("Error during patching:",t)}}},ws=(e,t,r)=>{let{INITIAL_STATE:n,toViewData:a,...c}=e,h={},d={},p=structuredClone(n);return Object.entries(c).forEach(([C,D])=>{C.startsWith("select")?h[C]=(...T)=>D({state:p,props:t,attrs:r},...T):d[C]=T=>(p=Br(p,R=>D(R,T)),p)}),{toViewData:()=>a({state:p,props:t,attrs:r}),getState:()=>p,...d,...h}},_s=({handlers:e,view:t,store:r,patch:n,h:a},c)=>{let{elementName:h,propsSchema:d,template:p,refs:C,styles:D}=t;if(!n)throw new Error("Patch is not defined");if(!a)throw new Error("h is not defined");if(!t)throw new Error("view is not defined");class T extends Bt{constructor(){super();let V=bs(this);this.propsSchema=d,this.props=d?vs(this,Object.keys(d.properties)):{},this.elementName=h,this.styles=D,this.store=ws(r,this.props,V),this.template=p,this.handlers=e,this.refs=C,this.patch=n,this.deps={...c,store:this.store,render:this.render,handlers:e,attrs:V,props:this.props},this.h=a,this.cssText=gs(h,D)}}return T},Vt=_s;function xe(e,t,r,n,a){let c=t===void 0?void 0:t.key;return{sel:e,data:t,children:r,text:n,elm:a,key:c}}var ze=Array.isArray;function Pe(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}function xs(e,t){return document.createElement(e,t)}function $s(e,t,r){return document.createElementNS(e,t,r)}function ks(){return $e(document.createDocumentFragment())}function Ss(e){return document.createTextNode(e)}function As(e){return document.createComment(e)}function Es(e,t,r){if(ge(e)){let n=e;for(;n&&ge(n);)n=$e(n).parent;e=n??e}ge(t)&&(t=$e(t,e)),r&&ge(r)&&(r=$e(r).firstChildNode),e.insertBefore(t,r)}function Os(e,t){e.removeChild(t)}function Cs(e,t){ge(t)&&(t=$e(t,e)),e.appendChild(t)}function Kr(e){if(ge(e)){for(;e&&ge(e);)e=$e(e).parent;return e??null}return e.parentNode}function js(e){var t;if(ge(e)){let r=$e(e),n=Kr(r);if(n&&r.lastChildNode){let a=Array.from(n.childNodes),c=a.indexOf(r.lastChildNode);return(t=a[c+1])!==null&&t!==void 0?t:null}return null}return e.nextSibling}function Ts(e){return e.tagName}function Is(e,t){e.textContent=t}function Ns(e){return e.textContent}function zs(e){return e.nodeType===1}function Ps(e){return e.nodeType===3}function Ds(e){return e.nodeType===8}function ge(e){return e.nodeType===11}function $e(e,t){var r,n,a;let c=e;return(r=c.parent)!==null&&r!==void 0||(c.parent=t??null),(n=c.firstChildNode)!==null&&n!==void 0||(c.firstChildNode=e.firstChild),(a=c.lastChildNode)!==null&&a!==void 0||(c.lastChildNode=e.lastChild),c}var qr={createElement:xs,createElementNS:$s,createTextNode:Ss,createDocumentFragment:ks,createComment:As,insertBefore:Es,removeChild:Os,appendChild:Cs,parentNode:Kr,nextSibling:js,tagName:Ts,setTextContent:Is,getTextContent:Ns,isElement:zs,isText:Ps,isComment:Ds,isDocumentFragment:ge};function it(e){return e===void 0}function ee(e){return e!==void 0}var Ut=xe("",{},[],void 0,void 0);function Ue(e,t){var r,n;let a=e.key===t.key,c=((r=e.data)===null||r===void 0?void 0:r.is)===((n=t.data)===null||n===void 0?void 0:n.is),h=e.sel===t.sel,d=!e.sel&&e.sel===t.sel?typeof e.text==typeof t.text:!0;return h&&a&&c&&d}function Ms(){throw new Error("The document fragment is not supported on this platform.")}function Fs(e,t){return e.isElement(t)}function Ls(e,t){return e.isDocumentFragment(t)}function Hs(e,t,r){var n;let a={};for(let c=t;c<=r;++c){let h=(n=e[c])===null||n===void 0?void 0:n.key;h!==void 0&&(a[h]=c)}return a}var Rs=["create","update","remove","destroy","pre","post"];function Gr(e,t,r){let n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},a=t!==void 0?t:qr;for(let f of Rs)for(let g of e){let b=g[f];b!==void 0&&n[f].push(b)}function c(f){let g=f.id?"#"+f.id:"",b=f.getAttribute("class"),y=b?"."+b.split(" ").join("."):"";return xe(a.tagName(f).toLowerCase()+g+y,{},[],void 0,f)}function h(f){return xe(void 0,{},[],void 0,f)}function d(f,g){return function(){if(--g===0){let y=a.parentNode(f);y!==null&&a.removeChild(y,f)}}}function p(f,g){var b,y,S,I;let x,N=f.data;if(N!==void 0){let O=(b=N.hook)===null||b===void 0?void 0:b.init;ee(O)&&(O(f),N=f.data)}let E=f.children,P=f.sel;if(P==="!")it(f.text)&&(f.text=""),f.elm=a.createComment(f.text);else if(P==="")f.elm=a.createTextNode(f.text);else if(P!==void 0){let O=P.indexOf("#"),F=P.indexOf(".",O),M=O>0?O:P.length,$=F>0?F:P.length,k=O!==-1||F!==-1?P.slice(0,Math.min(M,$)):P,Z=f.elm=ee(N)&&ee(x=N.ns)?a.createElementNS(x,k,N):a.createElement(k,N);for(M<$&&Z.setAttribute("id",P.slice(M+1,$)),F>0&&Z.setAttribute("class",P.slice($+1).replace(/\./g," ")),x=0;x<n.create.length;++x)n.create[x](Ut,f);if(Pe(f.text)&&(!ze(E)||E.length===0)&&a.appendChild(Z,a.createTextNode(f.text)),ze(E))for(x=0;x<E.length;++x){let X=E[x];X!=null&&a.appendChild(Z,p(X,g))}let W=f.data.hook;ee(W)&&((y=W.create)===null||y===void 0||y.call(W,Ut,f),W.insert&&g.push(f))}else if(!((S=r?.experimental)===null||S===void 0)&&S.fragments&&f.children){for(f.elm=((I=a.createDocumentFragment)!==null&&I!==void 0?I:Ms)(),x=0;x<n.create.length;++x)n.create[x](Ut,f);for(x=0;x<f.children.length;++x){let O=f.children[x];O!=null&&a.appendChild(f.elm,p(O,g))}}else f.elm=a.createTextNode(f.text);return f.elm}function C(f,g,b,y,S,I){for(;y<=S;++y){let x=b[y];x!=null&&a.insertBefore(f,p(x,I),g)}}function D(f){var g,b;let y=f.data;if(y!==void 0){(b=(g=y?.hook)===null||g===void 0?void 0:g.destroy)===null||b===void 0||b.call(g,f);for(let S=0;S<n.destroy.length;++S)n.destroy[S](f);if(f.children!==void 0)for(let S=0;S<f.children.length;++S){let I=f.children[S];I!=null&&typeof I!="string"&&D(I)}}}function T(f,g,b,y){for(var S,I;b<=y;++b){let x,N,E=g[b];if(E!=null)if(ee(E.sel)){D(E),x=n.remove.length+1,N=d(E.elm,x);for(let O=0;O<n.remove.length;++O)n.remove[O](E,N);let P=(I=(S=E?.data)===null||S===void 0?void 0:S.hook)===null||I===void 0?void 0:I.remove;ee(P)?P(E,N):N()}else E.children?(D(E),T(f,E.children,0,E.children.length-1)):a.removeChild(f,E.elm)}}function R(f,g,b,y){let S=0,I=0,x=g.length-1,N=g[0],E=g[x],P=b.length-1,O=b[0],F=b[P],M,$,k,Z;for(;S<=x&&I<=P;)N==null?N=g[++S]:E==null?E=g[--x]:O==null?O=b[++I]:F==null?F=b[--P]:Ue(N,O)?(V(N,O,y),N=g[++S],O=b[++I]):Ue(E,F)?(V(E,F,y),E=g[--x],F=b[--P]):Ue(N,F)?(V(N,F,y),a.insertBefore(f,N.elm,a.nextSibling(E.elm)),N=g[++S],F=b[--P]):Ue(E,O)?(V(E,O,y),a.insertBefore(f,E.elm,N.elm),E=g[--x],O=b[++I]):(M===void 0&&(M=Hs(g,S,x)),$=M[O.key],it($)?(a.insertBefore(f,p(O,y),N.elm),O=b[++I]):it(M[F.key])?(a.insertBefore(f,p(F,y),a.nextSibling(E.elm)),F=b[--P]):(k=g[$],k.sel!==O.sel?a.insertBefore(f,p(O,y),N.elm):(V(k,O,y),g[$]=void 0,a.insertBefore(f,k.elm,N.elm)),O=b[++I]));I<=P&&(Z=b[P+1]==null?null:b[P+1].elm,C(f,Z,b,I,P,y)),S<=x&&T(f,g,S,x)}function V(f,g,b){var y,S,I,x,N,E,P,O;let F=(y=g.data)===null||y===void 0?void 0:y.hook;(S=F?.prepatch)===null||S===void 0||S.call(F,f,g);let M=g.elm=f.elm;if(f===g)return;if(g.data!==void 0||ee(g.text)&&g.text!==f.text){(I=g.data)!==null&&I!==void 0||(g.data={}),(x=f.data)!==null&&x!==void 0||(f.data={});for(let Z=0;Z<n.update.length;++Z)n.update[Z](f,g);(P=(E=(N=g.data)===null||N===void 0?void 0:N.hook)===null||E===void 0?void 0:E.update)===null||P===void 0||P.call(E,f,g)}let $=f.children,k=g.children;it(g.text)?ee($)&&ee(k)?$!==k&&R(M,$,k,b):ee(k)?(ee(f.text)&&a.setTextContent(M,""),C(M,null,k,0,k.length-1,b)):ee($)?T(M,$,0,$.length-1):ee(f.text)&&a.setTextContent(M,""):f.text!==g.text&&(ee($)&&T(M,$,0,$.length-1),a.setTextContent(M,g.text)),(O=F?.postpatch)===null||O===void 0||O.call(F,f,g)}return function(g,b){let y,S,I,x=[];for(y=0;y<n.pre.length;++y)n.pre[y]();for(Fs(a,g)?g=c(g):Ls(a,g)&&(g=h(g)),Ue(g,b)?V(g,b,x):(S=g.elm,I=a.parentNode(S),p(b,x),I!==null&&(a.insertBefore(I,b.elm,a.nextSibling(S)),T(I,[g],0,0))),y=0;y<x.length;++y)x[y].data.hook.insert(x[y]);for(y=0;y<n.post.length;++y)n.post[y]();return b}}function Xr(e,t){let r,n,a=t.elm,c=e.data.class,h=t.data.class;if(!(!c&&!h)&&c!==h){c=c||{},h=h||{};for(n in c)c[n]&&!Object.prototype.hasOwnProperty.call(h,n)&&a.classList.remove(n);for(n in h)r=h[n],r!==c[n]&&a.classList[r?"add":"remove"](n)}}var Yr={create:Xr,update:Xr};function Qr(e,t){let r,n,a,c=t.elm,h=e.data.props,d=t.data.props;if(!(!h&&!d)&&h!==d){h=h||{},d=d||{};for(r in d)n=d[r],a=h[r],a!==n&&(r!=="value"||c[r]!==n)&&(c[r]=n)}}var en={create:Qr,update:Qr};var Zs="http://www.w3.org/1999/xlink",Bs="http://www.w3.org/2000/xmlns/",Vs="http://www.w3.org/XML/1998/namespace";function tn(e,t){let r,n=t.elm,a=e.data.attrs,c=t.data.attrs;if(!(!a&&!c)&&a!==c){a=a||{},c=c||{};for(r in c){let h=c[r];a[r]!==h&&(h===!0?n.setAttribute(r,""):h===!1?n.removeAttribute(r):r.charCodeAt(0)!==120?n.setAttribute(r,h):r.charCodeAt(3)===58?n.setAttributeNS(Vs,r,h):r.charCodeAt(5)===58?r.charCodeAt(1)===109?n.setAttributeNS(Bs,r,h):n.setAttributeNS(Zs,r,h):n.setAttribute(r,h))}for(r in a)r in c||n.removeAttribute(r)}}var rn={create:tn,update:tn};var nn=typeof window?.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):setTimeout,Us=function(e){nn(function(){nn(e)})},Wt=!1;function Ws(e,t,r){Us(function(){e[t]=r})}function sn(e,t){let r,n,a=t.elm,c=e.data.style,h=t.data.style;if(!c&&!h||c===h)return;c=c||{},h=h||{};let d="delayed"in c;for(n in c)n in h||(n[0]==="-"&&n[1]==="-"?a.style.removeProperty(n):a.style[n]="");for(n in h)if(r=h[n],n==="delayed"&&h.delayed)for(let p in h.delayed)r=h.delayed[p],(!d||r!==c.delayed[p])&&Ws(a.style,p,r);else n!=="remove"&&r!==c[n]&&(n[0]==="-"&&n[1]==="-"?a.style.setProperty(n,r):a.style[n]=r)}function Js(e){let t,r,n=e.elm,a=e.data.style;if(!(!a||!(t=a.destroy)))for(r in t)n.style[r]=t[r]}function Ks(e,t){let r=e.data.style;if(!r||!r.remove){t();return}Wt||(e.elm.offsetLeft,Wt=!0);let n,a=e.elm,c=0,h=r.remove,d=0,p=[];for(n in h)p.push(n),a.style[n]=h[n];let D=getComputedStyle(a)["transition-property"].split(", ");for(;c<D.length;++c)p.indexOf(D[c])!==-1&&d++;a.addEventListener("transitionend",function(T){T.target===a&&--d,d===0&&t()})}function qs(){Wt=!1}var on={pre:qs,create:sn,update:sn,destroy:Js,remove:Ks};function an(e,t,r){if(typeof e=="function")e.call(t,r,t);else if(typeof e=="object")for(let n=0;n<e.length;n++)an(e[n],t,r)}function Gs(e,t){let r=e.type,n=t.data.on;n&&n[r]&&an(n[r],t,e)}function Xs(){return function e(t){Gs(t,e.vnode)}}function Jt(e,t){let r=e.data.on,n=e.listener,a=e.elm,c=t&&t.data.on,h=t&&t.elm,d;if(r!==c){if(r&&n)if(c)for(d in r)c[d]||a.removeEventListener(d,n,!1);else for(d in r)a.removeEventListener(d,n,!1);if(c){let p=t.listener=e.listener||Xs();if(p.vnode=t,r)for(d in c)r[d]||h.addEventListener(d,p,!1);else for(d in c)h.addEventListener(d,p,!1)}}}var ln={create:Jt,update:Jt,destroy:Jt};var Ys=()=>Gr([Yr,en,rn,on,ln]),Kt=Ys;function cn(e,t,r){if(e.ns="http://www.w3.org/2000/svg",r!=="foreignObject"&&t!==void 0)for(let n=0;n<t.length;++n){let a=t[n];if(typeof a=="string")continue;let c=a.data;c!==void 0&&cn(c,a.children,a.sel)}}function qt(e,t,r){let n={},a,c,h;if(r!==void 0?(t!==null&&(n=t),ze(r)?a=r:Pe(r)?c=r.toString():r&&r.sel&&(a=[r])):t!=null&&(ze(t)?a=t:Pe(t)?c=t.toString():t&&t.sel?a=[t]:n=t),a!==void 0)for(h=0;h<a.length;++h)Pe(a[h])&&(a[h]=xe(void 0,void 0,void 0,a[h],void 0));return e.startsWith("svg")&&(e.length===3||e[3]==="."||e[3]==="#")&&cn(n,a,e),xe(e,n,a,c,void 0)}var Qs={},hn={components:Qs},un=Kt();var st={components:{select:{store:yt,view:Sr,handlers:bt},navbar:{view:Ar,handlers:vt,store:wt},popover:{store:_t,handlers:xt,view:Er},form:{store:$t,handlers:kt,view:Or},sidebar:{store:At,view:Cr,handlers:Et},pageOutline:{store:Ot,view:jr,handlers:Ct}}};Object.keys(st).forEach(e=>{Object.keys(st[e]).forEach(t=>{let r=Vt({...st[e][t],patch:un,h:qt},hn[e]);customElements.define(st[e][t].view.elementName,r)})});customElements.define("rtgl-button",pr({}));customElements.define("rtgl-view",yr({}));customElements.define("rtgl-text",vr({}));customElements.define("rtgl-image",wr({}));customElements.define("rtgl-svg",xr({}));customElements.define("rtgl-input",$r({}));customElements.define("rtgl-textarea",kr({}));})();
|