1window.__LURIJA_CFG__ = {"baseUrl": "https://lurija.pats.lv", "embedToken": "YvwiFgPpoVoNaZP99wCs_yHzYiRWlZuz", "translations": {"lv": {"name": "LÅ«rija", "role": "AI asistents", "greeting": "Sveiki! Es esmu LÅ«rija", "greetingName": "Sveiki, {name}! Es esmu LÅ«rija", "subtitle": "Tavs mÄkslÄ«gÄ intelekta asistents nodokļu un grÄmatvedÄ«bas jautÄjumos.", "welcomeBody": "PalÄ«dzu saprast nodokļus, grÄmatvedÄ«bu un pats.lv iespÄjas. SniegÅ¡u Ätras, praktiskas atbildes un palÄ«dzÄÅ¡u saprast, cik gatavs esi atskaiÅ¡u iesniegÅ¡anai.", "startersLabel": "PopulÄri jautÄjumi:", "placeholder": "Uzdodiet jautÄjumuâ¦", "placeholders": "KÄ varu palÄ«dzÄt Å¡odien?\nVai vÄlaties, lai apskatu kÄdu dokumentu?\nVai ir kÄds jautÄjums vai situÄcija, kuru vÄlaties izskaidrot?", "send": "SÅ«tÄ«t", "close": "AizvÄrt", "open": "AtvÄrt LÅ«riju", "thinking": "DomÄjuâ¦", "helpful": "NoderÄ«gi", "notHelpful": "Nav noderÄ«gi", "feedbackThanks": "Paldies par atsauksmi!", "disclaimerL1": "Beta versija. MÄkslÄ«gÄ intelekta atbildes var saturÄt kļūdas â pÄrbaudiet tÄs pirms svarÄ«gu lÄmumu pieÅemÅ¡anas.", "disclaimerL2": "Pirms svarÄ«gu lÄmumu pieÅemÅ¡anas pÄrbaudiet informÄciju.", "privacyNotice": "Izmantojot LÅ«riju, jÅ«s piekrÄ«tat {link}.", "privacyLinkLabel": "privÄtuma politikai", "consentChatLabel": "PiekrÄ«tu savu datu apstrÄdei sarunas nodroÅ¡inÄÅ¡anai saskaÅÄ ar {link}.", "consentChatRequired": "Lai sÄktu sarunu, lÅ«dzu, atzÄ«mÄ piekriÅ¡anu datu apstrÄdei.", "closureConsentNotice": "NorÄdi e-pastu, uz kuru nosÅ«tÄ«t Å¡o atbildi. Jaunumu saÅemÅ¡ana ir brÄ«vprÄtÄ«ga â atzÄ«mÄ to atsevišķi. No jaunumiem vari atteikties jebkurÄ laikÄ.", "closureConsentAnswer": "PiekrÄ«tu saÅemt Å¡o atbildi uz norÄdÄ«to e-pastu.", "closureConsentNewsletter": "VÄlos saÅemt jaunumus par produktiem un pakalpojumiem.", "closureConsentRequired": "Lai nosÅ«tÄ«tu atbildi, lÅ«dzu, atzÄ«mÄ piekriÅ¡anu tÄs saÅemÅ¡anai.", "closureEmailSubject": "LÅ«rijas atbilde uz Tavu jautÄjumu", "sessionError": "NeizdevÄs izveidot sesiju. LÅ«dzu, atsvaidziniet lapu un mÄÄ£iniet vÄlreiz.", "wizardConfirm": "ApstiprinÄt", "wizardSelectAll": "AtzÄ«mÄjiet visu, kas attiecas", "wizardSkip": "Izlaist", "wizardFreePlaceholder": "Uzrakstiet savu atbildi", "wizardComposerHint": "Vai arÄ« atbildiet saviem vÄrdiemâ¦", "wizardExplainFallback": "NeizdevÄs ielÄdÄt skaidrojumu.", "wizardHelpTitle": "Ko tas nozÄ«mÄ?", "wizardDescribePlaceholder": "Aprakstiet savu situÄciju â kÄds izdevums, kam izmantots, kad un cik.", "calcOpen": "AtvÄrt kalkulatoru", "streamError": "Kļūda ziÅojuma straumÄ", "stillWorking": "VÄl domÄju â tas prasa ilgÄk nekÄ parastiâ¦", "retry": "MÄÄ£inÄt vÄlreiz", "micStart": "Balss ievade", "micStop": "ApturÄt ierakstu", "micListening": "Klausos⦠nospiediet, lai apturÄtu", "micTranscribing": "AtpazÄ«stu runuâ¦", "micDenied": "Nav piekļuves mikrofonam â pÄrbaudiet pÄrlÅ«ka atļaujas.", "micError": "NeizdevÄs atpazÄ«t runu. LÅ«dzu, mÄÄ£iniet vÄlreiz.", "newChat": "Jauns Äats", "fullScreen": "PilnekrÄna režīms", "exitFullScreen": "Iziet no pilnekrÄna", "chatsLabel": "VispÄrÄ«gie Äati", "searchChats": "MeklÄt Äatos", "openMenu": "AtvÄrt izvÄlni", "closeMenu": "AizvÄrt izvÄlni", "noChats": "VÄl nav Äatu", "chatsError": "NeizdevÄs ielÄdÄt Äatus. LÅ«dzu, mÄÄ£iniet vÄlreiz.", "filterAll": "Visi", "filterTax": "Nodokļi", "filterSupport": "Atbalsts", "filterDocs": "Dokumenti", "filterIncome": "IeÅÄmumi", "filterExpense": "Izdevumi", "filterInvoice": "RÄÄ·ini", "filterScan": "SkenÄtie", "filterBank": "Banka", "filterReports": "Atskaites", "filterPayroll": "Algas", "noChatsForFilter": "Nav Äatu ar Å¡o tÄmu", "copyMsg": "KopÄt", "copiedMsg": "NokopÄts!", "nextStepsLabel": "NÄkamie soļi:", "sourcesLabel": "Avoti", "cta.register_pats.title": "ReÄ£istrÄjieties PATS.LV", "cta.register_pats.body": "Izveidojiet PATS.LV kontu, lai turpinÄtu.", "cta.register_pats.button": "ReÄ£istrÄties", "greetingAuth": "", "subtitleAuth": "", "welcomeBodyAuth": "", "startersLabelAuth": "", "placeholderAuth": "", "disclaimerL1Auth": "", "disclaimerL2Auth": ""}, "en": {"name": "LÅ«rija", "role": "AI Assistant", "greeting": "Hi, I'm LÅ«rija", "greetingName": "Hi {name}, I'm LÅ«rija", "subtitle": "Your AI assistant for tax and accounting questions.", "welcomeBody": "I help you make sense of taxes, bookkeeping, and what pats.lv can do. I'll give quick, practical answers and help you gauge how ready you are to file.", "startersLabel": "Popular questions:", "placeholder": "Ask a questionâ¦", "placeholders": "How can I help you today?\nWould you like me to look at a document?\nIs there a question or situation you'd like explained?", "send": "Send", "close": "Close", "open": "Open LÅ«rija", "thinking": "Thinkingâ¦", "helpful": "Helpful", "notHelpful": "Not helpful", "feedbackThanks": "Thanks for the feedback!", "disclaimerL1": "Beta version. AI responses may contain errors â verify before making important decisions.", "disclaimerL2": "Verify information before making important decisions.", "privacyNotice": "By using LÅ«rija, you agree to the {link}.", "privacyLinkLabel": "Privacy Policy", "consentChatLabel": "I agree to the processing of my data to run this chat, as described
1in the {link}.", "consentChatRequired": "Please tick the data-processing consent to start the chat.", "closureConsentNotice": "Enter the email address to send this answer to. The newsletter is optional â tick it separately. You can unsubscribe from the newsletter at any time.", "closureConsentAnswer": "I agree to receive this answer at the email above.", "closureConsentNewsletter": "Send me news about your products and services.", "closureConsentRequired": "Please tick the consent to receive the answer before sending.", "closureEmailSubject": "LÅ«rija's answer to your question", "sessionError": "Couldnât start a session. Please refresh and try again.", "wizardConfirm": "Confirm", "wizardSelectAll": "Select all that apply", "wizardSkip": "Skip", "wizardFreePlaceholder": "Write your answer", "wizardComposerHint": "Or answer in your own wordsâ¦", "wizardExplainFallback": "Couldnât load explanation.", "wizardHelpTitle": "What does this mean?", "wizardDescribePlaceholder": "Describe your situation â what the expense was, what it was used for, when, and how much.", "calcOpen": "Open calculator", "streamError": "Error in the message stream", "stillWorking": "Still working â this is taking longer than usualâ¦", "retry": "Retry", "micStart": "Voice input", "micStop": "Stop recording", "micListening": "Listening⦠tap to stop", "micTranscribing": "Transcribingâ¦", "micDenied": "Microphone unavailable â check your browser permissions.", "micError": "Couldn't transcribe that. Please try again.", "newChat": "New chat", "fullScreen": "Full screen", "exitFullScreen": "Exit full screen", "chatsLabel": "General chats", "searchChats": "Search chats", "openMenu": "Open menu", "closeMenu": "Close menu", "noChats": "No chats yet", "chatsError": "Couldnât load your chats. Please try again.", "filterAll": "All", "filterTax": "Taxes", "filterSupport": "Support", "filterDocs": "Documents", "filterIncome": "Income", "filterExpense": "Expenses", "filterInvoice": "Invoices", "filterScan": "Scans", "filterBank": "Bank", "filterReports": "Reports", "filterPayroll": "Payroll", "noChatsForFilter": "No chats on this subject", "copyMsg": "Copy", "copiedMsg": "Copied!", "nextStepsLabel": "Next steps:", "sourcesLabel": "Sources", "cta.register_pats.title": "Register on PATS.LV", "cta.register_pats.body": "Create a PATS.LV account to continue.", "cta.register_pats.button": "Register", "greetingAuth": "", "subtitleAuth": "", "welcomeBodyAuth": "", "startersLabelAuth": "", "placeholderAuth": "", "disclaimerL1Auth": "", "disclaimerL2Auth": ""}, "ru": {"name": "LÅ«rija", "role": "ÐÐ-аÑÑиÑÑенÑ", "greeting": "ÐÑивеÑ! Я LÅ«rija", "greetingName": "ÐÑивеÑ, {name}! Я LÅ«rija", "subtitle": "ÐÐ°Ñ ÐÐ-аÑÑиÑÑÐµÐ½Ñ Ð¿Ð¾ вопÑоÑам налогов и бÑÑ
галÑеÑии.", "welcomeBody": "ÐÐ¾Ð¼Ð¾Ð³Ð°Ñ ÑазобÑаÑÑÑÑ Ð² налогаÑ
, бÑÑ
галÑеÑии и возможноÑÑÑÑ
pats.lv. Ðам бÑÑÑÑÑе пÑакÑиÑнÑе оÑвеÑÑ Ð¸ Ð¿Ð¾Ð¼Ð¾Ð³Ñ Ð¿Ð¾Ð½ÑÑÑ, наÑколÑко Ð²Ñ Ð³Ð¾ÑÐ¾Ð²Ñ Ðº подаÑе оÑÑÑÑноÑÑи.", "startersLabel": "ÐопÑлÑÑнÑе вопÑоÑÑ:", "placeholder": "ÐадайÑе вопÑоÑâ¦", "placeholders": "Чем Ð¼Ð¾Ð³Ñ Ð¿Ð¾Ð¼Ð¾ÑÑ ÑегоднÑ?\nХоÑиÑе, ÑÑÐ¾Ð±Ñ Ñ Ð¿Ð¾ÑмоÑÑел докÑменÑ?\nÐÑÑÑ Ð²Ð¾Ð¿ÑÐ¾Ñ Ð¸Ð»Ð¸ ÑиÑÑаÑиÑ, коÑоÑÑÑ Ð½Ñжно ÑазÑÑÑниÑÑ?", "send": "ÐÑпÑавиÑÑ", "close": "ÐакÑÑÑÑ", "open": "ÐÑкÑÑÑÑ LÅ«rija", "thinking": "ÐÑмаÑâ¦", "helpful": "Ðолезно", "notHelpful": "Ðе полезно", "feedbackThanks": "СпаÑибо за оÑзÑв!", "disclaimerL1": "ÐеÑа-веÑÑиÑ. ÐÑвеÑÑ Ð¸ÑкÑÑÑÑвенного инÑеллекÑа могÑÑ ÑодеÑжаÑÑ Ð¾Ñибки â пÑовеÑÑйÑе иÑ
пеÑед пÑинÑÑием важнÑÑ
ÑеÑений.", "disclaimerL2": "ÐÑовеÑÑйÑе инÑоÑмаÑÐ¸Ñ Ð¿ÐµÑед пÑинÑÑием важнÑÑ
ÑеÑений.", "privacyNotice": "ÐÑполÑзÑÑ LÅ«rija, Ð²Ñ ÑоглаÑаеÑеÑÑ Ñ {link}.", "privacyLinkLabel": "полиÑикой конÑиденÑиалÑноÑÑи", "consentChatLabel": "СоглаÑаÑÑÑ Ð½Ð° обÑабоÑÐºÑ Ð¼Ð¾Ð¸Ñ
даннÑÑ
Ð´Ð»Ñ Ð²ÐµÐ´ÐµÐ½Ð¸Ñ ÑÑого ÑаÑа ÑоглаÑно {link}.", "consentChatRequired": "ЧÑÐ¾Ð±Ñ Ð½Ð°ÑаÑÑ ÑаÑ, оÑмеÑÑÑе ÑоглаÑие на обÑабоÑÐºÑ Ð´Ð°Ð½Ð½ÑÑ
.", "closureConsentNotice": "УкажиÑе Ñл. поÑÑÑ, на коÑоÑÑÑ Ð¾ÑпÑавиÑÑ ÑÑÐ¾Ñ Ð¾ÑвеÑ. ÐодпиÑка на новоÑÑи â по желаниÑ, оÑмеÑÑÑе ÐµÑ Ð¾ÑделÑно. ÐÑ Ð½Ð¾Ð²Ð¾ÑÑей можно оÑпиÑаÑÑÑÑ Ð² лÑбой моменÑ.", "closureConsentAnswer": "СоглаÑен полÑÑиÑÑ ÑÑÐ¾Ñ Ð¾ÑÐ²ÐµÑ Ð½Ð° ÑказаннÑÑ Ñл. поÑÑÑ.", "closureConsentNewsletter": "ХоÑÑ Ð¿Ð¾Ð»ÑÑаÑÑ Ð½Ð¾Ð²Ð¾ÑÑи о пÑодÑкÑаÑ
и ÑÑлÑгаÑ
.", "closureConsentRequired": "ЧÑÐ¾Ð±Ñ Ð¾ÑпÑавиÑÑ Ð¾ÑвеÑ, оÑмеÑÑÑе ÑоглаÑие на его полÑÑение.", "closureEmailSubject": "ÐÑÐ²ÐµÑ LÅ«rija на Ð²Ð°Ñ Ð²Ð¾Ð¿ÑоÑ", "sessionError": "Ðе ÑдалоÑÑ ÑоздаÑÑ ÑеÑÑиÑ. ÐбновиÑе ÑÑÑаниÑÑ Ð¸ попÑобÑйÑе Ñнова.", "wizardConfirm": "ÐодÑвеÑдиÑÑ", "wizardSelectAll": "ÐÑбеÑиÑе вÑÑ Ð¿Ð¾Ð´Ñ
одÑÑее", "wizardSkip": "ÐÑопÑÑÑиÑÑ", "wizardFreePlaceholder": "ÐапиÑиÑе Ñвой оÑвеÑ", "wizardComposerHint": "Ðли оÑвеÑÑÑе Ñвоими Ñловамиâ¦", "wizardDescribePlaceholder": "ÐпиÑиÑе ваÑÑ ÑиÑÑаÑÐ¸Ñ â ÑÑо ÑÑо за ÑаÑÑ
од, на ÑÑо он иÑполÑзовалÑÑ, когда и в каком ÑазмеÑе.", "wizardExplainFallback": "Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ Ð¿Ð¾ÑÑнение.", "wizardHelpTitle": "ЧÑо ÑÑо знаÑиÑ?", "calcOpen": "ÐÑкÑÑÑÑ ÐºÐ°Ð»ÑкÑлÑÑоÑ", "streamError": "ÐÑибка в поÑоке ÑообÑениÑ", "stillWorking": "ÐÑÑ ÐµÑÑ Ð´ÑÐ¼Ð°Ñ â ÑÑо долÑÑе обÑÑногоâ¦", "retry": "ÐовÑоÑиÑÑ", "micStart": "ÐолоÑовой ввод", "micStop": "ÐÑÑановиÑÑ Ð·Ð°Ð¿Ð¸ÑÑ", "micListening": "СлÑÑаÑ⦠нажмиÑе, ÑÑÐ¾Ð±Ñ Ð¾ÑÑановиÑÑ", "micTranscribing": "РаÑÐ¿Ð¾Ð·Ð½Ð°Ñ ÑеÑÑâ¦", "micDenied": "ÐÐµÑ Ð´Ð¾ÑÑÑпа к микÑоÑÐ¾Ð½Ñ â пÑовеÑÑÑе ÑазÑеÑÐµÐ½Ð¸Ñ Ð±ÑаÑзеÑа.", "micError": "Ðе ÑдалоÑÑ ÑаÑпознаÑÑ ÑеÑÑ. ÐопÑобÑйÑе еÑÑ Ñаз.", "newChat": "ÐовÑй ÑаÑ", "fullScreen": "Ðо веÑÑ ÑкÑан", "exitFullScreen": "ÐÑйÑи из полноÑкÑанного Ñежима", "chatsLabel": "ÐбÑие ÑаÑÑ", "searchChats": "ÐоиÑк по ÑаÑам", "openMenu": "ÐÑкÑÑÑÑ Ð¼ÐµÐ½Ñ", "closeMenu": "ÐакÑÑÑÑ Ð¼ÐµÐ½Ñ", "noChats": "ЧаÑов пока неÑ", "chatsError": "Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ ÑаÑÑ. ÐопÑобÑйÑе еÑÑ Ñаз.", "filterAll": "ÐÑе", "filterTax": "Ðалоги", "filterSupport": "ÐоддеÑжка", "filterDocs": "ÐокÑменÑÑ", "filterIncome": "ÐоÑ
одÑ", "filterExpense": "РаÑÑ
одÑ", "filterInvoice": "СÑеÑа", "filterScan": "СканÑ", "filterBank": "Ðанк", "filterReports": "ÐÑÑÑÑÑ", "filterPayroll": "ÐаÑплаÑÑ", "noChatsForFilter": "ÐÐµÑ ÑаÑов по ÑÑой Ñеме", "copyMsg": "ÐопиÑоваÑÑ", "copiedMsg": "СкопиÑовано!", "nextStepsLabel": "СледÑÑÑие Ñаги:", "sourcesLabel": "ÐÑÑоÑники", "cta.register_pats.title": "ÐаÑегиÑÑÑиÑÑйÑеÑÑ Ð½Ð° PATS.LV", "cta.register_pats.body": "СоздайÑе аккаÑÐ½Ñ PATS.LV, ÑÑÐ¾Ð±Ñ Ð¿ÑодолжиÑÑ.", "cta.register_pats.button": "ÐаÑегиÑÑÑиÑоваÑÑÑÑ", "greetingAuth": "", "subtitleAuth": "", "welcomeBodyAuth": "", "startersLabelAuth": "", "placeholderAuth": "", "disclaimerL1Auth": "", "disclaimerL2Auth": ""}, "ro": {"name": "Asistent AVIZA", "role": "Asistent AI", "greeting": "BunÄ! Sunt asistentul tÄu AI", "greetingName": "BunÄ, {name}! Sunt asistentul tÄu AI", "subtitle": "RÄspund la întrebÄri despre sistemul AVIZA.", "welcomeBody": "Te ajut sÄ foloseÈti AVIZA: facturi, clienÈi, furnizori, rapoarte Èi setÄri. RÄspund doar la întrebÄri despre sistemul AVIZA â pentru consultanÈÄ fiscalÄ sau contabilÄ, adreseazÄ-te contabilului tÄu.", "startersLabel": "ÃntrebÄr
1i frecvente:", "placeholder": "Pune o întrebareâ¦", "placeholders": "Cu ce te pot ajuta în AVIZA?\nVrei sÄ Ã®Èi arÄt unde se face asta?\nAi o întrebare despre o funcÈie din AVIZA?", "send": "Trimite", "close": "Ãnchide", "open": "Deschide asistentul", "thinking": "MÄ gândescâ¦", "helpful": "Util", "notHelpful": "Nu e util", "feedbackThanks": "MulÈumim pentru feedback!", "disclaimerL1": "Versiune beta. RÄspunsurile AI pot conÈine erori â verificÄ-le înainte de a lua decizii importante.", "disclaimerL2": "VerificÄ informaÈiile înainte de a lua decizii importante.", "privacyNotice": "Folosind acest asistent, eÈti de acord cu {link}.", "privacyLinkLabel": "Politica de confidenÈialitate", "consentChatLabel": "Sunt de acord cu prelucrarea datelor mele pentru acest chat, conform {link}.", "consentChatRequired": "BifeazÄ acordul privind prelucrarea datelor pentru a începe chatul.", "closureConsentNotice": "Introdu adresa de e-mail la care sÄ trimitem acest rÄspuns. Newsletterul este opÈional â bifeazÄ-l separat. Te poÈi dezabona oricând.", "closureConsentAnswer": "Sunt de acord sÄ primesc acest rÄspuns pe e-mail.", "closureConsentNewsletter": "TrimiteÈi-mi noutÄÈi despre produsele Èi serviciile voastre.", "closureConsentRequired": "BifeazÄ acordul de a primi rÄspunsul înainte de a trimite.", "closureEmailSubject": "RÄspunsul la întrebarea ta", "sessionError": "Sesiunea nu a putut fi pornitÄ. ReîmprospÄteazÄ pagina Èi încearcÄ din nou.", "wizardConfirm": "ConfirmÄ", "wizardSelectAll": "SelecteazÄ tot ce se potriveÈte", "wizardSkip": "Sari peste", "wizardFreePlaceholder": "Scrie rÄspunsul tÄu", "wizardComposerHint": "Sau rÄspunde cu cuvintele taleâ¦", "wizardExplainFallback": "ExplicaÈia nu a putut fi încÄrcatÄ.", "wizardHelpTitle": "Ce înseamnÄ asta?", "wizardDescribePlaceholder": "Descrie situaÈia ta â ce ai fÄcut în AVIZA, ce ai încercat Èi ce s-a întâmplat.", "calcOpen": "Deschide calculatorul", "streamError": "Eroare la transmiterea mesajului", "stillWorking": "ÃncÄ lucrez â dureazÄ mai mult decât de obiceiâ¦", "retry": "ReîncearcÄ", "micStart": "Introducere vocalÄ", "micStop": "OpreÈte înregistrarea", "micListening": "Ascult⦠atinge pentru a opri", "micTranscribing": "Transcriuâ¦", "micDenied": "Microfonul nu este disponibil â verificÄ permisiunile browserului.", "micError": "Nu am putut transcrie. ÃncearcÄ din nou.", "nextStepsLabel": "PaÈii urmÄtori:", "sourcesLabel": "Surse", "newChat": "ConversaÈie nouÄ", "fullScreen": "Ecran complet", "exitFullScreen": "IeÈi din ecran complet", "chatsLabel": "ConversaÈii", "searchChats": "CautÄ Ã®n conversaÈii", "openMenu": "Deschide meniul", "closeMenu": "Ãnchide meniul", "noChats": "Nicio conversaÈie încÄ", "chatsError": "ConversaÈiile nu au putut fi încÄrcate. ÃncearcÄ din nou.", "filterAll": "Toate", "filterTax": "Taxe", "filterSupport": "AsistenÈÄ", "filterDocs": "Documente", "filterIncome": "Venituri", "filterExpense": "Cheltuieli", "filterInvoice": "Facturi", "filterScan": "ScanÄri", "filterBank": "BancÄ", "filterReports": "Rapoarte", "filterPayroll": "Salarii", "noChatsForFilter": "Niciun chat pe acest subiect", "copyMsg": "CopiazÄ", "copiedMsg": "Copiat!", "cta.register_pats.title": "CreeazÄ cont pe AVIZA.RO", "cta.register_pats.body": "CreeazÄ un cont AVIZA pentru a continua.", "cta.register_pats.button": "CreeazÄ cont", "greetingAuth": "", "subtitleAuth": "", "welcomeBodyAuth": "", "startersLabelAuth": "", "placeholderAuth": "", "disclaimerL1Auth": "", "disclaimerL2Auth": ""}, "es": {"name": "Mirea", "role": "Asistente de IA", "greeting": "¡Hola! Soy Mirea", "greetingName": "¡Hola, {name}! Soy Mirea", "subtitle": "Respondo preguntas sobre el sistema CONTA.", "welcomeBody": "Te ayudo a usar CONTA: facturas, clientes, proveedores, informes y ajustes. Solo respondo preguntas sobre el sistema CONTA â para asesoramiento fiscal o contable, consulta con tu asesor.", "startersLabel": "Preguntas frecuentes:", "placeholder": "Haz una preguntaâ¦", "placeholders": "¿En qué te puedo ayudar dentro de CONTA?\n¿Quieres que te enseñe dónde se hace esto?\n¿Tienes alguna duda sobre una función de CONTA?", "send": "Enviar", "close": "Cerrar", "open": "Abrir Mirea", "thinking": "Pensandoâ¦", "helpful": "Ãtil", "notHelpful": "No es útil", "feedbackThanks": "¡Gracias por tu valoración!", "disclaimerL1": "Versión beta. Las respuestas de IA pueden contener errores: verifÃcalas antes de tomar decisiones importantes.", "disclaimerL2": "Verifica la información antes de tomar decisiones importantes.", "privacyNotice": "Al usar Mirea, aceptas la {link}.", "privacyLinkLabel": "PolÃtica de privacidad", "consentChatLabel": "Acepto el tratamiento de mis datos para este chat, según la {link}.", "consentChatRequired": "Marca el consentimiento de tratamiento de datos para iniciar el chat.", "closureConsentNotice": "Introduce el correo al que enviar esta respuesta. El boletÃn es opcional: márcalo aparte. Puedes darte de baja cuando quieras.", "closureConsentAnswer": "Acepto recibir esta respuesta en el correo indicado.", "closureConsentNewsletter": "Enviadme novedades sobre vuestros productos y servicios.", "closureConsentRequired": "Marca el consentimiento para recibir la respuesta antes de enviar.", "closureEmailSubject": "La respuesta de Mirea a tu pregunta", "sessionError": "No se pudo iniciar la sesión. Actualiza la página e inténtalo de nuevo.", "wizardConfirm": "Confirmar", "wizardSelectAll": "Selecciona todo lo que corresponda", "wizardSkip": "Omitir", "wizardFreePlaceholder": "Escribe tu respuesta", "wizardComposerHint": "O responde con tus propias palabrasâ¦", "wizardExplainFallback": "No se pudo cargar la explicación.", "wizardHelpTitle": "¿Qué significa esto?", "wizardDescribePlaceholder": "Describe tu caso â qué hiciste en CONTA, qué intentaste y qué ocurrió.", "calcOpen": "Abrir la calculadora", "streamError": "Error en la transmisión del mensaje", "stillWorking": "Sigo trabajando: está tardando más de lo normalâ¦", "retry": "Reintentar", "micStart": "Entrada de voz", "micStop": "Detener la grabación", "micListening": "Escuchando⦠toca para detener", "micTranscribing": "Transcribiendoâ¦", "micDenied": "Micrófono no disponible: revisa los permisos del navegador.", "micError": "No se pudo transcribir. Int
1éntalo de nuevo.", "nextStepsLabel": "Siguientes pasos:", "sourcesLabel": "Fuentes", "newChat": "Nuevo chat", "fullScreen": "Pantalla completa", "exitFullScreen": "Salir de pantalla completa", "chatsLabel": "Conversaciones", "searchChats": "Buscar en las conversaciones", "openMenu": "Abrir el menú", "closeMenu": "Cerrar el menú", "noChats": "Aún no hay conversaciones", "chatsError": "No se pudieron cargar tus conversaciones. Inténtalo de nuevo.", "filterAll": "Todo", "filterTax": "Impuestos", "filterSupport": "Soporte", "filterDocs": "Documentos", "filterIncome": "Ingresos", "filterExpense": "Gastos", "filterInvoice": "Facturas", "filterScan": "Escaneos", "filterBank": "Banco", "filterReports": "Informes", "filterPayroll": "Nóminas", "noChatsForFilter": "No hay chats sobre este tema", "copyMsg": "Copiar", "copiedMsg": "¡Copiado!", "cta.register_pats.title": "Crea tu cuenta en CONTA.ES", "cta.register_pats.body": "Crea una cuenta de CONTA para continuar.", "cta.register_pats.button": "Crear cuenta", "greetingAuth": "", "subtitleAuth": "", "welcomeBodyAuth": "", "startersLabelAuth": "", "placeholderAuth": "", "disclaimerL1Auth": "", "disclaimerL2Auth": ""}}, "defaultLang": "lv", "eventCallbacks": {"chat_start": "window.dataLayer = window.dataLayer || [];\n\nwindow.dataLayer.push({\n event: 'lurija_chat_start'\n});", "email_provided": "window.dataLayer = window.dataLayer || [];\n\nvar email = data.email ? String(data.email).trim().toLowerCase() : null;\n\nwindow.dataLayer.push({\n event: 'lurija_email_provided',\n lurija_email: email\n});"}, "closureThreshold": 4, "starterChips": {"lv": ["KÄdi nodokļi man bÅ«s jÄmaksÄ?", "Vai var norakstÄ«t Å¡o rÄÄ·inu?", "Vai mana atskaite ir gatava iesniegÅ¡anai?", "KÄ ietaupÄ«t laiku grÄmatvedÄ«bai?"], "ru": ["Ðакие налоги мне нÑжно плаÑиÑÑ?", "Ðожно ли ÑпиÑаÑÑ ÑÑÐ¾Ñ ÑÑÑÑ?", "ÐоÑов ли мой оÑÑÑÑ Ðº подаÑе?", "Ðак ÑÑкономиÑÑ Ð²ÑÐµÐ¼Ñ Ð½Ð° бÑÑ Ð³Ð°Ð»ÑеÑии?"], "en": ["What taxes will I have to pay?", "Can I write off this invoice?", "Is my report ready to submit?", "How do I save time on bookkeeping?"], "ro": [], "es": []}, "starterChipsAuth": {"lv": ["KÄdi nodokļi man bÅ«s jÄmaksÄ?", "Vai var norakstÄ«t Å¡o rÄÄ·inu?", "Vai mana atskaite ir gatava iesniegÅ¡anai?", "KÄ ietaupÄ«t laiku grÄmatvedÄ«bai?"], "ru": ["Ðакие налоги мне нÑжно плаÑиÑÑ?", "Ðожно ли ÑпиÑаÑÑ ÑÑÐ¾Ñ ÑÑÑÑ?", "ÐоÑов ли мой оÑÑÑÑ Ðº подаÑе?", "Ðак ÑÑкономиÑÑ Ð²ÑÐµÐ¼Ñ Ð½Ð° бÑÑ Ð³Ð°Ð»ÑеÑии?"], "en": ["What taxes will I have to pay?", "Can I write off this invoice?", "Is my report ready to submit?", "How do I save time on bookkeeping?"], "ro": [], "es": []}, "ctaCards": {"register_pats": {"titleKey": "cta.register_pats.title", "bodyKey": "cta.register_pats.body", "buttonKey": "cta.register_pats.button", "actions": [{"type": "close_floating"}, {"type": "execute_js", "code": "window.Pats.openRegistrationFromLurija()"}], "style": "primary", "audience": "anonymous"}}, "privacyLinks": {"lv": "https://pats.lv/privacy-policy", "ru": "https://pats.lv/privacy-policy", "en": "https://pats.lv/privacy-policy"}, "voice": true}; 2(function(){"use strict";var Xe=typeof window<"u"&&window.__LURIJA_CFG__||{};const Et='script[src*="/s/"][src$=".js"], script[src*="/api/widget/embed.js"]',le=function(){var e=document.currentScript&&document.currentScript.src||"";if(!e){var t=document.querySelectorAll(Et);t.length&&(e=t[t.length-1].src)}var r=e.match(/^(.*?)(?:\/s\/[A-Za-z0-9_-]+\.js|\/api\/widget\/embed\.js)/);return r?r[1]:Xe.baseUrl||""}(),J=Xe.embedToken,zr="lurija_widget_session_"+J,Ta="lurija_widget_history_"+J,pi="lurija_widget_clarify_"+J,Aa="lurija_widget_open_"+J,Ir="lurija_widget_consent_"+J,fi="lurija_widget_dot_"+J,hi="lurija_widget_geom_"+J;var Or={};function st(e){try{var t=localStorage.getItem(e);if(t!==null)return t}catch{}try{var r=sessionStorage.getItem(e);if(r!==null)return r}catch{}return e in Or?Or[e]:null}function Fe(e,t){try{localStorage.setItem(e,t);return}catch{}try{sessionStorage.setItem(e,t);return}catch{}Or[e]=String(t)}function Ze(e){try{localStorage.removeItem(e)}catch{}try{sessionStorage.removeItem(e)}catch{}try{delete Or[e]}catch{}}function Ma(e){Fe(Aa,e?"1":"0")}function go(){return st(Aa)==="1"}var xt=st(Ir)==="1";function jo(){xt=!0,Fe(Ir,"1"),Na()}function Na(){var e=document.getElementById("lurija-consent-row");e&&e.parentNode&&e.parentNode.removeChild(e)}function Qe(){try{return window.matchMedia("(max-width:767px)").matches}catch{return!1}}const Lt="lurija_widget_turnlock_"+J,za="lurija_widget_bus_"+J,Ia=18e4,vi=3e4,bo=6e5,Oa=45e3,xo=195e3,vt=function(){try{return Math.random().toString(36).slice(2)+Date.now().toString(36)}catch{return"t"+Date.now()}}();var et=null,Ra=!1,ir=null,ar=!1,tt=0,Te=null,mi=null,Ye=!1,wt=null,mt=null,Je=null,ut=null,Dt=null;function nr(){try{return JSON.parse(st(Lt)||"null")}catch{return null}}function Rr(){var e=nr();return!!(e&&e.tabId&&e.tabId!==vt&&Date.now()-(e.ts||0)<Ia)}function wo(){if(Rr())return!1;Fe(Lt,JSON.stringify({tabId:vt,ts:Date.now()}));var e=nr();return!!(e&&e.tabId===vt)}function yo(){var e=nr();e&&e.tabId===vt&&Ze(Lt)}var Pr=0;function ko(){var e=Date.now();if(!(e-Pr<vi)){var t=nr();!t||t.tabId!==vt||(Pr=e,Fe(Lt,JSON.stringify({tabId:vt,ts:e})))}}function Co(){var e=Date.now();if(!(e-Pr<vi)){Pr=e;var t=nr();Fe(Lt,JSON.stringify({tabId:t&&t.tabId||vt,ts:e}))}}var gi=[],Ft=null;try{typeof BroadcastChannel<"u"&&(Ft=new BroadcastChannel("lurija_"+J))}catch{Ft=null}function Pa(e){if(!(!e||e.tabId===vt))for(var t=0;t<gi.length;t++)try{gi[t](e)}catch{}}if(Ft)Ft.onmessage=function(e){Pa(e&&e.data)};else try{window.addEventListener("storage",function(e){if(!(!e||e.key!==za||!e.newValue))try{Pa(JSON.parse(e.newValue))}catch{}})}catch{}var Br={post:function(e,t){var r={type:e,tabId:vt,ts:Date.now()};if(t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);if(Ft)try{Ft.postMessage(r);return}catch{}try{Fe(za,JSON.stringify(r))}catch{}},on:function(e){gi.push(e)}};function St(e){var t=Ra;Ra=e;var r=document.getElementById("lurija-input"),i=document.getElementById("lurija-send"),a=document.getElementById("lurija-mic");if(r&&(r.disabled=e),i&&(i.disabled=e),a&&(a.disabled=e),ir&&(clearTimeout(ir),ir=null),!e&&t){var n=document.querySelector("#lurija-messages");n&&ye(n,null)}if(e){var o=document.querySelector("#lurija-messages");o&&ye(o,"thinking",b.thinking),ir=setTimeout(function l(){if(Rr()||et){ir=setTimeout(l,vi);return}St(!1),Hr()},Ia)}}var ji=!1,bi=!1;async function Hr(){if(!(Re||!de)){if(ji){bi=!0;return}ji=!0;try{do{if(bi=!1,et){try{clearInterval(et)}catch{}et=null}var e=document.querySelector("#lurija-messages");if(e)for(;e.firstChild;)e.removeChild(e.firstChild);var t=document.getElementById("lurija-welcome");t&&t.parentNode&&t.parentNode.removeChild(t),ne.length=0,await Bi()}while(bi)}finally{ji=!1}}}function _o(){Br.on(function(e){!e||!e.type||ar||e.convId&&xe&&e.convId!==xe||(e.type==="turn:start"?(St(!0),Hr()):e.type==="turn:done"&&(St(!1),Hr()))}),Rr()&&St(!0)}
2const xi="__lurija_skip_all__",Ba=Xe.eventCallbacks||{},Eo=Xe.closureThreshold;var Ha={};(function(){try{Object.keys(Ba||{}).forEach(function(t){var r=(Ba[t]||"").trim();if(r)try{Ha[t]=new Function("event","data",r)}catch(i){window.console&&console.warn("[lurija] callback compile failed",t,i)}})}catch{}})();var xe=null,or=!1,Vt=!1;function ct(e,t){var r={event:e,embed_token:J,session_token:de||null,conversation_id:xe,lang:typeof ae<"u"?ae:null,widget_style:hr,ts:Date.now()};if(t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);try{document.dispatchEvent(new CustomEvent("lurija:"+e,{detail:r}))}catch{}var a=Ha[e];if(a)try{a(e,r)}catch(n){window.console&&console.warn("[lurija] callback threw",e,n)}}function qa(){if(!Re)try{fetch(le+"/s/b",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({embed_token:J,session_token:de||null})}).catch(function(){})}catch{}}var wi={},Lo={sent:0,started:1,late:2,seen:3};function yi(){try{if(document.visibilityState&&document.visibilityState!=="visible")return!1;var e=window.Lurija;return!!(e&&e.isOpen&&e.isOpen())}catch{return!1}}function ki(e,t){if(e){var r=Lo[t||"seen"];if(r!==void 0&&!(wi[e]!==void 0&&wi[e]>=r)){wi[e]=r;try{var i={"Content-Type":"application/json"};Re&&(i.Authorization="Bearer "+Re),fetch(le+"/s/d",{method:"POST",headers:i,keepalive:!0,body:JSON.stringify({embed_token:J,session_token:de||null,chat_id:e,state:t||"seen"})}).catch(function(){})}catch{}}}}function Da(e){if(e)try{fetch(le+"/s/d",{method:"POST",headers:it(),keepalive:!0,body:JSON.stringify({embed_token:J,conversation_id:e,state:"late"})}).catch(function(){})}catch{}}function Ci(e){if(!$){var t=document.getElementById("lurija-launcher");t&&t.classList.toggle("lurija-launcher--unread",!!e),e?Fe(fi,"1"):Ze(fi)}}function Fa(){var e=document.getElementById("lurija-panel");return!e||!e.classList.contains("open")}function _i(e){!e||!yi()||ki(e,"started")}function So(e,t){if(e){if(!t&&Fa()&&Ci(!0),t){ki(e,"seen");return}var r=function(){document.visibilityState==="visible"&&(document.removeEventListener("visibilitychange",r),ki(e,"late"))};try{document.addEventListener("visibilitychange",r)}catch{}}}const Ei=le+"/s/a/lurija_avatar.jpg",Va=Xe.translations||{},To=Xe.starterChips||{},Ua=Xe.starterChipsAuth||null,Wa=Xe.ctaCards||{},Ga=Xe.privacyLinks||{},Ao="https://pats.lv/privacy-policy",lr=Xe.defaultLang,Mo=!!Xe.voice,Li={name:"L\u016Brija",role:"AI Assistant",greeting:"Hi, I'm L\u016Brija",greetingName:"Hi {name}, I'm L\u016Brija",subtitle:"Your AI assistant for tax and accounting questions.",welcomeBody:"I help you make sense of taxes, bookkeeping, and what pats.lv can do. I'll give quick, practical answers and help you gauge how ready you are to file.",startersLabel:"Popular questions:",placeholder:"Ask a question\u2026",placeholders:`How can I help you today? 3Would you like me to look at a document? 4Is there a question or situation you'd like explained?`,send:"Send",close:"Close",open:"Open L\u016Brija",thinking:"Thinking\u2026",helpful:"Helpful",notHelpful:"Not helpful",feedbackThanks:"Thanks for the feedback!",disclaimerL1:"Beta version. AI responses may contain errors \u2014 verify before making important decisions.",disclaimerL2:"Verify information before making important decisions.",privacyNotice:"By using L\u016Brija, you agree to the {link}.",privacyLinkLabel:"Privacy Policy",consentChatLabel:"I agree to the processing of my data to run this chat, as described in the {link}.",consentChatRequired:"Please tick the data-processing consent to start the chat.",closureConsentNotice:"Enter the email address to send this answer to. The newsletter is optional \u2014 tick it separately. You can unsubscribe from the newsletter at any time.",closureConsentAnswer:"I agree to receive this answer at the email above.",closureConsentNewsletter:"Send me news about your products and services.",closureConsentRequired:"Please tick the consent to receive the answer before sending.",sessionError:"Couldn\u2019t start a session. Please refresh and try again.",starters:`What taxes will I have to pay? 5Can I write off this invoice? 6Is my report ready to submit? 7How do I save time on bookkeeping?`,wizardConfirm:"Confirm",wizardSelectAll:"Select all that apply",wizardSkip:"Skip",wizardFreePlaceholder:"Write your answer",wizardComposerHint:"Or answer in your own words\u2026",wizardExplainFallback:"Couldn\u2019t load explanation.",wizardHelpTitle:"What does this mean?",streamError:"Error in the message stream",retry:"Retry",stillWorking:"Still working \u2014 this is taking longer than usual\u2026",nextStepsLabel:"Next steps:",sourcesLabel:"Sources",micStart:"Voice input",micStop:"Stop recording",micListening:"Listening\u2026 tap to stop",micTranscribing:"Transcribing\u2026",micDenied:"Microphone unavailable \u2014 check your browser permissions.",micError:"Couldn't transcribe that. Please try again.",newChat:"New chat",fullScreen:"Full screen",exitFullScreen:"Exit full screen",chatsLabel:"General chats",searchChats:"Search chats",openMenu:"Open menu",closeMenu:"Close menu",noChats:"No chats yet",chatsError:"Couldn\u2019t load your chats. Please try again.",filterAll:"All",f
7ilterTax:"Taxes",filterSupport:"Support",filterDocs:"Documents",filterIncome:"Income",filterExpense:"Expenses",filterInvoice:"Invoices",filterScan:"Scans",filterBank:"Bank",filterReports:"Reports",filterPayroll:"Payroll",noChatsForFilter:"No chats on this subject",copyMsg:"Copy",copiedMsg:"Copied!",acctAddNew:"Add new accountant",acctEmail:"Accountant's e-mail",acctConnect:"Connect",acctRequestSent:"Please wait \u2014 your request has been sent to {email}",acctInvitations:"My invitations",acctRemoveInvite:"Remove",acctReinvite:"Re-invite",acctConnected:"Connected",acctStatusWaiting:"Waiting",acctStatusPast:"No longer connected",acctChatsWith:"Chats with {name}",acctArchivedWith:"Archived chats with {name}",acctArchivedNote:"These chats are archived \u2014 {name} can no longer reply.",acctNoReply:"You can no longer write in this chat.",acctNoChatsWith:"No chats with {name} yet",acctClients:"Clients",acctNoClients:"No clients yet",acctBack:"Back",acctAsk:"Ask an accountant",acctRoleLabel:"Accountant",acctComposerHint:"Write to {name}\u2026",acctErrAlreadyLinked:"This accountant is already connected.",acctErrNotAccountant:"That e-mail does not belong to an accountant.",acctErrInvalidEmail:"Please enter a valid e-mail address.",acctErrUnavailable:"The accountant service is unavailable. Please try again shortly.",acctErrGeneric:"Something went wrong. Please try again."};function No(){for(var e=document.querySelectorAll(Et),t=0;t<e.length;t++){var r=(e[t].getAttribute("data-lang")||"").trim().toLowerCase();if(r)return r}return""}var Ka=No();const ae=Va[Ka]?Ka:lr;function zo(){for(var e=document.querySelectorAll(Et),t=0;t<e.length;t++){var r=e[t];if(r.hasAttribute("data-hide-launcher")){var i=(r.getAttribute("data-hide-launcher")||"").trim().toLowerCase();if(i===""||i==="true"||i==="1"||i==="yes")return!0}var a=(r.getAttribute("data-launcher")||"").trim().toLowerCase();if(a==="custom"||a==="none"||a==="hidden")return!0}return!1}const Si=zo();function Io(){for(var e=document.querySelectorAll(Et),t=0;t<e.length;t++){var r=parseInt(e[t].getAttribute("data-panel-top")||"",10);if(!isNaN(r)&&r>=0&&r<=400)return r}return null}const qr=Io();function Oo(){for(var e=document.querySelectorAll(Et),t=0;t<e.length;t++){var r=parseInt(e[t].getAttribute("data-panel-bottom")||"",10);if(!isNaN(r)&&r>=0&&r<=400)return r}return null}const sr=Oo();function Ro(){for(var e=document.querySelectorAll(Et),t=0;t<e.length;t++){var r=parseInt(e[t].getAttribute("data-z-index")||"",10);if(!isNaN(r)&&r>=1&&r<=2147483645)return r}return null}const ur=Ro();function Ti(e,t,r){var i=window.Lurija||(window.Lurija={});return i.open=function(){try{e&&e()}catch{}return i},i.close=function(){try{t&&t()}catch{}return i},i.isOpen=function(){try{return!!(r&&r())}catch{return!1}},i.toggle=function(){return i.isOpen()?i.close():i.open()},i.getUnreadCount=function(){return Gt>0?Gt:0},i.onUnread=function(a){if(typeof a=="function"&&(Di.push(a),Gt>=0))try{a(Gt)}catch{}return i},i.reviewJournal=function(a,n){try{nu(a,n)}catch{}return i},i.send=function(a,n){try{au(a,n)}catch{}return i},i.setPageStateProvider=function(a){return Ai=typeof a=="function"?a:null,i},i.onFocusField=function(a){return dr=typeof a=="function"?a:null,i},i}function Ya(e){for(var t=(e||[]).length-1;t>=0;t--)if(e[t]&&e[t].role==="assistant"&&e[t].lang)return e[t].lang;return null}var cr=null,Dr=null;function Fr(e){Dr=e||null}var Ai=null,dr=null;Ti(null,null,null);var Mi={lv:/^(k[Äa]|kas|kad|kur|k[Äa]p[Äe]c|k[Äa]d|vai|cik)\S*\s/i,ru:/^(как|ÑÑо|когда|где|поÑемÑ|заÑем|какой|кака[ÑÑÑ]|какие|ÑколÑко|можно|нÑжно|надо)\S*\s/i,en:/^(how|what|when|where|why|which|can|could|do|does|did|is|are|should|would)\s/i,ro:/^(cum|ce|c[âa]nd|unde|de\s*ce|care|c[âa]t|pot|trebuie)\S*\s/i,es:/^(c[óo]mo|qu[ée]|cu[áa]ndo|d[óo]nde|por\s*qu[ée]|cu[áa]l|cu[áa]nto|puedo|hay|debo)\S*\s/i};function Ja(e){return String(e??"").toLowerCase().replace(/[\s?!.,;:()«»"'\u201c\u201d]+/g,"")}function Po(e,t,r){if(e=(e||"").trim(),!e)return!1;for(var i=Ja(e),a=0;a<(r||[]).length;a++)if(i&&Ja(r[a])===i)return!1;if(/\?\s*$/.test(e))return!/^[\d\s.,%-]*\d[\d\s.,%-]*(?:eur|â¬|usd|\$|gadÄ|mÄnesÄ«|в год|в меÑÑÑ|per year|per month)?\s*\?$/i.test(e);var n=Mi[t]||Mi[ae]||Mi.en;return n.test(e)}function m(e,t){for(var r=t?[t,ae,lr,"lv","en"]:[ae,lr,"lv","en"],i=0;i<r.length;i++){var a=Va[r[i]];if(a&&a[e]!=null&&a[e]!=="")return a[e]}return Li[e]!=null?Li[e]:""}function Tt(e){if(Ii()){var t=m(e+"Auth");if(t)return t}return m(e)}function Bo(){var e=[ae,lr];if(Ii()&&Ua){for(var t=0;t<e.length;t++){var r=Ua[e[t]];if(Array.isArray(r)&&r.length)return r.slice()}return[]}for(var i=0;i<e.length;i++){var a=To[e[i]];if(Array.isArray(a)&&a.length)return a.slice()}return(Li.starters||"").split(` 8`).map(function(n){return n.trim()}
8).filter(Boolean)}function $a(){for(var e=[ae,lr,"en"],t=0;t<e.length;t++)if(typeof Ga[e[t]]=="string"){var r=Ga[e[t]].trim();if(/^(https?:\/\/|\/(?!\/))/.test(r))return r}return Ao}const b={name:m("name"),role:m("role"),greeting:Tt("greeting"),greetingName:m("greetingName"),subtitle:Tt("subtitle"),welcomeBody:Tt("welcomeBody"),startersLabel:Tt("startersLabel"),placeholder:Tt("placeholder"),send:m("send"),close:m("close"),open:m("open"),thinking:m("thinking"),helpful:m("helpful"),notHelpful:m("notHelpful"),feedbackThanks:m("feedbackThanks"),disclaimerL1:Tt("disclaimerL1"),disclaimerL2:Tt("disclaimerL2"),privacyNotice:m("privacyNotice"),privacyLinkLabel:m("privacyLinkLabel"),sessionError:m("sessionError"),streamError:m("streamError"),retry:m("retry"),stillWorking:m("stillWorking"),nextStepsLabel:m("nextStepsLabel"),micStart:m("micStart"),micStop:m("micStop"),micListening:m("micListening"),micTranscribing:m("micTranscribing"),micDenied:m("micDenied"),micError:m("micError"),newChat:m("newChat"),fullScreen:m("fullScreen"),exitFullScreen:m("exitFullScreen"),chatsLabel:m("chatsLabel"),searchChats:m("searchChats"),openMenu:m("openMenu"),closeMenu:m("closeMenu"),noChats:m("noChats"),chatsError:m("chatsError"),filterAll:m("filterAll"),filterTax:m("filterTax"),filterSupport:m("filterSupport"),filterDocs:m("filterDocs"),copyMsg:m("copyMsg"),copiedMsg:m("copiedMsg"),starters:Bo(),placeholders:(m("placeholders")||"").split(` 9`).map(function(e){return e.trim()}).filter(Boolean)};function At(e){var t=document.getElementById("lurija-input");t&&(t.placeholder=e||Dt||(b.placeholders&&b.placeholders.length?b.placeholders[Mt%b.placeholders.length]:b.placeholder),Ie(t))}function Ni(e){var t=typeof e=="string"&&e.trim()?e.trim().slice(0,120):null;t!==Dt&&(Dt=t,ut||At(null))}var Mt=0;function Ho(){if(!(!b.placeholders||!b.placeholders.length)){if(ut||Dt){Mt=(Mt+1)%b.placeholders.length;return}Mt=(Mt+1)%b.placeholders.length;var e=document.getElementById("lurija-input");e&&(e.placeholder=b.placeholders[Mt],typeof Ie=="function"&&Ie(e))}}var qo=24e3,Do=50,Xa=40,Za=120,Fo=64,Vo=160;function zi(e){try{return JSON.stringify(e).length<=qo}catch{return!1}}function pr(e,t){return typeof e=="string"&&e.length>t?e.slice(0,t):e}function Uo(e){if(zi(e))return e;var t=Array.isArray(e.form_fields)?e.form_fields:null,r=[];if(t){var i=t.slice(0,Do);r.push(i);var a=i.map(function(u){if(!u||typeof u!="object")return u;var f={};for(var p in u)f[p]=u[p];if(f.label=pr(f.label,Fo),f.value=pr(f.value,Za),f.saved_value=pr(f.saved_value,Za),f.help=pr(f.help,Vo),Array.isArray(f.options)){var h=f.options.filter(function(x){return typeof x=="string"&&x.trim()!==""}),L=h.length-Xa;f.options=h.slice(0,Xa).map(function(x){return pr(x,40)});var M=typeof f.options_more=="number"&&isFinite(f.options_more)&&f.options_more>0?Math.floor(f.options_more):0;L>0&&(f.options_more=M+L)}return f});r.push(a),r.push(a.map(function(u){if(!u||typeof u!="object")return u;var f={};for(var p in u)p!=="options"&&p!=="help"&&(f[p]=u[p]);return f}))}for(var n=0;n<r.length;n++){var o={};for(var l in e)o[l]=e[l];if(o.form_fields=r[n],zi(o))return o}var s={};for(var d in e)d!=="form_fields"&&(s[d]=e[d]);return zi(s)?s:null}function Ut(){const e=document.getElementById("lurija-ai-context")||document.getElementById("ikeds-ai-context");var t=null;if(e)try{t=JSON.parse(e.textContent)}catch{t=null}if(Ai){var r=null;try{r=Ai()}catch{r=null}if(r&&typeof r=="object")try{var i=Uo(r);if(i){t=t&&typeof t=="object"?t:{};var a=t.page_state&&typeof t.page_state=="object"?t.page_state:{},n={};for(var o in a)n[o]=a[o];for(var l in i)n[l]=i[l];t=Object.assign({},t,{page_state:n})}}catch{}}return t}const Qa="lurija_sitemap_"+J;var Wo=60*1e3,fr=null;function en(){if(fr)return fr;try{var e=JSON.parse(st(Qa)||"null");e&&Array.isArray(e.entries)&&e.lang===ae&&Date.now()-(e.at||0)<Wo&&(fr=e.entries)}catch{}return fr}function Go(e){var t=e&&Array.isArray(e.sitemap)?e.sitemap:null;if(!(!t||!t.length)){fr=t;try{Fe(Qa,JSON.stringify({entries:t,lang:ae,at:Date.now()}))}catch{}}}function Ko(e){var t=Ut(),r=t&&t.system_sitemap||en(),i=String(e||"").toLowerCase();if(Array.isArray(r)){for(var a=0;a<r.length;a++)if(r[a]&&String(r[a].key||"").toLowerCase()===i)return r[a]}else if(r&&typeof r=="object"&&r[i]&&typeof r[i]=="object")return Object.assign({key:i},r[i]);return null}function Yo(e){var t=Ut(),r=t&&t.page_state&&t.page_state.form_fields,i=String(e||"").toLowerCase().replace(/^id_/,"");if(!Array.isArray(r))return null;for(var a=0;a<r.length;a++){var n=r[a];if(n){var o=String(n.slug||n.id||"").toLowerCase().replace(/^id_/,"");if(o===i)return n}}return null}function Ii(){const e=document.querySelectorAll(Et);for(const t of e){const r=t.getAttribute("data-user-token");if(r)return r}return null}const Re=Ii();var Vr="",Jo={iris:1,doris:1,agnes:1,ines:1,beatris:1};function tn(e){return e=e||"",ae!=="lv"||e.length<4||!/[sš]$/.test(e)||Jo[e.toLowerCase()]?e:e.slice(0,-1)}function Oi(e){var t=e&&typeof e.user_name=="string"?e.user_name.trim():"";if(!(!t||t===Vr)){Vr=t;var r=document.querySelector("#lurija-welcome .lurija-welcome-title");if(r){var i=tn(t.split(/\s+/)[0]);r.textContent=(i&&b.greetingName?b.greetingName.replace("{name}",i):b.greeting)+" \u{1F44B}"}}}function $o(){if(Vr)return Vr;var e=Re;if(!e)return"";try{var t=e.split(".")[1]||"";t=t.replace(/-/g,"+").replace(/_/g,"/");var r=t.length%4;r&&(t+="===".slice(r-1));var i=JSON.parse(decodeURIComponent(escape(atob(t))));return String(i.name||"").trim()}catch{return""}}const $=!!Re,rn="lurija_widget_view_"+J,an="lurija_widget_sidebar_"+J;var ze=function(){var e=st(rn);return e==="fullscreen"?"fullscreen":"pane"}(),rt=st(an)!=="0";$&&(xt=!0);var hr="floating";let de=st(zr)||null,vr=null,Ur=null,Nt=null;function Xo(e){function t(R,te){return R>>>te|R<<32-te}for(var r=Math.pow(2,32),i=[],a=e.length*8,n=[],o=[],l=0,s={},d=2;l<64;d++)if(!s[d]){for(var u=0;u<313;u+=d)s[u]=d;n[l]=Math.pow(d,.5)*r|0,o[l++]=Math.pow(d,1/3)*r|0}for(e+="\x80";e.length%64-56;)e+="\0";for(var u=0;u<e.length;u++){var f=e.charCodeAt(u);if(f>>8)return"";i[u>>2]|=f<<(3-u)%4*8}i[i.length]=a/r|0,i[i.length]=a;for(var p=0;p<i.length;){for(var h=i.slice(p,p+=16),L=n.slice(0),u=0;u<64;u++){var M=h[u-15],x=h[u-2],T=n[0],j=n[4],w=n[7]+(t(j,6)^t(j,11)^t(j,25))+(j&n[5]^~j&n[6])+o[u]+(h[u]=u<16?h[u]:h[u-16]+(t(M,7)^t(M,18)^M>>>3)+h[u-7]+(t(x,17)^t(x,19)^x>>>10)|0),_=(t(T,2)^t(T,13)^t(T,22))+(T&n[1]^T&n[2]^n[1]&n[2]);
9n=[w+_|0].concat(n),n[4]=n[4]+w|0}for(var u=0;u<8;u++)n[u]=n[u]+L[u]|0}for(var A="",u=0;u<8;u++)for(var f=3;f+1;f--){var K=n[u]>>f*8&255;A+=(K<16?"0":"")+K.toString(16)}return A}function Zo(e){for(var t=0,r=0;r<e.length;r++){var i=parseInt(e[r],16);if(i===0){t+=4;continue}t+=Math.clz32(i)-28;break}return t}async function Qo(e,t){for(var r=0;;){if(Zo(Xo(e+":"+r))>=t)return String(r);r++,r%4e3===0&&await new Promise(function(i){setTimeout(i,0)})}}async function el(){try{var e=await fetch(le+"/s/c?token="+encodeURIComponent(J)).then(function(t){return t.ok?t.json():null});if(e&&e.difficulty>0)return{pow_nonce:e.nonce,pow_exp:e.exp,pow_difficulty:e.difficulty,pow_sig:e.sig,pow_solution:await Qo(e.nonce,e.difficulty)}}catch{}return{}}async function Ri(e){var t={embed_token:J,existing_session_token:e||null};e||Object.assign(t,await el());var r;try{r=await fetch(le+"/s/o",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}catch{return{ok:!1,permanent:!1}}if(!r.ok){var i=r.status===401||r.status===403||r.status===404;return{ok:!1,permanent:i}}var a=await r.json().catch(function(){return null});return!a||!a.session_token?{ok:!1,permanent:!1}:(de=a.session_token,Fe(zr,de),Pi=Date.now(),{ok:!0,permanent:!1})}var Pi=0,tl=12e4;function rl(e){return new Promise(function(t){setTimeout(t,e)})}function it(){var e={"Content-Type":"application/json"};return Re&&(e.Authorization="Bearer "+Re),e}function nn(e){var t=e||{};return t.embed_token=J,!$&&de&&(t.session_token=de),t}async function on(){if(!Re){if(de){if(Date.now()-Pi<tl)return;var e=await Ri(de);if(e.ok)return;if(!e.permanent){if(await rl(800),e=await Ri(de),e.ok)return;if(!e.permanent){var t=new Error(b.streamError||b.sessionError);throw t.kind="transient",t}}de=null,Ze(zr)}var r=await Ri(null);if(!r.ok){var i=new Error(b.sessionError);throw i.kind="session",i}}}function ln(e,t,r,i){if(r){var a=document.querySelector("#lurija-send"),n=zl(),o=e.clarify;if(n&&n.questions&&n.questions.length){Ar(r,"waiting"),Ea(n.questions,n.questionsOptions,n.questionsMultiple,t,a,n.lang,r,n.text,{answers:n.answers,step:n.step},n.questionsActions||[]),a&&(a.disabled=!1),ye(t,null);return}if(o&&Array.isArray(o.questions)&&o.questions.length){Ar(r,"waiting"),Ea(o.questions,o.questions_options||[],o.questions_multi||[],t,a,o.lang||ae,r,o.text||"",void 0,o.questions_actions||[]),a&&(a.disabled=!1),ye(t,null);return}n&&Yt();var l=e.trailers,s=l&&l.followups&&l.followups.length,d=l&&l.next_steps&&l.next_steps.length,u=e.closure&&e.closure.strings;if((s||d||u)&&Ar(r,u?"happy":"waiting"),s){var f=Zr(l.followups,a,t);f&&r.appendChild(f)}else{var p=Zr(null,a,t);p&&r.appendChild(p)}if(l&&l.chat_id&&r.appendChild(In(l.chat_id)),d){var h=On(l.next_steps,i||ae,l&&l.chat_id);h&&r.appendChild(h)}u?(no(e.closure.strings,t,r,e.closure.chat_id),ye(t,null)):s||d?ye(t,null):ye(t,"waiting")}}async function Bi(){if(!(!$&&!de))try{const e=await fetch(le+"/s/r",{method:"POST",headers:it(),body:JSON.stringify(Object.assign(nn(),{want_sitemap:!en(),lang:ae}))});if(!e.ok)return;const t=await e.json();sn(t)}catch{}}function sn(e){try{e.conversation_id&&(xe=e.conversation_id),pn(e),Oi(e),Go(e),e.chat_consent&&jo(),Ni(e.registration&&e.registration.placeholder);const o=e.messages||[],l=document.querySelector("#lurija-messages");var t=null;if(o.forEach(function(s){if(ne.push({role:s.role,content:s.content}),!(s.role==="user"&&(s.content||"").trim()===xi)){var d=l?ht(s.role,s.content,l,s.attachments,s.lang,s.author,s.at):null;s.role==="assistant"&&(t=d)}}),e.in_progress&&l){e.in_progress_user&&e.in_progress_user.content&&(ne.push({role:"user",content:e.in_progress_user.content}),ht("user",e.in_progress_user.content,l,e.in_progress_user.attachments));var r=ht("assistant","\u2026",l),i=typeof b<"u"&&b.thinking||"\u2026";e.partial?un(r,e.partial,l):$t(r,i,l),ye(l,"thinking",i),il(l,r,o.length)}else t?(ln(e,l,t,Ya(ne)),Fr(Ya(ne))):ne.length&&ne[ne.length-1].role==="assistant"&&ye(l,"waiting");if(!o.length&&l&&!l.querySelector(".lurija-msg")&&!document.getElementById("lurija-welcome")){var a=document.querySelector("#lurija-send"),n=function(s){at(s,a,l)};l.appendChild(ei(n)),ye(l,null),ti(n,"resume-empty")}ga(l),se()&&(El(o),Jr(),Zi(),Ue()),$&&hn()}catch{}}function un(e,t,r){var i=parseInt(e.dataset&&e.dataset.lurijaPartialLen||"0",10)||0;if(!(t.length<=i)){var a=!!r&&r.scrollHeight-r.scrollTop-r.clientHeight<=40;ni(e,t,null,null,!1),e.dataset&&(e.dataset.lurijaPartialLen=String(t.length));var n=e.lastElementChild;n&&i>0&&n.classList.add("lurija-elin"),a&&(r.scrollTop=r.scrollHeight)}}function il(e,t,r){var i=0,a=setInterval(async function(){if(i+=1500,i>bo){clearInterval(a),et=null;try{la(t,b.streamError||b.sessionError||"Sorry \u2014 the answer was interrupted. Please try again."),ye(e,null),Zt(e,null),Ze(Lt),St(!1)}catch{}return}try{var n=await fetch(le+"/s/r",{method:"POST",headers:it(),body:JSON.stringify(nn())});if(!n.ok)return;var o=await n.json();if(o.in_progress){Co(),o.partial&&un(t,o.partial,e);return}clearInterval(a),et=null,Ze(Lt),St(!1),Br.post("turn:done",{convId:xe});var l=o.messages||[];if(l.length>(r||0)){for(var s=null,d=l.length-1;d>=0;d--)if(l[d].role==="assistant"){s=l[d];break}s&&(ni(t,s.content||"",s.lang,null,!0),oi(t,s.content||""),Fa()&&Ci(!0),ln(o,e,t,s.lang||null))}else la(t,b.streamError||b.sessionError||"Sorry \u2014 the answer was interrupted. Please try again."),ye(e,null),Zt(e,null);Qt(e)}catch{}},1500);et=a}var Ee=[],Hi=0,Wr=null,yt="all",qi=function(){},Wt=null,Gt=-1,Di=[],D=null,pe="lurija",zt=function(){},Ve=[],Pe=null,mr=[],$e=0,gr=null,Gr=null,dt=null,It=!1,cn=!1,jr=null,Fi="",Kr=!1;function se(){return!!(D&&D.enabled)}function gt(e,t){return String(e||"").replace(/\{(\w+)\}/g,function(r,i){return t[i]==null?r:String(t[i])})}function Be(e){return e?(e.name||"").trim()||(e.email||"").trim()||"\u2014":""}
9function al(e){var t=String(e||"").trim().split(/\s+/).filter(Boolean);return t.length?t.length===1?t[0].slice(0,1).toUpperCase():(t[0].slice(0,1)+t[t.length-1].slice(0,1)).toUpperCase():"?"}function nl(e){if(!e)return"";try{var t=new Date(e);if(isNaN(t.getTime()))return"";var r=function(i){return(i<10?"0":"")+i};return r(t.getHours())+":"+r(t.getMinutes())}catch{return""}}function dn(){if(!se())return[];var e=[];return D.linked&&e.push(Object.assign({kind:"linked"},D.linked)),(D.waiting||[]).forEach(function(t){e.push(Object.assign({kind:"waiting"},t))}),(D.past||[]).forEach(function(t){e.push(Object.assign({kind:"past"},t))}),e}function Vi(e){if(!e)return null;for(var t=dn(),r=0;r<t.length;r++)if(t[r].sub&&t[r].sub===e)return t[r];return null}function ol(){if(!se()||!xe)return!1;if(pe==="console")return!!Pe&&!Yr();var e=Vi(pe);return!!(e&&e.kind==="linked")&&!Yr()}function Yr(){return!!(se()&&D.thread&&D.thread.read_only)}function Ui(e,t){return t?(e||[]).filter(function(r){for(var i=r.participants||[],a=0;a<i.length;a++)if(i[a]&&i[a].sub===t)return!0;return!1}):e||[]}function pn(e){var t=e&&e.accountants||null,r=se();if(D=t&&t.enabled?t:null,!se()){r&&(pe="lurija",Pe=null,En());return}r||bn(),D.acting_for&&!cn&&(cn=!0,pe="console",Pe||(Pe=D.acting_for));var i=Cn().map(function(a){return a.key});D.is_accountant||i.push("add"),i.indexOf(pe)===-1&&(pe=pe==="add"&&D.linked&&i.indexOf(D.linked.sub)!==-1?D.linked.sub:"lurija"),zt()}function br(){if($){for(var e=document.getElementById("lurija-panel"),t=!!(e&&e.classList.contains("open")),r=0,i=0;i<Ee.length;i++){var a=Ee[i],n=se()&&a.unread_human||0;(a.unseen||n>0)&&!(t&&a.active)&&r++}if(se()&&D.is_accountant)for(var o=0;o<Ve.length;o++)(Ve[o].unread||0)>0&&r++;if(r!==Gt){Gt=r;for(var l=0;l<Di.length;l++)try{Di[l](r)}catch{}try{window.dispatchEvent(new CustomEvent("lurija:unread",{detail:{unread:r}}))}catch{}}}}function fn(e){try{var t=new Date(e);if(isNaN(t.getTime()))return"";var r=function(i){return(i<10?"0":"")+i};return r(t.getDate())+"."+r(t.getMonth()+1)+"."+t.getFullYear()}catch{return""}}function xr(e,t){var r=document.getElementById("lurija-chat-title"),i=document.getElementById("lurija-chat-date");r&&(r.textContent=e||b.name),i&&(i.textContent=t||"")}function hn(){for(var e=0;e<ne.length;e++)if(ne[e].role==="user"&&(ne[e].content||"").trim()&&ne[e].content.trim()!==xi){xr(ne[e].content.trim().slice(0,80),"");return}xr(null,"")}function Wi(){for(var e=0;e<Ee.length;e++)if(Ee[e].active){xr(Ee[e].title,fn(Ee[e].last_at));return}}function ll(){if($){var e=document.getElementById("lurija-panel");if(!(!e||!e.classList.contains("open"))&&!(document.visibilityState&&document.visibilityState!=="visible"))for(var t=0;t<Ee.length;t++){var r=Ee[t];r.active&&r.unseen&&(r.unseen=!1,Da(r.conversation_id))}}}async function wr(e){if($){var t=++Hi,r=document.getElementById("lurija-sb-list");try{var i=await fetch(le+"/s/h",{method:"POST",headers:it(),body:JSON.stringify({embed_token:J,q:e||null})});if(!i.ok)throw new Error("list failed");var a=await i.json();if(t!==Hi)return;Ee=a.chats||[],qi(),e||ll(),yr(r,Ee,e),e||(Wi(),br()),se()&&D.is_accountant&&yn(),se()&&pe==="console"&&Pe&&kn(Pe,e)}catch{if(t!==Hi)return;if(r){for(;r.firstChild;)r.removeChild(r.firstChild);var n=c("div","lurija-sb-empty");n.textContent=b.chatsError,r.appendChild(n)}}}}function pt(){$&&(Wr&&clearTimeout(Wr),Wr=setTimeout(function(){Wr=null;var e=document.getElementById("lurija-sb-search-input");wr(e&&e.value?e.value.trim():null)},800))}var vn=null;function sl(){!$||vn||(vn=setInterval(function(){document.hidden||pt()},15e3),document.addEventListener("visibilitychange",function(){document.hidden||pt()}))}var ul=["income","expense","invoice","scan","bank","reports","payroll","tax","support"];function mn(e){return e==="income"?m("filterIncome"):e==="expense"?m("filterExpense"):e==="invoice"?m("filterInvoice"):e==="scan"?m("filterScan"):e==="bank"?m("filterBank"):e==="reports"?m("filterReports"):e==="payroll"?m("filterPayroll"):e==="tax"?b.filterTax:e==="support"?b.filterSupport:e==="docs"?b.filterDocs:b.filterAll}function Gi(e){return e.subject?e.subject:e.category==="law"?"tax":e.category==="support"?"support":null}function cl(e){var t=[],r=Gi(e);return r&&t.push(r),e.has_docs&&t.push("docs"),t}function dl(e){return yt==="all"?!0:yt==="docs"?!!e.has_docs:Gi(e)===yt}function pl(e){var t={};
9(e||[]).forEach(function(i){var a=Gi(i);a&&(t[a]=!0),i.has_docs&&(t.docs=!0)});var r=ul.filter(function(i){return t[i]});return t.docs&&r.push("docs"),r}function yr(e,t,r){if(e){for(;e.firstChild;)e.removeChild(e.firstChild);if(se()&&pe==="add"){e.appendChild(bl()),gn(t).forEach(function(n){e.appendChild(Ki(n,r))});return}if(se()&&pe==="console"){e.appendChild(wl(r));return}var i=se()?gn(t):[{title:b.chatsLabel,items:t,list:t}];if(i.forEach(function(n){e.appendChild(Ki(n,r))}),se()&&!D.is_accountant&&D.linked&&pe===D.linked.sub){var a=c("button","lurija-acct-manage");a.type="button",a.textContent=m("acctInvitations"),a.addEventListener("click",function(){$i("add")}),e.appendChild(a)}}}function gn(e){if(pe==="lurija")return[{title:b.chatsLabel,items:e,list:e}];var t=Vi(pe),r=[];t&&t.kind!=="past"&&r.push({title:gt(m("acctChatsWith"),{name:Be(t)}),empty:gt(m("acctNoChatsWith"),{name:Be(t)}),items:Ui(e,t.sub),list:e});var i=(D.linked||{}).sub||null;return(D.past||[]).forEach(function(a){if(!(t&&t.kind==="past"&&a.sub!==t.sub)&&!(i&&a.sub===i)){var n=Ui(e,a.sub);n.length&&r.push({title:gt(m("acctArchivedWith"),{name:Be(a)}),note:gt(m("acctArchivedNote"),{name:Be(a)}),items:n,list:e,readOnly:!0})}}),r}function Ki(e,t){var r=c("div","lurija-sb-section"+(e.readOnly?" lurija-sb-section--archived":"")),i=c("div","lurija-sb-title");if(i.textContent=e.title,r.appendChild(i),e.note){var a=c("div","lurija-sb-note");a.textContent=e.note,r.appendChild(a)}var n=(e.items||[]).filter(dl);if(!n.length){var o=c("div","lurija-sb-empty");o.textContent=t?"\u2014":yt!=="all"?m("noChatsForFilter"):e.empty||b.noChats,r.appendChild(o)}return n.forEach(function(l){r.appendChild(fl(l,t,e))}),r}function fl(e,t,r){var i=r&&r.list||Ee,a=c("button","lurija-sb-item"+(e.active?" lurija-sb-item--active":""));a.type="button";var n=c("div","lurija-sb-item-txt"),o=c("div","lurija-sb-item-title");o.textContent=e.title;var l=c("div","lurija-sb-item-meta"),s=c("div","lurija-sb-item-date");s.textContent=fn(e.last_at),l.appendChild(s),cl(e).forEach(function(p){var h=c("span","lurija-tag lurija-tag--"+p);h.textContent=mn(p),l.appendChild(h)}),n.appendChild(o),n.appendChild(l),a.appendChild(n);var d=se()&&e.unread_human||0,u=(e.unseen?e.unseen_count>0?e.unseen_count:1:0)+d;if(u>0&&!e.active){var f=c("span","lurija-sb-item-unread");f.textContent=String(u),a.appendChild(f)}return a.addEventListener("click",function(){var p=document.getElementById("lurija-sb-list");if(!e.active||xe!==e.conversation_id){for(var h=0;h<i.length;h++)i[h].active=i[h].conversation_id===e.conversation_id;e.unseen=!1,e.unread_human=0,yr(p,Ee,t),Wi(),br(),Tl(e.conversation_id)}Qe()&&jt(!1)}),a}function jn(){var e=document.getElementById("lurija-sb-search-input");return e&&e.value?e.value.trim():null}function Ue(){yr(document.getElementById("lurija-sb-list"),Ee,jn())}async function Kt(e,t){var r=await fetch(le+e,{method:"POST",headers:it(),body:JSON.stringify(Object.assign({embed_token:J},t||{}))}),i=null;try{i=await r.json()}catch{i=null}return{ok:r.ok,status:r.status,data:i||{}}}function Yi(e){return m(e==="already_linked"?"acctErrAlreadyLinked":e==="not_an_accountant"?"acctErrNotAccountant":e==="invalid_email"?"acctErrInvalidEmail":e==="host_unavailable"?"acctErrUnavailable":"acctErrGeneric")}function Ji(e){!e||!e.enabled||(D=Object.assign({},D||{},e),zt())}async function bn(){if(se())try{var e=await Kt("/s/acct",{});if(!e.ok||!e.data||!e.data.enabled)return;Ji(e.data),pe==="add"?Ue():pt()}catch{}}async function xn(e){dt=null,Gr=null;var t=String(e||"").trim();if(t.indexOf("@")<1||t.indexOf(".",t.indexOf("@"))<0){dt=m("acctErrInvalidEmail"),Ue();return}It=!0,Ue();try{var r=await Kt("/s/acct/invite",{email:t});r.ok?(Ji(r.data.accountants),Gr=r.data.state==="linked"?null:t,Fi=""):dt=Yi(r.data&&r.data.error)}catch{dt=m("acctErrUnavailable")}It=!1,Ue(),pt()}function hl(e){var t={};return e.invite_id!=null&&(t.invite_id=e.invite_id),e.email&&(t.email=e.email),e.sub&&(t.target=e.sub),t}async function wn(e,t){dt=null,It=!0,Ue();try{var r=await Kt(e,hl(t));r.ok?Ji(r.data.accountants):dt=Yi(r.data&&r.data.error)}catch{dt=m("acctErrUnavailable")}It=!1,Ue(),pt()}async function yn(){if(!(!se()||!D.is_accountant))try{var e=await Kt("/s/acct/clients",{});if(!e.ok)return;Ve=e.data.clients||[],zt(),pe==="console"&&Ue(),br()}catch{}}async function kn(e,t){if(!(!se()||!e))try{var r=await fetch(le+"/s/h",{method:"POST",headers:it(),body:JSON.stringify({embed_token:J,q:t||null,for:e})});if(!r.ok)return;var i=await r.json(),a=i.chats||[];a.forEach(function(n){n.active=!!xe&&n.conversation_id===xe}),mr=a,pe==="console"&&Pe===e&&Ue()}catch{}}function $i(e){if(!(!se()||e===pe)){var t=jr!=null&&e!=="console";if(pe=e,dt=null,e!=="console"&&(Pe=null),t){jr=null;var r=document.querySelector("#lurija-messages");r&&(Cr(r),Bi())}e==="console"&&yn(),e==="add"&&bn(),zt(),Ue(),Jr()}}function Cn(){if(!se())return[];var e=[{key:"lurija",kind:"ai",label:b.name,sub:b.role}];if(D.is_accountant){for(var t=0,r=0;r<Ve.length;r++)t+=Ve[r].unread||0;e.push({key:"console",kind:"clients",label:m("acctClients"),sub:"",badge:t})}else if(D.linked){var i=D.linked;e.push({key:i.sub,kind:"person",label:vl(i),full:Be(i),sub:m("acctRoleLabel"),online:ml(i),badge:gl(i.sub)})}else{var a=D.waiting||[];e.push({key:"add",kind:"add",label:m("acctAddNew"),sub:"",pending:a.length>0,full:a.length?m("acctStatusWaiting")+" \xB7 "+a.map(Be).join(", "):""})}return e}function vl(e){var t=Be(e),r=t.split(/\s+/)[0]||t;return r.indexOf("@")!==-1?t:r}function ml(e){var t=e&&e.presence;return t==="online"||t&&t.online===!0||e.online===!0}function gl(e){var t=0;return Ui(Ee,e).forEach(function(r){t+=r.unread_human||0}),t}function jl(e){if(!se()){e.textContent="",e.style.display="none",e.dataset&&(e.dataset.lurijaPersons="");return}
9var t=Cn(),r=JSON.stringify(t)+"|"+pe;e.dataset&&e.dataset.lurijaPersons===r||(e.dataset&&(e.dataset.lurijaPersons=r),e.textContent="",e.style.display="",e.setAttribute("role","tablist"),t.forEach(function(i){var a=i.key===pe||pe==="add"&&i.kind==="person",n=c("button","lurija-sb-person lurija-sb-person--"+i.kind+(a?" lurija-sb-person--active":""));n.type="button",n.setAttribute("role","tab"),n.setAttribute("aria-selected",a?"true":"false"),i.full&&i.full!==i.label&&Se(n,i.full);var o=c("span","lurija-sb-person-av");if(i.kind==="ai"){var l=c("span","lurija-sb-person-img");l.style.backgroundImage="url("+Ei+")",o.appendChild(l);var s=c("span","lurija-sb-person-ai");s.textContent="AI",o.appendChild(s)}else i.kind==="clients"?(o.classList.add("lurija-sb-person-av--glyph"),o.innerHTML=ws):i.kind==="add"?(o.classList.add("lurija-sb-person-av--add"),o.textContent="+",i.pending&&o.appendChild(c("span","lurija-sb-person-pending"))):(o.appendChild(kr(i.full||i.label)),i.online&&o.appendChild(c("span","lurija-sb-person-dot")));if(i.badge>0){var d=c("span","lurija-sb-person-badge");d.textContent=i.badge>99?"99+":String(i.badge),o.appendChild(d)}n.appendChild(o);var u=c("span","lurija-sb-person-label");u.textContent=i.label,n.appendChild(u);var f=c("span","lurija-sb-person-sub");f.textContent=i.sub||"",n.appendChild(f),n.addEventListener("click",function(){$i(i.key)}),e.appendChild(n)}))}function kr(e){var t=c("span","lurija-acct-avatar");return t.textContent=al(e),t}function bl(){var e=c("div","lurija-sb-section lurija-acct-add"),t=c("div","lurija-sb-title");t.textContent=m("acctAddNew"),e.appendChild(t);var r=c("label","lurija-acct-label");r.textContent=m("acctEmail"),e.appendChild(r);var i=c("input","lurija-sb-search-input lurija-acct-email");i.id="lurija-acct-email",i.type="email",i.placeholder=m("acctEmail"),i.value=Fi,i.addEventListener("input",function(){Fi=i.value}),e.appendChild(i);var a=c("button","lurija-acct-connect");
9if(a.type="button",a.textContent=m("acctConnect"),a.disabled=!!It,a.addEventListener("click",function(){xn(i.value)}),i.addEventListener("keydown",function(u){u.key==="Enter"&&(u.preventDefault(),xn(i.value))}),e.appendChild(a),dt){var n=c("div","lurija-acct-err");n.textContent=dt,e.appendChild(n)}if(Gr){var o=c("div","lurija-acct-sent");o.textContent=gt(m("acctRequestSent"),{email:Gr}),e.appendChild(o)}var l=c("div","lurija-sb-title");l.textContent=m("acctInvitations"),e.appendChild(l);var s=dn();if(!s.length){var d=c("div","lurija-sb-empty");d.textContent="\u2014",e.appendChild(d)}return s.forEach(function(u){e.appendChild(xl(u))}),e}function xl(e){var t=c("div","lurija-acct-inv lurija-acct-inv--"+e.kind);t.appendChild(kr(Be(e)));var r=c("div","lurija-acct-inv-txt"),i=c("div","lurija-acct-inv-name");i.textContent=Be(e);var a=c("div","lurija-acct-inv-status");if(a.textContent=e.kind==="linked"?m("acctConnected"):e.kind==="waiting"?m("acctStatusWaiting"):m("acctStatusPast"),r.appendChild(i),r.appendChild(a),t.appendChild(r),e.kind!=="past"){var n=c("button","lurija-chatbtn lurija-acct-trash");n.type="button",n.innerHTML=xs,Se(n,m("acctRemoveInvite")),n.disabled=!!It,n.addEventListener("click",function(){wn("/s/acct/remove",e)}),t.appendChild(n)}if(e.kind!=="linked"){var o=c("button","lurija-acct-reinvite");o.type="button",o.textContent=m("acctReinvite"),o.disabled=!!It,o.addEventListener("click",function(){wn("/s/acct/reinvite",e)}),t.appendChild(o)}return t}function wl(e){if(Pe)return kl(e);var t=c("div","lurija-sb-section"),r=c("div","lurija-sb-title");if(r.textContent=m("acctClients"),t.appendChild(r),!Ve.length){var i=c("div","lurija-sb-empty");i.textContent=m("acctNoClients"),t.appendChild(i)}return Ve.forEach(function(a){var n=c("button","lurija-sb-item lurija-acct-client");n.type="button",n.appendChild(kr(Be(a)));var o=c("div","lurija-sb-item-txt"),l=c("div","lurija-sb-item-title");l.textContent=Be(a);var s=c("div","lurija-sb-item-date");if(s.textContent=a.last_message&&a.last_message.preview||"",o.appendChild(l),o.appendChild(s),n.appendChild(o),(a.unread||0)>0){var d=c("span","lurija-sb-item-unread");d.textContent=String(a.unread),n.appendChild(d)}n.addEventListener("click",function(){yl(a.sub)}),t.appendChild(n)}),t}function yl(e){Pe=e,mr=[],Ue(),kn(e,jn())}function kl(e){var t=c("div","lurija-sb-section"),r=c("button","lurija-acct-back");r.type="button",r.innerHTML=ys;var i=c("span");i.textContent=m("acctBack"),r.appendChild(i),r.addEventListener("click",function(){Pe=null,mr=[],Ue()}),t.appendChild(r);for(var a=null,n=0;n<Ve.length;n++)Ve[n].sub===Pe&&(a=Ve[n]);return t.appendChild(Ki({title:gt(m("acctChatsWith"),{name:Be(a)}),empty:gt(m("acctNoChatsWith"),{name:Be(a)}),items:mr,list:mr},e)),t}async function _n(e,t,r){var i=xe,a=r||document.querySelector("#lurija-messages");if(!(!i||!a)){t&&(t.disabled=!0);try{var n=await Kt("/s/msg",{conversation_id:i,content:e});if(!n.ok){var o=ht("assistant","\u2026",a);fa(o,Yi(n.data&&n.data.error),!1,null);return}var l=n.data.message||{},s=l.role||"user";ne.push({role:s,content:l.content||e}),ht(s,l.content||e,a,null,null,l.author,l.created_at),l.seq!=null&&l.seq>$e&&($e=l.seq),D&&D.thread&&(n.data.participants&&(D.thread.participants=n.data.participants),D.thread.unread_human=0),Qt(a),pt(),Zi()}catch{var d=ht("assistant","\u2026",a);fa(d,m("acctErrGeneric"),!1,null)}finally{t&&(t.disabled=!1)}}}function Cl(){var e=document.getElementById("lurija-panel");return!(!e||!e.classList.contains("open")||document.visibilityState&&document.visibilityState!=="visible")}async function Xi(){if(!(!se()||!xe)&&Cl())try{var e=await Kt("/s/read",{conversation_id:xe,seq:$e||null});e.ok&&D&&D.thread&&(D.thread.unread_human=e.data.unread_human||0)}catch{}}function _l(e){var t=document.querySelector("#lurija-messages");if(!t)return!1;var r=$e;return(e||[]).forEach(function(i){!i||i.seq==null||i.seq<=$e||(ne.push({role:i.role,content:i.content}),ht(i.role,i.content,t,i.attachments,i.lang,i.author,i.at),i.seq>r&&(r=i.seq))}),r<=$e?!1:($e=r,Qt(t),Xi(),pt(),!0)}
9function El(e){$e=0,(e||[]).forEach(function(t){t&&t.seq!=null&&t.seq>$e&&($e=t.seq)}),$e>0&&Xi()}function Zi(){!se()||gr||(gr=setInterval(Ll,5e3))}function En(){if(gr){try{clearInterval(gr)}catch{}gr=null}}async function Ll(){if(!(!se()||!xe)&&!document.hidden){var e=document.getElementById("lurija-panel");if(!(!e||!e.classList.contains("open"))&&!(ar||Rr()||et)){var t=xe;try{var r=await fetch(le+"/s/h/o",{method:"POST",headers:it(),body:JSON.stringify({embed_token:J,conversation_id:t})});if(!r.ok)return;var i=await r.json();if(!i||i.conversation_id!==xe||t!==xe)return;pn(i),_l(i.messages||[]),Jr()}catch{}}}}function Jr(){if(se()){if(Yr()){Kr=!0,er(!0),Sl();return}Ln(),Kr&&(Kr=!1,er(!1));var e=Vi(pe);if(e&&e.kind==="linked"){At(gt(m("acctComposerHint"),{name:Be(e)}));return}if(pe==="console"&&Pe){for(var t=null,r=0;r<Ve.length;r++)Ve[r].sub===Pe&&(t=Ve[r]);At(gt(m("acctComposerHint"),{name:Be(t)}));return}At(null)}}function Sl(){var e=document.querySelector("#lurija-messages");if(!(!e||document.getElementById("lurija-acct-readonly"))){var t=c("div","lurija-acct-readonly");t.id="lurija-acct-readonly",t.textContent=m("acctNoReply");var r=e.querySelector(".lurija-status-slot");r?e.insertBefore(t,r):e.appendChild(t)}}function Ln(){var e=document.getElementById("lurija-acct-readonly");e&&e.parentNode&&e.parentNode.removeChild(e)}function Cr(e){if(Fr(null),tt++,Wt){try{Wt.abort()}catch{}Wt=null}Je=null,wt=null,Ye=!1,Ni(null),mt&&mt(null);var t=document.getElementById("lurija-send");if(t&&(t.disabled=!1),e&&e.classList.remove("lurija-messages--sending"),ne=[],kt=[],Yt(),xe=null,Vt=!1,et){try{clearInterval(et)}catch{}et=null}if(En(),Ln(),$e=0,Kr=!1,D&&(D.thread=null),e){for(;e.firstChild;)e.removeChild(e.firstChild);var r=c("div","lurija-tail-spacer");r.style.height="0px",e.appendChild(r)}var i=document.getElementById("lurija-doc-pills");if(i)for(;i.firstChild;)i.removeChild(i.firstChild);er(!1)}async function Tl(e){var t=document.querySelector("#lurija-messages");if(t)try{var r=await fetch(le+"/s/h/o",{method:"POST",headers:it(),body:JSON.stringify({embed_token:J,conversation_id:e})});if(!r.ok)throw new Error("open failed");var i=await r.json();Cr(t),jr=se()&&pe==="console"&&Pe?e:null,sn(i),Da(e)}catch{for(var a=0;a<Ee.length;a++)Ee[a].active=Ee[a].conversation_id===xe;yr(document.getElementById("lurija-sb-list"),Ee,null),Wi()}}var _r=!1;function jt(e,t){var r=document.getElementById("lurija-panel");r&&(rt=typeof e=="boolean"?e:!rt,r.classList.toggle("lurija-sidebar-open",rt),t||(Fe(an,rt?"1":"0"),_r=!1),Te&&Te(),window.__lurijaApplyPanelGeom&&window.__lurijaApplyPanelGeom())}function Qi(){var e=document.getElementById("lurija-backdrop"),t=document.getElementById("lurija-panel");if(!(!e||!t)){var r=t.classList.contains("open")&&!t.classList.contains("closing")&&ze==="fullscreen";e.classList.toggle("lurija-backdrop--on",r)}}function ea(e){var t=document.getElementById("lurija-panel");if(t){ze=e||(ze==="fullscreen"?"pane":"fullscreen"),Fe(rn,ze),t.classList.toggle("lurija-view-fullscreen",ze==="fullscreen"),ze==="fullscreen"&&!rt?(_r=!0,jt(!0,!0)):ze!=="fullscreen"&&_r&&(_r=!1,jt(!1,!0)),Qi(),window.__lurijaApplyPanelGeom&&window.__lurijaApplyPanelGeom();var r=document.getElementById("lurija-fs-btn");if(r){r.innerHTML=ze==="fullscreen"?qn:Hn;var i=ze==="fullscreen"?b.exitFullScreen:b.fullScreen;Se(r,i)}Te&&Te();var a=document.querySelector("#lurija-messages");a&&Qt(a)}}function Al(){var e=c("div","lurija-sidebar");e.id="lurija-sidebar";var t=c("div","lurija-sb-actions"),r=c("button","lurija-sb-new lurija-glass");r.type="button",r.innerHTML=Bn;var i=c("span");i.textContent=b.newChat,r.appendChild(i),r.addEventListener("click",function(){var p=document.querySelector("#lurija-messages");p&&Mr(p),Qe()&&jt(!1)}),t.appendChild(r);var a=c("button","lurija-chatbtn lurija-sb-searchbtn lurija-glass");a.type="button",a.innerHTML=gs,Se(a,b.searchChats+" (Ctrl+F)"),t.appendChild(a);var n=c("button","lurija-chatbtn lurija-sb-close");n.type="button",n.innerHTML=Tr,Se(n,b.closeMenu),n.addEventListener("click",function(){jt(!1)}),t.appendChild(n),e.appendChild(t);var o=c("div","lurija-sb-searchrow"),l=c("input","lurija-sb-search-input");l.id="lurija-sb-search-input",l.type="search",l.placeholder=b.searchChats,o.appendChild(l),e.appendChild(o);var s=null;zt=function(){if(!se()){s&&s.parentNode&&(s.parentNode.removeChild(s),s=null);return}s||(s=c("div","lurija-sb-persons"),s.id="lurija-sb-persons",e.insertBefore(s,t)),jl(s)},zt();var d=c("div","lurija-sb-chips");qi=function(){d.textContent="";var p=pl(Ee);if(p.length<2){d.style.display="none",yt="all";return}d.style.display="",Ml(d,["all"].concat(p))},qi(),e.appendChild(d);var u=null;l.addEventListener("input",function(){u&&clearTimeout(u),u=setTimeout(function(){wr(l.value.trim()||null)},250)}),a.addEventListener("click",function(){var p=e.classList.toggle("lurija-sb-search-open");if(p)try{l.focus()}catch{}else l.value&&(l.value="",wr(null))});var f=c("div","lurija-sb-list");return f.id="lurija-sb-list",e.appendChild(f),e}function Ml(e,t){var r=t.map(function(i){return{key:i,label:mn(i)}});r.forEach(function(i){var a=c("button","lurija-sb-chip lurija-sb-chip--"+i.key+(i.key===yt?" lurija-sb-chip--active":""));a.type="button",a.textContent=i.label,a.addEventListener("click",function(){if(yt!==i.key){yt=i.key;for(var n=e.querySelectorAll(".lurija-sb-chip"),o=0;o<n.length;o++)n[o].classList.remove("lurija-sb-chip--active");a.classList.add("lurija-sb-chip--active");var l=document.getElementById("lurija-sb-list"),s=document.getElementById("lurija-sb-search-input");yr(l,Ee,s&&s.value?s.value.trim():null)}}),e.appendChild(a)})}var kt=[];let ne=[];try{Ze(Ta)}catch{}function pu(){}function Nl(e){try{Fe(pi,JSON.stringify(e))}catch{}}function zl(){try{return JSON.parse(st(pi)||"null")}catch{return null}}function Yt(){Ze(pi),ut=null,At(null)}var Il=/^(https?:|mailto:|tel:)/;function Sn(e){var t=String(e??"").trim();if(!t)return null;var r=t.replace(/[\u0000-\u0020\u00a0\u2028\u2029]/g,"").toLowerCase();return Il.test(r)||/^\/(?!\/)/.test(t)||t.charAt(0)==="#"?t:null}function $r(e){var t=String(e??"").trim();return t.indexOf("\\")!==-1?null:/^\/(?!\/)/.test(t)?t:null}function Ol(){try{var e=Ut(),t=e&&e.frontend_tools;return Array.isArray(t)?t.map(function(r){return typeof r=="string"?r:r&&typeof r.name=="string"?r.name:null}
9).filter(Boolean):[]}catch{return[]}}function Rl(e,t){const r=Ut();if(Ol().indexOf(e)!==-1)if(e==="navigate_to"&&t.path){var i=$r(t.path);i&&(window.location.href=i)}else if(e==="highlight_form_field"&&t.field_id){var a=String(t.field_id),n=a.replace(/^id_/i,""),o=null;try{o=document.getElementById(a)||document.getElementById("id_"+n)||document.querySelector('[name="'+a+'"]')||document.querySelector('[name="'+n+'"]')}catch{o=null}o&&(o.focus(),o.style.outline="3px solid #67aafa",setTimeout(()=>{o.style.outline=""},3e3))}else e==="autofill_invoice_data"?document.dispatchEvent(new CustomEvent("lurija:autofill",{detail:t})):document.dispatchEvent(new CustomEvent("lurija:tool:"+e,{detail:t}))}const Pl=/\[action:\s*(\{[^\]]*\})\]/g;function ta(e,t,r){let i=e;for(const a of e.matchAll(new RegExp(Pl.source,"g")))try{const n=JSON.parse(a[1]);r!==!1&&Rl(n.name,n.args||{}),i=i.replace(a[0],"")}catch{}return i=i.replace(/\[\[chips:\s*\{[\s\S]*?\}\s*\]\]/gi,""),i=i.replace(/\[\[calc:\s*([a-z_]+)\s*\]\]/gi,function(a,n){var o=ra[String(n||"").toLowerCase()];if(!o)return"";var l=t||ae,s=o.title&&(o.title[l]||o.title[ae]||o.title.lv)||n;return"["+s+"]("+o.href+")"}),i.trim()}var ra={salary:{href:"https://pats.lv/algas-kalkulators",title:{lv:"Algu kalkulators",en:"Salary calculator",ru:"\u041A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440 \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u044B"},howto:{lv:"Ievadiet bruto algu, neapliekamo minimumu un apg\u0101d\u0101jamo skaitu \u2014 kalkulators par\u0101d\u012Bs neto algu un darba dev\u0113ja izmaksas.",en:"Enter the gross salary, the non-taxable minimum and the number of dependents \u2014 it shows the net salary and total employer cost.",ru:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0431\u0440\u0443\u0442\u0442\u043E-\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443, \u043D\u0435\u043E\u0431\u043B\u0430\u0433\u0430\u0435\u043C\u044B\u0439 \u043C\u0438\u043D\u0438\u043C\u0443\u043C \u0438 \u0447\u0438\u0441\u043B\u043E \u0438\u0436\u0434\u0438\u0432\u0435\u043D\u0446\u0435\u0432 \u2014 \u043A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440 \u043F\u043E\u043A\u0430\u0436\u0435\u0442 \u043D\u0435\u0442\u0442\u043E-\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u0438 \u0440\u0430\u0441\u0445\u043E\u0434\u044B \u0440\u0430\u0431\u043E\u0442\u043E\u0434\u0430\u0442\u0435\u043B\u044F."}},self_employed:{href:"https://pats.lv/pasnodarbinata-nodoklu-kalkulators",title:{lv:"Pa\u0161nodarbin\u0101t\u0101 nodok\u013Cu kalkulators",en:"Self-employed tax calculator",ru:"\u041A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 \u0441\u0430\u043C\u043E\u0437\u0430\u043D\u044F\u0442\u043E\u0433\u043E"},howto:{lv:"Ievadiet ien\u0101kumus un izdevumus un izv\u0113lieties VSAOI objektu \u2014 kalkulators apr\u0113\u0137in\u0101s nodok\u013Cus un neto ien\u0101kumu.",en:"Enter your income and expenses and pick the VSAOI base \u2014 it computes the taxes and your net income.",ru:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u043E\u0445\u043E\u0434\u044B \u0438 \u0440\u0430\u0441\u0445\u043E\u0434\u044B \u0438 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0431\u044A\u0435\u043A\u0442 VSAOI \u2014 \u043A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043D\u0430\u043B\u043E\u0433\u0438 \u0438 \u0447\u0438\u0441\u0442\u044B\u0439 \u0434\u043E\u0445\u043E\u0434."}},regime:{href:"https://pats.lv/nodoklu-rezima-izvele",title:{lv:"Nodok\u013Cu re\u017E\u012Bma izv\u0113le",en:"Tax regime selector",ru:"\u041F\u043E\u0434\u0431\u043E\u0440 \u043D\u0430\u043B\u043E\u0433\u043E\u0432\u043E\u0433\u043E \u0440\u0435\u0436\u0438\u043C\u0430"},howto:{lv:"Nor\u0101diet pl\u0101noto m\u0113ne\u0161a ien\u0101kumu, izdevumu \u012Bpatsvaru un vai b\u016Bs PVN/autoratl\u012Bdz\u012Bba \u2014 kalkulators ieteiks izdev\u012Bg\u0101ko re\u017E\u012Bmu.",en:"Enter your planned monthly income, the expense ratio and whether you'll have PVN/royalty income \u2014 it recommends the best regime.",ru:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u043C\u044B\u0439 \u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434, \u0434\u043E\u043B\u044E \u0440\u0430\u0441\u0445\u043E\u0434\u043E\u0432 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043B\u0438 PVN/\u0430\u0432\u0442\u043E\u0440\u0441\u043A\u043E\u0435 \u0432\u043E\u0437\u043D\u0430\u0433\u0440\u0430\u0436\u0434\u0435\u043D\u0438\u0435 \u2014 \u043A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0438\u0442 \u0432\u044B\u0433\u043E\u0434\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C."}},vat:{href:"https://pats.lv/pvn-kalkulators",title:{lv:"PVN kalkulators",en:"PVN (VAT) calculator",ru:"\u041A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440 PVN (\u041D\u0414\u0421)"},howto:{lv:"Ievadiet summu un PVN likmi \u2014 kalkulators apr\u0113\u0137in\u0101s PVN un summu ar vai bez PVN.",en:"Enter the amount and the PVN rate \u2014 it computes the PVN and the amount with or without PVN.",ru:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0443\u043C\u043C\u0443 \u0438 \u0441\u0442\u0430\u0432\u043A\u0443 PVN \u2014 \u043A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043D\u0430\u043B\u043E\u0433 \u0438 \u0441\u0443\u043C\u043C\u0443 \u0441 PVN \u0438\u043B\u0438 \u0431\u0435\u0437 \u043D\u0435\u0433\u043E."}}};
9function Bl(e,t,r,i){var a=ra[t];if(!(!a||!e)){var n=r||ae,o=document.createElement("div");o.className="lurija-calc-cta";var l=document.createElement("div");l.className="lurija-calc-title",l.textContent=a.title[n]||a.title[ae]||a.title.lv,o.appendChild(l);var s=document.createElement("div");s.className="lurija-calc-howto",s.textContent=a.howto[n]||a.howto[ae]||a.howto.lv,o.appendChild(s);var d=document.createElement("button");d.type="button",d.className="lurija-calc-btn",d.textContent=m("calcOpen",n),d.addEventListener("click",function(){window.open(a.href,"_blank","noopener,noreferrer");try{fetch(le+"/s/e/calc",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({embed_token:J,session_token:de||null,chat_id:i||null,calculator_key:t})}).catch(function(){})}catch{}}),o.appendChild(d),e.appendChild(o)}}function Hl(e){(e||[]).forEach(function(t){if(!(!t||!t.type))try{t.type==="close_floating"?hr==="floating"&&typeof window.__lurijaCloseFloating=="function"&&window.__lurijaCloseFloating():t.type==="execute_js"&&t.code?new Function(String(t.code))():t.type==="open_url"&&t.url&&(t.new_tab===!1?window.location.href=t.url:window.open(t.url,"_blank","noopener,noreferrer"))}catch(r){window.console&&console.warn("[lurija] CTA action failed",t,r)}})}function ql(e,t,r,i){if(!($&&t==="register_pats")){var a=Wa[t];if(!(!a||!e)){var n=a.audience||"all";if(!(n==="anonymous"&&$)&&!(n==="authenticated"&&!$)){var o=r||ae,l=document.createElement("div");if(l.className="lurija-cta-card lurija-cta-"+(a.style||"primary"),a.titleKey){var s=document.createElement("div");s.className="lurija-cta-title",s.textContent=m(a.titleKey,o),l.appendChild(s)}if(a.bodyKey){var d=document.createElement("div");d.className="lurija-cta-body",d.textContent=m(a.bodyKey,o),l.appendChild(d)}var u=document.createElement("button");u.type="button",u.className="lurija-cta-btn",u.textContent=a.buttonKey?m(a.buttonKey,o):"",u.addEventListener("click",function(){try{fetch(le+"/s/e/cta",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({embed_token:J,session_token:de||null,chat_id:i||null,cta_key:t})}).catch(function(){})}catch{}Hl(a.actions)}),l.appendChild(u),e.appendChild(l)}}}}var Jt=[];function Dl(e){try{if(Jt.push(e),Jt.length>500&&Jt.shift(),!window.console)return;var t="%c[lurija] "+(e.ev||"debug");console.groupCollapsed?(console.groupCollapsed(t,"color:#8A4718"),console.log(e.data),console.groupEnd()):console.log(t,e.data)}catch{}}typeof window<"u"&&(window.__lurijaDebug={events:function(){return Jt.slice()},dump:function(){return JSON.stringify(Jt,null,2)},clear:function(){Jt.length=0}});function Fl(e){const t=e.indexOf(":");if(t===-1)return null;try{return{code:e.slice(0,t),value:JSON.parse(e.slice(t+1))}}catch{return null}}function Vl(e){try{return new URL(e).host.replace(/^www\./,"")}catch{return e}}var Ul=/^\s*(?:#{1,6}\s*)?\**\s*(?:Avoti|Sources?|ÐÑÑоÑники|Fuentes|Surse)\s*:?\s*\**\s*:?\s*$/i;function Wl(e){for(var t=e.split(` 10`),r=[],i=0;i<t.length;i++){if(Ul.test(t[i])){for(var a=i+1;a<t.length;){var n=t[a].trim();if(n===""){a++;continue}if(/^(?:[-*+]|\d+\.)\s+/.test(n)&&/\[ref:\d+\]/.test(n)){a++;continue}break}i=a-1;continue}r.push(t[i])}return r.join(` 11`).replace(/\n{3,}/g,` 12 13`).trim()}function Gl(e,t){const r=t?t.list:[],i=t?t.byUrl:{},a=/[[(<]\s*(?:sources?|src)\s*:\s*([^\])>]+?)\s*[\])>]/gi,n=/https?:\/\/[^\s,;)\]>]+/gi,o=e.replace(a,function(l,s){const d=s.match(n)||[];if(!d.length)return"";let u="";for(const f of d){const p=f.replace(/[.,;:!?)\]>]+$/,"");if(!p)continue;let h=i[p];h||(h=r.length+1,i[p]=h,r.push({n:h,url:p})),u+="[ref:"+h+"]"}return u});return{cleaned:Wl(o),sources:r}}function ia(e,t){var r=document.createElement("div");r.className="lurija-sources";var i=document.createElement("div");i.className="lurija-sources-label",i.textContent=m("sourcesLabel",t);var a=document.createElement("div");a.className="lurija-sources-row";for(var n=0;n<e.length;n++)a.appendChild(Yl(e[n].n,e[n].url));return r.appendChild(i),r.appendChild(a),r}function Kl(e){return e.toLowerCase().startsWith("internal://kb/")?"PATS KB \xB7 "+e.slice(14):Vl(e)}function Yl(e,t){const r=t.toLowerCase().startsWith("internal://kb/"),i=document.createElement(r?"span":"a");i.className="lurija-src",i.setAttribute("data-n",e),r||(i.href=t,i.target="_blank",i.rel="noopener noreferrer"),i.title=t;const a=document.createElement("span");a.className="lurija-src-n",a.textContent=e;const n=document.createElement("span");return n.className="lurija-src-t",n.textContent=Kl(t),i.appendChild(a),i.appendChild(n),i}function Jl(e){const t=document.createElement("button");return t.type="button",t.className="lurija-ref",t.textContent=e,t.setAttribute("data-n",e),t.setAttribute("aria-label","Source "+e),t.addEventListener("click",function(){const r=t.closest(".lurija-msg");
13if(!r)return;const i=r.querySelector('.lurija-src[data-n="'+e+'"]');if(!i)return;try{i.scrollIntoView({behavior:"smooth",block:"nearest"})}catch{}i.classList.add("flash"),setTimeout(function(){i.classList.remove("flash")},1200);const a=i.getAttribute("href");a&&window.open(a,"_blank","noopener,noreferrer")}),t}var $l={rightarrow:"\u2192",Rightarrow:"\u21D2",longrightarrow:"\u2192",to:"\u2192",mapsto:"\u21A6",leftarrow:"\u2190",Leftarrow:"\u21D0",leftrightarrow:"\u2194",uparrow:"\u2191",downarrow:"\u2193",times:"\xD7",cdot:"\xB7",div:"\xF7",pm:"\xB1",mp:"\u2213",ast:"*",leq:"\u2264",le:"\u2264",geq:"\u2265",ge:"\u2265",neq:"\u2260",ne:"\u2260",approx:"\u2248",equiv:"\u2261",sim:"~",propto:"\u221D",infty:"\u221E",ldots:"\u2026",dots:"\u2026",cdots:"\u2026",bullet:"\u2022",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",theta:"\u03B8",lambda:"\u03BB",mu:"\xB5",pi:"\u03C0",sigma:"\u03C3",tau:"\u03C4",phi:"\u03C6",omega:"\u03C9",Delta:"\u0394",Sigma:"\u03A3",Omega:"\u03A9",Pi:"\u03A0",euro:"\u20AC",pounds:"\xA3",percent:"%",degree:"\xB0",circ:"\xB0",quad:" ",qquad:" "};function Xl(e){return!e||e.indexOf("$")<0?e:e.replace(/\$([^$\n]{0,120}?\\[a-zA-Z][^$\n]{0,120}?)\$/g,function(t,r){return r.replace(/\\([a-zA-Z]+)/g,function(i,a){return $l[a]||a}).replace(/\\([%$&_#{}])/g,"$1").replace(/[{}]/g,"").replace(/\s+/g," ").trim()})}function ft(e){e=Xl(e);for(var t=document.createDocumentFragment(),r=0;r<e.length;){var i=e.slice(r),a;if(a=/^`([^`]+)`/.exec(i)){var n=document.createElement("code");n.textContent=a[1],t.appendChild(n),r+=a[0].length;continue}if(a=/^\[ref:(\d+)\]/.exec(i)){t.appendChild(Jl(a[1])),r+=a[0].length;continue}if(a=/^\[([^\]]+)\]\(([^)\s]+)\)/.exec(i)){var o=Sn(a[2]);if(o){var l=document.createElement("a");l.href=o,l.textContent=a[1],l.target="_blank",l.rel="noopener noreferrer",t.appendChild(l)}else t.appendChild(document.createTextNode(a[1]));r+=a[0].length;continue}if(a=/^(\*\*|__)(?=\S)([\s\S]*?\S)\1/.exec(i)){var s=document.createElement("strong");s.appendChild(ft(a[2])),t.appendChild(s),r+=a[0].length;continue}if(i.charAt(0)==="*"&&(a=/^\*(?=\S)([^*]*?\S)\*(?!\*)/.exec(i))){var d=document.createElement("em");d.appendChild(ft(a[1])),t.appendChild(d),r+=a[0].length;continue}if(i.charAt(0)==="_"&&!/[A-Za-z0-9]/.test(e.charAt(r-1))&&(a=/^_(?=\S)([^_]*?\S)_(?![A-Za-z0-9])/.exec(i))){var u=document.createElement("em");u.appendChild(ft(a[1])),t.appendChild(u),r+=a[0].length;continue}if(a=/^(https?:\/\/[^\s<]+[^\s<.,;:!?)\]])/.exec(i)){var f=document.createElement("a");f.href=a[1],f.textContent=a[1],f.target="_blank",f.rel="noopener noreferrer",t.appendChild(f),r+=a[0].length;continue}var p=i.slice(1).search(/[`\[*_]|https?:\/\//),h=p===-1?i.length:p+1;t.appendChild(document.createTextNode(i.slice(0,h))),r+=h}return t}function Tn(e){return/^(-{3,}|\*{3,}|_{3,})$/.test(e.replace(/\s+/g,""))}function aa(e){var t=e.trim().replace(/^\|/,"").replace(/\|$/,"");return t.split("|").map(function(r){return r.trim()})}function Zl(e,t){var r=aa(e[t+1]).map(function(u){var f=u.charAt(0)===":",p=u.charAt(u.length-1)===":";return f&&p?"center":p?"right":f?"left":""}),i=document.createElement("table"),a=document.createElement("thead"),n=document.createElement("tr");aa(e[t]).forEach(function(u,f){var p=document.createElement("th");p.appendChild(ft(u)),r[f]&&(p.style.textAlign=r[f]),n.appendChild(p)}),a.appendChild(n),i.appendChild(a);for(var o=document.createElement("tbody"),l=t+2;l<e.length&&e[l].indexOf("|")!==-1&&e[l].trim();){var s=document.createElement("tr");
13aa(e[l]).forEach(function(u,f){var p=document.createElement("td");p.appendChild(ft(u)),r[f]&&(p.style.textAlign=r[f]),s.appendChild(p)}),o.appendChild(s),l++}i.appendChild(o);var d=document.createElement("div");return d.className="lurija-tablewrap",d.appendChild(i),[d,l]}function An(e,t,r){for(var i=/^\s*\d+\./.test(e[t]),a=document.createElement(i?"ol":"ul"),n=t;n<e.length;){var o=e[n];if(!o.trim()){var l=n+1;if(l<e.length&&/^(\s*)([-*+]|\d+\.)\s+/.test(e[l])&&e[l].match(/^(\s*)/)[1].length>=r){n++;continue}break}var s=o.match(/^(\s*)([-*+]|\d+\.)\s+([\s\S]*)$/);if(!s){var d=o.match(/^(\s*)/)[1].length;if(d>r&&a.lastChild){a.lastChild.appendChild(document.createTextNode(" ")),a.lastChild.appendChild(ft(o.trim())),n++;continue}break}var u=s[1].length;if(u<r)break;if(u>r){var f=An(e,n,u),p=a.lastChild;p||(p=document.createElement("li"),a.appendChild(p)),p.appendChild(f[0]),n=f[1];continue}var h=document.createElement("li");h.appendChild(ft(s[3])),a.appendChild(h),n++}return[a,n]}var Er={PVN:{full:"Pievienot\u0101s v\u0113rt\u012Bbas nodoklis",t:{en:"Value-added tax (VAT)",ru:"\u041D\u0430\u043B\u043E\u0433 \u043D\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C (\u041D\u0414\u0421)"}},IIN:{full:"Iedz\u012Bvot\u0101ju ien\u0101kuma nodoklis",t:{en:"Personal income tax",ru:"\u041F\u043E\u0434\u043E\u0445\u043E\u0434\u043D\u044B\u0439 \u043D\u0430\u043B\u043E\u0433 \u0441 \u043D\u0430\u0441\u0435\u043B\u0435\u043D\u0438\u044F"}},UIN:{full:"Uz\u0146\u0113mumu ien\u0101kuma nodoklis",t:{en:"Corporate income tax",ru:"\u041F\u043E\u0434\u043E\u0445\u043E\u0434\u043D\u044B\u0439 \u043D\u0430\u043B\u043E\u0433 \u0441 \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0439"}},VSAOI:{full:"Valsts soci\u0101l\u0101s apdro\u0161in\u0101\u0161anas oblig\u0101t\u0101s iemaksas",t:{en:"Mandatory state social insurance contributions",ru:"\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u0437\u043D\u043E\u0441\u044B \u0433\u043E\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E \u0441\u043E\u0446\u0438\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u044F"}},MUN:{full:"Mikrouz\u0146\u0113mumu nodoklis",t:{en:"Micro-enterprise tax",ru:"\u041D\u0430\u043B\u043E\u0433 \u0441 \u043C\u0438\u043A\u0440\u043E\u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0439"}},N\u012AN:{full:"Nekustam\u0101 \u012Bpa\u0161uma nodoklis",t:{en:"Real-estate tax",ru:"\u041D\u0430\u043B\u043E\u0433 \u043D\u0430 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u044C"}},DRN:{full:"Dabas resursu nodoklis",t:{en:"Natural-resources tax",ru:"\u041D\u0430\u043B\u043E\u0433 \u043D\u0430 \u043F\u0440\u0438\u0440\u043E\u0434\u043D\u044B\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044B"}},SIA:{full:"Sabiedr\u012Bba ar ierobe\u017Eotu atbild\u012Bbu",t:{en:"Limited liability company",ru:"\u041E\u0431\u0449\u0435\u0441\u0442\u0432\u043E \u0441 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u0439 \u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0441\u0442\u044C\u044E"}},IK:{full:"Individu\u0101lais komersants",t:{en:"Sole trader / individual merchant",ru:"\u0418\u043D\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043B\u044C\u043D\u044B\u0439 \u043A\u043E\u043C\u043C\u0435\u0440\u0441\u0430\u043D\u0442"}},VID:{full:"Valsts ie\u0146\u0113mumu dienests",t:{en:"State Revenue Service",ru:"\u0421\u043B\u0443\u0436\u0431\u0430 \u0433\u043E\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0445 \u0434\u043E\u0445\u043E\u0434\u043E\u0432"}},EDS:{full:"Elektronisk\u0101s deklar\u0113\u0161anas sist\u0113ma",t:{en:"Electronic Declaration System",ru:"\u0421\u0438\u0441\u0442\u0435\u043C\u0430 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0433\u043E \u0434\u0435\u043A\u043B\u0430\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F"}},Pa\u0161nodarbin\u0101tais:{full:"",t:{en:"Self-employed person",ru:"\u0421\u0430\u043C\u043E\u0437\u0430\u043D\u044F\u0442\u043E\u0435 \u043B\u0438\u0446\u043E"}},"Saimniecisk\u0101 darb\u012Bba":{full:"Saimniecisk\u0101 darb\u012Bba",t:{en:"Economic activity",ru:"\u0425\u043E\u0437\u044F\u0439\u0441\u0442\u0432\u0435\u043D\u043D\u0430\u044F \u0434\u0435\u044F\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C"},pat:"saimniecisk[a-z\u0101\u010D\u0113\u0123\u012B\u0137\u013C\u0146\u0161\u016B\u017E]*\\
13s+darb\u012Bb[a-z\u0101\u010D\u0113\u0123\u012B\u0137\u013C\u0146\u0161\u016B\u017E]*"},"MVU re\u017E\u012Bms":{full:"Mazo un vid\u0113jo uz\u0146\u0113mumu PVN re\u017E\u012Bms",t:{en:"Special VAT regime for small/medium enterprises",ru:"\u041E\u0441\u043E\u0431\u044B\u0439 \u0440\u0435\u0436\u0438\u043C PVN \u0434\u043B\u044F \u043C\u0430\u043B\u044B\u0445 \u0438 \u0441\u0440\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0439"},pat:"MVU\\s+re\u017E\u012Bm[a-z\u0101\u010D\u0113\u0123\u012B\u0137\u013C\u0146\u0161\u016B\u017E]*"},"MK noteikumi":{full:"Ministru kabineta noteikumi",t:{en:"Cabinet of Ministers regulations",ru:"\u041F\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u041A\u0430\u0431\u0438\u043D\u0435\u0442\u0430 \u043C\u0438\u043D\u0438\u0441\u0442\u0440\u043E\u0432"},pat:"MK\\s+noteikum[a-z\u0101\u010D\u0113\u0123\u012B\u0137\u013C\u0146\u0161\u016B\u017E]*"},Komerclikums:{full:"Komerclikums",t:{en:"Commercial Law (Latvia)",ru:"\u
13041A\u043E\u043C\u043C\u0435\u0440\u0447\u0435\u0441\u043A\u0438\u0439 \u0437\u0430\u043A\u043E\u043D \u041B\u0430\u0442\u0432\u0438\u0438"}},"Likumi.lv":{full:"likumi.lv \u2014 ofici\u0101l\u0101 normat\u012Bvo aktu datub\u0101ze",t:{en:"likumi.lv \u2014 Latvia's official statutes database",ru:"likumi.lv \u2014 \u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u0430\u044F \u0431\u0430\u0437\u0430 \u043D\u043E\u0440\u043C\u0430\u0442\u0438\u0432\u043D\u044B\u0445 \u0430\u043A\u0442\u043E\u0432 \u041B\u0430\u0442\u0432\u0438\u0438"}}},na=Object.keys(Er).sort(function(e,t){var r=Er[e].pat||e,i=Er[t].pat||t;return i.length-r.length});function Ql(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Mn=new RegExp(na.map(function(e){var t=Er[e].pat||Ql(e);return"("+t+")"}).join("|"),"gi");function es(e){for(var t=0;t<na.length;t++)if(e[t+1]!=null)return na[t];return null}function Nn(e){if(!e)return!1;try{return/[\p{L}]/u.test(e)}catch{return/[A-Za-zÄÄÄĢĪĶĻŠŠŪŽÄÄÄģīķļÅšūž]/.test(e)}}function Xr(e){var t=e.querySelector(".lurija-term-pop");if(t){var r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,o=6,l=Math.max(8,Math.min(r.left,a-i.width-8)),s=r.top-i.height-o;s<8&&(s=Math.min(r.bottom+o,n-i.height-8)),t.style.left=l+"px",t.style.top=s+"px"}}function ts(e,t,r){var i=Er[e];if(!i)return null;var a=r||e,n=document.createElement("span");n.className="lurija-term",n.tabIndex=0,n.appendChild(document.createTextNode(a));var o=[];i.full&&i.full!==a&&o.push(i.full);var l=t!=="lv"?i.t&&(i.t[t]||i.t[ae]||i.t.en):null;if(l&&o.push(l),!o.length)return null;var s=document.createElement("span");return s.className="lurija-term-pop",s.textContent=o.join(" \u2014 "),n.appendChild(s),n.addEventListener("mouseenter",function(){Xr(n)}),n.addEventListener("focus",function(){Xr(n)}),n.addEventListener("click",function(d){d.stopPropagation();for(var u=n.classList.contains("open"),f=document.querySelectorAll(".lurija-term.open"),p=0;p<f.length;p++)f[p].classList.remove("open");u||(n.classList.add("open"),Xr(n))}),n}function oa(){for(var e=document.querySelectorAll(".lurija-term"),t=0;t<e.length;t++){var r=e[t],i=r.classList.contains("open");try{i=i||r.matches(":hover")}catch{}i&&Xr(r)}}function rs(e,t){var r=e.nodeValue;if(r){Mn.lastIndex=0;for(var i,a=[];i=Mn.exec(r);){var n=i.index,o=n+i[0].length,l=n>0?r.charAt(n-1):"",s=o<r.length?r.charAt(o):"";if(!(Nn(l)||Nn(s))){var d=es(i);d&&a.push({start:n,end:o,term:i[0],canon:d})}}if(a.length){for(var u=document.createDocumentFragment(),f=0,p=0;p<a.length;p++){var h=a[p];if(!(h.start<f)){h.start>f&&u.appendChild(document.createTextNode(r.slice(f,h.start)));var L=ts(h.canon,t,h.term);u.appendChild(L||document.createTextNode(h.term)),f=h.end}}f<r.length&&u.appendChild(document.createTextNode(r.slice(f))),e.parentNode.replaceChild(u,e)}}}var zn=!1;function Lr(e,t){if(e){var r=t||ae;zn||(zn=!0,document.addEventListener("click",function(){for(var d=document.querySelectorAll(".lurija-term.open"),u=0;u<d.length;u++)d[u].classList.remove("open")}));for(var i=[],a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),n;n=a.nextNode();){var o=n.parentNode;if(o){var l=(o.nodeName||"").toLowerCase();l==="a"||l==="code"||l==="pre"||o.classList&&(o.classList.contains("lurija-term")||o.classList.contains("lurija-term-pop"))||i.push(n)}}for(var s=0;s<i.length;s++)rs(i[s],r)}}function la(e,t,r,i){for(e&&e.classList&&e.classList.remove("lurija-msg--pending");e.firstChild;)e.removeChild(e.firstChild);if(t){for(var a=Gl(t,i),n=a.sources,o=a.cleaned.split(` 14`),l=0;l<o.length;){var s=o[l];if(!s.trim()){l++;continue}var d=s.match(/^(#{1,6})\s+([\s\S]*)$/);if(d){var u=document.createElement("h"+d[1].length);u.appendChild(ft(d[2].trim())),e.appendChild(u),l++;continue}if(Tn(s)){e.appendChild(document.createElement("hr")),l++;continue}if(s.trim().slice(0,3)==="```"){var f=document.createElement("pre"),p=document.createElement("code");l++;for(var h=[];l<o.length&&o[l].trim().slice(0,3)!=="```";)h.push(o[l]),l++;p.textContent=h.join(` 15`),f.appendChild(p),e.appendChild(f),l++;continue}if(/^\s*>\s?/.test(s)){for(var L=document.createElement("blockquote"),M=[];l<o.length&&/^\s*>\s?/.test(o[l]);)M.push(o[l].replace(/^\s*>\s?/,"")),l++;L.appendChild(ft(M.join(" "))),e.appendChild(L);continue}var x=o[l+1]||"";if(s.indexOf("|")!==-1&&/^[\s|:\-]+$/.test(x)&&x.indexOf("-")!==-1&&x.indexOf("|")!==-1){var T=Zl(o,l);e.appendChild(T[0]),l=T[1];continue}if(/^(\s*)([-*+]|\d+\.)\s+/.test(s)){var j=An(o,l,s.match(/^(\s*)/)[1].length);e.appendChild(j[0]),l=j[1];continue}for(var w=[];l<o.length&&o[l].trim()&&!/^#{1,6}\s+/.test(o[l])&&o[l].trim().slice(0,3)!=="```"&&!/^\s*>\s?/.test(o[l])&&!/^(\s*)([-*+]|\d+\.)\s+/.test(o[l])&&!Tn(o[l]);)w.push(o[l]),l++;if(w.length){for(var _=document.createElement("p"),A=0;A<w.length;A++){var K=w[A],R=/ {2,}$/.test(K);_.appendChild(ft(K.trim())),A<w.length-1&&_.appendChild(R?document.createElement("br"):document.createTextNode(" "))}e.appendChild(_)}}!i&&n.length&&e.appendChild(ia(n,r))}}function Le(e){if(e){var t=e.parentNode;!t||!t.classList||!t.classList.contains("lurija-msgs-wrap")||(t.classList.toggle("at-top",e.scrollTop<=0),t.classList.toggle("at-bottom",e.scrollHeight-e.scrollTop-e.clientHeight<=1))}}const is='#lurija-root{--ink:#1A1D27;--ink2:#98999D;--ink3:#BBBCBF;--line:#EAEAEB;--line2:#D1D2D4;--bg:#fff;--bg-soft:#F8F8F8;--blue:#3C8DEA;--blue-hover:#1667C4;--blue-soft:#80B9FB;--blue-chip:#E3F0FF;--blue-banner:#C7E0FD;--tag-law:#C7E0FD;--tag-support:#E7D7FF;--tag-docs:#F6E4BB;--tag-income:#C9EBD3;--tag-expense:#F8D5DC;--tag-entity:#E3E5E9;--avatar-grad:linear-gradient(135deg,#F6E4BB 0%,#FB946D 50%,#3C8DEA 100%);--shadow-chat:0 12px 24px 0 rgba(26,29,39,.08),0 6px 12px 0 rgba(26,29,39,.04);--shadow-glass:0 4px 12px 0 rgba(26,29,39,.08),0 2px 6px 0 rgba(26,29,39,.04);--shadow-float:0 24px 56px -8px rgba(26,29,39,.3),0 10px 24px -8px rgba(26,29,39,.18);--font:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-text-size-adjust:100%;text-size-adjust:100%;letter-spacing:normal;word-spacing:normal}#lurija-root,#lurija-root *,#lurija-root *:before,#lurija-root *:after{box-sizing:border-box}#lurija-root *,#lurija-root *:before,#lurija-root *:after{letter-spacing:inherit;word-spacing:inherit;text-transform:none}#lurija-root button{font-family:var(--font);cursor:pointer;border:0;background:transparent;color:inherit}#lurija-root textarea,#lurija-root input{font-family:var(--font);color:inherit}#lurija-root .lurija-launcher{position:fixed;bottom:75px;right:38px;z-index:99998;height:68px;border-radius:34px;background:#ffffffd9;
15backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);box-shadow:var(--shadow-float);border:1px solid rgba(0,0,0,.04);padding:10px 22px 10px 10px;display:inline-flex;align-items:center;gap:12px;font-family:var(--font);color:var(--ink)}#lurija-root .lurija-launcher.hidden{display:none}@media (max-width:768px){#lurija-root .lurija-launcher{right:20px}}#lurija-root .lurija-launcher--unread:after{content:"";position:absolute;top:2px;right:6px;width:12px;height:12px;border-radius:999px;background:#ef4444;border:2px solid #fff;box-shadow:0 1px 3px #00000040}#lurija-root .lurija-launcher.lurija-launcher-in{animation:lurija-launcher-in .6s cubic-bezier(.22,1,.36,1) both}@media (prefers-reduced-motion: reduce){#lurija-root .lurija-launcher.lurija-launcher-in{animation:none}}#lurija-root .lurija-launcher-av{position:relative;display:inline-flex;border-radius:999px}#lurija-root .lurija-launcher-av .lurija-avatar{position:relative;z-index:1}#lurija-root .lurija-launcher-av:before{content:"";position:absolute;inset:0;z-index:0;border-radius:999px;pointer-events:none;background:linear-gradient(225.44deg,#f6e4bb 4.86%,#fb946d 49.22%,#3c8dea 94.44%);filter:blur(3px);animation:lurija-launcher-glow 3s ease-in-out infinite}@media (prefers-reduced-motion: reduce){#lurija-root .lurija-launcher-av:before{animation:none;opacity:0}}#lurija-root .lurija-panel{position:fixed;bottom:24px;right:24px;z-index:99999;width:400px;max-width:calc(100vw - 32px);min-height:460px;max-height:calc(100vh - 64px);background:#fff;border-radius:28px;overflow:hidden;box-shadow:var(--shadow-float);transform-origin:bottom right;display:none;flex-direction:column;font-family:var(--font);color:var(--ink)}#lurija-root .lurija-panel.open{display:flex;animation:lurija-pop .26s cubic-bezier(.2,.7,.3,1)}#lurija-root .lurija-panel.open.closing{animation:lurija-pop-out .2s cubic-bezier(.4,0,1,1) forwards}@media (max-width:767px){#lurija-root .lurija-panel{top:auto;left:8px;right:8px;bottom:var(--lurija-bottom, 8px);width:auto;max-width:none;min-height:60vh;min-height:min(66dvh,calc(100dvh - 64px - var(--lurija-bottom, 8px)));max-height:calc(100vh - 64px - var(--lurija-bottom, 8px));max-height:calc(100dvh - 64px - var(--lurija-bottom, 8px));border-radius:20px;transform-origin:bottom center}#lurija-root .lurija-panel.lurija-panel--kb{transition:max-height .28s ease,min-height .28s ease,bottom .28s ease}#lurija-root .lurija-panel .lurija-col-bottom{position:absolute}#lurija-root .lurija-panel.lurija-panel--welcome .lurija-col-bottom{position:static;background:var(--bg)}#lurija-root .lurija-welcome{gap:9px;padding:2px 0}#lurija-root .lurija-welcome>.lurija-lurija{width:76px!important;height:76px!important}#lurija-root .lurija-welcome-head{gap:4px}#lurija-root .lurija-welcome-title{font-size:18px;line-height:22px}#lurija-root .lurija-chips--welcome{margin-bottom:2px}#lurija-root .lurija-chip{height:30px;padding:6px 14px}}@media (hover: none) and (pointer: coarse){#lurija-root .lurija-input,#lurija-root .lurija-closure-input,#lurija-root .ikw-wizard-input{font-size:16px!important}}#lurija-root.lurija-large{display:block;width:100%;font-family:var(--font);color:var(--ink)}#lurija-root .lurija-stage{width:100%;min-height:100%;background:linear-gradient(180deg,#fff,#f8f8f8);padding:64px 24px;display:flex;justify-content:center;align-items:stretch}#lurija-root .lurija-card{width:min(796px,100%);min-height:520px;max-height:calc(100vh - 128px);border-radius:32px;background:#fff;box-shadow:none;overflow:hidden;display:flex;flex-direction:column}@media (max-width:560px){#lurija-root .lurija-stage{padding:0;align-items:stretch;background:#fff}#lurija-root .lurija-card{width:100%;border-radius:0;min-height:100vh;min-height:100dvh;max-height:100vh;max-height:100dvh}#lurija-root .lurija-card .lurija-col-top{padding:16px}#lurija-root .lurija-card .lurija-messages{padding:12px 16px}#lurija-root .lurija-card .lurija-col-bottom{padding:8px 16px 16px;align-items:stretch}#lurija-root .lurija-card.lurija-panel--welcome .lurija-col-bottom{position:static;background:var(--bg)}#lurija-root .lurija-card .lurija-bar{width:100%;box-sizing:border-box}#lurija-root .lurija-card .lurija-bar-row{width:100%}#lurija-root .lurija-card .lurija-bar-row .lurija-input{flex:1 1 auto;width:100%;min-width:0;max-width:100%;box-sizing:border-box}}#lurija-root .lurija-col{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;background:#fff}#lurija-root .lurija-col-top{position:absolute;top:0;left:0;right:0;z-index:5;padding:12px;pointer-events:none}#lurija-root .lurija-col-top .lurija-close{pointer-events:auto}#lurija-root .lurija-col-bottom{position:absolute;
15left:0;right:0;bottom:0;z-index:4;padding:8px 20px 16px;display:flex;flex-direction:column;gap:8px;align-items:stretch;pointer-events:none;background:linear-gradient(to bottom,rgba(255,255,255,0) var(--fade-top, 0px),var(--bg) var(--fade-bottom, 100%))}#lurija-root .lurija-col-bottom .lurija-bar,#lurija-root .lurija-col-bottom .lurija-doc-pills,#lurija-root .lurija-col-bottom .lurija-consent-row,#lurija-root .lurija-col-bottom .lurija-disclaimer a{pointer-events:auto}@media (min-width:561px){#lurija-root .lurija-card .lurija-col-top{padding:24px 32px 16px}#lurija-root .lurija-card .lurija-col-bottom{padding:16px 64px 32px}}#lurija-root .lurija-topbar{display:flex;justify-content:flex-end;align-items:center;gap:8px}#lurija-root .lurija-glass{background:#ffffffb3;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);box-shadow:var(--shadow-glass);transform:translateZ(0)}#lurija-root .lurija-namecol{display:flex;flex-direction:column;align-items:flex-start;gap:4px;line-height:1;text-align:left}#lurija-root .lurija-name{font-size:12px;line-height:1;color:#000;display:inline-flex;align-items:center;gap:5px}#lurija-root .lurija-close{width:36px;height:36px;border-radius:24px;display:inline-flex;align-items:center;justify-content:center;background:#ffffffb3;
15backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);box-shadow:var(--shadow-glass);color:var(--ink2);flex-shrink:0;transform:translateZ(0);transition:color .15s ease,background-color .15s ease}#lurija-root .lurija-close:hover{background:#fff;color:var(--ink)}#lurija-root .lurija-avatar{position:relative;border-radius:999px;flex-shrink:0;overflow:hidden;isolation:isolate}#lurija-root .lurija-avatar-img{position:absolute;inset:0;border-radius:999px;background-position:center;background-size:cover;background-repeat:no-repeat;z-index:2}#lurija-root .lurija-avatar.gradient .lurija-avatar-img{inset:9%}#lurija-root .lurija-avatar .blob{position:absolute;inset:0;border-radius:999px;background:var(--avatar-grad);filter:blur(2px);animation:lurija-shimmer 6s ease-in-out infinite}#lurija-root .lurija-avatar .blob:nth-child(2){transform:rotate(120deg) scale(.94);mix-blend-mode:screen;filter:blur(3px);opacity:.9;animation-delay:-2s;animation-duration:7.5s}#lurija-root .lurija-avatar .blob:nth-child(3){transform:rotate(-90deg) scale(.88);mix-blend-mode:multiply;filter:blur(4px);opacity:.85;animation-delay:-4s;animation-duration:9s}#lurija-root .lurija-msgs-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}#lurija-root .lurija-msgs-wrap:before,#lurija-root .lurija-msgs-wrap:after{content:"";position:absolute;left:0;right:0;pointer-events:none;z-index:3;opacity:1;transition:opacity .15s ease}#lurija-root .lurija-msgs-wrap:before{top:0;height:48px;background:linear-gradient(to bottom,var(--bg),rgba(255,255,255,0))}#lurija-root .lurija-msgs-wrap:after{display:none}#lurija-root .lurija-msgs-wrap.at-top:before{opacity:0}#lurija-root .lurija-msgs-wrap.at-bottom:after{opacity:0}#lurija-root .lurija-messages{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:8px 20px;display:flex;flex-direction:column;gap:18px;-webkit-user-select:none;user-select:none}#lurija-root .lurija-tail-spacer{flex:0 0 auto;pointer-events:none;margin-top:-18px}#lurija-root .lurija-messages input,#lurija-root .lurija-messages textarea{-webkit-user-select:text;user-select:text}@media (min-width:561px){#lurija-root .lurija-card .lurija-messages{padding:20px 64px;gap:24px}}#lurija-root .lurija-msg{animation:lurija-msgin .28s cubic-bezier(.2,.7,.3,1)}#lurija-root .lurija-msg.user{align-self:flex-end;max-width:85%;background:#fff;border-radius:12px;padding:12px;font-size:15px;line-height:22px;letter-spacing:-.01em;color:var(--ink);box-shadow:0 1px 2px #1a1d270f;border:1px solid var(--line);white-space:pre-wrap;word-break:break-word}#lurija-root .lurija-msg.assistant{align-self:stretch;min-width:0;max-width:100%;font-size:15px;line-height:22px;letter-spacing:-.01em;color:var(--ink);word-break:break-word}#lurija-root .lurija-msg.assistant>:first-child{margin-top:0}#lurija-root .lurija-msg.assistant>:last-child{margin-bottom:0}#lurija-root .lurija-msg.assistant p{margin:0 0 12px}#lurija-root .lurija-msg.assistant ul,#lurija-root .lurija-msg.assistant ol{margin:0 0 12px}#lurija-root .lurija-msg.assistant li+li{margin-top:4px}#lurija-root .lurija-msg.assistant p:last-child{margin-bottom:0}#lurija-root .lurija-msg.assistant h1,#lurija-root .lurija-msg.assistant h2,#lurija-root .lurija-msg.assistant h3,#lurija-root .lurija-msg.assistant h4,#lurija-root .lurija-msg.assistant h5,#lurija-root .lurija-msg.assistant h6{font-weight:700;margin:.6em 0 .2em;line-height:1.3;font-family:inherit;color:inherit}#lurija-root .lurija-msg.assistant h1{font-size:1.13em}#lurija-root .lurija-msg.assistant h2{font-size:1.07em}#lurija-root .lurija-msg.assistant h3{font-size:1em}#lurija-root .lurija-msg.assistant h4,#lurija-root .lurija-msg.assistant h5,#lurija-root .lurija-msg.assistant h6{font-size:.95em}#lurija-root .lurija-msg.assistant ul,#lurija-root .lurija-msg.assistant ol{margin:6px 0;padding-left:20px}#lurija-root .lurija-msg.assistant ul ul,#lurija-root .lurija-msg.assistant ul ol,#lurija-root .lurija-msg.assistant ol ul,#lurija-root .lurija-msg.assistant ol ol,#lurija-root .lurija-msg.assistant li{margin:2px 0}#lurija-root .lurija-msg.assistant strong{font-weight:700}#lurija-root .lurija-msg.assistant em{font-style:italic}#lurija-root .lurija-msg.assistant blockquote{margin:6px 0;padding:.15rem .8rem;border-left:3px solid var(--line2);color:var(--ink2)}#lurija-root .lurija-msg.assistant hr{border:0;border-top:1px solid var(--line);margin:.6rem 0}#lurija-root .lurija-msg.assistant .lurija-tablewrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;margin:6px 0}#lurija-root .lurija-valtable{margin:4px 0 12px;font-size:13px}#lurija-root .lurija-valtable-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px}#lurija-root .lurija-valtable-score{color:var(--ink2);font-size:12px}#lurija-root .lurija-valtable-wrap{max-width:100%;overflow-x:auto}#lurija-root .lurija-valtable table{width:100%;border-collapse:collapse;font-size:13px}#lurija-root .lurija-valtable th,#lurija-root .lurija-valtable td{border:1px solid var(--line2);padding:5px 8px;text-align:left;vertical-align:top;min-width:0}#lurija-root .lurija-valtable th,#lurija-root .lurija-valtable tr.lurija-valtable-group td{background:var(--bg-soft);font-weight:600}#lurija-root .lurija-valtable-gname{margin-right:8px}#lurija-root .lurija-valtable tr.lurija-valtable-row>td:first-child{border-left:3px solid transparent}#lurija-root .lurija-valtable tr.lurija-valtable-row.lurija-val--ok>td:first-child{border-left-color:#10b981}#lurija-root .lurija-valtable tr.lurija-valtable-row.lurija-val--warning>td:first-child{border-left-color:#f59e0b}#lurija-root .lurija-valtable tr.lurija-valtable-row.lurija-val--error>td:first-child{border-left-color:#ef4444}#lurija-root .lurija-valtable tr.lurija-valtable-row.lurija-val--skipped{color:var(--ink3)}
15#lurija-root .lurija-valtable-note{color:var(--ink2);font-size:12px}#lurija-root .lurija-val-pill,#lurija-root .lurija-val-badge{display:inline-block;padding:1px 9px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap;line-height:18px}#lurija-root .lurija-val-badge{font-size:13px;padding:2px 10px}#lurija-root .lurija-val--ok.lurija-val-pill,#lurija-root .lurija-val--ok.lurija-val-badge,#lurija-root .lurija-val--ok .lurija-val-pill{background:#d1fae5;color:#065f46}#lurija-root .lurija-val--warning.lurija-val-pill,#lurija-root .lurija-val--warning.lurija-val-badge,#lurija-root .lurija-val--warning .lurija-val-pill{background:#fef3c7;color:#92400e}#lurija-root .lurija-val--error.lurija-val-pill,#lurija-root .lurija-val--error.lurija-val-badge,#lurija-root .lurija-val--error .lurija-val-pill{background:#fee2e2;color:#991b1b}#lurija-root .lurija-val--skipped.lurija-val-pill,#lurija-root .lurija-val--skipped.lurija-val-badge,#lurija-root .lurija-val--skipped .lurija-val-pill{background:#f1f5f9;color:#475569}#lurija-root .lurija-msg.assistant table{border-collapse:collapse;font-size:13px}#lurija-root .lurija-msg.assistant th,#lurija-root .lurija-msg.assistant td{border:1px solid var(--line2);padding:4px 8px;text-align:left;min-width:92px}#lurija-root .lurija-msg.assistant th{font-weight:600;background:var(--bg-soft)}#lurija-root .lurija-msg.assistant code{font-family:ui-monospace,monospace;font-size:13px;background:var(--bg-soft);border-radius:4px;padding:1px 5px}#lurija-root .lurija-msg.assistant pre{background:#1e1e2e;color:#cdd6f4;border-radius:8px;padding:.7rem .9rem;max-width:100%;overflow-x:auto;margin:6px 0}#lurija-root .lurija-msg.assistant pre code{background:none;padding:0;color:inherit;font-size:.82em}#lurija-root .lurija-msg.assistant a{color:var(--blue);text-decoration:none}#lurija-root .lurija-msg.assistant a:hover{text-decoration:underline}#lurija-root .lurija-msg-attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}#lurija-root .lurija-welcome{flex:1 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:safe center;gap:14px;text-align:center;padding:8px 0}#lurija-root .lurija-welcome-head{display:flex;flex-direction:column;gap:8px;align-items:center}#lurija-root .lurija-welcome-title{font-weight:700;font-size:20px;line-height:24px;letter-spacing:-.01em;color:var(--ink)}#lurija-root .lurija-welcome-sub{font-size:13px;line-height:18px;font-weight:600;color:var(--ink);max-width:360px}#lurija-root .lurija-welcome-body{font-size:12px;line-height:17px;color:var(--ink);max-width:380px}#lurija-root .lurija-welcome-starters-label{font-size:13px;line-height:16px;font-weight:600;color:var(--ink)}#lurija-root .lurija-chips{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;max-width:480px}#lurija-root .lurija-chips--welcome{align-self:center;margin-bottom:8px;transition:opacity .18s}#lurija-root .lurija-messages--sending .lurija-chips--welcome{opacity:.55;pointer-events:none}#lurija-root .lurija-chip{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;height:32px;border-radius:24px;background:var(--blue-chip);color:var(--ink);font-size:12px;line-height:16px;white-space:nowrap}#lurija-root .lurija-chip:hover{background:#d0e2fb}#lurija-root .lurija-lurija{position:relative;display:inline-block;flex-shrink:0;background:#fff;border-radius:50%;overflow:hidden;isolation:isolate;-webkit-mask-image:radial-gradient(circle,#000 99%,transparent 100%);mask-image:radial-gradient(circle,#000 99%,transparent 100%);transform:translateZ(0);will-change:transform}#lurija-root .lurija-lurija-fb{position:absolute;inset:0;background-size:cover;background-position:center;background-repeat:no-repeat}#lurija-root .lurija-lurija-vid{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;background:transparent;opacity:1;transition:opacity .24s ease}#lurija-root .lurija-lurija-vid.fading{opacity:0}@media (prefers-reduced-motion: reduce){#lurija-root .lurija-lurija-vid{display:none}}#lurija-root .lurija-status-slot{display:flex;align-items:center;gap:10px;padding:8px 0 0;background:var(--bg);position:relative;z-index:1;animation:lurija-msgin .42s cubic-bezier(.2,.7,.3,1)}#lurija-root .lurija-turn-avatar{display:flex;align-items:center;gap:10px;margin:10px 0 6px;background:var(--bg);position:relative;z-index:1;animation:lurija-msgin .42s cubic-bezier(.2,.7,.3,1)}#lurija-root .lurija-turn-avatar-label{flex:1;min-width:0;font-size:14px;font-weight:500;line-height:20px;color:var(--ink2);animation:lurija-label-in .42s cubic-bezier(.2,.7,.3,1)}#lurija-root .lurija-status-label{font-size:14px;line-height:20px;color:var(--ink);font-weight:500;animation:lurija-label-in .42s cubic-bezier(.2,.7,.3,1)}#lurija-root .lurija-status-label .lurija-flw{display:inline-block;white-space:nowrap}#lurija-root .lurija-status-label .lurija-fl{display:inline-block;will-change:opacity;animation:lurija-fl-shine 1.8s ease-in-out var(--fsd,0s) infinite}@keyframes lurija-fl-shine{0%,to{opacity:.42}45%{opacity:1}}#lurija-root .lurija-msg.lurija-msg--pending{display:none}#lurija-root .lurija-doc-pills{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;padding:4px 6px 0;-webkit-overflow-scrolling:touch}#lurija-root .lurija-doc-pills:empty{display:none}#lurija-root .lurija-bar{display:flex;flex-direction:column;gap:4px;border-radius:24px;padding:4px}#lurija-root .lurija-bar-row{display:flex;gap:8px;align-items:flex-end;min-height:44px;padding-left:6px}#lurija-root .lurija-attach{width:28px;height:28px;margin-bottom:6px;flex-shrink:0;color:var(--ink);display:inline-flex;align-items:center;justify-content:center}#lurija-root .lurija-attach:hover{color:var(--blue)}#lurija-root .lurija-mic{width:36px;height:36px;margin-bottom:4px;border-radius:24px;background:transparent;flex-shrink:0;color:var(--ink);display:inline-flex;align-items:center;justify-content:center}#lurija-root .lurija-mic:hover{color:var(--blue)}#lurija-root .lurija-mic{position:relative}#lurija-root .lurija-mic--rec,#lurija-root .lurija-mic--rec:hover{color:var(--ink)}#lurija-root .lurija-mic--busy{pointer-events:none}#lurija-root .lurija-mic--busy svg{opacity:.4}#lurija-root .lurija-mic--busy:after{content:"";position:absolute;inset:-5px;border-radius:50%;border:2px solid color-mix(in srgb,var(--blue) 22%,transparent);border-top-color:var(--blue);animation:lurija-mic-spin .8s linear infinite}@keyframes lurija-mic-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){#lurija-root .lurija-mic--busy:after{animation:none}}#lurija-root .lurija-bar--voice .lurija-mic--busy{transform:scale(1)}#lurija-root .lurija-voice-halo{position:absolute;width:36px;height:36px;border-radius:50%;background:color-mix(in srgb,var(--blue) 15%,transparent);border:1.5px solid color-mix(in srgb,var(--blue) 26%,transparent);pointer-events:none;z-index:6;transform:translate(-50%,-50%);will-change:transform}#lurija-root .lurija-bar-row .lurija-attach,#lurija-root .lurija-bar-row .lurija-send{transition:width .28s ease,min-width .28s ease,opacity .18s ease,margin .28s ease,padding .28s ease}#lurija-root .lurija-bar-row .lurija-input{max-width:100%;transition:max-width .28s ease,opacity .18s ease,padding .28s ease}#lurija-root .lurija-bar--voice .lurija-attach,#lurija-root .lurija-bar--voice .lurija-send{width:0;min-width:0;opacity:0;margin-left:0;margin-right:0;padding:0;overflow:hidden;pointer-events:none}#lurija-root .lurija-bar--voice .lurija-input{max-width:0;opacity:0;padding-left:0;padding-right:0;pointer-events:none}#lurija-root .lurija-bar--voice .lurija-bar-row{justify-content:center}@media (prefers-reduced-motion: reduce){#lurija-root .lurija-bar-row .lurija-attach,#lurija-root .lurija-bar-row .lurija-send,#lurija-root .lurija-bar-row .lurija-input{transition:none}}#lurija-root .lurija-input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:15px;line-height:22px;letter-spacing:-.01em;color:var(--ink);padding:11px 0;min-height:44px;max-height:120px;overflow-y:auto;resize:none}#lurija-root .lurija-input::placeholder{color:var(--ink3)}#lurija-root .lurija-send{margin-bottom:4px;width:36px;height:36px;border-radius:24px;background:var(--blue);color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:4px;flex-shrink:0}#lurija-root .lurija-send:hover{background:var(--blue-hover)}#lurija-root .lurija-send:disabled{background:var(--ink3);cursor:not-allowed}#lurija-root .lurija-send--label{width:auto;padding:0 14px 0 16px}#lurija-root .lurija-send-txt{font-size:12px;line-height:16px;font-weight:500;color:#fff}#lurija-root .lurija-disclaimer{font-weight:400;font-size:11px;line-height:13px;letter-spacing:-.01em;color:var(--ink2);text-align:center}#lurija-root .lurija-disclaimer a{color:var(--blue);text-decoration:underline}#lurija-root .lurija-disclaimer a:hover{color:var(--blue-hover)}#lurija-root .lurija-ref{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;min-width:18px;height:18px;padding:0 6px;margin:0 2px;border-radius:4px;background:var(--blue-chip);color:var(--blue);font-size:11px;font-weight:500;line-height:1;letter-spacing:-.01em;border:0;cursor:pointer;transition:background .12s,color .12s}#lurija-root .lurija-ref:hover{background:var(--blue);color:#fff}#lurija-root .lurija-sources{margin-top:12px;display:flex;flex-direction:column;gap:6px}#lurija-root .lurija-sources-label{font-size:9px;line-height:11px;font-weight:500;letter-spacing:.01em;color:var(--ink2)}#lurija-root .lurija-sources-row{display:flex;flex-wrap:wrap;gap:4px}#lurija-root .lurija-src{display:inline-flex;align-items:center;gap:6px;height:25px;padding:6px 10px 6px 8px;border-radius:6px;background:var(--blue-chip);text-decoration:none;font-size:11px;font-weight:500;line-height:13px;letter-spacing:-.01em;cursor:pointer;transition:background .12s;max-width:260px}#lurija-root .lurija-src:hover{background:#abd1fc}#lurija-root .lurija-src.flash{background:#abd1fc;box-shadow:0 0 0 2px var(--blue)}#lurija-root .lurija-src-n{color:var(--ink2);font-weight:500;flex-shrink:0}#lurija-root .lurija-src-t{color:var(--blue);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#lurija-root .lurija-followups{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin-top:18px;padding-top:0;border-top:0}#lurija-root .lurija-followup-pill{display:inline-block;max-width:100%;padding:10px 18px;border-radius:999px;border:0;background:var(--blue-chip);color:var(--ink);font-size:13px;line-height:18px;text-align:left;cursor:pointer}#lurija-root .lurija-followup-pill:hover{background:#d0e2fb}#lurija-root .lurija-closure{margin-top:12px;padding:14px;border-radius:16px;background:var(--blue-chip);border:1px solid var(--blue-soft);display:flex;flex-direction:column;gap:10px}#lurija-root .lurija-closure-prompt{font-size:13px;font-weight:600;color:var(--ink)}
15#lurija-root .lurija-closure-btns{display:flex;flex-direction:column;gap:6px}#lurija-root .lurija-closure-btn{display:block;width:100%;padding:9px 14px;border-radius:12px;border:1px solid var(--blue-soft);background:#fff;color:var(--ink);font-size:13px;line-height:18px;text-align:left;cursor:pointer}#lurija-root .lurija-closure-btn:hover{background:#d0e2fb}#lurija-root .lurija-closure-email{display:flex;gap:6px}#lurija-root .lurija-closure-input{flex:1;padding:9px 12px;border-radius:12px;border:1px solid var(--blue-soft);background:#fff;font-size:13px}#lurija-root .lurija-closure-submit{width:auto;flex-shrink:0;background:var(--blue);color:#fff;border:0}#lurija-root .lurija-closure-submit:hover{background:var(--blue);opacity:.9}#lurija-root .lurija-closure-err{color:#c0392b;font-size:12px}#lurija-root .lurija-closure-confirm{font-size:13px;line-height:18px;color:var(--ink)}#lurija-root .lurija-closure-consent{font-size:12px;line-height:16px;color:#475569}#lurija-root .lurija-consent-cb{width:15px;height:15px;margin:1px 0 0;flex-shrink:0;accent-color:var(--blue);cursor:pointer}#lurija-root .lurija-closure-consent-row{display:flex;align-items:flex-start;gap:8px}#lurija-root .lurija-closure-consent-label{font-size:12px;line-height:16px;color:var(--ink);cursor:pointer}#lurija-root .lurija-consent-row{margin-bottom:6px;padding:8px 10px;border-radius:12px;background:var(--blue-chip);border:1px solid var(--blue-soft)}#lurija-root .lurija-consent-top{display:flex;align-items:flex-start;gap:8px}#lurija-root .lurija-consent-label{font-size:12px;line-height:16px;color:var(--ink);cursor:pointer}#lurija-root .lurija-consent-label a{color:var(--blue);text-decoration:underline}#lurija-root .lurija-consent-err{margin-top:4px;color:#c0392b;font-size:12px;line-height:15px}#lurija-root .lurija-closure-clear{align-self:flex-start;margin-top:4px;padding:8px 14px;border-radius:12px;border:0;background:var(--blue);color:#fff;font-size:13px;cursor:pointer}#lurija-root .lurija-term{border-bottom:1px dashed #94a3b8;cursor:help;position:relative}#lurija-root .lurija-term-pop{position:fixed;left:0;top:0;z-index:2147483647;display:block;min-width:150px;max-width:260px;padding:8px 10px;border-radius:10px;background:#1e293b;color:#fff;font-size:12px;line-height:16px;font-weight:400;white-space:normal;text-align:left;box-shadow:0 4px 16px #0000002e;opacity:0;visibility:hidden;transition:opacity .12s;pointer-events:none}#lurija-root .lurija-term:hover .lurija-term-pop,#lurija-root .lurija-term:focus .lurija-term-pop,#lurija-root .lurija-term.open .lurija-term-pop{opacity:1;visibility:visible}#lurija-root .lurija-calc-cta{margin:20px 0;padding:14px;border-radius:16px;background:var(--blue-chip);border:1px solid var(--blue-soft)}#lurija-root .lurija-calc-title{font-size:14px;font-weight:600;color:var(--ink);margin-bottom:4px}#lurija-root .lurija-calc-howto{font-size:13px;line-height:1.45;color:var(--ink);margin-bottom:10px}#lurija-root .lurija-next-steps{margin-top:12px;padding:12px 14px;border-radius:14px;background:var(--blue-chip);border:1px solid var(--blue-soft)}#lurija-root .lurija-next-steps-label{font-size:12px;font-weight:600;color:var(--ink);text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}#lurija-root .lurija-next-steps-list{margin:0;padding-left:20px;font-size:13px;line-height:1.5;color:var(--ink)}#lurija-root .lurija-next-steps-list li{margin-bottom:4px}#lurija-root .lurija-calc-btn{display:inline-flex;align-items:center;padding:9px 16px;border:0;border-radius:24px;background:var(--blue);color:#fff;font-size:13px;font-weight:600}#lurija-root .lurija-calc-btn:hover{background:var(--blue-hover)}#lurija-root .lurija-cta-card{display:grid;grid-template-columns:1fr auto;align-items:center;column-gap:14px;row-gap:2px;margin:20px 0;padding:0;border:0;background:transparent}#lurija-root .lurija-cta-title{grid-column:1;font-size:14px;font-weight:600;color:var(--ink);margin:0}#lurija-root .lurija-cta-body{grid-column:1;font-size:13px;line-height:1.45;color:var(--ink2);margin:0}#lurija-root .lurija-cta-btn{grid-column:2;grid-row:1 / span 2;align-self:center;justify-self:end;
15display:inline-flex;align-items:center;gap:6px;padding:10px 18px;border:0;border-radius:999px;background:var(--blue);color:#fff;font-size:13px;font-weight:600;line-height:16px;cursor:pointer;white-space:nowrap}#lurija-root .lurija-cta-btn:hover{background:var(--blue-hover)}#lurija-root .lurija-cta-secondary .lurija-cta-btn{background:#fff;color:var(--blue);border:1px solid var(--blue-soft)}#lurija-root .lurija-cta-secondary .lurija-cta-btn:hover{background:var(--blue-chip)}#lurija-root .lurija-nav-card,#lurija-root .lurija-field-card{padding:0}#lurija-root .lurija-nav-card--locked{opacity:.75}#lurija-root .lurija-nav-card--locked .lurija-cta-btn{cursor:not-allowed}#lurija-root .lurija-reg-status-list{grid-column:1 / -1;list-style:none;margin:4px 0 0;padding:0}#lurija-root .lurija-reg-step{display:flex;align-items:baseline;gap:8px;font-size:13px;line-height:1.5;color:var(--ink)}#lurija-root .lurija-reg-glyph{flex:0 0 16px;width:16px;text-align:center;font-size:12px;color:var(--ink3)}#lurija-root .lurija-reg-step--done .lurija-reg-glyph{color:#10b981}#lurija-root .lurija-reg-step--current .lurija-reg-glyph{color:var(--blue)}#lurija-root .lurija-reg-step--current .lurija-reg-step-label{font-weight:600}#lurija-root .lurija-reg-step--todo{color:var(--ink2)}#lurija-root .lurija-reg-step--blocked .lurija-reg-glyph{color:#ef4444}#lurija-root .lurija-reg-doc-sub{color:var(--ink2)}#lurija-root .lurija-reg-doc-note{grid-column:1 / -1;font-size:12px;line-height:1.4;color:var(--ink2)}#lurija-root .lurija-stream-error{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px;padding:12px 14px;border-radius:14px;background:#fef2f2;border:1px solid #fecaca}#lurija-root .lurija-stream-error-ico{flex-shrink:0;color:#dc2626;display:inline-flex}#lurija-root .lurija-stream-error-msg{flex:1;min-width:0;font-size:13px;line-height:1.4;color:#b91c1c}#lurija-root .lurija-stream-error-retry{flex-shrink:0;display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid #fecaca;border-radius:10px;background:#fff;color:#b91c1c;font-size:13px;font-weight:600;cursor:pointer}#lurija-root .lurija-stream-error-retry:hover{background:#fff5f5;border-color:#f87171}#lurija-root .lurija-stream-error-retry svg{width:15px;height:15px}#lurija-root .lurija-feedback{display:flex;align-items:center;gap:6px;margin-top:10px}#lurija-root .lurija-fb-btn{width:30px;height:30px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:var(--ink2);border:1px solid var(--line);background:#fff}#lurija-root .lurija-fb-btn:hover{color:var(--blue);border-color:var(--blue-soft)}#lurija-root .lurija-fb-btn.on{color:var(--blue);border-color:var(--blue);background:var(--blue-chip)}#lurija-root .lurija-fb-btn:disabled{cursor:default}#lurija-root .lurija-fb-thanks{font-size:11px;color:var(--ink2);margin-left:4px}#lurija-root .lurija-att-card{position:relative;flex:0 0 auto;width:172px;max-width:172px;display:flex;flex-direction:column;gap:8px;padding:10px 12px;border-radius:14px;background:var(--bg-soft);border:1px solid var(--line);box-shadow:0 1px 2px #1a1d270d}#lurija-root .lurija-att-thumb{width:36px;height:36px;border-radius:999px;background:#f6e4c2;color:#9a7b3f;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}#lurija-root .lurija-att-meta{min-width:0;width:100%}#lurija-root .lurija-att-name{font-size:13px;line-height:16px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#lurija-root .lurija-att-type{font-size:11px;line-height:14px;color:var(--ink3);text-transform:uppercase;margin-top:2px}#lurija-root .lurija-att-rm{position:absolute;top:8px;right:8px;width:24px;height:24px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#ffffffeb;box-shadow:0 1px 3px #00000029;color:var(--ink)}#lurija-root .lurija-att-rm:hover{background:#fff}#lurija-root .lurija-att-rm svg{width:12px;height:12px}#lurija-root .lurija-att-card--image{width:120px;max-width:120px;height:96px;padding:0;overflow:hidden}#lurija-root .lurija-att-img{width:100%;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat}#lurija-root .lurija-att-card--uploading{opacity:.6}#lurija-root .lurija-att-card--error{width:auto;flex-direction:row;align-items:center;border-color:#fca5a5;background:#fef2f2;color:#b91c1c;font-size:12px}#lurija-root .lurija-att-card--clickable{cursor:pointer}#lurija-root .lurija-att-card--clickable:hover{border-color:var(--blue-soft)}#lurija-root .lurija-lightbox{position:fixed;inset:0;z-index:2147483646;overflow:hidden;background:#0f172ac7;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);animation:lurija-fadein .15s ease;touch-action:none}#lurija-root .lurija-lightbox-img{box-shadow:0 12px 48px #00000080;will-change:transform;user-select:none;-webkit-user-drag:none}#lurija-root .lurija-lightbox-close{position:absolute;top:14px;right:14px;z-index:1;width:40px;height:40px;border:none;border-radius:50%;background:#ffffffeb;color:#0f172a;font-size:26px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 10px #00000059}#lurija-root .lurija-lightbox-close:hover{background:#fff}#lurija-root .ikw-wizard{margin-top:.6rem}#lurija-root .ikw-answered{margin-bottom:.7rem;border-radius:12px;padding:.3rem .4rem;margin-left:-.4rem;margin-right:-.4rem;cursor:pointer;transition:background .12s}#lurija-root .ikw-answered:hover{background:var(--bg-soft)}#lurija-root .ikw-answered-q{font-size:13px;line-height:1.3;color:var(--ink2);margin:0 0 .35rem;display:flex;align-items:center;gap:.4rem}#lurija-root .ikw-answered-edit{margin-left:auto;flex-shrink:0;font-size:12px;color:var(--blue);opacity:0;transition:opacity .12s}#lurija-root .ikw-answered:hover .ikw-answered-edit,#lurija-root .ikw-answered:focus-within .ikw-answered-edit{opacity:1}#lurija-root .ikw-answered-arow{display:flex;flex-wrap:wrap;gap:6px}#lurija-root .ikw-answered-a{display:inline-block;background:var(--bg-soft);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:.45rem .8rem;font-size:13px;line-height:1.2}#lurija-root .ikw-answered-skip{color:var(--ink3);font-size:13px}#lurija-root .ikw-wizard-q{margin:0 0 .6rem;font-weight:700;font-size:15px;line-height:1.35;color:var(--ink)}#lurija-root .ikw-wizard-hint{margin:0 0 .4rem;font-size:12px;color:var(--ink2)}#lurija-root .ikw-opt{display:block;width:100%;text-align:left;padding:.7rem 1rem;border:0;border-radius:24px;background:var(--blue-chip);font-size:14px;line-height:1.2;color:var(--ink);margin-bottom:.4rem}#lurija-root .ikw-opt:hover{background:#d0e2fb}#lurija-root .ikw-opt.sel{background:var(--blue-soft);color:#fff;font-weight:500}
15#lurija-root .ikw-opt--action{display:flex;align-items:center;gap:8px}#lurija-root .ikw-opt-ico{flex:0 0 auto;display:inline-flex;align-items:center;color:var(--blue)}#lurija-root .ikw-opt.sel .ikw-opt-ico{color:#fff}#lurija-root .ikw-opt-row{display:flex;align-items:stretch;gap:6px;margin-bottom:.4rem}#lurija-root .ikw-opt-row .ikw-opt{flex:1;margin-bottom:0}#lurija-root .ikw-opt-help{flex:0 0 auto;width:44px;border:0;background:var(--blue-chip);color:var(--blue);border-radius:24px;font-weight:700;font-size:14px}#lurija-root .ikw-opt-help:hover{background:#d0e2fb}#lurija-root .ikw-opt-help.on{background:var(--blue);color:#fff}#lurija-root .ikw-opt-explain{font-size:12px;color:var(--ink);background:var(--bg-soft);border:1px solid var(--line);border-radius:12px;padding:.5rem .7rem;margin:-.1rem 0 .4rem}#lurija-root .ikw-custom-row{display:flex;align-items:center;border:1px solid var(--line2);border-radius:24px;background:#fff;overflow:hidden;margin-bottom:.4rem}#lurija-root .ikw-custom-row:focus-within{border-color:var(--blue-soft);box-shadow:0 0 0 2px var(--blue-chip)}#lurija-root .ikw-wizard-input{flex:1;padding:.7rem 1rem;border:none;font-size:14px;outline:none;background:transparent;color:var(--ink)}#lurija-root .ikw-wizard-input::placeholder{color:var(--ink3)}#lurija-root .ikw-next{padding:.4rem .9rem;background:none;border:none;color:var(--blue);font-size:16px}#lurija-root .ikw-next:disabled{opacity:.3;cursor:default}#lurija-root .ikw-skip-row{display:flex;justify-content:flex-end;align-items:center;margin-top:.3rem}#lurija-root .ikw-skip{padding:.3rem .2rem;background:none;border:none;color:var(--blue);font-weight:600;font-size:14px;display:inline-flex;align-items:center;gap:.3rem;white-space:nowrap;flex-shrink:0}#lurija-root .ikw-skip:hover{color:var(--blue-hover)}#lurija-root .ikw-skip-arr{font-size:15px}#lurija-root .ikw-confirm{padding:.55rem 1.2rem;background:var(--blue);color:#fff;border:0;border-radius:24px;font-size:14px;font-weight:500}#lurija-root .ikw-confirm:hover{background:var(--blue-hover)}#lurija-root .ikw-confirm:disabled{background:var(--ink3);cursor:not-allowed}#lurija-root,#lurija-root *{scrollbar-width:thin;scrollbar-color:var(--line2) transparent}#lurija-root ::-webkit-scrollbar{width:6px;height:6px}#lurija-root ::-webkit-scrollbar-track{background:transparent}#lurija-root ::-webkit-scrollbar-thumb{background:var(--line2);border-radius:6px}#lurija-root ::-webkit-scrollbar-thumb:hover{background:var(--ink3)}#lurija-root ::-webkit-scrollbar-corner{background:transparent}#lurija-root .lurija-panel.lurija-panel--custom{right:auto;bottom:auto;max-width:none;max-height:none;min-height:0;transform-origin:center center;transition:none}#lurija-root .lurija-panel.lurija-panel--custom.lurija-panel--anim{transition:width .28s ease,left .28s ease,height .28s ease,top .28s ease}#lurija-root .lurija-panel--moving,#lurija-root .lurija-panel--moving *{transition:none!important;user-select:none!important}#lurija-root .lurija-grip{position:absolute;top:0;left:64px;right:64px;height:24px;z-index:9;cursor:grab;pointer-events:auto;touch-action:none}#lurija-root .lurija-grip:before{content:"";position:absolute;top:7px;left:50%;width:36px;height:4px;margin-left:-18px;border-radius:2px;background:var(--line2);opacity:0;transition:opacity .15s ease}#lurija-root .lurija-panel:hover .lurija-grip:before,#lurija-root .lurija-panel--moving .lurija-grip:before{opacity:1}#lurija-root .lurija-panel--moving .lurija-grip{cursor:grabbing}#lurija-root .lurija-topbar--auth .lurija-topbar-title{cursor:grab}#lurija-root .lurija-panel--moving .lurija-topbar--auth .lurija-topbar-title{cursor:grabbing}#lurija-root .lurija-rs{position:absolute;z-index:9;pointer-events:auto;touch-action:none}#lurija-root .lurija-rs-n{top:0;left:28px;right:28px;height:6px;cursor:ns-resize}#lurija-root .lurija-rs-s{bottom:0;left:28px;right:28px;height:6px;cursor:ns-resize}#lurija-root .lurija-rs-e{top:28px;bottom:28px;right:0;width:6px;cursor:ew-resize}#lurija-root .lurija-rs-w{top:28px;bottom:28px;left:0;width:6px;cursor:ew-resize}#lurija-root .lurija-rs-nw{top:5px;left:5px;width:16px;height:16px;cursor:nwse-resize}#lurija-root .lurija-rs-ne{top:5px;right:5px;width:16px;height:16px;cursor:nesw-resize}#lurija-root .lurija-rs-sw{bottom:5px;left:5px;width:16px;height:16px;cursor:nesw-resize}#lurija-root .lurija-rs-se{bottom:5px;right:5px;width:16px;height:16px;cursor:nwse-resize}#lurija-root .lurija-auth.lurija-view-fullscreen .lurija-grip,#lurija-root .lurija-auth.lurija-view-fullscreen .lurija-rs{display:none}#lurija-root .lurija-auth.lurija-view-fullscreen .lurija-topbar--auth .lurija-topbar-title{cursor:default}@media (max-width:767px),(hover:none) and (pointer:coarse){#lurija-root .lurija-grip,#lurija-root .lurija-rs{display:none}#lurija-root .lurija-topbar--auth .lurija-topbar-title{cursor:default}}@keyframes lurija-pop{0%{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}@keyframes lurija-pop-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(10px)}}@keyframes lurija-msgin{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes lurija-fadein{0%{opacity:0}
15to{opacity:1}}@keyframes lurija-launcher-glow{0%,to{transform:scale(1);opacity:0}50%{transform:scale(1.17);opacity:1}}@keyframes lurija-launcher-in{0%{opacity:0;transform:translate(calc(100% + 60px))}60%{opacity:1;transform:translate(-10px)}80%{transform:translate(4px)}to{transform:translate(0)}}@keyframes lurija-shimmer{0%,to{transform:rotate(0) scale(1)}50%{transform:rotate(10deg) scale(1.04)}}@keyframes lurija-elin{0%{transform:translateY(16px)}to{transform:translateY(0)}}#lurija-root .lurija-elin{animation:lurija-elin .32s cubic-bezier(.22,1,.36,1) both}#lurija-root .lurija-grow{overflow:hidden;will-change:height;-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 20px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 20px),transparent)}#lurija-root .lurija-debug-note{font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--muted,#64748b);margin:10px 0 2px;white-space:pre-wrap}#lurija-root .lurija-debug-note:first-child{margin-top:0}#lurija-root .lurija-debug-out{background:#1e1e2e;color:#cdd6f4;border-radius:8px;padding:.7rem .9rem;margin:6px 0;max-width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;max-height:60vh;overflow-y:auto}@keyframes lurija-fadeup{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}#lurija-root .lurija-fadeup{animation:lurija-fadeup .3s cubic-bezier(.2,.7,.3,1) both}#lurija-root .lurija-edge{-webkit-mask-image:linear-gradient(90deg,#000 0%,rgba(0,0,0,.55) 55%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(90deg,#000,#0000008c 55%,#0000);padding-block:2px;margin-block:-2px}@media (prefers-reduced-motion: reduce){#lurija-root .lurija-elin,#lurija-root .lurija-fadeup,#lurija-root .lurija-msg,#lurija-root .lurija-status-slot,#lurija-root .lurija-turn-avatar,#lurija-root .lurija-turn-avatar-label,#lurija-root .lurija-status-label,#lurija-root .lurija-status-label .lurija-fl,#lurija-root .lurija-thinking-label,#lurija-root .lurija-panel.open,#lurija-root .lurija-lightbox,#lurija-root .lurija-avatar .blob{animation:none!important}#lurija-root .lurija-edge{-webkit-mask-image:none;mask-image:none}}#lurija-root .lurija-thinking{display:flex;align-items:center;gap:10px}#lurija-root .lurija-thinking-label{font-size:14px;line-height:20px;color:var(--ink2);animation:lurija-label-in .42s cubic-bezier(.2,.7,.3,1)}@keyframes lurija-label-in{0%{opacity:0;transform:translate(-8px);-webkit-mask-image:linear-gradient(90deg,#000,transparent)}to{opacity:1;transform:translate(0)}}#lurija-root .lurija-panel.lurija-auth{flex-direction:row;border-radius:20px;box-shadow:0 4px 48px #1a1d2729,0 2px 24px #1a1d2714}@media (min-width:768px){#lurija-root .lurija-panel.lurija-auth{top:var(--lurija-top, 16px);right:16px;bottom:auto;left:auto;width:560px;max-width:calc(100vw - 32px);height:min(802px,calc(100vh - var(--lurija-top, 16px) - 16px));max-height:none;min-height:0;transform-origin:top right;transition:width .28s ease,height .28s ease,top .28s ease,right .28s ease}#lurija-root .lurija-panel.lurija-auth.lurija-sidebar-open{width:840px}#lurija-root .lurija-panel.lurija-auth.lurija-view-fullscreen,#lurija-root .lurija-panel.lurija-auth.lurija-view-fullscreen.lurija-sidebar-open{top:12px;right:12px;width:calc(100vw - 24px);height:calc(100vh - 24px);max-width:none}#lurija-root .lurija-auth .lurija-messages,#lurija-root .lurija-auth .lurija-col-bottom{transition:padding .28s ease}#lurija-root .lurija-auth.lurija-view-fullscreen .lurija-messages{padding-left:max(24px,calc((100% - 800px)/2));padding-right:max(24px,calc((100% - 800px)/2))}#lurija-root .lurija-auth.lurija-view-fullscreen .lurija-col-bottom{padding-left:max(16px,calc((100% - 800px)/2));padding-right:max(16px,calc((100% - 800px)/2))}}#lurija-root .lurija-auth .lurija-col{min-width:0}#lurija-root .lurija-auth .lurija-messages,#lurija-root .lurija-auth .lurija-messages .lurija-msg{-webkit-user-select:text;user-select:text}#lurija-root .lurija-msg-tools{display:flex;justify-content:flex-start;margin-top:6px}#lurija-root .lurija-msg.user .lurija-msg-tools{justify-content:flex-end;margin-top:4px}#lurija-root .lurija-copy-btn{width:26px;height:26px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:var(--ink2);opacity:.55;transition:opacity .15s ease,background .15s ease}#lurija-root .lurija-copy-btn:hover{opacity:1;background:var(--bg-soft)}#lurija-root .lurija-copy-btn--done{color:#16a34a;opacity:1}#lurija-root .lurija-tip{position:fixed;z-index:2147483647;background:var(--ink);color:#fff;font-family:var(--font);font-size:11px;font-weight:500;line-height:13px;padding:5px 6px;border-radius:6px;box-shadow:0 4px 16px #0003;pointer-events:none;white-space:nowrap;opacity:0;transform:translateY(2px);transition:opacity .12s ease,transform .12s ease}#lurija-root .lurija-tip--on{opacity:1;transform:translateY(0)}#lurija-root .lurija-backdrop{position:fixed;inset:0;z-index:99998;background:#1a1d2738;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);opacity:0;pointer-events:none;transition:opacity .28s ease}#lurija-root .lurija-backdrop--on{opacity:1}#lurija-root .lurija-auth .lurija-sidebar{margin-left:-280px;transition:margin-left .28s ease}#lurija-root .lurija-auth.lurija-sidebar-open .lurija-sidebar{margin-left:0}#lurija-root .lurija-topbar--auth .lurija-chatbtn--new{transition:opacity .18s ease,width .28s ease,margin-right .28s ease;margin-right:0;overflow:hidden}#lurija-root .lurija-auth.lurija-sidebar-open .lurija-topbar--auth .lurija-chatbtn--new{opacity:0;width:0;margin-right:-8px;padding:0;pointer-events:none}#lurija-root .lurija-auth .lurija-col-top{padding:14px 16px;background:linear-gradient(to bottom,#fff 55%,#fff0)}#lurija-root .lurija-topbar--auth{justify-content:flex-start;gap:16px;pointer-events:auto}#lurija-root .lurija-topbar--auth .lurija-topbar-title{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}#lurija-root .lurija-topbar-title-main{font-size:16px;line-height:22px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#lurija-root .lurija-topbar-title-sub{font-size:11px;line-height:13px;color:#5f6168;min-height:13px}
15#lurija-root .lurija-topbar-btns{display:flex;align-items:center;gap:8px;flex-shrink:0}#lurija-root .lurija-chatbtn{width:36px;height:36px;border-radius:24px;display:inline-flex;align-items:center;justify-content:center;color:var(--ink2);flex-shrink:0;transition:color .15s ease,background-color .15s ease}#lurija-root .lurija-chatbtn:hover{background:#fff;color:var(--ink)}#lurija-root .lurija-sidebar{width:280px;flex:0 0 280px;min-height:0;display:flex;flex-direction:column;background:#fff;border-right:1px solid var(--line)}#lurija-root .lurija-sb-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 20px 6px}#lurija-root .lurija-sb-new{height:36px;border-radius:24px;padding:0 14px 0 10px;display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--ink);transition:background-color .15s ease}#lurija-root .lurija-sb-new:hover{background:#fff}#lurija-root .lurija-sb-new svg{color:var(--ink2);transition:color .15s ease}#lurija-root .lurija-sb-new:hover svg{color:var(--ink)}#lurija-root .lurija-sb-close{display:none}#lurija-root .lurija-sb-searchrow{display:none;padding:6px 20px 2px}#lurija-root .lurija-sidebar.lurija-sb-search-open .lurija-sb-searchrow{display:block}#lurija-root .lurija-sb-search-input{width:100%;height:36px;border:1px solid var(--line);border-radius:10px;padding:0 12px;font-size:13px;outline:none;background:#fff}#lurija-root .lurija-sb-search-input:focus{border-color:var(--blue-soft)}#lurija-root .lurija-sb-chips{display:flex;flex-wrap:wrap;gap:4px;padding:8px 20px 4px}#lurija-root .lurija-sb-chip{height:20px;border-radius:4px;padding:0 6px;font-size:11px;font-weight:500;color:var(--ink);background:var(--line);display:inline-flex;align-items:center;transition:background-color .15s ease}#lurija-root .lurija-sb-chip:hover,#lurija-root .lurija-sb-chip--active{background:var(--line2)}#lurija-root .lurija-sb-chip--active.lurija-sb-chip--law{background:var(--tag-law)}#lurija-root .lurija-sb-chip--active.lurija-sb-chip--support{background:var(--tag-support)}#lurija-root .lurija-sb-chip--active.lurija-sb-chip--docs{background:var(--tag-docs)}#lurija-root .lurija-sb-chip--active.lurija-sb-chip--tax{background:var(--tag-law)}#lurija-root .lurija-sb-chip--active.lurija-sb-chip--income{background:var(--tag-income)}#lurija-root .lurija-sb-chip--active.lurija-sb-chip--expense{background:var(--tag-expense)}#lurija-root .lurija-sb-chip--active.lurija-sb-chip--invoice,#lurija-root .lurija-sb-chip--active.lurija-sb-chip--scan,#lurija-root .lurija-sb-chip--active.lurija-sb-chip--bank,#lurija-root .lurija-sb-chip--active.lurija-sb-chip--reports,#lurija-root .lurija-sb-chip--active.lurija-sb-chip--payroll{background:var(--tag-entity)}#lurija-root .lurija-tag{height:20px;border-radius:4px;padding:0 4px;font-size:11px;font-weight:500;line-height:20px;color:var(--ink);display:inline-flex;align-items:center;flex-shrink:0;white-space:nowrap}#lurija-root .lurija-tag--law{background:var(--tag-law)}#lurija-root .lurija-tag--support{background:var(--tag-support)}#lurija-root .lurija-tag--docs{background:var(--tag-docs)}#lurija-root .lurija-tag--tax{background:var(--tag-law)}#lurija-root .lurija-tag--income{background:var(--tag-income)}#lurija-root .lurija-tag--expense{background:var(--tag-expense)}#lurija-root .lurija-tag--invoice,#lurija-root .lurija-tag--scan,#lurija-root .lurija-tag--bank,#lurija-root .lurija-tag--reports,#lurija-root .lurija-tag--payroll{background:var(--tag-entity)}#lurija-root .lurija-sb-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:6px 8px 16px;overscroll-behavior:contain}#lurija-root .lurija-sb-section{display:flex;flex-direction:column}#lurija-root .lurija-sb-title{font-size:12px;font-weight:700;color:var(--ink);padding:10px 12px 6px}#lurija-root .lurija-sb-empty{font-size:12px;color:var(--ink2);padding:8px 12px}#lurija-root .lurija-sb-item{display:flex;align-items:center;gap:8px;width:100%;text-align:left;min-height:56px;border-radius:8px;padding:8px 12px;background:#fff}#lurija-root .lurija-sb-item:hover,#lurija-root .lurija-sb-item--active{background:var(--bg-soft)}#lurija-root .lurija-sb-item-txt{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}#lurija-root .lurija-sb-item-title{font-size:12px;line-height:16px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}#lurija-root .lurija-sb-item-date{font-size:11px;line-height:13px;color:var(--ink2);flex-shrink:0}#lurija-root .lurija-sb-item-meta{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden}#lurija-root .lurija-sb-item-unread{min-width:20px;height:20px;padding:0 5px;border-radius:14px;background:var(--blue);color:#fff;font-size:12px;font-weight:600;line-height:20px;
15display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}#lurija-root .lurija-sb-persons{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 20px 2px}#lurija-root .lurija-sb-persons+.lurija-sb-actions{padding-top:10px}#lurija-root .lurija-sb-person{position:relative;min-width:0;min-height:80px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:9px 6px 8px;border-radius:12px;background:transparent;color:var(--ink);text-align:center;transition:background-color .15s ease}#lurija-root .lurija-sb-person:hover{background:var(--bg-soft)}#lurija-root .lurija-sb-person--active,#lurija-root .lurija-sb-person--active:hover{background:var(--line)}#lurija-root .lurija-sb-person:focus-visible{outline:2px solid var(--blue);outline-offset:1px}#lurija-root .lurija-sb-person-av{position:relative;width:28px;height:28px;margin-bottom:5px;flex-shrink:0}#lurija-root .lurija-sb-person-img{position:absolute;inset:0;border-radius:999px;background-position:center;background-size:cover;background-repeat:no-repeat;background-color:var(--line)}#lurija-root .lurija-sb-person-av .lurija-acct-avatar{width:28px;height:28px;border-radius:999px;font-size:11px;line-height:28px}#lurija-root .lurija-sb-person-av--glyph{display:flex;align-items:center;justify-content:center;border-radius:999px;background:var(--tag-entity);color:var(--ink)}#lurija-root .lurija-sb-person-av--add{display:flex;align-items:center;justify-content:center;border-radius:999px;border:1.5px dashed var(--line2);color:var(--ink2);font-size:17px;font-weight:500;line-height:1;box-sizing:border-box;transition:border-color .15s ease,color .15s ease}#lurija-root .lurija-sb-person--add:hover .lurija-sb-person-av--add,#lurija-root .lurija-sb-person--add.lurija-sb-person--active .lurija-sb-person-av--add{border-color:var(--blue);color:var(--blue)}#lurija-root .lurija-sb-person-ai{position:absolute;top:-3px;right:-7px;min-width:15px;height:15px;padding:0 3px;box-sizing:border-box;border-radius:8px;background:var(--blue);color:#fff;border:1.5px solid var(--bg);font-size:7.5px;font-weight:700;line-height:12px;letter-spacing:.02em;text-align:center}#lurija-root .lurija-sb-person-dot{position:absolute;top:0;right:-1px;width:8px;height:8px;border-radius:999px;background:#22c55e;border:1.5px solid var(--bg)}#lurija-root .lurija-sb-person-badge{position:absolute;bottom:-3px;right:-8px;min-width:16px;height:16px;padding:0 4px;box-sizing:border-box;border-radius:8px;background:var(--blue);color:#fff;border:1.5px solid var(--bg);font-size:9px;font-weight:700;line-height:13px;text-align:center;font-variant-numeric:tabular-nums}#lurija-root .lurija-sb-person-label{max-width:100%;font-size:12px;font-weight:600;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#lurija-root .lurija-sb-person-sub{max-width:100%;min-height:13px;font-size:10px;line-height:13px;color:var(--ink2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#lurija-root .lurija-sb-person--add .lurija-sb-person-label{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:15px}#lurija-root .lurija-sb-person--add .lurija-sb-person-sub:empty{display:none}#lurija-root .lurija-sb-person-pending{position:absolute;top:-1px;right:-2px;width:8px;height:8px;border-radius:999px;background:#f5a524;border:1.5px solid var(--bg)}#lurija-root .lurija-acct-avatar{width:20px;height:20px;border-radius:10px;background:var(--tag-entity);color:var(--ink);font-size:10px;font-weight:700;line-height:20px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}#lurija-root .lurija-sb-note{font-size:11px;line-height:15px;color:var(--ink2);padding:0 12px 6px}#lurija-root .lurija-sb-section--archived .lurija-sb-item-title{color:var(--ink2)}#lurija-root .lurija-acct-add{padding:0 12px;gap:6px}#lurija-root .lurija-acct-label{font-size:11px;color:var(--ink2);padding:2px 0}#lurija-root .lurija-acct-email{margin-bottom:6px}#lurija-root .lurija-acct-connect{height:36px;border-radius:10px;background:var(--blue);color:#fff;font-size:13px;font-weight:600;width:100%}#lurija-root .lurija-acct-connect[disabled]{opacity:.6}#lurija-root .lurija-acct-err{font-size:12px;line-height:16px;color:#b4232a;padding:6px 0}#lurija-root .lurija-acct-sent{font-size:12px;line-height:16px;color:var(--ink2);padding:6px 0}#lurija-root .lurija-acct-inv{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--line)}#lurija-root .lurija-acct-inv-txt{flex:1 1 auto;min-width:0}#lurija-root .lurija-acct-inv-name{font-size:12px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#lurija-root .lurija-acct-inv-status{font-size:11px;color:var(--ink2)}#lurija-root .lurija-acct-inv--past{opacity:.6}#lurija-root .lurija-acct-trash{width:28px;height:28px}#lurija-root .lurija-acct-manage{display:block;margin:6px 20px 14px;padding:0;font-size:12px;font-weight:600;color:var(--blue);background:none;text-align:left}#lurija-root .lurija-acct-manage:hover{color:var(--blue-hover);text-decoration:underline}#lurija-root .lurija-acct-reinvite{font-size:11px;font-weight:600;color:var(--blue);padding:0 6px;height:28px;border-radius:8px}#lurija-root .lurija-acct-back{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--ink2);padding:6px 12px}#lurija-root .lurija-acct-back:hover{color:var(--ink)}#lurija-root .lurija-acct-client{align-items:center}#lurija-root .lurija-acct-readonly{align-self:center;font-size:12px;line-height:16px;color:var(--ink2);background:var(--bg-soft);border:1px solid var(--line);border-radius:8px;padding:8px 12px;margin:8px 0;text-align:center}#lurija-root .lurija-msg.accountant,#lurija-root .lurija-msg.system{align-self:flex-start;max-width:85%;background:var(--tag-entity);border-radius:12px;padding:10px 12px;font-size:15px;line-height:22px;letter-spacing:-.01em;color:var(--ink);border:1px solid var(--line)}#lurija-root .lurija-msg-author{display:flex;align-items:center;gap:6px;margin-bottom:4px}#lurija-root .lurija-msg-author-name{font-size:12px;font-weight:700;color:var(--ink)}#lurija-root .lurija-msg-author-role{font-size:11px;color:var(--ink2)}#lurija-root .lurija-msg-author-time{font-size:11px;color:var(--ink2);margin-left:auto}#lurija-root .lurija-msg-body{white-space:pre-wrap;word-break:break-word}#lurija-root .lurija-followup-pill--acct{display:inline-flex;align-items:center;gap:6px}@media (max-width:767px){#lurija-root .lurija-panel.lurija-auth{flex-direction:row}#lurija-root .lurija-auth .lurija-sidebar{position:absolute;inset:0;z-index:20;width:auto;flex:none;margin-left:0;border-right:0;border-radius:inherit;transform:translate(-105%);transition:transform .28s ease}#lurija-root .lurija-auth.lurija-sidebar-open .lurija-sidebar{transform:translate(0)}#lurija-root .lurija-auth .lurija-sb-close{display:inline-flex;background:var(--bg-soft)}#lurija-root .lurija-auth .lurija-sb-searchbtn{margin-left:auto}#lurija-root .lurija-auth #lurija-fs-btn{display:none}}';function as(e){var t=m("wizardPending",e);if(t)return t;var r=e||ae;return r==="ru"?"\u0413\u043E\u0442\u043E\u0432\u043B\u044E \u0443\u0442\u043E\u0447\u043D\u044F\u044E\u0449\u0438\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B\u2026":r==="en"?"Preparing a few clarifying questions\u2026":"Sagatavoju preciz\u0113jo\u0161us jaut\u0101jumus\u2026"}function $t(e,t,r){e&&(e.classList.add("lurija-msg--pending"),e.textContent=""),r&&ye(r,"thinking",t)}function ns(){try{return!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}catch{return!1}}function os(e,t){for(;e.firstChild;)e.removeChild(e.firstChild);for(var r=String(t).split(" "),i=0,a=0;a<r.length;a++){a>
150&&e.appendChild(document.createTextNode(" "));for(var n=c("span","lurija-flw"),o=Array.from(r[a]),l=0;l<o.length;l++){var s=c("span","lurija-fl");s.textContent=o[l],s.style.setProperty("--fsd",(i*.07).toFixed(2)+"s"),n.appendChild(s),i++}e.appendChild(n)}}function ls(e,t){if(e&&e.dataset.text!==t){var r=!!e.dataset.text;if(e.dataset.text=t,ns()){e.textContent=t;return}var i=function(){os(e,t)};if(r&&typeof e.animate=="function"){var a=e.animate([{opacity:1},{opacity:0}],{duration:140,easing:"ease-in",fill:"forwards"}),n=!1,o=function(){if(!n){n=!0;try{a.cancel()}catch{}i(),e.animate([{opacity:0,transform:"translateX(-6px)"},{opacity:1,transform:"translateX(0)"}],{duration:280,easing:"cubic-bezier(.2,.7,.3,1)"})}};a.onfinish=o,setTimeout(o,200)}else i()}}var ss='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M7 11v9H4v-9zM7 11l4-8a2 2 0 013 2v4h5a2 2 0 012 2l-2 7a2 2 0 01-2 1H7"/></svg>',us='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M17 13V4h3v9zM17 13l-4 8a2 2 0 01-3-2v-4H5a2 2 0 01-2-2l2-7a2 2 0 012-1h10"/></svg>';function cs(e,t){var r={"Content-Type":"application/json"};return Re&&(r.Authorization="Bearer "+Re),fetch(le+"/s/v",{method:"POST",headers:r,body:JSON.stringify({embed_token:J,session_token:de,chat_id:e,score:t})}).catch(function(){})}function In(e){var t=c("div","lurija-feedback lurija-elin"),r=c("button","lurija-fb-btn");r.type="button",Se(r,b.helpful),r.innerHTML=ss;var i=c("button","lurija-fb-btn");i.type="button",Se(i,b.notHelpful),i.innerHTML=us;function a(n,o){if(!t.dataset.voted){t.dataset.voted="1",o.classList.add("on"),r.disabled=i.disabled=!0,cs(e,n);var l=c("span","lurija-fb-thanks");l.textContent=b.feedbackThanks,t.appendChild(l)}}return r.addEventListener("click",function(){a(1,r)}),i.addEventListener("click",function(){a(-1,i)}),t.appendChild(r),t.appendChild(i),t}function ds(e,t,r){if(!(!se()||!D.linked||!D.linked.sub)&&!(Yr()||!xe)&&pe!==D.linked.sub){var i=c("button","lurija-followup-pill lurija-followup-pill--acct");i.type="button",i.appendChild(kr(Be(D.linked)));var a=c("span");a.textContent=m("acctAsk"),i.appendChild(a),i.addEventListener("click",function(){e.remove(),$i(D.linked.sub);var n=document.getElementById("lurija-input"),o=n&&n.value?n.value.trim():"";o?(n.value="",Ie(n),_n(o,t,r)):li()}),e.appendChild(i)}}function Zr(e,t,r){var i=(e||[]).slice(0,3);if(!i.length&&!(se()&&D.linked&&D.linked.sub))return null;for(var a=c("div","lurija-followups lurija-elin"),n=0;n<i.length;n++)(function(o,l){var s=c("button","lurija-followup-pill");s.type="button",s.textContent=o,s.addEventListener("click",function(){vr={kind:"followup",text:o,index:l},a.remove(),at(o,t,r)}),a.appendChild(s)})(i[n],n);return ds(a,t,r),a.firstChild?a:null}function On(e,t,r){if(!e||!e.length)return null;var i=c("div","lurija-next-steps lurija-elin"),a=c("div","lurija-next-steps-label");a.textContent=m("nextStepsLabel",t)||b.nextStepsLabel,i.appendChild(a);var n=document.createElement("ol");n.className="lurija-next-steps-list";for(var o=0;o<e.length;o++){var l=document.createElement("li"),s=e[o]==null?"":String(e[o]);if(s.indexOf("[[")!==-1)try{ii(l,s,t||ae,{byUrl:{},list:[]},r)}catch{l.textContent=s.replace(/\[\[[^\]]*\]\]/g,"").trim()}else l.textContent=s;n.appendChild(l)}return i.appendChild(n),i}function ps(){const e=document.createElement("style");if(e.textContent=is,document.head.appendChild(e),ur==null)return;const t=document.createElement("style");t.setAttribute("data-lurija-z",String(ur)),t.textContent="#lurija-root .lurija-panel{z-index:"+ur+";}#lurija-root .lurija-launcher{z-index:"+(ur-1)+";}#lurija-root .lurija-backdrop{z-index:"+(ur-1)+";}",document.head.appendChild(t)}const sa="ikeds-",Qr="lurija-";var ua=!1;function ca(e){if(!(!e||e.nodeType!==1)){var t=e.classList;if(t){var r={},i,a;for(i=0;i<t.length;i++)a=t[i],a.lastIndexOf(Qr,0)===0&&(r[sa+a.slice(Qr.length)]=1);e.id&&e.id.lastIndexOf(Qr,0)===0&&(r[sa+e.id.slice(Qr.length)]=1);var n=[],o=[],l;for(i=0;i<t.length;i++)a=t[i],a.lastIndexOf(sa,0)===0&&!r[a]&&n.push(a);for(l in r)t.contains(l)||o.push(l);if(!(!n.length&&!o.length)){for(ua=!0,i=0;i<n.length;i++)t.remove(n[i]);for(i=0;i<o.length;i++)t.add(o[i]);ua=!1}}}}function Rn(e){if(ca(e),e.querySelectorAll)for(var t=e.querySelectorAll("*"),r=0;r<t.length;r++)ca(t[r])}function fs(e){if(e&&(Rn(e),typeof MutationObserver=="function"))try{var t=new MutationObserver(function(r){if(!ua)for(var i=0;i<r.length;i++){var a=r[i];if(a.type==="attributes"){ca(a.target);continue}for(var n=0;n<a.addedNodes.length;n++)a.addedNodes[n].nodeType===1&&Rn(a.addedNodes[n])}});t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class"]})}catch{}}function c(e,t){const r=document.createElement(e);return t&&(r.className=t),r}var We=null,Sr=null,Ot=null;function Se(e,t){e&&(e.setAttribute("data-lurija-tip",t||""),e.setAttribute("aria-label",t||""),e.removeAttribute("title"),Ot===e&&We&&We.classList.contains("lurija-tip--on")&&da(e))}function Xt(){Sr&&(clearTimeout(Sr),Sr=null),Ot=null,We&&We.classList.remove("lurija-tip--on")}function da(e){var t=document.getElementById("lurija-root");
15if(t){We||(We=c("div","lurija-tip"),t.appendChild(We));var r=e.getAttribute("data-lurija-tip")||"";if(r){We.textContent=r,We.classList.add("lurija-tip--on");var i=e.getBoundingClientRect(),a=We.offsetWidth,n=We.offsetHeight,o=Math.round(i.left+i.width/2-a/2);o=Math.max(8,Math.min(o,window.innerWidth-a-8));var l=Math.round(i.top-n-8);l<8&&(l=Math.round(i.bottom+8)),We.style.left=o+"px",We.style.top=l+"px"}}}function Pn(e){e.addEventListener("mouseover",function(t){var r=t.target&&t.target.closest?t.target.closest("[data-lurija-tip]"):null;!r||r===Ot||(Xt(),Ot=r,Sr=setTimeout(function(){Sr=null,Ot===r&&da(r)},350))}),e.addEventListener("mouseout",function(t){var r=t.target&&t.target.closest?t.target.closest("[data-lurija-tip]"):null;r&&r===Ot&&!(t.relatedTarget&&r.contains(t.relatedTarget))&&Xt()}),e.addEventListener("focusin",function(t){var r=t.target&&t.target.closest?t.target.closest("[data-lurija-tip]"):null;r&&(Ot=r,da(r))}),e.addEventListener("focusout",Xt),e.addEventListener("click",Xt,!0),window.addEventListener("scroll",Xt,!0)}function hs(e){return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5"/><path d="M5 12l7-7 7 7"/></svg>'}const Tr='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18"/><path d="M6 6l12 12"/></svg>',vs='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14"/><path d="M5 12h14"/></svg>',pa='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 1 3 3v6a3 3 0 0 1-6 0V5a3 3 0 0 1 3-3z"/><path d="M19 10v1a7 7 0 0 1-14 0v-1"/><line x1="12" y1="18" x2="12" y2="22"/></svg>',ms='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6.2 5L17.8 5M21 8.2L21 15.8M17.8 19L6.2 19M3 15.8L3 8.2M6.2 19C5.08 19 4.52 19 4.09 18.78M3 15.8C3 16.92 3 17.48 3.22 17.91M4.09 18.78C3.72 18.59 3.41 18.28 3.22 17.91M21 15.8C21 16.92 21 17.48 20.78 17.91M17.8 19C18.92 19 19.48 19 19.91 18.78M20.78 17.91C20.59 18.28 20.28 18.59 19.91 18.78M17.8 5C18.92 5 19.48 5 19.91 5.22M21 8.2C21 7.08 21 6.52 20.78 6.09M19.91 5.22C20.28 5.41 20.59 5.72 20.78 6.09M6.2 5C5.08 5 4.52 5 4.09 5.22M3 8.2C3 7.08 3 6.52 3.22 6.09M4.09 5.22C3.72 5.41 3.41 5.72 3.22 6.09M10 5L10 19M6 8L7 8M6 11L7 11M6 14L7 14M17 9L14 12L17 15"/></svg>',Bn='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7.2 3L16.8 3M4 17.8L4 6.2M7.2 21C6.08 21 5.52 21 5.09 20.78M4 17.8C4 18.92 4 19.48 4.22 19.91M5.09 20.78C4.72 20.59 4.41 20.28 4.22 19.91M16.8 3C17.92 3 18.48 3 18.91 3.22M20 6.2C20 5.08 20 4.52 19.78 4.09M18.91 3.22C19.28 3.41 19.59 3.72 19.78 4.09M7.2 3C6.08 3 5.52 3 5.09 3.22M4 6.2C4 5.08 4 4.52 4.22 4.09M5.09 3.22C4.72 3.41 4.41 3.72 4.22 4.09M20 6.2L20 7M8 7L14 7M20.94 13.73L15.79 18.88M13.22 16.48L18.45 11.24M12.51 20.63L11.2 20.89L11.51 19.54M13.22 16.48C12.74 16.96 12.5 17.2 12.31 17.47M11.51 19.54C11.67 18.88 11.75 18.55 11.88 18.24M12.31 17.47C12.13 17.71 11.99 17.97 11.88 18.24M15.79 18.88C15.28 19.39 15.03 19.65 14.74 19.85M12.51 20.63C13.22 20.49 13.57 20.42 13.91 20.3M14.74 19.85C14.48 20.03 14.2 20.18 13.91 20.3M20.94 11.24C21.63 11.93 21.63 13.05 20.94 13.73M20.94 11.24C20.26 10.56 19.14 10.56 18.45 11.24M8 15L9 15M8 11L12 11"/></svg>',gs='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 11C19 15.42 15.42 19 11 19C6.58 19 3 15.42 3 11C3 6.58 6.58 3 11 3C15.42 3 19 6.58 19 11M16.67 16.64L21 21"/></svg>',Hn='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 10L20 4M4 4L10 10M14 14L20 20M10 14L4 20M15.5 4L20 4L20 8.5M8.5 20L4 20L4 15.5M4 8.5L4 4L8.5 4M20 15.5L20 20L15.5 20"/></svg>',qn='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 10L20 4M4 4L10 10M14 14L20 20M10 14L4 20M5.5 14L10 14L10 18.5M18.5 10L14 10L14 5.5M14 18.5L14 14L18.5 14M10 5.5L10 10L5.5 10"/></svg>
15',Dn='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="12" height="12" rx="2.5"/><path d="M5 15H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"/></svg>',js='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>',bs='<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><rect x="6" y="6" width="12" height="12" rx="2"/></svg>',xs='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18"/><path d="M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>',ws='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>',ys='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 12H5"/><path d="M12 19l-7-7 7-7"/></svg>';function ks(){return Mo&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&window.MediaRecorder}function Cs(){for(var e=["audio/webm;codecs=opus","audio/webm","audio/mp4"],t=0;t<e.length;t++)try{if(MediaRecorder.isTypeSupported(e[t]))return e[t]}catch{}return""}function Fn(e,t){var r=new FormData;return r.append("file",e,(t||"").indexOf("mp4")!==-1?"voice.mp4":"voice.webm"),r.append("embed_token",J),de&&r.append("session_token",de),fetch(le+"/s/tr",{method:"POST",body:r}).then(function(i){if(!i.ok)throw new Error("stt "+i.status);return i.json()})}function _s(e,t){t=t||{};var r=null,i=null,a=null,n=0,o=0,l=!1;try{l=!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}catch{}function s(u){var f=e.closest(".lurija-col")||e.offsetParent||document.body;r=c("div","lurija-voice-halo"),f.appendChild(r);try{var p=window.AudioContext||window.webkitAudioContext;i=new p;var h=i.createMediaStreamSource(u);a=i.createAnalyser(),a.fftSize=512,h.connect(a)}catch{i=null,a=null}var L=a?new Uint8Array(a.fftSize):null,M=Date.now(),x=0,T=!1,j=Date.now(),w=!1;function _(){if(r){var A=e.getBoundingClientRect(),K=f.getBoundingClientRect();r.style.left=A.left+A.width/2-K.left+"px",r.style.top=A.top+A.height/2-K.top+"px";var R=0;if(a){a.getByteTimeDomainData(L);for(var te=0,ue=0;ue<L.length;ue++){var ve=(L[ue]-128)/128;te+=ve*ve}if(R=Math.sqrt(te/L.length),R>.025?(x++,j=Date.now(),x>=5&&(T=!0)):x=0,t.onSilence&&T&&!w&&Date.now()-j>(t.silenceMs||1800)){w=!0;try{t.onSilence()}catch{}}}if(a&&!l){var F=Math.min(1,Math.max(0,(R-.015)*7));o+=(F-o)*.25}else o=.25;var y=l?1:Math.min(1,(Date.now()-M)/300),S=.8+.2*(1-Math.pow(1-y,3));r.style.transform="translate(-50%,-50%) scale("+(S*(1+o*.45)).toFixed(3)+")",e.style.transform="scale("+(1+o*.06).toFixed(3)+")",n=requestAnimationFrame(_)}}n=requestAnimationFrame(_)}function d(){if(n&&(cancelAnimationFrame(n),n=0),i){try{i.close()}catch{}i=null,a=null}r&&(r.remove(),r=null),e.style.transform="",o=0}return{start:s,stop:d}}const Es='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/></svg>',Ls='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 8v5"/><path d="M12 16h.01"/></svg>',Ss='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/></svg>',Ts='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>',As='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z"/></svg>';function fa(e,t,r,i){for(;e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("lurija-msg--pending");var a=c("div","lurija-stream-error lurija-elin"),n=c("span","lurija-stream-error-ico");n.innerHTML=Ls;var o=c("span","lurija-stream-error-msg"),l=Dr||null;if(o.textContent=t||m("streamError",l)||b.streamError,a.appendChild(n),a.appendChild(o),r&&typeof i=="function"){var s=c("button","lurija-stream-error-retry");s.type="button",s.insertAdjacentHTML("beforeend",Ss);var d=c("span");d.textContent=m("retry",l)||b.retry,s.appendChild(d),s.addEventListener("click",function(){i()}),a.appendChild(s)}e.appendChild(a)}function Ms(e){var t=(e||"").match(/\.([a-z0-9]+)$/i);return t?t[1].toUpperCase():"FILE"}function Vn(e,t){t=t||{},typeof e=="string"&&(e={name:e}),e=e||{};var r=e.kind==="image"&&e.url,i=c("div","lurija-att-card");if(r){i.classList.add("lurija-att-card--image");var a=c("div","lurija-att-img");a.style.backgroundImage="url('"+e.url+"')",i.appendChild(a)}else{var n=c("div","lurija-att-thumb");n.innerHTML=Es;var o=c("div","lurija-att-meta"),l=c("div","lurija-att-name");l.textContent=e.name||"",l.title=e.name||"";var s=c("div","lurija-att-type");s.textContent=Ms(e.name),o.appendChild(l),o.appendChild(s),i.appendChild(n),i.appendChild(o)}if(e.url&&(i.classList.add("lurija-att-card--clickable"),i.addEventListener("click",function(){e.kind==="image"?Un(e.url,e.name):Ns(e.url,e.name)})),t.onRemove){var d=c("button","lurija-att-rm");d.type="button",d.innerHTML=Tr,d.setAttribute("aria-label","Remove "+(e.name||"attachment")),d.addEventListener("click",function(u){u.stopPropagation(),t.onRemove(u)}),i.appendChild(d)}return i}function Un(e,t){var r=c("div","lurija-lightbox"),i=document.createElement("img");i.className="lurija-lightbox-img",i.src=e,i.alt=t||"",i.draggable=!1,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.maxWidth="none",i.style.maxHeight="none",i.style.transformOrigin="0 0",i.style.touchAction="none",r.appendChild(i);var a=c("button","lurija-lightbox-close");a.innerHTML="\xD7",a.setAttribute("aria-label","Close"),r.appendChild(a),(document.querySelector("#lurija-root")||document.body).appendChild(r);var n=1,o=1,l=0,s=0,d=6,u=.01;
15function f(){return{w:i.naturalWidth||r.clientWidth,h:i.naturalHeight||r.clientHeight}}function p(){i.style.transform="translate("+l+"px,"+s+"px) scale("+o+")",i.style.cursor=o>n+u?"grab":"zoom-out"}function h(){var y=r.clientWidth,S=r.clientHeight,E=f(),ee=E.w*o,V=E.h*o;l=ee<=y?(y-ee)/2:Math.min(0,Math.max(y-ee,l)),s=V<=S?(S-V)/2:Math.min(0,Math.max(S-V,s))}function L(){var y=r.clientWidth,S=r.clientHeight,E=f();n=Math.min(y/E.w,S/E.h,1),o=n,h(),p()}function M(y,S,E){E=Math.max(n,Math.min(n*d,E)),l=y-(y-l)*(E/o),s=S-(S-s)*(E/o),o=E,o<=n+u&&(o=n),h(),p()}i.complete&&i.naturalWidth?L():i.addEventListener("load",L),window.addEventListener("resize",L);var x={},T=0,j=1,w=0,_=0,A=!1;function K(){return Object.keys(x).map(function(y){return x[y]})}function R(y,S){var E=r.getBoundingClientRect();return{x:y-E.left,y:S-E.top}}i.addEventListener("pointerdown",function(y){try{i.setPointerCapture(y.pointerId)}catch{}if(x[y.pointerId]={x:y.clientX,y:y.clientY},A=!1,Object.keys(x).length===2){var S=K();T=Math.hypot(S[0].x-S[1].x,S[0].y-S[1].y),j=o,w=(S[0].x+S[1].x)/2,_=(S[0].y+S[1].y)/2}y.preventDefault()}),i.addEventListener("pointermove",function(y){if(x[y.pointerId]){var S=x[y.pointerId];if(x[y.pointerId]={x:y.clientX,y:y.clientY},A=!0,Object.keys(x).length>=2&&T>0){var E=K(),ee=Math.hypot(E[0].x-E[1].x,E[0].y-E[1].y),V=(E[0].x+E[1].x)/2,fe=(E[0].y+E[1].y)/2;l+=V-w,s+=fe-_,w=V,_=fe;var re=R(V,fe);M(re.x,re.y,j*(ee/T))}else o>n+u&&(l+=y.clientX-S.x,s+=y.clientY-S.y,h(),p());y.preventDefault()}});var te=0;function ue(y){var S=Object.keys(x).length===1;if(delete x[y.pointerId],Object.keys(x).length<2&&(T=0),o<=n+u&&(o=n,h(),p()),S&&!A){var E=Date.now();if(E-te<300){var ee=R(y.clientX,y.clientY);o>n+u?L():M(ee.x,ee.y,n*2.5),te=0}else te=E}}i.addEventListener("pointerup",ue),i.addEventListener("pointercancel",ue),r.addEventListener("wheel",function(y){y.preventDefault();var S=R(y.clientX,y.clientY);M(S.x,S.y,o*(y.deltaY<0?1.15:1/1.15))},{passive:!1});function ve(){r.remove(),document.removeEventListener("keydown",F),window.removeEventListener("resize",L)}function F(y){y.key==="Escape"&&ve()}a.addEventListener("click",function(y){y.stopPropagation(),ve()}),r.addEventListener("click",function(y){y.target===r&&o<=n+u&&ve()}),document.addEventListener("keydown",F)}function Ns(e,t){var r=document.createElement("a");r.href=e,r.download=t||"download",r.rel="noopener",document.body.appendChild(r),r.click(),r.remove()}function zs(e,t){const r=c("div","lurija-avatar"+(t?" gradient":""));r.style.width=e+"px",r.style.height=e+"px",t&&(r.appendChild(c("div","blob")),r.appendChild(c("div","blob")),r.appendChild(c("div","blob")));const i=c("div","lurija-avatar-img");return i.style.backgroundImage="url("+Ei+")",r.appendChild(i),r}function ha(e,t){const r=c("div","lurija-lurija lurija-lurija--"+e);t&&(r.style.width=t+"px",r.style.height=t+"px");const i=c("div","lurija-lurija-fb");i.style.backgroundImage="url("+Ei+")",r.appendChild(i);var a=!1;try{a=!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}catch{}function n(l){var s=document.createElement("video");return s.className="lurija-lurija-vid",s.muted=!0,s.loop=!0,s.playsInline=!0,s.preload="auto",s.setAttribute("muted",""),s.setAttribute("playsinline",""),s.setAttribute("webkit-playsinline",""),s.setAttribute("disablepictureinpicture",""),s.setAttribute("aria-hidden","true"),a||(s.autoplay=!0),s.src=le+"/s/a/lurija_"+l+".mp4",s.addEventListener("error",function(){s.style.visibility="hidden"}),s}var o=n(e);return r.appendChild(o),r._state=e,r._swapping=!1,r.setState=function(l){if(!l||r._state===l)return;r._state=l,r.className="lurija-lurija lurija-lurija--"+l;var s=n(l);s.classList.add("fading"),r.appendChild(s);var d=!1;function u(){if(!d){d=!0,s.removeEventListener("canplay",u),s.removeEventListener("loadeddata",u),s.classList.remove("fading");var f=o;f.classList.add("fading"),o=s,setTimeout(function(){try{f.pause()}catch{}f.parentNode&&f.parentNode.removeChild(f)},280)}}s.addEventListener("canplay",u),s.addEventListener("loadeddata",u),setTimeout(u,500)},r}function Is(e){const t=c("div","lurija-namecol"),r=c("span","lurija-name");return e&&(r.style.fontSize=e+"px"),r.appendChild(document.createTextNode(b.name)),t.appendChild(r),t}function ei(e){const t=c("div","lurija-welcome");t.id="lurija-welcome",t.appendChild(ha("hello",112));const r=c("div","lurija-welcome-head"),i=c("div","lurija-welcome-title");var a=$?tn($o().split(/\s+/)[0]):"";i.textContent=(a&&b.greetingName?b.greetingName.replace("{name}",a):b.greeting)+" \u{1F44B}";const n=c("div","lurija-welcome-sub");if(n.textContent=b.subtitle,r.appendChild(i),r.appendChild(n),b.welcomeBody){const o=c("div","lurija-welcome-body");o.textContent=b.welcomeBody,r.appendChild(o)}if(t.appendChild(r),b.startersLabel&&(b.starters||[]).length){const o=c("div","lurija-welcome-starters-label");o.textContent=b.startersLabel,t.appendChild(o)}return t.appendChild(Wn(e)),t}function Wn(e){const t=c("div","lurija-chips lurija-chips--welcome");
15return(b.starters||[]).forEach(function(r,i){const a=c("button","lurija-chip");a.type="button",a.textContent=r,a.addEventListener("click",function(){var n=va&&va[i]==="generated"?"starter_ctx":"starter";vr={kind:n,text:r,index:i},e(r)}),t.appendChild(a)}),t}var va=null,ma=!1;function ti(e,t){if(!(!$||ma)){ma=!0;var r=typeof AbortController<"u"?new AbortController:null,i=setTimeout(function(){try{r&&r.abort()}catch{}},1e4),a={"Content-Type":"application/json"};Re&&(a.Authorization="Bearer "+Re),fetch(le+"/s/c",{method:"POST",headers:a,signal:r?r.signal:void 0,body:JSON.stringify({embed_token:J,page_context:Ut(),lang:ae})}).then(function(n){return n.ok?n.json():null}).then(function(n){Oi(n);var o=n&&Array.isArray(n.chips)?n.chips.filter(function(f){return f&&f.text}):[];if(o.length){b.starters=o.map(function(f){return String(f.text)}),va=o.map(function(f){return f.kind||"admin"});var l=document.getElementById("lurija-welcome");if(l){var s=l.querySelector(".lurija-chips--welcome"),d=Wn(e);d.classList.add("lurija-elin"),s&&s.parentNode===l?l.replaceChild(d,s):l.appendChild(d);var u=l.querySelector(".lurija-welcome-starters-label");!u&&b.startersLabel&&(u=c("div","lurija-welcome-starters-label"),u.textContent=b.startersLabel,l.insertBefore(u,d))}}}).catch(function(){}).then(function(){clearTimeout(i),ma=!1})}}function Zt(e,t){if(e)for(var r=e.querySelectorAll(".lurija-turn-avatar, .lurija-status-slot"),i=0;i<r.length;i++)r[i]!==t&&r[i].remove()}function Os(e){for(var t=e.nextSibling;t;){if(t.nodeType===1){if(!(t.classList&&t.classList.contains("lurija-tail-spacer")))return!0}else if(t.nodeType===3&&t.textContent.trim())return!0;t=t.nextSibling}return!1}function ye(e,t,r){if(e){var i=e.querySelector(".lurija-status-slot");if(!t){i&&i.remove(),Te&&Te();return}if(!e.querySelector(".ikw-wizard .lurija-turn-avatar")){var a=e.scrollHeight-e.scrollTop-e.clientHeight<=80,n=!1;i?Os(i)&&(i.style.animation="none",e.appendChild(i),n=!0):(i=c("div","lurija-status-slot"),e.appendChild(i),n=!0);var o=i.querySelector(".lurija-lurija");if(o&&o.setState)o.setState(t);else{for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(ha(t,112))}Zt(e,i);var l=i.querySelector(".lurija-status-label");if(t==="thinking"&&r?(l||(l=c("span","lurija-status-label"),i.appendChild(l)),ls(l,r)):l&&l.remove(),Te&&Te(),n){var s=e,d=t==="thinking",u=i,f=!!Je,p=window.performance&&performance.now()||0,h=function(L){Te&&Te();var M=Je?Je():f?!1:d||a;M&&!Je&&!Ye&&(s.scrollTop=s.scrollHeight),M&&mi&&mi(u),(L||0)-p<380&&requestAnimationFrame(h)};requestAnimationFrame(h)}}}}function Ar(e,t){if(e){var r=e.querySelector(".lurija-turn-avatar");if(r){var i=r.querySelector(".lurija-lurija");i&&i.setState&&i.setState(t),Zt(e.parentNode,r);return}var a=c("div","lurija-turn-avatar");a.appendChild(ha(t,112)),e.appendChild(a),Zt(e.parentNode,a),Te&&Te()}}function Gn(e){const t=c("div","lurija-col"),r=c("div","lurija-col-top"),i=c("div","lurija-topbar");if(e.authChrome){i.classList.add("lurija-topbar--auth");var a=c("button","lurija-chatbtn lurija-glass");a.type="button",a.id="lurija-menu-btn",a.innerHTML=ms,Se(a,b.openMenu+" (Ctrl+B)"),a.addEventListener("click",function(){jt()}),i.appendChild(a);var n=c("div","lurija-topbar-title"),o=c("div","lurija-topbar-title-main");o.id="lurija-chat-title",o.textContent=b.name;var l=c("div","lurija-topbar-title-sub");l.id="lurija-chat-date",n.appendChild(o),n.appendChild(l),i.appendChild(n);var s=c("div","lurija-topbar-btns"),d=c("button","lurija-chatbtn lurija-chatbtn--new lurija-glass");d.type="button",d.innerHTML=Bn,Se(d,b.newChat+" (Ctrl+Shift+O)"),d.addEventListener("click",function(){var v=document.querySelector("#lurija-messages");v&&Mr(v)}),s.appendChild(d);var u=c("button","lurija-chatbtn lurija-glass");if(u.type="button",u.id="lurija-fs-btn",u.innerHTML=ze==="fullscreen"?qn:Hn,Se(u,ze==="fullscreen"?b.exitFullScreen:b.fullScreen),u.addEventListener("click",function(){ea()}),s.appendChild(u),e.withClose){var f=c("button","lurija-close lurija-glass");f.type="button",f.innerHTML=Tr,Se(f,b.close+" (Esc)"),f.addEventListener("click",e.onClose),s.appendChild(f)}i.appendChild(s)}else if(e.withClose){const v=c("button","lurija-close lurija-glass");v.type="button",v.innerHTML=Tr,Se(v,b.close+" (Esc)"),v.addEventListener("click",e.onClose),i.appendChild(v)}r.appendChild(i),t.appendChild(r);const p=c("div","lurija-messages");p.id="lurija-messages";const h=c("div","lurija-tail-spacer");h.style.height="0px",p.appendChild(h);const L=c("div","lurija-msgs-wrap");L.appendChild(p),t.appendChild(L);const M=c("div","lurija-col-bottom"),x=c("div","lurija-bar lurija-glass");x.id="lurija-bar";const T=c("div","lurija-doc-pills");T.id="lurija-doc-pills";const j=c("div","lurija-bar-row"),w=c("input");w.type="file",w.id="lurija-file-input",w.accept="image/jpeg,image/png,image/webp,.pdf,.docx,.txt,.md,.csv",w.style.display="none";const _=c("button","lurija-attach");_.id="lurija-attach",_.type="button",Se(_,"Attach document"),_.innerHTML=vs;const A=c("textarea","lurija-input");A.id="lurija-input",A.rows=1,A.placeholder=b.placeholders&&b.placeholders.length?b.placeholders[Mt%b.placeholders.length]:b.placeholder,Dt&&(A.placeholder=Dt);const K=c("button","lurija-send"+(e.sendLabel?" lurija-send--label":""));if(K.id="lurija-send",K.type="button",K.setAttribute("aria-label",b.send),e.sendLabel){const v=c("span","lurija-send-txt");v.textContent=b.send,K.appendChild(v)}K.insertAdjacentHTML("beforeend",hs(e.sendLabel?16:24));var R=null;ks()&&(R=c("button","lurija-mic"),R.id="lurija-mic",R.type="button",Se(R,b.micStart),R.innerHTML=pa),j.appendChild(w),j.appendChild(_),j.appendChild(A),R&&j.appendChild(R),j.appendChild(K),x.appendChild(T),x.appendChild(j);const te=c("div","lurija-disclaimer");if(te.appendChild(document.createTextNode(b.disclaimerL1)),$||function(){te.appendChild(document.createElement("br"));var v=b.privacyNotice||"",P=document.createElement("a");P.href=$a(),P.target="_blank",P.rel="noopener noreferrer",P.textContent=b.privacyLinkLabel||"";var B=v.indexOf("{link}");if(B===-1)v&&te.appendChild(document.createTextNode(v+" ")),te.appendChild(P);else{var z=v.slice(0,B),W=v.slice(B+6);z&&te.appendChild(document.createTextNode(z)),te.appendChild(P),W&&te.appendChild(document.createTextNode(W))}}(),!xt){var ue=c("div","lurija-consent-row");ue.id="lurija-consent-row";var ve=c("input","lurija-consent-cb");ve.type="checkbox",ve.id="lurija-consent-cb";var F=c("label","lurija-consent-label");F.htmlFor="lurija-consent-cb",function(){var v=m("consentChatLabel")||"",P=document.createElement("a");P.href=$a(),P.target="_blank",P.rel="noopener noreferrer",P.textContent=b.privacyLinkLabel||"";var B=v.indexOf("{link}");if(B===-1)v&&F.appendChild(document.createTextNode(v+" ")),F.appendChild(P);else{var z=v.slice(0,B),W=v.slice(B+6);z&&F.appendChild(document.createTextNode(z)),F.appendChild(P),W&&F.appendChild(document.createTextNode(W))}}();var y=c("div","lurija-consent-err");y.id="lurija-consent-err",y.style.display="none",y.textContent=m("consentChatRequired")||"",ve.addEventListener("change",function(){ve.checked?(
15xt=!0,Fe(Ir,"1"),y.style.display="none"):(xt=!1,Ze(Ir))});var S=c("div","lurija-consent-top");S.appendChild(ve),S.appendChild(F),ue.appendChild(S),ue.appendChild(y),M.appendChild(ue)}M.appendChild(x),M.appendChild(te),t.appendChild(M);var E=0,ee=0,V=0;function fe(){var v="absolute";try{v=window.getComputedStyle(M).position}catch{}if(v==="static"||v==="relative")t.style.setProperty("--composer-h","0px"),p.style.paddingBottom="",h.style.height=V+"px";else{var P=M.offsetHeight||0;try{var B=p.getBoundingClientRect(),z=M.getBoundingClientRect(),W=B.bottom-z.top;W>0&&(P=Math.ceil(W))}catch{}t.style.setProperty("--composer-h",P+"px"),P<ee-2&&(E=0),ee=P,p.style.paddingBottom="",h.style.height=Math.max(P+10,E,V)+"px"}var Z=r.offsetHeight||0;t.style.setProperty("--header-h",Z+"px"),p.style.paddingTop=Z+"px";try{var X=M.getBoundingClientRect(),je=Math.max(0,x.getBoundingClientRect().top-X.top),Q=Math.max(je+1,te.getBoundingClientRect().top-X.top);t.style.setProperty("--fade-top",je+"px"),t.style.setProperty("--fade-bottom",Q+"px")}catch{}Le(p)}function re(v){if(v===h&&(v=h.previousElementSibling),!(!v||!v.getBoundingClientRect)&&v.isConnected!==!1&&!Ye)try{fe();var P=window.getComputedStyle(M).position;if(P==="static"||P==="relative")return;var B=v.getBoundingClientRect(),z=M.getBoundingClientRect(),W=Math.ceil(B.bottom-z.top)+12;if(W<=-80&&E>0){E=0,h.style.height=Math.max(ee+10,V)+"px",Le(p);return}if(W<=0)return;var Z=p.scrollHeight-p.clientHeight-p.scrollTop;if(Z<W){var X=ee+10;E=Math.max(E,Math.ceil(X+(W-Z))),h.style.height=Math.max(parseFloat(h.style.height)||0,E)+"px"}p.scrollTop+=W,Le(p)}catch{}}mi=re,Te=fe,mt=function(v){if(v==null){if(!V)return;V=0,fe();return}var P=V;V&&(V=0,fe());var B=v+p.clientHeight-p.scrollHeight,z=B>0?Math.ceil(B+(parseFloat(h.style.height)||0)):0;if(z===P){P&&(V=P,fe());return}V=z,fe()},window.ResizeObserver&&new ResizeObserver(function(){fe(),p.scrollHeight-p.scrollTop-p.clientHeight<=80&&(Je?Je():Ye||(p.scrollTop=p.scrollHeight))}).observe(M);function g(){[90,420,850,1350,2400].forEach(function(v){setTimeout(function(){var P=p.scrollHeight>p.clientHeight+4,B=p.scrollHeight-p.scrollTop-p.clientHeight<=120,z=p.lastElementChild===h?h.previousElementSibling:p.lastElementChild;(B||!P)&&z&&re(z)},v)})}function k(){var v=t.closest(".lurija-panel, .lurija-card");v&&v.classList.toggle("lurija-panel--welcome",!!p.querySelector("#lurija-welcome"))}if(requestAnimationFrame(k),window.MutationObserver){var O=!1;new MutationObserver(function(){k(),p.lastElementChild!==h&&p.appendChild(h),!O&&(O=!0,setTimeout(function(){O=!1},1400),g())}).observe(p,{childList:!0,subtree:!0})}function C(){E=0,V=0,fe(),wt&&wt(),g()}if(window.addEventListener("resize",C),window.visualViewport)try{window.visualViewport.addEventListener("resize",C)}catch{}p.addEventListener("scroll",function(){Le(p),oa()}),window.addEventListener("resize",oa),requestAnimationFrame(fe);const U=function(v){at(v,K,p)};_.addEventListener("click",function(){w.click()}),R&&function(){var v=null,P=null,B=[],z=!1,W=null,Z=null,X=null,je=0,Q="",H=null,Me=!1,we=0,He="",nt=!1,Rt=_s(R,{});function Pt(){H=setTimeout(function(){if(!(!v||v.state!=="recording")){if(Me||!B.length){De();return}var oe=++we,Oe=v.mimeType||"audio/webm",Ge=new Blob(B,{type:Oe});if(Ge.size<1500){De();return}Me=!0,Fn(Ge,Oe).then(function(qe){Me=!1;var tr=qe&&qe.text?String(qe.text).trim():"";tr&&oe===we&&v&&v.state==="recording"&&ot(tr),De()}).catch(function(){Me=!1,De()})}},4e3)}function De(){v&&v.state==="recording"&&(clearTimeout(H),Pt())}function ot(oe){var Oe=He?He.replace(/\s+$/,"")+" ":"";A.value=Oe+oe,nt=!0,Ie(A)}A.addEventListener("input",function(){!z&&!(v&&v.state==="recording")&&!A.value.trim()&&(nt=!1)});function lt(){if(P)try{P.getTracks().forEach(function(oe){oe.stop()})}catch{}P=null}function La(){Rt.start(P)}function ci(){Rt.stop()}function Ct(){Z&&(clearTimeout(Z),Z=null),X&&(clearInterval(X),X=null),ci(),x.classList.remove("lurija-bar--voice"),R.classList.remove("lurija-mic--rec","lurija-mic--busy"),R.innerHTML=pa,Se(R,b.micStart),A.placeholder=Q||A.placeholder,Ie(A)}function Bt(oe){Ct();var Oe=Q||A.placeholder;A.placeholder=oe,Ie(A),setTimeout(function(){A.placeholder===oe&&(A.placeholder=Oe,Ie(A))},3500)}function Ht(){Q=A.placeholder,navigator.mediaDevices.getUserMedia({audio:!0}).then(function(oe){P=oe,B=[];var Oe=Cs();try{v=Oe?new MediaRecorder(oe,{mimeType:Oe}):new MediaRecorder(oe)}catch{lt(),Bt(b.micError);return}v.ondataavailable=function(qe){qe.data&&qe.data.size&&B.push(qe.data)},v.onstop=function(){lt(),Sa()},v.start(1e3),He=A.value,we=0,Pt(),je=Date.now(),R.classList.add("lurija-mic--rec"),R.innerHTML=bs,Se(R,b.micStop),La();function Ge(){var qe=Math.floor((Date.now()-je)/1e3);A.placeholder=b.micListening+" ("+Math.floor(qe/60)+":"+("0"+qe%60).slice(-2)+")"}Ge(),X=setInterval(Ge,1e3),Z=setTimeout(function(){v&&v.state==="recording"&&v.stop()},6e4)}).catch(function(){Bt(b.micDenied)})}function _t(oe){var Oe=W;if(W=null,Oe&&oe!==!1)try{Oe()}catch{}}function Sa(){Z&&(clearTimeout(Z),Z=null),X&&(clearInterval(X),X=null),H&&(clearTimeout(H),H=null),we++,ci(),R.classList.remove("lurija-mic--rec"),R.innerHTML=pa;var oe=v&&v.mimeType||"audio/webm";v=null;var Oe=new Blob(B,{type:oe});if(B=[],Oe.size<1500){Ct(),_t(!0);return}z=!0,R.classList.add("lurija-mic--busy"),A.placeholder=b.micTranscribing,Fn(Oe,oe).then(function(Ge){z=!1,Ct();var qe=Ge&&Ge.text?String(Ge.text).trim():"";if(!qe){Bt(b.micError),_t(!1);return}ot(qe),A.focus(),_t(!0)}).catch(function(){z=!1,Bt(b.micError),_t(!1)})}R.addEventListener("click",function(){if(!(z||A.disabled)){if(v&&v.state==="recording"){v.stop();return}Ht()}}),A._lurijaVoiceCtl={active:function(){return z||!!(v&&v.state==="recording")},takeVoice:function(){var oe=nt;return nt=!1,oe},finalizeThen:function(oe){v&&v.state==="recording"?(W=oe,v.stop()):z?W=oe:oe()}}}(),window.__lurija_triggerAttachDoc=function(){return new Promise(function(v){var P=!1;function B(W){if(!P){P=!0,w.removeEventListener("change",B,!0),W&&typeof W.stopImmediatePropagation=="function"&&W.stopImmediatePropagation();var Z=w.files&&w.files[0];if(!Z){w.value="",v({ok:!1,cancelled:!0});return}var X=kt.length;Promise.resolve(Kn(Z,T)).then(function(){w.value="",v({ok:kt.length>X})}).catch(function(){w.value="",v({ok:!1})})}}function z(){setTimeout(function(){P||(P=!0,w.removeEventListener("change",B,!0),w.value="",v({ok:!1,cancelled:!0}))},400)}w.addEventListener("change",B,!0),window.addEventListener("focus",z,{once:!0}),w.click()})},w.addEventListener("change",function(){w.files&&w.files[0]&&(Kn(w.files[0],T),w.value="")}
15);function ke(){Ie(A)}if(A.addEventListener("input",ke),A.addEventListener("keydown",function(v){v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),ya(A,K,p))}),K.addEventListener("click",function(){ya(A,K,p)}),ne.length){for(let v=0;v<ne.length;v++)ht(ne[v].role,ne[v].content,p,ne[v].attachments,ne[v].lang);Qt(p);var he=ne[ne.length-1];he&&he.role==="assistant"&&ye(p,"waiting")}else p.appendChild(ei(U)),ti(U,"mount");if(requestAnimationFrame(function(){Ie(A)}),window.ResizeObserver){var Ae=A.clientWidth,me=new ResizeObserver(function(){var v=A.clientWidth;v>=40&&Math.abs(v-Ae)>.5&&(Ae=v,Ie(A))});me.observe(A)}return t}function Ie(e){if(e){if(e.clientWidth<40){setTimeout(function(){e.clientWidth>=40&&Ie(e)},320);return}if(e.style.height="auto",!e.value&&e.placeholder){e.value=e.placeholder;var t=e.scrollHeight;e.value="",e.style.height=Math.min(t,120)+"px";return}e.style.height=Math.min(e.scrollHeight,120)+"px"}}function Rs(){hr="floating";const e=c("div");e.id="lurija-root";const t=c("button","lurija-launcher");t.id="lurija-launcher",t.type="button",t.setAttribute("aria-label",b.open);const r=c("div","lurija-launcher-av");r.appendChild(zs(48,!1)),t.appendChild(r),t.appendChild(Is(13));const i=c("div","lurija-panel");i.id="lurija-panel";function a(){if(i.classList.contains("open")){Si||t.classList.remove("hidden"),Ma(!1);var g=!1,k=function(){g||(g=!0,i.removeEventListener("animationend",k),i.classList.contains("closing")&&(i.classList.remove("open","closing"),E()))};i.classList.add("closing"),i.addEventListener("animationend",k),setTimeout(k,220),$&&(Qi(),setTimeout(br,250))}}if(window.__lurijaCloseFloating=a,Si&&t.classList.add("hidden"),sr!=null&&sr>0&&i.style.setProperty("--lurija-bottom",sr+8+"px"),$){if(i.classList.add("lurija-auth"),ze==="fullscreen"&&i.classList.add("lurija-view-fullscreen"),Qe()?rt=!1:rt?i.classList.add("lurija-sidebar-open"):ze==="fullscreen"&&(_r=!0,rt=!0,i.classList.add("lurija-sidebar-open")),qr!=null){i.style.setProperty("--lurija-top",qr+8+"px");var n=0,o=function(){n=0;var g=window.pageYOffset||document.documentElement.scrollTop||0,k=g>=Math.max(1,qr-16);i.style.setProperty("--lurija-top",(k?16:qr+8)+"px")};window.addEventListener("scroll",function(){n||(n=requestAnimationFrame(o))},{passive:!0}),o()}i.appendChild(Al());var l=c("div","lurija-backdrop");l.id="lurija-backdrop",e.appendChild(l),sl(),wr(null)}i.appendChild(Gn({withClose:!0,sendLabel:!1,authChrome:$,onClose:a}));var s=340,d=420,u=8,f=700,p=null,h=0;function L(){var g=window.innerWidth,k=window.innerHeight,O=$&&rt?f:s,C=Math.max(200,g-2*u),U=Math.max(200,k-2*u);return{minW:Math.min(O,C),maxW:C,minH:Math.min(d,U),maxH:U,vw:g,vh:k}}function M(g){var k=L(),O=Math.round(Math.min(Math.max(g.w,k.minW),k.maxW)),C=Math.round(Math.min(Math.max(g.h,k.minH),k.maxH)),U=Math.round(Math.min(Math.max(g.x,u),Math.max(u,k.vw-O-u))),ke=Math.round(Math.min(Math.max(g.y,u),Math.max(u,k.vh-C-u)));return{x:U,y:ke,w:O,h:C}}function x(){return!Qe()&&!($&&ze==="fullscreen")}var T=0;function j(){var g=i.style;i.classList.remove("lurija-panel--custom","lurija-panel--anim"),g.left="",g.width="",Qe()||(g.top="",g.he
15ight="")}function w(g){var k=i.style,O=i.classList.contains("lurija-panel--custom");if(!p||!x()){if(p&&g&&O&&$&&ze==="fullscreen"&&!Qe()){i.classList.add("lurija-panel--anim"),k.left="12px",k.top="12px",k.width=Math.max(0,window.innerWidth-24)+"px",k.height=Math.max(0,window.innerHeight-24)+"px",T&&clearTimeout(T),T=setTimeout(function(){T=0,j()},320);return}T&&(clearTimeout(T),T=0),j();return}var C=M(p);if(C.w!==p.w&&(C=M({x:p.x+p.w-C.w,y:C.y,w:C.w,h:C.h})),g&&!O&&i.classList.contains("open")){var U=i.getBoundingClientRect();i.classList.remove("lurija-panel--anim"),i.classList.add("lurija-panel--custom"),k.left=U.left+"px",k.top=U.top+"px",k.width=U.width+"px",k.height=U.height+"px",i.offsetWidth}g&&(i.classList.add("lurija-panel--anim"),T&&clearTimeout(T),T=setTimeout(function(){T=0,i.classList.remove("lurija-panel--anim")},360)),i.classList.add("lurija-panel--custom"),k.left=C.x+"px",k.top=C.y+"px",k.width=C.w+"px",k.height=C.h+"px"}function _(){Te&&Te();var g=i.querySelector("#lurija-messages");g&&Le(g),oa()}function A(){p?Fe(hi,JSON.stringify(p)):Ze(hi)}function K(){try{var g=JSON.parse(st(hi)||"null");g&&isFinite(g.x)&&isFinite(g.y)&&isFinite(g.w)&&isFinite(g.h)&&(p={x:+g.x,y:+g.y,w:+g.w,h:+g.h})}catch{p=null}}function R(){p=null,A(),w(),_()}function te(g,k){if(!(g.button!==0||!x())&&!(k==="move"&&g.target&&g.target.closest&&g.target.closest("button, input, textarea, select, a"))){g.preventDefault();var O=i.getBoundingClientRect(),C={x:O.left,y:O.top,w:O.width,h:O.height},U=g.clientX,ke=g.clientY,he=g.currentTarget,Ae=null,me=0;try{he.setPointerCapture(g.pointerId)}catch{}i.classList.add("lurija-panel--moving"),Xt();var v=function(){me=0,Ae&&(p=M(Ae),w(),k!=="move"&&Te&&Te())},P=function(z){var W=z.clientX-U,Z=z.clientY-ke,X={x:C.x,y:C.y,w:C.w,h:C.h};if(k==="move")X.x+=W,X.y+=Z;else{var je=L();k.indexOf("e")>=0&&(X.w=C.w+W),k.indexOf("s")>=0&&(X.h=C.h+Z),k.indexOf("w")>=0&&(X.w=Math.min(Math.max(C.w-W,je.minW),je.maxW),X.x=C.x+C.w-X.w),k.indexOf("n")>=0&&(X.h=Math.min(Math.max(C.h-Z,je.minH),je.maxH),X.y=C.y+C.h-X.h)}Ae=X,me||(me=requestAnimationFrame(v))},B=function(z){he.removeEventListener("pointermove",P),he.removeEventListener("pointerup",B),he.removeEventListener("pointercancel",B);try{he.releasePointerCapture(z.pointerId)}catch{}me&&(cancelAnimationFrame(me),me=0),v(),i.classList.remove("lurija-panel--moving"),A(),_()};he.addEventListener("pointermove",P),he.addEventListener("pointerup",B),he.addEventListener("pointercancel",B)}}function ue(){if(window.PointerEvent){var g=[];if($){var k=i.querySelector(".lurija-topbar--auth");k&&g.push(k)}else{var O=c("div","lurija-grip");O.setAttribute("aria-hidden","true"),i.appendChild(O),g.push(O)}g.forEach(function(C){C.addEventListener("pointerdown",function(U){te(U,"move")}),C.addEventListener("dblclick",function(U){U.target&&U.target.closest&&U.target.closest("button, input, textarea, select, a")||R()})}),["n","s","e","w","nw","ne","sw","se"].forEach(function(C){var U=c("div","lurija-rs lurija-rs-"+C);U.setAttribute("aria-hidden","true"),U.addEventListener("pointerdown",function(ke){te(ke,C)}),i.appendChild(U)}),K(),window.addEventListener("resize",function(){!p||h||(h=requestAnimationFrame(function(){h=0,w(),_()}))})}}ue();function ve(g){if(!(!g||!g.getBoundingClientRect||Qe())&&!(!i.classList.contains("open")||$&&ze==="fullscreen")){var k=g.getBoundingClientRect();if(k.width>0||k.height>0){var O=i.getBoundingClientRect(),C=16,U=function(X,je,Q,H){return!(k.right+C<=X||k.left-C>=X+Q||k.bottom+C<=je||k.top-C>=je+H)};if(U(O.left,O.top,O.width,O.height)){for(var ke=O.width,he=O.height,Ae=window.innerWidth,me=[{x:k.right+C,y:O.top},{x:k.left-C-ke,y:O.top},{x:O.left,y:k.bottom+C},{x:O.left,y:k.top-C-he},{x:Ae-ke-u,y:O.top},{x:u,y:O.top}],v=null,P=1/0,B=0;B<me.length;B++){var z=M({x:me[B].x,y:me[B].y,w:ke,h:he});if(!U(z.x,z.y,z.w,z.h)){v=z;break}var W=Math.max(0,Math.min(k.right,z.x+z.w)-Math.max(k.left,z.x)),Z=Math.max(0,Math.min(k.bottom,z.y+z.h)-Math.max(k.top,z.y));W*Z<P&&(P=W*Z,v=z)}!v||v.x===Math.round(O.left)&&v.y===Math.round(O.top)||(p={x:v.x,y:v.y,w:v.w,h:v.h},w(!0),_(),setTimeout(_,380))}}}}window.__lurijaAvoidElement=ve,window.__lurijaApplyPanelGeom=function(){w(!0),_(),setTimeout(_,380)};var F=0,y=!1,S=0;
15function E(){var g=window.visualViewport,k=Qe();if(g&&k&&i.classList.contains("open")){var O=i.querySelector("#lurija-messages"),C=O?O.scrollHeight-O.scrollTop-O.clientHeight<=4:!1,U=Math.max(0,window.innerHeight-(g.height+g.offsetTop)),ke=sr>0?sr+8:8,he=U>0?Math.max(U+8,ke):ke,Ae=U>40;Ae!==y&&(y=Ae,i.classList.add("lurija-panel--kb"),S&&clearTimeout(S),S=setTimeout(function(){S=0,i.classList.remove("lurija-panel--kb")},340));var me=Math.max(0,g.height-(he-U)-24),v=Math.min(Math.round(g.height*.62),me);if(i.style.bottom=he+"px",i.style.maxHeight=me+"px",i.style.minHeight=v+"px",O&&C){F&&cancelAnimationFrame(F);var P=window.performance&&performance.now()||0,B=function(z){Ye||(O.scrollTop=O.scrollHeight),(z||0)-P<320?F=requestAnimationFrame(B):F=0};F=requestAnimationFrame(B)}}else i.style.bottom="",i.style.maxHeight="",i.style.minHeight="",i.style.top="",i.style.height="",w()}window.visualViewport&&(window.visualViewport.addEventListener("resize",E),window.visualViewport.addEventListener("scroll",E)),window.addEventListener("orientationchange",function(){setTimeout(E,200)});function ee(){i.classList.remove("closing"),i.classList.add("open"),t.classList.add("hidden"),Ci(!1),Ma(!0),E();var g=i.querySelector("#lurija-input");g&&Ie(g),Te&&Te(),ga(i.querySelector("#lurija-messages")),or||(or=!0,ct("chat_open"),qa()),$&&(wr(null),br(),Qi()),se()&&(Xi(),Zi())}t.addEventListener("click",ee),window.__lurijaOpenFloating=ee,Ti(ee,a,function(){return i.classList.contains("open")});function V(){var g=document.getElementById("lurija-sidebar");if(g){rt||jt(!0),g.classList.add("lurija-sb-search-open");var k=document.getElementById("lurija-sb-search-input");if(k)try{k.focus(),k.select()}catch{}}}if(document.addEventListener("keydown",function(g){if(!(!i.classList.contains("open")||g.defaultPrevented)){var k=g.ctrlKey||g.metaKey;if(g.key==="Escape"&&!g.isComposing){var O=document.querySelector(".lurija-lightbox");if(O){var C=O.querySelector(".lurija-lightbox-close");C?C.click():O.parentNode&&O.parentNode.removeChild(O);return}if($&&Qe()&&rt){jt(!1);return}if($&&ze==="fullscreen"){ea("pane");return}a();return}if($){var U=(g.key||"").toLowerCase();if(k&&!g.shiftKey&&!g.altKey&&(U==="f"||U==="k")){g.preventDefault(),V();return}if(k&&!g.shiftKey&&!g.altKey&&U==="b"){g.preventDefault(),jt();return}if(k&&g.shiftKey&&!g.altKey&&U==="o"){g.preventDefault();var ke=document.querySelector("#lurija-messages");ke&&Mr(ke);return}}}}),e.appendChild(t),e.appendChild(i),document.body.appendChild(e),Pn(e),!$&&st(fi)==="1"&&t.classList.add("lurija-launcher--unread"),go()&&!Qe())ee();else if(!Si){var fe=!1;try{fe=!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}catch{}if(!fe){let g=function(k){k&&k.animationName&&k.animationName!=="lurija-launcher-in"||re||(re=!0,t.classList.remove("lurija-launcher-in"),t.removeEventListener("animationend",g),t.removeEventListener("animationcancel",g))};t.classList.add("lurija-launcher-in");var re=!1;t.addEventListener("animationend",g),t.addEventListener("animationcancel",g),setTimeout(g,1e3)}}}function Ps(e){hr="large";const t=c("div","lurija-large");t.id="lurija-root";const r=c("div","lurija-stage"),i=c("div","lurija-card");i.appendChild(Gn({withClose:!1,sendLabel:!0,onClose:function(){}})),r.appendChild(i),t.appendChild(r),e.appendChild(t),Pn(t),Ti(null,null,function(){return!0}),or||(or=!0,ct("chat_open"),qa())}async function Kn(e,t){var r=!!(e.type&&e.type.indexOf("image/")===0),i=null;try{i=URL.createObjectURL(e)}catch{}var a=r?"image":"file",n=Vn({name:e.name,url:i,kind:a},{});n.classList.add("lurija-att-card--uploading"),t.appendChild(n);try{var o=new FormData;o.append("file",e),o.append("embed_token",J),de&&o.append("session_token",de);var l={};Re&&(l.Authorization="Bearer "+Re);var s=await fetch(le+"/s/u",{method:"POST",headers:l,body:o});if(!s.ok){var d=await s.json().catch(function(){return{}});throw new Error(d.detail||"Upload failed")}var u=await s.json(),f={name:u.name,text:u.text,id:u.id||null,url:u.url||i,kind:u.kind||a};kt.push(f),n.classList.remove("lurija-att-card--uploading");var p=c("button","lurija-att-rm");p.type="button",p.innerHTML=Tr,p.setAttribute("aria-label","Remove "+u.name),p.addEventListener("click",function(h){if(h.stopPropagation(),kt=kt.filter(function(L){return L!==f}),i)try{URL.revokeObjectURL(i)}catch{}n.remove()}),n.appendChild(p)}catch{if(n.classList.remove("lurija-att-card--uploading"),n.classList.add("lurija-att-card--error"),n.textContent="\u2715 "+e.n
15ame,i)try{URL.revokeObjectURL(i)}catch{}setTimeout(function(){n.remove()},3e3)}}function Qt(e){if(!Ye){var t=e||document.querySelector("#lurija-messages");if(t){var r=function(){t.scrollTop=t.scrollHeight,Le(t)};r(),requestAnimationFrame(function(){r(),requestAnimationFrame(r)})}}}function Bs(e,t){var r=e||document.querySelector("#lurija-messages");if(r){var i=Date.now()+(t||1500),a=-1,n=function(){Ye||a>=0&&r.scrollTop<a-4||(r.scrollTop=r.scrollHeight,a=r.scrollTop,Le(r),Date.now()<i&&requestAnimationFrame(n))};n()}}function ga(e){var t=e||document.querySelector("#lurija-messages");if(t)if(t.querySelector("#lurija-welcome")){var r=function(){t.scrollTop=0,Le(t)};r(),requestAnimationFrame(function(){r(),requestAnimationFrame(r)})}else Qt(t),Bs(t)}function fu(e){var t=e||document.querySelector("#lurija-messages");if(t){var r=!1;try{r=!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}catch{}if(!r&&typeof t.scrollTo=="function")try{t.scrollTo({top:t.scrollHeight,behavior:"smooth"}),Le(t);return}catch{}t.scrollTop=t.scrollHeight,Le(t)}}function Hs(e,t){if(!(!t||!/^[A-Za-z0-9_-]{6,40}$/.test(t))){var r=c("figure","lurija-img-block");r.style.cssText="margin:10px 0;text-align:center;";var i=document.createElement("img");i.src=le+"/api/widget/wiki-asset/"+encodeURIComponent(t),i.alt="",i.loading="lazy",i.style.cssText="max-width:100%;max-height:340px;border-radius:8px;cursor:zoom-in;box-shadow:0 1px 4px rgba(0,0,0,.12);",i.addEventListener("error",function(){r.style.display="none"}),i.addEventListener("load",function(){var n=document.querySelector("#lurija-messages");if(!(!n||!r.isConnected)&&!Ye){var o=n.scrollHeight-n.scrollTop-n.clientHeight;o>0&&o<=r.offsetHeight+120&&(n.scrollTop=n.scrollHeight,Le(n))}}),r.appendChild(i);var a=document.createElement("figcaption");a.className="lurija-img-cap",a.style.cssText="margin-top:6px;font-size:12px;line-height:1.35;color:var(--muted,#64748b);text-align:center;",r.appendChild(a),fetch(le+"/api/widget/media-meta?img="+encodeURIComponent(t)).then(function(n){return n.ok?n.json():null}).then(function(n){if(n){i.alt=n.caption||"";var o=[];if(n.caption){var l=document.createElement("span");l.textContent=n.caption,o.push(l)}if(n.source){var s;n.page_url?(s=document.createElement("a"),s.href=n.page_url,s.target="_blank",s.rel="noopener noreferrer",s.style.color="inherit"):s=document.createElement("span"),s.textContent=(o.length?"\u2014 ":"")+n.source,o.push(s)}for(var d=0;d<o.length;d++)d&&a.appendChild(document.createTextNode(" ")),a.appendChild(o[d])}}).catch(function(){}),i.addEventListener("click",function(){Un(i.src,i.alt||"")}),e.appendChild(r)}}function qs(e,t){if(/^https?:\/\//i.test(t||"")){var r="";try{r=decodeURIComponent(t.split("?")[0].split("#")[0].split("/").pop()||"")}catch{r=""}r||(r="dokuments");var i=c("a","lurija-doc-btn");i.href=t,i.target="_blank",i.rel="noopener noreferrer";try{i.download=r}catch{}i.style.cssText="display:inline-flex;align-items:center;gap:8px;margin:8px 0;padding:9px 14px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:var(--bg,#fff);color:var(--fg,#0f172a);text-decoration:none;font-weight:600;max-width:100%;";var a=document.createElement("span");a.textContent="\u2B07",a.setAttribute("aria-hidden","true");var n=document.createElement("span");n.style.cssText="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",n.textContent=r,i.appendChild(a),i.appendChild(n),fetch(le+"/api/widget/media-meta?doc="+encodeURIComponent(t)).then(function(o){return o.ok?o.json():null}).then(function(o){o&&o.title&&(n.textContent=o.source?o.title+" \xB7 "+o.source:o.title)}).catch(function(){}),e.appendChild(i)}}var Yn=!1;function Ds(){Yn||(Yn=!0,document.addEventListener("click",function(e){var t=e.target;if(!(!t||!t.closest)){var r=t.closest("a[href]");if(r){var i=r.closest("[data-lurija-chat-id]");if(i&&!r.closest(".lurija-cta-card, .lurija-calc-cta")){var a=r.getAttribute("href")||"";if(/^https?:\/\//i.test(a)){var n=parseInt(i.getAttribute("data-lurija-chat-id"),10);if(n)try{fetch(le+"/s/e/link",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({embed_token:J,session_token:de||null,chat_id:n,url:a})}).catch(function(){})}catch{}}}}}},!0))}var Fs=/\[\[(?:calccard|cta|img|doc|nav|field|entry|list|report|valtable|regstatus|regdoc):\s*[^\]]+?\s*\]\]/gi,ri=".lurija-cta-card, .lurija-calc-cta, .lurija-img-block, .lurija-doc-btn, .lurija-valtable, .lurija-sources, .lurija-reg-status, .lurija-reg-doc";function Vs(e){return String(e||"").replace(Fs,"")}function ii(e,t,r,i,a){t=t.replace(/\[\s*sources?\s*:\s*(\[\[(?:img|doc):[^\]]+\]\])\s*\]/gi,"$1"),t=t.replace(/\[\[chips:(?:(?!\]\])[\s\S])*$/i,""),t=t.replace(/\[\[(?:calccard|calc|cta|img|doc|nav|field|entry|list|report|valtable|regstatus|regdoc|chips):?[^\]]*$/i,""),t=t.replace(/\[\[chips:\s*\{[\s\S]*?\}\s*\]\]/gi,"");for(var n=/\[\[(calccard|cta|img|doc|nav|field|entry|list|report|valtable|regstatus|regdoc):\s*([^\]]+?)\s*\]\]/gi,o=function(h){if(h&&h.trim()){var L=document.createElement("div");for(la(L,h,r,i);L.firstChild;)e.appendChild(L.firstChild)}},l=0,s;(s=n.exec(t))!==null;){o(t.slice(l,s.index)),l=s.index+s[0].length;var d=String(s[1]||"").toLowerCase(),u=String(s[2]||"").trim();if(d==="cta"){var f=u.toLowerCase();Wa[f]&&ql(e,f,r,a)}else if(d==="calccard"){var p=u.toLowerCase();ra[p]&&Bl(e,p,r,a)}else d==="img"?Hs(e,u):d==="doc"?qs(e,u):d==="nav"?Xs(e,u.toLowerCase(),r,a):d==="field"?Qs(e,u,r,a):d==="entry"||d==="list"||d==="report"?$s(e,d,u,r,a):d==="valtable"?Gs(e,u):d==="regstatus"?Ys(e,u,r):d==="regdoc"&&Js(e,u,r,a)}o(t.slice(l))}function Us(e){for(e=String(e||"").replace(/-/g,"+").replace(/_/g,"/");e.length%4;)e+="=";var t=atob(e);try{return decodeURIComponent(Array.prototype.map.call(t,function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""))}catch{return t}}var Ws={OK:"ok",NEEDS_CORRECTION:"warning",HIGH_RISK:"error",ERROR:"error"};function Gs(e,t){var r=null;try{r=JSON.parse(Us(t))}catch{r=null}if(!(!r||!Array.isArray(r.groups)||!e)){var i=r.headers||{},a=r.status_labels||{},n=c("div","lurija-valtable"),o=c("div","lurija-valtable-head"),l=Ws[r.verdict]||"skipped",s=c("span","lurija-val-badge lurija-val--"+l);s.textContent=r.verdict_label||r.verdict||"",o.appendChild(s);var d=c("span","lurija-valtable-score"),u=[];typeof r.score=="number"&&u.push(r.score+"/100 "+(i.score||"")),r.counts_label&&u.push(r.counts_label),d.textContent=u.join(" \xB7 "),o.appendChild(d),n.appendChild(o);var f=c("div","lurija-valtable-wrap"),p=c("table"),h=c("thead"),L=c("tr");[i.group||i.check||"Area",i.status||"Status"].forEach(function(x){var T=c("th");T.textContent=x,L.appendChild(T)}),h.appendChild(L),p.appendChild(h);var M=c("tbody");r.groups.forEach(function(x){var T=c("tr","lurija-valtable-row lurija-val--"+(x.state||"ski
15pped")),j=c("td");j.textContent=x.label||x.code||"";var w=c("td"),_=c("span","lurija-val-pill lurija-val--"+(x.state||"skipped"));_.textContent=a[x.state]||x.state||"",w.appendChild(_),T.appendChild(j),T.appendChild(w),M.appendChild(T)}),p.appendChild(M),f.appendChild(p),n.appendChild(f),e.appendChild(n)}}var ja={lv:{progress:"Re\u0123istr\u0101cijas gaita",download:"Lejupiel\u0101d\u0113t",superseded:"Novecojusi versija \u2014 jaun\u0101k\u0101 ir v{v}",unavailable:"Dokuments \u0161obr\u012Bd nav pieejams",kinds:{kr4:"Pieteikums (KR4)",lemums:"Dibin\u0101\u0161anas l\u0113mums",statuti:"Stat\u016Bti",registrs:"Dal\u012Bbnieku re\u0123istra nodal\u012Bjums",kopsavilkums:"Pakas kopsavilkums"},steps:{eligibility:"Atbilst\u012Bba",company:"Uz\u0146\u0113mums",address:"Juridisk\u0101 adrese",capital:"Pamatkapit\u0101ls",founder:"Dibin\u0101t\u0101js",review:"P\u0101rbaude",documents:"Dokumenti",signing:"Parakst\u012B\u0161ana",submission:"Iesnieg\u0161ana",registered:"Re\u0123istr\u0113ts"}},ru:{progress:"\u0425\u043E\u0434 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438",download:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C",superseded:"\u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F \u2014 \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u0430\u044F v{v}",unavailable:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D",kinds:{kr4:"\u0417\u0430\u044F\u0432\u043B\u0435\u043D\u0438\u0435 (KR4)",lemums:"\u0420\u0435\u0448\u0435\u043D\u0438\u0435 \u043E\u0431 \u0443\u0447\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0438",statuti:"\u0423\u0441\u0442\u0430\u0432",registrs:"\u0420\u0430\u0437\u0434\u0435\u043B \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u0443\u0447\u0430\u0441\u0442\u043D\u0438\u043A\u043E\u0432",kopsavilkums:"\u0421\u0432\u043E\u0434\u043A\u0430 \u043F\u0430\u043A\u0435\u0442\u0430"},steps:{eligibility:"\u0421\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",company:"\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F",address:"\u042E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0430\u0434\u0440\u0435\u0441",capital:"\u0423\u0441\u0442\u0430\u0432\u043D\u044B\u0439 \u043A\u0430\u043F\u0438\u0442\u0430\u043B",founder:"\u0423\u0447\u0440\u0435\u0434\u0438\u0442\u0435\u043B\u044C",review:"\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430",documents:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B",signing:"\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u0435",submission:"\u041F\u043E\u0434\u0430\u0447\u0430",registered:"\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u043E"}},en:{progress:"Registration progress",download:"Download",superseded:"Superseded \u2014 the current version is v{v}",unavailable:"The document is not available right now",kinds:{kr4:"Application (KR4)",lemums:"Founding decision",statuti:"Articles of association",registrs:"Shareholder register section",kopsavilkums:"Package summary"},steps:{eligibility:"Eligibility",company:"Company",address:"Legal address",capital:"Share capital",founder:"Founder",review:"Review",documents:"Documents",signing:"Signing",submission:"Submission",registered:"Registered"}},ro:{progress:"Progresul \xEEnregistr\u0103rii",download:"Descarc\u0103",superseded:"Versiune dep\u0103\u0219it\u0103 \u2014 cea curent\u0103 este v{v}",unavailable:"Documentul nu este disponibil momentan",kinds:{kr4:"Cerere (KR4)",lemums:"Decizie de \xEEnfiin\u021Bare",statuti:"Statut",registrs:"Sec\u021Biune din registrul asocia\u021Bilor",kopsavilkums:"Rezumatul pachetului"},steps:{eligibility:"Eligibilitate",company:"Companie",address:"Adres\u0103 juridic\u0103",capital:"Capital social",founder:"Fondator",review:"Verificare",documents:"Documente",signing:"Semnare",submission:"Depunere",registered:"\xCEnregistrat\u0103"}},es:{progress:"Progreso del registro",download:"Descargar",superseded:"Versi\xF3n obsoleta \u2014 la actual es la v{v}",unavailable:"El documento no est\xE1 disponible ahora mismo",kinds:{kr4:"Solicitud (KR4)",lemums:"Acuerdo de constituci\xF3n",statuti:"Estatutos",registrs:"Secci\xF3n del registro de socios",kopsavilkums:"Resumen del paquete"},steps:{eligibility:"Elegibilidad",company:"Empresa",address:"Domicilio social",capital:"Capital social",founder:"Fundador",review:"Revisi\xF3n",documents:"Documentos",signing:"Firma",submission:"Presentaci\xF3n",registered:"Registrada"}}};function Jn(e){return ja[e]||ja[ae]||ja.en}var $n={done:"\u2713",current:"\u25CF",todo:"\u25CB",blocked:"\u2715"},Ks=/^[A-Za-z0-9_-]{6,40}$/;function Ys(e,t,r){if(e){var i=Jn(r),a=i.steps||{},n=[];if(String(t||"").split("|").forEach(function(d){var u=d.indexOf("=");if(!(u<0)){var f=d.slice(0,u).trim().toLowerCase(),p=d.slice(u+1).trim().toLowerCase();Object.prototype.hasOwnProperty.call(a,f)&&($n[p]||(p="todo"),n.push({key:f,state:p}))}}),!!n.length){var o=c("div","lurija-cta-card lurija-cta-secondary lurija-reg-status"),l=c("div","lurija-cta-title");l.textContent=i.progress||"",o.appendChild(l);var s=c("ul","lurija-reg-status-list");
15n.forEach(function(d){var u=c("li","lurija-reg-step lurija-reg-step--"+d.state),f=c("span","lurija-reg-glyph");f.textContent=$n[d.state],f.setAttribute("aria-hidden","true");var p=c("span","lurija-reg-step-label");p.textContent=a[d.key],u.appendChild(f),u.appendChild(p),s.appendChild(u)}),o.appendChild(s),e.appendChild(o)}}}function Js(e,t,r,i){if(e){var a=String(t||"").split("|");if(!(a.length<4)){var n=String(a[0]||"").trim();if(Ks.test(n)){var o=String(a[1]||"").trim().toLowerCase(),l=String(a[2]||"").trim(),s=String(a.slice(3).join("|")||"").trim(),d=Jn(r),u=d.kinds&&d.kinds[o]||o,f=c("div","lurija-cta-card lurija-cta-secondary lurija-reg-doc"),p=c("div","lurija-cta-title");p.textContent=s||u,f.appendChild(p);var h=c("div","lurija-cta-body lurija-reg-doc-sub");h.textContent=l?u+" \xB7 v"+l:u,f.appendChild(h);var L=c("button","lurija-cta-btn");L.type="button",L.textContent=d.download||"";var M=function(x,T){var j=f.querySelector(".lurija-reg-doc-note");j&&f.removeChild(j);var w=c("div","lurija-reg-doc-note");w.textContent=x,!T&&L.parentNode===f?f.replaceChild(w,L):f.appendChild(w),T&&(L.disabled=!1)};L.addEventListener("click",function(){L.disabled||(L.disabled=!0,ai("regdoc",n,i),fetch(le+"/s/rd/sign",{method:"POST",headers:it(),body:JSON.stringify({embed_token:J,session_token:de||null,public_id:n})}).then(function(x){if(!x.ok)throw new Error("sign "+x.status);return x.json()}).then(function(x){if(x=x||{},x.is_current===!1){M(String(d.superseded||"").replace("{v}",String(x.current_version!=null?x.current_version:"")));return}var T=Sn(String(x.url||""));if(!T)throw new Error("sign: no url");var j=document.createElement("a");j.href=T,j.target="_blank",j.rel="noopener noreferrer",document.body.appendChild(j),j.click(),j.remove(),L.disabled=!1}).catch(function(){M(d.unavailable||"",!0)}))}),f.appendChild(L),e.appendChild(f)}}}}function $s(e,t,r,i,a){if(!(!$||!e)){var n=String(r||"").split("|");if(!(n.length<2)){var o=String(n[0]||"").trim().toLowerCase(),l=$r(String(n[1]||"").trim()),s=String(n.slice(2).join("|")||"").trim();if(!(!o||!l)){var d=xa(i),u=document.createElement("div");u.className="lurija-cta-card lurija-cta-secondary lurija-nav-card lurija-link-card lurija-link-card--"+t;var f=document.createElement("div");f.className="lurija-cta-title",f.textContent=s||(t==="entry"?"#"+o:o),u.appendChild(f);var p=t==="entry"?d.entry||"":t==="list"?d.list||"":d.report||"";if(p){var h=document.createElement("div");h.className="lurija-cta-body",h.textContent=p,u.appendChild(h)}var L=document.createElement("button");L.type="button",L.className="lurija-cta-btn",L.textContent=d.open,L.addEventListener("click",function(){ai(t,o,a);try{window.location.href=l}catch{}}),u.appendChild(L),e.appendChild(u)}}}}var ba={lv:{open:"Atv\u0113rt",show:"R\u0101d\u012Bt lauku",field:"Lauks form\u0101",notHere:"\u0160is lauks \u0161aj\u0101 lap\u0101 nav pieejams",locked:"Nav pieejams j\u016Bsu pl\u0101n\u0101",entry:"Gr\u0101matved\u012Bbas ieraksts",list:"Saraksts ar filtriem",report:"P\u0101rskats"},ru:{open:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C",show:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u043E\u043B\u0435",field:"\u041F\u043E\u043B\u0435 \u0444\u043E\u0440\u043C\u044B",notHere:"\u042D\u0442\u043E \u043F\u043E\u043B\u0435 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043D\u0430 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",locked:"\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0432 \u0432\u0430\u0448\u0435\u043C \u043F\u043B\u0430\u043D\u0435",entry:"\u0411\u0443\u0445\u0433\u0430\u043B\u0442\u0435\u0440\u0441\u043A\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C",list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0441 \u0444\u0438\u043B\u044C\u0442\u0440\u0430\u043C\u0438",report:"\u041E\u0442\u0447\u0451\u0442"},en:{open:"Open",show:"Show field",field:"Form field",notHere:"This field is not on this page",locked:"Not available on your plan",entry:"Bookkeeping entry",list:"Filtered list",report:"Report"},ro:{open:"Deschide",show:"Arat\u0103 c\xE2mpul",field:"C\xE2mp din formular",notHere:"Acest c\xE2mp nu exist\u0103 pe aceast\u0103 pagin\u0103",locked:"Indisponibil \xEEn planul t\u0103u",entry:"\xCEnregistrare contabil\u0103",list:"List\u0103 filtrat\u0103",report:"Raport"},es:{open:"Abrir",show:"Mostrar campo",field:"Campo del formulario",notHere:"Este campo no est\xE1 en esta p\xE1gina",locked:"No disponible en tu plan",entry:"Registro contable",list:"Lista filtrada",report:"Informe"}};function xa(e){return ba[e]||ba[ae]||ba.en}function ai(e,t,r){try{fetch(le+"/s/e/cta",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({embed_token:J,session_token:de||null,chat_id:r||null,cta_key:t,kind:e})}).catch(function(){})}catch{}}function hu(e,t){if(t){var r=document.createElement("p");r.textContent=t,e.appendChild(r)}}function Xs(e,t,r,i){if(!(!$||!e)){var a=Ko(t),n=a?$r(a.path):null;if(!(!a||!n)){var o=xa(r),l=document.createElement("div");l.className="lurija-cta-card lurija-cta-secondary lurija-nav-card";var s=document.createElement("div");if(s.className="lurija-cta-title",s.textContent=a.label||t,l.appendChild(s),a.description){var d=document.createElement("div");d.className="lurija-cta-body",d.textContent=a.description,l.appendChild(d)}var u=document.createElement("button");u.type="button",u.className="lurija-cta-btn",a.available===!1?(u.textContent=o.locked,u.disabled=!0,l.classList.add("lurija-nav-card--locked")):(u.textContent=o.open,u.addEventListener("click",function(){ai("nav",t,i);try{window.location.href=n}catch{}})),l.appendChild(u),e.appendChild(l)}}}var wa="lurija_field_hl",Zs=6e4;function Xn(e,t){if(!e||!t)return!1;var r=String(e).split("?")[0].split("#")[0].replace(/\/+$/,""),i=String(t).split("?")[0].split("#")[0].replace(/\/+$/,"");return r===i}function Qs(e,t,r,i){if(!(!$||!e)){var a=String(t||"").split("|"),n=(a[0]||"").trim().toLowerCase(),o=$r((a[1]||"").trim()),l=(a[2]||"").trim(),s=location.pathname,d=!!o&&!Xn(o,s),u=Yo(n);if(!(!u&&!d)){u||(u={slug:n,label:l||n});var f=String(u.slug||u.id||n),p=f.replace(/^id_/i,""),h=function(){try{return document.getElementById(f)||document.getElementById("id_"+p)||document.querySelector('[name="'+f+'"]')||document.querySelector('[name="'+p+'"]')}catch{return null}},L=xa(r),M=document.createElement("div");M.className="lurija-cta-card lurija-cta-secondary lurija-field-card";var x=document.createElement("div");
15x.className="lurija-cta-title",x.textContent=u.label||n,M.appendChild(x);var T=document.createElement("div");T.className="lurija-cta-body",T.textContent=L.field+(u.tab?" \xB7 "+u.tab:""),M.appendChild(T);var j=document.createElement("button");j.type="button",j.className="lurija-cta-btn",j.textContent=L.show,j.addEventListener("click",function(){if(ai("field",p,i),d){try{sessionStorage.setItem(wa,JSON.stringify({path:o,slug:f,ts:Date.now()}))}catch{}try{window.location.href=o}catch{}return}var w=!1;if(dr)try{w=dr(f)!==!1}catch{w=!1}else{var _=h();if(_){try{_.scrollIntoView({block:"center",behavior:"smooth"}),_.focus()}catch{}w=!0}}if(!w){T.textContent=L.notHere;return}if(Qe()){try{window.Lurija&&typeof window.Lurija.close=="function"&&window.Lurija.close()}catch{}return}$&&ze==="fullscreen"&&ea("pane");var A=function(){var K=document.activeElement,R=document.getElementById("lurija-root");return K&&K!==document.body&&!(R&&R.contains(K))?K:h()};[450,1e3].forEach(function(K){setTimeout(function(){window.__lurijaAvoidElement&&window.__lurijaAvoidElement(A())},K)})}),M.appendChild(j),e.appendChild(M)}}}function ni(e,t,r,i,a){var n=!!(e&&e.classList&&e.classList.contains("lurija-msg--pending"));for(e&&e.classList&&e.classList.remove("lurija-msg--pending"),e&&i&&e.setAttribute("data-lurija-chat-id",String(i)),Ds();e.firstChild;)e.removeChild(e.firstChild);if(t){var o={byUrl:{},list:[]};if(ii(e,t,r,o,i),o.list.length&&e.appendChild(ia(o.list,r)),Lr(e,r),a)for(var l=e.querySelectorAll(ri),s=0;s<l.length;s++)l[s].classList.add("lurija-elin");n&&e.classList.add("lurija-elin")}}function oi(e,t){if(!(!$||!e||!t||typeof t!="string")){var r=e.querySelector(".lurija-msg-tools");r&&r.parentNode===e&&e.removeChild(r);var i=t.replace(/\[\[[a-z]+:[^\]]*\]\]/gi,"").replace(/\n{3,}/g,` 16 17`).trim();if(i){var a=c("div","lurija-msg-tools"),n=c("button","lurija-copy-btn");n.type="button",Se(n,b.copyMsg),n.innerHTML=Dn,n.addEventListener("click",function(){function o(){n.classList.add("lurija-copy-btn--done"),n.innerHTML=js,Se(n,b.copiedMsg),setTimeout(function(){n.classList.remove("lurija-copy-btn--done"),n.innerHTML=Dn,Se(n,b.copyMsg)},1600)}function l(){try{var s=document.createElement("textarea");s.value=i,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s),o()}catch{}}try{navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(i).then(o,l):l()}catch{l()}}),a.appendChild(n),e.appendChild(a)}}}function ht(e,t,r,i,a,n,o){const l=document.getElementById("lurija-welcome");l&&l.remove();const s=document.createElement("div");if(s.className="lurija-msg "+e,e==="accountant"||e==="system"){var d=c("div","lurija-msg-author"),u=n&&n.name||m("acctRoleLabel");d.appendChild(kr(u));var f=c("span","lurija-msg-author-name");f.textContent=u,d.appendChild(f);var p=c("span","lurija-msg-author-role");p.textContent=e==="system"?"":m("acctRoleLabel"),d.appendChild(p);var h=c("span","lurija-msg-author-time");h.textContent=nl(o),d.appendChild(h),s.appendChild(d);var L=c("div","lurija-msg-body");L.textContent=t,s.appendChild(L);var M=r.querySelector(".lurija-status-slot");return M?r.insertBefore(s,M):r.appendChild(s),r.scrollTop=r.scrollHeight,Le(r),s}if(e==="assistant"&&t!=="\u2026"?(ni(s,t,a,null,!1),oi(s,t)):(s.textContent=t,t!=="\u2026"&&oi(s,t)),i&&i.length){var x=document.createElement("div");x.className="lurija-msg-attachments lurija-elin",i.forEach(function(j){x.appendChild(Vn(j,{}))}),s.appendChild(x)}var T=r.querySelector(".lurija-status-slot");return T?r.insertBefore(s,T):r.appendChild(s),r.scrollTop=r.scrollHeight,Le(r),s}async function at(e,t,r,i){if(ol())return _n(e,t,r);if(!xt){var a=document.getElementById("lurija-consent-err");a&&(a.style.display="");var n=document.getElementById("lurija-consent-row");if(n&&n.scrollIntoView)try{n.scrollIntoView({block:"nearest"})}catch{}return}if(ut&&i!==!1){var o=ut;if(o.el&&o.el.isConnected&&!(!o.free&&Po(e,Dr,o.opts))){ut=null,o.fn(e);return}ut=null,cr=!1}var l=Ur,s=null;Ur=null;var d=cr;if(cr=null,t.disabled=!0,!wo()){Nt=null,St(!0),Hr();return}ar=!0;var u=++tt,f=typeof AbortController<"u"?new AbortController:null;
17Wt=f,Na(),Br.post("turn:start",{convId:xe}),Je=C,ye(r,"thinking",b.thinking),r.classList.add("lurija-messages--sending"),Yt();var p=kt;kt=[];var h=p.map(function(N){return N.name}),L=p.map(function(N){return{name:N.name,url:N.url,kind:N.kind}}),M=document.getElementById("lurija-doc-pills");if(M)for(;M.firstChild;)M.removeChild(M.firstChild);ne.push({role:"user",content:e,attachments:h});var x=null;i!==!1&&(x=ht("user",e,r,L));var T={text_length:(e||"").length,attachments_count:h.length,is_clarify_reply:i===!1};Vt||(Vt=!0,ct("chat_start",T)),ct("message_sent",T);const j=ht("assistant","\u2026",r);let w="",_=null,A=!1,K=!0,R=null,te=null,ue=null,ve=null,F=null,y=b.thinking;var S=0;let E=!0;$t(j,y,r);var ee=12,V=!1,fe=0,re=!1;function g(){return x&&x.isConnected?x:j&&j.isConnected?j:null}function k(){return!!(re||!g()||_&&_.route==="clarify")}function O(){var N=48;try{N=Math.max(N,(parseFloat(r.style.paddingTop)||0)+ee)}catch{}return Math.max(0,r.scrollTop+(g().getBoundingClientRect().top-r.getBoundingClientRect().top)-N)}function C(){if(u!==tt)return!1;if(k())return mt&&mt(null),V=!1,Ye=!1,r.scrollTop=r.scrollHeight-r.clientHeight,!0;if(V)return!1;var N=O();return mt&&mt(N),r.scrollTop=Math.min(N,r.scrollHeight-r.clientHeight),fe=r.scrollTop,!0}wt=function(){u!==tt||k()||(V=!1,C(),V=!0,setTimeout(function(){u===tt&&wt&&wt.atAnchor()&&(V=!1,C(),V=!0)},320))},wt.atAnchor=function(){return Math.abs(r.scrollTop-fe)<=4};function U(){return k()?ke():!V}Ye=!0,C(),requestAnimationFrame(function(){C(),requestAnimationFrame(function(){C(),V=!0})});function ke(){return r.scrollHeight-r.scrollTop-r.clientHeight<=48}var he=[],Ae=!1;function me(N){he.push(N),P()}function v(N){me(function(){var q=document.createElement("div");q.className="lurija-grow";var Y=j&&j.querySelector?j.querySelector(".ikw-wizard"):null;H&&H.parentNode===j?j.insertBefore(q,H):Y&&Y.parentNode===j?j.insertBefore(q,Y):j.appendChild(q);try{N(q)}catch{}return q.firstChild?(Le(r),q):(q.remove(),null)})}function P(){if(!Ae){var N=he.shift();if(N){Ae=!0;var q=function(){Ae=!1,P()},Y=U(),G=null;try{G=N()}catch{}var ie=G&&G.firstElementChild,_e=G&&G.lastElementChild,be=function(){if(G){ie&&(ie.style.marginTop=""),_e&&(_e.style.marginBottom="");var bt=G.parentNode;if(bt){for(;G.firstChild;)bt.insertBefore(G.firstChild,G);bt.removeChild(G)}G=null}},ce=!1;try{ce=!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}catch{}if(!G||ce||!Y&&!V){be(),Y&&C(),he.length?requestAnimationFrame(q):q();return}ie&&(ie.style.marginTop="0px"),_e&&(_e.style.marginBottom="0px");var Ne=G.offsetHeight;if(!(Ne>0)){be(),he.length?requestAnimationFrame(q):q();return}G.style.height="0px",C();var Ke=Math.max(150,300-he.length*26),ge=window.performance&&performance.now()||0,Ce=function(bt){return 1-Math.pow(1-bt,3)},vo=function(bt){var mo=Math.min(1,((bt||0)-ge)/Ke);if(G.style.height=Ne*Ce(mo)+"px",C(),mo<1){requestAnimationFrame(vo);return}be(),q()};requestAnimationFrame(vo)}}}function B(N){me(function(){try{N()}catch{}return null})}let z=!1,W=0,Z=!1;var X=0,je={byUrl:{},list:[]},Q=!1,H=null,Me=0;function we(){var N=w.length;return Me>=N?(Me=N,!1):(Me=Math.min(N,Me+Math.max(1.5,(N-Me)*.22)),Me<N)}function He(){Me=w.length}function nt(){return w.slice(0,Math.floor(Me))}var Rt=5;function Pt(N){for(var q=document.createTreeWalker(N,NodeFilter.SHOW_TEXT,null),Y=null,G;G=q.nextNode();)G.nodeValue&&G.nodeValue.length&&(Y=G);if(Y&&!(Y.parentNode&&Y.parentNode.closest&&Y.parentNode.closest(".lurija-ref, "+ri))){var ie=Math.max(0,Y.nodeValue.length-Rt),_e=ie>0?Y.splitText(ie):Y;if(_e.parentNode){var be=document.createElement("span");be.className="lurija-edge",_e.parentNode.insertBefore(be,_e),be.appendChild(_e)}}}function De(N){if(Z){H&&(H.parentNode&&H.parentNode.removeChild(H),H=null);return}if(!ot()&&!lt()&&!(!N&&(Ae||he.length))){var q=_&&_.user_lang,Y=nt().replace(/\[\[chips:(?:(?!\]\])[\s\S])*$/i,"").replace(/\[\[[^\]]*$/,"").replace(/\[action:[^\]]*$/,"").replace(/[[(<]\s*(?:sources?|src)\s*:[^\])>\n]*$/i,"").replace(/[[(<]\s*(?:sources?|sourc|sour|sou|so|src|sr|s)?\s*$/i,""),G=Y.slice(X);if(!G.trim()){H&&(H.parentNode&&H.parentNode.removeChild(H),H=null);return}var ie=U();for(H||(H=document.createElement("div"),H.className="lurija-live",j.appendChild(H
17),_a(j));H.firstChild;)H.removeChild(H.firstChild);ii(H,Vs(ta(G,q,!1)),q,{byUrl:Object.assign({},je.byUrl),list:je.list.slice()},ue),!Z&&Me<w.length&&Pt(H),H.firstChild&&j&&j.classList&&(j.classList.remove("lurija-msg--pending"),_i(ue)),Le(r),ie&&C()}}function ot(){return!!(_&&_.route==="debug")}function lt(){return!!(_&&_.pre_display)&&!ot()}function La(N){for(var q=document.createDocumentFragment(),Y=String(N??"").split(` 18`),G=function(Ne){return Ne!=null&&Ne.trim().slice(0,3)==="```"},ie=0;ie<Y.length;){if(G(Y[ie])){ie++;for(var _e=[];ie<Y.length&&!G(Y[ie]);)_e.push(Y[ie]),ie++;ie++;var be=document.createElement("pre");be.className="lurija-debug-out",be.textContent=_e.join(` 19`),q.appendChild(be);continue}for(var ce=[];ie<Y.length&&!G(Y[ie]);)ce.push(Y[ie]),ie++;ce.join(` 20`).split(/\n\s*\n/).forEach(function(Ne){var Ke=Ne.replace(/\*\*/g,"").replace(/^\s*>\s?/gm,"").trim();if(Ke){var ge=document.createElement("div");ge.className="lurija-debug-note",ge.textContent=Ke,q.appendChild(ge)}})}return q}function ci(N){if(ot())return String(N||"").trim()?(Q||(Q=!0,j&&j.classList&&j.classList.remove("lurija-msg--pending"),_i(ue)),v(function(ge){ge.appendChild(La(N))}),!0):!1;var q=document.createDocumentFragment();if(ii(q,ta(N,_&&_.user_lang),_&&_.user_lang,je,ue),!q.firstChild)return!1;Q||(Q=!0,j&&j.classList&&j.classList.remove("lurija-msg--pending"),_i(ue));for(var Y=[],G;G=q.firstChild;)q.removeChild(G),G.nodeType===1&&Lr(G,_&&_.user_lang),Y.push(G);for(var ie=function(ge){return!ge||ge.nodeType!==1?!1:ge.matches&&ge.matches(ri)?!0:!!(ge.querySelector&&ge.querySelector(ri))},_e=function(ge){var Ce=j&&j.querySelector?j.querySelector(".ikw-wizard"):null;H&&H.parentNode===j?j.insertBefore(ge,H):Ce&&Ce.parentNode===j?j.insertBefore(ge,Ce):j.appendChild(ge)},be=[],ce=function(){if(be.length){var ge=be;be=[],me(function(){for(var Ce=0;Ce<ge.length;Ce++)_e(ge[Ce]);return _a(j),De(!0),Le(r),null})}},Ne=lt(),Ke=0;Ke<Y.length;Ke++){if(!Ne&&!ie(Y[Ke])){be.push(Y[Ke]);continue}ce(),function(ge){v(function(Ce){Ce.appendChild(ge)}),B(function(){_a(j),De(!0)})}(Y[Ke])}return ce(),!0}function Ct(N){if(!(Z&&!N)&&!(ot()&&!N)){var q=N||lt()?w:nt();N||(q=q.replace(/\[\[chips:(?:(?!\]\])[\s\S])*$/i,""),q=q.replace(/\[\[[^\]]*$/,""),q=q.replace(/[[(<]\s*(?:sources?|src)\s*:[^\])>\n]*$/i,""));var Y=q.slice(X);if(Y){var G,ie;if(N)G=Y,ie=Y.length;else{var _e=Y.lastIndexOf(` 21 22`);if(_e<0)return;G=Y.slice(0,_e),ie=_e+2;var be=G.replace(/\s+$/,""),ce=be.lastIndexOf(` 23 24`),Ne=be.slice(ce+2);if(/^#{1,6}\s+\S/.test(Ne)&&Ne.indexOf(` 25`)===-1){if(ce<0)return;G=be.slice(0,ce),ie=ce+2}}if(!G.trim()){X+=ie;return}ci(G),X+=ie}}}function Bt(){z||(z=!0,W=requestAnimationFrame(function(){if(z=!1,!Z){var N=we();Ct(!1),De(!1),N&&Bt()}}))}var Ht=null;function _t(){Ht&&(clearTimeout(Ht),Ht=null)}try{let _e=function(){_t(),ko(),Ht=setTimeout(function(){_stallWarned=!0;try{ye(r,b.stillWorking||null)}catch{}Ht=setTimeout(function(){try{Y.cancel()}catch{}},xo-Oa)},Oa)};await on();const N={"Content-Type":"application/json"};Re&&(N.Authorization="Bearer "+Re);var Sa=!ne.some(function(ce){return ce.role==="assistant"}),oe={messages:[{role:"user",content:e}],embed_token:J,session_token:de,page_context:Ut(),attached_docs:p,widget_style:hr,chat_consent:!0};vr&&(oe.from_suggestion=vr),l&&(oe.input_mode=l),i===!1?oe.wizard_reply=!0:d!==null&&(oe.wizard_reply=d),Nt!=null&&(oe.journal_review=Nt,oe.lang=ae,s=Nt,Nt=null),Sa&&Array.isArray(b.starters)&&b.starters.length&&(oe.suggestion_set=b.starters.slice()),vr=null;const q=await fetch(le+"/s/m",{method:"POST",headers:N,body:JSON.stringify(oe),signal:f?f.signal:void 0});if(!q.ok){var Oe="";try{var Ge=await q.json();Oe=Ge&&Ge.detail}catch{}q.status>=400&&q.status<500&&(K=!1);var qe=new Error(Oe||b.streamError);throw qe}const Y=q.body.getReader(),G=new TextDecoder;let ie="";for(_e();;){const{done:ce,value:Ne}=await Y.read();if(ce){_t();break}_e(),ie+=G.decode(Ne,{stream:!0});const Ke=ie.split(` 26`);ie=Ke.pop();for(const ge of Ke){if(!ge)continue;const Ce=Fl(ge);if(Ce){if(Ce.code==="0"&&typeof Ce.value=="string")w+=Ce.value,Bt();else if(Ce.code==="2"&&Array.isArray(Ce.value))for(var tr=0;tr<Ce.value.length;tr++){var I=Ce.value[tr];if(I&&I.kind==="debug"&&Dl(I),I&&I.kind==="meta"&&(_=I,I.user_lang&&Fr(I.user_lang),I.route==="registration"&&Ni(I.placeholder),I.route==="clarify"&&Je===C&&C(),oo(_,r,t,j,null)&&Le(r)),I&&I.kind==="followups"&&Array.isArray(I.suggestions)&&(R=I.suggestions),I&&I.kind==="chat_id"&&I.chat_id&&(ue=I.chat_id),I&&I.kind==="closure"&&(F=I),I&&I.kind==="self_eval"&&typeof I.score=="number"&&I.score>=Eo&&_&&_.route==="agentic"&&ct("good_answer",{chat_id:ue||null,self_eval_score:I.score}),I&&I.kind==="next_steps"&&Array.isArray(I.items)&&(te=I.items),I&&I.kind==="answer_complete"&&u===tt&&(ve===null&&(ve=yi()),(!_||_.route!=="clarify")&&(t.disabled=!1),r.classList.remove("lurija-messages--sending"),lt()&&w.length&&Ct(!0)),I&&I.kind==="answer_correction"&&(I.reason==="script_demix"||I.reason==="section_headings")&&typeof I.text=="string"&&I.text.length){for(w=I.text,He(),he.length=0,X=0,je={byUrl:{},list:[]},Q=!1,H=null;j.firstChild;)j.removeChild(j.firstChild);Ct(!1),De(!1)}if(I&&I.kind==="clarify_pending"&&!w&&(y=as(_&&_.user_lang),$t(j,y,r)),I&&I.kind==="error"&&I.retryable===!1&&(K=!1),I&&I.kind==="status"&&I.label&&(y=I.label,w?ye(r,"thinking",y):$t(j,y,r),S&&(clearTimeout(S),S=0),I.after&&I.after.label)){var cu=I.label;S=setTimeout(function(){S=0,!(y!==cu||w)&&(!j||!j.classList||!j.classList.contains("lurija-msg--pending")||(y=I.after.label,$t(j,y,r)))},Math.max(2e3,Number(I.after.ms)||8e3))}I&&I.kind==="review_checking"&&!w&&(y=Qn[ae]||Qn.lv,$t(j,y,r))}else if(Ce.code==="3")throw new Error(typeof Ce.value=="string"?Ce.value:"Stream error")}}}if(u!==tt)return;var rr=_&&_.user_lang||null;rr&&Fr(rr);const be=ot()?w:ta(w,_&&_.user_lang);E=U(),He(),Z=!0,W&&cancelAnimationFrame(W),z=!1,Ct(!0),B(function(){De(!0)}),Q||(j&&j.classList&&j.classList.remove("lurija-msg--pending"),ni(j,be||"(no response)",rr,ue,!0)),B(function(){oi(j,be)});var qt=!!(_&&_.route==="clarify"),so=!_||_.route==="agentic",uo=!!(F&&F.strings&&so),co=qt||uo||R&&R.length||te&&te.length,Nr=function(ce){ce&&(ce.classList&&ce.classList.remove("lurija-elin"),v(function(Ne){Ne.appendChild(ce)}))};if(je.list.length&&Nr(ia(je.list,rr)),ne.push({role:"assistant",content:be,lang:rr}),co&&me(function(){return Ar(j,uo?"happy":"waiting"),Le(r),null}),!qt&&R&&R.length)Nr(Zr(R,t,r));else if(!qt){var po=Zr(null,t,r);po&&Nr(po)}!qt&&ue&&Nr(In(ue)),!qt&&te&&te.length&&Nr(On(te,rr||ae,ue));var fo=!1;if(F&&F.strings&&so&&(fo=!0,v(function(ce){no(F.strings,r,ce,ue);var Ne=ce.querySelector(".lurija-closure");Ne&&Ne.classList.remove("lurija-elin")})),qt||B(function(){co?ye(r,null):ye(r,fo?"happy":"waiting")}),qt){var du=_.clarify_questions||[],mu=Array.isArray(_.clarify_questions_options)?_.clarify_questions_options:_.clarify_options&&_.clarify_options.length?[_.clarify_options].concat(du.slice(1).map(function(){return[]})):[],gu=Array.isArray(_.clarify_questions_multi)?_.clarify_questions_multi:[],ju=Array.isArray(_.clarify_questions_actions)?_.clarify_questions_actions:[];E=!0,me(function(){return oo(_,r,t,j,be),Le(r),null}),B(function(){ye(r,null)})}E&&B(C)}catch(N){let q=function(){ne.length&&ne[ne.length-1].role==="user"&&(ne.pop(),void 0),j&&j.parentNode&&j.remove(),x&&x.parentNode&&x.remove(),ye(r,null),Ur=l,s!=null&&(Nt=s),at(e,t,r,i
26)};if(_t(),u!==tt)return;A=!0,Pi=0;var ho=K,di;N&&N.kind==="session"?di=N.message||b.sessionError:ho?di=m("streamError",Dr)||b.streamError:di=N&&N.message?N.message:b.streamError,fa(j,di,ho,q),ye(r,null),Zt(r,null),re=!0,C()}finally{Z=!0,W&&cancelAnimationFrame(W),u===tt&&(t.disabled=!1,r.classList.remove("lurija-messages--sending"),Ho(),ar=!1,yo(),Br.post("turn:done",{convId:xe}),$&&hn()),$&&pt(),Wt===f&&(Wt=null),So(ue,ve===null?yi():ve),E&&u===tt&&C(),Je===C&&(Je=null,wt=null,B(function(){u===tt&&(Ye=!1,mt&&mt(r.scrollTop))}),setTimeout(function(){Je||(Ye=!1)},6e3)),Le(r)}}function ya(e,t,r){var i=e&&e._lurijaVoiceCtl;if(i&&i.active()){i.finalizeThen(function(){ya(e,t,r)});return}const a=e.value.trim();if(!(!a||t.disabled)){if(!xt){at(a,t,r);return}i&&i.takeVoice()&&(Ur="voice"),e.value="",Ie(e),at(a,t,r)}}var eu=["cits","cita","other","\u0434\u0440\u0443\u0433\u043E\u0435","\u0434\u0440\u0443\u0433\u043E\u0439"];function tu(e){return eu.indexOf(String(e||"").trim().toLowerCase())!==-1}var vu={lv:"Aprakstiet savu situ\u0101ciju:",ru:"\u041E\u043F\u0438\u0448\u0438\u0442\u0435 \u0432\u0430\u0448\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044E:",en:"Describe your situation:",ro:"Descrie situa\u021Bia ta:",es:"Describe tu situaci\xF3n:"},Zn={lv:"Main\u012Bt atbildi",ru:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442",en:"Change answer",ro:"Schimb\u0103 r\u0103spunsul",es:"Cambiar respuesta"};function er(e){var t=document.getElementById("lurija-bar"),r=document.getElementById("lurija-doc-pills");t&&(t.style.display=e?"none":""),r&&(r.style.display=e?"none":"")}function li(){var e=document.getElementById("lurija-input");if(e)try{e.focus()}catch{}}var Qn={lv:"P\u0101rbaudu ierakstu\u2026",ru:"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u044E \u0437\u0430\u043F\u0438\u0441\u044C\u2026",en:"Checking the entry\u2026",ro:"Verific \xEEnregistrarea\u2026",es:"Reviso el registro\u2026"},eo={lv:"L\u016Bdzu, p\u0101rbaudi \u0161o gr\u0101matojumu: {label}. Sniedz atgriezenisko saiti.",ru:"\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u0440\u043E\u0432\u0435\u0440\u044C \u044D\u0442\u0443 \u0437\u0430\u043F\u0438\u0441\u044C: {label}. \u0414\u0430\u0439 \u043E\u0431\u0440\u0430\u0442\u043D\u0443\u044E \u0441\u0432\u044F\u0437\u044C.",en:"Please review this entry: {label}. Give me feedback.",ro:"Te rog s\u0103 verifici aceast\u0103 \xEEnregistrare: {label}. D\u0103-mi feedback.",es:"Revisa este registro: {label}. Dame tu valoraci\xF3n."},to={lv:"L\u016Bdzu, p\u0101rbaudi \u0161o gr\u0101matojumu un sniedz atgriezenisko saiti.",ru:"\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u0440\u043E\u0432\u0435\u0440\u044C \u044D\u0442\u0443 \u0437\u0430\u043F\u0438\u0441\u044C \u0438 \u0434\u0430\u0439 \u043E\u0431\u0440\u0430\u0442\u043D\u0443\u044E \u0441\u0432\u044F\u0437\u044C.",en:"Please review this entry and give me feedback.",ro:"Te rog s\u0103 verifici aceast\u0103 \xEEnregistrare \u0219i s\u0103 \xEEmi dai feedback.",es:"Revisa este registro y dame tu valoraci\xF3n."},ru=1e4,iu=18e4,si=100;function ka(e,t){var r=!!(t&&t.idle),i=Math.ceil((t&&t.mountMs||ru)/si),a=Math.ceil((t&&t.idleMs||iu)/si),n=0,o=0;(function l(){var s=document.querySelector("#lurija-messages"),d=document.getElementById("lurija-send");if(!s||!d){if(++n>i)return;var u=window.Lurija;if(u&&u.open)try{u.open()}catch{}setTimeout(l,si);return}if(r&&(d.disabled||ar)){if(++o>a)return;setTimeout(l,si);return}e(d,s)})()}function ui(){var e=window.Lurija;if(e&&e.open)try{e.open()}catch{}}function au(e,t){if(!(typeof e!="string"&&typeof e!="number")){var r=String(e).trim();if(r){var i=!!(t&&t.newChat);ui(),ka(function(a,n){if(ui(),!i||!xt){ro(r,a,n);return}Mr(n,function(o){o&&ka(function(l,s){ro(r,l,s)},{idle:!0})})},{idle:!0})}}}function ro(e,t,r){if(ut=null,cr=!1,se()&&pe!=="lurija"){var i=jr!=null;pe="lurija",Pe=null,jr=null,zt(),Ue(),Jr(),i&&Cr(r)}at(e,t,r)}function nu(e,t){var r=parseInt(e,10);!r||!$||(ui(),ka(function(i,a){ui(),fetch(le+"/s/h/n",{method:"POST",headers:it(),body:JSON.stringify({embed_token:J})}).then(function(n){if(!n.ok)throw new Error("new chat failed");return n.json()}).then(function(n){Cr(a),n&&n.conversation_id&&(xe=n.conversation_id),Oi(n),Vt=!1,xr(null,""),pt(),Nt=r;var o=(typeof t=="string"?t:"").replace(/\s+/g," ").trim().slice(0,160),l=o?(eo[ae]||eo.lv).replace("{label}",o):to[ae]||to.lv;at(l,i,a)}).catch(function(){})}))}function Mr(e,t){var r=function(l){if(typeof t=="function")try{t(l)}catch{}};if($){var i=document.getElementById("lurija-send");i&&(i.disabled=!0);var a=function(){i&&(i.disabled=!1),li()};fetch(le+"/s/h/n",{method:"POST",headers:it(),body:JSON.stringify({embed_token:J})}).then(function(l){if(!l.ok)throw new Error("new chat failed");return l.json()}).then(function(l){Cr(e),l&&l.conversation_id&&(xe=l.conversation_id),Vt=!1;var s=function(d){at(d,i,e)};e.appendChild(ei(s)),ti(s,"new-chat"),xr(null,""),ga(e),pt(),a(),r(!0)}).catch(function(){a(),r(!1)});return}for(ne=[],Yt(),Ze(Ta),Ze(zr),de=null,xe=null,or=!1,Vt=!1;e.firstChild;)e.removeChild(e.firstChild);var n=document.getElementById("lurija-send"),o=function(l){at(l,n,e)};e.appendChild(ei(o)),ti(o,"new-chat"),er(!1),li(),r(!0)}function Ca(e,t,r,i){try{var a={embed_token:J,session_token:de,chat_id:e||null,choice:t,email:r||null,lang:ae};i&&(a.consent_answer=!!i.answer,a.consent_newsletter=!!i.newsletter),fetch(le+"/s/k",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch{}}function io(e,t,r){var i=document.createElement("button");i.className="lurija-closure-clear",i.textContent=t.clear||"",i.addEventListener("click",function(){Mr(r)}),e.appendChild(i)}var ou=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function ao(e,t){var r=document.createElement("div");r.className="lurija-closure-consent-row";var i=document.createElement("input");i.type="checkbox",i.className="lurija-consent-cb",i.id="lurija-closure-cb-"+t;var a=document.createElement("label");return a.className="lurija-closure-consent-label",a.htmlFor=i.id,a.textContent=e||"",r.appendChild(i),r.appendChild(a),{row:r,cb:i,setLabel:function(n){a.textContent=n||""}}}
26function lu(e,t,r,i){for(;e.firstChild;)e.removeChild(e.firstChild);var a=document.createElement("div");a.className="lurija-closure-consent",a.textContent=m("closureConsentNotice")||t.confirm||"",e.appendChild(a);var n=ao(m("closureConsentAnswer"),"answer"),o=ao(m("closureConsentNewsletter"),"news"),l=m("closureConsentRequired")||"";try{fetch(le+"/s/k/c?embed_token="+encodeURIComponent(J)+"&lang="+encodeURIComponent(ae)).then(function(h){return h.ok?h.json():null}).then(function(h){h&&(typeof h.consent_notice=="string"&&h.consent_notice&&(a.textContent=h.consent_notice),typeof h.consent_answer_label=="string"&&h.consent_answer_label&&n.setLabel(h.consent_answer_label),typeof h.consent_newsletter_label=="string"&&h.consent_newsletter_label&&o.setLabel(h.consent_newsletter_label),typeof h.consent_required_error=="string"&&h.consent_required_error&&(l=h.consent_required_error))}).catch(function(){})}catch{}var s=document.createElement("div");s.className="lurija-closure-email";var d=document.createElement("input");d.type="email",d.className="lurija-closure-input",d.placeholder=t.email_placeholder||"";var u=document.createElement("button");u.className="lurija-closure-btn lurija-closure-submit",u.textContent=t.email_submit||"";var f=document.createElement("div");f.className="lurija-closure-err",f.style.display="none";function p(){var h=(d.value||"").trim();if(!ou.test(h)){f.textContent=t.invalid_email||"",f.style.display="";return}if(!n.cb.checked){f.textContent=l,f.style.display="";return}for(u.disabled=!0,ct("closure_email",{chat_id:r||null,email:h}),ct("email_provided",{chat_id:r||null,email:h}),Ca(r,"email",h,{answer:n.cb.checked,newsletter:o.cb.checked});e.firstChild;)e.removeChild(e.firstChild);var L=document.createElement("div");L.className="lurija-closure-confirm",L.textContent=t.sent_confirm||t.confirm||"",e.appendChild(L),io(e,t,i),i.scrollTop=i.scrollHeight}u.addEventListener("click",p),d.addEventListener("keydown",function(h){h.key==="Enter"&&(h.preventDefault(),p())}),s.appendChild(d),s.appendChild(u),e.appendChild(n.row),e.appendChild(o.row),e.appendChild(s),e.appendChild(f);try{d.focus()}catch{}i.scrollTop=i.scrollHeight}function no(e,t,r,i){if(!$){var a=e||{};if(!(!a.prompt&&!a.finish&&!a.email)){ct("closure_offered",{chat_id:i||null}),er(!0);var n=document.createElement("div");n.className="lurija-closure lurija-elin";var o=document.createElement("div");o.className="lurija-closure-prompt",o.textContent=a.prompt||"",n.appendChild(o);var l=document.createElement("div");l.className="lurija-closure-btns";var s=document.createElement("button");s.className="lurija-closure-btn",s.textContent=a.continue||"",s.addEventListener("click",function(){ct("closure_continue",{chat_id:i||null}),Ca(i,"continue",null),n.remove(),er(!1),li(),ye(t,"waiting")});var d=document.createElement("button");d.className="lurija-closure-btn",d.textContent=a.finish||"",d.addEventListener("click",function(){for(ct("closure_finish",{chat_id:i||null}),Ca(i,"finish",null);n.firstChild;)n.removeChild(n.firstChild);io(n,a,t),t.scrollTop=t.scrollHeight});var u=document.createElement("button");u.className="lurija-closure-btn",u.textContent=a.email||"",u.addEventListener("click",function(){lu(n,a,i,t)}),l.appendChild(s),l.appendChild(d),l.appendChild(u),n.appendChild(l),(r||t).appendChild(n),t.scrollHeight-t.scrollTop-t.clientHeight<=64&&(t.scrollTop=t.scrollHeight)}}}function _a(e){if(e){var t=e.querySelector(".ikw-wizard");t&&t.parentNode===e&&e.lastChild!==t&&e.appendChild(t)}}function oo(e,t,r,i,a){if(!e||!i)return!1;var n=e.clarify_questions||[];if(!n.length)return!1;var o=i.querySelector(".ikw-wizard");if(o&&(o.__wizCount||0)>=n.length)return!1;var l=Array.isArray(e.clarify_questions_options)?e.clarify_questions_options:e.clarify_options&&e.clarify_options.length?[e.clarify_options].concat(n.slice(1).map(function(){return[]})):[],s=Array.isArray(e.clarify_questions_multi)?e.clarify_questions_multi:[],d=Array.isArray(e.clarify_questions_actions)?e.clarify_questions_actions:[],u=null;if(o){var f=o.__wizState;if(f&&Array.isArray(f.answers)){for(var p=f.answers.slice();p.length<n.length;)p.push(null);u={step:f.step||0,answers:p}}o.parentNode&&o.parentNode.removeChild(o)}return Ar(i,"waiting"),Ea(n,l,s,t,r,e.user_lang,i,a,u,d),!0}function Ea(e,t,r,i,a,n,o,l,s,d){if(!e||!e.length)return;var u=m("wizardExplainFallback",n),f=m("wizardConfirm",n),p=m("wizardSelectAll",n),h=m("wizardFreePlaceholder",n),L=m("wizardSkip",n),M=Zn[n]||Zn.en,x=s&&Array.isArray(s.answers)?{step:s.step||0,answers:s.answers.slice()}:{step:0,answers:e.map(function(){return null})},T=null;function j(){Nl({text:l||"",questions:e,questionsOptions:t||[],questionsMultiple:r||[],questionsActions:d||[],lang:n||"",answers:x.answers,step:x.step})}var w=document.createElement("div");w.className="ikw-wizard lurija-elin",w.__wizState=x,w.__wizCount=e.length;function _(F){var y=document.createElement("div");y.className="ikw-answered",y.tabIndex=0,y.setAttribute("role","button"),y.title=M;var S=document.createElement("div");S.className="ikw-answered-q",S.appendChild(document.createTextNode(F+1+". "+e[F]));var E=document.createElement("span");E.className="ikw-answered-edit",E.textContent="\u270E "+M,S.appendChild(E),y.appendChild(S);function ee(){T===null&&(T=x.step),x.step=F,te(!0),j()}y.addEventListener("click",ee),y.addEventListener("keydown",function(g){(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),ee())});var V=document.createElement("div");V.className="ikw-answered-arow";var fe=x.answers[F]||[];if(fe.length)fe.forEach(function(g){var k=document.createElement("span");k.className="ikw-answered-a",k.textContent=g,V.appendChild(k)});else{var re=document.createElement("span");re.className="ikw-answered-skip",re.textContent="\u2014",V.appendChild(re)}y.appendChild(V),w.appendChild(y)}function A(F,y,S){var E=document.createElement("div");E.className="ikw-opt-explain",E.style.display="none";var ee=document.createElement("button");ee.type="button",ee.className="ikw-opt-help",ee.textContent="?",Se(ee,m("wizardHelpTitle",n));var V=!1;ee.addEventListener("click",function(){if(E.style.display==="none"){if(E.style.display="",ee.classList.add("on"),!V){V=!0,E.textContent="\u2026";var fe=(ne||[]).slice(-6).map(function(re){return re.role+": "+(re.content||"").slice(0,400)}).join(` 27`);fetch(le+"/s/x",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({embed_token:J,session_token:de,question:e[y],option:S,lang:n||"lv",context:fe})}).then(function(re){return re.ok?re.json():null}).then(function(re){E.textContent=re&&re.explanation?re.explanation:u}).catch(function(){E.textContent=u})}}else E.style.display="none",ee.classList.remove("on")}),F.appendChild(ee),w.appendChild(F),w.appendChild(E)}function K(F){var y=R||(o&&o.querySelector?o.querySelector(".lurija-turn-avatar"):null);if(y){var S=y.querySelector(".lurija-turn-avatar-label");S||(S=c("div","lurija-turn-avatar-label"),y.appendChild(S)),S.textContent=F,Lr(S,n);return}var E=c("p","ikw-wizard-q");E.textContent=F,Lr(E,n),w.appendChild(E)}var R=null;function te(F){if(ut=null,At(null),o&&o.querySelector){var y=o.querySelector(".lurija-turn-avatar");y&&(!R||!R.isConnected)&&(R=y)}for(;w.firstChild;)w.removeChild(w.firstChild);for(var S=0;S<x.step;S++)_(S);var E=x.step;if(E>=e.length)return;if(R&&w.appendChild(R),R&&i&&i.querySelectorAll)for(var ee=i.querySelectorAll(".lurija-turn-avatar, .lurija-status-slot"),V=0;V<ee.length;V++)ee[V]!==R&&ee[V].remove();var fe=t&&t[E]||[],re=fe.filter(function(Q){return!tu(Q)}),g=!!(r&&r[E])&&re.length>0,k=[],O,C,U=x.answers[E]||[];if(K(e[E]),g){var ke=document.createElement("p");ke.className="ikw-wizard-hint",ke.textContent=p,w.appendChild(ke)}function he(){var Q=k.slice(),H=document.getElementById("lurija-input");H&&H.value.trim()&&(Q.push(H.value.trim()),H.value="",Ie(H)),ve(Q)}function Ae(){C&&(C.disabled=k.length===0)}var me=d&&d[E]||null;re.forEach(function(Q,H){var Me=document.createElement("div");Me.className="ikw-opt-row lurija-fadeup",Me.style.animationDelay=50+H*45+"ms";var we=document.createElement("button");we.type="button",we.className="ikw-opt",we.textContent=Q,Lr(we,n);var He=null;if(me&&Array.isArray(me)){var nt=fe.indexOf(Q);nt>=0&&nt<me.length&&(He=me[nt])}if(He&&(He.type==="attach_doc"||He.type==="describe_situation")){var Rt=c("span","ikw-opt-ico");Rt.innerHTML=He.type==="attach_doc"?Ts:As,we.insertBefore(Rt,we.firstChild),we.classList.add("ikw-opt--action")}
27U.indexOf(Q)!==-1&&(we.classList.add("sel"),g&&k.push(Q)),we.addEventListener("click",function(){if(He&&He.type==="attach_doc"&&!g){var Pt=window.__lurija_triggerAttachDoc;if(typeof Pt=="function"){we.disabled=!0,we.classList.add("ikw-opt--loading"),Pt().then(function(lt){we.disabled=!1,we.classList.remove("ikw-opt--loading"),lt&<.ok&&ve([Q])});return}}if(He&&He.type==="describe_situation"&&!g){we.classList.add("sel"),Yt(),cr=!0;var De=document.getElementById("lurija-input");if(De){De.placeholder=m("wizardDescribePlaceholder",n);try{De.focus()}catch{}typeof Ie=="function"&&Ie(De)}a&&(a.disabled=!1),i&&(i.scrollTop=i.scrollHeight);return}if(g){var ot=k.indexOf(Q);ot===-1?(k.push(Q),we.classList.add("sel")):(k.splice(ot,1),we.classList.remove("sel")),Ae()}else ve([Q])}),Me.appendChild(we),A(Me,E,Q)});var v=50+re.length*45+"ms";O=null;function P(Q){if(g){var H=k.slice();Q&&Q.trim()&&H.push(Q.trim()),ve(H)}else ve([Q])}ut={el:w,fn:P,free:!re.length,opts:re},At(re.length?m("wizardComposerHint",n):h);var B=U.filter(function(Q){return re.indexOf(Q)===-1});if(B.length){var z=document.getElementById("lurija-input");z&&!z.value&&(z.value=B.join(", "),Ie(z))}var W=document.createElement("div");W.className="ikw-skip-row lurija-fadeup",W.style.animationDelay=v,g&&(W.style.justifyContent="space-between",C=document.createElement("button"),C.type="button",C.className="ikw-confirm",C.textContent=f,C.disabled=!0,C.addEventListener("click",he),W.appendChild(C));var Z=document.createElement("button");Z.type="button",Z.className="ikw-skip",Z.setAttribute("aria-label",L),Z.appendChild(document.createTextNode(L+" "));var X=document.createElement("span");if(X.className="ikw-skip-arr",X.textContent="\u2192",Z.appendChild(X),Z.addEventListener("click",function(){ve([])}),W.appendChild(Z),w.appendChild(W),Ae(),F&&re.length===0){var je=document.getElementById("lurija-input");if(je)try{je.focus({preventScroll:!0})}catch{try{je.focus()}catch{}}}i&&(i.scrollTop=i.scrollHeight)}function ue(){Yt();var F=[];x.answers.forEach(function(S){S&&S.length&&(F=F.concat(S))});var y=F.join(", ");at(y||xi,a,i,!1)}function ve(F){var y=(F||[]).map(function(S){return(S||"").trim()}).filter(Boolean);if(x.answers[x.step]=y,T!==null){x.step=T,T=null,te(!0),j();return}x.step+=1,te(!0),x.step>=e.length?ue():j()}te(),(o||i).appendChild(w),j()}function su(){var e=null;try{e=sessionStorage.getItem(wa)}catch{return}if(e){try{sessionStorage.removeItem(wa)}catch{}var t;try{t=JSON.parse(e)}catch{return}if(!(!t||!t.slug)&&Xn(t.path,location.pathname)&&!(!t.ts||Date.now()-t.ts>Zs)){var r=String(t.slug).replace(/^id_/i,""),i=function(){if(dr)try{if(dr(t.slug)!==!1)return!0}catch{}var a=null;try{a=document.getElementById(t.slug)||document.getElementById("id_"+r)||document.querySelector('[name="'+t.slug+'"]')||document.querySelector('[name="'+r+'"]')}catch{a=null}if(!a)return!1;try{a.scrollIntoView({block:"center",behavior:"smooth"}),a.focus()}catch{}return!0};i()||[300,900,1800].forEach(function(a){setTimeout(i,a)})}}}async function uu(){ps();const e=document.querySelector("#lurija-chat, [data-lurija-chat], #ikeds-chat, [data-ikeds-chat]");e?Ps(e):Rs(),fs(document.getElementById("lurija-root")),_o(),su();try{await on()}catch{}try{await Bi()}catch{}}function lo(){try{var e=uu();e&&typeof e.catch=="function"&&e.catch(function(t){window.console&&console.error("[lurija] boot failed",t)})}catch(t){window.console&&console.error("[lurija] boot failed",t)}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",lo):lo()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.