tosijs-styled-editor 0.4.3 → 0.4.4
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/CHANGELOG.md +275 -0
- package/README.md +61 -6
- package/dist/commands.d.ts +11 -1
- package/dist/dom-utils.d.ts +24 -0
- package/dist/index.js +5 -5
- package/dist/module.js +170 -34
- package/dist/tosijs-styled-editor.d.ts +58 -2
- package/dist/version.d.ts +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
(()=>{var{defineProperty:Ot,getOwnPropertyNames:Ko,getOwnPropertyDescriptor:Xo}=Object,Yo=Object.prototype.hasOwnProperty;function Go(e){return this[e]}var Jo=(e)=>{var t=(Pn??=new WeakMap).get(e),n;if(t)return t;if(t=Ot({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var i of Ko(e))if(!Yo.call(t,i))Ot(t,i,{get:Go.bind(e,i),enumerable:!(n=Xo(e,i))||n.enumerable})}return Pn.set(e,t),t},Pn;var Zo=(e)=>e;function Qo(e,t){this[e]=Zo.bind(null,t)}var es=(e,t)=>{for(var n in t)Ot(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Qo.bind(t,n)})};var zl={};es(zl,{MENU_CLASS:()=>Oo,Selectable:()=>Ge,TosijsStyledEditor:()=>_n,allowSelection:()=>Dt,caretGeometryAt:()=>ht,cellAbove:()=>gt,cellBelow:()=>pt,cellIndex:()=>Je,cellOf:()=>Z,characterAtPoint:()=>ee,characterStyleWidgets:()=>On,closestSingleParentAncestor:()=>ut,colOfCell:()=>De,commandButton:()=>j,commands:()=>vt,createCell:()=>ne,createTable:()=>_t,debugWidget:()=>Po,defaultMenubar:()=>In,defaultToolbar:()=>jn,executeCommand:()=>Ft,firstLeafNode:()=>Xe,fontFamilyMenu:()=>jo,fontSizeMenu:()=>Io,getCellsInCol:()=>Rt,getCellsInRow:()=>K,getColumnCount:()=>D,getColumnWidths:()=>ft,getRowCount:()=>yt,insertMenu:()=>Vo,isBefore:()=>dt,isHeaderCell:()=>Ze,isTableCell:()=>rs,justificationMenu:()=>Ho,lastLeafNode:()=>Ye,leafNodes:()=>ze,lineSpacingMenu:()=>Ro,localePickerWidget:()=>zn,makeCSS:()=>Vt,makeFilter:()=>Ne,minimalToolbar:()=>Hn,nextCell:()=>mt,nextLeafNode:()=>V,paragraphStyleMenu:()=>Do,paragraphStyleWidgets:()=>_o,prevCell:()=>It,previousLeafNode:()=>q,renumberFootnotes:()=>qt,rowOfCell:()=>te,setColumnWidths:()=>Oe,siblingOrder:()=>ts,spanify:()=>k,tableMenu:()=>qo,tableOf:()=>W,toolbarSpacer:()=>Te,topSingleParentAncestor:()=>J,tosijsStyledEditor:()=>Nl,undoRedoWidgets:()=>Dn,version:()=>Uo});function Ne(e){if(typeof e==="function")return e;if(typeof e==="string"){let t=e;return(n)=>n.nodeType===1&&n.matches(t)}return()=>!0}function dt(e,t){return(e.compareDocumentPosition(t)&4)!==0}function ts(e){let t=e.parentNode;if(!t)return-1;let n=t.childNodes;for(let i=0;i<n.length;i++)if(n[i]===e)return i;return-1}function Xe(e){while(e.firstChild)e=e.firstChild;return e}function Ye(e){while(e.lastChild)e=e.lastChild;return e}function V(e,t,n){let i=n!==void 0?Ne(n):null,o=e;while(o){if(o.nextSibling){let s=Xe(o.nextSibling);if(!i||i(s))return s;o=s;continue}if(o.parentNode&&o.parentNode!==(t||null)){o=o.parentNode;continue}break}return null}function q(e,t,n){let i=n!==void 0?Ne(n):null,o=e;while(o){if(o.previousSibling){let s=Ye(o.previousSibling);if(!i||i(s))return s;o=s;continue}if(o.parentNode&&o.parentNode!==(t||null)){o=o.parentNode;continue}break}return null}function ze(e,t){let n=[],i=t!==void 0?Ne(t):null;function o(s){if(!s.firstChild){if(!i||i(s))n.push(s)}else for(let r=0;r<s.childNodes.length;r++)o(s.childNodes[r])}return o(e),n}function J(e,t){let n=Ne(t);while(e.parentNode&&e.parentNode.childNodes.length===1&&n(e.parentNode))e=e.parentNode;return e}function ut(e,t){let n=Ne(t),i=e.parentNode;while(i){if(n(i))return i;if(!i.parentNode||i.parentNode.childNodes.length!==1)break;i=i.parentNode}return null}function Dt(e,t){e.style.userSelect=t?"text":"none",e.style.webkitUserSelect=t?"text":"none"}function ns(e){if(e.nodeType!==3||!e.textContent)return!1;let t=e.parentElement;if(!t)return!1;return!t.closest(".not-selectable, .do-not-spanify, .not-editable")}function ee(e,t,n){let i=[],o=(h)=>{if(ns(h)){i.push(h);return}for(let f of Array.from(h.childNodes))o(f)};if(o(e),i.length===0)return null;let s=document.createRange(),r=1/0,l=[];for(let h of i){s.selectNodeContents(h);let f=s.getBoundingClientRect();if(f.width===0&&f.height===0)continue;let p=n<f.top?f.top-n:n>f.bottom?n-f.bottom:0;if(l.push({node:h,dy:p}),p<r)r=p}if(l.length===0)return null;let a=l.filter((h)=>h.dy<=r+2).map((h)=>h.node),c=null,d=1/0,u=(h)=>{let f=h.parentElement;return!!f&&getComputedStyle(f).direction==="rtl"};for(let h of a){let f=h.textContent||"",p=u(h);for(let x=0;x<f.length;x++){s.setStart(h,x),s.setEnd(h,x+1);let m=s.getBoundingClientRect();if(m.width===0&&m.height===0)continue;let z=n<m.top?m.top-n:n>m.bottom?n-m.bottom:0,I=t<m.left?m.left-t:t>m.right?t-m.right:0,we=Math.abs(t-(m.left+m.right)/2),G=z*1000+I+we/1000;if(G<d)d=G,c={node:h,offset:x,rect:m,after:p?t-m.left<m.width/2:t-m.left>=m.width/2}}}return c}function ht(e,t){let n=(c)=>{let d=c;while(d){if(d.nodeType===3&&d.data.length>0)return d;d=V(d,t)}return null},i=(c)=>{let d=c;while(d){if(d.nodeType===3&&d.data.length>0)return d;d=q(d,t)}return null},o=(c,d)=>{let u=document.createRange();u.setStart(c,d),u.collapse(!0);let h=u.getBoundingClientRect();return h.height?{left:h.left,top:h.top,height:h.height}:null},s=n(V(e,t));if(s){let c=o(s,0);if(c)return c}let r=i(q(e,t));if(r){let c=o(r,r.data.length);if(c)return c}let l=getComputedStyle(e.parentElement||e).direction==="rtl",a=document.createRange();if(s){a.setStart(s,0),a.setEnd(s,1);let c=a.getBoundingClientRect();if(c.height)return{left:l?c.right:c.left,top:c.top,height:c.height}}if(r){a.setStart(r,r.data.length-1),a.setEnd(r,r.data.length);let c=a.getBoundingClientRect();if(c.height)return{left:l?c.left:c.right,top:c.top,height:c.height}}return null}function Ht(e){let t=Intl.Segmenter;if(!t)return Array.from(e);let n=new t(void 0,{granularity:"grapheme"});return Array.from(n.segment(e),(i)=>i.segment)}function is(e,t){let n=Intl.Segmenter;if(n){let s=new n(void 0,{granularity:"word"});for(let r of s.segment(e)){let l=r.index+r.segment.length;if(t>=r.index&&t<l)return{start:r.index,end:l}}return{start:t,end:t}}let i=t,o=t;while(i>0&&!/\s/.test(e[i-1]))i--;while(o<e.length&&!/\s/.test(e[o]))o++;return{start:i,end:o}}function os(e){return e.nodeType===3&&!e.parentElement?.closest(".do-not-spanify")}function k(e,t,n=!1){if(t){let i=ze(e,os);for(let o of i){let s=o.textContent||"",r;if(n)r=s.match(/\s+|\w+|[^\w\s]+/g)||[s];else r=Ht(s);if(r.length<=1&&Ht(s).length<=1)continue;let l=o.parentNode;if(!l)continue;if(l instanceof Element)l.classList.remove("spanified");let a=document.createDocumentFragment();for(let c of r){if(/^\s+$/.test(c)){a.appendChild(document.createTextNode(c));continue}if(Ht(c).length>1){let d=document.createElement("span");d.className="spanified-word",d.textContent=c,k(d,!0,!1),a.appendChild(d)}else{let d=document.createElement("span");d.className="spanified",d.textContent=c,a.appendChild(d)}}l.replaceChild(a,o)}}else{let i=Array.from(e.querySelectorAll(".spanified-word"));for(let s of i){let r=s.parentNode;if(r){while(s.firstChild)r.insertBefore(s.firstChild,s);r.removeChild(s)}}let o=Array.from(e.querySelectorAll(".spanified"));for(let s of o){let r=s.parentNode;if(r){while(s.firstChild)r.insertBefore(s.firstChild,s);r.removeChild(s)}}e.normalize()}}class Ge{root;selecting=!1;touchMode=!1;constructor(e){this.root=e,this.setup()}lastHovered=null;pendingCollapse=null;setup(){Dt(this.root,!1),this.root.addEventListener("mousemove",this.handleMouseMove),this.root.addEventListener("mousedown",this.handleMouseDown),this.root.addEventListener("mouseup",this.handleMouseUp),this.root.addEventListener("mouseleave",this.handleMouseLeave),this.root.addEventListener("touchstart",this.handleTouchStart,{passive:!1}),this.root.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.root.addEventListener("touchend",this.handleTouchEnd,{passive:!1})}destroy(){this.root.removeEventListener("mousemove",this.handleMouseMove),this.root.removeEventListener("mousedown",this.handleMouseDown),this.root.removeEventListener("mouseup",this.handleMouseUp),this.root.removeEventListener("mouseleave",this.handleMouseLeave),this.root.removeEventListener("touchstart",this.handleTouchStart),this.root.removeEventListener("touchmove",this.handleTouchMove),this.root.removeEventListener("touchend",this.handleTouchEnd)}handleMouseMove=(e)=>{let t=e.target;if(t.closest(".not-selectable")||t.classList.contains("not-selectable"))return;if(this.lastHovered&&this.lastHovered!==t){let n=this.topLevelAncestor(this.lastHovered),i=this.topLevelAncestor(t);if(n&&n!==i&&!n.classList.contains("selected-block"))k(n,!1)}if(t instanceof Element&&t!==this.root)this.lastHovered=t;if(this.selecting){let n=ee(this.root,e.clientX,e.clientY),i=this.find(".sel-end");if(n&&i){let o=document.createRange();o.setStart(n.node,n.after?n.offset+1:n.offset),o.collapse(!0),o.insertNode(i),this.root.normalize(),this.extendSelection(),this.onBoundsChanged?.()}}e.preventDefault(),e.stopPropagation()};placeCaretAt(e,t){let n=ee(this.root,e,t);if(!n)return;this.removeBounds();let i=document.createRange();i.setStart(n.node,n.after?n.offset+1:n.offset),i.collapse(!0),i.insertNode(this.createBounds()),this.root.normalize(),this.onBoundsChanged?.()}selectWordAt(e,t){let n=this.topLevelAncestor(e)||this.root,i=[],o="",s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),r;while(r=s.nextNode()){let z=r;i.push({node:z,start:o.length}),o+=z.data}let l=i.find((z)=>z.node===e);if(!l)return;let{start:a,end:c}=is(o,l.start+t),d=(z)=>{for(let I=i.length-1;I>=0;I--)if(z>=i[I].start)return{node:i[I].node,offset:z-i[I].start};return null},u=d(a),h=d(c);if(!u||!h)return;this.removeBounds();let f=document.createElement("span");f.className="sel-start";let p=document.createElement("span");p.className="sel-end caret";let x=document.createRange();x.setStart(h.node,Math.min(h.offset,h.node.length)),x.collapse(!0),x.insertNode(p);let m=document.createRange();m.setStart(u.node,Math.min(u.offset,u.node.length)),m.collapse(!0),m.insertNode(f),this.onBoundsChanged?.()}handleMouseDown=(e)=>{this.touchMode=!1;let t=e.target;if(t.closest(".not-selectable")||t.classList.contains("not-selectable"))return;if(e.detail===1&&!e.shiftKey&&t.closest?.(".selected")&&!t.closest?.(".not-selectable")){this.pendingCollapse={x:e.clientX,y:e.clientY,target:t};return}this.selecting=e.detail;let n=ee(this.root,e.clientX,e.clientY);if(n)if(e.shiftKey){let i=this.find(".sel-end");if(i){i.remove();let o=document.createRange();o.setStart(n.node,n.after?n.offset+1:n.offset),o.collapse(!0),o.insertNode(i),this.root.normalize(),this.extendSelection()}}else if(this.selecting===1)this.placeCaretAt(e.clientX,e.clientY);else if(this.selecting===2)this.selectWordAt(n.node,n.offset),this.extendSelection();else this.placeCaretAt(e.clientX,e.clientY),this.extendSelection();else if(t instanceof HTMLElement&&t.querySelectorAll(".spanified").length===0&&t!==this.root){this.removeBounds();let i=this.createBounds();t.appendChild(i)}e.preventDefault(),e.stopPropagation()};handleMouseUp=(e)=>{let t=this.pendingCollapse;if(this.pendingCollapse=null,t){if(Math.abs(e.clientX-t.x)+Math.abs(e.clientY-t.y)<4)this.unmark(),this.selecting=1,this.placeCaretAt(t.x,t.y),this.selecting=!1,this.selectionChanged();return}let n=e.target;if(n.closest(".not-selectable")||n.classList.contains("not-selectable"))return;if(this.selecting){let i=this.selecting;if(this.extendSelection(),i!==1)this.resetBounds();this.normalizeBoundsOrder(),this.selecting=!1}for(let i of Array.from(this.root.children))if(!i.classList.contains("selected-block"))k(i,!1);this.lastHovered=null,this.selectionChanged(),e.preventDefault(),e.stopPropagation()};handleMouseLeave=()=>{if(this.lastHovered){let e=this.topLevelAncestor(this.lastHovered);if(e&&!e.classList.contains("selected-block"))k(e,!1);this.lastHovered=null}};handleTouchStart=(e)=>{if(e.touches.length!==1)return;this.touchMode=!0;let t=e.touches[0],n=e.target;if(n.closest(".not-selectable")||n.classList.contains("not-selectable"))return;if(this.selecting=1,ee(this.root,t.clientX,t.clientY))this.placeCaretAt(t.clientX,t.clientY);else if(n instanceof HTMLElement&&n!==this.root){this.removeBounds();let o=this.createBounds();n.appendChild(o)}if(e.cancelable)e.preventDefault()};handleTouchMove=(e)=>{if(!this.selecting||e.touches.length!==1)return;let t=e.touches[0],n=this.root.getRootNode(),i=n.elementFromPoint?n.elementFromPoint(t.clientX,t.clientY):document.elementFromPoint(t.clientX,t.clientY);if(!i||i.closest(".not-selectable")||i.classList.contains("not-selectable"))return;let o=ee(this.root,t.clientX,t.clientY),s=this.find(".sel-end");if(o&&s){let r=document.createRange();r.setStart(o.node,o.after?o.offset+1:o.offset),r.collapse(!0),r.insertNode(s),this.root.normalize(),this.extendSelection(),this.onBoundsChanged?.()}if(e.cancelable)e.preventDefault()};handleTouchEnd=(e)=>{if(this.selecting)this.extendSelection(),this.normalizeBoundsOrder(),this.selecting=!1;for(let t of Array.from(this.root.children))if(!t.classList.contains("selected-block"))k(t,!1);if(this.lastHovered=null,this.selectionChanged(),e.cancelable)e.preventDefault()};selectionChanged(){this.focus(),this.root.dispatchEvent(new CustomEvent("selectionchanged",{bubbles:!0}))}onBoundsChanged;focusTarget;focus(){this.focusTarget?.focus(),this.onBoundsChanged?.()}createBounds(){let e=document.createDocumentFragment(),t=document.createElement("span");t.className="sel-start";let n=document.createElement("span");return n.className="sel-end caret",e.appendChild(t),e.appendChild(n),e}normalizeBoundsOrder(){let e=this.find(".sel-start"),t=this.find(".sel-end");if(!e||!t||e===t)return;if(dt(e,t))return;e.className="sel-end caret",t.className="sel-start",this.onBoundsChanged?.()}find(e){return this.root.querySelector(e)}findAll(e){return Array.from(this.root.querySelectorAll(e))}markBounds(){let e=this.find(".sel-start"),t=this.find(".sel-end");if(e&&t)this.markRange(e,t);this.onBoundsChanged?.()}removeBounds(){for(let e of this.findAll(".sel-start, .sel-end"))e.remove();this.onBoundsChanged?.()}resetBounds(){let e=this.findAll(".selected");if(e.length===0)return this;this.removeBounds();let t=document.createElement("span");t.className="sel-start";let n=document.createElement("span");n.className="sel-end caret";let i=e[0],o=e[e.length-1],s=Xe(i),r=Ye(o);return s.parentNode?.insertBefore(t,s),r.parentNode?.insertBefore(n,r.nextSibling),this.onBoundsChanged?.(),this}extendSelection(){let e=this.find(".sel-start"),t=this.find(".sel-end");if(!e||!t)return;let n=e,i=t;switch(this.selecting){case 1:break;case 2:if(n.closest(".spanified-word"))n=n.closest(".spanified-word");if(i.closest(".spanified-word"))i=i.closest(".spanified-word");break;default:n=this.topLevelAncestor(n)||n,i=this.topLevelAncestor(i)||i;break}this.markRange(n,i),this.onBoundsChanged?.()}topLevelAncestor(e){let t=e;while(t&&t.parentNode!==this.root)t=t.parentNode;return t instanceof Element?t:null}unmark(){for(let e of this.findAll(".selected"))if(e.classList.remove("selected"),e.removeAttribute("draggable"),e.removeAttribute("data-drag"),e instanceof HTMLElement&&e.classList.length===0&&e.getAttribute("class")!==null)e.removeAttribute("class");for(let e of this.findAll("span"))if(e.attributes.length===0){let t=e.parentNode;if(t){while(e.firstChild)t.insertBefore(e.firstChild,e);t.removeChild(e)}}for(let e of this.findAll(".selected-block"))e.classList.remove("selected-block");for(let e of this.findAll(".first-block"))e.classList.remove("first-block");for(let e of this.findAll(".last-block"))e.classList.remove("last-block")}isBlock(e){return e.parentNode===this.root}markRange(e,t){if(!e)return;if(!t)t=e;if(!dt(e,t)&&e!==t){let d=t;t=e,e=d}this.unmark();let n=this.isBlock(e)?e:this.topLevelAncestor(e),i=this.isBlock(t)?t:this.topLevelAncestor(t);if(!n||!i)return;n.classList.add("first-block"),i.classList.add("last-block");let o=[n];if(n!==i){let d=n.nextElementSibling;while(d&&d!==i)o.push(d),d=d.nextElementSibling;o.push(i)}for(let d of o)d.classList.add("selected-block");for(let d of Array.from(this.root.children))if(!d.classList.contains("selected-block"))k(d,!1);let s=e.classList.contains("sel-start")||e.classList.contains("sel-end")?V(e,this.root):Xe(e),r=t.classList.contains("sel-start")||t.classList.contains("sel-end")?q(t,this.root):Ye(t);if(!s||!r)return;let l=[];for(let d of o)l.push(...ze(d));let a=l.indexOf(s),c=l.indexOf(r);if(a<0||c<0)return;for(let d=a;d<=c;d++)this.markNode(l[d])}static DRAG_TYPES="text/html;text/plain";makeDraggable(e){e.setAttribute("draggable","true"),e.setAttribute("data-drag",Ge.DRAG_TYPES)}markNode(e){if(e.nodeType===3){let t=e.parentNode;if(t&&t.childNodes.length===1)t.classList.add("selected"),this.makeDraggable(t);else if(t){let n=document.createElement("span");n.className="selected",t.insertBefore(n,e),n.appendChild(e),this.makeDraggable(n)}}else if(e instanceof Element){if(!e.classList.contains("sel-start")&&!e.classList.contains("sel-end"))e.classList.add("selected"),this.makeDraggable(e)}}despanify(){for(let e of Array.from(this.root.children))if(!e.classList.contains("selected-block"))k(e,!1);this.lastHovered=null}normalize(){let e=this.root;for(let t=e.childNodes.length-1;t>=0;t--){let n=e.childNodes[t];if(n.nodeType===3&&/^\s*$/.test(n.textContent||""))e.removeChild(n)}for(let t of Array.from(e.querySelectorAll(".editor-table")))for(let n=t.childNodes.length-1;n>=0;n--){let i=t.childNodes[n];if(i.nodeType===3)t.removeChild(i)}return e.normalize(),this}}function jt(e){return e instanceof Element&&e.tagName==="LI"}function ss(e){return e instanceof Element&&e.tagName==="UL"}function rs(e){return Z(e)!==null}function Z(e){let t=e;while(t){if(jt(t)&&t.parentElement?.classList.contains("editor-table"))return t;t=t.parentNode}return null}function W(e){let t=e;while(t){if(ss(t)&&t.classList.contains("editor-table"))return t;t=t.parentNode}return null}function D(e){let t=e.style.gridTemplateColumns.trim();if(!t)return 1;return t.split(/\s+/).length}function ft(e){let t=e.style.gridTemplateColumns.trim();if(!t)return["1fr"];return t.split(/\s+/)}function Oe(e,t){e.style.gridTemplateColumns=t.join(" ")}function Je(e){let t=e.parentElement;if(!t)return-1;return Array.from(t.querySelectorAll(":scope > li")).indexOf(e)}function te(e,t){return Math.floor(Je(e)/t)}function De(e,t){return Je(e)%t}function pt(e){let t=e.parentElement;if(!t)return null;let n=D(t),o=Je(e)+n,s=Array.from(t.querySelectorAll(":scope > li"));return o<s.length?s[o]:null}function gt(e){let t=e.parentElement;if(!t)return null;let n=D(t),o=Je(e)-n;if(o<0)return null;return Array.from(t.querySelectorAll(":scope > li"))[o]}function mt(e){let t=e.nextElementSibling;return t&&jt(t)?t:null}function It(e){let t=e.previousElementSibling;return t&&jt(t)?t:null}function Ze(e){return e.classList.contains("table-header")}function ne(e=!1){let t=document.createElement("li");if(e)t.classList.add("table-header");return t.innerHTML=" ",t}function K(e,t,n){let i=Array.from(e.querySelectorAll(":scope > li")),o=t*n;return i.slice(o,o+n)}function Rt(e,t,n){let i=Array.from(e.querySelectorAll(":scope > li")),o=[];for(let s=t;s<i.length;s+=n)o.push(i[s]);return o}function yt(e){let t=e.querySelectorAll(":scope > li"),n=D(e);return Math.ceil(t.length/n)}function _t(e,t=2,n=1){let i=document.createElement("ul");i.className="editor-table",i.style.gridTemplateColumns=Array(e).fill("1fr").join(" ");for(let o=0;o<t;o++){let s=o<n;for(let r=0;r<e;r++)i.appendChild(ne(s))}return i}function Vt(e){if(e.length%2!==0)return console.error("Error: expected even number of arguments",e),null;let t={};for(let n=0;n<e.length;n+=2)t[e[n]]=e[n+1].replace(/\+/g," ");return t}function Pt(e,t){for(let[n,i]of Object.entries(t))e.style.setProperty(n,i)}function Qe(e){return(e.tagName==="UL"||e.tagName==="OL")&&!e.classList.contains("editor-table")}function ls(e){let t=e.parentNode;if(!t)return;for(let n of Array.from(e.children)){let i=document.createElement("p");while(n.firstChild)i.appendChild(n.firstChild);i.classList.add("selected-block"),t.insertBefore(i,e)}e.remove()}function as(e){let t=e,n=t.previousElementSibling;if(n&&Qe(n)&&n.tagName===t.tagName){while(t.firstChild)n.appendChild(t.firstChild);n.classList.add("selected-block"),t.remove(),t=n}let i=t.nextElementSibling;if(i&&Qe(i)&&i.tagName===t.tagName){while(i.firstChild)t.appendChild(i.firstChild);i.remove()}return t}function Vn(e,t){if(!t||t==="_self"){e.removeAttribute("target"),e.removeAttribute("rel");return}e.setAttribute("target",t),e.setAttribute("rel","noopener")}var qn=0;function cs(){return qn+=1,`fn-${Date.now().toString(36)}-${qn}`}function qt(e){let t=Array.from(e.querySelectorAll(".footnote-ref[data-footnote]")).filter((o)=>!o.closest(".footnotes")),n=e.querySelector("ol.footnotes");if(t.length===0){n?.remove();return}if(!n)n=document.createElement("ol"),n.className="footnotes",e.appendChild(n);let i=new Map;for(let o of Array.from(n.children)){let s=o.getAttribute("data-footnote");if(s)i.set(s,o)}t.forEach((o,s)=>{let r=o.getAttribute("data-footnote"),l=o.querySelector("a");if(l)l.textContent=String(s+1),l.setAttribute("href",`#${r}`);let a=i.get(r);if(!a)a=document.createElement("li"),a.className="footnote",a.setAttribute("data-footnote",r),a.textContent="Footnote text";a.id=r,i.delete(r),n.appendChild(a)});for(let o of i.values())o.remove()}var vt={setText(e,...t){let n=Vt(t);if(!n)return;e.selectable.resetBounds(),k(e.root,!1),e.selectable.markBounds(),e.normalize();let i=e.selectedLeafNodes();e.selectable.removeBounds();for(let o of i)if(o.nodeType===3){let s=ut(o,".setText");if(s&&s instanceof HTMLElement)Pt(s,n);else{let r=document.createElement("span");r.className="setText",Pt(r,n),o.parentNode?.insertBefore(r,o),r.appendChild(o)}}e.selectable.resetBounds(),e.focus(),e.updateUndo("new")},setBlockType(e,t){let n=e.selectedBlocks();for(let i of n){let o=document.createElement(t);while(i.firstChild)o.appendChild(i.firstChild);o.classList.add("selected-block"),i.parentNode?.replaceChild(o,i)}e.updateUndo("new")},setList(e,t="ul"){let n=t.toLowerCase(),i=e.selectedBlocks().filter((r)=>!r.classList.contains("editor-table"));if(i.length===0)return;let o=i.every(Qe)&&i.every((r)=>r.tagName.toLowerCase()===n);if(n==="none"||o){for(let r of i)if(Qe(r))ls(r);e.updateUndo("new");return}let s=[];for(let r of i){let l=s[s.length-1];if(l&&l[l.length-1].nextElementSibling===r)l.push(r);else s.push([r])}for(let r of s){let l=document.createElement(n);l.classList.add("selected-block");for(let a of r)if(Qe(a))while(a.firstChild)l.appendChild(a.firstChild);else{let c=document.createElement("li");while(a.firstChild)c.appendChild(a.firstChild);l.appendChild(c)}r[0].parentNode?.insertBefore(l,r[0]);for(let a of r)a.remove();as(l)}e.updateUndo("new")},setLink(e,t,n="_blank"){if(!t)return;e.selectable.resetBounds(),k(e.root,!1),e.selectable.markBounds(),e.normalize();let i=e.selectedLeafNodes();e.selectable.removeBounds();for(let o of i){if(o.nodeType!==3)continue;let s=ut(o,"a");if(s instanceof Element)s.setAttribute("href",t),Vn(s,n);else{let r=document.createElement("a");r.setAttribute("href",t),Vn(r,n),o.parentNode?.insertBefore(r,o),r.appendChild(o)}}e.selectable.resetBounds(),e.focus(),e.updateUndo("new")},removeLink(e){e.selectable.resetBounds(),k(e.root,!1),e.selectable.markBounds();let t=e.selectedLeafNodes();e.selectable.removeBounds();let n=new Set;for(let i of t){let o=i.parentElement?.closest("a")??(i instanceof Element?i.closest("a"):null);if(o&&e.root.contains(o))n.add(o)}for(let i of n){let o=i.parentNode;if(!o)continue;while(i.firstChild)o.insertBefore(i.firstChild,i);o.removeChild(i)}e.selectable.resetBounds(),e.focus(),e.updateUndo("new")},insertImage(e,t,...n){let i=e.insertionPoint();if(!i||!t)return;let o=document.createElement("img");o.setAttribute("src",t),o.setAttribute("alt",n.join(" ")),i.before(o),e.normalize(),e.focus(),e.updateUndo("new")},insertFootnote(e,...t){let n=e.insertionPoint();if(!n)return;let i=cs(),o=document.createElement("sup");o.className="footnote-ref",o.setAttribute("data-footnote",i);let s=document.createElement("a");s.setAttribute("href",`#${i}`),s.textContent="?",o.appendChild(s),n.before(o);let r=e.root.querySelector("ol.footnotes");if(!r)r=document.createElement("ol"),r.className="footnotes",e.root.appendChild(r);let l=document.createElement("li");l.className="footnote",l.setAttribute("data-footnote",i),l.id=i,l.textContent=t.length?t.join(" "):"Footnote text",r.appendChild(l),qt(e.root),e.normalize(),e.focus(),e.updateUndo("new")},renumberFootnotes(e){qt(e.root),e.updateUndo("new")},setBlocks(e,...t){let n=Vt(t);if(!n)return;for(let i of e.selectedBlocks())Pt(i,n);e.updateUndo("new")},updateUndo(e,t){e.updateUndo(t)},setDebug(e){e.root.classList.toggle("debug")},annotate(e,t){let n=e.insertionPoint();if(!n)return;let i=document.querySelector(`.annotation-template .${t}`);if(!i)return;let o=document.createElement("span");o.className="annotation do-not-spanify not-selectable not-editable";let s=i.cloneNode(!0);s.classList.add("annotation-body"),o.appendChild(s),n.after(o),e.updateUndo("new")},insertTable(e,...t){let n=parseInt(t[0])||3,i=parseInt(t[1])||2,o=parseInt(t[2])||1,s=e.insertionPoint();if(!s)return;let r=e.block(s),l=_t(n,i,o);if(r)r.after(l);else e.root.appendChild(l);let a=l.querySelector("li");if(a)a.innerHTML="",a.appendChild(e.selectable.createBounds()),e.selectable.normalize(),e.focus();e.updateUndo("new")},insertTableRow(e,t="after"){let n=e.insertionPoint();if(!n)return;let i=Z(n);if(!i)return;let o=W(i);if(!o)return;let s=D(o),r=te(i,s),l=t==="before"&&r===0&&Ze(i),a=K(o,r,s),c=t==="before"?a[0]:a[a.length-1];for(let d=0;d<s;d++){let u=ne(l);if(t==="before")c.before(u);else c.after(u)}e.updateUndo("new")},insertTableCol(e,t="after"){let n=e.insertionPoint();if(!n)return;let i=Z(n);if(!i)return;let o=W(i);if(!o)return;let s=D(o),r=De(i,s),l=yt(o);for(let d=l-1;d>=0;d--){let h=K(o,d,s)[r],f=Ze(h),p=ne(f);if(t==="before")h.before(p);else h.after(p)}let a=ft(o),c=t==="before"?r:r+1;a.splice(c,0,"1fr"),Oe(o,a),e.updateUndo("new")},deleteTableRow(e){let t=e.insertionPoint();if(!t)return;let n=Z(t);if(!n)return;let i=W(n);if(!i)return;let o=D(i);if(yt(i)<=1)return;let r=te(n,o),l=K(i,r,o),a=r>0?r-1:1,c=K(i,a,o);if(c.length>0)c[0].appendChild(e.selectable.createBounds()),e.selectable.normalize(),e.focus();for(let d of l)d.remove();e.updateUndo("new")},deleteTableCol(e){let t=e.insertionPoint();if(!t)return;let n=Z(t);if(!n)return;let i=W(n);if(!i)return;let o=D(i);if(o<=1)return;let s=De(n,o),r=te(n,o),l=s>0?s-1:1,a=K(i,r,o);if(a[l])a[l].appendChild(e.selectable.createBounds()),e.selectable.normalize(),e.focus();let c=Rt(i,s,o);for(let u=c.length-1;u>=0;u--)c[u].remove();let d=ft(i);d.splice(s,1),Oe(i,d),e.updateUndo("new")},toggleHeaderRow(e){let t=e.insertionPoint();if(!t)return;let n=Z(t);if(!n)return;let i=W(n);if(!i)return;let o=D(i),s=te(n,o),r=K(i,s,o),l=!Ze(r[0]);for(let a of r)a.classList.toggle("table-header",l);e.updateUndo("new")}};function Ft(e,t){let n=e.commands??vt,i=t.split(/;\s*/);for(let o of i){let s=o.trim().split(/\s+/),r=s.shift();if(!r)continue;let l=n[r];if(l)l(e,...s);else console.error("unrecognized command",r)}}var Ee={debug:!1,perf:!1,quiet:!1};function se(e,t){if(e==null||typeof e!=="object")return e;if(e instanceof Date)return new Date(e.getTime());if(t===void 0)t=new WeakMap;else if(t.has(e))return t.get(e);if(e instanceof Set){let i=new Set;t.set(e,i);for(let o of e)i.add(se(o,t));return i}if(e instanceof Map){let i=new Map;t.set(e,i);for(let[o,s]of e)i.set(se(o,t),se(s,t));return i}if(Array.isArray(e)){let i=[];t.set(e,i);for(let o of e)i.push(se(o,t));return i}let n={};t.set(e,n);for(let i in e)n[i]=se(e[i],t);return n}var le={},Zt=null,ds=(e)=>{Zt=e},hn=()=>{if(Zt===null)throw Error("xin proxy not initialized");return Zt},Qt=null,en=null,us=(e,t)=>{Qt=e,en=t},hs=()=>{if(Qt===null)throw Error("bind not initialized");return Qt},fs=()=>{if(en===null)throw Error("on not initialized");return en},me="-tosi-data",tn=`.${me}`,Y=Symbol.for("xin-path"),Ae=Symbol.for("xin-value"),ps="xinObserve",gs="xinBind",ms="xinOn",ys=Symbol.for("tosi-accessor"),fn=Symbol.for("tosi-take"),kt=Symbol("list-binding"),Re=Symbol("list-instance"),nn=new Map;function vs(e,t){let n=nn.get(e);if(n===void 0)n=new Set,nn.set(e,n);n.add(t)}function xs(e){return nn.get(e)}var Fn=new Set;function re(e,t){if(!Fn.has(e)){if(Fn.add(e),Ee.quiet!==!0)console.warn(t)}}function Lt(e,t){let n=!1;return(...i)=>{if(!n)console.warn(t),n=!0;return e(...i)}}var ae=(e)=>e&&e[Y]||void 0;function B(e){if(typeof e==="object"&&e!==null){let t=e[Ae];return t!==void 0?t:e}return e}var ql=Lt(ae,"xinPath is deprecated. Use tosiPath instead."),Fl=Lt(B,"xinValue is deprecated. Use tosiValue instead."),wi=(e,t)=>{let{take:n}=e;if(n==null)return;n.paths=n.paths.map((i)=>i.startsWith("^")?`${t}${i.substring(1)}`:i)},Ci=(e,t,n)=>{let{binding:i,options:o,take:s}=t,{toDOM:r}=i;if(r==null)return;let l=hn();if(s==null){r(e,l[n],o);return}let a=s.paths.map((d)=>l[d]),c=s.lastInputs;if(c!=null&&a.every((d,u)=>d===c[u]))return;s.lastInputs=a,r(e,s.transform(...a),o)},_e=new WeakMap,ce=new WeakMap,Mt=new WeakMap,bs=0;var ws=0,pn=()=>{ws++},Cs=(e,t)=>{if(!Mt.has(e))bs++;Mt.set(e,t)};var nt=(e)=>{let t=e.cloneNode();if(t instanceof Element){let i=ce.get(e),o=_e.get(e);if(i!=null)ce.set(t,i.map((r)=>({...r,options:r.options!=null?{...r.options}:void 0,take:r.take!=null?{...r.take,paths:[...r.take.paths]}:void 0})));if(o!=null)_e.set(t,se(o));let s=Mt.get(e);if(s!=null)Mt.set(t,s)}let n=t instanceof HTMLTemplateElement?t.content:t;for(let i of Array.from(e instanceof HTMLTemplateElement?e.content.childNodes:e.childNodes))if(i instanceof Element||i instanceof DocumentFragment)n.appendChild(nt(i));else n.appendChild(i.cloneNode());return t},ks=(e)=>{try{return JSON.stringify(e)}catch(t){return"{has circular references}"}},ki=(...e)=>Error(e.map(ks).join(" ")),Ms=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),Es=0,As=()=>(parseInt("10000",36)+ ++Es).toString(36).slice(-5),Ss=()=>Ms()+As(),on=Symbol("delete"),Mi=Symbol("new-object"),Ut=Symbol("automatic-index");function Ei(e){if(e==="")return[];if(Array.isArray(e))return e;else{let t=[];while(e.length>0){let n=e.search(/\[[^\]]+\]/);if(n===-1){t.push(e.split("."));break}else{let i=e.slice(0,n);if(e=e.slice(n),i!=="")t.push(i.split("."));if(n=e.indexOf("]")+1,t.push(e.slice(1,n-1)),e.slice(n,n+1)===".")n+=1;e=e.slice(n)}}return t}}var Me=new WeakMap;function Ai(e,t){if(Me.get(e)===void 0)Me.set(e,{});let n={};if(Me.get(e)[t]=n,t==="_auto_")e.forEach((i,o)=>{if(i[Ut]===void 0)i[Ut]=Ss();n[i[Ut]+""]=o});else e.forEach((i,o)=>{n[U(i,t)+""]=o});return n}function Ls(e,t){if(Me.get(e)===void 0||Me.get(e)[t]===void 0)return Ai(e,t);else return Me.get(e)[t]}function Ts(e,t,n){n=n+"";let i=Ls(e,t)[n];if(i===void 0||U(e[i],t)+""!==n)i=Ai(e,t)[n];return i}var Bs=new Set(["__proto__","constructor","prototype"]);class gn extends Error{constructor(e){super(`unsafe path segment "${e}": it would escape the object graph into the prototype chain`);this.name="UnsafePathError"}}function $s(e){if(Bs.has(e))throw new gn(e)}function Ns(e){if(e==="__proto__")throw new gn(e)}function zs(e,t,n){if($s(t),(!Object.prototype.hasOwnProperty.call(e,t)||e[t]===void 0)&&n!==void 0)e[t]=n;return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function Si(e,t,n,i){let o=t!==""?Ts(e,t,n):n;if(i===on){if(o!==void 0)e.splice(o,1),Me.delete(e);return Symbol("deleted")}else if(i===Mi){if(t===""&&e[o]===void 0)e[o]={}}else if(i!==void 0)if(o!==void 0)e[o]=i;else if(t!==""&&U(i,t)+""===n+"")e.push(i),o=e.length-1;else throw Error(`byIdPath insert failed at [${t}=${n}]`);return e[o]}function Un(e){if(!Array.isArray(e))throw ki("setByPath failed: expected array, found",e)}function Wn(e){if(e==null||!(e instanceof Object))throw ki("setByPath failed: expected Object, found",e)}function U(e,t){let n=Ei(t),i=e,o,s,r,l;for(o=0,s=n.length;i!==void 0&&o<s;o++){let a=n[o];if(Array.isArray(a))for(r=0,l=a.length;i!==void 0&&r<l;r++){let c=a[r];i=i[c]}else if(i.length===0){if(i=i[Number(a.slice(1))],a[0]!=="=")return}else if(a.includes("=")){let[c,...d]=a.split("=");i=Si(i,c,d.join("="))}else r=parseInt(a,10),i=i[r]}return i}function Li(e,t,n){let i=e;if(t==="")throw Error("setByPath cannot be used to set the root object");let o=Ei(t);while(i!=null&&o.length>0){let s=o.shift();if(typeof s==="string"){let r=s.indexOf("=");if(r>-1){if(r===0)Wn(i);else Un(i);let l=s.slice(0,r),a=s.slice(r+1);if(i=Si(i,l,a,o.length>0?Mi:n),o.length===0)return!0}else{Un(i);let l=parseInt(s,10);if(o.length>0)i=i[l];else{if(n!==on){if(i[l]===n)return!1;i[l]=n}else i.splice(l,1);return!0}}}else if(Array.isArray(s)&&s.length>0){Wn(i);while(s.length>0){let r=s.shift();if(s.length>0||o.length>0){if(i=zs(i,r,s.length>0?{}:[]),i==null)throw Error(`setByPath failed at "${r}" in "${t}": not a container`)}else{if(Ns(r),n!==on){if(i[r]===n)return!1;i[r]=n}else{if(!Object.prototype.hasOwnProperty.call(i,r))return!1;delete i[r]}return!0}}}else throw Error(`setByPath failed, bad path ${t}`)}throw Error(`setByPath(${e}, ${t}, ${n}) failed`)}var Kn=Symbol("observer should be removed"),Et=[],je=[],sn=!1,Os,rn;function Ds(e,t,n,i){let o=xs(e);if(o===void 0)return[];let s=[];for(let r of o){let l=U(n,r);if(l!==void 0)s.push(`${e}[${r}=${l}]${i}`)}return s}var it=(e,t)=>{if(!t.startsWith(e))return!1;if(t.length===e.length)return!0;let n=t.charAt(e.length);return n==="."||n==="["};class Ti{description;test;callback;constructor(e,t){let n=typeof t==="string"?`"${t}"`:`function ${t.name}`,i;if(typeof e==="string")this.test=(o)=>typeof o==="string"&&o!==""&&(it(o,e)||it(e,o)),i=`test = "${e}"`;else if(e instanceof RegExp)this.test=e.test.bind(e),i=`test = "${e.toString()}"`;else if(e instanceof Function)this.test=e,i=`test = function ${e.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${i}, ${n}`,typeof t==="function")this.callback=t;else throw Error("expect callback to be a path or function");Et.push(this)}}var Hs=()=>{if(Ee.perf)console.time("xin async update");let e=Array.from(je);je.length=0,sn=!1;let t=rn;rn=void 0;try{for(let n of e)Et.filter((i)=>{let o;try{o=i.test(n)}catch(s){return console.error(`Listener ${i.description} threw "${s}" at "${n}"`),!1}if(o===Kn)return ln(i),!1;return o}).forEach((i)=>{let o;try{o=i.callback(n)}catch(s){console.error(`Listener ${i.description} threw "${s}" handling "${n}"`)}if(o===Kn)ln(i)})}finally{if(typeof t==="function")t();if(Ee.perf)console.timeEnd("xin async update")}},Pe=(e)=>{let t=typeof e==="string"?e:ae(e);if(t===void 0)throw console.error("touch was called on an invalid target",e),Error("touch was called on an invalid target");if(sn===!1)Os=new Promise((i)=>{rn=i}),sn=setTimeout(Hs);if(je.find((i)=>it(i,t))==null)je.push(t);let n=t.match(/^(.+)\[(\d+)\](.*)$/);if(n!==null){let[,i,o,s]=n,r=parseInt(o,10),l=U(le,`${i}[${r}]`);if(l!=null){let a=Ds(i,r,l,s);for(let c of a)if(je.find((d)=>it(d,c))==null)je.push(c)}}},mn=(e,t)=>new Ti(e,t),ln=(e)=>{let t=Et.indexOf(e);if(t>-1)Et.splice(t,1);else throw Error("unobserve failed, listener not found")},Bi=(e,t,{bubbles:n=!1,composed:i=!1}={})=>{let o=new Event(t,{bubbles:n,composed:i});e.dispatchEvent(o)},$i=(e)=>{if(e instanceof HTMLInputElement)return e.type;else if(e instanceof HTMLSelectElement&&e.hasAttribute("multiple"))return"multi-select";else return"other"},F=(e,t=2)=>String(e).padStart(t,"0"),js=(e,t)=>{switch(e){case"date":return`${t.getUTCFullYear()}-${F(t.getUTCMonth()+1)}-${F(t.getUTCDate())}`;case"month":return`${t.getUTCFullYear()}-${F(t.getUTCMonth()+1)}`;case"datetime-local":return`${t.getFullYear()}-${F(t.getMonth()+1)}-${F(t.getDate())}T${F(t.getHours())}:${F(t.getMinutes())}`;default:return t.toISOString()}},Is=(e)=>{let t=Math.floor(e/1000),n=`${F(Math.floor(t/3600))}:${F(Math.floor(t/60)%60)}`;return t%60===0?n:`${n}:${F(t%60)}`},Rs=(e)=>{let t=e.match(/^(\d\d):(\d\d)(?::(\d\d)(?:\.(\d+))?)?$/);if(t==null)return NaN;let[,n,i,o,s]=t;return(Number(n)*60+Number(i))*60000+Number(o??0)*1000+Number(s??0)},an=0,_s=()=>an>0,Ps=(e,t)=>{an++;try{Vs(e,t)}finally{an--}},Vs=(e,t)=>{let n=$i(e);switch(n){case"radio":e.checked=t!=null&&e.value===String(t);break;case"checkbox":e.checked=!!t;break;case"date":case"datetime-local":case"month":case"week":{let i=e;if(t==null||t==="")i.value="";else if(t instanceof Date||typeof t==="number"){let o=t instanceof Date?t:new Date(t);if(n==="week")try{i.valueAsDate=o}catch(s){}else i.value=js(n,o)}else i.value=String(t);break}case"time":{let i=e;if(t==null||t==="")i.value="";else if(typeof t==="number")i.value=Is(t);else if(t instanceof Date)i.value=`${F(t.getHours())}:${F(t.getMinutes())}:${F(t.getSeconds())}`;else i.value=String(t);break}case"multi-select":for(let i of Array.from(e.querySelectorAll("option")))i.selected=Array.isArray(t)?t.map(String).includes(i.value):t!=null?!!t[i.value]:!1;break;default:e.value=t==null?"":t}},qs=(e)=>{switch($i(e)){case"radio":{let t=e.parentElement?.querySelector(`[name="${e.name}"]:checked`);return t!=null?t.value:null}case"checkbox":return e.checked;case"number":case"range":{let t=e,n=typeof t.valueAsNumber==="number"?t.valueAsNumber:Number(t.value);return Number.isNaN(n)?t.value:n}case"date":case"datetime-local":case"month":case"week":{let t=e,n=t.valueAsDate??(t.value!==""?new Date(t.value):null);return n!=null&&!Number.isNaN(n.getTime())?n:t.value}case"time":{let t=e,n=typeof t.valueAsNumber==="number"?t.valueAsNumber:NaN;if(Number.isNaN(n))n=Rs(t.value);return Number.isNaN(n)?t.value:n}case"multi-select":return Array.from(e.querySelectorAll("option")).reduce((t,n)=>(t[n.value]=n.selected,t),{});default:return e.value}},{ResizeObserver:Xn}=globalThis,cn=Xn!=null?new Xn((e)=>{for(let t of e){let n=t.target;Bi(n,"resize")}}):{observe(){},unobserve(){}},Yn=(e,t,n=!0)=>{if(e!=null&&t!=null)if(typeof t==="string")e.textContent=t;else if(Array.isArray(t))t.forEach((i)=>{e.append(i instanceof Node&&n?nt(i):i)});else if(t instanceof Node)e.append(n?nt(t):t);else throw Error("expect text content or document node")};var At=(e,t=250)=>{let n,i=Date.now()-t;return function(...o){clearTimeout(n);let s=Date.now()-i;if(s>=t)i=Date.now(),e.apply(this,o);else n=setTimeout(()=>{i=Date.now(),e.apply(this,o)},t-s)}},Fs=16,Us=100;function Gn(e,t){let n=Array.from(e.getElementsByClassName(me));if(e.classList.contains(me))n.unshift(e);for(let i of n){let o=ce.get(i);for(let s of o){if(s.path.startsWith("^"))s.path=`${t}${s.path.substring(1)}`;wi(s,t),Ci(i,s,s.path)}}}var Jn=!1;class Ni{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(e,t,n={}){if(this.boundElement=e,this.itemToElement=new WeakMap,n.idPath!=null){let l=ae(t);if(l!=null)vs(l,n.idPath)}let i=n.virtual?.itemsPerRow??1,o=Array.from(e.children).find((l)=>l instanceof HTMLTemplateElement),s=null;if(o!=null){let l=i;if(o.content.children.length<1||o.content.children.length!==l)throw Error(`ListBinding expects a template with exactly ${l} child element(s)`);this.templates=Array.from(o.content.children).map((a)=>nt(a)),s=o.nextElementSibling,o.remove()}else if(e.children.length===1)this.templates=[e.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=n;let r=e.namespaceURI;if(this.isNamespaced=r==="http://www.w3.org/2000/svg"||r==="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"),s!=null)this.boundElement.insertBefore(this.listTop,s),this.boundElement.insertBefore(this.listBottom,s);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(i>1){this.boundElement.classList.add("tosi-virtual-grid");let l=this.boundElement.style;if(l!=null)l.setProperty("--tosi-columns",String(i)),l.display=l.display||"grid",l.gridTemplateColumns=l.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(n.virtual!=null&&!this.boundElement.getAttribute("role"))this.boundElement.setAttribute("role",i>1?"grid":"list");if(this.boundElement[kt]=this,this.isNamespaced&&n.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&n.virtual!=null)if(cn.observe(this.boundElement),this._update=At(()=>{this.update(this.array,!0)},Fs),this.boundElement.addEventListener("resize",this._update),n.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:e,visibleProp:t}=this.options,n=this.array;if(e!==void 0)n=n.filter((i)=>i[e]!==!0);if(t!==void 0)n=n.filter((i)=>i[t]===!0);if(this.options.filter&&this.needle!==void 0)n=this.options.filter(n,this.needle);return this._filteredCache=n,n}visibleSlice(){let{virtual:e}=this.options,t=this.filteredArray(),n=0,i=t.length-1,o=0,s=0;if(e!=null&&this.boundElement instanceof HTMLElement){let r=this.boundElement.offsetWidth,l=e.scrollContainer==="window",a,c;if(l){a=window.innerHeight;let h=this.boundElement.getBoundingClientRect();c=Math.max(0,-h.top)}else a=this.boundElement.offsetHeight,c=this.boundElement.scrollTop;let d=e.width!=null?Math.max(1,Math.floor(r/e.width)):e.visibleColumns??1,u=Math.ceil(t.length/d);if(e.minHeight!=null){let h=e.minHeight,f=Math.ceil(a/h)+(e.rowChunkSize||1),p=d*f,x=u*h,m=Math.max(0,x-a),z=m>0?Math.min(1,Math.max(0,c/m)):0,I=Math.max(0,u-f+1),we=z*I,G=Math.floor(we);if(e.rowChunkSize)G-=G%e.rowChunkSize;return n=G*d,i=n+p-1,o=c,s=Math.max(0,x-c-a),{items:t,firstItem:n,lastItem:i,topBuffer:o,bottomBuffer:s,interpolation:{t:z,position:we,scrollTop:c,viewportHeight:a,totalScrollHeight:x,rowHeight:e.height}}}else{let h=Math.ceil(a/e.height)+(e.rowChunkSize||1),f=d*h,p=Math.floor(c/e.height);if(p>u-h+1)p=Math.max(0,u-h+1);if(e.rowChunkSize)p-=p%e.rowChunkSize;n=p*d,i=n+f-1,o=p*e.height,s=Math.max((u-h)*e.height-o,0)}}return{items:t,firstItem:n,lastItem:i,topBuffer:o,bottomBuffer:s}}needle;filter=At((e)=>{if(this.needle!==e)this.needle=e,this.update(this.array)},Us);update(e,t){if(e==null)e=[];if(this.array=e,!t)this._filteredCache=void 0;let{hiddenProp:n,visibleProp:i}=this.options,o=ae(e),s=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",s.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(s.items.length));let r=this._previousSlice,{firstItem:l,lastItem:a,topBuffer:c,bottomBuffer:d}=s,u=n===void 0&&i===void 0&&t===!0&&r!=null&&l===r.firstItem&&a===r.lastItem;if(u&&s.interpolation==null&&c===r.topBuffer&&d===r.bottomBuffer)return;if(u&&s.interpolation!=null){this._updateInterpolatedBuffers(s);return}this._previousSlice=s;let h=0,f=0,p=0,{idPath:x}=this.options,m=this.options.virtual?.itemsPerRow??1,z;if(x!=null){z=new Set;for(let S=l;S<=a;S++){let A=s.items[S];if(A!==void 0)z.add(String(A[x]))}}let I=new Set;for(let S of Array.from(this.boundElement.children)){if(S===this.listTop||S===this.listBottom)continue;let A=S[Re];if(A==null)continue;else if(A===!0)S.remove(),h++;else{if(I.has(A))continue;let L;if(x!=null)L=!z.has(String(A[x]));else{let O=s.items.indexOf(A);L=O<l||O>a}if(L){I.add(A);let O=this.itemToElement.get(A);if(O!=null)for(let M of O)M.remove();else S.remove();if(this.itemToElement.delete(A),x!=null)this.idToElement.delete(String(A[x]));h++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(c)+"px",this.listBottom.style.height=String(d)+"px";let we=[],G=x!=null?new Set:null;for(let S=l;S<=a;S++){let A=s.items[S];if(A===void 0)continue;if(G!=null&&x!=null){let O=String(A[x]);if(G.has(O)){if(!Jn)Jn=!0,console.error(`tosijs list binding: duplicate idPath value "${O}" (idPath: "${x}"). `+"id-path values must be unique — items sharing an id collapse to a single "+"row and updates target the wrong item. Warned once per session.")}else G.add(O)}let L=this.itemToElement.get(B(A));if(L==null&&x!=null){let O=String(A[x]);if(L=this.idToElement.get(O),L!=null){let M=B(A);this.itemToElement.set(M,L);for(let Q of L)Q[Re]=M}}if(L==null){p++;let O=B(A);if(L=this.templates.map((M)=>nt(M)),typeof A==="object")this.itemToElement.set(O,L);for(let M of L)M[Re]=typeof A==="object"?O:!0;for(let M of L)if(this.listBottom!=null)this.boundElement.insertBefore(M,this.listBottom);else this.boundElement.append(M);if(x!=null){let M=A[x],Q=`${o}[${x}=${M}]`;for(let Wo of L)Gn(Wo,Q);this.idToElement.set(String(M),L)}else{let M=`${o}[${S}]`;for(let Q of L)Gn(Q,M)}}if(this.options.virtual!=null){let O=String(S+1);if(m>1)for(let M=0;M<L.length;M++){let Q=L[M];Q.setAttribute("role","gridcell"),Q.setAttribute("aria-rowindex",O),Q.setAttribute("aria-colindex",String(M+1))}else for(let M of L)M.setAttribute("role","listitem"),M.setAttribute("aria-rowindex",O)}we.push(...L)}let ct=this.listTop;for(let S of we){if(S.previousElementSibling!==ct)if(f++,ct?.nextElementSibling!=null)this.boundElement.insertBefore(S,ct.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(S,this.listBottom);else this.boundElement.append(S);ct=S}if(s.interpolation!=null)this._updateInterpolatedBuffers(s);if(Ee.perf)console.log(o,"updated",{removed:h,created:p,moved:f})}_updateInterpolatedBuffers(e){let{t,position:n,scrollTop:i,viewportHeight:o,totalScrollHeight:s,rowHeight:r}=e.interpolation,l=0;for(let u of Array.from(this.boundElement.children)){if(u===this.listTop||u===this.listBottom)continue;l+=u.offsetHeight||r}let a=i,c=i+o-l,d=Math.max(0,t*c+(1-t)*a-n%1*r);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(d)+"px",this.listBottom.style.height=String(Math.max(0,s-d-l))+"px"}}var Ws=(e,t,n)=>{let i=e[kt];if(t&&i===void 0)i=new Ni(e,t,n),e[kt]=i;return i},Ks=(e)=>{let t;while(!(t=e[Re])&&e&&e.parentElement)e=e.parentElement;return t?{element:e,item:t}:void 0},Xs=(e)=>{let t=Ks(e);return t?t.item:void 0};var{document:ot,MutationObserver:Zn}=globalThis,zi=(e,t)=>{let n=ce.get(e);if(n==null)return;for(let i of n){let{binding:o}=i,{path:s}=i,{toDOM:r}=o;if(r!=null){if(s.startsWith("^")){let l=Xs(e);if(l!=null&&l[Y]!=null){let a=l[Y];s=i.path=`${a}${s.substring(1)}`,wi(i,a)}else{if(e instanceof HTMLElement)console.warn(`Unresolved relative binding "${s}" —`,e,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(t==null||it(t,s))Ci(e,i,s)}}},Qn=new Set;function Oi(e,t,n){let i=`${e}:${t.tagName}:${n?.message??n}`;if(Qn.has(i))return;Qn.add(i),console.error(`tosijs: a binding threw while ${e} this element; the rest of the `+"pass continued. (Reported once per element type and message — fix the "+"binding, the transform, or the state it reads.)",t,n)}function Ys(e){pn();let t=Array.from(e.getElementsByClassName(me));if(e.classList.contains(me))t.unshift(e);t.forEach((n)=>{try{zi(n)}catch(i){Oi("hydrating",n,i)}})}if(Zn!=null)new Zn((e)=>{e.forEach((t)=>{Array.from(t.addedNodes).forEach((n)=>{if(n instanceof Element)Ys(n)})})}).observe(ot.body,{subtree:!0,childList:!0});mn(()=>!0,(e)=>{if(globalThis.document==null)return;let t=Array.from(ot.getElementsByClassName(me));for(let n of t)try{zi(n,e)}catch(i){Oi("updating",n,i)}});var Di=(e)=>{let t=e.composed&&e.composedPath!=null?e.composedPath()[0]:e.target;return t instanceof Element?t:null},dn=(e,t)=>{while(e!=null){let n=e.closest(t);if(n!=null)return n;let i=e.getRootNode();e=typeof ShadowRoot<"u"&&i instanceof ShadowRoot?i.host:null}return null},Gs=(e,t)=>{if(e.parentElement!=null)return dn(e.parentElement,t);let n=e.getRootNode();if(typeof ShadowRoot<"u"&&n instanceof ShadowRoot)return dn(n.host,t);return null},Hi=(e)=>{if(e.parentElement!=null)return e.parentElement;let t=e.getRootNode();return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t.host:null},ei=(e)=>{while(e!=null&&!_e.has(e))e=Hi(e);return e},ti=(e)=>{let t=dn(Di(e),tn);while(t!=null){let n=ce.get(t);for(let i of n??[]){let{binding:o,path:s}=i,{fromDOM:r}=o;if(r!=null){let l;try{l=r(t,i.options)}catch(a){throw console.error("Cannot get value from",t,"via",i),Error("Cannot obtain value fromDOM",{cause:a})}if(l!=null){let a=hn(),c=a[s];if(c==null)a[s]=l;else{let d=c[Y]!=null?c[Ae]:c,u=l[Y]!=null?l[Ae]:l;if(typeof d==="number"&&typeof u==="string"){let h=u.trim();if(h!==""){let f=Number(h);if(!Number.isNaN(f))u=f}}else if(u instanceof Date){if(typeof d==="number")u=u.getTime();else if(typeof d==="string")u=t.value}if(d instanceof Date&&u instanceof Date?d.getTime()!==u.getTime():d!==u)a[s]=u}}}}t=Gs(t,tn)}};if(globalThis.document!=null)ot.body.addEventListener("change",ti,!0),ot.body.addEventListener("input",ti,!0);function Js(e,t,n,i){let{paths:o,transform:s}=t,{toDOM:r}=n;if(r==null)return e;e.classList?.add(me);let l=ce.get(e);if(l==null)l=[],ce.set(e,l),pn();let a={paths:[...o],transform:s};for(let c of a.paths)l.push({path:c,binding:n,options:i,take:a});if(!o[0].startsWith("^"))Pe(o[0]);return e}var ni=!1,Zs=(e,t)=>{if(ni)return;if(typeof ShadowRoot<"u"&&e.getRootNode!=null&&e.getRootNode()instanceof ShadowRoot)ni=!0,console.warn(`tosijs: ${t} targets an element inside a shadow root, where data bindings do not operate (documented Component design boundary). A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into the shadow DOM. Warned once per session.`,e)};function pe(e,t,n,i){if(e instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(Zs(e,"bind()"),t!=null&&typeof t==="object"&&t[fn])return Js(e,t,n,i);let o;if(typeof t==="object"&&t[Y]===void 0&&i===void 0){let{value:l}=t;o=typeof l==="string"?l:l[Y],i={...t},delete i.value}else o=typeof t==="string"?t:t[Y];if(o==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:s}=n;e.classList?.add(me);let r=ce.get(e);if(r==null)r=[],ce.set(e,r),pn();if(r.push({path:o,binding:n,options:i}),s!=null&&!o.startsWith("^"))Pe(o);if(i?.filter&&i?.needle)pe(e,i.needle,{toDOM(l,a){l[kt]?.filter(a)}});return e}var ii=new Set,Qs=(e)=>{let t=ei(Di(e)),n=!1,i=new Proxy(e,{get(s,r){if(r==="stopPropagation")return()=>{e.stopPropagation(),n=!0};else{let l=s[r];return typeof l==="function"?l.bind(s):l}}}),o=new Set;while(!n&&t!=null){let s=_e.get(t)?.[e.type]??o;for(let r of s){if(typeof r==="function")r(i);else{let l=hn()[r];if(typeof l==="function")l(i);else throw Error(`no event handler found at path ${r}`)}if(n)continue}t=ei(Hi(t))}};function yn(e,t,n){let i=ae(n);if(i!=null)n=i;let o=_e.get(e);if(o==null)o={},_e.set(e,o);if(!o[t])o[t]=new Set;if(o[t].add(n),!ii.has(t))ii.add(t),ot.body.addEventListener(t,Qs,!0);return()=>{o[t].delete(n)}}us(pe,yn);var St={value:{toDOM:Ps,fromDOM(e){return qs(e)}},text:{toDOM(e,t){e.textContent=t}},enabled:{toDOM(e,t){e.disabled=!t}},disabled:{toDOM(e,t){e.disabled=Boolean(t)}},list:{toDOM(e,t,n){Ws(e,t,n).update(t)}}},Ul=180/Math.PI,Wl=Math.PI/180;function ie(e,t,n){return n<e?NaN:t<e?e:t>n?n:t}function Ce(e,t,n,i=!0){if(i)n=ie(0,n,1);return n*(t-e)+e}function er(e,t=document.body){let n=getComputedStyle(t);if(e.endsWith(")")&&e.startsWith("var("))e=e.slice(4,-1);return n.getPropertyValue(e).trim()}var tr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},nr=(e,t,n)=>(0.299*e+0.587*t+0.114*n)/255,ke=(e)=>("00"+Math.round(Number(e)).toString(16)).slice(-2);class ji{h;s;l;constructor(e,t,n){e/=255,t/=255,n/=255;let i=Math.max(e,t,n),o=i-Math.min(e,t,n),s=o!==0?i===e?(t-n)/o:i===t?2+(n-e)/o:4+(e-t)/o:0;this.h=60*s<0?60*s+360:60*s,this.s=o!==0?i<=0.5?o/(2*i-o):o/(2-(2*i-o)):0,this.l=(2*i-o)/2}}var fe=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(fe)fe.style.display="none";class g{r;g;b;a;static fromVar(e,t=document.body){return g.fromCss(er(e,t))}static fromCss(e){let t=tr[String(e).trim().toLowerCase()];if(t!==void 0)e=t;let n=e.match(/^#([0-9a-fA-F]+)$/);if(n){let c=n[1],d=(u,h)=>parseInt(c.slice(u,u+h),16);if(c.length===3||c.length===4){let u=(h)=>d(h,1)*17;return new g(u(0),u(1),u(2),c.length===4?u(3)/255:1)}if(c.length===6||c.length===8)return new g(d(0,2),d(2,2),d(4,2),c.length===8?d(6,2)/255:1)}let i=e;if(fe instanceof HTMLSpanElement)fe.style.color="black",fe.style.color=e,document.body.appendChild(fe),i=getComputedStyle(fe).color,fe.remove();let[o,s,r,l]=i.match(/[\d.]+/g)||["0","0","0","0"],a=i.startsWith("color(srgb")?255:1;return new g(Number(o)*a,Number(s)*a,Number(r)*a,l==null?1:Number(l))}static fromHsl(e,t,n,i=1){let o,s,r;if(t===0)o=s=r=n;else{let a=(h,f,p)=>{if(p<0)p+=1;if(p>1)p-=1;if(p<0.16666666666666666)return h+(f-h)*6*p;if(p<0.5)return f;if(p<0.6666666666666666)return h+(f-h)*(0.6666666666666666-p)*6;return h},c=n<0.5?n*(1+t):n+t-n*t,d=2*n-c,u=(e%360+360)%360/360;o=a(d,c,u+0.3333333333333333),s=a(d,c,u),r=a(d,c,u-0.3333333333333333)}let l=new g(o*255,s*255,r*255,i);return l.hslCached={h:(e%360+360)%360,s:t,l:n},l}static black=new g(0,0,0);static white=new g(255,255,255);constructor(e,t,n,i=1){this.r=ie(0,e,255),this.g=ie(0,t,255),this.b=ie(0,n,255),this.a=ie(0,i,1)}get inverse(){return new g(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:e,s:t,l:n}=this._hsl;return g.fromHsl(e,t,1-n,this.a)}get opaque(){return this.a===1?this:new g(this.r,this.g,this.b,1)}contrasting(e=1){return this.opaque.blend(this.brightness>0.5?g.black:g.white,e)}get rgb(){let{r:e,g:t,b:n}=this;return`rgb(${e.toFixed(0)},${t.toFixed(0)},${n.toFixed(0)})`}get rgba(){let{r:e,g:t,b:n,a:i}=this;return`rgba(${e.toFixed(0)},${t.toFixed(0)},${n.toFixed(0)},${i.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 ji(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:e,s:t,l:n}=this._hsl;return`hsl(${e.toFixed(0)}deg ${(t*100).toFixed(0)}% ${(n*100).toFixed(0)}%)`}get hsla(){let{h:e,s:t,l:n}=this._hsl;return`hsl(${e.toFixed(0)}deg ${(t*100).toFixed(0)}% ${(n*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let e=this.brightness*255;return new g(e,e,e)}get brightness(){return nr(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+ke(this.r)+ke(this.g)+ke(this.b):"#"+ke(this.r)+ke(this.g)+ke(this.b)+ke(255*this.a)}brighten(e){let{h:t,s:n,l:i}=this._hsl,o=ie(0,i+e*(1-i),1);return g.fromHsl(t,n,o,this.a)}darken(e){let{h:t,s:n,l:i}=this._hsl,o=ie(0,i*(1-e),1);return g.fromHsl(t,n,o,this.a)}saturate(e){let{h:t,s:n,l:i}=this._hsl,o=ie(0,n+e*(1-n),1);return g.fromHsl(t,o,i,this.a)}desaturate(e){let{h:t,s:n,l:i}=this._hsl,o=ie(0,n*(1-e),1);return g.fromHsl(t,o,i,this.a)}rotate(e){let{h:t,s:n,l:i}=this._hsl,o=(t+360+e)%360;return g.fromHsl(o,n,i,this.a)}opacity(e){let{h:t,s:n,l:i}=this._hsl;return g.fromHsl(t,n,i,e)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(e,t){return new g(Ce(this.r,e.r,t),Ce(this.g,e.g,t),Ce(this.b,e.b,t),Ce(this.a,e.a,t))}static blendHue(e,t,n){let i=(t-e+720)%360;if(i<180)return e+n*i;else return e-(360-i)*n}mix(e,t){let n=this._hsl,i=e._hsl;return g.fromHsl(n.s===0?i.h:i.s===0?n.h:g.blendHue(n.h,i.h,t),Ce(n.s,i.s,t),Ce(n.l,i.l,t),Ce(this.a,e.a,t))}colorMix(e,t){return g.fromCss(`color-mix(in hsl, ${this.html}, ${e.html} ${(t*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(e,t,n,i){if(!g.computedColors.has(e))g.computedColors.set(e,{varName:t,scale:n,method:i}),g.queueRecompute()}static queueRecompute(){if(g.recomputeQueued)return;g.recomputeQueued=!0,queueMicrotask(()=>{g.recomputeQueued=!1,g.recomputeColors()})}static recomputeColors(){if(g.computedColors.size===0)return;let e=[];for(let[n,{varName:i,scale:o,method:s}]of g.computedColors)try{let r=g.fromVar(i),l;switch(s){case"b":l=o>0?r.brighten(o):r.darken(-o);break;case"s":l=o>0?r.saturate(o):r.desaturate(-o);break;case"h":l=r.rotate(o*100);break;case"o":l=r.opacity(o);break;default:continue}e.push(` ${n}: ${l.rgba};`)}catch(r){}if(e.length===0)return;let t=`:root {
|
|
1
|
+
(()=>{var{defineProperty:Dt,getOwnPropertyNames:es,getOwnPropertyDescriptor:ts}=Object,ns=Object.prototype.hasOwnProperty;function is(e){return this[e]}var os=(e)=>{var t=(Un??=new WeakMap).get(e),n;if(t)return t;if(t=Dt({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var i of es(e))if(!ns.call(t,i))Dt(t,i,{get:is.bind(e,i),enumerable:!(n=ts(e,i))||n.enumerable})}return Un.set(e,t),t},Un;var ss=(e)=>e;function rs(e,t){this[e]=ss.bind(null,t)}var ls=(e,t)=>{for(var n in t)Dt(e,n,{get:t[n],enumerable:!0,configurable:!0,set:rs.bind(t,n)})};var Wl={};ls(Wl,{MENU_CLASS:()=>Po,Selectable:()=>Je,TosijsStyledEditor:()=>qn,allowSelection:()=>Ht,caretGeometryAt:()=>pt,cellAbove:()=>yt,cellBelow:()=>mt,cellIndex:()=>Ze,cellOf:()=>Z,characterAtPoint:()=>ee,characterStyleWidgets:()=>In,closestSingleParentAncestor:()=>ft,colOfCell:()=>De,commandButton:()=>j,commands:()=>tt,createCell:()=>ne,createTable:()=>Ft,debugWidget:()=>Xo,defaultMenubar:()=>Vn,defaultToolbar:()=>Pn,executeCommand:()=>Xt,firstLeafNode:()=>Xe,fontFamilyMenu:()=>qo,fontSizeMenu:()=>Uo,getCellsInCol:()=>Vt,getCellsInRow:()=>K,getColumnCount:()=>D,getColumnWidths:()=>gt,getRowCount:()=>bt,insertMenu:()=>Yo,isBefore:()=>ht,isHeaderCell:()=>Qe,isSafeNavigationUrl:()=>Ge,isTableCell:()=>bs,justificationMenu:()=>Fo,lastLeafNode:()=>Ye,leafNodes:()=>ze,lineSpacingMenu:()=>Wo,localePickerWidget:()=>jn,makeCSS:()=>Ut,makeFilter:()=>Ne,minimalToolbar:()=>_n,nextCell:()=>vt,nextLeafNode:()=>V,paragraphStyleMenu:()=>Vo,paragraphStyleWidgets:()=>Ko,prevCell:()=>Pt,previousLeafNode:()=>F,renumberFootnotes:()=>Wt,rowOfCell:()=>te,runCommand:()=>Kt,sanitizeInPlace:()=>It,setColumnWidths:()=>Oe,siblingOrder:()=>as,spanify:()=>k,tableMenu:()=>Go,tableOf:()=>W,toolbarSpacer:()=>Te,topSingleParentAncestor:()=>J,tosijsStyledEditor:()=>Ul,undoRedoWidgets:()=>Rn,version:()=>Zo});function Ne(e){if(typeof e==="function")return e;if(typeof e==="string"){let t=e;return(n)=>n.nodeType===1&&n.matches(t)}return()=>!0}function ht(e,t){return(e.compareDocumentPosition(t)&4)!==0}function as(e){let t=e.parentNode;if(!t)return-1;let n=t.childNodes;for(let i=0;i<n.length;i++)if(n[i]===e)return i;return-1}function Xe(e){while(e.firstChild)e=e.firstChild;return e}function Ye(e){while(e.lastChild)e=e.lastChild;return e}function V(e,t,n){let i=n!==void 0?Ne(n):null,o=e;while(o){if(o.nextSibling){let s=Xe(o.nextSibling);if(!i||i(s))return s;o=s;continue}if(o.parentNode&&o.parentNode!==(t||null)){o=o.parentNode;continue}break}return null}function F(e,t,n){let i=n!==void 0?Ne(n):null,o=e;while(o){if(o.previousSibling){let s=Ye(o.previousSibling);if(!i||i(s))return s;o=s;continue}if(o.parentNode&&o.parentNode!==(t||null)){o=o.parentNode;continue}break}return null}function ze(e,t){let n=[],i=t!==void 0?Ne(t):null;function o(s){if(!s.firstChild){if(!i||i(s))n.push(s)}else for(let r=0;r<s.childNodes.length;r++)o(s.childNodes[r])}return o(e),n}function J(e,t){let n=Ne(t);while(e.parentNode&&e.parentNode.childNodes.length===1&&n(e.parentNode))e=e.parentNode;return e}function ft(e,t){let n=Ne(t),i=e.parentNode;while(i){if(n(i))return i;if(!i.parentNode||i.parentNode.childNodes.length!==1)break;i=i.parentNode}return null}function Ht(e,t){e.style.userSelect=t?"text":"none",e.style.webkitUserSelect=t?"text":"none"}function cs(e){if(e.nodeType!==3||!e.textContent)return!1;let t=e.parentElement;if(!t)return!1;return!t.closest(".not-selectable, .do-not-spanify, .not-editable")}function ee(e,t,n){let i=[],o=(h)=>{if(cs(h)){i.push(h);return}for(let f of Array.from(h.childNodes))o(f)};if(o(e),i.length===0)return null;let s=document.createRange(),r=1/0,l=[];for(let h of i){s.selectNodeContents(h);let f=s.getBoundingClientRect();if(f.width===0&&f.height===0)continue;let p=n<f.top?f.top-n:n>f.bottom?n-f.bottom:0;if(l.push({node:h,dy:p}),p<r)r=p}if(l.length===0)return null;let a=l.filter((h)=>h.dy<=r+2).map((h)=>h.node),c=null,d=1/0,u=(h)=>{let f=h.parentElement;return!!f&&getComputedStyle(f).direction==="rtl"};for(let h of a){let f=h.textContent||"",p=u(h);for(let b=0;b<f.length;b++){s.setStart(h,b),s.setEnd(h,b+1);let m=s.getBoundingClientRect();if(m.width===0&&m.height===0)continue;let z=n<m.top?m.top-n:n>m.bottom?n-m.bottom:0,I=t<m.left?m.left-t:t>m.right?t-m.right:0,we=Math.abs(t-(m.left+m.right)/2),G=z*1000+I+we/1000;if(G<d)d=G,c={node:h,offset:b,rect:m,after:p?t-m.left<m.width/2:t-m.left>=m.width/2}}}return c}function pt(e,t){let n=(c)=>{let d=c;while(d){if(d.nodeType===3&&d.data.length>0)return d;d=V(d,t)}return null},i=(c)=>{let d=c;while(d){if(d.nodeType===3&&d.data.length>0)return d;d=F(d,t)}return null},o=(c,d)=>{let u=document.createRange();u.setStart(c,d),u.collapse(!0);let h=u.getBoundingClientRect();return h.height?{left:h.left,top:h.top,height:h.height}:null},s=n(V(e,t));if(s){let c=o(s,0);if(c)return c}let r=i(F(e,t));if(r){let c=o(r,r.data.length);if(c)return c}let l=getComputedStyle(e.parentElement||e).direction==="rtl",a=document.createRange();if(s){a.setStart(s,0),a.setEnd(s,1);let c=a.getBoundingClientRect();if(c.height)return{left:l?c.right:c.left,top:c.top,height:c.height}}if(r){a.setStart(r,r.data.length-1),a.setEnd(r,r.data.length);let c=a.getBoundingClientRect();if(c.height)return{left:l?c.left:c.right,top:c.top,height:c.height}}return null}function jt(e){return e.replace(/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,"").replace(/[\u0000-\u001f\u007f]/g,"")}function Xn(e){let t=jt(e);if(!/^[a-z][a-z0-9+.-]*:/i.test(t))return!0;if(/^data:image\/(png|jpeg|jpg|gif|webp|avif|bmp|svg\+xml);/i.test(t))return!/^data:image\/svg/i.test(t);return/^(https?|mailto|tel):/i.test(t)}var ds=new Set(["script","iframe","object","embed","link","meta","base","style","form","noscript","template","animate","animatetransform","animatemotion","set"]),us=["href","src","srcset","xlink:href","action","formaction","ping","poster","background","cite","data","longdesc","profile","usemap","manifest"],hs=/^(javascript|vbscript|livescript|mocha|data:text\/html)/i,fs=new Set(["ping"]),Wn=Object.getOwnPropertyDescriptor(Element.prototype,"localName")?.get,Kn=Object.getOwnPropertyDescriptor(Element.prototype,"attributes")?.get;function ps(e){return Wn?Wn.call(e):e.localName}function gs(e){return Kn?Kn.call(e):e.attributes}function It(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),n=[],i;while(i=t.nextNode()){let o=i,s=String(ps(o)??"").toLowerCase();if(ds.has(s)){n.push(o);continue}for(let r of Array.from(gs(o)??[])){let l=r.name.toLowerCase();if(l.startsWith("on")){o.removeAttribute(r.name);continue}if(fs.has(l)){o.removeAttribute(r.name);continue}let a=jt(r.value);if(hs.test(a)){o.removeAttribute(r.name);continue}if(us.includes(l)&&!Xn(r.value))o.removeAttribute(r.name)}}for(let o of n)o.remove()}function Ge(e){return Xn(e)&&!/^data:/i.test(jt(e))}function Rt(e){let t=Intl.Segmenter;if(!t)return Array.from(e);let n=new t(void 0,{granularity:"grapheme"});return Array.from(n.segment(e),(i)=>i.segment)}function ms(e,t){let n=Intl.Segmenter;if(n){let s=new n(void 0,{granularity:"word"});for(let r of s.segment(e)){let l=r.index+r.segment.length;if(t>=r.index&&t<l)return{start:r.index,end:l}}return{start:t,end:t}}let i=t,o=t;while(i>0&&!/\s/.test(e[i-1]))i--;while(o<e.length&&!/\s/.test(e[o]))o++;return{start:i,end:o}}function ys(e){return e.nodeType===3&&!e.parentElement?.closest(".do-not-spanify")}function k(e,t,n=!1){if(t){let i=ze(e,ys);for(let o of i){let s=o.textContent||"",r;if(n)r=s.match(/\s+|\w+|[^\w\s]+/g)||[s];else r=Rt(s);if(r.length<=1&&Rt(s).length<=1)continue;let l=o.parentNode;if(!l)continue;if(l instanceof Element)l.classList.remove("spanified");let a=document.createDocumentFragment();for(let c of r){if(/^\s+$/.test(c)){a.appendChild(document.createTextNode(c));continue}if(Rt(c).length>1){let d=document.createElement("span");d.className="spanified-word",d.textContent=c,k(d,!0,!1),a.appendChild(d)}else{let d=document.createElement("span");d.className="spanified",d.textContent=c,a.appendChild(d)}}l.replaceChild(a,o)}}else{let i=Array.from(e.querySelectorAll(".spanified-word"));for(let s of i){let r=s.parentNode;if(r){while(s.firstChild)r.insertBefore(s.firstChild,s);r.removeChild(s)}}let o=Array.from(e.querySelectorAll(".spanified"));for(let s of o){let r=s.parentNode;if(r){while(s.firstChild)r.insertBefore(s.firstChild,s);r.removeChild(s)}}e.normalize()}}class Je{root;selecting=!1;touchMode=!1;constructor(e){this.root=e,this.setup()}lastHovered=null;pendingCollapse=null;setup(){Ht(this.root,!1),this.root.addEventListener("mousemove",this.handleMouseMove),this.root.addEventListener("mousedown",this.handleMouseDown),this.root.addEventListener("mouseup",this.handleMouseUp),this.root.addEventListener("mouseleave",this.handleMouseLeave),this.root.addEventListener("touchstart",this.handleTouchStart,{passive:!1}),this.root.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.root.addEventListener("touchend",this.handleTouchEnd,{passive:!1})}destroy(){this.root.removeEventListener("mousemove",this.handleMouseMove),this.root.removeEventListener("mousedown",this.handleMouseDown),this.root.removeEventListener("mouseup",this.handleMouseUp),this.root.removeEventListener("mouseleave",this.handleMouseLeave),this.root.removeEventListener("touchstart",this.handleTouchStart),this.root.removeEventListener("touchmove",this.handleTouchMove),this.root.removeEventListener("touchend",this.handleTouchEnd)}handleMouseMove=(e)=>{let t=e.target;if(t.closest(".not-selectable")||t.classList.contains("not-selectable"))return;if(this.lastHovered&&this.lastHovered!==t){let n=this.topLevelAncestor(this.lastHovered),i=this.topLevelAncestor(t);if(n&&n!==i&&!n.classList.contains("selected-block"))k(n,!1)}if(t instanceof Element&&t!==this.root)this.lastHovered=t;if(this.selecting){let n=ee(this.root,e.clientX,e.clientY),i=this.find(".sel-end");if(n&&i){let o=document.createRange();o.setStart(n.node,n.after?n.offset+1:n.offset),o.collapse(!0),o.insertNode(i),this.root.normalize(),this.extendSelection(),this.onBoundsChanged?.()}}e.preventDefault(),e.stopPropagation()};placeCaretAt(e,t){let n=ee(this.root,e,t);if(!n)return;this.removeBounds();let i=document.createRange();i.setStart(n.node,n.after?n.offset+1:n.offset),i.collapse(!0),i.insertNode(this.createBounds()),this.root.normalize(),this.onBoundsChanged?.()}selectWordAt(e,t){let n=this.topLevelAncestor(e)||this.root,i=[],o="",s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),r;while(r=s.nextNode()){let z=r;i.push({node:z,start:o.length}),o+=z.data}let l=i.find((z)=>z.node===e);if(!l)return;let{start:a,end:c}=ms(o,l.start+t),d=(z)=>{for(let I=i.length-1;I>=0;I--)if(z>=i[I].start)return{node:i[I].node,offset:z-i[I].start};return null},u=d(a),h=d(c);if(!u||!h)return;this.removeBounds();let f=document.createElement("span");f.className="sel-start";let p=document.createElement("span");p.className="sel-end caret";let b=document.createRange();b.setStart(h.node,Math.min(h.offset,h.node.length)),b.collapse(!0),b.insertNode(p);let m=document.createRange();m.setStart(u.node,Math.min(u.offset,u.node.length)),m.collapse(!0),m.insertNode(f),this.onBoundsChanged?.()}handleMouseDown=(e)=>{this.touchMode=!1;let t=e.target;if(t.closest(".not-selectable")||t.classList.contains("not-selectable"))return;if(e.detail===1&&!e.shiftKey&&t.closest?.(".selected")&&!t.closest?.(".not-selectable")){this.pendingCollapse={x:e.clientX,y:e.clientY,target:t};return}this.selecting=e.detail;let n=ee(this.root,e.clientX,e.clientY);if(n)if(e.shiftKey){let i=this.find(".sel-end");if(i){i.remove();let o=document.createRange();o.setStart(n.node,n.after?n.offset+1:n.offset),o.collapse(!0),o.insertNode(i),this.root.normalize(),this.extendSelection()}}else if(this.selecting===1)this.placeCaretAt(e.clientX,e.clientY);else if(this.selecting===2)this.selectWordAt(n.node,n.offset),this.extendSelection();else this.placeCaretAt(e.clientX,e.clientY),this.extendSelection();else if(t instanceof HTMLElement&&t.querySelectorAll(".spanified").length===0&&t!==this.root){this.removeBounds();let i=this.createBounds();t.appendChild(i)}e.preventDefault(),e.stopPropagation()};handleMouseUp=(e)=>{let t=this.pendingCollapse;if(this.pendingCollapse=null,t){if(Math.abs(e.clientX-t.x)+Math.abs(e.clientY-t.y)<4)this.unmark(),this.selecting=1,this.placeCaretAt(t.x,t.y),this.selecting=!1,this.selectionChanged();return}let n=e.target;if(n.closest(".not-selectable")||n.classList.contains("not-selectable"))return;if(this.selecting){let i=this.selecting;if(this.extendSelection(),i!==1)this.resetBounds();this.normalizeBoundsOrder(),this.selecting=!1}for(let i of Array.from(this.root.children))if(!i.classList.contains("selected-block"))k(i,!1);this.lastHovered=null,this.selectionChanged(),e.preventDefault(),e.stopPropagation()};handleMouseLeave=()=>{if(this.lastHovered){let e=this.topLevelAncestor(this.lastHovered);if(e&&!e.classList.contains("selected-block"))k(e,!1);this.lastHovered=null}};handleTouchStart=(e)=>{if(e.touches.length!==1)return;this.touchMode=!0;let t=e.touches[0],n=e.target;if(n.closest(".not-selectable")||n.classList.contains("not-selectable"))return;if(this.selecting=1,ee(this.root,t.clientX,t.clientY))this.placeCaretAt(t.clientX,t.clientY);else if(n instanceof HTMLElement&&n!==this.root){this.removeBounds();let o=this.createBounds();n.appendChild(o)}if(e.cancelable)e.preventDefault()};handleTouchMove=(e)=>{if(!this.selecting||e.touches.length!==1)return;let t=e.touches[0],n=this.root.getRootNode(),i=n.elementFromPoint?n.elementFromPoint(t.clientX,t.clientY):document.elementFromPoint(t.clientX,t.clientY);if(!i||i.closest(".not-selectable")||i.classList.contains("not-selectable"))return;let o=ee(this.root,t.clientX,t.clientY),s=this.find(".sel-end");if(o&&s){let r=document.createRange();r.setStart(o.node,o.after?o.offset+1:o.offset),r.collapse(!0),r.insertNode(s),this.root.normalize(),this.extendSelection(),this.onBoundsChanged?.()}if(e.cancelable)e.preventDefault()};handleTouchEnd=(e)=>{if(this.selecting)this.extendSelection(),this.normalizeBoundsOrder(),this.selecting=!1;for(let t of Array.from(this.root.children))if(!t.classList.contains("selected-block"))k(t,!1);if(this.lastHovered=null,this.selectionChanged(),e.cancelable)e.preventDefault()};selectionChanged(){this.focus(),this.root.dispatchEvent(new CustomEvent("selectionchanged",{bubbles:!0}))}onBoundsChanged;focusTarget;focus(){this.focusTarget?.focus(),this.onBoundsChanged?.()}createBounds(){let e=document.createDocumentFragment(),t=document.createElement("span");t.className="sel-start";let n=document.createElement("span");return n.className="sel-end caret",e.appendChild(t),e.appendChild(n),e}normalizeBoundsOrder(){let e=this.find(".sel-start"),t=this.find(".sel-end");if(!e||!t||e===t)return;if(ht(e,t))return;e.className="sel-end caret",t.className="sel-start",this.onBoundsChanged?.()}find(e){return this.root.querySelector(e)}findAll(e){return Array.from(this.root.querySelectorAll(e))}markBounds(){let e=this.find(".sel-start"),t=this.find(".sel-end");if(e&&t)this.markRange(e,t);this.onBoundsChanged?.()}removeBounds(){for(let e of this.findAll(".sel-start, .sel-end"))e.remove();this.onBoundsChanged?.()}resetBounds(){let e=this.findAll(".selected");if(e.length===0)return this;this.removeBounds();let t=document.createElement("span");t.className="sel-start";let n=document.createElement("span");n.className="sel-end caret";let i=e[0],o=e[e.length-1],s=Xe(i),r=Ye(o);return s.parentNode?.insertBefore(t,s),r.parentNode?.insertBefore(n,r.nextSibling),this.onBoundsChanged?.(),this}extendSelection(){let e=this.find(".sel-start"),t=this.find(".sel-end");if(!e||!t)return;let n=e,i=t;switch(this.selecting){case 1:break;case 2:if(n.closest(".spanified-word"))n=n.closest(".spanified-word");if(i.closest(".spanified-word"))i=i.closest(".spanified-word");break;default:n=this.topLevelAncestor(n)||n,i=this.topLevelAncestor(i)||i;break}this.markRange(n,i),this.onBoundsChanged?.()}topLevelAncestor(e){let t=e;while(t&&t.parentNode!==this.root)t=t.parentNode;return t instanceof Element?t:null}unmark(){for(let e of this.findAll(".selected"))if(e.classList.remove("selected"),e.removeAttribute("draggable"),e.removeAttribute("data-drag"),e instanceof HTMLElement&&e.classList.length===0&&e.getAttribute("class")!==null)e.removeAttribute("class");for(let e of this.findAll("span"))if(e.attributes.length===0){let t=e.parentNode;if(t){while(e.firstChild)t.insertBefore(e.firstChild,e);t.removeChild(e)}}for(let e of this.findAll(".selected-block"))e.classList.remove("selected-block");for(let e of this.findAll(".first-block"))e.classList.remove("first-block");for(let e of this.findAll(".last-block"))e.classList.remove("last-block")}isBlock(e){return e.parentNode===this.root}markRange(e,t){if(!e)return;if(!t)t=e;if(!ht(e,t)&&e!==t){let d=t;t=e,e=d}this.unmark();let n=this.isBlock(e)?e:this.topLevelAncestor(e),i=this.isBlock(t)?t:this.topLevelAncestor(t);if(!n||!i)return;n.classList.add("first-block"),i.classList.add("last-block");let o=[n];if(n!==i){let d=n.nextElementSibling;while(d&&d!==i)o.push(d),d=d.nextElementSibling;o.push(i)}for(let d of o)d.classList.add("selected-block");for(let d of Array.from(this.root.children))if(!d.classList.contains("selected-block"))k(d,!1);let s=e.classList.contains("sel-start")||e.classList.contains("sel-end")?V(e,this.root):Xe(e),r=t.classList.contains("sel-start")||t.classList.contains("sel-end")?F(t,this.root):Ye(t);if(!s||!r)return;let l=[];for(let d of o)l.push(...ze(d));let a=l.indexOf(s),c=l.indexOf(r);if(a<0||c<0)return;for(let d=a;d<=c;d++)this.markNode(l[d])}static DRAG_TYPES="text/html;text/plain";makeDraggable(e){e.setAttribute("draggable","true"),e.setAttribute("data-drag",Je.DRAG_TYPES)}markNode(e){if(e.nodeType===3){let t=e.parentNode;if(t&&t.childNodes.length===1)t.classList.add("selected"),this.makeDraggable(t);else if(t){let n=document.createElement("span");n.className="selected",t.insertBefore(n,e),n.appendChild(e),this.makeDraggable(n)}}else if(e instanceof Element){if(!e.classList.contains("sel-start")&&!e.classList.contains("sel-end"))e.classList.add("selected"),this.makeDraggable(e)}}despanify(){for(let e of Array.from(this.root.children))if(!e.classList.contains("selected-block"))k(e,!1);this.lastHovered=null}normalize(){let e=this.root;for(let t=e.childNodes.length-1;t>=0;t--){let n=e.childNodes[t];if(n.nodeType===3&&/^\s*$/.test(n.textContent||""))e.removeChild(n)}for(let t of Array.from(e.querySelectorAll(".editor-table")))for(let n=t.childNodes.length-1;n>=0;n--){let i=t.childNodes[n];if(i.nodeType===3)t.removeChild(i)}return e.normalize(),this}}function _t(e){return e instanceof Element&&e.tagName==="LI"}function vs(e){return e instanceof Element&&e.tagName==="UL"}function bs(e){return Z(e)!==null}function Z(e){let t=e;while(t){if(_t(t)&&t.parentElement?.classList.contains("editor-table"))return t;t=t.parentNode}return null}function W(e){let t=e;while(t){if(vs(t)&&t.classList.contains("editor-table"))return t;t=t.parentNode}return null}function D(e){let t=e.style.gridTemplateColumns.trim();if(!t)return 1;return t.split(/\s+/).length}function gt(e){let t=e.style.gridTemplateColumns.trim();if(!t)return["1fr"];return t.split(/\s+/)}function Oe(e,t){e.style.gridTemplateColumns=t.join(" ")}function Ze(e){let t=e.parentElement;if(!t)return-1;return Array.from(t.querySelectorAll(":scope > li")).indexOf(e)}function te(e,t){return Math.floor(Ze(e)/t)}function De(e,t){return Ze(e)%t}function mt(e){let t=e.parentElement;if(!t)return null;let n=D(t),o=Ze(e)+n,s=Array.from(t.querySelectorAll(":scope > li"));return o<s.length?s[o]:null}function yt(e){let t=e.parentElement;if(!t)return null;let n=D(t),o=Ze(e)-n;if(o<0)return null;return Array.from(t.querySelectorAll(":scope > li"))[o]}function vt(e){let t=e.nextElementSibling;return t&&_t(t)?t:null}function Pt(e){let t=e.previousElementSibling;return t&&_t(t)?t:null}function Qe(e){return e.classList.contains("table-header")}function ne(e=!1){let t=document.createElement("li");if(e)t.classList.add("table-header");return t.innerHTML=" ",t}function K(e,t,n){let i=Array.from(e.querySelectorAll(":scope > li")),o=t*n;return i.slice(o,o+n)}function Vt(e,t,n){let i=Array.from(e.querySelectorAll(":scope > li")),o=[];for(let s=t;s<i.length;s+=n)o.push(i[s]);return o}function bt(e){let t=e.querySelectorAll(":scope > li"),n=D(e);return Math.ceil(t.length/n)}function Ft(e,t=2,n=1){let i=document.createElement("ul");i.className="editor-table",i.style.gridTemplateColumns=Array(e).fill("1fr").join(" ");for(let o=0;o<t;o++){let s=o<n;for(let r=0;r<e;r++)i.appendChild(ne(s))}return i}function Ut(e){if(e.length%2!==0)return console.error("Error: expected even number of arguments",e),null;let t={};for(let n=0;n<e.length;n+=2)t[e[n]]=e[n+1].replace(/\+/g," ");return t}function qt(e,t){for(let[n,i]of Object.entries(t))e.style.setProperty(n,i)}function et(e){return(e.tagName==="UL"||e.tagName==="OL")&&!e.classList.contains("editor-table")}function xs(e){let t=e.parentNode;if(!t)return;for(let n of Array.from(e.children)){let i=document.createElement("p");while(n.firstChild)i.appendChild(n.firstChild);i.classList.add("selected-block"),t.insertBefore(i,e)}e.remove()}function ws(e){let t=e,n=t.previousElementSibling;if(n&&et(n)&&n.tagName===t.tagName){while(t.firstChild)n.appendChild(t.firstChild);n.classList.add("selected-block"),t.remove(),t=n}let i=t.nextElementSibling;if(i&&et(i)&&i.tagName===t.tagName){while(i.firstChild)t.appendChild(i.firstChild);i.remove()}return t}function Yn(e,t){if(!t||t==="_self"){e.removeAttribute("target"),e.removeAttribute("rel");return}e.setAttribute("target",t),e.setAttribute("rel","noopener")}var Gn=0;function Cs(){return Gn+=1,`fn-${Date.now().toString(36)}-${Gn}`}function Wt(e){let t=Array.from(e.querySelectorAll(".footnote-ref[data-footnote]")).filter((o)=>!o.closest(".footnotes")),n=e.querySelector("ol.footnotes");if(t.length===0){n?.remove();return}if(!n)n=document.createElement("ol"),n.className="footnotes",e.appendChild(n);let i=new Map;for(let o of Array.from(n.children)){let s=o.getAttribute("data-footnote");if(s)i.set(s,o)}t.forEach((o,s)=>{let r=o.getAttribute("data-footnote"),l=o.querySelector("a");if(l)l.textContent=String(s+1),l.setAttribute("href",`#${r}`);let a=i.get(r);if(!a)a=document.createElement("li"),a.className="footnote",a.setAttribute("data-footnote",r),a.textContent="Footnote text";a.id=r,i.delete(r),n.appendChild(a)});for(let o of i.values())o.remove()}var tt={setText(e,...t){let n=Ut(t);if(!n)return;e.selectable.resetBounds(),k(e.root,!1),e.selectable.markBounds(),e.normalize();let i=e.selectedLeafNodes();e.selectable.removeBounds();for(let o of i)if(o.nodeType===3){let s=ft(o,".setText");if(s&&s instanceof HTMLElement)qt(s,n);else{let r=document.createElement("span");r.className="setText",qt(r,n),o.parentNode?.insertBefore(r,o),r.appendChild(o)}}e.selectable.resetBounds(),e.focus(),e.updateUndo("new")},setBlockType(e,t){let n=e.selectedBlocks();for(let i of n){let o=document.createElement(t);while(i.firstChild)o.appendChild(i.firstChild);o.classList.add("selected-block"),i.parentNode?.replaceChild(o,i)}e.updateUndo("new")},setList(e,t="ul"){let n=t.toLowerCase(),i=e.selectedBlocks().filter((r)=>!r.classList.contains("editor-table"));if(i.length===0)return;let o=i.every(et)&&i.every((r)=>r.tagName.toLowerCase()===n);if(n==="none"||o){for(let r of i)if(et(r))xs(r);e.updateUndo("new");return}let s=[];for(let r of i){let l=s[s.length-1];if(l&&l[l.length-1].nextElementSibling===r)l.push(r);else s.push([r])}for(let r of s){let l=document.createElement(n);l.classList.add("selected-block");for(let a of r)if(et(a))while(a.firstChild)l.appendChild(a.firstChild);else{let c=document.createElement("li");while(a.firstChild)c.appendChild(a.firstChild);l.appendChild(c)}r[0].parentNode?.insertBefore(l,r[0]);for(let a of r)a.remove();ws(l)}e.updateUndo("new")},setLink(e,t,n="_blank"){if(!t)return;if(!Ge(t)){console.error("setLink: refusing unsafe URL scheme",t);return}e.selectable.resetBounds(),k(e.root,!1),e.selectable.markBounds(),e.normalize();let i=e.selectedLeafNodes();e.selectable.removeBounds();for(let o of i){if(o.nodeType!==3)continue;let s=ft(o,"a");if(s instanceof Element)s.setAttribute("href",t),Yn(s,n);else{let r=document.createElement("a");r.setAttribute("href",t),Yn(r,n),o.parentNode?.insertBefore(r,o),r.appendChild(o)}}e.selectable.resetBounds(),e.focus(),e.updateUndo("new")},removeLink(e){e.selectable.resetBounds(),k(e.root,!1),e.selectable.markBounds();let t=e.selectedLeafNodes();e.selectable.removeBounds();let n=new Set;for(let i of t){let o=i.parentElement?.closest("a")??(i instanceof Element?i.closest("a"):null);if(o&&e.root.contains(o))n.add(o)}for(let i of n){let o=i.parentNode;if(!o)continue;while(i.firstChild)o.insertBefore(i.firstChild,i);o.removeChild(i)}e.selectable.resetBounds(),e.focus(),e.updateUndo("new")},insertImage(e,t,...n){let i=e.insertionPoint();if(!i||!t)return;let o=document.createElement("img");o.setAttribute("src",t),o.setAttribute("alt",n.join(" ")),i.before(o),e.normalize(),e.focus(),e.updateUndo("new")},insertFootnote(e,...t){let n=e.insertionPoint();if(!n)return;let i=Cs(),o=document.createElement("sup");o.className="footnote-ref",o.setAttribute("data-footnote",i);let s=document.createElement("a");s.setAttribute("href",`#${i}`),s.textContent="?",o.appendChild(s),n.before(o);let r=e.root.querySelector("ol.footnotes");if(!r)r=document.createElement("ol"),r.className="footnotes",e.root.appendChild(r);let l=document.createElement("li");l.className="footnote",l.setAttribute("data-footnote",i),l.id=i,l.textContent=t.length?t.join(" "):"Footnote text",r.appendChild(l),Wt(e.root),e.normalize(),e.focus(),e.updateUndo("new")},renumberFootnotes(e){Wt(e.root),e.updateUndo("new")},setBlocks(e,...t){let n=Ut(t);if(!n)return;for(let i of e.selectedBlocks())qt(i,n);e.updateUndo("new")},updateUndo(e,t){e.updateUndo(t)},setDebug(e){e.root.classList.toggle("debug")},annotate(e,t){let n=e.insertionPoint();if(!n)return;let i=document.querySelector(`.annotation-template .${t}`);if(!i)return;let o=document.createElement("span");o.className="annotation do-not-spanify not-selectable not-editable";let s=i.cloneNode(!0);s.classList.add("annotation-body"),o.appendChild(s),n.after(o),e.updateUndo("new")},insertTable(e,...t){let n=parseInt(t[0])||3,i=parseInt(t[1])||2,o=parseInt(t[2])||1,s=e.insertionPoint();if(!s)return;let r=e.block(s),l=Ft(n,i,o);if(r)r.after(l);else e.root.appendChild(l);let a=l.querySelector("li");if(a)a.innerHTML="",a.appendChild(e.selectable.createBounds()),e.selectable.normalize(),e.focus();e.updateUndo("new")},insertTableRow(e,t="after"){let n=e.insertionPoint();if(!n)return;let i=Z(n);if(!i)return;let o=W(i);if(!o)return;let s=D(o),r=te(i,s),l=t==="before"&&r===0&&Qe(i),a=K(o,r,s),c=t==="before"?a[0]:a[a.length-1];for(let d=0;d<s;d++){let u=ne(l);if(t==="before")c.before(u);else c.after(u)}e.updateUndo("new")},insertTableCol(e,t="after"){let n=e.insertionPoint();if(!n)return;let i=Z(n);if(!i)return;let o=W(i);if(!o)return;let s=D(o),r=De(i,s),l=bt(o);for(let d=l-1;d>=0;d--){let h=K(o,d,s)[r],f=Qe(h),p=ne(f);if(t==="before")h.before(p);else h.after(p)}let a=gt(o),c=t==="before"?r:r+1;a.splice(c,0,"1fr"),Oe(o,a),e.updateUndo("new")},deleteTableRow(e){let t=e.insertionPoint();if(!t)return;let n=Z(t);if(!n)return;let i=W(n);if(!i)return;let o=D(i);if(bt(i)<=1)return;let r=te(n,o),l=K(i,r,o),a=r>0?r-1:1,c=K(i,a,o);if(c.length>0)c[0].appendChild(e.selectable.createBounds()),e.selectable.normalize(),e.focus();for(let d of l)d.remove();e.updateUndo("new")},deleteTableCol(e){let t=e.insertionPoint();if(!t)return;let n=Z(t);if(!n)return;let i=W(n);if(!i)return;let o=D(i);if(o<=1)return;let s=De(n,o),r=te(n,o),l=s>0?s-1:1,a=K(i,r,o);if(a[l])a[l].appendChild(e.selectable.createBounds()),e.selectable.normalize(),e.focus();let c=Vt(i,s,o);for(let u=c.length-1;u>=0;u--)c[u].remove();let d=gt(i);d.splice(s,1),Oe(i,d),e.updateUndo("new")},toggleHeaderRow(e){let t=e.insertionPoint();if(!t)return;let n=Z(t);if(!n)return;let i=W(n);if(!i)return;let o=D(i),s=te(n,o),r=K(i,s,o),l=!Qe(r[0]);for(let a of r)a.classList.toggle("table-header",l);e.updateUndo("new")}};function Kt(e,t,...n){let o=(e.commands??tt)[t];if(o)o(e,...n);else console.error("unrecognized command",t)}function Xt(e,t){let n=e.commands??tt,i=t.split(/;\s*/);for(let o of i){let s=o.trim().split(/\s+/),r=s.shift();if(!r)continue;let l=n[r];if(l)l(e,...s);else console.error("unrecognized command",r)}}var Ee={debug:!1,perf:!1,quiet:!1};function se(e,t){if(e==null||typeof e!=="object")return e;if(e instanceof Date)return new Date(e.getTime());if(t===void 0)t=new WeakMap;else if(t.has(e))return t.get(e);if(e instanceof Set){let i=new Set;t.set(e,i);for(let o of e)i.add(se(o,t));return i}if(e instanceof Map){let i=new Map;t.set(e,i);for(let[o,s]of e)i.set(se(o,t),se(s,t));return i}if(Array.isArray(e)){let i=[];t.set(e,i);for(let o of e)i.push(se(o,t));return i}let n={};t.set(e,n);for(let i in e)n[i]=se(e[i],t);return n}var le={},nn=null,ks=(e)=>{nn=e},mn=()=>{if(nn===null)throw Error("xin proxy not initialized");return nn},on=null,sn=null,Ms=(e,t)=>{on=e,sn=t},Es=()=>{if(on===null)throw Error("bind not initialized");return on},As=()=>{if(sn===null)throw Error("on not initialized");return sn},me="-tosi-data",rn=`.${me}`,Y=Symbol.for("xin-path"),Ae=Symbol.for("xin-value"),Ss="xinObserve",Ls="xinBind",Ts="xinOn",Bs=Symbol.for("tosi-accessor"),yn=Symbol.for("tosi-take"),Mt=Symbol("list-binding"),Re=Symbol("list-instance"),ln=new Map;function $s(e,t){let n=ln.get(e);if(n===void 0)n=new Set,ln.set(e,n);n.add(t)}function Ns(e){return ln.get(e)}var Jn=new Set;function re(e,t){if(!Jn.has(e)){if(Jn.add(e),Ee.quiet!==!0)console.warn(t)}}function Tt(e,t){let n=!1;return(...i)=>{if(!n)console.warn(t),n=!0;return e(...i)}}var ae=(e)=>e&&e[Y]||void 0;function B(e){if(typeof e==="object"&&e!==null){let t=e[Ae];return t!==void 0?t:e}return e}var na=Tt(ae,"xinPath is deprecated. Use tosiPath instead."),ia=Tt(B,"xinValue is deprecated. Use tosiValue instead."),Li=(e,t)=>{let{take:n}=e;if(n==null)return;n.paths=n.paths.map((i)=>i.startsWith("^")?`${t}${i.substring(1)}`:i)},Ti=(e,t,n)=>{let{binding:i,options:o,take:s}=t,{toDOM:r}=i;if(r==null)return;let l=mn();if(s==null){r(e,l[n],o);return}let a=s.paths.map((d)=>l[d]),c=s.lastInputs;if(c!=null&&a.every((d,u)=>d===c[u]))return;s.lastInputs=a,r(e,s.transform(...a),o)},_e=new WeakMap,ce=new WeakMap,Et=new WeakMap,zs=0;var Os=0,vn=()=>{Os++},Ds=(e,t)=>{if(!Et.has(e))zs++;Et.set(e,t)};var ot=(e)=>{let t=e.cloneNode();if(t instanceof Element){let i=ce.get(e),o=_e.get(e);if(i!=null)ce.set(t,i.map((r)=>({...r,options:r.options!=null?{...r.options}:void 0,take:r.take!=null?{...r.take,paths:[...r.take.paths]}:void 0})));if(o!=null)_e.set(t,se(o));let s=Et.get(e);if(s!=null)Et.set(t,s)}let n=t instanceof HTMLTemplateElement?t.content:t;for(let i of Array.from(e instanceof HTMLTemplateElement?e.content.childNodes:e.childNodes))if(i instanceof Element||i instanceof DocumentFragment)n.appendChild(ot(i));else n.appendChild(i.cloneNode());return t},Hs=(e)=>{try{return JSON.stringify(e)}catch(t){return"{has circular references}"}},Bi=(...e)=>Error(e.map(Hs).join(" ")),js=()=>new Date(parseInt("1000000000",36)+Date.now()).valueOf().toString(36).slice(1),Is=0,Rs=()=>(parseInt("10000",36)+ ++Is).toString(36).slice(-5),_s=()=>js()+Rs(),an=Symbol("delete"),$i=Symbol("new-object"),Yt=Symbol("automatic-index");function Ni(e){if(e==="")return[];if(Array.isArray(e))return e;else{let t=[];while(e.length>0){let n=e.search(/\[[^\]]+\]/);if(n===-1){t.push(e.split("."));break}else{let i=e.slice(0,n);if(e=e.slice(n),i!=="")t.push(i.split("."));if(n=e.indexOf("]")+1,t.push(e.slice(1,n-1)),e.slice(n,n+1)===".")n+=1;e=e.slice(n)}}return t}}var Me=new WeakMap;function zi(e,t){if(Me.get(e)===void 0)Me.set(e,{});let n={};if(Me.get(e)[t]=n,t==="_auto_")e.forEach((i,o)=>{if(i[Yt]===void 0)i[Yt]=_s();n[i[Yt]+""]=o});else e.forEach((i,o)=>{n[U(i,t)+""]=o});return n}function Ps(e,t){if(Me.get(e)===void 0||Me.get(e)[t]===void 0)return zi(e,t);else return Me.get(e)[t]}function Vs(e,t,n){n=n+"";let i=Ps(e,t)[n];if(i===void 0||U(e[i],t)+""!==n)i=zi(e,t)[n];return i}var Fs=new Set(["__proto__","constructor","prototype"]);class bn extends Error{constructor(e){super(`unsafe path segment "${e}": it would escape the object graph into the prototype chain`);this.name="UnsafePathError"}}function qs(e){if(Fs.has(e))throw new bn(e)}function Us(e){if(e==="__proto__")throw new bn(e)}function Ws(e,t,n){if(qs(t),(!Object.prototype.hasOwnProperty.call(e,t)||e[t]===void 0)&&n!==void 0)e[t]=n;return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function Oi(e,t,n,i){let o=t!==""?Vs(e,t,n):n;if(i===an){if(o!==void 0)e.splice(o,1),Me.delete(e);return Symbol("deleted")}else if(i===$i){if(t===""&&e[o]===void 0)e[o]={}}else if(i!==void 0)if(o!==void 0)e[o]=i;else if(t!==""&&U(i,t)+""===n+"")e.push(i),o=e.length-1;else throw Error(`byIdPath insert failed at [${t}=${n}]`);return e[o]}function Zn(e){if(!Array.isArray(e))throw Bi("setByPath failed: expected array, found",e)}function Qn(e){if(e==null||!(e instanceof Object))throw Bi("setByPath failed: expected Object, found",e)}function U(e,t){let n=Ni(t),i=e,o,s,r,l;for(o=0,s=n.length;i!==void 0&&o<s;o++){let a=n[o];if(Array.isArray(a))for(r=0,l=a.length;i!==void 0&&r<l;r++){let c=a[r];i=i[c]}else if(i.length===0){if(i=i[Number(a.slice(1))],a[0]!=="=")return}else if(a.includes("=")){let[c,...d]=a.split("=");i=Oi(i,c,d.join("="))}else r=parseInt(a,10),i=i[r]}return i}function Di(e,t,n){let i=e;if(t==="")throw Error("setByPath cannot be used to set the root object");let o=Ni(t);while(i!=null&&o.length>0){let s=o.shift();if(typeof s==="string"){let r=s.indexOf("=");if(r>-1){if(r===0)Qn(i);else Zn(i);let l=s.slice(0,r),a=s.slice(r+1);if(i=Oi(i,l,a,o.length>0?$i:n),o.length===0)return!0}else{Zn(i);let l=parseInt(s,10);if(o.length>0)i=i[l];else{if(n!==an){if(i[l]===n)return!1;i[l]=n}else i.splice(l,1);return!0}}}else if(Array.isArray(s)&&s.length>0){Qn(i);while(s.length>0){let r=s.shift();if(s.length>0||o.length>0){if(i=Ws(i,r,s.length>0?{}:[]),i==null)throw Error(`setByPath failed at "${r}" in "${t}": not a container`)}else{if(Us(r),n!==an){if(i[r]===n)return!1;i[r]=n}else{if(!Object.prototype.hasOwnProperty.call(i,r))return!1;delete i[r]}return!0}}}else throw Error(`setByPath failed, bad path ${t}`)}throw Error(`setByPath(${e}, ${t}, ${n}) failed`)}var ei=Symbol("observer should be removed"),At=[],je=[],cn=!1,Ks,dn;function Xs(e,t,n,i){let o=Ns(e);if(o===void 0)return[];let s=[];for(let r of o){let l=U(n,r);if(l!==void 0)s.push(`${e}[${r}=${l}]${i}`)}return s}var st=(e,t)=>{if(!t.startsWith(e))return!1;if(t.length===e.length)return!0;let n=t.charAt(e.length);return n==="."||n==="["};class Hi{description;test;callback;constructor(e,t){let n=typeof t==="string"?`"${t}"`:`function ${t.name}`,i;if(typeof e==="string")this.test=(o)=>typeof o==="string"&&o!==""&&(st(o,e)||st(e,o)),i=`test = "${e}"`;else if(e instanceof RegExp)this.test=e.test.bind(e),i=`test = "${e.toString()}"`;else if(e instanceof Function)this.test=e,i=`test = function ${e.name}`;else throw Error("expect listener test to be a string, RegExp, or test function");if(this.description=`${i}, ${n}`,typeof t==="function")this.callback=t;else throw Error("expect callback to be a path or function");At.push(this)}}var Ys=()=>{if(Ee.perf)console.time("xin async update");let e=Array.from(je);je.length=0,cn=!1;let t=dn;dn=void 0;try{for(let n of e)At.filter((i)=>{let o;try{o=i.test(n)}catch(s){return console.error(`Listener ${i.description} threw "${s}" at "${n}"`),!1}if(o===ei)return un(i),!1;return o}).forEach((i)=>{let o;try{o=i.callback(n)}catch(s){console.error(`Listener ${i.description} threw "${s}" handling "${n}"`)}if(o===ei)un(i)})}finally{if(typeof t==="function")t();if(Ee.perf)console.timeEnd("xin async update")}},Pe=(e)=>{let t=typeof e==="string"?e:ae(e);if(t===void 0)throw console.error("touch was called on an invalid target",e),Error("touch was called on an invalid target");if(cn===!1)Ks=new Promise((i)=>{dn=i}),cn=setTimeout(Ys);if(je.find((i)=>st(i,t))==null)je.push(t);let n=t.match(/^(.+)\[(\d+)\](.*)$/);if(n!==null){let[,i,o,s]=n,r=parseInt(o,10),l=U(le,`${i}[${r}]`);if(l!=null){let a=Xs(i,r,l,s);for(let c of a)if(je.find((d)=>st(d,c))==null)je.push(c)}}},xn=(e,t)=>new Hi(e,t),un=(e)=>{let t=At.indexOf(e);if(t>-1)At.splice(t,1);else throw Error("unobserve failed, listener not found")},ji=(e,t,{bubbles:n=!1,composed:i=!1}={})=>{let o=new Event(t,{bubbles:n,composed:i});e.dispatchEvent(o)},Ii=(e)=>{if(e instanceof HTMLInputElement)return e.type;else if(e instanceof HTMLSelectElement&&e.hasAttribute("multiple"))return"multi-select";else return"other"},q=(e,t=2)=>String(e).padStart(t,"0"),Gs=(e,t)=>{switch(e){case"date":return`${t.getUTCFullYear()}-${q(t.getUTCMonth()+1)}-${q(t.getUTCDate())}`;case"month":return`${t.getUTCFullYear()}-${q(t.getUTCMonth()+1)}`;case"datetime-local":return`${t.getFullYear()}-${q(t.getMonth()+1)}-${q(t.getDate())}T${q(t.getHours())}:${q(t.getMinutes())}`;default:return t.toISOString()}},Js=(e)=>{let t=Math.floor(e/1000),n=`${q(Math.floor(t/3600))}:${q(Math.floor(t/60)%60)}`;return t%60===0?n:`${n}:${q(t%60)}`},Zs=(e)=>{let t=e.match(/^(\d\d):(\d\d)(?::(\d\d)(?:\.(\d+))?)?$/);if(t==null)return NaN;let[,n,i,o,s]=t;return(Number(n)*60+Number(i))*60000+Number(o??0)*1000+Number(s??0)},hn=0,Qs=()=>hn>0,er=(e,t)=>{hn++;try{tr(e,t)}finally{hn--}},tr=(e,t)=>{let n=Ii(e);switch(n){case"radio":e.checked=t!=null&&e.value===String(t);break;case"checkbox":e.checked=!!t;break;case"date":case"datetime-local":case"month":case"week":{let i=e;if(t==null||t==="")i.value="";else if(t instanceof Date||typeof t==="number"){let o=t instanceof Date?t:new Date(t);if(n==="week")try{i.valueAsDate=o}catch(s){}else i.value=Gs(n,o)}else i.value=String(t);break}case"time":{let i=e;if(t==null||t==="")i.value="";else if(typeof t==="number")i.value=Js(t);else if(t instanceof Date)i.value=`${q(t.getHours())}:${q(t.getMinutes())}:${q(t.getSeconds())}`;else i.value=String(t);break}case"multi-select":for(let i of Array.from(e.querySelectorAll("option")))i.selected=Array.isArray(t)?t.map(String).includes(i.value):t!=null?!!t[i.value]:!1;break;default:e.value=t==null?"":t}},nr=(e)=>{switch(Ii(e)){case"radio":{let t=e.parentElement?.querySelector(`[name="${e.name}"]:checked`);return t!=null?t.value:null}case"checkbox":return e.checked;case"number":case"range":{let t=e,n=typeof t.valueAsNumber==="number"?t.valueAsNumber:Number(t.value);return Number.isNaN(n)?t.value:n}case"date":case"datetime-local":case"month":case"week":{let t=e,n=t.valueAsDate??(t.value!==""?new Date(t.value):null);return n!=null&&!Number.isNaN(n.getTime())?n:t.value}case"time":{let t=e,n=typeof t.valueAsNumber==="number"?t.valueAsNumber:NaN;if(Number.isNaN(n))n=Zs(t.value);return Number.isNaN(n)?t.value:n}case"multi-select":return Array.from(e.querySelectorAll("option")).reduce((t,n)=>(t[n.value]=n.selected,t),{});default:return e.value}},{ResizeObserver:ti}=globalThis,fn=ti!=null?new ti((e)=>{for(let t of e){let n=t.target;ji(n,"resize")}}):{observe(){},unobserve(){}},ni=(e,t,n=!0)=>{if(e!=null&&t!=null)if(typeof t==="string")e.textContent=t;else if(Array.isArray(t))t.forEach((i)=>{e.append(i instanceof Node&&n?ot(i):i)});else if(t instanceof Node)e.append(n?ot(t):t);else throw Error("expect text content or document node")};var St=(e,t=250)=>{let n,i=Date.now()-t;return function(...o){clearTimeout(n);let s=Date.now()-i;if(s>=t)i=Date.now(),e.apply(this,o);else n=setTimeout(()=>{i=Date.now(),e.apply(this,o)},t-s)}},ir=16,or=100;function ii(e,t){let n=Array.from(e.getElementsByClassName(me));if(e.classList.contains(me))n.unshift(e);for(let i of n){let o=ce.get(i);for(let s of o){if(s.path.startsWith("^"))s.path=`${t}${s.path.substring(1)}`;Li(s,t),Ti(i,s,s.path)}}}var oi=!1;class Ri{boundElement;listTop;listBottom;isNamespaced;templates;options;itemToElement;idToElement=new Map;array=[];_filteredCache;_update;_previousSlice;static filterBoundObservers=new WeakMap;constructor(e,t,n={}){if(this.boundElement=e,this.itemToElement=new WeakMap,n.idPath!=null){let l=ae(t);if(l!=null)$s(l,n.idPath)}let i=n.virtual?.itemsPerRow??1,o=Array.from(e.children).find((l)=>l instanceof HTMLTemplateElement),s=null;if(o!=null){let l=i;if(o.content.children.length<1||o.content.children.length!==l)throw Error(`ListBinding expects a template with exactly ${l} child element(s)`);this.templates=Array.from(o.content.children).map((a)=>ot(a)),s=o.nextElementSibling,o.remove()}else if(e.children.length===1)this.templates=[e.children[0]],this.templates[0].remove();else throw Error("ListBinding expects a <template> child or exactly one child element");this.options=n;let r=e.namespaceURI;if(this.isNamespaced=r==="http://www.w3.org/2000/svg"||r==="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"),s!=null)this.boundElement.insertBefore(this.listTop,s),this.boundElement.insertBefore(this.listBottom,s);else this.boundElement.append(this.listTop),this.boundElement.append(this.listBottom);if(i>1){this.boundElement.classList.add("tosi-virtual-grid");let l=this.boundElement.style;if(l!=null)l.setProperty("--tosi-columns",String(i)),l.display=l.display||"grid",l.gridTemplateColumns=l.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(n.virtual!=null&&!this.boundElement.getAttribute("role"))this.boundElement.setAttribute("role",i>1?"grid":"list");if(this.boundElement[Mt]=this,this.isNamespaced&&n.virtual!=null)console.warn("ListBinding: virtual scrolling is not supported in SVG/MathML containers, ignoring virtual option");if(!this.isNamespaced&&n.virtual!=null)if(fn.observe(this.boundElement),this._update=St(()=>{this.update(this.array,!0)},ir),this.boundElement.addEventListener("resize",this._update),n.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:e,visibleProp:t}=this.options,n=this.array;if(e!==void 0)n=n.filter((i)=>i[e]!==!0);if(t!==void 0)n=n.filter((i)=>i[t]===!0);if(this.options.filter&&this.needle!==void 0)n=this.options.filter(n,this.needle);return this._filteredCache=n,n}visibleSlice(){let{virtual:e}=this.options,t=this.filteredArray(),n=0,i=t.length-1,o=0,s=0;if(e!=null&&this.boundElement instanceof HTMLElement){let r=this.boundElement.offsetWidth,l=e.scrollContainer==="window",a,c;if(l){a=window.innerHeight;let h=this.boundElement.getBoundingClientRect();c=Math.max(0,-h.top)}else a=this.boundElement.offsetHeight,c=this.boundElement.scrollTop;let d=e.width!=null?Math.max(1,Math.floor(r/e.width)):e.visibleColumns??1,u=Math.ceil(t.length/d);if(e.minHeight!=null){let h=e.minHeight,f=Math.ceil(a/h)+(e.rowChunkSize||1),p=d*f,b=u*h,m=Math.max(0,b-a),z=m>0?Math.min(1,Math.max(0,c/m)):0,I=Math.max(0,u-f+1),we=z*I,G=Math.floor(we);if(e.rowChunkSize)G-=G%e.rowChunkSize;return n=G*d,i=n+p-1,o=c,s=Math.max(0,b-c-a),{items:t,firstItem:n,lastItem:i,topBuffer:o,bottomBuffer:s,interpolation:{t:z,position:we,scrollTop:c,viewportHeight:a,totalScrollHeight:b,rowHeight:e.height}}}else{let h=Math.ceil(a/e.height)+(e.rowChunkSize||1),f=d*h,p=Math.floor(c/e.height);if(p>u-h+1)p=Math.max(0,u-h+1);if(e.rowChunkSize)p-=p%e.rowChunkSize;n=p*d,i=n+f-1,o=p*e.height,s=Math.max((u-h)*e.height-o,0)}}return{items:t,firstItem:n,lastItem:i,topBuffer:o,bottomBuffer:s}}needle;filter=St((e)=>{if(this.needle!==e)this.needle=e,this.update(this.array)},or);update(e,t){if(e==null)e=[];if(this.array=e,!t)this._filteredCache=void 0;let{hiddenProp:n,visibleProp:i}=this.options,o=ae(e),s=this.visibleSlice();if(this.boundElement.classList.toggle("-xin-empty-list",s.items.length===0),this.options.virtual!=null)this.boundElement.setAttribute("aria-rowcount",String(s.items.length));let r=this._previousSlice,{firstItem:l,lastItem:a,topBuffer:c,bottomBuffer:d}=s,u=n===void 0&&i===void 0&&t===!0&&r!=null&&l===r.firstItem&&a===r.lastItem;if(u&&s.interpolation==null&&c===r.topBuffer&&d===r.bottomBuffer)return;if(u&&s.interpolation!=null){this._updateInterpolatedBuffers(s);return}this._previousSlice=s;let h=0,f=0,p=0,{idPath:b}=this.options,m=this.options.virtual?.itemsPerRow??1,z;if(b!=null){z=new Set;for(let S=l;S<=a;S++){let A=s.items[S];if(A!==void 0)z.add(String(A[b]))}}let I=new Set;for(let S of Array.from(this.boundElement.children)){if(S===this.listTop||S===this.listBottom)continue;let A=S[Re];if(A==null)continue;else if(A===!0)S.remove(),h++;else{if(I.has(A))continue;let L;if(b!=null)L=!z.has(String(A[b]));else{let O=s.items.indexOf(A);L=O<l||O>a}if(L){I.add(A);let O=this.itemToElement.get(A);if(O!=null)for(let M of O)M.remove();else S.remove();if(this.itemToElement.delete(A),b!=null)this.idToElement.delete(String(A[b]));h++}}}if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(c)+"px",this.listBottom.style.height=String(d)+"px";let we=[],G=b!=null?new Set:null;for(let S=l;S<=a;S++){let A=s.items[S];if(A===void 0)continue;if(G!=null&&b!=null){let O=String(A[b]);if(G.has(O)){if(!oi)oi=!0,console.error(`tosijs list binding: duplicate idPath value "${O}" (idPath: "${b}"). `+"id-path values must be unique — items sharing an id collapse to a single "+"row and updates target the wrong item. Warned once per session.")}else G.add(O)}let L=this.itemToElement.get(B(A));if(L==null&&b!=null){let O=String(A[b]);if(L=this.idToElement.get(O),L!=null){let M=B(A);this.itemToElement.set(M,L);for(let Q of L)Q[Re]=M}}if(L==null){p++;let O=B(A);if(L=this.templates.map((M)=>ot(M)),typeof A==="object")this.itemToElement.set(O,L);for(let M of L)M[Re]=typeof A==="object"?O:!0;for(let M of L)if(this.listBottom!=null)this.boundElement.insertBefore(M,this.listBottom);else this.boundElement.append(M);if(b!=null){let M=A[b],Q=`${o}[${b}=${M}]`;for(let Qo of L)ii(Qo,Q);this.idToElement.set(String(M),L)}else{let M=`${o}[${S}]`;for(let Q of L)ii(Q,M)}}if(this.options.virtual!=null){let O=String(S+1);if(m>1)for(let M=0;M<L.length;M++){let Q=L[M];Q.setAttribute("role","gridcell"),Q.setAttribute("aria-rowindex",O),Q.setAttribute("aria-colindex",String(M+1))}else for(let M of L)M.setAttribute("role","listitem"),M.setAttribute("aria-rowindex",O)}we.push(...L)}let ut=this.listTop;for(let S of we){if(S.previousElementSibling!==ut)if(f++,ut?.nextElementSibling!=null)this.boundElement.insertBefore(S,ut.nextElementSibling);else if(this.listBottom!=null)this.boundElement.insertBefore(S,this.listBottom);else this.boundElement.append(S);ut=S}if(s.interpolation!=null)this._updateInterpolatedBuffers(s);if(Ee.perf)console.log(o,"updated",{removed:h,created:p,moved:f})}_updateInterpolatedBuffers(e){let{t,position:n,scrollTop:i,viewportHeight:o,totalScrollHeight:s,rowHeight:r}=e.interpolation,l=0;for(let u of Array.from(this.boundElement.children)){if(u===this.listTop||u===this.listBottom)continue;l+=u.offsetHeight||r}let a=i,c=i+o-l,d=Math.max(0,t*c+(1-t)*a-n%1*r);if(this.listTop!=null&&this.listBottom!=null)this.listTop.style.height=String(d)+"px",this.listBottom.style.height=String(Math.max(0,s-d-l))+"px"}}var sr=(e,t,n)=>{let i=e[Mt];if(t&&i===void 0)i=new Ri(e,t,n),e[Mt]=i;return i},rr=(e)=>{let t;while(!(t=e[Re])&&e&&e.parentElement)e=e.parentElement;return t?{element:e,item:t}:void 0},lr=(e)=>{let t=rr(e);return t?t.item:void 0};var{document:rt,MutationObserver:si}=globalThis,_i=(e,t)=>{let n=ce.get(e);if(n==null)return;for(let i of n){let{binding:o}=i,{path:s}=i,{toDOM:r}=o;if(r!=null){if(s.startsWith("^")){let l=lr(e);if(l!=null&&l[Y]!=null){let a=l[Y];s=i.path=`${a}${s.substring(1)}`,Li(i,a)}else{if(e instanceof HTMLElement)console.warn(`Unresolved relative binding "${s}" —`,e,"is not part of a list. If this is a list template, wrap it in a <template>.");continue}}if(t==null||st(t,s))Ti(e,i,s)}}},ri=new Set;function Pi(e,t,n){let i=`${e}:${t.tagName}:${n?.message??n}`;if(ri.has(i))return;ri.add(i),console.error(`tosijs: a binding threw while ${e} this element; the rest of the `+"pass continued. (Reported once per element type and message — fix the "+"binding, the transform, or the state it reads.)",t,n)}function ar(e){vn();let t=Array.from(e.getElementsByClassName(me));if(e.classList.contains(me))t.unshift(e);t.forEach((n)=>{try{_i(n)}catch(i){Pi("hydrating",n,i)}})}if(si!=null)new si((e)=>{e.forEach((t)=>{Array.from(t.addedNodes).forEach((n)=>{if(n instanceof Element)ar(n)})})}).observe(rt.body,{subtree:!0,childList:!0});xn(()=>!0,(e)=>{if(globalThis.document==null)return;let t=Array.from(rt.getElementsByClassName(me));for(let n of t)try{_i(n,e)}catch(i){Pi("updating",n,i)}});var Vi=(e)=>{let t=e.composed&&e.composedPath!=null?e.composedPath()[0]:e.target;return t instanceof Element?t:null},pn=(e,t)=>{while(e!=null){let n=e.closest(t);if(n!=null)return n;let i=e.getRootNode();e=typeof ShadowRoot<"u"&&i instanceof ShadowRoot?i.host:null}return null},cr=(e,t)=>{if(e.parentElement!=null)return pn(e.parentElement,t);let n=e.getRootNode();if(typeof ShadowRoot<"u"&&n instanceof ShadowRoot)return pn(n.host,t);return null},Fi=(e)=>{if(e.parentElement!=null)return e.parentElement;let t=e.getRootNode();return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t.host:null},li=(e)=>{while(e!=null&&!_e.has(e))e=Fi(e);return e},ai=(e)=>{let t=pn(Vi(e),rn);while(t!=null){let n=ce.get(t);for(let i of n??[]){let{binding:o,path:s}=i,{fromDOM:r}=o;if(r!=null){let l;try{l=r(t,i.options)}catch(a){throw console.error("Cannot get value from",t,"via",i),Error("Cannot obtain value fromDOM",{cause:a})}if(l!=null){let a=mn(),c=a[s];if(c==null)a[s]=l;else{let d=c[Y]!=null?c[Ae]:c,u=l[Y]!=null?l[Ae]:l;if(typeof d==="number"&&typeof u==="string"){let h=u.trim();if(h!==""){let f=Number(h);if(!Number.isNaN(f))u=f}}else if(u instanceof Date){if(typeof d==="number")u=u.getTime();else if(typeof d==="string")u=t.value}if(d instanceof Date&&u instanceof Date?d.getTime()!==u.getTime():d!==u)a[s]=u}}}}t=cr(t,rn)}};if(globalThis.document!=null)rt.body.addEventListener("change",ai,!0),rt.body.addEventListener("input",ai,!0);function dr(e,t,n,i){let{paths:o,transform:s}=t,{toDOM:r}=n;if(r==null)return e;e.classList?.add(me);let l=ce.get(e);if(l==null)l=[],ce.set(e,l),vn();let a={paths:[...o],transform:s};for(let c of a.paths)l.push({path:c,binding:n,options:i,take:a});if(!o[0].startsWith("^"))Pe(o[0]);return e}var ci=!1,ur=(e,t)=>{if(ci)return;if(typeof ShadowRoot<"u"&&e.getRootNode!=null&&e.getRootNode()instanceof ShadowRoot)ci=!0,console.warn(`tosijs: ${t} targets an element inside a shadow root, where data bindings do not operate (documented Component design boundary). A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into the shadow DOM. Warned once per session.`,e)};function pe(e,t,n,i){if(e instanceof DocumentFragment)throw Error("bind cannot bind to a DocumentFragment");if(ur(e,"bind()"),t!=null&&typeof t==="object"&&t[yn])return dr(e,t,n,i);let o;if(typeof t==="object"&&t[Y]===void 0&&i===void 0){let{value:l}=t;o=typeof l==="string"?l:l[Y],i={...t},delete i.value}else o=typeof t==="string"?t:t[Y];if(o==null)throw Error("bind requires a path or object with xin Proxy");let{toDOM:s}=n;e.classList?.add(me);let r=ce.get(e);if(r==null)r=[],ce.set(e,r),vn();if(r.push({path:o,binding:n,options:i}),s!=null&&!o.startsWith("^"))Pe(o);if(i?.filter&&i?.needle)pe(e,i.needle,{toDOM(l,a){l[Mt]?.filter(a)}});return e}var di=new Set,hr=(e)=>{let t=li(Vi(e)),n=!1,i=new Proxy(e,{get(s,r){if(r==="stopPropagation")return()=>{e.stopPropagation(),n=!0};else{let l=s[r];return typeof l==="function"?l.bind(s):l}}}),o=new Set;while(!n&&t!=null){let s=_e.get(t)?.[e.type]??o;for(let r of s){if(typeof r==="function")r(i);else{let l=mn()[r];if(typeof l==="function")l(i);else throw Error(`no event handler found at path ${r}`)}if(n)continue}t=li(Fi(t))}};function wn(e,t,n){let i=ae(n);if(i!=null)n=i;let o=_e.get(e);if(o==null)o={},_e.set(e,o);if(!o[t])o[t]=new Set;if(o[t].add(n),!di.has(t))di.add(t),rt.body.addEventListener(t,hr,!0);return()=>{o[t].delete(n)}}Ms(pe,wn);var Lt={value:{toDOM:er,fromDOM(e){return nr(e)}},text:{toDOM(e,t){e.textContent=t}},enabled:{toDOM(e,t){e.disabled=!t}},disabled:{toDOM(e,t){e.disabled=Boolean(t)}},list:{toDOM(e,t,n){sr(e,t,n).update(t)}}},oa=180/Math.PI,sa=Math.PI/180;function ie(e,t,n){return n<e?NaN:t<e?e:t>n?n:t}function Ce(e,t,n,i=!0){if(i)n=ie(0,n,1);return n*(t-e)+e}function fr(e,t=document.body){let n=getComputedStyle(t);if(e.endsWith(")")&&e.startsWith("var("))e=e.slice(4,-1);return n.getPropertyValue(e).trim()}var pr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},gr=(e,t,n)=>(0.299*e+0.587*t+0.114*n)/255,ke=(e)=>("00"+Math.round(Number(e)).toString(16)).slice(-2);class qi{h;s;l;constructor(e,t,n){e/=255,t/=255,n/=255;let i=Math.max(e,t,n),o=i-Math.min(e,t,n),s=o!==0?i===e?(t-n)/o:i===t?2+(n-e)/o:4+(e-t)/o:0;this.h=60*s<0?60*s+360:60*s,this.s=o!==0?i<=0.5?o/(2*i-o):o/(2-(2*i-o)):0,this.l=(2*i-o)/2}}var fe=globalThis.document!==void 0?globalThis.document.createElement("span"):void 0;if(fe)fe.style.display="none";class g{r;g;b;a;static fromVar(e,t=document.body){return g.fromCss(fr(e,t))}static fromCss(e){let t=pr[String(e).trim().toLowerCase()];if(t!==void 0)e=t;let n=e.match(/^#([0-9a-fA-F]+)$/);if(n){let c=n[1],d=(u,h)=>parseInt(c.slice(u,u+h),16);if(c.length===3||c.length===4){let u=(h)=>d(h,1)*17;return new g(u(0),u(1),u(2),c.length===4?u(3)/255:1)}if(c.length===6||c.length===8)return new g(d(0,2),d(2,2),d(4,2),c.length===8?d(6,2)/255:1)}let i=e;if(fe instanceof HTMLSpanElement)fe.style.color="black",fe.style.color=e,document.body.appendChild(fe),i=getComputedStyle(fe).color,fe.remove();let[o,s,r,l]=i.match(/[\d.]+/g)||["0","0","0","0"],a=i.startsWith("color(srgb")?255:1;return new g(Number(o)*a,Number(s)*a,Number(r)*a,l==null?1:Number(l))}static fromHsl(e,t,n,i=1){let o,s,r;if(t===0)o=s=r=n;else{let a=(h,f,p)=>{if(p<0)p+=1;if(p>1)p-=1;if(p<0.16666666666666666)return h+(f-h)*6*p;if(p<0.5)return f;if(p<0.6666666666666666)return h+(f-h)*(0.6666666666666666-p)*6;return h},c=n<0.5?n*(1+t):n+t-n*t,d=2*n-c,u=(e%360+360)%360/360;o=a(d,c,u+0.3333333333333333),s=a(d,c,u),r=a(d,c,u-0.3333333333333333)}let l=new g(o*255,s*255,r*255,i);return l.hslCached={h:(e%360+360)%360,s:t,l:n},l}static black=new g(0,0,0);static white=new g(255,255,255);constructor(e,t,n,i=1){this.r=ie(0,e,255),this.g=ie(0,t,255),this.b=ie(0,n,255),this.a=ie(0,i,1)}get inverse(){return new g(255-this.r,255-this.g,255-this.b,this.a)}get inverseLuminance(){let{h:e,s:t,l:n}=this._hsl;return g.fromHsl(e,t,1-n,this.a)}get opaque(){return this.a===1?this:new g(this.r,this.g,this.b,1)}contrasting(e=1){return this.opaque.blend(this.brightness>0.5?g.black:g.white,e)}get rgb(){let{r:e,g:t,b:n}=this;return`rgb(${e.toFixed(0)},${t.toFixed(0)},${n.toFixed(0)})`}get rgba(){let{r:e,g:t,b:n,a:i}=this;return`rgba(${e.toFixed(0)},${t.toFixed(0)},${n.toFixed(0)},${i.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 qi(this.r,this.g,this.b);return this.hslCached}get hsl(){let{h:e,s:t,l:n}=this._hsl;return`hsl(${e.toFixed(0)}deg ${(t*100).toFixed(0)}% ${(n*100).toFixed(0)}%)`}get hsla(){let{h:e,s:t,l:n}=this._hsl;return`hsl(${e.toFixed(0)}deg ${(t*100).toFixed(0)}% ${(n*100).toFixed(0)}% / ${(this.a*100).toFixed(0)}%)`}get mono(){let e=this.brightness*255;return new g(e,e,e)}get brightness(){return gr(this.r,this.g,this.b)}get html(){return this.toString()}toString(){return this.a===1?"#"+ke(this.r)+ke(this.g)+ke(this.b):"#"+ke(this.r)+ke(this.g)+ke(this.b)+ke(255*this.a)}brighten(e){let{h:t,s:n,l:i}=this._hsl,o=ie(0,i+e*(1-i),1);return g.fromHsl(t,n,o,this.a)}darken(e){let{h:t,s:n,l:i}=this._hsl,o=ie(0,i*(1-e),1);return g.fromHsl(t,n,o,this.a)}saturate(e){let{h:t,s:n,l:i}=this._hsl,o=ie(0,n+e*(1-n),1);return g.fromHsl(t,o,i,this.a)}desaturate(e){let{h:t,s:n,l:i}=this._hsl,o=ie(0,n*(1-e),1);return g.fromHsl(t,o,i,this.a)}rotate(e){let{h:t,s:n,l:i}=this._hsl,o=(t+360+e)%360;return g.fromHsl(o,n,i,this.a)}opacity(e){let{h:t,s:n,l:i}=this._hsl;return g.fromHsl(t,n,i,e)}swatch(){return console.log(`%c %c ${this.html}, ${this.rgba}`,`background-color: ${this.html}`,"background-color: transparent"),this}blend(e,t){return new g(Ce(this.r,e.r,t),Ce(this.g,e.g,t),Ce(this.b,e.b,t),Ce(this.a,e.a,t))}static blendHue(e,t,n){let i=(t-e+720)%360;if(i<180)return e+n*i;else return e-(360-i)*n}mix(e,t){let n=this._hsl,i=e._hsl;return g.fromHsl(n.s===0?i.h:i.s===0?n.h:g.blendHue(n.h,i.h,t),Ce(n.s,i.s,t),Ce(n.l,i.l,t),Ce(this.a,e.a,t))}colorMix(e,t){return g.fromCss(`color-mix(in hsl, ${this.html}, ${e.html} ${(t*100).toFixed(0)}%)`)}static computedColorStylesheet=null;static computedColors=new Map;static recomputeQueued=!1;static registerComputedColor(e,t,n,i){if(!g.computedColors.has(e))g.computedColors.set(e,{varName:t,scale:n,method:i}),g.queueRecompute()}static queueRecompute(){if(g.recomputeQueued)return;g.recomputeQueued=!0,queueMicrotask(()=>{g.recomputeQueued=!1,g.recomputeColors()})}static recomputeColors(){if(g.computedColors.size===0)return;let e=[];for(let[n,{varName:i,scale:o,method:s}]of g.computedColors)try{let r=g.fromVar(i),l;switch(s){case"b":l=o>0?r.brighten(o):r.darken(-o);break;case"s":l=o>0?r.saturate(o):r.desaturate(-o);break;case"h":l=r.rotate(o*100);break;case"o":l=r.opacity(o);break;default:continue}e.push(` ${n}: ${l.rgba};`)}catch(r){}if(e.length===0)return;let t=`:root {
|
|
2
2
|
${e.join(`
|
|
3
3
|
`)}
|
|
4
|
-
}`;if(g.computedColorStylesheet===null)g.computedColorStylesheet=document.createElement("style"),g.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(g.computedColorStylesheet);g.computedColorStylesheet.textContent=t}}function X(e){return e.replace(/[A-Z]/g,(t)=>`-${t.toLocaleLowerCase()}`)}function Ii(e){return e.replace(/-([a-z])/g,(t,n)=>n.toLocaleUpperCase())}var ir="http://www.w3.org/1998/Math/MathML",or="http://www.w3.org/2000/svg",xt={},Ri=(e,t,n)=>{let i=Ui(X(t),n);if(i.prop.startsWith("--"))e.style.setProperty(i.prop,i.value);else e.style[t]=i.value},sr=(e)=>({toDOM(t,n){Ri(t,e,n)}}),oi=new WeakMap,_i=(e,t,n)=>{if(t==="style")if(typeof n==="object")for(let i of Object.keys(n))if(ae(n[i]))pe(e,n[i],sr(i));else Ri(e,i,n[i]);else e.setAttribute("style",n);else{let i=X(t),o=e.constructor.observedAttributes;if(o?.includes(t)||o?.includes(i)){let s=e.constructor._resolveInitAttributes?.(),r=s?.[t]??s?.[i];if(r!==void 0&&r!==null&&n!==null&&n!==void 0&&typeof n!==typeof r)e[t]=n;else if(typeof n==="boolean")if(n)e.setAttribute(i,"");else e.removeAttribute(i);else e.setAttribute(i,n)}else if(e[t]!==void 0){let{MathMLElement:s}=globalThis;if(e instanceof SVGElement||s!==void 0&&e instanceof s)e.setAttribute(t,n);else e[t]=n}else if(i==="class"){let s=(c)=>String(c||"").split(/\s+/).filter(Boolean),r=new Set,l=new Set;if(Array.isArray(n))for(let c of n)for(let d of s(c))r.add(d);else if(n!=null&&typeof n==="object")for(let[c,d]of Object.entries(n))for(let u of s(c))(d?r:l).add(u);else for(let c of s(n))r.add(c);let a=oi.get(e);if(a){for(let c of a)if(!r.has(c))e.classList.remove(c)}for(let c of l)e.classList.remove(c);for(let c of r)e.classList.add(c);oi.set(e,r)}else if(e[i]!==void 0)e[i]=n;else if(typeof n==="boolean")if(n)e.setAttribute(i,"");else e.removeAttribute(i);else e.setAttribute(i,n)}},Wt={};var si=(e)=>{if(!Wt[e])Wt[e]={toDOM(t,n){_i(t,e,n)}};return Wt[e]},rr=(e)=>{if(typeof e!=="object")return!1;if(e instanceof Map)return!0;let t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null)return!0;return Object.keys(e).length>0},lr=(e)=>{if(Array.isArray(e))return!1;if(typeof e==="function")return!1;let t=e.toString;return typeof t==="function"&&t!==Object.prototype.toString},ar=(e)=>{let t=globalThis.Node;if(t!=null&&e instanceof t||typeof e==="string"||typeof e==="number")return"child";if(ae(e))return"proxy";if(Array.isArray(e))return"array";if(e==null)return"props";if(rr(e))return"props";if(lr(e))return"text";return"unusable"},cr=(e,t)=>{let n=t.toLowerCase();if(e==="array")return`<${n}> was passed an array as a child. Arrays are not flattened — `+`did you mean to spread it? \`${n}(...items.map(…))\``;if(e==="unusable")return`<${n}> was passed a value that is neither a child nor a props `+"object — it has no text form and no properties to apply, so it was "+"ignored.";return},vn=(e,t,n,i)=>{let o=ar(e),s=cr(o,t);if(s!=null){console.warn(s,e);return}if(o==="child")n(e);else if(o==="text")n(String(e));else if(o==="proxy")n(C.span({bind:{value:e,binding:"text"}}));else if(i!=null)i(e instanceof Map?Object.fromEntries(e):e);else if(e!=null)console.warn("fragment() was passed a props object, which has no element to apply "+"to — it was ignored.",e)},Pi=(e,t)=>{if(t?.bind!=null&&e.bind!=null){e.bind=[].concat(e.bind,t.bind);let{bind:n,...i}=t;Object.assign(e,i);return}Object.assign(e,t)},xn=(e,t,n)=>{if(t==="apply")n(e);else if(t==="contract")Cs(e,n);else if(t.match(/^on[A-Z]/)!=null){let i=e[t];if(e.tagName.includes("-")&&typeof i==="function"&&typeof n==="function")e[t]=n;else{let o=t.substring(2).toLowerCase();yn(e,o,n)}}else if(t==="bind"){if(Array.isArray(n)){for(let o of n)xn(e,"bind",o);return}let i=typeof n.binding==="string"?St[n.binding]:n.binding;if(i!==void 0&&n.value!==void 0)pe(e,n.value,i instanceof Function?{toDOM:i}:i,n.options);else throw Error("bad binding")}else if(t.match(/^bind[A-Z]/)!=null){let i=t.substring(4,5).toLowerCase()+t.substring(5),o=St[i];if(o!==void 0)pe(e,n,o);else throw Error(`${t} is not allowed, bindings.${i} is not defined`)}else if(n!=null&&typeof n==="object"&&n[fn])pe(e,n,si(t));else if(ae(n))pe(e,n,si(t));else _i(e,t,n)},bn=(e,...t)=>{if(xt[e]===void 0){let[o,s]=e.split("|");if(s===void 0)xt[e]=globalThis.document.createElement(o);else xt[e]=globalThis.document.createElementNS(s,o)}let n=xt[e].cloneNode(),i={};for(let o of t)vn(o,n.tagName,(s)=>{if(n instanceof HTMLTemplateElement)n.content.append(s);else n.append(s)},(s)=>Pi(i,s));for(let o of Object.keys(i)){let s=i[o];xn(n,o,s)}return n},wn=(...e)=>{let t=globalThis.document.createDocumentFragment();for(let n of e)vn(n,"fragment",(i)=>t.append(i));return t},C=new Proxy({fragment:wn},{get(e,t){if(t=t.replace(/[A-Z]/g,(n)=>`-${n.toLocaleLowerCase()}`),e[t]===void 0)e[t]=(...n)=>bn(t,...n);return e[t]},set(){throw Error("You may not add new properties to elements")}}),Cn=new Proxy({fragment:wn},{get(e,t){if(e[t]===void 0)e[t]=(...n)=>bn(`${t}|${or}`,...n);return e[t]},set(){throw Error("You may not add new properties to elements")}}),dr=new Proxy({fragment:wn},{get(e,t){if(e[t]===void 0)e[t]=(...n)=>bn(`${t}|${ir}`,...n);return e[t]},set(){throw Error("You may not add new properties to elements")}});var ur=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],hr=!0,fr=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,pr=(e)=>fr.test(e),he=(e="",t="")=>{if(e==="")return t;else if(t.startsWith("[")&&t.endsWith("]"))return`${e}${t}`;else if(t.match(/^\d+$/)!==null||t.includes("="))return`${e}[${t}]`;else return`${e}.${t}`},kn={};function Kt(e,t){if(e!==null&&(typeof e==="object"||typeof e==="function"))return e;return new Proxy(kn,ge(t,!0))}var Vi=()=>new Proxy({},ge("^",!0)),Xt=(e)=>{let t=e(Vi())?.path;if(!t?.startsWith("^."))throw Error("selector must return a property of the item");return t.substring(2)},Yt=(e,t,n)=>{for(let i=0;i<e.length;i++)if(`${U(e[i],t)}`===`${n}`)return i;return-1},gr=(e,t)=>({listFind(n,i){if(n instanceof Element){let r=n;while(r&&!r[Re]&&r.parentElement)r=r.parentElement;let l=r?.[Re];if(l==null)return;let a=t.indexOf(l);return a!==-1?oe[e][a]:void 0}let o=Xt(n),s=Yt(t,o,i);return s!==-1?oe[e][s]:void 0},listUpdate(n,i){let o=Xt(n),s=U(i,o),r=Yt(t,o,s);if(r!==-1){let l=oe[e][r];for(let a of Object.keys(i))l[a]=i[a];return l}return oe[e].push(i),oe[e][t.length-1]},listRemove(n,i){let o=Xt(n),s=Yt(t,o,i);if(s===-1)return!1;return oe[e].splice(s,1),!0}}),ri=!1;function mr(){if(!ri)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),ri=!0}var li=(e)=>e===kn,yr=(e,t)=>({get(n,i){switch(i){case"value":return U(le,e);case"path":return e;case"touch":return()=>Pe(e);case"observe":return(o)=>{let s=mn(e,o);return()=>ln(s)};case"bind":return(o,s,r)=>{hs()(o,e,s,r)};case"on":{let o=t===kn?U(le,e):t.valueOf?t.valueOf():t;return(s,r)=>fs()(s,r,o)}case"binding":return(o)=>({bind:{value:e,binding:o}});case"listBinding":return(o=({span:r})=>r({bind:{value:"^",binding:"text"}}),s={})=>{let r=s.virtual?.itemsPerRow??1,l=[];for(let a=0;a<r;a++)l.push(o(C,Vi(),a));return[{bindList:{value:e,...s}},C.template(...l)]};case"listFind":case"listUpdate":case"listRemove":return gr(e,Array.isArray(t)?t:[])[i];case"take":return(...o)=>{let s=o[o.length-1],r=o.slice(0,-1).map((l)=>typeof l==="string"?l:l[Y]);return{[fn]:!0,paths:[e,...r],transform:s}}}return},set(n,i,o){if(i==="value"){if(o=B(o),B(Se[e])!==o&&Li(le,e,o))Pe(e);return!0}return!1}}),He=(e,t)=>new Proxy(t,yr(e,t)),vr=["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"],ai=new Set(vr),xr=new Map([[Y,"path"],[Ae,"value"]]),ci=new Map([[Y,"path"],["xinPath","path"],["tosiPath","path"],[Ae,"value"],["xinValue","value"],["tosiValue","value"],[ps,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[ms,"on"],["xinOn","on"],["tosiOn","on"],[gs,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),ge=(e,t)=>({get(n,i){if((i==="tosi"||i===ys)&&t)return He(e,n);if(li(n)){let a=()=>U(le,e);switch(i){case"valueOf":case"toJSON":return()=>a();case Symbol.toPrimitive:return(h)=>{let f=a();if(h==="number")return Number(f);if(h==="string")return String(f);return f};case"toString":return()=>String(a())}if(ai.has(i))return He(e,n)[i];let c=typeof i==="symbol"?xr.get(i):void 0;if(c!==void 0)return He(e,n)[c];let d=ci.get(i);if(d!==void 0)return mr(),He(e,n)[d];let u=a();if(u!=null){let h=Object(u);if(i in h){let f=h[i];return typeof f==="function"?f.bind(h):f}}return}if(t&&(i==="valueOf"||i==="toJSON"))return()=>U(le,e);if(t&&!(i in n)&&ai.has(i))return He(e,n)[i];let o=ci.get(i);if(o!==void 0)return He(e,n)[o];if(typeof i==="symbol")return n[i];let s=Object.getOwnPropertyDescriptor(n,i);if(s&&!s.configurable&&!s.writable&&"value"in s)return s.value;let r=i,l=r.match(/^([^.[]+)\.(.+)$/)??r.match(/^([^\]]+)(\[.+)/)??r.match(/^(\[[^\]]+\])\.(.+)$/)??r.match(/^(\[[^\]]+\])\[(.+)$/);if(l!==null){let[,a,c]=l,d=he(e,a),u=B(U(n,a));return u!==null&&typeof u==="object"?new Proxy(u,ge(d,t))[c]:u}if(r.startsWith("[")&&r.endsWith("]"))r=r.substring(1,r.length-1);if(!Array.isArray(n)&&n[r]!==void 0||Array.isArray(n)&&r.includes("=")){let a;if(r.includes("=")){let[c,d]=r.split("=");a=n.find((u)=>`${U(u,c)}`===d)}else a=n[r];if(a instanceof Object){a=B(a);let c=he(e,r);return new Proxy(a instanceof Function?a.bind(n):a,ge(c,t))}else return t?Kt(a,he(e,r)):a}else if(Array.isArray(n)){let a=n[r];return typeof a==="function"?(...c)=>{let d=c.map((h)=>B(h)),u=a.apply(n,d);if(ur.includes(r))Pe(e);if(u!=null&&typeof u==="object"){if(r==="find"||r==="findLast"||r==="at"){let h=n.indexOf(u);if(h!==-1)return new Proxy(u,ge(he(e,String(h)),t))}}return u}:typeof a==="object"?new Proxy(B(a),ge(he(e,r),t)):t?Kt(a,he(e,r)):a}else{let a=n[r];if(a!==null&&typeof a==="object")a=B(a);return t?Kt(a,he(e,r)):a}},set(n,i,o){if(o=B(o),typeof i==="symbol"&&i!==Ae)return n[i]=o,!0;if(o!==null&&typeof o==="object")if(Array.isArray(o))for(let r=0;r<o.length;r++){let l=Object.getOwnPropertyDescriptor(o,r);if(l===void 0||l.writable!==!0)continue;if(l.value!==null&&typeof l.value==="object")o[r]=B(l.value)}else for(let r of Object.keys(o)){let l=Object.getOwnPropertyDescriptor(o,r);if(l===void 0||l.writable!==!0)continue;if(l.value!==null&&typeof l.value==="object")o[r]=B(l.value)}let s=i===Ae||i==="xinValue"||i==="tosiValue"||i==="value"&&(li(n)||t&&!("value"in n))?e:he(e,i);if(hr&&!pr(s))throw Error(`setting invalid path ${s}`);if(B(Se[s])!==o&&Li(le,s,o))Pe(s);return!0}}),br=(e,t)=>{let n=typeof t==="function"?t:Se[t];if(typeof n!=="function")throw Error(`observe expects a function or path to a function, ${t} is neither`);return mn(e,n)},Se=new Proxy(le,ge("",!1));ds(Se);var oe=new Proxy(le,ge("",!0)),qi=new Set,di=!1;function wr(){if(!di)di=!0,qi.add(()=>g.queueRecompute())}function Cr(){wr();for(let e of qi)e()}function Fi(e,t){let n=B(t),i=C.style(st(n));i.id=e,document.head.append(i);let o=ae(t);if(o!==void 0)br(o,()=>{i.textContent=st(B(t)),Cr()});return i}var kr=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,Mr=/^line-height$/,Ui=(e,t)=>{let n=e.replace(/^_+/,""),i=e.startsWith("_"),o=kr.test(n)||!i&&Mr.test(n);if(typeof t==="number"&&!o)t=`${t}px`;if(e.startsWith("_"))if(e.startsWith("__"))e="--"+e.substring(2),t=`var(${e}-default, ${t})`;else e="--"+e.substring(1);return{prop:e,value:String(t)}},Er=(e,t,n)=>{if(n===void 0)return"";if(n instanceof g)n=n.html;let i=Ui(t,n);return`${e} ${i.prop}: ${i.value};`},Wi=(e,t,n="")=>{let i=X(e);if(typeof t==="object"&&!(t instanceof g)){let o=Object.keys(t).map((s)=>Wi(s,t[s],`${n} `)).join(`
|
|
4
|
+
}`;if(g.computedColorStylesheet===null)g.computedColorStylesheet=document.createElement("style"),g.computedColorStylesheet.id="tosijs-computed-colors",document.head.append(g.computedColorStylesheet);g.computedColorStylesheet.textContent=t}}function X(e){return e.replace(/[A-Z]/g,(t)=>`-${t.toLocaleLowerCase()}`)}function Ui(e){return e.replace(/-([a-z])/g,(t,n)=>n.toLocaleUpperCase())}var mr="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",xt={},Wi=(e,t,n)=>{let i=Zi(X(t),n);if(i.prop.startsWith("--"))e.style.setProperty(i.prop,i.value);else e.style[t]=i.value},vr=(e)=>({toDOM(t,n){Wi(t,e,n)}}),ui=new WeakMap,Ki=(e,t,n)=>{if(t==="style")if(typeof n==="object")for(let i of Object.keys(n))if(ae(n[i]))pe(e,n[i],vr(i));else Wi(e,i,n[i]);else e.setAttribute("style",n);else{let i=X(t),o=e.constructor.observedAttributes;if(o?.includes(t)||o?.includes(i)){let s=e.constructor._resolveInitAttributes?.(),r=s?.[t]??s?.[i];if(r!==void 0&&r!==null&&n!==null&&n!==void 0&&typeof n!==typeof r)e[t]=n;else if(typeof n==="boolean")if(n)e.setAttribute(i,"");else e.removeAttribute(i);else e.setAttribute(i,n)}else if(e[t]!==void 0){let{MathMLElement:s}=globalThis;if(e instanceof SVGElement||s!==void 0&&e instanceof s)e.setAttribute(t,n);else e[t]=n}else if(i==="class"){let s=(c)=>String(c||"").split(/\s+/).filter(Boolean),r=new Set,l=new Set;if(Array.isArray(n))for(let c of n)for(let d of s(c))r.add(d);else if(n!=null&&typeof n==="object")for(let[c,d]of Object.entries(n))for(let u of s(c))(d?r:l).add(u);else for(let c of s(n))r.add(c);let a=ui.get(e);if(a){for(let c of a)if(!r.has(c))e.classList.remove(c)}for(let c of l)e.classList.remove(c);for(let c of r)e.classList.add(c);ui.set(e,r)}else if(e[i]!==void 0)e[i]=n;else if(typeof n==="boolean")if(n)e.setAttribute(i,"");else e.removeAttribute(i);else e.setAttribute(i,n)}},Gt={};var hi=(e)=>{if(!Gt[e])Gt[e]={toDOM(t,n){Ki(t,e,n)}};return Gt[e]},br=(e)=>{if(typeof e!=="object")return!1;if(e instanceof Map)return!0;let t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null)return!0;return Object.keys(e).length>0},xr=(e)=>{if(Array.isArray(e))return!1;if(typeof e==="function")return!1;let t=e.toString;return typeof t==="function"&&t!==Object.prototype.toString},wr=(e)=>{let t=globalThis.Node;if(t!=null&&e instanceof t||typeof e==="string"||typeof e==="number")return"child";if(ae(e))return"proxy";if(Array.isArray(e))return"array";if(e==null)return"props";if(br(e))return"props";if(xr(e))return"text";return"unusable"},Cr=(e,t)=>{let n=t.toLowerCase();if(e==="array")return`<${n}> was passed an array as a child. Arrays are not flattened — `+`did you mean to spread it? \`${n}(...items.map(…))\``;if(e==="unusable")return`<${n}> was passed a value that is neither a child nor a props `+"object — it has no text form and no properties to apply, so it was "+"ignored.";return},Cn=(e,t,n,i)=>{let o=wr(e),s=Cr(o,t);if(s!=null){console.warn(s,e);return}if(o==="child")n(e);else if(o==="text")n(String(e));else if(o==="proxy")n(C.span({bind:{value:e,binding:"text"}}));else if(i!=null)i(e instanceof Map?Object.fromEntries(e):e);else if(e!=null)console.warn("fragment() was passed a props object, which has no element to apply "+"to — it was ignored.",e)},Xi=(e,t)=>{if(t?.bind!=null&&e.bind!=null){e.bind=[].concat(e.bind,t.bind);let{bind:n,...i}=t;Object.assign(e,i);return}Object.assign(e,t)},kn=(e,t,n)=>{if(t==="apply")n(e);else if(t==="contract")Ds(e,n);else if(t.match(/^on[A-Z]/)!=null){let i=e[t];if(e.tagName.includes("-")&&typeof i==="function"&&typeof n==="function")e[t]=n;else{let o=t.substring(2).toLowerCase();wn(e,o,n)}}else if(t==="bind"){if(Array.isArray(n)){for(let o of n)kn(e,"bind",o);return}let i=typeof n.binding==="string"?Lt[n.binding]:n.binding;if(i!==void 0&&n.value!==void 0)pe(e,n.value,i instanceof Function?{toDOM:i}:i,n.options);else throw Error("bad binding")}else if(t.match(/^bind[A-Z]/)!=null){let i=t.substring(4,5).toLowerCase()+t.substring(5),o=Lt[i];if(o!==void 0)pe(e,n,o);else throw Error(`${t} is not allowed, bindings.${i} is not defined`)}else if(n!=null&&typeof n==="object"&&n[yn])pe(e,n,hi(t));else if(ae(n))pe(e,n,hi(t));else Ki(e,t,n)},Mn=(e,...t)=>{if(xt[e]===void 0){let[o,s]=e.split("|");if(s===void 0)xt[e]=globalThis.document.createElement(o);else xt[e]=globalThis.document.createElementNS(s,o)}let n=xt[e].cloneNode(),i={};for(let o of t)Cn(o,n.tagName,(s)=>{if(n instanceof HTMLTemplateElement)n.content.append(s);else n.append(s)},(s)=>Xi(i,s));for(let o of Object.keys(i)){let s=i[o];kn(n,o,s)}return n},En=(...e)=>{let t=globalThis.document.createDocumentFragment();for(let n of e)Cn(n,"fragment",(i)=>t.append(i));return t},C=new Proxy({fragment:En},{get(e,t){if(t=t.replace(/[A-Z]/g,(n)=>`-${n.toLocaleLowerCase()}`),e[t]===void 0)e[t]=(...n)=>Mn(t,...n);return e[t]},set(){throw Error("You may not add new properties to elements")}}),An=new Proxy({fragment:En},{get(e,t){if(e[t]===void 0)e[t]=(...n)=>Mn(`${t}|${yr}`,...n);return e[t]},set(){throw Error("You may not add new properties to elements")}}),kr=new Proxy({fragment:En},{get(e,t){if(e[t]===void 0)e[t]=(...n)=>Mn(`${t}|${mr}`,...n);return e[t]},set(){throw Error("You may not add new properties to elements")}});var Mr=["sort","splice","copyWithin","fill","pop","push","reverse","shift","unshift"],Er=!0,Ar=/^\.?([^.[\](),])+(\.[^.[\](),]+|\[\d+\]|\[[^=[\](),]*=[^[\]()]+\])*$/,Sr=(e)=>Ar.test(e),he=(e="",t="")=>{if(e==="")return t;else if(t.startsWith("[")&&t.endsWith("]"))return`${e}${t}`;else if(t.match(/^\d+$/)!==null||t.includes("="))return`${e}[${t}]`;else return`${e}.${t}`},Sn={};function Jt(e,t){if(e!==null&&(typeof e==="object"||typeof e==="function"))return e;return new Proxy(Sn,ge(t,!0))}var Yi=()=>new Proxy({},ge("^",!0)),Zt=(e)=>{let t=e(Yi())?.path;if(!t?.startsWith("^."))throw Error("selector must return a property of the item");return t.substring(2)},Qt=(e,t,n)=>{for(let i=0;i<e.length;i++)if(`${U(e[i],t)}`===`${n}`)return i;return-1},Lr=(e,t)=>({listFind(n,i){if(n instanceof Element){let r=n;while(r&&!r[Re]&&r.parentElement)r=r.parentElement;let l=r?.[Re];if(l==null)return;let a=t.indexOf(l);return a!==-1?oe[e][a]:void 0}let o=Zt(n),s=Qt(t,o,i);return s!==-1?oe[e][s]:void 0},listUpdate(n,i){let o=Zt(n),s=U(i,o),r=Qt(t,o,s);if(r!==-1){let l=oe[e][r];for(let a of Object.keys(i))l[a]=i[a];return l}return oe[e].push(i),oe[e][t.length-1]},listRemove(n,i){let o=Zt(n),s=Qt(t,o,i);if(s===-1)return!1;return oe[e].splice(s,1),!0}}),fi=!1;function Tr(){if(!fi)console.warn("xinValue, tosiValue, xinPath, tosiPath, etc. are deprecated. Use .tosi.value, .tosi.path, .tosi.observe(), etc. instead."),fi=!0}var pi=(e)=>e===Sn,Br=(e,t)=>({get(n,i){switch(i){case"value":return U(le,e);case"path":return e;case"touch":return()=>Pe(e);case"observe":return(o)=>{let s=xn(e,o);return()=>un(s)};case"bind":return(o,s,r)=>{Es()(o,e,s,r)};case"on":{let o=t===Sn?U(le,e):t.valueOf?t.valueOf():t;return(s,r)=>As()(s,r,o)}case"binding":return(o)=>({bind:{value:e,binding:o}});case"listBinding":return(o=({span:r})=>r({bind:{value:"^",binding:"text"}}),s={})=>{let r=s.virtual?.itemsPerRow??1,l=[];for(let a=0;a<r;a++)l.push(o(C,Yi(),a));return[{bindList:{value:e,...s}},C.template(...l)]};case"listFind":case"listUpdate":case"listRemove":return Lr(e,Array.isArray(t)?t:[])[i];case"take":return(...o)=>{let s=o[o.length-1],r=o.slice(0,-1).map((l)=>typeof l==="string"?l:l[Y]);return{[yn]:!0,paths:[e,...r],transform:s}}}return},set(n,i,o){if(i==="value"){if(o=B(o),B(Se[e])!==o&&Di(le,e,o))Pe(e);return!0}return!1}}),He=(e,t)=>new Proxy(t,Br(e,t)),$r=["path","value","touch","observe","bind","on","binding","listBinding","listFind","listUpdate","listRemove","take"],gi=new Set($r),Nr=new Map([[Y,"path"],[Ae,"value"]]),mi=new Map([[Y,"path"],["xinPath","path"],["tosiPath","path"],[Ae,"value"],["xinValue","value"],["tosiValue","value"],[Ss,"observe"],["xinObserve","observe"],["tosiObserve","observe"],[Ts,"on"],["xinOn","on"],["tosiOn","on"],[Ls,"bind"],["xinBind","bind"],["tosiBind","bind"],["tosiBinding","binding"],["tosiListBinding","listBinding"]]),ge=(e,t)=>({get(n,i){if((i==="tosi"||i===Bs)&&t)return He(e,n);if(pi(n)){let a=()=>U(le,e);switch(i){case"valueOf":case"toJSON":return()=>a();case Symbol.toPrimitive:return(h)=>{let f=a();if(h==="number")return Number(f);if(h==="string")return String(f);return f};case"toString":return()=>String(a())}if(gi.has(i))return He(e,n)[i];let c=typeof i==="symbol"?Nr.get(i):void 0;if(c!==void 0)return He(e,n)[c];let d=mi.get(i);if(d!==void 0)return Tr(),He(e,n)[d];let u=a();if(u!=null){let h=Object(u);if(i in h){let f=h[i];return typeof f==="function"?f.bind(h):f}}return}if(t&&(i==="valueOf"||i==="toJSON"))return()=>U(le,e);if(t&&!(i in n)&&gi.has(i))return He(e,n)[i];let o=mi.get(i);if(o!==void 0)return He(e,n)[o];if(typeof i==="symbol")return n[i];let s=Object.getOwnPropertyDescriptor(n,i);if(s&&!s.configurable&&!s.writable&&"value"in s)return s.value;let r=i,l=r.match(/^([^.[]+)\.(.+)$/)??r.match(/^([^\]]+)(\[.+)/)??r.match(/^(\[[^\]]+\])\.(.+)$/)??r.match(/^(\[[^\]]+\])\[(.+)$/);if(l!==null){let[,a,c]=l,d=he(e,a),u=B(U(n,a));return u!==null&&typeof u==="object"?new Proxy(u,ge(d,t))[c]:u}if(r.startsWith("[")&&r.endsWith("]"))r=r.substring(1,r.length-1);if(!Array.isArray(n)&&n[r]!==void 0||Array.isArray(n)&&r.includes("=")){let a;if(r.includes("=")){let[c,d]=r.split("=");a=n.find((u)=>`${U(u,c)}`===d)}else a=n[r];if(a instanceof Object){a=B(a);let c=he(e,r);return new Proxy(a instanceof Function?a.bind(n):a,ge(c,t))}else return t?Jt(a,he(e,r)):a}else if(Array.isArray(n)){let a=n[r];return typeof a==="function"?(...c)=>{let d=c.map((h)=>B(h)),u=a.apply(n,d);if(Mr.includes(r))Pe(e);if(u!=null&&typeof u==="object"){if(r==="find"||r==="findLast"||r==="at"){let h=n.indexOf(u);if(h!==-1)return new Proxy(u,ge(he(e,String(h)),t))}}return u}:typeof a==="object"?new Proxy(B(a),ge(he(e,r),t)):t?Jt(a,he(e,r)):a}else{let a=n[r];if(a!==null&&typeof a==="object")a=B(a);return t?Jt(a,he(e,r)):a}},set(n,i,o){if(o=B(o),typeof i==="symbol"&&i!==Ae)return n[i]=o,!0;if(o!==null&&typeof o==="object")if(Array.isArray(o))for(let r=0;r<o.length;r++){let l=Object.getOwnPropertyDescriptor(o,r);if(l===void 0||l.writable!==!0)continue;if(l.value!==null&&typeof l.value==="object")o[r]=B(l.value)}else for(let r of Object.keys(o)){let l=Object.getOwnPropertyDescriptor(o,r);if(l===void 0||l.writable!==!0)continue;if(l.value!==null&&typeof l.value==="object")o[r]=B(l.value)}let s=i===Ae||i==="xinValue"||i==="tosiValue"||i==="value"&&(pi(n)||t&&!("value"in n))?e:he(e,i);if(Er&&!Sr(s))throw Error(`setting invalid path ${s}`);if(B(Se[s])!==o&&Di(le,s,o))Pe(s);return!0}}),zr=(e,t)=>{let n=typeof t==="function"?t:Se[t];if(typeof n!=="function")throw Error(`observe expects a function or path to a function, ${t} is neither`);return xn(e,n)},Se=new Proxy(le,ge("",!1));ks(Se);var oe=new Proxy(le,ge("",!0)),Gi=new Set,yi=!1;function Or(){if(!yi)yi=!0,Gi.add(()=>g.queueRecompute())}function Dr(){Or();for(let e of Gi)e()}function Ji(e,t){let n=B(t),i=C.style(lt(n));i.id=e,document.head.append(i);let o=ae(t);if(o!==void 0)zr(o,()=>{i.textContent=lt(B(t)),Dr()});return i}var Hr=/^(animation-iteration-count|column-count|flex(-grow|-shrink)?|font-weight|opacity|order|orphans|scale|tab-size|widows|z-index|zoom)$/,jr=/^line-height$/,Zi=(e,t)=>{let n=e.replace(/^_+/,""),i=e.startsWith("_"),o=Hr.test(n)||!i&&jr.test(n);if(typeof t==="number"&&!o)t=`${t}px`;if(e.startsWith("_"))if(e.startsWith("__"))e="--"+e.substring(2),t=`var(${e}-default, ${t})`;else e="--"+e.substring(1);return{prop:e,value:String(t)}},Ir=(e,t,n)=>{if(n===void 0)return"";if(n instanceof g)n=n.html;let i=Zi(t,n);return`${e} ${i.prop}: ${i.value};`},Qi=(e,t,n="")=>{let i=X(e);if(typeof t==="object"&&!(t instanceof g)){let o=Object.keys(t).map((s)=>Qi(s,t[s],`${n} `)).join(`
|
|
5
5
|
`);return`${n} ${e} {
|
|
6
6
|
${o}
|
|
7
|
-
${n} }`}else return
|
|
7
|
+
${n} }`}else return Ir(n,i,t)},lt=(e,t="")=>Object.keys(e).map((n)=>{let i=e[n];if(typeof i==="string"){if(n==="@import")return`@import url('${i}');`;throw Error("top-level string value only allowed for `@import`")}let o=Object.keys(i).map((s)=>Qi(s,i[s])).join(`
|
|
8
8
|
`);return`${t}${n} {
|
|
9
9
|
${o}
|
|
10
10
|
}`}).join(`
|
|
11
11
|
|
|
12
|
-
`);var y=new Proxy({},{get(e,t){if(e[t]===void 0){let n="--"+X(t);e[t]=(i)=>`var(${n}, ${i})`}return e[t]}}),T=new Proxy({},{get(e,t){if(t==="default")return y;if(e[t]==null){t=X(t);let[,n,,i,o,s]=t.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",t],r=`--${n}`;if(o!=null){let l=i==null?Number(o)/100:-Number(o)/100;switch(s){case"b":case"s":case"h":case"o":{let a=`--${t}`;g.registerComputedColor(a,r,l,s),e[t]=`var(${a})`}break;case"":e[t]=`calc(var(${r}) * ${l})`;break;default:throw console.error(s),Error(`Unrecognized method ${s} for css variable ${r}`)}}else e[t]=`var(${r})`}return e[t]}});function
|
|
13
|
-
`+i:i}function Dr(e){if(tt[e])document.head.append(C.style({id:e+"-component"},tt[e]));delete tt[e]}function Hr(e){let t=Object.create(null),n=(i)=>{if(Array.isArray(i)){i.forEach(n);return}if(!(i instanceof Element))return;let o=i.getAttribute("part");if(o!=null&&!(o in t))t[o]=i;for(let s of Array.from(i.children))n(s)};return n(e),t}var w=(e)=>e,jr=(e)=>{class t extends E{static initAttributes=e}return t};class E extends HTMLElement{static elements=C;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(e){if(this.internals)if(e)this.internals.setValidity({customError:!0},e);else this.internals.setValidity({})}setValidity(e,t,n){this.internals?.setValidity(e,t,n)}setFormValue(e,t){this.internals?.setFormValue(e,t)}static _resolveInitAttributes(){let e=Ie(this),t=Object.prototype.hasOwnProperty.call(this,"initAttributes")?this.initAttributes:void 0;if(e?.attributes!=null){let r=wt.get(this);if(r!=null)return r;let l={...t??{}},a=[];for(let[h,f]of Object.entries(e.attributes))if(f!=null&&"default"in f)l[h]=f.default;else if(!(h in l))a.push(h);if(a.length>0)throw Error(`${this.name} contract.attributes entries missing 'default': ${a.join(", ")} — the attribute machinery infers `+"each attribute's runtime type from its default, so every declared attribute needs one, either here or in static initAttributes.");let c=Object.getPrototypeOf(this),d=typeof c?._resolveInitAttributes==="function"?c._resolveInitAttributes():void 0,u=d!=null?{...d,...l}:l;return wt.set(this,u),u}if(t==null){let r=Object.getPrototypeOf(this);return typeof r?._resolveInitAttributes==="function"?r._resolveInitAttributes():this.initAttributes}let n=wt.get(this);if(n!=null)return n;let i=Object.getPrototypeOf(this),o=typeof i?._resolveInitAttributes==="function"?i._resolveInitAttributes():void 0;if(o==null||o===t)return t;let s={...o,...t};return wt.set(this,s),s}static computed(e=""){return{[Ki]:!0,shape:e}}static _describedAttributes(){let e=this._resolveInitAttributes(),t=Ie(this)?.attributes;if(e==null)return t;let n={};for(let[i,o]of Object.entries(e)){let s=pi(o)?o.shape:o;n[i]={type:typeof s,default:s}}return t!=null?{...n,...t}:n}static get observedAttributes(){let e=this._resolveInitAttributes();if(e)return["hidden",...Object.keys(e).map(X)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=C.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;_pendingAttrOps;static StyleNode(e){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),C.style(st(e))}static elementCreator(e={}){let t=this;if(!Object.prototype.hasOwnProperty.call(t,"_elementCreator")){if(e.tag!==void 0)re("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(e.styleSpec!==void 0)re("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(e.extends!==void 0)re("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let n=e.tag??t.preferredTagName;if(n==null)if(typeof t.name==="string"&&t.name!==""){if(n=X(t.name),n.startsWith("-"))n=n.slice(1)}else n=Gt();if(customElements.get(n)!=null)console.warn(`${n} is already defined`);if(n.match(/\w+(-\w+)+/)==null)console.warn(`${n} is not a legal tag for a custom-element`),n=Gt();while(customElements.get(n)!==void 0)n=Gt();t._tagName=n;let i=e.styleSpec??t.lightStyleSpec;if(i!==void 0)Or(n,i);let o=e.extends??t.extends,s=o?{extends:o}:void 0,r=this.prototype;if(r!=null&&!Object.prototype.hasOwnProperty.call(r,vi)){let l=r.connectedCallback;r.connectedCallback=function(){if(this._drainPendingAttrOps(),l)l.call(this)},Object.defineProperty(r,vi,{value:!0,enumerable:!1})}window.customElements.define(n,this,s),t._elementCreator=C[n]}return t._elementCreator}initAttributes(...e){if(re("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let i of e)this._legacyTrackedAttrs.add(i);zr().observe(this,{attributes:!0});let t={},n={};e.forEach((i)=>{t[i]=se(w(this)[i]);let o=X(i);Object.defineProperty(this,i,{enumerable:!1,get(){if(typeof t[i]==="boolean")return this.hasAttribute(o);else if(this.hasAttribute(o))return typeof t[i]==="number"?parseFloat(this.getAttribute(o)):this.getAttribute(o);else if(n[i]!==void 0)return n[i];else return t[i]},set(s){if(typeof t[i]==="boolean"){if(s!==this[i]){if(s)this.setAttribute(o,"");else this.removeAttribute(o);this.queueRender()}}else if(typeof t[i]==="number"){if(s!==parseFloat(this[i]))this.setAttribute(o,s),this.queueRender()}else if(typeof s==="object"||`${s}`!==`${this[i]}`){if(s===null||s===void 0||typeof s==="object")this.removeAttribute(o);else this.setAttribute(o,s);this.queueRender(),n[i]=s}}})})}initValue(){let e=Object.getOwnPropertyDescriptor(this,"value");if(e!==void 0&&(e.get!==void 0||e.set!==void 0))return;if(e===void 0){let n=this.constructor;if(Ie(n)?.value==null)return;let i;for(let o=Object.getPrototypeOf(this);o!=null&&i===void 0;o=Object.getPrototypeOf(o))i=Object.getOwnPropertyDescriptor(o,"value");if(i?.get!==void 0||i?.set!==void 0){let o=this.tagName?.toLowerCase();if(!hi.has(o))hi.add(o),console.error(`<${o}> declares contract.value, but implements \`value\` as its own getter/setter, so tosijs cannot enforce the contract `+"there — and describe() still publishes it. Call "+"exerciseComponent in your tests, check the value in your own setter, or drop contract.value so the map stops advertising a rule nothing checks.");return}this.value=this.hasAttribute("value")?this.getAttribute("value"):void 0}let t=this.hasAttribute("value")?this.getAttribute("value"):se(w(this).value);delete w(this).value,Object.defineProperty(this,"value",{enumerable:!1,get(){return t},set(n){if(t!==n)Nr(this,n),t=n,this._valueChanged=!0,this.queueRender(!0)}})}_parts;_partsCache=Object.create(null);get parts(){let e=this;if(this._parts==null)this._parts=new Proxy({},{get(t,n){if(typeof n!=="string")return;let i=e._partsCache,o=i[n]??null,s=o;if(s!=null&&!s.isConnected)s=null;if(s==null){let r=e.shadowRoot!=null?e.shadowRoot:e;if(s=r.querySelector(`[part="${n}"]`),s==null)s=r.querySelector(n);if(s==null&&o!=null)return o;if(s==null)throw Error(`elementRef "${n}" does not exist!`);i[n]=s}return s}});return this._parts}attributeChangedCallback(e,t,n){let i=Ii(e);if(n===null&&this._attrValues?.has(i))this._attrValues.delete(i);let o=this._computedAttrShapes?.get(i);if(o!==void 0&&!this._applyingComputedAttr?.has(i)){this._applyingComputedAttr??=new Set,this._applyingComputedAttr.add(i);try{this[i]=o==="boolean"?n!==null:n??""}finally{this._applyingComputedAttr.delete(i)}return}if(!this._legacyTrackedAttrs?.has(i))this.queueRender(!1)}_applyingComputedAttr;constructor(){super();if(gi+=1,this._installAttributeQueue(),this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let e=this.constructor._resolveInitAttributes();if(e)this._setupAttributeAccessors(e);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${gi}`,w(this)._value=se(w(this).defaultValue),this._warnOnHandlerCollisions()}_warnOnHandlerCollisions(){let e=this.constructor;if(xi.has(e))return;xi.add(e),queueMicrotask(()=>{let t=new Set;for(let r of Object.keys(this))if(/^on[A-Z]/.test(r))t.add(r);let n=Object.getPrototypeOf(this);while(n&&n!==E.prototype){for(let r of Object.getOwnPropertyNames(n))if(/^on[A-Z]/.test(r))t.add(r);n=Object.getPrototypeOf(n)}let i=this.tagName.toLowerCase();if(t.delete("onResize")&&w(this).handleResize===void 0)console.warn(`<${i}> defines 'onResize', which is deprecated. Rename it to 'handleResize'. The on<Event> prefix is reserved for event-handler sugar in the elements factory (creator({ onResize }) would attach a 'resize' listener) and is being retired for component callbacks in favor of the handle<Event> convention.`);if(t.size===0)return;let o=Array.from(t,(r)=>`'${r}'`).join(", "),s=Array.from(t)[0];if(Ee.quiet===!0)return;console.warn(`<${i}> defines ${o} — on<Event>-shaped member name(s), which `+`collide with the elements factory's event-handler sugar. Since 1.8.0, IF the member holds a function when the creator runs, it wins: creator({ ${s}: fn }) assigns it rather than attaching a '${s.slice(2).toLowerCase()}' listener `+"(tosijs#22) — and then that name can no longer carry event sugar. "+"A member declared but left undefined/null still gets event sugar, so the meaning depends on initialisation: give it a function default, or rename to handle<Event> for a component callback / add<Event>Listener for something that registers a listener.")})}_installAttributeQueue(){let e=this.constructor._resolveInitAttributes();if(!e)return;let t=new Set(Object.keys(e).map(X)),n=[];this._pendingAttrOps=n;let i=HTMLElement.prototype;this.setAttribute=(o,s)=>{if(t.has(o))n.push(["set",o,String(s)]);else i.setAttribute.call(this,o,s)},this.removeAttribute=(o)=>{if(t.has(o))n.push(["remove",o]);else i.removeAttribute.call(this,o)},queueMicrotask(()=>this._drainPendingAttrOps())}_drainPendingAttrOps(){let e=this._pendingAttrOps;if(e===void 0)return;this._pendingAttrOps=void 0,delete this.setAttribute,delete this.removeAttribute;let t=new Set;for(let n of e)if(this.hasAttribute(n[1]))t.add(n[1]);for(let n of e)if(n[0]==="set"){if(!t.has(n[1]))this.setAttribute(n[1],n[2])}else t.delete(n[1]),this.removeAttribute(n[1])}_installedAttrAccessors;_attrTypedOverride;_installComputedAttribute(e,t){let n=Object.getPrototypeOf(this),i;while(n!=null&&n!==E.prototype&&i===void 0)if(i=Object.getOwnPropertyDescriptor(n,e),i===void 0)n=Object.getPrototypeOf(n);if(i?.get==null)throw Error(`${this.tagName}: initAttributes.${e} is Component.computed(), `+"which declares that this class implements the attribute itself — "+`but no \`get ${e}()\` was found on the class. Define get/set for it, or give the attribute an ordinary default value instead. (If "${e}" is a native DOM property — title, `+"id, hidden, lang, slot, tabIndex … — it cannot be a computed "+"attribute: tosijs will not shadow the platform's accessor, because doing so corrupts it for every element on the page.)");if(this._computedAttrShapes??=new Map,this._computedAttrShapes.set(e,typeof t==="boolean"?"boolean":"string"),i.set==null||n==null)return;if(fi.has(i.set))return;let{get:o,set:s}=i,r=function(l){let a;try{a=o.call(this)}catch{a=void 0}s.call(this,l);let c;try{c=o.call(this)}catch{c=void 0}if(c!==a)this.queueRender()};fi.add(r),Object.defineProperty(n,e,{configurable:!0,enumerable:i.enumerable,get:i.get,set:r})}_computedAttrShapes;_setupAttributeAccessors(e){if(!this._attrValues)this._attrValues=new Map;if(!this._installedAttrAccessors)this._installedAttrAccessors=new Set;for(let t of Object.keys(e)){let n=X(t),i=e[t];if(t==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(pi(i)){this._installComputedAttribute(t,i.shape);continue}if(typeof i==="object"&&i!==null){console.warn(`${this.tagName}: initAttributes.${t} is an object. Use a regular property instead.`);continue}if(i===!0)throw Error(`${this.tagName}: static initAttributes.${t} defaults a boolean attribute to true, but HTML boolean attributes are false-by-default (presence = true, absence = false) and `+`cannot reflect a true default — it would silently become false. Use { ${t}: false }, or model it as a string/number attribute or a plain (non-attribute) property.`);let o=this,s=!1;while(o){let r=Object.getOwnPropertyDescriptor(o,t);if(r){if(!r.configurable||r.get||r.set){s=!0;break}break}o=Object.getPrototypeOf(o)}if(s)continue;this._installAttrAccessor(t,n,i)}}_installAttrAccessor(e,t,n){Object.defineProperty(this,e,{enumerable:!1,configurable:!0,get:()=>{let i=()=>{let o=this._attrTypedOverride?.get(e);return o!==void 0&&o.reflected===this.getAttribute(t)?{value:o.value}:void 0};if(typeof n==="boolean"){if(this.hasAttribute(t))return i()?.value??!0;if(this._attrValues.has(e))return this._attrValues.get(e);return!1}else if(this.hasAttribute(t)){if(typeof n==="number")return i()?.value??parseFloat(this.getAttribute(t));let o=this._attrTypedOverride?.get(e);if(o!==void 0&&o.reflected===this.getAttribute(t))return o.value;return this.getAttribute(t)}else if(this._attrValues.has(e))return this._attrValues.get(e);else return n},set:(i)=>{if(i!=null&&typeof i!==typeof n&&typeof i!=="object")this._attrTypedOverride??=new Map,this._attrTypedOverride.set(e,{reflected:typeof n==="boolean"&&i?"":String(i),value:i});else this._attrTypedOverride?.delete(e);if(i!=null&&typeof i!==typeof n&&typeof n!=="object"){let o=`${this.tagName.toLowerCase()}.${e}`;if(!bi.has(o))bi.add(o),console.error(`<${this.tagName.toLowerCase()}>: ${e} is declared ${typeof n} (default ${JSON.stringify(n)}), but was written ${typeof i} ${JSON.stringify(i)}. `+"The value is applied as given — nothing is coerced — but this "+"is usually a call site left behind by a type change. (tosijs#24)")}if(typeof n==="boolean"){if(i!==w(this)[e]){if(i)this.setAttribute(t,"");else this.removeAttribute(t);this.queueRender(),this._attrValues.set(e,!!i)}}else if(typeof n==="number"){if(i!==parseFloat(w(this)[e]))this.setAttribute(t,i),this.queueRender(),this._attrValues.set(e,i)}else if(typeof i==="object"||`${i}`!==`${w(this)[e]}`){if(i===null||i===void 0||typeof i==="object")this.removeAttribute(t);else this.setAttribute(t,i);this.queueRender(),this._attrValues.set(e,i)}}}),this._installedAttrAccessors.add(e)}_recoverShadowedAttrAccessors(){let e=this._installedAttrAccessors,t=this.constructor._resolveInitAttributes();if(e==null||t==null)return;let n=[];for(let i of e){let o=Object.getOwnPropertyDescriptor(this,i);if(o==null||o.get!=null||o.set!=null)continue;let s=o.value;delete this[i],this._installAttrAccessor(i,X(i),t[i]),this[i]=s,n.push(i)}if(n.length>0&&!yi.has(this.tagName)){yi.add(this.tagName);let i=n.map((o)=>`'${o}'`).join(", ");console.warn(`<${this.tagName.toLowerCase()}> declares instance field(s) ${i} that shadow static initAttributes accessors (class fields use [[Define]] semantics). The field value was adopted and the `+"reactive accessor restored — delete the field declaration; "+"static initAttributes already defines the property.")}}connectedCallback(){if(this._recoverShadowedAttrAccessors(),this._drainPendingAttrOps(),Dr(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);{let t=this.constructor,n=Ie(t),i=n?.description;if(typeof i==="string"&&i!==""&&!this.hasAttribute("aria-description")&&!this.hasAttribute("aria-describedby"))this.setAttribute("aria-description",i);let o=n?.role;if(typeof o==="string"&&o!==""&&!this.getAttribute("role"))this.setAttribute("role",o)}if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");let e=w(this).handleResize??w(this).onResize;if(e!==void 0){if(cn.observe(this),w(this)._onResize==null)w(this)._onResize=e.bind(this);this.addEventListener("resize",w(this)._onResize)}if(w(this).value!=null&&this.getAttribute("value")!=null)w(this)._value=this.getAttribute("value");if(this.internals&&w(this).value!==void 0)this.internals.setFormValue(w(this).value),this.validateValue();this.queueRender()}disconnectedCallback(){cn.unobserve(this)}formResetCallback(){if(w(this).value!==void 0)w(this).value=w(this).defaultValue??""}formDisabledCallback(e){if(e)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(e){if(w(this).value!==void 0&&typeof e==="string")w(this).value=e}_changeQueued=!1;_renderQueued=!1;queueRender(e=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=e;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(Bi(this,"change",{bubbles:!0,composed:!0}),this.internals&&w(this).value!==void 0)this.internals.setFormValue(w(this).value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;_whenHydrated;_resolveHydrated;get hydrated(){return this._hydrated}get whenHydrated(){if(this._hydrated)return Promise.resolve();if(this._whenHydrated==null)this._whenHydrated=new Promise((e)=>{this._resolveHydrated=e});return this._whenHydrated}hydrate(){if(!this._hydrated){this.initValue();let e=typeof this.content!=="function",t=typeof this.content==="function"?this.content(C):this.content;if(t!=null&&!Array.isArray(t)&&!(t instanceof Node)&&typeof t!=="string")t=[t];if(Array.isArray(t)){let s={},r=[];for(let l of t)vn(l,this.tagName,(a)=>r.push(a),(a)=>Pi(s,a));t=r;for(let l of Object.keys(s))xn(this,l,s[l])}let n=this.constructor,i=n.shadowStyleSpec??n.styleSpec;if(n.styleSpec&&!n.shadowStyleSpec)re("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:o}=n;if(i)o=n.styleNode=C.style(st(i)),delete n.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),o=this.styleNode;if(o){let s=this.attachShadow({mode:"open"});if(s.appendChild(o.cloneNode(!0)),Yn(s,t,e),!mi.has(this.tagName)&&s.querySelector(tn)!=null)mi.add(this.tagName),console.warn(`<${this.tagName.toLowerCase()}> has data-binding sugar in its shadow-DOM content, where bindings do not operate. A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into `+"the shadow DOM — setting value queues render() and emits change "+"automatically. on() event handlers are fine. Warned once per component class.")}else if(t!==null){let s=Array.from(this.childNodes);if(!e)this._partsCache=Hr(t);Yn(this,t,e),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==null;let r=Array.from(this.querySelectorAll("slot"));if(r.length>0)r.forEach(Tt.replaceSlot);if(s.length>0){let l={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((a)=>{l[a.name]=a}),s.forEach((a)=>{let c=l[""],d=a instanceof Element?l[a.slot]:c;(d!==void 0?d:c).append(a)})}}this._hydrated=!0,this._parts=void 0,this._resolveHydrated?.()}}render(){if(this._valueChanged&&this.internals&&w(this).value!==void 0)this.internals.setFormValue(w(this).value),this.validateValue();this._valueChanged=!1}validateValue(){if(!this.internals||w(this).value===void 0)return;let e=typeof w(this).value==="string"?w(this).value:String(w(this).value);Ar(this,e)}}class Tt extends E{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(e){let t=document.createElement("tosi-slot");if(e.name!=="")t.setAttribute("name",e.name);while(e.firstChild!=null)t.appendChild(e.firstChild);e.replaceWith(t)}}var Kl=Tt.elementCreator();class Xi extends Tt{static preferredTagName="xin-slot";connectedCallback(){super.connectedCallback(),re("xin-slot","<xin-slot> is deprecated and will be REMOVED IN 2.0 — rename it to "+"<tosi-slot> (same attributes, same composition). It is registered only so your content keeps landing in the right place until you do.")}}Xi.elementCreator();var Ir="1.10.1";function Bt(e){return Object.assign(oe,e),oe}function Yi(e){return re("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),Bt(e)}var Xl=new FinalizationRegistry((e)=>{e()});function Rr(e,t=!1){if(t)return re("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),Yi(e);return Object.keys(e).forEach((n)=>{Se[n]=e[n]}),Se}var _r={};async function Gi(e,t){let n=await t(e,{Color:g,Component:E,withAttributes:jr,elements:C,svgElements:Cn,mathML:dr,varDefault:y,vars:T,xin:Se,boxed:oe,xinProxy:Rr,boxedProxy:Yi,tosi:Bt,makeComponent:Gi,bind:pe,on:yn,version:Ir}),{type:i}=n;if(i.preferredTagName=e,n.contract!=null&&Ie(i)===void 0)i.contract=n.contract;let o=n.lightStyleSpec??n.styleSpec;if(o)i.lightStyleSpec=o;let s={type:i,creator:i.elementCreator()};return _r[e]=s,s}var Mn={":host":{display:"none"}},Ct={},Pr=(e)=>import(e),Vr=["javascript","data","vbscript"];function qr(e){let t=e.replace(/[\u0000-\u0020]/g,""),n=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return n?n[1].toLowerCase():""}function Fr(e,t){let n=qr(e);if(Vr.includes(n))return`${n}: is never an honest blueprint module`;let i=Ee.blueprintSrcCheck;if(typeof i==="function"&&i(e,t)===!1)return"settings.blueprintSrcCheck returned false";return null}async function Ur(e,t,n){let i=Array.from(e.querySelectorAll(t)).filter((s)=>s.src),o=await Promise.allSettled(i.map((s)=>s.packaged()));for(let s=0;s<o.length;s++){let r=o[s];if(r.status==="rejected")console.error(`<${n}> failed to load blueprint from "${i[s].src}":`,r.reason)}}class Ji extends E{static preferredTagName="tosi-blueprint";static lightStyleSpec=Mn;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(e)=>{};async packaged(){let{tag:e,src:t,property:n}=this,i=`${e}.${n}:${t}`;if(!this.loaded){let o=Fr(t,this);if(o!==null){let s=`<tosi-blueprint> refused "${t}" — ${o}. These tags EXECUTE the module they name: strip them from user-supplied HTML, or set settings.blueprintSrcCheck to allow this source.`;throw console.error(s),Error(s)}if(Ct[i]===void 0)Ct[i]=Pr(t).then((s)=>{let r=s[n];return Gi(e,r)});else if(Ee.debug)console.log(`using cached ${e} with signature ${i}`);try{this.loaded=await Ct[i]}catch(s){throw delete Ct[i],s}this.blueprintLoaded(this.loaded)}return this.loaded}}var Yl=Ji.elementCreator();class Zi extends E{static preferredTagName="tosi-loader";static lightStyleSpec=Mn;allLoaded=()=>{};async load(){await Ur(this,"tosi-blueprint","tosi-loader"),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var Gl=Zi.elementCreator();class En extends E{static lightStyleSpec=Mn;content=null;connectedCallback(){super.connectedCallback();let e=this.tagName.toLowerCase(),t=e.replace("xin-","tosi-");re(e,`<${e}> was removed in tosijs 1.8.0 and does NOTHING — this element `+`will not hydrate. Rename it to <${t}> (same attributes, same behaviour). Deprecated since 1.7; the tag is registered only so this message can exist, and goes away in 2.0.`)}}class Qi extends En{static preferredTagName="xin-blueprint"}Qi.elementCreator();class eo extends En{static preferredTagName="xin-loader"}eo.elementCreator();var Wr=["input","textarea","select"],Kr=["cc-","current-password","new-password","one-time-code"],Xr=["password","hidden"],Jl=["[data-tosi-secret]",...Xr.map((e)=>`input[type="${e}"]`),...Wr.flatMap((e)=>Kr.map((t)=>`${e}[autocomplete^="${t}"]`))].join(",");var ye={blueprint:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,7.5,15.5,7.5,17.5 C7.5,19.5,10.5,19.5,10.5,19.5"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,14.5 C18.5,14.5,21.5,15.5,21.5,17.5 C21.5,19.5,18.5,19.5,18.5,19.5"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M7,5.09 C7,3.94,7.9,3,9,3 C9,3,20,3,20,3 C21.1,3,22,3.94,22,5.09 C22,5.09,22,12.41,22,12.41 C22,13.56,21.1,14.5,20,14.5 C20,14.5,9,14.5,9,14.5 C7.9,14.5,7,13.56,7,12.41 C7,12.41,7,5.09,7,5.09 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14.5,5.5 C14.5,5.5,14.5,11.5,14.5,11.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16.5,7.5 C16.5,7.5,16.5,8.5,16.5,8.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,7.5 C12.5,7.5,12.5,8.5,12.5,8.5"/><g/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,21.5 C18.5,21.5,17.5,20.5,17.5,20.5 C17.5,20.5,16.5,21.5,16.5,21.5"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,21.5 C12.5,21.5,11.5,20.5,11.5,20.5 C11.5,20.5,10.5,21.5,10.5,21.5"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,18.5,14.5,18.5,14.5 C18.5,14.5,18.5,19.5,18.5,19.5 C18.5,19.5,10.5,19.5,10.5,19.5 C10.5,19.5,10.5,14.5,10.5,14.5 z"/><g><g><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,16.5 C14,16.5,16,16.5,16,16.5 C16,16.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:evenodd;stroke:none;" d="M3.59,8.5 C3.59,8.5,12.59,8.5,12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5 C14.53,19.5,5.53,19.5,5.53,19.5 C5.53,19.5,3.59,8.5,3.59,8.5 z"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,11.12,11.5,11.12,11.5 C11.12,11.5,2.12,11.5,2.12,11.5 C2.12,11.5,3.59,8.5,3.59,8.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.12,11.5 C4.12,11.5,5.53,19.5,5.53,19.5"/></g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M9.24,12.5 C10.75,12.5,12.2,13.73,12.46,15.24 C12.46,15.24,12.46,15.24,12.46,15.24 C12.68,16.49,11.85,17.5,10.6,17.5 C10.6,17.5,10.55,17.5,10.55,17.5 C10.17,17.5,9.92,17.81,9.98,18.19 C9.98,18.19,9.98,18.19,9.98,18.19 C10.21,19.47,9.36,20.5,8.08,20.5 C8.08,20.5,6.39,20.5,6.39,20.5 C5.1,20.5,3.87,19.45,3.64,18.16 C3.64,18.16,3.12,15.21,3.12,15.21 C2.86,13.71,3.86,12.5,5.35,12.5 C5.35,12.5,9.24,12.5,9.24,12.5 z"/></g></g></svg> ',earth:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,13.46 C5.1,16.52,4,20.13,4,24 C4,31.81,8.47,38.57,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 z"/><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C20.18,4.28,22.06,4,24,4 C27.57,4,30.92,4.93,33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C33.81,42.07,29.13,44,24,44 C21.03,44,18.22,43.35,15.69,42.2 C15.69,42.2,27,29,27,29 C27,29,27,25,27,25 C27,25,21,23,21,23 C21,23,15,19,15,19 C15,19,11,19,11,19 C11,19,11,13,11,13 C11,13,13,11,13,11 C13,11,15,15,15,15 C15,15,17,15,17,15 C17,15,17,9,17,9 C17,9,18.4,4.79,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C18.4,4.79,17,9,17,9 C17,9,17,15,17,15 C17,15,15,15,15,15 C15,15,13,11,13,11 C13,11,11,13,11,13 C11,13,11,19,11,19 C11,19,15,19,15,19 C15,19,21,23,21,23 C21,23,27,25,27,25 C27,25,27,29,27,29 C27,29,15.69,42.2,15.69,42.2 C15.46,42.09,15.23,41.98,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 C9.57,9.32,13.62,6.19,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C41.43,35.23,44,29.91,44,24 C44,16.52,39.9,10,33.82,6.57 z"/></g></g></g></svg> ',cmy:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#00ff00;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#000000;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#02fefe;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#fffe00;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#ff00ff;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',rgb:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#ff00ff;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#ffff00;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#ffffff;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#00ffff;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#00ff00;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',xrColor:'<svg class="color filled" viewBox="0 0 40 24"><g><g><g><path style="fill:#000000;fill-rule:evenodd;" d="M20,2 C19.99,2,19.98,2,19.98,2 C8.39,2,2,3.61,2,12 C2,18.41,5.32,22,10.54,22 C15.77,22,17.37,17.85,19.98,17.85 C19.98,17.85,19.99,17.85,20,17.85 C20.01,17.85,20.02,17.85,20.02,17.85 C22.63,17.85,24.23,22,29.46,22 C34.68,22,38,18.41,38,12 C38,3.61,31.61,2,20.02,2 C20.02,2,20.01,2,20,2 C20,2,20,2,20,2 z"/></g><path style="fill:#fbed21;fill-rule:evenodd;" d="M12.2,19.84 C15.79,19.39,17.07,16.46,19.07,16.46 C19.07,16.46,19.08,16.46,19.09,16.46 C19.09,16.46,19.1,16.46,19.11,16.46 C19.44,16.46,19.75,16.54,20.06,16.68 C20.37,16.54,20.68,16.46,21.01,16.46 C21.02,16.46,21.02,16.46,21.03,16.46 C21.04,16.46,21.04,16.46,21.05,16.46 C23.05,16.46,24.33,19.39,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M12.2,19.84 C12.52,19.87,12.86,19.89,13.21,19.89 C16.86,19.89,18.37,17.43,20.06,16.68 C19.75,16.54,19.44,16.46,19.11,16.46 C19.1,16.46,19.09,16.46,19.09,16.46 C19.08,16.46,19.07,16.46,19.07,16.46 C17.07,16.46,15.79,19.39,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M20.06,3.35 C20.37,3.35,20.69,3.35,21.01,3.35 C21.02,3.35,21.02,3.35,21.03,3.35 C21.03,3.35,21.03,3.35,21.03,3.35 C21.04,3.35,21.04,3.35,21.05,3.35 C30.64,3.35,35.92,4.68,35.92,11.62 C35.92,16.92,33.18,19.89,28.86,19.89 C28.53,19.89,28.22,19.87,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C20.06,3.35,20.06,3.35,20.06,3.35 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M20.06,16.68 C21.74,17.43,23.25,19.89,26.91,19.89 C27.26,19.89,27.59,19.87,27.92,19.84 C24.33,19.39,23.05,16.46,21.05,16.46 C21.04,16.46,21.04,16.46,21.03,16.46 C21.02,16.46,21.02,16.46,21.01,16.46 C20.68,16.46,20.37,16.54,20.06,16.68 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M12.2,19.84 C11.9,19.87,11.59,19.89,11.26,19.89 C6.94,19.89,4.19,16.92,4.19,11.62 C4.19,4.68,9.48,3.35,19.07,3.35 C19.07,3.35,19.08,3.35,19.09,3.35 C19.09,3.35,19.09,3.35,19.09,3.35 C19.09,3.35,19.1,3.35,19.11,3.35 C19.43,3.35,19.75,3.35,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/></g><g><path style="fill:#8cc63e;fill-rule:nonzero;" d="M22.55,8.63 C22.55,9.05,22.55,9.46,22.55,9.88 C22.54,10.25,22.85,10.56,23.2,10.55 C23.54,10.56,23.85,10.25,23.85,9.88 C23.85,9.46,23.85,9.05,23.85,8.63 C23.85,8.26,23.54,7.95,23.2,7.96 C22.85,7.95,22.54,8.26,22.55,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M17.32,8.63 C17.32,9.05,17.32,9.46,17.32,9.88 C17.31,10.25,17.62,10.56,17.97,10.55 C18.31,10.56,18.62,10.25,18.62,9.88 C18.62,9.46,18.62,9.05,18.62,8.63 C18.62,8.26,18.31,7.95,17.97,7.96 C17.62,7.95,17.31,8.26,17.32,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M19.99,4.39 C19.99,8.09,19.99,11.8,19.99,15.5 C19.99,15.87,20.3,16.18,20.64,16.17 C20.99,16.18,21.3,15.87,21.29,15.5 C21.29,11.8,21.29,8.09,21.29,4.39 C21.3,4.02,20.99,3.71,20.64,3.72 C20.3,3.71,19.99,4.02,19.99,4.39 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M21.43,8.63 C21.43,9.05,21.43,9.46,21.43,9.88 C21.42,10.25,21.73,10.56,22.08,10.55 C22.42,10.56,22.73,10.25,22.73,9.88 C22.73,9.46,22.73,9.05,22.73,8.63 C22.73,8.26,22.42,7.95,22.08,7.96 C21.73,7.95,21.42,8.26,21.43,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M16.2,8.63 C16.2,9.05,16.2,9.46,16.2,9.88 C16.19,10.25,16.5,10.56,16.85,10.55 C17.19,10.56,17.5,10.25,17.5,9.88 C17.5,9.46,17.5,9.05,17.5,8.63 C17.5,8.26,17.19,7.95,16.85,7.96 C16.5,7.95,16.19,8.26,16.2,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M18.87,4.39 C18.87,8.09,18.87,11.8,18.87,15.5 C18.87,15.87,19.18,16.18,19.52,16.17 C19.86,16.18,20.18,15.87,20.17,15.5 C20.17,11.8,20.17,8.09,20.17,4.39 C20.18,4.02,19.86,3.71,19.52,3.72 C19.18,3.71,18.87,4.02,18.87,4.39 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M21.97,8.63 C21.97,9.05,21.97,9.46,21.97,9.88 C21.97,10.25,22.28,10.56,22.62,10.55 C22.97,10.56,23.28,10.25,23.27,9.88 C23.27,9.46,23.27,9.05,23.27,8.63 C23.28,8.26,22.97,7.95,22.62,7.96 C22.28,7.95,21.97,8.26,21.97,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M16.74,8.63 C16.74,9.05,16.74,9.46,16.74,9.88 C16.74,10.25,17.05,10.56,17.39,10.55 C17.74,10.56,18.05,10.25,18.04,9.88 C18.04,9.46,18.04,9.05,18.04,8.63 C18.05,8.26,17.74,7.95,17.39,7.96 C17.05,7.95,16.74,8.26,16.74,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M19.41,4.39 C19.41,8.09,19.41,11.8,19.41,15.5 C19.41,15.87,19.72,16.18,20.07,16.17 C20.41,16.18,20.72,15.87,20.72,15.5 C20.72,11.8,20.72,8.09,20.72,4.39 C20.72,4.02,20.41,3.71,20.07,3.72 C19.72,3.71,19.41,4.02,19.41,4.39 z"/></g></g></svg> ',tosiFavicon:'<svg class="color" viewBox="0 0 48 48"><g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M1,9 C1,4.58,4.58,1,9,1 C9,1,39,1,39,1 C43.42,1,47,4.58,47,9 C47,9,47,39,47,39 C47,43.42,43.42,47,39,47 C39,47,9,47,9,47 C4.58,47,1,43.42,1,39 C1,39,1,9,1,9 z"/><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,10,31,10,35 C10,39,16,39,16,39"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,29 C32,29,38,31,38,35 C38,39,32,39,32,39"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,10.18 C9,7.87,10.79,6,13,6 C13,6,35,6,35,6 C37.21,6,39,7.87,39,10.18 C39,10.18,39,24.82,39,24.82 C39,27.13,37.21,29,35,29 C35,29,13,29,13,29 C10.79,29,9,27.13,9,24.82 C9,24.82,9,10.18,9,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,43 C32,43,30,41,30,41 C30,41,28,43,28,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,43 C20,43,18,41,18,41 C18,41,16,43,16,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,32,29,32,29 C32,29,32,39,32,39 C32,39,16,39,16,39 C16,39,16,29,16,29 z"/></g></g></g></svg> ',tosiPlatform:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#3ea9f5;fill-rule:evenodd;stroke:none;" d="M23.97,47 C23.97,47,39,47,39,47 C43.42,47,47,43.42,47,39 C47,39,47,9,47,9 C47,4.58,43.42,1,39,1 C39,1,9,1,9,1 C4.58,1,1,4.58,1,9 C1,9,1,39,1,39 C1,41.64,2.28,43.98,4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;" d="M4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 C23.97,47,9,47,9,47 C7.22,47,5.58,46.42,4.25,45.44 z"/></g><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M35,35 C35,35,32.17,35,32.17,35 C32.17,35,32.17,37.83,32.17,37.83"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,39 C31,39,28.17,39,28.17,39 C28.17,39,28.17,41.83,28.17,41.83"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7.48,16 C4.45,16,2,18.45,2,21.48 C2,21.48,2,21.48,2,21.48 C2,23.98,4.02,26,6.52,26 C6.52,26,6.62,26,6.62,26 C7.38,26,8,26.62,8,27.38 C8,27.38,8,27.38,8,27.38 C8,29.93,10.07,32,12.62,32 C12.62,32,16,32,16,32 C18.58,32,20.68,29.91,20.68,27.32 C20.68,27.32,20.68,21.42,20.68,21.42 C20.68,18.43,18.25,16,15.26,16 C15.26,16,7.48,16,7.48,16 z"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,29 C17,29,33,29,33,29 C33,29,33,29,33,29 C33,34.52,28.52,39,23,39 C23,39,23,39,23,39 C19.69,39,17,36.31,17,33 C17,33,17,29,17,29 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40.52,16 C43.55,16,46,18.45,46,21.48 C46,21.48,46,21.48,46,21.48 C46,23.98,43.98,26,41.48,26 C41.48,26,41.38,26,41.38,26 C40.62,26,40,26.62,40,27.38 C40,27.38,40,27.38,40,27.38 C40,29.93,37.93,32,35.38,32 C35.38,32,32,32,32,32 C29.42,32,27.32,29.91,27.32,27.32 C27.32,27.32,27.32,21.42,27.32,21.42 C27.32,18.43,29.75,16,32.74,16 C32.74,16,40.52,16,40.52,16 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M6,10.18 C6,7.87,7.79,6,10,6 C10,6,32,6,32,6 C34.21,6,36,7.87,36,10.18 C36,10.18,36,24.82,36,24.82 C36,27.13,34.21,29,32,29 C32,29,10,29,10,29 C7.79,29,6,27.13,6,24.82 C6,24.82,6,10.18,6,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M21,11 C21,11,21,23,21,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M25,15 C25,15,25,17,25,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,15 C17,15,17,17,17,17"/></g></g></g></svg> ',tosiUi:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M3,33 C3,31.9,3.9,31,5,31 C5,31,43,31,43,31 C44.1,31,45,31.9,45,33 C45,33,45,43,45,43 C45,44.1,44.1,45,43,45 C43,45,5,45,5,45 C3.9,45,3,44.1,3,43 C3,43,3,33,3,33 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,35 C7,35,7,36.34,7,38 C7,39.66,8.34,41,10,41 C11.66,41,13,39.66,13,38 C13,36.34,13,35,13,35"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,35 C17,35,17,41,17,41"/></g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M38,33 C40.76,33,43,35.24,43,38 C43,40.76,40.76,43,38,43 C35.24,43,33,40.76,33,38 C33,35.24,35.24,33,38,33 z"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40,36 C40,36,36,40,36,40"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M36,36 C36,36,40,40,40,40"/></g></g><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21.01 C15.97,21.01,9.97,23.01,9.97,27.01 C9.97,31.01,15.97,31.01,15.97,31.01"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31.97,21.01 C31.97,21.01,37.97,23.01,37.97,27.01 C37.97,31.01,31.97,31.01,31.97,31.01"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,33 C31,33,29.49,31,29.49,31 C29.49,31,27.97,33,27.97,33"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M19.97,33 C19.97,33,17.97,31,17.97,31 C17.97,31,15.97,33,15.97,33"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21 C15.97,21,31.97,21,31.97,21 C31.97,21,31.97,31,31.97,31 C31.97,31,15.97,31,15.97,31 C15.97,31,15.97,21,15.97,21 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,7.18 C9,4.87,10.79,3,13,3 C13,3,35.02,3,35.02,3 C37.23,3,39.03,4.87,39.03,7.18 C39.03,7.18,39.03,21.82,39.03,21.82 C39.03,24.13,37.23,26,35.02,26 C35.02,26,13,26,13,26 C10.79,26,9,24.13,9,21.82 C9,21.82,9,7.18,9,7.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/></g></g></g></svg> ',tosiXr:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,5,15.25,5,17.25 C5,19.25,8,19.25,8,19.25"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,14.25 C16,14.25,19,15.25,19,17.25 C19,19.25,16,19.25,16,19.25"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.5,4.85 C4.5,3.69,5.4,2.75,6.5,2.75 C6.5,2.75,17.5,2.75,17.5,2.75 C18.61,2.75,19.5,3.69,19.5,4.85 C19.5,4.85,19.5,12.16,19.5,12.16 C19.5,13.32,18.61,14.25,17.5,14.25 C17.5,14.25,6.5,14.25,6.5,14.25 C5.4,14.25,4.5,13.32,4.5,12.16 C4.5,12.16,4.5,4.85,4.5,4.85 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12,5.25 C12,5.25,12,11.25,12,11.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,7.25 C14,7.25,14,8.25,14,8.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,7.25 C10,7.25,10,8.25,10,8.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,21.25 C16,21.25,15,20.25,15,20.25 C15,20.25,14,21.25,14,21.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,21.25 C10,21.25,9,20.25,9,20.25 C9,20.25,8,21.25,8,21.25"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,16,14.25,16,14.25 C16,14.25,16,19.25,16,19.25 C16,19.25,8,19.25,8,19.25 C8,19.25,8,14.25,8,14.25 z"/><path style="fill:#ff7bac;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-width:1;" d="M12,4 C12,4,11.99,4,11.99,4 C6.19,4,3,4.73,3,8.5 C3,11.39,4.66,13,7.27,13 C9.88,13,10.68,11.13,11.99,11.13 C11.99,11.13,12,11.13,12,11.13 C12,11.13,12.01,11.13,12.01,11.13 C13.32,11.13,14.12,13,16.73,13 C19.34,13,21,11.39,21,8.5 C21,4.73,17.81,4,12.01,4 C12.01,4,12,4,12,4 C12,4,12,4,12,4 z"/></g></svg> ',tosi:'<svg class="color" viewBox="0 0 48 48"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M38.35,31.7 C39.78,34.37,38.78,37.69,36.11,39.13 C36.11,39.13,36.11,39.13,36.11,39.13 C33.92,40.31,31.18,39.48,29.99,37.29 C29.99,37.29,29.95,37.2,29.95,37.2 C29.58,36.53,28.75,36.27,28.08,36.64 C28.08,36.64,28.08,36.64,28.08,36.64 C25.83,37.84,23.03,37,21.82,34.76 C21.82,34.76,20.22,31.78,20.22,31.78 C18.99,29.5,19.85,26.67,22.12,25.44 C22.12,25.44,27.32,22.65,27.32,22.65 C29.96,21.23,33.24,22.22,34.66,24.85 C34.66,24.85,38.35,31.7,38.35,31.7 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M10.65,31.7 C9.22,34.37,10.22,37.69,12.89,39.13 C12.89,39.13,12.89,39.13,12.89,39.13 C15.08,40.31,17.82,39.48,19.01,37.29 C19.01,37.29,19.05,37.2,19.05,37.2 C19.42,36.53,20.25,36.27,20.92,36.64 C20.92,36.64,20.92,36.64,20.92,36.64 C23.17,37.84,25.97,37,27.18,34.76 C27.18,34.76,28.78,31.78,28.78,31.78 C30.01,29.5,29.15,26.67,26.88,25.44 C26.88,25.44,21.68,22.65,21.68,22.65 C19.04,21.23,15.76,22.22,14.34,24.85 C14.34,24.85,10.65,31.7,10.65,31.7 z"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32.5,43 C32.5,43,30.5,41,30.5,41 C30.5,41,28.5,43,28.5,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,43 C20.5,43,18.5,41,18.5,41 C18.5,41,16.5,43,16.5,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16.5,29 C16.5,29,32.5,29,32.5,29 C32.5,29,32.5,36,32.5,36 C32.5,37.66,31.16,39,29.5,39 C29.5,39,19.5,39,19.5,39 C17.84,39,16.5,37.66,16.5,36 C16.5,36,16.5,29,16.5,29 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9.5,10.18 C9.5,7.87,11.29,6,13.5,6 C13.5,6,35.5,6,35.5,6 C37.71,6,39.5,7.87,39.5,10.18 C39.5,10.18,39.5,24.82,39.5,24.82 C39.5,27.13,37.71,29,35.5,29 C35.5,29,13.5,29,13.5,29 C11.29,29,9.5,27.13,9.5,24.82 C9.5,24.82,9.5,10.18,9.5,10.18 z"/><g><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24.5,11 C24.5,11,24.5,23,24.5,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28.5,15 C28.5,15,28.5,17,28.5,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,15 C20.5,15,20.5,17,20.5,17"/></g></g></g></svg> ',discord:'<svg class="filled" version="1" viewBox="0 0 1013 768"><path d="M858 64c-60-28-131-51-204-64l-5-1c-8 14-17 32-25 51l-1 4c-35-6-75-9-116-9s-81 3-120 9l4-1c-9-22-18-40-28-57l1 3c-79 14-149 36-214 67l5-2c-132 196-168 387-150 575v0c73 55 158 99 250 127l6 2c19-26 38-55 53-85l2-3c-33-13-62-27-89-43l2 1c7-5 14-11 21-16 75 36 163 57 256 57s181-21 260-59l-4 2c7 6 14 11 21 16-25 15-53 29-83 40l-4 1c17 34 36 63 56 90l-1-2c98-30 183-74 259-130l-2 2c21-218-36-407-151-575zM338 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101zM675 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101z"></path></svg> ',facebook:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>',game:'<svg class="filled" version="1" viewBox="0 0 704 512"><path d="M528 97v-1h-336c-88 0-160 72-160 160s72 160 160 160c52 0 99-25 128-64h64c29 39 76 64 128 64 88 0 160-72 160-160 0-83-63-151-144-159zM288 288h-64v64h-64v-64h-64v-64h64v-64h64v64h64v64zM480 288c-18 0-32-14-32-32s14-32 32-32 32 14 32 32-14 32-32 32zM576 288c-18 0-32-14-32-32 0-18 14-32 32-32s32 14 32 32c0 18-14 32-32 32z"></path></svg> ',google:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M256 0c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zM260 448c-106 0-192-86-192-192s86-192 192-192c52 0 95 19 129 50l-52 50c-14-14-39-30-77-30-66 0-119 54-119 121s54 121 119 121c76 0 105-55 109-83h-109v-66h181c2 10 3 19 3 32 0 110-73 188-184 188z"></path></svg> ',npm:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M0 0v512h512v-512h-512zM416 416h-64v-256h-96v256h-160v-320h320v320z"></path></svg> ',youtube:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>',blog:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10.02 C21,10.02,21,15,21,15 C21,15.53,20.79,16.04,20.41,16.41 C20.04,16.79,19.53,17,19,17 C19,17,7,17,7,17 C5.67,18.33,4.33,19.67,3,21 C3,21,3,5,3,5 C3,4.47,3.21,3.96,3.59,3.59 C3.96,3.21,4.47,3,5,3 C8.53,3,10.49,3,14.02,3"/><path style="" d="M19,2 C19.54,1.46,20.32,1.25,21.05,1.45 C21.78,1.65,22.35,2.22,22.55,2.95 C22.75,3.68,22.54,4.46,22,5 C22,5,15.5,11.5,15.5,11.5 C14.17,11.83,12.83,12.17,11.5,12.5 C11.83,11.17,12.17,9.83,12.5,8.5 C15.67,5.33,15.83,5.17,19,2 z"/><path style="" d="M14.6,3"/><path style="" d="M21,8.77"/><path style="" d="M7,7 C7,7,10,7,10,7"/><path style="" d="M7,10 C7,10,9,10,9,10"/></g></svg> ',bug:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M8,6 C8,3.79,9.79,2,12,2 C14.21,2,16,3.79,16,6 C16,6,8,6,8,6 z"/><path style="" d="M20,7 C20,7,18,9,18,9"/><path style="" d="M20,19 C20,19,18,17,18,17"/><path style="" d="M21,13 C21,13,18,13,18,13"/><path style="" d="M16.44,9 C17.3,9,18,9.7,18,10.56 C18,10.56,18,15,18,15 C18,18.31,15.31,21,12,21 C8.69,21,6,18.31,6,15 C6,15,6,10.56,6,10.56 C6,9.7,6.7,9,7.56,9 C7.56,9,16.44,9,16.44,9 z"/><path style="" d="M4,7 C4,7,6,9,6,9"/><path style="" d="M4,19 C4,19,6,17,6,17"/><path style="" d="M3,13 C3,13,6,13,6,13"/><path style="" d="M12,12 C12,12,12,17,12,17"/></g></svg> ',activity:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>',airplay:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>',alertCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertTriangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',alignCenter:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line></svg>',alignJustify:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line></svg>',alignLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line></svg>',alignRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line></svg>',anchor:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path></svg>',aperture:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg>',archive:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>',arrowUpRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>',atSign:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path></svg>',award:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>',barChart2:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>',barChart:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line></svg>',batteryCharging:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline></svg>',battery:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line></svg>',bellOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',bell:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>',bluetooth:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline></svg>',bold:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path></svg>',bookOpen:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>',book:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>',bookmark:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg>',box:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',briefcase:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>',calendar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>',cameraOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path></svg>',camera:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>',cast:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg>',checkCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',checkSquare:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',chrome:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line></svg>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></svg>',clipboard:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>',clock:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>',cloudDrizzle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudLightning:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline></svg>',cloudOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',cloudRain:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudSnow:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line></svg>',cloud:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path></svg>',code:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>',codepen:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>',codesandbox:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',coffee:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line></svg>',columns:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path></svg>',command:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path></svg>',compass:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>',copy:'<svg class="stroked" viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',cpu:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg>',creditCard:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>',crop:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path></svg>',crosshair:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line></svg>',database:'<svg class="stroked" viewBox="0 0 24 24"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>',delete:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line></svg>',disc:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle></svg>',divideCircle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle></svg>',divideSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line></svg>',divide:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle></svg>',dollarSign:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>',downloadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path></svg>',download:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>',dribbble:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path></svg>',droplet:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path></svg>',edit2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>',edit3:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>',edit:'<svg class="stroked" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>',externalLink:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',eyeOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',eye:'<svg class="stroked" viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',fastForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon></svg>',feather:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>',figma:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path></svg>',fileMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line></svg>',filePlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>',fileText:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>',file:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>',film:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line></svg>',filter:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>',flag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>',folderMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folderPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folder:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path></svg>',frown:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',gift:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>',gitBranch:'<svg class="stroked" viewBox="0 0 24 24"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',gitCommit:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>',gitMerge:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path></svg>',gitPullRequest:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line></svg>',github:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>',gitlab:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>',globe:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>',grid:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>',hardDrive:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line></svg>',hash:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line></svg>',headphones:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path></svg>',heart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>',helpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',hexagon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>',home:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>',image:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>',inbox:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path></svg>',info:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="7.75"></line></svg>',instagram:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>',italic:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line></svg>',key:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.78 7.78 5.5 5.5 0 0 1 7.78-7.78zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path></svg>',layers:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>',layout:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line></svg>',lifeBuoy:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line></svg>',link2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg>',link:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>',linkedin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>',list:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>',loader:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',lock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg> ',logIn:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>',logOut:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>',mail:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>',mapPin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>',map:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line></svg>',maximize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',maximize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>',meh:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',menu:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>',messageCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>',messageSquare:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>',micOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',mic:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',minimize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',minimize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path></svg>',minusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></svg>',monitor:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>',moon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>',moreHorizontal:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>',moreVertical:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle></svg>',mousePointer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg>',move:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line></svg>',music:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></svg>',octagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon></svg>',package:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',paperclip:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path></svg>',pauseCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line></svg>',pause:'<svg class="stroked" viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect></svg>',penTool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.59 7.59"></path><circle cx="11" cy="11" r="2"></circle></svg>',percent:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle></svg>',phoneCall:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneForwarded:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneIncoming:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneMissed:'<svg class="stroked" viewBox="0 0 24 24"><line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line></svg>',phoneOutgoing:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phone:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',pieChart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>',playCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>',plusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>',pocket:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline></svg>',power:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>',printer:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>',radio:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path></svg>',repeat:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg>',rewind:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon></svg>',cornerDownRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path></svg>',cornerRightDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path></svg>',cornerRightUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path></svg>',cornerUpRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path></svg>',refreshCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>',rotateCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>',skipForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line></svg>',toggleRight:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle></svg>',rss:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>',save:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>',scissors:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line></svg>',search:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',send:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>',server:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg>',settings:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M4.78,6.75 C6.02,7.26,7.26,6.02,6.75,4.78 C6.75,4.78,6.24,3.57,6.24,3.57 C5.93,2.8,6.29,1.92,7.06,1.6 C7.06,1.6,8.14,1.15,8.14,1.15 C8.91,0.83,9.79,1.2,10.11,1.96 C10.11,1.96,10.61,3.18,10.61,3.18 C11.12,4.42,12.88,4.42,13.39,3.18 C13.39,3.18,13.89,1.97,13.89,1.97 C14.21,1.2,15.09,0.83,15.86,1.15 C15.86,1.15,16.94,1.6,16.94,1.6 C17.71,1.92,18.08,2.8,17.76,3.57 C17.76,3.57,17.15,5.03,17.15,5.03 C16.64,6.27,17.88,7.51,19.12,7 C19.12,7,20.51,6.42,20.51,6.42 C21.28,6.1,22.16,6.47,22.47,7.23 C22.47,7.23,22.92,8.32,22.92,8.32 C23.24,9.09,22.88,9.96,22.11,10.28 C22.11,10.28,21.07,10.71,21.07,10.71 C19.83,11.23,19.83,12.98,21.07,13.49 C21.07,13.49,22.04,13.89,22.04,13.89 C22.8,14.21,23.17,15.09,22.85,15.86 C22.85,15.86,22.4,16.94,22.4,16.94 C22.08,17.71,21.2,18.07,20.43,17.76 C20.43,17.76,19.22,17.25,19.22,17.25 C17.98,16.74,16.74,17.98,17.25,19.22 C17.25,19.22,17.76,20.43,17.76,20.43 C18.07,21.2,17.71,22.08,16.94,22.4 C16.94,22.4,15.86,22.85,15.86,22.85 C15.09,23.17,14.21,22.8,13.89,22.04 C13.89,22.04,13.39,20.82,13.39,20.82 C12.88,19.58,11.12,19.58,10.61,20.82 C10.61,20.82,10.11,22.04,10.11,22.04 C9.79,22.8,8.91,23.17,8.14,22.85 C8.14,22.85,7.06,22.4,7.06,22.4 C6.29,22.08,5.93,21.2,6.24,20.44 C6.24,20.44,6.64,19.47,6.64,19.47 C7.16,18.23,5.92,16.99,4.68,17.5 C4.68,17.5,3.64,17.93,3.64,17.93 C2.87,18.25,1.99,17.89,1.67,17.12 C1.67,17.12,1.22,16.04,1.22,16.04 C0.91,15.27,1.27,14.39,2.04,14.07 C2.04,14.07,3.43,13.49,3.43,13.49 C4.67,12.98,4.67,11.23,3.43,10.71 C3.43,10.71,1.96,10.11,1.96,10.11 C1.2,9.79,0.83,8.91,1.15,8.14 C1.15,8.14,1.6,7.06,1.6,7.06 C1.92,6.29,2.8,5.93,3.57,6.24 C3.57,6.24,4.78,6.75,4.78,6.75 z M14.31,11.04 C14.84,12.32,14.23,13.78,12.96,14.31 C11.68,14.84,10.22,14.23,9.69,12.96 C9.16,11.68,9.77,10.22,11.04,9.69 C12.32,9.16,13.78,9.77,14.31,11.04 z"/></g></svg> ',share2:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>',share:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg>',shieldOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',shield:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>',shoppingBag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>',shoppingCart:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>',shuffle:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>',sidebar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line></svg>',slack:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path></svg>',slash:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>',sliders:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg>',smartphone:'<svg class="stroked" viewBox="0 0 24 24"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',smile:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',speaker:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line></svg>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',star:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',stopCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect></svg>',sun:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>',sunrise:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline></svg>',sunset:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline></svg>',table:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path></svg>',tablet:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',tag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line></svg>',target:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle></svg>',terminal:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>',thermometer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path></svg>',tool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>',trash2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>',trash:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',trello:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect></svg>',trendingDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline></svg>',trendingUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>',triangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg>',truck:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle></svg>',tv:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',twitter:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>',type:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line></svg>',umbrella:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path></svg>',underline:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line></svg>',unlock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path></svg>',thumbsUp:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>',arrowRightCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>',arrowRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></svg>',chevronsRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>',uploadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>',upload:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>',userCheck:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline></svg>',userMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userX:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line></svg>',user:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>',users:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>',videoOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',video:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>',voicemail:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line></svg>',volume1:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volume2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volumeX:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line></svg>',volume:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon></svg>',watch:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path></svg>',wifiOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wifi:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wind:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>',xCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>',x:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',zapOff:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>',zap:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>',zoomIn:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',zoomOut:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',fontBold:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M13.5,11 C15.71,11,17.5,12.68,17.5,14.75 C17.5,16.82,15.71,18.5,13.5,18.5 C13.5,18.5,8.5,18.5,8.5,18.5 C8.5,18.5,8.5,3.5,8.5,3.5 C8.5,3.5,13.5,3.5,13.5,3.5 C15.71,3.5,17.5,5.18,17.5,7.25 C17.5,9.32,15.71,11,13.5,11 C13.5,11,13.5,11,13.5,11 z"/><path style="" d="M13.5,11 C13.5,11,8.5,11,8.5,11"/><path style="" d="M12.5,11 C14.71,11,16.5,12.68,16.5,14.75 C16.5,16.82,14.71,18.5,12.5,18.5 C12.5,18.5,7.5,18.5,7.5,18.5 C7.5,18.5,7.5,3.5,7.5,3.5 C7.5,3.5,12.5,3.5,12.5,3.5 C14.71,3.5,16.5,5.18,16.5,7.25 C16.5,9.32,14.71,11,12.5,11 C12.5,11,12.5,11,12.5,11 z"/><path style="" d="M12.5,11 C12.5,11,7.5,11,7.5,11"/></g></svg> ',fontItalic:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M17,4.5 C17,4.5,13,4.5,13,4.5"/><path style="" d="M11,19.5 C11,19.5,7,19.5,7,19.5"/><path style="" d="M15,4.5 C15,4.5,9,19.5,9,19.5"/></g></svg> ',fontUnderline:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M7.5,3.5 C7.5,3.5,7.5,10.74,7.5,13.5 C7.5,16.26,9.74,18.5,12.5,18.5 C15.26,18.5,17.5,16.26,17.5,13.5 C17.5,10.74,17.5,3.5,17.5,3.5"/><path style="" d="M7.5,21.5 C7.5,21.5,17.5,21.5,17.5,21.5"/></g></svg> ',indent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M2.5,9 C2.5,9,5.5,12,5.5,12 C5.5,12,2.5,15,2.5,15"/></g></svg> ',listBullet:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M5.5,5 C6.05,5,6.5,5.45,6.5,6 C6.5,6.55,6.05,7,5.5,7 C4.95,7,4.5,6.55,4.5,6 C4.5,5.45,4.95,5,5.5,5 z"/><path style="" d="M5.5,11 C6.05,11,6.5,11.45,6.5,12 C6.5,12.55,6.05,13,5.5,13 C4.95,13,4.5,12.55,4.5,12 C4.5,11.45,4.95,11,5.5,11 z"/><path style="" d="M5.5,17 C6.05,17,6.5,17.45,6.5,18 C6.5,18.55,6.05,19,5.5,19 C4.95,19,4.5,18.55,4.5,18 C4.5,17.45,4.95,17,5.5,17 z"/></g></svg> ',listNumber:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M4.5,5 C4.5,5,5.5,4,5.5,4 C5.5,4,5.5,8,5.5,8"/><path style="" d="M4.5,10 C4.5,10,5.5,10,5.5,10 C6.05,10,6.5,10.45,6.5,11 C6.5,11,6.5,11,6.5,11 C6.5,11.55,6.05,12,5.5,12 C5.5,12,5.5,12,5.5,12 C4.95,12,4.5,12.45,4.5,13 C4.5,13,4.5,14,4.5,14 C4.5,14,6.5,14,6.5,14"/><path style="" d="M4.5,16 C4.5,16,5.5,16,5.5,16 C6.05,16,6.5,16.45,6.5,17 C6.5,17,6.5,17,6.5,17 C6.5,17.55,6.05,18,5.5,18 C5.5,18,4.5,18,4.5,18 C4.5,18,5.5,18,5.5,18 C6.05,18,6.5,18.45,6.5,19 C6.5,19,6.5,19,6.5,19 C6.5,19.55,6.05,20,5.5,20 C5.5,20,4.5,20,4.5,20"/></g></svg> ',outdent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M5.5,9 C5.5,9,2.5,12,2.5,12 C2.5,12,5.5,15,5.5,15"/></g></svg> ',pin:'<svg class="stroked" viewBox="0 0 24 24"><g><g><path style="" d="M16.23,4.73 C16.23,4.73,19.42,7.9,19.42,7.9 C19.42,7.9,14.46,15.69,14.46,15.69 C14.46,15.69,8.45,9.68,8.45,9.68 C8.45,9.68,16.23,4.73,16.23,4.73 z"/><path style="" d="M20.84,9.32 C20.84,9.32,14.47,2.95,14.47,2.95"/><path style="" d="M16.6,17.8 C16.6,17.8,6.7,7.9,6.7,7.9"/><path style="" d="M10.23,11.44 C10.23,11.44,5.99,18.51,5.99,18.51 C5.99,18.51,13.06,14.27,13.06,14.27"/></g></g></svg> ',resize:'<svg class="stroked" version="1.1" viewBox="0, 0, 24, 24"><g><path d="M9,3 L3,3 L3,9"/><path d="M15,21 L21,21 L21,15"/><path d="M3,3 L10,10"/><path d="M21,21 L14,14"/></g></svg> ',shift:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 4 4 12h4v8h8v-8h4z"></path></svg> ',sortAscending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,10.5 C16.5,10.5,7.5,10.5,7.5,10.5"/><path d="M14.5,6.5 C14.5,6.5,9.5,6.5,9.5,6.5"/><path d="M18.5,14.5 C18.5,14.5,5.5,14.5,5.5,14.5"/><path d="M20.5,18.5 C20.5,18.5,3.5,18.5,3.5,18.5"/></g></svg> ',sortDescending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,14.5 C16.5,14.5,7.5,14.5,7.5,14.5"/><path d="M14.5,18.5 C14.5,18.5,9.5,18.5,9.5,18.5"/><path d="M18.5,10.5 C18.5,10.5,5.5,10.5,5.5,10.5"/><path d="M20.5,6.5 C20.5,6.5,3.5,6.5,3.5,6.5"/></g></svg> ',tab:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="16" y2="12"></line><polyline points="10 6 16 12 10 18"></polyline><line x1="20" y1="5" x2="20" y2="19"></line></svg> ',cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",skipBack:"skipForward0f",toggleLeft:"toggleRight0f",thumbsDown:"thumbsUp1f",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r",fatArrowUp:"shift",fatArrowRight:"shift90r",fatArrowDown:"shift180r",fatArrowLeft:"shift270r"};var io=(e)=>{Object.assign(ye,e)};var Yr=(e)=>/\d$/.test(e)?e+"_":e,oo=[{prefix:/^spin(_?\d+)/,apply(e,t,n){let i=t[1].replace("_","-"),o=360/Math.abs(parseFloat(i)),s=i.startsWith("-")?"reverse":"normal",r=Le(e,[]),l=r;if(l.animate){let a=l.style.transform||"";l.animate([{transform:`${a} rotate(0deg)`},{transform:`${a} rotate(360deg)`}],{duration:o*1000,iterations:1/0,direction:s})}return so(e,n,r)}},{prefix:"un",apply:(e)=>`slash25o$${e}75s75o`},{prefix:"check",apply:(e)=>`check75o_00aa00S$${e}75s50o`},{prefix:"cancel",apply:(e)=>`x75o_cc0000S$${e}75s50o`},{prefix:"search",apply:(e)=>`search80s30x30y$${e}50o`}],Gr=0;function to(e,t){let n=C.div();n.innerHTML=e;let i=n.querySelector("svg"),o=i.querySelectorAll("[id]");if(o.length>0){let l=new Map;for(let d of o){let u=d.id,h=`tosi_svg_id_${++Gr}`;l.set(u,h),d.id=h}let a=i.innerHTML,c=a;for(let[d,u]of l){let h=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");c=c.replace(new RegExp(`url\\(#${h}\\)`,"g"),`url(#${u})`).replace(new RegExp(`href="#${h}"`,"g"),`href="#${u}"`)}if(c!==a)i.innerHTML=c}let s=new Set(i.classList);s.add("tosi-icon");let r=Cn.svg({class:Array.from(s).join(" "),viewBox:i.getAttribute("viewBox")},...t,...i.children);if(r.style.strokeWidth=y.tosiIconStrokeWidth("2px"),s.has("filled"))r.style.stroke="none",r.style.fill="currentColor";else if(s.has("stroked"))r.style.stroke=y.tosiIconStroke("currentColor"),r.style.fill=y.tosiIconFill("none");else r.style.stroke=y.tosiIconStroke("currentColor"),r.style.fill=y.tosiIconFill("currentColor");return r.style.height=y.tosiIconSize("16px"),r}function so(e,t,...n){let i=C.span({class:"tosi-icon-composite",dataIcon:e,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...n);for(let o of t)if(o&&typeof o==="object"&&!("nodeType"in o)){let s=o;if(s.style&&typeof s.style==="object")Object.assign(i.style,s.style);if(s.class)i.classList.add(...String(s.class).split(" "))}return i}function Jr(e){let t=ye;if(t[e])return!0;let n=An(e);return n!=null&&!!t[n.baseName]}function no(e,t){for(let n of oo){let i,o;if(n.prefix instanceof RegExp){let r=new RegExp(n.prefix.source+"(.+)$"),l=e.match(r);if(!l)continue;i=l[l.length-1],i=i[0].toLowerCase()+i.slice(1),o=l}else{if(!e.startsWith(n.prefix)||e.length<=n.prefix.length)continue;i=e[n.prefix.length].toLowerCase()+e.slice(n.prefix.length+1),o=n.prefix}if(!Jr(i))continue;let s=n.apply(Yr(i),o,t);if(typeof s==="string")return Le(s,t);if(s)return s}return null}var Zr=10,Qr=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function An(e){let t=e.match(Qr);if(!t)return null;let n=e.slice(0,t.index);if(!n)return null;if(n.endsWith("_"))n=n.slice(0,-1);if(!n)return null;if(!ye[n]){if(!oo.some((a)=>{if(a.prefix instanceof RegExp)return a.prefix.test(n);return n.startsWith(a.prefix)&&n.length>a.prefix.length}))return null}let o={},s=t[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!s)return null;let r=[];for(let l of s){let a=l[l.length-1];if(a==="F"||a==="S"){let c=l.slice(1,-1),u=/^[0-9a-fA-F]{3,8}$/.test(c)?"#"+c:T[c];if(a==="F")o.fill=u;else o.stroke=u}else if(a==="W")o.strokeWidth=l.slice(0,-1);else{let c=parseInt(l.replace("_","-"));switch(a){case"o":o.opacity=String(c/100);break;case"s":r.push(`scale(${c/100})`);break;case"x":r.push(`translateX(${c}%)`);break;case"y":r.push(`translateY(${c}%)`);break;case"r":r.push(`rotate(${c}deg)`);break;case"f":r.push(c===0?"scaleX(-1)":"scaleY(-1)");break}}}if(r.length>0)o.transform=r.join(" "),o.transformOrigin="50% 50%";return{baseName:n,style:o}}function Le(e,t){if(e.endsWith("_"))e=e.slice(0,-1);let n=ye,i=e;for(let r=0;r<Zr;r++){let l=n[i];if(!l)break;if(l.startsWith("<"))return to(l,t);i=l}if(i!==e){let r=no(i,t);if(r)return r;let l=An(i);if(l){let a=Le(l.baseName,t);return Object.assign(a.style,l.style),a}}if(e.includes("$")){let r=e.split("$"),l=Le(r[r.length-1],[]),a=r.slice(0,-1).reverse().map((c)=>{let d=Le(c,[]);return Object.assign(d.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),d});return so(e,t,l,...a)}let o=no(e,t);if(o)return o;let s=An(e);if(s){let r=Le(s.baseName,t);return Object.assign(r.style,s.style),r}if(e)console.warn(`icon ${e} does not exist`);return to(ye.square,t)}var b=new Proxy(ye,{get(e,t){return(...n)=>Le(t,n)}});class ro extends E{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:y.tosiIconStrokeWidth("2px"),strokeLinejoin:y.tosiIconStrokeLinejoin("round"),strokeLinecap:y.tosiIconStrokeLinecap("round"),fill:y.tosiIconFill("none"),height:T.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:y.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let e={};if(this.size)e.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)e.stroke=this.stroke,e.strokeWidth=this.strokeWidth;if(this.fill)e.fill=this.fill;this.append(b[this.icon]({style:e}))}}var ra=ro.elementCreator();var ve=C.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),$t={passive:!0},lo=(e,t,n="move")=>{if(!e.type.startsWith("touch")){e.preventDefault();let{clientX:o,clientY:s}=e;ve.style.cursor=n,Ve(ve),document.body.append(ve);let r=(l)=>{let a=l.clientX-o,c=l.clientY-s;if(t(a,c,l)===!0)ve.removeEventListener("mousemove",r),ve.removeEventListener("mouseup",r),ve.remove()};ve.addEventListener("mousemove",r,$t),ve.addEventListener("mouseup",r,$t)}else if(e instanceof TouchEvent){let o=e.changedTouches[0],s=o.identifier,r=o.clientX,l=o.clientY,a=e.target,c=0,d=0,u=(h)=>{let f=[...h.touches].find((p)=>p.identifier===s);if(f!==void 0)c=f.clientX-r,d=f.clientY-l;if(h.type==="touchmove")h.stopPropagation(),h.preventDefault();if(t(c,d,h)===!0||f===void 0)a.removeEventListener("touchmove",u),a.removeEventListener("touchend",u),a.removeEventListener("touchcancel",u)};a.addEventListener("touchmove",u),a.addEventListener("touchend",u,$t),a.addEventListener("touchcancel",u,$t)}},el=(e="body *")=>[...document.querySelectorAll(e)].map((t)=>parseFloat(getComputedStyle(t).zIndex)).reduce((t,n)=>isNaN(t)||Number(t)<n?n:Number(t),0),Ve=(e,t="body *")=>{e.style.zIndex=String(el(t)+1)};var{slot:tl}=C;class de extends E{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=tl();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(e)=>{if(e instanceof MouseEvent&&e.button!==0)return;if(e.target?.closest(".no-drag"))return;if(this.drag){Ve(this);let n=this.offsetLeft,i=this.offsetTop;lo(e,(o,s,r)=>{if(this.style.left=`${n+o}px`,this.style.top=`${i+s}px`,this.style.right="auto",this.style.bottom="auto",r.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),nl(),de.floats.add(this);let e={passive:!0};this.addEventListener("touchstart",this.reposition,e),this.addEventListener("mousedown",this.reposition),Ve(this)}disconnectedCallback(){super.disconnectedCallback(),de.floats.delete(this)}}var Sn=de.elementCreator();var ao=!1;function nl(){if(ao)return;ao=!0,window.addEventListener("resize",()=>{Array.from(de.floats).forEach((e)=>{if(e.remainOnResize==="hide")e.hidden=!0;else if(e.remainOnResize==="remove")e.remove()})},{passive:!0}),document.addEventListener("scroll",(e)=>{if(e.target instanceof HTMLElement&&e.target.closest(de.tagName))return;Array.from(de.floats).forEach((t)=>{if(t.remainOnScroll==="hide")t.hidden=!0;else if(t.remainOnScroll==="remove")t.remove()})},{passive:!0,capture:!0})}var co=(e)=>{let{content:t,target:n,position:i,remainOnScroll:o,remainOnResize:s,draggable:r}=e,l=Array.isArray(t)?Sn(...t):Sn(t);if(il(l,n,i,o,s,r),e.class)l.setAttribute("class",e.class);return document.body.append(l),l},il=(e,t,n,i,o,s=!1)=>{{let{position:p}=getComputedStyle(e);if(p!=="fixed")e.style.position="fixed";if(e instanceof de){if(o)e.remainOnResize=o;if(i)e.remainOnScroll=i;e.drag=s}Ve(e)}let{left:r,top:l,width:a,height:c}=t.getBoundingClientRect(),d=r+a*0.5,u=l+c*0.5,h=window.innerWidth,f=window.innerHeight;if(n==="side")n=(d<h*0.5?"e":"w")+(u<f*0.5?"s":"n");else if(n==="auto"||n===void 0)n=(u<f*0.5?"s":"n")+(d<h*0.5?"e":"w");if(e.style.top=e.style.left=e.style.right=e.style.bottom=e.style.transform="",n.length===2){let[p,x]=n;switch(p){case"n":e.style.bottom=(f-l).toFixed(2)+"px";break;case"e":e.style.left=(r+a).toFixed(2)+"px";break;case"s":e.style.top=(l+c).toFixed(2)+"px";break;case"w":e.style.right=(h-r).toFixed(2)+"px";break}switch(x){case"n":e.style.bottom=(f-l-c).toFixed(2)+"px";break;case"e":e.style.left=r.toFixed(2)+"px";break;case"s":e.style.top=l.toFixed(2)+"px";break;case"w":e.style.right=(h-r-a).toFixed(2)+"px";break}e.style.transform=""}else if(n==="n")e.style.bottom=(f-l).toFixed(2)+"px",e.style.left=d.toFixed(2)+"px",e.style.transform="translateX(-50%)";else if(n==="s")e.style.top=(l+c).toFixed(2)+"px",e.style.left=d.toFixed(2)+"px",e.style.transform="translateX(-50%)";else if(n==="e")e.style.left=(r+a).toFixed(2)+"px",e.style.top=u.toFixed(2)+"px",e.style.transform="translateY(-50%)";else if(n==="w")e.style.right=(h-r).toFixed(2)+"px",e.style.top=u.toFixed(2)+"px",e.style.transform="translateY(-50%)";e.style.setProperty("--max-height",`calc(100vh - ${e.style.top||e.style.bottom})`),e.style.setProperty("--max-width",`calc(100vw - ${e.style.left||e.style.right})`)};function uo(e,t=!0){return(n,i)=>{let o=e(n),s=e(i);for(let r in o)if(o[r]!==s[r])return(Array.isArray(t)?t[r]!==!1:t)?o[r]>s[r]?1:-1:o[r]>s[r]?-1:1;return 0}}var{button:ol,span:ho,input:sl}=C,fo=(e,t)=>!!e.find((n)=>{if(n===null||t==null)return!1;else if(Array.isArray(n))return fo(n,t);else if(n.value===t||n===t)return!0});class qe extends E{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:T.tosiSelectGap,textAlign:"left",height:T.tosiSelectTouchSize,padding:T.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:T.tosiSelectFieldWidth,padding:T.tosiSelectValuePadding,height:T.tosiSelectTouchSize,lineHeight:T.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(e){if(typeof e==="string")this._options=qe.parseOptionsString(e);else this._options=e;this.queueRender()}static parseOptionsString(e){return e.split(",").map((t)=>{let n=t.trim();if(n==="")return null;let[i,o]=n.split("=").map((l)=>l.trim());if(!o)return{value:i,caption:i};let[s,r]=o.split(":").map((l)=>l.trim());return{value:i,caption:s||i,icon:r||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=""}setValue=(e,t=!1)=>{if(this.value!==e)this.value=e,this.queueRender(!0);if(t)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(e)=>{if(e===null)return null;let{setValue:t,getValue:n}=this,i,o,s,r,l;if(typeof e==="string")o=s=e;else({icon:i,caption:o,value:s,tooltip:r,properties:l}=e);if(this.localized)o=R(o);let{options:a}=e;if(a)return{icon:i,caption:o,tooltip:r,properties:l,checked:()=>fo(a,n()),menuItems:a.map(this.buildOptionMenuItem)};return{icon:i,caption:o,tooltip:r,properties:l,checked:()=>n()===s,action:typeof s==="function"?async()=>{let c=await s();if(c!==void 0)t(c,!0)}:()=>{if(typeof s==="string")t(s,!0)}}};poppedOptions=[];get optionsMenu(){let e=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return e;let t=(n)=>{if(n===null||typeof n==="function")return!0;else if(n.menuItems){let i=ue(n.menuItems);return n.menuItems=i.filter(t),i.length>0}else return n.caption.toLocaleLowerCase().includes(this.filter)};return e.filter(t)}handleChange=(e)=>{let{value:t}=this.parts,n=t.value||"";if(this.value!==String(n))this.value=n,this.dispatchEvent(new Event("change"));this.filter="",e.stopPropagation(),e.preventDefault()};handleKey=(e)=>{if(e.key==="Enter")e.preventDefault()};filterMenu=At(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),_(0),this.popOptions()});popOptions=(e)=>{if(e&&e.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),xe({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:e}=this.parts;e.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[ol({type:"button",part:"button",onClick:this.popOptions},ho(),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 e=[];function t(n){for(let i of n)if(typeof i==="string")e.push({caption:i,value:i});else if(i?.value)e.push(i);else if(i?.options)t(i.options)}return t(this.selectOptions),e}findOption(){return this.allOptions.find((t)=>t.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let e=this.getAttribute("options");if(e&&this._options.length===0)this._options=qe.parseOptionsString(e);if(this.localized)Ln.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)Ln.allInstances.delete(this)}render(){super.render();let{value:e,button:t}=this.parts;t.disabled=this.disabled;let n=e.previousElementSibling,i=this.findOption(),o=ho();if(e.value=this.localized?R(i.caption):i.caption,i.icon)if(i.icon instanceof HTMLElement)o=i.icon.cloneNode(!0);else o=b[i.icon]();n.replaceWith(o),e.setAttribute("placeholder",this.localized?R(this.placeholder):this.placeholder),e.style.pointerEvents=this.editable?"":"none",e.readOnly=!this.editable}}var Tn=qe.elementCreator(),Ca=Lt((...e)=>Tn(...e),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:rl}=C,{i18n:Fe}=Bt({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:rl(),caption:window.navigator.language,value:window.navigator.language}]}});St.localeOptions={toDOM(e,t){if(e instanceof qe)e.options=t}};var ll=()=>{let e=Array.from(Ue.allInstances);for(let t of e)t.localeChanged();yo()};Fe.locale.observe(ll);var rt="data-tosi-localized";function Nt(e){let t=e.getAttribute(rt);if(!t)return;let n;try{n=JSON.parse(t)}catch(i){console.warn(`[data-tosi-localized] invalid JSON: ${t}`,i);return}if(!n||typeof n!=="object")return;for(let[i,o]of Object.entries(n)){if(typeof o!=="string")continue;e.setAttribute(i,R(o))}}function*mo(e){for(let t of Array.from(e.querySelectorAll(`[${rt}]`)))yield t;for(let t of Array.from(e.querySelectorAll("*"))){let n=t.shadowRoot;if(n)yield*mo(n)}}function yo(){if(typeof document>"u")return;for(let e of mo(document))Nt(e)}var po=null;if(typeof document<"u"&&typeof MutationObserver<"u"){let e=()=>{if(!document.body){queueMicrotask(e);return}po=new MutationObserver((t)=>{for(let n of t){if(n.type==="attributes"&&n.target instanceof Element){Nt(n.target);continue}for(let i of Array.from(n.addedNodes)){if(!(i instanceof Element))continue;if(i.hasAttribute(rt))Nt(i);for(let o of Array.from(i.querySelectorAll(`[${rt}]`)))Nt(o)}}}),po.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[rt]}),yo()};e()}var Sa=uo((e)=>[e.caption.toLocaleLowerCase()]);var al=/(?<=[^\s\\])#[A-Za-z0-9_-]+$/;function vo(e){let t=al.exec(e);return t?t.index:-1}function go(e){let t=vo(e);return(t===-1?e:e.slice(0,t)).replace(/\\#/g,"#")}function cl(e,t){return e.replace(/\{([A-Za-z0-9_]+)\}/g,(n,i)=>Object.prototype.hasOwnProperty.call(t,i)?String(t[i]):n)}function R(e,t){if(t)return cl(R(e),t);if(e.endsWith("…"))return R(e.substring(0,e.length-1))+"…";let n=Fe.locales.value.indexOf(Fe.locale.value);if(n>-1){let i=B(Fe.stringMap),o=e.toLocaleLowerCase(),s=i[o],r=s&&s[n],l=vo(o);if((!r||r==='"')&&l>-1){let a=i[o.substring(0,l)];r=a&&a[n]}if(r){if(l>-1){let a=o.slice(l);if(r.toLocaleLowerCase().endsWith(a))r=r.slice(0,-a.length)}r=r.replace(/\\#/g,"#"),e=e.toLocaleLowerCase()===e?r.toLocaleLowerCase():r}else e=go(e)}else e=go(e);return e}class xo extends E{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>Tn({part:"select",showIcon:!0,title:R("Language"),bindValue:Fe.locale,bindLocaleOptions:Fe.localeOptions});render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var bo=xo.elementCreator();class Ue extends E{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>C.tosiSlot();connectedCallback(){super.connectedCallback(),Ue.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),Ue.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?R(this.refString):""}render(){super.render(),this.localeChanged()}}var Ln=Ue,wo=Ue.elementCreator();var dl=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||"");var ul=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],Co=(e)=>{let t=e.trim(),n={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[i,o]of ul)if(i.test(t))n[o]=!0,t=t.replace(i,"");return t=t.replace(/^-+/,""),n.key=t.toLowerCase(),n},ko=(e,t)=>{let n=Co(t);return e.key.toLowerCase()===n.key&&e.metaKey===n.metaKey&&e.ctrlKey===n.ctrlKey&&e.altKey===n.altKey&&e.shiftKey===n.shiftKey};var Bn=(e)=>{let t=Co(e);if(dl){let i=[];if(t.ctrlKey)i.push("⌃");if(t.altKey)i.push("⌥");if(t.shiftKey)i.push("⇧");if(t.metaKey)i.push("⌘");return i.push(t.key.toUpperCase()),i.join("")}let n=[];if(t.ctrlKey)n.push("Ctrl");if(t.altKey)n.push("Alt");if(t.shiftKey)n.push("Shift");if(t.metaKey)n.push("Meta");return n.push(t.key.toUpperCase()),n.join("+")};var $n=(e,t)=>{if(!e)return!1;for(let n of e)if(n==="special/any")return!0;else if(n.indexOf("*")>-1){let[i,o]=n.split("/"),[s,r]=t.split("/");if((i==="*"||i===s)&&(o==="*"||o===r))return!0}else if(n===t)return!0};var Mo=(e,t=";")=>(e||"").split(t).map((n)=>n.trim()).filter((n)=>n!=="");var ue=(e)=>typeof e==="function"?e():e,{div:Eo,button:at,span:N,a:hl,tosiSlot:fl}=C,pl=(e)=>{let t=[];for(let n of e)if(n===null){if(t.length>0&&t[t.length-1]!==null)t.push(n)}else t.push(n);while(t.length>0&&t[t.length-1]===null)t.pop();return t},zt=(e,t,n=!1)=>{let i=[];for(let o of e){if(o===null){i.push(o);continue}if(typeof o==="function"){i.push(o);continue}let{acceptsDrop:s}=o;if(!s){if(!n)i.push({...o,enabled:()=>!1});continue}if(!t.some((a)=>$n(s,a))){if(!n)i.push({...o,enabled:()=>!1});continue}let l=o;if(l.menuItems){let a=zt(ue(l.menuItems),t,!0);if(a.length>0||l.dropAction){let c=n?a:zt(ue(l.menuItems),t,!1);i.push({...l,menuItems:c})}else if(!n)i.push({...l,enabled:()=>!1})}else i.push(o)}return pl(i)};var gl={overflow:"hidden auto",maxHeight:`calc(${T.maxHeight} - ${y.menuInset("8px")})`,borderRadius:T.spacing50,background:y.menuBg("#fafafa"),boxShadow:y.menuShadow(`${T.spacing13} ${T.spacing50} ${T.spacing} #0004`)},ml={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr max-content",width:"100%",gap:0,background:"transparent",padding:y.menuItemPadding("0 8px"),height:y.menuItemHeight("48px"),lineHeight:y.menuItemHeight("48px"),textAlign:"left"},yl={color:y.menuItemColor("#222")},vl={boxShadow:"none !important",background:y.menuItemHoverBg("#eee")},Ao={boxShadow:"none !important",background:y.menuItemActiveBg("#aaa"),color:y.menuItemActiveColor("#000")},xl={background:`${y.menuDropOverBg("#2196F3")} !important`,color:`${y.menuDropOverColor("#fff")} !important`},bl={color:`${y.menuDropOverColor("#fff")} !important`},wl={stroke:`${y.menuDropOverColor("#fff")} !important`},So={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${y.menuDropOverBg("#2196F3")} 50%, transparent) !important`},Cl={".xin-menu, .tosi-menu":gl,".xin-menu > div, .tosi-menu > div":{width:y.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:y.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:y.menuSeparatorColor("#2224"),margin:y.menuSeparatorMargin("8px 0")},".xin-menu-element, .tosi-menu-element":{minHeight:y.menuItemHeight("48px")},".xin-menu-item, .tosi-menu-item":ml,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":yl,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr max-content",gap:y.menuItemGap("8px")},".xin-menu-shortcut, .tosi-menu-shortcut":{whiteSpace:"nowrap",paddingLeft:"1em",textAlign:"right",opacity:"0.65"},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:y.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:y.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":vl,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":So,".xin-menu-item:active, .tosi-menu-item:active":Ao,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:y.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":Ao,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:y.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":xl,".xin-drop-over > span, .tosi-drop-over > span":bl,".xin-drop-over svg, .tosi-drop-over svg":wl,".drag-target":So},Lo=!1;function Nn(){if(Lo)return;Lo=!0,Fi("xin-menu-helper",Cl),document.addEventListener("mousedown",(e)=>{if(H.length===0)return;let t=e.composedPath();if(!H.find((n)=>t.includes(n.target)||t.includes(n.menu)))_(0)}),document.body.addEventListener("keydown",(e)=>{if(e.key==="Escape")_(0)})}var kl=(e,t)=>{let n=e.checked&&e.checked()&&"check"||!1,i=e?.icon||n||N(" ");if(typeof i==="string")i=b[i]();let o=t.role==="listbox"?"option":"menuitem",s,r=e.properties||{};if(typeof e?.action==="string")s=hl(r,{role:o,href:e.action},i,t.localized?N(R(e.caption)):N(e.caption),N({class:"tosi-menu-shortcut"},e.shortcut?Bn(e.shortcut):" "));else s=at(r,{role:o,onClick:e.action},i,t.localized?N(R(e.caption)):N(e.caption),N({class:"tosi-menu-shortcut"},e.shortcut?Bn(e.shortcut):" "));if(s.classList.add("xin-menu-item","tosi-menu-item"),s.classList.toggle("xin-menu-item-checked",n!==!1),s.classList.toggle("tosi-menu-item-checked",n!==!1),e.tooltip)s.dataset.tooltip=e.tooltip;if(t.role==="listbox")s.toggleAttribute("aria-selected",n!==!1);if(e?.enabled&&!e.enabled())s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true");return s},Ml=(e,t)=>{let n=e?.icon||N(" ");if(typeof n==="string")n=b[n]();let i=e.properties||{},o=at(i,{onDragenter(s){Ke(),o.classList.add("xin-drop-over","tosi-drop-over"),s.preventDefault()},onDragover(s){if(s.preventDefault(),s.dataTransfer)s.dataTransfer.dropEffect="copy"},onDragleave(s){let r=s.relatedTarget;if(r&&o.contains(r))return;o.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(s){if(s.preventDefault(),s.stopPropagation(),o.classList.remove("xin-drop-over","tosi-drop-over"),e.dropAction&&s.dataTransfer)e.dropAction(s.dataTransfer);_(0)}},n,t.localized?N(R(e.caption)):N(e.caption),N(" "));if(o.classList.add("xin-menu-item","tosi-menu-item"),e.tooltip)o.dataset.tooltip=e.tooltip;if(e.dropAction&&e.acceptsDrop)o.dataset.drop=e.acceptsDrop.join(";");if(e?.enabled&&!e.enabled())o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true");return o},To=(e,t)=>{let n=e.checked&&e.checked()&&"check"||!1,i=e?.icon||n||N(" ");if(typeof i==="string")i=b[i]();let o=null,s=!1,r=e.properties||{},l=at(r,{disabled:!(!e.enabled||e.enabled()),onClick(a){if(t._dropMode)return;xe(Object.assign({},t,{menuItems:ue(e.menuItems),target:l,submenuDepth:(t.submenuDepth||0)+1,position:"side"})),a.stopPropagation(),a.preventDefault()},onDragenter(a){if(!t._dropMode)return;Ke(),a.preventDefault(),a.stopPropagation();let c=a.relatedTarget;if(c&&l.contains(c))return;if(l.classList.add("xin-drop-over","tosi-drop-over"),s){if(_((t.submenuDepth||0)+1),s=!1,o)clearTimeout(o);o=null;return}if(o)clearTimeout(o);o=setTimeout(()=>{s=!0;let d=ue(e.menuItems),u=t._dataTypes?zt(d,t._dataTypes,t.hideDisabled):d;if(u.length>0)xe(Object.assign({},t,{menuItems:u,target:l,submenuDepth:(t.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:t._dataTypes}))},t.disclosureDelay??200)},onDragover(a){if(!t._dropMode)return;if(a.preventDefault(),a.stopPropagation(),a.dataTransfer)a.dataTransfer.dropEffect=e.dropAction?"copy":"link"},onDragleave(a){if(!t._dropMode)return;let c=a.relatedTarget;if(c&&l.contains(c))return;if(s&&c&&H.some((d)=>d.menu.contains(c)||d.target.contains(c)))return;if(l.classList.remove("xin-drop-over","tosi-drop-over"),o)clearTimeout(o),o=null},onDrop(a){if(!t._dropMode||!e.dropAction)return;if(a.preventDefault(),a.stopPropagation(),l.classList.remove("xin-drop-over","tosi-drop-over"),a.dataTransfer)e.dropAction(a.dataTransfer);_(0)}},i,t.localized?N(R(e.caption)):N(e.caption),b.chevronRight({style:{justifySelf:"flex-end"}}));if(l.classList.add("xin-menu-item","tosi-menu-item"),e.tooltip)l.dataset.tooltip=e.tooltip;if(t._dropMode&&e.dropAction&&e.acceptsDrop)l.dataset.drop=e.acceptsDrop.join(";");return l},El=(e,t)=>{if(e===null)return N({class:"xin-menu-separator tosi-menu-separator"});else if(typeof e==="function"){let n=e();return n.classList.add("xin-menu-element","tosi-menu-element"),n}else if(t._dropMode){let n=e;if(n.menuItems&&ue(n.menuItems).length>0)return To(n,t);else if(e.dropAction)return Ml(e,t);else{let o=e?.icon||N(" ");if(typeof o==="string")o=b[o]();return at({class:"xin-menu-item tosi-menu-item",disabled:!0},o,t.localized?N(R(e.caption)):N(e.caption),N(" "))}}else{let n=e?.action?kl(e,t):To(e,t);if(t.showChecked&&e.checked&&e.checked())requestAnimationFrame(()=>{n.scrollIntoView({block:"center"})});return n}},Al=(e)=>{let{target:t,width:n,menuItems:i,role:o="menu"}=e,s=i.find((a)=>a!=null&&typeof a!=="function"&&(a.icon||a.checked)),r=e.submenuDepth||0,l=Eo({class:s?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:o,onClick(){if(!e._dropMode)_(0)},onDragover(a){if(!e._dropMode)return;a.preventDefault()},onDragenter(){if(!e._dropMode)return;Ke()},onDragleave(a){if(!e._dropMode)return;let c=a.relatedTarget;if(c&&l.contains(c))return;if(c&&H.some((d)=>d.menu.contains(c)||d.target.contains(c)))return;Bo(r)}},Eo({style:{minWidth:t.offsetWidth+"px",width:typeof n==="number"?`${n}px`:n},onMousedown(a){a.preventDefault(),a.stopPropagation()}},...i.map((a)=>El(a,e))));return l},We,H=[],lt=null,Ke=()=>{if(lt)clearTimeout(lt),lt=null},Bo=(e)=>{Ke(),lt=setTimeout(()=>{lt=null,_(e)},500)},_=(e=0)=>{if(Ke(),e===0)document.querySelectorAll("tosi-menu.xin-drop-over, tosi-menu.tosi-drop-over").forEach((n)=>n.classList.remove("xin-drop-over","tosi-drop-over"));let t=H.splice(e);for(let n of t)if(n.menu.remove(),n.onClose)n.onClose();return We=t[0],e>0?H[e-1]:void 0},xe=(e)=>{Nn(),e=Object.assign({submenuDepth:0},e);let{target:t,position:n,submenuDepth:i}=e;if(We&&!document.body.contains(We?.menu))We=void 0;if(H.length&&!document.body.contains(H[0].menu))H.splice(0);if(e._dropMode){if(H.length>i&&H[i]?.target===t)return;_(i)}else{if(i===0&&We?.target===t)return;let r=_(i);if(We?.target===t)return;if(r&&r.target===t){_();return}}if(!e.menuItems?.length)return;let o=Al(e),s=co({content:o,target:t,position:n});s.remainOnScroll=e._dropMode?"remain":"remove",H.push({target:t,menu:s,onClose:e.onClose})},Sl=(e)=>{Nn();let{dataTypes:t,...n}=e,i=zt(e.menuItems,t,e.hideDisabled);if(!i.length)return;xe({...n,menuItems:i,_dropMode:!0,_dataTypes:t})};function $o(e,t,n=[]){for(let i of e){if(!i)continue;if(typeof i==="function")continue;let{shortcut:o}=i,{menuItems:s}=i;if(o){if(ko(t,o)){let r=i;if(r.enabled&&!r.enabled())return;if(n.some((l)=>l.enabled&&!l.enabled()))return;return{action:r,path:n}}}else if(s){let r=$o(ue(s),t,[...n,i]);if(r)return r}}return}class No extends E{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:T.touchSize,minHeight:T.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:y.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(e){if(!this.acceptsDrop)return!1;let t=Mo(this.acceptsDrop);return[...e.dataTransfer?.types||[]].some((i)=>t.some((o)=>$n([o],i)))}showMenu=(e)=>{if(e.type==="click"||e.code==="Space")xe({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),e.stopPropagation(),e.preventDefault()};handleDragEnter=(e)=>{if(this._dragMatches=this._matchesDrag(e),!this._dragMatches)return;Ke(),this.classList.add("xin-drop-over","tosi-drop-over");let t=[...e.dataTransfer?.types||[]];if(this.menuItems.length)Sl({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:t,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});e.preventDefault()};handleDragOver=(e)=>{if(!this._dragMatches)return;if(e.preventDefault(),e.dataTransfer)e.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(e)=>{if(!this._dragMatches)return;let t=e.relatedTarget;if(t&&this.contains(t))return;if(t&&H.some((n)=>n.menu.contains(t)||n.target.contains(t))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),Bo(0)};handleDrop=(e)=>{if(!this._dragMatches||!this.dropAction)return;if(e.preventDefault(),e.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),e.dataTransfer)this.dropAction(e.dataTransfer);_(0)};content=()=>at({tabindex:0,part:"trigger",onClick:this.showMenu},fl());handleShortcut=async(e)=>{let t=$o(this.menuItems,e);if(!t)return;e.preventDefault(),e.stopImmediatePropagation();let{action:n,path:i}=t;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(i,n);if(n.action instanceof Function)n.action()};findMenuItemByCaption(e,t){for(let n of e.querySelectorAll(".xin-menu-item")){let i=n.children[1];if(i&&i.textContent===t)return n}return null}async animateShortcut(e,t){_(0),xe({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((i)=>setTimeout(i,80));for(let i=0;i<e.length;i++){let o=i+1,s=H[i]?.menu;if(!s)break;let r=this.findMenuItemByCaption(s,e[i].caption);if(!r)break;xe({target:r,width:this.menuWidth,localized:this.localized,menuItems:ue(e[i].menuItems),submenuDepth:o,position:"side"}),await new Promise((l)=>setTimeout(l,80))}let n=H[H.length-1]?.menu;if(n){let i=this.findMenuItemByCaption(n,t.caption);if(i)i.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((i)=>setTimeout(i,300)),_(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(),Nn(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var be=No.elementCreator();var{button:Ll,span:zo}=C;io({highlighter:'<svg class="stroked" viewBox="0 0 24 24"><path d="m9 11-6 6v3h9l3-3"></path><path d="m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"></path></svg>'});var Oo="tosijs-styled-editor-menu";function Be(){return()=>{let e=zo({style:{display:"none"}});return queueMicrotask(()=>{e.closest(".tosi-menu")?.classList.add(Oo)}),e}}function j(e,t,n,i){let o={title:e,value:t,dataTosiLocalized:JSON.stringify({title:e})};if(i)o.dataShortcut=i;return Ll(o,n)}function Te(e="8px"){return zo({style:{display:"inline-block",width:e}})}function $e(e){return wo({refString:e})}function zn(){return bo({slot:"menubar",hideCaption:!0})}function v(e,t,n){return{caption:t,action(){e.doCommand(n)}}}function Do(e){return be({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"Title","setBlockType h1"),v(e,"Heading","setBlockType h2"),v(e,"Subheading","setBlockType h3"),v(e,"Minor Heading","setBlockType h4"),null,v(e,"Body","setBlockType p"),v(e,"Code Block","setBlockType pre"),v(e,"Blockquote","setBlockType blockquote"),null,v(e,"Bulleted List","setList ul"),v(e,"Numbered List","setList ol"),v(e,"No List","setList none")]},b.type()," ",$e("Style"))}function Ho(e){return be({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"Left","setBlocks text-align left"),v(e,"Center","setBlocks text-align center"),v(e,"Right","setBlocks text-align right"),v(e,"Justify","setBlocks text-align justify")]},b.alignLeft()," ",$e("Align"))}function jo(e){return be({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"Times New Roman","setText font-family Times+New+Roman"),v(e,"Georgia","setText font-family Georgia"),v(e,"Helvetica","setText font-family Helvetica"),v(e,"Arial","setText font-family Arial"),null,v(e,"Serif","setText font-family serif"),v(e,"Sans-serif","setText font-family sans-serif"),v(e,"Monospace","setText font-family monospace")]},b.type()," ",$e("Font"))}function Io(e){return be({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"10","setText font-size 10px"),v(e,"12","setText font-size 12px"),v(e,"14","setText font-size 14px"),v(e,"18","setText font-size 18px"),v(e,"24","setText font-size 24px"),v(e,"36","setText font-size 36px")]}," ",$e("Size"))}function Ro(e){return be({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"Single","setBlocks line-height unset"),v(e,"1.5","setBlocks line-height 1.875"),v(e,"Double","setBlocks line-height 2.5")]}," ",$e("Spacing"))}function On(){return[j("Bold","setText font-weight bold",b.fontBold(),"ctrl+b"),j("Italic","setText font-style italic",b.fontItalic(),"ctrl+i"),j("Underline","setText text-decoration underline",b.underline(),"ctrl+u"),j("Highlight","setText background-color rgba(255,255,64,0.5)",b.highlighter())]}function _o(){return[j("Align Left","setBlocks text-align left",b.alignLeft()),j("Center","setBlocks text-align center",b.alignCenter()),j("Align Right","setBlocks text-align right",b.alignRight()),j("Justify","setBlocks text-align justify",b.alignJustify()),Te(),j("Bulleted List","setList ul",b.listBullet()),j("Numbered List","setList ol",b.listNumber()),Te(),j("Indent","setBlocks margin-left 40px",b.indent()),j("Outdent","setBlocks margin-left 0px",b.outdent())]}function Dn(){return[j("Undo","updateUndo undo",b.rotateCcw(),"ctrl+z"),j("Redo","updateUndo redo",b.rotateCw(),"ctrl+y")]}function Po(){return j("Toggle Debug","setDebug",b.bug())}function Hn(){return[...On(),Te(),...Dn()]}function jn(){return[...On(),Te(),..._o(),Te(),...Dn(),Te(),Po()]}function Vo(e){return be({slot:"menubar",localized:!0,menuItems:[Be(),{caption:"Link…",action(){let t=prompt("Link URL");if(!t)return;let n=prompt("Target (blank for a new tab)","_blank");e.doCommand(`setLink ${t} ${n||"_blank"}`)}},{caption:"Remove Link",action:()=>e.doCommand("removeLink")},null,{caption:"Image…",action(){let t=prompt("Image URL");if(!t)return;let n=prompt("Alt text (describe the image)")||"";e.doCommand(`insertImage ${t} ${n}`)}},null,{caption:"Footnote",action:()=>e.doCommand("insertFootnote")},{caption:"Renumber Footnotes",action:()=>e.doCommand("renumberFootnotes")}]},b.link()," ",$e("Insert"))}function qo(e){return be({slot:"menubar",localized:!0,menuItems:[Be(),{caption:"Insert Table",menuItems:[v(e,"2 Columns","insertTable 2"),v(e,"3 Columns","insertTable 3"),v(e,"4 Columns","insertTable 4"),v(e,"5 Columns","insertTable 5")]},null,v(e,"Insert Row After","insertTableRow after"),v(e,"Insert Row Before","insertTableRow before"),v(e,"Insert Column After","insertTableCol after"),v(e,"Insert Column Before","insertTableCol before"),null,v(e,"Delete Row","deleteTableRow"),v(e,"Delete Column","deleteTableCol"),null,v(e,"Toggle Header Row","toggleHeaderRow")]},b.grid()," ",$e("Table"))}function In(e){return[Do(e),Vo(e),Ho(e),jo(e),Io(e),Ro(e),qo(e)]}var{slot:Fo,div:Rn}=C,Tl=/[\u0591-\u07FF\u08A0-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Bl=/[A-Za-z\u00C0-\u024F\u0370-\u04FF]/;function $l(e){if(Tl.test(e))return"rtl";if(Bl.test(e))return"ltr";return null}function P(e){if(e instanceof Element)return!e.classList.contains("sel-start")&&!e.classList.contains("sel-end");return e.nodeType!==3||e.textContent!==""}class _n extends E{static formAssociated=!0;static preferredTagName="tosijs-styled-editor";static initAttributes={widgets:"none",localized:!1,name:"",required:!1};static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",position:"relative","--editor-ink":"#27488c","--editor-surface":"Canvas","--editor-text":"CanvasText","--editor-menubar-bg":"color-mix(in oklab, var(--editor-ink) 14%, var(--editor-surface))","--editor-toolbar-bg":"color-mix(in oklab, var(--editor-ink) 6%, var(--editor-surface))","--editor-edge":"color-mix(in oklab, var(--editor-ink) 25%, transparent)","--editor-chrome-text":"color-mix(in oklab, var(--editor-ink) 30%, var(--editor-text))",background:"var(--editor-surface)",color:"var(--editor-text)",colorScheme:"light dark"},":host ::slotted(*)":{flex:"0 0 auto"},':host [part="menubar"]':{flexShrink:"0",padding:"0 2px",display:"flex",gap:"0",flex:"0 0 auto",flexWrap:"wrap",alignItems:"center",background:"var(--editor-menubar-bg)",borderBottom:"1px solid var(--editor-edge)"},':host(:not([has-menubar])) [part="menubar"]':{display:"none"},':host [part="toolbar"]':{flexShrink:"0",padding:"1px 3px",display:"flex",gap:"1px",flex:"0 0 auto",flexWrap:"wrap",alignItems:"center",background:"var(--editor-toolbar-bg)",borderBottom:"1px solid var(--editor-edge)"},':host(:not([has-toolbar])) [part="toolbar"]':{display:"none"},':host [part="doc"]':{flex:"1 1 auto",minHeight:"0",background:"var(--editor-surface)",padding:"8px",cursor:"text",overflowY:"auto",position:"relative",transition:"padding-top 0.15s ease-out, padding-bottom 0.15s ease-out"},':host [part="doc"] > *':{position:"relative",padding:"4px 8px",margin:"0"},':host [part="doc"] > blockquote':{padding:"4px 40px"},':host [part="doc"] img':{maxWidth:"100%",height:"auto",verticalAlign:"bottom"},':host [part="doc"] a':{color:"color-mix(in oklab, var(--editor-ink) 65%, var(--editor-text))",textDecoration:"underline"},':host [part="doc"] .footnote-ref':{fontSize:"0.75em",lineHeight:"0",verticalAlign:"super"},':host [part="doc"] .footnote-ref a':{textDecoration:"none",padding:"0 1px"},':host [part="doc"] ol.footnotes':{marginTop:"16px",paddingTop:"8px",borderTop:"1px solid var(--editor-edge)",fontSize:"0.85em"},':host [part="doc"] code:not([dir]), :host [part="doc"] kbd:not([dir]), :host [part="doc"] samp:not([dir])':{direction:"ltr",unicodeBidi:"isolate"},":host .sel-start, :host .sel-end":{display:"contents"},':host [part="caret"]':{position:"absolute",display:"none",width:"2px",padding:"0",margin:"0",border:"0",outline:"none",background:"var(--editor-text)",color:"transparent",caretColor:"transparent",pointerEvents:"none",zIndex:"3"},':host [part="caret"].-collapsed':{animation:"blink 1s steps(2, start) infinite"},":host .selection-edge":{position:"absolute",display:"none",width:"2px",pointerEvents:"none",zIndex:"3"},":host .selection-edge.-start":{background:"color-mix(in oklab, green 70%, var(--editor-text))"},":host .selection-edge.-end":{background:"color-mix(in oklab, red 70%, var(--editor-text))"},":host .selected":{background:"color-mix(in oklab, var(--editor-ink) 42%, color-mix(in oklab, white 38%, var(--editor-surface)))"},":host .selected-block":{background:"color-mix(in oklab, var(--editor-ink) 12%, color-mix(in oklab, white 21%, var(--editor-surface)))"},":host .first-block":{position:"relative"},":host .last-block":{position:"relative"},".debug .spanified":{boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.15)"},":host .spanified-word":{display:"inline"},":host .annotation::after":{position:"relative",top:"-4px",content:'"\\2020"'},":host .annotation > span":{display:"block",padding:"4px 8px",fontWeight:"normal",fontStyle:"normal",fontSize:"12px",background:"#ffc",position:"absolute",right:"0",maxWidth:"200px"},':host [part="doc"] *':{userSelect:"none",webkitUserSelect:"none"},":host ul, :host ol":{paddingLeft:"30px"},".debug .sel-start":{background:"green",opacity:"0.5",width:"2px",minHeight:"1em",display:"inline-block"},".debug .sel-end":{background:"red",opacity:"0.5",width:"2px",minHeight:"1em",display:"inline-block"},".debug .selected-block":{outline:"1px dashed blue"},":host .editor-table":{display:"grid",listStyle:"none",padding:"0",margin:"8px 0",border:"1px solid #ccc",borderRadius:"2px"},":host .editor-table > li":{padding:"4px 8px",borderRight:"1px solid #ddd",borderBottom:"1px solid #ddd",minHeight:"1.5em",outline:"none"},":host .editor-table > li.table-header":{fontWeight:"bold",background:"#f0f0f0"},":host .touch-affordances":{display:"none",position:"absolute",pointerEvents:"none",zIndex:"1000",top:"0",left:"0",width:"0",height:"0",transition:"opacity 0.1s ease-out"},":host .touch-affordance":{position:"absolute",width:"44px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"auto",touchAction:"none",background:"transparent",transition:"left 0.1s ease-out, top 0.1s ease-out"},":host .touch-affordances.dragging .touch-affordance":{transition:"none"},":host .touch-icon":{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",background:"#0078ff",color:"white",fontSize:"13px",fontWeight:"bold",border:"2px solid white",boxShadow:"0 1px 6px rgba(0,0,0,0.4)"},":host .touch-icon svg":{width:"16px",height:"16px",stroke:"white",fill:"none"},":host .touch-handle-start .touch-icon":{borderRadius:"4px 4px 0 4px"},":host .touch-handle-end .touch-icon":{borderRadius:"0 4px 4px 4px"},":host .touch-context-menu .touch-icon":{borderRadius:"4px"},":host .touch-menu":{position:"absolute",display:"flex",gap:"0",background:"rgba(0,0,0,0.85)",borderRadius:"8px",padding:"0",zIndex:"1001",boxShadow:"0 4px 12px rgba(0,0,0,0.3)",pointerEvents:"auto",overflow:"hidden"},":host .touch-menu-item":{background:"transparent",color:"white",border:"none",padding:"12px 16px",fontSize:"15px",borderRadius:"0",whiteSpace:"nowrap",margin:"0"}};static lightStyleSpec={".tosijs-styled-editor-menu":{"--menu-item-height":"30px","--menu-item-padding":"0 16px","--menu-separator-margin":"4px 0","--menu-inset":"4px"},'tosijs-styled-editor button[slot="toolbar"]':{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"26px",height:"26px",padding:"0",border:"0",borderRadius:"4px",background:"transparent",boxShadow:"none",color:"var(--editor-chrome-text) !important",cursor:"pointer"},'tosijs-styled-editor button[slot="toolbar"]:hover:not([disabled])':{background:"color-mix(in oklab, currentColor 16%, transparent)"},'tosijs-styled-editor button[slot="toolbar"]:active:not([disabled])':{background:"color-mix(in oklab, currentColor 28%, transparent)"},'tosijs-styled-editor button[slot="toolbar"][disabled]':{opacity:"0.35",cursor:"default",background:"transparent"},'tosijs-styled-editor button[slot="toolbar"] svg':{width:"18px",height:"18px"},'tosijs-styled-editor [slot="menubar"] button':{background:"transparent",border:"0",boxShadow:"none",borderRadius:"4px",padding:"4px 10px",color:"var(--editor-chrome-text) !important",cursor:"pointer"},'tosijs-styled-editor [slot="menubar"] button:hover':{background:"color-mix(in oklab, currentColor 16%, transparent)"},'tosijs-styled-editor [slot="menubar"] button svg':{width:"16px",height:"16px"}};selectable;active=!0;pastemode="merge";undo=[];undoDepth=0;reasonForLastUndo;lastKey=0;lastCursorX=0;isInitialized=!1;touchAffordances=null;touchHandleStart=null;touchContextMenu=null;touchHandleEnd=null;touchMenuEl=null;isTouchInteraction=!1;touchDrags=new Map;resizeTable=null;resizeCol=-1;resizeStartX=0;resizeStartWidths=[];_value="";get docHTML(){this.touchAffordances?.remove();let e=this.parts.doc.innerHTML;if(this.touchAffordances)this.parts.doc.appendChild(this.touchAffordances);return e}set docHTML(e){if(this.touchAffordances?.remove(),this.parts.doc.innerHTML=e,this.touchAffordances)this.parts.doc.appendChild(this.touchAffordances)}get value(){return this.isInitialized?this.docHTML:this._value}set value(e){let t=this._value;if(this._value=e,this.isInitialized&&this.docHTML!==e)this.docHTML=e;if(t!==e&&this.internals)this.internals.setFormValue(e)}commands={...vt};content=[Fo({name:"menubar",part:"menubar"}),Fo({name:"toolbar",part:"toolbar"}),Rn({part:"doc",tabindex:"0"}),C.input({part:"caret",class:"caret-paint"}),Rn({part:"edgeStart",class:"selection-edge -start"}),Rn({part:"edgeEnd",class:"selection-edge -end"})];formResetCallback(){this.value=""}connectedCallback(){super.connectedCallback();let{doc:e}=this.parts;if(e.innerHTML==="")if(this._value.trim()!=="")e.innerHTML=this._value;else{let s=Array.from(this.childNodes).filter((r)=>!(r instanceof Element&&r.hasAttribute("slot")));if(s.length>0){let r=document.createDocumentFragment();for(let l of s)r.appendChild(l);e.appendChild(r)}}this.isInitialized=!0,this.selectable=new Ge(e);let t=e.querySelector("p,h1,h2,h3,h4,h5,h6,div,blockquote,pre")||e.firstElementChild;if(t)t.appendChild(this.selectable.createBounds());this.selectable.normalize(),e.addEventListener("keydown",this.handleKeydown,!0),e.addEventListener("keypress",this.handleKeypress),e.addEventListener("copy",this.handleCopy),e.addEventListener("cut",this.handleCut),e.addEventListener("paste",this.handlePaste),e.addEventListener("pointerdown",this.handleResizePointerDown),e.addEventListener("pointermove",this.handleResizePointerMove),e.addEventListener("pointerup",this.handleResizePointerUp),this.touchAffordances=document.createElement("div"),this.touchAffordances.className="touch-affordances not-selectable do-not-spanify",this.touchHandleStart=document.createElement("div"),this.touchHandleStart.className="touch-affordance touch-handle-start not-selectable do-not-spanify";let n=document.createElement("span");n.className="touch-icon",n.appendChild(b.chevronLeft()),this.touchHandleStart.appendChild(n),this.touchContextMenu=document.createElement("div"),this.touchContextMenu.className="touch-affordance touch-context-menu not-selectable do-not-spanify";let i=document.createElement("span");i.className="touch-icon",i.innerHTML="⋮",this.touchContextMenu.appendChild(i),this.touchHandleEnd=document.createElement("div"),this.touchHandleEnd.className="touch-affordance touch-handle-end not-selectable do-not-spanify";let o=document.createElement("span");o.className="touch-icon",o.appendChild(b.chevronRight()),this.touchHandleEnd.appendChild(o),this.touchAffordances.append(this.touchHandleStart,this.touchContextMenu,this.touchHandleEnd),e.appendChild(this.touchAffordances);for(let s of[this.touchHandleStart,this.touchHandleEnd])s.addEventListener("pointerdown",this.handleAffordanceDragStart),s.addEventListener("pointermove",this.handleAffordanceDragMove),s.addEventListener("pointerup",this.handleAffordanceDragEnd);this.touchContextMenu.addEventListener("pointerdown",this.handleTouchContextMenu),e.addEventListener("selectionchanged",()=>{if(this.isTouchInteraction=this.selectable.touchMode,!this.touchMenuEl)this.updateUndo("new","selectionchanged");this.updateTouchAffordances()}),e.addEventListener("click",this.handleDocClick),e.addEventListener("dragstart",this.handleDragStart),e.addEventListener("dragover",this.handleDragOver),e.addEventListener("drop",this.handleDrop),e.addEventListener("dragend",this.handleDragEnd),e.setAttribute("data-drop","text/html;text/plain;Files;image/*"),this.addEventListener("click",this.handleToolbarClick),this.addEventListener("change",this.handleToolbarChange),this.selectable.focusTarget=this.parts.caret,this.selectable.onBoundsChanged=()=>this.syncCaret(),this.syncCaret(),this.applyWidgets(),this.trackBar(this.parts.menubar,"has-menubar"),this.trackBar(this.parts.toolbar,"has-toolbar"),this.updateUndo("init"),this.focus()}trackBar(e,t){let n=()=>this.toggleAttribute(t,e.assignedNodes({flatten:!0}).length>0);e.addEventListener("slotchange",n),n()}applyWidgets(){let e=this.widgets;if(e!=="default"&&e!=="minimal")return;if(this.querySelector('[slot="toolbar"], [slot="menubar"]'))return;if(e==="default"){for(let t of In(this))this.appendChild(t);if(this.localized)this.appendChild(zn())}for(let t of e==="minimal"?Hn():jn())t.setAttribute("slot","toolbar"),this.appendChild(t)}disconnectedCallback(){super.disconnectedCallback(),this.selectable?.destroy()}markerRect(e){let t=ht(e,this.parts.doc);if(t)return{left:t.left,top:t.top,right:t.left,bottom:t.top+t.height,width:0,height:t.height};return e.getBoundingClientRect()}syncCaret(){let e=this.parts.caret,t=this.parts.edgeStart,n=this.parts.edgeEnd,i=this.parts.doc,o=i.querySelector(".sel-start"),s=i.querySelector(".sel-end"),r=s||o,l=i.querySelectorAll(".selected").length===0,a=this.getBoundingClientRect(),c=i.getBoundingClientRect(),d=getComputedStyle(this),u=a.top+parseFloat(d.borderTopWidth||"0"),h=a.left+parseFloat(d.borderLeftWidth||"0"),f=(p,x)=>{if(!x){p.style.display="none";return}let m=ht(x,i);if(!m){p.style.display="none";return}if(m.top+m.height<c.top||m.top>c.bottom){p.style.display="none";return}p.style.display="block",p.style.left=`${m.left-h}px`,p.style.top=`${m.top-u}px`,p.style.height=`${m.height}px`};f(e,r),e.classList.toggle("-collapsed",l),f(t,l?null:o),f(n,l?null:s)}getContext(){return{root:this.parts.doc,selectable:this.selectable,commands:this.commands,find:(e)=>this.parts.doc.querySelector(e),findAll:(e)=>Array.from(this.parts.doc.querySelectorAll(e)),selectedLeafNodes:()=>this.selectedLeafNodes(),selectedBlocks:()=>this.selectedBlocks(),insertionPoint:()=>this.insertionPoint(),block:(e)=>this.block(e),normalize:()=>this.normalize(),focus:()=>this.focus(),updateUndo:(e,t)=>this.updateUndo(e,t)}}doCommand(e){Ft(this.getContext(),e)}focus(){this.selectable?.focus()}normalize(){this.selectable?.normalize()}selectedLeafNodes(){return ze(this.parts.doc).filter((e)=>e.parentElement?.closest(".selected")!==null)}selectedBlocks(){return Array.from(this.parts.doc.querySelectorAll(".selected-block"))}insertionPoint(){return this.parts.doc.querySelector("input.caret")}block(e){let t=e;while(t&&t.parentNode!==this.parts.doc)t=t.parentNode;return t instanceof Element?t:null}caretCell(){let e=this.insertionPoint();return e?Z(e):null}listItemOf(e){let t=e;while(t&&t!==this.parts.doc){if(t instanceof Element&&t.tagName==="LI"&&t.parentElement&&(t.parentElement.tagName==="UL"||t.parentElement.tagName==="OL")&&!t.parentElement.classList.contains("editor-table"))return t;t=t.parentNode}return null}moveCaretToCell(e){this.selectable.unmark(),this.selectable.removeBounds();let t=document.createElement("input");t.className="sel-start";let n=document.createElement("input");n.className="sel-end caret",e.insertBefore(t,e.firstChild),e.appendChild(n),this.selectable.normalize(),this.selectable.markBounds(),this.selectable.selectionChanged()}tableMoveUp(e){let t=W(e);if(!t)return;let n=D(t),i=te(e,n),s=K(t,i,n)[0];for(let l=0;l<n;l++)s.before(ne());let r=gt(e);if(r)this.moveCaretToCell(r);this.updateUndo("new")}tableMoveDown(e){let t=W(e);if(!t)return;let n=D(t),i=te(e,n),o=K(t,i,n),s=o[o.length-1];for(let l=0;l<n;l++)s.after(ne());let r=pt(e);if(r)this.moveCaretToCell(r);this.updateUndo("new")}exitTable(e,t){let n=W(e);if(!n)return;let i=this.block(n);if(!i)return;let o=t==="before"?i.previousElementSibling:i.nextElementSibling;if(o){if(this.selectable.unmark(),this.selectable.removeBounds(),t==="before")o.appendChild(this.selectable.createBounds());else o.insertBefore(this.selectable.createBounds(),o.firstChild);this.selectable.normalize(),this.selectable.markBounds(),this.selectable.selectionChanged()}else{let s=document.createElement("p");if(s.textContent=" ",t==="before")i.before(s);else i.after(s);this.selectable.unmark(),this.selectable.removeBounds(),s.appendChild(this.selectable.createBounds()),this.selectable.normalize(),this.selectable.markBounds(),this.selectable.selectionChanged(),this.updateUndo("new")}}splitListItem(e){let t=this.insertionPoint();if(!t)return;let n=e.parentElement;if(!n)return;if(!e.textContent?.replace(/\u00A0/g,"").trim()){let a=document.createElement("p");if(a.textContent=" ",this.selectable.removeBounds(),a.appendChild(this.selectable.createBounds()),n.children.length<=1)n.after(a),n.remove();else if(!e.previousElementSibling)n.before(a),e.remove();else if(!e.nextElementSibling)n.after(a),e.remove();else{let c=document.createElement(n.tagName),d=e.nextElementSibling;while(d){let u=d.nextElementSibling;c.appendChild(d),d=u}n.after(a),a.after(c),e.remove()}this.selectable.normalize(),this.selectable.markBounds(),this.updateUndo("new");return}let o=document.createElement("li"),s=t.nextSibling;while(s){let a=s.nextSibling;o.appendChild(s),s=a}let r=e.querySelector(".sel-start"),l=e.querySelector(".sel-end");if(l)o.insertBefore(l,o.firstChild);if(r)o.insertBefore(r,o.firstChild);if(!o.textContent?.trim()){let a=document.createTextNode(" ");if(r)r.before(a);else o.appendChild(a)}if(!e.textContent?.trim())e.appendChild(document.createTextNode(" "));e.after(o),this.selectable.markBounds(),this.updateUndo("new")}isListItemEmpty(e){return!e.textContent?.replace(/\u00A0/g,"").trim()}removeListItem(e){let t=e.parentElement;if(!t)return;let n=e.previousElementSibling;if(n&&n.tagName==="LI"){while(e.firstChild)n.appendChild(e.firstChild);e.remove()}else{let i=document.createElement("p");while(e.firstChild)i.appendChild(e.firstChild);if(t.before(i),e.remove(),t.children.length===0)t.remove()}this.normalize(),this.selectable.markBounds(),this.updateUndo("new")}listBackspace(e){if(!this.deleteSelection()){let t=this.insertionPoint();if(!t)return;if(this.isListItemEmpty(e)){this.removeListItem(e);return}let n=q(t,e,P);if(n){if(n.nodeType===3&&(n.textContent||"").length>1)n.textContent=n.textContent.slice(0,-1);else{let i=J(n);if(e.contains(i))i.parentNode?.removeChild(i)}this.normalize(),this.updateUndo()}else this.removeListItem(e)}}listForwardDelete(e){if(!this.deleteSelection()){let t=this.insertionPoint();if(!t)return;let n=V(t,e,P);if(n){if(n.nodeType===3&&(n.textContent||"").length>1)n.textContent=n.textContent.slice(1);else{let i=J(n);if(e.contains(i))i.parentNode?.removeChild(i)}this.normalize(),this.updateUndo()}else{let i=e.nextElementSibling;if(i&&i.tagName==="LI"){while(i.firstChild)e.appendChild(i.firstChild);i.remove(),this.normalize(),this.selectable.markBounds(),this.updateUndo("new")}}}}groupByLine(e){let t=new Map;for(let i of e){let o=i.getBoundingClientRect(),s=Math.round(o.top),r=t.get(s);if(!r)r=[],t.set(s,r);r.push(i)}return Array.from(t.keys()).sort((i,o)=>i-o).map((i)=>t.get(i))}closestCharOnLine(e,t){let n=e[0],i=1/0;for(let o of e){let s=o.getBoundingClientRect(),r=s.left+s.width/2,l=Math.abs(r-t);if(l<i)i=l,n=o}return n}positionAtSpanChar(e,t,n,i){let o=e.getBoundingClientRect(),s=this.selectable.find(".sel-start"),r=this.selectable.find(".sel-end");if(!s||!r)return;if(t<o.left+o.width/2)e.before(r);else e.after(r);if(!n)r.parentNode?.insertBefore(s,r);k(i,!1),this.selectable.markBounds(),this.focus()}moveVertical(e,t){let n=this.insertionPoint();if(!n)return;let i=this.block(n);if(!i)return;if(!(this.lastKey===38||this.lastKey===40)){let d=this.markerRect(n);this.lastCursorX=d.left}let s=this.lastCursorX,r=this.listItemOf(n),l=r||i;k(l,!0);let a=Array.from(l.querySelectorAll(".spanified"));if(a.length>0){let d=this.groupByLine(a),u=this.markerRect(n),h=Math.round(u.top),f=0,p=1/0;for(let m=0;m<d.length;m++){let z=Math.round(d[m][0].getBoundingClientRect().top),I=Math.abs(z-h);if(I<p)p=I,f=m}let x=e==="up"?f-1:f+1;if(x>=0&&x<d.length){let m=this.closestCharOnLine(d[x],s);this.positionAtSpanChar(m,s,t,l);return}}if(k(l,!1),r){let d=e==="up"?r.previousElementSibling:r.nextElementSibling;if(d&&d.tagName==="LI"){k(d,!0);let h=Array.from(d.querySelectorAll(".spanified"));if(h.length===0){k(d,!1),this.moveCaretToEmptyContainer(d,e,t);return}let f=this.groupByLine(h),p=e==="up"?f[f.length-1]:f[0],x=this.closestCharOnLine(p,s);this.positionAtSpanChar(x,s,t,d);return}let u=e==="up"?i.previousElementSibling:i.nextElementSibling;if(!u)return;this.moveVerticalToBlock(u,e,s,t);return}let c=e==="up"?i.previousElementSibling:i.nextElementSibling;if(!c)return;this.moveVerticalToBlock(c,e,s,t)}moveCaretToEmptyContainer(e,t,n){let i=this.selectable.find(".sel-start"),o=this.selectable.find(".sel-end");if(!i||!o)return;if(t==="up")e.appendChild(o);else e.insertBefore(o,e.firstChild);if(!n)o.parentNode?.insertBefore(i,o);this.selectable.markBounds(),this.focus()}moveVerticalToBlock(e,t,n,i){let s=(e.tagName==="UL"||e.tagName==="OL")&&!e.classList.contains("editor-table")?(t==="up"?e.querySelector(":scope > li:last-child"):e.querySelector(":scope > li:first-child"))||e:e;k(s,!0);let r=Array.from(s.querySelectorAll(".spanified"));if(r.length===0){k(s,!1),this.moveCaretToEmptyContainer(s,t,i);return}let l=this.groupByLine(r),a=t==="up"?l[l.length-1]:l[0],c=this.closestCharOnLine(a,n);this.positionAtSpanChar(c,n,i,s)}contentKey(e){if(!this.insertionPoint())return;this.isolateForTyping(e);let t=this.insertionPoint();if(t)t.before(document.createTextNode(e)),this.normalize(),this.updateUndo()}isolateForTyping(e){let t=this.insertionPoint(),n=$l(e);if(!t||!n)return null;let i=this.block(t);if(!i)return null;let o=i.getAttribute("dir")??(getComputedStyle(i).direction||"ltr");if(n===o)return null;let s=t.parentElement;if(s?.dataset.bidiRun===n)return s;let r=document.createElement("span");return r.dataset.bidiRun=n,r.setAttribute("dir",n),t.parentNode?.insertBefore(r,t),r.appendChild(t),r}backspace(){if(!this.deleteSelection()){let e=this.insertionPoint();if(!e)return;let t=q(e,this.parts.doc,P);if(!t)return;let n=this.block(e),i=this.block(t);if(t.nodeType===3&&(t.textContent||"").length>1)t.textContent=t.textContent.slice(0,-1);else{let o=J(t);o.parentNode?.removeChild(o),this.normalize()}if(i&&n&&this.parts.doc.contains(i)&&i!==n){while(n.firstChild)i.appendChild(n.firstChild);n.remove()}this.updateUndo()}}forwardDelete(){if(!this.deleteSelection()){let e=this.insertionPoint();if(!e)return;let t=V(e,this.parts.doc,P);if(!t)return;let n=this.block(e),i=this.block(t);if(t.nodeType===3&&(t.textContent||"").length>1)t.textContent=t.textContent.slice(1);else{let o=J(t);o.parentNode?.removeChild(o),this.normalize()}if(i&&n&&this.parts.doc.contains(i)&&i!==n){while(i.firstChild)n.appendChild(i.firstChild);i.remove()}this.updateUndo()}}deleteSelection(){let e=this.selectedBlocks(),t=!1;for(let r of e)if(!r.classList.contains("first-block")&&!r.classList.contains("last-block"))r.remove();let n=this.insertionPoint(),i=this.selectedLeafNodes().filter((r)=>r!==n);if(i.length){let r=J(i[0]);if(n&&r.parentNode)r.parentNode.insertBefore(n,r);for(let l of i){let a=J(l);a.parentNode?.removeChild(a)}t=!0}let o=this.parts.doc.querySelector(".sel-start");if(o&&!o.classList.contains("caret"))o.remove();this.selectable.unmark();let s=this.parts.doc.querySelector(".caret");for(let r of e)if(this.parts.doc.contains(r)&&(!s||!r.contains(s))&&!r.textContent?.trim())r.remove();if(e.length>1){let r=e[0],l=e[e.length-1];if(this.parts.doc.contains(r)&&this.parts.doc.contains(l)&&!r.classList.contains("editor-table")&&!l.classList.contains("editor-table")){while(r.firstChild)l.insertBefore(r.firstChild,l.firstChild);r.remove()}this.selectable.markBounds(),this.focus()}else if(t)this.updateUndo(),this.selectable.selectionChanged();return t}splitAtCaret(){let e=this.insertionPoint();if(!e)return!1;let t=this.block(e);if(!t)return!1;let n=document.createElement(t.tagName),i=e.nextSibling;while(i){let r=i.nextSibling;n.appendChild(i),i=r}let o=t.querySelector(".sel-start"),s=t.querySelector(".sel-end");if(s)n.insertBefore(s,n.firstChild);if(o)n.insertBefore(o,n.firstChild);if(!n.textContent?.trim()){let r=document.createTextNode(" ");if(o)o.before(r);else n.appendChild(r)}if(!t.textContent?.trim())t.appendChild(document.createTextNode(" "));return t.after(n),this.selectable.markBounds(),this.updateUndo("new"),!0}arrowLeft(e){let t=this.selectable.find(".sel-start");if(!t)return;if(e.altKey)this.moveWordLeft(e.shiftKey);else{let n=q(t,this.parts.doc,P);if(n)this.moveBoundsBefore(n,e.shiftKey)}}arrowRight(e){let t=this.selectable.find(".sel-end");if(!t)return;if(e.altKey)this.moveWordRight(e.shiftKey);else{let n=V(t,this.parts.doc,P);if(n)this.moveBoundsAfter(n,e.shiftKey)}}moveWordLeft(e){let t=this.selectable.find(".sel-start");if(!t)return;let n=this.block(t);if(!n)return;k(n,!0);let i=q(t,n,P);if(!i){k(n,!1);return}while(i&&i.nodeType===3&&/^\s$/.test(i.textContent||""))i=q(i,n,P);let o=i;while(i&&i.nodeType===3&&/^\S$/.test(i.textContent||"")){o=i;let s=q(i,n,P);if(s&&s.nodeType===3&&/^\S$/.test(s.textContent||""))i=s;else break}if(o){let s=this.selectable.find(".sel-start"),r=this.selectable.find(".sel-end");if(s&&r){if(o.parentNode?.insertBefore(s,o),!e)s.after(r)}}k(n,!1),this.selectable.markBounds(),this.focus()}moveWordRight(e){let t=this.selectable.find(".sel-end");if(!t)return;let n=this.block(t);if(!n)return;k(n,!0);let i=V(t,n,P);if(!i){k(n,!1);return}while(i&&i.nodeType===3&&/^\s$/.test(i.textContent||""))i=V(i,n,P);let o=i;while(i&&i.nodeType===3&&/^\S$/.test(i.textContent||"")){o=i;let s=V(i,n,P);if(s&&s.nodeType===3&&/^\S$/.test(s.textContent||""))i=s;else break}if(o){let s=this.selectable.find(".sel-start"),r=this.selectable.find(".sel-end");if(s&&r){if(o.parentNode?.insertBefore(r,o.nextSibling),!e)r.parentNode?.insertBefore(s,r)}}k(n,!1),this.selectable.markBounds(),this.focus()}moveBoundsBefore(e,t){let n=this.selectable.find(".sel-start"),i=this.selectable.find(".sel-end");if(!n||!i)return;if(e.nodeType===3&&(e.textContent||"").length>1){let o=e.splitText((e.textContent||"").length-1);o.parentNode?.insertBefore(n,o)}else e.parentNode?.insertBefore(n,e);if(!t)n.after(i);this.selectable.markBounds(),this.focus()}moveBoundsAfter(e,t){let n=this.selectable.find(".sel-start"),i=this.selectable.find(".sel-end");if(!n||!i)return;if(e.nodeType===3&&(e.textContent||"").length>1)e.splitText(1);if(e.parentNode?.insertBefore(i,e.nextSibling),!t)i.parentNode?.insertBefore(n,i);this.selectable.markBounds(),this.focus()}signatureOf(e){let t=document.createElement("div");t.innerHTML=e;for(let n of Array.from(t.querySelectorAll(".sel-start, .sel-end")))n.remove();for(let n of Array.from(t.querySelectorAll("[class], [draggable], [data-drag]"))){if(n.classList.remove("selected","selected-block","first-block","last-block"),n.classList.length===0)n.removeAttribute("class");n.removeAttribute("draggable"),n.removeAttribute("data-drag")}for(let n of Array.from(t.querySelectorAll("span")))if(n.attributes.length===0)n.replaceWith(...Array.from(n.childNodes));return t.normalize(),t.innerHTML}updateUndo(e,t){if(this.undo.length===0)e="init";if(t&&this.reasonForLastUndo===t)e=void 0;this.reasonForLastUndo=t;let n=this.docHTML;switch(e){case"init":this.undo=[n],this.undoDepth=0;break;case"new":if(this.undoDepth)this.undo=this.undo.slice(this.undoDepth),this.undoDepth=0;if(this.undo.length&&this.signatureOf(this.undo[0])===this.signatureOf(n)){this.undo[0]=n;break}this.undo.unshift(n);break;case"undo":if(this.undoDepth<this.undo.length-1)this.undoDepth++,this.docHTML=this.undo[this.undoDepth],this.focus();break;case"redo":if(this.undoDepth>0)this.undoDepth--,this.docHTML=this.undo[this.undoDepth],this.focus();break;default:if(this.undoDepth||this.undo.length===1){if(this.undo.length&&this.signatureOf(this.undo[0])===this.signatureOf(n)){this.undo[0]=n;break}this.undo=this.undo.slice(this.undoDepth),this.undoDepth=0,this.undo.unshift(n)}else this.undo[0]=n}if(this.selectable?.onBoundsChanged?.(),this.updateUndoButtons(),this.internals)this.internals.setFormValue(n)}updateUndoButtons(){let e=this.parts.toolbar,t=e.querySelector('[value="updateUndo undo"]'),n=e.querySelector('[value="updateUndo redo"]');if(t)t.disabled=this.undoDepth>=this.undo.length-1;if(n)n.disabled=this.undoDepth===0}handleDocClick=(e)=>{if(!this.active)return;let t=e.target?.closest?.("a");if(!t||!this.parts.doc.contains(t))return;if(e.metaKey||e.ctrlKey)window.open(t.getAttribute("href")||"",t.getAttribute("target")||"_blank","noopener");e.preventDefault()};handleShortcut(e){let t=e.key.toLowerCase(),n=`${e.ctrlKey||e.metaKey?"ctrl+":""}${t}`,i=this.parts.toolbar.querySelector(`[data-shortcut="${n}"]`);if(i){let o=i.getAttribute("value");if(o)this.doCommand(o),e.preventDefault(),e.stopPropagation()}}handleKeydown=(e)=>{if(!this.active)return;if(e.target.closest(".not-editable"))return;let n=this.caretCell(),i=this.insertionPoint(),o=i?this.listItemOf(i):null;switch(e.key){case"Tab":if(e.preventDefault(),n)if(e.shiftKey){let s=It(n);if(s)this.moveCaretToCell(s)}else{let s=mt(n);if(s)this.moveCaretToCell(s);else{let r=W(n);if(r){let l=D(r);for(let c=0;c<l;c++)r.appendChild(ne());let a=mt(n);if(a)this.moveCaretToCell(a);this.updateUndo("new")}}}break;case"Backspace":if(e.preventDefault(),this.deleteSelection())this.updateUndo("new");else if(n){if(i){let s=q(i,n,P);if(s){if(s.nodeType===3&&(s.textContent||"").length>1)s.textContent=s.textContent.slice(0,-1);else{let r=J(s);if(n.contains(r))r.parentNode?.removeChild(r)}this.normalize(),this.updateUndo()}}}else if(o)this.listBackspace(o);else this.backspace();break;case"Delete":if(e.preventDefault(),this.deleteSelection())this.updateUndo("new");else if(n){if(i){let s=V(i,n,P);if(s){if(s.nodeType===3&&(s.textContent||"").length>1)s.textContent=s.textContent.slice(1);else{let r=J(s);if(n.contains(r))r.parentNode?.removeChild(r)}this.normalize(),this.updateUndo()}}}else if(o)this.listForwardDelete(o);else this.forwardDelete();break;case"Enter":if(e.preventDefault(),n){if(e.shiftKey)this.tableMoveDown(n);else if(i)i.before(document.createElement("br")),this.normalize(),this.updateUndo()}else if(o)this.deleteSelection(),this.splitListItem(o);else this.deleteSelection(),this.splitAtCaret();break;case"ArrowLeft":e.preventDefault(),this.arrowLeft(e);break;case"ArrowRight":e.preventDefault(),this.arrowRight(e);break;case"ArrowUp":if(e.preventDefault(),n)if(e.shiftKey)this.tableMoveUp(n);else{let s=gt(n);if(s)this.moveCaretToCell(s);else this.exitTable(n,"before")}else this.moveVertical("up",e.shiftKey);break;case"ArrowDown":if(e.preventDefault(),n)if(e.shiftKey)this.tableMoveDown(n);else{let s=pt(n);if(s)this.moveCaretToCell(s);else this.exitTable(n,"after")}else this.moveVertical("down",e.shiftKey);break}this.lastKey=e.keyCode};handleKeypress=(e)=>{if(!this.active)return;if(e.target.closest(".not-editable"))return;if(e.ctrlKey||e.metaKey)this.handleShortcut(e);else if(this.deleteSelection(),e.key.length===1)this.contentKey(e.key);e.preventDefault(),e.stopPropagation()};handleCopy=(e)=>{let t=Array.from(this.parts.doc.querySelectorAll(".selected"));if(t.length===0)return;let n="",i="";for(let o of t)n+=o.outerHTML,i+=o.textContent;e.clipboardData?.setData("text/html",n),e.clipboardData?.setData("text/plain",i),e.preventDefault()};handleCut=(e)=>{this.handleCopy(e),this.deleteSelection()};insertTransfer(e,t){let n=this.insertionPoint();if(!n)return!1;if(this.pastemode==="remove"||!e){if(!t)return!1;n.before(document.createTextNode(t))}else{let i=document.createElement("div");i.innerHTML=e;while(i.firstChild)n.before(i.firstChild)}return!0}handlePaste=(e)=>{if(!this.active)return;let t=e.clipboardData?.getData("text/html"),n=e.clipboardData?.getData("text/plain");this.deleteSelection(),this.insertTransfer(t,n),this.normalize(),this.updateUndo("new"),e.preventDefault()};draggingSelection=!1;handleDragStart=(e)=>{if(!this.active||!e.dataTransfer)return;let t=this.selectable.findAll(".selected");if(t.length===0)return;let n=document.createElement("div");for(let i of t)n.appendChild(i.cloneNode(!0));e.dataTransfer.setData("text/html",n.innerHTML),e.dataTransfer.setData("text/plain",n.textContent||""),e.dataTransfer.effectAllowed="copyMove",this.draggingSelection=!0};handleDragOver=(e)=>{if(!this.active)return;if(e.preventDefault(),e.dataTransfer)e.dataTransfer.dropEffect=e.altKey?"copy":"move";if(e.target instanceof Element)this.selectable.placeCaretAt(e.clientX,e.clientY)};handleDrop=(e)=>{if(!this.active||!e.dataTransfer)return;e.preventDefault();let t=this.draggingSelection;this.draggingSelection=!1;let n=this.insertionPoint();if(t&&n?.closest(".selected")){this.clearDraggable();return}let o=Array.from(e.dataTransfer.files||[]).filter((l)=>l.type.startsWith("image/"));if(o.length){this.insertDroppedImages(o),this.clearDraggable();return}let s=e.dataTransfer.getData("text/html"),r=e.dataTransfer.getData("text/plain");if(t&&!e.altKey)this.deleteSelection();else this.selectable.unmark();this.clearDraggable(),this.insertTransfer(s,r),this.normalize(),this.updateUndo("new"),this.focus()};handleDragEnd=()=>{this.draggingSelection=!1,this.clearDraggable()};clearDraggable(){for(let e of Array.from(this.parts.doc.querySelectorAll("[draggable]")))e.removeAttribute("draggable"),e.removeAttribute("data-drag")}async insertDroppedImages(e){for(let t of e){let n=await new Promise((i)=>{let o=new FileReader;o.onload=()=>i(String(o.result||"")),o.readAsDataURL(t)});if(n)this.doCommand(`insertImage ${n} ${t.name}`)}}cellEdgeAt(e){let n=e.target.closest(".editor-table > li");if(!n)return null;let i=n.parentElement;if(!i||!i.classList.contains("editor-table"))return null;let o=n.getBoundingClientRect(),s=D(i),r=De(n,s),l=4;if(Math.abs(e.clientX-o.right)<l&&r<s-1)return[i,r];if(Math.abs(e.clientX-o.left)<l&&r>0)return[i,r-1];return null}updateTouchAffordances(){if(!this.touchAffordances)return;if(!this.isTouchInteraction&&!this.touchMenuEl){this.touchAffordances.style.display="none",this.parts.doc.style.paddingTop="",this.parts.doc.style.paddingBottom="";return}let e=this.parts.doc.querySelector(".sel-start"),t=this.parts.doc.querySelector(".sel-end");if(!e||!t){this.touchAffordances.style.display="none",this.parts.doc.style.paddingTop="",this.parts.doc.style.paddingBottom="";return}let n=this.parts.doc.getBoundingClientRect(),i=this.markerRect(e),o=this.markerRect(t),s=!1;if(this.touchDrags.size===0){let r=parseFloat(this.parts.doc.style.paddingTop)||0,l=parseFloat(this.parts.doc.style.paddingBottom)||0,a=Math.min(i.top,o.top)-48-r,c=Math.max(i.bottom,o.bottom)+48+l,d=a<n.top?"52px":"",u=c>n.bottom?"52px":"",h=this.parts.doc.style.paddingTop,f=this.parts.doc.style.paddingBottom;if(d!==h||u!==f)s=!0,this.parts.doc.style.paddingTop=d,this.parts.doc.style.paddingBottom=u}if(s)this.touchAffordances.style.opacity="0",this.touchAffordances.style.display="block",setTimeout(()=>{this.positionAffordances(),this.touchAffordances.style.opacity="1"},160);else this.positionAffordances(),this.touchAffordances.style.display="block",this.touchAffordances.style.opacity="1"}positionAffordances(){let e=this.parts.doc.querySelector(".sel-start"),t=this.parts.doc.querySelector(".sel-end");if(!e||!t)return;let n=this.parts.doc.getBoundingClientRect(),i=this.markerRect(e),o=this.markerRect(t),s=i.left-n.left+this.parts.doc.scrollLeft,r=i.top-n.top+this.parts.doc.scrollTop,l=o.right-n.left+this.parts.doc.scrollLeft,a=o.bottom-n.top+this.parts.doc.scrollTop;if(e.nextElementSibling===t)this.touchHandleStart.style.left=`${s-44}px`,this.touchHandleStart.style.top=`${r-44}px`,this.touchContextMenu.style.left=`${s}px`,this.touchContextMenu.style.top=`${r-44}px`,this.touchHandleEnd.style.left=`${l}px`,this.touchHandleEnd.style.top=`${a}px`;else{this.touchHandleStart.style.left=`${s-44}px`,this.touchHandleStart.style.top=`${r-44}px`,this.touchHandleEnd.style.left=`${l}px`,this.touchHandleEnd.style.top=`${a}px`;let d=(s+l)/2-22,u=Math.min(r,a)-44;this.touchContextMenu.style.left=`${d}px`,this.touchContextMenu.style.top=`${u}px`}}handleAffordanceDragStart=(e)=>{let t=e.currentTarget,n=t===this.touchHandleStart?"start":"end";t.setPointerCapture(e.pointerId);let i=t.getBoundingClientRect(),o=n==="start"?".sel-start":".sel-end",s=this.parts.doc.querySelector(o),r=s?parseFloat(getComputedStyle(s).lineHeight):NaN,l=isNaN(r)?10:r/2,a,c;if(n==="start")a=i.right-e.clientX,c=i.bottom+l-e.clientY;else a=i.left-e.clientX,c=i.top-l-e.clientY;this.touchDrags.set(e.pointerId,{target:n,offsetX:a,offsetY:c}),this.hideTouchMenu(),this.touchAffordances.classList.add("dragging"),e.preventDefault(),e.stopPropagation()};handleAffordanceDragMove=(e)=>{let t=this.touchDrags.get(e.pointerId);if(!t)return;let n=e.clientX+t.offsetX,i=e.clientY+t.offsetY,o=e.currentTarget;o.style.pointerEvents="none",this.touchAffordances.style.pointerEvents="none";let s=this.shadowRoot.elementFromPoint(n,i);if(o.style.pointerEvents="auto",this.touchAffordances.style.pointerEvents="",!s||s.closest(".not-selectable")||s.classList.contains("not-selectable"))return;let r=ee(this.parts.doc,n,i);if(!r)return;let l=t.target==="start"?".sel-start":".sel-end",a=this.parts.doc.querySelector(l);if(a){let c=document.createRange();c.setStart(r.node,r.after?r.offset+1:r.offset),c.collapse(!0),c.insertNode(a),this.parts.doc.normalize(),this.selectable.markBounds();let d=this.parts.doc.getBoundingClientRect(),u=e.currentTarget,h=e.clientX-d.left+this.parts.doc.scrollLeft,f=e.clientY-d.top+this.parts.doc.scrollTop;u.style.left=`${h-22}px`,u.style.top=`${f-22}px`}e.preventDefault(),e.stopPropagation()};handleAffordanceDragEnd=(e)=>{if(!this.touchDrags.has(e.pointerId))return;if(e.currentTarget.releasePointerCapture(e.pointerId),this.touchDrags.delete(e.pointerId),this.touchDrags.size===0)this.selectable.despanify(),this.selectable.selectionChanged(),requestAnimationFrame(()=>{this.touchAffordances.classList.remove("dragging")});e.preventDefault(),e.stopPropagation()};handleTouchContextMenu=(e)=>{if(e.preventDefault(),e.stopPropagation(),this.touchMenuEl){this.hideTouchMenu();return}this.showTouchMenu()};showTouchMenu(){this.hideTouchMenu();let e=document.createElement("div");e.className="touch-menu not-selectable do-not-spanify";let t=()=>this.selectable.findAll(".selected").map((c)=>c.textContent).join(""),n=[{label:"Cut",action:()=>{let c=t();if(!c)return;navigator.clipboard.writeText(c),this.deleteSelection(),this.updateUndo("new")}},{label:"Copy",action:()=>{navigator.clipboard.writeText(t())}},{label:"Paste",action:()=>{navigator.clipboard.readText().then((c)=>{if(c){this.deleteSelection();let d=this.insertionPoint();if(d)d.before(document.createTextNode(c)),this.normalize(),this.updateUndo("new")}})}},{label:"Delete",action:()=>{this.deleteSelection(),this.updateUndo("new")}},{label:"Bold",action:()=>this.doCommand("setText font-weight bold")},{label:"Italic",action:()=>this.doCommand("setText font-style italic")},{label:"Plain",action:()=>this.doCommand("setText font-weight normal; setText font-style normal; setText text-decoration none")}];for(let{label:c,action:d}of n){let u=document.createElement("button");u.className="touch-menu-item not-selectable",u.textContent=c,u.addEventListener("pointerdown",(h)=>{h.stopPropagation(),h.preventDefault(),d(),this.hideTouchMenu()}),e.appendChild(u)}let i=document.createElement("button");i.className="touch-menu-item touch-menu-close not-selectable",i.textContent="×",i.addEventListener("pointerdown",(c)=>{c.stopPropagation(),c.preventDefault(),this.hideTouchMenu()}),e.appendChild(i);let o=this.touchContextMenu.getBoundingClientRect(),s=this.parts.doc.getBoundingClientRect(),r=(n.length+1)*70,l=o.left-s.left+this.parts.doc.scrollLeft+22-r/2;if(l<0)l=4;if(l+r>s.width)l=s.width-r-4;e.style.left=`${l}px`;let a=o.top-s.top+this.parts.doc.scrollTop-44;if(a<0)a=o.bottom-s.top+this.parts.doc.scrollTop+4;e.style.top=`${a}px`,this.touchMenuEl=e,this.touchAffordances.appendChild(e),this.touchMenuDismiss=(c)=>{if(this.touchMenuEl&&!this.touchMenuEl.contains(c.target))this.hideTouchMenu()},setTimeout(()=>{this.parts.doc.addEventListener("pointerdown",this.touchMenuDismiss)},0)}touchMenuDismiss=null;hideTouchMenu(){if(this.touchMenuDismiss)this.parts.doc.removeEventListener("pointerdown",this.touchMenuDismiss),this.touchMenuDismiss=null;if(this.touchMenuEl)this.touchMenuEl.remove(),this.touchMenuEl=null}handleResizePointerDown=(e)=>{let t=this.cellEdgeAt(e);if(!t)return;let[n,i]=t;this.resizeTable=n,this.resizeCol=i,this.resizeStartX=e.clientX;let o=K(n,0,D(n));this.resizeStartWidths=o.map((s)=>s.getBoundingClientRect().width),e.preventDefault(),e.stopPropagation(),this.parts.doc.setPointerCapture(e.pointerId)};handleResizePointerMove=(e)=>{if(!this.resizeTable){let i=this.cellEdgeAt(e);this.parts.doc.style.cursor=i?"col-resize":"";return}let t=e.clientX-this.resizeStartX,n=[...this.resizeStartWidths];n[this.resizeCol]=Math.max(30,n[this.resizeCol]+t),n[this.resizeCol+1]=Math.max(30,n[this.resizeCol+1]-t),Oe(this.resizeTable,n.map((i)=>`${i}px`))};handleResizePointerUp=(e)=>{if(this.resizeTable)this.updateUndo("new"),this.resizeTable=null,this.resizeCol=-1,this.parts.doc.style.cursor="",this.parts.doc.releasePointerCapture(e.pointerId)};isToolbarEvent(e){return e.closest('[slot="toolbar"]')!==null||e.closest('[slot="menubar"]')!==null}handleToolbarClick=(e)=>{let t=e.target;if(!this.isToolbarEvent(t))return;let n=t.closest("button");if(!n)return;let i=n.getAttribute("value");if(i)this.doCommand(i)};handleToolbarChange=(e)=>{let t=e.target;if(!this.isToolbarEvent(t))return;let n=t.closest("select")||t.closest("tosi-select");if(!n)return;let i=n.value;if(i)this.doCommand(i)}}var Nl=_n.elementCreator();var Uo="0.4.3";})();
|
|
12
|
+
`);var y=new Proxy({},{get(e,t){if(e[t]===void 0){let n="--"+X(t);e[t]=(i)=>`var(${n}, ${i})`}return e[t]}}),T=new Proxy({},{get(e,t){if(t==="default")return y;if(e[t]==null){t=X(t);let[,n,,i,o,s]=t.match(/^([-\w]*?)((_)?(\d+)(\w?))?$/)||["",t],r=`--${n}`;if(o!=null){let l=i==null?Number(o)/100:-Number(o)/100;switch(s){case"b":case"s":case"h":case"o":{let a=`--${t}`;g.registerComputedColor(a,r,l,s),e[t]=`var(${a})`}break;case"":e[t]=`calc(var(${r}) * ${l})`;break;default:throw console.error(s),Error(`Unrecognized method ${s} for css variable ${r}`)}}else e[t]=`var(${r})`}return e[t]}});function Rr(e,t){if(!e.internals)return;let n={},i="";if(e.hasAttribute("required")&&t==="")n.valueMissing=!0,i="Please fill out this field.";let o=e.getAttribute("minlength");if(o&&t.length<parseInt(o,10))n.tooShort=!0,i=`Please use at least ${o} characters.`;let s=e.getAttribute("maxlength");if(s&&t.length>parseInt(s,10))n.tooLong=!0,i=`Please use no more than ${s} characters.`;let r=e.getAttribute("pattern");if(r&&t!=="")try{if(!new RegExp(`^(?:${r})$`).test(t))n.patternMismatch=!0,i="Please match the requested format."}catch{}if(Object.keys(n).length>0)e.internals.setValidity(n,i,e);else e.internals.setValidity({})}var Ie=(e)=>e!=null&&Object.prototype.hasOwnProperty.call(e,"contract")?e.contract:void 0,gn=null;var _r=new Set(["type","enum","const"]),Pr=new Set(["description","title","default","examples","$counterexamples","$comment","$id","$schema"]),vi=new Set,Vr=(e)=>{if(gn!=null)return;let t=Object.keys(e).filter((i)=>!_r.has(i)&&!Pr.has(i));if(t.length===0)return;let n=t.sort().join(",");if(vi.has(n))return;vi.add(n),console.warn(`tosijs contracts: ${t.join(", ")} ${t.length===1?"is":"are"} NOT enforced by the built-in checker, which understands only `+"type/enum/const — those constraints are currently inert. Register a "+"full schema engine with setContractValidator(validate) (e.g. from tosijs-schema) to enforce them. Warned once per keyword set.")},Fr=(e,t)=>{if(Vr(t),t.const!==void 0&&e!==t.const)return`expected const ${JSON.stringify(t.const)}`;if(Array.isArray(t.enum)&&!t.enum.includes(e))return`expected one of ${JSON.stringify(t.enum)}`;if(typeof t.type==="string"){let n=t.type;if(!(n==="array"?Array.isArray(e):n==="null"?e===null:n==="integer"?typeof e==="number"&&Number.isInteger(e):n==="object"?typeof e==="object"&&e!==null&&!Array.isArray(e):typeof e===n))return`expected type ${n}, got ${Array.isArray(e)?"array":typeof e}`}if(gn!=null){let n=gn(e,t);if(n!==!0)return n.message}return null},qr=0,nt=new Set,bi=new Set,eo=Symbol("tosi-computed-attribute"),xi=new WeakSet,wi=(e)=>e!=null&&typeof e==="object"&&e[eo]===!0,wt=new WeakMap,Ur=(e,t)=>{let n=e.constructor,i=Ie(n)?.value;if(i==null)return;let o=Fr(t,i);if(o==null){wt.delete(e);let r=e.tagName?.toLowerCase();for(let l of[...nt])if(l.startsWith(`${r}: `))nt.delete(l);return}let s=e.tagName?.toLowerCase();if(Qs()){if(t==null||t===""){wt.delete(e),nt.delete(`${s}: ${o}`);return}let r=`${s}: ${o}`;if(!nt.has(r))nt.add(r),console.error(`<${s}> value contract violation from a BINDING: ${o}. The value `+"was applied anyway (state is authoritative on this path) — fix the "+"state, the contract, or the binding. Direct writes still throw.");let l=wt.get(e)??new Set;if(!l.has(o))l.add(o),wt.set(e,l),e.dispatchEvent?.(new CustomEvent("contractviolation",{bubbles:!0,detail:{reason:o,value:t,schema:i}}));return}throw TypeError(`<${s}> value contract violation: ${o}`)},Ct=new WeakMap;function en(){return`custom-elt${(qr++).toString(36)}`}var Ci=0,ki=new Set,Mi=new Set,Ei=Symbol("tosiDrainWrapped"),Ai=new WeakSet,Si=new Set,tn=null;function Wr(){if(tn===null)tn=new MutationObserver((e)=>{let t=new Set;for(let n of e)if(n.type==="attributes"&&n.target instanceof E){let i=n.target,o=Ui(n.attributeName);if(i._legacyTrackedAttrs?.has(o))t.add(i)}for(let n of t)n.queueRender(!1)});return tn}var it={};function Kr(e,t){let n=it[e],i=lt(t).replace(/:host\(([^)]+)\)/g,`${e}$1`).replace(/:host\b/g,e);it[e]=n?n+`
|
|
13
|
+
`+i:i}function Xr(e){if(it[e])document.head.append(C.style({id:e+"-component"},it[e]));delete it[e]}function Yr(e){let t=Object.create(null),n=(i)=>{if(Array.isArray(i)){i.forEach(n);return}if(!(i instanceof Element))return;let o=i.getAttribute("part");if(o!=null&&!(o in t))t[o]=i;for(let s of Array.from(i.children))n(s)};return n(e),t}var w=(e)=>e,Gr=(e)=>{class t extends E{static initAttributes=e}return t};class E extends HTMLElement{static elements=C;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(e){if(this.internals)if(e)this.internals.setValidity({customError:!0},e);else this.internals.setValidity({})}setValidity(e,t,n){this.internals?.setValidity(e,t,n)}setFormValue(e,t){this.internals?.setFormValue(e,t)}static _resolveInitAttributes(){let e=Ie(this),t=Object.prototype.hasOwnProperty.call(this,"initAttributes")?this.initAttributes:void 0;if(e?.attributes!=null){let r=Ct.get(this);if(r!=null)return r;let l={...t??{}},a=[];for(let[h,f]of Object.entries(e.attributes))if(f!=null&&"default"in f)l[h]=f.default;else if(!(h in l))a.push(h);if(a.length>0)throw Error(`${this.name} contract.attributes entries missing 'default': ${a.join(", ")} — the attribute machinery infers `+"each attribute's runtime type from its default, so every declared attribute needs one, either here or in static initAttributes.");let c=Object.getPrototypeOf(this),d=typeof c?._resolveInitAttributes==="function"?c._resolveInitAttributes():void 0,u=d!=null?{...d,...l}:l;return Ct.set(this,u),u}if(t==null){let r=Object.getPrototypeOf(this);return typeof r?._resolveInitAttributes==="function"?r._resolveInitAttributes():this.initAttributes}let n=Ct.get(this);if(n!=null)return n;let i=Object.getPrototypeOf(this),o=typeof i?._resolveInitAttributes==="function"?i._resolveInitAttributes():void 0;if(o==null||o===t)return t;let s={...o,...t};return Ct.set(this,s),s}static computed(e=""){return{[eo]:!0,shape:e}}static _describedAttributes(){let e=this._resolveInitAttributes(),t=Ie(this)?.attributes;if(e==null)return t;let n={};for(let[i,o]of Object.entries(e)){let s=wi(o)?o.shape:o;n[i]={type:typeof s,default:s}}return t!=null?{...n,...t}:n}static get observedAttributes(){let e=this._resolveInitAttributes();if(e)return["hidden",...Object.keys(e).map(X)];return["hidden"]}instanceId;styleNode;static styleSpec;static styleNode;content=C.slot();isSlotted;static _tagName=null;static get tagName(){return this._tagName}_legacyTrackedAttrs;_attrValues;_valueChanged=!1;_pendingAttrOps;static StyleNode(e){return console.warn("StyleNode is deprecated, use static shadowStyleSpec instead"),C.style(lt(e))}static elementCreator(e={}){let t=this;if(!Object.prototype.hasOwnProperty.call(t,"_elementCreator")){if(e.tag!==void 0)re("elementCreator-tag","Passing tag to elementCreator() is deprecated. Use static preferredTagName instead.");if(e.styleSpec!==void 0)re("elementCreator-styleSpec","Passing styleSpec to elementCreator() is deprecated. Use static lightStyleSpec instead.");if(e.extends!==void 0)re("elementCreator-extends","Passing extends to elementCreator() is deprecated. Use static extends instead.");let n=e.tag??t.preferredTagName;if(n==null)if(typeof t.name==="string"&&t.name!==""){if(n=X(t.name),n.startsWith("-"))n=n.slice(1)}else n=en();if(customElements.get(n)!=null)console.warn(`${n} is already defined`);if(n.match(/\w+(-\w+)+/)==null)console.warn(`${n} is not a legal tag for a custom-element`),n=en();while(customElements.get(n)!==void 0)n=en();t._tagName=n;let i=e.styleSpec??t.lightStyleSpec;if(i!==void 0)Kr(n,i);let o=e.extends??t.extends,s=o?{extends:o}:void 0,r=this.prototype;if(r!=null&&!Object.prototype.hasOwnProperty.call(r,Ei)){let l=r.connectedCallback;r.connectedCallback=function(){if(this._drainPendingAttrOps(),l)l.call(this)},Object.defineProperty(r,Ei,{value:!0,enumerable:!1})}window.customElements.define(n,this,s),t._elementCreator=C[n]}return t._elementCreator}initAttributes(...e){if(re("initAttributes","initAttributes() is deprecated. Use static initAttributes = { ... } instead."),!this._legacyTrackedAttrs)this._legacyTrackedAttrs=new Set;for(let i of e)this._legacyTrackedAttrs.add(i);Wr().observe(this,{attributes:!0});let t={},n={};e.forEach((i)=>{t[i]=se(w(this)[i]);let o=X(i);Object.defineProperty(this,i,{enumerable:!1,get(){if(typeof t[i]==="boolean")return this.hasAttribute(o);else if(this.hasAttribute(o))return typeof t[i]==="number"?parseFloat(this.getAttribute(o)):this.getAttribute(o);else if(n[i]!==void 0)return n[i];else return t[i]},set(s){if(typeof t[i]==="boolean"){if(s!==this[i]){if(s)this.setAttribute(o,"");else this.removeAttribute(o);this.queueRender()}}else if(typeof t[i]==="number"){if(s!==parseFloat(this[i]))this.setAttribute(o,s),this.queueRender()}else if(typeof s==="object"||`${s}`!==`${this[i]}`){if(s===null||s===void 0||typeof s==="object")this.removeAttribute(o);else this.setAttribute(o,s);this.queueRender(),n[i]=s}}})})}initValue(){let e=Object.getOwnPropertyDescriptor(this,"value");if(e!==void 0&&(e.get!==void 0||e.set!==void 0))return;if(e===void 0){let n=this.constructor;if(Ie(n)?.value==null)return;let i;for(let o=Object.getPrototypeOf(this);o!=null&&i===void 0;o=Object.getPrototypeOf(o))i=Object.getOwnPropertyDescriptor(o,"value");if(i?.get!==void 0||i?.set!==void 0){let o=this.tagName?.toLowerCase();if(!bi.has(o))bi.add(o),console.error(`<${o}> declares contract.value, but implements \`value\` as its own getter/setter, so tosijs cannot enforce the contract `+"there — and describe() still publishes it. Call "+"exerciseComponent in your tests, check the value in your own setter, or drop contract.value so the map stops advertising a rule nothing checks.");return}this.value=this.hasAttribute("value")?this.getAttribute("value"):void 0}let t=this.hasAttribute("value")?this.getAttribute("value"):se(w(this).value);delete w(this).value,Object.defineProperty(this,"value",{enumerable:!1,get(){return t},set(n){if(t!==n)Ur(this,n),t=n,this._valueChanged=!0,this.queueRender(!0)}})}_parts;_partsCache=Object.create(null);get parts(){let e=this;if(this._parts==null)this._parts=new Proxy({},{get(t,n){if(typeof n!=="string")return;let i=e._partsCache,o=i[n]??null,s=o;if(s!=null&&!s.isConnected)s=null;if(s==null){let r=e.shadowRoot!=null?e.shadowRoot:e;if(s=r.querySelector(`[part="${n}"]`),s==null)s=r.querySelector(n);if(s==null&&o!=null)return o;if(s==null)throw Error(`elementRef "${n}" does not exist!`);i[n]=s}return s}});return this._parts}attributeChangedCallback(e,t,n){let i=Ui(e);if(n===null&&this._attrValues?.has(i))this._attrValues.delete(i);let o=this._computedAttrShapes?.get(i);if(o!==void 0&&!this._applyingComputedAttr?.has(i)){this._applyingComputedAttr??=new Set,this._applyingComputedAttr.add(i);try{this[i]=o==="boolean"?n!==null:n??""}finally{this._applyingComputedAttr.delete(i)}return}if(!this._legacyTrackedAttrs?.has(i))this.queueRender(!1)}_applyingComputedAttr;constructor(){super();if(Ci+=1,this._installAttributeQueue(),this.constructor.formAssociated&&typeof this.attachInternals==="function"&&!this.internals)this.internals=this.attachInternals();let e=this.constructor._resolveInitAttributes();if(e)this._setupAttributeAccessors(e);this.instanceId=`${this.tagName.toLocaleLowerCase()}-${Ci}`,w(this)._value=se(w(this).defaultValue),this._warnOnHandlerCollisions()}_warnOnHandlerCollisions(){let e=this.constructor;if(Ai.has(e))return;Ai.add(e),queueMicrotask(()=>{let t=new Set;for(let r of Object.keys(this))if(/^on[A-Z]/.test(r))t.add(r);let n=Object.getPrototypeOf(this);while(n&&n!==E.prototype){for(let r of Object.getOwnPropertyNames(n))if(/^on[A-Z]/.test(r))t.add(r);n=Object.getPrototypeOf(n)}let i=this.tagName.toLowerCase();if(t.delete("onResize")&&w(this).handleResize===void 0)console.warn(`<${i}> defines 'onResize', which is deprecated. Rename it to 'handleResize'. The on<Event> prefix is reserved for event-handler sugar in the elements factory (creator({ onResize }) would attach a 'resize' listener) and is being retired for component callbacks in favor of the handle<Event> convention.`);if(t.size===0)return;let o=Array.from(t,(r)=>`'${r}'`).join(", "),s=Array.from(t)[0];if(Ee.quiet===!0)return;console.warn(`<${i}> defines ${o} — on<Event>-shaped member name(s), which `+`collide with the elements factory's event-handler sugar. Since 1.8.0, IF the member holds a function when the creator runs, it wins: creator({ ${s}: fn }) assigns it rather than attaching a '${s.slice(2).toLowerCase()}' listener `+"(tosijs#22) — and then that name can no longer carry event sugar. "+"A member declared but left undefined/null still gets event sugar, so the meaning depends on initialisation: give it a function default, or rename to handle<Event> for a component callback / add<Event>Listener for something that registers a listener.")})}_installAttributeQueue(){let e=this.constructor._resolveInitAttributes();if(!e)return;let t=new Set(Object.keys(e).map(X)),n=[];this._pendingAttrOps=n;let i=HTMLElement.prototype;this.setAttribute=(o,s)=>{if(t.has(o))n.push(["set",o,String(s)]);else i.setAttribute.call(this,o,s)},this.removeAttribute=(o)=>{if(t.has(o))n.push(["remove",o]);else i.removeAttribute.call(this,o)},queueMicrotask(()=>this._drainPendingAttrOps())}_drainPendingAttrOps(){let e=this._pendingAttrOps;if(e===void 0)return;this._pendingAttrOps=void 0,delete this.setAttribute,delete this.removeAttribute;let t=new Set;for(let n of e)if(this.hasAttribute(n[1]))t.add(n[1]);for(let n of e)if(n[0]==="set"){if(!t.has(n[1]))this.setAttribute(n[1],n[2])}else t.delete(n[1]),this.removeAttribute(n[1])}_installedAttrAccessors;_attrTypedOverride;_installComputedAttribute(e,t){let n=Object.getPrototypeOf(this),i;while(n!=null&&n!==E.prototype&&i===void 0)if(i=Object.getOwnPropertyDescriptor(n,e),i===void 0)n=Object.getPrototypeOf(n);if(i?.get==null)throw Error(`${this.tagName}: initAttributes.${e} is Component.computed(), `+"which declares that this class implements the attribute itself — "+`but no \`get ${e}()\` was found on the class. Define get/set for it, or give the attribute an ordinary default value instead. (If "${e}" is a native DOM property — title, `+"id, hidden, lang, slot, tabIndex … — it cannot be a computed "+"attribute: tosijs will not shadow the platform's accessor, because doing so corrupts it for every element on the page.)");if(this._computedAttrShapes??=new Map,this._computedAttrShapes.set(e,typeof t==="boolean"?"boolean":"string"),i.set==null||n==null)return;if(xi.has(i.set))return;let{get:o,set:s}=i,r=function(l){let a;try{a=o.call(this)}catch{a=void 0}s.call(this,l);let c;try{c=o.call(this)}catch{c=void 0}if(c!==a)this.queueRender()};xi.add(r),Object.defineProperty(n,e,{configurable:!0,enumerable:i.enumerable,get:i.get,set:r})}_computedAttrShapes;_setupAttributeAccessors(e){if(!this._attrValues)this._attrValues=new Map;if(!this._installedAttrAccessors)this._installedAttrAccessors=new Set;for(let t of Object.keys(e)){let n=X(t),i=e[t];if(t==="value"){console.warn(`${this.tagName}: 'value' cannot be an attribute. Use the Component value property instead.`);continue}if(wi(i)){this._installComputedAttribute(t,i.shape);continue}if(typeof i==="object"&&i!==null){console.warn(`${this.tagName}: initAttributes.${t} is an object. Use a regular property instead.`);continue}if(i===!0)throw Error(`${this.tagName}: static initAttributes.${t} defaults a boolean attribute to true, but HTML boolean attributes are false-by-default (presence = true, absence = false) and `+`cannot reflect a true default — it would silently become false. Use { ${t}: false }, or model it as a string/number attribute or a plain (non-attribute) property.`);let o=this,s=!1;while(o){let r=Object.getOwnPropertyDescriptor(o,t);if(r){if(!r.configurable||r.get||r.set){s=!0;break}break}o=Object.getPrototypeOf(o)}if(s)continue;this._installAttrAccessor(t,n,i)}}_installAttrAccessor(e,t,n){Object.defineProperty(this,e,{enumerable:!1,configurable:!0,get:()=>{let i=()=>{let o=this._attrTypedOverride?.get(e);return o!==void 0&&o.reflected===this.getAttribute(t)?{value:o.value}:void 0};if(typeof n==="boolean"){if(this.hasAttribute(t))return i()?.value??!0;if(this._attrValues.has(e))return this._attrValues.get(e);return!1}else if(this.hasAttribute(t)){if(typeof n==="number")return i()?.value??parseFloat(this.getAttribute(t));let o=this._attrTypedOverride?.get(e);if(o!==void 0&&o.reflected===this.getAttribute(t))return o.value;return this.getAttribute(t)}else if(this._attrValues.has(e))return this._attrValues.get(e);else return n},set:(i)=>{if(i!=null&&typeof i!==typeof n&&typeof i!=="object")this._attrTypedOverride??=new Map,this._attrTypedOverride.set(e,{reflected:typeof n==="boolean"&&i?"":String(i),value:i});else this._attrTypedOverride?.delete(e);if(i!=null&&typeof i!==typeof n&&typeof n!=="object"){let o=`${this.tagName.toLowerCase()}.${e}`;if(!Si.has(o))Si.add(o),console.error(`<${this.tagName.toLowerCase()}>: ${e} is declared ${typeof n} (default ${JSON.stringify(n)}), but was written ${typeof i} ${JSON.stringify(i)}. `+"The value is applied as given — nothing is coerced — but this "+"is usually a call site left behind by a type change. (tosijs#24)")}if(typeof n==="boolean"){if(i!==w(this)[e]){if(i)this.setAttribute(t,"");else this.removeAttribute(t);this.queueRender(),this._attrValues.set(e,!!i)}}else if(typeof n==="number"){if(i!==parseFloat(w(this)[e]))this.setAttribute(t,i),this.queueRender(),this._attrValues.set(e,i)}else if(typeof i==="object"||`${i}`!==`${w(this)[e]}`){if(i===null||i===void 0||typeof i==="object")this.removeAttribute(t);else this.setAttribute(t,i);this.queueRender(),this._attrValues.set(e,i)}}}),this._installedAttrAccessors.add(e)}_recoverShadowedAttrAccessors(){let e=this._installedAttrAccessors,t=this.constructor._resolveInitAttributes();if(e==null||t==null)return;let n=[];for(let i of e){let o=Object.getOwnPropertyDescriptor(this,i);if(o==null||o.get!=null||o.set!=null)continue;let s=o.value;delete this[i],this._installAttrAccessor(i,X(i),t[i]),this[i]=s,n.push(i)}if(n.length>0&&!Mi.has(this.tagName)){Mi.add(this.tagName);let i=n.map((o)=>`'${o}'`).join(", ");console.warn(`<${this.tagName.toLowerCase()}> declares instance field(s) ${i} that shadow static initAttributes accessors (class fields use [[Define]] semantics). The field value was adopted and the `+"reactive accessor restored — delete the field declaration; "+"static initAttributes already defines the property.")}}connectedCallback(){if(this._recoverShadowedAttrAccessors(),this._drainPendingAttrOps(),Xr(this.constructor.tagName),this.hydrate(),this.role!=null)this.setAttribute("role",this.role);{let t=this.constructor,n=Ie(t),i=n?.description;if(typeof i==="string"&&i!==""&&!this.hasAttribute("aria-description")&&!this.hasAttribute("aria-describedby"))this.setAttribute("aria-description",i);let o=n?.role;if(typeof o==="string"&&o!==""&&!this.getAttribute("role"))this.setAttribute("role",o)}if(this.constructor.formAssociated&&!this.hasAttribute("tabindex"))this.setAttribute("tabindex","0");let e=w(this).handleResize??w(this).onResize;if(e!==void 0){if(fn.observe(this),w(this)._onResize==null)w(this)._onResize=e.bind(this);this.addEventListener("resize",w(this)._onResize)}if(w(this).value!=null&&this.getAttribute("value")!=null)w(this)._value=this.getAttribute("value");if(this.internals&&w(this).value!==void 0)this.internals.setFormValue(w(this).value),this.validateValue();this.queueRender()}disconnectedCallback(){fn.unobserve(this)}formResetCallback(){if(w(this).value!==void 0)w(this).value=w(this).defaultValue??""}formDisabledCallback(e){if(e)this.setAttribute("disabled","");else this.removeAttribute("disabled")}formStateRestoreCallback(e){if(w(this).value!==void 0&&typeof e==="string")w(this).value=e}_changeQueued=!1;_renderQueued=!1;queueRender(e=!1){if(!this._hydrated)return;if(!this._changeQueued)this._changeQueued=e;if(!this._renderQueued)this._renderQueued=!0,requestAnimationFrame(()=>{if(this._changeQueued){if(ji(this,"change",{bubbles:!0,composed:!0}),this.internals&&w(this).value!==void 0)this.internals.setFormValue(w(this).value)}this._changeQueued=!1,this._renderQueued=!1,this.render()})}_hydrated=!1;_whenHydrated;_resolveHydrated;get hydrated(){return this._hydrated}get whenHydrated(){if(this._hydrated)return Promise.resolve();if(this._whenHydrated==null)this._whenHydrated=new Promise((e)=>{this._resolveHydrated=e});return this._whenHydrated}hydrate(){if(!this._hydrated){this.initValue();let e=typeof this.content!=="function",t=typeof this.content==="function"?this.content(C):this.content;if(t!=null&&!Array.isArray(t)&&!(t instanceof Node)&&typeof t!=="string")t=[t];if(Array.isArray(t)){let s={},r=[];for(let l of t)Cn(l,this.tagName,(a)=>r.push(a),(a)=>Xi(s,a));t=r;for(let l of Object.keys(s))kn(this,l,s[l])}let n=this.constructor,i=n.shadowStyleSpec??n.styleSpec;if(n.styleSpec&&!n.shadowStyleSpec)re("static-styleSpec","static styleSpec is deprecated. Use static shadowStyleSpec instead.");let{styleNode:o}=n;if(i)o=n.styleNode=C.style(lt(i)),delete n.styleNode;if(this.styleNode)console.warn(this,"styleNode is deprecated, use static shadowStyleSpec instead"),o=this.styleNode;if(o){let s=this.attachShadow({mode:"open"});if(s.appendChild(o.cloneNode(!0)),ni(s,t,e),!ki.has(this.tagName)&&s.querySelector(rn)!=null)ki.add(this.tagName),console.warn(`<${this.tagName.toLowerCase()}> has data-binding sugar in its shadow-DOM content, where bindings do not operate. A shadow-DOM component is bound like an <input>: bind its VALUE from outside (bindings.value) and implement render() to reflect value into `+"the shadow DOM — setting value queues render() and emits change "+"automatically. on() event handlers are fine. Warned once per component class.")}else if(t!==null){let s=Array.from(this.childNodes);if(!e)this._partsCache=Yr(t);ni(this,t,e),this.isSlotted=this.querySelector("slot,tosi-slot,xin-slot")!==null;let r=Array.from(this.querySelectorAll("slot"));if(r.length>0)r.forEach(Bt.replaceSlot);if(s.length>0){let l={"":this};Array.from(this.querySelectorAll("tosi-slot,xin-slot")).forEach((a)=>{l[a.name]=a}),s.forEach((a)=>{let c=l[""],d=a instanceof Element?l[a.slot]:c;(d!==void 0?d:c).append(a)})}}this._hydrated=!0,this._parts=void 0,this._resolveHydrated?.()}}render(){if(this._valueChanged&&this.internals&&w(this).value!==void 0)this.internals.setFormValue(w(this).value),this.validateValue();this._valueChanged=!1}validateValue(){if(!this.internals||w(this).value===void 0)return;let e=typeof w(this).value==="string"?w(this).value:String(w(this).value);Rr(this,e)}}class Bt extends E{static preferredTagName="tosi-slot";static initAttributes={name:""};content=null;static replaceSlot(e){let t=document.createElement("tosi-slot");if(e.name!=="")t.setAttribute("name",e.name);while(e.firstChild!=null)t.appendChild(e.firstChild);e.replaceWith(t)}}var ra=Bt.elementCreator();class to extends Bt{static preferredTagName="xin-slot";connectedCallback(){super.connectedCallback(),re("xin-slot","<xin-slot> is deprecated and will be REMOVED IN 2.0 — rename it to "+"<tosi-slot> (same attributes, same composition). It is registered only so your content keeps landing in the right place until you do.")}}to.elementCreator();var Jr="1.10.1";function $t(e){return Object.assign(oe,e),oe}function no(e){return re("boxedProxy","boxedProxy is deprecated, please use tosi() instead"),$t(e)}var la=new FinalizationRegistry((e)=>{e()});function Zr(e,t=!1){if(t)return re("xinProxy-boxed","xinProxy(..., true) is deprecated; use tosi(...) instead"),no(e);return Object.keys(e).forEach((n)=>{Se[n]=e[n]}),Se}var Qr={};async function io(e,t){let n=await t(e,{Color:g,Component:E,withAttributes:Gr,elements:C,svgElements:An,mathML:kr,varDefault:y,vars:T,xin:Se,boxed:oe,xinProxy:Zr,boxedProxy:no,tosi:$t,makeComponent:io,bind:pe,on:wn,version:Jr}),{type:i}=n;if(i.preferredTagName=e,n.contract!=null&&Ie(i)===void 0)i.contract=n.contract;let o=n.lightStyleSpec??n.styleSpec;if(o)i.lightStyleSpec=o;let s={type:i,creator:i.elementCreator()};return Qr[e]=s,s}var Ln={":host":{display:"none"}},kt={},el=(e)=>import(e),tl=["javascript","data","vbscript"];function nl(e){let t=e.replace(/[\u0000-\u0020]/g,""),n=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return n?n[1].toLowerCase():""}function il(e,t){let n=nl(e);if(tl.includes(n))return`${n}: is never an honest blueprint module`;let i=Ee.blueprintSrcCheck;if(typeof i==="function"&&i(e,t)===!1)return"settings.blueprintSrcCheck returned false";return null}async function ol(e,t,n){let i=Array.from(e.querySelectorAll(t)).filter((s)=>s.src),o=await Promise.allSettled(i.map((s)=>s.packaged()));for(let s=0;s<o.length;s++){let r=o[s];if(r.status==="rejected")console.error(`<${n}> failed to load blueprint from "${i[s].src}":`,r.reason)}}class oo extends E{static preferredTagName="tosi-blueprint";static lightStyleSpec=Ln;static initAttributes={tag:"anon-elt",src:"",property:"default"};loaded;blueprintLoaded=(e)=>{};async packaged(){let{tag:e,src:t,property:n}=this,i=`${e}.${n}:${t}`;if(!this.loaded){let o=il(t,this);if(o!==null){let s=`<tosi-blueprint> refused "${t}" — ${o}. These tags EXECUTE the module they name: strip them from user-supplied HTML, or set settings.blueprintSrcCheck to allow this source.`;throw console.error(s),Error(s)}if(kt[i]===void 0)kt[i]=el(t).then((s)=>{let r=s[n];return io(e,r)});else if(Ee.debug)console.log(`using cached ${e} with signature ${i}`);try{this.loaded=await kt[i]}catch(s){throw delete kt[i],s}this.blueprintLoaded(this.loaded)}return this.loaded}}var aa=oo.elementCreator();class so extends E{static preferredTagName="tosi-loader";static lightStyleSpec=Ln;allLoaded=()=>{};async load(){await ol(this,"tosi-blueprint","tosi-loader"),this.allLoaded()}connectedCallback(){super.connectedCallback(),this.load()}}var ca=so.elementCreator();class Tn extends E{static lightStyleSpec=Ln;content=null;connectedCallback(){super.connectedCallback();let e=this.tagName.toLowerCase(),t=e.replace("xin-","tosi-");re(e,`<${e}> was removed in tosijs 1.8.0 and does NOTHING — this element `+`will not hydrate. Rename it to <${t}> (same attributes, same behaviour). Deprecated since 1.7; the tag is registered only so this message can exist, and goes away in 2.0.`)}}class ro extends Tn{static preferredTagName="xin-blueprint"}ro.elementCreator();class lo extends Tn{static preferredTagName="xin-loader"}lo.elementCreator();var sl=["input","textarea","select"],rl=["cc-","current-password","new-password","one-time-code"],ll=["password","hidden"],da=["[data-tosi-secret]",...ll.map((e)=>`input[type="${e}"]`),...sl.flatMap((e)=>rl.map((t)=>`${e}[autocomplete^="${t}"]`))].join(",");var ye={blueprint:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,7.5,15.5,7.5,17.5 C7.5,19.5,10.5,19.5,10.5,19.5"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,14.5 C18.5,14.5,21.5,15.5,21.5,17.5 C21.5,19.5,18.5,19.5,18.5,19.5"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M7,5.09 C7,3.94,7.9,3,9,3 C9,3,20,3,20,3 C21.1,3,22,3.94,22,5.09 C22,5.09,22,12.41,22,12.41 C22,13.56,21.1,14.5,20,14.5 C20,14.5,9,14.5,9,14.5 C7.9,14.5,7,13.56,7,12.41 C7,12.41,7,5.09,7,5.09 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14.5,5.5 C14.5,5.5,14.5,11.5,14.5,11.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16.5,7.5 C16.5,7.5,16.5,8.5,16.5,8.5"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,7.5 C12.5,7.5,12.5,8.5,12.5,8.5"/><g/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M18.5,21.5 C18.5,21.5,17.5,20.5,17.5,20.5 C17.5,20.5,16.5,21.5,16.5,21.5"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.5,21.5 C12.5,21.5,11.5,20.5,11.5,20.5 C11.5,20.5,10.5,21.5,10.5,21.5"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10.5,14.5 C10.5,14.5,18.5,14.5,18.5,14.5 C18.5,14.5,18.5,19.5,18.5,19.5 C18.5,19.5,10.5,19.5,10.5,19.5 C10.5,19.5,10.5,14.5,10.5,14.5 z"/><g><g><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,16.5 C14,16.5,16,16.5,16,16.5 C16,16.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:evenodd;stroke:none;" d="M3.59,8.5 C3.59,8.5,12.59,8.5,12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5 C14.53,19.5,5.53,19.5,5.53,19.5 C5.53,19.5,3.59,8.5,3.59,8.5 z"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,11.12,11.5,11.12,11.5 C11.12,11.5,2.12,11.5,2.12,11.5 C2.12,11.5,3.59,8.5,3.59,8.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12.59,8.5 C12.59,8.5,14.53,19.5,14.53,19.5"/><path style="fill:#5e78ca;fill-rule:nonzero;stroke:#f2f2f2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.12,11.5 C4.12,11.5,5.53,19.5,5.53,19.5"/></g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M9.24,12.5 C10.75,12.5,12.2,13.73,12.46,15.24 C12.46,15.24,12.46,15.24,12.46,15.24 C12.68,16.49,11.85,17.5,10.6,17.5 C10.6,17.5,10.55,17.5,10.55,17.5 C10.17,17.5,9.92,17.81,9.98,18.19 C9.98,18.19,9.98,18.19,9.98,18.19 C10.21,19.47,9.36,20.5,8.08,20.5 C8.08,20.5,6.39,20.5,6.39,20.5 C5.1,20.5,3.87,19.45,3.64,18.16 C3.64,18.16,3.12,15.21,3.12,15.21 C2.86,13.71,3.86,12.5,5.35,12.5 C5.35,12.5,9.24,12.5,9.24,12.5 z"/></g></g></svg> ',earth:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,13.46 C5.1,16.52,4,20.13,4,24 C4,31.81,8.47,38.57,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 z"/><path style="fill:#a3d9ff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C20.18,4.28,22.06,4,24,4 C27.57,4,30.92,4.93,33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C33.81,42.07,29.13,44,24,44 C21.03,44,18.22,43.35,15.69,42.2 C15.69,42.2,27,29,27,29 C27,29,27,25,27,25 C27,25,21,23,21,23 C21,23,15,19,15,19 C15,19,11,19,11,19 C11,19,11,13,11,13 C11,13,13,11,13,11 C13,11,15,15,15,15 C15,15,17,15,17,15 C17,15,17,9,17,9 C17,9,18.4,4.79,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M18.4,4.79 C18.4,4.79,17,9,17,9 C17,9,17,15,17,15 C17,15,15,15,15,15 C15,15,13,11,13,11 C13,11,11,13,11,13 C11,13,11,19,11,19 C11,19,15,19,15,19 C15,19,21,23,21,23 C21,23,27,25,27,25 C27,25,27,29,27,29 C27,29,15.69,42.2,15.69,42.2 C15.46,42.09,15.23,41.98,15,41.87 C15,41.87,15,31,15,31 C15,31,9,29,9,29 C9,29,9,19,9,19 C9,19,7,15,7,15 C7,15,7,13.46,7,13.46 C9.57,9.32,13.62,6.19,18.4,4.79 z"/><path style="fill:#274e42;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M33.82,6.57 C33.82,6.57,29,13,29,13 C29,13,31,19,31,19 C31,19,37,21,37,21 C37,21,39,29,39,29 C39,29,37.35,38.89,37.35,38.89 C41.43,35.23,44,29.91,44,24 C44,16.52,39.9,10,33.82,6.57 z"/></g></g></g></svg> ',cmy:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#00ff00;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#000000;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#02fefe;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#fffe00;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#ff00ff;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',rgb:'<svg class="color filled" viewBox="0 0 24 24"><g><g><path style="fill:#ff00ff;fill-rule:evenodd;" d="M12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C6.37,11.85,7.87,13.42,9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 z"/><path style="fill:#ffff00;fill-rule:evenodd;" d="M12,10.88 C13.1,10.01,14.49,9.5,16,9.5 C16.78,9.5,17.53,9.64,18.22,9.89 C17.63,11.85,16.13,13.42,14.22,14.11 C13.83,12.81,13.04,11.69,12,10.88 C12,10.88,12,10.88,12,10.88 z"/><path style="fill:#ffffff;fill-rule:evenodd;" d="M9.78,14.11 C10.17,12.81,10.96,11.69,12,10.88 C13.04,11.69,13.83,12.81,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#00ffff;fill-rule:evenodd;" d="M9.78,14.11 C9.6,14.71,9.5,15.34,9.5,16 C9.5,18.08,10.48,19.93,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C13.53,14.36,12.78,14.5,12,14.5 C11.22,14.5,10.47,14.36,9.78,14.11 C9.78,14.11,9.78,14.11,9.78,14.11 z"/><path style="fill:#ff0000;fill-rule:evenodd;" d="M5.78,9.89 C5.6,9.29,5.5,8.66,5.5,8 C5.5,4.41,8.41,1.5,12,1.5 C15.59,1.5,18.5,4.41,18.5,8 C18.5,8.66,18.4,9.29,18.22,9.89 C17.53,9.64,16.78,9.5,16,9.5 C14.49,9.5,13.1,10.01,12,10.88 C10.9,10.01,9.51,9.5,8,9.5 C7.22,9.5,6.47,9.64,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#0000ff;fill-rule:evenodd;" d="M5.78,9.89 C3.28,10.8,1.5,13.19,1.5,16 C1.5,19.59,4.41,22.5,8,22.5 C9.51,22.5,10.9,21.99,12,21.12 C10.48,19.93,9.5,18.08,9.5,16 C9.5,15.34,9.6,14.71,9.78,14.11 C7.87,13.42,6.37,11.85,5.78,9.89 C5.78,9.89,5.78,9.89,5.78,9.89 z"/><path style="fill:#00ff00;fill-rule:evenodd;" d="M18.22,9.89 C20.72,10.8,22.5,13.19,22.5,16 C22.5,19.59,19.59,22.5,16,22.5 C14.49,22.5,13.1,21.99,12,21.12 C13.52,19.93,14.5,18.08,14.5,16 C14.5,15.34,14.4,14.71,14.22,14.11 C16.13,13.42,17.63,11.85,18.22,9.89 z"/></g></g></svg> ',xrColor:'<svg class="color filled" viewBox="0 0 40 24"><g><g><g><path style="fill:#000000;fill-rule:evenodd;" d="M20,2 C19.99,2,19.98,2,19.98,2 C8.39,2,2,3.61,2,12 C2,18.41,5.32,22,10.54,22 C15.77,22,17.37,17.85,19.98,17.85 C19.98,17.85,19.99,17.85,20,17.85 C20.01,17.85,20.02,17.85,20.02,17.85 C22.63,17.85,24.23,22,29.46,22 C34.68,22,38,18.41,38,12 C38,3.61,31.61,2,20.02,2 C20.02,2,20.01,2,20,2 C20,2,20,2,20,2 z"/></g><path style="fill:#fbed21;fill-rule:evenodd;" d="M12.2,19.84 C15.79,19.39,17.07,16.46,19.07,16.46 C19.07,16.46,19.08,16.46,19.09,16.46 C19.09,16.46,19.1,16.46,19.11,16.46 C19.44,16.46,19.75,16.54,20.06,16.68 C20.37,16.54,20.68,16.46,21.01,16.46 C21.02,16.46,21.02,16.46,21.03,16.46 C21.04,16.46,21.04,16.46,21.05,16.46 C23.05,16.46,24.33,19.39,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M12.2,19.84 C12.52,19.87,12.86,19.89,13.21,19.89 C16.86,19.89,18.37,17.43,20.06,16.68 C19.75,16.54,19.44,16.46,19.11,16.46 C19.1,16.46,19.09,16.46,19.09,16.46 C19.08,16.46,19.07,16.46,19.07,16.46 C17.07,16.46,15.79,19.39,12.2,19.84 z"/><path style="fill:#8cc63f;fill-rule:evenodd;" d="M20.06,3.35 C20.37,3.35,20.69,3.35,21.01,3.35 C21.02,3.35,21.02,3.35,21.03,3.35 C21.03,3.35,21.03,3.35,21.03,3.35 C21.04,3.35,21.04,3.35,21.05,3.35 C30.64,3.35,35.92,4.68,35.92,11.62 C35.92,16.92,33.18,19.89,28.86,19.89 C28.53,19.89,28.22,19.87,27.92,19.84 C31.66,19.4,33.98,16.5,33.98,11.62 C33.98,4.91,29.04,3.44,20.06,3.35 C20.06,3.35,20.06,3.35,20.06,3.35 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M20.06,16.68 C21.74,17.43,23.25,19.89,26.91,19.89 C27.26,19.89,27.59,19.87,27.92,19.84 C24.33,19.39,23.05,16.46,21.05,16.46 C21.04,16.46,21.04,16.46,21.03,16.46 C21.02,16.46,21.02,16.46,21.01,16.46 C20.68,16.46,20.37,16.54,20.06,16.68 z"/><path style="fill:#ff1c23;fill-rule:evenodd;" d="M12.2,19.84 C11.9,19.87,11.59,19.89,11.26,19.89 C6.94,19.89,4.19,16.92,4.19,11.62 C4.19,4.68,9.48,3.35,19.07,3.35 C19.07,3.35,19.08,3.35,19.09,3.35 C19.09,3.35,19.09,3.35,19.09,3.35 C19.09,3.35,19.1,3.35,19.11,3.35 C19.43,3.35,19.75,3.35,20.06,3.35 C11.07,3.44,6.14,4.91,6.14,11.62 C6.14,16.5,8.46,19.4,12.2,19.84 z"/></g><g><path style="fill:#8cc63e;fill-rule:nonzero;" d="M22.55,8.63 C22.55,9.05,22.55,9.46,22.55,9.88 C22.54,10.25,22.85,10.56,23.2,10.55 C23.54,10.56,23.85,10.25,23.85,9.88 C23.85,9.46,23.85,9.05,23.85,8.63 C23.85,8.26,23.54,7.95,23.2,7.96 C22.85,7.95,22.54,8.26,22.55,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M17.32,8.63 C17.32,9.05,17.32,9.46,17.32,9.88 C17.31,10.25,17.62,10.56,17.97,10.55 C18.31,10.56,18.62,10.25,18.62,9.88 C18.62,9.46,18.62,9.05,18.62,8.63 C18.62,8.26,18.31,7.95,17.97,7.96 C17.62,7.95,17.31,8.26,17.32,8.63 z"/><path style="fill:#8cc63e;fill-rule:nonzero;" d="M19.99,4.39 C19.99,8.09,19.99,11.8,19.99,15.5 C19.99,15.87,20.3,16.18,20.64,16.17 C20.99,16.18,21.3,15.87,21.29,15.5 C21.29,11.8,21.29,8.09,21.29,4.39 C21.3,4.02,20.99,3.71,20.64,3.72 C20.3,3.71,19.99,4.02,19.99,4.39 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M21.43,8.63 C21.43,9.05,21.43,9.46,21.43,9.88 C21.42,10.25,21.73,10.56,22.08,10.55 C22.42,10.56,22.73,10.25,22.73,9.88 C22.73,9.46,22.73,9.05,22.73,8.63 C22.73,8.26,22.42,7.95,22.08,7.96 C21.73,7.95,21.42,8.26,21.43,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M16.2,8.63 C16.2,9.05,16.2,9.46,16.2,9.88 C16.19,10.25,16.5,10.56,16.85,10.55 C17.19,10.56,17.5,10.25,17.5,9.88 C17.5,9.46,17.5,9.05,17.5,8.63 C17.5,8.26,17.19,7.95,16.85,7.96 C16.5,7.95,16.19,8.26,16.2,8.63 z"/><path style="fill:#fe1a22;fill-rule:nonzero;" d="M18.87,4.39 C18.87,8.09,18.87,11.8,18.87,15.5 C18.87,15.87,19.18,16.18,19.52,16.17 C19.86,16.18,20.18,15.87,20.17,15.5 C20.17,11.8,20.17,8.09,20.17,4.39 C20.18,4.02,19.86,3.71,19.52,3.72 C19.18,3.71,18.87,4.02,18.87,4.39 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M21.97,8.63 C21.97,9.05,21.97,9.46,21.97,9.88 C21.97,10.25,22.28,10.56,22.62,10.55 C22.97,10.56,23.28,10.25,23.27,9.88 C23.27,9.46,23.27,9.05,23.27,8.63 C23.28,8.26,22.97,7.95,22.62,7.96 C22.28,7.95,21.97,8.26,21.97,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M16.74,8.63 C16.74,9.05,16.74,9.46,16.74,9.88 C16.74,10.25,17.05,10.56,17.39,10.55 C17.74,10.56,18.05,10.25,18.04,9.88 C18.04,9.46,18.04,9.05,18.04,8.63 C18.05,8.26,17.74,7.95,17.39,7.96 C17.05,7.95,16.74,8.26,16.74,8.63 z"/><path style="fill:#000000;fill-rule:nonzero;" d="M19.41,4.39 C19.41,8.09,19.41,11.8,19.41,15.5 C19.41,15.87,19.72,16.18,20.07,16.17 C20.41,16.18,20.72,15.87,20.72,15.5 C20.72,11.8,20.72,8.09,20.72,4.39 C20.72,4.02,20.41,3.71,20.07,3.72 C19.72,3.71,19.41,4.02,19.41,4.39 z"/></g></g></svg> ',tosiFavicon:'<svg class="color" viewBox="0 0 48 48"><g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M1,9 C1,4.58,4.58,1,9,1 C9,1,39,1,39,1 C43.42,1,47,4.58,47,9 C47,9,47,39,47,39 C47,43.42,43.42,47,39,47 C39,47,9,47,9,47 C4.58,47,1,43.42,1,39 C1,39,1,9,1,9 z"/><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,10,31,10,35 C10,39,16,39,16,39"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,29 C32,29,38,31,38,35 C38,39,32,39,32,39"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,10.18 C9,7.87,10.79,6,13,6 C13,6,35,6,35,6 C37.21,6,39,7.87,39,10.18 C39,10.18,39,24.82,39,24.82 C39,27.13,37.21,29,35,29 C35,29,13,29,13,29 C10.79,29,9,27.13,9,24.82 C9,24.82,9,10.18,9,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32,43 C32,43,30,41,30,41 C30,41,28,43,28,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,43 C20,43,18,41,18,41 C18,41,16,43,16,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16,29 C16,29,32,29,32,29 C32,29,32,39,32,39 C32,39,16,39,16,39 C16,39,16,29,16,29 z"/></g></g></g></svg> ',tosiPlatform:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#3ea9f5;fill-rule:evenodd;stroke:none;" d="M23.97,47 C23.97,47,39,47,39,47 C43.42,47,47,43.42,47,39 C47,39,47,9,47,9 C47,4.58,43.42,1,39,1 C39,1,9,1,9,1 C4.58,1,1,4.58,1,9 C1,9,1,39,1,39 C1,41.64,2.28,43.98,4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:none;" d="M4.25,45.44 C4.09,44.82,4,44.17,4,43.5 C4,39.36,7.36,36,11.5,36 C15.14,36,18.18,38.6,18.86,42.05 C19.07,42.02,19.28,42,19.5,42 C21.99,42,24,44.01,24,46.5 C24,46.67,23.99,46.84,23.97,47 C23.97,47,9,47,9,47 C7.22,47,5.58,46.42,4.25,45.44 z"/></g><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M35,35 C35,35,32.17,35,32.17,35 C32.17,35,32.17,37.83,32.17,37.83"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,39 C31,39,28.17,39,28.17,39 C28.17,39,28.17,41.83,28.17,41.83"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7.48,16 C4.45,16,2,18.45,2,21.48 C2,21.48,2,21.48,2,21.48 C2,23.98,4.02,26,6.52,26 C6.52,26,6.62,26,6.62,26 C7.38,26,8,26.62,8,27.38 C8,27.38,8,27.38,8,27.38 C8,29.93,10.07,32,12.62,32 C12.62,32,16,32,16,32 C18.58,32,20.68,29.91,20.68,27.32 C20.68,27.32,20.68,21.42,20.68,21.42 C20.68,18.43,18.25,16,15.26,16 C15.26,16,7.48,16,7.48,16 z"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,29 C17,29,33,29,33,29 C33,29,33,29,33,29 C33,34.52,28.52,39,23,39 C23,39,23,39,23,39 C19.69,39,17,36.31,17,33 C17,33,17,29,17,29 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40.52,16 C43.55,16,46,18.45,46,21.48 C46,21.48,46,21.48,46,21.48 C46,23.98,43.98,26,41.48,26 C41.48,26,41.38,26,41.38,26 C40.62,26,40,26.62,40,27.38 C40,27.38,40,27.38,40,27.38 C40,29.93,37.93,32,35.38,32 C35.38,32,32,32,32,32 C29.42,32,27.32,29.91,27.32,27.32 C27.32,27.32,27.32,21.42,27.32,21.42 C27.32,18.43,29.75,16,32.74,16 C32.74,16,40.52,16,40.52,16 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M6,10.18 C6,7.87,7.79,6,10,6 C10,6,32,6,32,6 C34.21,6,36,7.87,36,10.18 C36,10.18,36,24.82,36,24.82 C36,27.13,34.21,29,32,29 C32,29,10,29,10,29 C7.79,29,6,27.13,6,24.82 C6,24.82,6,10.18,6,10.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M21,11 C21,11,21,23,21,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M25,15 C25,15,25,17,25,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,15 C17,15,17,17,17,17"/></g></g></g></svg> ',tosiUi:'<svg class="color" viewBox="0 0 48 48"><g><g><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M3,33 C3,31.9,3.9,31,5,31 C5,31,43,31,43,31 C44.1,31,45,31.9,45,33 C45,33,45,43,45,43 C45,44.1,44.1,45,43,45 C43,45,5,45,5,45 C3.9,45,3,44.1,3,43 C3,43,3,33,3,33 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M7,35 C7,35,7,36.34,7,38 C7,39.66,8.34,41,10,41 C11.66,41,13,39.66,13,38 C13,36.34,13,35,13,35"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#ed247b;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M17,35 C17,35,17,41,17,41"/></g><g><path style="fill:#ed247b;fill-rule:evenodd;stroke:none;" d="M38,33 C40.76,33,43,35.24,43,38 C43,40.76,40.76,43,38,43 C35.24,43,33,40.76,33,38 C33,35.24,35.24,33,38,33 z"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M40,36 C40,36,36,40,36,40"/><path style="fill:#ed247b;fill-rule:nonzero;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M36,36 C36,36,40,40,40,40"/></g></g><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21.01 C15.97,21.01,9.97,23.01,9.97,27.01 C9.97,31.01,15.97,31.01,15.97,31.01"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31.97,21.01 C31.97,21.01,37.97,23.01,37.97,27.01 C37.97,31.01,31.97,31.01,31.97,31.01"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M31,33 C31,33,29.49,31,29.49,31 C29.49,31,27.97,33,27.97,33"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M19.97,33 C19.97,33,17.97,31,17.97,31 C17.97,31,15.97,33,15.97,33"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M15.97,21 C15.97,21,31.97,21,31.97,21 C31.97,21,31.97,31,31.97,31 C31.97,31,15.97,31,15.97,31 C15.97,31,15.97,21,15.97,21 z"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9,7.18 C9,4.87,10.79,3,13,3 C13,3,35.02,3,35.02,3 C37.23,3,39.03,4.87,39.03,7.18 C39.03,7.18,39.03,21.82,39.03,21.82 C39.03,24.13,37.23,26,35.02,26 C35.02,26,13,26,13,26 C10.79,26,9,24.13,9,21.82 C9,21.82,9,7.18,9,7.18 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24,11 C24,11,24,23,24,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28,15 C28,15,28,17,28,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20,15 C20,15,20,17,20,17"/></g></g></g></svg> ',tosiXr:'<svg class="color" viewBox="0 0 24 24"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,5,15.25,5,17.25 C5,19.25,8,19.25,8,19.25"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,14.25 C16,14.25,19,15.25,19,17.25 C19,19.25,16,19.25,16,19.25"/><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M4.5,4.85 C4.5,3.69,5.4,2.75,6.5,2.75 C6.5,2.75,17.5,2.75,17.5,2.75 C18.61,2.75,19.5,3.69,19.5,4.85 C19.5,4.85,19.5,12.16,19.5,12.16 C19.5,13.32,18.61,14.25,17.5,14.25 C17.5,14.25,6.5,14.25,6.5,14.25 C5.4,14.25,4.5,13.32,4.5,12.16 C4.5,12.16,4.5,4.85,4.5,4.85 z"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M12,5.25 C12,5.25,12,11.25,12,11.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M14,7.25 C14,7.25,14,8.25,14,8.25"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,7.25 C10,7.25,10,8.25,10,8.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M16,21.25 C16,21.25,15,20.25,15,20.25 C15,20.25,14,21.25,14,21.25"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M10,21.25 C10,21.25,9,20.25,9,20.25 C9,20.25,8,21.25,8,21.25"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:1;" d="M8,14.25 C8,14.25,16,14.25,16,14.25 C16,14.25,16,19.25,16,19.25 C16,19.25,8,19.25,8,19.25 C8,19.25,8,14.25,8,14.25 z"/><path style="fill:#ff7bac;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-width:1;" d="M12,4 C12,4,11.99,4,11.99,4 C6.19,4,3,4.73,3,8.5 C3,11.39,4.66,13,7.27,13 C9.88,13,10.68,11.13,11.99,11.13 C11.99,11.13,12,11.13,12,11.13 C12,11.13,12.01,11.13,12.01,11.13 C13.32,11.13,14.12,13,16.73,13 C19.34,13,21,11.39,21,8.5 C21,4.73,17.81,4,12.01,4 C12.01,4,12,4,12,4 C12,4,12,4,12,4 z"/></g></svg> ',tosi:'<svg class="color" viewBox="0 0 48 48"><g><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M38.35,31.7 C39.78,34.37,38.78,37.69,36.11,39.13 C36.11,39.13,36.11,39.13,36.11,39.13 C33.92,40.31,31.18,39.48,29.99,37.29 C29.99,37.29,29.95,37.2,29.95,37.2 C29.58,36.53,28.75,36.27,28.08,36.64 C28.08,36.64,28.08,36.64,28.08,36.64 C25.83,37.84,23.03,37,21.82,34.76 C21.82,34.76,20.22,31.78,20.22,31.78 C18.99,29.5,19.85,26.67,22.12,25.44 C22.12,25.44,27.32,22.65,27.32,22.65 C29.96,21.23,33.24,22.22,34.66,24.85 C34.66,24.85,38.35,31.7,38.35,31.7 z"/><path style="fill:#9e9e9e;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M10.65,31.7 C9.22,34.37,10.22,37.69,12.89,39.13 C12.89,39.13,12.89,39.13,12.89,39.13 C15.08,40.31,17.82,39.48,19.01,37.29 C19.01,37.29,19.05,37.2,19.05,37.2 C19.42,36.53,20.25,36.27,20.92,36.64 C20.92,36.64,20.92,36.64,20.92,36.64 C23.17,37.84,25.97,37,27.18,34.76 C27.18,34.76,28.78,31.78,28.78,31.78 C30.01,29.5,29.15,26.67,26.88,25.44 C26.88,25.44,21.68,22.65,21.68,22.65 C19.04,21.23,15.76,22.22,14.34,24.85 C14.34,24.85,10.65,31.7,10.65,31.7 z"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M32.5,43 C32.5,43,30.5,41,30.5,41 C30.5,41,28.5,43,28.5,43"/><path style="fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,43 C20.5,43,18.5,41,18.5,41 C18.5,41,16.5,43,16.5,43"/><path style="fill:#e4e4e4;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M16.5,29 C16.5,29,32.5,29,32.5,29 C32.5,29,32.5,36,32.5,36 C32.5,37.66,31.16,39,29.5,39 C29.5,39,19.5,39,19.5,39 C17.84,39,16.5,37.66,16.5,36 C16.5,36,16.5,29,16.5,29 z"/><g><path style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M9.5,10.18 C9.5,7.87,11.29,6,13.5,6 C13.5,6,35.5,6,35.5,6 C37.71,6,39.5,7.87,39.5,10.18 C39.5,10.18,39.5,24.82,39.5,24.82 C39.5,27.13,37.71,29,35.5,29 C35.5,29,13.5,29,13.5,29 C11.29,29,9.5,27.13,9.5,24.82 C9.5,24.82,9.5,10.18,9.5,10.18 z"/><g><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M24.5,11 C24.5,11,24.5,23,24.5,23"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M28.5,15 C28.5,15,28.5,17,28.5,17"/><path style="fill:#ffffff;fill-rule:nonzero;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-width:2;" d="M20.5,15 C20.5,15,20.5,17,20.5,17"/></g></g></g></svg> ',discord:'<svg class="filled" version="1" viewBox="0 0 1013 768"><path d="M858 64c-60-28-131-51-204-64l-5-1c-8 14-17 32-25 51l-1 4c-35-6-75-9-116-9s-81 3-120 9l4-1c-9-22-18-40-28-57l1 3c-79 14-149 36-214 67l5-2c-132 196-168 387-150 575v0c73 55 158 99 250 127l6 2c19-26 38-55 53-85l2-3c-33-13-62-27-89-43l2 1c7-5 14-11 21-16 75 36 163 57 256 57s181-21 260-59l-4 2c7 6 14 11 21 16-25 15-53 29-83 40l-4 1c17 34 36 63 56 90l-1-2c98-30 183-74 259-130l-2 2c21-218-36-407-151-575zM338 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101zM675 524c-50 0-91-45-91-101s40-102 91-102 92 46 91 102-40 101-91 101z"></path></svg> ',facebook:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>',game:'<svg class="filled" version="1" viewBox="0 0 704 512"><path d="M528 97v-1h-336c-88 0-160 72-160 160s72 160 160 160c52 0 99-25 128-64h64c29 39 76 64 128 64 88 0 160-72 160-160 0-83-63-151-144-159zM288 288h-64v64h-64v-64h-64v-64h64v-64h64v64h64v64zM480 288c-18 0-32-14-32-32s14-32 32-32 32 14 32 32-14 32-32 32zM576 288c-18 0-32-14-32-32 0-18 14-32 32-32s32 14 32 32c0 18-14 32-32 32z"></path></svg> ',google:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M256 0c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zM260 448c-106 0-192-86-192-192s86-192 192-192c52 0 95 19 129 50l-52 50c-14-14-39-30-77-30-66 0-119 54-119 121s54 121 119 121c76 0 105-55 109-83h-109v-66h181c2 10 3 19 3 32 0 110-73 188-184 188z"></path></svg> ',npm:'<svg class="filled" version="1" viewBox="0 0 512 512"><path d="M0 0v512h512v-512h-512zM416 416h-64v-256h-96v256h-160v-320h320v320z"></path></svg> ',youtube:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>',blog:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10.02 C21,10.02,21,15,21,15 C21,15.53,20.79,16.04,20.41,16.41 C20.04,16.79,19.53,17,19,17 C19,17,7,17,7,17 C5.67,18.33,4.33,19.67,3,21 C3,21,3,5,3,5 C3,4.47,3.21,3.96,3.59,3.59 C3.96,3.21,4.47,3,5,3 C8.53,3,10.49,3,14.02,3"/><path style="" d="M19,2 C19.54,1.46,20.32,1.25,21.05,1.45 C21.78,1.65,22.35,2.22,22.55,2.95 C22.75,3.68,22.54,4.46,22,5 C22,5,15.5,11.5,15.5,11.5 C14.17,11.83,12.83,12.17,11.5,12.5 C11.83,11.17,12.17,9.83,12.5,8.5 C15.67,5.33,15.83,5.17,19,2 z"/><path style="" d="M14.6,3"/><path style="" d="M21,8.77"/><path style="" d="M7,7 C7,7,10,7,10,7"/><path style="" d="M7,10 C7,10,9,10,9,10"/></g></svg> ',bug:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M8,6 C8,3.79,9.79,2,12,2 C14.21,2,16,3.79,16,6 C16,6,8,6,8,6 z"/><path style="" d="M20,7 C20,7,18,9,18,9"/><path style="" d="M20,19 C20,19,18,17,18,17"/><path style="" d="M21,13 C21,13,18,13,18,13"/><path style="" d="M16.44,9 C17.3,9,18,9.7,18,10.56 C18,10.56,18,15,18,15 C18,18.31,15.31,21,12,21 C8.69,21,6,18.31,6,15 C6,15,6,10.56,6,10.56 C6,9.7,6.7,9,7.56,9 C7.56,9,16.44,9,16.44,9 z"/><path style="" d="M4,7 C4,7,6,9,6,9"/><path style="" d="M4,19 C4,19,6,17,6,17"/><path style="" d="M3,13 C3,13,6,13,6,13"/><path style="" d="M12,12 C12,12,12,17,12,17"/></g></svg> ',activity:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>',airplay:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>',alertCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',alertTriangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',alignCenter:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line></svg>',alignJustify:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line></svg>',alignLeft:'<svg class="stroked" viewBox="0 0 24 24"><line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line></svg>',alignRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line></svg>',anchor:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path></svg>',aperture:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg>',archive:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>',arrowUpRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg>',atSign:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path></svg>',award:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>',barChart2:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>',barChart:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line></svg>',batteryCharging:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline></svg>',battery:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line></svg>',bellOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',bell:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>',bluetooth:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline></svg>',bold:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path></svg>',bookOpen:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>',book:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>',bookmark:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg>',box:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',briefcase:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path></svg>',calendar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>',cameraOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path></svg>',camera:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>',cast:'<svg class="stroked" viewBox="0 0 24 24"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg>',checkCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',checkSquare:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>',check:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',chrome:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line></svg>',circle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle></svg>',clipboard:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>',clock:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>',cloudDrizzle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudLightning:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline></svg>',cloudOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',cloudRain:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path></svg>',cloudSnow:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line></svg>',cloud:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path></svg>',code:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>',codepen:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>',codesandbox:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',coffee:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line></svg>',columns:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path></svg>',command:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path></svg>',compass:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>',copy:'<svg class="stroked" viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',cpu:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line></svg>',creditCard:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>',crop:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path></svg>',crosshair:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line></svg>',database:'<svg class="stroked" viewBox="0 0 24 24"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path></svg>',delete:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line></svg>',disc:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle></svg>',divideCircle:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle></svg>',divideSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line></svg>',divide:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle></svg>',dollarSign:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>',downloadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path></svg>',download:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>',dribbble:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path></svg>',droplet:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path></svg>',edit2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>',edit3:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>',edit:'<svg class="stroked" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>',externalLink:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',eyeOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',eye:'<svg class="stroked" viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',fastForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon></svg>',feather:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line></svg>',figma:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path></svg>',fileMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line></svg>',filePlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>',fileText:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>',file:'<svg class="stroked" viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>',film:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line></svg>',filter:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>',flag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg>',folderMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folderPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line></svg>',folder:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',framer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path></svg>',frown:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',gift:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>',gitBranch:'<svg class="stroked" viewBox="0 0 24 24"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',gitCommit:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>',gitMerge:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path></svg>',gitPullRequest:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line></svg>',github:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>',gitlab:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path></svg>',globe:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>',grid:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>',hardDrive:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line></svg>',hash:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line></svg>',headphones:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path></svg>',heart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>',helpCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',hexagon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>',home:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>',image:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>',inbox:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path></svg>',info:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="7.75"></line></svg>',instagram:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>',italic:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line></svg>',key:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.78 7.78 5.5 5.5 0 0 1 7.78-7.78zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path></svg>',layers:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>',layout:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line></svg>',lifeBuoy:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line></svg>',link2:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg>',link:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>',linkedin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>',list:'<svg class="stroked" viewBox="0 0 24 24"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>',loader:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',lock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg> ',logIn:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>',logOut:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>',mail:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>',mapPin:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>',map:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line></svg>',maximize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',maximize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>',meh:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',menu:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>',messageCircle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>',messageSquare:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>',micOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',mic:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>',minimize2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>',minimize:'<svg class="stroked" viewBox="0 0 24 24"><path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path></svg>',minusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line></svg>',minus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></svg>',monitor:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>',moon:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>',moreHorizontal:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>',moreVertical:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle></svg>',mousePointer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg>',move:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line></svg>',music:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>',navigation2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 19 21 12 17 5 21 12 2"></polygon></svg>',navigation:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="3 11 22 2 13 21 11 13 3 11"></polygon></svg>',octagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon></svg>',package:'<svg class="stroked" viewBox="0 0 24 24"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>',paperclip:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path></svg>',pauseCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line></svg>',pause:'<svg class="stroked" viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect></svg>',penTool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.59 7.59"></path><circle cx="11" cy="11" r="2"></circle></svg>',percent:'<svg class="stroked" viewBox="0 0 24 24"><line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle></svg>',phoneCall:'<svg class="stroked" viewBox="0 0 24 24"><path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneForwarded:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneIncoming:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneMissed:'<svg class="stroked" viewBox="0 0 24 24"><line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phoneOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line></svg>',phoneOutgoing:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',phone:'<svg class="stroked" viewBox="0 0 24 24"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>',pieChart:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>',playCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon></svg>',play:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>',plusCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plusSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>',plus:'<svg class="stroked" viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>',pocket:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline></svg>',power:'<svg class="stroked" viewBox="0 0 24 24"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>',printer:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg>',radio:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path></svg>',repeat:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg>',rewind:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon></svg>',cornerDownRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path></svg>',cornerRightDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path></svg>',cornerRightUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path></svg>',cornerUpRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path></svg>',refreshCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>',rotateCw:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>',skipForward:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line></svg>',toggleRight:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle></svg>',rss:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>',save:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>',scissors:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line></svg>',search:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',send:'<svg class="stroked" viewBox="0 0 24 24"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>',server:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line></svg>',settings:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M4.78,6.75 C6.02,7.26,7.26,6.02,6.75,4.78 C6.75,4.78,6.24,3.57,6.24,3.57 C5.93,2.8,6.29,1.92,7.06,1.6 C7.06,1.6,8.14,1.15,8.14,1.15 C8.91,0.83,9.79,1.2,10.11,1.96 C10.11,1.96,10.61,3.18,10.61,3.18 C11.12,4.42,12.88,4.42,13.39,3.18 C13.39,3.18,13.89,1.97,13.89,1.97 C14.21,1.2,15.09,0.83,15.86,1.15 C15.86,1.15,16.94,1.6,16.94,1.6 C17.71,1.92,18.08,2.8,17.76,3.57 C17.76,3.57,17.15,5.03,17.15,5.03 C16.64,6.27,17.88,7.51,19.12,7 C19.12,7,20.51,6.42,20.51,6.42 C21.28,6.1,22.16,6.47,22.47,7.23 C22.47,7.23,22.92,8.32,22.92,8.32 C23.24,9.09,22.88,9.96,22.11,10.28 C22.11,10.28,21.07,10.71,21.07,10.71 C19.83,11.23,19.83,12.98,21.07,13.49 C21.07,13.49,22.04,13.89,22.04,13.89 C22.8,14.21,23.17,15.09,22.85,15.86 C22.85,15.86,22.4,16.94,22.4,16.94 C22.08,17.71,21.2,18.07,20.43,17.76 C20.43,17.76,19.22,17.25,19.22,17.25 C17.98,16.74,16.74,17.98,17.25,19.22 C17.25,19.22,17.76,20.43,17.76,20.43 C18.07,21.2,17.71,22.08,16.94,22.4 C16.94,22.4,15.86,22.85,15.86,22.85 C15.09,23.17,14.21,22.8,13.89,22.04 C13.89,22.04,13.39,20.82,13.39,20.82 C12.88,19.58,11.12,19.58,10.61,20.82 C10.61,20.82,10.11,22.04,10.11,22.04 C9.79,22.8,8.91,23.17,8.14,22.85 C8.14,22.85,7.06,22.4,7.06,22.4 C6.29,22.08,5.93,21.2,6.24,20.44 C6.24,20.44,6.64,19.47,6.64,19.47 C7.16,18.23,5.92,16.99,4.68,17.5 C4.68,17.5,3.64,17.93,3.64,17.93 C2.87,18.25,1.99,17.89,1.67,17.12 C1.67,17.12,1.22,16.04,1.22,16.04 C0.91,15.27,1.27,14.39,2.04,14.07 C2.04,14.07,3.43,13.49,3.43,13.49 C4.67,12.98,4.67,11.23,3.43,10.71 C3.43,10.71,1.96,10.11,1.96,10.11 C1.2,9.79,0.83,8.91,1.15,8.14 C1.15,8.14,1.6,7.06,1.6,7.06 C1.92,6.29,2.8,5.93,3.57,6.24 C3.57,6.24,4.78,6.75,4.78,6.75 z M14.31,11.04 C14.84,12.32,14.23,13.78,12.96,14.31 C11.68,14.84,10.22,14.23,9.69,12.96 C9.16,11.68,9.77,10.22,11.04,9.69 C12.32,9.16,13.78,9.77,14.31,11.04 z"/></g></svg> ',share2:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>',share:'<svg class="stroked" viewBox="0 0 24 24"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg>',shieldOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',shield:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>',shoppingBag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>',shoppingCart:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>',shuffle:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>',sidebar:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line></svg>',slack:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path></svg>',slash:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>',sliders:'<svg class="stroked" viewBox="0 0 24 24"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg>',smartphone:'<svg class="stroked" viewBox="0 0 24 24"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',smile:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line></svg>',speaker:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line></svg>',square:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect></svg>',star:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',stopCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect></svg>',sun:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>',sunrise:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline></svg>',sunset:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline></svg>',table:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"></path></svg>',tablet:'<svg class="stroked" viewBox="0 0 24 24"><rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line></svg>',tag:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line></svg>',target:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle></svg>',terminal:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>',thermometer:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path></svg>',tool:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>',trash2:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>',trash:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',trello:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect></svg>',trendingDown:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline></svg>',trendingUp:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>',triangle:'<svg class="stroked" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg>',truck:'<svg class="stroked" viewBox="0 0 24 24"><rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle></svg>',tv:'<svg class="stroked" viewBox="0 0 24 24"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>',twitch:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path></svg>',twitter:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>',type:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line></svg>',umbrella:'<svg class="stroked" viewBox="0 0 24 24"><path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path></svg>',underline:'<svg class="stroked" viewBox="0 0 24 24"><path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line></svg>',unlock:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path></svg>',thumbsUp:'<svg class="stroked" viewBox="0 0 24 24"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>',arrowRightCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>',arrowRight:'<svg class="stroked" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>',chevronRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"></polyline></svg>',chevronsRight:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>',uploadCloud:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>',upload:'<svg class="stroked" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>',userCheck:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline></svg>',userMinus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userPlus:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line></svg>',userX:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line></svg>',user:'<svg class="stroked" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>',users:'<svg class="stroked" viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>',videoOff:'<svg class="stroked" viewBox="0 0 24 24"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',video:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>',voicemail:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line></svg>',volume1:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volume2:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>',volumeX:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line></svg>',volume:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon></svg>',watch:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path></svg>',wifiOff:'<svg class="stroked" viewBox="0 0 24 24"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wifi:'<svg class="stroked" viewBox="0 0 24 24"><path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>',wind:'<svg class="stroked" viewBox="0 0 24 24"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>',xCircle:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xOctagon:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',xSquare:'<svg class="stroked" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line></svg>',x:'<svg class="stroked" viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',zapOff:'<svg class="stroked" viewBox="0 0 24 24"><polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line></svg>',zap:'<svg class="stroked" viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>',zoomIn:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',zoomOut:'<svg class="stroked" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',fontBold:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M13.5,11 C15.71,11,17.5,12.68,17.5,14.75 C17.5,16.82,15.71,18.5,13.5,18.5 C13.5,18.5,8.5,18.5,8.5,18.5 C8.5,18.5,8.5,3.5,8.5,3.5 C8.5,3.5,13.5,3.5,13.5,3.5 C15.71,3.5,17.5,5.18,17.5,7.25 C17.5,9.32,15.71,11,13.5,11 C13.5,11,13.5,11,13.5,11 z"/><path style="" d="M13.5,11 C13.5,11,8.5,11,8.5,11"/><path style="" d="M12.5,11 C14.71,11,16.5,12.68,16.5,14.75 C16.5,16.82,14.71,18.5,12.5,18.5 C12.5,18.5,7.5,18.5,7.5,18.5 C7.5,18.5,7.5,3.5,7.5,3.5 C7.5,3.5,12.5,3.5,12.5,3.5 C14.71,3.5,16.5,5.18,16.5,7.25 C16.5,9.32,14.71,11,12.5,11 C12.5,11,12.5,11,12.5,11 z"/><path style="" d="M12.5,11 C12.5,11,7.5,11,7.5,11"/></g></svg> ',fontItalic:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M17,4.5 C17,4.5,13,4.5,13,4.5"/><path style="" d="M11,19.5 C11,19.5,7,19.5,7,19.5"/><path style="" d="M15,4.5 C15,4.5,9,19.5,9,19.5"/></g></svg> ',fontUnderline:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M7.5,3.5 C7.5,3.5,7.5,10.74,7.5,13.5 C7.5,16.26,9.74,18.5,12.5,18.5 C15.26,18.5,17.5,16.26,17.5,13.5 C17.5,10.74,17.5,3.5,17.5,3.5"/><path style="" d="M7.5,21.5 C7.5,21.5,17.5,21.5,17.5,21.5"/></g></svg> ',indent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M2.5,9 C2.5,9,5.5,12,5.5,12 C5.5,12,2.5,15,2.5,15"/></g></svg> ',listBullet:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M5.5,5 C6.05,5,6.5,5.45,6.5,6 C6.5,6.55,6.05,7,5.5,7 C4.95,7,4.5,6.55,4.5,6 C4.5,5.45,4.95,5,5.5,5 z"/><path style="" d="M5.5,11 C6.05,11,6.5,11.45,6.5,12 C6.5,12.55,6.05,13,5.5,13 C4.95,13,4.5,12.55,4.5,12 C4.5,11.45,4.95,11,5.5,11 z"/><path style="" d="M5.5,17 C6.05,17,6.5,17.45,6.5,18 C6.5,18.55,6.05,19,5.5,19 C4.95,19,4.5,18.55,4.5,18 C4.5,17.45,4.95,17,5.5,17 z"/></g></svg> ',listNumber:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,6 C21,6,10,6,10,6"/><path style="" d="M21,12 C21,12,10,12,10,12"/><path style="" d="M21,18 C21,18,10,18,10,18"/><path style="" d="M4.5,5 C4.5,5,5.5,4,5.5,4 C5.5,4,5.5,8,5.5,8"/><path style="" d="M4.5,10 C4.5,10,5.5,10,5.5,10 C6.05,10,6.5,10.45,6.5,11 C6.5,11,6.5,11,6.5,11 C6.5,11.55,6.05,12,5.5,12 C5.5,12,5.5,12,5.5,12 C4.95,12,4.5,12.45,4.5,13 C4.5,13,4.5,14,4.5,14 C4.5,14,6.5,14,6.5,14"/><path style="" d="M4.5,16 C4.5,16,5.5,16,5.5,16 C6.05,16,6.5,16.45,6.5,17 C6.5,17,6.5,17,6.5,17 C6.5,17.55,6.05,18,5.5,18 C5.5,18,4.5,18,4.5,18 C4.5,18,5.5,18,5.5,18 C6.05,18,6.5,18.45,6.5,19 C6.5,19,6.5,19,6.5,19 C6.5,19.55,6.05,20,5.5,20 C5.5,20,4.5,20,4.5,20"/></g></svg> ',outdent:'<svg class="stroked" viewBox="0 0 24 24"><g><path style="" d="M21,10 C21,10,8,10,8,10"/><path style="" d="M21,6 C21,6,8,6,8,6"/><path style="" d="M21,14 C21,14,8,14,8,14"/><path style="" d="M21,18 C21,18,8,18,8,18"/><path style="" d="M5.5,9 C5.5,9,2.5,12,2.5,12 C2.5,12,5.5,15,5.5,15"/></g></svg> ',pin:'<svg class="stroked" viewBox="0 0 24 24"><g><g><path style="" d="M16.23,4.73 C16.23,4.73,19.42,7.9,19.42,7.9 C19.42,7.9,14.46,15.69,14.46,15.69 C14.46,15.69,8.45,9.68,8.45,9.68 C8.45,9.68,16.23,4.73,16.23,4.73 z"/><path style="" d="M20.84,9.32 C20.84,9.32,14.47,2.95,14.47,2.95"/><path style="" d="M16.6,17.8 C16.6,17.8,6.7,7.9,6.7,7.9"/><path style="" d="M10.23,11.44 C10.23,11.44,5.99,18.51,5.99,18.51 C5.99,18.51,13.06,14.27,13.06,14.27"/></g></g></svg> ',resize:'<svg class="stroked" version="1.1" viewBox="0, 0, 24, 24"><g><path d="M9,3 L3,3 L3,9"/><path d="M15,21 L21,21 L21,15"/><path d="M3,3 L10,10"/><path d="M21,21 L14,14"/></g></svg> ',shift:'<svg class="stroked" viewBox="0 0 24 24"><path d="M12 4 4 12h4v8h8v-8h4z"></path></svg> ',sortAscending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,10.5 C16.5,10.5,7.5,10.5,7.5,10.5"/><path d="M14.5,6.5 C14.5,6.5,9.5,6.5,9.5,6.5"/><path d="M18.5,14.5 C18.5,14.5,5.5,14.5,5.5,14.5"/><path d="M20.5,18.5 C20.5,18.5,3.5,18.5,3.5,18.5"/></g></svg> ',sortDescending:'<svg class="stroked" viewBox="0 0 24 24"><g><path d="M16.5,14.5 C16.5,14.5,7.5,14.5,7.5,14.5"/><path d="M14.5,18.5 C14.5,18.5,9.5,18.5,9.5,18.5"/><path d="M18.5,10.5 C18.5,10.5,5.5,10.5,5.5,10.5"/><path d="M20.5,6.5 C20.5,6.5,3.5,6.5,3.5,6.5"/></g></svg> ',tab:'<svg class="stroked" viewBox="0 0 24 24"><line x1="3" y1="12" x2="16" y2="12"></line><polyline points="10 6 16 12 10 18"></polyline><line x1="20" y1="5" x2="20" y2="19"></line></svg> ',cornerDownLeft:"cornerDownRight0f",cornerLeftDown:"cornerRightDown0f",cornerLeftUp:"cornerRightUp0f",cornerUpLeft:"cornerUpRight0f",refreshCcw:"refreshCw0f",rotateCcw:"rotateCw0f",skipBack:"skipForward0f",toggleLeft:"toggleRight0f",thumbsDown:"thumbsUp1f",arrowDownCircle:"arrowRightCircle90r",arrowLeftCircle:"arrowRightCircle180r",arrowUpCircle:"arrowRightCircle270r",arrowDown:"arrowRight90r",arrowLeft:"arrowRight180r",arrowUp:"arrowRight270r",chevronDown:"chevronRight90r",chevronLeft:"chevronRight180r",chevronUp:"chevronRight270r",chevronsDown:"chevronsRight90r",chevronsLeft:"chevronsRight180r",chevronsUp:"chevronsRight270r",arrowDownRight:"arrowUpRight90r",arrowDownLeft:"arrowUpRight180r",arrowUpLeft:"arrowUpRight270r",fatArrowUp:"shift",fatArrowRight:"shift90r",fatArrowDown:"shift180r",fatArrowLeft:"shift270r"};var uo=(e)=>{Object.assign(ye,e)};var al=(e)=>/\d$/.test(e)?e+"_":e,ho=[{prefix:/^spin(_?\d+)/,apply(e,t,n){let i=t[1].replace("_","-"),o=360/Math.abs(parseFloat(i)),s=i.startsWith("-")?"reverse":"normal",r=Le(e,[]),l=r;if(l.animate){let a=l.style.transform||"";l.animate([{transform:`${a} rotate(0deg)`},{transform:`${a} rotate(360deg)`}],{duration:o*1000,iterations:1/0,direction:s})}return fo(e,n,r)}},{prefix:"un",apply:(e)=>`slash25o$${e}75s75o`},{prefix:"check",apply:(e)=>`check75o_00aa00S$${e}75s50o`},{prefix:"cancel",apply:(e)=>`x75o_cc0000S$${e}75s50o`},{prefix:"search",apply:(e)=>`search80s30x30y$${e}50o`}],cl=0;function ao(e,t){let n=C.div();n.innerHTML=e;let i=n.querySelector("svg"),o=i.querySelectorAll("[id]");if(o.length>0){let l=new Map;for(let d of o){let u=d.id,h=`tosi_svg_id_${++cl}`;l.set(u,h),d.id=h}let a=i.innerHTML,c=a;for(let[d,u]of l){let h=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");c=c.replace(new RegExp(`url\\(#${h}\\)`,"g"),`url(#${u})`).replace(new RegExp(`href="#${h}"`,"g"),`href="#${u}"`)}if(c!==a)i.innerHTML=c}let s=new Set(i.classList);s.add("tosi-icon");let r=An.svg({class:Array.from(s).join(" "),viewBox:i.getAttribute("viewBox")},...t,...i.children);if(r.style.strokeWidth=y.tosiIconStrokeWidth("2px"),s.has("filled"))r.style.stroke="none",r.style.fill="currentColor";else if(s.has("stroked"))r.style.stroke=y.tosiIconStroke("currentColor"),r.style.fill=y.tosiIconFill("none");else r.style.stroke=y.tosiIconStroke("currentColor"),r.style.fill=y.tosiIconFill("currentColor");return r.style.height=y.tosiIconSize("16px"),r}function fo(e,t,...n){let i=C.span({class:"tosi-icon-composite",dataIcon:e,style:{display:"inline-flex",position:"relative",pointerEvents:"none"}},...n);for(let o of t)if(o&&typeof o==="object"&&!("nodeType"in o)){let s=o;if(s.style&&typeof s.style==="object")Object.assign(i.style,s.style);if(s.class)i.classList.add(...String(s.class).split(" "))}return i}function dl(e){let t=ye;if(t[e])return!0;let n=Bn(e);return n!=null&&!!t[n.baseName]}function co(e,t){for(let n of ho){let i,o;if(n.prefix instanceof RegExp){let r=new RegExp(n.prefix.source+"(.+)$"),l=e.match(r);if(!l)continue;i=l[l.length-1],i=i[0].toLowerCase()+i.slice(1),o=l}else{if(!e.startsWith(n.prefix)||e.length<=n.prefix.length)continue;i=e[n.prefix.length].toLowerCase()+e.slice(n.prefix.length+1),o=n.prefix}if(!dl(i))continue;let s=n.apply(al(i),o,t);if(typeof s==="string")return Le(s,t);if(s)return s}return null}var ul=10,hl=/(?:(?<=[a-zA-Z_])(?:_?\d+[osxyr]|[01]f|\d+W)|_[a-zA-Z0-9]+[FS])+$/;function Bn(e){let t=e.match(hl);if(!t)return null;let n=e.slice(0,t.index);if(!n)return null;if(n.endsWith("_"))n=n.slice(0,-1);if(!n)return null;if(!ye[n]){if(!ho.some((a)=>{if(a.prefix instanceof RegExp)return a.prefix.test(n);return n.startsWith(a.prefix)&&n.length>a.prefix.length}))return null}let o={},s=t[0].match(/_?\d+[osxyr]|[01]f|_[a-zA-Z0-9]+[FS]|\d+W/g);if(!s)return null;let r=[];for(let l of s){let a=l[l.length-1];if(a==="F"||a==="S"){let c=l.slice(1,-1),u=/^[0-9a-fA-F]{3,8}$/.test(c)?"#"+c:T[c];if(a==="F")o.fill=u;else o.stroke=u}else if(a==="W")o.strokeWidth=l.slice(0,-1);else{let c=parseInt(l.replace("_","-"));switch(a){case"o":o.opacity=String(c/100);break;case"s":r.push(`scale(${c/100})`);break;case"x":r.push(`translateX(${c}%)`);break;case"y":r.push(`translateY(${c}%)`);break;case"r":r.push(`rotate(${c}deg)`);break;case"f":r.push(c===0?"scaleX(-1)":"scaleY(-1)");break}}}if(r.length>0)o.transform=r.join(" "),o.transformOrigin="50% 50%";return{baseName:n,style:o}}function Le(e,t){if(e.endsWith("_"))e=e.slice(0,-1);let n=ye,i=e;for(let r=0;r<ul;r++){let l=n[i];if(!l)break;if(l.startsWith("<"))return ao(l,t);i=l}if(i!==e){let r=co(i,t);if(r)return r;let l=Bn(i);if(l){let a=Le(l.baseName,t);return Object.assign(a.style,l.style),a}}if(e.includes("$")){let r=e.split("$"),l=Le(r[r.length-1],[]),a=r.slice(0,-1).reverse().map((c)=>{let d=Le(c,[]);return Object.assign(d.style,{position:"absolute",inset:"0",width:"100%",height:"100%"}),d});return fo(e,t,l,...a)}let o=co(e,t);if(o)return o;let s=Bn(e);if(s){let r=Le(s.baseName,t);return Object.assign(r.style,s.style),r}if(e)console.warn(`icon ${e} does not exist`);return ao(ye.square,t)}var x=new Proxy(ye,{get(e,t){return(...n)=>Le(t,n)}});class po extends E{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:y.tosiIconStrokeWidth("2px"),strokeLinejoin:y.tosiIconStrokeLinejoin("round"),strokeLinecap:y.tosiIconStrokeLinecap("round"),fill:y.tosiIconFill("none"),height:T.tosiIconSize},":host svg, :host .tosi-icon-composite":{height:y.tosiIconSize("16px")}};static initAttributes={icon:"",size:0,fill:"",stroke:"",strokeWidth:1};render(){super.render(),this.textContent="";let e={};if(this.size)e.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)e.stroke=this.stroke,e.strokeWidth=this.strokeWidth;if(this.fill)e.fill=this.fill;this.append(x[this.icon]({style:e}))}}var ba=po.elementCreator();var ve=C.div({style:{content:" ",position:"fixed",top:0,left:0,right:0,bottom:0}}),Nt={passive:!0},go=(e,t,n="move")=>{if(!e.type.startsWith("touch")){e.preventDefault();let{clientX:o,clientY:s}=e;ve.style.cursor=n,Ve(ve),document.body.append(ve);let r=(l)=>{let a=l.clientX-o,c=l.clientY-s;if(t(a,c,l)===!0)ve.removeEventListener("mousemove",r),ve.removeEventListener("mouseup",r),ve.remove()};ve.addEventListener("mousemove",r,Nt),ve.addEventListener("mouseup",r,Nt)}else if(e instanceof TouchEvent){let o=e.changedTouches[0],s=o.identifier,r=o.clientX,l=o.clientY,a=e.target,c=0,d=0,u=(h)=>{let f=[...h.touches].find((p)=>p.identifier===s);if(f!==void 0)c=f.clientX-r,d=f.clientY-l;if(h.type==="touchmove")h.stopPropagation(),h.preventDefault();if(t(c,d,h)===!0||f===void 0)a.removeEventListener("touchmove",u),a.removeEventListener("touchend",u),a.removeEventListener("touchcancel",u)};a.addEventListener("touchmove",u),a.addEventListener("touchend",u,Nt),a.addEventListener("touchcancel",u,Nt)}},fl=(e="body *")=>[...document.querySelectorAll(e)].map((t)=>parseFloat(getComputedStyle(t).zIndex)).reduce((t,n)=>isNaN(t)||Number(t)<n?n:Number(t),0),Ve=(e,t="body *")=>{e.style.zIndex=String(fl(t)+1)};var{slot:pl}=C;class de extends E{static preferredTagName="tosi-float";static floats=new Set;static initAttributes={drag:!1,remainOnResize:"remove",remainOnScroll:"remain"};content=pl();static shadowStyleSpec={":host":{position:"fixed"}};reposition=(e)=>{if(e instanceof MouseEvent&&e.button!==0)return;if(e.target?.closest(".no-drag"))return;if(this.drag){Ve(this);let n=this.offsetLeft,i=this.offsetTop;go(e,(o,s,r)=>{if(this.style.left=`${n+o}px`,this.style.top=`${i+s}px`,this.style.right="auto",this.style.bottom="auto",r.type==="mouseup")return!0})}};connectedCallback(){super.connectedCallback(),gl(),de.floats.add(this);let e={passive:!0};this.addEventListener("touchstart",this.reposition,e),this.addEventListener("mousedown",this.reposition),Ve(this)}disconnectedCallback(){super.disconnectedCallback(),de.floats.delete(this)}}var $n=de.elementCreator();var mo=!1;function gl(){if(mo)return;mo=!0,window.addEventListener("resize",()=>{Array.from(de.floats).forEach((e)=>{if(e.remainOnResize==="hide")e.hidden=!0;else if(e.remainOnResize==="remove")e.remove()})},{passive:!0}),document.addEventListener("scroll",(e)=>{if(e.target instanceof HTMLElement&&e.target.closest(de.tagName))return;Array.from(de.floats).forEach((t)=>{if(t.remainOnScroll==="hide")t.hidden=!0;else if(t.remainOnScroll==="remove")t.remove()})},{passive:!0,capture:!0})}var yo=(e)=>{let{content:t,target:n,position:i,remainOnScroll:o,remainOnResize:s,draggable:r}=e,l=Array.isArray(t)?$n(...t):$n(t);if(ml(l,n,i,o,s,r),e.class)l.setAttribute("class",e.class);return document.body.append(l),l},ml=(e,t,n,i,o,s=!1)=>{{let{position:p}=getComputedStyle(e);if(p!=="fixed")e.style.position="fixed";if(e instanceof de){if(o)e.remainOnResize=o;if(i)e.remainOnScroll=i;e.drag=s}Ve(e)}let{left:r,top:l,width:a,height:c}=t.getBoundingClientRect(),d=r+a*0.5,u=l+c*0.5,h=window.innerWidth,f=window.innerHeight;if(n==="side")n=(d<h*0.5?"e":"w")+(u<f*0.5?"s":"n");else if(n==="auto"||n===void 0)n=(u<f*0.5?"s":"n")+(d<h*0.5?"e":"w");if(e.style.top=e.style.left=e.style.right=e.style.bottom=e.style.transform="",n.length===2){let[p,b]=n;switch(p){case"n":e.style.bottom=(f-l).toFixed(2)+"px";break;case"e":e.style.left=(r+a).toFixed(2)+"px";break;case"s":e.style.top=(l+c).toFixed(2)+"px";break;case"w":e.style.right=(h-r).toFixed(2)+"px";break}switch(b){case"n":e.style.bottom=(f-l-c).toFixed(2)+"px";break;case"e":e.style.left=r.toFixed(2)+"px";break;case"s":e.style.top=l.toFixed(2)+"px";break;case"w":e.style.right=(h-r-a).toFixed(2)+"px";break}e.style.transform=""}else if(n==="n")e.style.bottom=(f-l).toFixed(2)+"px",e.style.left=d.toFixed(2)+"px",e.style.transform="translateX(-50%)";else if(n==="s")e.style.top=(l+c).toFixed(2)+"px",e.style.left=d.toFixed(2)+"px",e.style.transform="translateX(-50%)";else if(n==="e")e.style.left=(r+a).toFixed(2)+"px",e.style.top=u.toFixed(2)+"px",e.style.transform="translateY(-50%)";else if(n==="w")e.style.right=(h-r).toFixed(2)+"px",e.style.top=u.toFixed(2)+"px",e.style.transform="translateY(-50%)";e.style.setProperty("--max-height",`calc(100vh - ${e.style.top||e.style.bottom})`),e.style.setProperty("--max-width",`calc(100vw - ${e.style.left||e.style.right})`)};function vo(e,t=!0){return(n,i)=>{let o=e(n),s=e(i);for(let r in o)if(o[r]!==s[r])return(Array.isArray(t)?t[r]!==!1:t)?o[r]>s[r]?1:-1:o[r]>s[r]?-1:1;return 0}}var{button:yl,span:bo,input:vl}=C,xo=(e,t)=>!!e.find((n)=>{if(n===null||t==null)return!1;else if(Array.isArray(n))return xo(n,t);else if(n.value===t||n===t)return!0});class Fe extends E{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:T.tosiSelectGap,textAlign:"left",height:T.tosiSelectTouchSize,padding:T.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:T.tosiSelectFieldWidth,padding:T.tosiSelectValuePadding,height:T.tosiSelectTouchSize,lineHeight:T.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(e){if(typeof e==="string")this._options=Fe.parseOptionsString(e);else this._options=e;this.queueRender()}static parseOptionsString(e){return e.split(",").map((t)=>{let n=t.trim();if(n==="")return null;let[i,o]=n.split("=").map((l)=>l.trim());if(!o)return{value:i,caption:i};let[s,r]=o.split(":").map((l)=>l.trim());return{value:i,caption:s||i,icon:r||void 0}})}value="";filter="";isExpanded=!1;formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=""}setValue=(e,t=!1)=>{if(this.value!==e)this.value=e,this.queueRender(!0);if(t)this.dispatchEvent(new Event("action"))};getValue=()=>this.value;get selectOptions(){return this.options}buildOptionMenuItem=(e)=>{if(e===null)return null;let{setValue:t,getValue:n}=this,i,o,s,r,l;if(typeof e==="string")o=s=e;else({icon:i,caption:o,value:s,tooltip:r,properties:l}=e);if(this.localized)o=R(o);let{options:a}=e;if(a)return{icon:i,caption:o,tooltip:r,properties:l,checked:()=>xo(a,n()),menuItems:a.map(this.buildOptionMenuItem)};return{icon:i,caption:o,tooltip:r,properties:l,checked:()=>n()===s,action:typeof s==="function"?async()=>{let c=await s();if(c!==void 0)t(c,!0)}:()=>{if(typeof s==="string")t(s,!0)}}};poppedOptions=[];get optionsMenu(){let e=this.selectOptions.map(this.buildOptionMenuItem);if(this.filter==="")return e;let t=(n)=>{if(n===null||typeof n==="function")return!0;else if(n.menuItems){let i=ue(n.menuItems);return n.menuItems=i.filter(t),i.length>0}else return n.caption.toLocaleLowerCase().includes(this.filter)};return e.filter(t)}handleChange=(e)=>{let{value:t}=this.parts,n=t.value||"";if(this.value!==String(n))this.value=n,this.dispatchEvent(new Event("change"));this.filter="",e.stopPropagation(),e.preventDefault()};handleKey=(e)=>{if(e.key==="Enter")e.preventDefault()};filterMenu=St(()=>{this.filter=this.parts.value.value.toLocaleLowerCase(),_(0),this.popOptions()});popOptions=(e)=>{if(e&&e.type==="click")this.filter="";this.poppedOptions=this.optionsMenu,this.isExpanded=!0,this.updateAriaExpanded(),be({target:this,menuItems:this.poppedOptions,showChecked:!0,role:"listbox",onClose:()=>{this.isExpanded=!1,this.updateAriaExpanded()}})};updateAriaExpanded(){let{value:e}=this.parts;e.setAttribute("aria-expanded",String(this.isExpanded))}content=()=>[yl({type:"button",part:"button",onClick:this.popOptions},bo(),vl({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}),x.chevronDown())];get allOptions(){let e=[];function t(n){for(let i of n)if(typeof i==="string")e.push({caption:i,value:i});else if(i?.value)e.push(i);else if(i?.options)t(i.options)}return t(this.selectOptions),e}findOption(){return this.allOptions.find((t)=>t.value===this.value)||{caption:this.value,value:this.value}}localeChanged=()=>{this.queueRender()};connectedCallback(){super.connectedCallback();let e=this.getAttribute("options");if(e&&this._options.length===0)this._options=Fe.parseOptionsString(e);if(this.localized)Nn.allInstances.add(this)}disconnectedCallback(){if(super.disconnectedCallback(),this.localized)Nn.allInstances.delete(this)}render(){super.render();let{value:e,button:t}=this.parts;t.disabled=this.disabled;let n=e.previousElementSibling,i=this.findOption(),o=bo();if(e.value=this.localized?R(i.caption):i.caption,i.icon)if(i.icon instanceof HTMLElement)o=i.icon.cloneNode(!0);else o=x[i.icon]();n.replaceWith(o),e.setAttribute("placeholder",this.localized?R(this.placeholder):this.placeholder),e.style.pointerEvents=this.editable?"":"none",e.readOnly=!this.editable}}var zn=Fe.elementCreator(),Da=Tt((...e)=>zn(...e),"xinSelect is deprecated, use tosiSelect instead (tag is now <tosi-select>)");var{span:bl}=C,{i18n:qe}=$t({i18n:{locale:window.navigator.language,locales:[window.navigator.language],languages:[window.navigator.language],emoji:[""],stringMap:{},localeOptions:[{icon:bl(),caption:window.navigator.language,value:window.navigator.language}]}});Lt.localeOptions={toDOM(e,t){if(e instanceof Fe)e.options=t}};var xl=()=>{let e=Array.from(Ue.allInstances);for(let t of e)t.localeChanged();Mo()};qe.locale.observe(xl);var at="data-tosi-localized";function zt(e){let t=e.getAttribute(at);if(!t)return;let n;try{n=JSON.parse(t)}catch(i){console.warn(`[data-tosi-localized] invalid JSON: ${t}`,i);return}if(!n||typeof n!=="object")return;for(let[i,o]of Object.entries(n)){if(typeof o!=="string")continue;e.setAttribute(i,R(o))}}function*ko(e){for(let t of Array.from(e.querySelectorAll(`[${at}]`)))yield t;for(let t of Array.from(e.querySelectorAll("*"))){let n=t.shadowRoot;if(n)yield*ko(n)}}function Mo(){if(typeof document>"u")return;for(let e of ko(document))zt(e)}var wo=null;if(typeof document<"u"&&typeof MutationObserver<"u"){let e=()=>{if(!document.body){queueMicrotask(e);return}wo=new MutationObserver((t)=>{for(let n of t){if(n.type==="attributes"&&n.target instanceof Element){zt(n.target);continue}for(let i of Array.from(n.addedNodes)){if(!(i instanceof Element))continue;if(i.hasAttribute(at))zt(i);for(let o of Array.from(i.querySelectorAll(`[${at}]`)))zt(o)}}}),wo.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[at]}),Mo()};e()}var _a=vo((e)=>[e.caption.toLocaleLowerCase()]);var wl=/(?<=[^\s\\])#[A-Za-z0-9_-]+$/;function Eo(e){let t=wl.exec(e);return t?t.index:-1}function Co(e){let t=Eo(e);return(t===-1?e:e.slice(0,t)).replace(/\\#/g,"#")}function Cl(e,t){return e.replace(/\{([A-Za-z0-9_]+)\}/g,(n,i)=>Object.prototype.hasOwnProperty.call(t,i)?String(t[i]):n)}function R(e,t){if(t)return Cl(R(e),t);if(e.endsWith("…"))return R(e.substring(0,e.length-1))+"…";let n=qe.locales.value.indexOf(qe.locale.value);if(n>-1){let i=B(qe.stringMap),o=e.toLocaleLowerCase(),s=i[o],r=s&&s[n],l=Eo(o);if((!r||r==='"')&&l>-1){let a=i[o.substring(0,l)];r=a&&a[n]}if(r){if(l>-1){let a=o.slice(l);if(r.toLocaleLowerCase().endsWith(a))r=r.slice(0,-a.length)}r=r.replace(/\\#/g,"#"),e=e.toLocaleLowerCase()===e?r.toLocaleLowerCase():r}else e=Co(e)}else e=Co(e);return e}class Ao extends E{static preferredTagName="tosi-locale-picker";static initAttributes={hideCaption:!1};content=()=>zn({part:"select",showIcon:!0,title:R("Language"),bindValue:qe.locale,bindLocaleOptions:qe.localeOptions});render(){super.render(),this.parts.select.toggleAttribute("hide-caption",this.hideCaption)}}var So=Ao.elementCreator();class Ue extends E{static preferredTagName="tosi-localized";static lightStyleSpec={":host":{pointerEvents:"none"}};static allInstances=new Set;static initAttributes={refString:""};contents=()=>C.tosiSlot();connectedCallback(){super.connectedCallback(),Ue.allInstances.add(this)}disconnectedCallback(){super.disconnectedCallback(),Ue.allInstances.delete(this)}localeChanged(){if(!this.refString)this.refString=this.textContent||"";this.textContent=this.refString?R(this.refString):""}render(){super.render(),this.localeChanged()}}var Nn=Ue,Lo=Ue.elementCreator();var kl=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||"");var Ml=[[/\^|ctrl-?/i,"ctrlKey"],[/⌘|meta-?/i,"metaKey"],[/⌥|⎇|alt-?|option-?/i,"altKey"],[/⇧|shift-?/i,"shiftKey"]],To=(e)=>{let t=e.trim(),n={ctrlKey:!1,metaKey:!1,altKey:!1,shiftKey:!1,key:""};for(let[i,o]of Ml)if(i.test(t))n[o]=!0,t=t.replace(i,"");return t=t.replace(/^-+/,""),n.key=t.toLowerCase(),n},Bo=(e,t)=>{let n=To(t);return e.key.toLowerCase()===n.key&&e.metaKey===n.metaKey&&e.ctrlKey===n.ctrlKey&&e.altKey===n.altKey&&e.shiftKey===n.shiftKey};var On=(e)=>{let t=To(e);if(kl){let i=[];if(t.ctrlKey)i.push("⌃");if(t.altKey)i.push("⌥");if(t.shiftKey)i.push("⇧");if(t.metaKey)i.push("⌘");return i.push(t.key.toUpperCase()),i.join("")}let n=[];if(t.ctrlKey)n.push("Ctrl");if(t.altKey)n.push("Alt");if(t.shiftKey)n.push("Shift");if(t.metaKey)n.push("Meta");return n.push(t.key.toUpperCase()),n.join("+")};var Dn=(e,t)=>{if(!e)return!1;for(let n of e)if(n==="special/any")return!0;else if(n.indexOf("*")>-1){let[i,o]=n.split("/"),[s,r]=t.split("/");if((i==="*"||i===s)&&(o==="*"||o===r))return!0}else if(n===t)return!0};var $o=(e,t=";")=>(e||"").split(t).map((n)=>n.trim()).filter((n)=>n!=="");var ue=(e)=>typeof e==="function"?e():e,{div:No,button:dt,span:N,a:El,tosiSlot:Al}=C,Sl=(e)=>{let t=[];for(let n of e)if(n===null){if(t.length>0&&t[t.length-1]!==null)t.push(n)}else t.push(n);while(t.length>0&&t[t.length-1]===null)t.pop();return t},Ot=(e,t,n=!1)=>{let i=[];for(let o of e){if(o===null){i.push(o);continue}if(typeof o==="function"){i.push(o);continue}let{acceptsDrop:s}=o;if(!s){if(!n)i.push({...o,enabled:()=>!1});continue}if(!t.some((a)=>Dn(s,a))){if(!n)i.push({...o,enabled:()=>!1});continue}let l=o;if(l.menuItems){let a=Ot(ue(l.menuItems),t,!0);if(a.length>0||l.dropAction){let c=n?a:Ot(ue(l.menuItems),t,!1);i.push({...l,menuItems:c})}else if(!n)i.push({...l,enabled:()=>!1})}else i.push(o)}return Sl(i)};var Ll={overflow:"hidden auto",maxHeight:`calc(${T.maxHeight} - ${y.menuInset("8px")})`,borderRadius:T.spacing50,background:y.menuBg("#fafafa"),boxShadow:y.menuShadow(`${T.spacing13} ${T.spacing50} ${T.spacing} #0004`)},Tl={boxShadow:"none",border:"none !important",display:"grid",alignItems:"center",justifyContent:"flex-start",textDecoration:"none",gridTemplateColumns:"0px 1fr max-content",width:"100%",gap:0,background:"transparent",padding:y.menuItemPadding("0 8px"),height:y.menuItemHeight("48px"),lineHeight:y.menuItemHeight("48px"),textAlign:"left"},Bl={color:y.menuItemColor("#222")},$l={boxShadow:"none !important",background:y.menuItemHoverBg("#eee")},zo={boxShadow:"none !important",background:y.menuItemActiveBg("#aaa"),color:y.menuItemActiveColor("#000")},Nl={background:`${y.menuDropOverBg("#2196F3")} !important`,color:`${y.menuDropOverColor("#fff")} !important`},zl={color:`${y.menuDropOverColor("#fff")} !important`},Ol={stroke:`${y.menuDropOverColor("#fff")} !important`},Oo={boxShadow:`inset 0 0 0 2px color-mix(in srgb, ${y.menuDropOverBg("#2196F3")} 50%, transparent) !important`},Dl={".xin-menu, .tosi-menu":Ll,".xin-menu > div, .tosi-menu > div":{width:y.menuWidth("auto")},".xin-menu-trigger, .tosi-menu-trigger":{paddingLeft:0,paddingRight:0,minWidth:y.touchSize("48px")},".xin-menu-separator, .tosi-menu-separator":{display:"inline-block",content:" ",height:"1px",width:"100%",background:y.menuSeparatorColor("#2224"),margin:y.menuSeparatorMargin("8px 0")},".xin-menu-element, .tosi-menu-element":{minHeight:y.menuItemHeight("48px")},".xin-menu-item, .tosi-menu-item":Tl,".xin-menu-item, .xin-menu-item > span, .tosi-menu-item, .tosi-menu-item > span":Bl,".xin-menu-with-icons .xin-menu-item, .tosi-menu-with-icons .tosi-menu-item":{gridTemplateColumns:"24px 1fr max-content",gap:y.menuItemGap("8px")},".xin-menu-shortcut, .tosi-menu-shortcut":{whiteSpace:"nowrap",paddingLeft:"1em",textAlign:"right",opacity:"0.65"},".xin-menu-item > :first-child, .tosi-menu-item > :first-child":{justifySelf:"center",alignSelf:"center"},".xin-menu-item svg, .tosi-menu-item svg":{stroke:y.menuItemIconColor("#222")},".xin-menu-item.xin-menu-item-checked, .tosi-menu-item.tosi-menu-item-checked":{background:y.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":$l,".xin-menu-item.drag-target:hover, .tosi-menu-item.drag-target:hover":Oo,".xin-menu-item:active, .tosi-menu-item:active":zo,".xin-menu-item:active svg, .tosi-menu-item:active svg":{stroke:y.menuItemIconActiveColor("#000")},".xin-menu-item-highlight, .tosi-menu-item-highlight":zo,".xin-menu-item-highlight svg, .tosi-menu-item-highlight svg":{stroke:y.menuItemIconActiveColor("#000")},".xin-drop-over, .tosi-drop-over":Nl,".xin-drop-over > span, .tosi-drop-over > span":zl,".xin-drop-over svg, .tosi-drop-over svg":Ol,".drag-target":Oo},Do=!1;function Hn(){if(Do)return;Do=!0,Ji("xin-menu-helper",Dl),document.addEventListener("mousedown",(e)=>{if(H.length===0)return;let t=e.composedPath();if(!H.find((n)=>t.includes(n.target)||t.includes(n.menu)))_(0)}),document.body.addEventListener("keydown",(e)=>{if(e.key==="Escape")_(0)})}var Hl=(e,t)=>{let n=e.checked&&e.checked()&&"check"||!1,i=e?.icon||n||N(" ");if(typeof i==="string")i=x[i]();let o=t.role==="listbox"?"option":"menuitem",s,r=e.properties||{};if(typeof e?.action==="string")s=El(r,{role:o,href:e.action},i,t.localized?N(R(e.caption)):N(e.caption),N({class:"tosi-menu-shortcut"},e.shortcut?On(e.shortcut):" "));else s=dt(r,{role:o,onClick:e.action},i,t.localized?N(R(e.caption)):N(e.caption),N({class:"tosi-menu-shortcut"},e.shortcut?On(e.shortcut):" "));if(s.classList.add("xin-menu-item","tosi-menu-item"),s.classList.toggle("xin-menu-item-checked",n!==!1),s.classList.toggle("tosi-menu-item-checked",n!==!1),e.tooltip)s.dataset.tooltip=e.tooltip;if(t.role==="listbox")s.toggleAttribute("aria-selected",n!==!1);if(e?.enabled&&!e.enabled())s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true");return s},jl=(e,t)=>{let n=e?.icon||N(" ");if(typeof n==="string")n=x[n]();let i=e.properties||{},o=dt(i,{onDragenter(s){Ke(),o.classList.add("xin-drop-over","tosi-drop-over"),s.preventDefault()},onDragover(s){if(s.preventDefault(),s.dataTransfer)s.dataTransfer.dropEffect="copy"},onDragleave(s){let r=s.relatedTarget;if(r&&o.contains(r))return;o.classList.remove("xin-drop-over","tosi-drop-over")},onDrop(s){if(s.preventDefault(),s.stopPropagation(),o.classList.remove("xin-drop-over","tosi-drop-over"),e.dropAction&&s.dataTransfer)e.dropAction(s.dataTransfer);_(0)}},n,t.localized?N(R(e.caption)):N(e.caption),N(" "));if(o.classList.add("xin-menu-item","tosi-menu-item"),e.tooltip)o.dataset.tooltip=e.tooltip;if(e.dropAction&&e.acceptsDrop)o.dataset.drop=e.acceptsDrop.join(";");if(e?.enabled&&!e.enabled())o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true");return o},Ho=(e,t)=>{let n=e.checked&&e.checked()&&"check"||!1,i=e?.icon||n||N(" ");if(typeof i==="string")i=x[i]();let o=null,s=!1,r=e.properties||{},l=dt(r,{disabled:!(!e.enabled||e.enabled()),onClick(a){if(t._dropMode)return;be(Object.assign({},t,{menuItems:ue(e.menuItems),target:l,submenuDepth:(t.submenuDepth||0)+1,position:"side"})),a.stopPropagation(),a.preventDefault()},onDragenter(a){if(!t._dropMode)return;Ke(),a.preventDefault(),a.stopPropagation();let c=a.relatedTarget;if(c&&l.contains(c))return;if(l.classList.add("xin-drop-over","tosi-drop-over"),s){if(_((t.submenuDepth||0)+1),s=!1,o)clearTimeout(o);o=null;return}if(o)clearTimeout(o);o=setTimeout(()=>{s=!0;let d=ue(e.menuItems),u=t._dataTypes?Ot(d,t._dataTypes,t.hideDisabled):d;if(u.length>0)be(Object.assign({},t,{menuItems:u,target:l,submenuDepth:(t.submenuDepth||0)+1,position:"side",_dropMode:!0,_dataTypes:t._dataTypes}))},t.disclosureDelay??200)},onDragover(a){if(!t._dropMode)return;if(a.preventDefault(),a.stopPropagation(),a.dataTransfer)a.dataTransfer.dropEffect=e.dropAction?"copy":"link"},onDragleave(a){if(!t._dropMode)return;let c=a.relatedTarget;if(c&&l.contains(c))return;if(s&&c&&H.some((d)=>d.menu.contains(c)||d.target.contains(c)))return;if(l.classList.remove("xin-drop-over","tosi-drop-over"),o)clearTimeout(o),o=null},onDrop(a){if(!t._dropMode||!e.dropAction)return;if(a.preventDefault(),a.stopPropagation(),l.classList.remove("xin-drop-over","tosi-drop-over"),a.dataTransfer)e.dropAction(a.dataTransfer);_(0)}},i,t.localized?N(R(e.caption)):N(e.caption),x.chevronRight({style:{justifySelf:"flex-end"}}));if(l.classList.add("xin-menu-item","tosi-menu-item"),e.tooltip)l.dataset.tooltip=e.tooltip;if(t._dropMode&&e.dropAction&&e.acceptsDrop)l.dataset.drop=e.acceptsDrop.join(";");return l},Il=(e,t)=>{if(e===null)return N({class:"xin-menu-separator tosi-menu-separator"});else if(typeof e==="function"){let n=e();return n.classList.add("xin-menu-element","tosi-menu-element"),n}else if(t._dropMode){let n=e;if(n.menuItems&&ue(n.menuItems).length>0)return Ho(n,t);else if(e.dropAction)return jl(e,t);else{let o=e?.icon||N(" ");if(typeof o==="string")o=x[o]();return dt({class:"xin-menu-item tosi-menu-item",disabled:!0},o,t.localized?N(R(e.caption)):N(e.caption),N(" "))}}else{let n=e?.action?Hl(e,t):Ho(e,t);if(t.showChecked&&e.checked&&e.checked())requestAnimationFrame(()=>{n.scrollIntoView({block:"center"})});return n}},Rl=(e)=>{let{target:t,width:n,menuItems:i,role:o="menu"}=e,s=i.find((a)=>a!=null&&typeof a!=="function"&&(a.icon||a.checked)),r=e.submenuDepth||0,l=No({class:s?"xin-menu tosi-menu xin-menu-with-icons tosi-menu-with-icons":"xin-menu tosi-menu",role:o,onClick(){if(!e._dropMode)_(0)},onDragover(a){if(!e._dropMode)return;a.preventDefault()},onDragenter(){if(!e._dropMode)return;Ke()},onDragleave(a){if(!e._dropMode)return;let c=a.relatedTarget;if(c&&l.contains(c))return;if(c&&H.some((d)=>d.menu.contains(c)||d.target.contains(c)))return;jo(r)}},No({style:{minWidth:t.offsetWidth+"px",width:typeof n==="number"?`${n}px`:n},onMousedown(a){a.preventDefault(),a.stopPropagation()}},...i.map((a)=>Il(a,e))));return l},We,H=[],ct=null,Ke=()=>{if(ct)clearTimeout(ct),ct=null},jo=(e)=>{Ke(),ct=setTimeout(()=>{ct=null,_(e)},500)},_=(e=0)=>{if(Ke(),e===0)document.querySelectorAll("tosi-menu.xin-drop-over, tosi-menu.tosi-drop-over").forEach((n)=>n.classList.remove("xin-drop-over","tosi-drop-over"));let t=H.splice(e);for(let n of t)if(n.menu.remove(),n.onClose)n.onClose();return We=t[0],e>0?H[e-1]:void 0},be=(e)=>{Hn(),e=Object.assign({submenuDepth:0},e);let{target:t,position:n,submenuDepth:i}=e;if(We&&!document.body.contains(We?.menu))We=void 0;if(H.length&&!document.body.contains(H[0].menu))H.splice(0);if(e._dropMode){if(H.length>i&&H[i]?.target===t)return;_(i)}else{if(i===0&&We?.target===t)return;let r=_(i);if(We?.target===t)return;if(r&&r.target===t){_();return}}if(!e.menuItems?.length)return;let o=Rl(e),s=yo({content:o,target:t,position:n});s.remainOnScroll=e._dropMode?"remain":"remove",H.push({target:t,menu:s,onClose:e.onClose})},_l=(e)=>{Hn();let{dataTypes:t,...n}=e,i=Ot(e.menuItems,t,e.hideDisabled);if(!i.length)return;be({...n,menuItems:i,_dropMode:!0,_dataTypes:t})};function Io(e,t,n=[]){for(let i of e){if(!i)continue;if(typeof i==="function")continue;let{shortcut:o}=i,{menuItems:s}=i;if(o){if(Bo(t,o)){let r=i;if(r.enabled&&!r.enabled())return;if(n.some((l)=>l.enabled&&!l.enabled()))return;return{action:r,path:n}}}else if(s){let r=Io(ue(s),t,[...n,i]);if(r)return r}}return}class Ro extends E{static preferredTagName="tosi-menu";static lightStyleSpec={":host":{display:"inline-flex",minWidth:T.touchSize,minHeight:T.touchSize},":host button":{margin:0,padding:0,alignSelf:"stretch",flex:"1",textAlign:"center"},":host button > tosi-slot":{display:"flex",alignItems:"center",gap:y.tosiMenuTriggerGap("10px")}};static initAttributes={menuWidth:"auto",localized:!1,icon:"",acceptsDrop:"",disclosureDelay:0,hideDisabled:!1};menuItems=[];dropAction=null;_dragMatches=!1;_matchesDrag(e){if(!this.acceptsDrop)return!1;let t=$o(this.acceptsDrop);return[...e.dataTransfer?.types||[]].some((i)=>t.some((o)=>Dn([o],i)))}showMenu=(e)=>{if(e.type==="click"||e.code==="Space")be({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),e.stopPropagation(),e.preventDefault()};handleDragEnter=(e)=>{if(this._dragMatches=this._matchesDrag(e),!this._dragMatches)return;Ke(),this.classList.add("xin-drop-over","tosi-drop-over");let t=[...e.dataTransfer?.types||[]];if(this.menuItems.length)_l({target:this.parts.trigger,menuItems:this.menuItems,dataTypes:t,width:this.menuWidth,localized:this.localized,disclosureDelay:this.disclosureDelay||void 0,hideDisabled:this.hideDisabled});e.preventDefault()};handleDragOver=(e)=>{if(!this._dragMatches)return;if(e.preventDefault(),e.dataTransfer)e.dataTransfer.dropEffect=this.dropAction?"copy":"link"};handleDragLeave=(e)=>{if(!this._dragMatches)return;let t=e.relatedTarget;if(t&&this.contains(t))return;if(t&&H.some((n)=>n.menu.contains(t)||n.target.contains(t))){this.classList.remove("xin-drop-over","tosi-drop-over");return}this.classList.remove("xin-drop-over","tosi-drop-over"),jo(0)};handleDrop=(e)=>{if(!this._dragMatches||!this.dropAction)return;if(e.preventDefault(),e.stopPropagation(),this.classList.remove("xin-drop-over","tosi-drop-over"),e.dataTransfer)this.dropAction(e.dataTransfer);_(0)};content=()=>dt({tabindex:0,part:"trigger",onClick:this.showMenu},Al());handleShortcut=async(e)=>{let t=Io(this.menuItems,e);if(!t)return;e.preventDefault(),e.stopImmediatePropagation();let{action:n,path:i}=t;if(this.isConnected&&document.body.contains(this))await this.animateShortcut(i,n);if(n.action instanceof Function)n.action()};findMenuItemByCaption(e,t){for(let n of e.querySelectorAll(".xin-menu-item")){let i=n.children[1];if(i&&i.textContent===t)return n}return null}async animateShortcut(e,t){_(0),be({target:this.parts.trigger,width:this.menuWidth,localized:this.localized,menuItems:this.menuItems}),await new Promise((i)=>setTimeout(i,80));for(let i=0;i<e.length;i++){let o=i+1,s=H[i]?.menu;if(!s)break;let r=this.findMenuItemByCaption(s,e[i].caption);if(!r)break;be({target:r,width:this.menuWidth,localized:this.localized,menuItems:ue(e[i].menuItems),submenuDepth:o,position:"side"}),await new Promise((l)=>setTimeout(l,80))}let n=H[H.length-1]?.menu;if(n){let i=this.findMenuItemByCaption(n,t.caption);if(i)i.classList.add("xin-menu-item-highlight","tosi-menu-item-highlight")}await new Promise((i)=>setTimeout(i,300)),_(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(),Hn(),document.addEventListener("keydown",this.handleShortcut,!0),this.acceptsDrop)this.dataset.drop=this.acceptsDrop}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleShortcut)}}var xe=Ro.elementCreator();var{button:Pl,span:_o}=C;uo({highlighter:'<svg class="stroked" viewBox="0 0 24 24"><path d="m9 11-6 6v3h9l3-3"></path><path d="m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"></path></svg>'});var Po="tosijs-styled-editor-menu";function Be(){return()=>{let e=_o({style:{display:"none"}});return queueMicrotask(()=>{e.closest(".tosi-menu")?.classList.add(Po)}),e}}function j(e,t,n,i){let o={title:e,value:t,dataTosiLocalized:JSON.stringify({title:e})};if(i)o.dataShortcut=i;return Pl(o,n)}function Te(e="8px"){return _o({style:{display:"inline-block",width:e}})}function $e(e){return Lo({refString:e})}function jn(){return So({slot:"menubar",hideCaption:!0})}function v(e,t,n){return{caption:t,action(){e.doCommand(n)}}}function Vo(e){return xe({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"Title","setBlockType h1"),v(e,"Heading","setBlockType h2"),v(e,"Subheading","setBlockType h3"),v(e,"Minor Heading","setBlockType h4"),null,v(e,"Body","setBlockType p"),v(e,"Code Block","setBlockType pre"),v(e,"Blockquote","setBlockType blockquote"),null,v(e,"Bulleted List","setList ul"),v(e,"Numbered List","setList ol"),v(e,"No List","setList none")]},x.type()," ",$e("Style"))}function Fo(e){return xe({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"Left","setBlocks text-align left"),v(e,"Center","setBlocks text-align center"),v(e,"Right","setBlocks text-align right"),v(e,"Justify","setBlocks text-align justify")]},x.alignLeft()," ",$e("Align"))}function qo(e){return xe({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"Times New Roman","setText font-family Times+New+Roman"),v(e,"Georgia","setText font-family Georgia"),v(e,"Helvetica","setText font-family Helvetica"),v(e,"Arial","setText font-family Arial"),null,v(e,"Serif","setText font-family serif"),v(e,"Sans-serif","setText font-family sans-serif"),v(e,"Monospace","setText font-family monospace")]},x.type()," ",$e("Font"))}function Uo(e){return xe({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"10","setText font-size 10px"),v(e,"12","setText font-size 12px"),v(e,"14","setText font-size 14px"),v(e,"18","setText font-size 18px"),v(e,"24","setText font-size 24px"),v(e,"36","setText font-size 36px")]}," ",$e("Size"))}function Wo(e){return xe({slot:"menubar",localized:!0,menuItems:[Be(),v(e,"Single","setBlocks line-height unset"),v(e,"1.5","setBlocks line-height 1.875"),v(e,"Double","setBlocks line-height 2.5")]}," ",$e("Spacing"))}function In(){return[j("Bold","setText font-weight bold",x.fontBold(),"ctrl+b"),j("Italic","setText font-style italic",x.fontItalic(),"ctrl+i"),j("Underline","setText text-decoration underline",x.underline(),"ctrl+u"),j("Highlight","setText background-color rgba(255,255,64,0.5)",x.highlighter())]}function Ko(){return[j("Align Left","setBlocks text-align left",x.alignLeft()),j("Center","setBlocks text-align center",x.alignCenter()),j("Align Right","setBlocks text-align right",x.alignRight()),j("Justify","setBlocks text-align justify",x.alignJustify()),Te(),j("Bulleted List","setList ul",x.listBullet()),j("Numbered List","setList ol",x.listNumber()),Te(),j("Indent","setBlocks margin-left 40px",x.indent()),j("Outdent","setBlocks margin-left 0px",x.outdent())]}function Rn(){return[j("Undo","updateUndo undo",x.rotateCcw(),"ctrl+z"),j("Redo","updateUndo redo",x.rotateCw(),"ctrl+y")]}function Xo(){return j("Toggle Debug","setDebug",x.bug())}function _n(){return[...In(),Te(),...Rn()]}function Pn(){return[...In(),Te(),...Ko(),Te(),...Rn(),Te(),Xo()]}function Yo(e){return xe({slot:"menubar",localized:!0,menuItems:[Be(),{caption:"Link…",action(){let t=prompt("Link URL");if(!t)return;let n=prompt("Target (blank for a new tab)","_blank");e.doCommandWith("setLink",t,n||"_blank")}},{caption:"Remove Link",action:()=>e.doCommand("removeLink")},null,{caption:"Image…",action(){let t=prompt("Image URL");if(!t)return;let n=prompt("Alt text (describe the image)")||"";e.doCommandWith("insertImage",t,n)}},null,{caption:"Footnote",action:()=>e.doCommand("insertFootnote")},{caption:"Renumber Footnotes",action:()=>e.doCommand("renumberFootnotes")}]},x.link()," ",$e("Insert"))}function Go(e){return xe({slot:"menubar",localized:!0,menuItems:[Be(),{caption:"Insert Table",menuItems:[v(e,"2 Columns","insertTable 2"),v(e,"3 Columns","insertTable 3"),v(e,"4 Columns","insertTable 4"),v(e,"5 Columns","insertTable 5")]},null,v(e,"Insert Row After","insertTableRow after"),v(e,"Insert Row Before","insertTableRow before"),v(e,"Insert Column After","insertTableCol after"),v(e,"Insert Column Before","insertTableCol before"),null,v(e,"Delete Row","deleteTableRow"),v(e,"Delete Column","deleteTableCol"),null,v(e,"Toggle Header Row","toggleHeaderRow")]},x.grid()," ",$e("Table"))}function Vn(e){return[Vo(e),Yo(e),Fo(e),qo(e),Uo(e),Wo(e),Go(e)]}var{slot:Jo,div:Fn}=C,Vl=/[\u0591-\u07FF\u08A0-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Fl=/[A-Za-z\u00C0-\u024F\u0370-\u04FF]/;function ql(e){if(Vl.test(e))return"rtl";if(Fl.test(e))return"ltr";return null}function P(e){if(e instanceof Element)return!e.classList.contains("sel-start")&&!e.classList.contains("sel-end");return e.nodeType!==3||e.textContent!==""}class qn extends E{static formAssociated=!0;static preferredTagName="tosijs-styled-editor";static initAttributes={widgets:"none",localized:!1,name:"",required:!1};static shadowStyleSpec={":host":{display:"flex",flexDirection:"column",position:"relative","--editor-ink":"#27488c","--editor-surface":"Canvas","--editor-text":"CanvasText","--editor-menubar-bg":"color-mix(in oklab, var(--editor-ink) 14%, var(--editor-surface))","--editor-toolbar-bg":"color-mix(in oklab, var(--editor-ink) 6%, var(--editor-surface))","--editor-edge":"color-mix(in oklab, var(--editor-ink) 25%, transparent)","--editor-chrome-text":"color-mix(in oklab, var(--editor-ink) 30%, var(--editor-text))",background:"var(--editor-surface)",color:"var(--editor-text)",colorScheme:"light dark"},":host ::slotted(*)":{flex:"0 0 auto"},':host [part="menubar"]':{flexShrink:"0",padding:"0 2px",display:"flex",gap:"0",flex:"0 0 auto",flexWrap:"wrap",alignItems:"center",background:"var(--editor-menubar-bg)",borderBottom:"1px solid var(--editor-edge)"},':host(:not([has-menubar])) [part="menubar"]':{display:"none"},':host [part="toolbar"]':{flexShrink:"0",padding:"1px 3px",display:"flex",gap:"1px",flex:"0 0 auto",flexWrap:"wrap",alignItems:"center",background:"var(--editor-toolbar-bg)",borderBottom:"1px solid var(--editor-edge)"},':host(:not([has-toolbar])) [part="toolbar"]':{display:"none"},':host [part="doc"]':{flex:"1 1 auto",minHeight:"0",background:"var(--editor-surface)",padding:"8px",cursor:"text",overflowY:"auto",position:"relative",touchAction:"manipulation",transition:"padding-top 0.15s ease-out, padding-bottom 0.15s ease-out"},':host [part="doc"] > *':{position:"relative",padding:"4px 8px",margin:"0"},':host [part="doc"] > blockquote':{padding:"4px 40px"},':host [part="doc"] img':{maxWidth:"100%",height:"auto",verticalAlign:"bottom"},':host [part="doc"] a':{color:"color-mix(in oklab, var(--editor-ink) 65%, var(--editor-text))",textDecoration:"underline"},':host [part="doc"] .footnote-ref':{fontSize:"0.75em",lineHeight:"0",verticalAlign:"super"},':host [part="doc"] .footnote-ref a':{textDecoration:"none",padding:"0 1px"},':host [part="doc"] ol.footnotes':{marginTop:"16px",paddingTop:"8px",borderTop:"1px solid var(--editor-edge)",fontSize:"0.85em"},':host [part="doc"] code:not([dir]), :host [part="doc"] kbd:not([dir]), :host [part="doc"] samp:not([dir])':{direction:"ltr",unicodeBidi:"isolate"},":host .sel-start, :host .sel-end":{display:"contents"},':host [part="caret"]':{position:"absolute",display:"none",width:"2px",padding:"0",margin:"0",border:"0",outline:"none",fontSize:"16px",lineHeight:"1",background:"var(--editor-text)",color:"transparent",caretColor:"transparent",pointerEvents:"none",zIndex:"3"},':host [part="caret"].-collapsed':{animation:"blink 1s steps(2, start) infinite"},":host .selection-edge":{position:"absolute",display:"none",width:"2px",pointerEvents:"none",zIndex:"3"},":host .selection-edge.-start":{background:"color-mix(in oklab, green 70%, var(--editor-text))"},":host .selection-edge.-end":{background:"color-mix(in oklab, red 70%, var(--editor-text))"},":host .selected":{background:"color-mix(in oklab, var(--editor-ink) 42%, color-mix(in oklab, white 38%, var(--editor-surface)))"},":host .selected-block":{background:"color-mix(in oklab, var(--editor-ink) 12%, color-mix(in oklab, white 21%, var(--editor-surface)))"},":host .first-block":{position:"relative"},":host .last-block":{position:"relative"},".debug .spanified":{boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.15)"},":host .spanified-word":{display:"inline"},":host .annotation::after":{position:"relative",top:"-4px",content:'"\\2020"'},":host .annotation > span":{display:"block",padding:"4px 8px",fontWeight:"normal",fontStyle:"normal",fontSize:"12px",background:"#ffc",position:"absolute",right:"0",maxWidth:"200px"},':host [part="doc"] *':{userSelect:"none",webkitUserSelect:"none"},":host ul, :host ol":{paddingLeft:"30px"},".debug .sel-start":{background:"green",opacity:"0.5",width:"2px",minHeight:"1em",display:"inline-block"},".debug .sel-end":{background:"red",opacity:"0.5",width:"2px",minHeight:"1em",display:"inline-block"},".debug .selected-block":{outline:"1px dashed blue"},":host .editor-table":{display:"grid",listStyle:"none",padding:"0",margin:"8px 0",border:"1px solid #ccc",borderRadius:"2px"},":host .editor-table > li":{padding:"4px 8px",borderRight:"1px solid #ddd",borderBottom:"1px solid #ddd",minHeight:"1.5em",outline:"none"},":host .editor-table > li.table-header":{fontWeight:"bold",background:"#f0f0f0"},":host .touch-affordances":{display:"none",position:"absolute",pointerEvents:"none",zIndex:"1000",top:"0",left:"0",width:"0",height:"0",transition:"opacity 0.1s ease-out"},":host .touch-affordance":{position:"absolute",width:"44px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"auto",touchAction:"none",background:"transparent",transition:"left 0.1s ease-out, top 0.1s ease-out"},":host .touch-affordances.dragging .touch-affordance":{transition:"none"},":host .touch-icon":{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",background:"#0078ff",color:"white",fontSize:"13px",fontWeight:"bold",border:"2px solid white",boxShadow:"0 1px 6px rgba(0,0,0,0.4)"},":host .touch-icon svg":{width:"16px",height:"16px",stroke:"white",fill:"none"},":host .touch-handle-start .touch-icon":{borderRadius:"4px 4px 0 4px"},":host .touch-handle-end .touch-icon":{borderRadius:"0 4px 4px 4px"},":host .touch-context-menu .touch-icon":{borderRadius:"4px"},":host .touch-menu":{position:"absolute",display:"flex",gap:"0",background:"rgba(0,0,0,0.85)",borderRadius:"8px",padding:"0",zIndex:"1001",boxShadow:"0 4px 12px rgba(0,0,0,0.3)",pointerEvents:"auto",overflow:"hidden"},":host .touch-menu-item":{background:"transparent",color:"white",border:"none",padding:"12px 16px",fontSize:"15px",borderRadius:"0",whiteSpace:"nowrap",margin:"0"}};static lightStyleSpec={".tosijs-styled-editor-menu":{"--menu-item-height":"30px","--menu-item-padding":"0 16px","--menu-separator-margin":"4px 0","--menu-inset":"4px"},'tosijs-styled-editor button[slot="toolbar"]':{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"26px",height:"26px",padding:"0",border:"0",borderRadius:"4px",background:"transparent",boxShadow:"none",color:"var(--editor-chrome-text) !important",cursor:"pointer"},'tosijs-styled-editor button[slot="toolbar"]:hover:not([disabled])':{background:"color-mix(in oklab, currentColor 16%, transparent)"},'tosijs-styled-editor button[slot="toolbar"]:active:not([disabled])':{background:"color-mix(in oklab, currentColor 28%, transparent)"},'tosijs-styled-editor button[slot="toolbar"][disabled]':{opacity:"0.35",cursor:"default",background:"transparent"},'tosijs-styled-editor button[slot="toolbar"] svg':{width:"18px",height:"18px"},'tosijs-styled-editor [slot="menubar"] button':{background:"transparent",border:"0",boxShadow:"none",borderRadius:"4px",padding:"4px 10px",color:"var(--editor-chrome-text) !important",cursor:"pointer"},'tosijs-styled-editor [slot="menubar"] button:hover':{background:"color-mix(in oklab, currentColor 16%, transparent)"},'tosijs-styled-editor [slot="menubar"] button svg':{width:"16px",height:"16px"}};selectable;active=!0;pastemode="merge";undo=[];undoDepth=0;reasonForLastUndo;lastKey=0;lastCursorX=0;isInitialized=!1;touchAffordances=null;touchHandleStart=null;touchContextMenu=null;touchHandleEnd=null;touchMenuEl=null;isTouchInteraction=!1;touchDrags=new Map;resizeTable=null;resizeCol=-1;resizeStartX=0;resizeStartWidths=[];_value="";get docHTML(){this.touchAffordances?.remove();let e=this.parts.doc.innerHTML;if(this.touchAffordances)this.parts.doc.appendChild(this.touchAffordances);return e}set docHTML(e){if(this.touchAffordances?.remove(),this.parts.doc.innerHTML=e,this.touchAffordances)this.parts.doc.appendChild(this.touchAffordances)}get value(){return this.isInitialized?this.docHTML:this._value}set value(e){let t=this._value;if(this._value=e,this.isInitialized&&this.docHTML!==e)this.docHTML=e;if(t!==e&&this.internals)this.internals.setFormValue(e)}commands={...tt};sanitize=It;content=[Jo({name:"menubar",part:"menubar"}),Jo({name:"toolbar",part:"toolbar"}),Fn({part:"doc",tabindex:"0"}),C.input({part:"caret",class:"caret-paint"}),Fn({part:"edgeStart",class:"selection-edge -start"}),Fn({part:"edgeEnd",class:"selection-edge -end"})];formResetCallback(){this.value=""}connectedCallback(){super.connectedCallback();let{doc:e}=this.parts;if(e.innerHTML==="")if(this._value.trim()!=="")e.innerHTML=this._value;else{let s=Array.from(this.childNodes).filter((r)=>!(r instanceof Element&&r.hasAttribute("slot")));if(s.length>0){let r=document.createDocumentFragment();for(let l of s)r.appendChild(l);e.appendChild(r)}}this.isInitialized=!0,this.selectable=new Je(e);let t=e.querySelector("p,h1,h2,h3,h4,h5,h6,div,blockquote,pre")||e.firstElementChild;if(t)t.appendChild(this.selectable.createBounds());this.selectable.normalize(),e.addEventListener("keydown",this.handleKeydown,!0),e.addEventListener("keypress",this.handleKeypress),e.addEventListener("copy",this.handleCopy),e.addEventListener("cut",this.handleCut),e.addEventListener("paste",this.handlePaste),e.addEventListener("pointerdown",this.handleResizePointerDown),e.addEventListener("pointermove",this.handleResizePointerMove),e.addEventListener("pointerup",this.handleResizePointerUp),this.touchAffordances=document.createElement("div"),this.touchAffordances.className="touch-affordances not-selectable do-not-spanify",this.touchHandleStart=document.createElement("div"),this.touchHandleStart.className="touch-affordance touch-handle-start not-selectable do-not-spanify";let n=document.createElement("span");n.className="touch-icon",n.appendChild(x.chevronLeft()),this.touchHandleStart.appendChild(n),this.touchContextMenu=document.createElement("div"),this.touchContextMenu.className="touch-affordance touch-context-menu not-selectable do-not-spanify";let i=document.createElement("span");i.className="touch-icon",i.innerHTML="⋮",this.touchContextMenu.appendChild(i),this.touchHandleEnd=document.createElement("div"),this.touchHandleEnd.className="touch-affordance touch-handle-end not-selectable do-not-spanify";let o=document.createElement("span");o.className="touch-icon",o.appendChild(x.chevronRight()),this.touchHandleEnd.appendChild(o),this.touchAffordances.append(this.touchHandleStart,this.touchContextMenu,this.touchHandleEnd),e.appendChild(this.touchAffordances);for(let s of[this.touchHandleStart,this.touchHandleEnd])s.addEventListener("pointerdown",this.handleAffordanceDragStart),s.addEventListener("pointermove",this.handleAffordanceDragMove),s.addEventListener("pointerup",this.handleAffordanceDragEnd);this.touchContextMenu.addEventListener("pointerdown",this.handleTouchContextMenu),e.addEventListener("selectionchanged",()=>{if(this.isTouchInteraction=this.selectable.touchMode,!this.touchMenuEl)this.updateUndo("new","selectionchanged");this.updateTouchAffordances()}),e.addEventListener("click",this.handleDocClick),e.addEventListener("dragstart",this.handleDragStart),e.addEventListener("dragover",this.handleDragOver),e.addEventListener("drop",this.handleDrop),e.addEventListener("dragend",this.handleDragEnd),e.setAttribute("data-drop","text/html;text/plain;Files;image/*"),this.addEventListener("click",this.handleToolbarClick),this.addEventListener("change",this.handleToolbarChange),this.selectable.focusTarget=this.parts.caret,this.selectable.onBoundsChanged=()=>this.syncCaret(),this.syncCaret(),this.parts.doc.addEventListener("scroll",this.handleGeometryChange,{capture:!0,passive:!0}),window.addEventListener("resize",this.handleGeometryChange,{passive:!0}),this.geometryObserver=new ResizeObserver(this.handleGeometryChange),this.geometryObserver.observe(this.parts.doc,{box:"content-box"}),this.geometryObserver.observe(this,{box:"border-box"}),this.applyWidgets(),this.trackBar(this.parts.menubar,"has-menubar"),this.trackBar(this.parts.toolbar,"has-toolbar"),this.updateUndo("init"),this.focus()}trackBar(e,t){let n=()=>this.toggleAttribute(t,e.assignedNodes({flatten:!0}).length>0);e.addEventListener("slotchange",n),n()}applyWidgets(){let e=this.widgets;if(e!=="default"&&e!=="minimal")return;if(this.querySelector('[slot="toolbar"], [slot="menubar"]'))return;if(e==="default"){for(let t of Vn(this))this.appendChild(t);if(this.localized)this.appendChild(jn())}for(let t of e==="minimal"?_n():Pn())t.setAttribute("slot","toolbar"),this.appendChild(t)}disconnectedCallback(){super.disconnectedCallback(),this.selectable?.destroy(),this.parts?.doc?.removeEventListener("scroll",this.handleGeometryChange,{capture:!0}),window.removeEventListener("resize",this.handleGeometryChange),this.geometryObserver?.disconnect()}geometryObserver=null;handleGeometryChange=()=>{if(this.syncCaret(),this.touchAffordances?.style.display==="block")this.positionAffordances()};markerRect(e){let t=pt(e,this.parts.doc);if(t)return{left:t.left,top:t.top,right:t.left,bottom:t.top+t.height,width:0,height:t.height};return e.getBoundingClientRect()}syncCaret(){let e=this.parts.caret,t=this.parts.edgeStart,n=this.parts.edgeEnd,i=this.parts.doc,o=i.querySelector(".sel-start"),s=i.querySelector(".sel-end"),r=s||o,l=i.querySelector(".selected")===null,a=this.getBoundingClientRect(),c=i.getBoundingClientRect(),d=getComputedStyle(this),u=a.top+parseFloat(d.borderTopWidth||"0"),h=a.left+parseFloat(d.borderLeftWidth||"0"),f=(p,b)=>{if(!b){p.style.display="none";return}let m=pt(b,i);if(!m){p.style.display="none";return}if(m.top+m.height<c.top||m.top>c.bottom){p.style.display="none";return}p.style.display="block",p.style.left=`${m.left-h}px`,p.style.top=`${m.top-u}px`,p.style.height=`${m.height}px`};f(e,r),e.classList.toggle("-collapsed",l),f(t,l?null:o),f(n,l?null:s)}getContext(){return{root:this.parts.doc,selectable:this.selectable,commands:this.commands,find:(e)=>this.parts.doc.querySelector(e),findAll:(e)=>Array.from(this.parts.doc.querySelectorAll(e)),selectedLeafNodes:()=>this.selectedLeafNodes(),selectedBlocks:()=>this.selectedBlocks(),insertionPoint:()=>this.insertionPoint(),block:(e)=>this.block(e),normalize:()=>this.normalize(),focus:()=>this.focus(),updateUndo:(e,t)=>this.updateUndo(e,t)}}doCommand(e){Xt(this.getContext(),e)}doCommandWith(e,...t){Kt(this.getContext(),e,...t)}focus(){this.selectable?.focus()}normalize(){this.selectable?.normalize()}selectedLeafNodes(){return ze(this.parts.doc).filter((e)=>e.parentElement?.closest(".selected")!==null)}selectedBlocks(){return Array.from(this.parts.doc.querySelectorAll(".selected-block"))}insertionPoint(){return this.parts.doc.querySelector(".sel-end")}block(e){let t=e;while(t&&t.parentNode!==this.parts.doc)t=t.parentNode;return t instanceof Element?t:null}caretCell(){let e=this.insertionPoint();return e?Z(e):null}listItemOf(e){let t=e;while(t&&t!==this.parts.doc){if(t instanceof Element&&t.tagName==="LI"&&t.parentElement&&(t.parentElement.tagName==="UL"||t.parentElement.tagName==="OL")&&!t.parentElement.classList.contains("editor-table"))return t;t=t.parentNode}return null}moveCaretToCell(e){this.selectable.unmark(),this.selectable.removeBounds();let t=this.selectable.createBounds(),n=t.lastChild,i=t.firstChild;e.insertBefore(i,e.firstChild),e.appendChild(n),this.selectable.normalize(),this.selectable.markBounds(),this.selectable.selectionChanged()}tableMoveUp(e){let t=W(e);if(!t)return;let n=D(t),i=te(e,n),s=K(t,i,n)[0];for(let l=0;l<n;l++)s.before(ne());let r=yt(e);if(r)this.moveCaretToCell(r);this.updateUndo("new")}tableMoveDown(e){let t=W(e);if(!t)return;let n=D(t),i=te(e,n),o=K(t,i,n),s=o[o.length-1];for(let l=0;l<n;l++)s.after(ne());let r=mt(e);if(r)this.moveCaretToCell(r);this.updateUndo("new")}exitTable(e,t){let n=W(e);if(!n)return;let i=this.block(n);if(!i)return;let o=t==="before"?i.previousElementSibling:i.nextElementSibling;if(o){if(this.selectable.unmark(),this.selectable.removeBounds(),t==="before")o.appendChild(this.selectable.createBounds());else o.insertBefore(this.selectable.createBounds(),o.firstChild);this.selectable.normalize(),this.selectable.markBounds(),this.selectable.selectionChanged()}else{let s=document.createElement("p");if(s.textContent=" ",t==="before")i.before(s);else i.after(s);this.selectable.unmark(),this.selectable.removeBounds(),s.appendChild(this.selectable.createBounds()),this.selectable.normalize(),this.selectable.markBounds(),this.selectable.selectionChanged(),this.updateUndo("new")}}splitListItem(e){let t=this.insertionPoint();if(!t)return;let n=e.parentElement;if(!n)return;if(!e.textContent?.replace(/\u00A0/g,"").trim()){let a=document.createElement("p");if(a.textContent=" ",this.selectable.removeBounds(),a.appendChild(this.selectable.createBounds()),n.children.length<=1)n.after(a),n.remove();else if(!e.previousElementSibling)n.before(a),e.remove();else if(!e.nextElementSibling)n.after(a),e.remove();else{let c=document.createElement(n.tagName),d=e.nextElementSibling;while(d){let u=d.nextElementSibling;c.appendChild(d),d=u}n.after(a),a.after(c),e.remove()}this.selectable.normalize(),this.selectable.markBounds(),this.updateUndo("new");return}let o=document.createElement("li"),s=t.nextSibling;while(s){let a=s.nextSibling;o.appendChild(s),s=a}let r=e.querySelector(".sel-start"),l=e.querySelector(".sel-end");if(l)o.insertBefore(l,o.firstChild);if(r)o.insertBefore(r,o.firstChild);if(!o.textContent?.trim()){let a=document.createTextNode(" ");if(r)r.before(a);else o.appendChild(a)}if(!e.textContent?.trim())e.appendChild(document.createTextNode(" "));e.after(o),this.selectable.markBounds(),this.updateUndo("new")}isListItemEmpty(e){return!e.textContent?.replace(/\u00A0/g,"").trim()}removeListItem(e){let t=e.parentElement;if(!t)return;let n=e.previousElementSibling;if(n&&n.tagName==="LI"){while(e.firstChild)n.appendChild(e.firstChild);e.remove()}else{let i=document.createElement("p");while(e.firstChild)i.appendChild(e.firstChild);if(t.before(i),e.remove(),t.children.length===0)t.remove()}this.normalize(),this.selectable.markBounds(),this.updateUndo("new")}listBackspace(e){if(!this.deleteSelection()){let t=this.insertionPoint();if(!t)return;if(this.isListItemEmpty(e)){this.removeListItem(e);return}let n=F(t,e,P);if(n){if(n.nodeType===3&&(n.textContent||"").length>1)n.textContent=n.textContent.slice(0,-1);else{let i=J(n);if(e.contains(i))i.parentNode?.removeChild(i)}this.normalize(),this.updateUndo()}else this.removeListItem(e)}}listForwardDelete(e){if(!this.deleteSelection()){let t=this.insertionPoint();if(!t)return;let n=V(t,e,P);if(n){if(n.nodeType===3&&(n.textContent||"").length>1)n.textContent=n.textContent.slice(1);else{let i=J(n);if(e.contains(i))i.parentNode?.removeChild(i)}this.normalize(),this.updateUndo()}else{let i=e.nextElementSibling;if(i&&i.tagName==="LI"){while(i.firstChild)e.appendChild(i.firstChild);i.remove(),this.normalize(),this.selectable.markBounds(),this.updateUndo("new")}}}}groupByLine(e){let t=new Map;for(let i of e){let o=i.getBoundingClientRect(),s=Math.round(o.top),r=t.get(s);if(!r)r=[],t.set(s,r);r.push(i)}return Array.from(t.keys()).sort((i,o)=>i-o).map((i)=>t.get(i))}closestCharOnLine(e,t){let n=e[0],i=1/0;for(let o of e){let s=o.getBoundingClientRect(),r=s.left+s.width/2,l=Math.abs(r-t);if(l<i)i=l,n=o}return n}positionAtSpanChar(e,t,n,i){let o=e.getBoundingClientRect(),s=this.selectable.find(".sel-start"),r=this.selectable.find(".sel-end");if(!s||!r)return;if(t<o.left+o.width/2)e.before(r);else e.after(r);if(!n)r.parentNode?.insertBefore(s,r);k(i,!1),this.selectable.markBounds(),this.focus()}moveVertical(e,t){let n=this.insertionPoint();if(!n)return;let i=this.block(n);if(!i)return;if(!(this.lastKey===38||this.lastKey===40)){let d=this.markerRect(n);this.lastCursorX=d.left}let s=this.lastCursorX,r=this.listItemOf(n),l=r||i;k(l,!0);let a=Array.from(l.querySelectorAll(".spanified"));if(a.length>0){let d=this.groupByLine(a),u=this.markerRect(n),h=Math.round(u.top),f=0,p=1/0;for(let m=0;m<d.length;m++){let z=Math.round(d[m][0].getBoundingClientRect().top),I=Math.abs(z-h);if(I<p)p=I,f=m}let b=e==="up"?f-1:f+1;if(b>=0&&b<d.length){let m=this.closestCharOnLine(d[b],s);this.positionAtSpanChar(m,s,t,l);return}}if(k(l,!1),r){let d=e==="up"?r.previousElementSibling:r.nextElementSibling;if(d&&d.tagName==="LI"){k(d,!0);let h=Array.from(d.querySelectorAll(".spanified"));if(h.length===0){k(d,!1),this.moveCaretToEmptyContainer(d,e,t);return}let f=this.groupByLine(h),p=e==="up"?f[f.length-1]:f[0],b=this.closestCharOnLine(p,s);this.positionAtSpanChar(b,s,t,d);return}let u=e==="up"?i.previousElementSibling:i.nextElementSibling;if(!u)return;this.moveVerticalToBlock(u,e,s,t);return}let c=e==="up"?i.previousElementSibling:i.nextElementSibling;if(!c)return;this.moveVerticalToBlock(c,e,s,t)}moveCaretToEmptyContainer(e,t,n){let i=this.selectable.find(".sel-start"),o=this.selectable.find(".sel-end");if(!i||!o)return;if(t==="up")e.appendChild(o);else e.insertBefore(o,e.firstChild);if(!n)o.parentNode?.insertBefore(i,o);this.selectable.markBounds(),this.focus()}moveVerticalToBlock(e,t,n,i){let s=(e.tagName==="UL"||e.tagName==="OL")&&!e.classList.contains("editor-table")?(t==="up"?e.querySelector(":scope > li:last-child"):e.querySelector(":scope > li:first-child"))||e:e;k(s,!0);let r=Array.from(s.querySelectorAll(".spanified"));if(r.length===0){k(s,!1),this.moveCaretToEmptyContainer(s,t,i);return}let l=this.groupByLine(r),a=t==="up"?l[l.length-1]:l[0],c=this.closestCharOnLine(a,n);this.positionAtSpanChar(c,n,i,s)}contentKey(e){if(!this.insertionPoint())return;this.isolateForTyping(e);let t=this.insertionPoint();if(t)t.before(document.createTextNode(e)),this.normalize(),this.updateUndo()}isolateForTyping(e){let t=this.insertionPoint(),n=ql(e);if(!t||!n)return null;let i=this.block(t);if(!i)return null;let o=i.getAttribute("dir")??(getComputedStyle(i).direction||"ltr");if(n===o)return null;let s=t.parentElement;if(s?.dataset.bidiRun===n)return s;let r=document.createElement("span");return r.dataset.bidiRun=n,r.setAttribute("dir",n),t.parentNode?.insertBefore(r,t),r.appendChild(t),r}backspace(){if(!this.deleteSelection()){let e=this.insertionPoint();if(!e)return;let t=F(e,this.parts.doc,P);if(!t)return;let n=this.block(e),i=this.block(t);if(t.nodeType===3&&(t.textContent||"").length>1)t.textContent=t.textContent.slice(0,-1);else{let o=J(t);o.parentNode?.removeChild(o),this.normalize()}if(i&&n&&this.parts.doc.contains(i)&&i!==n){while(n.firstChild)i.appendChild(n.firstChild);n.remove()}this.updateUndo()}}forwardDelete(){if(!this.deleteSelection()){let e=this.insertionPoint();if(!e)return;let t=V(e,this.parts.doc,P);if(!t)return;let n=this.block(e),i=this.block(t);if(t.nodeType===3&&(t.textContent||"").length>1)t.textContent=t.textContent.slice(1);else{let o=J(t);o.parentNode?.removeChild(o),this.normalize()}if(i&&n&&this.parts.doc.contains(i)&&i!==n){while(i.firstChild)n.appendChild(i.firstChild);i.remove()}this.updateUndo()}}deleteSelection(){let e=this.selectedBlocks(),t=!1;for(let r of e)if(!r.classList.contains("first-block")&&!r.classList.contains("last-block"))r.remove();let n=this.insertionPoint(),i=this.selectedLeafNodes().filter((r)=>r!==n);if(i.length){let r=J(i[0]);if(n&&r.parentNode)r.parentNode.insertBefore(n,r);for(let l of i){let a=J(l);a.parentNode?.removeChild(a)}t=!0}let o=this.parts.doc.querySelector(".sel-start");if(o&&!o.classList.contains("caret"))o.remove();this.selectable.unmark();let s=this.parts.doc.querySelector(".caret");for(let r of e)if(this.parts.doc.contains(r)&&(!s||!r.contains(s))&&!r.textContent?.trim())r.remove();if(e.length>1){let r=e[0],l=e[e.length-1];if(this.parts.doc.contains(r)&&this.parts.doc.contains(l)&&!r.classList.contains("editor-table")&&!l.classList.contains("editor-table")){while(r.firstChild)l.insertBefore(r.firstChild,l.firstChild);r.remove()}this.selectable.markBounds(),this.focus()}else if(t)this.updateUndo(),this.selectable.selectionChanged();return t}splitAtCaret(){let e=this.insertionPoint();if(!e)return!1;let t=this.block(e);if(!t)return!1;let n=document.createElement(t.tagName),i=e.nextSibling;while(i){let r=i.nextSibling;n.appendChild(i),i=r}let o=t.querySelector(".sel-start"),s=t.querySelector(".sel-end");if(s)n.insertBefore(s,n.firstChild);if(o)n.insertBefore(o,n.firstChild);if(!n.textContent?.trim()){let r=document.createTextNode(" ");if(o)o.before(r);else n.appendChild(r)}if(!t.textContent?.trim())t.appendChild(document.createTextNode(" "));return t.after(n),this.selectable.markBounds(),this.updateUndo("new"),!0}arrowLeft(e){let t=this.selectable.find(".sel-start");if(!t)return;if(e.altKey)this.moveWordLeft(e.shiftKey);else{let n=F(t,this.parts.doc,P);if(n)this.moveBoundsBefore(n,e.shiftKey)}}arrowRight(e){let t=this.selectable.find(".sel-end");if(!t)return;if(e.altKey)this.moveWordRight(e.shiftKey);else{let n=V(t,this.parts.doc,P);if(n)this.moveBoundsAfter(n,e.shiftKey)}}moveWordLeft(e){let t=this.selectable.find(".sel-start");if(!t)return;let n=this.block(t);if(!n)return;k(n,!0);let i=F(t,n,P);if(!i){k(n,!1);return}while(i&&i.nodeType===3&&/^\s$/.test(i.textContent||""))i=F(i,n,P);let o=i;while(i&&i.nodeType===3&&/^\S$/.test(i.textContent||"")){o=i;let s=F(i,n,P);if(s&&s.nodeType===3&&/^\S$/.test(s.textContent||""))i=s;else break}if(o){let s=this.selectable.find(".sel-start"),r=this.selectable.find(".sel-end");if(s&&r){if(o.parentNode?.insertBefore(s,o),!e)s.after(r)}}k(n,!1),this.selectable.markBounds(),this.focus()}moveWordRight(e){let t=this.selectable.find(".sel-end");if(!t)return;let n=this.block(t);if(!n)return;k(n,!0);let i=V(t,n,P);if(!i){k(n,!1);return}while(i&&i.nodeType===3&&/^\s$/.test(i.textContent||""))i=V(i,n,P);let o=i;while(i&&i.nodeType===3&&/^\S$/.test(i.textContent||"")){o=i;let s=V(i,n,P);if(s&&s.nodeType===3&&/^\S$/.test(s.textContent||""))i=s;else break}if(o){let s=this.selectable.find(".sel-start"),r=this.selectable.find(".sel-end");if(s&&r){if(o.parentNode?.insertBefore(r,o.nextSibling),!e)r.parentNode?.insertBefore(s,r)}}k(n,!1),this.selectable.markBounds(),this.focus()}moveBoundsBefore(e,t){let n=this.selectable.find(".sel-start"),i=this.selectable.find(".sel-end");if(!n||!i)return;if(e.nodeType===3&&(e.textContent||"").length>1){let o=e.splitText((e.textContent||"").length-1);o.parentNode?.insertBefore(n,o)}else e.parentNode?.insertBefore(n,e);if(!t)n.after(i);this.selectable.markBounds(),this.focus()}moveBoundsAfter(e,t){let n=this.selectable.find(".sel-start"),i=this.selectable.find(".sel-end");if(!n||!i)return;if(e.nodeType===3&&(e.textContent||"").length>1)e.splitText(1);if(e.parentNode?.insertBefore(i,e.nextSibling),!t)i.parentNode?.insertBefore(n,i);this.selectable.markBounds(),this.focus()}signatureOf(e){let t=document.createElement("div");t.innerHTML=e;for(let n of Array.from(t.querySelectorAll(".sel-start, .sel-end")))n.remove();for(let n of Array.from(t.querySelectorAll("[class], [draggable], [data-drag]"))){if(n.classList.remove("selected","selected-block","first-block","last-block"),n.classList.length===0)n.removeAttribute("class");n.removeAttribute("draggable"),n.removeAttribute("data-drag")}for(let n of Array.from(t.querySelectorAll("span")))if(n.attributes.length===0)n.replaceWith(...Array.from(n.childNodes));return t.normalize(),t.innerHTML}updateUndo(e,t){if(this.undo.length===0)e="init";if(t&&this.reasonForLastUndo===t)e=void 0;this.reasonForLastUndo=t;let n=this.docHTML;switch(e){case"init":this.undo=[n],this.undoDepth=0;break;case"new":if(this.undoDepth)this.undo=this.undo.slice(this.undoDepth),this.undoDepth=0;if(this.undo.length&&this.signatureOf(this.undo[0])===this.signatureOf(n)){this.undo[0]=n;break}this.undo.unshift(n);break;case"undo":if(this.undoDepth<this.undo.length-1)this.undoDepth++,this.docHTML=this.undo[this.undoDepth],this.focus();break;case"redo":if(this.undoDepth>0)this.undoDepth--,this.docHTML=this.undo[this.undoDepth],this.focus();break;default:if(this.undoDepth||this.undo.length===1){if(this.undo.length&&this.signatureOf(this.undo[0])===this.signatureOf(n)){this.undo[0]=n;break}this.undo=this.undo.slice(this.undoDepth),this.undoDepth=0,this.undo.unshift(n)}else this.undo[0]=n}if(this.selectable?.onBoundsChanged?.(),this.updateUndoButtons(),this.internals)this.internals.setFormValue(n)}updateUndoButtons(){let e=this.parts.toolbar,t=e.querySelector('[value="updateUndo undo"]'),n=e.querySelector('[value="updateUndo redo"]');if(t)t.disabled=this.undoDepth>=this.undo.length-1;if(n)n.disabled=this.undoDepth===0}handleDocClick=(e)=>{if(!this.active)return;let t=e.target?.closest?.("a");if(!t||!this.parts.doc.contains(t))return;if(e.metaKey||e.ctrlKey){let n=t.getAttribute("href")||"";if(Ge(n))window.open(n,"_blank","noopener")}e.preventDefault()};handleShortcut(e){let t=e.key.toLowerCase(),n=`${e.ctrlKey||e.metaKey?"ctrl+":""}${t}`,i=typeof CSS<"u"&&CSS.escape?CSS.escape(n):n.replace(/["\\]/g,"\\$&"),o=this.parts.toolbar.querySelector(`[data-shortcut="${i}"]`);if(o){let s=o.getAttribute("value");if(s)this.doCommand(s),e.preventDefault(),e.stopPropagation()}}handleKeydown=(e)=>{if(!this.active)return;if(e.target.closest(".not-editable"))return;let n=this.caretCell(),i=this.insertionPoint(),o=i?this.listItemOf(i):null;switch(e.key){case"Tab":if(e.preventDefault(),n)if(e.shiftKey){let s=Pt(n);if(s)this.moveCaretToCell(s)}else{let s=vt(n);if(s)this.moveCaretToCell(s);else{let r=W(n);if(r){let l=D(r);for(let c=0;c<l;c++)r.appendChild(ne());let a=vt(n);if(a)this.moveCaretToCell(a);this.updateUndo("new")}}}break;case"Backspace":if(e.preventDefault(),this.deleteSelection())this.updateUndo("new");else if(n){if(i){let s=F(i,n,P);if(s){if(s.nodeType===3&&(s.textContent||"").length>1)s.textContent=s.textContent.slice(0,-1);else{let r=J(s);if(n.contains(r))r.parentNode?.removeChild(r)}this.normalize(),this.updateUndo()}}}else if(o)this.listBackspace(o);else this.backspace();break;case"Delete":if(e.preventDefault(),this.deleteSelection())this.updateUndo("new");else if(n){if(i){let s=V(i,n,P);if(s){if(s.nodeType===3&&(s.textContent||"").length>1)s.textContent=s.textContent.slice(1);else{let r=J(s);if(n.contains(r))r.parentNode?.removeChild(r)}this.normalize(),this.updateUndo()}}}else if(o)this.listForwardDelete(o);else this.forwardDelete();break;case"Enter":if(e.preventDefault(),n){if(e.shiftKey)this.tableMoveDown(n);else if(i)i.before(document.createElement("br")),this.normalize(),this.updateUndo()}else if(o)this.deleteSelection(),this.splitListItem(o);else this.deleteSelection(),this.splitAtCaret();break;case"ArrowLeft":e.preventDefault(),this.arrowLeft(e);break;case"ArrowRight":e.preventDefault(),this.arrowRight(e);break;case"ArrowUp":if(e.preventDefault(),n)if(e.shiftKey)this.tableMoveUp(n);else{let s=yt(n);if(s)this.moveCaretToCell(s);else this.exitTable(n,"before")}else this.moveVertical("up",e.shiftKey);break;case"ArrowDown":if(e.preventDefault(),n)if(e.shiftKey)this.tableMoveDown(n);else{let s=mt(n);if(s)this.moveCaretToCell(s);else this.exitTable(n,"after")}else this.moveVertical("down",e.shiftKey);break}this.lastKey=e.keyCode};handleKeypress=(e)=>{if(!this.active)return;if(e.target.closest(".not-editable"))return;if(e.ctrlKey||e.metaKey)this.handleShortcut(e);else if(this.deleteSelection(),e.key.length===1)this.contentKey(e.key);e.preventDefault(),e.stopPropagation()};handleCopy=(e)=>{let t=Array.from(this.parts.doc.querySelectorAll(".selected"));if(t.length===0)return;let n="",i="";for(let o of t)n+=o.outerHTML,i+=o.textContent;e.clipboardData?.setData("text/html",n),e.clipboardData?.setData("text/plain",i),e.preventDefault()};handleCut=(e)=>{this.handleCopy(e),this.deleteSelection()};insertTransfer(e,t){let n=this.insertionPoint();if(!n)return!1;if(this.pastemode==="remove"||!e){if(!t)return!1;n.before(document.createTextNode(t))}else{let i=document.createElement("div");i.innerHTML=e,this.sanitize(i);while(i.firstChild)n.before(i.firstChild)}return!0}handlePaste=(e)=>{if(!this.active)return;let t=e.clipboardData?.getData("text/html"),n=e.clipboardData?.getData("text/plain");this.deleteSelection(),this.insertTransfer(t,n),this.normalize(),this.updateUndo("new"),e.preventDefault()};draggingSelection=!1;handleDragStart=(e)=>{if(!this.active||!e.dataTransfer)return;let t=this.selectable.findAll(".selected");if(t.length===0)return;let n=document.createElement("div");for(let i of t)n.appendChild(i.cloneNode(!0));e.dataTransfer.setData("text/html",n.innerHTML),e.dataTransfer.setData("text/plain",n.textContent||""),e.dataTransfer.effectAllowed="copyMove",this.draggingSelection=!0};handleDragOver=(e)=>{if(!this.active)return;if(e.preventDefault(),e.dataTransfer)e.dataTransfer.dropEffect=e.altKey?"copy":"move";if(e.target instanceof Element)this.selectable.placeCaretAt(e.clientX,e.clientY)};handleDrop=(e)=>{if(!this.active||!e.dataTransfer)return;e.preventDefault();let t=this.draggingSelection;this.draggingSelection=!1;let n=this.insertionPoint();if(t&&n?.closest(".selected")){this.clearDraggable();return}let o=Array.from(e.dataTransfer.files||[]).filter((l)=>l.type.startsWith("image/"));if(o.length){this.insertDroppedImages(o),this.clearDraggable();return}let s=e.dataTransfer.getData("text/html"),r=e.dataTransfer.getData("text/plain");if(t&&!e.altKey)this.deleteSelection();else this.selectable.unmark();this.clearDraggable(),this.insertTransfer(s,r),this.normalize(),this.updateUndo("new"),this.focus()};handleDragEnd=()=>{this.draggingSelection=!1,this.clearDraggable()};clearDraggable(){for(let e of Array.from(this.parts.doc.querySelectorAll("[draggable]")))e.removeAttribute("draggable"),e.removeAttribute("data-drag")}async insertDroppedImages(e){for(let t of e){let n=await new Promise((i)=>{let o=new FileReader;o.onload=()=>i(String(o.result||"")),o.readAsDataURL(t)});if(n)this.doCommandWith("insertImage",n,t.name)}}cellEdgeAt(e){let n=e.target.closest(".editor-table > li");if(!n)return null;let i=n.parentElement;if(!i||!i.classList.contains("editor-table"))return null;let o=n.getBoundingClientRect(),s=D(i),r=De(n,s),l=4;if(Math.abs(e.clientX-o.right)<l&&r<s-1)return[i,r];if(Math.abs(e.clientX-o.left)<l&&r>0)return[i,r-1];return null}updateTouchAffordances(){if(!this.touchAffordances)return;if(!this.isTouchInteraction&&!this.touchMenuEl){this.touchAffordances.style.display="none",this.parts.doc.style.paddingTop="",this.parts.doc.style.paddingBottom="",this.syncCaret();return}let e=this.parts.doc.querySelector(".sel-start"),t=this.parts.doc.querySelector(".sel-end");if(!e||!t){this.touchAffordances.style.display="none",this.parts.doc.style.paddingTop="",this.parts.doc.style.paddingBottom="",this.syncCaret();return}let n=this.parts.doc.getBoundingClientRect(),i=this.markerRect(e),o=this.markerRect(t);if(this.touchDrags.size===0){let s=parseFloat(this.parts.doc.style.paddingTop)||0,r=parseFloat(this.parts.doc.style.paddingBottom)||0,l=Math.min(i.top,o.top)-48-s,a=Math.max(i.bottom,o.bottom)+48+r,c=l<n.top?"52px":"",d=a>n.bottom?"52px":"",u=this.parts.doc.style.paddingTop,h=this.parts.doc.style.paddingBottom;if(c!==u||d!==h)this.parts.doc.style.paddingTop=c,this.parts.doc.style.paddingBottom=d}this.positionAffordances(),this.touchAffordances.style.display="block",this.touchAffordances.style.opacity="1"}positionAffordances(){let e=this.parts.doc.querySelector(".sel-start"),t=this.parts.doc.querySelector(".sel-end");if(!e||!t)return;let n=this.parts.doc.getBoundingClientRect(),i=this.markerRect(e),o=this.markerRect(t),s=i.left-n.left+this.parts.doc.scrollLeft,r=i.top-n.top+this.parts.doc.scrollTop,l=o.right-n.left+this.parts.doc.scrollLeft,a=o.bottom-n.top+this.parts.doc.scrollTop;if(e.nextElementSibling===t)this.touchHandleStart.style.left=`${s-44}px`,this.touchHandleStart.style.top=`${r-44}px`,this.touchContextMenu.style.left=`${s}px`,this.touchContextMenu.style.top=`${r-44}px`,this.touchHandleEnd.style.left=`${l}px`,this.touchHandleEnd.style.top=`${a}px`;else{this.touchHandleStart.style.left=`${s-44}px`,this.touchHandleStart.style.top=`${r-44}px`,this.touchHandleEnd.style.left=`${l}px`,this.touchHandleEnd.style.top=`${a}px`;let d=(s+l)/2-22,u=Math.min(r,a)-44;this.touchContextMenu.style.left=`${d}px`,this.touchContextMenu.style.top=`${u}px`}}handleAffordanceDragStart=(e)=>{let t=e.currentTarget,n=t===this.touchHandleStart?"start":"end";t.setPointerCapture(e.pointerId);let i=t.getBoundingClientRect(),o=n==="start"?".sel-start":".sel-end",s=this.parts.doc.querySelector(o),r=s?parseFloat(getComputedStyle(s).lineHeight):NaN,l=isNaN(r)?10:r/2,a,c;if(n==="start")a=i.right-e.clientX,c=i.bottom+l-e.clientY;else a=i.left-e.clientX,c=i.top-l-e.clientY;this.touchDrags.set(e.pointerId,{target:n,offsetX:a,offsetY:c}),this.hideTouchMenu(),this.touchAffordances.classList.add("dragging"),e.preventDefault(),e.stopPropagation()};handleAffordanceDragMove=(e)=>{let t=this.touchDrags.get(e.pointerId);if(!t)return;let n=e.clientX+t.offsetX,i=e.clientY+t.offsetY,o=e.currentTarget;o.style.pointerEvents="none",this.touchAffordances.style.pointerEvents="none";let s=this.shadowRoot.elementFromPoint(n,i);if(o.style.pointerEvents="auto",this.touchAffordances.style.pointerEvents="",!s||s.closest(".not-selectable")||s.classList.contains("not-selectable"))return;let r=ee(this.parts.doc,n,i);if(!r)return;let l=t.target==="start"?".sel-start":".sel-end",a=this.parts.doc.querySelector(l);if(a){let c=document.createRange();c.setStart(r.node,r.after?r.offset+1:r.offset),c.collapse(!0),c.insertNode(a),this.parts.doc.normalize(),this.selectable.markBounds();let d=this.parts.doc.getBoundingClientRect(),u=e.currentTarget,h=e.clientX-d.left+this.parts.doc.scrollLeft,f=e.clientY-d.top+this.parts.doc.scrollTop;u.style.left=`${h-22}px`,u.style.top=`${f-22}px`}e.preventDefault(),e.stopPropagation()};handleAffordanceDragEnd=(e)=>{if(!this.touchDrags.has(e.pointerId))return;if(e.currentTarget.releasePointerCapture(e.pointerId),this.touchDrags.delete(e.pointerId),this.touchDrags.size===0)this.selectable.despanify(),this.selectable.selectionChanged(),requestAnimationFrame(()=>{this.touchAffordances.classList.remove("dragging")});e.preventDefault(),e.stopPropagation()};handleTouchContextMenu=(e)=>{if(e.preventDefault(),e.stopPropagation(),this.touchMenuEl){this.hideTouchMenu();return}this.showTouchMenu(e)};showTouchMenu(e){this.hideTouchMenu();let t=document.createElement("div");t.className="touch-menu not-selectable do-not-spanify";let n=()=>this.selectable.findAll(".selected").map((d)=>d.textContent).join(""),i=[{label:"Cut",action:()=>{let d=n();if(!d)return;navigator.clipboard.writeText(d),this.deleteSelection(),this.updateUndo("new")}},{label:"Copy",action:()=>{navigator.clipboard.writeText(n())}},{label:"Paste",action:()=>{navigator.clipboard.readText().then((d)=>{if(d){this.deleteSelection();let u=this.insertionPoint();if(u)u.before(document.createTextNode(d)),this.normalize(),this.updateUndo("new")}})}},{label:"Delete",action:()=>{this.deleteSelection(),this.updateUndo("new")}},{label:"Bold",action:()=>this.doCommand("setText font-weight bold")},{label:"Italic",action:()=>this.doCommand("setText font-style italic")},{label:"Plain",action:()=>this.doCommand("setText font-weight normal; setText font-style normal; setText text-decoration none")}];for(let{label:d,action:u}of i){let h=document.createElement("button");h.className="touch-menu-item not-selectable",h.textContent=d,h.addEventListener("pointerdown",(f)=>{f.stopPropagation(),f.preventDefault(),u(),this.hideTouchMenu()}),t.appendChild(h)}let o=document.createElement("button");o.className="touch-menu-item touch-menu-close not-selectable",o.textContent="×",o.addEventListener("pointerdown",(d)=>{d.stopPropagation(),d.preventDefault(),this.hideTouchMenu()}),t.appendChild(o);let s=this.touchContextMenu.getBoundingClientRect(),r=this.parts.doc.getBoundingClientRect(),l=(i.length+1)*70,a=s.left-r.left+this.parts.doc.scrollLeft+22-l/2;if(a<0)a=4;if(a+l>r.width)a=r.width-l-4;t.style.left=`${a}px`;let c=s.top-r.top+this.parts.doc.scrollTop-44;if(c<0)c=s.bottom-r.top+this.parts.doc.scrollTop+4;t.style.top=`${c}px`,this.touchMenuEl=t,this.touchAffordances.appendChild(t),this.touchMenuDismiss=(d)=>{if(d===e)return;if(this.touchMenuEl&&!this.touchMenuEl.contains(d.target))this.hideTouchMenu()},this.parts.doc.addEventListener("pointerdown",this.touchMenuDismiss)}touchMenuDismiss=null;hideTouchMenu(){if(this.touchMenuDismiss)this.parts.doc.removeEventListener("pointerdown",this.touchMenuDismiss),this.touchMenuDismiss=null;if(this.touchMenuEl)this.touchMenuEl.remove(),this.touchMenuEl=null}handleResizePointerDown=(e)=>{let t=this.cellEdgeAt(e);if(!t)return;let[n,i]=t;this.resizeTable=n,this.resizeCol=i,this.resizeStartX=e.clientX;let o=K(n,0,D(n));this.resizeStartWidths=o.map((s)=>s.getBoundingClientRect().width),e.preventDefault(),e.stopPropagation(),this.parts.doc.setPointerCapture(e.pointerId)};handleResizePointerMove=(e)=>{if(!this.resizeTable){let i=this.cellEdgeAt(e);this.parts.doc.style.cursor=i?"col-resize":"";return}let t=e.clientX-this.resizeStartX,n=[...this.resizeStartWidths];n[this.resizeCol]=Math.max(30,n[this.resizeCol]+t),n[this.resizeCol+1]=Math.max(30,n[this.resizeCol+1]-t),Oe(this.resizeTable,n.map((i)=>`${i}px`))};handleResizePointerUp=(e)=>{if(this.resizeTable)this.updateUndo("new"),this.resizeTable=null,this.resizeCol=-1,this.parts.doc.style.cursor="",this.parts.doc.releasePointerCapture(e.pointerId)};isToolbarEvent(e){return e.closest('[slot="toolbar"]')!==null||e.closest('[slot="menubar"]')!==null}handleToolbarClick=(e)=>{let t=e.target;if(!this.isToolbarEvent(t))return;let n=t.closest("button");if(!n)return;let i=n.getAttribute("value");if(i)this.doCommand(i)};handleToolbarChange=(e)=>{let t=e.target;if(!this.isToolbarEvent(t))return;let n=t.closest("select")||t.closest("tosi-select");if(!n)return;let i=n.value;if(!i)return;let o=i.trim().split(/[\s;]/)[0];if(!o||!(o in this.commands))return;this.doCommand(i)}}var Ul=qn.elementCreator();var Zo="0.4.4";})();
|