tosijs-ui 1.6.13 → 1.6.15

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/dist/iife.js CHANGED
@@ -1,45 +1,45 @@
1
- (()=>{var Cy=Object.defineProperty;var ky=(y)=>y;function gy(y,x){this[y]=ky.bind(null,x)}var y5=(y,x)=>{for(var h in x)Cy(y,h,{get:x[h],enumerable:!0,configurable:!0,set:gy.bind(x,h)})};var x5=((y)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(y,{get:(x,h)=>(typeof require<"u"?require:x)[h]}):y)(function(y){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+y+'" is not supported')});var q9={};y5(q9,{xrControllersText:()=>Ti,xrControllers:()=>oi,xinTagList:()=>aC,xinTag:()=>nC,xinTabs:()=>Jl,xinTable:()=>Hh,xinSizer:()=>IC,xinSidenav:()=>wi,xinSelect:()=>kh,xinSegmented:()=>DC,xinRating:()=>KC,xinPasswordStrength:()=>GC,xinNotification:()=>VC,xinMenu:()=>Zh,xinMd:()=>kC,xinLocalized:()=>zh,xinForm:()=>Di,xinFloat:()=>xh,xinField:()=>bi,xinCarousel:()=>ax,wrapIcon:()=>S5,version:()=>D7,updateLocalized:()=>n5,trackDrag:()=>V1,tosijs:()=>x0,tosiThemeEditor:()=>xC,tosiTagList:()=>b7,tosiTag:()=>j9,tosiTabs:()=>p0,tosiTable:()=>i3,tosiSizer:()=>f7,tosiSidenav:()=>s0,tosiSelect:()=>G1,tosiSegmented:()=>R7,tosiRow:()=>Li,tosiRouteView:()=>cC,tosiRichText:()=>v7,tosiRating:()=>Y7,tosiPasswordStrength:()=>W7,tosiNotification:()=>h9,tosiMonth:()=>BC,tosiMenu:()=>C6,tosiMd:()=>m3,tosiLocalized:()=>s1,tosiLocalePicker:()=>r8,tosiHeaderLinks:()=>Ii,tosiHeader:()=>Si,tosiGrid:()=>ni,tosiForm:()=>q7,tosiFloat:()=>i0,tosiField:()=>j7,tosiDocSystem:()=>si,tosiDiff:()=>l0,tosiDialog:()=>V4,tosiColumn:()=>Mi,tosiCarousel:()=>F8,testManager:()=>K1,tabSelector:()=>Rl,svgIcon:()=>Tx,svg2DataUrl:()=>h0,styleSheet:()=>e0,spacer:()=>n3,sizeBreak:()=>dC,sideNav:()=>gi,setLocale:()=>C4,scriptTag:()=>_1,runTests:()=>F4,router:()=>Z0,richTextWidgets:()=>N7,richText:()=>FC,rewriteImports:()=>Y1,resolveMenuItems:()=>p1,resolveIcon:()=>m1,removeLastMenu:()=>l1,postNotification:()=>PC,positionFloat:()=>f8,popMenu:()=>L,popFloat:()=>C0,popDropMenu:()=>i6,parseShortcut:()=>g4,navigate:()=>$C,modifierKeys:()=>jh,menu:()=>h6,matchShortcut:()=>a5,markdownViewer:()=>CC,mapBox:()=>lC,makeSorter:()=>l4,localize:()=>b,localePicker:()=>Bh,loadTransform:()=>K0,liveTheme:()=>o,liveExample:()=>N4,legacyAliases:()=>p7,keystroke:()=>qh,keycode:()=>T8,isBreached:()=>Q7,insertExamples:()=>W4,initTooltips:()=>lk,initLocalization:()=>u5,icons:()=>U,iconRules:()=>d5,i18n:()=>M,getRouterParams:()=>XC,gamepadText:()=>ri,gamepadState:()=>P7,findShortcutAction:()=>h3,findHighestZ:()=>g2,filterPart:()=>Z4,filterForDrop:()=>B0,filterForClick:()=>e5,filterBuilder:()=>vi,expect:()=>F3,executeInline:()=>s4,executeInIframe:()=>Q4,executeCode:()=>R6,enableTests:()=>Z3,enableLiveTheme:()=>U7,elastic:()=>ui,editableRect:()=>Wi,dragAndDrop:()=>z4,displayShortcut:()=>w4,disableTests:()=>$3,disableLiveTheme:()=>yC,digest:()=>s7,diffLines:()=>v8,defineRoutes:()=>ZC,defineIcons:()=>Dx,defaultColors:()=>b1,dataTable:()=>fh,createThemeWithLegacy:()=>ti,createTheme:()=>J2,createTestContext:()=>X3,createSubMenu:()=>y3,createMenuItem:()=>x6,createMenuAction:()=>e8,createDropMenuItem:()=>y6,createDocBrowser:()=>R3,createDarkTheme:()=>R4,createColorVariables:()=>G7,componentVars:()=>Ei,commandButton:()=>v1,colorInput:()=>M5,codeEditor:()=>T1,canonicalShortcut:()=>Ph,bringToFront:()=>E1,bodymovinPlayer:()=>Mx,blockStyle:()=>C9,baseVariables:()=>_7,baseTheme:()=>ai,baseDarkTheme:()=>mi,b3d:()=>Lx,availableFilters:()=>b3,applyTheme:()=>u3,applyLocalized:()=>g0,abTest:()=>bx,XinWord:()=>YC,XinTagList:()=>uC,XinTag:()=>MC,XinSizer:()=>SC,XinSelect:()=>Ch,XinSegmented:()=>bC,XinRating:()=>pC,XinPasswordStrength:()=>_C,XinNotification:()=>qC,XinMenu:()=>$h,XinLocalized:()=>i4,XinForm:()=>Hi,XinFloat:()=>yh,XinField:()=>fi,XinCarousel:()=>ux,TosiThemeEditor:()=>a3,TosiTagList:()=>b2,TosiTag:()=>c0,TosiTabs:()=>U4,TosiTable:()=>q4,TosiSizer:()=>T4,TosiSidenav:()=>V2,TosiSelect:()=>R1,TosiSegmented:()=>H2,TosiRow:()=>T3,TosiRouteView:()=>w9,TosiRating:()=>S4,TosiPasswordStrength:()=>d4,TosiNotification:()=>x2,TosiMonth:()=>y9,TosiMenu:()=>j4,TosiMd:()=>b4,TosiLocalized:()=>J1,TosiLocalePicker:()=>k4,TosiHeaderLinks:()=>r3,TosiHeader:()=>I3,TosiGrid:()=>M3,TosiForm:()=>c4,TosiFloat:()=>L1,TosiField:()=>$4,TosiDocSystem:()=>f3,TosiDiff:()=>T5,TosiDialog:()=>B3,TosiColumn:()=>L3,TosiCarousel:()=>x4,TabSelector:()=>cl,SvgIcon:()=>I5,SizeBreak:()=>B9,SideNav:()=>ki,STORAGE_KEY:()=>O4,RichText:()=>I4,RemoteSyncManager:()=>U0,MarkdownViewer:()=>iC,MapBox:()=>P2,LocalePicker:()=>wh,LiveExample:()=>e1,FilterPart:()=>D3,FilterBuilder:()=>d3,EditableRect:()=>N1,DataTable:()=>Jh,CodeEditor:()=>o1,BodymovinPlayer:()=>Y2,B3d:()=>r5,AbTest:()=>W2});var x0={};y5(x0,{xinValue:()=>_y,xinSlot:()=>qx,xinProxy:()=>U8,xinPath:()=>Ay,xin:()=>E,warnDeprecated:()=>j1,version:()=>K8,vars:()=>z,varDefault:()=>P,validateAgainstConstraints:()=>A8,updates:()=>F5,unobserve:()=>a2,touchElement:()=>c5,touch:()=>A1,tosiValue:()=>J,tosiUnique:()=>Zx,tosiSlot:()=>jx,tosiSetValue:()=>Py,tosiPath:()=>q1,tosiLoader:()=>Jx,tosiBlueprint:()=>Rx,tosiAccessor:()=>Vy,tosi:()=>e,throttle:()=>U2,sync:()=>Nx,svgElements:()=>u0,share:()=>Yx,settings:()=>r0,scrollListItemIntoView:()=>ix,onThemePreferencesChange:()=>ry,onStylesheetChange:()=>by,on:()=>Q2,observe:()=>Z5,mathML:()=>q8,makeComponent:()=>J5,invertLuminance:()=>y0,initVars:()=>Iy,hotReload:()=>Vx,getThemePreferences:()=>B8,getListItem:()=>C2,getListInstance:()=>$5,getListBinding:()=>s2,getCssVar:()=>C8,elements:()=>p,deprecated:()=>B1,deleteListItem:()=>hx,debounce:()=>e2,css:()=>O2,boxedProxy:()=>R5,boxed:()=>P1,blueprintLoader:()=>Hx,blueprint:()=>fx,bindings:()=>r1,bindParts:()=>My,bind:()=>S1,TOSI_ACCESSOR:()=>Y5,TAKE_DESCRIPTOR:()=>M0,StyleSheet:()=>O1,MoreMath:()=>Jy,Component:()=>K,Color:()=>Q,BlueprintLoader:()=>f5,Blueprint:()=>t0});function i2(y){if(y==null||typeof y!=="object")return y;if(y instanceof Set)return new Set(y);else if(Array.isArray(y))return y.map(i2);let x={};for(let h in y){let l=y[h];if(y!=null&&typeof y==="object")x[h]=i2(l);else x[h]=l}return x}var W5="-xin-data",p2=`.${W5}`,u9="-xin-event",X9=`.${u9}`,c1=Symbol.for("xin-path"),K2=Symbol.for("xin-value"),wy="xinObserve",By="xinBind",zy="xinOn",Y5=Symbol.for("tosi-accessor"),M0=Symbol.for("tosi-take"),I0=Symbol("list-binding"),G2=Symbol("list-instance"),j5=new Map;function jy(y,x){let h=j5.get(y);if(h===void 0)h=new Set,j5.set(y,h);h.add(x)}function qy(y){return j5.get(y)}var N9=new Set;function j1(y,x){if(!N9.has(y))console.warn(x),N9.add(y)}function B1(y,x){let h=!1;return(...l)=>{if(!h)console.warn(x),h=!0;return y(...l)}}var q1=(y)=>{return y&&y[c1]||void 0};function J(y){if(typeof y==="object"&&y!==null){let x=y[K2];return x!==void 0?x:y}return y}function Vy(y){return y!=null?y[Y5]:void 0}function Py(y,x){if(q1(y)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");y[K2]=x}var Ay=B1(q1,"xinPath is deprecated. Use tosiPath instead."),_y=B1(J,"xinValue is deprecated. Use tosiValue instead."),n2=new WeakMap,I1=new WeakMap,u2=(y)=>{let x=y.cloneNode();if(x instanceof Element){let h=I1.get(y),l=n2.get(y);if(h!=null)I1.set(x,i2(h));if(l!=null)n2.set(x,i2(l))}for(let h of Array.from(y instanceof HTMLTemplateElement?y.content.childNodes:y.childNodes))if(h instanceof Element||h instanceof DocumentFragment)x.appendChild(u2(h));else x.appendChild(h.cloneNode());return x},r0={debug:!1,perf:!1},Gy=(y)=>{try{return JSON.stringify(y)}catch(x){return"{has circular references}"}},a9=(...y)=>Error(y.map(Gy).join(" ")),py=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),Ky=0,Uy=()=>(parseInt("10000",36)+ ++Ky).toString(36).slice(-5),m9=()=>py()+Uy(),q5=Symbol("delete"),t9=Symbol("new-object"),h5=Symbol("automatic-index");function E9(y){if(y==="")return[];if(Array.isArray(y))return y;else{let x=[];while(y.length>0){let h=y.search(/\[[^\]]+\]/);if(h===-1){x.push(y.split("."));break}else{let l=y.slice(0,h);if(y=y.slice(h),l!=="")x.push(l.split("."));if(h=y.indexOf("]")+1,x.push(y.slice(1,h-1)),y.slice(h,h+1)===".")h+=1;y=y.slice(h)}}return x}}var d1=new WeakMap;function e9(y,x){if(d1.get(y)===void 0)d1.set(y,{});if(d1.get(y)[x]===void 0)d1.get(y)[x]={};let h=d1.get(y)[x];if(x==="_auto_")y.forEach((l,i)=>{if(l[h5]===void 0)l[h5]=m9();h[l[h5]+""]=i});else y.forEach((l,i)=>{h[h1(l,x)+""]=i});return h}function Oy(y,x){if(d1.get(y)===void 0||d1.get(y)[x]===void 0)return e9(y,x);else return d1.get(y)[x]}function sy(y,x,h){h=h+"";let l=Oy(y,x)[h];if(l===void 0||h1(y[l],x)+""!==h)l=e9(y,x)[h];return l}function Qy(y,x,h){if(y[x]===void 0&&h!==void 0)y[x]=h;return y[x]}function y8(y,x,h,l){let i=x!==""?sy(y,x,h):h;if(l===q5)return y.splice(i,1),d1.delete(y),Symbol("deleted");else if(l===t9){if(x===""&&y[i]===void 0)y[i]={}}else if(l!==void 0)if(i!==void 0)y[i]=l;else if(x!==""&&h1(l,x)+""===h+"")y.push(l),i=y.length-1;else throw Error(`byIdPath insert failed at [${x}=${h}]`);return y[i]}function v9(y){if(!Array.isArray(y))throw a9("setByPath failed: expected array, found",y)}function Z9(y){if(y==null||!(y instanceof Object))throw a9("setByPath failed: expected Object, found",y)}function h1(y,x){let h=E9(x),l=y,i,C,k,g;for(i=0,C=h.length;l!==void 0&&i<C;i++){let w=h[i];if(Array.isArray(w))for(k=0,g=w.length;l!==void 0&&k<g;k++){let B=w[k];l=l[B]}else if(l.length===0){if(l=l[Number(w.slice(1))],w[0]!=="=")return}else if(w.includes("=")){let[B,...j]=w.split("=");l=y8(l,B,j.join("="))}else k=parseInt(w,10),l=l[k]}return l}function t2(y,x,h){let l=y;if(x==="")throw Error("setByPath cannot be used to set the root object");let i=E9(x);while(l!=null&&i.length>0){let C=i.shift();if(typeof C==="string"){let k=C.indexOf("=");if(k>-1){if(k===0)Z9(l);else v9(l);let g=C.slice(0,k),w=C.slice(k+1);if(l=y8(l,g,w,i.length>0?t9:h),i.length===0)return!0}else{v9(l);let g=parseInt(C,10);if(i.length>0)l=l[g];else{if(h!==q5){if(l[g]===h)return!1;l[g]=h}else l.splice(g,1);return!0}}}else if(Array.isArray(C)&&C.length>0){Z9(l);while(C.length>0){let k=C.shift();if(C.length>0||i.length>0)l=Qy(l,k,C.length>0?{}:[]);else{if(h!==q5){if(l[k]===h)return!1;l[k]=h}else{if(!Object.prototype.hasOwnProperty.call(l,k))return!1;delete l[k]}return!0}}}else throw Error(`setByPath failed, bad path ${x}`)}throw Error(`setByPath(${y}, ${x}, ${h}) failed`)}var C1={},V5=null,Wy=(y)=>{V5=y},n0=()=>{if(V5===null)throw Error("xin proxy not initialized");return V5},P5=null,A5=null,Yy=(y,x)=>{P5=y,A5=x},Fy=()=>{if(P5===null)throw Error("bind not initialized");return P5},Xy=()=>{if(A5===null)throw Error("on not initialized");return A5},$9=Symbol("observer should be removed"),o0=[],_2=[],_5=!1,G5,p5;function Ny(y,x,h,l){let i=qy(y);if(i===void 0)return[];let C=[];for(let k of i){let g=h1(h,k);if(g!==void 0)C.push(`${y}[${k}=${g}]${l}`)}return C}class x8{description;test;callback;constructor(y,x){let h=typeof x==="string"?`"${x}"`:`function ${x.name}`,l;if(typeof y==="string")this.test=(i)=>typeof i==="string"&&i!==""&&(y.startsWith(i)||i.startsWith(y)),l=`test = "${y}"`;else if(y instanceof RegExp)this.test=y.test.bind(y),l=`test = "${y.toString()}"`;else if(y instanceof Function)this.test=y,l=`test = function ${y.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${l}, ${h}`,typeof x==="function")this.callback=x;else throw Error("expect callback to be a path or function");o0.push(this)}}var F5=async()=>{if(G5===void 0)return;await G5},vy=()=>{if(r0.perf)console.time("xin async update");let y=Array.from(_2);_2.length=0,_5=!1;for(let x of y)o0.filter((h)=>{let l;try{l=h.test(x)}catch(i){throw Error(`Listener ${h.description} threw "${i}" at "${x}"`)}if(l===$9)return a2(h),!1;return l}).forEach((h)=>{let l;try{l=h.callback(x)}catch(i){console.error(`Listener ${h.description} threw "${i}" handling "${x}"`)}if(l===$9)a2(h)});if(typeof p5==="function")p5();if(r0.perf)console.timeEnd("xin async update")},A1=(y)=>{let x=typeof y==="string"?y:q1(y);if(x===void 0)throw console.error("touch was called on an invalid target",y),Error("touch was called on an invalid target");if(_5===!1)G5=new Promise((l)=>{p5=l}),_5=setTimeout(vy);if(_2.find((l)=>x.startsWith(l))==null)_2.push(x);let h=x.match(/^(.+)\[(\d+)\](.*)$/);if(h!==null){let[,l,i,C]=h,k=parseInt(i,10),g=h1(C1,`${l}[${k}]`);if(g!=null){let w=Ny(l,k,g,C);for(let B of w)if(_2.find((j)=>B.startsWith(j))==null)_2.push(B)}}},E2=(y,x)=>{return new x8(y,x)},a2=(y)=>{let x=o0.indexOf(y);if(x>-1)o0.splice(x,1);else throw Error("unobserve failed, listener not found")},h8=(y,x)=>{let h=new Event(x);y.dispatchEvent(h)},l8=(y)=>{if(y instanceof HTMLInputElement)return y.type;else if(y instanceof HTMLSelectElement&&y.hasAttribute("multiple"))return"multi-select";else return"other"},Zy=(y,x)=>{switch(l8(y)){case"radio":y.checked=y.value===x;break;case"checkbox":y.checked=!!x;break;case"date":y.valueAsDate=new Date(x);break;case"multi-select":for(let h of Array.from(y.querySelectorAll("option")))h.selected=x[h.value];break;default:y.value=x}},$y=(y)=>{switch(l8(y)){case"radio":{let x=y.parentElement?.querySelector(`[name="${y.name}"]:checked`);return x!=null?x.value:null}case"checkbox":return y.checked;case"date":return y.valueAsDate?.toISOString();case"multi-select":return Array.from(y.querySelectorAll("option")).reduce((x,h)=>{return x[h.value]=h.selected,x},{});default:return y.value}},{ResizeObserver:c9}=globalThis,K5=c9!=null?new c9((y)=>{for(let x of y){let h=x.target;h8(h,"resize")}}):{observe(){},unobserve(){}},R9=(y,x,h=!0)=>{if(y!=null&&x!=null)if(typeof x==="string")y.textContent=x;else if(Array.isArray(x))x.forEach((l)=>{y.append(l instanceof Node&&h?u2(l):l)});else if(x instanceof Node)y.append(h?u2(x):x);else throw Error("expect text content or document node")},e2=(y,x=250)=>{let h;return(...l)=>{if(h!==void 0)clearTimeout(h);h=setTimeout(()=>{y(...l)},x)}},U2=(y,x=250)=>{let h,l=Date.now()-x,i=!1;return(...C)=>{if(clearTimeout(h),h=setTimeout(()=>{y(...C),l=Date.now()},x),!i&&Date.now()-l>=x){i=!0;try{y(...C),l=Date.now()}finally{i=!1}}}},r1={value:{toDOM:Zy,fromDOM(y){return $y(y)}},text:{toDOM(y,x){y.textContent=x}},enabled:{toDOM(y,x){y.disabled=!x}},disabled:{toDOM(y,x){y.disabled=Boolean(x)}},list:{toDOM(y,x,h){s2(y,x,h).update(x)}}};function U1(y){return y.replace(/[A-Z]/g,(x)=>{return`-${x.toLocaleLowerCase()}`})}function i8(y){return y.replace(/-([a-z])/g,(x,h)=>{return h.toLocaleUpperCase()})}var cy=180/Math.PI,Ry=Math.PI/180;function $1(y,x,h){return h<y?NaN:x<y?y:x>h?h:x}function n1(y,x,h,l=!0){if(l)h=$1(0,h,1);return h*(x-y)+y}var Jy={RADIANS_TO_DEGREES:cy,DEGREES_TO_RADIANS:Ry,clamp:$1,lerp:n1};function C8(y,x=document.body){let h=getComputedStyle(x);if(y.endsWith(")")&&y.startsWith("var("))y=y.slice(4,-1);return h.getPropertyValue(y).trim()}var fy=(y,x,h)=>{return(0.299*y+0.587*x+0.114*h)/255},h2=(y)=>("00"+Math.round(Number(y)).toString(16)).slice(-2);class k8{h;s;l;constructor(y,x,h){y/=255,x/=255,h/=255;let l=Math.max(y,x,h),i=l-Math.min(y,x,h),C=i!==0?l===y?(x-h)/i:l===x?2+(h-y)/i:4+(y-x)/i:0;this.h=60*C<0?60*C+360:60*C,this.s=i!==0?l<=0.5?i/(2*l-i):i/(2-(2*l-i)):0,this.l=(2*l-i)/2}}var u1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(u1)u1.style.display="none";class Q{r;g;b;a;static fromVar(y,x=document.body){return Q.fromCss(C8(y,x))}static fromCss(y){let x=y.match(/^#([0-9a-fA-F]+)$/);if(x){let w=x[1],B=(j,V)=>parseInt(w.slice(j,j+V),16);if(w.length===3||w.length===4){let j=(V)=>B(V,1)*17;return new Q(j(0),j(1),j(2),w.length===4?j(3)/255:1)}if(w.length===6||w.length===8)return new Q(B(0,2),B(2,2),B(4,2),w.length===8?B(6,2)/255:1)}let h=y;if(u1 instanceof HTMLSpanElement)u1.style.color="black",u1.style.color=y,document.body.appendChild(u1),h=getComputedStyle(u1).color,u1.remove();let[l,i,C,k]=h.match(/[\d.]+/g)||["0","0","0","0"],g=h.startsWith("color(srgb")?255:1;return new Q(Number(l)*g,Number(i)*g,Number(C)*g,k==null?1:Number(k))}static fromHsl(y,x,h,l=1){let i,C,k;if(x===0)i=C=k=h;else{let w=(A,O,G)=>{if(G<0)G+=1;if(G>1)G-=1;if(G<0.16666666666666666)return A+(O-A)*6*G;if(G<0.5)return O;if(G<0.6666666666666666)return A+(O-A)*(0.6666666666666666-G)*6;return A},B=h<0.5?h*(1+x):h+x-h*x,j=2*h-B,V=(y%360+360)%360/360;i=w(j,B,V+0.3333333333333333),C=w(j,B,V),k=w(j,B,V-0.3333333333333333)}let g=new Q(i*255,C*255,k*255,l);return g.hslCached={h:(y%360+360)%360,s:x,l:h},g}static black=new Q(0,0,0);static white=new Q(255,255,255);constructor(y,x,h,l=1){this.r=$1(0,y,255),this.g=$1(0,x,255),this.b=$1(0,h,255),this.a=$1(0,l,1)}get inverse(){return new Q(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:y,s:x,l:h}=this._hsl;return Q.fromHsl(y,x,1-h,this.a)}get opaque(){return this.a===1?this:new Q(this.r,this.g,this.b,1)}contrasting(y=1){return this.opaque.blend(this.brightness>0.5?Q.black:Q.white,y)}get rgb(){let{r:y,g:x,b:h}=this;return`rgb(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)})`}get rgba(){let{r:y,g:x,b:h,a:l}=this;return`rgba(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)},${l.toFixed(2)})`}get RGBA(){return[this.r/255,this.g/255,this.b/255,this.a]}get ARGB(){return[this.a,this.r/255,this.g/255,this.b/255]}hslCached;get _hsl(){if(this.hslCached==null)this.hslCached=new k8(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}%)`}get hsla(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let y=this.brightness*255;return new Q(y,y,y)}get brightness(){return fy(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+h2(this.r)+h2(this.g)+h2(this.b):"#"+h2(this.r)+h2(this.g)+h2(this.b)+h2(Math.floor(255*this.a))}brighten(y){let{h:x,s:h,l}=this._hsl,i=$1(0,l+y*(1-l),1);return Q.fromHsl(x,h,i,this.a)}darken(y){let{h:x,s:h,l}=this._hsl,i=$1(0,l*(1-y),1);return Q.fromHsl(x,h,i,this.a)}saturate(y){let{h:x,s:h,l}=this._hsl,i=$1(0,h+y*(1-h),1);return Q.fromHsl(x,i,l,this.a)}desaturate(y){let{h:x,s:h,l}=this._hsl,i=$1(0,h*(1-y),1);return Q.fromHsl(x,i,l,this.a)}rotate(y){let{h:x,s:h,l}=this._hsl,i=(x+360+y)%360;return Q.fromHsl(i,h,l,this.a)}opacity(y){let{h:x,s:h,l}=this._hsl;return Q.fromHsl(x,h,l,y)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(y,x){return new Q(n1(this.r,y.r,x),n1(this.g,y.g,x),n1(this.b,y.b,x),n1(this.a,y.a,x))}static blendHue(y,x,h){let l=(x-y+720)%360;if(l<180)return y+h*l;else return y-(360-l)*h}mix(y,x){let h=this._hsl,l=y._hsl;return Q.fromHsl(h.s===0?l.h:l.s===0?h.h:Q.blendHue(h.h,l.h,x),n1(h.s,l.s,x),n1(h.l,l.l,x),n1(this.a,y.a,x))}colorMix(y,x){return Q.fromCss(`color-mix(in hsl, ${this.html}, ${y.html} ${(x*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(y,x,h,l){if(!Q.computedColors.has(y))Q.computedColors.set(y,{varName:x,scale:h,method:l}),Q.queueRecompute()}static queueRecompute(){if(Q.recomputeQueued)return;Q.recomputeQueued=!0,queueMicrotask(()=>{Q.recomputeQueued=!1,Q.recomputeColors()})}static recomputeColors(){if(Q.computedColors.size===0)return;let y=[];for(let[h,{varName:l,scale:i,method:C}]of Q.computedColors)try{let k=Q.fromVar(l),g;switch(C){case"b":g=i>0?k.brighten(i):k.darken(-i);break;case"s":g=i>0?k.saturate(i):k.desaturate(-i);break;case"h":g=k.rotate(i*100);break;case"o":g=k.opacity(i);break;default:continue}y.push(` ${h}: ${g.rgba};`)}catch(k){}if(y.length===0)return;let x=`:root {
1
+ (()=>{var zy=Object.defineProperty;var jy=(y)=>y;function qy(y,x){this[y]=jy.bind(null,x)}var x5=(y,x)=>{for(var h in x)zy(y,h,{get:x[h],enumerable:!0,configurable:!0,set:qy.bind(x,h)})};var h5=((y)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(y,{get:(x,h)=>(typeof require<"u"?require:x)[h]}):y)(function(y){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+y+'" is not supported')});var U9={};x5(U9,{xrControllersText:()=>ni,xrControllers:()=>Mi,xinTagList:()=>EC,xinTag:()=>mC,xinTabs:()=>dl,xinTable:()=>Ih,xinSizer:()=>oC,xinSidenav:()=>ji,xinSelect:()=>jh,xinSegmented:()=>IC,xinRating:()=>QC,xinPasswordStrength:()=>OC,xinNotification:()=>AC,xinMenu:()=>Hh,xinMd:()=>BC,xinLocalized:()=>_h,xinForm:()=>Ii,xinFloat:()=>kh,xinField:()=>Si,xinCarousel:()=>yh,wrapIcon:()=>I5,version:()=>T7,updateLocalized:()=>u5,trackDrag:()=>V1,tosijs:()=>x0,tosiThemeEditor:()=>iC,tosiTagList:()=>r7,tosiTag:()=>K9,tosiTabs:()=>K0,tosiTable:()=>C3,tosiSizer:()=>S7,tosiSidenav:()=>Q0,tosiSelect:()=>G1,tosiSegmented:()=>b7,tosiRow:()=>ui,tosiRouteView:()=>HC,tosiRichText:()=>J7,tosiRating:()=>v7,tosiPasswordStrength:()=>Z7,tosiNotification:()=>B9,tosiMonth:()=>qC,tosiMenu:()=>q6,tosiMd:()=>l9,tosiLocalized:()=>Q1,tosiLocalePicker:()=>a8,tosiHeaderLinks:()=>oi,tosiHeader:()=>Ti,tosiGrid:()=>mi,tosiForm:()=>G7,tosiFloat:()=>i0,tosiField:()=>A7,tosiDocSystem:()=>Fi,tosiDiff:()=>l0,tosiDialog:()=>V4,tosiColumn:()=>ai,tosiCarousel:()=>R8,testManager:()=>U1,tabSelector:()=>bl,svgIcon:()=>ax,svg2DataUrl:()=>h0,styleSheet:()=>e0,spacer:()=>y9,sizeBreak:()=>rC,sideNav:()=>zi,setLocale:()=>C4,scriptTag:()=>A1,runTests:()=>s4,router:()=>v0,richTextWidgets:()=>R7,richText:()=>ZC,rewriteImports:()=>F1,resolveMenuItems:()=>K1,resolveIcon:()=>m1,removeLastMenu:()=>l1,postNotification:()=>GC,positionFloat:()=>r8,popMenu:()=>L,popFloat:()=>C0,popDropMenu:()=>j6,parseShortcut:()=>g4,navigate:()=>JC,modifierKeys:()=>Ah,menu:()=>B6,matchShortcut:()=>m5,markdownViewer:()=>wC,mapBox:()=>kC,makeSorter:()=>l4,localize:()=>D,localePicker:()=>Ph,loadTransform:()=>U0,liveTheme:()=>T,liveExample:()=>Z4,legacyAliases:()=>W7,keystroke:()=>Gh,keycode:()=>t8,isBreached:()=>N7,insertExamples:()=>F4,initTooltips:()=>kk,initLocalization:()=>a5,icons:()=>O,iconRules:()=>S5,i18n:()=>M,getRouterParams:()=>vC,gamepadText:()=>Li,gamepadState:()=>U7,findShortcutAction:()=>l3,findHighestZ:()=>g2,filterPart:()=>$4,filterForDrop:()=>B0,filterForClick:()=>y3,filterBuilder:()=>ci,expect:()=>c3,executeInline:()=>W4,executeInIframe:()=>Y4,executeCode:()=>d6,enableTests:()=>D3,enableLiveTheme:()=>F7,elastic:()=>ti,editableRect:()=>si,dragAndDrop:()=>z4,displayShortcut:()=>w4,disableTests:()=>b3,disableLiveTheme:()=>lC,digest:()=>s7,diffLines:()=>f8,defineRoutes:()=>RC,defineIcons:()=>Tx,defaultColors:()=>D1,dataTable:()=>Sh,createThemeWithLegacy:()=>yC,createTheme:()=>J2,createTestContext:()=>R3,createSubMenu:()=>x3,createMenuItem:()=>w6,createMenuAction:()=>k6,createDropMenuItem:()=>g6,createDocBrowser:()=>S3,createDarkTheme:()=>J4,createColorVariables:()=>Q7,componentVars:()=>xC,commandButton:()=>Z1,colorInput:()=>n5,codeEditor:()=>o1,canonicalShortcut:()=>Uh,bringToFront:()=>E1,bodymovinPlayer:()=>tx,blockStyle:()=>q9,baseVariables:()=>p7,baseTheme:()=>Ei,baseDarkTheme:()=>ei,b3d:()=>mx,availableFilters:()=>o3,applyTheme:()=>x9,applyLocalized:()=>g0,abTest:()=>rx,XinWord:()=>NC,XinTagList:()=>tC,XinTag:()=>aC,XinSizer:()=>TC,XinSelect:()=>zh,XinSegmented:()=>SC,XinRating:()=>pC,XinPasswordStrength:()=>UC,XinNotification:()=>_C,XinMenu:()=>fh,XinLocalized:()=>i4,XinForm:()=>di,XinFloat:()=>Ch,XinField:()=>bi,XinCarousel:()=>ex,TosiThemeEditor:()=>h9,TosiTagList:()=>D2,TosiTag:()=>c0,TosiTabs:()=>O4,TosiTable:()=>q4,TosiSizer:()=>L4,TosiSidenav:()=>V2,TosiSelect:()=>R1,TosiSegmented:()=>f2,TosiRow:()=>t3,TosiRouteView:()=>_9,TosiRating:()=>I4,TosiPasswordStrength:()=>S4,TosiNotification:()=>x2,TosiMonth:()=>g9,TosiMenu:()=>j4,TosiMd:()=>b4,TosiLocalized:()=>J1,TosiLocalePicker:()=>k4,TosiHeaderLinks:()=>a3,TosiHeader:()=>u3,TosiGrid:()=>e3,TosiForm:()=>R4,TosiFloat:()=>L1,TosiField:()=>c4,TosiDocSystem:()=>r3,TosiDiff:()=>L5,TosiDialog:()=>z3,TosiColumn:()=>E3,TosiCarousel:()=>x4,TabSelector:()=>Dl,SvgIcon:()=>r5,SizeBreak:()=>A9,SideNav:()=>Bi,STORAGE_KEY:()=>Q4,RichText:()=>r4,RemoteSyncManager:()=>O0,MarkdownViewer:()=>gC,MapBox:()=>P2,LocalePicker:()=>Vh,LiveExample:()=>e1,FilterPart:()=>L3,FilterBuilder:()=>M3,EditableRect:()=>N1,DataTable:()=>dh,CodeEditor:()=>T1,BodymovinPlayer:()=>F2,B3d:()=>T5,AbTest:()=>Y2});var x0={};x5(x0,{xinValue:()=>py,xinSlot:()=>Gx,xinProxy:()=>s8,xinPath:()=>Oy,xin:()=>E,warnDeprecated:()=>j1,version:()=>X8,vars:()=>z,varDefault:()=>P,validateAgainstConstraints:()=>Q8,updates:()=>s5,unobserve:()=>a2,touchElement:()=>R5,touch:()=>_1,tosiValue:()=>J,tosiUnique:()=>Hx,tosiSlot:()=>Ax,tosiSetValue:()=>Uy,tosiPath:()=>q1,tosiLoader:()=>dx,tosiBlueprint:()=>bx,tosiAccessor:()=>Ky,tosi:()=>e,throttle:()=>O2,sync:()=>Rx,svgElements:()=>u0,share:()=>vx,settings:()=>r0,scrollListItemIntoView:()=>Bx,onThemePreferencesChange:()=>ny,onStylesheetChange:()=>ry,on:()=>W2,observe:()=>$5,mathML:()=>U8,makeComponent:()=>H5,invertLuminance:()=>y0,initVars:()=>My,hotReload:()=>Kx,getThemePreferences:()=>A8,getListItem:()=>C2,getListInstance:()=>c5,getListBinding:()=>Q2,getCssVar:()=>q8,elements:()=>K,deprecated:()=>B1,deleteListItem:()=>gx,debounce:()=>e2,css:()=>p2,boxedProxy:()=>J5,boxed:()=>P1,blueprintLoader:()=>Ix,blueprint:()=>Sx,bindings:()=>r1,bindParts:()=>ty,bind:()=>S1,TOSI_ACCESSOR:()=>X5,TAKE_DESCRIPTOR:()=>M0,StyleSheet:()=>p1,MoreMath:()=>dy,Component:()=>U,Color:()=>W,BlueprintLoader:()=>f5,Blueprint:()=>t0});function i2(y){if(y==null||typeof y!=="object")return y;if(y instanceof Set)return new Set(y);else if(Array.isArray(y))return y.map(i2);let x={};for(let h in y){let l=y[h];if(y!=null&&typeof y==="object")x[h]=i2(l);else x[h]=l}return x}var F5="-xin-data",K2=`.${F5}`,x8="-xin-event",J9=`.${x8}`,c1=Symbol.for("xin-path"),U2=Symbol.for("xin-value"),Vy="xinObserve",Py="xinBind",_y="xinOn",X5=Symbol.for("tosi-accessor"),M0=Symbol.for("tosi-take"),I0=Symbol("list-binding"),G2=Symbol("list-instance"),q5=new Map;function Ay(y,x){let h=q5.get(y);if(h===void 0)h=new Set,q5.set(y,h);h.add(x)}function Gy(y){return q5.get(y)}var H9=new Set;function j1(y,x){if(!H9.has(y))console.warn(x),H9.add(y)}function B1(y,x){let h=!1;return(...l)=>{if(!h)console.warn(x),h=!0;return y(...l)}}var q1=(y)=>{return y&&y[c1]||void 0};function J(y){if(typeof y==="object"&&y!==null){let x=y[U2];return x!==void 0?x:y}return y}function Ky(y){return y!=null?y[X5]:void 0}function Uy(y,x){if(q1(y)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");y[U2]=x}var Oy=B1(q1,"xinPath is deprecated. Use tosiPath instead."),py=B1(J,"xinValue is deprecated. Use tosiValue instead."),n2=new WeakMap,I1=new WeakMap,u2=(y)=>{let x=y.cloneNode();if(x instanceof Element){let h=I1.get(y),l=n2.get(y);if(h!=null)I1.set(x,i2(h));if(l!=null)n2.set(x,i2(l))}for(let h of Array.from(y instanceof HTMLTemplateElement?y.content.childNodes:y.childNodes))if(h instanceof Element||h instanceof DocumentFragment)x.appendChild(u2(h));else x.appendChild(h.cloneNode());return x},r0={debug:!1,perf:!1},Qy=(y)=>{try{return JSON.stringify(y)}catch(x){return"{has circular references}"}},h8=(...y)=>Error(y.map(Qy).join(" ")),Wy=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),Yy=0,Fy=()=>(parseInt("10000",36)+ ++Yy).toString(36).slice(-5),l8=()=>Wy()+Fy(),V5=Symbol("delete"),i8=Symbol("new-object"),l5=Symbol("automatic-index");function C8(y){if(y==="")return[];if(Array.isArray(y))return y;else{let x=[];while(y.length>0){let h=y.search(/\[[^\]]+\]/);if(h===-1){x.push(y.split("."));break}else{let l=y.slice(0,h);if(y=y.slice(h),l!=="")x.push(l.split("."));if(h=y.indexOf("]")+1,x.push(y.slice(1,h-1)),y.slice(h,h+1)===".")h+=1;y=y.slice(h)}}return x}}var d1=new WeakMap;function k8(y,x){if(d1.get(y)===void 0)d1.set(y,{});if(d1.get(y)[x]===void 0)d1.get(y)[x]={};let h=d1.get(y)[x];if(x==="_auto_")y.forEach((l,i)=>{if(l[l5]===void 0)l[l5]=l8();h[l[l5]+""]=i});else y.forEach((l,i)=>{h[h1(l,x)+""]=i});return h}function Xy(y,x){if(d1.get(y)===void 0||d1.get(y)[x]===void 0)return k8(y,x);else return d1.get(y)[x]}function sy(y,x,h){h=h+"";let l=Xy(y,x)[h];if(l===void 0||h1(y[l],x)+""!==h)l=k8(y,x)[h];return l}function Ny(y,x,h){if(y[x]===void 0&&h!==void 0)y[x]=h;return y[x]}function g8(y,x,h,l){let i=x!==""?sy(y,x,h):h;if(l===V5)return y.splice(i,1),d1.delete(y),Symbol("deleted");else if(l===i8){if(x===""&&y[i]===void 0)y[i]={}}else if(l!==void 0)if(i!==void 0)y[i]=l;else if(x!==""&&h1(l,x)+""===h+"")y.push(l),i=y.length-1;else throw Error(`byIdPath insert failed at [${x}=${h}]`);return y[i]}function f9(y){if(!Array.isArray(y))throw h8("setByPath failed: expected array, found",y)}function D9(y){if(y==null||!(y instanceof Object))throw h8("setByPath failed: expected Object, found",y)}function h1(y,x){let h=C8(x),l=y,i,C,k,g;for(i=0,C=h.length;l!==void 0&&i<C;i++){let w=h[i];if(Array.isArray(w))for(k=0,g=w.length;l!==void 0&&k<g;k++){let B=w[k];l=l[B]}else if(l.length===0){if(l=l[Number(w.slice(1))],w[0]!=="=")return}else if(w.includes("=")){let[B,...j]=w.split("=");l=g8(l,B,j.join("="))}else k=parseInt(w,10),l=l[k]}return l}function t2(y,x,h){let l=y;if(x==="")throw Error("setByPath cannot be used to set the root object");let i=C8(x);while(l!=null&&i.length>0){let C=i.shift();if(typeof C==="string"){let k=C.indexOf("=");if(k>-1){if(k===0)D9(l);else f9(l);let g=C.slice(0,k),w=C.slice(k+1);if(l=g8(l,g,w,i.length>0?i8:h),i.length===0)return!0}else{f9(l);let g=parseInt(C,10);if(i.length>0)l=l[g];else{if(h!==V5){if(l[g]===h)return!1;l[g]=h}else l.splice(g,1);return!0}}}else if(Array.isArray(C)&&C.length>0){D9(l);while(C.length>0){let k=C.shift();if(C.length>0||i.length>0)l=Ny(l,k,C.length>0?{}:[]);else{if(h!==V5){if(l[k]===h)return!1;l[k]=h}else{if(!Object.prototype.hasOwnProperty.call(l,k))return!1;delete l[k]}return!0}}}else throw Error(`setByPath failed, bad path ${x}`)}throw Error(`setByPath(${y}, ${x}, ${h}) failed`)}var C1={},P5=null,Zy=(y)=>{P5=y},n0=()=>{if(P5===null)throw Error("xin proxy not initialized");return P5},_5=null,A5=null,vy=(y,x)=>{_5=y,A5=x},$y=()=>{if(_5===null)throw Error("bind not initialized");return _5},cy=()=>{if(A5===null)throw Error("on not initialized");return A5},b9=Symbol("observer should be removed"),T0=[],A2=[],G5=!1,K5,U5;function Ry(y,x,h,l){let i=Gy(y);if(i===void 0)return[];let C=[];for(let k of i){let g=h1(h,k);if(g!==void 0)C.push(`${y}[${k}=${g}]${l}`)}return C}class w8{description;test;callback;constructor(y,x){let h=typeof x==="string"?`"${x}"`:`function ${x.name}`,l;if(typeof y==="string")this.test=(i)=>typeof i==="string"&&i!==""&&(y.startsWith(i)||i.startsWith(y)),l=`test = "${y}"`;else if(y instanceof RegExp)this.test=y.test.bind(y),l=`test = "${y.toString()}"`;else if(y instanceof Function)this.test=y,l=`test = function ${y.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${l}, ${h}`,typeof x==="function")this.callback=x;else throw Error("expect callback to be a path or function");T0.push(this)}}var s5=async()=>{if(K5===void 0)return;await K5},Jy=()=>{if(r0.perf)console.time("xin async update");let y=Array.from(A2);A2.length=0,G5=!1;for(let x of y)T0.filter((h)=>{let l;try{l=h.test(x)}catch(i){throw Error(`Listener ${h.description} threw "${i}" at "${x}"`)}if(l===b9)return a2(h),!1;return l}).forEach((h)=>{let l;try{l=h.callback(x)}catch(i){console.error(`Listener ${h.description} threw "${i}" handling "${x}"`)}if(l===b9)a2(h)});if(typeof U5==="function")U5();if(r0.perf)console.timeEnd("xin async update")},_1=(y)=>{let x=typeof y==="string"?y:q1(y);if(x===void 0)throw console.error("touch was called on an invalid target",y),Error("touch was called on an invalid target");if(G5===!1)K5=new Promise((l)=>{U5=l}),G5=setTimeout(Jy);if(A2.find((l)=>x.startsWith(l))==null)A2.push(x);let h=x.match(/^(.+)\[(\d+)\](.*)$/);if(h!==null){let[,l,i,C]=h,k=parseInt(i,10),g=h1(C1,`${l}[${k}]`);if(g!=null){let w=Ry(l,k,g,C);for(let B of w)if(A2.find((j)=>B.startsWith(j))==null)A2.push(B)}}},E2=(y,x)=>{return new w8(y,x)},a2=(y)=>{let x=T0.indexOf(y);if(x>-1)T0.splice(x,1);else throw Error("unobserve failed, listener not found")},B8=(y,x)=>{let h=new Event(x);y.dispatchEvent(h)},z8=(y)=>{if(y instanceof HTMLInputElement)return y.type;else if(y instanceof HTMLSelectElement&&y.hasAttribute("multiple"))return"multi-select";else return"other"},Hy=(y,x)=>{switch(z8(y)){case"radio":y.checked=y.value===x;break;case"checkbox":y.checked=!!x;break;case"date":y.valueAsDate=new Date(x);break;case"multi-select":for(let h of Array.from(y.querySelectorAll("option")))h.selected=x[h.value];break;default:y.value=x}},fy=(y)=>{switch(z8(y)){case"radio":{let x=y.parentElement?.querySelector(`[name="${y.name}"]:checked`);return x!=null?x.value:null}case"checkbox":return y.checked;case"date":return y.valueAsDate?.toISOString();case"multi-select":return Array.from(y.querySelectorAll("option")).reduce((x,h)=>{return x[h.value]=h.selected,x},{});default:return y.value}},{ResizeObserver:d9}=globalThis,O5=d9!=null?new d9((y)=>{for(let x of y){let h=x.target;B8(h,"resize")}}):{observe(){},unobserve(){}},S9=(y,x,h=!0)=>{if(y!=null&&x!=null)if(typeof x==="string")y.textContent=x;else if(Array.isArray(x))x.forEach((l)=>{y.append(l instanceof Node&&h?u2(l):l)});else if(x instanceof Node)y.append(h?u2(x):x);else throw Error("expect text content or document node")},e2=(y,x=250)=>{let h;return(...l)=>{if(h!==void 0)clearTimeout(h);h=setTimeout(()=>{y(...l)},x)}},O2=(y,x=250)=>{let h,l=Date.now()-x,i=!1;return(...C)=>{if(clearTimeout(h),h=setTimeout(()=>{y(...C),l=Date.now()},x),!i&&Date.now()-l>=x){i=!0;try{y(...C),l=Date.now()}finally{i=!1}}}},r1={value:{toDOM:Hy,fromDOM(y){return fy(y)}},text:{toDOM(y,x){y.textContent=x}},enabled:{toDOM(y,x){y.disabled=!x}},disabled:{toDOM(y,x){y.disabled=Boolean(x)}},list:{toDOM(y,x,h){Q2(y,x,h).update(x)}}};function O1(y){return y.replace(/[A-Z]/g,(x)=>{return`-${x.toLocaleLowerCase()}`})}function j8(y){return y.replace(/-([a-z])/g,(x,h)=>{return h.toLocaleUpperCase()})}var Dy=180/Math.PI,by=Math.PI/180;function $1(y,x,h){return h<y?NaN:x<y?y:x>h?h:x}function n1(y,x,h,l=!0){if(l)h=$1(0,h,1);return h*(x-y)+y}var dy={RADIANS_TO_DEGREES:Dy,DEGREES_TO_RADIANS:by,clamp:$1,lerp:n1};function q8(y,x=document.body){let h=getComputedStyle(x);if(y.endsWith(")")&&y.startsWith("var("))y=y.slice(4,-1);return h.getPropertyValue(y).trim()}var Sy=(y,x,h)=>{return(0.299*y+0.587*x+0.114*h)/255},h2=(y)=>("00"+Math.round(Number(y)).toString(16)).slice(-2);class V8{h;s;l;constructor(y,x,h){y/=255,x/=255,h/=255;let l=Math.max(y,x,h),i=l-Math.min(y,x,h),C=i!==0?l===y?(x-h)/i:l===x?2+(h-y)/i:4+(y-x)/i:0;this.h=60*C<0?60*C+360:60*C,this.s=i!==0?l<=0.5?i/(2*l-i):i/(2-(2*l-i)):0,this.l=(2*l-i)/2}}var u1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(u1)u1.style.display="none";class W{r;g;b;a;static fromVar(y,x=document.body){return W.fromCss(q8(y,x))}static fromCss(y){let x=y.match(/^#([0-9a-fA-F]+)$/);if(x){let w=x[1],B=(j,V)=>parseInt(w.slice(j,j+V),16);if(w.length===3||w.length===4){let j=(V)=>B(V,1)*17;return new W(j(0),j(1),j(2),w.length===4?j(3)/255:1)}if(w.length===6||w.length===8)return new W(B(0,2),B(2,2),B(4,2),w.length===8?B(6,2)/255:1)}let h=y;if(u1 instanceof HTMLSpanElement)u1.style.color="black",u1.style.color=y,document.body.appendChild(u1),h=getComputedStyle(u1).color,u1.remove();let[l,i,C,k]=h.match(/[\d.]+/g)||["0","0","0","0"],g=h.startsWith("color(srgb")?255:1;return new W(Number(l)*g,Number(i)*g,Number(C)*g,k==null?1:Number(k))}static fromHsl(y,x,h,l=1){let i,C,k;if(x===0)i=C=k=h;else{let w=(_,p,G)=>{if(G<0)G+=1;if(G>1)G-=1;if(G<0.16666666666666666)return _+(p-_)*6*G;if(G<0.5)return p;if(G<0.6666666666666666)return _+(p-_)*(0.6666666666666666-G)*6;return _},B=h<0.5?h*(1+x):h+x-h*x,j=2*h-B,V=(y%360+360)%360/360;i=w(j,B,V+0.3333333333333333),C=w(j,B,V),k=w(j,B,V-0.3333333333333333)}let g=new W(i*255,C*255,k*255,l);return g.hslCached={h:(y%360+360)%360,s:x,l:h},g}static black=new W(0,0,0);static white=new W(255,255,255);constructor(y,x,h,l=1){this.r=$1(0,y,255),this.g=$1(0,x,255),this.b=$1(0,h,255),this.a=$1(0,l,1)}get inverse(){return new W(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:y,s:x,l:h}=this._hsl;return W.fromHsl(y,x,1-h,this.a)}get opaque(){return this.a===1?this:new W(this.r,this.g,this.b,1)}contrasting(y=1){return this.opaque.blend(this.brightness>0.5?W.black:W.white,y)}get rgb(){let{r:y,g:x,b:h}=this;return`rgb(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)})`}get rgba(){let{r:y,g:x,b:h,a:l}=this;return`rgba(${y.toFixed(0)},${x.toFixed(0)},${h.toFixed(0)},${l.toFixed(2)})`}get RGBA(){return[this.r/255,this.g/255,this.b/255,this.a]}get ARGB(){return[this.a,this.r/255,this.g/255,this.b/255]}hslCached;get _hsl(){if(this.hslCached==null)this.hslCached=new V8(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}%)`}get hsla(){let{h:y,s:x,l:h}=this._hsl;return`hsl(${y.toFixed(0)}deg ${(x*100).toFixed(0)}% ${(h*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let y=this.brightness*255;return new W(y,y,y)}get brightness(){return Sy(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+h2(this.r)+h2(this.g)+h2(this.b):"#"+h2(this.r)+h2(this.g)+h2(this.b)+h2(Math.floor(255*this.a))}brighten(y){let{h:x,s:h,l}=this._hsl,i=$1(0,l+y*(1-l),1);return W.fromHsl(x,h,i,this.a)}darken(y){let{h:x,s:h,l}=this._hsl,i=$1(0,l*(1-y),1);return W.fromHsl(x,h,i,this.a)}saturate(y){let{h:x,s:h,l}=this._hsl,i=$1(0,h+y*(1-h),1);return W.fromHsl(x,i,l,this.a)}desaturate(y){let{h:x,s:h,l}=this._hsl,i=$1(0,h*(1-y),1);return W.fromHsl(x,i,l,this.a)}rotate(y){let{h:x,s:h,l}=this._hsl,i=(x+360+y)%360;return W.fromHsl(i,h,l,this.a)}opacity(y){let{h:x,s:h,l}=this._hsl;return W.fromHsl(x,h,l,y)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(y,x){return new W(n1(this.r,y.r,x),n1(this.g,y.g,x),n1(this.b,y.b,x),n1(this.a,y.a,x))}static blendHue(y,x,h){let l=(x-y+720)%360;if(l<180)return y+h*l;else return y-(360-l)*h}mix(y,x){let h=this._hsl,l=y._hsl;return W.fromHsl(h.s===0?l.h:l.s===0?h.h:W.blendHue(h.h,l.h,x),n1(h.s,l.s,x),n1(h.l,l.l,x),n1(this.a,y.a,x))}colorMix(y,x){return W.fromCss(`color-mix(in hsl, ${this.html}, ${y.html} ${(x*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(y,x,h,l){if(!W.computedColors.has(y))W.computedColors.set(y,{varName:x,scale:h,method:l}),W.queueRecompute()}static queueRecompute(){if(W.recomputeQueued)return;W.recomputeQueued=!0,queueMicrotask(()=>{W.recomputeQueued=!1,W.recomputeColors()})}static recomputeColors(){if(W.computedColors.size===0)return;let y=[];for(let[h,{varName:l,scale:i,method:C}]of W.computedColors)try{let k=W.fromVar(l),g;switch(C){case"b":g=i>0?k.brighten(i):k.darken(-i);break;case"s":g=i>0?k.saturate(i):k.desaturate(-i);break;case"h":g=k.rotate(i*100);break;case"o":g=k.opacity(i);break;default:continue}y.push(` ${h}: ${g.rgba};`)}catch(k){}if(y.length===0)return;let x=`:root {
2
2
  ${y.join(`
3
3
  `)}
4
- }`;if(Q.computedColorStylesheet===null)Q.computedColorStylesheet=document.createElement("style"),Q.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(Q.computedColorStylesheet);Q.computedColorStylesheet.textContent=x}}var T0=new Set,J9=!1;function Hy(){if(!J9)J9=!0,T0.add(()=>Q.queueRecompute())}function by(y){return T0.add(y),()=>T0.delete(y)}function Dy(){Hy();for(let y of T0)y()}function O1(y,x){let h=J(x),l=p.style(O2(h));l.id=y,document.head.append(l);let i=q1(x);if(i!==void 0)Z5(i,()=>{l.textContent=O2(J(x)),Dy()})}var dy=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|line-height|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,g8=(y,x)=>{if(typeof x==="number"&&!dy.test(y))x=`${x}px`;if(y.startsWith("_"))if(y.startsWith("__"))y="--"+y.substring(2),x=`var(${y}-default, ${x})`;else y="--"+y.substring(1);return{prop:y,value:String(x)}},Sy=(y,x,h)=>{if(h===void 0)return"";if(h instanceof Q)h=h.html;let l=g8(x,h);return`${y} ${l.prop}: ${l.value};`},w8=(y,x,h="")=>{let l=U1(y);if(typeof x==="object"&&!(x instanceof Q)){let i=Object.keys(x).map((C)=>w8(C,x[C],`${h} `)).join(`
4
+ }`;if(W.computedColorStylesheet===null)W.computedColorStylesheet=document.createElement("style"),W.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(W.computedColorStylesheet);W.computedColorStylesheet.textContent=x}}var o0=new Set,I9=!1;function Iy(){if(!I9)I9=!0,o0.add(()=>W.queueRecompute())}function ry(y){return o0.add(y),()=>o0.delete(y)}function Ty(){Iy();for(let y of o0)y()}function p1(y,x){let h=J(x),l=K.style(p2(h));l.id=y,document.head.append(l);let i=q1(x);if(i!==void 0)$5(i,()=>{l.textContent=p2(J(x)),Ty()})}var oy=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|line-height|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,P8=(y,x)=>{if(typeof x==="number"&&!oy.test(y))x=`${x}px`;if(y.startsWith("_"))if(y.startsWith("__"))y="--"+y.substring(2),x=`var(${y}-default, ${x})`;else y="--"+y.substring(1);return{prop:y,value:String(x)}},Ly=(y,x,h)=>{if(h===void 0)return"";if(h instanceof W)h=h.html;let l=P8(x,h);return`${y} ${l.prop}: ${l.value};`},_8=(y,x,h="")=>{let l=O1(y);if(typeof x==="object"&&!(x instanceof W)){let i=Object.keys(x).map((C)=>_8(C,x[C],`${h} `)).join(`
5
5
  `);return`${h} ${y} {
6
6
  ${i}
7
- ${h} }`}else return Sy(h,l,x)},O2=(y,x="")=>{return Object.keys(y).map((h)=>{let l=y[h];if(typeof l==="string"){if(h==="@import")return`@import url('${l}');`;throw Error("top-level string value only allowed for `@import`")}let i=Object.keys(l).map((C)=>w8(C,l[C])).join(`
7
+ ${h} }`}else return Ly(h,l,x)},p2=(y,x="")=>{return Object.keys(y).map((h)=>{let l=y[h];if(typeof l==="string"){if(h==="@import")return`@import url('${l}');`;throw Error("top-level string value only allowed for `@import`")}let i=Object.keys(l).map((C)=>_8(C,l[C])).join(`
8
8
  `);return`${x}${h} {
9
9
  ${i}
10
10
  }`}).join(`
11
11
 
12
- `)},Iy=(y)=>{j1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let x={};for(let h of Object.keys(y)){let l=y[h],i=U1(h);x[`--${i}`]=typeof l==="number"&&l!==0?String(l)+"px":l}return x},y0=(y)=>{let x={};for(let h of Object.keys(y)){let l=y[h];if(l instanceof Q)x[h]=l.inverseLuminance;else if(typeof l==="string"&&l.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/))x[h]=Q.fromCss(l).inverseLuminance}return x},P=new Proxy({},{get(y,x){if(y[x]===void 0){let h="--"+U1(x);y[x]=(l)=>`var(${h}, ${l})`}return y[x]}}),z=new Proxy({},{get(y,x){if(x==="default")return P;if(y[x]==null){x=U1(x);let[,h,,l,i,C]=x.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",x],k=`--${h}`;if(i!=null){let g=l==null?Number(i)/100:-Number(i)/100;switch(C){case"b":case"s":case"h":case"o":{let w=`--${x}`;Q.registerComputedColor(w,k,g,C),y[x]=`var(${w})`}break;case"":y[x]=`calc(var(${k}) * ${g})`;break;default:throw console.error(C),Error(`Unrecognized method ${C} for css variable ${k}`)}}else y[x]=`var(${k})`}return y[x]}});function B8(){let y=(x)=>typeof matchMedia<"u"&&matchMedia(x).matches;return{colorScheme:y("(prefers-color-scheme: dark)")?"dark":"light",contrast:y("(prefers-contrast: more)")?"more":y("(prefers-contrast: less)")?"less":y("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:y("(prefers-reduced-motion: reduce)"),reducedTransparency:y("(prefers-reduced-transparency: reduce)"),forcedColors:y("(forced-colors: active)")}}function ry(y){if(typeof matchMedia>"u")return()=>{};let x=["(prefers-color-scheme: dark)","(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-reduced-motion: reduce)","(prefers-reduced-transparency: reduce)","(forced-colors: active)"],h=()=>y(B8()),l=x.map((i)=>matchMedia(i));for(let i of l)i.addEventListener("change",h);return()=>{for(let i of l)i.removeEventListener("change",h)}}var oy="http://www.w3.org/1998/Math/MathML",Ty="http://www.w3.org/2000/svg",d0={},z8=(y,x,h)=>{let l=g8(U1(x),h);if(l.prop.startsWith("--"))y.style.setProperty(l.prop,l.value);else y.style[x]=l.value},Ly=(y)=>{return{toDOM(x,h){z8(x,y,h)}}},j8=(y,x,h)=>{if(x==="style")if(typeof h==="object")for(let l of Object.keys(h))if(q1(h[l]))S1(y,h[l],Ly(l));else z8(y,l,h[l]);else y.setAttribute("style",h);else{let l=U1(x),i=y.constructor.observedAttributes;if(i?.includes(x)||i?.includes(l))if(typeof h==="boolean")h?y.setAttribute(l,""):y.removeAttribute(l);else y.setAttribute(l,h);else if(y[x]!==void 0){let{MathMLElement:C}=globalThis;if(y instanceof SVGElement||C!==void 0&&y instanceof C)y.setAttribute(x,h);else y[x]=h}else if(l==="class")h.split(" ").forEach((C)=>{y.classList.add(C)});else if(y[l]!==void 0)y[l]=h;else if(typeof h==="boolean")h?y.setAttribute(l,""):y.removeAttribute(l);else y.setAttribute(l,h)}},l5={},f9=(y)=>{if(!l5[y])l5[y]={toDOM(x,h){j8(x,y,h)}};return l5[y]},X5=(y,x,h)=>{if(x==="apply")h(y);else if(x.match(/^on[A-Z]/)!=null){let l=x.substring(2).toLowerCase();Q2(y,l,h)}else if(x==="bind")if((typeof h.binding==="string"?r1[h.binding]:h.binding)!==void 0&&h.value!==void 0)S1(y,h.value,h.binding instanceof Function?{toDOM:h.binding}:h.binding);else throw Error("bad binding");else if(x.match(/^bind[A-Z]/)!=null){let l=x.substring(4,5).toLowerCase()+x.substring(5);if(l!=="value"){let C=l==="text"?"textContent":l==="enabled"?"disabled (with .tosi.take(v => !v))":l==="disabled"?"disabled":l==="list"?".tosi.listBinding()":null;if(C)j1(`bind${l}`,`bind${x.substring(4)} is deprecated. Use { ${C}: ... } instead.`)}let i=r1[l];if(i!==void 0)S1(y,h,i);else throw Error(`${x} is not allowed, bindings.${l} is not defined`)}else if(h!=null&&typeof h==="object"&&h[M0])S1(y,h,f9(x));else if(q1(h))S1(y,h,f9(x));else j8(y,x,h)},N5=(y,...x)=>{if(d0[y]===void 0){let[i,C]=y.split("|");if(C===void 0)d0[y]=globalThis.document.createElement(i);else d0[y]=globalThis.document.createElementNS(C,i)}let h=d0[y].cloneNode(),l={};for(let i of x)if(i instanceof Element||i instanceof DocumentFragment||typeof i==="string"||typeof i==="number")if(h instanceof HTMLTemplateElement)h.content.append(i);else h.append(i);else if(q1(i))h.append(p.span({bindText:i}));else Object.assign(l,i);for(let i of Object.keys(l)){let C=l[i];X5(h,i,C)}return h},v5=(...y)=>{let x=globalThis.document.createDocumentFragment();for(let h of y)x.append(h);return x},p=new Proxy({fragment:v5},{get(y,x){if(x=x.replace(/[A-Z]/g,(h)=>`-${h.toLocaleLowerCase()}`),y[x]===void 0)y[x]=(...h)=>N5(x,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),u0=new Proxy({fragment:v5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>N5(`${x}|${Ty}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),q8=new Proxy({fragment:v5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>N5(`${x}|${oy}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),H9=new WeakSet;function My(y,x,h="part"){let l=`[data-${h}]`;for(let i of Array.from(y.querySelectorAll(l))){if(H9.has(i))continue;let C=i.getAttribute(`data-${h}`);if(C==null)continue;let k=x[C];if(k==null)continue;H9.add(i);for(let g of Object.keys(k))X5(i,g,k[g])}}var ny=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],uy=!0,ay=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,my=(y)=>ay.test(y),M1=(y="",x="")=>{if(y==="")return x;else if(x.match(/^\d+$/)!==null||x.includes("="))return`${y}[${x}]`;else return`${y}.${x}`},L0={};function i5(y,x){if(y!==null&&(typeof y==="object"||typeof y==="function"))return y;return new Proxy(L0,a1(x,!0))}var V8=()=>new Proxy({},a1("^",!0)),C5=(y)=>{let x=y(V8())?.path;if(!x?.startsWith("^."))throw Error("selector must return a property of the item");return x.substring(2)},k5=(y,x,h)=>{for(let l=0;l<y.length;l++)if(`${h1(y[l],x)}`===`${h}`)return l;return-1},ty=(y,x)=>({listFind(h,l){if(h instanceof Element){let k=h;while(k&&!k[G2]&&k.parentElement)k=k.parentElement;let g=k?.[G2];if(g==null)return;let w=x.indexOf(g);return w!==-1?P1[y][w]:void 0}let i=C5(h),C=k5(x,i,l);return C!==-1?P1[y][C]:void 0},listUpdate(h,l){let i=C5(h),C=h1(l,i),k=k5(x,i,C);if(k!==-1){let g=P1[y][k];for(let w of Object.keys(l))g[w]=l[w];return g}return P1[y].push(l),P1[y][x.length-1]},listRemove(h,l){let i=C5(h),C=k5(x,i,l);if(C===-1)return!1;return P1[y].splice(C,1),!0}}),b9=!1;function Ey(){if(!b9)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),b9=!0}var D9=(y)=>{return y===L0},ey=(y,x)=>({get(h,l){switch(l){case"value":return x===L0?h1(C1,y):x.valueOf?x.valueOf():x;case"path":return y;case"touch":return()=>A1(y);case"observe":return(i)=>{let C=E2(y,i);return()=>a2(C)};case"bind":return(i,C,k)=>{Fy()(i,y,C,k)};case"on":{let i=x===L0?h1(C1,y):x.valueOf?x.valueOf():x;return(C,k)=>Xy()(C,k,i)}case"binding":return(i)=>({bind:{value:y,binding:i}});case"listBinding":return(i=({span:k})=>k({bindText:"^"}),C={})=>{let k=C.virtual?.itemsPerRow??1,g=[];for(let w=0;w<k;w++)g.push(i(p,V8(),w));return[{bindList:{value:y,...C}},p.template(...g)]};case"listFind":case"listUpdate":case"listRemove":return ty(y,Array.isArray(x)?x:[])[l];case"take":return(...i)=>{let C=i[i.length-1],k=i.slice(0,-1).map((g)=>typeof g==="string"?g:g[c1]);return{[M0]:!0,paths:[y,...k],transform:C}}}return},set(h,l,i){if(l==="value"){if(i=J(i),J(E[y])!==i&&t2(C1,y,i))A1(y);return!0}return!1}}),T2=(y,x)=>new Proxy(x,ey(y,x)),d9=new Set(["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"]),S9=new Map([[c1,"path"],["xinPath","path"],["tosiPath","path"],[K2,"value"],["xinValue","value"],["tosiValue","value"],[wy,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[zy,"on"],["xinOn","on"],["tosiOn","on"],[By,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),a1=(y,x)=>({get(h,l){if((l==="tosi"||l===Y5)&&x)return T2(y,h);if(D9(h)){let w=()=>h1(C1,y);switch(l){case"valueOf":case"toJSON":return()=>w();case Symbol.toPrimitive:return(V)=>{let A=w();if(V==="number")return Number(A);if(V==="string")return String(A);return A};case"toString":return()=>String(w())}if(d9.has(l))return T2(y,h)[l];let B=S9.get(l);if(B!==void 0)return Ey(),T2(y,h)[B];let j=w();if(j!=null){let V=Object(j);if(l in V){let A=V[l];return typeof A==="function"?A.bind(V):A}}return}if(x&&(l==="valueOf"||l==="toJSON"))return()=>h.valueOf?h.valueOf():h;if(x&&!(l in h)&&d9.has(l))return T2(y,h)[l];let i=S9.get(l);if(i!==void 0)return T2(y,h)[i];if(typeof l==="symbol")return h[l];let C=Object.getOwnPropertyDescriptor(h,l);if(C&&!C.configurable&&!C.writable&&"value"in C)return C.value;let k=l,g=k.match(/^([^.[]+)\.(.+)$/)??k.match(/^([^\]]+)(\[.+)/)??k.match(/^(\[[^\]]+\])\.(.+)$/)??k.match(/^(\[[^\]]+\])\[(.+)$/);if(g!==null){let[,w,B]=g,j=M1(y,w),V=J(h1(h,w));return V!==null&&typeof V==="object"?new Proxy(V,a1(j,x))[B]:V}if(k.startsWith("[")&&k.endsWith("]"))k=k.substring(1,k.length-1);if(!Array.isArray(h)&&h[k]!==void 0||Array.isArray(h)&&k.includes("=")){let w;if(k.includes("=")){let[B,j]=k.split("=");w=h.find((V)=>`${h1(V,B)}`===j)}else w=h[k];if(w instanceof Object){w=J(w);let B=M1(y,k);return new Proxy(w instanceof Function?w.bind(h):w,a1(B,x))}else return x?i5(w,M1(y,k)):w}else if(Array.isArray(h)){let w=h[k];return typeof w==="function"?(...B)=>{let j=B.map((A)=>J(A)),V=w.apply(h,j);if(ny.includes(k))A1(y);if(V!=null&&typeof V==="object"){if(k==="find"||k==="findLast"||k==="at"){let A=h.indexOf(V);if(A!==-1)return new Proxy(V,a1(M1(y,String(A)),x))}}return V}:typeof w==="object"?new Proxy(J(w),a1(M1(y,k),x)):x?i5(w,M1(y,k)):w}else{let w=h[k];if(w!==null&&typeof w==="object")w=J(w);return x?i5(w,M1(y,k)):w}},set(h,l,i){if(i=J(i),i!==null&&typeof i==="object")if(Array.isArray(i))for(let k=0;k<i.length;k++)i[k]=J(i[k]);else for(let k of Object.keys(i))i[k]=J(i[k]);let C=l===K2||l==="xinValue"||l==="tosiValue"||l==="value"&&(D9(h)||x)?y:M1(y,l);if(uy&&!my(C))throw Error(`setting invalid path ${C}`);if(J(E[C])!==i&&t2(C1,C,i))A1(C);return!0}}),Z5=(y,x)=>{let h=typeof x==="function"?x:E[x];if(typeof h!=="function")throw Error(`observe expects a function or path to a function, ${x} is neither`);return E2(y,h)},E=new Proxy(C1,a1("",!1));Wy(E);var P1=new Proxy(C1,a1("",!0)),yx=16,xx=100;function I9(y,x){let h=Array.from(y.querySelectorAll(p2));if(y.matches(p2))h.unshift(y);for(let l of h){let i=I1.get(l);for(let C of i){if(C.path.startsWith("^"))C.path=`${x}${C.path.substring(1)}`;if(C.binding.toDOM!=null)C.binding.toDOM(l,E[C.path])}}}class P8{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(y,x,h={}){if(this.boundElement=y,this.itemToElement=new WeakMap,h.idPath!=null){let g=q1(x);if(g!=null)jy(g,h.idPath)}let l=h.virtual?.itemsPerRow??1,i=Array.from(y.children).find((g)=>g instanceof HTMLTemplateElement),C=null;if(i!=null){let g=l;if(i.content.children.length<1||i.content.children.length!==g)throw Error(`ListBinding expects a template with exactly ${g} child element(s)`);this.templates=Array.from(i.content.children).map((w)=>u2(w)),C=i.nextElementSibling,i.remove()}else if(y.children.length===1)this.templates=[y.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=h;let k=y.namespaceURI;if(this.isNamespaced=k==="http://www.w3.org/2000/svg"||k==="http://www.w3.org/1998/Math/MathML",this.isNamespaced)this.listTop=null,this.listBottom=null;else if(this.listTop=document.createElement("div"),this.listBottom=document.createElement("div"),this.listTop.classList.add("virtual-list-padding"),this.listBottom.classList.add("virtual-list-padding"),this.listTop.setAttribute("role","presentation"),this.listBottom.setAttribute("role","presentation"),this.listTop.setAttribute("aria-hidden","true"),this.listBottom.setAttribute("aria-hidden","true"),C!=null)this.boundElement.insertBefore(this.listTop,C),this.boundElement.insertBefore(this.listBottom,C);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(l>1){this.boundElement.classList.add("tosi-virtual-grid");let g=this.boundElement.style;if(g!=null)g.setProperty("--tosi-columns",String(l)),g.display=g.display||"grid",g.gridTemplateColumns=g.gridTemplateColumns||"repeat(var(--tosi-columns), 1fr)";if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.gridColumn="1 / -1",this.listBottom.style.gridColumn="1 / -1"}if(h.virtual!=null&&!this.boundElement.getAttribute("role"))this.boundElement.setAttribute("role",l>1?"grid":"list");if(this.boundElement[I0]=this,this.isNamespaced&&h.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&h.virtual!=null)if(K5.observe(this.boundElement),this._update=U2(()=>{this.update(this.array,!0)},yx),this.boundElement.addEventListener("resize",this._update),h.virtual.scrollContainer==="window")window.addEventListener("scroll",this._update),window.addEventListener("resize",this._update);else this.boundElement.addEventListener("scroll",this._update)}filteredArray(){if(this._filteredCache!=null)return this._filteredCache;let{hiddenProp:y,visibleProp:x}=this.options,h=this.array;if(y!==void 0)h=h.filter((l)=>l[y]!==!0);if(x!==void 0)h=h.filter((l)=>l[x]===!0);if(this.options.filter&&this.needle!==void 0)h=this.options.filter(h,this.needle);return this._filteredCache=h,h}visibleSlice(){let{virtual:y}=this.options,x=this.filteredArray(),h=0,l=x.length-1,i=0,C=0;if(y!=null&&this.boundElement instanceof HTMLElement){let k=this.boundElement.offsetWidth,g=y.scrollContainer==="window",w,B;if(g){w=window.innerHeight;let A=this.boundElement.getBoundingClientRect();B=Math.max(0,-A.top)}else w=this.boundElement.offsetHeight,B=this.boundElement.scrollTop;let j=y.width!=null?Math.max(1,Math.floor(k/y.width)):y.visibleColumns??1,V=Math.ceil(x.length/j);if(y.minHeight!=null){let A=y.minHeight,O=Math.ceil(w/A)+(y.rowChunkSize||1),G=j*O,W=V*A,F=Math.max(0,W-w),Y=F>0?Math.min(1,Math.max(0,B/F)):0,$=Math.max(0,V-O+1),R=Y*$,r=Math.floor(R);if(y.rowChunkSize)r-=r%y.rowChunkSize;return h=r*j,l=h+G-1,i=B,C=Math.max(0,W-B-w),{items:x,firstItem:h,lastItem:l,topBuffer:i,bottomBuffer:C,interpolation:{t:Y,position:R,scrollTop:B,viewportHeight:w,totalScrollHeight:W,rowHeight:y.height}}}else{let A=Math.ceil(w/y.height)+(y.rowChunkSize||1),O=j*A,G=Math.floor(B/y.height);if(G>V-A+1)G=Math.max(0,V-A+1);if(y.rowChunkSize)G-=G%y.rowChunkSize;h=G*j,l=h+O-1,i=G*y.height,C=Math.max((V-A)*y.height-i,0)}}return{items:x,firstItem:h,lastItem:l,topBuffer:i,bottomBuffer:C}}needle;filter=U2((y)=>{if(this.needle!==y)this.needle=y,this.update(this.array)},xx);update(y,x){if(y==null)y=[];if(this.array=y,!x)this._filteredCache=void 0;let{hiddenProp:h,visibleProp:l}=this.options,i=q1(y),C=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",C.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(C.items.length));let k=this._previousSlice,{firstItem:g,lastItem:w,topBuffer:B,bottomBuffer:j}=C,V=h===void 0&&l===void 0&&x===!0&&k!=null&&g===k.firstItem&&w===k.lastItem;if(V&&C.interpolation==null&&B===k.topBuffer&&j===k.bottomBuffer)return;if(V&&C.interpolation!=null){this._updateInterpolatedBuffers(C);return}this._previousSlice=C;let A=0,O=0,G=0,{idPath:W}=this.options,F=this.options.virtual?.itemsPerRow??1,Y;if(W!=null){Y=new Set;for(let N=g;N<=w;N++){let Z=C.items[N];if(Z!==void 0)Y.add(String(Z[W]))}}let $=new Set;for(let N of Array.from(this.boundElement.children)){if(N===this.listTop||N===this.listBottom)continue;let Z=N[G2];if(Z==null)continue;else if(Z===!0)N.remove(),A++;else{if($.has(Z))continue;let X;if(W!=null)X=!Y.has(String(Z[W]));else{let d=C.items.indexOf(Z);X=d<g||d>w}if(X){$.add(Z);let d=this.itemToElement.get(Z);if(d!=null)for(let S of d)S.remove();else N.remove();if(this.itemToElement.delete(Z),W!=null)this.idToElement.delete(String(Z[W]));A++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(B)+"px",this.listBottom.style.height=String(j)+"px";let R=[];for(let N=g;N<=w;N++){let Z=C.items[N];if(Z===void 0)continue;let X=this.itemToElement.get(J(Z));if(X==null&&W!=null){let d=String(Z[W]);if(X=this.idToElement.get(d),X!=null){let S=J(Z);this.itemToElement.set(S,X);for(let y1 of X)y1[G2]=S}}if(X==null){G++;let d=J(Z);if(X=this.templates.map((S)=>u2(S)),typeof Z==="object")this.itemToElement.set(d,X);for(let S of X)S[G2]=typeof Z==="object"?d:!0;for(let S of X)if(this.listBottom!=null)this.boundElement.insertBefore(S,this.listBottom);else this.boundElement.append(S);if(W!=null){let S=Z[W],y1=`${i}[${W}=${S}]`;for(let d2 of X)I9(d2,y1);this.idToElement.set(String(S),X)}else{let S=`${i}[${N}]`;for(let y1 of X)I9(y1,S)}}if(this.options.virtual!=null){let d=String(N+1);if(F>1)for(let S=0;S<X.length;S++){let y1=X[S];y1.setAttribute("role","gridcell"),y1.setAttribute("aria-rowindex",d),y1.setAttribute("aria-colindex",String(S+1))}else for(let S of X)S.setAttribute("role","listitem"),S.setAttribute("aria-rowindex",d)}R.push(...X)}let r=null;for(let N of R){if(N.previousElementSibling!==r)if(O++,r?.nextElementSibling!=null)this.boundElement.insertBefore(N,r.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(N,this.listBottom);else this.boundElement.append(N);r=N}if(C.interpolation!=null)this._updateInterpolatedBuffers(C);if(r0.perf)console.log(i,"updated",{removed:A,created:G,moved:O})}_updateInterpolatedBuffers(y){let{t:x,position:h,scrollTop:l,viewportHeight:i,totalScrollHeight:C,rowHeight:k}=y.interpolation,g=0;for(let V of Array.from(this.boundElement.children)){if(V===this.listTop||V===this.listBottom)continue;g+=V.offsetHeight||k}let w=l,B=l+i-g,j=Math.max(0,x*B+(1-x)*w-h%1*k);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(j)+"px",this.listBottom.style.height=String(Math.max(0,C-j-g))+"px"}}var s2=(y,x,h)=>{let l=y[I0];if(x&&l===void 0)l=new P8(y,x,h),y[I0]=l;return l},$5=(y)=>{let x;while(!(x=y[G2])&&y&&y.parentElement)y=y.parentElement;return x?{element:y,item:x}:void 0},C2=(y)=>{let x=$5(y);return x?x.item:void 0},hx=(y)=>{let x=$5(y);if(!x)return console.error("deleteListItem failed, element is not part of a list instance",y),!1;let h=s2(x.element.parentElement);if(!h.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",y.parentElement,h),!1;let l=h.array.indexOf(x.item);if(l>-1)return h.array.splice(l,1),!0;return!1},lx={start:"start",middle:"center",end:"end",nearest:"nearest"},ix=(y,x,h={})=>{let l=s2(y);if(l==null)return console.error("scrollListItemIntoView failed, element has no list binding",y),!1;let{position:i="middle",behavior:C="smooth"}=h,k=l.filteredArray(),g=J(x)??x,w=k.indexOf(g);if(w===-1)return console.error("scrollListItemIntoView failed, item not found in list",x),!1;let{virtual:B}=l.options;if(B!=null&&y instanceof HTMLElement){let j=B.width!=null?Math.max(1,Math.floor(y.offsetWidth/B.width)):B.visibleColumns??1,V=Math.floor(w/j),A=B.minHeight??B.height,O=Math.ceil(k.length/j),G=B.scrollContainer==="window",W=G?window.innerHeight:y.offsetHeight,F;if(B.minHeight!=null){let Y=Math.ceil(W/A)+(B.rowChunkSize||1),$=O*A,R=Math.max(0,$-W),r=Math.max(1,O-Y+1),N=V/r;switch(i){case"start":F=N*R;break;case"end":F=Math.max(0,(V-Y+1)/r*R);break;case"nearest":{let Z=G?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop,X=R>0?Z/R:0,d=Math.floor(X*r);if(V<d)F=N*R;else if(V>=d+Y)F=Math.max(0,(V-Y+1)/r*R);else return!0;break}default:{let Z=V-Math.floor(Y/2);F=Math.max(0,Z)/r*R}}}else{let Y=V*B.height;switch(i){case"start":F=Y;break;case"end":F=Y-W+B.height;break;case"nearest":{let $=G?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop;if(Y<$)F=Y;else if(Y+B.height>$+W)F=Y-W+B.height;else return!0;break}default:F=Y-(W-B.height)/2}}if(F=Math.max(0,F),G){let Y=y.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Y+F,behavior:C})}else y.scrollTo({top:F,behavior:C})}else{let j=l.itemToElement.get(g);if(j==null||j.length===0)return console.error("scrollListItemIntoView failed, no DOM element found for item",x),!1;j[0].scrollIntoView({block:lx[i]??"center",behavior:C})}return!0},{document:m2,MutationObserver:r9}=globalThis,c5=(y,x)=>{let h=I1.get(y);if(h==null)return;for(let l of h){let{binding:i,options:C}=l,{path:k}=l,{toDOM:g}=i;if(g!=null){if(k.startsWith("^")){let w=C2(y);if(w!=null&&w[c1]!=null)k=l.path=`${w[c1]}${k.substring(1)}`;else{if(y instanceof HTMLElement)console.warn(`Unresolved relative binding "${k}" —`,y,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(x==null||k.startsWith(x))g(y,n0()[k],C)}}};if(r9!=null)new r9((y)=>{y.forEach((x)=>{Array.from(x.addedNodes).forEach((h)=>{if(h instanceof Element)Array.from(h.querySelectorAll(p2)).forEach((l)=>c5(l))})})}).observe(m2.body,{subtree:!0,childList:!0});E2(()=>!0,(y)=>{let x=Array.from(m2.querySelectorAll(p2));for(let h of x)c5(h,y)});var o9=(y)=>{let x=y.target?.closest(p2);while(x!=null){let h=I1.get(x);for(let l of h){let{binding:i,path:C}=l,{fromDOM:k}=i;if(k!=null){let g;try{g=k(x,l.options)}catch(w){throw console.error("Cannot get value from",x,"via",l),Error("Cannot obtain value fromDOM")}if(g!=null){let w=n0(),B=w[C];if(B==null)w[C]=g;else{let j=B[c1]!=null?B[K2]:B,V=g[c1]!=null?g[K2]:g;if(j!==V)w[C]=V}}}}x=x.parentElement.closest(p2)}};if(globalThis.document!=null)m2.body.addEventListener("change",o9,!0),m2.body.addEventListener("input",o9,!0);function Cx(y,x,h,l){let{paths:i,transform:C}=x,{toDOM:k}=h;if(k==null)return y;let g=null,w={toDOM(j,V,A){let O=n0(),G=i.map((F)=>O[F]);if(g!==null&&G.every((F,Y)=>F===g[Y]))return;g=G;let W=C(...G);k(j,W,A)},fromDOM:h.fromDOM};y.classList?.add(W5);let B=I1.get(y);if(B==null)B=[],I1.set(y,B);for(let j of i)B.push({path:j,binding:w,options:l});if(!i[0].startsWith("^"))A1(i[0]);return y}function S1(y,x,h,l){if(y instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(x!=null&&typeof x==="object"&&x[M0])return Cx(y,x,h,l);let i;if(typeof x==="object"&&x[c1]===void 0&&l===void 0){let{value:g}=x;i=typeof g==="string"?g:g[c1],l=x,delete l.value}else i=typeof x==="string"?x:x[c1];if(i==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:C}=h;y.classList?.add(W5);let k=I1.get(y);if(k==null)k=[],I1.set(y,k);if(k.push({path:i,binding:h,options:l}),C!=null&&!i.startsWith("^"))A1(i);if(l?.filter&&l?.needle)S1(y,l.needle,{toDOM(g,w){console.log({needle:w}),g[I0]?.filter(w)}});return y}var T9=new Set,kx=(y)=>{let x=y?.target?.closest(X9),h=!1,l=new Proxy(y,{get(C,k){if(k==="stopPropagation")return()=>{y.stopPropagation(),h=!0};else{let g=C[k];return typeof g==="function"?g.bind(C):g}}}),i=new Set;while(!h&&x!=null){let C=n2.get(x)[y.type]||i;for(let k of C){if(typeof k==="function")k(l);else{let g=n0()[k];if(typeof g==="function")g(l);else throw Error(`no event handler found at path ${k}`)}if(h)continue}x=x.parentElement!=null?x.parentElement.closest(X9):null}};function Q2(y,x,h){let l=n2.get(y);if(y.classList.add(u9),l==null)l={},n2.set(y,l);if(!l[x])l[x]=new Set;if(l[x].add(h),!T9.has(x))T9.add(x),m2.body.addEventListener(x,kx,!0);return()=>{l[x].delete(h)}}Yy(S1,Q2);function A8(y,x){if(!y.internals)return;let h={},l="";if(y.hasAttribute("required")&&x==="")h.valueMissing=!0,l="Please fill out this field.";let i=y.getAttribute("minlength");if(i&&x.length<parseInt(i,10))h.tooShort=!0,l=`Please use at least ${i} characters.`;let C=y.getAttribute("maxlength");if(C&&x.length>parseInt(C,10))h.tooLong=!0,l=`Please use no more than ${C} characters.`;let k=y.getAttribute("pattern");if(k&&x!=="")try{if(!new RegExp(`^(?:${k})$`).test(x))h.patternMismatch=!0,l="Please match the requested format."}catch{}if(Object.keys(h).length>0)y.internals.setValidity(h,l,y);else y.internals.setValidity({})}var gx=0;function g5(){return`custom-elt${(gx++).toString(36)}`}var L9=0,w5=null;function wx(){if(w5===null)w5=new MutationObserver((y)=>{let x=new Set;for(let h of y)if(h.type==="attributes"&&h.target instanceof K){let l=h.target,i=i8(h.attributeName);if(l._legacyTrackedAttrs?.has(i))x.add(l)}for(let h of x)h.queueRender(!1)});return w5}var M2={};function Bx(y,x){let h=M2[y],l=O2(x).replace(/:host\(([^)]+)\)/g,`${y}$1`).replace(/:host\b/g,y);M2[y]=h?h+`
13
- `+l:l}function zx(y){if(M2[y])document.head.append(p.style({id:y+"-component"},M2[y]));delete M2[y]}class K extends HTMLElement{static elements=p;static _elementCreator;static initAttributes;static formAssociated;static preferredTagName;static shadowStyleSpec;static lightStyleSpec;static extends;internals;get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(y){if(this.internals)if(y)this.internals.setValidity({customError:!0},y);else this.internals.setValidity({})}setValidity(y,x,h){this.internals?.setValidity(y,x,h)}setFormValue(y,x){this.internals?.setFormValue(y,x)}static get observedAttributes(){let y=this.initAttributes;if(y)return["hidden",...Object.keys(y).map(U1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=p.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;_pendingAttrOps;static StyleNode(y){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),p.style(O2(y))}static elementCreator(y={}){let x=this;if(!Object.prototype.hasOwnProperty.call(x,"_elementCreator")){if(y.tag!==void 0)j1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(y.styleSpec!==void 0)j1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(y.extends!==void 0)j1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let h=y.tag??x.preferredTagName;if(h==null)if(typeof x.name==="string"&&x.name!==""){if(h=U1(x.name),h.startsWith("-"))h=h.slice(1)}else h=g5();if(customElements.get(h)!=null)console.warn(`${h} is already defined`);if(h.match(/\w+(-\w+)+/)==null)console.warn(`${h} is not a legal tag for a custom-element`),h=g5();while(customElements.get(h)!==void 0)h=g5();x._tagName=h;let l=y.styleSpec??x.lightStyleSpec;if(l!==void 0)Bx(h,l);let i=y.extends??x.extends,C=i?{extends:i}:void 0;window.customElements.define(h,this,C),x._elementCreator=p[h]}return x._elementCreator}initAttributes(...y){if(j1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let l of y)this._legacyTrackedAttrs.add(l);wx().observe(this,{attributes:!0});let x={},h={};y.forEach((l)=>{x[l]=i2(this[l]);let i=U1(l);Object.defineProperty(this,l,{enumerable:!1,get(){if(typeof x[l]==="boolean")return this.hasAttribute(i);else if(this.hasAttribute(i))return typeof x[l]==="number"?parseFloat(this.getAttribute(i)):this.getAttribute(i);else if(h[l]!==void 0)return h[l];else return x[l]},set(C){if(typeof x[l]==="boolean"){if(C!==this[l]){if(C)this.setAttribute(i,"");else this.removeAttribute(i);this.queueRender()}}else if(typeof x[l]==="number"){if(C!==parseFloat(this[l]))this.setAttribute(i,C),this.queueRender()}else if(typeof C==="object"||`${C}`!==`${this[l]}`){if(C===null||C===void 0||typeof C==="object")this.removeAttribute(i);else this.setAttribute(i,C);this.queueRender(),h[l]=C}}})})}initValue(){let y=Object.getOwnPropertyDescriptor(this,"value");if(y===void 0||y.get!==void 0||y.set!==void 0)return;let x=this.hasAttribute("value")?this.getAttribute("value"):i2(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return x},set(h){if(x!==h)x=h,this._valueChanged=!0,this.queueRender(!0)}})}_parts;get parts(){let y=this.shadowRoot!=null?this.shadowRoot:this;if(this._parts==null)this._parts=new Proxy({},{get(x,h){if(x[h]===void 0){let l=y.querySelector(`[part="${h}"]`);if(l==null)l=y.querySelector(h);if(l==null)throw Error(`elementRef "${h}" does not exist!`);l.removeAttribute("data-ref"),x[h]=l}return x[h]}});return this._parts}attributeChangedCallback(y,x,h){let l=i8(y);if(!this._legacyTrackedAttrs?.has(l))this.queueRender(!1)}constructor(){super();if(L9+=1,this._installAttributeQueue(),this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let y=this.constructor.initAttributes;if(y)this._setupAttributeAccessors(y);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${L9}`,this._value=i2(this.defaultValue)}_installAttributeQueue(){let y=this.constructor.initAttributes;if(!y)return;let x=new Set(Object.keys(y).map(U1)),h=[];this._pendingAttrOps=h;let l=HTMLElement.prototype;this.setAttribute=(i,C)=>{if(x.has(i))h.push(["set",i,String(C)]);else l.setAttribute.call(this,i,C)},this.removeAttribute=(i)=>{if(x.has(i))h.push(["remove",i]);else l.removeAttribute.call(this,i)},queueMicrotask(()=>this._drainPendingAttrOps())}_drainPendingAttrOps(){let y=this._pendingAttrOps;if(y===void 0)return;this._pendingAttrOps=void 0,delete this.setAttribute,delete this.removeAttribute;for(let x of y)if(x[0]==="set"){if(!this.hasAttribute(x[1]))this.setAttribute(x[1],x[2])}else this.removeAttribute(x[1])}_setupAttributeAccessors(y){if(!this._attrValues)this._attrValues=new Map;for(let x of Object.keys(y)){let h=U1(x),l=y[x];if(x==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof l==="object"&&l!==null){console.warn(`${this.tagName}: initAttributes.${x} is an object. Use a regular property instead.`);continue}let i=this,C=!1;while(i){let k=Object.getOwnPropertyDescriptor(i,x);if(k){if(!k.configurable||k.get||k.set){C=!0;break}break}i=Object.getPrototypeOf(i)}if(C)continue;Object.defineProperty(this,x,{enumerable:!1,get:()=>{if(typeof l==="boolean"){if(this.hasAttribute(h))return!0;if(this._attrValues.has(x))return this._attrValues.get(x);return!1}else if(this.hasAttribute(h))return typeof l==="number"?parseFloat(this.getAttribute(h)):this.getAttribute(h);else if(this._attrValues.has(x))return this._attrValues.get(x);else return l},set:(k)=>{if(typeof l==="boolean"){if(k!==this[x]){if(k)this.setAttribute(h,"");else this.removeAttribute(h);this.queueRender(),this._attrValues.set(x,!!k)}}else if(typeof l==="number"){if(k!==parseFloat(this[x]))this.setAttribute(h,k),this.queueRender(),this._attrValues.set(x,k)}else if(typeof k==="object"||`${k}`!==`${this[x]}`){if(k===null||k===void 0||typeof k==="object")this.removeAttribute(h);else this.setAttribute(h,k);this.queueRender(),this._attrValues.set(x,k)}}})}}connectedCallback(){if(this._drainPendingAttrOps(),zx(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");if(this.onResize!==void 0){if(K5.observe(this),this._onResize==null)this._onResize=this.onResize.bind(this);this.addEventListener("resize",this._onResize)}if(this.value!=null&&this.getAttribute("value")!=null)this._value=this.getAttribute("value");if(this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this.queueRender()}disconnectedCallback(){K5.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(y){if(y)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(y){if(this.value!==void 0&&typeof y==="string")this.value=y}_changeQueued=!1;_renderQueued=!1;queueRender(y=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=y;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(h8(this,"change"),this.internals&&this.value!==void 0)this.internals.setFormValue(this.value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;hydrate(){if(!this._hydrated){this.initValue();let y=typeof this.content!=="function",x=typeof this.content==="function"?this.content(p):this.content;if(Array.isArray(x)){let C={};x=x.filter((k)=>{if(k instanceof Node||typeof k==="string"||typeof k==="number"||q1(k))return!0;return Object.assign(C,k),!1});for(let k of Object.keys(C))X5(this,k,C[k])}let h=this.constructor,l=h.shadowStyleSpec??h.styleSpec;if(h.styleSpec&&!h.shadowStyleSpec)j1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:i}=h;if(l)i=h.styleNode=p.style(O2(l)),delete h.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),i=this.styleNode;if(i){let C=this.attachShadow({mode:"open"});C.appendChild(i.cloneNode(!0)),R9(C,x,y)}else if(x!==null){let C=Array.from(this.childNodes);R9(this,x,y),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==void 0;let k=Array.from(this.querySelectorAll("slot"));if(k.length>0)k.forEach(a0.replaceSlot);if(C.length>0){let g={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((w)=>{g[w.name]=w}),C.forEach((w)=>{let B=g[""],j=w instanceof Element?g[w.slot]:B;(j!==void 0?j:B).append(w)})}}this._hydrated=!0}}render(){if(this._valueChanged&&this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this._valueChanged=!1}validateValue(){if(!this.internals||this.value===void 0)return;let y=typeof this.value==="string"?this.value:String(this.value);A8(this,y)}}class a0 extends K{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(y){let x=document.createElement("tosi-slot");if(y.name!=="")x.setAttribute("name",y.name);y.replaceWith(x)}}var jx=a0.elementCreator();class _8 extends K{static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();j1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=a0.replaceSlot}var qx=_8.elementCreator(),Vx=(y=()=>!0)=>{let x=localStorage.getItem("xin-state");if(x!=null){let l=JSON.parse(x);for(let i of Object.keys(l).filter(y))if(E[i]!==void 0)Object.assign(E[i],l[i]);else E[i]=l[i]}let h=e2(()=>{let l={},i=J(E);for(let C of Object.keys(i).filter(y))l[C]=i[C];localStorage.setItem("xin-state",JSON.stringify(l)),console.log("xin state saved to localStorage")},500);Z5(y,h)},Px="tosijs-share",Ax="tosijs-share",L2="shared",_x=1,U5=new Set,O5=new Set,B5=new Map,l2=null,s5="",S0=null,Gx=null;function M9(){if(S0!=null)return Promise.resolve(S0);return new Promise((y,x)=>{let h=indexedDB.open(Ax,_x);h.onupgradeneeded=()=>{h.result.createObjectStore(L2)},h.onsuccess=()=>{S0=h.result,y(S0)},h.onerror=()=>x(h.error)})}var px={async get(y){let x=await M9();return new Promise((h,l)=>{let i=x.transaction(L2,"readonly").objectStore(L2).get(y);i.onsuccess=()=>h(i.result),i.onerror=()=>l(i.error)})},async set(y,x){let h=await M9();return new Promise((l,i)=>{let C=h.transaction(L2,"readwrite");C.objectStore(L2).put(x,y),C.oncomplete=()=>l(),C.onerror=()=>i(C.error)})}};function G8(){return Gx??px}function Kx(y){return y!=null&&y.type==="tosijs-share"&&typeof y.path==="string"}function p8(y){for(let x of U5)if(y===x||y.startsWith(x+"."))return x;return}function Ux(y){for(let x of O5)if(y===x||y.startsWith(x+"."))return!0;return!1}function Ox(y,x){O5.add(y),t2(C1,y,x),A1(y),F5().then(()=>{O5.delete(y)})}function sx(){if(l2!=null)return l2;return s5=crypto.randomUUID(),l2=new BroadcastChannel(Px),l2.onmessage=(y)=>{let x=y.data;if(!Kx(x))return;if(x.origin===s5)return;if(p8(x.path)===void 0)return;Ox(x.path,x.value)},l2}function Qx(y,x){if(l2==null)return;let h={type:"tosijs-share",path:y,value:x,origin:s5};l2.postMessage(h)}function Wx(y){if(!B5.has(y))B5.set(y,e2(()=>{let x=h1(C1,y);G8().set(y,x)},500));B5.get(y)()}async function Yx(...y){if(typeof BroadcastChannel>"u")return{restored:[]};sx();let x=[],h=G8();for(let l of y){let i=typeof l==="string"?l:q1(l);if(i===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(U5.has(i))continue;U5.add(i);let C=await h.get(i);if(C!==void 0)t2(C1,i,C),A1(i),x.push(l);else{let k=h1(C1,i);await h.set(i,k)}E2((k)=>k===i||k.startsWith(i+"."),(k)=>{if(Ux(k))return;let g=p8(k);if(g===void 0)return;let w=h1(C1,k);Qx(k,w),Wx(g)})}return{restored:x}}var Q5=new Set;function n9(y,x){for(let h of y)if(x===h||x.startsWith(h+"."))return h;return}function Fx(y){for(let x of Q5)if(y===x||y.startsWith(x+"."))return!0;return!1}function Xx(y,x){Q5.add(y),t2(C1,y,x),A1(y),F5().then(()=>{Q5.delete(y)})}async function Nx(y,x,...h){let l=new Set,i=[],C=[],k=x.throttleInterval??100;await y.connect();let g=U2(()=>{if(i.length===0)return;let w=i.splice(0);y.send(w)},k);y.onReceive((w)=>{for(let B of w){if(n9(l,B.path)===void 0)continue;Xx(B.path,B.value)}});for(let w of h){let B=typeof w==="string"?w:q1(w);if(B===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");l.add(B);let j=E2((V)=>V===B||V.startsWith(B+"."),(V)=>{if(Fx(V))return;if(n9(l,V)===void 0)return;let A=h1(C1,V);i.push({path:V,value:A}),g()});C.push(j)}return{disconnect(){for(let w of C)a2(w);C.length=0,l.clear(),i.length=0,y.disconnect()}}}var K8="1.6.4";function e(y){return Object.assign(P1,y),P1}function R5(y){return j1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),e(y)}var vx=new FinalizationRegistry((y)=>{y()});function Zx(y,x){let h=m9();P1[h]=y;let l=P1[h],i=()=>{delete E[h]};if(x)vx.register(x,i);return[l,i]}function U8(y,x=!1){if(x)return j1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),R5(y);return Object.keys(y).forEach((h)=>{E[h]=y[h]}),E}var $x={};async function J5(y,x){let h=await x(y,{Color:Q,Component:K,elements:p,svgElements:u0,mathML:q8,varDefault:P,vars:z,xin:E,boxed:P1,xinProxy:U8,boxedProxy:R5,tosi:e,makeComponent:J5,bind:S1,on:Q2,version:K8}),{type:l}=h;l.preferredTagName=y;let i=h.lightStyleSpec??h.styleSpec;if(i)l.lightStyleSpec=i;let C={type:l,creator:l.elementCreator()};return $x[y]=C,C}var m0={":host":{display:"none"}},z5={},cx=(y)=>import(y);class t0 extends K{static preferredTagName="tosi-blueprint";static lightStyleSpec=m0;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(y)=>{};async packaged(){let{tag:y,src:x,property:h}=this,l=`${y}.${h}:${x}`;if(!this.loaded){if(z5[l]===void 0)z5[l]=cx(x).then((i)=>{let C=i[h];return J5(y,C)});else console.log(`using cached ${y} with signature ${l}`);this.loaded=await z5[l],this.blueprintLoaded(this.loaded)}return this.loaded}}var Rx=t0.elementCreator();class f5 extends K{static preferredTagName="tosi-loader";static lightStyleSpec=m0;allLoaded=()=>{};async load(){let y=Array.from(this.querySelectorAll("tosi-blueprint, xin-blueprint")).filter((x)=>x.src).map((x)=>x.packaged());await Promise.all(y),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Jx=f5.elementCreator();class O8 extends t0{static preferredTagName="xin-blueprint";static lightStyleSpec=m0;constructor(){super();j1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var fx=O8.elementCreator();class s8 extends K{static preferredTagName="xin-loader";static lightStyleSpec=m0;allLoaded=()=>{};constructor(){super();j1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){let y=Array.from(this.querySelectorAll("xin-blueprint")).filter((x)=>x.src).map((x)=>x.packaged());await Promise.all(y),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Hx=s8.elementCreator();var H5={};class W2 extends K{static preferredTagName="tosi-ab";static set conditions(y){Object.assign(H5,y);for(let x of[...W2.instances])x.queueRender()}static initAttributes={condition:"",not:!1};static instances=new Set;connectedCallback(){super.connectedCallback(),W2.instances.add(this)}disconnectedCallback(){super.disconnectedCallback(),W2.instances.delete(this)}render(){if(this.condition!==""&&(this.not?H5[this.condition]!==!0:H5[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var bx=W2.elementCreator();var E0={};function _1(y,x){if(E0[y]===void 0){if(x!==void 0){let l=globalThis[x];E0[y]=Promise.resolve({[x]:l})}let h=p.script({src:y});document.head.append(h),E0[y]=new Promise((l)=>{h.onload=()=>l(globalThis)})}return E0[y]}var b5={};function e0(y){if(b5[y]===void 0){let x=p.link({rel:"stylesheet",type:"text/css",href:y});document.head.append(x),b5[y]=new Promise((h)=>{x.onload=h})}return b5[y]}var k2={blueprint:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,7.5,15.5,7.5,17.5 C7.5,19.5,10.5,19.5,10.5,19.5"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,14.5 C18.5,14.5,21.5,15.5,21.5,17.5 C21.5,19.5,18.5,19.5,18.5,19.5"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M7,5.09 C7,3.94,7.9,3,9,3 C9,3,20,3,20,3 C21.1,3,22,3.94,22,5.09 C22,5.09,22,12.41,22,12.41 C22,13.56,21.1,14.5,20,14.5 C20,14.5,9,14.5,9,14.5 C7.9,14.5,7,13.56,7,12.41 C7,12.41,7,5.09,7,5.09 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14.5,5.5 C14.5,5.5,14.5,11.5,14.5,11.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16.5,7.5 C16.5,7.5,16.5,8.5,16.5,8.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,7.5 C12.5,7.5,12.5,8.5,12.5,8.5"/><g/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,21.5 C18.5,21.5,17.5,20.5,17.5,20.5 C17.5,20.5,16.5,21.5,16.5,21.5"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,21.5 C12.5,21.5,11.5,20.5,11.5,20.5 C11.5,20.5,10.5,21.5,10.5,21.5"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,18.5,14.5,18.5,14.5 C18.5,14.5,18.5,19.5,18.5,19.5 C18.5,19.5,10.5,19.5,10.5,19.5 C10.5,19.5,10.5,14.5,10.5,14.5 z"/><g><g><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,16.5 C14,16.5,16,16.5,16,16.5 C16,16.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:evenodd;stroke:none;" d="M3.59,8.5 C3.59,8.5,12.59,8.5,12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5 C14.53,19.5,5.53,19.5,5.53,19.5 C5.53,19.5,3.59,8.5,3.59,8.5 z"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,11.12,11.5,11.12,11.5 C11.12,11.5,2.12,11.5,2.12,11.5 C2.12,11.5,3.59,8.5,3.59,8.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.12,11.5 C4.12,11.5,5.53,19.5,5.53,19.5"/></g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M9.24,12.5 C10.75,12.5,12.2,13.73,12.46,15.24 C12.46,15.24,12.46,15.24,12.46,15.24 C12.68,16.49,11.85,17.5,10.6,17.5 C10.6,17.5,10.55,17.5,10.55,17.5 C10.17,17.5,9.92,17.81,9.98,18.19 C9.98,18.19,9.98,18.19,9.98,18.19 C10.21,19.47,9.36,20.5,8.08,20.5 C8.08,20.5,6.39,20.5,6.39,20.5 C5.1,20.5,3.87,19.45,3.64,18.16 C3.64,18.16,3.12,15.21,3.12,15.21 C2.86,13.71,3.86,12.5,5.35,12.5 C5.35,12.5,9.24,12.5,9.24,12.5 z"/></g></g></svg> ',earth:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,13.46 C5.1,16.52,4,20.13,4,24 C4,31.81,8.47,38.57,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 z"/><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C20.18,4.28,22.06,4,24,4 C27.57,4,30.92,4.93,33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C33.81,42.07,29.13,44,24,44 C21.03,44,18.22,43.35,15.69,42.2 C15.69,42.2,27,29,27,29 C27,29,27,25,27,25 C27,25,21,23,21,23 C21,23,15,19,15,19 C15,19,11,19,11,19 C11,19,11,13,11,13 C11,13,13,11,13,11 C13,11,15,15,15,15 C15,15,17,15,17,15 C17,15,17,9,17,9 C17,9,18.4,4.79,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C18.4,4.79,17,9,17,9 C17,9,17,15,17,15 C17,15,15,15,15,15 C15,15,13,11,13,11 C13,11,11,13,11,13 C11,13,11,19,11,19 C11,19,15,19,15,19 C15,19,21,23,21,23 C21,23,27,25,27,25 C27,25,27,29,27,29 C27,29,15.69,42.2,15.69,42.2 C15.46,42.09,15.23,41.98,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 C9.57,9.32,13.62,6.19,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C41.43,35.23,44,29.91,44,24 C44,16.52,39.9,10,33.82,6.57 z"/></g></g></g></svg> ',cmy:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#00ff00;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#000000;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#02fefe;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#fffe00;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#ff00ff;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',rgb:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#ff00ff;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#ffff00;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#ffffff;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#00ffff;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#00ff00;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',xrColor:'<svg class="color filled" viewBox="0 0 40 24"><g><g><g><path style="fill:#000000;fill-rule:evenodd;" d="M20,2 C19.99,2,19.98,2,19.98,2 C8.39,2,2,3.61,2,12 C2,18.41,5.32,22,10.54,22 C15.77,22,17.37,17.85,19.98,17.85 C19.98,17.85,19.99,17.85,20,17.85 C20.01,17.85,20.02,17.85,20.02,17.85 C22.63,17.85,24.23,22,29.46,22 C34.68,22,38,18.41,38,12 C38,3.61,31.61,2,20.02,2 C20.02,2,20.01,2,20,2 C20,2,20,2,20,2 z"/></g><path style="fill:#fbed21;fill-rule:evenodd;" d="M12.2,19.84 C15.79,19.39,17.07,16.46,19.07,16.46 C19.07,16.46,19.08,16.46,19.09,16.46 C19.09,16.46,19.1,16.46,19.11,16.46 C19.44,16.46,19.75,16.54,20.06,16.68 C20.37,16.54,20.68,16.46,21.01,16.46 C21.02,16.46,21.02,16.46,21.03,16.46 C21.04,16.46,21.04,16.46,21.05,16.46 C23.05,16.46,24.33,19.39,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M12.2,19.84 C12.52,19.87,12.86,19.89,13.21,19.89 C16.86,19.89,18.37,17.43,20.06,16.68 C19.75,16.54,19.44,16.46,19.11,16.46 C19.1,16.46,19.09,16.46,19.09,16.46 C19.08,16.46,19.07,16.46,19.07,16.46 C17.07,16.46,15.79,19.39,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M20.06,3.35 C20.37,3.35,20.69,3.35,21.01,3.35 C21.02,3.35,21.02,3.35,21.03,3.35 C21.03,3.35,21.03,3.35,21.03,3.35 C21.04,3.35,21.04,3.35,21.05,3.35 C30.64,3.35,35.92,4.68,35.92,11.62 C35.92,16.92,33.18,19.89,28.86,19.89 C28.53,19.89,28.22,19.87,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C20.06,3.35,20.06,3.35,20.06,3.35 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M20.06,16.68 C21.74,17.43,23.25,19.89,26.91,19.89 C27.26,19.89,27.59,19.87,27.92,19.84 C24.33,19.39,23.05,16.46,21.05,16.46 C21.04,16.46,21.04,16.46,21.03,16.46 C21.02,16.46,21.02,16.46,21.01,16.46 C20.68,16.46,20.37,16.54,20.06,16.68 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M12.2,19.84 C11.9,19.87,11.59,19.89,11.26,19.89 C6.94,19.89,4.19,16.92,4.19,11.62 C4.19,4.68,9.48,3.35,19.07,3.35 C19.07,3.35,19.08,3.35,19.09,3.35 C19.09,3.35,19.09,3.35,19.09,3.35 C19.09,3.35,19.1,3.35,19.11,3.35 C19.43,3.35,19.75,3.35,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/></g><g><path style="fill:#8cc63e;fill-rule:nonzero;" d="M22.55,8.63 C22.55,9.05,22.55,9.46,22.55,9.88 C22.54,10.25,22.85,10.56,23.2,10.55 C23.54,10.56,23.85,10.25,23.85,9.88 C23.85,9.46,23.85,9.05,23.85,8.63 C23.85,8.26,23.54,7.95,23.2,7.96 C22.85,7.95,22.54,8.26,22.55,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M17.32,8.63 C17.32,9.05,17.32,9.46,17.32,9.88 C17.31,10.25,17.62,10.56,17.97,10.55 C18.31,10.56,18.62,10.25,18.62,9.88 C18.62,9.46,18.62,9.05,18.62,8.63 C18.62,8.26,18.31,7.95,17.97,7.96 C17.62,7.95,17.31,8.26,17.32,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M19.99,4.39 C19.99,8.09,19.99,11.8,19.99,15.5 C19.99,15.87,20.3,16.18,20.64,16.17 C20.99,16.18,21.3,15.87,21.29,15.5 C21.29,11.8,21.29,8.09,21.29,4.39 C21.3,4.02,20.99,3.71,20.64,3.72 C20.3,3.71,19.99,4.02,19.99,4.39 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M21.43,8.63 C21.43,9.05,21.43,9.46,21.43,9.88 C21.42,10.25,21.73,10.56,22.08,10.55 C22.42,10.56,22.73,10.25,22.73,9.88 C22.73,9.46,22.73,9.05,22.73,8.63 C22.73,8.26,22.42,7.95,22.08,7.96 C21.73,7.95,21.42,8.26,21.43,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M16.2,8.63 C16.2,9.05,16.2,9.46,16.2,9.88 C16.19,10.25,16.5,10.56,16.85,10.55 C17.19,10.56,17.5,10.25,17.5,9.88 C17.5,9.46,17.5,9.05,17.5,8.63 C17.5,8.26,17.19,7.95,16.85,7.96 C16.5,7.95,16.19,8.26,16.2,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M18.87,4.39 C18.87,8.09,18.87,11.8,18.87,15.5 C18.87,15.87,19.18,16.18,19.52,16.17 C19.86,16.18,20.18,15.87,20.17,15.5 C20.17,11.8,20.17,8.09,20.17,4.39 C20.18,4.02,19.86,3.71,19.52,3.72 C19.18,3.71,18.87,4.02,18.87,4.39 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M21.97,8.63 C21.97,9.05,21.97,9.46,21.97,9.88 C21.97,10.25,22.28,10.56,22.62,10.55 C22.97,10.56,23.28,10.25,23.27,9.88 C23.27,9.46,23.27,9.05,23.27,8.63 C23.28,8.26,22.97,7.95,22.62,7.96 C22.28,7.95,21.97,8.26,21.97,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M16.74,8.63 C16.74,9.05,16.74,9.46,16.74,9.88 C16.74,10.25,17.05,10.56,17.39,10.55 C17.74,10.56,18.05,10.25,18.04,9.88 C18.04,9.46,18.04,9.05,18.04,8.63 C18.05,8.26,17.74,7.95,17.39,7.96 C17.05,7.95,16.74,8.26,16.74,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M19.41,4.39 C19.41,8.09,19.41,11.8,19.41,15.5 C19.41,15.87,19.72,16.18,20.07,16.17 C20.41,16.18,20.72,15.87,20.72,15.5 C20.72,11.8,20.72,8.09,20.72,4.39 C20.72,4.02,20.41,3.71,20.07,3.72 C19.72,3.71,19.41,4.02,19.41,4.39 z"/></g></g></svg> ',tosiFavicon:'<svg class="color" viewBox="0 0 48 48"><g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M1,9 C1,4.58,4.58,1,9,1 C9,1,39,1,39,1 C43.42,1,47,4.58,47,9 C47,9,47,39,47,39 C47,43.42,43.42,47,39,47 C39,47,9,47,9,47 C4.58,47,1,43.42,1,39 C1,39,1,9,1,9 z"/><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,10,31,10,35 C10,39,16,39,16,39"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,29 C32,29,38,31,38,35 C38,39,32,39,32,39"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,10.18 C9,7.87,10.79,6,13,6 C13,6,35,6,35,6 C37.21,6,39,7.87,39,10.18 C39,10.18,39,24.82,39,24.82 C39,27.13,37.21,29,35,29 C35,29,13,29,13,29 C10.79,29,9,27.13,9,24.82 C9,24.82,9,10.18,9,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,43 C32,43,30,41,30,41 C30,41,28,43,28,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,43 C20,43,18,41,18,41 C18,41,16,43,16,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,32,29,32,29 C32,29,32,39,32,39 C32,39,16,39,16,39 C16,39,16,29,16,29 z"/></g></g></g></svg> ',tosiPlatform:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#3ea9f5;fill-rule:evenodd;stroke:none;" d="M23.97,47 C23.97,47,39,47,39,47 C43.42,47,47,43.42,47,39 C47,39,47,9,47,9 C47,4.58,43.42,1,39,1 C39,1,9,1,9,1 C4.58,1,1,4.58,1,9 C1,9,1,39,1,39 C1,41.64,2.28,43.98,4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;" d="M4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 C23.97,47,9,47,9,47 C7.22,47,5.58,46.42,4.25,45.44 z"/></g><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M35,35 C35,35,32.17,35,32.17,35 C32.17,35,32.17,37.83,32.17,37.83"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,39 C31,39,28.17,39,28.17,39 C28.17,39,28.17,41.83,28.17,41.83"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7.48,16 C4.45,16,2,18.45,2,21.48 C2,21.48,2,21.48,2,21.48 C2,23.98,4.02,26,6.52,26 C6.52,26,6.62,26,6.62,26 C7.38,26,8,26.62,8,27.38 C8,27.38,8,27.38,8,27.38 C8,29.93,10.07,32,12.62,32 C12.62,32,16,32,16,32 C18.58,32,20.68,29.91,20.68,27.32 C20.68,27.32,20.68,21.42,20.68,21.42 C20.68,18.43,18.25,16,15.26,16 C15.26,16,7.48,16,7.48,16 z"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,29 C17,29,33,29,33,29 C33,29,33,29,33,29 C33,34.52,28.52,39,23,39 C23,39,23,39,23,39 C19.69,39,17,36.31,17,33 C17,33,17,29,17,29 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40.52,16 C43.55,16,46,18.45,46,21.48 C46,21.48,46,21.48,46,21.48 C46,23.98,43.98,26,41.48,26 C41.48,26,41.38,26,41.38,26 C40.62,26,40,26.62,40,27.38 C40,27.38,40,27.38,40,27.38 C40,29.93,37.93,32,35.38,32 C35.38,32,32,32,32,32 C29.42,32,27.32,29.91,27.32,27.32 C27.32,27.32,27.32,21.42,27.32,21.42 C27.32,18.43,29.75,16,32.74,16 C32.74,16,40.52,16,40.52,16 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M6,10.18 C6,7.87,7.79,6,10,6 C10,6,32,6,32,6 C34.21,6,36,7.87,36,10.18 C36,10.18,36,24.82,36,24.82 C36,27.13,34.21,29,32,29 C32,29,10,29,10,29 C7.79,29,6,27.13,6,24.82 C6,24.82,6,10.18,6,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M21,11 C21,11,21,23,21,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M25,15 C25,15,25,17,25,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,15 C17,15,17,17,17,17"/></g></g></g></svg> ',tosiUi:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M3,33 C3,31.9,3.9,31,5,31 C5,31,43,31,43,31 C44.1,31,45,31.9,45,33 C45,33,45,43,45,43 C45,44.1,44.1,45,43,45 C43,45,5,45,5,45 C3.9,45,3,44.1,3,43 C3,43,3,33,3,33 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,35 C7,35,7,36.34,7,38 C7,39.66,8.34,41,10,41 C11.66,41,13,39.66,13,38 C13,36.34,13,35,13,35"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,35 C17,35,17,41,17,41"/></g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M38,33 C40.76,33,43,35.24,43,38 C43,40.76,40.76,43,38,43 C35.24,43,33,40.76,33,38 C33,35.24,35.24,33,38,33 z"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40,36 C40,36,36,40,36,40"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M36,36 C36,36,40,40,40,40"/></g></g><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21.01 C15.97,21.01,9.97,23.01,9.97,27.01 C9.97,31.01,15.97,31.01,15.97,31.01"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31.97,21.01 C31.97,21.01,37.97,23.01,37.97,27.01 C37.97,31.01,31.97,31.01,31.97,31.01"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,33 C31,33,29.49,31,29.49,31 C29.49,31,27.97,33,27.97,33"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M19.97,33 C19.97,33,17.97,31,17.97,31 C17.97,31,15.97,33,15.97,33"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21 C15.97,21,31.97,21,31.97,21 C31.97,21,31.97,31,31.97,31 C31.97,31,15.97,31,15.97,31 C15.97,31,15.97,21,15.97,21 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,7.18 C9,4.87,10.79,3,13,3 C13,3,35.02,3,35.02,3 C37.23,3,39.03,4.87,39.03,7.18 C39.03,7.18,39.03,21.82,39.03,21.82 C39.03,24.13,37.23,26,35.02,26 C35.02,26,13,26,13,26 C10.79,26,9,24.13,9,21.82 C9,21.82,9,7.18,9,7.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/></g></g></g></svg> ',tosiXr:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,5,15.25,5,17.25 C5,19.25,8,19.25,8,19.25"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,14.25 C16,14.25,19,15.25,19,17.25 C19,19.25,16,19.25,16,19.25"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.5,4.85 C4.5,3.69,5.4,2.75,6.5,2.75 C6.5,2.75,17.5,2.75,17.5,2.75 C18.61,2.75,19.5,3.69,19.5,4.85 C19.5,4.85,19.5,12.16,19.5,12.16 C19.5,13.32,18.61,14.25,17.5,14.25 C17.5,14.25,6.5,14.25,6.5,14.25 C5.4,14.25,4.5,13.32,4.5,12.16 C4.5,12.16,4.5,4.85,4.5,4.85 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12,5.25 C12,5.25,12,11.25,12,11.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,7.25 C14,7.25,14,8.25,14,8.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,7.25 C10,7.25,10,8.25,10,8.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,21.25 C16,21.25,15,20.25,15,20.25 C15,20.25,14,21.25,14,21.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,21.25 C10,21.25,9,20.25,9,20.25 C9,20.25,8,21.25,8,21.25"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,16,14.25,16,14.25 C16,14.25,16,19.25,16,19.25 C16,19.25,8,19.25,8,19.25 C8,19.25,8,14.25,8,14.25 z"/><path style="fill:#ff7bac;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-width:1;" d="M12,4 C12,4,11.99,4,11.99,4 C6.19,4,3,4.73,3,8.5 C3,11.39,4.66,13,7.27,13 C9.88,13,10.68,11.13,11.99,11.13 C11.99,11.13,12,11.13,12,11.13 C12,11.13,12.01,11.13,12.01,11.13 C13.32,11.13,14.12,13,16.73,13 C19.34,13,21,11.39,21,8.5 C21,4.73,17.81,4,12.01,4 C12.01,4,12,4,12,4 C12,4,12,4,12,4 z"/></g></svg> ',tosi:'<svg class="color" viewBox="0 0 48 48"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M38.35,31.7 C39.78,34.37,38.78,37.69,36.11,39.13 C36.11,39.13,36.11,39.13,36.11,39.13 C33.92,40.31,31.18,39.48,29.99,37.29 C29.99,37.29,29.95,37.2,29.95,37.2 C29.58,36.53,28.75,36.27,28.08,36.64 C28.08,36.64,28.08,36.64,28.08,36.64 C25.83,37.84,23.03,37,21.82,34.76 C21.82,34.76,20.22,31.78,20.22,31.78 C18.99,29.5,19.85,26.67,22.12,25.44 C22.12,25.44,27.32,22.65,27.32,22.65 C29.96,21.23,33.24,22.22,34.66,24.85 C34.66,24.85,38.35,31.7,38.35,31.7 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M10.65,31.7 C9.22,34.37,10.22,37.69,12.89,39.13 C12.89,39.13,12.89,39.13,12.89,39.13 C15.08,40.31,17.82,39.48,19.01,37.29 C19.01,37.29,19.05,37.2,19.05,37.2 C19.42,36.53,20.25,36.27,20.92,36.64 C20.92,36.64,20.92,36.64,20.92,36.64 C23.17,37.84,25.97,37,27.18,34.76 C27.18,34.76,28.78,31.78,28.78,31.78 C30.01,29.5,29.15,26.67,26.88,25.44 C26.88,25.44,21.68,22.65,21.68,22.65 C19.04,21.23,15.76,22.22,14.34,24.85 C14.34,24.85,10.65,31.7,10.65,31.7 z"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32.5,43 C32.5,43,30.5,41,30.5,41 C30.5,41,28.5,43,28.5,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,43 C20.5,43,18.5,41,18.5,41 C18.5,41,16.5,43,16.5,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16.5,29 C16.5,29,32.5,29,32.5,29 C32.5,29,32.5,36,32.5,36 C32.5,37.66,31.16,39,29.5,39 C29.5,39,19.5,39,19.5,39 C17.84,39,16.5,37.66,16.5,36 C16.5,36,16.5,29,16.5,29 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9.5,10.18 C9.5,7.87,11.29,6,13.5,6 C13.5,6,35.5,6,35.5,6 C37.71,6,39.5,7.87,39.5,10.18 C39.5,10.18,39.5,24.82,39.5,24.82 C39.5,27.13,37.71,29,35.5,29 C35.5,29,13.5,29,13.5,29 C11.29,29,9.5,27.13,9.5,24.82 C9.5,24.82,9.5,10.18,9.5,10.18 z"/><g><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24.5,11 C24.5,11,24.5,23,24.5,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28.5,15 C28.5,15,28.5,17,28.5,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,15 C20.5,15,20.5,17,20.5,17"/></g></g></g></svg> ',discord:'<svg class="filled" version="1" viewBox="0 0 1013 768"><path d="M858 64c-60-28-131-51-204-64l-5-1c-8 14-17 32-25 51l-1 4c-35-6-75-9-116-9s-81 3-120 9l4-1c-9-22-18-40-28-57l1 3c-79 14-149 36-214 67l5-2c-132 196-168 387-150 575v0c73 55 158 99 250 127l6 2c19-26 38-55 53-85l2-3c-33-13-62-27-89-43l2 1c7-5 14-11 21-16 75 36 163 57 256 57s181-21 260-59l-4 2c7 6 14 11 21 16-25 15-53 29-83 40l-4 1c17 34 36 63 56 90l-1-2c98-30 183-74 259-130l-2 2c21-218-36-407-151-575zM338 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101zM675 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101z"></path></svg> ',facebook:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>',game:'<svg class="filled" version="1" viewBox="0 0 704 512"><path d="M528 97v-1h-336c-88 0-160 72-160 160s72 160 160 160c52 0 99-25 128-64h64c29 39 76 64 128 64 88 0 160-72 160-160 0-83-63-151-144-159zM288 288h-64v64h-64v-64h-64v-64h64v-64h64v64h64v64zM480 288c-18 0-32-14-32-32s14-32 32-32 32 14 32 32-14 32-32 32zM576 288c-18 0-32-14-32-32 0-18 14-32 32-32s32 14 32 32c0 18-14 32-32 32z"></path></svg> ',google:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M256 0c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zM260 448c-106 0-192-86-192-192s86-192 192-192c52 0 95 19 129 50l-52 50c-14-14-39-30-77-30-66 0-119 54-119 121s54 121 119 121c76 0 105-55 109-83h-109v-66h181c2 10 3 19 3 32 0 110-73 188-184 188z"></path></svg> ',npm:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M0 0v512h512v-512h-512zM416 416h-64v-256h-96v256h-160v-320h320v320z"></path></svg> ',youtube:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>',blog:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10.02 C21,10.02,21,15,21,15 C21,15.53,20.79,16.04,20.41,16.41 C20.04,16.79,19.53,17,19,17 C19,17,7,17,7,17 C5.67,18.33,4.33,19.67,3,21 C3,21,3,5,3,5 C3,4.47,3.21,3.96,3.59,3.59 C3.96,3.21,4.47,3,5,3 C8.53,3,10.49,3,14.02,3"/><path style="" d="M19,2 C19.54,1.46,20.32,1.25,21.05,1.45 C21.78,1.65,22.35,2.22,22.55,2.95 C22.75,3.68,22.54,4.46,22,5 C22,5,15.5,11.5,15.5,11.5 C14.17,11.83,12.83,12.17,11.5,12.5 C11.83,11.17,12.17,9.83,12.5,8.5 C15.67,5.33,15.83,5.17,19,2 z"/><path style="" d="M14.6,3"/><path style="" d="M21,8.77"/><path style="" d="M7,7 C7,7,10,7,10,7"/><path style="" d="M7,10 C7,10,9,10,9,10"/></g></svg> ',bug:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M8,6 C8,3.79,9.79,2,12,2 C14.21,2,16,3.79,16,6 C16,6,8,6,8,6 z"/><path style="" d="M20,7 C20,7,18,9,18,9"/><path style="" d="M20,19 C20,19,18,17,18,17"/><path style="" d="M21,13 C21,13,18,13,18,13"/><path style="" d="M16.44,9 C17.3,9,18,9.7,18,10.56 C18,10.56,18,15,18,15 C18,18.31,15.31,21,12,21 C8.69,21,6,18.31,6,15 C6,15,6,10.56,6,10.56 C6,9.7,6.7,9,7.56,9 C7.56,9,16.44,9,16.44,9 z"/><path style="" d="M4,7 C4,7,6,9,6,9"/><path style="" d="M4,19 C4,19,6,17,6,17"/><path style="" d="M3,13 C3,13,6,13,6,13"/><path style="" d="M12,12 C12,12,12,17,12,17"/></g></svg> ',activity:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>',airplay:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>',alertCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertTriangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',alignCenter:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line></svg>',alignJustify:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line></svg>',alignLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line></svg>',alignRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line></svg>',anchor:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path></svg>',aperture:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg>',archive:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>',arrowUpRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>',atSign:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path></svg>',award:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>',barChart2:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>',barChart:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line></svg>',batteryCharging:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline></svg>',battery:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line></svg>',bellOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',bell:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>',bluetooth:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline></svg>',bold:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path></svg>',bookOpen:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>',book:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>',bookmark:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg>',box:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',briefcase:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>',calendar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>',cameraOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path></svg>',camera:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>',cast:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg>',checkCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',checkSquare:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',chrome:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line></svg>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></svg>',clipboard:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>',clock:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>',cloudDrizzle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudLightning:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline></svg>',cloudOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',cloudRain:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudSnow:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line></svg>',cloud:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path></svg>',code:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>',codepen:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>',codesandbox:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',coffee:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line></svg>',columns:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path></svg>',command:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path></svg>',compass:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>',copy:'<svg class="stroked" viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',cpu:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg>',creditCard:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>',crop:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path></svg>',crosshair:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line></svg>',database:'<svg class="stroked" viewBox="0 0 24 24"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>',delete:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line></svg>',disc:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle></svg>',divideCircle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle></svg>',divideSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line></svg>',divide:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle></svg>',dollarSign:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>',downloadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path></svg>',download:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>',dribbble:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path></svg>',droplet:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path></svg>',edit2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>',edit3:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>',edit:'<svg class="stroked" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>',externalLink:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',eyeOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',eye:'<svg class="stroked" viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',fastForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon></svg>',feather:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>',figma:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path></svg>',fileMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line></svg>',filePlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>',fileText:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>',file:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>',film:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line></svg>',filter:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>',flag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>',folderMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folderPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folder:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path></svg>',frown:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',gift:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>',gitBranch:'<svg class="stroked" viewBox="0 0 24 24"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',gitCommit:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>',gitMerge:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path></svg>',gitPullRequest:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line></svg>',github:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>',gitlab:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>',globe:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>',grid:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>',hardDrive:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line></svg>',hash:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line></svg>',headphones:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path></svg>',heart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>',helpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',hexagon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>',home:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>',image:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>',inbox:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path></svg>',info:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="7.75"></line></svg>',instagram:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>',italic:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line></svg>',key:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.78 7.78 5.5 5.5 0 0 1 7.78-7.78zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path></svg>',layers:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>',layout:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line></svg>',lifeBuoy:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line></svg>',link2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg>',link:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>',linkedin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>',list:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>',loader:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',lock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg> ',logIn:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>',logOut:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>',mail:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>',mapPin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>',map:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line></svg>',maximize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',maximize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>',meh:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',menu:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>',messageCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>',messageSquare:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>',micOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',mic:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',minimize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',minimize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path></svg>',minusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></svg>',monitor:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>',moon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>',moreHorizontal:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>',moreVertical:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle></svg>',mousePointer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg>',move:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line></svg>',music:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></svg>',octagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon></svg>',package:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',paperclip:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path></svg>',pauseCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line></svg>',pause:'<svg class="stroked" viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect></svg>',penTool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.59 7.59"></path><circle cx="11" cy="11" r="2"></circle></svg>',percent:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle></svg>',phoneCall:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneForwarded:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneIncoming:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneMissed:'<svg class="stroked" viewBox="0 0 24 24"><line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line></svg>',phoneOutgoing:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phone:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',pieChart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>',playCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>',plusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>',pocket:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline></svg>',power:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>',printer:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>',radio:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path></svg>',repeat:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg>',rewind:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon></svg>',cornerDownRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path></svg>',cornerRightDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path></svg>',cornerRightUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path></svg>',cornerUpRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path></svg>',refreshCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>',rotateCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>',skipForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line></svg>',toggleRight:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle></svg>',rss:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>',save:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>',scissors:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line></svg>',search:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',send:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>',server:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg>',settings:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M4.78,6.75 C6.02,7.26,7.26,6.02,6.75,4.78 C6.75,4.78,6.24,3.57,6.24,3.57 C5.93,2.8,6.29,1.92,7.06,1.6 C7.06,1.6,8.14,1.15,8.14,1.15 C8.91,0.83,9.79,1.2,10.11,1.96 C10.11,1.96,10.61,3.18,10.61,3.18 C11.12,4.42,12.88,4.42,13.39,3.18 C13.39,3.18,13.89,1.97,13.89,1.97 C14.21,1.2,15.09,0.83,15.86,1.15 C15.86,1.15,16.94,1.6,16.94,1.6 C17.71,1.92,18.08,2.8,17.76,3.57 C17.76,3.57,17.15,5.03,17.15,5.03 C16.64,6.27,17.88,7.51,19.12,7 C19.12,7,20.51,6.42,20.51,6.42 C21.28,6.1,22.16,6.47,22.47,7.23 C22.47,7.23,22.92,8.32,22.92,8.32 C23.24,9.09,22.88,9.96,22.11,10.28 C22.11,10.28,21.07,10.71,21.07,10.71 C19.83,11.23,19.83,12.98,21.07,13.49 C21.07,13.49,22.04,13.89,22.04,13.89 C22.8,14.21,23.17,15.09,22.85,15.86 C22.85,15.86,22.4,16.94,22.4,16.94 C22.08,17.71,21.2,18.07,20.43,17.76 C20.43,17.76,19.22,17.25,19.22,17.25 C17.98,16.74,16.74,17.98,17.25,19.22 C17.25,19.22,17.76,20.43,17.76,20.43 C18.07,21.2,17.71,22.08,16.94,22.4 C16.94,22.4,15.86,22.85,15.86,22.85 C15.09,23.17,14.21,22.8,13.89,22.04 C13.89,22.04,13.39,20.82,13.39,20.82 C12.88,19.58,11.12,19.58,10.61,20.82 C10.61,20.82,10.11,22.04,10.11,22.04 C9.79,22.8,8.91,23.17,8.14,22.85 C8.14,22.85,7.06,22.4,7.06,22.4 C6.29,22.08,5.93,21.2,6.24,20.44 C6.24,20.44,6.64,19.47,6.64,19.47 C7.16,18.23,5.92,16.99,4.68,17.5 C4.68,17.5,3.64,17.93,3.64,17.93 C2.87,18.25,1.99,17.89,1.67,17.12 C1.67,17.12,1.22,16.04,1.22,16.04 C0.91,15.27,1.27,14.39,2.04,14.07 C2.04,14.07,3.43,13.49,3.43,13.49 C4.67,12.98,4.67,11.23,3.43,10.71 C3.43,10.71,1.96,10.11,1.96,10.11 C1.2,9.79,0.83,8.91,1.15,8.14 C1.15,8.14,1.6,7.06,1.6,7.06 C1.92,6.29,2.8,5.93,3.57,6.24 C3.57,6.24,4.78,6.75,4.78,6.75 z M14.31,11.04 C14.84,12.32,14.23,13.78,12.96,14.31 C11.68,14.84,10.22,14.23,9.69,12.96 C9.16,11.68,9.77,10.22,11.04,9.69 C12.32,9.16,13.78,9.77,14.31,11.04 z"/></g></svg> ',share2:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>',share:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg>',shieldOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',shield:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>',shoppingBag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>',shoppingCart:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>',shuffle:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>',sidebar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line></svg>',slack:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path></svg>',slash:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>',sliders:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg>',smartphone:'<svg class="stroked" viewBox="0 0 24 24"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',smile:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',speaker:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line></svg>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',star:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',stopCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect></svg>',sun:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>',sunrise:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline></svg>',sunset:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline></svg>',table:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path></svg>',tablet:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',tag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line></svg>',target:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle></svg>',terminal:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>',thermometer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path></svg>',tool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>',trash2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>',trash:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',trello:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect></svg>',trendingDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline></svg>',trendingUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>',triangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg>',truck:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle></svg>',tv:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',twitter:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>',type:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line></svg>',umbrella:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path></svg>',underline:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line></svg>',unlock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path></svg>',thumbsUp:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>',arrowRightCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>',arrowRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></svg>',chevronsRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>',uploadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>',upload:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>',userCheck:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline></svg>',userMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userX:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line></svg>',user:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>',users:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>',videoOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',video:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>',voicemail:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line></svg>',volume1:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volume2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volumeX:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line></svg>',volume:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon></svg>',watch:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path></svg>',wifiOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wifi:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wind:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>',xCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>',x:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',zapOff:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>',zap:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>',zoomIn:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',zoomOut:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',fontBold:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M13.5,11 C15.71,11,17.5,12.68,17.5,14.75 C17.5,16.82,15.71,18.5,13.5,18.5 C13.5,18.5,8.5,18.5,8.5,18.5 C8.5,18.5,8.5,3.5,8.5,3.5 C8.5,3.5,13.5,3.5,13.5,3.5 C15.71,3.5,17.5,5.18,17.5,7.25 C17.5,9.32,15.71,11,13.5,11 C13.5,11,13.5,11,13.5,11 z"/><path style="" d="M13.5,11 C13.5,11,8.5,11,8.5,11"/><path style="" d="M12.5,11 C14.71,11,16.5,12.68,16.5,14.75 C16.5,16.82,14.71,18.5,12.5,18.5 C12.5,18.5,7.5,18.5,7.5,18.5 C7.5,18.5,7.5,3.5,7.5,3.5 C7.5,3.5,12.5,3.5,12.5,3.5 C14.71,3.5,16.5,5.18,16.5,7.25 C16.5,9.32,14.71,11,12.5,11 C12.5,11,12.5,11,12.5,11 z"/><path style="" d="M12.5,11 C12.5,11,7.5,11,7.5,11"/></g></svg> ',fontItalic:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M17,4.5 C17,4.5,13,4.5,13,4.5"/><path style="" d="M11,19.5 C11,19.5,7,19.5,7,19.5"/><path style="" d="M15,4.5 C15,4.5,9,19.5,9,19.5"/></g></svg> ',fontUnderline:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M7.5,3.5 C7.5,3.5,7.5,10.74,7.5,13.5 C7.5,16.26,9.74,18.5,12.5,18.5 C15.26,18.5,17.5,16.26,17.5,13.5 C17.5,10.74,17.5,3.5,17.5,3.5"/><path style="" d="M7.5,21.5 C7.5,21.5,17.5,21.5,17.5,21.5"/></g></svg> ',indent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M2.5,9 C2.5,9,5.5,12,5.5,12 C5.5,12,2.5,15,2.5,15"/></g></svg> ',listBullet:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M5.5,5 C6.05,5,6.5,5.45,6.5,6 C6.5,6.55,6.05,7,5.5,7 C4.95,7,4.5,6.55,4.5,6 C4.5,5.45,4.95,5,5.5,5 z"/><path style="" d="M5.5,11 C6.05,11,6.5,11.45,6.5,12 C6.5,12.55,6.05,13,5.5,13 C4.95,13,4.5,12.55,4.5,12 C4.5,11.45,4.95,11,5.5,11 z"/><path style="" d="M5.5,17 C6.05,17,6.5,17.45,6.5,18 C6.5,18.55,6.05,19,5.5,19 C4.95,19,4.5,18.55,4.5,18 C4.5,17.45,4.95,17,5.5,17 z"/></g></svg> ',listNumber:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M4.5,5 C4.5,5,5.5,4,5.5,4 C5.5,4,5.5,8,5.5,8"/><path style="" d="M4.5,10 C4.5,10,5.5,10,5.5,10 C6.05,10,6.5,10.45,6.5,11 C6.5,11,6.5,11,6.5,11 C6.5,11.55,6.05,12,5.5,12 C5.5,12,5.5,12,5.5,12 C4.95,12,4.5,12.45,4.5,13 C4.5,13,4.5,14,4.5,14 C4.5,14,6.5,14,6.5,14"/><path style="" d="M4.5,16 C4.5,16,5.5,16,5.5,16 C6.05,16,6.5,16.45,6.5,17 C6.5,17,6.5,17,6.5,17 C6.5,17.55,6.05,18,5.5,18 C5.5,18,4.5,18,4.5,18 C4.5,18,5.5,18,5.5,18 C6.05,18,6.5,18.45,6.5,19 C6.5,19,6.5,19,6.5,19 C6.5,19.55,6.05,20,5.5,20 C5.5,20,4.5,20,4.5,20"/></g></svg> ',outdent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M5.5,9 C5.5,9,2.5,12,2.5,12 C2.5,12,5.5,15,5.5,15"/></g></svg> ',pin:'<svg class="stroked" viewBox="0 0 24 24"><g><g><path style="" d="M16.23,4.73 C16.23,4.73,19.42,7.9,19.42,7.9 C19.42,7.9,14.46,15.69,14.46,15.69 C14.46,15.69,8.45,9.68,8.45,9.68 C8.45,9.68,16.23,4.73,16.23,4.73 z"/><path style="" d="M20.84,9.32 C20.84,9.32,14.47,2.95,14.47,2.95"/><path style="" d="M16.6,17.8 C16.6,17.8,6.7,7.9,6.7,7.9"/><path style="" d="M10.23,11.44 C10.23,11.44,5.99,18.51,5.99,18.51 C5.99,18.51,13.06,14.27,13.06,14.27"/></g></g></svg> ',resize:'<svg class="stroked" version="1.1" viewBox="0, 0, 24, 24"><g><path d="M9,3 L3,3 L3,9"/><path d="M15,21 L21,21 L21,15"/><path d="M3,3 L10,10"/><path d="M21,21 L14,14"/></g></svg> ',sortAscending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,10.5 C16.5,10.5,7.5,10.5,7.5,10.5"/><path d="M14.5,6.5 C14.5,6.5,9.5,6.5,9.5,6.5"/><path d="M18.5,14.5 C18.5,14.5,5.5,14.5,5.5,14.5"/><path d="M20.5,18.5 C20.5,18.5,3.5,18.5,3.5,18.5"/></g></svg> ',sortDescending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,14.5 C16.5,14.5,7.5,14.5,7.5,14.5"/><path d="M14.5,18.5 C14.5,18.5,9.5,18.5,9.5,18.5"/><path d="M18.5,10.5 C18.5,10.5,5.5,10.5,5.5,10.5"/><path d="M20.5,6.5 C20.5,6.5,3.5,6.5,3.5,6.5"/></g></svg> ',cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",skipBack:"skipForward0f",toggleLeft:"toggleRight0f",thumbsDown:"thumbsUp1f",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r"};var Dx=(y)=>{Object.assign(k2,y)},h0=(y,x,h,l)=>{let i=y instanceof SVGElement?[y]:Array.from(y.querySelectorAll("svg"));if(i.length>1){let w=y.dataset?.icon||"unknown";console.error(`svg2DataUrl: composite icon "${w}" cannot be serialized as a data URL, rendering base icon only`)}let C=i[0];C.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let w of C.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")){if(x!==void 0)w.setAttribute("fill",x);if(h!==void 0)w.setAttribute("stroke",h);if(l!==void 0)w.setAttribute("stroke-width",String(l))}let k=C.querySelectorAll("[style]");C.removeAttribute("style");for(let w of[...k]){let B=w.style;if(B.fill)w.setAttribute("fill",Q.fromCss(B.fill).html);if(B.stroke)w.setAttribute("stroke",Q.fromCss(B.stroke).html);if(B.strokeWidth)w.setAttribute("strokeWidth",B.strokeWidth);if(B.strokeLinecap)w.setAttribute("strokeLinecap",B.strokeLinecap);if(B.strokeLinejoin)w.setAttribute("strokeLinejoin",B.strokeLinejoin);w.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(C.outerHTML)})`},dx=(y)=>/\d$/.test(y)?y+"_":y,d5=[{prefix:/^spin(_?\d+)/,apply(y,x,h){let l=x[1].replace("_","-"),i=360/Math.abs(parseFloat(l)),C=l.startsWith("-")?"reverse":"normal",k=m1(y,[]),g=k;if(g.animate){let w=g.style.transform||"";g.animate([{transform:`${w} rotate(0deg)`},{transform:`${w} rotate(360deg)`}],{duration:i*1000,iterations:1/0,direction:C})}return S5(y,h,k)}},{prefix:"un",apply:(y)=>`slash25o$${y}75s75o`},{prefix:"check",apply:(y)=>`check75o_00aa00S$${y}75s50o`},{prefix:"cancel",apply:(y)=>`x75o_cc0000S$${y}75s50o`},{prefix:"search",apply:(y)=>`search80s30x30y$${y}50o`}],Sx=0;function Q8(y,x){let h=p.div();h.innerHTML=y;let l=h.querySelector("svg"),i=l.querySelectorAll("[id]");if(i.length>0){let g=new Map;for(let j of i){let V=j.id,A=`tosi_svg_id_${++Sx}`;g.set(V,A),j.id=A}let w=l.innerHTML,B=w;for(let[j,V]of g){let A=j.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");B=B.replace(new RegExp(`url\\(#${A}\\)`,"g"),`url(#${V})`).replace(new RegExp(`href="#${A}"`,"g"),`href="#${V}"`)}if(B!==w)l.innerHTML=B}let C=new Set(l.classList);C.add("tosi-icon");let k=u0.svg({class:Array.from(C).join(" "),viewBox:l.getAttribute("viewBox")},...x,...l.children);if(k.style.strokeWidth=P.tosiIconStrokeWidth("2px"),C.has("filled"))k.style.stroke="none",k.style.fill="currentColor";else if(C.has("stroked"))k.style.stroke=P.tosiIconStroke("currentColor"),k.style.fill=P.tosiIconFill("none");else k.style.stroke=P.tosiIconStroke("currentColor"),k.style.fill=P.tosiIconFill("currentColor");return k.style.height=P.tosiIconSize("16px"),k}function S5(y,x,...h){let l=p.span({class:"tosi-icon-composite",dataIcon:y,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...h);for(let i of x)if(i&&typeof i==="object"&&!("nodeType"in i)){let C=i;if(C.style&&typeof C.style==="object")Object.assign(l.style,C.style);if(C.class)l.classList.add(...String(C.class).split(" "))}return l}function Ix(y){let x=k2;if(x[y])return!0;let h=D5(y);return h!=null&&!!x[h.baseName]}function W8(y,x){for(let h of d5){let l,i;if(h.prefix instanceof RegExp){let k=new RegExp(h.prefix.source+"(.+)$"),g=y.match(k);if(!g)continue;l=g[g.length-1],l=l[0].toLowerCase()+l.slice(1),i=g}else{if(!y.startsWith(h.prefix)||y.length<=h.prefix.length)continue;l=y[h.prefix.length].toLowerCase()+y.slice(h.prefix.length+1),i=h.prefix}if(!Ix(l))continue;let C=h.apply(dx(l),i,x);if(typeof C==="string")return m1(C,x);if(C)return C}return null}var rx=10,ox=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function D5(y){let x=y.match(ox);if(!x)return null;let h=y.slice(0,x.index);if(!h)return null;if(h.endsWith("_"))h=h.slice(0,-1);if(!h)return null;if(!k2[h]){if(!d5.some((w)=>{if(w.prefix instanceof RegExp)return w.prefix.test(h);return h.startsWith(w.prefix)&&h.length>w.prefix.length}))return null}let i={},C=x[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!C)return null;let k=[];for(let g of C){let w=g[g.length-1];if(w==="F"||w==="S"){let B=g.slice(1,-1),V=/^[0-9a-fA-F]{3,8}$/.test(B)?"#"+B:z[B];if(w==="F")i.fill=V;else i.stroke=V}else if(w==="W")i.strokeWidth=g.slice(0,-1);else{let B=parseInt(g.replace("_","-"));switch(w){case"o":i.opacity=String(B/100);break;case"s":k.push(`scale(${B/100})`);break;case"x":k.push(`translateX(${B}%)`);break;case"y":k.push(`translateY(${B}%)`);break;case"r":k.push(`rotate(${B}deg)`);break;case"f":k.push(B===0?"scaleX(-1)":"scaleY(-1)");break}}}if(k.length>0)i.transform=k.join(" "),i.transformOrigin="50% 50%";return{baseName:h,style:i}}function m1(y,x){if(y.endsWith("_"))y=y.slice(0,-1);let h=k2,l=y;for(let k=0;k<rx;k++){let g=h[l];if(!g)break;if(g.startsWith("<"))return Q8(g,x);l=g}if(l!==y){let k=W8(l,x);if(k)return k;let g=D5(l);if(g){let w=m1(g.baseName,x);return Object.assign(w.style,g.style),w}}if(y.includes("$")){let k=y.split("$"),g=m1(k[k.length-1],[]),w=k.slice(0,-1).reverse().map((B)=>{let j=m1(B,[]);return Object.assign(j.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),j});return S5(y,x,g,...w)}let i=W8(y,x);if(i)return i;let C=D5(y);if(C){let k=m1(C.baseName,x);return Object.assign(k.style,C.style),k}if(y)console.warn(`icon ${y} does not exist`);return Q8(k2.square,x)}var U=new Proxy(k2,{get(y,x){return(...h)=>m1(x,h)}});class I5 extends K{static preferredTagName="tosi-icon";static lightStyleSpec={":host":{"--tosi-icon-size":"var(--xin-icon-size, 16px)","--tosi-icon-stroke-width":"var(--xin-icon-stroke-width, var(--icon-stroke-width, 2px))","--tosi-icon-stroke-linejoin":"var(--icon-stroke-linejoin, round)","--tosi-icon-stroke-linecap":"var(--icon-stroke-linecap, round)","--tosi-icon-fill":"var(--xin-icon-fill, var(--icon-fill, none))",display:"inline-flex",verticalAlign:"text-bottom",stroke:"currentColor",strokeWidth:P.tosiIconStrokeWidth("2px"),strokeLinejoin:P.tosiIconStrokeLinejoin("round"),strokeLinecap:P.tosiIconStrokeLinecap("round"),fill:P.tosiIconFill("none"),height:z.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:P.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let y={};if(this.size)y.height=this.size+"px",this.style.setProperty("--tosi-icon-size",`${this.size}px`),this.style.setProperty("--xin-icon-size",`${this.size}px`);if(this.stroke)y.stroke=this.stroke,y.strokeWidth=this.strokeWidth;if(this.fill)y.fill=this.fill;this.append(U[this.icon]({style:y}))}}var Tx=I5.elementCreator();var Y8=()=>{};class r5 extends K{static preferredTagName="tosi-3d";babylonReady;BABYLON;static shadowStyleSpec={":host":{display:"block",position:"relative"},":host canvas":{width:"100%",height:"100%"},":host .babylonVRicon":{height:50,width:80,backgroundColor:"transparent",filter:"drop-shadow(0 0 4px #000c)",backgroundImage:h0(U.xrColor()),backgroundPosition:"center",backgroundRepeat:"no-repeat",border:"none",borderRadius:5,borderStyle:"none",outline:"none",transition:"transform 0.125s ease-out"},":host .babylonVRicon:hover":{transform:"scale(1.1)"}};content=p.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:y}=await _1("https://cdn.babylonjs.com/babylon.js","BABYLON");return y})()}scene;engine;sceneCreated=Y8;update=Y8;_update=()=>{if(this.scene){if(this.update!==void 0)this.update(this,this.BABYLON);if(this.scene.activeCamera!==void 0)this.scene.render()}};onResize(){if(this.engine)this.engine.resize()}loadScene=async(y,x,h)=>{let{BABYLON:l}=await _1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");l.SceneLoader.Append(y,x,this.scene,h)};loadUI=async(y)=>{let{BABYLON:x}=await _1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),h=x.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:l,jsonUrl:i,data:C,size:k}=y;if(k)h.idealWidth=k,h.renderAtIdealSize=!0;let g;if(l)g=await h.parseFromSnippetAsync(l);else if(i)g=await h.parseFromURLAsync(i);else if(C)g=h.parseContent(C);else return null;let w=h.getChildren()[0],B=w.children.reduce((j,V)=>{return j[V.name]=V,j},{});return{advancedTexture:h,gui:g,root:w,widgets:B}};connectedCallback(){super.connectedCallback();let{canvas:y}=this.parts;this.babylonReady.then(async(x)=>{if(this.BABYLON=x,this.engine=new x.Engine(y,!0),this.scene=new x.Scene(this.engine),this.sceneCreated)await this.sceneCreated(this,x);if(this.scene.activeCamera===void 0)new x.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new x.Vector3(0,0,0)).attachControl(this.parts.canvas,!0);this.engine.runRenderLoop(this._update)})}}var Lx=r5.elementCreator();class Y2 extends K{static preferredTagName="tosi-lottie";static initAttributes={src:"",json:""};content=null;config={renderer:"svg",loop:!0,autoplay:!0};static bodymovinAvailable;animation;static shadowStyleSpec={":host":{width:400,height:400,display:"inline-block"}};_loading=!1;get loading(){return this._loading}constructor(){super();if(Y2.bodymovinAvailable===void 0)Y2.bodymovinAvailable=_1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:y})=>{if(this._loading=!0,this.config.container=this.shadowRoot!==null?this.shadowRoot:void 0,this.json!=="")this.config.animationData=this.json,delete this.config.path;else if(this.src!=="")delete this.config.animationData,this.config.path=this.src;else console.log("%c<tosi-lottie>%c expected either %cjson%c (animation data) or %csrc% c(url) but found neither.","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default");if(this.animation){this.animation.destroy();let x=this.shadowRoot;if(x!==null)x.querySelector("svg")?.remove()}this.animation=y.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),Y2.bodymovinAvailable.then(this.load).catch((y)=>{console.error(y)})}}var Mx=Y2.elementCreator();var{button:o5,slot:nx,div:y4}=p;class x4 extends K{static preferredTagName="tosi-carousel";static initAttributes={dots:!1,arrows:!1,maxVisibleItems:1,snapDuration:0.25,snapDelay:0.1,loop:!1,auto:0};lastAutoAdvance=Date.now();interval;autoAdvance=()=>{if(this.auto>0&&this.auto*1000<Date.now()-this.lastAutoAdvance)this.forward()};_page=0;get page(){return this._page}set page(y){let{scroller:x,back:h,forward:l}=this.parts;if(this.lastPage<=0)l.disabled=h.disabled=!0,y=0;else y=Math.max(0,Math.min(this.lastPage,y)),y=isNaN(y)?0:y;if(this._page!==y)this._page=isNaN(y)?0:y,this.animateScroll(this._page*x.offsetWidth),h.disabled=this.page<=0&&!this.loop,l.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((y)=>getComputedStyle(y).display!=="none")}get lastPage(){return Math.max(Math.ceil(this.visibleItems.length/(this.maxVisibleItems||1))-1,0)}static shadowStyleSpec={":host":{_carouselIconSize:24,_carouselButtonColor:"#0004",_carouselButtonHoverColor:"#0006",_carouselButtonActiveColor:"#000c",_carouseButtonWidth:48,_carouselDotCurrentColor:"#0008",_carouselDotSize:8,_carouselDotSpacing:z.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:z.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:z.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:z.carouseButtonWidth,zIndex:2},":host::part(back)":{left:0},":host::part(forward)":{right:0},":host button:disabled":{opacity:0.5,pointerEvents:"none"},":host button:hover":{color:z.carouselButtonHoverColor},":host button:active":{color:z.carouselButtonActiveColor},":host::part(pager)":{position:"relative"},":host::part(scroller)":{overflow:"auto hidden",position:"relative"},":host::part(grid)":{display:"grid",justifyItems:"center"},":host *::-webkit-scrollbar, *::-webkit-scrollbar-thumb":{display:"none"},":host .dot":{background:z.carouselButtonColor,borderRadius:z.carouselDotSize,height:z.carouselDotSize,width:z.carouselDotSize,transition:z.carouselDotTransition},":host .dot:not(.current):hover":{background:z.carouselButtonHoverColor,height:z.carouselDotSize150,width:z.carouselDotSize150,margin:z.carouselDotSize_25},":host .dot:not(.current):active":{background:z.carouselButtonActiveColor},":host .dot.current":{background:z.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:z.carouselDotSpacing,justifyContent:"center",padding:z.carouselProgressPadding}};easing=(y)=>{return Math.sin(y*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:y,progress:x}=this.parts,h=y.scrollLeft/y.offsetWidth;[...x.children].forEach((l,i)=>{l.classList.toggle("current",Math.floor(i/this.maxVisibleItems-h)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:y}=this.parts,x=Math.round(y.scrollLeft/y.offsetWidth);if(x!==this.page)this.page=x>this.page?Math.ceil(x):Math.floor(x);this.lastAutoAdvance=Date.now()};back=()=>{this.page=this.page>0?this.page-1:this.lastPage};forward=()=>{this.page=this.page<this.lastPage?this.page+1:0};handleDotClick=(y)=>{let{progress:x}=this.parts,h=[...x.children].indexOf(y.target);if(h>-1)this.page=Math.floor(h/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(y,x=-1,h=0){cancelAnimationFrame(this.animationFrame);let{scroller:l}=this.parts;if(x===-1){x=l.scrollLeft,h=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)});return}let i=(Date.now()-h)/1000;if(i>=this.snapDuration||Math.abs(l.scrollLeft-y)<2)l.scrollLeft=y,this.animationFrame=null;else l.scrollLeft=x+this.easing(i/this.snapDuration)*(y-x),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)})}content=()=>[y4({part:"pager"},o5({title:"previous slide",part:"back"},U.chevronLeft()),y4({title:"slides",role:"group",part:"scroller"},y4({part:"grid"},nx())),o5({title:"next slide",part:"forward"},U.chevronRight())),y4({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:y,forward:x,scroller:h,progress:l}=this.parts;y.addEventListener("click",this.back),x.addEventListener("click",this.forward),h.addEventListener("scroll",this.indicateCurrent),l.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:y,arrows:x,visibleItems:h,lastPage:l}=this,{progress:i,back:C,forward:k,grid:g}=this.parts;h.forEach((w)=>{w.role="group"}),g.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(h.length).trim(),g.style.width=(1+this.lastPage)*100+"%",i.textContent="",i.append(...h.map((w,B)=>o5({title:`item ${B+1}`,class:"dot"}))),this.indicateCurrent(),i.style.display=y&&l>0?"":"none",C.hidden=k.hidden=!(x&&l>0)}}var ux=x4,F8=x4.elementCreator(),ax=F8;var{div:X8,span:N8}=p;function v8(y,x){let h=y.split(`
12
+ `)},My=(y)=>{j1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let x={};for(let h of Object.keys(y)){let l=y[h],i=O1(h);x[`--${i}`]=typeof l==="number"&&l!==0?String(l)+"px":l}return x},y0=(y)=>{let x={};for(let h of Object.keys(y)){let l=y[h];if(l instanceof W)x[h]=l.inverseLuminance;else if(typeof l==="string"&&l.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/))x[h]=W.fromCss(l).inverseLuminance}return x},P=new Proxy({},{get(y,x){if(y[x]===void 0){let h="--"+O1(x);y[x]=(l)=>`var(${h}, ${l})`}return y[x]}}),z=new Proxy({},{get(y,x){if(x==="default")return P;if(y[x]==null){x=O1(x);let[,h,,l,i,C]=x.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",x],k=`--${h}`;if(i!=null){let g=l==null?Number(i)/100:-Number(i)/100;switch(C){case"b":case"s":case"h":case"o":{let w=`--${x}`;W.registerComputedColor(w,k,g,C),y[x]=`var(${w})`}break;case"":y[x]=`calc(var(${k}) * ${g})`;break;default:throw console.error(C),Error(`Unrecognized method ${C} for css variable ${k}`)}}else y[x]=`var(${k})`}return y[x]}});function A8(){let y=(x)=>typeof matchMedia<"u"&&matchMedia(x).matches;return{colorScheme:y("(prefers-color-scheme: dark)")?"dark":"light",contrast:y("(prefers-contrast: more)")?"more":y("(prefers-contrast: less)")?"less":y("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:y("(prefers-reduced-motion: reduce)"),reducedTransparency:y("(prefers-reduced-transparency: reduce)"),forcedColors:y("(forced-colors: active)")}}function ny(y){if(typeof matchMedia>"u")return()=>{};let x=["(prefers-color-scheme: dark)","(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-reduced-motion: reduce)","(prefers-reduced-transparency: reduce)","(forced-colors: active)"],h=()=>y(A8()),l=x.map((i)=>matchMedia(i));for(let i of l)i.addEventListener("change",h);return()=>{for(let i of l)i.removeEventListener("change",h)}}var uy="http://www.w3.org/1998/Math/MathML",ay="http://www.w3.org/2000/svg",d0={},G8=(y,x,h)=>{let l=P8(O1(x),h);if(l.prop.startsWith("--"))y.style.setProperty(l.prop,l.value);else y.style[x]=l.value},my=(y)=>{return{toDOM(x,h){G8(x,y,h)}}},K8=(y,x,h)=>{if(x==="style")if(typeof h==="object")for(let l of Object.keys(h))if(q1(h[l]))S1(y,h[l],my(l));else G8(y,l,h[l]);else y.setAttribute("style",h);else{let l=O1(x),i=y.constructor.observedAttributes;if(i?.includes(x)||i?.includes(l))if(typeof h==="boolean")h?y.setAttribute(l,""):y.removeAttribute(l);else y.setAttribute(l,h);else if(y[x]!==void 0){let{MathMLElement:C}=globalThis;if(y instanceof SVGElement||C!==void 0&&y instanceof C)y.setAttribute(x,h);else y[x]=h}else if(l==="class")h.split(" ").forEach((C)=>{y.classList.add(C)});else if(y[l]!==void 0)y[l]=h;else if(typeof h==="boolean")h?y.setAttribute(l,""):y.removeAttribute(l);else y.setAttribute(l,h)}},i5={},r9=(y)=>{if(!i5[y])i5[y]={toDOM(x,h){K8(x,y,h)}};return i5[y]},N5=(y,x,h)=>{if(x==="apply")h(y);else if(x.match(/^on[A-Z]/)!=null){let l=x.substring(2).toLowerCase();W2(y,l,h)}else if(x==="bind")if((typeof h.binding==="string"?r1[h.binding]:h.binding)!==void 0&&h.value!==void 0)S1(y,h.value,h.binding instanceof Function?{toDOM:h.binding}:h.binding);else throw Error("bad binding");else if(x.match(/^bind[A-Z]/)!=null){let l=x.substring(4,5).toLowerCase()+x.substring(5);if(l!=="value"){let C=l==="text"?"textContent":l==="enabled"?"disabled (with .tosi.take(v => !v))":l==="disabled"?"disabled":l==="list"?".tosi.listBinding()":null;if(C)j1(`bind${l}`,`bind${x.substring(4)} is deprecated. Use { ${C}: ... } instead.`)}let i=r1[l];if(i!==void 0)S1(y,h,i);else throw Error(`${x} is not allowed, bindings.${l} is not defined`)}else if(h!=null&&typeof h==="object"&&h[M0])S1(y,h,r9(x));else if(q1(h))S1(y,h,r9(x));else K8(y,x,h)},Z5=(y,...x)=>{if(d0[y]===void 0){let[i,C]=y.split("|");if(C===void 0)d0[y]=globalThis.document.createElement(i);else d0[y]=globalThis.document.createElementNS(C,i)}let h=d0[y].cloneNode(),l={};for(let i of x)if(i instanceof Element||i instanceof DocumentFragment||typeof i==="string"||typeof i==="number")if(h instanceof HTMLTemplateElement)h.content.append(i);else h.append(i);else if(q1(i))h.append(K.span({bindText:i}));else Object.assign(l,i);for(let i of Object.keys(l)){let C=l[i];N5(h,i,C)}return h},v5=(...y)=>{let x=globalThis.document.createDocumentFragment();for(let h of y)x.append(h);return x},K=new Proxy({fragment:v5},{get(y,x){if(x=x.replace(/[A-Z]/g,(h)=>`-${h.toLocaleLowerCase()}`),y[x]===void 0)y[x]=(...h)=>Z5(x,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),u0=new Proxy({fragment:v5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>Z5(`${x}|${ay}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),U8=new Proxy({fragment:v5},{get(y,x){if(y[x]===void 0)y[x]=(...h)=>Z5(`${x}|${uy}`,...h);return y[x]},set(){throw Error("You may not add new properties to elements")}}),T9=new WeakSet;function ty(y,x,h="part"){let l=`[data-${h}]`;for(let i of Array.from(y.querySelectorAll(l))){if(T9.has(i))continue;let C=i.getAttribute(`data-${h}`);if(C==null)continue;let k=x[C];if(k==null)continue;T9.add(i);for(let g of Object.keys(k))N5(i,g,k[g])}}var Ey=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],ey=!0,yx=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,xx=(y)=>yx.test(y),M1=(y="",x="")=>{if(y==="")return x;else if(x.match(/^\d+$/)!==null||x.includes("="))return`${y}[${x}]`;else return`${y}.${x}`},L0={};function C5(y,x){if(y!==null&&(typeof y==="object"||typeof y==="function"))return y;return new Proxy(L0,a1(x,!0))}var O8=()=>new Proxy({},a1("^",!0)),k5=(y)=>{let x=y(O8())?.path;if(!x?.startsWith("^."))throw Error("selector must return a property of the item");return x.substring(2)},g5=(y,x,h)=>{for(let l=0;l<y.length;l++)if(`${h1(y[l],x)}`===`${h}`)return l;return-1},hx=(y,x)=>({listFind(h,l){if(h instanceof Element){let k=h;while(k&&!k[G2]&&k.parentElement)k=k.parentElement;let g=k?.[G2];if(g==null)return;let w=x.indexOf(g);return w!==-1?P1[y][w]:void 0}let i=k5(h),C=g5(x,i,l);return C!==-1?P1[y][C]:void 0},listUpdate(h,l){let i=k5(h),C=h1(l,i),k=g5(x,i,C);if(k!==-1){let g=P1[y][k];for(let w of Object.keys(l))g[w]=l[w];return g}return P1[y].push(l),P1[y][x.length-1]},listRemove(h,l){let i=k5(h),C=g5(x,i,l);if(C===-1)return!1;return P1[y].splice(C,1),!0}}),o9=!1;function lx(){if(!o9)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),o9=!0}var L9=(y)=>{return y===L0},ix=(y,x)=>({get(h,l){switch(l){case"value":return x===L0?h1(C1,y):x.valueOf?x.valueOf():x;case"path":return y;case"touch":return()=>_1(y);case"observe":return(i)=>{let C=E2(y,i);return()=>a2(C)};case"bind":return(i,C,k)=>{$y()(i,y,C,k)};case"on":{let i=x===L0?h1(C1,y):x.valueOf?x.valueOf():x;return(C,k)=>cy()(C,k,i)}case"binding":return(i)=>({bind:{value:y,binding:i}});case"listBinding":return(i=({span:k})=>k({bindText:"^"}),C={})=>{let k=C.virtual?.itemsPerRow??1,g=[];for(let w=0;w<k;w++)g.push(i(K,O8(),w));return[{bindList:{value:y,...C}},K.template(...g)]};case"listFind":case"listUpdate":case"listRemove":return hx(y,Array.isArray(x)?x:[])[l];case"take":return(...i)=>{let C=i[i.length-1],k=i.slice(0,-1).map((g)=>typeof g==="string"?g:g[c1]);return{[M0]:!0,paths:[y,...k],transform:C}}}return},set(h,l,i){if(l==="value"){if(i=J(i),J(E[y])!==i&&t2(C1,y,i))_1(y);return!0}return!1}}),o2=(y,x)=>new Proxy(x,ix(y,x)),M9=new Set(["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"]),n9=new Map([[c1,"path"],["xinPath","path"],["tosiPath","path"],[U2,"value"],["xinValue","value"],["tosiValue","value"],[Vy,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[_y,"on"],["xinOn","on"],["tosiOn","on"],[Py,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),a1=(y,x)=>({get(h,l){if((l==="tosi"||l===X5)&&x)return o2(y,h);if(L9(h)){let w=()=>h1(C1,y);switch(l){case"valueOf":case"toJSON":return()=>w();case Symbol.toPrimitive:return(V)=>{let _=w();if(V==="number")return Number(_);if(V==="string")return String(_);return _};case"toString":return()=>String(w())}if(M9.has(l))return o2(y,h)[l];let B=n9.get(l);if(B!==void 0)return lx(),o2(y,h)[B];let j=w();if(j!=null){let V=Object(j);if(l in V){let _=V[l];return typeof _==="function"?_.bind(V):_}}return}if(x&&(l==="valueOf"||l==="toJSON"))return()=>h.valueOf?h.valueOf():h;if(x&&!(l in h)&&M9.has(l))return o2(y,h)[l];let i=n9.get(l);if(i!==void 0)return o2(y,h)[i];if(typeof l==="symbol")return h[l];let C=Object.getOwnPropertyDescriptor(h,l);if(C&&!C.configurable&&!C.writable&&"value"in C)return C.value;let k=l,g=k.match(/^([^.[]+)\.(.+)$/)??k.match(/^([^\]]+)(\[.+)/)??k.match(/^(\[[^\]]+\])\.(.+)$/)??k.match(/^(\[[^\]]+\])\[(.+)$/);if(g!==null){let[,w,B]=g,j=M1(y,w),V=J(h1(h,w));return V!==null&&typeof V==="object"?new Proxy(V,a1(j,x))[B]:V}if(k.startsWith("[")&&k.endsWith("]"))k=k.substring(1,k.length-1);if(!Array.isArray(h)&&h[k]!==void 0||Array.isArray(h)&&k.includes("=")){let w;if(k.includes("=")){let[B,j]=k.split("=");w=h.find((V)=>`${h1(V,B)}`===j)}else w=h[k];if(w instanceof Object){w=J(w);let B=M1(y,k);return new Proxy(w instanceof Function?w.bind(h):w,a1(B,x))}else return x?C5(w,M1(y,k)):w}else if(Array.isArray(h)){let w=h[k];return typeof w==="function"?(...B)=>{let j=B.map((_)=>J(_)),V=w.apply(h,j);if(Ey.includes(k))_1(y);if(V!=null&&typeof V==="object"){if(k==="find"||k==="findLast"||k==="at"){let _=h.indexOf(V);if(_!==-1)return new Proxy(V,a1(M1(y,String(_)),x))}}return V}:typeof w==="object"?new Proxy(J(w),a1(M1(y,k),x)):x?C5(w,M1(y,k)):w}else{let w=h[k];if(w!==null&&typeof w==="object")w=J(w);return x?C5(w,M1(y,k)):w}},set(h,l,i){if(i=J(i),i!==null&&typeof i==="object")if(Array.isArray(i))for(let k=0;k<i.length;k++)i[k]=J(i[k]);else for(let k of Object.keys(i))i[k]=J(i[k]);let C=l===U2||l==="xinValue"||l==="tosiValue"||l==="value"&&(L9(h)||x)?y:M1(y,l);if(ey&&!xx(C))throw Error(`setting invalid path ${C}`);if(J(E[C])!==i&&t2(C1,C,i))_1(C);return!0}}),$5=(y,x)=>{let h=typeof x==="function"?x:E[x];if(typeof h!=="function")throw Error(`observe expects a function or path to a function, ${x} is neither`);return E2(y,h)},E=new Proxy(C1,a1("",!1));Zy(E);var P1=new Proxy(C1,a1("",!0)),Cx=16,kx=100;function u9(y,x){let h=Array.from(y.querySelectorAll(K2));if(y.matches(K2))h.unshift(y);for(let l of h){let i=I1.get(l);for(let C of i){if(C.path.startsWith("^"))C.path=`${x}${C.path.substring(1)}`;if(C.binding.toDOM!=null)C.binding.toDOM(l,E[C.path])}}}class p8{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(y,x,h={}){if(this.boundElement=y,this.itemToElement=new WeakMap,h.idPath!=null){let g=q1(x);if(g!=null)Ay(g,h.idPath)}let l=h.virtual?.itemsPerRow??1,i=Array.from(y.children).find((g)=>g instanceof HTMLTemplateElement),C=null;if(i!=null){let g=l;if(i.content.children.length<1||i.content.children.length!==g)throw Error(`ListBinding expects a template with exactly ${g} child element(s)`);this.templates=Array.from(i.content.children).map((w)=>u2(w)),C=i.nextElementSibling,i.remove()}else if(y.children.length===1)this.templates=[y.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=h;let k=y.namespaceURI;if(this.isNamespaced=k==="http://www.w3.org/2000/svg"||k==="http://www.w3.org/1998/Math/MathML",this.isNamespaced)this.listTop=null,this.listBottom=null;else if(this.listTop=document.createElement("div"),this.listBottom=document.createElement("div"),this.listTop.classList.add("virtual-list-padding"),this.listBottom.classList.add("virtual-list-padding"),this.listTop.setAttribute("role","presentation"),this.listBottom.setAttribute("role","presentation"),this.listTop.setAttribute("aria-hidden","true"),this.listBottom.setAttribute("aria-hidden","true"),C!=null)this.boundElement.insertBefore(this.listTop,C),this.boundElement.insertBefore(this.listBottom,C);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(l>1){this.boundElement.classList.add("tosi-virtual-grid");let g=this.boundElement.style;if(g!=null)g.setProperty("--tosi-columns",String(l)),g.display=g.display||"grid",g.gridTemplateColumns=g.gridTemplateColumns||"repeat(var(--tosi-columns), 1fr)";if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.gridColumn="1 / -1",this.listBottom.style.gridColumn="1 / -1"}if(h.virtual!=null&&!this.boundElement.getAttribute("role"))this.boundElement.setAttribute("role",l>1?"grid":"list");if(this.boundElement[I0]=this,this.isNamespaced&&h.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&h.virtual!=null)if(O5.observe(this.boundElement),this._update=O2(()=>{this.update(this.array,!0)},Cx),this.boundElement.addEventListener("resize",this._update),h.virtual.scrollContainer==="window")window.addEventListener("scroll",this._update),window.addEventListener("resize",this._update);else this.boundElement.addEventListener("scroll",this._update)}filteredArray(){if(this._filteredCache!=null)return this._filteredCache;let{hiddenProp:y,visibleProp:x}=this.options,h=this.array;if(y!==void 0)h=h.filter((l)=>l[y]!==!0);if(x!==void 0)h=h.filter((l)=>l[x]===!0);if(this.options.filter&&this.needle!==void 0)h=this.options.filter(h,this.needle);return this._filteredCache=h,h}visibleSlice(){let{virtual:y}=this.options,x=this.filteredArray(),h=0,l=x.length-1,i=0,C=0;if(y!=null&&this.boundElement instanceof HTMLElement){let k=this.boundElement.offsetWidth,g=y.scrollContainer==="window",w,B;if(g){w=window.innerHeight;let _=this.boundElement.getBoundingClientRect();B=Math.max(0,-_.top)}else w=this.boundElement.offsetHeight,B=this.boundElement.scrollTop;let j=y.width!=null?Math.max(1,Math.floor(k/y.width)):y.visibleColumns??1,V=Math.ceil(x.length/j);if(y.minHeight!=null){let _=y.minHeight,p=Math.ceil(w/_)+(y.rowChunkSize||1),G=j*p,Y=V*_,X=Math.max(0,Y-w),F=X>0?Math.min(1,Math.max(0,B/X)):0,$=Math.max(0,V-p+1),R=F*$,r=Math.floor(R);if(y.rowChunkSize)r-=r%y.rowChunkSize;return h=r*j,l=h+G-1,i=B,C=Math.max(0,Y-B-w),{items:x,firstItem:h,lastItem:l,topBuffer:i,bottomBuffer:C,interpolation:{t:F,position:R,scrollTop:B,viewportHeight:w,totalScrollHeight:Y,rowHeight:y.height}}}else{let _=Math.ceil(w/y.height)+(y.rowChunkSize||1),p=j*_,G=Math.floor(B/y.height);if(G>V-_+1)G=Math.max(0,V-_+1);if(y.rowChunkSize)G-=G%y.rowChunkSize;h=G*j,l=h+p-1,i=G*y.height,C=Math.max((V-_)*y.height-i,0)}}return{items:x,firstItem:h,lastItem:l,topBuffer:i,bottomBuffer:C}}needle;filter=O2((y)=>{if(this.needle!==y)this.needle=y,this.update(this.array)},kx);update(y,x){if(y==null)y=[];if(this.array=y,!x)this._filteredCache=void 0;let{hiddenProp:h,visibleProp:l}=this.options,i=q1(y),C=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",C.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(C.items.length));let k=this._previousSlice,{firstItem:g,lastItem:w,topBuffer:B,bottomBuffer:j}=C,V=h===void 0&&l===void 0&&x===!0&&k!=null&&g===k.firstItem&&w===k.lastItem;if(V&&C.interpolation==null&&B===k.topBuffer&&j===k.bottomBuffer)return;if(V&&C.interpolation!=null){this._updateInterpolatedBuffers(C);return}this._previousSlice=C;let _=0,p=0,G=0,{idPath:Y}=this.options,X=this.options.virtual?.itemsPerRow??1,F;if(Y!=null){F=new Set;for(let N=g;N<=w;N++){let v=C.items[N];if(v!==void 0)F.add(String(v[Y]))}}let $=new Set;for(let N of Array.from(this.boundElement.children)){if(N===this.listTop||N===this.listBottom)continue;let v=N[G2];if(v==null)continue;else if(v===!0)N.remove(),_++;else{if($.has(v))continue;let s;if(Y!=null)s=!F.has(String(v[Y]));else{let d=C.items.indexOf(v);s=d<g||d>w}if(s){$.add(v);let d=this.itemToElement.get(v);if(d!=null)for(let S of d)S.remove();else N.remove();if(this.itemToElement.delete(v),Y!=null)this.idToElement.delete(String(v[Y]));_++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(B)+"px",this.listBottom.style.height=String(j)+"px";let R=[];for(let N=g;N<=w;N++){let v=C.items[N];if(v===void 0)continue;let s=this.itemToElement.get(J(v));if(s==null&&Y!=null){let d=String(v[Y]);if(s=this.idToElement.get(d),s!=null){let S=J(v);this.itemToElement.set(S,s);for(let y1 of s)y1[G2]=S}}if(s==null){G++;let d=J(v);if(s=this.templates.map((S)=>u2(S)),typeof v==="object")this.itemToElement.set(d,s);for(let S of s)S[G2]=typeof v==="object"?d:!0;for(let S of s)if(this.listBottom!=null)this.boundElement.insertBefore(S,this.listBottom);else this.boundElement.append(S);if(Y!=null){let S=v[Y],y1=`${i}[${Y}=${S}]`;for(let d2 of s)u9(d2,y1);this.idToElement.set(String(S),s)}else{let S=`${i}[${N}]`;for(let y1 of s)u9(y1,S)}}if(this.options.virtual!=null){let d=String(N+1);if(X>1)for(let S=0;S<s.length;S++){let y1=s[S];y1.setAttribute("role","gridcell"),y1.setAttribute("aria-rowindex",d),y1.setAttribute("aria-colindex",String(S+1))}else for(let S of s)S.setAttribute("role","listitem"),S.setAttribute("aria-rowindex",d)}R.push(...s)}let r=null;for(let N of R){if(N.previousElementSibling!==r)if(p++,r?.nextElementSibling!=null)this.boundElement.insertBefore(N,r.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(N,this.listBottom);else this.boundElement.append(N);r=N}if(C.interpolation!=null)this._updateInterpolatedBuffers(C);if(r0.perf)console.log(i,"updated",{removed:_,created:G,moved:p})}_updateInterpolatedBuffers(y){let{t:x,position:h,scrollTop:l,viewportHeight:i,totalScrollHeight:C,rowHeight:k}=y.interpolation,g=0;for(let V of Array.from(this.boundElement.children)){if(V===this.listTop||V===this.listBottom)continue;g+=V.offsetHeight||k}let w=l,B=l+i-g,j=Math.max(0,x*B+(1-x)*w-h%1*k);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(j)+"px",this.listBottom.style.height=String(Math.max(0,C-j-g))+"px"}}var Q2=(y,x,h)=>{let l=y[I0];if(x&&l===void 0)l=new p8(y,x,h),y[I0]=l;return l},c5=(y)=>{let x;while(!(x=y[G2])&&y&&y.parentElement)y=y.parentElement;return x?{element:y,item:x}:void 0},C2=(y)=>{let x=c5(y);return x?x.item:void 0},gx=(y)=>{let x=c5(y);if(!x)return console.error("deleteListItem failed, element is not part of a list instance",y),!1;let h=Q2(x.element.parentElement);if(!h.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",y.parentElement,h),!1;let l=h.array.indexOf(x.item);if(l>-1)return h.array.splice(l,1),!0;return!1},wx={start:"start",middle:"center",end:"end",nearest:"nearest"},Bx=(y,x,h={})=>{let l=Q2(y);if(l==null)return console.error("scrollListItemIntoView failed, element has no list binding",y),!1;let{position:i="middle",behavior:C="smooth"}=h,k=l.filteredArray(),g=J(x)??x,w=k.indexOf(g);if(w===-1)return console.error("scrollListItemIntoView failed, item not found in list",x),!1;let{virtual:B}=l.options;if(B!=null&&y instanceof HTMLElement){let j=B.width!=null?Math.max(1,Math.floor(y.offsetWidth/B.width)):B.visibleColumns??1,V=Math.floor(w/j),_=B.minHeight??B.height,p=Math.ceil(k.length/j),G=B.scrollContainer==="window",Y=G?window.innerHeight:y.offsetHeight,X;if(B.minHeight!=null){let F=Math.ceil(Y/_)+(B.rowChunkSize||1),$=p*_,R=Math.max(0,$-Y),r=Math.max(1,p-F+1),N=V/r;switch(i){case"start":X=N*R;break;case"end":X=Math.max(0,(V-F+1)/r*R);break;case"nearest":{let v=G?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop,s=R>0?v/R:0,d=Math.floor(s*r);if(V<d)X=N*R;else if(V>=d+F)X=Math.max(0,(V-F+1)/r*R);else return!0;break}default:{let v=V-Math.floor(F/2);X=Math.max(0,v)/r*R}}}else{let F=V*B.height;switch(i){case"start":X=F;break;case"end":X=F-Y+B.height;break;case"nearest":{let $=G?Math.max(0,-y.getBoundingClientRect().top):y.scrollTop;if(F<$)X=F;else if(F+B.height>$+Y)X=F-Y+B.height;else return!0;break}default:X=F-(Y-B.height)/2}}if(X=Math.max(0,X),G){let F=y.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:F+X,behavior:C})}else y.scrollTo({top:X,behavior:C})}else{let j=l.itemToElement.get(g);if(j==null||j.length===0)return console.error("scrollListItemIntoView failed, no DOM element found for item",x),!1;j[0].scrollIntoView({block:wx[i]??"center",behavior:C})}return!0},{document:m2,MutationObserver:a9}=globalThis,R5=(y,x)=>{let h=I1.get(y);if(h==null)return;for(let l of h){let{binding:i,options:C}=l,{path:k}=l,{toDOM:g}=i;if(g!=null){if(k.startsWith("^")){let w=C2(y);if(w!=null&&w[c1]!=null)k=l.path=`${w[c1]}${k.substring(1)}`;else{if(y instanceof HTMLElement)console.warn(`Unresolved relative binding "${k}" —`,y,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(x==null||k.startsWith(x))g(y,n0()[k],C)}}};if(a9!=null)new a9((y)=>{y.forEach((x)=>{Array.from(x.addedNodes).forEach((h)=>{if(h instanceof Element)Array.from(h.querySelectorAll(K2)).forEach((l)=>R5(l))})})}).observe(m2.body,{subtree:!0,childList:!0});E2(()=>!0,(y)=>{let x=Array.from(m2.querySelectorAll(K2));for(let h of x)R5(h,y)});var m9=(y)=>{let x=y.target?.closest(K2);while(x!=null){let h=I1.get(x);for(let l of h){let{binding:i,path:C}=l,{fromDOM:k}=i;if(k!=null){let g;try{g=k(x,l.options)}catch(w){throw console.error("Cannot get value from",x,"via",l),Error("Cannot obtain value fromDOM")}if(g!=null){let w=n0(),B=w[C];if(B==null)w[C]=g;else{let j=B[c1]!=null?B[U2]:B,V=g[c1]!=null?g[U2]:g;if(j!==V)w[C]=V}}}}x=x.parentElement.closest(K2)}};if(globalThis.document!=null)m2.body.addEventListener("change",m9,!0),m2.body.addEventListener("input",m9,!0);function zx(y,x,h,l){let{paths:i,transform:C}=x,{toDOM:k}=h;if(k==null)return y;let g=null,w={toDOM(j,V,_){let p=n0(),G=i.map((X)=>p[X]);if(g!==null&&G.every((X,F)=>X===g[F]))return;g=G;let Y=C(...G);k(j,Y,_)},fromDOM:h.fromDOM};y.classList?.add(F5);let B=I1.get(y);if(B==null)B=[],I1.set(y,B);for(let j of i)B.push({path:j,binding:w,options:l});if(!i[0].startsWith("^"))_1(i[0]);return y}function S1(y,x,h,l){if(y instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(x!=null&&typeof x==="object"&&x[M0])return zx(y,x,h,l);let i;if(typeof x==="object"&&x[c1]===void 0&&l===void 0){let{value:g}=x;i=typeof g==="string"?g:g[c1],l=x,delete l.value}else i=typeof x==="string"?x:x[c1];if(i==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:C}=h;y.classList?.add(F5);let k=I1.get(y);if(k==null)k=[],I1.set(y,k);if(k.push({path:i,binding:h,options:l}),C!=null&&!i.startsWith("^"))_1(i);if(l?.filter&&l?.needle)S1(y,l.needle,{toDOM(g,w){console.log({needle:w}),g[I0]?.filter(w)}});return y}var t9=new Set,jx=(y)=>{let x=y?.target?.closest(J9),h=!1,l=new Proxy(y,{get(C,k){if(k==="stopPropagation")return()=>{y.stopPropagation(),h=!0};else{let g=C[k];return typeof g==="function"?g.bind(C):g}}}),i=new Set;while(!h&&x!=null){let C=n2.get(x)[y.type]||i;for(let k of C){if(typeof k==="function")k(l);else{let g=n0()[k];if(typeof g==="function")g(l);else throw Error(`no event handler found at path ${k}`)}if(h)continue}x=x.parentElement!=null?x.parentElement.closest(J9):null}};function W2(y,x,h){let l=n2.get(y);if(y.classList.add(x8),l==null)l={},n2.set(y,l);if(!l[x])l[x]=new Set;if(l[x].add(h),!t9.has(x))t9.add(x),m2.body.addEventListener(x,jx,!0);return()=>{l[x].delete(h)}}vy(S1,W2);function Q8(y,x){if(!y.internals)return;let h={},l="";if(y.hasAttribute("required")&&x==="")h.valueMissing=!0,l="Please fill out this field.";let i=y.getAttribute("minlength");if(i&&x.length<parseInt(i,10))h.tooShort=!0,l=`Please use at least ${i} characters.`;let C=y.getAttribute("maxlength");if(C&&x.length>parseInt(C,10))h.tooLong=!0,l=`Please use no more than ${C} characters.`;let k=y.getAttribute("pattern");if(k&&x!=="")try{if(!new RegExp(`^(?:${k})$`).test(x))h.patternMismatch=!0,l="Please match the requested format."}catch{}if(Object.keys(h).length>0)y.internals.setValidity(h,l,y);else y.internals.setValidity({})}var qx=0;function w5(){return`custom-elt${(qx++).toString(36)}`}var E9=0,B5=null;function Vx(){if(B5===null)B5=new MutationObserver((y)=>{let x=new Set;for(let h of y)if(h.type==="attributes"&&h.target instanceof U){let l=h.target,i=j8(h.attributeName);if(l._legacyTrackedAttrs?.has(i))x.add(l)}for(let h of x)h.queueRender(!1)});return B5}var M2={};function Px(y,x){let h=M2[y],l=p2(x).replace(/:host\(([^)]+)\)/g,`${y}$1`).replace(/:host\b/g,y);M2[y]=h?h+`
13
+ `+l:l}function _x(y){if(M2[y])document.head.append(K.style({id:y+"-component"},M2[y]));delete M2[y]}class U extends HTMLElement{static elements=K;static _elementCreator;static initAttributes;static formAssociated;static preferredTagName;static shadowStyleSpec;static lightStyleSpec;static extends;internals;get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(y){if(this.internals)if(y)this.internals.setValidity({customError:!0},y);else this.internals.setValidity({})}setValidity(y,x,h){this.internals?.setValidity(y,x,h)}setFormValue(y,x){this.internals?.setFormValue(y,x)}static get observedAttributes(){let y=this.initAttributes;if(y)return["hidden",...Object.keys(y).map(O1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=K.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;_pendingAttrOps;static StyleNode(y){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),K.style(p2(y))}static elementCreator(y={}){let x=this;if(!Object.prototype.hasOwnProperty.call(x,"_elementCreator")){if(y.tag!==void 0)j1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(y.styleSpec!==void 0)j1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(y.extends!==void 0)j1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let h=y.tag??x.preferredTagName;if(h==null)if(typeof x.name==="string"&&x.name!==""){if(h=O1(x.name),h.startsWith("-"))h=h.slice(1)}else h=w5();if(customElements.get(h)!=null)console.warn(`${h} is already defined`);if(h.match(/\w+(-\w+)+/)==null)console.warn(`${h} is not a legal tag for a custom-element`),h=w5();while(customElements.get(h)!==void 0)h=w5();x._tagName=h;let l=y.styleSpec??x.lightStyleSpec;if(l!==void 0)Px(h,l);let i=y.extends??x.extends,C=i?{extends:i}:void 0;window.customElements.define(h,this,C),x._elementCreator=K[h]}return x._elementCreator}initAttributes(...y){if(j1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let l of y)this._legacyTrackedAttrs.add(l);Vx().observe(this,{attributes:!0});let x={},h={};y.forEach((l)=>{x[l]=i2(this[l]);let i=O1(l);Object.defineProperty(this,l,{enumerable:!1,get(){if(typeof x[l]==="boolean")return this.hasAttribute(i);else if(this.hasAttribute(i))return typeof x[l]==="number"?parseFloat(this.getAttribute(i)):this.getAttribute(i);else if(h[l]!==void 0)return h[l];else return x[l]},set(C){if(typeof x[l]==="boolean"){if(C!==this[l]){if(C)this.setAttribute(i,"");else this.removeAttribute(i);this.queueRender()}}else if(typeof x[l]==="number"){if(C!==parseFloat(this[l]))this.setAttribute(i,C),this.queueRender()}else if(typeof C==="object"||`${C}`!==`${this[l]}`){if(C===null||C===void 0||typeof C==="object")this.removeAttribute(i);else this.setAttribute(i,C);this.queueRender(),h[l]=C}}})})}initValue(){let y=Object.getOwnPropertyDescriptor(this,"value");if(y===void 0||y.get!==void 0||y.set!==void 0)return;let x=this.hasAttribute("value")?this.getAttribute("value"):i2(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return x},set(h){if(x!==h)x=h,this._valueChanged=!0,this.queueRender(!0)}})}_parts;get parts(){let y=this.shadowRoot!=null?this.shadowRoot:this;if(this._parts==null)this._parts=new Proxy({},{get(x,h){if(x[h]===void 0){let l=y.querySelector(`[part="${h}"]`);if(l==null)l=y.querySelector(h);if(l==null)throw Error(`elementRef "${h}" does not exist!`);l.removeAttribute("data-ref"),x[h]=l}return x[h]}});return this._parts}attributeChangedCallback(y,x,h){let l=j8(y);if(!this._legacyTrackedAttrs?.has(l))this.queueRender(!1)}constructor(){super();if(E9+=1,this._installAttributeQueue(),this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let y=this.constructor.initAttributes;if(y)this._setupAttributeAccessors(y);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${E9}`,this._value=i2(this.defaultValue)}_installAttributeQueue(){let y=this.constructor.initAttributes;if(!y)return;let x=new Set(Object.keys(y).map(O1)),h=[];this._pendingAttrOps=h;let l=HTMLElement.prototype;this.setAttribute=(i,C)=>{if(x.has(i))h.push(["set",i,String(C)]);else l.setAttribute.call(this,i,C)},this.removeAttribute=(i)=>{if(x.has(i))h.push(["remove",i]);else l.removeAttribute.call(this,i)},queueMicrotask(()=>this._drainPendingAttrOps())}_drainPendingAttrOps(){let y=this._pendingAttrOps;if(y===void 0)return;this._pendingAttrOps=void 0,delete this.setAttribute,delete this.removeAttribute;for(let x of y)if(x[0]==="set"){if(!this.hasAttribute(x[1]))this.setAttribute(x[1],x[2])}else this.removeAttribute(x[1])}_setupAttributeAccessors(y){if(!this._attrValues)this._attrValues=new Map;for(let x of Object.keys(y)){let h=O1(x),l=y[x];if(x==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof l==="object"&&l!==null){console.warn(`${this.tagName}: initAttributes.${x} is an object. Use a regular property instead.`);continue}let i=this,C=!1;while(i){let k=Object.getOwnPropertyDescriptor(i,x);if(k){if(!k.configurable||k.get||k.set){C=!0;break}break}i=Object.getPrototypeOf(i)}if(C)continue;Object.defineProperty(this,x,{enumerable:!1,get:()=>{if(typeof l==="boolean"){if(this.hasAttribute(h))return!0;if(this._attrValues.has(x))return this._attrValues.get(x);return!1}else if(this.hasAttribute(h))return typeof l==="number"?parseFloat(this.getAttribute(h)):this.getAttribute(h);else if(this._attrValues.has(x))return this._attrValues.get(x);else return l},set:(k)=>{if(typeof l==="boolean"){if(k!==this[x]){if(k)this.setAttribute(h,"");else this.removeAttribute(h);this.queueRender(),this._attrValues.set(x,!!k)}}else if(typeof l==="number"){if(k!==parseFloat(this[x]))this.setAttribute(h,k),this.queueRender(),this._attrValues.set(x,k)}else if(typeof k==="object"||`${k}`!==`${this[x]}`){if(k===null||k===void 0||typeof k==="object")this.removeAttribute(h);else this.setAttribute(h,k);this.queueRender(),this._attrValues.set(x,k)}}})}}connectedCallback(){if(this._drainPendingAttrOps(),_x(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");if(this.onResize!==void 0){if(O5.observe(this),this._onResize==null)this._onResize=this.onResize.bind(this);this.addEventListener("resize",this._onResize)}if(this.value!=null&&this.getAttribute("value")!=null)this._value=this.getAttribute("value");if(this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this.queueRender()}disconnectedCallback(){O5.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(y){if(y)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(y){if(this.value!==void 0&&typeof y==="string")this.value=y}_changeQueued=!1;_renderQueued=!1;queueRender(y=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=y;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(B8(this,"change"),this.internals&&this.value!==void 0)this.internals.setFormValue(this.value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;hydrate(){if(!this._hydrated){this.initValue();let y=typeof this.content!=="function",x=typeof this.content==="function"?this.content(K):this.content;if(Array.isArray(x)){let C={};x=x.filter((k)=>{if(k instanceof Node||typeof k==="string"||typeof k==="number"||q1(k))return!0;return Object.assign(C,k),!1});for(let k of Object.keys(C))N5(this,k,C[k])}let h=this.constructor,l=h.shadowStyleSpec??h.styleSpec;if(h.styleSpec&&!h.shadowStyleSpec)j1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:i}=h;if(l)i=h.styleNode=K.style(p2(l)),delete h.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),i=this.styleNode;if(i){let C=this.attachShadow({mode:"open"});C.appendChild(i.cloneNode(!0)),S9(C,x,y)}else if(x!==null){let C=Array.from(this.childNodes);S9(this,x,y),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==void 0;let k=Array.from(this.querySelectorAll("slot"));if(k.length>0)k.forEach(a0.replaceSlot);if(C.length>0){let g={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((w)=>{g[w.name]=w}),C.forEach((w)=>{let B=g[""],j=w instanceof Element?g[w.slot]:B;(j!==void 0?j:B).append(w)})}}this._hydrated=!0}}render(){if(this._valueChanged&&this.internals&&this.value!==void 0)this.internals.setFormValue(this.value),this.validateValue();this._valueChanged=!1}validateValue(){if(!this.internals||this.value===void 0)return;let y=typeof this.value==="string"?this.value:String(this.value);Q8(this,y)}}class a0 extends U{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(y){let x=document.createElement("tosi-slot");if(y.name!=="")x.setAttribute("name",y.name);y.replaceWith(x)}}var Ax=a0.elementCreator();class W8 extends U{static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();j1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=a0.replaceSlot}var Gx=W8.elementCreator(),Kx=(y=()=>!0)=>{let x=localStorage.getItem("xin-state");if(x!=null){let l=JSON.parse(x);for(let i of Object.keys(l).filter(y))if(E[i]!==void 0)Object.assign(E[i],l[i]);else E[i]=l[i]}let h=e2(()=>{let l={},i=J(E);for(let C of Object.keys(i).filter(y))l[C]=i[C];localStorage.setItem("xin-state",JSON.stringify(l)),console.log("xin state saved to localStorage")},500);$5(y,h)},Ux="tosijs-share",Ox="tosijs-share",L2="shared",px=1,p5=new Set,Q5=new Set,z5=new Map,l2=null,W5="",S0=null,Qx=null;function e9(){if(S0!=null)return Promise.resolve(S0);return new Promise((y,x)=>{let h=indexedDB.open(Ox,px);h.onupgradeneeded=()=>{h.result.createObjectStore(L2)},h.onsuccess=()=>{S0=h.result,y(S0)},h.onerror=()=>x(h.error)})}var Wx={async get(y){let x=await e9();return new Promise((h,l)=>{let i=x.transaction(L2,"readonly").objectStore(L2).get(y);i.onsuccess=()=>h(i.result),i.onerror=()=>l(i.error)})},async set(y,x){let h=await e9();return new Promise((l,i)=>{let C=h.transaction(L2,"readwrite");C.objectStore(L2).put(x,y),C.oncomplete=()=>l(),C.onerror=()=>i(C.error)})}};function Y8(){return Qx??Wx}function Yx(y){return y!=null&&y.type==="tosijs-share"&&typeof y.path==="string"}function F8(y){for(let x of p5)if(y===x||y.startsWith(x+"."))return x;return}function Fx(y){for(let x of Q5)if(y===x||y.startsWith(x+"."))return!0;return!1}function Xx(y,x){Q5.add(y),t2(C1,y,x),_1(y),s5().then(()=>{Q5.delete(y)})}function sx(){if(l2!=null)return l2;return W5=crypto.randomUUID(),l2=new BroadcastChannel(Ux),l2.onmessage=(y)=>{let x=y.data;if(!Yx(x))return;if(x.origin===W5)return;if(F8(x.path)===void 0)return;Xx(x.path,x.value)},l2}function Nx(y,x){if(l2==null)return;let h={type:"tosijs-share",path:y,value:x,origin:W5};l2.postMessage(h)}function Zx(y){if(!z5.has(y))z5.set(y,e2(()=>{let x=h1(C1,y);Y8().set(y,x)},500));z5.get(y)()}async function vx(...y){if(typeof BroadcastChannel>"u")return{restored:[]};sx();let x=[],h=Y8();for(let l of y){let i=typeof l==="string"?l:q1(l);if(i===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(p5.has(i))continue;p5.add(i);let C=await h.get(i);if(C!==void 0)t2(C1,i,C),_1(i),x.push(l);else{let k=h1(C1,i);await h.set(i,k)}E2((k)=>k===i||k.startsWith(i+"."),(k)=>{if(Fx(k))return;let g=F8(k);if(g===void 0)return;let w=h1(C1,k);Nx(k,w),Zx(g)})}return{restored:x}}var Y5=new Set;function y8(y,x){for(let h of y)if(x===h||x.startsWith(h+"."))return h;return}function $x(y){for(let x of Y5)if(y===x||y.startsWith(x+"."))return!0;return!1}function cx(y,x){Y5.add(y),t2(C1,y,x),_1(y),s5().then(()=>{Y5.delete(y)})}async function Rx(y,x,...h){let l=new Set,i=[],C=[],k=x.throttleInterval??100;await y.connect();let g=O2(()=>{if(i.length===0)return;let w=i.splice(0);y.send(w)},k);y.onReceive((w)=>{for(let B of w){if(y8(l,B.path)===void 0)continue;cx(B.path,B.value)}});for(let w of h){let B=typeof w==="string"?w:q1(w);if(B===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");l.add(B);let j=E2((V)=>V===B||V.startsWith(B+"."),(V)=>{if($x(V))return;if(y8(l,V)===void 0)return;let _=h1(C1,V);i.push({path:V,value:_}),g()});C.push(j)}return{disconnect(){for(let w of C)a2(w);C.length=0,l.clear(),i.length=0,y.disconnect()}}}var X8="1.6.4";function e(y){return Object.assign(P1,y),P1}function J5(y){return j1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),e(y)}var Jx=new FinalizationRegistry((y)=>{y()});function Hx(y,x){let h=l8();P1[h]=y;let l=P1[h],i=()=>{delete E[h]};if(x)Jx.register(x,i);return[l,i]}function s8(y,x=!1){if(x)return j1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),J5(y);return Object.keys(y).forEach((h)=>{E[h]=y[h]}),E}var fx={};async function H5(y,x){let h=await x(y,{Color:W,Component:U,elements:K,svgElements:u0,mathML:U8,varDefault:P,vars:z,xin:E,boxed:P1,xinProxy:s8,boxedProxy:J5,tosi:e,makeComponent:H5,bind:S1,on:W2,version:X8}),{type:l}=h;l.preferredTagName=y;let i=h.lightStyleSpec??h.styleSpec;if(i)l.lightStyleSpec=i;let C={type:l,creator:l.elementCreator()};return fx[y]=C,C}var m0={":host":{display:"none"}},j5={},Dx=(y)=>import(y);class t0 extends U{static preferredTagName="tosi-blueprint";static lightStyleSpec=m0;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(y)=>{};async packaged(){let{tag:y,src:x,property:h}=this,l=`${y}.${h}:${x}`;if(!this.loaded){if(j5[l]===void 0)j5[l]=Dx(x).then((i)=>{let C=i[h];return H5(y,C)});else console.log(`using cached ${y} with signature ${l}`);this.loaded=await j5[l],this.blueprintLoaded(this.loaded)}return this.loaded}}var bx=t0.elementCreator();class f5 extends U{static preferredTagName="tosi-loader";static lightStyleSpec=m0;allLoaded=()=>{};async load(){let y=Array.from(this.querySelectorAll("tosi-blueprint, xin-blueprint")).filter((x)=>x.src).map((x)=>x.packaged());await Promise.all(y),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var dx=f5.elementCreator();class N8 extends t0{static preferredTagName="xin-blueprint";static lightStyleSpec=m0;constructor(){super();j1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var Sx=N8.elementCreator();class Z8 extends U{static preferredTagName="xin-loader";static lightStyleSpec=m0;allLoaded=()=>{};constructor(){super();j1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){let y=Array.from(this.querySelectorAll("xin-blueprint")).filter((x)=>x.src).map((x)=>x.packaged());await Promise.all(y),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Ix=Z8.elementCreator();var D5={};class Y2 extends U{static preferredTagName="tosi-ab";static set conditions(y){Object.assign(D5,y);for(let x of[...Y2.instances])x.queueRender()}static initAttributes={condition:"",not:!1};static instances=new Set;connectedCallback(){super.connectedCallback(),Y2.instances.add(this)}disconnectedCallback(){super.disconnectedCallback(),Y2.instances.delete(this)}render(){if(this.condition!==""&&(this.not?D5[this.condition]!==!0:D5[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var rx=Y2.elementCreator();var E0={};function A1(y,x){if(E0[y]===void 0){if(x!==void 0){let l=globalThis[x];E0[y]=Promise.resolve({[x]:l})}let h=K.script({src:y});document.head.append(h),E0[y]=new Promise((l)=>{h.onload=()=>l(globalThis)})}return E0[y]}var b5={};function e0(y){if(b5[y]===void 0){let x=K.link({rel:"stylesheet",type:"text/css",href:y});document.head.append(x),b5[y]=new Promise((h)=>{x.onload=h})}return b5[y]}var k2={blueprint:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,7.5,15.5,7.5,17.5 C7.5,19.5,10.5,19.5,10.5,19.5"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,14.5 C18.5,14.5,21.5,15.5,21.5,17.5 C21.5,19.5,18.5,19.5,18.5,19.5"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M7,5.09 C7,3.94,7.9,3,9,3 C9,3,20,3,20,3 C21.1,3,22,3.94,22,5.09 C22,5.09,22,12.41,22,12.41 C22,13.56,21.1,14.5,20,14.5 C20,14.5,9,14.5,9,14.5 C7.9,14.5,7,13.56,7,12.41 C7,12.41,7,5.09,7,5.09 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14.5,5.5 C14.5,5.5,14.5,11.5,14.5,11.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16.5,7.5 C16.5,7.5,16.5,8.5,16.5,8.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,7.5 C12.5,7.5,12.5,8.5,12.5,8.5"/><g/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,21.5 C18.5,21.5,17.5,20.5,17.5,20.5 C17.5,20.5,16.5,21.5,16.5,21.5"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,21.5 C12.5,21.5,11.5,20.5,11.5,20.5 C11.5,20.5,10.5,21.5,10.5,21.5"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,18.5,14.5,18.5,14.5 C18.5,14.5,18.5,19.5,18.5,19.5 C18.5,19.5,10.5,19.5,10.5,19.5 C10.5,19.5,10.5,14.5,10.5,14.5 z"/><g><g><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,16.5 C14,16.5,16,16.5,16,16.5 C16,16.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:evenodd;stroke:none;" d="M3.59,8.5 C3.59,8.5,12.59,8.5,12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5 C14.53,19.5,5.53,19.5,5.53,19.5 C5.53,19.5,3.59,8.5,3.59,8.5 z"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,11.12,11.5,11.12,11.5 C11.12,11.5,2.12,11.5,2.12,11.5 C2.12,11.5,3.59,8.5,3.59,8.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.12,11.5 C4.12,11.5,5.53,19.5,5.53,19.5"/></g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M9.24,12.5 C10.75,12.5,12.2,13.73,12.46,15.24 C12.46,15.24,12.46,15.24,12.46,15.24 C12.68,16.49,11.85,17.5,10.6,17.5 C10.6,17.5,10.55,17.5,10.55,17.5 C10.17,17.5,9.92,17.81,9.98,18.19 C9.98,18.19,9.98,18.19,9.98,18.19 C10.21,19.47,9.36,20.5,8.08,20.5 C8.08,20.5,6.39,20.5,6.39,20.5 C5.1,20.5,3.87,19.45,3.64,18.16 C3.64,18.16,3.12,15.21,3.12,15.21 C2.86,13.71,3.86,12.5,5.35,12.5 C5.35,12.5,9.24,12.5,9.24,12.5 z"/></g></g></svg> ',earth:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,13.46 C5.1,16.52,4,20.13,4,24 C4,31.81,8.47,38.57,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 z"/><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C20.18,4.28,22.06,4,24,4 C27.57,4,30.92,4.93,33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C33.81,42.07,29.13,44,24,44 C21.03,44,18.22,43.35,15.69,42.2 C15.69,42.2,27,29,27,29 C27,29,27,25,27,25 C27,25,21,23,21,23 C21,23,15,19,15,19 C15,19,11,19,11,19 C11,19,11,13,11,13 C11,13,13,11,13,11 C13,11,15,15,15,15 C15,15,17,15,17,15 C17,15,17,9,17,9 C17,9,18.4,4.79,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C18.4,4.79,17,9,17,9 C17,9,17,15,17,15 C17,15,15,15,15,15 C15,15,13,11,13,11 C13,11,11,13,11,13 C11,13,11,19,11,19 C11,19,15,19,15,19 C15,19,21,23,21,23 C21,23,27,25,27,25 C27,25,27,29,27,29 C27,29,15.69,42.2,15.69,42.2 C15.46,42.09,15.23,41.98,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 C9.57,9.32,13.62,6.19,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C41.43,35.23,44,29.91,44,24 C44,16.52,39.9,10,33.82,6.57 z"/></g></g></g></svg> ',cmy:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#00ff00;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#000000;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#02fefe;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#fffe00;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#ff00ff;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',rgb:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#ff00ff;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#ffff00;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#ffffff;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#00ffff;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#00ff00;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',xrColor:'<svg class="color filled" viewBox="0 0 40 24"><g><g><g><path style="fill:#000000;fill-rule:evenodd;" d="M20,2 C19.99,2,19.98,2,19.98,2 C8.39,2,2,3.61,2,12 C2,18.41,5.32,22,10.54,22 C15.77,22,17.37,17.85,19.98,17.85 C19.98,17.85,19.99,17.85,20,17.85 C20.01,17.85,20.02,17.85,20.02,17.85 C22.63,17.85,24.23,22,29.46,22 C34.68,22,38,18.41,38,12 C38,3.61,31.61,2,20.02,2 C20.02,2,20.01,2,20,2 C20,2,20,2,20,2 z"/></g><path style="fill:#fbed21;fill-rule:evenodd;" d="M12.2,19.84 C15.79,19.39,17.07,16.46,19.07,16.46 C19.07,16.46,19.08,16.46,19.09,16.46 C19.09,16.46,19.1,16.46,19.11,16.46 C19.44,16.46,19.75,16.54,20.06,16.68 C20.37,16.54,20.68,16.46,21.01,16.46 C21.02,16.46,21.02,16.46,21.03,16.46 C21.04,16.46,21.04,16.46,21.05,16.46 C23.05,16.46,24.33,19.39,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M12.2,19.84 C12.52,19.87,12.86,19.89,13.21,19.89 C16.86,19.89,18.37,17.43,20.06,16.68 C19.75,16.54,19.44,16.46,19.11,16.46 C19.1,16.46,19.09,16.46,19.09,16.46 C19.08,16.46,19.07,16.46,19.07,16.46 C17.07,16.46,15.79,19.39,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M20.06,3.35 C20.37,3.35,20.69,3.35,21.01,3.35 C21.02,3.35,21.02,3.35,21.03,3.35 C21.03,3.35,21.03,3.35,21.03,3.35 C21.04,3.35,21.04,3.35,21.05,3.35 C30.64,3.35,35.92,4.68,35.92,11.62 C35.92,16.92,33.18,19.89,28.86,19.89 C28.53,19.89,28.22,19.87,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C20.06,3.35,20.06,3.35,20.06,3.35 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M20.06,16.68 C21.74,17.43,23.25,19.89,26.91,19.89 C27.26,19.89,27.59,19.87,27.92,19.84 C24.33,19.39,23.05,16.46,21.05,16.46 C21.04,16.46,21.04,16.46,21.03,16.46 C21.02,16.46,21.02,16.46,21.01,16.46 C20.68,16.46,20.37,16.54,20.06,16.68 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M12.2,19.84 C11.9,19.87,11.59,19.89,11.26,19.89 C6.94,19.89,4.19,16.92,4.19,11.62 C4.19,4.68,9.48,3.35,19.07,3.35 C19.07,3.35,19.08,3.35,19.09,3.35 C19.09,3.35,19.09,3.35,19.09,3.35 C19.09,3.35,19.1,3.35,19.11,3.35 C19.43,3.35,19.75,3.35,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/></g><g><path style="fill:#8cc63e;fill-rule:nonzero;" d="M22.55,8.63 C22.55,9.05,22.55,9.46,22.55,9.88 C22.54,10.25,22.85,10.56,23.2,10.55 C23.54,10.56,23.85,10.25,23.85,9.88 C23.85,9.46,23.85,9.05,23.85,8.63 C23.85,8.26,23.54,7.95,23.2,7.96 C22.85,7.95,22.54,8.26,22.55,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M17.32,8.63 C17.32,9.05,17.32,9.46,17.32,9.88 C17.31,10.25,17.62,10.56,17.97,10.55 C18.31,10.56,18.62,10.25,18.62,9.88 C18.62,9.46,18.62,9.05,18.62,8.63 C18.62,8.26,18.31,7.95,17.97,7.96 C17.62,7.95,17.31,8.26,17.32,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M19.99,4.39 C19.99,8.09,19.99,11.8,19.99,15.5 C19.99,15.87,20.3,16.18,20.64,16.17 C20.99,16.18,21.3,15.87,21.29,15.5 C21.29,11.8,21.29,8.09,21.29,4.39 C21.3,4.02,20.99,3.71,20.64,3.72 C20.3,3.71,19.99,4.02,19.99,4.39 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M21.43,8.63 C21.43,9.05,21.43,9.46,21.43,9.88 C21.42,10.25,21.73,10.56,22.08,10.55 C22.42,10.56,22.73,10.25,22.73,9.88 C22.73,9.46,22.73,9.05,22.73,8.63 C22.73,8.26,22.42,7.95,22.08,7.96 C21.73,7.95,21.42,8.26,21.43,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M16.2,8.63 C16.2,9.05,16.2,9.46,16.2,9.88 C16.19,10.25,16.5,10.56,16.85,10.55 C17.19,10.56,17.5,10.25,17.5,9.88 C17.5,9.46,17.5,9.05,17.5,8.63 C17.5,8.26,17.19,7.95,16.85,7.96 C16.5,7.95,16.19,8.26,16.2,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M18.87,4.39 C18.87,8.09,18.87,11.8,18.87,15.5 C18.87,15.87,19.18,16.18,19.52,16.17 C19.86,16.18,20.18,15.87,20.17,15.5 C20.17,11.8,20.17,8.09,20.17,4.39 C20.18,4.02,19.86,3.71,19.52,3.72 C19.18,3.71,18.87,4.02,18.87,4.39 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M21.97,8.63 C21.97,9.05,21.97,9.46,21.97,9.88 C21.97,10.25,22.28,10.56,22.62,10.55 C22.97,10.56,23.28,10.25,23.27,9.88 C23.27,9.46,23.27,9.05,23.27,8.63 C23.28,8.26,22.97,7.95,22.62,7.96 C22.28,7.95,21.97,8.26,21.97,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M16.74,8.63 C16.74,9.05,16.74,9.46,16.74,9.88 C16.74,10.25,17.05,10.56,17.39,10.55 C17.74,10.56,18.05,10.25,18.04,9.88 C18.04,9.46,18.04,9.05,18.04,8.63 C18.05,8.26,17.74,7.95,17.39,7.96 C17.05,7.95,16.74,8.26,16.74,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M19.41,4.39 C19.41,8.09,19.41,11.8,19.41,15.5 C19.41,15.87,19.72,16.18,20.07,16.17 C20.41,16.18,20.72,15.87,20.72,15.5 C20.72,11.8,20.72,8.09,20.72,4.39 C20.72,4.02,20.41,3.71,20.07,3.72 C19.72,3.71,19.41,4.02,19.41,4.39 z"/></g></g></svg> ',tosiFavicon:'<svg class="color" viewBox="0 0 48 48"><g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M1,9 C1,4.58,4.58,1,9,1 C9,1,39,1,39,1 C43.42,1,47,4.58,47,9 C47,9,47,39,47,39 C47,43.42,43.42,47,39,47 C39,47,9,47,9,47 C4.58,47,1,43.42,1,39 C1,39,1,9,1,9 z"/><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,10,31,10,35 C10,39,16,39,16,39"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,29 C32,29,38,31,38,35 C38,39,32,39,32,39"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,10.18 C9,7.87,10.79,6,13,6 C13,6,35,6,35,6 C37.21,6,39,7.87,39,10.18 C39,10.18,39,24.82,39,24.82 C39,27.13,37.21,29,35,29 C35,29,13,29,13,29 C10.79,29,9,27.13,9,24.82 C9,24.82,9,10.18,9,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,43 C32,43,30,41,30,41 C30,41,28,43,28,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,43 C20,43,18,41,18,41 C18,41,16,43,16,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,32,29,32,29 C32,29,32,39,32,39 C32,39,16,39,16,39 C16,39,16,29,16,29 z"/></g></g></g></svg> ',tosiPlatform:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#3ea9f5;fill-rule:evenodd;stroke:none;" d="M23.97,47 C23.97,47,39,47,39,47 C43.42,47,47,43.42,47,39 C47,39,47,9,47,9 C47,4.58,43.42,1,39,1 C39,1,9,1,9,1 C4.58,1,1,4.58,1,9 C1,9,1,39,1,39 C1,41.64,2.28,43.98,4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;" d="M4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 C23.97,47,9,47,9,47 C7.22,47,5.58,46.42,4.25,45.44 z"/></g><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M35,35 C35,35,32.17,35,32.17,35 C32.17,35,32.17,37.83,32.17,37.83"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,39 C31,39,28.17,39,28.17,39 C28.17,39,28.17,41.83,28.17,41.83"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7.48,16 C4.45,16,2,18.45,2,21.48 C2,21.48,2,21.48,2,21.48 C2,23.98,4.02,26,6.52,26 C6.52,26,6.62,26,6.62,26 C7.38,26,8,26.62,8,27.38 C8,27.38,8,27.38,8,27.38 C8,29.93,10.07,32,12.62,32 C12.62,32,16,32,16,32 C18.58,32,20.68,29.91,20.68,27.32 C20.68,27.32,20.68,21.42,20.68,21.42 C20.68,18.43,18.25,16,15.26,16 C15.26,16,7.48,16,7.48,16 z"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,29 C17,29,33,29,33,29 C33,29,33,29,33,29 C33,34.52,28.52,39,23,39 C23,39,23,39,23,39 C19.69,39,17,36.31,17,33 C17,33,17,29,17,29 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40.52,16 C43.55,16,46,18.45,46,21.48 C46,21.48,46,21.48,46,21.48 C46,23.98,43.98,26,41.48,26 C41.48,26,41.38,26,41.38,26 C40.62,26,40,26.62,40,27.38 C40,27.38,40,27.38,40,27.38 C40,29.93,37.93,32,35.38,32 C35.38,32,32,32,32,32 C29.42,32,27.32,29.91,27.32,27.32 C27.32,27.32,27.32,21.42,27.32,21.42 C27.32,18.43,29.75,16,32.74,16 C32.74,16,40.52,16,40.52,16 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M6,10.18 C6,7.87,7.79,6,10,6 C10,6,32,6,32,6 C34.21,6,36,7.87,36,10.18 C36,10.18,36,24.82,36,24.82 C36,27.13,34.21,29,32,29 C32,29,10,29,10,29 C7.79,29,6,27.13,6,24.82 C6,24.82,6,10.18,6,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M21,11 C21,11,21,23,21,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M25,15 C25,15,25,17,25,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,15 C17,15,17,17,17,17"/></g></g></g></svg> ',tosiUi:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M3,33 C3,31.9,3.9,31,5,31 C5,31,43,31,43,31 C44.1,31,45,31.9,45,33 C45,33,45,43,45,43 C45,44.1,44.1,45,43,45 C43,45,5,45,5,45 C3.9,45,3,44.1,3,43 C3,43,3,33,3,33 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,35 C7,35,7,36.34,7,38 C7,39.66,8.34,41,10,41 C11.66,41,13,39.66,13,38 C13,36.34,13,35,13,35"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,35 C17,35,17,41,17,41"/></g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M38,33 C40.76,33,43,35.24,43,38 C43,40.76,40.76,43,38,43 C35.24,43,33,40.76,33,38 C33,35.24,35.24,33,38,33 z"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40,36 C40,36,36,40,36,40"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M36,36 C36,36,40,40,40,40"/></g></g><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21.01 C15.97,21.01,9.97,23.01,9.97,27.01 C9.97,31.01,15.97,31.01,15.97,31.01"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31.97,21.01 C31.97,21.01,37.97,23.01,37.97,27.01 C37.97,31.01,31.97,31.01,31.97,31.01"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,33 C31,33,29.49,31,29.49,31 C29.49,31,27.97,33,27.97,33"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M19.97,33 C19.97,33,17.97,31,17.97,31 C17.97,31,15.97,33,15.97,33"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21 C15.97,21,31.97,21,31.97,21 C31.97,21,31.97,31,31.97,31 C31.97,31,15.97,31,15.97,31 C15.97,31,15.97,21,15.97,21 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,7.18 C9,4.87,10.79,3,13,3 C13,3,35.02,3,35.02,3 C37.23,3,39.03,4.87,39.03,7.18 C39.03,7.18,39.03,21.82,39.03,21.82 C39.03,24.13,37.23,26,35.02,26 C35.02,26,13,26,13,26 C10.79,26,9,24.13,9,21.82 C9,21.82,9,7.18,9,7.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/></g></g></g></svg> ',tosiXr:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,5,15.25,5,17.25 C5,19.25,8,19.25,8,19.25"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,14.25 C16,14.25,19,15.25,19,17.25 C19,19.25,16,19.25,16,19.25"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.5,4.85 C4.5,3.69,5.4,2.75,6.5,2.75 C6.5,2.75,17.5,2.75,17.5,2.75 C18.61,2.75,19.5,3.69,19.5,4.85 C19.5,4.85,19.5,12.16,19.5,12.16 C19.5,13.32,18.61,14.25,17.5,14.25 C17.5,14.25,6.5,14.25,6.5,14.25 C5.4,14.25,4.5,13.32,4.5,12.16 C4.5,12.16,4.5,4.85,4.5,4.85 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12,5.25 C12,5.25,12,11.25,12,11.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,7.25 C14,7.25,14,8.25,14,8.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,7.25 C10,7.25,10,8.25,10,8.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,21.25 C16,21.25,15,20.25,15,20.25 C15,20.25,14,21.25,14,21.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,21.25 C10,21.25,9,20.25,9,20.25 C9,20.25,8,21.25,8,21.25"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,16,14.25,16,14.25 C16,14.25,16,19.25,16,19.25 C16,19.25,8,19.25,8,19.25 C8,19.25,8,14.25,8,14.25 z"/><path style="fill:#ff7bac;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-width:1;" d="M12,4 C12,4,11.99,4,11.99,4 C6.19,4,3,4.73,3,8.5 C3,11.39,4.66,13,7.27,13 C9.88,13,10.68,11.13,11.99,11.13 C11.99,11.13,12,11.13,12,11.13 C12,11.13,12.01,11.13,12.01,11.13 C13.32,11.13,14.12,13,16.73,13 C19.34,13,21,11.39,21,8.5 C21,4.73,17.81,4,12.01,4 C12.01,4,12,4,12,4 C12,4,12,4,12,4 z"/></g></svg> ',tosi:'<svg class="color" viewBox="0 0 48 48"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M38.35,31.7 C39.78,34.37,38.78,37.69,36.11,39.13 C36.11,39.13,36.11,39.13,36.11,39.13 C33.92,40.31,31.18,39.48,29.99,37.29 C29.99,37.29,29.95,37.2,29.95,37.2 C29.58,36.53,28.75,36.27,28.08,36.64 C28.08,36.64,28.08,36.64,28.08,36.64 C25.83,37.84,23.03,37,21.82,34.76 C21.82,34.76,20.22,31.78,20.22,31.78 C18.99,29.5,19.85,26.67,22.12,25.44 C22.12,25.44,27.32,22.65,27.32,22.65 C29.96,21.23,33.24,22.22,34.66,24.85 C34.66,24.85,38.35,31.7,38.35,31.7 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M10.65,31.7 C9.22,34.37,10.22,37.69,12.89,39.13 C12.89,39.13,12.89,39.13,12.89,39.13 C15.08,40.31,17.82,39.48,19.01,37.29 C19.01,37.29,19.05,37.2,19.05,37.2 C19.42,36.53,20.25,36.27,20.92,36.64 C20.92,36.64,20.92,36.64,20.92,36.64 C23.17,37.84,25.97,37,27.18,34.76 C27.18,34.76,28.78,31.78,28.78,31.78 C30.01,29.5,29.15,26.67,26.88,25.44 C26.88,25.44,21.68,22.65,21.68,22.65 C19.04,21.23,15.76,22.22,14.34,24.85 C14.34,24.85,10.65,31.7,10.65,31.7 z"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32.5,43 C32.5,43,30.5,41,30.5,41 C30.5,41,28.5,43,28.5,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,43 C20.5,43,18.5,41,18.5,41 C18.5,41,16.5,43,16.5,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16.5,29 C16.5,29,32.5,29,32.5,29 C32.5,29,32.5,36,32.5,36 C32.5,37.66,31.16,39,29.5,39 C29.5,39,19.5,39,19.5,39 C17.84,39,16.5,37.66,16.5,36 C16.5,36,16.5,29,16.5,29 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9.5,10.18 C9.5,7.87,11.29,6,13.5,6 C13.5,6,35.5,6,35.5,6 C37.71,6,39.5,7.87,39.5,10.18 C39.5,10.18,39.5,24.82,39.5,24.82 C39.5,27.13,37.71,29,35.5,29 C35.5,29,13.5,29,13.5,29 C11.29,29,9.5,27.13,9.5,24.82 C9.5,24.82,9.5,10.18,9.5,10.18 z"/><g><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24.5,11 C24.5,11,24.5,23,24.5,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28.5,15 C28.5,15,28.5,17,28.5,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,15 C20.5,15,20.5,17,20.5,17"/></g></g></g></svg> ',discord:'<svg class="filled" version="1" viewBox="0 0 1013 768"><path d="M858 64c-60-28-131-51-204-64l-5-1c-8 14-17 32-25 51l-1 4c-35-6-75-9-116-9s-81 3-120 9l4-1c-9-22-18-40-28-57l1 3c-79 14-149 36-214 67l5-2c-132 196-168 387-150 575v0c73 55 158 99 250 127l6 2c19-26 38-55 53-85l2-3c-33-13-62-27-89-43l2 1c7-5 14-11 21-16 75 36 163 57 256 57s181-21 260-59l-4 2c7 6 14 11 21 16-25 15-53 29-83 40l-4 1c17 34 36 63 56 90l-1-2c98-30 183-74 259-130l-2 2c21-218-36-407-151-575zM338 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101zM675 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101z"></path></svg> ',facebook:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>',game:'<svg class="filled" version="1" viewBox="0 0 704 512"><path d="M528 97v-1h-336c-88 0-160 72-160 160s72 160 160 160c52 0 99-25 128-64h64c29 39 76 64 128 64 88 0 160-72 160-160 0-83-63-151-144-159zM288 288h-64v64h-64v-64h-64v-64h64v-64h64v64h64v64zM480 288c-18 0-32-14-32-32s14-32 32-32 32 14 32 32-14 32-32 32zM576 288c-18 0-32-14-32-32 0-18 14-32 32-32s32 14 32 32c0 18-14 32-32 32z"></path></svg> ',google:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M256 0c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zM260 448c-106 0-192-86-192-192s86-192 192-192c52 0 95 19 129 50l-52 50c-14-14-39-30-77-30-66 0-119 54-119 121s54 121 119 121c76 0 105-55 109-83h-109v-66h181c2 10 3 19 3 32 0 110-73 188-184 188z"></path></svg> ',npm:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M0 0v512h512v-512h-512zM416 416h-64v-256h-96v256h-160v-320h320v320z"></path></svg> ',youtube:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>',blog:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10.02 C21,10.02,21,15,21,15 C21,15.53,20.79,16.04,20.41,16.41 C20.04,16.79,19.53,17,19,17 C19,17,7,17,7,17 C5.67,18.33,4.33,19.67,3,21 C3,21,3,5,3,5 C3,4.47,3.21,3.96,3.59,3.59 C3.96,3.21,4.47,3,5,3 C8.53,3,10.49,3,14.02,3"/><path style="" d="M19,2 C19.54,1.46,20.32,1.25,21.05,1.45 C21.78,1.65,22.35,2.22,22.55,2.95 C22.75,3.68,22.54,4.46,22,5 C22,5,15.5,11.5,15.5,11.5 C14.17,11.83,12.83,12.17,11.5,12.5 C11.83,11.17,12.17,9.83,12.5,8.5 C15.67,5.33,15.83,5.17,19,2 z"/><path style="" d="M14.6,3"/><path style="" d="M21,8.77"/><path style="" d="M7,7 C7,7,10,7,10,7"/><path style="" d="M7,10 C7,10,9,10,9,10"/></g></svg> ',bug:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M8,6 C8,3.79,9.79,2,12,2 C14.21,2,16,3.79,16,6 C16,6,8,6,8,6 z"/><path style="" d="M20,7 C20,7,18,9,18,9"/><path style="" d="M20,19 C20,19,18,17,18,17"/><path style="" d="M21,13 C21,13,18,13,18,13"/><path style="" d="M16.44,9 C17.3,9,18,9.7,18,10.56 C18,10.56,18,15,18,15 C18,18.31,15.31,21,12,21 C8.69,21,6,18.31,6,15 C6,15,6,10.56,6,10.56 C6,9.7,6.7,9,7.56,9 C7.56,9,16.44,9,16.44,9 z"/><path style="" d="M4,7 C4,7,6,9,6,9"/><path style="" d="M4,19 C4,19,6,17,6,17"/><path style="" d="M3,13 C3,13,6,13,6,13"/><path style="" d="M12,12 C12,12,12,17,12,17"/></g></svg> ',activity:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>',airplay:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>',alertCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertTriangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',alignCenter:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line></svg>',alignJustify:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line></svg>',alignLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line></svg>',alignRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line></svg>',anchor:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path></svg>',aperture:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg>',archive:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>',arrowUpRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>',atSign:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path></svg>',award:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>',barChart2:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>',barChart:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line></svg>',batteryCharging:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline></svg>',battery:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line></svg>',bellOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',bell:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>',bluetooth:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline></svg>',bold:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path></svg>',bookOpen:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>',book:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>',bookmark:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg>',box:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',briefcase:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>',calendar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>',cameraOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path></svg>',camera:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>',cast:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg>',checkCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',checkSquare:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',chrome:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line></svg>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></svg>',clipboard:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>',clock:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>',cloudDrizzle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudLightning:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline></svg>',cloudOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',cloudRain:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudSnow:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line></svg>',cloud:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path></svg>',code:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>',codepen:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>',codesandbox:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',coffee:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line></svg>',columns:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path></svg>',command:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path></svg>',compass:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>',copy:'<svg class="stroked" viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',cpu:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg>',creditCard:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>',crop:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path></svg>',crosshair:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line></svg>',database:'<svg class="stroked" viewBox="0 0 24 24"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>',delete:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line></svg>',disc:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle></svg>',divideCircle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle></svg>',divideSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line></svg>',divide:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle></svg>',dollarSign:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>',downloadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path></svg>',download:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>',dribbble:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path></svg>',droplet:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path></svg>',edit2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>',edit3:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>',edit:'<svg class="stroked" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>',externalLink:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',eyeOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',eye:'<svg class="stroked" viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',fastForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon></svg>',feather:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>',figma:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path></svg>',fileMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line></svg>',filePlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>',fileText:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>',file:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>',film:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line></svg>',filter:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>',flag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>',folderMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folderPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folder:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path></svg>',frown:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',gift:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>',gitBranch:'<svg class="stroked" viewBox="0 0 24 24"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',gitCommit:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>',gitMerge:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path></svg>',gitPullRequest:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line></svg>',github:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>',gitlab:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>',globe:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>',grid:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>',hardDrive:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line></svg>',hash:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line></svg>',headphones:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path></svg>',heart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>',helpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',hexagon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>',home:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>',image:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>',inbox:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path></svg>',info:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="7.75"></line></svg>',instagram:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>',italic:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line></svg>',key:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.78 7.78 5.5 5.5 0 0 1 7.78-7.78zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path></svg>',layers:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>',layout:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line></svg>',lifeBuoy:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line></svg>',link2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg>',link:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>',linkedin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>',list:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>',loader:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',lock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg> ',logIn:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>',logOut:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>',mail:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>',mapPin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>',map:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line></svg>',maximize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',maximize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>',meh:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',menu:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>',messageCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>',messageSquare:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>',micOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',mic:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',minimize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',minimize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path></svg>',minusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></svg>',monitor:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>',moon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>',moreHorizontal:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>',moreVertical:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle></svg>',mousePointer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg>',move:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line></svg>',music:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></svg>',octagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon></svg>',package:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',paperclip:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path></svg>',pauseCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line></svg>',pause:'<svg class="stroked" viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect></svg>',penTool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.59 7.59"></path><circle cx="11" cy="11" r="2"></circle></svg>',percent:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle></svg>',phoneCall:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneForwarded:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneIncoming:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneMissed:'<svg class="stroked" viewBox="0 0 24 24"><line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line></svg>',phoneOutgoing:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phone:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',pieChart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>',playCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>',plusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>',pocket:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline></svg>',power:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>',printer:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>',radio:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path></svg>',repeat:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg>',rewind:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon></svg>',cornerDownRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path></svg>',cornerRightDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path></svg>',cornerRightUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path></svg>',cornerUpRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path></svg>',refreshCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>',rotateCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>',skipForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line></svg>',toggleRight:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle></svg>',rss:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>',save:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>',scissors:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line></svg>',search:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',send:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>',server:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg>',settings:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M4.78,6.75 C6.02,7.26,7.26,6.02,6.75,4.78 C6.75,4.78,6.24,3.57,6.24,3.57 C5.93,2.8,6.29,1.92,7.06,1.6 C7.06,1.6,8.14,1.15,8.14,1.15 C8.91,0.83,9.79,1.2,10.11,1.96 C10.11,1.96,10.61,3.18,10.61,3.18 C11.12,4.42,12.88,4.42,13.39,3.18 C13.39,3.18,13.89,1.97,13.89,1.97 C14.21,1.2,15.09,0.83,15.86,1.15 C15.86,1.15,16.94,1.6,16.94,1.6 C17.71,1.92,18.08,2.8,17.76,3.57 C17.76,3.57,17.15,5.03,17.15,5.03 C16.64,6.27,17.88,7.51,19.12,7 C19.12,7,20.51,6.42,20.51,6.42 C21.28,6.1,22.16,6.47,22.47,7.23 C22.47,7.23,22.92,8.32,22.92,8.32 C23.24,9.09,22.88,9.96,22.11,10.28 C22.11,10.28,21.07,10.71,21.07,10.71 C19.83,11.23,19.83,12.98,21.07,13.49 C21.07,13.49,22.04,13.89,22.04,13.89 C22.8,14.21,23.17,15.09,22.85,15.86 C22.85,15.86,22.4,16.94,22.4,16.94 C22.08,17.71,21.2,18.07,20.43,17.76 C20.43,17.76,19.22,17.25,19.22,17.25 C17.98,16.74,16.74,17.98,17.25,19.22 C17.25,19.22,17.76,20.43,17.76,20.43 C18.07,21.2,17.71,22.08,16.94,22.4 C16.94,22.4,15.86,22.85,15.86,22.85 C15.09,23.17,14.21,22.8,13.89,22.04 C13.89,22.04,13.39,20.82,13.39,20.82 C12.88,19.58,11.12,19.58,10.61,20.82 C10.61,20.82,10.11,22.04,10.11,22.04 C9.79,22.8,8.91,23.17,8.14,22.85 C8.14,22.85,7.06,22.4,7.06,22.4 C6.29,22.08,5.93,21.2,6.24,20.44 C6.24,20.44,6.64,19.47,6.64,19.47 C7.16,18.23,5.92,16.99,4.68,17.5 C4.68,17.5,3.64,17.93,3.64,17.93 C2.87,18.25,1.99,17.89,1.67,17.12 C1.67,17.12,1.22,16.04,1.22,16.04 C0.91,15.27,1.27,14.39,2.04,14.07 C2.04,14.07,3.43,13.49,3.43,13.49 C4.67,12.98,4.67,11.23,3.43,10.71 C3.43,10.71,1.96,10.11,1.96,10.11 C1.2,9.79,0.83,8.91,1.15,8.14 C1.15,8.14,1.6,7.06,1.6,7.06 C1.92,6.29,2.8,5.93,3.57,6.24 C3.57,6.24,4.78,6.75,4.78,6.75 z M14.31,11.04 C14.84,12.32,14.23,13.78,12.96,14.31 C11.68,14.84,10.22,14.23,9.69,12.96 C9.16,11.68,9.77,10.22,11.04,9.69 C12.32,9.16,13.78,9.77,14.31,11.04 z"/></g></svg> ',share2:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>',share:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg>',shieldOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',shield:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>',shoppingBag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>',shoppingCart:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>',shuffle:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>',sidebar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line></svg>',slack:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path></svg>',slash:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>',sliders:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg>',smartphone:'<svg class="stroked" viewBox="0 0 24 24"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',smile:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',speaker:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line></svg>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',star:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',stopCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect></svg>',sun:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>',sunrise:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline></svg>',sunset:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline></svg>',table:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path></svg>',tablet:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',tag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line></svg>',target:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle></svg>',terminal:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>',thermometer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path></svg>',tool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>',trash2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>',trash:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',trello:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect></svg>',trendingDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline></svg>',trendingUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>',triangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg>',truck:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle></svg>',tv:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',twitter:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>',type:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line></svg>',umbrella:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path></svg>',underline:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line></svg>',unlock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path></svg>',thumbsUp:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>',arrowRightCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>',arrowRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></svg>',chevronsRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>',uploadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>',upload:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>',userCheck:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline></svg>',userMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userX:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line></svg>',user:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>',users:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>',videoOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',video:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>',voicemail:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line></svg>',volume1:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volume2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volumeX:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line></svg>',volume:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon></svg>',watch:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path></svg>',wifiOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wifi:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wind:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>',xCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>',x:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',zapOff:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>',zap:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>',zoomIn:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',zoomOut:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',fontBold:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M13.5,11 C15.71,11,17.5,12.68,17.5,14.75 C17.5,16.82,15.71,18.5,13.5,18.5 C13.5,18.5,8.5,18.5,8.5,18.5 C8.5,18.5,8.5,3.5,8.5,3.5 C8.5,3.5,13.5,3.5,13.5,3.5 C15.71,3.5,17.5,5.18,17.5,7.25 C17.5,9.32,15.71,11,13.5,11 C13.5,11,13.5,11,13.5,11 z"/><path style="" d="M13.5,11 C13.5,11,8.5,11,8.5,11"/><path style="" d="M12.5,11 C14.71,11,16.5,12.68,16.5,14.75 C16.5,16.82,14.71,18.5,12.5,18.5 C12.5,18.5,7.5,18.5,7.5,18.5 C7.5,18.5,7.5,3.5,7.5,3.5 C7.5,3.5,12.5,3.5,12.5,3.5 C14.71,3.5,16.5,5.18,16.5,7.25 C16.5,9.32,14.71,11,12.5,11 C12.5,11,12.5,11,12.5,11 z"/><path style="" d="M12.5,11 C12.5,11,7.5,11,7.5,11"/></g></svg> ',fontItalic:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M17,4.5 C17,4.5,13,4.5,13,4.5"/><path style="" d="M11,19.5 C11,19.5,7,19.5,7,19.5"/><path style="" d="M15,4.5 C15,4.5,9,19.5,9,19.5"/></g></svg> ',fontUnderline:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M7.5,3.5 C7.5,3.5,7.5,10.74,7.5,13.5 C7.5,16.26,9.74,18.5,12.5,18.5 C15.26,18.5,17.5,16.26,17.5,13.5 C17.5,10.74,17.5,3.5,17.5,3.5"/><path style="" d="M7.5,21.5 C7.5,21.5,17.5,21.5,17.5,21.5"/></g></svg> ',indent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M2.5,9 C2.5,9,5.5,12,5.5,12 C5.5,12,2.5,15,2.5,15"/></g></svg> ',listBullet:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M5.5,5 C6.05,5,6.5,5.45,6.5,6 C6.5,6.55,6.05,7,5.5,7 C4.95,7,4.5,6.55,4.5,6 C4.5,5.45,4.95,5,5.5,5 z"/><path style="" d="M5.5,11 C6.05,11,6.5,11.45,6.5,12 C6.5,12.55,6.05,13,5.5,13 C4.95,13,4.5,12.55,4.5,12 C4.5,11.45,4.95,11,5.5,11 z"/><path style="" d="M5.5,17 C6.05,17,6.5,17.45,6.5,18 C6.5,18.55,6.05,19,5.5,19 C4.95,19,4.5,18.55,4.5,18 C4.5,17.45,4.95,17,5.5,17 z"/></g></svg> ',listNumber:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M4.5,5 C4.5,5,5.5,4,5.5,4 C5.5,4,5.5,8,5.5,8"/><path style="" d="M4.5,10 C4.5,10,5.5,10,5.5,10 C6.05,10,6.5,10.45,6.5,11 C6.5,11,6.5,11,6.5,11 C6.5,11.55,6.05,12,5.5,12 C5.5,12,5.5,12,5.5,12 C4.95,12,4.5,12.45,4.5,13 C4.5,13,4.5,14,4.5,14 C4.5,14,6.5,14,6.5,14"/><path style="" d="M4.5,16 C4.5,16,5.5,16,5.5,16 C6.05,16,6.5,16.45,6.5,17 C6.5,17,6.5,17,6.5,17 C6.5,17.55,6.05,18,5.5,18 C5.5,18,4.5,18,4.5,18 C4.5,18,5.5,18,5.5,18 C6.05,18,6.5,18.45,6.5,19 C6.5,19,6.5,19,6.5,19 C6.5,19.55,6.05,20,5.5,20 C5.5,20,4.5,20,4.5,20"/></g></svg> ',outdent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M5.5,9 C5.5,9,2.5,12,2.5,12 C2.5,12,5.5,15,5.5,15"/></g></svg> ',pin:'<svg class="stroked" viewBox="0 0 24 24"><g><g><path style="" d="M16.23,4.73 C16.23,4.73,19.42,7.9,19.42,7.9 C19.42,7.9,14.46,15.69,14.46,15.69 C14.46,15.69,8.45,9.68,8.45,9.68 C8.45,9.68,16.23,4.73,16.23,4.73 z"/><path style="" d="M20.84,9.32 C20.84,9.32,14.47,2.95,14.47,2.95"/><path style="" d="M16.6,17.8 C16.6,17.8,6.7,7.9,6.7,7.9"/><path style="" d="M10.23,11.44 C10.23,11.44,5.99,18.51,5.99,18.51 C5.99,18.51,13.06,14.27,13.06,14.27"/></g></g></svg> ',resize:'<svg class="stroked" version="1.1" viewBox="0, 0, 24, 24"><g><path d="M9,3 L3,3 L3,9"/><path d="M15,21 L21,21 L21,15"/><path d="M3,3 L10,10"/><path d="M21,21 L14,14"/></g></svg> ',sortAscending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,10.5 C16.5,10.5,7.5,10.5,7.5,10.5"/><path d="M14.5,6.5 C14.5,6.5,9.5,6.5,9.5,6.5"/><path d="M18.5,14.5 C18.5,14.5,5.5,14.5,5.5,14.5"/><path d="M20.5,18.5 C20.5,18.5,3.5,18.5,3.5,18.5"/></g></svg> ',sortDescending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,14.5 C16.5,14.5,7.5,14.5,7.5,14.5"/><path d="M14.5,18.5 C14.5,18.5,9.5,18.5,9.5,18.5"/><path d="M18.5,10.5 C18.5,10.5,5.5,10.5,5.5,10.5"/><path d="M20.5,6.5 C20.5,6.5,3.5,6.5,3.5,6.5"/></g></svg> ',cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",skipBack:"skipForward0f",toggleLeft:"toggleRight0f",thumbsDown:"thumbsUp1f",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r"};var Tx=(y)=>{Object.assign(k2,y)},h0=(y,x,h,l)=>{let i=y instanceof SVGElement?[y]:Array.from(y.querySelectorAll("svg"));if(i.length>1){let w=y.dataset?.icon||"unknown";console.error(`svg2DataUrl: composite icon "${w}" cannot be serialized as a data URL, rendering base icon only`)}let C=i[0];C.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let w of C.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")){if(x!==void 0)w.setAttribute("fill",x);if(h!==void 0)w.setAttribute("stroke",h);if(l!==void 0)w.setAttribute("stroke-width",String(l))}let k=C.querySelectorAll("[style]");C.removeAttribute("style");for(let w of[...k]){let B=w.style;if(B.fill)w.setAttribute("fill",W.fromCss(B.fill).html);if(B.stroke)w.setAttribute("stroke",W.fromCss(B.stroke).html);if(B.strokeWidth)w.setAttribute("strokeWidth",B.strokeWidth);if(B.strokeLinecap)w.setAttribute("strokeLinecap",B.strokeLinecap);if(B.strokeLinejoin)w.setAttribute("strokeLinejoin",B.strokeLinejoin);w.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(C.outerHTML)})`},ox=(y)=>/\d$/.test(y)?y+"_":y,S5=[{prefix:/^spin(_?\d+)/,apply(y,x,h){let l=x[1].replace("_","-"),i=360/Math.abs(parseFloat(l)),C=l.startsWith("-")?"reverse":"normal",k=m1(y,[]),g=k;if(g.animate){let w=g.style.transform||"";g.animate([{transform:`${w} rotate(0deg)`},{transform:`${w} rotate(360deg)`}],{duration:i*1000,iterations:1/0,direction:C})}return I5(y,h,k)}},{prefix:"un",apply:(y)=>`slash25o$${y}75s75o`},{prefix:"check",apply:(y)=>`check75o_00aa00S$${y}75s50o`},{prefix:"cancel",apply:(y)=>`x75o_cc0000S$${y}75s50o`},{prefix:"search",apply:(y)=>`search80s30x30y$${y}50o`}],Lx=0;function v8(y,x){let h=K.div();h.innerHTML=y;let l=h.querySelector("svg"),i=l.querySelectorAll("[id]");if(i.length>0){let g=new Map;for(let j of i){let V=j.id,_=`tosi_svg_id_${++Lx}`;g.set(V,_),j.id=_}let w=l.innerHTML,B=w;for(let[j,V]of g){let _=j.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");B=B.replace(new RegExp(`url\\(#${_}\\)`,"g"),`url(#${V})`).replace(new RegExp(`href="#${_}"`,"g"),`href="#${V}"`)}if(B!==w)l.innerHTML=B}let C=new Set(l.classList);C.add("tosi-icon");let k=u0.svg({class:Array.from(C).join(" "),viewBox:l.getAttribute("viewBox")},...x,...l.children);if(k.style.strokeWidth=P.tosiIconStrokeWidth("2px"),C.has("filled"))k.style.stroke="none",k.style.fill="currentColor";else if(C.has("stroked"))k.style.stroke=P.tosiIconStroke("currentColor"),k.style.fill=P.tosiIconFill("none");else k.style.stroke=P.tosiIconStroke("currentColor"),k.style.fill=P.tosiIconFill("currentColor");return k.style.height=P.tosiIconSize("16px"),k}function I5(y,x,...h){let l=K.span({class:"tosi-icon-composite",dataIcon:y,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...h);for(let i of x)if(i&&typeof i==="object"&&!("nodeType"in i)){let C=i;if(C.style&&typeof C.style==="object")Object.assign(l.style,C.style);if(C.class)l.classList.add(...String(C.class).split(" "))}return l}function Mx(y){let x=k2;if(x[y])return!0;let h=d5(y);return h!=null&&!!x[h.baseName]}function $8(y,x){for(let h of S5){let l,i;if(h.prefix instanceof RegExp){let k=new RegExp(h.prefix.source+"(.+)$"),g=y.match(k);if(!g)continue;l=g[g.length-1],l=l[0].toLowerCase()+l.slice(1),i=g}else{if(!y.startsWith(h.prefix)||y.length<=h.prefix.length)continue;l=y[h.prefix.length].toLowerCase()+y.slice(h.prefix.length+1),i=h.prefix}if(!Mx(l))continue;let C=h.apply(ox(l),i,x);if(typeof C==="string")return m1(C,x);if(C)return C}return null}var nx=10,ux=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function d5(y){let x=y.match(ux);if(!x)return null;let h=y.slice(0,x.index);if(!h)return null;if(h.endsWith("_"))h=h.slice(0,-1);if(!h)return null;if(!k2[h]){if(!S5.some((w)=>{if(w.prefix instanceof RegExp)return w.prefix.test(h);return h.startsWith(w.prefix)&&h.length>w.prefix.length}))return null}let i={},C=x[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!C)return null;let k=[];for(let g of C){let w=g[g.length-1];if(w==="F"||w==="S"){let B=g.slice(1,-1),V=/^[0-9a-fA-F]{3,8}$/.test(B)?"#"+B:z[B];if(w==="F")i.fill=V;else i.stroke=V}else if(w==="W")i.strokeWidth=g.slice(0,-1);else{let B=parseInt(g.replace("_","-"));switch(w){case"o":i.opacity=String(B/100);break;case"s":k.push(`scale(${B/100})`);break;case"x":k.push(`translateX(${B}%)`);break;case"y":k.push(`translateY(${B}%)`);break;case"r":k.push(`rotate(${B}deg)`);break;case"f":k.push(B===0?"scaleX(-1)":"scaleY(-1)");break}}}if(k.length>0)i.transform=k.join(" "),i.transformOrigin="50% 50%";return{baseName:h,style:i}}function m1(y,x){if(y.endsWith("_"))y=y.slice(0,-1);let h=k2,l=y;for(let k=0;k<nx;k++){let g=h[l];if(!g)break;if(g.startsWith("<"))return v8(g,x);l=g}if(l!==y){let k=$8(l,x);if(k)return k;let g=d5(l);if(g){let w=m1(g.baseName,x);return Object.assign(w.style,g.style),w}}if(y.includes("$")){let k=y.split("$"),g=m1(k[k.length-1],[]),w=k.slice(0,-1).reverse().map((B)=>{let j=m1(B,[]);return Object.assign(j.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),j});return I5(y,x,g,...w)}let i=$8(y,x);if(i)return i;let C=d5(y);if(C){let k=m1(C.baseName,x);return Object.assign(k.style,C.style),k}if(y)console.warn(`icon ${y} does not exist`);return v8(k2.square,x)}var O=new Proxy(k2,{get(y,x){return(...h)=>m1(x,h)}});class r5 extends U{static preferredTagName="tosi-icon";static lightStyleSpec={":host":{"--tosi-icon-size":"var(--xin-icon-size, 16px)","--tosi-icon-stroke-width":"var(--xin-icon-stroke-width, var(--icon-stroke-width, 2px))","--tosi-icon-stroke-linejoin":"var(--icon-stroke-linejoin, round)","--tosi-icon-stroke-linecap":"var(--icon-stroke-linecap, round)","--tosi-icon-fill":"var(--xin-icon-fill, var(--icon-fill, none))",display:"inline-flex",verticalAlign:"text-bottom",stroke:"currentColor",strokeWidth:P.tosiIconStrokeWidth("2px"),strokeLinejoin:P.tosiIconStrokeLinejoin("round"),strokeLinecap:P.tosiIconStrokeLinecap("round"),fill:P.tosiIconFill("none"),height:z.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:P.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let y={};if(this.size)y.height=this.size+"px",this.style.setProperty("--tosi-icon-size",`${this.size}px`),this.style.setProperty("--xin-icon-size",`${this.size}px`);if(this.stroke)y.stroke=this.stroke,y.strokeWidth=this.strokeWidth;if(this.fill)y.fill=this.fill;this.append(O[this.icon]({style:y}))}}var ax=r5.elementCreator();var c8=()=>{};class T5 extends U{static preferredTagName="tosi-3d";babylonReady;BABYLON;static shadowStyleSpec={":host":{display:"block",position:"relative"},":host canvas":{width:"100%",height:"100%"},":host .babylonVRicon":{height:50,width:80,backgroundColor:"transparent",filter:"drop-shadow(0 0 4px #000c)",backgroundImage:h0(O.xrColor()),backgroundPosition:"center",backgroundRepeat:"no-repeat",border:"none",borderRadius:5,borderStyle:"none",outline:"none",transition:"transform 0.125s ease-out"},":host .babylonVRicon:hover":{transform:"scale(1.1)"}};content=K.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:y}=await A1("https://cdn.babylonjs.com/babylon.js","BABYLON");return y})()}scene;engine;sceneCreated=c8;update=c8;_update=()=>{if(this.scene){if(this.update!==void 0)this.update(this,this.BABYLON);if(this.scene.activeCamera!==void 0)this.scene.render()}};onResize(){if(this.engine)this.engine.resize()}loadScene=async(y,x,h)=>{let{BABYLON:l}=await A1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");l.SceneLoader.Append(y,x,this.scene,h)};loadUI=async(y)=>{let{BABYLON:x}=await A1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),h=x.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:l,jsonUrl:i,data:C,size:k}=y;if(k)h.idealWidth=k,h.renderAtIdealSize=!0;let g;if(l)g=await h.parseFromSnippetAsync(l);else if(i)g=await h.parseFromURLAsync(i);else if(C)g=h.parseContent(C);else return null;let w=h.getChildren()[0],B=w.children.reduce((j,V)=>{return j[V.name]=V,j},{});return{advancedTexture:h,gui:g,root:w,widgets:B}};connectedCallback(){super.connectedCallback();let{canvas:y}=this.parts;this.babylonReady.then(async(x)=>{if(this.BABYLON=x,this.engine=new x.Engine(y,!0),this.scene=new x.Scene(this.engine),this.sceneCreated)await this.sceneCreated(this,x);if(this.scene.activeCamera===void 0)new x.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new x.Vector3(0,0,0)).attachControl(this.parts.canvas,!0);this.engine.runRenderLoop(this._update)})}}var mx=T5.elementCreator();class F2 extends U{static preferredTagName="tosi-lottie";static initAttributes={src:"",json:""};content=null;config={renderer:"svg",loop:!0,autoplay:!0};static bodymovinAvailable;animation;static shadowStyleSpec={":host":{width:400,height:400,display:"inline-block"}};_loading=!1;get loading(){return this._loading}constructor(){super();if(F2.bodymovinAvailable===void 0)F2.bodymovinAvailable=A1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:y})=>{if(this._loading=!0,this.config.container=this.shadowRoot!==null?this.shadowRoot:void 0,this.json!=="")this.config.animationData=this.json,delete this.config.path;else if(this.src!=="")delete this.config.animationData,this.config.path=this.src;else console.log("%c<tosi-lottie>%c expected either %cjson%c (animation data) or %csrc% c(url) but found neither.","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default","color: #44f; background: #fff; padding: 0 5px","color: default");if(this.animation){this.animation.destroy();let x=this.shadowRoot;if(x!==null)x.querySelector("svg")?.remove()}this.animation=y.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),F2.bodymovinAvailable.then(this.load).catch((y)=>{console.error(y)})}}var tx=F2.elementCreator();var{button:o5,slot:Ex,div:y4}=K;class x4 extends U{static preferredTagName="tosi-carousel";static initAttributes={dots:!1,arrows:!1,maxVisibleItems:1,snapDuration:0.25,snapDelay:0.1,loop:!1,auto:0};lastAutoAdvance=Date.now();interval;autoAdvance=()=>{if(this.auto>0&&this.auto*1000<Date.now()-this.lastAutoAdvance)this.forward()};_page=0;get page(){return this._page}set page(y){let{scroller:x,back:h,forward:l}=this.parts;if(this.lastPage<=0)l.disabled=h.disabled=!0,y=0;else y=Math.max(0,Math.min(this.lastPage,y)),y=isNaN(y)?0:y;if(this._page!==y)this._page=isNaN(y)?0:y,this.animateScroll(this._page*x.offsetWidth),h.disabled=this.page<=0&&!this.loop,l.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((y)=>getComputedStyle(y).display!=="none")}get lastPage(){return Math.max(Math.ceil(this.visibleItems.length/(this.maxVisibleItems||1))-1,0)}static shadowStyleSpec={":host":{_carouselIconSize:24,_carouselButtonColor:"#0004",_carouselButtonHoverColor:"#0006",_carouselButtonActiveColor:"#000c",_carouseButtonWidth:48,_carouselDotCurrentColor:"#0008",_carouselDotSize:8,_carouselDotSpacing:z.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:z.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:z.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:z.carouseButtonWidth,zIndex:2},":host::part(back)":{left:0},":host::part(forward)":{right:0},":host button:disabled":{opacity:0.5,pointerEvents:"none"},":host button:hover":{color:z.carouselButtonHoverColor},":host button:active":{color:z.carouselButtonActiveColor},":host::part(pager)":{position:"relative"},":host::part(scroller)":{overflow:"auto hidden",position:"relative"},":host::part(grid)":{display:"grid",justifyItems:"center"},":host *::-webkit-scrollbar, *::-webkit-scrollbar-thumb":{display:"none"},":host .dot":{background:z.carouselButtonColor,borderRadius:z.carouselDotSize,height:z.carouselDotSize,width:z.carouselDotSize,transition:z.carouselDotTransition},":host .dot:not(.current):hover":{background:z.carouselButtonHoverColor,height:z.carouselDotSize150,width:z.carouselDotSize150,margin:z.carouselDotSize_25},":host .dot:not(.current):active":{background:z.carouselButtonActiveColor},":host .dot.current":{background:z.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:z.carouselDotSpacing,justifyContent:"center",padding:z.carouselProgressPadding}};easing=(y)=>{return Math.sin(y*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:y,progress:x}=this.parts,h=y.scrollLeft/y.offsetWidth;[...x.children].forEach((l,i)=>{l.classList.toggle("current",Math.floor(i/this.maxVisibleItems-h)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:y}=this.parts,x=Math.round(y.scrollLeft/y.offsetWidth);if(x!==this.page)this.page=x>this.page?Math.ceil(x):Math.floor(x);this.lastAutoAdvance=Date.now()};back=()=>{this.page=this.page>0?this.page-1:this.lastPage};forward=()=>{this.page=this.page<this.lastPage?this.page+1:0};handleDotClick=(y)=>{let{progress:x}=this.parts,h=[...x.children].indexOf(y.target);if(h>-1)this.page=Math.floor(h/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(y,x=-1,h=0){cancelAnimationFrame(this.animationFrame);let{scroller:l}=this.parts;if(x===-1){x=l.scrollLeft,h=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)});return}let i=(Date.now()-h)/1000;if(i>=this.snapDuration||Math.abs(l.scrollLeft-y)<2)l.scrollLeft=y,this.animationFrame=null;else l.scrollLeft=x+this.easing(i/this.snapDuration)*(y-x),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(y,x,h)})}content=()=>[y4({part:"pager"},o5({title:"previous slide",part:"back"},O.chevronLeft()),y4({title:"slides",role:"group",part:"scroller"},y4({part:"grid"},Ex())),o5({title:"next slide",part:"forward"},O.chevronRight())),y4({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:y,forward:x,scroller:h,progress:l}=this.parts;y.addEventListener("click",this.back),x.addEventListener("click",this.forward),h.addEventListener("scroll",this.indicateCurrent),l.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:y,arrows:x,visibleItems:h,lastPage:l}=this,{progress:i,back:C,forward:k,grid:g}=this.parts;h.forEach((w)=>{w.role="group"}),g.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(h.length).trim(),g.style.width=(1+this.lastPage)*100+"%",i.textContent="",i.append(...h.map((w,B)=>o5({title:`item ${B+1}`,class:"dot"}))),this.indicateCurrent(),i.style.display=y&&l>0?"":"none",C.hidden=k.hidden=!(x&&l>0)}}var ex=x4,R8=x4.elementCreator(),yh=R8;var{div:J8,span:H8}=K;function f8(y,x){let h=y.split(`
14
14
  `),l=x.split(`
15
- `),i=h.length,C=l.length,k=Array.from({length:i+1},()=>Array(C+1).fill(0));for(let j=i-1;j>=0;j-=1)for(let V=C-1;V>=0;V-=1)k[j][V]=h[j]===l[V]?k[j+1][V+1]+1:Math.max(k[j+1][V],k[j][V+1]);let g=[],w=0,B=0;while(w<i&&B<C)if(h[w]===l[B])g.push({op:"context",text:h[w]}),w+=1,B+=1;else if(k[w+1][B]>=k[w][B+1])g.push({op:"remove",text:h[w]}),w+=1;else g.push({op:"add",text:l[B]}),B+=1;while(w<i)g.push({op:"remove",text:h[w]}),w+=1;while(B<C)g.push({op:"add",text:l[B]}),B+=1;return g}var mx={context:" ",add:"+",remove:"-"};class T5 extends K{static preferredTagName="tosi-diff";static initAttributes={original:"",modified:""};static shadowStyleSpec={":host":{display:"block",overflow:"auto",font:"var(--tosi-code-font, 12px/1.5 monospace)",background:"var(--tosi-diff-bg, #fff)",color:"var(--tosi-diff-color, #222)"},":host([hidden])":{display:"none"},".diff-line":{display:"grid",gridTemplateColumns:"1.5em 1fr",whiteSpace:"pre-wrap",wordBreak:"break-word"},".diff-line .marker":{textAlign:"center",userSelect:"none",opacity:"0.5"},".diff-add":{background:"var(--tosi-diff-add-bg, #e6ffed)"},".diff-add .marker":{color:"var(--tosi-diff-add-color, #22863a)"},".diff-remove":{background:"var(--tosi-diff-remove-bg, #ffeef0)"},".diff-remove .marker":{color:"var(--tosi-diff-remove-color, #cb2431)"}};content=()=>[X8({part:"body"})];render(){super.render();let y=v8(this.original,this.modified);this.parts.body.replaceChildren(...y.map((x)=>X8({class:`diff-line diff-${x.op}`},N8({class:"marker"},mx[x.op]),N8({class:"text"},x.text===""?" ":x.text))))}}var l0=T5.elementCreator();var Z8="https://cdnjs.cloudflare.com/ajax/libs/ace/1.23.2/",$8="ace/theme/tomorrow",tx=async()=>{let{ace:y}=await _1(`${Z8}ace.min.js`);return y},Ex=async(y,x="html",h={},l=$8)=>{let i=await tx();i.config.set("basePath",Z8);let C=i.edit(y,{mode:`ace/mode/${x}`,tabSize:2,useSoftTabs:!0,useWorker:!1,wrap:!0,indentedSoftWrap:!0,...h});return C.setTheme(l),{ace:i,editor:C}};class o1 extends K{static preferredTagName="tosi-code";source="";get value(){return this.editor===void 0?this.source:this.editor.getValue()}set value(y){if(this.editor===void 0)this.source=y;else this.editor.setValue(y),this.editor.clearSelection(),this.editor.session.getUndoManager().reset()}_original;get original(){return this._original??this.value}set original(y){this._original=y}diffOverlay;get showingDiff(){return this.diffOverlay!==void 0&&!this.diffOverlay.hidden}showDiff(y){if(y){if(this.diffOverlay===void 0)this.diffOverlay=l0({style:{position:"absolute",inset:"0",zIndex:"5",overflow:"auto",background:"var(--tosi-diff-bg, var(--background, #fff))"}}),this.append(this.diffOverlay);this.diffOverlay.original=this.original,this.diffOverlay.modified=this.value,this.diffOverlay.hidden=!1}else if(this.diffOverlay!==void 0)this.diffOverlay.hidden=!0}static initAttributes={mode:"javascript",theme:$8,disabled:!1};role="code editor";_ace;_editor;_editorPromise;options={};get ace(){return this._ace}get editor(){return this._editor}static shadowStyleSpec={":host":{display:"block",position:"relative",width:"100%",height:"100%"}};onResize(){if(this.editor!==void 0)this.editor.resize(!0)}connectedCallback(){if(super.connectedCallback(),this.source==="")this.value=this.textContent!==null?this.textContent.trim():"";if(this._editorPromise===void 0)this._editorPromise=Ex(this,this.mode,this.options,this.theme),this._editorPromise.then(({ace:y,editor:x})=>{this._ace=y,this._editor=x,x.setValue(this.source,1),x.clearSelection(),x.session.getUndoManager().reset()})}render(){if(super.render(),this._editorPromise!==void 0)this._editorPromise.then(({editor:y})=>y.setReadOnly(this.disabled))}}var T1=o1.elementCreator();var{input:L5}=p,c8=Q.fromCss("#8888");class R8 extends K{static preferredTagName="tosi-color";value=c8.rgba;color=c8;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:z.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:z.swatchSize,height:z.swatchSize,background:"transparent"},":host::part(alpha)":{width:z.alphaWidth},":host::part(css)":{width:z.cssWidth,fontFamily:"monospace"}};content=[L5({title:"base color",type:"color",part:"rgb"}),L5({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),L5({title:"css color spec",part:"css"})];valueChanged=!1;update=(y)=>{let{rgb:x,alpha:h,css:l}=this.parts;if(y.type==="input")this.color=Q.fromCss(x.value),this.color.a=Number(h.value),l.value=this.color.html;else this.color=Q.fromCss(l.value),x.value=this.color.html.substring(0,7),h.value=String(this.color.a);x.style.opacity=String(this.color.a),this.value=this.color.rgba,this.valueChanged=!0};connectedCallback(){super.connectedCallback();let{rgb:y,alpha:x,css:h}=this.parts;y.addEventListener("input",this.update),x.addEventListener("input",this.update),h.addEventListener("change",this.update)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{rgb:y,alpha:x,css:h}=this.parts;this.color=Q.fromCss(this.value),y.value=this.color.html.substring(0,7),y.style.opacity=String(this.color.a),x.value=String(this.color.a),h.value=this.color.html}}var M5=R8.elementCreator();var t1=p.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),h4={passive:!0},V1=(y,x,h="move")=>{if(!y.type.startsWith("touch")){let{clientX:i,clientY:C}=y;t1.style.cursor=h,E1(t1),document.body.append(t1);let k=(g)=>{let w=g.clientX-i,B=g.clientY-C;if(x(w,B,g)===!0)t1.removeEventListener("mousemove",k),t1.removeEventListener("mouseup",k),t1.remove()};t1.addEventListener("mousemove",k,h4),t1.addEventListener("mouseup",k,h4)}else if(y instanceof TouchEvent){let i=y.changedTouches[0],C=i.identifier,k=i.clientX,g=i.clientY,w=y.target,B=0,j=0,V=(A)=>{let O=[...A.touches].find((G)=>G.identifier===C);if(O!==void 0)B=O.clientX-k,j=O.clientY-g;if(A.type==="touchmove")A.stopPropagation(),A.preventDefault();if(x(B,j,A)===!0||O===void 0)w.removeEventListener("touchmove",V),w.removeEventListener("touchend",V),w.removeEventListener("touchcancel",V)};w.addEventListener("touchmove",V),w.addEventListener("touchend",V,h4),w.addEventListener("touchcancel",V,h4)}},g2=(y="body *")=>[...document.querySelectorAll(y)].map((x)=>parseFloat(getComputedStyle(x).zIndex)).reduce((x,h)=>isNaN(x)||Number(x)<h?h:Number(x),0),E1=(y,x="body *")=>{y.style.zIndex=String(g2(x)+1)};var{slot:ex}=p;class L1 extends K{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=ex();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(y)=>{if(y instanceof MouseEvent&&y.button!==0)return;if(y.target?.closest(".no-drag"))return;if(this.drag){E1(this);let h=this.offsetLeft,l=this.offsetTop;V1(y,(i,C,k)=>{if(this.style.left=`${h+i}px`,this.style.top=`${l+C}px`,this.style.right="auto",this.style.bottom="auto",k.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),hh(),L1.floats.add(this);let y={passive:!0};this.addEventListener("touchstart",this.reposition,y),this.addEventListener("mousedown",this.reposition,y),E1(this)}disconnectedCallback(){super.disconnectedCallback(),L1.floats.delete(this)}}var yh=L1,i0=L1.elementCreator(),xh=i0,J8=!1;function hh(){if(J8)return;J8=!0,window.addEventListener("resize",()=>{Array.from(L1.floats).forEach((y)=>{if(y.remainOnResize==="hide")y.hidden=!0;else if(y.remainOnResize==="remove")y.remove()})},{passive:!0}),document.addEventListener("scroll",(y)=>{if(y.target instanceof HTMLElement&&y.target.closest(L1.tagName))return;Array.from(L1.floats).forEach((x)=>{if(x.remainOnScroll==="hide")x.hidden=!0;else if(x.remainOnScroll==="remove")x.remove()})},{passive:!0,capture:!0})}var C0=(y)=>{let{content:x,target:h,position:l,remainOnScroll:i,remainOnResize:C,draggable:k}=y,g=Array.isArray(x)?i0(...x):i0(x);if(f8(g,h,l,i,C,k),y.class)g.setAttribute("class",y.class);return document.body.append(g),g},f8=(y,x,h,l,i,C=!1)=>{{let{position:G}=getComputedStyle(y);if(G!=="fixed")y.style.position="fixed";if(i)y.remainOnResize=i;if(l)y.remainOnScroll=l;E1(y)}y.drag=C;let{left:k,top:g,width:w,height:B}=x.getBoundingClientRect(),j=k+w*0.5,V=g+B*0.5,A=window.innerWidth,O=window.innerHeight;if(h==="side")h=(j<A*0.5?"e":"w")+(V<O*0.5?"s":"n");else if(h==="auto"||h===void 0)h=(V<O*0.5?"s":"n")+(j<A*0.5?"e":"w");if(y.style.top=y.style.left=y.style.right=y.style.bottom=y.style.transform="",h.length===2){let[G,W]=h;switch(G){case"n":y.style.bottom=(O-g).toFixed(2)+"px";break;case"e":y.style.left=(k+w).toFixed(2)+"px";break;case"s":y.style.top=(g+B).toFixed(2)+"px";break;case"w":y.style.right=(A-k).toFixed(2)+"px";break}switch(W){case"n":y.style.bottom=(O-g-B).toFixed(2)+"px";break;case"e":y.style.left=k.toFixed(2)+"px";break;case"s":y.style.top=g.toFixed(2)+"px";break;case"w":y.style.right=(A-k-w).toFixed(2)+"px";break}y.style.transform=""}else if(h==="n")y.style.bottom=(O-g).toFixed(2)+"px",y.style.left=j.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="s")y.style.top=(g+B).toFixed(2)+"px",y.style.left=j.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="e")y.style.left=(k+w).toFixed(2)+"px",y.style.top=V.toFixed(2)+"px",y.style.transform="translateY(-50%)";else if(h==="w")y.style.right=(A-k).toFixed(2)+"px",y.style.top=V.toFixed(2)+"px",y.style.transform="translateY(-50%)";y.style.setProperty("--max-height",`calc(100vh - ${y.style.top||y.style.bottom})`),y.style.setProperty("--max-width",`calc(100vw - ${y.style.left||y.style.right})`)};function l4(y,x=!0){return(h,l)=>{let i=y(h),C=y(l);for(let k in i)if(i[k]!==C[k])return(Array.isArray(x)?x[k]!==!1:x)?i[k]>C[k]?1:-1:i[k]>C[k]?-1:1;return 0}}var{button:lh,span:H8,input:ih}=p,b8=(y,x)=>{return!!y.find((h)=>{if(h===null||x==null)return!1;else if(Array.isArray(h))return b8(h,x);else if(h.value===x||h===x)return!0})};class R1 extends K{static preferredTagName="tosi-select";static formAssociated=!0;static lightStyleSpec={":host":{"--tosi-select-gap":"var(--tosi-spacing-sm, 8px)","--tosi-select-touch-size":"var(--tosi-touch-size, 44px)","--tosi-select-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-value-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-icon-width":"24px","--tosi-select-field-width":"140px","--gap":"var(--tosi-select-gap)","--touch-size":"var(--tosi-select-touch-size)","--padding":"var(--tosi-select-padding)","--value-padding":"var(--tosi-select-value-padding)","--icon-width":"var(--tosi-select-icon-width)","--fieldWidth":"var(--tosi-select-field-width)",display:"inline-flex",position:"relative"},":host button":{display:"flex",alignItems:"center",justifyItems:"center",gap:z.tosiSelectGap,textAlign:"left",height:z.tosiSelectTouchSize,padding:z.tosiSelectPadding,position:"relative",width:"100%"},":host:not([show-icon]) button > :first-child":{display:"none"},":host[hide-caption] button > :nth-child(2)":{display:"none"},':host [part="value"]':{width:z.tosiSelectFieldWidth,padding:z.tosiSelectValuePadding,height:z.tosiSelectTouchSize,lineHeight:z.tosiSelectTouchSize,boxShadow:"none",whiteSpace:"nowrap",outline:"none",background:"transparent",flex:"1"},':host [part="value"]:not(:focus)':{overflow:"hidden",textOverflow:"ellipsis",background:"transparent"}};static initAttributes={editable:!1,placeholder:"",showIcon:!1,hideCaption:!1,localized:!1,disabled:!1,required:!1,name:""};_options=[];get options(){return this._options}set options(y){if(typeof y==="string")this._options=R1.parseOptionsString(y);else this._options=y;this.queueRender()}static parseOptionsString(y){return y.split(",").map((x)=>{let h=x.trim();if(h==="")return null;let[l,i]=h.split("=").map((g)=>g.trim());if(!i)return{value:l,caption:l};let[C,k]=i.split(":").map((g)=>g.trim());return{value:l,caption:C||l,icon:k||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}setValue=(y,x=!1)=>{if(this.value!==y)this.value=y,this.queueRender(!0);if(x)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(y)=>{if(y===null)return null;let{setValue:x,getValue:h}=this,l,i,C,k,g;if(typeof y==="string")i=C=y;else({icon:l,caption:i,value:C,tooltip:k,properties:g}=y);if(this.localized)i=b(i);let{options:w}=y;if(w)return{icon:l,caption:i,tooltip:k,properties:g,checked:()=>b8(w,h()),menuItems:w.map(this.buildOptionMenuItem)};return{icon:l,caption:i,tooltip:k,properties:g,checked:()=>h()===C,action:typeof C==="function"?async()=>{let B=await C();if(B!==void 0)x(B,!0)}:()=>{if(typeof C==="string")x(C,!0)}}};poppedOptions=[];get optionsMenu(){let y=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return y;let x=(h)=>{if(h===null||typeof h==="function")return!0;else if(h.menuItems){let l=p1(h.menuItems);return h.menuItems=l.filter(x),l.length>0}else return h.caption.toLocaleLowerCase().includes(this.filter)};return y.filter(x)}handleChange=(y)=>{let{value:x}=this.parts,h=x.value||"";if(this.value!==String(h))this.value=h,this.dispatchEvent(new Event("change"));this.filter="",y.stopPropagation(),y.preventDefault()};handleKey=(y)=>{if(y.key==="Enter")y.preventDefault()};filterMenu=U2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),l1(0),this.popOptions()});popOptions=(y)=>{if(y&&y.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),L({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:y}=this.parts;y.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[lh({type:"button",part:"button",onClick:this.popOptions},H8(),ih({part:"value",value:this.value,tabindex:0,role:"combobox",ariaHaspopup:"listbox",ariaExpanded:"false",ariaAutocomplete:this.editable?"list":"none",onKeydown:this.handleKey,onInput:this.filterMenu,onChange:this.handleChange}),U.chevronDown())];get allOptions(){let y=[];function x(h){for(let l of h)if(typeof l==="string")y.push({caption:l,value:l});else if(l?.value)y.push(l);else if(l?.options)x(l.options)}return x(this.selectOptions),y}findOption(){return this.allOptions.find((x)=>x.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("options");if(y&&this._options.length===0)this._options=R1.parseOptionsString(y);if(this.localized)i4.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)i4.allInstances.delete(this)}render(){super.render();let{value:y,button:x}=this.parts;x.disabled=this.disabled;let h=y.previousElementSibling,l=this.findOption(),i=H8();if(y.value=this.localized?b(l.caption):l.caption,l.icon)if(l.icon instanceof HTMLElement)i=l.icon.cloneNode(!0);else i=U[l.icon]();h.replaceWith(i),y.setAttribute("placeholder",this.localized?b(this.placeholder):this.placeholder),y.style.pointerEvents=this.editable?"":"none",y.readOnly=!this.editable}}var Ch=R1,G1=R1.elementCreator(),kh=B1((...y)=>G1(...y),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:d8}=p,{i18n:M}=e({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:d8(),caption:window.navigator.language,value:window.navigator.language}]}});r1.localeOptions={toDOM(y,x){if(y instanceof R1)y.options=x}};var C4=(y)=>{if(M.locales.value.includes(y))M.locale.value=y;else console.error(`language ${y} is not available`)},n5=()=>{let y=Array.from(J1.allInstances);for(let x of y)x.localeChanged();I8()};M.locale.observe(n5);var k0="data-tosi-localized";function g0(y){let x=y.getAttribute(k0);if(!x)return;let h;try{h=JSON.parse(x)}catch(l){console.warn(`[data-tosi-localized] invalid JSON: ${x}`,l);return}if(!h||typeof h!=="object")return;for(let[l,i]of Object.entries(h)){if(typeof i!=="string")continue;y.setAttribute(l,b(i))}}function*S8(y){for(let x of Array.from(y.querySelectorAll(`[${k0}]`)))yield x;for(let x of Array.from(y.querySelectorAll("*"))){let h=x.shadowRoot;if(h)yield*S8(h)}}function I8(){if(typeof document>"u")return;for(let y of S8(document))g0(y)}var D8=null;if(typeof document<"u"&&typeof MutationObserver<"u"){let y=()=>{if(!document.body){queueMicrotask(y);return}D8=new MutationObserver((x)=>{for(let h of x){if(h.type==="attributes"&&h.target instanceof Element){g0(h.target);continue}for(let l of Array.from(h.addedNodes)){if(!(l instanceof Element))continue;if(l.hasAttribute(k0))g0(l);for(let i of Array.from(l.querySelectorAll(`[${k0}]`)))g0(i)}}}),D8.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[k0]}),I8()};y()}var gh=l4((y)=>[y.caption.toLocaleLowerCase()]);function u5(y){let[x,,h,l,...i]=y.split(`
16
- `).map((C)=>C.split("\t"));if(x&&h&&l&&i){if(M.locales.value=x,M.languages.value=h,M.emoji.value=l,M.stringMap.value=i.reduce((C,k)=>{return C[k[0].toLocaleLowerCase()]=k,C},{}),M.localeOptions.value=x.map((C,k)=>({icon:d8({title:x[k]},l[k]),caption:h[k],value:C})).sort(gh),!M.locales.value.includes(M.locale.value)){let C=M.locale.value.substring(0,2);M.locale.value=M.locales.value.find((k)=>k.substring(0,2)===C)||M.locales.value[0]}n5()}}function b(y){if(y.endsWith("…"))return b(y.substring(0,y.length-1))+"…";let x=M.locales.value.indexOf(M.locale.value);if(x>-1){let h=J(M.stringMap),l=y.toLocaleLowerCase(),i=h[l],C=i&&i[x];if((!C||C==='"')&&l.includes("#")){let k=h[l.substring(0,l.indexOf("#"))];C=k&&k[x]}if(C)C=C.split("#",2)[0],y=y.toLocaleLowerCase()===y?C.toLocaleLowerCase():C;else y=y.split("#",2)[0]}else y=y.split("#",2)[0];return y}class k4 extends K{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return G1({part:"select",showIcon:!0,title:b("Language"),bindValue:M.locale,bindLocaleOptions:M.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var wh=k4,r8=k4.elementCreator(),Bh=r8;class J1 extends K{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>p.tosiSlot();connectedCallback(){super.connectedCallback(),J1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),J1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?b(this.refString):""}render(){super.render(),this.localeChanged()}}var i4=J1,s1=J1.elementCreator(),zh=s1;var o8=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),jh=o8?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},T8=(y)=>{if(y.code)return y.code.replace(/^Key|^Digit/,"");return y.key},qh=(y)=>{let x=[];if(y.altKey)x.push("alt");if(y.ctrlKey)x.push("ctrl");if(y.metaKey)x.push("meta");if(y.shiftKey)x.push("shift");return x.push(T8(y)),x.join("-")},Vh=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],g4=(y)=>{let x=y.trim(),h={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[l,i]of Vh)if(l.test(x))h[i]=!0,x=x.replace(l,"");return x=x.replace(/^-+/,""),h.key=x.toLowerCase(),h},a5=(y,x)=>{let h=g4(x);return y.key.toLowerCase()===h.key&&y.metaKey===h.metaKey&&y.ctrlKey===h.ctrlKey&&y.altKey===h.altKey&&y.shiftKey===h.shiftKey},Ph=(y)=>{let x=g4(y),h=[];if(x.altKey)h.push("alt");if(x.ctrlKey)h.push("ctrl");if(x.metaKey)h.push("meta");if(x.shiftKey)h.push("shift");return h.push(x.key),h.join("-")},w4=(y)=>{let x=g4(y);if(o8){let l=[];if(x.ctrlKey)l.push("⌃");if(x.altKey)l.push("⌥");if(x.shiftKey)l.push("⇧");if(x.metaKey)l.push("⌘");return l.push(x.key.toUpperCase()),l.join("")}let h=[];if(x.ctrlKey)h.push("Ctrl");if(x.altKey)h.push("Alt");if(x.shiftKey)h.push("Shift");if(x.metaKey)h.push("Meta");return h.push(x.key.toUpperCase()),h.join("+")};var z4={};y5(z4,{stringToTypes:()=>X2,isTypeAllowed:()=>N2,init:()=>E5,draggedElement:()=>Kh});var Ah=()=>!!document.querySelector(".drag-source"),N2=(y,x)=>{if(!y)return!1;for(let h of y)if(h==="special/any")return!0;else if(h.indexOf("*")>-1){let[l,i]=h.split("/"),[C,k]=x.split("/");if((l==="*"||l===C)&&(i==="*"||i===k))return!0}else if(h===x)return!0},B4=(y)=>{for(let x of[...document.querySelectorAll(`.${y}`)])x.classList.remove(y)},n8=()=>{if(F2)F2.disconnect(),F2=null;m5=[],B4("drag-over"),B4("drag-source"),B4("drag-target")},X2=(y,x=";")=>{return(y||"").split(x).map((h)=>h.trim()).filter((h)=>h!=="")},m5=[],F2=null,t5=(y)=>{if(!y)y=[];m5=y;let x=[...document.querySelectorAll("[data-drop]")];for(let h of x){let l=X2(h.dataset.drop);if(y.find((i)=>N2(l,i)))h.classList.add("drag-target");else h.classList.remove("drag-target")}if(!F2)F2=new MutationObserver(()=>t5(m5)),F2.observe(document.body,{childList:!0,subtree:!0})};function _h(y){let x=y.target?.closest('[draggable="true"],a[href]');if(!x)return;x.classList.add("drag-source");let h=x.matches('[draggable="true"]')?X2(x.dataset.drag||"text/html"):X2(x.dataset.drag||"url");for(let l of h){let i=x.dataset.dragContent||(l==="text/html"?x.innerHTML:x.textContent);y.dataTransfer?.setData(l,i||"")}t5(y.dataTransfer?.types),y.stopPropagation()}function L8(y){if(!Ah())t5(y.dataTransfer?.types);let x=y.target.closest(".drag-target");if(x&&y.dataTransfer)x.classList.add("drag-over"),y.dataTransfer.dropEffect="copy";else y.preventDefault(),y.stopPropagation()}function Gh(){B4("drag-over")}function ph(y){let x=y.target.closest(".drag-target");if(x){let h=(x.dataset?.drop||"").split(";");for(let l of h)if(N2(y.dataTransfer?.types,l))if(l==="text/html")x.innerHTML=y.dataTransfer?.getData(l)||"";else x.textContent=y.dataTransfer?.getData(l)||""}n8()}var Kh=()=>document.querySelector(".drag-source"),M8=!1,E5=()=>{if(M8)return;document.body.addEventListener("dragstart",_h),document.body.addEventListener("dragenter",L8),document.body.addEventListener("dragover",L8),document.body.addEventListener("drop",ph),document.body.addEventListener("dragleave",Gh),document.body.addEventListener("dragend",n8),window.addEventListener("dragover",(y)=>y.preventDefault()),window.addEventListener("drop",(y)=>y.preventDefault()),M8=!0};var p1=(y)=>typeof y==="function"?y():y,{div:u8,button:z0,span:a,a:Uh,tosiSlot:Oh}=p,E8=(y)=>{let x=[];for(let h of y)if(h===null){if(x.length>0&&x[x.length-1]!==null)x.push(h)}else x.push(h);while(x.length>0&&x[x.length-1]===null)x.pop();return x},B0=(y,x,h=!1)=>{let l=[];for(let i of y){if(i===null){l.push(i);continue}if(typeof i==="function"){l.push(i);continue}let{acceptsDrop:C}=i;if(!C){if(!h)l.push({...i,enabled:()=>!1});continue}if(!x.some((w)=>N2(C,w))){if(!h)l.push({...i,enabled:()=>!1});continue}let g=i;if(g.menuItems){let w=B0(p1(g.menuItems),x,!0);if(w.length>0||g.dropAction){let B=h?w:B0(p1(g.menuItems),x,!1);l.push({...g,menuItems:B})}else if(!h)l.push({...g,enabled:()=>!1})}else l.push(i)}return E8(l)},e5=(y,x=!1)=>{let h=[];for(let l of y){if(l===null){h.push(l);continue}if(typeof l==="function"){h.push(l);continue}let{action:i,menuItems:C}=l;if(i||C)if(C){let k=e5(p1(C),!0);if(k.length>0){let g=x?k:e5(p1(C),!1);h.push({...l,menuItems:g})}else if(!x)h.push({...l,enabled:()=>!1})}else h.push(l);else if(!x)h.push({...l,enabled:()=>!1})}return E8(h)},sh={overflow:"hidden auto",maxHeight:`calc(${z.maxHeight} - ${P.menuInset("8px")})`,borderRadius:z.spacing50,background:P.menuBg("#fafafa"),boxShadow:P.menuShadow(`${z.spacing13} ${z.spacing50} ${z.spacing} #0004`)},Qh={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr max-content",width:"100%",gap:0,background:"transparent",padding:P.menuItemPadding("0 8px"),height:P.menuItemHeight("48px"),lineHeight:P.menuItemHeight("48px"),textAlign:"left"},Wh={color:P.menuItemColor("#222")},Yh={boxShadow:"none !important",background:P.menuItemHoverBg("#eee")},a8={boxShadow:"none !important",background:P.menuItemActiveBg("#aaa"),color:P.menuItemActiveColor("#000")},Fh={background:`${P.menuDropOverBg("#2196F3")} !important`,color:`${P.menuDropOverColor("#fff")} !important`},Xh={color:`${P.menuDropOverColor("#fff")} !important`},Nh={stroke:`${P.menuDropOverColor("#fff")} !important`},m8={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${P.menuDropOverBg("#2196F3")} 50%, transparent) !important`},vh={".xin-menu, .tosi-menu":sh,".xin-menu > div, .tosi-menu > div":{width:P.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:P.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:P.menuSeparatorColor("#2224"),margin:P.menuSeparatorMargin("8px 0")},".xin-menu-element, .tosi-menu-element":{minHeight:P.menuItemHeight("48px")},".xin-menu-item, .tosi-menu-item":Qh,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":Wh,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr max-content",gap:P.menuItemGap("8px")},".xin-menu-shortcut, .tosi-menu-shortcut":{whiteSpace:"nowrap",paddingLeft:"1em",textAlign:"right",opacity:"0.65"},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:P.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:P.menuItemHoverBg("#eee")},".xin-menu-item > span:nth-child(2), .tosi-menu-item > span:nth-child(2)":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},".xin-menu-item:hover, .tosi-menu-item:hover":Yh,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":m8,".xin-menu-item:active, .tosi-menu-item:active":a8,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":a8,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":Fh,".xin-drop-over > span, .tosi-drop-over > span":Xh,".xin-drop-over svg, .tosi-drop-over svg":Nh,".drag-target":m8},t8=!1;function x3(){if(t8)return;t8=!0,O1("xin-menu-helper",vh),document.addEventListener("mousedown",(y)=>{if(i1.length===0)return;let x=y.composedPath();if(!i1.find((h)=>x.includes(h.target)||x.includes(h.menu)))l1(0)}),document.body.addEventListener("keydown",(y)=>{if(y.key==="Escape")l1(0)})}var e8=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,l=y?.icon||h||a(" ");if(typeof l==="string")l=U[l]();let i=x.role==="listbox"?"option":"menuitem",C,k=y.properties||{};if(typeof y?.action==="string")C=Uh(k,{role:i,href:y.action},l,x.localized?a(b(y.caption)):a(y.caption),a({class:"tosi-menu-shortcut"},y.shortcut?w4(y.shortcut):" "));else C=z0(k,{role:i,onClick:y.action},l,x.localized?a(b(y.caption)):a(y.caption),a({class:"tosi-menu-shortcut"},y.shortcut?w4(y.shortcut):" "));if(C.classList.add("xin-menu-item","tosi-menu-item"),C.classList.toggle("xin-menu-item-checked",h!==!1),C.classList.toggle("tosi-menu-item-checked",h!==!1),y.tooltip)C.dataset.tooltip=y.tooltip;if(x.role==="listbox")C.toggleAttribute("aria-selected",h!==!1);if(y?.enabled&&!y.enabled())C.setAttribute("disabled",""),C.setAttribute("aria-disabled","true");return C},y6=(y,x)=>{let h=y?.icon||a(" ");if(typeof h==="string")h=U[h]();let l=y.properties||{},i=z0(l,{onDragenter(C){Z2(),i.classList.add("xin-drop-over","tosi-drop-over"),C.preventDefault()},onDragover(C){if(C.preventDefault(),C.dataTransfer)C.dataTransfer.dropEffect="copy"},onDragleave(C){let k=C.relatedTarget;if(k&&i.contains(k))return;i.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(C){if(C.preventDefault(),C.stopPropagation(),i.classList.remove("xin-drop-over","tosi-drop-over"),y.dropAction&&C.dataTransfer)y.dropAction(C.dataTransfer);l1(0)}},h,x.localized?a(b(y.caption)):a(y.caption),a(" "));if(i.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)i.dataset.tooltip=y.tooltip;if(y.dropAction&&y.acceptsDrop)i.dataset.drop=y.acceptsDrop.join(";");if(y?.enabled&&!y.enabled())i.setAttribute("disabled",""),i.setAttribute("aria-disabled","true");return i},y3=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,l=y?.icon||h||a(" ");if(typeof l==="string")l=U[l]();let i=null,C=!1,k=y.properties||{},g=z0(k,{disabled:!(!y.enabled||y.enabled()),onClick(w){if(x._dropMode)return;L(Object.assign({},x,{menuItems:p1(y.menuItems),target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side"})),w.stopPropagation(),w.preventDefault()},onDragenter(w){if(!x._dropMode)return;Z2(),w.preventDefault(),w.stopPropagation();let B=w.relatedTarget;if(B&&g.contains(B))return;if(g.classList.add("xin-drop-over","tosi-drop-over"),C){if(l1((x.submenuDepth||0)+1),C=!1,i)clearTimeout(i);i=null;return}if(i)clearTimeout(i);i=setTimeout(()=>{C=!0;let j=p1(y.menuItems),V=x._dataTypes?B0(j,x._dataTypes,x.hideDisabled):j;if(V.length>0)L(Object.assign({},x,{menuItems:V,target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:x._dataTypes}))},x.disclosureDelay??200)},onDragover(w){if(!x._dropMode)return;if(w.preventDefault(),w.stopPropagation(),w.dataTransfer)w.dataTransfer.dropEffect=y.dropAction?"copy":"link"},onDragleave(w){if(!x._dropMode)return;let B=w.relatedTarget;if(B&&g.contains(B))return;if(C&&B&&i1.some((j)=>j.menu.contains(B)||j.target.contains(B)))return;if(g.classList.remove("xin-drop-over","tosi-drop-over"),i)clearTimeout(i),i=null},onDrop(w){if(!x._dropMode||!y.dropAction)return;if(w.preventDefault(),w.stopPropagation(),g.classList.remove("xin-drop-over","tosi-drop-over"),w.dataTransfer)y.dropAction(w.dataTransfer);l1(0)}},l,x.localized?a(b(y.caption)):a(y.caption),U.chevronRight({style:{justifySelf:"flex-end"}}));if(g.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)g.dataset.tooltip=y.tooltip;if(x._dropMode&&y.dropAction&&y.acceptsDrop)g.dataset.drop=y.acceptsDrop.join(";");return g},x6=(y,x)=>{if(y===null)return a({class:"xin-menu-separator tosi-menu-separator"});else if(typeof y==="function"){let h=y();return h.classList.add("xin-menu-element","tosi-menu-element"),h}else if(x._dropMode){let h=y;if(h.menuItems&&p1(h.menuItems).length>0)return y3(h,x);else if(y.dropAction)return y6(y,x);else{let i=y?.icon||a(" ");if(typeof i==="string")i=U[i]();return z0({class:"xin-menu-item tosi-menu-item",disabled:!0},i,x.localized?a(b(y.caption)):a(y.caption),a(" "))}}else{let h=y?.action?e8(y,x):y3(y,x);if(x.showChecked&&y.checked&&y.checked())requestAnimationFrame(()=>{h.scrollIntoView({block:"center"})});return h}},h6=(y)=>{let{target:x,width:h,menuItems:l,role:i="menu"}=y,C=l.find((w)=>w!=null&&typeof w!=="function"&&(w.icon||w.checked)),k=y.submenuDepth||0,g=u8({class:C?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:i,onClick(){if(!y._dropMode)l1(0)},onDragover(w){if(!y._dropMode)return;w.preventDefault()},onDragenter(){if(!y._dropMode)return;Z2()},onDragleave(w){if(!y._dropMode)return;let B=w.relatedTarget;if(B&&g.contains(B))return;if(B&&i1.some((j)=>j.menu.contains(B)||j.target.contains(B)))return;l6(k)}},u8({style:{minWidth:x.offsetWidth+"px",width:typeof h==="number"?`${h}px`:h},onMousedown(w){w.preventDefault(),w.stopPropagation()}},...l.map((w)=>x6(w,y))));return g},v2,i1=[],w0=null,Z2=()=>{if(w0)clearTimeout(w0),w0=null},l6=(y)=>{Z2(),w0=setTimeout(()=>{w0=null,l1(y)},500)},l1=(y=0)=>{if(Z2(),y===0)document.querySelectorAll("tosi-menu.xin-drop-over, tosi-menu.tosi-drop-over").forEach((h)=>h.classList.remove("xin-drop-over","tosi-drop-over"));let x=i1.splice(y);for(let h of x)if(h.menu.remove(),h.onClose)h.onClose();return v2=x[0],y>0?i1[y-1]:void 0},L=(y)=>{x3(),y=Object.assign({submenuDepth:0},y);let{target:x,position:h,submenuDepth:l}=y;if(v2&&!document.body.contains(v2?.menu))v2=void 0;if(i1.length&&!document.body.contains(i1[0].menu))i1.splice(0);if(y._dropMode){if(i1.length>l&&i1[l]?.target===x)return;l1(l)}else{if(l===0&&v2?.target===x)return;let k=l1(l);if(v2?.target===x)return;if(k&&k.target===x){l1();return}}if(!y.menuItems?.length)return;let i=h6(y),C=C0({content:i,target:x,position:h});C.remainOnScroll=y._dropMode?"remain":"remove",i1.push({target:x,menu:C,onClose:y.onClose})},i6=(y)=>{x3();let{dataTypes:x,...h}=y,l=B0(y.menuItems,x,y.hideDisabled);if(!l.length)return;L({...h,menuItems:l,_dropMode:!0,_dataTypes:x})};function h3(y,x,h=[]){for(let l of y){if(!l)continue;if(typeof l==="function")continue;let{shortcut:i}=l,{menuItems:C}=l;if(i){if(a5(x,i)){let k=l;if(k.enabled&&!k.enabled())return;if(h.some((g)=>g.enabled&&!g.enabled()))return;return{action:k,path:h}}}else if(C){let k=h3(p1(C),x,[...h,l]);if(k)return k}}return}class j4 extends K{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:z.touchSize,minHeight:z.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:P.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(y){if(!this.acceptsDrop)return!1;let x=X2(this.acceptsDrop);return[...y.dataTransfer?.types||[]].some((l)=>x.some((i)=>N2([i],l)))}showMenu=(y)=>{if(y.type==="click"||y.code==="Space")L({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),y.stopPropagation(),y.preventDefault()};handleDragEnter=(y)=>{if(this._dragMatches=this._matchesDrag(y),!this._dragMatches)return;Z2(),this.classList.add("xin-drop-over","tosi-drop-over");let x=[...y.dataTransfer?.types||[]];if(this.menuItems.length)i6({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:x,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});y.preventDefault()};handleDragOver=(y)=>{if(!this._dragMatches)return;if(y.preventDefault(),y.dataTransfer)y.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(y)=>{if(!this._dragMatches)return;let x=y.relatedTarget;if(x&&this.contains(x))return;if(x&&i1.some((h)=>h.menu.contains(x)||h.target.contains(x))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),l6(0)};handleDrop=(y)=>{if(!this._dragMatches||!this.dropAction)return;if(y.preventDefault(),y.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),y.dataTransfer)this.dropAction(y.dataTransfer);l1(0)};content=()=>z0({tabindex:0,part:"trigger",onClick:this.showMenu},Oh());handleShortcut=async(y)=>{let x=h3(this.menuItems,y);if(!x)return;y.preventDefault(),y.stopImmediatePropagation();let{action:h,path:l}=x;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(l,h);if(h.action instanceof Function)h.action()};findMenuItemByCaption(y,x){for(let h of y.querySelectorAll(".xin-menu-item")){let l=h.children[1];if(l&&l.textContent===x)return h}return null}async animateShortcut(y,x){l1(0),L({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((l)=>setTimeout(l,80));for(let l=0;l<y.length;l++){let i=l+1,C=i1[l]?.menu;if(!C)break;let k=this.findMenuItemByCaption(C,y[l].caption);if(!k)break;L({target:k,width:this.menuWidth,localized:this.localized,menuItems:p1(y[l].menuItems),submenuDepth:i,position:"side"}),await new Promise((g)=>setTimeout(g,80))}let h=i1[i1.length-1]?.menu;if(h){let l=this.findMenuItemByCaption(h,x.caption);if(l)l.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((l)=>setTimeout(l,300)),l1(0)}constructor(){super();this.addEventListener("keydown",this.showMenu),this.addEventListener("dragenter",this.handleDragEnter),this.addEventListener("dragover",this.handleDragOver),this.addEventListener("dragleave",this.handleDragLeave),this.addEventListener("drop",this.handleDrop)}connectedCallback(){if(super.connectedCallback(),x3(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var C6=j4.elementCreator(),Zh=C6,$h=j4;function ch(y,x,h){let l=y.find((i)=>i[x]!==void 0&&i[x]!==null);if(l!==void 0){let i=l[x];switch(typeof i){case"string":if(i.match(/^\d+(\.\d+)?$/))return 6*h;else if(i.includes(" "))return 20*h;else return 12*h;case"number":return 6*h;case"boolean":return 5*h;case"object":return!1;default:return 8*h}}return!1}var{div:j0,span:l3,button:Rh}=p,k6=(y)=>y;class q4 extends K{static preferredTagName="tosi-table";static lightStyleSpec={":host":{"--tosi-table-row-height":"32px","--tosi-table-touch-size":"var(--tosi-touch-size, 44px)","--tosi-table-dragged-header-bg":"#0004","--tosi-table-dragged-header-color":"#fff","--tosi-table-drop-header-bg":"#fff4",display:"block",overflow:"hidden",background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .scroll-area":{width:"100%",height:"100%",overflow:"auto",overscrollBehavior:"none"},":host .thead, :host .tbody":{display:"contents"},":host .tr":{display:"grid",gridTemplateColumns:z.tosiTableGridColumns,width:z.tosiTableGridRowWidth,height:z.tosiTableRowHeight,background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .thead .tr":{position:"sticky",top:"0",zIndex:"2",background:P.tosiTableHeaderBg(P.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tbody-pinned-top .tr, :host .tbody-pinned-bottom .tr":{position:"sticky",zIndex:"1"},":host .th, :host .td":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"flex",alignItems:"center",height:z.tosiTableRowHeight,lineHeight:z.tosiTableRowHeight},":host .col-pinned":{position:"sticky",zIndex:"1",background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .th.col-pinned":{zIndex:"3",background:P.tosiTableHeaderBg(P.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tr[aria-selected] .td":{background:P.tosiTableSelectedBg("var(--tosi-accent, #007AFF22)")},":host .td:focus, :host .th:focus":{outline:"2px solid var(--tosi-accent, #007AFF)",outlineOffset:"-2px",zIndex:"1"},":host .col-pinned:focus":{zIndex:"4"},":host .col-edge-right":{boxShadow:"1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .col-edge-left":{boxShadow:"-1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-bottom":{boxShadow:"0 1px 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-top":{boxShadow:"0 -1px 0 var(--tosi-table-edge-color, #0002)"},":host .th .menu-trigger":{color:"currentColor",background:"none",padding:0,lineHeight:z.tosiTableTouchSize,height:z.tosiTableTouchSize,width:z.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:z.tosiTableDraggedHeaderBg,color:z.tosiTableDraggedHeaderColor},":host .drag-over":{background:z.tosiTableDropHeaderBg}};static initAttributes={rowHeight:30,charWidth:15,minColumnWidth:30,select:!1,multiple:!1,pinnedTop:0,pinnedBottom:0,nosort:!1,nohide:!1,noreorder:!1,localized:!1};selectionChanged=()=>{};rowRendered=null;selectedKey=Symbol("selected");selectBinding=(y,x)=>{if(x==null)return;y.toggleAttribute("aria-selected",x[this.selectedKey]===!0)};maxVisibleRows=1e4;_head=null;_scrollArea=null;_tbodyTop=null;_tbodyBottom=null;_pinnedRowEdgeObserver=null;_rowCellsCache=new WeakMap;itemFor(y){return C2(y)}cellsFor(y){let x=J(y);for(let h of[this._tbodyTop,this._scrollArea,this._tbodyBottom]){if(!h)continue;let l=s2(h);if(!l)continue;let i=l.itemToElement.get(x);if(i&&i.length>0){let C=i[0],k=this._rowCellsCache.get(C);if(!k)k=Array.from(C.children),this._rowCellsCache.set(C,k);return k}}return}get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(y){let{array:x,columns:h,filter:l}=J(y);if(this._array!==x||this._columns!==h||this._filter!==l)this.queueRender();this._array=x||[],this._columns=h||null,this._filter=l||k6}rowData={visible:[],pinnedTopData:[],pinnedBottomData:[]};_array=[];_columns=null;_filter=k6;_sort;_pinnedTopRows;_pinnedBottomRows;get pinnedTopRows(){return this._pinnedTopRows}set pinnedTopRows(y){this._pinnedTopRows=y?J(y):void 0,this.queueRender()}get pinnedBottomRows(){return this._pinnedBottomRows}set pinnedBottomRows(y){this._pinnedBottomRows=y?J(y):void 0,this.queueRender()}get effectivePinnedTopData(){if(this._pinnedTopRows)return this._pinnedTopRows;return this.pinnedTop>0?this._array.slice(0,this.pinnedTop):[]}get effectivePinnedBottomData(){if(this._pinnedBottomRows)return this._pinnedBottomRows;return this.pinnedBottom>0?this._array.slice(-this.pinnedBottom):[]}get effectiveBaseData(){if(this._pinnedTopRows||this._pinnedBottomRows)return this._array;return this._array.slice(this.pinnedTop,this._array.length-this.pinnedBottom)}constructor(){super();this.rowData=e({[this.instanceId]:this.rowData})[this.instanceId]}get array(){return this._array}set array(y){this._array=J(y),this.queueRender()}get filter(){return this._filter}set filter(y){if(this._filter!==y)this._filter=y,this.queueRender()}get sort(){if(this._sort)return this._sort;let y=this._columns?.find((h)=>h.sort==="ascending"||h.sort==="descending");if(!y)return;let{prop:x}=y;return y.sort==="ascending"?(h,l)=>h[x]>l[x]?1:-1:(h,l)=>h[x]>l[x]?-1:1}set sort(y){if(this._sort!==y)this._sort=y,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:y}=this;this._columns=Object.keys(y[0]||{}).map((x)=>{let h=ch(y,x,this.charWidth);return{name:x.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:x,align:typeof y[0][x]==="number"||y[0][x]!==""&&!isNaN(y[0][x])?"right":"left",visible:h!==!1,width:h?h:0}})}return this._columns}set columns(y){this._columns=y,this.queueRender()}get visibleColumns(){let y=this.columns.filter((i)=>i.visible!==!1),x=y.filter((i)=>i.pinned==="left"),h=y.filter((i)=>!i.pinned),l=y.filter((i)=>i.pinned==="right");return[...x,...h,...l]}get pinnedLeft(){return this.visibleColumns.filter((y)=>y.pinned==="left").length}set pinnedLeft(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="left")delete h.pinned;for(let h=0;h<y&&h<x.length;h++)x[h].pinned="left";this.queueRender()}get pinnedRight(){return this.visibleColumns.filter((y)=>y.pinned==="right").length}set pinnedRight(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="right")delete h.pinned;for(let h=x.length-y;h<x.length;h++)if(h>=0)x[h].pinned="right";this.queueRender()}content=null;computeStickyInfo(y){let x=y.map(()=>({})),h=0,l=-1;for(let k=0;k<y.length;k++){if(y[k].pinned!=="left")break;x[k].left=h+"px",h+=y[k].width,l=k}if(l>=0)x[l].edgeClass="col-edge-right";let i=0,C=y.length;for(let k=y.length-1;k>=0;k--){if(y[k].pinned!=="right")break;x[k].right=i+"px",i+=y[k].width,C=k}if(C<y.length)x[C].edgeClass="col-edge-left";return x}cellClasses(y,x){let h=y;if(x.left!=null||x.right!=null)h+=" col-pinned";if(x.edgeClass)h+=" "+x.edgeClass;return h}rowClasses(y){return y==="visible"?"tr":"tr row-pinned"}tagPinnedRows=()=>{this.tagPinnedTbody(this._tbodyTop,"top"),this.tagPinnedTbody(this._tbodyBottom,"bottom")};tagPinnedTbody(y,x){if(!y)return;let h=Array.from(y.querySelectorAll(".tr"));if(h.length===0)return;let l=h.length-1,i=x==="top"?"row-edge-bottom":"row-edge-top";h.forEach((k,g)=>{k.classList.remove(i);let w=x==="top"?g+1:l-g;k.style[x]=`calc(var(--tosi-table-row-height) * ${w})`}),(x==="top"?h[l]:h[0]).classList.add(i)}cellStyle(y,x,h){let l={justifyContent:y.align||"left",...h};if(x.left!=null)l.left=x.left;if(x.right!=null)l.right=x.right;return l}applyGridCellAttrs(y,x,h,l){y.setAttribute("aria-colindex",String(x+1)),y.tabIndex=-1,y.classList.add(...this.cellClasses("td",h).split(" ")),Object.assign(y.style,l)}buildCell(y,x,h,l){let i=this.cellStyle(y,h);if(y.dataCell!==void 0){let C=y.dataCell(y);return this.applyGridCellAttrs(C,x,h,i),C}return l3({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:i,bindText:l[y.prop]})}buildRow(y,x,h,l="tr"){let i=x.map((g,w)=>this.buildCell(g,w,h[w],y)),C=this.selectBinding,k={class:l};return k.bind={value:y,binding:{toDOM:(g,w)=>{C(g,w);let B=this.rowRendered;if(B)B(w,Array.from(g.children))}}},j0(k,...i)}buildHeaderCell(y,x,h){let{popColumnMenu:l}=this,i="none",C;switch(y.sort){case"ascending":C=U.sortAscending(),i="descending";break;case"descending":i="ascending",C=U.sortDescending();break}let k=!(this.nosort&&this.nohide)?Rh({class:"menu-trigger",onClick(w){l(w.target,y),w.stopPropagation()}},C||U.moreVertical()):{},g=y.headerCell!==void 0?y.headerCell(y):l3({class:this.cellClasses("th",h),role:"columnheader",tabindex:-1,ariaSort:i,ariaColindex:String(x+1),style:this.cellStyle(y,h)},this.captionSpan({style:{flex:"1"}},typeof y.name==="string"?y.name:y.prop),k);if(y.headerCell!==void 0)this.applyGridCellAttrs(g,x,h,this.cellStyle(y,h)),g.classList.remove("td"),g.classList.add("th"),g.setAttribute("role","columnheader");if(!this.noreorder&&g.children[0]){E5();let w=this.instanceId+"-column-header",B=g.children[0];B.setAttribute("draggable","true"),B.style.pointerEvents="all",B.dataset.drag=w,g.dataset.drop=w,B.addEventListener("dragstart",()=>{this.draggedColumn=y}),g.addEventListener("drop",this.dropColumn)}return g}buildHeader(y,x){let h=y.map((l,i)=>this.buildHeaderCell(l,i,x[i]));return j0({class:"thead",role:"rowgroup"},j0({class:"tr",role:"row"},...h))}buildPinnedBody(y,x,h,l){let i=J(y);if(!i||i.length===0)return null;let C=l==="pinned-top"?"pinnedTopRows":"pinnedBottomRows",k=this.rowClasses(l),g=y.listBinding((w,B)=>this.buildRow(B,x,h,k),{});return j0({class:`tbody tbody-${l}`,role:"rowgroup",part:C},...g)}getColumn(y){if(!this._scrollArea)return;let x=(y.touches!==void 0?y.touches[0].clientX:y.clientX)-this._scrollArea.getBoundingClientRect().x,h=y.touches!==void 0?20:5,{scrollLeft:l,clientWidth:i,scrollWidth:C}=this._scrollArea,k=this.visibleColumns,g=C-i-l,w=0;return k.find((B)=>{if(B.visible===!1)return!1;w+=B.width;let j;if(B.pinned==="left")j=w;else if(B.pinned==="right")j=w-l-g;else j=w-l;return Math.abs(x-j)<h})}setCursor=(y)=>{let x=this.getColumn(y);this.style.cursor=x!==void 0?"col-resize":""};resizeColumn=(y)=>{let x=this.getColumn(y);if(x!==void 0){let h=Number(x.width),l=y.touches!==void 0,i=l?y.touches[0].identifier:void 0;V1(y,(C,k,g)=>{if((l?[...g.touches].find((j)=>j.identifier===i):!0)===void 0)return!0;let B=h+C;if(x.width=B>this.minColumnWidth?B:this.minColumnWidth,this.setColumnWidths(),g.type==="mouseup")return!0},"col-resize")}};selectRow(y,x=!0){if(x)y[this.selectedKey]=!0;else delete y[this.selectedKey];this.updateSelectionVisuals()}selectRows(y,x=!0){for(let h of y||this.array)if(x)h[this.selectedKey]=!0;else delete h[this.selectedKey];this.updateSelectionVisuals()}deSelect(y){this.selectRows(y,!1)}updateSelectionVisuals(){let y=this._scrollArea?.querySelectorAll(".tr")??[];for(let x of y){let h=this.itemFor(x);if(h!=null)this.selectBinding(x,h)}}rangeStart;updateSelection=(y)=>{if(!this.select&&!this.multiple)return;let{target:x}=y;if(!(x instanceof HTMLElement))return;let h=this.itemFor(x);if(h==null)return;let l=y,i=window.getSelection();if(i!==null)i.removeAllRanges();let C=this.visibleRows;if(this.multiple&&l.shiftKey&&C.length>0&&this.rangeStart!==h){let k=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[g,w]=[this.rangeStart!==void 0?C.indexOf(this.rangeStart):0,C.indexOf(h)].sort((B,j)=>B-j);if(g>-1)for(let B=g;B<=w;B++){let j=C[B];this.selectRow(j,k)}}else if(this.multiple&&l.metaKey){this.selectRow(h,!h[this.selectedKey]);let k=C.indexOf(h),g=C[k+1],w=k>0?C[k-1]:void 0;if(g!==void 0&&g[this.selectedKey]===!0)this.rangeStart=g;else if(w!==void 0&&w[this.selectedKey]===!0)this.rangeStart=w;else this.rangeStart=void 0}else this.rangeStart=h,this.deSelect(),this.selectRow(h,!0);this.selectionChanged(this.visibleSelectedRows),this.updateSelectionVisuals()};findCell(y,x){if(y===-1)return this.querySelector(`.thead .th[aria-colindex="${x+1}"]`);let h=this.effectivePinnedTopData,l=this.visibleRows,i=this.effectivePinnedBottomData,C;if(y<h.length)C=h[y];else if(y<h.length+l.length)C=l[y-h.length];else if(y<h.length+l.length+i.length)C=i[y-h.length-l.length];else return null;return this.cellsFor(C)?.[x]??null}_pendingFocus=null;onScrollEnd=()=>{if(!this._pendingFocus)return;let{row:y,col:x}=this._pendingFocus;this._pendingFocus=null;let h=this.findCell(y,x);if(h)h.focus()};focusCell(y,x){this._pendingFocus={row:y,col:x};let h=this.findCell(y,x);if(h)h.focus(),h.scrollIntoView({block:"nearest",inline:"nearest"});else if(this._scrollArea){let l=this.effectivePinnedTopData,i=y-l.length;if(i>=0&&i<this.visibleRows.length)this._scrollArea.scrollTop=i*this.rowHeight}}handleKeyNav=(y)=>{let x=y.target,h=x.closest(".td")||x.closest(".th");if(!h)return;let l=parseInt(h.getAttribute("aria-colindex")||"",10);if(isNaN(l))return;let i=l-1,C=this.visibleColumns.length,k=this.effectivePinnedTopData,g=this.visibleRows,w=this.effectivePinnedBottomData,B=k.length+g.length+w.length,j=y.metaKey||y.ctrlKey,V=h.classList.contains("th"),A;if(V)A=-1;else{let W=h.closest(".tr");if(!W)return;let F=C2(W);if(F==null)return;let Y=k.indexOf(F),$=Y===-1?g.indexOf(F):-1,R=Y===-1&&$===-1?w.indexOf(F):-1;if(Y!==-1)A=Y;else if($!==-1)A=k.length+$;else if(R!==-1)A=k.length+g.length+R;else return}let O=A,G=i;switch(y.key){case"ArrowUp":O=j?0:Math.max(-1,A-1);break;case"ArrowDown":O=j?B-1:Math.min(B-1,A+1);break;case"ArrowLeft":G=j?0:Math.max(0,i-1);break;case"ArrowRight":G=j?C-1:Math.min(C-1,i+1);break;case"Tab":if(y.shiftKey)if(i>0)G=i-1;else if(A>0)O=A-1,G=C-1;else return;else if(i<C-1)G=i+1;else if(A<B-1)O=A+1,G=0;else return;break;case"Home":if(j)O=0,G=0;else G=0;break;case"End":if(j)O=B-1,G=C-1;else G=C-1;break;default:return}if(O!==A||G!==i)y.preventDefault(),this.focusCell(O,G)};connectedCallback(){super.connectedCallback(),this.addEventListener("mousemove",this.setCursor),this.addEventListener("mousedown",this.resizeColumn),this.addEventListener("touchstart",this.resizeColumn,{passive:!0}),this.addEventListener("mouseup",this.updateSelection),this.addEventListener("touchend",this.updateSelection),this.addEventListener("keydown",this.handleKeyNav)}setColumnWidths(){let y=this.visibleColumns,x=y.map((i)=>i.width+"px").join(" "),h=y.reduce((i,C)=>i+C.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",x),this.style.setProperty("--tosi-table-grid-row-width",h),this.style.setProperty("--grid-columns",x),this.style.setProperty("--grid-row-width",h);let l=this.computeStickyInfo(y);for(let i of this.querySelectorAll(".col-pinned")){let C=parseInt(i.getAttribute("aria-colindex")||"",10)-1;if(!isNaN(C)&&l[C]){let k=l[C];if(k.left!=null)i.style.left=k.left;if(k.right!=null)i.style.right=k.right}}}sortByColumn=(y,x="auto")=>{for(let h of this.columns.filter((l)=>J(l.sort)!==!1))if(J(h)===y){if(x==="auto")h.sort=h.sort==="ascending"?"descending":"ascending";else h.sort=x;this.queueRender()}else delete h.sort};popColumnMenu=(y,x)=>{let{sortByColumn:h}=this,l=this.columns.filter((g)=>g.visible===!1),i=this.queueRender.bind(this),C=[];if(!this.nosort&&x.sort!==!1)C.push({caption:this.localized?`${b("Sort")} ${b("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){h(x)}},{caption:this.localized?`${b("Sort")} ${b("Descending")}`:"Sort Descending",icon:"sortDescending",action(){h(x,"descending")}});if(!this.nohide){if(C.length)C.push(null);C.push({caption:this.localized?`${b("Hide")} ${b("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>x.visible!==!0,action(){x.visible=!1,i()}},{caption:this.localized?`${b("Show")} ${b("Column")}`:"Show Column",icon:"eye",enabled:()=>l.length>0,menuItems:l.map((g)=>{return{caption:g.name||g.prop,action(){delete g.visible,i()}}})})}if(C.length)C.push(null);let k=x.pinned==="left"?"pin":x.pinned==="right"?"pin0f":"pin50o";C.push({caption:this.localized?b("Pin"):"Pin",icon:k,menuItems:[{caption:this.localized?b("Left"):"Left",icon:"pin",enabled:()=>x.pinned!=="left",action(){x.pinned="left",i()}},{caption:this.localized?b("Right"):"Right",icon:"pin0f",enabled:()=>x.pinned!=="right",action(){x.pinned="right",i()}},{caption:this.localized?b("Unpin"):"Unpin",icon:"unPin",enabled:()=>!!x.pinned,action(){delete x.pinned,i()}}]}),L({target:y,localized:this.localized,menuItems:C})};get captionSpan(){return this.localized?s1:l3}get visibleRows(){return J(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((y)=>y[this.selectedKey])}get selectedRows(){if(this._pinnedTopRows||this._pinnedBottomRows)return[...this._pinnedTopRows??[],...this._array,...this._pinnedBottomRows??[]].filter((x)=>x[this.selectedKey]);return this._array.filter((y)=>y[this.selectedKey])}getCells(y){let x=y instanceof Element?this.itemFor(y):y;return x==null?void 0:this.cellsFor(x)}getItem(y){return this.itemFor(y)}draggedColumn;dropColumn=(y)=>{let x=y.target.closest(".drag-over"),h=parseInt(x.getAttribute("aria-colindex")||"",10)-1,l=this.visibleColumns[h],i=this.columns.indexOf(this.draggedColumn),C=this.columns.indexOf(l);this.draggedColumn.pinned=l.pinned,this.columns.splice(i,1),this.columns.splice(C,0,this.draggedColumn),this.queueRender(),y.preventDefault(),y.stopPropagation()};render(){super.render(),this.textContent="";let y=this.effectivePinnedTopData,x=this.effectivePinnedBottomData,h=this.effectiveBaseData,l=Math.min(h.length,this.maxVisibleRows),i=this.filter(h.slice(0,l)),{sort:C}=this;if(C)i.sort(C);this.rowData.pinnedTopData=y,this.rowData.pinnedBottomData=x,this.rowData.visible=i;let k=this.visibleColumns;if(k.length===0)return;let g=this.computeStickyInfo(k);this.style.setProperty("--tosi-table-row-height",this.rowHeight>0?`${this.rowHeight}px`:"auto"),this.setColumnWidths(),this._head=this.buildHeader(k,g),this._tbodyTop=this.buildPinnedBody(this.rowData.pinnedTopData,k,g,"pinned-top"),this._tbodyBottom=this.buildPinnedBody(this.rowData.pinnedBottomData,k,g,"pinned-bottom");let w=this.rowData.visible.listBinding((B,j)=>this.buildRow(j,k,g),this.rowHeight>0?{virtual:{height:this.rowHeight}}:{});this._scrollArea=j0({class:"scroll-area",part:"visibleRows"},...[this._head,this._tbodyTop,...w,this._tbodyBottom].filter(Boolean)),this._scrollArea.addEventListener("scrollend",this.onScrollEnd),this.append(this._scrollArea),this.observePinnedRowMutations(),this.tagPinnedRows()}observePinnedRowMutations(){this._pinnedRowEdgeObserver?.disconnect(),this._pinnedRowEdgeObserver=new MutationObserver(this.tagPinnedRows);for(let y of[this._tbodyTop,this._tbodyBottom])if(y)this._pinnedRowEdgeObserver.observe(y,{childList:!0})}}var Jh=q4,i3=q4.elementCreator(),fh=i3,Hh=i3;var{dialog:bh,button:C3,header:Dh,footer:dh,tosiSlot:k3,h3:g3,p:w3,label:Sh,input:Ih,div:rh}=p;class B3 extends K{static preferredTagName="tosi-dialog";static lightStyleSpec={":host > dialog::backdrop":{backdropFilter:"blur(8px)"},":host > dialog:not([open])":{display:"none"},":host > dialog[open]":{minWidth:300,border:0,borderRadius:10,overflow:"hidden",maxHeight:"calc(100% - 20px)",padding:0,display:"flex",flexDirection:"column",gap:5,_dialogShadow:P.menuShadow("0 5px 10px #0004"),_dialogBackground:P.background("#fafafa"),_dialogColor:P.textColor("#222"),boxShadow:z.dialogShadow,background:z.dialogBackground,color:z.dialogColor},":host > dialog > *":{padding:"0 20px"},":host > dialog > header":{display:"flex",justifyContent:"center",gap:10},":host > dialog > footer":{display:"flex",justifyContent:"flex-end",gap:10,paddingBottom:20}};static async alert(y,x="Alert"){return new Promise((h)=>{let l=V4({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){h()}},g3({slot:"header"},x),y.includes(`
17
- `)?p.pre({style:{whiteSpace:"pre-wrap",margin:0}},y):w3(y));document.body.append(l),l.showModal()})}static async confirm(y,x="Confirm"){return new Promise((h)=>{let l=V4({removeOnClose:!0,dialogWillClose(i){h(i==="confirm")}},g3({slot:"header"},x),w3(y),C3({slot:"footer",onClick(){l.close()}},"Cancel"));document.body.append(l),l.showModal()})}static async prompt(y,x="Prompt",h=""){return new Promise((l)=>{let i=Ih({value:h}),C=V4({removeOnClose:!0,dialogWillClose(k){l(k==="confirm"?i.value:null)},initialFocus(){i.focus()}},g3({slot:"header"},x),w3(Sh({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},rh(y),i)),C3({slot:"footer",onClick(){C.close()}},"Cancel"));document.body.append(C),C.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();Q2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(y="cancel")=>{console.log("dialog will close with",y)};initialFocus(){this.parts.ok.focus()}#y=(y)=>{};showModal=()=>{return this.style.zIndex=String(g2()),new Promise((y)=>{this.#y=y,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(y="cancel")=>{if(this.dialogWillClose(y),this.#y(y),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>bh({part:"dialog"},Dh(k3({name:"header"})),k3(),dh(k3({name:"footer"}),C3({part:"ok",onClick:this.ok},"OK")))}var V4=B3.elementCreator();var oh=/^readme\.md$/i;function g6(y){if(oh.test(y))return"";return y.replace(/\.[^.]+$/,"")}function $2(y){let x={};for(let l of y){let i=g6(l.filename);x[i]=(x[i]||0)+1}let h={};for(let l of y){let i=g6(l.filename);h[l.filename]=i!==""&&x[i]>1?l.filename.replace(/\./g,"-"):i}return h}function z3(y){return y===""?"/":`/${y}/`}function B6(y,x){let h=y.replace(/^\?/,"");if(!h||h.includes("=")||h.includes("&"))return null;let l=decodeURIComponent(h),i=x[l];if(i===void 0)return null;return z3(i)}function Th(y){return y.replace(/^\/+/,"").replace(/\/+$/,"").replace(/\/index\.html$/i,"")}function j3(y,x){let h=Th(y);for(let[l,i]of Object.entries(x))if(i===h)return l;return""}function w6(y){return y.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function q3(y,x,h){if(!y)return"";for(let i of x)if(i.filename===y)return i.filename;for(let i of x)if(h[i.filename]===y)return i.filename;let l=w6(y);for(let i of x)if(h[i.filename]===l)return i.filename;for(let i of x)if(i.title&&w6(i.title)===l)return i.filename;return""}function z6(y){let x=y.pin==="top"?"A":y.pin==="bottom"?"Z":"M",h=String(y.order??500).padStart(4,"0");return x+h+(y.title||"").toLocaleLowerCase()+"\x00"+y.filename}function Lh(y,x){let h=z6(y),l=z6(x);return h>l?1:l>h?-1:0}function P4(y,x){let h=new Map;for(let k of y)h.set(k.filename,{doc:k,slug:x[k.filename]??"",children:[],depth:0});let l=new Map;for(let k of y){let g=k.parent?q3(k.parent,y,x):"";if(g&&(g===k.filename||!h.has(g)||Mh(k.filename,g,y,x)))g="";l.set(k.filename,g)}let i=[];for(let k of y){let g=l.get(k.filename)||"",w=h.get(k.filename);if(g)h.get(g).children.push(w);else i.push(w)}let C=(k,g)=>{k.sort((w,B)=>Lh(w.doc,B.doc));for(let w of k)w.depth=g,C(w.children,g+1)};return C(i,0),i}function Mh(y,x,h,l){let i=new Map(h.map((g)=>[g.filename,g])),C=x,k=new Set([y]);while(C){if(k.has(C))return!0;k.add(C);let g=i.get(C);C=g?.parent?q3(g.parent,h,l):""}return!1}function P3(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var B2=P3();function G6(y){B2=y}var A0={exec:()=>null};function f(y,x=""){let h=typeof y=="string"?y:y.source,l={replace:(i,C)=>{let k=typeof C=="string"?C:C.source;return k=k.replace(k1.caret,"$1"),h=h.replace(i,k),l},getRegex:()=>new RegExp(h,x)};return l}var nh=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),k1={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(y)=>new RegExp(`^( {0,3}${y})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}#`),htmlBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}<(?:[a-z].*>|!--)`,"i")},uh=/^(?:[ \t]*(?:\n|$))+/,ah=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,mh=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,th=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,A3=/(?:[*+-]|\d{1,9}[.)])/,p6=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,K6=f(p6).replace(/bull/g,A3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Eh=f(p6).replace(/bull/g,A3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_3=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,eh=/^[^\n]+/,G3=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,yl=f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",G3).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xl=f(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,A3).getRegex(),p4="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",p3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hl=f("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",p3).replace("tag",p4).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),U6=f(_3).replace("hr",_0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p4).getRegex(),ll=f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",U6).getRegex(),K3={blockquote:ll,code:ah,def:yl,fences:mh,heading:th,hr:_0,html:hl,lheading:K6,list:xl,newline:uh,paragraph:U6,table:A0,text:eh},j6=f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p4).getRegex(),il={...K3,lheading:Eh,table:j6,paragraph:f(_3).replace("hr",_0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",j6).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p4).getRegex()},Cl={...K3,html:f(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",p3).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:A0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:f(_3).replace("hr",_0).replace("heading",` *#{1,6} *[^
18
- ]`).replace("lheading",K6).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},kl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,gl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,O6=/^( {2,}|\\)\n(?!\s*$)/,wl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,K4=/[\p{P}\p{S}]/u,U3=/[\s\p{P}\p{S}]/u,s6=/[^\s\p{P}\p{S}]/u,Bl=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,U3).getRegex(),Q6=/(?!~)[\p{P}\p{S}]/u,zl=/(?!~)[\s\p{P}\p{S}]/u,jl=/(?:[^\s\p{P}\p{S}]|~)/u,ql=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",nh?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),W6=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Vl=f(W6,"u").replace(/punct/g,K4).getRegex(),Pl=f(W6,"u").replace(/punct/g,Q6).getRegex(),Y6="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Al=f(Y6,"gu").replace(/notPunctSpace/g,s6).replace(/punctSpace/g,U3).replace(/punct/g,K4).getRegex(),_l=f(Y6,"gu").replace(/notPunctSpace/g,jl).replace(/punctSpace/g,zl).replace(/punct/g,Q6).getRegex(),Gl=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,s6).replace(/punctSpace/g,U3).replace(/punct/g,K4).getRegex(),pl=f(/\\(punct)/,"gu").replace(/punct/g,K4).getRegex(),Kl=f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ul=f(p3).replace("(?:-->|$)","-->").getRegex(),Ol=f("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ul).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_4=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,sl=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_4).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),F6=f(/^!?\[(label)\]\[(ref)\]/).replace("label",_4).replace("ref",G3).getRegex(),X6=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",G3).getRegex(),Ql=f("reflink|nolink(?!\\()","g").replace("reflink",F6).replace("nolink",X6).getRegex(),q6=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,O3={_backpedal:A0,anyPunctuation:pl,autolink:Kl,blockSkip:ql,br:O6,code:gl,del:A0,emStrongLDelim:Vl,emStrongRDelimAst:Al,emStrongRDelimUnd:Gl,escape:kl,link:sl,nolink:X6,punctuation:Bl,reflink:F6,reflinkSearch:Ql,tag:Ol,text:wl,url:A0},Wl={...O3,link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",_4).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_4).getRegex()},V3={...O3,emStrongRDelimAst:_l,emStrongLDelim:Pl,url:f(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",q6).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:f(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",q6).getRegex()},Yl={...V3,br:f(O6).replace("{2,}","*").getRegex(),text:f(V3.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},A4={normal:K3,gfm:il,pedantic:Cl},q0={normal:O3,gfm:V3,breaks:Yl,pedantic:Wl},Fl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},V6=(y)=>Fl[y];function f1(y,x){if(x){if(k1.escapeTest.test(y))return y.replace(k1.escapeReplace,V6)}else if(k1.escapeTestNoEncode.test(y))return y.replace(k1.escapeReplaceNoEncode,V6);return y}function P6(y){try{y=encodeURI(y).replace(k1.percentDecode,"%")}catch{return null}return y}function A6(y,x){let h=y.replace(k1.findPipe,(C,k,g)=>{let w=!1,B=k;for(;--B>=0&&g[B]==="\\";)w=!w;return w?"|":" |"}),l=h.split(k1.splitPipe),i=0;if(l[0].trim()||l.shift(),l.length>0&&!l.at(-1)?.trim()&&l.pop(),x)if(l.length>x)l.splice(x);else for(;l.length<x;)l.push("");for(;i<l.length;i++)l[i]=l[i].trim().replace(k1.slashPipe,"|");return l}function V0(y,x,h){let l=y.length;if(l===0)return"";let i=0;for(;i<l;){let C=y.charAt(l-i-1);if(C===x&&!h)i++;else if(C!==x&&h)i++;else break}return y.slice(0,l-i)}function Xl(y,x){if(y.indexOf(x[1])===-1)return-1;let h=0;for(let l=0;l<y.length;l++)if(y[l]==="\\")l++;else if(y[l]===x[0])h++;else if(y[l]===x[1]&&(h--,h<0))return l;return h>0?-2:-1}function _6(y,x,h,l,i){let C=x.href,k=x.title||null,g=y[1].replace(i.other.outputLinkReplace,"$1");l.state.inLink=!0;let w={type:y[0].charAt(0)==="!"?"image":"link",raw:h,href:C,title:k,text:g,tokens:l.inlineTokens(g)};return l.state.inLink=!1,w}function Nl(y,x,h){let l=y.match(h.other.indentCodeCompensation);if(l===null)return x;let i=l[1];return x.split(`
15
+ `),i=h.length,C=l.length,k=Array.from({length:i+1},()=>Array(C+1).fill(0));for(let j=i-1;j>=0;j-=1)for(let V=C-1;V>=0;V-=1)k[j][V]=h[j]===l[V]?k[j+1][V+1]+1:Math.max(k[j+1][V],k[j][V+1]);let g=[],w=0,B=0;while(w<i&&B<C)if(h[w]===l[B])g.push({op:"context",text:h[w]}),w+=1,B+=1;else if(k[w+1][B]>=k[w][B+1])g.push({op:"remove",text:h[w]}),w+=1;else g.push({op:"add",text:l[B]}),B+=1;while(w<i)g.push({op:"remove",text:h[w]}),w+=1;while(B<C)g.push({op:"add",text:l[B]}),B+=1;return g}var xh={context:" ",add:"+",remove:"-"};class L5 extends U{static preferredTagName="tosi-diff";static initAttributes={original:"",modified:""};static shadowStyleSpec={":host":{display:"block",overflow:"auto",font:"var(--tosi-code-font, 12px/1.5 monospace)",background:"var(--tosi-diff-bg, #fff)",color:"var(--tosi-diff-color, #222)"},":host([hidden])":{display:"none"},".diff-line":{display:"grid",gridTemplateColumns:"1.5em 1fr",whiteSpace:"pre-wrap",wordBreak:"break-word"},".diff-line .marker":{textAlign:"center",userSelect:"none",opacity:"0.5"},".diff-add":{background:"var(--tosi-diff-add-bg, #e6ffed)"},".diff-add .marker":{color:"var(--tosi-diff-add-color, #22863a)"},".diff-remove":{background:"var(--tosi-diff-remove-bg, #ffeef0)"},".diff-remove .marker":{color:"var(--tosi-diff-remove-color, #cb2431)"}};content=()=>[J8({part:"body"})];render(){super.render();let y=f8(this.original,this.modified);this.parts.body.replaceChildren(...y.map((x)=>J8({class:`diff-line diff-${x.op}`},H8({class:"marker"},xh[x.op]),H8({class:"text"},x.text===""?" ":x.text))))}}var l0=L5.elementCreator();var D8="https://cdnjs.cloudflare.com/ajax/libs/ace/1.23.2/",b8="ace/theme/tomorrow",hh=async()=>{let{ace:y}=await A1(`${D8}ace.min.js`);return y},lh=async(y,x="html",h={},l=b8)=>{let i=await hh();i.config.set("basePath",D8);let C=i.edit(y,{mode:`ace/mode/${x}`,tabSize:2,useSoftTabs:!0,useWorker:!1,wrap:!0,indentedSoftWrap:!0,...h});return C.setTheme(l),{ace:i,editor:C}};class T1 extends U{static preferredTagName="tosi-code";source="";get value(){return this.editor===void 0?this.source:this.editor.getValue()}set value(y){if(this.editor===void 0)this.source=y;else this.editor.setValue(y),this.editor.clearSelection(),this.editor.session.getUndoManager().reset()}_original;get original(){return this._original??this.value}set original(y){this._original=y}diffOverlay;get showingDiff(){return this.diffOverlay!==void 0&&!this.diffOverlay.hidden}showDiff(y){if(y){if(this.diffOverlay===void 0)this.diffOverlay=l0({style:{position:"absolute",inset:"0",zIndex:"5",overflow:"auto",background:"var(--tosi-diff-bg, var(--background, #fff))"}}),this.append(this.diffOverlay);this.diffOverlay.original=this.original,this.diffOverlay.modified=this.value,this.diffOverlay.hidden=!1}else if(this.diffOverlay!==void 0)this.diffOverlay.hidden=!0}static initAttributes={mode:"javascript",theme:b8,disabled:!1};role="code editor";_ace;_editor;_editorPromise;options={};get ace(){return this._ace}get editor(){return this._editor}static shadowStyleSpec={":host":{display:"block",position:"relative",width:"100%",height:"100%"}};onResize(){if(this.editor!==void 0)this.editor.resize(!0)}connectedCallback(){if(super.connectedCallback(),this.source==="")this.value=this.textContent!==null?this.textContent.trim():"";if(this._editorPromise===void 0)this._editorPromise=lh(this,this.mode,this.options,this.theme),this._editorPromise.then(({ace:y,editor:x})=>{this._ace=y,this._editor=x,x.setValue(this.source,1),x.clearSelection(),x.session.getUndoManager().reset()})}render(){if(super.render(),this._editorPromise!==void 0)this._editorPromise.then(({editor:y})=>y.setReadOnly(this.disabled))}}var o1=T1.elementCreator();var{input:M5}=K,d8=W.fromCss("#8888");class S8 extends U{static preferredTagName="tosi-color";value=d8.rgba;color=d8;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:z.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:z.swatchSize,height:z.swatchSize,background:"transparent"},":host::part(alpha)":{width:z.alphaWidth},":host::part(css)":{width:z.cssWidth,fontFamily:"monospace"}};content=[M5({title:"base color",type:"color",part:"rgb"}),M5({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),M5({title:"css color spec",part:"css"})];valueChanged=!1;update=(y)=>{let{rgb:x,alpha:h,css:l}=this.parts;if(y.type==="input")this.color=W.fromCss(x.value),this.color.a=Number(h.value),l.value=this.color.html;else this.color=W.fromCss(l.value),x.value=this.color.html.substring(0,7),h.value=String(this.color.a);x.style.opacity=String(this.color.a),this.value=this.color.rgba,this.valueChanged=!0};connectedCallback(){super.connectedCallback();let{rgb:y,alpha:x,css:h}=this.parts;y.addEventListener("input",this.update),x.addEventListener("input",this.update),h.addEventListener("change",this.update)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{rgb:y,alpha:x,css:h}=this.parts;this.color=W.fromCss(this.value),y.value=this.color.html.substring(0,7),y.style.opacity=String(this.color.a),x.value=String(this.color.a),h.value=this.color.html}}var n5=S8.elementCreator();var t1=K.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),h4={passive:!0},V1=(y,x,h="move")=>{if(!y.type.startsWith("touch")){let{clientX:i,clientY:C}=y;t1.style.cursor=h,E1(t1),document.body.append(t1);let k=(g)=>{let w=g.clientX-i,B=g.clientY-C;if(x(w,B,g)===!0)t1.removeEventListener("mousemove",k),t1.removeEventListener("mouseup",k),t1.remove()};t1.addEventListener("mousemove",k,h4),t1.addEventListener("mouseup",k,h4)}else if(y instanceof TouchEvent){let i=y.changedTouches[0],C=i.identifier,k=i.clientX,g=i.clientY,w=y.target,B=0,j=0,V=(_)=>{let p=[..._.touches].find((G)=>G.identifier===C);if(p!==void 0)B=p.clientX-k,j=p.clientY-g;if(_.type==="touchmove")_.stopPropagation(),_.preventDefault();if(x(B,j,_)===!0||p===void 0)w.removeEventListener("touchmove",V),w.removeEventListener("touchend",V),w.removeEventListener("touchcancel",V)};w.addEventListener("touchmove",V),w.addEventListener("touchend",V,h4),w.addEventListener("touchcancel",V,h4)}},g2=(y="body *")=>[...document.querySelectorAll(y)].map((x)=>parseFloat(getComputedStyle(x).zIndex)).reduce((x,h)=>isNaN(x)||Number(x)<h?h:Number(x),0),E1=(y,x="body *")=>{y.style.zIndex=String(g2(x)+1)};var{slot:ih}=K;class L1 extends U{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=ih();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(y)=>{if(y instanceof MouseEvent&&y.button!==0)return;if(y.target?.closest(".no-drag"))return;if(this.drag){E1(this);let h=this.offsetLeft,l=this.offsetTop;V1(y,(i,C,k)=>{if(this.style.left=`${h+i}px`,this.style.top=`${l+C}px`,this.style.right="auto",this.style.bottom="auto",k.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),gh(),L1.floats.add(this);let y={passive:!0};this.addEventListener("touchstart",this.reposition,y),this.addEventListener("mousedown",this.reposition,y),E1(this)}disconnectedCallback(){super.disconnectedCallback(),L1.floats.delete(this)}}var Ch=L1,i0=L1.elementCreator(),kh=i0,I8=!1;function gh(){if(I8)return;I8=!0,window.addEventListener("resize",()=>{Array.from(L1.floats).forEach((y)=>{if(y.remainOnResize==="hide")y.hidden=!0;else if(y.remainOnResize==="remove")y.remove()})},{passive:!0}),document.addEventListener("scroll",(y)=>{if(y.target instanceof HTMLElement&&y.target.closest(L1.tagName))return;Array.from(L1.floats).forEach((x)=>{if(x.remainOnScroll==="hide")x.hidden=!0;else if(x.remainOnScroll==="remove")x.remove()})},{passive:!0,capture:!0})}var C0=(y)=>{let{content:x,target:h,position:l,remainOnScroll:i,remainOnResize:C,draggable:k}=y,g=Array.isArray(x)?i0(...x):i0(x);if(r8(g,h,l,i,C,k),y.class)g.setAttribute("class",y.class);return document.body.append(g),g},r8=(y,x,h,l,i,C=!1)=>{{let{position:G}=getComputedStyle(y);if(G!=="fixed")y.style.position="fixed";if(i)y.remainOnResize=i;if(l)y.remainOnScroll=l;E1(y)}y.drag=C;let{left:k,top:g,width:w,height:B}=x.getBoundingClientRect(),j=k+w*0.5,V=g+B*0.5,_=window.innerWidth,p=window.innerHeight;if(h==="side")h=(j<_*0.5?"e":"w")+(V<p*0.5?"s":"n");else if(h==="auto"||h===void 0)h=(V<p*0.5?"s":"n")+(j<_*0.5?"e":"w");if(y.style.top=y.style.left=y.style.right=y.style.bottom=y.style.transform="",h.length===2){let[G,Y]=h;switch(G){case"n":y.style.bottom=(p-g).toFixed(2)+"px";break;case"e":y.style.left=(k+w).toFixed(2)+"px";break;case"s":y.style.top=(g+B).toFixed(2)+"px";break;case"w":y.style.right=(_-k).toFixed(2)+"px";break}switch(Y){case"n":y.style.bottom=(p-g-B).toFixed(2)+"px";break;case"e":y.style.left=k.toFixed(2)+"px";break;case"s":y.style.top=g.toFixed(2)+"px";break;case"w":y.style.right=(_-k-w).toFixed(2)+"px";break}y.style.transform=""}else if(h==="n")y.style.bottom=(p-g).toFixed(2)+"px",y.style.left=j.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="s")y.style.top=(g+B).toFixed(2)+"px",y.style.left=j.toFixed(2)+"px",y.style.transform="translateX(-50%)";else if(h==="e")y.style.left=(k+w).toFixed(2)+"px",y.style.top=V.toFixed(2)+"px",y.style.transform="translateY(-50%)";else if(h==="w")y.style.right=(_-k).toFixed(2)+"px",y.style.top=V.toFixed(2)+"px",y.style.transform="translateY(-50%)";y.style.setProperty("--max-height",`calc(100vh - ${y.style.top||y.style.bottom})`),y.style.setProperty("--max-width",`calc(100vw - ${y.style.left||y.style.right})`)};function l4(y,x=!0){return(h,l)=>{let i=y(h),C=y(l);for(let k in i)if(i[k]!==C[k])return(Array.isArray(x)?x[k]!==!1:x)?i[k]>C[k]?1:-1:i[k]>C[k]?-1:1;return 0}}var{button:wh,span:T8,input:Bh}=K,o8=(y,x)=>{return!!y.find((h)=>{if(h===null||x==null)return!1;else if(Array.isArray(h))return o8(h,x);else if(h.value===x||h===x)return!0})};class R1 extends U{static preferredTagName="tosi-select";static formAssociated=!0;static lightStyleSpec={":host":{"--tosi-select-gap":"var(--tosi-spacing-sm, 8px)","--tosi-select-touch-size":"var(--tosi-touch-size, 44px)","--tosi-select-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-value-padding":"0 var(--tosi-spacing-sm, 8px)","--tosi-select-icon-width":"24px","--tosi-select-field-width":"140px","--gap":"var(--tosi-select-gap)","--touch-size":"var(--tosi-select-touch-size)","--padding":"var(--tosi-select-padding)","--value-padding":"var(--tosi-select-value-padding)","--icon-width":"var(--tosi-select-icon-width)","--fieldWidth":"var(--tosi-select-field-width)",display:"inline-flex",position:"relative"},":host button":{display:"flex",alignItems:"center",justifyItems:"center",gap:z.tosiSelectGap,textAlign:"left",height:z.tosiSelectTouchSize,padding:z.tosiSelectPadding,position:"relative",width:"100%"},":host:not([show-icon]) button > :first-child":{display:"none"},":host[hide-caption] button > :nth-child(2)":{display:"none"},':host [part="value"]':{width:z.tosiSelectFieldWidth,padding:z.tosiSelectValuePadding,height:z.tosiSelectTouchSize,lineHeight:z.tosiSelectTouchSize,boxShadow:"none",whiteSpace:"nowrap",outline:"none",background:"transparent",flex:"1"},':host [part="value"]:not(:focus)':{overflow:"hidden",textOverflow:"ellipsis",background:"transparent"}};static initAttributes={editable:!1,placeholder:"",showIcon:!1,hideCaption:!1,localized:!1,disabled:!1,required:!1,name:""};_options=[];get options(){return this._options}set options(y){if(typeof y==="string")this._options=R1.parseOptionsString(y);else this._options=y;this.queueRender()}static parseOptionsString(y){return y.split(",").map((x)=>{let h=x.trim();if(h==="")return null;let[l,i]=h.split("=").map((g)=>g.trim());if(!i)return{value:l,caption:l};let[C,k]=i.split(":").map((g)=>g.trim());return{value:l,caption:C||l,icon:k||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}setValue=(y,x=!1)=>{if(this.value!==y)this.value=y,this.queueRender(!0);if(x)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(y)=>{if(y===null)return null;let{setValue:x,getValue:h}=this,l,i,C,k,g;if(typeof y==="string")i=C=y;else({icon:l,caption:i,value:C,tooltip:k,properties:g}=y);if(this.localized)i=D(i);let{options:w}=y;if(w)return{icon:l,caption:i,tooltip:k,properties:g,checked:()=>o8(w,h()),menuItems:w.map(this.buildOptionMenuItem)};return{icon:l,caption:i,tooltip:k,properties:g,checked:()=>h()===C,action:typeof C==="function"?async()=>{let B=await C();if(B!==void 0)x(B,!0)}:()=>{if(typeof C==="string")x(C,!0)}}};poppedOptions=[];get optionsMenu(){let y=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return y;let x=(h)=>{if(h===null||typeof h==="function")return!0;else if(h.menuItems){let l=K1(h.menuItems);return h.menuItems=l.filter(x),l.length>0}else return h.caption.toLocaleLowerCase().includes(this.filter)};return y.filter(x)}handleChange=(y)=>{let{value:x}=this.parts,h=x.value||"";if(this.value!==String(h))this.value=h,this.dispatchEvent(new Event("change"));this.filter="",y.stopPropagation(),y.preventDefault()};handleKey=(y)=>{if(y.key==="Enter")y.preventDefault()};filterMenu=O2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),l1(0),this.popOptions()});popOptions=(y)=>{if(y&&y.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),L({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:y}=this.parts;y.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[wh({type:"button",part:"button",onClick:this.popOptions},T8(),Bh({part:"value",value:this.value,tabindex:0,role:"combobox",ariaHaspopup:"listbox",ariaExpanded:"false",ariaAutocomplete:this.editable?"list":"none",onKeydown:this.handleKey,onInput:this.filterMenu,onChange:this.handleChange}),O.chevronDown())];get allOptions(){let y=[];function x(h){for(let l of h)if(typeof l==="string")y.push({caption:l,value:l});else if(l?.value)y.push(l);else if(l?.options)x(l.options)}return x(this.selectOptions),y}findOption(){return this.allOptions.find((x)=>x.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("options");if(y&&this._options.length===0)this._options=R1.parseOptionsString(y);if(this.localized)i4.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)i4.allInstances.delete(this)}render(){super.render();let{value:y,button:x}=this.parts;x.disabled=this.disabled;let h=y.previousElementSibling,l=this.findOption(),i=T8();if(y.value=this.localized?D(l.caption):l.caption,l.icon)if(l.icon instanceof HTMLElement)i=l.icon.cloneNode(!0);else i=O[l.icon]();h.replaceWith(i),y.setAttribute("placeholder",this.localized?D(this.placeholder):this.placeholder),y.style.pointerEvents=this.editable?"":"none",y.readOnly=!this.editable}}var zh=R1,G1=R1.elementCreator(),jh=B1((...y)=>G1(...y),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:M8}=K,{i18n:M}=e({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:M8(),caption:window.navigator.language,value:window.navigator.language}]}});r1.localeOptions={toDOM(y,x){if(y instanceof R1)y.options=x}};var C4=(y)=>{if(M.locales.value.includes(y))M.locale.value=y;else console.error(`language ${y} is not available`)},u5=()=>{let y=Array.from(J1.allInstances);for(let x of y)x.localeChanged();u8()};M.locale.observe(u5);var k0="data-tosi-localized";function g0(y){let x=y.getAttribute(k0);if(!x)return;let h;try{h=JSON.parse(x)}catch(l){console.warn(`[data-tosi-localized] invalid JSON: ${x}`,l);return}if(!h||typeof h!=="object")return;for(let[l,i]of Object.entries(h)){if(typeof i!=="string")continue;y.setAttribute(l,D(i))}}function*n8(y){for(let x of Array.from(y.querySelectorAll(`[${k0}]`)))yield x;for(let x of Array.from(y.querySelectorAll("*"))){let h=x.shadowRoot;if(h)yield*n8(h)}}function u8(){if(typeof document>"u")return;for(let y of n8(document))g0(y)}var L8=null;if(typeof document<"u"&&typeof MutationObserver<"u"){let y=()=>{if(!document.body){queueMicrotask(y);return}L8=new MutationObserver((x)=>{for(let h of x){if(h.type==="attributes"&&h.target instanceof Element){g0(h.target);continue}for(let l of Array.from(h.addedNodes)){if(!(l instanceof Element))continue;if(l.hasAttribute(k0))g0(l);for(let i of Array.from(l.querySelectorAll(`[${k0}]`)))g0(i)}}}),L8.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[k0]}),u8()};y()}var qh=l4((y)=>[y.caption.toLocaleLowerCase()]);function a5(y){let[x,,h,l,...i]=y.split(`
16
+ `).map((C)=>C.split("\t"));if(x&&h&&l&&i){if(M.locales.value=x,M.languages.value=h,M.emoji.value=l,M.stringMap.value=i.reduce((C,k)=>{return C[k[0].toLocaleLowerCase()]=k,C},{}),M.localeOptions.value=x.map((C,k)=>({icon:M8({title:x[k]},l[k]),caption:h[k],value:C})).sort(qh),!M.locales.value.includes(M.locale.value)){let C=M.locale.value.substring(0,2);M.locale.value=M.locales.value.find((k)=>k.substring(0,2)===C)||M.locales.value[0]}u5()}}function D(y){if(y.endsWith("…"))return D(y.substring(0,y.length-1))+"…";let x=M.locales.value.indexOf(M.locale.value);if(x>-1){let h=J(M.stringMap),l=y.toLocaleLowerCase(),i=h[l],C=i&&i[x];if((!C||C==='"')&&l.includes("#")){let k=h[l.substring(0,l.indexOf("#"))];C=k&&k[x]}if(C)C=C.split("#",2)[0],y=y.toLocaleLowerCase()===y?C.toLocaleLowerCase():C;else y=y.split("#",2)[0]}else y=y.split("#",2)[0];return y}class k4 extends U{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return G1({part:"select",showIcon:!0,title:D("Language"),bindValue:M.locale,bindLocaleOptions:M.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var Vh=k4,a8=k4.elementCreator(),Ph=a8;class J1 extends U{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>K.tosiSlot();connectedCallback(){super.connectedCallback(),J1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),J1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?D(this.refString):""}render(){super.render(),this.localeChanged()}}var i4=J1,Q1=J1.elementCreator(),_h=Q1;var m8=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),Ah=m8?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},t8=(y)=>{if(y.code)return y.code.replace(/^Key|^Digit/,"");return y.key},Gh=(y)=>{let x=[];if(y.altKey)x.push("alt");if(y.ctrlKey)x.push("ctrl");if(y.metaKey)x.push("meta");if(y.shiftKey)x.push("shift");return x.push(t8(y)),x.join("-")},Kh=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],g4=(y)=>{let x=y.trim(),h={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[l,i]of Kh)if(l.test(x))h[i]=!0,x=x.replace(l,"");return x=x.replace(/^-+/,""),h.key=x.toLowerCase(),h},m5=(y,x)=>{let h=g4(x);return y.key.toLowerCase()===h.key&&y.metaKey===h.metaKey&&y.ctrlKey===h.ctrlKey&&y.altKey===h.altKey&&y.shiftKey===h.shiftKey},Uh=(y)=>{let x=g4(y),h=[];if(x.altKey)h.push("alt");if(x.ctrlKey)h.push("ctrl");if(x.metaKey)h.push("meta");if(x.shiftKey)h.push("shift");return h.push(x.key),h.join("-")},w4=(y)=>{let x=g4(y);if(m8){let l=[];if(x.ctrlKey)l.push("⌃");if(x.altKey)l.push("⌥");if(x.shiftKey)l.push("⇧");if(x.metaKey)l.push("⌘");return l.push(x.key.toUpperCase()),l.join("")}let h=[];if(x.ctrlKey)h.push("Ctrl");if(x.altKey)h.push("Alt");if(x.shiftKey)h.push("Shift");if(x.metaKey)h.push("Meta");return h.push(x.key.toUpperCase()),h.join("+")};var z4={};x5(z4,{stringToTypes:()=>s2,isTypeAllowed:()=>N2,init:()=>e5,draggedElement:()=>Yh});var Oh=()=>!!document.querySelector(".drag-source"),N2=(y,x)=>{if(!y)return!1;for(let h of y)if(h==="special/any")return!0;else if(h.indexOf("*")>-1){let[l,i]=h.split("/"),[C,k]=x.split("/");if((l==="*"||l===C)&&(i==="*"||i===k))return!0}else if(h===x)return!0},B4=(y)=>{for(let x of[...document.querySelectorAll(`.${y}`)])x.classList.remove(y)},y6=()=>{if(X2)X2.disconnect(),X2=null;t5=[],B4("drag-over"),B4("drag-source"),B4("drag-target")},s2=(y,x=";")=>{return(y||"").split(x).map((h)=>h.trim()).filter((h)=>h!=="")},t5=[],X2=null,E5=(y)=>{if(!y)y=[];t5=y;let x=[...document.querySelectorAll("[data-drop]")];for(let h of x){let l=s2(h.dataset.drop);if(y.find((i)=>N2(l,i)))h.classList.add("drag-target");else h.classList.remove("drag-target")}if(!X2)X2=new MutationObserver(()=>E5(t5)),X2.observe(document.body,{childList:!0,subtree:!0})};function ph(y){let x=y.target?.closest('[draggable="true"],a[href]');if(!x)return;x.classList.add("drag-source");let h=x.matches('[draggable="true"]')?s2(x.dataset.drag||"text/html"):s2(x.dataset.drag||"url");for(let l of h){let i=x.dataset.dragContent||(l==="text/html"?x.innerHTML:x.textContent);y.dataTransfer?.setData(l,i||"")}E5(y.dataTransfer?.types),y.stopPropagation()}function E8(y){if(!Oh())E5(y.dataTransfer?.types);let x=y.target.closest(".drag-target");if(x&&y.dataTransfer)x.classList.add("drag-over"),y.dataTransfer.dropEffect="copy";else y.preventDefault(),y.stopPropagation()}function Qh(){B4("drag-over")}function Wh(y){let x=y.target.closest(".drag-target");if(x){let h=(x.dataset?.drop||"").split(";");for(let l of h)if(N2(y.dataTransfer?.types,l))if(l==="text/html")x.innerHTML=y.dataTransfer?.getData(l)||"";else x.textContent=y.dataTransfer?.getData(l)||""}y6()}var Yh=()=>document.querySelector(".drag-source"),e8=!1,e5=()=>{if(e8)return;document.body.addEventListener("dragstart",ph),document.body.addEventListener("dragenter",E8),document.body.addEventListener("dragover",E8),document.body.addEventListener("drop",Wh),document.body.addEventListener("dragleave",Qh),document.body.addEventListener("dragend",y6),window.addEventListener("dragover",(y)=>y.preventDefault()),window.addEventListener("drop",(y)=>y.preventDefault()),e8=!0};var K1=(y)=>typeof y==="function"?y():y,{div:x6,button:z0,span:a,a:Fh,tosiSlot:Xh}=K,C6=(y)=>{let x=[];for(let h of y)if(h===null){if(x.length>0&&x[x.length-1]!==null)x.push(h)}else x.push(h);while(x.length>0&&x[x.length-1]===null)x.pop();return x},B0=(y,x,h=!1)=>{let l=[];for(let i of y){if(i===null){l.push(i);continue}if(typeof i==="function"){l.push(i);continue}let{acceptsDrop:C}=i;if(!C){if(!h)l.push({...i,enabled:()=>!1});continue}if(!x.some((w)=>N2(C,w))){if(!h)l.push({...i,enabled:()=>!1});continue}let g=i;if(g.menuItems){let w=B0(K1(g.menuItems),x,!0);if(w.length>0||g.dropAction){let B=h?w:B0(K1(g.menuItems),x,!1);l.push({...g,menuItems:B})}else if(!h)l.push({...g,enabled:()=>!1})}else l.push(i)}return C6(l)},y3=(y,x=!1)=>{let h=[];for(let l of y){if(l===null){h.push(l);continue}if(typeof l==="function"){h.push(l);continue}let{action:i,menuItems:C}=l;if(i||C)if(C){let k=y3(K1(C),!0);if(k.length>0){let g=x?k:y3(K1(C),!1);h.push({...l,menuItems:g})}else if(!x)h.push({...l,enabled:()=>!1})}else h.push(l);else if(!x)h.push({...l,enabled:()=>!1})}return C6(h)},sh={overflow:"hidden auto",maxHeight:`calc(${z.maxHeight} - ${P.menuInset("8px")})`,borderRadius:z.spacing50,background:P.menuBg("#fafafa"),boxShadow:P.menuShadow(`${z.spacing13} ${z.spacing50} ${z.spacing} #0004`)},Nh={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr max-content",width:"100%",gap:0,background:"transparent",padding:P.menuItemPadding("0 8px"),height:P.menuItemHeight("48px"),lineHeight:P.menuItemHeight("48px"),textAlign:"left"},Zh={color:P.menuItemColor("#222")},vh={boxShadow:"none !important",background:P.menuItemHoverBg("#eee")},h6={boxShadow:"none !important",background:P.menuItemActiveBg("#aaa"),color:P.menuItemActiveColor("#000")},$h={background:`${P.menuDropOverBg("#2196F3")} !important`,color:`${P.menuDropOverColor("#fff")} !important`},ch={color:`${P.menuDropOverColor("#fff")} !important`},Rh={stroke:`${P.menuDropOverColor("#fff")} !important`},l6={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${P.menuDropOverBg("#2196F3")} 50%, transparent) !important`},Jh={".xin-menu, .tosi-menu":sh,".xin-menu > div, .tosi-menu > div":{width:P.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:P.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:P.menuSeparatorColor("#2224"),margin:P.menuSeparatorMargin("8px 0")},".xin-menu-element, .tosi-menu-element":{minHeight:P.menuItemHeight("48px")},".xin-menu-item, .tosi-menu-item":Nh,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":Zh,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr max-content",gap:P.menuItemGap("8px")},".xin-menu-shortcut, .tosi-menu-shortcut":{whiteSpace:"nowrap",paddingLeft:"1em",textAlign:"right",opacity:"0.65"},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:P.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:P.menuItemHoverBg("#eee")},".xin-menu-item > span:nth-child(2), .tosi-menu-item > span:nth-child(2)":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"left"},".xin-menu-item:hover, .tosi-menu-item:hover":vh,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":l6,".xin-menu-item:active, .tosi-menu-item:active":h6,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":h6,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:P.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":$h,".xin-drop-over > span, .tosi-drop-over > span":ch,".xin-drop-over svg, .tosi-drop-over svg":Rh,".drag-target":l6},i6=!1;function h3(){if(i6)return;i6=!0,p1("xin-menu-helper",Jh),document.addEventListener("mousedown",(y)=>{if(i1.length===0)return;let x=y.composedPath();if(!i1.find((h)=>x.includes(h.target)||x.includes(h.menu)))l1(0)}),document.body.addEventListener("keydown",(y)=>{if(y.key==="Escape")l1(0)})}var k6=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,l=y?.icon||h||a(" ");if(typeof l==="string")l=O[l]();let i=x.role==="listbox"?"option":"menuitem",C,k=y.properties||{};if(typeof y?.action==="string")C=Fh(k,{role:i,href:y.action},l,x.localized?a(D(y.caption)):a(y.caption),a({class:"tosi-menu-shortcut"},y.shortcut?w4(y.shortcut):" "));else C=z0(k,{role:i,onClick:y.action},l,x.localized?a(D(y.caption)):a(y.caption),a({class:"tosi-menu-shortcut"},y.shortcut?w4(y.shortcut):" "));if(C.classList.add("xin-menu-item","tosi-menu-item"),C.classList.toggle("xin-menu-item-checked",h!==!1),C.classList.toggle("tosi-menu-item-checked",h!==!1),y.tooltip)C.dataset.tooltip=y.tooltip;if(x.role==="listbox")C.toggleAttribute("aria-selected",h!==!1);if(y?.enabled&&!y.enabled())C.setAttribute("disabled",""),C.setAttribute("aria-disabled","true");return C},g6=(y,x)=>{let h=y?.icon||a(" ");if(typeof h==="string")h=O[h]();let l=y.properties||{},i=z0(l,{onDragenter(C){v2(),i.classList.add("xin-drop-over","tosi-drop-over"),C.preventDefault()},onDragover(C){if(C.preventDefault(),C.dataTransfer)C.dataTransfer.dropEffect="copy"},onDragleave(C){let k=C.relatedTarget;if(k&&i.contains(k))return;i.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(C){if(C.preventDefault(),C.stopPropagation(),i.classList.remove("xin-drop-over","tosi-drop-over"),y.dropAction&&C.dataTransfer)y.dropAction(C.dataTransfer);l1(0)}},h,x.localized?a(D(y.caption)):a(y.caption),a(" "));if(i.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)i.dataset.tooltip=y.tooltip;if(y.dropAction&&y.acceptsDrop)i.dataset.drop=y.acceptsDrop.join(";");if(y?.enabled&&!y.enabled())i.setAttribute("disabled",""),i.setAttribute("aria-disabled","true");return i},x3=(y,x)=>{let h=y.checked&&y.checked()&&"check"||!1,l=y?.icon||h||a(" ");if(typeof l==="string")l=O[l]();let i=null,C=!1,k=y.properties||{},g=z0(k,{disabled:!(!y.enabled||y.enabled()),onClick(w){if(x._dropMode)return;L(Object.assign({},x,{menuItems:K1(y.menuItems),target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side"})),w.stopPropagation(),w.preventDefault()},onDragenter(w){if(!x._dropMode)return;v2(),w.preventDefault(),w.stopPropagation();let B=w.relatedTarget;if(B&&g.contains(B))return;if(g.classList.add("xin-drop-over","tosi-drop-over"),C){if(l1((x.submenuDepth||0)+1),C=!1,i)clearTimeout(i);i=null;return}if(i)clearTimeout(i);i=setTimeout(()=>{C=!0;let j=K1(y.menuItems),V=x._dataTypes?B0(j,x._dataTypes,x.hideDisabled):j;if(V.length>0)L(Object.assign({},x,{menuItems:V,target:g,submenuDepth:(x.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:x._dataTypes}))},x.disclosureDelay??200)},onDragover(w){if(!x._dropMode)return;if(w.preventDefault(),w.stopPropagation(),w.dataTransfer)w.dataTransfer.dropEffect=y.dropAction?"copy":"link"},onDragleave(w){if(!x._dropMode)return;let B=w.relatedTarget;if(B&&g.contains(B))return;if(C&&B&&i1.some((j)=>j.menu.contains(B)||j.target.contains(B)))return;if(g.classList.remove("xin-drop-over","tosi-drop-over"),i)clearTimeout(i),i=null},onDrop(w){if(!x._dropMode||!y.dropAction)return;if(w.preventDefault(),w.stopPropagation(),g.classList.remove("xin-drop-over","tosi-drop-over"),w.dataTransfer)y.dropAction(w.dataTransfer);l1(0)}},l,x.localized?a(D(y.caption)):a(y.caption),O.chevronRight({style:{justifySelf:"flex-end"}}));if(g.classList.add("xin-menu-item","tosi-menu-item"),y.tooltip)g.dataset.tooltip=y.tooltip;if(x._dropMode&&y.dropAction&&y.acceptsDrop)g.dataset.drop=y.acceptsDrop.join(";");return g},w6=(y,x)=>{if(y===null)return a({class:"xin-menu-separator tosi-menu-separator"});else if(typeof y==="function"){let h=y();return h.classList.add("xin-menu-element","tosi-menu-element"),h}else if(x._dropMode){let h=y;if(h.menuItems&&K1(h.menuItems).length>0)return x3(h,x);else if(y.dropAction)return g6(y,x);else{let i=y?.icon||a(" ");if(typeof i==="string")i=O[i]();return z0({class:"xin-menu-item tosi-menu-item",disabled:!0},i,x.localized?a(D(y.caption)):a(y.caption),a(" "))}}else{let h=y?.action?k6(y,x):x3(y,x);if(x.showChecked&&y.checked&&y.checked())requestAnimationFrame(()=>{h.scrollIntoView({block:"center"})});return h}},B6=(y)=>{let{target:x,width:h,menuItems:l,role:i="menu"}=y,C=l.find((w)=>w!=null&&typeof w!=="function"&&(w.icon||w.checked)),k=y.submenuDepth||0,g=x6({class:C?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:i,onClick(){if(!y._dropMode)l1(0)},onDragover(w){if(!y._dropMode)return;w.preventDefault()},onDragenter(){if(!y._dropMode)return;v2()},onDragleave(w){if(!y._dropMode)return;let B=w.relatedTarget;if(B&&g.contains(B))return;if(B&&i1.some((j)=>j.menu.contains(B)||j.target.contains(B)))return;z6(k)}},x6({style:{minWidth:x.offsetWidth+"px",width:typeof h==="number"?`${h}px`:h},onMousedown(w){w.preventDefault(),w.stopPropagation()}},...l.map((w)=>w6(w,y))));return g},Z2,i1=[],w0=null,v2=()=>{if(w0)clearTimeout(w0),w0=null},z6=(y)=>{v2(),w0=setTimeout(()=>{w0=null,l1(y)},500)},l1=(y=0)=>{if(v2(),y===0)document.querySelectorAll("tosi-menu.xin-drop-over, tosi-menu.tosi-drop-over").forEach((h)=>h.classList.remove("xin-drop-over","tosi-drop-over"));let x=i1.splice(y);for(let h of x)if(h.menu.remove(),h.onClose)h.onClose();return Z2=x[0],y>0?i1[y-1]:void 0},L=(y)=>{h3(),y=Object.assign({submenuDepth:0},y);let{target:x,position:h,submenuDepth:l}=y;if(Z2&&!document.body.contains(Z2?.menu))Z2=void 0;if(i1.length&&!document.body.contains(i1[0].menu))i1.splice(0);if(y._dropMode){if(i1.length>l&&i1[l]?.target===x)return;l1(l)}else{if(l===0&&Z2?.target===x)return;let k=l1(l);if(Z2?.target===x)return;if(k&&k.target===x){l1();return}}if(!y.menuItems?.length)return;let i=B6(y),C=C0({content:i,target:x,position:h});C.remainOnScroll=y._dropMode?"remain":"remove",i1.push({target:x,menu:C,onClose:y.onClose})},j6=(y)=>{h3();let{dataTypes:x,...h}=y,l=B0(y.menuItems,x,y.hideDisabled);if(!l.length)return;L({...h,menuItems:l,_dropMode:!0,_dataTypes:x})};function l3(y,x,h=[]){for(let l of y){if(!l)continue;if(typeof l==="function")continue;let{shortcut:i}=l,{menuItems:C}=l;if(i){if(m5(x,i)){let k=l;if(k.enabled&&!k.enabled())return;if(h.some((g)=>g.enabled&&!g.enabled()))return;return{action:k,path:h}}}else if(C){let k=l3(K1(C),x,[...h,l]);if(k)return k}}return}class j4 extends U{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:z.touchSize,minHeight:z.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:P.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(y){if(!this.acceptsDrop)return!1;let x=s2(this.acceptsDrop);return[...y.dataTransfer?.types||[]].some((l)=>x.some((i)=>N2([i],l)))}showMenu=(y)=>{if(y.type==="click"||y.code==="Space")L({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),y.stopPropagation(),y.preventDefault()};handleDragEnter=(y)=>{if(this._dragMatches=this._matchesDrag(y),!this._dragMatches)return;v2(),this.classList.add("xin-drop-over","tosi-drop-over");let x=[...y.dataTransfer?.types||[]];if(this.menuItems.length)j6({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:x,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});y.preventDefault()};handleDragOver=(y)=>{if(!this._dragMatches)return;if(y.preventDefault(),y.dataTransfer)y.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(y)=>{if(!this._dragMatches)return;let x=y.relatedTarget;if(x&&this.contains(x))return;if(x&&i1.some((h)=>h.menu.contains(x)||h.target.contains(x))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),z6(0)};handleDrop=(y)=>{if(!this._dragMatches||!this.dropAction)return;if(y.preventDefault(),y.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),y.dataTransfer)this.dropAction(y.dataTransfer);l1(0)};content=()=>z0({tabindex:0,part:"trigger",onClick:this.showMenu},Xh());handleShortcut=async(y)=>{let x=l3(this.menuItems,y);if(!x)return;y.preventDefault(),y.stopImmediatePropagation();let{action:h,path:l}=x;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(l,h);if(h.action instanceof Function)h.action()};findMenuItemByCaption(y,x){for(let h of y.querySelectorAll(".xin-menu-item")){let l=h.children[1];if(l&&l.textContent===x)return h}return null}async animateShortcut(y,x){l1(0),L({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((l)=>setTimeout(l,80));for(let l=0;l<y.length;l++){let i=l+1,C=i1[l]?.menu;if(!C)break;let k=this.findMenuItemByCaption(C,y[l].caption);if(!k)break;L({target:k,width:this.menuWidth,localized:this.localized,menuItems:K1(y[l].menuItems),submenuDepth:i,position:"side"}),await new Promise((g)=>setTimeout(g,80))}let h=i1[i1.length-1]?.menu;if(h){let l=this.findMenuItemByCaption(h,x.caption);if(l)l.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((l)=>setTimeout(l,300)),l1(0)}constructor(){super();this.addEventListener("keydown",this.showMenu),this.addEventListener("dragenter",this.handleDragEnter),this.addEventListener("dragover",this.handleDragOver),this.addEventListener("dragleave",this.handleDragLeave),this.addEventListener("drop",this.handleDrop)}connectedCallback(){if(super.connectedCallback(),h3(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var q6=j4.elementCreator(),Hh=q6,fh=j4;function Dh(y,x,h){let l=y.find((i)=>i[x]!==void 0&&i[x]!==null);if(l!==void 0){let i=l[x];switch(typeof i){case"string":if(i.match(/^\d+(\.\d+)?$/))return 6*h;else if(i.includes(" "))return 20*h;else return 12*h;case"number":return 6*h;case"boolean":return 5*h;case"object":return!1;default:return 8*h}}return!1}var{div:j0,span:i3,button:bh}=K,V6=(y)=>y;class q4 extends U{static preferredTagName="tosi-table";static lightStyleSpec={":host":{"--tosi-table-row-height":"32px","--tosi-table-touch-size":"var(--tosi-touch-size, 44px)","--tosi-table-dragged-header-bg":"#0004","--tosi-table-dragged-header-color":"#fff","--tosi-table-drop-header-bg":"#fff4",display:"block",overflow:"hidden",background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .scroll-area":{width:"100%",height:"100%",overflow:"auto",overscrollBehavior:"none"},":host .thead, :host .tbody":{display:"contents"},":host .tr":{display:"grid",gridTemplateColumns:z.tosiTableGridColumns,width:z.tosiTableGridRowWidth,height:z.tosiTableRowHeight,background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .thead .tr":{position:"sticky",top:"0",zIndex:"2",background:P.tosiTableHeaderBg(P.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tbody-pinned-top .tr, :host .tbody-pinned-bottom .tr":{position:"sticky",zIndex:"1"},":host .th, :host .td":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"flex",alignItems:"center",height:z.tosiTableRowHeight,lineHeight:z.tosiTableRowHeight},":host .col-pinned":{position:"sticky",zIndex:"1",background:P.tosiTableBg("var(--tosi-bg, #fff)")},":host .th.col-pinned":{zIndex:"3",background:P.tosiTableHeaderBg(P.tosiTableBg("var(--tosi-bg, #fff)"))},":host .tr[aria-selected] .td":{background:P.tosiTableSelectedBg("var(--tosi-accent, #007AFF22)")},":host .td:focus, :host .th:focus":{outline:"2px solid var(--tosi-accent, #007AFF)",outlineOffset:"-2px",zIndex:"1"},":host .col-pinned:focus":{zIndex:"4"},":host .col-edge-right":{boxShadow:"1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .col-edge-left":{boxShadow:"-1px 0 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-bottom":{boxShadow:"0 1px 0 var(--tosi-table-edge-color, #0002)"},":host .row-edge-top":{boxShadow:"0 -1px 0 var(--tosi-table-edge-color, #0002)"},":host .th .menu-trigger":{color:"currentColor",background:"none",padding:0,lineHeight:z.tosiTableTouchSize,height:z.tosiTableTouchSize,width:z.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:z.tosiTableDraggedHeaderBg,color:z.tosiTableDraggedHeaderColor},":host .drag-over":{background:z.tosiTableDropHeaderBg}};static initAttributes={rowHeight:30,charWidth:15,minColumnWidth:30,select:!1,multiple:!1,pinnedTop:0,pinnedBottom:0,nosort:!1,nohide:!1,noreorder:!1,localized:!1};selectionChanged=()=>{};rowRendered=null;selectedKey=Symbol("selected");selectBinding=(y,x)=>{if(x==null)return;y.toggleAttribute("aria-selected",x[this.selectedKey]===!0)};maxVisibleRows=1e4;_head=null;_scrollArea=null;_tbodyTop=null;_tbodyBottom=null;_pinnedRowEdgeObserver=null;_rowCellsCache=new WeakMap;itemFor(y){return C2(y)}cellsFor(y){let x=J(y);for(let h of[this._tbodyTop,this._scrollArea,this._tbodyBottom]){if(!h)continue;let l=Q2(h);if(!l)continue;let i=l.itemToElement.get(x);if(i&&i.length>0){let C=i[0],k=this._rowCellsCache.get(C);if(!k)k=Array.from(C.children),this._rowCellsCache.set(C,k);return k}}return}get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(y){let{array:x,columns:h,filter:l}=J(y);if(this._array!==x||this._columns!==h||this._filter!==l)this.queueRender();this._array=x||[],this._columns=h||null,this._filter=l||V6}rowData={visible:[],pinnedTopData:[],pinnedBottomData:[]};_array=[];_columns=null;_filter=V6;_sort;_pinnedTopRows;_pinnedBottomRows;get pinnedTopRows(){return this._pinnedTopRows}set pinnedTopRows(y){this._pinnedTopRows=y?J(y):void 0,this.queueRender()}get pinnedBottomRows(){return this._pinnedBottomRows}set pinnedBottomRows(y){this._pinnedBottomRows=y?J(y):void 0,this.queueRender()}get effectivePinnedTopData(){if(this._pinnedTopRows)return this._pinnedTopRows;return this.pinnedTop>0?this._array.slice(0,this.pinnedTop):[]}get effectivePinnedBottomData(){if(this._pinnedBottomRows)return this._pinnedBottomRows;return this.pinnedBottom>0?this._array.slice(-this.pinnedBottom):[]}get effectiveBaseData(){if(this._pinnedTopRows||this._pinnedBottomRows)return this._array;return this._array.slice(this.pinnedTop,this._array.length-this.pinnedBottom)}constructor(){super();this.rowData=e({[this.instanceId]:this.rowData})[this.instanceId]}get array(){return this._array}set array(y){this._array=J(y),this.queueRender()}get filter(){return this._filter}set filter(y){if(this._filter!==y)this._filter=y,this.queueRender()}get sort(){if(this._sort)return this._sort;let y=this._columns?.find((h)=>h.sort==="ascending"||h.sort==="descending");if(!y)return;let{prop:x}=y;return y.sort==="ascending"?(h,l)=>h[x]>l[x]?1:-1:(h,l)=>h[x]>l[x]?-1:1}set sort(y){if(this._sort!==y)this._sort=y,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:y}=this;this._columns=Object.keys(y[0]||{}).map((x)=>{let h=Dh(y,x,this.charWidth);return{name:x.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:x,align:typeof y[0][x]==="number"||y[0][x]!==""&&!isNaN(y[0][x])?"right":"left",visible:h!==!1,width:h?h:0}})}return this._columns}set columns(y){this._columns=y,this.queueRender()}get visibleColumns(){let y=this.columns.filter((i)=>i.visible!==!1),x=y.filter((i)=>i.pinned==="left"),h=y.filter((i)=>!i.pinned),l=y.filter((i)=>i.pinned==="right");return[...x,...h,...l]}get pinnedLeft(){return this.visibleColumns.filter((y)=>y.pinned==="left").length}set pinnedLeft(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="left")delete h.pinned;for(let h=0;h<y&&h<x.length;h++)x[h].pinned="left";this.queueRender()}get pinnedRight(){return this.visibleColumns.filter((y)=>y.pinned==="right").length}set pinnedRight(y){let x=this.columns.filter((h)=>h.visible!==!1);for(let h of x)if(h.pinned==="right")delete h.pinned;for(let h=x.length-y;h<x.length;h++)if(h>=0)x[h].pinned="right";this.queueRender()}content=null;computeStickyInfo(y){let x=y.map(()=>({})),h=0,l=-1;for(let k=0;k<y.length;k++){if(y[k].pinned!=="left")break;x[k].left=h+"px",h+=y[k].width,l=k}if(l>=0)x[l].edgeClass="col-edge-right";let i=0,C=y.length;for(let k=y.length-1;k>=0;k--){if(y[k].pinned!=="right")break;x[k].right=i+"px",i+=y[k].width,C=k}if(C<y.length)x[C].edgeClass="col-edge-left";return x}cellClasses(y,x){let h=y;if(x.left!=null||x.right!=null)h+=" col-pinned";if(x.edgeClass)h+=" "+x.edgeClass;return h}rowClasses(y){return y==="visible"?"tr":"tr row-pinned"}tagPinnedRows=()=>{this.tagPinnedTbody(this._tbodyTop,"top"),this.tagPinnedTbody(this._tbodyBottom,"bottom")};tagPinnedTbody(y,x){if(!y)return;let h=Array.from(y.querySelectorAll(".tr"));if(h.length===0)return;let l=h.length-1,i=x==="top"?"row-edge-bottom":"row-edge-top";h.forEach((k,g)=>{k.classList.remove(i);let w=x==="top"?g+1:l-g;k.style[x]=`calc(var(--tosi-table-row-height) * ${w})`}),(x==="top"?h[l]:h[0]).classList.add(i)}cellStyle(y,x,h){let l={justifyContent:y.align||"left",...h};if(x.left!=null)l.left=x.left;if(x.right!=null)l.right=x.right;return l}applyGridCellAttrs(y,x,h,l){y.setAttribute("aria-colindex",String(x+1)),y.tabIndex=-1,y.classList.add(...this.cellClasses("td",h).split(" ")),Object.assign(y.style,l)}buildCell(y,x,h,l){let i=this.cellStyle(y,h);if(y.dataCell!==void 0){let C=y.dataCell(y);return this.applyGridCellAttrs(C,x,h,i),C}return i3({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(x+1),style:i,bindText:l[y.prop]})}buildRow(y,x,h,l="tr"){let i=x.map((g,w)=>this.buildCell(g,w,h[w],y)),C=this.selectBinding,k={class:l};return k.bind={value:y,binding:{toDOM:(g,w)=>{C(g,w);let B=this.rowRendered;if(B)B(w,Array.from(g.children))}}},j0(k,...i)}buildHeaderCell(y,x,h){let{popColumnMenu:l}=this,i="none",C;switch(y.sort){case"ascending":C=O.sortAscending(),i="descending";break;case"descending":i="ascending",C=O.sortDescending();break}let k=!(this.nosort&&this.nohide)?bh({class:"menu-trigger",onClick(w){l(w.target,y),w.stopPropagation()}},C||O.moreVertical()):{},g=y.headerCell!==void 0?y.headerCell(y):i3({class:this.cellClasses("th",h),role:"columnheader",tabindex:-1,ariaSort:i,ariaColindex:String(x+1),style:this.cellStyle(y,h)},this.captionSpan({style:{flex:"1"}},typeof y.name==="string"?y.name:y.prop),k);if(y.headerCell!==void 0)this.applyGridCellAttrs(g,x,h,this.cellStyle(y,h)),g.classList.remove("td"),g.classList.add("th"),g.setAttribute("role","columnheader");if(!this.noreorder&&g.children[0]){e5();let w=this.instanceId+"-column-header",B=g.children[0];B.setAttribute("draggable","true"),B.style.pointerEvents="all",B.dataset.drag=w,g.dataset.drop=w,B.addEventListener("dragstart",()=>{this.draggedColumn=y}),g.addEventListener("drop",this.dropColumn)}return g}buildHeader(y,x){let h=y.map((l,i)=>this.buildHeaderCell(l,i,x[i]));return j0({class:"thead",role:"rowgroup"},j0({class:"tr",role:"row"},...h))}buildPinnedBody(y,x,h,l){let i=J(y);if(!i||i.length===0)return null;let C=l==="pinned-top"?"pinnedTopRows":"pinnedBottomRows",k=this.rowClasses(l),g=y.listBinding((w,B)=>this.buildRow(B,x,h,k),{});return j0({class:`tbody tbody-${l}`,role:"rowgroup",part:C},...g)}getColumn(y){if(!this._scrollArea)return;let x=(y.touches!==void 0?y.touches[0].clientX:y.clientX)-this._scrollArea.getBoundingClientRect().x,h=y.touches!==void 0?20:5,{scrollLeft:l,clientWidth:i,scrollWidth:C}=this._scrollArea,k=this.visibleColumns,g=C-i-l,w=0;return k.find((B)=>{if(B.visible===!1)return!1;w+=B.width;let j;if(B.pinned==="left")j=w;else if(B.pinned==="right")j=w-l-g;else j=w-l;return Math.abs(x-j)<h})}setCursor=(y)=>{let x=this.getColumn(y);this.style.cursor=x!==void 0?"col-resize":""};resizeColumn=(y)=>{let x=this.getColumn(y);if(x!==void 0){let h=Number(x.width),l=y.touches!==void 0,i=l?y.touches[0].identifier:void 0;V1(y,(C,k,g)=>{if((l?[...g.touches].find((j)=>j.identifier===i):!0)===void 0)return!0;let B=h+C;if(x.width=B>this.minColumnWidth?B:this.minColumnWidth,this.setColumnWidths(),g.type==="mouseup")return!0},"col-resize")}};selectRow(y,x=!0){if(x)y[this.selectedKey]=!0;else delete y[this.selectedKey];this.updateSelectionVisuals()}selectRows(y,x=!0){for(let h of y||this.array)if(x)h[this.selectedKey]=!0;else delete h[this.selectedKey];this.updateSelectionVisuals()}deSelect(y){this.selectRows(y,!1)}updateSelectionVisuals(){let y=this._scrollArea?.querySelectorAll(".tr")??[];for(let x of y){let h=this.itemFor(x);if(h!=null)this.selectBinding(x,h)}}rangeStart;updateSelection=(y)=>{if(!this.select&&!this.multiple)return;let{target:x}=y;if(!(x instanceof HTMLElement))return;let h=this.itemFor(x);if(h==null)return;let l=y,i=window.getSelection();if(i!==null)i.removeAllRanges();let C=this.visibleRows;if(this.multiple&&l.shiftKey&&C.length>0&&this.rangeStart!==h){let k=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[g,w]=[this.rangeStart!==void 0?C.indexOf(this.rangeStart):0,C.indexOf(h)].sort((B,j)=>B-j);if(g>-1)for(let B=g;B<=w;B++){let j=C[B];this.selectRow(j,k)}}else if(this.multiple&&l.metaKey){this.selectRow(h,!h[this.selectedKey]);let k=C.indexOf(h),g=C[k+1],w=k>0?C[k-1]:void 0;if(g!==void 0&&g[this.selectedKey]===!0)this.rangeStart=g;else if(w!==void 0&&w[this.selectedKey]===!0)this.rangeStart=w;else this.rangeStart=void 0}else this.rangeStart=h,this.deSelect(),this.selectRow(h,!0);this.selectionChanged(this.visibleSelectedRows),this.updateSelectionVisuals()};findCell(y,x){if(y===-1)return this.querySelector(`.thead .th[aria-colindex="${x+1}"]`);let h=this.effectivePinnedTopData,l=this.visibleRows,i=this.effectivePinnedBottomData,C;if(y<h.length)C=h[y];else if(y<h.length+l.length)C=l[y-h.length];else if(y<h.length+l.length+i.length)C=i[y-h.length-l.length];else return null;return this.cellsFor(C)?.[x]??null}_pendingFocus=null;onScrollEnd=()=>{if(!this._pendingFocus)return;let{row:y,col:x}=this._pendingFocus;this._pendingFocus=null;let h=this.findCell(y,x);if(h)h.focus()};focusCell(y,x){this._pendingFocus={row:y,col:x};let h=this.findCell(y,x);if(h)h.focus(),h.scrollIntoView({block:"nearest",inline:"nearest"});else if(this._scrollArea){let l=this.effectivePinnedTopData,i=y-l.length;if(i>=0&&i<this.visibleRows.length)this._scrollArea.scrollTop=i*this.rowHeight}}handleKeyNav=(y)=>{let x=y.target,h=x.closest(".td")||x.closest(".th");if(!h)return;let l=parseInt(h.getAttribute("aria-colindex")||"",10);if(isNaN(l))return;let i=l-1,C=this.visibleColumns.length,k=this.effectivePinnedTopData,g=this.visibleRows,w=this.effectivePinnedBottomData,B=k.length+g.length+w.length,j=y.metaKey||y.ctrlKey,V=h.classList.contains("th"),_;if(V)_=-1;else{let Y=h.closest(".tr");if(!Y)return;let X=C2(Y);if(X==null)return;let F=k.indexOf(X),$=F===-1?g.indexOf(X):-1,R=F===-1&&$===-1?w.indexOf(X):-1;if(F!==-1)_=F;else if($!==-1)_=k.length+$;else if(R!==-1)_=k.length+g.length+R;else return}let p=_,G=i;switch(y.key){case"ArrowUp":p=j?0:Math.max(-1,_-1);break;case"ArrowDown":p=j?B-1:Math.min(B-1,_+1);break;case"ArrowLeft":G=j?0:Math.max(0,i-1);break;case"ArrowRight":G=j?C-1:Math.min(C-1,i+1);break;case"Tab":if(y.shiftKey)if(i>0)G=i-1;else if(_>0)p=_-1,G=C-1;else return;else if(i<C-1)G=i+1;else if(_<B-1)p=_+1,G=0;else return;break;case"Home":if(j)p=0,G=0;else G=0;break;case"End":if(j)p=B-1,G=C-1;else G=C-1;break;default:return}if(p!==_||G!==i)y.preventDefault(),this.focusCell(p,G)};connectedCallback(){super.connectedCallback(),this.addEventListener("mousemove",this.setCursor),this.addEventListener("mousedown",this.resizeColumn),this.addEventListener("touchstart",this.resizeColumn,{passive:!0}),this.addEventListener("mouseup",this.updateSelection),this.addEventListener("touchend",this.updateSelection),this.addEventListener("keydown",this.handleKeyNav)}setColumnWidths(){let y=this.visibleColumns,x=y.map((i)=>i.width+"px").join(" "),h=y.reduce((i,C)=>i+C.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",x),this.style.setProperty("--tosi-table-grid-row-width",h),this.style.setProperty("--grid-columns",x),this.style.setProperty("--grid-row-width",h);let l=this.computeStickyInfo(y);for(let i of this.querySelectorAll(".col-pinned")){let C=parseInt(i.getAttribute("aria-colindex")||"",10)-1;if(!isNaN(C)&&l[C]){let k=l[C];if(k.left!=null)i.style.left=k.left;if(k.right!=null)i.style.right=k.right}}}sortByColumn=(y,x="auto")=>{for(let h of this.columns.filter((l)=>J(l.sort)!==!1))if(J(h)===y){if(x==="auto")h.sort=h.sort==="ascending"?"descending":"ascending";else h.sort=x;this.queueRender()}else delete h.sort};popColumnMenu=(y,x)=>{let{sortByColumn:h}=this,l=this.columns.filter((g)=>g.visible===!1),i=this.queueRender.bind(this),C=[];if(!this.nosort&&x.sort!==!1)C.push({caption:this.localized?`${D("Sort")} ${D("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){h(x)}},{caption:this.localized?`${D("Sort")} ${D("Descending")}`:"Sort Descending",icon:"sortDescending",action(){h(x,"descending")}});if(!this.nohide){if(C.length)C.push(null);C.push({caption:this.localized?`${D("Hide")} ${D("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>x.visible!==!0,action(){x.visible=!1,i()}},{caption:this.localized?`${D("Show")} ${D("Column")}`:"Show Column",icon:"eye",enabled:()=>l.length>0,menuItems:l.map((g)=>{return{caption:g.name||g.prop,action(){delete g.visible,i()}}})})}if(C.length)C.push(null);let k=x.pinned==="left"?"pin":x.pinned==="right"?"pin0f":"pin50o";C.push({caption:this.localized?D("Pin"):"Pin",icon:k,menuItems:[{caption:this.localized?D("Left"):"Left",icon:"pin",enabled:()=>x.pinned!=="left",action(){x.pinned="left",i()}},{caption:this.localized?D("Right"):"Right",icon:"pin0f",enabled:()=>x.pinned!=="right",action(){x.pinned="right",i()}},{caption:this.localized?D("Unpin"):"Unpin",icon:"unPin",enabled:()=>!!x.pinned,action(){delete x.pinned,i()}}]}),L({target:y,localized:this.localized,menuItems:C})};get captionSpan(){return this.localized?Q1:i3}get visibleRows(){return J(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((y)=>y[this.selectedKey])}get selectedRows(){if(this._pinnedTopRows||this._pinnedBottomRows)return[...this._pinnedTopRows??[],...this._array,...this._pinnedBottomRows??[]].filter((x)=>x[this.selectedKey]);return this._array.filter((y)=>y[this.selectedKey])}getCells(y){let x=y instanceof Element?this.itemFor(y):y;return x==null?void 0:this.cellsFor(x)}getItem(y){return this.itemFor(y)}draggedColumn;dropColumn=(y)=>{let x=y.target.closest(".drag-over"),h=parseInt(x.getAttribute("aria-colindex")||"",10)-1,l=this.visibleColumns[h],i=this.columns.indexOf(this.draggedColumn),C=this.columns.indexOf(l);this.draggedColumn.pinned=l.pinned,this.columns.splice(i,1),this.columns.splice(C,0,this.draggedColumn),this.queueRender(),y.preventDefault(),y.stopPropagation()};render(){super.render(),this.textContent="";let y=this.effectivePinnedTopData,x=this.effectivePinnedBottomData,h=this.effectiveBaseData,l=Math.min(h.length,this.maxVisibleRows),i=this.filter(h.slice(0,l)),{sort:C}=this;if(C)i.sort(C);this.rowData.pinnedTopData=y,this.rowData.pinnedBottomData=x,this.rowData.visible=i;let k=this.visibleColumns;if(k.length===0)return;let g=this.computeStickyInfo(k);this.style.setProperty("--tosi-table-row-height",this.rowHeight>0?`${this.rowHeight}px`:"auto"),this.setColumnWidths(),this._head=this.buildHeader(k,g),this._tbodyTop=this.buildPinnedBody(this.rowData.pinnedTopData,k,g,"pinned-top"),this._tbodyBottom=this.buildPinnedBody(this.rowData.pinnedBottomData,k,g,"pinned-bottom");let w=this.rowData.visible.listBinding((B,j)=>this.buildRow(j,k,g),this.rowHeight>0?{virtual:{height:this.rowHeight}}:{});this._scrollArea=j0({class:"scroll-area",part:"visibleRows"},...[this._head,this._tbodyTop,...w,this._tbodyBottom].filter(Boolean)),this._scrollArea.addEventListener("scrollend",this.onScrollEnd),this.append(this._scrollArea),this.observePinnedRowMutations(),this.tagPinnedRows()}observePinnedRowMutations(){this._pinnedRowEdgeObserver?.disconnect(),this._pinnedRowEdgeObserver=new MutationObserver(this.tagPinnedRows);for(let y of[this._tbodyTop,this._tbodyBottom])if(y)this._pinnedRowEdgeObserver.observe(y,{childList:!0})}}var dh=q4,C3=q4.elementCreator(),Sh=C3,Ih=C3;var{dialog:rh,button:k3,header:Th,footer:oh,tosiSlot:g3,h3:w3,p:B3,label:Lh,input:Mh,div:nh}=K;class z3 extends U{static preferredTagName="tosi-dialog";static lightStyleSpec={":host > dialog::backdrop":{backdropFilter:"blur(8px)"},":host > dialog:not([open])":{display:"none"},":host > dialog[open]":{minWidth:300,border:0,borderRadius:10,overflow:"hidden",maxHeight:"calc(100% - 20px)",padding:0,display:"flex",flexDirection:"column",gap:5,_dialogShadow:P.menuShadow("0 5px 10px #0004"),_dialogBackground:P.background("#fafafa"),_dialogColor:P.textColor("#222"),boxShadow:z.dialogShadow,background:z.dialogBackground,color:z.dialogColor},":host > dialog > *":{padding:"0 20px"},":host > dialog > header":{display:"flex",justifyContent:"center",gap:10},":host > dialog > footer":{display:"flex",justifyContent:"flex-end",gap:10,paddingBottom:20}};static async alert(y,x="Alert"){return new Promise((h)=>{let l=V4({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){h()}},w3({slot:"header"},x),y.includes(`
17
+ `)?K.pre({style:{whiteSpace:"pre-wrap",margin:0}},y):B3(y));document.body.append(l),l.showModal()})}static async confirm(y,x="Confirm"){return new Promise((h)=>{let l=V4({removeOnClose:!0,dialogWillClose(i){h(i==="confirm")}},w3({slot:"header"},x),B3(y),k3({slot:"footer",onClick(){l.close()}},"Cancel"));document.body.append(l),l.showModal()})}static async prompt(y,x="Prompt",h=""){return new Promise((l)=>{let i=Mh({value:h}),C=V4({removeOnClose:!0,dialogWillClose(k){l(k==="confirm"?i.value:null)},initialFocus(){i.focus()}},w3({slot:"header"},x),B3(Lh({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},nh(y),i)),k3({slot:"footer",onClick(){C.close()}},"Cancel"));document.body.append(C),C.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();W2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(y="cancel")=>{console.log("dialog will close with",y)};initialFocus(){this.parts.ok.focus()}#y=(y)=>{};showModal=()=>{return this.style.zIndex=String(g2()),new Promise((y)=>{this.#y=y,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(y="cancel")=>{if(this.dialogWillClose(y),this.#y(y),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>rh({part:"dialog"},Th(g3({name:"header"})),g3(),oh(g3({name:"footer"}),k3({part:"ok",onClick:this.ok},"OK")))}var V4=z3.elementCreator();var uh=/^readme\.md$/i;function P6(y){if(uh.test(y))return"";return y.replace(/\.[^.]+$/,"")}function $2(y){let x={};for(let l of y){let i=P6(l.filename);x[i]=(x[i]||0)+1}let h={};for(let l of y){let i=P6(l.filename);h[l.filename]=i!==""&&x[i]>1?l.filename.replace(/\./g,"-"):i}return h}function j3(y){return y===""?"/":`/${y}/`}function A6(y,x){let h=y.replace(/^\?/,"");if(!h||h.includes("=")||h.includes("&"))return null;let l=decodeURIComponent(h),i=x[l];if(i===void 0)return null;return j3(i)}function ah(y){return y.replace(/^\/+/,"").replace(/\/+$/,"").replace(/\/index\.html$/i,"")}function q3(y,x){let h=ah(y);for(let[l,i]of Object.entries(x))if(i===h)return l;return""}function _6(y){return y.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function V3(y,x,h){if(!y)return"";for(let i of x)if(i.filename===y)return i.filename;for(let i of x)if(h[i.filename]===y)return i.filename;let l=_6(y);for(let i of x)if(h[i.filename]===l)return i.filename;for(let i of x)if(i.title&&_6(i.title)===l)return i.filename;return""}function G6(y){let x=y.pin==="top"?"A":y.pin==="bottom"?"Z":"M",h=String(y.order??500).padStart(4,"0");return x+h+(y.title||"").toLocaleLowerCase()+"\x00"+y.filename}function mh(y,x){let h=G6(y),l=G6(x);return h>l?1:l>h?-1:0}function P4(y,x){let h=new Map;for(let k of y)h.set(k.filename,{doc:k,slug:x[k.filename]??"",children:[],depth:0});let l=new Map;for(let k of y){let g=k.parent?V3(k.parent,y,x):"";if(g&&(g===k.filename||!h.has(g)||th(k.filename,g,y,x)))g="";l.set(k.filename,g)}let i=[];for(let k of y){let g=l.get(k.filename)||"",w=h.get(k.filename);if(g)h.get(g).children.push(w);else i.push(w)}let C=(k,g)=>{k.sort((w,B)=>mh(w.doc,B.doc));for(let w of k)w.depth=g,C(w.children,g+1)};return C(i,0),i}function th(y,x,h,l){let i=new Map(h.map((g)=>[g.filename,g])),C=x,k=new Set([y]);while(C){if(k.has(C))return!0;k.add(C);let g=i.get(C);C=g?.parent?V3(g.parent,h,l):""}return!1}function _3(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var B2=_3();function Y6(y){B2=y}var _0={exec:()=>null};function H(y,x=""){let h=typeof y=="string"?y:y.source,l={replace:(i,C)=>{let k=typeof C=="string"?C:C.source;return k=k.replace(k1.caret,"$1"),h=h.replace(i,k),l},getRegex:()=>new RegExp(h,x)};return l}var Eh=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),k1={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(y)=>new RegExp(`^( {0,3}${y})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}#`),htmlBeginRegex:(y)=>new RegExp(`^ {0,${Math.min(3,y-1)}}<(?:[a-z].*>|!--)`,"i")},eh=/^(?:[ \t]*(?:\n|$))+/,yl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,A3=/(?:[*+-]|\d{1,9}[.)])/,F6=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,X6=H(F6).replace(/bull/g,A3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ll=H(F6).replace(/bull/g,A3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),G3=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,il=/^[^\n]+/,K3=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Cl=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",K3).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),kl=H(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,A3).getRegex(),K4="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",U3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gl=H("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",U3).replace("tag",K4).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),s6=H(G3).replace("hr",A0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",K4).getRegex(),wl=H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",s6).getRegex(),O3={blockquote:wl,code:yl,def:Cl,fences:xl,heading:hl,hr:A0,html:gl,lheading:X6,list:kl,newline:eh,paragraph:s6,table:_0,text:il},K6=H("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",K4).getRegex(),Bl={...O3,lheading:ll,table:K6,paragraph:H(G3).replace("hr",A0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",K6).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",K4).getRegex()},zl={...O3,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",U3).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(G3).replace("hr",A0).replace("heading",` *#{1,6} *[^
18
+ ]`).replace("lheading",X6).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ql=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,N6=/^( {2,}|\\)\n(?!\s*$)/,Vl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,U4=/[\p{P}\p{S}]/u,p3=/[\s\p{P}\p{S}]/u,Z6=/[^\s\p{P}\p{S}]/u,Pl=H(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,p3).getRegex(),v6=/(?!~)[\p{P}\p{S}]/u,_l=/(?!~)[\s\p{P}\p{S}]/u,Al=/(?:[^\s\p{P}\p{S}]|~)/u,Gl=H(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Eh?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),$6=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Kl=H($6,"u").replace(/punct/g,U4).getRegex(),Ul=H($6,"u").replace(/punct/g,v6).getRegex(),c6="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ol=H(c6,"gu").replace(/notPunctSpace/g,Z6).replace(/punctSpace/g,p3).replace(/punct/g,U4).getRegex(),pl=H(c6,"gu").replace(/notPunctSpace/g,Al).replace(/punctSpace/g,_l).replace(/punct/g,v6).getRegex(),Ql=H("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Z6).replace(/punctSpace/g,p3).replace(/punct/g,U4).getRegex(),Wl=H(/\\(punct)/,"gu").replace(/punct/g,U4).getRegex(),Yl=H(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Fl=H(U3).replace("(?:-->|$)","-->").getRegex(),Xl=H("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Fl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),A4=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,sl=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",A4).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),R6=H(/^!?\[(label)\]\[(ref)\]/).replace("label",A4).replace("ref",K3).getRegex(),J6=H(/^!?\[(ref)\](?:\[\])?/).replace("ref",K3).getRegex(),Nl=H("reflink|nolink(?!\\()","g").replace("reflink",R6).replace("nolink",J6).getRegex(),U6=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Q3={_backpedal:_0,anyPunctuation:Wl,autolink:Yl,blockSkip:Gl,br:N6,code:ql,del:_0,emStrongLDelim:Kl,emStrongRDelimAst:Ol,emStrongRDelimUnd:Ql,escape:jl,link:sl,nolink:J6,punctuation:Pl,reflink:R6,reflinkSearch:Nl,tag:Xl,text:Vl,url:_0},Zl={...Q3,link:H(/^!?\[(label)\]\((.*?)\)/).replace("label",A4).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",A4).getRegex()},P3={...Q3,emStrongRDelimAst:pl,emStrongLDelim:Ul,url:H(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",U6).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:H(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",U6).getRegex()},vl={...P3,br:H(N6).replace("{2,}","*").getRegex(),text:H(P3.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},_4={normal:O3,gfm:Bl,pedantic:zl},q0={normal:Q3,gfm:P3,breaks:vl,pedantic:Zl},$l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},O6=(y)=>$l[y];function H1(y,x){if(x){if(k1.escapeTest.test(y))return y.replace(k1.escapeReplace,O6)}else if(k1.escapeTestNoEncode.test(y))return y.replace(k1.escapeReplaceNoEncode,O6);return y}function p6(y){try{y=encodeURI(y).replace(k1.percentDecode,"%")}catch{return null}return y}function Q6(y,x){let h=y.replace(k1.findPipe,(C,k,g)=>{let w=!1,B=k;for(;--B>=0&&g[B]==="\\";)w=!w;return w?"|":" |"}),l=h.split(k1.splitPipe),i=0;if(l[0].trim()||l.shift(),l.length>0&&!l.at(-1)?.trim()&&l.pop(),x)if(l.length>x)l.splice(x);else for(;l.length<x;)l.push("");for(;i<l.length;i++)l[i]=l[i].trim().replace(k1.slashPipe,"|");return l}function V0(y,x,h){let l=y.length;if(l===0)return"";let i=0;for(;i<l;){let C=y.charAt(l-i-1);if(C===x&&!h)i++;else if(C!==x&&h)i++;else break}return y.slice(0,l-i)}function cl(y,x){if(y.indexOf(x[1])===-1)return-1;let h=0;for(let l=0;l<y.length;l++)if(y[l]==="\\")l++;else if(y[l]===x[0])h++;else if(y[l]===x[1]&&(h--,h<0))return l;return h>0?-2:-1}function W6(y,x,h,l,i){let C=x.href,k=x.title||null,g=y[1].replace(i.other.outputLinkReplace,"$1");l.state.inLink=!0;let w={type:y[0].charAt(0)==="!"?"image":"link",raw:h,href:C,title:k,text:g,tokens:l.inlineTokens(g)};return l.state.inLink=!1,w}function Rl(y,x,h){let l=y.match(h.other.indentCodeCompensation);if(l===null)return x;let i=l[1];return x.split(`
19
19
  `).map((C)=>{let k=C.match(h.other.beginningSpace);if(k===null)return C;let[g]=k;return g.length>=i.length?C.slice(i.length):C}).join(`
20
20
  `)}var G4=class{options;rules;lexer;constructor(y){this.options=y||B2}space(y){let x=this.rules.block.newline.exec(y);if(x&&x[0].length>0)return{type:"space",raw:x[0]}}code(y){let x=this.rules.block.code.exec(y);if(x){let h=x[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:x[0],codeBlockStyle:"indented",text:this.options.pedantic?h:V0(h,`
21
- `)}}}fences(y){let x=this.rules.block.fences.exec(y);if(x){let h=x[0],l=Nl(h,x[3]||"",this.rules);return{type:"code",raw:h,lang:x[2]?x[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):x[2],text:l}}}heading(y){let x=this.rules.block.heading.exec(y);if(x){let h=x[2].trim();if(this.rules.other.endingHash.test(h)){let l=V0(h,"#");(this.options.pedantic||!l||this.rules.other.endingSpaceChar.test(l))&&(h=l.trim())}return{type:"heading",raw:x[0],depth:x[1].length,text:h,tokens:this.lexer.inline(h)}}}hr(y){let x=this.rules.block.hr.exec(y);if(x)return{type:"hr",raw:V0(x[0],`
21
+ `)}}}fences(y){let x=this.rules.block.fences.exec(y);if(x){let h=x[0],l=Rl(h,x[3]||"",this.rules);return{type:"code",raw:h,lang:x[2]?x[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):x[2],text:l}}}heading(y){let x=this.rules.block.heading.exec(y);if(x){let h=x[2].trim();if(this.rules.other.endingHash.test(h)){let l=V0(h,"#");(this.options.pedantic||!l||this.rules.other.endingSpaceChar.test(l))&&(h=l.trim())}return{type:"heading",raw:x[0],depth:x[1].length,text:h,tokens:this.lexer.inline(h)}}}hr(y){let x=this.rules.block.hr.exec(y);if(x)return{type:"hr",raw:V0(x[0],`
22
22
  `)}}blockquote(y){let x=this.rules.block.blockquote.exec(y);if(x){let h=V0(x[0],`
23
23
  `).split(`
24
24
  `),l="",i="",C=[];for(;h.length>0;){let k=!1,g=[],w;for(w=0;w<h.length;w++)if(this.rules.other.blockquoteStart.test(h[w]))g.push(h[w]),k=!0;else if(!k)g.push(h[w]);else break;h=h.slice(w);let B=g.join(`
25
25
  `),j=B.replace(this.rules.other.blockquoteSetextReplace,`
26
26
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");l=l?`${l}
27
27
  ${B}`:B,i=i?`${i}
28
- ${j}`:j;let V=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(j,C,!0),this.lexer.state.top=V,h.length===0)break;let A=C.at(-1);if(A?.type==="code")break;if(A?.type==="blockquote"){let O=A,G=O.raw+`
28
+ ${j}`:j;let V=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(j,C,!0),this.lexer.state.top=V,h.length===0)break;let _=C.at(-1);if(_?.type==="code")break;if(_?.type==="blockquote"){let p=_,G=p.raw+`
29
29
  `+h.join(`
30
- `),W=this.blockquote(G);C[C.length-1]=W,l=l.substring(0,l.length-O.raw.length)+W.raw,i=i.substring(0,i.length-O.text.length)+W.text;break}else if(A?.type==="list"){let O=A,G=O.raw+`
30
+ `),Y=this.blockquote(G);C[C.length-1]=Y,l=l.substring(0,l.length-p.raw.length)+Y.raw,i=i.substring(0,i.length-p.text.length)+Y.text;break}else if(_?.type==="list"){let p=_,G=p.raw+`
31
31
  `+h.join(`
32
- `),W=this.list(G);C[C.length-1]=W,l=l.substring(0,l.length-A.raw.length)+W.raw,i=i.substring(0,i.length-O.raw.length)+W.raw,h=G.substring(C.at(-1).raw.length).split(`
32
+ `),Y=this.list(G);C[C.length-1]=Y,l=l.substring(0,l.length-_.raw.length)+Y.raw,i=i.substring(0,i.length-p.raw.length)+Y.raw,h=G.substring(C.at(-1).raw.length).split(`
33
33
  `);continue}}return{type:"blockquote",raw:l,tokens:C,text:i}}}list(y){let x=this.rules.block.list.exec(y);if(x){let h=x[1].trim(),l=h.length>1,i={type:"list",raw:"",ordered:l,start:l?+h.slice(0,-1):"",loose:!1,items:[]};h=l?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=l?h:"[*+-]");let C=this.rules.other.listItemRegex(h),k=!1;for(;y;){let w=!1,B="",j="";if(!(x=C.exec(y))||this.rules.block.hr.test(y))break;B=x[0],y=y.substring(B.length);let V=x[2].split(`
34
- `,1)[0].replace(this.rules.other.listReplaceTabs,(Y)=>" ".repeat(3*Y.length)),A=y.split(`
35
- `,1)[0],O=!V.trim(),G=0;if(this.options.pedantic?(G=2,j=V.trimStart()):O?G=x[1].length+1:(G=x[2].search(this.rules.other.nonSpaceChar),G=G>4?1:G,j=V.slice(G),G+=x[1].length),O&&this.rules.other.blankLine.test(A)&&(B+=A+`
36
- `,y=y.substring(A.length+1),w=!0),!w){let Y=this.rules.other.nextBulletRegex(G),$=this.rules.other.hrRegex(G),R=this.rules.other.fencesBeginRegex(G),r=this.rules.other.headingBeginRegex(G),N=this.rules.other.htmlBeginRegex(G);for(;y;){let Z=y.split(`
37
- `,1)[0],X;if(A=Z,this.options.pedantic?(A=A.replace(this.rules.other.listReplaceNesting," "),X=A):X=A.replace(this.rules.other.tabCharGlobal," "),R.test(A)||r.test(A)||N.test(A)||Y.test(A)||$.test(A))break;if(X.search(this.rules.other.nonSpaceChar)>=G||!A.trim())j+=`
38
- `+X.slice(G);else{if(O||V.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(V)||r.test(V)||$.test(V))break;j+=`
39
- `+A}!O&&!A.trim()&&(O=!0),B+=Z+`
40
- `,y=y.substring(Z.length+1),V=X.slice(G)}}i.loose||(k?i.loose=!0:this.rules.other.doubleBlankLine.test(B)&&(k=!0));let W=null,F;this.options.gfm&&(W=this.rules.other.listIsTask.exec(j),W&&(F=W[0]!=="[ ] ",j=j.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:B,task:!!W,checked:F,loose:!1,text:j,tokens:[]}),i.raw+=B}let g=i.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let w=0;w<i.items.length;w++)if(this.lexer.state.top=!1,i.items[w].tokens=this.lexer.blockTokens(i.items[w].text,[]),!i.loose){let B=i.items[w].tokens.filter((V)=>V.type==="space"),j=B.length>0&&B.some((V)=>this.rules.other.anyLine.test(V.raw));i.loose=j}if(i.loose)for(let w=0;w<i.items.length;w++)i.items[w].loose=!0;return i}}html(y){let x=this.rules.block.html.exec(y);if(x)return{type:"html",block:!0,raw:x[0],pre:x[1]==="pre"||x[1]==="script"||x[1]==="style",text:x[0]}}def(y){let x=this.rules.block.def.exec(y);if(x){let h=x[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),l=x[2]?x[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=x[3]?x[3].substring(1,x[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):x[3];return{type:"def",tag:h,raw:x[0],href:l,title:i}}}table(y){let x=this.rules.block.table.exec(y);if(!x||!this.rules.other.tableDelimiter.test(x[2]))return;let h=A6(x[1]),l=x[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=x[3]?.trim()?x[3].replace(this.rules.other.tableRowBlankLine,"").split(`
41
- `):[],C={type:"table",raw:x[0],header:[],align:[],rows:[]};if(h.length===l.length){for(let k of l)this.rules.other.tableAlignRight.test(k)?C.align.push("right"):this.rules.other.tableAlignCenter.test(k)?C.align.push("center"):this.rules.other.tableAlignLeft.test(k)?C.align.push("left"):C.align.push(null);for(let k=0;k<h.length;k++)C.header.push({text:h[k],tokens:this.lexer.inline(h[k]),header:!0,align:C.align[k]});for(let k of i)C.rows.push(A6(k,C.header.length).map((g,w)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:C.align[w]})));return C}}lheading(y){let x=this.rules.block.lheading.exec(y);if(x)return{type:"heading",raw:x[0],depth:x[2].charAt(0)==="="?1:2,text:x[1],tokens:this.lexer.inline(x[1])}}paragraph(y){let x=this.rules.block.paragraph.exec(y);if(x){let h=x[1].charAt(x[1].length-1)===`
42
- `?x[1].slice(0,-1):x[1];return{type:"paragraph",raw:x[0],text:h,tokens:this.lexer.inline(h)}}}text(y){let x=this.rules.block.text.exec(y);if(x)return{type:"text",raw:x[0],text:x[0],tokens:this.lexer.inline(x[0])}}escape(y){let x=this.rules.inline.escape.exec(y);if(x)return{type:"escape",raw:x[0],text:x[1]}}tag(y){let x=this.rules.inline.tag.exec(y);if(x)return!this.lexer.state.inLink&&this.rules.other.startATag.test(x[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(x[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(x[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(x[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:x[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:x[0]}}link(y){let x=this.rules.inline.link.exec(y);if(x){let h=x[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(h)){if(!this.rules.other.endAngleBracket.test(h))return;let C=V0(h.slice(0,-1),"\\");if((h.length-C.length)%2===0)return}else{let C=Xl(x[2],"()");if(C===-2)return;if(C>-1){let k=(x[0].indexOf("!")===0?5:4)+x[1].length+C;x[2]=x[2].substring(0,C),x[0]=x[0].substring(0,k).trim(),x[3]=""}}let l=x[2],i="";if(this.options.pedantic){let C=this.rules.other.pedanticHrefTitle.exec(l);C&&(l=C[1],i=C[3])}else i=x[3]?x[3].slice(1,-1):"";return l=l.trim(),this.rules.other.startAngleBracket.test(l)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(h)?l=l.slice(1):l=l.slice(1,-1)),_6(x,{href:l&&l.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},x[0],this.lexer,this.rules)}}reflink(y,x){let h;if((h=this.rules.inline.reflink.exec(y))||(h=this.rules.inline.nolink.exec(y))){let l=(h[2]||h[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=x[l.toLowerCase()];if(!i){let C=h[0].charAt(0);return{type:"text",raw:C,text:C}}return _6(h,i,h[0],this.lexer,this.rules)}}emStrong(y,x,h=""){let l=this.rules.inline.emStrongLDelim.exec(y);if(!l||l[3]&&h.match(this.rules.other.unicodeAlphaNumeric))return;if(!(l[1]||l[2])||!h||this.rules.inline.punctuation.exec(h)){let i=[...l[0]].length-1,C,k,g=i,w=0,B=l[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(B.lastIndex=0,x=x.slice(-1*y.length+i);(l=B.exec(x))!=null;){if(C=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!C)continue;if(k=[...C].length,l[3]||l[4]){g+=k;continue}else if((l[5]||l[6])&&i%3&&!((i+k)%3)){w+=k;continue}if(g-=k,g>0)continue;k=Math.min(k,k+g+w);let j=[...l[0]][0].length,V=y.slice(0,i+l.index+j+k);if(Math.min(i,k)%2){let O=V.slice(1,-1);return{type:"em",raw:V,text:O,tokens:this.lexer.inlineTokens(O)}}let A=V.slice(2,-2);return{type:"strong",raw:V,text:A,tokens:this.lexer.inlineTokens(A)}}}}codespan(y){let x=this.rules.inline.code.exec(y);if(x){let h=x[2].replace(this.rules.other.newLineCharGlobal," "),l=this.rules.other.nonSpaceChar.test(h),i=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return l&&i&&(h=h.substring(1,h.length-1)),{type:"codespan",raw:x[0],text:h}}}br(y){let x=this.rules.inline.br.exec(y);if(x)return{type:"br",raw:x[0]}}del(y){let x=this.rules.inline.del.exec(y);if(x)return{type:"del",raw:x[0],text:x[2],tokens:this.lexer.inlineTokens(x[2])}}autolink(y){let x=this.rules.inline.autolink.exec(y);if(x){let h,l;return x[2]==="@"?(h=x[1],l="mailto:"+h):(h=x[1],l=h),{type:"link",raw:x[0],text:h,href:l,tokens:[{type:"text",raw:h,text:h}]}}}url(y){let x;if(x=this.rules.inline.url.exec(y)){let h,l;if(x[2]==="@")h=x[0],l="mailto:"+h;else{let i;do i=x[0],x[0]=this.rules.inline._backpedal.exec(x[0])?.[0]??"";while(i!==x[0]);h=x[0],x[1]==="www."?l="http://"+x[0]:l=x[0]}return{type:"link",raw:x[0],text:h,href:l,tokens:[{type:"text",raw:h,text:h}]}}}inlineText(y){let x=this.rules.inline.text.exec(y);if(x){let h=this.lexer.state.inRawBlock;return{type:"text",raw:x[0],text:x[0],escaped:h}}}},Q1=class y{tokens;options;state;tokenizer;inlineQueue;constructor(x){this.tokens=[],this.tokens.links=Object.create(null),this.options=x||B2,this.options.tokenizer=this.options.tokenizer||new G4,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let h={other:k1,block:A4.normal,inline:q0.normal};this.options.pedantic?(h.block=A4.pedantic,h.inline=q0.pedantic):this.options.gfm&&(h.block=A4.gfm,this.options.breaks?h.inline=q0.breaks:h.inline=q0.gfm),this.tokenizer.rules=h}static get rules(){return{block:A4,inline:q0}}static lex(x,h){return new y(h).lex(x)}static lexInline(x,h){return new y(h).inlineTokens(x)}lex(x){x=x.replace(k1.carriageReturn,`
34
+ `,1)[0].replace(this.rules.other.listReplaceTabs,(F)=>" ".repeat(3*F.length)),_=y.split(`
35
+ `,1)[0],p=!V.trim(),G=0;if(this.options.pedantic?(G=2,j=V.trimStart()):p?G=x[1].length+1:(G=x[2].search(this.rules.other.nonSpaceChar),G=G>4?1:G,j=V.slice(G),G+=x[1].length),p&&this.rules.other.blankLine.test(_)&&(B+=_+`
36
+ `,y=y.substring(_.length+1),w=!0),!w){let F=this.rules.other.nextBulletRegex(G),$=this.rules.other.hrRegex(G),R=this.rules.other.fencesBeginRegex(G),r=this.rules.other.headingBeginRegex(G),N=this.rules.other.htmlBeginRegex(G);for(;y;){let v=y.split(`
37
+ `,1)[0],s;if(_=v,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),s=_):s=_.replace(this.rules.other.tabCharGlobal," "),R.test(_)||r.test(_)||N.test(_)||F.test(_)||$.test(_))break;if(s.search(this.rules.other.nonSpaceChar)>=G||!_.trim())j+=`
38
+ `+s.slice(G);else{if(p||V.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(V)||r.test(V)||$.test(V))break;j+=`
39
+ `+_}!p&&!_.trim()&&(p=!0),B+=v+`
40
+ `,y=y.substring(v.length+1),V=s.slice(G)}}i.loose||(k?i.loose=!0:this.rules.other.doubleBlankLine.test(B)&&(k=!0));let Y=null,X;this.options.gfm&&(Y=this.rules.other.listIsTask.exec(j),Y&&(X=Y[0]!=="[ ] ",j=j.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:B,task:!!Y,checked:X,loose:!1,text:j,tokens:[]}),i.raw+=B}let g=i.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let w=0;w<i.items.length;w++)if(this.lexer.state.top=!1,i.items[w].tokens=this.lexer.blockTokens(i.items[w].text,[]),!i.loose){let B=i.items[w].tokens.filter((V)=>V.type==="space"),j=B.length>0&&B.some((V)=>this.rules.other.anyLine.test(V.raw));i.loose=j}if(i.loose)for(let w=0;w<i.items.length;w++)i.items[w].loose=!0;return i}}html(y){let x=this.rules.block.html.exec(y);if(x)return{type:"html",block:!0,raw:x[0],pre:x[1]==="pre"||x[1]==="script"||x[1]==="style",text:x[0]}}def(y){let x=this.rules.block.def.exec(y);if(x){let h=x[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),l=x[2]?x[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=x[3]?x[3].substring(1,x[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):x[3];return{type:"def",tag:h,raw:x[0],href:l,title:i}}}table(y){let x=this.rules.block.table.exec(y);if(!x||!this.rules.other.tableDelimiter.test(x[2]))return;let h=Q6(x[1]),l=x[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=x[3]?.trim()?x[3].replace(this.rules.other.tableRowBlankLine,"").split(`
41
+ `):[],C={type:"table",raw:x[0],header:[],align:[],rows:[]};if(h.length===l.length){for(let k of l)this.rules.other.tableAlignRight.test(k)?C.align.push("right"):this.rules.other.tableAlignCenter.test(k)?C.align.push("center"):this.rules.other.tableAlignLeft.test(k)?C.align.push("left"):C.align.push(null);for(let k=0;k<h.length;k++)C.header.push({text:h[k],tokens:this.lexer.inline(h[k]),header:!0,align:C.align[k]});for(let k of i)C.rows.push(Q6(k,C.header.length).map((g,w)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:C.align[w]})));return C}}lheading(y){let x=this.rules.block.lheading.exec(y);if(x)return{type:"heading",raw:x[0],depth:x[2].charAt(0)==="="?1:2,text:x[1],tokens:this.lexer.inline(x[1])}}paragraph(y){let x=this.rules.block.paragraph.exec(y);if(x){let h=x[1].charAt(x[1].length-1)===`
42
+ `?x[1].slice(0,-1):x[1];return{type:"paragraph",raw:x[0],text:h,tokens:this.lexer.inline(h)}}}text(y){let x=this.rules.block.text.exec(y);if(x)return{type:"text",raw:x[0],text:x[0],tokens:this.lexer.inline(x[0])}}escape(y){let x=this.rules.inline.escape.exec(y);if(x)return{type:"escape",raw:x[0],text:x[1]}}tag(y){let x=this.rules.inline.tag.exec(y);if(x)return!this.lexer.state.inLink&&this.rules.other.startATag.test(x[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(x[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(x[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(x[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:x[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:x[0]}}link(y){let x=this.rules.inline.link.exec(y);if(x){let h=x[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(h)){if(!this.rules.other.endAngleBracket.test(h))return;let C=V0(h.slice(0,-1),"\\");if((h.length-C.length)%2===0)return}else{let C=cl(x[2],"()");if(C===-2)return;if(C>-1){let k=(x[0].indexOf("!")===0?5:4)+x[1].length+C;x[2]=x[2].substring(0,C),x[0]=x[0].substring(0,k).trim(),x[3]=""}}let l=x[2],i="";if(this.options.pedantic){let C=this.rules.other.pedanticHrefTitle.exec(l);C&&(l=C[1],i=C[3])}else i=x[3]?x[3].slice(1,-1):"";return l=l.trim(),this.rules.other.startAngleBracket.test(l)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(h)?l=l.slice(1):l=l.slice(1,-1)),W6(x,{href:l&&l.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},x[0],this.lexer,this.rules)}}reflink(y,x){let h;if((h=this.rules.inline.reflink.exec(y))||(h=this.rules.inline.nolink.exec(y))){let l=(h[2]||h[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=x[l.toLowerCase()];if(!i){let C=h[0].charAt(0);return{type:"text",raw:C,text:C}}return W6(h,i,h[0],this.lexer,this.rules)}}emStrong(y,x,h=""){let l=this.rules.inline.emStrongLDelim.exec(y);if(!l||l[3]&&h.match(this.rules.other.unicodeAlphaNumeric))return;if(!(l[1]||l[2])||!h||this.rules.inline.punctuation.exec(h)){let i=[...l[0]].length-1,C,k,g=i,w=0,B=l[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(B.lastIndex=0,x=x.slice(-1*y.length+i);(l=B.exec(x))!=null;){if(C=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!C)continue;if(k=[...C].length,l[3]||l[4]){g+=k;continue}else if((l[5]||l[6])&&i%3&&!((i+k)%3)){w+=k;continue}if(g-=k,g>0)continue;k=Math.min(k,k+g+w);let j=[...l[0]][0].length,V=y.slice(0,i+l.index+j+k);if(Math.min(i,k)%2){let p=V.slice(1,-1);return{type:"em",raw:V,text:p,tokens:this.lexer.inlineTokens(p)}}let _=V.slice(2,-2);return{type:"strong",raw:V,text:_,tokens:this.lexer.inlineTokens(_)}}}}codespan(y){let x=this.rules.inline.code.exec(y);if(x){let h=x[2].replace(this.rules.other.newLineCharGlobal," "),l=this.rules.other.nonSpaceChar.test(h),i=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return l&&i&&(h=h.substring(1,h.length-1)),{type:"codespan",raw:x[0],text:h}}}br(y){let x=this.rules.inline.br.exec(y);if(x)return{type:"br",raw:x[0]}}del(y){let x=this.rules.inline.del.exec(y);if(x)return{type:"del",raw:x[0],text:x[2],tokens:this.lexer.inlineTokens(x[2])}}autolink(y){let x=this.rules.inline.autolink.exec(y);if(x){let h,l;return x[2]==="@"?(h=x[1],l="mailto:"+h):(h=x[1],l=h),{type:"link",raw:x[0],text:h,href:l,tokens:[{type:"text",raw:h,text:h}]}}}url(y){let x;if(x=this.rules.inline.url.exec(y)){let h,l;if(x[2]==="@")h=x[0],l="mailto:"+h;else{let i;do i=x[0],x[0]=this.rules.inline._backpedal.exec(x[0])?.[0]??"";while(i!==x[0]);h=x[0],x[1]==="www."?l="http://"+x[0]:l=x[0]}return{type:"link",raw:x[0],text:h,href:l,tokens:[{type:"text",raw:h,text:h}]}}}inlineText(y){let x=this.rules.inline.text.exec(y);if(x){let h=this.lexer.state.inRawBlock;return{type:"text",raw:x[0],text:x[0],escaped:h}}}},W1=class y{tokens;options;state;tokenizer;inlineQueue;constructor(x){this.tokens=[],this.tokens.links=Object.create(null),this.options=x||B2,this.options.tokenizer=this.options.tokenizer||new G4,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let h={other:k1,block:_4.normal,inline:q0.normal};this.options.pedantic?(h.block=_4.pedantic,h.inline=q0.pedantic):this.options.gfm&&(h.block=_4.gfm,this.options.breaks?h.inline=q0.breaks:h.inline=q0.gfm),this.tokenizer.rules=h}static get rules(){return{block:_4,inline:q0}}static lex(x,h){return new y(h).lex(x)}static lexInline(x,h){return new y(h).inlineTokens(x)}lex(x){x=x.replace(k1.carriageReturn,`
43
43
  `),this.blockTokens(x,this.tokens);for(let h=0;h<this.inlineQueue.length;h++){let l=this.inlineQueue[h];this.inlineTokens(l.src,l.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(x,h=[],l=!1){for(this.options.pedantic&&(x=x.replace(k1.tabCharGlobal," ").replace(k1.spaceLine,""));x;){let i;if(this.options.extensions?.block?.some((k)=>(i=k.call({lexer:this},x,h))?(x=x.substring(i.raw.length),h.push(i),!0):!1))continue;if(i=this.tokenizer.space(x)){x=x.substring(i.raw.length);let k=h.at(-1);i.raw.length===1&&k!==void 0?k.raw+=`
44
44
  `:h.push(i);continue}if(i=this.tokenizer.code(x)){x=x.substring(i.raw.length);let k=h.at(-1);k?.type==="paragraph"||k?.type==="text"?(k.raw+=(k.raw.endsWith(`
45
45
  `)?"":`
@@ -53,16 +53,16 @@ ${j}`:j;let V=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
53
53
  `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):h.push(i),l=C.length!==x.length,x=x.substring(i.raw.length);continue}if(i=this.tokenizer.text(x)){x=x.substring(i.raw.length);let k=h.at(-1);k?.type==="text"?(k.raw+=(k.raw.endsWith(`
54
54
  `)?"":`
55
55
  `)+i.raw,k.text+=`
56
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):h.push(i);continue}if(x){let k="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw Error(k)}}return this.state.top=!0,h}inline(x,h=[]){return this.inlineQueue.push({src:x,tokens:h}),h}inlineTokens(x,h=[]){let l=x,i=null;if(this.tokens.links){let w=Object.keys(this.tokens.links);if(w.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)w.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,i.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let C;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)C=i[2]?i[2].length:0,l=l.slice(0,i.index+C)+"["+"a".repeat(i[0].length-C-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=this.options.hooks?.emStrongMask?.call({lexer:this},l)??l;let k=!1,g="";for(;x;){k||(g=""),k=!1;let w;if(this.options.extensions?.inline?.some((j)=>(w=j.call({lexer:this},x,h))?(x=x.substring(w.raw.length),h.push(w),!0):!1))continue;if(w=this.tokenizer.escape(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.tag(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.link(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.reflink(x,this.tokens.links)){x=x.substring(w.raw.length);let j=h.at(-1);w.type==="text"&&j?.type==="text"?(j.raw+=w.raw,j.text+=w.text):h.push(w);continue}if(w=this.tokenizer.emStrong(x,l,g)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.codespan(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.br(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.del(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.autolink(x)){x=x.substring(w.raw.length),h.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(x))){x=x.substring(w.raw.length),h.push(w);continue}let B=x;if(this.options.extensions?.startInline){let j=1/0,V=x.slice(1),A;this.options.extensions.startInline.forEach((O)=>{A=O.call({lexer:this},V),typeof A=="number"&&A>=0&&(j=Math.min(j,A))}),j<1/0&&j>=0&&(B=x.substring(0,j+1))}if(w=this.tokenizer.inlineText(B)){x=x.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(g=w.raw.slice(-1)),k=!0;let j=h.at(-1);j?.type==="text"?(j.raw+=w.raw,j.text+=w.text):h.push(w);continue}if(x){let j="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(j);break}else throw Error(j)}}return h}},c2=class{options;parser;constructor(y){this.options=y||B2}space(y){return""}code({text:y,lang:x,escaped:h}){let l=(x||"").match(k1.notSpaceStart)?.[0],i=y.replace(k1.endingNewline,"")+`
57
- `;return l?'<pre><code class="language-'+f1(l)+'">'+(h?i:f1(i,!0))+`</code></pre>
58
- `:"<pre><code>"+(h?i:f1(i,!0))+`</code></pre>
56
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):h.push(i);continue}if(x){let k="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw Error(k)}}return this.state.top=!0,h}inline(x,h=[]){return this.inlineQueue.push({src:x,tokens:h}),h}inlineTokens(x,h=[]){let l=x,i=null;if(this.tokens.links){let w=Object.keys(this.tokens.links);if(w.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)w.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,i.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let C;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)C=i[2]?i[2].length:0,l=l.slice(0,i.index+C)+"["+"a".repeat(i[0].length-C-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=this.options.hooks?.emStrongMask?.call({lexer:this},l)??l;let k=!1,g="";for(;x;){k||(g=""),k=!1;let w;if(this.options.extensions?.inline?.some((j)=>(w=j.call({lexer:this},x,h))?(x=x.substring(w.raw.length),h.push(w),!0):!1))continue;if(w=this.tokenizer.escape(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.tag(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.link(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.reflink(x,this.tokens.links)){x=x.substring(w.raw.length);let j=h.at(-1);w.type==="text"&&j?.type==="text"?(j.raw+=w.raw,j.text+=w.text):h.push(w);continue}if(w=this.tokenizer.emStrong(x,l,g)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.codespan(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.br(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.del(x)){x=x.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.autolink(x)){x=x.substring(w.raw.length),h.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(x))){x=x.substring(w.raw.length),h.push(w);continue}let B=x;if(this.options.extensions?.startInline){let j=1/0,V=x.slice(1),_;this.options.extensions.startInline.forEach((p)=>{_=p.call({lexer:this},V),typeof _=="number"&&_>=0&&(j=Math.min(j,_))}),j<1/0&&j>=0&&(B=x.substring(0,j+1))}if(w=this.tokenizer.inlineText(B)){x=x.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(g=w.raw.slice(-1)),k=!0;let j=h.at(-1);j?.type==="text"?(j.raw+=w.raw,j.text+=w.text):h.push(w);continue}if(x){let j="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(j);break}else throw Error(j)}}return h}},c2=class{options;parser;constructor(y){this.options=y||B2}space(y){return""}code({text:y,lang:x,escaped:h}){let l=(x||"").match(k1.notSpaceStart)?.[0],i=y.replace(k1.endingNewline,"")+`
57
+ `;return l?'<pre><code class="language-'+H1(l)+'">'+(h?i:H1(i,!0))+`</code></pre>
58
+ `:"<pre><code>"+(h?i:H1(i,!0))+`</code></pre>
59
59
  `}blockquote({tokens:y}){return`<blockquote>
60
60
  ${this.parser.parse(y)}</blockquote>
61
61
  `}html({text:y}){return y}def(y){return""}heading({tokens:y,depth:x}){return`<h${x}>${this.parser.parseInline(y)}</h${x}>
62
62
  `}hr(y){return`<hr>
63
63
  `}list(y){let{ordered:x,start:h}=y,l="";for(let k=0;k<y.items.length;k++){let g=y.items[k];l+=this.listitem(g)}let i=x?"ol":"ul",C=x&&h!==1?' start="'+h+'"':"";return"<"+i+C+`>
64
64
  `+l+"</"+i+`>
65
- `}listitem(y){let x="";if(y.task){let h=this.checkbox({checked:!!y.checked});y.loose?y.tokens[0]?.type==="paragraph"?(y.tokens[0].text=h+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=h+" "+f1(y.tokens[0].tokens[0].text),y.tokens[0].tokens[0].escaped=!0)):y.tokens.unshift({type:"text",raw:h+" ",text:h+" ",escaped:!0}):x+=h+" "}return x+=this.parser.parse(y.tokens,!!y.loose),`<li>${x}</li>
65
+ `}listitem(y){let x="";if(y.task){let h=this.checkbox({checked:!!y.checked});y.loose?y.tokens[0]?.type==="paragraph"?(y.tokens[0].text=h+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=h+" "+H1(y.tokens[0].tokens[0].text),y.tokens[0].tokens[0].escaped=!0)):y.tokens.unshift({type:"text",raw:h+" ",text:h+" ",escaped:!0}):x+=h+" "}return x+=this.parser.parse(y.tokens,!!y.loose),`<li>${x}</li>
66
66
  `}checkbox({checked:y}){return"<input "+(y?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:y}){return`<p>${this.parser.parseInline(y)}</p>
67
67
  `}table(y){let x="",h="";for(let i=0;i<y.header.length;i++)h+=this.tablecell(y.header[i]);x+=this.tablerow({text:h});let l="";for(let i=0;i<y.rows.length;i++){let C=y.rows[i];h="";for(let k=0;k<C.length;k++)h+=this.tablecell(C[k]);l+=this.tablerow({text:h})}return l&&(l=`<tbody>${l}</tbody>`),`<table>
68
68
  <thead>
@@ -71,9 +71,9 @@ ${this.parser.parse(y)}</blockquote>
71
71
  `}tablerow({text:y}){return`<tr>
72
72
  ${y}</tr>
73
73
  `}tablecell(y){let x=this.parser.parseInline(y.tokens),h=y.header?"th":"td";return(y.align?`<${h} align="${y.align}">`:`<${h}>`)+x+`</${h}>
74
- `}strong({tokens:y}){return`<strong>${this.parser.parseInline(y)}</strong>`}em({tokens:y}){return`<em>${this.parser.parseInline(y)}</em>`}codespan({text:y}){return`<code>${f1(y,!0)}</code>`}br(y){return"<br>"}del({tokens:y}){return`<del>${this.parser.parseInline(y)}</del>`}link({href:y,title:x,tokens:h}){let l=this.parser.parseInline(h),i=P6(y);if(i===null)return l;y=i;let C='<a href="'+y+'"';return x&&(C+=' title="'+f1(x)+'"'),C+=">"+l+"</a>",C}image({href:y,title:x,text:h,tokens:l}){l&&(h=this.parser.parseInline(l,this.parser.textRenderer));let i=P6(y);if(i===null)return f1(h);y=i;let C=`<img src="${y}" alt="${h}"`;return x&&(C+=` title="${f1(x)}"`),C+=">",C}text(y){return"tokens"in y&&y.tokens?this.parser.parseInline(y.tokens):("escaped"in y)&&y.escaped?y.text:f1(y.text)}},s3=class{strong({text:y}){return y}em({text:y}){return y}codespan({text:y}){return y}del({text:y}){return y}html({text:y}){return y}text({text:y}){return y}link({text:y}){return""+y}image({text:y}){return""+y}br(){return""}},W1=class y{options;renderer;textRenderer;constructor(x){this.options=x||B2,this.options.renderer=this.options.renderer||new c2,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new s3}static parse(x,h){return new y(h).parse(x)}static parseInline(x,h){return new y(h).parseInline(x)}parse(x,h=!0){let l="";for(let i=0;i<x.length;i++){let C=x[i];if(this.options.extensions?.renderers?.[C.type]){let g=C,w=this.options.extensions.renderers[g.type].call({parser:this},g);if(w!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){l+=w||"";continue}}let k=C;switch(k.type){case"space":{l+=this.renderer.space(k);continue}case"hr":{l+=this.renderer.hr(k);continue}case"heading":{l+=this.renderer.heading(k);continue}case"code":{l+=this.renderer.code(k);continue}case"table":{l+=this.renderer.table(k);continue}case"blockquote":{l+=this.renderer.blockquote(k);continue}case"list":{l+=this.renderer.list(k);continue}case"html":{l+=this.renderer.html(k);continue}case"def":{l+=this.renderer.def(k);continue}case"paragraph":{l+=this.renderer.paragraph(k);continue}case"text":{let g=k,w=this.renderer.text(g);for(;i+1<x.length&&x[i+1].type==="text";)g=x[++i],w+=`
75
- `+this.renderer.text(g);h?l+=this.renderer.paragraph({type:"paragraph",raw:w,text:w,tokens:[{type:"text",raw:w,text:w,escaped:!0}]}):l+=w;continue}default:{let g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return l}parseInline(x,h=this.renderer){let l="";for(let i=0;i<x.length;i++){let C=x[i];if(this.options.extensions?.renderers?.[C.type]){let g=this.options.extensions.renderers[C.type].call({parser:this},C);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(C.type)){l+=g||"";continue}}let k=C;switch(k.type){case"escape":{l+=h.text(k);break}case"html":{l+=h.html(k);break}case"link":{l+=h.link(k);break}case"image":{l+=h.image(k);break}case"strong":{l+=h.strong(k);break}case"em":{l+=h.em(k);break}case"codespan":{l+=h.codespan(k);break}case"br":{l+=h.br(k);break}case"del":{l+=h.del(k);break}case"text":{l+=h.text(k);break}default:{let g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return l}},P0=class{options;block;constructor(y){this.options=y||B2}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(y){return y}postprocess(y){return y}processAllTokens(y){return y}emStrongMask(y){return y}provideLexer(){return this.block?Q1.lex:Q1.lexInline}provideParser(){return this.block?W1.parse:W1.parseInline}},Q3=class{defaults=P3();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=W1;Renderer=c2;TextRenderer=s3;Lexer=Q1;Tokenizer=G4;Hooks=P0;constructor(...y){this.use(...y)}walkTokens(y,x){let h=[];for(let l of y)switch(h=h.concat(x.call(this,l)),l.type){case"table":{let i=l;for(let C of i.header)h=h.concat(this.walkTokens(C.tokens,x));for(let C of i.rows)for(let k of C)h=h.concat(this.walkTokens(k.tokens,x));break}case"list":{let i=l;h=h.concat(this.walkTokens(i.items,x));break}default:{let i=l;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach((C)=>{let k=i[C].flat(1/0);h=h.concat(this.walkTokens(k,x))}):i.tokens&&(h=h.concat(this.walkTokens(i.tokens,x)))}}return h}use(...y){let x=this.defaults.extensions||{renderers:{},childTokens:{}};return y.forEach((h)=>{let l={...h};if(l.async=this.defaults.async||l.async||!1,h.extensions&&(h.extensions.forEach((i)=>{if(!i.name)throw Error("extension name required");if("renderer"in i){let C=x.renderers[i.name];C?x.renderers[i.name]=function(...k){let g=i.renderer.apply(this,k);return g===!1&&(g=C.apply(this,k)),g}:x.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let C=x[i.level];C?C.unshift(i.tokenizer):x[i.level]=[i.tokenizer],i.start&&(i.level==="block"?x.startBlock?x.startBlock.push(i.start):x.startBlock=[i.start]:i.level==="inline"&&(x.startInline?x.startInline.push(i.start):x.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(x.childTokens[i.name]=i.childTokens)}),l.extensions=x),h.renderer){let i=this.defaults.renderer||new c2(this.defaults);for(let C in h.renderer){if(!(C in i))throw Error(`renderer '${C}' does not exist`);if(["options","parser"].includes(C))continue;let k=C,g=h.renderer[k],w=i[k];i[k]=(...B)=>{let j=g.apply(i,B);return j===!1&&(j=w.apply(i,B)),j||""}}l.renderer=i}if(h.tokenizer){let i=this.defaults.tokenizer||new G4(this.defaults);for(let C in h.tokenizer){if(!(C in i))throw Error(`tokenizer '${C}' does not exist`);if(["options","rules","lexer"].includes(C))continue;let k=C,g=h.tokenizer[k],w=i[k];i[k]=(...B)=>{let j=g.apply(i,B);return j===!1&&(j=w.apply(i,B)),j}}l.tokenizer=i}if(h.hooks){let i=this.defaults.hooks||new P0;for(let C in h.hooks){if(!(C in i))throw Error(`hook '${C}' does not exist`);if(["options","block"].includes(C))continue;let k=C,g=h.hooks[k],w=i[k];P0.passThroughHooks.has(C)?i[k]=(B)=>{if(this.defaults.async&&P0.passThroughHooksRespectAsync.has(C))return(async()=>{let V=await g.call(i,B);return w.call(i,V)})();let j=g.call(i,B);return w.call(i,j)}:i[k]=(...B)=>{if(this.defaults.async)return(async()=>{let V=await g.apply(i,B);return V===!1&&(V=await w.apply(i,B)),V})();let j=g.apply(i,B);return j===!1&&(j=w.apply(i,B)),j}}l.hooks=i}if(h.walkTokens){let i=this.defaults.walkTokens,C=h.walkTokens;l.walkTokens=function(k){let g=[];return g.push(C.call(this,k)),i&&(g=g.concat(i.call(this,k))),g}}this.defaults={...this.defaults,...l}}),this}setOptions(y){return this.defaults={...this.defaults,...y},this}lexer(y,x){return Q1.lex(y,x??this.defaults)}parser(y,x){return W1.parse(y,x??this.defaults)}parseMarkdown(y){return(x,h)=>{let l={...h},i={...this.defaults,...l},C=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&l.async===!1)return C(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof x>"u"||x===null)return C(Error("marked(): input parameter is undefined or null"));if(typeof x!="string")return C(Error("marked(): input parameter is of type "+Object.prototype.toString.call(x)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=y),i.async)return(async()=>{let k=i.hooks?await i.hooks.preprocess(x):x,g=await(i.hooks?await i.hooks.provideLexer():y?Q1.lex:Q1.lexInline)(k,i),w=i.hooks?await i.hooks.processAllTokens(g):g;i.walkTokens&&await Promise.all(this.walkTokens(w,i.walkTokens));let B=await(i.hooks?await i.hooks.provideParser():y?W1.parse:W1.parseInline)(w,i);return i.hooks?await i.hooks.postprocess(B):B})().catch(C);try{i.hooks&&(x=i.hooks.preprocess(x));let k=(i.hooks?i.hooks.provideLexer():y?Q1.lex:Q1.lexInline)(x,i);i.hooks&&(k=i.hooks.processAllTokens(k)),i.walkTokens&&this.walkTokens(k,i.walkTokens);let g=(i.hooks?i.hooks.provideParser():y?W1.parse:W1.parseInline)(k,i);return i.hooks&&(g=i.hooks.postprocess(g)),g}catch(k){return C(k)}}}onError(y,x){return(h)=>{if(h.message+=`
76
- Please report this to https://github.com/markedjs/marked.`,y){let l="<p>An error occurred:</p><pre>"+f1(h.message+"",!0)+"</pre>";return x?Promise.resolve(l):l}if(x)return Promise.reject(h);throw h}}},w2=new Q3;function c(y,x){return w2.parse(y,x)}c.options=c.setOptions=function(y){return w2.setOptions(y),c.defaults=w2.defaults,G6(c.defaults),c};c.getDefaults=P3;c.defaults=B2;c.use=function(...y){return w2.use(...y),c.defaults=w2.defaults,G6(c.defaults),c};c.walkTokens=function(y,x){return w2.walkTokens(y,x)};c.parseInline=w2.parseInline;c.Parser=W1;c.parser=W1.parse;c.Renderer=c2;c.TextRenderer=s3;c.Lexer=Q1;c.lexer=Q1.lex;c.Tokenizer=G4;c.Hooks=P0;c.parse=c;var{options:rg,setOptions:og,use:Tg,walkTokens:Lg,parseInline:Mg}=c;var ng=W1.parse,ug=Q1.lex;var vl=new c2,N6=new Q3;N6.use({renderer:{code(y){let x=String(y.lang||""),h=x.indexOf("#");if(h===-1)return!1;let l=x.slice(h+1).match(/^[A-Za-z0-9_-]+/)?.[0];if(!l)return!1;return vl.code({...y,lang:x.slice(0,h)}).replace(/^<pre>/,`<pre data-example-id="${l}">`)}}});function G0(y){return N6.parse(y)}var{div:z2,slot:v6,span:Zl,button:$l}=p;class U4 extends K{static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(y,x,h){let l=x.getAttribute("name"),i=x.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?s1(l):Zl(l)),C=z2(i,{part:"tab",tabindex:0,role:"tab",ariaControls:h},x.hasAttribute("data-close")?$l({title:"close",class:"close"},U.x()):{}),k=x.dataset.tooltip;if(k)C.dataset.tooltip=k;return C}static shadowStyleSpec={":host":{"--tosi-tabs-selected-color":"var(--xin-tabs-selected-color, var(--tosi-accent, currentColor))","--tosi-tabs-bar-color":"var(--xin-tabs-bar-color, #ccc)","--tosi-tabs-bar-height":"var(--xin-tabs-bar-height, 2px)",display:"flex",flexDirection:"column",position:"relative",overflow:"hidden",boxShadow:"none !important"},slot:{position:"relative",display:"block",flex:"1",overflow:"hidden",overflowY:"auto"},'slot[name="after-tabs"]':{flex:"0 0 auto"},"::slotted([hidden])":{display:"none !important"},":host::part(tabpanel)":{display:"flex",flexDirection:"column",overflowX:"auto"},":host::part(tabrow)":{display:"flex"},":host .tabs":{display:"flex",userSelect:"none",whiteSpace:"nowrap"},":host .tabs > div":{padding:`${z.spacing50} ${z.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},":host .tabs > [aria-selected]":{"--text-color":z.tosiTabsSelectedColor,color:z.textColor},":host .elastic":{flex:"1"},":host .border":{background:z.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:z.tosiTabsBarHeight,background:z.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:z.spacing50,padding:0},":host button.close > svg":{height:"12px"}};onCloseTab=null;content=[z2({role:"tabpanel",part:"tabpanel"},z2({part:"tabrow"},z2({class:"tabs",part:"tabs"}),z2({class:"elastic"}),v6({name:"after-tabs"})),z2({class:"border"},z2({class:"selected",part:"selected"}))),v6()];addTabBody(y,x=!1){if(!y.hasAttribute("name"))throw console.error("element has no name attribute",y),Error("element has no name attribute");if(this.append(y),this.setupTabs(),x)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(y){y.remove(),this.setupTabs(),this.queueRender()}keyTab=(y)=>{let{tabs:x}=this.parts,h=[...x.children].indexOf(y.target);switch(y.key){case"ArrowLeft":this.value=(h+Number(x.children.length)-1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case"ArrowRight":this.value=(h+1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case" ":this.pickTab(y),y.preventDefault();break;default:}};get bodies(){return[...this.children].filter((y)=>y.hasAttribute("name"))}pickTab=(y)=>{let{tabs:x}=this.parts,h=y.target,l=h.closest("button.close")!==null,i=h.closest(".tabs > div"),C=[...x.children].indexOf(i);if(l){let k=this.bodies[C];if(!this.onCloseTab||this.onCloseTab(k)!==!1)this.removeTabBody(this.bodies[C])}else if(C>-1)this.value=C};setupTabs=()=>{let{tabs:y}=this.parts,x=[...this.children].filter((h)=>!h.hasAttribute("slot")&&h.hasAttribute("name"));if(y.textContent="",this.value>=x.length)this.value=x.length-1;for(let h in x){let l=x[h],i=`${this.instanceId}-${h}`;l.id=i;let C=this.makeTab(this,l,i);y.append(C)}};connectedCallback(){super.connectedCallback();let{tabs:y}=this.parts;y.addEventListener("click",this.pickTab),y.addEventListener("keydown",this.keyTab),this.setupTabs(),J1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),J1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};onResize(){this.queueRender()}render(){let{tabs:y,selected:x}=this.parts,h=this.bodies;for(let l=0;l<h.length;l++){let i=h[l],C=y.children[l],k=this.value===Number(l);if(C.toggleAttribute("aria-selected",k),i.toggleAttribute("hidden",!k),k)x.style.marginLeft=`${C.offsetLeft-y.offsetLeft}px`,x.style.width=`${C.offsetWidth}px`}}}var cl=U4,p0=U4.elementCreator(),Rl=p0,Jl=p0;var j2=(async()=>{}).constructor;function q2(y){return y.replace(/[^a-zA-Z0-9_$]/g,"")}function Y1(y,x){let h=y;for(let i of x){let C=q2(i),k=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");h=h.replace(new RegExp(`import\\s*\\{([^}]*)\\}\\s*from\\s*'${k}'`,"g"),(g,w)=>`const { ${w.replace(/\s+/g," ").trim()} } = ${C}`),h=h.replace(new RegExp(`import\\s*\\*\\s*as\\s+(\\w+)\\s+from\\s*'${k}'`,"g"),(g,w)=>`const ${w} = ${C}`),h=h.replace(new RegExp(`import\\s+(\\w+)\\s+from\\s*'${k}'`,"g"),(g,w)=>`const ${w} = ${C}`)}let l=h.match(/^\s*import\s+['"{*\w][^\n]*/m);if(l)throw Error(`live example: unsupported import \`${l[0].trim()}\` — only imports `+`from the example context (${x.join(", ")}) are supported, in { named }, * as ns, or default form.`);return h}async function R6(y,x,h){let l=Y1(y,Object.keys(x)),i=h(l,{transforms:["typescript"]}).code,C=Object.keys(x).map(q2),k=Object.values(x);await new j2(...C,i)(...k)}var J6="https://cdn.jsdelivr.net/npm/tjs-lang@0.8.2/lang/+esm",fl="https://cdn.jsdelivr.net/npm/tjs-lang@0.8.2/lang/from-ts/+esm";async function Hl(){try{let{tjs:y}=await import("tjs-lang/lang");if(typeof y==="function")return y}catch{}try{let{tjs:y}=await import(J6);if(typeof y==="function")return y}catch{}return null}var bl;async function Dl(){for(let y of[()=>import("tjs-lang/lang"),()=>import(J6)])try{let x=await y();if(typeof x.extractTests==="function"&&typeof x.testUtils==="string")return{extractTests:x.extractTests,testUtils:x.testUtils}}catch{}return null}function f6(){return bl??=Dl()}async function dl(){try{let{fromTS:y}=await import("tjs-lang/lang/from-ts");if(typeof y==="function")return y}catch{}try{let{fromTS:y}=await import(fl);if(typeof y==="function")return y}catch{}return null}var Sl,Il,Z6=new Map,$6=!1,c6=!1;async function K0(y="js"){let x=await(Sl??=Hl());if(!x&&!$6)$6=!0,console.warn("tjs-lang not available — live examples run as raw JavaScript "+"(tjs/TypeScript examples will not transpile). Install with: npm install tjs-lang");let h=y==="ts"?await(Il??=dl()):null;if(y==="ts"&&!h&&!c6)c6=!0,console.warn("tjs-lang/lang/from-ts not available — `ts` examples run as raw JavaScript.");return(l)=>{let i=`${y}\x00${l}`,C=Z6.get(i);if(C)return C;let k;if(!x)k={code:l};else if(y==="ts"){let g=h?h(l,{emitTJS:!0}).code:l;k={code:x(g,{dialect:"tjs",runTests:!1}).code}}else k={code:x(l,{dialect:y,runTests:!1}).code};return Z6.set(i,k),k}}var O4="live-example-payload";function H6(y,x,h){return h!==""?`${y}-${h}`:`${y}-${x}`}function W3(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("live-example: failed to write to localStorage",h)}}function rl(y){if(y===null)return null;try{return JSON.parse(y)}catch{return null}}function b6(y,x,h,l,i){let C=location.href.split("?")[0]+`?${y}=${x}`;W3(h,{remoteKey:l,sentAt:Date.now(),...i}),window.open(C)}var ol=typeof BroadcastChannel<"u";class U0{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(y,x,h){this.storageKey=y,this.remoteKey=x,this.onReceive=h}handlePayload=(y)=>{if(y.sentAt<=this.lastUpdate)return;if(y.remoteKey!==this.remoteKey)return;this.lastUpdate=y.sentAt,this.onReceive(y)};handleMessage=(y)=>{let x=y.data;if(x)this.handlePayload(x)};handlePoll=()=>{let y;try{y=localStorage.getItem(this.storageKey)}catch{return}let x=rl(y);if(x)this.handlePayload(x)};startListening(){if(this.listening)return;if(this.listening=!0,ol)this.channel=new BroadcastChannel(this.storageKey),this.channel.onmessage=this.handleMessage;this.interval=setInterval(this.handlePoll,500)}stopListening(){if(!this.listening)return;if(this.listening=!1,this.channel)this.channel.close(),this.channel=void 0;if(this.interval)clearInterval(this.interval),this.interval=void 0}send(y){let x={remoteKey:this.remoteKey,sentAt:Date.now(),...y};if(W3(this.storageKey,x),this.channel)this.channel.postMessage(x)}sendClose(){let y={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(W3(this.storageKey,y),this.channel)this.channel.postMessage(y)}}var{div:D6}=p;function Tl(y,x){let h=y.customElements;if(!h)return;let l=(C)=>{if(!C||h.get(C))return;let k=customElements.get(C);if(k)try{h.define(C,k)}catch{}};for(let C of Object.values(x))if(C&&typeof C==="object"){for(let k of Object.values(C))if(typeof k==="function"&&"tagName"in k)l(k.tagName)}let i=y.document;if(i){let C=i.querySelectorAll("*");for(let k of C){let g=k.tagName.toLowerCase();if(g.includes("-"))l(g)}}}async function s4(y){let{html:x,css:h,js:l,context:i,transform:C,exampleElement:k,styleElement:g,widgetsElement:w,onError:B}=y,j=D6({class:"preview"});j.innerHTML=x,g.innerText=h;let V=k.querySelector(".preview");if(V)V.replaceWith(j);else k.insertBefore(j,w);let A={preview:j,...i};try{let O=Y1(l,Object.keys(i)),G=C(O,{transforms:["typescript"]}).code,W=Object.keys(A).map(q2),F=Object.values(A);await new j2(...W,G)(...F)}catch(O){if(console.error(O),j.append(D6({class:"preview-error"},String(O.message||O))),B)B(O);else window.alert(`Error: ${O}, the console may have more information…`)}return j}async function Q4(y){let{html:x,css:h,js:l,context:i,transform:C,exampleElement:k,widgetsElement:g,onError:w}=y,B=k.querySelector("iframe.preview-iframe");if(!B){B=document.createElement("iframe"),B.className="preview-iframe",B.style.cssText="width: 100%; height: 100%; border: none;";let G=k.querySelector(".preview");if(G)G.replaceWith(B);else k.insertBefore(B,g)}let j=B.contentDocument;if(!j)return console.error("Could not access iframe document"),null;let V=B.contentWindow;if(i.tosijs)V.tosijs=i.tosijs;if(i["tosijs-ui"])V.tosijsui=i["tosijs-ui"];j.open(),j.write(`<!DOCTYPE html>
74
+ `}strong({tokens:y}){return`<strong>${this.parser.parseInline(y)}</strong>`}em({tokens:y}){return`<em>${this.parser.parseInline(y)}</em>`}codespan({text:y}){return`<code>${H1(y,!0)}</code>`}br(y){return"<br>"}del({tokens:y}){return`<del>${this.parser.parseInline(y)}</del>`}link({href:y,title:x,tokens:h}){let l=this.parser.parseInline(h),i=p6(y);if(i===null)return l;y=i;let C='<a href="'+y+'"';return x&&(C+=' title="'+H1(x)+'"'),C+=">"+l+"</a>",C}image({href:y,title:x,text:h,tokens:l}){l&&(h=this.parser.parseInline(l,this.parser.textRenderer));let i=p6(y);if(i===null)return H1(h);y=i;let C=`<img src="${y}" alt="${h}"`;return x&&(C+=` title="${H1(x)}"`),C+=">",C}text(y){return"tokens"in y&&y.tokens?this.parser.parseInline(y.tokens):("escaped"in y)&&y.escaped?y.text:H1(y.text)}},W3=class{strong({text:y}){return y}em({text:y}){return y}codespan({text:y}){return y}del({text:y}){return y}html({text:y}){return y}text({text:y}){return y}link({text:y}){return""+y}image({text:y}){return""+y}br(){return""}},Y1=class y{options;renderer;textRenderer;constructor(x){this.options=x||B2,this.options.renderer=this.options.renderer||new c2,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new W3}static parse(x,h){return new y(h).parse(x)}static parseInline(x,h){return new y(h).parseInline(x)}parse(x,h=!0){let l="";for(let i=0;i<x.length;i++){let C=x[i];if(this.options.extensions?.renderers?.[C.type]){let g=C,w=this.options.extensions.renderers[g.type].call({parser:this},g);if(w!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){l+=w||"";continue}}let k=C;switch(k.type){case"space":{l+=this.renderer.space(k);continue}case"hr":{l+=this.renderer.hr(k);continue}case"heading":{l+=this.renderer.heading(k);continue}case"code":{l+=this.renderer.code(k);continue}case"table":{l+=this.renderer.table(k);continue}case"blockquote":{l+=this.renderer.blockquote(k);continue}case"list":{l+=this.renderer.list(k);continue}case"html":{l+=this.renderer.html(k);continue}case"def":{l+=this.renderer.def(k);continue}case"paragraph":{l+=this.renderer.paragraph(k);continue}case"text":{let g=k,w=this.renderer.text(g);for(;i+1<x.length&&x[i+1].type==="text";)g=x[++i],w+=`
75
+ `+this.renderer.text(g);h?l+=this.renderer.paragraph({type:"paragraph",raw:w,text:w,tokens:[{type:"text",raw:w,text:w,escaped:!0}]}):l+=w;continue}default:{let g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return l}parseInline(x,h=this.renderer){let l="";for(let i=0;i<x.length;i++){let C=x[i];if(this.options.extensions?.renderers?.[C.type]){let g=this.options.extensions.renderers[C.type].call({parser:this},C);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(C.type)){l+=g||"";continue}}let k=C;switch(k.type){case"escape":{l+=h.text(k);break}case"html":{l+=h.html(k);break}case"link":{l+=h.link(k);break}case"image":{l+=h.image(k);break}case"strong":{l+=h.strong(k);break}case"em":{l+=h.em(k);break}case"codespan":{l+=h.codespan(k);break}case"br":{l+=h.br(k);break}case"del":{l+=h.del(k);break}case"text":{l+=h.text(k);break}default:{let g='Token with "'+k.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw Error(g)}}}return l}},P0=class{options;block;constructor(y){this.options=y||B2}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(y){return y}postprocess(y){return y}processAllTokens(y){return y}emStrongMask(y){return y}provideLexer(){return this.block?W1.lex:W1.lexInline}provideParser(){return this.block?Y1.parse:Y1.parseInline}},Y3=class{defaults=_3();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Y1;Renderer=c2;TextRenderer=W3;Lexer=W1;Tokenizer=G4;Hooks=P0;constructor(...y){this.use(...y)}walkTokens(y,x){let h=[];for(let l of y)switch(h=h.concat(x.call(this,l)),l.type){case"table":{let i=l;for(let C of i.header)h=h.concat(this.walkTokens(C.tokens,x));for(let C of i.rows)for(let k of C)h=h.concat(this.walkTokens(k.tokens,x));break}case"list":{let i=l;h=h.concat(this.walkTokens(i.items,x));break}default:{let i=l;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach((C)=>{let k=i[C].flat(1/0);h=h.concat(this.walkTokens(k,x))}):i.tokens&&(h=h.concat(this.walkTokens(i.tokens,x)))}}return h}use(...y){let x=this.defaults.extensions||{renderers:{},childTokens:{}};return y.forEach((h)=>{let l={...h};if(l.async=this.defaults.async||l.async||!1,h.extensions&&(h.extensions.forEach((i)=>{if(!i.name)throw Error("extension name required");if("renderer"in i){let C=x.renderers[i.name];C?x.renderers[i.name]=function(...k){let g=i.renderer.apply(this,k);return g===!1&&(g=C.apply(this,k)),g}:x.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let C=x[i.level];C?C.unshift(i.tokenizer):x[i.level]=[i.tokenizer],i.start&&(i.level==="block"?x.startBlock?x.startBlock.push(i.start):x.startBlock=[i.start]:i.level==="inline"&&(x.startInline?x.startInline.push(i.start):x.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(x.childTokens[i.name]=i.childTokens)}),l.extensions=x),h.renderer){let i=this.defaults.renderer||new c2(this.defaults);for(let C in h.renderer){if(!(C in i))throw Error(`renderer '${C}' does not exist`);if(["options","parser"].includes(C))continue;let k=C,g=h.renderer[k],w=i[k];i[k]=(...B)=>{let j=g.apply(i,B);return j===!1&&(j=w.apply(i,B)),j||""}}l.renderer=i}if(h.tokenizer){let i=this.defaults.tokenizer||new G4(this.defaults);for(let C in h.tokenizer){if(!(C in i))throw Error(`tokenizer '${C}' does not exist`);if(["options","rules","lexer"].includes(C))continue;let k=C,g=h.tokenizer[k],w=i[k];i[k]=(...B)=>{let j=g.apply(i,B);return j===!1&&(j=w.apply(i,B)),j}}l.tokenizer=i}if(h.hooks){let i=this.defaults.hooks||new P0;for(let C in h.hooks){if(!(C in i))throw Error(`hook '${C}' does not exist`);if(["options","block"].includes(C))continue;let k=C,g=h.hooks[k],w=i[k];P0.passThroughHooks.has(C)?i[k]=(B)=>{if(this.defaults.async&&P0.passThroughHooksRespectAsync.has(C))return(async()=>{let V=await g.call(i,B);return w.call(i,V)})();let j=g.call(i,B);return w.call(i,j)}:i[k]=(...B)=>{if(this.defaults.async)return(async()=>{let V=await g.apply(i,B);return V===!1&&(V=await w.apply(i,B)),V})();let j=g.apply(i,B);return j===!1&&(j=w.apply(i,B)),j}}l.hooks=i}if(h.walkTokens){let i=this.defaults.walkTokens,C=h.walkTokens;l.walkTokens=function(k){let g=[];return g.push(C.call(this,k)),i&&(g=g.concat(i.call(this,k))),g}}this.defaults={...this.defaults,...l}}),this}setOptions(y){return this.defaults={...this.defaults,...y},this}lexer(y,x){return W1.lex(y,x??this.defaults)}parser(y,x){return Y1.parse(y,x??this.defaults)}parseMarkdown(y){return(x,h)=>{let l={...h},i={...this.defaults,...l},C=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&l.async===!1)return C(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof x>"u"||x===null)return C(Error("marked(): input parameter is undefined or null"));if(typeof x!="string")return C(Error("marked(): input parameter is of type "+Object.prototype.toString.call(x)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=y),i.async)return(async()=>{let k=i.hooks?await i.hooks.preprocess(x):x,g=await(i.hooks?await i.hooks.provideLexer():y?W1.lex:W1.lexInline)(k,i),w=i.hooks?await i.hooks.processAllTokens(g):g;i.walkTokens&&await Promise.all(this.walkTokens(w,i.walkTokens));let B=await(i.hooks?await i.hooks.provideParser():y?Y1.parse:Y1.parseInline)(w,i);return i.hooks?await i.hooks.postprocess(B):B})().catch(C);try{i.hooks&&(x=i.hooks.preprocess(x));let k=(i.hooks?i.hooks.provideLexer():y?W1.lex:W1.lexInline)(x,i);i.hooks&&(k=i.hooks.processAllTokens(k)),i.walkTokens&&this.walkTokens(k,i.walkTokens);let g=(i.hooks?i.hooks.provideParser():y?Y1.parse:Y1.parseInline)(k,i);return i.hooks&&(g=i.hooks.postprocess(g)),g}catch(k){return C(k)}}}onError(y,x){return(h)=>{if(h.message+=`
76
+ Please report this to https://github.com/markedjs/marked.`,y){let l="<p>An error occurred:</p><pre>"+H1(h.message+"",!0)+"</pre>";return x?Promise.resolve(l):l}if(x)return Promise.reject(h);throw h}}},w2=new Y3;function c(y,x){return w2.parse(y,x)}c.options=c.setOptions=function(y){return w2.setOptions(y),c.defaults=w2.defaults,Y6(c.defaults),c};c.getDefaults=_3;c.defaults=B2;c.use=function(...y){return w2.use(...y),c.defaults=w2.defaults,Y6(c.defaults),c};c.walkTokens=function(y,x){return w2.walkTokens(y,x)};c.parseInline=w2.parseInline;c.Parser=Y1;c.parser=Y1.parse;c.Renderer=c2;c.TextRenderer=W3;c.Lexer=W1;c.lexer=W1.lex;c.Tokenizer=G4;c.Hooks=P0;c.parse=c;var{options:Lg,setOptions:Mg,use:ng,walkTokens:ug,parseInline:ag}=c;var mg=Y1.parse,tg=W1.lex;var Jl=new c2,H6=new Y3;H6.use({renderer:{code(y){let x=String(y.lang||""),h=x.indexOf("#");if(h===-1)return!1;let l=x.slice(h+1).match(/^[A-Za-z0-9_-]+/)?.[0];if(!l)return!1;return Jl.code({...y,lang:x.slice(0,h)}).replace(/^<pre>/,`<pre data-example-id="${l}">`)}}});function G0(y){return H6.parse(y)}var{div:z2,slot:f6,span:Hl,button:fl}=K;class O4 extends U{static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(y,x,h){let l=x.getAttribute("name"),i=x.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?Q1(l):Hl(l)),C=z2(i,{part:"tab",tabindex:0,role:"tab",ariaControls:h},x.hasAttribute("data-close")?fl({title:"close",class:"close"},O.x()):{}),k=x.dataset.tooltip;if(k)C.dataset.tooltip=k;return C}static shadowStyleSpec={":host":{"--tosi-tabs-selected-color":"var(--xin-tabs-selected-color, var(--tosi-accent, currentColor))","--tosi-tabs-bar-color":"var(--xin-tabs-bar-color, #ccc)","--tosi-tabs-bar-height":"var(--xin-tabs-bar-height, 2px)",display:"flex",flexDirection:"column",position:"relative",overflow:"hidden",boxShadow:"none !important"},slot:{position:"relative",display:"block",flex:"1",overflow:"hidden",overflowY:"auto"},'slot[name="after-tabs"]':{flex:"0 0 auto"},"::slotted([hidden])":{display:"none !important"},":host::part(tabpanel)":{display:"flex",flexDirection:"column",overflowX:"auto"},":host::part(tabrow)":{display:"flex"},":host .tabs":{display:"flex",userSelect:"none",whiteSpace:"nowrap"},":host .tabs > div":{padding:`${z.spacing50} ${z.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},":host .tabs > [aria-selected]":{"--text-color":z.tosiTabsSelectedColor,color:z.textColor},":host .elastic":{flex:"1"},":host .border":{background:z.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:z.tosiTabsBarHeight,background:z.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:z.spacing50,padding:0},":host button.close > svg":{height:"12px"}};onCloseTab=null;content=[z2({role:"tabpanel",part:"tabpanel"},z2({part:"tabrow"},z2({class:"tabs",part:"tabs"}),z2({class:"elastic"}),f6({name:"after-tabs"})),z2({class:"border"},z2({class:"selected",part:"selected"}))),f6()];addTabBody(y,x=!1){if(!y.hasAttribute("name"))throw console.error("element has no name attribute",y),Error("element has no name attribute");if(this.append(y),this.setupTabs(),x)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(y){y.remove(),this.setupTabs(),this.queueRender()}keyTab=(y)=>{let{tabs:x}=this.parts,h=[...x.children].indexOf(y.target);switch(y.key){case"ArrowLeft":this.value=(h+Number(x.children.length)-1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case"ArrowRight":this.value=(h+1)%x.children.length,x.children[this.value].focus(),y.preventDefault();break;case" ":this.pickTab(y),y.preventDefault();break;default:}};get bodies(){return[...this.children].filter((y)=>y.hasAttribute("name"))}pickTab=(y)=>{let{tabs:x}=this.parts,h=y.target,l=h.closest("button.close")!==null,i=h.closest(".tabs > div"),C=[...x.children].indexOf(i);if(l){let k=this.bodies[C];if(!this.onCloseTab||this.onCloseTab(k)!==!1)this.removeTabBody(this.bodies[C])}else if(C>-1)this.value=C};setupTabs=()=>{let{tabs:y}=this.parts,x=[...this.children].filter((h)=>!h.hasAttribute("slot")&&h.hasAttribute("name"));if(y.textContent="",this.value>=x.length)this.value=x.length-1;for(let h in x){let l=x[h],i=`${this.instanceId}-${h}`;l.id=i;let C=this.makeTab(this,l,i);y.append(C)}};connectedCallback(){super.connectedCallback();let{tabs:y}=this.parts;y.addEventListener("click",this.pickTab),y.addEventListener("keydown",this.keyTab),this.setupTabs(),J1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),J1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};onResize(){this.queueRender()}render(){let{tabs:y,selected:x}=this.parts,h=this.bodies;for(let l=0;l<h.length;l++){let i=h[l],C=y.children[l],k=this.value===Number(l);if(C.toggleAttribute("aria-selected",k),i.toggleAttribute("hidden",!k),k)x.style.marginLeft=`${C.offsetLeft-y.offsetLeft}px`,x.style.width=`${C.offsetWidth}px`}}}var Dl=O4,K0=O4.elementCreator(),bl=K0,dl=K0;var j2=(async()=>{}).constructor;function q2(y){return y.replace(/[^a-zA-Z0-9_$]/g,"")}function F1(y,x){let h=y;for(let i of x){let C=q2(i),k=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");h=h.replace(new RegExp(`import\\s*\\{([^}]*)\\}\\s*from\\s*'${k}'`,"g"),(g,w)=>`const { ${w.replace(/\s+/g," ").trim()} } = ${C}`),h=h.replace(new RegExp(`import\\s*\\*\\s*as\\s+(\\w+)\\s+from\\s*'${k}'`,"g"),(g,w)=>`const ${w} = ${C}`),h=h.replace(new RegExp(`import\\s+(\\w+)\\s+from\\s*'${k}'`,"g"),(g,w)=>`const ${w} = ${C}`)}let l=h.match(/^\s*import\s+['"{*\w][^\n]*/m);if(l)throw Error(`live example: unsupported import \`${l[0].trim()}\` — only imports `+`from the example context (${x.join(", ")}) are supported, in { named }, * as ns, or default form.`);return h}async function d6(y,x,h){let l=F1(y,Object.keys(x)),i=(await h(l,{transforms:["typescript"]})).code,C=Object.keys(x).map(q2),k=Object.values(x);await new j2(...C,i)(...k)}var F3="0.8.6";function X3(y){let x=globalThis.__TJS_LOCAL_BASE;return[...typeof x==="string"?[`${x}${y}`]:[],`https://cdn.jsdelivr.net/npm/tjs-lang@${F3}/dist/${y}`,`https://unpkg.com/tjs-lang@${F3}/dist/${y}`,`https://esm.sh/tjs-lang@${F3}/dist/${y}`]}async function s3(y){for(let x of y)try{let h=await import(x);if(h)return h}catch{}return null}async function Sl(){try{let{tjs:x}=await import("tjs-lang/browser");if(typeof x==="function")return x}catch{}let y=await s3(X3("tjs-browser.js"));if(y&&typeof y.tjs==="function")return y.tjs;return null}var Il;async function rl(){let y=[()=>import("tjs-lang/browser"),()=>s3(X3("tjs-browser.js"))];for(let x of y)try{let h=await x();if(h&&typeof h.extractTests==="function"&&typeof h.testUtils==="string")return{extractTests:h.extractTests,testUtils:h.testUtils}}catch{}return null}function S6(){return Il??=rl()}async function Tl(){try{let{fromTS:x}=await import("tjs-lang/browser/from-ts");if(typeof x==="function")return x}catch{}let y=await s3(X3("tjs-browser-from-ts.js"));if(y&&typeof y.fromTS==="function")return y.fromTS;return null}var ol,Ll,p4=new Map,D6=!1,b6=!1;async function U0(y="js"){let x=await(ol??=Sl());if(!x&&!D6)D6=!0,console.warn("tjs-lang not available — live examples run as raw JavaScript "+"(tjs/TypeScript examples will not transpile). Install with: npm install tjs-lang");let h=y==="ts"?await(Ll??=Tl()):null;if(y==="ts"&&!h&&!b6)b6=!0,console.warn("tjs-lang/browser/from-ts not available — `ts` examples run as raw JavaScript.");return(l)=>{let i=`${y}\x00${l}`,C=p4.get(i);if(C)return C;if(!x){let g={code:l};return p4.set(i,g),g}if(y==="ts")return(async()=>{let g=h?(await h(l,{emitTJS:!0})).code:l,w={code:x(g,{dialect:"tjs",runTests:!1}).code};return p4.set(i,w),w})();let k={code:x(l,{dialect:y,runTests:!1}).code};return p4.set(i,k),k}}var Q4="live-example-payload";function I6(y,x,h){return h!==""?`${y}-${h}`:`${y}-${x}`}function N3(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("live-example: failed to write to localStorage",h)}}function Ml(y){if(y===null)return null;try{return JSON.parse(y)}catch{return null}}function r6(y,x,h,l,i,C){let k=new URLSearchParams({[y]:x});if(C?.sourceFile&&C.ordinal!=null)k.set("sf",C.sourceFile),k.set("ord",C.ordinal);let g=location.href.split("?")[0]+"?"+k.toString();N3(h,{remoteKey:l,sentAt:Date.now(),...i,original:C?.original}),window.open(g)}var nl=typeof BroadcastChannel<"u";class O0{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(y,x,h){this.storageKey=y,this.remoteKey=x,this.onReceive=h}handlePayload=(y)=>{if(y.sentAt<=this.lastUpdate)return;if(y.remoteKey!==this.remoteKey)return;this.lastUpdate=y.sentAt,this.onReceive(y)};handleMessage=(y)=>{let x=y.data;if(x)this.handlePayload(x)};handlePoll=()=>{let y;try{y=localStorage.getItem(this.storageKey)}catch{return}let x=Ml(y);if(x)this.handlePayload(x)};startListening(){if(this.listening)return;if(this.listening=!0,nl)this.channel=new BroadcastChannel(this.storageKey),this.channel.onmessage=this.handleMessage;this.interval=setInterval(this.handlePoll,500)}stopListening(){if(!this.listening)return;if(this.listening=!1,this.channel)this.channel.close(),this.channel=void 0;if(this.interval)clearInterval(this.interval),this.interval=void 0}send(y){let x={remoteKey:this.remoteKey,sentAt:Date.now(),...y};if(N3(this.storageKey,x),this.channel)this.channel.postMessage(x)}sendClose(){let y={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(N3(this.storageKey,y),this.channel)this.channel.postMessage(y)}}var{div:T6}=K;function ul(y,x){let h=y.customElements;if(!h)return;let l=(C)=>{if(!C||h.get(C))return;let k=customElements.get(C);if(k)try{h.define(C,k)}catch{}};for(let C of Object.values(x))if(C&&typeof C==="object"){for(let k of Object.values(C))if(typeof k==="function"&&"tagName"in k)l(k.tagName)}let i=y.document;if(i){let C=i.querySelectorAll("*");for(let k of C){let g=k.tagName.toLowerCase();if(g.includes("-"))l(g)}}}async function W4(y){let{html:x,css:h,js:l,context:i,transform:C,exampleElement:k,styleElement:g,widgetsElement:w,onError:B}=y,j=T6({class:"preview"});j.innerHTML=x,g.innerText=h;let V=k.querySelector(".preview");if(V)V.replaceWith(j);else k.insertBefore(j,w);let _={preview:j,...i};try{let p=F1(l,Object.keys(i)),G=(await C(p,{transforms:["typescript"]})).code,Y=Object.keys(_).map(q2),X=Object.values(_);await new j2(...Y,G)(...X)}catch(p){if(console.error(p),j.append(T6({class:"preview-error"},String(p.message||p))),B)B(p);else window.alert(`Error: ${p}, the console may have more information…`)}return j}async function Y4(y){let{html:x,css:h,js:l,context:i,transform:C,exampleElement:k,widgetsElement:g,onError:w}=y,B=k.querySelector("iframe.preview-iframe");if(!B){B=document.createElement("iframe"),B.className="preview-iframe",B.style.cssText="width: 100%; height: 100%; border: none;";let G=k.querySelector(".preview");if(G)G.replaceWith(B);else k.insertBefore(B,g)}let j=B.contentDocument;if(!j)return console.error("Could not access iframe document"),null;let V=B.contentWindow;if(i.tosijs)V.tosijs=i.tosijs;if(i["tosijs-ui"])V.tosijsui=i["tosijs-ui"];j.open(),j.write(`<!DOCTYPE html>
77
77
  <html>
78
78
  <head>
79
79
  <style>
@@ -85,20 +85,24 @@ Please report this to https://github.com/markedjs/marked.`,y){let l="<p>An error
85
85
  <body>
86
86
  <div class="preview">${x}</div>
87
87
  </body>
88
- </html>`),j.close(),Tl(V,i);let A=j.querySelector(".preview");if(!A)return console.error("Could not find preview element in iframe"),null;let O={preview:A,...i};try{let G=Y1(l,Object.keys(i)),W=C(G,{transforms:["typescript"]}).code,F=V.eval("(async () => {}).constructor"),Y=Object.keys(O).map(q2),$=Object.values(O);await new F(...Y,W)(...$)}catch(G){console.error(G);let W=j.createElement("div");if(W.className="preview-error",W.textContent=String(G.message||G),A.append(W),w)w(G);else window.alert(`Error: ${G}, the console may have more information…`)}return A}function W4(y,x,h,l,i){let C=[...y.querySelectorAll(".language-html,.language-js,.language-tjs,.language-ts,.language-css,.language-test")].filter((g)=>!g.closest(l)).map((g)=>({block:g.parentElement,language:g.classList[0].split("-").pop(),code:g.innerText})),k=0;for(let g=0;g<C.length;g+=1){let w=[C[g]];while(g<C.length-1&&C[g].block.nextElementSibling===C[g+1].block)w.push(C[g+1]),g+=1;let B=h({context:x});if(i!==void 0)B.setAttribute("data-source-file",i),B.setAttribute("data-example-ordinal",String(k));let j=w.map((A)=>A.block.getAttribute("data-example-id")).find((A)=>!!A);B.id=j||`example-${k+1}`,k+=1,w[0].block.parentElement.insertBefore(B,w[0].block),w.forEach((A)=>{switch(A.language){case"js":case"tjs":case"ts":B.js=A.code,B.dialect=A.language;break;case"html":B.html=A.code;break;case"css":B.css=A.code;break;case"test":B.test=A.code;break}A.block.remove()}),B.showDefaultTab(),B.snapshotAndRestoreLocalEdit()}}var Ll=new Set(["js","tjs","ts"]),d6=new Set(["js","tjs","ts","html","css","test"]);function Ml(y){let x=/```([\w-]*)[^\n]*\n([\s\S]*?)\n```/g,h=[],l;while((l=x.exec(y))!==null){let i=l.index+l[0].indexOf(`
89
- `)+1;h.push({lang:l[1]||"",start:l.index,end:l.index+l[0].length,codeStart:i,codeEnd:i+l[2].length})}return h}function nl(y,x){let h=[],l=null;for(let i=0;i<x.length;i+=1){let C=x[i];if(!d6.has(C.lang)){l=null;continue}let k=x[i-1];if(l!==null&&k!==void 0&&d6.has(k.lang)&&y.slice(k.end,C.start).trim()===""&&l)l.push(C);else l=[C],h.push(l)}return h}function S6(y,x,h){let l=nl(y,Ml(y))[x];if(!l)return null;let i=(w)=>w.replace(/\s+$/,""),C=[],k=(w)=>w==="js"?l.find((B)=>Ll.has(B.lang)):l.find((B)=>B.lang===w);for(let w of["js","html","css","test"]){let B=h[w];if(B===void 0)continue;let j=k(w);if(!j)continue;let V=y.slice(j.codeStart,j.codeEnd);if(i(V)===i(B))continue;C.push({start:j.codeStart,end:j.codeEnd,text:B})}if(C.length===0)return null;C.sort((w,B)=>B.start-w.start);let g=y;for(let w of C)g=g.slice(0,w.start)+w.text+g.slice(w.end);return g}function I6(y,x){return`tosi-example-edit:${y}#${x}`}function r6(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("example-store: save failed",h)}}function o6(y){try{let x=localStorage.getItem(y);return x?JSON.parse(x):null}catch{return null}}function T6(y){try{localStorage.removeItem(y)}catch{}}function L6(y){try{return localStorage.getItem(y)!==null}catch{return!1}}var M6={":host":{"--tosi-example-height":"320px","--code-editors-bar-bg":"#777","--code-editors-bar-color":"#fff","--widget-bg":"#fff8","--widget-color":"#000",position:"relative",display:"flex",height:"var(--tosi-example-height)",background:"var(--background)",boxSizing:"border-box"},':host.-locally-edited [part="exampleWidgets"]':{outline:"2px solid var(--brand-color, #da1167)",outlineOffset:"1px",borderRadius:"4px"},":host.-maximize":{position:"fixed",left:"0",top:"0",height:"100vh",width:"100vw",margin:"0 !important"},".-maximize":{zIndex:101},":host.-vertical":{flexDirection:"column"},":host .layout-indicator":{transition:"0.5s ease-out",transform:"rotateZ(270deg)"},":host.-vertical .layout-indicator":{transform:"rotateZ(180deg)"},":host.-maximize .hide-if-maximized, :host:not(.-maximize) .show-if-maximized":{display:"none"},':host [part="example"]':{flex:"1 1 50%",height:"100%",position:"relative",overflowX:"auto"},":host .preview":{height:"100%",position:"relative",overflow:"hidden",boxShadow:"inset 0 0 0 2px #8883"},":host .preview-error":{padding:"8px 12px",margin:"8px",background:"#fee",color:"#900",borderRadius:"4px",fontSize:"13px",fontFamily:"system-ui, sans-serif",whiteSpace:"pre-wrap"},':host [part="editors"]':{flex:"1 1 200px",height:"100%",position:"relative"},':host [part="exampleWidgets"]':{position:"absolute",left:"5px",bottom:"5px","--widget-color":"var(--brand-color)",borderRadius:"5px",width:"44px",height:"44px",lineHeight:"44px",zIndex:"100"},':host [part="exampleWidgets"] svg':{stroke:"var(--widget-color)"},":host .code-editors":{overflow:"hidden",background:"white",position:"relative",top:"0",right:"0",flex:"1 1 50%",height:"100%",flexDirection:"column",zIndex:"10"},":host .code-editors:not([hidden])":{display:"flex"},":host .code-editors > h4":{padding:"5px",margin:"0",textAlign:"center",background:"var(--code-editors-bar-bg)",color:"var(--code-editors-bar-color)",cursor:"move"},":host button.transparent, :host .sizer":{width:"32px",height:"32px",lineHeight:"32px",textAlign:"center",padding:"0",margin:"0"},":host .sizer":{cursor:"nwse-resize"},':host [part="testIndicator"]':{position:"absolute",top:"8px",right:"8px",width:"12px",height:"12px",borderRadius:"50%",background:"#888",zIndex:"100",display:"none"},':host.-has-tests [part="testIndicator"]':{display:"block",opacity:"var(--tests-enabled, 1)"},':host.-test-running [part="testIndicator"]':{background:"#fa0",animation:"test-pulse 0.5s ease-in-out infinite"},':host.-test-passed [part="testIndicator"]':{background:"#0a0",animation:"test-fade 2s ease-out forwards"},':host.-test-failed [part="testIndicator"]':{background:"#c00",animation:"test-pulse 1s ease-in-out infinite"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.4"}},"@keyframes test-fade":{"0%":{opacity:"1"},"50%":{opacity:"1"},"100%":{opacity:"0"}},':host.-test-passed [part="exampleWidgets"]':{"--widget-color":"#0a0"},':host.-test-failed [part="exampleWidgets"]':{"--widget-color":"#f00"},':host [part="testResults"]':{position:"absolute",bottom:"54px",left:"5px",background:"var(--widget-bg)",borderRadius:"5px",padding:"8px",fontSize:"14px",margin:"0",maxWidth:"400px",maxHeight:"200px",overflow:"auto",zIndex:"100"},':host [part="testResults"][hidden]':{display:"none"},":host .test-pass":{color:"#0a0"},":host .test-fail":{color:"#f00"},":host .tjs-test-results":{padding:"8px 12px",fontSize:"14px",fontFamily:"var(--mono-font, monospace)",overflow:"auto",lineHeight:"1.6"},":host .tjs-test-summary":{fontWeight:"bold",marginBottom:"6px"},":host .tjs-test-empty":{opacity:"0.6"},":host .tjs-test-error":{opacity:"0.7"}};class Y3 extends Error{constructor(y){super(y);this.name="AssertionError"}}var ul=/\/(index|module|iife|module\.debug|module\.safe)\.js$/;function al(y){if(!y)return null;for(let x of y.split(`
90
- `)){let h=x.trim();if(!h)continue;if(/^\w*Error[:\s]/.test(h))continue;let l=h.match(/[(@\s]([^()\s]+):(\d+):(\d+)\)?$/);if(!l)continue;let[,i,C,k]=l;if(ul.test(i))continue;return{url:i,line:Number(C),col:Number(k)}}return null}var Y4=null;function ml(y){if(!Y4||y<1)return null;return Y4.split(`
91
- `)[y-1]?.trim()||null}function n6(y,x){if(y===x)return!0;if(typeof y!==typeof x)return!1;if(y===null||x===null)return y===x;if(typeof y!=="object")return!1;let h=y,l=x;if(Array.isArray(h)!==Array.isArray(l))return!1;let i=Object.keys(h),C=Object.keys(l);if(i.length!==C.length)return!1;return i.every((k)=>n6(h[k],l[k]))}var tl=5000,El={stringify(y){if(typeof y>"u")return"undefined";if(y===null)return"null";if(typeof Element<"u"&&y instanceof Element)return`<${y.tagName.toLowerCase()}>`;if(typeof Node<"u"&&y instanceof Node)return`[${y.nodeName}]`;try{return JSON.stringify(y)}catch{return String(y)}}},{stringify:H1}=El;function u6(y,x=!1){let h=(i,C)=>{if(!(x?!i:i)){let g=new Y3(x?`not: ${C}`:C),w=al(g.stack);if(w){let B=ml(w.line),j=`line ${w.line}`;g.message=B?`${g.message} | ${B} (${j})`:`${g.message} (${j})`}throw g}};return{toBe(i){h(y===i,`Expected ${H1(y)} to be ${H1(i)}`)},toEqual(i){h(n6(y,i),`Expected ${H1(y)} to equal ${H1(i)}`)},toBeTruthy(){h(!!y,`Expected ${H1(y)} to be truthy`)},toBeFalsy(){h(!y,`Expected ${H1(y)} to be falsy`)},toBeNull(){h(y===null,`Expected ${H1(y)} to be null`)},toBeUndefined(){h(y===void 0,`Expected ${H1(y)} to be undefined`)},toBeDefined(){h(y!==void 0,`Expected ${H1(y)} to be defined`)},toContain(i){if(typeof y==="string")h(y.includes(i),`Expected "${y}" to contain "${i}"`);else if(Array.isArray(y))h(y.includes(i),`Expected array to contain ${H1(i)}`);else throw new Y3("toContain requires string or array")},toHaveLength(i){let C=y.length;h(C===i,`Expected length ${C} to be ${i}`)},toMatch(i){h(i.test(y),`Expected "${y}" to match ${i}`)},toBeGreaterThan(i){h(y>i,`Expected ${y} to be greater than ${i}`)},toBeLessThan(i){h(y<i,`Expected ${y} to be less than ${i}`)},toBeInstanceOf(i){h(y instanceof i,`Expected value to be instance of ${i.name}`)},get not(){return u6(y,!x)}}}function F3(y){return u6(y)}function el(y){return new Promise((x)=>setTimeout(x,y))}function yi(y,x,h=1000){return new Promise((l,i)=>{let C=Date.now(),k=()=>{let g=y.querySelector(x);if(g){l(g);return}if(Date.now()-C>=h){i(Error(`Timeout waiting for "${x}" after ${h}ms`));return}requestAnimationFrame(k)};k()})}function xi(y,x,h){return Promise.race([y,new Promise((l,i)=>setTimeout(()=>i(Error(`Test "${h}" timed out after ${x}ms`)),x))])}function X3(y,x=tl){let h="",l=[];return{pending:l,expect:F3,test(i,C){let k=h?`${h} > ${i}`:i;try{let g=C();if(g instanceof Promise){let w=xi(g,x,k).then(()=>{y.push({name:k,passed:!0})}).catch((B)=>{y.push({name:k,passed:!1,error:B.message})});l.push(w)}else y.push({name:k,passed:!0})}catch(g){y.push({name:k,passed:!1,error:g.message})}},describe(i,C){let k=h;h=h?`${h} > ${i}`:i,C(),h=k}}}async function F4(y,x,h,l){let i=[],C=X3(i),k={preview:x,...h,expect:C.expect,test:C.test,describe:C.describe,waitMs:el,waitFor:(g,w)=>yi(x,g,w)};try{let g=Y1(y,Object.keys(h)),w=l(g,{transforms:["typescript"]}).code,B=Object.keys(k).map((O)=>O.replace(/-/g,"")),j=Object.values(k),V=`${w}
92
- //# sourceURL=inline-test`;Y4=w,await new j2(...B,V)(...j)}catch(g){i.push({name:"Test execution",passed:!1,error:g.message})}if(C.pending.length>0)await Promise.all(C.pending);return Y4=null,{passed:i.filter((g)=>g.passed).length,failed:i.filter((g)=>!g.passed).length,tests:i}}var{div:F1,tosiSlot:hi,style:li,button:O0,pre:a6,span:N3}=p,v3="tosijs-ui-tests-enabled",t6=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function ii(){if(typeof localStorage>"u")return!1;let y=localStorage.getItem(v3);if(y!==null)return y==="true";return t6}var{testManager:K1}=e({testManager:{enabled:ii()}});function X4(){document.body.classList.toggle("tests-enabled",K1.enabled.value),document.body.style.setProperty("--tests-enabled",K1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)X4();else document.addEventListener("DOMContentLoaded",X4);function Z3(){localStorage.setItem(v3,"true"),K1.enabled.value=!0,X4(),document.querySelectorAll("tosi-example").forEach((y)=>{y.refresh()})}function $3(){localStorage.setItem(v3,"false"),K1.enabled.value=!1,X4()}class e1 extends K{static preferredTagName="tosi-example";static lightStyleSpec=M6;static initAttributes={persistToDom:!1,iframe:!1};prefix="lx";storageKey=O4;context={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;static insertExamples(y,x={},h){W4(y,x,N4,e1.tagName,h)}get activeTab(){let{editors:y}=this.parts;return[...y.children].find((x)=>x.getAttribute("hidden")===null)}get hydrated(){try{return this.parts.js!==void 0}catch{return!1}}getEditorValue(y){if(!this.hydrated)return this.pendingValues[y]??"";return this.parts[y].value}setEditorValue(y,x){if(!this.hydrated){this.pendingValues[y]=x;return}let h=this.parts[y];h.value=x}flushPendingValues(){for(let[y,x]of Object.entries(this.pendingValues)){let h=this.parts[y];if(h)h.value=x}if(this.pendingValues={},this.pendingShowDefaultTab)this.pendingShowDefaultTab=!1,this.showDefaultTab()}get css(){return this.getEditorValue("css")}set css(y){this.setEditorValue("css",y)}get html(){return this.getEditorValue("html")}set html(y){this.setEditorValue("html",y)}get js(){return this.getEditorValue("js")}set js(y){this.setEditorValue("js",y)}get test(){return this.getEditorValue("test")}set test(y){this.setEditorValue("test",y)}get remoteKey(){return H6(this.prefix,this.uuid,this.remoteId)}get dialect(){return this.getAttribute("data-dialect")||"js"}set dialect(y){this.setAttribute("data-dialect",y)}jsOutEditor;tjsTestsView;productTabsReady=!1;lastGeneratedJs="";inlineTjsTestCount=0;lastTjsTests;async runInlineTjsTests(y){if(this.dialect==="js"){this.inlineTjsTestCount=0;return}let x=await f6();if(!x){this.inlineTjsTestCount=0;return}let h;try{h=x.extractTests(this.js)}catch{this.inlineTjsTestCount=0;return}if(this.inlineTjsTestCount=h.tests.length,h.tests.length===0){this.lastTjsTests=void 0,this.renderTjsTests();return}try{let i=`${y(Y1(h.code,Object.keys(this.context))).code}
88
+ </html>`),j.close(),ul(V,i);let _=j.querySelector(".preview");if(!_)return console.error("Could not find preview element in iframe"),null;let p={preview:_,...i};try{let G=F1(l,Object.keys(i)),Y=(await C(G,{transforms:["typescript"]})).code,X=V.eval("(async () => {}).constructor"),F=Object.keys(p).map(q2),$=Object.values(p);await new X(...F,Y)(...$)}catch(G){console.error(G);let Y=j.createElement("div");if(Y.className="preview-error",Y.textContent=String(G.message||G),_.append(Y),w)w(G);else window.alert(`Error: ${G}, the console may have more information…`)}return _}function F4(y,x,h,l,i){let C=[...y.querySelectorAll(".language-html,.language-js,.language-tjs,.language-ts,.language-css,.language-test")].filter((g)=>!g.closest(l)).map((g)=>({block:g.parentElement,language:g.classList[0].split("-").pop(),code:g.innerText})),k=0;for(let g=0;g<C.length;g+=1){let w=[C[g]];while(g<C.length-1&&C[g].block.nextElementSibling===C[g+1].block)w.push(C[g+1]),g+=1;let B=h({context:x});if(i!==void 0)B.setAttribute("data-source-file",i),B.setAttribute("data-example-ordinal",String(k));let j=w.map((_)=>_.block.getAttribute("data-example-id")).find((_)=>!!_);B.id=j||`example-${k+1}`,k+=1,w[0].block.parentElement.insertBefore(B,w[0].block),w.forEach((_)=>{switch(_.language){case"js":case"tjs":case"ts":B.js=_.code,B.dialect=_.language;break;case"html":B.html=_.code;break;case"css":B.css=_.code;break;case"test":B.test=_.code;break}_.block.remove()}),B.showDefaultTab(),B.snapshotAndRestoreLocalEdit()}}var al=new Set(["js","tjs","ts"]),o6=new Set(["js","tjs","ts","html","css","test"]);function Z3(y){let x=/^([ \t]*)```([\w-]*)[^\n]*\n([\s\S]*?)\n[ \t]*```/gm,h=[],l;while((l=x.exec(y))!==null){let i=l.index+l[0].indexOf(`
89
+ `)+1;h.push({lang:l[2]||"",indent:l[1],start:l.index,end:l.index+l[0].length,codeStart:i,codeEnd:i+l[3].length})}return h}function ml(y,x){if(!x)return y;return y.split(`
90
+ `).map((h)=>h?x+h:h).join(`
91
+ `)}function tl(y,x){if(!x)return y;return y.split(`
92
+ `).map((h)=>h.startsWith(x)?h.slice(x.length):h).join(`
93
+ `)}function v3(y,x){let h=[],l=null;for(let i=0;i<x.length;i+=1){let C=x[i];if(!o6.has(C.lang)){l=null;continue}let k=x[i-1];if(l!==null&&k!==void 0&&o6.has(k.lang)&&y.slice(k.end,C.start).trim()===""&&l)l.push(C);else l=[C],h.push(l)}return h}function L6(y,x,h){let l=v3(y,Z3(y))[x];if(!l)return null;let i=(w)=>w.replace(/\s+$/,""),C=[],k=(w)=>w==="js"?l.find((B)=>al.has(B.lang)):l.find((B)=>B.lang===w);for(let w of["js","html","css","test"]){let B=h[w];if(B===void 0)continue;let j=k(w);if(!j)continue;let V=y.slice(j.codeStart,j.codeEnd);if(i(tl(V,j.indent))===i(B))continue;C.push({start:j.codeStart,end:j.codeEnd,text:ml(B,j.indent)})}if(C.length===0)return null;C.sort((w,B)=>B.start-w.start);let g=y;for(let w of C)g=g.slice(0,w.start)+w.text+g.slice(w.end);return g}function M6(y,x){return`tosi-example-edit:${y}#${x}`}function n6(y,x){try{localStorage.setItem(y,JSON.stringify(x))}catch(h){console.warn("example-store: save failed",h)}}function u6(y){try{let x=localStorage.getItem(y);return x?JSON.parse(x):null}catch{return null}}function a6(y){try{localStorage.removeItem(y)}catch{}}function m6(y){try{return localStorage.getItem(y)!==null}catch{return!1}}var t6={":host":{"--tosi-example-height":"320px","--code-editors-bar-bg":"#777","--code-editors-bar-color":"#fff","--widget-bg":"#fff8","--widget-color":"#000",position:"relative",display:"flex",height:"var(--tosi-example-height)",background:"var(--background)",boxSizing:"border-box"},':host.-locally-edited [part="exampleWidgets"]':{outline:"2px solid var(--brand-color, #da1167)",outlineOffset:"1px",borderRadius:"4px"},":host.-maximize":{position:"fixed",left:"0",top:"0",height:"100vh",width:"100vw",margin:"0 !important"},".-maximize":{zIndex:101},":host.-vertical":{flexDirection:"column"},":host .layout-indicator":{transition:"0.5s ease-out",transform:"rotateZ(270deg)"},":host.-vertical .layout-indicator":{transform:"rotateZ(180deg)"},":host.-maximize .hide-if-maximized, :host:not(.-maximize) .show-if-maximized":{display:"none"},':host [part="example"]':{flex:"1 1 50%",height:"100%",position:"relative",overflowX:"auto"},":host .preview":{height:"100%",position:"relative",overflow:"hidden",boxShadow:"inset 0 0 0 2px #8883"},":host .preview-error":{padding:"8px 12px",margin:"8px",background:"#fee",color:"#900",borderRadius:"4px",fontSize:"13px",fontFamily:"system-ui, sans-serif",whiteSpace:"pre-wrap"},':host [part="editors"]':{flex:"1 1 200px",height:"100%",position:"relative"},':host [part="exampleWidgets"]':{position:"absolute",left:"5px",bottom:"5px","--widget-color":"var(--brand-color)",borderRadius:"5px",width:"44px",height:"44px",lineHeight:"44px",zIndex:"100"},':host [part="exampleWidgets"] svg':{stroke:"var(--widget-color)"},":host .code-editors":{overflow:"hidden",background:"white",position:"relative",top:"0",right:"0",flex:"1 1 50%",height:"100%",flexDirection:"column",zIndex:"10"},":host .code-editors:not([hidden])":{display:"flex"},":host .code-editors > h4":{padding:"5px",margin:"0",textAlign:"center",background:"var(--code-editors-bar-bg)",color:"var(--code-editors-bar-color)",cursor:"move"},":host button.transparent, :host .sizer":{width:"32px",height:"32px",lineHeight:"32px",textAlign:"center",padding:"0",margin:"0"},":host .sizer":{cursor:"nwse-resize"},':host [part="testIndicator"]':{position:"absolute",top:"8px",right:"8px",width:"12px",height:"12px",borderRadius:"50%",background:"#888",zIndex:"100",display:"none"},':host.-has-tests [part="testIndicator"]':{display:"block",opacity:"var(--tests-enabled, 1)"},':host.-test-running [part="testIndicator"]':{background:"#fa0",animation:"test-pulse 0.5s ease-in-out infinite"},':host.-test-passed [part="testIndicator"]':{background:"#0a0",animation:"test-fade 2s ease-out forwards"},':host.-test-failed [part="testIndicator"]':{background:"#c00",animation:"test-pulse 1s ease-in-out infinite"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.4"}},"@keyframes test-fade":{"0%":{opacity:"1"},"50%":{opacity:"1"},"100%":{opacity:"0"}},':host.-test-passed [part="exampleWidgets"]':{"--widget-color":"#0a0"},':host.-test-failed [part="exampleWidgets"]':{"--widget-color":"#f00"},':host [part="testResults"]':{position:"absolute",bottom:"54px",left:"5px",background:"var(--widget-bg)",borderRadius:"5px",padding:"8px",fontSize:"14px",margin:"0",maxWidth:"400px",maxHeight:"200px",overflow:"auto",zIndex:"100"},':host [part="testResults"][hidden]':{display:"none"},":host .test-pass":{color:"#0a0"},":host .test-fail":{color:"#f00"},":host .tjs-test-results":{padding:"8px 12px",fontSize:"14px",fontFamily:"var(--mono-font, monospace)",overflow:"auto",lineHeight:"1.6"},":host .tjs-test-summary":{fontWeight:"bold",marginBottom:"6px"},":host .tjs-test-empty":{opacity:"0.6"},":host .tjs-test-error":{opacity:"0.7"}};class $3 extends Error{constructor(y){super(y);this.name="AssertionError"}}var El=/\/(index|module|iife|module\.debug|module\.safe)\.js$/;function el(y){if(!y)return null;for(let x of y.split(`
94
+ `)){let h=x.trim();if(!h)continue;if(/^\w*Error[:\s]/.test(h))continue;let l=h.match(/[(@\s]([^()\s]+):(\d+):(\d+)\)?$/);if(!l)continue;let[,i,C,k]=l;if(El.test(i))continue;return{url:i,line:Number(C),col:Number(k)}}return null}var X4=null;function yi(y){if(!X4||y<1)return null;return X4.split(`
95
+ `)[y-1]?.trim()||null}function E6(y,x){if(y===x)return!0;if(typeof y!==typeof x)return!1;if(y===null||x===null)return y===x;if(typeof y!=="object")return!1;let h=y,l=x;if(Array.isArray(h)!==Array.isArray(l))return!1;let i=Object.keys(h),C=Object.keys(l);if(i.length!==C.length)return!1;return i.every((k)=>E6(h[k],l[k]))}var xi=5000,hi={stringify(y){if(typeof y>"u")return"undefined";if(y===null)return"null";if(typeof Element<"u"&&y instanceof Element)return`<${y.tagName.toLowerCase()}>`;if(typeof Node<"u"&&y instanceof Node)return`[${y.nodeName}]`;try{return JSON.stringify(y)}catch{return String(y)}}},{stringify:f1}=hi;function e6(y,x=!1){let h=(i,C)=>{if(!(x?!i:i)){let g=new $3(x?`not: ${C}`:C),w=el(g.stack);if(w){let B=yi(w.line),j=`line ${w.line}`;g.message=B?`${g.message} | ${B} (${j})`:`${g.message} (${j})`}throw g}};return{toBe(i){h(y===i,`Expected ${f1(y)} to be ${f1(i)}`)},toEqual(i){h(E6(y,i),`Expected ${f1(y)} to equal ${f1(i)}`)},toBeTruthy(){h(!!y,`Expected ${f1(y)} to be truthy`)},toBeFalsy(){h(!y,`Expected ${f1(y)} to be falsy`)},toBeNull(){h(y===null,`Expected ${f1(y)} to be null`)},toBeUndefined(){h(y===void 0,`Expected ${f1(y)} to be undefined`)},toBeDefined(){h(y!==void 0,`Expected ${f1(y)} to be defined`)},toContain(i){if(typeof y==="string")h(y.includes(i),`Expected "${y}" to contain "${i}"`);else if(Array.isArray(y))h(y.includes(i),`Expected array to contain ${f1(i)}`);else throw new $3("toContain requires string or array")},toHaveLength(i){let C=y.length;h(C===i,`Expected length ${C} to be ${i}`)},toMatch(i){h(i.test(y),`Expected "${y}" to match ${i}`)},toBeGreaterThan(i){h(y>i,`Expected ${y} to be greater than ${i}`)},toBeLessThan(i){h(y<i,`Expected ${y} to be less than ${i}`)},toBeInstanceOf(i){h(y instanceof i,`Expected value to be instance of ${i.name}`)},get not(){return e6(y,!x)}}}function c3(y){return e6(y)}function li(y){return new Promise((x)=>setTimeout(x,y))}function ii(y,x,h=1000){return new Promise((l,i)=>{let C=Date.now(),k=()=>{let g=y.querySelector(x);if(g){l(g);return}if(Date.now()-C>=h){i(Error(`Timeout waiting for "${x}" after ${h}ms`));return}requestAnimationFrame(k)};k()})}function Ci(y,x,h){return Promise.race([y,new Promise((l,i)=>setTimeout(()=>i(Error(`Test "${h}" timed out after ${x}ms`)),x))])}function R3(y,x=xi){let h="",l=[];return{pending:l,expect:c3,test(i,C){let k=h?`${h} > ${i}`:i;try{let g=C();if(g instanceof Promise){let w=Ci(g,x,k).then(()=>{y.push({name:k,passed:!0})}).catch((B)=>{y.push({name:k,passed:!1,error:B.message})});l.push(w)}else y.push({name:k,passed:!0})}catch(g){y.push({name:k,passed:!1,error:g.message})}},describe(i,C){let k=h;h=h?`${h} > ${i}`:i,C(),h=k}}}async function s4(y,x,h,l){let i=[],C=R3(i),k={preview:x,...h,expect:C.expect,test:C.test,describe:C.describe,waitMs:li,waitFor:(g,w)=>ii(x,g,w)};try{let g=F1(y,Object.keys(h)),w=(await l(g,{transforms:["typescript"]})).code,B=Object.keys(k).map((p)=>p.replace(/-/g,"")),j=Object.values(k),V=`${w}
96
+ //# sourceURL=inline-test`;X4=w,await new j2(...B,V)(...j)}catch(g){i.push({name:"Test execution",passed:!1,error:g.message})}if(C.pending.length>0)await Promise.all(C.pending);return X4=null,{passed:i.filter((g)=>g.passed).length,failed:i.filter((g)=>!g.passed).length,tests:i}}var{div:X1,tosiSlot:ki,style:gi,button:p0,pre:y7,span:J3}=K,f3="tosijs-ui-tests-enabled",h7=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function wi(){if(typeof localStorage>"u")return!1;let y=localStorage.getItem(f3);if(y!==null)return y==="true";return h7}var{testManager:U1}=e({testManager:{enabled:wi()}});function N4(){document.body.classList.toggle("tests-enabled",U1.enabled.value),document.body.style.setProperty("--tests-enabled",U1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)N4();else document.addEventListener("DOMContentLoaded",N4);function D3(){localStorage.setItem(f3,"true"),U1.enabled.value=!0,N4(),document.querySelectorAll("tosi-example").forEach((y)=>{y.refresh()})}function b3(){localStorage.setItem(f3,"false"),U1.enabled.value=!1,N4()}class e1 extends U{static preferredTagName="tosi-example";static lightStyleSpec=t6;static initAttributes={persistToDom:!1,iframe:!1};prefix="lx";storageKey=Q4;context={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;static insertExamples(y,x={},h){F4(y,x,Z4,e1.tagName,h)}get activeTab(){let{editors:y}=this.parts;return[...y.children].find((x)=>x.getAttribute("hidden")===null)}get hydrated(){try{return this.parts.js!==void 0}catch{return!1}}getEditorValue(y){if(!this.hydrated)return this.pendingValues[y]??"";return this.parts[y].value}setEditorValue(y,x){if(!this.hydrated){this.pendingValues[y]=x;return}let h=this.parts[y];h.value=x}flushPendingValues(){for(let[y,x]of Object.entries(this.pendingValues)){let h=this.parts[y];if(h)h.value=x}if(this.pendingValues={},this.pendingShowDefaultTab)this.pendingShowDefaultTab=!1,this.showDefaultTab()}get css(){return this.getEditorValue("css")}set css(y){this.setEditorValue("css",y)}get html(){return this.getEditorValue("html")}set html(y){this.setEditorValue("html",y)}get js(){return this.getEditorValue("js")}set js(y){this.setEditorValue("js",y)}get test(){return this.getEditorValue("test")}set test(y){this.setEditorValue("test",y)}get remoteKey(){return I6(this.prefix,this.uuid,this.remoteId)}get dialect(){return this.getAttribute("data-dialect")||"js"}set dialect(y){this.setAttribute("data-dialect",y)}jsOutEditor;tjsTestsView;productTabsReady=!1;lastGeneratedJs="";inlineTjsTestCount=0;lastTjsTests;async runInlineTjsTests(y){if(this.dialect==="js"){this.inlineTjsTestCount=0;return}let x=await S6();if(!x){this.inlineTjsTestCount=0;return}let h;try{h=x.extractTests(this.js)}catch{this.inlineTjsTestCount=0;return}if(this.inlineTjsTestCount=h.tests.length,h.tests.length===0){this.lastTjsTests=void 0,this.renderTjsTests();return}try{let i=`${(await y(F1(h.code,Object.keys(this.context)))).code}
93
97
  ${x.testUtils}
94
- return ${h.testRunner}`,C={preview:F1({class:"preview"}),...this.context},k=Object.keys(C).map(q2),g=Object.values(C),w=new j2(...k,i);this.lastTjsTests=await w(...g)}catch(l){this.lastTjsTests={passed:0,failed:1,results:[{description:"inline tests failed to run",passed:!1,error:String(l)}]}}this.renderTjsTests()}renderTjsTests(){let y=this.tjsTestsView;if(!y)return;let x=this.lastTjsTests;if(!x||x.results.length===0){y.replaceChildren(F1({class:"tjs-test-empty"},"No inline tjs tests."));return}y.replaceChildren(F1({class:"tjs-test-summary"},`${x.passed}/${x.results.length} passed`),...x.results.map((h)=>F1({class:h.passed?"test-pass":"test-fail"},`${h.passed?"✓":"✗"} ${h.description}`,h.error?N3({class:"tjs-test-error"},` — ${h.error}`):"")))}computeGeneratedJs(y){if(this.dialect==="js")return"";try{return y(Y1(this.js,Object.keys(this.context))).code}catch(x){return`// transpile error:
95
- // ${x.message}`}}ensureProductTabs(){if(this.productTabsReady||this.dialect==="js"||!this.hydrated)return;this.productTabsReady=!0;let{editors:y}=this.parts;if(this.parts.js.setAttribute("name",this.dialect),this.jsOutEditor=T1({name:"JS",mode:"javascript",disabled:!0}),y.append(this.jsOutEditor),this.inlineTjsTestCount>0)this.tjsTestsView=F1({name:"tjs tests",class:"tjs-test-results"}),y.append(this.tjsTestsView);y.setupTabs(),this.jsOutEditor.value=this.lastGeneratedJs,this.renderTjsTests()}updateUndo=()=>{let{activeTab:y}=this,{undo:x,redo:h}=this.parts;if(y instanceof o1&&y.editor!==void 0){let l=y.editor.session.getUndoManager();x.disabled=!l.hasUndo(),h.disabled=!l.hasRedo()}else x.disabled=!0,h.disabled=!0;this.updateEditedIndicator(),this.updateTestResultsVisibility()};updateTestResultsVisibility(){let{testResults:y}=this.parts,x=this.testResults,h=this.activeTab===this.parts.test,l=x&&x.failed>0;y.hidden=!x||x.tests.length===0||!h&&!l}undo=()=>{let{activeTab:y}=this;if(y instanceof o1)y.editor.undo()};redo=()=>{let{activeTab:y}=this;if(y instanceof o1)y.editor.redo()};get isMaximized(){return this.classList.contains("-maximize")}flipLayout=()=>{this.classList.toggle("-vertical")};saveToSource=async()=>{let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");if(!y||x===null){window.alert("No source mapping for this example.");return}let h;try{let i=await fetch(`/__docstore/source?file=${encodeURIComponent(y)}`);if(!i.ok)throw Error(String(i.status));h=await i.text()}catch{window.alert("Source endpoint unavailable — saving to source works in dev only.");return}let l=S6(h,Number(x),{js:this.js,html:this.html,css:this.css,test:this.test});if(l===null){window.alert("Nothing to save (no matching blocks or no changes).");return}try{let i=await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:y,content:l})});if(!i.ok)throw Error(String(i.status));window.alert(`Saved to ${y}`)}catch{window.alert("Save failed.")}};exampleMenu=()=>{let y=K1.enabled.value;L({target:this.parts.exampleWidgets,width:"auto",menuItems:[{icon:"edit2",caption:"view/edit code",action:this.showCode},{icon:"edit",caption:"view/edit code in a new window",action:this.openEditorWindow},null,{icon:this.isMaximized?"minimize":"maximize",caption:this.isMaximized?"restore preview":"maximize preview",action:this.toggleMaximize},null,{icon:y?"check":"",caption:"Run tests",action:()=>{if(y)$3();else Z3()}}]})};handleShortcuts=(y)=>{if(y.metaKey||y.ctrlKey){let x=!1;switch(y.key){case"s":case"r":this.doRefresh(),x=!0;break;case"/":this.flipLayout();break;case"c":if(y.shiftKey)this.copy(),x=!0;break}if(x)y.preventDefault(),y.stopPropagation()}};content=()=>[F1({part:"example"},li({part:"style"}),F1({part:"testIndicator",title:"test status"}),a6({part:"testResults",hidden:!0}),O0({title:"example menu",part:"exampleWidgets",onClick:this.exampleMenu},U.code())),F1({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0},p0({part:"editors",onChange:this.updateUndo},T1({name:"js",mode:"javascript",part:"js"}),T1({name:"html",mode:"html",part:"html"}),T1({name:"css",mode:"css",part:"css"}),T1({name:"DOM tests",mode:"javascript",part:"test"}),F1({slot:"after-tabs",class:"row"},O0({title:"undo",part:"undo",class:"transparent",onClick:this.undo},U.cornerUpLeft()),O0({title:"redo",part:"redo",class:"transparent",onClick:this.redo},U.cornerUpRight()),O0({title:"example menu — refresh, flip, undo, copy, save/revert edits",class:"transparent source-menu",onClick:this.sourceMenu},U.moreVertical()),O0({title:"close code",class:"transparent",onClick:this.closeCode},U.x())))),hi({part:"sources",hidden:!0})];connectedCallback(){super.connectedCallback(),this.flushPendingValues();let{sources:y}=this.parts;this.initFromElements([...y.children]),this.remoteSync=new U0(this.storageKey,this.remoteKey,(h)=>{if(h.close){if(this.remoteId!=="")window.close();else this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0;return}if(this.css=h.css,this.html=h.html,this.js=h.js,h.test)this.test=h.test;this.refresh()}),this.remoteSync.startListening();let x=Math.random()*100;this.undoInterval=setInterval(()=>{if(!document.hidden)this.updateUndo()},250+x),this.beforeUnloadHandler=()=>this.remoteSync?.sendClose(),addEventListener("beforeunload",this.beforeUnloadHandler)}disconnectedCallback(){if(super.disconnectedCallback(),this.remoteSync?.sendClose(),this.remoteSync?.stopListening(),this.undoInterval)clearInterval(this.undoInterval),this.undoInterval=void 0;if(this.beforeUnloadHandler)removeEventListener("beforeunload",this.beforeUnloadHandler),this.beforeUnloadHandler=void 0}exampleMarkdown(){let y=(x,h)=>h!==""?"```"+x+`
96
- `+h.trim()+"\n```\n":"";return y(this.dialect,this.js)+y("html",this.html)+y("css",this.css)+y("test",this.test)}copy=()=>{navigator.clipboard.writeText(this.exampleMarkdown())};downloadExample=()=>{let y=this.getAttribute("data-source-file")||"example",x=this.getAttribute("data-example-ordinal"),h=(y.split("/").pop()||"example").replace(/\.\w+$/,"")+(x!==null?`-example-${x}`:"")+".md",l=URL.createObjectURL(new Blob([this.exampleMarkdown()],{type:"text/markdown"})),i=document.createElement("a");i.href=l,i.download=h,i.click(),setTimeout(()=>URL.revokeObjectURL(l),1000)};originalCode=null;localEditKey(){let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");return y&&x!==null?I6(y,x):""}applyEdit(y){if(y.js!==void 0)this.js=y.js;if(y.html!==void 0)this.html=y.html;if(y.css!==void 0)this.css=y.css;if(y.test!==void 0)this.test=y.test}hasLocalEdits(){if(!this.originalCode)return!1;let y=this.originalCode,x=(h)=>(h??"").replace(/\s+$/,"");return x(this.js)!==x(y.js)||x(this.html)!==x(y.html)||x(this.css)!==x(y.css)||x(this.test)!==x(y.test)}updateEditedIndicator(){this.classList.toggle("-locally-edited",this.hasLocalEdits())}canUndo(){let y=this.activeTab;return y instanceof o1&&y.editor!==void 0&&y.editor.session.getUndoManager().hasUndo()}canRedo(){let y=this.activeTab;return y instanceof o1&&y.editor!==void 0&&y.editor.session.getUndoManager().hasRedo()}saveLocalEdit=()=>{let y=this.localEditKey();if(!y){window.alert("This example has no source mapping to key a local save.");return}r6(y,{js:this.js,html:this.html,css:this.css,test:this.test}),this.updateEditedIndicator()};revertLocalEdit=()=>{let y=this.localEditKey();if(y)T6(y);if(this.originalCode)this.applyEdit(this.originalCode);if(this.viewingChanges)this.viewChanges();this.updateEditedIndicator(),this.refresh()};snapshotAndRestoreLocalEdit=()=>{this.originalCode={js:this.js,html:this.html,css:this.css,test:this.test};let y=this.localEditKey();if(!y||!L6(y))return;let x=o6(y);if(x)this.applyEdit(x),this.updateEditedIndicator(),this.refresh()};viewingChanges=!1;viewChanges=()=>{if(!this.hydrated)return;if(this.viewingChanges=!this.viewingChanges,this.viewingChanges)this.showCode();let y=this.originalCode??{};for(let x of["js","html","css","test"])this.parts[x].original=y[x]??"",this.parts[x].showDiff(this.viewingChanges)};doRefresh=()=>{if(this.remoteId!=="")this.refreshRemote();else this.refresh()};sourceMenu=(y)=>{let x=this.localEditKey(),h=()=>this.hasLocalEdits(),l=this.originalCode!=null;L({target:y.target.closest("button"),width:"auto",menuItems:[{icon:"refreshCw",caption:"Refresh",shortcut:"⌘R",action:this.doRefresh},{icon:"columns",caption:"Flip layout",shortcut:"⌘/",action:this.flipLayout},{icon:"cornerUpLeft",caption:"Undo",shortcut:"⌘Z",action:this.undo,enabled:()=>this.canUndo()},{icon:"cornerUpRight",caption:"Redo",shortcut:"⌘⇧Z",action:this.redo,enabled:()=>this.canRedo()},null,{icon:"copy",caption:"Copy as markdown",shortcut:"⌘⇧C",action:this.copy},{icon:"download",caption:"Download",action:this.downloadExample},null,...l?[this.viewingChanges?{icon:"edit",caption:"Back to editing",action:this.viewChanges}:{icon:"code",caption:"View changes",action:this.viewChanges,enabled:h}]:[],...x?[{icon:"save",caption:"Save changes (local)",action:this.saveLocalEdit,enabled:h}]:[],...x&&t6?[{icon:"upload",caption:"Save to source",action:()=>{this.saveToSource()},enabled:h}]:[],...l?[{icon:"rotateCcw",caption:"Revert to original",action:this.revertLocalEdit,enabled:h}]:[]]})};toggleMaximize=()=>{this.classList.toggle("-maximize")};showCode=()=>{this.classList.add("-maximize"),this.classList.toggle("-vertical",this.offsetHeight>this.offsetWidth),this.parts.codeEditors.hidden=!1,this.ensureProductTabs()};closeCode=()=>{if(this.remoteId!=="")this.remoteSync?.sendClose(),window.close();else this.remoteSync?.sendClose(),this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0};openEditorWindow=()=>{let{css:y,html:x,js:h,test:l}=this;b6(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:y,html:x,js:h,test:l}),this.classList.add("-maximize")};refreshRemote=()=>{this.remoteSync?.send({css:this.css,html:this.html,js:this.js,test:this.test})};updateSources=()=>{if(this.persistToDom){let{sources:y}=this.parts;y.innerText="";for(let x of["js","css","html","test"])if(this[x])y.append(a6({class:`language-${x}`,innerHTML:this[x]}))}};refresh=async()=>{if(this.remoteId!=="")return;let y=await K0(this.dialect),{example:x,style:h,exampleWidgets:l}=this.parts;if(this.dialect!=="js"){if(this.lastGeneratedJs=this.computeGeneratedJs(y),this.jsOutEditor)this.jsOutEditor.value=this.lastGeneratedJs;await this.runInlineTjsTests(y)}let i,C,k=(g)=>{C=g};if(this.iframe)i=await Q4({html:this.html,css:this.css,js:this.js,context:this.context,transform:y,exampleElement:x,widgetsElement:l,onError:k});else i=await s4({html:this.html,css:this.css,js:this.js,context:this.context,transform:y,exampleElement:x,styleElement:h,widgetsElement:l,onError:k});if(this.persistToDom)this.updateSources();if((this.test||C)&&i&&K1.enabled.value){await new Promise((w)=>requestAnimationFrame(w)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed");let g=this.dialect==="js"?y:await K0("js");if(this.testResults=this.test?await F4(this.test,i,this.context,g):{passed:0,failed:0,tests:[]},C)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(C)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:y,testIndicator:x}=this.parts,h=this.testResults;if(!h||h.tests.length===0){y.hidden=!0,this.classList.remove("-test-passed","-test-failed"),x.title="no tests";return}y.innerHTML="";let l=F1({style:{marginBottom:"8px",fontWeight:"bold"}},`${h.passed}/${h.tests.length} tests passed`);y.append(l);for(let i of h.tests){let C=i.passed?"✓":"✗",k=i.passed?"test-pass":"test-fail",g=F1({class:k},N3(C+" "),i.name,i.error?N3({style:{opacity:"0.7"}},` - ${i.error}`):"");y.append(g)}this.classList.toggle("-test-passed",h.failed===0),this.classList.toggle("-test-failed",h.failed>0),x.title=h.failed===0?`${h.passed} tests passed`:`${h.failed}/${h.tests.length} tests failed`,this.updateTestResultsVisibility(),this.dispatchEvent(new CustomEvent("testcomplete",{bubbles:!0,detail:{results:h,element:this}}))}initFromElements(y){for(let x of y){x.hidden=!0;let[h,...l]=x.innerHTML.split(`
98
+ return ${h.testRunner}`,C={preview:X1({class:"preview"}),...this.context},k=Object.keys(C).map(q2),g=Object.values(C),w=new j2(...k,i);this.lastTjsTests=await w(...g)}catch(l){this.lastTjsTests={passed:0,failed:1,results:[{description:"inline tests failed to run",passed:!1,error:String(l)}]}}this.renderTjsTests()}renderTjsTests(){let y=this.tjsTestsView;if(!y)return;let x=this.lastTjsTests;if(!x||x.results.length===0){y.replaceChildren(X1({class:"tjs-test-empty"},"No inline tjs tests."));return}y.replaceChildren(X1({class:"tjs-test-summary"},`${x.passed}/${x.results.length} passed`),...x.results.map((h)=>X1({class:h.passed?"test-pass":"test-fail"},`${h.passed?"✓":"✗"} ${h.description}`,h.error?J3({class:"tjs-test-error"},` — ${h.error}`):"")))}async computeGeneratedJs(y){if(this.dialect==="js")return"";try{return(await y(F1(this.js,Object.keys(this.context)))).code}catch(x){return`// transpile error:
99
+ // ${x.message}`}}ensureProductTabs(){if(this.productTabsReady||this.dialect==="js"||!this.hydrated)return;this.productTabsReady=!0;let{editors:y}=this.parts;if(this.parts.js.setAttribute("name",this.dialect),this.jsOutEditor=o1({name:"JS",mode:"javascript",disabled:!0}),y.append(this.jsOutEditor),this.inlineTjsTestCount>0)this.tjsTestsView=X1({name:"tjs tests",class:"tjs-test-results"}),y.append(this.tjsTestsView);y.setupTabs(),this.jsOutEditor.value=this.lastGeneratedJs,this.renderTjsTests()}updateUndo=()=>{let{activeTab:y}=this,{undo:x,redo:h}=this.parts;if(y instanceof T1&&y.editor!==void 0){let l=y.editor.session.getUndoManager();x.disabled=!l.hasUndo(),h.disabled=!l.hasRedo()}else x.disabled=!0,h.disabled=!0;this.updateEditedIndicator(),this.updateTestResultsVisibility()};updateTestResultsVisibility(){let{testResults:y}=this.parts,x=this.testResults,h=this.activeTab===this.parts.test,l=x&&x.failed>0;y.hidden=!x||x.tests.length===0||!h&&!l}undo=()=>{let{activeTab:y}=this;if(y instanceof T1)y.editor.undo()};redo=()=>{let{activeTab:y}=this;if(y instanceof T1)y.editor.redo()};get isMaximized(){return this.classList.contains("-maximize")}flipLayout=()=>{this.classList.toggle("-vertical")};saveToSource=async()=>{let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");if(!y||x===null){window.alert("No source mapping for this example.");return}let h;try{let i=await fetch(`/__docstore/source?file=${encodeURIComponent(y)}`);if(!i.ok)throw Error(String(i.status));h=await i.text()}catch{window.alert("Source endpoint unavailable — saving to source works in dev only.");return}let l=L6(h,Number(x),{js:this.js,html:this.html,css:this.css,test:this.test});if(l===null){let i=Number(x),C=v3(h,Z3(h));if(i>=C.length)window.alert(`Couldn't locate this example in ${y}: it's example #${i+1} on the page, but a raw scan of the file finds only ${C.length} fenced example group(s). The page↔source ordinals `+"disagree — likely multiple docs in one file, or indented fences. "+"(File a report with the source structure.)");else window.alert("No changes to save.");return}try{let i=await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:y,content:l})});if(!i.ok)throw Error(String(i.status));window.alert(`Saved to ${y}`)}catch{window.alert("Save failed.")}};exampleMenu=()=>{let y=U1.enabled.value;L({target:this.parts.exampleWidgets,width:"auto",menuItems:[{icon:"edit2",caption:"view/edit code",action:this.showCode},{icon:"edit",caption:"view/edit code in a new window",action:this.openEditorWindow},null,{icon:this.isMaximized?"minimize":"maximize",caption:this.isMaximized?"restore preview":"maximize preview",action:this.toggleMaximize},null,{icon:y?"check":"",caption:"Run tests",action:()=>{if(y)b3();else D3()}}]})};handleShortcuts=(y)=>{if(y.metaKey||y.ctrlKey){let x=!1;switch(y.key){case"s":case"r":this.doRefresh(),x=!0;break;case"/":this.flipLayout();break;case"c":if(y.shiftKey)this.copy(),x=!0;break}if(x)y.preventDefault(),y.stopPropagation()}};content=()=>[X1({part:"example"},gi({part:"style"}),X1({part:"testIndicator",title:"test status"}),y7({part:"testResults",hidden:!0}),p0({title:"example menu",part:"exampleWidgets",onClick:this.exampleMenu},O.code())),X1({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0},K0({part:"editors",onChange:this.updateUndo},o1({name:"js",mode:"javascript",part:"js"}),o1({name:"html",mode:"html",part:"html"}),o1({name:"css",mode:"css",part:"css"}),o1({name:"DOM tests",mode:"javascript",part:"test"}),X1({slot:"after-tabs",class:"row"},p0({title:"undo",part:"undo",class:"transparent",onClick:this.undo},O.cornerUpLeft()),p0({title:"redo",part:"redo",class:"transparent",onClick:this.redo},O.cornerUpRight()),p0({title:"example menu — refresh, flip, undo, copy, save/revert edits",class:"transparent source-menu",onClick:this.sourceMenu},O.moreVertical()),p0({title:"close code",class:"transparent",onClick:this.closeCode},O.x())))),ki({part:"sources",hidden:!0})];connectedCallback(){super.connectedCallback(),this.flushPendingValues();let{sources:y}=this.parts;this.initFromElements([...y.children]),this.remoteSync=new O0(this.storageKey,this.remoteKey,(h)=>{if(h.close){if(this.remoteId!=="")window.close();else this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0;return}if(this.css=h.css,this.html=h.html,this.js=h.js,h.test)this.test=h.test;if(this.remoteId!==""&&h.original&&!this.originalCode)this.originalCode={...h.original};this.refresh()}),this.remoteSync.startListening();let x=Math.random()*100;this.undoInterval=setInterval(()=>{if(!document.hidden)this.updateUndo()},250+x),this.beforeUnloadHandler=()=>this.remoteSync?.sendClose(),addEventListener("beforeunload",this.beforeUnloadHandler)}disconnectedCallback(){if(super.disconnectedCallback(),this.remoteSync?.sendClose(),this.remoteSync?.stopListening(),this.undoInterval)clearInterval(this.undoInterval),this.undoInterval=void 0;if(this.beforeUnloadHandler)removeEventListener("beforeunload",this.beforeUnloadHandler),this.beforeUnloadHandler=void 0}exampleMarkdown(){let y=(x,h)=>h!==""?"```"+x+`
100
+ `+h.trim()+"\n```\n":"";return y(this.dialect,this.js)+y("html",this.html)+y("css",this.css)+y("test",this.test)}copy=()=>{navigator.clipboard.writeText(this.exampleMarkdown())};downloadExample=()=>{let y=this.getAttribute("data-source-file")||"example",x=this.getAttribute("data-example-ordinal"),h=(y.split("/").pop()||"example").replace(/\.\w+$/,"")+(x!==null?`-example-${x}`:"")+".md",l=URL.createObjectURL(new Blob([this.exampleMarkdown()],{type:"text/markdown"})),i=document.createElement("a");i.href=l,i.download=h,i.click(),setTimeout(()=>URL.revokeObjectURL(l),1000)};originalCode=null;localEditKey(){let y=this.getAttribute("data-source-file"),x=this.getAttribute("data-example-ordinal");return y&&x!==null?M6(y,x):""}applyEdit(y){if(y.js!==void 0)this.js=y.js;if(y.html!==void 0)this.html=y.html;if(y.css!==void 0)this.css=y.css;if(y.test!==void 0)this.test=y.test}hasLocalEdits(){if(!this.originalCode)return!1;let y=this.originalCode,x=(h)=>(h??"").replace(/\s+$/,"");return x(this.js)!==x(y.js)||x(this.html)!==x(y.html)||x(this.css)!==x(y.css)||x(this.test)!==x(y.test)}updateEditedIndicator(){this.classList.toggle("-locally-edited",this.hasLocalEdits())}canUndo(){let y=this.activeTab;return y instanceof T1&&y.editor!==void 0&&y.editor.session.getUndoManager().hasUndo()}canRedo(){let y=this.activeTab;return y instanceof T1&&y.editor!==void 0&&y.editor.session.getUndoManager().hasRedo()}saveLocalEdit=()=>{let y=this.localEditKey();if(!y){window.alert("This example has no source mapping to key a local save.");return}n6(y,{js:this.js,html:this.html,css:this.css,test:this.test}),this.updateEditedIndicator()};revertLocalEdit=()=>{let y=this.localEditKey();if(y)a6(y);if(this.originalCode)this.applyEdit(this.originalCode);if(this.viewingChanges)this.viewChanges();this.updateEditedIndicator(),this.refresh()};snapshotAndRestoreLocalEdit=()=>{this.originalCode={js:this.js,html:this.html,css:this.css,test:this.test};let y=this.localEditKey();if(!y||!m6(y))return;let x=u6(y);if(x)this.applyEdit(x),this.updateEditedIndicator(),this.refresh()};viewingChanges=!1;viewChanges=()=>{if(!this.hydrated)return;if(this.viewingChanges=!this.viewingChanges,this.viewingChanges)this.showCode();let y=this.originalCode??{};for(let x of["js","html","css","test"])this.parts[x].original=y[x]??"",this.parts[x].showDiff(this.viewingChanges)};doRefresh=()=>{if(this.remoteId!=="")this.refreshRemote();else this.refresh()};sourceMenu=(y)=>{let x=this.localEditKey(),h=()=>this.hasLocalEdits(),l=this.originalCode!=null;L({target:y.target.closest("button"),width:"auto",menuItems:[{icon:"refreshCw",caption:"Refresh",shortcut:"⌘R",action:this.doRefresh},{icon:"columns",caption:"Flip layout",shortcut:"⌘/",action:this.flipLayout},{icon:"cornerUpLeft",caption:"Undo",shortcut:"⌘Z",action:this.undo,enabled:()=>this.canUndo()},{icon:"cornerUpRight",caption:"Redo",shortcut:"⌘⇧Z",action:this.redo,enabled:()=>this.canRedo()},null,{icon:"copy",caption:"Copy as markdown",shortcut:"⌘⇧C",action:this.copy},{icon:"download",caption:"Download",action:this.downloadExample},null,...l?[this.viewingChanges?{icon:"edit",caption:"Back to editing",action:this.viewChanges}:{icon:"code",caption:"View changes",action:this.viewChanges,enabled:h}]:[],...x?[{icon:"save",caption:"Save changes (local)",action:this.saveLocalEdit,enabled:h}]:[],...x&&h7?[{icon:"upload",caption:"Save to source",action:()=>{this.saveToSource()},enabled:h}]:[],...l?[{icon:"rotateCcw",caption:"Revert to original",action:this.revertLocalEdit,enabled:h}]:[]]})};toggleMaximize=()=>{this.classList.toggle("-maximize")};showCode=()=>{this.classList.add("-maximize"),this.classList.toggle("-vertical",this.offsetHeight>this.offsetWidth),this.parts.codeEditors.hidden=!1,this.ensureProductTabs()};closeCode=()=>{if(this.remoteId!=="")this.remoteSync?.sendClose(),window.close();else this.remoteSync?.sendClose(),this.classList.remove("-maximize"),this.parts.codeEditors.hidden=!0};openEditorWindow=()=>{let{css:y,html:x,js:h,test:l}=this;r6(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:y,html:x,js:h,test:l},{sourceFile:this.getAttribute("data-source-file"),ordinal:this.getAttribute("data-example-ordinal"),original:this.originalCode??void 0}),this.classList.add("-maximize"),this.parts.codeEditors.hidden=!0};refreshRemote=()=>{this.remoteSync?.send({css:this.css,html:this.html,js:this.js,test:this.test})};updateSources=()=>{if(this.persistToDom){let{sources:y}=this.parts;y.innerText="";for(let x of["js","css","html","test"])if(this[x])y.append(y7({class:`language-${x}`,innerHTML:this[x]}))}};refresh=async()=>{if(this.remoteId!=="")return;let y=await U0(this.dialect),{example:x,style:h,exampleWidgets:l}=this.parts;if(this.dialect!=="js"){if(this.lastGeneratedJs=await this.computeGeneratedJs(y),this.jsOutEditor)this.jsOutEditor.value=this.lastGeneratedJs;await this.runInlineTjsTests(y)}let i,C,k=(g)=>{C=g};if(this.iframe)i=await Y4({html:this.html,css:this.css,js:this.js,context:this.context,transform:y,exampleElement:x,widgetsElement:l,onError:k});else i=await W4({html:this.html,css:this.css,js:this.js,context:this.context,transform:y,exampleElement:x,styleElement:h,widgetsElement:l,onError:k});if(this.persistToDom)this.updateSources();if((this.test||C)&&i&&U1.enabled.value){await new Promise((w)=>requestAnimationFrame(w)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed");let g=this.dialect==="js"?y:await U0("js");if(this.testResults=this.test?await s4(this.test,i,this.context,g):{passed:0,failed:0,tests:[]},C)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(C)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:y,testIndicator:x}=this.parts,h=this.testResults;if(!h||h.tests.length===0){y.hidden=!0,this.classList.remove("-test-passed","-test-failed"),x.title="no tests";return}y.innerHTML="";let l=X1({style:{marginBottom:"8px",fontWeight:"bold"}},`${h.passed}/${h.tests.length} tests passed`);y.append(l);for(let i of h.tests){let C=i.passed?"✓":"✗",k=i.passed?"test-pass":"test-fail",g=X1({class:k},J3(C+" "),i.name,i.error?J3({style:{opacity:"0.7"}},` - ${i.error}`):"");y.append(g)}this.classList.toggle("-test-passed",h.failed===0),this.classList.toggle("-test-failed",h.failed>0),x.title=h.failed===0?`${h.passed} tests passed`:`${h.failed}/${h.tests.length} tests failed`,this.updateTestResultsVisibility(),this.dispatchEvent(new CustomEvent("testcomplete",{bubbles:!0,detail:{results:h,element:this}}))}initFromElements(y){for(let x of y){x.hidden=!0;let[h,...l]=x.innerHTML.split(`
97
101
  `);if(["js","html","css","test"].includes(h)){let i=l.filter((k)=>k.trim()!=="").map((k)=>k.match(/^\s*/)[0].length).sort()[0],C=(i>0?l.map((k)=>k.substring(i)):l).join(`
98
- `);this.setEditorValue(h,C)}else{let i=["js","html","css","test"].find((C)=>x.matches(`.language-${C}`));if(i)this.setEditorValue(i,i==="html"?x.innerHTML:x.innerText)}}}showDefaultTab(){if(!this.hydrated){this.pendingShowDefaultTab=!0;return}let{editors:y}=this.parts;if(this.js!=="")y.value=0;else if(this.html!=="")y.value=1;else if(this.css!=="")y.value=2;else if(this.test!=="")y.value=3}render(){if(super.render(),this.remoteId!==""){let y=localStorage.getItem(this.storageKey);if(y!==null){let x=JSON.parse(y);if(this.remoteKey!==x.remoteKey)return;if(this.css=x.css,this.html=x.html,this.js=x.js,x.test)this.test=x.test;this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var N4=e1.elementCreator(),Ci=new URL(window.location.href).searchParams,m6=Ci.get("lx");if(m6)document.title+=" [code editor]",document.body.textContent="",document.body.append(N4({remoteId:m6}));var{slot:E6}=p;class V2 extends K{static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[E6({name:"nav",part:"nav"}),E6({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${P.navWidth("50%")} ${P.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:P.margin("0 0 0 -100%"),transition:P.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};onResize=()=>{let{content:y}=this.parts,x=this.offsetParent;if(x===null)return;let h;if(this.compact=x.offsetWidth<this.minSize,[...this.childNodes].find((i)=>i instanceof Element?i.getAttribute("slot")!=="nav":!0)===void 0)h="compact/nav",this.style.setProperty("--nav-width","100%"),this.style.setProperty("--content-width","0%");else if(!this.compact)h="normal",y.classList.add("-tosi-sidenav-visible"),this.style.setProperty("--nav-width",`${this.navSize}px`),this.style.setProperty("--content-width",`calc(100% - ${this.navSize}px)`),this.style.setProperty("--margin","0");else if(y.classList.remove("-tosi-sidenav-visible"),this.style.setProperty("--nav-width","50%"),this.style.setProperty("--content-width","50%"),this.contentVisible)h="compact/content",this.style.setProperty("--margin","0 0 0 -100%");else h="compact/nav",this.style.setProperty("--margin","0 -100% 0 0");if(this.value!==h)this.value=h};observer;connectedCallback(){super.connectedCallback(),this.contentVisible=this.parts.content.childNodes.length===0,globalThis.addEventListener("resize",this.onResize),this.observer=new MutationObserver(this.onResize),this.observer.observe(this,{childList:!0}),this.style.setProperty("--side-nav-transition","0s"),setTimeout(()=>{this.style.removeProperty("--side-nav-transition")},250)}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect()}render(){super.render(),this.onResize()}}var ki=V2,s0=V2.elementCreator(),gi=s0,wi=s0;var{div:Q0,span:W0,a:Y0,header:Bi,button:c3,template:zi,input:ji,h2:qi,details:Vi,summary:Pi,ul:e6,li:y7}=p,R2={pass:P.testColorPass("#0a0"),fail:P.testColorFail("#c00"),running:P.testColorRunning("#fa0")},Ai={".view-source":{opacity:"0.9"},".view-source:hover":{opacity:"1"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.7"}},"@keyframes test-appear":{from:{opacity:"0",transform:"scale(0.8)"},to:{opacity:"1",transform:"scale(1)"}},"@keyframes test-fade":{"0%, 20%":{opacity:"1",transform:"scale(1)"},"70%":{opacity:"1",transform:"scale(1.1)"},"100%":{opacity:"0",transform:"scale(0.9)",pointerEvents:"none"}},"body:not(.tests-enabled) .doc-link::after, body:not(.tests-enabled) .test-widget":{display:"none !important"},".doc-link.-test-passed::after, .doc-link.-test-failed::after":{content:"''",width:z.fontSize50,height:z.fontSize50,borderRadius:"50%",marginLeft:z.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:R2.pass},".doc-link.-test-failed::after":{background:R2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:R2.running,position:"fixed",bottom:z.spacing,right:z.spacing,zIndex:"1000",background:z.testBg,color:"white",gap:z.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:R2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:R2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:R2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:z.testBg,borderRadius:"50%",width:z.lineHeight,height:z.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},"@keyframes example-target-pulse":{from:{boxShadow:`0 0 0 3px ${P.accent("#007aff")}`},to:{boxShadow:"0 0 0 3px transparent"}},".example-target":{animation:"example-target-pulse 1.5s ease-out",borderRadius:z.roundedRadius}};function R3(y){let{docs:x,context:h={},projectName:l="",projectLinks:i={},navSize:C=200,minSize:k=600,routing:g="query",initialRoute:w,onRouteChange:B,navbarLinks:j,contentElement:V}=y,A=g==="memory";for(let q of x)q.testStatus=void 0;let O=g==="query"?{}:$2(x),G=(q)=>O[q]??q,W=(q)=>{for(let _ of x)if(G(_.filename)===q)return _.filename;return""},F=(q)=>g==="query"?`?${q}`:z3(G(q)),Y=()=>{if(A)return w?W(w):"";return g==="path"?j3(document.location.pathname,O):document.location.search!==""?document.location.search.substring(1).split("&")[0]:""},$=(q)=>{let _=q.getAttribute("href")||"";if(_===""||_.startsWith("#"))return null;let s;try{s=new URL(_,document.location.href)}catch{return null}if(s.origin!==document.location.origin)return null;let H=(I)=>x.some((t)=>t.filename===I)?I:null,v=s.search.replace(/^\?/,"");if(v!==""&&!v.includes("=")&&!v.includes("&")){let I=H(decodeURIComponent(v));if(I)return I}if(!A&&g!=="query"){let I=H(j3(s.pathname,O));if(I)return I}return null},R=Y()||x[0]?.filename||"README.md",r=x.find((q)=>q.filename===R)||x[0],{app:N}=e({app:{docs:x,currentDoc:r,compact:!1}}),Z=()=>{},X={},d,S=!1,y1=0,d2=0;if(!A)window.__docTestResults=new Promise((q)=>{d=q});let V9=(q)=>{let _=X[q],s=N.docs.find((H)=>H.filename===q);if(s)s.testStatus=_?_.passed?"passed":"failed":void 0;Z()},I7=()=>{if(d2>=y1&&d){let q={passed:0,failed:0,pages:X};for(let _ of Object.values(X))q.passed+=_.totalPassed,q.failed+=_.totalFailed;if(d(q),d=void 0,P9&&!r2)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)}).catch(()=>{})}},P9=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",r7=(q)=>{let{results:_}=q.detail,s=String(N.currentDoc.filename);X[s]={passed:_.failed===0,tests:[..._.tests],totalPassed:_.passed,totalFailed:_.failed},V9(s)},n4=(q)=>{d2++,I7(),t4()};r1.docLink={toDOM(q,_){q.setAttribute("href",F(_)),q.dataset.filename=_}},r1.current={toDOM(q,_){q.classList.toggle("current",_===q.dataset.filename)}},r1.testStatus={toDOM(q,_){if(q.classList.remove("-test-passed","-test-failed"),_==="passed")q.classList.add("-test-passed");else if(_==="failed")q.classList.add("-test-failed")}};let o7=e2(()=>{let q=u4.value.toLocaleLowerCase();N.docs.forEach((_)=>{_.hidden=!_.title.toLocaleLowerCase().includes(q)&&!_.text.toLocaleLowerCase().includes(q)}),A1(N.docs),Z(!0)}),u4=ji({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:o7});if(!A)window.addEventListener("popstate",()=>{if(D){if(H0()&&!window.confirm("Discard unsaved changes to the source?")){let q=F(String(D.doc.filename));window.history.pushState({href:q},"",q);return}m4()}J0(Y())}),window.addEventListener("beforeunload",(q)=>{if(H0())q.preventDefault(),q.returnValue=""});let S2=[c3({class:"iconic",style:{color:z.linkColor},title:"navigation",bind:{value:N.compact,binding:{toDOM(q,_){q.style.display=_?"":"none",q.nextSibling.style.display=_?"":"none"}}},onClick(){let q=document.querySelector(V2.tagName);q.contentVisible=!q.contentVisible}},U.menu()),W0({style:{flex:"0 0 10px"}})];if(l)S2.push(Y0({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},i.tosijs?U.tosiUi({style:{_xinIconSize:40,marginRight:10}}):W0(),qi(l)));S2.push(W0({class:"elastic"}));let A9=(q)=>{let _=q.icon?U[q.icon]:void 0;return Y0({class:_?"iconic":"",title:q.label,target:"_blank",href:q.href},_?_():q.label)};if(j)j.forEach((q)=>S2.push(A9(q)));else{let q=[[i.tosijs,"tosi","tosijs"],[i.discord,"discord","discord"],[i.blog,"blog","blog"],[i.github,"github","github"],[i.npm,"npm","npmjs"]];for(let[_,s,H]of q)if(_)S2.push(A9({href:_,label:H,icon:s}))}let g1=V||Q0();g1.classList.add("doc-content"),Object.assign(g1.style,{display:"block",maxWidth:"44em",margin:"auto",padding:"0 1em",overflow:"hidden"});let _9=()=>{for(let q of g1.querySelectorAll("a")){let _=$(q);if(_!==null)q.setAttribute("href",F(_)),q.dataset.docLink=_}},T7=()=>{if(A)return;let q=location.hash.replace(/^#/,"");if(!q)return;requestAnimationFrame(()=>{let _=null;try{_=g1.querySelector(`#${CSS.escape(q)}`)}catch{_=null}if(!_)return;_.scrollIntoView({block:"center",behavior:"smooth"}),_.classList.add("example-target"),setTimeout(()=>_&&_.classList.remove("example-target"),1600)})},G9=V!==void 0&&!A,p9=(q)=>{if(G9)G9=!1;else g1.innerHTML=G0(q.text);if(_9(),e1.insertExamples(g1,h,q.path||void 0),T7(),g==="path")document.title=l?`${q.title} — ${l}`:q.title},J0=(q)=>{let _=x.find((s)=>s.filename===q)||x[0];N.currentDoc=_,p9(_),Z(!0)},f0=(q)=>{if(!a7())return;if(A)B?.(G(q));else{let _=F(q);window.history.pushState({href:_},"",_)}J0(q)};g1.addEventListener("click",(q)=>{if(q.defaultPrevented||q.button!==0||q.metaKey||q.ctrlKey||q.shiftKey||q.altKey)return;let _=q.target.closest("a");if(!_||_.target==="_blank"||_.hasAttribute("download"))return;let s=$(_);if(s===null)return;q.preventDefault(),f0(s)});let L7=(q)=>q.endsWith(".md")?"markdown":q.endsWith(".css")?"css":q.endsWith(".ts")||q.endsWith(".tjs")?"typescript":"javascript",M7=(q,_)=>{if(_.endsWith(".md"))return q;return(q.match(/\/\*#[\s\S]+?\*\//g)||[]).map((H)=>H.substring(3,H.length-2).trim()).join(`
102
+ `);this.setEditorValue(h,C)}else{let i=["js","html","css","test"].find((C)=>x.matches(`.language-${C}`));if(i)this.setEditorValue(i,i==="html"?x.innerHTML:x.innerText)}}}showDefaultTab(){if(!this.hydrated){this.pendingShowDefaultTab=!0;return}let{editors:y}=this.parts;if(this.js!=="")y.value=0;else if(this.html!=="")y.value=1;else if(this.css!=="")y.value=2;else if(this.test!=="")y.value=3}render(){if(super.render(),this.remoteId!==""){let y=localStorage.getItem(this.storageKey);if(y!==null){let x=JSON.parse(y);if(this.remoteKey!==x.remoteKey)return;if(this.css=x.css,this.html=x.html,this.js=x.js,x.test)this.test=x.test;this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var Z4=e1.elementCreator(),H3=new URL(window.location.href).searchParams,x7=H3.get("lx");if(x7){document.title+=" [code editor]",document.body.textContent="";let y=Z4({remoteId:x7}),x=H3.get("sf"),h=H3.get("ord");if(x&&h!==null)y.setAttribute("data-source-file",x),y.setAttribute("data-example-ordinal",h);document.body.append(y)}var{slot:l7}=K;class V2 extends U{static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[l7({name:"nav",part:"nav"}),l7({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${P.navWidth("50%")} ${P.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:P.margin("0 0 0 -100%"),transition:P.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};onResize=()=>{let{content:y}=this.parts,x=this.offsetParent;if(x===null)return;let h;if(this.compact=x.offsetWidth<this.minSize,[...this.childNodes].find((i)=>i instanceof Element?i.getAttribute("slot")!=="nav":!0)===void 0)h="compact/nav",this.style.setProperty("--nav-width","100%"),this.style.setProperty("--content-width","0%");else if(!this.compact)h="normal",y.classList.add("-tosi-sidenav-visible"),this.style.setProperty("--nav-width",`${this.navSize}px`),this.style.setProperty("--content-width",`calc(100% - ${this.navSize}px)`),this.style.setProperty("--margin","0");else if(y.classList.remove("-tosi-sidenav-visible"),this.style.setProperty("--nav-width","50%"),this.style.setProperty("--content-width","50%"),this.contentVisible)h="compact/content",this.style.setProperty("--margin","0 0 0 -100%");else h="compact/nav",this.style.setProperty("--margin","0 -100% 0 0");if(this.value!==h)this.value=h};observer;connectedCallback(){super.connectedCallback(),this.contentVisible=this.parts.content.childNodes.length===0,globalThis.addEventListener("resize",this.onResize),this.observer=new MutationObserver(this.onResize),this.observer.observe(this,{childList:!0}),this.style.setProperty("--side-nav-transition","0s"),setTimeout(()=>{this.style.removeProperty("--side-nav-transition")},250)}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect()}render(){super.render(),this.onResize()}}var Bi=V2,Q0=V2.elementCreator(),zi=Q0,ji=Q0;var{div:W0,span:Y0,a:F0,header:qi,button:d3,template:Vi,input:Pi,h2:_i,details:Ai,summary:Gi,ul:i7,li:C7}=K,R2={pass:P.testColorPass("#0a0"),fail:P.testColorFail("#c00"),running:P.testColorRunning("#fa0")},Ki={".view-source":{opacity:"0.9"},".view-source:hover":{opacity:"1"},"@keyframes test-pulse":{"0%, 100%":{opacity:"1"},"50%":{opacity:"0.7"}},"@keyframes test-appear":{from:{opacity:"0",transform:"scale(0.8)"},to:{opacity:"1",transform:"scale(1)"}},"@keyframes test-fade":{"0%, 20%":{opacity:"1",transform:"scale(1)"},"70%":{opacity:"1",transform:"scale(1.1)"},"100%":{opacity:"0",transform:"scale(0.9)",pointerEvents:"none"}},"body:not(.tests-enabled) .doc-link::after, body:not(.tests-enabled) .test-widget":{display:"none !important"},".doc-link.-test-passed::after, .doc-link.-test-failed::after":{content:"''",width:z.fontSize50,height:z.fontSize50,borderRadius:"50%",marginLeft:z.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:R2.pass},".doc-link.-test-failed::after":{background:R2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:R2.running,position:"fixed",bottom:z.spacing,right:z.spacing,zIndex:"1000",background:z.testBg,color:"white",gap:z.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:R2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:R2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:R2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:z.testBg,borderRadius:"50%",width:z.lineHeight,height:z.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},"@keyframes example-target-pulse":{from:{boxShadow:`0 0 0 3px ${P.accent("#007aff")}`},to:{boxShadow:"0 0 0 3px transparent"}},".example-target":{animation:"example-target-pulse 1.5s ease-out",borderRadius:z.roundedRadius}};function S3(y){let{docs:x,context:h={},projectName:l="",projectLinks:i={},navSize:C=200,minSize:k=600,routing:g="query",initialRoute:w,onRouteChange:B,navbarLinks:j,contentElement:V}=y,_=g==="memory";for(let q of x)q.testStatus=void 0;let p=g==="query"?{}:$2(x),G=(q)=>p[q]??q,Y=(q)=>{for(let A of x)if(G(A.filename)===q)return A.filename;return""},X=(q)=>g==="query"?`?${q}`:j3(G(q)),F=()=>{if(_)return w?Y(w):"";return g==="path"?q3(document.location.pathname,p):document.location.search!==""?document.location.search.substring(1).split("&")[0]:""},$=(q)=>{let A=q.getAttribute("href")||"";if(A===""||A.startsWith("#"))return null;let Q;try{Q=new URL(A,document.location.href)}catch{return null}if(Q.origin!==document.location.origin)return null;let f=(I)=>x.some((t)=>t.filename===I)?I:null,Z=Q.search.replace(/^\?/,"");if(Z!==""&&!Z.includes("=")&&!Z.includes("&")){let I=f(decodeURIComponent(Z));if(I)return I}if(!_&&g!=="query"){let I=f(q3(Q.pathname,p));if(I)return I}return null},R=F()||x[0]?.filename||"README.md",r=x.find((q)=>q.filename===R)||x[0],{app:N}=e({app:{docs:x,currentDoc:r,compact:!1}}),v=()=>{},s={},d,S=!1,y1=0,d2=0;if(!_)window.__docTestResults=new Promise((q)=>{d=q});let O9=(q)=>{let A=s[q],Q=N.docs.find((f)=>f.filename===q);if(Q)Q.testStatus=A?A.passed?"passed":"failed":void 0;v()},M7=()=>{if(d2>=y1&&d){let q={passed:0,failed:0,pages:s};for(let A of Object.values(s))q.passed+=A.totalPassed,q.failed+=A.totalFailed;if(d(q),d=void 0,p9&&!r2)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)}).catch(()=>{})}},p9=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",n7=(q)=>{let{results:A}=q.detail,Q=String(N.currentDoc.filename);s[Q]={passed:A.failed===0,tests:[...A.tests],totalPassed:A.passed,totalFailed:A.failed},O9(Q)},u4=(q)=>{d2++,M7(),E4()};r1.docLink={toDOM(q,A){q.setAttribute("href",X(A)),q.dataset.filename=A}},r1.current={toDOM(q,A){q.classList.toggle("current",A===q.dataset.filename)}},r1.testStatus={toDOM(q,A){if(q.classList.remove("-test-passed","-test-failed"),A==="passed")q.classList.add("-test-passed");else if(A==="failed")q.classList.add("-test-failed")}};let u7=e2(()=>{let q=a4.value.toLocaleLowerCase();N.docs.forEach((A)=>{A.hidden=!A.title.toLocaleLowerCase().includes(q)&&!A.text.toLocaleLowerCase().includes(q)}),_1(N.docs),v(!0)}),a4=Pi({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:u7});if(!_)window.addEventListener("popstate",()=>{if(b){if(f0()&&!window.confirm("Discard unsaved changes to the source?")){let q=X(String(b.doc.filename));window.history.pushState({href:q},"",q);return}t4()}J0(F())}),window.addEventListener("beforeunload",(q)=>{if(f0())q.preventDefault(),q.returnValue=""});let S2=[d3({class:"iconic",style:{color:z.linkColor},title:"navigation",bind:{value:N.compact,binding:{toDOM(q,A){q.style.display=A?"":"none",q.nextSibling.style.display=A?"":"none"}}},onClick(){let q=document.querySelector(V2.tagName);q.contentVisible=!q.contentVisible}},O.menu()),Y0({style:{flex:"0 0 10px"}})];if(l)S2.push(F0({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},i.tosijs?O.tosiUi({style:{_xinIconSize:40,marginRight:10}}):Y0(),_i(l)));S2.push(Y0({class:"elastic"}));let Q9=(q)=>{let A=q.icon?O[q.icon]:void 0;return F0({class:A?"iconic":"",title:q.label,target:"_blank",href:q.href},A?A():q.label)};if(j)j.forEach((q)=>S2.push(Q9(q)));else{let q=[[i.tosijs,"tosi","tosijs"],[i.discord,"discord","discord"],[i.blog,"blog","blog"],[i.github,"github","github"],[i.npm,"npm","npmjs"]];for(let[A,Q,f]of q)if(A)S2.push(Q9({href:A,label:f,icon:Q}))}let g1=V||W0();g1.classList.add("doc-content"),Object.assign(g1.style,{display:"block",maxWidth:"44em",margin:"auto",padding:"0 1em",overflow:"hidden"});let W9=()=>{for(let q of g1.querySelectorAll("a")){let A=$(q);if(A!==null)q.setAttribute("href",X(A)),q.dataset.docLink=A}},a7=()=>{if(_)return;let q=location.hash.replace(/^#/,"");if(!q)return;requestAnimationFrame(()=>{let A=null;try{A=g1.querySelector(`#${CSS.escape(q)}`)}catch{A=null}if(!A)return;A.scrollIntoView({block:"center",behavior:"smooth"}),A.classList.add("example-target"),setTimeout(()=>A&&A.classList.remove("example-target"),1600)})},Y9=V!==void 0&&!_,F9=(q)=>{if(Y9)Y9=!1;else g1.innerHTML=G0(q.text);if(W9(),e1.insertExamples(g1,h,q.path||void 0),a7(),g==="path")document.title=l?`${q.title} — ${l}`:q.title},J0=(q)=>{let A=x.find((Q)=>Q.filename===q)||x[0];N.currentDoc=A,F9(A),v(!0)},H0=(q)=>{if(!yy())return;if(_)B?.(G(q));else{let A=X(q);window.history.pushState({href:A},"",A)}J0(q)};g1.addEventListener("click",(q)=>{if(q.defaultPrevented||q.button!==0||q.metaKey||q.ctrlKey||q.shiftKey||q.altKey)return;let A=q.target.closest("a");if(!A||A.target==="_blank"||A.hasAttribute("download"))return;let Q=$(A);if(Q===null)return;q.preventDefault(),H0(Q)});let m7=(q)=>q.endsWith(".md")?"markdown":q.endsWith(".css")?"css":q.endsWith(".ts")||q.endsWith(".tjs")?"typescript":"javascript",t7=(q,A)=>{if(A.endsWith(".md"))return q;return(q.match(/\/\*#[\s\S]+?\*\//g)||[]).map((f)=>f.substring(3,f.length-2).trim()).join(`
99
103
 
100
- `)},n7=(q)=>{let _=i.github;if(!_||!q)return null;let s=_.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return s?`https://raw.githubusercontent.com/${s[1]}/${s[2]}/main/${q}`:null},K9=async(q)=>{try{let s=await fetch(`/__docstore/source?file=${encodeURIComponent(q)}`);if(s.ok)return await s.text()}catch{}let _=n7(q);if(_)try{let s=await fetch(_);if(s.ok)return await s.text()}catch{}return null},u7=async(q,_)=>{try{return(await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:q,content:_})})).ok}catch{return!1}},a4=(q,_)=>{let s=URL.createObjectURL(new Blob([_],{type:"text/plain"}));Y0({href:s,download:q}).click(),setTimeout(()=>URL.revokeObjectURL(s),1000)},D=null,H0=()=>D!==null&&D.editor.value!==D.original,m4=()=>{if(!D)return;D.editor.remove(),D=null,g1.style.display=""},a7=()=>{if(!D)return!0;if(H0()&&!window.confirm("Discard unsaved changes to the source?"))return!1;return m4(),!0},I2=(q)=>{if(!D)return;if(D.view=q,q==="preview")g1.innerHTML=G0(M7(D.editor.value,D.doc.path)),_9(),e1.insertExamples(g1,h,D.doc.path||void 0);else if(q==="diff")g1.replaceChildren(l0({original:D.original,modified:D.editor.value,style:{display:"block",width:"100%",height:"100%"}}));g1.style.display=q==="edit"?"none":"",D.editor.style.display=q==="edit"?"block":"none"},m7=()=>{if(!D)return;let q=String(N.currentDoc.filename);m4(),J0(q)},t7=async()=>{if(!D)return;let{doc:q,editor:_}=D;if(await u7(q.path,_.value))D.original=_.value,I2("preview");else a4(q.path.split("/").pop()||"source.txt",_.value)},E7=async(q)=>{if(D)return;let _=await K9(q.path);if(_===null){window.alert(`Could not load source for ${q.path}`);return}let s=T1({mode:L7(q.path)});s.style.cssText="display:block; width:100%; height:100%; border:none;",s.value=_,g1.parentElement.append(s),D={editor:s,doc:q,view:"edit",original:_},I2("edit")},e7=(q)=>{let _=x.find((v)=>String(v.filename)===String(N.currentDoc.filename));if(!_)return;let s=(v)=>v.split("/").pop()||v,H=D?[...D.view!=="edit"?[{caption:"Edit",icon:"edit",action:()=>I2("edit")}]:[],...D.view!=="preview"?[{caption:"Preview",icon:"eye",action:()=>I2("preview")}]:[],{caption:"View changes",icon:"code",action:()=>I2("diff"),enabled:()=>H0()},null,{caption:"Save to source",icon:"save",action:()=>void t7()},{caption:"Download",icon:"download",action:()=>a4(s(D.doc.path),D.editor.value)},null,{caption:"Close editor",icon:"x",action:m7}]:[{caption:"Edit page source",icon:"edit",action:()=>void E7(_)},...i.github&&_.path&&_.path!=="README.md"?[{caption:"View on GitHub",icon:"github",action:()=>{window.open(`${i.github}/blob/main/${_.path}`,"_blank")}}]:[],{caption:"Download source",icon:"download",action:()=>void K9(_.path).then((v)=>{if(v!==null)a4(s(_.path),v)})}];L({target:q,position:"sw",menuItems:H})},U9={slot:"nav",class:"doc-nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"}},yy=g!=="query"?(()=>{let q=P4(x,O),_=new Map,s=[],H=(T)=>{let u=[T.doc.filename];for(let m of T.children)u.push(...H(m));return u},v=(T)=>(u)=>{let m=u.target.closest("tosi-sidenav");if(m)m.contentVisible=!0;f0(String(T.filename)),u.preventDefault();let x1=X[T.filename];if(x1&&!x1.passed)setTimeout(()=>{let Z1=document.querySelector("tosi-example.-test-failed");if(Z1)Z1.scrollIntoView({behavior:"smooth",block:"center"})},100)},I=(T)=>{let u=Y0({class:"doc-link",href:F(T.doc.filename),onClick:v(T.doc)},s1(T.doc.title));if(T.children.length===0){let Z1=y7(u);return _.set(T.doc.filename,{li:Z1,link:u}),Z1}let m=Vi(Pi(u),e6(...T.children.map(I))),x1=y7(m);return s.push({li:x1,el:m,link:u,filename:T.doc.filename,subtree:H(T)}),x1},t=Q0(U9,e6(...q.map(I))),n=(T,u)=>{if(!u)return!0;let m=x.find((x1)=>x1.filename===T);return!!m&&(String(m.title).toLocaleLowerCase().includes(u)||String(m.text).toLocaleLowerCase().includes(u))},z1=(T,u,m)=>{T.classList.toggle("current",u===m);let x1=X[u];T.classList.toggle("-test-passed",!!x1&&x1.passed),T.classList.toggle("-test-failed",!!x1&&!x1.passed)};return Z=(T=!1)=>{let u=N.currentDoc,m=u&&u.filename!=null?String(u.filename):"",x1=u4.value.trim().toLocaleLowerCase();for(let[Z1,{li:o2,link:E4}]of _)o2.style.display=n(Z1,x1)?"":"none",z1(E4,Z1,m);for(let{li:Z1,el:o2,link:E4,filename:W9,subtree:e4}of s){let Y9=n(W9,x1)||e4.some((F9)=>_.has(F9)&&_.get(F9).li.style.display!=="none");if(Z1.style.display=Y9?"":"none",z1(E4,W9,m),x1)o2.open=Y9;else if(T)o2.open=e4.includes(m);else if(e4.includes(m))o2.open=!0}},Z(!0),t})():Q0({...U9,bindList:{idPath:"filename",hiddenProp:"hidden",value:N.docs}},zi(Y0({class:"doc-link",bindCurrent:"app.currentDoc.filename",bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(q){let _=C2(q.target),s=q.target.closest("tosi-sidenav");s.contentVisible=!0,f0(String(_.filename)),q.preventDefault()}},s1({bindText:"^.title"})))),A2=Q0({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},Bi(...S2),s0({name:"Documentation",navSize:C,minSize:k,style:{flex:"1 1 auto",overflow:"hidden"},onChange(){let q=document.querySelector(V2.tagName);N.compact=q.compact}},u4,yy,Q0({style:{position:"relative",overflowY:"scroll",height:"100%"}},c3({class:"view-source",style:{display:"flex",alignItems:"center",gap:"6px",position:"fixed",top:"calc(var(--xin-header-height, 60px) + 5px)",right:"5px",zIndex:"100",fontSize:"0.875em",color:"var(--brand-color, inherit)",background:"var(--background, white)",border:"none",borderRadius:"4px",padding:"3px 8px",boxShadow:"0 1px 4px #0003",cursor:"pointer",transition:"opacity 0.2s ease"},onClick(q){let _=q.target.closest(".view-source");if(_)e7(_)},bind:{value:N.currentDoc,binding(q,_){q.style.display=_.path?"flex":"none"}}},U.code({style:{_xinIconSize:16}}),"Source"),g1)));p9(r),O1("test-indicators",Ai);let w1=c3({class:"test-widget",hidden:!0,onClick:xy},W0({part:"label"},"Tests"),W0({class:"count",part:"count"},"0"));A2.appendChild(w1);let b0=!1;function O9(){b0=!0,w1.hidden=!1,w1.classList.remove("-passed","-failed"),w1.classList.add("-running"),s9()}function s9(){let q=w1.querySelector('[part="label"]'),_=w1.querySelector('[part="count"]'),s=Object.values(X).reduce((v,I)=>v+I.totalPassed,0),H=Object.values(X).reduce((v,I)=>v+I.totalFailed,0);if(q)if(b0)q.textContent="Running";else if(H>0)q.textContent="Failed";else if(s>0)q.textContent="Passed";else q.textContent="Tests";if(_)_.textContent=H>0?String(H):String(s)}function t4(){let q=Object.values(X).reduce((_,s)=>_+s.totalFailed,0);if(b0&&d2>=y1)if(b0=!1,w1.classList.remove("-running"),q>0)w1.classList.add("-failed"),w1.classList.remove("-passed"),w1.hidden=!1;else w1.classList.add("-passed"),w1.classList.remove("-failed"),w1.hidden=!1;s9()}function xy(){let q=Object.entries(X).filter(([,s])=>!s.passed),_=[];for(let[s,H]of q){let v=x.find((t)=>t.filename===s),I=H.tests.filter((t)=>!t.passed);for(let t of I)_.push({caption:`${v?.title||s}: ${t.name}`,action:()=>{if(N.docs.find((z1)=>String(z1.filename)===s))f0(s),setTimeout(()=>{let z1=document.querySelector("tosi-example.-test-failed");if(z1)z1.scrollIntoView({behavior:"smooth",block:"center"})},100)}})}if(_.length>0)_.push(null);_.push({icon:"copy",caption:"Copy test results to clipboard",action:()=>{let s=hy();navigator.clipboard.writeText(s)}}),L({target:w1,menuItems:_})}function hy(){let q=["# Test Results",""],_=0,s=0;for(let[H,v]of Object.entries(X)){let t=x.find((n)=>n.filename===H)?.title||H;if(_+=v.totalPassed,s+=v.totalFailed,v.tests.length>0){q.push(`## ${t}`),q.push("");for(let n of v.tests){let z1=n.passed?"✓":"✗",T=n.error?`- ${z1} ${n.name}: ${n.error}`:`- ${z1} ${n.name}`;q.push(T)}q.push("")}}return q.unshift(`**Summary: ${_} passed, ${s} failed**`,""),q.join(`
101
- `)}let ly=new URLSearchParams(window.location.search),r2=!A&&ly.get("_testMode")==="1",D0=r2?Y():null;if(A2.addEventListener("testcomplete",(q)=>{if(r7(q),t4(),r2&&window.parent!==window&&D0){let{results:_}=q.detail;window.parent.postMessage({type:"tosi-test-results",filename:D0,results:_},"*")}}),r2&&D0){let q=()=>{let s=[...A2.querySelectorAll("tosi-example")].filter((v)=>v.classList.contains("-has-tests")),H=s.filter((v)=>v.classList.contains("-test-running"));if(s.length>0&&H.length===0)window.parent.postMessage({type:"tosi-tests-done",filename:D0},"*");else setTimeout(q,100)};setTimeout(q,500)}let iy=async()=>{if(S)return;if(!K1.enabled.value)return;if(r2)return;S=!0;let q=x.filter((v)=>v.text.includes("```test"));if(y1=q.length,y1>0)O9();if(y1===0){if(d)d({passed:0,failed:0,pages:{}}),d=void 0;return}let _=String(N.currentDoc.filename),s=document.createElement("iframe");s.style.cssText="position: fixed; left: -10000px; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(s);let H=(v)=>{if(v.data?.type!=="tosi-test-results")return;let{filename:I,results:t}=v.data;if(!X[I])X[I]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let n=X[I];n.tests.push(...t.tests),n.totalPassed+=t.passed,n.totalFailed+=t.failed,n.passed=n.totalFailed===0,V9(I),t4()};window.addEventListener("message",H);for(let v of q){if(v.filename===_)continue;s.src=g==="path"?`${window.location.origin}${F(v.filename)}?_testMode=1`:`${window.location.origin}${window.location.pathname}?${v.filename}&_testMode=1`,await new Promise((I)=>{let t=Date.now()+30000,n=(z1)=>{if(z1.data?.type==="tosi-tests-done"&&z1.data.filename===v.filename)window.removeEventListener("message",n),I()};window.addEventListener("message",n),setTimeout(()=>{window.removeEventListener("message",n),I()},t-Date.now())}),n4(v.filename)}if(window.removeEventListener("message",H),s.remove(),q.some((v)=>v.filename===_))setTimeout(()=>n4(_),1000)},Q9=()=>{if(!K1.enabled.value)return;if(P9)setTimeout(iy,1000);else if(r.text.includes("```test"))y1=1,O9(),setTimeout(()=>n4(r.filename),2000);else if(d)d({passed:0,failed:0,pages:{}}),d=void 0};if(!A)Q9(),K1.enabled.observe(Q9);if(A)A2.navigate=(q)=>J0(W(q)||q),Object.defineProperty(A2,"currentSlug",{get:()=>G(String(N.currentDoc.filename))});return A2}var _i=`/* doc-system book stylesheet */
104
+ `)},E7=(q)=>{let A=i.github;if(!A||!q)return null;let Q=A.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return Q?`https://raw.githubusercontent.com/${Q[1]}/${Q[2]}/main/${q}`:null},X9=async(q)=>{try{let Q=await fetch(`/__docstore/source?file=${encodeURIComponent(q)}`);if(Q.ok)return await Q.text()}catch{}let A=E7(q);if(A)try{let Q=await fetch(A);if(Q.ok)return await Q.text()}catch{}return null},e7=async(q,A)=>{try{return(await fetch("/__docstore/source",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:q,content:A})})).ok}catch{return!1}},m4=(q,A)=>{let Q=URL.createObjectURL(new Blob([A],{type:"text/plain"}));F0({href:Q,download:q}).click(),setTimeout(()=>URL.revokeObjectURL(Q),1000)},b=null,f0=()=>b!==null&&b.editor.value!==b.original,t4=()=>{if(!b)return;b.editor.remove(),b=null,g1.style.display=""},yy=()=>{if(!b)return!0;if(f0()&&!window.confirm("Discard unsaved changes to the source?"))return!1;return t4(),!0},I2=(q)=>{if(!b)return;if(b.view=q,q==="preview")g1.innerHTML=G0(t7(b.editor.value,b.doc.path)),W9(),e1.insertExamples(g1,h,b.doc.path||void 0);else if(q==="diff")g1.replaceChildren(l0({original:b.original,modified:b.editor.value,style:{display:"block",width:"100%",height:"100%"}}));g1.style.display=q==="edit"?"none":"",b.editor.style.display=q==="edit"?"block":"none"},xy=()=>{if(!b)return;let q=String(N.currentDoc.filename);t4(),J0(q)},hy=async()=>{if(!b)return;let{doc:q,editor:A}=b;if(await e7(q.path,A.value))b.original=A.value,I2("preview");else m4(q.path.split("/").pop()||"source.txt",A.value)},ly=async(q)=>{if(b)return;let A=await X9(q.path);if(A===null){window.alert(`Could not load source for ${q.path}`);return}let Q=o1({mode:m7(q.path)});Q.style.cssText="display:block; width:100%; height:100%; border:none;",Q.value=A,g1.parentElement.append(Q),b={editor:Q,doc:q,view:"edit",original:A},I2("edit")},iy=(q)=>{let A=x.find((Z)=>String(Z.filename)===String(N.currentDoc.filename));if(!A)return;let Q=(Z)=>Z.split("/").pop()||Z,f=b?[...b.view!=="edit"?[{caption:"Edit",icon:"edit",action:()=>I2("edit")}]:[],...b.view!=="preview"?[{caption:"Preview",icon:"eye",action:()=>I2("preview")}]:[],{caption:"View changes",icon:"code",action:()=>I2("diff"),enabled:()=>f0()},null,{caption:"Save to source",icon:"save",action:()=>void hy()},{caption:"Download",icon:"download",action:()=>m4(Q(b.doc.path),b.editor.value)},null,{caption:"Close editor",icon:"x",action:xy}]:[{caption:"Edit page source",icon:"edit",action:()=>void ly(A)},...i.github&&A.path&&A.path!=="README.md"?[{caption:"View on GitHub",icon:"github",action:()=>{window.open(`${i.github}/blob/main/${A.path}`,"_blank")}}]:[],{caption:"Download source",icon:"download",action:()=>void X9(A.path).then((Z)=>{if(Z!==null)m4(Q(A.path),Z)})}];L({target:q,position:"sw",menuItems:f})},s9={slot:"nav",class:"doc-nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"}},Cy=g!=="query"?(()=>{let q=P4(x,p),A=new Map,Q=[],f=(o)=>{let u=[o.doc.filename];for(let m of o.children)u.push(...f(m));return u},Z=(o)=>(u)=>{let m=u.target.closest("tosi-sidenav");if(m)m.contentVisible=!0;H0(String(o.filename)),u.preventDefault();let x1=s[o.filename];if(x1&&!x1.passed)setTimeout(()=>{let v1=document.querySelector("tosi-example.-test-failed");if(v1)v1.scrollIntoView({behavior:"smooth",block:"center"})},100)},I=(o)=>{let u=F0({class:"doc-link",href:X(o.doc.filename),onClick:Z(o.doc)},Q1(o.doc.title));if(o.children.length===0){let v1=C7(u);return A.set(o.doc.filename,{li:v1,link:u}),v1}let m=Ai(Gi(u),i7(...o.children.map(I))),x1=C7(m);return Q.push({li:x1,el:m,link:u,filename:o.doc.filename,subtree:f(o)}),x1},t=W0(s9,i7(...q.map(I))),n=(o,u)=>{if(!u)return!0;let m=x.find((x1)=>x1.filename===o);return!!m&&(String(m.title).toLocaleLowerCase().includes(u)||String(m.text).toLocaleLowerCase().includes(u))},z1=(o,u,m)=>{o.classList.toggle("current",u===m);let x1=s[u];o.classList.toggle("-test-passed",!!x1&&x1.passed),o.classList.toggle("-test-failed",!!x1&&!x1.passed)};return v=(o=!1)=>{let u=N.currentDoc,m=u&&u.filename!=null?String(u.filename):"",x1=a4.value.trim().toLocaleLowerCase();for(let[v1,{li:T2,link:e4}]of A)T2.style.display=n(v1,x1)?"":"none",z1(e4,v1,m);for(let{li:v1,el:T2,link:e4,filename:$9,subtree:y5}of Q){let c9=n($9,x1)||y5.some((R9)=>A.has(R9)&&A.get(R9).li.style.display!=="none");if(v1.style.display=c9?"":"none",z1(e4,$9,m),x1)T2.open=c9;else if(o)T2.open=y5.includes(m);else if(y5.includes(m))T2.open=!0}},v(!0),t})():W0({...s9,bindList:{idPath:"filename",hiddenProp:"hidden",value:N.docs}},Vi(F0({class:"doc-link",bindCurrent:"app.currentDoc.filename",bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(q){let A=C2(q.target),Q=q.target.closest("tosi-sidenav");Q.contentVisible=!0,H0(String(A.filename)),q.preventDefault()}},Q1({bindText:"^.title"})))),_2=W0({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},qi(...S2),Q0({name:"Documentation",navSize:C,minSize:k,style:{flex:"1 1 auto",overflow:"hidden"},onChange(){let q=document.querySelector(V2.tagName);N.compact=q.compact}},a4,Cy,W0({style:{position:"relative",overflowY:"scroll",height:"100%"}},d3({class:"view-source",style:{display:"flex",alignItems:"center",gap:"6px",position:"fixed",top:"calc(var(--xin-header-height, 60px) + 5px)",right:"5px",zIndex:"100",fontSize:"0.875em",color:"var(--brand-color, inherit)",background:"var(--background, white)",border:"none",borderRadius:"4px",padding:"3px 8px",boxShadow:"0 1px 4px #0003",cursor:"pointer",transition:"opacity 0.2s ease"},onClick(q){let A=q.target.closest(".view-source");if(A)iy(A)},bind:{value:N.currentDoc,binding(q,A){q.style.display=A.path?"flex":"none"}}},O.code({style:{_xinIconSize:16}}),"Source"),g1)));F9(r),p1("test-indicators",Ki);let w1=d3({class:"test-widget",hidden:!0,onClick:ky},Y0({part:"label"},"Tests"),Y0({class:"count",part:"count"},"0"));_2.appendChild(w1);let D0=!1;function N9(){D0=!0,w1.hidden=!1,w1.classList.remove("-passed","-failed"),w1.classList.add("-running"),Z9()}function Z9(){let q=w1.querySelector('[part="label"]'),A=w1.querySelector('[part="count"]'),Q=Object.values(s).reduce((Z,I)=>Z+I.totalPassed,0),f=Object.values(s).reduce((Z,I)=>Z+I.totalFailed,0);if(q)if(D0)q.textContent="Running";else if(f>0)q.textContent="Failed";else if(Q>0)q.textContent="Passed";else q.textContent="Tests";if(A)A.textContent=f>0?String(f):String(Q)}function E4(){let q=Object.values(s).reduce((A,Q)=>A+Q.totalFailed,0);if(D0&&d2>=y1)if(D0=!1,w1.classList.remove("-running"),q>0)w1.classList.add("-failed"),w1.classList.remove("-passed"),w1.hidden=!1;else w1.classList.add("-passed"),w1.classList.remove("-failed"),w1.hidden=!1;Z9()}function ky(){let q=Object.entries(s).filter(([,Q])=>!Q.passed),A=[];for(let[Q,f]of q){let Z=x.find((t)=>t.filename===Q),I=f.tests.filter((t)=>!t.passed);for(let t of I)A.push({caption:`${Z?.title||Q}: ${t.name}`,action:()=>{if(N.docs.find((z1)=>String(z1.filename)===Q))H0(Q),setTimeout(()=>{let z1=document.querySelector("tosi-example.-test-failed");if(z1)z1.scrollIntoView({behavior:"smooth",block:"center"})},100)}})}if(A.length>0)A.push(null);A.push({icon:"copy",caption:"Copy test results to clipboard",action:()=>{let Q=gy();navigator.clipboard.writeText(Q)}}),L({target:w1,menuItems:A})}function gy(){let q=["# Test Results",""],A=0,Q=0;for(let[f,Z]of Object.entries(s)){let t=x.find((n)=>n.filename===f)?.title||f;if(A+=Z.totalPassed,Q+=Z.totalFailed,Z.tests.length>0){q.push(`## ${t}`),q.push("");for(let n of Z.tests){let z1=n.passed?"✓":"✗",o=n.error?`- ${z1} ${n.name}: ${n.error}`:`- ${z1} ${n.name}`;q.push(o)}q.push("")}}return q.unshift(`**Summary: ${A} passed, ${Q} failed**`,""),q.join(`
105
+ `)}let wy=new URLSearchParams(window.location.search),r2=!_&&wy.get("_testMode")==="1",b0=r2?F():null;if(_2.addEventListener("testcomplete",(q)=>{if(n7(q),E4(),r2&&window.parent!==window&&b0){let{results:A}=q.detail;window.parent.postMessage({type:"tosi-test-results",filename:b0,results:A},"*")}}),r2&&b0){let q=()=>{let Q=[..._2.querySelectorAll("tosi-example")].filter((Z)=>Z.classList.contains("-has-tests")),f=Q.filter((Z)=>Z.classList.contains("-test-running"));if(Q.length>0&&f.length===0)window.parent.postMessage({type:"tosi-tests-done",filename:b0},"*");else setTimeout(q,100)};setTimeout(q,500)}let By=async()=>{if(S)return;if(!U1.enabled.value)return;if(r2)return;S=!0;let q=x.filter((Z)=>Z.text.includes("```test"));if(y1=q.length,y1>0)N9();if(y1===0){if(d)d({passed:0,failed:0,pages:{}}),d=void 0;return}let A=String(N.currentDoc.filename),Q=document.createElement("iframe");Q.style.cssText="position: fixed; left: -10000px; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(Q);let f=(Z)=>{if(Z.data?.type!=="tosi-test-results")return;let{filename:I,results:t}=Z.data;if(!s[I])s[I]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let n=s[I];n.tests.push(...t.tests),n.totalPassed+=t.passed,n.totalFailed+=t.failed,n.passed=n.totalFailed===0,O9(I),E4()};window.addEventListener("message",f);for(let Z of q){if(Z.filename===A)continue;Q.src=g==="path"?`${window.location.origin}${X(Z.filename)}?_testMode=1`:`${window.location.origin}${window.location.pathname}?${Z.filename}&_testMode=1`,await new Promise((I)=>{let t=Date.now()+30000,n=(z1)=>{if(z1.data?.type==="tosi-tests-done"&&z1.data.filename===Z.filename)window.removeEventListener("message",n),I()};window.addEventListener("message",n),setTimeout(()=>{window.removeEventListener("message",n),I()},t-Date.now())}),u4(Z.filename)}if(window.removeEventListener("message",f),Q.remove(),q.some((Z)=>Z.filename===A))setTimeout(()=>u4(A),1000)},v9=()=>{if(!U1.enabled.value)return;if(p9)setTimeout(By,1000);else if(r.text.includes("```test"))y1=1,N9(),setTimeout(()=>u4(r.filename),2000);else if(d)d({passed:0,failed:0,pages:{}}),d=void 0};if(!_)v9(),U1.enabled.observe(v9);if(_)_2.navigate=(q)=>J0(Y(q)||q),Object.defineProperty(_2,"currentSlug",{get:()=>G(String(N.currentDoc.filename))});return _2}var Ui=`/* doc-system book stylesheet */
102
106
  html { font-size: 100%; }
103
107
  body {
104
108
  font-family: Georgia, 'Times New Roman', serif;
@@ -155,7 +159,7 @@ ol.toc > li > a { font-weight: bold; }
155
159
  /* per-example "run this live" deep link */
156
160
  .example-live-link { margin: 0.6em 0 0; font-size: 0.85em; }
157
161
  .example-live-link a { color: #08c; font-weight: bold; }
158
- `,Gi=`
162
+ `,Oi=`
159
163
  @page { margin: 18mm 16mm; }
160
164
  .book-title { text-align: center; margin: 30vh 0 1em; }
161
165
  .book-toc { page-break-after: always; }
@@ -164,32 +168,32 @@ ol.toc > li > a { font-weight: bold; }
164
168
  .book-toc ol ol { padding-left: 1.2em; }
165
169
  .book-toc a { color: inherit; }
166
170
  .chapter { page-break-before: always; }
167
- `;function J3(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function v4(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function pi(y){return y.replace(/<!--\{[\s\S]*?\}-->\s*/g,"")}function x7(y){let x=[];for(let h of y)x.push(h),x.push(...x7(h.children));return x}function h7(y){return y.map((x)=>`<li><a href="#${v4(x.doc.filename)}">${J3(x.doc.title)}</a>${x.children.length?`<ol>${h7(x.children)}</ol>`:""}</li>`).join("")}function l7(y,x){let h=y.filter((g)=>!g.hidden),l=$2(h),i=P4(h,l),C=x.css??`${_i}
168
- ${Gi}`,k=x7(i).map((g)=>`<section class="chapter" id="${v4(g.doc.filename)}">
171
+ `;function I3(y){return y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function v4(y){return y.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function pi(y){return y.replace(/<!--\{[\s\S]*?\}-->\s*/g,"")}function k7(y){let x=[];for(let h of y)x.push(h),x.push(...k7(h.children));return x}function g7(y){return y.map((x)=>`<li><a href="#${v4(x.doc.filename)}">${I3(x.doc.title)}</a>${x.children.length?`<ol>${g7(x.children)}</ol>`:""}</li>`).join("")}function w7(y,x){let h=y.filter((g)=>!g.hidden),l=$2(h),i=P4(h,l),C=x.css??`${Ui}
172
+ ${Oi}`,k=k7(i).map((g)=>`<section class="chapter" id="${v4(g.doc.filename)}">
169
173
  ${G0(pi(g.doc.text))}
170
174
  </section>`).join(`
171
175
  `);return`<!DOCTYPE html>
172
176
  <html lang="${x.lang??"en"}">
173
177
  <head>
174
178
  <meta charset="utf-8"/>
175
- <title>${J3(x.title)}</title>
179
+ <title>${I3(x.title)}</title>
176
180
  <style>${C}</style>
177
181
  </head>
178
182
  <body>
179
- <h1 class="book-title">${J3(x.title)}</h1>
180
- <nav class="book-toc"><h2>Contents</h2><ol>${h7(i)}</ol></nav>
183
+ <h1 class="book-title">${I3(x.title)}</h1>
184
+ <nav class="book-toc"><h2>Contents</h2><ol>${g7(i)}</ol></nav>
181
185
  ${k}
182
186
  ${x.autoPrint?'<script>addEventListener("load",function(){setTimeout(function(){print()},300)})</script>':""}
183
187
  </body>
184
- </html>`}function Ki(y={}){let x=Q.fromCss(y.accent??"#EE257B");return{_textColor:y.text??"#222",_brandColor:x,_background:y.background??"#fafafa",_buttonBg:y.buttonBg??"#fdfdfd",_inputBg:y.inputBg??"#fdfdfd",_backgroundShaded:"#f5f5f5",_navBg:x.rotate(30).desaturate(0.5).brighten(0.9),_barColor:x.opacity(0.4),_focusColor:x.opacity(0.7),_placeholderColor:x.opacity(0.4),_brandTextColor:x.rotate(30).brighten(0.9),_insetBg:x.rotate(45).brighten(0.8),_codeBg:x.rotate(-15).desaturate(0.5).brighten(0.9),_linkColor:x.rotate(-30).darken(0.5),_shadowColor:"#0004",_menuBg:"#fafafa",_menuItemActiveColor:"#000",_menuItemIconActiveColor:"#000",_menuItemActiveBg:"#aaa",_menuItemHoverBg:"#eee",_menuItemColor:"#222",_menuSeparatorColor:"#2224",_menuShadow:"0 4px 8px #0004",_scrollThumbColor:"#0006",_scrollBarColor:"#0001",_inputBorderShadow:"inset 0 0 2px #0006"}}function i7(y={}){let x=Ki(y),h=Q.fromCss(y.accent??"#EE257B");return{"@import":"https://fonts.googleapis.com/css2?family=Aleo:ital,wght@0,100..900;1,100..900&famiSpline+Sans+Mono:ital,wght@0,300..700;1,300..700&display=swap",":root":{_fontFamily:"'Aleo', sans-serif",_codeFontFamily:"'Spline Sans Mono', monospace",_fontSize:"16px",_codeFontSize:"14px",...x,_spacing:"10px",_lineHeight:"calc(var(--font-size) * 1.6)",_h1Scale:"2",_h2Scale:"1.5",_h3Scale:"1.25",_touchSize:"32px",_headerHeight:"calc( var(--line-height) * var(--h2-scale) + var(--spacing) * 2 )"},".darkmode":{...y0(x),_shadowColor:h.opacity(0.5),_menuShadow:`0 0 0 2px ${h.opacity(0.75)}`,_menuSeparatorColor:h.opacity(0.5)},".high-contrast":{filter:"contrast(2)"},"*":{boxSizing:"border-box",scrollbarColor:`${z.scrollThumbColor} ${z.scrollBarColor}`,scrollbarWidth:"thin"},body:{fontFamily:z.fontFamily,fontSize:z.fontSize,margin:"0",lineHeight:z.lineHeight,background:z.background,_tosiTabsSelectedColor:z.brandColor,_tosiTabsBarColor:z.brandTextColor,_menuItemIconColor:z.brandColor,color:z.textColor},"tosi-doc-system":{display:"block"},"tosi-doc-system tosi-sidenav::part(nav)":{background:z.navBg},".center":{display:"flex",alignItems:"center",justifyContent:"center"},"input, button, select, textarea":{fontFamily:z.fontFamily,fontSize:z.fontSize,color:"currentColor",background:z.inputBg},select:{WebkitAppearance:"none",appearance:"none"},header:{background:z.brandColor,color:z.brandTextColor,_textColor:z.brandTextColor,_linkColor:z.brandTextColor,display:"flex",alignItems:"center",padding:"0 var(--spacing)",lineHeight:"calc(var(--line-height) * var(--h1-scale))",height:z.headerHeight,whiteSpace:"nowrap"},h1:{color:z.brandColor,fontSize:"calc(var(--font-size) * var(--h1-scale))",lineHeight:"calc(var(--line-height) * var(--h1-scale))",fontWeight:"400",borderBottom:`4px solid ${z.barColor}`,margin:`${z.spacing} 0 ${z.spacing200}`,padding:0},"header h2":{color:z.brandTextColor,whiteSpace:"nowrap"},h2:{color:z.brandColor,fontSize:"calc(var(--font-size) * var(--h2-scale))",lineHeight:"calc(var(--line-height) * var(--h2-scale))",margin:"calc(var(--spacing) * var(--h2-scale)) 0"},h3:{fontSize:"calc(var(--font-size) * var(--h3-scale))",lineHeight:"calc(var(--line-height) * var(--h3-scale))",margin:"calc(var(--spacing) * var(--h3-scale)) 0"},"input[type=search]":{borderRadius:99},blockquote:{position:"relative",background:z.insetBg,margin:"0 48px 56px 0",borderRadius:z.spacing,padding:"var(--spacing) calc(var(--spacing) * 2)",filter:`drop-shadow(0px 1px 1px ${z.shadowColor})`},"blockquote > :first-child":{marginTop:"0"},"blockquote > :last-child":{marginBottom:"0"},"blockquote::before":{content:'" "',display:"block",width:1,height:1,border:"10px solid transparent",borderTopColor:z.insetBg,borderRightColor:z.insetBg,position:"absolute",bottom:-20,right:24},"blockquote::after":{content:'" "',width:48,height:48,display:"block",bottom:-48,right:-24,position:"absolute",background:h0(U.tosi(),void 0,void 0,2)},a:{textDecoration:"none",color:z.linkColor,opacity:"0.9",borderBottom:"1px solid var(--brand-color)"},"button, select, .clickable":{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"ease-out 0.2s",_textColor:z.brandColor,color:z.textColor,textDecoration:"none",background:z.buttonBg,padding:"0 calc(var(--spacing) * 1.25)",border:"none",borderRadius:"calc(var(--spacing) * 0.5)"},"button, select, .clickable, input":{lineHeight:"calc(var(--line-height) + var(--spacing))"},"input, textarea":{border:"none",outline:"none",borderRadius:"calc(var(--spacing) * 0.5)",boxShadow:z.inputBorderShadow},input:{padding:"0 calc(var(--spacing) * 1.5)"},"::placeholder":{color:z.placeholderColor},img:{verticalAlign:"middle"},"button:hover, .clickable:hover":{boxShadow:"inset 0 0 0 2px var(--brand-color)"},"button:active, .clickable:active":{background:z.brandColor,color:z.brandTextColor},label:{display:"inline-flex",gap:"calc(var(--spacing) * 0.5)",alignItems:"center"},".elastic":{flex:"1 1 auto",overflow:"hidden",position:"relative"},"svg.tosi-icon, button svg":{fill:"currentColor",pointerEvents:"none"},"[aria-selected]":{background:"#08835820"},":disabled":{opacity:"0.5",filter:"saturate(0)",pointerEvents:"none"},pre:{background:z.codeBg,padding:z.spacing,borderRadius:"calc(var(--spacing) * 0.25)",overflow:"auto",fontSize:z.codeFontSize,lineHeight:"calc(var(--font-size) * 1.2)"},"pre, code":{fontFamily:z.codeFontFamily,_textColor:z.brandColor},".transparent, .iconic":{background:"none"},".iconic":{padding:"0",fontSize:"150%",height:"calc(var(--line-height) + var(--spacing))",lineHeight:"calc(var(--line-height) + var(--spacing))",width:"calc(var(--line-height) + var(--spacing))",textAlign:"center"},".transparent:hover, .iconic:hover":{background:"#0002",boxShadow:"none",color:z.textColor},".transparent:active, .iconic:active":{background:"#0004",boxShadow:"none",color:z.textColor},".current, summary:has(.current)":{background:z.background},".doc-link":{cursor:"pointer",borderBottom:"none",transition:"0.15s ease-out",marginLeft:"10px",padding:"calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5)"},".doc-link:not(.current):hover":{background:z.background},".doc-link:not(.current)":{opacity:"0.8",marginLeft:0},"tosi-example":{margin:"var(--spacing) 0"},"tosi-example [part=editors]":{background:z.insetBg},"[class*='icon-'], tosi-icon":{color:"currentcolor",pointerEvents:"none"},"[class*='icon-']":{verticalAlign:"middle"},table:{borderCollapse:"collapse"},thead:{background:z.brandColor,color:z.brandTextColor},tbody:{background:z.background},"tr:nth-child(2n)":{background:z.backgroundShaded},"th, td":{padding:"calc(var(--spacing) * 0.5) var(--spacing)"},".doc-nav ul, .doc-nav li":{listStyle:"none",margin:0,padding:0},".doc-nav li":{display:"flex",flexDirection:"column"},".doc-nav":{display:"flex",flexDirection:"column"},".doc-nav details > ul":{paddingLeft:z.spacing},".doc-nav summary":{cursor:"pointer",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-nav summary::marker":{color:z.brandColor},".doc-nav summary > .doc-link":{display:"inline-block",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-navbar":{listStyle:"none",display:"flex",flexWrap:"wrap",gap:z.spacing,margin:0,padding:z.spacing}}}var{button:Ui,div:Oi}=p,C7="tosi-doc-system-prefs";class f3 extends K{static preferredTagName="tosi-doc-system";static initAttributes={docs:"/docs.json",config:"",localized:"",routing:"",route:"",accent:"",background:"",text:""};context;content=null;corpus;browser;appliedRoute="";suppressed=!1;nestingDepth(){let y=0,x=this.parentNode;while(x){if(x.nodeType===Node.ELEMENT_NODE&&x.tagName==="TOSI-DOC-SYSTEM")y++;x=x.parentNode||x.host||null}return y}prefs;stylesApplied=!1;applyStyles(){if(this.stylesApplied)return;if(this.stylesApplied=!0,!document.querySelector("link[data-tosi-doc-system]"))O1("tosi-doc-system",i7({accent:this.accent||void 0,background:this.background||void 0,text:this.text||void 0}))}applyThemePrefs=()=>{let y=this.prefs.theme.value,x=y==="dark"||y==="system"&&matchMedia("(prefers-color-scheme: dark)").matches;document.body.classList.toggle("darkmode",x),document.body.classList.toggle("high-contrast",this.prefs.highContrast.value)};persistPrefs(){try{localStorage.setItem(C7,JSON.stringify({theme:this.prefs.theme.value,highContrast:this.prefs.highContrast.value,locale:this.prefs.locale.value}))}catch{}}initPrefs(){let y={};try{y=JSON.parse(localStorage.getItem(C7)||"{}")}catch{}this.prefs=e({prefs:{theme:y.theme||"system",highContrast:y.highContrast||!1,locale:y.locale||""}}).prefs,this.applyThemePrefs(),matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.applyThemePrefs),this.prefs.theme.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.highContrast.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.locale.observe(()=>this.persistPrefs())}async initLocale(){if(!this.localized)return;try{let y=await(await fetch(this.localized)).text();if(u5(y),this.prefs.locale.value)C4(this.prefs.locale.value)}catch(y){console.warn("<tosi-doc-system> could not load localization from",this.localized,y)}}settingsButton(){return Ui({class:"iconic",style:{color:z.linkColor},title:"settings",onClick:(y)=>{let x=[],h="";try{h=JSON.parse(this.config||"{}").projectName||""}catch{}let l=h||document.title||"Documentation";x.push({caption:"Print as PDF",icon:"printer",action:()=>{let C=window.open("","_blank");if(!C){window.alert("Allow pop-ups to print the documentation as a book.");return}C.document.open(),C.document.write(l7(this.corpus,{title:l,autoPrint:!0})),C.document.close()}}),x.push({caption:"Download ePub",icon:"book",action:()=>{let C=document.createElement("a");C.href=`/${v4(l)}.epub`,C.download="",C.click()}}),x.push(null);let i=M.localeOptions.value||[];if(i.length>1)x.push({caption:"Language",icon:"globe",menuItems:i.map((C)=>({caption:C.caption,icon:C.icon,checked:()=>C.value===M.locale.value,action:()=>{this.prefs.locale.value=C.value,C4(C.value)}}))});x.push({caption:"Color Theme",icon:"rgb",menuItems:[{caption:"System",checked:()=>this.prefs.theme.value==="system",action:()=>this.prefs.theme.value="system"},{caption:"Dark",checked:()=>this.prefs.theme.value==="dark",action:()=>this.prefs.theme.value="dark"},{caption:"Light",checked:()=>this.prefs.theme.value==="light",action:()=>this.prefs.theme.value="light"},null,{caption:"High Contrast",checked:()=>this.prefs.highContrast.value,action:()=>this.prefs.highContrast.value=!this.prefs.highContrast.value}]}),L({target:y.target,localized:!0,menuItems:x})}},U.moreVertical())}parseLinks(y){let x=this.querySelector(y);if(!x)return[];return[...x.querySelectorAll("a")].map((h)=>({href:h.getAttribute("href")||"",label:(h.textContent||"").trim(),icon:h.dataset.icon||void 0}))}connectedCallback(){if(super.connectedCallback(),this.nestingDepth()>=2){this.suppressed=!0,this.replaceChildren(Oi({class:"doc-system-nested"},"\uD83D\uDCD6 nested doc-system preview (suppressed)"));return}if(this.applyStyles(),this.initPrefs(),this.initLocale(),this.corpus===void 0){let y=this.docs||"/docs.json";fetch(y).then((x)=>x.json()).then((x)=>{this.corpus=x;let h=B6(location.search,$2(x));if(h){if(h!==location.pathname){location.replace(h+location.hash);return}history.replaceState(null,"",h+location.hash)}this.queueRender()}).catch((x)=>console.error("<tosi-doc-system> could not load docs from",y,x))}}render(){if(super.render(),this.suppressed||this.corpus===void 0)return;if(this.browser!==void 0){let C=this.browser.navigate;if(C&&this.route&&this.route!==this.appliedRoute)this.appliedRoute=this.route,C(this.route);return}let y={};if(this.config)try{y=JSON.parse(this.config)}catch{console.warn("<tosi-doc-system> ignoring invalid config attribute")}let x=this.nestingDepth()>=1,h=x||this.routing==="memory"||this.routing==="internal",l=this.querySelector(".doc-content")||void 0,i=this.parseLinks(".doc-navbar");if(this.appliedRoute=this.route,this.browser=R3({docs:this.corpus,routing:h?"memory":"path",initialRoute:h?this.route||void 0:void 0,onRouteChange:h?(C)=>{this.appliedRoute=C,this.route=C}:void 0,context:this.context||{tosijs:globalThis.xinjs,"tosijs-ui":globalThis.xinjsui},projectName:y.projectName,projectLinks:y.projectLinks,navbarLinks:i.length?i:void 0,contentElement:l}),!x){let C=this.browser.querySelector("header");if(C)C.append(this.settingsButton())}if(this.replaceChildren(this.browser),!x&&typeof document<"u")requestAnimationFrame(()=>{document.body.style.opacity="1"})}}var si=f3.elementCreator();var{div:X1,slot:Qi}=p;class N1 extends K{static preferredTagName="tosi-editable";static initAttributes={rotationSnap:0,positionSnap:0};static angleSize=15;static gridSize=8;static snapAngle=!1;static snapToGrid=!1;static shadowStyleSpec={":host":{"--handle-bg":"#fff4","--handle-color":"#2228","--handle-hover-bg":"#8ff8","--handle-hover-color":"#222","--handle-size":"20px","--handle-padding":"2px"},":host ::slotted(*)":{position:"absolute"},":host > :not(style,slot)":{boxSizing:"border-box",content:'" "',position:"absolute",display:"flex",height:z.handleSize,width:z.handleSize,padding:z.handlePadding,"--text-color":z.handleColor,background:z.handleBg},":host > .drag-size":{top:0,bottom:0,left:0,right:0,height:"auto",width:"auto",background:"transparent",cursor:"ew-resize"},':host > [part="rotate"]':{transform:`translateY(${z.handleSize_50})`},":host > [locked] > svg:first-child, :host > :not([locked]) > svg+svg":{display:"none"},":host .icon-unlock":{opacity:0.5},":host svg":{pointerEvents:"none"},":host > *:hover":{"--text-color":z.handleHoverColor,background:z.handleHoverBg}};static snappedCoords(y,x){let{gridSize:h}=N1;return N1.snapToGrid||y.shiftKey?x.map((l)=>Math.round(l/h)*h):x}static snappedAngle(y,x){let{angleSize:h}=N1;return N1.snapAngle||y.shiftKey?Math.round(x/h)*h:x}get locked(){let y=this.parentElement;if(y.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let x=y.style.right.match(/\d/)!==null,h=!x||y.style.left.match(/\d/)!==null,l=y.style.bottom.match(/\d/)!==null,i=!l||y.style.top.match(/\d/)!==null;return{left:h,top:i,bottom:l,right:x}}set locked(y){let{bottom:x,right:h}=y,{left:l,top:i}=y,C=this.parentElement,k=C.offsetLeft,g=C.offsetTop,w=C.offsetWidth,B=C.offsetHeight,j=C.offsetParent.offsetWidth-k-w,V=C.offsetParent.offsetHeight-g-B;if(Object.assign(C.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!h)l=!0;if(!x)i=!0;if(l)C.style.left=k+"px";if(h)C.style.right=j+"px";if(l&&h)C.style.width="auto";else C.style.width=w+"px";if(i)C.style.top=g+"px";if(x)C.style.bottom=V+"px";if(i&&x)C.style.height="auto";else C.style.height=B+"px";this.queueRender()}get coords(){let{top:y,left:x,right:h,bottom:l}=this.parentElement.style;return{top:parseFloat(y),left:parseFloat(x),right:parseFloat(h),bottom:parseFloat(l)}}get left(){return this.parentElement.offsetLeft}get width(){return this.parentElement.offsetWidth}get right(){return this.parentElement.offsetParent.offsetWidth-(this.left+this.width)}get top(){return this.parentElement.offsetTop}get height(){return this.parentElement.offsetHeight}get bottom(){return this.parentElement.offsetParent.offsetHeight-(this.top+this.height)}triggerChange=()=>{this.parentElement.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};adjustPosition=(y)=>{let{locked:x}=this;this.locked=x;let h=this.parentElement,{top:l,left:i,bottom:C,right:k}=this.coords;V1(y,(g,w,B)=>{if([g,w]=N1.snappedCoords(B,[g,w]),!isNaN(l))h.style.top=l+w+"px";if(!isNaN(C))h.style.bottom=C-w+"px";if(!isNaN(i))h.style.left=i+g+"px";if(!isNaN(k))h.style.right=k-g+"px";if(B.type==="mouseup")return this.triggerChange(),!0})};resize=(y)=>{let x=this.parentElement,{locked:h}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[l,i]=[this.right,this.bottom];V1(y,(C,k,g)=>{let w=l-C,B=i-k;if([w,B]=N1.snappedCoords(g,[w,B]),x.style.right=w+"px",x.style.bottom=B+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};adjustSize=(y)=>{let x=this.parentElement,{locked:h}=this,l=y.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let i=this[l];V1(y,(C,k,g)=>{let[w]=N1.snappedCoords(g,[i+(["left","right"].includes(l)?C:k)*(["right","bottom"].includes(l)?-1:1)]);if(x.style[l]=w+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let y=this.parentElement.getBoundingClientRect();return{x:y.x+y.width*0.5,y:y.y+y.height*0.5}}get element(){return this.parentElement}adjustRotation=(y)=>{let{center:x}=this,{transformOrigin:h}=this.element.style;if(!h)this.element.style.transformOrigin="50% 50%";V1(y,(l,i,C)=>{let{clientX:k,clientY:g}=C,w=k-x.x,B=g-x.y,j=B>0?90:-90;if(w!==0)j=Math.atan2(B,w)*180/Math.PI;if(j=N1.snappedAngle(C,j),j===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${j}deg)`;return this.triggerChange(),C.type==="mouseup"})};toggleLock=(y)=>{let{locked:x}=this,h=y.target.title.split(" ")[1];x[h]=!x[h],this.locked=x,this.queueRender(),y.stopPropagation(),y.preventDefault()};content=()=>[X1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},U.move()),X1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),X1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),X1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),X1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),X1({part:"resize",style:{top:"100%",left:"100%"}},U.resize()),X1({part:"rotate",style:{top:"50%",right:"0"}},U.refreshCw()),X1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},U.unlock(),U.lock()),X1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},U.unlock(),U.lock()),X1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},U.unlock(),U.lock()),X1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},U.unlock(),U.lock()),Qi()];connectedCallback(){super.connectedCallback();let{left:y,right:x,top:h,bottom:l,lockLeft:i,lockRight:C,lockTop:k,lockBottom:g,move:w,resize:B,rotate:j}=this.parts,V={passive:!0};[y,x,h,l].forEach((A)=>{A.addEventListener("mousedown",this.adjustSize,V),A.addEventListener("touchstart",this.adjustSize,V)}),[i,C,k,g].forEach((A)=>{A.addEventListener("click",this.toggleLock)}),B.addEventListener("mousedown",this.resize,V),w.addEventListener("mousedown",this.adjustPosition,V),j.addEventListener("mousedown",this.adjustRotation,V),B.addEventListener("touchstart",this.resize,V),w.addEventListener("touchstart",this.adjustPosition,V),j.addEventListener("touchstart",this.adjustRotation,V)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:y,lockRight:x,lockTop:h,lockBottom:l}=this.parts,{left:i,right:C,top:k,bottom:g}=this.locked;y.toggleAttribute("locked",i),x.toggleAttribute("locked",C),h.toggleAttribute("locked",k),l.toggleAttribute("locked",g)}}var Wi=N1.elementCreator();var{div:Yi,input:Fi,button:H3,span:Xi}=p,k7=(y)=>y,g7="null filter, everything matches",b3={contains:{caption:"contains",negative:"does not contain",makeTest:(y)=>{return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase().includes(y)}},hasTags:{caption:"has tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((l)=>!h.includes(l))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((l)=>h.includes(l))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(y)=>{if(isNaN(Number(y)))return y=String(y).toLocaleLowerCase(),(h)=>String(h).toLocaleLowerCase()===y;let x=Number(y);return(h)=>Number(h)===x}},after:{caption:"is after",negative:"is before",makeTest:(y)=>{let x=new Date(y);return(h)=>new Date(h)>x}},greaterThan:{caption:">",negative:"≤",makeTest:(y)=>{if(!isNaN(Number(y))){let x=Number(y);return(h)=>Number(h)>x}return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase()>y}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(y)=>!!y},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(y)=>y===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(y)=>y===!1}},Ni={description:"anything",test:()=>!0};function w7(y){return y.options[y.selectedIndex]?.caption||""}class D3 extends K{static preferredTagName="tosi-filter-part";static lightStyleSpec={":host":{display:"flex"},":host .tosi-icon:":{verticalAlign:"middle",pointerEvents:"none"},':host [part="haystack"], :host [part="condition"]':{flex:"1"},':host [part="needle"]':{flex:2},':host [hidden]+[part="padding"]':{display:"block",content:" ",flex:"1 1 auto"}};static initAttributes={haystack:"*",condition:"contains",needle:""};fields=[];filters=b3;content=()=>[G1({part:"haystack"}),G1({part:"condition"}),Fi({part:"needle",type:"search"}),Xi({part:"padding"}),H3({part:"remove",title:"delete"},U.trash())];filter=Ni;get state(){let{haystack:y,needle:x,condition:h}=this.parts;return{haystack:y.value,needle:x.value,condition:h.value}}set state(y){Object.assign(this,y)}buildFilter=()=>{let{haystack:y,condition:x,needle:h}=this.parts,l=x.value.startsWith("~"),i=l?x.value.slice(1):x.value,C=this.filters[i];h.hidden=C.needsValue===!1;let k=C.needsValue===!1?C.makeTest(void 0):C.makeTest(h.value),g=y.value,w;if(g!=="*")w=l?(V)=>!k(V[g]):(V)=>k(V[g]);else w=l?(V)=>Object.values(V).find((A)=>!k(A))!==void 0:(V)=>Object.values(V).find((A)=>k(A))!==void 0;let B=C.needsValue!==!1?` "${h.value}"`:"",j=`${w7(y)} ${w7(x)}${B}`;this.filter={description:j,test:w},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:y,condition:x,needle:h,remove:l}=this.parts;y.addEventListener("change",this.buildFilter),x.addEventListener("change",this.buildFilter),h.addEventListener("input",this.buildFilter),y.value=this.haystack,x.value=this.condition,h.value=this.needle,l.addEventListener("click",()=>{let{parentElement:i}=this;this.remove(),i?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:y,condition:x,needle:h}=this.parts;if(y.options=[{caption:"any field",value:"*"},...this.fields.map((l)=>l.prop)],x.options=Object.keys(this.filters).map((l)=>{let i=this.filters[l];return i.negative!==void 0?[{caption:i.caption,value:l},{caption:i.negative,value:"~"+l}]:{caption:i.caption,value:l}}).flat(),this.haystack!=="")y.value=this.haystack;if(this.condition!=="")x.value=this.condition;if(this.needle!=="")h.value=this.needle;this.buildFilter()}}var Z4=D3.elementCreator();class d3 extends K{static preferredTagName="tosi-filter";static lightStyleSpec={":host":{height:"auto",display:"grid",gridTemplateColumns:"32px calc(100% - 64px) 32px",alignItems:"center"},':host [part="filterContainer"]':{display:"flex",flexDirection:"column",alignItems:"stretch",flex:"1 1 auto"},':host [part="haystack"]':{_fieldWidth:"100px"},':host [part="condition"]':{_fieldWidth:"60px"},':host [part="needle"]':{_fieldWidth:"80px"},':host [part="add"], :host [part="reset"]':{"--button-size":"var(--touch-size, 32px)",borderRadius:"999px",height:"var(--button-size)",lineHeight:"var(--button-size)",margin:"0",padding:"0",textAlign:"center",width:"var(--button-size)",flex:"0 0 var(--button-size)"}};_fields=[];get fields(){return this._fields}set fields(y){this._fields=y,this.queueRender()}get state(){let{filterContainer:y}=this.parts;return[...y.children].map((x)=>x.state)}set state(y){let{fields:x,filters:h}=this,{filterContainer:l}=this.parts;l.textContent="";for(let i of y)l.append(Z4({fields:x,filters:h,...i}))}filter=k7;description=g7;addFilter=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;h.append(Z4({fields:y,filters:x}))};content=()=>[H3({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},U.plus()),Yi({part:"filterContainer"}),H3({part:"reset",title:"reset filter",onClick:this.reset},U.x())];filters=b3;reset=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;this.description=g7,this.filter=k7,h.textContent="",h.append(Z4({fields:y,filters:x})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:y}=this.parts;if(y.children.length===0){this.reset();return}let x=[...y.children].map((l)=>l.filter),h=x.map((l)=>l.test);this.description=x.map((l)=>l.description).join(", "),this.filter=(l)=>l.filter((i)=>h.find((C)=>C(i)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:y}=this.parts;y.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var vi=d3.elementCreator();var{form:Zi,slot:S3,tosiSlot:B7,label:$i,input:ci,span:Ri}=p;function y2(y,x,h){if(h!==""&&h!==!1)y.setAttribute(x,h);else y.removeAttribute(x)}function Ji(y){switch(y.type){case"checkbox":return y.checked;case"radio":{let x=y.parentElement?.querySelector(`input[type="radio"][name="${y.name}"]:checked`);return x?x.value:null}case"range":case"number":return Number(y.value);default:return Array.isArray(y.value)&&y.value.length===0?null:y.value}}function z7(y,x){if(!(y instanceof HTMLElement));else if(y instanceof HTMLInputElement)switch(y.type){case"checkbox":y.checked=x;break;case"radio":y.checked=x===y.value;break;default:y.value=String(x||"")}else if(x!=null||y.value!=null)y.value=String(x||"")}class $4 extends K{static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:P.prefixSuffixGap("8px")},':host [part="field"][prefix]::before':{content:"attr(prefix)"},':host [part="field"][suffix]::after':{content:"attr(suffix)"},':host [part="field"] > *, :host [part="input"] > *':{width:"100%"},":host textarea":{resize:"none"},':host input[type="checkbox"]':{width:"fit-content"},":host .hidden":{position:"absolute",pointerEvents:"none",opacity:0}};static initAttributes={caption:"",key:"",type:"",optional:!1,pattern:"",placeholder:"",min:"",max:"",step:"",fixedPrecision:-1,prefix:"",suffix:""};value=null;content=$i(B7({part:"caption"}),Ri({part:"field"},B7({part:"input",name:"input"}),ci({part:"valueHolder"})));valueChanged=!1;handleChange=()=>{let{input:y,valueHolder:x}=this.parts,h=y.children[0]||x;if(h!==x)x.value=h.value;this.value=Ji(h),this.valueChanged=!0;let l=this.closest("tosi-form");if(l&&this.key!=="")switch(this.type){case"checkbox":l.fields[this.key]=h.checked;break;case"number":case"range":if(this.fixedPrecision>-1)h.value=Number(h.value).toFixed(this.fixedPrecision),l.fields[this.key]=Number(h.value);else l.fields[this.key]=Number(h.value);break;default:l.fields[this.key]=h.value}};connectedCallback(){super.connectedCallback();let{input:y,valueHolder:x}=this.parts;x.addEventListener("change",this.handleChange),y.addEventListener("change",this.handleChange,!0)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{input:y,caption:x,valueHolder:h,field:l}=this.parts;if(x.textContent?.trim()==="")x.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){y.textContent="";let i=p.textarea({value:this.value});if(this.placeholder)i.setAttribute("placeholder",this.placeholder);y.append(i)}else if(this.type==="color")y.textContent="",y.append(M5({value:this.value}));else if(y.children.length===0){if(y2(h,"placeholder",this.placeholder),y2(h,"type",this.type),y2(h,"pattern",this.pattern),y2(h,"min",this.min),y2(h,"max",this.max),this.step)y2(h,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")y2(h,"step",Math.pow(10,-this.fixedPrecision))}if(z7(h,this.value),z7(y.children[0],this.value),this.prefix)l.setAttribute("prefix",this.prefix);else l.removeAttribute("prefix");if(this.suffix)l.setAttribute("suffix",this.suffix);else l.removeAttribute("suffix");if(h.classList.toggle("hidden",y.children.length>0),y.children.length>0)h.setAttribute("tabindex","-1");else h.removeAttribute("tabindex");y.style.display=y.children.length===0?"none":"",y2(h,"required",!this.optional)}}class c4 extends K{static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((x)=>x.required!==void 0).find((x)=>!x.reportValidity())===void 0}static shadowStyleSpec={":host":{display:"flex",flexDirection:"column"},":host::part(header), :host::part(footer)":{display:"flex"},":host::part(content)":{display:"flex",flexDirection:"column",overflow:"hidden auto",height:"100%",width:"100%",position:"relative",boxSizing:"border-box"},":host form":{display:"flex",flex:"1 1 auto",position:"relative",overflow:"hidden"}};content=[S3({part:"header",name:"header"}),Zi({part:"form"},S3({part:"content"})),S3({part:"footer",name:"footer"})];getField=(y)=>{return this.querySelector(`tosi-field[key="${y}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch{console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:y}=this,x=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(h,l){return h[l]},set(h,l,i){if(h[l]!==i){h[l]=i;let C=y(l);if(C)C.value=i;x(new Event("change"))}return!0}})}set fields(y){let x=[...this.querySelectorAll("tosi-field")];for(let h of x)h.value=y[h.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(y)=>{y.preventDefault(),y.stopPropagation(),this.syncFieldValues();let x=this.fields;this.submitCallback(x,this.isValid)};submitCallback=(y,x)=>{console.log("override submitCallback to handle this data",{value:y,isValid:x})};connectedCallback(){super.connectedCallback();let{form:y}=this.parts;y.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(y)=>{let x=y.target,h=x.getAttribute("name");if(h&&"value"in x)this.fields[h]=x.value};syncFieldValues(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let l=h.getAttribute("name")||h.getAttribute("key");if(!l)continue;if(y[l]===void 0){let i=h.value??h.getAttribute("value");if(i!=null)y[l]=i}}}initializeNamedElements(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let l=h.getAttribute("name")||h.getAttribute("key");if(!l)continue;if(y[l]!==void 0)h.value=y[l]}}}var fi=$4,Hi=c4,j7=$4.elementCreator(),q7=c4.elementCreator(),bi=j7,Di=q7;var{a:di}=p;class I3 extends K{static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:P.tosiHeaderPadding("12px 24px"),background:P.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:P.tosiHeaderLineHeight("32px"),gap:P.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:y})=>[y()]}var Si=I3.elementCreator(),V7={tosijs:()=>U.tosi(),discord:()=>U.discord(),blog:()=>U.blog(),github:()=>U.github(),npm:()=>U.npm()};class r3 extends K{static preferredTagName="tosi-header-links";static lightStyleSpec={":host":{display:"inline-flex",alignItems:"center",gap:"4px"},":host a":{color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",padding:"4px",opacity:"0.8",cursor:"pointer"},":host a:hover":{opacity:"1"}};links={};content=null;render(){super.render();let y=[];for(let[x,h]of Object.entries(this.links)){if(!h||!V7[x])continue;y.push(di({title:x,target:"_blank",href:h},V7[x]()))}this.replaceChildren(...y)}}var Ii=r3.elementCreator();function P7(){return navigator.getGamepads().filter((x)=>x!==null).map((x)=>{let{id:h,axes:l,buttons:i}=x;return{id:h,axes:l,buttons:i.map((C,k)=>{let{pressed:g,value:w}=C;return{index:k,pressed:g,value:w}}).filter((C)=>C.pressed||C.value!==0).reduce((C,k)=>{return C[k.index]=k.value,C},{})}})}function ri(){let y=P7();return y.length===0?"no active gamepads":y.map(({id:x,axes:h,buttons:l})=>{let i=h.map((k)=>k.toFixed(2)).join(" "),C=Object.keys(l).map((k)=>`[${k}](${l[Number(k)].toFixed(2)})`).join(" ");return`${x}
188
+ </html>`}function Qi(y={}){let x=W.fromCss(y.accent??"#EE257B");return{_textColor:y.text??"#222",_brandColor:x,_background:y.background??"#fafafa",_buttonBg:y.buttonBg??"#fdfdfd",_inputBg:y.inputBg??"#fdfdfd",_backgroundShaded:"#f5f5f5",_navBg:x.rotate(30).desaturate(0.5).brighten(0.9),_barColor:x.opacity(0.4),_focusColor:x.opacity(0.7),_placeholderColor:x.opacity(0.4),_brandTextColor:x.rotate(30).brighten(0.9),_insetBg:x.rotate(45).brighten(0.8),_codeBg:x.rotate(-15).desaturate(0.5).brighten(0.9),_linkColor:x.rotate(-30).darken(0.5),_shadowColor:"#0004",_menuBg:"#fafafa",_menuItemActiveColor:"#000",_menuItemIconActiveColor:"#000",_menuItemActiveBg:"#aaa",_menuItemHoverBg:"#eee",_menuItemColor:"#222",_menuSeparatorColor:"#2224",_menuShadow:"0 4px 8px #0004",_scrollThumbColor:"#0006",_scrollBarColor:"#0001",_inputBorderShadow:"inset 0 0 2px #0006"}}function B7(y={}){let x=Qi(y),h=W.fromCss(y.accent??"#EE257B");return{"@import":"https://fonts.googleapis.com/css2?family=Aleo:ital,wght@0,100..900;1,100..900&famiSpline+Sans+Mono:ital,wght@0,300..700;1,300..700&display=swap",":root":{_fontFamily:"'Aleo', sans-serif",_codeFontFamily:"'Spline Sans Mono', monospace",_fontSize:"16px",_codeFontSize:"14px",...x,_spacing:"10px",_lineHeight:"calc(var(--font-size) * 1.6)",_h1Scale:"2",_h2Scale:"1.5",_h3Scale:"1.25",_touchSize:"32px",_headerHeight:"calc( var(--line-height) * var(--h2-scale) + var(--spacing) * 2 )"},".darkmode":{...y0(x),_shadowColor:h.opacity(0.5),_menuShadow:`0 0 0 2px ${h.opacity(0.75)}`,_menuSeparatorColor:h.opacity(0.5)},".high-contrast":{filter:"contrast(2)"},"*":{boxSizing:"border-box",scrollbarColor:`${z.scrollThumbColor} ${z.scrollBarColor}`,scrollbarWidth:"thin"},body:{fontFamily:z.fontFamily,fontSize:z.fontSize,margin:"0",lineHeight:z.lineHeight,background:z.background,_tosiTabsSelectedColor:z.brandColor,_tosiTabsBarColor:z.brandTextColor,_menuItemIconColor:z.brandColor,color:z.textColor},"tosi-doc-system":{display:"block"},"tosi-doc-system tosi-sidenav::part(nav)":{background:z.navBg},".center":{display:"flex",alignItems:"center",justifyContent:"center"},"input, button, select, textarea":{fontFamily:z.fontFamily,fontSize:z.fontSize,color:"currentColor",background:z.inputBg},select:{WebkitAppearance:"none",appearance:"none"},header:{background:z.brandColor,color:z.brandTextColor,_textColor:z.brandTextColor,_linkColor:z.brandTextColor,display:"flex",alignItems:"center",padding:"0 var(--spacing)",lineHeight:"calc(var(--line-height) * var(--h1-scale))",height:z.headerHeight,whiteSpace:"nowrap"},h1:{color:z.brandColor,fontSize:"calc(var(--font-size) * var(--h1-scale))",lineHeight:"calc(var(--line-height) * var(--h1-scale))",fontWeight:"400",borderBottom:`4px solid ${z.barColor}`,margin:`${z.spacing} 0 ${z.spacing200}`,padding:0},"header h2":{color:z.brandTextColor,whiteSpace:"nowrap"},h2:{color:z.brandColor,fontSize:"calc(var(--font-size) * var(--h2-scale))",lineHeight:"calc(var(--line-height) * var(--h2-scale))",margin:"calc(var(--spacing) * var(--h2-scale)) 0"},h3:{fontSize:"calc(var(--font-size) * var(--h3-scale))",lineHeight:"calc(var(--line-height) * var(--h3-scale))",margin:"calc(var(--spacing) * var(--h3-scale)) 0"},"input[type=search]":{borderRadius:99},blockquote:{position:"relative",background:z.insetBg,margin:"0 48px 56px 0",borderRadius:z.spacing,padding:"var(--spacing) calc(var(--spacing) * 2)",filter:`drop-shadow(0px 1px 1px ${z.shadowColor})`},"blockquote > :first-child":{marginTop:"0"},"blockquote > :last-child":{marginBottom:"0"},"blockquote::before":{content:'" "',display:"block",width:1,height:1,border:"10px solid transparent",borderTopColor:z.insetBg,borderRightColor:z.insetBg,position:"absolute",bottom:-20,right:24},"blockquote::after":{content:'" "',width:48,height:48,display:"block",bottom:-48,right:-24,position:"absolute",background:h0(O.tosi(),void 0,void 0,2)},a:{textDecoration:"none",color:z.linkColor,opacity:"0.9",borderBottom:"1px solid var(--brand-color)"},"button, select, .clickable":{display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"ease-out 0.2s",_textColor:z.brandColor,color:z.textColor,textDecoration:"none",background:z.buttonBg,padding:"0 calc(var(--spacing) * 1.25)",border:"none",borderRadius:"calc(var(--spacing) * 0.5)"},"button, select, .clickable, input":{lineHeight:"calc(var(--line-height) + var(--spacing))"},"input, textarea":{border:"none",outline:"none",borderRadius:"calc(var(--spacing) * 0.5)",boxShadow:z.inputBorderShadow},input:{padding:"0 calc(var(--spacing) * 1.5)"},"::placeholder":{color:z.placeholderColor},img:{verticalAlign:"middle"},"button:hover, .clickable:hover":{boxShadow:"inset 0 0 0 2px var(--brand-color)"},"button:active, .clickable:active":{background:z.brandColor,color:z.brandTextColor},label:{display:"inline-flex",gap:"calc(var(--spacing) * 0.5)",alignItems:"center"},".elastic":{flex:"1 1 auto",overflow:"hidden",position:"relative"},"svg.tosi-icon, button svg":{fill:"currentColor",pointerEvents:"none"},"[aria-selected]":{background:"#08835820"},":disabled":{opacity:"0.5",filter:"saturate(0)",pointerEvents:"none"},pre:{background:z.codeBg,padding:z.spacing,borderRadius:"calc(var(--spacing) * 0.25)",overflow:"auto",fontSize:z.codeFontSize,lineHeight:"calc(var(--font-size) * 1.2)"},"pre, code":{fontFamily:z.codeFontFamily,_textColor:z.brandColor},".transparent, .iconic":{background:"none"},".iconic":{padding:"0",fontSize:"150%",height:"calc(var(--line-height) + var(--spacing))",lineHeight:"calc(var(--line-height) + var(--spacing))",width:"calc(var(--line-height) + var(--spacing))",textAlign:"center"},".transparent:hover, .iconic:hover":{background:"#0002",boxShadow:"none",color:z.textColor},".transparent:active, .iconic:active":{background:"#0004",boxShadow:"none",color:z.textColor},".current, summary:has(.current)":{background:z.background},".doc-link":{cursor:"pointer",borderBottom:"none",transition:"0.15s ease-out",marginLeft:"10px",padding:"calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5)"},".doc-link:not(.current):hover":{background:z.background},".doc-link:not(.current)":{opacity:"0.8",marginLeft:0},"tosi-example":{margin:"var(--spacing) 0"},"tosi-example [part=editors]":{background:z.insetBg},"[class*='icon-'], tosi-icon":{color:"currentcolor",pointerEvents:"none"},"[class*='icon-']":{verticalAlign:"middle"},table:{borderCollapse:"collapse"},thead:{background:z.brandColor,color:z.brandTextColor},tbody:{background:z.background},"tr:nth-child(2n)":{background:z.backgroundShaded},"th, td":{padding:"calc(var(--spacing) * 0.5) var(--spacing)"},".doc-nav ul, .doc-nav li":{listStyle:"none",margin:0,padding:0},".doc-nav li":{display:"flex",flexDirection:"column"},".doc-nav":{display:"flex",flexDirection:"column"},".doc-nav details > ul":{paddingLeft:z.spacing},".doc-nav summary":{cursor:"pointer",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-nav summary::marker":{color:z.brandColor},".doc-nav summary > .doc-link":{display:"inline-block",paddingLeft:"calc(var(--spacing) * 0.5)"},".doc-navbar":{listStyle:"none",display:"flex",flexWrap:"wrap",gap:z.spacing,margin:0,padding:z.spacing}}}var{button:Wi,div:Yi}=K,z7="tosi-doc-system-prefs";class r3 extends U{static preferredTagName="tosi-doc-system";static initAttributes={docs:"/docs.json",config:"",localized:"",routing:"",route:"",accent:"",background:"",text:""};context;content=null;corpus;browser;appliedRoute="";suppressed=!1;nestingDepth(){let y=0,x=this.parentNode;while(x){if(x.nodeType===Node.ELEMENT_NODE&&x.tagName==="TOSI-DOC-SYSTEM")y++;x=x.parentNode||x.host||null}return y}prefs;stylesApplied=!1;applyStyles(){if(this.stylesApplied)return;if(this.stylesApplied=!0,!document.querySelector("link[data-tosi-doc-system]"))p1("tosi-doc-system",B7({accent:this.accent||void 0,background:this.background||void 0,text:this.text||void 0}))}applyThemePrefs=()=>{let y=this.prefs.theme.value,x=y==="dark"||y==="system"&&matchMedia("(prefers-color-scheme: dark)").matches;document.body.classList.toggle("darkmode",x),document.body.classList.toggle("high-contrast",this.prefs.highContrast.value)};persistPrefs(){try{localStorage.setItem(z7,JSON.stringify({theme:this.prefs.theme.value,highContrast:this.prefs.highContrast.value,locale:this.prefs.locale.value}))}catch{}}initPrefs(){let y={};try{y=JSON.parse(localStorage.getItem(z7)||"{}")}catch{}this.prefs=e({prefs:{theme:y.theme||"system",highContrast:y.highContrast||!1,locale:y.locale||""}}).prefs,this.applyThemePrefs(),matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.applyThemePrefs),this.prefs.theme.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.highContrast.observe(()=>{this.applyThemePrefs(),this.persistPrefs()}),this.prefs.locale.observe(()=>this.persistPrefs())}async initLocale(){if(!this.localized)return;try{let y=await(await fetch(this.localized)).text();if(a5(y),this.prefs.locale.value)C4(this.prefs.locale.value)}catch(y){console.warn("<tosi-doc-system> could not load localization from",this.localized,y)}}settingsButton(){return Wi({class:"iconic",style:{color:z.linkColor},title:"settings",onClick:(y)=>{let x=[],h="";try{h=JSON.parse(this.config||"{}").projectName||""}catch{}let l=h||document.title||"Documentation";x.push({caption:"Print as PDF",icon:"printer",action:()=>{let C=window.open("","_blank");if(!C){window.alert("Allow pop-ups to print the documentation as a book.");return}C.document.open(),C.document.write(w7(this.corpus,{title:l,autoPrint:!0})),C.document.close()}}),x.push({caption:"Download ePub",icon:"book",action:()=>{let C=document.createElement("a");C.href=`/${v4(l)}.epub`,C.download="",C.click()}}),x.push(null);let i=M.localeOptions.value||[];if(i.length>1)x.push({caption:"Language",icon:"globe",menuItems:i.map((C)=>({caption:C.caption,icon:C.icon,checked:()=>C.value===M.locale.value,action:()=>{this.prefs.locale.value=C.value,C4(C.value)}}))});x.push({caption:"Color Theme",icon:"rgb",menuItems:[{caption:"System",checked:()=>this.prefs.theme.value==="system",action:()=>this.prefs.theme.value="system"},{caption:"Dark",checked:()=>this.prefs.theme.value==="dark",action:()=>this.prefs.theme.value="dark"},{caption:"Light",checked:()=>this.prefs.theme.value==="light",action:()=>this.prefs.theme.value="light"},null,{caption:"High Contrast",checked:()=>this.prefs.highContrast.value,action:()=>this.prefs.highContrast.value=!this.prefs.highContrast.value}]}),L({target:y.target,localized:!0,menuItems:x})}},O.moreVertical())}parseLinks(y){let x=this.querySelector(y);if(!x)return[];return[...x.querySelectorAll("a")].map((h)=>({href:h.getAttribute("href")||"",label:(h.textContent||"").trim(),icon:h.dataset.icon||void 0}))}connectedCallback(){if(super.connectedCallback(),this.nestingDepth()>=2){this.suppressed=!0,this.replaceChildren(Yi({class:"doc-system-nested"},"\uD83D\uDCD6 nested doc-system preview (suppressed)"));return}if(this.applyStyles(),this.initPrefs(),this.initLocale(),this.corpus===void 0){let y=this.docs||"/docs.json";fetch(y).then((x)=>x.json()).then((x)=>{this.corpus=x;let h=A6(location.search,$2(x));if(h){if(h!==location.pathname){location.replace(h+location.hash);return}history.replaceState(null,"",h+location.hash)}this.queueRender()}).catch((x)=>console.error("<tosi-doc-system> could not load docs from",y,x))}}render(){if(super.render(),this.suppressed||this.corpus===void 0)return;if(this.browser!==void 0){let C=this.browser.navigate;if(C&&this.route&&this.route!==this.appliedRoute)this.appliedRoute=this.route,C(this.route);return}let y={};if(this.config)try{y=JSON.parse(this.config)}catch{console.warn("<tosi-doc-system> ignoring invalid config attribute")}let x=this.nestingDepth()>=1,h=x||this.routing==="memory"||this.routing==="internal",l=this.querySelector(".doc-content")||void 0,i=this.parseLinks(".doc-navbar");if(this.appliedRoute=this.route,this.browser=S3({docs:this.corpus,routing:h?"memory":"path",initialRoute:h?this.route||void 0:void 0,onRouteChange:h?(C)=>{this.appliedRoute=C,this.route=C}:void 0,context:this.context||{tosijs:globalThis.xinjs,"tosijs-ui":globalThis.xinjsui},projectName:y.projectName,projectLinks:y.projectLinks,navbarLinks:i.length?i:void 0,contentElement:l}),!x){let C=this.browser.querySelector("header");if(C)C.append(this.settingsButton())}if(this.replaceChildren(this.browser),!x&&typeof document<"u")requestAnimationFrame(()=>{document.body.style.opacity="1"})}}var Fi=r3.elementCreator();var{div:s1,slot:Xi}=K;class N1 extends U{static preferredTagName="tosi-editable";static initAttributes={rotationSnap:0,positionSnap:0};static angleSize=15;static gridSize=8;static snapAngle=!1;static snapToGrid=!1;static shadowStyleSpec={":host":{"--handle-bg":"#fff4","--handle-color":"#2228","--handle-hover-bg":"#8ff8","--handle-hover-color":"#222","--handle-size":"20px","--handle-padding":"2px"},":host ::slotted(*)":{position:"absolute"},":host > :not(style,slot)":{boxSizing:"border-box",content:'" "',position:"absolute",display:"flex",height:z.handleSize,width:z.handleSize,padding:z.handlePadding,"--text-color":z.handleColor,background:z.handleBg},":host > .drag-size":{top:0,bottom:0,left:0,right:0,height:"auto",width:"auto",background:"transparent",cursor:"ew-resize"},':host > [part="rotate"]':{transform:`translateY(${z.handleSize_50})`},":host > [locked] > svg:first-child, :host > :not([locked]) > svg+svg":{display:"none"},":host .icon-unlock":{opacity:0.5},":host svg":{pointerEvents:"none"},":host > *:hover":{"--text-color":z.handleHoverColor,background:z.handleHoverBg}};static snappedCoords(y,x){let{gridSize:h}=N1;return N1.snapToGrid||y.shiftKey?x.map((l)=>Math.round(l/h)*h):x}static snappedAngle(y,x){let{angleSize:h}=N1;return N1.snapAngle||y.shiftKey?Math.round(x/h)*h:x}get locked(){let y=this.parentElement;if(y.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let x=y.style.right.match(/\d/)!==null,h=!x||y.style.left.match(/\d/)!==null,l=y.style.bottom.match(/\d/)!==null,i=!l||y.style.top.match(/\d/)!==null;return{left:h,top:i,bottom:l,right:x}}set locked(y){let{bottom:x,right:h}=y,{left:l,top:i}=y,C=this.parentElement,k=C.offsetLeft,g=C.offsetTop,w=C.offsetWidth,B=C.offsetHeight,j=C.offsetParent.offsetWidth-k-w,V=C.offsetParent.offsetHeight-g-B;if(Object.assign(C.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!h)l=!0;if(!x)i=!0;if(l)C.style.left=k+"px";if(h)C.style.right=j+"px";if(l&&h)C.style.width="auto";else C.style.width=w+"px";if(i)C.style.top=g+"px";if(x)C.style.bottom=V+"px";if(i&&x)C.style.height="auto";else C.style.height=B+"px";this.queueRender()}get coords(){let{top:y,left:x,right:h,bottom:l}=this.parentElement.style;return{top:parseFloat(y),left:parseFloat(x),right:parseFloat(h),bottom:parseFloat(l)}}get left(){return this.parentElement.offsetLeft}get width(){return this.parentElement.offsetWidth}get right(){return this.parentElement.offsetParent.offsetWidth-(this.left+this.width)}get top(){return this.parentElement.offsetTop}get height(){return this.parentElement.offsetHeight}get bottom(){return this.parentElement.offsetParent.offsetHeight-(this.top+this.height)}triggerChange=()=>{this.parentElement.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};adjustPosition=(y)=>{let{locked:x}=this;this.locked=x;let h=this.parentElement,{top:l,left:i,bottom:C,right:k}=this.coords;V1(y,(g,w,B)=>{if([g,w]=N1.snappedCoords(B,[g,w]),!isNaN(l))h.style.top=l+w+"px";if(!isNaN(C))h.style.bottom=C-w+"px";if(!isNaN(i))h.style.left=i+g+"px";if(!isNaN(k))h.style.right=k-g+"px";if(B.type==="mouseup")return this.triggerChange(),!0})};resize=(y)=>{let x=this.parentElement,{locked:h}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[l,i]=[this.right,this.bottom];V1(y,(C,k,g)=>{let w=l-C,B=i-k;if([w,B]=N1.snappedCoords(g,[w,B]),x.style.right=w+"px",x.style.bottom=B+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};adjustSize=(y)=>{let x=this.parentElement,{locked:h}=this,l=y.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let i=this[l];V1(y,(C,k,g)=>{let[w]=N1.snappedCoords(g,[i+(["left","right"].includes(l)?C:k)*(["right","bottom"].includes(l)?-1:1)]);if(x.style[l]=w+"px",g.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let y=this.parentElement.getBoundingClientRect();return{x:y.x+y.width*0.5,y:y.y+y.height*0.5}}get element(){return this.parentElement}adjustRotation=(y)=>{let{center:x}=this,{transformOrigin:h}=this.element.style;if(!h)this.element.style.transformOrigin="50% 50%";V1(y,(l,i,C)=>{let{clientX:k,clientY:g}=C,w=k-x.x,B=g-x.y,j=B>0?90:-90;if(w!==0)j=Math.atan2(B,w)*180/Math.PI;if(j=N1.snappedAngle(C,j),j===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${j}deg)`;return this.triggerChange(),C.type==="mouseup"})};toggleLock=(y)=>{let{locked:x}=this,h=y.target.title.split(" ")[1];x[h]=!x[h],this.locked=x,this.queueRender(),y.stopPropagation(),y.preventDefault()};content=()=>[s1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},O.move()),s1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),s1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),s1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),s1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),s1({part:"resize",style:{top:"100%",left:"100%"}},O.resize()),s1({part:"rotate",style:{top:"50%",right:"0"}},O.refreshCw()),s1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},O.unlock(),O.lock()),s1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},O.unlock(),O.lock()),s1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},O.unlock(),O.lock()),s1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},O.unlock(),O.lock()),Xi()];connectedCallback(){super.connectedCallback();let{left:y,right:x,top:h,bottom:l,lockLeft:i,lockRight:C,lockTop:k,lockBottom:g,move:w,resize:B,rotate:j}=this.parts,V={passive:!0};[y,x,h,l].forEach((_)=>{_.addEventListener("mousedown",this.adjustSize,V),_.addEventListener("touchstart",this.adjustSize,V)}),[i,C,k,g].forEach((_)=>{_.addEventListener("click",this.toggleLock)}),B.addEventListener("mousedown",this.resize,V),w.addEventListener("mousedown",this.adjustPosition,V),j.addEventListener("mousedown",this.adjustRotation,V),B.addEventListener("touchstart",this.resize,V),w.addEventListener("touchstart",this.adjustPosition,V),j.addEventListener("touchstart",this.adjustRotation,V)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:y,lockRight:x,lockTop:h,lockBottom:l}=this.parts,{left:i,right:C,top:k,bottom:g}=this.locked;y.toggleAttribute("locked",i),x.toggleAttribute("locked",C),h.toggleAttribute("locked",k),l.toggleAttribute("locked",g)}}var si=N1.elementCreator();var{div:Ni,input:Zi,button:T3,span:vi}=K,j7=(y)=>y,q7="null filter, everything matches",o3={contains:{caption:"contains",negative:"does not contain",makeTest:(y)=>{return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase().includes(y)}},hasTags:{caption:"has tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((l)=>!h.includes(l))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(y)=>{let x=y.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&x.find((l)=>h.includes(l))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(y)=>{if(isNaN(Number(y)))return y=String(y).toLocaleLowerCase(),(h)=>String(h).toLocaleLowerCase()===y;let x=Number(y);return(h)=>Number(h)===x}},after:{caption:"is after",negative:"is before",makeTest:(y)=>{let x=new Date(y);return(h)=>new Date(h)>x}},greaterThan:{caption:">",negative:"≤",makeTest:(y)=>{if(!isNaN(Number(y))){let x=Number(y);return(h)=>Number(h)>x}return y=y.toLocaleLowerCase(),(x)=>String(x).toLocaleLowerCase()>y}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(y)=>!!y},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(y)=>y===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(y)=>y===!1}},$i={description:"anything",test:()=>!0};function V7(y){return y.options[y.selectedIndex]?.caption||""}class L3 extends U{static preferredTagName="tosi-filter-part";static lightStyleSpec={":host":{display:"flex"},":host .tosi-icon:":{verticalAlign:"middle",pointerEvents:"none"},':host [part="haystack"], :host [part="condition"]':{flex:"1"},':host [part="needle"]':{flex:2},':host [hidden]+[part="padding"]':{display:"block",content:" ",flex:"1 1 auto"}};static initAttributes={haystack:"*",condition:"contains",needle:""};fields=[];filters=o3;content=()=>[G1({part:"haystack"}),G1({part:"condition"}),Zi({part:"needle",type:"search"}),vi({part:"padding"}),T3({part:"remove",title:"delete"},O.trash())];filter=$i;get state(){let{haystack:y,needle:x,condition:h}=this.parts;return{haystack:y.value,needle:x.value,condition:h.value}}set state(y){Object.assign(this,y)}buildFilter=()=>{let{haystack:y,condition:x,needle:h}=this.parts,l=x.value.startsWith("~"),i=l?x.value.slice(1):x.value,C=this.filters[i];h.hidden=C.needsValue===!1;let k=C.needsValue===!1?C.makeTest(void 0):C.makeTest(h.value),g=y.value,w;if(g!=="*")w=l?(V)=>!k(V[g]):(V)=>k(V[g]);else w=l?(V)=>Object.values(V).find((_)=>!k(_))!==void 0:(V)=>Object.values(V).find((_)=>k(_))!==void 0;let B=C.needsValue!==!1?` "${h.value}"`:"",j=`${V7(y)} ${V7(x)}${B}`;this.filter={description:j,test:w},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:y,condition:x,needle:h,remove:l}=this.parts;y.addEventListener("change",this.buildFilter),x.addEventListener("change",this.buildFilter),h.addEventListener("input",this.buildFilter),y.value=this.haystack,x.value=this.condition,h.value=this.needle,l.addEventListener("click",()=>{let{parentElement:i}=this;this.remove(),i?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:y,condition:x,needle:h}=this.parts;if(y.options=[{caption:"any field",value:"*"},...this.fields.map((l)=>l.prop)],x.options=Object.keys(this.filters).map((l)=>{let i=this.filters[l];return i.negative!==void 0?[{caption:i.caption,value:l},{caption:i.negative,value:"~"+l}]:{caption:i.caption,value:l}}).flat(),this.haystack!=="")y.value=this.haystack;if(this.condition!=="")x.value=this.condition;if(this.needle!=="")h.value=this.needle;this.buildFilter()}}var $4=L3.elementCreator();class M3 extends U{static preferredTagName="tosi-filter";static lightStyleSpec={":host":{height:"auto",display:"grid",gridTemplateColumns:"32px calc(100% - 64px) 32px",alignItems:"center"},':host [part="filterContainer"]':{display:"flex",flexDirection:"column",alignItems:"stretch",flex:"1 1 auto"},':host [part="haystack"]':{_fieldWidth:"100px"},':host [part="condition"]':{_fieldWidth:"60px"},':host [part="needle"]':{_fieldWidth:"80px"},':host [part="add"], :host [part="reset"]':{"--button-size":"var(--touch-size, 32px)",borderRadius:"999px",height:"var(--button-size)",lineHeight:"var(--button-size)",margin:"0",padding:"0",textAlign:"center",width:"var(--button-size)",flex:"0 0 var(--button-size)"}};_fields=[];get fields(){return this._fields}set fields(y){this._fields=y,this.queueRender()}get state(){let{filterContainer:y}=this.parts;return[...y.children].map((x)=>x.state)}set state(y){let{fields:x,filters:h}=this,{filterContainer:l}=this.parts;l.textContent="";for(let i of y)l.append($4({fields:x,filters:h,...i}))}filter=j7;description=q7;addFilter=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;h.append($4({fields:y,filters:x}))};content=()=>[T3({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},O.plus()),Ni({part:"filterContainer"}),T3({part:"reset",title:"reset filter",onClick:this.reset},O.x())];filters=o3;reset=()=>{let{fields:y,filters:x}=this,{filterContainer:h}=this.parts;this.description=q7,this.filter=j7,h.textContent="",h.append($4({fields:y,filters:x})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:y}=this.parts;if(y.children.length===0){this.reset();return}let x=[...y.children].map((l)=>l.filter),h=x.map((l)=>l.test);this.description=x.map((l)=>l.description).join(", "),this.filter=(l)=>l.filter((i)=>h.find((C)=>C(i)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:y}=this.parts;y.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var ci=M3.elementCreator();var{form:Ri,slot:n3,tosiSlot:P7,label:Ji,input:Hi,span:fi}=K;function y2(y,x,h){if(h!==""&&h!==!1)y.setAttribute(x,h);else y.removeAttribute(x)}function Di(y){switch(y.type){case"checkbox":return y.checked;case"radio":{let x=y.parentElement?.querySelector(`input[type="radio"][name="${y.name}"]:checked`);return x?x.value:null}case"range":case"number":return Number(y.value);default:return Array.isArray(y.value)&&y.value.length===0?null:y.value}}function _7(y,x){if(!(y instanceof HTMLElement));else if(y instanceof HTMLInputElement)switch(y.type){case"checkbox":y.checked=x;break;case"radio":y.checked=x===y.value;break;default:y.value=String(x||"")}else if(x!=null||y.value!=null)y.value=String(x||"")}class c4 extends U{static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:P.prefixSuffixGap("8px")},':host [part="field"][prefix]::before':{content:"attr(prefix)"},':host [part="field"][suffix]::after':{content:"attr(suffix)"},':host [part="field"] > *, :host [part="input"] > *':{width:"100%"},":host textarea":{resize:"none"},':host input[type="checkbox"]':{width:"fit-content"},":host .hidden":{position:"absolute",pointerEvents:"none",opacity:0}};static initAttributes={caption:"",key:"",type:"",optional:!1,pattern:"",placeholder:"",min:"",max:"",step:"",fixedPrecision:-1,prefix:"",suffix:""};value=null;content=Ji(P7({part:"caption"}),fi({part:"field"},P7({part:"input",name:"input"}),Hi({part:"valueHolder"})));valueChanged=!1;handleChange=()=>{let{input:y,valueHolder:x}=this.parts,h=y.children[0]||x;if(h!==x)x.value=h.value;this.value=Di(h),this.valueChanged=!0;let l=this.closest("tosi-form");if(l&&this.key!=="")switch(this.type){case"checkbox":l.fields[this.key]=h.checked;break;case"number":case"range":if(this.fixedPrecision>-1)h.value=Number(h.value).toFixed(this.fixedPrecision),l.fields[this.key]=Number(h.value);else l.fields[this.key]=Number(h.value);break;default:l.fields[this.key]=h.value}};connectedCallback(){super.connectedCallback();let{input:y,valueHolder:x}=this.parts;x.addEventListener("change",this.handleChange),y.addEventListener("change",this.handleChange,!0)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{input:y,caption:x,valueHolder:h,field:l}=this.parts;if(x.textContent?.trim()==="")x.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){y.textContent="";let i=K.textarea({value:this.value});if(this.placeholder)i.setAttribute("placeholder",this.placeholder);y.append(i)}else if(this.type==="color")y.textContent="",y.append(n5({value:this.value}));else if(y.children.length===0){if(y2(h,"placeholder",this.placeholder),y2(h,"type",this.type),y2(h,"pattern",this.pattern),y2(h,"min",this.min),y2(h,"max",this.max),this.step)y2(h,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")y2(h,"step",Math.pow(10,-this.fixedPrecision))}if(_7(h,this.value),_7(y.children[0],this.value),this.prefix)l.setAttribute("prefix",this.prefix);else l.removeAttribute("prefix");if(this.suffix)l.setAttribute("suffix",this.suffix);else l.removeAttribute("suffix");if(h.classList.toggle("hidden",y.children.length>0),y.children.length>0)h.setAttribute("tabindex","-1");else h.removeAttribute("tabindex");y.style.display=y.children.length===0?"none":"",y2(h,"required",!this.optional)}}class R4 extends U{static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((x)=>x.required!==void 0).find((x)=>!x.reportValidity())===void 0}static shadowStyleSpec={":host":{display:"flex",flexDirection:"column"},":host::part(header), :host::part(footer)":{display:"flex"},":host::part(content)":{display:"flex",flexDirection:"column",overflow:"hidden auto",height:"100%",width:"100%",position:"relative",boxSizing:"border-box"},":host form":{display:"flex",flex:"1 1 auto",position:"relative",overflow:"hidden"}};content=[n3({part:"header",name:"header"}),Ri({part:"form"},n3({part:"content"})),n3({part:"footer",name:"footer"})];getField=(y)=>{return this.querySelector(`tosi-field[key="${y}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch{console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:y}=this,x=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(h,l){return h[l]},set(h,l,i){if(h[l]!==i){h[l]=i;let C=y(l);if(C)C.value=i;x(new Event("change"))}return!0}})}set fields(y){let x=[...this.querySelectorAll("tosi-field")];for(let h of x)h.value=y[h.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(y)=>{y.preventDefault(),y.stopPropagation(),this.syncFieldValues();let x=this.fields;this.submitCallback(x,this.isValid)};submitCallback=(y,x)=>{console.log("override submitCallback to handle this data",{value:y,isValid:x})};connectedCallback(){super.connectedCallback();let{form:y}=this.parts;y.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(y)=>{let x=y.target,h=x.getAttribute("name");if(h&&"value"in x)this.fields[h]=x.value};syncFieldValues(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let l=h.getAttribute("name")||h.getAttribute("key");if(!l)continue;if(y[l]===void 0){let i=h.value??h.getAttribute("value");if(i!=null)y[l]=i}}}initializeNamedElements(){let y=this.fields,x=this.querySelectorAll("[name], [key]");for(let h of x){let l=h.getAttribute("name")||h.getAttribute("key");if(!l)continue;if(y[l]!==void 0)h.value=y[l]}}}var bi=c4,di=R4,A7=c4.elementCreator(),G7=R4.elementCreator(),Si=A7,Ii=G7;var{a:ri}=K;class u3 extends U{static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:P.tosiHeaderPadding("12px 24px"),background:P.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:P.tosiHeaderLineHeight("32px"),gap:P.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:y})=>[y()]}var Ti=u3.elementCreator(),K7={tosijs:()=>O.tosi(),discord:()=>O.discord(),blog:()=>O.blog(),github:()=>O.github(),npm:()=>O.npm()};class a3 extends U{static preferredTagName="tosi-header-links";static lightStyleSpec={":host":{display:"inline-flex",alignItems:"center",gap:"4px"},":host a":{color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",padding:"4px",opacity:"0.8",cursor:"pointer"},":host a:hover":{opacity:"1"}};links={};content=null;render(){super.render();let y=[];for(let[x,h]of Object.entries(this.links)){if(!h||!K7[x])continue;y.push(ri({title:x,target:"_blank",href:h},K7[x]()))}this.replaceChildren(...y)}}var oi=a3.elementCreator();function U7(){return navigator.getGamepads().filter((x)=>x!==null).map((x)=>{let{id:h,axes:l,buttons:i}=x;return{id:h,axes:l,buttons:i.map((C,k)=>{let{pressed:g,value:w}=C;return{index:k,pressed:g,value:w}}).filter((C)=>C.pressed||C.value!==0).reduce((C,k)=>{return C[k.index]=k.value,C},{})}})}function Li(){let y=U7();return y.length===0?"no active gamepads":y.map(({id:x,axes:h,buttons:l})=>{let i=h.map((k)=>k.toFixed(2)).join(" "),C=Object.keys(l).map((k)=>`[${k}](${l[Number(k)].toFixed(2)})`).join(" ");return`${x}
185
189
  ${i}
186
190
  ${C}`}).join(`
187
- `)}function oi(y){let x={};return y.input.onControllerAddedObservable.add((h)=>{h.onMotionControllerInitObservable.add((l)=>{let i={};l.getComponentIds().forEach((k)=>{let g=l.getComponent(k);if(i[k]={pressed:g.pressed,touched:g.touched,value:g.value,axes:{x:g.axes.x,y:g.axes.y}},g.onButtonStateChangedObservable.add((w)=>{i[k].pressed=w.pressed,i[k].touched=w.touched,i[k].value=w.value}),g.onAxisValueChangedObservable)g.onAxisValueChangedObservable.add((w)=>{i[k].axes={x:w.x,y:w.y}})}),x[l.handedness]=i})}),x}function Ti(y){if(y===void 0||Object.keys(y).length===0)return"no xr inputs";return Object.keys(y).map((x)=>{let h=y[x],l=[];for(let[i,C]of Object.entries(h)){let k=[];if(C.pressed)k.push("P");if(C.touched)k.push("T");let g=C.value>0,w=C.axes.x!==0||C.axes.y!==0;if(k.length>0||g||w){let B=`${i}[${k.join("")}]`;if(g)B+=` v:${C.value.toFixed(2)}`;if(w)B+=` x:${C.axes.x.toFixed(2)} y:${C.axes.y.toFixed(2)}`;l.push(B)}}return`${x}
191
+ `)}function Mi(y){let x={};return y.input.onControllerAddedObservable.add((h)=>{h.onMotionControllerInitObservable.add((l)=>{let i={};l.getComponentIds().forEach((k)=>{let g=l.getComponent(k);if(i[k]={pressed:g.pressed,touched:g.touched,value:g.value,axes:{x:g.axes.x,y:g.axes.y}},g.onButtonStateChangedObservable.add((w)=>{i[k].pressed=w.pressed,i[k].touched=w.touched,i[k].value=w.value}),g.onAxisValueChangedObservable)g.onAxisValueChangedObservable.add((w)=>{i[k].axes={x:w.x,y:w.y}})}),x[l.handedness]=i})}),x}function ni(y){if(y===void 0||Object.keys(y).length===0)return"no xr inputs";return Object.keys(y).map((x)=>{let h=y[x],l=[];for(let[i,C]of Object.entries(h)){let k=[];if(C.pressed)k.push("P");if(C.touched)k.push("T");let g=C.value>0,w=C.axes.x!==0||C.axes.y!==0;if(k.length>0||g||w){let B=`${i}[${k.join("")}]`;if(g)B+=` v:${C.value.toFixed(2)}`;if(w)B+=` x:${C.axes.x.toFixed(2)} y:${C.axes.y.toFixed(2)}`;l.push(B)}}return`${x}
188
192
  ${l.join(`
189
193
  `)||"(idle)"}`}).join(`
190
- `)}var{slot:o3}=p;class T3 extends K{static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[o3()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:P.tosiRowGap("0"),alignItems:P.tosiRowAlign("stretch"),justifyContent:P.tosiRowJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-row-gap",this.gap);else this.style.removeProperty("--tosi-row-gap");if(this.align)this.style.setProperty("--tosi-row-align",this.align);else this.style.removeProperty("--tosi-row-align");if(this.justify)this.style.setProperty("--tosi-row-justify",this.justify);else this.style.removeProperty("--tosi-row-justify");this.style.flexWrap=this.wrap?"wrap":""}}var Li=T3.elementCreator();class L3 extends K{static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[o3()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:P.tosiColumnGap("0"),alignItems:P.tosiColumnAlign("stretch"),justifyContent:P.tosiColumnJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-column-gap",this.gap);else this.style.removeProperty("--tosi-column-gap");if(this.align)this.style.setProperty("--tosi-column-align",this.align);else this.style.removeProperty("--tosi-column-align");if(this.justify)this.style.setProperty("--tosi-column-justify",this.justify);else this.style.removeProperty("--tosi-column-justify");this.style.flexWrap=this.wrap?"wrap":""}}var Mi=L3.elementCreator();class M3 extends K{static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[o3()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:P.tosiGridColumns("1fr"),gridTemplateRows:P.tosiGridRows("auto"),gap:P.tosiGridGap("0")}};render(){if(super.render(),this.columns)this.style.setProperty("--tosi-grid-columns",this.columns);else this.style.removeProperty("--tosi-grid-columns");if(this.rows)this.style.setProperty("--tosi-grid-rows",this.rows);else this.style.removeProperty("--tosi-grid-rows");if(this.gap)this.style.setProperty("--tosi-grid-gap",this.gap);else this.style.removeProperty("--tosi-grid-gap")}}var ni=M3.elementCreator(),{span:A7}=p,ui=(...y)=>A7({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...y),n3=(...y)=>A7({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...y);var b1={accent:Q.fromCss("#EE257B"),background:Q.fromCss("#fafafa"),text:Q.fromCss("#222222")},_7={_tosiSpacingXs:"4px",_tosiSpacingSm:"8px",_tosiSpacing:"12px",_tosiSpacingLg:"16px",_tosiSpacingXl:"24px",_tosiFontFamily:"system-ui, -apple-system, sans-serif",_tosiFontSize:"16px",_tosiLineHeight:"1.5",_tosiCodeFontFamily:"ui-monospace, monospace",_tosiCodeFontSize:"14px",_tosiTouchSize:"44px",_tosiBorderRadius:"4px",_tosiBorderRadiusLg:"8px",_tosiTransition:"0.15s ease-out"};function G7(y){let{accent:x,background:h,text:l}=y,i=y.accentText??x.contrasting(),C=y.backgroundInset??h.darken(0.03),k=y.border??l.opacity(0.15),g=y.shadow??l.opacity(0.1),w=y.focus??x.opacity(0.5);return{_tosiAccent:x,_tosiAccentLight:x.brighten(0.15),_tosiAccentDark:x.darken(0.15),_tosiAccentText:i,_tosiBg:h,_tosiBgInset:C,_tosiBgHover:h.darken(0.05),_tosiBgActive:h.darken(0.1),_tosiText:l,_tosiTextMuted:l.opacity(0.6),_tosiTextDisabled:l.opacity(0.4),_tosiBorder:k,_tosiBorderFocus:x,_tosiShadow:g,_tosiShadowColor:g,_tosiFocusRing:`0 0 0 2px ${w}`,_tosiInputBg:h,_tosiInputBorder:k,_tosiInputBorderFocus:x,_tosiButtonBg:h,_tosiButtonText:l,_tosiButtonBorder:k,_tosiButtonHoverBg:h.darken(0.05),_tosiButtonActiveBg:x,_tosiButtonActiveText:i}}function J2(y){return{":root":{..._7,...G7(y)}}}function R4(y){let h=J2(y)[":root"];return{":root":y0(h)}}function u3(y,x="tosi-theme"){O1(x,y)}var ai=J2(b1),mi=R4(b1),p7={"--xin-icon-size":z.tosiIconSize,"--xin-icon-fill":z.tosiIconFill,"--xin-icon-stroke":z.tosiIconStroke,"--xin-tabs-bar-color":z.tosiTabsBarColor,"--xin-tabs-bar-height":z.tosiTabsBarHeight,"--xin-tabs-selected-color":z.tosiTabsSelectedColor,"--spacing":z.tosiSpacing,"--gap":z.tosiSpacingSm,"--touch-size":z.tosiTouchSize,"--background":z.tosiBg,"--text-color":z.tosiText,"--brand-color":z.tosiAccent,"--brand-text-color":z.tosiAccentText};function ti(y){return{":root":{...J2(y)[":root"],...p7}}}function Ei(y,x){let h={};for(let[l,i]of Object.entries(x)){let C=`--tosi-${y}-${l.replace(/([A-Z])/g,"-$1").toLowerCase()}`;h[l]=`var(${C}, ${i})`}return h}var{div:f2,label:J4,input:f4,span:ei,button:K7}=p,{liveTheme:o}=e({liveTheme:{accent:String(b1.accent),background:String(b1.background),text:String(b1.text),dark:!1}}),H4=!1;function F0(){if(!H4)return;let y={accent:Q.fromCss(o.accent.value),background:Q.fromCss(o.background.value),text:Q.fromCss(o.text.value)},x=o.dark.value?R4(y):J2(y);u3(x,"tosi-live-theme")}function U7(){if(H4)return;H4=!0,o.accent.observe(F0),o.background.observe(F0),o.text.observe(F0),o.dark.observe(F0),F0()}function yC(){H4=!1}class a3 extends K{static preferredTagName="tosi-theme-editor";static shadowStyleSpec={":host":{display:"block",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"14px",lineHeight:"1.5",background:"#ffffff",color:"#222222",padding:"16px",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",maxWidth:"320px"},":host .field":{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},":host label":{flex:"1",fontWeight:"500"},':host input[type="color"]':{width:"48px",height:"32px",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",padding:"2px"},':host input[type="checkbox"]':{width:"18px",height:"18px",cursor:"pointer"},":host .preview":{marginTop:"12px",padding:"12px",borderRadius:"4px",transition:"all 0.15s ease-out"},":host .preview-button":{border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions":{marginTop:"8px",display:"flex",gap:"8px"},":host .actions button":{flex:"1",padding:"6px 12px",border:"1px solid #ccc",borderRadius:"4px",background:"#f5f5f5",color:"#222",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions button:hover":{background:"#e8e8e8"}};content=()=>[f2({class:"field"},J4("Accent"),f4({type:"color",part:"accent"})),f2({class:"field"},J4("Background"),f4({type:"color",part:"background"})),f2({class:"field"},J4("Text"),f4({type:"color",part:"text"})),f2({class:"field"},J4("Dark mode"),f4({type:"checkbox",part:"dark"})),f2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},ei("Preview "),K7({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),f2({class:"actions"},K7({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),U7();let y=()=>{this.parts.accent.value=o.accent.value,this.parts.background.value=o.background.value,this.parts.text.value=o.text.value,this.parts.dark.checked=o.dark.value};y(),o.accent.observe(y),o.background.observe(y),o.text.observe(y),o.dark.observe(y),this.parts.accent.addEventListener("input",()=>{o.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{o.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{o.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{o.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{o.accent.value=String(b1.accent),o.background.value=String(b1.background),o.text.value=String(b1.text),o.dark.value=!1})}}var xC=a3.elementCreator();var{div:hC}=p;class P2 extends K{static preferredTagName="tosi-map";static formAssociated=!0;static initAttributes={coords:"65.01715565258993,25.48081004203459,12",token:"",mapStyle:"mapbox://styles/mapbox/streets-v12",name:""};value="";formDisabledCallback(y){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=hC({style:{width:"100%",height:"100%"}});get map(){return this._map}static mapboxCSSAvailable;static mapboxAvailable;_map;static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"400px",height:"400px",textAlign:"left"}};constructor(){super();if(P2.mapboxCSSAvailable===void 0)P2.mapboxCSSAvailable=e0("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((y)=>{console.error("failed to load mapbox-gl.css",y)}),P2.mapboxAvailable=_1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((y)=>{console.error("failed to load mapbox-gl.js",y)})}connectedCallback(){if(super.connectedCallback(),!this.token)console.error("mapbox requires an access token which you can provide via the token attribute")}_lastCoords="";_lastStyle="";render(){if(super.render(),!this.token)return;if(this._map){if(this.coords!==this._lastCoords){let[i,C,k]=this.coords.split(",").map((g)=>Number(g));this._map.setCenter([C,i]),this._map.setZoom(k),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}let{div:y}=this.parts,[x,h,l]=this.coords.split(",").map((i)=>Number(i));this._lastCoords=this.coords,this._lastStyle=this.mapStyle,P2.mapboxAvailable.then(({mapboxgl:i})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;"),i.accessToken=this.token,this._map=new i.Map({container:y,style:this.mapStyle,zoom:l,center:[h,x]}),this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let C=this._map.getCenter(),k=this._map.getZoom(),g=`${C.lat.toFixed(6)},${C.lng.toFixed(6)},${k.toFixed(1)}`;if(g!==this.value){if(this.internals)this.internals.setFormValue(g)}})})}}var lC=P2.elementCreator();function O7(y,x){if(x==null)x="";else if(typeof x!=="string")x=String(x);return x.replace(/\{\{([^}]+)\}\}/g,(h,l)=>{let i=E[`${y}${l.startsWith("[")?l:"."+l}`];return i===void 0?h:O7(y,String(i))})}class b4 extends K{static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let y=await fetch(this.src);this.value=await y.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),E[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let y=O7(this.instanceId,this.value);if(this.elements){let x=y.split(`
194
+ `)}var{slot:m3}=K;class t3 extends U{static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[m3()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:P.tosiRowGap("0"),alignItems:P.tosiRowAlign("stretch"),justifyContent:P.tosiRowJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-row-gap",this.gap);else this.style.removeProperty("--tosi-row-gap");if(this.align)this.style.setProperty("--tosi-row-align",this.align);else this.style.removeProperty("--tosi-row-align");if(this.justify)this.style.setProperty("--tosi-row-justify",this.justify);else this.style.removeProperty("--tosi-row-justify");this.style.flexWrap=this.wrap?"wrap":""}}var ui=t3.elementCreator();class E3 extends U{static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[m3()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:P.tosiColumnGap("0"),alignItems:P.tosiColumnAlign("stretch"),justifyContent:P.tosiColumnJustify("flex-start")}};render(){if(super.render(),this.gap)this.style.setProperty("--tosi-column-gap",this.gap);else this.style.removeProperty("--tosi-column-gap");if(this.align)this.style.setProperty("--tosi-column-align",this.align);else this.style.removeProperty("--tosi-column-align");if(this.justify)this.style.setProperty("--tosi-column-justify",this.justify);else this.style.removeProperty("--tosi-column-justify");this.style.flexWrap=this.wrap?"wrap":""}}var ai=E3.elementCreator();class e3 extends U{static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[m3()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:P.tosiGridColumns("1fr"),gridTemplateRows:P.tosiGridRows("auto"),gap:P.tosiGridGap("0")}};render(){if(super.render(),this.columns)this.style.setProperty("--tosi-grid-columns",this.columns);else this.style.removeProperty("--tosi-grid-columns");if(this.rows)this.style.setProperty("--tosi-grid-rows",this.rows);else this.style.removeProperty("--tosi-grid-rows");if(this.gap)this.style.setProperty("--tosi-grid-gap",this.gap);else this.style.removeProperty("--tosi-grid-gap")}}var mi=e3.elementCreator(),{span:O7}=K,ti=(...y)=>O7({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...y),y9=(...y)=>O7({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...y);var D1={accent:W.fromCss("#EE257B"),background:W.fromCss("#fafafa"),text:W.fromCss("#222222")},p7={_tosiSpacingXs:"4px",_tosiSpacingSm:"8px",_tosiSpacing:"12px",_tosiSpacingLg:"16px",_tosiSpacingXl:"24px",_tosiFontFamily:"system-ui, -apple-system, sans-serif",_tosiFontSize:"16px",_tosiLineHeight:"1.5",_tosiCodeFontFamily:"ui-monospace, monospace",_tosiCodeFontSize:"14px",_tosiTouchSize:"44px",_tosiBorderRadius:"4px",_tosiBorderRadiusLg:"8px",_tosiTransition:"0.15s ease-out"};function Q7(y){let{accent:x,background:h,text:l}=y,i=y.accentText??x.contrasting(),C=y.backgroundInset??h.darken(0.03),k=y.border??l.opacity(0.15),g=y.shadow??l.opacity(0.1),w=y.focus??x.opacity(0.5);return{_tosiAccent:x,_tosiAccentLight:x.brighten(0.15),_tosiAccentDark:x.darken(0.15),_tosiAccentText:i,_tosiBg:h,_tosiBgInset:C,_tosiBgHover:h.darken(0.05),_tosiBgActive:h.darken(0.1),_tosiText:l,_tosiTextMuted:l.opacity(0.6),_tosiTextDisabled:l.opacity(0.4),_tosiBorder:k,_tosiBorderFocus:x,_tosiShadow:g,_tosiShadowColor:g,_tosiFocusRing:`0 0 0 2px ${w}`,_tosiInputBg:h,_tosiInputBorder:k,_tosiInputBorderFocus:x,_tosiButtonBg:h,_tosiButtonText:l,_tosiButtonBorder:k,_tosiButtonHoverBg:h.darken(0.05),_tosiButtonActiveBg:x,_tosiButtonActiveText:i}}function J2(y){return{":root":{...p7,...Q7(y)}}}function J4(y){let h=J2(y)[":root"];return{":root":y0(h)}}function x9(y,x="tosi-theme"){p1(x,y)}var Ei=J2(D1),ei=J4(D1),W7={"--xin-icon-size":z.tosiIconSize,"--xin-icon-fill":z.tosiIconFill,"--xin-icon-stroke":z.tosiIconStroke,"--xin-tabs-bar-color":z.tosiTabsBarColor,"--xin-tabs-bar-height":z.tosiTabsBarHeight,"--xin-tabs-selected-color":z.tosiTabsSelectedColor,"--spacing":z.tosiSpacing,"--gap":z.tosiSpacingSm,"--touch-size":z.tosiTouchSize,"--background":z.tosiBg,"--text-color":z.tosiText,"--brand-color":z.tosiAccent,"--brand-text-color":z.tosiAccentText};function yC(y){return{":root":{...J2(y)[":root"],...W7}}}function xC(y,x){let h={};for(let[l,i]of Object.entries(x)){let C=`--tosi-${y}-${l.replace(/([A-Z])/g,"-$1").toLowerCase()}`;h[l]=`var(${C}, ${i})`}return h}var{div:H2,label:H4,input:f4,span:hC,button:Y7}=K,{liveTheme:T}=e({liveTheme:{accent:String(D1.accent),background:String(D1.background),text:String(D1.text),dark:!1}}),D4=!1;function X0(){if(!D4)return;let y={accent:W.fromCss(T.accent.value),background:W.fromCss(T.background.value),text:W.fromCss(T.text.value)},x=T.dark.value?J4(y):J2(y);x9(x,"tosi-live-theme")}function F7(){if(D4)return;D4=!0,T.accent.observe(X0),T.background.observe(X0),T.text.observe(X0),T.dark.observe(X0),X0()}function lC(){D4=!1}class h9 extends U{static preferredTagName="tosi-theme-editor";static shadowStyleSpec={":host":{display:"block",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"14px",lineHeight:"1.5",background:"#ffffff",color:"#222222",padding:"16px",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",maxWidth:"320px"},":host .field":{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},":host label":{flex:"1",fontWeight:"500"},':host input[type="color"]':{width:"48px",height:"32px",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",padding:"2px"},':host input[type="checkbox"]':{width:"18px",height:"18px",cursor:"pointer"},":host .preview":{marginTop:"12px",padding:"12px",borderRadius:"4px",transition:"all 0.15s ease-out"},":host .preview-button":{border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions":{marginTop:"8px",display:"flex",gap:"8px"},":host .actions button":{flex:"1",padding:"6px 12px",border:"1px solid #ccc",borderRadius:"4px",background:"#f5f5f5",color:"#222",cursor:"pointer",fontFamily:"inherit",fontSize:"13px"},":host .actions button:hover":{background:"#e8e8e8"}};content=()=>[H2({class:"field"},H4("Accent"),f4({type:"color",part:"accent"})),H2({class:"field"},H4("Background"),f4({type:"color",part:"background"})),H2({class:"field"},H4("Text"),f4({type:"color",part:"text"})),H2({class:"field"},H4("Dark mode"),f4({type:"checkbox",part:"dark"})),H2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},hC("Preview "),Y7({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),H2({class:"actions"},Y7({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),F7();let y=()=>{this.parts.accent.value=T.accent.value,this.parts.background.value=T.background.value,this.parts.text.value=T.text.value,this.parts.dark.checked=T.dark.value};y(),T.accent.observe(y),T.background.observe(y),T.text.observe(y),T.dark.observe(y),this.parts.accent.addEventListener("input",()=>{T.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{T.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{T.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{T.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{T.accent.value=String(D1.accent),T.background.value=String(D1.background),T.text.value=String(D1.text),T.dark.value=!1})}}var iC=h9.elementCreator();var{div:CC}=K;class P2 extends U{static preferredTagName="tosi-map";static formAssociated=!0;static initAttributes={coords:"65.01715565258993,25.48081004203459,12",token:"",mapStyle:"mapbox://styles/mapbox/streets-v12",name:""};value="";formDisabledCallback(y){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=CC({style:{width:"100%",height:"100%"}});get map(){return this._map}static mapboxCSSAvailable;static mapboxAvailable;_map;static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"400px",height:"400px",textAlign:"left"}};constructor(){super();if(P2.mapboxCSSAvailable===void 0)P2.mapboxCSSAvailable=e0("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((y)=>{console.error("failed to load mapbox-gl.css",y)}),P2.mapboxAvailable=A1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((y)=>{console.error("failed to load mapbox-gl.js",y)})}connectedCallback(){if(super.connectedCallback(),!this.token)console.error("mapbox requires an access token which you can provide via the token attribute")}_lastCoords="";_lastStyle="";render(){if(super.render(),!this.token)return;if(this._map){if(this.coords!==this._lastCoords){let[i,C,k]=this.coords.split(",").map((g)=>Number(g));this._map.setCenter([C,i]),this._map.setZoom(k),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}let{div:y}=this.parts,[x,h,l]=this.coords.split(",").map((i)=>Number(i));this._lastCoords=this.coords,this._lastStyle=this.mapStyle,P2.mapboxAvailable.then(({mapboxgl:i})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;"),i.accessToken=this.token,this._map=new i.Map({container:y,style:this.mapStyle,zoom:l,center:[h,x]}),this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let C=this._map.getCenter(),k=this._map.getZoom(),g=`${C.lat.toFixed(6)},${C.lng.toFixed(6)},${k.toFixed(1)}`;if(g!==this.value){if(this.internals)this.internals.setFormValue(g)}})})}}var kC=P2.elementCreator();function X7(y,x){if(x==null)x="";else if(typeof x!=="string")x=String(x);return x.replace(/\{\{([^}]+)\}\}/g,(h,l)=>{let i=E[`${y}${l.startsWith("[")?l:"."+l}`];return i===void 0?h:X7(y,String(i))})}class b4 extends U{static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let y=await fetch(this.src);this.value=await y.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),E[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let y=X7(this.instanceId,this.value);if(this.elements){let x=y.split(`
191
195
  `).reduce((h,l)=>{if(l.startsWith("<")||h.length===0)h.push(l);else{let i=h[h.length-1];if(!i.startsWith("<")||!i.endsWith(">"))h[h.length-1]+=`
192
- `+l;else h.push(l)}return h},[]);this.innerHTML=x.map((h)=>h.startsWith("<")&&h.endsWith(">")?h:c(h,this.options)).join("")}else this.innerHTML=c(y,this.options);this.didRender()}}var iC=b4,m3=b4.elementCreator(),CC=m3,kC=m3;var{div:t3,span:D4,button:E3}=p,X0=86400000,gC=[0,1,2,3,4,5,6],wC=[1,2,3,4,5,6,7,8,9,10,11,12],e3=(y,x=2,h="0")=>String(y).padStart(x,h),N0=(y,x,h)=>new Date(`${y}-${e3(x)}-${e3(h)}`);class y9 extends K{static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:P.disabledOpacity(0.6)},':host [part="month"], :host [part="year"]':{_fieldWidth:"4em",flex:"1"},":host [part=week], :host [part=days]":{display:"grid",gridTemplateColumns:"auto auto auto auto auto auto auto",justifyItems:"stretch"},":host .today":{background:P.monthTodayBackground("transparent"),boxShadow:P.monthTodayShadow("none"),backdropFilter:P.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:P.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:P.monthDayColor("hotpink"),background:P.monthDayBackground("white"),fontWeight:P.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:P.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:P.monthDateCheckedColor("white"),background:P.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:P.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:P.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:P.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:P.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:P.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:N0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:N0(new Date().getFullYear()+10,12,31).toISOString().split("T")[0],selectable:!1,multiple:!1,range:!1,disabled:!1,readonly:!1,required:!1,name:""};selectedDays=[];value="";formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return wC.map((y)=>({caption:N0(2025,y,1).toString().split(" ")[1],value:String(y)}))}get years(){let y=Number(this.minDate.split("-")[0]),x=Number(this.maxDate.split("-")[0]),h=[];for(let l=y;l<=x;l++)h.push(String(l));return h}monthChanged=(y,x)=>{};gotoMonth(y,x){if(this.month!==x||this.year!==y)this.month=x,this.year=y,this.monthChanged(y,x)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(y){this.selectedDays[1]=y,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(y){this.selectedDays[0]=y,this.selectedDays.splice(2)}clickDate=(y)=>{let x=y.target.getAttribute("title");this.selectDate(x)};keyDate=(y)=>{let x=!1;switch(y.code){case"Space":{let h=y.target.getAttribute("title");this.selectDate(h),x=!0;break}case"Tab":break;default:console.log(y)}if(x)y.preventDefault(),y.stopPropagation()};#y="";selectDate=(y)=>{if(this.#y=y,this.range){if(!this.to)this.selectedDays=[y,y];else if(this.from===y&&this.to===y)this.selectedDays=[];else if(this.from===y)this.from=this.to;else if(this.to===y)this.to=this.from;else if(y<this.from)this.from=y;else if(y>this.to)this.to=y;else this.to=y;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(y))this.selectedDays.splice(this.selectedDays.indexOf(y),1);else this.selectedDays.push(y),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(y))this.value="",this.selectedDays=[];else this.value=y,this.selectedDays=[y]};nextMonth=()=>{if(this.month<12)this.gotoMonth(this.year,this.month+1);else this.gotoMonth(this.year+1,1)};previousMonth=()=>{if(this.month>1)this.gotoMonth(this.year,this.month-1);else this.gotoMonth(this.year-1,12)};checkDay=(y)=>{if(!this.range)return this.selectedDays.includes(y);else if(this.range)return this.from&&y>=this.from&&y<=this.to;return!1};dateMenuItem=(y,x="")=>{return y=y.split("T")[0],{caption:x||y,enabled:()=>!y.startsWith(`${this.year}-${e3(this.month)}-`),action:()=>{this.gotoDate(y)}}};jumpMenu=()=>{L({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((y)=>this.dateMenuItem(y))]})};content=()=>[t3({part:"header"},E3({part:"previous",onClick:this.previousMonth},U.chevronLeft()),D4({style:{flex:"1"}}),E3({part:"jump",onClick:this.jumpMenu},U.calendar()),G1({part:"month",options:this.months,onChange:this.setMonth}),G1({part:"year",options:[this.year],onChange:this.setMonth}),D4({style:{flex:"1"}}),E3({part:"next",onClick:this.nextMonth},U.chevronRight())),t3({part:"week"}),t3({part:"days"})];gotoDate(y){let x=new Date(y);this.gotoMonth(x.getFullYear(),x.getMonth()+1)}connectedCallback(){super.connectedCallback();let y=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=y.getMonth()+1;if(isNaN(this.year))this.year=y.getFullYear()}days=[];render(){super.render();let{week:y,days:x,jump:h,month:l,year:i,previous:C,next:k}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let g=N0(this.year,this.month,1),w=new Date(g.valueOf()-(7+g.getDay()-this.weekStart)%7*X0),B=this.month===12?1:this.month+1,j=new Date(N0(this.year+(this.month===12?1:0),B,1).valueOf()-X0),V=new Date(j.valueOf()+(this.weekStart*2+5+this.endDay-j.getDay())%7*X0),A=gC.map((Y)=>new Date(w.valueOf()+Y*X0).toString().split(" ")[0]);this.days=[];let O=new Date().toISOString().split("T")[0];for(let Y=w.valueOf();Y<=V.valueOf();Y+=X0){let $=new Date(Y),R=$.toISOString().split("T")[0];this.days.push({date:$,selected:!1,inMonth:$.getMonth()+1===this.month,isToday:R===O,isWeekend:$.getDay()%6===0,inRange:!!(this.from&&R>=this.from&&R<=this.to)})}l.value=String(this.month),i.value=String(this.year),l.disabled=i.disabled=h.disabled=C.disabled=k.disabled=this.disabled||this.readonly,i.options=this.years,y.textContent="",y.append(...A.map((Y)=>D4({class:"day"},Y))),x.textContent="";let G=null,{to:W,from:F}=this;x.append(...this.days.map((Y)=>{let $=["date"];if(Y.inMonth)$.push("in-month");if(Y.isToday)$.push("today");let R=Y.date.toISOString().split("T")[0];if(this.checkDay(R))$.push("checked");if($.push(Y.isWeekend?"weekend":"weekday"),this.range){if(W===R)$.push("range-end");if(F===R)$.push("range-start")}let r=D4({class:$.join(" "),title:R,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},Y.date.getDate());if(R===this.#y)G=r;return r})),G?.focus()}}var BC=y9.elementCreator();var{div:x9,button:zC}=p,jC={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class x2 extends K{static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${z.notificationSpacing} ${z.notificationSpacing50} ${z.notificationSpacing} ${z.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:z.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:z.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:z.notificationSpacing,width:z.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:z.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important",color:z.notificationTextColor},":host .note":{display:"grid",background:z.notificationBg,padding:z.notificationPadding,gridTemplateColumns:`${z.notificationIconSize} 1fr ${z.notificationButtonSize}`,gap:z.notificationSpacing,alignItems:"center",borderRadius:z.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${z.notificationAccentColor}`,borderColor:z.notificationAccentColor,borderWidth:z.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note button":{display:"flex",lineHeight:z.notificationButtonSize,padding:0,margin:0,height:z.notificationButtonSize,width:z.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:z.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:z.notificationBg,background:z.notificationAccentColor,padding:z.spacing50},":host .note svg":{height:z.notificationIconSize,width:z.notificationIconSize,pointerEvents:"none",color:z.notificationAccentColor},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:z.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(y){y.classList.add("closing"),y.style.marginBottom=-y.offsetHeight+"px";let x=()=>{y.remove()};y.addEventListener("transitionend",x),setTimeout(x,1000)}static post(y){let{message:x,duration:h,type:l,close:i,progress:C,icon:k,color:g}=Object.assign({type:"info",duration:-1},typeof y==="string"?{message:y}:y);if(!this.singleton)this.singleton=h9();let w=this.singleton;document.body.append(w),w.style.zIndex=String(g2()+1);let B=g||jC[l],j=C||l==="progress"?p.progress():{},V=()=>{if(i)i();x2.removeNote(G)},A=k instanceof SVGElement?k:k?U[k]():U.info(),O=l==="error"||l==="warn",G=x9({class:`note ${l}`,role:O?"alert":"status",ariaLive:O?"assertive":"polite",style:{_notificationAccentColor:B}},A,x9({class:"message"},x9(x),j),zC({class:"close",title:"close",ariaLabel:"Close notification",apply(W){W.addEventListener("click",V)}},U.x()));if(w.shadowRoot.append(G),j instanceof HTMLProgressElement&&C instanceof Function){j.setAttribute("max",String(100)),j.value=C();let W=setInterval(()=>{if(!w.shadowRoot.contains(G)){clearInterval(W);return}let F=C();if(j.value=F,F>=100)x2.removeNote(G)},1000)}if(h>0)setTimeout(()=>{x2.removeNote(G)},h*1000);return G.scrollIntoView(),V}content=null}var qC=x2,h9=x2.elementCreator(),VC=h9;function PC(y){return x2.post(y)}var s7=async(y,x="SHA-1")=>{let l=new TextEncoder().encode(y),i=await crypto.subtle.digest(x,l);return Array.from(new Uint8Array(i)).map((g)=>g.toString(16).padStart(2,"0")).join("")},Q7=async(y)=>{let x=await s7(y),h=await fetch(`https://weakpass.com/api/v1/search/${x}`);if(h.ok){let l=await h.json();console.log("password found in weakpass database",l)}return h.status!==404},{span:l9,tosiSlot:AC}=p;class d4 extends K{static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:z.spacing50,position:"relative"},":host tosi-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:P.meterHeight("24px"),background:P.indicatorBg("white"),borderRadius:P.meterRadius("4px"),boxShadow:P.meterShadow(`inset 0 0 0 2px ${z.indicatorColor}`)},':host [part="level"]':{height:P.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:z.indicatorColor,margin:P.levelMargin("2px"),borderRadius:P.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:z.descriptionColor,height:P.meterHeight("24px"),lineHeight:P.meterHeight("24px"),textAlign:"center"}};static initAttributes={minLength:8,goodLength:12,indicatorColors:"#f00,#f40,#f80,#ef0,#8f0,#0a2"};descriptionColors="#000,#000,#000,#000,#000,#fff";issues={tooShort:!0,short:!0,noUpper:!0,noLower:!0,noNumber:!0,noSpecial:!0};issueDescriptions={tooShort:"too short",short:"short",noUpper:"no upper case",noLower:"no lower case",noNumber:"no digits",noSpecial:"no unusual characters"};value=0;strengthDescriptions=["unacceptable","very weak","weak","moderate","strong","very strong"];strength(y){return this.issues={tooShort:y.length<this.minLength,short:y.length<this.goodLength,noUpper:!y.match(/[A-Z]/),noLower:!y.match(/[a-z]/),noNumber:!y.match(/[0-9]/),noSpecial:!y.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((x)=>!x).length-1}async isBreached(){let y=this.querySelector("input")?.value;if(!y||typeof y!=="string")return!0;return await Q7(y)}updateIndicator=(y)=>{let{level:x,description:h}=this.parts,l=this.indicatorColors.split(","),i=this.descriptionColors.split(","),C=this.strength(y);if(this.value!==C)this.value=C,this.dispatchEvent(new Event("change"));x.style.width=`${(C+1)*16.67}%`,this.style.setProperty("--indicator-color",l[C]),this.style.setProperty("--description-color",i[C]),h.textContent=this.strengthDescriptions[C]};update=(y)=>{let x=y.target.closest("input");this.updateIndicator(x?.value||"")};content=()=>[AC({onInput:this.update}),l9({part:"meter"},l9({part:"level"}),l9({part:"description"}))];render(){super.render();let y=this.querySelector("input");this.updateIndicator(y?.value)}}var _C=d4,W7=d4.elementCreator(),GC=W7;var{span:i9}=p;class S4 extends K{static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"#ccc",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(y){this.readonly=y}formResetCallback(){this.value=""}static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"fit-content"},":host::part(container)":{position:"relative",display:"inline-block"},":host::part(empty), :host::part(filled)":{height:"100%",whiteSpace:"nowrap",overflow:"hidden"},":host::part(empty)":{pointerEvents:"none"},":host::part(filled)":{position:"absolute",left:0,transition:"width 0.15s ease-out"},":host svg":{transform:"scale(0.9)",pointerEvents:"all !important",transition:"0.25s ease-in-out"},":host svg:hover":{transform:"scale(1)"},":host svg:active":{transform:"scale(1.1)"}};content=()=>i9({part:"container"},i9({part:"empty"}),i9({part:"filled"}));displayValue(y){let{empty:x,filled:h}=this.parts,i=Math.round((typeof y==="string"?0:y||0)/this.step)*this.step;h.style.width=i/this.max*x.offsetWidth+"px"}update=(y)=>{if(this.readonly)return;let{empty:x}=this.parts,h=y instanceof MouseEvent?y.pageX-x.getBoundingClientRect().x:0,l=Math.min(Math.max(this.min,Math.round(h/x.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(y.type==="click")this.value=l;else if(y.type==="mousemove")this.displayValue(l);else this.displayValue(this.value||0)};handleKey=(y)=>{let x=this.value===""?NaN:Number(this.value);if(isNaN(x))x=Math.round((this.min+this.max)*0.5*this.step)*this.step;let h=!1;switch(y.key){case"ArrowUp":case"ArrowRight":x+=this.step,h=!0;break;case"ArrowDown":case"ArrowLeft":x-=this.step,h=!0;break}if(this.value=Math.max(Math.min(x,this.max),this.min),h)y.stopPropagation(),y.preventDefault()};connectedCallback(){super.connectedCallback();let{container:y}=this.parts;y.tabIndex=0,y.addEventListener("mousemove",this.update,!0),y.addEventListener("mouseleave",this.update),y.addEventListener("blur",this.update),y.addEventListener("click",this.update),y.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let y=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",y),this.readonly)this.role="image";else this.role="slider";this.ariaLabel=`rating ${this.value} out of ${this.max}`,this.ariaValueMax=String(this.max),this.ariaValueMin=String(this.min),this.ariaValueNow=this.value===""?String(-1):String(this.value);let{empty:x,filled:h}=this.parts;if(x.style.setProperty("--tosi-icon-fill",this.hollow?"none":this.emptyFill),x.style.setProperty("--tosi-icon-stroke",this.emptyStroke),h.style.setProperty("--tosi-icon-fill",this.ratingFill),h.style.setProperty("--tosi-icon-stroke",this.ratingStroke),this._renderedIcon!==this.icon){this._renderedIcon=this.icon;for(let l=0;l<this.max;l++)x.append(U[this.icon]()),h.append(U[this.icon]())}this.displayValue(this.value)}}var pC=S4,Y7=S4.elementCreator(),KC=B1((...y)=>Y7(...y),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{tosiSlot:F7,div:UC,button:OC}=p,sC=[{caption:"Title",tagType:"H1"},{caption:"Heading",tagType:"H2"},{caption:"Subheading",tagType:"H3"},{caption:"Minor heading",tagType:"H4"},{caption:"Body",tagType:"P"},{caption:"Code Block",tagType:"PRE"}];function C9(y=sC){return G1({title:"paragraph style",slot:"toolbar",class:"block-style",options:y.map(({caption:x,tagType:h})=>({caption:x,value:`formatBlock,${h}`}))})}var v0=()=>n3({slot:"toolbar"});function v1(y,x,h){return OC({slot:"toolbar",dataCommand:x,title:y},h)}var QC=()=>[v1("left-justify","justifyLeft",U.alignLeft()),v1("center","justifyCenter",U.alignCenter()),v1("right-justify","justifyRight",U.alignRight()),v0(),v1("bullet list","insertUnorderedList",U.listBullet()),v1("numbered list","insertOrderedList",U.listNumber()),v0(),v1("indent","indent",U.indent()),v1("indent","outdent",U.outdent())],X7=()=>[v1("bold","bold",U.fontBold()),v1("italic","italic",U.fontItalic()),v1("underline","underline",U.fontUnderline())],WC=()=>[C9(),v0(),...X7()],N7=()=>[C9(),v0(),...QC(),v0(),...X7()];class I4 extends K{static preferredTagName="tosi-rich-text";static lightStyleSpec={":host":{display:"flex",flexDirection:"column",height:"100%"},':host [part="toolbar"]':{padding:4,display:"flex",gap:"0px",flex:"0 0 auto",flexWrap:"wrap"},':host [part="toolbar"] > button':{_xinIconSize:18}};static formAssociated=!0;static initAttributes={widgets:"default",name:"",required:!1};isInitialized=!1;savedValue="";formDisabledCallback(y){if(this.isInitialized)this.parts.doc.contentEditable=y?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(y){let x=this._value;if(this._value=y,this.isInitialized){if(this.parts.doc.innerHTML!==y)this.parts.doc.innerHTML=y}if(x!==y&&this.internals)this.internals.setFormValue(y)}blockElement(y){let{doc:x}=this.parts;while(y.parentElement!==null&&y.parentElement!==x)y=y.parentElement;return y.parentElement===x?y:void 0}get selectedBlocks(){let{doc:y}=this.parts,x=window.getSelection();if(x===null)return[];let h=[];for(let l=0;l<x.rangeCount;l++){let i=x.getRangeAt(l);if(!y.contains(i.commonAncestorContainer))continue;let C=this.blockElement(i.startContainer),k=this.blockElement(i.endContainer);h.push(C);while(C!==k&&C!==null)C=C.nextElementSibling,h.push(C)}return h}get selectedText(){let y=window.getSelection();if(y===null)return"";return this.selectedBlocks.length?y.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(y)=>{if(this._updatingBlockStyle)return;let h=y.target?.closest(R1.tagName);if(h==null)return;this.doCommand(h.value)};handleButtonClick=(y)=>{let h=y.target?.closest("button");if(h==null)return;this.doCommand(h.dataset.command)};content=[F7({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),UC({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),F7({part:"content"})];doCommand(y){if(y===void 0)return;let x=y.split(",");console.log("execCommand",x[0],!1,...x.slice(1)),document.execCommand(x[0],!1,...x.slice(1))}updateBlockStyle(){let y=this.parts.toolbar.querySelector(".block-style");if(y===null)return;let x=this.selectedBlocks.map((h)=>h.tagName);x=[...new Set(x)],this._updatingBlockStyle=!0,y.value=x.length===1?`formatBlock,${x[0]}`:"",this._updatingBlockStyle=!1}hasContent(){return(this.parts.doc.textContent||"").trim().length>0}handleInput=()=>{if(this.internals)this.internals.setFormValue(this.parts.doc.innerHTML),this.updateValidity()};updateValidity(){if(this.internals)if(this.required&&!this.hasContent())this.internals.setValidity({valueMissing:!0},"Please enter some content",this.parts.doc);else this.internals.setValidity({})}connectedCallback(){super.connectedCallback();let{doc:y,content:x}=this.parts;if(x.innerHTML!==""&&y.innerHTML==="")y.innerHTML=x.innerHTML,x.innerHTML="";this.isInitialized=!0,x.style.display="none",y.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(h)=>{this.updateBlockStyle(),this.selectionChange(h,this)})}render(){let{toolbar:y}=this.parts;if(super.render(),y.children.length===0)switch(this.widgets){case"minimal":y.append(...WC());break;case"default":y.append(...N7());break}}}var YC=I4,v7=I4.elementCreator(),FC=B1((...y)=>v7(...y),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:Z0}=e({router:{path:"",hash:"",pattern:""}}),k9={};function XC(){return{...k9}}var r4=[],g9=!1,o4=new Set;function NC(y){let x=[];if(y==="")return{regex:/^\/?$/,paramNames:x};let h=y.split("/").map((i)=>{if(i.startsWith(":"))return x.push(i.slice(1)),"([^/]+)";return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+h.join("/")+"/?$"),paramNames:x}}function vC(y){let x=y.split("?")[0].split("#")[0];for(let l of r4){if(l.fallback)continue;let i=x.match(l.regex);if(i){let C={};return l.paramNames.forEach((k,g)=>{C[k]=decodeURIComponent(i[g+1])}),{route:l,params:C}}}let h=r4.find((l)=>l.fallback);if(h)return{route:h,params:{}};return null}function $0(){let y=g9?window.location.hash.replace(/^#\/?/,""):window.location.pathname;Z0.path.value=y,Z0.hash.value=window.location.hash;let x=vC(y);if(x){k9=x.params,Z0.pattern.value=x.route.regex.source;let h=new Map;for(let l of x.route.targets)h.set(l.view??"default",l);for(let l of o4){let i=l.name||"default",C=h.get(i);if(C)l.replaceChildren(C.component(x.params));else l.replaceChildren()}}else{k9={},Z0.pattern.value="";for(let h of o4)h.replaceChildren()}}var Z7=!1;function $7(){if(Z7)return;Z7=!0,window.addEventListener("popstate",$0),window.addEventListener("hashchange",$0)}function ZC(y,x={}){g9=x.hashRouting??!1,r4=y.map((h)=>{let{regex:l,paramNames:i}=NC(h.pattern);return{regex:l,paramNames:i,targets:h.targets,fallback:h.fallback??!1}}),$7(),$0()}function $C(y){if($7(),g9)window.location.hash="#/"+y.replace(/^\//,"");else window.history.pushState({},"","/"+y.replace(/^\//,""));$0()}class w9 extends K{static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),o4.add(this),r4.length>0)$0()}disconnectedCallback(){super.disconnectedCallback(),o4.delete(this)}}var cC=w9.elementCreator();var{div:RC,slot:JC,label:fC,span:HC,input:c7}=p;class H2 extends K{static preferredTagName="tosi-segmented";static formAssociated=!0;static initAttributes={direction:"row",other:"",multiple:!1,name:"",placeholder:"Please specify…",localized:!1,required:!1};_choices=[];get choices(){return this._choices}set choices(y){if(typeof y==="string")this._choices=H2.parseChoicesString(y);else this._choices=y;this.queueRender()}static parseChoicesString(y){return y.split(",").filter((x)=>x.trim()!=="").map((x)=>{let[h,l]=x.split("=").map((g)=>g.trim()),[i,C]=(l||h).split(":").map((g)=>g.trim()),k=C?U[C]():"";return{value:h,icon:k,caption:i}})}value="";formDisabledCallback(y){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((y)=>y.trim()).filter((y)=>y!=="")}content=()=>[JC(),RC({part:"options"},c7({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:P.segmentedOptionGap("8px"),alignItems:P.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:P.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:P.segmentedOptionGap("8px"),gridTemplateColumns:P.segmentedOptionGridColumns("0px 24px 1fr"),padding:P.segmentedOptionPadding("4px 12px"),font:P.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:P.segmentedFocusShadow(`inset 0 0 0 2px ${P.segmentedOptionCurrentBackground("#44a")}`),borderRadius:P.segmentedOptionsBorderRadius("8px")},":host label.current":{color:P.segmentedOptionCurrentColor("#eee"),background:P.segmentedOptionCurrentBackground("#44a")},":host label.current:focus":{boxShadow:P.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${P.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:P.segmentOptionIconSize("16px"),stroke:P.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:P.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:P.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:P.segmentedOptionsBorderRadius("8px"),background:P.segmentedOptionsBackground("#fff"),color:P.segmentedOptionColor("#222"),overflow:"hidden",alignItems:P.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:P.segmentedOptionPadding("4px 12px"),color:P.segmentedOptionCurrentColor("#eee"),background:P.segmentedOptionCurrentBackground("#44a"),font:P.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:P.segmentedOptionCurrentColor("#eee"),opacity:P.segmentedPlaceholderOpacity(0.75)}};syncCurrent(){let{options:y}=this.parts;y.querySelectorAll("label").forEach((x)=>{let h=x.querySelector("input");x.classList.toggle("current",Boolean(h&&h.checked))})}valueChanged=!1;handleChange=()=>{let{options:y,custom:x}=this.parts;if(this.multiple){let h=[...y.querySelectorAll("input:checked")];this.value=h.map((l)=>l.value).join(",")}else{let h=y.querySelector("input:checked");if(!h)this.value="";else if(h.value)x.setAttribute("hidden",""),this.value=h.value;else x.removeAttribute("hidden"),x.focus(),x.select(),this.value=x.value}this.syncCurrent(),this.valueChanged=!0};handleKey=(y)=>{let x=!1;switch(y.code){case"Space":if(y.target instanceof HTMLLabelElement)y.target.click(),x=!0;break;case"Tab":if(!(y.target instanceof HTMLLabelElement))y.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let h=y.target.closest("label");if(h.previousElementSibling instanceof HTMLLabelElement)h.previousElementSibling.focus()}x=!0;break;case"ArrowRight":case"ArrowDown":{let h=y.target.closest("label");if(h.nextElementSibling instanceof HTMLLabelElement)h.nextElementSibling.focus()}x=!0;break}if(x)y.preventDefault(),y.stopPropagation()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("choices");if(y&&this._choices.length===0)this._choices=H2.parseChoicesString(y);let{options:x}=this.parts;if(this.name==="")this.name=this.instanceId;if(x.addEventListener("change",this.handleChange),x.addEventListener("keydown",this.handleKey),this.other&&this.multiple)console.warn(this,"is set to [other] and [multiple]; [other] will be ignored"),this.other=""}get _choicesWithOther(){let y=[...this.choices];if(this.other&&!this.multiple){let[x,h]=this.other.split(":");y.push({value:"",caption:x,icon:h})}return y}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((y)=>y.value===this.value))}render(){if(super.render(),this.valueChanged){this.valueChanged=!1;return}let{options:y,custom:x}=this.parts;y.textContent="";let h=this.multiple?"checkbox":"radio",{values:l,isOtherValue:i}=this;if(y.append(...this._choicesWithOther.map((C)=>{return fC({tabindex:0},c7({type:h,name:this.name,value:C.value,checked:l.includes(C.value)||C.value===""&&i,tabIndex:-1}),C.icon||{class:"no-icon"},this.localized?s1(C.caption):HC(C.caption))})),this.other&&!this.multiple)x.hidden=!i,x.value=i?this.value:"",x.placeholder=this.placeholder,y.append(x);this.syncCurrent()}}var bC=H2,R7=H2.elementCreator(),DC=B1((...y)=>R7(...y),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:J7}=p;class B9 extends K{static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[J7({part:"normal"}),J7({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};onResize=()=>{let{normal:y,small:x}=this.parts,h=this.offsetParent;if(!(h instanceof HTMLElement))return;else if(h.offsetWidth<this.minWidth||h.offsetHeight<this.minHeight)y.hidden=!0,x.hidden=!1,this.value="small";else y.hidden=!1,x.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.onResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.onResize)}}var dC=B9.elementCreator();class T4 extends K{static preferredTagName="tosi-sizer";target=null;static shadowStyleSpec={":host":{_resizeIconFill:"#222",display:"block",position:"absolute",bottom:-7,right:-7,padding:14,width:44,height:44,opacity:0.25,transition:"opacity 0.25s ease-out"},":host(:hover)":{opacity:0.5},":host svg":{width:16,height:16,stroke:z.resizeIconFill}};content=U.resize();get minSize(){let{minWidth:y,minHeight:x}=getComputedStyle(this.target);return{width:parseFloat(y)||32,height:parseFloat(x)||32}}resizeTarget=(y)=>{let{target:x}=this;if(!x)return;let{offsetWidth:h,offsetHeight:l}=x;x.style.left=x.offsetLeft+"px",x.style.top=x.offsetTop+"px",x.style.bottom="",x.style.right="";let{minSize:i}=this;V1(y,(C,k,g)=>{if(x.style.width=Math.max(i.width,h+C)+"px",x.style.height=Math.max(i.height,l+k)+"px",g.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let y={passive:!0};this.addEventListener("mousedown",this.resizeTarget,y),this.addEventListener("touchstart",this.resizeTarget,y)}}var SC=T4,f7=T4.elementCreator(),IC=f7;var{div:rC,input:oC,span:TC,button:z9}=p,H7=(y)=>y.split(/(?<!\\),/).map((x)=>x.trim().replace(/\\,/g,",")),LC=(y)=>y.map((x)=>x.replace(/,/g,"\\,")).join(",");class c0 extends K{static preferredTagName="tosi-tag";static lightStyleSpec={":host":{"--tag-close-button-color":"#000c","--tag-close-button-bg":"#fffc","--tag-button-opacity":"0.5","--tag-button-hover-opacity":"0.75","--tag-bg":P.brandColor("blue"),"--tag-text-color":P.brandTextColor("white"),display:"inline-flex",borderRadius:P.tagRoundedRadius(z.spacing50),color:z.tagTextColor,background:z.tagBg,padding:`0 ${z.spacing75} 0 ${z.spacing75}`,height:`calc(${z.lineHeight} + ${z.spacing50})`,lineHeight:`calc(${z.lineHeight} + ${z.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:P.fontSize("16px"),color:z.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${z.spacing_50} 0 ${z.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:z.spacing150,width:z.spacing150,color:z.tagCloseButtonColor,background:z.tagCloseButtonBg,borderRadius:P.tagCloseButtonRadius("99px"),opacity:z.tagButtonOpacity},':host [part="remove"]:hover':{background:z.tagCloseButtonBg,opacity:z.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[TC({part:"caption"},this.caption),z9(U.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var MC=c0,j9=c0.elementCreator(),nC=B1((...y)=>j9(...y),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class b2 extends K{static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:z.tagListBg,gap:z.spacing25,borderRadius:P.taglistRoundedRadius(z.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${z.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${z.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:z.inputBg,borderRadius:P.tagContainerRadius(z.spacing50),boxShadow:z.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:z.spacing25,minHeight:`calc(${z.lineHeight} + ${z.spacing})`,padding:z.spacing25},':host [part="tagMenu"]':{width:z.touchSize,height:z.touchSize,lineHeight:z.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:z.brandColor,color:z.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return H7(this.value).filter((y)=>y!=="")}set tags(y){this.value=LC(y)}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(y){if(typeof y==="string")this._availableTags=b2.parseAvailableTagsString(y);else this._availableTags=y;this.queueRender()}static parseAvailableTagsString(y){return H7(y).map((x)=>x===""?null:x)}connectedCallback(){super.connectedCallback();let y=this.getAttribute("available-tags");if(y&&this._availableTags.length===0)this._availableTags=b2.parseAvailableTagsString(y)}formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}addTag=(y)=>{let x=y.trim();if(x===""||this.tags.includes(x))return;this.tags=[...this.tags,x],this.queueRender(!0)};toggleTag=(y)=>{if(this.tags.includes(y))this.tags=this.tags.filter((x)=>x!==y),this.queueRender(!0);else this.addTag(y)};enterTag=(y)=>{let{tagInput:x}=this.parts;switch(y.key){case",":{let h=x.value.split(",")[0];this.addTag(h)}break;case"Enter":{let h=x.value.split(",")[0];this.addTag(h)}y.stopPropagation(),y.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:y}=this,{tagMenu:x}=this.parts,h=[...this.availableTags],l=this.tags.filter((C)=>!h.includes(C));if(l.length)h.push(null,...l);let i=h.map((C)=>{if(C===""||C===null)return null;else if(typeof C==="object")return{checked:()=>this.tags.includes(C.value),caption:C.caption,action(){y(C.value)}};else return{checked:()=>this.tags.includes(C),caption:C,action(){y(C)}}});L({target:x,width:"auto",menuItems:i})};content=()=>[z9({type:"button",style:{visibility:"hidden"},tabindex:-1}),rC({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),oC({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),z9({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},U.chevronDown())];removeTag=(y)=>{if(this.editable&&!this.disabled){let x=y.target.closest(c0.tagName);this.tags=this.tags.filter((h)=>h!==x.caption),x.remove(),this.queueRender(!0)}y.stopPropagation(),y.preventDefault()};render(){super.render();let{tagContainer:y,tagMenu:x,tagInput:h}=this.parts;if(x.disabled=this.disabled,h.value="",h.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)x.toggleAttribute("hidden",!1),h.toggleAttribute("hidden",!this.textEntry);else x.toggleAttribute("hidden",!0),h.toggleAttribute("hidden",!0);y.textContent="";for(let l of this.tags)y.append(j9({caption:l,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var uC=b2,b7=b2.elementCreator(),aC=B1((...y)=>b7(...y),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var D7="1.6.13";var{span:mC}=p,R0=null,L4=null,M4=null,D1="tosi-tooltip",tC={[`.${D1}`]:{pointerEvents:"none",padding:P.tosiTooltipPadding("4px 10px"),borderRadius:P.tosiTooltipRadius("6px"),background:P.tosiTooltipBg("#333"),color:P.tosiTooltipColor("#fff"),fontSize:P.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:P.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${D1} p`]:{margin:"0"},[`.${D1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${D1} a`]:{color:"inherit"},[`.${D1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${D1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${D1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${D1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${D1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}},d7=!1;function S7(){if(d7)return;d7=!0,O1("tosi-tooltip",tC)}function D2(){if(L4!==null)clearTimeout(L4),L4=null;if(R0!==null)R0.remove(),R0=null;M4=null}function EC(y){if(y.startsWith("s"))return"tt-s";if(y.startsWith("n"))return"tt-n";if(y.startsWith("e"))return"tt-e";if(y.startsWith("w"))return"tt-w";return"tt-s"}function eC(y,x,h){let l=x.getBoundingClientRect(),i=y.getBoundingClientRect(),C=l.left+l.width*0.5,k=l.top+l.height*0.5,g;if(h.startsWith("s")||h.startsWith("n"))g=Math.max(8,Math.min(i.width-8,C-i.left))-4;else g=Math.max(8,Math.min(i.height-8,k-i.top))-4;y.style.setProperty("--tosi-tooltip-arrow",g+"px")}function yk(y,x){if(x)y=b(y);let h=mC({class:D1});return h.innerHTML=c.parseInline(y),h}function xk(y,x,h){S7(),D2(),M4=y;let{top:l,left:i,width:C}=y.getBoundingClientRect(),k=i+C*0.5,g=window.innerHeight,w=window.innerWidth,B=(l>g*0.5?"n":"s")+(k>w*0.5?"w":"e"),j=yk(x,h);j.classList.add(EC(B)),R0=C0({content:j,target:y,position:B,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(R0&&M4)eC(j,y,B)})}function hk(y){for(let x of y.composedPath())if(x instanceof HTMLElement&&x.dataset.tooltip)return x;return null}function lk(y={}){S7();let{convertTitles:x=!0,delay:h=250,localize:l=!1}=y;document.addEventListener("pointermove",(i)=>{if(x){for(let g of i.composedPath())if(g instanceof HTMLElement&&g.title&&!g.dataset.tooltip){g.dataset.tooltip=g.title,g.removeAttribute("title");break}}let C=hk(i);if(C===M4)return;if(D2(),!C)return;let k=C.dataset.tooltip||null;if(!k)return;L4=setTimeout(()=>xk(C,k,l),h)}),document.addEventListener("pointerleave",D2),document.addEventListener("pointerdown",D2),document.addEventListener("keydown",D2),window.addEventListener("scroll",D2,!0)}Object.assign(globalThis,{xinjs:x0,xinjsui:q9});})();
196
+ `+l;else h.push(l)}return h},[]);this.innerHTML=x.map((h)=>h.startsWith("<")&&h.endsWith(">")?h:c(h,this.options)).join("")}else this.innerHTML=c(y,this.options);this.didRender()}}var gC=b4,l9=b4.elementCreator(),wC=l9,BC=l9;var{div:i9,span:d4,button:C9}=K,s0=86400000,zC=[0,1,2,3,4,5,6],jC=[1,2,3,4,5,6,7,8,9,10,11,12],k9=(y,x=2,h="0")=>String(y).padStart(x,h),N0=(y,x,h)=>new Date(`${y}-${k9(x)}-${k9(h)}`);class g9 extends U{static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:P.disabledOpacity(0.6)},':host [part="month"], :host [part="year"]':{_fieldWidth:"4em",flex:"1"},":host [part=week], :host [part=days]":{display:"grid",gridTemplateColumns:"auto auto auto auto auto auto auto",justifyItems:"stretch"},":host .today":{background:P.monthTodayBackground("transparent"),boxShadow:P.monthTodayShadow("none"),backdropFilter:P.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:P.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:P.monthDayColor("hotpink"),background:P.monthDayBackground("white"),fontWeight:P.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:P.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:P.monthDateCheckedColor("white"),background:P.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:P.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:P.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:P.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:P.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:P.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:N0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:N0(new Date().getFullYear()+10,12,31).toISOString().split("T")[0],selectable:!1,multiple:!1,range:!1,disabled:!1,readonly:!1,required:!1,name:""};selectedDays=[];value="";formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return jC.map((y)=>({caption:N0(2025,y,1).toString().split(" ")[1],value:String(y)}))}get years(){let y=Number(this.minDate.split("-")[0]),x=Number(this.maxDate.split("-")[0]),h=[];for(let l=y;l<=x;l++)h.push(String(l));return h}monthChanged=(y,x)=>{};gotoMonth(y,x){if(this.month!==x||this.year!==y)this.month=x,this.year=y,this.monthChanged(y,x)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(y){this.selectedDays[1]=y,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(y){this.selectedDays[0]=y,this.selectedDays.splice(2)}clickDate=(y)=>{let x=y.target.getAttribute("title");this.selectDate(x)};keyDate=(y)=>{let x=!1;switch(y.code){case"Space":{let h=y.target.getAttribute("title");this.selectDate(h),x=!0;break}case"Tab":break;default:console.log(y)}if(x)y.preventDefault(),y.stopPropagation()};#y="";selectDate=(y)=>{if(this.#y=y,this.range){if(!this.to)this.selectedDays=[y,y];else if(this.from===y&&this.to===y)this.selectedDays=[];else if(this.from===y)this.from=this.to;else if(this.to===y)this.to=this.from;else if(y<this.from)this.from=y;else if(y>this.to)this.to=y;else this.to=y;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(y))this.selectedDays.splice(this.selectedDays.indexOf(y),1);else this.selectedDays.push(y),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(y))this.value="",this.selectedDays=[];else this.value=y,this.selectedDays=[y]};nextMonth=()=>{if(this.month<12)this.gotoMonth(this.year,this.month+1);else this.gotoMonth(this.year+1,1)};previousMonth=()=>{if(this.month>1)this.gotoMonth(this.year,this.month-1);else this.gotoMonth(this.year-1,12)};checkDay=(y)=>{if(!this.range)return this.selectedDays.includes(y);else if(this.range)return this.from&&y>=this.from&&y<=this.to;return!1};dateMenuItem=(y,x="")=>{return y=y.split("T")[0],{caption:x||y,enabled:()=>!y.startsWith(`${this.year}-${k9(this.month)}-`),action:()=>{this.gotoDate(y)}}};jumpMenu=()=>{L({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((y)=>this.dateMenuItem(y))]})};content=()=>[i9({part:"header"},C9({part:"previous",onClick:this.previousMonth},O.chevronLeft()),d4({style:{flex:"1"}}),C9({part:"jump",onClick:this.jumpMenu},O.calendar()),G1({part:"month",options:this.months,onChange:this.setMonth}),G1({part:"year",options:[this.year],onChange:this.setMonth}),d4({style:{flex:"1"}}),C9({part:"next",onClick:this.nextMonth},O.chevronRight())),i9({part:"week"}),i9({part:"days"})];gotoDate(y){let x=new Date(y);this.gotoMonth(x.getFullYear(),x.getMonth()+1)}connectedCallback(){super.connectedCallback();let y=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=y.getMonth()+1;if(isNaN(this.year))this.year=y.getFullYear()}days=[];render(){super.render();let{week:y,days:x,jump:h,month:l,year:i,previous:C,next:k}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let g=N0(this.year,this.month,1),w=new Date(g.valueOf()-(7+g.getDay()-this.weekStart)%7*s0),B=this.month===12?1:this.month+1,j=new Date(N0(this.year+(this.month===12?1:0),B,1).valueOf()-s0),V=new Date(j.valueOf()+(this.weekStart*2+5+this.endDay-j.getDay())%7*s0),_=zC.map((F)=>new Date(w.valueOf()+F*s0).toString().split(" ")[0]);this.days=[];let p=new Date().toISOString().split("T")[0];for(let F=w.valueOf();F<=V.valueOf();F+=s0){let $=new Date(F),R=$.toISOString().split("T")[0];this.days.push({date:$,selected:!1,inMonth:$.getMonth()+1===this.month,isToday:R===p,isWeekend:$.getDay()%6===0,inRange:!!(this.from&&R>=this.from&&R<=this.to)})}l.value=String(this.month),i.value=String(this.year),l.disabled=i.disabled=h.disabled=C.disabled=k.disabled=this.disabled||this.readonly,i.options=this.years,y.textContent="",y.append(..._.map((F)=>d4({class:"day"},F))),x.textContent="";let G=null,{to:Y,from:X}=this;x.append(...this.days.map((F)=>{let $=["date"];if(F.inMonth)$.push("in-month");if(F.isToday)$.push("today");let R=F.date.toISOString().split("T")[0];if(this.checkDay(R))$.push("checked");if($.push(F.isWeekend?"weekend":"weekday"),this.range){if(Y===R)$.push("range-end");if(X===R)$.push("range-start")}let r=d4({class:$.join(" "),title:R,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},F.date.getDate());if(R===this.#y)G=r;return r})),G?.focus()}}var qC=g9.elementCreator();var{div:w9,button:VC}=K,PC={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class x2 extends U{static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${z.notificationSpacing} ${z.notificationSpacing50} ${z.notificationSpacing} ${z.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:z.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:z.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:z.notificationSpacing,width:z.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:z.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important",color:z.notificationTextColor},":host .note":{display:"grid",background:z.notificationBg,padding:z.notificationPadding,gridTemplateColumns:`${z.notificationIconSize} 1fr ${z.notificationButtonSize}`,gap:z.notificationSpacing,alignItems:"center",borderRadius:z.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${z.notificationAccentColor}`,borderColor:z.notificationAccentColor,borderWidth:z.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note button":{display:"flex",lineHeight:z.notificationButtonSize,padding:0,margin:0,height:z.notificationButtonSize,width:z.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:z.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:z.notificationBg,background:z.notificationAccentColor,padding:z.spacing50},":host .note svg":{height:z.notificationIconSize,width:z.notificationIconSize,pointerEvents:"none",color:z.notificationAccentColor},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:z.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(y){y.classList.add("closing"),y.style.marginBottom=-y.offsetHeight+"px";let x=()=>{y.remove()};y.addEventListener("transitionend",x),setTimeout(x,1000)}static post(y){let{message:x,duration:h,type:l,close:i,progress:C,icon:k,color:g}=Object.assign({type:"info",duration:-1},typeof y==="string"?{message:y}:y);if(!this.singleton)this.singleton=B9();let w=this.singleton;document.body.append(w),w.style.zIndex=String(g2()+1);let B=g||PC[l],j=C||l==="progress"?K.progress():{},V=()=>{if(i)i();x2.removeNote(G)},_=k instanceof SVGElement?k:k?O[k]():O.info(),p=l==="error"||l==="warn",G=w9({class:`note ${l}`,role:p?"alert":"status",ariaLive:p?"assertive":"polite",style:{_notificationAccentColor:B}},_,w9({class:"message"},w9(x),j),VC({class:"close",title:"close",ariaLabel:"Close notification",apply(Y){Y.addEventListener("click",V)}},O.x()));if(w.shadowRoot.append(G),j instanceof HTMLProgressElement&&C instanceof Function){j.setAttribute("max",String(100)),j.value=C();let Y=setInterval(()=>{if(!w.shadowRoot.contains(G)){clearInterval(Y);return}let X=C();if(j.value=X,X>=100)x2.removeNote(G)},1000)}if(h>0)setTimeout(()=>{x2.removeNote(G)},h*1000);return G.scrollIntoView(),V}content=null}var _C=x2,B9=x2.elementCreator(),AC=B9;function GC(y){return x2.post(y)}var s7=async(y,x="SHA-1")=>{let l=new TextEncoder().encode(y),i=await crypto.subtle.digest(x,l);return Array.from(new Uint8Array(i)).map((g)=>g.toString(16).padStart(2,"0")).join("")},N7=async(y)=>{let x=await s7(y),h=await fetch(`https://weakpass.com/api/v1/search/${x}`);if(h.ok){let l=await h.json();console.log("password found in weakpass database",l)}return h.status!==404},{span:z9,tosiSlot:KC}=K;class S4 extends U{static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:z.spacing50,position:"relative"},":host tosi-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:P.meterHeight("24px"),background:P.indicatorBg("white"),borderRadius:P.meterRadius("4px"),boxShadow:P.meterShadow(`inset 0 0 0 2px ${z.indicatorColor}`)},':host [part="level"]':{height:P.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:z.indicatorColor,margin:P.levelMargin("2px"),borderRadius:P.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:z.descriptionColor,height:P.meterHeight("24px"),lineHeight:P.meterHeight("24px"),textAlign:"center"}};static initAttributes={minLength:8,goodLength:12,indicatorColors:"#f00,#f40,#f80,#ef0,#8f0,#0a2"};descriptionColors="#000,#000,#000,#000,#000,#fff";issues={tooShort:!0,short:!0,noUpper:!0,noLower:!0,noNumber:!0,noSpecial:!0};issueDescriptions={tooShort:"too short",short:"short",noUpper:"no upper case",noLower:"no lower case",noNumber:"no digits",noSpecial:"no unusual characters"};value=0;strengthDescriptions=["unacceptable","very weak","weak","moderate","strong","very strong"];strength(y){return this.issues={tooShort:y.length<this.minLength,short:y.length<this.goodLength,noUpper:!y.match(/[A-Z]/),noLower:!y.match(/[a-z]/),noNumber:!y.match(/[0-9]/),noSpecial:!y.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((x)=>!x).length-1}async isBreached(){let y=this.querySelector("input")?.value;if(!y||typeof y!=="string")return!0;return await N7(y)}updateIndicator=(y)=>{let{level:x,description:h}=this.parts,l=this.indicatorColors.split(","),i=this.descriptionColors.split(","),C=this.strength(y);if(this.value!==C)this.value=C,this.dispatchEvent(new Event("change"));x.style.width=`${(C+1)*16.67}%`,this.style.setProperty("--indicator-color",l[C]),this.style.setProperty("--description-color",i[C]),h.textContent=this.strengthDescriptions[C]};update=(y)=>{let x=y.target.closest("input");this.updateIndicator(x?.value||"")};content=()=>[KC({onInput:this.update}),z9({part:"meter"},z9({part:"level"}),z9({part:"description"}))];render(){super.render();let y=this.querySelector("input");this.updateIndicator(y?.value)}}var UC=S4,Z7=S4.elementCreator(),OC=Z7;var{span:j9}=K;class I4 extends U{static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"#ccc",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(y){this.readonly=y}formResetCallback(){this.value=""}static shadowStyleSpec={":host":{display:"inline-block",position:"relative",width:"fit-content"},":host::part(container)":{position:"relative",display:"inline-block"},":host::part(empty), :host::part(filled)":{height:"100%",whiteSpace:"nowrap",overflow:"hidden"},":host::part(empty)":{pointerEvents:"none"},":host::part(filled)":{position:"absolute",left:0,transition:"width 0.15s ease-out"},":host svg":{transform:"scale(0.9)",pointerEvents:"all !important",transition:"0.25s ease-in-out"},":host svg:hover":{transform:"scale(1)"},":host svg:active":{transform:"scale(1.1)"}};content=()=>j9({part:"container"},j9({part:"empty"}),j9({part:"filled"}));displayValue(y){let{empty:x,filled:h}=this.parts,i=Math.round((typeof y==="string"?0:y||0)/this.step)*this.step;h.style.width=i/this.max*x.offsetWidth+"px"}update=(y)=>{if(this.readonly)return;let{empty:x}=this.parts,h=y instanceof MouseEvent?y.pageX-x.getBoundingClientRect().x:0,l=Math.min(Math.max(this.min,Math.round(h/x.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(y.type==="click")this.value=l;else if(y.type==="mousemove")this.displayValue(l);else this.displayValue(this.value||0)};handleKey=(y)=>{let x=this.value===""?NaN:Number(this.value);if(isNaN(x))x=Math.round((this.min+this.max)*0.5*this.step)*this.step;let h=!1;switch(y.key){case"ArrowUp":case"ArrowRight":x+=this.step,h=!0;break;case"ArrowDown":case"ArrowLeft":x-=this.step,h=!0;break}if(this.value=Math.max(Math.min(x,this.max),this.min),h)y.stopPropagation(),y.preventDefault()};connectedCallback(){super.connectedCallback();let{container:y}=this.parts;y.tabIndex=0,y.addEventListener("mousemove",this.update,!0),y.addEventListener("mouseleave",this.update),y.addEventListener("blur",this.update),y.addEventListener("click",this.update),y.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let y=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",y),this.readonly)this.role="image";else this.role="slider";this.ariaLabel=`rating ${this.value} out of ${this.max}`,this.ariaValueMax=String(this.max),this.ariaValueMin=String(this.min),this.ariaValueNow=this.value===""?String(-1):String(this.value);let{empty:x,filled:h}=this.parts;if(x.style.setProperty("--tosi-icon-fill",this.hollow?"none":this.emptyFill),x.style.setProperty("--tosi-icon-stroke",this.emptyStroke),h.style.setProperty("--tosi-icon-fill",this.ratingFill),h.style.setProperty("--tosi-icon-stroke",this.ratingStroke),this._renderedIcon!==this.icon){this._renderedIcon=this.icon;for(let l=0;l<this.max;l++)x.append(O[this.icon]()),h.append(O[this.icon]())}this.displayValue(this.value)}}var pC=I4,v7=I4.elementCreator(),QC=B1((...y)=>v7(...y),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{tosiSlot:$7,div:WC,button:YC}=K,FC=[{caption:"Title",tagType:"H1"},{caption:"Heading",tagType:"H2"},{caption:"Subheading",tagType:"H3"},{caption:"Minor heading",tagType:"H4"},{caption:"Body",tagType:"P"},{caption:"Code Block",tagType:"PRE"}];function q9(y=FC){return G1({title:"paragraph style",slot:"toolbar",class:"block-style",options:y.map(({caption:x,tagType:h})=>({caption:x,value:`formatBlock,${h}`}))})}var Z0=()=>y9({slot:"toolbar"});function Z1(y,x,h){return YC({slot:"toolbar",dataCommand:x,title:y},h)}var XC=()=>[Z1("left-justify","justifyLeft",O.alignLeft()),Z1("center","justifyCenter",O.alignCenter()),Z1("right-justify","justifyRight",O.alignRight()),Z0(),Z1("bullet list","insertUnorderedList",O.listBullet()),Z1("numbered list","insertOrderedList",O.listNumber()),Z0(),Z1("indent","indent",O.indent()),Z1("indent","outdent",O.outdent())],c7=()=>[Z1("bold","bold",O.fontBold()),Z1("italic","italic",O.fontItalic()),Z1("underline","underline",O.fontUnderline())],sC=()=>[q9(),Z0(),...c7()],R7=()=>[q9(),Z0(),...XC(),Z0(),...c7()];class r4 extends U{static preferredTagName="tosi-rich-text";static lightStyleSpec={":host":{display:"flex",flexDirection:"column",height:"100%"},':host [part="toolbar"]':{padding:4,display:"flex",gap:"0px",flex:"0 0 auto",flexWrap:"wrap"},':host [part="toolbar"] > button':{_xinIconSize:18}};static formAssociated=!0;static initAttributes={widgets:"default",name:"",required:!1};isInitialized=!1;savedValue="";formDisabledCallback(y){if(this.isInitialized)this.parts.doc.contentEditable=y?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(y){let x=this._value;if(this._value=y,this.isInitialized){if(this.parts.doc.innerHTML!==y)this.parts.doc.innerHTML=y}if(x!==y&&this.internals)this.internals.setFormValue(y)}blockElement(y){let{doc:x}=this.parts;while(y.parentElement!==null&&y.parentElement!==x)y=y.parentElement;return y.parentElement===x?y:void 0}get selectedBlocks(){let{doc:y}=this.parts,x=window.getSelection();if(x===null)return[];let h=[];for(let l=0;l<x.rangeCount;l++){let i=x.getRangeAt(l);if(!y.contains(i.commonAncestorContainer))continue;let C=this.blockElement(i.startContainer),k=this.blockElement(i.endContainer);h.push(C);while(C!==k&&C!==null)C=C.nextElementSibling,h.push(C)}return h}get selectedText(){let y=window.getSelection();if(y===null)return"";return this.selectedBlocks.length?y.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(y)=>{if(this._updatingBlockStyle)return;let h=y.target?.closest(R1.tagName);if(h==null)return;this.doCommand(h.value)};handleButtonClick=(y)=>{let h=y.target?.closest("button");if(h==null)return;this.doCommand(h.dataset.command)};content=[$7({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),WC({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),$7({part:"content"})];doCommand(y){if(y===void 0)return;let x=y.split(",");console.log("execCommand",x[0],!1,...x.slice(1)),document.execCommand(x[0],!1,...x.slice(1))}updateBlockStyle(){let y=this.parts.toolbar.querySelector(".block-style");if(y===null)return;let x=this.selectedBlocks.map((h)=>h.tagName);x=[...new Set(x)],this._updatingBlockStyle=!0,y.value=x.length===1?`formatBlock,${x[0]}`:"",this._updatingBlockStyle=!1}hasContent(){return(this.parts.doc.textContent||"").trim().length>0}handleInput=()=>{if(this.internals)this.internals.setFormValue(this.parts.doc.innerHTML),this.updateValidity()};updateValidity(){if(this.internals)if(this.required&&!this.hasContent())this.internals.setValidity({valueMissing:!0},"Please enter some content",this.parts.doc);else this.internals.setValidity({})}connectedCallback(){super.connectedCallback();let{doc:y,content:x}=this.parts;if(x.innerHTML!==""&&y.innerHTML==="")y.innerHTML=x.innerHTML,x.innerHTML="";this.isInitialized=!0,x.style.display="none",y.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(h)=>{this.updateBlockStyle(),this.selectionChange(h,this)})}render(){let{toolbar:y}=this.parts;if(super.render(),y.children.length===0)switch(this.widgets){case"minimal":y.append(...sC());break;case"default":y.append(...R7());break}}}var NC=r4,J7=r4.elementCreator(),ZC=B1((...y)=>J7(...y),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:v0}=e({router:{path:"",hash:"",pattern:""}}),V9={};function vC(){return{...V9}}var T4=[],P9=!1,o4=new Set;function $C(y){let x=[];if(y==="")return{regex:/^\/?$/,paramNames:x};let h=y.split("/").map((i)=>{if(i.startsWith(":"))return x.push(i.slice(1)),"([^/]+)";return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+h.join("/")+"/?$"),paramNames:x}}function cC(y){let x=y.split("?")[0].split("#")[0];for(let l of T4){if(l.fallback)continue;let i=x.match(l.regex);if(i){let C={};return l.paramNames.forEach((k,g)=>{C[k]=decodeURIComponent(i[g+1])}),{route:l,params:C}}}let h=T4.find((l)=>l.fallback);if(h)return{route:h,params:{}};return null}function $0(){let y=P9?window.location.hash.replace(/^#\/?/,""):window.location.pathname;v0.path.value=y,v0.hash.value=window.location.hash;let x=cC(y);if(x){V9=x.params,v0.pattern.value=x.route.regex.source;let h=new Map;for(let l of x.route.targets)h.set(l.view??"default",l);for(let l of o4){let i=l.name||"default",C=h.get(i);if(C)l.replaceChildren(C.component(x.params));else l.replaceChildren()}}else{V9={},v0.pattern.value="";for(let h of o4)h.replaceChildren()}}var H7=!1;function f7(){if(H7)return;H7=!0,window.addEventListener("popstate",$0),window.addEventListener("hashchange",$0)}function RC(y,x={}){P9=x.hashRouting??!1,T4=y.map((h)=>{let{regex:l,paramNames:i}=$C(h.pattern);return{regex:l,paramNames:i,targets:h.targets,fallback:h.fallback??!1}}),f7(),$0()}function JC(y){if(f7(),P9)window.location.hash="#/"+y.replace(/^\//,"");else window.history.pushState({},"","/"+y.replace(/^\//,""));$0()}class _9 extends U{static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),o4.add(this),T4.length>0)$0()}disconnectedCallback(){super.disconnectedCallback(),o4.delete(this)}}var HC=_9.elementCreator();var{div:fC,slot:DC,label:bC,span:dC,input:D7}=K;class f2 extends U{static preferredTagName="tosi-segmented";static formAssociated=!0;static initAttributes={direction:"row",other:"",multiple:!1,name:"",placeholder:"Please specify…",localized:!1,required:!1};_choices=[];get choices(){return this._choices}set choices(y){if(typeof y==="string")this._choices=f2.parseChoicesString(y);else this._choices=y;this.queueRender()}static parseChoicesString(y){return y.split(",").filter((x)=>x.trim()!=="").map((x)=>{let[h,l]=x.split("=").map((g)=>g.trim()),[i,C]=(l||h).split(":").map((g)=>g.trim()),k=C?O[C]():"";return{value:h,icon:k,caption:i}})}value="";formDisabledCallback(y){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((y)=>y.trim()).filter((y)=>y!=="")}content=()=>[DC(),fC({part:"options"},D7({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:P.segmentedOptionGap("8px"),alignItems:P.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:P.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:P.segmentedOptionGap("8px"),gridTemplateColumns:P.segmentedOptionGridColumns("0px 24px 1fr"),padding:P.segmentedOptionPadding("4px 12px"),font:P.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:P.segmentedFocusShadow(`inset 0 0 0 2px ${P.segmentedOptionCurrentBackground("#44a")}`),borderRadius:P.segmentedOptionsBorderRadius("8px")},":host label.current":{color:P.segmentedOptionCurrentColor("#eee"),background:P.segmentedOptionCurrentBackground("#44a")},":host label.current:focus":{boxShadow:P.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${P.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:P.segmentOptionIconSize("16px"),stroke:P.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:P.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:P.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:P.segmentedOptionsBorderRadius("8px"),background:P.segmentedOptionsBackground("#fff"),color:P.segmentedOptionColor("#222"),overflow:"hidden",alignItems:P.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:P.segmentedOptionPadding("4px 12px"),color:P.segmentedOptionCurrentColor("#eee"),background:P.segmentedOptionCurrentBackground("#44a"),font:P.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:P.segmentedOptionCurrentColor("#eee"),opacity:P.segmentedPlaceholderOpacity(0.75)}};syncCurrent(){let{options:y}=this.parts;y.querySelectorAll("label").forEach((x)=>{let h=x.querySelector("input");x.classList.toggle("current",Boolean(h&&h.checked))})}valueChanged=!1;handleChange=()=>{let{options:y,custom:x}=this.parts;if(this.multiple){let h=[...y.querySelectorAll("input:checked")];this.value=h.map((l)=>l.value).join(",")}else{let h=y.querySelector("input:checked");if(!h)this.value="";else if(h.value)x.setAttribute("hidden",""),this.value=h.value;else x.removeAttribute("hidden"),x.focus(),x.select(),this.value=x.value}this.syncCurrent(),this.valueChanged=!0};handleKey=(y)=>{let x=!1;switch(y.code){case"Space":if(y.target instanceof HTMLLabelElement)y.target.click(),x=!0;break;case"Tab":if(!(y.target instanceof HTMLLabelElement))y.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let h=y.target.closest("label");if(h.previousElementSibling instanceof HTMLLabelElement)h.previousElementSibling.focus()}x=!0;break;case"ArrowRight":case"ArrowDown":{let h=y.target.closest("label");if(h.nextElementSibling instanceof HTMLLabelElement)h.nextElementSibling.focus()}x=!0;break}if(x)y.preventDefault(),y.stopPropagation()};connectedCallback(){super.connectedCallback();let y=this.getAttribute("choices");if(y&&this._choices.length===0)this._choices=f2.parseChoicesString(y);let{options:x}=this.parts;if(this.name==="")this.name=this.instanceId;if(x.addEventListener("change",this.handleChange),x.addEventListener("keydown",this.handleKey),this.other&&this.multiple)console.warn(this,"is set to [other] and [multiple]; [other] will be ignored"),this.other=""}get _choicesWithOther(){let y=[...this.choices];if(this.other&&!this.multiple){let[x,h]=this.other.split(":");y.push({value:"",caption:x,icon:h})}return y}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((y)=>y.value===this.value))}render(){if(super.render(),this.valueChanged){this.valueChanged=!1;return}let{options:y,custom:x}=this.parts;y.textContent="";let h=this.multiple?"checkbox":"radio",{values:l,isOtherValue:i}=this;if(y.append(...this._choicesWithOther.map((C)=>{return bC({tabindex:0},D7({type:h,name:this.name,value:C.value,checked:l.includes(C.value)||C.value===""&&i,tabIndex:-1}),C.icon||{class:"no-icon"},this.localized?Q1(C.caption):dC(C.caption))})),this.other&&!this.multiple)x.hidden=!i,x.value=i?this.value:"",x.placeholder=this.placeholder,y.append(x);this.syncCurrent()}}var SC=f2,b7=f2.elementCreator(),IC=B1((...y)=>b7(...y),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:d7}=K;class A9 extends U{static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[d7({part:"normal"}),d7({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};onResize=()=>{let{normal:y,small:x}=this.parts,h=this.offsetParent;if(!(h instanceof HTMLElement))return;else if(h.offsetWidth<this.minWidth||h.offsetHeight<this.minHeight)y.hidden=!0,x.hidden=!1,this.value="small";else y.hidden=!1,x.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.onResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.onResize)}}var rC=A9.elementCreator();class L4 extends U{static preferredTagName="tosi-sizer";target=null;static shadowStyleSpec={":host":{_resizeIconFill:"#222",display:"block",position:"absolute",bottom:-7,right:-7,padding:14,width:44,height:44,opacity:0.25,transition:"opacity 0.25s ease-out"},":host(:hover)":{opacity:0.5},":host svg":{width:16,height:16,stroke:z.resizeIconFill}};content=O.resize();get minSize(){let{minWidth:y,minHeight:x}=getComputedStyle(this.target);return{width:parseFloat(y)||32,height:parseFloat(x)||32}}resizeTarget=(y)=>{let{target:x}=this;if(!x)return;let{offsetWidth:h,offsetHeight:l}=x;x.style.left=x.offsetLeft+"px",x.style.top=x.offsetTop+"px",x.style.bottom="",x.style.right="";let{minSize:i}=this;V1(y,(C,k,g)=>{if(x.style.width=Math.max(i.width,h+C)+"px",x.style.height=Math.max(i.height,l+k)+"px",g.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let y={passive:!0};this.addEventListener("mousedown",this.resizeTarget,y),this.addEventListener("touchstart",this.resizeTarget,y)}}var TC=L4,S7=L4.elementCreator(),oC=S7;var{div:LC,input:MC,span:nC,button:G9}=K,I7=(y)=>y.split(/(?<!\\),/).map((x)=>x.trim().replace(/\\,/g,",")),uC=(y)=>y.map((x)=>x.replace(/,/g,"\\,")).join(",");class c0 extends U{static preferredTagName="tosi-tag";static lightStyleSpec={":host":{"--tag-close-button-color":"#000c","--tag-close-button-bg":"#fffc","--tag-button-opacity":"0.5","--tag-button-hover-opacity":"0.75","--tag-bg":P.brandColor("blue"),"--tag-text-color":P.brandTextColor("white"),display:"inline-flex",borderRadius:P.tagRoundedRadius(z.spacing50),color:z.tagTextColor,background:z.tagBg,padding:`0 ${z.spacing75} 0 ${z.spacing75}`,height:`calc(${z.lineHeight} + ${z.spacing50})`,lineHeight:`calc(${z.lineHeight} + ${z.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:P.fontSize("16px"),color:z.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${z.spacing_50} 0 ${z.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:z.spacing150,width:z.spacing150,color:z.tagCloseButtonColor,background:z.tagCloseButtonBg,borderRadius:P.tagCloseButtonRadius("99px"),opacity:z.tagButtonOpacity},':host [part="remove"]:hover':{background:z.tagCloseButtonBg,opacity:z.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[nC({part:"caption"},this.caption),G9(O.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var aC=c0,K9=c0.elementCreator(),mC=B1((...y)=>K9(...y),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class D2 extends U{static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:z.tagListBg,gap:z.spacing25,borderRadius:P.taglistRoundedRadius(z.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${z.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${z.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:z.inputBg,borderRadius:P.tagContainerRadius(z.spacing50),boxShadow:z.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:z.spacing25,minHeight:`calc(${z.lineHeight} + ${z.spacing})`,padding:z.spacing25},':host [part="tagMenu"]':{width:z.touchSize,height:z.touchSize,lineHeight:z.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:z.brandColor,color:z.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return I7(this.value).filter((y)=>y!=="")}set tags(y){this.value=uC(y)}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(y){if(typeof y==="string")this._availableTags=D2.parseAvailableTagsString(y);else this._availableTags=y;this.queueRender()}static parseAvailableTagsString(y){return I7(y).map((x)=>x===""?null:x)}connectedCallback(){super.connectedCallback();let y=this.getAttribute("available-tags");if(y&&this._availableTags.length===0)this._availableTags=D2.parseAvailableTagsString(y)}formDisabledCallback(y){this.disabled=y}formResetCallback(){this.value=""}addTag=(y)=>{let x=y.trim();if(x===""||this.tags.includes(x))return;this.tags=[...this.tags,x],this.queueRender(!0)};toggleTag=(y)=>{if(this.tags.includes(y))this.tags=this.tags.filter((x)=>x!==y),this.queueRender(!0);else this.addTag(y)};enterTag=(y)=>{let{tagInput:x}=this.parts;switch(y.key){case",":{let h=x.value.split(",")[0];this.addTag(h)}break;case"Enter":{let h=x.value.split(",")[0];this.addTag(h)}y.stopPropagation(),y.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:y}=this,{tagMenu:x}=this.parts,h=[...this.availableTags],l=this.tags.filter((C)=>!h.includes(C));if(l.length)h.push(null,...l);let i=h.map((C)=>{if(C===""||C===null)return null;else if(typeof C==="object")return{checked:()=>this.tags.includes(C.value),caption:C.caption,action(){y(C.value)}};else return{checked:()=>this.tags.includes(C),caption:C,action(){y(C)}}});L({target:x,width:"auto",menuItems:i})};content=()=>[G9({type:"button",style:{visibility:"hidden"},tabindex:-1}),LC({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),MC({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),G9({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},O.chevronDown())];removeTag=(y)=>{if(this.editable&&!this.disabled){let x=y.target.closest(c0.tagName);this.tags=this.tags.filter((h)=>h!==x.caption),x.remove(),this.queueRender(!0)}y.stopPropagation(),y.preventDefault()};render(){super.render();let{tagContainer:y,tagMenu:x,tagInput:h}=this.parts;if(x.disabled=this.disabled,h.value="",h.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)x.toggleAttribute("hidden",!1),h.toggleAttribute("hidden",!this.textEntry);else x.toggleAttribute("hidden",!0),h.toggleAttribute("hidden",!0);y.textContent="";for(let l of this.tags)y.append(K9({caption:l,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var tC=D2,r7=D2.elementCreator(),EC=B1((...y)=>r7(...y),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var T7="1.6.15";var{span:eC}=K,R0=null,M4=null,n4=null,b1="tosi-tooltip",yk={[`.${b1}`]:{pointerEvents:"none",padding:P.tosiTooltipPadding("4px 10px"),borderRadius:P.tosiTooltipRadius("6px"),background:P.tosiTooltipBg("#333"),color:P.tosiTooltipColor("#fff"),fontSize:P.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:P.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${b1} p`]:{margin:"0"},[`.${b1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${b1} a`]:{color:"inherit"},[`.${b1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${b1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${b1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${b1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${b1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}},o7=!1;function L7(){if(o7)return;o7=!0,p1("tosi-tooltip",yk)}function b2(){if(M4!==null)clearTimeout(M4),M4=null;if(R0!==null)R0.remove(),R0=null;n4=null}function xk(y){if(y.startsWith("s"))return"tt-s";if(y.startsWith("n"))return"tt-n";if(y.startsWith("e"))return"tt-e";if(y.startsWith("w"))return"tt-w";return"tt-s"}function hk(y,x,h){let l=x.getBoundingClientRect(),i=y.getBoundingClientRect(),C=l.left+l.width*0.5,k=l.top+l.height*0.5,g;if(h.startsWith("s")||h.startsWith("n"))g=Math.max(8,Math.min(i.width-8,C-i.left))-4;else g=Math.max(8,Math.min(i.height-8,k-i.top))-4;y.style.setProperty("--tosi-tooltip-arrow",g+"px")}function lk(y,x){if(x)y=D(y);let h=eC({class:b1});return h.innerHTML=c.parseInline(y),h}function ik(y,x,h){L7(),b2(),n4=y;let{top:l,left:i,width:C}=y.getBoundingClientRect(),k=i+C*0.5,g=window.innerHeight,w=window.innerWidth,B=(l>g*0.5?"n":"s")+(k>w*0.5?"w":"e"),j=lk(x,h);j.classList.add(xk(B)),R0=C0({content:j,target:y,position:B,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(R0&&n4)hk(j,y,B)})}function Ck(y){for(let x of y.composedPath())if(x instanceof HTMLElement&&x.dataset.tooltip)return x;return null}function kk(y={}){L7();let{convertTitles:x=!0,delay:h=250,localize:l=!1}=y;document.addEventListener("pointermove",(i)=>{if(x){for(let g of i.composedPath())if(g instanceof HTMLElement&&g.title&&!g.dataset.tooltip){g.dataset.tooltip=g.title,g.removeAttribute("title");break}}let C=Ck(i);if(C===n4)return;if(b2(),!C)return;let k=C.dataset.tooltip||null;if(!k)return;M4=setTimeout(()=>ik(C,k,l),h)}),document.addEventListener("pointerleave",b2),document.addEventListener("pointerdown",b2),document.addEventListener("keydown",b2),window.addEventListener("scroll",b2,!0)}Object.assign(globalThis,{xinjs:x0,xinjsui:U9});})();
193
197
 
194
- //# debugId=6E3C592691017A0F64756E2164756E21
198
+ //# debugId=FB59F46DFE4CEC3864756E2164756E21
195
199
  //# sourceMappingURL=iife.js.map