tosijs-ui 1.5.18 → 1.5.19

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,4 +1,4 @@
1
- (()=>{var k6=Object.defineProperty;var c6=(l)=>l;function r6(l,i){this[l]=c6.bind(null,i)}var A4=(l,i)=>{for(var h in i)k6(l,h,{get:i[h],enumerable:!0,configurable:!0,set:r6.bind(i,h)})};var d6=((l)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(l,{get:(i,h)=>(typeof require<"u"?require:i)[h]}):l)(function(l){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+l+'" is not supported')});var q3={};A4(q3,{xrControllersText:()=>ah,xrControllers:()=>Kh,xinTagList:()=>ay,xinTag:()=>Gy,xinTabs:()=>Xi,xinTable:()=>Zl,xinSizer:()=>_y,xinSidenav:()=>xh,xinSelect:()=>kl,xinSegmented:()=>Ay,xinRating:()=>yy,xinPasswordStrength:()=>iy,xinNotification:()=>Lh,xinMenu:()=>Wl,xinMd:()=>ai,xinLocalized:()=>pl,xinForm:()=>Vh,xinFloat:()=>ol,xinField:()=>_h,xinCarousel:()=>ll,wrapIcon:()=>k5,version:()=>o6,updateLocalized:()=>p5,trackDrag:()=>x1,tosijs:()=>$2,tosiThemeEditor:()=>Jh,tosiTagList:()=>x6,tosiTag:()=>A3,tosiTabs:()=>e2,tosiTable:()=>P5,tosiSizer:()=>y6,tosiSidenav:()=>i0,tosiSelect:()=>k1,tosiSegmented:()=>i6,tosiRow:()=>Qh,tosiRouteView:()=>By,tosiRichText:()=>L8,tosiRating:()=>T8,tosiPasswordStrength:()=>I8,tosiNotification:()=>w3,tosiMonth:()=>Th,tosiMenu:()=>M9,tosiMd:()=>L2,tosiLocalized:()=>q1,tosiLocalePicker:()=>Q9,tosiHeaderLinks:()=>Fh,tosiHeader:()=>Uh,tosiGrid:()=>Yh,tosiForm:()=>W8,tosiFloat:()=>Z2,tosiField:()=>Q8,tosiDialog:()=>b0,tosiColumn:()=>Wh,tosiCarousel:()=>P9,testManager:()=>r1,tabSelector:()=>Ni,svgIcon:()=>M7,svg2DataUrl:()=>s5,styleSheet:()=>U0,spacer:()=>o3,sizeBreak:()=>qy,sideNav:()=>yh,setLocale:()=>cl,scriptTag:()=>g1,runTests:()=>h4,router:()=>s0,richTextWidgets:()=>m8,richText:()=>cy,rewriteImports:()=>b1,resolveMenuItems:()=>c1,resolveIcon:()=>R1,removeLastMenu:()=>M,postNotification:()=>eh,positionFloat:()=>F9,popMenu:()=>H,popFloat:()=>b2,popDropMenu:()=>u9,parseShortcut:()=>Y0,navigate:()=>py,modifierKeys:()=>Bl,menu:()=>I9,matchShortcut:()=>B5,markdownViewer:()=>Ki,mapBox:()=>Sh,makeSorter:()=>a0,localize:()=>X,localePicker:()=>nl,loadTransform:()=>m0,liveTheme:()=>$,liveExample:()=>x4,legacyAliases:()=>b8,keystroke:()=>fl,keycode:()=>Y9,isBreached:()=>D8,insertExamples:()=>l4,initTooltips:()=>$y,initLocalization:()=>dl,icons:()=>B,iconRules:()=>g5,i18n:()=>J,getRouterParams:()=>ry,gamepadText:()=>Gh,gamepadState:()=>N8,findShortcutAction:()=>A5,findHighestZ:()=>L1,filterPart:()=>o4,filterForDrop:()=>H2,filterForClick:()=>t5,filterBuilder:()=>fh,expect:()=>J5,executeInline:()=>e0,executeInIframe:()=>E0,executeCode:()=>B8,enableTests:()=>D5,enableLiveTheme:()=>H8,elastic:()=>R8,editableRect:()=>dh,dragAndDrop:()=>R0,displayShortcut:()=>N0,disableTests:()=>I5,disableLiveTheme:()=>bh,digest:()=>S8,defineRoutes:()=>ny,defineIcons:()=>H7,defaultColors:()=>V1,dataTable:()=>$l,createThemeWithLegacy:()=>Rh,createTheme:()=>q2,createTestContext:()=>H5,createSubMenu:()=>j5,createMenuItem:()=>D9,createMenuAction:()=>H9,createDropMenuItem:()=>S9,createDocBrowser:()=>ch,createDarkTheme:()=>g4,createColorVariables:()=>Z8,componentVars:()=>$h,commandButton:()=>f1,colorInput:()=>n5,codeEditor:()=>p2,canonicalShortcut:()=>vl,bringToFront:()=>Z1,bodymovinPlayer:()=>L7,blockStyle:()=>B3,baseVariables:()=>$8,baseTheme:()=>Nh,baseDarkTheme:()=>Xh,b3d:()=>m7,availableFilters:()=>M5,applyTheme:()=>C3,abTest:()=>J7,XinWord:()=>ky,XinTagList:()=>Ky,XinTag:()=>Fy,XinSizer:()=>Py,XinSelect:()=>gl,XinSegmented:()=>jy,XinRating:()=>hy,XinPasswordStrength:()=>ly,XinNotification:()=>mh,XinMenu:()=>Yl,XinLocalized:()=>Q0,XinForm:()=>Ph,XinFloat:()=>xl,XinField:()=>qh,XinCarousel:()=>E7,TosiThemeEditor:()=>s3,TosiTagList:()=>V2,TosiTag:()=>k0,TosiTabs:()=>M0,TosiTable:()=>Z0,TosiSizer:()=>z4,TosiSidenav:()=>y2,TosiSelect:()=>j1,TosiSegmented:()=>_2,TosiRow:()=>h3,TosiRouteView:()=>v3,TosiRating:()=>n4,TosiPasswordStrength:()=>w4,TosiNotification:()=>S1,TosiMonth:()=>r3,TosiMenu:()=>$0,TosiMd:()=>u0,TosiLocalized:()=>A1,TosiLocalePicker:()=>W0,TosiHeaderLinks:()=>l3,TosiHeader:()=>E5,TosiGrid:()=>x3,TosiForm:()=>s4,TosiFloat:()=>Q1,TosiField:()=>C4,TosiDialog:()=>F5,TosiColumn:()=>y3,TosiCarousel:()=>G0,TabSelector:()=>Yi,SvgIcon:()=>c5,SizeBreak:()=>t3,SideNav:()=>hh,STORAGE_KEY:()=>L0,RichText:()=>p4,RemoteSyncManager:()=>l0,MarkdownViewer:()=>Gi,MapBox:()=>x2,LocalePicker:()=>wl,LiveExample:()=>h2,FilterPart:()=>m5,FilterBuilder:()=>L5,EditableRect:()=>B1,DataTable:()=>Rl,CodeEditor:()=>m1,BodymovinPlayer:()=>n2,B3d:()=>r5,AbTest:()=>w2});var $2={};A4($2,{xinValue:()=>j6,xinSlot:()=>f7,xinProxy:()=>z9,xinPath:()=>t6,xin:()=>T,warnDeprecated:()=>h1,version:()=>f9,vars:()=>r,varDefault:()=>w,validateAgainstConstraints:()=>w9,updates:()=>T4,unobserve:()=>W2,touchElement:()=>l5,touch:()=>s1,tosiValue:()=>Q,tosiUnique:()=>Y7,tosiSlot:()=>B7,tosiSetValue:()=>v6,tosiPath:()=>y1,tosiLoader:()=>$7,tosiBlueprint:()=>R7,tosiAccessor:()=>z6,tosi:()=>E,throttle:()=>k2,sync:()=>Q7,svgElements:()=>q0,share:()=>G7,settings:()=>f0,scrollListItemIntoView:()=>k7,onThemePreferencesChange:()=>T6,onStylesheetChange:()=>J6,on:()=>d2,observe:()=>e4,mathML:()=>c9,makeComponent:()=>h5,invertLuminance:()=>u4,initVars:()=>I6,hotReload:()=>z7,getThemePreferences:()=>s9,getListItem:()=>u1,getListInstance:()=>E4,getListBinding:()=>r2,getCssVar:()=>y9,elements:()=>f,deprecated:()=>i1,deleteListItem:()=>s7,debounce:()=>R2,css:()=>c2,boxedProxy:()=>i5,boxed:()=>C1,blueprintLoader:()=>b7,blueprint:()=>Z7,bindings:()=>K1,bindParts:()=>L6,bind:()=>F1,TOSI_ACCESSOR:()=>I4,TAKE_DESCRIPTOR:()=>j0,StyleSheet:()=>a1,MoreMath:()=>$6,Component:()=>z,Color:()=>A,BlueprintLoader:()=>y5,Blueprint:()=>V0});function T1(l){if(l==null||typeof l!=="object")return l;if(l instanceof Set)return new Set(l);else if(Array.isArray(l))return l.map(T1);let i={};for(let h in l){let y=l[h];if(l!=null&&typeof l==="object")i[h]=T1(y);else i[h]=y}return i}var D4="-xin-data",s2=`.${D4}`,I3="-xin-event",_3=`.${I3}`,t1=Symbol.for("xin-path"),g2=Symbol.for("xin-value"),w6="xinObserve",n6="xinBind",p6="xinOn",I4=Symbol.for("tosi-accessor"),j0=Symbol.for("tosi-take"),B0=Symbol("list-binding"),C2=Symbol("list-instance"),a4=new Map;function B6(l,i){let h=a4.get(l);if(h===void 0)h=new Set,a4.set(l,h);h.add(i)}function f6(l){return a4.get(l)}var V3=new Set;function h1(l,i){if(!V3.has(l))console.warn(i),V3.add(l)}function i1(l,i){let h=!1;return(...y)=>{if(!h)console.warn(i),h=!0;return l(...y)}}var y1=(l)=>{return l&&l[t1]||void 0};function Q(l){if(typeof l==="object"&&l!==null){let i=l[g2];return i!==void 0?i:l}return l}function z6(l){return l!=null?l[I4]:void 0}function v6(l,i){if(y1(l)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");l[g2]=i}var t6=i1(y1,"xinPath is deprecated. Use tosiPath instead."),j6=i1(Q,"xinValue is deprecated. Use tosiValue instead."),a2=new WeakMap,G1=new WeakMap,Q2=(l)=>{let i=l.cloneNode();if(i instanceof Element){let h=G1.get(l),y=a2.get(l);if(h!=null)G1.set(i,T1(h));if(y!=null)a2.set(i,T1(y))}for(let h of Array.from(l instanceof HTMLTemplateElement?l.content.childNodes:l.childNodes))if(h instanceof Element||h instanceof DocumentFragment)i.appendChild(Q2(h));else i.appendChild(h.cloneNode());return i},f0={debug:!1,perf:!1},A6=(l)=>{try{return JSON.stringify(l)}catch(i){return"{has circular references}"}},T3=(...l)=>Error(l.map(A6).join(" ")),q6=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),P6=0,_6=()=>(parseInt("10000",36)+ ++P6).toString(36).slice(-5),u3=()=>q6()+_6(),Q4=Symbol("delete"),M3=Symbol("new-object"),q4=Symbol("automatic-index");function m3(l){if(l==="")return[];if(Array.isArray(l))return l;else{let i=[];while(l.length>0){let h=l.search(/\[[^\]]+\]/);if(h===-1){i.push(l.split("."));break}else{let y=l.slice(0,h);if(l=l.slice(h),y!=="")i.push(y.split("."));if(h=l.indexOf("]")+1,i.push(l.slice(1,h-1)),l.slice(h,h+1)===".")h+=1;l=l.slice(h)}}return i}}var U1=new WeakMap;function L3(l,i){if(U1.get(l)===void 0)U1.set(l,{});if(U1.get(l)[i]===void 0)U1.get(l)[i]={};let h=U1.get(l)[i];if(i==="_auto_")l.forEach((y,x)=>{if(y[q4]===void 0)y[q4]=u3();h[y[q4]+""]=x});else l.forEach((y,x)=>{h[u(y,i)+""]=x});return h}function V6(l,i){if(U1.get(l)===void 0||U1.get(l)[i]===void 0)return L3(l,i);else return U1.get(l)[i]}function O6(l,i,h){h=h+"";let y=V6(l,i)[h];if(y===void 0||u(l[y],i)+""!==h)y=L3(l,i)[h];return y}function U6(l,i,h){if(l[i]===void 0&&h!==void 0)l[i]=h;return l[i]}function e3(l,i,h,y){let x=i!==""?O6(l,i,h):h;if(y===Q4)return l.splice(x,1),U1.delete(l),Symbol("deleted");else if(y===M3){if(i===""&&l[x]===void 0)l[x]={}}else if(y!==void 0)if(x!==void 0)l[x]=y;else if(i!==""&&u(y,i)+""===h+"")l.push(y),x=l.length-1;else throw Error(`byIdPath insert failed at [${i}=${h}]`);return l[x]}function O3(l){if(!Array.isArray(l))throw T3("setByPath failed: expected array, found",l)}function U3(l){if(l==null||!(l instanceof Object))throw T3("setByPath failed: expected Object, found",l)}function u(l,i){let h=m3(i),y=l,x,o,C,s;for(x=0,o=h.length;y!==void 0&&x<o;x++){let g=h[x];if(Array.isArray(g))for(C=0,s=g.length;y!==void 0&&C<s;C++){let k=g[C];y=y[k]}else if(y.length===0){if(y=y[Number(g.slice(1))],g[0]!=="=")return}else if(g.includes("=")){let[k,...c]=g.split("=");y=e3(y,k,c.join("="))}else C=parseInt(g,10),y=y[C]}return y}function N2(l,i,h){let y=l;if(i==="")throw Error("setByPath cannot be used to set the root object");let x=m3(i);while(y!=null&&x.length>0){let o=x.shift();if(typeof o==="string"){let C=o.indexOf("=");if(C>-1){if(C===0)U3(y);else O3(y);let s=o.slice(0,C),g=o.slice(C+1);if(y=e3(y,s,g,x.length>0?M3:h),x.length===0)return!0}else{O3(y);let s=parseInt(o,10);if(x.length>0)y=y[s];else{if(h!==Q4){if(y[s]===h)return!1;y[s]=h}else y.splice(s,1);return!0}}}else if(Array.isArray(o)&&o.length>0){U3(y);while(o.length>0){let C=o.shift();if(o.length>0||x.length>0)y=U6(y,C,o.length>0?{}:[]);else{if(h!==Q4){if(y[C]===h)return!1;y[C]=h}else{if(!Object.prototype.hasOwnProperty.call(y,C))return!1;delete y[C]}return!0}}}else throw Error(`setByPath failed, bad path ${i}`)}throw Error(`setByPath(${l}, ${i}, ${h}) failed`)}var e={},W4=null,F6=(l)=>{W4=l},A0=()=>{if(W4===null)throw Error("xin proxy not initialized");return W4},Y4=null,N4=null,G6=(l,i)=>{Y4=l,N4=i},K6=()=>{if(Y4===null)throw Error("bind not initialized");return Y4},a6=()=>{if(N4===null)throw Error("on not initialized");return N4},F3=Symbol("observer should be removed"),z0=[],o2=[],X4=!1,R4,$4;function Q6(l,i,h,y){let x=f6(l);if(x===void 0)return[];let o=[];for(let C of x){let s=u(h,C);if(s!==void 0)o.push(`${l}[${C}=${s}]${y}`)}return o}class E3{description;test;callback;constructor(l,i){let h=typeof i==="string"?`"${i}"`:`function ${i.name}`,y;if(typeof l==="string")this.test=(x)=>typeof x==="string"&&x!==""&&(l.startsWith(x)||x.startsWith(l)),y=`test = "${l}"`;else if(l instanceof RegExp)this.test=l.test.bind(l),y=`test = "${l.toString()}"`;else if(l instanceof Function)this.test=l,y=`test = function ${l.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${y}, ${h}`,typeof i==="function")this.callback=i;else throw Error("expect callback to be a path or function");z0.push(this)}}var T4=async()=>{if(R4===void 0)return;await R4},W6=()=>{if(f0.perf)console.time("xin async update");let l=Array.from(o2);o2.length=0,X4=!1;for(let i of l)z0.filter((h)=>{let y;try{y=h.test(i)}catch(x){throw Error(`Listener ${h.description} threw "${x}" at "${i}"`)}if(y===F3)return W2(h),!1;return y}).forEach((h)=>{let y;try{y=h.callback(i)}catch(x){console.error(`Listener ${h.description} threw "${x}" handling "${i}"`)}if(y===F3)W2(h)});if(typeof $4==="function")$4();if(f0.perf)console.timeEnd("xin async update")},s1=(l)=>{let i=typeof l==="string"?l:y1(l);if(i===void 0)throw console.error("touch was called on an invalid target",l),Error("touch was called on an invalid target");if(X4===!1)R4=new Promise((y)=>{$4=y}),X4=setTimeout(W6);if(o2.find((y)=>i.startsWith(y))==null)o2.push(i);let h=i.match(/^(.+)\[(\d+)\](.*)$/);if(h!==null){let[,y,x,o]=h,C=parseInt(x,10),s=u(e,`${y}[${C}]`);if(s!=null){let g=Q6(y,C,s,o);for(let k of g)if(o2.find((c)=>k.startsWith(c))==null)o2.push(k)}}},X2=(l,i)=>{return new E3(l,i)},W2=(l)=>{let i=z0.indexOf(l);if(i>-1)z0.splice(i,1);else throw Error("unobserve failed, listener not found")},l9=(l,i)=>{let h=new Event(i);l.dispatchEvent(h)},i9=(l)=>{if(l instanceof HTMLInputElement)return l.type;else if(l instanceof HTMLSelectElement&&l.hasAttribute("multiple"))return"multi-select";else return"other"},Y6=(l,i)=>{switch(i9(l)){case"radio":l.checked=l.value===i;break;case"checkbox":l.checked=!!i;break;case"date":l.valueAsDate=new Date(i);break;case"multi-select":for(let h of Array.from(l.querySelectorAll("option")))h.selected=i[h.value];break;default:l.value=i}},N6=(l)=>{switch(i9(l)){case"radio":{let i=l.parentElement?.querySelector(`[name="${l.name}"]:checked`);return i!=null?i.value:null}case"checkbox":return l.checked;case"date":return l.valueAsDate?.toISOString();case"multi-select":return Array.from(l.querySelectorAll("option")).reduce((i,h)=>{return i[h.value]=h.selected,i},{});default:return l.value}},{ResizeObserver:G3}=globalThis,Z4=G3!=null?new G3((l)=>{for(let i of l){let h=i.target;l9(h,"resize")}}):{observe(){},unobserve(){}},K3=(l,i,h=!0)=>{if(l!=null&&i!=null)if(typeof i==="string")l.textContent=i;else if(Array.isArray(i))i.forEach((y)=>{l.append(y instanceof Node&&h?Q2(y):y)});else if(i instanceof Node)l.append(h?Q2(i):i);else throw Error("expect text content or document node")},R2=(l,i=250)=>{let h;return(...y)=>{if(h!==void 0)clearTimeout(h);h=setTimeout(()=>{l(...y)},i)}},k2=(l,i=250)=>{let h,y=Date.now()-i,x=!1;return(...o)=>{if(clearTimeout(h),h=setTimeout(()=>{l(...o),y=Date.now()},i),!x&&Date.now()-y>=i){x=!0;try{l(...o),y=Date.now()}finally{x=!1}}}},K1={value:{toDOM:Y6,fromDOM(l){return N6(l)}},text:{toDOM(l,i){l.textContent=i}},enabled:{toDOM(l,i){l.disabled=!i}},disabled:{toDOM(l,i){l.disabled=Boolean(i)}},list:{toDOM(l,i,h){r2(l,i,h).update(i)}}};function v1(l){return l.replace(/[A-Z]/g,(i)=>{return`-${i.toLocaleLowerCase()}`})}function h9(l){return l.replace(/-([a-z])/g,(i,h)=>{return h.toLocaleUpperCase()})}var X6=180/Math.PI,R6=Math.PI/180;function z1(l,i,h){return h<l?NaN:i<l?l:i>h?h:i}function Y1(l,i,h,y=!0){if(y)h=z1(0,h,1);return h*(i-l)+l}var $6={RADIANS_TO_DEGREES:X6,DEGREES_TO_RADIANS:R6,clamp:z1,lerp:Y1};function y9(l,i=document.body){let h=getComputedStyle(i);if(l.endsWith(")")&&l.startsWith("var("))l=l.slice(4,-1);return h.getPropertyValue(l).trim()}var Z6=(l,i,h)=>{return(0.299*l+0.587*i+0.114*h)/255},D1=(l)=>("00"+Math.round(Number(l)).toString(16)).slice(-2);class x9{h;s;l;constructor(l,i,h){l/=255,i/=255,h/=255;let y=Math.max(l,i,h),x=y-Math.min(l,i,h),o=x!==0?y===l?(i-h)/x:y===i?2+(h-l)/x:4+(l-i)/x:0;this.h=60*o<0?60*o+360:60*o,this.s=x!==0?y<=0.5?x/(2*y-x):x/(2-(2*y-x)):0,this.l=(2*y-x)/2}}var N1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(N1)N1.style.display="none";class A{r;g;b;a;static fromVar(l,i=document.body){return A.fromCss(y9(l,i))}static fromCss(l){let i=l.match(/^#([0-9a-fA-F]+)$/);if(i){let g=i[1],k=(c,d)=>parseInt(g.slice(c,c+d),16);if(g.length===3||g.length===4){let c=(d)=>k(d,1)*17;return new A(c(0),c(1),c(2),g.length===4?c(3)/255:1)}if(g.length===6||g.length===8)return new A(k(0,2),k(2,2),k(4,2),g.length===8?k(6,2)/255:1)}let h=l;if(N1 instanceof HTMLSpanElement)N1.style.color="black",N1.style.color=l,document.body.appendChild(N1),h=getComputedStyle(N1).color,N1.remove();let[y,x,o,C]=h.match(/[\d.]+/g)||["0","0","0","0"],s=h.startsWith("color(srgb")?255:1;return new A(Number(y)*s,Number(x)*s,Number(o)*s,C==null?1:Number(C))}static fromHsl(l,i,h,y=1){let x,o,C;if(i===0)x=o=C=h;else{let g=(n,v,p)=>{if(p<0)p+=1;if(p>1)p-=1;if(p<0.16666666666666666)return n+(v-n)*6*p;if(p<0.5)return v;if(p<0.6666666666666666)return n+(v-n)*(0.6666666666666666-p)*6;return n},k=h<0.5?h*(1+i):h+i-h*i,c=2*h-k,d=(l%360+360)%360/360;x=g(c,k,d+0.3333333333333333),o=g(c,k,d),C=g(c,k,d-0.3333333333333333)}let s=new A(x*255,o*255,C*255,y);return s.hslCached={h:(l%360+360)%360,s:i,l:h},s}static black=new A(0,0,0);static white=new A(255,255,255);constructor(l,i,h,y=1){this.r=z1(0,l,255),this.g=z1(0,i,255),this.b=z1(0,h,255),this.a=z1(0,y,1)}get inverse(){return new A(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:l,s:i,l:h}=this._hsl;return A.fromHsl(l,i,1-h,this.a)}get opaque(){return this.a===1?this:new A(this.r,this.g,this.b,1)}contrasting(l=1){return this.opaque.blend(this.brightness>0.5?A.black:A.white,l)}get rgb(){let{r:l,g:i,b:h}=this;return`rgb(${l.toFixed(0)},${i.toFixed(0)},${h.toFixed(0)})`}get rgba(){let{r:l,g:i,b:h,a:y}=this;return`rgba(${l.toFixed(0)},${i.toFixed(0)},${h.toFixed(0)},${y.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 x9(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:l,s:i,l:h}=this._hsl;return`hsl(${l.toFixed(0)}deg ${(i*100).toFixed(0)}% ${(h*100).toFixed(0)}%)`}get hsla(){let{h:l,s:i,l:h}=this._hsl;return`hsl(${l.toFixed(0)}deg ${(i*100).toFixed(0)}% ${(h*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let l=this.brightness*255;return new A(l,l,l)}get brightness(){return Z6(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+D1(this.r)+D1(this.g)+D1(this.b):"#"+D1(this.r)+D1(this.g)+D1(this.b)+D1(Math.floor(255*this.a))}brighten(l){let{h:i,s:h,l:y}=this._hsl,x=z1(0,y+l*(1-y),1);return A.fromHsl(i,h,x,this.a)}darken(l){let{h:i,s:h,l:y}=this._hsl,x=z1(0,y*(1-l),1);return A.fromHsl(i,h,x,this.a)}saturate(l){let{h:i,s:h,l:y}=this._hsl,x=z1(0,h+l*(1-h),1);return A.fromHsl(i,x,y,this.a)}desaturate(l){let{h:i,s:h,l:y}=this._hsl,x=z1(0,h*(1-l),1);return A.fromHsl(i,x,y,this.a)}rotate(l){let{h:i,s:h,l:y}=this._hsl,x=(i+360+l)%360;return A.fromHsl(x,h,y,this.a)}opacity(l){let{h:i,s:h,l:y}=this._hsl;return A.fromHsl(i,h,y,l)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(l,i){return new A(Y1(this.r,l.r,i),Y1(this.g,l.g,i),Y1(this.b,l.b,i),Y1(this.a,l.a,i))}static blendHue(l,i,h){let y=(i-l+720)%360;if(y<180)return l+h*y;else return l-(360-y)*h}mix(l,i){let h=this._hsl,y=l._hsl;return A.fromHsl(h.s===0?y.h:y.s===0?h.h:A.blendHue(h.h,y.h,i),Y1(h.s,y.s,i),Y1(h.l,y.l,i),Y1(this.a,l.a,i))}colorMix(l,i){return A.fromCss(`color-mix(in hsl, ${this.html}, ${l.html} ${(i*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(l,i,h,y){if(!A.computedColors.has(l))A.computedColors.set(l,{varName:i,scale:h,method:y}),A.queueRecompute()}static queueRecompute(){if(A.recomputeQueued)return;A.recomputeQueued=!0,queueMicrotask(()=>{A.recomputeQueued=!1,A.recomputeColors()})}static recomputeColors(){if(A.computedColors.size===0)return;let l=[];for(let[h,{varName:y,scale:x,method:o}]of A.computedColors)try{let C=A.fromVar(y),s;switch(o){case"b":s=x>0?C.brighten(x):C.darken(-x);break;case"s":s=x>0?C.saturate(x):C.desaturate(-x);break;case"h":s=C.rotate(x*100);break;case"o":s=C.opacity(x);break;default:continue}l.push(` ${h}: ${s.rgba};`)}catch(C){}if(l.length===0)return;let i=`:root {
1
+ (()=>{var k6=Object.defineProperty;var c6=(l)=>l;function r6(l,i){this[l]=c6.bind(null,i)}var A4=(l,i)=>{for(var h in i)k6(l,h,{get:i[h],enumerable:!0,configurable:!0,set:r6.bind(i,h)})};var d6=((l)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(l,{get:(i,h)=>(typeof require<"u"?require:i)[h]}):l)(function(l){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+l+'" is not supported')});var q3={};A4(q3,{xrControllersText:()=>ah,xrControllers:()=>Kh,xinTagList:()=>ay,xinTag:()=>Gy,xinTabs:()=>Xi,xinTable:()=>Zl,xinSizer:()=>Py,xinSidenav:()=>xh,xinSelect:()=>kl,xinSegmented:()=>Ay,xinRating:()=>yy,xinPasswordStrength:()=>iy,xinNotification:()=>Lh,xinMenu:()=>Wl,xinMd:()=>ai,xinLocalized:()=>pl,xinForm:()=>Vh,xinFloat:()=>ol,xinField:()=>Ph,xinCarousel:()=>ll,wrapIcon:()=>k5,version:()=>o6,updateLocalized:()=>p5,trackDrag:()=>x1,tosijs:()=>$2,tosiThemeEditor:()=>Jh,tosiTagList:()=>x6,tosiTag:()=>A3,tosiTabs:()=>e2,tosiTable:()=>_5,tosiSizer:()=>y6,tosiSidenav:()=>i0,tosiSelect:()=>k1,tosiSegmented:()=>i6,tosiRow:()=>Qh,tosiRouteView:()=>By,tosiRichText:()=>L8,tosiRating:()=>T8,tosiPasswordStrength:()=>I8,tosiNotification:()=>w3,tosiMonth:()=>Th,tosiMenu:()=>M9,tosiMd:()=>L2,tosiLocalized:()=>q1,tosiLocalePicker:()=>Q9,tosiHeaderLinks:()=>Fh,tosiHeader:()=>Uh,tosiGrid:()=>Yh,tosiForm:()=>W8,tosiFloat:()=>Z2,tosiField:()=>Q8,tosiDialog:()=>b0,tosiColumn:()=>Wh,tosiCarousel:()=>_9,testManager:()=>r1,tabSelector:()=>Ni,svgIcon:()=>M7,svg2DataUrl:()=>s5,styleSheet:()=>U0,spacer:()=>o3,sizeBreak:()=>qy,sideNav:()=>yh,setLocale:()=>cl,scriptTag:()=>g1,runTests:()=>h4,router:()=>s0,richTextWidgets:()=>m8,richText:()=>cy,rewriteImports:()=>b1,resolveMenuItems:()=>c1,resolveIcon:()=>R1,removeLastMenu:()=>M,postNotification:()=>eh,positionFloat:()=>F9,popMenu:()=>H,popFloat:()=>b2,popDropMenu:()=>u9,parseShortcut:()=>Y0,navigate:()=>py,modifierKeys:()=>Bl,menu:()=>I9,matchShortcut:()=>B5,markdownViewer:()=>Ki,mapBox:()=>Sh,makeSorter:()=>a0,localize:()=>X,localePicker:()=>nl,loadTransform:()=>m0,liveTheme:()=>$,liveExample:()=>x4,legacyAliases:()=>b8,keystroke:()=>fl,keycode:()=>Y9,isBreached:()=>D8,insertExamples:()=>l4,initTooltips:()=>$y,initLocalization:()=>dl,icons:()=>B,iconRules:()=>g5,i18n:()=>J,getRouterParams:()=>ry,gamepadText:()=>Gh,gamepadState:()=>N8,findShortcutAction:()=>A5,findHighestZ:()=>L1,filterPart:()=>o4,filterForDrop:()=>H2,filterForClick:()=>j5,filterBuilder:()=>fh,expect:()=>J5,executeInline:()=>e0,executeInIframe:()=>E0,executeCode:()=>B8,enableTests:()=>D5,enableLiveTheme:()=>H8,elastic:()=>R8,editableRect:()=>dh,dragAndDrop:()=>R0,displayShortcut:()=>N0,disableTests:()=>I5,disableLiveTheme:()=>bh,digest:()=>S8,defineRoutes:()=>ny,defineIcons:()=>H7,defaultColors:()=>V1,dataTable:()=>$l,createThemeWithLegacy:()=>Rh,createTheme:()=>q2,createTestContext:()=>H5,createSubMenu:()=>t5,createMenuItem:()=>D9,createMenuAction:()=>H9,createDropMenuItem:()=>S9,createDocBrowser:()=>ch,createDarkTheme:()=>g4,createColorVariables:()=>Z8,componentVars:()=>$h,commandButton:()=>f1,colorInput:()=>n5,codeEditor:()=>p2,canonicalShortcut:()=>vl,bringToFront:()=>Z1,bodymovinPlayer:()=>L7,blockStyle:()=>B3,baseVariables:()=>$8,baseTheme:()=>Nh,baseDarkTheme:()=>Xh,b3d:()=>m7,availableFilters:()=>M5,applyTheme:()=>C3,abTest:()=>J7,XinWord:()=>ky,XinTagList:()=>Ky,XinTag:()=>Fy,XinSizer:()=>_y,XinSelect:()=>gl,XinSegmented:()=>ty,XinRating:()=>hy,XinPasswordStrength:()=>ly,XinNotification:()=>mh,XinMenu:()=>Yl,XinLocalized:()=>Q0,XinForm:()=>_h,XinFloat:()=>xl,XinField:()=>qh,XinCarousel:()=>E7,TosiThemeEditor:()=>s3,TosiTagList:()=>V2,TosiTag:()=>k0,TosiTabs:()=>M0,TosiTable:()=>Z0,TosiSizer:()=>z4,TosiSidenav:()=>y2,TosiSelect:()=>t1,TosiSegmented:()=>P2,TosiRow:()=>h3,TosiRouteView:()=>v3,TosiRating:()=>n4,TosiPasswordStrength:()=>w4,TosiNotification:()=>S1,TosiMonth:()=>r3,TosiMenu:()=>$0,TosiMd:()=>u0,TosiLocalized:()=>A1,TosiLocalePicker:()=>W0,TosiHeaderLinks:()=>l3,TosiHeader:()=>E5,TosiGrid:()=>x3,TosiForm:()=>s4,TosiFloat:()=>Q1,TosiField:()=>C4,TosiDialog:()=>F5,TosiColumn:()=>y3,TosiCarousel:()=>G0,TabSelector:()=>Yi,SvgIcon:()=>c5,SizeBreak:()=>j3,SideNav:()=>hh,STORAGE_KEY:()=>L0,RichText:()=>p4,RemoteSyncManager:()=>l0,MarkdownViewer:()=>Gi,MapBox:()=>x2,LocalePicker:()=>wl,LiveExample:()=>h2,FilterPart:()=>m5,FilterBuilder:()=>L5,EditableRect:()=>B1,DataTable:()=>Rl,CodeEditor:()=>m1,BodymovinPlayer:()=>n2,B3d:()=>r5,AbTest:()=>w2});var $2={};A4($2,{xinValue:()=>t6,xinSlot:()=>f7,xinProxy:()=>z9,xinPath:()=>j6,xin:()=>T,warnDeprecated:()=>h1,version:()=>f9,vars:()=>r,varDefault:()=>w,validateAgainstConstraints:()=>w9,updates:()=>T4,unobserve:()=>W2,touchElement:()=>l5,touch:()=>s1,tosiValue:()=>Q,tosiUnique:()=>Y7,tosiSlot:()=>B7,tosiSetValue:()=>v6,tosiPath:()=>y1,tosiLoader:()=>$7,tosiBlueprint:()=>R7,tosiAccessor:()=>z6,tosi:()=>E,throttle:()=>k2,sync:()=>Q7,svgElements:()=>q0,share:()=>G7,settings:()=>f0,scrollListItemIntoView:()=>k7,onThemePreferencesChange:()=>T6,onStylesheetChange:()=>J6,on:()=>d2,observe:()=>e4,mathML:()=>c9,makeComponent:()=>h5,invertLuminance:()=>u4,initVars:()=>I6,hotReload:()=>z7,getThemePreferences:()=>s9,getListItem:()=>u1,getListInstance:()=>E4,getListBinding:()=>r2,getCssVar:()=>y9,elements:()=>f,deprecated:()=>i1,deleteListItem:()=>s7,debounce:()=>R2,css:()=>c2,boxedProxy:()=>i5,boxed:()=>C1,blueprintLoader:()=>b7,blueprint:()=>Z7,bindings:()=>K1,bindParts:()=>L6,bind:()=>F1,TOSI_ACCESSOR:()=>I4,TAKE_DESCRIPTOR:()=>t0,StyleSheet:()=>a1,MoreMath:()=>$6,Component:()=>z,Color:()=>A,BlueprintLoader:()=>y5,Blueprint:()=>V0});function T1(l){if(l==null||typeof l!=="object")return l;if(l instanceof Set)return new Set(l);else if(Array.isArray(l))return l.map(T1);let i={};for(let h in l){let y=l[h];if(l!=null&&typeof l==="object")i[h]=T1(y);else i[h]=y}return i}var D4="-xin-data",s2=`.${D4}`,I3="-xin-event",P3=`.${I3}`,j1=Symbol.for("xin-path"),g2=Symbol.for("xin-value"),w6="xinObserve",n6="xinBind",p6="xinOn",I4=Symbol.for("tosi-accessor"),t0=Symbol.for("tosi-take"),B0=Symbol("list-binding"),C2=Symbol("list-instance"),a4=new Map;function B6(l,i){let h=a4.get(l);if(h===void 0)h=new Set,a4.set(l,h);h.add(i)}function f6(l){return a4.get(l)}var V3=new Set;function h1(l,i){if(!V3.has(l))console.warn(i),V3.add(l)}function i1(l,i){let h=!1;return(...y)=>{if(!h)console.warn(i),h=!0;return l(...y)}}var y1=(l)=>{return l&&l[j1]||void 0};function Q(l){if(typeof l==="object"&&l!==null){let i=l[g2];return i!==void 0?i:l}return l}function z6(l){return l!=null?l[I4]:void 0}function v6(l,i){if(y1(l)===void 0)throw Error("tosiSetValue requires a xin or boxed proxy");l[g2]=i}var j6=i1(y1,"xinPath is deprecated. Use tosiPath instead."),t6=i1(Q,"xinValue is deprecated. Use tosiValue instead."),a2=new WeakMap,G1=new WeakMap,Q2=(l)=>{let i=l.cloneNode();if(i instanceof Element){let h=G1.get(l),y=a2.get(l);if(h!=null)G1.set(i,T1(h));if(y!=null)a2.set(i,T1(y))}for(let h of Array.from(l instanceof HTMLTemplateElement?l.content.childNodes:l.childNodes))if(h instanceof Element||h instanceof DocumentFragment)i.appendChild(Q2(h));else i.appendChild(h.cloneNode());return i},f0={debug:!1,perf:!1},A6=(l)=>{try{return JSON.stringify(l)}catch(i){return"{has circular references}"}},T3=(...l)=>Error(l.map(A6).join(" ")),q6=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),_6=0,P6=()=>(parseInt("10000",36)+ ++_6).toString(36).slice(-5),u3=()=>q6()+P6(),Q4=Symbol("delete"),M3=Symbol("new-object"),q4=Symbol("automatic-index");function m3(l){if(l==="")return[];if(Array.isArray(l))return l;else{let i=[];while(l.length>0){let h=l.search(/\[[^\]]+\]/);if(h===-1){i.push(l.split("."));break}else{let y=l.slice(0,h);if(l=l.slice(h),y!=="")i.push(y.split("."));if(h=l.indexOf("]")+1,i.push(l.slice(1,h-1)),l.slice(h,h+1)===".")h+=1;l=l.slice(h)}}return i}}var U1=new WeakMap;function L3(l,i){if(U1.get(l)===void 0)U1.set(l,{});if(U1.get(l)[i]===void 0)U1.get(l)[i]={};let h=U1.get(l)[i];if(i==="_auto_")l.forEach((y,x)=>{if(y[q4]===void 0)y[q4]=u3();h[y[q4]+""]=x});else l.forEach((y,x)=>{h[u(y,i)+""]=x});return h}function V6(l,i){if(U1.get(l)===void 0||U1.get(l)[i]===void 0)return L3(l,i);else return U1.get(l)[i]}function O6(l,i,h){h=h+"";let y=V6(l,i)[h];if(y===void 0||u(l[y],i)+""!==h)y=L3(l,i)[h];return y}function U6(l,i,h){if(l[i]===void 0&&h!==void 0)l[i]=h;return l[i]}function e3(l,i,h,y){let x=i!==""?O6(l,i,h):h;if(y===Q4)return l.splice(x,1),U1.delete(l),Symbol("deleted");else if(y===M3){if(i===""&&l[x]===void 0)l[x]={}}else if(y!==void 0)if(x!==void 0)l[x]=y;else if(i!==""&&u(y,i)+""===h+"")l.push(y),x=l.length-1;else throw Error(`byIdPath insert failed at [${i}=${h}]`);return l[x]}function O3(l){if(!Array.isArray(l))throw T3("setByPath failed: expected array, found",l)}function U3(l){if(l==null||!(l instanceof Object))throw T3("setByPath failed: expected Object, found",l)}function u(l,i){let h=m3(i),y=l,x,o,C,s;for(x=0,o=h.length;y!==void 0&&x<o;x++){let g=h[x];if(Array.isArray(g))for(C=0,s=g.length;y!==void 0&&C<s;C++){let k=g[C];y=y[k]}else if(y.length===0){if(y=y[Number(g.slice(1))],g[0]!=="=")return}else if(g.includes("=")){let[k,...c]=g.split("=");y=e3(y,k,c.join("="))}else C=parseInt(g,10),y=y[C]}return y}function N2(l,i,h){let y=l;if(i==="")throw Error("setByPath cannot be used to set the root object");let x=m3(i);while(y!=null&&x.length>0){let o=x.shift();if(typeof o==="string"){let C=o.indexOf("=");if(C>-1){if(C===0)U3(y);else O3(y);let s=o.slice(0,C),g=o.slice(C+1);if(y=e3(y,s,g,x.length>0?M3:h),x.length===0)return!0}else{O3(y);let s=parseInt(o,10);if(x.length>0)y=y[s];else{if(h!==Q4){if(y[s]===h)return!1;y[s]=h}else y.splice(s,1);return!0}}}else if(Array.isArray(o)&&o.length>0){U3(y);while(o.length>0){let C=o.shift();if(o.length>0||x.length>0)y=U6(y,C,o.length>0?{}:[]);else{if(h!==Q4){if(y[C]===h)return!1;y[C]=h}else{if(!Object.prototype.hasOwnProperty.call(y,C))return!1;delete y[C]}return!0}}}else throw Error(`setByPath failed, bad path ${i}`)}throw Error(`setByPath(${l}, ${i}, ${h}) failed`)}var e={},W4=null,F6=(l)=>{W4=l},A0=()=>{if(W4===null)throw Error("xin proxy not initialized");return W4},Y4=null,N4=null,G6=(l,i)=>{Y4=l,N4=i},K6=()=>{if(Y4===null)throw Error("bind not initialized");return Y4},a6=()=>{if(N4===null)throw Error("on not initialized");return N4},F3=Symbol("observer should be removed"),z0=[],o2=[],X4=!1,R4,$4;function Q6(l,i,h,y){let x=f6(l);if(x===void 0)return[];let o=[];for(let C of x){let s=u(h,C);if(s!==void 0)o.push(`${l}[${C}=${s}]${y}`)}return o}class E3{description;test;callback;constructor(l,i){let h=typeof i==="string"?`"${i}"`:`function ${i.name}`,y;if(typeof l==="string")this.test=(x)=>typeof x==="string"&&x!==""&&(l.startsWith(x)||x.startsWith(l)),y=`test = "${l}"`;else if(l instanceof RegExp)this.test=l.test.bind(l),y=`test = "${l.toString()}"`;else if(l instanceof Function)this.test=l,y=`test = function ${l.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${y}, ${h}`,typeof i==="function")this.callback=i;else throw Error("expect callback to be a path or function");z0.push(this)}}var T4=async()=>{if(R4===void 0)return;await R4},W6=()=>{if(f0.perf)console.time("xin async update");let l=Array.from(o2);o2.length=0,X4=!1;for(let i of l)z0.filter((h)=>{let y;try{y=h.test(i)}catch(x){throw Error(`Listener ${h.description} threw "${x}" at "${i}"`)}if(y===F3)return W2(h),!1;return y}).forEach((h)=>{let y;try{y=h.callback(i)}catch(x){console.error(`Listener ${h.description} threw "${x}" handling "${i}"`)}if(y===F3)W2(h)});if(typeof $4==="function")$4();if(f0.perf)console.timeEnd("xin async update")},s1=(l)=>{let i=typeof l==="string"?l:y1(l);if(i===void 0)throw console.error("touch was called on an invalid target",l),Error("touch was called on an invalid target");if(X4===!1)R4=new Promise((y)=>{$4=y}),X4=setTimeout(W6);if(o2.find((y)=>i.startsWith(y))==null)o2.push(i);let h=i.match(/^(.+)\[(\d+)\](.*)$/);if(h!==null){let[,y,x,o]=h,C=parseInt(x,10),s=u(e,`${y}[${C}]`);if(s!=null){let g=Q6(y,C,s,o);for(let k of g)if(o2.find((c)=>k.startsWith(c))==null)o2.push(k)}}},X2=(l,i)=>{return new E3(l,i)},W2=(l)=>{let i=z0.indexOf(l);if(i>-1)z0.splice(i,1);else throw Error("unobserve failed, listener not found")},l9=(l,i)=>{let h=new Event(i);l.dispatchEvent(h)},i9=(l)=>{if(l instanceof HTMLInputElement)return l.type;else if(l instanceof HTMLSelectElement&&l.hasAttribute("multiple"))return"multi-select";else return"other"},Y6=(l,i)=>{switch(i9(l)){case"radio":l.checked=l.value===i;break;case"checkbox":l.checked=!!i;break;case"date":l.valueAsDate=new Date(i);break;case"multi-select":for(let h of Array.from(l.querySelectorAll("option")))h.selected=i[h.value];break;default:l.value=i}},N6=(l)=>{switch(i9(l)){case"radio":{let i=l.parentElement?.querySelector(`[name="${l.name}"]:checked`);return i!=null?i.value:null}case"checkbox":return l.checked;case"date":return l.valueAsDate?.toISOString();case"multi-select":return Array.from(l.querySelectorAll("option")).reduce((i,h)=>{return i[h.value]=h.selected,i},{});default:return l.value}},{ResizeObserver:G3}=globalThis,Z4=G3!=null?new G3((l)=>{for(let i of l){let h=i.target;l9(h,"resize")}}):{observe(){},unobserve(){}},K3=(l,i,h=!0)=>{if(l!=null&&i!=null)if(typeof i==="string")l.textContent=i;else if(Array.isArray(i))i.forEach((y)=>{l.append(y instanceof Node&&h?Q2(y):y)});else if(i instanceof Node)l.append(h?Q2(i):i);else throw Error("expect text content or document node")},R2=(l,i=250)=>{let h;return(...y)=>{if(h!==void 0)clearTimeout(h);h=setTimeout(()=>{l(...y)},i)}},k2=(l,i=250)=>{let h,y=Date.now()-i,x=!1;return(...o)=>{if(clearTimeout(h),h=setTimeout(()=>{l(...o),y=Date.now()},i),!x&&Date.now()-y>=i){x=!0;try{l(...o),y=Date.now()}finally{x=!1}}}},K1={value:{toDOM:Y6,fromDOM(l){return N6(l)}},text:{toDOM(l,i){l.textContent=i}},enabled:{toDOM(l,i){l.disabled=!i}},disabled:{toDOM(l,i){l.disabled=Boolean(i)}},list:{toDOM(l,i,h){r2(l,i,h).update(i)}}};function v1(l){return l.replace(/[A-Z]/g,(i)=>{return`-${i.toLocaleLowerCase()}`})}function h9(l){return l.replace(/-([a-z])/g,(i,h)=>{return h.toLocaleUpperCase()})}var X6=180/Math.PI,R6=Math.PI/180;function z1(l,i,h){return h<l?NaN:i<l?l:i>h?h:i}function Y1(l,i,h,y=!0){if(y)h=z1(0,h,1);return h*(i-l)+l}var $6={RADIANS_TO_DEGREES:X6,DEGREES_TO_RADIANS:R6,clamp:z1,lerp:Y1};function y9(l,i=document.body){let h=getComputedStyle(i);if(l.endsWith(")")&&l.startsWith("var("))l=l.slice(4,-1);return h.getPropertyValue(l).trim()}var Z6=(l,i,h)=>{return(0.299*l+0.587*i+0.114*h)/255},D1=(l)=>("00"+Math.round(Number(l)).toString(16)).slice(-2);class x9{h;s;l;constructor(l,i,h){l/=255,i/=255,h/=255;let y=Math.max(l,i,h),x=y-Math.min(l,i,h),o=x!==0?y===l?(i-h)/x:y===i?2+(h-l)/x:4+(l-i)/x:0;this.h=60*o<0?60*o+360:60*o,this.s=x!==0?y<=0.5?x/(2*y-x):x/(2-(2*y-x)):0,this.l=(2*y-x)/2}}var N1=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(N1)N1.style.display="none";class A{r;g;b;a;static fromVar(l,i=document.body){return A.fromCss(y9(l,i))}static fromCss(l){let i=l.match(/^#([0-9a-fA-F]+)$/);if(i){let g=i[1],k=(c,d)=>parseInt(g.slice(c,c+d),16);if(g.length===3||g.length===4){let c=(d)=>k(d,1)*17;return new A(c(0),c(1),c(2),g.length===4?c(3)/255:1)}if(g.length===6||g.length===8)return new A(k(0,2),k(2,2),k(4,2),g.length===8?k(6,2)/255:1)}let h=l;if(N1 instanceof HTMLSpanElement)N1.style.color="black",N1.style.color=l,document.body.appendChild(N1),h=getComputedStyle(N1).color,N1.remove();let[y,x,o,C]=h.match(/[\d.]+/g)||["0","0","0","0"],s=h.startsWith("color(srgb")?255:1;return new A(Number(y)*s,Number(x)*s,Number(o)*s,C==null?1:Number(C))}static fromHsl(l,i,h,y=1){let x,o,C;if(i===0)x=o=C=h;else{let g=(n,v,p)=>{if(p<0)p+=1;if(p>1)p-=1;if(p<0.16666666666666666)return n+(v-n)*6*p;if(p<0.5)return v;if(p<0.6666666666666666)return n+(v-n)*(0.6666666666666666-p)*6;return n},k=h<0.5?h*(1+i):h+i-h*i,c=2*h-k,d=(l%360+360)%360/360;x=g(c,k,d+0.3333333333333333),o=g(c,k,d),C=g(c,k,d-0.3333333333333333)}let s=new A(x*255,o*255,C*255,y);return s.hslCached={h:(l%360+360)%360,s:i,l:h},s}static black=new A(0,0,0);static white=new A(255,255,255);constructor(l,i,h,y=1){this.r=z1(0,l,255),this.g=z1(0,i,255),this.b=z1(0,h,255),this.a=z1(0,y,1)}get inverse(){return new A(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:l,s:i,l:h}=this._hsl;return A.fromHsl(l,i,1-h,this.a)}get opaque(){return this.a===1?this:new A(this.r,this.g,this.b,1)}contrasting(l=1){return this.opaque.blend(this.brightness>0.5?A.black:A.white,l)}get rgb(){let{r:l,g:i,b:h}=this;return`rgb(${l.toFixed(0)},${i.toFixed(0)},${h.toFixed(0)})`}get rgba(){let{r:l,g:i,b:h,a:y}=this;return`rgba(${l.toFixed(0)},${i.toFixed(0)},${h.toFixed(0)},${y.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 x9(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:l,s:i,l:h}=this._hsl;return`hsl(${l.toFixed(0)}deg ${(i*100).toFixed(0)}% ${(h*100).toFixed(0)}%)`}get hsla(){let{h:l,s:i,l:h}=this._hsl;return`hsl(${l.toFixed(0)}deg ${(i*100).toFixed(0)}% ${(h*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let l=this.brightness*255;return new A(l,l,l)}get brightness(){return Z6(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+D1(this.r)+D1(this.g)+D1(this.b):"#"+D1(this.r)+D1(this.g)+D1(this.b)+D1(Math.floor(255*this.a))}brighten(l){let{h:i,s:h,l:y}=this._hsl,x=z1(0,y+l*(1-y),1);return A.fromHsl(i,h,x,this.a)}darken(l){let{h:i,s:h,l:y}=this._hsl,x=z1(0,y*(1-l),1);return A.fromHsl(i,h,x,this.a)}saturate(l){let{h:i,s:h,l:y}=this._hsl,x=z1(0,h+l*(1-h),1);return A.fromHsl(i,x,y,this.a)}desaturate(l){let{h:i,s:h,l:y}=this._hsl,x=z1(0,h*(1-l),1);return A.fromHsl(i,x,y,this.a)}rotate(l){let{h:i,s:h,l:y}=this._hsl,x=(i+360+l)%360;return A.fromHsl(x,h,y,this.a)}opacity(l){let{h:i,s:h,l:y}=this._hsl;return A.fromHsl(i,h,y,l)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(l,i){return new A(Y1(this.r,l.r,i),Y1(this.g,l.g,i),Y1(this.b,l.b,i),Y1(this.a,l.a,i))}static blendHue(l,i,h){let y=(i-l+720)%360;if(y<180)return l+h*y;else return l-(360-y)*h}mix(l,i){let h=this._hsl,y=l._hsl;return A.fromHsl(h.s===0?y.h:y.s===0?h.h:A.blendHue(h.h,y.h,i),Y1(h.s,y.s,i),Y1(h.l,y.l,i),Y1(this.a,l.a,i))}colorMix(l,i){return A.fromCss(`color-mix(in hsl, ${this.html}, ${l.html} ${(i*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(l,i,h,y){if(!A.computedColors.has(l))A.computedColors.set(l,{varName:i,scale:h,method:y}),A.queueRecompute()}static queueRecompute(){if(A.recomputeQueued)return;A.recomputeQueued=!0,queueMicrotask(()=>{A.recomputeQueued=!1,A.recomputeColors()})}static recomputeColors(){if(A.computedColors.size===0)return;let l=[];for(let[h,{varName:y,scale:x,method:o}]of A.computedColors)try{let C=A.fromVar(y),s;switch(o){case"b":s=x>0?C.brighten(x):C.darken(-x);break;case"s":s=x>0?C.saturate(x):C.desaturate(-x);break;case"h":s=C.rotate(x*100);break;case"o":s=C.opacity(x);break;default:continue}l.push(` ${h}: ${s.rgba};`)}catch(C){}if(l.length===0)return;let i=`:root {
2
2
  ${l.join(`
3
3
  `)}
4
4
  }`;if(A.computedColorStylesheet===null)A.computedColorStylesheet=document.createElement("style"),A.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(A.computedColorStylesheet);A.computedColorStylesheet.textContent=i}}var v0=new Set,a3=!1;function b6(){if(!a3)a3=!0,v0.add(()=>A.queueRecompute())}function J6(l){return v0.add(l),()=>v0.delete(l)}function H6(){b6();for(let l of v0)l()}function a1(l,i){let h=Q(i),y=f.style(c2(h));y.id=l,document.head.append(y);let x=y1(i);if(x!==void 0)e4(x,()=>{y.textContent=c2(Q(i)),H6()})}var S6=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|line-height|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,o9=(l,i)=>{if(typeof i==="number"&&!S6.test(l))i=`${i}px`;if(l.startsWith("_"))if(l.startsWith("__"))l="--"+l.substring(2),i=`var(${l}-default, ${i})`;else l="--"+l.substring(1);return{prop:l,value:String(i)}},D6=(l,i,h)=>{if(h===void 0)return"";if(h instanceof A)h=h.html;let y=o9(i,h);return`${l} ${y.prop}: ${y.value};`},C9=(l,i,h="")=>{let y=v1(l);if(typeof i==="object"&&!(i instanceof A)){let x=Object.keys(i).map((o)=>C9(o,i[o],`${h} `)).join(`
@@ -9,11 +9,11 @@ ${h} }`}else return D6(h,y,i)},c2=(l,i="")=>{return Object.keys(l).map((h)=>{le
9
9
  ${x}
10
10
  }`}).join(`
11
11
 
12
- `)},I6=(l)=>{h1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let i={};for(let h of Object.keys(l)){let y=l[h],x=v1(h);i[`--${x}`]=typeof y==="number"&&y!==0?String(y)+"px":y}return i},u4=(l)=>{let i={};for(let h of Object.keys(l)){let y=l[h];if(y instanceof A)i[h]=y.inverseLuminance;else if(typeof y==="string"&&y.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/))i[h]=A.fromCss(y).inverseLuminance}return i},w=new Proxy({},{get(l,i){if(l[i]===void 0){let h="--"+v1(i);l[i]=(y)=>`var(${h}, ${y})`}return l[i]}}),r=new Proxy({},{get(l,i){if(i==="default")return w;if(l[i]==null){i=v1(i);let[,h,,y,x,o]=i.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",i],C=`--${h}`;if(x!=null){let s=y==null?Number(x)/100:-Number(x)/100;switch(o){case"b":case"s":case"h":case"o":{let g=`--${i}`;A.registerComputedColor(g,C,s,o),l[i]=`var(${g})`}break;case"":l[i]=`calc(var(${C}) * ${s})`;break;default:throw console.error(o),Error(`Unrecognized method ${o} for css variable ${C}`)}}else l[i]=`var(${C})`}return l[i]}});function s9(){let l=(i)=>typeof matchMedia<"u"&&matchMedia(i).matches;return{colorScheme:l("(prefers-color-scheme: dark)")?"dark":"light",contrast:l("(prefers-contrast: more)")?"more":l("(prefers-contrast: less)")?"less":l("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:l("(prefers-reduced-motion: reduce)"),reducedTransparency:l("(prefers-reduced-transparency: reduce)"),forcedColors:l("(forced-colors: active)")}}function T6(l){if(typeof matchMedia>"u")return()=>{};let i=["(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=()=>l(s9()),y=i.map((x)=>matchMedia(x));for(let x of y)x.addEventListener("change",h);return()=>{for(let x of y)x.removeEventListener("change",h)}}var u6="http://www.w3.org/1998/Math/MathML",M6="http://www.w3.org/2000/svg",n0={},g9=(l,i,h)=>{let y=o9(v1(i),h);if(y.prop.startsWith("--"))l.style.setProperty(y.prop,y.value);else l.style[i]=y.value},m6=(l)=>{return{toDOM(i,h){g9(i,l,h)}}},k9=(l,i,h)=>{if(i==="style")if(typeof h==="object")for(let y of Object.keys(h))if(y1(h[y]))F1(l,h[y],m6(y));else g9(l,y,h[y]);else l.setAttribute("style",h);else{let y=v1(i),x=l.constructor.observedAttributes;if(x?.includes(i)||x?.includes(y))if(typeof h==="boolean")h?l.setAttribute(y,""):l.removeAttribute(y);else l.setAttribute(y,h);else if(l[i]!==void 0){let{MathMLElement:o}=globalThis;if(l instanceof SVGElement||o!==void 0&&l instanceof o)l.setAttribute(i,h);else l[i]=h}else if(y==="class")h.split(" ").forEach((o)=>{l.classList.add(o)});else if(l[y]!==void 0)l[y]=h;else if(typeof h==="boolean")h?l.setAttribute(y,""):l.removeAttribute(y);else l.setAttribute(y,h)}},P4={},Q3=(l)=>{if(!P4[l])P4[l]={toDOM(i,h){k9(i,l,h)}};return P4[l]},M4=(l,i,h)=>{if(i==="apply")h(l);else if(i.match(/^on[A-Z]/)!=null){let y=i.substring(2).toLowerCase();d2(l,y,h)}else if(i==="bind")if((typeof h.binding==="string"?K1[h.binding]:h.binding)!==void 0&&h.value!==void 0)F1(l,h.value,h.binding instanceof Function?{toDOM:h.binding}:h.binding);else throw Error("bad binding");else if(i.match(/^bind[A-Z]/)!=null){let y=i.substring(4,5).toLowerCase()+i.substring(5);if(y!=="value"){let o=y==="text"?"textContent":y==="enabled"?"disabled (with .tosi.take(v => !v))":y==="disabled"?"disabled":y==="list"?".tosi.listBinding()":null;if(o)h1(`bind${y}`,`bind${i.substring(4)} is deprecated. Use { ${o}: ... } instead.`)}let x=K1[y];if(x!==void 0)F1(l,h,x);else throw Error(`${i} is not allowed, bindings.${y} is not defined`)}else if(h!=null&&typeof h==="object"&&h[j0])F1(l,h,Q3(i));else if(y1(h))F1(l,h,Q3(i));else k9(l,i,h)},m4=(l,...i)=>{if(n0[l]===void 0){let[x,o]=l.split("|");if(o===void 0)n0[l]=globalThis.document.createElement(x);else n0[l]=globalThis.document.createElementNS(o,x)}let h=n0[l].cloneNode(),y={};for(let x of i)if(x instanceof Element||x instanceof DocumentFragment||typeof x==="string"||typeof x==="number")if(h instanceof HTMLTemplateElement)h.content.append(x);else h.append(x);else if(y1(x))h.append(f.span({bindText:x}));else Object.assign(y,x);for(let x of Object.keys(y)){let o=y[x];M4(h,x,o)}return h},L4=(...l)=>{let i=globalThis.document.createDocumentFragment();for(let h of l)i.append(h);return i},f=new Proxy({fragment:L4},{get(l,i){if(i=i.replace(/[A-Z]/g,(h)=>`-${h.toLocaleLowerCase()}`),l[i]===void 0)l[i]=(...h)=>m4(i,...h);return l[i]},set(){throw Error("You may not add new properties to elements")}}),q0=new Proxy({fragment:L4},{get(l,i){if(l[i]===void 0)l[i]=(...h)=>m4(`${i}|${M6}`,...h);return l[i]},set(){throw Error("You may not add new properties to elements")}}),c9=new Proxy({fragment:L4},{get(l,i){if(l[i]===void 0)l[i]=(...h)=>m4(`${i}|${u6}`,...h);return l[i]},set(){throw Error("You may not add new properties to elements")}}),W3=new WeakSet;function L6(l,i,h="part"){let y=`[data-${h}]`;for(let x of Array.from(l.querySelectorAll(y))){if(W3.has(x))continue;let o=x.getAttribute(`data-${h}`);if(o==null)continue;let C=i[o];if(C==null)continue;W3.add(x);for(let s of Object.keys(C))M4(x,s,C[s])}}var e6=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],E6=!0,l7=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,i7=(l)=>l7.test(l),W1=(l="",i="")=>{if(l==="")return i;else if(i.match(/^\d+$/)!==null||i.includes("="))return`${l}[${i}]`;else return`${l}.${i}`},t0={};function _4(l,i){if(l!==null&&(typeof l==="object"||typeof l==="function"))return l;return new Proxy(t0,X1(i,!0))}var r9=()=>new Proxy({},X1("^",!0)),V4=(l)=>{let i=l(r9())?.path;if(!i?.startsWith("^."))throw Error("selector must return a property of the item");return i.substring(2)},O4=(l,i,h)=>{for(let y=0;y<l.length;y++)if(`${u(l[y],i)}`===`${h}`)return y;return-1},h7=(l,i)=>({listFind(h,y){if(h instanceof Element){let C=h;while(C&&!C[C2]&&C.parentElement)C=C.parentElement;let s=C?.[C2];if(s==null)return;let g=i.indexOf(s);return g!==-1?C1[l][g]:void 0}let x=V4(h),o=O4(i,x,y);return o!==-1?C1[l][o]:void 0},listUpdate(h,y){let x=V4(h),o=u(y,x),C=O4(i,x,o);if(C!==-1){let s=C1[l][C];for(let g of Object.keys(y))s[g]=y[g];return s}return C1[l].push(y),C1[l][i.length-1]},listRemove(h,y){let x=V4(h),o=O4(i,x,y);if(o===-1)return!1;return C1[l].splice(o,1),!0}}),Y3=!1;function y7(){if(!Y3)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),Y3=!0}var N3=(l)=>{return l===t0},x7=(l,i)=>({get(h,y){switch(y){case"value":return i===t0?u(e,l):i.valueOf?i.valueOf():i;case"path":return l;case"touch":return()=>s1(l);case"observe":return(x)=>{let o=X2(l,x);return()=>W2(o)};case"bind":return(x,o,C)=>{K6()(x,l,o,C)};case"on":{let x=i===t0?u(e,l):i.valueOf?i.valueOf():i;return(o,C)=>a6()(o,C,x)}case"binding":return(x)=>({bind:{value:l,binding:x}});case"listBinding":return(x=({span:C})=>C({bindText:"^"}),o={})=>{let C=o.virtual?.itemsPerRow??1,s=[];for(let g=0;g<C;g++)s.push(x(f,r9(),g));return[{bindList:{value:l,...o}},f.template(...s)]};case"listFind":case"listUpdate":case"listRemove":return h7(l,Array.isArray(i)?i:[])[y];case"take":return(...x)=>{let o=x[x.length-1],C=x.slice(0,-1).map((s)=>typeof s==="string"?s:s[t1]);return{[j0]:!0,paths:[l,...C],transform:o}}}return},set(h,y,x){if(y==="value"){if(x=Q(x),Q(T[l])!==x&&N2(e,l,x))s1(l);return!0}return!1}}),F2=(l,i)=>new Proxy(i,x7(l,i)),X3=new Set(["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"]),R3=new Map([[t1,"path"],["xinPath","path"],["tosiPath","path"],[g2,"value"],["xinValue","value"],["tosiValue","value"],[w6,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[p6,"on"],["xinOn","on"],["tosiOn","on"],[n6,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),X1=(l,i)=>({get(h,y){if((y==="tosi"||y===I4)&&i)return F2(l,h);if(N3(h)){let g=()=>u(e,l);switch(y){case"valueOf":case"toJSON":return()=>g();case Symbol.toPrimitive:return(d)=>{let n=g();if(d==="number")return Number(n);if(d==="string")return String(n);return n};case"toString":return()=>String(g())}if(X3.has(y))return F2(l,h)[y];let k=R3.get(y);if(k!==void 0)return y7(),F2(l,h)[k];let c=g();if(c!=null){let d=Object(c);if(y in d){let n=d[y];return typeof n==="function"?n.bind(d):n}}return}if(i&&(y==="valueOf"||y==="toJSON"))return()=>h.valueOf?h.valueOf():h;if(i&&!(y in h)&&X3.has(y))return F2(l,h)[y];let x=R3.get(y);if(x!==void 0)return F2(l,h)[x];if(typeof y==="symbol")return h[y];let o=Object.getOwnPropertyDescriptor(h,y);if(o&&!o.configurable&&!o.writable&&"value"in o)return o.value;let C=y,s=C.match(/^([^.[]+)\.(.+)$/)??C.match(/^([^\]]+)(\[.+)/)??C.match(/^(\[[^\]]+\])\.(.+)$/)??C.match(/^(\[[^\]]+\])\[(.+)$/);if(s!==null){let[,g,k]=s,c=W1(l,g),d=Q(u(h,g));return d!==null&&typeof d==="object"?new Proxy(d,X1(c,i))[k]:d}if(C.startsWith("[")&&C.endsWith("]"))C=C.substring(1,C.length-1);if(!Array.isArray(h)&&h[C]!==void 0||Array.isArray(h)&&C.includes("=")){let g;if(C.includes("=")){let[k,c]=C.split("=");g=h.find((d)=>`${u(d,k)}`===c)}else g=h[C];if(g instanceof Object){g=Q(g);let k=W1(l,C);return new Proxy(g instanceof Function?g.bind(h):g,X1(k,i))}else return i?_4(g,W1(l,C)):g}else if(Array.isArray(h)){let g=h[C];return typeof g==="function"?(...k)=>{let c=k.map((n)=>Q(n)),d=g.apply(h,c);if(e6.includes(C))s1(l);if(d!=null&&typeof d==="object"){if(C==="find"||C==="findLast"||C==="at"){let n=h.indexOf(d);if(n!==-1)return new Proxy(d,X1(W1(l,String(n)),i))}}return d}:typeof g==="object"?new Proxy(Q(g),X1(W1(l,C),i)):i?_4(g,W1(l,C)):g}else{let g=h[C];if(g!==null&&typeof g==="object")g=Q(g);return i?_4(g,W1(l,C)):g}},set(h,y,x){if(x=Q(x),x!==null&&typeof x==="object")if(Array.isArray(x))for(let C=0;C<x.length;C++)x[C]=Q(x[C]);else for(let C of Object.keys(x))x[C]=Q(x[C]);let o=y===g2||y==="xinValue"||y==="tosiValue"||y==="value"&&(N3(h)||i)?l:W1(l,y);if(E6&&!i7(o))throw Error(`setting invalid path ${o}`);if(Q(T[o])!==x&&N2(e,o,x))s1(o);return!0}}),e4=(l,i)=>{let h=typeof i==="function"?i:T[i];if(typeof h!=="function")throw Error(`observe expects a function or path to a function, ${i} is neither`);return X2(l,h)},T=new Proxy(e,X1("",!1));F6(T);var C1=new Proxy(e,X1("",!0)),o7=16,C7=100;function $3(l,i){let h=Array.from(l.querySelectorAll(s2));if(l.matches(s2))h.unshift(l);for(let y of h){let x=G1.get(y);for(let o of x){if(o.path.startsWith("^"))o.path=`${i}${o.path.substring(1)}`;if(o.binding.toDOM!=null)o.binding.toDOM(y,T[o.path])}}}class d9{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(l,i,h={}){if(this.boundElement=l,this.itemToElement=new WeakMap,h.idPath!=null){let s=y1(i);if(s!=null)B6(s,h.idPath)}let y=h.virtual?.itemsPerRow??1,x=Array.from(l.children).find((s)=>s instanceof HTMLTemplateElement),o=null;if(x!=null){let s=y;if(x.content.children.length<1||x.content.children.length!==s)throw Error(`ListBinding expects a template with exactly ${s} child element(s)`);this.templates=Array.from(x.content.children).map((g)=>Q2(g)),o=x.nextElementSibling,x.remove()}else if(l.children.length===1)this.templates=[l.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=h;let C=l.namespaceURI;if(this.isNamespaced=C==="http://www.w3.org/2000/svg"||C==="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"),o!=null)this.boundElement.insertBefore(this.listTop,o),this.boundElement.insertBefore(this.listBottom,o);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(y>1){this.boundElement.classList.add("tosi-virtual-grid");let s=this.boundElement.style;if(s!=null)s.setProperty("--tosi-columns",String(y)),s.display=s.display||"grid",s.gridTemplateColumns=s.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",y>1?"grid":"list");if(this.boundElement[B0]=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(Z4.observe(this.boundElement),this._update=k2(()=>{this.update(this.array,!0)},o7),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:l,visibleProp:i}=this.options,h=this.array;if(l!==void 0)h=h.filter((y)=>y[l]!==!0);if(i!==void 0)h=h.filter((y)=>y[i]===!0);if(this.options.filter&&this.needle!==void 0)h=this.options.filter(h,this.needle);return this._filteredCache=h,h}visibleSlice(){let{virtual:l}=this.options,i=this.filteredArray(),h=0,y=i.length-1,x=0,o=0;if(l!=null&&this.boundElement instanceof HTMLElement){let C=this.boundElement.offsetWidth,s=l.scrollContainer==="window",g,k;if(s){g=window.innerHeight;let n=this.boundElement.getBoundingClientRect();k=Math.max(0,-n.top)}else g=this.boundElement.offsetHeight,k=this.boundElement.scrollTop;let c=l.width!=null?Math.max(1,Math.floor(C/l.width)):l.visibleColumns??1,d=Math.ceil(i.length/c);if(l.minHeight!=null){let n=l.minHeight,v=Math.ceil(g/n)+(l.rowChunkSize||1),p=c*v,j=d*n,P=Math.max(0,j-g),_=P>0?Math.min(1,Math.max(0,k/P)):0,V=Math.max(0,d-v+1),K=_*V,Z=Math.floor(K);if(l.rowChunkSize)Z-=Z%l.rowChunkSize;return h=Z*c,y=h+p-1,x=k,o=Math.max(0,j-k-g),{items:i,firstItem:h,lastItem:y,topBuffer:x,bottomBuffer:o,interpolation:{t:_,position:K,scrollTop:k,viewportHeight:g,totalScrollHeight:j,rowHeight:l.height}}}else{let n=Math.ceil(g/l.height)+(l.rowChunkSize||1),v=c*n,p=Math.floor(k/l.height);if(p>d-n+1)p=Math.max(0,d-n+1);if(l.rowChunkSize)p-=p%l.rowChunkSize;h=p*c,y=h+v-1,x=p*l.height,o=Math.max((d-n)*l.height-x,0)}}return{items:i,firstItem:h,lastItem:y,topBuffer:x,bottomBuffer:o}}needle;filter=k2((l)=>{if(this.needle!==l)this.needle=l,this.update(this.array)},C7);update(l,i){if(l==null)l=[];if(this.array=l,!i)this._filteredCache=void 0;let{hiddenProp:h,visibleProp:y}=this.options,x=y1(l),o=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",o.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(o.items.length));let C=this._previousSlice,{firstItem:s,lastItem:g,topBuffer:k,bottomBuffer:c}=o,d=h===void 0&&y===void 0&&i===!0&&C!=null&&s===C.firstItem&&g===C.lastItem;if(d&&o.interpolation==null&&k===C.topBuffer&&c===C.bottomBuffer)return;if(d&&o.interpolation!=null){this._updateInterpolatedBuffers(o);return}this._previousSlice=o;let n=0,v=0,p=0,{idPath:j}=this.options,P=this.options.virtual?.itemsPerRow??1,_;if(j!=null){_=new Set;for(let W=s;W<=g;W++){let O=o.items[W];if(O!==void 0)_.add(String(O[j]))}}let V=new Set;for(let W of Array.from(this.boundElement.children)){if(W===this.listTop||W===this.listBottom)continue;let O=W[C2];if(O==null)continue;else if(O===!0)W.remove(),n++;else{if(V.has(O))continue;let F;if(j!=null)F=!_.has(String(O[j]));else{let R=o.items.indexOf(O);F=R<s||R>g}if(F){V.add(O);let R=this.itemToElement.get(O);if(R!=null)for(let Y of R)Y.remove();else W.remove();if(this.itemToElement.delete(O),j!=null)this.idToElement.delete(String(O[j]));n++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(k)+"px",this.listBottom.style.height=String(c)+"px";let K=[];for(let W=s;W<=g;W++){let O=o.items[W];if(O===void 0)continue;let F=this.itemToElement.get(Q(O));if(F==null&&j!=null){let R=String(O[j]);if(F=this.idToElement.get(R),F!=null){let Y=Q(O);this.itemToElement.set(Y,F);for(let o1 of F)o1[C2]=Y}}if(F==null){p++;let R=Q(O);if(F=this.templates.map((Y)=>Q2(Y)),typeof O==="object")this.itemToElement.set(R,F);for(let Y of F)Y[C2]=typeof O==="object"?R:!0;for(let Y of F)if(this.listBottom!=null)this.boundElement.insertBefore(Y,this.listBottom);else this.boundElement.append(Y);if(j!=null){let Y=O[j],o1=`${x}[${j}=${Y}]`;for(let r0 of F)$3(r0,o1);this.idToElement.set(String(Y),F)}else{let Y=`${x}[${W}]`;for(let o1 of F)$3(o1,Y)}}if(this.options.virtual!=null){let R=String(W+1);if(P>1)for(let Y=0;Y<F.length;Y++){let o1=F[Y];o1.setAttribute("role","gridcell"),o1.setAttribute("aria-rowindex",R),o1.setAttribute("aria-colindex",String(Y+1))}else for(let Y of F)Y.setAttribute("role","listitem"),Y.setAttribute("aria-rowindex",R)}K.push(...F)}let Z=null;for(let W of K){if(W.previousElementSibling!==Z)if(v++,Z?.nextElementSibling!=null)this.boundElement.insertBefore(W,Z.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(W,this.listBottom);else this.boundElement.append(W);Z=W}if(o.interpolation!=null)this._updateInterpolatedBuffers(o);if(f0.perf)console.log(x,"updated",{removed:n,created:p,moved:v})}_updateInterpolatedBuffers(l){let{t:i,position:h,scrollTop:y,viewportHeight:x,totalScrollHeight:o,rowHeight:C}=l.interpolation,s=0;for(let d of Array.from(this.boundElement.children)){if(d===this.listTop||d===this.listBottom)continue;s+=d.offsetHeight||C}let g=y,k=y+x-s,c=Math.max(0,i*k+(1-i)*g-h%1*C);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(c)+"px",this.listBottom.style.height=String(Math.max(0,o-c-s))+"px"}}var r2=(l,i,h)=>{let y=l[B0];if(i&&y===void 0)y=new d9(l,i,h),l[B0]=y;return y},E4=(l)=>{let i;while(!(i=l[C2])&&l&&l.parentElement)l=l.parentElement;return i?{element:l,item:i}:void 0},u1=(l)=>{let i=E4(l);return i?i.item:void 0},s7=(l)=>{let i=E4(l);if(!i)return console.error("deleteListItem failed, element is not part of a list instance",l),!1;let h=r2(i.element.parentElement);if(!h.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",l.parentElement,h),!1;let y=h.array.indexOf(i.item);if(y>-1)return h.array.splice(y,1),!0;return!1},g7={start:"start",middle:"center",end:"end",nearest:"nearest"},k7=(l,i,h={})=>{let y=r2(l);if(y==null)return console.error("scrollListItemIntoView failed, element has no list binding",l),!1;let{position:x="middle"}=h,o=y.filteredArray(),C=Q(i)??i,s=o.indexOf(C);if(s===-1)return console.error("scrollListItemIntoView failed, item not found in list",i),!1;let{virtual:g}=y.options;if(g!=null&&l instanceof HTMLElement){let k=g.width!=null?Math.max(1,Math.floor(l.offsetWidth/g.width)):g.visibleColumns??1,c=Math.floor(s/k),d=g.minHeight??g.height,n=Math.ceil(o.length/k),v=g.scrollContainer==="window",p=v?window.innerHeight:l.offsetHeight,j;if(g.minHeight!=null){let P=Math.ceil(p/d)+(g.rowChunkSize||1),_=n*d,V=Math.max(0,_-p),K=Math.max(1,n-P+1),Z=c/K;switch(x){case"start":j=Z*V;break;case"end":j=Math.max(0,(c-P+1)/K*V);break;case"nearest":{let W=v?Math.max(0,-l.getBoundingClientRect().top):l.scrollTop,O=V>0?W/V:0,F=Math.floor(O*K);if(c<F)j=Z*V;else if(c>=F+P)j=Math.max(0,(c-P+1)/K*V);else return!0;break}default:{let W=c-Math.floor(P/2);j=Math.max(0,W)/K*V}}}else{let P=c*g.height;switch(x){case"start":j=P;break;case"end":j=P-p+g.height;break;case"nearest":{let _=v?Math.max(0,-l.getBoundingClientRect().top):l.scrollTop;if(P<_)j=P;else if(P+g.height>_+p)j=P-p+g.height;else return!0;break}default:j=P-(p-g.height)/2}}if(j=Math.max(0,j),v){let P=l.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:P+j,behavior:"smooth"})}else l.scrollTo({top:j,behavior:"smooth"})}else{let k=y.itemToElement.get(C);if(k==null||k.length===0)return console.error("scrollListItemIntoView failed, no DOM element found for item",i),!1;k[0].scrollIntoView({block:g7[x]??"center",behavior:"smooth"})}return!0},{document:Y2,MutationObserver:Z3}=globalThis,l5=(l,i)=>{let h=G1.get(l);if(h==null)return;for(let y of h){let{binding:x,options:o}=y,{path:C}=y,{toDOM:s}=x;if(s!=null){if(C.startsWith("^")){let g=u1(l);if(g!=null&&g[t1]!=null)C=y.path=`${g[t1]}${C.substring(1)}`;else{if(l instanceof HTMLElement)console.warn(`Unresolved relative binding "${C}" —`,l,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(i==null||C.startsWith(i))s(l,A0()[C],o)}}};if(Z3!=null)new Z3((l)=>{l.forEach((i)=>{Array.from(i.addedNodes).forEach((h)=>{if(h instanceof Element)Array.from(h.querySelectorAll(s2)).forEach((y)=>l5(y))})})}).observe(Y2.body,{subtree:!0,childList:!0});X2(()=>!0,(l)=>{let i=Array.from(Y2.querySelectorAll(s2));for(let h of i)l5(h,l)});var b3=(l)=>{let i=l.target?.closest(s2);while(i!=null){let h=G1.get(i);for(let y of h){let{binding:x,path:o}=y,{fromDOM:C}=x;if(C!=null){let s;try{s=C(i,y.options)}catch(g){throw console.error("Cannot get value from",i,"via",y),Error("Cannot obtain value fromDOM")}if(s!=null){let g=A0(),k=g[o];if(k==null)g[o]=s;else{let c=k[t1]!=null?k[g2]:k,d=s[t1]!=null?s[g2]:s;if(c!==d)g[o]=d}}}}i=i.parentElement.closest(s2)}};if(globalThis.document!=null)Y2.body.addEventListener("change",b3,!0),Y2.body.addEventListener("input",b3,!0);function c7(l,i,h,y){let{paths:x,transform:o}=i,{toDOM:C}=h;if(C==null)return l;let s=null,g={toDOM(c,d,n){let v=A0(),p=x.map((P)=>v[P]);if(s!==null&&p.every((P,_)=>P===s[_]))return;s=p;let j=o(...p);C(c,j,n)},fromDOM:h.fromDOM};l.classList?.add(D4);let k=G1.get(l);if(k==null)k=[],G1.set(l,k);for(let c of x)k.push({path:c,binding:g,options:y});if(!x[0].startsWith("^"))s1(x[0]);return l}function F1(l,i,h,y){if(l instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(i!=null&&typeof i==="object"&&i[j0])return c7(l,i,h,y);let x;if(typeof i==="object"&&i[t1]===void 0&&y===void 0){let{value:s}=i;x=typeof s==="string"?s:s[t1],y=i,delete y.value}else x=typeof i==="string"?i:i[t1];if(x==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:o}=h;l.classList?.add(D4);let C=G1.get(l);if(C==null)C=[],G1.set(l,C);if(C.push({path:x,binding:h,options:y}),o!=null&&!x.startsWith("^"))s1(x);if(y?.filter&&y?.needle)F1(l,y.needle,{toDOM(s,g){console.log({needle:g}),s[B0]?.filter(g)}});return l}var J3=new Set,r7=(l)=>{let i=l?.target?.closest(_3),h=!1,y=new Proxy(l,{get(o,C){if(C==="stopPropagation")return()=>{l.stopPropagation(),h=!0};else{let s=o[C];return typeof s==="function"?s.bind(o):s}}}),x=new Set;while(!h&&i!=null){let o=a2.get(i)[l.type]||x;for(let C of o){if(typeof C==="function")C(y);else{let s=A0()[C];if(typeof s==="function")s(y);else throw Error(`no event handler found at path ${C}`)}if(h)continue}i=i.parentElement!=null?i.parentElement.closest(_3):null}};function d2(l,i,h){let y=a2.get(l);if(l.classList.add(I3),y==null)y={},a2.set(l,y);if(!y[i])y[i]=new Set;if(y[i].add(h),!J3.has(i))J3.add(i),Y2.body.addEventListener(i,r7,!0);return()=>{y[i].delete(h)}}G6(F1,d2);function w9(l,i){if(!l.internals)return;let h={},y="";if(l.hasAttribute("required")&&i==="")h.valueMissing=!0,y="Please fill out this field.";let x=l.getAttribute("minlength");if(x&&i.length<parseInt(x,10))h.tooShort=!0,y=`Please use at least ${x} characters.`;let o=l.getAttribute("maxlength");if(o&&i.length>parseInt(o,10))h.tooLong=!0,y=`Please use no more than ${o} characters.`;let C=l.getAttribute("pattern");if(C&&i!=="")try{if(!new RegExp(`^(?:${C})$`).test(i))h.patternMismatch=!0,y="Please match the requested format."}catch{}if(Object.keys(h).length>0)l.internals.setValidity(h,y,l);else l.internals.setValidity({})}var d7=0;function U4(){return`custom-elt${(d7++).toString(36)}`}var H3=0,F4=null;function w7(){if(F4===null)F4=new MutationObserver((l)=>{let i=new Set;for(let h of l)if(h.type==="attributes"&&h.target instanceof z){let y=h.target,x=h9(h.attributeName);if(y._legacyTrackedAttrs?.has(x))i.add(y)}for(let h of i)h.queueRender(!1)});return F4}var K2={};function n7(l,i){let h=K2[l],y=c2(i).replace(/:host\(([^)]+)\)/g,`${l}$1`).replace(/:host\b/g,l);K2[l]=h?h+`
13
- `+y:y}function p7(l){if(K2[l])document.head.append(f.style({id:l+"-component"},K2[l]));delete K2[l]}class z extends HTMLElement{static elements=f;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(l){if(this.internals)if(l)this.internals.setValidity({customError:!0},l);else this.internals.setValidity({})}setValidity(l,i,h){this.internals?.setValidity(l,i,h)}setFormValue(l,i){this.internals?.setFormValue(l,i)}static get observedAttributes(){let l=this.initAttributes;if(l)return["hidden",...Object.keys(l).map(v1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=f.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;static StyleNode(l){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),f.style(c2(l))}static elementCreator(l={}){let i=this;if(!Object.prototype.hasOwnProperty.call(i,"_elementCreator")){if(l.tag!==void 0)h1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(l.styleSpec!==void 0)h1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(l.extends!==void 0)h1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let h=l.tag??i.preferredTagName;if(h==null)if(typeof i.name==="string"&&i.name!==""){if(h=v1(i.name),h.startsWith("-"))h=h.slice(1)}else h=U4();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=U4();while(customElements.get(h)!==void 0)h=U4();i._tagName=h;let y=l.styleSpec??i.lightStyleSpec;if(y!==void 0)n7(h,y);let x=l.extends??i.extends,o=x?{extends:x}:void 0;window.customElements.define(h,this,o),i._elementCreator=f[h]}return i._elementCreator}initAttributes(...l){if(h1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let y of l)this._legacyTrackedAttrs.add(y);w7().observe(this,{attributes:!0});let i={},h={};l.forEach((y)=>{i[y]=T1(this[y]);let x=v1(y);Object.defineProperty(this,y,{enumerable:!1,get(){if(typeof i[y]==="boolean")return this.hasAttribute(x);else if(this.hasAttribute(x))return typeof i[y]==="number"?parseFloat(this.getAttribute(x)):this.getAttribute(x);else if(h[y]!==void 0)return h[y];else return i[y]},set(o){if(typeof i[y]==="boolean"){if(o!==this[y]){if(o)this.setAttribute(x,"");else this.removeAttribute(x);this.queueRender()}}else if(typeof i[y]==="number"){if(o!==parseFloat(this[y]))this.setAttribute(x,o),this.queueRender()}else if(typeof o==="object"||`${o}`!==`${this[y]}`){if(o===null||o===void 0||typeof o==="object")this.removeAttribute(x);else this.setAttribute(x,o);this.queueRender(),h[y]=o}}})})}initValue(){let l=Object.getOwnPropertyDescriptor(this,"value");if(l===void 0||l.get!==void 0||l.set!==void 0)return;let i=this.hasAttribute("value")?this.getAttribute("value"):T1(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return i},set(h){if(i!==h)i=h,this._valueChanged=!0,this.queueRender(!0)}})}_parts;get parts(){let l=this.shadowRoot!=null?this.shadowRoot:this;if(this._parts==null)this._parts=new Proxy({},{get(i,h){if(i[h]===void 0){let y=l.querySelector(`[part="${h}"]`);if(y==null)y=l.querySelector(h);if(y==null)throw Error(`elementRef "${h}" does not exist!`);y.removeAttribute("data-ref"),i[h]=y}return i[h]}});return this._parts}attributeChangedCallback(l,i,h){let y=h9(l);if(!this._legacyTrackedAttrs?.has(y))this.queueRender(!1)}constructor(){super();if(H3+=1,this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let l=this.constructor.initAttributes;if(l)this._setupAttributeAccessors(l);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${H3}`,this._value=T1(this.defaultValue)}_setupAttributeAccessors(l){if(!this._attrValues)this._attrValues=new Map;for(let i of Object.keys(l)){let h=v1(i),y=l[i];if(i==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof y==="object"&&y!==null){console.warn(`${this.tagName}: initAttributes.${i} is an object. Use a regular property instead.`);continue}let x=this,o=!1;while(x){let C=Object.getOwnPropertyDescriptor(x,i);if(C){if(!C.configurable||C.get||C.set){o=!0;break}break}x=Object.getPrototypeOf(x)}if(o)continue;Object.defineProperty(this,i,{enumerable:!1,get:()=>{if(typeof y==="boolean")return this.hasAttribute(h);else if(this.hasAttribute(h))return typeof y==="number"?parseFloat(this.getAttribute(h)):this.getAttribute(h);else if(this._attrValues.has(i))return this._attrValues.get(i);else return y},set:(C)=>{if(typeof y==="boolean"){if(C!==this[i]){if(C)this.setAttribute(h,"");else this.removeAttribute(h);this.queueRender()}}else if(typeof y==="number"){if(C!==parseFloat(this[i]))this.setAttribute(h,C),this.queueRender()}else if(typeof C==="object"||`${C}`!==`${this[i]}`){if(C===null||C===void 0||typeof C==="object")this.removeAttribute(h);else this.setAttribute(h,C);this.queueRender(),this._attrValues.set(i,C)}}})}}connectedCallback(){if(p7(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(Z4.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(){Z4.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(l){if(l)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(l){if(this.value!==void 0&&typeof l==="string")this.value=l}_changeQueued=!1;_renderQueued=!1;queueRender(l=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=l;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(l9(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 l=typeof this.content!=="function",i=typeof this.content==="function"?this.content(f):this.content;if(Array.isArray(i)){let o={};i=i.filter((C)=>{if(C instanceof Node||typeof C==="string"||typeof C==="number"||y1(C))return!0;return Object.assign(o,C),!1});for(let C of Object.keys(o))M4(this,C,o[C])}let h=this.constructor,y=h.shadowStyleSpec??h.styleSpec;if(h.styleSpec&&!h.shadowStyleSpec)h1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:x}=h;if(y)x=h.styleNode=f.style(c2(y)),delete h.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),x=this.styleNode;if(x){let o=this.attachShadow({mode:"open"});o.appendChild(x.cloneNode(!0)),K3(o,i,l)}else if(i!==null){let o=Array.from(this.childNodes);K3(this,i,l),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==void 0;let C=Array.from(this.querySelectorAll("slot"));if(C.length>0)C.forEach(P0.replaceSlot);if(o.length>0){let s={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((g)=>{s[g.name]=g}),o.forEach((g)=>{let k=s[""],c=g instanceof Element?s[g.slot]:k;(c!==void 0?c:k).append(g)})}}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 l=typeof this.value==="string"?this.value:String(this.value);w9(this,l)}}class P0 extends z{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(l){let i=document.createElement("tosi-slot");if(l.name!=="")i.setAttribute("name",l.name);l.replaceWith(i)}}var B7=P0.elementCreator();class n9 extends z{static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();h1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=P0.replaceSlot}var f7=n9.elementCreator(),z7=(l=()=>!0)=>{let i=localStorage.getItem("xin-state");if(i!=null){let y=JSON.parse(i);for(let x of Object.keys(y).filter(l))if(T[x]!==void 0)Object.assign(T[x],y[x]);else T[x]=y[x]}let h=R2(()=>{let y={},x=Q(T);for(let o of Object.keys(x).filter(l))y[o]=x[o];localStorage.setItem("xin-state",JSON.stringify(y)),console.log("xin state saved to localStorage")},500);e4(l,h)},v7="tosijs-share",t7="tosijs-share",G2="shared",j7=1,b4=new Set,J4=new Set,G4=new Map,I1=null,H4="",p0=null,A7=null;function S3(){if(p0!=null)return Promise.resolve(p0);return new Promise((l,i)=>{let h=indexedDB.open(t7,j7);h.onupgradeneeded=()=>{h.result.createObjectStore(G2)},h.onsuccess=()=>{p0=h.result,l(p0)},h.onerror=()=>i(h.error)})}var q7={async get(l){let i=await S3();return new Promise((h,y)=>{let x=i.transaction(G2,"readonly").objectStore(G2).get(l);x.onsuccess=()=>h(x.result),x.onerror=()=>y(x.error)})},async set(l,i){let h=await S3();return new Promise((y,x)=>{let o=h.transaction(G2,"readwrite");o.objectStore(G2).put(i,l),o.oncomplete=()=>y(),o.onerror=()=>x(o.error)})}};function p9(){return A7??q7}function P7(l){return l!=null&&l.type==="tosijs-share"&&typeof l.path==="string"}function B9(l){for(let i of b4)if(l===i||l.startsWith(i+"."))return i;return}function _7(l){for(let i of J4)if(l===i||l.startsWith(i+"."))return!0;return!1}function V7(l,i){J4.add(l),N2(e,l,i),s1(l),T4().then(()=>{J4.delete(l)})}function O7(){if(I1!=null)return I1;return H4=crypto.randomUUID(),I1=new BroadcastChannel(v7),I1.onmessage=(l)=>{let i=l.data;if(!P7(i))return;if(i.origin===H4)return;if(B9(i.path)===void 0)return;V7(i.path,i.value)},I1}function U7(l,i){if(I1==null)return;let h={type:"tosijs-share",path:l,value:i,origin:H4};I1.postMessage(h)}function F7(l){if(!G4.has(l))G4.set(l,R2(()=>{let i=u(e,l);p9().set(l,i)},500));G4.get(l)()}async function G7(...l){if(typeof BroadcastChannel>"u")return{restored:[]};O7();let i=[],h=p9();for(let y of l){let x=typeof y==="string"?y:y1(y);if(x===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(b4.has(x))continue;b4.add(x);let o=await h.get(x);if(o!==void 0)N2(e,x,o),s1(x),i.push(y);else{let C=u(e,x);await h.set(x,C)}X2((C)=>C===x||C.startsWith(x+"."),(C)=>{if(_7(C))return;let s=B9(C);if(s===void 0)return;let g=u(e,C);U7(C,g),F7(s)})}return{restored:i}}var S4=new Set;function D3(l,i){for(let h of l)if(i===h||i.startsWith(h+"."))return h;return}function K7(l){for(let i of S4)if(l===i||l.startsWith(i+"."))return!0;return!1}function a7(l,i){S4.add(l),N2(e,l,i),s1(l),T4().then(()=>{S4.delete(l)})}async function Q7(l,i,...h){let y=new Set,x=[],o=[],C=i.throttleInterval??100;await l.connect();let s=k2(()=>{if(x.length===0)return;let g=x.splice(0);l.send(g)},C);l.onReceive((g)=>{for(let k of g){if(D3(y,k.path)===void 0)continue;a7(k.path,k.value)}});for(let g of h){let k=typeof g==="string"?g:y1(g);if(k===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");y.add(k);let c=X2((d)=>d===k||d.startsWith(k+"."),(d)=>{if(K7(d))return;if(D3(y,d)===void 0)return;let n=u(e,d);x.push({path:d,value:n}),s()});o.push(c)}return{disconnect(){for(let g of o)W2(g);o.length=0,y.clear(),x.length=0,l.disconnect()}}}var f9="1.6.1";function E(l){return Object.assign(C1,l),C1}function i5(l){return h1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),E(l)}var W7=new FinalizationRegistry((l)=>{l()});function Y7(l,i){let h=u3();C1[h]=l;let y=C1[h],x=()=>{delete T[h]};if(i)W7.register(i,x);return[y,x]}function z9(l,i=!1){if(i)return h1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),i5(l);return Object.keys(l).forEach((h)=>{T[h]=l[h]}),T}var N7={};async function h5(l,i){let h=await i(l,{Color:A,Component:z,elements:f,svgElements:q0,mathML:c9,varDefault:w,vars:r,xin:T,boxed:C1,xinProxy:z9,boxedProxy:i5,tosi:E,makeComponent:h5,bind:F1,on:d2,version:f9}),{type:y}=h;y.preferredTagName=l;let x=h.lightStyleSpec??h.styleSpec;if(x)y.lightStyleSpec=x;let o={type:y,creator:y.elementCreator()};return N7[l]=o,o}var _0={":host":{display:"none"}},K4={},X7=(l)=>import(l);class V0 extends z{static preferredTagName="tosi-blueprint";static lightStyleSpec=_0;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(l)=>{};async packaged(){let{tag:l,src:i,property:h}=this,y=`${l}.${h}:${i}`;if(!this.loaded){if(K4[y]===void 0)K4[y]=X7(i).then((x)=>{let o=x[h];return h5(l,o)});else console.log(`using cached ${l} with signature ${y}`);this.loaded=await K4[y],this.blueprintLoaded(this.loaded)}return this.loaded}}var R7=V0.elementCreator();class y5 extends z{static preferredTagName="tosi-loader";static lightStyleSpec=_0;allLoaded=()=>{};async load(){let l=Array.from(this.querySelectorAll("tosi-blueprint, xin-blueprint")).filter((i)=>i.src).map((i)=>i.packaged());await Promise.all(l),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var $7=y5.elementCreator();class v9 extends V0{static preferredTagName="xin-blueprint";static lightStyleSpec=_0;constructor(){super();h1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var Z7=v9.elementCreator();class t9 extends z{static preferredTagName="xin-loader";static lightStyleSpec=_0;allLoaded=()=>{};constructor(){super();h1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){let l=Array.from(this.querySelectorAll("xin-blueprint")).filter((i)=>i.src).map((i)=>i.packaged());await Promise.all(l),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var b7=t9.elementCreator();var x5={};class w2 extends z{static preferredTagName="tosi-ab";static set conditions(l){Object.assign(x5,l);for(let i of[...w2.instances])i.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?x5[this.condition]!==!0:x5[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var J7=w2.elementCreator();var O0={};function g1(l,i){if(O0[l]===void 0){if(i!==void 0){let y=globalThis[i];O0[l]=Promise.resolve({[i]:y})}let h=f.script({src:l});document.head.append(h),O0[l]=new Promise((y)=>{h.onload=()=>y(globalThis)})}return O0[l]}var o5={};function U0(l){if(o5[l]===void 0){let i=f.link({rel:"stylesheet",type:"text/css",href:l});document.head.append(i),o5[l]=new Promise((h)=>{i.onload=h})}return o5[l]}var M1={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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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> ',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></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>',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>',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>',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>',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>',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>',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>',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>',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>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></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>',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>',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>',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>',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>',facebook:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M464 0h-416c-26 0-48 22-48 48v416c0 26 22 48 48 48h208v-224h-64v-64h64v-32c0-53 43-96 96-96h64v64h-64c-18 0-32 14-32 32v32h96l-16 64h-80v224h144c26 0 48-22 48-48v-416c0-26-22-48-48-48z"></path></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',youtube:'<svg class="filled" version="1" viewBox="0 0 512 512"><g></g><path d="M507 154c0 0-5-35-20-51-20-20-41-21-51-22-72-5-179-5-179-5h-0c0 0-108 0-179 5-10 1-32 1-51 22-15 16-20 51-20 51s-5 41-5 83v39c0 41 5 83 5 83s5 35 20 51c20 20 45 20 57 22 41 4 174 5 174 5s108-0 179-5c10-1 32-1 51-22 15-16 20-51 20-51s5-41 5-83v-39c-0-41-5-83-5-83zM203 322v-144l138 72-138 72z"></path></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></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>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></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>',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>',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>',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>',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>',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>',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>',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>',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",toggleLeft:"toggleRight0f",cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",skipBack:"skipForward0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",thumbsDown:"thumbsUp1f",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r"};var H7=(l)=>{Object.assign(M1,l)},s5=(l,i,h,y)=>{let x=l instanceof SVGElement?[l]:Array.from(l.querySelectorAll("svg"));if(x.length>1){let g=l.dataset?.icon||"unknown";console.error(`svg2DataUrl: composite icon "${g}" cannot be serialized as a data URL, rendering base icon only`)}let o=x[0];o.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let g of o.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")){if(i!==void 0)g.setAttribute("fill",i);if(h!==void 0)g.setAttribute("stroke",h);if(y!==void 0)g.setAttribute("stroke-width",String(y))}let C=o.querySelectorAll("[style]");o.removeAttribute("style");for(let g of[...C]){let k=g.style;if(k.fill)g.setAttribute("fill",A.fromCss(k.fill).html);if(k.stroke)g.setAttribute("stroke",A.fromCss(k.stroke).html);if(k.strokeWidth)g.setAttribute("strokeWidth",k.strokeWidth);if(k.strokeLinecap)g.setAttribute("strokeLinecap",k.strokeLinecap);if(k.strokeLinejoin)g.setAttribute("strokeLinejoin",k.strokeLinejoin);g.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(o.outerHTML)})`},S7=(l)=>/\d$/.test(l)?l+"_":l,g5=[{prefix:/^spin(_?\d+)/,apply(l,i,h){let y=i[1].replace("_","-"),x=360/Math.abs(parseFloat(y)),o=y.startsWith("-")?"reverse":"normal",C=R1(l,[]),s=C;if(s.animate){let g=s.style.transform||"";s.animate([{transform:`${g} rotate(0deg)`},{transform:`${g} rotate(360deg)`}],{duration:x*1000,iterations:1/0,direction:o})}return k5(l,h,C)}},{prefix:"un",apply:(l)=>`slash25o$${l}75s75o`},{prefix:"check",apply:(l)=>`check75o_00aa00S$${l}75s50o`},{prefix:"cancel",apply:(l)=>`x75o_cc0000S$${l}75s50o`},{prefix:"search",apply:(l)=>`search80s30x30y$${l}50o`}],D7=0;function j9(l,i){let h=f.div();h.innerHTML=l;let y=h.querySelector("svg"),x=y.querySelectorAll("[id]");if(x.length>0){let s=new Map;for(let c of x){let d=c.id,n=`tosi_svg_id_${++D7}`;s.set(d,n),c.id=n}let g=y.innerHTML,k=g;for(let[c,d]of s){let n=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");k=k.replace(new RegExp(`url\\(#${n}\\)`,"g"),`url(#${d})`).replace(new RegExp(`href="#${n}"`,"g"),`href="#${d}"`)}if(k!==g)y.innerHTML=k}let o=new Set(y.classList);o.add("tosi-icon");let C=q0.svg({class:Array.from(o).join(" "),viewBox:y.getAttribute("viewBox")},...i,...y.children);if(C.style.strokeWidth=w.tosiIconStrokeWidth("2px"),o.has("filled"))C.style.stroke="none",C.style.fill="currentColor";else if(o.has("stroked"))C.style.stroke=w.tosiIconStroke("currentColor"),C.style.fill="none";else C.style.stroke=w.tosiIconStroke("currentColor"),C.style.fill=w.tosiIconFill("currentColor");return C.style.height=w.tosiIconSize("16px"),C}function k5(l,i,...h){let y=f.span({class:"tosi-icon-composite",dataIcon:l,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...h);for(let x of i)if(x&&typeof x==="object"&&!("nodeType"in x)){let o=x;if(o.style&&typeof o.style==="object")Object.assign(y.style,o.style);if(o.class)y.classList.add(...String(o.class).split(" "))}return y}function I7(l){let i=M1;if(i[l])return!0;let h=C5(l);return h!=null&&!!i[h.baseName]}function A9(l,i){for(let h of g5){let y,x;if(h.prefix instanceof RegExp){let C=new RegExp(h.prefix.source+"(.+)$"),s=l.match(C);if(!s)continue;y=s[s.length-1],y=y[0].toLowerCase()+y.slice(1),x=s}else{if(!l.startsWith(h.prefix)||l.length<=h.prefix.length)continue;y=l[h.prefix.length].toLowerCase()+l.slice(h.prefix.length+1),x=h.prefix}if(!I7(y))continue;let o=h.apply(S7(y),x,i);if(typeof o==="string")return R1(o,i);if(o)return o}return null}var T7=10,u7=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function C5(l){let i=l.match(u7);if(!i)return null;let h=l.slice(0,i.index);if(!h)return null;if(h.endsWith("_"))h=h.slice(0,-1);if(!h)return null;if(!M1[h]){if(!g5.some((g)=>{if(g.prefix instanceof RegExp)return g.prefix.test(h);return h.startsWith(g.prefix)&&h.length>g.prefix.length}))return null}let x={},o=i[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!o)return null;let C=[];for(let s of o){let g=s[s.length-1];if(g==="F"||g==="S"){let k=s.slice(1,-1),d=/^[0-9a-fA-F]{3,8}$/.test(k)?"#"+k:r[k];if(g==="F")x.fill=d;else x.stroke=d}else if(g==="W")x.strokeWidth=s.slice(0,-1);else{let k=parseInt(s.replace("_","-"));switch(g){case"o":x.opacity=String(k/100);break;case"s":C.push(`scale(${k/100})`);break;case"x":C.push(`translateX(${k}%)`);break;case"y":C.push(`translateY(${k}%)`);break;case"r":C.push(`rotate(${k}deg)`);break;case"f":C.push(k===0?"scaleX(-1)":"scaleY(-1)");break}}}if(C.length>0)x.transform=C.join(" "),x.transformOrigin="50% 50%";return{baseName:h,style:x}}function R1(l,i){if(l.endsWith("_"))l=l.slice(0,-1);let h=M1,y=l;for(let C=0;C<T7;C++){let s=h[y];if(!s)break;if(s.startsWith("<"))return j9(s,i);y=s}if(y!==l){let C=A9(y,i);if(C)return C;let s=C5(y);if(s){let g=R1(s.baseName,i);return Object.assign(g.style,s.style),g}}if(l.includes("$")){let C=l.split("$"),s=R1(C[C.length-1],[]),g=C.slice(0,-1).reverse().map((k)=>{let c=R1(k,[]);return Object.assign(c.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),c});return k5(l,i,s,...g)}let x=A9(l,i);if(x)return x;let o=C5(l);if(o){let C=R1(o.baseName,i);return Object.assign(C.style,o.style),C}if(l)console.warn(`icon ${l} does not exist`);return j9(M1.square,i)}var B=new Proxy(M1,{get(l,i){return(...h)=>R1(i,h)}});class c5 extends z{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:w.tosiIconStrokeWidth("2px"),strokeLinejoin:w.tosiIconStrokeLinejoin("round"),strokeLinecap:w.tosiIconStrokeLinecap("round"),fill:w.tosiIconFill("none"),height:r.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:w.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let l={};if(this.size)l.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)l.stroke=this.stroke,l.strokeWidth=this.strokeWidth;if(this.fill)l.fill=this.fill;this.append(B[this.icon]({style:l}))}}var M7=c5.elementCreator();var q9=()=>{};class r5 extends z{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:s5(B.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=f.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:l}=await g1("https://cdn.babylonjs.com/babylon.js","BABYLON");return l})()}scene;engine;sceneCreated=q9;update=q9;_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(l,i,h)=>{let{BABYLON:y}=await g1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");y.SceneLoader.Append(l,i,this.scene,h)};loadUI=async(l)=>{let{BABYLON:i}=await g1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),h=i.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:y,jsonUrl:x,data:o,size:C}=l;if(C)h.idealWidth=C,h.renderAtIdealSize=!0;let s;if(y)s=await h.parseFromSnippetAsync(y);else if(x)s=await h.parseFromURLAsync(x);else if(o)s=h.parseContent(o);else return null;let g=h.getChildren()[0],k=g.children.reduce((c,d)=>{return c[d.name]=d,c},{});return{advancedTexture:h,gui:s,root:g,widgets:k}};connectedCallback(){super.connectedCallback();let{canvas:l}=this.parts;this.babylonReady.then(async(i)=>{if(this.BABYLON=i,this.engine=new i.Engine(l,!0),this.scene=new i.Scene(this.engine),this.sceneCreated)await this.sceneCreated(this,i);if(this.scene.activeCamera===void 0)new i.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new i.Vector3(0,0,0)).attachControl(this.parts.canvas,!0);this.engine.runRenderLoop(this._update)})}}var m7=r5.elementCreator();class n2 extends z{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(n2.bodymovinAvailable===void 0)n2.bodymovinAvailable=g1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:l})=>{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 i=this.shadowRoot;if(i!==null)i.querySelector("svg")?.remove()}this.animation=l.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),n2.bodymovinAvailable.then(this.load).catch((l)=>{console.error(l)})}}var L7=n2.elementCreator();var{button:d5,slot:e7,div:F0}=f;class G0 extends z{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(l){let{scroller:i,back:h,forward:y}=this.parts;if(this.lastPage<=0)y.disabled=h.disabled=!0,l=0;else l=Math.max(0,Math.min(this.lastPage,l)),l=isNaN(l)?0:l;if(this._page!==l)this._page=isNaN(l)?0:l,this.animateScroll(this._page*i.offsetWidth),h.disabled=this.page<=0&&!this.loop,y.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((l)=>getComputedStyle(l).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:r.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:r.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:r.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:r.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:r.carouselButtonHoverColor},":host button:active":{color:r.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:r.carouselButtonColor,borderRadius:r.carouselDotSize,height:r.carouselDotSize,width:r.carouselDotSize,transition:r.carouselDotTransition},":host .dot:not(.current):hover":{background:r.carouselButtonHoverColor,height:r.carouselDotSize150,width:r.carouselDotSize150,margin:r.carouselDotSize_25},":host .dot:not(.current):active":{background:r.carouselButtonActiveColor},":host .dot.current":{background:r.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:r.carouselDotSpacing,justifyContent:"center",padding:r.carouselProgressPadding}};easing=(l)=>{return Math.sin(l*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:l,progress:i}=this.parts,h=l.scrollLeft/l.offsetWidth;[...i.children].forEach((y,x)=>{y.classList.toggle("current",Math.floor(x/this.maxVisibleItems-h)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:l}=this.parts,i=Math.round(l.scrollLeft/l.offsetWidth);if(i!==this.page)this.page=i>this.page?Math.ceil(i):Math.floor(i);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=(l)=>{let{progress:i}=this.parts,h=[...i.children].indexOf(l.target);if(h>-1)this.page=Math.floor(h/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(l,i=-1,h=0){cancelAnimationFrame(this.animationFrame);let{scroller:y}=this.parts;if(i===-1){i=y.scrollLeft,h=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(l,i,h)});return}let x=(Date.now()-h)/1000;if(x>=this.snapDuration||Math.abs(y.scrollLeft-l)<2)y.scrollLeft=l,this.animationFrame=null;else y.scrollLeft=i+this.easing(x/this.snapDuration)*(l-i),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(l,i,h)})}content=()=>[F0({part:"pager"},d5({title:"previous slide",part:"back"},B.chevronLeft()),F0({title:"slides",role:"group",part:"scroller"},F0({part:"grid"},e7())),d5({title:"next slide",part:"forward"},B.chevronRight())),F0({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:l,forward:i,scroller:h,progress:y}=this.parts;l.addEventListener("click",this.back),i.addEventListener("click",this.forward),h.addEventListener("scroll",this.indicateCurrent),y.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:l,arrows:i,visibleItems:h,lastPage:y}=this,{progress:x,back:o,forward:C,grid:s}=this.parts;h.forEach((g)=>{g.role="group"}),s.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(h.length).trim(),s.style.width=(1+this.lastPage)*100+"%",x.textContent="",x.append(...h.map((g,k)=>d5({title:`item ${k+1}`,class:"dot"}))),this.indicateCurrent(),x.style.display=l&&y>0?"":"none",o.hidden=C.hidden=!(i&&y>0)}}var E7=G0,P9=G0.elementCreator(),ll=P9;var _9="https://cdnjs.cloudflare.com/ajax/libs/ace/1.23.2/",V9="ace/theme/tomorrow",il=async()=>{let{ace:l}=await g1(`${_9}ace.min.js`);return l},hl=async(l,i="html",h={},y=V9)=>{let x=await il();x.config.set("basePath",_9);let o=x.edit(l,{mode:`ace/mode/${i}`,tabSize:2,useSoftTabs:!0,useWorker:!1,...h});return o.setTheme(y),{ace:x,editor:o}};class m1 extends z{static preferredTagName="tosi-code";source="";get value(){return this.editor===void 0?this.source:this.editor.getValue()}set value(l){if(this.editor===void 0)this.source=l;else this.editor.setValue(l),this.editor.clearSelection(),this.editor.session.getUndoManager().reset()}static initAttributes={mode:"javascript",theme:V9,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=hl(this,this.mode,this.options,this.theme),this._editorPromise.then(({ace:l,editor:i})=>{this._ace=l,this._editor=i,i.setValue(this.source,1),i.clearSelection(),i.session.getUndoManager().reset()})}render(){if(super.render(),this._editorPromise!==void 0)this._editorPromise.then(({editor:l})=>l.setReadOnly(this.disabled))}}var p2=m1.elementCreator();var{input:w5}=f,O9=A.fromCss("#8888");class U9 extends z{static preferredTagName="tosi-color";value=O9.rgba;color=O9;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:r.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:r.swatchSize,height:r.swatchSize,background:"transparent"},":host::part(alpha)":{width:r.alphaWidth},":host::part(css)":{width:r.cssWidth,fontFamily:"monospace"}};content=[w5({title:"base color",type:"color",part:"rgb"}),w5({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),w5({title:"css color spec",part:"css"})];valueChanged=!1;update=(l)=>{let{rgb:i,alpha:h,css:y}=this.parts;if(l.type==="input")this.color=A.fromCss(i.value),this.color.a=Number(h.value),y.value=this.color.html;else this.color=A.fromCss(y.value),i.value=this.color.html.substring(0,7),h.value=String(this.color.a);i.style.opacity=String(this.color.a),this.value=this.color.rgba,this.valueChanged=!0};connectedCallback(){super.connectedCallback();let{rgb:l,alpha:i,css:h}=this.parts;l.addEventListener("input",this.update),i.addEventListener("input",this.update),h.addEventListener("change",this.update)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{rgb:l,alpha:i,css:h}=this.parts;this.color=A.fromCss(this.value),l.value=this.color.html.substring(0,7),l.style.opacity=String(this.color.a),i.value=String(this.color.a),h.value=this.color.html}}var n5=U9.elementCreator();var $1=f.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),K0={passive:!0},x1=(l,i,h="move")=>{if(!l.type.startsWith("touch")){let{clientX:x,clientY:o}=l;$1.style.cursor=h,Z1($1),document.body.append($1);let C=(s)=>{let g=s.clientX-x,k=s.clientY-o;if(i(g,k,s)===!0)$1.removeEventListener("mousemove",C),$1.removeEventListener("mouseup",C),$1.remove()};$1.addEventListener("mousemove",C,K0),$1.addEventListener("mouseup",C,K0)}else if(l instanceof TouchEvent){let x=l.changedTouches[0],o=x.identifier,C=x.clientX,s=x.clientY,g=l.target,k=0,c=0,d=(n)=>{let v=[...n.touches].find((p)=>p.identifier===o);if(v!==void 0)k=v.clientX-C,c=v.clientY-s;if(n.type==="touchmove")n.stopPropagation(),n.preventDefault();if(i(k,c,n)===!0||v===void 0)g.removeEventListener("touchmove",d),g.removeEventListener("touchend",d),g.removeEventListener("touchcancel",d)};g.addEventListener("touchmove",d),g.addEventListener("touchend",d,K0),g.addEventListener("touchcancel",d,K0)}},L1=(l="body *")=>[...document.querySelectorAll(l)].map((i)=>parseFloat(getComputedStyle(i).zIndex)).reduce((i,h)=>isNaN(i)||Number(i)<h?h:Number(i),0),Z1=(l,i="body *")=>{l.style.zIndex=String(L1(i)+1)};var{slot:yl}=f;class Q1 extends z{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=yl();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(l)=>{if(l instanceof MouseEvent&&l.button!==0)return;if(l.target?.closest(".no-drag"))return;if(this.drag){Z1(this);let h=this.offsetLeft,y=this.offsetTop;x1(l,(x,o,C)=>{if(this.style.left=`${h+x}px`,this.style.top=`${y+o}px`,this.style.right="auto",this.style.bottom="auto",C.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),Q1.floats.add(this);let l={passive:!0};this.addEventListener("touchstart",this.reposition,l),this.addEventListener("mousedown",this.reposition,l),Z1(this)}disconnectedCallback(){super.disconnectedCallback(),Q1.floats.delete(this)}}var xl=Q1,Z2=Q1.elementCreator(),ol=Z2;window.addEventListener("resize",()=>{Array.from(Q1.floats).forEach((l)=>{if(l.remainOnResize==="hide")l.hidden=!0;else if(l.remainOnResize==="remove")l.remove()})},{passive:!0});document.addEventListener("scroll",(l)=>{if(l.target instanceof HTMLElement&&l.target.closest(Q1.tagName))return;Array.from(Q1.floats).forEach((i)=>{if(i.remainOnScroll==="hide")i.hidden=!0;else if(i.remainOnScroll==="remove")i.remove()})},{passive:!0,capture:!0});var b2=(l)=>{let{content:i,target:h,position:y,remainOnScroll:x,remainOnResize:o,draggable:C}=l,s=Array.isArray(i)?Z2(...i):Z2(i);if(F9(s,h,y,x,o,C),l.class)s.setAttribute("class",l.class);return document.body.append(s),s},F9=(l,i,h,y,x,o=!1)=>{{let{position:p}=getComputedStyle(l);if(p!=="fixed")l.style.position="fixed";if(x)l.remainOnResize=x;if(y)l.remainOnScroll=y;Z1(l)}l.drag=o;let{left:C,top:s,width:g,height:k}=i.getBoundingClientRect(),c=C+g*0.5,d=s+k*0.5,n=window.innerWidth,v=window.innerHeight;if(h==="side")h=(c<n*0.5?"e":"w")+(d<v*0.5?"s":"n");else if(h==="auto"||h===void 0)h=(d<v*0.5?"s":"n")+(c<n*0.5?"e":"w");if(l.style.top=l.style.left=l.style.right=l.style.bottom=l.style.transform="",h.length===2){let[p,j]=h;switch(p){case"n":l.style.bottom=(v-s).toFixed(2)+"px";break;case"e":l.style.left=(C+g).toFixed(2)+"px";break;case"s":l.style.top=(s+k).toFixed(2)+"px";break;case"w":l.style.right=(n-C).toFixed(2)+"px";break}switch(j){case"n":l.style.bottom=(v-s-k).toFixed(2)+"px";break;case"e":l.style.left=C.toFixed(2)+"px";break;case"s":l.style.top=s.toFixed(2)+"px";break;case"w":l.style.right=(n-C-g).toFixed(2)+"px";break}l.style.transform=""}else if(h==="n")l.style.bottom=(v-s).toFixed(2)+"px",l.style.left=c.toFixed(2)+"px",l.style.transform="translateX(-50%)";else if(h==="s")l.style.top=(s+k).toFixed(2)+"px",l.style.left=c.toFixed(2)+"px",l.style.transform="translateX(-50%)";else if(h==="e")l.style.left=(C+g).toFixed(2)+"px",l.style.top=d.toFixed(2)+"px",l.style.transform="translateY(-50%)";else if(h==="w")l.style.right=(n-C).toFixed(2)+"px",l.style.top=d.toFixed(2)+"px",l.style.transform="translateY(-50%)";l.style.setProperty("--max-height",`calc(100vh - ${l.style.top||l.style.bottom})`),l.style.setProperty("--max-width",`calc(100vw - ${l.style.left||l.style.right})`)};function a0(l,i=!0){return(h,y)=>{let x=l(h),o=l(y);for(let C in x)if(x[C]!==o[C])return(Array.isArray(i)?i[C]!==!1:i)?x[C]>o[C]?1:-1:x[C]>o[C]?-1:1;return 0}}var{button:Cl,span:G9,input:sl}=f,K9=(l,i)=>{return!!l.find((h)=>{if(h===null||i==null)return!1;else if(Array.isArray(h))return K9(h,i);else if(h.value===i||h===i)return!0})};class j1 extends z{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:r.tosiSelectGap,textAlign:"left",height:r.tosiSelectTouchSize,padding:r.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:r.tosiSelectFieldWidth,padding:r.tosiSelectValuePadding,height:r.tosiSelectTouchSize,lineHeight:r.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(l){if(typeof l==="string")this._options=j1.parseOptionsString(l);else this._options=l;this.queueRender()}static parseOptionsString(l){return l.split(",").map((i)=>{let h=i.trim();if(h==="")return null;let[y,x]=h.split("=").map((s)=>s.trim());if(!x)return{value:y,caption:y};let[o,C]=x.split(":").map((s)=>s.trim());return{value:y,caption:o||y,icon:C||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(l){this.disabled=l}formResetCallback(){this.value=""}setValue=(l,i=!1)=>{if(this.value!==l)this.value=l,this.queueRender(!0);if(i)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(l)=>{if(l===null)return null;let{setValue:i,getValue:h}=this,y,x,o,C,s;if(typeof l==="string")x=o=l;else({icon:y,caption:x,value:o,tooltip:C,properties:s}=l);if(this.localized)x=X(x);let{options:g}=l;if(g)return{icon:y,caption:x,tooltip:C,properties:s,checked:()=>K9(g,h()),menuItems:g.map(this.buildOptionMenuItem)};return{icon:y,caption:x,tooltip:C,properties:s,checked:()=>h()===o,action:typeof o==="function"?async()=>{let k=await o();if(k!==void 0)i(k,!0)}:()=>{if(typeof o==="string")i(o,!0)}}};poppedOptions=[];get optionsMenu(){let l=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return l;let i=(h)=>{if(h===null)return!0;else if(h.menuItems){let y=c1(h.menuItems);return h.menuItems=y.filter(i),y.length>0}else return h.caption.toLocaleLowerCase().includes(this.filter)};return l.filter(i)}handleChange=(l)=>{let{value:i}=this.parts,h=i.value||"";if(this.value!==String(h))this.value=h,this.dispatchEvent(new Event("change"));this.filter="",l.stopPropagation(),l.preventDefault()};handleKey=(l)=>{if(l.key==="Enter")l.preventDefault()};filterMenu=k2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),M(0),this.popOptions()});popOptions=(l)=>{if(l&&l.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),H({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:l}=this.parts;l.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[Cl({type:"button",part:"button",onClick:this.popOptions},G9(),sl({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}),B.chevronDown())];get allOptions(){let l=[];function i(h){for(let y of h)if(typeof y==="string")l.push({caption:y,value:y});else if(y?.value)l.push(y);else if(y?.options)i(y.options)}return i(this.selectOptions),l}findOption(){return this.allOptions.find((i)=>i.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let l=this.getAttribute("options");if(l&&this._options.length===0)this._options=j1.parseOptionsString(l);if(this.localized)Q0.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)Q0.allInstances.delete(this)}render(){super.render();let{value:l,button:i}=this.parts;i.disabled=this.disabled;let h=l.previousElementSibling,y=this.findOption(),x=G9();if(l.value=this.localized?X(y.caption):y.caption,y.icon)if(y.icon instanceof HTMLElement)x=y.icon.cloneNode(!0);else x=B[y.icon]();h.replaceWith(x),l.setAttribute("placeholder",this.localized?X(this.placeholder):this.placeholder),l.style.pointerEvents=this.editable?"":"none",l.readOnly=!this.editable}}var gl=j1,k1=j1.elementCreator(),kl=i1((...l)=>k1(...l),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:a9}=f,{i18n:J}=E({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:a9(),caption:window.navigator.language,value:window.navigator.language}]}});K1.localeOptions={toDOM(l,i){if(l instanceof j1)l.options=i}};var cl=(l)=>{if(J.locales.value.includes(l))J.locale.value=l;else console.error(`language ${l} is not available`)},p5=()=>{let l=Array.from(A1.allInstances);for(let i of l)i.localeChanged()};J.locale.observe(p5);var rl=a0((l)=>[l.caption.toLocaleLowerCase()]);function dl(l){let[i,,h,y,...x]=l.split(`
14
- `).map((o)=>o.split("\t"));if(i&&h&&y&&x){if(J.locales.value=i,J.languages.value=h,J.emoji.value=y,J.stringMap.value=x.reduce((o,C)=>{return o[C[0].toLocaleLowerCase()]=C,o},{}),J.localeOptions.value=i.map((o,C)=>({icon:a9({title:i[C]},y[C]),caption:h[C],value:o})).sort(rl),!J.locales.value.includes(J.locale.value)){let o=J.locale.value.substring(0,2);J.locale.value=J.locales.value.find((C)=>C.substring(0,2)===o)||J.locales.value[0]}p5()}}function X(l){if(l.endsWith("…"))return X(l.substring(0,l.length-1))+"…";let i=J.locales.value.indexOf(J.locale.value);if(i>-1){let h=Q(J.stringMap),y=l.toLocaleLowerCase(),x=h[y],o=x&&x[i];if((!o||o==='"')&&y.includes("#")){let C=h[y.substring(0,y.indexOf("#"))];o=C&&C[i]}if(o)o=o.split("#",2)[0],l=l.toLocaleLowerCase()===l?o.toLocaleLowerCase():o;else l=l.split("#",2)[0]}else l=l.split("#",2)[0];return l}class W0 extends z{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return k1({part:"select",showIcon:!0,title:X("Language"),bindValue:J.locale,bindLocaleOptions:J.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var wl=W0,Q9=W0.elementCreator(),nl=Q9;class A1 extends z{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>f.tosiSlot();connectedCallback(){super.connectedCallback(),A1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),A1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?X(this.refString):""}render(){super.render(),this.localeChanged()}}var Q0=A1,q1=A1.elementCreator(),pl=q1;var W9=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),Bl=W9?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},Y9=(l)=>{if(l.code)return l.code.replace(/^Key|^Digit/,"");return l.key},fl=(l)=>{let i=[];if(l.altKey)i.push("alt");if(l.ctrlKey)i.push("ctrl");if(l.metaKey)i.push("meta");if(l.shiftKey)i.push("shift");return i.push(Y9(l)),i.join("-")},zl=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],Y0=(l)=>{let i=l.trim(),h={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[y,x]of zl)if(y.test(i))h[x]=!0,i=i.replace(y,"");return i=i.replace(/^-+/,""),h.key=i.toLowerCase(),h},B5=(l,i)=>{let h=Y0(i);return l.key.toLowerCase()===h.key&&l.metaKey===h.metaKey&&l.ctrlKey===h.ctrlKey&&l.altKey===h.altKey&&l.shiftKey===h.shiftKey},vl=(l)=>{let i=Y0(l),h=[];if(i.altKey)h.push("alt");if(i.ctrlKey)h.push("ctrl");if(i.metaKey)h.push("meta");if(i.shiftKey)h.push("shift");return h.push(i.key),h.join("-")},N0=(l)=>{let i=Y0(l);if(W9){let y=[];if(i.ctrlKey)y.push("⌃");if(i.altKey)y.push("⌥");if(i.shiftKey)y.push("⇧");if(i.metaKey)y.push("⌘");return y.push(i.key.toUpperCase()),y.join("")}let h=[];if(i.ctrlKey)h.push("Ctrl");if(i.altKey)h.push("Alt");if(i.shiftKey)h.push("Shift");if(i.metaKey)h.push("Meta");return h.push(i.key.toUpperCase()),h.join("+")};var R0={};A4(R0,{stringToTypes:()=>f2,isTypeAllowed:()=>z2,init:()=>v5,draggedElement:()=>Pl});var tl=()=>!!document.querySelector(".drag-source"),z2=(l,i)=>{if(!l)return!1;for(let h of l)if(h==="special/any")return!0;else if(h.indexOf("*")>-1){let[y,x]=h.split("/"),[o,C]=i.split("/");if((y==="*"||y===o)&&(x==="*"||x===C))return!0}else if(h===i)return!0},X0=(l)=>{for(let i of[...document.querySelectorAll(`.${l}`)])i.classList.remove(l)},R9=()=>{if(B2)B2.disconnect(),B2=null;f5=[],X0("drag-over"),X0("drag-source"),X0("drag-target")},f2=(l,i=";")=>{return(l||"").split(i).map((h)=>h.trim()).filter((h)=>h!=="")},f5=[],B2=null,z5=(l)=>{if(!l)l=[];f5=l;let i=[...document.querySelectorAll("[data-drop]")];for(let h of i){let y=f2(h.dataset.drop);if(l.find((x)=>z2(y,x)))h.classList.add("drag-target");else h.classList.remove("drag-target")}if(!B2)B2=new MutationObserver(()=>z5(f5)),B2.observe(document.body,{childList:!0,subtree:!0})};function jl(l){let i=l.target?.closest('[draggable="true"],a[href]');if(!i)return;i.classList.add("drag-source");let h=i.matches('[draggable="true"]')?f2(i.dataset.drag||"text/html"):f2(i.dataset.drag||"url");for(let y of h){let x=i.dataset.dragContent||(y==="text/html"?i.innerHTML:i.textContent);l.dataTransfer?.setData(y,x||"")}z5(l.dataTransfer?.types),l.stopPropagation()}function N9(l){if(!tl())z5(l.dataTransfer?.types);let i=l.target.closest(".drag-target");if(i&&l.dataTransfer)i.classList.add("drag-over"),l.dataTransfer.dropEffect="copy";else l.preventDefault(),l.stopPropagation()}function Al(){X0("drag-over")}function ql(l){let i=l.target.closest(".drag-target");if(i){let h=(i.dataset?.drop||"").split(";");for(let y of h)if(z2(l.dataTransfer?.types,y))if(y==="text/html")i.innerHTML=l.dataTransfer?.getData(y)||"";else i.textContent=l.dataTransfer?.getData(y)||""}R9()}var Pl=()=>document.querySelector(".drag-source"),X9=!1,v5=()=>{if(X9)return;document.body.addEventListener("dragstart",jl),document.body.addEventListener("dragenter",N9),document.body.addEventListener("dragover",N9),document.body.addEventListener("drop",ql),document.body.addEventListener("dragleave",Al),document.body.addEventListener("dragend",R9),window.addEventListener("dragover",(l)=>l.preventDefault()),window.addEventListener("drop",(l)=>l.preventDefault()),X9=!0};var c1=(l)=>typeof l==="function"?l():l,{div:$9,button:S2,span:S,a:_l,tosiSlot:Vl}=f,J9=(l)=>{let i=[];for(let h of l)if(h===null){if(i.length>0&&i[i.length-1]!==null)i.push(h)}else i.push(h);while(i.length>0&&i[i.length-1]===null)i.pop();return i},H2=(l,i,h=!1)=>{let y=[];for(let x of l){if(x===null){y.push(x);continue}let{acceptsDrop:o}=x;if(!o){if(!h)y.push({...x,enabled:()=>!1});continue}if(!i.some((g)=>z2(o,g))){if(!h)y.push({...x,enabled:()=>!1});continue}let s=x;if(s.menuItems){let g=H2(c1(s.menuItems),i,!0);if(g.length>0||s.dropAction){let k=h?g:H2(c1(s.menuItems),i,!1);y.push({...s,menuItems:k})}else if(!h)y.push({...s,enabled:()=>!1})}else y.push(x)}return J9(y)},t5=(l,i=!1)=>{let h=[];for(let y of l){if(y===null){h.push(y);continue}let{action:x,menuItems:o}=y;if(x||o)if(o){let C=t5(c1(o),!0);if(C.length>0){let s=i?C:t5(c1(o),!1);h.push({...y,menuItems:s})}else if(!i)h.push({...y,enabled:()=>!1})}else h.push(y);else if(!i)h.push({...y,enabled:()=>!1})}return J9(h)},Ol={overflow:"hidden auto",maxHeight:`calc(${r.maxHeight} - ${w.menuInset("8px")})`,borderRadius:r.spacing50,background:w.menuBg("#fafafa"),boxShadow:w.menuShadow(`${r.spacing13} ${r.spacing50} ${r.spacing} #0004`)},Ul={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr 30px",width:"100%",gap:0,background:"transparent",padding:w.menuItemPadding("0 8px"),height:w.menuItemHeight("48px"),lineHeight:w.menuItemHeight("48px"),textAlign:"left"},Fl={color:w.menuItemColor("#222")},Gl={boxShadow:"none !important",background:w.menuItemHoverBg("#eee")},Z9={boxShadow:"none !important",background:w.menuItemActiveBg("#aaa"),color:w.menuItemActiveColor("#000")},Kl={background:`${w.menuDropOverBg("#2196F3")} !important`,color:`${w.menuDropOverColor("#fff")} !important`},al={color:`${w.menuDropOverColor("#fff")} !important`},Ql={stroke:`${w.menuDropOverColor("#fff")} !important`},b9={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${w.menuDropOverBg("#2196F3")} 50%, transparent) !important`};a1("xin-menu-helper",{".xin-menu, .tosi-menu":Ol,".xin-menu > div, .tosi-menu > div":{width:w.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:w.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:w.menuSeparatorColor("#2224"),margin:w.menuSeparatorMargin("8px 0")},".xin-menu-item, .tosi-menu-item":Ul,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":Fl,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr 30px",gap:w.menuItemGap("8px")},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:w.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:w.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":Gl,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":b9,".xin-menu-item:active, .tosi-menu-item:active":Z9,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:w.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":Z9,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:w.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":Kl,".xin-drop-over > span, .tosi-drop-over > span":al,".xin-drop-over svg, .tosi-drop-over svg":Ql,".drag-target":b9});var H9=(l,i)=>{let h=l.checked&&l.checked()&&"check"||!1,y=l?.icon||h||S(" ");if(typeof y==="string")y=B[y]();let x=i.role==="listbox"?"option":"menuitem",o,C=l.properties||{};if(typeof l?.action==="string")o=_l({class:"xin-menu-item tosi-menu-item",role:x,href:l.action},C,y,i.localized?S(X(l.caption)):S(l.caption),S(l.shortcut?N0(l.shortcut):" "));else o=S2({class:"xin-menu-item tosi-menu-item",role:x,onClick:l.action},C,y,i.localized?S(X(l.caption)):S(l.caption),S(l.shortcut?N0(l.shortcut):" "));if(o.classList.toggle("xin-menu-item-checked",h!==!1),o.classList.toggle("tosi-menu-item-checked",h!==!1),l.tooltip)o.dataset.tooltip=l.tooltip;if(i.role==="listbox"&&h)o.setAttribute("aria-selected","true");if(l?.enabled&&!l.enabled())o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true");return o},S9=(l,i)=>{let h=l?.icon||S(" ");if(typeof h==="string")h=B[h]();let y=l.properties||{},x=S2({class:"xin-menu-item tosi-menu-item",onDragenter(o){t2(),x.classList.add("xin-drop-over","tosi-drop-over"),o.preventDefault()},onDragover(o){if(o.preventDefault(),o.dataTransfer)o.dataTransfer.dropEffect="copy"},onDragleave(o){let C=o.relatedTarget;if(C&&x.contains(C))return;x.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(o){if(o.preventDefault(),o.stopPropagation(),x.classList.remove("xin-drop-over","tosi-drop-over"),l.dropAction&&o.dataTransfer)l.dropAction(o.dataTransfer);M(0)}},y,h,i.localized?S(X(l.caption)):S(l.caption),S(" "));if(l.tooltip)x.dataset.tooltip=l.tooltip;if(l.dropAction&&l.acceptsDrop)x.dataset.drop=l.acceptsDrop.join(";");if(l?.enabled&&!l.enabled())x.setAttribute("disabled",""),x.setAttribute("aria-disabled","true");return x},j5=(l,i)=>{let h=l.checked&&l.checked()&&"check"||!1,y=l?.icon||h||S(" ");if(typeof y==="string")y=B[y]();let x=null,o=!1,C=l.properties||{},s=S2({class:"xin-menu-item tosi-menu-item",disabled:!(!l.enabled||l.enabled()),onClick(g){if(i._dropMode)return;H(Object.assign({},i,{menuItems:c1(l.menuItems),target:s,submenuDepth:(i.submenuDepth||0)+1,position:"side"})),g.stopPropagation(),g.preventDefault()},onDragenter(g){if(!i._dropMode)return;t2(),g.preventDefault(),g.stopPropagation();let k=g.relatedTarget;if(k&&s.contains(k))return;if(s.classList.add("xin-drop-over","tosi-drop-over"),o){if(M((i.submenuDepth||0)+1),o=!1,x)clearTimeout(x);x=null;return}if(x)clearTimeout(x);x=setTimeout(()=>{o=!0;let c=c1(l.menuItems),d=i._dataTypes?H2(c,i._dataTypes,i.hideDisabled):c;if(d.length>0)H(Object.assign({},i,{menuItems:d,target:s,submenuDepth:(i.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:i._dataTypes}))},i.disclosureDelay??200)},onDragover(g){if(!i._dropMode)return;if(g.preventDefault(),g.stopPropagation(),g.dataTransfer)g.dataTransfer.dropEffect=l.dropAction?"copy":"link"},onDragleave(g){if(!i._dropMode)return;let k=g.relatedTarget;if(k&&s.contains(k))return;if(o&&k&&m.some((c)=>c.menu.contains(k)||c.target.contains(k)))return;if(s.classList.remove("xin-drop-over","tosi-drop-over"),x)clearTimeout(x),x=null},onDrop(g){if(!i._dropMode||!l.dropAction)return;if(g.preventDefault(),g.stopPropagation(),s.classList.remove("xin-drop-over","tosi-drop-over"),g.dataTransfer)l.dropAction(g.dataTransfer);M(0)}},C,y,i.localized?S(X(l.caption)):S(l.caption),B.chevronRight({style:{justifySelf:"flex-end"}}));if(l.tooltip)s.dataset.tooltip=l.tooltip;if(i._dropMode&&l.dropAction&&l.acceptsDrop)s.dataset.drop=l.acceptsDrop.join(";");return s},D9=(l,i)=>{if(l===null)return S({class:"xin-menu-separator tosi-menu-separator"});else if(i._dropMode){let h=l;if(h.menuItems&&c1(h.menuItems).length>0)return j5(h,i);else if(l.dropAction)return S9(l,i);else{let x=l?.icon||S(" ");if(typeof x==="string")x=B[x]();return S2({class:"xin-menu-item tosi-menu-item",disabled:!0},x,i.localized?S(X(l.caption)):S(l.caption),S(" "))}}else{let h=l?.action?H9(l,i):j5(l,i);if(i.showChecked&&l.checked&&l.checked())requestAnimationFrame(()=>{h.scrollIntoView({block:"center"})});return h}},I9=(l)=>{let{target:i,width:h,menuItems:y,role:x="menu"}=l,o=y.find((g)=>g?.icon||g?.checked),C=l.submenuDepth||0,s=$9({class:o?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:x,onClick(){if(!l._dropMode)M(0)},onDragover(g){if(!l._dropMode)return;g.preventDefault()},onDragenter(){if(!l._dropMode)return;t2()},onDragleave(g){if(!l._dropMode)return;let k=g.relatedTarget;if(k&&s.contains(k))return;if(k&&m.some((c)=>c.menu.contains(k)||c.target.contains(k)))return;T9(C)}},$9({style:{minWidth:i.offsetWidth+"px",width:typeof h==="number"?`${h}px`:h},onMousedown(g){g.preventDefault(),g.stopPropagation()}},...y.map((g)=>D9(g,l))));return s},v2,m=[],J2=null,t2=()=>{if(J2)clearTimeout(J2),J2=null},T9=(l)=>{t2(),J2=setTimeout(()=>{J2=null,M(l)},500)},M=(l=0)=>{if(t2(),l===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 i=m.splice(l);for(let h of i)if(h.menu.remove(),h.onClose)h.onClose();return v2=i[0],l>0?m[l-1]:void 0};document.addEventListener("mousedown",(l)=>{if(m.length===0)return;let i=l.composedPath();if(!m.find((h)=>i.includes(h.target)||i.includes(h.menu)))M(0)});document.body.addEventListener("keydown",(l)=>{if(l.key==="Escape")M(0)});var H=(l)=>{l=Object.assign({submenuDepth:0},l);let{target:i,position:h,submenuDepth:y}=l;if(v2&&!document.body.contains(v2?.menu))v2=void 0;if(m.length&&!document.body.contains(m[0].menu))m.splice(0);if(l._dropMode){if(m.length>y&&m[y]?.target===i)return;M(y)}else{if(y===0&&v2?.target===i)return;let C=M(y);if(v2?.target===i)return;if(C&&C.target===i){M();return}}if(!l.menuItems?.length)return;let x=I9(l),o=b2({content:x,target:i,position:h});o.remainOnScroll=l._dropMode?"remain":"remove",m.push({target:i,menu:o,onClose:l.onClose})},u9=(l)=>{let{dataTypes:i,...h}=l,y=H2(l.menuItems,i,l.hideDisabled);if(!y.length)return;H({...h,menuItems:y,_dropMode:!0,_dataTypes:i})};function A5(l,i,h=[]){for(let y of l){if(!y)continue;let{shortcut:x}=y,{menuItems:o}=y;if(x){if(B5(i,x)){let C=y;if(C.enabled&&!C.enabled())return;if(h.some((s)=>s.enabled&&!s.enabled()))return;return{action:C,path:h}}}else if(o){let C=A5(c1(o),i,[...h,y]);if(C)return C}}return}class $0 extends z{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:r.touchSize,minHeight:r.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:w.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(l){if(!this.acceptsDrop)return!1;let i=f2(this.acceptsDrop);return[...l.dataTransfer?.types||[]].some((y)=>i.some((x)=>z2([x],y)))}showMenu=(l)=>{if(l.type==="click"||l.code==="Space")H({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),l.stopPropagation(),l.preventDefault()};handleDragEnter=(l)=>{if(this._dragMatches=this._matchesDrag(l),!this._dragMatches)return;t2(),this.classList.add("xin-drop-over","tosi-drop-over");let i=[...l.dataTransfer?.types||[]];if(this.menuItems.length)u9({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:i,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});l.preventDefault()};handleDragOver=(l)=>{if(!this._dragMatches)return;if(l.preventDefault(),l.dataTransfer)l.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(l)=>{if(!this._dragMatches)return;let i=l.relatedTarget;if(i&&this.contains(i))return;if(i&&m.some((h)=>h.menu.contains(i)||h.target.contains(i))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),T9(0)};handleDrop=(l)=>{if(!this._dragMatches||!this.dropAction)return;if(l.preventDefault(),l.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),l.dataTransfer)this.dropAction(l.dataTransfer);M(0)};content=()=>S2({tabindex:0,part:"trigger",onClick:this.showMenu},Vl());handleShortcut=async(l)=>{let i=A5(this.menuItems,l);if(!i)return;l.preventDefault(),l.stopImmediatePropagation();let{action:h,path:y}=i;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(y,h);if(h.action instanceof Function)h.action()};findMenuItemByCaption(l,i){for(let h of l.querySelectorAll(".xin-menu-item")){let y=h.children[1];if(y&&y.textContent===i)return h}return null}async animateShortcut(l,i){M(0),H({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((y)=>setTimeout(y,80));for(let y=0;y<l.length;y++){let x=y+1,o=m[y]?.menu;if(!o)break;let C=this.findMenuItemByCaption(o,l[y].caption);if(!C)break;H({target:C,width:this.menuWidth,localized:this.localized,menuItems:c1(l[y].menuItems),submenuDepth:x,position:"side"}),await new Promise((s)=>setTimeout(s,80))}let h=m[m.length-1]?.menu;if(h){let y=this.findMenuItemByCaption(h,i.caption);if(y)y.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((y)=>setTimeout(y,300)),M(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(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var M9=$0.elementCreator(),Wl=M9,Yl=$0;function Nl(l,i,h){let y=l.find((x)=>x[i]!==void 0&&x[i]!==null);if(y!==void 0){let x=y[i];switch(typeof x){case"string":if(x.match(/^\d+(\.\d+)?$/))return 6*h;else if(x.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:D2,span:q5,button:Xl}=f,m9=(l)=>l;class Z0 extends z{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:w.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:r.tosiTableGridColumns,width:r.tosiTableGridRowWidth,height:r.tosiTableRowHeight,background:w.tosiTableBg("var(--tosi-bg, #fff)")},":host .thead .tr":{position:"sticky",top:"0",zIndex:"2",background:w.tosiTableHeaderBg(w.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:r.tosiTableRowHeight,lineHeight:r.tosiTableRowHeight},":host .col-pinned":{position:"sticky",zIndex:"1",background:w.tosiTableBg("var(--tosi-bg, #fff)")},":host .th.col-pinned":{zIndex:"3",background:w.tosiTableHeaderBg(w.tosiTableBg("var(--tosi-bg, #fff)"))},':host .tr[aria-selected="true"] .td':{background:w.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:r.tosiTableTouchSize,height:r.tosiTableTouchSize,width:r.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:r.tosiTableDraggedHeaderBg,color:r.tosiTableDraggedHeaderColor},":host .drag-over":{background:r.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=(l,i)=>{if(i==null)return;l.toggleAttribute("aria-selected",i[this.selectedKey]===!0)};maxVisibleRows=1e4;_head=null;_scrollArea=null;_tbodyTop=null;_tbodyBottom=null;_pinnedRowEdgeObserver=null;_rowCellsCache=new WeakMap;itemFor(l){return u1(l)}cellsFor(l){let i=Q(l);for(let h of[this._tbodyTop,this._scrollArea,this._tbodyBottom]){if(!h)continue;let y=r2(h);if(!y)continue;let x=y.itemToElement.get(i);if(x&&x.length>0){let o=x[0],C=this._rowCellsCache.get(o);if(!C)C=Array.from(o.children),this._rowCellsCache.set(o,C);return C}}return}get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(l){let{array:i,columns:h,filter:y}=Q(l);if(this._array!==i||this._columns!==h||this._filter!==y)this.queueRender();this._array=i||[],this._columns=h||null,this._filter=y||m9}rowData={visible:[],pinnedTopData:[],pinnedBottomData:[]};_array=[];_columns=null;_filter=m9;_sort;_pinnedTopRows;_pinnedBottomRows;get pinnedTopRows(){return this._pinnedTopRows}set pinnedTopRows(l){this._pinnedTopRows=l?Q(l):void 0,this.queueRender()}get pinnedBottomRows(){return this._pinnedBottomRows}set pinnedBottomRows(l){this._pinnedBottomRows=l?Q(l):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(l){this._array=Q(l),this.queueRender()}get filter(){return this._filter}set filter(l){if(this._filter!==l)this._filter=l,this.queueRender()}get sort(){if(this._sort)return this._sort;let l=this._columns?.find((h)=>h.sort==="ascending"||h.sort==="descending");if(!l)return;let{prop:i}=l;return l.sort==="ascending"?(h,y)=>h[i]>y[i]?1:-1:(h,y)=>h[i]>y[i]?-1:1}set sort(l){if(this._sort!==l)this._sort=l,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:l}=this;this._columns=Object.keys(l[0]||{}).map((i)=>{let h=Nl(l,i,this.charWidth);return{name:i.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:i,align:typeof l[0][i]==="number"||l[0][i]!==""&&!isNaN(l[0][i])?"right":"left",visible:h!==!1,width:h?h:0}})}return this._columns}set columns(l){this._columns=l,this.queueRender()}get visibleColumns(){let l=this.columns.filter((x)=>x.visible!==!1),i=l.filter((x)=>x.pinned==="left"),h=l.filter((x)=>!x.pinned),y=l.filter((x)=>x.pinned==="right");return[...i,...h,...y]}get pinnedLeft(){return this.visibleColumns.filter((l)=>l.pinned==="left").length}set pinnedLeft(l){let i=this.columns.filter((h)=>h.visible!==!1);for(let h of i)if(h.pinned==="left")delete h.pinned;for(let h=0;h<l&&h<i.length;h++)i[h].pinned="left";this.queueRender()}get pinnedRight(){return this.visibleColumns.filter((l)=>l.pinned==="right").length}set pinnedRight(l){let i=this.columns.filter((h)=>h.visible!==!1);for(let h of i)if(h.pinned==="right")delete h.pinned;for(let h=i.length-l;h<i.length;h++)if(h>=0)i[h].pinned="right";this.queueRender()}content=null;computeStickyInfo(l){let i=l.map(()=>({})),h=0,y=-1;for(let C=0;C<l.length;C++){if(l[C].pinned!=="left")break;i[C].left=h+"px",h+=l[C].width,y=C}if(y>=0)i[y].edgeClass="col-edge-right";let x=0,o=l.length;for(let C=l.length-1;C>=0;C--){if(l[C].pinned!=="right")break;i[C].right=x+"px",x+=l[C].width,o=C}if(o<l.length)i[o].edgeClass="col-edge-left";return i}cellClasses(l,i){let h=l;if(i.left!=null||i.right!=null)h+=" col-pinned";if(i.edgeClass)h+=" "+i.edgeClass;return h}rowClasses(l){return l==="visible"?"tr":"tr row-pinned"}tagPinnedRows=()=>{this.tagPinnedTbody(this._tbodyTop,"top"),this.tagPinnedTbody(this._tbodyBottom,"bottom")};tagPinnedTbody(l,i){if(!l)return;let h=Array.from(l.querySelectorAll(".tr"));if(h.length===0)return;let y=h.length-1,x=i==="top"?"row-edge-bottom":"row-edge-top";h.forEach((C,s)=>{C.classList.remove(x);let g=i==="top"?s+1:y-s;C.style[i]=`calc(var(--tosi-table-row-height) * ${g})`}),(i==="top"?h[y]:h[0]).classList.add(x)}cellStyle(l,i,h){let y={justifyContent:l.align||"left",...h};if(i.left!=null)y.left=i.left;if(i.right!=null)y.right=i.right;return y}applyGridCellAttrs(l,i,h,y){l.setAttribute("aria-colindex",String(i+1)),l.tabIndex=-1,l.classList.add(...this.cellClasses("td",h).split(" ")),Object.assign(l.style,y)}buildCell(l,i,h,y){let x=this.cellStyle(l,h);if(l.dataCell!==void 0){let o=l.dataCell(l);return this.applyGridCellAttrs(o,i,h,x),o}return q5({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(i+1),style:x,bindText:y[l.prop]})}buildRow(l,i,h,y="tr"){let x=i.map((g,k)=>this.buildCell(g,k,h[k],l)),o=this.selectBinding,C=this,s={class:y};return s.bind={value:l,binding:{toDOM:(g,k)=>{o(g,k);let c=C.rowRendered;if(c)c(k,Array.from(g.children))}}},D2(s,...x)}buildHeaderCell(l,i,h){let{popColumnMenu:y}=this,x="none",o;switch(l.sort){case"ascending":o=B.sortAscending(),x="descending";break;case"descending":x="ascending",o=B.sortDescending();break}let C=!(this.nosort&&this.nohide)?Xl({class:"menu-trigger",onClick(g){y(g.target,l),g.stopPropagation()}},o||B.moreVertical()):{},s=l.headerCell!==void 0?l.headerCell(l):q5({class:this.cellClasses("th",h),role:"columnheader",tabindex:-1,ariaSort:x,ariaColindex:String(i+1),style:this.cellStyle(l,h)},this.captionSpan({style:{flex:"1"}},typeof l.name==="string"?l.name:l.prop),C);if(l.headerCell!==void 0)this.applyGridCellAttrs(s,i,h,this.cellStyle(l,h)),s.classList.remove("td"),s.classList.add("th"),s.setAttribute("role","columnheader");if(!this.noreorder&&s.children[0]){v5();let g=this.instanceId+"-column-header",k=s.children[0];k.setAttribute("draggable","true"),k.style.pointerEvents="all",k.dataset.drag=g,s.dataset.drop=g,k.addEventListener("dragstart",()=>{this.draggedColumn=l}),s.addEventListener("drop",this.dropColumn)}return s}buildHeader(l,i){let h=l.map((y,x)=>this.buildHeaderCell(y,x,i[x]));return D2({class:"thead",role:"rowgroup"},D2({class:"tr",role:"row"},...h))}buildPinnedBody(l,i,h,y,x){let o=this.rowClasses(y),C=l.listBinding((s,g)=>this.buildRow(g,i,h,o),{});return D2({class:`tbody tbody-${y}`,role:"rowgroup",part:x},...C)}getColumn(l){if(!this._scrollArea)return;let i=(l.touches!==void 0?l.touches[0].clientX:l.clientX)-this._scrollArea.getBoundingClientRect().x,h=l.touches!==void 0?20:5,{scrollLeft:y,clientWidth:x,scrollWidth:o}=this._scrollArea,C=this.visibleColumns,s=o-x-y,g=0;return C.find((k,c)=>{if(k.visible===!1)return!1;g+=k.width;let d;if(k.pinned==="left")d=g;else if(k.pinned==="right")d=g-y-s;else d=g-y;return Math.abs(i-d)<h})}setCursor=(l)=>{let i=this.getColumn(l);this.style.cursor=i!==void 0?"col-resize":""};resizeColumn=(l)=>{let i=this.getColumn(l);if(i!==void 0){let h=Number(i.width),y=l.touches!==void 0,x=y?l.touches[0].identifier:void 0;x1(l,(o,C,s)=>{if((y?[...s.touches].find((c)=>c.identifier===x):!0)===void 0)return!0;let k=h+o;if(i.width=k>this.minColumnWidth?k:this.minColumnWidth,this.setColumnWidths(),s.type==="mouseup")return!0},"col-resize")}};selectRow(l,i=!0){if(i)l[this.selectedKey]=!0;else delete l[this.selectedKey];this.updateSelectionVisuals()}selectRows(l,i=!0){for(let h of l||this.array)if(i)h[this.selectedKey]=!0;else delete h[this.selectedKey];this.updateSelectionVisuals()}deSelect(l){this.selectRows(l,!1)}updateSelectionVisuals(){let l=this._scrollArea?.querySelectorAll(".tr")??[];for(let i of l){let h=this.itemFor(i);if(h!=null)this.selectBinding(i,h)}}rangeStart;updateSelection=(l)=>{if(!this.select&&!this.multiple)return;let{target:i}=l;if(!(i instanceof HTMLElement))return;let h=this.itemFor(i);if(h==null)return;let y=l,x=window.getSelection();if(x!==null)x.removeAllRanges();let o=this.visibleRows;if(this.multiple&&y.shiftKey&&o.length>0&&this.rangeStart!==h){let C=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[s,g]=[this.rangeStart!==void 0?o.indexOf(this.rangeStart):0,o.indexOf(h)].sort((k,c)=>k-c);if(s>-1)for(let k=s;k<=g;k++){let c=o[k];this.selectRow(c,C)}}else if(this.multiple&&y.metaKey){this.selectRow(h,!h[this.selectedKey]);let C=o.indexOf(h),s=o[C+1],g=C>0?o[C-1]:void 0;if(s!==void 0&&s[this.selectedKey]===!0)this.rangeStart=s;else if(g!==void 0&&g[this.selectedKey]===!0)this.rangeStart=g;else this.rangeStart=void 0}else this.rangeStart=h,this.deSelect(),this.selectRow(h,!0);this.selectionChanged(this.visibleSelectedRows),this.updateSelectionVisuals()};findCell(l,i){if(l===-1)return this.querySelector(`.thead .th[aria-colindex="${i+1}"]`);let h=this.effectivePinnedTopData,y=this.visibleRows,x=this.effectivePinnedBottomData,o;if(l<h.length)o=h[l];else if(l<h.length+y.length)o=y[l-h.length];else if(l<h.length+y.length+x.length)o=x[l-h.length-y.length];else return null;return this.cellsFor(o)?.[i]??null}_pendingFocus=null;onScrollEnd=()=>{if(!this._pendingFocus)return;let{row:l,col:i}=this._pendingFocus;this._pendingFocus=null;let h=this.findCell(l,i);if(h)h.focus()};focusCell(l,i){this._pendingFocus={row:l,col:i};let h=this.findCell(l,i);if(h)h.focus(),h.scrollIntoView({block:"nearest",inline:"nearest"});else if(this._scrollArea){let y=this.effectivePinnedTopData,x=l-y.length;if(x>=0&&x<this.visibleRows.length)this._scrollArea.scrollTop=x*this.rowHeight}}handleKeyNav=(l)=>{let i=l.target,h=i.closest(".td")||i.closest(".th");if(!h)return;let y=parseInt(h.getAttribute("aria-colindex")||"",10);if(isNaN(y))return;let x=y-1,o=this.visibleColumns.length,C=this.effectivePinnedTopData,s=this.visibleRows,g=this.effectivePinnedBottomData,k=C.length+s.length+g.length,c=l.metaKey||l.ctrlKey,d=h.classList.contains("th"),n;if(d)n=-1;else{let j=h.closest(".tr");if(!j)return;let P=u1(j);if(P==null)return;let _=C.indexOf(P),V=_===-1?s.indexOf(P):-1,K=_===-1&&V===-1?g.indexOf(P):-1;if(_!==-1)n=_;else if(V!==-1)n=C.length+V;else if(K!==-1)n=C.length+s.length+K;else return}let v=n,p=x;switch(l.key){case"ArrowUp":v=c?0:Math.max(-1,n-1);break;case"ArrowDown":v=c?k-1:Math.min(k-1,n+1);break;case"ArrowLeft":p=c?0:Math.max(0,x-1);break;case"ArrowRight":p=c?o-1:Math.min(o-1,x+1);break;case"Tab":if(l.shiftKey)if(x>0)p=x-1;else if(n>0)v=n-1,p=o-1;else return;else if(x<o-1)p=x+1;else if(n<k-1)v=n+1,p=0;else return;break;case"Home":if(c)v=0,p=0;else p=0;break;case"End":if(c)v=k-1,p=o-1;else p=o-1;break;default:return}if(v!==n||p!==x)l.preventDefault(),this.focusCell(v,p)};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 l=this.visibleColumns,i=l.map((x)=>x.width+"px").join(" "),h=l.reduce((x,o)=>x+o.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",i),this.style.setProperty("--tosi-table-grid-row-width",h),this.style.setProperty("--grid-columns",i),this.style.setProperty("--grid-row-width",h);let y=this.computeStickyInfo(l);for(let x of this.querySelectorAll(".col-pinned")){let o=parseInt(x.getAttribute("aria-colindex")||"",10)-1;if(!isNaN(o)&&y[o]){let C=y[o];if(C.left!=null)x.style.left=C.left;if(C.right!=null)x.style.right=C.right}}}sortByColumn=(l,i="auto")=>{for(let h of this.columns.filter((y)=>Q(y.sort)!==!1))if(Q(h)===l){if(i==="auto")h.sort=h.sort==="ascending"?"descending":"ascending";else h.sort=i;this.queueRender()}else delete h.sort};popColumnMenu=(l,i)=>{let{sortByColumn:h}=this,y=this.columns.filter((s)=>s.visible===!1),x=this.queueRender.bind(this),o=[];if(!this.nosort&&i.sort!==!1)o.push({caption:this.localized?`${X("Sort")} ${X("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){h(i)}},{caption:this.localized?`${X("Sort")} ${X("Descending")}`:"Sort Descending",icon:"sortDescending",action(){h(i,"descending")}});if(!this.nohide){if(o.length)o.push(null);o.push({caption:this.localized?`${X("Hide")} ${X("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>i.visible!==!0,action(){i.visible=!1,x()}},{caption:this.localized?`${X("Show")} ${X("Column")}`:"Show Column",icon:"eye",enabled:()=>y.length>0,menuItems:y.map((s)=>{return{caption:s.name||s.prop,action(){delete s.visible,x()}}})})}if(o.length)o.push(null);let C=i.pinned==="left"?"pin":i.pinned==="right"?"pin0f":"pin50o";o.push({caption:this.localized?X("Pin"):"Pin",icon:C,menuItems:[{caption:this.localized?X("Left"):"Left",icon:"pin",enabled:()=>i.pinned!=="left",action(){i.pinned="left",x()}},{caption:this.localized?X("Right"):"Right",icon:"pin0f",enabled:()=>i.pinned!=="right",action(){i.pinned="right",x()}},{caption:this.localized?X("Unpin"):"Unpin",icon:"unPin",enabled:()=>!!i.pinned,action(){delete i.pinned,x()}}]}),H({target:l,localized:this.localized,menuItems:o})};get captionSpan(){return this.localized?q1:q5}get visibleRows(){return Q(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((l)=>l[this.selectedKey])}get selectedRows(){if(this._pinnedTopRows||this._pinnedBottomRows)return[...this._pinnedTopRows??[],...this._array,...this._pinnedBottomRows??[]].filter((i)=>i[this.selectedKey]);return this._array.filter((l)=>l[this.selectedKey])}getCells(l){let i=l instanceof Element?this.itemFor(l):l;return i==null?void 0:this.cellsFor(i)}getItem(l){return this.itemFor(l)}draggedColumn;dropColumn=(l)=>{let i=l.target.closest(".drag-over"),h=parseInt(i.getAttribute("aria-colindex")||"",10)-1,y=this.visibleColumns[h],x=this.columns.indexOf(this.draggedColumn),o=this.columns.indexOf(y);this.draggedColumn.pinned=y.pinned,this.columns.splice(x,1),this.columns.splice(o,0,this.draggedColumn),this.queueRender(),l.preventDefault(),l.stopPropagation()};render(){super.render(),this.textContent="";let l=this.effectivePinnedTopData,i=this.effectivePinnedBottomData,h=this.effectiveBaseData,y=Math.min(h.length,this.maxVisibleRows),x=this.filter(h.slice(0,y)),{sort:o}=this;if(o)x.sort(o);this.rowData.pinnedTopData=l,this.rowData.pinnedBottomData=i,this.rowData.visible=x;let C=this.visibleColumns;if(C.length===0)return;let s=this.computeStickyInfo(C);this.style.setProperty("--tosi-table-row-height",this.rowHeight>0?`${this.rowHeight}px`:"auto"),this.setColumnWidths(),this._head=this.buildHeader(C,s),this._tbodyTop=l.length>0?this.buildPinnedBody(this.rowData.pinnedTopData,C,s,"pinned-top","pinnedTopRows"):null,this._tbodyBottom=i.length>0?this.buildPinnedBody(this.rowData.pinnedBottomData,C,s,"pinned-bottom","pinnedBottomRows"):null;let g=this.rowData.visible.listBinding((c,d)=>this.buildRow(d,C,s),this.rowHeight>0?{virtual:{height:this.rowHeight}}:{}),k=[this._head];if(this._tbodyTop)k.push(this._tbodyTop);if(k.push(...g),this._tbodyBottom)k.push(this._tbodyBottom);this._scrollArea=D2({class:"scroll-area",part:"visibleRows"},...k),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 l of[this._tbodyTop,this._tbodyBottom])if(l)this._pinnedRowEdgeObserver.observe(l,{childList:!0})}}var Rl=Z0,P5=Z0.elementCreator(),$l=P5,Zl=P5;var{dialog:bl,button:_5,header:Jl,footer:Hl,tosiSlot:V5,h3:O5,p:U5,label:Sl,input:Dl,div:Il}=f;class F5 extends z{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:w.menuShadow("0 5px 10px #0004"),_dialogBackground:w.background("#fafafa"),_dialogColor:w.textColor("#222"),boxShadow:r.dialogShadow,background:r.dialogBackground,color:r.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(l,i="Alert"){return new Promise((h)=>{let y=b0({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){h()}},O5({slot:"header"},i),l.includes(`
15
- `)?f.pre({style:{whiteSpace:"pre-wrap",margin:0}},l):U5(l));document.body.append(y),y.showModal()})}static async confirm(l,i="Confirm"){return new Promise((h)=>{let y=b0({removeOnClose:!0,dialogWillClose(x){h(x==="confirm")}},O5({slot:"header"},i),U5(l),_5({slot:"footer",onClick(){y.close()}},"Cancel"));document.body.append(y),y.showModal()})}static async prompt(l,i="Prompt",h=""){return new Promise((y)=>{let x=Dl({value:h}),o=b0({removeOnClose:!0,dialogWillClose(C){y(C==="confirm"?x.value:null)},initialFocus(){x.focus()}},O5({slot:"header"},i),U5(Sl({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},Il(l),x)),_5({slot:"footer",onClick(){o.close()}},"Cancel"));document.body.append(o),o.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();d2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(l="cancel")=>{console.log("dialog will close with",l)};initialFocus(){this.parts.ok.focus()}#l=(l)=>{};showModal=()=>{return this.style.zIndex=String(L1()),new Promise((l)=>{this.#l=l,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(l="cancel")=>{if(this.dialogWillClose(l),this.#l(l),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>bl({part:"dialog"},Jl(V5({name:"header"})),V5(),Hl(V5({name:"footer"}),_5({part:"ok",onClick:this.ok},"OK")))}var b0=F5.elementCreator();function K5(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var E1=K5();function y8(l){E1=l}var M2={exec:()=>null};function a(l,i=""){let h=typeof l=="string"?l:l.source,y={replace:(x,o)=>{let C=typeof o=="string"?o:o.source;return C=C.replace(l1.caret,"$1"),h=h.replace(x,C),y},getRegex:()=>new RegExp(h,i)};return y}var Tl=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),l1={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:(l)=>new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}#`),htmlBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}<(?:[a-z].*>|!--)`,"i")},ul=/^(?:[ \t]*(?:\n|$))+/,Ml=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ml=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,m2=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ll=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,a5=/(?:[*+-]|\d{1,9}[.)])/,x8=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,o8=a(x8).replace(/bull/g,a5).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(),el=a(x8).replace(/bull/g,a5).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(),Q5=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,El=/^[^\n]+/,W5=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,li=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",W5).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ii=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,a5).getRegex(),I0="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",Y5=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hi=a("^ {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",Y5).replace("tag",I0).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),C8=a(Q5).replace("hr",m2).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",I0).getRegex(),yi=a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",C8).getRegex(),N5={blockquote:yi,code:Ml,def:li,fences:ml,heading:Ll,hr:m2,html:hi,lheading:o8,list:ii,newline:ul,paragraph:C8,table:M2,text:El},L9=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",m2).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",I0).getRegex(),xi={...N5,lheading:el,table:L9,paragraph:a(Q5).replace("hr",m2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",L9).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",I0).getRegex()},oi={...N5,html:a(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Y5).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:M2,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(Q5).replace("hr",m2).replace("heading",` *#{1,6} *[^
16
- ]`).replace("lheading",o8).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ci=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,si=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,s8=/^( {2,}|\\)\n(?!\s*$)/,gi=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T0=/[\p{P}\p{S}]/u,X5=/[\s\p{P}\p{S}]/u,g8=/[^\s\p{P}\p{S}]/u,ki=a(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,X5).getRegex(),k8=/(?!~)[\p{P}\p{S}]/u,ci=/(?!~)[\s\p{P}\p{S}]/u,ri=/(?:[^\s\p{P}\p{S}]|~)/u,di=a(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Tl?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),c8=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,wi=a(c8,"u").replace(/punct/g,T0).getRegex(),ni=a(c8,"u").replace(/punct/g,k8).getRegex(),r8="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pi=a(r8,"gu").replace(/notPunctSpace/g,g8).replace(/punctSpace/g,X5).replace(/punct/g,T0).getRegex(),Bi=a(r8,"gu").replace(/notPunctSpace/g,ri).replace(/punctSpace/g,ci).replace(/punct/g,k8).getRegex(),fi=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,g8).replace(/punctSpace/g,X5).replace(/punct/g,T0).getRegex(),zi=a(/\\(punct)/,"gu").replace(/punct/g,T0).getRegex(),vi=a(/^<(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(),ti=a(Y5).replace("(?:-->|$)","-->").getRegex(),ji=a("^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",ti).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),H0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ai=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",H0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),d8=a(/^!?\[(label)\]\[(ref)\]/).replace("label",H0).replace("ref",W5).getRegex(),w8=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",W5).getRegex(),qi=a("reflink|nolink(?!\\()","g").replace("reflink",d8).replace("nolink",w8).getRegex(),e9=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,R5={_backpedal:M2,anyPunctuation:zi,autolink:vi,blockSkip:di,br:s8,code:si,del:M2,emStrongLDelim:wi,emStrongRDelimAst:pi,emStrongRDelimUnd:fi,escape:Ci,link:Ai,nolink:w8,punctuation:ki,reflink:d8,reflinkSearch:qi,tag:ji,text:gi,url:M2},Pi={...R5,link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",H0).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",H0).getRegex()},G5={...R5,emStrongRDelimAst:Bi,emStrongLDelim:ni,url:a(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",e9).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:a(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",e9).getRegex()},_i={...G5,br:a(s8).replace("{2,}","*").getRegex(),text:a(G5.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},J0={normal:N5,gfm:xi,pedantic:oi},I2={normal:R5,gfm:G5,breaks:_i,pedantic:Pi},Vi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},E9=(l)=>Vi[l];function P1(l,i){if(i){if(l1.escapeTest.test(l))return l.replace(l1.escapeReplace,E9)}else if(l1.escapeTestNoEncode.test(l))return l.replace(l1.escapeReplaceNoEncode,E9);return l}function l8(l){try{l=encodeURI(l).replace(l1.percentDecode,"%")}catch{return null}return l}function i8(l,i){let h=l.replace(l1.findPipe,(o,C,s)=>{let g=!1,k=C;for(;--k>=0&&s[k]==="\\";)g=!g;return g?"|":" |"}),y=h.split(l1.splitPipe),x=0;if(y[0].trim()||y.shift(),y.length>0&&!y.at(-1)?.trim()&&y.pop(),i)if(y.length>i)y.splice(i);else for(;y.length<i;)y.push("");for(;x<y.length;x++)y[x]=y[x].trim().replace(l1.slashPipe,"|");return y}function T2(l,i,h){let y=l.length;if(y===0)return"";let x=0;for(;x<y;){let o=l.charAt(y-x-1);if(o===i&&!h)x++;else if(o!==i&&h)x++;else break}return l.slice(0,y-x)}function Oi(l,i){if(l.indexOf(i[1])===-1)return-1;let h=0;for(let y=0;y<l.length;y++)if(l[y]==="\\")y++;else if(l[y]===i[0])h++;else if(l[y]===i[1]&&(h--,h<0))return y;return h>0?-2:-1}function h8(l,i,h,y,x){let o=i.href,C=i.title||null,s=l[1].replace(x.other.outputLinkReplace,"$1");y.state.inLink=!0;let g={type:l[0].charAt(0)==="!"?"image":"link",raw:h,href:o,title:C,text:s,tokens:y.inlineTokens(s)};return y.state.inLink=!1,g}function Ui(l,i,h){let y=l.match(h.other.indentCodeCompensation);if(y===null)return i;let x=y[1];return i.split(`
12
+ `)},I6=(l)=>{h1("initVars","initVars is deprecated. Just use _ and __ prefixes instead.");let i={};for(let h of Object.keys(l)){let y=l[h],x=v1(h);i[`--${x}`]=typeof y==="number"&&y!==0?String(y)+"px":y}return i},u4=(l)=>{let i={};for(let h of Object.keys(l)){let y=l[h];if(y instanceof A)i[h]=y.inverseLuminance;else if(typeof y==="string"&&y.match(/^(#[0-9a-fA-F]{3}|rgba?\(|hsla?\()/))i[h]=A.fromCss(y).inverseLuminance}return i},w=new Proxy({},{get(l,i){if(l[i]===void 0){let h="--"+v1(i);l[i]=(y)=>`var(${h}, ${y})`}return l[i]}}),r=new Proxy({},{get(l,i){if(i==="default")return w;if(l[i]==null){i=v1(i);let[,h,,y,x,o]=i.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",i],C=`--${h}`;if(x!=null){let s=y==null?Number(x)/100:-Number(x)/100;switch(o){case"b":case"s":case"h":case"o":{let g=`--${i}`;A.registerComputedColor(g,C,s,o),l[i]=`var(${g})`}break;case"":l[i]=`calc(var(${C}) * ${s})`;break;default:throw console.error(o),Error(`Unrecognized method ${o} for css variable ${C}`)}}else l[i]=`var(${C})`}return l[i]}});function s9(){let l=(i)=>typeof matchMedia<"u"&&matchMedia(i).matches;return{colorScheme:l("(prefers-color-scheme: dark)")?"dark":"light",contrast:l("(prefers-contrast: more)")?"more":l("(prefers-contrast: less)")?"less":l("(prefers-contrast: custom)")?"custom":"no-preference",reducedMotion:l("(prefers-reduced-motion: reduce)"),reducedTransparency:l("(prefers-reduced-transparency: reduce)"),forcedColors:l("(forced-colors: active)")}}function T6(l){if(typeof matchMedia>"u")return()=>{};let i=["(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=()=>l(s9()),y=i.map((x)=>matchMedia(x));for(let x of y)x.addEventListener("change",h);return()=>{for(let x of y)x.removeEventListener("change",h)}}var u6="http://www.w3.org/1998/Math/MathML",M6="http://www.w3.org/2000/svg",n0={},g9=(l,i,h)=>{let y=o9(v1(i),h);if(y.prop.startsWith("--"))l.style.setProperty(y.prop,y.value);else l.style[i]=y.value},m6=(l)=>{return{toDOM(i,h){g9(i,l,h)}}},k9=(l,i,h)=>{if(i==="style")if(typeof h==="object")for(let y of Object.keys(h))if(y1(h[y]))F1(l,h[y],m6(y));else g9(l,y,h[y]);else l.setAttribute("style",h);else{let y=v1(i),x=l.constructor.observedAttributes;if(x?.includes(i)||x?.includes(y))if(typeof h==="boolean")h?l.setAttribute(y,""):l.removeAttribute(y);else l.setAttribute(y,h);else if(l[i]!==void 0){let{MathMLElement:o}=globalThis;if(l instanceof SVGElement||o!==void 0&&l instanceof o)l.setAttribute(i,h);else l[i]=h}else if(y==="class")h.split(" ").forEach((o)=>{l.classList.add(o)});else if(l[y]!==void 0)l[y]=h;else if(typeof h==="boolean")h?l.setAttribute(y,""):l.removeAttribute(y);else l.setAttribute(y,h)}},_4={},Q3=(l)=>{if(!_4[l])_4[l]={toDOM(i,h){k9(i,l,h)}};return _4[l]},M4=(l,i,h)=>{if(i==="apply")h(l);else if(i.match(/^on[A-Z]/)!=null){let y=i.substring(2).toLowerCase();d2(l,y,h)}else if(i==="bind")if((typeof h.binding==="string"?K1[h.binding]:h.binding)!==void 0&&h.value!==void 0)F1(l,h.value,h.binding instanceof Function?{toDOM:h.binding}:h.binding);else throw Error("bad binding");else if(i.match(/^bind[A-Z]/)!=null){let y=i.substring(4,5).toLowerCase()+i.substring(5);if(y!=="value"){let o=y==="text"?"textContent":y==="enabled"?"disabled (with .tosi.take(v => !v))":y==="disabled"?"disabled":y==="list"?".tosi.listBinding()":null;if(o)h1(`bind${y}`,`bind${i.substring(4)} is deprecated. Use { ${o}: ... } instead.`)}let x=K1[y];if(x!==void 0)F1(l,h,x);else throw Error(`${i} is not allowed, bindings.${y} is not defined`)}else if(h!=null&&typeof h==="object"&&h[t0])F1(l,h,Q3(i));else if(y1(h))F1(l,h,Q3(i));else k9(l,i,h)},m4=(l,...i)=>{if(n0[l]===void 0){let[x,o]=l.split("|");if(o===void 0)n0[l]=globalThis.document.createElement(x);else n0[l]=globalThis.document.createElementNS(o,x)}let h=n0[l].cloneNode(),y={};for(let x of i)if(x instanceof Element||x instanceof DocumentFragment||typeof x==="string"||typeof x==="number")if(h instanceof HTMLTemplateElement)h.content.append(x);else h.append(x);else if(y1(x))h.append(f.span({bindText:x}));else Object.assign(y,x);for(let x of Object.keys(y)){let o=y[x];M4(h,x,o)}return h},L4=(...l)=>{let i=globalThis.document.createDocumentFragment();for(let h of l)i.append(h);return i},f=new Proxy({fragment:L4},{get(l,i){if(i=i.replace(/[A-Z]/g,(h)=>`-${h.toLocaleLowerCase()}`),l[i]===void 0)l[i]=(...h)=>m4(i,...h);return l[i]},set(){throw Error("You may not add new properties to elements")}}),q0=new Proxy({fragment:L4},{get(l,i){if(l[i]===void 0)l[i]=(...h)=>m4(`${i}|${M6}`,...h);return l[i]},set(){throw Error("You may not add new properties to elements")}}),c9=new Proxy({fragment:L4},{get(l,i){if(l[i]===void 0)l[i]=(...h)=>m4(`${i}|${u6}`,...h);return l[i]},set(){throw Error("You may not add new properties to elements")}}),W3=new WeakSet;function L6(l,i,h="part"){let y=`[data-${h}]`;for(let x of Array.from(l.querySelectorAll(y))){if(W3.has(x))continue;let o=x.getAttribute(`data-${h}`);if(o==null)continue;let C=i[o];if(C==null)continue;W3.add(x);for(let s of Object.keys(C))M4(x,s,C[s])}}var e6=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],E6=!0,l7=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,i7=(l)=>l7.test(l),W1=(l="",i="")=>{if(l==="")return i;else if(i.match(/^\d+$/)!==null||i.includes("="))return`${l}[${i}]`;else return`${l}.${i}`},j0={};function P4(l,i){if(l!==null&&(typeof l==="object"||typeof l==="function"))return l;return new Proxy(j0,X1(i,!0))}var r9=()=>new Proxy({},X1("^",!0)),V4=(l)=>{let i=l(r9())?.path;if(!i?.startsWith("^."))throw Error("selector must return a property of the item");return i.substring(2)},O4=(l,i,h)=>{for(let y=0;y<l.length;y++)if(`${u(l[y],i)}`===`${h}`)return y;return-1},h7=(l,i)=>({listFind(h,y){if(h instanceof Element){let C=h;while(C&&!C[C2]&&C.parentElement)C=C.parentElement;let s=C?.[C2];if(s==null)return;let g=i.indexOf(s);return g!==-1?C1[l][g]:void 0}let x=V4(h),o=O4(i,x,y);return o!==-1?C1[l][o]:void 0},listUpdate(h,y){let x=V4(h),o=u(y,x),C=O4(i,x,o);if(C!==-1){let s=C1[l][C];for(let g of Object.keys(y))s[g]=y[g];return s}return C1[l].push(y),C1[l][i.length-1]},listRemove(h,y){let x=V4(h),o=O4(i,x,y);if(o===-1)return!1;return C1[l].splice(o,1),!0}}),Y3=!1;function y7(){if(!Y3)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),Y3=!0}var N3=(l)=>{return l===j0},x7=(l,i)=>({get(h,y){switch(y){case"value":return i===j0?u(e,l):i.valueOf?i.valueOf():i;case"path":return l;case"touch":return()=>s1(l);case"observe":return(x)=>{let o=X2(l,x);return()=>W2(o)};case"bind":return(x,o,C)=>{K6()(x,l,o,C)};case"on":{let x=i===j0?u(e,l):i.valueOf?i.valueOf():i;return(o,C)=>a6()(o,C,x)}case"binding":return(x)=>({bind:{value:l,binding:x}});case"listBinding":return(x=({span:C})=>C({bindText:"^"}),o={})=>{let C=o.virtual?.itemsPerRow??1,s=[];for(let g=0;g<C;g++)s.push(x(f,r9(),g));return[{bindList:{value:l,...o}},f.template(...s)]};case"listFind":case"listUpdate":case"listRemove":return h7(l,Array.isArray(i)?i:[])[y];case"take":return(...x)=>{let o=x[x.length-1],C=x.slice(0,-1).map((s)=>typeof s==="string"?s:s[j1]);return{[t0]:!0,paths:[l,...C],transform:o}}}return},set(h,y,x){if(y==="value"){if(x=Q(x),Q(T[l])!==x&&N2(e,l,x))s1(l);return!0}return!1}}),F2=(l,i)=>new Proxy(i,x7(l,i)),X3=new Set(["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"]),R3=new Map([[j1,"path"],["xinPath","path"],["tosiPath","path"],[g2,"value"],["xinValue","value"],["tosiValue","value"],[w6,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[p6,"on"],["xinOn","on"],["tosiOn","on"],[n6,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),X1=(l,i)=>({get(h,y){if((y==="tosi"||y===I4)&&i)return F2(l,h);if(N3(h)){let g=()=>u(e,l);switch(y){case"valueOf":case"toJSON":return()=>g();case Symbol.toPrimitive:return(d)=>{let n=g();if(d==="number")return Number(n);if(d==="string")return String(n);return n};case"toString":return()=>String(g())}if(X3.has(y))return F2(l,h)[y];let k=R3.get(y);if(k!==void 0)return y7(),F2(l,h)[k];let c=g();if(c!=null){let d=Object(c);if(y in d){let n=d[y];return typeof n==="function"?n.bind(d):n}}return}if(i&&(y==="valueOf"||y==="toJSON"))return()=>h.valueOf?h.valueOf():h;if(i&&!(y in h)&&X3.has(y))return F2(l,h)[y];let x=R3.get(y);if(x!==void 0)return F2(l,h)[x];if(typeof y==="symbol")return h[y];let o=Object.getOwnPropertyDescriptor(h,y);if(o&&!o.configurable&&!o.writable&&"value"in o)return o.value;let C=y,s=C.match(/^([^.[]+)\.(.+)$/)??C.match(/^([^\]]+)(\[.+)/)??C.match(/^(\[[^\]]+\])\.(.+)$/)??C.match(/^(\[[^\]]+\])\[(.+)$/);if(s!==null){let[,g,k]=s,c=W1(l,g),d=Q(u(h,g));return d!==null&&typeof d==="object"?new Proxy(d,X1(c,i))[k]:d}if(C.startsWith("[")&&C.endsWith("]"))C=C.substring(1,C.length-1);if(!Array.isArray(h)&&h[C]!==void 0||Array.isArray(h)&&C.includes("=")){let g;if(C.includes("=")){let[k,c]=C.split("=");g=h.find((d)=>`${u(d,k)}`===c)}else g=h[C];if(g instanceof Object){g=Q(g);let k=W1(l,C);return new Proxy(g instanceof Function?g.bind(h):g,X1(k,i))}else return i?P4(g,W1(l,C)):g}else if(Array.isArray(h)){let g=h[C];return typeof g==="function"?(...k)=>{let c=k.map((n)=>Q(n)),d=g.apply(h,c);if(e6.includes(C))s1(l);if(d!=null&&typeof d==="object"){if(C==="find"||C==="findLast"||C==="at"){let n=h.indexOf(d);if(n!==-1)return new Proxy(d,X1(W1(l,String(n)),i))}}return d}:typeof g==="object"?new Proxy(Q(g),X1(W1(l,C),i)):i?P4(g,W1(l,C)):g}else{let g=h[C];if(g!==null&&typeof g==="object")g=Q(g);return i?P4(g,W1(l,C)):g}},set(h,y,x){if(x=Q(x),x!==null&&typeof x==="object")if(Array.isArray(x))for(let C=0;C<x.length;C++)x[C]=Q(x[C]);else for(let C of Object.keys(x))x[C]=Q(x[C]);let o=y===g2||y==="xinValue"||y==="tosiValue"||y==="value"&&(N3(h)||i)?l:W1(l,y);if(E6&&!i7(o))throw Error(`setting invalid path ${o}`);if(Q(T[o])!==x&&N2(e,o,x))s1(o);return!0}}),e4=(l,i)=>{let h=typeof i==="function"?i:T[i];if(typeof h!=="function")throw Error(`observe expects a function or path to a function, ${i} is neither`);return X2(l,h)},T=new Proxy(e,X1("",!1));F6(T);var C1=new Proxy(e,X1("",!0)),o7=16,C7=100;function $3(l,i){let h=Array.from(l.querySelectorAll(s2));if(l.matches(s2))h.unshift(l);for(let y of h){let x=G1.get(y);for(let o of x){if(o.path.startsWith("^"))o.path=`${i}${o.path.substring(1)}`;if(o.binding.toDOM!=null)o.binding.toDOM(y,T[o.path])}}}class d9{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(l,i,h={}){if(this.boundElement=l,this.itemToElement=new WeakMap,h.idPath!=null){let s=y1(i);if(s!=null)B6(s,h.idPath)}let y=h.virtual?.itemsPerRow??1,x=Array.from(l.children).find((s)=>s instanceof HTMLTemplateElement),o=null;if(x!=null){let s=y;if(x.content.children.length<1||x.content.children.length!==s)throw Error(`ListBinding expects a template with exactly ${s} child element(s)`);this.templates=Array.from(x.content.children).map((g)=>Q2(g)),o=x.nextElementSibling,x.remove()}else if(l.children.length===1)this.templates=[l.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=h;let C=l.namespaceURI;if(this.isNamespaced=C==="http://www.w3.org/2000/svg"||C==="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"),o!=null)this.boundElement.insertBefore(this.listTop,o),this.boundElement.insertBefore(this.listBottom,o);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(y>1){this.boundElement.classList.add("tosi-virtual-grid");let s=this.boundElement.style;if(s!=null)s.setProperty("--tosi-columns",String(y)),s.display=s.display||"grid",s.gridTemplateColumns=s.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",y>1?"grid":"list");if(this.boundElement[B0]=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(Z4.observe(this.boundElement),this._update=k2(()=>{this.update(this.array,!0)},o7),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:l,visibleProp:i}=this.options,h=this.array;if(l!==void 0)h=h.filter((y)=>y[l]!==!0);if(i!==void 0)h=h.filter((y)=>y[i]===!0);if(this.options.filter&&this.needle!==void 0)h=this.options.filter(h,this.needle);return this._filteredCache=h,h}visibleSlice(){let{virtual:l}=this.options,i=this.filteredArray(),h=0,y=i.length-1,x=0,o=0;if(l!=null&&this.boundElement instanceof HTMLElement){let C=this.boundElement.offsetWidth,s=l.scrollContainer==="window",g,k;if(s){g=window.innerHeight;let n=this.boundElement.getBoundingClientRect();k=Math.max(0,-n.top)}else g=this.boundElement.offsetHeight,k=this.boundElement.scrollTop;let c=l.width!=null?Math.max(1,Math.floor(C/l.width)):l.visibleColumns??1,d=Math.ceil(i.length/c);if(l.minHeight!=null){let n=l.minHeight,v=Math.ceil(g/n)+(l.rowChunkSize||1),p=c*v,t=d*n,_=Math.max(0,t-g),P=_>0?Math.min(1,Math.max(0,k/_)):0,V=Math.max(0,d-v+1),K=P*V,Z=Math.floor(K);if(l.rowChunkSize)Z-=Z%l.rowChunkSize;return h=Z*c,y=h+p-1,x=k,o=Math.max(0,t-k-g),{items:i,firstItem:h,lastItem:y,topBuffer:x,bottomBuffer:o,interpolation:{t:P,position:K,scrollTop:k,viewportHeight:g,totalScrollHeight:t,rowHeight:l.height}}}else{let n=Math.ceil(g/l.height)+(l.rowChunkSize||1),v=c*n,p=Math.floor(k/l.height);if(p>d-n+1)p=Math.max(0,d-n+1);if(l.rowChunkSize)p-=p%l.rowChunkSize;h=p*c,y=h+v-1,x=p*l.height,o=Math.max((d-n)*l.height-x,0)}}return{items:i,firstItem:h,lastItem:y,topBuffer:x,bottomBuffer:o}}needle;filter=k2((l)=>{if(this.needle!==l)this.needle=l,this.update(this.array)},C7);update(l,i){if(l==null)l=[];if(this.array=l,!i)this._filteredCache=void 0;let{hiddenProp:h,visibleProp:y}=this.options,x=y1(l),o=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",o.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(o.items.length));let C=this._previousSlice,{firstItem:s,lastItem:g,topBuffer:k,bottomBuffer:c}=o,d=h===void 0&&y===void 0&&i===!0&&C!=null&&s===C.firstItem&&g===C.lastItem;if(d&&o.interpolation==null&&k===C.topBuffer&&c===C.bottomBuffer)return;if(d&&o.interpolation!=null){this._updateInterpolatedBuffers(o);return}this._previousSlice=o;let n=0,v=0,p=0,{idPath:t}=this.options,_=this.options.virtual?.itemsPerRow??1,P;if(t!=null){P=new Set;for(let W=s;W<=g;W++){let O=o.items[W];if(O!==void 0)P.add(String(O[t]))}}let V=new Set;for(let W of Array.from(this.boundElement.children)){if(W===this.listTop||W===this.listBottom)continue;let O=W[C2];if(O==null)continue;else if(O===!0)W.remove(),n++;else{if(V.has(O))continue;let F;if(t!=null)F=!P.has(String(O[t]));else{let R=o.items.indexOf(O);F=R<s||R>g}if(F){V.add(O);let R=this.itemToElement.get(O);if(R!=null)for(let Y of R)Y.remove();else W.remove();if(this.itemToElement.delete(O),t!=null)this.idToElement.delete(String(O[t]));n++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(k)+"px",this.listBottom.style.height=String(c)+"px";let K=[];for(let W=s;W<=g;W++){let O=o.items[W];if(O===void 0)continue;let F=this.itemToElement.get(Q(O));if(F==null&&t!=null){let R=String(O[t]);if(F=this.idToElement.get(R),F!=null){let Y=Q(O);this.itemToElement.set(Y,F);for(let o1 of F)o1[C2]=Y}}if(F==null){p++;let R=Q(O);if(F=this.templates.map((Y)=>Q2(Y)),typeof O==="object")this.itemToElement.set(R,F);for(let Y of F)Y[C2]=typeof O==="object"?R:!0;for(let Y of F)if(this.listBottom!=null)this.boundElement.insertBefore(Y,this.listBottom);else this.boundElement.append(Y);if(t!=null){let Y=O[t],o1=`${x}[${t}=${Y}]`;for(let r0 of F)$3(r0,o1);this.idToElement.set(String(Y),F)}else{let Y=`${x}[${W}]`;for(let o1 of F)$3(o1,Y)}}if(this.options.virtual!=null){let R=String(W+1);if(_>1)for(let Y=0;Y<F.length;Y++){let o1=F[Y];o1.setAttribute("role","gridcell"),o1.setAttribute("aria-rowindex",R),o1.setAttribute("aria-colindex",String(Y+1))}else for(let Y of F)Y.setAttribute("role","listitem"),Y.setAttribute("aria-rowindex",R)}K.push(...F)}let Z=null;for(let W of K){if(W.previousElementSibling!==Z)if(v++,Z?.nextElementSibling!=null)this.boundElement.insertBefore(W,Z.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(W,this.listBottom);else this.boundElement.append(W);Z=W}if(o.interpolation!=null)this._updateInterpolatedBuffers(o);if(f0.perf)console.log(x,"updated",{removed:n,created:p,moved:v})}_updateInterpolatedBuffers(l){let{t:i,position:h,scrollTop:y,viewportHeight:x,totalScrollHeight:o,rowHeight:C}=l.interpolation,s=0;for(let d of Array.from(this.boundElement.children)){if(d===this.listTop||d===this.listBottom)continue;s+=d.offsetHeight||C}let g=y,k=y+x-s,c=Math.max(0,i*k+(1-i)*g-h%1*C);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(c)+"px",this.listBottom.style.height=String(Math.max(0,o-c-s))+"px"}}var r2=(l,i,h)=>{let y=l[B0];if(i&&y===void 0)y=new d9(l,i,h),l[B0]=y;return y},E4=(l)=>{let i;while(!(i=l[C2])&&l&&l.parentElement)l=l.parentElement;return i?{element:l,item:i}:void 0},u1=(l)=>{let i=E4(l);return i?i.item:void 0},s7=(l)=>{let i=E4(l);if(!i)return console.error("deleteListItem failed, element is not part of a list instance",l),!1;let h=r2(i.element.parentElement);if(!h.options.idPath)return console.error("deleteListItem failed, list binding has no idPath",l.parentElement,h),!1;let y=h.array.indexOf(i.item);if(y>-1)return h.array.splice(y,1),!0;return!1},g7={start:"start",middle:"center",end:"end",nearest:"nearest"},k7=(l,i,h={})=>{let y=r2(l);if(y==null)return console.error("scrollListItemIntoView failed, element has no list binding",l),!1;let{position:x="middle"}=h,o=y.filteredArray(),C=Q(i)??i,s=o.indexOf(C);if(s===-1)return console.error("scrollListItemIntoView failed, item not found in list",i),!1;let{virtual:g}=y.options;if(g!=null&&l instanceof HTMLElement){let k=g.width!=null?Math.max(1,Math.floor(l.offsetWidth/g.width)):g.visibleColumns??1,c=Math.floor(s/k),d=g.minHeight??g.height,n=Math.ceil(o.length/k),v=g.scrollContainer==="window",p=v?window.innerHeight:l.offsetHeight,t;if(g.minHeight!=null){let _=Math.ceil(p/d)+(g.rowChunkSize||1),P=n*d,V=Math.max(0,P-p),K=Math.max(1,n-_+1),Z=c/K;switch(x){case"start":t=Z*V;break;case"end":t=Math.max(0,(c-_+1)/K*V);break;case"nearest":{let W=v?Math.max(0,-l.getBoundingClientRect().top):l.scrollTop,O=V>0?W/V:0,F=Math.floor(O*K);if(c<F)t=Z*V;else if(c>=F+_)t=Math.max(0,(c-_+1)/K*V);else return!0;break}default:{let W=c-Math.floor(_/2);t=Math.max(0,W)/K*V}}}else{let _=c*g.height;switch(x){case"start":t=_;break;case"end":t=_-p+g.height;break;case"nearest":{let P=v?Math.max(0,-l.getBoundingClientRect().top):l.scrollTop;if(_<P)t=_;else if(_+g.height>P+p)t=_-p+g.height;else return!0;break}default:t=_-(p-g.height)/2}}if(t=Math.max(0,t),v){let _=l.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:_+t,behavior:"smooth"})}else l.scrollTo({top:t,behavior:"smooth"})}else{let k=y.itemToElement.get(C);if(k==null||k.length===0)return console.error("scrollListItemIntoView failed, no DOM element found for item",i),!1;k[0].scrollIntoView({block:g7[x]??"center",behavior:"smooth"})}return!0},{document:Y2,MutationObserver:Z3}=globalThis,l5=(l,i)=>{let h=G1.get(l);if(h==null)return;for(let y of h){let{binding:x,options:o}=y,{path:C}=y,{toDOM:s}=x;if(s!=null){if(C.startsWith("^")){let g=u1(l);if(g!=null&&g[j1]!=null)C=y.path=`${g[j1]}${C.substring(1)}`;else{if(l instanceof HTMLElement)console.warn(`Unresolved relative binding "${C}" —`,l,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(i==null||C.startsWith(i))s(l,A0()[C],o)}}};if(Z3!=null)new Z3((l)=>{l.forEach((i)=>{Array.from(i.addedNodes).forEach((h)=>{if(h instanceof Element)Array.from(h.querySelectorAll(s2)).forEach((y)=>l5(y))})})}).observe(Y2.body,{subtree:!0,childList:!0});X2(()=>!0,(l)=>{let i=Array.from(Y2.querySelectorAll(s2));for(let h of i)l5(h,l)});var b3=(l)=>{let i=l.target?.closest(s2);while(i!=null){let h=G1.get(i);for(let y of h){let{binding:x,path:o}=y,{fromDOM:C}=x;if(C!=null){let s;try{s=C(i,y.options)}catch(g){throw console.error("Cannot get value from",i,"via",y),Error("Cannot obtain value fromDOM")}if(s!=null){let g=A0(),k=g[o];if(k==null)g[o]=s;else{let c=k[j1]!=null?k[g2]:k,d=s[j1]!=null?s[g2]:s;if(c!==d)g[o]=d}}}}i=i.parentElement.closest(s2)}};if(globalThis.document!=null)Y2.body.addEventListener("change",b3,!0),Y2.body.addEventListener("input",b3,!0);function c7(l,i,h,y){let{paths:x,transform:o}=i,{toDOM:C}=h;if(C==null)return l;let s=null,g={toDOM(c,d,n){let v=A0(),p=x.map((_)=>v[_]);if(s!==null&&p.every((_,P)=>_===s[P]))return;s=p;let t=o(...p);C(c,t,n)},fromDOM:h.fromDOM};l.classList?.add(D4);let k=G1.get(l);if(k==null)k=[],G1.set(l,k);for(let c of x)k.push({path:c,binding:g,options:y});if(!x[0].startsWith("^"))s1(x[0]);return l}function F1(l,i,h,y){if(l instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(i!=null&&typeof i==="object"&&i[t0])return c7(l,i,h,y);let x;if(typeof i==="object"&&i[j1]===void 0&&y===void 0){let{value:s}=i;x=typeof s==="string"?s:s[j1],y=i,delete y.value}else x=typeof i==="string"?i:i[j1];if(x==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:o}=h;l.classList?.add(D4);let C=G1.get(l);if(C==null)C=[],G1.set(l,C);if(C.push({path:x,binding:h,options:y}),o!=null&&!x.startsWith("^"))s1(x);if(y?.filter&&y?.needle)F1(l,y.needle,{toDOM(s,g){console.log({needle:g}),s[B0]?.filter(g)}});return l}var J3=new Set,r7=(l)=>{let i=l?.target?.closest(P3),h=!1,y=new Proxy(l,{get(o,C){if(C==="stopPropagation")return()=>{l.stopPropagation(),h=!0};else{let s=o[C];return typeof s==="function"?s.bind(o):s}}}),x=new Set;while(!h&&i!=null){let o=a2.get(i)[l.type]||x;for(let C of o){if(typeof C==="function")C(y);else{let s=A0()[C];if(typeof s==="function")s(y);else throw Error(`no event handler found at path ${C}`)}if(h)continue}i=i.parentElement!=null?i.parentElement.closest(P3):null}};function d2(l,i,h){let y=a2.get(l);if(l.classList.add(I3),y==null)y={},a2.set(l,y);if(!y[i])y[i]=new Set;if(y[i].add(h),!J3.has(i))J3.add(i),Y2.body.addEventListener(i,r7,!0);return()=>{y[i].delete(h)}}G6(F1,d2);function w9(l,i){if(!l.internals)return;let h={},y="";if(l.hasAttribute("required")&&i==="")h.valueMissing=!0,y="Please fill out this field.";let x=l.getAttribute("minlength");if(x&&i.length<parseInt(x,10))h.tooShort=!0,y=`Please use at least ${x} characters.`;let o=l.getAttribute("maxlength");if(o&&i.length>parseInt(o,10))h.tooLong=!0,y=`Please use no more than ${o} characters.`;let C=l.getAttribute("pattern");if(C&&i!=="")try{if(!new RegExp(`^(?:${C})$`).test(i))h.patternMismatch=!0,y="Please match the requested format."}catch{}if(Object.keys(h).length>0)l.internals.setValidity(h,y,l);else l.internals.setValidity({})}var d7=0;function U4(){return`custom-elt${(d7++).toString(36)}`}var H3=0,F4=null;function w7(){if(F4===null)F4=new MutationObserver((l)=>{let i=new Set;for(let h of l)if(h.type==="attributes"&&h.target instanceof z){let y=h.target,x=h9(h.attributeName);if(y._legacyTrackedAttrs?.has(x))i.add(y)}for(let h of i)h.queueRender(!1)});return F4}var K2={};function n7(l,i){let h=K2[l],y=c2(i).replace(/:host\(([^)]+)\)/g,`${l}$1`).replace(/:host\b/g,l);K2[l]=h?h+`
13
+ `+y:y}function p7(l){if(K2[l])document.head.append(f.style({id:l+"-component"},K2[l]));delete K2[l]}class z extends HTMLElement{static elements=f;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(l){if(this.internals)if(l)this.internals.setValidity({customError:!0},l);else this.internals.setValidity({})}setValidity(l,i,h){this.internals?.setValidity(l,i,h)}setFormValue(l,i){this.internals?.setFormValue(l,i)}static get observedAttributes(){let l=this.initAttributes;if(l)return["hidden",...Object.keys(l).map(v1)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=f.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;static StyleNode(l){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),f.style(c2(l))}static elementCreator(l={}){let i=this;if(!Object.prototype.hasOwnProperty.call(i,"_elementCreator")){if(l.tag!==void 0)h1("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(l.styleSpec!==void 0)h1("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(l.extends!==void 0)h1("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let h=l.tag??i.preferredTagName;if(h==null)if(typeof i.name==="string"&&i.name!==""){if(h=v1(i.name),h.startsWith("-"))h=h.slice(1)}else h=U4();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=U4();while(customElements.get(h)!==void 0)h=U4();i._tagName=h;let y=l.styleSpec??i.lightStyleSpec;if(y!==void 0)n7(h,y);let x=l.extends??i.extends,o=x?{extends:x}:void 0;window.customElements.define(h,this,o),i._elementCreator=f[h]}return i._elementCreator}initAttributes(...l){if(h1("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let y of l)this._legacyTrackedAttrs.add(y);w7().observe(this,{attributes:!0});let i={},h={};l.forEach((y)=>{i[y]=T1(this[y]);let x=v1(y);Object.defineProperty(this,y,{enumerable:!1,get(){if(typeof i[y]==="boolean")return this.hasAttribute(x);else if(this.hasAttribute(x))return typeof i[y]==="number"?parseFloat(this.getAttribute(x)):this.getAttribute(x);else if(h[y]!==void 0)return h[y];else return i[y]},set(o){if(typeof i[y]==="boolean"){if(o!==this[y]){if(o)this.setAttribute(x,"");else this.removeAttribute(x);this.queueRender()}}else if(typeof i[y]==="number"){if(o!==parseFloat(this[y]))this.setAttribute(x,o),this.queueRender()}else if(typeof o==="object"||`${o}`!==`${this[y]}`){if(o===null||o===void 0||typeof o==="object")this.removeAttribute(x);else this.setAttribute(x,o);this.queueRender(),h[y]=o}}})})}initValue(){let l=Object.getOwnPropertyDescriptor(this,"value");if(l===void 0||l.get!==void 0||l.set!==void 0)return;let i=this.hasAttribute("value")?this.getAttribute("value"):T1(this.value);delete this.value,Object.defineProperty(this,"value",{enumerable:!1,get(){return i},set(h){if(i!==h)i=h,this._valueChanged=!0,this.queueRender(!0)}})}_parts;get parts(){let l=this.shadowRoot!=null?this.shadowRoot:this;if(this._parts==null)this._parts=new Proxy({},{get(i,h){if(i[h]===void 0){let y=l.querySelector(`[part="${h}"]`);if(y==null)y=l.querySelector(h);if(y==null)throw Error(`elementRef "${h}" does not exist!`);y.removeAttribute("data-ref"),i[h]=y}return i[h]}});return this._parts}attributeChangedCallback(l,i,h){let y=h9(l);if(!this._legacyTrackedAttrs?.has(y))this.queueRender(!1)}constructor(){super();if(H3+=1,this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let l=this.constructor.initAttributes;if(l)this._setupAttributeAccessors(l);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${H3}`,this._value=T1(this.defaultValue)}_setupAttributeAccessors(l){if(!this._attrValues)this._attrValues=new Map;for(let i of Object.keys(l)){let h=v1(i),y=l[i];if(i==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(typeof y==="object"&&y!==null){console.warn(`${this.tagName}: initAttributes.${i} is an object. Use a regular property instead.`);continue}let x=this,o=!1;while(x){let C=Object.getOwnPropertyDescriptor(x,i);if(C){if(!C.configurable||C.get||C.set){o=!0;break}break}x=Object.getPrototypeOf(x)}if(o)continue;Object.defineProperty(this,i,{enumerable:!1,get:()=>{if(typeof y==="boolean")return this.hasAttribute(h);else if(this.hasAttribute(h))return typeof y==="number"?parseFloat(this.getAttribute(h)):this.getAttribute(h);else if(this._attrValues.has(i))return this._attrValues.get(i);else return y},set:(C)=>{if(typeof y==="boolean"){if(C!==this[i]){if(C)this.setAttribute(h,"");else this.removeAttribute(h);this.queueRender()}}else if(typeof y==="number"){if(C!==parseFloat(this[i]))this.setAttribute(h,C),this.queueRender()}else if(typeof C==="object"||`${C}`!==`${this[i]}`){if(C===null||C===void 0||typeof C==="object")this.removeAttribute(h);else this.setAttribute(h,C);this.queueRender(),this._attrValues.set(i,C)}}})}}connectedCallback(){if(p7(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(Z4.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(){Z4.unobserve(this)}formResetCallback(){if(this.value!==void 0)this.value=this.defaultValue??""}formDisabledCallback(l){if(l)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(l){if(this.value!==void 0&&typeof l==="string")this.value=l}_changeQueued=!1;_renderQueued=!1;queueRender(l=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=l;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(l9(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 l=typeof this.content!=="function",i=typeof this.content==="function"?this.content(f):this.content;if(Array.isArray(i)){let o={};i=i.filter((C)=>{if(C instanceof Node||typeof C==="string"||typeof C==="number"||y1(C))return!0;return Object.assign(o,C),!1});for(let C of Object.keys(o))M4(this,C,o[C])}let h=this.constructor,y=h.shadowStyleSpec??h.styleSpec;if(h.styleSpec&&!h.shadowStyleSpec)h1("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:x}=h;if(y)x=h.styleNode=f.style(c2(y)),delete h.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),x=this.styleNode;if(x){let o=this.attachShadow({mode:"open"});o.appendChild(x.cloneNode(!0)),K3(o,i,l)}else if(i!==null){let o=Array.from(this.childNodes);K3(this,i,l),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==void 0;let C=Array.from(this.querySelectorAll("slot"));if(C.length>0)C.forEach(_0.replaceSlot);if(o.length>0){let s={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((g)=>{s[g.name]=g}),o.forEach((g)=>{let k=s[""],c=g instanceof Element?s[g.slot]:k;(c!==void 0?c:k).append(g)})}}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 l=typeof this.value==="string"?this.value:String(this.value);w9(this,l)}}class _0 extends z{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(l){let i=document.createElement("tosi-slot");if(l.name!=="")i.setAttribute("name",l.name);l.replaceWith(i)}}var B7=_0.elementCreator();class n9 extends z{static preferredTagName="xin-slot";static initAttributes={name:""};content=null;constructor(){super();h1("xin-slot","<xin-slot> is deprecated. Use <tosi-slot> instead.")}static replaceSlot=_0.replaceSlot}var f7=n9.elementCreator(),z7=(l=()=>!0)=>{let i=localStorage.getItem("xin-state");if(i!=null){let y=JSON.parse(i);for(let x of Object.keys(y).filter(l))if(T[x]!==void 0)Object.assign(T[x],y[x]);else T[x]=y[x]}let h=R2(()=>{let y={},x=Q(T);for(let o of Object.keys(x).filter(l))y[o]=x[o];localStorage.setItem("xin-state",JSON.stringify(y)),console.log("xin state saved to localStorage")},500);e4(l,h)},v7="tosijs-share",j7="tosijs-share",G2="shared",t7=1,b4=new Set,J4=new Set,G4=new Map,I1=null,H4="",p0=null,A7=null;function S3(){if(p0!=null)return Promise.resolve(p0);return new Promise((l,i)=>{let h=indexedDB.open(j7,t7);h.onupgradeneeded=()=>{h.result.createObjectStore(G2)},h.onsuccess=()=>{p0=h.result,l(p0)},h.onerror=()=>i(h.error)})}var q7={async get(l){let i=await S3();return new Promise((h,y)=>{let x=i.transaction(G2,"readonly").objectStore(G2).get(l);x.onsuccess=()=>h(x.result),x.onerror=()=>y(x.error)})},async set(l,i){let h=await S3();return new Promise((y,x)=>{let o=h.transaction(G2,"readwrite");o.objectStore(G2).put(i,l),o.oncomplete=()=>y(),o.onerror=()=>x(o.error)})}};function p9(){return A7??q7}function _7(l){return l!=null&&l.type==="tosijs-share"&&typeof l.path==="string"}function B9(l){for(let i of b4)if(l===i||l.startsWith(i+"."))return i;return}function P7(l){for(let i of J4)if(l===i||l.startsWith(i+"."))return!0;return!1}function V7(l,i){J4.add(l),N2(e,l,i),s1(l),T4().then(()=>{J4.delete(l)})}function O7(){if(I1!=null)return I1;return H4=crypto.randomUUID(),I1=new BroadcastChannel(v7),I1.onmessage=(l)=>{let i=l.data;if(!_7(i))return;if(i.origin===H4)return;if(B9(i.path)===void 0)return;V7(i.path,i.value)},I1}function U7(l,i){if(I1==null)return;let h={type:"tosijs-share",path:l,value:i,origin:H4};I1.postMessage(h)}function F7(l){if(!G4.has(l))G4.set(l,R2(()=>{let i=u(e,l);p9().set(l,i)},500));G4.get(l)()}async function G7(...l){if(typeof BroadcastChannel>"u")return{restored:[]};O7();let i=[],h=p9();for(let y of l){let x=typeof y==="string"?y:y1(y);if(x===void 0)throw Error("share() requires boxed proxies or string paths. Got a non-proxy value.");if(b4.has(x))continue;b4.add(x);let o=await h.get(x);if(o!==void 0)N2(e,x,o),s1(x),i.push(y);else{let C=u(e,x);await h.set(x,C)}X2((C)=>C===x||C.startsWith(x+"."),(C)=>{if(P7(C))return;let s=B9(C);if(s===void 0)return;let g=u(e,C);U7(C,g),F7(s)})}return{restored:i}}var S4=new Set;function D3(l,i){for(let h of l)if(i===h||i.startsWith(h+"."))return h;return}function K7(l){for(let i of S4)if(l===i||l.startsWith(i+"."))return!0;return!1}function a7(l,i){S4.add(l),N2(e,l,i),s1(l),T4().then(()=>{S4.delete(l)})}async function Q7(l,i,...h){let y=new Set,x=[],o=[],C=i.throttleInterval??100;await l.connect();let s=k2(()=>{if(x.length===0)return;let g=x.splice(0);l.send(g)},C);l.onReceive((g)=>{for(let k of g){if(D3(y,k.path)===void 0)continue;a7(k.path,k.value)}});for(let g of h){let k=typeof g==="string"?g:y1(g);if(k===void 0)throw Error("sync() requires boxed proxies or string paths. Got a non-proxy value.");y.add(k);let c=X2((d)=>d===k||d.startsWith(k+"."),(d)=>{if(K7(d))return;if(D3(y,d)===void 0)return;let n=u(e,d);x.push({path:d,value:n}),s()});o.push(c)}return{disconnect(){for(let g of o)W2(g);o.length=0,y.clear(),x.length=0,l.disconnect()}}}var f9="1.6.1";function E(l){return Object.assign(C1,l),C1}function i5(l){return h1("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),E(l)}var W7=new FinalizationRegistry((l)=>{l()});function Y7(l,i){let h=u3();C1[h]=l;let y=C1[h],x=()=>{delete T[h]};if(i)W7.register(i,x);return[y,x]}function z9(l,i=!1){if(i)return h1("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),i5(l);return Object.keys(l).forEach((h)=>{T[h]=l[h]}),T}var N7={};async function h5(l,i){let h=await i(l,{Color:A,Component:z,elements:f,svgElements:q0,mathML:c9,varDefault:w,vars:r,xin:T,boxed:C1,xinProxy:z9,boxedProxy:i5,tosi:E,makeComponent:h5,bind:F1,on:d2,version:f9}),{type:y}=h;y.preferredTagName=l;let x=h.lightStyleSpec??h.styleSpec;if(x)y.lightStyleSpec=x;let o={type:y,creator:y.elementCreator()};return N7[l]=o,o}var P0={":host":{display:"none"}},K4={},X7=(l)=>import(l);class V0 extends z{static preferredTagName="tosi-blueprint";static lightStyleSpec=P0;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(l)=>{};async packaged(){let{tag:l,src:i,property:h}=this,y=`${l}.${h}:${i}`;if(!this.loaded){if(K4[y]===void 0)K4[y]=X7(i).then((x)=>{let o=x[h];return h5(l,o)});else console.log(`using cached ${l} with signature ${y}`);this.loaded=await K4[y],this.blueprintLoaded(this.loaded)}return this.loaded}}var R7=V0.elementCreator();class y5 extends z{static preferredTagName="tosi-loader";static lightStyleSpec=P0;allLoaded=()=>{};async load(){let l=Array.from(this.querySelectorAll("tosi-blueprint, xin-blueprint")).filter((i)=>i.src).map((i)=>i.packaged());await Promise.all(l),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var $7=y5.elementCreator();class v9 extends V0{static preferredTagName="xin-blueprint";static lightStyleSpec=P0;constructor(){super();h1("xin-blueprint","<xin-blueprint> is deprecated. Use <tosi-blueprint> instead.")}}var Z7=v9.elementCreator();class j9 extends z{static preferredTagName="xin-loader";static lightStyleSpec=P0;allLoaded=()=>{};constructor(){super();h1("xin-loader","<xin-loader> is deprecated. Use <tosi-loader> instead.")}async load(){let l=Array.from(this.querySelectorAll("xin-blueprint")).filter((i)=>i.src).map((i)=>i.packaged());await Promise.all(l),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var b7=j9.elementCreator();var x5={};class w2 extends z{static preferredTagName="tosi-ab";static set conditions(l){Object.assign(x5,l);for(let i of[...w2.instances])i.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?x5[this.condition]!==!0:x5[this.condition]===!0))this.toggleAttribute("hidden",!1);else this.toggleAttribute("hidden",!0)}}var J7=w2.elementCreator();var O0={};function g1(l,i){if(O0[l]===void 0){if(i!==void 0){let y=globalThis[i];O0[l]=Promise.resolve({[i]:y})}let h=f.script({src:l});document.head.append(h),O0[l]=new Promise((y)=>{h.onload=()=>y(globalThis)})}return O0[l]}var o5={};function U0(l){if(o5[l]===void 0){let i=f.link({rel:"stylesheet",type:"text/css",href:l});document.head.append(i),o5[l]=new Promise((h)=>{i.onload=h})}return o5[l]}var M1={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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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> ',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></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>',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>',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>',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>',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>',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>',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>',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>',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>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></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>',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>',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>',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>',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>',facebook:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M464 0h-416c-26 0-48 22-48 48v416c0 26 22 48 48 48h208v-224h-64v-64h64v-32c0-53 43-96 96-96h64v64h-64c-18 0-32 14-32 32v32h96l-16 64h-80v224h144c26 0 48-22 48-48v-416c0-26-22-48-48-48z"></path></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',youtube:'<svg class="filled" version="1" viewBox="0 0 512 512"><g></g><path d="M507 154c0 0-5-35-20-51-20-20-41-21-51-22-72-5-179-5-179-5h-0c0 0-108 0-179 5-10 1-32 1-51 22-15 16-20 51-20 51s-5 41-5 83v39c0 41 5 83 5 83s5 35 20 51c20 20 45 20 57 22 41 4 174 5 174 5s108-0 179-5c10-1 32-1 51-22 15-16 20-51 20-51s5-41 5-83v-39c-0-41-5-83-5-83zM203 322v-144l138 72-138 72z"></path></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',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>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></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>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></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>',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>',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>',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>',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>',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>',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>',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>',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',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> ',cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",toggleLeft:"toggleRight0f",cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",skipBack:"skipForward0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",thumbsDown:"thumbsUp1f",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r"};var H7=(l)=>{Object.assign(M1,l)},s5=(l,i,h,y)=>{let x=l instanceof SVGElement?[l]:Array.from(l.querySelectorAll("svg"));if(x.length>1){let g=l.dataset?.icon||"unknown";console.error(`svg2DataUrl: composite icon "${g}" cannot be serialized as a data URL, rendering base icon only`)}let o=x[0];o.setAttribute("xmlns","http://www.w3.org/2000/svg");for(let g of o.querySelectorAll("path, polygon, line, circle, rect, ellipse, polyline")){if(i!==void 0)g.setAttribute("fill",i);if(h!==void 0)g.setAttribute("stroke",h);if(y!==void 0)g.setAttribute("stroke-width",String(y))}let C=o.querySelectorAll("[style]");o.removeAttribute("style");for(let g of[...C]){let k=g.style;if(k.fill)g.setAttribute("fill",A.fromCss(k.fill).html);if(k.stroke)g.setAttribute("stroke",A.fromCss(k.stroke).html);if(k.strokeWidth)g.setAttribute("strokeWidth",k.strokeWidth);if(k.strokeLinecap)g.setAttribute("strokeLinecap",k.strokeLinecap);if(k.strokeLinejoin)g.setAttribute("strokeLinejoin",k.strokeLinejoin);g.removeAttribute("style")}return`url(data:image/svg+xml;charset=UTF-8,${encodeURIComponent(o.outerHTML)})`},S7=(l)=>/\d$/.test(l)?l+"_":l,g5=[{prefix:/^spin(_?\d+)/,apply(l,i,h){let y=i[1].replace("_","-"),x=360/Math.abs(parseFloat(y)),o=y.startsWith("-")?"reverse":"normal",C=R1(l,[]),s=C;if(s.animate){let g=s.style.transform||"";s.animate([{transform:`${g} rotate(0deg)`},{transform:`${g} rotate(360deg)`}],{duration:x*1000,iterations:1/0,direction:o})}return k5(l,h,C)}},{prefix:"un",apply:(l)=>`slash25o$${l}75s75o`},{prefix:"check",apply:(l)=>`check75o_00aa00S$${l}75s50o`},{prefix:"cancel",apply:(l)=>`x75o_cc0000S$${l}75s50o`},{prefix:"search",apply:(l)=>`search80s30x30y$${l}50o`}],D7=0;function t9(l,i){let h=f.div();h.innerHTML=l;let y=h.querySelector("svg"),x=y.querySelectorAll("[id]");if(x.length>0){let s=new Map;for(let c of x){let d=c.id,n=`tosi_svg_id_${++D7}`;s.set(d,n),c.id=n}let g=y.innerHTML,k=g;for(let[c,d]of s){let n=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");k=k.replace(new RegExp(`url\\(#${n}\\)`,"g"),`url(#${d})`).replace(new RegExp(`href="#${n}"`,"g"),`href="#${d}"`)}if(k!==g)y.innerHTML=k}let o=new Set(y.classList);o.add("tosi-icon");let C=q0.svg({class:Array.from(o).join(" "),viewBox:y.getAttribute("viewBox")},...i,...y.children);if(C.style.strokeWidth=w.tosiIconStrokeWidth("2px"),o.has("filled"))C.style.stroke="none",C.style.fill="currentColor";else if(o.has("stroked"))C.style.stroke=w.tosiIconStroke("currentColor"),C.style.fill="none";else C.style.stroke=w.tosiIconStroke("currentColor"),C.style.fill=w.tosiIconFill("currentColor");return C.style.height=w.tosiIconSize("16px"),C}function k5(l,i,...h){let y=f.span({class:"tosi-icon-composite",dataIcon:l,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...h);for(let x of i)if(x&&typeof x==="object"&&!("nodeType"in x)){let o=x;if(o.style&&typeof o.style==="object")Object.assign(y.style,o.style);if(o.class)y.classList.add(...String(o.class).split(" "))}return y}function I7(l){let i=M1;if(i[l])return!0;let h=C5(l);return h!=null&&!!i[h.baseName]}function A9(l,i){for(let h of g5){let y,x;if(h.prefix instanceof RegExp){let C=new RegExp(h.prefix.source+"(.+)$"),s=l.match(C);if(!s)continue;y=s[s.length-1],y=y[0].toLowerCase()+y.slice(1),x=s}else{if(!l.startsWith(h.prefix)||l.length<=h.prefix.length)continue;y=l[h.prefix.length].toLowerCase()+l.slice(h.prefix.length+1),x=h.prefix}if(!I7(y))continue;let o=h.apply(S7(y),x,i);if(typeof o==="string")return R1(o,i);if(o)return o}return null}var T7=10,u7=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function C5(l){let i=l.match(u7);if(!i)return null;let h=l.slice(0,i.index);if(!h)return null;if(h.endsWith("_"))h=h.slice(0,-1);if(!h)return null;if(!M1[h]){if(!g5.some((g)=>{if(g.prefix instanceof RegExp)return g.prefix.test(h);return h.startsWith(g.prefix)&&h.length>g.prefix.length}))return null}let x={},o=i[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!o)return null;let C=[];for(let s of o){let g=s[s.length-1];if(g==="F"||g==="S"){let k=s.slice(1,-1),d=/^[0-9a-fA-F]{3,8}$/.test(k)?"#"+k:r[k];if(g==="F")x.fill=d;else x.stroke=d}else if(g==="W")x.strokeWidth=s.slice(0,-1);else{let k=parseInt(s.replace("_","-"));switch(g){case"o":x.opacity=String(k/100);break;case"s":C.push(`scale(${k/100})`);break;case"x":C.push(`translateX(${k}%)`);break;case"y":C.push(`translateY(${k}%)`);break;case"r":C.push(`rotate(${k}deg)`);break;case"f":C.push(k===0?"scaleX(-1)":"scaleY(-1)");break}}}if(C.length>0)x.transform=C.join(" "),x.transformOrigin="50% 50%";return{baseName:h,style:x}}function R1(l,i){if(l.endsWith("_"))l=l.slice(0,-1);let h=M1,y=l;for(let C=0;C<T7;C++){let s=h[y];if(!s)break;if(s.startsWith("<"))return t9(s,i);y=s}if(y!==l){let C=A9(y,i);if(C)return C;let s=C5(y);if(s){let g=R1(s.baseName,i);return Object.assign(g.style,s.style),g}}if(l.includes("$")){let C=l.split("$"),s=R1(C[C.length-1],[]),g=C.slice(0,-1).reverse().map((k)=>{let c=R1(k,[]);return Object.assign(c.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),c});return k5(l,i,s,...g)}let x=A9(l,i);if(x)return x;let o=C5(l);if(o){let C=R1(o.baseName,i);return Object.assign(C.style,o.style),C}if(l)console.warn(`icon ${l} does not exist`);return t9(M1.square,i)}var B=new Proxy(M1,{get(l,i){return(...h)=>R1(i,h)}});class c5 extends z{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:w.tosiIconStrokeWidth("2px"),strokeLinejoin:w.tosiIconStrokeLinejoin("round"),strokeLinecap:w.tosiIconStrokeLinecap("round"),fill:w.tosiIconFill("none"),height:r.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:w.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let l={};if(this.size)l.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)l.stroke=this.stroke,l.strokeWidth=this.strokeWidth;if(this.fill)l.fill=this.fill;this.append(B[this.icon]({style:l}))}}var M7=c5.elementCreator();var q9=()=>{};class r5 extends z{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:s5(B.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=f.canvas({part:"canvas"});constructor(){super();this.babylonReady=(async()=>{let{BABYLON:l}=await g1("https://cdn.babylonjs.com/babylon.js","BABYLON");return l})()}scene;engine;sceneCreated=q9;update=q9;_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(l,i,h)=>{let{BABYLON:y}=await g1("https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js","BABYLON");y.SceneLoader.Append(l,i,this.scene,h)};loadUI=async(l)=>{let{BABYLON:i}=await g1("https://cdn.babylonjs.com/gui/babylon.gui.min.js","BABYLON"),h=i.GUI.AdvancedDynamicTexture.CreateFullscreenUI("GUI",!0,this.scene),{snippetId:y,jsonUrl:x,data:o,size:C}=l;if(C)h.idealWidth=C,h.renderAtIdealSize=!0;let s;if(y)s=await h.parseFromSnippetAsync(y);else if(x)s=await h.parseFromURLAsync(x);else if(o)s=h.parseContent(o);else return null;let g=h.getChildren()[0],k=g.children.reduce((c,d)=>{return c[d.name]=d,c},{});return{advancedTexture:h,gui:s,root:g,widgets:k}};connectedCallback(){super.connectedCallback();let{canvas:l}=this.parts;this.babylonReady.then(async(i)=>{if(this.BABYLON=i,this.engine=new i.Engine(l,!0),this.scene=new i.Scene(this.engine),this.sceneCreated)await this.sceneCreated(this,i);if(this.scene.activeCamera===void 0)new i.ArcRotateCamera("default-camera",-Math.PI/2,Math.PI/2.5,3,new i.Vector3(0,0,0)).attachControl(this.parts.canvas,!0);this.engine.runRenderLoop(this._update)})}}var m7=r5.elementCreator();class n2 extends z{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(n2.bodymovinAvailable===void 0)n2.bodymovinAvailable=g1("https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js","bodymovin")}doneLoading=()=>{this._loading=!1};load=({bodymovin:l})=>{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 i=this.shadowRoot;if(i!==null)i.querySelector("svg")?.remove()}this.animation=l.loadAnimation(this.config),this.animation.addEventListener("DOMLoaded",this.doneLoading)};render(){super.render(),n2.bodymovinAvailable.then(this.load).catch((l)=>{console.error(l)})}}var L7=n2.elementCreator();var{button:d5,slot:e7,div:F0}=f;class G0 extends z{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(l){let{scroller:i,back:h,forward:y}=this.parts;if(this.lastPage<=0)y.disabled=h.disabled=!0,l=0;else l=Math.max(0,Math.min(this.lastPage,l)),l=isNaN(l)?0:l;if(this._page!==l)this._page=isNaN(l)?0:l,this.animateScroll(this._page*i.offsetWidth),h.disabled=this.page<=0&&!this.loop,y.disabled=this.page>=this.lastPage&&!this.loop}get visibleItems(){return[...this.children].filter((l)=>getComputedStyle(l).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:r.carouselDotSize,_carouselProgressPadding:12,_carouselDotTransition:"0.125s ease-in-out",display:"flex",flexDirection:"column",position:"relative"},":host:focus":{outline:"none",boxShadow:"none"},":host svg":{height:r.carouselIconSize},":host button":{outline:"none",border:"none",boxShadow:"none",background:"transparent",color:r.carouselButtonColor,padding:0},":host::part(back), :host::part(forward)":{position:"absolute",top:0,bottom:0,width:r.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:r.carouselButtonHoverColor},":host button:active":{color:r.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:r.carouselButtonColor,borderRadius:r.carouselDotSize,height:r.carouselDotSize,width:r.carouselDotSize,transition:r.carouselDotTransition},":host .dot:not(.current):hover":{background:r.carouselButtonHoverColor,height:r.carouselDotSize150,width:r.carouselDotSize150,margin:r.carouselDotSize_25},":host .dot:not(.current):active":{background:r.carouselButtonActiveColor},":host .dot.current":{background:r.carouselDotCurrentColor},":host::part(progress)":{display:"flex",gap:r.carouselDotSpacing,justifyContent:"center",padding:r.carouselProgressPadding}};easing=(l)=>{return Math.sin(l*Math.PI*0.5)};indicateCurrent=()=>{let{scroller:l,progress:i}=this.parts,h=l.scrollLeft/l.offsetWidth;[...i.children].forEach((y,x)=>{y.classList.toggle("current",Math.floor(x/this.maxVisibleItems-h)===0)}),this.lastAutoAdvance=Date.now(),clearTimeout(this.snapTimer),this.snapTimer=setTimeout(this.snapPosition,this.snapDelay*1000)};snapPosition=()=>{let{scroller:l}=this.parts,i=Math.round(l.scrollLeft/l.offsetWidth);if(i!==this.page)this.page=i>this.page?Math.ceil(i):Math.floor(i);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=(l)=>{let{progress:i}=this.parts,h=[...i.children].indexOf(l.target);if(h>-1)this.page=Math.floor(h/this.maxVisibleItems)};snapTimer;animationFrame;animateScroll(l,i=-1,h=0){cancelAnimationFrame(this.animationFrame);let{scroller:y}=this.parts;if(i===-1){i=y.scrollLeft,h=Date.now(),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(l,i,h)});return}let x=(Date.now()-h)/1000;if(x>=this.snapDuration||Math.abs(y.scrollLeft-l)<2)y.scrollLeft=l,this.animationFrame=null;else y.scrollLeft=i+this.easing(x/this.snapDuration)*(l-i),this.animationFrame=requestAnimationFrame(()=>{this.animateScroll(l,i,h)})}content=()=>[F0({part:"pager"},d5({title:"previous slide",part:"back"},B.chevronLeft()),F0({title:"slides",role:"group",part:"scroller"},F0({part:"grid"},e7())),d5({title:"next slide",part:"forward"},B.chevronRight())),F0({title:"choose slide to display",role:"group",part:"progress"})];connectedCallback(){super.connectedCallback(),this.ariaRoleDescription="carousel",this.ariaOrientation="horizontal",this.ariaReadOnly="true";let{back:l,forward:i,scroller:h,progress:y}=this.parts;l.addEventListener("click",this.back),i.addEventListener("click",this.forward),h.addEventListener("scroll",this.indicateCurrent),y.addEventListener("click",this.handleDotClick),this.lastAutoAdvance=Date.now(),this.interval=setInterval(this.autoAdvance,100)}disconnectedCallback(){clearInterval(this.interval)}render(){super.render();let{dots:l,arrows:i,visibleItems:h,lastPage:y}=this,{progress:x,back:o,forward:C,grid:s}=this.parts;h.forEach((g)=>{g.role="group"}),s.style.gridTemplateColumns=`${100/this.maxVisibleItems/(1+this.lastPage)}% `.repeat(h.length).trim(),s.style.width=(1+this.lastPage)*100+"%",x.textContent="",x.append(...h.map((g,k)=>d5({title:`item ${k+1}`,class:"dot"}))),this.indicateCurrent(),x.style.display=l&&y>0?"":"none",o.hidden=C.hidden=!(i&&y>0)}}var E7=G0,_9=G0.elementCreator(),ll=_9;var P9="https://cdnjs.cloudflare.com/ajax/libs/ace/1.23.2/",V9="ace/theme/tomorrow",il=async()=>{let{ace:l}=await g1(`${P9}ace.min.js`);return l},hl=async(l,i="html",h={},y=V9)=>{let x=await il();x.config.set("basePath",P9);let o=x.edit(l,{mode:`ace/mode/${i}`,tabSize:2,useSoftTabs:!0,useWorker:!1,...h});return o.setTheme(y),{ace:x,editor:o}};class m1 extends z{static preferredTagName="tosi-code";source="";get value(){return this.editor===void 0?this.source:this.editor.getValue()}set value(l){if(this.editor===void 0)this.source=l;else this.editor.setValue(l),this.editor.clearSelection(),this.editor.session.getUndoManager().reset()}static initAttributes={mode:"javascript",theme:V9,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=hl(this,this.mode,this.options,this.theme),this._editorPromise.then(({ace:l,editor:i})=>{this._ace=l,this._editor=i,i.setValue(this.source,1),i.clearSelection(),i.session.getUndoManager().reset()})}render(){if(super.render(),this._editorPromise!==void 0)this._editorPromise.then(({editor:l})=>l.setReadOnly(this.disabled))}}var p2=m1.elementCreator();var{input:w5}=f,O9=A.fromCss("#8888");class U9 extends z{static preferredTagName="tosi-color";value=O9.rgba;color=O9;static shadowStyleSpec={":host":{_gap:8,_swatchSize:32,_cssWidth:72,_alphaWidth:72,display:"inline-flex",gap:r.gap,alignItems:"center"},':host input[type="color"]':{border:0,width:r.swatchSize,height:r.swatchSize,background:"transparent"},":host::part(alpha)":{width:r.alphaWidth},":host::part(css)":{width:r.cssWidth,fontFamily:"monospace"}};content=[w5({title:"base color",type:"color",part:"rgb"}),w5({type:"range",title:"opacity",part:"alpha",min:0,max:1,step:0.05}),w5({title:"css color spec",part:"css"})];valueChanged=!1;update=(l)=>{let{rgb:i,alpha:h,css:y}=this.parts;if(l.type==="input")this.color=A.fromCss(i.value),this.color.a=Number(h.value),y.value=this.color.html;else this.color=A.fromCss(y.value),i.value=this.color.html.substring(0,7),h.value=String(this.color.a);i.style.opacity=String(this.color.a),this.value=this.color.rgba,this.valueChanged=!0};connectedCallback(){super.connectedCallback();let{rgb:l,alpha:i,css:h}=this.parts;l.addEventListener("input",this.update),i.addEventListener("input",this.update),h.addEventListener("change",this.update)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{rgb:l,alpha:i,css:h}=this.parts;this.color=A.fromCss(this.value),l.value=this.color.html.substring(0,7),l.style.opacity=String(this.color.a),i.value=String(this.color.a),h.value=this.color.html}}var n5=U9.elementCreator();var $1=f.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),K0={passive:!0},x1=(l,i,h="move")=>{if(!l.type.startsWith("touch")){let{clientX:x,clientY:o}=l;$1.style.cursor=h,Z1($1),document.body.append($1);let C=(s)=>{let g=s.clientX-x,k=s.clientY-o;if(i(g,k,s)===!0)$1.removeEventListener("mousemove",C),$1.removeEventListener("mouseup",C),$1.remove()};$1.addEventListener("mousemove",C,K0),$1.addEventListener("mouseup",C,K0)}else if(l instanceof TouchEvent){let x=l.changedTouches[0],o=x.identifier,C=x.clientX,s=x.clientY,g=l.target,k=0,c=0,d=(n)=>{let v=[...n.touches].find((p)=>p.identifier===o);if(v!==void 0)k=v.clientX-C,c=v.clientY-s;if(n.type==="touchmove")n.stopPropagation(),n.preventDefault();if(i(k,c,n)===!0||v===void 0)g.removeEventListener("touchmove",d),g.removeEventListener("touchend",d),g.removeEventListener("touchcancel",d)};g.addEventListener("touchmove",d),g.addEventListener("touchend",d,K0),g.addEventListener("touchcancel",d,K0)}},L1=(l="body *")=>[...document.querySelectorAll(l)].map((i)=>parseFloat(getComputedStyle(i).zIndex)).reduce((i,h)=>isNaN(i)||Number(i)<h?h:Number(i),0),Z1=(l,i="body *")=>{l.style.zIndex=String(L1(i)+1)};var{slot:yl}=f;class Q1 extends z{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=yl();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(l)=>{if(l instanceof MouseEvent&&l.button!==0)return;if(l.target?.closest(".no-drag"))return;if(this.drag){Z1(this);let h=this.offsetLeft,y=this.offsetTop;x1(l,(x,o,C)=>{if(this.style.left=`${h+x}px`,this.style.top=`${y+o}px`,this.style.right="auto",this.style.bottom="auto",C.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),Q1.floats.add(this);let l={passive:!0};this.addEventListener("touchstart",this.reposition,l),this.addEventListener("mousedown",this.reposition,l),Z1(this)}disconnectedCallback(){super.disconnectedCallback(),Q1.floats.delete(this)}}var xl=Q1,Z2=Q1.elementCreator(),ol=Z2;window.addEventListener("resize",()=>{Array.from(Q1.floats).forEach((l)=>{if(l.remainOnResize==="hide")l.hidden=!0;else if(l.remainOnResize==="remove")l.remove()})},{passive:!0});document.addEventListener("scroll",(l)=>{if(l.target instanceof HTMLElement&&l.target.closest(Q1.tagName))return;Array.from(Q1.floats).forEach((i)=>{if(i.remainOnScroll==="hide")i.hidden=!0;else if(i.remainOnScroll==="remove")i.remove()})},{passive:!0,capture:!0});var b2=(l)=>{let{content:i,target:h,position:y,remainOnScroll:x,remainOnResize:o,draggable:C}=l,s=Array.isArray(i)?Z2(...i):Z2(i);if(F9(s,h,y,x,o,C),l.class)s.setAttribute("class",l.class);return document.body.append(s),s},F9=(l,i,h,y,x,o=!1)=>{{let{position:p}=getComputedStyle(l);if(p!=="fixed")l.style.position="fixed";if(x)l.remainOnResize=x;if(y)l.remainOnScroll=y;Z1(l)}l.drag=o;let{left:C,top:s,width:g,height:k}=i.getBoundingClientRect(),c=C+g*0.5,d=s+k*0.5,n=window.innerWidth,v=window.innerHeight;if(h==="side")h=(c<n*0.5?"e":"w")+(d<v*0.5?"s":"n");else if(h==="auto"||h===void 0)h=(d<v*0.5?"s":"n")+(c<n*0.5?"e":"w");if(l.style.top=l.style.left=l.style.right=l.style.bottom=l.style.transform="",h.length===2){let[p,t]=h;switch(p){case"n":l.style.bottom=(v-s).toFixed(2)+"px";break;case"e":l.style.left=(C+g).toFixed(2)+"px";break;case"s":l.style.top=(s+k).toFixed(2)+"px";break;case"w":l.style.right=(n-C).toFixed(2)+"px";break}switch(t){case"n":l.style.bottom=(v-s-k).toFixed(2)+"px";break;case"e":l.style.left=C.toFixed(2)+"px";break;case"s":l.style.top=s.toFixed(2)+"px";break;case"w":l.style.right=(n-C-g).toFixed(2)+"px";break}l.style.transform=""}else if(h==="n")l.style.bottom=(v-s).toFixed(2)+"px",l.style.left=c.toFixed(2)+"px",l.style.transform="translateX(-50%)";else if(h==="s")l.style.top=(s+k).toFixed(2)+"px",l.style.left=c.toFixed(2)+"px",l.style.transform="translateX(-50%)";else if(h==="e")l.style.left=(C+g).toFixed(2)+"px",l.style.top=d.toFixed(2)+"px",l.style.transform="translateY(-50%)";else if(h==="w")l.style.right=(n-C).toFixed(2)+"px",l.style.top=d.toFixed(2)+"px",l.style.transform="translateY(-50%)";l.style.setProperty("--max-height",`calc(100vh - ${l.style.top||l.style.bottom})`),l.style.setProperty("--max-width",`calc(100vw - ${l.style.left||l.style.right})`)};function a0(l,i=!0){return(h,y)=>{let x=l(h),o=l(y);for(let C in x)if(x[C]!==o[C])return(Array.isArray(i)?i[C]!==!1:i)?x[C]>o[C]?1:-1:x[C]>o[C]?-1:1;return 0}}var{button:Cl,span:G9,input:sl}=f,K9=(l,i)=>{return!!l.find((h)=>{if(h===null||i==null)return!1;else if(Array.isArray(h))return K9(h,i);else if(h.value===i||h===i)return!0})};class t1 extends z{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:r.tosiSelectGap,textAlign:"left",height:r.tosiSelectTouchSize,padding:r.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:r.tosiSelectFieldWidth,padding:r.tosiSelectValuePadding,height:r.tosiSelectTouchSize,lineHeight:r.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(l){if(typeof l==="string")this._options=t1.parseOptionsString(l);else this._options=l;this.queueRender()}static parseOptionsString(l){return l.split(",").map((i)=>{let h=i.trim();if(h==="")return null;let[y,x]=h.split("=").map((s)=>s.trim());if(!x)return{value:y,caption:y};let[o,C]=x.split(":").map((s)=>s.trim());return{value:y,caption:o||y,icon:C||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(l){this.disabled=l}formResetCallback(){this.value=""}setValue=(l,i=!1)=>{if(this.value!==l)this.value=l,this.queueRender(!0);if(i)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(l)=>{if(l===null)return null;let{setValue:i,getValue:h}=this,y,x,o,C,s;if(typeof l==="string")x=o=l;else({icon:y,caption:x,value:o,tooltip:C,properties:s}=l);if(this.localized)x=X(x);let{options:g}=l;if(g)return{icon:y,caption:x,tooltip:C,properties:s,checked:()=>K9(g,h()),menuItems:g.map(this.buildOptionMenuItem)};return{icon:y,caption:x,tooltip:C,properties:s,checked:()=>h()===o,action:typeof o==="function"?async()=>{let k=await o();if(k!==void 0)i(k,!0)}:()=>{if(typeof o==="string")i(o,!0)}}};poppedOptions=[];get optionsMenu(){let l=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return l;let i=(h)=>{if(h===null||typeof h==="function")return!0;else if(h.menuItems){let y=c1(h.menuItems);return h.menuItems=y.filter(i),y.length>0}else return h.caption.toLocaleLowerCase().includes(this.filter)};return l.filter(i)}handleChange=(l)=>{let{value:i}=this.parts,h=i.value||"";if(this.value!==String(h))this.value=h,this.dispatchEvent(new Event("change"));this.filter="",l.stopPropagation(),l.preventDefault()};handleKey=(l)=>{if(l.key==="Enter")l.preventDefault()};filterMenu=k2(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),M(0),this.popOptions()});popOptions=(l)=>{if(l&&l.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),H({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:l}=this.parts;l.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[Cl({type:"button",part:"button",onClick:this.popOptions},G9(),sl({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}),B.chevronDown())];get allOptions(){let l=[];function i(h){for(let y of h)if(typeof y==="string")l.push({caption:y,value:y});else if(y?.value)l.push(y);else if(y?.options)i(y.options)}return i(this.selectOptions),l}findOption(){return this.allOptions.find((i)=>i.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let l=this.getAttribute("options");if(l&&this._options.length===0)this._options=t1.parseOptionsString(l);if(this.localized)Q0.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)Q0.allInstances.delete(this)}render(){super.render();let{value:l,button:i}=this.parts;i.disabled=this.disabled;let h=l.previousElementSibling,y=this.findOption(),x=G9();if(l.value=this.localized?X(y.caption):y.caption,y.icon)if(y.icon instanceof HTMLElement)x=y.icon.cloneNode(!0);else x=B[y.icon]();h.replaceWith(x),l.setAttribute("placeholder",this.localized?X(this.placeholder):this.placeholder),l.style.pointerEvents=this.editable?"":"none",l.readOnly=!this.editable}}var gl=t1,k1=t1.elementCreator(),kl=i1((...l)=>k1(...l),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:a9}=f,{i18n:J}=E({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:a9(),caption:window.navigator.language,value:window.navigator.language}]}});K1.localeOptions={toDOM(l,i){if(l instanceof t1)l.options=i}};var cl=(l)=>{if(J.locales.value.includes(l))J.locale.value=l;else console.error(`language ${l} is not available`)},p5=()=>{let l=Array.from(A1.allInstances);for(let i of l)i.localeChanged()};J.locale.observe(p5);var rl=a0((l)=>[l.caption.toLocaleLowerCase()]);function dl(l){let[i,,h,y,...x]=l.split(`
14
+ `).map((o)=>o.split("\t"));if(i&&h&&y&&x){if(J.locales.value=i,J.languages.value=h,J.emoji.value=y,J.stringMap.value=x.reduce((o,C)=>{return o[C[0].toLocaleLowerCase()]=C,o},{}),J.localeOptions.value=i.map((o,C)=>({icon:a9({title:i[C]},y[C]),caption:h[C],value:o})).sort(rl),!J.locales.value.includes(J.locale.value)){let o=J.locale.value.substring(0,2);J.locale.value=J.locales.value.find((C)=>C.substring(0,2)===o)||J.locales.value[0]}p5()}}function X(l){if(l.endsWith("…"))return X(l.substring(0,l.length-1))+"…";let i=J.locales.value.indexOf(J.locale.value);if(i>-1){let h=Q(J.stringMap),y=l.toLocaleLowerCase(),x=h[y],o=x&&x[i];if((!o||o==='"')&&y.includes("#")){let C=h[y.substring(0,y.indexOf("#"))];o=C&&C[i]}if(o)o=o.split("#",2)[0],l=l.toLocaleLowerCase()===l?o.toLocaleLowerCase():o;else l=l.split("#",2)[0]}else l=l.split("#",2)[0];return l}class W0 extends z{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>{return k1({part:"select",showIcon:!0,title:X("Language"),bindValue:J.locale,bindLocaleOptions:J.localeOptions})};render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var wl=W0,Q9=W0.elementCreator(),nl=Q9;class A1 extends z{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>f.tosiSlot();connectedCallback(){super.connectedCallback(),A1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),A1.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?X(this.refString):""}render(){super.render(),this.localeChanged()}}var Q0=A1,q1=A1.elementCreator(),pl=q1;var W9=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||""),Bl=W9?{meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",escape:"⎋"}:{meta:"Meta",ctrl:"Ctrl",alt:"Alt",shift:"Shift",escape:"Esc"},Y9=(l)=>{if(l.code)return l.code.replace(/^Key|^Digit/,"");return l.key},fl=(l)=>{let i=[];if(l.altKey)i.push("alt");if(l.ctrlKey)i.push("ctrl");if(l.metaKey)i.push("meta");if(l.shiftKey)i.push("shift");return i.push(Y9(l)),i.join("-")},zl=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],Y0=(l)=>{let i=l.trim(),h={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[y,x]of zl)if(y.test(i))h[x]=!0,i=i.replace(y,"");return i=i.replace(/^-+/,""),h.key=i.toLowerCase(),h},B5=(l,i)=>{let h=Y0(i);return l.key.toLowerCase()===h.key&&l.metaKey===h.metaKey&&l.ctrlKey===h.ctrlKey&&l.altKey===h.altKey&&l.shiftKey===h.shiftKey},vl=(l)=>{let i=Y0(l),h=[];if(i.altKey)h.push("alt");if(i.ctrlKey)h.push("ctrl");if(i.metaKey)h.push("meta");if(i.shiftKey)h.push("shift");return h.push(i.key),h.join("-")},N0=(l)=>{let i=Y0(l);if(W9){let y=[];if(i.ctrlKey)y.push("⌃");if(i.altKey)y.push("⌥");if(i.shiftKey)y.push("⇧");if(i.metaKey)y.push("⌘");return y.push(i.key.toUpperCase()),y.join("")}let h=[];if(i.ctrlKey)h.push("Ctrl");if(i.altKey)h.push("Alt");if(i.shiftKey)h.push("Shift");if(i.metaKey)h.push("Meta");return h.push(i.key.toUpperCase()),h.join("+")};var R0={};A4(R0,{stringToTypes:()=>f2,isTypeAllowed:()=>z2,init:()=>v5,draggedElement:()=>_l});var jl=()=>!!document.querySelector(".drag-source"),z2=(l,i)=>{if(!l)return!1;for(let h of l)if(h==="special/any")return!0;else if(h.indexOf("*")>-1){let[y,x]=h.split("/"),[o,C]=i.split("/");if((y==="*"||y===o)&&(x==="*"||x===C))return!0}else if(h===i)return!0},X0=(l)=>{for(let i of[...document.querySelectorAll(`.${l}`)])i.classList.remove(l)},R9=()=>{if(B2)B2.disconnect(),B2=null;f5=[],X0("drag-over"),X0("drag-source"),X0("drag-target")},f2=(l,i=";")=>{return(l||"").split(i).map((h)=>h.trim()).filter((h)=>h!=="")},f5=[],B2=null,z5=(l)=>{if(!l)l=[];f5=l;let i=[...document.querySelectorAll("[data-drop]")];for(let h of i){let y=f2(h.dataset.drop);if(l.find((x)=>z2(y,x)))h.classList.add("drag-target");else h.classList.remove("drag-target")}if(!B2)B2=new MutationObserver(()=>z5(f5)),B2.observe(document.body,{childList:!0,subtree:!0})};function tl(l){let i=l.target?.closest('[draggable="true"],a[href]');if(!i)return;i.classList.add("drag-source");let h=i.matches('[draggable="true"]')?f2(i.dataset.drag||"text/html"):f2(i.dataset.drag||"url");for(let y of h){let x=i.dataset.dragContent||(y==="text/html"?i.innerHTML:i.textContent);l.dataTransfer?.setData(y,x||"")}z5(l.dataTransfer?.types),l.stopPropagation()}function N9(l){if(!jl())z5(l.dataTransfer?.types);let i=l.target.closest(".drag-target");if(i&&l.dataTransfer)i.classList.add("drag-over"),l.dataTransfer.dropEffect="copy";else l.preventDefault(),l.stopPropagation()}function Al(){X0("drag-over")}function ql(l){let i=l.target.closest(".drag-target");if(i){let h=(i.dataset?.drop||"").split(";");for(let y of h)if(z2(l.dataTransfer?.types,y))if(y==="text/html")i.innerHTML=l.dataTransfer?.getData(y)||"";else i.textContent=l.dataTransfer?.getData(y)||""}R9()}var _l=()=>document.querySelector(".drag-source"),X9=!1,v5=()=>{if(X9)return;document.body.addEventListener("dragstart",tl),document.body.addEventListener("dragenter",N9),document.body.addEventListener("dragover",N9),document.body.addEventListener("drop",ql),document.body.addEventListener("dragleave",Al),document.body.addEventListener("dragend",R9),window.addEventListener("dragover",(l)=>l.preventDefault()),window.addEventListener("drop",(l)=>l.preventDefault()),X9=!0};var c1=(l)=>typeof l==="function"?l():l,{div:$9,button:S2,span:S,a:Pl,tosiSlot:Vl}=f,J9=(l)=>{let i=[];for(let h of l)if(h===null){if(i.length>0&&i[i.length-1]!==null)i.push(h)}else i.push(h);while(i.length>0&&i[i.length-1]===null)i.pop();return i},H2=(l,i,h=!1)=>{let y=[];for(let x of l){if(x===null){y.push(x);continue}if(typeof x==="function"){y.push(x);continue}let{acceptsDrop:o}=x;if(!o){if(!h)y.push({...x,enabled:()=>!1});continue}if(!i.some((g)=>z2(o,g))){if(!h)y.push({...x,enabled:()=>!1});continue}let s=x;if(s.menuItems){let g=H2(c1(s.menuItems),i,!0);if(g.length>0||s.dropAction){let k=h?g:H2(c1(s.menuItems),i,!1);y.push({...s,menuItems:k})}else if(!h)y.push({...s,enabled:()=>!1})}else y.push(x)}return J9(y)},j5=(l,i=!1)=>{let h=[];for(let y of l){if(y===null){h.push(y);continue}if(typeof y==="function"){h.push(y);continue}let{action:x,menuItems:o}=y;if(x||o)if(o){let C=j5(c1(o),!0);if(C.length>0){let s=i?C:j5(c1(o),!1);h.push({...y,menuItems:s})}else if(!i)h.push({...y,enabled:()=>!1})}else h.push(y);else if(!i)h.push({...y,enabled:()=>!1})}return J9(h)},Ol={overflow:"hidden auto",maxHeight:`calc(${r.maxHeight} - ${w.menuInset("8px")})`,borderRadius:r.spacing50,background:w.menuBg("#fafafa"),boxShadow:w.menuShadow(`${r.spacing13} ${r.spacing50} ${r.spacing} #0004`)},Ul={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr 30px",width:"100%",gap:0,background:"transparent",padding:w.menuItemPadding("0 8px"),height:w.menuItemHeight("48px"),lineHeight:w.menuItemHeight("48px"),textAlign:"left"},Fl={color:w.menuItemColor("#222")},Gl={boxShadow:"none !important",background:w.menuItemHoverBg("#eee")},Z9={boxShadow:"none !important",background:w.menuItemActiveBg("#aaa"),color:w.menuItemActiveColor("#000")},Kl={background:`${w.menuDropOverBg("#2196F3")} !important`,color:`${w.menuDropOverColor("#fff")} !important`},al={color:`${w.menuDropOverColor("#fff")} !important`},Ql={stroke:`${w.menuDropOverColor("#fff")} !important`},b9={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${w.menuDropOverBg("#2196F3")} 50%, transparent) !important`};a1("xin-menu-helper",{".xin-menu, .tosi-menu":Ol,".xin-menu > div, .tosi-menu > div":{width:w.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:w.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:w.menuSeparatorColor("#2224"),margin:w.menuSeparatorMargin("8px 0")},".xin-menu-element, .tosi-menu-element":{minHeight:w.menuItemHeight("48px")},".xin-menu-item, .tosi-menu-item":Ul,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":Fl,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr 30px",gap:w.menuItemGap("8px")},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:w.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:w.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":Gl,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":b9,".xin-menu-item:active, .tosi-menu-item:active":Z9,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:w.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":Z9,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:w.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":Kl,".xin-drop-over > span, .tosi-drop-over > span":al,".xin-drop-over svg, .tosi-drop-over svg":Ql,".drag-target":b9});var H9=(l,i)=>{let h=l.checked&&l.checked()&&"check"||!1,y=l?.icon||h||S(" ");if(typeof y==="string")y=B[y]();let x=i.role==="listbox"?"option":"menuitem",o,C=l.properties||{};if(typeof l?.action==="string")o=Pl(C,{role:x,href:l.action},y,i.localized?S(X(l.caption)):S(l.caption),S(l.shortcut?N0(l.shortcut):" "));else o=S2(C,{role:x,onClick:l.action},y,i.localized?S(X(l.caption)):S(l.caption),S(l.shortcut?N0(l.shortcut):" "));if(o.classList.add("xin-menu-item","tosi-menu-item"),o.classList.toggle("xin-menu-item-checked",h!==!1),o.classList.toggle("tosi-menu-item-checked",h!==!1),l.tooltip)o.dataset.tooltip=l.tooltip;if(i.role==="listbox"&&h)o.setAttribute("aria-selected","true");if(l?.enabled&&!l.enabled())o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true");return o},S9=(l,i)=>{let h=l?.icon||S(" ");if(typeof h==="string")h=B[h]();let y=l.properties||{},x=S2(y,{onDragenter(o){j2(),x.classList.add("xin-drop-over","tosi-drop-over"),o.preventDefault()},onDragover(o){if(o.preventDefault(),o.dataTransfer)o.dataTransfer.dropEffect="copy"},onDragleave(o){let C=o.relatedTarget;if(C&&x.contains(C))return;x.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(o){if(o.preventDefault(),o.stopPropagation(),x.classList.remove("xin-drop-over","tosi-drop-over"),l.dropAction&&o.dataTransfer)l.dropAction(o.dataTransfer);M(0)}},h,i.localized?S(X(l.caption)):S(l.caption),S(" "));if(x.classList.add("xin-menu-item","tosi-menu-item"),l.tooltip)x.dataset.tooltip=l.tooltip;if(l.dropAction&&l.acceptsDrop)x.dataset.drop=l.acceptsDrop.join(";");if(l?.enabled&&!l.enabled())x.setAttribute("disabled",""),x.setAttribute("aria-disabled","true");return x},t5=(l,i)=>{let h=l.checked&&l.checked()&&"check"||!1,y=l?.icon||h||S(" ");if(typeof y==="string")y=B[y]();let x=null,o=!1,C=l.properties||{},s=S2(C,{disabled:!(!l.enabled||l.enabled()),onClick(g){if(i._dropMode)return;H(Object.assign({},i,{menuItems:c1(l.menuItems),target:s,submenuDepth:(i.submenuDepth||0)+1,position:"side"})),g.stopPropagation(),g.preventDefault()},onDragenter(g){if(!i._dropMode)return;j2(),g.preventDefault(),g.stopPropagation();let k=g.relatedTarget;if(k&&s.contains(k))return;if(s.classList.add("xin-drop-over","tosi-drop-over"),o){if(M((i.submenuDepth||0)+1),o=!1,x)clearTimeout(x);x=null;return}if(x)clearTimeout(x);x=setTimeout(()=>{o=!0;let c=c1(l.menuItems),d=i._dataTypes?H2(c,i._dataTypes,i.hideDisabled):c;if(d.length>0)H(Object.assign({},i,{menuItems:d,target:s,submenuDepth:(i.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:i._dataTypes}))},i.disclosureDelay??200)},onDragover(g){if(!i._dropMode)return;if(g.preventDefault(),g.stopPropagation(),g.dataTransfer)g.dataTransfer.dropEffect=l.dropAction?"copy":"link"},onDragleave(g){if(!i._dropMode)return;let k=g.relatedTarget;if(k&&s.contains(k))return;if(o&&k&&m.some((c)=>c.menu.contains(k)||c.target.contains(k)))return;if(s.classList.remove("xin-drop-over","tosi-drop-over"),x)clearTimeout(x),x=null},onDrop(g){if(!i._dropMode||!l.dropAction)return;if(g.preventDefault(),g.stopPropagation(),s.classList.remove("xin-drop-over","tosi-drop-over"),g.dataTransfer)l.dropAction(g.dataTransfer);M(0)}},y,i.localized?S(X(l.caption)):S(l.caption),B.chevronRight({style:{justifySelf:"flex-end"}}));if(s.classList.add("xin-menu-item","tosi-menu-item"),l.tooltip)s.dataset.tooltip=l.tooltip;if(i._dropMode&&l.dropAction&&l.acceptsDrop)s.dataset.drop=l.acceptsDrop.join(";");return s},D9=(l,i)=>{if(l===null)return S({class:"xin-menu-separator tosi-menu-separator"});else if(typeof l==="function"){let h=l();return h.classList.add("xin-menu-element","tosi-menu-element"),h}else if(i._dropMode){let h=l;if(h.menuItems&&c1(h.menuItems).length>0)return t5(h,i);else if(l.dropAction)return S9(l,i);else{let x=l?.icon||S(" ");if(typeof x==="string")x=B[x]();return S2({class:"xin-menu-item tosi-menu-item",disabled:!0},x,i.localized?S(X(l.caption)):S(l.caption),S(" "))}}else{let h=l?.action?H9(l,i):t5(l,i);if(i.showChecked&&l.checked&&l.checked())requestAnimationFrame(()=>{h.scrollIntoView({block:"center"})});return h}},I9=(l)=>{let{target:i,width:h,menuItems:y,role:x="menu"}=l,o=y.find((g)=>g!=null&&typeof g!=="function"&&(g.icon||g.checked)),C=l.submenuDepth||0,s=$9({class:o?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:x,onClick(){if(!l._dropMode)M(0)},onDragover(g){if(!l._dropMode)return;g.preventDefault()},onDragenter(){if(!l._dropMode)return;j2()},onDragleave(g){if(!l._dropMode)return;let k=g.relatedTarget;if(k&&s.contains(k))return;if(k&&m.some((c)=>c.menu.contains(k)||c.target.contains(k)))return;T9(C)}},$9({style:{minWidth:i.offsetWidth+"px",width:typeof h==="number"?`${h}px`:h},onMousedown(g){g.preventDefault(),g.stopPropagation()}},...y.map((g)=>D9(g,l))));return s},v2,m=[],J2=null,j2=()=>{if(J2)clearTimeout(J2),J2=null},T9=(l)=>{j2(),J2=setTimeout(()=>{J2=null,M(l)},500)},M=(l=0)=>{if(j2(),l===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 i=m.splice(l);for(let h of i)if(h.menu.remove(),h.onClose)h.onClose();return v2=i[0],l>0?m[l-1]:void 0};document.addEventListener("mousedown",(l)=>{if(m.length===0)return;let i=l.composedPath();if(!m.find((h)=>i.includes(h.target)||i.includes(h.menu)))M(0)});document.body.addEventListener("keydown",(l)=>{if(l.key==="Escape")M(0)});var H=(l)=>{l=Object.assign({submenuDepth:0},l);let{target:i,position:h,submenuDepth:y}=l;if(v2&&!document.body.contains(v2?.menu))v2=void 0;if(m.length&&!document.body.contains(m[0].menu))m.splice(0);if(l._dropMode){if(m.length>y&&m[y]?.target===i)return;M(y)}else{if(y===0&&v2?.target===i)return;let C=M(y);if(v2?.target===i)return;if(C&&C.target===i){M();return}}if(!l.menuItems?.length)return;let x=I9(l),o=b2({content:x,target:i,position:h});o.remainOnScroll=l._dropMode?"remain":"remove",m.push({target:i,menu:o,onClose:l.onClose})},u9=(l)=>{let{dataTypes:i,...h}=l,y=H2(l.menuItems,i,l.hideDisabled);if(!y.length)return;H({...h,menuItems:y,_dropMode:!0,_dataTypes:i})};function A5(l,i,h=[]){for(let y of l){if(!y)continue;if(typeof y==="function")continue;let{shortcut:x}=y,{menuItems:o}=y;if(x){if(B5(i,x)){let C=y;if(C.enabled&&!C.enabled())return;if(h.some((s)=>s.enabled&&!s.enabled()))return;return{action:C,path:h}}}else if(o){let C=A5(c1(o),i,[...h,y]);if(C)return C}}return}class $0 extends z{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:r.touchSize,minHeight:r.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:w.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(l){if(!this.acceptsDrop)return!1;let i=f2(this.acceptsDrop);return[...l.dataTransfer?.types||[]].some((y)=>i.some((x)=>z2([x],y)))}showMenu=(l)=>{if(l.type==="click"||l.code==="Space")H({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),l.stopPropagation(),l.preventDefault()};handleDragEnter=(l)=>{if(this._dragMatches=this._matchesDrag(l),!this._dragMatches)return;j2(),this.classList.add("xin-drop-over","tosi-drop-over");let i=[...l.dataTransfer?.types||[]];if(this.menuItems.length)u9({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:i,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});l.preventDefault()};handleDragOver=(l)=>{if(!this._dragMatches)return;if(l.preventDefault(),l.dataTransfer)l.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(l)=>{if(!this._dragMatches)return;let i=l.relatedTarget;if(i&&this.contains(i))return;if(i&&m.some((h)=>h.menu.contains(i)||h.target.contains(i))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),T9(0)};handleDrop=(l)=>{if(!this._dragMatches||!this.dropAction)return;if(l.preventDefault(),l.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),l.dataTransfer)this.dropAction(l.dataTransfer);M(0)};content=()=>S2({tabindex:0,part:"trigger",onClick:this.showMenu},Vl());handleShortcut=async(l)=>{let i=A5(this.menuItems,l);if(!i)return;l.preventDefault(),l.stopImmediatePropagation();let{action:h,path:y}=i;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(y,h);if(h.action instanceof Function)h.action()};findMenuItemByCaption(l,i){for(let h of l.querySelectorAll(".xin-menu-item")){let y=h.children[1];if(y&&y.textContent===i)return h}return null}async animateShortcut(l,i){M(0),H({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((y)=>setTimeout(y,80));for(let y=0;y<l.length;y++){let x=y+1,o=m[y]?.menu;if(!o)break;let C=this.findMenuItemByCaption(o,l[y].caption);if(!C)break;H({target:C,width:this.menuWidth,localized:this.localized,menuItems:c1(l[y].menuItems),submenuDepth:x,position:"side"}),await new Promise((s)=>setTimeout(s,80))}let h=m[m.length-1]?.menu;if(h){let y=this.findMenuItemByCaption(h,i.caption);if(y)y.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((y)=>setTimeout(y,300)),M(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(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var M9=$0.elementCreator(),Wl=M9,Yl=$0;function Nl(l,i,h){let y=l.find((x)=>x[i]!==void 0&&x[i]!==null);if(y!==void 0){let x=y[i];switch(typeof x){case"string":if(x.match(/^\d+(\.\d+)?$/))return 6*h;else if(x.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:D2,span:q5,button:Xl}=f,m9=(l)=>l;class Z0 extends z{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:w.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:r.tosiTableGridColumns,width:r.tosiTableGridRowWidth,height:r.tosiTableRowHeight,background:w.tosiTableBg("var(--tosi-bg, #fff)")},":host .thead .tr":{position:"sticky",top:"0",zIndex:"2",background:w.tosiTableHeaderBg(w.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:r.tosiTableRowHeight,lineHeight:r.tosiTableRowHeight},":host .col-pinned":{position:"sticky",zIndex:"1",background:w.tosiTableBg("var(--tosi-bg, #fff)")},":host .th.col-pinned":{zIndex:"3",background:w.tosiTableHeaderBg(w.tosiTableBg("var(--tosi-bg, #fff)"))},':host .tr[aria-selected="true"] .td':{background:w.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:r.tosiTableTouchSize,height:r.tosiTableTouchSize,width:r.tosiTableTouchSize},':host [draggable="true"]':{cursor:"ew-resize"},':host [draggable="true"]:active':{background:r.tosiTableDraggedHeaderBg,color:r.tosiTableDraggedHeaderColor},":host .drag-over":{background:r.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=(l,i)=>{if(i==null)return;l.toggleAttribute("aria-selected",i[this.selectedKey]===!0)};maxVisibleRows=1e4;_head=null;_scrollArea=null;_tbodyTop=null;_tbodyBottom=null;_pinnedRowEdgeObserver=null;_rowCellsCache=new WeakMap;itemFor(l){return u1(l)}cellsFor(l){let i=Q(l);for(let h of[this._tbodyTop,this._scrollArea,this._tbodyBottom]){if(!h)continue;let y=r2(h);if(!y)continue;let x=y.itemToElement.get(i);if(x&&x.length>0){let o=x[0],C=this._rowCellsCache.get(o);if(!C)C=Array.from(o.children),this._rowCellsCache.set(o,C);return C}}return}get value(){return{array:this.array,filter:this.filter,columns:this.columns}}set value(l){let{array:i,columns:h,filter:y}=Q(l);if(this._array!==i||this._columns!==h||this._filter!==y)this.queueRender();this._array=i||[],this._columns=h||null,this._filter=y||m9}rowData={visible:[],pinnedTopData:[],pinnedBottomData:[]};_array=[];_columns=null;_filter=m9;_sort;_pinnedTopRows;_pinnedBottomRows;get pinnedTopRows(){return this._pinnedTopRows}set pinnedTopRows(l){this._pinnedTopRows=l?Q(l):void 0,this.queueRender()}get pinnedBottomRows(){return this._pinnedBottomRows}set pinnedBottomRows(l){this._pinnedBottomRows=l?Q(l):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(l){this._array=Q(l),this.queueRender()}get filter(){return this._filter}set filter(l){if(this._filter!==l)this._filter=l,this.queueRender()}get sort(){if(this._sort)return this._sort;let l=this._columns?.find((h)=>h.sort==="ascending"||h.sort==="descending");if(!l)return;let{prop:i}=l;return l.sort==="ascending"?(h,y)=>h[i]>y[i]?1:-1:(h,y)=>h[i]>y[i]?-1:1}set sort(l){if(this._sort!==l)this._sort=l,this.queueRender()}get columns(){if(!Array.isArray(this._columns)){let{_array:l}=this;this._columns=Object.keys(l[0]||{}).map((i)=>{let h=Nl(l,i,this.charWidth);return{name:i.replace(/([a-z])([A-Z])/g,"$1 $2").toLocaleLowerCase(),prop:i,align:typeof l[0][i]==="number"||l[0][i]!==""&&!isNaN(l[0][i])?"right":"left",visible:h!==!1,width:h?h:0}})}return this._columns}set columns(l){this._columns=l,this.queueRender()}get visibleColumns(){let l=this.columns.filter((x)=>x.visible!==!1),i=l.filter((x)=>x.pinned==="left"),h=l.filter((x)=>!x.pinned),y=l.filter((x)=>x.pinned==="right");return[...i,...h,...y]}get pinnedLeft(){return this.visibleColumns.filter((l)=>l.pinned==="left").length}set pinnedLeft(l){let i=this.columns.filter((h)=>h.visible!==!1);for(let h of i)if(h.pinned==="left")delete h.pinned;for(let h=0;h<l&&h<i.length;h++)i[h].pinned="left";this.queueRender()}get pinnedRight(){return this.visibleColumns.filter((l)=>l.pinned==="right").length}set pinnedRight(l){let i=this.columns.filter((h)=>h.visible!==!1);for(let h of i)if(h.pinned==="right")delete h.pinned;for(let h=i.length-l;h<i.length;h++)if(h>=0)i[h].pinned="right";this.queueRender()}content=null;computeStickyInfo(l){let i=l.map(()=>({})),h=0,y=-1;for(let C=0;C<l.length;C++){if(l[C].pinned!=="left")break;i[C].left=h+"px",h+=l[C].width,y=C}if(y>=0)i[y].edgeClass="col-edge-right";let x=0,o=l.length;for(let C=l.length-1;C>=0;C--){if(l[C].pinned!=="right")break;i[C].right=x+"px",x+=l[C].width,o=C}if(o<l.length)i[o].edgeClass="col-edge-left";return i}cellClasses(l,i){let h=l;if(i.left!=null||i.right!=null)h+=" col-pinned";if(i.edgeClass)h+=" "+i.edgeClass;return h}rowClasses(l){return l==="visible"?"tr":"tr row-pinned"}tagPinnedRows=()=>{this.tagPinnedTbody(this._tbodyTop,"top"),this.tagPinnedTbody(this._tbodyBottom,"bottom")};tagPinnedTbody(l,i){if(!l)return;let h=Array.from(l.querySelectorAll(".tr"));if(h.length===0)return;let y=h.length-1,x=i==="top"?"row-edge-bottom":"row-edge-top";h.forEach((C,s)=>{C.classList.remove(x);let g=i==="top"?s+1:y-s;C.style[i]=`calc(var(--tosi-table-row-height) * ${g})`}),(i==="top"?h[y]:h[0]).classList.add(x)}cellStyle(l,i,h){let y={justifyContent:l.align||"left",...h};if(i.left!=null)y.left=i.left;if(i.right!=null)y.right=i.right;return y}applyGridCellAttrs(l,i,h,y){l.setAttribute("aria-colindex",String(i+1)),l.tabIndex=-1,l.classList.add(...this.cellClasses("td",h).split(" ")),Object.assign(l.style,y)}buildCell(l,i,h,y){let x=this.cellStyle(l,h);if(l.dataCell!==void 0){let o=l.dataCell(l);return this.applyGridCellAttrs(o,i,h,x),o}return q5({class:this.cellClasses("td",h),role:"gridcell",tabindex:-1,ariaColindex:String(i+1),style:x,bindText:y[l.prop]})}buildRow(l,i,h,y="tr"){let x=i.map((g,k)=>this.buildCell(g,k,h[k],l)),o=this.selectBinding,C=this,s={class:y};return s.bind={value:l,binding:{toDOM:(g,k)=>{o(g,k);let c=C.rowRendered;if(c)c(k,Array.from(g.children))}}},D2(s,...x)}buildHeaderCell(l,i,h){let{popColumnMenu:y}=this,x="none",o;switch(l.sort){case"ascending":o=B.sortAscending(),x="descending";break;case"descending":x="ascending",o=B.sortDescending();break}let C=!(this.nosort&&this.nohide)?Xl({class:"menu-trigger",onClick(g){y(g.target,l),g.stopPropagation()}},o||B.moreVertical()):{},s=l.headerCell!==void 0?l.headerCell(l):q5({class:this.cellClasses("th",h),role:"columnheader",tabindex:-1,ariaSort:x,ariaColindex:String(i+1),style:this.cellStyle(l,h)},this.captionSpan({style:{flex:"1"}},typeof l.name==="string"?l.name:l.prop),C);if(l.headerCell!==void 0)this.applyGridCellAttrs(s,i,h,this.cellStyle(l,h)),s.classList.remove("td"),s.classList.add("th"),s.setAttribute("role","columnheader");if(!this.noreorder&&s.children[0]){v5();let g=this.instanceId+"-column-header",k=s.children[0];k.setAttribute("draggable","true"),k.style.pointerEvents="all",k.dataset.drag=g,s.dataset.drop=g,k.addEventListener("dragstart",()=>{this.draggedColumn=l}),s.addEventListener("drop",this.dropColumn)}return s}buildHeader(l,i){let h=l.map((y,x)=>this.buildHeaderCell(y,x,i[x]));return D2({class:"thead",role:"rowgroup"},D2({class:"tr",role:"row"},...h))}buildPinnedBody(l,i,h,y,x){let o=this.rowClasses(y),C=l.listBinding((s,g)=>this.buildRow(g,i,h,o),{});return D2({class:`tbody tbody-${y}`,role:"rowgroup",part:x},...C)}getColumn(l){if(!this._scrollArea)return;let i=(l.touches!==void 0?l.touches[0].clientX:l.clientX)-this._scrollArea.getBoundingClientRect().x,h=l.touches!==void 0?20:5,{scrollLeft:y,clientWidth:x,scrollWidth:o}=this._scrollArea,C=this.visibleColumns,s=o-x-y,g=0;return C.find((k,c)=>{if(k.visible===!1)return!1;g+=k.width;let d;if(k.pinned==="left")d=g;else if(k.pinned==="right")d=g-y-s;else d=g-y;return Math.abs(i-d)<h})}setCursor=(l)=>{let i=this.getColumn(l);this.style.cursor=i!==void 0?"col-resize":""};resizeColumn=(l)=>{let i=this.getColumn(l);if(i!==void 0){let h=Number(i.width),y=l.touches!==void 0,x=y?l.touches[0].identifier:void 0;x1(l,(o,C,s)=>{if((y?[...s.touches].find((c)=>c.identifier===x):!0)===void 0)return!0;let k=h+o;if(i.width=k>this.minColumnWidth?k:this.minColumnWidth,this.setColumnWidths(),s.type==="mouseup")return!0},"col-resize")}};selectRow(l,i=!0){if(i)l[this.selectedKey]=!0;else delete l[this.selectedKey];this.updateSelectionVisuals()}selectRows(l,i=!0){for(let h of l||this.array)if(i)h[this.selectedKey]=!0;else delete h[this.selectedKey];this.updateSelectionVisuals()}deSelect(l){this.selectRows(l,!1)}updateSelectionVisuals(){let l=this._scrollArea?.querySelectorAll(".tr")??[];for(let i of l){let h=this.itemFor(i);if(h!=null)this.selectBinding(i,h)}}rangeStart;updateSelection=(l)=>{if(!this.select&&!this.multiple)return;let{target:i}=l;if(!(i instanceof HTMLElement))return;let h=this.itemFor(i);if(h==null)return;let y=l,x=window.getSelection();if(x!==null)x.removeAllRanges();let o=this.visibleRows;if(this.multiple&&y.shiftKey&&o.length>0&&this.rangeStart!==h){let C=this.rangeStart===void 0||this.rangeStart[this.selectedKey]===!0,[s,g]=[this.rangeStart!==void 0?o.indexOf(this.rangeStart):0,o.indexOf(h)].sort((k,c)=>k-c);if(s>-1)for(let k=s;k<=g;k++){let c=o[k];this.selectRow(c,C)}}else if(this.multiple&&y.metaKey){this.selectRow(h,!h[this.selectedKey]);let C=o.indexOf(h),s=o[C+1],g=C>0?o[C-1]:void 0;if(s!==void 0&&s[this.selectedKey]===!0)this.rangeStart=s;else if(g!==void 0&&g[this.selectedKey]===!0)this.rangeStart=g;else this.rangeStart=void 0}else this.rangeStart=h,this.deSelect(),this.selectRow(h,!0);this.selectionChanged(this.visibleSelectedRows),this.updateSelectionVisuals()};findCell(l,i){if(l===-1)return this.querySelector(`.thead .th[aria-colindex="${i+1}"]`);let h=this.effectivePinnedTopData,y=this.visibleRows,x=this.effectivePinnedBottomData,o;if(l<h.length)o=h[l];else if(l<h.length+y.length)o=y[l-h.length];else if(l<h.length+y.length+x.length)o=x[l-h.length-y.length];else return null;return this.cellsFor(o)?.[i]??null}_pendingFocus=null;onScrollEnd=()=>{if(!this._pendingFocus)return;let{row:l,col:i}=this._pendingFocus;this._pendingFocus=null;let h=this.findCell(l,i);if(h)h.focus()};focusCell(l,i){this._pendingFocus={row:l,col:i};let h=this.findCell(l,i);if(h)h.focus(),h.scrollIntoView({block:"nearest",inline:"nearest"});else if(this._scrollArea){let y=this.effectivePinnedTopData,x=l-y.length;if(x>=0&&x<this.visibleRows.length)this._scrollArea.scrollTop=x*this.rowHeight}}handleKeyNav=(l)=>{let i=l.target,h=i.closest(".td")||i.closest(".th");if(!h)return;let y=parseInt(h.getAttribute("aria-colindex")||"",10);if(isNaN(y))return;let x=y-1,o=this.visibleColumns.length,C=this.effectivePinnedTopData,s=this.visibleRows,g=this.effectivePinnedBottomData,k=C.length+s.length+g.length,c=l.metaKey||l.ctrlKey,d=h.classList.contains("th"),n;if(d)n=-1;else{let t=h.closest(".tr");if(!t)return;let _=u1(t);if(_==null)return;let P=C.indexOf(_),V=P===-1?s.indexOf(_):-1,K=P===-1&&V===-1?g.indexOf(_):-1;if(P!==-1)n=P;else if(V!==-1)n=C.length+V;else if(K!==-1)n=C.length+s.length+K;else return}let v=n,p=x;switch(l.key){case"ArrowUp":v=c?0:Math.max(-1,n-1);break;case"ArrowDown":v=c?k-1:Math.min(k-1,n+1);break;case"ArrowLeft":p=c?0:Math.max(0,x-1);break;case"ArrowRight":p=c?o-1:Math.min(o-1,x+1);break;case"Tab":if(l.shiftKey)if(x>0)p=x-1;else if(n>0)v=n-1,p=o-1;else return;else if(x<o-1)p=x+1;else if(n<k-1)v=n+1,p=0;else return;break;case"Home":if(c)v=0,p=0;else p=0;break;case"End":if(c)v=k-1,p=o-1;else p=o-1;break;default:return}if(v!==n||p!==x)l.preventDefault(),this.focusCell(v,p)};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 l=this.visibleColumns,i=l.map((x)=>x.width+"px").join(" "),h=l.reduce((x,o)=>x+o.width,0)+"px";this.style.setProperty("--tosi-table-grid-columns",i),this.style.setProperty("--tosi-table-grid-row-width",h),this.style.setProperty("--grid-columns",i),this.style.setProperty("--grid-row-width",h);let y=this.computeStickyInfo(l);for(let x of this.querySelectorAll(".col-pinned")){let o=parseInt(x.getAttribute("aria-colindex")||"",10)-1;if(!isNaN(o)&&y[o]){let C=y[o];if(C.left!=null)x.style.left=C.left;if(C.right!=null)x.style.right=C.right}}}sortByColumn=(l,i="auto")=>{for(let h of this.columns.filter((y)=>Q(y.sort)!==!1))if(Q(h)===l){if(i==="auto")h.sort=h.sort==="ascending"?"descending":"ascending";else h.sort=i;this.queueRender()}else delete h.sort};popColumnMenu=(l,i)=>{let{sortByColumn:h}=this,y=this.columns.filter((s)=>s.visible===!1),x=this.queueRender.bind(this),o=[];if(!this.nosort&&i.sort!==!1)o.push({caption:this.localized?`${X("Sort")} ${X("Ascending")}`:"Sort Ascending",icon:"sortAscending",action(){h(i)}},{caption:this.localized?`${X("Sort")} ${X("Descending")}`:"Sort Descending",icon:"sortDescending",action(){h(i,"descending")}});if(!this.nohide){if(o.length)o.push(null);o.push({caption:this.localized?`${X("Hide")} ${X("Column")}`:"Hide Column",icon:"eyeOff",enabled:()=>i.visible!==!0,action(){i.visible=!1,x()}},{caption:this.localized?`${X("Show")} ${X("Column")}`:"Show Column",icon:"eye",enabled:()=>y.length>0,menuItems:y.map((s)=>{return{caption:s.name||s.prop,action(){delete s.visible,x()}}})})}if(o.length)o.push(null);let C=i.pinned==="left"?"pin":i.pinned==="right"?"pin0f":"pin50o";o.push({caption:this.localized?X("Pin"):"Pin",icon:C,menuItems:[{caption:this.localized?X("Left"):"Left",icon:"pin",enabled:()=>i.pinned!=="left",action(){i.pinned="left",x()}},{caption:this.localized?X("Right"):"Right",icon:"pin0f",enabled:()=>i.pinned!=="right",action(){i.pinned="right",x()}},{caption:this.localized?X("Unpin"):"Unpin",icon:"unPin",enabled:()=>!!i.pinned,action(){delete i.pinned,x()}}]}),H({target:l,localized:this.localized,menuItems:o})};get captionSpan(){return this.localized?q1:q5}get visibleRows(){return Q(this.rowData.visible)}get visibleSelectedRows(){return this.visibleRows.filter((l)=>l[this.selectedKey])}get selectedRows(){if(this._pinnedTopRows||this._pinnedBottomRows)return[...this._pinnedTopRows??[],...this._array,...this._pinnedBottomRows??[]].filter((i)=>i[this.selectedKey]);return this._array.filter((l)=>l[this.selectedKey])}getCells(l){let i=l instanceof Element?this.itemFor(l):l;return i==null?void 0:this.cellsFor(i)}getItem(l){return this.itemFor(l)}draggedColumn;dropColumn=(l)=>{let i=l.target.closest(".drag-over"),h=parseInt(i.getAttribute("aria-colindex")||"",10)-1,y=this.visibleColumns[h],x=this.columns.indexOf(this.draggedColumn),o=this.columns.indexOf(y);this.draggedColumn.pinned=y.pinned,this.columns.splice(x,1),this.columns.splice(o,0,this.draggedColumn),this.queueRender(),l.preventDefault(),l.stopPropagation()};render(){super.render(),this.textContent="";let l=this.effectivePinnedTopData,i=this.effectivePinnedBottomData,h=this.effectiveBaseData,y=Math.min(h.length,this.maxVisibleRows),x=this.filter(h.slice(0,y)),{sort:o}=this;if(o)x.sort(o);this.rowData.pinnedTopData=l,this.rowData.pinnedBottomData=i,this.rowData.visible=x;let C=this.visibleColumns;if(C.length===0)return;let s=this.computeStickyInfo(C);this.style.setProperty("--tosi-table-row-height",this.rowHeight>0?`${this.rowHeight}px`:"auto"),this.setColumnWidths(),this._head=this.buildHeader(C,s),this._tbodyTop=l.length>0?this.buildPinnedBody(this.rowData.pinnedTopData,C,s,"pinned-top","pinnedTopRows"):null,this._tbodyBottom=i.length>0?this.buildPinnedBody(this.rowData.pinnedBottomData,C,s,"pinned-bottom","pinnedBottomRows"):null;let g=this.rowData.visible.listBinding((c,d)=>this.buildRow(d,C,s),this.rowHeight>0?{virtual:{height:this.rowHeight}}:{}),k=[this._head];if(this._tbodyTop)k.push(this._tbodyTop);if(k.push(...g),this._tbodyBottom)k.push(this._tbodyBottom);this._scrollArea=D2({class:"scroll-area",part:"visibleRows"},...k),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 l of[this._tbodyTop,this._tbodyBottom])if(l)this._pinnedRowEdgeObserver.observe(l,{childList:!0})}}var Rl=Z0,_5=Z0.elementCreator(),$l=_5,Zl=_5;var{dialog:bl,button:P5,header:Jl,footer:Hl,tosiSlot:V5,h3:O5,p:U5,label:Sl,input:Dl,div:Il}=f;class F5 extends z{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:w.menuShadow("0 5px 10px #0004"),_dialogBackground:w.background("#fafafa"),_dialogColor:w.textColor("#222"),boxShadow:r.dialogShadow,background:r.dialogBackground,color:r.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(l,i="Alert"){return new Promise((h)=>{let y=b0({removeOnClose:!0,closeOnBackgroundClick:!0,dialogWillClose(){h()}},O5({slot:"header"},i),l.includes(`
15
+ `)?f.pre({style:{whiteSpace:"pre-wrap",margin:0}},l):U5(l));document.body.append(y),y.showModal()})}static async confirm(l,i="Confirm"){return new Promise((h)=>{let y=b0({removeOnClose:!0,dialogWillClose(x){h(x==="confirm")}},O5({slot:"header"},i),U5(l),P5({slot:"footer",onClick(){y.close()}},"Cancel"));document.body.append(y),y.showModal()})}static async prompt(l,i="Prompt",h=""){return new Promise((y)=>{let x=Dl({value:h}),o=b0({removeOnClose:!0,dialogWillClose(C){y(C==="confirm"?x.value:null)},initialFocus(){x.focus()}},O5({slot:"header"},i),U5(Sl({style:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:5}},Il(l),x)),P5({slot:"footer",onClick(){o.close()}},"Cancel"));document.body.append(o),o.showModal()})}removeOnClose=!1;closeOnBackgroundClick=!1;constructor(){super();d2(this,"click",()=>{if(this.closeOnBackgroundClick)this.close()})}dialogWillClose=(l="cancel")=>{console.log("dialog will close with",l)};initialFocus(){this.parts.ok.focus()}#l=(l)=>{};showModal=()=>{return this.style.zIndex=String(L1()),new Promise((l)=>{this.#l=l,this.parts.dialog.showModal(),requestAnimationFrame(()=>{this.initialFocus()})})};close=(l="cancel")=>{if(this.dialogWillClose(l),this.#l(l),this.parts.dialog.close(),this.removeOnClose)this.remove()};ok=()=>{this.close("confirm")};content=()=>bl({part:"dialog"},Jl(V5({name:"header"})),V5(),Hl(V5({name:"footer"}),P5({part:"ok",onClick:this.ok},"OK")))}var b0=F5.elementCreator();function K5(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var E1=K5();function y8(l){E1=l}var M2={exec:()=>null};function a(l,i=""){let h=typeof l=="string"?l:l.source,y={replace:(x,o)=>{let C=typeof o=="string"?o:o.source;return C=C.replace(l1.caret,"$1"),h=h.replace(x,C),y},getRegex:()=>new RegExp(h,i)};return y}var Tl=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),l1={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:(l)=>new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}#`),htmlBeginRegex:(l)=>new RegExp(`^ {0,${Math.min(3,l-1)}}<(?:[a-z].*>|!--)`,"i")},ul=/^(?:[ \t]*(?:\n|$))+/,Ml=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ml=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,m2=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ll=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,a5=/(?:[*+-]|\d{1,9}[.)])/,x8=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,o8=a(x8).replace(/bull/g,a5).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(),el=a(x8).replace(/bull/g,a5).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(),Q5=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,El=/^[^\n]+/,W5=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,li=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",W5).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ii=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,a5).getRegex(),I0="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",Y5=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hi=a("^ {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",Y5).replace("tag",I0).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),C8=a(Q5).replace("hr",m2).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",I0).getRegex(),yi=a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",C8).getRegex(),N5={blockquote:yi,code:Ml,def:li,fences:ml,heading:Ll,hr:m2,html:hi,lheading:o8,list:ii,newline:ul,paragraph:C8,table:M2,text:El},L9=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",m2).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",I0).getRegex(),xi={...N5,lheading:el,table:L9,paragraph:a(Q5).replace("hr",m2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",L9).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",I0).getRegex()},oi={...N5,html:a(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Y5).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:M2,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(Q5).replace("hr",m2).replace("heading",` *#{1,6} *[^
16
+ ]`).replace("lheading",o8).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ci=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,si=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,s8=/^( {2,}|\\)\n(?!\s*$)/,gi=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T0=/[\p{P}\p{S}]/u,X5=/[\s\p{P}\p{S}]/u,g8=/[^\s\p{P}\p{S}]/u,ki=a(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,X5).getRegex(),k8=/(?!~)[\p{P}\p{S}]/u,ci=/(?!~)[\s\p{P}\p{S}]/u,ri=/(?:[^\s\p{P}\p{S}]|~)/u,di=a(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Tl?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),c8=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,wi=a(c8,"u").replace(/punct/g,T0).getRegex(),ni=a(c8,"u").replace(/punct/g,k8).getRegex(),r8="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pi=a(r8,"gu").replace(/notPunctSpace/g,g8).replace(/punctSpace/g,X5).replace(/punct/g,T0).getRegex(),Bi=a(r8,"gu").replace(/notPunctSpace/g,ri).replace(/punctSpace/g,ci).replace(/punct/g,k8).getRegex(),fi=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,g8).replace(/punctSpace/g,X5).replace(/punct/g,T0).getRegex(),zi=a(/\\(punct)/,"gu").replace(/punct/g,T0).getRegex(),vi=a(/^<(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(),ji=a(Y5).replace("(?:-->|$)","-->").getRegex(),ti=a("^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",ji).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),H0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ai=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",H0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),d8=a(/^!?\[(label)\]\[(ref)\]/).replace("label",H0).replace("ref",W5).getRegex(),w8=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",W5).getRegex(),qi=a("reflink|nolink(?!\\()","g").replace("reflink",d8).replace("nolink",w8).getRegex(),e9=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,R5={_backpedal:M2,anyPunctuation:zi,autolink:vi,blockSkip:di,br:s8,code:si,del:M2,emStrongLDelim:wi,emStrongRDelimAst:pi,emStrongRDelimUnd:fi,escape:Ci,link:Ai,nolink:w8,punctuation:ki,reflink:d8,reflinkSearch:qi,tag:ti,text:gi,url:M2},_i={...R5,link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",H0).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",H0).getRegex()},G5={...R5,emStrongRDelimAst:Bi,emStrongLDelim:ni,url:a(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",e9).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:a(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",e9).getRegex()},Pi={...G5,br:a(s8).replace("{2,}","*").getRegex(),text:a(G5.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},J0={normal:N5,gfm:xi,pedantic:oi},I2={normal:R5,gfm:G5,breaks:Pi,pedantic:_i},Vi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},E9=(l)=>Vi[l];function _1(l,i){if(i){if(l1.escapeTest.test(l))return l.replace(l1.escapeReplace,E9)}else if(l1.escapeTestNoEncode.test(l))return l.replace(l1.escapeReplaceNoEncode,E9);return l}function l8(l){try{l=encodeURI(l).replace(l1.percentDecode,"%")}catch{return null}return l}function i8(l,i){let h=l.replace(l1.findPipe,(o,C,s)=>{let g=!1,k=C;for(;--k>=0&&s[k]==="\\";)g=!g;return g?"|":" |"}),y=h.split(l1.splitPipe),x=0;if(y[0].trim()||y.shift(),y.length>0&&!y.at(-1)?.trim()&&y.pop(),i)if(y.length>i)y.splice(i);else for(;y.length<i;)y.push("");for(;x<y.length;x++)y[x]=y[x].trim().replace(l1.slashPipe,"|");return y}function T2(l,i,h){let y=l.length;if(y===0)return"";let x=0;for(;x<y;){let o=l.charAt(y-x-1);if(o===i&&!h)x++;else if(o!==i&&h)x++;else break}return l.slice(0,y-x)}function Oi(l,i){if(l.indexOf(i[1])===-1)return-1;let h=0;for(let y=0;y<l.length;y++)if(l[y]==="\\")y++;else if(l[y]===i[0])h++;else if(l[y]===i[1]&&(h--,h<0))return y;return h>0?-2:-1}function h8(l,i,h,y,x){let o=i.href,C=i.title||null,s=l[1].replace(x.other.outputLinkReplace,"$1");y.state.inLink=!0;let g={type:l[0].charAt(0)==="!"?"image":"link",raw:h,href:o,title:C,text:s,tokens:y.inlineTokens(s)};return y.state.inLink=!1,g}function Ui(l,i,h){let y=l.match(h.other.indentCodeCompensation);if(y===null)return i;let x=y[1];return i.split(`
17
17
  `).map((o)=>{let C=o.match(h.other.beginningSpace);if(C===null)return o;let[s]=C;return s.length>=x.length?o.slice(x.length):o}).join(`
18
18
  `)}var S0=class{options;rules;lexer;constructor(l){this.options=l||E1}space(l){let i=this.rules.block.newline.exec(l);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(l){let i=this.rules.block.code.exec(l);if(i){let h=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?h:T2(h,`
19
19
  `)}}}fences(l){let i=this.rules.block.fences.exec(l);if(i){let h=i[0],y=Ui(h,i[3]||"",this.rules);return{type:"code",raw:h,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:y}}}heading(l){let i=this.rules.block.heading.exec(l);if(i){let h=i[2].trim();if(this.rules.other.endingHash.test(h)){let y=T2(h,"#");(this.options.pedantic||!y||this.rules.other.endingSpaceChar.test(y))&&(h=y.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:h,tokens:this.lexer.inline(h)}}}hr(l){let i=this.rules.block.hr.exec(l);if(i)return{type:"hr",raw:T2(i[0],`
@@ -25,17 +25,17 @@ ${x}
25
25
  ${k}`:k,x=x?`${x}
26
26
  ${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,o,!0),this.lexer.state.top=d,h.length===0)break;let n=o.at(-1);if(n?.type==="code")break;if(n?.type==="blockquote"){let v=n,p=v.raw+`
27
27
  `+h.join(`
28
- `),j=this.blockquote(p);o[o.length-1]=j,y=y.substring(0,y.length-v.raw.length)+j.raw,x=x.substring(0,x.length-v.text.length)+j.text;break}else if(n?.type==="list"){let v=n,p=v.raw+`
28
+ `),t=this.blockquote(p);o[o.length-1]=t,y=y.substring(0,y.length-v.raw.length)+t.raw,x=x.substring(0,x.length-v.text.length)+t.text;break}else if(n?.type==="list"){let v=n,p=v.raw+`
29
29
  `+h.join(`
30
- `),j=this.list(p);o[o.length-1]=j,y=y.substring(0,y.length-n.raw.length)+j.raw,x=x.substring(0,x.length-v.raw.length)+j.raw,h=p.substring(o.at(-1).raw.length).split(`
30
+ `),t=this.list(p);o[o.length-1]=t,y=y.substring(0,y.length-n.raw.length)+t.raw,x=x.substring(0,x.length-v.raw.length)+t.raw,h=p.substring(o.at(-1).raw.length).split(`
31
31
  `);continue}}return{type:"blockquote",raw:y,tokens:o,text:x}}}list(l){let i=this.rules.block.list.exec(l);if(i){let h=i[1].trim(),y=h.length>1,x={type:"list",raw:"",ordered:y,start:y?+h.slice(0,-1):"",loose:!1,items:[]};h=y?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=y?h:"[*+-]");let o=this.rules.other.listItemRegex(h),C=!1;for(;l;){let g=!1,k="",c="";if(!(i=o.exec(l))||this.rules.block.hr.test(l))break;k=i[0],l=l.substring(k.length);let d=i[2].split(`
32
- `,1)[0].replace(this.rules.other.listReplaceTabs,(_)=>" ".repeat(3*_.length)),n=l.split(`
32
+ `,1)[0].replace(this.rules.other.listReplaceTabs,(P)=>" ".repeat(3*P.length)),n=l.split(`
33
33
  `,1)[0],v=!d.trim(),p=0;if(this.options.pedantic?(p=2,c=d.trimStart()):v?p=i[1].length+1:(p=i[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,c=d.slice(p),p+=i[1].length),v&&this.rules.other.blankLine.test(n)&&(k+=n+`
34
- `,l=l.substring(n.length+1),g=!0),!g){let _=this.rules.other.nextBulletRegex(p),V=this.rules.other.hrRegex(p),K=this.rules.other.fencesBeginRegex(p),Z=this.rules.other.headingBeginRegex(p),W=this.rules.other.htmlBeginRegex(p);for(;l;){let O=l.split(`
35
- `,1)[0],F;if(n=O,this.options.pedantic?(n=n.replace(this.rules.other.listReplaceNesting," "),F=n):F=n.replace(this.rules.other.tabCharGlobal," "),K.test(n)||Z.test(n)||W.test(n)||_.test(n)||V.test(n))break;if(F.search(this.rules.other.nonSpaceChar)>=p||!n.trim())c+=`
34
+ `,l=l.substring(n.length+1),g=!0),!g){let P=this.rules.other.nextBulletRegex(p),V=this.rules.other.hrRegex(p),K=this.rules.other.fencesBeginRegex(p),Z=this.rules.other.headingBeginRegex(p),W=this.rules.other.htmlBeginRegex(p);for(;l;){let O=l.split(`
35
+ `,1)[0],F;if(n=O,this.options.pedantic?(n=n.replace(this.rules.other.listReplaceNesting," "),F=n):F=n.replace(this.rules.other.tabCharGlobal," "),K.test(n)||Z.test(n)||W.test(n)||P.test(n)||V.test(n))break;if(F.search(this.rules.other.nonSpaceChar)>=p||!n.trim())c+=`
36
36
  `+F.slice(p);else{if(v||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||K.test(d)||Z.test(d)||V.test(d))break;c+=`
37
37
  `+n}!v&&!n.trim()&&(v=!0),k+=O+`
38
- `,l=l.substring(O.length+1),d=F.slice(p)}}x.loose||(C?x.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(C=!0));let j=null,P;this.options.gfm&&(j=this.rules.other.listIsTask.exec(c),j&&(P=j[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),x.items.push({type:"list_item",raw:k,task:!!j,checked:P,loose:!1,text:c,tokens:[]}),x.raw+=k}let s=x.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;x.raw=x.raw.trimEnd();for(let g=0;g<x.items.length;g++)if(this.lexer.state.top=!1,x.items[g].tokens=this.lexer.blockTokens(x.items[g].text,[]),!x.loose){let k=x.items[g].tokens.filter((d)=>d.type==="space"),c=k.length>0&&k.some((d)=>this.rules.other.anyLine.test(d.raw));x.loose=c}if(x.loose)for(let g=0;g<x.items.length;g++)x.items[g].loose=!0;return x}}html(l){let i=this.rules.block.html.exec(l);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(l){let i=this.rules.block.def.exec(l);if(i){let h=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),y=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",x=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:h,raw:i[0],href:y,title:x}}}table(l){let i=this.rules.block.table.exec(l);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let h=i8(i[1]),y=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),x=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
38
+ `,l=l.substring(O.length+1),d=F.slice(p)}}x.loose||(C?x.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(C=!0));let t=null,_;this.options.gfm&&(t=this.rules.other.listIsTask.exec(c),t&&(_=t[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),x.items.push({type:"list_item",raw:k,task:!!t,checked:_,loose:!1,text:c,tokens:[]}),x.raw+=k}let s=x.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;x.raw=x.raw.trimEnd();for(let g=0;g<x.items.length;g++)if(this.lexer.state.top=!1,x.items[g].tokens=this.lexer.blockTokens(x.items[g].text,[]),!x.loose){let k=x.items[g].tokens.filter((d)=>d.type==="space"),c=k.length>0&&k.some((d)=>this.rules.other.anyLine.test(d.raw));x.loose=c}if(x.loose)for(let g=0;g<x.items.length;g++)x.items[g].loose=!0;return x}}html(l){let i=this.rules.block.html.exec(l);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(l){let i=this.rules.block.def.exec(l);if(i){let h=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),y=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",x=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:h,raw:i[0],href:y,title:x}}}table(l){let i=this.rules.block.table.exec(l);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let h=i8(i[1]),y=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),x=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
39
39
  `):[],o={type:"table",raw:i[0],header:[],align:[],rows:[]};if(h.length===y.length){for(let C of y)this.rules.other.tableAlignRight.test(C)?o.align.push("right"):this.rules.other.tableAlignCenter.test(C)?o.align.push("center"):this.rules.other.tableAlignLeft.test(C)?o.align.push("left"):o.align.push(null);for(let C=0;C<h.length;C++)o.header.push({text:h[C],tokens:this.lexer.inline(h[C]),header:!0,align:o.align[C]});for(let C of x)o.rows.push(i8(C,o.header.length).map((s,g)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:o.align[g]})));return o}}lheading(l){let i=this.rules.block.lheading.exec(l);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(l){let i=this.rules.block.paragraph.exec(l);if(i){let h=i[1].charAt(i[1].length-1)===`
40
40
  `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:h,tokens:this.lexer.inline(h)}}}text(l){let i=this.rules.block.text.exec(l);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(l){let i=this.rules.inline.escape.exec(l);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(l){let i=this.rules.inline.tag.exec(l);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(l){let i=this.rules.inline.link.exec(l);if(i){let h=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(h)){if(!this.rules.other.endAngleBracket.test(h))return;let o=T2(h.slice(0,-1),"\\");if((h.length-o.length)%2===0)return}else{let o=Oi(i[2],"()");if(o===-2)return;if(o>-1){let C=(i[0].indexOf("!")===0?5:4)+i[1].length+o;i[2]=i[2].substring(0,o),i[0]=i[0].substring(0,C).trim(),i[3]=""}}let y=i[2],x="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(y);o&&(y=o[1],x=o[3])}else x=i[3]?i[3].slice(1,-1):"";return y=y.trim(),this.rules.other.startAngleBracket.test(y)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(h)?y=y.slice(1):y=y.slice(1,-1)),h8(i,{href:y&&y.replace(this.rules.inline.anyPunctuation,"$1"),title:x&&x.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(l,i){let h;if((h=this.rules.inline.reflink.exec(l))||(h=this.rules.inline.nolink.exec(l))){let y=(h[2]||h[1]).replace(this.rules.other.multipleSpaceGlobal," "),x=i[y.toLowerCase()];if(!x){let o=h[0].charAt(0);return{type:"text",raw:o,text:o}}return h8(h,x,h[0],this.lexer,this.rules)}}emStrong(l,i,h=""){let y=this.rules.inline.emStrongLDelim.exec(l);if(!y||y[3]&&h.match(this.rules.other.unicodeAlphaNumeric))return;if(!(y[1]||y[2])||!h||this.rules.inline.punctuation.exec(h)){let x=[...y[0]].length-1,o,C,s=x,g=0,k=y[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(k.lastIndex=0,i=i.slice(-1*l.length+x);(y=k.exec(i))!=null;){if(o=y[1]||y[2]||y[3]||y[4]||y[5]||y[6],!o)continue;if(C=[...o].length,y[3]||y[4]){s+=C;continue}else if((y[5]||y[6])&&x%3&&!((x+C)%3)){g+=C;continue}if(s-=C,s>0)continue;C=Math.min(C,C+s+g);let c=[...y[0]][0].length,d=l.slice(0,x+y.index+c+C);if(Math.min(x,C)%2){let v=d.slice(1,-1);return{type:"em",raw:d,text:v,tokens:this.lexer.inlineTokens(v)}}let n=d.slice(2,-2);return{type:"strong",raw:d,text:n,tokens:this.lexer.inlineTokens(n)}}}}codespan(l){let i=this.rules.inline.code.exec(l);if(i){let h=i[2].replace(this.rules.other.newLineCharGlobal," "),y=this.rules.other.nonSpaceChar.test(h),x=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return y&&x&&(h=h.substring(1,h.length-1)),{type:"codespan",raw:i[0],text:h}}}br(l){let i=this.rules.inline.br.exec(l);if(i)return{type:"br",raw:i[0]}}del(l){let i=this.rules.inline.del.exec(l);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(l){let i=this.rules.inline.autolink.exec(l);if(i){let h,y;return i[2]==="@"?(h=i[1],y="mailto:"+h):(h=i[1],y=h),{type:"link",raw:i[0],text:h,href:y,tokens:[{type:"text",raw:h,text:h}]}}}url(l){let i;if(i=this.rules.inline.url.exec(l)){let h,y;if(i[2]==="@")h=i[0],y="mailto:"+h;else{let x;do x=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(x!==i[0]);h=i[0],i[1]==="www."?y="http://"+i[0]:y=i[0]}return{type:"link",raw:i[0],text:h,href:y,tokens:[{type:"text",raw:h,text:h}]}}}inlineText(l){let i=this.rules.inline.text.exec(l);if(i){let h=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:h}}}},w1=class l{tokens;options;state;tokenizer;inlineQueue;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||E1,this.options.tokenizer=this.options.tokenizer||new S0,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:l1,block:J0.normal,inline:I2.normal};this.options.pedantic?(h.block=J0.pedantic,h.inline=I2.pedantic):this.options.gfm&&(h.block=J0.gfm,this.options.breaks?h.inline=I2.breaks:h.inline=I2.gfm),this.tokenizer.rules=h}static get rules(){return{block:J0,inline:I2}}static lex(i,h){return new l(h).lex(i)}static lexInline(i,h){return new l(h).inlineTokens(i)}lex(i){i=i.replace(l1.carriageReturn,`
41
41
  `),this.blockTokens(i,this.tokens);for(let h=0;h<this.inlineQueue.length;h++){let y=this.inlineQueue[h];this.inlineTokens(y.src,y.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,h=[],y=!1){for(this.options.pedantic&&(i=i.replace(l1.tabCharGlobal," ").replace(l1.spaceLine,""));i;){let x;if(this.options.extensions?.block?.some((C)=>(x=C.call({lexer:this},i,h))?(i=i.substring(x.raw.length),h.push(x),!0):!1))continue;if(x=this.tokenizer.space(i)){i=i.substring(x.raw.length);let C=h.at(-1);x.raw.length===1&&C!==void 0?C.raw+=`
@@ -52,15 +52,15 @@ ${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
52
52
  `)?"":`
53
53
  `)+x.raw,C.text+=`
54
54
  `+x.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=C.text):h.push(x);continue}if(i){let C="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw Error(C)}}return this.state.top=!0,h}inline(i,h=[]){return this.inlineQueue.push({src:i,tokens:h}),h}inlineTokens(i,h=[]){let y=i,x=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(x=this.tokenizer.rules.inline.reflinkSearch.exec(y))!=null;)g.includes(x[0].slice(x[0].lastIndexOf("[")+1,-1))&&(y=y.slice(0,x.index)+"["+"a".repeat(x[0].length-2)+"]"+y.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(x=this.tokenizer.rules.inline.anyPunctuation.exec(y))!=null;)y=y.slice(0,x.index)+"++"+y.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(x=this.tokenizer.rules.inline.blockSkip.exec(y))!=null;)o=x[2]?x[2].length:0,y=y.slice(0,x.index+o)+"["+"a".repeat(x[0].length-o-2)+"]"+y.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);y=this.options.hooks?.emStrongMask?.call({lexer:this},y)??y;let C=!1,s="";for(;i;){C||(s=""),C=!1;let g;if(this.options.extensions?.inline?.some((c)=>(g=c.call({lexer:this},i,h))?(i=i.substring(g.raw.length),h.push(g),!0):!1))continue;if(g=this.tokenizer.escape(i)){i=i.substring(g.raw.length),h.push(g);continue}if(g=this.tokenizer.tag(i)){i=i.substring(g.raw.length),h.push(g);continue}if(g=this.tokenizer.link(i)){i=i.substring(g.raw.length),h.push(g);continue}if(g=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(g.raw.length);let c=h.at(-1);g.type==="text"&&c?.type==="text"?(c.raw+=g.raw,c.text+=g.text):h.push(g);continue}if(g=this.tokenizer.emStrong(i,y,s)){i=i.substring(g.raw.length),h.push(g);continue}if(g=this.tokenizer.codespan(i)){i=i.substring(g.raw.length),h.push(g);continue}if(g=this.tokenizer.br(i)){i=i.substring(g.raw.length),h.push(g);continue}if(g=this.tokenizer.del(i)){i=i.substring(g.raw.length),h.push(g);continue}if(g=this.tokenizer.autolink(i)){i=i.substring(g.raw.length),h.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(i))){i=i.substring(g.raw.length),h.push(g);continue}let k=i;if(this.options.extensions?.startInline){let c=1/0,d=i.slice(1),n;this.options.extensions.startInline.forEach((v)=>{n=v.call({lexer:this},d),typeof n=="number"&&n>=0&&(c=Math.min(c,n))}),c<1/0&&c>=0&&(k=i.substring(0,c+1))}if(g=this.tokenizer.inlineText(k)){i=i.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(s=g.raw.slice(-1)),C=!0;let c=h.at(-1);c?.type==="text"?(c.raw+=g.raw,c.text+=g.text):h.push(g);continue}if(i){let c="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw Error(c)}}return h}},D0=class{options;parser;constructor(l){this.options=l||E1}space(l){return""}code({text:l,lang:i,escaped:h}){let y=(i||"").match(l1.notSpaceStart)?.[0],x=l.replace(l1.endingNewline,"")+`
55
- `;return y?'<pre><code class="language-'+P1(y)+'">'+(h?x:P1(x,!0))+`</code></pre>
56
- `:"<pre><code>"+(h?x:P1(x,!0))+`</code></pre>
55
+ `;return y?'<pre><code class="language-'+_1(y)+'">'+(h?x:_1(x,!0))+`</code></pre>
56
+ `:"<pre><code>"+(h?x:_1(x,!0))+`</code></pre>
57
57
  `}blockquote({tokens:l}){return`<blockquote>
58
58
  ${this.parser.parse(l)}</blockquote>
59
59
  `}html({text:l}){return l}def(l){return""}heading({tokens:l,depth:i}){return`<h${i}>${this.parser.parseInline(l)}</h${i}>
60
60
  `}hr(l){return`<hr>
61
61
  `}list(l){let{ordered:i,start:h}=l,y="";for(let C=0;C<l.items.length;C++){let s=l.items[C];y+=this.listitem(s)}let x=i?"ol":"ul",o=i&&h!==1?' start="'+h+'"':"";return"<"+x+o+`>
62
62
  `+y+"</"+x+`>
63
- `}listitem(l){let i="";if(l.task){let h=this.checkbox({checked:!!l.checked});l.loose?l.tokens[0]?.type==="paragraph"?(l.tokens[0].text=h+" "+l.tokens[0].text,l.tokens[0].tokens&&l.tokens[0].tokens.length>0&&l.tokens[0].tokens[0].type==="text"&&(l.tokens[0].tokens[0].text=h+" "+P1(l.tokens[0].tokens[0].text),l.tokens[0].tokens[0].escaped=!0)):l.tokens.unshift({type:"text",raw:h+" ",text:h+" ",escaped:!0}):i+=h+" "}return i+=this.parser.parse(l.tokens,!!l.loose),`<li>${i}</li>
63
+ `}listitem(l){let i="";if(l.task){let h=this.checkbox({checked:!!l.checked});l.loose?l.tokens[0]?.type==="paragraph"?(l.tokens[0].text=h+" "+l.tokens[0].text,l.tokens[0].tokens&&l.tokens[0].tokens.length>0&&l.tokens[0].tokens[0].type==="text"&&(l.tokens[0].tokens[0].text=h+" "+_1(l.tokens[0].tokens[0].text),l.tokens[0].tokens[0].escaped=!0)):l.tokens.unshift({type:"text",raw:h+" ",text:h+" ",escaped:!0}):i+=h+" "}return i+=this.parser.parse(l.tokens,!!l.loose),`<li>${i}</li>
64
64
  `}checkbox({checked:l}){return"<input "+(l?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:l}){return`<p>${this.parser.parseInline(l)}</p>
65
65
  `}table(l){let i="",h="";for(let x=0;x<l.header.length;x++)h+=this.tablecell(l.header[x]);i+=this.tablerow({text:h});let y="";for(let x=0;x<l.rows.length;x++){let o=l.rows[x];h="";for(let C=0;C<o.length;C++)h+=this.tablecell(o[C]);y+=this.tablerow({text:h})}return y&&(y=`<tbody>${y}</tbody>`),`<table>
66
66
  <thead>
@@ -69,11 +69,11 @@ ${this.parser.parse(l)}</blockquote>
69
69
  `}tablerow({text:l}){return`<tr>
70
70
  ${l}</tr>
71
71
  `}tablecell(l){let i=this.parser.parseInline(l.tokens),h=l.header?"th":"td";return(l.align?`<${h} align="${l.align}">`:`<${h}>`)+i+`</${h}>
72
- `}strong({tokens:l}){return`<strong>${this.parser.parseInline(l)}</strong>`}em({tokens:l}){return`<em>${this.parser.parseInline(l)}</em>`}codespan({text:l}){return`<code>${P1(l,!0)}</code>`}br(l){return"<br>"}del({tokens:l}){return`<del>${this.parser.parseInline(l)}</del>`}link({href:l,title:i,tokens:h}){let y=this.parser.parseInline(h),x=l8(l);if(x===null)return y;l=x;let o='<a href="'+l+'"';return i&&(o+=' title="'+P1(i)+'"'),o+=">"+y+"</a>",o}image({href:l,title:i,text:h,tokens:y}){y&&(h=this.parser.parseInline(y,this.parser.textRenderer));let x=l8(l);if(x===null)return P1(h);l=x;let o=`<img src="${l}" alt="${h}"`;return i&&(o+=` title="${P1(i)}"`),o+=">",o}text(l){return"tokens"in l&&l.tokens?this.parser.parseInline(l.tokens):("escaped"in l)&&l.escaped?l.text:P1(l.text)}},$5=class{strong({text:l}){return l}em({text:l}){return l}codespan({text:l}){return l}del({text:l}){return l}html({text:l}){return l}text({text:l}){return l}link({text:l}){return""+l}image({text:l}){return""+l}br(){return""}},n1=class l{options;renderer;textRenderer;constructor(i){this.options=i||E1,this.options.renderer=this.options.renderer||new D0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $5}static parse(i,h){return new l(h).parse(i)}static parseInline(i,h){return new l(h).parseInline(i)}parse(i,h=!0){let y="";for(let x=0;x<i.length;x++){let o=i[x];if(this.options.extensions?.renderers?.[o.type]){let s=o,g=this.options.extensions.renderers[s.type].call({parser:this},s);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){y+=g||"";continue}}let C=o;switch(C.type){case"space":{y+=this.renderer.space(C);continue}case"hr":{y+=this.renderer.hr(C);continue}case"heading":{y+=this.renderer.heading(C);continue}case"code":{y+=this.renderer.code(C);continue}case"table":{y+=this.renderer.table(C);continue}case"blockquote":{y+=this.renderer.blockquote(C);continue}case"list":{y+=this.renderer.list(C);continue}case"html":{y+=this.renderer.html(C);continue}case"def":{y+=this.renderer.def(C);continue}case"paragraph":{y+=this.renderer.paragraph(C);continue}case"text":{let s=C,g=this.renderer.text(s);for(;x+1<i.length&&i[x+1].type==="text";)s=i[++x],g+=`
72
+ `}strong({tokens:l}){return`<strong>${this.parser.parseInline(l)}</strong>`}em({tokens:l}){return`<em>${this.parser.parseInline(l)}</em>`}codespan({text:l}){return`<code>${_1(l,!0)}</code>`}br(l){return"<br>"}del({tokens:l}){return`<del>${this.parser.parseInline(l)}</del>`}link({href:l,title:i,tokens:h}){let y=this.parser.parseInline(h),x=l8(l);if(x===null)return y;l=x;let o='<a href="'+l+'"';return i&&(o+=' title="'+_1(i)+'"'),o+=">"+y+"</a>",o}image({href:l,title:i,text:h,tokens:y}){y&&(h=this.parser.parseInline(y,this.parser.textRenderer));let x=l8(l);if(x===null)return _1(h);l=x;let o=`<img src="${l}" alt="${h}"`;return i&&(o+=` title="${_1(i)}"`),o+=">",o}text(l){return"tokens"in l&&l.tokens?this.parser.parseInline(l.tokens):("escaped"in l)&&l.escaped?l.text:_1(l.text)}},$5=class{strong({text:l}){return l}em({text:l}){return l}codespan({text:l}){return l}del({text:l}){return l}html({text:l}){return l}text({text:l}){return l}link({text:l}){return""+l}image({text:l}){return""+l}br(){return""}},n1=class l{options;renderer;textRenderer;constructor(i){this.options=i||E1,this.options.renderer=this.options.renderer||new D0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $5}static parse(i,h){return new l(h).parse(i)}static parseInline(i,h){return new l(h).parseInline(i)}parse(i,h=!0){let y="";for(let x=0;x<i.length;x++){let o=i[x];if(this.options.extensions?.renderers?.[o.type]){let s=o,g=this.options.extensions.renderers[s.type].call({parser:this},s);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){y+=g||"";continue}}let C=o;switch(C.type){case"space":{y+=this.renderer.space(C);continue}case"hr":{y+=this.renderer.hr(C);continue}case"heading":{y+=this.renderer.heading(C);continue}case"code":{y+=this.renderer.code(C);continue}case"table":{y+=this.renderer.table(C);continue}case"blockquote":{y+=this.renderer.blockquote(C);continue}case"list":{y+=this.renderer.list(C);continue}case"html":{y+=this.renderer.html(C);continue}case"def":{y+=this.renderer.def(C);continue}case"paragraph":{y+=this.renderer.paragraph(C);continue}case"text":{let s=C,g=this.renderer.text(s);for(;x+1<i.length&&i[x+1].type==="text";)s=i[++x],g+=`
73
73
  `+this.renderer.text(s);h?y+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):y+=g;continue}default:{let s='Token with "'+C.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw Error(s)}}}return y}parseInline(i,h=this.renderer){let y="";for(let x=0;x<i.length;x++){let o=i[x];if(this.options.extensions?.renderers?.[o.type]){let s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){y+=s||"";continue}}let C=o;switch(C.type){case"escape":{y+=h.text(C);break}case"html":{y+=h.html(C);break}case"link":{y+=h.link(C);break}case"image":{y+=h.image(C);break}case"strong":{y+=h.strong(C);break}case"em":{y+=h.em(C);break}case"codespan":{y+=h.codespan(C);break}case"br":{y+=h.br(C);break}case"del":{y+=h.del(C);break}case"text":{y+=h.text(C);break}default:{let s='Token with "'+C.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw Error(s)}}}return y}},u2=class{options;block;constructor(l){this.options=l||E1}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(l){return l}postprocess(l){return l}processAllTokens(l){return l}emStrongMask(l){return l}provideLexer(){return this.block?w1.lex:w1.lexInline}provideParser(){return this.block?n1.parse:n1.parseInline}},Fi=class{defaults=K5();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=n1;Renderer=D0;TextRenderer=$5;Lexer=w1;Tokenizer=S0;Hooks=u2;constructor(...l){this.use(...l)}walkTokens(l,i){let h=[];for(let y of l)switch(h=h.concat(i.call(this,y)),y.type){case"table":{let x=y;for(let o of x.header)h=h.concat(this.walkTokens(o.tokens,i));for(let o of x.rows)for(let C of o)h=h.concat(this.walkTokens(C.tokens,i));break}case"list":{let x=y;h=h.concat(this.walkTokens(x.items,i));break}default:{let x=y;this.defaults.extensions?.childTokens?.[x.type]?this.defaults.extensions.childTokens[x.type].forEach((o)=>{let C=x[o].flat(1/0);h=h.concat(this.walkTokens(C,i))}):x.tokens&&(h=h.concat(this.walkTokens(x.tokens,i)))}}return h}use(...l){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return l.forEach((h)=>{let y={...h};if(y.async=this.defaults.async||y.async||!1,h.extensions&&(h.extensions.forEach((x)=>{if(!x.name)throw Error("extension name required");if("renderer"in x){let o=i.renderers[x.name];o?i.renderers[x.name]=function(...C){let s=x.renderer.apply(this,C);return s===!1&&(s=o.apply(this,C)),s}:i.renderers[x.name]=x.renderer}if("tokenizer"in x){if(!x.level||x.level!=="block"&&x.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let o=i[x.level];o?o.unshift(x.tokenizer):i[x.level]=[x.tokenizer],x.start&&(x.level==="block"?i.startBlock?i.startBlock.push(x.start):i.startBlock=[x.start]:x.level==="inline"&&(i.startInline?i.startInline.push(x.start):i.startInline=[x.start]))}"childTokens"in x&&x.childTokens&&(i.childTokens[x.name]=x.childTokens)}),y.extensions=i),h.renderer){let x=this.defaults.renderer||new D0(this.defaults);for(let o in h.renderer){if(!(o in x))throw Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let C=o,s=h.renderer[C],g=x[C];x[C]=(...k)=>{let c=s.apply(x,k);return c===!1&&(c=g.apply(x,k)),c||""}}y.renderer=x}if(h.tokenizer){let x=this.defaults.tokenizer||new S0(this.defaults);for(let o in h.tokenizer){if(!(o in x))throw Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let C=o,s=h.tokenizer[C],g=x[C];x[C]=(...k)=>{let c=s.apply(x,k);return c===!1&&(c=g.apply(x,k)),c}}y.tokenizer=x}if(h.hooks){let x=this.defaults.hooks||new u2;for(let o in h.hooks){if(!(o in x))throw Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let C=o,s=h.hooks[C],g=x[C];u2.passThroughHooks.has(o)?x[C]=(k)=>{if(this.defaults.async&&u2.passThroughHooksRespectAsync.has(o))return(async()=>{let d=await s.call(x,k);return g.call(x,d)})();let c=s.call(x,k);return g.call(x,c)}:x[C]=(...k)=>{if(this.defaults.async)return(async()=>{let d=await s.apply(x,k);return d===!1&&(d=await g.apply(x,k)),d})();let c=s.apply(x,k);return c===!1&&(c=g.apply(x,k)),c}}y.hooks=x}if(h.walkTokens){let x=this.defaults.walkTokens,o=h.walkTokens;y.walkTokens=function(C){let s=[];return s.push(o.call(this,C)),x&&(s=s.concat(x.call(this,C))),s}}this.defaults={...this.defaults,...y}}),this}setOptions(l){return this.defaults={...this.defaults,...l},this}lexer(l,i){return w1.lex(l,i??this.defaults)}parser(l,i){return n1.parse(l,i??this.defaults)}parseMarkdown(l){return(i,h)=>{let y={...h},x={...this.defaults,...y},o=this.onError(!!x.silent,!!x.async);if(this.defaults.async===!0&&y.async===!1)return o(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 i>"u"||i===null)return o(Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return o(Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(x.hooks&&(x.hooks.options=x,x.hooks.block=l),x.async)return(async()=>{let C=x.hooks?await x.hooks.preprocess(i):i,s=await(x.hooks?await x.hooks.provideLexer():l?w1.lex:w1.lexInline)(C,x),g=x.hooks?await x.hooks.processAllTokens(s):s;x.walkTokens&&await Promise.all(this.walkTokens(g,x.walkTokens));let k=await(x.hooks?await x.hooks.provideParser():l?n1.parse:n1.parseInline)(g,x);return x.hooks?await x.hooks.postprocess(k):k})().catch(o);try{x.hooks&&(i=x.hooks.preprocess(i));let C=(x.hooks?x.hooks.provideLexer():l?w1.lex:w1.lexInline)(i,x);x.hooks&&(C=x.hooks.processAllTokens(C)),x.walkTokens&&this.walkTokens(C,x.walkTokens);let s=(x.hooks?x.hooks.provideParser():l?n1.parse:n1.parseInline)(C,x);return x.hooks&&(s=x.hooks.postprocess(s)),s}catch(C){return o(C)}}}onError(l,i){return(h)=>{if(h.message+=`
74
- Please report this to https://github.com/markedjs/marked.`,l){let y="<p>An error occurred:</p><pre>"+P1(h.message+"",!0)+"</pre>";return i?Promise.resolve(y):y}if(i)return Promise.reject(h);throw h}}},e1=new Fi;function G(l,i){return e1.parse(l,i)}G.options=G.setOptions=function(l){return e1.setOptions(l),G.defaults=e1.defaults,y8(G.defaults),G};G.getDefaults=K5;G.defaults=E1;G.use=function(...l){return e1.use(...l),G.defaults=e1.defaults,y8(G.defaults),G};G.walkTokens=function(l,i){return e1.walkTokens(l,i)};G.parseInline=e1.parseInline;G.Parser=n1;G.parser=n1.parse;G.Renderer=D0;G.TextRenderer=$5;G.Lexer=w1;G.lexer=w1.lex;G.Tokenizer=S0;G.Hooks=u2;G.parse=G;var{options:Bo,setOptions:fo,use:zo,walkTokens:vo,parseInline:to}=G;var jo=n1.parse,Ao=w1.lex;function n8(l,i){if(i==null)i="";else if(typeof i!=="string")i=String(i);return i.replace(/\{\{([^}]+)\}\}/g,(h,y)=>{let x=T[`${l}${y.startsWith("[")?y:"."+y}`];return x===void 0?h:n8(l,String(x))})}class u0 extends z{static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let l=await fetch(this.src);this.value=await l.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),T[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let l=n8(this.instanceId,this.value);if(this.elements){let i=l.split(`
74
+ Please report this to https://github.com/markedjs/marked.`,l){let y="<p>An error occurred:</p><pre>"+_1(h.message+"",!0)+"</pre>";return i?Promise.resolve(y):y}if(i)return Promise.reject(h);throw h}}},e1=new Fi;function G(l,i){return e1.parse(l,i)}G.options=G.setOptions=function(l){return e1.setOptions(l),G.defaults=e1.defaults,y8(G.defaults),G};G.getDefaults=K5;G.defaults=E1;G.use=function(...l){return e1.use(...l),G.defaults=e1.defaults,y8(G.defaults),G};G.walkTokens=function(l,i){return e1.walkTokens(l,i)};G.parseInline=e1.parseInline;G.Parser=n1;G.parser=n1.parse;G.Renderer=D0;G.TextRenderer=$5;G.Lexer=w1;G.lexer=w1.lex;G.Tokenizer=S0;G.Hooks=u2;G.parse=G;var{options:Bo,setOptions:fo,use:zo,walkTokens:vo,parseInline:jo}=G;var to=n1.parse,Ao=w1.lex;function n8(l,i){if(i==null)i="";else if(typeof i!=="string")i=String(i);return i.replace(/\{\{([^}]+)\}\}/g,(h,y)=>{let x=T[`${l}${y.startsWith("[")?y:"."+y}`];return x===void 0?h:n8(l,String(x))})}class u0 extends z{static preferredTagName="tosi-md";static initAttributes={src:"",elements:!1};context={};value="";content=null;options={};connectedCallback(){if(super.connectedCallback(),this.src!=="")(async()=>{let l=await fetch(this.src);this.value=await l.text()})();else if(this.value==="")if(this.elements)this.value=this.innerHTML;else this.value=this.textContent!=null?this.textContent:""}didRender=()=>{};render(){super.render(),T[this.instanceId]=typeof this.context==="string"?JSON.parse(this.context):this.context;let l=n8(this.instanceId,this.value);if(this.elements){let i=l.split(`
75
75
  `).reduce((h,y)=>{if(y.startsWith("<")||h.length===0)h.push(y);else{let x=h[h.length-1];if(!x.startsWith("<")||!x.endsWith(">"))h[h.length-1]+=`
76
- `+y;else h.push(y)}return h},[]);this.innerHTML=i.map((h)=>h.startsWith("<")&&h.endsWith(">")?h:G(h,this.options)).join("")}else this.innerHTML=G(l,this.options);this.didRender()}}var Gi=u0,L2=u0.elementCreator(),Ki=L2,ai=L2;var{div:l2,slot:p8,span:Qi,button:Wi}=f;class M0 extends z{static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(l,i,h){let y=i.getAttribute("name"),x=i.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?q1(y):Qi(y)),o=l2(x,{part:"tab",tabindex:0,role:"tab",ariaControls:h},i.hasAttribute("data-close")?Wi({title:"close",class:"close"},B.x()):{}),C=i.dataset.tooltip;if(C)o.dataset.tooltip=C;return o}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:`${r.spacing50} ${r.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},':host .tabs > [aria-selected="true"]':{"--text-color":r.tosiTabsSelectedColor,color:r.textColor},":host .elastic":{flex:"1"},":host .border":{background:r.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:r.tosiTabsBarHeight,background:r.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:r.spacing50,padding:0},":host button.close > svg":{height:"12px"}};onCloseTab=null;content=[l2({role:"tabpanel",part:"tabpanel"},l2({part:"tabrow"},l2({class:"tabs",part:"tabs"}),l2({class:"elastic"}),p8({name:"after-tabs"})),l2({class:"border"},l2({class:"selected",part:"selected"}))),p8()];addTabBody(l,i=!1){if(!l.hasAttribute("name"))throw console.error("element has no name attribute",l),Error("element has no name attribute");if(this.append(l),this.setupTabs(),i)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(l){l.remove(),this.setupTabs(),this.queueRender()}keyTab=(l)=>{let{tabs:i}=this.parts,h=[...i.children].indexOf(l.target);switch(l.key){case"ArrowLeft":this.value=(h+Number(i.children.length)-1)%i.children.length,i.children[this.value].focus(),l.preventDefault();break;case"ArrowRight":this.value=(h+1)%i.children.length,i.children[this.value].focus(),l.preventDefault();break;case" ":this.pickTab(l),l.preventDefault();break;default:}};get bodies(){return[...this.children].filter((l)=>l.hasAttribute("name"))}pickTab=(l)=>{let{tabs:i}=this.parts,h=l.target,y=h.closest("button.close")!==null,x=h.closest(".tabs > div"),o=[...i.children].indexOf(x);if(y){let C=this.bodies[o];if(!this.onCloseTab||this.onCloseTab(C)!==!1)this.removeTabBody(this.bodies[o])}else if(o>-1)this.value=o};setupTabs=()=>{let{tabs:l}=this.parts,i=[...this.children].filter((h)=>!h.hasAttribute("slot")&&h.hasAttribute("name"));if(l.textContent="",this.value>=i.length)this.value=i.length-1;for(let h in i){let y=i[h],x=`${this.instanceId}-${h}`;y.id=x;let o=this.makeTab(this,y,x);l.append(o)}};connectedCallback(){super.connectedCallback();let{tabs:l}=this.parts;l.addEventListener("click",this.pickTab),l.addEventListener("keydown",this.keyTab),this.setupTabs(),A1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),A1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};onResize(){this.queueRender()}render(){let{tabs:l,selected:i}=this.parts,h=this.bodies;for(let y=0;y<h.length;y++){let x=h[y],o=l.children[y];if(this.value===Number(y))o.setAttribute("aria-selected","true"),i.style.marginLeft=`${o.offsetLeft-l.offsetLeft}px`,i.style.width=`${o.offsetWidth}px`,x.toggleAttribute("hidden",!1);else o.toggleAttribute("aria-selected",!1),x.toggleAttribute("hidden",!0)}}}var Yi=M0,e2=M0.elementCreator(),Ni=e2,Xi=e2;var E2=(async()=>{}).constructor;function b1(l,i){let h=l;for(let y of i)h=h.replace(new RegExp(`import \\{([^}]*)\\} from '${y}'`,"g"),(x,o)=>{return`const { ${o.replace(/\s+/g," ").trim()} } = ${y.replace(/-/g,"")}`});return h}async function B8(l,i,h){let y=b1(l,Object.keys(i)),x=h(y,{transforms:["typescript"]}).code,o=Object.keys(i).map((g)=>g.replace(/-/g,"")),C=Object.values(i);await new E2(...o,x)(...C)}var Ri=(l,i)=>{if(i.transforms.includes("typescript"))throw Error('TypeScript examples require the "sucrase" package. Install it with: npm install sucrase');return{code:l}},$i="https://cdn.jsdelivr.net/npm/sucrase@3.35.0/+esm";async function m0(){try{let{transform:l}=await import("sucrase");return l}catch{}try{let{transform:l}=await import($i);return l}catch{return console.warn("sucrase not available — TypeScript examples will not work. "+"Install with: npm install sucrase"),Ri}}var L0="live-example-payload";function f8(l,i,h){return h!==""?`${l}-${h}`:`${l}-${i}`}function Z5(l,i){try{localStorage.setItem(l,JSON.stringify(i))}catch(h){console.warn("live-example: failed to write to localStorage",h)}}function Zi(l){if(l===null)return null;try{return JSON.parse(l)}catch{return null}}function z8(l,i,h,y,x){let o=location.href.split("?")[0]+`?${l}=${i}`;Z5(h,{remoteKey:y,sentAt:Date.now(),...x}),window.open(o)}var bi=typeof BroadcastChannel<"u";class l0{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(l,i,h){this.storageKey=l,this.remoteKey=i,this.onReceive=h}handlePayload=(l)=>{if(l.sentAt<=this.lastUpdate)return;if(l.remoteKey!==this.remoteKey)return;this.lastUpdate=l.sentAt,this.onReceive(l)};handleMessage=(l)=>{let i=l.data;if(i)this.handlePayload(i)};handlePoll=()=>{let l=null;try{l=localStorage.getItem(this.storageKey)}catch{return}let i=Zi(l);if(i)this.handlePayload(i)};startListening(){if(this.listening)return;if(this.listening=!0,bi)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(l){let i={remoteKey:this.remoteKey,sentAt:Date.now(),...l};if(Z5(this.storageKey,i),this.channel)this.channel.postMessage(i)}sendClose(){let l={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(Z5(this.storageKey,l),this.channel)this.channel.postMessage(l)}}var{div:v8}=f;function Ji(l,i){let h=l.customElements;if(!h)return;let y=(o)=>{if(!o||h.get(o))return;let C=customElements.get(o);if(C)try{h.define(o,C)}catch{}};for(let o of Object.values(i))if(o&&typeof o==="object"){for(let C of Object.values(o))if(typeof C==="function"&&"tagName"in C)y(C.tagName)}let x=l.document;if(x){let o=x.querySelectorAll("*");for(let C of o){let s=C.tagName.toLowerCase();if(s.includes("-"))y(s)}}}async function e0(l){let{html:i,css:h,js:y,context:x,transform:o,exampleElement:C,styleElement:s,widgetsElement:g,onError:k}=l,c=v8({class:"preview"});c.innerHTML=i,s.innerText=h;let d=C.querySelector(".preview");if(d)d.replaceWith(c);else C.insertBefore(c,g);let n={preview:c,...x};try{let v=b1(y,Object.keys(x)),p=o(v,{transforms:["typescript"]}).code,j=Object.keys(n).map((V)=>V.replace(/-/g,"")),P=Object.values(n);await new E2(...j,p)(...P)}catch(v){if(console.error(v),c.append(v8({class:"preview-error"},String(v.message||v))),k)k(v);else window.alert(`Error: ${v}, the console may have more information…`)}return c}async function E0(l){let{html:i,css:h,js:y,context:x,transform:o,exampleElement:C,widgetsElement:s,onError:g}=l,k=C.querySelector("iframe.preview-iframe");if(!k){k=document.createElement("iframe"),k.className="preview-iframe",k.style.cssText="width: 100%; height: 100%; border: none;";let p=C.querySelector(".preview");if(p)p.replaceWith(k);else C.insertBefore(k,s)}let c=k.contentDocument;if(!c)return console.error("Could not access iframe document"),null;let d=k.contentWindow;if(x.tosijs)d.tosijs=x.tosijs;if(x["tosijs-ui"])d.tosijsui=x["tosijs-ui"];c.open(),c.write(`<!DOCTYPE html>
76
+ `+y;else h.push(y)}return h},[]);this.innerHTML=i.map((h)=>h.startsWith("<")&&h.endsWith(">")?h:G(h,this.options)).join("")}else this.innerHTML=G(l,this.options);this.didRender()}}var Gi=u0,L2=u0.elementCreator(),Ki=L2,ai=L2;var{div:l2,slot:p8,span:Qi,button:Wi}=f;class M0 extends z{static preferredTagName="tosi-tabs";static initAttributes={localized:!1};value=0;makeTab(l,i,h){let y=i.getAttribute("name"),x=i.querySelector('template[role="tab"]')?.content.cloneNode(!0)||(this.localized?q1(y):Qi(y)),o=l2(x,{part:"tab",tabindex:0,role:"tab",ariaControls:h},i.hasAttribute("data-close")?Wi({title:"close",class:"close"},B.x()):{}),C=i.dataset.tooltip;if(C)o.dataset.tooltip=C;return o}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:`${r.spacing50} ${r.spacing}`,cursor:"default",display:"flex",alignItems:"baseline"},':host .tabs > [aria-selected="true"]':{"--text-color":r.tosiTabsSelectedColor,color:r.textColor},":host .elastic":{flex:"1"},":host .border":{background:r.tosiTabsBarColor},":host .border > .selected":{content:" ",width:0,height:r.tosiTabsBarHeight,background:r.tosiTabsSelectedColor,transition:"ease-out 0.2s"},":host button.close":{border:0,background:"transparent",textAlign:"center",marginLeft:r.spacing50,padding:0},":host button.close > svg":{height:"12px"}};onCloseTab=null;content=[l2({role:"tabpanel",part:"tabpanel"},l2({part:"tabrow"},l2({class:"tabs",part:"tabs"}),l2({class:"elastic"}),p8({name:"after-tabs"})),l2({class:"border"},l2({class:"selected",part:"selected"}))),p8()];addTabBody(l,i=!1){if(!l.hasAttribute("name"))throw console.error("element has no name attribute",l),Error("element has no name attribute");if(this.append(l),this.setupTabs(),i)this.value=this.bodies.length-1;this.queueRender()}removeTabBody(l){l.remove(),this.setupTabs(),this.queueRender()}keyTab=(l)=>{let{tabs:i}=this.parts,h=[...i.children].indexOf(l.target);switch(l.key){case"ArrowLeft":this.value=(h+Number(i.children.length)-1)%i.children.length,i.children[this.value].focus(),l.preventDefault();break;case"ArrowRight":this.value=(h+1)%i.children.length,i.children[this.value].focus(),l.preventDefault();break;case" ":this.pickTab(l),l.preventDefault();break;default:}};get bodies(){return[...this.children].filter((l)=>l.hasAttribute("name"))}pickTab=(l)=>{let{tabs:i}=this.parts,h=l.target,y=h.closest("button.close")!==null,x=h.closest(".tabs > div"),o=[...i.children].indexOf(x);if(y){let C=this.bodies[o];if(!this.onCloseTab||this.onCloseTab(C)!==!1)this.removeTabBody(this.bodies[o])}else if(o>-1)this.value=o};setupTabs=()=>{let{tabs:l}=this.parts,i=[...this.children].filter((h)=>!h.hasAttribute("slot")&&h.hasAttribute("name"));if(l.textContent="",this.value>=i.length)this.value=i.length-1;for(let h in i){let y=i[h],x=`${this.instanceId}-${h}`;y.id=x;let o=this.makeTab(this,y,x);l.append(o)}};connectedCallback(){super.connectedCallback();let{tabs:l}=this.parts;l.addEventListener("click",this.pickTab),l.addEventListener("keydown",this.keyTab),this.setupTabs(),A1.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),A1.allInstances.delete(this)}localeChanged=()=>{this.queueRender()};onResize(){this.queueRender()}render(){let{tabs:l,selected:i}=this.parts,h=this.bodies;for(let y=0;y<h.length;y++){let x=h[y],o=l.children[y];if(this.value===Number(y))o.setAttribute("aria-selected","true"),i.style.marginLeft=`${o.offsetLeft-l.offsetLeft}px`,i.style.width=`${o.offsetWidth}px`,x.toggleAttribute("hidden",!1);else o.toggleAttribute("aria-selected",!1),x.toggleAttribute("hidden",!0)}}}var Yi=M0,e2=M0.elementCreator(),Ni=e2,Xi=e2;var E2=(async()=>{}).constructor;function b1(l,i){let h=l;for(let y of i)h=h.replace(new RegExp(`import \\{([^}]*)\\} from '${y}'`,"g"),(x,o)=>{return`const { ${o.replace(/\s+/g," ").trim()} } = ${y.replace(/-/g,"")}`});return h}async function B8(l,i,h){let y=b1(l,Object.keys(i)),x=h(y,{transforms:["typescript"]}).code,o=Object.keys(i).map((g)=>g.replace(/-/g,"")),C=Object.values(i);await new E2(...o,x)(...C)}var Ri=(l,i)=>{if(i.transforms.includes("typescript"))throw Error('TypeScript examples require the "sucrase" package. Install it with: npm install sucrase');return{code:l}},$i="https://cdn.jsdelivr.net/npm/sucrase@3.35.0/+esm";async function m0(){try{let{transform:l}=await import("sucrase");return l}catch{}try{let{transform:l}=await import($i);return l}catch{return console.warn("sucrase not available — TypeScript examples will not work. "+"Install with: npm install sucrase"),Ri}}var L0="live-example-payload";function f8(l,i,h){return h!==""?`${l}-${h}`:`${l}-${i}`}function Z5(l,i){try{localStorage.setItem(l,JSON.stringify(i))}catch(h){console.warn("live-example: failed to write to localStorage",h)}}function Zi(l){if(l===null)return null;try{return JSON.parse(l)}catch{return null}}function z8(l,i,h,y,x){let o=location.href.split("?")[0]+`?${l}=${i}`;Z5(h,{remoteKey:y,sentAt:Date.now(),...x}),window.open(o)}var bi=typeof BroadcastChannel<"u";class l0{storageKey;remoteKey;lastUpdate=0;interval;channel;listening=!1;onReceive;constructor(l,i,h){this.storageKey=l,this.remoteKey=i,this.onReceive=h}handlePayload=(l)=>{if(l.sentAt<=this.lastUpdate)return;if(l.remoteKey!==this.remoteKey)return;this.lastUpdate=l.sentAt,this.onReceive(l)};handleMessage=(l)=>{let i=l.data;if(i)this.handlePayload(i)};handlePoll=()=>{let l=null;try{l=localStorage.getItem(this.storageKey)}catch{return}let i=Zi(l);if(i)this.handlePayload(i)};startListening(){if(this.listening)return;if(this.listening=!0,bi)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(l){let i={remoteKey:this.remoteKey,sentAt:Date.now(),...l};if(Z5(this.storageKey,i),this.channel)this.channel.postMessage(i)}sendClose(){let l={remoteKey:this.remoteKey,sentAt:Date.now(),css:"",html:"",js:"",close:!0};if(Z5(this.storageKey,l),this.channel)this.channel.postMessage(l)}}var{div:v8}=f;function Ji(l,i){let h=l.customElements;if(!h)return;let y=(o)=>{if(!o||h.get(o))return;let C=customElements.get(o);if(C)try{h.define(o,C)}catch{}};for(let o of Object.values(i))if(o&&typeof o==="object"){for(let C of Object.values(o))if(typeof C==="function"&&"tagName"in C)y(C.tagName)}let x=l.document;if(x){let o=x.querySelectorAll("*");for(let C of o){let s=C.tagName.toLowerCase();if(s.includes("-"))y(s)}}}async function e0(l){let{html:i,css:h,js:y,context:x,transform:o,exampleElement:C,styleElement:s,widgetsElement:g,onError:k}=l,c=v8({class:"preview"});c.innerHTML=i,s.innerText=h;let d=C.querySelector(".preview");if(d)d.replaceWith(c);else C.insertBefore(c,g);let n={preview:c,...x};try{let v=b1(y,Object.keys(x)),p=o(v,{transforms:["typescript"]}).code,t=Object.keys(n).map((V)=>V.replace(/-/g,"")),_=Object.values(n);await new E2(...t,p)(..._)}catch(v){if(console.error(v),c.append(v8({class:"preview-error"},String(v.message||v))),k)k(v);else window.alert(`Error: ${v}, the console may have more information…`)}return c}async function E0(l){let{html:i,css:h,js:y,context:x,transform:o,exampleElement:C,widgetsElement:s,onError:g}=l,k=C.querySelector("iframe.preview-iframe");if(!k){k=document.createElement("iframe"),k.className="preview-iframe",k.style.cssText="width: 100%; height: 100%; border: none;";let p=C.querySelector(".preview");if(p)p.replaceWith(k);else C.insertBefore(k,s)}let c=k.contentDocument;if(!c)return console.error("Could not access iframe document"),null;let d=k.contentWindow;if(x.tosijs)d.tosijs=x.tosijs;if(x["tosijs-ui"])d.tosijsui=x["tosijs-ui"];c.open(),c.write(`<!DOCTYPE html>
77
77
  <html>
78
78
  <head>
79
79
  <style>
@@ -85,19 +85,19 @@ Please report this to https://github.com/markedjs/marked.`,l){let y="<p>An error
85
85
  <body>
86
86
  <div class="preview">${i}</div>
87
87
  </body>
88
- </html>`),c.close(),Ji(d,x);let n=c.querySelector(".preview");if(!n)return console.error("Could not find preview element in iframe"),null;let v={preview:n,...x};try{let p=b1(y,Object.keys(x)),j=o(p,{transforms:["typescript"]}).code,P=d.eval("(async () => {}).constructor"),_=Object.keys(v).map((Z)=>Z.replace(/-/g,"")),V=Object.values(v);await new P(..._,j)(...V)}catch(p){console.error(p);let j=c.createElement("div");if(j.className="preview-error",j.textContent=String(p.message||p),n.append(j),g)g(p);else window.alert(`Error: ${p}, the console may have more information…`)}return n}function l4(l,i,h,y){let x=[...l.querySelectorAll(".language-html,.language-js,.language-css,.language-test")].filter((o)=>!o.closest(y)).map((o)=>({block:o.parentElement,language:o.classList[0].split("-").pop(),code:o.innerText}));for(let o=0;o<x.length;o+=1){let C=[x[o]];while(o<x.length-1&&x[o].block.nextElementSibling===x[o+1].block)C.push(x[o+1]),o+=1;let s=h({context:i});C[0].block.parentElement.insertBefore(s,C[0].block),C.forEach((k)=>{switch(k.language){case"js":s.js=k.code;break;case"html":s.html=k.code;break;case"css":s.css=k.code;break;case"test":s.test=k.code;break}k.block.remove()}),s.showDefaultTab()}}var t8={":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.-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"}};class b5 extends Error{constructor(l){super(l);this.name="AssertionError"}}var Hi=/\/(index|module|iife|module\.debug|module\.safe)\.js$/;function Si(l){if(!l)return null;for(let i of l.split(`
88
+ </html>`),c.close(),Ji(d,x);let n=c.querySelector(".preview");if(!n)return console.error("Could not find preview element in iframe"),null;let v={preview:n,...x};try{let p=b1(y,Object.keys(x)),t=o(p,{transforms:["typescript"]}).code,_=d.eval("(async () => {}).constructor"),P=Object.keys(v).map((Z)=>Z.replace(/-/g,"")),V=Object.values(v);await new _(...P,t)(...V)}catch(p){console.error(p);let t=c.createElement("div");if(t.className="preview-error",t.textContent=String(p.message||p),n.append(t),g)g(p);else window.alert(`Error: ${p}, the console may have more information…`)}return n}function l4(l,i,h,y){let x=[...l.querySelectorAll(".language-html,.language-js,.language-css,.language-test")].filter((o)=>!o.closest(y)).map((o)=>({block:o.parentElement,language:o.classList[0].split("-").pop(),code:o.innerText}));for(let o=0;o<x.length;o+=1){let C=[x[o]];while(o<x.length-1&&x[o].block.nextElementSibling===x[o+1].block)C.push(x[o+1]),o+=1;let s=h({context:i});C[0].block.parentElement.insertBefore(s,C[0].block),C.forEach((k)=>{switch(k.language){case"js":s.js=k.code;break;case"html":s.html=k.code;break;case"css":s.css=k.code;break;case"test":s.test=k.code;break}k.block.remove()}),s.showDefaultTab()}}var j8={":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.-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"}};class b5 extends Error{constructor(l){super(l);this.name="AssertionError"}}var Hi=/\/(index|module|iife|module\.debug|module\.safe)\.js$/;function Si(l){if(!l)return null;for(let i of l.split(`
89
89
  `)){let h=i.trim();if(!h)continue;if(/^\w*Error[:\s]/.test(h))continue;let y=h.match(/[(@\s]([^()\s]+):(\d+):(\d+)\)?$/);if(!y)continue;let[,x,o,C]=y;if(Hi.test(x))continue;return{url:x,line:Number(o),col:Number(C)}}return null}var i4=null;function Di(l){if(!i4||l<1)return null;return i4.split(`
90
- `)[l-1]?.trim()||null}function j8(l,i){if(l===i)return!0;if(typeof l!==typeof i)return!1;if(l===null||i===null)return l===i;if(typeof l!=="object")return!1;let h=l,y=i;if(Array.isArray(h)!==Array.isArray(y))return!1;let x=Object.keys(h),o=Object.keys(y);if(x.length!==o.length)return!1;return x.every((C)=>j8(h[C],y[C]))}var Ii=5000,Ti={stringify(l){if(typeof l>"u")return"undefined";if(l===null)return"null";if(typeof Element<"u"&&l instanceof Element)return`<${l.tagName.toLowerCase()}>`;if(typeof Node<"u"&&l instanceof Node)return`[${l.nodeName}]`;try{return JSON.stringify(l)}catch{return String(l)}}},{stringify:_1}=Ti;function A8(l,i=!1){let h=(x,o)=>{if(!(i?!x:x)){let s=new b5(i?`not: ${o}`:o),g=Si(s.stack);if(g){let k=Di(g.line),c=`line ${g.line}`;s.message=k?`${s.message} | ${k} (${c})`:`${s.message} (${c})`}throw s}};return{toBe(x){h(l===x,`Expected ${_1(l)} to be ${_1(x)}`)},toEqual(x){h(j8(l,x),`Expected ${_1(l)} to equal ${_1(x)}`)},toBeTruthy(){h(!!l,`Expected ${_1(l)} to be truthy`)},toBeFalsy(){h(!l,`Expected ${_1(l)} to be falsy`)},toBeNull(){h(l===null,`Expected ${_1(l)} to be null`)},toBeUndefined(){h(l===void 0,`Expected ${_1(l)} to be undefined`)},toBeDefined(){h(l!==void 0,`Expected ${_1(l)} to be defined`)},toContain(x){if(typeof l==="string")h(l.includes(x),`Expected "${l}" to contain "${x}"`);else if(Array.isArray(l))h(l.includes(x),`Expected array to contain ${_1(x)}`);else throw new b5("toContain requires string or array")},toHaveLength(x){let o=l.length;h(o===x,`Expected length ${o} to be ${x}`)},toMatch(x){h(x.test(l),`Expected "${l}" to match ${x}`)},toBeGreaterThan(x){h(l>x,`Expected ${l} to be greater than ${x}`)},toBeLessThan(x){h(l<x,`Expected ${l} to be less than ${x}`)},toBeInstanceOf(x){h(l instanceof x,`Expected value to be instance of ${x.name}`)},get not(){return A8(l,!i)}}}function J5(l){return A8(l)}function ui(l){return new Promise((i)=>setTimeout(i,l))}function Mi(l,i,h=1000){return new Promise((y,x)=>{let o=Date.now(),C=()=>{let s=l.querySelector(i);if(s){y(s);return}if(Date.now()-o>=h){x(Error(`Timeout waiting for "${i}" after ${h}ms`));return}requestAnimationFrame(C)};C()})}function mi(l,i,h){return Promise.race([l,new Promise((y,x)=>setTimeout(()=>x(Error(`Test "${h}" timed out after ${i}ms`)),i))])}function H5(l,i=Ii){let h="",y=[];return{pending:y,expect:J5,test(x,o){let C=h?`${h} > ${x}`:x;try{let s=o();if(s instanceof Promise){let g=mi(s,i,C).then(()=>{l.push({name:C,passed:!0})}).catch((k)=>{l.push({name:C,passed:!1,error:k.message})});y.push(g)}else l.push({name:C,passed:!0})}catch(s){l.push({name:C,passed:!1,error:s.message})}},describe(x,o){let C=h;h=h?`${h} > ${x}`:x,o(),h=C}}}async function h4(l,i,h,y){let x=[],o=H5(x),C={preview:i,...h,expect:o.expect,test:o.test,describe:o.describe,waitMs:ui,waitFor:(s,g)=>Mi(i,s,g)};try{let s=b1(l,Object.keys(h)),g=y(s,{transforms:["typescript"]}).code,k=Object.keys(C).map((v)=>v.replace(/-/g,"")),c=Object.values(C),d=`${g}
91
- //# sourceURL=inline-test`;i4=g,await new E2(...k,d)(...c)}catch(s){x.push({name:"Test execution",passed:!1,error:s.message})}if(o.pending.length>0)await Promise.all(o.pending);return i4=null,{passed:x.filter((s)=>s.passed).length,failed:x.filter((s)=>!s.passed).length,tests:x}}var{div:j2,tosiSlot:Li,style:ei,button:i2,pre:q8,span:P8}=f,S5="tosijs-ui-tests-enabled",Ei=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function lh(){if(typeof localStorage>"u")return!1;let l=localStorage.getItem(S5);if(l!==null)return l==="true";return Ei}var{testManager:r1}=E({testManager:{enabled:lh()}});function y4(){document.body.classList.toggle("tests-enabled",r1.enabled.value),document.body.style.setProperty("--tests-enabled",r1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)y4();else document.addEventListener("DOMContentLoaded",y4);function D5(){localStorage.setItem(S5,"true"),r1.enabled.value=!0,y4(),document.querySelectorAll("tosi-example").forEach((l)=>{l.refresh()})}function I5(){localStorage.setItem(S5,"false"),r1.enabled.value=!1,y4()}class h2 extends z{static preferredTagName="tosi-example";static lightStyleSpec=t8;static initAttributes={persistToDom:!1,iframe:!1};prefix="lx";storageKey=L0;context={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;static insertExamples(l,i={}){l4(l,i,x4,h2.tagName)}get activeTab(){let{editors:l}=this.parts;return[...l.children].find((i)=>i.getAttribute("hidden")===null)}get hydrated(){try{return this.parts.js!==void 0}catch{return!1}}getEditorValue(l){if(!this.hydrated)return this.pendingValues[l]??"";return this.parts[l].value}setEditorValue(l,i){if(!this.hydrated){this.pendingValues[l]=i;return}let h=this.parts[l];h.value=i}flushPendingValues(){for(let[l,i]of Object.entries(this.pendingValues)){let h=this.parts[l];if(h)h.value=i}if(this.pendingValues={},this.pendingShowDefaultTab)this.pendingShowDefaultTab=!1,this.showDefaultTab()}get css(){return this.getEditorValue("css")}set css(l){this.setEditorValue("css",l)}get html(){return this.getEditorValue("html")}set html(l){this.setEditorValue("html",l)}get js(){return this.getEditorValue("js")}set js(l){this.setEditorValue("js",l)}get test(){return this.getEditorValue("test")}set test(l){this.setEditorValue("test",l)}get remoteKey(){return f8(this.prefix,this.uuid,this.remoteId)}updateUndo=()=>{let{activeTab:l}=this,{undo:i,redo:h}=this.parts;if(l instanceof m1&&l.editor!==void 0){let y=l.editor.session.getUndoManager();i.disabled=!y.hasUndo(),h.disabled=!y.hasRedo()}else i.disabled=!0,h.disabled=!0;this.updateTestResultsVisibility()};updateTestResultsVisibility(){let{testResults:l}=this.parts,i=this.testResults,h=this.activeTab?.getAttribute("name")==="test",y=i&&i.failed>0;l.hidden=!i||i.tests.length===0||!h&&!y}undo=()=>{let{activeTab:l}=this;if(l instanceof m1)l.editor.undo()};redo=()=>{let{activeTab:l}=this;if(l instanceof m1)l.editor.redo()};get isMaximized(){return this.classList.contains("-maximize")}flipLayout=()=>{this.classList.toggle("-vertical")};exampleMenu=()=>{let l=r1.enabled.value;H({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:l?"check":"",caption:"Run tests",action:()=>{if(l)I5();else D5()}}]})};handleShortcuts=(l)=>{if(l.metaKey||l.ctrlKey){let i=!1;switch(l.key){case"s":case"r":this.refresh(),i=!0;break;case"/":this.flipLayout();break;case"c":if(l.shiftKey)this.copy(),i=!0;break}if(i)l.preventDefault(),l.stopPropagation()}};content=()=>[j2({part:"example"},ei({part:"style"}),j2({part:"testIndicator",title:"test status"}),q8({part:"testResults",hidden:!0}),i2({title:"example menu",part:"exampleWidgets",onClick:this.exampleMenu},B.code())),j2({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0},e2({part:"editors",onChange:this.updateUndo},p2({name:"js",mode:"javascript",part:"js"}),p2({name:"html",mode:"html",part:"html"}),p2({name:"css",mode:"css",part:"css"}),p2({name:"test",mode:"javascript",part:"test"}),j2({slot:"after-tabs",class:"row"},i2({title:"undo",part:"undo",class:"transparent",onClick:this.undo},B.cornerUpLeft()),i2({title:"redo",part:"redo",class:"transparent",onClick:this.redo},B.cornerUpRight()),i2({title:"flip direction (⌘/ | ^/)",class:"transparent",onClick:this.flipLayout},B.columns({class:"layout-indicator"})),i2({title:"copy as markdown (⌘⇧C | ^⇧C)",class:"transparent",onClick:this.copy},B.copy()),i2({title:"reload (⌘R | ^R)",class:"transparent",onClick:this.refreshRemote},B.refreshCw()),i2({title:"close code",class:"transparent",onClick:this.closeCode},B.x())))),Li({part:"sources",hidden:!0})];connectedCallback(){super.connectedCallback(),this.flushPendingValues();let{sources:l}=this.parts;this.initFromElements([...l.children]),this.remoteSync=new l0(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 i=Math.random()*100;this.undoInterval=setInterval(()=>{if(!document.hidden)this.updateUndo()},250+i),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}copy=()=>{let l=this.js!==""?"```js\n"+this.js.trim()+"\n```\n":"",i=this.html!==""?"```html\n"+this.html.trim()+"\n```\n":"",h=this.css!==""?"```css\n"+this.css.trim()+"\n```\n":"",y=this.test!==""?"```test\n"+this.test.trim()+"\n```\n":"";navigator.clipboard.writeText(l+i+h+y)};toggleMaximize=()=>{this.classList.toggle("-maximize")};showCode=()=>{this.classList.add("-maximize"),this.classList.toggle("-vertical",this.offsetHeight>this.offsetWidth),this.parts.codeEditors.hidden=!1};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:l,html:i,js:h,test:y}=this;z8(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:l,html:i,js:h,test:y}),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:l}=this.parts;l.innerText="";for(let i of["js","css","html","test"])if(this[i])l.append(q8({class:`language-${i}`,innerHTML:this[i]}))}};refresh=async()=>{if(this.remoteId!=="")return;let l=await m0(),{example:i,style:h,exampleWidgets:y}=this.parts,x,o,C=(s)=>{o=s};if(this.iframe)x=await E0({html:this.html,css:this.css,js:this.js,context:this.context,transform:l,exampleElement:i,widgetsElement:y,onError:C});else x=await e0({html:this.html,css:this.css,js:this.js,context:this.context,transform:l,exampleElement:i,styleElement:h,widgetsElement:y,onError:C});if(this.persistToDom)this.updateSources();if((this.test||o)&&x&&r1.enabled.value){if(await new Promise((s)=>requestAnimationFrame(s)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed"),this.testResults=this.test?await h4(this.test,x,this.context,l):{passed:0,failed:0,tests:[]},o)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(o)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:l,testIndicator:i}=this.parts,h=this.testResults;if(!h||h.tests.length===0){l.hidden=!0,this.classList.remove("-test-passed","-test-failed"),i.title="no tests";return}l.innerHTML="";let y=j2({style:{marginBottom:"8px",fontWeight:"bold"}},`${h.passed}/${h.tests.length} tests passed`);l.append(y);for(let x of h.tests){let o=x.passed?"✓":"✗",C=x.passed?"test-pass":"test-fail",s=j2({class:C},P8(o+" "),x.name,x.error?P8({style:{opacity:"0.7"}},` - ${x.error}`):"");l.append(s)}this.classList.toggle("-test-passed",h.failed===0),this.classList.toggle("-test-failed",h.failed>0),i.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(l){for(let i of l){i.hidden=!0;let[h,...y]=i.innerHTML.split(`
90
+ `)[l-1]?.trim()||null}function t8(l,i){if(l===i)return!0;if(typeof l!==typeof i)return!1;if(l===null||i===null)return l===i;if(typeof l!=="object")return!1;let h=l,y=i;if(Array.isArray(h)!==Array.isArray(y))return!1;let x=Object.keys(h),o=Object.keys(y);if(x.length!==o.length)return!1;return x.every((C)=>t8(h[C],y[C]))}var Ii=5000,Ti={stringify(l){if(typeof l>"u")return"undefined";if(l===null)return"null";if(typeof Element<"u"&&l instanceof Element)return`<${l.tagName.toLowerCase()}>`;if(typeof Node<"u"&&l instanceof Node)return`[${l.nodeName}]`;try{return JSON.stringify(l)}catch{return String(l)}}},{stringify:P1}=Ti;function A8(l,i=!1){let h=(x,o)=>{if(!(i?!x:x)){let s=new b5(i?`not: ${o}`:o),g=Si(s.stack);if(g){let k=Di(g.line),c=`line ${g.line}`;s.message=k?`${s.message} | ${k} (${c})`:`${s.message} (${c})`}throw s}};return{toBe(x){h(l===x,`Expected ${P1(l)} to be ${P1(x)}`)},toEqual(x){h(t8(l,x),`Expected ${P1(l)} to equal ${P1(x)}`)},toBeTruthy(){h(!!l,`Expected ${P1(l)} to be truthy`)},toBeFalsy(){h(!l,`Expected ${P1(l)} to be falsy`)},toBeNull(){h(l===null,`Expected ${P1(l)} to be null`)},toBeUndefined(){h(l===void 0,`Expected ${P1(l)} to be undefined`)},toBeDefined(){h(l!==void 0,`Expected ${P1(l)} to be defined`)},toContain(x){if(typeof l==="string")h(l.includes(x),`Expected "${l}" to contain "${x}"`);else if(Array.isArray(l))h(l.includes(x),`Expected array to contain ${P1(x)}`);else throw new b5("toContain requires string or array")},toHaveLength(x){let o=l.length;h(o===x,`Expected length ${o} to be ${x}`)},toMatch(x){h(x.test(l),`Expected "${l}" to match ${x}`)},toBeGreaterThan(x){h(l>x,`Expected ${l} to be greater than ${x}`)},toBeLessThan(x){h(l<x,`Expected ${l} to be less than ${x}`)},toBeInstanceOf(x){h(l instanceof x,`Expected value to be instance of ${x.name}`)},get not(){return A8(l,!i)}}}function J5(l){return A8(l)}function ui(l){return new Promise((i)=>setTimeout(i,l))}function Mi(l,i,h=1000){return new Promise((y,x)=>{let o=Date.now(),C=()=>{let s=l.querySelector(i);if(s){y(s);return}if(Date.now()-o>=h){x(Error(`Timeout waiting for "${i}" after ${h}ms`));return}requestAnimationFrame(C)};C()})}function mi(l,i,h){return Promise.race([l,new Promise((y,x)=>setTimeout(()=>x(Error(`Test "${h}" timed out after ${i}ms`)),i))])}function H5(l,i=Ii){let h="",y=[];return{pending:y,expect:J5,test(x,o){let C=h?`${h} > ${x}`:x;try{let s=o();if(s instanceof Promise){let g=mi(s,i,C).then(()=>{l.push({name:C,passed:!0})}).catch((k)=>{l.push({name:C,passed:!1,error:k.message})});y.push(g)}else l.push({name:C,passed:!0})}catch(s){l.push({name:C,passed:!1,error:s.message})}},describe(x,o){let C=h;h=h?`${h} > ${x}`:x,o(),h=C}}}async function h4(l,i,h,y){let x=[],o=H5(x),C={preview:i,...h,expect:o.expect,test:o.test,describe:o.describe,waitMs:ui,waitFor:(s,g)=>Mi(i,s,g)};try{let s=b1(l,Object.keys(h)),g=y(s,{transforms:["typescript"]}).code,k=Object.keys(C).map((v)=>v.replace(/-/g,"")),c=Object.values(C),d=`${g}
91
+ //# sourceURL=inline-test`;i4=g,await new E2(...k,d)(...c)}catch(s){x.push({name:"Test execution",passed:!1,error:s.message})}if(o.pending.length>0)await Promise.all(o.pending);return i4=null,{passed:x.filter((s)=>s.passed).length,failed:x.filter((s)=>!s.passed).length,tests:x}}var{div:t2,tosiSlot:Li,style:ei,button:i2,pre:q8,span:_8}=f,S5="tosijs-ui-tests-enabled",Ei=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function lh(){if(typeof localStorage>"u")return!1;let l=localStorage.getItem(S5);if(l!==null)return l==="true";return Ei}var{testManager:r1}=E({testManager:{enabled:lh()}});function y4(){document.body.classList.toggle("tests-enabled",r1.enabled.value),document.body.style.setProperty("--tests-enabled",r1.enabled.value?"1":"0")}if(typeof document<"u")if(document.body)y4();else document.addEventListener("DOMContentLoaded",y4);function D5(){localStorage.setItem(S5,"true"),r1.enabled.value=!0,y4(),document.querySelectorAll("tosi-example").forEach((l)=>{l.refresh()})}function I5(){localStorage.setItem(S5,"false"),r1.enabled.value=!1,y4()}class h2 extends z{static preferredTagName="tosi-example";static lightStyleSpec=j8;static initAttributes={persistToDom:!1,iframe:!1};prefix="lx";storageKey=L0;context={};uuid=crypto.randomUUID();remoteId="";remoteSync;undoInterval;testResults;pendingValues={};pendingShowDefaultTab=!1;beforeUnloadHandler;static insertExamples(l,i={}){l4(l,i,x4,h2.tagName)}get activeTab(){let{editors:l}=this.parts;return[...l.children].find((i)=>i.getAttribute("hidden")===null)}get hydrated(){try{return this.parts.js!==void 0}catch{return!1}}getEditorValue(l){if(!this.hydrated)return this.pendingValues[l]??"";return this.parts[l].value}setEditorValue(l,i){if(!this.hydrated){this.pendingValues[l]=i;return}let h=this.parts[l];h.value=i}flushPendingValues(){for(let[l,i]of Object.entries(this.pendingValues)){let h=this.parts[l];if(h)h.value=i}if(this.pendingValues={},this.pendingShowDefaultTab)this.pendingShowDefaultTab=!1,this.showDefaultTab()}get css(){return this.getEditorValue("css")}set css(l){this.setEditorValue("css",l)}get html(){return this.getEditorValue("html")}set html(l){this.setEditorValue("html",l)}get js(){return this.getEditorValue("js")}set js(l){this.setEditorValue("js",l)}get test(){return this.getEditorValue("test")}set test(l){this.setEditorValue("test",l)}get remoteKey(){return f8(this.prefix,this.uuid,this.remoteId)}updateUndo=()=>{let{activeTab:l}=this,{undo:i,redo:h}=this.parts;if(l instanceof m1&&l.editor!==void 0){let y=l.editor.session.getUndoManager();i.disabled=!y.hasUndo(),h.disabled=!y.hasRedo()}else i.disabled=!0,h.disabled=!0;this.updateTestResultsVisibility()};updateTestResultsVisibility(){let{testResults:l}=this.parts,i=this.testResults,h=this.activeTab?.getAttribute("name")==="test",y=i&&i.failed>0;l.hidden=!i||i.tests.length===0||!h&&!y}undo=()=>{let{activeTab:l}=this;if(l instanceof m1)l.editor.undo()};redo=()=>{let{activeTab:l}=this;if(l instanceof m1)l.editor.redo()};get isMaximized(){return this.classList.contains("-maximize")}flipLayout=()=>{this.classList.toggle("-vertical")};exampleMenu=()=>{let l=r1.enabled.value;H({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:l?"check":"",caption:"Run tests",action:()=>{if(l)I5();else D5()}}]})};handleShortcuts=(l)=>{if(l.metaKey||l.ctrlKey){let i=!1;switch(l.key){case"s":case"r":this.refresh(),i=!0;break;case"/":this.flipLayout();break;case"c":if(l.shiftKey)this.copy(),i=!0;break}if(i)l.preventDefault(),l.stopPropagation()}};content=()=>[t2({part:"example"},ei({part:"style"}),t2({part:"testIndicator",title:"test status"}),q8({part:"testResults",hidden:!0}),i2({title:"example menu",part:"exampleWidgets",onClick:this.exampleMenu},B.code())),t2({class:"code-editors",part:"codeEditors",onKeydown:this.handleShortcuts,hidden:!0},e2({part:"editors",onChange:this.updateUndo},p2({name:"js",mode:"javascript",part:"js"}),p2({name:"html",mode:"html",part:"html"}),p2({name:"css",mode:"css",part:"css"}),p2({name:"test",mode:"javascript",part:"test"}),t2({slot:"after-tabs",class:"row"},i2({title:"undo",part:"undo",class:"transparent",onClick:this.undo},B.cornerUpLeft()),i2({title:"redo",part:"redo",class:"transparent",onClick:this.redo},B.cornerUpRight()),i2({title:"flip direction (⌘/ | ^/)",class:"transparent",onClick:this.flipLayout},B.columns({class:"layout-indicator"})),i2({title:"copy as markdown (⌘⇧C | ^⇧C)",class:"transparent",onClick:this.copy},B.copy()),i2({title:"reload (⌘R | ^R)",class:"transparent",onClick:this.refreshRemote},B.refreshCw()),i2({title:"close code",class:"transparent",onClick:this.closeCode},B.x())))),Li({part:"sources",hidden:!0})];connectedCallback(){super.connectedCallback(),this.flushPendingValues();let{sources:l}=this.parts;this.initFromElements([...l.children]),this.remoteSync=new l0(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 i=Math.random()*100;this.undoInterval=setInterval(()=>{if(!document.hidden)this.updateUndo()},250+i),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}copy=()=>{let l=this.js!==""?"```js\n"+this.js.trim()+"\n```\n":"",i=this.html!==""?"```html\n"+this.html.trim()+"\n```\n":"",h=this.css!==""?"```css\n"+this.css.trim()+"\n```\n":"",y=this.test!==""?"```test\n"+this.test.trim()+"\n```\n":"";navigator.clipboard.writeText(l+i+h+y)};toggleMaximize=()=>{this.classList.toggle("-maximize")};showCode=()=>{this.classList.add("-maximize"),this.classList.toggle("-vertical",this.offsetHeight>this.offsetWidth),this.parts.codeEditors.hidden=!1};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:l,html:i,js:h,test:y}=this;z8(this.prefix,this.uuid,this.storageKey,this.remoteKey,{css:l,html:i,js:h,test:y}),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:l}=this.parts;l.innerText="";for(let i of["js","css","html","test"])if(this[i])l.append(q8({class:`language-${i}`,innerHTML:this[i]}))}};refresh=async()=>{if(this.remoteId!=="")return;let l=await m0(),{example:i,style:h,exampleWidgets:y}=this.parts,x,o,C=(s)=>{o=s};if(this.iframe)x=await E0({html:this.html,css:this.css,js:this.js,context:this.context,transform:l,exampleElement:i,widgetsElement:y,onError:C});else x=await e0({html:this.html,css:this.css,js:this.js,context:this.context,transform:l,exampleElement:i,styleElement:h,widgetsElement:y,onError:C});if(this.persistToDom)this.updateSources();if((this.test||o)&&x&&r1.enabled.value){if(await new Promise((s)=>requestAnimationFrame(s)),this.classList.add("-has-tests","-test-running"),this.classList.remove("-test-passed","-test-failed"),this.testResults=this.test?await h4(this.test,x,this.context,l):{passed:0,failed:0,tests:[]},o)this.testResults.failed+=1,this.testResults.tests.unshift({name:"example loads without error",passed:!1,error:String(o)});this.classList.remove("-test-running"),this.displayTestResults()}else this.classList.remove("-has-tests","-test-running","-test-passed","-test-failed")};displayTestResults(){let{testResults:l,testIndicator:i}=this.parts,h=this.testResults;if(!h||h.tests.length===0){l.hidden=!0,this.classList.remove("-test-passed","-test-failed"),i.title="no tests";return}l.innerHTML="";let y=t2({style:{marginBottom:"8px",fontWeight:"bold"}},`${h.passed}/${h.tests.length} tests passed`);l.append(y);for(let x of h.tests){let o=x.passed?"✓":"✗",C=x.passed?"test-pass":"test-fail",s=t2({class:C},_8(o+" "),x.name,x.error?_8({style:{opacity:"0.7"}},` - ${x.error}`):"");l.append(s)}this.classList.toggle("-test-passed",h.failed===0),this.classList.toggle("-test-failed",h.failed>0),i.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(l){for(let i of l){i.hidden=!0;let[h,...y]=i.innerHTML.split(`
92
92
  `);if(["js","html","css","test"].includes(h)){let x=y.filter((C)=>C.trim()!=="").map((C)=>C.match(/^\s*/)[0].length).sort()[0],o=(x>0?y.map((C)=>C.substring(x)):y).join(`
93
- `);this.setEditorValue(h,o)}else{let x=["js","html","css","test"].find((o)=>i.matches(`.language-${o}`));if(x)this.setEditorValue(x,x==="html"?i.innerHTML:i.innerText)}}}showDefaultTab(){if(!this.hydrated){this.pendingShowDefaultTab=!0;return}let{editors:l}=this.parts;if(this.js!=="")l.value=0;else if(this.html!=="")l.value=1;else if(this.css!=="")l.value=2;else if(this.test!=="")l.value=3}render(){if(super.render(),this.remoteId!==""){let l=localStorage.getItem(this.storageKey);if(l!==null){let i=JSON.parse(l);if(this.remoteKey!==i.remoteKey)return;if(this.css=i.css,this.html=i.html,this.js=i.js,i.test)this.test=i.test;this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var x4=h2.elementCreator(),ih=new URL(window.location.href).searchParams,_8=ih.get("lx");if(_8)document.title+=" [code editor]",document.body.textContent="",document.body.append(x4({remoteId:_8}));var{slot:V8}=f;class y2 extends z{static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[V8({name:"nav",part:"nav"}),V8({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${w.navWidth("50%")} ${w.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:w.margin("0 0 0 -100%"),transition:w.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};onResize=()=>{let{content:l}=this.parts,i=this.offsetParent;if(i===null)return;let h=this.value;if(this.compact=i.offsetWidth<this.minSize,[...this.childNodes].find((x)=>x instanceof Element?x.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",l.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(l.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 hh=y2,i0=y2.elementCreator(),yh=i0,xh=i0;var{div:T5,span:h0,a:J1,header:oh,button:O8,template:Ch,input:sh,h2:gh}=f,A2={pass:w.testColorPass("#0a0"),fail:w.testColorFail("#c00"),running:w.testColorRunning("#fa0")},kh={"@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:r.fontSize50,height:r.fontSize50,borderRadius:"50%",marginLeft:r.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:A2.pass},".doc-link.-test-failed::after":{background:A2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:A2.running,position:"fixed",bottom:r.spacing,right:r.spacing,zIndex:"1000",background:r.testBg,color:"white",gap:r.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:A2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:A2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:A2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:r.testBg,borderRadius:"50%",width:r.lineHeight,height:r.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"}};function ch(l){let{docs:i,context:h={},projectName:y="",projectLinks:x={},navSize:o=200,minSize:C=600}=l;for(let t of i)t.testStatus=void 0;let s=document.location.search!==""?document.location.search.substring(1).split("&")[0]:i[0]?.filename||"README.md",g=i.find((t)=>t.filename===s)||i[0],{app:k}=E({app:{docs:i,currentDoc:g,compact:!1}}),c={},d,n=!1,v=0,p=0;window.__docTestResults=new Promise((t)=>{d=t});let j=(t)=>{let q=c[t],U=k.docs.find((D)=>D.filename===t);if(U)U.testStatus=q?q.passed?"passed":"failed":void 0},P=()=>{if(p>=v&&d){let t={passed:0,failed:0,pages:c};for(let q of Object.values(c))t.passed+=q.totalPassed,t.failed+=q.totalFailed;if(d(t),d=void 0,_&&!U2)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).catch(()=>{})}},_=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",V=(t)=>{let{results:q}=t.detail,U=String(k.currentDoc.filename);c[U]={passed:q.failed===0,tests:[...q.tests],totalPassed:q.passed,totalFailed:q.failed},j(U)},K=(t)=>{p++,P(),j4()};K1.docLink={toDOM(t,q){t.setAttribute("href",`?${q}`)}},K1.current={toDOM(t,q){let U=t.getAttribute("href")||"";t.classList.toggle("current",q===U.substring(1))}},K1.testStatus={toDOM(t,q){if(t.classList.remove("-test-passed","-test-failed"),q==="passed")t.classList.add("-test-passed");else if(q==="failed")t.classList.add("-test-failed")}};let Z=R2(()=>{let t=W.value.toLocaleLowerCase();k.docs.forEach((q)=>{q.hidden=!q.title.toLocaleLowerCase().includes(t)&&!q.text.toLocaleLowerCase().includes(t)}),s1(k.docs)}),W=sh({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:Z});window.addEventListener("popstate",()=>{let t=window.location.search.substring(1);k.currentDoc=k.docs.find((q)=>q.filename===t)||k.docs[0]});let O=[O8({class:"iconic",style:{color:r.linkColor},title:"navigation",bind:{value:k.compact,binding:{toDOM(t,q){t.style.display=q?"":"none",t.nextSibling.style.display=q?"":"none"}}},onClick(){let t=document.querySelector(y2.tagName);t.contentVisible=!t.contentVisible}},B.menu()),h0({style:{flex:"0 0 10px"}})];if(y)O.push(J1({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},x.tosijs?B.tosiUi({style:{_xinIconSize:40,marginRight:10}}):h0(),gh(y)));if(O.push(h0({class:"elastic"})),x.tosijs)O.push(J1({class:"iconic",title:"tosijs",target:"_blank"},B.tosi(),{href:x.tosijs}));if(x.discord)O.push(J1({class:"iconic",title:"discord",target:"_blank"},B.discord(),{href:x.discord}));if(x.blog)O.push(J1({class:"iconic",title:"blog",target:"_blank"},B.blog(),{href:x.blog}));if(x.github)O.push(J1({class:"iconic",title:"github",target:"_blank"},B.github(),{href:x.github}));if(x.npm)O.push(J1({class:"iconic",title:"npmjs",target:"_blank"},B.npm(),{href:x.npm}));let F=T5({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},oh(...O),i0({name:"Documentation",navSize:o,minSize:C,style:{flex:"1 1 auto",overflow:"hidden"},onChange(){let t=document.querySelector(y2.tagName);k.compact=t.compact}},W,T5({slot:"nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"},bindList:{idPath:"filename",hiddenProp:"hidden",value:k.docs}},Ch(J1({class:"doc-link",bindCurrent:"app.currentDoc.filename",bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(t){let q=t.target,U=u1(t.target),D=t.target.closest("tosi-sidenav");D.contentVisible=!0;let{href:N}=q;window.history.pushState({href:N},"",N),k.currentDoc=U,t.preventDefault();let L=String(U.filename),I=c[L];if(I&&!I.passed)setTimeout(()=>{let b=document.querySelector("tosi-example.-test-failed");if(b)b.scrollIntoView({behavior:"smooth",block:"center"})},100)}},q1({bindText:"^.title"})))),T5({style:{position:"relative",overflowY:"scroll",height:"100%"}},J1({class:"view-source",target:"_blank",style:{display:x.github?"flex":"none",alignItems:"center",gap:"6px",position:"fixed",top:"calc(var(--xin-header-height, 60px) + 5px)",right:"5px",fontSize:"0.875em",color:"var(--brand-color, inherit)",opacity:"0.7",borderBottom:"none",transition:"opacity 0.2s ease"},onMouseenter(t){t.target.style.opacity="0.9"},onMouseleave(t){t.target.style.opacity="0.7"},bind:{value:k.currentDoc,binding(t,q){if(x.github&&q.path&&q.path!=="README.md")t.href=`${x.github}/blob/main/${q.path}`,t.style.display="flex";else t.style.display="none"}}},B.github({style:{_xinIconSize:16}}),"View source on GitHub"),L2({style:{display:"block",maxWidth:"44em",margin:"auto",padding:"0 1em",overflow:"hidden"},bindValue:"app.currentDoc.text",didRender(){h2.insertExamples(this,h)}}))));a1("test-indicators",kh);let R=O8({class:"test-widget",hidden:!0,onClick:C6},h0({part:"label"},"Tests"),h0({class:"count",part:"count"},"0"));F.appendChild(R);let Y=!1;function o1(){Y=!0,R.hidden=!1,R.classList.remove("-passed","-failed"),R.classList.add("-running"),r0()}function r0(){let t=R.querySelector('[part="label"]'),q=R.querySelector('[part="count"]'),U=Object.values(c).reduce((N,L)=>N+L.totalPassed,0),D=Object.values(c).reduce((N,L)=>N+L.totalFailed,0);if(t)if(Y)t.textContent="Running";else if(D>0)t.textContent="Failed";else if(U>0)t.textContent="Passed";else t.textContent="Tests";if(q)q.textContent=D>0?String(D):String(U)}function j4(){let t=Object.values(c).reduce((q,U)=>q+U.totalFailed,0);if(Y&&p>=v)if(Y=!1,R.classList.remove("-running"),t>0)R.classList.add("-failed"),R.classList.remove("-passed"),R.hidden=!1;else R.classList.add("-passed"),R.classList.remove("-failed"),R.hidden=!1;r0()}function C6(){let t=Object.entries(c).filter(([,U])=>!U.passed),q=[];for(let[U,D]of t){let N=i.find((I)=>I.filename===U),L=D.tests.filter((I)=>!I.passed);for(let I of L)q.push({caption:`${N?.title||U}: ${I.name}`,action:()=>{let b=k.docs.find((d1)=>String(d1.filename)===U);if(b)window.history.pushState({href:`?${U}`},"",`?${U}`),k.currentDoc=b,setTimeout(()=>{let d1=document.querySelector("tosi-example.-test-failed");if(d1)d1.scrollIntoView({behavior:"smooth",block:"center"})},100)}})}if(q.length>0)q.push(null);q.push({icon:"copy",caption:"Copy test results to clipboard",action:()=>{let U=s6();navigator.clipboard.writeText(U)}}),H({target:R,menuItems:q})}function s6(){let t=["# Test Results",""],q=0,U=0;for(let[D,N]of Object.entries(c)){let I=i.find((b)=>b.filename===D)?.title||D;if(q+=N.totalPassed,U+=N.totalFailed,N.tests.length>0){t.push(`## ${I}`),t.push("");for(let b of N.tests){let d1=b.passed?"✓":"✗",w0=b.error?`- ${d1} ${b.name}: ${b.error}`:`- ${d1} ${b.name}`;t.push(w0)}t.push("")}}return t.unshift(`**Summary: ${q} passed, ${U} failed**`,""),t.join(`
94
- `)}let U2=new URLSearchParams(window.location.search).get("_testMode")==="1",d0=U2?window.location.search.substring(1).split("&")[0]:null;if(F.addEventListener("testcomplete",(t)=>{if(V(t),j4(),U2&&window.parent!==window&&d0){let{results:q}=t.detail;window.parent.postMessage({type:"tosi-test-results",filename:d0,results:q},"*")}}),U2&&d0){let t=()=>{let U=[...F.querySelectorAll("tosi-example")].filter((N)=>N.classList.contains("-has-tests")),D=U.filter((N)=>N.classList.contains("-test-running"));if(U.length>0&&D.length===0)window.parent.postMessage({type:"tosi-tests-done",filename:d0},"*");else setTimeout(t,100)};setTimeout(t,500)}let g6=async()=>{if(n)return;if(!r1.enabled.value)return;if(U2)return;n=!0;let t=i.filter((N)=>N.text.includes("```test"));if(v=t.length,v>0)o1();if(v===0){if(d)d({passed:0,failed:0,pages:{}}),d=void 0;return}let q=String(k.currentDoc.filename),U=document.createElement("iframe");U.style.cssText="position: fixed; left: 0; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(U);let D=(N)=>{if(N.data?.type!=="tosi-test-results")return;let{filename:L,results:I}=N.data;if(!c[L])c[L]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let b=c[L];b.tests.push(...I.tests),b.totalPassed+=I.passed,b.totalFailed+=I.failed,b.passed=b.totalFailed===0,j(L),j4()};window.addEventListener("message",D);for(let N of t){if(N.filename===q)continue;let L=window.location.origin+window.location.pathname;U.src=`${L}?${N.filename}&_testMode=1`,await new Promise((I)=>{let b=Date.now()+30000,d1=(w0)=>{if(w0.data?.type==="tosi-tests-done"&&w0.data.filename===N.filename)window.removeEventListener("message",d1),I()};window.addEventListener("message",d1),setTimeout(()=>{window.removeEventListener("message",d1),I()},b-Date.now())}),K(N.filename)}if(window.removeEventListener("message",D),U.remove(),t.some((N)=>N.filename===q))setTimeout(()=>K(q),1000)},P3=()=>{if(!r1.enabled.value)return;if(_)setTimeout(g6,1000);else if(g.text.includes("```test"))v=1,o1(),setTimeout(()=>K(g.filename),2000);else if(d)d({passed:0,failed:0,pages:{}}),d=void 0};return P3(),r1.enabled.observe(P3),F}var{div:p1,slot:rh}=f;class B1 extends z{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:r.handleSize,width:r.handleSize,padding:r.handlePadding,"--text-color":r.handleColor,background:r.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(${r.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":r.handleHoverColor,background:r.handleHoverBg}};static snappedCoords(l,i){let{gridSize:h}=B1;return B1.snapToGrid||l.shiftKey?i.map((y)=>Math.round(y/h)*h):i}static snappedAngle(l,i){let{angleSize:h}=B1;return B1.snapAngle||l.shiftKey?Math.round(i/h)*h:i}get locked(){let l=this.parentElement;if(l.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let i=l.style.right.match(/\d/)!==null,h=!i||l.style.left.match(/\d/)!==null,y=l.style.bottom.match(/\d/)!==null,x=!y||l.style.top.match(/\d/)!==null;return{left:h,top:x,bottom:y,right:i}}set locked(l){let{bottom:i,right:h}=l,{left:y,top:x}=l,o=this.parentElement,C=o.offsetLeft,s=o.offsetTop,g=o.offsetWidth,k=o.offsetHeight,c=o.offsetParent.offsetWidth-C-g,d=o.offsetParent.offsetHeight-s-k;if(Object.assign(o.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!h)y=!0;if(!i)x=!0;if(y)o.style.left=C+"px";if(h)o.style.right=c+"px";if(y&&h)o.style.width="auto";else o.style.width=g+"px";if(x)o.style.top=s+"px";if(i)o.style.bottom=d+"px";if(x&&i)o.style.height="auto";else o.style.height=k+"px";this.queueRender()}get coords(){let{top:l,left:i,right:h,bottom:y}=this.parentElement.style;return{top:parseFloat(l),left:parseFloat(i),right:parseFloat(h),bottom:parseFloat(y)}}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=(l)=>{let{locked:i}=this;this.locked=i;let h=this.parentElement,{top:y,left:x,bottom:o,right:C}=this.coords;x1(l,(s,g,k)=>{if([s,g]=B1.snappedCoords(k,[s,g]),!isNaN(y))h.style.top=y+g+"px";if(!isNaN(o))h.style.bottom=o-g+"px";if(!isNaN(x))h.style.left=x+s+"px";if(!isNaN(C))h.style.right=C-s+"px";if(k.type==="mouseup")return this.triggerChange(),!0})};resize=(l)=>{let i=this.parentElement,{locked:h}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[y,x]=[this.right,this.bottom];x1(l,(o,C,s)=>{let g=y-o,k=x-C;if([g,k]=B1.snappedCoords(s,[g,k]),i.style.right=g+"px",i.style.bottom=k+"px",s.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};adjustSize=(l)=>{let i=this.parentElement,{locked:h}=this,y=l.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let x=this[y];x1(l,(o,C,s)=>{let[g]=B1.snappedCoords(s,[x+(["left","right"].includes(y)?o:C)*(["right","bottom"].includes(y)?-1:1)]);if(i.style[y]=g+"px",s.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let l=this.parentElement.getBoundingClientRect();return{x:l.x+l.width*0.5,y:l.y+l.height*0.5}}get element(){return this.parentElement}adjustRotation=(l)=>{let{center:i}=this,{transformOrigin:h}=this.element.style;if(!h)this.element.style.transformOrigin="50% 50%";x1(l,(y,x,o)=>{let{clientX:C,clientY:s}=o,g=C-i.x,k=s-i.y,c=k>0?90:-90;if(g!==0)c=Math.atan2(k,g)*180/Math.PI;if(c=B1.snappedAngle(o,c),c===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${c}deg)`;return this.triggerChange(),o.type==="mouseup"})};toggleLock=(l)=>{let{locked:i}=this,h=l.target.title.split(" ")[1];i[h]=!i[h],this.locked=i,this.queueRender(),l.stopPropagation(),l.preventDefault()};content=()=>[p1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},B.move()),p1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),p1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),p1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),p1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),p1({part:"resize",style:{top:"100%",left:"100%"}},B.resize()),p1({part:"rotate",style:{top:"50%",right:"0"}},B.refreshCw()),p1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},B.unlock(),B.lock()),p1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},B.unlock(),B.lock()),p1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},B.unlock(),B.lock()),p1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},B.unlock(),B.lock()),rh()];connectedCallback(){super.connectedCallback();let{left:l,right:i,top:h,bottom:y,lockLeft:x,lockRight:o,lockTop:C,lockBottom:s,move:g,resize:k,rotate:c}=this.parts,d={passive:!0};[l,i,h,y].forEach((n)=>{n.addEventListener("mousedown",this.adjustSize,d),n.addEventListener("touchstart",this.adjustSize,d)}),[x,o,C,s].forEach((n)=>{n.addEventListener("click",this.toggleLock)}),k.addEventListener("mousedown",this.resize,d),g.addEventListener("mousedown",this.adjustPosition,d),c.addEventListener("mousedown",this.adjustRotation,d),k.addEventListener("touchstart",this.resize,d),g.addEventListener("touchstart",this.adjustPosition,d),c.addEventListener("touchstart",this.adjustRotation,d)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:l,lockRight:i,lockTop:h,lockBottom:y}=this.parts,{left:x,right:o,top:C,bottom:s}=this.locked;l.toggleAttribute("locked",x),i.toggleAttribute("locked",o),h.toggleAttribute("locked",C),y.toggleAttribute("locked",s)}}var dh=B1.elementCreator();var{div:wh,input:nh,button:u5,span:ph}=f,U8=(l)=>l,F8="null filter, everything matches",M5={contains:{caption:"contains",negative:"does not contain",makeTest:(l)=>{return l=l.toLocaleLowerCase(),(i)=>String(i).toLocaleLowerCase().includes(l)}},hasTags:{caption:"has tags",makeTest:(l)=>{let i=l.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&i.find((y)=>!h.includes(y))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(l)=>{let i=l.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&i.find((y)=>h.includes(y))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(l)=>{if(isNaN(Number(l)))return l=String(l).toLocaleLowerCase(),(h)=>String(h).toLocaleLowerCase()===l;let i=Number(l);return(h)=>Number(h)===i}},after:{caption:"is after",negative:"is before",makeTest:(l)=>{let i=new Date(l);return(h)=>new Date(h)>i}},greaterThan:{caption:">",negative:"≤",makeTest:(l)=>{if(!isNaN(Number(l))){let i=Number(l);return(h)=>Number(h)>i}return l=l.toLocaleLowerCase(),(i)=>String(i).toLocaleLowerCase()>l}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(l)=>!!l},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(l)=>l===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(l)=>l===!1}},Bh={description:"anything",test:()=>!0};function G8(l){return l.options[l.selectedIndex]?.caption||""}class m5 extends z{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=M5;content=()=>[k1({part:"haystack"}),k1({part:"condition"}),nh({part:"needle",type:"search"}),ph({part:"padding"}),u5({part:"remove",title:"delete"},B.trash())];filter=Bh;get state(){let{haystack:l,needle:i,condition:h}=this.parts;return{haystack:l.value,needle:i.value,condition:h.value}}set state(l){Object.assign(this,l)}buildFilter=()=>{let{haystack:l,condition:i,needle:h}=this.parts,y=i.value.startsWith("~"),x=y?i.value.slice(1):i.value,o=this.filters[x];h.hidden=o.needsValue===!1;let C=o.needsValue===!1?o.makeTest(void 0):o.makeTest(h.value),s=l.value,g;if(s!=="*")g=y?(d)=>!C(d[s]):(d)=>C(d[s]);else g=y?(d)=>Object.values(d).find((n)=>!C(n))!==void 0:(d)=>Object.values(d).find((n)=>C(n))!==void 0;let k=o.needsValue!==!1?` "${h.value}"`:"",c=`${G8(l)} ${G8(i)}${k}`;this.filter={description:c,test:g},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:l,condition:i,needle:h,remove:y}=this.parts;l.addEventListener("change",this.buildFilter),i.addEventListener("change",this.buildFilter),h.addEventListener("input",this.buildFilter),l.value=this.haystack,i.value=this.condition,h.value=this.needle,y.addEventListener("click",()=>{let{parentElement:x}=this;this.remove(),x?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:l,condition:i,needle:h}=this.parts;if(l.options=[{caption:"any field",value:"*"},...this.fields.map((y)=>y.prop)],i.options=Object.keys(this.filters).map((y)=>{let x=this.filters[y];return x.negative!==void 0?[{caption:x.caption,value:y},{caption:x.negative,value:"~"+y}]:{caption:x.caption,value:y}}).flat(),this.haystack!=="")l.value=this.haystack;if(this.condition!=="")i.value=this.condition;if(this.needle!=="")h.value=this.needle;this.buildFilter()}}var o4=m5.elementCreator();class L5 extends z{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(l){this._fields=l,this.queueRender()}get state(){let{filterContainer:l}=this.parts;return[...l.children].map((i)=>i.state)}set state(l){let{fields:i,filters:h}=this,{filterContainer:y}=this.parts;y.textContent="";for(let x of l)y.append(o4({fields:i,filters:h,...x}))}filter=U8;description=F8;addFilter=()=>{let{fields:l,filters:i}=this,{filterContainer:h}=this.parts;h.append(o4({fields:l,filters:i}))};content=()=>[u5({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},B.plus()),wh({part:"filterContainer"}),u5({part:"reset",title:"reset filter",onClick:this.reset},B.x())];filters=M5;reset=()=>{let{fields:l,filters:i}=this,{filterContainer:h}=this.parts;this.description=F8,this.filter=U8,h.textContent="",h.append(o4({fields:l,filters:i})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:l}=this.parts;if(l.children.length===0){this.reset();return}let i=[...l.children].map((y)=>y.filter),h=i.map((y)=>y.test);this.description=i.map((y)=>y.description).join(", "),this.filter=(y)=>y.filter((x)=>h.find((o)=>o(x)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:l}=this.parts;l.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var fh=L5.elementCreator();var{form:zh,slot:e5,tosiSlot:K8,label:vh,input:th,span:jh}=f;function H1(l,i,h){if(h!==""&&h!==!1)l.setAttribute(i,h);else l.removeAttribute(i)}function Ah(l){switch(l.type){case"checkbox":return l.checked;case"radio":{let i=l.parentElement?.querySelector(`input[type="radio"][name="${l.name}"]:checked`);return i?i.value:null}case"range":case"number":return Number(l.value);default:return Array.isArray(l.value)&&l.value.length===0?null:l.value}}function a8(l,i){if(!(l instanceof HTMLElement));else if(l instanceof HTMLInputElement)switch(l.type){case"checkbox":l.checked=i;break;case"radio":l.checked=i===l.value;break;default:l.value=String(i||"")}else if(i!=null||l.value!=null)l.value=String(i||"")}class C4 extends z{static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:w.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=vh(K8({part:"caption"}),jh({part:"field"},K8({part:"input",name:"input"}),th({part:"valueHolder"})));valueChanged=!1;handleChange=()=>{let{input:l,valueHolder:i}=this.parts,h=l.children[0]||i;if(h!==i)i.value=h.value;this.value=Ah(h),this.valueChanged=!0;let y=this.closest("tosi-form");if(y&&this.key!=="")switch(this.type){case"checkbox":y.fields[this.key]=h.checked;break;case"number":case"range":if(this.fixedPrecision>-1)h.value=Number(h.value).toFixed(this.fixedPrecision),y.fields[this.key]=Number(h.value);else y.fields[this.key]=Number(h.value);break;default:y.fields[this.key]=h.value}};connectedCallback(){super.connectedCallback();let{input:l,valueHolder:i}=this.parts;i.addEventListener("change",this.handleChange),l.addEventListener("change",this.handleChange,!0)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{input:l,caption:i,valueHolder:h,field:y}=this.parts;if(i.textContent?.trim()==="")i.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){l.textContent="";let x=f.textarea({value:this.value});if(this.placeholder)x.setAttribute("placeholder",this.placeholder);l.append(x)}else if(this.type==="color")l.textContent="",l.append(n5({value:this.value}));else if(l.children.length===0){if(H1(h,"placeholder",this.placeholder),H1(h,"type",this.type),H1(h,"pattern",this.pattern),H1(h,"min",this.min),H1(h,"max",this.max),this.step)H1(h,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")H1(h,"step",Math.pow(10,-this.fixedPrecision))}if(a8(h,this.value),a8(l.children[0],this.value),this.prefix?y.setAttribute("prefix",this.prefix):y.removeAttribute("prefix"),this.suffix?y.setAttribute("suffix",this.suffix):y.removeAttribute("suffix"),h.classList.toggle("hidden",l.children.length>0),l.children.length>0)h.setAttribute("tabindex","-1");else h.removeAttribute("tabindex");l.style.display=l.children.length===0?"none":"",H1(h,"required",!this.optional)}}class s4 extends z{static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((i)=>i.required!==void 0).find((i)=>!i.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=[e5({part:"header",name:"header"}),zh({part:"form"},e5({part:"content"})),e5({part:"footer",name:"footer"})];getField=(l)=>{return this.querySelector(`tosi-field[key="${l}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch(h){console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:l}=this,i=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(h,y){return h[y]},set(h,y,x){if(h[y]!==x){h[y]=x;let o=l(y);if(o)o.value=x;i(new Event("change"))}return!0}})}set fields(l){let i=[...this.querySelectorAll("tosi-field")];for(let h of i)h.value=l[h.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(l)=>{l.preventDefault(),l.stopPropagation(),this.syncFieldValues();let i=this.fields;this.submitCallback(i,this.isValid)};submitCallback=(l,i)=>{console.log("override submitCallback to handle this data",{value:l,isValid:i})};connectedCallback(){super.connectedCallback();let{form:l}=this.parts;l.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(l)=>{let i=l.target,h=i.getAttribute("name");if(h&&"value"in i)this.fields[h]=i.value};syncFieldValues(){let l=this.fields,i=this.querySelectorAll("[name], [key]");for(let h of i){let y=h.getAttribute("name")||h.getAttribute("key");if(!y)continue;if(l[y]===void 0){let x=h.value??h.getAttribute("value");if(x!=null)l[y]=x}}}initializeNamedElements(){let l=this.fields,i=this.querySelectorAll("[name], [key]");for(let h of i){let y=h.getAttribute("name")||h.getAttribute("key");if(!y)continue;if(l[y]!==void 0)h.value=l[y]}}}var qh=C4,Ph=s4,Q8=C4.elementCreator(),W8=s4.elementCreator(),_h=Q8,Vh=W8;var{a:Oh}=f;class E5 extends z{static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:w.tosiHeaderPadding("12px 24px"),background:w.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:w.tosiHeaderLineHeight("32px"),gap:w.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:l})=>[l()]}var Uh=E5.elementCreator(),Y8={tosijs:()=>B.tosi(),discord:()=>B.discord(),blog:()=>B.blog(),github:()=>B.github(),npm:()=>B.npm()};class l3 extends z{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 l=[];for(let[i,h]of Object.entries(this.links)){if(!h||!Y8[i])continue;l.push(Oh({title:i,target:"_blank",href:h},Y8[i]()))}this.replaceChildren(...l)}}var Fh=l3.elementCreator();function N8(){return navigator.getGamepads().filter((i)=>i!==null).map((i)=>{let{id:h,axes:y,buttons:x}=i;return{id:h,axes:y,buttons:x.map((o,C)=>{let{pressed:s,value:g}=o;return{index:C,pressed:s,value:g}}).filter((o)=>o.pressed||o.value!==0).reduce((o,C)=>{return o[C.index]=C.value,o},{})}})}function Gh(){let l=N8();return l.length===0?"no active gamepads":l.map(({id:i,axes:h,buttons:y})=>{let x=h.map((C)=>C.toFixed(2)).join(" "),o=Object.keys(y).map((C)=>`[${C}](${y[Number(C)].toFixed(2)})`).join(" ");return`${i}
93
+ `);this.setEditorValue(h,o)}else{let x=["js","html","css","test"].find((o)=>i.matches(`.language-${o}`));if(x)this.setEditorValue(x,x==="html"?i.innerHTML:i.innerText)}}}showDefaultTab(){if(!this.hydrated){this.pendingShowDefaultTab=!0;return}let{editors:l}=this.parts;if(this.js!=="")l.value=0;else if(this.html!=="")l.value=1;else if(this.css!=="")l.value=2;else if(this.test!=="")l.value=3}render(){if(super.render(),this.remoteId!==""){let l=localStorage.getItem(this.storageKey);if(l!==null){let i=JSON.parse(l);if(this.remoteKey!==i.remoteKey)return;if(this.css=i.css,this.html=i.html,this.js=i.js,i.test)this.test=i.test;this.parts.example.hidden=!0,this.parts.codeEditors.hidden=!1,this.classList.add("-maximize"),this.updateUndo()}}else this.refresh()}}var x4=h2.elementCreator(),ih=new URL(window.location.href).searchParams,P8=ih.get("lx");if(P8)document.title+=" [code editor]",document.body.textContent="",document.body.append(x4({remoteId:P8}));var{slot:V8}=f;class y2 extends z{static preferredTagName="tosi-sidenav";static initAttributes={minSize:800,navSize:200,compact:!1,contentVisible:!1};value="normal";content=[V8({name:"nav",part:"nav"}),V8({part:"content"})];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:`${w.navWidth("50%")} ${w.contentWidth("50%")}`,gridTemplateRows:"100%",position:"relative",margin:w.margin("0 0 0 -100%"),transition:w.sideNavTransition("0.25s ease-out")},":host slot":{position:"relative"},":host slot:not([name])":{display:"block"},':host slot[name="nav"]':{display:"block"}};onResize=()=>{let{content:l}=this.parts,i=this.offsetParent;if(i===null)return;let h=this.value;if(this.compact=i.offsetWidth<this.minSize,[...this.childNodes].find((x)=>x instanceof Element?x.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",l.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(l.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 hh=y2,i0=y2.elementCreator(),yh=i0,xh=i0;var{div:T5,span:h0,a:J1,header:oh,button:O8,template:Ch,input:sh,h2:gh}=f,A2={pass:w.testColorPass("#0a0"),fail:w.testColorFail("#c00"),running:w.testColorRunning("#fa0")},kh={"@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:r.fontSize50,height:r.fontSize50,borderRadius:"50%",marginLeft:r.spacing50,display:"inline-block",verticalAlign:"middle"},".doc-link.-test-passed::after":{background:A2.pass},".doc-link.-test-failed::after":{background:A2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget":{_testBg:A2.running,position:"fixed",bottom:r.spacing,right:r.spacing,zIndex:"1000",background:r.testBg,color:"white",gap:r.spacing50},".test-widget[hidden]":{display:"none"},".test-widget.-running":{_testBg:A2.running,animation:"test-appear 0.3s ease-out, test-pulse 2s ease-in-out 0.3s infinite"},".test-widget.-passed":{_testBg:A2.pass,animation:"test-fade 3s ease-out forwards"},".test-widget.-failed":{_testBg:A2.fail,animation:"test-pulse 2s ease-in-out infinite"},".test-widget .count":{background:"white",color:r.testBg,borderRadius:"50%",width:r.lineHeight,height:r.lineHeight,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"}};function ch(l){let{docs:i,context:h={},projectName:y="",projectLinks:x={},navSize:o=200,minSize:C=600}=l;for(let j of i)j.testStatus=void 0;let s=document.location.search!==""?document.location.search.substring(1).split("&")[0]:i[0]?.filename||"README.md",g=i.find((j)=>j.filename===s)||i[0],{app:k}=E({app:{docs:i,currentDoc:g,compact:!1}}),c={},d,n=!1,v=0,p=0;window.__docTestResults=new Promise((j)=>{d=j});let t=(j)=>{let q=c[j],U=k.docs.find((D)=>D.filename===j);if(U)U.testStatus=q?q.passed?"passed":"failed":void 0},_=()=>{if(p>=v&&d){let j={passed:0,failed:0,pages:c};for(let q of Object.values(c))j.passed+=q.totalPassed,j.failed+=q.totalFailed;if(d(j),d=void 0,P&&!U2)fetch("/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)}).catch(()=>{})}},P=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",V=(j)=>{let{results:q}=j.detail,U=String(k.currentDoc.filename);c[U]={passed:q.failed===0,tests:[...q.tests],totalPassed:q.passed,totalFailed:q.failed},t(U)},K=(j)=>{p++,_(),t4()};K1.docLink={toDOM(j,q){j.setAttribute("href",`?${q}`)}},K1.current={toDOM(j,q){let U=j.getAttribute("href")||"";j.classList.toggle("current",q===U.substring(1))}},K1.testStatus={toDOM(j,q){if(j.classList.remove("-test-passed","-test-failed"),q==="passed")j.classList.add("-test-passed");else if(q==="failed")j.classList.add("-test-failed")}};let Z=R2(()=>{let j=W.value.toLocaleLowerCase();k.docs.forEach((q)=>{q.hidden=!q.title.toLocaleLowerCase().includes(j)&&!q.text.toLocaleLowerCase().includes(j)}),s1(k.docs)}),W=sh({slot:"nav",placeholder:"search",type:"search",style:{width:"calc(100% - 10px)",margin:"5px"},onInput:Z});window.addEventListener("popstate",()=>{let j=window.location.search.substring(1);k.currentDoc=k.docs.find((q)=>q.filename===j)||k.docs[0]});let O=[O8({class:"iconic",style:{color:r.linkColor},title:"navigation",bind:{value:k.compact,binding:{toDOM(j,q){j.style.display=q?"":"none",j.nextSibling.style.display=q?"":"none"}}},onClick(){let j=document.querySelector(y2.tagName);j.contentVisible=!j.contentVisible}},B.menu()),h0({style:{flex:"0 0 10px"}})];if(y)O.push(J1({href:"/",style:{display:"flex",alignItems:"center",borderBottom:"none"}},x.tosijs?B.tosiUi({style:{_xinIconSize:40,marginRight:10}}):h0(),gh(y)));if(O.push(h0({class:"elastic"})),x.tosijs)O.push(J1({class:"iconic",title:"tosijs",target:"_blank"},B.tosi(),{href:x.tosijs}));if(x.discord)O.push(J1({class:"iconic",title:"discord",target:"_blank"},B.discord(),{href:x.discord}));if(x.blog)O.push(J1({class:"iconic",title:"blog",target:"_blank"},B.blog(),{href:x.blog}));if(x.github)O.push(J1({class:"iconic",title:"github",target:"_blank"},B.github(),{href:x.github}));if(x.npm)O.push(J1({class:"iconic",title:"npmjs",target:"_blank"},B.npm(),{href:x.npm}));let F=T5({style:{display:"flex",flexDirection:"column",maxWidth:"100vw",height:"100vh",overflow:"hidden"}},oh(...O),i0({name:"Documentation",navSize:o,minSize:C,style:{flex:"1 1 auto",overflow:"hidden"},onChange(){let j=document.querySelector(y2.tagName);k.compact=j.compact}},W,T5({slot:"nav",style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100% - 44px)",overflowY:"scroll"},bindList:{idPath:"filename",hiddenProp:"hidden",value:k.docs}},Ch(J1({class:"doc-link",bindCurrent:"app.currentDoc.filename",bindDocLink:"^.filename",bindTestStatus:"^.testStatus",onClick(j){let q=j.target,U=u1(j.target),D=j.target.closest("tosi-sidenav");D.contentVisible=!0;let{href:N}=q;window.history.pushState({href:N},"",N),k.currentDoc=U,j.preventDefault();let L=String(U.filename),I=c[L];if(I&&!I.passed)setTimeout(()=>{let b=document.querySelector("tosi-example.-test-failed");if(b)b.scrollIntoView({behavior:"smooth",block:"center"})},100)}},q1({bindText:"^.title"})))),T5({style:{position:"relative",overflowY:"scroll",height:"100%"}},J1({class:"view-source",target:"_blank",style:{display:x.github?"flex":"none",alignItems:"center",gap:"6px",position:"fixed",top:"calc(var(--xin-header-height, 60px) + 5px)",right:"5px",fontSize:"0.875em",color:"var(--brand-color, inherit)",opacity:"0.7",borderBottom:"none",transition:"opacity 0.2s ease"},onMouseenter(j){j.target.style.opacity="0.9"},onMouseleave(j){j.target.style.opacity="0.7"},bind:{value:k.currentDoc,binding(j,q){if(x.github&&q.path&&q.path!=="README.md")j.href=`${x.github}/blob/main/${q.path}`,j.style.display="flex";else j.style.display="none"}}},B.github({style:{_xinIconSize:16}}),"View source on GitHub"),L2({style:{display:"block",maxWidth:"44em",margin:"auto",padding:"0 1em",overflow:"hidden"},bindValue:"app.currentDoc.text",didRender(){h2.insertExamples(this,h)}}))));a1("test-indicators",kh);let R=O8({class:"test-widget",hidden:!0,onClick:C6},h0({part:"label"},"Tests"),h0({class:"count",part:"count"},"0"));F.appendChild(R);let Y=!1;function o1(){Y=!0,R.hidden=!1,R.classList.remove("-passed","-failed"),R.classList.add("-running"),r0()}function r0(){let j=R.querySelector('[part="label"]'),q=R.querySelector('[part="count"]'),U=Object.values(c).reduce((N,L)=>N+L.totalPassed,0),D=Object.values(c).reduce((N,L)=>N+L.totalFailed,0);if(j)if(Y)j.textContent="Running";else if(D>0)j.textContent="Failed";else if(U>0)j.textContent="Passed";else j.textContent="Tests";if(q)q.textContent=D>0?String(D):String(U)}function t4(){let j=Object.values(c).reduce((q,U)=>q+U.totalFailed,0);if(Y&&p>=v)if(Y=!1,R.classList.remove("-running"),j>0)R.classList.add("-failed"),R.classList.remove("-passed"),R.hidden=!1;else R.classList.add("-passed"),R.classList.remove("-failed"),R.hidden=!1;r0()}function C6(){let j=Object.entries(c).filter(([,U])=>!U.passed),q=[];for(let[U,D]of j){let N=i.find((I)=>I.filename===U),L=D.tests.filter((I)=>!I.passed);for(let I of L)q.push({caption:`${N?.title||U}: ${I.name}`,action:()=>{let b=k.docs.find((d1)=>String(d1.filename)===U);if(b)window.history.pushState({href:`?${U}`},"",`?${U}`),k.currentDoc=b,setTimeout(()=>{let d1=document.querySelector("tosi-example.-test-failed");if(d1)d1.scrollIntoView({behavior:"smooth",block:"center"})},100)}})}if(q.length>0)q.push(null);q.push({icon:"copy",caption:"Copy test results to clipboard",action:()=>{let U=s6();navigator.clipboard.writeText(U)}}),H({target:R,menuItems:q})}function s6(){let j=["# Test Results",""],q=0,U=0;for(let[D,N]of Object.entries(c)){let I=i.find((b)=>b.filename===D)?.title||D;if(q+=N.totalPassed,U+=N.totalFailed,N.tests.length>0){j.push(`## ${I}`),j.push("");for(let b of N.tests){let d1=b.passed?"✓":"✗",w0=b.error?`- ${d1} ${b.name}: ${b.error}`:`- ${d1} ${b.name}`;j.push(w0)}j.push("")}}return j.unshift(`**Summary: ${q} passed, ${U} failed**`,""),j.join(`
94
+ `)}let U2=new URLSearchParams(window.location.search).get("_testMode")==="1",d0=U2?window.location.search.substring(1).split("&")[0]:null;if(F.addEventListener("testcomplete",(j)=>{if(V(j),t4(),U2&&window.parent!==window&&d0){let{results:q}=j.detail;window.parent.postMessage({type:"tosi-test-results",filename:d0,results:q},"*")}}),U2&&d0){let j=()=>{let U=[...F.querySelectorAll("tosi-example")].filter((N)=>N.classList.contains("-has-tests")),D=U.filter((N)=>N.classList.contains("-test-running"));if(U.length>0&&D.length===0)window.parent.postMessage({type:"tosi-tests-done",filename:d0},"*");else setTimeout(j,100)};setTimeout(j,500)}let g6=async()=>{if(n)return;if(!r1.enabled.value)return;if(U2)return;n=!0;let j=i.filter((N)=>N.text.includes("```test"));if(v=j.length,v>0)o1();if(v===0){if(d)d({passed:0,failed:0,pages:{}}),d=void 0;return}let q=String(k.currentDoc.filename),U=document.createElement("iframe");U.style.cssText="position: fixed; left: 0; top: 0; width: 800px; height: 600px; opacity: 0; pointer-events: none;",document.body.appendChild(U);let D=(N)=>{if(N.data?.type!=="tosi-test-results")return;let{filename:L,results:I}=N.data;if(!c[L])c[L]={passed:!0,tests:[],totalPassed:0,totalFailed:0};let b=c[L];b.tests.push(...I.tests),b.totalPassed+=I.passed,b.totalFailed+=I.failed,b.passed=b.totalFailed===0,t(L),t4()};window.addEventListener("message",D);for(let N of j){if(N.filename===q)continue;let L=window.location.origin+window.location.pathname;U.src=`${L}?${N.filename}&_testMode=1`,await new Promise((I)=>{let b=Date.now()+30000,d1=(w0)=>{if(w0.data?.type==="tosi-tests-done"&&w0.data.filename===N.filename)window.removeEventListener("message",d1),I()};window.addEventListener("message",d1),setTimeout(()=>{window.removeEventListener("message",d1),I()},b-Date.now())}),K(N.filename)}if(window.removeEventListener("message",D),U.remove(),j.some((N)=>N.filename===q))setTimeout(()=>K(q),1000)},_3=()=>{if(!r1.enabled.value)return;if(P)setTimeout(g6,1000);else if(g.text.includes("```test"))v=1,o1(),setTimeout(()=>K(g.filename),2000);else if(d)d({passed:0,failed:0,pages:{}}),d=void 0};return _3(),r1.enabled.observe(_3),F}var{div:p1,slot:rh}=f;class B1 extends z{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:r.handleSize,width:r.handleSize,padding:r.handlePadding,"--text-color":r.handleColor,background:r.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(${r.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":r.handleHoverColor,background:r.handleHoverBg}};static snappedCoords(l,i){let{gridSize:h}=B1;return B1.snapToGrid||l.shiftKey?i.map((y)=>Math.round(y/h)*h):i}static snappedAngle(l,i){let{angleSize:h}=B1;return B1.snapAngle||l.shiftKey?Math.round(i/h)*h:i}get locked(){let l=this.parentElement;if(l.style.inset)return{left:!0,top:!0,bottom:!0,right:!0};let i=l.style.right.match(/\d/)!==null,h=!i||l.style.left.match(/\d/)!==null,y=l.style.bottom.match(/\d/)!==null,x=!y||l.style.top.match(/\d/)!==null;return{left:h,top:x,bottom:y,right:i}}set locked(l){let{bottom:i,right:h}=l,{left:y,top:x}=l,o=this.parentElement,C=o.offsetLeft,s=o.offsetTop,g=o.offsetWidth,k=o.offsetHeight,c=o.offsetParent.offsetWidth-C-g,d=o.offsetParent.offsetHeight-s-k;if(Object.assign(o.style,{left:"",right:"",top:"",bottom:"",width:"",height:""}),!h)y=!0;if(!i)x=!0;if(y)o.style.left=C+"px";if(h)o.style.right=c+"px";if(y&&h)o.style.width="auto";else o.style.width=g+"px";if(x)o.style.top=s+"px";if(i)o.style.bottom=d+"px";if(x&&i)o.style.height="auto";else o.style.height=k+"px";this.queueRender()}get coords(){let{top:l,left:i,right:h,bottom:y}=this.parentElement.style;return{top:parseFloat(l),left:parseFloat(i),right:parseFloat(h),bottom:parseFloat(y)}}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=(l)=>{let{locked:i}=this;this.locked=i;let h=this.parentElement,{top:y,left:x,bottom:o,right:C}=this.coords;x1(l,(s,g,k)=>{if([s,g]=B1.snappedCoords(k,[s,g]),!isNaN(y))h.style.top=y+g+"px";if(!isNaN(o))h.style.bottom=o-g+"px";if(!isNaN(x))h.style.left=x+s+"px";if(!isNaN(C))h.style.right=C-s+"px";if(k.type==="mouseup")return this.triggerChange(),!0})};resize=(l)=>{let i=this.parentElement,{locked:h}=this;this.locked=Object.assign({left:!0,top:!0,right:!0,bottom:!0});let[y,x]=[this.right,this.bottom];x1(l,(o,C,s)=>{let g=y-o,k=x-C;if([g,k]=B1.snappedCoords(s,[g,k]),i.style.right=g+"px",i.style.bottom=k+"px",s.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};adjustSize=(l)=>{let i=this.parentElement,{locked:h}=this,y=l.target.getAttribute("part");this.locked=Object.assign({left:!0,right:!0,top:!0,bottom:!0});let x=this[y];x1(l,(o,C,s)=>{let[g]=B1.snappedCoords(s,[x+(["left","right"].includes(y)?o:C)*(["right","bottom"].includes(y)?-1:1)]);if(i.style[y]=g+"px",s.type==="mouseup")return this.locked=h,this.triggerChange(),!0})};get rect(){return this.parentElement.getBoundingClientRect()}get center(){let l=this.parentElement.getBoundingClientRect();return{x:l.x+l.width*0.5,y:l.y+l.height*0.5}}get element(){return this.parentElement}adjustRotation=(l)=>{let{center:i}=this,{transformOrigin:h}=this.element.style;if(!h)this.element.style.transformOrigin="50% 50%";x1(l,(y,x,o)=>{let{clientX:C,clientY:s}=o,g=C-i.x,k=s-i.y,c=k>0?90:-90;if(g!==0)c=Math.atan2(k,g)*180/Math.PI;if(c=B1.snappedAngle(o,c),c===0)this.element.style.transformOrigin="",this.element.style.transform="";else this.element.style.transform=`rotate(${c}deg)`;return this.triggerChange(),o.type==="mouseup"})};toggleLock=(l)=>{let{locked:i}=this,h=l.target.title.split(" ")[1];i[h]=!i[h],this.locked=i,this.queueRender(),l.stopPropagation(),l.preventDefault()};content=()=>[p1({part:"move",style:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}},B.move()),p1({part:"left",title:"resize left",class:"drag-size",style:{left:"-6px",width:"8px"}}),p1({part:"right",title:"resize right",class:"drag-size",style:{left:"calc(100% - 2px)",width:"8px"}}),p1({part:"top",title:"resize top",class:"drag-size",style:{top:"-6px",height:"8px",cursor:"ns-resize"}}),p1({part:"bottom",title:"resize bottom",class:"drag-size",style:{top:"calc(100% - 2px)",height:"8px",cursor:"ns-resize"}}),p1({part:"resize",style:{top:"100%",left:"100%"}},B.resize()),p1({part:"rotate",style:{top:"50%",right:"0"}},B.refreshCw()),p1({part:"lockLeft",title:"lock left",style:{top:"50%",left:0,transform:"translate(-100%, -50%)"}},B.unlock(),B.lock()),p1({part:"lockRight",title:"lock right",style:{top:"50%",left:"100%",transform:"translate(0%, -50%)"}},B.unlock(),B.lock()),p1({part:"lockTop",title:"lock top",style:{top:0,left:"50%",transform:"translate(-50%, -100%)"}},B.unlock(),B.lock()),p1({part:"lockBottom",title:"lock bottom",style:{top:"100%",left:"50%",transform:"translate(-50%, 0%)"}},B.unlock(),B.lock()),rh()];connectedCallback(){super.connectedCallback();let{left:l,right:i,top:h,bottom:y,lockLeft:x,lockRight:o,lockTop:C,lockBottom:s,move:g,resize:k,rotate:c}=this.parts,d={passive:!0};[l,i,h,y].forEach((n)=>{n.addEventListener("mousedown",this.adjustSize,d),n.addEventListener("touchstart",this.adjustSize,d)}),[x,o,C,s].forEach((n)=>{n.addEventListener("click",this.toggleLock)}),k.addEventListener("mousedown",this.resize,d),g.addEventListener("mousedown",this.adjustPosition,d),c.addEventListener("mousedown",this.adjustRotation,d),k.addEventListener("touchstart",this.resize,d),g.addEventListener("touchstart",this.adjustPosition,d),c.addEventListener("touchstart",this.adjustRotation,d)}render(){if(super.render(),!this.parentElement)return;let{lockLeft:l,lockRight:i,lockTop:h,lockBottom:y}=this.parts,{left:x,right:o,top:C,bottom:s}=this.locked;l.toggleAttribute("locked",x),i.toggleAttribute("locked",o),h.toggleAttribute("locked",C),y.toggleAttribute("locked",s)}}var dh=B1.elementCreator();var{div:wh,input:nh,button:u5,span:ph}=f,U8=(l)=>l,F8="null filter, everything matches",M5={contains:{caption:"contains",negative:"does not contain",makeTest:(l)=>{return l=l.toLocaleLowerCase(),(i)=>String(i).toLocaleLowerCase().includes(l)}},hasTags:{caption:"has tags",makeTest:(l)=>{let i=l.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&i.find((y)=>!h.includes(y))===void 0}},doesNotHaveTags:{caption:"does not have tags",makeTest:(l)=>{let i=l.split(/[\s,]/).map((h)=>h.trim().toLocaleLowerCase()).filter((h)=>h!=="");return(h)=>Array.isArray(h)&&i.find((y)=>h.includes(y))===void 0}},equals:{caption:"=",negative:"≠",makeTest:(l)=>{if(isNaN(Number(l)))return l=String(l).toLocaleLowerCase(),(h)=>String(h).toLocaleLowerCase()===l;let i=Number(l);return(h)=>Number(h)===i}},after:{caption:"is after",negative:"is before",makeTest:(l)=>{let i=new Date(l);return(h)=>new Date(h)>i}},greaterThan:{caption:">",negative:"≤",makeTest:(l)=>{if(!isNaN(Number(l))){let i=Number(l);return(h)=>Number(h)>i}return l=l.toLocaleLowerCase(),(i)=>String(i).toLocaleLowerCase()>l}},truthy:{caption:"is true/non-empty/non-zero",negative:"is false/empty/zero",needsValue:!1,makeTest:()=>(l)=>!!l},isTrue:{caption:"= true",needsValue:!1,makeTest:()=>(l)=>l===!0},isFalse:{caption:"= false",needsValue:!1,makeTest:()=>(l)=>l===!1}},Bh={description:"anything",test:()=>!0};function G8(l){return l.options[l.selectedIndex]?.caption||""}class m5 extends z{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=M5;content=()=>[k1({part:"haystack"}),k1({part:"condition"}),nh({part:"needle",type:"search"}),ph({part:"padding"}),u5({part:"remove",title:"delete"},B.trash())];filter=Bh;get state(){let{haystack:l,needle:i,condition:h}=this.parts;return{haystack:l.value,needle:i.value,condition:h.value}}set state(l){Object.assign(this,l)}buildFilter=()=>{let{haystack:l,condition:i,needle:h}=this.parts,y=i.value.startsWith("~"),x=y?i.value.slice(1):i.value,o=this.filters[x];h.hidden=o.needsValue===!1;let C=o.needsValue===!1?o.makeTest(void 0):o.makeTest(h.value),s=l.value,g;if(s!=="*")g=y?(d)=>!C(d[s]):(d)=>C(d[s]);else g=y?(d)=>Object.values(d).find((n)=>!C(n))!==void 0:(d)=>Object.values(d).find((n)=>C(n))!==void 0;let k=o.needsValue!==!1?` "${h.value}"`:"",c=`${G8(l)} ${G8(i)}${k}`;this.filter={description:c,test:g},this.parentElement?.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{haystack:l,condition:i,needle:h,remove:y}=this.parts;l.addEventListener("change",this.buildFilter),i.addEventListener("change",this.buildFilter),h.addEventListener("input",this.buildFilter),l.value=this.haystack,i.value=this.condition,h.value=this.needle,y.addEventListener("click",()=>{let{parentElement:x}=this;this.remove(),x?.dispatchEvent(new Event("change"))})}render(){super.render();let{haystack:l,condition:i,needle:h}=this.parts;if(l.options=[{caption:"any field",value:"*"},...this.fields.map((y)=>y.prop)],i.options=Object.keys(this.filters).map((y)=>{let x=this.filters[y];return x.negative!==void 0?[{caption:x.caption,value:y},{caption:x.negative,value:"~"+y}]:{caption:x.caption,value:y}}).flat(),this.haystack!=="")l.value=this.haystack;if(this.condition!=="")i.value=this.condition;if(this.needle!=="")h.value=this.needle;this.buildFilter()}}var o4=m5.elementCreator();class L5 extends z{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(l){this._fields=l,this.queueRender()}get state(){let{filterContainer:l}=this.parts;return[...l.children].map((i)=>i.state)}set state(l){let{fields:i,filters:h}=this,{filterContainer:y}=this.parts;y.textContent="";for(let x of l)y.append(o4({fields:i,filters:h,...x}))}filter=U8;description=F8;addFilter=()=>{let{fields:l,filters:i}=this,{filterContainer:h}=this.parts;h.append(o4({fields:l,filters:i}))};content=()=>[u5({part:"add",title:"add filter condition",onClick:this.addFilter,class:"round"},B.plus()),wh({part:"filterContainer"}),u5({part:"reset",title:"reset filter",onClick:this.reset},B.x())];filters=M5;reset=()=>{let{fields:l,filters:i}=this,{filterContainer:h}=this.parts;this.description=F8,this.filter=U8,h.textContent="",h.append(o4({fields:l,filters:i})),this.dispatchEvent(new Event("change"))};buildFilter=()=>{let{filterContainer:l}=this.parts;if(l.children.length===0){this.reset();return}let i=[...l.children].map((y)=>y.filter),h=i.map((y)=>y.test);this.description=i.map((y)=>y.description).join(", "),this.filter=(y)=>y.filter((x)=>h.find((o)=>o(x)===!1)===void 0),this.dispatchEvent(new Event("change"))};connectedCallback(){super.connectedCallback();let{filterContainer:l}=this.parts;l.addEventListener("change",this.buildFilter),this.reset()}render(){super.render()}}var fh=L5.elementCreator();var{form:zh,slot:e5,tosiSlot:K8,label:vh,input:jh,span:th}=f;function H1(l,i,h){if(h!==""&&h!==!1)l.setAttribute(i,h);else l.removeAttribute(i)}function Ah(l){switch(l.type){case"checkbox":return l.checked;case"radio":{let i=l.parentElement?.querySelector(`input[type="radio"][name="${l.name}"]:checked`);return i?i.value:null}case"range":case"number":return Number(l.value);default:return Array.isArray(l.value)&&l.value.length===0?null:l.value}}function a8(l,i){if(!(l instanceof HTMLElement));else if(l instanceof HTMLInputElement)switch(l.type){case"checkbox":l.checked=i;break;case"radio":l.checked=i===l.value;break;default:l.value=String(i||"")}else if(i!=null||l.value!=null)l.value=String(i||"")}class C4 extends z{static preferredTagName="tosi-field";static lightStyleSpec={':host [part="field"]':{position:"relative",display:"flex",alignItems:"center",gap:w.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=vh(K8({part:"caption"}),th({part:"field"},K8({part:"input",name:"input"}),jh({part:"valueHolder"})));valueChanged=!1;handleChange=()=>{let{input:l,valueHolder:i}=this.parts,h=l.children[0]||i;if(h!==i)i.value=h.value;this.value=Ah(h),this.valueChanged=!0;let y=this.closest("tosi-form");if(y&&this.key!=="")switch(this.type){case"checkbox":y.fields[this.key]=h.checked;break;case"number":case"range":if(this.fixedPrecision>-1)h.value=Number(h.value).toFixed(this.fixedPrecision),y.fields[this.key]=Number(h.value);else y.fields[this.key]=Number(h.value);break;default:y.fields[this.key]=h.value}};connectedCallback(){super.connectedCallback();let{input:l,valueHolder:i}=this.parts;i.addEventListener("change",this.handleChange),l.addEventListener("change",this.handleChange,!0)}render(){if(this.valueChanged){this.valueChanged=!1;return}let{input:l,caption:i,valueHolder:h,field:y}=this.parts;if(i.textContent?.trim()==="")i.append(this.caption!==""?this.caption:this.key);if(this.type==="text"){l.textContent="";let x=f.textarea({value:this.value});if(this.placeholder)x.setAttribute("placeholder",this.placeholder);l.append(x)}else if(this.type==="color")l.textContent="",l.append(n5({value:this.value}));else if(l.children.length===0){if(H1(h,"placeholder",this.placeholder),H1(h,"type",this.type),H1(h,"pattern",this.pattern),H1(h,"min",this.min),H1(h,"max",this.max),this.step)H1(h,"step",this.step);else if(this.fixedPrecision>0&&this.type==="number")H1(h,"step",Math.pow(10,-this.fixedPrecision))}if(a8(h,this.value),a8(l.children[0],this.value),this.prefix?y.setAttribute("prefix",this.prefix):y.removeAttribute("prefix"),this.suffix?y.setAttribute("suffix",this.suffix):y.removeAttribute("suffix"),h.classList.toggle("hidden",l.children.length>0),l.children.length>0)h.setAttribute("tabindex","-1");else h.removeAttribute("tabindex");l.style.display=l.children.length===0?"none":"",H1(h,"required",!this.optional)}}class s4 extends z{static preferredTagName="tosi-form";context={};value={};get isValid(){return[...this.querySelectorAll("*")].filter((i)=>i.required!==void 0).find((i)=>!i.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=[e5({part:"header",name:"header"}),zh({part:"form"},e5({part:"content"})),e5({part:"footer",name:"footer"})];getField=(l)=>{return this.querySelector(`tosi-field[key="${l}"]`)};get fields(){if(typeof this.value==="string")try{this.value=JSON.parse(this.value)}catch(h){console.log("<tosi-form> could not use its value, expects valid JSON"),this.value={}}let{getField:l}=this,i=this.dispatchEvent.bind(this);return new Proxy(this.value,{get(h,y){return h[y]},set(h,y,x){if(h[y]!==x){h[y]=x;let o=l(y);if(o)o.value=x;i(new Event("change"))}return!0}})}set fields(l){let i=[...this.querySelectorAll("tosi-field")];for(let h of i)h.value=l[h.key]}submit=()=>{this.parts.form.dispatchEvent(new Event("submit"))};handleSubmit=(l)=>{l.preventDefault(),l.stopPropagation(),this.syncFieldValues();let i=this.fields;this.submitCallback(i,this.isValid)};submitCallback=(l,i)=>{console.log("override submitCallback to handle this data",{value:l,isValid:i})};connectedCallback(){super.connectedCallback();let{form:l}=this.parts;l.addEventListener("submit",this.handleSubmit),this.addEventListener("change",this.handleElementChange,!0),this.initializeNamedElements()}handleElementChange=(l)=>{let i=l.target,h=i.getAttribute("name");if(h&&"value"in i)this.fields[h]=i.value};syncFieldValues(){let l=this.fields,i=this.querySelectorAll("[name], [key]");for(let h of i){let y=h.getAttribute("name")||h.getAttribute("key");if(!y)continue;if(l[y]===void 0){let x=h.value??h.getAttribute("value");if(x!=null)l[y]=x}}}initializeNamedElements(){let l=this.fields,i=this.querySelectorAll("[name], [key]");for(let h of i){let y=h.getAttribute("name")||h.getAttribute("key");if(!y)continue;if(l[y]!==void 0)h.value=l[y]}}}var qh=C4,_h=s4,Q8=C4.elementCreator(),W8=s4.elementCreator(),Ph=Q8,Vh=W8;var{a:Oh}=f;class E5 extends z{static preferredTagName="tosi-header";static shadowStyleSpec={":host":{display:"flex",alignItems:"center",padding:w.tosiHeaderPadding("12px 24px"),background:w.tosiHeaderBg("var(--tosi-accent, #EE257B)"),lineHeight:w.tosiHeaderLineHeight("32px"),gap:w.tosiHeaderGap("8px")},"::slotted(*)":{display:"inline-flex",alignItems:"center"}};content=({slot:l})=>[l()]}var Uh=E5.elementCreator(),Y8={tosijs:()=>B.tosi(),discord:()=>B.discord(),blog:()=>B.blog(),github:()=>B.github(),npm:()=>B.npm()};class l3 extends z{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 l=[];for(let[i,h]of Object.entries(this.links)){if(!h||!Y8[i])continue;l.push(Oh({title:i,target:"_blank",href:h},Y8[i]()))}this.replaceChildren(...l)}}var Fh=l3.elementCreator();function N8(){return navigator.getGamepads().filter((i)=>i!==null).map((i)=>{let{id:h,axes:y,buttons:x}=i;return{id:h,axes:y,buttons:x.map((o,C)=>{let{pressed:s,value:g}=o;return{index:C,pressed:s,value:g}}).filter((o)=>o.pressed||o.value!==0).reduce((o,C)=>{return o[C.index]=C.value,o},{})}})}function Gh(){let l=N8();return l.length===0?"no active gamepads":l.map(({id:i,axes:h,buttons:y})=>{let x=h.map((C)=>C.toFixed(2)).join(" "),o=Object.keys(y).map((C)=>`[${C}](${y[Number(C)].toFixed(2)})`).join(" ");return`${i}
95
95
  ${x}
96
96
  ${o}`}).join(`
97
97
  `)}function Kh(l){let i={};return l.input.onControllerAddedObservable.add((h)=>{h.onMotionControllerInitObservable.add((y)=>{let x={};y.getComponentIds().forEach((C)=>{let s=y.getComponent(C);if(x[C]={pressed:s.pressed,touched:s.touched,value:s.value,axes:{x:s.axes.x,y:s.axes.y}},s.onButtonStateChangedObservable.add((g)=>{x[C].pressed=g.pressed,x[C].touched=g.touched,x[C].value=g.value}),s.onAxisValueChangedObservable)s.onAxisValueChangedObservable.add((g)=>{x[C].axes={x:g.x,y:g.y}})}),i[y.handedness]=x})}),i}function ah(l){if(l===void 0||Object.keys(l).length===0)return"no xr inputs";return Object.keys(l).map((i)=>{let h=l[i],y=[];for(let[x,o]of Object.entries(h)){let C=[];if(o.pressed)C.push("P");if(o.touched)C.push("T");let s=o.value>0,g=o.axes.x!==0||o.axes.y!==0;if(C.length>0||s||g){let k=`${x}[${C.join("")}]`;if(s)k+=` v:${o.value.toFixed(2)}`;if(g)k+=` x:${o.axes.x.toFixed(2)} y:${o.axes.y.toFixed(2)}`;y.push(k)}}return`${i}
98
98
  ${y.join(`
99
99
  `)||"(idle)"}`}).join(`
100
- `)}var{slot:i3}=f;class h3 extends z{static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[i3()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:w.tosiRowGap("0"),alignItems:w.tosiRowAlign("stretch"),justifyContent:w.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 Qh=h3.elementCreator();class y3 extends z{static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[i3()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:w.tosiColumnGap("0"),alignItems:w.tosiColumnAlign("stretch"),justifyContent:w.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 Wh=y3.elementCreator();class x3 extends z{static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[i3()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:w.tosiGridColumns("1fr"),gridTemplateRows:w.tosiGridRows("auto"),gap:w.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 Yh=x3.elementCreator(),{span:X8}=f,R8=(...l)=>X8({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...l),o3=(...l)=>X8({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...l);var V1={accent:A.fromCss("#EE257B"),background:A.fromCss("#fafafa"),text:A.fromCss("#222222")},$8={_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 Z8(l){let{accent:i,background:h,text:y}=l,x=l.accentText??i.contrasting(),o=l.backgroundInset??h.darken(0.03),C=l.border??y.opacity(0.15),s=l.shadow??y.opacity(0.1),g=l.focus??i.opacity(0.5);return{_tosiAccent:i,_tosiAccentLight:i.brighten(0.15),_tosiAccentDark:i.darken(0.15),_tosiAccentText:x,_tosiBg:h,_tosiBgInset:o,_tosiBgHover:h.darken(0.05),_tosiBgActive:h.darken(0.1),_tosiText:y,_tosiTextMuted:y.opacity(0.6),_tosiTextDisabled:y.opacity(0.4),_tosiBorder:C,_tosiBorderFocus:i,_tosiShadow:s,_tosiShadowColor:s,_tosiFocusRing:`0 0 0 2px ${g}`,_tosiInputBg:h,_tosiInputBorder:C,_tosiInputBorderFocus:i,_tosiButtonBg:h,_tosiButtonText:y,_tosiButtonBorder:C,_tosiButtonHoverBg:h.darken(0.05),_tosiButtonActiveBg:i,_tosiButtonActiveText:x}}function q2(l){return{":root":{...$8,...Z8(l)}}}function g4(l){let h=q2(l)[":root"];return{":root":u4(h)}}function C3(l,i="tosi-theme"){a1(i,l)}var Nh=q2(V1),Xh=g4(V1),b8={"--xin-icon-size":r.tosiIconSize,"--xin-icon-fill":r.tosiIconFill,"--xin-icon-stroke":r.tosiIconStroke,"--xin-tabs-bar-color":r.tosiTabsBarColor,"--xin-tabs-bar-height":r.tosiTabsBarHeight,"--xin-tabs-selected-color":r.tosiTabsSelectedColor,"--spacing":r.tosiSpacing,"--gap":r.tosiSpacingSm,"--touch-size":r.tosiTouchSize,"--background":r.tosiBg,"--text-color":r.tosiText,"--brand-color":r.tosiAccent,"--brand-text-color":r.tosiAccentText};function Rh(l){return{":root":{...q2(l)[":root"],...b8}}}function $h(l,i){let h={};for(let[y,x]of Object.entries(i)){let o=`--tosi-${l}-${y.replace(/([A-Z])/g,"-$1").toLowerCase()}`;h[y]=`var(${o}, ${x})`}return h}var{div:P2,label:k4,input:c4,span:Zh,button:J8}=f,{liveTheme:$}=E({liveTheme:{accent:String(V1.accent),background:String(V1.background),text:String(V1.text),dark:!1}}),r4=!1;function y0(){if(!r4)return;let l={accent:A.fromCss($.accent.value),background:A.fromCss($.background.value),text:A.fromCss($.text.value)},i=$.dark.value?g4(l):q2(l);C3(i,"tosi-live-theme")}function H8(){if(r4)return;r4=!0,$.accent.observe(y0),$.background.observe(y0),$.text.observe(y0),$.dark.observe(y0),y0()}function bh(){r4=!1}class s3 extends z{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=()=>[P2({class:"field"},k4("Accent"),c4({type:"color",part:"accent"})),P2({class:"field"},k4("Background"),c4({type:"color",part:"background"})),P2({class:"field"},k4("Text"),c4({type:"color",part:"text"})),P2({class:"field"},k4("Dark mode"),c4({type:"checkbox",part:"dark"})),P2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},Zh("Preview "),J8({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),P2({class:"actions"},J8({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),H8();let l=()=>{this.parts.accent.value=$.accent.value,this.parts.background.value=$.background.value,this.parts.text.value=$.text.value,this.parts.dark.checked=$.dark.value};l(),$.accent.observe(l),$.background.observe(l),$.text.observe(l),$.dark.observe(l),this.parts.accent.addEventListener("input",()=>{$.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{$.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{$.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{$.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{$.accent.value=String(V1.accent),$.background.value=String(V1.background),$.text.value=String(V1.text),$.dark.value=!1})}}var Jh=s3.elementCreator();var{div:Hh}=f;class x2 extends z{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(l){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=Hh({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(x2.mapboxCSSAvailable===void 0)x2.mapboxCSSAvailable=U0("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((l)=>{console.error("failed to load mapbox-gl.css",l)}),x2.mapboxAvailable=g1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((l)=>{console.error("failed to load mapbox-gl.js",l)})}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[x,o,C]=this.coords.split(",").map((s)=>Number(s));this._map.setCenter([o,x]),this._map.setZoom(C),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}let{div:l}=this.parts,[i,h,y]=this.coords.split(",").map((x)=>Number(x));this._lastCoords=this.coords,this._lastStyle=this.mapStyle,x2.mapboxAvailable.then(({mapboxgl:x})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;"),x.accessToken=this.token,this._map=new x.Map({container:l,style:this.mapStyle,zoom:y,center:[h,i]}),this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let o=this._map.getCenter(),C=this._map.getZoom(),s=`${o.lat.toFixed(6)},${o.lng.toFixed(6)},${C.toFixed(1)}`;if(s!==this.value){if(this.internals)this.internals.setFormValue(s)}})})}}var Sh=x2.elementCreator();var{div:g3,span:d4,button:k3}=f,x0=86400000,Dh=[0,1,2,3,4,5,6],Ih=[1,2,3,4,5,6,7,8,9,10,11,12],c3=(l,i=2,h="0")=>String(l).padStart(i,h),o0=(l,i,h)=>new Date(`${l}-${c3(i)}-${c3(h)}`);class r3 extends z{static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:w.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:w.monthTodayBackground("transparent"),boxShadow:w.monthTodayShadow("none"),backdropFilter:w.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:w.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:w.monthDayColor("hotpink"),background:w.monthDayBackground("white"),fontWeight:w.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:w.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:w.monthDateCheckedColor("white"),background:w.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:w.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:w.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:w.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:w.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:w.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:o0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:o0(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(l){this.disabled=l}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return Ih.map((l)=>({caption:o0(2025,l,1).toString().split(" ")[1],value:String(l)}))}get years(){let l=Number(this.minDate.split("-")[0]),i=Number(this.maxDate.split("-")[0]),h=[];for(let y=l;y<=i;y++)h.push(String(y));return h}monthChanged=(l,i)=>{};gotoMonth(l,i){if(this.month!==i||this.year!==l)this.month=i,this.year=l,this.monthChanged(l,i)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(l){this.selectedDays[1]=l,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(l){this.selectedDays[0]=l,this.selectedDays.splice(2)}clickDate=(l)=>{let i=l.target.getAttribute("title");this.selectDate(i)};keyDate=(l)=>{let i=!1;switch(l.code){case"Space":{let h=l.target.getAttribute("title");this.selectDate(h),i=!0;break}case"Tab":break;default:console.log(l)}if(i)l.preventDefault(),l.stopPropagation()};#l="";selectDate=(l)=>{if(this.#l=l,this.range){if(!this.to)this.selectedDays=[l,l];else if(this.from===l&&this.to===l)this.selectedDays=[];else if(this.from===l)this.from=this.to;else if(this.to===l)this.to=this.from;else if(l<this.from)this.from=l;else if(l>this.to)this.to=l;else this.to=l;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(l))this.selectedDays.splice(this.selectedDays.indexOf(l),1);else this.selectedDays.push(l),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(l))this.value="",this.selectedDays=[];else this.value=l,this.selectedDays=[l]};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=(l)=>{if(!this.range)return this.selectedDays.includes(l);else if(this.range)return this.from&&l>=this.from&&l<=this.to;return!1};dateMenuItem=(l,i="")=>{return l=l.split("T")[0],{caption:i||l,enabled:()=>!l.startsWith(`${this.year}-${c3(this.month)}-`),action:()=>{this.gotoDate(l)}}};jumpMenu=()=>{H({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((l)=>this.dateMenuItem(l))]})};content=()=>[g3({part:"header"},k3({part:"previous",onClick:this.previousMonth},B.chevronLeft()),d4({style:{flex:"1"}}),k3({part:"jump",onClick:this.jumpMenu},B.calendar()),k1({part:"month",options:this.months,onChange:this.setMonth}),k1({part:"year",options:[this.year],onChange:this.setMonth}),d4({style:{flex:"1"}}),k3({part:"next",onClick:this.nextMonth},B.chevronRight())),g3({part:"week"}),g3({part:"days"})];gotoDate(l){let i=new Date(l);this.gotoMonth(i.getFullYear(),i.getMonth()+1)}connectedCallback(){super.connectedCallback();let l=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=l.getMonth()+1;if(isNaN(this.year))this.year=l.getFullYear()}days=[];render(){super.render();let{week:l,days:i,jump:h,month:y,year:x,previous:o,next:C}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let s=o0(this.year,this.month,1),g=new Date(s.valueOf()-(7+s.getDay()-this.weekStart)%7*x0),k=this.month===12?1:this.month+1,c=new Date(o0(this.year+(this.month===12?1:0),k,1).valueOf()-x0),d=new Date(c.valueOf()+(this.weekStart*2+5+this.endDay-c.getDay())%7*x0),n=Dh.map((_)=>new Date(g.valueOf()+_*x0).toString().split(" ")[0]);this.days=[];let v=new Date().toISOString().split("T")[0];for(let _=g.valueOf();_<=d.valueOf();_+=x0){let V=new Date(_),K=V.toISOString().split("T")[0];this.days.push({date:V,selected:!1,inMonth:V.getMonth()+1===this.month,isToday:K===v,isWeekend:V.getDay()%6===0,inRange:!!(this.from&&K>=this.from&&K<=this.to)})}y.value=String(this.month),x.value=String(this.year),y.disabled=x.disabled=h.disabled=o.disabled=C.disabled=this.disabled||this.readonly,x.options=this.years,l.textContent="",l.append(...n.map((_)=>d4({class:"day"},_))),i.textContent="";let p=null,{to:j,from:P}=this;i.append(...this.days.map((_)=>{let V=["date"];if(_.inMonth)V.push("in-month");if(_.isToday)V.push("today");let K=_.date.toISOString().split("T")[0];if(this.checkDay(K))V.push("checked");if(V.push(_.isWeekend?"weekend":"weekday"),this.range){if(j===K)V.push("range-end");if(P===K)V.push("range-start")}let Z=d4({class:V.join(" "),title:K,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},_.date.getDate());if(K===this.#l)p=Z;return Z})),p?.focus()}}var Th=r3.elementCreator();var{div:d3,button:uh}=f,Mh={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class S1 extends z{static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${r.notificationSpacing} ${r.notificationSpacing50} ${r.notificationSpacing} ${r.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:r.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:r.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:r.notificationSpacing,width:r.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:r.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important",color:r.notificationTextColor},":host .note":{display:"grid",background:r.notificationBg,padding:r.notificationPadding,gridTemplateColumns:`${r.notificationIconSize} 1fr ${r.notificationButtonSize}`,gap:r.notificationSpacing,alignItems:"center",borderRadius:r.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${r.notificationAccentColor}`,borderColor:r.notificationAccentColor,borderWidth:r.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note button":{display:"flex",lineHeight:r.notificationButtonSize,padding:0,margin:0,height:r.notificationButtonSize,width:r.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:r.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:r.notificationBg,background:r.notificationAccentColor,padding:r.spacing50},":host .note svg":{height:r.notificationIconSize,width:r.notificationIconSize,pointerEvents:"none",color:r.notificationAccentColor},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:r.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(l){l.classList.add("closing"),l.style.marginBottom=-l.offsetHeight+"px";let i=()=>{l.remove()};l.addEventListener("transitionend",i),setTimeout(i,1000)}static post(l){let{message:i,duration:h,type:y,close:x,progress:o,icon:C,color:s}=Object.assign({type:"info",duration:-1},typeof l==="string"?{message:l}:l);if(!this.singleton)this.singleton=w3();let g=this.singleton;document.body.append(g),g.style.zIndex=String(L1()+1);let k=s||Mh[y],c=o||y==="progress"?f.progress():{},d=()=>{if(x)x();S1.removeNote(p)},n=C instanceof SVGElement?C:C?B[C]():B.info(),v=y==="error"||y==="warn",p=d3({class:`note ${y}`,role:v?"alert":"status",ariaLive:v?"assertive":"polite",style:{_notificationAccentColor:k}},n,d3({class:"message"},d3(i),c),uh({class:"close",title:"close",ariaLabel:"Close notification",apply(j){j.addEventListener("click",d)}},B.x()));if(g.shadowRoot.append(p),c instanceof HTMLProgressElement&&o instanceof Function){c.setAttribute("max",String(100)),c.value=o();let j=setInterval(()=>{if(!g.shadowRoot.contains(p)){clearInterval(j);return}let P=o();if(c.value=P,P>=100)S1.removeNote(p)},1000)}if(h>0)setTimeout(()=>{S1.removeNote(p)},h*1000);return p.scrollIntoView(),d}content=null}var mh=S1,w3=S1.elementCreator(),Lh=w3;function eh(l){return S1.post(l)}var S8=async(l,i="SHA-1")=>{let y=new TextEncoder().encode(l),x=await crypto.subtle.digest(i,y);return Array.from(new Uint8Array(x)).map((s)=>s.toString(16).padStart(2,"0")).join("")},D8=async(l)=>{let i=await S8(l),h=await fetch(`https://weakpass.com/api/v1/search/${i}`);if(h.ok){let y=await h.json();console.log("password found in weakpass database",y)}return h.status!==404},{span:n3,tosiSlot:Eh}=f;class w4 extends z{static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:r.spacing50,position:"relative"},":host tosi-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:w.meterHeight("24px"),background:w.indicatorBg("white"),borderRadius:w.meterRadius("4px"),boxShadow:w.meterShadow(`inset 0 0 0 2px ${r.indicatorColor}`)},':host [part="level"]':{height:w.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:r.indicatorColor,margin:w.levelMargin("2px"),borderRadius:w.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:r.descriptionColor,height:w.meterHeight("24px"),lineHeight:w.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(l){return this.issues={tooShort:l.length<this.minLength,short:l.length<this.goodLength,noUpper:!l.match(/[A-Z]/),noLower:!l.match(/[a-z]/),noNumber:!l.match(/[0-9]/),noSpecial:!l.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((i)=>!i).length-1}async isBreached(){let l=this.querySelector("input")?.value;if(!l||typeof l!=="string")return!0;return await D8(l)}updateIndicator=(l)=>{let{level:i,description:h}=this.parts,y=this.indicatorColors.split(","),x=this.descriptionColors.split(","),o=this.strength(l);if(this.value!==o)this.value=o,this.dispatchEvent(new Event("change"));i.style.width=`${(o+1)*16.67}%`,this.style.setProperty("--indicator-color",y[o]),this.style.setProperty("--description-color",x[o]),h.textContent=this.strengthDescriptions[o]};update=(l)=>{let i=l.target.closest("input");this.updateIndicator(i?.value||"")};content=()=>[Eh({onInput:this.update}),n3({part:"meter"},n3({part:"level"}),n3({part:"description"}))];render(){super.render();let l=this.querySelector("input");this.updateIndicator(l?.value)}}var ly=w4,I8=w4.elementCreator(),iy=I8;var{span:p3}=f;class n4 extends z{static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"none",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(l){this.readonly=l}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=()=>p3({part:"container"},p3({part:"empty"}),p3({part:"filled"}));displayValue(l){let{empty:i,filled:h}=this.parts,x=Math.round((typeof l==="string"?0:l||0)/this.step)*this.step;h.style.width=x/this.max*i.offsetWidth+"px"}update=(l)=>{if(this.readonly)return;let{empty:i}=this.parts,h=l instanceof MouseEvent?l.pageX-i.getBoundingClientRect().x:0,y=Math.min(Math.max(this.min,Math.round(h/i.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(l.type==="click")this.value=y;else if(l.type==="mousemove")this.displayValue(y);else this.displayValue(this.value||0)};handleKey=(l)=>{let i=this.value===""?NaN:Number(this.value);if(isNaN(i))i=Math.round((this.min+this.max)*0.5*this.step)*this.step;let h=!1;switch(l.key){case"ArrowUp":case"ArrowRight":i+=this.step,h=!0;break;case"ArrowDown":case"ArrowLeft":i-=this.step,h=!0;break}if(this.value=Math.max(Math.min(i,this.max),this.min),h)l.stopPropagation(),l.preventDefault()};connectedCallback(){super.connectedCallback();let{container:l}=this.parts;l.tabIndex=0,l.addEventListener("mousemove",this.update,!0),l.addEventListener("mouseleave",this.update),l.addEventListener("blur",this.update),l.addEventListener("click",this.update),l.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let l=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",l),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:i,filled:h}=this.parts;if(i.classList.toggle("hollow",this.hollow),i.style.setProperty("--tosi-icon-fill",this.emptyFill),i.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 y=0;y<this.max;y++)i.append(B[this.icon]()),h.append(B[this.icon]())}this.displayValue(this.value)}}var hy=n4,T8=n4.elementCreator(),yy=i1((...l)=>T8(...l),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{tosiSlot:u8,div:xy,button:oy,span:Hs}=f,Cy=[{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 B3(l=Cy){return k1({title:"paragraph style",slot:"toolbar",class:"block-style",options:l.map(({caption:i,tagType:h})=>({caption:i,value:`formatBlock,${h}`}))})}var C0=()=>o3({slot:"toolbar"});function f1(l,i,h){return oy({slot:"toolbar",dataCommand:i,title:l},h)}var sy=()=>[f1("left-justify","justifyLeft",B.alignLeft()),f1("center","justifyCenter",B.alignCenter()),f1("right-justify","justifyRight",B.alignRight()),C0(),f1("bullet list","insertUnorderedList",B.listBullet()),f1("numbered list","insertOrderedList",B.listNumber()),C0(),f1("indent","indent",B.indent()),f1("indent","outdent",B.outdent())],M8=()=>[f1("bold","bold",B.fontBold()),f1("italic","italic",B.fontItalic()),f1("underline","underline",B.fontUnderline())],gy=()=>[B3(),C0(),...M8()],m8=()=>[B3(),C0(),...sy(),C0(),...M8()];class p4 extends z{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(l){if(this.isInitialized)this.parts.doc.contentEditable=l?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(l){let i=this._value;if(this._value=l,this.isInitialized){if(this.parts.doc.innerHTML!==l)this.parts.doc.innerHTML=l}if(i!==l&&this.internals)this.internals.setFormValue(l)}blockElement(l){let{doc:i}=this.parts;while(l.parentElement!==null&&l.parentElement!==i)l=l.parentElement;return l.parentElement===i?l:void 0}get selectedBlocks(){let{doc:l}=this.parts,i=window.getSelection();if(i===null)return[];let h=[];for(let y=0;y<i.rangeCount;y++){let x=i.getRangeAt(y);if(!l.contains(x.commonAncestorContainer))continue;let o=this.blockElement(x.startContainer),C=this.blockElement(x.endContainer);h.push(o);while(o!==C&&o!==null)o=o.nextElementSibling,h.push(o)}return h}get selectedText(){let l=window.getSelection();if(l===null)return"";return this.selectedBlocks.length?l.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(l)=>{if(this._updatingBlockStyle)return;let h=l.target?.closest(j1.tagName);if(h==null)return;this.doCommand(h.value)};handleButtonClick=(l)=>{let h=l.target?.closest("button");if(h==null)return;this.doCommand(h.dataset.command)};content=[u8({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),xy({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),u8({part:"content"})];doCommand(l){if(l===void 0)return;let i=l.split(",");console.log("execCommand",i[0],!1,...i.slice(1)),document.execCommand(i[0],!1,...i.slice(1))}updateBlockStyle(){let l=this.parts.toolbar.querySelector(".block-style");if(l===null)return;let i=this.selectedBlocks.map((h)=>h.tagName);i=[...new Set(i)],this._updatingBlockStyle=!0,l.value=i.length===1?`formatBlock,${i[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:l,content:i}=this.parts;if(i.innerHTML!==""&&l.innerHTML==="")l.innerHTML=i.innerHTML,i.innerHTML="";this.isInitialized=!0,i.style.display="none",l.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(h)=>{this.updateBlockStyle(),this.selectionChange(h,this)})}render(){let{toolbar:l}=this.parts;if(super.render(),l.children.length===0)switch(this.widgets){case"minimal":l.append(...gy());break;case"default":l.append(...m8());break}}}var ky=p4,L8=p4.elementCreator(),cy=i1((...l)=>L8(...l),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:s0}=E({router:{path:"",hash:"",pattern:""}}),f3={};function ry(){return{...f3}}var B4=[],z3=!1,f4=new Set;function dy(l){let i=[];if(l==="")return{regex:/^\/?$/,paramNames:i};let h=l.split("/").map((x)=>{if(x.startsWith(":"))return i.push(x.slice(1)),"([^/]+)";return x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+h.join("/")+"/?$"),paramNames:i}}function wy(l){let i=l.split("?")[0].split("#")[0];for(let y of B4){if(y.fallback)continue;let x=i.match(y.regex);if(x){let o={};return y.paramNames.forEach((C,s)=>{o[C]=decodeURIComponent(x[s+1])}),{route:y,params:o}}}let h=B4.find((y)=>y.fallback);if(h)return{route:h,params:{}};return null}function g0(){let l=z3?window.location.hash.replace(/^#\/?/,""):window.location.pathname;s0.path.value=l,s0.hash.value=window.location.hash;let i=wy(l);if(i){f3=i.params,s0.pattern.value=i.route.regex.source;let h=new Map;for(let y of i.route.targets)h.set(y.view??"default",y);for(let y of f4){let x=y.name||"default",o=h.get(x);if(o)y.replaceChildren(o.component(i.params));else y.replaceChildren()}}else{f3={},s0.pattern.value="";for(let h of f4)h.replaceChildren()}}var e8=!1;function E8(){if(e8)return;e8=!0,window.addEventListener("popstate",g0),window.addEventListener("hashchange",g0)}function ny(l,i={}){z3=i.hashRouting??!1,B4=l.map((h)=>{let{regex:y,paramNames:x}=dy(h.pattern);return{regex:y,paramNames:x,targets:h.targets,fallback:h.fallback??!1}}),E8(),g0()}function py(l){if(E8(),z3)window.location.hash="#/"+l.replace(/^\//,"");else window.history.pushState({},"","/"+l.replace(/^\//,""));g0()}class v3 extends z{static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),f4.add(this),B4.length>0)g0()}disconnectedCallback(){super.disconnectedCallback(),f4.delete(this)}}var By=v3.elementCreator();var{div:fy,slot:zy,label:vy,span:ty,input:l6}=f;class _2 extends z{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(l){if(typeof l==="string")this._choices=_2.parseChoicesString(l);else this._choices=l;this.queueRender()}static parseChoicesString(l){return l.split(",").filter((i)=>i.trim()!=="").map((i)=>{let[h,y]=i.split("=").map((s)=>s.trim()),[x,o]=(y||h).split(":").map((s)=>s.trim()),C=o?B[o]():"";return{value:h,icon:C,caption:x}})}value="";formDisabledCallback(l){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((l)=>l.trim()).filter((l)=>l!=="")}content=()=>[zy(),fy({part:"options"},l6({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:w.segmentedOptionGap("8px"),alignItems:w.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:w.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:w.segmentedOptionGap("8px"),gridTemplateColumns:w.segmentedOptionGridColumns("0px 24px 1fr"),padding:w.segmentedOptionPadding("4px 12px"),font:w.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:w.segmentedFocusShadow(`inset 0 0 0 2px ${w.segmentedOptionCurrentBackground("#44a")}`),borderRadius:w.segmentedOptionsBorderRadius("8px")},":host label:has(:checked)":{color:w.segmentedOptionCurrentColor("#eee"),background:w.segmentedOptionCurrentBackground("#44a")},":host label:has(:checked):focus":{boxShadow:w.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${w.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:w.segmentOptionIconSize("16px"),stroke:w.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:w.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:w.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:w.segmentedOptionsBorderRadius("8px"),background:w.segmentedOptionsBackground("#fff"),color:w.segmentedOptionColor("#222"),overflow:"hidden",alignItems:w.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:w.segmentedOptionPadding("4px 12px"),color:w.segmentedOptionCurrentColor("#eee"),background:w.segmentedOptionCurrentBackground("#44a"),font:w.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:w.segmentedOptionCurrentColor("#eee"),opacity:w.segmentedPlaceholderOpacity(0.75)}};valueChanged=!1;handleChange=()=>{let{options:l,custom:i}=this.parts;if(this.multiple){let h=[...l.querySelectorAll("input:checked")];this.value=h.map((y)=>y.value).join(",")}else{let h=l.querySelector("input:checked");if(!h)this.value="";else if(h.value)i.setAttribute("hidden",""),this.value=h.value;else i.removeAttribute("hidden"),i.focus(),i.select(),this.value=i.value}this.valueChanged=!0};handleKey=(l)=>{let i=!1;switch(l.code){case"Space":if(l.target instanceof HTMLLabelElement)l.target.click(),i=!0;break;case"Tab":if(!(l.target instanceof HTMLLabelElement))l.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let h=l.target.closest("label");if(h.previousElementSibling instanceof HTMLLabelElement)h.previousElementSibling.focus()}i=!0;break;case"ArrowRight":case"ArrowDown":{let h=l.target.closest("label");if(h.nextElementSibling instanceof HTMLLabelElement)h.nextElementSibling.focus()}i=!0;break}if(i)l.preventDefault(),l.stopPropagation()};connectedCallback(){super.connectedCallback();let l=this.getAttribute("choices");if(l&&this._choices.length===0)this._choices=_2.parseChoicesString(l);let{options:i}=this.parts;if(this.name==="")this.name=this.instanceId;if(i.addEventListener("change",this.handleChange),i.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 l=[...this.choices];if(this.other&&!this.multiple){let[i,h]=this.other.split(":");l.push({value:"",caption:i,icon:h})}return l}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((l)=>l.value===this.value))}render(){if(super.render(),this.valueChanged){this.valueChanged=!1;return}let{options:l,custom:i}=this.parts;l.textContent="";let h=this.multiple?"checkbox":"radio",{values:y,isOtherValue:x}=this;if(l.append(...this._choicesWithOther.map((o)=>{return vy({tabindex:0},l6({type:h,name:this.name,value:o.value,checked:y.includes(o.value)||o.value===""&&x,tabIndex:-1}),o.icon||{class:"no-icon"},this.localized?q1(o.caption):ty(o.caption))})),this.other&&!this.multiple)i.hidden=!x,i.value=x?this.value:"",i.placeholder=this.placeholder,l.append(i)}}var jy=_2,i6=_2.elementCreator(),Ay=i1((...l)=>i6(...l),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:h6}=f;class t3 extends z{static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[h6({part:"normal"}),h6({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};onResize=()=>{let{normal:l,small:i}=this.parts,h=this.offsetParent;if(!(h instanceof HTMLElement))return;else if(h.offsetWidth<this.minWidth||h.offsetHeight<this.minHeight)l.hidden=!0,i.hidden=!1,this.value="small";else l.hidden=!1,i.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.onResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.onResize)}}var qy=t3.elementCreator();class z4 extends z{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:r.resizeIconFill}};content=B.resize();get minSize(){let{minWidth:l,minHeight:i}=getComputedStyle(this.target);return{width:parseFloat(l)||32,height:parseFloat(i)||32}}resizeTarget=(l)=>{let{target:i}=this;if(!i)return;let{offsetWidth:h,offsetHeight:y}=i;i.style.left=i.offsetLeft+"px",i.style.top=i.offsetTop+"px",i.style.bottom="",i.style.right="";let{minSize:x}=this;x1(l,(o,C,s)=>{if(i.style.width=Math.max(x.width,h+o)+"px",i.style.height=Math.max(x.height,y+C)+"px",s.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let l={passive:!0};this.addEventListener("mousedown",this.resizeTarget,l),this.addEventListener("touchstart",this.resizeTarget,l)}}var Py=z4,y6=z4.elementCreator(),_y=y6;var{div:Vy,input:Oy,span:Uy,button:j3}=f;class k0 extends z{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":w.brandColor("blue"),"--tag-text-color":w.brandTextColor("white"),display:"inline-flex",borderRadius:w.tagRoundedRadius(r.spacing50),color:r.tagTextColor,background:r.tagBg,padding:`0 ${r.spacing75} 0 ${r.spacing75}`,height:`calc(${r.lineHeight} + ${r.spacing50})`,lineHeight:`calc(${r.lineHeight} + ${r.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:w.fontSize("16px"),color:r.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${r.spacing_50} 0 ${r.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:r.spacing150,width:r.spacing150,color:r.tagCloseButtonColor,background:r.tagCloseButtonBg,borderRadius:w.tagCloseButtonRadius("99px"),opacity:r.tagButtonOpacity},':host [part="remove"]:hover':{background:r.tagCloseButtonBg,opacity:r.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[Uy({part:"caption"},this.caption),j3(B.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var Fy=k0,A3=k0.elementCreator(),Gy=i1((...l)=>A3(...l),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class V2 extends z{static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:r.tagListBg,gap:r.spacing25,borderRadius:w.taglistRoundedRadius(r.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${r.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${r.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:r.inputBg,borderRadius:w.tagContainerRadius(r.spacing50),boxShadow:r.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:r.spacing25,minHeight:`calc(${r.lineHeight} + ${r.spacing})`,padding:r.spacing25},':host [part="tagMenu"]':{width:r.touchSize,height:r.touchSize,lineHeight:r.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:r.brandColor,color:r.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return this.value.split(",").map((l)=>l.trim()).filter((l)=>l!=="")}set tags(l){this.value=l.join(",")}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(l){if(typeof l==="string")this._availableTags=V2.parseAvailableTagsString(l);else this._availableTags=l;this.queueRender()}static parseAvailableTagsString(l){return l.split(",").map((i)=>{let h=i.trim();return h===""?null:h})}connectedCallback(){super.connectedCallback();let l=this.getAttribute("available-tags");if(l&&this._availableTags.length===0)this._availableTags=V2.parseAvailableTagsString(l)}formDisabledCallback(l){this.disabled=l}formResetCallback(){this.value=""}addTag=(l)=>{let i=l.trim();if(i===""||this.tags.includes(i))return;this.tags=[...this.tags,i],this.queueRender(!0)};toggleTag=(l)=>{if(this.tags.includes(l))this.tags=this.tags.filter((i)=>i!==l),this.queueRender(!0);else this.addTag(l)};enterTag=(l)=>{let{tagInput:i}=this.parts;switch(l.key){case",":{let h=i.value.split(",")[0];this.addTag(h)}break;case"Enter":{let h=i.value.split(",")[0];this.addTag(h)}l.stopPropagation(),l.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:l}=this,{tagMenu:i}=this.parts,h=[...this.availableTags],y=this.tags.filter((o)=>!h.includes(o));if(y.length)h.push(null,...y);let x=h.map((o)=>{if(o===""||o===null)return null;else if(typeof o==="object")return{checked:()=>this.tags.includes(o.value),caption:o.caption,action(){l(o.value)}};else return{checked:()=>this.tags.includes(o),caption:o,action(){l(o)}}});H({target:i,width:"auto",menuItems:x})};content=()=>[j3({type:"button",style:{visibility:"hidden"},tabindex:-1}),Vy({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),Oy({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),j3({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},B.chevronDown())];removeTag=(l)=>{if(this.editable&&!this.disabled){let i=l.target.closest(k0.tagName);this.tags=this.tags.filter((h)=>h!==i.caption),i.remove(),this.queueRender(!0)}l.stopPropagation(),l.preventDefault()};render(){super.render();let{tagContainer:l,tagMenu:i,tagInput:h}=this.parts;if(i.disabled=this.disabled,h.value="",h.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)i.toggleAttribute("hidden",!1),h.toggleAttribute("hidden",!this.textEntry);else i.toggleAttribute("hidden",!0),h.toggleAttribute("hidden",!0);l.textContent="";for(let y of this.tags)l.append(A3({caption:y,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var Ky=V2,x6=V2.elementCreator(),ay=i1((...l)=>x6(...l),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var o6="1.5.18";var{span:Qy}=f,c0=null,v4=null,t4=null,O1="tosi-tooltip";a1("tosi-tooltip",{[`.${O1}`]:{pointerEvents:"none",padding:w.tosiTooltipPadding("4px 10px"),borderRadius:w.tosiTooltipRadius("6px"),background:w.tosiTooltipBg("#333"),color:w.tosiTooltipColor("#fff"),fontSize:w.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:w.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${O1} p`]:{margin:"0"},[`.${O1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${O1} a`]:{color:"inherit"},[`.${O1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${O1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${O1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${O1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${O1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}});function O2(){if(v4!==null)clearTimeout(v4),v4=null;if(c0!==null)c0.remove(),c0=null;t4=null}function Wy(l){if(l.startsWith("s"))return"tt-s";if(l.startsWith("n"))return"tt-n";if(l.startsWith("e"))return"tt-e";if(l.startsWith("w"))return"tt-w";return"tt-s"}function Yy(l,i,h){let y=i.getBoundingClientRect(),x=l.getBoundingClientRect(),o=y.left+y.width*0.5,C=y.top+y.height*0.5,s;if(h.startsWith("s")||h.startsWith("n"))s=Math.max(8,Math.min(x.width-8,o-x.left))-4;else s=Math.max(8,Math.min(x.height-8,C-x.top))-4;l.style.setProperty("--tosi-tooltip-arrow",s+"px")}function Ny(l,i){if(i)l=X(l);let h=Qy({class:O1});return h.innerHTML=G.parseInline(l),h}function Xy(l,i,h){O2(),t4=l;let{top:y,left:x,width:o}=l.getBoundingClientRect(),C=x+o*0.5,s=window.innerHeight,g=window.innerWidth,k=(y>s*0.5?"n":"s")+(C>g*0.5?"w":"e"),c=Ny(i,h);c.classList.add(Wy(k)),c0=b2({content:c,target:l,position:k,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(c0&&t4)Yy(c,l,k)})}function Ry(l){for(let i of l.composedPath())if(i instanceof HTMLElement&&i.dataset.tooltip)return i;return null}function $y(l={}){let{convertTitles:i=!0,delay:h=250,localize:y=!1}=l;document.addEventListener("pointermove",(x)=>{if(i){for(let s of x.composedPath())if(s instanceof HTMLElement&&s.title&&!s.dataset.tooltip){s.dataset.tooltip=s.title,s.removeAttribute("title");break}}let o=Ry(x);if(o===t4)return;if(O2(),!o)return;let C=o.dataset.tooltip||null;if(!C)return;v4=setTimeout(()=>Xy(o,C,y),h)}),document.addEventListener("pointerleave",O2),document.addEventListener("pointerdown",O2),document.addEventListener("keydown",O2),window.addEventListener("scroll",O2,!0)}Object.assign(globalThis,{xinjs:$2,xinjsui:q3});})();
100
+ `)}var{slot:i3}=f;class h3 extends z{static preferredTagName="tosi-row";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[i3()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"row",gap:w.tosiRowGap("0"),alignItems:w.tosiRowAlign("stretch"),justifyContent:w.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 Qh=h3.elementCreator();class y3 extends z{static preferredTagName="tosi-column";static initAttributes={gap:"",wrap:!1,align:"",justify:""};content=[i3()];static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",gap:w.tosiColumnGap("0"),alignItems:w.tosiColumnAlign("stretch"),justifyContent:w.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 Wh=y3.elementCreator();class x3 extends z{static preferredTagName="tosi-grid";static initAttributes={columns:"",rows:"",gap:""};content=[i3()];static shadowStyleSpec={":host":{display:"grid",gridTemplateColumns:w.tosiGridColumns("1fr"),gridTemplateRows:w.tosiGridRows("auto"),gap:w.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 Yh=x3.elementCreator(),{span:X8}=f,R8=(...l)=>X8({style:{flex:"1 1 var(--tosi-space, 0.5em)"}},...l),o3=(...l)=>X8({style:{flex:"0 0 var(--tosi-space, 0.5em)"}},...l);var V1={accent:A.fromCss("#EE257B"),background:A.fromCss("#fafafa"),text:A.fromCss("#222222")},$8={_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 Z8(l){let{accent:i,background:h,text:y}=l,x=l.accentText??i.contrasting(),o=l.backgroundInset??h.darken(0.03),C=l.border??y.opacity(0.15),s=l.shadow??y.opacity(0.1),g=l.focus??i.opacity(0.5);return{_tosiAccent:i,_tosiAccentLight:i.brighten(0.15),_tosiAccentDark:i.darken(0.15),_tosiAccentText:x,_tosiBg:h,_tosiBgInset:o,_tosiBgHover:h.darken(0.05),_tosiBgActive:h.darken(0.1),_tosiText:y,_tosiTextMuted:y.opacity(0.6),_tosiTextDisabled:y.opacity(0.4),_tosiBorder:C,_tosiBorderFocus:i,_tosiShadow:s,_tosiShadowColor:s,_tosiFocusRing:`0 0 0 2px ${g}`,_tosiInputBg:h,_tosiInputBorder:C,_tosiInputBorderFocus:i,_tosiButtonBg:h,_tosiButtonText:y,_tosiButtonBorder:C,_tosiButtonHoverBg:h.darken(0.05),_tosiButtonActiveBg:i,_tosiButtonActiveText:x}}function q2(l){return{":root":{...$8,...Z8(l)}}}function g4(l){let h=q2(l)[":root"];return{":root":u4(h)}}function C3(l,i="tosi-theme"){a1(i,l)}var Nh=q2(V1),Xh=g4(V1),b8={"--xin-icon-size":r.tosiIconSize,"--xin-icon-fill":r.tosiIconFill,"--xin-icon-stroke":r.tosiIconStroke,"--xin-tabs-bar-color":r.tosiTabsBarColor,"--xin-tabs-bar-height":r.tosiTabsBarHeight,"--xin-tabs-selected-color":r.tosiTabsSelectedColor,"--spacing":r.tosiSpacing,"--gap":r.tosiSpacingSm,"--touch-size":r.tosiTouchSize,"--background":r.tosiBg,"--text-color":r.tosiText,"--brand-color":r.tosiAccent,"--brand-text-color":r.tosiAccentText};function Rh(l){return{":root":{...q2(l)[":root"],...b8}}}function $h(l,i){let h={};for(let[y,x]of Object.entries(i)){let o=`--tosi-${l}-${y.replace(/([A-Z])/g,"-$1").toLowerCase()}`;h[y]=`var(${o}, ${x})`}return h}var{div:_2,label:k4,input:c4,span:Zh,button:J8}=f,{liveTheme:$}=E({liveTheme:{accent:String(V1.accent),background:String(V1.background),text:String(V1.text),dark:!1}}),r4=!1;function y0(){if(!r4)return;let l={accent:A.fromCss($.accent.value),background:A.fromCss($.background.value),text:A.fromCss($.text.value)},i=$.dark.value?g4(l):q2(l);C3(i,"tosi-live-theme")}function H8(){if(r4)return;r4=!0,$.accent.observe(y0),$.background.observe(y0),$.text.observe(y0),$.dark.observe(y0),y0()}function bh(){r4=!1}class s3 extends z{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=()=>[_2({class:"field"},k4("Accent"),c4({type:"color",part:"accent"})),_2({class:"field"},k4("Background"),c4({type:"color",part:"background"})),_2({class:"field"},k4("Text"),c4({type:"color",part:"text"})),_2({class:"field"},k4("Dark mode"),c4({type:"checkbox",part:"dark"})),_2({class:"preview",part:"preview",style:{background:"var(--tosi-bg, #fafafa)",color:"var(--tosi-text, #222)"}},Zh("Preview "),J8({class:"preview-button",style:{background:"var(--tosi-accent, #EE257B)",color:"var(--tosi-accent-text, white)"}},"Button")),_2({class:"actions"},J8({part:"reset"},"Reset"))];connectedCallback(){super.connectedCallback(),H8();let l=()=>{this.parts.accent.value=$.accent.value,this.parts.background.value=$.background.value,this.parts.text.value=$.text.value,this.parts.dark.checked=$.dark.value};l(),$.accent.observe(l),$.background.observe(l),$.text.observe(l),$.dark.observe(l),this.parts.accent.addEventListener("input",()=>{$.accent.value=this.parts.accent.value}),this.parts.background.addEventListener("input",()=>{$.background.value=this.parts.background.value}),this.parts.text.addEventListener("input",()=>{$.text.value=this.parts.text.value}),this.parts.dark.addEventListener("change",()=>{$.dark.value=this.parts.dark.checked}),this.parts.reset.addEventListener("click",()=>{$.accent.value=String(V1.accent),$.background.value=String(V1.background),$.text.value=String(V1.text),$.dark.value=!1})}}var Jh=s3.elementCreator();var{div:Hh}=f;class x2 extends z{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(l){}formResetCallback(){this.value="",this.coords="65.01715565258993,25.48081004203459,12"}content=Hh({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(x2.mapboxCSSAvailable===void 0)x2.mapboxCSSAvailable=U0("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.css").catch((l)=>{console.error("failed to load mapbox-gl.css",l)}),x2.mapboxAvailable=g1("https://api.mapbox.com/mapbox-gl-js/v3.15.0/mapbox-gl.js").catch((l)=>{console.error("failed to load mapbox-gl.js",l)})}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[x,o,C]=this.coords.split(",").map((s)=>Number(s));this._map.setCenter([o,x]),this._map.setZoom(C),this._lastCoords=this.coords}if(this.mapStyle!==this._lastStyle)this._map.setStyle(this.mapStyle),this._lastStyle=this.mapStyle;return}let{div:l}=this.parts,[i,h,y]=this.coords.split(",").map((x)=>Number(x));this._lastCoords=this.coords,this._lastStyle=this.mapStyle,x2.mapboxAvailable.then(({mapboxgl:x})=>{console.log("%cmapbox may complain about missing css -- don't panic!","background: orange; color: black; padding: 0 5px;"),x.accessToken=this.token,this._map=new x.Map({container:l,style:this.mapStyle,zoom:y,center:[h,i]}),this._map.on("render",()=>this._map.resize()),this._map.on("moveend",()=>{let o=this._map.getCenter(),C=this._map.getZoom(),s=`${o.lat.toFixed(6)},${o.lng.toFixed(6)},${C.toFixed(1)}`;if(s!==this.value){if(this.internals)this.internals.setFormValue(s)}})})}}var Sh=x2.elementCreator();var{div:g3,span:d4,button:k3}=f,x0=86400000,Dh=[0,1,2,3,4,5,6],Ih=[1,2,3,4,5,6,7,8,9,10,11,12],c3=(l,i=2,h="0")=>String(l).padStart(i,h),o0=(l,i,h)=>new Date(`${l}-${c3(i)}-${c3(h)}`);class r3 extends z{static preferredTagName="tosi-month";static lightStyleSpec={":host":{display:"block"},":host [part=header]":{display:"flex",alignItems:"stretch",justifyContent:"stretch"},":host[disabled]":{pointerEvents:"none",opacity:w.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:w.monthTodayBackground("transparent"),boxShadow:w.monthTodayShadow("none"),backdropFilter:w.monthTodayBackdropFilter("brightness(0.9)"),fontWeight:w.monthTodayFontWeight("800")},":host .day, :host .date":{padding:5,display:"flex",justifyContent:"center",userSelect:"none"},":host .day":{color:w.monthDayColor("hotpink"),background:w.monthDayBackground("white"),fontWeight:w.monthDayFontWeight("800")},":host .date":{cursor:"default"},":host .weekend":{background:w.monthWeekendBackground("#eee")},":host .date:not(.in-month)":{opacity:0.5},":host .date.checked":{color:w.monthDateCheckedColor("white"),background:w.monthDateCheckedBackground("hotpink")},":host:not([range]) .date.checked":{borderRadius:w.monthDateCheckedBorderRadius("10px")},":host .range-start":{borderTopLeftRadius:w.monthDateCheckedBorderRadius("10px"),borderBottomLeftRadius:w.monthDateCheckedBorderRadius("10px")},":host .range-end":{borderTopRightRadius:w.monthDateCheckedBorderRadius("10px"),borderBottomRightRadius:w.monthDateCheckedBorderRadius("10px")}};static formAssociated=!0;static initAttributes={month:NaN,year:NaN,weekStart:0,minDate:o0(new Date().getFullYear()-100,1,1).toISOString().split("T")[0],maxDate:o0(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(l){this.disabled=l}formResetCallback(){this.value="",this.selectedDays=[]}get endDay(){return 1-this.weekStart}get months(){return Ih.map((l)=>({caption:o0(2025,l,1).toString().split(" ")[1],value:String(l)}))}get years(){let l=Number(this.minDate.split("-")[0]),i=Number(this.maxDate.split("-")[0]),h=[];for(let y=l;y<=i;y++)h.push(String(y));return h}monthChanged=(l,i)=>{};gotoMonth(l,i){if(this.month!==i||this.year!==l)this.month=i,this.year=l,this.monthChanged(l,i)}setMonth=()=>{this.gotoMonth(Number(this.parts.year.value),Number(this.parts.month.value))};get to(){return this.selectedDays[1]||""}set to(l){this.selectedDays[1]=l,this.selectedDays.splice(2)}get from(){return this.selectedDays[0]||""}set from(l){this.selectedDays[0]=l,this.selectedDays.splice(2)}clickDate=(l)=>{let i=l.target.getAttribute("title");this.selectDate(i)};keyDate=(l)=>{let i=!1;switch(l.code){case"Space":{let h=l.target.getAttribute("title");this.selectDate(h),i=!0;break}case"Tab":break;default:console.log(l)}if(i)l.preventDefault(),l.stopPropagation()};#l="";selectDate=(l)=>{if(this.#l=l,this.range){if(!this.to)this.selectedDays=[l,l];else if(this.from===l&&this.to===l)this.selectedDays=[];else if(this.from===l)this.from=this.to;else if(this.to===l)this.to=this.from;else if(l<this.from)this.from=l;else if(l>this.to)this.to=l;else this.to=l;this.value=`${this.from},${this.to}`}else if(this.multiple){if(this.selectedDays.includes(l))this.selectedDays.splice(this.selectedDays.indexOf(l),1);else this.selectedDays.push(l),this.selectedDays.sort();this.value=this.selectedDays.join(",")}else if(this.selectable)if(this.selectedDays.includes(l))this.value="",this.selectedDays=[];else this.value=l,this.selectedDays=[l]};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=(l)=>{if(!this.range)return this.selectedDays.includes(l);else if(this.range)return this.from&&l>=this.from&&l<=this.to;return!1};dateMenuItem=(l,i="")=>{return l=l.split("T")[0],{caption:i||l,enabled:()=>!l.startsWith(`${this.year}-${c3(this.month)}-`),action:()=>{this.gotoDate(l)}}};jumpMenu=()=>{H({target:this.parts.jump,menuItems:[this.dateMenuItem(new Date().toISOString(),"This Month"),...this.selectedDays.length===0?[]:[null],...this.selectedDays.map((l)=>this.dateMenuItem(l))]})};content=()=>[g3({part:"header"},k3({part:"previous",onClick:this.previousMonth},B.chevronLeft()),d4({style:{flex:"1"}}),k3({part:"jump",onClick:this.jumpMenu},B.calendar()),k1({part:"month",options:this.months,onChange:this.setMonth}),k1({part:"year",options:[this.year],onChange:this.setMonth}),d4({style:{flex:"1"}}),k3({part:"next",onClick:this.nextMonth},B.chevronRight())),g3({part:"week"}),g3({part:"days"})];gotoDate(l){let i=new Date(l);this.gotoMonth(i.getFullYear(),i.getMonth()+1)}connectedCallback(){super.connectedCallback();let l=new Date(this.value.split(",").pop()||Date.now());if(isNaN(this.month))this.month=l.getMonth()+1;if(isNaN(this.year))this.year=l.getFullYear()}days=[];render(){super.render();let{week:l,days:i,jump:h,month:y,year:x,previous:o,next:C}=this.parts;this.selectedDays=this.value?this.value.split(","):[];let s=o0(this.year,this.month,1),g=new Date(s.valueOf()-(7+s.getDay()-this.weekStart)%7*x0),k=this.month===12?1:this.month+1,c=new Date(o0(this.year+(this.month===12?1:0),k,1).valueOf()-x0),d=new Date(c.valueOf()+(this.weekStart*2+5+this.endDay-c.getDay())%7*x0),n=Dh.map((P)=>new Date(g.valueOf()+P*x0).toString().split(" ")[0]);this.days=[];let v=new Date().toISOString().split("T")[0];for(let P=g.valueOf();P<=d.valueOf();P+=x0){let V=new Date(P),K=V.toISOString().split("T")[0];this.days.push({date:V,selected:!1,inMonth:V.getMonth()+1===this.month,isToday:K===v,isWeekend:V.getDay()%6===0,inRange:!!(this.from&&K>=this.from&&K<=this.to)})}y.value=String(this.month),x.value=String(this.year),y.disabled=x.disabled=h.disabled=o.disabled=C.disabled=this.disabled||this.readonly,x.options=this.years,l.textContent="",l.append(...n.map((P)=>d4({class:"day"},P))),i.textContent="";let p=null,{to:t,from:_}=this;i.append(...this.days.map((P)=>{let V=["date"];if(P.inMonth)V.push("in-month");if(P.isToday)V.push("today");let K=P.date.toISOString().split("T")[0];if(this.checkDay(K))V.push("checked");if(V.push(P.isWeekend?"weekend":"weekday"),this.range){if(t===K)V.push("range-end");if(_===K)V.push("range-start")}let Z=d4({class:V.join(" "),title:K,onClick:this.clickDate,onKeydown:this.keyDate,tabindex:"0"},P.date.getDate());if(K===this.#l)p=Z;return Z})),p?.focus()}}var Th=r3.elementCreator();var{div:d3,button:uh}=f,Mh={error:"red",warn:"orange",info:"royalblue",log:"gray",success:"green",progress:"royalblue"};class S1 extends z{static preferredTagName="tosi-notification";static singleton;static shadowStyleSpec={":host":{_notificationSpacing:8,_notificationWidth:360,_notificationPadding:`${r.notificationSpacing} ${r.notificationSpacing50} ${r.notificationSpacing} ${r.notificationSpacing200}`,_notificationBg:"#fafafa",_notificationAccentColor:"#aaa",_notificationTextColor:"#444",_notificationIconSize:r.notificationSpacing300,_notificationButtonSize:48,_notificationBorderWidth:"3px 0 0",_notificationBorderRadius:r.notificationSpacing50,position:"fixed",left:0,right:0,bottom:0,paddingBottom:r.notificationSpacing,width:r.notificationWidth,display:"flex",flexDirection:"column-reverse",margin:"0 auto",gap:r.notificationSpacing,maxHeight:"50vh",overflow:"hidden auto",boxShadow:"none !important",color:r.notificationTextColor},":host .note":{display:"grid",background:r.notificationBg,padding:r.notificationPadding,gridTemplateColumns:`${r.notificationIconSize} 1fr ${r.notificationButtonSize}`,gap:r.notificationSpacing,alignItems:"center",borderRadius:r.notificationBorderRadius,boxShadow:`0 2px 8px #0006, inset 0 0 0 2px ${r.notificationAccentColor}`,borderColor:r.notificationAccentColor,borderWidth:r.notificationBorderWidth,borderStyle:"solid",transition:"0.5s ease-in",transitionProperty:"margin, opacity",zIndex:1},":host .note button":{display:"flex",lineHeight:r.notificationButtonSize,padding:0,margin:0,height:r.notificationButtonSize,width:r.notificationButtonSize,background:"transparent",alignItems:"center",justifyContent:"center",boxShadow:"none",border:"none",position:"relative"},":host .note button:hover svg":{stroke:r.notificationAccentColor},":host .note button:active svg":{borderRadius:99,stroke:r.notificationBg,background:r.notificationAccentColor,padding:r.spacing50},":host .note svg":{height:r.notificationIconSize,width:r.notificationIconSize,pointerEvents:"none",color:r.notificationAccentColor},":host .message":{display:"flex",flexDirection:"column",alignItems:"center",gap:r.notificationSpacing},":host .note.closing":{opacity:0,zIndex:0}};static removeNote(l){l.classList.add("closing"),l.style.marginBottom=-l.offsetHeight+"px";let i=()=>{l.remove()};l.addEventListener("transitionend",i),setTimeout(i,1000)}static post(l){let{message:i,duration:h,type:y,close:x,progress:o,icon:C,color:s}=Object.assign({type:"info",duration:-1},typeof l==="string"?{message:l}:l);if(!this.singleton)this.singleton=w3();let g=this.singleton;document.body.append(g),g.style.zIndex=String(L1()+1);let k=s||Mh[y],c=o||y==="progress"?f.progress():{},d=()=>{if(x)x();S1.removeNote(p)},n=C instanceof SVGElement?C:C?B[C]():B.info(),v=y==="error"||y==="warn",p=d3({class:`note ${y}`,role:v?"alert":"status",ariaLive:v?"assertive":"polite",style:{_notificationAccentColor:k}},n,d3({class:"message"},d3(i),c),uh({class:"close",title:"close",ariaLabel:"Close notification",apply(t){t.addEventListener("click",d)}},B.x()));if(g.shadowRoot.append(p),c instanceof HTMLProgressElement&&o instanceof Function){c.setAttribute("max",String(100)),c.value=o();let t=setInterval(()=>{if(!g.shadowRoot.contains(p)){clearInterval(t);return}let _=o();if(c.value=_,_>=100)S1.removeNote(p)},1000)}if(h>0)setTimeout(()=>{S1.removeNote(p)},h*1000);return p.scrollIntoView(),d}content=null}var mh=S1,w3=S1.elementCreator(),Lh=w3;function eh(l){return S1.post(l)}var S8=async(l,i="SHA-1")=>{let y=new TextEncoder().encode(l),x=await crypto.subtle.digest(i,y);return Array.from(new Uint8Array(x)).map((s)=>s.toString(16).padStart(2,"0")).join("")},D8=async(l)=>{let i=await S8(l),h=await fetch(`https://weakpass.com/api/v1/search/${i}`);if(h.ok){let y=await h.json();console.log("password found in weakpass database",y)}return h.status!==404},{span:n3,tosiSlot:Eh}=f;class w4 extends z{static preferredTagName="tosi-password-strength";static lightStyleSpec={":host":{display:"inline-flex",flexDirection:"column",gap:r.spacing50,position:"relative"},":host tosi-slot":{display:"flex"},':host [part="meter"]':{display:"block",position:"relative",height:w.meterHeight("24px"),background:w.indicatorBg("white"),borderRadius:w.meterRadius("4px"),boxShadow:w.meterShadow(`inset 0 0 0 2px ${r.indicatorColor}`)},':host [part="level"]':{height:w.levelHeight("20px"),content:'" "',display:"inline-block",width:0,transition:"0.15s ease-out",background:r.indicatorColor,margin:w.levelMargin("2px"),borderRadius:w.levelRadius("2px")},':host [part="description"]':{position:"absolute",inset:"0",color:r.descriptionColor,height:w.meterHeight("24px"),lineHeight:w.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(l){return this.issues={tooShort:l.length<this.minLength,short:l.length<this.goodLength,noUpper:!l.match(/[A-Z]/),noLower:!l.match(/[a-z]/),noNumber:!l.match(/[0-9]/),noSpecial:!l.match(/[^a-zA-Z0-9]/)},this.issues.tooShort?0:Object.values(this.issues).filter((i)=>!i).length-1}async isBreached(){let l=this.querySelector("input")?.value;if(!l||typeof l!=="string")return!0;return await D8(l)}updateIndicator=(l)=>{let{level:i,description:h}=this.parts,y=this.indicatorColors.split(","),x=this.descriptionColors.split(","),o=this.strength(l);if(this.value!==o)this.value=o,this.dispatchEvent(new Event("change"));i.style.width=`${(o+1)*16.67}%`,this.style.setProperty("--indicator-color",y[o]),this.style.setProperty("--description-color",x[o]),h.textContent=this.strengthDescriptions[o]};update=(l)=>{let i=l.target.closest("input");this.updateIndicator(i?.value||"")};content=()=>[Eh({onInput:this.update}),n3({part:"meter"},n3({part:"level"}),n3({part:"description"}))];render(){super.render();let l=this.querySelector("input");this.updateIndicator(l?.value)}}var ly=w4,I8=w4.elementCreator(),iy=I8;var{span:p3}=f;class n4 extends z{static preferredTagName="tosi-rating";static formAssociated=!0;static initAttributes={max:5,min:1,icon:"star",step:1,ratingStroke:"#e81",ratingFill:"#f91",emptyStroke:"none",emptyFill:"#ccc",readonly:!1,iconSize:24,hollow:!1,required:!1,name:""};value="";formDisabledCallback(l){this.readonly=l}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=()=>p3({part:"container"},p3({part:"empty"}),p3({part:"filled"}));displayValue(l){let{empty:i,filled:h}=this.parts,x=Math.round((typeof l==="string"?0:l||0)/this.step)*this.step;h.style.width=x/this.max*i.offsetWidth+"px"}update=(l)=>{if(this.readonly)return;let{empty:i}=this.parts,h=l instanceof MouseEvent?l.pageX-i.getBoundingClientRect().x:0,y=Math.min(Math.max(this.min,Math.round(h/i.offsetWidth*this.max/this.step+this.step*0.5)*this.step),this.max);if(l.type==="click")this.value=y;else if(l.type==="mousemove")this.displayValue(y);else this.displayValue(this.value||0)};handleKey=(l)=>{let i=this.value===""?NaN:Number(this.value);if(isNaN(i))i=Math.round((this.min+this.max)*0.5*this.step)*this.step;let h=!1;switch(l.key){case"ArrowUp":case"ArrowRight":i+=this.step,h=!0;break;case"ArrowDown":case"ArrowLeft":i-=this.step,h=!0;break}if(this.value=Math.max(Math.min(i,this.max),this.min),h)l.stopPropagation(),l.preventDefault()};connectedCallback(){super.connectedCallback();let{container:l}=this.parts;l.tabIndex=0,l.addEventListener("mousemove",this.update,!0),l.addEventListener("mouseleave",this.update),l.addEventListener("blur",this.update),l.addEventListener("click",this.update),l.addEventListener("keydown",this.handleKey)}_renderedIcon="";render(){super.render();let l=this.iconSize+"px";if(this.style.setProperty("--tosi-icon-size",l),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:i,filled:h}=this.parts;if(i.classList.toggle("hollow",this.hollow),i.style.setProperty("--tosi-icon-fill",this.emptyFill),i.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 y=0;y<this.max;y++)i.append(B[this.icon]()),h.append(B[this.icon]())}this.displayValue(this.value)}}var hy=n4,T8=n4.elementCreator(),yy=i1((...l)=>T8(...l),"xinRating is deprecated, use tosiRating instead (tag is now <tosi-rating>)");var{tosiSlot:u8,div:xy,button:oy,span:Hs}=f,Cy=[{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 B3(l=Cy){return k1({title:"paragraph style",slot:"toolbar",class:"block-style",options:l.map(({caption:i,tagType:h})=>({caption:i,value:`formatBlock,${h}`}))})}var C0=()=>o3({slot:"toolbar"});function f1(l,i,h){return oy({slot:"toolbar",dataCommand:i,title:l},h)}var sy=()=>[f1("left-justify","justifyLeft",B.alignLeft()),f1("center","justifyCenter",B.alignCenter()),f1("right-justify","justifyRight",B.alignRight()),C0(),f1("bullet list","insertUnorderedList",B.listBullet()),f1("numbered list","insertOrderedList",B.listNumber()),C0(),f1("indent","indent",B.indent()),f1("indent","outdent",B.outdent())],M8=()=>[f1("bold","bold",B.fontBold()),f1("italic","italic",B.fontItalic()),f1("underline","underline",B.fontUnderline())],gy=()=>[B3(),C0(),...M8()],m8=()=>[B3(),C0(),...sy(),C0(),...M8()];class p4 extends z{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(l){if(this.isInitialized)this.parts.doc.contentEditable=l?"false":"true"}formResetCallback(){this.value=""}_value="";get value(){return this.isInitialized?this.parts.doc.innerHTML:this._value}set value(l){let i=this._value;if(this._value=l,this.isInitialized){if(this.parts.doc.innerHTML!==l)this.parts.doc.innerHTML=l}if(i!==l&&this.internals)this.internals.setFormValue(l)}blockElement(l){let{doc:i}=this.parts;while(l.parentElement!==null&&l.parentElement!==i)l=l.parentElement;return l.parentElement===i?l:void 0}get selectedBlocks(){let{doc:l}=this.parts,i=window.getSelection();if(i===null)return[];let h=[];for(let y=0;y<i.rangeCount;y++){let x=i.getRangeAt(y);if(!l.contains(x.commonAncestorContainer))continue;let o=this.blockElement(x.startContainer),C=this.blockElement(x.endContainer);h.push(o);while(o!==C&&o!==null)o=o.nextElementSibling,h.push(o)}return h}get selectedText(){let l=window.getSelection();if(l===null)return"";return this.selectedBlocks.length?l.toString():""}selectionChange=()=>{};_updatingBlockStyle=!1;handleSelectChange=(l)=>{if(this._updatingBlockStyle)return;let h=l.target?.closest(t1.tagName);if(h==null)return;this.doCommand(h.value)};handleButtonClick=(l)=>{let h=l.target?.closest("button");if(h==null)return;this.doCommand(h.dataset.command)};content=[u8({name:"toolbar",part:"toolbar",onClick:this.handleButtonClick,onChange:this.handleSelectChange}),xy({part:"doc",contenteditable:!0,style:{flex:"1 1 auto",outline:"none"}}),u8({part:"content"})];doCommand(l){if(l===void 0)return;let i=l.split(",");console.log("execCommand",i[0],!1,...i.slice(1)),document.execCommand(i[0],!1,...i.slice(1))}updateBlockStyle(){let l=this.parts.toolbar.querySelector(".block-style");if(l===null)return;let i=this.selectedBlocks.map((h)=>h.tagName);i=[...new Set(i)],this._updatingBlockStyle=!0,l.value=i.length===1?`formatBlock,${i[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:l,content:i}=this.parts;if(i.innerHTML!==""&&l.innerHTML==="")l.innerHTML=i.innerHTML,i.innerHTML="";this.isInitialized=!0,i.style.display="none",l.addEventListener("input",this.handleInput),this.updateValidity(),document.addEventListener("selectionchange",(h)=>{this.updateBlockStyle(),this.selectionChange(h,this)})}render(){let{toolbar:l}=this.parts;if(super.render(),l.children.length===0)switch(this.widgets){case"minimal":l.append(...gy());break;case"default":l.append(...m8());break}}}var ky=p4,L8=p4.elementCreator(),cy=i1((...l)=>L8(...l),"richText is deprecated, use tosiRichText instead (tag is now <tosi-rich-text>)");var{router:s0}=E({router:{path:"",hash:"",pattern:""}}),f3={};function ry(){return{...f3}}var B4=[],z3=!1,f4=new Set;function dy(l){let i=[];if(l==="")return{regex:/^\/?$/,paramNames:i};let h=l.split("/").map((x)=>{if(x.startsWith(":"))return i.push(x.slice(1)),"([^/]+)";return x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return{regex:new RegExp("^/?"+h.join("/")+"/?$"),paramNames:i}}function wy(l){let i=l.split("?")[0].split("#")[0];for(let y of B4){if(y.fallback)continue;let x=i.match(y.regex);if(x){let o={};return y.paramNames.forEach((C,s)=>{o[C]=decodeURIComponent(x[s+1])}),{route:y,params:o}}}let h=B4.find((y)=>y.fallback);if(h)return{route:h,params:{}};return null}function g0(){let l=z3?window.location.hash.replace(/^#\/?/,""):window.location.pathname;s0.path.value=l,s0.hash.value=window.location.hash;let i=wy(l);if(i){f3=i.params,s0.pattern.value=i.route.regex.source;let h=new Map;for(let y of i.route.targets)h.set(y.view??"default",y);for(let y of f4){let x=y.name||"default",o=h.get(x);if(o)y.replaceChildren(o.component(i.params));else y.replaceChildren()}}else{f3={},s0.pattern.value="";for(let h of f4)h.replaceChildren()}}var e8=!1;function E8(){if(e8)return;e8=!0,window.addEventListener("popstate",g0),window.addEventListener("hashchange",g0)}function ny(l,i={}){z3=i.hashRouting??!1,B4=l.map((h)=>{let{regex:y,paramNames:x}=dy(h.pattern);return{regex:y,paramNames:x,targets:h.targets,fallback:h.fallback??!1}}),E8(),g0()}function py(l){if(E8(),z3)window.location.hash="#/"+l.replace(/^\//,"");else window.history.pushState({},"","/"+l.replace(/^\//,""));g0()}class v3 extends z{static preferredTagName="tosi-route-view";static initAttributes={name:"default"};content=null;connectedCallback(){if(super.connectedCallback(),f4.add(this),B4.length>0)g0()}disconnectedCallback(){super.disconnectedCallback(),f4.delete(this)}}var By=v3.elementCreator();var{div:fy,slot:zy,label:vy,span:jy,input:l6}=f;class P2 extends z{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(l){if(typeof l==="string")this._choices=P2.parseChoicesString(l);else this._choices=l;this.queueRender()}static parseChoicesString(l){return l.split(",").filter((i)=>i.trim()!=="").map((i)=>{let[h,y]=i.split("=").map((s)=>s.trim()),[x,o]=(y||h).split(":").map((s)=>s.trim()),C=o?B[o]():"";return{value:h,icon:C,caption:x}})}value="";formDisabledCallback(l){}formResetCallback(){this.value=""}get values(){return(this.value||"").split(",").map((l)=>l.trim()).filter((l)=>l!=="")}content=()=>[zy(),fy({part:"options"},l6({part:"custom",hidden:!0}))];static shadowStyleSpec={":host":{display:"inline-flex",gap:w.segmentedOptionGap("8px"),alignItems:w.segmentedAlignItems("center")},":host, :host::part(options)":{flexDirection:w.segmentedDirection("row")},":host label":{display:"inline-grid",alignItems:"center",gap:w.segmentedOptionGap("8px"),gridTemplateColumns:w.segmentedOptionGridColumns("0px 24px 1fr"),padding:w.segmentedOptionPadding("4px 12px"),font:w.segmentedOptionFont("16px")},":host label:focus":{outline:"none",boxShadow:w.segmentedFocusShadow(`inset 0 0 0 2px ${w.segmentedOptionCurrentBackground("#44a")}`),borderRadius:w.segmentedOptionsBorderRadius("8px")},":host label:has(:checked)":{color:w.segmentedOptionCurrentColor("#eee"),background:w.segmentedOptionCurrentBackground("#44a")},":host label:has(:checked):focus":{boxShadow:w.segmentedCurrentFocusShadow(`inset 0 0 0 2px ${w.segmentedOptionCurrentColor("#eee")}`)},":host svg":{height:w.segmentOptionIconSize("16px"),stroke:w.segmentedOptionIconColor("currentColor")},":host label.no-icon":{gap:0,gridTemplateColumns:w.segmentedOptionGridColumns("0px 1fr")},':host input[type="radio"], :host input[type="checkbox"]':{visibility:w.segmentedInputVisibility("hidden")},":host::part(options)":{display:"flex",borderRadius:w.segmentedOptionsBorderRadius("8px"),background:w.segmentedOptionsBackground("#fff"),color:w.segmentedOptionColor("#222"),overflow:"hidden",alignItems:w.segmentedOptionAlignItems("stretch")},":host::part(custom)":{padding:w.segmentedOptionPadding("4px 12px"),color:w.segmentedOptionCurrentColor("#eee"),background:w.segmentedOptionCurrentBackground("#44a"),font:w.segmentedOptionFont("16px"),border:"0",outline:"none"},":host::part(custom)::placeholder":{color:w.segmentedOptionCurrentColor("#eee"),opacity:w.segmentedPlaceholderOpacity(0.75)}};valueChanged=!1;handleChange=()=>{let{options:l,custom:i}=this.parts;if(this.multiple){let h=[...l.querySelectorAll("input:checked")];this.value=h.map((y)=>y.value).join(",")}else{let h=l.querySelector("input:checked");if(!h)this.value="";else if(h.value)i.setAttribute("hidden",""),this.value=h.value;else i.removeAttribute("hidden"),i.focus(),i.select(),this.value=i.value}this.valueChanged=!0};handleKey=(l)=>{let i=!1;switch(l.code){case"Space":if(l.target instanceof HTMLLabelElement)l.target.click(),i=!0;break;case"Tab":if(!(l.target instanceof HTMLLabelElement))l.target.closest("label").focus();break;case"ArrowLeft":case"ArrowUp":{let h=l.target.closest("label");if(h.previousElementSibling instanceof HTMLLabelElement)h.previousElementSibling.focus()}i=!0;break;case"ArrowRight":case"ArrowDown":{let h=l.target.closest("label");if(h.nextElementSibling instanceof HTMLLabelElement)h.nextElementSibling.focus()}i=!0;break}if(i)l.preventDefault(),l.stopPropagation()};connectedCallback(){super.connectedCallback();let l=this.getAttribute("choices");if(l&&this._choices.length===0)this._choices=P2.parseChoicesString(l);let{options:i}=this.parts;if(this.name==="")this.name=this.instanceId;if(i.addEventListener("change",this.handleChange),i.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 l=[...this.choices];if(this.other&&!this.multiple){let[i,h]=this.other.split(":");l.push({value:"",caption:i,icon:h})}return l}get isOtherValue(){return Boolean(this.value===""||this.value&&!this._choicesWithOther.find((l)=>l.value===this.value))}render(){if(super.render(),this.valueChanged){this.valueChanged=!1;return}let{options:l,custom:i}=this.parts;l.textContent="";let h=this.multiple?"checkbox":"radio",{values:y,isOtherValue:x}=this;if(l.append(...this._choicesWithOther.map((o)=>{return vy({tabindex:0},l6({type:h,name:this.name,value:o.value,checked:y.includes(o.value)||o.value===""&&x,tabIndex:-1}),o.icon||{class:"no-icon"},this.localized?q1(o.caption):jy(o.caption))})),this.other&&!this.multiple)i.hidden=!x,i.value=x?this.value:"",i.placeholder=this.placeholder,l.append(i)}}var ty=P2,i6=P2.elementCreator(),Ay=i1((...l)=>i6(...l),"xinSegmented is deprecated, use tosiSegmented instead (tag is now <tosi-segmented>)");var{slot:h6}=f;class j3 extends z{static preferredTagName="tosi-sizebreak";static initAttributes={minWidth:0,minHeight:0};value="normal";content=[h6({part:"normal"}),h6({part:"small",name:"small"})];static shadowStyleSpec={":host":{display:"inline-block",position:"relative"}};onResize=()=>{let{normal:l,small:i}=this.parts,h=this.offsetParent;if(!(h instanceof HTMLElement))return;else if(h.offsetWidth<this.minWidth||h.offsetHeight<this.minHeight)l.hidden=!0,i.hidden=!1,this.value="small";else l.hidden=!1,i.hidden=!0,this.value="normal"};connectedCallback(){super.connectedCallback(),globalThis.addEventListener("resize",this.onResize)}disconnectedCallback(){super.disconnectedCallback(),globalThis.removeEventListener("resize",this.onResize)}}var qy=j3.elementCreator();class z4 extends z{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:r.resizeIconFill}};content=B.resize();get minSize(){let{minWidth:l,minHeight:i}=getComputedStyle(this.target);return{width:parseFloat(l)||32,height:parseFloat(i)||32}}resizeTarget=(l)=>{let{target:i}=this;if(!i)return;let{offsetWidth:h,offsetHeight:y}=i;i.style.left=i.offsetLeft+"px",i.style.top=i.offsetTop+"px",i.style.bottom="",i.style.right="";let{minSize:x}=this;x1(l,(o,C,s)=>{if(i.style.width=Math.max(x.width,h+o)+"px",i.style.height=Math.max(x.height,y+C)+"px",s.type==="mouseup")return!0},"nwse-resize")};connectedCallback(){if(super.connectedCallback(),!this.target)this.target=this.parentElement;let l={passive:!0};this.addEventListener("mousedown",this.resizeTarget,l),this.addEventListener("touchstart",this.resizeTarget,l)}}var _y=z4,y6=z4.elementCreator(),Py=y6;var{div:Vy,input:Oy,span:Uy,button:t3}=f;class k0 extends z{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":w.brandColor("blue"),"--tag-text-color":w.brandTextColor("white"),display:"inline-flex",borderRadius:w.tagRoundedRadius(r.spacing50),color:r.tagTextColor,background:r.tagBg,padding:`0 ${r.spacing75} 0 ${r.spacing75}`,height:`calc(${r.lineHeight} + ${r.spacing50})`,lineHeight:`calc(${r.lineHeight} + ${r.spacing50})`},':host > [part="caption"]':{position:"relative",whiteSpace:"nowrap",overflow:"hidden",flex:"1 1 auto",fontSize:w.fontSize("16px"),color:r.tagTextColor,textOverflow:"ellipsis"},':host [part="remove"]':{boxShadow:"none",margin:`0 ${r.spacing_50} 0 ${r.spacing25}`,padding:0,display:"inline-flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:r.spacing150,width:r.spacing150,color:r.tagCloseButtonColor,background:r.tagCloseButtonBg,borderRadius:w.tagCloseButtonRadius("99px"),opacity:r.tagButtonOpacity},':host [part="remove"]:hover':{background:r.tagCloseButtonBg,opacity:r.tagButtonHoverOpacity}};static initAttributes={caption:"",removeable:!1};removeCallback=()=>{this.remove()};content=()=>[Uy({part:"caption"},this.caption),t3(B.x(),{type:"button",part:"remove",hidden:!this.removeable,ariaLabel:`Remove ${this.caption}`,onClick:this.removeCallback})]}var Fy=k0,A3=k0.elementCreator(),Gy=i1((...l)=>A3(...l),"xinTag is deprecated, use tosiTag instead (tag is now <tosi-tag>)");class V2 extends z{static preferredTagName="tosi-tag-list";static lightStyleSpec={":host":{"--tag-list-bg":"#f8f8f8","--touch-size":"44px","--spacing":"16px",display:"grid",gridTemplateColumns:"auto",alignItems:"center",background:r.tagListBg,gap:r.spacing25,borderRadius:w.taglistRoundedRadius(r.spacing50),overflow:"hidden"},":host[editable]":{gridTemplateColumns:`0px auto ${r.touchSize}`},":host[editable][text-entry]":{gridTemplateColumns:`0px 2fr 1fr ${r.touchSize}`},':host [part="tagContainer"]':{display:"flex",content:'" "',alignItems:"center",background:r.inputBg,borderRadius:w.tagContainerRadius(r.spacing50),boxShadow:r.borderShadow,flexWrap:"nowrap",overflow:"auto hidden",gap:r.spacing25,minHeight:`calc(${r.lineHeight} + ${r.spacing})`,padding:r.spacing25},':host [part="tagMenu"]':{width:r.touchSize,height:r.touchSize,lineHeight:r.touchSize,textAlign:"center",padding:0,margin:0},":host [hidden]":{display:"none !important"},':host button[part="tagMenu"]':{background:r.brandColor,color:r.brandTextColor}};static formAssociated=!0;static initAttributes={name:"",textEntry:!1,editable:!1,placeholder:"enter tags",disabled:!1,required:!1};value="";get tags(){return this.value.split(",").map((l)=>l.trim()).filter((l)=>l!=="")}set tags(l){this.value=l.join(",")}_availableTags=[];get availableTags(){return this._availableTags}set availableTags(l){if(typeof l==="string")this._availableTags=V2.parseAvailableTagsString(l);else this._availableTags=l;this.queueRender()}static parseAvailableTagsString(l){return l.split(",").map((i)=>{let h=i.trim();return h===""?null:h})}connectedCallback(){super.connectedCallback();let l=this.getAttribute("available-tags");if(l&&this._availableTags.length===0)this._availableTags=V2.parseAvailableTagsString(l)}formDisabledCallback(l){this.disabled=l}formResetCallback(){this.value=""}addTag=(l)=>{let i=l.trim();if(i===""||this.tags.includes(i))return;this.tags=[...this.tags,i],this.queueRender(!0)};toggleTag=(l)=>{if(this.tags.includes(l))this.tags=this.tags.filter((i)=>i!==l),this.queueRender(!0);else this.addTag(l)};enterTag=(l)=>{let{tagInput:i}=this.parts;switch(l.key){case",":{let h=i.value.split(",")[0];this.addTag(h)}break;case"Enter":{let h=i.value.split(",")[0];this.addTag(h)}l.stopPropagation(),l.preventDefault();break;default:}};popSelectMenu=()=>{let{toggleTag:l}=this,{tagMenu:i}=this.parts,h=[...this.availableTags],y=this.tags.filter((o)=>!h.includes(o));if(y.length)h.push(null,...y);let x=h.map((o)=>{if(o===""||o===null)return null;else if(typeof o==="object")return{checked:()=>this.tags.includes(o.value),caption:o.caption,action(){l(o.value)}};else return{checked:()=>this.tags.includes(o),caption:o,action(){l(o)}}});H({target:i,width:"auto",menuItems:x})};content=()=>[t3({type:"button",style:{visibility:"hidden"},tabindex:-1}),Vy({part:"tagContainer",class:"row",role:"list",ariaLabel:"Selected tags"}),Oy({part:"tagInput",class:"elastic",ariaLabel:"Enter new tag",onKeydown:this.enterTag}),t3({type:"button",title:"add tag",ariaLabel:"Select tags from list",ariaHaspopup:"listbox",part:"tagMenu",onClick:this.popSelectMenu},B.chevronDown())];removeTag=(l)=>{if(this.editable&&!this.disabled){let i=l.target.closest(k0.tagName);this.tags=this.tags.filter((h)=>h!==i.caption),i.remove(),this.queueRender(!0)}l.stopPropagation(),l.preventDefault()};render(){super.render();let{tagContainer:l,tagMenu:i,tagInput:h}=this.parts;if(i.disabled=this.disabled,h.value="",h.setAttribute("placeholder",this.placeholder),this.editable&&!this.disabled)i.toggleAttribute("hidden",!1),h.toggleAttribute("hidden",!this.textEntry);else i.toggleAttribute("hidden",!0),h.toggleAttribute("hidden",!0);l.textContent="";for(let y of this.tags)l.append(A3({caption:y,removeable:this.editable&&!this.disabled,removeCallback:this.removeTag}))}}var Ky=V2,x6=V2.elementCreator(),ay=i1((...l)=>x6(...l),"xinTagList is deprecated, use tosiTagList instead (tag is now <tosi-tag-list>)");var o6="1.5.19";var{span:Qy}=f,c0=null,v4=null,j4=null,O1="tosi-tooltip";a1("tosi-tooltip",{[`.${O1}`]:{pointerEvents:"none",padding:w.tosiTooltipPadding("4px 10px"),borderRadius:w.tosiTooltipRadius("6px"),background:w.tosiTooltipBg("#333"),color:w.tosiTooltipColor("#fff"),fontSize:w.tosiTooltipFontSize("13px"),lineHeight:"1.4",maxWidth:w.tosiTooltipMaxWidth("280px"),whiteSpace:"pre-line",boxShadow:"0 2px 8px #0003",position:"relative"},[`.${O1} p`]:{margin:"0"},[`.${O1} code`]:{background:"#fff2",padding:"0 4px",borderRadius:"3px",fontSize:"0.9em"},[`.${O1} a`]:{color:"inherit"},[`.${O1}::before`]:{content:'""',position:"absolute",width:"8px",height:"8px",background:"inherit",transform:"rotate(45deg)"},[`.${O1}.tt-s::before`]:{top:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${O1}.tt-n::before`]:{bottom:"-4px",left:"var(--tosi-tooltip-arrow)"},[`.${O1}.tt-e::before`]:{left:"-4px",top:"var(--tosi-tooltip-arrow)"},[`.${O1}.tt-w::before`]:{right:"-4px",top:"var(--tosi-tooltip-arrow)"}});function O2(){if(v4!==null)clearTimeout(v4),v4=null;if(c0!==null)c0.remove(),c0=null;j4=null}function Wy(l){if(l.startsWith("s"))return"tt-s";if(l.startsWith("n"))return"tt-n";if(l.startsWith("e"))return"tt-e";if(l.startsWith("w"))return"tt-w";return"tt-s"}function Yy(l,i,h){let y=i.getBoundingClientRect(),x=l.getBoundingClientRect(),o=y.left+y.width*0.5,C=y.top+y.height*0.5,s;if(h.startsWith("s")||h.startsWith("n"))s=Math.max(8,Math.min(x.width-8,o-x.left))-4;else s=Math.max(8,Math.min(x.height-8,C-x.top))-4;l.style.setProperty("--tosi-tooltip-arrow",s+"px")}function Ny(l,i){if(i)l=X(l);let h=Qy({class:O1});return h.innerHTML=G.parseInline(l),h}function Xy(l,i,h){O2(),j4=l;let{top:y,left:x,width:o}=l.getBoundingClientRect(),C=x+o*0.5,s=window.innerHeight,g=window.innerWidth,k=(y>s*0.5?"n":"s")+(C>g*0.5?"w":"e"),c=Ny(i,h);c.classList.add(Wy(k)),c0=b2({content:c,target:l,position:k,remainOnScroll:"remove",remainOnResize:"remove"}),requestAnimationFrame(()=>{if(c0&&j4)Yy(c,l,k)})}function Ry(l){for(let i of l.composedPath())if(i instanceof HTMLElement&&i.dataset.tooltip)return i;return null}function $y(l={}){let{convertTitles:i=!0,delay:h=250,localize:y=!1}=l;document.addEventListener("pointermove",(x)=>{if(i){for(let s of x.composedPath())if(s instanceof HTMLElement&&s.title&&!s.dataset.tooltip){s.dataset.tooltip=s.title,s.removeAttribute("title");break}}let o=Ry(x);if(o===j4)return;if(O2(),!o)return;let C=o.dataset.tooltip||null;if(!C)return;v4=setTimeout(()=>Xy(o,C,y),h)}),document.addEventListener("pointerleave",O2),document.addEventListener("pointerdown",O2),document.addEventListener("keydown",O2),window.addEventListener("scroll",O2,!0)}Object.assign(globalThis,{xinjs:$2,xinjsui:q3});})();
101
101
 
102
- //# debugId=C09AD03674D3688464756E2164756E21
102
+ //# debugId=6AAE6EF2017E8A3064756E2164756E21
103
103
  //# sourceMappingURL=iife.js.map