@simai-studio/ui 5.20261021.2249 → 5.20261022.1303
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/distr/component/dropdown/js/dropdown.min.js +1 -1
- package/distr/core/contracts/packages/larena.package.json +1 -0
- package/distr/core/js/core-loader.js +133 -7
- package/distr/core/js/core-loader.min.js +1 -1
- package/distr/core/js/smart-base.js +134 -12
- package/distr/core/js/smart-base.min.js +1 -1
- package/distr/smart/buttons/js/buttons.min.js +1 -1
- package/distr/smart/buttons/smart.manifest.json +1 -1
- package/distr/smart/country-code/js/country-code.min.js +9 -7
- package/distr/smart/country-code/smart.manifest.json +6 -1
- package/distr/smart/country-code/template/default.js +12 -4
- package/distr/smart/datepicker/js/datepicker.min.js +12 -9
- package/distr/smart/datepicker/smart.manifest.json +13 -3
- package/distr/smart/datepicker/template/default.js +4 -1
- package/distr/smart/dropdown/js/dropdown.min.js +10 -10
- package/distr/smart/dropdown/smart.manifest.json +1 -1
- package/distr/smart/dropdown/template/default.js +10 -3
- package/distr/smart/field-renderers/js/field-renderers.min.js +17 -17
- package/distr/smart/icon-buttons/js/icon-buttons.min.js +1 -1
- package/distr/smart/icon-buttons/smart.manifest.json +1 -1
- package/distr/smart/icons/js/icons.min.js +1 -1
- package/distr/smart/icons/smart.manifest.json +1 -1
- package/distr/smart/inputs/js/inputs.min.js +33 -31
- package/distr/smart/inputs/smart.manifest.json +6 -1
- package/distr/smart/inputs/template/default.js +8 -0
- package/distr/smart/popover/js/popover.min.js +1 -1
- package/distr/smart/popover/smart.manifest.json +1 -1
- package/distr/smart/switch/js/switch.min.js +12 -11
- package/distr/smart/switch/smart.manifest.json +6 -1
- package/distr/smart/switch/template/default.js +2 -1
- package/package-manifest.json +33 -33
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see core-loader.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[66700837013363],{"12a68c68589c"(t,e,n){const i="sf-json-v1:";function s(t){return`${i}${String(t??"")}`}function o(t){if("string"!=typeof t)return"null";if(t.startsWith(i))return t.slice(11);const e=t.trim();return/^(?:\{|\[|"|null|true|false|-?\d)/.test(e)?t:"null"}function r(t,e){let n=e>>>0;for(let e=0;e<t.length;e+=1)n^=t.charCodeAt(e),n=Math.imul(n,16777619)>>>0;return n.toString(16).padStart(8,"0")}const a=function(t){const e=String(t??"");return`${r(e,2166136261)}${r(e,2654435769)}`},l=new Map,c={get length(){return l.size},key:t=>[...l.keys()][t]??null,getItem:t=>l.has(t)?l.get(t):null,setItem:(t,e)=>{l.set(String(t),String(e))},removeItem:t=>{l.delete(String(t))},clear:()=>l.clear()};function d(){try{const t=globalThis.localStorage;if(t)return t}catch{}return c}function u(t){if(!t)return t;const e=t.split(":"),n=e.pop(),i=e;if(1===i.length&&("before"===i[0]||"after"===i[0])){const t=n.match(/^content-(none|empty)$/);if(t)return`${i[0]}-${t[1]}`}const s=function(t){if(!t)return null;const e={gray:{50:"0",100:"1",200:"2",300:"3",400:"4",500:"5",600:"7",700:"7",800:"9",900:"9",950:"9"},red:{50:"0",100:"1",200:"1",300:"2",400:"3",500:"4",600:"6",700:"7",800:"8",900:"9",950:"9"},blue:{50:"0",100:"1",200:"2",300:"3",400:"3",500:"4",600:"5",700:"5",800:"7",900:"7",950:"9"},green:{50:"0",100:"1",200:"2",300:"3",400:"4",500:"4",600:"5",700:"6",800:"7",900:"8",950:"9"},yellow:{50:"0",100:"2",200:"3",300:"5",400:"6",500:"7",600:"8",700:"8",800:"9",900:"9",950:"9"},orange:{50:"0",100:"1",200:"2",300:"3",400:"4",500:"5",600:"6",700:"8",800:"9",900:"9",950:"9"},purple:{50:"0",100:"0",200:"1",300:"2",400:"3",500:"4",600:"4",700:"5",800:"6",900:"7",950:"8"},pink:{50:"0",100:"0",200:"1",300:"2",400:"4",500:"5",600:"6",700:"8",800:"8",900:"9",950:"9"}},n={"text-left":"text-start","text-right":"text-end","float-left":"float-inline-start","float-right":"float-inline-end","clear-left":"clear-inline-start","clear-right":"clear-inline-end","font-thin":"weight-1","font-extralight":"weight-2","font-light":"weight-3","font-normal":"regular","font-medium":"weight-5","font-semibold":"weight-6","font-bold":"bold","font-extrabold":"weight-8","font-black":"weight-9","font-sans":"sans","font-serif":"serif","font-mono":"mono","flex-column":"flex-col","flex-center":"center-center","t-left":"text-start","t-right":"text-end","pointer-events-none":"pointer-event-none","pointer-events-auto":"pointer-event-auto","not-italic":"italic-none","normal-case":"normalcase","no-underline":"decoration-none","text-ellipsis":"t-ellipsis","text-clip":"t-clip","bg-no-repeat":"bg-repeat-none","whitespace-nowrap":"wrap-none","whitespace-pre":"pre","whitespace-pre-line":"pre-line","whitespace-pre-wrap":"pre-wrap",contents:"content"};if(n[t])return n[t];const i=t.startsWith("-")?"-":"",s=i?t.slice(1):t,o=s.match(/^(bg|text|border)-(gray|red|blue|green|yellow|orange|purple|pink)-(50|100|200|300|400|500|600|700|800|900|950)$/);if(o){const[,t,n,i]=o,s=e[n]?.[i];return s?`${"text"===t?"color":t}-${n}-${s}`:null}const r=s.match(/^(bg|text|border)-(white|black)$/);if(r){const[,t,e]=r;return`${"text"===t?"color":t}-${e}`}const a={mt:"m-top",mr:"m-inline-end",mb:"m-bottom",ml:"m-inline-start",pt:"p-top",pr:"p-inline-end",pb:"p-bottom",pl:"p-inline-start"},l=s.match(/^(m[trbl]|p[trbl])-(.+)$/);if(l){const[,t,e]=l;return i&&"p"===t[0]?null:`${i}${a[t]}-${e}`}const c=s.match(/^(m|p)-(left|right)-(.+)$/);if(c){const[,t,e,n]=c;return i&&"p"===t?null:`${i}${t}-${"left"===e?"inline-start":"inline-end"}-${n}`}const d=s.match(/^border-(l|r)-(.+)$/);if(d)return`border-${"l"===d[1]?"inline-start":"inline-end"}-${d[2]}`;const u=s.match(/^border-(left|right)-(.+)$/);if(u)return`border-${"left"===u[1]?"inline-start":"inline-end"}-${u[2]}`;const h=s.match(/^grid-cols-(.+)$/);if(h)return`grid-col-${h[1]}`;if("w-100"===s)return"w-full";if("h-100"===s)return"h-full";const f=s.match(/^opacity-(\d{2,3})$/);if(f){const t=parseInt(f[1],10);if(100===t)return"opacity-full";if(0===t)return"opacity-0";if(t%10==0&&t>=10&&t<=90)return`opacity-${Math.round(t/10)}`}const p=s.match(/^z-(\d{2,3})$/);if(p){const t=parseInt(p[1],10);if(0===t)return`${i}z-0`;if(t%10==0&&t>=10&&t<=90)return`${i}z-${Math.round(t/10)}`}const g=s.match(/^bg-origin-(border|padding|content)$/);if(g)return`bg-origin-${g[1]}`;const m=s.match(/^bg-clip-(border|padding|content|text)$/);if(m)return`bg-clip-${m[1]}`;const y=s.match(/^leading-(tight|snug|relaxed|loose|none|normal)$/);if(y)return`line-${y[1]}`;if("items-baseline"===s)return"items-cross-baseline";const S=s.match(/^align-(baseline|top|middle|bottom|sub|super|text-top|text-bottom)$/);if(S){const t=S[1];return"super"===t?"text-sup":"text-top"===t?"text-top":"text-bottom"===t?"text-bottom":`text-${t}`}const b=s.match(/^justify-(start|end|center|between|around|evenly)$/);if(b)return`content-main-${b[1]}`;const w=s.match(/^justify-items-(start|end|center|stretch)$/);if(w)return`items-main-${w[1]}`;const E=s.match(/^justify-self-(auto|start|end|center|stretch)$/);if(E)return`self-main-${E[1]}`;const I=s.match(/^self-(auto|start|end|center|stretch|baseline)$/);if(I)return`self-cross-${I[1]}`;const P=s.match(/^place-items-(start|end|center|stretch)$/);if(P)return`items-${P[1]}`;const A=s.match(/^place-self-(auto|start|end|center|stretch)$/);if(A)return`self-${A[1]}`;const C=s.match(/^place-content-(start|end|center|between|around|evenly|stretch)$/);if(C)return`content-${C[1]}`;if(s.startsWith("content-")&&!s.includes("[")){const t=s.match(/^content-(start|end|center|between|around|evenly|stretch)$/);if(t)return`content-cross-${t[1]}`}const v=s.match(/^bg-(left|right)(?:-(top|bottom|center))?$/);if(v)return`bg-${"left"===v[1]?"inline-start":"inline-end"}${v[2]?`-${v[2]}`:""}`;const L=s.match(/^object-(left|right)(?:-(top|bottom|center))?$/);if(L)return`object-${"left"===L[1]?"inline-start":"inline-end"}${L[2]?`-${L[2]}`:""}`;const $=s.match(/^mask-(left|right)(?:-(top|bottom))?$/);if($)return`mask-${"left"===$[1]?"inline-start":"inline-end"}${$[2]?`-${$[2]}`:""}`;const F=s.match(/^origin-(left|right|top|bottom|center)(?:-(left|right))?$/);if(F){const[t,e]=F.slice(1);if("left"===t)return"origin-inline-start";if("right"===t)return"origin-inline-end";if("left"===e)return`origin-${t}-inline-start`;if("right"===e)return`origin-${t}-inline-end`}const k=s.match(/^(left|right)-(.+)$/);if(k)return`${"left"===k[1]?"inline-start":"inline-end"}-${k[2]}`;return null}(n);return s?(e.push(s),e.join(":")):t}function h(t){if(!t||"string"!=typeof t)return t;const e=t.split(/\s+/).filter(Boolean);let n=!1;const i=e.map(t=>{const e=u(t);return e!==t&&(n=!0),e});return n?i.join(" "):t}const f=JSON.parse('{"z":{"column-gap/default":"gap/default","column-gap/sm":"gap/sm","column-gap/md":"gap/md","column-gap/lg":"gap/lg","column-gap/xl":"gap/xl","column-gap/xxl":"gap/xxl"}}'),p=JSON.parse('{"cl-alert":["display/default","flex-direction/default","flex-wrap/default","flex/default","place-items/default","position/default"],"cl-avatar":["align-items/default","background-color/default","display/default","element-position/default","flex-direction/default","flex/default","height/default","justify-content/default","overflow/default","place-items/default","position/default","text-overflow/default","transition-property/default","white-space/default","width/default"],"cl-avatars":["align-items/default","display/default","flex-direction/default","position/default"],"cl-badges":["display/default","flex-direction/default","flex-wrap/default","justify-content/default","place-items/default","position/default","sr-only/default"],"cl-breadcrumbs":["align-items/default","container/default","display/default","position/default","visibility/default"],"cl-button-group":["align-items/default","display/default","isolate/default","pointer-events/default","position/default","text-align/default"],"cl-buttons":["align-items/default","display/default","flex/default","pointer-events/default","position/default"],"cl-checkbox":["cursor/default","display/default","flex-direction/default","position/default","transition-property/default"],"cl-close":["display/default","justify-content/default","place-items/default","position/default"],"cl-color":["display/default","position/default"],"cl-context-menu":["display/default","flex-direction/default","flex/default","position/default","text-decoration/default"],"cl-copy-button":["display/default","position/default"],"cl-country-code":["display/default","flex-direction/default","place-items/default","position/default","transition-property/default"],"cl-datepicker":["align-content/default","align-items/default","display/default","element-position/default","flex-direction/default","font-transform/default","gap/default","grid-template-columns/default","isolate/default","justify-content/default","overflow/default","position/default","resize/default"],"cl-download-file":["cursor/default","display/default","position/default","transition-property/default"],"cl-drawer":["display/default","justify-content/default","margin/default","place-items/default","position/default"],"cl-dropdown":["align-items/default","background-color/default","background-size/default","cursor/default","display/default","flex-direction/default","flex-wrap/default","flex/default","place-items/default","position/default","resize/default","transition-property/default","visibility/default"],"cl-empty-state":["display/default","isolate/default","position/default"],"cl-file-preview":["isolate/default","position/default"],"cl-file-upload":["align-items/default","align-self/default","cursor/default","display/default","flex-direction/default","flex/default","gap/default","grid-template-columns/default","justify-content/default","justify-items/default","position/default","width/default"],"cl-gallery":["align-items/default","background-color/default","border-radius/default","border-width/default","box-shadow/default","display/default","filter-blur/default","flex-direction/default","gap/default","height/default","justify-content/default","margin/default","max-width/default","min-height/default","min-width/default","padding/default","position/default","text-color/default","width/default"],"cl-help-mark":["display/default","isolate/default","position/default"],"cl-icon-buttons":["align-items/default","display/default","pointer-events/default","position/default"],"cl-icons":["font-weight/default","position/default"],"cl-inputs":["align-items/default","display/default","flex-direction/default","position/default","text-align/default","transition-property/default"],"cl-list-item":["align-items/default","background-color/default","background-size/default","cursor/default","display/default","flex-direction/default","flex-wrap/default","flex/default","gap/default","justify-content/default","place-items/default","position/default"],"cl-modal":["align-items/default","backdrop-filter-blur/default","border-radius/default","border-width/default","display/default","element-position/default","filter-blur/default","flex-direction/default","flex-wrap/default","font-size/default","gap/default","height/default","justify-content/default","margin/default","min-width/default","overflow/default","padding/default","place-items/default","position/default","text-color/default","title/default","width/default","z-index/default"],"cl-page-header":["align-items/default","display/default","flex-direction/default","flex-grow/default","flex-wrap/default","gap/default","margin/default","min-width/default","position/default","text-overflow/default"],"cl-pagination":["align-items/default","display/default","flex-direction/default","justify-content/default","position/default"],"cl-popover":["display/default","position/default"],"cl-profile-picker":["display/default","position/default"],"cl-progress-bar":["align-items/default","display/default","flex-direction/default","position/default","transition-property/default"],"cl-progress-scale":["align-items/default","display/default","flex-direction/default","grid-template-columns/default","overflow/default","position/default"],"cl-radio":["align-items/default","display/default","flex-direction/default","justify-content/default","position/default","transition-property/default"],"cl-range-slider":["flex/default","isolate/default","position/default"],"cl-reference-link":["align-items/default","display/default","position/default"],"cl-resizer":["display/default","position/default","resize/default","text-max-width/default"],"cl-skeleton":["animation/default","display/default","flex/default","position/default"],"cl-slider":["background-color/default","border-radius/default","display/default","padding/default","position/default","text-color/default"],"cl-spinner":["animation/default","position/default","stroke-color/default"],"cl-steps":["cursor/default","display/default","flex-direction/default","justify-content/default","place-items/default","position/default"],"cl-switch":["align-items/default","display/default","flex-direction/default","justify-content/default","position/default","transition-property/default"],"cl-tabs":["container/default","display/default","flex-direction/default","position/default","resize/default","visibility/default"],"cl-tags":["background-size/default","display/default","flex-direction/default","flex-wrap/default","justify-content/default","min-width/default","place-items/default","position/default"],"cl-textarea":["display/default","flex-direction/default","position/default","transition-property/default"],"cl-theme-generator":["position/default"],"cl-toast":["align-items/default","display/default","flex-direction/default","flex/default","justify-content/default","place-items/default","position/default"],"cl-toggle":["display/default","justify-content/default","place-items/default","position/default","transition-property/default"],"cl-tooltip":["display/default","flex-direction/default","position/default"],"cl-tree":["display/default","flex-direction/default","position/default","visibility/default"],"cl-tree-item":["align-items/default","container/default","display/default","flex-direction/default","position/default"]}');function g(t,e,n,i=!1){if(i||!Object.hasOwn(e,t))return t;const s=new Set;let o=t;for(;Object.hasOwn(e,o);){if(s.has(o))return t;s.add(o);const i=e[o];if("string"!=typeof i||!/^[a-z][a-z0-9-]*\/(default|sm|md|lg|xl|xxl)$/.test(i)||i.split("/")[1]!==o.split("/")[1])return t;const r=n[o],a=n[i];if(!r||!a||r.type&&"utility"!==r.type||a.type&&"utility"!==a.type)return t;o=i}return o}function m(t="400"){const e=String(t||"").trim().replace(/\s+/g," "),n=e.match(/^([1-9]00)\s+([1-9]00)$/);if(!n)return e||"400";const i=Number(n[1]),s=Number(n[2]),o=Math.min(i,s),r=Math.max(i,s);return String(Math.min(r,Math.max(o,400)))}var y=n("6c7f357fe960");const S=globalThis,b=t=>t,w=S.trustedTypes,E=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,I="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+P,C=`<${A}>`,v=document,L=()=>v.createComment(""),$=t=>null===t||"object"!=typeof t&&"function"!=typeof t,F=Array.isArray,k=t=>F(t)||"function"==typeof t?.[Symbol.iterator],_="[ \t\n\f\r]",N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,x=/>/g,R=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),O=/'/g,M=/"/g,j=/^(?:script|style|textarea|title)$/i,D=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),z=D(1),H=D(2),B=D(3),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),G=new WeakMap,W=v.createTreeWalker(v,129);function V(t,e){if(!F(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==E?E.createHTML(e):e}const K=(t,e)=>{const n=t.length-1,i=[];let s,o=2===e?"<svg>":3===e?"<math>":"",r=N;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,d=0;for(;d<n.length&&(r.lastIndex=d,l=r.exec(n),null!==l);)d=r.lastIndex,r===N?"!--"===l[1]?r=T:void 0!==l[1]?r=x:void 0!==l[2]?(j.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=R):void 0!==l[3]&&(r=R):r===R?">"===l[0]?(r=s??N,c=-1):void 0===l[1]?c=-2:(c=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?R:'"'===l[3]?M:O):r===M||r===O?r=R:r===T||r===x?r=N:(r=R,s=void 0);const u=r===R&&t[e+1].startsWith("/>")?" ":"";o+=r===N?n+C:c>=0?(i.push(a),n.slice(0,c)+I+n.slice(c)+P+u):n+P+(-2===c?e:u)}return[V(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let s=0,o=0;const r=t.length-1,a=this.parts,[l,c]=K(t,e);if(this.el=J.createElement(l,n),W.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=W.nextNode())&&a.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(I)){const e=c[o++],n=i.getAttribute(t).split(P),r=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:r[2],strings:n,ctor:"."===r[1]?tt:"?"===r[1]?et:"@"===r[1]?nt:Y}),i.removeAttribute(t)}else t.startsWith(P)&&(a.push({type:6,index:s}),i.removeAttribute(t));if(j.test(i.tagName)){const t=i.textContent.split(P),e=t.length-1;if(e>0){i.textContent=w?w.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],L()),W.nextNode(),a.push({type:2,index:++s});i.append(t[e],L())}}}else if(8===i.nodeType)if(i.data===A)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(P,t+1));)a.push({type:7,index:s}),t+=P.length-1}s++}}static createElement(t,e){const n=v.createElement("template");return n.innerHTML=t,n}}function Z(t,e,n=t,i){if(e===U)return e;let s=void 0!==i?n._$Co?.[i]:n._$Cl;const o=$(e)?void 0:e._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),void 0===o?s=void 0:(s=new o(t),s._$AT(t,n,i)),void 0!==i?(n._$Co??=[])[i]=s:n._$Cl=s),void 0!==s&&(e=Z(t,s._$AS(t,e.values),s,i)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,i=(t?.creationScope??v).importNode(e,!0);W.currentNode=i;let s=W.nextNode(),o=0,r=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new X(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new it(s,this,t)),this._$AV.push(e),a=n[++r]}o!==a?.index&&(s=W.nextNode(),o++)}return W.currentNode=v,i}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),$(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):k(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==q&&$(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,i="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=J.createElement(V(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Q(i,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new J(t)),e}k(t){F(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const s of t)i===e.length?e.push(n=new X(this.O(L()),this.O(L()),this,this.options)):n=e[i],n._$AI(s),i++;i<e.length&&(this._$AR(n&&n._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=b(t).nextSibling;b(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,i,s){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=q}_$AI(t,e=this,n,i){const s=this.strings;let o=!1;if(void 0===s)t=Z(this,t,e,0),o=!$(t)||t!==this._$AH&&t!==U,o&&(this._$AH=t);else{const i=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=Z(this,i[n+r],e,r),a===U&&(a=this._$AH[r]),o||=!$(a)||a!==this._$AH[r],a===q?t=q:t!==q&&(t+=(a??"")+s[r+1]),this._$AH[r]=a}o&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class et extends Y{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class nt extends Y{constructor(t,e,n,i,s){super(t,e,n,i,s),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??q)===U)return;const n=this._$AH,i=t===q&&n!==q||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==q&&(n===q||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const st=S.litHtmlPolyfillSupport;st?.(J,X),(S.litHtmlVersions??=[]).push("3.3.3");const ot=Symbol.for(""),rt=t=>{if(t?.r===ot)return t?._$litStatic$},at=new Map,lt=t=>(e,...n)=>{const i=n.length;let s,o;const r=[],a=[];let l,c=0,d=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(o=n[c],s=rt(o));)l+=s+e[++c],d=!0;c!==i&&a.push(o),r.push(l),c++}if(c===i&&r.push(e[i]),d){const t=r.join("$$lit$$");void 0===(e=at.get(t))&&(r.raw=r,at.set(t,e=r)),n=a}return t(e,...n)},ct=lt(z);lt(H),lt(B);(()=>{const t=window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[];window.registerSfComponent=function(e,n){if(e&&n&&!window.SF?.ComponentRegistry?.[e])if(window.SF?.Loader?.registerComponent)try{window.SF.Loader.registerComponent(e,n)}catch(t){console.warn("component:ready dispatch failed",t)}else t.push([e,n])},window.addEventListener("sf-loader-ready",()=>{if(window.SF?.Loader?.registerComponent)for(;t.length;){const[e,n]=t.shift()||[];if(e&&n&&!window.SF?.ComponentRegistry?.[e])try{window.SF.Loader.registerComponent(e,n)}catch(t){console.warn(t)}}})})();function dt(...t){for(const e of t){if(null==e)continue;const t=String(e).trim();if(""!==t)return t}return""}const ut=/^[a-z][a-z0-9-]*$/,ht="::";function ft(t){return"string"!=typeof t?"":t.trim().replace(/\/+$/,"")}function pt(t){var e,n,i;t.url&&t.url.endsWith("/")&&(t.url=t.url.slice(0,t.url.length-1)),t.smartUrl&&t.smartUrl.endsWith("/")&&(t.smartUrl=t.smartUrl.slice(0,t.smartUrl.length-1)),this.loadPage=!1,this.turboEnabled=!1,this.ComponentRegistry={},this.shortCodes={copy:"clipboard"},this.componentTemplates={},this.prepareInit=!1,(e=this).iconFontReady=!1,e.iconSubsetPending=!1,e.loadedIcons=new Set,e.iconDescriptorStates=new Map,e.iconSubsetReady=!1,e.iconSubsetPromise=null,e.iconSubsetNeedsReload=!1,e.iconSubsetManifest=null,e.iconSubsetHash="",e.iconManifestStorageKey="SF_ICON_SUBSET_MANIFEST",e.iconSubsetManifests=new Map,e.iconSubsetHashes=new Map,e.iconSubsetWarnings=new Set,e.pendingIconScanCount=0,e.pendingIconFlushQueued=!1,e.isSyncingStaticIconState=!1,e.staticIconDescriptorKeys=new WeakMap,this.eventSend=!1,this.uniqueIcons=new Map,this.pendingRegex=!0,this.url=t.url??"/simai/asset/simai.framework/sf5.master",this.smartUrl=(n=this.url,("string"==typeof(i=t.smartUrl)?i.trim():"")||n),this.observeElements=[],this.module={},this.phpScriptsLoaded=[],this.pluginListRelation=[],this.lastLoadHash=null,this.theme="light",this.themeEnabled=!1!==t.theme,this.preloaderWrap=window.SF_BOOT_CONFIG.preloader?.wrap||null,this.standAlone=!0,this.disableSmart=!!t.disableSmart,this.smart={...window.SF_BOOT_CONFIG?.smart||{},...t.smart||{}},this.smartBaseReady=null,this.smartBaseLoadPromise=null,this.sfDir="/simai/",this.utilyPath=`${this.url}/utility`,this.smartPath=`${this.smartUrl}/smart`,this.componentPath=`${this.url}/component`,this.smartCache=null,this.resolverAll={},this.mutationObserver=null,this.prepareObserver=null,this.stopObserver=!1,this.dragObserverLockCount=0,this.eventsPlugins=[],this.urlHash="",this.preloaderRun=window.SF_BOOT_CONFIG.preloader?.preloaderActive||!1,this.pendingLoadPlugins=new Set,this.pendingShortcodeLoads=new Set,this.relationPlugins={},this.totalRelationsPlugins={},this.shortcodeReadyCache=new Map,this.heavyModules=t.heavyModules||[],this.priorityModules=t.priorityModules||["container","display","flex","grid","gap","column","width","height","aspect-ratio","element-position","element-position-ext","headers","theme","skeleton"],this.preloader={color:(0,y.c6)(),width:y.Hg.width,height:y.Hg.height},this.timingStart="undefined"!=typeof performance&&performance.now?performance.now():Date.now(),this.turboEventsBound=!1,this.smartChildScanEventsBound=!1,this.totalLoadPlugin=0,this.notFoundFiles={},this.lazyRelations=new Set,this.cachedPlugins=[],this.loadedPlugins={},this.attrMatchCache=new Map,this.regexMatchCache=new Map,this.cacheVersion=dt(t.cacheVersion,"undefined"!=typeof __SF_CACHE_VERSION__?__SF_CACHE_VERSION__:null,window.SF_BOOT_CONFIG?.cacheVersion,window.SF_CACHE_VERSION),this.pluginListVersion=dt(t.pluginListVersion,"undefined"!=typeof __SF_PLUGIN_LIST_VERSION__?__SF_PLUGIN_LIST_VERSION__:null,window.SF_BOOT_CONFIG?.pluginListVersion,window.SF_PLUGIN_LIST_VERSION),this.params=t,this.firstLoad=!0,this.attr=t.attr?t.attr:"sf-asset",this.turboEventsBound=!1,this.turboRenderHandled=!1,this.delimiterURL=t.delimiterURL?t.delimiterURL:"/",this.frameworkPath=t.frameworkPath?t.frameworkPath:"/simai/asset/simai.framework/sf5.master/utility/",this.findPlugins=t.findPlugins?t.findPlugins:{},this.requiredPlugins=t.requiredPlugins?t.requiredPlugins:[],this.isLoadPluginCookie=!!t.isLoadPluginCookie&&t.isLoadPluginCookie,this.contentPreloaderText=t.contentPreloaderText?t.contentPreloaderText:"LOADING",this.arrowInterval=null,this.contentPreloader="",this.backgroundPreloader=t.backgroundPreloader?t.backgroundPreloader:(0,y.vq)(),this.tempLoaderStyles="inset: 0;position: fixed;width: 100%;height: 100vh;opacity: 1;z-index: 1000;background-color: var(--sf-color--surface-highest, var(--sf-surface-0, #fff));text-align: center;",this.modifierPreloader=t.modifierPreloader?t.modifierPreloader:"loader-default",this.isDebug=!1,this.minified=function(t={}){if("boolean"==typeof t.minified)return t.minified;const e=globalThis.window?.SF_BOOT_CONFIG?.minified;if("boolean"==typeof e)return e;try{if(new URLSearchParams(globalThis.location?.search||"").has("sf-debug"))return!1}catch{}return!globalThis.document?.documentElement?.hasAttribute?.("data-sf-debug")}(t),this.profileLoader=t.profileLoader??window.SF_BOOT_CONFIG?.profileLoader??this.isDebug,this.profileThreshold=t.profileThreshold??window.SF_BOOT_CONFIG?.profileThreshold??2,this.usePreloader=!0,this.debugStr={initLoader:"SFLoaderPlugin: script is run",requiredPluginsNotEmpty:"SFLoaderPlugin: the required plugins parameter is not empty",regexpPlugins:"SFLoaderPlugin: findPlugins list ",isExistFileOnreadystatechange:"SFLoaderPlugin: checking that the plugin files exist",isExistFilestatus200:"SFLoaderPlugin: status 200",isExistFilestatusNo200:"SFLoaderPlugin: status is not 200",isExistFileReadyStateNo4:"SFLoaderPlugin: Ready State no 4",searchRegexpRun:"SFLoaderPlugin: searchRegexp is run"},this.plugin={},this.searchEnd=!1,this.packages=Object.create(null),this.packageWarnings=new Set,this.installPackageApi(),this.declarePackages({...window.SF_BOOT_CONFIG?.packages||{},...t.packages||{}});const s=this.loadDeclaredPackageRules(),o=()=>s?s.then(()=>this.init()):this.init();!0===this.smart.base?this.smartBaseReady=this.loadSmartBase().finally(o):(this.smartBaseReady=window.SF?.smart?.SfBaseElement?Promise.resolve(window.SF.smart):new Promise(t=>{window.addEventListener("sf-smart-base-ready",()=>t(window.SF?.smart||null),{once:!0})}),o())}function gt(t){const e={},n=/([a-zA-Z0-9_]+)\s*=\s*(?:(?:'([^']*)')|(?:"([^"]*)")|(?:\[([^\]]*)\])|(\S+))/g;let i;for(;null!==(i=n.exec(t));){const t=i[1];let n;void 0!==i[2]?n=i[2]:void 0!==i[3]?n=i[3]:void 0!==i[4]?n=i[4].split(",").map(t=>t.trim()):void 0!==i[5]&&(n=i[5]),e[t]=n}return e}function mt(t){if(!t||!t.length)return null;const e=t.split(" "),n={};return e.forEach(t=>{if(t.match("=")){const[e,i]=t.split("=");n[e]=i}else n[t]=!0}),n}function yt(t){if(null==t)return[];if(t instanceof Node)return[t];if(t instanceof DocumentFragment)return Array.from(t.childNodes);if(Array.isArray(t))return t.reduce((t,e)=>t.concat(yt(e)),[]);if("string"==typeof t){const e=document.createElement("template");return e.innerHTML=t,Array.from(e.content.childNodes)}return[]}function St(t,e){try{d().setItem(t,e)}catch(e){console.warn("localStorage setItem failed",t,e)}}function bt(t){try{d().removeItem(t)}catch(e){console.warn("localStorage removeItem failed",t,e)}}function wt(t){const e=String(t||"");return/\.min\.(js|css)(?=$|[?#])/.test(e)?e.replace(/\.min\.(js|css)(?=$|[?#])/,".$1"):/\.(js|css)(?=$|[?#])/.test(e)?e.replace(/\.(js|css)(?=$|[?#])/,".min.$1"):null}pt.prototype.installPackageApi=function(){const t=this.findPlugins;t&&"object"==typeof t&&Object.defineProperty(t,"registerPackage",{configurable:!0,enumerable:!1,writable:!0,value:(t,e)=>this.registerPackage(t,e)})},pt.prototype.warnPackage=function(t,e){this.packageWarnings.has(t)||(this.packageWarnings.add(t),console.warn(`SFLoader: ${e}`))},pt.prototype.declarePackages=function(t){Object.entries(t||{}).forEach(([t,e])=>{if(!ut.test(t))return void this.warnPackage(`name:${t}`,`"${t}" in SF_BOOT_CONFIG.packages is not a package name (lower-case letters, digits and hyphens); it is ignored`);const n=ft(e?.base);n||this.warnPackage(`base:${t}`,`package "${t}" is declared without a base, so none of its components can load; set SF_BOOT_CONFIG.packages.${t}.base to the directory holding its component folders`),this.packages[t]={name:t,base:n,rule:ft(e?.rule)||(n?`${n}/rule.js`:""),declared:!0,registered:!1}})},pt.prototype.loadDeclaredPackageRules=function(){const t=Object.values(this.packages).filter(t=>t.declared&&t.rule).map(t=>this.addScript(t.rule).then(()=>{t.registered||this.warnPackage(`empty:${t.name}`,`${t.rule} loaded but registered nothing for package "${t.name}"; it must call SF.RuleLoader.registerPackage("${t.name}", {rules})`)}).catch(()=>{this.warnPackage(`rule:${t.name}`,`the rules of package "${t.name}" could not be loaded from ${t.rule}; its components stay undefined`)}));return t.length?Promise.all(t):null},pt.prototype.registerPackage=function(t,e={}){const n=String(t??"").trim();if(!ut.test(n))return this.warnPackage(`name:${n}`,`"${n}" is not a package name (lower-case letters, digits and hyphens); its rules are not registered`),[];const i=e?.rules;if(!i||"object"!=typeof i||Array.isArray(i))return this.warnPackage(`rules:${n}`,`package "${n}" was registered without a rules object`),[];this.packages[n]||(this.packages[n]={name:n,base:"",rule:"",declared:!1,registered:!1});const s=this.packages[n];s.base||(s.base=ft(e.base)),s.registered=!0;const o=[];return Object.entries(i).forEach(([t,e])=>{if(!e||"object"!=typeof e||Array.isArray(e))return void this.warnPackage(`rule:${n}:${t}`,`package "${n}" rule "${t}" is not an object; skipped`);const i=this.findPlugins[t];i?.package&&i.package!==n?this.warnPackage(`owner:${n}:${t}`,`rule "${t}" already belongs to package "${i.package}"; package "${n}" cannot take it`):i&&(this.module[t]||this.loadedPlugins[t])?this.warnPackage(`loaded:${n}:${t}`,`rule "${t}" is already loaded from `+(i.package?`package "${i.package}"`:"the Smart base")+"; "+`the copy in package "${n}" is not used on this page`):(this.findPlugins[t]={...e,package:n},o.push(t))}),o.length&&this.rulesChanged(),o},pt.prototype.rulesChanged=function(){this.clearAttributeRuleIndex(),this.clearRegexpScanRules(),this.attrMatchCache.clear(),this.regexMatchCache.clear(),this.prepareInit&&"undefined"!=typeof document&&document.body&&this.mutate(()=>{this.scanCustomElements(document.body),this.scanAttributes(document.body),this.pendingRegex||this.searchRegexp("")})},pt.prototype.resolveSmartBase=function(t){const e=this.findPlugins?.[t],n=e&&"object"==typeof e?e.package:"";if(!n)return this.smartPath;const i=this.packages[n];if(i?.base)return i.base;const s=Array.isArray(e.tags)&&e.tags.length?e.tags.map(t=>`<${t}>`).join(", "):t;return this.warnPackage(`resolve:${n}:${t}`,i?`${s} belongs to package "${n}", which has no base; set SF_BOOT_CONFIG.packages.${n}.base. It is not loaded from the Smart base.`:`${s} belongs to package "${n}", which this page has not declared; add SF_BOOT_CONFIG.packages.${n} = {base: ...}. It is not loaded from the Smart base.`),null},pt.prototype.isPluginResolvable=function(t){const e=this.findPlugins?.[t];return!e||"object"!=typeof e||!e.package||null!==this.resolveSmartBase(t)},pt.prototype.debug=function(t){this.isDebug&&console.log(t)},pt.prototype.logTiming=function(t){if(!this.isDebug)return;const e="undefined"!=typeof performance&&performance.now?performance.now():Date.now();console.log(`SFLoader timing ${t}: ${(e-this.timingStart).toFixed(1)}ms`)},pt.prototype.now=function(){return"undefined"!=typeof performance&&performance.now?performance.now():Date.now()},pt.prototype.profileStart=function(t){return this.profileLoader?{label:t,start:this.now()}:null},pt.prototype.profileEnd=function(t,e={}){if(!t||!this.profileLoader)return;const n=this.now()-t.start;if(n<this.profileThreshold)return;const i=Number(n.toFixed(2));console.log(`SFLoader profile ${t.label}: ${i}ms`,{duration:i,...e})},pt.prototype.loadSmartBase=function(){return window.SF?.smart?.SfBaseElement?Promise.resolve(window.SF.smart):(this.smartBaseLoadPromise||(this.smartBaseLoadPromise=window.SF.loadRuntime().then(()=>window.SF?.smart||null).catch(t=>(console.warn("smart base load failed",t),null)),this.smartBaseReady=this.smartBaseLoadPromise),this.smartBaseLoadPromise)},pt.prototype.getUrlParam=function(t=!1){if(t){return new URL(window.location.href).searchParams.get(t)}return""},pt.prototype.findShortCodes=function(t){const e=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement||null;if(this.shouldSkipNode(e))return;if(t.nodeType===Node.ELEMENT_NODE)return void t.childNodes.forEach(t=>{t.nodeType===Node.TEXT_NODE||t.nodeType===Node.COMMENT_NODE?this.findShortCodes(t):t.nodeType!==Node.ELEMENT_NODE||this.shouldSkipNode(t)||this.findShortCodes(t)});const n=t.nodeType===Node.COMMENT_NODE&&t.nodeValue?.startsWith("sf-shortcode ");if(!(t.nodeType===Node.TEXT_NODE)&&!n)return;const i=n?t.nodeValue.slice(13):t.textContent;if(!i)return;const s=[...i.matchAll(/\[!([a-zA-Z0-9_-]+)(?:\s+([^\](]+?))?](?:\(([^)]*)\))?(?:#([a-zA-Z0-9_-]+))?/g)];if(0===s.length)return;const o=this.profileStart("findShortCodes"),r=[];let a=0;s.forEach(t=>{const e=t[0],n=void 0!==t.index?t.index:i.indexOf(e,a),s=n+e.length;n>a&&r.push({type:"text",text:i.slice(a,n)});const[,o,l,c,d]=t;r.push({type:"shortcode",data:{name:o,attrs:mt(l),param:gt(c),id:d,raw:e}}),a=s}),a<t.textContent.length&&r.push({type:"text",text:i.slice(a)}),n?t.nodeValue="":t.textContent="";const l=r.filter(t=>"shortcode"===t.type),c=("undefined"!=typeof document&&document.hidden?null:window.requestIdleCallback)||function(t){return Ct(()=>t())},d=()=>{const e=new Set,n=r.map(t=>{if("text"===t.type)return document.createTextNode(t.text);const e=document.createComment("sf-shortcode");return t.placeholder=e,e}),i=()=>t.replaceWith(...n);l.length<=10?i():this.mutate(()=>i());const s=l.map(t=>{const n=t.data,i=this.shortCodes[n.name.toLowerCase()]||n.name.toLowerCase(),s=SF.RuleLoader[i];if(s&&!this.module[i])this.setExistCookie(i),e.add(i);else if(!s)return Promise.resolve(null);const o=i||n.name,r=i||n.name||o,a=Array.from(new Set([o,i,n.name].filter(Boolean))),l=a.map(t=>this.ComponentRegistry?.[t]).find(t=>t)||null;if(l)try{const t=new l({id:n.id,param:n.param,attrs:n.attrs});return Promise.resolve(t.render())}catch(t){return console.warn("shortcode render failed",i,t),Promise.resolve(null)}if(!this.shortcodeReadyCache.has(r)){const t=new Promise(t=>{try{let i=!1;const s=e=>{!i&&e&&(i=!0,t(e))};e.size&&!this.pendingRegex&&this.getLoader(this.module,!0),a.forEach(t=>this.ready(t,s)),setTimeout(()=>{i||(this.isDebug&&console.warn("SFLoader shortcode resolution timeout",{targetName:o,names:a,entry:n}),t(null))},8e3)}catch(e){console.warn(e),t(null)}});this.shortcodeReadyCache.set(r,t)}return this.shortcodeReadyCache.get(r).then(t=>{if(!t)return null;return new t({id:n.id,param:n.param,attrs:n.attrs}).render()})}),o=Array.from(e).filter(t=>!this.pendingLoadPlugins.has(t));o.length&&!this.pendingRegex&&(o.forEach(t=>this.pendingShortcodeLoads.add(t)),this.getLoader(this.module,!0)),Promise.allSettled(s).then(t=>{this.isDebug&&console.log("SFLoader.shortcodes results",t),o.length&&o.forEach(t=>this.pendingShortcodeLoads.delete(t));let e=0;t.forEach(t=>{"fulfilled"===t.status?l[e].nodes=yt(t.value):l[e].nodes=[],e++}),this.mutate(()=>{l.forEach(t=>{const e=t.placeholder;e&&e.parentNode&&(t.nodes&&t.nodes.length?e.replaceWith(...t.nodes):e.remove())})})})};l.length<=10?d():c(d),this.profileEnd(o,{shortcodes:l.length,textLength:i.length,nodeType:n?"comment":"text"})},function(t,{safeSetItem:e,safeRemoveItem:n}={}){const i=(t=[])=>Array.isArray(t)?t:"string"==typeof t?t.split(",").map(t=>t.trim()).filter(Boolean):null==t||!1===t?[]:[t],s=new Map([["sf-icon--weight-thin","100"],["sf-icon-thin","100"],["sf-icon--weight-extra-light","200"],["sf-icon-extra-light","200"],["sf-icon--weight-light","300"],["sf-icon-light","300"],["sf-icon--weight-regular","400"],["sf-icon-regular","400"],["sf-icon--weight-medium","500"],["sf-icon-medium","500"],["sf-icon--weight-semi-bold","600"],["sf-icon-semi-bold","600"],["sf-icon--weight-bold","700"],["sf-icon-bold","700"]]),o="400",r=new Map([["sf-icon--rounded","rounded"],["sf-icon-rounded","rounded"],["sf-icon--sharp","sharp"],["sf-icon-shape","sharp"]]),a=new Map([["material symbols outlined","outlined"],["material symbols rounded","rounded"],["material symbols sharp","sharp"]]),l=Object.freeze({outlined:{family:"Material Symbols Outlined",file:"MaterialSymbols-Outlined.woff2",format:"woff2",weight:"100 700"},rounded:{family:"Material Icons Round",file:"MaterialIconsRound-Regular.otf",format:"opentype",weight:"400"},sharp:{family:"Material Icons Sharp",file:"MaterialIconsSharp-Regular.otf",format:"opentype",weight:"400"}}),c=(t,e=!1)=>{if(""===t||!0===t)return!0;if(!1===t||null==t)return e;const n=String(t).trim().toLowerCase();return!n||!["0","false","no","off","none"].includes(n)};t.prototype.normalizeIconType=function(t=""){const e=String(t||"").trim().toLowerCase();return e&&"outlined"!==e&&"outline"!==e?"shape"===e?"sharp":"rounded"===e||"sharp"===e?e:"outlined":"outlined"},t.prototype.liftIconSubsetPending=function(){const t=document.documentElement;"subset-pending"===t?.getAttribute("data-sf-icons")&&t.removeAttribute("data-sf-icons")},t.prototype.isIconSubsetEnabled=function(){const t=window.SF_BOOT_CONFIG?.icons?.enabled,e=window.SF_ICON_SUBSET_ENABLED;return"boolean"==typeof t?t:"boolean"!=typeof e||e},t.prototype.getDefaultIconType=function(){return this.normalizeIconType(window.SF_BOOT_CONFIG?.icons?.type||window.SF_ICON_TYPE||"outlined")},t.prototype.getIconManifestStorageKey=function(t=""){const e=this.normalizeIconType(t);return"outlined"===e?this.iconManifestStorageKey:`${this.iconManifestStorageKey}:${e}`},t.prototype.getIconManifestForType=function(t=""){const e=this.normalizeIconType(t);return this.iconSubsetManifests?.get(e)||(this.iconSubsetManifest&&this.getIconManifestType(this.iconSubsetManifest)===e?this.iconSubsetManifest:null)},t.prototype.setIconManifestForType=function(t="",e=null){const n=this.normalizeIconType(t);this.iconSubsetManifests||(this.iconSubsetManifests=new Map),this.iconSubsetHashes||(this.iconSubsetHashes=new Map),e?(this.iconSubsetManifests.set(n,e),this.iconSubsetHashes.set(n,e.hash||e.packet_sha256||"")):(this.iconSubsetManifests.delete(n),this.iconSubsetHashes.delete(n)),n===this.getDefaultIconType()&&(this.iconSubsetManifest=e,this.iconSubsetHash=e?.hash||e?.packet_sha256||"")},t.prototype.getConfiguredIconSubsetConfig=function(){const t=window.SF_BOOT_CONFIG?.icons?.staticSubset||window.SF_ICON_STATIC_SUBSET;if(!t||"object"!=typeof t)return null;const e=Array.from(new Set(i(t.icons||t.icon_names).map(t=>String(t||"").trim()))).filter(Boolean);if(!e.length)return null;const n=new Set(i(t.weights||t.weight).map(t=>String(t).trim())),s=new Set(i(t.fill??t.filled).map(t=>String(t).trim())),o=new Set(i(t.grade).map(t=>String(t).trim())),r=new Set(i(t.optical_size??t.opticalSize??t.opsz).map(t=>String(t).trim())),a=this.normalizeIconType(t.type||this.getDefaultIconType());return{icons:e,weights:n,fills:s,grades:o,opticalSizes:r,types:new Set(i(t.type||a).map(t=>this.normalizeIconType(t))),fill:s.size>0,grade:o.size?[...o].join(","):"",opticalSize:r.size?[...r].join(","):"",defaultType:a}},t.prototype.hasConfiguredIconSubset=function(){return Boolean(this.getConfiguredIconSubsetConfig())},t.prototype.ensureConfiguredIconSubsetState=function(t={}){const e=this.getConfiguredIconSubsetConfig();if(!e)return!1;const{forceLoaded:n=!1}=t;return e.icons.forEach(t=>{const i=this.uniqueIcons.has(t)?this.uniqueIcons.get(t):new Map;e.weights.size&&i.set("weight",new Set(e.weights)),e.fills.size&&i.set("filled",new Set(e.fills)),e.grades.size&&i.set("grade",new Set(e.grades)),e.opticalSizes.size&&i.set("optical-size",new Set(e.opticalSizes)),e.types.size&&i.set("type",new Set(e.types)),n?i.set("loading",!0):!0!==i.get("loading")&&i.set("loading",!1),this.uniqueIcons.set(t,i)}),!0},t.prototype.getManifestAxisValue=function(t={},e=""){if(!t||!e)return"";const n=t.axes||{},i=n[e]||n[e.toLowerCase()]||n[e.toUpperCase()];if(null==i)return"";if("object"==typeof i){if(void 0!==i.value&&null!==i.value)return String(i.value).trim();if(void 0!==i.raw&&null!==i.raw)return String(i.raw).trim()}return String(i).trim()},t.prototype.getManifestAxis=function(t={},e=""){if(!t||!e)return null;const n=t.axes||{};return n[e]||n[e.toLowerCase()]||n[e.toUpperCase()]||null},t.prototype.manifestAxisIncludesValue=function(t={},e="",n=""){const i=String(n??"").trim();if(!i)return!0;const s=this.getManifestAxis(t,e);if(null==s)return!0;if("object"!=typeof s)return String(s).trim()===i;if(void 0!==s.value&&null!==s.value&&String(s.value).trim())return String(s.value).trim()===i;if(Array.isArray(s.values))return s.values.map(t=>String(t).trim()).includes(i);const o=void 0!==s.min&&null!==s.min?Number(s.min):null,r=void 0!==s.max&&null!==s.max?Number(s.max):null,a=Number(i);if(null!==o&&null!==r&&!Number.isNaN(o)&&!Number.isNaN(r)&&!Number.isNaN(a))return a>=o&&a<=r;if(void 0!==s.raw&&null!==s.raw){const t=String(s.raw).trim();return!t||(t.includes(",")?t.split(",").map(t=>t.trim()).includes(i):t===i)}return!0},t.prototype.isIconCoveredByManifest=function(t="",e={}){const n=this.normalizeIconType(e.type||this.getDefaultIconType()),i=this.getIconManifestForType(n);if(!i||"object"!=typeof i)return!1;if(!(Array.isArray(i.icons)?i.icons:[]).includes(t))return!1;return this.getIconManifestType(i)===n&&(!(e.weight&&!this.manifestAxisIncludesValue(i,"wght",e.weight))&&(!!(!e.filled||this.getManifestAxis(i,"FILL")&&this.manifestAxisIncludesValue(i,"FILL",e.filled))&&(!(e.grade&&!this.manifestAxisIncludesValue(i,"GRAD",e.grade))&&!(e["optical-size"]&&!this.manifestAxisIncludesValue(i,"opsz",e["optical-size"])))))},t.prototype.isManifestCoveredByConfiguredSubset=function(t={}){const e=this.getConfiguredIconSubsetConfig();if(!e)return!0;const n=Array.isArray(t.icons)?t.icons:[];if(!e.icons.every(t=>n.includes(t)))return!1;const i=this.getIconManifestType(t);return![...e.types].some(t=>t!==i)&&(![...e.weights].some(e=>!this.manifestAxisIncludesValue(t,"wght",e))&&(![...e.fills].some(e=>!this.getManifestAxis(t,"FILL")||!this.manifestAxisIncludesValue(t,"FILL",e))&&(![...e.grades].some(e=>!this.manifestAxisIncludesValue(t,"GRAD",e))&&![...e.opticalSizes].some(e=>!this.manifestAxisIncludesValue(t,"opsz",e)))))},t.prototype.trackIconDescriptor=function(t="",e={}){if(!this.isIconSubsetEnabled())return 0;if(this.hasConfiguredIconSubset())return 0;const n=String(t||"").trim();if(!n)return 0;const i=this.getIconLoadAttrs(e),s=this.getLoadedIconDescriptorKey(n,i);this.iconDescriptorStates||(this.iconDescriptorStates=new Map);if(this.iconDescriptorStates.get(s)||this.loadedIcons.has(s)||this.isIconCoveredByManifest(n,i))return 0;this.iconDescriptorStates.set(s,{attrs:i,icon:n,loading:!1});const o=!this.uniqueIcons.has(n),r=o?new Map:this.uniqueIcons.get(n);let a=!1;return Object.entries(e).forEach(([t,e])=>{if(null==e||""===e)return;const n=String(e).trim();n&&(r.has(t)||(r.set(t,new Set),a=!0),r.get(t).has(n)||(r.get(t).add(n),a=!0))}),this.isIconCoveredByManifest(n,i)?(r.set("loading",!0),this.uniqueIcons.set(n,r),0):o||a?(r.set("loading",!1),this.uniqueIcons.set(n,r),1):0},t.prototype.trackIconPreload=function(t=[]){let e=0;var n;return(n=t,i(n).map(t=>"string"==typeof t?{icon:t.trim(),attrs:{}}:t&&"object"==typeof t?{icon:String(t.icon||t.name||"").trim(),attrs:{weight:t.weight,filled:c(t.filled??t.fill)?"1":void 0,grade:t.grade,"optical-size":t.opticalSize??t["optical-size"],type:t.type}}:null).filter(t=>t?.icon)).forEach(({icon:t,attrs:n})=>{e+=this.trackIconDescriptor(t,{...n,weight:n.weight??o,type:this.normalizeIconType(n.type||this.getDefaultIconType())})}),e},t.prototype.preloadIcons=function(t=[]){if(!this.isIconSubsetEnabled())return 0;const e=this.trackIconPreload(t);return e&&(this.pendingIconScanCount+=e,this.flushPendingIconScan()),e},t.prototype.preloadConfiguredIcons=function(){return this.iconPreloadApplied?0:(this.iconPreloadApplied=!0,this.trackIconPreload(window.SF_BOOT_CONFIG?.icons?.preload??window.SF_ICON_PRELOAD))},t.prototype.getStaticIconDescriptorKey=function(t="",e={}){const n=Object.entries(e).filter(([,t])=>null!=t&&""!==t).map(([t,e])=>[t,String(e).trim()]).sort(([t],[e])=>t.localeCompare(e));return JSON.stringify([String(t||"").trim(),n])},t.prototype.getIconLoadAttrs=function(t={}){const e={};return["weight","filled","grade","optical-size","type"].forEach(n=>{const i=t?.[n];null!=i&&""!==i&&(e[n]=String(i).trim())}),e.weight||(e.weight=o),e.type||(e.type=this.getDefaultIconType()),e},t.prototype.getLoadedIconDescriptorKey=function(t="",e={}){return this.getStaticIconDescriptorKey(t,this.getIconLoadAttrs(e))},t.prototype.getLoadedDescriptorKeysForIconState=function(t="",e=new Map){const n=String(t||"").trim();if(!n)return[];const i=e.get("weight"),s=e.get("filled"),r=e.get("grade"),a=e.get("type"),l=i instanceof Set&&i.size?[...i].map(t=>String(t).trim()).filter(Boolean):[o],c=s instanceof Set&&s.size?[...s].map(t=>String(t).trim()).filter(Boolean):[""],d=r instanceof Set&&r.size?[...r].map(t=>String(t).trim()).filter(Boolean):[""],u=a instanceof Set&&a.size?[...a].map(t=>this.normalizeIconType(t)).filter(Boolean):[this.getDefaultIconType()],h=new Set;return l.forEach(t=>{c.forEach(e=>{d.forEach(i=>{u.forEach(s=>{h.add(this.getLoadedIconDescriptorKey(n,{weight:t,filled:e,grade:i,type:s}))})})})}),[...h]},t.prototype.isTrackedIconLoaded=function(t){if(!t?.icon)return!1;const e=this.getIconLoadAttrs(t.attrs);if(this.isIconCoveredByManifest(t.icon,e))return!0;const n=this.getLoadedIconDescriptorKey(t.icon,t.attrs);return this.loadedIcons.has(n)},t.prototype.getStaticIconElement=function(t){const e=t?.nodeType===Node.ELEMENT_NODE?t:t?.parentElement||null,n=e?.classList?.contains("sf-icon")?e:e?.closest?.(".sf-icon")||null;return n&&n.nodeType===Node.ELEMENT_NODE?"sf-icon"===n.tagName?.toLowerCase?.()?null:n.classList?.contains("sf-icon")?n.closest?.("sf-icon")||this.shouldSkipNode(n)?null:n:null:null},t.prototype.isStaticIconLoadedStateCurrent=function(t,e){return!(!t||!e)&&t.classList.contains("sf-icon-loaded")===this.isTrackedIconLoaded(e)},t.prototype.syncTrackedStaticIconElement=function(t,e){if(!t||!e||!this.staticIconDescriptorKeys)return;const n=this.getLoadedIconDescriptorKey(e.icon,e.attrs),i=this.staticIconDescriptorKeys.get(t);return i&&i!==n&&!this.isTrackedIconLoaded(e)&&t.classList.remove("sf-icon-loaded"),this.staticIconDescriptorKeys.set(t,n),i!==n},t.prototype.getTrackedIconAttrs=function(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return null;const e=String(t.getAttribute("icon")||"").trim();if(!e)return null;const n={};if(["weight","size","grade","optical-size","type"].forEach(e=>{const i=t.getAttribute(e);null!=i&&(n[e]=String(i).trim())}),t.hasAttribute("filled")){const e=t.getAttribute("filled");c(e)&&(n.filled="1")}return n.type=this.normalizeIconType(n.type||this.getDefaultIconType()),{icon:e,attrs:n}},t.prototype.getTrackedStaticIconAttrs=function(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return null;if(!t.classList?.contains("sf-icon"))return null;if(t.closest?.("sf-icon"))return null;const e=String(t.getAttribute("data-icon")||t.textContent||"").trim();if(!e)return null;const n={weight:o},i=Array.from(t.classList).find(t=>t.startsWith("sf-icon--size-"));i&&(n.size=i.replace("sf-icon--size-","").trim());for(const[e,i]of s.entries())if(t.classList.contains(e)){n.weight=i;break}for(const[e,i]of r.entries())if(t.classList.contains(e)){n.type=i;break}const a=t.getAttribute("data-weight")||t.getAttribute("weight")||t.style?.getPropertyValue?.("--sf-icon--weight");a&&(n.weight=String(a).trim());const l=String(t.style?.getPropertyValue?.("--sf-icon--fill")||"").trim();(t.classList.contains("sf-icon--filled")||t.classList.contains("sf-icon-filled")||t.hasAttribute("data-filled")&&c(t.getAttribute("data-filled"))||t.hasAttribute("filled")&&c(t.getAttribute("filled"))||""!==l&&c(l,!1))&&(n.filled="1");const d=t.getAttribute("data-type")||t.getAttribute("type")||t.style?.getPropertyValue?.("--sf-icon--type");return d&&(n.type=this.normalizeIconType(d)),{icon:e,attrs:n}},t.prototype.trackIconComponent=function(t){if(!this.isIconSubsetEnabled())return 0;const e=this.getTrackedStaticIconAttrs(t);if(!e)return 0;return!this.syncTrackedStaticIconElement(t,e)&&this.isStaticIconLoadedStateCurrent(t,e)?0:this.trackIconDescriptor(e.icon,e.attrs)},t.prototype.processStaticIconMutation=function(t,e=!0){if(!this.isIconSubsetEnabled())return{handled:!1,iconCount:0};const n=this.getStaticIconElement(t);if(!n)return{handled:!1,iconCount:0};if(!this.getTrackedStaticIconAttrs(n))return this.staticIconDescriptorKeys?.delete?.(n),n.classList.remove("sf-icon-loaded"),{handled:!0,iconCount:0};const i=this.trackIconComponent(n);return e&&i>0?(this.mutate(()=>this.loadFonts()),{handled:!0,iconCount:i}):(this.syncStaticIconLoadedState(n),{handled:!0,iconCount:i})},t.prototype.syncStaticIconLoadedState=function(t=null){if(!this.isIconSubsetEnabled())return;const e=t||document.body;if(!e)return;const n=(t,e)=>{t.classList.contains("sf-icon-loaded")!==e&&(e?t.classList.add("sf-icon-loaded"):t.classList.remove("sf-icon-loaded"))},i=t=>{if(!t||t.nodeType!==Node.ELEMENT_NODE)return;if("sf-icon"===t.tagName?.toLowerCase?.())return;if(t.closest?.("sf-icon"))return;if(!t.classList?.contains("sf-icon"))return;const e=this.getTrackedStaticIconAttrs(t);n(t,!!e&&this.isTrackedIconLoaded(e))};this.isSyncingStaticIconState=!0;try{e.nodeType===Node.ELEMENT_NODE&&i(e),e.querySelectorAll&&e.querySelectorAll(".sf-icon").forEach(i)}finally{this.isSyncingStaticIconState=!1}},t.prototype.scanStaticIcons=function(t=null,e=!0){if(!this.isIconSubsetEnabled())return{iconCount:0};const n=t?.nodeType===Node.ELEMENT_NODE?t:t?.parentElement||document.body;if(!n)return{iconCount:0};if(this.shouldSkipNode(n))return{iconCount:0};if(this.hasConfiguredIconSubset())return this.syncStaticIconLoadedState(n),{iconCount:0};let i=0;const s=t=>{t&&t.nodeType===Node.ELEMENT_NODE&&!this.shouldSkipNode(t)&&(i+=this.trackIconComponent(t))};n.nodeType===Node.ELEMENT_NODE&&s(n),n.querySelectorAll&&n.querySelectorAll(".sf-icon").forEach(s);const o={iconCount:i};return e&&i>0?(this.mutate(()=>this.loadFonts()),o):(this.syncStaticIconLoadedState(n),o)},t.prototype.trackIconElement=function(t){if(!this.isIconSubsetEnabled())return 0;const e=this.getTrackedIconAttrs(t);return e?this.trackIconDescriptor(e.icon,e.attrs):0},t.prototype.trackPendingIconScan=function(t={}){if(!this.isIconSubsetEnabled())return 0;const e=Number(t.iconCount||0);return e>0&&(this.pendingIconScanCount+=e),e},t.prototype.markManifestIconsAsLoaded=function(t={}){if(!t||"object"!=typeof t)return!1;const e=Array.isArray(t.icons)?t.icons:[];if(!e.length)return!1;const n=new Set(this.loadedIcons),i=this.getIconManifestType(t),s=this.getManifestAxis(t,"wght"),o=this.getManifestAxis(t,"FILL"),r=Array.isArray(s?.values)?s.values:s?.value?[s.value]:[400],a=Array.isArray(o?.values)?o.values:o?.value?[o.value]:[""];return e.forEach(t=>{r.forEach(e=>{a.forEach(s=>{n.add(this.getLoadedIconDescriptorKey(t,{weight:e,filled:s,type:i}))})})}),this.loadedIcons=n,!0},t.prototype.flushPendingIconScan=function({defer:t=!1}={}){if(!this.isIconSubsetEnabled())return!1;return!!this.pendingIconScanCount&&(t?(this.pendingIconFlushQueued||(this.pendingIconFlushQueued=!0,this.mutate(()=>{this.pendingIconFlushQueued=!1,this.flushPendingIconScan()})),!1):(this.pendingIconScanCount=0,this.mutate(()=>this.loadFonts()),!0))},t.prototype.handleCustomElementScanResult=function(t={},e=!0){const n={...t,keys:Array.isArray(t.keys)?t.keys:[],count:Number(t.count||0),iconCount:Number(t.iconCount||0)};return e?(n.count>0&&this.mutate(()=>this.getLoader(this.module,!0)),this.isIconSubsetEnabled()&&n.iconCount>0&&this.mutate(()=>this.loadFonts()),n):n},t.prototype.getIconSubsetHost=function(){return window.SF_BOOT_CONFIG?.icons?.subsetHost||window.SF_ICON_SUBSET_HOST||"https://icons.simai.io"},t.prototype.decodeIconManifestHeader=function(t=""){if(!t)return null;try{return JSON.parse((new TextDecoder).decode(Uint8Array.from(atob(t.replace(/-/g,"+").replace(/_/g,"/")),t=>t.charCodeAt(0))))}catch(t){return console.warn("SFLoader icon manifest decode failed",t),null}},t.prototype.getStoredIconManifest=function(t=""){const e=d().getItem(this.getIconManifestStorageKey(t));if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(t){return console.warn("SFLoader icon manifest cache parse failed",t),null}},t.prototype.getIconManifestFontFamily=function(t={}){return t.font_family?String(t.font_family):`${("sf.icon_subset.v1"===t.schema?l[this.getIconManifestType(t)]?.family:t.family)||"Material Symbols Outlined"} Subset`},t.prototype.getIconManifestType=function(t={}){const e=String(t.type||("sf.icon_subset.v1"===t.schema?t.family:"")||"").trim().toLowerCase();if(e)return this.normalizeIconType(e);const n=String(t.family||"").trim().toLowerCase();return this.normalizeIconType(a.get(n)||"outlined")},t.prototype.getIconSubsetSelector=function(t={}){const e=this.getIconManifestType(t);return"rounded"===e?".sf-icon:is(.sf-icon--rounded, .sf-icon-rounded)":"sharp"===e?".sf-icon:is(.sf-icon--sharp, .sf-icon-shape)":".sf-icon:not(.sf-icon--rounded):not(.sf-icon-rounded):not(.sf-icon--sharp):not(.sf-icon-shape)"},t.prototype.getIconFallbackFontUrl=function(t=""){const e=window.SF_BOOT_CONFIG?.icons?.fallbackFonts||window.SF_ICON_FALLBACK_FONTS||{},n=this.normalizeIconType(t),i=e[n]||e.outlined||window.SF_BOOT_CONFIG?.icons?.fallbackFontUrl||window.SF_ICON_FALLBACK_FONT_URL;if(i)return i;const s=l[n]?.file,o=String(window.sfPath||"").replace(/\/+$/,"");return s&&o?`${o}/component/icons/fonts/${s}`:""},t.prototype.buildIconFallbackCss=function(t={}){const e=this.normalizeIconType(t.type||this.getDefaultIconType()),n=this.getIconFallbackFontUrl(e),i=l[e];if(!n||!i)return"";const s=this.getIconSubsetSelector({type:e,family:i.family});return`@font-face {\n font-family: '${i.family}';\n src: url('${n}') format('${i.format}');\n font-style: normal;\n font-weight: ${i.weight};\n font-display: block;\n}\n\n${s} {\n --sf-icon--font-family: '${i.family}';\n font-family: '${i.family}';\n font-feature-settings: 'liga';\n font-variation-settings: 'FILL' var(--sf-icon--fill, 0), 'wght' var(--sf-icon--weight, 400), 'GRAD' var(--sf-icon--grade, 0), 'opsz' var(--sf-icon--optical-size, 24);\n}\n`},t.prototype.applyIconFontFallback=function(t={}){const e=Array.isArray(t.icons)?t.icons:[],n=this.normalizeIconType(t.type||this.getDefaultIconType()),i=document.querySelector(`style[data-sf-icons-fallback="${n}"]`),s=document.createElement("style");if(s.setAttribute("data-sf-icons-fallback",n),e.length&&s.setAttribute("data-sf-icons-fallback-icons",e.join(",")),s.textContent=this.buildIconFallbackCss({type:n}),!s.textContent)return!1;document.head.appendChild(s),i&&i.remove();const o=new Set(this.loadedIcons);e.forEach(t=>{const e=this.uniqueIcons.has(t)?this.uniqueIcons.get(t):new Map;e.set("loading",!0),this.uniqueIcons.set(t,e),this.getLoadedDescriptorKeysForIconState(t,e).forEach(t=>o.add(t))}),this.loadedIcons=o,this.iconSubsetPending=!1,this.iconSubsetReady=!0,this.iconFontReady=!0,this.liftIconSubsetPending(),document.body?.classList?.add("sf-icons-loaded"),this.syncStaticIconLoadedState();const r=`fallback:${n}`;return this.iconSubsetWarnings?.has(r)||(this.iconSubsetWarnings?.add(r),console.warn("SFLoader icon subset font fallback applied",{type:n,icons:e,reason:t.reason||null,url:this.getIconFallbackFontUrl(n)})),window.dispatchEvent(new CustomEvent("sf-icons-subset:ready",{detail:{icons:new Set(e),weights:[],loader:this,fallback:!0}})),!0},t.prototype.buildIconSubsetCssFromManifest=function(t={}){const e=Array.isArray(t.fonts)?t.fonts:[];if(!e.length)return{cssText:"",family:"",weights:[]};const n=this.getIconManifestFontFamily(t),i=this.getIconSubsetSelector(t),s=new Set,o=e.filter(t=>t?.url).map(e=>{const i=e.weight||t.axes?.wght?.value||400;return s.add(String(i)),`@font-face {\n font-family: '${n}';\n src: url('${e.url}') format('woff2');\n font-style: normal;\n font-weight: ${i};\n font-display: block;\n}\n`}).join("\n");if(!o)return{cssText:"",family:n,weights:[...s]};return{cssText:o+"\n"+`${i} {\n`+` --sf-icon--font-family: '${n}';\n --sf-icon--font--weight: var(--sf-icon--weight, 400);\n font-feature-settings: 'liga';\n font-variation-settings: 'FILL' var(--sf-icon--fill, 0), 'wght' var(--sf-icon--weight, 400), 'GRAD' var(--sf-icon--grade, 0), 'opsz' var(--sf-icon--optical-size, 24);\n}\n`,weights:[...s]}},t.prototype.applyIconManifest=function(t={},e={}){if(!this.isIconSubsetEnabled())return!1;if(!t||"object"!=typeof t)return!1;const{cssText:i,weights:s}=this.buildIconSubsetCssFromManifest(t),o=e.cssText||i;if(!o)return!1;const r=Array.isArray(t.icons)?t.icons:[],a=this.getIconManifestType(t),l=document.querySelector(`style[data-sf-icons-subset-family="${a}"]`),c=document.createElement("style");c.setAttribute("data-sf-icons-subset",r.join(",")),c.setAttribute("data-sf-icons-subset-family",a),t.hash&&c.setAttribute("data-sf-icons-subset-hash",t.hash),c.textContent=o,this.setIconManifestForType(a,t),this.markManifestIconsAsLoaded(t),this.iconSubsetPending=!0,this.iconSubsetReady=!1,document.head.appendChild(c);const d=Array.isArray(t.fonts)&&t.fonts.length?this.verifyIconManifestFonts(t,{icons:r,weights:s}):this.verifyIconCssFonts(o,{icons:r});return this.iconSubsetPromise=d.then(async()=>{this.ensureConfiguredIconSubsetState({forceLoaded:!0}),r.forEach(t=>{const e=this.uniqueIcons.has(t)?this.uniqueIcons.get(t):new Map;!1===e.get("loading")||e.set("loading",!0),s.length&&(e.has("weight")||e.set("weight",new Set),s.forEach(t=>{e.get("weight").add(String(t))})),this.uniqueIcons.set(t,e)});const t=new Set(this.loadedIcons);r.forEach(e=>{const n=this.uniqueIcons.get(e);this.getLoadedDescriptorKeysForIconState(e,n).forEach(e=>t.add(e))}),this.loadedIcons=t,this.iconSubsetPending=!1,this.iconSubsetReady=!0,this.liftIconSubsetPending(),await new Promise(t=>requestAnimationFrame(t)),await new Promise(t=>requestAnimationFrame(t)),l&&l.remove(),window.dispatchEvent(new CustomEvent("sf-icons-subset:ready",{detail:{icons:new Set(r),weights:s,loader:this,fromCache:!!e.fromCache}})),this.syncStaticIconLoadedState()}).catch(i=>{this.iconSubsetPending=!1,this.iconSubsetReady=!1,this.setIconManifestForType(a,null),c.remove(),n?.(this.getIconManifestStorageKey(a)),console.warn("SFLoader cached icon manifest failed",i),this.applyIconFontFallback({icons:r,type:this.getIconManifestType(t),reason:i}),e.fromCache||this.loadFonts()}).finally(()=>{const t=this.iconSubsetNeedsReload;this.iconSubsetNeedsReload=!1,this.iconSubsetPromise=null,t&&this.loadFonts()}),!0},t.prototype.verifyIconManifestFonts=async function(t={},e={}){if(!this.isIconSubsetEnabled())return!1;const n=e.icons||(Array.isArray(t.icons)?t.icons:[]),i=Array.isArray(t.fonts)?t.fonts:[];if(!n.length||!i.length)throw new Error("Icon manifest has no icons or fonts");if(!document.fonts?.load)return!0;const s=this.getIconManifestFontFamily(t),r=n.join(" ");await new Promise(t=>requestAnimationFrame(t));if(!(await Promise.all(i.map(e=>{const n=m(e.weight||t.axes?.wght?.value||o);return document.fonts.load(`${n} 16px "${s}"`,r)}))).reduce((t,e)=>t+e.length,0))throw new Error("Icon manifest fonts were not loaded");return document.fonts.ready&&await document.fonts.ready,!0},t.prototype.extractIconFontFacesFromCss=function(t=""){const e=[];return(String(t||"").match(/@font-face\s*{[^}]*}/gim)||[]).forEach(t=>{const n=t.match(/font-family\s*:\s*['"]?([^;'"}]+)['"]?/i),i=t.match(/font-weight\s*:\s*([^;]+)/i),s=n?.[1]?.trim();s&&e.push({family:s,weight:i?.[1]?.trim()||o})}),e},t.prototype.extractIconFontFaceCss=function(t=""){return(String(t||"").match(/@font-face\s*{[^}]*}/gim)||[]).join("\n")},t.prototype.verifyIconCssFonts=async function(t="",e={}){if(!this.isIconSubsetEnabled())return!1;if(!document.fonts?.load)return!0;const n=e.icons||[],i=Array.isArray(n)?n.join(" "):String(n||""),s=this.extractIconFontFacesFromCss(t);if(!s.length||!i)return!0;await new Promise(t=>requestAnimationFrame(t));if(!(await Promise.all(s.map(({family:t,weight:e})=>document.fonts.load(`${m(e)} 16px "${t}"`,i)))).reduce((t,e)=>t+e.length,0))throw new Error("Icon subset CSS fonts were not loaded");return document.fonts.ready&&await document.fonts.ready,!0},t.prototype.restoreIconManifestFromCache=function(){if(!this.isIconSubsetEnabled())return!1;const t=this.getIconSubsetRequestConfig().defaultType,e=this.getStoredIconManifest(t);if(!e)return!1;return this.getIconManifestType(e)===t&&this.isManifestCoveredByConfiguredSubset(e)?this.applyIconManifest(e,{fromCache:!0}):(n?.(this.getIconManifestStorageKey(t)),this.setIconManifestForType(t,null),!1)},t.prototype.getIconSubsetRequestConfig=function(){const t=!0===window.SF_BOOT_CONFIG?.icons?.accumulate;if(!this.isIconSubsetEnabled())return{icons:[],weights:new Set,fill:!1,types:new Set,defaultType:this.getDefaultIconType(),accumulate:t};const e=this.getConfiguredIconSubsetConfig();if(e)return this.ensureConfiguredIconSubsetState(),{icons:e.icons,weights:e.weights,fill:e.fill,grade:e.grade,opticalSize:e.opticalSize,types:e.types,defaultType:e.defaultType,accumulate:t};const n=[...this.uniqueIcons.keys()],i=new Set,s=new Set;let o=!1;const r=new Set,a=new Set,l=this.getDefaultIconType();return this.uniqueIcons.forEach(t=>{const e=t.get("weight"),n=t.get("filled"),c=t.get("grade"),d=t.get("optical-size"),u=t.get("type");if(n&&(o=!0),u){(u instanceof Set||Array.isArray(u)?u:[u]).forEach(t=>{const e=this.normalizeIconType(t);e!==l&&s.add(e)})}if(!e)return c instanceof Set||Array.isArray(c)?c.forEach(t=>r.add(String(t))):c&&r.add(String(c)),void(d instanceof Set||Array.isArray(d)?d.forEach(t=>a.add(String(t))):d&&a.add(String(d)));e instanceof Set||Array.isArray(e)?e.forEach(t=>i.add(String(t))):i.add(String(e)),c instanceof Set||Array.isArray(c)?c.forEach(t=>r.add(String(t))):c&&r.add(String(c)),d instanceof Set||Array.isArray(d)?d.forEach(t=>a.add(String(t))):d&&a.add(String(d))}),{icons:n,weights:i,fill:o,grade:r.size?[...r].join(","):"",opticalSize:a.size?[...a].join(","):"",types:s,defaultType:l,accumulate:t}},t.prototype.bootstrapConfiguredIconSubset=function(){return!!this.isIconSubsetEnabled()&&(!!this.hasConfiguredIconSubset()&&(this.ensureConfiguredIconSubsetState(),this.iconSubsetPending||this.iconSubsetReady||this.iconSubsetPromise||this.mutate(()=>this.loadFonts()),!0))},t.prototype.getIconSubsetRequestConfigs=function(){const t=this.getIconSubsetRequestConfig(),e=new Map,n=n=>{const i=this.normalizeIconType(n);return e.has(i)||e.set(i,{accumulate:t.accumulate,defaultType:i,fill:!1,grade:new Set,opticalSize:new Set,icons:new Set,weights:new Set}),e.get(i)};if(this.uniqueIcons.forEach((e,i)=>{const s=e.get("type"),o=s instanceof Set||Array.isArray(s)?[...s]:[s||t.defaultType],r=e.get("weight"),a=r instanceof Set||Array.isArray(r)?[...r]:r?[r]:[],l=e.get("grade"),c=l instanceof Set||Array.isArray(l)?[...l]:l?[l]:[],d=e.get("optical-size"),u=d instanceof Set||Array.isArray(d)?[...d]:d?[d]:[];o.forEach(t=>{const s=n(t);s.icons.add(i),a.forEach(t=>s.weights.add(String(t))),c.forEach(t=>s.grade.add(String(t))),u.forEach(t=>s.opticalSize.add(String(t))),e.get("filled")&&(s.fill=!0)})}),!e.size&&t.icons.length){(t.types?.size?[...t.types]:[t.defaultType]).forEach(e=>{const i=n(e);t.icons.forEach(t=>i.icons.add(t)),t.weights.forEach(t=>i.weights.add(t)),String(t.grade||"").split(",").filter(Boolean).forEach(t=>i.grade.add(t)),String(t.opticalSize||"").split(",").filter(Boolean).forEach(t=>i.opticalSize.add(t)),i.fill=t.fill})}return[...e.values()].map(t=>({...t,grade:[...t.grade].sort().join(","),opticalSize:[...t.opticalSize].sort().join(","),icons:[...t.icons].sort()})).sort((t,e)=>t.defaultType.localeCompare(e.defaultType))},t.prototype.loadIconSubsetFamily=async function(t){const{defaultType:i,icons:s}=t;if(!s.length)return!1;const o=this.getIconSubsetHost(),r=new URLSearchParams({icon_names:s.join(","),type:i});t.weights.size&&r.set("weight",[...t.weights].sort().join(",")),t.fill&&r.set("fill","1"),t.grade&&r.set("grade",t.grade),t.opticalSize&&r.set("optical_size",t.opticalSize),t.accumulate&&r.set("accumulate","true");let a=null,l=null;try{const t=await fetch(`${o}/ms/css?${r.toString()}`,{cache:"reload"});if(!t.ok)throw new Error(`HTTP ${t.status}`);a=this.decodeIconManifestHeader(t.headers.get("X-SIMAI-Font-Manifest"));const n=await t.text(),c=a?this.getIconManifestType(a):i;if(a&&c!==i)throw new Error(`Icon subset family mismatch: requested ${i}, received ${c}`);const d=document.querySelector(`style[data-sf-icons-subset-family="${i}"]`),u=document.createElement("style");return u.setAttribute("data-sf-icons-subset",s.join(",")),u.setAttribute("data-sf-icons-subset-family",i),u.textContent=n,document.head.appendChild(u),l=u,a?(e?.(this.getIconManifestStorageKey(i),JSON.stringify(a)),this.setIconManifestForType(i,a),this.markManifestIconsAsLoaded(a),Array.isArray(a.fonts)&&a.fonts.length?await this.verifyIconManifestFonts(a,{icons:s}):await this.verifyIconCssFonts(n,{icons:s})):await this.verifyIconCssFonts(n,{icons:s}),document.fonts?.ready&&await document.fonts.ready,this.liftIconSubsetPending(),await new Promise(t=>requestAnimationFrame(t)),await new Promise(t=>requestAnimationFrame(t)),d?.remove?.(),!0}catch(t){return l?.remove?.(),this.setIconManifestForType(i,null),n?.(this.getIconManifestStorageKey(i)),this.applyIconFontFallback({icons:s,reason:t,type:i})}},t.prototype.loadFonts=async function(){if(!this.isIconSubsetEnabled())return!1;if(!1===this.eventSend&&!this.iconFirstRequestReleased)return this.iconFirstRequestHeld||(this.iconFirstRequestHeld=new Promise(t=>{let e=0;const n=()=>{window.removeEventListener("sf-loader-ready",n),clearTimeout(e),requestAnimationFrame(()=>setTimeout(t,0))};e=setTimeout(n,2500),window.addEventListener("sf-loader-ready",n)}).then(()=>(this.iconFirstRequestReleased=!0,this.iconFirstRequestHeld=null,this.loadFonts()))),this.iconFirstRequestHeld;if(this.ensureConfiguredIconSubsetState(),this.preloadConfiguredIcons(),this.iconSubsetPending&&this.iconSubsetPromise)return this.iconSubsetNeedsReload=!0,this.iconSubsetPromise;const t=Array.from(this.uniqueIcons).filter(([,t])=>!1===t.get("loading")),e=Array.from(this.iconDescriptorStates||new Map).filter(([,t])=>!1===t.loading);if(!t.length&&!e.length)return this.iconSubsetPromise||!1;t.forEach(([,t])=>t.set("loading",!0)),e.forEach(([,t])=>{t.loading=!0}),this.iconSubsetPending=!0,this.iconSubsetReady=!1;const n=this.getIconSubsetRequestConfigs();return this.iconSubsetPromise=Promise.all(n.map(t=>this.loadIconSubsetFamily(t))).then(i=>{const s=new Set(this.loadedIcons);return e.length?e.forEach(([t])=>s.add(t)):t.forEach(([t,e])=>{this.getLoadedDescriptorKeysForIconState(t,e).forEach(t=>s.add(t))}),this.loadedIcons=s,this.iconSubsetPending=!1,this.iconSubsetReady=i.every(Boolean),window.dispatchEvent?.(new CustomEvent("sf-icons-subset:ready",{detail:{icons:new Set([...t.map(([t])=>t),...e.map(([,t])=>t.icon)]),loader:this,types:n.map(t=>t.defaultType)}})),this.syncStaticIconLoadedState(),this.iconSubsetReady}).finally(()=>{const t=this.iconSubsetNeedsReload;this.iconSubsetNeedsReload=!1,this.iconSubsetPromise=null,t&&this.loadFonts()}),this.iconSubsetPromise}}(pt,{safeSetItem:St,safeRemoveItem:bt}),pt.prototype.setModule=function(t=!1){t&&(this.module[t]=t)},pt.prototype.getModuleArray=function(){const t=[];if(this.module)for(const e in this.module)t.push(e);return t},pt.prototype.getObjectArray=function(t){const e=[];if(t)for(const n in t)e.push(n);return e},pt.prototype.runPreloader=function(){if(!this.usePreloader)return!1;const t=document.querySelector(".sf-loader"),e=t&&t.querySelector(".sf-loader-block")&&t.querySelector(".sf-loader-block");if(t&&e)return this.debug("SFLoaderPlugin: reuse boot preloader"),this.preloaderWrap=e,this.preloaderRun=!0,t.setAttribute("data-sf-observer","ignore"),t.classList.remove("hidden"),t.style.opacity="1",e.classList.contains("sf-loader-boot")||this.rotatePreloader(),!0;this.debug("SFLoaderPlugin: preloader is run");const n=this.contentPreloader;this.debug("SFLoaderPlugin: sf-loader is null");const i=document.createElement("div"),s=document.createElement("div");i.classList.add("sf-loader",this.modifierPreloader),i.setAttribute("data-sf-observer","ignore"),i.setAttribute("style",this.tempLoaderStyles),""!==this.backgroundPreloader&&(i.style.background=this.backgroundPreloader),s.classList.add("sf-loader-block"),document.documentElement.style.setProperty("--rotation-angle","0deg"),s.setAttribute("style","display:flex; width: 100%;height: 100%;align-items: center;justify-content: center; transition: .2s all ease-in-out;"),s.innerHTML=n,i.append(s),document.body.append(i),this.preloaderWrap=s,this.rotatePreloader(),this.preloaderRun=!0},pt.prototype.rotatePreloader=function(){(0,y.VE)(this.preloaderWrap,()=>this.preloaderRun,this.preloader)},pt.prototype.stopAnimation=function(){clearInterval(this.arrowInterval),this.preloaderWrap&&(0,y.$Y)(this.preloaderWrap)},pt.prototype.stopPreloader=function(){if(!!!document.querySelector(".sf-loader")&&!this.preloaderRun)return;document.body.style.opacity="1",this.preloaderRun=!1,window.SF_BOOT_CONFIG?.preloader&&(window.SF_BOOT_CONFIG.preloader.preloaderActive=!1),this.debug("SFLoaderPlugin: Stop preloader"),this.stopAnimation();document.querySelectorAll(".sf-loader").forEach(t=>{t.classList.add("hidden")})},pt.prototype.dispatchReadyOnce=function(){if(this.eventSend)return!1;const t=window.SF?.__internal?.runtimeLoading;if(t&&!window.SF.__internal.runtimeSettled)return this.readyWaitsForRuntime||(this.readyWaitsForRuntime=!0,t.catch(()=>null).then(()=>new Promise(t=>setTimeout(t,0))).then(()=>{this.readyWaitsForRuntime=!1,this.dispatchReadyOnce()})),!1;try{return window.dispatchEvent(new CustomEvent("sf-loader-ready",{detail:{message:"All components loaded.",timestamp:Date.now()}})),this.eventSend=!0,this.prefetchLazyRelations(),!0}catch(t){return console.warn("sf-loader-ready dispatch failed",t),!1}},pt.prototype.getAssets=function(t){this.plugins=document.querySelectorAll("[sf-asset]");const e=[];if(this.plugins.length>0)return this.plugins.forEach(n=>{const i=n.getAttribute("sf-asset");t&&this.debug("SFLoaderPlugin: searchAttr is run!"),this.setModule(i),e.push(i)}),e},pt.prototype.searchAttr=function(){this.plugins=document.querySelectorAll("[sf-asset]"),this.debug(`this.plugins.length: ${this.plugins.length}`),this.plugins.length>0&&this.plugins.forEach(t=>{const e=t.getAttribute("sf-asset");this.setModule(e)})},pt.prototype.getPluginName=function(t){if("string"==typeof t){if(""!==t.split(this.delimiterURL).pop())return t.split(this.delimiterURL).pop();{const e=t.split(this.delimiterURL);return e[e.length-2]}}return!1},pt.prototype.setCookie=function(t,e,n=30){const i=new Date;i.setTime(i.getTime()+86400*n*1e3);try{return document.cookie=t+"="+encodeURIComponent(e)+(null==n?"":"; expires="+i.toUTCString())+"; path=/",!0}catch{return!1}},pt.prototype.getCookie=function(t){let e="";try{e=document.cookie}catch{return""}if(e.length>0){let n=e.indexOf(t+"=");if(-1!==n){n=n+t.length+1;let i=e.indexOf(";",n);return-1===i&&(i=e.length),encodeURI(e.substring(n,i))}}return""},pt.prototype.checkCookie=function(t){return null!=(t=this.module[t])&&""!==t},pt.prototype.getApartCookie=function(t){let e="";try{e=document.cookie}catch{e=""}if(e.length>0){let n=e.indexOf(t+"=");if(-1!==n){n=n+t.length+1;let i=e.indexOf(";",n);return-1===i&&(i=e.length),encodeURI(e.substring(n,i)).split(",")}}return[]},pt.prototype.isExistPluginCookie=function(t){const e=this.getApartCookie("SF_LOADER");if(e.length>0)for(let n=0;n<e.length;n++)if(e[n]===t)return!0;return!1},pt.prototype.getFakeTemplates=async function(){return null},pt.prototype.checkEventsPlugins=function(t){-1===this.eventsPlugins.indexOf(t)&&this.eventsPlugins.push(t)},pt.prototype.checkFake=async function(){return null},pt.prototype.setLocalStorage=function(t,e){const n=JSON.stringify({templates:t,cache:e});St(`SF_SMART_LIST-${this.urlHash}`,s(n))},pt.prototype.setCacheContent=async function(t,e){return this.setLocalStorage(t,e),!0},pt.prototype.isLoaded=function(t,e){for(const n of[t,wt(t)]){if(!n)continue;const t="style"===e?`link[href*="${n}"]`:`script[src*="${n}"]`;if(null!==document.querySelector(t))return!0}return!1},pt.prototype.excludedTags=function(t){return-1===["script","style","yamap","head","meta","link"].indexOf(t)};const Et='[data-sf-observer="ignore"]';pt.prototype.createFilteredElementWalker=function(t){return document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>this.shouldSkipOwnNode(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT})},pt.prototype.shouldSkipOwnNode=function(t){return!t?.tagName||(!!t.matches?.(Et)||!this.excludedTags(t.tagName.toLowerCase()))},pt.prototype.shouldSkipNode=function(t){if(!t)return!0;const e=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement||null;if(!e||!e.tagName)return!0;if(t.nodeType===Node.COMMENT_NODE&&t.nodeValue?.startsWith("sf-shortcode "))return!1;if(e.closest?.(Et))return!0;const n=e.tagName.toLowerCase();return!this.excludedTags(n)},pt.prototype.getRuleRegexSource=function(t){if(!t)return"";const e=t.regex?t.regex:t;return e instanceof RegExp?e.source:"string"==typeof e?e:""},pt.prototype.extractRuleAttributeTargets=function(t){const e=this.getRuleRegexSource(t),n=new Set,i=new Set;if(!e)return{attrs:n,prefixes:i};(t instanceof RegExp||"string"==typeof t||/class|\\b|\\s|\(\?:\^\|\\s\)|sf-|[a-z0-9_-]+:/i.test(e))&&n.add("class");return(e.match(/data-[a-z0-9_]+(?:-[a-z0-9_]+)*/gi)||[]).forEach(t=>{const s=t.toLowerCase();n.add(s),e.includes(`${t}-`)&&i.add(`${s}-`)}),["id","href","src","type","name","role","for"].forEach(t=>{new RegExp(`(^|[^a-z0-9_-])${t}([^a-z0-9_-]|$)`,"i").test(e)&&n.add(t)}),{attrs:n,prefixes:i}},pt.prototype.extractRuleClassHints=function(t){const e=this.getRuleRegexSource(t).replace(/\\b/g," ").replace(/\\:/g,":").replace(/\\-/g,"-");if(!e)return[];const n=new Set,i=e.matchAll(/([a-z0-9]+:)?\(\?:([a-z0-9_|:-]+)\)-/gi);for(const t of i){const e=(t[1]||"").toLowerCase();String(t[2]||"").split("|").map(t=>t.trim().toLowerCase()).filter(Boolean).forEach(t=>{n.add(`${e}${t}-`)})}(e.match(/[a-z][a-z0-9_:-]{2,}/gi)||[]).forEach(t=>{const e=t.toLowerCase();["class","data","regex","true","false","component","default"].includes(e)||n.add(e)});return(e.match(/[a-z0-9]+(?::)?-/gi)||[]).forEach(t=>n.add(t.toLowerCase())),[...n].filter(t=>t.length>1)},pt.prototype.doesClassRuleMatchHints=function(t,e=""){const n=t.classHints||[];if(!n.length)return!0;const i=` ${String(e).toLowerCase()} `,s=String(e).toLowerCase().split(/\s+/).filter(Boolean);return n.some(t=>t.endsWith("-")||t.endsWith(":")?s.some(e=>e.startsWith(t)):i.includes(` ${t} `)||s.some(e=>e.startsWith(`${t}-`)))},pt.prototype.shouldUseClassFallbackRule=function(t){const e=this.getRuleRegexSource(t);return!!e&&/\\b|\\s|\(\?:|\||\[[^\]]|\^|\$|\(\?=|\(\?!/.test(e)},pt.prototype.getAttributeRuleIndex=function(){if(this.attributeRuleIndex)return this.attributeRuleIndex;const t=new Map,e=new Map,n=[],i=[],s=[],o=[];return Object.entries(this.findPlugins||{}).forEach(([r,a])=>{if(!(a instanceof RegExp||"string"==typeof a||a&&"object"==typeof a&&a.regex)||this.module[r])return;const l={key:r,rule:a,classHints:this.extractRuleClassHints(a)},{attrs:c,prefixes:d}=this.extractRuleAttributeTargets(a),u=c.has("class")&&this.shouldUseClassFallbackRule(a);c.size||d.size?(c.forEach(s=>{if(t.has(s)||t.set(s,[]),t.get(s).push(l),"class"===s){if(u)return void i.push(l);l.classHints.forEach(t=>{t.endsWith("-")||t.endsWith(":")?n.push({prefix:t,indexedRule:l}):(e.has(t)||e.set(t,[]),e.get(t).push(l))})}}),d.forEach(t=>{s.push({prefix:t,indexedRule:l})})):o.push(l)}),this.attributeRuleIndex={byAttr:t,byClassHint:e,classPrefixRules:n,classFallback:i,prefixRules:s,fallback:o},this.attributeRuleIndex},pt.prototype.clearAttributeRuleIndex=function(){this.attributeRuleIndex=null},pt.prototype.shouldRuleUseRegexpScan=function(t){if(!t)return!1;if(t.tags)return!1;const e=this.getRuleRegexSource(t);return!!e&&(!!/data-[a-z0-9_]+(?:-[a-z0-9_]+)*/i.test(e)||!!/</.test(e))},pt.prototype.getRegexpScanRules=function(){return this.regexpScanRules||(this.regexpScanRules=Object.entries(SF.RuleLoader||{}).filter(([,t])=>this.shouldRuleUseRegexpScan(t))),this.regexpScanRules.filter(([t])=>!this.module[t])},pt.prototype.clearRegexpScanRules=function(){this.regexpScanRules=null},pt.prototype.doesRuleMatchAttributes=function(t,e,n=""){const i=t?.regex?t.regex:t,s=i instanceof RegExp?i:new RegExp(i,i?.flags||""),o=t=>((s.global||s.sticky)&&(s.lastIndex=0),s.test(t));return!!o(e)||String(n).split(/\s+/).filter(Boolean).some(t=>o(t))},pt.prototype.hasRelevantRuleAttributes=function(t){if(!t||!t.getAttributeNames)return!1;const e=this.getAttributeRuleIndex(),n=t.getAttributeNames();for(let i=0;i<n.length;i++){const s=n[i].toLowerCase();if("class"===s&&t.getAttribute("class")&&(e.byClassHint.size||e.classPrefixRules.length||e.classFallback.length))return!0;if(e.byAttr.has(s))return!0;if(e.prefixRules.some(({prefix:t})=>s.startsWith(t)))return!0;if(e.fallback.length)return!0}return!1},pt.prototype.getAttributes=function(t){const e=this.profileStart("getAttributes"),n=[],i=[];let s=0;const o=t.classList?.contains("sf-icon");o&&!t.closest?.("sf-icon")&&this.trackIconComponent(t);const r=t.getAttributeNames();if(r.length)for(const e in r){const i=r[e],s=t.getAttribute(i);let o=s;if("class"===i&&s){const e=h(s);e!==s&&(t.setAttribute("class",e),o=e)}n.push(`${i}="${o}"`)}const a=n.join(" "),l=a.length>2048?a.slice(0,2048):a,c={keys:i,count:s};if(!l)return this.attrMatchCache.set(l,c),this.profileEnd(e,{cacheHit:!1,attributeCount:r.length,candidates:0,found:s,tagName:t.tagName?.toLowerCase?.()}),c;if(this.attrMatchCache.has(l)){const n=this.attrMatchCache.get(l);return n.keys.forEach(t=>this.setExistCookie(t)),this.profileEnd(e,{cacheHit:!0,attributeCount:r.length,found:n.count,tagName:t.tagName?.toLowerCase?.()}),n}const d=this.getAttributeRuleIndex(),u=new Map,f=t.getAttribute("class")||"";r.forEach(t=>{const e=t.toLowerCase();if("class"===e){f.toLowerCase().split(/\s+/).filter(Boolean).forEach(t=>{(d.byClassHint.get(t)||[]).forEach(t=>u.set(t.key,t.rule)),d.classPrefixRules.forEach(({prefix:e,indexedRule:n})=>{t.startsWith(e)&&u.set(n.key,n.rule)})}),d.classFallback.forEach(t=>{u.set(t.key,t.rule)})}else{(d.byAttr.get(e)||[]).forEach(t=>u.set(t.key,t.rule))}d.prefixRules.forEach(({prefix:t,indexedRule:n})=>{e.startsWith(t)&&u.set(n.key,n.rule)})}),d.fallback.forEach(t=>{u.set(t.key,t.rule)});for(const[t,e]of u){if(this.module[t])continue;if(!(e instanceof RegExp||"string"==typeof e||e&&"object"==typeof e&&e.regex))continue;this.doesRuleMatchAttributes(e,l,f)&&!this.module[t]&&(i.push(t),s++,this.setExistCookie(t))}return c.count=s,this.attrMatchCache.set(l,c),this.profileEnd(e,{cacheHit:!1,attributeCount:r.length,candidates:u.size,found:s,tagName:t.tagName?.toLowerCase?.()}),c};const It=/^[a-z][a-z0-9]*-[a-z0-9-]*$/;pt.prototype.getCustomElementRules=function(){const t={};return Object.entries(this.findPlugins||{}).forEach(([e,n])=>{n&&"object"==typeof n&&Array.isArray(n.tags)&&n.tags.forEach(i=>{const s=String(i||"").trim().toLowerCase();(function(t,e){return!!t.startsWith("sf-")||Boolean(e?.package)&&It.test(t)})(s,n)&&(t[s]=e)})}),t},pt.prototype.getSmartElementRuleName=function(t){const e=t?.tagName?.toLowerCase?.()||"";return e.includes("-")&&this.getCustomElementRules()[e]||""},pt.prototype.findNearestSmartParent=function(t){let e=t?.parentElement||null;for(;e;){if(this.getSmartElementRuleName(e))return e;e=e.parentElement}return null},pt.prototype.shouldDeferNestedSmartElement=function(t){if(!this.getSmartElementRuleName(t))return!1;const e=this.findNearestSmartParent(t);return!!e&&!0!==e.__sfSourceCaptured},pt.prototype.prepareSmartChildScanEvents=function(){this.smartChildScanEventsBound||(this.smartChildScanEventsBound=!0,document.addEventListener("sf-after-render",t=>{const e=t.target;e instanceof Element&&this.getSmartElementRuleName(e)&&this.scanCustomElements(e,!0)}))},pt.prototype.scanCustomElements=function(t=null,e=!0,{subtree:n=!0}={}){const i=this.profileStart("scanCustomElements"),s=t||document.body;if(!s)return this.profileEnd(i,{skipped:!0,reason:"empty-host"}),{keys:[],count:0};if(s.nodeType===Node.ELEMENT_NODE&&this.shouldSkipNode(s))return this.profileEnd(i,{skipped:!0,reason:"ignored-host"}),{keys:[],count:0};const o=this.getCustomElementRules();if(!Object.keys(o).length)return this.profileEnd(i,{skipped:!0,reason:"empty-tag-rules"}),{keys:[],count:0};const r=[];let a=0,l=0,c=0;const d=(t,e=!1)=>{if(!t||t.nodeType!==Node.ELEMENT_NODE||!e&&this.shouldSkipNode(t))return;c++;const n=t.tagName?.toLowerCase?.();if(!n||!n.includes("-"))return;const i=o[n];"cl-icons"===i&&(l+=this.trackIconElement(t)),!i||this.module[i]||this.shouldDeferNestedSmartElement(t)||(r.push(i),a++,this.setExistCookie(i))};if(s.nodeType===Node.ELEMENT_NODE&&d(s),n){const t=this.createFilteredElementWalker(s);for(;t.nextNode();)d(t.currentNode,!0)}const u=this.handleCustomElementScanResult({keys:r,count:a,iconCount:l},e);return this.profileEnd(i,{scannedNodes:c,found:a,icons:l,autoLoad:e,root:s===document.body?"body":s.tagName?.toLowerCase?.()}),u},pt.prototype.scanAttributes=function(t=null){const e=this.profileStart("scanAttributes"),n=t||document.body;if(!n)return this.profileEnd(e,{skipped:!0,reason:"empty-host"}),{keys:[],count:0};if(n.nodeType===Node.ELEMENT_NODE&&this.shouldSkipNode(n))return this.profileEnd(e,{skipped:!0,reason:"ignored-host"}),{keys:[],count:0};const i=[];let s=0,o=0,r=0;const a=t=>{if(this.shouldSkipNode(t))return;if(!this.hasRelevantRuleAttributes(t))return void r++;o++;const e=this.getAttributes(t);s+=e.count,i.push(...e.keys)};n.nodeType===Node.ELEMENT_NODE&&a(n);const l=this.createFilteredElementWalker(n);for(;l.nextNode();)a(l.currentNode);return s>0&&this.mutate(()=>this.getLoader(this.module,!0)),this.profileEnd(e,{scannedNodes:o,skippedNodes:r,found:s,root:n===document.body?"body":n.tagName?.toLowerCase?.()}),{keys:i,count:s}},pt.prototype.scanDom=function(t=null,e=!0){const n=this.profileStart("scanDom"),i=t||document.body;if(!i)return this.profileEnd(n,{skipped:!0,reason:"empty-host"}),{custom:{keys:[],count:0,iconCount:0},attributes:{keys:[],count:0},icons:{iconCount:0}};if(i.nodeType===Node.ELEMENT_NODE&&this.shouldSkipNode(i))return this.profileEnd(n,{skipped:!0,reason:"ignored-host"}),{custom:{keys:[],count:0,iconCount:0},attributes:{keys:[],count:0},icons:{iconCount:0}};const s=this.getCustomElementRules(),o=[],r=[];let a=0,l=0,c=0,d=0,u=0,h=0,f=0;const p=t=>{if(!t||t.nodeType!==Node.ELEMENT_NODE||this.shouldSkipNode(t))return;u++;const e=t.tagName?.toLowerCase?.();if(e?.includes("-")){const n=s[e];"cl-icons"===n&&(c+=this.trackIconElement(t)),!n||this.module[n]||this.shouldDeferNestedSmartElement(t)||(o.push(n),a++,this.setExistCookie(n))}if(t.classList?.contains("sf-icon")&&!t.closest?.("sf-icon")&&(d+=this.trackIconComponent(t)),this.hasRelevantRuleAttributes(t)){h++;const e=this.getAttributes(t);l+=e.count,r.push(...e.keys)}else f++};i.nodeType===Node.ELEMENT_NODE&&p(i);const g=this.createFilteredElementWalker(i);for(;g.nextNode();)p(g.currentNode);const m=this.handleCustomElementScanResult({keys:o,count:a,iconCount:c},e);l>0&&e&&this.mutate(()=>this.getLoader(this.module,!0)),e&&d>0&&this.mutate(()=>this.loadFonts());const y={custom:m,attributes:{keys:r,count:l},icons:{iconCount:d}};return this.profileEnd(n,{scannedNodes:u,customFound:a,attributeFound:l,customIcons:c,staticIcons:d,attributeScannedNodes:h,attributeSkippedNodes:f,root:i===document.body?"body":i.tagName?.toLowerCase?.()}),y},pt.prototype.getMutationNodeHost=function(t){return t?t.nodeType===Node.ELEMENT_NODE?t:t.parentElement||null:null},pt.prototype.doesMutationRootCoverNode=function(t,e){if(!t||!e)return!1;if(t===e)return!0;const n=this.getMutationNodeHost(t),i=this.getMutationNodeHost(e);return!(!n||!i)&&(t.nodeType===Node.ELEMENT_NODE&&n.contains(i))},pt.prototype.isCoveredByMutationRoots=function(t,e,{self:n=!0}={}){if(!t||!e.size)return!1;if(n&&e.has(t))return!0;let i=t.parentNode;for(;i;){if(e.has(i))return!0;i=i.parentNode}return!1},pt.prototype.collectUniqueAddedMutationRoots=function(t=[]){const e=new Set;for(let n=0;n<t.length;n++){const i=t[n];if(i&&"childList"===i.type&&i.addedNodes?.length)for(let t=0;t<i.addedNodes.length;t++){const n=i.addedNodes[t];n&&!this.shouldSkipNode(n)&&e.add(n)}}return[...e].filter(t=>!this.isCoveredByMutationRoots(t,e,{self:!1}))},pt.prototype.search=function(){const t=[];let e=0;const n=[],i=this,s={utility:{},component:{},smart:{},relation:{}};let o=[],r=null;const a=i=>{if(this.stopObserver)return!1;const o=this.profileStart("MutationObserver.processChanges"),r=this.collectUniqueAddedMutationRoots(i),a=new Set(r);let l=0,c=0;r.forEach(i=>{if(this.shouldSkipNode(i))return;l++,this.findShortCodes(i);const o=this.scanCustomElements(i,!1);if(o.count>0&&(e+=o.count,n.push(...o.keys)),this.trackPendingIconScan(o),this.trackPendingIconScan(this.scanStaticIcons(i,!1)),!i||3===i.nodeType||!i.tagName)return;[i,...i.querySelectorAll("*")].forEach(i=>{if(this.shouldSkipNode(i))return;if(!i.tagName||!this.excludedTags(i.tagName.toLowerCase()))return;const{count:o,keys:r}=this.getAttributes(i,s,t);e+=o,n.push(...r)})});const d=new Set;for(let o=0;o<i.length;o++){const r=i[o];if((!this.isSyncingStaticIconState||"attributes"!==r.type||"class"!==r.attributeName)&&!this.shouldSkipNode(r.target))switch(r.type){case"childList":{const t=this.processStaticIconMutation(r.target,!1);if(t.handled){this.trackPendingIconScan(t);break}break}case"characterData":{const t=this.processStaticIconMutation(r.target,!1);t.handled&&this.trackPendingIconScan(t);break}case"attributes":{if(d.has(r.target)||this.isCoveredByMutationRoots(r.target,a))continue;d.add(r.target),c++;const i=this.processStaticIconMutation(r.target,!1);if(i.handled){this.trackPendingIconScan(i);continue}const o="data-sf-observer"===r.attributeName,l=this.scanCustomElements(r.target,!1,{subtree:o});this.trackPendingIconScan(l),o&&this.trackPendingIconScan(this.scanStaticIcons(r.target,!1));const{count:u,keys:h}=this.getAttributes(r.target,s,t);e+=u,n.push(...h);break}default:console.warn(`action - ${r.type}`)}}const u=e>0;e>0&&(this.mutate(()=>this.getLoader(this.module,!0)),e=0),this.flushPendingIconScan({defer:u}),this.profileEnd(o,{mutations:i.length,addedRoots:r.length,processedAddedRoots:l,processedAttributeTargets:c,newPlugins:n.length,hasModuleLoads:u})};this.flushObservedChanges=()=>{i.observeElements.length&&a(i.observeElements.splice(0))},this.mutationObserver=new MutationObserver(t=>{if(this.stopObserver)return o=[],void clearTimeout(r);const e=t.filter(t=>"characterData"!==t.type||Boolean(this.getStaticIconElement(t.target)));e.length&&(i.searchEnd?(o.push(...e),clearTimeout(r),r=setTimeout(()=>{const t=[...o];o=[],a(t)},100)):i.observeElements.push(...e))});this.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),t.length&&this.getLoader(t)},pt.prototype.setExistCookie=function(t,e=null,n=null){if(t=g(t,f.z,this.findPlugins,this.productionPlanActive),!this.isPluginResolvable(t))return;let i;const s=!(!this.findPlugins[t]||"object"!=typeof this.findPlugins[t])&&this.findPlugins[t],o=this.getPluginName(t+"/");i="attribute"===this.findPlugins[t].type||"component"===this.findPlugins[t].type?"component":"smart"===this.findPlugins[t].type?"smart":"utility",e&&(e[i][t]={});const r="smart"===i?(p[t]||[]).map(t=>({name:t})):[],a=[...s&&Array.isArray(s.relation)?s.relation:[],...r];if(a.length&&this.setRelation(a,t,e),e){if(s)for(const n in s)"regex"!==n&&(e[i][t][n]=s[n]);e[i][t].url=t,e[i][t].name=o}n&&n.push(t),this.setModule(t)},pt.prototype.setRelation=function(t,e,n,i=new Set){Array.isArray(t)&&!i.has(e)&&(i.add(e),t.forEach(t=>{if(!t?.name||!this.isPluginResolvable(t.name))return;if(!0===t.lazy)return void this.lazyRelations.add(t.name);const s=this.findPlugins?.[t.name]||{},o=t.mode||("smart"===s.type?"smart":"component"===s.type||"attribute"===s.type?"component":"utility");if(this.relationPlugins[e]?this.relationPlugins[e].includes(t.name)||this.relationPlugins[e].push(t.name):this.relationPlugins[e]=[t.name],this.pluginListRelation.includes(t.name)||this.pluginListRelation.push(t.name),!this.module[t.name]){if(n){const e=n[o]||n.relation;e[t.name]={},e[t.name].url=t.name,e[t.name].name=t.name}this.setModule(t.name)}Array.isArray(s.relation)&&this.setRelation(s.relation,t.name,n,i)}))},pt.prototype.sortPlugins=function(t,e,n,i){const s=["default","sm","md","lg","xl","xxl","hover","focus","focus-visible","active"];for(const o of s)this.sortPlugin(i[o]||[],o,t,e,n)},pt.prototype.pathPluginJs=function(t,e,n,i){let s;if(e){const e=this.resolveSmartBase(t);if(null===e)return null;globalThis.SF?.loadRuntime?.(),s=`${e}/${t=t.substring(3)}`}else s=`${"component"===i?this.componentPath:this.utilyPath}/${t}`;return`${s}/js/${"component"===i||e?t:n}${this.minified&&("component"===i||e)?".min":""}.js`},pt.prototype.pathPluginCss=function(t,e,n){let i="";switch(e){case"component":i+=this.componentPath;break;case"smart":{const e=this.resolveSmartBase(t);if(null===e)return null;i+=e,t=t.substring(3);break}default:i+=this.utilyPath}return`${i}/${t}/css/${["component","smart"].includes(e)?t:n}${this.minified?".min":""}.css`},pt.prototype.shouldSkipPluginCss=function(t,e={}){const n=SF.RuleLoader?.[t]||{},i=e&&"object"==typeof e?e:{type:e},s=i.type||e,o=n.type||"",r=i.mode||"",a=n.mode||"",l="smart"===s||"smart"===o||"smart"===r||"smart"===a;return!1===i.css||!1===n.css||!!l&&(!0!==i.css&&!0!==n.css)},pt.prototype.loadPlugin=function(t,e,n,i,s){if(this.disableSmart&&("smart"===i||e))return;if(!this.isPluginResolvable(t))return;const o=this.getMissingFileKey(t),r=SF.RuleLoader?.[t],a=void 0===r?.js||i&&!1===i.js||!1===r?.js,l=this.shouldSkipPluginCss(t,i),c=a?null:this.pathPluginJs(t,e,n,i);if(!a&&!this.notFoundFiles[o]||this.notFoundFiles[o]&&!this.notFoundFiles[o].js?(this.pendingLoadPlugins.has(t)||this.pendingLoadPlugins.add(t),this.relationPlugins[t]?this.loadRelationPlugins(t,s,i,n,c,a):this.isRelationPlugin(t,c,e,n,i,a)):a&&(this.relationPlugins[t]?this.loadRelationPlugins(t,s,i,n,c,!0):this.isRelationPlugin(t,null,e,n,i,!0)),!l&&(!this.notFoundFiles[o]||this.notFoundFiles[o]&&(!this.notFoundFiles[o].css||!this.notFoundFiles[o].missingMin))){const e=this.pathPluginCss(t,i,n);"component"!==i&&"smart"!==i||this.checkEventsPlugins(t),this.resolverAll[e]||(this.resolverAll[e]=this.addStyle(`${e}`).then(()=>{this.loadedPlugins[t].css=!0}).catch(()=>{this.addToMissingFiles(t,"css",!1);const n=wt(e);this.resolverAll[n]=this.addStyle(`${n}`).then(()=>{this.loadedPlugins[t].minCss=!0}).catch(e=>{console.warn(e),this.addToMissingFiles(t,"css",!0)})}))}},pt.prototype.loadRelationPlugins=function(t,e,n,i,s,o=!1){if(this.totalRelationsPlugins[t]||(this.totalRelationsPlugins[t]={load:0,total:this.relationPlugins[t].length,canLoad:!1,jsFile:s,skipJs:o,completed:{}},!o&&s&&this.preloadScript(s)),this.totalRelationsPlugins[t].canLoad){if(this.totalRelationsPlugins[t].skipJs||!s)return this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!1,void(this.loadedPlugins[t].ready=!0);"component"!==n&&"smart"!==n||this.checkEventsPlugins(t),this.resolverAll[s]=this.addScript(`${s}`).then(()=>(this.loadedPlugins[t].js=!0,this.awaitPluginAssetsReady(t,"smart"===n,i,n))).catch(e=>{console.warn(e),this.addToMissingFiles(t,"js")})}else this.relationPlugins[t].forEach(s=>{this.loadedPlugins[s]||(this.loadedPlugins[s]={});const o=this.loadedPlugins[s];if(this.pendingLoadPlugins.has(s)||o.ready||o.js||o.css||o.minCss){const e=this.findPlugins?.[s]||{},n="smart"===e.type?"smart":"component"===e.type||"attribute"===e.type?"component":"utility",o="smart"===n,r=`${t}:relation:${s}`;return void(this.resolverAll[r]||(this.resolverAll[r]=this.awaitPluginAssetsReady(s,o,i,n).then(()=>{this.checkToFullRelationLoad(s,t)})))}if(!this.pendingLoadPlugins.has(s)){this.pendingLoadPlugins.add(s);const o=this.findPlugins?.[s]||{},r="smart"===o.type?"smart":"component"===o.type||"attribute"===o.type?"component":"utility",a="smart"===r;if(e[r]?.[s]||o){e[r]||(e[r]={}),e[r][s]||(e[r][s]={name:s,url:s}),this.loadPlugin(s,a,i,r,e);const n=`${t}:relation:${s}`;this.resolverAll[n]||(this.resolverAll[n]=this.awaitPluginAssetsReady(s,a,i,r).then(()=>{this.checkToFullRelationLoad(s,t)}))}else console.warn(`The dependent plugin is in a different category than ${n}, or missing: ${s}`)}})},pt.prototype.awaitPluginAssetsReady=function(t,e,n,i,s=!1,o=!1){this.loadedPlugins[t]||(this.loadedPlugins[t]={});const r=[],a=this.findPlugins?.[t]||{},l=!s&&void 0!==a?.js&&!1!==a.js,c=!e&&!o&&void 0!==a?.css&&!1!==a.css,d=()=>{const e=this.loadedPlugins[t]||{},n=!l||!0===e.js||!0===e.ready,i=!c||!0===e.css||!0===e.minCss||!0===e.ready;return n&&i};if(d())return this.loadedPlugins[t].ready=!0,Promise.resolve();if(l){const s=this.loadedPlugins[t]||{},o=this.pathPluginJs(t,e,n,i);!0!==s.js&&!0!==s.ready&&o&&this.resolverAll[o]&&r.push(this.resolverAll[o])}if(c){const e=this.loadedPlugins[t]||{},s=this.pathPluginCss(t,i,n),o=s.replace(".css",".min.css");!0!==e.css&&!0!==e.minCss&&!0!==e.ready&&this.resolverAll[s]?r.push(this.resolverAll[s]):!0!==e.css&&!0!==e.minCss&&!0!==e.ready&&this.resolverAll[o]&&r.push(this.resolverAll[o])}return r.length||d()||!this.relationPlugins[t]||r.push(new Promise(t=>{let e=0;const n=()=>{d()?t():(e+=1,e<200?setTimeout(n,25):t())};n()})),Promise.all(r).catch(()=>[]).then(()=>{this.loadedPlugins[t].ready=!0})},pt.prototype.waitForResolverIdle=async function(){for(let t=0;t<25;t++){const t=Object.entries(this.resolverAll||{});if(!t.length)return[];const e=t.map(([t])=>t).sort().join("|"),n=await Promise.allSettled(t.map(([,t])=>t));await Promise.resolve(),await Promise.resolve();if(Object.keys(this.resolverAll||{}).sort().join("|")===e)return n}return console.warn("SFLoader waitForResolverIdle reached pass limit",{resolverAll:this.resolverAll,totalRelationsPlugins:this.totalRelationsPlugins}),Promise.allSettled(Object.values(this.resolverAll||{}))},pt.prototype.checkToFullRelationLoad=function(t,e){if(this.totalRelationsPlugins[e]&&(this.totalRelationsPlugins[e].completed||(this.totalRelationsPlugins[e].completed={}),!this.totalRelationsPlugins[e].completed[t]))if(this.totalRelationsPlugins[e]?.canLoad)this.isDebug&&console.warn("Duplicate relation completion",{relationName:t,pluginName:e,state:this.totalRelationsPlugins[e]});else if(this.totalRelationsPlugins[e].completed[t]=!0,this.totalRelationsPlugins[e].load++,this.totalRelationsPlugins[e].load===this.totalRelationsPlugins[e].total&&(this.totalRelationsPlugins[e].canLoad=!0,this.pendingLoadPlugins.has(e))){if(this.totalRelationsPlugins[e].skipJs||!this.totalRelationsPlugins[e].jsFile)return this.loadedPlugins[e]||(this.loadedPlugins[e]={}),this.loadedPlugins[e].js=!1,void(this.loadedPlugins[e].ready=!0);this.resolverAll[this.totalRelationsPlugins[e].jsFile]=this.addScript(`${this.totalRelationsPlugins[e].jsFile}`).then(()=>{this.loadedPlugins[e]||(this.loadedPlugins[e]={}),this.loadedPlugins[e].js=!0}).catch(t=>{console.warn(t),this.addToMissingFiles(e,"js")})}},pt.prototype.isRelationPlugin=function(t,e,n,i,s,o=!1){const r=Object.keys(this.relationPlugins).filter(e=>-1!==this.relationPlugins[e].indexOf(t));if(r.length)r.forEach(r=>{if(!this.totalRelationsPlugins[r]){const t=this.findPlugins?.[r]||{},e="smart"===t.type?"smart":"component"===t.type||"attribute"===t.type?"component":"utility",n="smart"===e;this.totalRelationsPlugins[r]={load:0,total:this.relationPlugins[r]?.length||0,canLoad:!1,jsFile:this.pathPluginJs(r,n,i,e),skipJs:void 0===t?.js||!1===t?.js};const s=this.totalRelationsPlugins[r];!s.skipJs&&s.jsFile&&this.preloadScript(s.jsFile)}if(o||!e){this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!1;const e=`${r}:relation:${t}`;return void(this.resolverAll[e]=Promise.resolve().then(()=>this.awaitPluginAssetsReady(t,n,i,s,!0)).then(()=>{this.checkToFullRelationLoad(t,r)}))}this.resolverAll[e]=this.addScript(`${e}`).then(()=>(this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!0,this.awaitPluginAssetsReady(t,n,i,s).then(()=>{this.checkToFullRelationLoad(t,r)}))).catch(e=>{console.warn(e),this.checkToFullRelationLoad(t,r),this.addToMissingFiles(t,"js")})});else{if(o||!e)return this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!1,void(this.loadedPlugins[t].ready=!0);"component"!==s&&"smart"!==s||this.checkEventsPlugins(t),this.resolverAll[e]=this.addScript(`${e}`).then(()=>{this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!0}).catch(e=>{console.warn(e),this.addToMissingFiles(t,"js")})}},pt.prototype.sortPlugin=function(t,e,n){const i=t?.[n];if(i)for(const s in i){const i="smart"===n;let o="";o=s.includes("/")||"component"===n||i?s:`${s}/${e}`,this.loadedPlugins&&this.loadedPlugins[o]||(this.pendingLoadPlugins.has(o)||(this.pendingLoadPlugins.add(o),this.loadedPlugins[o]||(this.loadedPlugins[o]={}),this.loadPlugin(o,i,e,n,t)))}},pt.prototype.vUseMergeConfigGenerate=function(t){const e=this.profileStart("vUseMergeConfigGenerate"),n=Array.isArray(t)?t.length:0;t=Array.from(new Set([...t]));const i=[],s=[];t=this.splitPluginPoint(t);let o=["base","component","smart","utility"];this.disableSmart&&(o=o.filter(t=>"smart"!==t));for(const e of o)this.sortPlugins(e,s,i,t);this.profileEnd(e,{inputCount:n,types:o.join(","),resolverCount:Object.keys(this.resolverAll||{}).length,pendingLoadPlugins:this.pendingLoadPlugins?.size||0})},pt.prototype.splitPluginPoint=t=>{const e={};return t.forEach(t=>{if(/cl-\S+/.test(t))e.default||(e.default={}),e.default.smart||(e.default.smart={}),e.default.smart[t]=t;else if(t.includes("/")&&!t.includes("component")){const n=t.split("/");"headers"===n[0]||"container"===n[0]?(e[n[1]]||(e[n[1]]={}),e[n[1]].base||(e[n[1]].base={}),e[n[1]].base[n[0]]=n[0]):(e[n[1]]||(e[n[1]]={}),e[n[1]].utility||(e[n[1]].utility={}),e[n[1]].utility[n[0]]=n[0])}else e.default||(e.default={}),e.default.component||(e.default.component={}),e.default.component[t]=t}),e},pt.prototype.checkSmartCache=function(){const t=d().getItem(`SF_SMART_LIST-${this.urlHash}`);if(t)try{this.smartCache=JSON.parse(o(t))}catch(t){return console.warn(t),!1}},pt.prototype.disconnectObservers=function(){this.mutationObserver?.disconnect?.(),clearInterval(this.arrowInterval),this.arrowInterval=null},pt.prototype.checkTurbo=function(){"undefined"!=typeof Turbo&&(this.turboEnabled=!0,document.addEventListener("turbo:before-render",()=>{this.stopPreloader(),this.disconnectObservers?.(),this.searchEnd=!1,this.prepareInit=!1,this.loadPage=!1,this.cachedPlugins=[],this.module={}}),document.addEventListener("turbo:load",()=>{this.urlHash=this.generatePageHash(),this.prepareInit=!1,this.firstLoad=!0,this.prepare()}))},pt.prototype.checkToCacheClean=function(){const t=new URLSearchParams(window.location.search).get("loader_clear");t&&"Y"===t&&this.clearCache()},pt.prototype.sendThemeToPlayground=function(t=null,e=null){if(t||(t=document.querySelector('iframe[src*="play.simai.io/embed.html"]')),!t)return!1;e=e??this.theme,t?.contentWindow?.postMessage({type:"sf-theme",theme:e},"*")},pt.prototype.ensureThemePreferenceListener=function(){if(!this.themeEnabled||this.themeMediaQuery)return this.themeMediaQuery||null;const t=window.matchMedia?.("(prefers-color-scheme: dark)");return t?(this.themeMediaQuery=t,this.themeMediaListener=()=>{"system"===this.themePreference&&this.checkTheme()},"function"==typeof t.addEventListener?t.addEventListener("change",this.themeMediaListener):t.addListener?.(this.themeMediaListener),t):null},pt.prototype.setTheme=function(t){if(!this.themeEnabled)return!1;if(!["system","light","dark"].includes(t))return!1;if("system"===t){try{document.cookie="sf-theme=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; SameSite=Lax"}catch{}this.themeSessionPreference=this.getCookie("sf-theme")?"system":null}else{const e=this.setCookie("sf-theme",t)&&this.getCookie("sf-theme")===t;this.themeSessionPreference=e?null:t}return this.checkTheme(),!0},pt.prototype.changeTheme=function(){return!!this.themeEnabled&&this.setTheme("dark"===this.theme?"light":"dark")},pt.prototype.turboFontCheck=function(t){this.iconFontReady&&t.classList.add("sf-icons-loaded")},pt.prototype.checkTheme=function(t=null){if(!this.themeEnabled)return!1;const e=["theme-dark","theme-light"],n=this.getCookie("sf-theme"),i=this.themeSessionPreference,s=["system","light","dark"].includes(i)?i:["light","dark"].includes(n)?n:"system",o=this.ensureThemePreferenceListener(),r="dark"===s||"system"===s&&o?.matches,a=r?"dark":"light",l=this.theme,c=this.themePreference;return this.theme=a,this.themePreference=s,(t=t||document.documentElement).classList.remove(...e),t.classList.add(r?e[0]:e[1]),this.sendThemeToPlayground(),t!==document.documentElement||a===l&&s===c||window.dispatchEvent(new CustomEvent("sf-theme-change",{detail:{theme:a,preference:s}})),a},pt.prototype.checkForCache=function(){for(let t=0;t<d().length;t++){if(d().key(t).startsWith("SF_PLUGIN_LIST-"))return!1}return!0},pt.prototype.randomId=function(t=8){return Math.random().toString(36).substr(2,t)},pt.prototype.clearCache=function(){for(let t=d().length-1;t>=0;t--){const e=d().key(t);(e.startsWith("SF_PLUGIN_LIST-")||e.startsWith("SF_SMART_LIST-"))&&bt(e)}bt("SF_MISSING_PLUGINS")},pt.prototype.clearAllSfCache=function(){for(let t=d().length-1;t>=0;t--){const e=d().key(t);e&&e.startsWith("SF_")&&bt(e)}},pt.prototype.ensureCacheVersion=function(){const t="SF_CACHE_VERSION",e=d().getItem(t),n=this.cacheVersion;if(!n)return this.clearAllSfCache(),void bt(t);e!==n&&(this.clearAllSfCache(),St(t,n))},pt.prototype.ensurePluginListVersion=function(){const t="SF_PLUGIN_LIST_VERSION",e=d().getItem(t),n=this.pluginListVersion;if(!n)return this.clearCache(),void bt(t);e!==n&&(this.clearCache(),St(t,n))},pt.prototype.revalidateMissingPlugins=function(){try{const t=d().getItem("SF_MISSING_PLUGINS");if(!t)return;const e=JSON.parse(o(t));if(!e||"object"!=typeof e)return;const n={};Object.keys(e).forEach(t=>{if(!t)return;const i=t.indexOf(ht),s=i>0?t.slice(0,i):"",o=i>0?t.slice(i+2):t,r=SF.RuleLoader?.[o];r&&(r.package||"")===s||!s&&this.loadedPlugins[o]||(n[t]=e[t])}),Object.keys(n).length?d().setItem("SF_MISSING_PLUGINS",s(JSON.stringify(n))):d().removeItem("SF_MISSING_PLUGINS")}catch(t){console.warn("revalidateMissingPlugins failed",t)}},pt.prototype.registerComponent=function(t,e){if(this.ComponentRegistry[t])return;e.prototype&&(e.prototype.componentName=t),this.ComponentRegistry[t]=e;const n=t&&t.toLowerCase?t.toLowerCase():t;n&&!this.ComponentRegistry[n]&&(this.ComponentRegistry[n]=e),queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(t+":ready",{detail:e}));try{document.dispatchEvent(new CustomEvent("component:ready",{detail:{name:t}}))}catch(t){console.warn("component:ready dispatch failed",t)}})},pt.prototype.ready=function(t,e){const n=Array.from(new Set([t,t&&t[0]?t[0].toUpperCase()+t.slice(1):t,t&&t.toLowerCase?t.toLowerCase():t].filter(Boolean))),i=()=>{for(const t of n){const n=this.ComponentRegistry[t];if("function"==typeof n)return e(n),!0}return!1};i()||n.forEach(t=>{const e=`${t}:ready`;window.addEventListener(e,()=>{i()},{once:!0})})},pt.prototype.searchRegexp=function(t,e=null){const n=this.profileStart("searchRegexp"),i=this.getRegexpScanRules();if(!i.length)return this.pendingRegex=!1,this.getLoader([]),void this.profileEnd(n,{skipped:!0,reason:"no-regexp-rules"});let s="";e?"string"==typeof e?s=e:e.nodeType?s=this.getObserverFilteredHTML(e):void 0!==e.textContent&&(s=e.textContent):s=document.body?this.getObserverFilteredHTML(document.body):"";const o=this.stripIgnoredBlocks(s);if(!o)return this.pendingRegex=!1,this.getLoader([]),void this.profileEnd(n,{skipped:!0,reason:"empty-body"});const r=o.length>4096?o.slice(0,4096):o;if(this.regexMatchCache.has(r)){const t=this.regexMatchCache.get(r);return t.forEach(t=>this.setExistCookie(t)),this.pendingRegex=!1,this.getLoader([]),void this.profileEnd(n,{cacheHit:!0,bodyLength:r.length,matched:t.length})}const a=[];for(const[t]of i){const e=SF.RuleLoader[t],n=e.regex||e,i=n instanceof RegExp?n:new RegExp(n,n.flags||"");(i.global||i.sticky)&&(i.lastIndex=0),i.test(r)&&(a.push(t),this.setExistCookie(t))}this.regexMatchCache.set(r,a),this.pendingRegex=!1,this.getLoader([]),this.profileEnd(n,{cacheHit:!1,bodyLength:r.length,rules:i.length,matched:a.length})},pt.prototype.getObserverFilteredHTML=function(t){if(!t)return"";if(this.shouldSkipNode(t))return"";const e=t.cloneNode(!0);return(e.querySelectorAll?.(Et)||[]).forEach(t=>t.remove()),void 0!==e.innerHTML?e.innerHTML:void 0!==e.outerHTML?e.outerHTML:void 0!==e.textContent?e.textContent:""},pt.prototype.stripIgnoredBlocks=function(t){if(!t)return"";return[/<code\b[^>]*>.*?<\/code>/gims,/<pre\b[^>]*>.*?<\/pre>/gims,/<([a-z][\w:-]*)\b[^>]*data-sf-observer=["']ignore["'][^>]*>.*?<\/\1>/gims].reduce((t,e)=>t.replace(e,""),t)},pt.prototype.getLoader=async function(t,e=!1,n=!1){this.logTiming("getLoader start");let i=this.getUrlParam("loader_clear");i&&(i=`&clear_cache=${i}`),Array.isArray(t)||(t=this.getObjectArray(t||{})),t=[...new Set(t.map(t=>g(t,f.z,this.findPlugins,this.productionPlanActive)))],this.productionPlanActive||t.forEach(t=>this.setModule(t));const o=this.profileStart("getLoader"),r=t.length,a=new Set(this.priorityModules||[]);if(t.length){const e=[],n=[];t.forEach(t=>{a.has(t)?e.push(t):n.push(t)}),t=[...e,...n]}const l=[],c=this.heavyModules||[],d=!n&&!this.loadPage;if(!n&&t.length<10&&!this.productionPlanActive&&(this.debug("PluginList is empty, use Cookie"),t=this.getModuleArray()),d&&Array.isArray(t)&&(t=t.filter(t=>!c.includes(t)||(l.push(t),!1))),!t.length&&l.length)return this.profileEnd(o,{redirectedToDeferred:!0,requestedPluginCount:r,deferredCount:l.length}),this.getLoader(l,e,!0);this.loadedPlugins&&Array.isArray(t)&&(t=t.filter(t=>!this.loadedPlugins[t])),n&&t.length&&this.loadedPlugins&&(t=t.filter(t=>!this.loadedPlugins[t]));const u=this.hashCode(t+"/"+this.pluginListRelation);if(!n&&u===this.lastLoadHash&&this.loadPage)return l.length?this.getLoader(l,e,!0):(this.stopPreloader(),this.logTiming("getLoader skipped: same hash"),this.profileEnd(o,{skipped:!0,reason:"same-hash",requestedPluginCount:r,pluginCount:t.length,deferredCount:l.length}),!1);if(St(`SF_PLUGIN_LIST-${this.urlHash}`,s(JSON.stringify(this.module))),this.lastLoadHash&&!n&&this.cachedPlugins.length&&(t=t.filter(t=>!this.cachedPlugins.includes(t))),n?t.length&&(this.cachedPlugins=Array.from(new Set([...this.cachedPlugins||[],...t]))):this.lastLoadHash=u,this.standAlone){this.logTiming("standalone load start"),this.logTiming(`PluginList - ${t.length} modules`),this.vUseMergeConfigGenerate(t);if(0===Object.values(this.resolverAll).length)return this.pendingRegex||this.dispatchReadyOnce(),this.stopPreloader(),this.logTiming("standalone: nothing to load"),void this.profileEnd(o,{mode:"standalone",skipped:!0,reason:"nothing-to-load",requestedPluginCount:r,pluginCount:t.length});this.waitForResolverIdle().then(()=>{(!this.eventSend&&!this.pendingRegex||n)&&(this.pendingRegex=!1,this.dispatchReadyOnce()),this.eventsPlugins=[],this.resolverAll={},this.stopPreloader(),this.loadPage=!0;const i=Object.keys(this.loadedPlugins||{}).length;this.logTiming(`standalone load complete: ${i} modules`),this.profileEnd(o,{mode:"standalone",requestedPluginCount:r,pluginCount:t.length,resolverCount:Object.keys(this.resolverAll||{}).length,totalLoaded:i,deferredCount:l.length}),this.isDebug&&console.log("SFLoader loaded modules (standalone)",this.loadedPlugins),l.length&&this.getLoader(l,e,!0)})}return!0},pt.prototype.hashCode=function(t){return""===t?0:t.split("").reduce(function(t,e){return(t=(t<<5)-t+e.charCodeAt(0))&t},0)},pt.prototype.isEmptyObject=function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},pt.prototype.getPersistentMissingFiles=function(t=this.notFoundFiles){const e=Object.create(null);if(!t||"object"!=typeof t||Array.isArray(t))return e;for(const[n,i]of Object.entries(t))i&&"object"==typeof i&&!0===i.js&&(e[n]={js:!0});return e},pt.prototype.getMissingFileKey=function(t){const e=this.findPlugins?.[t]?.package;return e?`${e}${ht}${t}`:t},pt.prototype.addToMissingFiles=function(t,e,n=!0){const i=this.getMissingFileKey(t);this.notFoundFiles[i]?this.notFoundFiles[i][e]=!0:this.notFoundFiles[i]={[e]:!0},"css"===e&&(this.notFoundFiles[i].missingMin=n),St("SF_MISSING_PLUGINS",s(JSON.stringify(this.getPersistentMissingFiles())))},pt.prototype.getAssetVersion=function(){return this.cacheVersion||this.pluginListVersion||""},pt.prototype.versionAssetUrl=function(t){const e=this.getAssetVersion();if(!e||"string"!=typeof t)return t;if(/^(data:|blob:|javascript:)/i.test(t))return t;const n=t.indexOf("#"),i=n>=0?t.slice(n):"",s=n>=0?t.slice(0,n):t,o=encodeURIComponent(e);return/[?&]sf_v=/.test(s)?`${s.replace(/([?&])sf_v=[^&#]*/g,`$1sf_v=${o}`)}${i}`:`${s}${s.includes("?")?"&":"?"}sf_v=${o}${i}`},pt.prototype.addStyle=async function(t){const e=this.versionAssetUrl(t);return At("styles",e,()=>this.insertStyle(e,t))},pt.prototype.insertStyle=function(t,e){return new Promise((n,i)=>{const s=document.getElementsByTagName("head")[0],o=document.createElement("link");o.href=t,o.type="text/css",o.rel="stylesheet",o.addEventListener("load",()=>{n()},{once:!0}),o.addEventListener("error",()=>{o.remove(),i(new Error(`Failed to load styles: ${e}`))},{once:!0}),s.append(o)})};const Pt=Symbol.for("simai.sf.loader.assets");function At(t,e,n){const i=function(){const t=globalThis;return t[Pt]||Object.defineProperty(t,Pt,{value:{scripts:new Map,styles:new Map},configurable:!0}),t[Pt]}()[t],s=function(t){try{return new URL(t,globalThis.document?.baseURI||globalThis.location?.href).href}catch{return String(t)}}(e),o=i.get(s);if(o)return o;const r=n();return i.set(s,r),r.catch(()=>{i.get(s)===r&&i.delete(s)}),r}pt.prototype.preloadScript=function(t){if("undefined"==typeof document||!t)return;const e=this.versionAssetUrl(t);if(this.preloadedScripts=this.preloadedScripts||new Set,this.preloadedScripts.has(e))return;this.preloadedScripts.add(e);const n=document.createElement("link");n.rel="preload",n.as="script",n.href=e,document.head.append(n)},pt.prototype.addScript=function(t,e={}){const n=this.versionAssetUrl(t);return At("scripts",n,()=>this.insertScript(n,t,e))},pt.prototype.insertScript=function(t,e,n={}){return new Promise((i,s)=>{const o=document.getElementsByTagName("head")[0],r=document.createElement("script");if(r.src=t,r.async=!0,r.addEventListener("load",()=>{i()}),r.addEventListener("error",()=>{const t=n?.otherFormTried?null:wt(e);if(t)return r.remove(),void this.addScript(t,{...n,otherFormTried:!0}).then(i,s);s(new Error(`Failed to load script: ${e}`))}),n&&n.attributes)for(const t in n.attributes)r.setAttribute(t,n.attributes[t]);o.append(r)})},pt.prototype.setPreloaderParams=function(){if(this.params.preloader)for(const t in this.params.preloader)this.preloader[t]=this.params.preloader[t];this.contentPreloader=this.params.contentPreloader?this.params.contentPreloader:(0,y.ub)(this.preloader)},pt.prototype.getCurrentUrl=function(){return`${window.location.protocol}//${window.location.host}${window.location.pathname}`.replace(/\/+$/,"").split("?")[0]},pt.prototype.isDynamicPage=function(t){return/\/\d+|\/[a-zA-Z_-]+\/[a-zA-Z0-9_-]+/.test(t)},pt.prototype.removeLastSegment=function(t){return t.replace(/\/[^/]+$/,"")},pt.prototype.generatePageHash=function(){let t=this.getCurrentUrl();return this.isDynamicPage(t)&&(t=this.removeLastSegment(t)),a(t).substring(0,16)},pt.prototype.onWindowLoad=function(t){"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0})},pt.prototype.endSearch=function(){this.searchEnd=!0,this.flushObservedChanges?.()},pt.prototype.scheduleSearchEnd=function(){"complete"===document.readyState?setTimeout(()=>this.endSearch(),0):this.searchEndListening||(this.searchEndListening=!0,window.addEventListener("load",()=>{this.searchEndListening=!1,this.endSearch()},{once:!0}))},pt.prototype.prepare=function(t=null){let e=[];if(this.logTiming("prepare start"),this.searchEnd=!1,this.scheduleSearchEnd(),this.checkTheme(),this.standAlone){const t=d().getItem("SF_MISSING_PLUGINS");try{this.notFoundFiles=t?this.getPersistentMissingFiles(JSON.parse(o(t))):{}}catch(t){console.warn(t)}}let n=this.productionPlanActive?null:d().getItem(`SF_PLUGIN_LIST-${this.urlHash}`);if(this.productionPlanActive||n||!window.BUNDLE_ID||(n=d().getItem(`SF_PLUGIN_LIST-${window.BUNDLE_ID}`)),this.standAlone?this.firstLoad="string"!=typeof n:this.firstLoad=!window.BUNDLE_LOADED,this.findShortCodes(document.body),n){try{e=JSON.parse(o(n)),this.cachedPlugins=this.getObjectArray(e)}catch{e=[]}e&&Object.keys(e).length?(this.module=e,Object.keys(e).forEach(t=>{const e=this.findPlugins[t];e&&e.relation&&this.setRelation(e.relation,t,!1)}),this.getLoader(e,!1,!0),this.logTiming("prepare: initial getLoader requested (cached, skipDefer)")):n=null}else this.logTiming("prepare: preloader run");this.onWindowLoad(()=>{t&&t.disconnect(),this.logTiming("onWindowLoad search start"),this.findShortCodes(document.body);try{document.dispatchEvent(new CustomEvent("sf-shortcodes-ready",{detail:{loader:this,timestamp:Date.now()}}))}catch(t){console.warn("sf-shortcodes-ready dispatch failed",t)}this.scanCustomElements(document.body),this.scanStaticIcons(document.body),this.scanAttributes(document.body),this.searchAttr(!1),this.searchRegexp(""),this.search(),Object.keys(this.module||{}).length&&this.getLoader(this.module,!0),this.revalidateMissingPlugins(),this.logTiming("onWindowLoad search done")})},pt.prototype.prepareTurboEvents=function(){this.turboEventsBound||(this.turboEventsBound=!0,document.addEventListener("turbo:before-render",t=>{let{newBody:e,isPreview:n}=t.detail;if(!e)return;const i=document.documentElement;if(!i||i.getAttribute("dir"))return;const s=i.getAttribute("dir")||document?.dir||document.documentElement&&document.documentElement.getAttribute("dir")||"";i.setAttribute("dir","rtl"===s?"rtl":"ltr"),n||e.hasAttribute("data-turbo-preview")||this.turboRenderHandled||(this.turboRenderHandled=!0,this.findShortCodes(e),this.scanCustomElements(e),this.scanStaticIcons(e),this.scanAttributes(e),this.searchRegexp("",e),this.turboFontCheck(e),this.checkTheme(e),t.detail.render=t=>t.replaceWith(e))}),document.addEventListener("turbo:load",()=>{this.turboRenderHandled=!1}))},pt.prototype.getTextNodes=function(t){const e=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:t=>this.shouldSkipNode(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),n=[];for(;e.nextNode();)n.push(e.currentNode);return n};function Ct(t){if("undefined"!=typeof document&&document.hidden)return setTimeout(t,0);let e=!1,n=null;const i=()=>{e||(e=!0,clearTimeout(n),cancelAnimationFrame(s),t())},s=requestAnimationFrame(i);return n=setTimeout(i,100),s}pt.prototype.mutate=function(t){return Ct(t)},pt.prototype.ensureLoadedModules=function(){if(window.SF_PRELOADED){this.productionPlanActive=!0,this.pendingRegex=!1,this.firstLoad=!1;const{modules:t,loadedPlugins:e}=window.SF_PRELOADED;Array.isArray(t)?t.forEach(t=>{t&&(this.module[t]=t,this.loadedPlugins[t]||(this.loadedPlugins[t]={}))}):t&&"object"==typeof t&&Object.keys(t).forEach(t=>{this.module[t]=t,this.loadedPlugins[t]||(this.loadedPlugins[t]={})}),e&&"object"==typeof e&&(this.loadedPlugins={...this.loadedPlugins,...e}),!this.eventSend&&Object.keys(this.loadedPlugins||{}).length&&this.dispatchReadyOnce()&&this.endSearch()}},pt.prototype.ensureDirAttribute=function(){const t=document.documentElement;if(!t||t.getAttribute("dir"))return;const e=window.getComputedStyle&&t?window.getComputedStyle(t).direction:"";t.setAttribute("dir","rtl"===e?"rtl":"ltr")},pt.prototype.init=function(){this.logTiming("init start"),this.ensureLoadedModules(),this.ensureDirAttribute(),this.checkTurbo(),this.checkToCacheClean(),this.ensureCacheVersion(),this.ensurePluginListVersion(),this.restoreIconManifestFromCache(),this.bootstrapConfiguredIconSubset(),this.prepareSmartChildScanEvents(),this.usePreloader=this.checkForCache(),this.urlHash=this.generatePageHash(),this.setPreloaderParams(),this.checkSmartCache();const t=()=>{this.prepareObserver&&(this.prepareObserver.disconnect(),this.prepareObserver=null)},e=()=>{this.prepareInit||(this.prepareInit=!0,this.prepare()),t()};"complete"===document.readyState||"interactive"===document.readyState?Ct(e):document.addEventListener("DOMContentLoaded",()=>{Ct(e)}),this.prepareObserver=new MutationObserver(e=>{if(this.prepareInit)t();else{if(document.body&&!this.prepareInit)return this.prepareInit=!0,this.prepare(),void t();for(let t=0;t<e.length;t++){const n=e[t];if(!n.target?.classList?.contains("skip")&&(!this.shouldSkipNode(n.target)&&"childList"===n.type))for(let t=0;t<n.addedNodes.length;t++){const e=n.addedNodes[t];this.shouldSkipNode(e)||this.findShortCodes(e)}}}}),this.prepareObserver.observe(document.documentElement,{childList:!0,subtree:!0,characterData:!1,attributes:!1}),this.scheduleSearchEnd(),this.turboEnabled&&this.prepareTurboEvents(),this.logTiming("init observers attached"),window.addEventListener("message",t=>{"sf-embed-ready"===t.data?.type&&this.sendThemeToPlayground()})};const vt={attr:"sf-asset",delimiterURL:"/",standAlone:!0,frameworkPath:"/simai/asset/simai.framework/sf5.master/",pathComponent:"/simai/asset/simai.framework/sf5.master/component/",isLoadPluginCookie:!1,preloader:{width:66,height:100},requiredPlugins:["modal"],disableSmart:!1,cacheVersion:window.SF_BOOT_CONFIG?.cacheVersion??("undefined"!=typeof __SF_CACHE_VERSION__?__SF_CACHE_VERSION__:"")??"",pluginListVersion:window.SF_BOOT_CONFIG?.pluginListVersion??("undefined"!=typeof __SF_PLUGIN_LIST_VERSION__?__SF_PLUGIN_LIST_VERSION__:"")??"",theme:window.SF_BOOT_CONFIG?.theme??!0,smart:window.SF_BOOT_CONFIG?.smart||{},findPlugins:SF.RuleLoader,backgroundPreloader:"var(--sf-color--surface-highest, var(--sf-surface-0, #fff))",modifierPreloader:"loader-default",contentPreloaderText:"LOADING"};function Lt(t){const e=String(t||"").trim().toLowerCase();return e?e.startsWith("sf-")||globalThis.SF?.Loader?.getCustomElementRules?.()[e]?e:`sf-${e}`:""}function $t(t=[]){return Array.isArray(t)?t:"string"==typeof t?[t]:Array.from(arguments).filter(Boolean)}function Ft(t){const e=Lt(t),n=String(t||"").trim().toLowerCase();return e&&e!==n&&n.includes("-")?Promise.race([window.customElements.whenDefined(n).then(()=>n),window.customElements.whenDefined(e).then(()=>e)]):window.customElements.whenDefined(e).then(()=>e)}function kt(){const t=$t.apply(null,arguments).filter(t=>Lt(t));return t.length?window.customElements?.whenDefined?Promise.all(t.map(Ft)):Promise.resolve(t.map(Lt)):Promise.resolve([])}function _t(t){return"className"===t?"class":String(t||"").replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Nt(t={}){return Object.entries(t).filter(([,t])=>!1!==t&&null!=t).map(([t,e])=>{const n=function(t){const e=String(t||"").trim();return e?e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`):""}(t);return n?`${n}: ${String(e)}`:""}).filter(Boolean).join("; ")}window.sfPath&&(vt.url=window.sfPath),window.sfSmartPath&&(vt.smartUrl=window.sfSmartPath);const Tt={onModalReady:"modal:ready",onModalUpdate:"modal:update",onBeforeOpen:"modal:before-open",onAfterOpen:"modal:after-open",onBeforeClose:"modal:before-close",onAfterClose:"modal:after-close",onBeforeHide:"modal:before-hide",onAfterHide:"modal:after-hide",onBeforeShow:"modal:before-show",onAfterShow:"modal:after-show",onOpen:"modal:after-open",onClose:"modal:after-close",onHide:"modal:after-hide",onShow:"modal:after-show"};function xt(t,e,n){if("function"==typeof n){const i=function(t){const e=String(t||"").trim();return Tt[e]?Tt[e]:/^on[A-Z]/.test(e)?e.slice(2).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^a-z0-9:-]/gi,"").toLowerCase():""}(e);if(i){const e=/^(modal|drawer):/.test(i)?e=>{e.target===t&&n.call(t,e)}:n;return t.addEventListener(i,e),t.__sfCreateEventHandlers||Object.defineProperty(t,"__sfCreateEventHandlers",{configurable:!0,enumerable:!1,value:[]}),void t.__sfCreateEventHandlers.push({eventName:i,handler:e})}}const i=_t(e);if(i)if(!1!==n&&null!=n)if(!0!==n){if(("style"===i||i.endsWith("-style"))&&n&&"object"==typeof n&&!Array.isArray(n)){const e=Nt(n);return void(e?t.setAttribute(i,e):t.removeAttribute(i))}Array.isArray(n)?t.setAttribute(i,n.filter(t=>null!=t).join(" ")):t.setAttribute(i,String(n))}else t.setAttribute(i,"");else t.removeAttribute(i)}function Rt(t,e={}){const n=Lt(t);if(!n)throw new Error("SF.create(name, params): name is required");const i=document.createElement(n),s=e&&"object"==typeof e?e:{},{attrs:o,attributes:r,dataset:a,children:l,html:c,textContent:d,...u}=s;return[u,o,r].forEach(t=>{t&&"object"==typeof t&&Object.entries(t).forEach(([t,e])=>{xt(i,t,e)})}),a&&"object"==typeof a&&Object.entries(a).forEach(([t,e])=>{const n=_t(t);n&&null!=e&&i.setAttribute(`data-${n}`,String(e))}),"string"==typeof c?i.innerHTML=c:null!=d&&(i.textContent=String(d)),void 0!==l&&function(t,e){(Array.isArray(e)?e.flat(1/0):[e]).filter(t=>null!=t&&!1!==t).forEach(e=>{e instanceof Node?t.append(e):t.append(document.createTextNode(String(e)))})}(i,l),i}pt.prototype.ensurePlugin=function(t){const e=String(t||"").trim();return!(!e||!this.findPlugins?.[e])&&(this.module[e]||(this.setExistCookie(e),this.mutate(()=>this.getLoader(this.module,!0))),!0)},pt.prototype.prefetchLazyRelations=function(){const t=[...this.lazyRelations].filter(t=>!this.module[t]);if(!t.length)return;const e=globalThis.requestIdleCallback?t=>globalThis.requestIdleCallback(t,{timeout:2e3}):t=>setTimeout(t,200),n=()=>{const i=t.splice(0,4);for(const t of i)this.ensurePlugin(t);t.length&&e(n)};e(n)},pt.prototype.ensureSmartElementLoaded=function(t){const e=String(t||"").trim().toLowerCase();if(!e.includes("-"))return!1;const n=this.getCustomElementRules()[e];return n?(this.module[n]||(this.setExistCookie(n),this.mutate(()=>this.getLoader(this.module,!0))),!0):(console.warn(`SFLoader: smart tag rule not found for ${e}`),!1)},SF.Loader=new pt(vt),Object.defineProperty(SF,"smartBaseReady",{configurable:!0,enumerable:!0,get:()=>SF.Loader.smartBaseReady||Promise.resolve(SF.smart||null)}),SF.loadSmartBase=function(){return SF.Loader.loadSmartBase()};let Ot=null;SF.whenFieldRenderers=function(){return SF.fieldRenderers?.renderEditField?Promise.resolve(SF.fieldRenderers):Ot||(Ot=new Promise((t,e)=>{const n=()=>!!SF.fieldRenderers?.renderEditField&&(document.removeEventListener("sf-field-renderers-ready",n),t(SF.fieldRenderers),!0);if(document.addEventListener("sf-field-renderers-ready",n),n())return;if([...document.scripts].some(t=>/\/field-renderers\/js\/field-renderers(?:\.min)?\.js(?:[?#]|$)/u.test(t.src)))return;SF.loadRuntime?.();const i=SF.Loader;i.addScript(`${i.smartPath}/field-renderers/js/field-renderers${i.minified?".min":""}.js`).then(()=>n()).catch(t=>{Ot=null,document.removeEventListener("sf-field-renderers-ready",n),e(t)})}),Ot)},SF.create=Rt,SF.createAsync=async function(t,e={}){const n=Rt(t,e),i=n.tagName.toLowerCase();return window.SF?.Loader?.ensureSmartElementLoaded&&window.SF.Loader.ensureSmartElementLoaded(i),window.customElements?.whenDefined&&await window.customElements.whenDefined(i),window.customElements?.upgrade?.(n),n},SF.__internal.litHtml=(t,e={})=>{if(!/^sf-[a-z0-9-]+$/.test(t)&&!SF.Loader.getCustomElementRules()[t]&&!/^sf-[a-z0-9-]+$/.test(t=`sf-${t}`))throw new Error(`Invalid SF tag name: ${t}`);const n=(t=>({_$litStatic$:t,r:ot}))(t);return ct`<${n} ...=${e}></${n}>`},SF.whenDefine=kt,SF.whenDefined=kt;try{window.dispatchEvent(new CustomEvent("sf-loader-init",{detail:{loader:SF.Loader,timestamp:Date.now()}}))}catch(E){console.warn("sf-loader-init dispatch failed",E)}if(Array.isArray(window.SF_PENDING_COMPONENTS))for(;window.SF_PENDING_COMPONENTS.length;){const[t,e]=window.SF_PENDING_COMPONENTS.shift()||[];if(t&&e&&!SF.Loader.ComponentRegistry[t])try{SF.Loader.registerComponent(t,e)}catch(e){console.warn("pending component register failed",t,e)}}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[66700837013363],{"12a68c68589c"(t,e,n){const i="sf-json-v1:";function s(t){return`${i}${String(t??"")}`}function o(t){if("string"!=typeof t)return"null";if(t.startsWith(i))return t.slice(11);const e=t.trim();return/^(?:\{|\[|"|null|true|false|-?\d)/.test(e)?t:"null"}function r(t,e){let n=e>>>0;for(let e=0;e<t.length;e+=1)n^=t.charCodeAt(e),n=Math.imul(n,16777619)>>>0;return n.toString(16).padStart(8,"0")}const a=function(t){const e=String(t??"");return`${r(e,2166136261)}${r(e,2654435769)}`},l=new Map,c={get length(){return l.size},key:t=>[...l.keys()][t]??null,getItem:t=>l.has(t)?l.get(t):null,setItem:(t,e)=>{l.set(String(t),String(e))},removeItem:t=>{l.delete(String(t))},clear:()=>l.clear()};function d(){try{const t=globalThis.localStorage;if(t)return t}catch{}return c}function u(t){if(!t)return t;const e=t.split(":"),n=e.pop(),i=e;if(1===i.length&&("before"===i[0]||"after"===i[0])){const t=n.match(/^content-(none|empty)$/);if(t)return`${i[0]}-${t[1]}`}const s=function(t){if(!t)return null;const e={gray:{50:"0",100:"1",200:"2",300:"3",400:"4",500:"5",600:"7",700:"7",800:"9",900:"9",950:"9"},red:{50:"0",100:"1",200:"1",300:"2",400:"3",500:"4",600:"6",700:"7",800:"8",900:"9",950:"9"},blue:{50:"0",100:"1",200:"2",300:"3",400:"3",500:"4",600:"5",700:"5",800:"7",900:"7",950:"9"},green:{50:"0",100:"1",200:"2",300:"3",400:"4",500:"4",600:"5",700:"6",800:"7",900:"8",950:"9"},yellow:{50:"0",100:"2",200:"3",300:"5",400:"6",500:"7",600:"8",700:"8",800:"9",900:"9",950:"9"},orange:{50:"0",100:"1",200:"2",300:"3",400:"4",500:"5",600:"6",700:"8",800:"9",900:"9",950:"9"},purple:{50:"0",100:"0",200:"1",300:"2",400:"3",500:"4",600:"4",700:"5",800:"6",900:"7",950:"8"},pink:{50:"0",100:"0",200:"1",300:"2",400:"4",500:"5",600:"6",700:"8",800:"8",900:"9",950:"9"}},n={"text-left":"text-start","text-right":"text-end","float-left":"float-inline-start","float-right":"float-inline-end","clear-left":"clear-inline-start","clear-right":"clear-inline-end","font-thin":"weight-1","font-extralight":"weight-2","font-light":"weight-3","font-normal":"regular","font-medium":"weight-5","font-semibold":"weight-6","font-bold":"bold","font-extrabold":"weight-8","font-black":"weight-9","font-sans":"sans","font-serif":"serif","font-mono":"mono","flex-column":"flex-col","flex-center":"center-center","t-left":"text-start","t-right":"text-end","pointer-events-none":"pointer-event-none","pointer-events-auto":"pointer-event-auto","not-italic":"italic-none","normal-case":"normalcase","no-underline":"decoration-none","text-ellipsis":"t-ellipsis","text-clip":"t-clip","bg-no-repeat":"bg-repeat-none","whitespace-nowrap":"wrap-none","whitespace-pre":"pre","whitespace-pre-line":"pre-line","whitespace-pre-wrap":"pre-wrap",contents:"content"};if(n[t])return n[t];const i=t.startsWith("-")?"-":"",s=i?t.slice(1):t,o=s.match(/^(bg|text|border)-(gray|red|blue|green|yellow|orange|purple|pink)-(50|100|200|300|400|500|600|700|800|900|950)$/);if(o){const[,t,n,i]=o,s=e[n]?.[i];return s?`${"text"===t?"color":t}-${n}-${s}`:null}const r=s.match(/^(bg|text|border)-(white|black)$/);if(r){const[,t,e]=r;return`${"text"===t?"color":t}-${e}`}const a={mt:"m-top",mr:"m-inline-end",mb:"m-bottom",ml:"m-inline-start",pt:"p-top",pr:"p-inline-end",pb:"p-bottom",pl:"p-inline-start"},l=s.match(/^(m[trbl]|p[trbl])-(.+)$/);if(l){const[,t,e]=l;return i&&"p"===t[0]?null:`${i}${a[t]}-${e}`}const c=s.match(/^(m|p)-(left|right)-(.+)$/);if(c){const[,t,e,n]=c;return i&&"p"===t?null:`${i}${t}-${"left"===e?"inline-start":"inline-end"}-${n}`}const d=s.match(/^border-(l|r)-(.+)$/);if(d)return`border-${"l"===d[1]?"inline-start":"inline-end"}-${d[2]}`;const u=s.match(/^border-(left|right)-(.+)$/);if(u)return`border-${"left"===u[1]?"inline-start":"inline-end"}-${u[2]}`;const h=s.match(/^grid-cols-(.+)$/);if(h)return`grid-col-${h[1]}`;if("w-100"===s)return"w-full";if("h-100"===s)return"h-full";const f=s.match(/^opacity-(\d{2,3})$/);if(f){const t=parseInt(f[1],10);if(100===t)return"opacity-full";if(0===t)return"opacity-0";if(t%10==0&&t>=10&&t<=90)return`opacity-${Math.round(t/10)}`}const p=s.match(/^z-(\d{2,3})$/);if(p){const t=parseInt(p[1],10);if(0===t)return`${i}z-0`;if(t%10==0&&t>=10&&t<=90)return`${i}z-${Math.round(t/10)}`}const g=s.match(/^bg-origin-(border|padding|content)$/);if(g)return`bg-origin-${g[1]}`;const m=s.match(/^bg-clip-(border|padding|content|text)$/);if(m)return`bg-clip-${m[1]}`;const y=s.match(/^leading-(tight|snug|relaxed|loose|none|normal)$/);if(y)return`line-${y[1]}`;if("items-baseline"===s)return"items-cross-baseline";const S=s.match(/^align-(baseline|top|middle|bottom|sub|super|text-top|text-bottom)$/);if(S){const t=S[1];return"super"===t?"text-sup":"text-top"===t?"text-top":"text-bottom"===t?"text-bottom":`text-${t}`}const b=s.match(/^justify-(start|end|center|between|around|evenly)$/);if(b)return`content-main-${b[1]}`;const w=s.match(/^justify-items-(start|end|center|stretch)$/);if(w)return`items-main-${w[1]}`;const E=s.match(/^justify-self-(auto|start|end|center|stretch)$/);if(E)return`self-main-${E[1]}`;const I=s.match(/^self-(auto|start|end|center|stretch|baseline)$/);if(I)return`self-cross-${I[1]}`;const P=s.match(/^place-items-(start|end|center|stretch)$/);if(P)return`items-${P[1]}`;const A=s.match(/^place-self-(auto|start|end|center|stretch)$/);if(A)return`self-${A[1]}`;const L=s.match(/^place-content-(start|end|center|between|around|evenly|stretch)$/);if(L)return`content-${L[1]}`;if(s.startsWith("content-")&&!s.includes("[")){const t=s.match(/^content-(start|end|center|between|around|evenly|stretch)$/);if(t)return`content-cross-${t[1]}`}const v=s.match(/^bg-(left|right)(?:-(top|bottom|center))?$/);if(v)return`bg-${"left"===v[1]?"inline-start":"inline-end"}${v[2]?`-${v[2]}`:""}`;const C=s.match(/^object-(left|right)(?:-(top|bottom|center))?$/);if(C)return`object-${"left"===C[1]?"inline-start":"inline-end"}${C[2]?`-${C[2]}`:""}`;const F=s.match(/^mask-(left|right)(?:-(top|bottom))?$/);if(F)return`mask-${"left"===F[1]?"inline-start":"inline-end"}${F[2]?`-${F[2]}`:""}`;const $=s.match(/^origin-(left|right|top|bottom|center)(?:-(left|right))?$/);if($){const[t,e]=$.slice(1);if("left"===t)return"origin-inline-start";if("right"===t)return"origin-inline-end";if("left"===e)return`origin-${t}-inline-start`;if("right"===e)return`origin-${t}-inline-end`}const k=s.match(/^(left|right)-(.+)$/);if(k)return`${"left"===k[1]?"inline-start":"inline-end"}-${k[2]}`;return null}(n);return s?(e.push(s),e.join(":")):t}function h(t){if(!t||"string"!=typeof t)return t;const e=t.split(/\s+/).filter(Boolean);let n=!1;const i=e.map(t=>{const e=u(t);return e!==t&&(n=!0),e});return n?i.join(" "):t}const f=JSON.parse('{"z":{"column-gap/default":"gap/default","column-gap/sm":"gap/sm","column-gap/md":"gap/md","column-gap/lg":"gap/lg","column-gap/xl":"gap/xl","column-gap/xxl":"gap/xxl"}}'),p=JSON.parse('{"cl-alert":["display/default","flex-direction/default","flex-wrap/default","flex/default","place-items/default","position/default"],"cl-avatar":["align-items/default","background-color/default","display/default","element-position/default","flex-direction/default","flex/default","height/default","justify-content/default","overflow/default","place-items/default","position/default","text-overflow/default","transition-property/default","white-space/default","width/default"],"cl-avatars":["align-items/default","display/default","flex-direction/default","position/default"],"cl-badges":["display/default","flex-direction/default","flex-wrap/default","justify-content/default","place-items/default","position/default","sr-only/default"],"cl-breadcrumbs":["align-items/default","container/default","display/default","position/default","visibility/default"],"cl-button-group":["align-items/default","display/default","isolate/default","pointer-events/default","position/default","text-align/default"],"cl-buttons":["align-items/default","display/default","flex/default","pointer-events/default","position/default"],"cl-checkbox":["cursor/default","display/default","flex-direction/default","position/default","transition-property/default"],"cl-close":["display/default","justify-content/default","place-items/default","position/default"],"cl-color":["display/default","position/default"],"cl-context-menu":["display/default","flex-direction/default","flex/default","position/default","text-decoration/default"],"cl-copy-button":["display/default","position/default"],"cl-country-code":["display/default","flex-direction/default","place-items/default","position/default","transition-property/default"],"cl-datepicker":["align-content/default","align-items/default","display/default","element-position/default","flex-direction/default","font-transform/default","gap/default","grid-template-columns/default","isolate/default","justify-content/default","overflow/default","position/default","resize/default"],"cl-download-file":["cursor/default","display/default","position/default","transition-property/default"],"cl-drawer":["display/default","justify-content/default","margin/default","place-items/default","position/default"],"cl-dropdown":["align-items/default","background-color/default","background-size/default","cursor/default","display/default","flex-direction/default","flex-wrap/default","flex/default","place-items/default","position/default","resize/default","transition-property/default","visibility/default"],"cl-empty-state":["display/default","isolate/default","position/default"],"cl-file-preview":["isolate/default","position/default"],"cl-file-upload":["align-items/default","align-self/default","cursor/default","display/default","flex-direction/default","flex/default","gap/default","grid-template-columns/default","justify-content/default","justify-items/default","position/default","width/default"],"cl-gallery":["align-items/default","background-color/default","border-radius/default","border-width/default","box-shadow/default","display/default","filter-blur/default","flex-direction/default","gap/default","height/default","justify-content/default","margin/default","max-width/default","min-height/default","min-width/default","padding/default","position/default","text-color/default","width/default"],"cl-help-mark":["display/default","isolate/default","position/default"],"cl-icon-buttons":["align-items/default","display/default","pointer-events/default","position/default"],"cl-icons":["font-weight/default","position/default"],"cl-inputs":["align-items/default","display/default","flex-direction/default","position/default","text-align/default","transition-property/default"],"cl-list-item":["align-items/default","background-color/default","background-size/default","cursor/default","display/default","flex-direction/default","flex-wrap/default","flex/default","gap/default","justify-content/default","place-items/default","position/default"],"cl-modal":["align-items/default","backdrop-filter-blur/default","border-radius/default","border-width/default","display/default","element-position/default","filter-blur/default","flex-direction/default","flex-wrap/default","font-size/default","gap/default","height/default","justify-content/default","margin/default","min-width/default","overflow/default","padding/default","place-items/default","position/default","text-color/default","title/default","width/default","z-index/default"],"cl-page-header":["align-items/default","display/default","flex-direction/default","flex-grow/default","flex-wrap/default","gap/default","margin/default","min-width/default","position/default","text-overflow/default"],"cl-pagination":["align-items/default","display/default","flex-direction/default","justify-content/default","position/default"],"cl-popover":["display/default","position/default"],"cl-profile-picker":["display/default","position/default"],"cl-progress-bar":["align-items/default","display/default","flex-direction/default","position/default","transition-property/default"],"cl-progress-scale":["align-items/default","display/default","flex-direction/default","grid-template-columns/default","overflow/default","position/default"],"cl-radio":["align-items/default","display/default","flex-direction/default","justify-content/default","position/default","transition-property/default"],"cl-range-slider":["flex/default","isolate/default","position/default"],"cl-reference-link":["align-items/default","display/default","position/default"],"cl-resizer":["display/default","position/default","resize/default","text-max-width/default"],"cl-skeleton":["animation/default","display/default","flex/default","position/default"],"cl-slider":["background-color/default","border-radius/default","display/default","padding/default","position/default","text-color/default"],"cl-spinner":["animation/default","position/default","stroke-color/default"],"cl-steps":["cursor/default","display/default","flex-direction/default","justify-content/default","place-items/default","position/default"],"cl-switch":["align-items/default","display/default","flex-direction/default","justify-content/default","position/default","transition-property/default"],"cl-tabs":["container/default","display/default","flex-direction/default","position/default","resize/default","visibility/default"],"cl-tags":["background-size/default","display/default","flex-direction/default","flex-wrap/default","justify-content/default","min-width/default","place-items/default","position/default"],"cl-textarea":["display/default","flex-direction/default","position/default","transition-property/default"],"cl-theme-generator":["position/default"],"cl-toast":["align-items/default","display/default","flex-direction/default","flex/default","justify-content/default","place-items/default","position/default"],"cl-toggle":["display/default","justify-content/default","place-items/default","position/default","transition-property/default"],"cl-tooltip":["display/default","flex-direction/default","position/default"],"cl-tree":["display/default","flex-direction/default","position/default","visibility/default"],"cl-tree-item":["align-items/default","container/default","display/default","flex-direction/default","position/default"]}');function g(t,e,n,i=!1){if(i||!Object.hasOwn(e,t))return t;const s=new Set;let o=t;for(;Object.hasOwn(e,o);){if(s.has(o))return t;s.add(o);const i=e[o];if("string"!=typeof i||!/^[a-z][a-z0-9-]*\/(default|sm|md|lg|xl|xxl)$/.test(i)||i.split("/")[1]!==o.split("/")[1])return t;const r=n[o],a=n[i];if(!r||!a||r.type&&"utility"!==r.type||a.type&&"utility"!==a.type)return t;o=i}return o}function m(t="400"){const e=String(t||"").trim().replace(/\s+/g," "),n=e.match(/^([1-9]00)\s+([1-9]00)$/);if(!n)return e||"400";const i=Number(n[1]),s=Number(n[2]),o=Math.min(i,s),r=Math.max(i,s);return String(Math.min(r,Math.max(o,400)))}var y=n("6c7f357fe960");const S=globalThis,b=t=>t,w=S.trustedTypes,E=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,I="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+P,L=`<${A}>`,v=document,C=()=>v.createComment(""),F=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,k=t=>$(t)||"function"==typeof t?.[Symbol.iterator],_="[ \t\n\f\r]",N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,x=/>/g,R=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),M=/'/g,O=/"/g,j=/^(?:script|style|textarea|title)$/i,z=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),D=z(1),H=z(2),B=z(3),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),W=new WeakMap,G=v.createTreeWalker(v,129);function V(t,e){if(!$(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==E?E.createHTML(e):e}const K=(t,e)=>{const n=t.length-1,i=[];let s,o=2===e?"<svg>":3===e?"<math>":"",r=N;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,d=0;for(;d<n.length&&(r.lastIndex=d,l=r.exec(n),null!==l);)d=r.lastIndex,r===N?"!--"===l[1]?r=T:void 0!==l[1]?r=x:void 0!==l[2]?(j.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=R):void 0!==l[3]&&(r=R):r===R?">"===l[0]?(r=s??N,c=-1):void 0===l[1]?c=-2:(c=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?R:'"'===l[3]?O:M):r===O||r===M?r=R:r===T||r===x?r=N:(r=R,s=void 0);const u=r===R&&t[e+1].startsWith("/>")?" ":"";o+=r===N?n+L:c>=0?(i.push(a),n.slice(0,c)+I+n.slice(c)+P+u):n+P+(-2===c?e:u)}return[V(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let s=0,o=0;const r=t.length-1,a=this.parts,[l,c]=K(t,e);if(this.el=J.createElement(l,n),G.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=G.nextNode())&&a.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(I)){const e=c[o++],n=i.getAttribute(t).split(P),r=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:r[2],strings:n,ctor:"."===r[1]?tt:"?"===r[1]?et:"@"===r[1]?nt:Y}),i.removeAttribute(t)}else t.startsWith(P)&&(a.push({type:6,index:s}),i.removeAttribute(t));if(j.test(i.tagName)){const t=i.textContent.split(P),e=t.length-1;if(e>0){i.textContent=w?w.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],C()),G.nextNode(),a.push({type:2,index:++s});i.append(t[e],C())}}}else if(8===i.nodeType)if(i.data===A)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(P,t+1));)a.push({type:7,index:s}),t+=P.length-1}s++}}static createElement(t,e){const n=v.createElement("template");return n.innerHTML=t,n}}function Z(t,e,n=t,i){if(e===U)return e;let s=void 0!==i?n._$Co?.[i]:n._$Cl;const o=F(e)?void 0:e._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),void 0===o?s=void 0:(s=new o(t),s._$AT(t,n,i)),void 0!==i?(n._$Co??=[])[i]=s:n._$Cl=s),void 0!==s&&(e=Z(t,s._$AS(t,e.values),s,i)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,i=(t?.creationScope??v).importNode(e,!0);G.currentNode=i;let s=G.nextNode(),o=0,r=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new X(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new it(s,this,t)),this._$AV.push(e),a=n[++r]}o!==a?.index&&(s=G.nextNode(),o++)}return G.currentNode=v,i}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),F(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):k(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==q&&F(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,i="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=J.createElement(V(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Q(i,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new J(t)),e}k(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const s of t)i===e.length?e.push(n=new X(this.O(C()),this.O(C()),this,this.options)):n=e[i],n._$AI(s),i++;i<e.length&&(this._$AR(n&&n._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=b(t).nextSibling;b(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,i,s){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=q}_$AI(t,e=this,n,i){const s=this.strings;let o=!1;if(void 0===s)t=Z(this,t,e,0),o=!F(t)||t!==this._$AH&&t!==U,o&&(this._$AH=t);else{const i=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=Z(this,i[n+r],e,r),a===U&&(a=this._$AH[r]),o||=!F(a)||a!==this._$AH[r],a===q?t=q:t!==q&&(t+=(a??"")+s[r+1]),this._$AH[r]=a}o&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class et extends Y{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class nt extends Y{constructor(t,e,n,i,s){super(t,e,n,i,s),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??q)===U)return;const n=this._$AH,i=t===q&&n!==q||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==q&&(n===q||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const st=S.litHtmlPolyfillSupport;st?.(J,X),(S.litHtmlVersions??=[]).push("3.3.3");const ot=Symbol.for(""),rt=t=>{if(t?.r===ot)return t?._$litStatic$},at=new Map,lt=t=>(e,...n)=>{const i=n.length;let s,o;const r=[],a=[];let l,c=0,d=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(o=n[c],s=rt(o));)l+=s+e[++c],d=!0;c!==i&&a.push(o),r.push(l),c++}if(c===i&&r.push(e[i]),d){const t=r.join("$$lit$$");void 0===(e=at.get(t))&&(r.raw=r,at.set(t,e=r)),n=a}return t(e,...n)},ct=lt(D);lt(H),lt(B);(()=>{const t=window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[];window.registerSfComponent=function(e,n){if(e&&n&&!window.SF?.ComponentRegistry?.[e])if(window.SF?.Loader?.registerComponent)try{window.SF.Loader.registerComponent(e,n)}catch(t){console.warn("component:ready dispatch failed",t)}else t.push([e,n])},window.addEventListener("sf-loader-ready",()=>{if(window.SF?.Loader?.registerComponent)for(;t.length;){const[e,n]=t.shift()||[];if(e&&n&&!window.SF?.ComponentRegistry?.[e])try{window.SF.Loader.registerComponent(e,n)}catch(t){console.warn(t)}}})})();function dt(...t){for(const e of t){if(null==e)continue;const t=String(e).trim();if(""!==t)return t}return""}const ut=/^[a-z][a-z0-9-]*$/,ht="::";function ft(t){return"string"!=typeof t?"":t.trim().replace(/\/+$/,"")}function pt(t){var e,n,i;t.url&&t.url.endsWith("/")&&(t.url=t.url.slice(0,t.url.length-1)),t.smartUrl&&t.smartUrl.endsWith("/")&&(t.smartUrl=t.smartUrl.slice(0,t.smartUrl.length-1)),this.loadPage=!1,this.turboEnabled=!1,this.ComponentRegistry={},this.shortCodes={copy:"clipboard"},this.componentTemplates={},this.prepareInit=!1,(e=this).iconFontReady=!1,e.iconSubsetPending=!1,e.loadedIcons=new Set,e.iconDescriptorStates=new Map,e.iconSubsetReady=!1,e.iconSubsetPromise=null,e.iconSubsetNeedsReload=!1,e.iconSubsetManifest=null,e.iconSubsetHash="",e.iconManifestStorageKey="SF_ICON_SUBSET_MANIFEST",e.iconSubsetManifests=new Map,e.iconSubsetHashes=new Map,e.iconSubsetWarnings=new Set,e.pendingIconScanCount=0,e.pendingIconFlushQueued=!1,e.isSyncingStaticIconState=!1,e.staticIconDescriptorKeys=new WeakMap,this.eventSend=!1,this.uniqueIcons=new Map,this.pendingRegex=!0,this.url=t.url??"/simai/asset/simai.framework/sf5.master",this.smartUrl=(n=this.url,("string"==typeof(i=t.smartUrl)?i.trim():"")||n),this.observeElements=[],this.module={},this.phpScriptsLoaded=[],this.pluginListRelation=[],this.lastLoadHash=null,this.theme="light",this.themeEnabled=!1!==t.theme,this.preloaderWrap=window.SF_BOOT_CONFIG.preloader?.wrap||null,this.standAlone=!0,this.disableSmart=!!t.disableSmart,this.smart={...window.SF_BOOT_CONFIG?.smart||{},...t.smart||{}},this.smartBaseReady=null,this.smartBaseLoadPromise=null,this.sfDir="/simai/",this.utilyPath=`${this.url}/utility`,this.smartPath=`${this.smartUrl}/smart`,this.componentPath=`${this.url}/component`,this.smartCache=null,this.resolverAll={},this.mutationObserver=null,this.prepareObserver=null,this.stopObserver=!1,this.dragObserverLockCount=0,this.eventsPlugins=[],this.urlHash="",this.preloaderRun=window.SF_BOOT_CONFIG.preloader?.preloaderActive||!1,this.pendingLoadPlugins=new Set,this.pendingShortcodeLoads=new Set,this.relationPlugins={},this.totalRelationsPlugins={},this.shortcodeReadyCache=new Map,this.heavyModules=t.heavyModules||[],this.priorityModules=t.priorityModules||["container","display","flex","grid","gap","column","width","height","aspect-ratio","element-position","element-position-ext","headers","theme","skeleton"],this.preloader={color:(0,y.c6)(),width:y.Hg.width,height:y.Hg.height},this.timingStart="undefined"!=typeof performance&&performance.now?performance.now():Date.now(),this.turboEventsBound=!1,this.smartChildScanEventsBound=!1,this.totalLoadPlugin=0,this.notFoundFiles={},this.lazyRelations=new Set,this.cachedPlugins=[],this.loadedPlugins={},this.attrMatchCache=new Map,this.regexMatchCache=new Map,this.cacheVersion=dt(t.cacheVersion,"undefined"!=typeof __SF_CACHE_VERSION__?__SF_CACHE_VERSION__:null,window.SF_BOOT_CONFIG?.cacheVersion,window.SF_CACHE_VERSION),this.pluginListVersion=dt(t.pluginListVersion,"undefined"!=typeof __SF_PLUGIN_LIST_VERSION__?__SF_PLUGIN_LIST_VERSION__:null,window.SF_BOOT_CONFIG?.pluginListVersion,window.SF_PLUGIN_LIST_VERSION),this.params=t,this.firstLoad=!0,this.attr=t.attr?t.attr:"sf-asset",this.turboEventsBound=!1,this.turboRenderHandled=!1,this.delimiterURL=t.delimiterURL?t.delimiterURL:"/",this.frameworkPath=t.frameworkPath?t.frameworkPath:"/simai/asset/simai.framework/sf5.master/utility/",this.findPlugins=t.findPlugins?t.findPlugins:{},this.requiredPlugins=t.requiredPlugins?t.requiredPlugins:[],this.isLoadPluginCookie=!!t.isLoadPluginCookie&&t.isLoadPluginCookie,this.contentPreloaderText=t.contentPreloaderText?t.contentPreloaderText:"LOADING",this.arrowInterval=null,this.contentPreloader="",this.backgroundPreloader=t.backgroundPreloader?t.backgroundPreloader:(0,y.vq)(),this.tempLoaderStyles="inset: 0;position: fixed;width: 100%;height: 100vh;opacity: 1;z-index: 1000;background-color: var(--sf-color--surface-highest, var(--sf-surface-0, #fff));text-align: center;",this.modifierPreloader=t.modifierPreloader?t.modifierPreloader:"loader-default",this.isDebug=!1,this.minified=function(t={}){if("boolean"==typeof t.minified)return t.minified;const e=globalThis.window?.SF_BOOT_CONFIG?.minified;if("boolean"==typeof e)return e;try{if(new URLSearchParams(globalThis.location?.search||"").has("sf-debug"))return!1}catch{}return!globalThis.document?.documentElement?.hasAttribute?.("data-sf-debug")}(t),this.profileLoader=t.profileLoader??window.SF_BOOT_CONFIG?.profileLoader??this.isDebug,this.profileThreshold=t.profileThreshold??window.SF_BOOT_CONFIG?.profileThreshold??2,this.usePreloader=!0,this.debugStr={initLoader:"SFLoaderPlugin: script is run",requiredPluginsNotEmpty:"SFLoaderPlugin: the required plugins parameter is not empty",regexpPlugins:"SFLoaderPlugin: findPlugins list ",isExistFileOnreadystatechange:"SFLoaderPlugin: checking that the plugin files exist",isExistFilestatus200:"SFLoaderPlugin: status 200",isExistFilestatusNo200:"SFLoaderPlugin: status is not 200",isExistFileReadyStateNo4:"SFLoaderPlugin: Ready State no 4",searchRegexpRun:"SFLoaderPlugin: searchRegexp is run"},this.plugin={},this.searchEnd=!1,this.packages=Object.create(null),this.packageWarnings=new Set,this.installPackageApi(),this.declarePackages({...window.SF_BOOT_CONFIG?.packages||{},...t.packages||{}});const s=this.loadDeclaredPackageRules(),o=()=>s?s.then(()=>this.init()):this.init();!0===this.smart.base?this.smartBaseReady=this.loadSmartBase().finally(o):(this.smartBaseReady=window.SF?.smart?.SfBaseElement?Promise.resolve(window.SF.smart):new Promise(t=>{window.addEventListener("sf-smart-base-ready",()=>t(window.SF?.smart||null),{once:!0})}),o())}function gt(t){const e={},n=/([a-zA-Z0-9_]+)\s*=\s*(?:(?:'([^']*)')|(?:"([^"]*)")|(?:\[([^\]]*)\])|(\S+))/g;let i;for(;null!==(i=n.exec(t));){const t=i[1];let n;void 0!==i[2]?n=i[2]:void 0!==i[3]?n=i[3]:void 0!==i[4]?n=i[4].split(",").map(t=>t.trim()):void 0!==i[5]&&(n=i[5]),e[t]=n}return e}function mt(t){if(!t||!t.length)return null;const e=t.split(" "),n={};return e.forEach(t=>{if(t.match("=")){const[e,i]=t.split("=");n[e]=i}else n[t]=!0}),n}function yt(t){if(null==t)return[];if(t instanceof Node)return[t];if(t instanceof DocumentFragment)return Array.from(t.childNodes);if(Array.isArray(t))return t.reduce((t,e)=>t.concat(yt(e)),[]);if("string"==typeof t){const e=document.createElement("template");return e.innerHTML=t,Array.from(e.content.childNodes)}return[]}function St(t,e){try{d().setItem(t,e)}catch(e){console.warn("localStorage setItem failed",t,e)}}function bt(t){try{d().removeItem(t)}catch(e){console.warn("localStorage removeItem failed",t,e)}}function wt(t){const e=String(t||"");return/\.min\.(js|css)(?=$|[?#])/.test(e)?e.replace(/\.min\.(js|css)(?=$|[?#])/,".$1"):/\.(js|css)(?=$|[?#])/.test(e)?e.replace(/\.(js|css)(?=$|[?#])/,".min.$1"):null}pt.prototype.installPackageApi=function(){const t=this.findPlugins;t&&"object"==typeof t&&Object.defineProperty(t,"registerPackage",{configurable:!0,enumerable:!1,writable:!0,value:(t,e)=>this.registerPackage(t,e)})},pt.prototype.warnPackage=function(t,e){this.packageWarnings.has(t)||(this.packageWarnings.add(t),console.warn(`SFLoader: ${e}`))},pt.prototype.declarePackages=function(t){Object.entries(t||{}).forEach(([t,e])=>{if(!ut.test(t))return void this.warnPackage(`name:${t}`,`"${t}" in SF_BOOT_CONFIG.packages is not a package name (lower-case letters, digits and hyphens); it is ignored`);const n=ft(e?.base);n||this.warnPackage(`base:${t}`,`package "${t}" is declared without a base, so none of its components can load; set SF_BOOT_CONFIG.packages.${t}.base to the directory holding its component folders`),this.packages[t]={name:t,base:n,rule:ft(e?.rule)||(n?`${n}/rule.js`:""),declared:!0,registered:!1}})},pt.prototype.loadDeclaredPackageRules=function(){const t=Object.values(this.packages).filter(t=>t.declared&&t.rule).map(t=>this.addScript(t.rule).then(()=>{t.registered||this.warnPackage(`empty:${t.name}`,`${t.rule} loaded but registered nothing for package "${t.name}"; it must call SF.RuleLoader.registerPackage("${t.name}", {rules})`)}).catch(()=>{this.warnPackage(`rule:${t.name}`,`the rules of package "${t.name}" could not be loaded from ${t.rule}; its components stay undefined`)}));return t.length?Promise.all(t):null},pt.prototype.registerPackage=function(t,e={}){const n=String(t??"").trim();if(!ut.test(n))return this.warnPackage(`name:${n}`,`"${n}" is not a package name (lower-case letters, digits and hyphens); its rules are not registered`),[];const i=e?.rules;if(!i||"object"!=typeof i||Array.isArray(i))return this.warnPackage(`rules:${n}`,`package "${n}" was registered without a rules object`),[];this.packages[n]||(this.packages[n]={name:n,base:"",rule:"",declared:!1,registered:!1});const s=this.packages[n];s.base||(s.base=ft(e.base)),s.registered=!0;const o=[];return Object.entries(i).forEach(([t,e])=>{if(!e||"object"!=typeof e||Array.isArray(e))return void this.warnPackage(`rule:${n}:${t}`,`package "${n}" rule "${t}" is not an object; skipped`);const i=this.findPlugins[t];i?.package&&i.package!==n?this.warnPackage(`owner:${n}:${t}`,`rule "${t}" already belongs to package "${i.package}"; package "${n}" cannot take it`):i&&(this.module[t]||this.loadedPlugins[t])?this.warnPackage(`loaded:${n}:${t}`,`rule "${t}" is already loaded from `+(i.package?`package "${i.package}"`:"the Smart base")+"; "+`the copy in package "${n}" is not used on this page`):(this.findPlugins[t]={...e,package:n},o.push(t))}),o.length&&this.rulesChanged(),o},pt.prototype.rulesChanged=function(){this.clearAttributeRuleIndex(),this.clearRegexpScanRules(),this.attrMatchCache.clear(),this.regexMatchCache.clear(),this.prepareInit&&"undefined"!=typeof document&&document.body&&this.mutate(()=>{this.scanCustomElements(document.body),this.scanAttributes(document.body),this.pendingRegex||this.searchRegexp("")})},pt.prototype.resolveSmartBase=function(t){const e=this.findPlugins?.[t],n=e&&"object"==typeof e?e.package:"";if(!n)return this.smartPath;const i=this.packages[n];if(i?.base)return i.base;const s=Array.isArray(e.tags)&&e.tags.length?e.tags.map(t=>`<${t}>`).join(", "):t;return this.warnPackage(`resolve:${n}:${t}`,i?`${s} belongs to package "${n}", which has no base; set SF_BOOT_CONFIG.packages.${n}.base. It is not loaded from the Smart base.`:`${s} belongs to package "${n}", which this page has not declared; add SF_BOOT_CONFIG.packages.${n} = {base: ...}. It is not loaded from the Smart base.`),null},pt.prototype.isPluginResolvable=function(t){const e=this.findPlugins?.[t];return!e||"object"!=typeof e||!e.package||null!==this.resolveSmartBase(t)},pt.prototype.debug=function(t){this.isDebug&&console.log(t)},pt.prototype.logTiming=function(t){if(!this.isDebug)return;const e="undefined"!=typeof performance&&performance.now?performance.now():Date.now();console.log(`SFLoader timing ${t}: ${(e-this.timingStart).toFixed(1)}ms`)},pt.prototype.now=function(){return"undefined"!=typeof performance&&performance.now?performance.now():Date.now()},pt.prototype.profileStart=function(t){return this.profileLoader?{label:t,start:this.now()}:null},pt.prototype.profileEnd=function(t,e={}){if(!t||!this.profileLoader)return;const n=this.now()-t.start;if(n<this.profileThreshold)return;const i=Number(n.toFixed(2));console.log(`SFLoader profile ${t.label}: ${i}ms`,{duration:i,...e})},pt.prototype.loadSmartBase=function(){return window.SF?.smart?.SfBaseElement?Promise.resolve(window.SF.smart):(this.smartBaseLoadPromise||(this.smartBaseLoadPromise=window.SF.loadRuntime().then(()=>window.SF?.smart||null).catch(t=>(console.warn("smart base load failed",t),null)),this.smartBaseReady=this.smartBaseLoadPromise),this.smartBaseLoadPromise)},pt.prototype.getUrlParam=function(t=!1){if(t){return new URL(window.location.href).searchParams.get(t)}return""},pt.prototype.findShortCodes=function(t){const e=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement||null;if(this.shouldSkipNode(e))return;if(t.nodeType===Node.ELEMENT_NODE)return void t.childNodes.forEach(t=>{t.nodeType===Node.TEXT_NODE||t.nodeType===Node.COMMENT_NODE?this.findShortCodes(t):t.nodeType!==Node.ELEMENT_NODE||this.shouldSkipNode(t)||this.findShortCodes(t)});const n=t.nodeType===Node.COMMENT_NODE&&t.nodeValue?.startsWith("sf-shortcode ");if(!(t.nodeType===Node.TEXT_NODE)&&!n)return;const i=n?t.nodeValue.slice(13):t.textContent;if(!i)return;const s=[...i.matchAll(/\[!([a-zA-Z0-9_-]+)(?:\s+([^\](]+?))?](?:\(([^)]*)\))?(?:#([a-zA-Z0-9_-]+))?/g)];if(0===s.length)return;const o=this.profileStart("findShortCodes"),r=[];let a=0;s.forEach(t=>{const e=t[0],n=void 0!==t.index?t.index:i.indexOf(e,a),s=n+e.length;n>a&&r.push({type:"text",text:i.slice(a,n)});const[,o,l,c,d]=t;r.push({type:"shortcode",data:{name:o,attrs:mt(l),param:gt(c),id:d,raw:e}}),a=s}),a<t.textContent.length&&r.push({type:"text",text:i.slice(a)}),n?t.nodeValue="":t.textContent="";const l=r.filter(t=>"shortcode"===t.type),c=("undefined"!=typeof document&&document.hidden?null:window.requestIdleCallback)||function(t){return Lt(()=>t())},d=()=>{const e=new Set,n=r.map(t=>{if("text"===t.type)return document.createTextNode(t.text);const e=document.createComment("sf-shortcode");return t.placeholder=e,e}),i=()=>t.replaceWith(...n);l.length<=10?i():this.mutate(()=>i());const s=l.map(t=>{const n=t.data,i=this.shortCodes[n.name.toLowerCase()]||n.name.toLowerCase(),s=SF.RuleLoader[i];if(s&&!this.module[i])this.setExistCookie(i),e.add(i);else if(!s)return Promise.resolve(null);const o=i||n.name,r=i||n.name||o,a=Array.from(new Set([o,i,n.name].filter(Boolean))),l=a.map(t=>this.ComponentRegistry?.[t]).find(t=>t)||null;if(l)try{const t=new l({id:n.id,param:n.param,attrs:n.attrs});return Promise.resolve(t.render())}catch(t){return console.warn("shortcode render failed",i,t),Promise.resolve(null)}if(!this.shortcodeReadyCache.has(r)){const t=new Promise(t=>{try{let i=!1;const s=e=>{!i&&e&&(i=!0,t(e))};e.size&&!this.pendingRegex&&this.getLoader(this.module,!0),a.forEach(t=>this.ready(t,s)),setTimeout(()=>{i||(this.isDebug&&console.warn("SFLoader shortcode resolution timeout",{targetName:o,names:a,entry:n}),t(null))},8e3)}catch(e){console.warn(e),t(null)}});this.shortcodeReadyCache.set(r,t)}return this.shortcodeReadyCache.get(r).then(t=>{if(!t)return null;return new t({id:n.id,param:n.param,attrs:n.attrs}).render()})}),o=Array.from(e).filter(t=>!this.pendingLoadPlugins.has(t));o.length&&!this.pendingRegex&&(o.forEach(t=>this.pendingShortcodeLoads.add(t)),this.getLoader(this.module,!0)),Promise.allSettled(s).then(t=>{this.isDebug&&console.log("SFLoader.shortcodes results",t),o.length&&o.forEach(t=>this.pendingShortcodeLoads.delete(t));let e=0;t.forEach(t=>{"fulfilled"===t.status?l[e].nodes=yt(t.value):l[e].nodes=[],e++}),this.mutate(()=>{l.forEach(t=>{const e=t.placeholder;e&&e.parentNode&&(t.nodes&&t.nodes.length?e.replaceWith(...t.nodes):e.remove())})})})};l.length<=10?d():c(d),this.profileEnd(o,{shortcodes:l.length,textLength:i.length,nodeType:n?"comment":"text"})},function(t,{safeSetItem:e,safeRemoveItem:n}={}){const i=(t=[])=>Array.isArray(t)?t:"string"==typeof t?t.split(",").map(t=>t.trim()).filter(Boolean):null==t||!1===t?[]:[t],s=new Map([["sf-icon--weight-thin","100"],["sf-icon-thin","100"],["sf-icon--weight-extra-light","200"],["sf-icon-extra-light","200"],["sf-icon--weight-light","300"],["sf-icon-light","300"],["sf-icon--weight-regular","400"],["sf-icon-regular","400"],["sf-icon--weight-medium","500"],["sf-icon-medium","500"],["sf-icon--weight-semi-bold","600"],["sf-icon-semi-bold","600"],["sf-icon--weight-bold","700"],["sf-icon-bold","700"]]),o="400",r=new Map([["sf-icon--rounded","rounded"],["sf-icon-rounded","rounded"],["sf-icon--sharp","sharp"],["sf-icon-shape","sharp"]]),a=new Map([["material symbols outlined","outlined"],["material symbols rounded","rounded"],["material symbols sharp","sharp"]]),l=Object.freeze({outlined:{family:"Material Symbols Outlined",file:"MaterialSymbols-Outlined.woff2",format:"woff2",weight:"100 700"},rounded:{family:"Material Icons Round",file:"MaterialIconsRound-Regular.otf",format:"opentype",weight:"400"},sharp:{family:"Material Icons Sharp",file:"MaterialIconsSharp-Regular.otf",format:"opentype",weight:"400"}}),c=(t,e=!1)=>{if(""===t||!0===t)return!0;if(!1===t||null==t)return e;const n=String(t).trim().toLowerCase();return!n||!["0","false","no","off","none"].includes(n)};t.prototype.normalizeIconType=function(t=""){const e=String(t||"").trim().toLowerCase();return e&&"outlined"!==e&&"outline"!==e?"shape"===e?"sharp":"rounded"===e||"sharp"===e?e:"outlined":"outlined"},t.prototype.liftIconSubsetPending=function(){const t=document.documentElement;"subset-pending"===t?.getAttribute("data-sf-icons")&&t.removeAttribute("data-sf-icons")},t.prototype.isIconSubsetEnabled=function(){const t=window.SF_BOOT_CONFIG?.icons?.enabled,e=window.SF_ICON_SUBSET_ENABLED;return"boolean"==typeof t?t:"boolean"!=typeof e||e};const u=Object.freeze({outlined:"Material Symbols Outlined",rounded:"Material Symbols Rounded",sharp:"Material Symbols Sharp"});t.prototype.getLocalIconFontFaces=function(t=""){const e=u[this.normalizeIconType(t)]||u.outlined,n=[];return document.fonts?.forEach?.(t=>{String(t.family||"").replace(/["']/g,"").trim()===e&&n.push(t)}),n},t.prototype.isLocalIconFontReady=function(t=""){const e=this.normalizeIconType(t);if(this.localIconFontsReady||(this.localIconFontsReady=new Set),this.localIconFontsReady.has(e))return!0;if(!document.fonts?.forEach)return!0;return this.getLocalIconFontFaces(e).some(t=>"loaded"===t.status||"error"===t.status)?(this.localIconFontsReady.add(e),!0):(this.waitForLocalIconFont(e),!1)},t.prototype.waitForLocalIconFont=function(t=""){const e=this.normalizeIconType(t);if(this.localIconFontWaits||(this.localIconFontWaits=new Map),this.localIconFontWaits.has(e))return this.localIconFontWaits.get(e);const n=document.fonts,i=new Promise(t=>{let i=!1,s=0,o=0;const r=()=>{i||(i=!0,clearInterval(s),clearTimeout(o),n.removeEventListener?.("loadingdone",a),n.removeEventListener?.("loadingerror",a),t())},a=()=>{const t=this.getLocalIconFontFaces(e);t.some(t=>"loaded"===t.status||"error"===t.status)?r():t.forEach(t=>{"unloaded"===t.status&&t.load().then(a,a)})};n.addEventListener?.("loadingdone",a),n.addEventListener?.("loadingerror",a),s=setInterval(a,50),o=setTimeout(r,6e3),a()}).then(()=>(this.localIconFontsReady.add(e),this.iconFontReady=!0,document.body?.classList?.add("sf-icons-loaded"),this.syncStaticIconLoadedState(),window.dispatchEvent(new CustomEvent("sf-icons-subset:ready",{detail:{icons:new Set,all:!0,local:!0,types:[e],loader:this}})),!0));return this.localIconFontWaits.set(e,i),i},t.prototype.getDefaultIconType=function(){return this.normalizeIconType(window.SF_BOOT_CONFIG?.icons?.type||window.SF_ICON_TYPE||"outlined")},t.prototype.getIconManifestStorageKey=function(t=""){const e=this.normalizeIconType(t);return"outlined"===e?this.iconManifestStorageKey:`${this.iconManifestStorageKey}:${e}`},t.prototype.getIconManifestForType=function(t=""){const e=this.normalizeIconType(t);return this.iconSubsetManifests?.get(e)||(this.iconSubsetManifest&&this.getIconManifestType(this.iconSubsetManifest)===e?this.iconSubsetManifest:null)},t.prototype.setIconManifestForType=function(t="",e=null){const n=this.normalizeIconType(t);this.iconSubsetManifests||(this.iconSubsetManifests=new Map),this.iconSubsetHashes||(this.iconSubsetHashes=new Map),e?(this.iconSubsetManifests.set(n,e),this.iconSubsetHashes.set(n,e.hash||e.packet_sha256||"")):(this.iconSubsetManifests.delete(n),this.iconSubsetHashes.delete(n)),n===this.getDefaultIconType()&&(this.iconSubsetManifest=e,this.iconSubsetHash=e?.hash||e?.packet_sha256||"")},t.prototype.getConfiguredIconSubsetConfig=function(){const t=window.SF_BOOT_CONFIG?.icons?.staticSubset||window.SF_ICON_STATIC_SUBSET;if(!t||"object"!=typeof t)return null;const e=Array.from(new Set(i(t.icons||t.icon_names).map(t=>String(t||"").trim()))).filter(Boolean);if(!e.length)return null;const n=new Set(i(t.weights||t.weight).map(t=>String(t).trim())),s=new Set(i(t.fill??t.filled).map(t=>String(t).trim())),o=new Set(i(t.grade).map(t=>String(t).trim())),r=new Set(i(t.optical_size??t.opticalSize??t.opsz).map(t=>String(t).trim())),a=this.normalizeIconType(t.type||this.getDefaultIconType());return{icons:e,weights:n,fills:s,grades:o,opticalSizes:r,types:new Set(i(t.type||a).map(t=>this.normalizeIconType(t))),fill:s.size>0,grade:o.size?[...o].join(","):"",opticalSize:r.size?[...r].join(","):"",defaultType:a}},t.prototype.hasConfiguredIconSubset=function(){return Boolean(this.getConfiguredIconSubsetConfig())},t.prototype.ensureConfiguredIconSubsetState=function(t={}){const e=this.getConfiguredIconSubsetConfig();if(!e)return!1;const{forceLoaded:n=!1}=t;return e.icons.forEach(t=>{const i=this.uniqueIcons.has(t)?this.uniqueIcons.get(t):new Map;e.weights.size&&i.set("weight",new Set(e.weights)),e.fills.size&&i.set("filled",new Set(e.fills)),e.grades.size&&i.set("grade",new Set(e.grades)),e.opticalSizes.size&&i.set("optical-size",new Set(e.opticalSizes)),e.types.size&&i.set("type",new Set(e.types)),n?i.set("loading",!0):!0!==i.get("loading")&&i.set("loading",!1),this.uniqueIcons.set(t,i)}),!0},t.prototype.getManifestAxisValue=function(t={},e=""){if(!t||!e)return"";const n=t.axes||{},i=n[e]||n[e.toLowerCase()]||n[e.toUpperCase()];if(null==i)return"";if("object"==typeof i){if(void 0!==i.value&&null!==i.value)return String(i.value).trim();if(void 0!==i.raw&&null!==i.raw)return String(i.raw).trim()}return String(i).trim()},t.prototype.getManifestAxis=function(t={},e=""){if(!t||!e)return null;const n=t.axes||{};return n[e]||n[e.toLowerCase()]||n[e.toUpperCase()]||null},t.prototype.manifestAxisIncludesValue=function(t={},e="",n=""){const i=String(n??"").trim();if(!i)return!0;const s=this.getManifestAxis(t,e);if(null==s)return!0;if("object"!=typeof s)return String(s).trim()===i;if(void 0!==s.value&&null!==s.value&&String(s.value).trim())return String(s.value).trim()===i;if(Array.isArray(s.values))return s.values.map(t=>String(t).trim()).includes(i);const o=void 0!==s.min&&null!==s.min?Number(s.min):null,r=void 0!==s.max&&null!==s.max?Number(s.max):null,a=Number(i);if(null!==o&&null!==r&&!Number.isNaN(o)&&!Number.isNaN(r)&&!Number.isNaN(a))return a>=o&&a<=r;if(void 0!==s.raw&&null!==s.raw){const t=String(s.raw).trim();return!t||(t.includes(",")?t.split(",").map(t=>t.trim()).includes(i):t===i)}return!0},t.prototype.isIconCoveredByManifest=function(t="",e={}){const n=this.normalizeIconType(e.type||this.getDefaultIconType()),i=this.getIconManifestForType(n);if(!i||"object"!=typeof i)return!1;if(!(Array.isArray(i.icons)?i.icons:[]).includes(t))return!1;return this.getIconManifestType(i)===n&&(!(e.weight&&!this.manifestAxisIncludesValue(i,"wght",e.weight))&&(!!(!e.filled||this.getManifestAxis(i,"FILL")&&this.manifestAxisIncludesValue(i,"FILL",e.filled))&&(!(e.grade&&!this.manifestAxisIncludesValue(i,"GRAD",e.grade))&&!(e["optical-size"]&&!this.manifestAxisIncludesValue(i,"opsz",e["optical-size"])))))},t.prototype.isManifestCoveredByConfiguredSubset=function(t={}){const e=this.getConfiguredIconSubsetConfig();if(!e)return!0;const n=Array.isArray(t.icons)?t.icons:[];if(!e.icons.every(t=>n.includes(t)))return!1;const i=this.getIconManifestType(t);return![...e.types].some(t=>t!==i)&&(![...e.weights].some(e=>!this.manifestAxisIncludesValue(t,"wght",e))&&(![...e.fills].some(e=>!this.getManifestAxis(t,"FILL")||!this.manifestAxisIncludesValue(t,"FILL",e))&&(![...e.grades].some(e=>!this.manifestAxisIncludesValue(t,"GRAD",e))&&![...e.opticalSizes].some(e=>!this.manifestAxisIncludesValue(t,"opsz",e)))))},t.prototype.trackIconDescriptor=function(t="",e={}){if(!this.isIconSubsetEnabled())return 0;if(this.hasConfiguredIconSubset())return 0;const n=String(t||"").trim();if(!n)return 0;const i=this.getIconLoadAttrs(e),s=this.getLoadedIconDescriptorKey(n,i);this.iconDescriptorStates||(this.iconDescriptorStates=new Map);if(this.iconDescriptorStates.get(s)||this.loadedIcons.has(s)||this.isIconCoveredByManifest(n,i))return 0;this.iconDescriptorStates.set(s,{attrs:i,icon:n,loading:!1});const o=!this.uniqueIcons.has(n),r=o?new Map:this.uniqueIcons.get(n);let a=!1;return Object.entries(e).forEach(([t,e])=>{if(null==e||""===e)return;const n=String(e).trim();n&&(r.has(t)||(r.set(t,new Set),a=!0),r.get(t).has(n)||(r.get(t).add(n),a=!0))}),this.isIconCoveredByManifest(n,i)?(r.set("loading",!0),this.uniqueIcons.set(n,r),0):o||a?(r.set("loading",!1),this.uniqueIcons.set(n,r),1):0},t.prototype.trackIconPreload=function(t=[]){let e=0;var n;return(n=t,i(n).map(t=>"string"==typeof t?{icon:t.trim(),attrs:{}}:t&&"object"==typeof t?{icon:String(t.icon||t.name||"").trim(),attrs:{weight:t.weight,filled:c(t.filled??t.fill)?"1":void 0,grade:t.grade,"optical-size":t.opticalSize??t["optical-size"],type:t.type}}:null).filter(t=>t?.icon)).forEach(({icon:t,attrs:n})=>{e+=this.trackIconDescriptor(t,{...n,weight:n.weight??o,type:this.normalizeIconType(n.type||this.getDefaultIconType())})}),e},t.prototype.preloadIcons=function(t=[]){if(!this.isIconSubsetEnabled())return 0;const e=this.trackIconPreload(t);return e&&(this.pendingIconScanCount+=e,this.flushPendingIconScan()),e},t.prototype.preloadConfiguredIcons=function(){return this.iconPreloadApplied?0:(this.iconPreloadApplied=!0,this.trackIconPreload(window.SF_BOOT_CONFIG?.icons?.preload??window.SF_ICON_PRELOAD))},t.prototype.getStaticIconDescriptorKey=function(t="",e={}){const n=Object.entries(e).filter(([,t])=>null!=t&&""!==t).map(([t,e])=>[t,String(e).trim()]).sort(([t],[e])=>t.localeCompare(e));return JSON.stringify([String(t||"").trim(),n])},t.prototype.getIconLoadAttrs=function(t={}){const e={};return["weight","filled","grade","optical-size","type"].forEach(n=>{const i=t?.[n];null!=i&&""!==i&&(e[n]=String(i).trim())}),e.weight||(e.weight=o),e.type||(e.type=this.getDefaultIconType()),e},t.prototype.getLoadedIconDescriptorKey=function(t="",e={}){return this.getStaticIconDescriptorKey(t,this.getIconLoadAttrs(e))},t.prototype.getLoadedDescriptorKeysForIconState=function(t="",e=new Map){const n=String(t||"").trim();if(!n)return[];const i=e.get("weight"),s=e.get("filled"),r=e.get("grade"),a=e.get("type"),l=i instanceof Set&&i.size?[...i].map(t=>String(t).trim()).filter(Boolean):[o],c=s instanceof Set&&s.size?[...s].map(t=>String(t).trim()).filter(Boolean):[""],d=r instanceof Set&&r.size?[...r].map(t=>String(t).trim()).filter(Boolean):[""],u=a instanceof Set&&a.size?[...a].map(t=>this.normalizeIconType(t)).filter(Boolean):[this.getDefaultIconType()],h=new Set;return l.forEach(t=>{c.forEach(e=>{d.forEach(i=>{u.forEach(s=>{h.add(this.getLoadedIconDescriptorKey(n,{weight:t,filled:e,grade:i,type:s}))})})})}),[...h]},t.prototype.isTrackedIconLoaded=function(t){if(!t?.icon)return!1;const e=this.getIconLoadAttrs(t.attrs);if(!this.isIconSubsetEnabled())return this.isLocalIconFontReady(e.type);if(this.isIconCoveredByManifest(t.icon,e))return!0;const n=this.getLoadedIconDescriptorKey(t.icon,t.attrs);return this.loadedIcons.has(n)},t.prototype.getStaticIconElement=function(t){const e=t?.nodeType===Node.ELEMENT_NODE?t:t?.parentElement||null,n=e?.classList?.contains("sf-icon")?e:e?.closest?.(".sf-icon")||null;return n&&n.nodeType===Node.ELEMENT_NODE?"sf-icon"===n.tagName?.toLowerCase?.()?null:n.classList?.contains("sf-icon")?n.closest?.("sf-icon")||this.shouldSkipNode(n)?null:n:null:null},t.prototype.isStaticIconLoadedStateCurrent=function(t,e){return!(!t||!e)&&t.classList.contains("sf-icon-loaded")===this.isTrackedIconLoaded(e)},t.prototype.syncTrackedStaticIconElement=function(t,e){if(!t||!e||!this.staticIconDescriptorKeys)return;const n=this.getLoadedIconDescriptorKey(e.icon,e.attrs),i=this.staticIconDescriptorKeys.get(t);return i&&i!==n&&!this.isTrackedIconLoaded(e)&&t.classList.remove("sf-icon-loaded"),this.staticIconDescriptorKeys.set(t,n),i!==n},t.prototype.getTrackedIconAttrs=function(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return null;const e=String(t.getAttribute("icon")||"").trim();if(!e)return null;const n={};if(["weight","size","grade","optical-size","type"].forEach(e=>{const i=t.getAttribute(e);null!=i&&(n[e]=String(i).trim())}),t.hasAttribute("filled")){const e=t.getAttribute("filled");c(e)&&(n.filled="1")}return n.type=this.normalizeIconType(n.type||this.getDefaultIconType()),{icon:e,attrs:n}},t.prototype.getTrackedStaticIconAttrs=function(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return null;if(!t.classList?.contains("sf-icon"))return null;if(t.closest?.("sf-icon"))return null;const e=String(t.getAttribute("data-icon")||t.textContent||"").trim();if(!e)return null;const n={weight:o},i=Array.from(t.classList).find(t=>t.startsWith("sf-icon--size-"));i&&(n.size=i.replace("sf-icon--size-","").trim());for(const[e,i]of s.entries())if(t.classList.contains(e)){n.weight=i;break}for(const[e,i]of r.entries())if(t.classList.contains(e)){n.type=i;break}const a=t.getAttribute("data-weight")||t.getAttribute("weight")||t.style?.getPropertyValue?.("--sf-icon--weight");a&&(n.weight=String(a).trim());const l=String(t.style?.getPropertyValue?.("--sf-icon--fill")||"").trim();(t.classList.contains("sf-icon--filled")||t.classList.contains("sf-icon-filled")||t.hasAttribute("data-filled")&&c(t.getAttribute("data-filled"))||t.hasAttribute("filled")&&c(t.getAttribute("filled"))||""!==l&&c(l,!1))&&(n.filled="1");const d=t.getAttribute("data-type")||t.getAttribute("type")||t.style?.getPropertyValue?.("--sf-icon--type");return d&&(n.type=this.normalizeIconType(d)),{icon:e,attrs:n}},t.prototype.trackIconComponent=function(t){if(!this.isIconSubsetEnabled())return 0;const e=this.getTrackedStaticIconAttrs(t);if(!e)return 0;return!this.syncTrackedStaticIconElement(t,e)&&this.isStaticIconLoadedStateCurrent(t,e)?0:this.trackIconDescriptor(e.icon,e.attrs)},t.prototype.processStaticIconMutation=function(t,e=!0){if(!this.isIconSubsetEnabled()){const e=this.getStaticIconElement(t);return e?(this.syncStaticIconLoadedState(e),{handled:!0,iconCount:0}):{handled:!1,iconCount:0}}const n=this.getStaticIconElement(t);if(!n)return{handled:!1,iconCount:0};if(!this.getTrackedStaticIconAttrs(n))return this.staticIconDescriptorKeys?.delete?.(n),n.classList.remove("sf-icon-loaded"),{handled:!0,iconCount:0};const i=this.trackIconComponent(n);return e&&i>0?(this.mutate(()=>this.loadFonts()),{handled:!0,iconCount:i}):(this.syncStaticIconLoadedState(n),{handled:!0,iconCount:i})},t.prototype.syncStaticIconLoadedState=function(t=null){const e=t||document.body;if(!e)return;const n=(t,e)=>{t.classList.contains("sf-icon-loaded")!==e&&(e?t.classList.add("sf-icon-loaded"):t.classList.remove("sf-icon-loaded"))},i=t=>{if(!t||t.nodeType!==Node.ELEMENT_NODE)return;if("sf-icon"===t.tagName?.toLowerCase?.())return;if(t.closest?.("sf-icon"))return;if(!t.classList?.contains("sf-icon"))return;const e=this.getTrackedStaticIconAttrs(t);n(t,!!e&&this.isTrackedIconLoaded(e))};this.isSyncingStaticIconState=!0;try{e.nodeType===Node.ELEMENT_NODE&&i(e),e.querySelectorAll&&e.querySelectorAll(".sf-icon").forEach(i)}finally{this.isSyncingStaticIconState=!1}},t.prototype.scanStaticIcons=function(t=null,e=!0){const n=t?.nodeType===Node.ELEMENT_NODE?t:t?.parentElement||document.body;if(!n)return{iconCount:0};if(this.shouldSkipNode(n))return{iconCount:0};if(!this.isIconSubsetEnabled())return this.isLocalIconFontReady(this.getDefaultIconType()),this.syncStaticIconLoadedState(n),{iconCount:0};if(this.hasConfiguredIconSubset())return this.syncStaticIconLoadedState(n),{iconCount:0};let i=0;const s=t=>{t&&t.nodeType===Node.ELEMENT_NODE&&!this.shouldSkipNode(t)&&(i+=this.trackIconComponent(t))};n.nodeType===Node.ELEMENT_NODE&&s(n),n.querySelectorAll&&n.querySelectorAll(".sf-icon").forEach(s);const o={iconCount:i};return e&&i>0?(this.mutate(()=>this.loadFonts()),o):(this.syncStaticIconLoadedState(n),o)},t.prototype.trackIconElement=function(t){if(!this.isIconSubsetEnabled())return 0;const e=this.getTrackedIconAttrs(t);return e?this.trackIconDescriptor(e.icon,e.attrs):0},t.prototype.trackPendingIconScan=function(t={}){if(!this.isIconSubsetEnabled())return 0;const e=Number(t.iconCount||0);return e>0&&(this.pendingIconScanCount+=e),e},t.prototype.markManifestIconsAsLoaded=function(t={}){if(!t||"object"!=typeof t)return!1;const e=Array.isArray(t.icons)?t.icons:[];if(!e.length)return!1;const n=new Set(this.loadedIcons),i=this.getIconManifestType(t),s=this.getManifestAxis(t,"wght"),o=this.getManifestAxis(t,"FILL"),r=Array.isArray(s?.values)?s.values:s?.value?[s.value]:[400],a=Array.isArray(o?.values)?o.values:o?.value?[o.value]:[""];return e.forEach(t=>{r.forEach(e=>{a.forEach(s=>{n.add(this.getLoadedIconDescriptorKey(t,{weight:e,filled:s,type:i}))})})}),this.loadedIcons=n,!0},t.prototype.flushPendingIconScan=function({defer:t=!1}={}){if(!this.isIconSubsetEnabled())return!1;return!!this.pendingIconScanCount&&(t?(this.pendingIconFlushQueued||(this.pendingIconFlushQueued=!0,this.mutate(()=>{this.pendingIconFlushQueued=!1,this.flushPendingIconScan()})),!1):(this.pendingIconScanCount=0,this.mutate(()=>this.loadFonts()),!0))},t.prototype.handleCustomElementScanResult=function(t={},e=!0){const n={...t,keys:Array.isArray(t.keys)?t.keys:[],count:Number(t.count||0),iconCount:Number(t.iconCount||0)};return e?(n.count>0&&this.mutate(()=>this.getLoader(this.module,!0)),this.isIconSubsetEnabled()&&n.iconCount>0&&this.mutate(()=>this.loadFonts()),n):n},t.prototype.getIconSubsetHost=function(){return window.SF_BOOT_CONFIG?.icons?.subsetHost||window.SF_ICON_SUBSET_HOST||"https://icons.simai.io"},t.prototype.decodeIconManifestHeader=function(t=""){if(!t)return null;try{return JSON.parse((new TextDecoder).decode(Uint8Array.from(atob(t.replace(/-/g,"+").replace(/_/g,"/")),t=>t.charCodeAt(0))))}catch(t){return console.warn("SFLoader icon manifest decode failed",t),null}},t.prototype.getStoredIconManifest=function(t=""){const e=d().getItem(this.getIconManifestStorageKey(t));if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(t){return console.warn("SFLoader icon manifest cache parse failed",t),null}},t.prototype.getIconManifestFontFamily=function(t={}){return t.font_family?String(t.font_family):`${("sf.icon_subset.v1"===t.schema?l[this.getIconManifestType(t)]?.family:t.family)||"Material Symbols Outlined"} Subset`},t.prototype.getIconManifestType=function(t={}){const e=String(t.type||("sf.icon_subset.v1"===t.schema?t.family:"")||"").trim().toLowerCase();if(e)return this.normalizeIconType(e);const n=String(t.family||"").trim().toLowerCase();return this.normalizeIconType(a.get(n)||"outlined")},t.prototype.getIconSubsetSelector=function(t={}){const e=this.getIconManifestType(t);return"rounded"===e?".sf-icon:is(.sf-icon--rounded, .sf-icon-rounded)":"sharp"===e?".sf-icon:is(.sf-icon--sharp, .sf-icon-shape)":".sf-icon:not(.sf-icon--rounded):not(.sf-icon-rounded):not(.sf-icon--sharp):not(.sf-icon-shape)"},t.prototype.getIconFallbackFontUrl=function(t=""){const e=window.SF_BOOT_CONFIG?.icons?.fallbackFonts||window.SF_ICON_FALLBACK_FONTS||{},n=this.normalizeIconType(t),i=e[n]||e.outlined||window.SF_BOOT_CONFIG?.icons?.fallbackFontUrl||window.SF_ICON_FALLBACK_FONT_URL;if(i)return i;const s=l[n]?.file,o=String(window.sfPath||"").replace(/\/+$/,"");return s&&o?`${o}/component/icons/fonts/${s}`:""},t.prototype.buildIconFallbackCss=function(t={}){const e=this.normalizeIconType(t.type||this.getDefaultIconType()),n=this.getIconFallbackFontUrl(e),i=l[e];if(!n||!i)return"";const s=this.getIconSubsetSelector({type:e,family:i.family});return`@font-face {\n font-family: '${i.family}';\n src: url('${n}') format('${i.format}');\n font-style: normal;\n font-weight: ${i.weight};\n font-display: block;\n}\n\n${s} {\n --sf-icon--font-family: '${i.family}';\n font-family: '${i.family}';\n font-feature-settings: 'liga';\n font-variation-settings: 'FILL' var(--sf-icon--fill, 0), 'wght' var(--sf-icon--weight, 400), 'GRAD' var(--sf-icon--grade, 0), 'opsz' var(--sf-icon--optical-size, 24);\n}\n`},t.prototype.applyIconFontFallback=function(t={}){const e=Array.isArray(t.icons)?t.icons:[],n=this.normalizeIconType(t.type||this.getDefaultIconType()),i=document.querySelector(`style[data-sf-icons-fallback="${n}"]`),s=document.createElement("style");if(s.setAttribute("data-sf-icons-fallback",n),e.length&&s.setAttribute("data-sf-icons-fallback-icons",e.join(",")),s.textContent=this.buildIconFallbackCss({type:n}),!s.textContent)return!1;document.head.appendChild(s),i&&i.remove();const o=new Set(this.loadedIcons);e.forEach(t=>{const e=this.uniqueIcons.has(t)?this.uniqueIcons.get(t):new Map;e.set("loading",!0),this.uniqueIcons.set(t,e),this.getLoadedDescriptorKeysForIconState(t,e).forEach(t=>o.add(t))}),this.loadedIcons=o,this.iconSubsetPending=!1,this.iconSubsetReady=!0,this.iconFontReady=!0,this.liftIconSubsetPending(),document.body?.classList?.add("sf-icons-loaded"),this.syncStaticIconLoadedState();const r=`fallback:${n}`;return this.iconSubsetWarnings?.has(r)||(this.iconSubsetWarnings?.add(r),console.warn("SFLoader icon subset font fallback applied",{type:n,icons:e,reason:t.reason||null,url:this.getIconFallbackFontUrl(n)})),window.dispatchEvent(new CustomEvent("sf-icons-subset:ready",{detail:{icons:new Set(e),weights:[],loader:this,fallback:!0}})),!0},t.prototype.buildIconSubsetCssFromManifest=function(t={}){const e=Array.isArray(t.fonts)?t.fonts:[];if(!e.length)return{cssText:"",family:"",weights:[]};const n=this.getIconManifestFontFamily(t),i=this.getIconSubsetSelector(t),s=new Set,o=e.filter(t=>t?.url).map(e=>{const i=e.weight||t.axes?.wght?.value||400;return s.add(String(i)),`@font-face {\n font-family: '${n}';\n src: url('${e.url}') format('woff2');\n font-style: normal;\n font-weight: ${i};\n font-display: block;\n}\n`}).join("\n");if(!o)return{cssText:"",family:n,weights:[...s]};return{cssText:o+"\n"+`${i} {\n`+` --sf-icon--font-family: '${n}';\n --sf-icon--font--weight: var(--sf-icon--weight, 400);\n font-feature-settings: 'liga';\n font-variation-settings: 'FILL' var(--sf-icon--fill, 0), 'wght' var(--sf-icon--weight, 400), 'GRAD' var(--sf-icon--grade, 0), 'opsz' var(--sf-icon--optical-size, 24);\n}\n`,weights:[...s]}},t.prototype.applyIconManifest=function(t={},e={}){if(!this.isIconSubsetEnabled())return!1;if(!t||"object"!=typeof t)return!1;const{cssText:i,weights:s}=this.buildIconSubsetCssFromManifest(t),o=e.cssText||i;if(!o)return!1;const r=Array.isArray(t.icons)?t.icons:[],a=this.getIconManifestType(t),l=document.querySelector(`style[data-sf-icons-subset-family="${a}"]`),c=document.createElement("style");c.setAttribute("data-sf-icons-subset",r.join(",")),c.setAttribute("data-sf-icons-subset-family",a),t.hash&&c.setAttribute("data-sf-icons-subset-hash",t.hash),c.textContent=o,this.setIconManifestForType(a,t),this.markManifestIconsAsLoaded(t),this.iconSubsetPending=!0,this.iconSubsetReady=!1,document.head.appendChild(c);const d=Array.isArray(t.fonts)&&t.fonts.length?this.verifyIconManifestFonts(t,{icons:r,weights:s}):this.verifyIconCssFonts(o,{icons:r});return this.iconSubsetPromise=d.then(async()=>{this.ensureConfiguredIconSubsetState({forceLoaded:!0}),r.forEach(t=>{const e=this.uniqueIcons.has(t)?this.uniqueIcons.get(t):new Map;!1===e.get("loading")||e.set("loading",!0),s.length&&(e.has("weight")||e.set("weight",new Set),s.forEach(t=>{e.get("weight").add(String(t))})),this.uniqueIcons.set(t,e)});const t=new Set(this.loadedIcons);r.forEach(e=>{const n=this.uniqueIcons.get(e);this.getLoadedDescriptorKeysForIconState(e,n).forEach(e=>t.add(e))}),this.loadedIcons=t,this.iconSubsetPending=!1,this.iconSubsetReady=!0,this.liftIconSubsetPending(),await new Promise(t=>requestAnimationFrame(t)),await new Promise(t=>requestAnimationFrame(t)),l&&l.remove(),window.dispatchEvent(new CustomEvent("sf-icons-subset:ready",{detail:{icons:new Set(r),weights:s,loader:this,fromCache:!!e.fromCache}})),this.syncStaticIconLoadedState()}).catch(i=>{this.iconSubsetPending=!1,this.iconSubsetReady=!1,this.setIconManifestForType(a,null),c.remove(),n?.(this.getIconManifestStorageKey(a)),console.warn("SFLoader cached icon manifest failed",i),this.applyIconFontFallback({icons:r,type:this.getIconManifestType(t),reason:i}),e.fromCache||this.loadFonts()}).finally(()=>{const t=this.iconSubsetNeedsReload;this.iconSubsetNeedsReload=!1,this.iconSubsetPromise=null,t&&this.loadFonts()}),!0},t.prototype.verifyIconManifestFonts=async function(t={},e={}){if(!this.isIconSubsetEnabled())return!1;const n=e.icons||(Array.isArray(t.icons)?t.icons:[]),i=Array.isArray(t.fonts)?t.fonts:[];if(!n.length||!i.length)throw new Error("Icon manifest has no icons or fonts");if(!document.fonts?.load)return!0;const s=this.getIconManifestFontFamily(t),r=n.join(" ");await new Promise(t=>requestAnimationFrame(t));if(!(await Promise.all(i.map(e=>{const n=m(e.weight||t.axes?.wght?.value||o);return document.fonts.load(`${n} 16px "${s}"`,r)}))).reduce((t,e)=>t+e.length,0))throw new Error("Icon manifest fonts were not loaded");return document.fonts.ready&&await document.fonts.ready,!0},t.prototype.extractIconFontFacesFromCss=function(t=""){const e=[];return(String(t||"").match(/@font-face\s*{[^}]*}/gim)||[]).forEach(t=>{const n=t.match(/font-family\s*:\s*['"]?([^;'"}]+)['"]?/i),i=t.match(/font-weight\s*:\s*([^;]+)/i),s=n?.[1]?.trim();s&&e.push({family:s,weight:i?.[1]?.trim()||o})}),e},t.prototype.extractIconFontFaceCss=function(t=""){return(String(t||"").match(/@font-face\s*{[^}]*}/gim)||[]).join("\n")},t.prototype.verifyIconCssFonts=async function(t="",e={}){if(!this.isIconSubsetEnabled())return!1;if(!document.fonts?.load)return!0;const n=e.icons||[],i=Array.isArray(n)?n.join(" "):String(n||""),s=this.extractIconFontFacesFromCss(t);if(!s.length||!i)return!0;await new Promise(t=>requestAnimationFrame(t));if(!(await Promise.all(s.map(({family:t,weight:e})=>document.fonts.load(`${m(e)} 16px "${t}"`,i)))).reduce((t,e)=>t+e.length,0))throw new Error("Icon subset CSS fonts were not loaded");return document.fonts.ready&&await document.fonts.ready,!0},t.prototype.restoreIconManifestFromCache=function(){if(!this.isIconSubsetEnabled())return!1;const t=this.getIconSubsetRequestConfig().defaultType,e=this.getStoredIconManifest(t);if(!e)return!1;return this.getIconManifestType(e)===t&&this.isManifestCoveredByConfiguredSubset(e)?this.applyIconManifest(e,{fromCache:!0}):(n?.(this.getIconManifestStorageKey(t)),this.setIconManifestForType(t,null),!1)},t.prototype.getIconSubsetRequestConfig=function(){const t=!0===window.SF_BOOT_CONFIG?.icons?.accumulate;if(!this.isIconSubsetEnabled())return{icons:[],weights:new Set,fill:!1,types:new Set,defaultType:this.getDefaultIconType(),accumulate:t};const e=this.getConfiguredIconSubsetConfig();if(e)return this.ensureConfiguredIconSubsetState(),{icons:e.icons,weights:e.weights,fill:e.fill,grade:e.grade,opticalSize:e.opticalSize,types:e.types,defaultType:e.defaultType,accumulate:t};const n=[...this.uniqueIcons.keys()],i=new Set,s=new Set;let o=!1;const r=new Set,a=new Set,l=this.getDefaultIconType();return this.uniqueIcons.forEach(t=>{const e=t.get("weight"),n=t.get("filled"),c=t.get("grade"),d=t.get("optical-size"),u=t.get("type");if(n&&(o=!0),u){(u instanceof Set||Array.isArray(u)?u:[u]).forEach(t=>{const e=this.normalizeIconType(t);e!==l&&s.add(e)})}if(!e)return c instanceof Set||Array.isArray(c)?c.forEach(t=>r.add(String(t))):c&&r.add(String(c)),void(d instanceof Set||Array.isArray(d)?d.forEach(t=>a.add(String(t))):d&&a.add(String(d)));e instanceof Set||Array.isArray(e)?e.forEach(t=>i.add(String(t))):i.add(String(e)),c instanceof Set||Array.isArray(c)?c.forEach(t=>r.add(String(t))):c&&r.add(String(c)),d instanceof Set||Array.isArray(d)?d.forEach(t=>a.add(String(t))):d&&a.add(String(d))}),{icons:n,weights:i,fill:o,grade:r.size?[...r].join(","):"",opticalSize:a.size?[...a].join(","):"",types:s,defaultType:l,accumulate:t}},t.prototype.bootstrapConfiguredIconSubset=function(){return!!this.isIconSubsetEnabled()&&(!!this.hasConfiguredIconSubset()&&(this.ensureConfiguredIconSubsetState(),this.iconSubsetPending||this.iconSubsetReady||this.iconSubsetPromise||this.mutate(()=>this.loadFonts()),!0))},t.prototype.getIconSubsetRequestConfigs=function(){const t=this.getIconSubsetRequestConfig(),e=new Map,n=n=>{const i=this.normalizeIconType(n);return e.has(i)||e.set(i,{accumulate:t.accumulate,defaultType:i,fill:!1,grade:new Set,opticalSize:new Set,icons:new Set,weights:new Set}),e.get(i)};if(this.uniqueIcons.forEach((e,i)=>{const s=e.get("type"),o=s instanceof Set||Array.isArray(s)?[...s]:[s||t.defaultType],r=e.get("weight"),a=r instanceof Set||Array.isArray(r)?[...r]:r?[r]:[],l=e.get("grade"),c=l instanceof Set||Array.isArray(l)?[...l]:l?[l]:[],d=e.get("optical-size"),u=d instanceof Set||Array.isArray(d)?[...d]:d?[d]:[];o.forEach(t=>{const s=n(t);s.icons.add(i),a.forEach(t=>s.weights.add(String(t))),c.forEach(t=>s.grade.add(String(t))),u.forEach(t=>s.opticalSize.add(String(t))),e.get("filled")&&(s.fill=!0)})}),!e.size&&t.icons.length){(t.types?.size?[...t.types]:[t.defaultType]).forEach(e=>{const i=n(e);t.icons.forEach(t=>i.icons.add(t)),t.weights.forEach(t=>i.weights.add(t)),String(t.grade||"").split(",").filter(Boolean).forEach(t=>i.grade.add(t)),String(t.opticalSize||"").split(",").filter(Boolean).forEach(t=>i.opticalSize.add(t)),i.fill=t.fill})}return[...e.values()].map(t=>({...t,grade:[...t.grade].sort().join(","),opticalSize:[...t.opticalSize].sort().join(","),icons:[...t.icons].sort()})).sort((t,e)=>t.defaultType.localeCompare(e.defaultType))},t.prototype.loadIconSubsetFamily=async function(t){const{defaultType:i,icons:s}=t;if(!s.length)return!1;const o=this.getIconSubsetHost(),r=new URLSearchParams({icon_names:s.join(","),type:i});t.weights.size&&r.set("weight",[...t.weights].sort().join(",")),t.fill&&r.set("fill","1"),t.grade&&r.set("grade",t.grade),t.opticalSize&&r.set("optical_size",t.opticalSize),t.accumulate&&r.set("accumulate","true");let a=null,l=null;try{const t=await fetch(`${o}/ms/css?${r.toString()}`,{cache:"reload"});if(!t.ok)throw new Error(`HTTP ${t.status}`);a=this.decodeIconManifestHeader(t.headers.get("X-SIMAI-Font-Manifest"));const n=await t.text(),c=a?this.getIconManifestType(a):i;if(a&&c!==i)throw new Error(`Icon subset family mismatch: requested ${i}, received ${c}`);const d=document.querySelector(`style[data-sf-icons-subset-family="${i}"]`),u=document.createElement("style");return u.setAttribute("data-sf-icons-subset",s.join(",")),u.setAttribute("data-sf-icons-subset-family",i),u.textContent=n,document.head.appendChild(u),l=u,a?(e?.(this.getIconManifestStorageKey(i),JSON.stringify(a)),this.setIconManifestForType(i,a),this.markManifestIconsAsLoaded(a),Array.isArray(a.fonts)&&a.fonts.length?await this.verifyIconManifestFonts(a,{icons:s}):await this.verifyIconCssFonts(n,{icons:s})):await this.verifyIconCssFonts(n,{icons:s}),document.fonts?.ready&&await document.fonts.ready,this.liftIconSubsetPending(),await new Promise(t=>requestAnimationFrame(t)),await new Promise(t=>requestAnimationFrame(t)),d?.remove?.(),!0}catch(t){return l?.remove?.(),this.setIconManifestForType(i,null),n?.(this.getIconManifestStorageKey(i)),this.applyIconFontFallback({icons:s,reason:t,type:i})}},t.prototype.loadFonts=async function(){if(!this.isIconSubsetEnabled())return!1;if(!1===this.eventSend&&!this.iconFirstRequestReleased)return this.iconFirstRequestHeld||(this.iconFirstRequestHeld=new Promise(t=>{let e=0;const n=()=>{window.removeEventListener("sf-loader-ready",n),clearTimeout(e),requestAnimationFrame(()=>setTimeout(t,0))};e=setTimeout(n,2500),window.addEventListener("sf-loader-ready",n)}).then(()=>(this.iconFirstRequestReleased=!0,this.iconFirstRequestHeld=null,this.loadFonts()))),this.iconFirstRequestHeld;if(this.ensureConfiguredIconSubsetState(),this.preloadConfiguredIcons(),this.iconSubsetPending&&this.iconSubsetPromise)return this.iconSubsetNeedsReload=!0,this.iconSubsetPromise;const t=Array.from(this.uniqueIcons).filter(([,t])=>!1===t.get("loading")),e=Array.from(this.iconDescriptorStates||new Map).filter(([,t])=>!1===t.loading);if(!t.length&&!e.length)return this.iconSubsetPromise||!1;t.forEach(([,t])=>t.set("loading",!0)),e.forEach(([,t])=>{t.loading=!0}),this.iconSubsetPending=!0,this.iconSubsetReady=!1;const n=this.getIconSubsetRequestConfigs();return this.iconSubsetPromise=Promise.all(n.map(t=>this.loadIconSubsetFamily(t))).then(i=>{const s=new Set(this.loadedIcons);return e.length?e.forEach(([t])=>s.add(t)):t.forEach(([t,e])=>{this.getLoadedDescriptorKeysForIconState(t,e).forEach(t=>s.add(t))}),this.loadedIcons=s,this.iconSubsetPending=!1,this.iconSubsetReady=i.every(Boolean),window.dispatchEvent?.(new CustomEvent("sf-icons-subset:ready",{detail:{icons:new Set([...t.map(([t])=>t),...e.map(([,t])=>t.icon)]),loader:this,types:n.map(t=>t.defaultType)}})),this.syncStaticIconLoadedState(),this.iconSubsetReady}).finally(()=>{const t=this.iconSubsetNeedsReload;this.iconSubsetNeedsReload=!1,this.iconSubsetPromise=null,t&&this.loadFonts()}),this.iconSubsetPromise}}(pt,{safeSetItem:St,safeRemoveItem:bt}),pt.prototype.setModule=function(t=!1){t&&(this.module[t]=t)},pt.prototype.getModuleArray=function(){const t=[];if(this.module)for(const e in this.module)t.push(e);return t},pt.prototype.getObjectArray=function(t){const e=[];if(t)for(const n in t)e.push(n);return e},pt.prototype.runPreloader=function(){if(!this.usePreloader)return!1;const t=document.querySelector(".sf-loader"),e=t&&t.querySelector(".sf-loader-block")&&t.querySelector(".sf-loader-block");if(t&&e)return this.debug("SFLoaderPlugin: reuse boot preloader"),this.preloaderWrap=e,this.preloaderRun=!0,t.setAttribute("data-sf-observer","ignore"),t.classList.remove("hidden"),t.style.opacity="1",e.classList.contains("sf-loader-boot")||this.rotatePreloader(),!0;this.debug("SFLoaderPlugin: preloader is run");const n=this.contentPreloader;this.debug("SFLoaderPlugin: sf-loader is null");const i=document.createElement("div"),s=document.createElement("div");i.classList.add("sf-loader",this.modifierPreloader),i.setAttribute("data-sf-observer","ignore"),i.setAttribute("style",this.tempLoaderStyles),""!==this.backgroundPreloader&&(i.style.background=this.backgroundPreloader),s.classList.add("sf-loader-block"),document.documentElement.style.setProperty("--rotation-angle","0deg"),s.setAttribute("style","display:flex; width: 100%;height: 100%;align-items: center;justify-content: center; transition: .2s all ease-in-out;"),s.innerHTML=n,i.append(s),document.body.append(i),this.preloaderWrap=s,this.rotatePreloader(),this.preloaderRun=!0},pt.prototype.rotatePreloader=function(){(0,y.VE)(this.preloaderWrap,()=>this.preloaderRun,this.preloader)},pt.prototype.stopAnimation=function(){clearInterval(this.arrowInterval),this.preloaderWrap&&(0,y.$Y)(this.preloaderWrap)},pt.prototype.stopPreloader=function(){if(!!!document.querySelector(".sf-loader")&&!this.preloaderRun)return;document.body.style.opacity="1",this.preloaderRun=!1,window.SF_BOOT_CONFIG?.preloader&&(window.SF_BOOT_CONFIG.preloader.preloaderActive=!1),this.debug("SFLoaderPlugin: Stop preloader"),this.stopAnimation();document.querySelectorAll(".sf-loader").forEach(t=>{t.classList.add("hidden")})},pt.prototype.dispatchReadyOnce=function(){if(this.eventSend)return!1;const t=window.SF?.__internal?.runtimeLoading;if(t&&!window.SF.__internal.runtimeSettled)return this.readyWaitsForRuntime||(this.readyWaitsForRuntime=!0,t.catch(()=>null).then(()=>new Promise(t=>setTimeout(t,0))).then(()=>{this.readyWaitsForRuntime=!1,this.dispatchReadyOnce()})),!1;try{return window.dispatchEvent(new CustomEvent("sf-loader-ready",{detail:{message:"All components loaded.",timestamp:Date.now()}})),this.eventSend=!0,this.prefetchLazyRelations(),!0}catch(t){return console.warn("sf-loader-ready dispatch failed",t),!1}},pt.prototype.getAssets=function(t){this.plugins=document.querySelectorAll("[sf-asset]");const e=[];if(this.plugins.length>0)return this.plugins.forEach(n=>{const i=n.getAttribute("sf-asset");t&&this.debug("SFLoaderPlugin: searchAttr is run!"),this.setModule(i),e.push(i)}),e},pt.prototype.searchAttr=function(){this.plugins=document.querySelectorAll("[sf-asset]"),this.debug(`this.plugins.length: ${this.plugins.length}`),this.plugins.length>0&&this.plugins.forEach(t=>{const e=t.getAttribute("sf-asset");this.setModule(e)})},pt.prototype.getPluginName=function(t){if("string"==typeof t){if(""!==t.split(this.delimiterURL).pop())return t.split(this.delimiterURL).pop();{const e=t.split(this.delimiterURL);return e[e.length-2]}}return!1},pt.prototype.setCookie=function(t,e,n=30){const i=new Date;i.setTime(i.getTime()+86400*n*1e3);try{return document.cookie=t+"="+encodeURIComponent(e)+(null==n?"":"; expires="+i.toUTCString())+"; path=/",!0}catch{return!1}},pt.prototype.getCookie=function(t){let e="";try{e=document.cookie}catch{return""}if(e.length>0){let n=e.indexOf(t+"=");if(-1!==n){n=n+t.length+1;let i=e.indexOf(";",n);return-1===i&&(i=e.length),encodeURI(e.substring(n,i))}}return""},pt.prototype.checkCookie=function(t){return null!=(t=this.module[t])&&""!==t},pt.prototype.getApartCookie=function(t){let e="";try{e=document.cookie}catch{e=""}if(e.length>0){let n=e.indexOf(t+"=");if(-1!==n){n=n+t.length+1;let i=e.indexOf(";",n);return-1===i&&(i=e.length),encodeURI(e.substring(n,i)).split(",")}}return[]},pt.prototype.isExistPluginCookie=function(t){const e=this.getApartCookie("SF_LOADER");if(e.length>0)for(let n=0;n<e.length;n++)if(e[n]===t)return!0;return!1},pt.prototype.getFakeTemplates=async function(){return null},pt.prototype.checkEventsPlugins=function(t){-1===this.eventsPlugins.indexOf(t)&&this.eventsPlugins.push(t)},pt.prototype.checkFake=async function(){return null},pt.prototype.setLocalStorage=function(t,e){const n=JSON.stringify({templates:t,cache:e});St(`SF_SMART_LIST-${this.urlHash}`,s(n))},pt.prototype.setCacheContent=async function(t,e){return this.setLocalStorage(t,e),!0},pt.prototype.isLoaded=function(t,e){for(const n of[t,wt(t)]){if(!n)continue;const t="style"===e?`link[href*="${n}"]`:`script[src*="${n}"]`;if(null!==document.querySelector(t))return!0}return!1},pt.prototype.excludedTags=function(t){return-1===["script","style","yamap","head","meta","link"].indexOf(t)};const Et='[data-sf-observer="ignore"]';pt.prototype.createFilteredElementWalker=function(t){return document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>this.shouldSkipOwnNode(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT})},pt.prototype.shouldSkipOwnNode=function(t){return!t?.tagName||(!!t.matches?.(Et)||!this.excludedTags(t.tagName.toLowerCase()))},pt.prototype.shouldSkipNode=function(t){if(!t)return!0;const e=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement||null;if(!e||!e.tagName)return!0;if(t.nodeType===Node.COMMENT_NODE&&t.nodeValue?.startsWith("sf-shortcode "))return!1;if(e.closest?.(Et))return!0;const n=e.tagName.toLowerCase();return!this.excludedTags(n)},pt.prototype.getRuleRegexSource=function(t){if(!t)return"";const e=t.regex?t.regex:t;return e instanceof RegExp?e.source:"string"==typeof e?e:""},pt.prototype.extractRuleAttributeTargets=function(t){const e=this.getRuleRegexSource(t),n=new Set,i=new Set;if(!e)return{attrs:n,prefixes:i};(t instanceof RegExp||"string"==typeof t||/class|\\b|\\s|\(\?:\^\|\\s\)|sf-|[a-z0-9_-]+:/i.test(e))&&n.add("class");return(e.match(/data-[a-z0-9_]+(?:-[a-z0-9_]+)*/gi)||[]).forEach(t=>{const s=t.toLowerCase();n.add(s),e.includes(`${t}-`)&&i.add(`${s}-`)}),["id","href","src","type","name","role","for"].forEach(t=>{new RegExp(`(^|[^a-z0-9_-])${t}([^a-z0-9_-]|$)`,"i").test(e)&&n.add(t)}),{attrs:n,prefixes:i}},pt.prototype.extractRuleClassHints=function(t){const e=this.getRuleRegexSource(t).replace(/\\b/g," ").replace(/\\:/g,":").replace(/\\-/g,"-");if(!e)return[];const n=new Set,i=e.matchAll(/([a-z0-9]+:)?\(\?:([a-z0-9_|:-]+)\)-/gi);for(const t of i){const e=(t[1]||"").toLowerCase();String(t[2]||"").split("|").map(t=>t.trim().toLowerCase()).filter(Boolean).forEach(t=>{n.add(`${e}${t}-`)})}(e.match(/[a-z][a-z0-9_:-]{2,}/gi)||[]).forEach(t=>{const e=t.toLowerCase();["class","data","regex","true","false","component","default"].includes(e)||n.add(e)});return(e.match(/[a-z0-9]+(?::)?-/gi)||[]).forEach(t=>n.add(t.toLowerCase())),[...n].filter(t=>t.length>1)},pt.prototype.doesClassRuleMatchHints=function(t,e=""){const n=t.classHints||[];if(!n.length)return!0;const i=` ${String(e).toLowerCase()} `,s=String(e).toLowerCase().split(/\s+/).filter(Boolean);return n.some(t=>t.endsWith("-")||t.endsWith(":")?s.some(e=>e.startsWith(t)):i.includes(` ${t} `)||s.some(e=>e.startsWith(`${t}-`)))},pt.prototype.shouldUseClassFallbackRule=function(t){const e=this.getRuleRegexSource(t);return!!e&&/\\b|\\s|\(\?:|\||\[[^\]]|\^|\$|\(\?=|\(\?!/.test(e)},pt.prototype.getAttributeRuleIndex=function(){if(this.attributeRuleIndex)return this.attributeRuleIndex;const t=new Map,e=new Map,n=[],i=[],s=[],o=[];return Object.entries(this.findPlugins||{}).forEach(([r,a])=>{if(!(a instanceof RegExp||"string"==typeof a||a&&"object"==typeof a&&a.regex)||this.module[r])return;const l={key:r,rule:a,classHints:this.extractRuleClassHints(a)},{attrs:c,prefixes:d}=this.extractRuleAttributeTargets(a),u=c.has("class")&&this.shouldUseClassFallbackRule(a);c.size||d.size?(c.forEach(s=>{if(t.has(s)||t.set(s,[]),t.get(s).push(l),"class"===s){if(u)return void i.push(l);l.classHints.forEach(t=>{t.endsWith("-")||t.endsWith(":")?n.push({prefix:t,indexedRule:l}):(e.has(t)||e.set(t,[]),e.get(t).push(l))})}}),d.forEach(t=>{s.push({prefix:t,indexedRule:l})})):o.push(l)}),this.attributeRuleIndex={byAttr:t,byClassHint:e,classPrefixRules:n,classFallback:i,prefixRules:s,fallback:o},this.attributeRuleIndex},pt.prototype.clearAttributeRuleIndex=function(){this.attributeRuleIndex=null},pt.prototype.shouldRuleUseRegexpScan=function(t){if(!t)return!1;if(t.tags)return!1;const e=this.getRuleRegexSource(t);return!!e&&(!!/data-[a-z0-9_]+(?:-[a-z0-9_]+)*/i.test(e)||!!/</.test(e))},pt.prototype.getRegexpScanRules=function(){return this.regexpScanRules||(this.regexpScanRules=Object.entries(SF.RuleLoader||{}).filter(([,t])=>this.shouldRuleUseRegexpScan(t))),this.regexpScanRules.filter(([t])=>!this.module[t])},pt.prototype.clearRegexpScanRules=function(){this.regexpScanRules=null},pt.prototype.doesRuleMatchAttributes=function(t,e,n=""){const i=t?.regex?t.regex:t,s=i instanceof RegExp?i:new RegExp(i,i?.flags||""),o=t=>((s.global||s.sticky)&&(s.lastIndex=0),s.test(t));return!!o(e)||String(n).split(/\s+/).filter(Boolean).some(t=>o(t))},pt.prototype.hasRelevantRuleAttributes=function(t){if(!t||!t.getAttributeNames)return!1;const e=this.getAttributeRuleIndex(),n=t.getAttributeNames();for(let i=0;i<n.length;i++){const s=n[i].toLowerCase();if("class"===s&&t.getAttribute("class")&&(e.byClassHint.size||e.classPrefixRules.length||e.classFallback.length))return!0;if(e.byAttr.has(s))return!0;if(e.prefixRules.some(({prefix:t})=>s.startsWith(t)))return!0;if(e.fallback.length)return!0}return!1},pt.prototype.getAttributes=function(t){const e=this.profileStart("getAttributes"),n=[],i=[];let s=0;const o=t.classList?.contains("sf-icon");o&&!t.closest?.("sf-icon")&&this.trackIconComponent(t);const r=t.getAttributeNames();if(r.length)for(const e in r){const i=r[e],s=t.getAttribute(i);let o=s;if("class"===i&&s){const e=h(s);e!==s&&(t.setAttribute("class",e),o=e)}n.push(`${i}="${o}"`)}const a=n.join(" "),l=a.length>2048?a.slice(0,2048):a,c={keys:i,count:s};if(!l)return this.attrMatchCache.set(l,c),this.profileEnd(e,{cacheHit:!1,attributeCount:r.length,candidates:0,found:s,tagName:t.tagName?.toLowerCase?.()}),c;if(this.attrMatchCache.has(l)){const n=this.attrMatchCache.get(l);return n.keys.forEach(t=>this.setExistCookie(t)),this.profileEnd(e,{cacheHit:!0,attributeCount:r.length,found:n.count,tagName:t.tagName?.toLowerCase?.()}),n}const d=this.getAttributeRuleIndex(),u=new Map,f=t.getAttribute("class")||"";r.forEach(t=>{const e=t.toLowerCase();if("class"===e){f.toLowerCase().split(/\s+/).filter(Boolean).forEach(t=>{(d.byClassHint.get(t)||[]).forEach(t=>u.set(t.key,t.rule)),d.classPrefixRules.forEach(({prefix:e,indexedRule:n})=>{t.startsWith(e)&&u.set(n.key,n.rule)})}),d.classFallback.forEach(t=>{u.set(t.key,t.rule)})}else{(d.byAttr.get(e)||[]).forEach(t=>u.set(t.key,t.rule))}d.prefixRules.forEach(({prefix:t,indexedRule:n})=>{e.startsWith(t)&&u.set(n.key,n.rule)})}),d.fallback.forEach(t=>{u.set(t.key,t.rule)});for(const[t,e]of u){if(this.module[t])continue;if(!(e instanceof RegExp||"string"==typeof e||e&&"object"==typeof e&&e.regex))continue;this.doesRuleMatchAttributes(e,l,f)&&!this.module[t]&&(i.push(t),s++,this.setExistCookie(t))}return c.count=s,this.attrMatchCache.set(l,c),this.profileEnd(e,{cacheHit:!1,attributeCount:r.length,candidates:u.size,found:s,tagName:t.tagName?.toLowerCase?.()}),c};const It=/^[a-z][a-z0-9]*-[a-z0-9-]*$/;pt.prototype.getCustomElementRules=function(){const t={};return Object.entries(this.findPlugins||{}).forEach(([e,n])=>{n&&"object"==typeof n&&Array.isArray(n.tags)&&n.tags.forEach(i=>{const s=String(i||"").trim().toLowerCase();(function(t,e){return!!t.startsWith("sf-")||Boolean(e?.package)&&It.test(t)})(s,n)&&(t[s]=e)})}),t},pt.prototype.getSmartElementRuleName=function(t){const e=t?.tagName?.toLowerCase?.()||"";return e.includes("-")&&this.getCustomElementRules()[e]||""},pt.prototype.findNearestSmartParent=function(t){let e=t?.parentElement||null;for(;e;){if(this.getSmartElementRuleName(e))return e;e=e.parentElement}return null},pt.prototype.shouldDeferNestedSmartElement=function(t){if(!this.getSmartElementRuleName(t))return!1;const e=this.findNearestSmartParent(t);return!!e&&!0!==e.__sfSourceCaptured},pt.prototype.prepareSmartChildScanEvents=function(){this.smartChildScanEventsBound||(this.smartChildScanEventsBound=!0,document.addEventListener("sf-after-render",t=>{const e=t.target;e instanceof Element&&this.getSmartElementRuleName(e)&&this.scanCustomElements(e,!0)}))},pt.prototype.scanCustomElements=function(t=null,e=!0,{subtree:n=!0}={}){const i=this.profileStart("scanCustomElements"),s=t||document.body;if(!s)return this.profileEnd(i,{skipped:!0,reason:"empty-host"}),{keys:[],count:0};if(s.nodeType===Node.ELEMENT_NODE&&this.shouldSkipNode(s))return this.profileEnd(i,{skipped:!0,reason:"ignored-host"}),{keys:[],count:0};const o=this.getCustomElementRules();if(!Object.keys(o).length)return this.profileEnd(i,{skipped:!0,reason:"empty-tag-rules"}),{keys:[],count:0};const r=[];let a=0,l=0,c=0;const d=(t,e=!1)=>{if(!t||t.nodeType!==Node.ELEMENT_NODE||!e&&this.shouldSkipNode(t))return;c++;const n=t.tagName?.toLowerCase?.();if(!n||!n.includes("-"))return;const i=o[n];"cl-icons"===i&&(l+=this.trackIconElement(t)),!i||this.module[i]||this.shouldDeferNestedSmartElement(t)||(r.push(i),a++,this.setExistCookie(i))};if(s.nodeType===Node.ELEMENT_NODE&&d(s),n){const t=this.createFilteredElementWalker(s);for(;t.nextNode();)d(t.currentNode,!0)}const u=this.handleCustomElementScanResult({keys:r,count:a,iconCount:l},e);return this.profileEnd(i,{scannedNodes:c,found:a,icons:l,autoLoad:e,root:s===document.body?"body":s.tagName?.toLowerCase?.()}),u},pt.prototype.scanAttributes=function(t=null){const e=this.profileStart("scanAttributes"),n=t||document.body;if(!n)return this.profileEnd(e,{skipped:!0,reason:"empty-host"}),{keys:[],count:0};if(n.nodeType===Node.ELEMENT_NODE&&this.shouldSkipNode(n))return this.profileEnd(e,{skipped:!0,reason:"ignored-host"}),{keys:[],count:0};const i=[];let s=0,o=0,r=0;const a=t=>{if(this.shouldSkipNode(t))return;if(!this.hasRelevantRuleAttributes(t))return void r++;o++;const e=this.getAttributes(t);s+=e.count,i.push(...e.keys)};n.nodeType===Node.ELEMENT_NODE&&a(n);const l=this.createFilteredElementWalker(n);for(;l.nextNode();)a(l.currentNode);return s>0&&this.mutate(()=>this.getLoader(this.module,!0)),this.profileEnd(e,{scannedNodes:o,skippedNodes:r,found:s,root:n===document.body?"body":n.tagName?.toLowerCase?.()}),{keys:i,count:s}},pt.prototype.scanDom=function(t=null,e=!0){const n=this.profileStart("scanDom"),i=t||document.body;if(!i)return this.profileEnd(n,{skipped:!0,reason:"empty-host"}),{custom:{keys:[],count:0,iconCount:0},attributes:{keys:[],count:0},icons:{iconCount:0}};if(i.nodeType===Node.ELEMENT_NODE&&this.shouldSkipNode(i))return this.profileEnd(n,{skipped:!0,reason:"ignored-host"}),{custom:{keys:[],count:0,iconCount:0},attributes:{keys:[],count:0},icons:{iconCount:0}};const s=this.getCustomElementRules(),o=[],r=[];let a=0,l=0,c=0,d=0,u=0,h=0,f=0;const p=t=>{if(!t||t.nodeType!==Node.ELEMENT_NODE||this.shouldSkipNode(t))return;u++;const e=t.tagName?.toLowerCase?.();if(e?.includes("-")){const n=s[e];"cl-icons"===n&&(c+=this.trackIconElement(t)),!n||this.module[n]||this.shouldDeferNestedSmartElement(t)||(o.push(n),a++,this.setExistCookie(n))}if(t.classList?.contains("sf-icon")&&!t.closest?.("sf-icon")&&(d+=this.trackIconComponent(t)),this.hasRelevantRuleAttributes(t)){h++;const e=this.getAttributes(t);l+=e.count,r.push(...e.keys)}else f++};i.nodeType===Node.ELEMENT_NODE&&p(i);const g=this.createFilteredElementWalker(i);for(;g.nextNode();)p(g.currentNode);const m=this.handleCustomElementScanResult({keys:o,count:a,iconCount:c},e);l>0&&e&&this.mutate(()=>this.getLoader(this.module,!0)),e&&d>0&&this.mutate(()=>this.loadFonts());const y={custom:m,attributes:{keys:r,count:l},icons:{iconCount:d}};return this.profileEnd(n,{scannedNodes:u,customFound:a,attributeFound:l,customIcons:c,staticIcons:d,attributeScannedNodes:h,attributeSkippedNodes:f,root:i===document.body?"body":i.tagName?.toLowerCase?.()}),y},pt.prototype.getMutationNodeHost=function(t){return t?t.nodeType===Node.ELEMENT_NODE?t:t.parentElement||null:null},pt.prototype.doesMutationRootCoverNode=function(t,e){if(!t||!e)return!1;if(t===e)return!0;const n=this.getMutationNodeHost(t),i=this.getMutationNodeHost(e);return!(!n||!i)&&(t.nodeType===Node.ELEMENT_NODE&&n.contains(i))},pt.prototype.isCoveredByMutationRoots=function(t,e,{self:n=!0}={}){if(!t||!e.size)return!1;if(n&&e.has(t))return!0;let i=t.parentNode;for(;i;){if(e.has(i))return!0;i=i.parentNode}return!1},pt.prototype.collectUniqueAddedMutationRoots=function(t=[]){const e=new Set;for(let n=0;n<t.length;n++){const i=t[n];if(i&&"childList"===i.type&&i.addedNodes?.length)for(let t=0;t<i.addedNodes.length;t++){const n=i.addedNodes[t];n&&!this.shouldSkipNode(n)&&e.add(n)}}return[...e].filter(t=>!this.isCoveredByMutationRoots(t,e,{self:!1}))},pt.prototype.search=function(){const t=[];let e=0;const n=[],i=this,s={utility:{},component:{},smart:{},relation:{}};let o=[],r=null;const a=i=>{if(this.stopObserver)return!1;const o=this.profileStart("MutationObserver.processChanges"),r=this.collectUniqueAddedMutationRoots(i),a=new Set(r);let l=0,c=0;r.forEach(i=>{if(this.shouldSkipNode(i))return;l++,this.findShortCodes(i);const o=this.scanCustomElements(i,!1);if(o.count>0&&(e+=o.count,n.push(...o.keys)),this.trackPendingIconScan(o),this.trackPendingIconScan(this.scanStaticIcons(i,!1)),!i||3===i.nodeType||!i.tagName)return;[i,...i.querySelectorAll("*")].forEach(i=>{if(this.shouldSkipNode(i))return;if(!i.tagName||!this.excludedTags(i.tagName.toLowerCase()))return;const{count:o,keys:r}=this.getAttributes(i,s,t);e+=o,n.push(...r)})});const d=new Set;for(let o=0;o<i.length;o++){const r=i[o];if((!this.isSyncingStaticIconState||"attributes"!==r.type||"class"!==r.attributeName)&&!this.shouldSkipNode(r.target))switch(r.type){case"childList":{const t=this.processStaticIconMutation(r.target,!1);if(t.handled){this.trackPendingIconScan(t);break}break}case"characterData":{const t=this.processStaticIconMutation(r.target,!1);t.handled&&this.trackPendingIconScan(t);break}case"attributes":{if(d.has(r.target)||this.isCoveredByMutationRoots(r.target,a))continue;d.add(r.target),c++;const i=this.processStaticIconMutation(r.target,!1);if(i.handled){this.trackPendingIconScan(i);continue}const o="data-sf-observer"===r.attributeName,l=this.scanCustomElements(r.target,!1,{subtree:o});this.trackPendingIconScan(l),o&&this.trackPendingIconScan(this.scanStaticIcons(r.target,!1));const{count:u,keys:h}=this.getAttributes(r.target,s,t);e+=u,n.push(...h);break}default:console.warn(`action - ${r.type}`)}}const u=e>0;e>0&&(this.mutate(()=>this.getLoader(this.module,!0)),e=0),this.flushPendingIconScan({defer:u}),this.profileEnd(o,{mutations:i.length,addedRoots:r.length,processedAddedRoots:l,processedAttributeTargets:c,newPlugins:n.length,hasModuleLoads:u})};this.flushObservedChanges=()=>{i.observeElements.length&&a(i.observeElements.splice(0))},this.mutationObserver=new MutationObserver(t=>{if(this.stopObserver)return o=[],void clearTimeout(r);const e=t.filter(t=>"characterData"!==t.type||Boolean(this.getStaticIconElement(t.target)));e.length&&(i.searchEnd?(o.push(...e),clearTimeout(r),r=setTimeout(()=>{const t=[...o];o=[],a(t)},100)):i.observeElements.push(...e))});this.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),t.length&&this.getLoader(t)},pt.prototype.setExistCookie=function(t,e=null,n=null){if(t=g(t,f.z,this.findPlugins,this.productionPlanActive),!this.isPluginResolvable(t))return;let i;const s=!(!this.findPlugins[t]||"object"!=typeof this.findPlugins[t])&&this.findPlugins[t],o=this.getPluginName(t+"/");i="attribute"===this.findPlugins[t].type||"component"===this.findPlugins[t].type?"component":"smart"===this.findPlugins[t].type?"smart":"utility",e&&(e[i][t]={});const r="smart"===i?(p[t]||[]).map(t=>({name:t})):[],a=[...s&&Array.isArray(s.relation)?s.relation:[],...r];if(a.length&&this.setRelation(a,t,e),e){if(s)for(const n in s)"regex"!==n&&(e[i][t][n]=s[n]);e[i][t].url=t,e[i][t].name=o}n&&n.push(t),this.setModule(t)},pt.prototype.setRelation=function(t,e,n,i=new Set){Array.isArray(t)&&!i.has(e)&&(i.add(e),t.forEach(t=>{if(!t?.name||!this.isPluginResolvable(t.name))return;if(!0===t.lazy)return void this.lazyRelations.add(t.name);const s=this.findPlugins?.[t.name]||{},o=t.mode||("smart"===s.type?"smart":"component"===s.type||"attribute"===s.type?"component":"utility");if(this.relationPlugins[e]?this.relationPlugins[e].includes(t.name)||this.relationPlugins[e].push(t.name):this.relationPlugins[e]=[t.name],this.pluginListRelation.includes(t.name)||this.pluginListRelation.push(t.name),!this.module[t.name]){if(n){const e=n[o]||n.relation;e[t.name]={},e[t.name].url=t.name,e[t.name].name=t.name}this.setModule(t.name)}Array.isArray(s.relation)&&this.setRelation(s.relation,t.name,n,i)}))},pt.prototype.sortPlugins=function(t,e,n,i){const s=["default","sm","md","lg","xl","xxl","hover","focus","focus-visible","active"];for(const o of s)this.sortPlugin(i[o]||[],o,t,e,n)},pt.prototype.pathPluginJs=function(t,e,n,i){let s;if(e){const e=this.resolveSmartBase(t);if(null===e)return null;globalThis.SF?.loadRuntime?.(),s=`${e}/${t=t.substring(3)}`}else s=`${"component"===i?this.componentPath:this.utilyPath}/${t}`;return`${s}/js/${"component"===i||e?t:n}${this.minified&&("component"===i||e)?".min":""}.js`},pt.prototype.pathPluginCss=function(t,e,n){let i="";switch(e){case"component":i+=this.componentPath;break;case"smart":{const e=this.resolveSmartBase(t);if(null===e)return null;i+=e,t=t.substring(3);break}default:i+=this.utilyPath}return`${i}/${t}/css/${["component","smart"].includes(e)?t:n}${this.minified?".min":""}.css`},pt.prototype.shouldSkipPluginCss=function(t,e={}){const n=SF.RuleLoader?.[t]||{},i=e&&"object"==typeof e?e:{type:e},s=i.type||e,o=n.type||"",r=i.mode||"",a=n.mode||"",l="smart"===s||"smart"===o||"smart"===r||"smart"===a;return!1===i.css||!1===n.css||!!l&&(!0!==i.css&&!0!==n.css)},pt.prototype.loadPlugin=function(t,e,n,i,s){if(this.disableSmart&&("smart"===i||e))return;if(!this.isPluginResolvable(t))return;const o=this.getMissingFileKey(t),r=SF.RuleLoader?.[t],a=void 0===r?.js||i&&!1===i.js||!1===r?.js,l=this.shouldSkipPluginCss(t,i),c=a?null:this.pathPluginJs(t,e,n,i);if(!a&&!this.notFoundFiles[o]||this.notFoundFiles[o]&&!this.notFoundFiles[o].js?(this.pendingLoadPlugins.has(t)||this.pendingLoadPlugins.add(t),this.relationPlugins[t]?this.loadRelationPlugins(t,s,i,n,c,a):this.isRelationPlugin(t,c,e,n,i,a)):a&&(this.relationPlugins[t]?this.loadRelationPlugins(t,s,i,n,c,!0):this.isRelationPlugin(t,null,e,n,i,!0)),!l&&(!this.notFoundFiles[o]||this.notFoundFiles[o]&&(!this.notFoundFiles[o].css||!this.notFoundFiles[o].missingMin))){const e=this.pathPluginCss(t,i,n);"component"!==i&&"smart"!==i||this.checkEventsPlugins(t),this.resolverAll[e]||(this.resolverAll[e]=this.addStyle(`${e}`).then(()=>{this.loadedPlugins[t].css=!0}).catch(()=>{this.addToMissingFiles(t,"css",!1);const n=wt(e);this.resolverAll[n]=this.addStyle(`${n}`).then(()=>{this.loadedPlugins[t].minCss=!0}).catch(e=>{console.warn(e),this.addToMissingFiles(t,"css",!0)})}))}},pt.prototype.loadRelationPlugins=function(t,e,n,i,s,o=!1){if(this.totalRelationsPlugins[t]||(this.totalRelationsPlugins[t]={load:0,total:this.relationPlugins[t].length,canLoad:!1,jsFile:s,skipJs:o,completed:{}},!o&&s&&this.preloadScript(s)),this.totalRelationsPlugins[t].canLoad){if(this.totalRelationsPlugins[t].skipJs||!s)return this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!1,void(this.loadedPlugins[t].ready=!0);"component"!==n&&"smart"!==n||this.checkEventsPlugins(t),this.resolverAll[s]=this.addScript(`${s}`).then(()=>(this.loadedPlugins[t].js=!0,this.awaitPluginAssetsReady(t,"smart"===n,i,n))).catch(e=>{console.warn(e),this.addToMissingFiles(t,"js")})}else this.relationPlugins[t].forEach(s=>{this.loadedPlugins[s]||(this.loadedPlugins[s]={});const o=this.loadedPlugins[s];if(this.pendingLoadPlugins.has(s)||o.ready||o.js||o.css||o.minCss){const e=this.findPlugins?.[s]||{},n="smart"===e.type?"smart":"component"===e.type||"attribute"===e.type?"component":"utility",o="smart"===n,r=`${t}:relation:${s}`;return void(this.resolverAll[r]||(this.resolverAll[r]=this.awaitPluginAssetsReady(s,o,i,n).then(()=>{this.checkToFullRelationLoad(s,t)})))}if(!this.pendingLoadPlugins.has(s)){this.pendingLoadPlugins.add(s);const o=this.findPlugins?.[s]||{},r="smart"===o.type?"smart":"component"===o.type||"attribute"===o.type?"component":"utility",a="smart"===r;if(e[r]?.[s]||o){e[r]||(e[r]={}),e[r][s]||(e[r][s]={name:s,url:s}),this.loadPlugin(s,a,i,r,e);const n=`${t}:relation:${s}`;this.resolverAll[n]||(this.resolverAll[n]=this.awaitPluginAssetsReady(s,a,i,r).then(()=>{this.checkToFullRelationLoad(s,t)}))}else console.warn(`The dependent plugin is in a different category than ${n}, or missing: ${s}`)}})},pt.prototype.awaitPluginAssetsReady=function(t,e,n,i,s=!1,o=!1){this.loadedPlugins[t]||(this.loadedPlugins[t]={});const r=[],a=this.findPlugins?.[t]||{},l=!s&&void 0!==a?.js&&!1!==a.js,c=!e&&!o&&void 0!==a?.css&&!1!==a.css,d=()=>{const e=this.loadedPlugins[t]||{},n=!l||!0===e.js||!0===e.ready,i=!c||!0===e.css||!0===e.minCss||!0===e.ready;return n&&i};if(d())return this.loadedPlugins[t].ready=!0,Promise.resolve();if(l){const s=this.loadedPlugins[t]||{},o=this.pathPluginJs(t,e,n,i);!0!==s.js&&!0!==s.ready&&o&&this.resolverAll[o]&&r.push(this.resolverAll[o])}if(c){const e=this.loadedPlugins[t]||{},s=this.pathPluginCss(t,i,n),o=s.replace(".css",".min.css");!0!==e.css&&!0!==e.minCss&&!0!==e.ready&&this.resolverAll[s]?r.push(this.resolverAll[s]):!0!==e.css&&!0!==e.minCss&&!0!==e.ready&&this.resolverAll[o]&&r.push(this.resolverAll[o])}return r.length||d()||!this.relationPlugins[t]||r.push(new Promise(t=>{let e=0;const n=()=>{d()?t():(e+=1,e<200?setTimeout(n,25):t())};n()})),Promise.all(r).catch(()=>[]).then(()=>{this.loadedPlugins[t].ready=!0})},pt.prototype.waitForResolverIdle=async function(){for(let t=0;t<25;t++){const t=Object.entries(this.resolverAll||{});if(!t.length)return[];const e=t.map(([t])=>t).sort().join("|"),n=await Promise.allSettled(t.map(([,t])=>t));await Promise.resolve(),await Promise.resolve();if(Object.keys(this.resolverAll||{}).sort().join("|")===e)return n}return console.warn("SFLoader waitForResolverIdle reached pass limit",{resolverAll:this.resolverAll,totalRelationsPlugins:this.totalRelationsPlugins}),Promise.allSettled(Object.values(this.resolverAll||{}))},pt.prototype.checkToFullRelationLoad=function(t,e){if(this.totalRelationsPlugins[e]&&(this.totalRelationsPlugins[e].completed||(this.totalRelationsPlugins[e].completed={}),!this.totalRelationsPlugins[e].completed[t]))if(this.totalRelationsPlugins[e]?.canLoad)this.isDebug&&console.warn("Duplicate relation completion",{relationName:t,pluginName:e,state:this.totalRelationsPlugins[e]});else if(this.totalRelationsPlugins[e].completed[t]=!0,this.totalRelationsPlugins[e].load++,this.totalRelationsPlugins[e].load===this.totalRelationsPlugins[e].total&&(this.totalRelationsPlugins[e].canLoad=!0,this.pendingLoadPlugins.has(e))){if(this.totalRelationsPlugins[e].skipJs||!this.totalRelationsPlugins[e].jsFile)return this.loadedPlugins[e]||(this.loadedPlugins[e]={}),this.loadedPlugins[e].js=!1,void(this.loadedPlugins[e].ready=!0);this.resolverAll[this.totalRelationsPlugins[e].jsFile]=this.addScript(`${this.totalRelationsPlugins[e].jsFile}`).then(()=>{this.loadedPlugins[e]||(this.loadedPlugins[e]={}),this.loadedPlugins[e].js=!0}).catch(t=>{console.warn(t),this.addToMissingFiles(e,"js")})}},pt.prototype.isRelationPlugin=function(t,e,n,i,s,o=!1){const r=Object.keys(this.relationPlugins).filter(e=>-1!==this.relationPlugins[e].indexOf(t));if(r.length)r.forEach(r=>{if(!this.totalRelationsPlugins[r]){const t=this.findPlugins?.[r]||{},e="smart"===t.type?"smart":"component"===t.type||"attribute"===t.type?"component":"utility",n="smart"===e;this.totalRelationsPlugins[r]={load:0,total:this.relationPlugins[r]?.length||0,canLoad:!1,jsFile:this.pathPluginJs(r,n,i,e),skipJs:void 0===t?.js||!1===t?.js};const s=this.totalRelationsPlugins[r];!s.skipJs&&s.jsFile&&this.preloadScript(s.jsFile)}if(o||!e){this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!1;const e=`${r}:relation:${t}`;return void(this.resolverAll[e]=Promise.resolve().then(()=>this.awaitPluginAssetsReady(t,n,i,s,!0)).then(()=>{this.checkToFullRelationLoad(t,r)}))}this.resolverAll[e]=this.addScript(`${e}`).then(()=>(this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!0,this.awaitPluginAssetsReady(t,n,i,s).then(()=>{this.checkToFullRelationLoad(t,r)}))).catch(e=>{console.warn(e),this.checkToFullRelationLoad(t,r),this.addToMissingFiles(t,"js")})});else{if(o||!e)return this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!1,void(this.loadedPlugins[t].ready=!0);"component"!==s&&"smart"!==s||this.checkEventsPlugins(t),this.resolverAll[e]=this.addScript(`${e}`).then(()=>{this.loadedPlugins[t]||(this.loadedPlugins[t]={}),this.loadedPlugins[t].js=!0}).catch(e=>{console.warn(e),this.addToMissingFiles(t,"js")})}},pt.prototype.sortPlugin=function(t,e,n){const i=t?.[n];if(i)for(const s in i){const i="smart"===n;let o="";o=s.includes("/")||"component"===n||i?s:`${s}/${e}`,this.loadedPlugins&&this.loadedPlugins[o]||(this.pendingLoadPlugins.has(o)||(this.pendingLoadPlugins.add(o),this.loadedPlugins[o]||(this.loadedPlugins[o]={}),this.loadPlugin(o,i,e,n,t)))}},pt.prototype.vUseMergeConfigGenerate=function(t){const e=this.profileStart("vUseMergeConfigGenerate"),n=Array.isArray(t)?t.length:0;t=Array.from(new Set([...t]));const i=[],s=[];t=this.splitPluginPoint(t);let o=["base","component","smart","utility"];this.disableSmart&&(o=o.filter(t=>"smart"!==t));for(const e of o)this.sortPlugins(e,s,i,t);this.profileEnd(e,{inputCount:n,types:o.join(","),resolverCount:Object.keys(this.resolverAll||{}).length,pendingLoadPlugins:this.pendingLoadPlugins?.size||0})},pt.prototype.splitPluginPoint=t=>{const e={};return t.forEach(t=>{if(/cl-\S+/.test(t))e.default||(e.default={}),e.default.smart||(e.default.smart={}),e.default.smart[t]=t;else if(t.includes("/")&&!t.includes("component")){const n=t.split("/");"headers"===n[0]||"container"===n[0]?(e[n[1]]||(e[n[1]]={}),e[n[1]].base||(e[n[1]].base={}),e[n[1]].base[n[0]]=n[0]):(e[n[1]]||(e[n[1]]={}),e[n[1]].utility||(e[n[1]].utility={}),e[n[1]].utility[n[0]]=n[0])}else e.default||(e.default={}),e.default.component||(e.default.component={}),e.default.component[t]=t}),e},pt.prototype.checkSmartCache=function(){const t=d().getItem(`SF_SMART_LIST-${this.urlHash}`);if(t)try{this.smartCache=JSON.parse(o(t))}catch(t){return console.warn(t),!1}},pt.prototype.disconnectObservers=function(){this.mutationObserver?.disconnect?.(),clearInterval(this.arrowInterval),this.arrowInterval=null},pt.prototype.checkTurbo=function(){"undefined"!=typeof Turbo&&(this.turboEnabled=!0,document.addEventListener("turbo:before-render",()=>{this.stopPreloader(),this.disconnectObservers?.(),this.searchEnd=!1,this.prepareInit=!1,this.loadPage=!1,this.cachedPlugins=[],this.module={}}),document.addEventListener("turbo:load",()=>{this.urlHash=this.generatePageHash(),this.prepareInit=!1,this.firstLoad=!0,this.prepare()}))},pt.prototype.checkToCacheClean=function(){const t=new URLSearchParams(window.location.search).get("loader_clear");t&&"Y"===t&&this.clearCache()},pt.prototype.sendThemeToPlayground=function(t=null,e=null){if(t||(t=document.querySelector('iframe[src*="play.simai.io/embed.html"]')),!t)return!1;e=e??this.theme,t?.contentWindow?.postMessage({type:"sf-theme",theme:e},"*")},pt.prototype.ensureThemePreferenceListener=function(){if(!this.themeEnabled||this.themeMediaQuery)return this.themeMediaQuery||null;const t=window.matchMedia?.("(prefers-color-scheme: dark)");return t?(this.themeMediaQuery=t,this.themeMediaListener=()=>{"system"===this.themePreference&&this.checkTheme()},"function"==typeof t.addEventListener?t.addEventListener("change",this.themeMediaListener):t.addListener?.(this.themeMediaListener),t):null},pt.prototype.setTheme=function(t){if(!this.themeEnabled)return!1;if(!["system","light","dark"].includes(t))return!1;if("system"===t){try{document.cookie="sf-theme=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; SameSite=Lax"}catch{}this.themeSessionPreference=this.getCookie("sf-theme")?"system":null}else{const e=this.setCookie("sf-theme",t)&&this.getCookie("sf-theme")===t;this.themeSessionPreference=e?null:t}return this.checkTheme(),!0},pt.prototype.changeTheme=function(){return!!this.themeEnabled&&this.setTheme("dark"===this.theme?"light":"dark")},pt.prototype.turboFontCheck=function(t){this.iconFontReady&&t.classList.add("sf-icons-loaded")},pt.prototype.checkTheme=function(t=null){if(!this.themeEnabled)return!1;const e=["theme-dark","theme-light"],n=this.getCookie("sf-theme"),i=this.themeSessionPreference,s=["system","light","dark"].includes(i)?i:["light","dark"].includes(n)?n:"system",o=this.ensureThemePreferenceListener(),r="dark"===s||"system"===s&&o?.matches,a=r?"dark":"light",l=this.theme,c=this.themePreference;return this.theme=a,this.themePreference=s,(t=t||document.documentElement).classList.remove(...e),t.classList.add(r?e[0]:e[1]),this.sendThemeToPlayground(),t!==document.documentElement||a===l&&s===c||window.dispatchEvent(new CustomEvent("sf-theme-change",{detail:{theme:a,preference:s}})),a},pt.prototype.checkForCache=function(){for(let t=0;t<d().length;t++){if(d().key(t).startsWith("SF_PLUGIN_LIST-"))return!1}return!0},pt.prototype.randomId=function(t=8){return Math.random().toString(36).substr(2,t)},pt.prototype.clearCache=function(){for(let t=d().length-1;t>=0;t--){const e=d().key(t);(e.startsWith("SF_PLUGIN_LIST-")||e.startsWith("SF_SMART_LIST-"))&&bt(e)}bt("SF_MISSING_PLUGINS")},pt.prototype.clearAllSfCache=function(){for(let t=d().length-1;t>=0;t--){const e=d().key(t);e&&e.startsWith("SF_")&&bt(e)}},pt.prototype.ensureCacheVersion=function(){const t="SF_CACHE_VERSION",e=d().getItem(t),n=this.cacheVersion;if(!n)return this.clearAllSfCache(),void bt(t);e!==n&&(this.clearAllSfCache(),St(t,n))},pt.prototype.ensurePluginListVersion=function(){const t="SF_PLUGIN_LIST_VERSION",e=d().getItem(t),n=this.pluginListVersion;if(!n)return this.clearCache(),void bt(t);e!==n&&(this.clearCache(),St(t,n))},pt.prototype.revalidateMissingPlugins=function(){try{const t=d().getItem("SF_MISSING_PLUGINS");if(!t)return;const e=JSON.parse(o(t));if(!e||"object"!=typeof e)return;const n={};Object.keys(e).forEach(t=>{if(!t)return;const i=t.indexOf(ht),s=i>0?t.slice(0,i):"",o=i>0?t.slice(i+2):t,r=SF.RuleLoader?.[o];r&&(r.package||"")===s||!s&&this.loadedPlugins[o]||(n[t]=e[t])}),Object.keys(n).length?d().setItem("SF_MISSING_PLUGINS",s(JSON.stringify(n))):d().removeItem("SF_MISSING_PLUGINS")}catch(t){console.warn("revalidateMissingPlugins failed",t)}},pt.prototype.registerComponent=function(t,e){if(this.ComponentRegistry[t])return;e.prototype&&(e.prototype.componentName=t),this.ComponentRegistry[t]=e;const n=t&&t.toLowerCase?t.toLowerCase():t;n&&!this.ComponentRegistry[n]&&(this.ComponentRegistry[n]=e),queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(t+":ready",{detail:e}));try{document.dispatchEvent(new CustomEvent("component:ready",{detail:{name:t}}))}catch(t){console.warn("component:ready dispatch failed",t)}})},pt.prototype.ready=function(t,e){const n=Array.from(new Set([t,t&&t[0]?t[0].toUpperCase()+t.slice(1):t,t&&t.toLowerCase?t.toLowerCase():t].filter(Boolean))),i=()=>{for(const t of n){const n=this.ComponentRegistry[t];if("function"==typeof n)return e(n),!0}return!1};i()||n.forEach(t=>{const e=`${t}:ready`;window.addEventListener(e,()=>{i()},{once:!0})})},pt.prototype.searchRegexp=function(t,e=null){const n=this.profileStart("searchRegexp"),i=this.getRegexpScanRules();if(!i.length)return this.pendingRegex=!1,this.getLoader([]),void this.profileEnd(n,{skipped:!0,reason:"no-regexp-rules"});let s="";e?"string"==typeof e?s=e:e.nodeType?s=this.getObserverFilteredHTML(e):void 0!==e.textContent&&(s=e.textContent):s=document.body?this.getObserverFilteredHTML(document.body):"";const o=this.stripIgnoredBlocks(s);if(!o)return this.pendingRegex=!1,this.getLoader([]),void this.profileEnd(n,{skipped:!0,reason:"empty-body"});const r=o.length>4096?o.slice(0,4096):o;if(this.regexMatchCache.has(r)){const t=this.regexMatchCache.get(r);return t.forEach(t=>this.setExistCookie(t)),this.pendingRegex=!1,this.getLoader([]),void this.profileEnd(n,{cacheHit:!0,bodyLength:r.length,matched:t.length})}const a=[];for(const[t]of i){const e=SF.RuleLoader[t],n=e.regex||e,i=n instanceof RegExp?n:new RegExp(n,n.flags||"");(i.global||i.sticky)&&(i.lastIndex=0),i.test(r)&&(a.push(t),this.setExistCookie(t))}this.regexMatchCache.set(r,a),this.pendingRegex=!1,this.getLoader([]),this.profileEnd(n,{cacheHit:!1,bodyLength:r.length,rules:i.length,matched:a.length})},pt.prototype.getObserverFilteredHTML=function(t){if(!t)return"";if(this.shouldSkipNode(t))return"";const e=t.cloneNode(!0);return(e.querySelectorAll?.(Et)||[]).forEach(t=>t.remove()),void 0!==e.innerHTML?e.innerHTML:void 0!==e.outerHTML?e.outerHTML:void 0!==e.textContent?e.textContent:""},pt.prototype.stripIgnoredBlocks=function(t){if(!t)return"";return[/<code\b[^>]*>.*?<\/code>/gims,/<pre\b[^>]*>.*?<\/pre>/gims,/<([a-z][\w:-]*)\b[^>]*data-sf-observer=["']ignore["'][^>]*>.*?<\/\1>/gims].reduce((t,e)=>t.replace(e,""),t)},pt.prototype.getLoader=async function(t,e=!1,n=!1){this.logTiming("getLoader start");let i=this.getUrlParam("loader_clear");i&&(i=`&clear_cache=${i}`),Array.isArray(t)||(t=this.getObjectArray(t||{})),t=[...new Set(t.map(t=>g(t,f.z,this.findPlugins,this.productionPlanActive)))],this.productionPlanActive||t.forEach(t=>this.setModule(t));const o=this.profileStart("getLoader"),r=t.length,a=new Set(this.priorityModules||[]);if(t.length){const e=[],n=[];t.forEach(t=>{a.has(t)?e.push(t):n.push(t)}),t=[...e,...n]}const l=[],c=this.heavyModules||[],d=!n&&!this.loadPage;if(!n&&t.length<10&&!this.productionPlanActive&&(this.debug("PluginList is empty, use Cookie"),t=this.getModuleArray()),d&&Array.isArray(t)&&(t=t.filter(t=>!c.includes(t)||(l.push(t),!1))),!t.length&&l.length)return this.profileEnd(o,{redirectedToDeferred:!0,requestedPluginCount:r,deferredCount:l.length}),this.getLoader(l,e,!0);this.loadedPlugins&&Array.isArray(t)&&(t=t.filter(t=>!this.loadedPlugins[t])),n&&t.length&&this.loadedPlugins&&(t=t.filter(t=>!this.loadedPlugins[t]));const u=this.hashCode(t+"/"+this.pluginListRelation);if(!n&&u===this.lastLoadHash&&this.loadPage)return l.length?this.getLoader(l,e,!0):(this.stopPreloader(),this.logTiming("getLoader skipped: same hash"),this.profileEnd(o,{skipped:!0,reason:"same-hash",requestedPluginCount:r,pluginCount:t.length,deferredCount:l.length}),!1);if(St(`SF_PLUGIN_LIST-${this.urlHash}`,s(JSON.stringify(this.module))),this.lastLoadHash&&!n&&this.cachedPlugins.length&&(t=t.filter(t=>!this.cachedPlugins.includes(t))),n?t.length&&(this.cachedPlugins=Array.from(new Set([...this.cachedPlugins||[],...t]))):this.lastLoadHash=u,this.standAlone){this.logTiming("standalone load start"),this.logTiming(`PluginList - ${t.length} modules`),this.vUseMergeConfigGenerate(t);if(0===Object.values(this.resolverAll).length)return this.pendingRegex||this.dispatchReadyOnce(),this.stopPreloader(),this.logTiming("standalone: nothing to load"),void this.profileEnd(o,{mode:"standalone",skipped:!0,reason:"nothing-to-load",requestedPluginCount:r,pluginCount:t.length});this.waitForResolverIdle().then(()=>{(!this.eventSend&&!this.pendingRegex||n)&&(this.pendingRegex=!1,this.dispatchReadyOnce()),this.eventsPlugins=[],this.resolverAll={},this.stopPreloader(),this.loadPage=!0;const i=Object.keys(this.loadedPlugins||{}).length;this.logTiming(`standalone load complete: ${i} modules`),this.profileEnd(o,{mode:"standalone",requestedPluginCount:r,pluginCount:t.length,resolverCount:Object.keys(this.resolverAll||{}).length,totalLoaded:i,deferredCount:l.length}),this.isDebug&&console.log("SFLoader loaded modules (standalone)",this.loadedPlugins),l.length&&this.getLoader(l,e,!0)})}return!0},pt.prototype.hashCode=function(t){return""===t?0:t.split("").reduce(function(t,e){return(t=(t<<5)-t+e.charCodeAt(0))&t},0)},pt.prototype.isEmptyObject=function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},pt.prototype.getPersistentMissingFiles=function(t=this.notFoundFiles){const e=Object.create(null);if(!t||"object"!=typeof t||Array.isArray(t))return e;for(const[n,i]of Object.entries(t))i&&"object"==typeof i&&!0===i.js&&(e[n]={js:!0});return e},pt.prototype.getMissingFileKey=function(t){const e=this.findPlugins?.[t]?.package;return e?`${e}${ht}${t}`:t},pt.prototype.addToMissingFiles=function(t,e,n=!0){const i=this.getMissingFileKey(t);this.notFoundFiles[i]?this.notFoundFiles[i][e]=!0:this.notFoundFiles[i]={[e]:!0},"css"===e&&(this.notFoundFiles[i].missingMin=n),St("SF_MISSING_PLUGINS",s(JSON.stringify(this.getPersistentMissingFiles())))},pt.prototype.getAssetVersion=function(){return this.cacheVersion||this.pluginListVersion||""},pt.prototype.versionAssetUrl=function(t){const e=this.getAssetVersion();if(!e||"string"!=typeof t)return t;if(/^(data:|blob:|javascript:)/i.test(t))return t;const n=t.indexOf("#"),i=n>=0?t.slice(n):"",s=n>=0?t.slice(0,n):t,o=encodeURIComponent(e);return/[?&]sf_v=/.test(s)?`${s.replace(/([?&])sf_v=[^&#]*/g,`$1sf_v=${o}`)}${i}`:`${s}${s.includes("?")?"&":"?"}sf_v=${o}${i}`},pt.prototype.addStyle=async function(t){const e=this.versionAssetUrl(t);return At("styles",e,()=>this.insertStyle(e,t))},pt.prototype.insertStyle=function(t,e){return new Promise((n,i)=>{const s=document.getElementsByTagName("head")[0],o=document.createElement("link");o.href=t,o.type="text/css",o.rel="stylesheet",o.addEventListener("load",()=>{n()},{once:!0}),o.addEventListener("error",()=>{o.remove(),i(new Error(`Failed to load styles: ${e}`))},{once:!0}),s.append(o)})};const Pt=Symbol.for("simai.sf.loader.assets");function At(t,e,n){const i=function(){const t=globalThis;return t[Pt]||Object.defineProperty(t,Pt,{value:{scripts:new Map,styles:new Map},configurable:!0}),t[Pt]}()[t],s=function(t){try{return new URL(t,globalThis.document?.baseURI||globalThis.location?.href).href}catch{return String(t)}}(e),o=i.get(s);if(o)return o;const r=n();return i.set(s,r),r.catch(()=>{i.get(s)===r&&i.delete(s)}),r}pt.prototype.preloadScript=function(t){if("undefined"==typeof document||!t)return;const e=this.versionAssetUrl(t);if(this.preloadedScripts=this.preloadedScripts||new Set,this.preloadedScripts.has(e))return;this.preloadedScripts.add(e);const n=document.createElement("link");n.rel="preload",n.as="script",n.href=e,document.head.append(n)},pt.prototype.addScript=function(t,e={}){const n=this.versionAssetUrl(t);return At("scripts",n,()=>this.insertScript(n,t,e))},pt.prototype.insertScript=function(t,e,n={}){return new Promise((i,s)=>{const o=document.getElementsByTagName("head")[0],r=document.createElement("script");if(r.src=t,r.async=!0,r.addEventListener("load",()=>{i()}),r.addEventListener("error",()=>{const t=n?.otherFormTried?null:wt(e);if(t)return r.remove(),void this.addScript(t,{...n,otherFormTried:!0}).then(i,s);s(new Error(`Failed to load script: ${e}`))}),n&&n.attributes)for(const t in n.attributes)r.setAttribute(t,n.attributes[t]);o.append(r)})},pt.prototype.setPreloaderParams=function(){if(this.params.preloader)for(const t in this.params.preloader)this.preloader[t]=this.params.preloader[t];this.contentPreloader=this.params.contentPreloader?this.params.contentPreloader:(0,y.ub)(this.preloader)},pt.prototype.getCurrentUrl=function(){return`${window.location.protocol}//${window.location.host}${window.location.pathname}`.replace(/\/+$/,"").split("?")[0]},pt.prototype.isDynamicPage=function(t){return/\/\d+|\/[a-zA-Z_-]+\/[a-zA-Z0-9_-]+/.test(t)},pt.prototype.removeLastSegment=function(t){return t.replace(/\/[^/]+$/,"")},pt.prototype.generatePageHash=function(){let t=this.getCurrentUrl();return this.isDynamicPage(t)&&(t=this.removeLastSegment(t)),a(t).substring(0,16)},pt.prototype.onWindowLoad=function(t){"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0})},pt.prototype.endSearch=function(){this.searchEnd=!0,this.flushObservedChanges?.()},pt.prototype.scheduleSearchEnd=function(){"complete"===document.readyState?setTimeout(()=>this.endSearch(),0):this.searchEndListening||(this.searchEndListening=!0,window.addEventListener("load",()=>{this.searchEndListening=!1,this.endSearch()},{once:!0}))},pt.prototype.prepare=function(t=null){let e=[];if(this.logTiming("prepare start"),this.searchEnd=!1,this.scheduleSearchEnd(),this.checkTheme(),this.standAlone){const t=d().getItem("SF_MISSING_PLUGINS");try{this.notFoundFiles=t?this.getPersistentMissingFiles(JSON.parse(o(t))):{}}catch(t){console.warn(t)}}let n=this.productionPlanActive?null:d().getItem(`SF_PLUGIN_LIST-${this.urlHash}`);if(this.productionPlanActive||n||!window.BUNDLE_ID||(n=d().getItem(`SF_PLUGIN_LIST-${window.BUNDLE_ID}`)),this.standAlone?this.firstLoad="string"!=typeof n:this.firstLoad=!window.BUNDLE_LOADED,this.findShortCodes(document.body),n){try{e=JSON.parse(o(n)),this.cachedPlugins=this.getObjectArray(e)}catch{e=[]}e&&Object.keys(e).length?(this.module=e,Object.keys(e).forEach(t=>{const e=this.findPlugins[t];e&&e.relation&&this.setRelation(e.relation,t,!1)}),this.getLoader(e,!1,!0),this.logTiming("prepare: initial getLoader requested (cached, skipDefer)")):n=null}else this.logTiming("prepare: preloader run");this.onWindowLoad(()=>{t&&t.disconnect(),this.logTiming("onWindowLoad search start"),this.findShortCodes(document.body);try{document.dispatchEvent(new CustomEvent("sf-shortcodes-ready",{detail:{loader:this,timestamp:Date.now()}}))}catch(t){console.warn("sf-shortcodes-ready dispatch failed",t)}this.scanCustomElements(document.body),this.scanStaticIcons(document.body),this.scanAttributes(document.body),this.searchAttr(!1),this.searchRegexp(""),this.search(),Object.keys(this.module||{}).length&&this.getLoader(this.module,!0),this.revalidateMissingPlugins(),this.logTiming("onWindowLoad search done")})},pt.prototype.prepareTurboEvents=function(){this.turboEventsBound||(this.turboEventsBound=!0,document.addEventListener("turbo:before-render",t=>{let{newBody:e,isPreview:n}=t.detail;if(!e)return;const i=document.documentElement;if(!i||i.getAttribute("dir"))return;const s=i.getAttribute("dir")||document?.dir||document.documentElement&&document.documentElement.getAttribute("dir")||"";i.setAttribute("dir","rtl"===s?"rtl":"ltr"),n||e.hasAttribute("data-turbo-preview")||this.turboRenderHandled||(this.turboRenderHandled=!0,this.findShortCodes(e),this.scanCustomElements(e),this.scanStaticIcons(e),this.scanAttributes(e),this.searchRegexp("",e),this.turboFontCheck(e),this.checkTheme(e),t.detail.render=t=>t.replaceWith(e))}),document.addEventListener("turbo:load",()=>{this.turboRenderHandled=!1}))},pt.prototype.getTextNodes=function(t){const e=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:t=>this.shouldSkipNode(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),n=[];for(;e.nextNode();)n.push(e.currentNode);return n};function Lt(t){if("undefined"!=typeof document&&document.hidden)return setTimeout(t,0);let e=!1,n=null;const i=()=>{e||(e=!0,clearTimeout(n),cancelAnimationFrame(s),t())},s=requestAnimationFrame(i);return n=setTimeout(i,100),s}pt.prototype.mutate=function(t){return Lt(t)},pt.prototype.ensureLoadedModules=function(){if(window.SF_PRELOADED){this.productionPlanActive=!0,this.pendingRegex=!1,this.firstLoad=!1;const{modules:t,loadedPlugins:e}=window.SF_PRELOADED;Array.isArray(t)?t.forEach(t=>{t&&(this.module[t]=t,this.loadedPlugins[t]||(this.loadedPlugins[t]={}))}):t&&"object"==typeof t&&Object.keys(t).forEach(t=>{this.module[t]=t,this.loadedPlugins[t]||(this.loadedPlugins[t]={})}),e&&"object"==typeof e&&(this.loadedPlugins={...this.loadedPlugins,...e}),!this.eventSend&&Object.keys(this.loadedPlugins||{}).length&&this.dispatchReadyOnce()&&this.endSearch()}},pt.prototype.ensureDirAttribute=function(){const t=document.documentElement;if(!t||t.getAttribute("dir"))return;const e=window.getComputedStyle&&t?window.getComputedStyle(t).direction:"";t.setAttribute("dir","rtl"===e?"rtl":"ltr")},pt.prototype.init=function(){this.logTiming("init start"),this.ensureLoadedModules(),this.ensureDirAttribute(),this.checkTurbo(),this.checkToCacheClean(),this.ensureCacheVersion(),this.ensurePluginListVersion(),this.restoreIconManifestFromCache(),this.bootstrapConfiguredIconSubset(),this.prepareSmartChildScanEvents(),this.usePreloader=this.checkForCache(),this.urlHash=this.generatePageHash(),this.setPreloaderParams(),this.checkSmartCache();const t=()=>{this.prepareObserver&&(this.prepareObserver.disconnect(),this.prepareObserver=null)},e=()=>{this.prepareInit||(this.prepareInit=!0,this.prepare()),t()};"complete"===document.readyState||"interactive"===document.readyState?Lt(e):document.addEventListener("DOMContentLoaded",()=>{Lt(e)}),this.prepareObserver=new MutationObserver(e=>{if(this.prepareInit)t();else{if(document.body&&!this.prepareInit)return this.prepareInit=!0,this.prepare(),void t();for(let t=0;t<e.length;t++){const n=e[t];if(!n.target?.classList?.contains("skip")&&(!this.shouldSkipNode(n.target)&&"childList"===n.type))for(let t=0;t<n.addedNodes.length;t++){const e=n.addedNodes[t];this.shouldSkipNode(e)||this.findShortCodes(e)}}}}),this.prepareObserver.observe(document.documentElement,{childList:!0,subtree:!0,characterData:!1,attributes:!1}),this.scheduleSearchEnd(),this.turboEnabled&&this.prepareTurboEvents(),this.logTiming("init observers attached"),window.addEventListener("message",t=>{"sf-embed-ready"===t.data?.type&&this.sendThemeToPlayground()})};const vt={attr:"sf-asset",delimiterURL:"/",standAlone:!0,frameworkPath:"/simai/asset/simai.framework/sf5.master/",pathComponent:"/simai/asset/simai.framework/sf5.master/component/",isLoadPluginCookie:!1,preloader:{width:66,height:100},requiredPlugins:["modal"],disableSmart:!1,cacheVersion:window.SF_BOOT_CONFIG?.cacheVersion??("undefined"!=typeof __SF_CACHE_VERSION__?__SF_CACHE_VERSION__:"")??"",pluginListVersion:window.SF_BOOT_CONFIG?.pluginListVersion??("undefined"!=typeof __SF_PLUGIN_LIST_VERSION__?__SF_PLUGIN_LIST_VERSION__:"")??"",theme:window.SF_BOOT_CONFIG?.theme??!0,smart:window.SF_BOOT_CONFIG?.smart||{},findPlugins:SF.RuleLoader,backgroundPreloader:"var(--sf-color--surface-highest, var(--sf-surface-0, #fff))",modifierPreloader:"loader-default",contentPreloaderText:"LOADING"};function Ct(t){const e=String(t||"").trim().toLowerCase();return e?e.startsWith("sf-")||globalThis.SF?.Loader?.getCustomElementRules?.()[e]?e:`sf-${e}`:""}function Ft(t=[]){return Array.isArray(t)?t:"string"==typeof t?[t]:Array.from(arguments).filter(Boolean)}function $t(t){const e=Ct(t),n=String(t||"").trim().toLowerCase();return e&&e!==n&&n.includes("-")?Promise.race([window.customElements.whenDefined(n).then(()=>n),window.customElements.whenDefined(e).then(()=>e)]):window.customElements.whenDefined(e).then(()=>e)}function kt(){const t=Ft.apply(null,arguments).filter(t=>Ct(t));return t.length?window.customElements?.whenDefined?Promise.all(t.map($t)):Promise.resolve(t.map(Ct)):Promise.resolve([])}function _t(t){return"className"===t?"class":String(t||"").replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Nt(t={}){return Object.entries(t).filter(([,t])=>!1!==t&&null!=t).map(([t,e])=>{const n=function(t){const e=String(t||"").trim();return e?e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`):""}(t);return n?`${n}: ${String(e)}`:""}).filter(Boolean).join("; ")}window.sfPath&&(vt.url=window.sfPath),window.sfSmartPath&&(vt.smartUrl=window.sfSmartPath);const Tt={onModalReady:"modal:ready",onModalUpdate:"modal:update",onBeforeOpen:"modal:before-open",onAfterOpen:"modal:after-open",onBeforeClose:"modal:before-close",onAfterClose:"modal:after-close",onBeforeHide:"modal:before-hide",onAfterHide:"modal:after-hide",onBeforeShow:"modal:before-show",onAfterShow:"modal:after-show",onOpen:"modal:after-open",onClose:"modal:after-close",onHide:"modal:after-hide",onShow:"modal:after-show"};function xt(t,e,n){if("function"==typeof n){const i=function(t){const e=String(t||"").trim();return Tt[e]?Tt[e]:/^on[A-Z]/.test(e)?e.slice(2).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^a-z0-9:-]/gi,"").toLowerCase():""}(e);if(i){const e=/^(modal|drawer):/.test(i)?e=>{e.target===t&&n.call(t,e)}:n;return t.addEventListener(i,e),t.__sfCreateEventHandlers||Object.defineProperty(t,"__sfCreateEventHandlers",{configurable:!0,enumerable:!1,value:[]}),void t.__sfCreateEventHandlers.push({eventName:i,handler:e})}}const i=_t(e);if(i)if(!1!==n&&null!=n)if(!0!==n){if(("style"===i||i.endsWith("-style"))&&n&&"object"==typeof n&&!Array.isArray(n)){const e=Nt(n);return void(e?t.setAttribute(i,e):t.removeAttribute(i))}Array.isArray(n)?t.setAttribute(i,n.filter(t=>null!=t).join(" ")):t.setAttribute(i,String(n))}else t.setAttribute(i,"");else t.removeAttribute(i)}function Rt(t,e={}){const n=Ct(t);if(!n)throw new Error("SF.create(name, params): name is required");const i=document.createElement(n),s=e&&"object"==typeof e?e:{},{attrs:o,attributes:r,dataset:a,children:l,html:c,textContent:d,...u}=s;return[u,o,r].forEach(t=>{t&&"object"==typeof t&&Object.entries(t).forEach(([t,e])=>{xt(i,t,e)})}),a&&"object"==typeof a&&Object.entries(a).forEach(([t,e])=>{const n=_t(t);n&&null!=e&&i.setAttribute(`data-${n}`,String(e))}),"string"==typeof c?i.innerHTML=c:null!=d&&(i.textContent=String(d)),void 0!==l&&function(t,e){(Array.isArray(e)?e.flat(1/0):[e]).filter(t=>null!=t&&!1!==t).forEach(e=>{e instanceof Node?t.append(e):t.append(document.createTextNode(String(e)))})}(i,l),i}pt.prototype.ensurePlugin=function(t){const e=String(t||"").trim();return!(!e||!this.findPlugins?.[e])&&(this.module[e]||(this.setExistCookie(e),this.mutate(()=>this.getLoader(this.module,!0))),!0)},pt.prototype.prefetchLazyRelations=function(){const t=[...this.lazyRelations].filter(t=>!this.module[t]);if(!t.length)return;const e=globalThis.requestIdleCallback?t=>globalThis.requestIdleCallback(t,{timeout:2e3}):t=>setTimeout(t,200),n=()=>{const i=t.splice(0,4);for(const t of i)this.ensurePlugin(t);t.length&&e(n)};e(n)},pt.prototype.ensureSmartElementLoaded=function(t){const e=String(t||"").trim().toLowerCase();if(!e.includes("-"))return!1;const n=this.getCustomElementRules()[e];return n?(this.module[n]||(this.setExistCookie(n),this.mutate(()=>this.getLoader(this.module,!0))),!0):(console.warn(`SFLoader: smart tag rule not found for ${e}`),!1)},SF.Loader=new pt(vt),Object.defineProperty(SF,"smartBaseReady",{configurable:!0,enumerable:!0,get:()=>SF.Loader.smartBaseReady||Promise.resolve(SF.smart||null)}),SF.loadSmartBase=function(){return SF.Loader.loadSmartBase()};let Mt=null;SF.whenFieldRenderers=function(){return SF.fieldRenderers?.renderEditField?Promise.resolve(SF.fieldRenderers):Mt||(Mt=new Promise((t,e)=>{const n=()=>!!SF.fieldRenderers?.renderEditField&&(document.removeEventListener("sf-field-renderers-ready",n),t(SF.fieldRenderers),!0);if(document.addEventListener("sf-field-renderers-ready",n),n())return;if([...document.scripts].some(t=>/\/field-renderers\/js\/field-renderers(?:\.min)?\.js(?:[?#]|$)/u.test(t.src)))return;SF.loadRuntime?.();const i=SF.Loader;i.addScript(`${i.smartPath}/field-renderers/js/field-renderers${i.minified?".min":""}.js`).then(()=>n()).catch(t=>{Mt=null,document.removeEventListener("sf-field-renderers-ready",n),e(t)})}),Mt)},SF.create=Rt,SF.createAsync=async function(t,e={}){const n=Rt(t,e),i=n.tagName.toLowerCase();return window.SF?.Loader?.ensureSmartElementLoaded&&window.SF.Loader.ensureSmartElementLoaded(i),window.customElements?.whenDefined&&await window.customElements.whenDefined(i),window.customElements?.upgrade?.(n),n},SF.__internal.litHtml=(t,e={})=>{if(!/^sf-[a-z0-9-]+$/.test(t)&&!SF.Loader.getCustomElementRules()[t]&&!/^sf-[a-z0-9-]+$/.test(t=`sf-${t}`))throw new Error(`Invalid SF tag name: ${t}`);const n=(t=>({_$litStatic$:t,r:ot}))(t);return ct`<${n} ...=${e}></${n}>`},SF.whenDefine=kt,SF.whenDefined=kt;try{window.dispatchEvent(new CustomEvent("sf-loader-init",{detail:{loader:SF.Loader,timestamp:Date.now()}}))}catch(E){console.warn("sf-loader-init dispatch failed",E)}if(Array.isArray(window.SF_PENDING_COMPONENTS))for(;window.SF_PENDING_COMPONENTS.length;){const[t,e]=window.SF_PENDING_COMPONENTS.shift()||[];if(t&&e&&!SF.Loader.ComponentRegistry[t])try{SF.Loader.registerComponent(t,e)}catch(e){console.warn("pending component register failed",t,e)}}}}]);
|