assayo/build/static/index.js

3 lines
1.4 MiB
JavaScript
Raw Normal View History

2024-10-18 06:58:45 +00:00
/*! For license information please see main.0b989db1.js.LICENSE.txt */
(()=>{var __webpack_modules__={122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(98),s=n(289);class o{constructor(){this.timer=null,this.limit=6,this.messages=[],(0,a.rC)(this,{messages:a.LO,show:a.aD,startClearTimer:a.aD})}static getTime(){return(new Date).getTime()}show(e){this.messages.push({id:o.getTime(),title:s.Z.get((null===e||void 0===e?void 0:e.title)||e||"common.notifications.save"),description:(null===e||void 0===e?void 0:e.description)||"",type:(null===e||void 0===e?void 0:e.type)||"success"}),this.messages.length>this.limit&&this.messages.shift(),this.startClearTimer()}startClearTimer(){this.timer||(this.timer=setInterval((()=>{const e=o.getTime()-3500;this.messages=this.messages.filter((t=>(null===t||void 0===t?void 0:t.id)>e)),this.messages.length||(clearInterval(this.timer),this.timer=null)}),500))}}const r=new o},289:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u,t:()=>p});var a=n(274),s=n(359),o=(0,s.Z)("addInTranslate"),r=(0,s.Z)("createPathByKey"),i=(0,s.Z)("addInObject");function l(e,t){const n=e.split(".");let a=this.translations;for(let s=0,o=n.length;s<o;s++)a[n[s]]=s===o-1?t:a[n[s]]||{},a=a[n[s]]}function c(e){const t=e.split(".");let n=this.translations;for(let a=0,s=t.length;a<s;a++)n[t[a]]=n[t[a]]||{},n=n[t[a]];return n}function m(e,t){for(let n in t)e[n]||(e[n]={}),"object"===typeof t[n]?(0,a.Z)(this,i)[i](e[n],t[n]):e[n]=t[n]}const d=new class{constructor(){Object.defineProperty(this,i,{value:m}),Object.defineProperty(this,r,{value:c}),Object.defineProperty(this,o,{value:l}),this.language="ru",this.translations={}}insertArguments(e,t){if(!t)return e;return(Array.isArray(t)?t:[t]).forEach(((t,n)=>{e=e.replace("$".concat(n+1),t||"_")})),e}get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=this.translations[this.language];if(!t)return e||"";let n=t[e];for(var a=arguments.length,s=new Array(a>1?a-1:0),o=1;o<a;o++)s[o-1]=arguments[o];if(n)return this.insertArguments(n,s);const r=e.split(".");n=t;for(let i=0,l=r.length;i<l;i++)if(n=n[r[i]],!n)return e||"";return this.insertArguments(n,s)}parse(e,t){t.split("\xa7 ").slice(1).forEach((t=>{let n=t.indexOf("\n");n===t.length-1&&(n=t.indexOf(":"));const s=e+"."+t.slice(0,n),r=t.slice(n+1).trim();(0,a.Z)(this,o)[o](s,r)}))}add(e,t){t?(0,a.Z)(this,i)[i]((0,a.Z)(this,r)[r](e),t):(0,a.Z)(this,i)[i](this.translations,e)}};window.localization=d;const u=d;function p(e){return d.get(e)}},575:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{C:()=>applicationHasCustom,Z:()=>applyUrlCommands});var ts_helpers_Localization__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(289),ts_components_Notifications_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(122);function getParametersFromString(e){return Object.fromEntries((e||"").substring(1,1/0).split("&").map((e=>e.split("="))))}function getParametersFromURL(){const e={...getParametersFromString(location.search),...getParametersFromString(location.hash)};return delete e[""],e}function loadJsLocal(e,t){const n=document.createElement("script");n.src=e,n.async=!0,n.onload=t,n.onerror=()=>{ts_components_Notifications_store__WEBPACK_IMPORTED_MODULE_1__.Z.show("common.fileLoader.notification")},document.body.appendChild(n)}function loadJsLGlobal(url,callback){fetch(url).then((e=>e.text())).then((text=>text?"r"===text[0]?(eval(text),callback()):(window.report=text.split("\n"),void callback()):callback()))}function loadJsDump(e,t){"."===(null===e||void 0===e?void 0:e[0])?loadJsLocal(e,t):loadJsLGlobal(e,t)}function loadCssFile(e){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.body.appendChild(t)}let applicationHasCustom={theme:!1,title:!1};function applyUrlCommands(e){const t=getParametersFromURL(),n=t.style||t.theme;n&&(loadCssFile(n),applicationHasCustom.theme=!0);const a=t.title;a&&(document.title=decodeURIComponent(a),applicationHasCustom.title=!0);const s=t.lang||t.language;s&&(ts_helpers_Localization__WEBPACK_IMPORTED_MODULE_0__.Z.language=s);const o=t.dump||t
//# sourceMappingURL=main.0b989db1.js.map