(()=>{"use strict";var __webpack_modules__={738:(e,t,n)=>{n.d(t,{A:()=>s});class s{static sendEvent(e){const t="Ya"in window?window.Ya._metrika.getCounters().map((e=>e.id)):null;t?.length&&t.map((t=>{"ym"in window&&window.ym(t,"reachGoal",e)}))}static openChat(e="LSChat_Client_open_chat"){this.sendEvent(e)}static sendMessage(e="LSChat_Client_send_message"){this.sendEvent(e)}static sendLead(e="LSChat_Client_send_lead"){this.sendEvent(e)}static sendWhatsapp(e="LSChat_Client_click_whatsapp"){this.sendEvent(e)}static sendVk(e="LSChat_Client_click_vk"){this.sendEvent(e)}static sendPhone(e="LSChat_Client_click_phone"){this.sendEvent(e)}static sendTelegram(e="LSChat_Client_click_telegram"){this.sendEvent(e)}}},768:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _api_metric_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(738);const iconSize="2.1em";function __WEBPACK_DEFAULT_EXPORT__(cfg){const capitalizeFirstLetter=e=>e.charAt(0).toUpperCase()+e.slice(1),telegramIcon=``,whatsappIcon=`\n \n `,vkIcon=`\n \n `,phoneIcon=`\n \n `,instagramIcon='\n \n ',twitterIcon='\n \n ',linkIcon='\n \n \n ',linkedInIcon='\n \n ',otherMessengerIcon='\n \n ',skypeIcon='\n \n ',steamIcon='\n \n \n ',weChatIcon='\n \n \n ';class ButtonConstructor{config;div=null;constructor(e){this.config=e,this.div=this.btnDiv(e.type,e.link),console.log("div",this.div)}get element(){return this.div}btnDiv(type,link=""){if(!link)return null;const div=document.createElement("li");Object.assign(div.style,{borderRadius:"9999px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",width:"3.6em",height:"3.6em",position:"absolute",margin:"0.2em",padding:"0",transition:"transform 0.5s ease"}),div.style.boxShadow="0 10px 10px rgba(0, 0, 0, 0.1)";const a=document.createElement("a");a.href=link,a.target="blank",a.style.display="flex";const tooltip=document.createElement("span");div.addEventListener("mouseenter",(()=>{Object.assign(tooltip.style,{top:"-45px",opacity:"1",visibility:"visible"})})),div.addEventListener("click",(()=>{if(this.config.event&&eval(this.config.event),this.config.yaEvent)_api_metric_service__WEBPACK_IMPORTED_MODULE_0__.A.sendEvent(this.config.yaEvent);else switch(type){case"vk":_api_metric_service__WEBPACK_IMPORTED_MODULE_0__.A.sendVk();break;case"phone":_api_metric_service__WEBPACK_IMPORTED_MODULE_0__.A.sendPhone();break;case"whatsapp":_api_metric_service__WEBPACK_IMPORTED_MODULE_0__.A.sendWhatsapp();break;case"telegram":_api_metric_service__WEBPACK_IMPORTED_MODULE_0__.A.sendTelegram()}})),div.addEventListener("mouseleave",(()=>{Object.assign(tooltip.style,{top:"0",opacity:"0",visibility:"hidden"})}));const triangle=document.createElement("div");triangle.style.position="absolute",triangle.style.height="8px",triangle.style.width="8px",triangle.style.bottom="-3px",triangle.style.left="50%",triangle.style.transform="translate(-50%) rotate(45deg)",triangle.style.transition="all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55)",triangle.style.boxShadow="0 0 2px rgba(0,0,0,0.1)",Object.assign(tooltip.style,{boxShadow:"0 10px 10px rgba(0, 0, 0, 0.1)",pointerEvents:"none",transition:"all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55)",opacity:"0",borderRadius:"5px",padding:"5px 8px",fontSize:"14px",position:"absolute",top:"0",color:"#fff"}),div.appendChild(tooltip);let icon="";if("telegram"===type)a.ariaLabel="Telegram",a.dataset.social="telegram",icon=telegramIcon,div.style.backgroundColor="#27a6e6",tooltip.innerText="Telegram",tooltip.style.backgroundColor="#27a6e6",triangle.style.background="#27a6e6";else if("whatsapp"==type)a.ariaLabel="Whatsapp",a.dataset.social="whatsapp",icon=whatsappIcon,div.style.backgroundColor="#25d366",tooltip.innerText="Whatsapp",tooltip.style.backgroundColor="#25d366",triangle.style.background="#25d366";else if("phone"==type)a.ariaLabel="Phone",a.dataset.social="phone",icon=phoneIcon,div.style.backgroundColor="#e51a22",tooltip.innerText="Phone",tooltip.style.backgroundColor="#e51a22",triangle.style.background="#e51a22";else{if("vk"!=type)return null;a.ariaLabel="VK",a.dataset.social="vk",icon=vkIcon,div.style.backgroundColor="#0077ff",tooltip.innerText="VK",tooltip.style.backgroundColor="#0077ff",triangle.style.background="#0077ff"}return tooltip.appendChild(triangle),a.innerHTML=a.innerHTML+icon,div.appendChild(a),div}}return cfg.map((e=>new ButtonConstructor(e)))}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__={};function _getDefaults(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let _defaults=_getDefaults();function changeDefaults(e){_defaults=e}const noopTest={exec:()=>null};function edit(e,t=""){let n="string"==typeof e?e:e.source;const s={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(other.caret,"$1"),n=n.replace(e,i),s},getRegex:()=>new RegExp(n,t)};return s}const other={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},newline=/^(?:[ \t]*(?:\n|$))+/,blockCode=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,fences=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bullet=/(?:[*+-]|\d{1,9}[.)])/,lheadingCore=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lheading=edit(lheadingCore).replace(/bull/g,bullet).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),lheadingGfm=edit(lheadingCore).replace(/bull/g,bullet).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_paragraph=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,blockText=/^[^\n]+/,_blockLabel=/(?!\s*\])(?:\\.|[^\[\]\\])+/,def=edit(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_blockLabel).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),list=edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bullet).getRegex(),_tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_comment=/|$))/,html=edit("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",_comment).replace("tag",_tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),paragraph=edit(_paragraph).replace("hr",hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex(),blockquote=edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",paragraph).getRegex(),blockNormal={blockquote,code:blockCode,def,fences,heading,hr,html,lheading,list,newline,paragraph,table:noopTest,text:blockText},gfmTable=edit("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex(),blockGfm={...blockNormal,lheading:lheadingGfm,table:gfmTable,paragraph:edit(_paragraph).replace("hr",hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gfmTable).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex()},blockPedantic={...blockNormal,html:edit("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit(_paragraph).replace("hr",hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",lheading).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape$1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,inlineCode=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br=/^( {2,}|\\)\n(?!\s*$)/,inlineText=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,emStrongLDelimCore=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,emStrongLDelim=edit(emStrongLDelimCore,"u").replace(/punct/g,_punctuation).getRegex(),emStrongLDelimGfm=edit(emStrongLDelimCore,"u").replace(/punct/g,_punctuationGfmStrongEm).getRegex(),emStrongRDelimAstCore="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",emStrongRDelimAst=edit(emStrongRDelimAstCore,"gu").replace(/notPunctSpace/g,_notPunctuationOrSpace).replace(/punctSpace/g,_punctuationOrSpace).replace(/punct/g,_punctuation).getRegex(),emStrongRDelimAstGfm=edit(emStrongRDelimAstCore,"gu").replace(/notPunctSpace/g,_notPunctuationOrSpaceGfmStrongEm).replace(/punctSpace/g,_punctuationOrSpaceGfmStrongEm).replace(/punct/g,_punctuationGfmStrongEm).getRegex(),emStrongRDelimUnd=edit("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_notPunctuationOrSpace).replace(/punctSpace/g,_punctuationOrSpace).replace(/punct/g,_punctuation).getRegex(),anyPunctuation=edit(/\\(punct)/,"gu").replace(/punct/g,_punctuation).getRegex(),autolink=edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_inlineComment=edit(_comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),tag=edit("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",_inlineComment).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_inlineLabel=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,marked_esm_link=edit(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_inlineLabel).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),reflink=edit(/^!?\[(label)\]\[(ref)\]/).replace("label",_inlineLabel).replace("ref",_blockLabel).getRegex(),nolink=edit(/^!?\[(ref)\](?:\[\])?/).replace("ref",_blockLabel).getRegex(),reflinkSearch=edit("reflink|nolink(?!\\()","g").replace("reflink",reflink).replace("nolink",nolink).getRegex(),inlineNormal={_backpedal:noopTest,anyPunctuation,autolink,blockSkip,br,code:inlineCode,del:noopTest,emStrongLDelim,emStrongRDelimAst,emStrongRDelimUnd,escape:escape$1,link:marked_esm_link,nolink,punctuation,reflink,reflinkSearch,tag,text:inlineText,url:noopTest},inlinePedantic={...inlineNormal,link:edit(/^!?\[(label)\]\((.*?)\)/).replace("label",_inlineLabel).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_inlineLabel).getRegex()},inlineGfm={...inlineNormal,emStrongRDelimAst:emStrongRDelimAstGfm,emStrongLDelim:emStrongLDelimGfm,url:edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},getEscapeReplacement=e=>escapeReplacements[e];function marked_esm_escape(e,t){if(t){if(other.escapeTest.test(e))return e.replace(other.escapeReplace,getEscapeReplacement)}else if(other.escapeTestNoEncode.test(e))return e.replace(other.escapeReplaceNoEncode,getEscapeReplacement);return e}function cleanUrl(e){try{e=encodeURI(e).replace(other.percentDecode,"%")}catch{return null}return e}function splitCells(e,t){const n=e.replace(other.findPipe,((e,t,n)=>{let s=!1,i=t;for(;--i>=0&&"\\"===n[i];)s=!s;return s?"|":" |"})).split(other.splitPipe);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function outputLink(e,t,n,s,i){const o=t.href,r=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1");s.state.inLink=!0;const l={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:o,title:r,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,l}function indentCodeCompensation(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(null===s)return t;const i=s[1];return t.split("\n").map((e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[s]=t;return s.length>=i.length?e.slice(i.length):e})).join("\n")}class _Tokenizer{options;rules;lexer;constructor(e){this.options=e||_defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:rtrim(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=indentCodeCompensation(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=rtrim(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:rtrim(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=rtrim(t[0],"\n").split("\n"),n="",s="";const i=[];for(;e.length>0;){let t=!1;const o=[];let r;for(r=0;r1,i={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let r=!1;for(;e;){let n=!1,s="",a="";if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],p=!l.trim(),d=0;if(this.options.pedantic?(d=2,a=l.trimStart()):p?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,a=l.slice(d),d+=t[1].length),p&&this.rules.other.blankLine.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),o=this.rules.other.headingBeginRegex(d),r=this.rules.other.htmlBeginRegex(d);for(;e;){const h=e.split("\n",1)[0];let u;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),u=c):u=c.replace(this.rules.other.tabCharGlobal," "),i.test(c))break;if(o.test(c))break;if(r.test(c))break;if(t.test(c))break;if(n.test(c))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!c.trim())a+="\n"+u.slice(d);else{if(p)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(i.test(l))break;if(o.test(l))break;if(n.test(l))break;a+="\n"+c}p||c.trim()||(p=!0),s+=h+"\n",e=e.substring(h.length+1),l=u.slice(d)}}i.loose||(r?i.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(r=!0));let h,u=null;this.options.gfm&&(u=this.rules.other.listIsTask.exec(a),u&&(h="[ ] "!==u[0],a=a.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:s,task:!!u,checked:h,loose:!1,text:a,tokens:[]}),i.raw+=s}const a=i.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));i.loose=n}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]}))));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=rtrim(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=findClosingBracket(t[2],"()");if(-2===e)return;if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),outputLink(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return outputLink(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s)return;if(s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...s[0]].length-1;let i,o,r=n,a=0;const l="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=l.exec(t));){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(o=[...i].length,s[3]||s[4]){r+=o;continue}if((s[5]||s[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(r-=o,r>0)continue;o=Math.min(o,o+r+a);const t=[...s[0]][0].length,l=e.slice(0,n+s.index+t+o);if(Math.min(n,o)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&s&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let s;do{s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(s!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class _Lexer{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_defaults,this.options.tokenizer=this.options.tokenizer||new _Tokenizer,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other,block:block.normal,inline:inline.normal};this.options.pedantic?(t.block=block.pedantic,t.inline=inline.pedantic):this.options.gfm&&(t.block=block.gfm,this.options.breaks?t.inline=inline.breaks:t.inline=inline.gfm),this.tokenizer.rules=t}static get rules(){return{block,inline}}static lex(e,t){return new _Lexer(t).lex(e)}static lexInline(e,t){return new _Lexer(t).inlineTokens(e)}lex(e){e=e.replace(other.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const n=t.at(-1);1===s.raw.length&&void 0!==n?n.raw+="\n":t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.at(-1).src=n.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(s=this.tokenizer.paragraph(i))){const o=t.at(-1);n&&"paragraph"===o?.type?(o.raw+="\n"+s.raw,o.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(s),n=i.length!==e.length,e=e.substring(s.raw.length)}else if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(s)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,s=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;e;){let s;if(i||(o=""),i=!1,this.options.extensions?.inline?.some((n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===s.type&&"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s);continue}if(s=this.tokenizer.emStrong(e,n,o)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),t.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),t.push(s);continue}let r=e;if(this.options.extensions?.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(s=this.tokenizer.inlineText(r)){e=e.substring(s.raw.length),"_"!==s.raw.slice(-1)&&(o=s.raw.slice(-1)),i=!0;const n=t.at(-1);"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}}class _Renderer{options;parser;constructor(e){this.options=e||_defaults}space(e){return""}code({text:e,lang:t,escaped:n}){const s=(t||"").match(other.notSpaceStart)?.[0],i=e.replace(other.endingNewline,"")+"\n";return s?'
'+(n?i:marked_esm_escape(i,!0))+"
\n":"
"+(n?i:marked_esm_escape(i,!0))+"
\n"}blockquote({tokens:e}){return`
\n${this.parser.parse(e)}
\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
\n"}list(e){const t=e.ordered,n=e.start;let s="";for(let t=0;t\n"+s+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+marked_esm_escape(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let t=0;t${s}`),"\n\n"+t+"\n"+s+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${marked_esm_escape(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),i=cleanUrl(e);if(null===i)return s;let o='
    ",o}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));const i=cleanUrl(e);if(null===i)return marked_esm_escape(n);let o=`${n}{const i=e[s].flat(1/0);n=n.concat(this.walkTokens(i,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new _Renderer(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const s=n,i=e.renderer[s],o=t[s];t[s]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const s=n,i=e.tokenizer[s],o=t[s];t[s]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new _Hooks;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const s=n,i=e.hooks[s],o=t[s];_Hooks.passThroughHooks.has(n)?t[s]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then((e=>o.call(t,e)));const n=i.call(t,e);return o.call(t,n)}:t[s]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(s.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _Lexer.lex(e,t??this.defaults)}parser(e,t){return _Parser.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const s={...n},i={...this.defaults,...s},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===s.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const r=i.hooks?i.hooks.provideLexer():e?_Lexer.lex:_Lexer.lexInline,a=i.hooks?i.hooks.provideParser():e?_Parser.parse:_Parser.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then((e=>r(e,i))).then((e=>i.hooks?i.hooks.processAllTokens(e):e)).then((e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then((()=>e)):e)).then((e=>a(e,i))).then((e=>i.hooks?i.hooks.postprocess(e):e)).catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let e=r(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=a(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return o(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+marked_esm_escape(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}}const markedInstance=new Marked;function marked(e,t){return markedInstance.parse(e,t)}marked.options=marked.setOptions=function(e){return markedInstance.setOptions(e),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked},marked.getDefaults=_getDefaults,marked.defaults=_defaults,marked.use=function(...e){return markedInstance.use(...e),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked},marked.walkTokens=function(e,t){return markedInstance.walkTokens(e,t)},marked.parseInline=markedInstance.parseInline,marked.Parser=_Parser,marked.parser=_Parser.parse,marked.Renderer=_Renderer,marked.TextRenderer=_TextRenderer,marked.Lexer=_Lexer,marked.lexer=_Lexer.lex,marked.Tokenizer=_Tokenizer,marked.Hooks=_Hooks,marked.parse=marked;const marked_esm_options=marked.options,setOptions=marked.setOptions,use=marked.use,walkTokens=marked.walkTokens,parseInline=marked.parseInline,parse=null,parser=_Parser.parse,lexer=_Lexer.lex,API_URL="https://apid.launchstrategies.ru";class BugReport{report(e){fetch(`${API_URL}/widget/bug`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}}const isString=e=>"string"==typeof e,defer=()=>{let e,t;const n=new Promise(((n,s)=>{e=n,t=s}));return n.resolve=e,n.reject=t,n},makeString=e=>null==e?"":""+e,copy=(e,t,n)=>{e.forEach((e=>{t[e]&&(n[e]=t[e])}))},lastOfPathSeparatorRegExp=/###/g,cleanKey=e=>e&&e.indexOf("###")>-1?e.replace(lastOfPathSeparatorRegExp,"."):e,canNotTraverseDeeper=e=>!e||isString(e),getLastOfPath=(e,t,n)=>{const s=isString(t)?t.split("."):t;let i=0;for(;i{const{obj:s,k:i}=getLastOfPath(e,t,Object);if(void 0!==s||1===t.length)return void(s[i]=n);let o=t[t.length-1],r=t.slice(0,t.length-1),a=getLastOfPath(e,r,Object);for(;void 0===a.obj&&r.length;)o=`${r[r.length-1]}.${o}`,r=r.slice(0,r.length-1),a=getLastOfPath(e,r,Object),a?.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},pushPath=(e,t,n,s)=>{const{obj:i,k:o}=getLastOfPath(e,t,Object);i[o]=i[o]||[],i[o].push(n)},getPath=(e,t)=>{const{obj:n,k:s}=getLastOfPath(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,s))return n[s]},getPathWithDefaults=(e,t,n)=>{const s=getPath(e,n);return void 0!==s?s:getPath(t,n)},deepExtend=(e,t,n)=>{for(const s in t)"__proto__"!==s&&"constructor"!==s&&(s in e?isString(e[s])||e[s]instanceof String||isString(t[s])||t[s]instanceof String?n&&(e[s]=t[s]):deepExtend(e[s],t[s],n):e[s]=t[s]);return e},regexEscape=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const i18next_escape=e=>isString(e)?e.replace(/[&<>"'\/]/g,(e=>_entityMap[e])):e;class RegExpCache{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(e,t,n)=>{t=t||"",n=n||"";const s=chars.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===s.length)return!0;const i=looksLikeObjectPathRegExpCache.getRegExp(`(${s.map((e=>"?"===e?"\\?":e)).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o},deepFind=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const s=t.split(n);let i=e;for(let e=0;e-1&&re?.replace("_","-"),consoleLogger={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Logger{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||consoleLogger,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s{let[t,s]=e;for(let e=0;e{let[s,i]=t;for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,o=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],n&&(Array.isArray(n)?r.push(...n):isString(n)&&i?r.push(...n.split(i)):r.push(n)));const a=getPath(this.data,r);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=r[0],t=r[1],n=r.slice(2).join(".")),!a&&o&&isString(n)?deepFind(this.data?.[e]?.[t],n,i):a}addResource(e,t,n,s){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let r=[e,t];n&&(r=r.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=e.split("."),s=t,t=r[1]),this.addNamespaces(t),setPath(this.data,r,s),i.silent||this.emit("added",e,t,n,s)}addResources(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const s in n)(isString(n[s])||Array.isArray(n[s]))&&this.addResource(e,t,s,n[s],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},r=[e,t];e.indexOf(".")>-1&&(r=e.split("."),s=n,n=t,t=r[1]),this.addNamespaces(t);let a=getPath(this.data,r)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?deepExtend(a,n,i):a={...a,...n},setPath(this.data,r,a),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var postProcessor={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,s,i){return e.forEach((e=>{t=this.processors[e]?.process(t,n,s,i)??t})),t}};const checkedLoadedFor={},shouldHandleAsObject=e=>!isString(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Translator extends EventEmitter{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return void 0!==n?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,r=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||looksLikeObjectPath(e,n,s));if(o&&!r){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:isString(i)?[i]:i};const o=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(s)}return{key:e,namespaces:isString(i)?[i]:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof options&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const s=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:r}=this.extractFromKey(e[e.length-1],t),a=r[r.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===l?.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return s?{res:`${a}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:o}const p=this.resolve(e,t);let d=p?.res;const h=p?.usedKey||o,u=p?.exactUsedKey||o,g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,f=!this.i18nFormat||this.i18nFormat.handleAsObject,m=void 0!==t.count&&!isString(t.count),b=Translator.hasDefaultValue(t),x=m?this.pluralResolver.getSuffix(l,t.count,t):"",k=t.ordinal&&m?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",w=m&&!t.ordinal&&0===t.count,y=w&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${x}`]||t[`defaultValue${k}`]||t.defaultValue;let v=d;f&&!d&&b&&(v=y);const A=shouldHandleAsObject(v),S=Object.prototype.toString.apply(v);if(!(f&&v&&A&&["[object Number]","[object Function]","[object RegExp]"].indexOf(S)<0)||isString(g)&&Array.isArray(v))if(f&&isString(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let s=!1,r=!1;!this.isValidLookup(d)&&b&&(s=!0,d=y),this.isValidLookup(d)||(r=!0,d=o);const c=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:d,h=b&&y!==d&&this.options.updateMissing;if(r||s||h){if(this.logger.log(h?"updateKey":"missingKey",l,a,o,h?y:d),i){const e=this.resolve(o,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{const i=b&&s!==d?s:c;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,n,i,h,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,a,n,i,h,t),this.emit("missingKey",e,a,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&m?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);w&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{s([e],o+n,t[`defaultValue${n}`]||y)}))})):s(e,o,y))}d=this.extendTranslation(d,e,t,p,n),r&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${a}:${o}`),(r||s)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,s?d:void 0))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,v,{...t,ns:r}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(p.res=e,p.usedParams=this.getUsedParamsDetails(t),p):e}if(i){const e=Array.isArray(v),n=e?[]:{},s=e?u:h;for(const e in v)if(Object.prototype.hasOwnProperty.call(v,e)){const o=`${s}${i}${e}`;n[e]=b&&!d?this.translate(o,{...t,defaultValue:shouldHandleAsObject(y)?y[e]:void 0,joinArrays:!1,ns:r}):this.translate(o,{...t,joinArrays:!1,ns:r}),n[e]===o&&(n[e]=v[e])}d=n}}return s?(p.res=d,p.usedParams=this.getUsedParamsDetails(t),p):d}extendTranslation(e,t,n,s,i){var o=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const r=isString(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(r){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=n.replace&&!isString(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||s.usedLng,n),r){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,s=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return isString(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const a=this.extractFromKey(e,r),l=a.key;n=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=void 0!==r.count&&!isString(r.count),d=p&&!r.ordinal&&0===r.count,h=void 0!==r.context&&(isString(r.context)||"number"==typeof r.context)&&""!==r.context,u=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(o=e,checkedLoadedFor[`${u[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(o)||(checkedLoadedFor[`${u[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${u.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),u.forEach((n=>{if(this.isValidLookup(t))return;i=n;const o=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,l,n,e,r);else{let e;p&&(e=this.pluralResolver.getSuffix(n,r.count,r));const t=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(o.push(l+e),r.ordinal&&0===e.indexOf(s)&&o.push(l+e.replace(s,this.options.pluralSeparator)),d&&o.push(l+t)),h){const n=`${l}${this.options.contextSeparator}${r.context}`;o.push(n),p&&(o.push(n+e),r.ordinal&&0===e.indexOf(s)&&o.push(n+e.replace(s,this.options.pluralSeparator)),d&&o.push(n+t))}}let a;for(;a=o.pop();)this.isValidLookup(t)||(s=a,t=this.getResource(n,e,a,r))})))}))})),{res:t,usedKey:n,exactUsedKey:s,usedLng:i,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!isString(e.replace);let s=n?e.replace:e;if(n&&void 0!==e.count&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const e of t)delete s[e]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class LanguageUtil{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(e){if(!(e=getCleanedCode(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=getCleanedCode(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(isString(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const s=this.getLanguagePartFromCode(e);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find((e=>e===s?e:e.indexOf("-")<0&&s.indexOf("-")<0?void 0:e.indexOf("-")>0&&s.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===s||0===e.indexOf(s)&&s.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),isString(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],i=e=>{e&&(this.isSupportedCode(e)?s.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return isString(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):isString(e)&&i(this.formatLanguageCode(e)),n.forEach((e=>{s.indexOf(e)<0&&i(this.formatLanguageCode(e))})),s}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=getCleanedCode("dev"===e?"en":e),s=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:s})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!e.match(/-|_/))return dummyRule;const s=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(s,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort(((e,t)=>suffixesOrder[e]-suffixesOrder[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const deepFindWithDefaults=function(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=getPathWithDefaults(e,t,n);return!o&&i&&isString(n)&&(o=deepFind(e,n,s),void 0===o&&(o=deepFind(t,n,s))),o},regexSafe=e=>e.replace(/\$/g,"$$$$");class Interpolator{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=baseLogger.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:r,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:p,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:u,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:i18next_escape,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==s&&s,this.prefix=i?regexEscape(i):o||"{{",this.suffix=r?regexEscape(r):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?regexEscape(d):h||regexEscape("$t("),this.nestingSuffix=u?regexEscape(u):g||regexEscape(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,s){let i,o,r;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=deepFindWithDefaults(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...s,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),r=i.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(t,a,o,this.options.keySeparator,this.options.ignoreJSONStructure),r,n,{...s,...t,interpolationkey:o})};this.resetRegExp();const c=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>regexSafe(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?regexSafe(this.escape(e)):regexSafe(e)}].forEach((t=>{for(r=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,i,s);o=isString(t)?t:""}else if(s&&Object.prototype.hasOwnProperty.call(s,n))o="";else{if(p){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else isString(o)||this.useRawValueToEscape||(o=makeString(o));const a=t.safeValue(o);if(e=e.replace(i[0],a),p?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,r++,r>=this.maxReplaces)break}})),e}nest(e,t){let n,s,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const s=e.split(new RegExp(`${n}[ ]*{`));let o=`{${s[1]}`;e=s[0],o=this.interpolate(o,i);const r=o.match(/'/g),a=o.match(/"/g);((r?.length??0)%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];i={...o},i=i.replace&&!isString(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),a=e,l=!0}if(s=t(r.call(this,n[1].trim(),i),i),s&&n[0]===e&&!isString(s))return s;isString(s)||(s=makeString(s)),s||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),s=""),l&&(s=a.reduce(((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:n[1].trim()})),s.trim())),e=e.replace(n[0],s),this.regexp.lastIndex=0}return e}}const parseFormatStr=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const s=e.split("(");t=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);if("currency"===t&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if("relativetime"===t&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{i.split(";").forEach((e=>{if(e){const[t,...s]=e.split(":"),i=s.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}}))}}return{formatName:t,formatOptions:n}},createCachedFormatter=e=>{const t={};return(n,s,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const r=s+JSON.stringify(o);let a=t[r];return a||(a=e(getCleanedCode(s),i),t[r]=a),a(n)}};class Formatter{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=baseLogger.create("formatter"),this.options=e,this.formats={number:createCachedFormatter(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:createCachedFormatter(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:createCachedFormatter(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:createCachedFormatter(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:createCachedFormatter(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=createCachedFormatter(t)}format(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find((e=>e.indexOf(")")>-1))){const e=i.findIndex((e=>e.indexOf(")")>-1));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce(((e,t)=>{const{formatName:i,formatOptions:o}=parseFormatStr(t);if(this.formats[i]){let t=e;try{const r=s?.formatParams?.[s.interpolationkey]||{},a=r.locale||r.lng||s.locale||s.lng||n;t=this.formats[i](e,a,{...o,...s,...r})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e)}}const removePending=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)};class Connector extends EventEmitter{constructor(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=baseLogger.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,s.backend,s)}queueLoad(e,t,n,s){const i={},o={},r={},a={};return e.forEach((e=>{let s=!0;t.forEach((t=>{const r=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===o[r]&&(o[r]=!0):(this.state[r]=1,s=!1,void 0===o[r]&&(o[r]=!0),void 0===i[r]&&(i[r]=!0),void 0===a[t]&&(a[t]=!0)))})),s||(r[e]=!0)})),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const s=e.split("|"),i=s[0],o=s[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const r={};this.queue.forEach((n=>{pushPath(n.loaded,[i],o),removePending(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{r[e]||(r[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===r[e][t]&&(r[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",r),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:i,callback:o});this.readingCalls++;const r=(r,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}r&&a&&s{this.read.call(this,e,t,n,s+1,2*i,o)}),i):o(r,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,r);try{const n=a(e,t);n&&"function"==typeof n.then?n.then((e=>r(null,e))).catch(r):r(null,n)}catch(e){r(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();isString(e)&&(e=this.languageUtils.toResolveHierarchy(e)),isString(t)&&(t=[t]);const i=this.queueLoad(e,t,n,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),s=n[0],i=n[1];this.read(s,i,"read",void 0,void 0,((n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${s}`,o),this.loaded(e,n,o)}))}saveMissing(e,t,n,s,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const a={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;i=5===l.length?l(e,t,n,s,a):l(e,t,n,s),i&&"function"==typeof i.then?i.then((e=>r(null,e))).catch(r):r(null,i)}catch(e){r(e)}else l(e,t,n,s,r,a)}e&&e[0]&&this.store.addResource(e[0],t,n,s)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const get=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),isString(e[1])&&(t.defaultValue=e[1]),isString(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),transformOptions=e=>(isString(e.ns)&&(e.ns=[e.ns]),isString(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),isString(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),noop=()=>{},bindMemberFunctions=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))};class I18n extends EventEmitter{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=transformOptions(e),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(isString(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=get();this.options={...s,...this.options,...transformOptions(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?baseLogger.init(i(this.modules.logger),this.options):baseLogger.init(null,this.options),t=this.modules.formatter?this.modules.formatter:Formatter;const n=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const o=this.services;o.logger=baseLogger,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new PluralResolver(n,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(o.formatter=i(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Interpolator(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Connector(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=noop),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const o=defer(),r=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:noop;const n=isString(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],s=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)s(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>s(e)))}this.options.preload?.forEach?.((e=>s(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const s=defer();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=noop),this.services.backendConnector.reload(e,t,(e=>{s.resolve(),n(e)})),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&postProcessor.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const s=defer();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,r)=>{r?this.isLanguageChangingTo===e&&(i(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,s.resolve((function(){return n.t(...arguments)})),t&&t(o,(function(){return n.t(...arguments)}))},r=t=>{e||t||!this.services.languageDetector||(t=[]);const n=isString(t)?t:t&&t[0],s=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(isString(t)?[t]:t);s&&(this.language||i(s),this.translator.language||this.translator.changeLanguage(s),this.services.languageDetector?.cacheUserLanguage?.(s)),this.loadResources(s,(e=>{o(e,s)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),s}getFixedT(e,t,n){var s=this;const i=function(e,t){let o;if("object"!=typeof t){for(var r=arguments.length,a=new Array(r>2?r-2:0),l=2;l`${o.keyPrefix}${c}${e}`)):o.keyPrefix?`${o.keyPrefix}${c}${e}`:e,s.t(p,o)};return isString(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||s&&!o(i,e)))}loadNamespaces(e,t){const n=defer();return this.options.ns?(isString(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=defer();isString(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter((e=>s.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return i.length?(this.options.preload=s.concat(i),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services?.languageUtils||new LanguageUtil(get());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new I18n(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:noop;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new I18n(s);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach((e=>{i[e]=this[e]})),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce(((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce(((n,s)=>(n[s]={...e[t][s]},n)),e[t]),e)),{});i.store=new ResourceStore(e,s),i.services.resourceStore=i.store}return i.translator=new Translator(i.services,s),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s{togglePopup(),notifyBox&¬ifyBox.removeChild(n)}));const i=document.createElement("p");i.textContent=t("support"),i.style.marginTop="0.375rem",i.style.fontSize="1rem",i.style.fontWeight="bold",i.style.color="peru",i.style.lineHeight="2rem",i.style.marginRight="0.75rem",i.style.overflow="hidden",i.style.textOverflow="ellipsis",i.style.whiteSpace="nowrap",i.style.marginBottom="0";const o=document.createElement("p");o.innerHTML=e,o.style.overflow="hidden",o.style.lineHeight="1.25rem",o.style.wordBreak="break-word",o.style.color="#7f7f7f",o.style.maxHeight="2.5rem",o.style.fontSize="small",o.style.marginTop="0";const r=document.createElement("button");r.style.width="4rem",r.style.cursor="pointer",r.style.outline="none",r.style.border="none",r.style.background="none";const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),a.setAttribute("stroke-width","2"),a.setAttribute("stroke","rgba(31,41,55)"),a.setAttribute("fill","none"),a.style.width="1.75rem",a.style.height="1.75rem";const l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d","M6 18L18 6M6 6l12 12"),l.setAttribute("stroke-linejoin","round"),l.setAttribute("stroke-linecap","round"),a.appendChild(l),r.appendChild(a),s.appendChild(i),s.appendChild(o),n.appendChild(s),n.appendChild(r);const c=document.querySelector("#lsw_chat_popup");notifyBox&&c&&"none"==c.style.display&&(notifyBox.appendChild(n),setTimeout((()=>{notifyBox&¬ifyBox.removeChild(n)}),5e3)),r.addEventListener("click",(()=>{notifyBox&¬ifyBox.removeChild(n)}))}};function createNotifyBox(){if(notifyBox)return notifyBox;const e="-20,80".split(",").map((e=>Number(e)));return e[1]+=73,notifyBox=document.createElement("div"),notifyBox.style.display="flex",notifyBox.style.flexDirection="column",notifyBox.style[e[0]>0?"left":"right"]=Math.abs(e[0])+"px",notifyBox.style[e[1]>0?"bottom":"top"]=Math.abs(e[1])+"px",notifyBox.style.position="fixed",notifyBox.style.zIndex="500",document.body.appendChild(notifyBox),notifyBox}const messageNotifier=LSWMessageNotifier,assistant_service_API_URL="https://apid.launchstrategies.ru";let tonnel,operatorOnline=!1,assistant_service_messageNotifier=new messageNotifier;const bugReport=new BugReport,typingIndicatorDiv=document.createElement("div");function replacePhoneNumbers(e){return e.replace(/\+?\d[\d\-\(\) ]{9,}\d/g,(e=>`
    ${e}`))}function addReplyElement(e,t="",n){let s="";if("object"==typeof t){if(t.date){let e=new Date(t.date);s=`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}t=t.text||""}const i=document.createElement("div");i.style.position="relative",i.className="flex mb-3"+(n?" justify-end":"");const o=document.createElement("div");o.style.position="relative",o.style.paddingBottom="0.9em",o.style.paddingRight="3em",o.classList.add("text-"+(n?"white":"black"),"rounded-lg","py-2","px-4","max-w-[70%]"),n?o.classList.add("bg-gray-800"):o.style.backgroundColor="#E6EAF2",o.innerHTML=replacePhoneNumbers(t),i.appendChild(o),e.appendChild(i),e.scrollTop=e.scrollHeight;const r=document.createElement("div");return r.innerHTML=s,r.classList.add("clock"),o.appendChild(r),i}async function addMessageToStorage(e,t){let n=!1;const s="string"==typeof e?e:e.content,i=localStorage.getItem("aiwi_messages"),o=i?JSON.parse(i):[];o.length&&(n=!0),o.push({role:t?"user":"assistant",content:s,date:"string"==typeof e?(new Date).valueOf():e.date}),localStorage.setItem("aiwi_messages",JSON.stringify(o));const r=localStorage.getItem("aiwi_thread_id");return n&&r&&await fetch(`${assistant_service_API_URL}/widget/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({thread:r})}).then((e=>e.json())).catch((e=>console.error("error chat notify",e.message))),n}async function addMessage(e,t){const n=messages;if(n){if(inputTextInChat&&(inputTextInChat.value=""),"object"==typeof e&&e instanceof EventSource){let t,s;return e.addEventListener("textCreated",(()=>{t=addReplyElement(n)})),e.addEventListener("typing",(()=>{s=addReplyElement(n,typingIndicatorDiv.outerHTML)})),e.addEventListener("textDelta",(({data:e})=>{const s=t.querySelector("div");s&&(s.innerHTML=marked.parse(s.innerText+e).toString(),n.scrollTop=n.scrollHeight)})),void e.addEventListener("messageDone",(({data:i})=>{if(s?.parentNode&&s.parentNode.removeChild(s),e.close(),i)try{const e=JSON.parse(i);let s="";if(!e?.content?.length)return;(s=e.content[0].text.value)||(s="Что-то пошло не так. Попробуйте позже пожалуйста."),t?.querySelector("div")?t.querySelector("div").innerHTML=marked.parse(s).toString():t=addReplyElement(n,{text:s,date:(new Date).valueOf()}),assistant_service_messageNotifier.newMessageNotify(s),addMessageToStorage(s)}catch(e){console.error("error processing message",e)}}))}("string"!=typeof e&&e?e:[{role:t?"user":"assistant",content:e,date:(new Date).valueOf()}]).forEach((t=>{let s="user"==t.role;if(t.content&&addReplyElement(n,{text:marked.parse(t.content).toString(),date:t.date},s),e){const n=localStorage.getItem("aiwi_messages"),i=n?JSON.parse(n):[];i.push({role:s?"user":"assistant",content:t.content,date:(new Date).valueOf()}),"string"==typeof e&&localStorage.setItem("aiwi_messages",JSON.stringify(i))}}))}else console.log("chatMessages div not found")}async function createTonnel(){if(tonnel&&tonnel.readyState!==tonnel.CLOSED)return;const e=localStorage.getItem("aiwi_thread_id");e&&(tonnel=new EventSource(`${assistant_service_API_URL}/widget/listen/`+e),tonnel.addEventListener("operatorMessage",(({data:e})=>{operatorOnline=!0,assistant_service_messageNotifier.newMessageNotify(e),addMessage(e)})),tonnel.addEventListener("operatorDisconnected",(({data:e})=>{operatorOnline=!1})),tonnel.onerror=e=>{console.error("tonnel err",e),tonnel.close(),setTimeout((()=>{createTonnel()}),3e3)})}function clearChat(){messages&&(messages.innerHTML="")}async function createThread(){const e=localStorage.getItem("aiwi_thread_id"),t=localStorage.getItem("aiwi_messages");if(e)return t&&(clearChat(),console.log("exist message",t),addMessage(JSON.parse(t))),t?null:e;const n=new Headers;n.append("Content-Type","application/json");const s=JSON.stringify({messages:[{role:"assistant",content:"Вас приветствует ИИ ассистент автошколы Лайв12"}],assistant_id:"67bdbb693ebf87b024bfe23a"}),i=await fetch(`${assistant_service_API_URL}/assistants/threads`,{method:"POST",headers:n,body:s}).then((e=>e.json())).catch((e=>console.log("error",e)));return i?.id?(localStorage.setItem("aiwi_thread_id",i.id),tonnel&&tonnel.close(),createTonnel(),i.id):void 0}async function getMessages(){const e=localStorage.getItem("aiwi_thread_id");if(!e)return"Проблема ;(";const t=await fetch(`${assistant_service_API_URL}/assistants/threads/${e}/messages`).then((e=>e.json())).catch((e=>console.log("error",e)));return t?.body?.data?.length&&"assistant"==t.body.data[0].role?t.body.data[0].content[0].text.value:"Что-то произошло. Не смогу ответить ("}function sendMessageByThread(e){}async function sendMessage(e){let t=localStorage.getItem("aiwi_thread_id")||await createThread();if(!t)return"Не могу ответить. Попробуйте позже. ";const n=new Headers;if(n.append("Content-Type","application/json"),operatorOnline){const s=await fetch(`${assistant_service_API_URL}/widget/request`,{method:"POST",headers:n,body:JSON.stringify({thread_id:t,message:e})}).then((e=>e.json())).catch((e=>console.log("error",e)));return s&&404!=s.statusCode||(operatorOnline=!1),""}{addMessage();let s=`${assistant_service_API_URL}/assistants/threads/${t}/messages`;const i=JSON.stringify({role:"user",content:e}),o=await fetch(s,{method:"POST",headers:n,body:i}).then((async e=>{if(404==e.status){if(localStorage.removeItem("aiwi_thread_id"),t=await createThread(),!t)throw new Error("error update thread");return s=`${assistant_service_API_URL}/assistants/threads/${t}/messages`,(await fetch(s,{method:"POST",headers:n,body:i})).json()}return e.json()})).catch((e=>console.log("error",e)));if(o?.id)return new EventSource(`${assistant_service_API_URL}/assistants/threads/${t}/runs/67bdbb693ebf87b024bfe23a`);if(o?.sent_at)return"";bugReport.report({url:s,headers:JSON.stringify(n),body:i,error:o})}return"Что-то идет не так. Попробуйте позже."}typingIndicatorDiv.classList.add("typing-indicator"),typingIndicatorDiv.classList.add("flex"),typingIndicatorDiv.classList.add("items-center"),typingIndicatorDiv.classList.add("space-x-1"),typingIndicatorDiv.innerHTML='
    \n
    \n
    ';var metric_service=__webpack_require__(738);let atDiv=document.createElement("div");function attention(e,t=!1){const n=document.createElement("style");n.innerHTML='\n .lswa-widget-button-popup-show {\n display: block;\n -webkit-animation: show .4s linear forwards;\n animation: show .4s linear forwards;\n }\n .lswa-widget-button-popup-btn-hide {\n position: absolute;\n top: 4px;\n right: 4px;\n display: inline-block;\n height: 20px;\n width: 20px;\n background-image: url(\'data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%3E%3Cpath%20fill%3D%22%23525C68%22%20fill-rule%3D%22evenodd%22%20d%3D%22M6.41%205.07l2.867-2.864-1.34-1.34L5.07%203.73%202.207.867l-1.34%201.34L3.73%205.07.867%207.938l1.34%201.34L5.07%206.41l2.867%202.867%201.34-1.34L6.41%205.07z%22/%3E%3C/svg%3E\');\n background-repeat: no-repeat;\n background-position: center;\n opacity: .2;\n -webkit-transition: opacity .3s;\n transition: opacity .3s;\n cursor: pointer;\n }\n .lswa-widget-button-popup-inner {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-flow: row;\n flex-flow: row;\n }\n .lswa-widget-button-popup-image {\n margin: 0 10px 0 0;\n width: 42px;\n text-align: center;\n }\n .lswa-widget-button-popup-image-item {\n display: inline-block;\n width: 42px;\n height: 42px;\n border-radius: 100%;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n background-image: url(data:image/webp;base64,UklGRq4JAABXRUJQVlA4WAoAAAAgAAAAOwAAOwAASUNDUKACAAAAAAKgbGNtcwQwAABtbnRyUkdCIFhZWiAH6QADABIADAAtADRhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1kZXNjAAABIAAAAEBjcHJ0AAABYAAAADZ3dHB0AAABmAAAABRjaGFkAAABrAAAACxyWFlaAAAB2AAAABRiWFlaAAAB7AAAABRnWFlaAAACAAAAABRyVFJDAAACFAAAACBnVFJDAAACFAAAACBiVFJDAAACFAAAACBjaHJtAAACNAAAACRkbW5kAAACWAAAACRkbWRkAAACfAAAACRtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACQAAAAcAEcASQBNAFAAIABiAHUAaQBsAHQALQBpAG4AIABzAFIARwBCbWx1YwAAAAAAAAABAAAADGVuVVMAAAAaAAAAHABQAHUAYgBsAGkAYwAgAEQAbwBtAGEAaQBuAABYWVogAAAAAAAA9tYAAQAAAADTLXNmMzIAAAAAAAEMQgAABd7///MlAAAHkwAA/ZD///uh///9ogAAA9wAAMBuWFlaIAAAAAAAAG+gAAA49QAAA5BYWVogAAAAAAAAJJ8AAA+EAAC2xFhZWiAAAAAAAABilwAAt4cAABjZcGFyYQAAAAAAAwAAAAJmZgAA8qcAAA1ZAAAT0AAACltjaHJtAAAAAAADAAAAAKPXAABUfAAATM0AAJmaAAAmZwAAD1xtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAEcASQBNAFBtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJWUDgg6AYAAPAfAJ0BKjwAPAA+MRaIQyIhIRULNdAgAwSxAFYc4GnfKXNDv/uzccHT5yB5uPNvOM8wDnMeYDoG+bN1G3oAeXB7Kv91/ID2qrnB4O/hnzP92/JX8btML+I/bD8B9pOoGfzX+7/kp+XnH4gA/JP6r/mfzC/r3Od9ZfRB/HP8t+X3vH4R1AD8p/6T09M7jzl/1v8n8Av8k/o/+z/uP+D/6f7/+LL9o/Zx/XljrYn+C3gEh0ML4rFlX45jHpjObF7XZuatouDySqWL0yYDeRy7zcgGoSjc14cgbzkGpmrXeqUn4ioc+W5ymAfgnX7EsmWIOS6lSFZ7IFtcQgweqID/TWhOER5P9V0vFAD+/N2Mtf68pUjU6PYquQp9/vhWiW2MdULKXrheAsfv53sKXI8TEi/uw+FDiJ55dbJ0a0E0QV+T26+9g7WNaY6hobYNjCMHLEQf7nwidb2qINm2uMsExISPr0p+COa6ZHEYegJegQu2v9c0h52aT9B6x6F7XbtHVvG4fWyKDOucMcIle3NJIt9kk2oqTA0MZrqY7CQmabfUFaYxIlLNtNRzTx9UPMVnTDFmHzM0xRieTHP93jl6UI2pd/D+dHF4Nszbbiv7+/WNHSZa+wf7mZvKrE4dVV1bJXpAHRB0r4Aa2FEbznjaADygVagrTq5CACmqRqgXfXZR9Ibdc+yPGC89+bkZAab/ipLsmonMZXX1KcLOmMuX21rnX4EeZkHRhB41PrhoJjDUzAv/+nX4uso3k0E5UuP99f/7wyw9O57/Iy69fmE43gJFTDFVxYHJDa678ZNymQKqomsRL6IUZF8NYqQ0uz98jHmwfYPlcK1m5TlM3NiuUdd+obhHBx69KDy8SulqP3oGPK/1/8RiFg5I82PixgUPo/XLe7f+Sket5DJBwdvu/77Cev8k41d/8NpR5vhhf8rlXbXQSnJ3SK6SCRVQuHJ4/oR4b3H0UpOO/yA/AL8cjPIks4jlI3iJvYij3eUgTlfCBQrIOiRXIR6hXVjV29lFSBWqzdaQLIHMnmcuck6Csw3DSbMGx+CsQXsY26IvmHhvMGxfzlA2imDwXf8TT7KW+KI4mJQEDGrs6fZB9hQfmYNNzeznJ2tYfaSKV0mJK88kMJV9sB1KD7/oXA2tlRY43GRlQYzo654vNqSpuU8ZgL1PnKSq2gppyiN/eH7A+WoZ7kwulTI1cn9hMvLk0b73lnqYIBg3zEmwOZbW7YLBrXBjWpgw9YvwO7cUJO6U9yehRJ//AuBDgYT+LGV/K9bMfVEv2ippR0fmihzwgBIDqH9k4kirK4ge+giPkbnboXiaQuyWgMzwefJQsCMIQNmNiw4Hzf2FU99gIEO1pg1uPDMI9Yn7xRrMzFMm4e6REtvLfW5/5nrjrazpsM+x04RAAIDciW1McfqpamzToD9xd1NG/3/0dx8FZno+u650V3n5RDaMjo16Credu2LN5yaQ6AolaDv1QGIiw6OuLfccvDSyq7Brj0T62ReARZW11EIsBXo8/l60Jtat09nsCKqwPCJ3W043bV6+oi+X+ntaeTcq8m58qLf4iTd7nnelWHuiisaLMQIedVTHWR/RfcX0L9d/BPSyWDH8h3rlvWL+jTRt3ZqZD84EoWrYvklzrGUUgG7e6UuwQUJq/06jTd1tG2E/jRHPYADqZ5QnaFKkqVZQM1SVIsBjKR49XDFHqxgm0GH1XMNLjp5oDpp6LcGa//Qzz4gAQ7R45Naqa81iPaSbpg/mlHU5Naq5Ns93vx2RWGGiKFYHafKKXRuk/4GS78Sf2Vz6AiRyDgoOo0oeZNTjEPkYN2SKBNQ/nHukbz3KRIQxqDKf9Qj//HGoxYyp1fGih7tbB8nNgke7cC9Dm5db+a3EouDIFhPP9NICiBq3fgD9Pt2H4uZIel7LLA8nDV7NQtNGUSnwfWtJedjtR9Z2QKWyKR7ixmMcTPIqyEe7OERCaWWsOH6pmus1SjGsXpeHqj4UZ1Y8xIvZTlVnAux19HV/w0MUJykUxI/8zuYqP9gKEnsEBeIPZyIX/vueeytWYBuKF/F+LZe69tUPhmNAqG37l7iGRfbuFzAHdF9gFdm0i4pF381+K1XPGYukEq4+taVRab1MIkAOUv+uHYf+CyFZKUTdmvsRnNxPPW6DB6uk0ceq2X11Vn5q5uQfpn/TH/PVSPH8045BRwOOKaFErF2/a1cHaaPiSZFAQ+ptdmSriqLxhd8do3SNP0EViTzu2uEXqQfXvAobtR6EW+InVTwWkMXQCybpFk3nK0eoCTT8etYmwJgVdmJn+v/WvNhEqPjxZ613ljxxcKD7+WL3mR5HCttjhPSXR4WLFUfzZsQWjlS4gAA=);\n }\n .lswa-widget-button-popup-name {\n font: bold 14px "Helvetica Neue",Arial,Helvetica,sans-serif;\n color: #000;\n }\n .lswa-widget-button-popup-description {\n margin: 4px 0 0 0;\n font: 13px "Helvetica Neue",Arial,Helvetica,sans-serif;\n color: #424956;\n }\n .lswa-widget-button-popup-triangle {\n position: absolute;\n display: block;\n width: 8px;\n height: 8px;\n background: #fff;\n border-right: 1px solid #aaaaaa82;\n border-bottom: 1px solid #aaaaaa82;\n bottom: 20px;\n }\n .lswa-widget-button-popup {\n padding: 12px 20px 12px 14px;\n max-width: 312px;\n border: 1px solid #aaaaaa82;\n background: #fff;\n border-radius: 15px;\n box-sizing: border-box;\n z-index: 1;\n cursor: pointer;\n }\n ',e.append(n),atDiv.style.display="none",atDiv.style.position="relative",atDiv.classList.add("lswa-widget-button-popup","lswa-widget-button-popup-show");const s=document.createElement("span");s.classList.add("lswa-widget-button-popup-btn-hide"),s.addEventListener("click",(()=>{atDiv.style.display="none"})),atDiv.innerHTML=`\n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    `,atDiv.appendChild(s);const i=setTimeout((()=>{atDiv.style.display="block"}),5e3);return t?e.appendChild(atDiv):e.insertBefore(atDiv,e.querySelector("div")),{element:atDiv,timeout:i}}let widget_messageNotifier=new messageNotifier;const mainBtnCoords="-20,80".split(",").map((e=>Number(e))),themeColor="#1f2937";let contactsLis;const timeouts=new Map,messages=document.createElement("div"),inputTextInChat=document.createElement("textarea");function createChatButtonWithWaves(){const e=document.createElement("div");Object.assign(e.style,{position:"relative",height:"4em",width:"4em"}),e.classList.add("animate");for(let t=0;t<3;t++){const t=document.createElement("div");t.classList.add("lsw_waves"),e.appendChild(t)}const t=document.createElement("li");let n=window.matchMedia("(hover: none) and (pointer: coarse)").matches,s=!1;t.addEventListener("click",(e=>{if(!n)return togglePopup(),void(s=!1);s?(s=!1,togglePopup()):(showButtons(),s=!0,e.preventDefault())})),Object.assign(t.style,{backgroundColor:themeColor,borderRadius:"9999px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",width:"4em",height:"4em",position:"absolute",zIndex:100});const i="http://www.w3.org/2000/svg",o=document.createElementNS(i,"svg");o.setAttribute("xmlns",i),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2"),Object.assign(o.style,{width:"2.5em",height:"2.5em",color:"white"});const r=document.createElementNS(i,"path");r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-linejoin","round"),r.setAttribute("d","M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"),o.appendChild(r),t.appendChild(o);const a=document.createElement("ul");return a.appendChild(t),Object.assign(a.style,{padding:0,margin:0}),e.appendChild(a),e}const fixedChat=void 0,animateBubble=fixedChat?null:createChatButtonWithWaves(),popup=document.createElement("div");async function togglePopup(){if(popup.style.display="none"==popup.style.display?"flex":"none","none"!=popup.style.display){atDiv.style.display="none",metric_service.A.openChat(),animateBubble&&animateBubble.classList.remove("animate"),inputTextInChat.focus();const e=await createThread();messages.childNodes.length&&!e||(console.log("add message to chat"),addMessage("Вас приветствует ИИ ассистент автошколы Лайв12"))}else animateBubble&&animateBubble.classList.add("animate")}function showButtons(){if(contactsLis)for(let e=1;e{const i=document.createElement("div");Object.assign(i.style,{position:"absolute",width:"40px",height:"6px",top:t,right:n,background:s,borderRadius:"100px",transform:"rotate(-15deg)"}),e.appendChild(i)}))}function widget(e,n){const s=document.createElement("button"),i=document.createElement("div");Object.assign(i.style,{[mainBtnCoords[0]>0?"left":"right"]:Math.abs(mainBtnCoords[0])+"px",[mainBtnCoords[1]>0?"bottom":"top"]:Math.abs(mainBtnCoords[1])+"px",color:"black",display:"flex",alignItems:"flex-end",flexDirection:"row",gap:"10px",fontSize:"100%",zIndex:"10000000",fontFamily:'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"'}),fixedChat||(i.style.position="fixed",document.body.appendChild(i));const o=i.attachShadow({mode:"closed"}),r=(()=>{popup.id="lsw_chat_popup",Object.assign(popup.style,{fontSize:".875em",lineHeight:"1.25em",borderRadius:"10px",backgroundColor:"white",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",display:"flex",transition:"all 0.3s",overflow:"hidden",WebkitTextSizeAdjust:"100%"}),fixedChat||(Object.assign(popup.style,{position:"fixed",display:"none"}),mainBtnCoords[0]<=0&&(popup.style.right="0"));const e=document.createElement("div");e.id="chat-header",e.style.padding="1em",e.style.display="flex",e.style.justifyContent="space-between",e.style.alignItems="center",e.style.backgroundColor=themeColor,e.style.height="4.5em";const n=document.createElement("h3");if(n.textContent=t("supportChat"),n.style.margin="0",n.style.fontSize="1.125em",n.style.lineHeight="1.75em",n.style.color="white",createHeaderRectangles(e),e.appendChild(n),!fixedChat){const t=document.createElement("button");t.id="close-popup",t.style.background="transparent",t.style.border="none",t.style.color="white",t.style.cursor="pointer",t.style.padding="0",t.style.zIndex="1",t.style.filter="drop-shadow(2px 2px 2px rgba(0, 0, 0, .8))",t.addEventListener("click",(function(){togglePopup()}));const n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("fill","none"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2"),n.style.width="1.5rem",n.style.height="1.5rem";const s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d","M6 18L18 6M6 6l12 12"),n.appendChild(s),t.appendChild(n),e.appendChild(t)}Object.assign(messages.style,{flex:"1",padding:"1rem",overflowY:"auto",scrollBehavior:"smooth",display:"flex",flexDirection:"column",justifyContent:"safe flex-end"}),messages.addEventListener("wheel",(e=>{if(!e.target)return;e.preventDefault(),e.stopPropagation();const t=2*e.deltaY;messages.scrollBy(0,t)}),{passive:!1});const i=document.createElement("div");i.id="chat-input-container",i.style.padding="1rem",i.style.borderTop="1px solid #e5e7eb";const o=document.createElement("div");return o.style.display="flex",o.style.alignItems="center",o.style.gap="1rem",inputTextInChat.placeholder=t("inputMessage"),Object.assign(inputTextInChat.style,{flex:"1",border:"1px solid #d1d5db",borderRadius:"0.375rem",padding:"0.5rem 1rem",outline:"none",backgroundColor:"white",resize:"none",fontSize:"16px"}),s.classList.add("chat-submit"),s.textContent=t("send"),Object.assign(s.style,{backgroundColor:themeColor,color:"white",borderRadius:"0.375rem",padding:"0.5rem 1rem",cursor:"pointer",border:"none"}),o.appendChild(inputTextInChat),o.appendChild(s),i.appendChild(o),popup.appendChild(e),popup.appendChild(messages),popup.appendChild(i),popup})();if(fixedChat&&document.currentScript){const e=document.currentScript?document.currentScript.parentElement:document.querySelector("#undefined");e&&e.appendChild(r)}else animateBubble&&o.appendChild(animateBubble),o.appendChild(r);const a=document.createElement("ul");if(a.style.listStyle="none",a.style.display="none",a.style.justifyContent="center",a.style.alignItems="center",a.style.flexDirection="column",o.appendChild(a),e?.length&&animateBubble){const t=animateBubble.querySelector("ul");t&&(e.forEach((e=>{e.element&&t.appendChild(e.element)})),contactsLis=t.querySelectorAll("li"),contactsLis?.length>1&&(t.addEventListener("mouseenter",(()=>{n?.value&&(n.value.element.style.display="none",clearTimeout(n.value.timeout)),showButtons()})),t.addEventListener("mouseleave",(()=>{if(contactsLis)for(let e=1;e{contactsLis&&(contactsLis[e].style.transform="translateX(0)")}),500))}))))}return s&&inputTextInChat&&(s.addEventListener("click",(async function(){const e=inputTextInChat.value.trim();if(!e)return;metric_service.A.sendMessage(),addMessage(e,!0);const t=await sendMessage(e);t&&("string"==typeof t&&widget_messageNotifier.newMessageNotify(t),addMessage(t))})),inputTextInChat.addEventListener("keyup",(function(e){"Enter"===e.key&&s.click()}))),createTonnel(),createThread(),[o,mainBtnCoords[0]>0]}function leadCatcher(){function e(e){e.append((()=>{const e=document.createElement("style");return e.innerHTML='\n a{ \n text-decoration:none;\n color:inherit;\n }\n .i-lh-close-cross {\n width: 26px;\n height: 26px;\n border-radius: 50%;\n cursor: pointer;\n -webkit-box-shadow: inset 0 0 2px -2px hsla(0,0%,40%,.8),0 0 6px -2px rgb(241 242 243);\n -moz-box-shadow: inset 0 0 2px -2px hsla(0,0%,40%,.8),0 0 6px -2px rgb(241 242 243);\n box-shadow: inset 0 0 2px -2px hsla(0,0%,40%,.8),0 0 6px -2px rgb(241 242 243);\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABmJLR0QA/wD/AP+gvaeTAAABkUlEQVQ4je2SMWvbQBiGn4sQyNVyHjMbSglETRzlZzTbQUct9pYYOpRC90LJYDvZjAeDhw7a46HpLyg2mkTbP9D1piTYwtfBElUcWZbn5N3uvuPhu+974CVpRP7QarXeA6+11pdhGN5XASilavV6/eNyufwzHA6/Zfd7+UfGmAPgTErZV0rVqkCllH1jzDshxJt87RE4SZIvwE+gKaW8brfbrzZBgyBwpJRdoAlEQoiv+bqVP0RRlHie98OyrEPgBDj2ff92Op0u1qG2bfcAP4VeDAaDu43gKvAqUFhbXkFXXeA0A8zn82UVaCkY/i+H1Rxn6XUTmGmtO2XmPBlFPnEcJ57nfU/H4gP7aaed8XhcquNeWTGX0p8VpbRjpVTNdd0rVkucAX+BY+Bto9G4jeM42RkcBIHjum4vhUZCiM5isbjJxuI4TrNIxVLwJqWqel4I3uZpVbi1C3QX+CMrbNv+nEJnWuvzTfIDjEajB631B1ZLPQI+5evruv0CJtvkzxKG4b3WugNMjDG/t71/pvkHkaHKyfDtLb4AAAAASUVORK5CYII=");\n background-position-x: 0%;\n background-position-y: 0%;\n background-repeat: repeat;\n background-size: auto;\n background-size: 16px;\n background-repeat: no-repeat;\n background-position: 50%;\n }\n .i-lh-close {\n position: absolute;\n right: 10px;\n top: 10px;\n z-index: 10000000;\n }\n .i-lh-wrapper {\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n min-width: 350px;\n background: #fff;\n overflow: hidden;\n position: relative;\n display: flex;\n flex-direction: column;\n }\n .i-lh-main-desktop {\n min-width: 350px !important;\n }\n .i-lh-header {\n font-size: 24px;\n line-height: 1.3 !important;\n margin-bottom: 12px;\n padding-top: 20px;\n }\n .i-lh-description {\n font-size: 16px;\n line-height: 1.4 !important;\n color: #475155;\n margin-bottom: 20px;\n width: 300px;\n }\n .bg-black {\n --tw-bg-opacity: 1;\n background-color: rgba(0, 0, 0, var(--tw-bg-opacity))\n }\n .inset-0 {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0\n }\n .full-width {\n width: 100%;\n }\n .i-lh-vertical {\n width: 100%;\n }\n .i-lh-form {\n margin-bottom: 10px;\n }\n .i-lh-form .i-lh-field {\n vertical-align: top;\n padding-bottom: 10px;\n }\n .bg-opacity-25 {\n --tw-bg-opacity: 0.25\n }\n .lsw_vertical {\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n min-width: 300px;\n margin: 0 auto;\n }\n .i-lh-input-wrapper {\n position: relative;\n }\n .i-lh-icon-wrapper {\n position: absolute;\n display: flex;\n height: 100%;\n align-items: center;\n left: 9px;\n font-size: 14px;\n }\n \n .i-lh-input {\n padding: 0 10px;\n padding-left: 10px;\n min-width: 216px;\n width: 100%;\n height: 40px;\n background: #fff;\n border-radius: 4px;\n border: 1px solid rgba(27,42,48,.2);\n border-top-width: 1px;\n border-top-color: rgba(27, 42, 48, 0.2);\n border-right-width: 1px;\n border-right-color: rgba(27, 42, 48, 0.2);\n border-bottom-width: 1px;\n border-bottom-color: rgba(27, 42, 48, 0.2);\n border-left-width: 1px;\n border-left-color: rgba(27, 42, 48, 0.2);\n font-size: 15px;\n }\n *,\n ::after,\n ::before {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: currentColor\n }\n .i-lh-input-iconed {\n padding-left: 30px !important;\n }\n .agreement-wrapper {\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n }\n .button-wrapper {\n position: relative;\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n min-width: 300px;\n margin: 0 auto;\n max-width: 100%;\n }\n svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n }\n .svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n .i-lh-agreement {\n border-collapse: collapse;\n }\n .checkbox {\n width: 16px;\n height: 16px;\n background: #fff;\n border-radius: 3px;\n margin-top: 3px;\n border: 1px solid grey;\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n background: transparent;\n }\n .i-lh-agreement .i-lh-text {\n font-size: 12px;\n line-height: 16px;\n color: #bbb;\n padding: 2px 0 0 6px;\n cursor: pointer;\n white-space: normal;\n text-align: justify;\n }\n .i-lh-input.i-lh-material {\n box-shadow: none !important;\n background: transparent !important;\n border-radius: 0 !important;\n border-top-color: transparent !important;\n border-right-color: transparent !important;\n border-left-color: transparent !important;\n }\n .i-lh-footer-text {\n opacity: .3;\n }\n .i-lh-footer {\n background: #f3f4f4;\n height: 28px;\n padding: 0 20px;\n font-size: 12px;\n line-height: 28px;\n }\n .i-lh-input:focus {\n color: rgba(30, 25, 28);\n outline: 0;\n }\n .i-lh-checkbox-wrapper {\n vertical-align: baseline;\n }\n .checkbox-active {\n background: #3c87fd;\n color: #fff;\n font-size: 11px;\n text-align: center;\n padding: 1px;\n border: none;\n border-radius: 3px;\n color: rgb(255, 255, 255);\n background: rgb(54 56 59);\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n ',e})(),(e=>{const n=document.createElement("div");Object.assign(n.style,{width:"400px",backgroundColor:"rgba(255, 255, 255, 1)",padding:"1.5rem",borderRadius:"0.5rem",position:"relative"}),n.className="shadow-lg";const s=document.createElement("div");s.className="i-lh-close";const i=document.createElement("div");i.id="wls_closeModalBtn",i.className="i-lh-close-cross",s.appendChild(i),n.appendChild(s);const o=()=>{e.host.remove(),localStorage.setItem("lsw_lc_lps",((new Date).valueOf()-432e5+36e4).toString())};s.addEventListener("click",(()=>{o()}));let r=!0;e.addEventListener("click",(e=>{r=!1})),e.host.addEventListener("click",(e=>{console.log("click on host",r),r?o():r=!0}));const a=document.createElement("div");a.className="i-lh-wrapper",a.style.fontFamily="Open-Sans, sans-serif",a.style.width="unset",a.style.height="unset";const l=document.createElement("div");l.className="i-lh-main-desktop",l.style.background="#fff";const c=document.createElement("div");c.className="i-lh-header",c.style.cssText="text-align: center; line-height: 38px; color: rgb(30, 25, 28); font-size: 30px;",c.textContent=t("haveQues");const p=document.createElement("div");p.className="i-lh-description",p.style.cssText="text-align: center; line-height: 20px; color: rgb(127, 127, 127); font-size: 15px; margin: 10px auto; width: 340px;",p.textContent=t("callAsk");const d=document.createElement("div");d.className="i-lh-form i-lh-vertical full-width";const h=document.createElement("div");h.className="i-lh-field";const u=document.createElement("div");u.className="i-lh-input-wrapper lsw_vertical";const g=document.createElement("div");g.className="i-lh-icon-wrapper",g.style.color="rgb(30, 25, 28)",g.innerHTML='\n ';const f=document.createElement("input");f.name="wls_phoneNumber",f.placeholder=t("phone"),f.type="tel",f.className="i-lh-input i-lh-input-iconed i-lh-material",f.style.cssText="border-radius: 3px; color: rgba(30, 25, 28); background: rgb(255, 255, 255); border-color: rgb(30, 25, 28); font-family: OpenSans, sans-serif; border-width: 1px; width: 100%;",f.required=!0,u.appendChild(g),u.appendChild(f),h.appendChild(u),d.appendChild(h);const m=document.createElement("div");m.className="i-lh-field";const b=document.createElement("div");b.className="button-wrapper";const x=document.createElement("button");x.id="lsw_waitCall",x.disabled=!0,x.textContent=t("callMe")+" →",x.style.cssText="border-radius: 3px; font-size: 16px; height: 44px; color: rgb(255, 255, 255); background: rgb(52, 59, 67); font-family: OpenSans, sans-serif; width: 300px; margin-top: 8px;",b.appendChild(x),m.appendChild(b),d.appendChild(m);const k=e=>{const t=e.target;let n=0,s=t.value.replace(/\D/g,"").replace(/^8/,"7");var i,o;x.disabled=s.length<11,t.value="+_ (___) ___-__-__".replace(/./g,(function(e){return/[_\d]/.test(e)&&n=s.length?"":e})),"blur"==e.type?2==t.value.length&&(t.value=""):(i=t,o=t.value.length,i.focus(),i.setSelectionRange&&i.setSelectionRange(o,o))};f.addEventListener("input",k,!1),f.addEventListener("focus",k,!1),f.addEventListener("blur",k,!1),f.addEventListener("keydown",k,!1);const w=document.createElement("div");x.addEventListener("click",(async e=>{x.disabled=!0,metric_service.A.sendLead();const t=await fetch("https://apid.launchstrategies.ru/widget/lead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({assistant:"67bdbb693ebf87b024bfe23a",phone:f.value,url:window.location.origin+window.location.pathname})}).then((e=>e.json())).catch((e=>{console.log("error",e),x.disabled=!1}));t&&(console.log("result",t),localStorage.setItem("lsw_lc_lps",(new Date).valueOf().toString()),l.style.display="none",w.style.display="")})),l.appendChild(c),l.appendChild(p),l.appendChild(d),w.className="i-lh-main-desktop",w.style.cssText="background: rgb(255, 255, 255); display: none;";const y=document.createElement("div");y.className="i-lh-header",y.style.cssText="text-align: center; line-height: 38px; color: rgb(30, 25, 28); font-size: 30px;",y.textContent=t("thanks");const v=document.createElement("div");v.style.cssText="text-align: center; line-height: 20px; color: rgb(127, 127, 127); font-size: 15px; margin: 10px auto; width: 340px;",v.textContent=t("waitCall"),w.appendChild(y),w.appendChild(v);const A=document.createElement("div");A.className="i-lh-footer",A.style.cssText="background: rgb(255, 255, 255) !important; color: rgba(127, 127, 127, 0.7); line-height: 48px; height: 48px; text-align: center;";const S=document.createElement("div");return S.className="i-lh-footer-text",S.innerHTML=`${t("workTechs")} LaunchStrategies.ru`,A.appendChild(S),a.appendChild(l),a.appendChild(w),a.appendChild(A),n.appendChild(a),n})(e))}const n=()=>{document.removeEventListener("mousemove",i);const t=Number(localStorage.getItem("lsw_lc_lps"));if(!((new Date).valueOf()-t>432e5))return;const n=document.createElement("div");Object.assign(n.style,{zIndex:"100",position:"fixed",alignItems:"center",display:"flex",inset:0,backgroundColor:"rgba(0, 0, 0, 0.25)",justifyContent:"center"}),document.body.appendChild(n);e(n.attachShadow({mode:"closed"}))},s=setTimeout((()=>{n()}),3e4),i=e=>{e.clientY<=10&&(n(),clearTimeout(s))};document.addEventListener("mousemove",i)}const styles_fixedChat=void 0;function styles(e){const t=document.createElement("style");t.innerHTML="\n *,\n ::after,\n ::before,\n #lsw_chat_popup *,\n #lsw_chat_popup ::after,\n #lsw_chat_popup ::before {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: currentColor\n }\n .border-t, #lsw_chat_popup .border-t {\n border-top-width: 1px\n }\n .bg-gray-800, #lsw_chat_popup .bg-gray-800{\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity))\n }\n .text-white, #lsw_chat_popup .text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, var(--tw-text-opacity))\n }\n .flex {\n display:flex\n }\n .m-0 {\n margin: 0\n }\n .bg-transparent {\n background-color: transparent\n }\n .h-6 {\n height: 1.5rem\n }\n .flex-1 {\n flex: 1 1 0%\n }\n .p-4 {\n padding: 1rem\n }\n .bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity))\n }\n .justify-center {\n justify-content: center\n }\n .rounded-full, #lsw_chat_popup .rounded-full{\n border-radius: 9999px\n }\n .items-center {\n align-items: center\n }\n .cursor-pointer {\n cursor: pointer\n }\n .absolute {\n position: absolute\n }\n .right-0 {\n right: 0\n }\n .shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n }\n .flex-col {\n flex-direction: column\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n }\n .justify-between {\n justify-content: space-between\n }\n .border-none, #lsw_chat_popup .border-none{\n border-style: none\n }\n .w-6 {\n width: 1.5rem\n }\n .overflow-y-auto {\n overflow-y: auto\n }\n .scroll-smooth {\n scroll-behavior: smooth;\n }\n .border-t {\n border-top-width: 1px\n }\n .border-gray-200, #lsw_chat_popup .border-gray-200{\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity))\n }\n .space-x-4>:not([hidden])~:not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(1rem * var(--tw-space-x-reverse));\n margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)))\n }\n .border, #lsw_chat_popup .border{\n border-width: 1px\n }\n .border-gray-300, #lsw_chat_popup .border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, var(--tw-border-opacity))\n }\n .rounded-md, #lsw_chat_popup .rounded-md {\n border-radius: .375rem\n }\n .px-4, #lsw_chat_popup .px-4 {\n padding-left: 1rem;\n padding-right: 1rem\n }\n .py-2, #lsw_chat_popup .py-2{\n padding-top: .5rem;\n padding-bottom: .5rem\n }\n .outline-none, #lsw_chat_popup .outline-none{\n outline: 2px solid transparent;\n outline-offset: 2px\n }\n .w-3\\/4 {\n width: 75%\n }\n .p-6 {\n padding: 1.5rem\n }\n .rounded-lg, #lsw_lead_catcher .rounded-lg, #lsw_chat_popup .rounded-lg{\n border-radius: .5rem\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n }\n .relative {\n position: relative\n }\n .bg-gray-200, #lsw_chat_popup .bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, var(--tw-bg-opacity))\n }\n .fixed {\n position: fixed\n }\n .inset-0 {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0\n }\n .bg-black {\n --tw-bg-opacity: 1;\n background-color: rgba(0, 0, 0, var(--tw-bg-opacity))\n }\n .bg-opacity-25 {\n --tw-bg-opacity: 0.25\n }\n .mb-3 {\n margin-bottom: .75rem\n }\n \n // #chat-popup button {\n // padding: 0\n // }\n #chat-header button:hover {\n background-color: transparent;\n }\n ",e.append(t);const n="lsw_chat_popup",s=document.createElement("style");s.innerHTML=` \n #${n} {\n flex-direction: column;\n z-index: 10000000;\n width: 28em;\n max-width: 100vw;\n word-break: break-word;\n box-sizing: border-box;\n height: 600px;\n max-height: 100vh;\n bottom: ${styles_fixedChat?0:"6em"};\n font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n }\n p, #${n} p {\n margin: 0;\n }\n \n \n @media (max-width: 600px) {\n #${n} {\n // position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: 100%;\n height: auto;\n max-height: 100vh;\n border-radius: 0;\n }\n }\n \n @keyframes lsw_typing {\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n }\n \n .clock {\n position: absolute;\n width: 29px;\n height: 16px;\n right: 6px;\n bottom: 3px;\n font-style: normal;\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n letter-spacing: -0.04em;\n color: #BEBEC2;\n white-space: nowrap\n }\n .lsw_chat_dot {\n width: 6px;\n height: 6px;\n background-color: black;\n }\n \n .typing-indicator .lsw_chat_dot {\n animation: lsw_typing 1.4s infinite ease-in-out both;\n }\n \n .typing-indicator .lsw_chat_dot:nth-child(1) {\n animation-delay: -0.32s;\n }\n \n .typing-indicator .dot:nth-child(2) {\n animation-delay: -0.16s;\n }\n \n .typing-indicator .dot:nth-child(3) {\n animation-delay: 0s;\n }\n \n .hidden {\n display: none;\n }\n\n .lsw_waves {\n position: absolute;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.5);\n \n transform: scale(0);\n }\n \n .animate .lsw_waves {\n animation: wave-animation 4s linear infinite;\n }\n \n .lsw_waves:nth-child(1) {\n left: 50%;\n top: 50%;\n width: 300%;\n height: 300%;\n margin-left: -150%;\n margin-top: -150%;\n animation-delay: 0s;\n }\n \n /* Позиционирование второй волны */\n .lsw_waves:nth-child(2) {\n left: 50%;\n top: 50%;\n width: 300%;\n height: 300%;\n margin-left: -150%;\n margin-top: -150%;\n animation-delay: -1s;\n }\n \n /* Позиционирование третьей волны */\n .lsw_waves:nth-child(3) {\n left: 50%;\n top: 50%;\n width: 300%;\n height: 300%;\n margin-left: -150%;\n margin-top: -150%;\n animation-delay: -2s;\n }\n \n @keyframes wave-animation {\n 0% {\n transform: scale(0);\n opacity: 0.5;\n }\n 100% {\n transform: scale(1);\n opacity: 0.0;\n }\n }\n .chat-submit:hover {\n background-color: rgba(0, 0, 0);\n }\n `,e.append(s)}var buttonConstructor=__webpack_require__(768);const contacts_themeColor="#1f2937";function contacts(e){const t=document.createElement("style");t.innerHTML=`\n .lsw_contact_btn {\n background-color: ${contacts_themeColor};\n border-radius: 9999px; \n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n width: 4em;\n height: 4em;\n position: absolute;\n margin: 0;\n padding: 0;\n transition: transform 0.5s ease;\n }\n \n .lsw_contact_btn > svg {\n width: 2.5em;\n height: 2.5em;\n }\n `,e.append(t)}const{slice,forEach}=[];function defaults(e){return forEach.call(slice.call(arguments,1),(t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])})),e}function hasXSS(e){if("string"!=typeof e)return!1;return[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some((t=>t.test(e)))}const fieldContentRegExp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,serializeCookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let s=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!fieldContentRegExp.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!fieldContentRegExp.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},cookie={create(e,t,n,s){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),s&&(i.domain=s),document.cookie=serializeCookie(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let e=0;e-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const s=e.substring(1).split("&");for(let e=0;e0){s[e].substring(0,i)===n&&(t=s[e].substring(i+1))}}}return t}};let hasLocalStorageSupport=null;const localStorageAvailable=()=>{if(null!==hasLocalStorageSupport)return hasLocalStorageSupport;try{if(hasLocalStorageSupport="undefined"!=typeof window&&null!==window.localStorage,!hasLocalStorageSupport)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){hasLocalStorageSupport=!1}return hasLocalStorageSupport};var i18nextBrowserLanguageDetector_localStorage={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&localStorageAvailable())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&localStorageAvailable()&&window.localStorage.setItem(n,e)}};let hasSessionStorageSupport=null;const sessionStorageAvailable=()=>{if(null!==hasSessionStorageSupport)return hasSessionStorageSupport;try{if(hasSessionStorageSupport="undefined"!=typeof window&&null!==window.sessionStorage,!hasSessionStorageSupport)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){hasSessionStorageSupport=!1}return hasSessionStorageSupport};var sessionStorage={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&sessionStorageAvailable())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&sessionStorageAvailable()&&window.sessionStorage.setItem(n,e)}},navigator$1={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:s}=navigator;if(e)for(let n=0;n0?t:void 0}},htmlTag={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const s=n||("undefined"!=typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(t=s.getAttribute("lang")),t}},path={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const s="number"==typeof t?t:0;return n[s]?.replace("/","")}},subdomain={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,s="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[n]}};let canCookies=!1;try{document.cookie,canCookies=!0}catch(e){}const order=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];canCookies||order.splice(1,1);const getDefaults=()=>({order,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Browser{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=defaults(t,this.options||{},getDefaults()),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(cookie$1),this.addDetector(querystring),this.addDetector(i18nextBrowserLanguageDetector_localStorage),this.addDetector(sessionStorage),this.addDetector(navigator$1),this.addDetector(htmlTag),this.addDetector(path),this.addDetector(subdomain)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach((e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}})),t=t.filter((e=>null!=e&&!hasXSS(e))).map((e=>this.options.convertDetectedLanguage(e))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)})))}}Browser.type="languageDetector";const attentionDiv={value:null};let chatWidgetContainer,left;instance.use(Browser).init({resources:{en:{translation:{phone:"Phone",callAsk:"Let us call you back and explain everything",thanks:"Thank you!",waitCall:"Awaiting call!",workTechs:"Powered by technologies",haveQues:"Do you have any questions?",supportChat:"Support Chat",send:"Send",inputMessage:"Enter a message...",callMe:"Call me",support:"Поддержка"}},ru:{translation:{phone:"Телефон",callAsk:"Давайте мы перезвоним вам и все расскажем",thanks:"Благодарим!",waitCall:"Ожидайте звонка!",workTechs:"Работает на технологиях",haveQues:"У вас есть вопросы?",supportChat:"Чат поддержки",send:"Отправить",inputMessage:"Введите сообщение...",callMe:"Жду звонка",support:"Поддержка"}},ee:{translation:{telefon:"Telefon",callAsk:"Lubame teile tagasi helistada ja kõik selgeks rääkida",thanks:"Täname!",waitCall:"Oodake kõnet!",workTechs:"Töötab tehnoloogiatel",haveQues:"Kas teil on küsimusi?",supportChat:"Tugivestluse chat",send:"Saada",inputMessage:"Sisestage sõnum...",callMe:"Helista mulle",support:"Tugi"}}},detection:{convertDetectedLanguage:e=>/ru/i.test(e)?"ru":/ee|et/i.test(e)?"ee":"en"}}),createNotifyBox();let contactButtons=[];try{const e=JSON.parse('[{"type":"vk","link":"https://m.vk.com/live12avto"},{"type":"whatsapp","link":"https://wa.me/79379372900?text=%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82!%20%F0%9F%91%8B%20%D0%9C%D0%B5%D0%BD%D1%8F%20%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%B5%D1%81%D1%83%D0%B5%D1%82..."},{"type":"phone","link":"tel:89379372900"},{"type":"telegram","link":"https://t.me/@live12avto"}]');e.length&&contactButtons.push(...(0,buttonConstructor.A)(e))}catch(e){console.error("error add buttons",e)}{let e=widget(contactButtons,attentionDiv);chatWidgetContainer=e[0],styles(chatWidgetContainer),contacts(chatWidgetContainer),left=e[1]}leadCatcher()})();