@simai-studio/ui 5.20261022.1303 → 5.20261022.1409

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 CHANGED
@@ -1,11 +1,11 @@
1
1
  # @simai-studio/ui
2
2
 
3
- SIMAI Framework, release `ui-3d6921cd2516` (commit 3d6921cd25169dc9b29fd277466bd0dccbef1691 of [simai/ui](https://github.com/simai/ui)).
3
+ SIMAI Framework, release `ui-e6777d6e7ff7` (commit e6777d6e7ff765c646b04310d4fe46c4d5190a6c of [simai/ui](https://github.com/simai/ui)).
4
4
 
5
5
  ```html
6
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261022.1303/distr/core/css/core.css">
7
- <script>window.sfPath = 'https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261022.1303/distr/';</script>
8
- <script src="https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261022.1303/distr/core/js/core.js"></script>
6
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261022.1409/distr/core/css/core.css">
7
+ <script>window.sfPath = 'https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261022.1409/distr/';</script>
8
+ <script src="https://cdn.jsdelivr.net/npm/@simai-studio/ui@5.20261022.1409/distr/core/js/core.js"></script>
9
9
  ```
10
10
 
11
11
  Components, utilities and Smart Components ship in their minified form (the Loader asks for it); Core in both forms. Documentation: https://ui.simai.io/
@@ -1 +1 @@
1
- (()=>{var e={"715d840bc035"(e,t){var o=r||window.SF,r=r||window.SF||{};window.SF=r||{},o&&Object.keys(o).forEach(e=>{window.SF[e]=o[e],r[e]=o[e]}),window.SF},"2fe7271a6f46"(){window.addEventListener("sf-loader-ready",()=>{new SF.Search({modal:"[sf-modal]",gallery:"[sf-gallery]",overbox:"[sf-overbox]"},{init:"[sf-modal]",overlay:"fixed w-full h-full top-0 right-0 bottom-0 left-0 items-cross-center content-main-center bg-surface-transparent-overlay",area:"relative w-10/12 sm:w-10/12 w-2/3 lg:w-1/2 xl:w-1/2",content:"overflow-hidden border-0 radius-surface p-2 bg-surface-1",close:{active:!0,modifier:"sf-close transition"}})})}};const t={};function o(r){const n=t[r];if(void 0!==n)return n.exports;const a=t[r]={exports:{}};return e[r](a,a.exports,o),a.exports}(()=>{"use strict";o("715d840bc035");function e(e,t){let o=t>>>0;for(let t=0;t<e.length;t+=1)o^=e.charCodeAt(t),o=Math.imul(o,16777619)>>>0;return o.toString(16).padStart(8,"0")}SF.Param=function(){};const t=function(t){const o=String(t??"");return`${e(o,2166136261)}${e(o,2654435769)}`};const r=function(e,t){if(e&&t)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(e,t);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([e,t])}}else window.registerSfComponent(e,t)};function n(e,o=function(){},r=function(){}){this.controller=null,this.updateparam=function(e){for(var t in e)this.param[t]=e[t]},this.isFunction=function(e){if("function"==typeof e)return!0;var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},this.isString=function(e){return"string"==typeof e},this.isEmptySource=function(e,t,o="js"){for(var r=0;r<e.length;r++)switch(o){case"js":if(-1!==e[r].src.indexOf(t))return!0;break;case"css":if(-1!==e[r].href.indexOf(t))return!0;break;case"js-line":if(-1!==e[r].innerHTML.indexOf(t))return!0}return!1},this.processHTML=function(e){for(var t,o,r,n,a,i={script:/<script([^>]*)>/gi,script_end:/<\/script>/gi,script_src:/src=["\']([^"\']+)["\']/i,script_type:/type=["\']([^"\']+)["\']/i,space:/\s+/,ltrim:/^[\s\r\n]+/g,rtrim:/[\s\r\n]+$/g,style:/<link.*?(rel="stylesheet"|type="text\/css")[^>]*>/i,style_href:/href=["\']([^"\']+)["\']/i},s=[],l=[],c=[],d=i.script.lastIndex=i.script_end.lastIndex=0,f=document.querySelectorAll("script[src]"),u=document.querySelectorAll("link[href]"),h=document.querySelectorAll("script:not([src])");null!==(t=i.script.exec(e));){i.script_end.lastIndex=i.script.lastIndex;var p=i.script_end.exec(e);if(null===p)break;var m=!1;if(null!==(a=t[1].match(i.script_type))&&("text/html"!=a[1]&&"text/template"!=a[1]||(m=!0)),m)c.push([d,i.script_end.lastIndex-d]);else{c.push([d,t.index-d]);var S=this.param.scriptsRunFirst||"-1"!=t[1].indexOf("bxrunfirst");if(null!==(r=t[1].match(i.script_src)))this.isEmptySource(f,r[1].substr(0,r[1].lastIndexOf(".js")+3))||s.push({runFirst:S,isInternal:!1,JS:r[1]});else{var b=t.index+t[0].length,w=t.index;e.substr(w,p.index-w+9);var y=e.substr(b,p.index-b);this.isEmptySource(h,y,"js-line")||s.push({runFirst:S,isInternal:!0,JS:y})}}d=p.index+9,i.script.lastIndex=d}c.push([d,0===d?e.length:e.length-d]);for(var g="",v=0,x=c.length;v<x;v++)this.isString(e)&&this.isFunction(e.substr)&&(g+=e.substr(c[v][0],c[v][1]));for(;null!==(o=g.match(i.style));)null!==(n=o[0].match(i.style_href))&&o[0].indexOf('media="')<0&&(this.isEmptySource(u,n[1].substr(0,n[1].lastIndexOf(".css")+4),"css")||l.push(n[1])),g=g.replace(o[0],"");return{HTML:g,SCRIPT:s,STYLE:l}},this.isInternalScript=function(e){for(var t=0,o=0;o<e.length;o++)e[o].isInternal||t++;return t},this.loadJSDoc=e=>{for(let o=0;o<e.length;o++){const r=t(e[o].JS.trim()).substring(0,16);if(-1===SF.Loader.phpScriptsLoaded.indexOf(r)&&e[o].isInternal){const t=document.createElement("script");t.onerror=function(e){console.warn("Script failed to load:",e)},t.type="text/javascript",t.setAttribute("modalInlineScript",n.param.url),t.text=e[o].JS,document.head.append(t)}}},this.loadJS=function(e){this.lengthJS=this.isInternalScript(e);let o=[];for(var r=0;r<e.length;r++){const a=t(e[r].JS).substring(0,16);if(-1===SF.Loader.phpScriptsLoaded.indexOf(a)){if(!e[r].isInternal){let t=document.createElement("script");t.src=e[r].JS,t.setAttribute("modal-script",n.param.url),t.onerror=function(e){console.warn("Script failed to load:",e)},t.async=!0,o.push(new Promise(e=>{t.addEventListener("load",()=>{n.lengthJS--,e()})})),document.head.append(t)}}else n.lengthJS--}return o},this.loadCSS=function(e){this.lengthCSS=e.length?e.length:0;let o=[];for(let r=0;r<e.length;r++){const a=t(e[r]).substring(0,16);if(-1!==SF.Loader.phpScriptsLoaded.indexOf(a)){n.lengthCSS--;continue}let i=document.createElement("link");i.href=e[r],i.rel="stylesheet",i.type="text/css",o.push(new Promise(e=>{i.addEventListener("load",()=>{n.lengthCSS--,e()})})),document.head.append(i)}return o},this.emulateOnLoad=function(e){this.param.emulateOnload&&(SF.__internal.receive("SFAjaxLoadedResouce",window,function(){n.lengthCSS<=0&&n.lengthJS<=0&&(n.loadJSDoc(e.SCRIPT),SF.__internal.send("DOMContentLoaded",window),SF.__internal.send("load",window))}),this.lengthCSS<=0&&this.lengthJS<=0&&(this.loadJSDoc(e.SCRIPT),SF.__internal.send("DOMContentLoaded",window),SF.__internal.send("load",window)))},this.body=function(){let e;if(this.param.body.sfLoaded={frameworks:window.loadedFrameworks,assets:window.loadedSfAssets},"json"==this.param.dataType)e=JSON.stringify(this.param.body);else for(var t in e=new FormData,this.param.body)e.append(t,this.param.body[t]);return e},this.promise=function(){const e={method:this.param.method,mode:this.param.mode,cache:this.param.cache,headers:this.param.headers,redirect:this.param.redirect,referrerPolicy:this.param.referrerPolicy};"GET"!==this.param.method&&(e.body=this.body()),this.controller=new AbortController,e.signal=this.controller.signal,fetch(this.param.url,e).then(function(e){if(!e.ok)throw new Error("HTTP error! status: "+e.status);return"json"===n.param.dataType?e.json():e.text()}).then(function(e){if("json"===n.param.dataType)o(e);else{var t=n.processHTML(e);n.loadCSS(t.STYLE),o(t.HTML),n.loadJS(t.SCRIPT),n.emulateOnLoad(t)}}).catch(function(e){e&&"AbortError"!==e.name&&console.warn("SF.Ajax promise failed:",e)}).finally(function(){r(),n.controller=null})},this.async=async function(){let e={method:this.param.method,mode:this.param.mode,cache:this.param.cache,headers:this.param.headers,redirect:this.param.redirect,referrerPolicy:this.param.referrerPolicy};"GET"!==this.param.method&&(e.body=this.body()),this.controller=new AbortController,e.signal=this.controller.signal;try{var t=await fetch(this.param.url,e);if(!t.ok)throw new Error("HTTP error! status: "+t.status);let r,n;if("json"===this.param.dataType)r=await t.json(),o(r);else{r=await t.text(),n=this.processHTML(r);let e=[...this.loadCSS(n.STYLE),...this.loadJS(n.SCRIPT)];Promise.all(e).then(()=>{o(n.HTML),this.emulateOnLoad(n),this.filterHash(n)})}}catch(e){e&&"AbortError"!==e.name&&console.warn("SF.Ajax async failed:",e)}finally{r(),this.controller=null}},this.abort=function(){this.controller&&(this.controller.abort(),this.controller=null)},this.filterHash=e=>{Object.keys(e).forEach(o=>{-1!==["SCRIPT","STYLE"].indexOf(o)&&e[o].length&&e[o].forEach(e=>{const r="SCRIPT"===o?e.JS:e,n=t(r).substring(0,16);-1===SF.Loader.phpScriptsLoaded.indexOf(n)&&SF.Loader.phpScriptsLoaded.push(n)})})},this.param={url:!1,method:"GET",mode:"same-origin",cache:"no-cache",redirect:"follow",referrerPolicy:"no-referrer",body:{},dataType:"html",async:!0,scriptsRunFirst:!0,emulateOnload:!0,headers:{}};var n=this;this.lengthJS=0,this.lengthCSS=0,this.updateparam(e),"json"===this.param.dataType&&(this.param.headers["Content-Type"]="application/json"),this.param.async?this.async():this.promise()}SF.Ajax=n,n.componentName="SF.Ajax",r("SF.Ajax",n),SF.__internal.send=async function(e,t){return new Promise(o=>{let r;if(document.createEvent)r=new Event(e,{bubbles:!0,cancelable:!1});else{if(!document.createEventObject())return void o(!0);r=document.createEventObject()}t.dispatchEvent?t.dispatchEvent(r):t.fireEvent&&t.fireEvent(e,r),o(!0)})},SF.__internal.receive=function(e,t,o){window.addEventListener?t.addEventListener(e,o,!1):window.attachEvent&&t.attachEvent(e,o)};let a=[],i=!1;function s(e=function(){}){switch(document.readyState){case"loading":a.push(e);break;case"interactive":case"complete":"function"==typeof e&&e(),i=!0}}document.addEventListener("readystatechange",()=>{i||(a.forEach(s),a=[])}),SF.ready=s,SF.cloneDeep=function(e,t){for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&("object"==typeof t[o]&&null==t[o].nodeName?(e[o]||(e[o]={}),SF.cloneDeep(e[o],t[o])):e[o]=t[o]);return e},SF.topZIndex=function(){let e=0;return document.querySelectorAll("body *").forEach(t=>{const o=Number(window.getComputedStyle(t).zIndex);isNaN(o)||(e=Math.max(e,Number(o)))}),e},SF.quickkey=function(e,t){addEventListener("keydown",function(o){o.code==t&&e(o)})},SF.curpos=function(e,t=!1){if(!e)return(new DOMRect).toJSON();if(e.ownerDocument===document&&!t){const t=e.getBoundingClientRect(),o=document.documentElement,{body:r}=document;return{top:Math.round(t.top+(o.scrollTop||r.scrollTop)),left:Math.round(t.left+(o.scrollLeft||r.scrollLeft)),width:Math.round(e.offsetWidth),height:Math.round(e.offsetHeight),right:Math.round(t.right+(o.scrollLeft||r.scrollLeft)),bottom:Math.round(t.bottom+(o.scrollTop||r.scrollTop))}}let o=0,r=0;const n=e.offsetWidth,a=e.offsetHeight;let i=!0;for(;null!=e&&(i||!t||"relative"!=getComputedStyle(e).position);e=e.offsetParent)o+=e.offsetLeft,r+=e.offsetTop,i?i=!1:(o+=Text.toNumber(Dom.style(e,"border-left-width")),r+=Text.toNumber(Dom.style(e,"border-top-width")));return new DOMRect(o,r,n,a).toJSON()},SF.Search=function(e={modal:"[sf-modal]"},t){var o=this,r=!1;o.updateparam=function(e){for(let t in e)o.param[t]=e[t]},o.uParam=function(e,t){for(let o in e)t[o]=e[o];return t},o.noCloneInit=function(e,t){for(let r=0;r<o.init[t].el.length;r++)if(o.init[t].el[r]==e)return!1;return!0},o.attrParamUpdate=function(e){let t={},r="";Object.assign(t,o.param);for(let n in o.param.data)if(e.hasAttribute(o.param.data[n]))switch(r=e.getAttribute(o.param.data[n]),n){case"hide":case"close":t[n].active=!0,t[n].modifier=r||t[n].modifier;break;case"close-modifier":t.close.active=!0,t.close.modifier=r||t.close.modifier;break;case"load":t[n].active=!0;break;case"tooltip":{let a=e.getAttribute(o.param.data.overlay),i=e.getAttribute(o.param.data.area),s=e.getAttribute(o.param.data.content);t[n].active=!0,t[n].position=r||t[n].position,t[n].overlay=a||t[n].overlay,t[n].area=i||t[n].area,t[n].content=s||t[n].content;break}case"pointer":t[n].active="false"!==r,"true"!==r&&"false"!==r&&!0!==r&&r&&(t[n].modifier=r||t[n].modifier);break;default:t[n]=r||!0}else t[n]=o.param[n];return t},o.collection=function(e,t,r){let n={};if(e.has(t)&&""!=t)n=e.get(t),n.elements.push(r),e.set(t,n),n.container.append(n.item(r));else{if(!SF.Gallery)return;n=new SF.Gallery(r.e,[r],o.attrParamUpdate(r.e)),n.elements=[r],e.set(t,n)}},o.commonInit=function(e,t){switch(t){case"modal":o.init.modal.el.push(e),SF&&SF.Modal&&new SF.Modal(e,o.attrParamUpdate(e));break;case"gallery":{let r=o.eSearch[t].replace(/[\[\]]/g,""),n=e.getAttribute(r),a=e.getAttribute("href")?e.getAttribute("href"):e.getAttribute("src"),i=e.getAttribute("sf-mode")?e.getAttribute("sf-mode"):"image";o.init.gallery.el.push(e);let s={e,param:o.attrParamUpdate(e),src:a,mode:i,gallery:n};o.collection(o.init.gallery.map,n,s);break}case"overbox":o.init.overbox.el.push(e),SF&&SF.Overbox&&new SF.Overbox(e,o.attrParamUpdate(e))}},o.searchInit=function(){for(let e in o.eSearch){let t=document.querySelectorAll(o.eSearch[e]);t&&t.forEach(t=>{o.noCloneInit(t,e)&&o.commonInit(t,e)})}r=!0},o.search=function(){let e=new MutationObserver(function(e){e.map(function(e){if(r)for(let t in o.eSearch){e.target.matches(o.eSearch[t])&&o.noCloneInit(e.target,t)&&o.commonInit(e.target,t);let r=e.target.querySelectorAll(o.eSearch[t]);if(r.length>0)for(let e=0;e<r.length;e++)o.noCloneInit(r[e],t)&&o.commonInit(r[e],t)}})});e.observe(document,{childList:!0,subtree:!0,attributeFilter:["sf-modal","sf-gallery","sf-overbox"]})},o.init={modal:{el:[]},gallery:{el:[],map:new Map},overbox:{el:[]}},o.eSearch={modal:"[sf-modal]",gallery:"[sf-gallery]",overbox:"[sf-overbox]"},o.param={loadtimeout:"1000",width:"auto",height:"auto",name:!1,src:!1,iframe:!1,blur:!1,autoload:!1,unclose:!1,action:"click",mode:"ajax",init:"[sf-modal]",service:'[data-name*="sf-service-bottom-area"]',page:'[data-name*="sf-pagewrap-area"]',container:".sf-modal-container",overlay:"sf-modal-overlay fixed w-full h-full top-0 inline-end-0 bottom-0 inline-start-0 items-cross-center content-main-center bg-surface-transparent-overlay","overlay-close":!1,area:"sf-modal-area relative w-10/12 sm:w-10/12 w-2/3 lg:w-1/2 xl:w-1/2",content:"sf-modal-content overflow-auto border-0 bg-surface-1 p-6",html:!1,beforeCreateWindow:function(){},beforeContentUpload:function(){},afterContentUpload:function(){},beforeOpenWindow:function(){},afterOpenWindow:function(){},beforeHideWindow:function(){},beforeShowWindow:function(){},beforeCloseWindow:function(){},tooltip:{active:!1,position:"bottom",overlay:"absolute flex-col items-cross-start",area:"w-full overflow-auto p-4 elevation-3 border-1 radius-3 border-gray-3",content:"w-full"},load:{active:!0,html:'<div class="sf-progress"><div class="sf-progress-animation"></div></div>'},pointer:{active:!1,html:""},close:{active:!0,modifier:"sf-close transition"},hide:{active:!1,modifier:"cursor-pointer absolute top-b6 inline-end-d0 w-b6 h-b6 z-1 opacity-4 transition border-0 bg-transparent before:content-empty before:absolute before:inline-start-0 before:h-a2 before:w-full before:bg-gray-9"},event:{beforeCreateWindow:"SFModalBeforeCreateWindow",beforeContentUpload:"SFModalBeforeContentUpload",afterContentUpload:"SFModalAfterContentUpload",beforeOpenWindow:"SFModalBeforeOpenWindow",afterOpenWindow:"SFModalAfterOpenWindow",beforeHideWindow:"SFModalBeforeHideWindow",beforeShowWindow:"SFModalBeforeShowWindow",beforeCloseWindow:"SFModalBeforeCloseWindow",animationLoadHidden:"SFModalAnimationLoadHidden",animationLoadShow:"SFModalAnimationLoadShow"},data:{action:"sf-action",pointer:"sf-pointer",width:"sf-width",height:"sf-height",name:"sf-name",src:"sf-src",overlay:"sf-overlay-modifier","overlay-close":"sf-overlay-close",area:"sf-modal-modifier",content:"sf-content-modifier",close:"sf-close","close-modifier":"sf-close-modifier",hide:"sf-hide","hide-modifier":"sf-hide-modifier",blur:"sf-blur",autoload:"sf-autoload",unclose:"sf-unclose",tooltip:"sf-tooltip",overbox:"sf-overbox",mode:"sf-mode",iframe:"sf-iframe"}},SF.cloneDeep(o.param,t),Object.assign(e,o.eSearch),Object.freeze(o.param),Object.freeze(o.eSearch),document&&(o.search(),document.addEventListener("DOMContentLoaded",()=>{r=!0}),document.addEventListener("load",()=>{r=!0}),o.searchInit())};o("2fe7271a6f46")})()})();
1
+ (()=>{var e={"715d840bc035"(e,t){var o=r||window.SF,r=r||window.SF||{};window.SF=r||{},o&&Object.keys(o).forEach(e=>{window.SF[e]=o[e],r[e]=o[e]}),window.SF},"2fe7271a6f46"(){window.addEventListener("sf-loader-ready",()=>{new SF.Search({modal:"[sf-modal]",gallery:"[sf-gallery]",overbox:"[sf-overbox]"},{init:"[sf-modal]",overlay:"fixed w-full h-full top-0 right-0 bottom-0 left-0 items-cross-center content-main-center bg-surface-transparent-overlay",area:"relative w-10/12 sm:w-10/12 w-2/3 lg:w-1/2 xl:w-1/2",content:"overflow-hidden border-0 radius-surface p-2 bg-surface-1",close:{active:!0,modifier:"sf-close transition"}})})}};const t={};function o(r){const n=t[r];if(void 0!==n)return n.exports;const a=t[r]={exports:{}};return e[r](a,a.exports,o),a.exports}(()=>{"use strict";o("715d840bc035");function e(e,t){let o=t>>>0;for(let t=0;t<e.length;t+=1)o^=e.charCodeAt(t),o=Math.imul(o,16777619)>>>0;return o.toString(16).padStart(8,"0")}SF.Param=function(){};const t=function(t){const o=String(t??"");return`${e(o,2166136261)}${e(o,2654435769)}`};const r=function(e,t){if(e&&t)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(e,t);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([e,t])}}else window.registerSfComponent(e,t)};function n(e,o=function(){},r=function(){}){this.controller=null,this.updateparam=function(e){for(var t in e)this.param[t]=e[t]},this.isFunction=function(e){if("function"==typeof e)return!0;var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},this.isString=function(e){return"string"==typeof e},this.isEmptySource=function(e,t,o="js"){for(var r=0;r<e.length;r++)switch(o){case"js":if(-1!==e[r].src.indexOf(t))return!0;break;case"css":if(-1!==e[r].href.indexOf(t))return!0;break;case"js-line":if(-1!==e[r].innerHTML.indexOf(t))return!0}return!1},this.processHTML=function(e){for(var t,o,r,n,a,i={script:/<script([^>]*)>/gi,script_end:/<\/script>/gi,script_src:/src=["\']([^"\']+)["\']/i,script_type:/type=["\']([^"\']+)["\']/i,space:/\s+/,ltrim:/^[\s\r\n]+/g,rtrim:/[\s\r\n]+$/g,style:/<link.*?(rel="stylesheet"|type="text\/css")[^>]*>/i,style_href:/href=["\']([^"\']+)["\']/i},s=[],l=[],c=[],d=i.script.lastIndex=i.script_end.lastIndex=0,f=document.querySelectorAll("script[src]"),u=document.querySelectorAll("link[href]"),h=document.querySelectorAll("script:not([src])");null!==(t=i.script.exec(e));){i.script_end.lastIndex=i.script.lastIndex;var p=i.script_end.exec(e);if(null===p)break;var m=!1;if(null!==(a=t[1].match(i.script_type))&&("text/html"!=a[1]&&"text/template"!=a[1]||(m=!0)),m)c.push([d,i.script_end.lastIndex-d]);else{c.push([d,t.index-d]);var S=this.param.scriptsRunFirst||"-1"!=t[1].indexOf("bxrunfirst");if(null!==(r=t[1].match(i.script_src)))this.isEmptySource(f,r[1].substr(0,r[1].lastIndexOf(".js")+3))||s.push({runFirst:S,isInternal:!1,JS:r[1]});else{var b=t.index+t[0].length,w=t.index;e.substr(w,p.index-w+9);var y=e.substr(b,p.index-b);this.isEmptySource(h,y,"js-line")||s.push({runFirst:S,isInternal:!0,JS:y})}}d=p.index+9,i.script.lastIndex=d}c.push([d,0===d?e.length:e.length-d]);for(var g="",v=0,F=c.length;v<F;v++)this.isString(e)&&this.isFunction(e.substr)&&(g+=e.substr(c[v][0],c[v][1]));for(;null!==(o=g.match(i.style));)null!==(n=o[0].match(i.style_href))&&o[0].indexOf('media="')<0&&(this.isEmptySource(u,n[1].substr(0,n[1].lastIndexOf(".css")+4),"css")||l.push(n[1])),g=g.replace(o[0],"");return{HTML:g,SCRIPT:s,STYLE:l}},this.isInternalScript=function(e){for(var t=0,o=0;o<e.length;o++)e[o].isInternal||t++;return t},this.loadJSDoc=e=>{for(let o=0;o<e.length;o++){const r=t(e[o].JS.trim()).substring(0,16);if(-1===SF.Loader.phpScriptsLoaded.indexOf(r)&&e[o].isInternal){const t=document.createElement("script");t.onerror=function(e){console.warn("Script failed to load:",e)},t.type="text/javascript",t.setAttribute("modalInlineScript",n.param.url),t.text=e[o].JS,document.head.append(t)}}},this.loadJS=function(e){this.lengthJS=this.isInternalScript(e);let o=[];for(var r=0;r<e.length;r++){const a=t(e[r].JS).substring(0,16);if(-1===SF.Loader.phpScriptsLoaded.indexOf(a)){if(!e[r].isInternal){let t=document.createElement("script");t.src=e[r].JS,t.setAttribute("modal-script",n.param.url),t.onerror=function(e){console.warn("Script failed to load:",e)},t.async=!0,o.push(new Promise(e=>{t.addEventListener("load",()=>{n.lengthJS--,e()})})),document.head.append(t)}}else n.lengthJS--}return o},this.loadCSS=function(e){this.lengthCSS=e.length?e.length:0;let o=[];for(let r=0;r<e.length;r++){const a=t(e[r]).substring(0,16);if(-1!==SF.Loader.phpScriptsLoaded.indexOf(a)){n.lengthCSS--;continue}let i=document.createElement("link");i.href=e[r],i.rel="stylesheet",i.type="text/css",o.push(new Promise(e=>{i.addEventListener("load",()=>{n.lengthCSS--,e()})})),document.head.append(i)}return o},this.emulateOnLoad=function(e){this.param.emulateOnload&&(SF.__internal.receive("SFAjaxLoadedResouce",window,function(){n.lengthCSS<=0&&n.lengthJS<=0&&(n.loadJSDoc(e.SCRIPT),SF.__internal.send("DOMContentLoaded",window),SF.__internal.send("load",window))}),this.lengthCSS<=0&&this.lengthJS<=0&&(this.loadJSDoc(e.SCRIPT),SF.__internal.send("DOMContentLoaded",window),SF.__internal.send("load",window)))},this.body=function(){let e;if(this.param.body.sfLoaded={frameworks:window.loadedFrameworks,assets:window.loadedSfAssets},"json"==this.param.dataType)e=JSON.stringify(this.param.body);else for(var t in e=new FormData,this.param.body)e.append(t,this.param.body[t]);return e},this.promise=function(){const e={method:this.param.method,mode:this.param.mode,cache:this.param.cache,headers:this.param.headers,redirect:this.param.redirect,referrerPolicy:this.param.referrerPolicy};"GET"!==this.param.method&&(e.body=this.body()),this.controller=new AbortController,e.signal=this.controller.signal,fetch(this.param.url,e).then(function(e){if(!e.ok)throw new Error("HTTP error! status: "+e.status);return"json"===n.param.dataType?e.json():e.text()}).then(function(e){if("json"===n.param.dataType)o(e);else{var t=n.processHTML(e);n.loadCSS(t.STYLE),o(t.HTML),n.loadJS(t.SCRIPT),n.emulateOnLoad(t)}}).catch(function(e){e&&"AbortError"!==e.name&&console.warn("SF.Ajax promise failed:",e)}).finally(function(){r(),n.controller=null})},this.async=async function(){let e={method:this.param.method,mode:this.param.mode,cache:this.param.cache,headers:this.param.headers,redirect:this.param.redirect,referrerPolicy:this.param.referrerPolicy};"GET"!==this.param.method&&(e.body=this.body()),this.controller=new AbortController,e.signal=this.controller.signal;try{var t=await fetch(this.param.url,e);if(!t.ok)throw new Error("HTTP error! status: "+t.status);let r,n;if("json"===this.param.dataType)r=await t.json(),o(r);else{r=await t.text(),n=this.processHTML(r);let e=[...this.loadCSS(n.STYLE),...this.loadJS(n.SCRIPT)];Promise.all(e).then(()=>{o(n.HTML),this.emulateOnLoad(n),this.filterHash(n)})}}catch(e){e&&"AbortError"!==e.name&&console.warn("SF.Ajax async failed:",e)}finally{r(),this.controller=null}},this.abort=function(){this.controller&&(this.controller.abort(),this.controller=null)},this.filterHash=e=>{Object.keys(e).forEach(o=>{-1!==["SCRIPT","STYLE"].indexOf(o)&&e[o].length&&e[o].forEach(e=>{const r="SCRIPT"===o?e.JS:e,n=t(r).substring(0,16);-1===SF.Loader.phpScriptsLoaded.indexOf(n)&&SF.Loader.phpScriptsLoaded.push(n)})})},this.param={url:!1,method:"GET",mode:"same-origin",cache:"no-cache",redirect:"follow",referrerPolicy:"no-referrer",body:{},dataType:"html",async:!0,scriptsRunFirst:!0,emulateOnload:!0,headers:{}};var n=this;this.lengthJS=0,this.lengthCSS=0,this.updateparam(e),"json"===this.param.dataType&&(this.param.headers["Content-Type"]="application/json"),this.param.async?this.async():this.promise()}SF.Ajax=n,n.componentName="SF.Ajax",r("SF.Ajax",n),SF.__internal.send=async function(e,t){return new Promise(o=>{let r;if(document.createEvent)r=new Event(e,{bubbles:!0,cancelable:!1});else{if(!document.createEventObject())return void o(!0);r=document.createEventObject()}t.dispatchEvent?t.dispatchEvent(r):t.fireEvent&&t.fireEvent(e,r),o(!0)})},SF.__internal.receive=function(e,t,o){window.addEventListener?t.addEventListener(e,o,!1):window.attachEvent&&t.attachEvent(e,o)};const a=Symbol.for("simai.sf.ready");!function(e=("undefined"!=typeof window?window:void 0)){if(!e)return;e.SF=e.SF||{};const t=e.SF;if(t.ready&&t.ready[a])return t.ready;const o=e.document;let r,n=!1;const i=new Promise(e=>{r=e}),s=()=>{n||(n=!0,r(e.SF))},l=()=>!o||"loading"!==o.readyState;let c=[];const d=()=>{if(!n||!l()||!c.length)return;const e=c;c=[],e.forEach(e=>e())};function f(e){"function"==typeof e&&(n&&l()?e():c.push(e))}Object.defineProperty(f,a,{value:!0}),f.then=(e,t)=>i.then(e,t),f.catch=e=>i.catch(e),f.finally=e=>i.finally(e),e.addEventListener("sf-loader-init",()=>{s(),d()},{once:!0}),o?.addEventListener("readystatechange",d),t.Loader&&"function"==typeof t.loadSmartBase&&s(),Object.defineProperty(t,"ready",{configurable:!1,enumerable:!0,get:()=>f,set:()=>{}});const u=Array.isArray(e.SF_ON_READY)?e.SF_ON_READY:[],h=e=>{"function"==typeof e&&f.then(e)};e.SF_ON_READY={push:(...e)=>(e.forEach(h),0)},u.forEach(h)}();SF.cloneDeep=function(e,t){for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&("object"==typeof t[o]&&null==t[o].nodeName?(e[o]||(e[o]={}),SF.cloneDeep(e[o],t[o])):e[o]=t[o]);return e},SF.topZIndex=function(){let e=0;return document.querySelectorAll("body *").forEach(t=>{const o=Number(window.getComputedStyle(t).zIndex);isNaN(o)||(e=Math.max(e,Number(o)))}),e},SF.quickkey=function(e,t){addEventListener("keydown",function(o){o.code==t&&e(o)})},SF.curpos=function(e,t=!1){if(!e)return(new DOMRect).toJSON();if(e.ownerDocument===document&&!t){const t=e.getBoundingClientRect(),o=document.documentElement,{body:r}=document;return{top:Math.round(t.top+(o.scrollTop||r.scrollTop)),left:Math.round(t.left+(o.scrollLeft||r.scrollLeft)),width:Math.round(e.offsetWidth),height:Math.round(e.offsetHeight),right:Math.round(t.right+(o.scrollLeft||r.scrollLeft)),bottom:Math.round(t.bottom+(o.scrollTop||r.scrollTop))}}let o=0,r=0;const n=e.offsetWidth,a=e.offsetHeight;let i=!0;for(;null!=e&&(i||!t||"relative"!=getComputedStyle(e).position);e=e.offsetParent)o+=e.offsetLeft,r+=e.offsetTop,i?i=!1:(o+=Text.toNumber(Dom.style(e,"border-left-width")),r+=Text.toNumber(Dom.style(e,"border-top-width")));return new DOMRect(o,r,n,a).toJSON()},SF.Search=function(e={modal:"[sf-modal]"},t){var o=this,r=!1;o.updateparam=function(e){for(let t in e)o.param[t]=e[t]},o.uParam=function(e,t){for(let o in e)t[o]=e[o];return t},o.noCloneInit=function(e,t){for(let r=0;r<o.init[t].el.length;r++)if(o.init[t].el[r]==e)return!1;return!0},o.attrParamUpdate=function(e){let t={},r="";Object.assign(t,o.param);for(let n in o.param.data)if(e.hasAttribute(o.param.data[n]))switch(r=e.getAttribute(o.param.data[n]),n){case"hide":case"close":t[n].active=!0,t[n].modifier=r||t[n].modifier;break;case"close-modifier":t.close.active=!0,t.close.modifier=r||t.close.modifier;break;case"load":t[n].active=!0;break;case"tooltip":{let a=e.getAttribute(o.param.data.overlay),i=e.getAttribute(o.param.data.area),s=e.getAttribute(o.param.data.content);t[n].active=!0,t[n].position=r||t[n].position,t[n].overlay=a||t[n].overlay,t[n].area=i||t[n].area,t[n].content=s||t[n].content;break}case"pointer":t[n].active="false"!==r,"true"!==r&&"false"!==r&&!0!==r&&r&&(t[n].modifier=r||t[n].modifier);break;default:t[n]=r||!0}else t[n]=o.param[n];return t},o.collection=function(e,t,r){let n={};if(e.has(t)&&""!=t)n=e.get(t),n.elements.push(r),e.set(t,n),n.container.append(n.item(r));else{if(!SF.Gallery)return;n=new SF.Gallery(r.e,[r],o.attrParamUpdate(r.e)),n.elements=[r],e.set(t,n)}},o.commonInit=function(e,t){switch(t){case"modal":o.init.modal.el.push(e),SF&&SF.Modal&&new SF.Modal(e,o.attrParamUpdate(e));break;case"gallery":{let r=o.eSearch[t].replace(/[\[\]]/g,""),n=e.getAttribute(r),a=e.getAttribute("href")?e.getAttribute("href"):e.getAttribute("src"),i=e.getAttribute("sf-mode")?e.getAttribute("sf-mode"):"image";o.init.gallery.el.push(e);let s={e,param:o.attrParamUpdate(e),src:a,mode:i,gallery:n};o.collection(o.init.gallery.map,n,s);break}case"overbox":o.init.overbox.el.push(e),SF&&SF.Overbox&&new SF.Overbox(e,o.attrParamUpdate(e))}},o.searchInit=function(){for(let e in o.eSearch){let t=document.querySelectorAll(o.eSearch[e]);t&&t.forEach(t=>{o.noCloneInit(t,e)&&o.commonInit(t,e)})}r=!0},o.search=function(){let e=new MutationObserver(function(e){e.map(function(e){if(r)for(let t in o.eSearch){e.target.matches(o.eSearch[t])&&o.noCloneInit(e.target,t)&&o.commonInit(e.target,t);let r=e.target.querySelectorAll(o.eSearch[t]);if(r.length>0)for(let e=0;e<r.length;e++)o.noCloneInit(r[e],t)&&o.commonInit(r[e],t)}})});e.observe(document,{childList:!0,subtree:!0,attributeFilter:["sf-modal","sf-gallery","sf-overbox"]})},o.init={modal:{el:[]},gallery:{el:[],map:new Map},overbox:{el:[]}},o.eSearch={modal:"[sf-modal]",gallery:"[sf-gallery]",overbox:"[sf-overbox]"},o.param={loadtimeout:"1000",width:"auto",height:"auto",name:!1,src:!1,iframe:!1,blur:!1,autoload:!1,unclose:!1,action:"click",mode:"ajax",init:"[sf-modal]",service:'[data-name*="sf-service-bottom-area"]',page:'[data-name*="sf-pagewrap-area"]',container:".sf-modal-container",overlay:"sf-modal-overlay fixed w-full h-full top-0 inline-end-0 bottom-0 inline-start-0 items-cross-center content-main-center bg-surface-transparent-overlay","overlay-close":!1,area:"sf-modal-area relative w-10/12 sm:w-10/12 w-2/3 lg:w-1/2 xl:w-1/2",content:"sf-modal-content overflow-auto border-0 bg-surface-1 p-6",html:!1,beforeCreateWindow:function(){},beforeContentUpload:function(){},afterContentUpload:function(){},beforeOpenWindow:function(){},afterOpenWindow:function(){},beforeHideWindow:function(){},beforeShowWindow:function(){},beforeCloseWindow:function(){},tooltip:{active:!1,position:"bottom",overlay:"absolute flex-col items-cross-start",area:"w-full overflow-auto p-4 elevation-3 border-1 radius-3 border-gray-3",content:"w-full"},load:{active:!0,html:'<div class="sf-progress"><div class="sf-progress-animation"></div></div>'},pointer:{active:!1,html:""},close:{active:!0,modifier:"sf-close transition"},hide:{active:!1,modifier:"cursor-pointer absolute top-b6 inline-end-d0 w-b6 h-b6 z-1 opacity-4 transition border-0 bg-transparent before:content-empty before:absolute before:inline-start-0 before:h-a2 before:w-full before:bg-gray-9"},event:{beforeCreateWindow:"SFModalBeforeCreateWindow",beforeContentUpload:"SFModalBeforeContentUpload",afterContentUpload:"SFModalAfterContentUpload",beforeOpenWindow:"SFModalBeforeOpenWindow",afterOpenWindow:"SFModalAfterOpenWindow",beforeHideWindow:"SFModalBeforeHideWindow",beforeShowWindow:"SFModalBeforeShowWindow",beforeCloseWindow:"SFModalBeforeCloseWindow",animationLoadHidden:"SFModalAnimationLoadHidden",animationLoadShow:"SFModalAnimationLoadShow"},data:{action:"sf-action",pointer:"sf-pointer",width:"sf-width",height:"sf-height",name:"sf-name",src:"sf-src",overlay:"sf-overlay-modifier","overlay-close":"sf-overlay-close",area:"sf-modal-modifier",content:"sf-content-modifier",close:"sf-close","close-modifier":"sf-close-modifier",hide:"sf-hide","hide-modifier":"sf-hide-modifier",blur:"sf-blur",autoload:"sf-autoload",unclose:"sf-unclose",tooltip:"sf-tooltip",overbox:"sf-overbox",mode:"sf-mode",iframe:"sf-iframe"}},SF.cloneDeep(o.param,t),Object.assign(e,o.eSearch),Object.freeze(o.param),Object.freeze(o.eSearch),document&&(o.search(),document.addEventListener("DOMContentLoaded",()=>{r=!0}),document.addEventListener("load",()=>{r=!0}),o.searchInit())};o("2fe7271a6f46")})()})();
@@ -188,8 +188,13 @@
188
188
  "name": "SF.ready",
189
189
  "status": "public",
190
190
  "kind": "function",
191
- "loaded_by": "core-loader",
192
- "summary": "Runs a function once the runtime is ready."
191
+ "loaded_by": "core",
192
+ "summary": "The Loader's readiness (simai/ui-source#16), on window.SF as soon as core.js has run. A thenable: await SF.ready (or SF.ready.then) settles with window.SF exactly when the Loader sends sf-loader-init -- SF.Loader, SF.loadSmartBase and the other core-loader names are there by then -- and a script that asks later gets it already settled; it never rejects. One per page: created once on the shared global, kept by every later bundle (a second core.js included) and never replaced. Called as SF.ready(fn), it runs fn once the Loader is up and the document has been parsed, synchronously when both have happened. A script that runs before core.js queues a function with (window.SF_ON_READY = window.SF_ON_READY || []).push(fn); fn is called with window.SF at the same moment.",
193
+ "members": [
194
+ "then",
195
+ "catch",
196
+ "finally"
197
+ ]
193
198
  },
194
199
  {
195
200
  "name": "SF.whenDefined",
@@ -49,37 +49,17 @@ SF.__internal.receive = receive;
49
49
 
50
50
  __webpack_require__.r(__webpack_exports__);
51
51
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52
- /* harmony export */ "default": () => (/* binding */ ready),
53
- /* harmony export */ isReady: () => (/* binding */ isReady)
52
+ /* harmony export */ "default": () => (/* binding */ readyCallback)
54
53
  /* harmony export */ });
55
- let stack = [];
56
- let isReady = false;
57
- function ready(handler = function () {}) {
58
- switch (document.readyState) {
59
- case 'loading':
60
- stack.push(handler);
61
- break;
54
+ /* harmony import */ var _core_js_ready_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5effd0d9c238");
55
+ // The callback form of SF.ready, kept for the components that call it. SF.ready
56
+ // itself lives on the shared global, created once by whichever bundle runs
57
+ // first (core.js does, before this chunk): src/core/js/ready.js.
62
58
 
63
- case 'interactive':
64
- case 'complete':
65
- if (typeof handler == 'function') {
66
- handler();
67
- }
68
-
69
- isReady = true;
70
- break;
71
-
72
- default:
73
- break;
74
- }
59
+ const ready = (0,_core_js_ready_js__WEBPACK_IMPORTED_MODULE_0__.installReady)();
60
+ function readyCallback(handler) {
61
+ return (window.SF?.ready || ready)?.(handler);
75
62
  }
76
- document.addEventListener('readystatechange', () => {
77
- if (!isReady) {
78
- stack.forEach(ready);
79
- stack = [];
80
- }
81
- });
82
- SF.ready = ready;
83
63
 
84
64
  /***/ }
85
65
 
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[88616323197113],{fedbedd6b87f(e,t,n){async function a(e,t){return new Promise(n=>{let a;if(document.createEvent)a=new Event(e,{bubbles:!0,cancelable:!1});else{if(!document.createEventObject())return void n(!0);a=document.createEventObject()}t.dispatchEvent?t.dispatchEvent(a):t.fireEvent&&t.fireEvent(e,a),n(!0)})}function c(e,t,n){window.addEventListener?t.addEventListener(e,n,!1):window.attachEvent&&t.attachEvent(e,n)}n.r(t),n.d(t,{receive:()=>c,send:()=>a}),SF.__internal.send=a,SF.__internal.receive=c},d55d5a9f332f(e,t,n){n.r(t),n.d(t,{default:()=>d,isReady:()=>c});let a=[],c=!1;function d(e=function(){}){switch(document.readyState){case"loading":a.push(e);break;case"interactive":case"complete":"function"==typeof e&&e(),c=!0}}document.addEventListener("readystatechange",()=>{c||(a.forEach(d),a=[])}),SF.ready=d}}]);
1
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[88616323197113],{fedbedd6b87f(e,n,t){async function d(e,n){return new Promise(t=>{let d;if(document.createEvent)d=new Event(e,{bubbles:!0,cancelable:!1});else{if(!document.createEventObject())return void t(!0);d=document.createEventObject()}n.dispatchEvent?n.dispatchEvent(d):n.fireEvent&&n.fireEvent(e,d),t(!0)})}function c(e,n,t){window.addEventListener?n.addEventListener(e,t,!1):window.attachEvent&&n.attachEvent(e,t)}t.r(n),t.d(n,{receive:()=>c,send:()=>d}),SF.__internal.send=d,SF.__internal.receive=c},d55d5a9f332f(e,n,t){t.r(n),t.d(n,{default:()=>c});const d=(0,t("5effd0d9c238").L)();function c(e){return(window.SF?.ready||d)?.(e)}}}]);
@@ -1989,7 +1989,9 @@ __webpack_require__.r(__webpack_exports__);
1989
1989
  /* harmony import */ var _region_navigation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("9edc14a11fec");
1990
1990
  /* harmony import */ var _effects_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("4f52f56c9555");
1991
1991
  /* harmony import */ var _notify_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("b4bff8456ce0");
1992
- /* harmony import */ var _preloader__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("6c7f357fe960");
1992
+ /* harmony import */ var _ready_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("5effd0d9c238");
1993
+ /* harmony import */ var _preloader__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("6c7f357fe960");
1994
+
1993
1995
 
1994
1996
 
1995
1997
 
@@ -2008,7 +2010,9 @@ __webpack_require__.r(__webpack_exports__);
2008
2010
 
2009
2011
  if (typeof window !== 'undefined') {
2010
2012
  window.SF = window.SF || {};
2011
- const SF = window.SF;
2013
+ const SF = window.SF; // SF.ready, before the Loader chunk is even asked for (simai/ui-source#16).
2014
+
2015
+ (0,_ready_js__WEBPACK_IMPORTED_MODULE_10__.installReady)(window);
2012
2016
 
2013
2017
  if (!SF.loadRuntime) {
2014
2018
  let loading = null;
@@ -2197,18 +2201,18 @@ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
2197
2201
  const mountPreloader = () => {
2198
2202
  const cfg = {
2199
2203
  enabled: true,
2200
- background: (0,_preloader__WEBPACK_IMPORTED_MODULE_10__.getPreloaderBackground)(),
2204
+ background: (0,_preloader__WEBPACK_IMPORTED_MODULE_11__.getPreloaderBackground)(),
2201
2205
  modifier: 'loader-default',
2202
2206
  tempStyles: '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;',
2203
- color: (0,_preloader__WEBPACK_IMPORTED_MODULE_10__.getPreloaderColor)(),
2204
- width: _preloader__WEBPACK_IMPORTED_MODULE_10__.DEFAULT_PRELOADER.width,
2205
- height: _preloader__WEBPACK_IMPORTED_MODULE_10__.DEFAULT_PRELOADER.height,
2207
+ color: (0,_preloader__WEBPACK_IMPORTED_MODULE_11__.getPreloaderColor)(),
2208
+ width: _preloader__WEBPACK_IMPORTED_MODULE_11__.DEFAULT_PRELOADER.width,
2209
+ height: _preloader__WEBPACK_IMPORTED_MODULE_11__.DEFAULT_PRELOADER.height,
2206
2210
  content: '',
2207
2211
  delay: 300,
2208
2212
  ...(window.SF_BOOT_CONFIG?.preloader || {})
2209
2213
  };
2210
2214
  if (cfg.enabled === false || document.querySelector('.sf-loader')) return;
2211
- const svgContent = cfg.content || (0,_preloader__WEBPACK_IMPORTED_MODULE_10__.createPreloaderContent)(cfg);
2215
+ const svgContent = cfg.content || (0,_preloader__WEBPACK_IMPORTED_MODULE_11__.createPreloaderContent)(cfg);
2212
2216
  let wrap = null;
2213
2217
  let preloaderWrap = null;
2214
2218
  let preloaderRun = false;
@@ -2222,7 +2226,7 @@ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
2222
2226
 
2223
2227
  const stopAnimation = () => {
2224
2228
  if (preloaderWrap) {
2225
- (0,_preloader__WEBPACK_IMPORTED_MODULE_10__.stopPreloaderMotion)(preloaderWrap);
2229
+ (0,_preloader__WEBPACK_IMPORTED_MODULE_11__.stopPreloaderMotion)(preloaderWrap);
2226
2230
  }
2227
2231
  };
2228
2232
 
@@ -2249,7 +2253,7 @@ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
2249
2253
  wrap: wrap,
2250
2254
  preloaderActive: true
2251
2255
  };
2252
- (0,_preloader__WEBPACK_IMPORTED_MODULE_10__.startPreloaderMotion)(preloaderWrap, () => preloaderRun, cfg);
2256
+ (0,_preloader__WEBPACK_IMPORTED_MODULE_11__.startPreloaderMotion)(preloaderWrap, () => preloaderRun, cfg);
2253
2257
  };
2254
2258
 
2255
2259
  const cancelBuild = () => {
@@ -4224,6 +4228,124 @@ function startPreloaderMotion(container, isActive = () => true, options = {}) {
4224
4228
 
4225
4229
  /***/ },
4226
4230
 
4231
+ /***/ "5effd0d9c238"
4232
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4233
+
4234
+ "use strict";
4235
+ __webpack_require__.r(__webpack_exports__);
4236
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4237
+ /* harmony export */ installReady: () => (/* binding */ installReady)
4238
+ /* harmony export */ });
4239
+ // SF.ready: the Loader's readiness, for a script that runs after core.js
4240
+ // (simai/ui-source#16).
4241
+ //
4242
+ // SF.Loader, SF.loadSmartBase and the other Loader names arrive with the
4243
+ // Loader, which core.js imports as a chunk of its own: they are on window.SF
4244
+ // at the window event sf-loader-init, not when core.js has run. A script that
4245
+ // waited for that event itself waited for ever when it ran after the event
4246
+ // had been sent. SF.ready is on window.SF as soon as core.js has run:
4247
+ //
4248
+ // await SF.ready; // settles with window.SF at sf-loader-init
4249
+ // SF.ready.then((SF) => ...); // the same, already settled once it was sent
4250
+ // SF.ready(fn); // fn() once the Loader is up and the
4251
+ // // document has been parsed (the old
4252
+ // // callback form, kept)
4253
+ //
4254
+ // A script that runs before core.js queues a function instead:
4255
+ // (window.SF_ON_READY ||= []).push((SF) => ...);
4256
+ //
4257
+ // Every bundle carries its own copy of this module (core, the core-system
4258
+ // chunk, the sf-system component, a second core.js on the page): the first one
4259
+ // to run puts SF.ready on the shared global, marked, and each later copy finds
4260
+ // the mark and keeps it. The property has a setter that ignores what it is
4261
+ // given, so an older bundle that still assigns SF.ready = ready cannot replace
4262
+ // it either.
4263
+ const MARK = Symbol.for('simai.sf.ready');
4264
+ function installReady(win = typeof window !== 'undefined' ? window : undefined) {
4265
+ if (!win) return undefined;
4266
+ win.SF = win.SF || {};
4267
+ const SF = win.SF;
4268
+ if (SF.ready && SF.ready[MARK]) return SF.ready;
4269
+ const doc = win.document;
4270
+ let settled = false;
4271
+ let resolveLoader;
4272
+ const loaderReady = new Promise(resolve => {
4273
+ resolveLoader = resolve;
4274
+ });
4275
+
4276
+ const settle = () => {
4277
+ if (settled) return;
4278
+ settled = true;
4279
+ resolveLoader(win.SF);
4280
+ };
4281
+
4282
+ const parsed = () => !doc || doc.readyState !== 'loading';
4283
+
4284
+ let waiting = [];
4285
+
4286
+ const flush = () => {
4287
+ if (!settled || !parsed() || !waiting.length) return;
4288
+ const run = waiting;
4289
+ waiting = [];
4290
+ run.forEach(handler => handler());
4291
+ };
4292
+
4293
+ function ready(handler) {
4294
+ if (typeof handler !== 'function') return; // Synchronously when both have happened, as the callback form always ran.
4295
+
4296
+ if (settled && parsed()) {
4297
+ handler();
4298
+ return;
4299
+ }
4300
+
4301
+ waiting.push(handler);
4302
+ }
4303
+
4304
+ Object.defineProperty(ready, MARK, {
4305
+ value: true
4306
+ });
4307
+
4308
+ ready.then = (onResolved, onRejected) => loaderReady.then(onResolved, onRejected);
4309
+
4310
+ ready.catch = onRejected => loaderReady.catch(onRejected);
4311
+
4312
+ ready.finally = onFinally => loaderReady.finally(onFinally);
4313
+
4314
+ win.addEventListener('sf-loader-init', () => {
4315
+ settle();
4316
+ flush();
4317
+ }, {
4318
+ once: true
4319
+ });
4320
+ doc?.addEventListener('readystatechange', flush); // Installed after the Loader started (a bundle that did not find the mark,
4321
+ // say): the event has been sent, so the names are the evidence.
4322
+
4323
+ if (SF.Loader && typeof SF.loadSmartBase === 'function') settle();
4324
+ Object.defineProperty(SF, 'ready', {
4325
+ configurable: false,
4326
+ enumerable: true,
4327
+ get: () => ready,
4328
+ set: () => {}
4329
+ }); // Functions a script queued before core.js ran; later pushes chain at once.
4330
+
4331
+ const queued = Array.isArray(win.SF_ON_READY) ? win.SF_ON_READY : [];
4332
+
4333
+ const take = fn => {
4334
+ if (typeof fn === 'function') ready.then(fn);
4335
+ };
4336
+
4337
+ win.SF_ON_READY = {
4338
+ push: (...fns) => {
4339
+ fns.forEach(take);
4340
+ return 0;
4341
+ }
4342
+ };
4343
+ queued.forEach(take);
4344
+ return ready;
4345
+ }
4346
+
4347
+ /***/ },
4348
+
4227
4349
  /***/ "9edc14a11fec"
4228
4350
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4229
4351